import { createRequire } from "node:module";
var __create = Object.create;
var __getProtoOf = Object.getPrototypeOf;
var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
function __accessProp(key) {
  return this[key];
}
var __toESMCache_node;
var __toESMCache_esm;
var __toESM = (mod, isNodeMode, target) => {
  var canCache = mod != null && typeof mod === "object";
  if (canCache) {
    var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
    var cached = cache.get(mod);
    if (cached)
      return cached;
  }
  target = mod != null ? __create(__getProtoOf(mod)) : {};
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
  for (let key of __getOwnPropNames(mod))
    if (!__hasOwnProp.call(to, key))
      __defProp(to, key, {
        get: __accessProp.bind(mod, key),
        enumerable: true
      });
  if (canCache)
    cache.set(mod, to);
  return to;
};
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
var __returnValue = (v) => v;
function __exportSetter(name, newValue) {
  this[name] = __returnValue.bind(null, newValue);
}
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, {
      get: all[name],
      enumerable: true,
      configurable: true,
      set: __exportSetter.bind(all, name)
    });
};
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
var __require = /* @__PURE__ */ createRequire(import.meta.url);

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js
var require_globalThis = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports._globalThis = undefined;
  exports._globalThis = typeof globalThis === "object" ? globalThis : global;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/platform/node/index.js
var require_node = __commonJS((exports) => {
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() {
      return m[k];
    } });
  } : function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = exports && exports.__exportStar || function(m, exports2) {
    for (var p in m)
      if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
        __createBinding(exports2, m, p);
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  __exportStar(require_globalThis(), exports);
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/platform/index.js
var require_platform = __commonJS((exports) => {
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() {
      return m[k];
    } });
  } : function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = exports && exports.__exportStar || function(m, exports2) {
    for (var p in m)
      if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
        __createBinding(exports2, m, p);
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  __exportStar(require_node(), exports);
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.js
var require_version = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.VERSION = undefined;
  exports.VERSION = "1.9.0";
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/internal/semver.js
var require_semver = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isCompatible = exports._makeCompatibilityCheck = undefined;
  var version_1 = require_version();
  var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
  function _makeCompatibilityCheck(ownVersion) {
    const acceptedVersions = new Set([ownVersion]);
    const rejectedVersions = new Set;
    const myVersionMatch = ownVersion.match(re);
    if (!myVersionMatch) {
      return () => false;
    }
    const ownVersionParsed = {
      major: +myVersionMatch[1],
      minor: +myVersionMatch[2],
      patch: +myVersionMatch[3],
      prerelease: myVersionMatch[4]
    };
    if (ownVersionParsed.prerelease != null) {
      return function isExactmatch(globalVersion) {
        return globalVersion === ownVersion;
      };
    }
    function _reject(v) {
      rejectedVersions.add(v);
      return false;
    }
    function _accept(v) {
      acceptedVersions.add(v);
      return true;
    }
    return function isCompatible(globalVersion) {
      if (acceptedVersions.has(globalVersion)) {
        return true;
      }
      if (rejectedVersions.has(globalVersion)) {
        return false;
      }
      const globalVersionMatch = globalVersion.match(re);
      if (!globalVersionMatch) {
        return _reject(globalVersion);
      }
      const globalVersionParsed = {
        major: +globalVersionMatch[1],
        minor: +globalVersionMatch[2],
        patch: +globalVersionMatch[3],
        prerelease: globalVersionMatch[4]
      };
      if (globalVersionParsed.prerelease != null) {
        return _reject(globalVersion);
      }
      if (ownVersionParsed.major !== globalVersionParsed.major) {
        return _reject(globalVersion);
      }
      if (ownVersionParsed.major === 0) {
        if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
          return _accept(globalVersion);
        }
        return _reject(globalVersion);
      }
      if (ownVersionParsed.minor <= globalVersionParsed.minor) {
        return _accept(globalVersion);
      }
      return _reject(globalVersion);
    };
  }
  exports._makeCompatibilityCheck = _makeCompatibilityCheck;
  exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/internal/global-utils.js
var require_global_utils = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
  var platform_1 = require_platform();
  var version_1 = require_version();
  var semver_1 = require_semver();
  var major = version_1.VERSION.split(".")[0];
  var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
  var _global = platform_1._globalThis;
  function registerGlobal(type, instance, diag, allowOverride = false) {
    var _a;
    const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== undefined ? _a : {
      version: version_1.VERSION
    };
    if (!allowOverride && api[type]) {
      const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
      diag.error(err.stack || err.message);
      return false;
    }
    if (api.version !== version_1.VERSION) {
      const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
      diag.error(err.stack || err.message);
      return false;
    }
    api[type] = instance;
    diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
    return true;
  }
  exports.registerGlobal = registerGlobal;
  function getGlobal(type) {
    var _a, _b;
    const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === undefined ? undefined : _a.version;
    if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
      return;
    }
    return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
  }
  exports.getGlobal = getGlobal;
  function unregisterGlobal(type, diag) {
    diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
    const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
    if (api) {
      delete api[type];
    }
  }
  exports.unregisterGlobal = unregisterGlobal;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
var require_ComponentLogger = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DiagComponentLogger = undefined;
  var global_utils_1 = require_global_utils();

  class DiagComponentLogger {
    constructor(props) {
      this._namespace = props.namespace || "DiagComponentLogger";
    }
    debug(...args) {
      return logProxy("debug", this._namespace, args);
    }
    error(...args) {
      return logProxy("error", this._namespace, args);
    }
    info(...args) {
      return logProxy("info", this._namespace, args);
    }
    warn(...args) {
      return logProxy("warn", this._namespace, args);
    }
    verbose(...args) {
      return logProxy("verbose", this._namespace, args);
    }
  }
  exports.DiagComponentLogger = DiagComponentLogger;
  function logProxy(funcName, namespace, args) {
    const logger = (0, global_utils_1.getGlobal)("diag");
    if (!logger) {
      return;
    }
    args.unshift(namespace);
    return logger[funcName](...args);
  }
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/diag/types.js
var require_types = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DiagLogLevel = undefined;
  var DiagLogLevel;
  (function(DiagLogLevel2) {
    DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
    DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
    DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
    DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
    DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
    DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
    DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
  })(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
var require_logLevelLogger = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.createLogLevelDiagLogger = undefined;
  var types_1 = require_types();
  function createLogLevelDiagLogger(maxLevel, logger) {
    if (maxLevel < types_1.DiagLogLevel.NONE) {
      maxLevel = types_1.DiagLogLevel.NONE;
    } else if (maxLevel > types_1.DiagLogLevel.ALL) {
      maxLevel = types_1.DiagLogLevel.ALL;
    }
    logger = logger || {};
    function _filterFunc(funcName, theLevel) {
      const theFunc = logger[funcName];
      if (typeof theFunc === "function" && maxLevel >= theLevel) {
        return theFunc.bind(logger);
      }
      return function() {};
    }
    return {
      error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
      warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
      info: _filterFunc("info", types_1.DiagLogLevel.INFO),
      debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
      verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
    };
  }
  exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/api/diag.js
var require_diag = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DiagAPI = undefined;
  var ComponentLogger_1 = require_ComponentLogger();
  var logLevelLogger_1 = require_logLevelLogger();
  var types_1 = require_types();
  var global_utils_1 = require_global_utils();
  var API_NAME = "diag";

  class DiagAPI {
    constructor() {
      function _logProxy(funcName) {
        return function(...args) {
          const logger = (0, global_utils_1.getGlobal)("diag");
          if (!logger)
            return;
          return logger[funcName](...args);
        };
      }
      const self2 = this;
      const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
        var _a, _b, _c;
        if (logger === self2) {
          const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
          self2.error((_a = err.stack) !== null && _a !== undefined ? _a : err.message);
          return false;
        }
        if (typeof optionsOrLogLevel === "number") {
          optionsOrLogLevel = {
            logLevel: optionsOrLogLevel
          };
        }
        const oldLogger = (0, global_utils_1.getGlobal)("diag");
        const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
        if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
          const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
          oldLogger.warn(`Current logger will be overwritten from ${stack}`);
          newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
        }
        return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
      };
      self2.setLogger = setLogger;
      self2.disable = () => {
        (0, global_utils_1.unregisterGlobal)(API_NAME, self2);
      };
      self2.createComponentLogger = (options) => {
        return new ComponentLogger_1.DiagComponentLogger(options);
      };
      self2.verbose = _logProxy("verbose");
      self2.debug = _logProxy("debug");
      self2.info = _logProxy("info");
      self2.warn = _logProxy("warn");
      self2.error = _logProxy("error");
    }
    static instance() {
      if (!this._instance) {
        this._instance = new DiagAPI;
      }
      return this._instance;
    }
  }
  exports.DiagAPI = DiagAPI;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
var require_baggage_impl = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BaggageImpl = undefined;

  class BaggageImpl {
    constructor(entries) {
      this._entries = entries ? new Map(entries) : new Map;
    }
    getEntry(key) {
      const entry = this._entries.get(key);
      if (!entry) {
        return;
      }
      return Object.assign({}, entry);
    }
    getAllEntries() {
      return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);
    }
    setEntry(key, entry) {
      const newBaggage = new BaggageImpl(this._entries);
      newBaggage._entries.set(key, entry);
      return newBaggage;
    }
    removeEntry(key) {
      const newBaggage = new BaggageImpl(this._entries);
      newBaggage._entries.delete(key);
      return newBaggage;
    }
    removeEntries(...keys) {
      const newBaggage = new BaggageImpl(this._entries);
      for (const key of keys) {
        newBaggage._entries.delete(key);
      }
      return newBaggage;
    }
    clear() {
      return new BaggageImpl;
    }
  }
  exports.BaggageImpl = BaggageImpl;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
var require_symbol = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.baggageEntryMetadataSymbol = undefined;
  exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/baggage/utils.js
var require_utils = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
  var diag_1 = require_diag();
  var baggage_impl_1 = require_baggage_impl();
  var symbol_1 = require_symbol();
  var diag = diag_1.DiagAPI.instance();
  function createBaggage(entries = {}) {
    return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
  }
  exports.createBaggage = createBaggage;
  function baggageEntryMetadataFromString(str) {
    if (typeof str !== "string") {
      diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
      str = "";
    }
    return {
      __TYPE__: symbol_1.baggageEntryMetadataSymbol,
      toString() {
        return str;
      }
    };
  }
  exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/context/context.js
var require_context = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ROOT_CONTEXT = exports.createContextKey = undefined;
  function createContextKey(description) {
    return Symbol.for(description);
  }
  exports.createContextKey = createContextKey;

  class BaseContext {
    constructor(parentContext) {
      const self2 = this;
      self2._currentContext = parentContext ? new Map(parentContext) : new Map;
      self2.getValue = (key) => self2._currentContext.get(key);
      self2.setValue = (key, value) => {
        const context = new BaseContext(self2._currentContext);
        context._currentContext.set(key, value);
        return context;
      };
      self2.deleteValue = (key) => {
        const context = new BaseContext(self2._currentContext);
        context._currentContext.delete(key);
        return context;
      };
    }
  }
  exports.ROOT_CONTEXT = new BaseContext;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
var require_consoleLogger = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DiagConsoleLogger = undefined;
  var consoleMap = [
    { n: "error", c: "error" },
    { n: "warn", c: "warn" },
    { n: "info", c: "info" },
    { n: "debug", c: "debug" },
    { n: "verbose", c: "trace" }
  ];

  class DiagConsoleLogger {
    constructor() {
      function _consoleFunc(funcName) {
        return function(...args) {
          if (console) {
            let theFunc = console[funcName];
            if (typeof theFunc !== "function") {
              theFunc = console.log;
            }
            if (typeof theFunc === "function") {
              return theFunc.apply(console, args);
            }
          }
        };
      }
      for (let i = 0;i < consoleMap.length; i++) {
        this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
      }
    }
  }
  exports.DiagConsoleLogger = DiagConsoleLogger;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
var require_NoopMeter = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;

  class NoopMeter {
    constructor() {}
    createGauge(_name, _options) {
      return exports.NOOP_GAUGE_METRIC;
    }
    createHistogram(_name, _options) {
      return exports.NOOP_HISTOGRAM_METRIC;
    }
    createCounter(_name, _options) {
      return exports.NOOP_COUNTER_METRIC;
    }
    createUpDownCounter(_name, _options) {
      return exports.NOOP_UP_DOWN_COUNTER_METRIC;
    }
    createObservableGauge(_name, _options) {
      return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
    }
    createObservableCounter(_name, _options) {
      return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
    }
    createObservableUpDownCounter(_name, _options) {
      return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
    }
    addBatchObservableCallback(_callback, _observables) {}
    removeBatchObservableCallback(_callback) {}
  }
  exports.NoopMeter = NoopMeter;

  class NoopMetric {
  }
  exports.NoopMetric = NoopMetric;

  class NoopCounterMetric extends NoopMetric {
    add(_value, _attributes) {}
  }
  exports.NoopCounterMetric = NoopCounterMetric;

  class NoopUpDownCounterMetric extends NoopMetric {
    add(_value, _attributes) {}
  }
  exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;

  class NoopGaugeMetric extends NoopMetric {
    record(_value, _attributes) {}
  }
  exports.NoopGaugeMetric = NoopGaugeMetric;

  class NoopHistogramMetric extends NoopMetric {
    record(_value, _attributes) {}
  }
  exports.NoopHistogramMetric = NoopHistogramMetric;

  class NoopObservableMetric {
    addCallback(_callback) {}
    removeCallback(_callback) {}
  }
  exports.NoopObservableMetric = NoopObservableMetric;

  class NoopObservableCounterMetric extends NoopObservableMetric {
  }
  exports.NoopObservableCounterMetric = NoopObservableCounterMetric;

  class NoopObservableGaugeMetric extends NoopObservableMetric {
  }
  exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;

  class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
  }
  exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
  exports.NOOP_METER = new NoopMeter;
  exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
  exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
  exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
  exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
  exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
  exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
  exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
  function createNoopMeter() {
    return exports.NOOP_METER;
  }
  exports.createNoopMeter = createNoopMeter;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/metrics/Metric.js
var require_Metric = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ValueType = undefined;
  var ValueType;
  (function(ValueType2) {
    ValueType2[ValueType2["INT"] = 0] = "INT";
    ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
  })(ValueType = exports.ValueType || (exports.ValueType = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
var require_TextMapPropagator = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
  exports.defaultTextMapGetter = {
    get(carrier, key) {
      if (carrier == null) {
        return;
      }
      return carrier[key];
    },
    keys(carrier) {
      if (carrier == null) {
        return [];
      }
      return Object.keys(carrier);
    }
  };
  exports.defaultTextMapSetter = {
    set(carrier, key, value) {
      if (carrier == null) {
        return;
      }
      carrier[key] = value;
    }
  };
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
var require_NoopContextManager = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NoopContextManager = undefined;
  var context_1 = require_context();

  class NoopContextManager {
    active() {
      return context_1.ROOT_CONTEXT;
    }
    with(_context, fn, thisArg, ...args) {
      return fn.call(thisArg, ...args);
    }
    bind(_context, target) {
      return target;
    }
    enable() {
      return this;
    }
    disable() {
      return this;
    }
  }
  exports.NoopContextManager = NoopContextManager;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/api/context.js
var require_context2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ContextAPI = undefined;
  var NoopContextManager_1 = require_NoopContextManager();
  var global_utils_1 = require_global_utils();
  var diag_1 = require_diag();
  var API_NAME = "context";
  var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;

  class ContextAPI {
    constructor() {}
    static getInstance() {
      if (!this._instance) {
        this._instance = new ContextAPI;
      }
      return this._instance;
    }
    setGlobalContextManager(contextManager) {
      return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
    }
    active() {
      return this._getContextManager().active();
    }
    with(context, fn, thisArg, ...args) {
      return this._getContextManager().with(context, fn, thisArg, ...args);
    }
    bind(context, target) {
      return this._getContextManager().bind(context, target);
    }
    _getContextManager() {
      return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
    }
    disable() {
      this._getContextManager().disable();
      (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
    }
  }
  exports.ContextAPI = ContextAPI;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
var require_trace_flags = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TraceFlags = undefined;
  var TraceFlags;
  (function(TraceFlags2) {
    TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
    TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
  })(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
var require_invalid_span_constants = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
  var trace_flags_1 = require_trace_flags();
  exports.INVALID_SPANID = "0000000000000000";
  exports.INVALID_TRACEID = "00000000000000000000000000000000";
  exports.INVALID_SPAN_CONTEXT = {
    traceId: exports.INVALID_TRACEID,
    spanId: exports.INVALID_SPANID,
    traceFlags: trace_flags_1.TraceFlags.NONE
  };
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
var require_NonRecordingSpan = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NonRecordingSpan = undefined;
  var invalid_span_constants_1 = require_invalid_span_constants();

  class NonRecordingSpan {
    constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
      this._spanContext = _spanContext;
    }
    spanContext() {
      return this._spanContext;
    }
    setAttribute(_key, _value) {
      return this;
    }
    setAttributes(_attributes) {
      return this;
    }
    addEvent(_name, _attributes) {
      return this;
    }
    addLink(_link) {
      return this;
    }
    addLinks(_links) {
      return this;
    }
    setStatus(_status) {
      return this;
    }
    updateName(_name) {
      return this;
    }
    end(_endTime) {}
    isRecording() {
      return false;
    }
    recordException(_exception, _time) {}
  }
  exports.NonRecordingSpan = NonRecordingSpan;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/context-utils.js
var require_context_utils = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
  var context_1 = require_context();
  var NonRecordingSpan_1 = require_NonRecordingSpan();
  var context_2 = require_context2();
  var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
  function getSpan(context) {
    return context.getValue(SPAN_KEY) || undefined;
  }
  exports.getSpan = getSpan;
  function getActiveSpan() {
    return getSpan(context_2.ContextAPI.getInstance().active());
  }
  exports.getActiveSpan = getActiveSpan;
  function setSpan(context, span) {
    return context.setValue(SPAN_KEY, span);
  }
  exports.setSpan = setSpan;
  function deleteSpan(context) {
    return context.deleteValue(SPAN_KEY);
  }
  exports.deleteSpan = deleteSpan;
  function setSpanContext(context, spanContext) {
    return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
  }
  exports.setSpanContext = setSpanContext;
  function getSpanContext(context) {
    var _a;
    return (_a = getSpan(context)) === null || _a === undefined ? undefined : _a.spanContext();
  }
  exports.getSpanContext = getSpanContext;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
var require_spancontext_utils = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
  var invalid_span_constants_1 = require_invalid_span_constants();
  var NonRecordingSpan_1 = require_NonRecordingSpan();
  var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
  var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
  function isValidTraceId(traceId) {
    return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
  }
  exports.isValidTraceId = isValidTraceId;
  function isValidSpanId(spanId) {
    return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;
  }
  exports.isValidSpanId = isValidSpanId;
  function isSpanContextValid(spanContext) {
    return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
  }
  exports.isSpanContextValid = isSpanContextValid;
  function wrapSpanContext(spanContext) {
    return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
  }
  exports.wrapSpanContext = wrapSpanContext;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
var require_NoopTracer = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NoopTracer = undefined;
  var context_1 = require_context2();
  var context_utils_1 = require_context_utils();
  var NonRecordingSpan_1 = require_NonRecordingSpan();
  var spancontext_utils_1 = require_spancontext_utils();
  var contextApi = context_1.ContextAPI.getInstance();

  class NoopTracer {
    startSpan(name, options, context = contextApi.active()) {
      const root = Boolean(options === null || options === undefined ? undefined : options.root);
      if (root) {
        return new NonRecordingSpan_1.NonRecordingSpan;
      }
      const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
      if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
        return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
      } else {
        return new NonRecordingSpan_1.NonRecordingSpan;
      }
    }
    startActiveSpan(name, arg2, arg3, arg4) {
      let opts;
      let ctx;
      let fn;
      if (arguments.length < 2) {
        return;
      } else if (arguments.length === 2) {
        fn = arg2;
      } else if (arguments.length === 3) {
        opts = arg2;
        fn = arg3;
      } else {
        opts = arg2;
        ctx = arg3;
        fn = arg4;
      }
      const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
      const span = this.startSpan(name, opts, parentContext);
      const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
      return contextApi.with(contextWithSpanSet, fn, undefined, span);
    }
  }
  exports.NoopTracer = NoopTracer;
  function isSpanContext(spanContext) {
    return typeof spanContext === "object" && typeof spanContext["spanId"] === "string" && typeof spanContext["traceId"] === "string" && typeof spanContext["traceFlags"] === "number";
  }
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
var require_ProxyTracer = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ProxyTracer = undefined;
  var NoopTracer_1 = require_NoopTracer();
  var NOOP_TRACER = new NoopTracer_1.NoopTracer;

  class ProxyTracer {
    constructor(_provider, name, version, options) {
      this._provider = _provider;
      this.name = name;
      this.version = version;
      this.options = options;
    }
    startSpan(name, options, context) {
      return this._getTracer().startSpan(name, options, context);
    }
    startActiveSpan(_name, _options, _context, _fn) {
      const tracer = this._getTracer();
      return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
    }
    _getTracer() {
      if (this._delegate) {
        return this._delegate;
      }
      const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
      if (!tracer) {
        return NOOP_TRACER;
      }
      this._delegate = tracer;
      return this._delegate;
    }
  }
  exports.ProxyTracer = ProxyTracer;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
var require_NoopTracerProvider = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NoopTracerProvider = undefined;
  var NoopTracer_1 = require_NoopTracer();

  class NoopTracerProvider {
    getTracer(_name, _version, _options) {
      return new NoopTracer_1.NoopTracer;
    }
  }
  exports.NoopTracerProvider = NoopTracerProvider;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
var require_ProxyTracerProvider = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ProxyTracerProvider = undefined;
  var ProxyTracer_1 = require_ProxyTracer();
  var NoopTracerProvider_1 = require_NoopTracerProvider();
  var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;

  class ProxyTracerProvider {
    getTracer(name, version, options) {
      var _a;
      return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== undefined ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options);
    }
    getDelegate() {
      var _a;
      return (_a = this._delegate) !== null && _a !== undefined ? _a : NOOP_TRACER_PROVIDER;
    }
    setDelegate(delegate) {
      this._delegate = delegate;
    }
    getDelegateTracer(name, version, options) {
      var _a;
      return (_a = this._delegate) === null || _a === undefined ? undefined : _a.getTracer(name, version, options);
    }
  }
  exports.ProxyTracerProvider = ProxyTracerProvider;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
var require_SamplingResult = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SamplingDecision = undefined;
  var SamplingDecision;
  (function(SamplingDecision2) {
    SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
    SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
    SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
  })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.js
var require_span_kind = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SpanKind = undefined;
  var SpanKind;
  (function(SpanKind2) {
    SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
    SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
    SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
    SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
    SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
  })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.js
var require_status = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SpanStatusCode = undefined;
  var SpanStatusCode;
  (function(SpanStatusCode2) {
    SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
    SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
    SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
  })(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
var require_tracestate_validators = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.validateValue = exports.validateKey = undefined;
  var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
  var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
  var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
  var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
  var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
  var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
  function validateKey(key) {
    return VALID_KEY_REGEX.test(key);
  }
  exports.validateKey = validateKey;
  function validateValue(value) {
    return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
  }
  exports.validateValue = validateValue;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
var require_tracestate_impl = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TraceStateImpl = undefined;
  var tracestate_validators_1 = require_tracestate_validators();
  var MAX_TRACE_STATE_ITEMS = 32;
  var MAX_TRACE_STATE_LEN = 512;
  var LIST_MEMBERS_SEPARATOR = ",";
  var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";

  class TraceStateImpl {
    constructor(rawTraceState) {
      this._internalState = new Map;
      if (rawTraceState)
        this._parse(rawTraceState);
    }
    set(key, value) {
      const traceState = this._clone();
      if (traceState._internalState.has(key)) {
        traceState._internalState.delete(key);
      }
      traceState._internalState.set(key, value);
      return traceState;
    }
    unset(key) {
      const traceState = this._clone();
      traceState._internalState.delete(key);
      return traceState;
    }
    get(key) {
      return this._internalState.get(key);
    }
    serialize() {
      return this._keys().reduce((agg, key) => {
        agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
        return agg;
      }, []).join(LIST_MEMBERS_SEPARATOR);
    }
    _parse(rawTraceState) {
      if (rawTraceState.length > MAX_TRACE_STATE_LEN)
        return;
      this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce((agg, part) => {
        const listMember = part.trim();
        const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
        if (i !== -1) {
          const key = listMember.slice(0, i);
          const value = listMember.slice(i + 1, part.length);
          if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
            agg.set(key, value);
          }
        }
        return agg;
      }, new Map);
      if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
        this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
      }
    }
    _keys() {
      return Array.from(this._internalState.keys()).reverse();
    }
    _clone() {
      const traceState = new TraceStateImpl;
      traceState._internalState = new Map(this._internalState);
      return traceState;
    }
  }
  exports.TraceStateImpl = TraceStateImpl;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
var require_utils2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.createTraceState = undefined;
  var tracestate_impl_1 = require_tracestate_impl();
  function createTraceState(rawTraceState) {
    return new tracestate_impl_1.TraceStateImpl(rawTraceState);
  }
  exports.createTraceState = createTraceState;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/context-api.js
var require_context_api = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.context = undefined;
  var context_1 = require_context2();
  exports.context = context_1.ContextAPI.getInstance();
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/diag-api.js
var require_diag_api = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.diag = undefined;
  var diag_1 = require_diag();
  exports.diag = diag_1.DiagAPI.instance();
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
var require_NoopMeterProvider = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
  var NoopMeter_1 = require_NoopMeter();

  class NoopMeterProvider {
    getMeter(_name, _version, _options) {
      return NoopMeter_1.NOOP_METER;
    }
  }
  exports.NoopMeterProvider = NoopMeterProvider;
  exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/api/metrics.js
var require_metrics = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MetricsAPI = undefined;
  var NoopMeterProvider_1 = require_NoopMeterProvider();
  var global_utils_1 = require_global_utils();
  var diag_1 = require_diag();
  var API_NAME = "metrics";

  class MetricsAPI {
    constructor() {}
    static getInstance() {
      if (!this._instance) {
        this._instance = new MetricsAPI;
      }
      return this._instance;
    }
    setGlobalMeterProvider(provider) {
      return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
    }
    getMeterProvider() {
      return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
    }
    getMeter(name, version, options) {
      return this.getMeterProvider().getMeter(name, version, options);
    }
    disable() {
      (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
    }
  }
  exports.MetricsAPI = MetricsAPI;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/metrics-api.js
var require_metrics_api = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.metrics = undefined;
  var metrics_1 = require_metrics();
  exports.metrics = metrics_1.MetricsAPI.getInstance();
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
var require_NoopTextMapPropagator = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NoopTextMapPropagator = undefined;

  class NoopTextMapPropagator {
    inject(_context, _carrier) {}
    extract(context, _carrier) {
      return context;
    }
    fields() {
      return [];
    }
  }
  exports.NoopTextMapPropagator = NoopTextMapPropagator;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
var require_context_helpers = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
  var context_1 = require_context2();
  var context_2 = require_context();
  var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
  function getBaggage(context) {
    return context.getValue(BAGGAGE_KEY) || undefined;
  }
  exports.getBaggage = getBaggage;
  function getActiveBaggage() {
    return getBaggage(context_1.ContextAPI.getInstance().active());
  }
  exports.getActiveBaggage = getActiveBaggage;
  function setBaggage(context, baggage) {
    return context.setValue(BAGGAGE_KEY, baggage);
  }
  exports.setBaggage = setBaggage;
  function deleteBaggage(context) {
    return context.deleteValue(BAGGAGE_KEY);
  }
  exports.deleteBaggage = deleteBaggage;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/api/propagation.js
var require_propagation = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.PropagationAPI = undefined;
  var global_utils_1 = require_global_utils();
  var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
  var TextMapPropagator_1 = require_TextMapPropagator();
  var context_helpers_1 = require_context_helpers();
  var utils_1 = require_utils();
  var diag_1 = require_diag();
  var API_NAME = "propagation";
  var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;

  class PropagationAPI {
    constructor() {
      this.createBaggage = utils_1.createBaggage;
      this.getBaggage = context_helpers_1.getBaggage;
      this.getActiveBaggage = context_helpers_1.getActiveBaggage;
      this.setBaggage = context_helpers_1.setBaggage;
      this.deleteBaggage = context_helpers_1.deleteBaggage;
    }
    static getInstance() {
      if (!this._instance) {
        this._instance = new PropagationAPI;
      }
      return this._instance;
    }
    setGlobalPropagator(propagator) {
      return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
    }
    inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
      return this._getGlobalPropagator().inject(context, carrier, setter);
    }
    extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
      return this._getGlobalPropagator().extract(context, carrier, getter);
    }
    fields() {
      return this._getGlobalPropagator().fields();
    }
    disable() {
      (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
    }
    _getGlobalPropagator() {
      return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
    }
  }
  exports.PropagationAPI = PropagationAPI;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/propagation-api.js
var require_propagation_api = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.propagation = undefined;
  var propagation_1 = require_propagation();
  exports.propagation = propagation_1.PropagationAPI.getInstance();
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/api/trace.js
var require_trace = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TraceAPI = undefined;
  var global_utils_1 = require_global_utils();
  var ProxyTracerProvider_1 = require_ProxyTracerProvider();
  var spancontext_utils_1 = require_spancontext_utils();
  var context_utils_1 = require_context_utils();
  var diag_1 = require_diag();
  var API_NAME = "trace";

  class TraceAPI {
    constructor() {
      this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
      this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
      this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
      this.deleteSpan = context_utils_1.deleteSpan;
      this.getSpan = context_utils_1.getSpan;
      this.getActiveSpan = context_utils_1.getActiveSpan;
      this.getSpanContext = context_utils_1.getSpanContext;
      this.setSpan = context_utils_1.setSpan;
      this.setSpanContext = context_utils_1.setSpanContext;
    }
    static getInstance() {
      if (!this._instance) {
        this._instance = new TraceAPI;
      }
      return this._instance;
    }
    setGlobalTracerProvider(provider) {
      const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
      if (success) {
        this._proxyTracerProvider.setDelegate(provider);
      }
      return success;
    }
    getTracerProvider() {
      return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
    }
    getTracer(name, version) {
      return this.getTracerProvider().getTracer(name, version);
    }
    disable() {
      (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
      this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
    }
  }
  exports.TraceAPI = TraceAPI;
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.js
var require_trace_api = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.trace = undefined;
  var trace_1 = require_trace();
  exports.trace = trace_1.TraceAPI.getInstance();
});

// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/index.js
var require_src = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = undefined;
  var utils_1 = require_utils();
  Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
    return utils_1.baggageEntryMetadataFromString;
  } });
  var context_1 = require_context();
  Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
    return context_1.createContextKey;
  } });
  Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
    return context_1.ROOT_CONTEXT;
  } });
  var consoleLogger_1 = require_consoleLogger();
  Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
    return consoleLogger_1.DiagConsoleLogger;
  } });
  var types_1 = require_types();
  Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
    return types_1.DiagLogLevel;
  } });
  var NoopMeter_1 = require_NoopMeter();
  Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
    return NoopMeter_1.createNoopMeter;
  } });
  var Metric_1 = require_Metric();
  Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
    return Metric_1.ValueType;
  } });
  var TextMapPropagator_1 = require_TextMapPropagator();
  Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
    return TextMapPropagator_1.defaultTextMapGetter;
  } });
  Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
    return TextMapPropagator_1.defaultTextMapSetter;
  } });
  var ProxyTracer_1 = require_ProxyTracer();
  Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
    return ProxyTracer_1.ProxyTracer;
  } });
  var ProxyTracerProvider_1 = require_ProxyTracerProvider();
  Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
    return ProxyTracerProvider_1.ProxyTracerProvider;
  } });
  var SamplingResult_1 = require_SamplingResult();
  Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
    return SamplingResult_1.SamplingDecision;
  } });
  var span_kind_1 = require_span_kind();
  Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
    return span_kind_1.SpanKind;
  } });
  var status_1 = require_status();
  Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
    return status_1.SpanStatusCode;
  } });
  var trace_flags_1 = require_trace_flags();
  Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
    return trace_flags_1.TraceFlags;
  } });
  var utils_2 = require_utils2();
  Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
    return utils_2.createTraceState;
  } });
  var spancontext_utils_1 = require_spancontext_utils();
  Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
    return spancontext_utils_1.isSpanContextValid;
  } });
  Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
    return spancontext_utils_1.isValidTraceId;
  } });
  Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
    return spancontext_utils_1.isValidSpanId;
  } });
  var invalid_span_constants_1 = require_invalid_span_constants();
  Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
    return invalid_span_constants_1.INVALID_SPANID;
  } });
  Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
    return invalid_span_constants_1.INVALID_TRACEID;
  } });
  Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
    return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
  } });
  var context_api_1 = require_context_api();
  Object.defineProperty(exports, "context", { enumerable: true, get: function() {
    return context_api_1.context;
  } });
  var diag_api_1 = require_diag_api();
  Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
    return diag_api_1.diag;
  } });
  var metrics_api_1 = require_metrics_api();
  Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
    return metrics_api_1.metrics;
  } });
  var propagation_api_1 = require_propagation_api();
  Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
    return propagation_api_1.propagation;
  } });
  var trace_api_1 = require_trace_api();
  Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
    return trace_api_1.trace;
  } });
  exports.default = {
    context: context_api_1.context,
    diag: diag_api_1.diag,
    metrics: metrics_api_1.metrics,
    propagation: propagation_api_1.propagation,
    trace: trace_api_1.trace
  };
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js
var require_suppress_tracing = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = undefined;
  var api_1 = require_src();
  var SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
  function suppressTracing(context) {
    return context.setValue(SUPPRESS_TRACING_KEY, true);
  }
  exports.suppressTracing = suppressTracing;
  function unsuppressTracing(context) {
    return context.deleteValue(SUPPRESS_TRACING_KEY);
  }
  exports.unsuppressTracing = unsuppressTracing;
  function isTracingSuppressed(context) {
    return context.getValue(SUPPRESS_TRACING_KEY) === true;
  }
  exports.isTracingSuppressed = isTracingSuppressed;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/baggage/constants.js
var require_constants = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = undefined;
  exports.BAGGAGE_KEY_PAIR_SEPARATOR = "=";
  exports.BAGGAGE_PROPERTIES_SEPARATOR = ";";
  exports.BAGGAGE_ITEMS_SEPARATOR = ",";
  exports.BAGGAGE_HEADER = "baggage";
  exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;
  exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;
  exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/baggage/utils.js
var require_utils3 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = undefined;
  var api_1 = require_src();
  var constants_1 = require_constants();
  function serializeKeyPairs(keyPairs) {
    return keyPairs.reduce((hValue, current) => {
      const value = `${hValue}${hValue !== "" ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ""}${current}`;
      return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;
    }, "");
  }
  exports.serializeKeyPairs = serializeKeyPairs;
  function getKeyPairs(baggage) {
    return baggage.getAllEntries().map(([key, value]) => {
      let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;
      if (value.metadata !== undefined) {
        entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();
      }
      return entry;
    });
  }
  exports.getKeyPairs = getKeyPairs;
  function parsePairKeyValue(entry) {
    if (!entry)
      return;
    const metadataSeparatorIndex = entry.indexOf(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);
    const keyPairPart = metadataSeparatorIndex === -1 ? entry : entry.substring(0, metadataSeparatorIndex);
    const separatorIndex = keyPairPart.indexOf(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);
    if (separatorIndex <= 0)
      return;
    const rawKey = keyPairPart.substring(0, separatorIndex).trim();
    const rawValue = keyPairPart.substring(separatorIndex + 1).trim();
    if (!rawKey || !rawValue)
      return;
    let key;
    let value;
    try {
      key = decodeURIComponent(rawKey);
      value = decodeURIComponent(rawValue);
    } catch {
      return;
    }
    let metadata;
    if (metadataSeparatorIndex !== -1 && metadataSeparatorIndex < entry.length - 1) {
      const metadataString = entry.substring(metadataSeparatorIndex + 1);
      metadata = (0, api_1.baggageEntryMetadataFromString)(metadataString);
    }
    return { key, value, metadata };
  }
  exports.parsePairKeyValue = parsePairKeyValue;
  function parseKeyPairsIntoRecord(value) {
    const result = {};
    if (typeof value === "string" && value.length > 0) {
      value.split(constants_1.BAGGAGE_ITEMS_SEPARATOR).forEach((entry) => {
        const keyPair = parsePairKeyValue(entry);
        if (keyPair !== undefined && keyPair.value.length > 0) {
          result[keyPair.key] = keyPair.value;
        }
      });
    }
    return result;
  }
  exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js
var require_W3CBaggagePropagator = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.W3CBaggagePropagator = undefined;
  var api_1 = require_src();
  var suppress_tracing_1 = require_suppress_tracing();
  var constants_1 = require_constants();
  var utils_1 = require_utils3();

  class W3CBaggagePropagator {
    inject(context, carrier, setter) {
      const baggage = api_1.propagation.getBaggage(context);
      if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))
        return;
      const keyPairs = (0, utils_1.getKeyPairs)(baggage).filter((pair) => {
        return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
      }).slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);
      const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);
      if (headerValue.length > 0) {
        setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);
      }
    }
    extract(context, carrier, getter) {
      const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);
      const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;
      if (!baggageString)
        return context;
      const baggage = {};
      if (baggageString.length === 0) {
        return context;
      }
      const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);
      pairs.forEach((entry) => {
        const keyPair = (0, utils_1.parsePairKeyValue)(entry);
        if (keyPair) {
          const baggageEntry = { value: keyPair.value };
          if (keyPair.metadata) {
            baggageEntry.metadata = keyPair.metadata;
          }
          baggage[keyPair.key] = baggageEntry;
        }
      });
      if (Object.entries(baggage).length === 0) {
        return context;
      }
      return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));
    }
    fields() {
      return [constants_1.BAGGAGE_HEADER];
    }
  }
  exports.W3CBaggagePropagator = W3CBaggagePropagator;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/anchored-clock.js
var require_anchored_clock = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AnchoredClock = undefined;

  class AnchoredClock {
    _monotonicClock;
    _epochMillis;
    _performanceMillis;
    constructor(systemClock, monotonicClock) {
      this._monotonicClock = monotonicClock;
      this._epochMillis = systemClock.now();
      this._performanceMillis = monotonicClock.now();
    }
    now() {
      const delta = this._monotonicClock.now() - this._performanceMillis;
      return this._epochMillis + delta;
    }
  }
  exports.AnchoredClock = AnchoredClock;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/attributes.js
var require_attributes = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = undefined;
  var api_1 = require_src();
  function sanitizeAttributes(attributes) {
    const out = {};
    if (typeof attributes !== "object" || attributes == null) {
      return out;
    }
    for (const key in attributes) {
      if (!Object.prototype.hasOwnProperty.call(attributes, key)) {
        continue;
      }
      if (!isAttributeKey(key)) {
        api_1.diag.warn(`Invalid attribute key: ${key}`);
        continue;
      }
      const val = attributes[key];
      if (!isAttributeValue(val)) {
        api_1.diag.warn(`Invalid attribute value set for key: ${key}`);
        continue;
      }
      if (Array.isArray(val)) {
        out[key] = val.slice();
      } else {
        out[key] = val;
      }
    }
    return out;
  }
  exports.sanitizeAttributes = sanitizeAttributes;
  function isAttributeKey(key) {
    return typeof key === "string" && key !== "";
  }
  exports.isAttributeKey = isAttributeKey;
  function isAttributeValue(val) {
    if (val == null) {
      return true;
    }
    if (Array.isArray(val)) {
      return isHomogeneousAttributeValueArray(val);
    }
    return isValidPrimitiveAttributeValueType(typeof val);
  }
  exports.isAttributeValue = isAttributeValue;
  function isHomogeneousAttributeValueArray(arr) {
    let type;
    for (const element of arr) {
      if (element == null)
        continue;
      const elementType = typeof element;
      if (elementType === type) {
        continue;
      }
      if (!type) {
        if (isValidPrimitiveAttributeValueType(elementType)) {
          type = elementType;
          continue;
        }
        return false;
      }
      return false;
    }
    return true;
  }
  function isValidPrimitiveAttributeValueType(valType) {
    switch (valType) {
      case "number":
      case "boolean":
      case "string":
        return true;
    }
    return false;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js
var require_logging_error_handler = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.loggingErrorHandler = undefined;
  var api_1 = require_src();
  function loggingErrorHandler() {
    return (ex) => {
      api_1.diag.error(stringifyException(ex));
    };
  }
  exports.loggingErrorHandler = loggingErrorHandler;
  function stringifyException(ex) {
    if (typeof ex === "string") {
      return ex;
    } else {
      return JSON.stringify(flattenException(ex));
    }
  }
  function flattenException(ex) {
    const result = {};
    let current = ex;
    while (current !== null) {
      Object.getOwnPropertyNames(current).forEach((propertyName) => {
        if (result[propertyName])
          return;
        const value = current[propertyName];
        if (value) {
          result[propertyName] = String(value);
        }
      });
      current = Object.getPrototypeOf(current);
    }
    return result;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js
var require_global_error_handler = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.globalErrorHandler = exports.setGlobalErrorHandler = undefined;
  var logging_error_handler_1 = require_logging_error_handler();
  var delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();
  function setGlobalErrorHandler(handler) {
    delegateHandler = handler;
  }
  exports.setGlobalErrorHandler = setGlobalErrorHandler;
  function globalErrorHandler(ex) {
    try {
      delegateHandler(ex);
    } catch {}
  }
  exports.globalErrorHandler = globalErrorHandler;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/node/environment.js
var require_environment = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getStringListFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = exports.getNumberFromEnv = undefined;
  var api_1 = require_src();
  var util_1 = __require("util");
  function getNumberFromEnv(key) {
    const raw = process.env[key];
    if (raw == null || raw.trim() === "") {
      return;
    }
    const value = Number(raw);
    if (isNaN(value)) {
      api_1.diag.warn(`Unknown value ${(0, util_1.inspect)(raw)} for ${key}, expected a number, using defaults`);
      return;
    }
    return value;
  }
  exports.getNumberFromEnv = getNumberFromEnv;
  function getStringFromEnv(key) {
    const raw = process.env[key];
    if (raw == null || raw.trim() === "") {
      return;
    }
    return raw;
  }
  exports.getStringFromEnv = getStringFromEnv;
  function getBooleanFromEnv(key) {
    const raw = process.env[key]?.trim().toLowerCase();
    if (raw == null || raw === "") {
      return false;
    }
    if (raw === "true") {
      return true;
    } else if (raw === "false") {
      return false;
    } else {
      api_1.diag.warn(`Unknown value ${(0, util_1.inspect)(raw)} for ${key}, expected 'true' or 'false', falling back to 'false' (default)`);
      return false;
    }
  }
  exports.getBooleanFromEnv = getBooleanFromEnv;
  function getStringListFromEnv(key) {
    return getStringFromEnv(key)?.split(",").map((v) => v.trim()).filter((s) => s !== "");
  }
  exports.getStringListFromEnv = getStringListFromEnv;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/globalThis.js
var require_globalThis2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports._globalThis = undefined;
  exports._globalThis = globalThis;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/version.js
var require_version2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.VERSION = undefined;
  exports.VERSION = "2.6.0";
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js
var require_utils4 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.createConstMap = undefined;
  function createConstMap(values) {
    let res = {};
    const len = values.length;
    for (let lp = 0;lp < len; lp++) {
      const val = values[lp];
      if (val) {
        res[String(val).toUpperCase().replace(/[-.]/g, "_")] = val;
      }
    }
    return res;
  }
  exports.createConstMap = createConstMap;
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js
var require_SemanticAttributes = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SEMATTRS_NET_HOST_CARRIER_ICC = exports.SEMATTRS_NET_HOST_CARRIER_MNC = exports.SEMATTRS_NET_HOST_CARRIER_MCC = exports.SEMATTRS_NET_HOST_CARRIER_NAME = exports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = exports.SEMATTRS_NET_HOST_CONNECTION_TYPE = exports.SEMATTRS_NET_HOST_NAME = exports.SEMATTRS_NET_HOST_PORT = exports.SEMATTRS_NET_HOST_IP = exports.SEMATTRS_NET_PEER_NAME = exports.SEMATTRS_NET_PEER_PORT = exports.SEMATTRS_NET_PEER_IP = exports.SEMATTRS_NET_TRANSPORT = exports.SEMATTRS_FAAS_INVOKED_REGION = exports.SEMATTRS_FAAS_INVOKED_PROVIDER = exports.SEMATTRS_FAAS_INVOKED_NAME = exports.SEMATTRS_FAAS_COLDSTART = exports.SEMATTRS_FAAS_CRON = exports.SEMATTRS_FAAS_TIME = exports.SEMATTRS_FAAS_DOCUMENT_NAME = exports.SEMATTRS_FAAS_DOCUMENT_TIME = exports.SEMATTRS_FAAS_DOCUMENT_OPERATION = exports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = exports.SEMATTRS_FAAS_EXECUTION = exports.SEMATTRS_FAAS_TRIGGER = exports.SEMATTRS_EXCEPTION_ESCAPED = exports.SEMATTRS_EXCEPTION_STACKTRACE = exports.SEMATTRS_EXCEPTION_MESSAGE = exports.SEMATTRS_EXCEPTION_TYPE = exports.SEMATTRS_DB_SQL_TABLE = exports.SEMATTRS_DB_MONGODB_COLLECTION = exports.SEMATTRS_DB_REDIS_DATABASE_INDEX = exports.SEMATTRS_DB_HBASE_NAMESPACE = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = exports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = exports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = exports.SEMATTRS_DB_CASSANDRA_TABLE = exports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = exports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = exports.SEMATTRS_DB_CASSANDRA_KEYSPACE = exports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = exports.SEMATTRS_DB_OPERATION = exports.SEMATTRS_DB_STATEMENT = exports.SEMATTRS_DB_NAME = exports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = exports.SEMATTRS_DB_USER = exports.SEMATTRS_DB_CONNECTION_STRING = exports.SEMATTRS_DB_SYSTEM = exports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = undefined;
  exports.SEMATTRS_MESSAGING_DESTINATION_KIND = exports.SEMATTRS_MESSAGING_DESTINATION = exports.SEMATTRS_MESSAGING_SYSTEM = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = exports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = exports.SEMATTRS_AWS_DYNAMODB_COUNT = exports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = exports.SEMATTRS_AWS_DYNAMODB_SEGMENT = exports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = exports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = exports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = exports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_SELECT = exports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = exports.SEMATTRS_AWS_DYNAMODB_LIMIT = exports.SEMATTRS_AWS_DYNAMODB_PROJECTION = exports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = exports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = exports.SEMATTRS_HTTP_CLIENT_IP = exports.SEMATTRS_HTTP_ROUTE = exports.SEMATTRS_HTTP_SERVER_NAME = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = exports.SEMATTRS_HTTP_USER_AGENT = exports.SEMATTRS_HTTP_FLAVOR = exports.SEMATTRS_HTTP_STATUS_CODE = exports.SEMATTRS_HTTP_SCHEME = exports.SEMATTRS_HTTP_HOST = exports.SEMATTRS_HTTP_TARGET = exports.SEMATTRS_HTTP_URL = exports.SEMATTRS_HTTP_METHOD = exports.SEMATTRS_CODE_LINENO = exports.SEMATTRS_CODE_FILEPATH = exports.SEMATTRS_CODE_NAMESPACE = exports.SEMATTRS_CODE_FUNCTION = exports.SEMATTRS_THREAD_NAME = exports.SEMATTRS_THREAD_ID = exports.SEMATTRS_ENDUSER_SCOPE = exports.SEMATTRS_ENDUSER_ROLE = exports.SEMATTRS_ENDUSER_ID = exports.SEMATTRS_PEER_SERVICE = undefined;
  exports.DBSYSTEMVALUES_FILEMAKER = exports.DBSYSTEMVALUES_DERBY = exports.DBSYSTEMVALUES_FIREBIRD = exports.DBSYSTEMVALUES_ADABAS = exports.DBSYSTEMVALUES_CACHE = exports.DBSYSTEMVALUES_EDB = exports.DBSYSTEMVALUES_FIRSTSQL = exports.DBSYSTEMVALUES_INGRES = exports.DBSYSTEMVALUES_HANADB = exports.DBSYSTEMVALUES_MAXDB = exports.DBSYSTEMVALUES_PROGRESS = exports.DBSYSTEMVALUES_HSQLDB = exports.DBSYSTEMVALUES_CLOUDSCAPE = exports.DBSYSTEMVALUES_HIVE = exports.DBSYSTEMVALUES_REDSHIFT = exports.DBSYSTEMVALUES_POSTGRESQL = exports.DBSYSTEMVALUES_DB2 = exports.DBSYSTEMVALUES_ORACLE = exports.DBSYSTEMVALUES_MYSQL = exports.DBSYSTEMVALUES_MSSQL = exports.DBSYSTEMVALUES_OTHER_SQL = exports.SemanticAttributes = exports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_ID = exports.SEMATTRS_MESSAGE_TYPE = exports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = exports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = exports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = exports.SEMATTRS_RPC_JSONRPC_VERSION = exports.SEMATTRS_RPC_GRPC_STATUS_CODE = exports.SEMATTRS_RPC_METHOD = exports.SEMATTRS_RPC_SERVICE = exports.SEMATTRS_RPC_SYSTEM = exports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = exports.SEMATTRS_MESSAGING_KAFKA_PARTITION = exports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = exports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = exports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = exports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = exports.SEMATTRS_MESSAGING_CONSUMER_ID = exports.SEMATTRS_MESSAGING_OPERATION = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = exports.SEMATTRS_MESSAGING_CONVERSATION_ID = exports.SEMATTRS_MESSAGING_MESSAGE_ID = exports.SEMATTRS_MESSAGING_URL = exports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = exports.SEMATTRS_MESSAGING_PROTOCOL = exports.SEMATTRS_MESSAGING_TEMP_DESTINATION = undefined;
  exports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = exports.FaasDocumentOperationValues = exports.FAASDOCUMENTOPERATIONVALUES_DELETE = exports.FAASDOCUMENTOPERATIONVALUES_EDIT = exports.FAASDOCUMENTOPERATIONVALUES_INSERT = exports.FaasTriggerValues = exports.FAASTRIGGERVALUES_OTHER = exports.FAASTRIGGERVALUES_TIMER = exports.FAASTRIGGERVALUES_PUBSUB = exports.FAASTRIGGERVALUES_HTTP = exports.FAASTRIGGERVALUES_DATASOURCE = exports.DbCassandraConsistencyLevelValues = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = exports.DbSystemValues = exports.DBSYSTEMVALUES_COCKROACHDB = exports.DBSYSTEMVALUES_MEMCACHED = exports.DBSYSTEMVALUES_ELASTICSEARCH = exports.DBSYSTEMVALUES_GEODE = exports.DBSYSTEMVALUES_NEO4J = exports.DBSYSTEMVALUES_DYNAMODB = exports.DBSYSTEMVALUES_COSMOSDB = exports.DBSYSTEMVALUES_COUCHDB = exports.DBSYSTEMVALUES_COUCHBASE = exports.DBSYSTEMVALUES_REDIS = exports.DBSYSTEMVALUES_MONGODB = exports.DBSYSTEMVALUES_HBASE = exports.DBSYSTEMVALUES_CASSANDRA = exports.DBSYSTEMVALUES_COLDFUSION = exports.DBSYSTEMVALUES_H2 = exports.DBSYSTEMVALUES_VERTICA = exports.DBSYSTEMVALUES_TERADATA = exports.DBSYSTEMVALUES_SYBASE = exports.DBSYSTEMVALUES_SQLITE = exports.DBSYSTEMVALUES_POINTBASE = exports.DBSYSTEMVALUES_PERVASIVE = exports.DBSYSTEMVALUES_NETEZZA = exports.DBSYSTEMVALUES_MARIADB = exports.DBSYSTEMVALUES_INTERBASE = exports.DBSYSTEMVALUES_INSTANTDB = exports.DBSYSTEMVALUES_INFORMIX = undefined;
  exports.MESSAGINGOPERATIONVALUES_RECEIVE = exports.MessagingDestinationKindValues = exports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = exports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = exports.HttpFlavorValues = exports.HTTPFLAVORVALUES_QUIC = exports.HTTPFLAVORVALUES_SPDY = exports.HTTPFLAVORVALUES_HTTP_2_0 = exports.HTTPFLAVORVALUES_HTTP_1_1 = exports.HTTPFLAVORVALUES_HTTP_1_0 = exports.NetHostConnectionSubtypeValues = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = exports.NetHostConnectionTypeValues = exports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = exports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = exports.NETHOSTCONNECTIONTYPEVALUES_CELL = exports.NETHOSTCONNECTIONTYPEVALUES_WIRED = exports.NETHOSTCONNECTIONTYPEVALUES_WIFI = exports.NetTransportValues = exports.NETTRANSPORTVALUES_OTHER = exports.NETTRANSPORTVALUES_INPROC = exports.NETTRANSPORTVALUES_PIPE = exports.NETTRANSPORTVALUES_UNIX = exports.NETTRANSPORTVALUES_IP = exports.NETTRANSPORTVALUES_IP_UDP = exports.NETTRANSPORTVALUES_IP_TCP = exports.FaasInvokedProviderValues = exports.FAASINVOKEDPROVIDERVALUES_GCP = exports.FAASINVOKEDPROVIDERVALUES_AZURE = exports.FAASINVOKEDPROVIDERVALUES_AWS = undefined;
  exports.MessageTypeValues = exports.MESSAGETYPEVALUES_RECEIVED = exports.MESSAGETYPEVALUES_SENT = exports.RpcGrpcStatusCodeValues = exports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = exports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = exports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = exports.RPCGRPCSTATUSCODEVALUES_INTERNAL = exports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = exports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = exports.RPCGRPCSTATUSCODEVALUES_ABORTED = exports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = exports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = exports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = exports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = exports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = exports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = exports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = exports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = exports.RPCGRPCSTATUSCODEVALUES_CANCELLED = exports.RPCGRPCSTATUSCODEVALUES_OK = exports.MessagingOperationValues = exports.MESSAGINGOPERATIONVALUES_PROCESS = undefined;
  var utils_1 = require_utils4();
  var TMP_AWS_LAMBDA_INVOKED_ARN = "aws.lambda.invoked_arn";
  var TMP_DB_SYSTEM = "db.system";
  var TMP_DB_CONNECTION_STRING = "db.connection_string";
  var TMP_DB_USER = "db.user";
  var TMP_DB_JDBC_DRIVER_CLASSNAME = "db.jdbc.driver_classname";
  var TMP_DB_NAME = "db.name";
  var TMP_DB_STATEMENT = "db.statement";
  var TMP_DB_OPERATION = "db.operation";
  var TMP_DB_MSSQL_INSTANCE_NAME = "db.mssql.instance_name";
  var TMP_DB_CASSANDRA_KEYSPACE = "db.cassandra.keyspace";
  var TMP_DB_CASSANDRA_PAGE_SIZE = "db.cassandra.page_size";
  var TMP_DB_CASSANDRA_CONSISTENCY_LEVEL = "db.cassandra.consistency_level";
  var TMP_DB_CASSANDRA_TABLE = "db.cassandra.table";
  var TMP_DB_CASSANDRA_IDEMPOTENCE = "db.cassandra.idempotence";
  var TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = "db.cassandra.speculative_execution_count";
  var TMP_DB_CASSANDRA_COORDINATOR_ID = "db.cassandra.coordinator.id";
  var TMP_DB_CASSANDRA_COORDINATOR_DC = "db.cassandra.coordinator.dc";
  var TMP_DB_HBASE_NAMESPACE = "db.hbase.namespace";
  var TMP_DB_REDIS_DATABASE_INDEX = "db.redis.database_index";
  var TMP_DB_MONGODB_COLLECTION = "db.mongodb.collection";
  var TMP_DB_SQL_TABLE = "db.sql.table";
  var TMP_EXCEPTION_TYPE = "exception.type";
  var TMP_EXCEPTION_MESSAGE = "exception.message";
  var TMP_EXCEPTION_STACKTRACE = "exception.stacktrace";
  var TMP_EXCEPTION_ESCAPED = "exception.escaped";
  var TMP_FAAS_TRIGGER = "faas.trigger";
  var TMP_FAAS_EXECUTION = "faas.execution";
  var TMP_FAAS_DOCUMENT_COLLECTION = "faas.document.collection";
  var TMP_FAAS_DOCUMENT_OPERATION = "faas.document.operation";
  var TMP_FAAS_DOCUMENT_TIME = "faas.document.time";
  var TMP_FAAS_DOCUMENT_NAME = "faas.document.name";
  var TMP_FAAS_TIME = "faas.time";
  var TMP_FAAS_CRON = "faas.cron";
  var TMP_FAAS_COLDSTART = "faas.coldstart";
  var TMP_FAAS_INVOKED_NAME = "faas.invoked_name";
  var TMP_FAAS_INVOKED_PROVIDER = "faas.invoked_provider";
  var TMP_FAAS_INVOKED_REGION = "faas.invoked_region";
  var TMP_NET_TRANSPORT = "net.transport";
  var TMP_NET_PEER_IP = "net.peer.ip";
  var TMP_NET_PEER_PORT = "net.peer.port";
  var TMP_NET_PEER_NAME = "net.peer.name";
  var TMP_NET_HOST_IP = "net.host.ip";
  var TMP_NET_HOST_PORT = "net.host.port";
  var TMP_NET_HOST_NAME = "net.host.name";
  var TMP_NET_HOST_CONNECTION_TYPE = "net.host.connection.type";
  var TMP_NET_HOST_CONNECTION_SUBTYPE = "net.host.connection.subtype";
  var TMP_NET_HOST_CARRIER_NAME = "net.host.carrier.name";
  var TMP_NET_HOST_CARRIER_MCC = "net.host.carrier.mcc";
  var TMP_NET_HOST_CARRIER_MNC = "net.host.carrier.mnc";
  var TMP_NET_HOST_CARRIER_ICC = "net.host.carrier.icc";
  var TMP_PEER_SERVICE = "peer.service";
  var TMP_ENDUSER_ID = "enduser.id";
  var TMP_ENDUSER_ROLE = "enduser.role";
  var TMP_ENDUSER_SCOPE = "enduser.scope";
  var TMP_THREAD_ID = "thread.id";
  var TMP_THREAD_NAME = "thread.name";
  var TMP_CODE_FUNCTION = "code.function";
  var TMP_CODE_NAMESPACE = "code.namespace";
  var TMP_CODE_FILEPATH = "code.filepath";
  var TMP_CODE_LINENO = "code.lineno";
  var TMP_HTTP_METHOD = "http.method";
  var TMP_HTTP_URL = "http.url";
  var TMP_HTTP_TARGET = "http.target";
  var TMP_HTTP_HOST = "http.host";
  var TMP_HTTP_SCHEME = "http.scheme";
  var TMP_HTTP_STATUS_CODE = "http.status_code";
  var TMP_HTTP_FLAVOR = "http.flavor";
  var TMP_HTTP_USER_AGENT = "http.user_agent";
  var TMP_HTTP_REQUEST_CONTENT_LENGTH = "http.request_content_length";
  var TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = "http.request_content_length_uncompressed";
  var TMP_HTTP_RESPONSE_CONTENT_LENGTH = "http.response_content_length";
  var TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = "http.response_content_length_uncompressed";
  var TMP_HTTP_SERVER_NAME = "http.server_name";
  var TMP_HTTP_ROUTE = "http.route";
  var TMP_HTTP_CLIENT_IP = "http.client_ip";
  var TMP_AWS_DYNAMODB_TABLE_NAMES = "aws.dynamodb.table_names";
  var TMP_AWS_DYNAMODB_CONSUMED_CAPACITY = "aws.dynamodb.consumed_capacity";
  var TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = "aws.dynamodb.item_collection_metrics";
  var TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = "aws.dynamodb.provisioned_read_capacity";
  var TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = "aws.dynamodb.provisioned_write_capacity";
  var TMP_AWS_DYNAMODB_CONSISTENT_READ = "aws.dynamodb.consistent_read";
  var TMP_AWS_DYNAMODB_PROJECTION = "aws.dynamodb.projection";
  var TMP_AWS_DYNAMODB_LIMIT = "aws.dynamodb.limit";
  var TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET = "aws.dynamodb.attributes_to_get";
  var TMP_AWS_DYNAMODB_INDEX_NAME = "aws.dynamodb.index_name";
  var TMP_AWS_DYNAMODB_SELECT = "aws.dynamodb.select";
  var TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = "aws.dynamodb.global_secondary_indexes";
  var TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = "aws.dynamodb.local_secondary_indexes";
  var TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = "aws.dynamodb.exclusive_start_table";
  var TMP_AWS_DYNAMODB_TABLE_COUNT = "aws.dynamodb.table_count";
  var TMP_AWS_DYNAMODB_SCAN_FORWARD = "aws.dynamodb.scan_forward";
  var TMP_AWS_DYNAMODB_SEGMENT = "aws.dynamodb.segment";
  var TMP_AWS_DYNAMODB_TOTAL_SEGMENTS = "aws.dynamodb.total_segments";
  var TMP_AWS_DYNAMODB_COUNT = "aws.dynamodb.count";
  var TMP_AWS_DYNAMODB_SCANNED_COUNT = "aws.dynamodb.scanned_count";
  var TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = "aws.dynamodb.attribute_definitions";
  var TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = "aws.dynamodb.global_secondary_index_updates";
  var TMP_MESSAGING_SYSTEM = "messaging.system";
  var TMP_MESSAGING_DESTINATION = "messaging.destination";
  var TMP_MESSAGING_DESTINATION_KIND = "messaging.destination_kind";
  var TMP_MESSAGING_TEMP_DESTINATION = "messaging.temp_destination";
  var TMP_MESSAGING_PROTOCOL = "messaging.protocol";
  var TMP_MESSAGING_PROTOCOL_VERSION = "messaging.protocol_version";
  var TMP_MESSAGING_URL = "messaging.url";
  var TMP_MESSAGING_MESSAGE_ID = "messaging.message_id";
  var TMP_MESSAGING_CONVERSATION_ID = "messaging.conversation_id";
  var TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = "messaging.message_payload_size_bytes";
  var TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = "messaging.message_payload_compressed_size_bytes";
  var TMP_MESSAGING_OPERATION = "messaging.operation";
  var TMP_MESSAGING_CONSUMER_ID = "messaging.consumer_id";
  var TMP_MESSAGING_RABBITMQ_ROUTING_KEY = "messaging.rabbitmq.routing_key";
  var TMP_MESSAGING_KAFKA_MESSAGE_KEY = "messaging.kafka.message_key";
  var TMP_MESSAGING_KAFKA_CONSUMER_GROUP = "messaging.kafka.consumer_group";
  var TMP_MESSAGING_KAFKA_CLIENT_ID = "messaging.kafka.client_id";
  var TMP_MESSAGING_KAFKA_PARTITION = "messaging.kafka.partition";
  var TMP_MESSAGING_KAFKA_TOMBSTONE = "messaging.kafka.tombstone";
  var TMP_RPC_SYSTEM = "rpc.system";
  var TMP_RPC_SERVICE = "rpc.service";
  var TMP_RPC_METHOD = "rpc.method";
  var TMP_RPC_GRPC_STATUS_CODE = "rpc.grpc.status_code";
  var TMP_RPC_JSONRPC_VERSION = "rpc.jsonrpc.version";
  var TMP_RPC_JSONRPC_REQUEST_ID = "rpc.jsonrpc.request_id";
  var TMP_RPC_JSONRPC_ERROR_CODE = "rpc.jsonrpc.error_code";
  var TMP_RPC_JSONRPC_ERROR_MESSAGE = "rpc.jsonrpc.error_message";
  var TMP_MESSAGE_TYPE = "message.type";
  var TMP_MESSAGE_ID = "message.id";
  var TMP_MESSAGE_COMPRESSED_SIZE = "message.compressed_size";
  var TMP_MESSAGE_UNCOMPRESSED_SIZE = "message.uncompressed_size";
  exports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = TMP_AWS_LAMBDA_INVOKED_ARN;
  exports.SEMATTRS_DB_SYSTEM = TMP_DB_SYSTEM;
  exports.SEMATTRS_DB_CONNECTION_STRING = TMP_DB_CONNECTION_STRING;
  exports.SEMATTRS_DB_USER = TMP_DB_USER;
  exports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = TMP_DB_JDBC_DRIVER_CLASSNAME;
  exports.SEMATTRS_DB_NAME = TMP_DB_NAME;
  exports.SEMATTRS_DB_STATEMENT = TMP_DB_STATEMENT;
  exports.SEMATTRS_DB_OPERATION = TMP_DB_OPERATION;
  exports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = TMP_DB_MSSQL_INSTANCE_NAME;
  exports.SEMATTRS_DB_CASSANDRA_KEYSPACE = TMP_DB_CASSANDRA_KEYSPACE;
  exports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = TMP_DB_CASSANDRA_PAGE_SIZE;
  exports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = TMP_DB_CASSANDRA_CONSISTENCY_LEVEL;
  exports.SEMATTRS_DB_CASSANDRA_TABLE = TMP_DB_CASSANDRA_TABLE;
  exports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = TMP_DB_CASSANDRA_IDEMPOTENCE;
  exports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT;
  exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = TMP_DB_CASSANDRA_COORDINATOR_ID;
  exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = TMP_DB_CASSANDRA_COORDINATOR_DC;
  exports.SEMATTRS_DB_HBASE_NAMESPACE = TMP_DB_HBASE_NAMESPACE;
  exports.SEMATTRS_DB_REDIS_DATABASE_INDEX = TMP_DB_REDIS_DATABASE_INDEX;
  exports.SEMATTRS_DB_MONGODB_COLLECTION = TMP_DB_MONGODB_COLLECTION;
  exports.SEMATTRS_DB_SQL_TABLE = TMP_DB_SQL_TABLE;
  exports.SEMATTRS_EXCEPTION_TYPE = TMP_EXCEPTION_TYPE;
  exports.SEMATTRS_EXCEPTION_MESSAGE = TMP_EXCEPTION_MESSAGE;
  exports.SEMATTRS_EXCEPTION_STACKTRACE = TMP_EXCEPTION_STACKTRACE;
  exports.SEMATTRS_EXCEPTION_ESCAPED = TMP_EXCEPTION_ESCAPED;
  exports.SEMATTRS_FAAS_TRIGGER = TMP_FAAS_TRIGGER;
  exports.SEMATTRS_FAAS_EXECUTION = TMP_FAAS_EXECUTION;
  exports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = TMP_FAAS_DOCUMENT_COLLECTION;
  exports.SEMATTRS_FAAS_DOCUMENT_OPERATION = TMP_FAAS_DOCUMENT_OPERATION;
  exports.SEMATTRS_FAAS_DOCUMENT_TIME = TMP_FAAS_DOCUMENT_TIME;
  exports.SEMATTRS_FAAS_DOCUMENT_NAME = TMP_FAAS_DOCUMENT_NAME;
  exports.SEMATTRS_FAAS_TIME = TMP_FAAS_TIME;
  exports.SEMATTRS_FAAS_CRON = TMP_FAAS_CRON;
  exports.SEMATTRS_FAAS_COLDSTART = TMP_FAAS_COLDSTART;
  exports.SEMATTRS_FAAS_INVOKED_NAME = TMP_FAAS_INVOKED_NAME;
  exports.SEMATTRS_FAAS_INVOKED_PROVIDER = TMP_FAAS_INVOKED_PROVIDER;
  exports.SEMATTRS_FAAS_INVOKED_REGION = TMP_FAAS_INVOKED_REGION;
  exports.SEMATTRS_NET_TRANSPORT = TMP_NET_TRANSPORT;
  exports.SEMATTRS_NET_PEER_IP = TMP_NET_PEER_IP;
  exports.SEMATTRS_NET_PEER_PORT = TMP_NET_PEER_PORT;
  exports.SEMATTRS_NET_PEER_NAME = TMP_NET_PEER_NAME;
  exports.SEMATTRS_NET_HOST_IP = TMP_NET_HOST_IP;
  exports.SEMATTRS_NET_HOST_PORT = TMP_NET_HOST_PORT;
  exports.SEMATTRS_NET_HOST_NAME = TMP_NET_HOST_NAME;
  exports.SEMATTRS_NET_HOST_CONNECTION_TYPE = TMP_NET_HOST_CONNECTION_TYPE;
  exports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = TMP_NET_HOST_CONNECTION_SUBTYPE;
  exports.SEMATTRS_NET_HOST_CARRIER_NAME = TMP_NET_HOST_CARRIER_NAME;
  exports.SEMATTRS_NET_HOST_CARRIER_MCC = TMP_NET_HOST_CARRIER_MCC;
  exports.SEMATTRS_NET_HOST_CARRIER_MNC = TMP_NET_HOST_CARRIER_MNC;
  exports.SEMATTRS_NET_HOST_CARRIER_ICC = TMP_NET_HOST_CARRIER_ICC;
  exports.SEMATTRS_PEER_SERVICE = TMP_PEER_SERVICE;
  exports.SEMATTRS_ENDUSER_ID = TMP_ENDUSER_ID;
  exports.SEMATTRS_ENDUSER_ROLE = TMP_ENDUSER_ROLE;
  exports.SEMATTRS_ENDUSER_SCOPE = TMP_ENDUSER_SCOPE;
  exports.SEMATTRS_THREAD_ID = TMP_THREAD_ID;
  exports.SEMATTRS_THREAD_NAME = TMP_THREAD_NAME;
  exports.SEMATTRS_CODE_FUNCTION = TMP_CODE_FUNCTION;
  exports.SEMATTRS_CODE_NAMESPACE = TMP_CODE_NAMESPACE;
  exports.SEMATTRS_CODE_FILEPATH = TMP_CODE_FILEPATH;
  exports.SEMATTRS_CODE_LINENO = TMP_CODE_LINENO;
  exports.SEMATTRS_HTTP_METHOD = TMP_HTTP_METHOD;
  exports.SEMATTRS_HTTP_URL = TMP_HTTP_URL;
  exports.SEMATTRS_HTTP_TARGET = TMP_HTTP_TARGET;
  exports.SEMATTRS_HTTP_HOST = TMP_HTTP_HOST;
  exports.SEMATTRS_HTTP_SCHEME = TMP_HTTP_SCHEME;
  exports.SEMATTRS_HTTP_STATUS_CODE = TMP_HTTP_STATUS_CODE;
  exports.SEMATTRS_HTTP_FLAVOR = TMP_HTTP_FLAVOR;
  exports.SEMATTRS_HTTP_USER_AGENT = TMP_HTTP_USER_AGENT;
  exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = TMP_HTTP_REQUEST_CONTENT_LENGTH;
  exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED;
  exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = TMP_HTTP_RESPONSE_CONTENT_LENGTH;
  exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED;
  exports.SEMATTRS_HTTP_SERVER_NAME = TMP_HTTP_SERVER_NAME;
  exports.SEMATTRS_HTTP_ROUTE = TMP_HTTP_ROUTE;
  exports.SEMATTRS_HTTP_CLIENT_IP = TMP_HTTP_CLIENT_IP;
  exports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = TMP_AWS_DYNAMODB_TABLE_NAMES;
  exports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = TMP_AWS_DYNAMODB_CONSUMED_CAPACITY;
  exports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS;
  exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY;
  exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY;
  exports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = TMP_AWS_DYNAMODB_CONSISTENT_READ;
  exports.SEMATTRS_AWS_DYNAMODB_PROJECTION = TMP_AWS_DYNAMODB_PROJECTION;
  exports.SEMATTRS_AWS_DYNAMODB_LIMIT = TMP_AWS_DYNAMODB_LIMIT;
  exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET;
  exports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = TMP_AWS_DYNAMODB_INDEX_NAME;
  exports.SEMATTRS_AWS_DYNAMODB_SELECT = TMP_AWS_DYNAMODB_SELECT;
  exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES;
  exports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES;
  exports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE;
  exports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = TMP_AWS_DYNAMODB_TABLE_COUNT;
  exports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = TMP_AWS_DYNAMODB_SCAN_FORWARD;
  exports.SEMATTRS_AWS_DYNAMODB_SEGMENT = TMP_AWS_DYNAMODB_SEGMENT;
  exports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = TMP_AWS_DYNAMODB_TOTAL_SEGMENTS;
  exports.SEMATTRS_AWS_DYNAMODB_COUNT = TMP_AWS_DYNAMODB_COUNT;
  exports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = TMP_AWS_DYNAMODB_SCANNED_COUNT;
  exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS;
  exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES;
  exports.SEMATTRS_MESSAGING_SYSTEM = TMP_MESSAGING_SYSTEM;
  exports.SEMATTRS_MESSAGING_DESTINATION = TMP_MESSAGING_DESTINATION;
  exports.SEMATTRS_MESSAGING_DESTINATION_KIND = TMP_MESSAGING_DESTINATION_KIND;
  exports.SEMATTRS_MESSAGING_TEMP_DESTINATION = TMP_MESSAGING_TEMP_DESTINATION;
  exports.SEMATTRS_MESSAGING_PROTOCOL = TMP_MESSAGING_PROTOCOL;
  exports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = TMP_MESSAGING_PROTOCOL_VERSION;
  exports.SEMATTRS_MESSAGING_URL = TMP_MESSAGING_URL;
  exports.SEMATTRS_MESSAGING_MESSAGE_ID = TMP_MESSAGING_MESSAGE_ID;
  exports.SEMATTRS_MESSAGING_CONVERSATION_ID = TMP_MESSAGING_CONVERSATION_ID;
  exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES;
  exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES;
  exports.SEMATTRS_MESSAGING_OPERATION = TMP_MESSAGING_OPERATION;
  exports.SEMATTRS_MESSAGING_CONSUMER_ID = TMP_MESSAGING_CONSUMER_ID;
  exports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = TMP_MESSAGING_RABBITMQ_ROUTING_KEY;
  exports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = TMP_MESSAGING_KAFKA_MESSAGE_KEY;
  exports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = TMP_MESSAGING_KAFKA_CONSUMER_GROUP;
  exports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = TMP_MESSAGING_KAFKA_CLIENT_ID;
  exports.SEMATTRS_MESSAGING_KAFKA_PARTITION = TMP_MESSAGING_KAFKA_PARTITION;
  exports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = TMP_MESSAGING_KAFKA_TOMBSTONE;
  exports.SEMATTRS_RPC_SYSTEM = TMP_RPC_SYSTEM;
  exports.SEMATTRS_RPC_SERVICE = TMP_RPC_SERVICE;
  exports.SEMATTRS_RPC_METHOD = TMP_RPC_METHOD;
  exports.SEMATTRS_RPC_GRPC_STATUS_CODE = TMP_RPC_GRPC_STATUS_CODE;
  exports.SEMATTRS_RPC_JSONRPC_VERSION = TMP_RPC_JSONRPC_VERSION;
  exports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = TMP_RPC_JSONRPC_REQUEST_ID;
  exports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = TMP_RPC_JSONRPC_ERROR_CODE;
  exports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = TMP_RPC_JSONRPC_ERROR_MESSAGE;
  exports.SEMATTRS_MESSAGE_TYPE = TMP_MESSAGE_TYPE;
  exports.SEMATTRS_MESSAGE_ID = TMP_MESSAGE_ID;
  exports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = TMP_MESSAGE_COMPRESSED_SIZE;
  exports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = TMP_MESSAGE_UNCOMPRESSED_SIZE;
  exports.SemanticAttributes = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_AWS_LAMBDA_INVOKED_ARN,
    TMP_DB_SYSTEM,
    TMP_DB_CONNECTION_STRING,
    TMP_DB_USER,
    TMP_DB_JDBC_DRIVER_CLASSNAME,
    TMP_DB_NAME,
    TMP_DB_STATEMENT,
    TMP_DB_OPERATION,
    TMP_DB_MSSQL_INSTANCE_NAME,
    TMP_DB_CASSANDRA_KEYSPACE,
    TMP_DB_CASSANDRA_PAGE_SIZE,
    TMP_DB_CASSANDRA_CONSISTENCY_LEVEL,
    TMP_DB_CASSANDRA_TABLE,
    TMP_DB_CASSANDRA_IDEMPOTENCE,
    TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT,
    TMP_DB_CASSANDRA_COORDINATOR_ID,
    TMP_DB_CASSANDRA_COORDINATOR_DC,
    TMP_DB_HBASE_NAMESPACE,
    TMP_DB_REDIS_DATABASE_INDEX,
    TMP_DB_MONGODB_COLLECTION,
    TMP_DB_SQL_TABLE,
    TMP_EXCEPTION_TYPE,
    TMP_EXCEPTION_MESSAGE,
    TMP_EXCEPTION_STACKTRACE,
    TMP_EXCEPTION_ESCAPED,
    TMP_FAAS_TRIGGER,
    TMP_FAAS_EXECUTION,
    TMP_FAAS_DOCUMENT_COLLECTION,
    TMP_FAAS_DOCUMENT_OPERATION,
    TMP_FAAS_DOCUMENT_TIME,
    TMP_FAAS_DOCUMENT_NAME,
    TMP_FAAS_TIME,
    TMP_FAAS_CRON,
    TMP_FAAS_COLDSTART,
    TMP_FAAS_INVOKED_NAME,
    TMP_FAAS_INVOKED_PROVIDER,
    TMP_FAAS_INVOKED_REGION,
    TMP_NET_TRANSPORT,
    TMP_NET_PEER_IP,
    TMP_NET_PEER_PORT,
    TMP_NET_PEER_NAME,
    TMP_NET_HOST_IP,
    TMP_NET_HOST_PORT,
    TMP_NET_HOST_NAME,
    TMP_NET_HOST_CONNECTION_TYPE,
    TMP_NET_HOST_CONNECTION_SUBTYPE,
    TMP_NET_HOST_CARRIER_NAME,
    TMP_NET_HOST_CARRIER_MCC,
    TMP_NET_HOST_CARRIER_MNC,
    TMP_NET_HOST_CARRIER_ICC,
    TMP_PEER_SERVICE,
    TMP_ENDUSER_ID,
    TMP_ENDUSER_ROLE,
    TMP_ENDUSER_SCOPE,
    TMP_THREAD_ID,
    TMP_THREAD_NAME,
    TMP_CODE_FUNCTION,
    TMP_CODE_NAMESPACE,
    TMP_CODE_FILEPATH,
    TMP_CODE_LINENO,
    TMP_HTTP_METHOD,
    TMP_HTTP_URL,
    TMP_HTTP_TARGET,
    TMP_HTTP_HOST,
    TMP_HTTP_SCHEME,
    TMP_HTTP_STATUS_CODE,
    TMP_HTTP_FLAVOR,
    TMP_HTTP_USER_AGENT,
    TMP_HTTP_REQUEST_CONTENT_LENGTH,
    TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,
    TMP_HTTP_RESPONSE_CONTENT_LENGTH,
    TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,
    TMP_HTTP_SERVER_NAME,
    TMP_HTTP_ROUTE,
    TMP_HTTP_CLIENT_IP,
    TMP_AWS_DYNAMODB_TABLE_NAMES,
    TMP_AWS_DYNAMODB_CONSUMED_CAPACITY,
    TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS,
    TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY,
    TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY,
    TMP_AWS_DYNAMODB_CONSISTENT_READ,
    TMP_AWS_DYNAMODB_PROJECTION,
    TMP_AWS_DYNAMODB_LIMIT,
    TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET,
    TMP_AWS_DYNAMODB_INDEX_NAME,
    TMP_AWS_DYNAMODB_SELECT,
    TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES,
    TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES,
    TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE,
    TMP_AWS_DYNAMODB_TABLE_COUNT,
    TMP_AWS_DYNAMODB_SCAN_FORWARD,
    TMP_AWS_DYNAMODB_SEGMENT,
    TMP_AWS_DYNAMODB_TOTAL_SEGMENTS,
    TMP_AWS_DYNAMODB_COUNT,
    TMP_AWS_DYNAMODB_SCANNED_COUNT,
    TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS,
    TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES,
    TMP_MESSAGING_SYSTEM,
    TMP_MESSAGING_DESTINATION,
    TMP_MESSAGING_DESTINATION_KIND,
    TMP_MESSAGING_TEMP_DESTINATION,
    TMP_MESSAGING_PROTOCOL,
    TMP_MESSAGING_PROTOCOL_VERSION,
    TMP_MESSAGING_URL,
    TMP_MESSAGING_MESSAGE_ID,
    TMP_MESSAGING_CONVERSATION_ID,
    TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES,
    TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES,
    TMP_MESSAGING_OPERATION,
    TMP_MESSAGING_CONSUMER_ID,
    TMP_MESSAGING_RABBITMQ_ROUTING_KEY,
    TMP_MESSAGING_KAFKA_MESSAGE_KEY,
    TMP_MESSAGING_KAFKA_CONSUMER_GROUP,
    TMP_MESSAGING_KAFKA_CLIENT_ID,
    TMP_MESSAGING_KAFKA_PARTITION,
    TMP_MESSAGING_KAFKA_TOMBSTONE,
    TMP_RPC_SYSTEM,
    TMP_RPC_SERVICE,
    TMP_RPC_METHOD,
    TMP_RPC_GRPC_STATUS_CODE,
    TMP_RPC_JSONRPC_VERSION,
    TMP_RPC_JSONRPC_REQUEST_ID,
    TMP_RPC_JSONRPC_ERROR_CODE,
    TMP_RPC_JSONRPC_ERROR_MESSAGE,
    TMP_MESSAGE_TYPE,
    TMP_MESSAGE_ID,
    TMP_MESSAGE_COMPRESSED_SIZE,
    TMP_MESSAGE_UNCOMPRESSED_SIZE
  ]);
  var TMP_DBSYSTEMVALUES_OTHER_SQL = "other_sql";
  var TMP_DBSYSTEMVALUES_MSSQL = "mssql";
  var TMP_DBSYSTEMVALUES_MYSQL = "mysql";
  var TMP_DBSYSTEMVALUES_ORACLE = "oracle";
  var TMP_DBSYSTEMVALUES_DB2 = "db2";
  var TMP_DBSYSTEMVALUES_POSTGRESQL = "postgresql";
  var TMP_DBSYSTEMVALUES_REDSHIFT = "redshift";
  var TMP_DBSYSTEMVALUES_HIVE = "hive";
  var TMP_DBSYSTEMVALUES_CLOUDSCAPE = "cloudscape";
  var TMP_DBSYSTEMVALUES_HSQLDB = "hsqldb";
  var TMP_DBSYSTEMVALUES_PROGRESS = "progress";
  var TMP_DBSYSTEMVALUES_MAXDB = "maxdb";
  var TMP_DBSYSTEMVALUES_HANADB = "hanadb";
  var TMP_DBSYSTEMVALUES_INGRES = "ingres";
  var TMP_DBSYSTEMVALUES_FIRSTSQL = "firstsql";
  var TMP_DBSYSTEMVALUES_EDB = "edb";
  var TMP_DBSYSTEMVALUES_CACHE = "cache";
  var TMP_DBSYSTEMVALUES_ADABAS = "adabas";
  var TMP_DBSYSTEMVALUES_FIREBIRD = "firebird";
  var TMP_DBSYSTEMVALUES_DERBY = "derby";
  var TMP_DBSYSTEMVALUES_FILEMAKER = "filemaker";
  var TMP_DBSYSTEMVALUES_INFORMIX = "informix";
  var TMP_DBSYSTEMVALUES_INSTANTDB = "instantdb";
  var TMP_DBSYSTEMVALUES_INTERBASE = "interbase";
  var TMP_DBSYSTEMVALUES_MARIADB = "mariadb";
  var TMP_DBSYSTEMVALUES_NETEZZA = "netezza";
  var TMP_DBSYSTEMVALUES_PERVASIVE = "pervasive";
  var TMP_DBSYSTEMVALUES_POINTBASE = "pointbase";
  var TMP_DBSYSTEMVALUES_SQLITE = "sqlite";
  var TMP_DBSYSTEMVALUES_SYBASE = "sybase";
  var TMP_DBSYSTEMVALUES_TERADATA = "teradata";
  var TMP_DBSYSTEMVALUES_VERTICA = "vertica";
  var TMP_DBSYSTEMVALUES_H2 = "h2";
  var TMP_DBSYSTEMVALUES_COLDFUSION = "coldfusion";
  var TMP_DBSYSTEMVALUES_CASSANDRA = "cassandra";
  var TMP_DBSYSTEMVALUES_HBASE = "hbase";
  var TMP_DBSYSTEMVALUES_MONGODB = "mongodb";
  var TMP_DBSYSTEMVALUES_REDIS = "redis";
  var TMP_DBSYSTEMVALUES_COUCHBASE = "couchbase";
  var TMP_DBSYSTEMVALUES_COUCHDB = "couchdb";
  var TMP_DBSYSTEMVALUES_COSMOSDB = "cosmosdb";
  var TMP_DBSYSTEMVALUES_DYNAMODB = "dynamodb";
  var TMP_DBSYSTEMVALUES_NEO4J = "neo4j";
  var TMP_DBSYSTEMVALUES_GEODE = "geode";
  var TMP_DBSYSTEMVALUES_ELASTICSEARCH = "elasticsearch";
  var TMP_DBSYSTEMVALUES_MEMCACHED = "memcached";
  var TMP_DBSYSTEMVALUES_COCKROACHDB = "cockroachdb";
  exports.DBSYSTEMVALUES_OTHER_SQL = TMP_DBSYSTEMVALUES_OTHER_SQL;
  exports.DBSYSTEMVALUES_MSSQL = TMP_DBSYSTEMVALUES_MSSQL;
  exports.DBSYSTEMVALUES_MYSQL = TMP_DBSYSTEMVALUES_MYSQL;
  exports.DBSYSTEMVALUES_ORACLE = TMP_DBSYSTEMVALUES_ORACLE;
  exports.DBSYSTEMVALUES_DB2 = TMP_DBSYSTEMVALUES_DB2;
  exports.DBSYSTEMVALUES_POSTGRESQL = TMP_DBSYSTEMVALUES_POSTGRESQL;
  exports.DBSYSTEMVALUES_REDSHIFT = TMP_DBSYSTEMVALUES_REDSHIFT;
  exports.DBSYSTEMVALUES_HIVE = TMP_DBSYSTEMVALUES_HIVE;
  exports.DBSYSTEMVALUES_CLOUDSCAPE = TMP_DBSYSTEMVALUES_CLOUDSCAPE;
  exports.DBSYSTEMVALUES_HSQLDB = TMP_DBSYSTEMVALUES_HSQLDB;
  exports.DBSYSTEMVALUES_PROGRESS = TMP_DBSYSTEMVALUES_PROGRESS;
  exports.DBSYSTEMVALUES_MAXDB = TMP_DBSYSTEMVALUES_MAXDB;
  exports.DBSYSTEMVALUES_HANADB = TMP_DBSYSTEMVALUES_HANADB;
  exports.DBSYSTEMVALUES_INGRES = TMP_DBSYSTEMVALUES_INGRES;
  exports.DBSYSTEMVALUES_FIRSTSQL = TMP_DBSYSTEMVALUES_FIRSTSQL;
  exports.DBSYSTEMVALUES_EDB = TMP_DBSYSTEMVALUES_EDB;
  exports.DBSYSTEMVALUES_CACHE = TMP_DBSYSTEMVALUES_CACHE;
  exports.DBSYSTEMVALUES_ADABAS = TMP_DBSYSTEMVALUES_ADABAS;
  exports.DBSYSTEMVALUES_FIREBIRD = TMP_DBSYSTEMVALUES_FIREBIRD;
  exports.DBSYSTEMVALUES_DERBY = TMP_DBSYSTEMVALUES_DERBY;
  exports.DBSYSTEMVALUES_FILEMAKER = TMP_DBSYSTEMVALUES_FILEMAKER;
  exports.DBSYSTEMVALUES_INFORMIX = TMP_DBSYSTEMVALUES_INFORMIX;
  exports.DBSYSTEMVALUES_INSTANTDB = TMP_DBSYSTEMVALUES_INSTANTDB;
  exports.DBSYSTEMVALUES_INTERBASE = TMP_DBSYSTEMVALUES_INTERBASE;
  exports.DBSYSTEMVALUES_MARIADB = TMP_DBSYSTEMVALUES_MARIADB;
  exports.DBSYSTEMVALUES_NETEZZA = TMP_DBSYSTEMVALUES_NETEZZA;
  exports.DBSYSTEMVALUES_PERVASIVE = TMP_DBSYSTEMVALUES_PERVASIVE;
  exports.DBSYSTEMVALUES_POINTBASE = TMP_DBSYSTEMVALUES_POINTBASE;
  exports.DBSYSTEMVALUES_SQLITE = TMP_DBSYSTEMVALUES_SQLITE;
  exports.DBSYSTEMVALUES_SYBASE = TMP_DBSYSTEMVALUES_SYBASE;
  exports.DBSYSTEMVALUES_TERADATA = TMP_DBSYSTEMVALUES_TERADATA;
  exports.DBSYSTEMVALUES_VERTICA = TMP_DBSYSTEMVALUES_VERTICA;
  exports.DBSYSTEMVALUES_H2 = TMP_DBSYSTEMVALUES_H2;
  exports.DBSYSTEMVALUES_COLDFUSION = TMP_DBSYSTEMVALUES_COLDFUSION;
  exports.DBSYSTEMVALUES_CASSANDRA = TMP_DBSYSTEMVALUES_CASSANDRA;
  exports.DBSYSTEMVALUES_HBASE = TMP_DBSYSTEMVALUES_HBASE;
  exports.DBSYSTEMVALUES_MONGODB = TMP_DBSYSTEMVALUES_MONGODB;
  exports.DBSYSTEMVALUES_REDIS = TMP_DBSYSTEMVALUES_REDIS;
  exports.DBSYSTEMVALUES_COUCHBASE = TMP_DBSYSTEMVALUES_COUCHBASE;
  exports.DBSYSTEMVALUES_COUCHDB = TMP_DBSYSTEMVALUES_COUCHDB;
  exports.DBSYSTEMVALUES_COSMOSDB = TMP_DBSYSTEMVALUES_COSMOSDB;
  exports.DBSYSTEMVALUES_DYNAMODB = TMP_DBSYSTEMVALUES_DYNAMODB;
  exports.DBSYSTEMVALUES_NEO4J = TMP_DBSYSTEMVALUES_NEO4J;
  exports.DBSYSTEMVALUES_GEODE = TMP_DBSYSTEMVALUES_GEODE;
  exports.DBSYSTEMVALUES_ELASTICSEARCH = TMP_DBSYSTEMVALUES_ELASTICSEARCH;
  exports.DBSYSTEMVALUES_MEMCACHED = TMP_DBSYSTEMVALUES_MEMCACHED;
  exports.DBSYSTEMVALUES_COCKROACHDB = TMP_DBSYSTEMVALUES_COCKROACHDB;
  exports.DbSystemValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_DBSYSTEMVALUES_OTHER_SQL,
    TMP_DBSYSTEMVALUES_MSSQL,
    TMP_DBSYSTEMVALUES_MYSQL,
    TMP_DBSYSTEMVALUES_ORACLE,
    TMP_DBSYSTEMVALUES_DB2,
    TMP_DBSYSTEMVALUES_POSTGRESQL,
    TMP_DBSYSTEMVALUES_REDSHIFT,
    TMP_DBSYSTEMVALUES_HIVE,
    TMP_DBSYSTEMVALUES_CLOUDSCAPE,
    TMP_DBSYSTEMVALUES_HSQLDB,
    TMP_DBSYSTEMVALUES_PROGRESS,
    TMP_DBSYSTEMVALUES_MAXDB,
    TMP_DBSYSTEMVALUES_HANADB,
    TMP_DBSYSTEMVALUES_INGRES,
    TMP_DBSYSTEMVALUES_FIRSTSQL,
    TMP_DBSYSTEMVALUES_EDB,
    TMP_DBSYSTEMVALUES_CACHE,
    TMP_DBSYSTEMVALUES_ADABAS,
    TMP_DBSYSTEMVALUES_FIREBIRD,
    TMP_DBSYSTEMVALUES_DERBY,
    TMP_DBSYSTEMVALUES_FILEMAKER,
    TMP_DBSYSTEMVALUES_INFORMIX,
    TMP_DBSYSTEMVALUES_INSTANTDB,
    TMP_DBSYSTEMVALUES_INTERBASE,
    TMP_DBSYSTEMVALUES_MARIADB,
    TMP_DBSYSTEMVALUES_NETEZZA,
    TMP_DBSYSTEMVALUES_PERVASIVE,
    TMP_DBSYSTEMVALUES_POINTBASE,
    TMP_DBSYSTEMVALUES_SQLITE,
    TMP_DBSYSTEMVALUES_SYBASE,
    TMP_DBSYSTEMVALUES_TERADATA,
    TMP_DBSYSTEMVALUES_VERTICA,
    TMP_DBSYSTEMVALUES_H2,
    TMP_DBSYSTEMVALUES_COLDFUSION,
    TMP_DBSYSTEMVALUES_CASSANDRA,
    TMP_DBSYSTEMVALUES_HBASE,
    TMP_DBSYSTEMVALUES_MONGODB,
    TMP_DBSYSTEMVALUES_REDIS,
    TMP_DBSYSTEMVALUES_COUCHBASE,
    TMP_DBSYSTEMVALUES_COUCHDB,
    TMP_DBSYSTEMVALUES_COSMOSDB,
    TMP_DBSYSTEMVALUES_DYNAMODB,
    TMP_DBSYSTEMVALUES_NEO4J,
    TMP_DBSYSTEMVALUES_GEODE,
    TMP_DBSYSTEMVALUES_ELASTICSEARCH,
    TMP_DBSYSTEMVALUES_MEMCACHED,
    TMP_DBSYSTEMVALUES_COCKROACHDB
  ]);
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL = "all";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = "each_quorum";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = "quorum";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = "local_quorum";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE = "one";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO = "two";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE = "three";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = "local_one";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY = "any";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = "serial";
  var TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = "local_serial";
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL;
  exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL;
  exports.DbCassandraConsistencyLevelValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL,
    TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL
  ]);
  var TMP_FAASTRIGGERVALUES_DATASOURCE = "datasource";
  var TMP_FAASTRIGGERVALUES_HTTP = "http";
  var TMP_FAASTRIGGERVALUES_PUBSUB = "pubsub";
  var TMP_FAASTRIGGERVALUES_TIMER = "timer";
  var TMP_FAASTRIGGERVALUES_OTHER = "other";
  exports.FAASTRIGGERVALUES_DATASOURCE = TMP_FAASTRIGGERVALUES_DATASOURCE;
  exports.FAASTRIGGERVALUES_HTTP = TMP_FAASTRIGGERVALUES_HTTP;
  exports.FAASTRIGGERVALUES_PUBSUB = TMP_FAASTRIGGERVALUES_PUBSUB;
  exports.FAASTRIGGERVALUES_TIMER = TMP_FAASTRIGGERVALUES_TIMER;
  exports.FAASTRIGGERVALUES_OTHER = TMP_FAASTRIGGERVALUES_OTHER;
  exports.FaasTriggerValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_FAASTRIGGERVALUES_DATASOURCE,
    TMP_FAASTRIGGERVALUES_HTTP,
    TMP_FAASTRIGGERVALUES_PUBSUB,
    TMP_FAASTRIGGERVALUES_TIMER,
    TMP_FAASTRIGGERVALUES_OTHER
  ]);
  var TMP_FAASDOCUMENTOPERATIONVALUES_INSERT = "insert";
  var TMP_FAASDOCUMENTOPERATIONVALUES_EDIT = "edit";
  var TMP_FAASDOCUMENTOPERATIONVALUES_DELETE = "delete";
  exports.FAASDOCUMENTOPERATIONVALUES_INSERT = TMP_FAASDOCUMENTOPERATIONVALUES_INSERT;
  exports.FAASDOCUMENTOPERATIONVALUES_EDIT = TMP_FAASDOCUMENTOPERATIONVALUES_EDIT;
  exports.FAASDOCUMENTOPERATIONVALUES_DELETE = TMP_FAASDOCUMENTOPERATIONVALUES_DELETE;
  exports.FaasDocumentOperationValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_FAASDOCUMENTOPERATIONVALUES_INSERT,
    TMP_FAASDOCUMENTOPERATIONVALUES_EDIT,
    TMP_FAASDOCUMENTOPERATIONVALUES_DELETE
  ]);
  var TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = "alibaba_cloud";
  var TMP_FAASINVOKEDPROVIDERVALUES_AWS = "aws";
  var TMP_FAASINVOKEDPROVIDERVALUES_AZURE = "azure";
  var TMP_FAASINVOKEDPROVIDERVALUES_GCP = "gcp";
  exports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD;
  exports.FAASINVOKEDPROVIDERVALUES_AWS = TMP_FAASINVOKEDPROVIDERVALUES_AWS;
  exports.FAASINVOKEDPROVIDERVALUES_AZURE = TMP_FAASINVOKEDPROVIDERVALUES_AZURE;
  exports.FAASINVOKEDPROVIDERVALUES_GCP = TMP_FAASINVOKEDPROVIDERVALUES_GCP;
  exports.FaasInvokedProviderValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD,
    TMP_FAASINVOKEDPROVIDERVALUES_AWS,
    TMP_FAASINVOKEDPROVIDERVALUES_AZURE,
    TMP_FAASINVOKEDPROVIDERVALUES_GCP
  ]);
  var TMP_NETTRANSPORTVALUES_IP_TCP = "ip_tcp";
  var TMP_NETTRANSPORTVALUES_IP_UDP = "ip_udp";
  var TMP_NETTRANSPORTVALUES_IP = "ip";
  var TMP_NETTRANSPORTVALUES_UNIX = "unix";
  var TMP_NETTRANSPORTVALUES_PIPE = "pipe";
  var TMP_NETTRANSPORTVALUES_INPROC = "inproc";
  var TMP_NETTRANSPORTVALUES_OTHER = "other";
  exports.NETTRANSPORTVALUES_IP_TCP = TMP_NETTRANSPORTVALUES_IP_TCP;
  exports.NETTRANSPORTVALUES_IP_UDP = TMP_NETTRANSPORTVALUES_IP_UDP;
  exports.NETTRANSPORTVALUES_IP = TMP_NETTRANSPORTVALUES_IP;
  exports.NETTRANSPORTVALUES_UNIX = TMP_NETTRANSPORTVALUES_UNIX;
  exports.NETTRANSPORTVALUES_PIPE = TMP_NETTRANSPORTVALUES_PIPE;
  exports.NETTRANSPORTVALUES_INPROC = TMP_NETTRANSPORTVALUES_INPROC;
  exports.NETTRANSPORTVALUES_OTHER = TMP_NETTRANSPORTVALUES_OTHER;
  exports.NetTransportValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_NETTRANSPORTVALUES_IP_TCP,
    TMP_NETTRANSPORTVALUES_IP_UDP,
    TMP_NETTRANSPORTVALUES_IP,
    TMP_NETTRANSPORTVALUES_UNIX,
    TMP_NETTRANSPORTVALUES_PIPE,
    TMP_NETTRANSPORTVALUES_INPROC,
    TMP_NETTRANSPORTVALUES_OTHER
  ]);
  var TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI = "wifi";
  var TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED = "wired";
  var TMP_NETHOSTCONNECTIONTYPEVALUES_CELL = "cell";
  var TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = "unavailable";
  var TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = "unknown";
  exports.NETHOSTCONNECTIONTYPEVALUES_WIFI = TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI;
  exports.NETHOSTCONNECTIONTYPEVALUES_WIRED = TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED;
  exports.NETHOSTCONNECTIONTYPEVALUES_CELL = TMP_NETHOSTCONNECTIONTYPEVALUES_CELL;
  exports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE;
  exports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN;
  exports.NetHostConnectionTypeValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI,
    TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED,
    TMP_NETHOSTCONNECTIONTYPEVALUES_CELL,
    TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE,
    TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN
  ]);
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = "gprs";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = "edge";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = "umts";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = "cdma";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = "evdo_0";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = "evdo_a";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = "cdma2000_1xrtt";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = "hsdpa";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = "hsupa";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = "hspa";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = "iden";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = "evdo_b";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE = "lte";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = "ehrpd";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = "hspap";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM = "gsm";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = "td_scdma";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = "iwlan";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR = "nr";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = "nrnsa";
  var TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = "lte_ca";
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA;
  exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA;
  exports.NetHostConnectionSubtypeValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA,
    TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA
  ]);
  var TMP_HTTPFLAVORVALUES_HTTP_1_0 = "1.0";
  var TMP_HTTPFLAVORVALUES_HTTP_1_1 = "1.1";
  var TMP_HTTPFLAVORVALUES_HTTP_2_0 = "2.0";
  var TMP_HTTPFLAVORVALUES_SPDY = "SPDY";
  var TMP_HTTPFLAVORVALUES_QUIC = "QUIC";
  exports.HTTPFLAVORVALUES_HTTP_1_0 = TMP_HTTPFLAVORVALUES_HTTP_1_0;
  exports.HTTPFLAVORVALUES_HTTP_1_1 = TMP_HTTPFLAVORVALUES_HTTP_1_1;
  exports.HTTPFLAVORVALUES_HTTP_2_0 = TMP_HTTPFLAVORVALUES_HTTP_2_0;
  exports.HTTPFLAVORVALUES_SPDY = TMP_HTTPFLAVORVALUES_SPDY;
  exports.HTTPFLAVORVALUES_QUIC = TMP_HTTPFLAVORVALUES_QUIC;
  exports.HttpFlavorValues = {
    HTTP_1_0: TMP_HTTPFLAVORVALUES_HTTP_1_0,
    HTTP_1_1: TMP_HTTPFLAVORVALUES_HTTP_1_1,
    HTTP_2_0: TMP_HTTPFLAVORVALUES_HTTP_2_0,
    SPDY: TMP_HTTPFLAVORVALUES_SPDY,
    QUIC: TMP_HTTPFLAVORVALUES_QUIC
  };
  var TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE = "queue";
  var TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC = "topic";
  exports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE;
  exports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC;
  exports.MessagingDestinationKindValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE,
    TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC
  ]);
  var TMP_MESSAGINGOPERATIONVALUES_RECEIVE = "receive";
  var TMP_MESSAGINGOPERATIONVALUES_PROCESS = "process";
  exports.MESSAGINGOPERATIONVALUES_RECEIVE = TMP_MESSAGINGOPERATIONVALUES_RECEIVE;
  exports.MESSAGINGOPERATIONVALUES_PROCESS = TMP_MESSAGINGOPERATIONVALUES_PROCESS;
  exports.MessagingOperationValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_MESSAGINGOPERATIONVALUES_RECEIVE,
    TMP_MESSAGINGOPERATIONVALUES_PROCESS
  ]);
  var TMP_RPCGRPCSTATUSCODEVALUES_OK = 0;
  var TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED = 1;
  var TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2;
  var TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3;
  var TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4;
  var TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5;
  var TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6;
  var TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7;
  var TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8;
  var TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9;
  var TMP_RPCGRPCSTATUSCODEVALUES_ABORTED = 10;
  var TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11;
  var TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12;
  var TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL = 13;
  var TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14;
  var TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15;
  var TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16;
  exports.RPCGRPCSTATUSCODEVALUES_OK = TMP_RPCGRPCSTATUSCODEVALUES_OK;
  exports.RPCGRPCSTATUSCODEVALUES_CANCELLED = TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED;
  exports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN;
  exports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT;
  exports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED;
  exports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND;
  exports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS;
  exports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED;
  exports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED;
  exports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION;
  exports.RPCGRPCSTATUSCODEVALUES_ABORTED = TMP_RPCGRPCSTATUSCODEVALUES_ABORTED;
  exports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE;
  exports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED;
  exports.RPCGRPCSTATUSCODEVALUES_INTERNAL = TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL;
  exports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE;
  exports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS;
  exports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED;
  exports.RpcGrpcStatusCodeValues = {
    OK: TMP_RPCGRPCSTATUSCODEVALUES_OK,
    CANCELLED: TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED,
    UNKNOWN: TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN,
    INVALID_ARGUMENT: TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT,
    DEADLINE_EXCEEDED: TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED,
    NOT_FOUND: TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND,
    ALREADY_EXISTS: TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS,
    PERMISSION_DENIED: TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED,
    RESOURCE_EXHAUSTED: TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED,
    FAILED_PRECONDITION: TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION,
    ABORTED: TMP_RPCGRPCSTATUSCODEVALUES_ABORTED,
    OUT_OF_RANGE: TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE,
    UNIMPLEMENTED: TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED,
    INTERNAL: TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL,
    UNAVAILABLE: TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE,
    DATA_LOSS: TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS,
    UNAUTHENTICATED: TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED
  };
  var TMP_MESSAGETYPEVALUES_SENT = "SENT";
  var TMP_MESSAGETYPEVALUES_RECEIVED = "RECEIVED";
  exports.MESSAGETYPEVALUES_SENT = TMP_MESSAGETYPEVALUES_SENT;
  exports.MESSAGETYPEVALUES_RECEIVED = TMP_MESSAGETYPEVALUES_RECEIVED;
  exports.MessageTypeValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_MESSAGETYPEVALUES_SENT,
    TMP_MESSAGETYPEVALUES_RECEIVED
  ]);
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js
var require_trace2 = __commonJS((exports) => {
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = exports && exports.__exportStar || function(m, exports2) {
    for (var p in m)
      if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
        __createBinding(exports2, m, p);
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  __exportStar(require_SemanticAttributes(), exports);
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js
var require_SemanticResourceAttributes = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SEMRESATTRS_K8S_STATEFULSET_NAME = exports.SEMRESATTRS_K8S_STATEFULSET_UID = exports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = exports.SEMRESATTRS_K8S_DEPLOYMENT_UID = exports.SEMRESATTRS_K8S_REPLICASET_NAME = exports.SEMRESATTRS_K8S_REPLICASET_UID = exports.SEMRESATTRS_K8S_CONTAINER_NAME = exports.SEMRESATTRS_K8S_POD_NAME = exports.SEMRESATTRS_K8S_POD_UID = exports.SEMRESATTRS_K8S_NAMESPACE_NAME = exports.SEMRESATTRS_K8S_NODE_UID = exports.SEMRESATTRS_K8S_NODE_NAME = exports.SEMRESATTRS_K8S_CLUSTER_NAME = exports.SEMRESATTRS_HOST_IMAGE_VERSION = exports.SEMRESATTRS_HOST_IMAGE_ID = exports.SEMRESATTRS_HOST_IMAGE_NAME = exports.SEMRESATTRS_HOST_ARCH = exports.SEMRESATTRS_HOST_TYPE = exports.SEMRESATTRS_HOST_NAME = exports.SEMRESATTRS_HOST_ID = exports.SEMRESATTRS_FAAS_MAX_MEMORY = exports.SEMRESATTRS_FAAS_INSTANCE = exports.SEMRESATTRS_FAAS_VERSION = exports.SEMRESATTRS_FAAS_ID = exports.SEMRESATTRS_FAAS_NAME = exports.SEMRESATTRS_DEVICE_MODEL_NAME = exports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = exports.SEMRESATTRS_DEVICE_ID = exports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = exports.SEMRESATTRS_CONTAINER_IMAGE_TAG = exports.SEMRESATTRS_CONTAINER_IMAGE_NAME = exports.SEMRESATTRS_CONTAINER_RUNTIME = exports.SEMRESATTRS_CONTAINER_ID = exports.SEMRESATTRS_CONTAINER_NAME = exports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = exports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = exports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = exports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = exports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_TASK_REVISION = exports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = exports.SEMRESATTRS_AWS_ECS_TASK_ARN = exports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = exports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = exports.SEMRESATTRS_CLOUD_PLATFORM = exports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = exports.SEMRESATTRS_CLOUD_REGION = exports.SEMRESATTRS_CLOUD_ACCOUNT_ID = exports.SEMRESATTRS_CLOUD_PROVIDER = undefined;
  exports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = exports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = exports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = exports.CLOUDPLATFORMVALUES_AZURE_AKS = exports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = exports.CLOUDPLATFORMVALUES_AZURE_VM = exports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = exports.CLOUDPLATFORMVALUES_AWS_LAMBDA = exports.CLOUDPLATFORMVALUES_AWS_EKS = exports.CLOUDPLATFORMVALUES_AWS_ECS = exports.CLOUDPLATFORMVALUES_AWS_EC2 = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = exports.CloudProviderValues = exports.CLOUDPROVIDERVALUES_GCP = exports.CLOUDPROVIDERVALUES_AZURE = exports.CLOUDPROVIDERVALUES_AWS = exports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = exports.SemanticResourceAttributes = exports.SEMRESATTRS_WEBENGINE_DESCRIPTION = exports.SEMRESATTRS_WEBENGINE_VERSION = exports.SEMRESATTRS_WEBENGINE_NAME = exports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = exports.SEMRESATTRS_TELEMETRY_SDK_NAME = exports.SEMRESATTRS_SERVICE_VERSION = exports.SEMRESATTRS_SERVICE_INSTANCE_ID = exports.SEMRESATTRS_SERVICE_NAMESPACE = exports.SEMRESATTRS_SERVICE_NAME = exports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = exports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = exports.SEMRESATTRS_PROCESS_RUNTIME_NAME = exports.SEMRESATTRS_PROCESS_OWNER = exports.SEMRESATTRS_PROCESS_COMMAND_ARGS = exports.SEMRESATTRS_PROCESS_COMMAND_LINE = exports.SEMRESATTRS_PROCESS_COMMAND = exports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = exports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = exports.SEMRESATTRS_PROCESS_PID = exports.SEMRESATTRS_OS_VERSION = exports.SEMRESATTRS_OS_NAME = exports.SEMRESATTRS_OS_DESCRIPTION = exports.SEMRESATTRS_OS_TYPE = exports.SEMRESATTRS_K8S_CRONJOB_NAME = exports.SEMRESATTRS_K8S_CRONJOB_UID = exports.SEMRESATTRS_K8S_JOB_NAME = exports.SEMRESATTRS_K8S_JOB_UID = exports.SEMRESATTRS_K8S_DAEMONSET_NAME = exports.SEMRESATTRS_K8S_DAEMONSET_UID = undefined;
  exports.TelemetrySdkLanguageValues = exports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = exports.TELEMETRYSDKLANGUAGEVALUES_RUBY = exports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = exports.TELEMETRYSDKLANGUAGEVALUES_PHP = exports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = exports.TELEMETRYSDKLANGUAGEVALUES_JAVA = exports.TELEMETRYSDKLANGUAGEVALUES_GO = exports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = exports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = exports.TELEMETRYSDKLANGUAGEVALUES_CPP = exports.OsTypeValues = exports.OSTYPEVALUES_Z_OS = exports.OSTYPEVALUES_SOLARIS = exports.OSTYPEVALUES_AIX = exports.OSTYPEVALUES_HPUX = exports.OSTYPEVALUES_DRAGONFLYBSD = exports.OSTYPEVALUES_OPENBSD = exports.OSTYPEVALUES_NETBSD = exports.OSTYPEVALUES_FREEBSD = exports.OSTYPEVALUES_DARWIN = exports.OSTYPEVALUES_LINUX = exports.OSTYPEVALUES_WINDOWS = exports.HostArchValues = exports.HOSTARCHVALUES_X86 = exports.HOSTARCHVALUES_PPC64 = exports.HOSTARCHVALUES_PPC32 = exports.HOSTARCHVALUES_IA64 = exports.HOSTARCHVALUES_ARM64 = exports.HOSTARCHVALUES_ARM32 = exports.HOSTARCHVALUES_AMD64 = exports.AwsEcsLaunchtypeValues = exports.AWSECSLAUNCHTYPEVALUES_FARGATE = exports.AWSECSLAUNCHTYPEVALUES_EC2 = exports.CloudPlatformValues = exports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = exports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = undefined;
  var utils_1 = require_utils4();
  var TMP_CLOUD_PROVIDER = "cloud.provider";
  var TMP_CLOUD_ACCOUNT_ID = "cloud.account.id";
  var TMP_CLOUD_REGION = "cloud.region";
  var TMP_CLOUD_AVAILABILITY_ZONE = "cloud.availability_zone";
  var TMP_CLOUD_PLATFORM = "cloud.platform";
  var TMP_AWS_ECS_CONTAINER_ARN = "aws.ecs.container.arn";
  var TMP_AWS_ECS_CLUSTER_ARN = "aws.ecs.cluster.arn";
  var TMP_AWS_ECS_LAUNCHTYPE = "aws.ecs.launchtype";
  var TMP_AWS_ECS_TASK_ARN = "aws.ecs.task.arn";
  var TMP_AWS_ECS_TASK_FAMILY = "aws.ecs.task.family";
  var TMP_AWS_ECS_TASK_REVISION = "aws.ecs.task.revision";
  var TMP_AWS_EKS_CLUSTER_ARN = "aws.eks.cluster.arn";
  var TMP_AWS_LOG_GROUP_NAMES = "aws.log.group.names";
  var TMP_AWS_LOG_GROUP_ARNS = "aws.log.group.arns";
  var TMP_AWS_LOG_STREAM_NAMES = "aws.log.stream.names";
  var TMP_AWS_LOG_STREAM_ARNS = "aws.log.stream.arns";
  var TMP_CONTAINER_NAME = "container.name";
  var TMP_CONTAINER_ID = "container.id";
  var TMP_CONTAINER_RUNTIME = "container.runtime";
  var TMP_CONTAINER_IMAGE_NAME = "container.image.name";
  var TMP_CONTAINER_IMAGE_TAG = "container.image.tag";
  var TMP_DEPLOYMENT_ENVIRONMENT = "deployment.environment";
  var TMP_DEVICE_ID = "device.id";
  var TMP_DEVICE_MODEL_IDENTIFIER = "device.model.identifier";
  var TMP_DEVICE_MODEL_NAME = "device.model.name";
  var TMP_FAAS_NAME = "faas.name";
  var TMP_FAAS_ID = "faas.id";
  var TMP_FAAS_VERSION = "faas.version";
  var TMP_FAAS_INSTANCE = "faas.instance";
  var TMP_FAAS_MAX_MEMORY = "faas.max_memory";
  var TMP_HOST_ID = "host.id";
  var TMP_HOST_NAME = "host.name";
  var TMP_HOST_TYPE = "host.type";
  var TMP_HOST_ARCH = "host.arch";
  var TMP_HOST_IMAGE_NAME = "host.image.name";
  var TMP_HOST_IMAGE_ID = "host.image.id";
  var TMP_HOST_IMAGE_VERSION = "host.image.version";
  var TMP_K8S_CLUSTER_NAME = "k8s.cluster.name";
  var TMP_K8S_NODE_NAME = "k8s.node.name";
  var TMP_K8S_NODE_UID = "k8s.node.uid";
  var TMP_K8S_NAMESPACE_NAME = "k8s.namespace.name";
  var TMP_K8S_POD_UID = "k8s.pod.uid";
  var TMP_K8S_POD_NAME = "k8s.pod.name";
  var TMP_K8S_CONTAINER_NAME = "k8s.container.name";
  var TMP_K8S_REPLICASET_UID = "k8s.replicaset.uid";
  var TMP_K8S_REPLICASET_NAME = "k8s.replicaset.name";
  var TMP_K8S_DEPLOYMENT_UID = "k8s.deployment.uid";
  var TMP_K8S_DEPLOYMENT_NAME = "k8s.deployment.name";
  var TMP_K8S_STATEFULSET_UID = "k8s.statefulset.uid";
  var TMP_K8S_STATEFULSET_NAME = "k8s.statefulset.name";
  var TMP_K8S_DAEMONSET_UID = "k8s.daemonset.uid";
  var TMP_K8S_DAEMONSET_NAME = "k8s.daemonset.name";
  var TMP_K8S_JOB_UID = "k8s.job.uid";
  var TMP_K8S_JOB_NAME = "k8s.job.name";
  var TMP_K8S_CRONJOB_UID = "k8s.cronjob.uid";
  var TMP_K8S_CRONJOB_NAME = "k8s.cronjob.name";
  var TMP_OS_TYPE = "os.type";
  var TMP_OS_DESCRIPTION = "os.description";
  var TMP_OS_NAME = "os.name";
  var TMP_OS_VERSION = "os.version";
  var TMP_PROCESS_PID = "process.pid";
  var TMP_PROCESS_EXECUTABLE_NAME = "process.executable.name";
  var TMP_PROCESS_EXECUTABLE_PATH = "process.executable.path";
  var TMP_PROCESS_COMMAND = "process.command";
  var TMP_PROCESS_COMMAND_LINE = "process.command_line";
  var TMP_PROCESS_COMMAND_ARGS = "process.command_args";
  var TMP_PROCESS_OWNER = "process.owner";
  var TMP_PROCESS_RUNTIME_NAME = "process.runtime.name";
  var TMP_PROCESS_RUNTIME_VERSION = "process.runtime.version";
  var TMP_PROCESS_RUNTIME_DESCRIPTION = "process.runtime.description";
  var TMP_SERVICE_NAME = "service.name";
  var TMP_SERVICE_NAMESPACE = "service.namespace";
  var TMP_SERVICE_INSTANCE_ID = "service.instance.id";
  var TMP_SERVICE_VERSION = "service.version";
  var TMP_TELEMETRY_SDK_NAME = "telemetry.sdk.name";
  var TMP_TELEMETRY_SDK_LANGUAGE = "telemetry.sdk.language";
  var TMP_TELEMETRY_SDK_VERSION = "telemetry.sdk.version";
  var TMP_TELEMETRY_AUTO_VERSION = "telemetry.auto.version";
  var TMP_WEBENGINE_NAME = "webengine.name";
  var TMP_WEBENGINE_VERSION = "webengine.version";
  var TMP_WEBENGINE_DESCRIPTION = "webengine.description";
  exports.SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER;
  exports.SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID;
  exports.SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION;
  exports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE;
  exports.SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM;
  exports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN;
  exports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN;
  exports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE;
  exports.SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN;
  exports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY;
  exports.SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION;
  exports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN;
  exports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES;
  exports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS;
  exports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES;
  exports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS;
  exports.SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME;
  exports.SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID;
  exports.SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME;
  exports.SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME;
  exports.SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG;
  exports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT;
  exports.SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID;
  exports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER;
  exports.SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME;
  exports.SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME;
  exports.SEMRESATTRS_FAAS_ID = TMP_FAAS_ID;
  exports.SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION;
  exports.SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE;
  exports.SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY;
  exports.SEMRESATTRS_HOST_ID = TMP_HOST_ID;
  exports.SEMRESATTRS_HOST_NAME = TMP_HOST_NAME;
  exports.SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE;
  exports.SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH;
  exports.SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME;
  exports.SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID;
  exports.SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION;
  exports.SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME;
  exports.SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME;
  exports.SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID;
  exports.SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME;
  exports.SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID;
  exports.SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME;
  exports.SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME;
  exports.SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID;
  exports.SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME;
  exports.SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID;
  exports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME;
  exports.SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID;
  exports.SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME;
  exports.SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID;
  exports.SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME;
  exports.SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID;
  exports.SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME;
  exports.SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID;
  exports.SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME;
  exports.SEMRESATTRS_OS_TYPE = TMP_OS_TYPE;
  exports.SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION;
  exports.SEMRESATTRS_OS_NAME = TMP_OS_NAME;
  exports.SEMRESATTRS_OS_VERSION = TMP_OS_VERSION;
  exports.SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID;
  exports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME;
  exports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH;
  exports.SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND;
  exports.SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE;
  exports.SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS;
  exports.SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER;
  exports.SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME;
  exports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION;
  exports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = TMP_PROCESS_RUNTIME_DESCRIPTION;
  exports.SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME;
  exports.SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE;
  exports.SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID;
  exports.SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION;
  exports.SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME;
  exports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE;
  exports.SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION;
  exports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION;
  exports.SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME;
  exports.SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION;
  exports.SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION;
  exports.SemanticResourceAttributes = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_CLOUD_PROVIDER,
    TMP_CLOUD_ACCOUNT_ID,
    TMP_CLOUD_REGION,
    TMP_CLOUD_AVAILABILITY_ZONE,
    TMP_CLOUD_PLATFORM,
    TMP_AWS_ECS_CONTAINER_ARN,
    TMP_AWS_ECS_CLUSTER_ARN,
    TMP_AWS_ECS_LAUNCHTYPE,
    TMP_AWS_ECS_TASK_ARN,
    TMP_AWS_ECS_TASK_FAMILY,
    TMP_AWS_ECS_TASK_REVISION,
    TMP_AWS_EKS_CLUSTER_ARN,
    TMP_AWS_LOG_GROUP_NAMES,
    TMP_AWS_LOG_GROUP_ARNS,
    TMP_AWS_LOG_STREAM_NAMES,
    TMP_AWS_LOG_STREAM_ARNS,
    TMP_CONTAINER_NAME,
    TMP_CONTAINER_ID,
    TMP_CONTAINER_RUNTIME,
    TMP_CONTAINER_IMAGE_NAME,
    TMP_CONTAINER_IMAGE_TAG,
    TMP_DEPLOYMENT_ENVIRONMENT,
    TMP_DEVICE_ID,
    TMP_DEVICE_MODEL_IDENTIFIER,
    TMP_DEVICE_MODEL_NAME,
    TMP_FAAS_NAME,
    TMP_FAAS_ID,
    TMP_FAAS_VERSION,
    TMP_FAAS_INSTANCE,
    TMP_FAAS_MAX_MEMORY,
    TMP_HOST_ID,
    TMP_HOST_NAME,
    TMP_HOST_TYPE,
    TMP_HOST_ARCH,
    TMP_HOST_IMAGE_NAME,
    TMP_HOST_IMAGE_ID,
    TMP_HOST_IMAGE_VERSION,
    TMP_K8S_CLUSTER_NAME,
    TMP_K8S_NODE_NAME,
    TMP_K8S_NODE_UID,
    TMP_K8S_NAMESPACE_NAME,
    TMP_K8S_POD_UID,
    TMP_K8S_POD_NAME,
    TMP_K8S_CONTAINER_NAME,
    TMP_K8S_REPLICASET_UID,
    TMP_K8S_REPLICASET_NAME,
    TMP_K8S_DEPLOYMENT_UID,
    TMP_K8S_DEPLOYMENT_NAME,
    TMP_K8S_STATEFULSET_UID,
    TMP_K8S_STATEFULSET_NAME,
    TMP_K8S_DAEMONSET_UID,
    TMP_K8S_DAEMONSET_NAME,
    TMP_K8S_JOB_UID,
    TMP_K8S_JOB_NAME,
    TMP_K8S_CRONJOB_UID,
    TMP_K8S_CRONJOB_NAME,
    TMP_OS_TYPE,
    TMP_OS_DESCRIPTION,
    TMP_OS_NAME,
    TMP_OS_VERSION,
    TMP_PROCESS_PID,
    TMP_PROCESS_EXECUTABLE_NAME,
    TMP_PROCESS_EXECUTABLE_PATH,
    TMP_PROCESS_COMMAND,
    TMP_PROCESS_COMMAND_LINE,
    TMP_PROCESS_COMMAND_ARGS,
    TMP_PROCESS_OWNER,
    TMP_PROCESS_RUNTIME_NAME,
    TMP_PROCESS_RUNTIME_VERSION,
    TMP_PROCESS_RUNTIME_DESCRIPTION,
    TMP_SERVICE_NAME,
    TMP_SERVICE_NAMESPACE,
    TMP_SERVICE_INSTANCE_ID,
    TMP_SERVICE_VERSION,
    TMP_TELEMETRY_SDK_NAME,
    TMP_TELEMETRY_SDK_LANGUAGE,
    TMP_TELEMETRY_SDK_VERSION,
    TMP_TELEMETRY_AUTO_VERSION,
    TMP_WEBENGINE_NAME,
    TMP_WEBENGINE_VERSION,
    TMP_WEBENGINE_DESCRIPTION
  ]);
  var TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = "alibaba_cloud";
  var TMP_CLOUDPROVIDERVALUES_AWS = "aws";
  var TMP_CLOUDPROVIDERVALUES_AZURE = "azure";
  var TMP_CLOUDPROVIDERVALUES_GCP = "gcp";
  exports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD;
  exports.CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS;
  exports.CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE;
  exports.CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP;
  exports.CloudProviderValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD,
    TMP_CLOUDPROVIDERVALUES_AWS,
    TMP_CLOUDPROVIDERVALUES_AZURE,
    TMP_CLOUDPROVIDERVALUES_GCP
  ]);
  var TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs";
  var TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = "alibaba_cloud_fc";
  var TMP_CLOUDPLATFORMVALUES_AWS_EC2 = "aws_ec2";
  var TMP_CLOUDPLATFORMVALUES_AWS_ECS = "aws_ecs";
  var TMP_CLOUDPLATFORMVALUES_AWS_EKS = "aws_eks";
  var TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = "aws_lambda";
  var TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk";
  var TMP_CLOUDPLATFORMVALUES_AZURE_VM = "azure_vm";
  var TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = "azure_container_instances";
  var TMP_CLOUDPLATFORMVALUES_AZURE_AKS = "azure_aks";
  var TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = "azure_functions";
  var TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = "azure_app_service";
  var TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = "gcp_compute_engine";
  var TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = "gcp_cloud_run";
  var TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = "gcp_kubernetes_engine";
  var TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions";
  var TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = "gcp_app_engine";
  exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS;
  exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC;
  exports.CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2;
  exports.CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS;
  exports.CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS;
  exports.CLOUDPLATFORMVALUES_AWS_LAMBDA = TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA;
  exports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK;
  exports.CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM;
  exports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES;
  exports.CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS;
  exports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS;
  exports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE;
  exports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE;
  exports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN;
  exports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE;
  exports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS;
  exports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE;
  exports.CloudPlatformValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS,
    TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC,
    TMP_CLOUDPLATFORMVALUES_AWS_EC2,
    TMP_CLOUDPLATFORMVALUES_AWS_ECS,
    TMP_CLOUDPLATFORMVALUES_AWS_EKS,
    TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA,
    TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK,
    TMP_CLOUDPLATFORMVALUES_AZURE_VM,
    TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES,
    TMP_CLOUDPLATFORMVALUES_AZURE_AKS,
    TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS,
    TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE,
    TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE,
    TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN,
    TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE,
    TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS,
    TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE
  ]);
  var TMP_AWSECSLAUNCHTYPEVALUES_EC2 = "ec2";
  var TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = "fargate";
  exports.AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2;
  exports.AWSECSLAUNCHTYPEVALUES_FARGATE = TMP_AWSECSLAUNCHTYPEVALUES_FARGATE;
  exports.AwsEcsLaunchtypeValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_AWSECSLAUNCHTYPEVALUES_EC2,
    TMP_AWSECSLAUNCHTYPEVALUES_FARGATE
  ]);
  var TMP_HOSTARCHVALUES_AMD64 = "amd64";
  var TMP_HOSTARCHVALUES_ARM32 = "arm32";
  var TMP_HOSTARCHVALUES_ARM64 = "arm64";
  var TMP_HOSTARCHVALUES_IA64 = "ia64";
  var TMP_HOSTARCHVALUES_PPC32 = "ppc32";
  var TMP_HOSTARCHVALUES_PPC64 = "ppc64";
  var TMP_HOSTARCHVALUES_X86 = "x86";
  exports.HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64;
  exports.HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32;
  exports.HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64;
  exports.HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64;
  exports.HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32;
  exports.HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64;
  exports.HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86;
  exports.HostArchValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_HOSTARCHVALUES_AMD64,
    TMP_HOSTARCHVALUES_ARM32,
    TMP_HOSTARCHVALUES_ARM64,
    TMP_HOSTARCHVALUES_IA64,
    TMP_HOSTARCHVALUES_PPC32,
    TMP_HOSTARCHVALUES_PPC64,
    TMP_HOSTARCHVALUES_X86
  ]);
  var TMP_OSTYPEVALUES_WINDOWS = "windows";
  var TMP_OSTYPEVALUES_LINUX = "linux";
  var TMP_OSTYPEVALUES_DARWIN = "darwin";
  var TMP_OSTYPEVALUES_FREEBSD = "freebsd";
  var TMP_OSTYPEVALUES_NETBSD = "netbsd";
  var TMP_OSTYPEVALUES_OPENBSD = "openbsd";
  var TMP_OSTYPEVALUES_DRAGONFLYBSD = "dragonflybsd";
  var TMP_OSTYPEVALUES_HPUX = "hpux";
  var TMP_OSTYPEVALUES_AIX = "aix";
  var TMP_OSTYPEVALUES_SOLARIS = "solaris";
  var TMP_OSTYPEVALUES_Z_OS = "z_os";
  exports.OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS;
  exports.OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX;
  exports.OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN;
  exports.OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD;
  exports.OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD;
  exports.OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD;
  exports.OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD;
  exports.OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX;
  exports.OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX;
  exports.OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS;
  exports.OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS;
  exports.OsTypeValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_OSTYPEVALUES_WINDOWS,
    TMP_OSTYPEVALUES_LINUX,
    TMP_OSTYPEVALUES_DARWIN,
    TMP_OSTYPEVALUES_FREEBSD,
    TMP_OSTYPEVALUES_NETBSD,
    TMP_OSTYPEVALUES_OPENBSD,
    TMP_OSTYPEVALUES_DRAGONFLYBSD,
    TMP_OSTYPEVALUES_HPUX,
    TMP_OSTYPEVALUES_AIX,
    TMP_OSTYPEVALUES_SOLARIS,
    TMP_OSTYPEVALUES_Z_OS
  ]);
  var TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = "cpp";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = "dotnet";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = "erlang";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_GO = "go";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = "java";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = "nodejs";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = "php";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = "python";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = "ruby";
  var TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = "webjs";
  exports.TELEMETRYSDKLANGUAGEVALUES_CPP = TMP_TELEMETRYSDKLANGUAGEVALUES_CPP;
  exports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET;
  exports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG;
  exports.TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO;
  exports.TELEMETRYSDKLANGUAGEVALUES_JAVA = TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA;
  exports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS;
  exports.TELEMETRYSDKLANGUAGEVALUES_PHP = TMP_TELEMETRYSDKLANGUAGEVALUES_PHP;
  exports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON;
  exports.TELEMETRYSDKLANGUAGEVALUES_RUBY = TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY;
  exports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS;
  exports.TelemetrySdkLanguageValues = /* @__PURE__ */ (0, utils_1.createConstMap)([
    TMP_TELEMETRYSDKLANGUAGEVALUES_CPP,
    TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET,
    TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG,
    TMP_TELEMETRYSDKLANGUAGEVALUES_GO,
    TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA,
    TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS,
    TMP_TELEMETRYSDKLANGUAGEVALUES_PHP,
    TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON,
    TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY,
    TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS
  ]);
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js
var require_resource = __commonJS((exports) => {
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = exports && exports.__exportStar || function(m, exports2) {
    for (var p in m)
      if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
        __createBinding(exports2, m, p);
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  __exportStar(require_SemanticResourceAttributes(), exports);
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js
var require_stable_attributes = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ATTR_EXCEPTION_TYPE = exports.ATTR_EXCEPTION_STACKTRACE = exports.ATTR_EXCEPTION_MESSAGE = exports.ATTR_EXCEPTION_ESCAPED = exports.ERROR_TYPE_VALUE_OTHER = exports.ATTR_ERROR_TYPE = exports.DOTNET_GC_HEAP_GENERATION_VALUE_POH = exports.DOTNET_GC_HEAP_GENERATION_VALUE_LOH = exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2 = exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1 = exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0 = exports.ATTR_DOTNET_GC_HEAP_GENERATION = exports.DB_SYSTEM_NAME_VALUE_POSTGRESQL = exports.DB_SYSTEM_NAME_VALUE_MYSQL = exports.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER = exports.DB_SYSTEM_NAME_VALUE_MARIADB = exports.ATTR_DB_SYSTEM_NAME = exports.ATTR_DB_STORED_PROCEDURE_NAME = exports.ATTR_DB_RESPONSE_STATUS_CODE = exports.ATTR_DB_QUERY_TEXT = exports.ATTR_DB_QUERY_SUMMARY = exports.ATTR_DB_OPERATION_NAME = exports.ATTR_DB_OPERATION_BATCH_SIZE = exports.ATTR_DB_NAMESPACE = exports.ATTR_DB_COLLECTION_NAME = exports.ATTR_CODE_STACKTRACE = exports.ATTR_CODE_LINE_NUMBER = exports.ATTR_CODE_FUNCTION_NAME = exports.ATTR_CODE_FILE_PATH = exports.ATTR_CODE_COLUMN_NUMBER = exports.ATTR_CLIENT_PORT = exports.ATTR_CLIENT_ADDRESS = exports.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = exports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = exports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = exports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = exports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = exports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = exports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = undefined;
  exports.OTEL_STATUS_CODE_VALUE_ERROR = exports.ATTR_OTEL_STATUS_CODE = exports.ATTR_OTEL_SCOPE_VERSION = exports.ATTR_OTEL_SCOPE_NAME = exports.NETWORK_TYPE_VALUE_IPV6 = exports.NETWORK_TYPE_VALUE_IPV4 = exports.ATTR_NETWORK_TYPE = exports.NETWORK_TRANSPORT_VALUE_UNIX = exports.NETWORK_TRANSPORT_VALUE_UDP = exports.NETWORK_TRANSPORT_VALUE_TCP = exports.NETWORK_TRANSPORT_VALUE_QUIC = exports.NETWORK_TRANSPORT_VALUE_PIPE = exports.ATTR_NETWORK_TRANSPORT = exports.ATTR_NETWORK_PROTOCOL_VERSION = exports.ATTR_NETWORK_PROTOCOL_NAME = exports.ATTR_NETWORK_PEER_PORT = exports.ATTR_NETWORK_PEER_ADDRESS = exports.ATTR_NETWORK_LOCAL_PORT = exports.ATTR_NETWORK_LOCAL_ADDRESS = exports.JVM_THREAD_STATE_VALUE_WAITING = exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = exports.JVM_THREAD_STATE_VALUE_TERMINATED = exports.JVM_THREAD_STATE_VALUE_RUNNABLE = exports.JVM_THREAD_STATE_VALUE_NEW = exports.JVM_THREAD_STATE_VALUE_BLOCKED = exports.ATTR_JVM_THREAD_STATE = exports.ATTR_JVM_THREAD_DAEMON = exports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = exports.JVM_MEMORY_TYPE_VALUE_HEAP = exports.ATTR_JVM_MEMORY_TYPE = exports.ATTR_JVM_MEMORY_POOL_NAME = exports.ATTR_JVM_GC_NAME = exports.ATTR_JVM_GC_ACTION = exports.ATTR_HTTP_ROUTE = exports.ATTR_HTTP_RESPONSE_STATUS_CODE = exports.ATTR_HTTP_RESPONSE_HEADER = exports.ATTR_HTTP_REQUEST_RESEND_COUNT = exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = exports.HTTP_REQUEST_METHOD_VALUE_TRACE = exports.HTTP_REQUEST_METHOD_VALUE_PUT = exports.HTTP_REQUEST_METHOD_VALUE_POST = exports.HTTP_REQUEST_METHOD_VALUE_PATCH = exports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = exports.HTTP_REQUEST_METHOD_VALUE_HEAD = exports.HTTP_REQUEST_METHOD_VALUE_GET = exports.HTTP_REQUEST_METHOD_VALUE_DELETE = exports.HTTP_REQUEST_METHOD_VALUE_CONNECT = exports.HTTP_REQUEST_METHOD_VALUE_OTHER = exports.ATTR_HTTP_REQUEST_METHOD = exports.ATTR_HTTP_REQUEST_HEADER = undefined;
  exports.ATTR_USER_AGENT_ORIGINAL = exports.ATTR_URL_SCHEME = exports.ATTR_URL_QUERY = exports.ATTR_URL_PATH = exports.ATTR_URL_FULL = exports.ATTR_URL_FRAGMENT = exports.ATTR_TELEMETRY_SDK_VERSION = exports.ATTR_TELEMETRY_SDK_NAME = exports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = exports.ATTR_TELEMETRY_SDK_LANGUAGE = exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = exports.ATTR_SIGNALR_TRANSPORT = exports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = exports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = exports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = exports.ATTR_SIGNALR_CONNECTION_STATUS = exports.ATTR_SERVICE_VERSION = exports.ATTR_SERVICE_NAMESPACE = exports.ATTR_SERVICE_NAME = exports.ATTR_SERVICE_INSTANCE_ID = exports.ATTR_SERVER_PORT = exports.ATTR_SERVER_ADDRESS = exports.ATTR_OTEL_STATUS_DESCRIPTION = exports.OTEL_STATUS_CODE_VALUE_OK = undefined;
  exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = "aspnetcore.diagnostics.exception.result";
  exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = "aborted";
  exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = "handled";
  exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = "skipped";
  exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = "unhandled";
  exports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = "aspnetcore.diagnostics.handler.type";
  exports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = "aspnetcore.rate_limiting.policy";
  exports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = "aspnetcore.rate_limiting.result";
  exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = "acquired";
  exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = "endpoint_limiter";
  exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = "global_limiter";
  exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = "request_canceled";
  exports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = "aspnetcore.request.is_unhandled";
  exports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = "aspnetcore.routing.is_fallback";
  exports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = "aspnetcore.routing.match_status";
  exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = "failure";
  exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = "success";
  exports.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED = "aspnetcore.user.is_authenticated";
  exports.ATTR_CLIENT_ADDRESS = "client.address";
  exports.ATTR_CLIENT_PORT = "client.port";
  exports.ATTR_CODE_COLUMN_NUMBER = "code.column.number";
  exports.ATTR_CODE_FILE_PATH = "code.file.path";
  exports.ATTR_CODE_FUNCTION_NAME = "code.function.name";
  exports.ATTR_CODE_LINE_NUMBER = "code.line.number";
  exports.ATTR_CODE_STACKTRACE = "code.stacktrace";
  exports.ATTR_DB_COLLECTION_NAME = "db.collection.name";
  exports.ATTR_DB_NAMESPACE = "db.namespace";
  exports.ATTR_DB_OPERATION_BATCH_SIZE = "db.operation.batch.size";
  exports.ATTR_DB_OPERATION_NAME = "db.operation.name";
  exports.ATTR_DB_QUERY_SUMMARY = "db.query.summary";
  exports.ATTR_DB_QUERY_TEXT = "db.query.text";
  exports.ATTR_DB_RESPONSE_STATUS_CODE = "db.response.status_code";
  exports.ATTR_DB_STORED_PROCEDURE_NAME = "db.stored_procedure.name";
  exports.ATTR_DB_SYSTEM_NAME = "db.system.name";
  exports.DB_SYSTEM_NAME_VALUE_MARIADB = "mariadb";
  exports.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER = "microsoft.sql_server";
  exports.DB_SYSTEM_NAME_VALUE_MYSQL = "mysql";
  exports.DB_SYSTEM_NAME_VALUE_POSTGRESQL = "postgresql";
  exports.ATTR_DOTNET_GC_HEAP_GENERATION = "dotnet.gc.heap.generation";
  exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0 = "gen0";
  exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1 = "gen1";
  exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2 = "gen2";
  exports.DOTNET_GC_HEAP_GENERATION_VALUE_LOH = "loh";
  exports.DOTNET_GC_HEAP_GENERATION_VALUE_POH = "poh";
  exports.ATTR_ERROR_TYPE = "error.type";
  exports.ERROR_TYPE_VALUE_OTHER = "_OTHER";
  exports.ATTR_EXCEPTION_ESCAPED = "exception.escaped";
  exports.ATTR_EXCEPTION_MESSAGE = "exception.message";
  exports.ATTR_EXCEPTION_STACKTRACE = "exception.stacktrace";
  exports.ATTR_EXCEPTION_TYPE = "exception.type";
  var ATTR_HTTP_REQUEST_HEADER = (key) => `http.request.header.${key}`;
  exports.ATTR_HTTP_REQUEST_HEADER = ATTR_HTTP_REQUEST_HEADER;
  exports.ATTR_HTTP_REQUEST_METHOD = "http.request.method";
  exports.HTTP_REQUEST_METHOD_VALUE_OTHER = "_OTHER";
  exports.HTTP_REQUEST_METHOD_VALUE_CONNECT = "CONNECT";
  exports.HTTP_REQUEST_METHOD_VALUE_DELETE = "DELETE";
  exports.HTTP_REQUEST_METHOD_VALUE_GET = "GET";
  exports.HTTP_REQUEST_METHOD_VALUE_HEAD = "HEAD";
  exports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = "OPTIONS";
  exports.HTTP_REQUEST_METHOD_VALUE_PATCH = "PATCH";
  exports.HTTP_REQUEST_METHOD_VALUE_POST = "POST";
  exports.HTTP_REQUEST_METHOD_VALUE_PUT = "PUT";
  exports.HTTP_REQUEST_METHOD_VALUE_TRACE = "TRACE";
  exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original";
  exports.ATTR_HTTP_REQUEST_RESEND_COUNT = "http.request.resend_count";
  var ATTR_HTTP_RESPONSE_HEADER = (key) => `http.response.header.${key}`;
  exports.ATTR_HTTP_RESPONSE_HEADER = ATTR_HTTP_RESPONSE_HEADER;
  exports.ATTR_HTTP_RESPONSE_STATUS_CODE = "http.response.status_code";
  exports.ATTR_HTTP_ROUTE = "http.route";
  exports.ATTR_JVM_GC_ACTION = "jvm.gc.action";
  exports.ATTR_JVM_GC_NAME = "jvm.gc.name";
  exports.ATTR_JVM_MEMORY_POOL_NAME = "jvm.memory.pool.name";
  exports.ATTR_JVM_MEMORY_TYPE = "jvm.memory.type";
  exports.JVM_MEMORY_TYPE_VALUE_HEAP = "heap";
  exports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = "non_heap";
  exports.ATTR_JVM_THREAD_DAEMON = "jvm.thread.daemon";
  exports.ATTR_JVM_THREAD_STATE = "jvm.thread.state";
  exports.JVM_THREAD_STATE_VALUE_BLOCKED = "blocked";
  exports.JVM_THREAD_STATE_VALUE_NEW = "new";
  exports.JVM_THREAD_STATE_VALUE_RUNNABLE = "runnable";
  exports.JVM_THREAD_STATE_VALUE_TERMINATED = "terminated";
  exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = "timed_waiting";
  exports.JVM_THREAD_STATE_VALUE_WAITING = "waiting";
  exports.ATTR_NETWORK_LOCAL_ADDRESS = "network.local.address";
  exports.ATTR_NETWORK_LOCAL_PORT = "network.local.port";
  exports.ATTR_NETWORK_PEER_ADDRESS = "network.peer.address";
  exports.ATTR_NETWORK_PEER_PORT = "network.peer.port";
  exports.ATTR_NETWORK_PROTOCOL_NAME = "network.protocol.name";
  exports.ATTR_NETWORK_PROTOCOL_VERSION = "network.protocol.version";
  exports.ATTR_NETWORK_TRANSPORT = "network.transport";
  exports.NETWORK_TRANSPORT_VALUE_PIPE = "pipe";
  exports.NETWORK_TRANSPORT_VALUE_QUIC = "quic";
  exports.NETWORK_TRANSPORT_VALUE_TCP = "tcp";
  exports.NETWORK_TRANSPORT_VALUE_UDP = "udp";
  exports.NETWORK_TRANSPORT_VALUE_UNIX = "unix";
  exports.ATTR_NETWORK_TYPE = "network.type";
  exports.NETWORK_TYPE_VALUE_IPV4 = "ipv4";
  exports.NETWORK_TYPE_VALUE_IPV6 = "ipv6";
  exports.ATTR_OTEL_SCOPE_NAME = "otel.scope.name";
  exports.ATTR_OTEL_SCOPE_VERSION = "otel.scope.version";
  exports.ATTR_OTEL_STATUS_CODE = "otel.status_code";
  exports.OTEL_STATUS_CODE_VALUE_ERROR = "ERROR";
  exports.OTEL_STATUS_CODE_VALUE_OK = "OK";
  exports.ATTR_OTEL_STATUS_DESCRIPTION = "otel.status_description";
  exports.ATTR_SERVER_ADDRESS = "server.address";
  exports.ATTR_SERVER_PORT = "server.port";
  exports.ATTR_SERVICE_INSTANCE_ID = "service.instance.id";
  exports.ATTR_SERVICE_NAME = "service.name";
  exports.ATTR_SERVICE_NAMESPACE = "service.namespace";
  exports.ATTR_SERVICE_VERSION = "service.version";
  exports.ATTR_SIGNALR_CONNECTION_STATUS = "signalr.connection.status";
  exports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = "app_shutdown";
  exports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = "normal_closure";
  exports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = "timeout";
  exports.ATTR_SIGNALR_TRANSPORT = "signalr.transport";
  exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = "long_polling";
  exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = "server_sent_events";
  exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = "web_sockets";
  exports.ATTR_TELEMETRY_SDK_LANGUAGE = "telemetry.sdk.language";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = "cpp";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = "dotnet";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = "erlang";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = "go";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = "java";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = "nodejs";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = "php";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = "python";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = "ruby";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = "rust";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = "swift";
  exports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = "webjs";
  exports.ATTR_TELEMETRY_SDK_NAME = "telemetry.sdk.name";
  exports.ATTR_TELEMETRY_SDK_VERSION = "telemetry.sdk.version";
  exports.ATTR_URL_FRAGMENT = "url.fragment";
  exports.ATTR_URL_FULL = "url.full";
  exports.ATTR_URL_PATH = "url.path";
  exports.ATTR_URL_QUERY = "url.query";
  exports.ATTR_URL_SCHEME = "url.scheme";
  exports.ATTR_USER_AGENT_ORIGINAL = "user_agent.original";
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/stable_metrics.js
var require_stable_metrics = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = exports.METRIC_KESTREL_UPGRADED_CONNECTIONS = exports.METRIC_KESTREL_TLS_HANDSHAKE_DURATION = exports.METRIC_KESTREL_REJECTED_CONNECTIONS = exports.METRIC_KESTREL_QUEUED_REQUESTS = exports.METRIC_KESTREL_QUEUED_CONNECTIONS = exports.METRIC_KESTREL_CONNECTION_DURATION = exports.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES = exports.METRIC_KESTREL_ACTIVE_CONNECTIONS = exports.METRIC_JVM_THREAD_COUNT = exports.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC = exports.METRIC_JVM_MEMORY_USED = exports.METRIC_JVM_MEMORY_LIMIT = exports.METRIC_JVM_MEMORY_COMMITTED = exports.METRIC_JVM_GC_DURATION = exports.METRIC_JVM_CPU_TIME = exports.METRIC_JVM_CPU_RECENT_UTILIZATION = exports.METRIC_JVM_CPU_COUNT = exports.METRIC_JVM_CLASS_UNLOADED = exports.METRIC_JVM_CLASS_LOADED = exports.METRIC_JVM_CLASS_COUNT = exports.METRIC_HTTP_SERVER_REQUEST_DURATION = exports.METRIC_HTTP_CLIENT_REQUEST_DURATION = exports.METRIC_DOTNET_TIMER_COUNT = exports.METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT = exports.METRIC_DOTNET_THREAD_POOL_THREAD_COUNT = exports.METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH = exports.METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET = exports.METRIC_DOTNET_PROCESS_CPU_TIME = exports.METRIC_DOTNET_PROCESS_CPU_COUNT = exports.METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS = exports.METRIC_DOTNET_JIT_COMPILED_METHODS = exports.METRIC_DOTNET_JIT_COMPILED_IL_SIZE = exports.METRIC_DOTNET_JIT_COMPILATION_TIME = exports.METRIC_DOTNET_GC_PAUSE_TIME = exports.METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE = exports.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE = exports.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE = exports.METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED = exports.METRIC_DOTNET_GC_COLLECTIONS = exports.METRIC_DOTNET_EXCEPTIONS = exports.METRIC_DOTNET_ASSEMBLY_COUNT = exports.METRIC_DB_CLIENT_OPERATION_DURATION = exports.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE = exports.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES = exports.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS = undefined;
  exports.METRIC_SIGNALR_SERVER_CONNECTION_DURATION = undefined;
  exports.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS = "aspnetcore.diagnostics.exceptions";
  exports.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES = "aspnetcore.rate_limiting.active_request_leases";
  exports.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS = "aspnetcore.rate_limiting.queued_requests";
  exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE = "aspnetcore.rate_limiting.request.time_in_queue";
  exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION = "aspnetcore.rate_limiting.request_lease.duration";
  exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS = "aspnetcore.rate_limiting.requests";
  exports.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS = "aspnetcore.routing.match_attempts";
  exports.METRIC_DB_CLIENT_OPERATION_DURATION = "db.client.operation.duration";
  exports.METRIC_DOTNET_ASSEMBLY_COUNT = "dotnet.assembly.count";
  exports.METRIC_DOTNET_EXCEPTIONS = "dotnet.exceptions";
  exports.METRIC_DOTNET_GC_COLLECTIONS = "dotnet.gc.collections";
  exports.METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED = "dotnet.gc.heap.total_allocated";
  exports.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE = "dotnet.gc.last_collection.heap.fragmentation.size";
  exports.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE = "dotnet.gc.last_collection.heap.size";
  exports.METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE = "dotnet.gc.last_collection.memory.committed_size";
  exports.METRIC_DOTNET_GC_PAUSE_TIME = "dotnet.gc.pause.time";
  exports.METRIC_DOTNET_JIT_COMPILATION_TIME = "dotnet.jit.compilation.time";
  exports.METRIC_DOTNET_JIT_COMPILED_IL_SIZE = "dotnet.jit.compiled_il.size";
  exports.METRIC_DOTNET_JIT_COMPILED_METHODS = "dotnet.jit.compiled_methods";
  exports.METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS = "dotnet.monitor.lock_contentions";
  exports.METRIC_DOTNET_PROCESS_CPU_COUNT = "dotnet.process.cpu.count";
  exports.METRIC_DOTNET_PROCESS_CPU_TIME = "dotnet.process.cpu.time";
  exports.METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET = "dotnet.process.memory.working_set";
  exports.METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH = "dotnet.thread_pool.queue.length";
  exports.METRIC_DOTNET_THREAD_POOL_THREAD_COUNT = "dotnet.thread_pool.thread.count";
  exports.METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT = "dotnet.thread_pool.work_item.count";
  exports.METRIC_DOTNET_TIMER_COUNT = "dotnet.timer.count";
  exports.METRIC_HTTP_CLIENT_REQUEST_DURATION = "http.client.request.duration";
  exports.METRIC_HTTP_SERVER_REQUEST_DURATION = "http.server.request.duration";
  exports.METRIC_JVM_CLASS_COUNT = "jvm.class.count";
  exports.METRIC_JVM_CLASS_LOADED = "jvm.class.loaded";
  exports.METRIC_JVM_CLASS_UNLOADED = "jvm.class.unloaded";
  exports.METRIC_JVM_CPU_COUNT = "jvm.cpu.count";
  exports.METRIC_JVM_CPU_RECENT_UTILIZATION = "jvm.cpu.recent_utilization";
  exports.METRIC_JVM_CPU_TIME = "jvm.cpu.time";
  exports.METRIC_JVM_GC_DURATION = "jvm.gc.duration";
  exports.METRIC_JVM_MEMORY_COMMITTED = "jvm.memory.committed";
  exports.METRIC_JVM_MEMORY_LIMIT = "jvm.memory.limit";
  exports.METRIC_JVM_MEMORY_USED = "jvm.memory.used";
  exports.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC = "jvm.memory.used_after_last_gc";
  exports.METRIC_JVM_THREAD_COUNT = "jvm.thread.count";
  exports.METRIC_KESTREL_ACTIVE_CONNECTIONS = "kestrel.active_connections";
  exports.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES = "kestrel.active_tls_handshakes";
  exports.METRIC_KESTREL_CONNECTION_DURATION = "kestrel.connection.duration";
  exports.METRIC_KESTREL_QUEUED_CONNECTIONS = "kestrel.queued_connections";
  exports.METRIC_KESTREL_QUEUED_REQUESTS = "kestrel.queued_requests";
  exports.METRIC_KESTREL_REJECTED_CONNECTIONS = "kestrel.rejected_connections";
  exports.METRIC_KESTREL_TLS_HANDSHAKE_DURATION = "kestrel.tls_handshake.duration";
  exports.METRIC_KESTREL_UPGRADED_CONNECTIONS = "kestrel.upgraded_connections";
  exports.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = "signalr.server.active_connections";
  exports.METRIC_SIGNALR_SERVER_CONNECTION_DURATION = "signalr.server.connection.duration";
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js
var require_stable_events = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.EVENT_EXCEPTION = undefined;
  exports.EVENT_EXCEPTION = "exception";
});

// ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.40.0/node_modules/@opentelemetry/semantic-conventions/build/src/index.js
var require_src2 = __commonJS((exports) => {
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = exports && exports.__exportStar || function(m, exports2) {
    for (var p in m)
      if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
        __createBinding(exports2, m, p);
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  __exportStar(require_trace2(), exports);
  __exportStar(require_resource(), exports);
  __exportStar(require_stable_attributes(), exports);
  __exportStar(require_stable_metrics(), exports);
  __exportStar(require_stable_events(), exports);
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/semconv.js
var require_semconv = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ATTR_PROCESS_RUNTIME_NAME = undefined;
  exports.ATTR_PROCESS_RUNTIME_NAME = "process.runtime.name";
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js
var require_sdk_info = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SDK_INFO = undefined;
  var version_1 = require_version2();
  var semantic_conventions_1 = require_src2();
  var semconv_1 = require_semconv();
  exports.SDK_INFO = {
    [semantic_conventions_1.ATTR_TELEMETRY_SDK_NAME]: "opentelemetry",
    [semconv_1.ATTR_PROCESS_RUNTIME_NAME]: "node",
    [semantic_conventions_1.ATTR_TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,
    [semantic_conventions_1.ATTR_TELEMETRY_SDK_VERSION]: version_1.VERSION
  };
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/node/index.js
var require_node2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.otperformance = exports.SDK_INFO = exports._globalThis = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = undefined;
  var environment_1 = require_environment();
  Object.defineProperty(exports, "getStringFromEnv", { enumerable: true, get: function() {
    return environment_1.getStringFromEnv;
  } });
  Object.defineProperty(exports, "getBooleanFromEnv", { enumerable: true, get: function() {
    return environment_1.getBooleanFromEnv;
  } });
  Object.defineProperty(exports, "getNumberFromEnv", { enumerable: true, get: function() {
    return environment_1.getNumberFromEnv;
  } });
  Object.defineProperty(exports, "getStringListFromEnv", { enumerable: true, get: function() {
    return environment_1.getStringListFromEnv;
  } });
  var globalThis_1 = require_globalThis2();
  Object.defineProperty(exports, "_globalThis", { enumerable: true, get: function() {
    return globalThis_1._globalThis;
  } });
  var sdk_info_1 = require_sdk_info();
  Object.defineProperty(exports, "SDK_INFO", { enumerable: true, get: function() {
    return sdk_info_1.SDK_INFO;
  } });
  exports.otperformance = performance;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/index.js
var require_platform2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getStringFromEnv = exports.getBooleanFromEnv = exports.otperformance = exports._globalThis = exports.SDK_INFO = undefined;
  var node_1 = require_node2();
  Object.defineProperty(exports, "SDK_INFO", { enumerable: true, get: function() {
    return node_1.SDK_INFO;
  } });
  Object.defineProperty(exports, "_globalThis", { enumerable: true, get: function() {
    return node_1._globalThis;
  } });
  Object.defineProperty(exports, "otperformance", { enumerable: true, get: function() {
    return node_1.otperformance;
  } });
  Object.defineProperty(exports, "getBooleanFromEnv", { enumerable: true, get: function() {
    return node_1.getBooleanFromEnv;
  } });
  Object.defineProperty(exports, "getStringFromEnv", { enumerable: true, get: function() {
    return node_1.getStringFromEnv;
  } });
  Object.defineProperty(exports, "getNumberFromEnv", { enumerable: true, get: function() {
    return node_1.getNumberFromEnv;
  } });
  Object.defineProperty(exports, "getStringListFromEnv", { enumerable: true, get: function() {
    return node_1.getStringListFromEnv;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/time.js
var require_time = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = undefined;
  var platform_1 = require_platform2();
  var NANOSECOND_DIGITS = 9;
  var NANOSECOND_DIGITS_IN_MILLIS = 6;
  var MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);
  var SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
  function millisToHrTime(epochMillis) {
    const epochSeconds = epochMillis / 1000;
    const seconds = Math.trunc(epochSeconds);
    const nanos = Math.round(epochMillis % 1000 * MILLISECONDS_TO_NANOSECONDS);
    return [seconds, nanos];
  }
  exports.millisToHrTime = millisToHrTime;
  function getTimeOrigin() {
    return platform_1.otperformance.timeOrigin;
  }
  exports.getTimeOrigin = getTimeOrigin;
  function hrTime(performanceNow) {
    const timeOrigin = millisToHrTime(platform_1.otperformance.timeOrigin);
    const now = millisToHrTime(typeof performanceNow === "number" ? performanceNow : platform_1.otperformance.now());
    return addHrTimes(timeOrigin, now);
  }
  exports.hrTime = hrTime;
  function timeInputToHrTime(time) {
    if (isTimeInputHrTime(time)) {
      return time;
    } else if (typeof time === "number") {
      if (time < platform_1.otperformance.timeOrigin) {
        return hrTime(time);
      } else {
        return millisToHrTime(time);
      }
    } else if (time instanceof Date) {
      return millisToHrTime(time.getTime());
    } else {
      throw TypeError("Invalid input type");
    }
  }
  exports.timeInputToHrTime = timeInputToHrTime;
  function hrTimeDuration(startTime, endTime) {
    let seconds = endTime[0] - startTime[0];
    let nanos = endTime[1] - startTime[1];
    if (nanos < 0) {
      seconds -= 1;
      nanos += SECOND_TO_NANOSECONDS;
    }
    return [seconds, nanos];
  }
  exports.hrTimeDuration = hrTimeDuration;
  function hrTimeToTimeStamp(time) {
    const precision = NANOSECOND_DIGITS;
    const tmp = `${"0".repeat(precision)}${time[1]}Z`;
    const nanoString = tmp.substring(tmp.length - precision - 1);
    const date = new Date(time[0] * 1000).toISOString();
    return date.replace("000Z", nanoString);
  }
  exports.hrTimeToTimeStamp = hrTimeToTimeStamp;
  function hrTimeToNanoseconds(time) {
    return time[0] * SECOND_TO_NANOSECONDS + time[1];
  }
  exports.hrTimeToNanoseconds = hrTimeToNanoseconds;
  function hrTimeToMilliseconds(time) {
    return time[0] * 1000 + time[1] / 1e6;
  }
  exports.hrTimeToMilliseconds = hrTimeToMilliseconds;
  function hrTimeToMicroseconds(time) {
    return time[0] * 1e6 + time[1] / 1000;
  }
  exports.hrTimeToMicroseconds = hrTimeToMicroseconds;
  function isTimeInputHrTime(value) {
    return Array.isArray(value) && value.length === 2 && typeof value[0] === "number" && typeof value[1] === "number";
  }
  exports.isTimeInputHrTime = isTimeInputHrTime;
  function isTimeInput(value) {
    return isTimeInputHrTime(value) || typeof value === "number" || value instanceof Date;
  }
  exports.isTimeInput = isTimeInput;
  function addHrTimes(time1, time2) {
    const out = [time1[0] + time2[0], time1[1] + time2[1]];
    if (out[1] >= SECOND_TO_NANOSECONDS) {
      out[1] -= SECOND_TO_NANOSECONDS;
      out[0] += 1;
    }
    return out;
  }
  exports.addHrTimes = addHrTimes;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/timer-util.js
var require_timer_util = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.unrefTimer = undefined;
  function unrefTimer(timer) {
    if (typeof timer !== "number") {
      timer.unref();
    }
  }
  exports.unrefTimer = unrefTimer;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/ExportResult.js
var require_ExportResult = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ExportResultCode = undefined;
  var ExportResultCode;
  (function(ExportResultCode2) {
    ExportResultCode2[ExportResultCode2["SUCCESS"] = 0] = "SUCCESS";
    ExportResultCode2[ExportResultCode2["FAILED"] = 1] = "FAILED";
  })(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/propagation/composite.js
var require_composite = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CompositePropagator = undefined;
  var api_1 = require_src();

  class CompositePropagator {
    _propagators;
    _fields;
    constructor(config = {}) {
      this._propagators = config.propagators ?? [];
      this._fields = Array.from(new Set(this._propagators.map((p) => typeof p.fields === "function" ? p.fields() : []).reduce((x, y) => x.concat(y), [])));
    }
    inject(context, carrier, setter) {
      for (const propagator of this._propagators) {
        try {
          propagator.inject(context, carrier, setter);
        } catch (err) {
          api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
        }
      }
    }
    extract(context, carrier, getter) {
      return this._propagators.reduce((ctx, propagator) => {
        try {
          return propagator.extract(ctx, carrier, getter);
        } catch (err) {
          api_1.diag.warn(`Failed to extract with ${propagator.constructor.name}. Err: ${err.message}`);
        }
        return ctx;
      }, context);
    }
    fields() {
      return this._fields.slice();
    }
  }
  exports.CompositePropagator = CompositePropagator;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/internal/validators.js
var require_validators = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.validateValue = exports.validateKey = undefined;
  var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
  var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
  var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
  var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
  var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
  var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
  function validateKey(key) {
    return VALID_KEY_REGEX.test(key);
  }
  exports.validateKey = validateKey;
  function validateValue(value) {
    return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
  }
  exports.validateValue = validateValue;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/TraceState.js
var require_TraceState = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TraceState = undefined;
  var validators_1 = require_validators();
  var MAX_TRACE_STATE_ITEMS = 32;
  var MAX_TRACE_STATE_LEN = 512;
  var LIST_MEMBERS_SEPARATOR = ",";
  var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";

  class TraceState {
    _internalState = new Map;
    constructor(rawTraceState) {
      if (rawTraceState)
        this._parse(rawTraceState);
    }
    set(key, value) {
      const traceState = this._clone();
      if (traceState._internalState.has(key)) {
        traceState._internalState.delete(key);
      }
      traceState._internalState.set(key, value);
      return traceState;
    }
    unset(key) {
      const traceState = this._clone();
      traceState._internalState.delete(key);
      return traceState;
    }
    get(key) {
      return this._internalState.get(key);
    }
    serialize() {
      return this._keys().reduce((agg, key) => {
        agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
        return agg;
      }, []).join(LIST_MEMBERS_SEPARATOR);
    }
    _parse(rawTraceState) {
      if (rawTraceState.length > MAX_TRACE_STATE_LEN)
        return;
      this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce((agg, part) => {
        const listMember = part.trim();
        const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
        if (i !== -1) {
          const key = listMember.slice(0, i);
          const value = listMember.slice(i + 1, part.length);
          if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {
            agg.set(key, value);
          }
        }
        return agg;
      }, new Map);
      if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
        this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
      }
    }
    _keys() {
      return Array.from(this._internalState.keys()).reverse();
    }
    _clone() {
      const traceState = new TraceState;
      traceState._internalState = new Map(this._internalState);
      return traceState;
    }
  }
  exports.TraceState = TraceState;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js
var require_W3CTraceContextPropagator = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = undefined;
  var api_1 = require_src();
  var suppress_tracing_1 = require_suppress_tracing();
  var TraceState_1 = require_TraceState();
  exports.TRACE_PARENT_HEADER = "traceparent";
  exports.TRACE_STATE_HEADER = "tracestate";
  var VERSION = "00";
  var VERSION_PART = "(?!ff)[\\da-f]{2}";
  var TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
  var PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
  var FLAGS_PART = "[\\da-f]{2}";
  var TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`);
  function parseTraceParent(traceParent) {
    const match = TRACE_PARENT_REGEX.exec(traceParent);
    if (!match)
      return null;
    if (match[1] === "00" && match[5])
      return null;
    return {
      traceId: match[2],
      spanId: match[3],
      traceFlags: parseInt(match[4], 16)
    };
  }
  exports.parseTraceParent = parseTraceParent;

  class W3CTraceContextPropagator {
    inject(context, carrier, setter) {
      const spanContext = api_1.trace.getSpanContext(context);
      if (!spanContext || (0, suppress_tracing_1.isTracingSuppressed)(context) || !(0, api_1.isSpanContextValid)(spanContext))
        return;
      const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
      setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);
      if (spanContext.traceState) {
        setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());
      }
    }
    extract(context, carrier, getter) {
      const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);
      if (!traceParentHeader)
        return context;
      const traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
      if (typeof traceParent !== "string")
        return context;
      const spanContext = parseTraceParent(traceParent);
      if (!spanContext)
        return context;
      spanContext.isRemote = true;
      const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);
      if (traceStateHeader) {
        const state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
        spanContext.traceState = new TraceState_1.TraceState(typeof state === "string" ? state : undefined);
      }
      return api_1.trace.setSpanContext(context, spanContext);
    }
    fields() {
      return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];
    }
  }
  exports.W3CTraceContextPropagator = W3CTraceContextPropagator;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js
var require_rpc_metadata = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = undefined;
  var api_1 = require_src();
  var RPC_METADATA_KEY = (0, api_1.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");
  var RPCType;
  (function(RPCType2) {
    RPCType2["HTTP"] = "http";
  })(RPCType = exports.RPCType || (exports.RPCType = {}));
  function setRPCMetadata(context, meta) {
    return context.setValue(RPC_METADATA_KEY, meta);
  }
  exports.setRPCMetadata = setRPCMetadata;
  function deleteRPCMetadata(context) {
    return context.deleteValue(RPC_METADATA_KEY);
  }
  exports.deleteRPCMetadata = deleteRPCMetadata;
  function getRPCMetadata(context) {
    return context.getValue(RPC_METADATA_KEY);
  }
  exports.getRPCMetadata = getRPCMetadata;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js
var require_lodash_merge = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isPlainObject = undefined;
  var objectTag = "[object Object]";
  var nullTag = "[object Null]";
  var undefinedTag = "[object Undefined]";
  var funcProto = Function.prototype;
  var funcToString = funcProto.toString;
  var objectCtorString = funcToString.call(Object);
  var getPrototypeOf = Object.getPrototypeOf;
  var objectProto = Object.prototype;
  var hasOwnProperty2 = objectProto.hasOwnProperty;
  var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  var nativeObjectToString = objectProto.toString;
  function isPlainObject(value) {
    if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {
      return false;
    }
    const proto = getPrototypeOf(value);
    if (proto === null) {
      return true;
    }
    const Ctor = hasOwnProperty2.call(proto, "constructor") && proto.constructor;
    return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) === objectCtorString;
  }
  exports.isPlainObject = isPlainObject;
  function isObjectLike(value) {
    return value != null && typeof value == "object";
  }
  function baseGetTag(value) {
    if (value == null) {
      return value === undefined ? undefinedTag : nullTag;
    }
    return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  }
  function getRawTag(value) {
    const isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
    let unmasked = false;
    try {
      value[symToStringTag] = undefined;
      unmasked = true;
    } catch {}
    const result = nativeObjectToString.call(value);
    if (unmasked) {
      if (isOwn) {
        value[symToStringTag] = tag;
      } else {
        delete value[symToStringTag];
      }
    }
    return result;
  }
  function objectToString(value) {
    return nativeObjectToString.call(value);
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/merge.js
var require_merge = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.merge = undefined;
  var lodash_merge_1 = require_lodash_merge();
  var MAX_LEVEL = 20;
  function merge(...args) {
    let result = args.shift();
    const objects = new WeakMap;
    while (args.length > 0) {
      result = mergeTwoObjects(result, args.shift(), 0, objects);
    }
    return result;
  }
  exports.merge = merge;
  function takeValue(value) {
    if (isArray(value)) {
      return value.slice();
    }
    return value;
  }
  function mergeTwoObjects(one, two, level = 0, objects) {
    let result;
    if (level > MAX_LEVEL) {
      return;
    }
    level++;
    if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {
      result = takeValue(two);
    } else if (isArray(one)) {
      result = one.slice();
      if (isArray(two)) {
        for (let i = 0, j = two.length;i < j; i++) {
          result.push(takeValue(two[i]));
        }
      } else if (isObject(two)) {
        const keys = Object.keys(two);
        for (let i = 0, j = keys.length;i < j; i++) {
          const key = keys[i];
          result[key] = takeValue(two[key]);
        }
      }
    } else if (isObject(one)) {
      if (isObject(two)) {
        if (!shouldMerge(one, two)) {
          return two;
        }
        result = Object.assign({}, one);
        const keys = Object.keys(two);
        for (let i = 0, j = keys.length;i < j; i++) {
          const key = keys[i];
          const twoValue = two[key];
          if (isPrimitive(twoValue)) {
            if (typeof twoValue === "undefined") {
              delete result[key];
            } else {
              result[key] = twoValue;
            }
          } else {
            const obj1 = result[key];
            const obj2 = twoValue;
            if (wasObjectReferenced(one, key, objects) || wasObjectReferenced(two, key, objects)) {
              delete result[key];
            } else {
              if (isObject(obj1) && isObject(obj2)) {
                const arr1 = objects.get(obj1) || [];
                const arr2 = objects.get(obj2) || [];
                arr1.push({ obj: one, key });
                arr2.push({ obj: two, key });
                objects.set(obj1, arr1);
                objects.set(obj2, arr2);
              }
              result[key] = mergeTwoObjects(result[key], twoValue, level, objects);
            }
          }
        }
      } else {
        result = two;
      }
    }
    return result;
  }
  function wasObjectReferenced(obj, key, objects) {
    const arr = objects.get(obj[key]) || [];
    for (let i = 0, j = arr.length;i < j; i++) {
      const info = arr[i];
      if (info.key === key && info.obj === obj) {
        return true;
      }
    }
    return false;
  }
  function isArray(value) {
    return Array.isArray(value);
  }
  function isFunction(value) {
    return typeof value === "function";
  }
  function isObject(value) {
    return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === "object";
  }
  function isPrimitive(value) {
    return typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "undefined" || value instanceof Date || value instanceof RegExp || value === null;
  }
  function shouldMerge(one, two) {
    if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {
      return false;
    }
    return true;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/timeout.js
var require_timeout = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.callWithTimeout = exports.TimeoutError = undefined;

  class TimeoutError extends Error {
    constructor(message) {
      super(message);
      Object.setPrototypeOf(this, TimeoutError.prototype);
    }
  }
  exports.TimeoutError = TimeoutError;
  function callWithTimeout(promise, timeout) {
    let timeoutHandle;
    const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {
      timeoutHandle = setTimeout(function timeoutHandler() {
        reject(new TimeoutError("Operation timed out."));
      }, timeout);
    });
    return Promise.race([promise, timeoutPromise]).then((result) => {
      clearTimeout(timeoutHandle);
      return result;
    }, (reason) => {
      clearTimeout(timeoutHandle);
      throw reason;
    });
  }
  exports.callWithTimeout = callWithTimeout;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/url.js
var require_url = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isUrlIgnored = exports.urlMatches = undefined;
  function urlMatches(url, urlToMatch) {
    if (typeof urlToMatch === "string") {
      return url === urlToMatch;
    } else {
      return !!url.match(urlToMatch);
    }
  }
  exports.urlMatches = urlMatches;
  function isUrlIgnored(url, ignoredUrls) {
    if (!ignoredUrls) {
      return false;
    }
    for (const ignoreUrl of ignoredUrls) {
      if (urlMatches(url, ignoreUrl)) {
        return true;
      }
    }
    return false;
  }
  exports.isUrlIgnored = isUrlIgnored;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/promise.js
var require_promise = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Deferred = undefined;

  class Deferred {
    _promise;
    _resolve;
    _reject;
    constructor() {
      this._promise = new Promise((resolve, reject) => {
        this._resolve = resolve;
        this._reject = reject;
      });
    }
    get promise() {
      return this._promise;
    }
    resolve(val) {
      this._resolve(val);
    }
    reject(err) {
      this._reject(err);
    }
  }
  exports.Deferred = Deferred;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/callback.js
var require_callback = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BindOnceFuture = undefined;
  var promise_1 = require_promise();

  class BindOnceFuture {
    _isCalled = false;
    _deferred = new promise_1.Deferred;
    _callback;
    _that;
    constructor(callback, that) {
      this._callback = callback;
      this._that = that;
    }
    get isCalled() {
      return this._isCalled;
    }
    get promise() {
      return this._deferred.promise;
    }
    call(...args) {
      if (!this._isCalled) {
        this._isCalled = true;
        try {
          Promise.resolve(this._callback.call(this._that, ...args)).then((val) => this._deferred.resolve(val), (err) => this._deferred.reject(err));
        } catch (err) {
          this._deferred.reject(err);
        }
      }
      return this._deferred.promise;
    }
  }
  exports.BindOnceFuture = BindOnceFuture;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/configuration.js
var require_configuration = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.diagLogLevelFromString = undefined;
  var api_1 = require_src();
  var logLevelMap = {
    ALL: api_1.DiagLogLevel.ALL,
    VERBOSE: api_1.DiagLogLevel.VERBOSE,
    DEBUG: api_1.DiagLogLevel.DEBUG,
    INFO: api_1.DiagLogLevel.INFO,
    WARN: api_1.DiagLogLevel.WARN,
    ERROR: api_1.DiagLogLevel.ERROR,
    NONE: api_1.DiagLogLevel.NONE
  };
  function diagLogLevelFromString(value) {
    if (value == null) {
      return;
    }
    const resolvedLogLevel = logLevelMap[value.toUpperCase()];
    if (resolvedLogLevel == null) {
      api_1.diag.warn(`Unknown log level "${value}", expected one of ${Object.keys(logLevelMap)}, using default`);
      return api_1.DiagLogLevel.INFO;
    }
    return resolvedLogLevel;
  }
  exports.diagLogLevelFromString = diagLogLevelFromString;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/internal/exporter.js
var require_exporter = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports._export = undefined;
  var api_1 = require_src();
  var suppress_tracing_1 = require_suppress_tracing();
  function _export(exporter, arg) {
    return new Promise((resolve) => {
      api_1.context.with((0, suppress_tracing_1.suppressTracing)(api_1.context.active()), () => {
        exporter.export(arg, resolve);
      });
    });
  }
  exports._export = _export;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/index.js
var require_src3 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.internal = exports.diagLogLevelFromString = exports.BindOnceFuture = exports.urlMatches = exports.isUrlIgnored = exports.callWithTimeout = exports.TimeoutError = exports.merge = exports.TraceState = exports.unsuppressTracing = exports.suppressTracing = exports.isTracingSuppressed = exports.setRPCMetadata = exports.getRPCMetadata = exports.deleteRPCMetadata = exports.RPCType = exports.parseTraceParent = exports.W3CTraceContextPropagator = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = exports.CompositePropagator = exports.otperformance = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = exports._globalThis = exports.SDK_INFO = exports.parseKeyPairsIntoRecord = exports.ExportResultCode = exports.unrefTimer = exports.timeInputToHrTime = exports.millisToHrTime = exports.isTimeInputHrTime = exports.isTimeInput = exports.hrTimeToTimeStamp = exports.hrTimeToNanoseconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeDuration = exports.hrTime = exports.getTimeOrigin = exports.addHrTimes = exports.loggingErrorHandler = exports.setGlobalErrorHandler = exports.globalErrorHandler = exports.sanitizeAttributes = exports.isAttributeValue = exports.AnchoredClock = exports.W3CBaggagePropagator = undefined;
  var W3CBaggagePropagator_1 = require_W3CBaggagePropagator();
  Object.defineProperty(exports, "W3CBaggagePropagator", { enumerable: true, get: function() {
    return W3CBaggagePropagator_1.W3CBaggagePropagator;
  } });
  var anchored_clock_1 = require_anchored_clock();
  Object.defineProperty(exports, "AnchoredClock", { enumerable: true, get: function() {
    return anchored_clock_1.AnchoredClock;
  } });
  var attributes_1 = require_attributes();
  Object.defineProperty(exports, "isAttributeValue", { enumerable: true, get: function() {
    return attributes_1.isAttributeValue;
  } });
  Object.defineProperty(exports, "sanitizeAttributes", { enumerable: true, get: function() {
    return attributes_1.sanitizeAttributes;
  } });
  var global_error_handler_1 = require_global_error_handler();
  Object.defineProperty(exports, "globalErrorHandler", { enumerable: true, get: function() {
    return global_error_handler_1.globalErrorHandler;
  } });
  Object.defineProperty(exports, "setGlobalErrorHandler", { enumerable: true, get: function() {
    return global_error_handler_1.setGlobalErrorHandler;
  } });
  var logging_error_handler_1 = require_logging_error_handler();
  Object.defineProperty(exports, "loggingErrorHandler", { enumerable: true, get: function() {
    return logging_error_handler_1.loggingErrorHandler;
  } });
  var time_1 = require_time();
  Object.defineProperty(exports, "addHrTimes", { enumerable: true, get: function() {
    return time_1.addHrTimes;
  } });
  Object.defineProperty(exports, "getTimeOrigin", { enumerable: true, get: function() {
    return time_1.getTimeOrigin;
  } });
  Object.defineProperty(exports, "hrTime", { enumerable: true, get: function() {
    return time_1.hrTime;
  } });
  Object.defineProperty(exports, "hrTimeDuration", { enumerable: true, get: function() {
    return time_1.hrTimeDuration;
  } });
  Object.defineProperty(exports, "hrTimeToMicroseconds", { enumerable: true, get: function() {
    return time_1.hrTimeToMicroseconds;
  } });
  Object.defineProperty(exports, "hrTimeToMilliseconds", { enumerable: true, get: function() {
    return time_1.hrTimeToMilliseconds;
  } });
  Object.defineProperty(exports, "hrTimeToNanoseconds", { enumerable: true, get: function() {
    return time_1.hrTimeToNanoseconds;
  } });
  Object.defineProperty(exports, "hrTimeToTimeStamp", { enumerable: true, get: function() {
    return time_1.hrTimeToTimeStamp;
  } });
  Object.defineProperty(exports, "isTimeInput", { enumerable: true, get: function() {
    return time_1.isTimeInput;
  } });
  Object.defineProperty(exports, "isTimeInputHrTime", { enumerable: true, get: function() {
    return time_1.isTimeInputHrTime;
  } });
  Object.defineProperty(exports, "millisToHrTime", { enumerable: true, get: function() {
    return time_1.millisToHrTime;
  } });
  Object.defineProperty(exports, "timeInputToHrTime", { enumerable: true, get: function() {
    return time_1.timeInputToHrTime;
  } });
  var timer_util_1 = require_timer_util();
  Object.defineProperty(exports, "unrefTimer", { enumerable: true, get: function() {
    return timer_util_1.unrefTimer;
  } });
  var ExportResult_1 = require_ExportResult();
  Object.defineProperty(exports, "ExportResultCode", { enumerable: true, get: function() {
    return ExportResult_1.ExportResultCode;
  } });
  var utils_1 = require_utils3();
  Object.defineProperty(exports, "parseKeyPairsIntoRecord", { enumerable: true, get: function() {
    return utils_1.parseKeyPairsIntoRecord;
  } });
  var platform_1 = require_platform2();
  Object.defineProperty(exports, "SDK_INFO", { enumerable: true, get: function() {
    return platform_1.SDK_INFO;
  } });
  Object.defineProperty(exports, "_globalThis", { enumerable: true, get: function() {
    return platform_1._globalThis;
  } });
  Object.defineProperty(exports, "getStringFromEnv", { enumerable: true, get: function() {
    return platform_1.getStringFromEnv;
  } });
  Object.defineProperty(exports, "getBooleanFromEnv", { enumerable: true, get: function() {
    return platform_1.getBooleanFromEnv;
  } });
  Object.defineProperty(exports, "getNumberFromEnv", { enumerable: true, get: function() {
    return platform_1.getNumberFromEnv;
  } });
  Object.defineProperty(exports, "getStringListFromEnv", { enumerable: true, get: function() {
    return platform_1.getStringListFromEnv;
  } });
  Object.defineProperty(exports, "otperformance", { enumerable: true, get: function() {
    return platform_1.otperformance;
  } });
  var composite_1 = require_composite();
  Object.defineProperty(exports, "CompositePropagator", { enumerable: true, get: function() {
    return composite_1.CompositePropagator;
  } });
  var W3CTraceContextPropagator_1 = require_W3CTraceContextPropagator();
  Object.defineProperty(exports, "TRACE_PARENT_HEADER", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.TRACE_PARENT_HEADER;
  } });
  Object.defineProperty(exports, "TRACE_STATE_HEADER", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.TRACE_STATE_HEADER;
  } });
  Object.defineProperty(exports, "W3CTraceContextPropagator", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.W3CTraceContextPropagator;
  } });
  Object.defineProperty(exports, "parseTraceParent", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.parseTraceParent;
  } });
  var rpc_metadata_1 = require_rpc_metadata();
  Object.defineProperty(exports, "RPCType", { enumerable: true, get: function() {
    return rpc_metadata_1.RPCType;
  } });
  Object.defineProperty(exports, "deleteRPCMetadata", { enumerable: true, get: function() {
    return rpc_metadata_1.deleteRPCMetadata;
  } });
  Object.defineProperty(exports, "getRPCMetadata", { enumerable: true, get: function() {
    return rpc_metadata_1.getRPCMetadata;
  } });
  Object.defineProperty(exports, "setRPCMetadata", { enumerable: true, get: function() {
    return rpc_metadata_1.setRPCMetadata;
  } });
  var suppress_tracing_1 = require_suppress_tracing();
  Object.defineProperty(exports, "isTracingSuppressed", { enumerable: true, get: function() {
    return suppress_tracing_1.isTracingSuppressed;
  } });
  Object.defineProperty(exports, "suppressTracing", { enumerable: true, get: function() {
    return suppress_tracing_1.suppressTracing;
  } });
  Object.defineProperty(exports, "unsuppressTracing", { enumerable: true, get: function() {
    return suppress_tracing_1.unsuppressTracing;
  } });
  var TraceState_1 = require_TraceState();
  Object.defineProperty(exports, "TraceState", { enumerable: true, get: function() {
    return TraceState_1.TraceState;
  } });
  var merge_1 = require_merge();
  Object.defineProperty(exports, "merge", { enumerable: true, get: function() {
    return merge_1.merge;
  } });
  var timeout_1 = require_timeout();
  Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function() {
    return timeout_1.TimeoutError;
  } });
  Object.defineProperty(exports, "callWithTimeout", { enumerable: true, get: function() {
    return timeout_1.callWithTimeout;
  } });
  var url_1 = require_url();
  Object.defineProperty(exports, "isUrlIgnored", { enumerable: true, get: function() {
    return url_1.isUrlIgnored;
  } });
  Object.defineProperty(exports, "urlMatches", { enumerable: true, get: function() {
    return url_1.urlMatches;
  } });
  var callback_1 = require_callback();
  Object.defineProperty(exports, "BindOnceFuture", { enumerable: true, get: function() {
    return callback_1.BindOnceFuture;
  } });
  var configuration_1 = require_configuration();
  Object.defineProperty(exports, "diagLogLevelFromString", { enumerable: true, get: function() {
    return configuration_1.diagLogLevelFromString;
  } });
  var exporter_1 = require_exporter();
  exports.internal = {
    _export: exporter_1._export
  };
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-http@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/version.js
var require_version3 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.VERSION = undefined;
  exports.VERSION = "0.213.0";
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/types/LogRecord.js
var require_LogRecord = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SeverityNumber = undefined;
  var SeverityNumber;
  (function(SeverityNumber2) {
    SeverityNumber2[SeverityNumber2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
    SeverityNumber2[SeverityNumber2["TRACE"] = 1] = "TRACE";
    SeverityNumber2[SeverityNumber2["TRACE2"] = 2] = "TRACE2";
    SeverityNumber2[SeverityNumber2["TRACE3"] = 3] = "TRACE3";
    SeverityNumber2[SeverityNumber2["TRACE4"] = 4] = "TRACE4";
    SeverityNumber2[SeverityNumber2["DEBUG"] = 5] = "DEBUG";
    SeverityNumber2[SeverityNumber2["DEBUG2"] = 6] = "DEBUG2";
    SeverityNumber2[SeverityNumber2["DEBUG3"] = 7] = "DEBUG3";
    SeverityNumber2[SeverityNumber2["DEBUG4"] = 8] = "DEBUG4";
    SeverityNumber2[SeverityNumber2["INFO"] = 9] = "INFO";
    SeverityNumber2[SeverityNumber2["INFO2"] = 10] = "INFO2";
    SeverityNumber2[SeverityNumber2["INFO3"] = 11] = "INFO3";
    SeverityNumber2[SeverityNumber2["INFO4"] = 12] = "INFO4";
    SeverityNumber2[SeverityNumber2["WARN"] = 13] = "WARN";
    SeverityNumber2[SeverityNumber2["WARN2"] = 14] = "WARN2";
    SeverityNumber2[SeverityNumber2["WARN3"] = 15] = "WARN3";
    SeverityNumber2[SeverityNumber2["WARN4"] = 16] = "WARN4";
    SeverityNumber2[SeverityNumber2["ERROR"] = 17] = "ERROR";
    SeverityNumber2[SeverityNumber2["ERROR2"] = 18] = "ERROR2";
    SeverityNumber2[SeverityNumber2["ERROR3"] = 19] = "ERROR3";
    SeverityNumber2[SeverityNumber2["ERROR4"] = 20] = "ERROR4";
    SeverityNumber2[SeverityNumber2["FATAL"] = 21] = "FATAL";
    SeverityNumber2[SeverityNumber2["FATAL2"] = 22] = "FATAL2";
    SeverityNumber2[SeverityNumber2["FATAL3"] = 23] = "FATAL3";
    SeverityNumber2[SeverityNumber2["FATAL4"] = 24] = "FATAL4";
  })(SeverityNumber = exports.SeverityNumber || (exports.SeverityNumber = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.js
var require_NoopLogger = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NOOP_LOGGER = exports.NoopLogger = undefined;

  class NoopLogger {
    emit(_logRecord) {}
  }
  exports.NoopLogger = NoopLogger;
  exports.NOOP_LOGGER = new NoopLogger;
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/internal/global-utils.js
var require_global_utils2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.API_BACKWARDS_COMPATIBILITY_VERSION = exports.makeGetter = exports._global = exports.GLOBAL_LOGS_API_KEY = undefined;
  exports.GLOBAL_LOGS_API_KEY = Symbol.for("io.opentelemetry.js.api.logs");
  exports._global = globalThis;
  function makeGetter(requiredVersion, instance, fallback) {
    return (version) => version === requiredVersion ? instance : fallback;
  }
  exports.makeGetter = makeGetter;
  exports.API_BACKWARDS_COMPATIBILITY_VERSION = 1;
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/NoopLoggerProvider.js
var require_NoopLoggerProvider = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NOOP_LOGGER_PROVIDER = exports.NoopLoggerProvider = undefined;
  var NoopLogger_1 = require_NoopLogger();

  class NoopLoggerProvider {
    getLogger(_name, _version, _options) {
      return new NoopLogger_1.NoopLogger;
    }
  }
  exports.NoopLoggerProvider = NoopLoggerProvider;
  exports.NOOP_LOGGER_PROVIDER = new NoopLoggerProvider;
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/ProxyLogger.js
var require_ProxyLogger = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ProxyLogger = undefined;
  var NoopLogger_1 = require_NoopLogger();

  class ProxyLogger {
    constructor(provider, name, version, options) {
      this._provider = provider;
      this.name = name;
      this.version = version;
      this.options = options;
    }
    emit(logRecord) {
      this._getLogger().emit(logRecord);
    }
    _getLogger() {
      if (this._delegate) {
        return this._delegate;
      }
      const logger = this._provider._getDelegateLogger(this.name, this.version, this.options);
      if (!logger) {
        return NoopLogger_1.NOOP_LOGGER;
      }
      this._delegate = logger;
      return this._delegate;
    }
  }
  exports.ProxyLogger = ProxyLogger;
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/ProxyLoggerProvider.js
var require_ProxyLoggerProvider = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ProxyLoggerProvider = undefined;
  var NoopLoggerProvider_1 = require_NoopLoggerProvider();
  var ProxyLogger_1 = require_ProxyLogger();

  class ProxyLoggerProvider {
    getLogger(name, version, options) {
      var _a;
      return (_a = this._getDelegateLogger(name, version, options)) !== null && _a !== undefined ? _a : new ProxyLogger_1.ProxyLogger(this, name, version, options);
    }
    _getDelegate() {
      var _a;
      return (_a = this._delegate) !== null && _a !== undefined ? _a : NoopLoggerProvider_1.NOOP_LOGGER_PROVIDER;
    }
    _setDelegate(delegate) {
      this._delegate = delegate;
    }
    _getDelegateLogger(name, version, options) {
      var _a;
      return (_a = this._delegate) === null || _a === undefined ? undefined : _a.getLogger(name, version, options);
    }
  }
  exports.ProxyLoggerProvider = ProxyLoggerProvider;
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/api/logs.js
var require_logs = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LogsAPI = undefined;
  var global_utils_1 = require_global_utils2();
  var NoopLoggerProvider_1 = require_NoopLoggerProvider();
  var ProxyLoggerProvider_1 = require_ProxyLoggerProvider();

  class LogsAPI {
    constructor() {
      this._proxyLoggerProvider = new ProxyLoggerProvider_1.ProxyLoggerProvider;
    }
    static getInstance() {
      if (!this._instance) {
        this._instance = new LogsAPI;
      }
      return this._instance;
    }
    setGlobalLoggerProvider(provider) {
      if (global_utils_1._global[global_utils_1.GLOBAL_LOGS_API_KEY]) {
        return this.getLoggerProvider();
      }
      global_utils_1._global[global_utils_1.GLOBAL_LOGS_API_KEY] = (0, global_utils_1.makeGetter)(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, provider, NoopLoggerProvider_1.NOOP_LOGGER_PROVIDER);
      this._proxyLoggerProvider._setDelegate(provider);
      return provider;
    }
    getLoggerProvider() {
      var _a, _b;
      return (_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_LOGS_API_KEY]) === null || _a === undefined ? undefined : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== undefined ? _b : this._proxyLoggerProvider;
    }
    getLogger(name, version, options) {
      return this.getLoggerProvider().getLogger(name, version, options);
    }
    disable() {
      delete global_utils_1._global[global_utils_1.GLOBAL_LOGS_API_KEY];
      this._proxyLoggerProvider = new ProxyLoggerProvider_1.ProxyLoggerProvider;
    }
  }
  exports.LogsAPI = LogsAPI;
});

// ../../node_modules/.pnpm/@opentelemetry+api-logs@0.213.0/node_modules/@opentelemetry/api-logs/build/src/index.js
var require_src4 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.logs = exports.NoopLogger = exports.NOOP_LOGGER = exports.SeverityNumber = undefined;
  var LogRecord_1 = require_LogRecord();
  Object.defineProperty(exports, "SeverityNumber", { enumerable: true, get: function() {
    return LogRecord_1.SeverityNumber;
  } });
  var NoopLogger_1 = require_NoopLogger();
  Object.defineProperty(exports, "NOOP_LOGGER", { enumerable: true, get: function() {
    return NoopLogger_1.NOOP_LOGGER;
  } });
  Object.defineProperty(exports, "NoopLogger", { enumerable: true, get: function() {
    return NoopLogger_1.NoopLogger;
  } });
  var logs_1 = require_logs();
  exports.logs = logs_1.LogsAPI.getInstance();
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/autoLoaderUtils.js
var require_autoLoaderUtils = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.disableInstrumentations = exports.enableInstrumentations = undefined;
  function enableInstrumentations(instrumentations, tracerProvider, meterProvider, loggerProvider) {
    for (let i = 0, j = instrumentations.length;i < j; i++) {
      const instrumentation = instrumentations[i];
      if (tracerProvider) {
        instrumentation.setTracerProvider(tracerProvider);
      }
      if (meterProvider) {
        instrumentation.setMeterProvider(meterProvider);
      }
      if (loggerProvider && instrumentation.setLoggerProvider) {
        instrumentation.setLoggerProvider(loggerProvider);
      }
      if (!instrumentation.getConfig().enabled) {
        instrumentation.enable();
      }
    }
  }
  exports.enableInstrumentations = enableInstrumentations;
  function disableInstrumentations(instrumentations) {
    instrumentations.forEach((instrumentation) => instrumentation.disable());
  }
  exports.disableInstrumentations = disableInstrumentations;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/autoLoader.js
var require_autoLoader = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.registerInstrumentations = undefined;
  var api_1 = require_src();
  var api_logs_1 = require_src4();
  var autoLoaderUtils_1 = require_autoLoaderUtils();
  function registerInstrumentations(options) {
    const tracerProvider = options.tracerProvider || api_1.trace.getTracerProvider();
    const meterProvider = options.meterProvider || api_1.metrics.getMeterProvider();
    const loggerProvider = options.loggerProvider || api_logs_1.logs.getLoggerProvider();
    const instrumentations = options.instrumentations?.flat() ?? [];
    (0, autoLoaderUtils_1.enableInstrumentations)(instrumentations, tracerProvider, meterProvider, loggerProvider);
    return () => {
      (0, autoLoaderUtils_1.disableInstrumentations)(instrumentations);
    };
  }
  exports.registerInstrumentations = registerInstrumentations;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/semver.js
var require_semver2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.satisfies = undefined;
  var api_1 = require_src();
  var VERSION_REGEXP = /^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
  var RANGE_REGEXP = /^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
  var operatorResMap = {
    ">": [1],
    ">=": [0, 1],
    "=": [0],
    "<=": [-1, 0],
    "<": [-1],
    "!=": [-1, 1]
  };
  function satisfies(version, range, options) {
    if (!_validateVersion(version)) {
      api_1.diag.error(`Invalid version: ${version}`);
      return false;
    }
    if (!range) {
      return true;
    }
    range = range.replace(/([<>=~^]+)\s+/g, "$1");
    const parsedVersion = _parseVersion(version);
    if (!parsedVersion) {
      return false;
    }
    const allParsedRanges = [];
    const checkResult = _doSatisfies(parsedVersion, range, allParsedRanges, options);
    if (checkResult && !options?.includePrerelease) {
      return _doPreleaseCheck(parsedVersion, allParsedRanges);
    }
    return checkResult;
  }
  exports.satisfies = satisfies;
  function _validateVersion(version) {
    return typeof version === "string" && VERSION_REGEXP.test(version);
  }
  function _doSatisfies(parsedVersion, range, allParsedRanges, options) {
    if (range.includes("||")) {
      const ranges = range.trim().split("||");
      for (const r of ranges) {
        if (_checkRange(parsedVersion, r, allParsedRanges, options)) {
          return true;
        }
      }
      return false;
    } else if (range.includes(" - ")) {
      range = replaceHyphen(range, options);
    } else if (range.includes(" ")) {
      const ranges = range.trim().replace(/\s{2,}/g, " ").split(" ");
      for (const r of ranges) {
        if (!_checkRange(parsedVersion, r, allParsedRanges, options)) {
          return false;
        }
      }
      return true;
    }
    return _checkRange(parsedVersion, range, allParsedRanges, options);
  }
  function _checkRange(parsedVersion, range, allParsedRanges, options) {
    range = _normalizeRange(range, options);
    if (range.includes(" ")) {
      return _doSatisfies(parsedVersion, range, allParsedRanges, options);
    } else {
      const parsedRange = _parseRange(range);
      allParsedRanges.push(parsedRange);
      return _satisfies(parsedVersion, parsedRange);
    }
  }
  function _satisfies(parsedVersion, parsedRange) {
    if (parsedRange.invalid) {
      return false;
    }
    if (!parsedRange.version || _isWildcard(parsedRange.version)) {
      return true;
    }
    let comparisonResult = _compareVersionSegments(parsedVersion.versionSegments || [], parsedRange.versionSegments || []);
    if (comparisonResult === 0) {
      const versionPrereleaseSegments = parsedVersion.prereleaseSegments || [];
      const rangePrereleaseSegments = parsedRange.prereleaseSegments || [];
      if (!versionPrereleaseSegments.length && !rangePrereleaseSegments.length) {
        comparisonResult = 0;
      } else if (!versionPrereleaseSegments.length && rangePrereleaseSegments.length) {
        comparisonResult = 1;
      } else if (versionPrereleaseSegments.length && !rangePrereleaseSegments.length) {
        comparisonResult = -1;
      } else {
        comparisonResult = _compareVersionSegments(versionPrereleaseSegments, rangePrereleaseSegments);
      }
    }
    return operatorResMap[parsedRange.op]?.includes(comparisonResult);
  }
  function _doPreleaseCheck(parsedVersion, allParsedRanges) {
    if (parsedVersion.prerelease) {
      return allParsedRanges.some((r) => r.prerelease && r.version === parsedVersion.version);
    }
    return true;
  }
  function _normalizeRange(range, options) {
    range = range.trim();
    range = replaceCaret(range, options);
    range = replaceTilde(range);
    range = replaceXRange(range, options);
    range = range.trim();
    return range;
  }
  function isX(id) {
    return !id || id.toLowerCase() === "x" || id === "*";
  }
  function _parseVersion(versionString) {
    const match = versionString.match(VERSION_REGEXP);
    if (!match) {
      api_1.diag.error(`Invalid version: ${versionString}`);
      return;
    }
    const version = match.groups.version;
    const prerelease = match.groups.prerelease;
    const build = match.groups.build;
    const versionSegments = version.split(".");
    const prereleaseSegments = prerelease?.split(".");
    return {
      op: undefined,
      version,
      versionSegments,
      versionSegmentCount: versionSegments.length,
      prerelease,
      prereleaseSegments,
      prereleaseSegmentCount: prereleaseSegments ? prereleaseSegments.length : 0,
      build
    };
  }
  function _parseRange(rangeString) {
    if (!rangeString) {
      return {};
    }
    const match = rangeString.match(RANGE_REGEXP);
    if (!match) {
      api_1.diag.error(`Invalid range: ${rangeString}`);
      return {
        invalid: true
      };
    }
    let op = match.groups.op;
    const version = match.groups.version;
    const prerelease = match.groups.prerelease;
    const build = match.groups.build;
    const versionSegments = version.split(".");
    const prereleaseSegments = prerelease?.split(".");
    if (op === "==") {
      op = "=";
    }
    return {
      op: op || "=",
      version,
      versionSegments,
      versionSegmentCount: versionSegments.length,
      prerelease,
      prereleaseSegments,
      prereleaseSegmentCount: prereleaseSegments ? prereleaseSegments.length : 0,
      build
    };
  }
  function _isWildcard(s) {
    return s === "*" || s === "x" || s === "X";
  }
  function _parseVersionString(v) {
    const n = parseInt(v, 10);
    return isNaN(n) ? v : n;
  }
  function _normalizeVersionType(a, b) {
    if (typeof a === typeof b) {
      if (typeof a === "number") {
        return [a, b];
      } else if (typeof a === "string") {
        return [a, b];
      } else {
        throw new Error("Version segments can only be strings or numbers");
      }
    } else {
      return [String(a), String(b)];
    }
  }
  function _compareVersionStrings(v1, v2) {
    if (_isWildcard(v1) || _isWildcard(v2)) {
      return 0;
    }
    const [parsedV1, parsedV2] = _normalizeVersionType(_parseVersionString(v1), _parseVersionString(v2));
    if (parsedV1 > parsedV2) {
      return 1;
    } else if (parsedV1 < parsedV2) {
      return -1;
    }
    return 0;
  }
  function _compareVersionSegments(v1, v2) {
    for (let i = 0;i < Math.max(v1.length, v2.length); i++) {
      const res = _compareVersionStrings(v1[i] || "0", v2[i] || "0");
      if (res !== 0) {
        return res;
      }
    }
    return 0;
  }
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
  var NUMERICIDENTIFIER = "0|[1-9]\\d*";
  var NONNUMERICIDENTIFIER = `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`;
  var GTLT = "((?:<|>)?=?)";
  var PRERELEASEIDENTIFIER = `(?:${NUMERICIDENTIFIER}|${NONNUMERICIDENTIFIER})`;
  var PRERELEASE = `(?:-(${PRERELEASEIDENTIFIER}(?:\\.${PRERELEASEIDENTIFIER})*))`;
  var BUILDIDENTIFIER = `${LETTERDASHNUMBER}+`;
  var BUILD = `(?:\\+(${BUILDIDENTIFIER}(?:\\.${BUILDIDENTIFIER})*))`;
  var XRANGEIDENTIFIER = `${NUMERICIDENTIFIER}|x|X|\\*`;
  var XRANGEPLAIN = `[v=\\s]*(${XRANGEIDENTIFIER})` + `(?:\\.(${XRANGEIDENTIFIER})` + `(?:\\.(${XRANGEIDENTIFIER})` + `(?:${PRERELEASE})?${BUILD}?` + `)?)?`;
  var XRANGE = `^${GTLT}\\s*${XRANGEPLAIN}$`;
  var XRANGE_REGEXP = new RegExp(XRANGE);
  var HYPHENRANGE = `^\\s*(${XRANGEPLAIN})` + `\\s+-\\s+` + `(${XRANGEPLAIN})` + `\\s*$`;
  var HYPHENRANGE_REGEXP = new RegExp(HYPHENRANGE);
  var LONETILDE = "(?:~>?)";
  var TILDE = `^${LONETILDE}${XRANGEPLAIN}$`;
  var TILDE_REGEXP = new RegExp(TILDE);
  var LONECARET = "(?:\\^)";
  var CARET = `^${LONECARET}${XRANGEPLAIN}$`;
  var CARET_REGEXP = new RegExp(CARET);
  function replaceTilde(comp) {
    const r = TILDE_REGEXP;
    return comp.replace(r, (_, M, m, p, pr) => {
      let ret;
      if (isX(M)) {
        ret = "";
      } else if (isX(m)) {
        ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
      } else if (isX(p)) {
        ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
      } else if (pr) {
        ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
      } else {
        ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
      }
      return ret;
    });
  }
  function replaceCaret(comp, options) {
    const r = CARET_REGEXP;
    const z = options?.includePrerelease ? "-0" : "";
    return comp.replace(r, (_, M, m, p, pr) => {
      let ret;
      if (isX(M)) {
        ret = "";
      } else if (isX(m)) {
        ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
      } else if (isX(p)) {
        if (M === "0") {
          ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
        } else {
          ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
        }
      } else if (pr) {
        if (M === "0") {
          if (m === "0") {
            ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
          } else {
            ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
          }
        } else {
          ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
        }
      } else {
        if (M === "0") {
          if (m === "0") {
            ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
          } else {
            ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
          }
        } else {
          ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
        }
      }
      return ret;
    });
  }
  function replaceXRange(comp, options) {
    const r = XRANGE_REGEXP;
    return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
      const xM = isX(M);
      const xm = xM || isX(m);
      const xp = xm || isX(p);
      const anyX = xp;
      if (gtlt === "=" && anyX) {
        gtlt = "";
      }
      pr = options?.includePrerelease ? "-0" : "";
      if (xM) {
        if (gtlt === ">" || gtlt === "<") {
          ret = "<0.0.0-0";
        } else {
          ret = "*";
        }
      } else if (gtlt && anyX) {
        if (xm) {
          m = 0;
        }
        p = 0;
        if (gtlt === ">") {
          gtlt = ">=";
          if (xm) {
            M = +M + 1;
            m = 0;
            p = 0;
          } else {
            m = +m + 1;
            p = 0;
          }
        } else if (gtlt === "<=") {
          gtlt = "<";
          if (xm) {
            M = +M + 1;
          } else {
            m = +m + 1;
          }
        }
        if (gtlt === "<") {
          pr = "-0";
        }
        ret = `${gtlt + M}.${m}.${p}${pr}`;
      } else if (xm) {
        ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
      } else if (xp) {
        ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
      }
      return ret;
    });
  }
  function replaceHyphen(comp, options) {
    const r = HYPHENRANGE_REGEXP;
    return comp.replace(r, (_, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
      if (isX(fM)) {
        from = "";
      } else if (isX(fm)) {
        from = `>=${fM}.0.0${options?.includePrerelease ? "-0" : ""}`;
      } else if (isX(fp)) {
        from = `>=${fM}.${fm}.0${options?.includePrerelease ? "-0" : ""}`;
      } else if (fpr) {
        from = `>=${from}`;
      } else {
        from = `>=${from}${options?.includePrerelease ? "-0" : ""}`;
      }
      if (isX(tM)) {
        to = "";
      } else if (isX(tm)) {
        to = `<${+tM + 1}.0.0-0`;
      } else if (isX(tp)) {
        to = `<${tM}.${+tm + 1}.0-0`;
      } else if (tpr) {
        to = `<=${tM}.${tm}.${tp}-${tpr}`;
      } else if (options?.includePrerelease) {
        to = `<${tM}.${tm}.${+tp + 1}-0`;
      } else {
        to = `<=${to}`;
      }
      return `${from} ${to}`.trim();
    });
  }
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/shimmer.js
var require_shimmer = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.massUnwrap = exports.unwrap = exports.massWrap = exports.wrap = undefined;
  var logger = console.error.bind(console);
  function defineProperty(obj, name, value) {
    const enumerable = !!obj[name] && Object.prototype.propertyIsEnumerable.call(obj, name);
    Object.defineProperty(obj, name, {
      configurable: true,
      enumerable,
      writable: true,
      value
    });
  }
  var wrap = (nodule, name, wrapper) => {
    if (!nodule || !nodule[name]) {
      logger("no original function " + String(name) + " to wrap");
      return;
    }
    if (!wrapper) {
      logger("no wrapper function");
      logger(new Error().stack);
      return;
    }
    const original = nodule[name];
    if (typeof original !== "function" || typeof wrapper !== "function") {
      logger("original object and wrapper must be functions");
      return;
    }
    const wrapped = wrapper(original, name);
    defineProperty(wrapped, "__original", original);
    defineProperty(wrapped, "__unwrap", () => {
      if (nodule[name] === wrapped) {
        defineProperty(nodule, name, original);
      }
    });
    defineProperty(wrapped, "__wrapped", true);
    defineProperty(nodule, name, wrapped);
    return wrapped;
  };
  exports.wrap = wrap;
  var massWrap = (nodules, names, wrapper) => {
    if (!nodules) {
      logger("must provide one or more modules to patch");
      logger(new Error().stack);
      return;
    } else if (!Array.isArray(nodules)) {
      nodules = [nodules];
    }
    if (!(names && Array.isArray(names))) {
      logger("must provide one or more functions to wrap on modules");
      return;
    }
    nodules.forEach((nodule) => {
      names.forEach((name) => {
        (0, exports.wrap)(nodule, name, wrapper);
      });
    });
  };
  exports.massWrap = massWrap;
  var unwrap = (nodule, name) => {
    if (!nodule || !nodule[name]) {
      logger("no function to unwrap.");
      logger(new Error().stack);
      return;
    }
    const wrapped = nodule[name];
    if (!wrapped.__unwrap) {
      logger("no original to unwrap to -- has " + String(name) + " already been unwrapped?");
    } else {
      wrapped.__unwrap();
      return;
    }
  };
  exports.unwrap = unwrap;
  var massUnwrap = (nodules, names) => {
    if (!nodules) {
      logger("must provide one or more modules to patch");
      logger(new Error().stack);
      return;
    } else if (!Array.isArray(nodules)) {
      nodules = [nodules];
    }
    if (!(names && Array.isArray(names))) {
      logger("must provide one or more functions to unwrap on modules");
      return;
    }
    nodules.forEach((nodule) => {
      names.forEach((name) => {
        (0, exports.unwrap)(nodule, name);
      });
    });
  };
  exports.massUnwrap = massUnwrap;
  function shimmer(options) {
    if (options && options.logger) {
      if (typeof options.logger !== "function") {
        logger("new logger isn't a function, not replacing");
      } else {
        logger = options.logger;
      }
    }
  }
  exports.default = shimmer;
  shimmer.wrap = exports.wrap;
  shimmer.massWrap = exports.massWrap;
  shimmer.unwrap = exports.unwrap;
  shimmer.massUnwrap = exports.massUnwrap;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/instrumentation.js
var require_instrumentation = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.InstrumentationAbstract = undefined;
  var api_1 = require_src();
  var api_logs_1 = require_src4();
  var shimmer = require_shimmer();

  class InstrumentationAbstract {
    _config = {};
    _tracer;
    _meter;
    _logger;
    _diag;
    instrumentationName;
    instrumentationVersion;
    constructor(instrumentationName, instrumentationVersion, config) {
      this.instrumentationName = instrumentationName;
      this.instrumentationVersion = instrumentationVersion;
      this.setConfig(config);
      this._diag = api_1.diag.createComponentLogger({
        namespace: instrumentationName
      });
      this._tracer = api_1.trace.getTracer(instrumentationName, instrumentationVersion);
      this._meter = api_1.metrics.getMeter(instrumentationName, instrumentationVersion);
      this._logger = api_logs_1.logs.getLogger(instrumentationName, instrumentationVersion);
      this._updateMetricInstruments();
    }
    _wrap = shimmer.wrap;
    _unwrap = shimmer.unwrap;
    _massWrap = shimmer.massWrap;
    _massUnwrap = shimmer.massUnwrap;
    get meter() {
      return this._meter;
    }
    setMeterProvider(meterProvider) {
      this._meter = meterProvider.getMeter(this.instrumentationName, this.instrumentationVersion);
      this._updateMetricInstruments();
    }
    get logger() {
      return this._logger;
    }
    setLoggerProvider(loggerProvider) {
      this._logger = loggerProvider.getLogger(this.instrumentationName, this.instrumentationVersion);
    }
    getModuleDefinitions() {
      const initResult = this.init() ?? [];
      if (!Array.isArray(initResult)) {
        return [initResult];
      }
      return initResult;
    }
    _updateMetricInstruments() {
      return;
    }
    getConfig() {
      return this._config;
    }
    setConfig(config) {
      this._config = {
        enabled: true,
        ...config
      };
    }
    setTracerProvider(tracerProvider) {
      this._tracer = tracerProvider.getTracer(this.instrumentationName, this.instrumentationVersion);
    }
    get tracer() {
      return this._tracer;
    }
    _runSpanCustomizationHook(hookHandler, triggerName, span, info) {
      if (!hookHandler) {
        return;
      }
      try {
        hookHandler(span, info);
      } catch (e) {
        this._diag.error(`Error running span customization hook due to exception in handler`, { triggerName }, e);
      }
    }
  }
  exports.InstrumentationAbstract = InstrumentationAbstract;
});

// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
var require_ms = __commonJS((exports, module) => {
  var s = 1000;
  var m = s * 60;
  var h = m * 60;
  var d = h * 24;
  var w = d * 7;
  var y = d * 365.25;
  module.exports = function(val, options) {
    options = options || {};
    var type = typeof val;
    if (type === "string" && val.length > 0) {
      return parse(val);
    } else if (type === "number" && isFinite(val)) {
      return options.long ? fmtLong(val) : fmtShort(val);
    }
    throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
  };
  function parse(str) {
    str = String(str);
    if (str.length > 100) {
      return;
    }
    var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
    if (!match) {
      return;
    }
    var n = parseFloat(match[1]);
    var type = (match[2] || "ms").toLowerCase();
    switch (type) {
      case "years":
      case "year":
      case "yrs":
      case "yr":
      case "y":
        return n * y;
      case "weeks":
      case "week":
      case "w":
        return n * w;
      case "days":
      case "day":
      case "d":
        return n * d;
      case "hours":
      case "hour":
      case "hrs":
      case "hr":
      case "h":
        return n * h;
      case "minutes":
      case "minute":
      case "mins":
      case "min":
      case "m":
        return n * m;
      case "seconds":
      case "second":
      case "secs":
      case "sec":
      case "s":
        return n * s;
      case "milliseconds":
      case "millisecond":
      case "msecs":
      case "msec":
      case "ms":
        return n;
      default:
        return;
    }
  }
  function fmtShort(ms) {
    var msAbs = Math.abs(ms);
    if (msAbs >= d) {
      return Math.round(ms / d) + "d";
    }
    if (msAbs >= h) {
      return Math.round(ms / h) + "h";
    }
    if (msAbs >= m) {
      return Math.round(ms / m) + "m";
    }
    if (msAbs >= s) {
      return Math.round(ms / s) + "s";
    }
    return ms + "ms";
  }
  function fmtLong(ms) {
    var msAbs = Math.abs(ms);
    if (msAbs >= d) {
      return plural(ms, msAbs, d, "day");
    }
    if (msAbs >= h) {
      return plural(ms, msAbs, h, "hour");
    }
    if (msAbs >= m) {
      return plural(ms, msAbs, m, "minute");
    }
    if (msAbs >= s) {
      return plural(ms, msAbs, s, "second");
    }
    return ms + " ms";
  }
  function plural(ms, msAbs, n, name) {
    var isPlural = msAbs >= n * 1.5;
    return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
  }
});

// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
var require_common = __commonJS((exports, module) => {
  function setup(env) {
    createDebug.debug = createDebug;
    createDebug.default = createDebug;
    createDebug.coerce = coerce;
    createDebug.disable = disable;
    createDebug.enable = enable;
    createDebug.enabled = enabled;
    createDebug.humanize = require_ms();
    createDebug.destroy = destroy;
    Object.keys(env).forEach((key) => {
      createDebug[key] = env[key];
    });
    createDebug.names = [];
    createDebug.skips = [];
    createDebug.formatters = {};
    function selectColor(namespace) {
      let hash = 0;
      for (let i = 0;i < namespace.length; i++) {
        hash = (hash << 5) - hash + namespace.charCodeAt(i);
        hash |= 0;
      }
      return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
    }
    createDebug.selectColor = selectColor;
    function createDebug(namespace) {
      let prevTime;
      let enableOverride = null;
      let namespacesCache;
      let enabledCache;
      function debug(...args) {
        if (!debug.enabled) {
          return;
        }
        const self2 = debug;
        const curr = Number(new Date);
        const ms = curr - (prevTime || curr);
        self2.diff = ms;
        self2.prev = prevTime;
        self2.curr = curr;
        prevTime = curr;
        args[0] = createDebug.coerce(args[0]);
        if (typeof args[0] !== "string") {
          args.unshift("%O");
        }
        let index = 0;
        args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
          if (match === "%%") {
            return "%";
          }
          index++;
          const formatter = createDebug.formatters[format];
          if (typeof formatter === "function") {
            const val = args[index];
            match = formatter.call(self2, val);
            args.splice(index, 1);
            index--;
          }
          return match;
        });
        createDebug.formatArgs.call(self2, args);
        const logFn = self2.log || createDebug.log;
        logFn.apply(self2, args);
      }
      debug.namespace = namespace;
      debug.useColors = createDebug.useColors();
      debug.color = createDebug.selectColor(namespace);
      debug.extend = extend;
      debug.destroy = createDebug.destroy;
      Object.defineProperty(debug, "enabled", {
        enumerable: true,
        configurable: false,
        get: () => {
          if (enableOverride !== null) {
            return enableOverride;
          }
          if (namespacesCache !== createDebug.namespaces) {
            namespacesCache = createDebug.namespaces;
            enabledCache = createDebug.enabled(namespace);
          }
          return enabledCache;
        },
        set: (v) => {
          enableOverride = v;
        }
      });
      if (typeof createDebug.init === "function") {
        createDebug.init(debug);
      }
      return debug;
    }
    function extend(namespace, delimiter) {
      const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
      newDebug.log = this.log;
      return newDebug;
    }
    function enable(namespaces) {
      createDebug.save(namespaces);
      createDebug.namespaces = namespaces;
      createDebug.names = [];
      createDebug.skips = [];
      const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
      for (const ns of split) {
        if (ns[0] === "-") {
          createDebug.skips.push(ns.slice(1));
        } else {
          createDebug.names.push(ns);
        }
      }
    }
    function matchesTemplate(search, template) {
      let searchIndex = 0;
      let templateIndex = 0;
      let starIndex = -1;
      let matchIndex = 0;
      while (searchIndex < search.length) {
        if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
          if (template[templateIndex] === "*") {
            starIndex = templateIndex;
            matchIndex = searchIndex;
            templateIndex++;
          } else {
            searchIndex++;
            templateIndex++;
          }
        } else if (starIndex !== -1) {
          templateIndex = starIndex + 1;
          matchIndex++;
          searchIndex = matchIndex;
        } else {
          return false;
        }
      }
      while (templateIndex < template.length && template[templateIndex] === "*") {
        templateIndex++;
      }
      return templateIndex === template.length;
    }
    function disable() {
      const namespaces = [
        ...createDebug.names,
        ...createDebug.skips.map((namespace) => "-" + namespace)
      ].join(",");
      createDebug.enable("");
      return namespaces;
    }
    function enabled(name) {
      for (const skip of createDebug.skips) {
        if (matchesTemplate(name, skip)) {
          return false;
        }
      }
      for (const ns of createDebug.names) {
        if (matchesTemplate(name, ns)) {
          return true;
        }
      }
      return false;
    }
    function coerce(val) {
      if (val instanceof Error) {
        return val.stack || val.message;
      }
      return val;
    }
    function destroy() {
      console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
    }
    createDebug.enable(createDebug.load());
    return createDebug;
  }
  module.exports = setup;
});

// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
var require_browser = __commonJS((exports, module) => {
  exports.formatArgs = formatArgs;
  exports.save = save;
  exports.load = load;
  exports.useColors = useColors;
  exports.storage = localstorage();
  exports.destroy = (() => {
    let warned = false;
    return () => {
      if (!warned) {
        warned = true;
        console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
      }
    };
  })();
  exports.colors = [
    "#0000CC",
    "#0000FF",
    "#0033CC",
    "#0033FF",
    "#0066CC",
    "#0066FF",
    "#0099CC",
    "#0099FF",
    "#00CC00",
    "#00CC33",
    "#00CC66",
    "#00CC99",
    "#00CCCC",
    "#00CCFF",
    "#3300CC",
    "#3300FF",
    "#3333CC",
    "#3333FF",
    "#3366CC",
    "#3366FF",
    "#3399CC",
    "#3399FF",
    "#33CC00",
    "#33CC33",
    "#33CC66",
    "#33CC99",
    "#33CCCC",
    "#33CCFF",
    "#6600CC",
    "#6600FF",
    "#6633CC",
    "#6633FF",
    "#66CC00",
    "#66CC33",
    "#9900CC",
    "#9900FF",
    "#9933CC",
    "#9933FF",
    "#99CC00",
    "#99CC33",
    "#CC0000",
    "#CC0033",
    "#CC0066",
    "#CC0099",
    "#CC00CC",
    "#CC00FF",
    "#CC3300",
    "#CC3333",
    "#CC3366",
    "#CC3399",
    "#CC33CC",
    "#CC33FF",
    "#CC6600",
    "#CC6633",
    "#CC9900",
    "#CC9933",
    "#CCCC00",
    "#CCCC33",
    "#FF0000",
    "#FF0033",
    "#FF0066",
    "#FF0099",
    "#FF00CC",
    "#FF00FF",
    "#FF3300",
    "#FF3333",
    "#FF3366",
    "#FF3399",
    "#FF33CC",
    "#FF33FF",
    "#FF6600",
    "#FF6633",
    "#FF9900",
    "#FF9933",
    "#FFCC00",
    "#FFCC33"
  ];
  function useColors() {
    if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
      return true;
    }
    if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
      return false;
    }
    let m;
    return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  }
  function formatArgs(args) {
    args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
    if (!this.useColors) {
      return;
    }
    const c = "color: " + this.color;
    args.splice(1, 0, c, "color: inherit");
    let index = 0;
    let lastC = 0;
    args[0].replace(/%[a-zA-Z%]/g, (match) => {
      if (match === "%%") {
        return;
      }
      index++;
      if (match === "%c") {
        lastC = index;
      }
    });
    args.splice(lastC, 0, c);
  }
  exports.log = console.debug || console.log || (() => {});
  function save(namespaces) {
    try {
      if (namespaces) {
        exports.storage.setItem("debug", namespaces);
      } else {
        exports.storage.removeItem("debug");
      }
    } catch (error) {}
  }
  function load() {
    let r;
    try {
      r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
    } catch (error) {}
    if (!r && typeof process !== "undefined" && "env" in process) {
      r = process.env.DEBUG;
    }
    return r;
  }
  function localstorage() {
    try {
      return localStorage;
    } catch (error) {}
  }
  module.exports = require_common()(exports);
  var { formatters } = module.exports;
  formatters.j = function(v) {
    try {
      return JSON.stringify(v);
    } catch (error) {
      return "[UnexpectedJSONParseError]: " + error.message;
    }
  };
});

// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
var require_has_flag = __commonJS((exports, module) => {
  module.exports = (flag, argv = process.argv) => {
    const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
    const position = argv.indexOf(prefix + flag);
    const terminatorPosition = argv.indexOf("--");
    return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
  };
});

// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
var require_supports_color = __commonJS((exports, module) => {
  var os = __require("os");
  var tty = __require("tty");
  var hasFlag = require_has_flag();
  var { env } = process;
  var forceColor;
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
    forceColor = 0;
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
    forceColor = 1;
  }
  if ("FORCE_COLOR" in env) {
    if (env.FORCE_COLOR === "true") {
      forceColor = 1;
    } else if (env.FORCE_COLOR === "false") {
      forceColor = 0;
    } else {
      forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
    }
  }
  function translateLevel(level) {
    if (level === 0) {
      return false;
    }
    return {
      level,
      hasBasic: true,
      has256: level >= 2,
      has16m: level >= 3
    };
  }
  function supportsColor(haveStream, streamIsTTY) {
    if (forceColor === 0) {
      return 0;
    }
    if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
      return 3;
    }
    if (hasFlag("color=256")) {
      return 2;
    }
    if (haveStream && !streamIsTTY && forceColor === undefined) {
      return 0;
    }
    const min = forceColor || 0;
    if (env.TERM === "dumb") {
      return min;
    }
    if (process.platform === "win32") {
      const osRelease = os.release().split(".");
      if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
        return Number(osRelease[2]) >= 14931 ? 3 : 2;
      }
      return 1;
    }
    if ("CI" in env) {
      if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
        return 1;
      }
      return min;
    }
    if ("TEAMCITY_VERSION" in env) {
      return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
    }
    if (env.COLORTERM === "truecolor") {
      return 3;
    }
    if ("TERM_PROGRAM" in env) {
      const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
      switch (env.TERM_PROGRAM) {
        case "iTerm.app":
          return version >= 3 ? 3 : 2;
        case "Apple_Terminal":
          return 2;
      }
    }
    if (/-256(color)?$/i.test(env.TERM)) {
      return 2;
    }
    if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
      return 1;
    }
    if ("COLORTERM" in env) {
      return 1;
    }
    return min;
  }
  function getSupportLevel(stream) {
    const level = supportsColor(stream, stream && stream.isTTY);
    return translateLevel(level);
  }
  module.exports = {
    supportsColor: getSupportLevel,
    stdout: translateLevel(supportsColor(true, tty.isatty(1))),
    stderr: translateLevel(supportsColor(true, tty.isatty(2)))
  };
});

// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
var require_node3 = __commonJS((exports, module) => {
  var tty = __require("tty");
  var util = __require("util");
  exports.init = init;
  exports.log = log;
  exports.formatArgs = formatArgs;
  exports.save = save;
  exports.load = load;
  exports.useColors = useColors;
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
  exports.colors = [6, 2, 3, 4, 5, 1];
  try {
    const supportsColor = require_supports_color();
    if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
      exports.colors = [
        20,
        21,
        26,
        27,
        32,
        33,
        38,
        39,
        40,
        41,
        42,
        43,
        44,
        45,
        56,
        57,
        62,
        63,
        68,
        69,
        74,
        75,
        76,
        77,
        78,
        79,
        80,
        81,
        92,
        93,
        98,
        99,
        112,
        113,
        128,
        129,
        134,
        135,
        148,
        149,
        160,
        161,
        162,
        163,
        164,
        165,
        166,
        167,
        168,
        169,
        170,
        171,
        172,
        173,
        178,
        179,
        184,
        185,
        196,
        197,
        198,
        199,
        200,
        201,
        202,
        203,
        204,
        205,
        206,
        207,
        208,
        209,
        214,
        215,
        220,
        221
      ];
    }
  } catch (error) {}
  exports.inspectOpts = Object.keys(process.env).filter((key) => {
    return /^debug_/i.test(key);
  }).reduce((obj, key) => {
    const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
      return k.toUpperCase();
    });
    let val = process.env[key];
    if (/^(yes|on|true|enabled)$/i.test(val)) {
      val = true;
    } else if (/^(no|off|false|disabled)$/i.test(val)) {
      val = false;
    } else if (val === "null") {
      val = null;
    } else {
      val = Number(val);
    }
    obj[prop] = val;
    return obj;
  }, {});
  function useColors() {
    return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
  }
  function formatArgs(args) {
    const { namespace: name, useColors: useColors2 } = this;
    if (useColors2) {
      const c = this.color;
      const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
      const prefix = `  ${colorCode};1m${name} \x1B[0m`;
      args[0] = prefix + args[0].split(`
`).join(`
` + prefix);
      args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
    } else {
      args[0] = getDate() + name + " " + args[0];
    }
  }
  function getDate() {
    if (exports.inspectOpts.hideDate) {
      return "";
    }
    return new Date().toISOString() + " ";
  }
  function log(...args) {
    return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
`);
  }
  function save(namespaces) {
    if (namespaces) {
      process.env.DEBUG = namespaces;
    } else {
      delete process.env.DEBUG;
    }
  }
  function load() {
    return process.env.DEBUG;
  }
  function init(debug) {
    debug.inspectOpts = {};
    const keys = Object.keys(exports.inspectOpts);
    for (let i = 0;i < keys.length; i++) {
      debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
    }
  }
  module.exports = require_common()(exports);
  var { formatters } = module.exports;
  formatters.o = function(v) {
    this.inspectOpts.colors = this.useColors;
    return util.inspect(v, this.inspectOpts).split(`
`).map((str) => str.trim()).join(" ");
  };
  formatters.O = function(v) {
    this.inspectOpts.colors = this.useColors;
    return util.inspect(v, this.inspectOpts);
  };
});

// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
var require_src5 = __commonJS((exports, module) => {
  if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
    module.exports = require_browser();
  } else {
    module.exports = require_node3();
  }
});

// ../../node_modules/.pnpm/module-details-from-path@1.0.4/node_modules/module-details-from-path/index.js
var require_module_details_from_path = __commonJS((exports, module) => {
  var sep = __require("path").sep;
  module.exports = function(file) {
    var segments = file.split(sep);
    var index = segments.lastIndexOf("node_modules");
    if (index === -1)
      return;
    if (!segments[index + 1])
      return;
    var scoped = segments[index + 1][0] === "@";
    var name = scoped ? segments[index + 1] + "/" + segments[index + 2] : segments[index + 1];
    var offset = scoped ? 3 : 2;
    var basedir = "";
    var lastBaseDirSegmentIndex = index + offset - 1;
    for (var i = 0;i <= lastBaseDirSegmentIndex; i++) {
      if (i === lastBaseDirSegmentIndex) {
        basedir += segments[i];
      } else {
        basedir += segments[i] + sep;
      }
    }
    var path = "";
    var lastSegmentIndex = segments.length - 1;
    for (var i2 = index + offset;i2 <= lastSegmentIndex; i2++) {
      if (i2 === lastSegmentIndex) {
        path += segments[i2];
      } else {
        path += segments[i2] + sep;
      }
    }
    return {
      name,
      basedir,
      path
    };
  };
});

// ../../node_modules/.pnpm/require-in-the-middle@8.0.1/node_modules/require-in-the-middle/index.js
var require_require_in_the_middle = __commonJS((exports, module) => {
  var path = __require("path");
  var Module = __require("module");
  var debug = require_src5()("require-in-the-middle");
  var moduleDetailsFromPath = require_module_details_from_path();
  module.exports = Hook;
  module.exports.Hook = Hook;
  var builtinModules;
  var isCore;
  if (Module.isBuiltin) {
    isCore = Module.isBuiltin;
  } else if (Module.builtinModules) {
    isCore = (moduleName) => {
      if (moduleName.startsWith("node:")) {
        return true;
      }
      if (builtinModules === undefined) {
        builtinModules = new Set(Module.builtinModules);
      }
      return builtinModules.has(moduleName);
    };
  } else {
    throw new Error("'require-in-the-middle' requires Node.js >=v9.3.0 or >=v8.10.0");
  }
  var normalize = /([/\\]index)?(\.js)?$/;

  class ExportsCache {
    constructor() {
      this._localCache = new Map;
      this._kRitmExports = Symbol("RitmExports");
    }
    has(filename, isBuiltin) {
      if (this._localCache.has(filename)) {
        return true;
      } else if (!isBuiltin) {
        const mod = __require.cache[filename];
        return !!(mod && (this._kRitmExports in mod));
      } else {
        return false;
      }
    }
    get(filename, isBuiltin) {
      const cachedExports = this._localCache.get(filename);
      if (cachedExports !== undefined) {
        return cachedExports;
      } else if (!isBuiltin) {
        const mod = __require.cache[filename];
        return mod && mod[this._kRitmExports];
      }
    }
    set(filename, exports2, isBuiltin) {
      if (isBuiltin) {
        this._localCache.set(filename, exports2);
      } else if (filename in __require.cache) {
        __require.cache[filename][this._kRitmExports] = exports2;
      } else {
        debug('non-core module is unexpectedly not in require.cache: "%s"', filename);
        this._localCache.set(filename, exports2);
      }
    }
  }
  function Hook(modules, options, onrequire) {
    if (this instanceof Hook === false)
      return new Hook(modules, options, onrequire);
    if (typeof modules === "function") {
      onrequire = modules;
      modules = null;
      options = null;
    } else if (typeof options === "function") {
      onrequire = options;
      options = null;
    }
    if (typeof Module._resolveFilename !== "function") {
      console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!", typeof Module._resolveFilename);
      console.error("Please report this error as an issue related to Node.js %s at https://github.com/nodejs/require-in-the-middle/issues", process.version);
      return;
    }
    this._cache = new ExportsCache;
    this._unhooked = false;
    this._origRequire = Module.prototype.require;
    const self2 = this;
    const patching = new Set;
    const internals = options ? options.internals === true : false;
    const hasWhitelist = Array.isArray(modules);
    debug("registering require hook");
    this._require = Module.prototype.require = function(id) {
      if (self2._unhooked === true) {
        debug("ignoring require call - module is soft-unhooked");
        return self2._origRequire.apply(this, arguments);
      }
      return patchedRequire.call(this, arguments, false);
    };
    if (typeof process.getBuiltinModule === "function") {
      this._origGetBuiltinModule = process.getBuiltinModule;
      this._getBuiltinModule = process.getBuiltinModule = function(id) {
        if (self2._unhooked === true) {
          debug("ignoring process.getBuiltinModule call - module is soft-unhooked");
          return self2._origGetBuiltinModule.apply(this, arguments);
        }
        return patchedRequire.call(this, arguments, true);
      };
    }
    function patchedRequire(args, coreOnly) {
      const id = args[0];
      const core = isCore(id);
      let filename;
      if (core) {
        filename = id;
        if (id.startsWith("node:")) {
          const idWithoutPrefix = id.slice(5);
          if (isCore(idWithoutPrefix)) {
            filename = idWithoutPrefix;
          }
        }
      } else if (coreOnly) {
        debug("call to process.getBuiltinModule with unknown built-in id");
        return self2._origGetBuiltinModule.apply(this, args);
      } else {
        try {
          filename = Module._resolveFilename(id, this);
        } catch (resolveErr) {
          debug('Module._resolveFilename("%s") threw %j, calling original Module.require', id, resolveErr.message);
          return self2._origRequire.apply(this, args);
        }
      }
      let moduleName, basedir;
      debug("processing %s module require('%s'): %s", core === true ? "core" : "non-core", id, filename);
      if (self2._cache.has(filename, core) === true) {
        debug("returning already patched cached module: %s", filename);
        return self2._cache.get(filename, core);
      }
      const isPatching = patching.has(filename);
      if (isPatching === false) {
        patching.add(filename);
      }
      const exports2 = coreOnly ? self2._origGetBuiltinModule.apply(this, args) : self2._origRequire.apply(this, args);
      if (isPatching === true) {
        debug("module is in the process of being patched already - ignoring: %s", filename);
        return exports2;
      }
      patching.delete(filename);
      if (core === true) {
        if (hasWhitelist === true && modules.includes(filename) === false) {
          debug("ignoring core module not on whitelist: %s", filename);
          return exports2;
        }
        moduleName = filename;
      } else if (hasWhitelist === true && modules.includes(filename)) {
        const parsedPath = path.parse(filename);
        moduleName = parsedPath.name;
        basedir = parsedPath.dir;
      } else {
        const stat = moduleDetailsFromPath(filename);
        if (stat === undefined) {
          debug("could not parse filename: %s", filename);
          return exports2;
        }
        moduleName = stat.name;
        basedir = stat.basedir;
        const fullModuleName = resolveModuleName(stat);
        debug("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)", moduleName, id, fullModuleName, basedir);
        let matchFound = false;
        if (hasWhitelist) {
          if (!id.startsWith(".") && modules.includes(id)) {
            moduleName = id;
            matchFound = true;
          }
          if (!modules.includes(moduleName) && !modules.includes(fullModuleName)) {
            return exports2;
          }
          if (modules.includes(fullModuleName) && fullModuleName !== moduleName) {
            moduleName = fullModuleName;
            matchFound = true;
          }
        }
        if (!matchFound) {
          let res;
          try {
            res = __require.resolve(moduleName, { paths: [basedir] });
          } catch (e) {
            debug("could not resolve module: %s", moduleName);
            self2._cache.set(filename, exports2, core);
            return exports2;
          }
          if (res !== filename) {
            if (internals === true) {
              moduleName = moduleName + path.sep + path.relative(basedir, filename);
              debug("preparing to process require of internal file: %s", moduleName);
            } else {
              debug("ignoring require of non-main module file: %s", res);
              self2._cache.set(filename, exports2, core);
              return exports2;
            }
          }
        }
      }
      self2._cache.set(filename, exports2, core);
      debug("calling require hook: %s", moduleName);
      const patchedExports = onrequire(exports2, moduleName, basedir);
      self2._cache.set(filename, patchedExports, core);
      debug("returning module: %s", moduleName);
      return patchedExports;
    }
  }
  Hook.prototype.unhook = function() {
    this._unhooked = true;
    if (this._require === Module.prototype.require) {
      Module.prototype.require = this._origRequire;
      debug("require unhook successful");
    } else {
      debug("require unhook unsuccessful");
    }
    if (process.getBuiltinModule !== undefined) {
      if (this._getBuiltinModule === process.getBuiltinModule) {
        process.getBuiltinModule = this._origGetBuiltinModule;
        debug("process.getBuiltinModule unhook successful");
      } else {
        debug("process.getBuiltinModule unhook unsuccessful");
      }
    }
  };
  function resolveModuleName(stat) {
    const normalizedPath = path.sep !== "/" ? stat.path.split(path.sep).join("/") : stat.path;
    return path.posix.join(stat.name, normalizedPath).replace(normalize, "");
  }
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/platform/node/ModuleNameTrie.js
var require_ModuleNameTrie = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ModuleNameTrie = exports.ModuleNameSeparator = undefined;
  exports.ModuleNameSeparator = "/";

  class ModuleNameTrieNode {
    hooks = [];
    children = new Map;
  }

  class ModuleNameTrie {
    _trie = new ModuleNameTrieNode;
    _counter = 0;
    insert(hook) {
      let trieNode = this._trie;
      for (const moduleNamePart of hook.moduleName.split(exports.ModuleNameSeparator)) {
        let nextNode = trieNode.children.get(moduleNamePart);
        if (!nextNode) {
          nextNode = new ModuleNameTrieNode;
          trieNode.children.set(moduleNamePart, nextNode);
        }
        trieNode = nextNode;
      }
      trieNode.hooks.push({ hook, insertedId: this._counter++ });
    }
    search(moduleName, { maintainInsertionOrder, fullOnly } = {}) {
      let trieNode = this._trie;
      const results = [];
      let foundFull = true;
      for (const moduleNamePart of moduleName.split(exports.ModuleNameSeparator)) {
        const nextNode = trieNode.children.get(moduleNamePart);
        if (!nextNode) {
          foundFull = false;
          break;
        }
        if (!fullOnly) {
          results.push(...nextNode.hooks);
        }
        trieNode = nextNode;
      }
      if (fullOnly && foundFull) {
        results.push(...trieNode.hooks);
      }
      if (results.length === 0) {
        return [];
      }
      if (results.length === 1) {
        return [results[0].hook];
      }
      if (maintainInsertionOrder) {
        results.sort((a, b) => a.insertedId - b.insertedId);
      }
      return results.map(({ hook }) => hook);
    }
  }
  exports.ModuleNameTrie = ModuleNameTrie;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/platform/node/RequireInTheMiddleSingleton.js
var require_RequireInTheMiddleSingleton = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.RequireInTheMiddleSingleton = undefined;
  var require_in_the_middle_1 = require_require_in_the_middle();
  var path = __require("path");
  var ModuleNameTrie_1 = require_ModuleNameTrie();
  var isMocha = [
    "afterEach",
    "after",
    "beforeEach",
    "before",
    "describe",
    "it"
  ].every((fn) => {
    return typeof global[fn] === "function";
  });

  class RequireInTheMiddleSingleton {
    _moduleNameTrie = new ModuleNameTrie_1.ModuleNameTrie;
    static _instance;
    constructor() {
      this._initialize();
    }
    _initialize() {
      new require_in_the_middle_1.Hook(null, { internals: true }, (exports2, name, basedir) => {
        const normalizedModuleName = normalizePathSeparators(name);
        const matches = this._moduleNameTrie.search(normalizedModuleName, {
          maintainInsertionOrder: true,
          fullOnly: basedir === undefined
        });
        for (const { onRequire } of matches) {
          exports2 = onRequire(exports2, name, basedir);
        }
        return exports2;
      });
    }
    register(moduleName, onRequire) {
      const hooked = { moduleName, onRequire };
      this._moduleNameTrie.insert(hooked);
      return hooked;
    }
    static getInstance() {
      if (isMocha)
        return new RequireInTheMiddleSingleton;
      return this._instance = this._instance ?? new RequireInTheMiddleSingleton;
    }
  }
  exports.RequireInTheMiddleSingleton = RequireInTheMiddleSingleton;
  function normalizePathSeparators(moduleNameOrPath) {
    return path.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
  }
});

// ../../node_modules/.pnpm/import-in-the-middle@3.0.0/node_modules/import-in-the-middle/lib/register.js
var require_register = __commonJS((exports) => {
  var importHooks = [];
  var setters = new WeakMap;
  var getters = new WeakMap;
  var specifiers = new Map;
  var toHook = [];
  var proxyHandler = {
    set(target, name, value) {
      const set = setters.get(target);
      const setter = set && set[name];
      if (typeof setter === "function") {
        return setter(value);
      }
      return true;
    },
    get(target, name) {
      if (name === Symbol.toStringTag) {
        return "Module";
      }
      const getter = getters.get(target)[name];
      if (typeof getter === "function") {
        return getter();
      }
    },
    defineProperty(target, property, descriptor) {
      if (!("value" in descriptor)) {
        throw new Error("Getters/setters are not supported for exports property descriptors.");
      }
      const set = setters.get(target);
      const setter = set && set[property];
      if (typeof setter === "function") {
        return setter(descriptor.value);
      }
      return true;
    }
  };
  function register(name, namespace, set, get, specifier) {
    specifiers.set(name, specifier);
    setters.set(namespace, set);
    getters.set(namespace, get);
    const proxy = new Proxy(namespace, proxyHandler);
    importHooks.forEach((hook) => hook(name, proxy, specifier));
    toHook.push([name, proxy, specifier]);
  }
  exports.register = register;
  exports.importHooks = importHooks;
  exports.specifiers = specifiers;
  exports.toHook = toHook;
});

// ../../node_modules/.pnpm/import-in-the-middle@3.0.0/node_modules/import-in-the-middle/index.js
var require_import_in_the_middle = __commonJS((exports, module) => {
  var path = __require("path");
  var moduleDetailsFromPath = require_module_details_from_path();
  var { fileURLToPath } = __require("url");
  var { MessageChannel: MessageChannel2 } = __require("worker_threads");
  var { isBuiltin } = __require("module");
  if (!isBuiltin) {
    isBuiltin = () => true;
  }
  var {
    importHooks,
    specifiers,
    toHook
  } = require_register();
  function addHook(hook) {
    importHooks.push(hook);
    toHook.forEach(([name, namespace, specifier]) => hook(name, namespace, specifier));
  }
  function removeHook(hook) {
    const index = importHooks.indexOf(hook);
    if (index > -1) {
      importHooks.splice(index, 1);
    }
  }
  function callHookFn(hookFn, namespace, name, baseDir) {
    const newDefault = hookFn(namespace, name, baseDir);
    if (newDefault && newDefault !== namespace) {
      if ("default" in namespace) {
        namespace.default = newDefault;
      }
    }
  }
  var sendModulesToLoader;
  function createAddHookMessageChannel() {
    const { port1, port2 } = new MessageChannel2;
    let pendingAckCount = 0;
    let resolveFn;
    sendModulesToLoader = (modules) => {
      pendingAckCount++;
      port1.postMessage(modules);
    };
    port1.on("message", () => {
      pendingAckCount--;
      if (resolveFn && pendingAckCount <= 0) {
        resolveFn();
      }
    }).unref();
    function waitForAllMessagesAcknowledged() {
      const timer = setInterval(() => {}, 1000);
      const promise = new Promise((resolve) => {
        resolveFn = resolve;
      }).then(() => {
        clearInterval(timer);
      });
      if (pendingAckCount === 0) {
        resolveFn();
      }
      return promise;
    }
    const addHookMessagePort = port2;
    const registerOptions = { data: { addHookMessagePort, include: [] }, transferList: [addHookMessagePort] };
    return { registerOptions, addHookMessagePort, waitForAllMessagesAcknowledged };
  }
  function Hook(modules, options, hookFn) {
    if (this instanceof Hook === false)
      return new Hook(modules, options, hookFn);
    if (typeof modules === "function") {
      hookFn = modules;
      modules = null;
      options = null;
    } else if (typeof options === "function") {
      hookFn = options;
      options = null;
    }
    const internals = options ? options.internals === true : false;
    if (sendModulesToLoader && Array.isArray(modules)) {
      sendModulesToLoader(modules);
    }
    this._iitmHook = (name, namespace, specifier) => {
      const loadUrl = name;
      const isNodeUrl = loadUrl.startsWith("node:");
      let filePath, baseDir;
      if (isNodeUrl) {
        const unprefixed = name.slice(5);
        if (isBuiltin(unprefixed)) {
          name = unprefixed;
        }
      } else if (loadUrl.startsWith("file://")) {
        const stackTraceLimit = Error.stackTraceLimit;
        Error.stackTraceLimit = 0;
        try {
          filePath = fileURLToPath(name);
          name = filePath;
        } catch (e) {}
        Error.stackTraceLimit = stackTraceLimit;
        if (filePath) {
          const details = moduleDetailsFromPath(filePath);
          if (details) {
            name = details.name;
            baseDir = details.basedir;
          }
        }
      }
      if (modules) {
        for (const matchArg of modules) {
          if (filePath && matchArg === filePath) {
            callHookFn(hookFn, namespace, filePath, undefined);
          } else if (matchArg === name) {
            if (!baseDir) {
              callHookFn(hookFn, namespace, name, baseDir);
            } else if (baseDir.endsWith(specifiers.get(loadUrl))) {
              callHookFn(hookFn, namespace, name, baseDir);
            } else if (internals) {
              const internalPath = name + path.sep + path.relative(baseDir, filePath);
              callHookFn(hookFn, namespace, internalPath, baseDir);
            }
          } else if (matchArg === specifier) {
            callHookFn(hookFn, namespace, specifier, baseDir);
          }
        }
      } else {
        callHookFn(hookFn, namespace, name, baseDir);
      }
    };
    addHook(this._iitmHook);
  }
  Hook.prototype.unhook = function() {
    removeHook(this._iitmHook);
  };
  module.exports = Hook;
  module.exports.Hook = Hook;
  module.exports.addHook = addHook;
  module.exports.removeHook = removeHook;
  module.exports.createAddHookMessageChannel = createAddHookMessageChannel;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/utils.js
var require_utils5 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isWrapped = exports.safeExecuteInTheMiddleAsync = exports.safeExecuteInTheMiddle = undefined;
  function safeExecuteInTheMiddle(execute, onFinish, preventThrowingError) {
    let error;
    let result;
    try {
      result = execute();
    } catch (e) {
      error = e;
    } finally {
      onFinish(error, result);
      if (error && !preventThrowingError) {
        throw error;
      }
      return result;
    }
  }
  exports.safeExecuteInTheMiddle = safeExecuteInTheMiddle;
  async function safeExecuteInTheMiddleAsync(execute, onFinish, preventThrowingError) {
    let error;
    let result;
    try {
      result = await execute();
    } catch (e) {
      error = e;
    } finally {
      await onFinish(error, result);
      if (error && !preventThrowingError) {
        throw error;
      }
      return result;
    }
  }
  exports.safeExecuteInTheMiddleAsync = safeExecuteInTheMiddleAsync;
  function isWrapped(func) {
    return typeof func === "function" && typeof func.__original === "function" && typeof func.__unwrap === "function" && func.__wrapped === true;
  }
  exports.isWrapped = isWrapped;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.js
var require_instrumentation2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.InstrumentationBase = undefined;
  var path = __require("path");
  var util_1 = __require("util");
  var semver_1 = require_semver2();
  var shimmer_1 = require_shimmer();
  var instrumentation_1 = require_instrumentation();
  var RequireInTheMiddleSingleton_1 = require_RequireInTheMiddleSingleton();
  var import_in_the_middle_1 = require_import_in_the_middle();
  var api_1 = require_src();
  var require_in_the_middle_1 = require_require_in_the_middle();
  var fs_1 = __require("fs");
  var utils_1 = require_utils5();

  class InstrumentationBase extends instrumentation_1.InstrumentationAbstract {
    _modules;
    _hooks = [];
    _requireInTheMiddleSingleton = RequireInTheMiddleSingleton_1.RequireInTheMiddleSingleton.getInstance();
    _enabled = false;
    constructor(instrumentationName, instrumentationVersion, config) {
      super(instrumentationName, instrumentationVersion, config);
      let modules = this.init();
      if (modules && !Array.isArray(modules)) {
        modules = [modules];
      }
      this._modules = modules || [];
      if (this._config.enabled) {
        this.enable();
      }
    }
    _wrap = (moduleExports, name, wrapper) => {
      if ((0, utils_1.isWrapped)(moduleExports[name])) {
        this._unwrap(moduleExports, name);
      }
      if (!util_1.types.isProxy(moduleExports)) {
        return (0, shimmer_1.wrap)(moduleExports, name, wrapper);
      } else {
        const wrapped = (0, shimmer_1.wrap)(Object.assign({}, moduleExports), name, wrapper);
        Object.defineProperty(moduleExports, name, {
          value: wrapped
        });
        return wrapped;
      }
    };
    _unwrap = (moduleExports, name) => {
      if (!util_1.types.isProxy(moduleExports)) {
        return (0, shimmer_1.unwrap)(moduleExports, name);
      } else {
        return Object.defineProperty(moduleExports, name, {
          value: moduleExports[name]
        });
      }
    };
    _massWrap = (moduleExportsArray, names, wrapper) => {
      if (!moduleExportsArray) {
        api_1.diag.error("must provide one or more modules to patch");
        return;
      } else if (!Array.isArray(moduleExportsArray)) {
        moduleExportsArray = [moduleExportsArray];
      }
      if (!(names && Array.isArray(names))) {
        api_1.diag.error("must provide one or more functions to wrap on modules");
        return;
      }
      moduleExportsArray.forEach((moduleExports) => {
        names.forEach((name) => {
          this._wrap(moduleExports, name, wrapper);
        });
      });
    };
    _massUnwrap = (moduleExportsArray, names) => {
      if (!moduleExportsArray) {
        api_1.diag.error("must provide one or more modules to patch");
        return;
      } else if (!Array.isArray(moduleExportsArray)) {
        moduleExportsArray = [moduleExportsArray];
      }
      if (!(names && Array.isArray(names))) {
        api_1.diag.error("must provide one or more functions to wrap on modules");
        return;
      }
      moduleExportsArray.forEach((moduleExports) => {
        names.forEach((name) => {
          this._unwrap(moduleExports, name);
        });
      });
    };
    _warnOnPreloadedModules() {
      this._modules.forEach((module2) => {
        const { name } = module2;
        try {
          const resolvedModule = __require.resolve(name);
          if (__require.cache[resolvedModule]) {
            this._diag.warn(`Module ${name} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${name}`);
          }
        } catch {}
      });
    }
    _extractPackageVersion(baseDir) {
      try {
        const json = (0, fs_1.readFileSync)(path.join(baseDir, "package.json"), {
          encoding: "utf8"
        });
        const version = JSON.parse(json).version;
        return typeof version === "string" ? version : undefined;
      } catch {
        api_1.diag.warn("Failed extracting version", baseDir);
      }
      return;
    }
    _onRequire(module2, exports2, name, baseDir) {
      if (!baseDir) {
        if (typeof module2.patch === "function") {
          module2.moduleExports = exports2;
          if (this._enabled) {
            this._diag.debug("Applying instrumentation patch for nodejs core module on require hook", {
              module: module2.name
            });
            return module2.patch(exports2);
          }
        }
        return exports2;
      }
      const version = this._extractPackageVersion(baseDir);
      module2.moduleVersion = version;
      if (module2.name === name) {
        if (isSupported(module2.supportedVersions, version, module2.includePrerelease)) {
          if (typeof module2.patch === "function") {
            module2.moduleExports = exports2;
            if (this._enabled) {
              this._diag.debug("Applying instrumentation patch for module on require hook", {
                module: module2.name,
                version: module2.moduleVersion,
                baseDir
              });
              return module2.patch(exports2, module2.moduleVersion);
            }
          }
        }
        return exports2;
      }
      const files = module2.files ?? [];
      const normalizedName = path.normalize(name);
      const supportedFileInstrumentations = files.filter((f) => f.name === normalizedName && isSupported(f.supportedVersions, version, module2.includePrerelease));
      return supportedFileInstrumentations.reduce((patchedExports, file) => {
        file.moduleExports = patchedExports;
        if (this._enabled) {
          this._diag.debug("Applying instrumentation patch for nodejs module file on require hook", {
            module: module2.name,
            version: module2.moduleVersion,
            fileName: file.name,
            baseDir
          });
          return file.patch(patchedExports, module2.moduleVersion);
        }
        return patchedExports;
      }, exports2);
    }
    enable() {
      if (this._enabled) {
        return;
      }
      this._enabled = true;
      if (this._hooks.length > 0) {
        for (const module2 of this._modules) {
          if (typeof module2.patch === "function" && module2.moduleExports) {
            this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled", {
              module: module2.name,
              version: module2.moduleVersion
            });
            module2.patch(module2.moduleExports, module2.moduleVersion);
          }
          for (const file of module2.files) {
            if (file.moduleExports) {
              this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled", {
                module: module2.name,
                version: module2.moduleVersion,
                fileName: file.name
              });
              file.patch(file.moduleExports, module2.moduleVersion);
            }
          }
        }
        return;
      }
      this._warnOnPreloadedModules();
      for (const module2 of this._modules) {
        const hookFn = (exports2, name, baseDir) => {
          if (!baseDir && path.isAbsolute(name)) {
            const parsedPath = path.parse(name);
            name = parsedPath.name;
            baseDir = parsedPath.dir;
          }
          return this._onRequire(module2, exports2, name, baseDir);
        };
        const onRequire = (exports2, name, baseDir) => {
          return this._onRequire(module2, exports2, name, baseDir);
        };
        const hook = path.isAbsolute(module2.name) ? new require_in_the_middle_1.Hook([module2.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module2.name, onRequire);
        this._hooks.push(hook);
        const esmHook = new import_in_the_middle_1.Hook([module2.name], { internals: true }, hookFn);
        this._hooks.push(esmHook);
      }
    }
    disable() {
      if (!this._enabled) {
        return;
      }
      this._enabled = false;
      for (const module2 of this._modules) {
        if (typeof module2.unpatch === "function" && module2.moduleExports) {
          this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled", {
            module: module2.name,
            version: module2.moduleVersion
          });
          module2.unpatch(module2.moduleExports, module2.moduleVersion);
        }
        for (const file of module2.files) {
          if (file.moduleExports) {
            this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled", {
              module: module2.name,
              version: module2.moduleVersion,
              fileName: file.name
            });
            file.unpatch(file.moduleExports, module2.moduleVersion);
          }
        }
      }
    }
    isEnabled() {
      return this._enabled;
    }
  }
  exports.InstrumentationBase = InstrumentationBase;
  function isSupported(supportedVersions, version, includePrerelease) {
    if (typeof version === "undefined") {
      return supportedVersions.includes("*");
    }
    return supportedVersions.some((supportedVersion) => {
      return (0, semver_1.satisfies)(version, supportedVersion, { includePrerelease });
    });
  }
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/platform/node/normalize.js
var require_normalize = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.normalize = undefined;
  var path_1 = __require("path");
  Object.defineProperty(exports, "normalize", { enumerable: true, get: function() {
    return path_1.normalize;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/platform/node/index.js
var require_node4 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.normalize = exports.InstrumentationBase = undefined;
  var instrumentation_1 = require_instrumentation2();
  Object.defineProperty(exports, "InstrumentationBase", { enumerable: true, get: function() {
    return instrumentation_1.InstrumentationBase;
  } });
  var normalize_1 = require_normalize();
  Object.defineProperty(exports, "normalize", { enumerable: true, get: function() {
    return normalize_1.normalize;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/platform/index.js
var require_platform3 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.normalize = exports.InstrumentationBase = undefined;
  var node_1 = require_node4();
  Object.defineProperty(exports, "InstrumentationBase", { enumerable: true, get: function() {
    return node_1.InstrumentationBase;
  } });
  Object.defineProperty(exports, "normalize", { enumerable: true, get: function() {
    return node_1.normalize;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/instrumentationNodeModuleDefinition.js
var require_instrumentationNodeModuleDefinition = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.InstrumentationNodeModuleDefinition = undefined;

  class InstrumentationNodeModuleDefinition {
    files;
    name;
    supportedVersions;
    patch;
    unpatch;
    constructor(name, supportedVersions, patch, unpatch, files) {
      this.files = files || [];
      this.name = name;
      this.supportedVersions = supportedVersions;
      this.patch = patch;
      this.unpatch = unpatch;
    }
  }
  exports.InstrumentationNodeModuleDefinition = InstrumentationNodeModuleDefinition;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/instrumentationNodeModuleFile.js
var require_instrumentationNodeModuleFile = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.InstrumentationNodeModuleFile = undefined;
  var index_1 = require_platform3();

  class InstrumentationNodeModuleFile {
    name;
    supportedVersions;
    patch;
    unpatch;
    constructor(name, supportedVersions, patch, unpatch) {
      this.name = (0, index_1.normalize)(name);
      this.supportedVersions = supportedVersions;
      this.patch = patch;
      this.unpatch = unpatch;
    }
  }
  exports.InstrumentationNodeModuleFile = InstrumentationNodeModuleFile;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/semconvStability.js
var require_semconvStability = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.semconvStabilityFromStr = exports.SemconvStability = undefined;
  var SemconvStability;
  (function(SemconvStability2) {
    SemconvStability2[SemconvStability2["STABLE"] = 1] = "STABLE";
    SemconvStability2[SemconvStability2["OLD"] = 2] = "OLD";
    SemconvStability2[SemconvStability2["DUPLICATE"] = 3] = "DUPLICATE";
  })(SemconvStability = exports.SemconvStability || (exports.SemconvStability = {}));
  function semconvStabilityFromStr(namespace, str) {
    let semconvStability = SemconvStability.OLD;
    const entries = str?.split(",").map((v) => v.trim()).filter((s) => s !== "");
    for (const entry of entries ?? []) {
      if (entry.toLowerCase() === namespace + "/dup") {
        semconvStability = SemconvStability.DUPLICATE;
        break;
      } else if (entry.toLowerCase() === namespace) {
        semconvStability = SemconvStability.STABLE;
      }
    }
    return semconvStability;
  }
  exports.semconvStabilityFromStr = semconvStabilityFromStr;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/src/index.js
var require_src6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.semconvStabilityFromStr = exports.SemconvStability = exports.safeExecuteInTheMiddleAsync = exports.safeExecuteInTheMiddle = exports.isWrapped = exports.InstrumentationNodeModuleFile = exports.InstrumentationNodeModuleDefinition = exports.InstrumentationBase = exports.registerInstrumentations = undefined;
  var autoLoader_1 = require_autoLoader();
  Object.defineProperty(exports, "registerInstrumentations", { enumerable: true, get: function() {
    return autoLoader_1.registerInstrumentations;
  } });
  var index_1 = require_platform3();
  Object.defineProperty(exports, "InstrumentationBase", { enumerable: true, get: function() {
    return index_1.InstrumentationBase;
  } });
  var instrumentationNodeModuleDefinition_1 = require_instrumentationNodeModuleDefinition();
  Object.defineProperty(exports, "InstrumentationNodeModuleDefinition", { enumerable: true, get: function() {
    return instrumentationNodeModuleDefinition_1.InstrumentationNodeModuleDefinition;
  } });
  var instrumentationNodeModuleFile_1 = require_instrumentationNodeModuleFile();
  Object.defineProperty(exports, "InstrumentationNodeModuleFile", { enumerable: true, get: function() {
    return instrumentationNodeModuleFile_1.InstrumentationNodeModuleFile;
  } });
  var utils_1 = require_utils5();
  Object.defineProperty(exports, "isWrapped", { enumerable: true, get: function() {
    return utils_1.isWrapped;
  } });
  Object.defineProperty(exports, "safeExecuteInTheMiddle", { enumerable: true, get: function() {
    return utils_1.safeExecuteInTheMiddle;
  } });
  Object.defineProperty(exports, "safeExecuteInTheMiddleAsync", { enumerable: true, get: function() {
    return utils_1.safeExecuteInTheMiddleAsync;
  } });
  var semconvStability_1 = require_semconvStability();
  Object.defineProperty(exports, "SemconvStability", { enumerable: true, get: function() {
    return semconvStability_1.SemconvStability;
  } });
  Object.defineProperty(exports, "semconvStabilityFromStr", { enumerable: true, get: function() {
    return semconvStability_1.semconvStabilityFromStr;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-http@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/semconv.js
var require_semconv2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.HTTP_FLAVOR_VALUE_HTTP_1_1 = exports.NET_TRANSPORT_VALUE_IP_UDP = exports.NET_TRANSPORT_VALUE_IP_TCP = exports.ATTR_NET_TRANSPORT = exports.ATTR_NET_PEER_PORT = exports.ATTR_NET_PEER_NAME = exports.ATTR_NET_PEER_IP = exports.ATTR_NET_HOST_PORT = exports.ATTR_NET_HOST_NAME = exports.ATTR_NET_HOST_IP = exports.ATTR_HTTP_USER_AGENT = exports.ATTR_HTTP_URL = exports.ATTR_HTTP_TARGET = exports.ATTR_HTTP_STATUS_CODE = exports.ATTR_HTTP_SERVER_NAME = exports.ATTR_HTTP_SCHEME = exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH = exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH = exports.ATTR_HTTP_METHOD = exports.ATTR_HTTP_HOST = exports.ATTR_HTTP_FLAVOR = exports.ATTR_HTTP_CLIENT_IP = exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_TEST = exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_BOT = exports.ATTR_USER_AGENT_SYNTHETIC_TYPE = undefined;
  exports.ATTR_USER_AGENT_SYNTHETIC_TYPE = "user_agent.synthetic.type";
  exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_BOT = "bot";
  exports.USER_AGENT_SYNTHETIC_TYPE_VALUE_TEST = "test";
  exports.ATTR_HTTP_CLIENT_IP = "http.client_ip";
  exports.ATTR_HTTP_FLAVOR = "http.flavor";
  exports.ATTR_HTTP_HOST = "http.host";
  exports.ATTR_HTTP_METHOD = "http.method";
  exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH = "http.request_content_length";
  exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = "http.request_content_length_uncompressed";
  exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH = "http.response_content_length";
  exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = "http.response_content_length_uncompressed";
  exports.ATTR_HTTP_SCHEME = "http.scheme";
  exports.ATTR_HTTP_SERVER_NAME = "http.server_name";
  exports.ATTR_HTTP_STATUS_CODE = "http.status_code";
  exports.ATTR_HTTP_TARGET = "http.target";
  exports.ATTR_HTTP_URL = "http.url";
  exports.ATTR_HTTP_USER_AGENT = "http.user_agent";
  exports.ATTR_NET_HOST_IP = "net.host.ip";
  exports.ATTR_NET_HOST_NAME = "net.host.name";
  exports.ATTR_NET_HOST_PORT = "net.host.port";
  exports.ATTR_NET_PEER_IP = "net.peer.ip";
  exports.ATTR_NET_PEER_NAME = "net.peer.name";
  exports.ATTR_NET_PEER_PORT = "net.peer.port";
  exports.ATTR_NET_TRANSPORT = "net.transport";
  exports.NET_TRANSPORT_VALUE_IP_TCP = "ip_tcp";
  exports.NET_TRANSPORT_VALUE_IP_UDP = "ip_udp";
  exports.HTTP_FLAVOR_VALUE_HTTP_1_1 = "1.1";
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-http@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/enums/AttributeNames.js
var require_AttributeNames = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AttributeNames = undefined;
  var AttributeNames;
  (function(AttributeNames2) {
    AttributeNames2["HTTP_ERROR_NAME"] = "http.error_name";
    AttributeNames2["HTTP_ERROR_MESSAGE"] = "http.error_message";
    AttributeNames2["HTTP_STATUS_TEXT"] = "http.status_text";
  })(AttributeNames = exports.AttributeNames || (exports.AttributeNames = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-http@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/internal-types.js
var require_internal_types = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DEFAULT_QUERY_STRINGS_TO_REDACT = exports.STR_REDACTED = exports.SYNTHETIC_BOT_NAMES = exports.SYNTHETIC_TEST_NAMES = undefined;
  exports.SYNTHETIC_TEST_NAMES = ["alwayson"];
  exports.SYNTHETIC_BOT_NAMES = ["googlebot", "bingbot"];
  exports.STR_REDACTED = "REDACTED";
  exports.DEFAULT_QUERY_STRINGS_TO_REDACT = [
    "sig",
    "Signature",
    "AWSAccessKeyId",
    "X-Goog-Signature"
  ];
});

// ../../node_modules/.pnpm/forwarded-parse@2.1.2/node_modules/forwarded-parse/lib/error.js
var require_error = __commonJS((exports, module) => {
  var util = __require("util");
  function ParseError(message, input) {
    Error.captureStackTrace(this, ParseError);
    this.name = this.constructor.name;
    this.message = message;
    this.input = input;
  }
  util.inherits(ParseError, Error);
  module.exports = ParseError;
});

// ../../node_modules/.pnpm/forwarded-parse@2.1.2/node_modules/forwarded-parse/lib/ascii.js
var require_ascii = __commonJS((exports, module) => {
  function isDelimiter(code) {
    return code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code >= 58 && code <= 64 || code >= 91 && code <= 93 || code === 123 || code === 125;
  }
  function isTokenChar(code) {
    return code === 33 || code >= 35 && code <= 39 || code === 42 || code === 43 || code === 45 || code === 46 || code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 94 && code <= 122 || code === 124 || code === 126;
  }
  function isPrint(code) {
    return code >= 32 && code <= 126;
  }
  function isExtended(code) {
    return code >= 128 && code <= 255;
  }
  module.exports = {
    isDelimiter,
    isTokenChar,
    isExtended,
    isPrint
  };
});

// ../../node_modules/.pnpm/forwarded-parse@2.1.2/node_modules/forwarded-parse/index.js
var require_forwarded_parse = __commonJS((exports, module) => {
  var util = __require("util");
  var ParseError = require_error();
  var ascii = require_ascii();
  var isDelimiter = ascii.isDelimiter;
  var isTokenChar = ascii.isTokenChar;
  var isExtended = ascii.isExtended;
  var isPrint = ascii.isPrint;
  function decode(str) {
    return str.replace(/\\(.)/g, "$1");
  }
  function unexpectedCharacterMessage(header, position) {
    return util.format("Unexpected character '%s' at index %d", header.charAt(position), position);
  }
  function parse(header) {
    var mustUnescape = false;
    var isEscaping = false;
    var inQuotes = false;
    var forwarded = {};
    var output = [];
    var start = -1;
    var end = -1;
    var parameter;
    var code;
    for (var i = 0;i < header.length; i++) {
      code = header.charCodeAt(i);
      if (parameter === undefined) {
        if (i !== 0 && start === -1 && (code === 32 || code === 9)) {
          continue;
        }
        if (isTokenChar(code)) {
          if (start === -1)
            start = i;
        } else if (code === 61 && start !== -1) {
          parameter = header.slice(start, i).toLowerCase();
          start = -1;
        } else {
          throw new ParseError(unexpectedCharacterMessage(header, i), header);
        }
      } else {
        if (isEscaping && (code === 9 || isPrint(code) || isExtended(code))) {
          isEscaping = false;
        } else if (isTokenChar(code)) {
          if (end !== -1) {
            throw new ParseError(unexpectedCharacterMessage(header, i), header);
          }
          if (start === -1)
            start = i;
        } else if (isDelimiter(code) || isExtended(code)) {
          if (inQuotes) {
            if (code === 34) {
              inQuotes = false;
              end = i;
            } else if (code === 92) {
              if (start === -1)
                start = i;
              isEscaping = mustUnescape = true;
            } else if (start === -1) {
              start = i;
            }
          } else if (code === 34 && header.charCodeAt(i - 1) === 61) {
            inQuotes = true;
          } else if ((code === 44 || code === 59) && (start !== -1 || end !== -1)) {
            if (start !== -1) {
              if (end === -1)
                end = i;
              forwarded[parameter] = mustUnescape ? decode(header.slice(start, end)) : header.slice(start, end);
            } else {
              forwarded[parameter] = "";
            }
            if (code === 44) {
              output.push(forwarded);
              forwarded = {};
            }
            parameter = undefined;
            start = end = -1;
          } else {
            throw new ParseError(unexpectedCharacterMessage(header, i), header);
          }
        } else if (code === 32 || code === 9) {
          if (end !== -1)
            continue;
          if (inQuotes) {
            if (start === -1)
              start = i;
          } else if (start !== -1) {
            end = i;
          } else {
            throw new ParseError(unexpectedCharacterMessage(header, i), header);
          }
        } else {
          throw new ParseError(unexpectedCharacterMessage(header, i), header);
        }
      }
    }
    if (parameter === undefined || inQuotes || start === -1 && end === -1 || code === 32 || code === 9) {
      throw new ParseError("Unexpected end of input", header);
    }
    if (start !== -1) {
      if (end === -1)
        end = i;
      forwarded[parameter] = mustUnescape ? decode(header.slice(start, end)) : header.slice(start, end);
    } else {
      forwarded[parameter] = "";
    }
    output.push(forwarded);
    return output;
  }
  module.exports = parse;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-http@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/utils.js
var require_utils6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.headerCapture = exports.getIncomingStableRequestMetricAttributesOnResponse = exports.getIncomingRequestMetricAttributesOnResponse = exports.getIncomingRequestAttributesOnResponse = exports.getIncomingRequestMetricAttributes = exports.getIncomingRequestAttributes = exports.getRemoteClientAddress = exports.getOutgoingStableRequestMetricAttributesOnResponse = exports.getOutgoingRequestMetricAttributesOnResponse = exports.getOutgoingRequestAttributesOnResponse = exports.setAttributesFromHttpKind = exports.getOutgoingRequestMetricAttributes = exports.getOutgoingRequestAttributes = exports.extractHostnameAndPort = exports.isValidOptionsType = exports.getRequestInfo = exports.isCompressed = exports.setResponseContentLengthAttribute = exports.setRequestContentLengthAttribute = exports.setSpanWithError = exports.satisfiesPattern = exports.parseResponseStatus = exports.getAbsoluteUrl = undefined;
  var api_1 = require_src();
  var semantic_conventions_1 = require_src2();
  var semconv_1 = require_semconv2();
  var core_1 = require_src3();
  var instrumentation_1 = require_src6();
  var url = __require("url");
  var AttributeNames_1 = require_AttributeNames();
  var internal_types_1 = require_internal_types();
  var internal_types_2 = require_internal_types();
  var forwardedParse = require_forwarded_parse();
  var getAbsoluteUrl = (requestUrl, headers, fallbackProtocol = "http:", redactedQueryParams = Array.from(internal_types_2.DEFAULT_QUERY_STRINGS_TO_REDACT)) => {
    const reqUrlObject = requestUrl || {};
    const protocol = reqUrlObject.protocol || fallbackProtocol;
    const port = (reqUrlObject.port || "").toString();
    let path = reqUrlObject.path || "/";
    let host = reqUrlObject.host || reqUrlObject.hostname || headers.host || "localhost";
    if (host.indexOf(":") === -1 && port && port !== "80" && port !== "443") {
      host += `:${port}`;
    }
    if (path.includes("?")) {
      try {
        const parsedUrl = new URL(path, "http://localhost");
        const sensitiveParamsToRedact = redactedQueryParams || [];
        for (const sensitiveParam of sensitiveParamsToRedact) {
          if (parsedUrl.searchParams.get(sensitiveParam)) {
            parsedUrl.searchParams.set(sensitiveParam, internal_types_2.STR_REDACTED);
          }
        }
        path = `${parsedUrl.pathname}${parsedUrl.search}`;
      } catch {}
    }
    const authPart = reqUrlObject.auth ? `${internal_types_2.STR_REDACTED}:${internal_types_2.STR_REDACTED}@` : "";
    return `${protocol}//${authPart}${host}${path}`;
  };
  exports.getAbsoluteUrl = getAbsoluteUrl;
  var parseResponseStatus = (kind, statusCode) => {
    const upperBound = kind === api_1.SpanKind.CLIENT ? 400 : 500;
    if (statusCode && statusCode >= 100 && statusCode < upperBound) {
      return api_1.SpanStatusCode.UNSET;
    }
    return api_1.SpanStatusCode.ERROR;
  };
  exports.parseResponseStatus = parseResponseStatus;
  var satisfiesPattern = (constant, pattern) => {
    if (typeof pattern === "string") {
      return pattern === constant;
    } else if (pattern instanceof RegExp) {
      return pattern.test(constant);
    } else if (typeof pattern === "function") {
      return pattern(constant);
    } else {
      throw new TypeError("Pattern is in unsupported datatype");
    }
  };
  exports.satisfiesPattern = satisfiesPattern;
  var setSpanWithError = (span, error, semconvStability) => {
    const message = error.message;
    if (semconvStability & instrumentation_1.SemconvStability.OLD) {
      span.setAttribute(AttributeNames_1.AttributeNames.HTTP_ERROR_NAME, error.name);
      span.setAttribute(AttributeNames_1.AttributeNames.HTTP_ERROR_MESSAGE, message);
    }
    if (semconvStability & instrumentation_1.SemconvStability.STABLE) {
      span.setAttribute(semantic_conventions_1.ATTR_ERROR_TYPE, error.name);
    }
    span.setStatus({ code: api_1.SpanStatusCode.ERROR, message });
    span.recordException(error);
  };
  exports.setSpanWithError = setSpanWithError;
  var setRequestContentLengthAttribute = (request, attributes) => {
    const length = getContentLength(request.headers);
    if (length === null)
      return;
    if ((0, exports.isCompressed)(request.headers)) {
      attributes[semconv_1.ATTR_HTTP_REQUEST_CONTENT_LENGTH] = length;
    } else {
      attributes[semconv_1.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED] = length;
    }
  };
  exports.setRequestContentLengthAttribute = setRequestContentLengthAttribute;
  var setResponseContentLengthAttribute = (response, attributes) => {
    const length = getContentLength(response.headers);
    if (length === null)
      return;
    if ((0, exports.isCompressed)(response.headers)) {
      attributes[semconv_1.ATTR_HTTP_RESPONSE_CONTENT_LENGTH] = length;
    } else {
      attributes[semconv_1.ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED] = length;
    }
  };
  exports.setResponseContentLengthAttribute = setResponseContentLengthAttribute;
  function getContentLength(headers) {
    const contentLengthHeader = headers["content-length"];
    if (contentLengthHeader === undefined)
      return null;
    const contentLength = parseInt(contentLengthHeader, 10);
    if (isNaN(contentLength))
      return null;
    return contentLength;
  }
  var isCompressed = (headers) => {
    const encoding = headers["content-encoding"];
    return !!encoding && encoding !== "identity";
  };
  exports.isCompressed = isCompressed;
  function stringUrlToHttpOptions(stringUrl) {
    const { hostname, pathname, port, username, password, search, protocol, hash, href, origin, host } = new URL(stringUrl);
    const options = {
      protocol,
      hostname: hostname && hostname[0] === "[" ? hostname.slice(1, -1) : hostname,
      hash,
      search,
      pathname,
      path: `${pathname || ""}${search || ""}`,
      href,
      origin,
      host
    };
    if (port !== "") {
      options.port = Number(port);
    }
    if (username || password) {
      options.auth = `${decodeURIComponent(username)}:${decodeURIComponent(password)}`;
    }
    return options;
  }
  var getRequestInfo = (logger, options, extraOptions) => {
    let pathname;
    let origin;
    let optionsParsed;
    let invalidUrl = false;
    if (typeof options === "string") {
      try {
        const convertedOptions = stringUrlToHttpOptions(options);
        optionsParsed = convertedOptions;
        pathname = convertedOptions.pathname || "/";
      } catch (e) {
        invalidUrl = true;
        logger.verbose("Unable to parse URL provided to HTTP request, using fallback to determine path. Original error:", e);
        optionsParsed = {
          path: options
        };
        pathname = optionsParsed.path || "/";
      }
      origin = `${optionsParsed.protocol || "http:"}//${optionsParsed.host}`;
      if (extraOptions !== undefined) {
        Object.assign(optionsParsed, extraOptions);
      }
    } else if (options instanceof url.URL) {
      optionsParsed = {
        protocol: options.protocol,
        hostname: typeof options.hostname === "string" && options.hostname.startsWith("[") ? options.hostname.slice(1, -1) : options.hostname,
        path: `${options.pathname || ""}${options.search || ""}`
      };
      if (options.port !== "") {
        optionsParsed.port = Number(options.port);
      }
      if (options.username || options.password) {
        optionsParsed.auth = `${options.username}:${options.password}`;
      }
      pathname = options.pathname;
      origin = options.origin;
      if (extraOptions !== undefined) {
        Object.assign(optionsParsed, extraOptions);
      }
    } else {
      optionsParsed = Object.assign({ protocol: options.host ? "http:" : undefined }, options);
      const hostname = optionsParsed.host || (optionsParsed.port != null ? `${optionsParsed.hostname}${optionsParsed.port}` : optionsParsed.hostname);
      origin = `${optionsParsed.protocol || "http:"}//${hostname}`;
      pathname = options.pathname;
      if (!pathname && optionsParsed.path) {
        try {
          const parsedUrl = new URL(optionsParsed.path, origin);
          pathname = parsedUrl.pathname || "/";
        } catch {
          pathname = "/";
        }
      }
    }
    const method = optionsParsed.method ? optionsParsed.method.toUpperCase() : "GET";
    return { origin, pathname, method, optionsParsed, invalidUrl };
  };
  exports.getRequestInfo = getRequestInfo;
  var isValidOptionsType = (options) => {
    if (!options) {
      return false;
    }
    const type = typeof options;
    return type === "string" || type === "object" && !Array.isArray(options);
  };
  exports.isValidOptionsType = isValidOptionsType;
  var extractHostnameAndPort = (requestOptions) => {
    if (requestOptions.hostname && requestOptions.port) {
      return { hostname: requestOptions.hostname, port: requestOptions.port };
    }
    const matches = requestOptions.host?.match(/^([^:/ ]+)(:\d{1,5})?/) || null;
    const hostname = requestOptions.hostname || (matches === null ? "localhost" : matches[1]);
    let port = requestOptions.port;
    if (!port) {
      if (matches && matches[2]) {
        port = matches[2].substring(1);
      } else {
        port = requestOptions.protocol === "https:" ? "443" : "80";
      }
    }
    return { hostname, port };
  };
  exports.extractHostnameAndPort = extractHostnameAndPort;
  var getOutgoingRequestAttributes = (requestOptions, options, semconvStability, enableSyntheticSourceDetection) => {
    const hostname = options.hostname;
    const port = options.port;
    const method = requestOptions.method ?? "GET";
    const normalizedMethod = normalizeMethod(method);
    const headers = requestOptions.headers || {};
    const userAgent = headers["user-agent"];
    const urlFull = (0, exports.getAbsoluteUrl)(requestOptions, headers, `${options.component}:`, options.redactedQueryParams);
    const oldAttributes = {
      [semconv_1.ATTR_HTTP_URL]: urlFull,
      [semconv_1.ATTR_HTTP_METHOD]: method,
      [semconv_1.ATTR_HTTP_TARGET]: requestOptions.path || "/",
      [semconv_1.ATTR_NET_PEER_NAME]: hostname,
      [semconv_1.ATTR_HTTP_HOST]: headers.host ?? `${hostname}:${port}`
    };
    const newAttributes = {
      [semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: normalizedMethod,
      [semantic_conventions_1.ATTR_SERVER_ADDRESS]: hostname,
      [semantic_conventions_1.ATTR_SERVER_PORT]: Number(port),
      [semantic_conventions_1.ATTR_URL_FULL]: urlFull,
      [semantic_conventions_1.ATTR_USER_AGENT_ORIGINAL]: userAgent
    };
    if (method !== normalizedMethod) {
      newAttributes[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD_ORIGINAL] = method;
    }
    if (enableSyntheticSourceDetection && userAgent) {
      newAttributes[semconv_1.ATTR_USER_AGENT_SYNTHETIC_TYPE] = getSyntheticType(userAgent);
    }
    if (userAgent !== undefined) {
      oldAttributes[semconv_1.ATTR_HTTP_USER_AGENT] = userAgent;
    }
    switch (semconvStability) {
      case instrumentation_1.SemconvStability.STABLE:
        return Object.assign(newAttributes, options.hookAttributes);
      case instrumentation_1.SemconvStability.OLD:
        return Object.assign(oldAttributes, options.hookAttributes);
    }
    return Object.assign(oldAttributes, newAttributes, options.hookAttributes);
  };
  exports.getOutgoingRequestAttributes = getOutgoingRequestAttributes;
  var getOutgoingRequestMetricAttributes = (spanAttributes) => {
    const metricAttributes = {};
    metricAttributes[semconv_1.ATTR_HTTP_METHOD] = spanAttributes[semconv_1.ATTR_HTTP_METHOD];
    metricAttributes[semconv_1.ATTR_NET_PEER_NAME] = spanAttributes[semconv_1.ATTR_NET_PEER_NAME];
    return metricAttributes;
  };
  exports.getOutgoingRequestMetricAttributes = getOutgoingRequestMetricAttributes;
  var setAttributesFromHttpKind = (kind, attributes) => {
    if (kind) {
      attributes[semconv_1.ATTR_HTTP_FLAVOR] = kind;
      if (kind.toUpperCase() !== "QUIC") {
        attributes[semconv_1.ATTR_NET_TRANSPORT] = semconv_1.NET_TRANSPORT_VALUE_IP_TCP;
      } else {
        attributes[semconv_1.ATTR_NET_TRANSPORT] = semconv_1.NET_TRANSPORT_VALUE_IP_UDP;
      }
    }
  };
  exports.setAttributesFromHttpKind = setAttributesFromHttpKind;
  var getSyntheticType = (userAgent) => {
    const userAgentString = String(userAgent).toLowerCase();
    for (const name of internal_types_1.SYNTHETIC_TEST_NAMES) {
      if (userAgentString.includes(name)) {
        return semconv_1.USER_AGENT_SYNTHETIC_TYPE_VALUE_TEST;
      }
    }
    for (const name of internal_types_1.SYNTHETIC_BOT_NAMES) {
      if (userAgentString.includes(name)) {
        return semconv_1.USER_AGENT_SYNTHETIC_TYPE_VALUE_BOT;
      }
    }
    return;
  };
  var getOutgoingRequestAttributesOnResponse = (response, semconvStability) => {
    const { statusCode, statusMessage, httpVersion, socket } = response;
    const oldAttributes = {};
    const stableAttributes = {};
    if (statusCode != null) {
      stableAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE] = statusCode;
    }
    if (socket) {
      const { remoteAddress, remotePort } = socket;
      oldAttributes[semconv_1.ATTR_NET_PEER_IP] = remoteAddress;
      oldAttributes[semconv_1.ATTR_NET_PEER_PORT] = remotePort;
      stableAttributes[semantic_conventions_1.ATTR_NETWORK_PEER_ADDRESS] = remoteAddress;
      stableAttributes[semantic_conventions_1.ATTR_NETWORK_PEER_PORT] = remotePort;
      stableAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION] = response.httpVersion;
    }
    (0, exports.setResponseContentLengthAttribute)(response, oldAttributes);
    if (statusCode) {
      oldAttributes[semconv_1.ATTR_HTTP_STATUS_CODE] = statusCode;
      oldAttributes[AttributeNames_1.AttributeNames.HTTP_STATUS_TEXT] = (statusMessage || "").toUpperCase();
    }
    (0, exports.setAttributesFromHttpKind)(httpVersion, oldAttributes);
    switch (semconvStability) {
      case instrumentation_1.SemconvStability.STABLE:
        return stableAttributes;
      case instrumentation_1.SemconvStability.OLD:
        return oldAttributes;
    }
    return Object.assign(oldAttributes, stableAttributes);
  };
  exports.getOutgoingRequestAttributesOnResponse = getOutgoingRequestAttributesOnResponse;
  var getOutgoingRequestMetricAttributesOnResponse = (spanAttributes) => {
    const metricAttributes = {};
    metricAttributes[semconv_1.ATTR_NET_PEER_PORT] = spanAttributes[semconv_1.ATTR_NET_PEER_PORT];
    metricAttributes[semconv_1.ATTR_HTTP_STATUS_CODE] = spanAttributes[semconv_1.ATTR_HTTP_STATUS_CODE];
    metricAttributes[semconv_1.ATTR_HTTP_FLAVOR] = spanAttributes[semconv_1.ATTR_HTTP_FLAVOR];
    return metricAttributes;
  };
  exports.getOutgoingRequestMetricAttributesOnResponse = getOutgoingRequestMetricAttributesOnResponse;
  var getOutgoingStableRequestMetricAttributesOnResponse = (spanAttributes) => {
    const metricAttributes = {};
    if (spanAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION]) {
      metricAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION] = spanAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION];
    }
    if (spanAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE]) {
      metricAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE] = spanAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE];
    }
    return metricAttributes;
  };
  exports.getOutgoingStableRequestMetricAttributesOnResponse = getOutgoingStableRequestMetricAttributesOnResponse;
  function parseHostHeader(hostHeader, proto) {
    const parts = hostHeader.split(":");
    if (parts.length === 1) {
      if (proto === "http") {
        return { host: parts[0], port: "80" };
      }
      if (proto === "https") {
        return { host: parts[0], port: "443" };
      }
      return { host: parts[0] };
    }
    if (parts.length === 2) {
      return {
        host: parts[0],
        port: parts[1]
      };
    }
    if (parts[0].startsWith("[")) {
      if (parts[parts.length - 1].endsWith("]")) {
        if (proto === "http") {
          return { host: hostHeader, port: "80" };
        }
        if (proto === "https") {
          return { host: hostHeader, port: "443" };
        }
      } else if (parts[parts.length - 2].endsWith("]")) {
        return {
          host: parts.slice(0, -1).join(":"),
          port: parts[parts.length - 1]
        };
      }
    }
    return { host: hostHeader };
  }
  function getServerAddress(request, component) {
    const forwardedHeader = request.headers["forwarded"];
    if (forwardedHeader) {
      for (const entry of parseForwardedHeader(forwardedHeader)) {
        if (entry.host) {
          return parseHostHeader(entry.host, entry.proto);
        }
      }
    }
    const xForwardedHost = request.headers["x-forwarded-host"];
    if (typeof xForwardedHost === "string") {
      if (typeof request.headers["x-forwarded-proto"] === "string") {
        return parseHostHeader(xForwardedHost, request.headers["x-forwarded-proto"]);
      }
      if (Array.isArray(request.headers["x-forwarded-proto"])) {
        return parseHostHeader(xForwardedHost, request.headers["x-forwarded-proto"][0]);
      }
      return parseHostHeader(xForwardedHost);
    } else if (Array.isArray(xForwardedHost) && typeof xForwardedHost[0] === "string" && xForwardedHost[0].length > 0) {
      if (typeof request.headers["x-forwarded-proto"] === "string") {
        return parseHostHeader(xForwardedHost[0], request.headers["x-forwarded-proto"]);
      }
      if (Array.isArray(request.headers["x-forwarded-proto"])) {
        return parseHostHeader(xForwardedHost[0], request.headers["x-forwarded-proto"][0]);
      }
      return parseHostHeader(xForwardedHost[0]);
    }
    const host = request.headers["host"];
    if (typeof host === "string" && host.length > 0) {
      return parseHostHeader(host, component);
    }
    return null;
  }
  function getRemoteClientAddress(request) {
    const forwardedHeader = request.headers["forwarded"];
    if (forwardedHeader) {
      for (const entry of parseForwardedHeader(forwardedHeader)) {
        if (entry.for) {
          return removePortFromAddress(entry.for);
        }
      }
    }
    const xForwardedFor = request.headers["x-forwarded-for"];
    if (xForwardedFor) {
      let xForwardedForVal;
      if (typeof xForwardedFor === "string") {
        xForwardedForVal = xForwardedFor;
      } else if (Array.isArray(xForwardedFor)) {
        xForwardedForVal = xForwardedFor[0];
      }
      if (typeof xForwardedForVal === "string") {
        xForwardedForVal = xForwardedForVal.split(",")[0].trim();
        return removePortFromAddress(xForwardedForVal);
      }
    }
    const remote = request.socket.remoteAddress;
    if (remote) {
      return remote;
    }
    return null;
  }
  exports.getRemoteClientAddress = getRemoteClientAddress;
  function removePortFromAddress(input) {
    try {
      const { hostname: address } = new URL(`http://${input}`);
      if (address.startsWith("[") && address.endsWith("]")) {
        return address.slice(1, -1);
      }
      return address;
    } catch {
      return input;
    }
  }
  function getInfoFromIncomingMessage(component, request, logger) {
    try {
      if (request.headers.host) {
        return new URL(request.url ?? "/", `${component}://${request.headers.host}`);
      } else {
        const unsafeParsedUrl = new URL(request.url ?? "/", `${component}://localhost`);
        return {
          pathname: unsafeParsedUrl.pathname,
          search: unsafeParsedUrl.search,
          toString: function() {
            return unsafeParsedUrl.pathname + unsafeParsedUrl.search;
          }
        };
      }
    } catch (e) {
      logger.verbose("Unable to get URL from request", e);
      return {};
    }
  }
  var getIncomingRequestAttributes = (request, options, logger) => {
    const { component, enableSyntheticSourceDetection, hookAttributes, semconvStability, serverName } = options;
    const { headers, httpVersion, method } = request;
    const { host, "user-agent": userAgent, "x-forwarded-for": ips } = headers;
    const parsedUrl = getInfoFromIncomingMessage(component, request, logger);
    let newAttributes;
    let oldAttributes;
    if (semconvStability !== instrumentation_1.SemconvStability.OLD) {
      const normalizedMethod = normalizeMethod(method);
      const serverAddress = getServerAddress(request, component);
      const remoteClientAddress = getRemoteClientAddress(request);
      newAttributes = {
        [semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: normalizedMethod,
        [semantic_conventions_1.ATTR_URL_SCHEME]: component,
        [semantic_conventions_1.ATTR_SERVER_ADDRESS]: serverAddress?.host,
        [semantic_conventions_1.ATTR_NETWORK_PEER_ADDRESS]: request.socket.remoteAddress,
        [semantic_conventions_1.ATTR_NETWORK_PEER_PORT]: request.socket.remotePort,
        [semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION]: request.httpVersion,
        [semantic_conventions_1.ATTR_USER_AGENT_ORIGINAL]: userAgent
      };
      if (parsedUrl.pathname != null) {
        newAttributes[semantic_conventions_1.ATTR_URL_PATH] = parsedUrl.pathname;
      }
      if (parsedUrl.search) {
        newAttributes[semantic_conventions_1.ATTR_URL_QUERY] = parsedUrl.search.slice(1);
      }
      if (remoteClientAddress != null) {
        newAttributes[semantic_conventions_1.ATTR_CLIENT_ADDRESS] = remoteClientAddress;
      }
      if (serverAddress?.port != null) {
        newAttributes[semantic_conventions_1.ATTR_SERVER_PORT] = Number(serverAddress.port);
      }
      if (method !== normalizedMethod) {
        newAttributes[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD_ORIGINAL] = method;
      }
      if (enableSyntheticSourceDetection && userAgent) {
        newAttributes[semconv_1.ATTR_USER_AGENT_SYNTHETIC_TYPE] = getSyntheticType(userAgent);
      }
    }
    if (semconvStability !== instrumentation_1.SemconvStability.STABLE) {
      const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, "$1") || "localhost";
      oldAttributes = {
        [semconv_1.ATTR_HTTP_URL]: parsedUrl.toString(),
        [semconv_1.ATTR_HTTP_HOST]: host,
        [semconv_1.ATTR_NET_HOST_NAME]: hostname,
        [semconv_1.ATTR_HTTP_METHOD]: method,
        [semconv_1.ATTR_HTTP_SCHEME]: component
      };
      if (typeof ips === "string") {
        oldAttributes[semconv_1.ATTR_HTTP_CLIENT_IP] = ips.split(",")[0];
      }
      if (typeof serverName === "string") {
        oldAttributes[semconv_1.ATTR_HTTP_SERVER_NAME] = serverName;
      }
      if (parsedUrl.pathname) {
        oldAttributes[semconv_1.ATTR_HTTP_TARGET] = parsedUrl.pathname + parsedUrl.search || "/";
      }
      if (userAgent !== undefined) {
        oldAttributes[semconv_1.ATTR_HTTP_USER_AGENT] = userAgent;
      }
      (0, exports.setRequestContentLengthAttribute)(request, oldAttributes);
      (0, exports.setAttributesFromHttpKind)(httpVersion, oldAttributes);
    }
    switch (semconvStability) {
      case instrumentation_1.SemconvStability.STABLE:
        return Object.assign(newAttributes, hookAttributes);
      case instrumentation_1.SemconvStability.OLD:
        return Object.assign(oldAttributes, hookAttributes);
      default:
        return Object.assign(oldAttributes, newAttributes, hookAttributes);
    }
  };
  exports.getIncomingRequestAttributes = getIncomingRequestAttributes;
  var getIncomingRequestMetricAttributes = (spanAttributes) => {
    const metricAttributes = {};
    metricAttributes[semconv_1.ATTR_HTTP_SCHEME] = spanAttributes[semconv_1.ATTR_HTTP_SCHEME];
    metricAttributes[semconv_1.ATTR_HTTP_METHOD] = spanAttributes[semconv_1.ATTR_HTTP_METHOD];
    metricAttributes[semconv_1.ATTR_NET_HOST_NAME] = spanAttributes[semconv_1.ATTR_NET_HOST_NAME];
    metricAttributes[semconv_1.ATTR_HTTP_FLAVOR] = spanAttributes[semconv_1.ATTR_HTTP_FLAVOR];
    return metricAttributes;
  };
  exports.getIncomingRequestMetricAttributes = getIncomingRequestMetricAttributes;
  var getIncomingRequestAttributesOnResponse = (request, response, semconvStability) => {
    const { socket } = request;
    const { statusCode, statusMessage } = response;
    const newAttributes = {
      [semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE]: statusCode
    };
    const rpcMetadata = (0, core_1.getRPCMetadata)(api_1.context.active());
    const oldAttributes = {};
    if (socket) {
      const { localAddress, localPort, remoteAddress, remotePort } = socket;
      oldAttributes[semconv_1.ATTR_NET_HOST_IP] = localAddress;
      oldAttributes[semconv_1.ATTR_NET_HOST_PORT] = localPort;
      oldAttributes[semconv_1.ATTR_NET_PEER_IP] = remoteAddress;
      oldAttributes[semconv_1.ATTR_NET_PEER_PORT] = remotePort;
    }
    oldAttributes[semconv_1.ATTR_HTTP_STATUS_CODE] = statusCode;
    oldAttributes[AttributeNames_1.AttributeNames.HTTP_STATUS_TEXT] = (statusMessage || "").toUpperCase();
    if (rpcMetadata?.type === core_1.RPCType.HTTP && rpcMetadata.route !== undefined) {
      oldAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE] = rpcMetadata.route;
      newAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE] = rpcMetadata.route;
    }
    switch (semconvStability) {
      case instrumentation_1.SemconvStability.STABLE:
        return newAttributes;
      case instrumentation_1.SemconvStability.OLD:
        return oldAttributes;
    }
    return Object.assign(oldAttributes, newAttributes);
  };
  exports.getIncomingRequestAttributesOnResponse = getIncomingRequestAttributesOnResponse;
  var getIncomingRequestMetricAttributesOnResponse = (spanAttributes) => {
    const metricAttributes = {};
    metricAttributes[semconv_1.ATTR_HTTP_STATUS_CODE] = spanAttributes[semconv_1.ATTR_HTTP_STATUS_CODE];
    metricAttributes[semconv_1.ATTR_NET_HOST_PORT] = spanAttributes[semconv_1.ATTR_NET_HOST_PORT];
    if (spanAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE] !== undefined) {
      metricAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE] = spanAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE];
    }
    return metricAttributes;
  };
  exports.getIncomingRequestMetricAttributesOnResponse = getIncomingRequestMetricAttributesOnResponse;
  var getIncomingStableRequestMetricAttributesOnResponse = (spanAttributes) => {
    const metricAttributes = {};
    if (spanAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE] !== undefined) {
      metricAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE] = spanAttributes[semantic_conventions_1.ATTR_HTTP_ROUTE];
    }
    if (spanAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE]) {
      metricAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE] = spanAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE];
    }
    return metricAttributes;
  };
  exports.getIncomingStableRequestMetricAttributesOnResponse = getIncomingStableRequestMetricAttributesOnResponse;
  function headerCapture(type, headers, semconvStability) {
    const normalizedHeaders = new Map;
    for (let i = 0, len = headers.length;i < len; i++) {
      const capturedHeader = headers[i].toLowerCase();
      if (semconvStability & instrumentation_1.SemconvStability.STABLE) {
        normalizedHeaders.set(capturedHeader, capturedHeader);
      } else {
        normalizedHeaders.set(capturedHeader, capturedHeader.replaceAll("-", "_"));
      }
    }
    return (getHeader) => {
      const attributes = {};
      for (const capturedHeader of normalizedHeaders.keys()) {
        const value = getHeader(capturedHeader);
        if (value === undefined) {
          continue;
        }
        const normalizedHeader = normalizedHeaders.get(capturedHeader);
        const key = `http.${type}.header.${normalizedHeader}`;
        if (typeof value === "string") {
          attributes[key] = [value];
        } else if (Array.isArray(value)) {
          attributes[key] = value;
        } else {
          attributes[key] = [value];
        }
      }
      return attributes;
    };
  }
  exports.headerCapture = headerCapture;
  var KNOWN_METHODS = new Set([
    "GET",
    "HEAD",
    "POST",
    "PUT",
    "DELETE",
    "CONNECT",
    "OPTIONS",
    "TRACE",
    "PATCH",
    "QUERY"
  ]);
  function normalizeMethod(method) {
    if (method == null) {
      return "GET";
    }
    const upper = method.toUpperCase();
    if (KNOWN_METHODS.has(upper)) {
      return upper;
    }
    return "_OTHER";
  }
  function parseForwardedHeader(header) {
    try {
      return forwardedParse(header);
    } catch {
      return [];
    }
  }
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-http@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/http.js
var require_http = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.HttpInstrumentation = undefined;
  var api_1 = require_src();
  var core_1 = require_src3();
  var url = __require("url");
  var version_1 = require_version3();
  var instrumentation_1 = require_src6();
  var events_1 = __require("events");
  var semantic_conventions_1 = require_src2();
  var utils_1 = require_utils6();

  class HttpInstrumentation extends instrumentation_1.InstrumentationBase {
    _spanNotEnded = new WeakSet;
    _headerCapture;
    _httpPatched = false;
    _httpsPatched = false;
    _semconvStability = instrumentation_1.SemconvStability.OLD;
    constructor(config = {}) {
      super("@opentelemetry/instrumentation-http", version_1.VERSION, config);
      this._semconvStability = (0, instrumentation_1.semconvStabilityFromStr)("http", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
      this._headerCapture = this._createHeaderCapture(this._semconvStability);
    }
    _updateMetricInstruments() {
      this._oldHttpServerDurationHistogram = this.meter.createHistogram("http.server.duration", {
        description: "Measures the duration of inbound HTTP requests.",
        unit: "ms",
        valueType: api_1.ValueType.DOUBLE
      });
      this._oldHttpClientDurationHistogram = this.meter.createHistogram("http.client.duration", {
        description: "Measures the duration of outbound HTTP requests.",
        unit: "ms",
        valueType: api_1.ValueType.DOUBLE
      });
      this._stableHttpServerDurationHistogram = this.meter.createHistogram(semantic_conventions_1.METRIC_HTTP_SERVER_REQUEST_DURATION, {
        description: "Duration of HTTP server requests.",
        unit: "s",
        valueType: api_1.ValueType.DOUBLE,
        advice: {
          explicitBucketBoundaries: [
            0.005,
            0.01,
            0.025,
            0.05,
            0.075,
            0.1,
            0.25,
            0.5,
            0.75,
            1,
            2.5,
            5,
            7.5,
            10
          ]
        }
      });
      this._stableHttpClientDurationHistogram = this.meter.createHistogram(semantic_conventions_1.METRIC_HTTP_CLIENT_REQUEST_DURATION, {
        description: "Duration of HTTP client requests.",
        unit: "s",
        valueType: api_1.ValueType.DOUBLE,
        advice: {
          explicitBucketBoundaries: [
            0.005,
            0.01,
            0.025,
            0.05,
            0.075,
            0.1,
            0.25,
            0.5,
            0.75,
            1,
            2.5,
            5,
            7.5,
            10
          ]
        }
      });
    }
    _recordServerDuration(durationMs, oldAttributes, stableAttributes) {
      if (this._semconvStability & instrumentation_1.SemconvStability.OLD) {
        this._oldHttpServerDurationHistogram.record(durationMs, oldAttributes);
      }
      if (this._semconvStability & instrumentation_1.SemconvStability.STABLE) {
        this._stableHttpServerDurationHistogram.record(durationMs / 1000, stableAttributes);
      }
    }
    _recordClientDuration(durationMs, oldAttributes, stableAttributes) {
      if (this._semconvStability & instrumentation_1.SemconvStability.OLD) {
        this._oldHttpClientDurationHistogram.record(durationMs, oldAttributes);
      }
      if (this._semconvStability & instrumentation_1.SemconvStability.STABLE) {
        this._stableHttpClientDurationHistogram.record(durationMs / 1000, stableAttributes);
      }
    }
    setConfig(config = {}) {
      super.setConfig(config);
      this._headerCapture = this._createHeaderCapture(this._semconvStability);
    }
    init() {
      return [this._getHttpsInstrumentation(), this._getHttpInstrumentation()];
    }
    _getHttpInstrumentation() {
      return new instrumentation_1.InstrumentationNodeModuleDefinition("http", ["*"], (moduleExports) => {
        if (this._httpPatched) {
          return moduleExports;
        }
        this._httpPatched = true;
        const isESM = moduleExports[Symbol.toStringTag] === "Module";
        if (!this.getConfig().disableOutgoingRequestInstrumentation) {
          const patchedRequest = this._wrap(moduleExports, "request", this._getPatchOutgoingRequestFunction("http"));
          const patchedGet = this._wrap(moduleExports, "get", this._getPatchOutgoingGetFunction(patchedRequest));
          if (isESM) {
            moduleExports.default.request = patchedRequest;
            moduleExports.default.get = patchedGet;
          }
        }
        if (!this.getConfig().disableIncomingRequestInstrumentation) {
          this._wrap(moduleExports.Server.prototype, "emit", this._getPatchIncomingRequestFunction("http"));
        }
        return moduleExports;
      }, (moduleExports) => {
        this._httpPatched = false;
        if (moduleExports === undefined)
          return;
        if (!this.getConfig().disableOutgoingRequestInstrumentation) {
          this._unwrap(moduleExports, "request");
          this._unwrap(moduleExports, "get");
        }
        if (!this.getConfig().disableIncomingRequestInstrumentation) {
          this._unwrap(moduleExports.Server.prototype, "emit");
        }
      });
    }
    _getHttpsInstrumentation() {
      return new instrumentation_1.InstrumentationNodeModuleDefinition("https", ["*"], (moduleExports) => {
        if (this._httpsPatched) {
          return moduleExports;
        }
        this._httpsPatched = true;
        const isESM = moduleExports[Symbol.toStringTag] === "Module";
        if (!this.getConfig().disableOutgoingRequestInstrumentation) {
          const patchedRequest = this._wrap(moduleExports, "request", this._getPatchHttpsOutgoingRequestFunction("https"));
          const patchedGet = this._wrap(moduleExports, "get", this._getPatchHttpsOutgoingGetFunction(patchedRequest));
          if (isESM) {
            moduleExports.default.request = patchedRequest;
            moduleExports.default.get = patchedGet;
          }
        }
        if (!this.getConfig().disableIncomingRequestInstrumentation) {
          this._wrap(moduleExports.Server.prototype, "emit", this._getPatchIncomingRequestFunction("https"));
        }
        return moduleExports;
      }, (moduleExports) => {
        this._httpsPatched = false;
        if (moduleExports === undefined)
          return;
        if (!this.getConfig().disableOutgoingRequestInstrumentation) {
          this._unwrap(moduleExports, "request");
          this._unwrap(moduleExports, "get");
        }
        if (!this.getConfig().disableIncomingRequestInstrumentation) {
          this._unwrap(moduleExports.Server.prototype, "emit");
        }
      });
    }
    _getPatchIncomingRequestFunction(component) {
      return (original) => {
        return this._incomingRequestFunction(component, original);
      };
    }
    _getPatchOutgoingRequestFunction(component) {
      return (original) => {
        return this._outgoingRequestFunction(component, original);
      };
    }
    _getPatchOutgoingGetFunction(clientRequest) {
      return (_original) => {
        return function outgoingGetRequest(options, ...args) {
          const req = clientRequest(options, ...args);
          req.end();
          return req;
        };
      };
    }
    _getPatchHttpsOutgoingRequestFunction(component) {
      return (original) => {
        const instrumentation = this;
        return function httpsOutgoingRequest(options, ...args) {
          if (component === "https" && typeof options === "object" && options?.constructor?.name !== "URL") {
            options = Object.assign({}, options);
            instrumentation._setDefaultOptions(options);
          }
          return instrumentation._getPatchOutgoingRequestFunction(component)(original)(options, ...args);
        };
      };
    }
    _setDefaultOptions(options) {
      options.protocol = options.protocol || "https:";
      options.port = options.port || 443;
    }
    _getPatchHttpsOutgoingGetFunction(clientRequest) {
      return (original) => {
        const instrumentation = this;
        return function httpsOutgoingRequest(options, ...args) {
          return instrumentation._getPatchOutgoingGetFunction(clientRequest)(original)(options, ...args);
        };
      };
    }
    _traceClientRequest(request, span, startTime, oldMetricAttributes, stableMetricAttributes) {
      if (this.getConfig().requestHook) {
        this._callRequestHook(span, request);
      }
      let responseFinished = false;
      request.prependListener("response", (response) => {
        this._diag.debug("outgoingRequest on response()");
        if (request.listenerCount("response") <= 1) {
          response.resume();
        }
        const responseAttributes = (0, utils_1.getOutgoingRequestAttributesOnResponse)(response, this._semconvStability);
        span.setAttributes(responseAttributes);
        oldMetricAttributes = Object.assign(oldMetricAttributes, (0, utils_1.getOutgoingRequestMetricAttributesOnResponse)(responseAttributes));
        stableMetricAttributes = Object.assign(stableMetricAttributes, (0, utils_1.getOutgoingStableRequestMetricAttributesOnResponse)(responseAttributes));
        if (this.getConfig().responseHook) {
          this._callResponseHook(span, response);
        }
        span.setAttributes(this._headerCapture.client.captureRequestHeaders((header) => request.getHeader(header)));
        span.setAttributes(this._headerCapture.client.captureResponseHeaders((header) => response.headers[header]));
        api_1.context.bind(api_1.context.active(), response);
        const endHandler = () => {
          this._diag.debug("outgoingRequest on end()");
          if (responseFinished) {
            return;
          }
          responseFinished = true;
          let status;
          if (response.aborted && !response.complete) {
            status = { code: api_1.SpanStatusCode.ERROR };
          } else {
            status = {
              code: (0, utils_1.parseResponseStatus)(api_1.SpanKind.CLIENT, response.statusCode)
            };
          }
          span.setStatus(status);
          if (this.getConfig().applyCustomAttributesOnSpan) {
            (0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().applyCustomAttributesOnSpan(span, request, response), () => {}, true);
          }
          this._closeHttpSpan(span, api_1.SpanKind.CLIENT, startTime, oldMetricAttributes, stableMetricAttributes);
        };
        response.on("end", endHandler);
        response.on(events_1.errorMonitor, (error) => {
          this._diag.debug("outgoingRequest on error()", error);
          if (responseFinished) {
            return;
          }
          responseFinished = true;
          this._onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
        });
      });
      request.on("close", () => {
        this._diag.debug("outgoingRequest on request close()");
        if (request.aborted || responseFinished) {
          return;
        }
        responseFinished = true;
        this._closeHttpSpan(span, api_1.SpanKind.CLIENT, startTime, oldMetricAttributes, stableMetricAttributes);
      });
      request.on(events_1.errorMonitor, (error) => {
        this._diag.debug("outgoingRequest on request error()", error);
        if (responseFinished) {
          return;
        }
        responseFinished = true;
        this._onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
      });
      this._diag.debug("http.ClientRequest return request");
      return request;
    }
    _incomingRequestFunction(component, original) {
      const instrumentation = this;
      return function incomingRequest(event, ...args) {
        if (event !== "request") {
          return original.apply(this, [event, ...args]);
        }
        const request = args[0];
        const response = args[1];
        const method = request.method || "GET";
        instrumentation._diag.debug(`${component} instrumentation incomingRequest`);
        if ((0, instrumentation_1.safeExecuteInTheMiddle)(() => instrumentation.getConfig().ignoreIncomingRequestHook?.(request), (e) => {
          if (e != null) {
            instrumentation._diag.error("caught ignoreIncomingRequestHook error: ", e);
          }
        }, true)) {
          return api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => {
            api_1.context.bind(api_1.context.active(), request);
            api_1.context.bind(api_1.context.active(), response);
            return original.apply(this, [event, ...args]);
          });
        }
        const headers = request.headers;
        const spanAttributes = (0, utils_1.getIncomingRequestAttributes)(request, {
          component,
          serverName: instrumentation.getConfig().serverName,
          hookAttributes: instrumentation._callStartSpanHook(request, instrumentation.getConfig().startIncomingSpanHook),
          semconvStability: instrumentation._semconvStability,
          enableSyntheticSourceDetection: instrumentation.getConfig().enableSyntheticSourceDetection || false
        }, instrumentation._diag);
        Object.assign(spanAttributes, instrumentation._headerCapture.server.captureRequestHeaders((header) => request.headers[header]));
        const spanOptions = {
          kind: api_1.SpanKind.SERVER,
          attributes: spanAttributes
        };
        const startTime = (0, core_1.hrTime)();
        const oldMetricAttributes = (0, utils_1.getIncomingRequestMetricAttributes)(spanAttributes);
        const stableMetricAttributes = {
          [semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: spanAttributes[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD],
          [semantic_conventions_1.ATTR_URL_SCHEME]: spanAttributes[semantic_conventions_1.ATTR_URL_SCHEME]
        };
        if (spanAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION]) {
          stableMetricAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION] = spanAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION];
        }
        const ctx = api_1.propagation.extract(api_1.ROOT_CONTEXT, headers);
        const span = instrumentation._startHttpSpan(method, spanOptions, ctx);
        const rpcMetadata = {
          type: core_1.RPCType.HTTP,
          span
        };
        return api_1.context.with((0, core_1.setRPCMetadata)(api_1.trace.setSpan(ctx, span), rpcMetadata), () => {
          api_1.context.bind(api_1.context.active(), request);
          api_1.context.bind(api_1.context.active(), response);
          if (instrumentation.getConfig().requestHook) {
            instrumentation._callRequestHook(span, request);
          }
          if (instrumentation.getConfig().responseHook) {
            instrumentation._callResponseHook(span, response);
          }
          let hasError = false;
          response.on("close", () => {
            if (hasError) {
              return;
            }
            instrumentation._onServerResponseFinish(request, response, span, oldMetricAttributes, stableMetricAttributes, startTime);
          });
          response.on(events_1.errorMonitor, (err) => {
            hasError = true;
            instrumentation._onServerResponseError(span, oldMetricAttributes, stableMetricAttributes, startTime, err);
          });
          return (0, instrumentation_1.safeExecuteInTheMiddle)(() => original.apply(this, [event, ...args]), (error) => {
            if (error) {
              instrumentation._onServerResponseError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
              throw error;
            }
          });
        });
      };
    }
    _outgoingRequestFunction(component, original) {
      const instrumentation = this;
      return function outgoingRequest(options, ...args) {
        if (!(0, utils_1.isValidOptionsType)(options)) {
          return original.apply(this, [options, ...args]);
        }
        const extraOptions = typeof args[0] === "object" && (typeof options === "string" || options instanceof url.URL) ? args.shift() : undefined;
        const { method, invalidUrl, optionsParsed } = (0, utils_1.getRequestInfo)(instrumentation._diag, options, extraOptions);
        if ((0, instrumentation_1.safeExecuteInTheMiddle)(() => instrumentation.getConfig().ignoreOutgoingRequestHook?.(optionsParsed), (e) => {
          if (e != null) {
            instrumentation._diag.error("caught ignoreOutgoingRequestHook error: ", e);
          }
        }, true)) {
          return original.apply(this, [optionsParsed, ...args]);
        }
        const { hostname, port } = (0, utils_1.extractHostnameAndPort)(optionsParsed);
        const attributes = (0, utils_1.getOutgoingRequestAttributes)(optionsParsed, {
          component,
          port,
          hostname,
          hookAttributes: instrumentation._callStartSpanHook(optionsParsed, instrumentation.getConfig().startOutgoingSpanHook),
          redactedQueryParams: instrumentation.getConfig().redactedQueryParams
        }, instrumentation._semconvStability, instrumentation.getConfig().enableSyntheticSourceDetection || false);
        const startTime = (0, core_1.hrTime)();
        const oldMetricAttributes = (0, utils_1.getOutgoingRequestMetricAttributes)(attributes);
        const stableMetricAttributes = {
          [semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: attributes[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD],
          [semantic_conventions_1.ATTR_SERVER_ADDRESS]: attributes[semantic_conventions_1.ATTR_SERVER_ADDRESS],
          [semantic_conventions_1.ATTR_SERVER_PORT]: attributes[semantic_conventions_1.ATTR_SERVER_PORT]
        };
        if (attributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE]) {
          stableMetricAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE] = attributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE];
        }
        if (attributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION]) {
          stableMetricAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION] = attributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION];
        }
        const spanOptions = {
          kind: api_1.SpanKind.CLIENT,
          attributes
        };
        const span = instrumentation._startHttpSpan(method, spanOptions);
        const parentContext = api_1.context.active();
        const requestContext = api_1.trace.setSpan(parentContext, span);
        if (!optionsParsed.headers) {
          optionsParsed.headers = {};
        } else {
          optionsParsed.headers = Object.assign({}, optionsParsed.headers);
        }
        api_1.propagation.inject(requestContext, optionsParsed.headers);
        return api_1.context.with(requestContext, () => {
          const cb = args[args.length - 1];
          if (typeof cb === "function") {
            args[args.length - 1] = api_1.context.bind(parentContext, cb);
          }
          const request = (0, instrumentation_1.safeExecuteInTheMiddle)(() => {
            if (invalidUrl) {
              return original.apply(this, [options, ...args]);
            } else {
              return original.apply(this, [optionsParsed, ...args]);
            }
          }, (error) => {
            if (error) {
              instrumentation._onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
              throw error;
            }
          });
          instrumentation._diag.debug(`${component} instrumentation outgoingRequest`);
          api_1.context.bind(parentContext, request);
          return instrumentation._traceClientRequest(request, span, startTime, oldMetricAttributes, stableMetricAttributes);
        });
      };
    }
    _onServerResponseFinish(request, response, span, oldMetricAttributes, stableMetricAttributes, startTime) {
      const attributes = (0, utils_1.getIncomingRequestAttributesOnResponse)(request, response, this._semconvStability);
      oldMetricAttributes = Object.assign(oldMetricAttributes, (0, utils_1.getIncomingRequestMetricAttributesOnResponse)(attributes));
      stableMetricAttributes = Object.assign(stableMetricAttributes, (0, utils_1.getIncomingStableRequestMetricAttributesOnResponse)(attributes));
      span.setAttributes(this._headerCapture.server.captureResponseHeaders((header) => response.getHeader(header)));
      span.setAttributes(attributes).setStatus({
        code: (0, utils_1.parseResponseStatus)(api_1.SpanKind.SERVER, response.statusCode)
      });
      const route = attributes[semantic_conventions_1.ATTR_HTTP_ROUTE];
      if (route) {
        span.updateName(`${request.method || "GET"} ${route}`);
      }
      if (this.getConfig().applyCustomAttributesOnSpan) {
        (0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().applyCustomAttributesOnSpan(span, request, response), () => {}, true);
      }
      this._closeHttpSpan(span, api_1.SpanKind.SERVER, startTime, oldMetricAttributes, stableMetricAttributes);
    }
    _onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error) {
      (0, utils_1.setSpanWithError)(span, error, this._semconvStability);
      stableMetricAttributes[semantic_conventions_1.ATTR_ERROR_TYPE] = error.name;
      this._closeHttpSpan(span, api_1.SpanKind.CLIENT, startTime, oldMetricAttributes, stableMetricAttributes);
    }
    _onServerResponseError(span, oldMetricAttributes, stableMetricAttributes, startTime, error) {
      (0, utils_1.setSpanWithError)(span, error, this._semconvStability);
      stableMetricAttributes[semantic_conventions_1.ATTR_ERROR_TYPE] = error.name;
      this._closeHttpSpan(span, api_1.SpanKind.SERVER, startTime, oldMetricAttributes, stableMetricAttributes);
    }
    _startHttpSpan(name, options, ctx = api_1.context.active()) {
      const requireParent = options.kind === api_1.SpanKind.CLIENT ? this.getConfig().requireParentforOutgoingSpans : this.getConfig().requireParentforIncomingSpans;
      let span;
      const currentSpan = api_1.trace.getSpan(ctx);
      if (requireParent === true && (!currentSpan || !api_1.trace.isSpanContextValid(currentSpan.spanContext()))) {
        span = api_1.trace.wrapSpanContext(api_1.INVALID_SPAN_CONTEXT);
      } else if (requireParent === true && currentSpan?.spanContext().isRemote) {
        span = currentSpan;
      } else {
        span = this.tracer.startSpan(name, options, ctx);
      }
      this._spanNotEnded.add(span);
      return span;
    }
    _closeHttpSpan(span, spanKind, startTime, oldMetricAttributes, stableMetricAttributes) {
      if (!this._spanNotEnded.has(span)) {
        return;
      }
      span.end();
      this._spanNotEnded.delete(span);
      const duration = (0, core_1.hrTimeToMilliseconds)((0, core_1.hrTimeDuration)(startTime, (0, core_1.hrTime)()));
      if (spanKind === api_1.SpanKind.SERVER) {
        this._recordServerDuration(duration, oldMetricAttributes, stableMetricAttributes);
      } else if (spanKind === api_1.SpanKind.CLIENT) {
        this._recordClientDuration(duration, oldMetricAttributes, stableMetricAttributes);
      }
    }
    _callResponseHook(span, response) {
      (0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().responseHook(span, response), () => {}, true);
    }
    _callRequestHook(span, request) {
      (0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().requestHook(span, request), () => {}, true);
    }
    _callStartSpanHook(request, hookFunc) {
      if (typeof hookFunc === "function") {
        return (0, instrumentation_1.safeExecuteInTheMiddle)(() => hookFunc(request), () => {}, true);
      }
    }
    _createHeaderCapture(semconvStability) {
      const config = this.getConfig();
      return {
        client: {
          captureRequestHeaders: (0, utils_1.headerCapture)("request", config.headersToSpanAttributes?.client?.requestHeaders ?? [], semconvStability),
          captureResponseHeaders: (0, utils_1.headerCapture)("response", config.headersToSpanAttributes?.client?.responseHeaders ?? [], semconvStability)
        },
        server: {
          captureRequestHeaders: (0, utils_1.headerCapture)("request", config.headersToSpanAttributes?.server?.requestHeaders ?? [], semconvStability),
          captureResponseHeaders: (0, utils_1.headerCapture)("response", config.headersToSpanAttributes?.server?.responseHeaders ?? [], semconvStability)
        }
      };
    }
  }
  exports.HttpInstrumentation = HttpInstrumentation;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-http@0.213.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/index.js
var require_src7 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.HttpInstrumentation = undefined;
  var http_1 = require_http();
  Object.defineProperty(exports, "HttpInstrumentation", { enumerable: true, get: function() {
    return http_1.HttpInstrumentation;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js
var require_suppress_tracing2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = undefined;
  var api_1 = require_src();
  var SUPPRESS_TRACING_KEY2 = (0, api_1.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
  function suppressTracing2(context) {
    return context.setValue(SUPPRESS_TRACING_KEY2, true);
  }
  exports.suppressTracing = suppressTracing2;
  function unsuppressTracing(context) {
    return context.deleteValue(SUPPRESS_TRACING_KEY2);
  }
  exports.unsuppressTracing = unsuppressTracing;
  function isTracingSuppressed(context) {
    return context.getValue(SUPPRESS_TRACING_KEY2) === true;
  }
  exports.isTracingSuppressed = isTracingSuppressed;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/baggage/constants.js
var require_constants2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = undefined;
  exports.BAGGAGE_KEY_PAIR_SEPARATOR = "=";
  exports.BAGGAGE_PROPERTIES_SEPARATOR = ";";
  exports.BAGGAGE_ITEMS_SEPARATOR = ",";
  exports.BAGGAGE_HEADER = "baggage";
  exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;
  exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;
  exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/baggage/utils.js
var require_utils7 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = undefined;
  var api_1 = require_src();
  var constants_1 = require_constants2();
  function serializeKeyPairs(keyPairs) {
    return keyPairs.reduce((hValue, current) => {
      const value = `${hValue}${hValue !== "" ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ""}${current}`;
      return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;
    }, "");
  }
  exports.serializeKeyPairs = serializeKeyPairs;
  function getKeyPairs(baggage) {
    return baggage.getAllEntries().map(([key, value]) => {
      let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;
      if (value.metadata !== undefined) {
        entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();
      }
      return entry;
    });
  }
  exports.getKeyPairs = getKeyPairs;
  function parsePairKeyValue(entry) {
    if (!entry)
      return;
    const metadataSeparatorIndex = entry.indexOf(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);
    const keyPairPart = metadataSeparatorIndex === -1 ? entry : entry.substring(0, metadataSeparatorIndex);
    const separatorIndex = keyPairPart.indexOf(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);
    if (separatorIndex <= 0)
      return;
    const rawKey = keyPairPart.substring(0, separatorIndex).trim();
    const rawValue = keyPairPart.substring(separatorIndex + 1).trim();
    if (!rawKey || !rawValue)
      return;
    let key;
    let value;
    try {
      key = decodeURIComponent(rawKey);
      value = decodeURIComponent(rawValue);
    } catch {
      return;
    }
    let metadata;
    if (metadataSeparatorIndex !== -1 && metadataSeparatorIndex < entry.length - 1) {
      const metadataString = entry.substring(metadataSeparatorIndex + 1);
      metadata = (0, api_1.baggageEntryMetadataFromString)(metadataString);
    }
    return { key, value, metadata };
  }
  exports.parsePairKeyValue = parsePairKeyValue;
  function parseKeyPairsIntoRecord(value) {
    const result = {};
    if (typeof value === "string" && value.length > 0) {
      value.split(constants_1.BAGGAGE_ITEMS_SEPARATOR).forEach((entry) => {
        const keyPair = parsePairKeyValue(entry);
        if (keyPair !== undefined && keyPair.value.length > 0) {
          result[keyPair.key] = keyPair.value;
        }
      });
    }
    return result;
  }
  exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js
var require_W3CBaggagePropagator2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.W3CBaggagePropagator = undefined;
  var api_1 = require_src();
  var suppress_tracing_1 = require_suppress_tracing2();
  var constants_1 = require_constants2();
  var utils_1 = require_utils7();

  class W3CBaggagePropagator {
    inject(context, carrier, setter) {
      const baggage = api_1.propagation.getBaggage(context);
      if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))
        return;
      const keyPairs = (0, utils_1.getKeyPairs)(baggage).filter((pair) => {
        return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
      }).slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);
      const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);
      if (headerValue.length > 0) {
        setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);
      }
    }
    extract(context, carrier, getter) {
      const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);
      const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;
      if (!baggageString)
        return context;
      const baggage = {};
      if (baggageString.length === 0) {
        return context;
      }
      const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);
      pairs.forEach((entry) => {
        const keyPair = (0, utils_1.parsePairKeyValue)(entry);
        if (keyPair) {
          const baggageEntry = { value: keyPair.value };
          if (keyPair.metadata) {
            baggageEntry.metadata = keyPair.metadata;
          }
          baggage[keyPair.key] = baggageEntry;
        }
      });
      if (Object.entries(baggage).length === 0) {
        return context;
      }
      return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));
    }
    fields() {
      return [constants_1.BAGGAGE_HEADER];
    }
  }
  exports.W3CBaggagePropagator = W3CBaggagePropagator;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/anchored-clock.js
var require_anchored_clock2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AnchoredClock = undefined;

  class AnchoredClock {
    _monotonicClock;
    _epochMillis;
    _performanceMillis;
    constructor(systemClock, monotonicClock) {
      this._monotonicClock = monotonicClock;
      this._epochMillis = systemClock.now();
      this._performanceMillis = monotonicClock.now();
    }
    now() {
      const delta = this._monotonicClock.now() - this._performanceMillis;
      return this._epochMillis + delta;
    }
  }
  exports.AnchoredClock = AnchoredClock;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/attributes.js
var require_attributes2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = undefined;
  var api_1 = require_src();
  function sanitizeAttributes(attributes) {
    const out = {};
    if (typeof attributes !== "object" || attributes == null) {
      return out;
    }
    for (const key in attributes) {
      if (!Object.prototype.hasOwnProperty.call(attributes, key)) {
        continue;
      }
      if (!isAttributeKey(key)) {
        api_1.diag.warn(`Invalid attribute key: ${key}`);
        continue;
      }
      const val = attributes[key];
      if (!isAttributeValue(val)) {
        api_1.diag.warn(`Invalid attribute value set for key: ${key}`);
        continue;
      }
      if (Array.isArray(val)) {
        out[key] = val.slice();
      } else {
        out[key] = val;
      }
    }
    return out;
  }
  exports.sanitizeAttributes = sanitizeAttributes;
  function isAttributeKey(key) {
    return typeof key === "string" && key !== "";
  }
  exports.isAttributeKey = isAttributeKey;
  function isAttributeValue(val) {
    if (val == null) {
      return true;
    }
    if (Array.isArray(val)) {
      return isHomogeneousAttributeValueArray(val);
    }
    return isValidPrimitiveAttributeValueType(typeof val);
  }
  exports.isAttributeValue = isAttributeValue;
  function isHomogeneousAttributeValueArray(arr) {
    let type;
    for (const element of arr) {
      if (element == null)
        continue;
      const elementType = typeof element;
      if (elementType === type) {
        continue;
      }
      if (!type) {
        if (isValidPrimitiveAttributeValueType(elementType)) {
          type = elementType;
          continue;
        }
        return false;
      }
      return false;
    }
    return true;
  }
  function isValidPrimitiveAttributeValueType(valType) {
    switch (valType) {
      case "number":
      case "boolean":
      case "string":
        return true;
    }
    return false;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js
var require_logging_error_handler2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.loggingErrorHandler = undefined;
  var api_1 = require_src();
  function loggingErrorHandler() {
    return (ex) => {
      api_1.diag.error(stringifyException(ex));
    };
  }
  exports.loggingErrorHandler = loggingErrorHandler;
  function stringifyException(ex) {
    if (typeof ex === "string") {
      return ex;
    } else {
      return JSON.stringify(flattenException(ex));
    }
  }
  function flattenException(ex) {
    const result = {};
    let current = ex;
    while (current !== null) {
      Object.getOwnPropertyNames(current).forEach((propertyName) => {
        if (result[propertyName])
          return;
        const value = current[propertyName];
        if (value) {
          result[propertyName] = String(value);
        }
      });
      current = Object.getPrototypeOf(current);
    }
    return result;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js
var require_global_error_handler2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.globalErrorHandler = exports.setGlobalErrorHandler = undefined;
  var logging_error_handler_1 = require_logging_error_handler2();
  var delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();
  function setGlobalErrorHandler(handler) {
    delegateHandler = handler;
  }
  exports.setGlobalErrorHandler = setGlobalErrorHandler;
  function globalErrorHandler(ex) {
    try {
      delegateHandler(ex);
    } catch {}
  }
  exports.globalErrorHandler = globalErrorHandler;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/node/environment.js
var require_environment2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getStringListFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = exports.getNumberFromEnv = undefined;
  var api_1 = require_src();
  var util_1 = __require("util");
  function getNumberFromEnv(key) {
    const raw = process.env[key];
    if (raw == null || raw.trim() === "") {
      return;
    }
    const value = Number(raw);
    if (isNaN(value)) {
      api_1.diag.warn(`Unknown value ${(0, util_1.inspect)(raw)} for ${key}, expected a number, using defaults`);
      return;
    }
    return value;
  }
  exports.getNumberFromEnv = getNumberFromEnv;
  function getStringFromEnv(key) {
    const raw = process.env[key];
    if (raw == null || raw.trim() === "") {
      return;
    }
    return raw;
  }
  exports.getStringFromEnv = getStringFromEnv;
  function getBooleanFromEnv(key) {
    const raw = process.env[key]?.trim().toLowerCase();
    if (raw == null || raw === "") {
      return false;
    }
    if (raw === "true") {
      return true;
    } else if (raw === "false") {
      return false;
    } else {
      api_1.diag.warn(`Unknown value ${(0, util_1.inspect)(raw)} for ${key}, expected 'true' or 'false', falling back to 'false' (default)`);
      return false;
    }
  }
  exports.getBooleanFromEnv = getBooleanFromEnv;
  function getStringListFromEnv(key) {
    return getStringFromEnv(key)?.split(",").map((v) => v.trim()).filter((s) => s !== "");
  }
  exports.getStringListFromEnv = getStringListFromEnv;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/globalThis.js
var require_globalThis3 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports._globalThis = undefined;
  exports._globalThis = globalThis;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/version.js
var require_version4 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.VERSION = undefined;
  exports.VERSION = "2.6.1";
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/semconv.js
var require_semconv3 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ATTR_PROCESS_RUNTIME_NAME = undefined;
  exports.ATTR_PROCESS_RUNTIME_NAME = "process.runtime.name";
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js
var require_sdk_info2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SDK_INFO = undefined;
  var version_1 = require_version4();
  var semantic_conventions_1 = require_src2();
  var semconv_1 = require_semconv3();
  exports.SDK_INFO = {
    [semantic_conventions_1.ATTR_TELEMETRY_SDK_NAME]: "opentelemetry",
    [semconv_1.ATTR_PROCESS_RUNTIME_NAME]: "node",
    [semantic_conventions_1.ATTR_TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,
    [semantic_conventions_1.ATTR_TELEMETRY_SDK_VERSION]: version_1.VERSION
  };
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/node/index.js
var require_node5 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.otperformance = exports.SDK_INFO = exports._globalThis = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = undefined;
  var environment_1 = require_environment2();
  Object.defineProperty(exports, "getStringFromEnv", { enumerable: true, get: function() {
    return environment_1.getStringFromEnv;
  } });
  Object.defineProperty(exports, "getBooleanFromEnv", { enumerable: true, get: function() {
    return environment_1.getBooleanFromEnv;
  } });
  Object.defineProperty(exports, "getNumberFromEnv", { enumerable: true, get: function() {
    return environment_1.getNumberFromEnv;
  } });
  Object.defineProperty(exports, "getStringListFromEnv", { enumerable: true, get: function() {
    return environment_1.getStringListFromEnv;
  } });
  var globalThis_1 = require_globalThis3();
  Object.defineProperty(exports, "_globalThis", { enumerable: true, get: function() {
    return globalThis_1._globalThis;
  } });
  var sdk_info_1 = require_sdk_info2();
  Object.defineProperty(exports, "SDK_INFO", { enumerable: true, get: function() {
    return sdk_info_1.SDK_INFO;
  } });
  exports.otperformance = performance;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/platform/index.js
var require_platform4 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getStringFromEnv = exports.getBooleanFromEnv = exports.otperformance = exports._globalThis = exports.SDK_INFO = undefined;
  var node_1 = require_node5();
  Object.defineProperty(exports, "SDK_INFO", { enumerable: true, get: function() {
    return node_1.SDK_INFO;
  } });
  Object.defineProperty(exports, "_globalThis", { enumerable: true, get: function() {
    return node_1._globalThis;
  } });
  Object.defineProperty(exports, "otperformance", { enumerable: true, get: function() {
    return node_1.otperformance;
  } });
  Object.defineProperty(exports, "getBooleanFromEnv", { enumerable: true, get: function() {
    return node_1.getBooleanFromEnv;
  } });
  Object.defineProperty(exports, "getStringFromEnv", { enumerable: true, get: function() {
    return node_1.getStringFromEnv;
  } });
  Object.defineProperty(exports, "getNumberFromEnv", { enumerable: true, get: function() {
    return node_1.getNumberFromEnv;
  } });
  Object.defineProperty(exports, "getStringListFromEnv", { enumerable: true, get: function() {
    return node_1.getStringListFromEnv;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/time.js
var require_time2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = undefined;
  var platform_1 = require_platform4();
  var NANOSECOND_DIGITS = 9;
  var NANOSECOND_DIGITS_IN_MILLIS = 6;
  var MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);
  var SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
  function millisToHrTime(epochMillis) {
    const epochSeconds = epochMillis / 1000;
    const seconds = Math.trunc(epochSeconds);
    const nanos = Math.round(epochMillis % 1000 * MILLISECONDS_TO_NANOSECONDS);
    return [seconds, nanos];
  }
  exports.millisToHrTime = millisToHrTime;
  function getTimeOrigin() {
    return platform_1.otperformance.timeOrigin;
  }
  exports.getTimeOrigin = getTimeOrigin;
  function hrTime(performanceNow) {
    const timeOrigin = millisToHrTime(platform_1.otperformance.timeOrigin);
    const now = millisToHrTime(typeof performanceNow === "number" ? performanceNow : platform_1.otperformance.now());
    return addHrTimes(timeOrigin, now);
  }
  exports.hrTime = hrTime;
  function timeInputToHrTime(time) {
    if (isTimeInputHrTime(time)) {
      return time;
    } else if (typeof time === "number") {
      if (time < platform_1.otperformance.timeOrigin) {
        return hrTime(time);
      } else {
        return millisToHrTime(time);
      }
    } else if (time instanceof Date) {
      return millisToHrTime(time.getTime());
    } else {
      throw TypeError("Invalid input type");
    }
  }
  exports.timeInputToHrTime = timeInputToHrTime;
  function hrTimeDuration(startTime, endTime) {
    let seconds = endTime[0] - startTime[0];
    let nanos = endTime[1] - startTime[1];
    if (nanos < 0) {
      seconds -= 1;
      nanos += SECOND_TO_NANOSECONDS;
    }
    return [seconds, nanos];
  }
  exports.hrTimeDuration = hrTimeDuration;
  function hrTimeToTimeStamp(time) {
    const precision = NANOSECOND_DIGITS;
    const tmp = `${"0".repeat(precision)}${time[1]}Z`;
    const nanoString = tmp.substring(tmp.length - precision - 1);
    const date = new Date(time[0] * 1000).toISOString();
    return date.replace("000Z", nanoString);
  }
  exports.hrTimeToTimeStamp = hrTimeToTimeStamp;
  function hrTimeToNanoseconds(time) {
    return time[0] * SECOND_TO_NANOSECONDS + time[1];
  }
  exports.hrTimeToNanoseconds = hrTimeToNanoseconds;
  function hrTimeToMilliseconds(time) {
    return time[0] * 1000 + time[1] / 1e6;
  }
  exports.hrTimeToMilliseconds = hrTimeToMilliseconds;
  function hrTimeToMicroseconds(time) {
    return time[0] * 1e6 + time[1] / 1000;
  }
  exports.hrTimeToMicroseconds = hrTimeToMicroseconds;
  function isTimeInputHrTime(value) {
    return Array.isArray(value) && value.length === 2 && typeof value[0] === "number" && typeof value[1] === "number";
  }
  exports.isTimeInputHrTime = isTimeInputHrTime;
  function isTimeInput(value) {
    return isTimeInputHrTime(value) || typeof value === "number" || value instanceof Date;
  }
  exports.isTimeInput = isTimeInput;
  function addHrTimes(time1, time2) {
    const out = [time1[0] + time2[0], time1[1] + time2[1]];
    if (out[1] >= SECOND_TO_NANOSECONDS) {
      out[1] -= SECOND_TO_NANOSECONDS;
      out[0] += 1;
    }
    return out;
  }
  exports.addHrTimes = addHrTimes;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/common/timer-util.js
var require_timer_util2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.unrefTimer = undefined;
  function unrefTimer(timer) {
    if (typeof timer !== "number") {
      timer.unref();
    }
  }
  exports.unrefTimer = unrefTimer;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/ExportResult.js
var require_ExportResult2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ExportResultCode = undefined;
  var ExportResultCode;
  (function(ExportResultCode2) {
    ExportResultCode2[ExportResultCode2["SUCCESS"] = 0] = "SUCCESS";
    ExportResultCode2[ExportResultCode2["FAILED"] = 1] = "FAILED";
  })(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/propagation/composite.js
var require_composite2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CompositePropagator = undefined;
  var api_1 = require_src();

  class CompositePropagator {
    _propagators;
    _fields;
    constructor(config = {}) {
      this._propagators = config.propagators ?? [];
      this._fields = Array.from(new Set(this._propagators.map((p) => typeof p.fields === "function" ? p.fields() : []).reduce((x, y) => x.concat(y), [])));
    }
    inject(context, carrier, setter) {
      for (const propagator of this._propagators) {
        try {
          propagator.inject(context, carrier, setter);
        } catch (err) {
          api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
        }
      }
    }
    extract(context, carrier, getter) {
      return this._propagators.reduce((ctx, propagator) => {
        try {
          return propagator.extract(ctx, carrier, getter);
        } catch (err) {
          api_1.diag.warn(`Failed to extract with ${propagator.constructor.name}. Err: ${err.message}`);
        }
        return ctx;
      }, context);
    }
    fields() {
      return this._fields.slice();
    }
  }
  exports.CompositePropagator = CompositePropagator;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/internal/validators.js
var require_validators2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.validateValue = exports.validateKey = undefined;
  var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
  var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
  var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
  var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
  var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
  var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
  function validateKey(key) {
    return VALID_KEY_REGEX.test(key);
  }
  exports.validateKey = validateKey;
  function validateValue(value) {
    return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
  }
  exports.validateValue = validateValue;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/TraceState.js
var require_TraceState2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TraceState = undefined;
  var validators_1 = require_validators2();
  var MAX_TRACE_STATE_ITEMS = 32;
  var MAX_TRACE_STATE_LEN = 512;
  var LIST_MEMBERS_SEPARATOR = ",";
  var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";

  class TraceState {
    _internalState = new Map;
    constructor(rawTraceState) {
      if (rawTraceState)
        this._parse(rawTraceState);
    }
    set(key, value) {
      const traceState = this._clone();
      if (traceState._internalState.has(key)) {
        traceState._internalState.delete(key);
      }
      traceState._internalState.set(key, value);
      return traceState;
    }
    unset(key) {
      const traceState = this._clone();
      traceState._internalState.delete(key);
      return traceState;
    }
    get(key) {
      return this._internalState.get(key);
    }
    serialize() {
      return this._keys().reduce((agg, key) => {
        agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
        return agg;
      }, []).join(LIST_MEMBERS_SEPARATOR);
    }
    _parse(rawTraceState) {
      if (rawTraceState.length > MAX_TRACE_STATE_LEN)
        return;
      this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce((agg, part) => {
        const listMember = part.trim();
        const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
        if (i !== -1) {
          const key = listMember.slice(0, i);
          const value = listMember.slice(i + 1, part.length);
          if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {
            agg.set(key, value);
          }
        }
        return agg;
      }, new Map);
      if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
        this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
      }
    }
    _keys() {
      return Array.from(this._internalState.keys()).reverse();
    }
    _clone() {
      const traceState = new TraceState;
      traceState._internalState = new Map(this._internalState);
      return traceState;
    }
  }
  exports.TraceState = TraceState;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js
var require_W3CTraceContextPropagator2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = undefined;
  var api_1 = require_src();
  var suppress_tracing_1 = require_suppress_tracing2();
  var TraceState_1 = require_TraceState2();
  exports.TRACE_PARENT_HEADER = "traceparent";
  exports.TRACE_STATE_HEADER = "tracestate";
  var VERSION = "00";
  var VERSION_PART = "(?!ff)[\\da-f]{2}";
  var TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
  var PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
  var FLAGS_PART = "[\\da-f]{2}";
  var TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`);
  function parseTraceParent(traceParent) {
    const match = TRACE_PARENT_REGEX.exec(traceParent);
    if (!match)
      return null;
    if (match[1] === "00" && match[5])
      return null;
    return {
      traceId: match[2],
      spanId: match[3],
      traceFlags: parseInt(match[4], 16)
    };
  }
  exports.parseTraceParent = parseTraceParent;

  class W3CTraceContextPropagator {
    inject(context, carrier, setter) {
      const spanContext = api_1.trace.getSpanContext(context);
      if (!spanContext || (0, suppress_tracing_1.isTracingSuppressed)(context) || !(0, api_1.isSpanContextValid)(spanContext))
        return;
      const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
      setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);
      if (spanContext.traceState) {
        setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());
      }
    }
    extract(context, carrier, getter) {
      const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);
      if (!traceParentHeader)
        return context;
      const traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
      if (typeof traceParent !== "string")
        return context;
      const spanContext = parseTraceParent(traceParent);
      if (!spanContext)
        return context;
      spanContext.isRemote = true;
      const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);
      if (traceStateHeader) {
        const state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
        spanContext.traceState = new TraceState_1.TraceState(typeof state === "string" ? state : undefined);
      }
      return api_1.trace.setSpanContext(context, spanContext);
    }
    fields() {
      return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];
    }
  }
  exports.W3CTraceContextPropagator = W3CTraceContextPropagator;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js
var require_rpc_metadata2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = undefined;
  var api_1 = require_src();
  var RPC_METADATA_KEY = (0, api_1.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");
  var RPCType;
  (function(RPCType2) {
    RPCType2["HTTP"] = "http";
  })(RPCType = exports.RPCType || (exports.RPCType = {}));
  function setRPCMetadata(context, meta) {
    return context.setValue(RPC_METADATA_KEY, meta);
  }
  exports.setRPCMetadata = setRPCMetadata;
  function deleteRPCMetadata(context) {
    return context.deleteValue(RPC_METADATA_KEY);
  }
  exports.deleteRPCMetadata = deleteRPCMetadata;
  function getRPCMetadata(context) {
    return context.getValue(RPC_METADATA_KEY);
  }
  exports.getRPCMetadata = getRPCMetadata;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js
var require_lodash_merge2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isPlainObject = undefined;
  var objectTag = "[object Object]";
  var nullTag = "[object Null]";
  var undefinedTag = "[object Undefined]";
  var funcProto = Function.prototype;
  var funcToString = funcProto.toString;
  var objectCtorString = funcToString.call(Object);
  var getPrototypeOf = Object.getPrototypeOf;
  var objectProto = Object.prototype;
  var hasOwnProperty2 = objectProto.hasOwnProperty;
  var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  var nativeObjectToString = objectProto.toString;
  function isPlainObject2(value) {
    if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {
      return false;
    }
    const proto = getPrototypeOf(value);
    if (proto === null) {
      return true;
    }
    const Ctor = hasOwnProperty2.call(proto, "constructor") && proto.constructor;
    return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) === objectCtorString;
  }
  exports.isPlainObject = isPlainObject2;
  function isObjectLike(value) {
    return value != null && typeof value == "object";
  }
  function baseGetTag(value) {
    if (value == null) {
      return value === undefined ? undefinedTag : nullTag;
    }
    return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString2(value);
  }
  function getRawTag(value) {
    const isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
    let unmasked = false;
    try {
      value[symToStringTag] = undefined;
      unmasked = true;
    } catch {}
    const result = nativeObjectToString.call(value);
    if (unmasked) {
      if (isOwn) {
        value[symToStringTag] = tag;
      } else {
        delete value[symToStringTag];
      }
    }
    return result;
  }
  function objectToString2(value) {
    return nativeObjectToString.call(value);
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/merge.js
var require_merge2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.merge = undefined;
  var lodash_merge_1 = require_lodash_merge2();
  var MAX_LEVEL = 20;
  function merge2(...args) {
    let result = args.shift();
    const objects = new WeakMap;
    while (args.length > 0) {
      result = mergeTwoObjects(result, args.shift(), 0, objects);
    }
    return result;
  }
  exports.merge = merge2;
  function takeValue(value) {
    if (isArray(value)) {
      return value.slice();
    }
    return value;
  }
  function mergeTwoObjects(one, two, level = 0, objects) {
    let result;
    if (level > MAX_LEVEL) {
      return;
    }
    level++;
    if (isPrimitive2(one) || isPrimitive2(two) || isFunction(two)) {
      result = takeValue(two);
    } else if (isArray(one)) {
      result = one.slice();
      if (isArray(two)) {
        for (let i = 0, j = two.length;i < j; i++) {
          result.push(takeValue(two[i]));
        }
      } else if (isObject(two)) {
        const keys = Object.keys(two);
        for (let i = 0, j = keys.length;i < j; i++) {
          const key = keys[i];
          result[key] = takeValue(two[key]);
        }
      }
    } else if (isObject(one)) {
      if (isObject(two)) {
        if (!shouldMerge(one, two)) {
          return two;
        }
        result = Object.assign({}, one);
        const keys = Object.keys(two);
        for (let i = 0, j = keys.length;i < j; i++) {
          const key = keys[i];
          const twoValue = two[key];
          if (isPrimitive2(twoValue)) {
            if (typeof twoValue === "undefined") {
              delete result[key];
            } else {
              result[key] = twoValue;
            }
          } else {
            const obj1 = result[key];
            const obj2 = twoValue;
            if (wasObjectReferenced(one, key, objects) || wasObjectReferenced(two, key, objects)) {
              delete result[key];
            } else {
              if (isObject(obj1) && isObject(obj2)) {
                const arr1 = objects.get(obj1) || [];
                const arr2 = objects.get(obj2) || [];
                arr1.push({ obj: one, key });
                arr2.push({ obj: two, key });
                objects.set(obj1, arr1);
                objects.set(obj2, arr2);
              }
              result[key] = mergeTwoObjects(result[key], twoValue, level, objects);
            }
          }
        }
      } else {
        result = two;
      }
    }
    return result;
  }
  function wasObjectReferenced(obj, key, objects) {
    const arr = objects.get(obj[key]) || [];
    for (let i = 0, j = arr.length;i < j; i++) {
      const info = arr[i];
      if (info.key === key && info.obj === obj) {
        return true;
      }
    }
    return false;
  }
  function isArray(value) {
    return Array.isArray(value);
  }
  function isFunction(value) {
    return typeof value === "function";
  }
  function isObject(value) {
    return !isPrimitive2(value) && !isArray(value) && !isFunction(value) && typeof value === "object";
  }
  function isPrimitive2(value) {
    return typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "undefined" || value instanceof Date || value instanceof RegExp || value === null;
  }
  function shouldMerge(one, two) {
    if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {
      return false;
    }
    return true;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/timeout.js
var require_timeout2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.callWithTimeout = exports.TimeoutError = undefined;

  class TimeoutError extends Error {
    constructor(message) {
      super(message);
      Object.setPrototypeOf(this, TimeoutError.prototype);
    }
  }
  exports.TimeoutError = TimeoutError;
  function callWithTimeout(promise, timeout) {
    let timeoutHandle;
    const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {
      timeoutHandle = setTimeout(function timeoutHandler() {
        reject(new TimeoutError("Operation timed out."));
      }, timeout);
    });
    return Promise.race([promise, timeoutPromise]).then((result) => {
      clearTimeout(timeoutHandle);
      return result;
    }, (reason) => {
      clearTimeout(timeoutHandle);
      throw reason;
    });
  }
  exports.callWithTimeout = callWithTimeout;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/url.js
var require_url2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isUrlIgnored = exports.urlMatches = undefined;
  function urlMatches(url, urlToMatch) {
    if (typeof urlToMatch === "string") {
      return url === urlToMatch;
    } else {
      return !!url.match(urlToMatch);
    }
  }
  exports.urlMatches = urlMatches;
  function isUrlIgnored(url, ignoredUrls) {
    if (!ignoredUrls) {
      return false;
    }
    for (const ignoreUrl of ignoredUrls) {
      if (urlMatches(url, ignoreUrl)) {
        return true;
      }
    }
    return false;
  }
  exports.isUrlIgnored = isUrlIgnored;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/promise.js
var require_promise2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Deferred = undefined;

  class Deferred {
    _promise;
    _resolve;
    _reject;
    constructor() {
      this._promise = new Promise((resolve2, reject) => {
        this._resolve = resolve2;
        this._reject = reject;
      });
    }
    get promise() {
      return this._promise;
    }
    resolve(val) {
      this._resolve(val);
    }
    reject(err) {
      this._reject(err);
    }
  }
  exports.Deferred = Deferred;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/callback.js
var require_callback2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BindOnceFuture = undefined;
  var promise_1 = require_promise2();

  class BindOnceFuture {
    _isCalled = false;
    _deferred = new promise_1.Deferred;
    _callback;
    _that;
    constructor(callback, that) {
      this._callback = callback;
      this._that = that;
    }
    get isCalled() {
      return this._isCalled;
    }
    get promise() {
      return this._deferred.promise;
    }
    call(...args) {
      if (!this._isCalled) {
        this._isCalled = true;
        try {
          Promise.resolve(this._callback.call(this._that, ...args)).then((val) => this._deferred.resolve(val), (err) => this._deferred.reject(err));
        } catch (err) {
          this._deferred.reject(err);
        }
      }
      return this._deferred.promise;
    }
  }
  exports.BindOnceFuture = BindOnceFuture;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/utils/configuration.js
var require_configuration2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.diagLogLevelFromString = undefined;
  var api_1 = require_src();
  var logLevelMap = {
    ALL: api_1.DiagLogLevel.ALL,
    VERBOSE: api_1.DiagLogLevel.VERBOSE,
    DEBUG: api_1.DiagLogLevel.DEBUG,
    INFO: api_1.DiagLogLevel.INFO,
    WARN: api_1.DiagLogLevel.WARN,
    ERROR: api_1.DiagLogLevel.ERROR,
    NONE: api_1.DiagLogLevel.NONE
  };
  function diagLogLevelFromString(value) {
    if (value == null) {
      return;
    }
    const resolvedLogLevel = logLevelMap[value.toUpperCase()];
    if (resolvedLogLevel == null) {
      api_1.diag.warn(`Unknown log level "${value}", expected one of ${Object.keys(logLevelMap)}, using default`);
      return api_1.DiagLogLevel.INFO;
    }
    return resolvedLogLevel;
  }
  exports.diagLogLevelFromString = diagLogLevelFromString;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/internal/exporter.js
var require_exporter2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports._export = undefined;
  var api_1 = require_src();
  var suppress_tracing_1 = require_suppress_tracing2();
  function _export(exporter, arg) {
    return new Promise((resolve2) => {
      api_1.context.with((0, suppress_tracing_1.suppressTracing)(api_1.context.active()), () => {
        exporter.export(arg, resolve2);
      });
    });
  }
  exports._export = _export;
});

// ../../node_modules/.pnpm/@opentelemetry+core@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/src/index.js
var require_src8 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.internal = exports.diagLogLevelFromString = exports.BindOnceFuture = exports.urlMatches = exports.isUrlIgnored = exports.callWithTimeout = exports.TimeoutError = exports.merge = exports.TraceState = exports.unsuppressTracing = exports.suppressTracing = exports.isTracingSuppressed = exports.setRPCMetadata = exports.getRPCMetadata = exports.deleteRPCMetadata = exports.RPCType = exports.parseTraceParent = exports.W3CTraceContextPropagator = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = exports.CompositePropagator = exports.otperformance = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = exports._globalThis = exports.SDK_INFO = exports.parseKeyPairsIntoRecord = exports.ExportResultCode = exports.unrefTimer = exports.timeInputToHrTime = exports.millisToHrTime = exports.isTimeInputHrTime = exports.isTimeInput = exports.hrTimeToTimeStamp = exports.hrTimeToNanoseconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeDuration = exports.hrTime = exports.getTimeOrigin = exports.addHrTimes = exports.loggingErrorHandler = exports.setGlobalErrorHandler = exports.globalErrorHandler = exports.sanitizeAttributes = exports.isAttributeValue = exports.AnchoredClock = exports.W3CBaggagePropagator = undefined;
  var W3CBaggagePropagator_1 = require_W3CBaggagePropagator2();
  Object.defineProperty(exports, "W3CBaggagePropagator", { enumerable: true, get: function() {
    return W3CBaggagePropagator_1.W3CBaggagePropagator;
  } });
  var anchored_clock_1 = require_anchored_clock2();
  Object.defineProperty(exports, "AnchoredClock", { enumerable: true, get: function() {
    return anchored_clock_1.AnchoredClock;
  } });
  var attributes_1 = require_attributes2();
  Object.defineProperty(exports, "isAttributeValue", { enumerable: true, get: function() {
    return attributes_1.isAttributeValue;
  } });
  Object.defineProperty(exports, "sanitizeAttributes", { enumerable: true, get: function() {
    return attributes_1.sanitizeAttributes;
  } });
  var global_error_handler_1 = require_global_error_handler2();
  Object.defineProperty(exports, "globalErrorHandler", { enumerable: true, get: function() {
    return global_error_handler_1.globalErrorHandler;
  } });
  Object.defineProperty(exports, "setGlobalErrorHandler", { enumerable: true, get: function() {
    return global_error_handler_1.setGlobalErrorHandler;
  } });
  var logging_error_handler_1 = require_logging_error_handler2();
  Object.defineProperty(exports, "loggingErrorHandler", { enumerable: true, get: function() {
    return logging_error_handler_1.loggingErrorHandler;
  } });
  var time_1 = require_time2();
  Object.defineProperty(exports, "addHrTimes", { enumerable: true, get: function() {
    return time_1.addHrTimes;
  } });
  Object.defineProperty(exports, "getTimeOrigin", { enumerable: true, get: function() {
    return time_1.getTimeOrigin;
  } });
  Object.defineProperty(exports, "hrTime", { enumerable: true, get: function() {
    return time_1.hrTime;
  } });
  Object.defineProperty(exports, "hrTimeDuration", { enumerable: true, get: function() {
    return time_1.hrTimeDuration;
  } });
  Object.defineProperty(exports, "hrTimeToMicroseconds", { enumerable: true, get: function() {
    return time_1.hrTimeToMicroseconds;
  } });
  Object.defineProperty(exports, "hrTimeToMilliseconds", { enumerable: true, get: function() {
    return time_1.hrTimeToMilliseconds;
  } });
  Object.defineProperty(exports, "hrTimeToNanoseconds", { enumerable: true, get: function() {
    return time_1.hrTimeToNanoseconds;
  } });
  Object.defineProperty(exports, "hrTimeToTimeStamp", { enumerable: true, get: function() {
    return time_1.hrTimeToTimeStamp;
  } });
  Object.defineProperty(exports, "isTimeInput", { enumerable: true, get: function() {
    return time_1.isTimeInput;
  } });
  Object.defineProperty(exports, "isTimeInputHrTime", { enumerable: true, get: function() {
    return time_1.isTimeInputHrTime;
  } });
  Object.defineProperty(exports, "millisToHrTime", { enumerable: true, get: function() {
    return time_1.millisToHrTime;
  } });
  Object.defineProperty(exports, "timeInputToHrTime", { enumerable: true, get: function() {
    return time_1.timeInputToHrTime;
  } });
  var timer_util_1 = require_timer_util2();
  Object.defineProperty(exports, "unrefTimer", { enumerable: true, get: function() {
    return timer_util_1.unrefTimer;
  } });
  var ExportResult_1 = require_ExportResult2();
  Object.defineProperty(exports, "ExportResultCode", { enumerable: true, get: function() {
    return ExportResult_1.ExportResultCode;
  } });
  var utils_1 = require_utils7();
  Object.defineProperty(exports, "parseKeyPairsIntoRecord", { enumerable: true, get: function() {
    return utils_1.parseKeyPairsIntoRecord;
  } });
  var platform_1 = require_platform4();
  Object.defineProperty(exports, "SDK_INFO", { enumerable: true, get: function() {
    return platform_1.SDK_INFO;
  } });
  Object.defineProperty(exports, "_globalThis", { enumerable: true, get: function() {
    return platform_1._globalThis;
  } });
  Object.defineProperty(exports, "getStringFromEnv", { enumerable: true, get: function() {
    return platform_1.getStringFromEnv;
  } });
  Object.defineProperty(exports, "getBooleanFromEnv", { enumerable: true, get: function() {
    return platform_1.getBooleanFromEnv;
  } });
  Object.defineProperty(exports, "getNumberFromEnv", { enumerable: true, get: function() {
    return platform_1.getNumberFromEnv;
  } });
  Object.defineProperty(exports, "getStringListFromEnv", { enumerable: true, get: function() {
    return platform_1.getStringListFromEnv;
  } });
  Object.defineProperty(exports, "otperformance", { enumerable: true, get: function() {
    return platform_1.otperformance;
  } });
  var composite_1 = require_composite2();
  Object.defineProperty(exports, "CompositePropagator", { enumerable: true, get: function() {
    return composite_1.CompositePropagator;
  } });
  var W3CTraceContextPropagator_1 = require_W3CTraceContextPropagator2();
  Object.defineProperty(exports, "TRACE_PARENT_HEADER", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.TRACE_PARENT_HEADER;
  } });
  Object.defineProperty(exports, "TRACE_STATE_HEADER", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.TRACE_STATE_HEADER;
  } });
  Object.defineProperty(exports, "W3CTraceContextPropagator", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.W3CTraceContextPropagator;
  } });
  Object.defineProperty(exports, "parseTraceParent", { enumerable: true, get: function() {
    return W3CTraceContextPropagator_1.parseTraceParent;
  } });
  var rpc_metadata_1 = require_rpc_metadata2();
  Object.defineProperty(exports, "RPCType", { enumerable: true, get: function() {
    return rpc_metadata_1.RPCType;
  } });
  Object.defineProperty(exports, "deleteRPCMetadata", { enumerable: true, get: function() {
    return rpc_metadata_1.deleteRPCMetadata;
  } });
  Object.defineProperty(exports, "getRPCMetadata", { enumerable: true, get: function() {
    return rpc_metadata_1.getRPCMetadata;
  } });
  Object.defineProperty(exports, "setRPCMetadata", { enumerable: true, get: function() {
    return rpc_metadata_1.setRPCMetadata;
  } });
  var suppress_tracing_1 = require_suppress_tracing2();
  Object.defineProperty(exports, "isTracingSuppressed", { enumerable: true, get: function() {
    return suppress_tracing_1.isTracingSuppressed;
  } });
  Object.defineProperty(exports, "suppressTracing", { enumerable: true, get: function() {
    return suppress_tracing_1.suppressTracing;
  } });
  Object.defineProperty(exports, "unsuppressTracing", { enumerable: true, get: function() {
    return suppress_tracing_1.unsuppressTracing;
  } });
  var TraceState_1 = require_TraceState2();
  Object.defineProperty(exports, "TraceState", { enumerable: true, get: function() {
    return TraceState_1.TraceState;
  } });
  var merge_1 = require_merge2();
  Object.defineProperty(exports, "merge", { enumerable: true, get: function() {
    return merge_1.merge;
  } });
  var timeout_1 = require_timeout2();
  Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function() {
    return timeout_1.TimeoutError;
  } });
  Object.defineProperty(exports, "callWithTimeout", { enumerable: true, get: function() {
    return timeout_1.callWithTimeout;
  } });
  var url_1 = require_url2();
  Object.defineProperty(exports, "isUrlIgnored", { enumerable: true, get: function() {
    return url_1.isUrlIgnored;
  } });
  Object.defineProperty(exports, "urlMatches", { enumerable: true, get: function() {
    return url_1.urlMatches;
  } });
  var callback_1 = require_callback2();
  Object.defineProperty(exports, "BindOnceFuture", { enumerable: true, get: function() {
    return callback_1.BindOnceFuture;
  } });
  var configuration_1 = require_configuration2();
  Object.defineProperty(exports, "diagLogLevelFromString", { enumerable: true, get: function() {
    return configuration_1.diagLogLevelFromString;
  } });
  var exporter_1 = require_exporter2();
  exports.internal = {
    _export: exporter_1._export
  };
});

// ../../node_modules/.pnpm/@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js
var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AbstractAsyncHooksContextManager = undefined;
  var events_1 = __require("events");
  var ADD_LISTENER_METHODS = [
    "addListener",
    "on",
    "once",
    "prependListener",
    "prependOnceListener"
  ];

  class AbstractAsyncHooksContextManager {
    bind(context5, target) {
      if (target instanceof events_1.EventEmitter) {
        return this._bindEventEmitter(context5, target);
      }
      if (typeof target === "function") {
        return this._bindFunction(context5, target);
      }
      return target;
    }
    _bindFunction(context5, target) {
      const manager = this;
      const contextWrapper = function(...args) {
        return manager.with(context5, () => target.apply(this, args));
      };
      Object.defineProperty(contextWrapper, "length", {
        enumerable: false,
        configurable: true,
        writable: false,
        value: target.length
      });
      return contextWrapper;
    }
    _bindEventEmitter(context5, ee) {
      const map = this._getPatchMap(ee);
      if (map !== undefined)
        return ee;
      this._createPatchMap(ee);
      ADD_LISTENER_METHODS.forEach((methodName) => {
        if (ee[methodName] === undefined)
          return;
        ee[methodName] = this._patchAddListener(ee, ee[methodName], context5);
      });
      if (typeof ee.removeListener === "function") {
        ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);
      }
      if (typeof ee.off === "function") {
        ee.off = this._patchRemoveListener(ee, ee.off);
      }
      if (typeof ee.removeAllListeners === "function") {
        ee.removeAllListeners = this._patchRemoveAllListeners(ee, ee.removeAllListeners);
      }
      return ee;
    }
    _patchRemoveListener(ee, original) {
      const contextManager = this;
      return function(event, listener) {
        const events = contextManager._getPatchMap(ee)?.[event];
        if (events === undefined) {
          return original.call(this, event, listener);
        }
        const patchedListener = events.get(listener);
        return original.call(this, event, patchedListener || listener);
      };
    }
    _patchRemoveAllListeners(ee, original) {
      const contextManager = this;
      return function(event) {
        const map = contextManager._getPatchMap(ee);
        if (map !== undefined) {
          if (arguments.length === 0) {
            contextManager._createPatchMap(ee);
          } else if (map[event] !== undefined) {
            delete map[event];
          }
        }
        return original.apply(this, arguments);
      };
    }
    _patchAddListener(ee, original, context5) {
      const contextManager = this;
      return function(event, listener) {
        if (contextManager._wrapped) {
          return original.call(this, event, listener);
        }
        let map = contextManager._getPatchMap(ee);
        if (map === undefined) {
          map = contextManager._createPatchMap(ee);
        }
        let listeners = map[event];
        if (listeners === undefined) {
          listeners = new WeakMap;
          map[event] = listeners;
        }
        const patchedListener = contextManager.bind(context5, listener);
        listeners.set(listener, patchedListener);
        contextManager._wrapped = true;
        try {
          return original.call(this, event, patchedListener);
        } finally {
          contextManager._wrapped = false;
        }
      };
    }
    _createPatchMap(ee) {
      const map = Object.create(null);
      ee[this._kOtListeners] = map;
      return map;
    }
    _getPatchMap(ee) {
      return ee[this._kOtListeners];
    }
    _kOtListeners = Symbol("OtListeners");
    _wrapped = false;
  }
  exports.AbstractAsyncHooksContextManager = AbstractAsyncHooksContextManager;
});

// ../../node_modules/.pnpm/@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncHooksContextManager.js
var require_AsyncHooksContextManager = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AsyncHooksContextManager = undefined;
  var api_1 = require_src();
  var asyncHooks = __require("async_hooks");
  var AbstractAsyncHooksContextManager_1 = require_AbstractAsyncHooksContextManager();

  class AsyncHooksContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {
    _asyncHook;
    _contexts = new Map;
    _stack = [];
    constructor() {
      super();
      this._asyncHook = asyncHooks.createHook({
        init: this._init.bind(this),
        before: this._before.bind(this),
        after: this._after.bind(this),
        destroy: this._destroy.bind(this),
        promiseResolve: this._destroy.bind(this)
      });
    }
    active() {
      return this._stack[this._stack.length - 1] ?? api_1.ROOT_CONTEXT;
    }
    with(context5, fn, thisArg, ...args) {
      this._enterContext(context5);
      try {
        return fn.call(thisArg, ...args);
      } finally {
        this._exitContext();
      }
    }
    enable() {
      this._asyncHook.enable();
      return this;
    }
    disable() {
      this._asyncHook.disable();
      this._contexts.clear();
      this._stack = [];
      return this;
    }
    _init(uid, type) {
      if (type === "TIMERWRAP")
        return;
      const context5 = this._stack[this._stack.length - 1];
      if (context5 !== undefined) {
        this._contexts.set(uid, context5);
      }
    }
    _destroy(uid) {
      this._contexts.delete(uid);
    }
    _before(uid) {
      const context5 = this._contexts.get(uid);
      if (context5 !== undefined) {
        this._enterContext(context5);
      }
    }
    _after() {
      this._exitContext();
    }
    _enterContext(context5) {
      this._stack.push(context5);
    }
    _exitContext() {
      this._stack.pop();
    }
  }
  exports.AsyncHooksContextManager = AsyncHooksContextManager;
});

// ../../node_modules/.pnpm/@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js
var require_AsyncLocalStorageContextManager = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AsyncLocalStorageContextManager = undefined;
  var api_1 = require_src();
  var async_hooks_1 = __require("async_hooks");
  var AbstractAsyncHooksContextManager_1 = require_AbstractAsyncHooksContextManager();

  class AsyncLocalStorageContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {
    _asyncLocalStorage;
    constructor() {
      super();
      this._asyncLocalStorage = new async_hooks_1.AsyncLocalStorage;
    }
    active() {
      return this._asyncLocalStorage.getStore() ?? api_1.ROOT_CONTEXT;
    }
    with(context5, fn, thisArg, ...args) {
      const cb = thisArg == null ? fn : fn.bind(thisArg);
      return this._asyncLocalStorage.run(context5, cb, ...args);
    }
    enable() {
      return this;
    }
    disable() {
      this._asyncLocalStorage.disable();
      return this;
    }
  }
  exports.AsyncLocalStorageContextManager = AsyncLocalStorageContextManager;
});

// ../../node_modules/.pnpm/@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/context-async-hooks/build/src/index.js
var require_src9 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = undefined;
  var AsyncHooksContextManager_1 = require_AsyncHooksContextManager();
  Object.defineProperty(exports, "AsyncHooksContextManager", { enumerable: true, get: function() {
    return AsyncHooksContextManager_1.AsyncHooksContextManager;
  } });
  var AsyncLocalStorageContextManager_1 = require_AsyncLocalStorageContextManager();
  Object.defineProperty(exports, "AsyncLocalStorageContextManager", { enumerable: true, get: function() {
    return AsyncLocalStorageContextManager_1.AsyncLocalStorageContextManager;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/default-service-name.js
var require_default_service_name = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports._clearDefaultServiceNameCache = exports.defaultServiceName = undefined;
  var serviceName;
  function defaultServiceName() {
    if (serviceName === undefined) {
      try {
        const argv0 = globalThis.process.argv0;
        serviceName = argv0 ? `unknown_service:${argv0}` : "unknown_service";
      } catch {
        serviceName = "unknown_service";
      }
    }
    return serviceName;
  }
  exports.defaultServiceName = defaultServiceName;
  function _clearDefaultServiceNameCache() {
    serviceName = undefined;
  }
  exports._clearDefaultServiceNameCache = _clearDefaultServiceNameCache;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/utils.js
var require_utils8 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isPromiseLike = undefined;
  var isPromiseLike = (val) => {
    return val !== null && typeof val === "object" && typeof val.then === "function";
  };
  exports.isPromiseLike = isPromiseLike;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/ResourceImpl.js
var require_ResourceImpl = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.defaultResource = exports.emptyResource = exports.resourceFromDetectedResource = exports.resourceFromAttributes = undefined;
  var api_1 = require_src();
  var core_1 = require_src8();
  var semantic_conventions_1 = require_src2();
  var default_service_name_1 = require_default_service_name();
  var utils_1 = require_utils8();

  class ResourceImpl {
    _rawAttributes;
    _asyncAttributesPending = false;
    _schemaUrl;
    _memoizedAttributes;
    static FromAttributeList(attributes, options) {
      const res = new ResourceImpl({}, options);
      res._rawAttributes = guardedRawAttributes(attributes);
      res._asyncAttributesPending = attributes.filter(([_, val]) => (0, utils_1.isPromiseLike)(val)).length > 0;
      return res;
    }
    constructor(resource, options) {
      const attributes = resource.attributes ?? {};
      this._rawAttributes = Object.entries(attributes).map(([k, v]) => {
        if ((0, utils_1.isPromiseLike)(v)) {
          this._asyncAttributesPending = true;
        }
        return [k, v];
      });
      this._rawAttributes = guardedRawAttributes(this._rawAttributes);
      this._schemaUrl = validateSchemaUrl(options?.schemaUrl);
    }
    get asyncAttributesPending() {
      return this._asyncAttributesPending;
    }
    async waitForAsyncAttributes() {
      if (!this.asyncAttributesPending) {
        return;
      }
      for (let i = 0;i < this._rawAttributes.length; i++) {
        const [k, v] = this._rawAttributes[i];
        this._rawAttributes[i] = [k, (0, utils_1.isPromiseLike)(v) ? await v : v];
      }
      this._asyncAttributesPending = false;
    }
    get attributes() {
      if (this.asyncAttributesPending) {
        api_1.diag.error("Accessing resource attributes before async attributes settled");
      }
      if (this._memoizedAttributes) {
        return this._memoizedAttributes;
      }
      const attrs = {};
      for (const [k, v] of this._rawAttributes) {
        if ((0, utils_1.isPromiseLike)(v)) {
          api_1.diag.debug(`Unsettled resource attribute ${k} skipped`);
          continue;
        }
        if (v != null) {
          attrs[k] ??= v;
        }
      }
      if (!this._asyncAttributesPending) {
        this._memoizedAttributes = attrs;
      }
      return attrs;
    }
    getRawAttributes() {
      return this._rawAttributes;
    }
    get schemaUrl() {
      return this._schemaUrl;
    }
    merge(resource) {
      if (resource == null)
        return this;
      const mergedSchemaUrl = mergeSchemaUrl(this, resource);
      const mergedOptions = mergedSchemaUrl ? { schemaUrl: mergedSchemaUrl } : undefined;
      return ResourceImpl.FromAttributeList([...resource.getRawAttributes(), ...this.getRawAttributes()], mergedOptions);
    }
  }
  function resourceFromAttributes(attributes, options) {
    return ResourceImpl.FromAttributeList(Object.entries(attributes), options);
  }
  exports.resourceFromAttributes = resourceFromAttributes;
  function resourceFromDetectedResource(detectedResource, options) {
    return new ResourceImpl(detectedResource, options);
  }
  exports.resourceFromDetectedResource = resourceFromDetectedResource;
  function emptyResource() {
    return resourceFromAttributes({});
  }
  exports.emptyResource = emptyResource;
  function defaultResource() {
    return resourceFromAttributes({
      [semantic_conventions_1.ATTR_SERVICE_NAME]: (0, default_service_name_1.defaultServiceName)(),
      [semantic_conventions_1.ATTR_TELEMETRY_SDK_LANGUAGE]: core_1.SDK_INFO[semantic_conventions_1.ATTR_TELEMETRY_SDK_LANGUAGE],
      [semantic_conventions_1.ATTR_TELEMETRY_SDK_NAME]: core_1.SDK_INFO[semantic_conventions_1.ATTR_TELEMETRY_SDK_NAME],
      [semantic_conventions_1.ATTR_TELEMETRY_SDK_VERSION]: core_1.SDK_INFO[semantic_conventions_1.ATTR_TELEMETRY_SDK_VERSION]
    });
  }
  exports.defaultResource = defaultResource;
  function guardedRawAttributes(attributes) {
    return attributes.map(([k, v]) => {
      if ((0, utils_1.isPromiseLike)(v)) {
        return [
          k,
          v.catch((err) => {
            api_1.diag.debug("promise rejection for resource attribute: %s - %s", k, err);
            return;
          })
        ];
      }
      return [k, v];
    });
  }
  function validateSchemaUrl(schemaUrl) {
    if (typeof schemaUrl === "string" || schemaUrl === undefined) {
      return schemaUrl;
    }
    api_1.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.", schemaUrl);
    return;
  }
  function mergeSchemaUrl(old, updating) {
    const oldSchemaUrl = old?.schemaUrl;
    const updatingSchemaUrl = updating?.schemaUrl;
    const isOldEmpty = oldSchemaUrl === undefined || oldSchemaUrl === "";
    const isUpdatingEmpty = updatingSchemaUrl === undefined || updatingSchemaUrl === "";
    if (isOldEmpty) {
      return updatingSchemaUrl;
    }
    if (isUpdatingEmpty) {
      return oldSchemaUrl;
    }
    if (oldSchemaUrl === updatingSchemaUrl) {
      return oldSchemaUrl;
    }
    api_1.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.', oldSchemaUrl, updatingSchemaUrl);
    return;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detect-resources.js
var require_detect_resources = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.detectResources = undefined;
  var api_1 = require_src();
  var ResourceImpl_1 = require_ResourceImpl();
  var detectResources = (config = {}) => {
    const resources = (config.detectors || []).map((d) => {
      try {
        const resource = (0, ResourceImpl_1.resourceFromDetectedResource)(d.detect(config));
        api_1.diag.debug(`${d.constructor.name} found resource.`, resource);
        return resource;
      } catch (e) {
        api_1.diag.debug(`${d.constructor.name} failed: ${e.message}`);
        return (0, ResourceImpl_1.emptyResource)();
      }
    });
    return resources.reduce((acc, resource) => acc.merge(resource), (0, ResourceImpl_1.emptyResource)());
  };
  exports.detectResources = detectResources;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js
var require_EnvDetector = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.envDetector = undefined;
  var api_1 = require_src();
  var semantic_conventions_1 = require_src2();
  var core_1 = require_src8();

  class EnvDetector {
    _MAX_LENGTH = 255;
    _COMMA_SEPARATOR = ",";
    _LABEL_KEY_VALUE_SPLITTER = "=";
    detect(_config) {
      const attributes = {};
      const rawAttributes = (0, core_1.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES");
      const serviceName = (0, core_1.getStringFromEnv)("OTEL_SERVICE_NAME");
      if (rawAttributes) {
        try {
          const parsedAttributes = this._parseResourceAttributes(rawAttributes);
          Object.assign(attributes, parsedAttributes);
        } catch (e) {
          api_1.diag.debug(`EnvDetector failed: ${e instanceof Error ? e.message : e}`);
        }
      }
      if (serviceName) {
        attributes[semantic_conventions_1.ATTR_SERVICE_NAME] = serviceName;
      }
      return { attributes };
    }
    _parseResourceAttributes(rawEnvAttributes) {
      if (!rawEnvAttributes)
        return {};
      const attributes = {};
      const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR);
      for (const rawAttribute of rawAttributes) {
        const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER);
        if (keyValuePair.length !== 2) {
          throw new Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${rawAttribute}". ` + `Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);
        }
        const [rawKey, rawValue] = keyValuePair;
        const key = rawKey.trim();
        const value = rawValue.trim();
        if (key.length === 0) {
          throw new Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${rawAttribute}".`);
        }
        let decodedKey;
        let decodedValue;
        try {
          decodedKey = decodeURIComponent(key);
          decodedValue = decodeURIComponent(value);
        } catch (e) {
          throw new Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${rawAttribute}": ${e instanceof Error ? e.message : e}`);
        }
        if (decodedKey.length > this._MAX_LENGTH) {
          throw new Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${decodedKey}".`);
        }
        if (decodedValue.length > this._MAX_LENGTH) {
          throw new Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${decodedKey}".`);
        }
        attributes[decodedKey] = decodedValue;
      }
      return attributes;
    }
  }
  exports.envDetector = new EnvDetector;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/semconv.js
var require_semconv4 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ATTR_WEBENGINE_VERSION = exports.ATTR_WEBENGINE_NAME = exports.ATTR_WEBENGINE_DESCRIPTION = exports.ATTR_SERVICE_NAMESPACE = exports.ATTR_SERVICE_INSTANCE_ID = exports.ATTR_PROCESS_RUNTIME_VERSION = exports.ATTR_PROCESS_RUNTIME_NAME = exports.ATTR_PROCESS_RUNTIME_DESCRIPTION = exports.ATTR_PROCESS_PID = exports.ATTR_PROCESS_OWNER = exports.ATTR_PROCESS_EXECUTABLE_PATH = exports.ATTR_PROCESS_EXECUTABLE_NAME = exports.ATTR_PROCESS_COMMAND_ARGS = exports.ATTR_PROCESS_COMMAND = exports.ATTR_OS_VERSION = exports.ATTR_OS_TYPE = exports.ATTR_K8S_POD_NAME = exports.ATTR_K8S_NAMESPACE_NAME = exports.ATTR_K8S_DEPLOYMENT_NAME = exports.ATTR_K8S_CLUSTER_NAME = exports.ATTR_HOST_TYPE = exports.ATTR_HOST_NAME = exports.ATTR_HOST_IMAGE_VERSION = exports.ATTR_HOST_IMAGE_NAME = exports.ATTR_HOST_IMAGE_ID = exports.ATTR_HOST_ID = exports.ATTR_HOST_ARCH = exports.ATTR_CONTAINER_NAME = exports.ATTR_CONTAINER_IMAGE_TAGS = exports.ATTR_CONTAINER_IMAGE_NAME = exports.ATTR_CONTAINER_ID = exports.ATTR_CLOUD_REGION = exports.ATTR_CLOUD_PROVIDER = exports.ATTR_CLOUD_AVAILABILITY_ZONE = exports.ATTR_CLOUD_ACCOUNT_ID = undefined;
  exports.ATTR_CLOUD_ACCOUNT_ID = "cloud.account.id";
  exports.ATTR_CLOUD_AVAILABILITY_ZONE = "cloud.availability_zone";
  exports.ATTR_CLOUD_PROVIDER = "cloud.provider";
  exports.ATTR_CLOUD_REGION = "cloud.region";
  exports.ATTR_CONTAINER_ID = "container.id";
  exports.ATTR_CONTAINER_IMAGE_NAME = "container.image.name";
  exports.ATTR_CONTAINER_IMAGE_TAGS = "container.image.tags";
  exports.ATTR_CONTAINER_NAME = "container.name";
  exports.ATTR_HOST_ARCH = "host.arch";
  exports.ATTR_HOST_ID = "host.id";
  exports.ATTR_HOST_IMAGE_ID = "host.image.id";
  exports.ATTR_HOST_IMAGE_NAME = "host.image.name";
  exports.ATTR_HOST_IMAGE_VERSION = "host.image.version";
  exports.ATTR_HOST_NAME = "host.name";
  exports.ATTR_HOST_TYPE = "host.type";
  exports.ATTR_K8S_CLUSTER_NAME = "k8s.cluster.name";
  exports.ATTR_K8S_DEPLOYMENT_NAME = "k8s.deployment.name";
  exports.ATTR_K8S_NAMESPACE_NAME = "k8s.namespace.name";
  exports.ATTR_K8S_POD_NAME = "k8s.pod.name";
  exports.ATTR_OS_TYPE = "os.type";
  exports.ATTR_OS_VERSION = "os.version";
  exports.ATTR_PROCESS_COMMAND = "process.command";
  exports.ATTR_PROCESS_COMMAND_ARGS = "process.command_args";
  exports.ATTR_PROCESS_EXECUTABLE_NAME = "process.executable.name";
  exports.ATTR_PROCESS_EXECUTABLE_PATH = "process.executable.path";
  exports.ATTR_PROCESS_OWNER = "process.owner";
  exports.ATTR_PROCESS_PID = "process.pid";
  exports.ATTR_PROCESS_RUNTIME_DESCRIPTION = "process.runtime.description";
  exports.ATTR_PROCESS_RUNTIME_NAME = "process.runtime.name";
  exports.ATTR_PROCESS_RUNTIME_VERSION = "process.runtime.version";
  exports.ATTR_SERVICE_INSTANCE_ID = "service.instance.id";
  exports.ATTR_SERVICE_NAMESPACE = "service.namespace";
  exports.ATTR_WEBENGINE_DESCRIPTION = "webengine.description";
  exports.ATTR_WEBENGINE_NAME = "webengine.name";
  exports.ATTR_WEBENGINE_VERSION = "webengine.version";
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
var require_execAsync = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.execAsync = undefined;
  var child_process = __require("child_process");
  var util = __require("util");
  exports.execAsync = util.promisify(child_process.exec);
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
var require_getMachineId_darwin = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getMachineId = undefined;
  var execAsync_1 = require_execAsync();
  var api_1 = require_src();
  async function getMachineId() {
    try {
      const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"');
      const idLine = result.stdout.split(`
`).find((line) => line.includes("IOPlatformUUID"));
      if (!idLine) {
        return;
      }
      const parts = idLine.split('" = "');
      if (parts.length === 2) {
        return parts[1].slice(0, -1);
      }
    } catch (e) {
      api_1.diag.debug(`error reading machine id: ${e}`);
    }
    return;
  }
  exports.getMachineId = getMachineId;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js
var require_getMachineId_linux = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getMachineId = undefined;
  var fs_1 = __require("fs");
  var api_1 = require_src();
  async function getMachineId() {
    const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
    for (const path of paths) {
      try {
        const result = await fs_1.promises.readFile(path, { encoding: "utf8" });
        return result.trim();
      } catch (e) {
        api_1.diag.debug(`error reading machine id: ${e}`);
      }
    }
    return;
  }
  exports.getMachineId = getMachineId;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js
var require_getMachineId_bsd = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getMachineId = undefined;
  var fs_1 = __require("fs");
  var execAsync_1 = require_execAsync();
  var api_1 = require_src();
  async function getMachineId() {
    try {
      const result = await fs_1.promises.readFile("/etc/hostid", { encoding: "utf8" });
      return result.trim();
    } catch (e) {
      api_1.diag.debug(`error reading machine id: ${e}`);
    }
    try {
      const result = await (0, execAsync_1.execAsync)("kenv -q smbios.system.uuid");
      return result.stdout.trim();
    } catch (e) {
      api_1.diag.debug(`error reading machine id: ${e}`);
    }
    return;
  }
  exports.getMachineId = getMachineId;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js
var require_getMachineId_win = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getMachineId = undefined;
  var process2 = __require("process");
  var execAsync_1 = require_execAsync();
  var api_1 = require_src();
  async function getMachineId() {
    const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
    let command = "%windir%\\System32\\REG.exe";
    if (process2.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process2.env) {
      command = "%windir%\\sysnative\\cmd.exe /c " + command;
    }
    try {
      const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
      const parts = result.stdout.split("REG_SZ");
      if (parts.length === 2) {
        return parts[1].trim();
      }
    } catch (e) {
      api_1.diag.debug(`error reading machine id: ${e}`);
    }
    return;
  }
  exports.getMachineId = getMachineId;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js
var require_getMachineId_unsupported = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getMachineId = undefined;
  var api_1 = require_src();
  async function getMachineId() {
    api_1.diag.debug("could not read machine-id: unsupported platform");
    return;
  }
  exports.getMachineId = getMachineId;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId.js
var require_getMachineId = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getMachineId = undefined;
  var process2 = __require("process");
  var getMachineIdImpl;
  async function getMachineId() {
    if (!getMachineIdImpl) {
      switch (process2.platform) {
        case "darwin":
          getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_darwin()))).getMachineId;
          break;
        case "linux":
          getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_linux()))).getMachineId;
          break;
        case "freebsd":
          getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_bsd()))).getMachineId;
          break;
        case "win32":
          getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_win()))).getMachineId;
          break;
        default:
          getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_unsupported()))).getMachineId;
          break;
      }
    }
    return getMachineIdImpl();
  }
  exports.getMachineId = getMachineId;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/utils.js
var require_utils9 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.normalizeType = exports.normalizeArch = undefined;
  var normalizeArch = (nodeArchString) => {
    switch (nodeArchString) {
      case "arm":
        return "arm32";
      case "ppc":
        return "ppc32";
      case "x64":
        return "amd64";
      default:
        return nodeArchString;
    }
  };
  exports.normalizeArch = normalizeArch;
  var normalizeType = (nodePlatform) => {
    switch (nodePlatform) {
      case "sunos":
        return "solaris";
      case "win32":
        return "windows";
      default:
        return nodePlatform;
    }
  };
  exports.normalizeType = normalizeType;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/HostDetector.js
var require_HostDetector = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.hostDetector = undefined;
  var semconv_1 = require_semconv4();
  var os_1 = __require("os");
  var getMachineId_1 = require_getMachineId();
  var utils_1 = require_utils9();

  class HostDetector {
    detect(_config) {
      const attributes = {
        [semconv_1.ATTR_HOST_NAME]: (0, os_1.hostname)(),
        [semconv_1.ATTR_HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()),
        [semconv_1.ATTR_HOST_ID]: (0, getMachineId_1.getMachineId)()
      };
      return { attributes };
    }
  }
  exports.hostDetector = new HostDetector;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/OSDetector.js
var require_OSDetector = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.osDetector = undefined;
  var semconv_1 = require_semconv4();
  var os_1 = __require("os");
  var utils_1 = require_utils9();

  class OSDetector {
    detect(_config) {
      const attributes = {
        [semconv_1.ATTR_OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()),
        [semconv_1.ATTR_OS_VERSION]: (0, os_1.release)()
      };
      return { attributes };
    }
  }
  exports.osDetector = new OSDetector;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ProcessDetector.js
var require_ProcessDetector = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.processDetector = undefined;
  var api_1 = require_src();
  var semconv_1 = require_semconv4();
  var os = __require("os");

  class ProcessDetector {
    detect(_config) {
      const attributes = {
        [semconv_1.ATTR_PROCESS_PID]: process.pid,
        [semconv_1.ATTR_PROCESS_EXECUTABLE_NAME]: process.title,
        [semconv_1.ATTR_PROCESS_EXECUTABLE_PATH]: process.execPath,
        [semconv_1.ATTR_PROCESS_COMMAND_ARGS]: [
          process.argv[0],
          ...process.execArgv,
          ...process.argv.slice(1)
        ],
        [semconv_1.ATTR_PROCESS_RUNTIME_VERSION]: process.versions.node,
        [semconv_1.ATTR_PROCESS_RUNTIME_NAME]: "nodejs",
        [semconv_1.ATTR_PROCESS_RUNTIME_DESCRIPTION]: "Node.js"
      };
      if (process.argv.length > 1) {
        attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
      }
      try {
        const userInfo = os.userInfo();
        attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
      } catch (e) {
        api_1.diag.debug(`error obtaining process owner: ${e}`);
      }
      return { attributes };
    }
  }
  exports.processDetector = new ProcessDetector;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ServiceInstanceIdDetector.js
var require_ServiceInstanceIdDetector = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.serviceInstanceIdDetector = undefined;
  var semconv_1 = require_semconv4();
  var crypto_1 = __require("crypto");

  class ServiceInstanceIdDetector {
    detect(_config) {
      return {
        attributes: {
          [semconv_1.ATTR_SERVICE_INSTANCE_ID]: (0, crypto_1.randomUUID)()
        }
      };
    }
  }
  exports.serviceInstanceIdDetector = new ServiceInstanceIdDetector;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/index.js
var require_node6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = undefined;
  var HostDetector_1 = require_HostDetector();
  Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function() {
    return HostDetector_1.hostDetector;
  } });
  var OSDetector_1 = require_OSDetector();
  Object.defineProperty(exports, "osDetector", { enumerable: true, get: function() {
    return OSDetector_1.osDetector;
  } });
  var ProcessDetector_1 = require_ProcessDetector();
  Object.defineProperty(exports, "processDetector", { enumerable: true, get: function() {
    return ProcessDetector_1.processDetector;
  } });
  var ServiceInstanceIdDetector_1 = require_ServiceInstanceIdDetector();
  Object.defineProperty(exports, "serviceInstanceIdDetector", { enumerable: true, get: function() {
    return ServiceInstanceIdDetector_1.serviceInstanceIdDetector;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/index.js
var require_platform5 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = undefined;
  var node_1 = require_node6();
  Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function() {
    return node_1.hostDetector;
  } });
  Object.defineProperty(exports, "osDetector", { enumerable: true, get: function() {
    return node_1.osDetector;
  } });
  Object.defineProperty(exports, "processDetector", { enumerable: true, get: function() {
    return node_1.processDetector;
  } });
  Object.defineProperty(exports, "serviceInstanceIdDetector", { enumerable: true, get: function() {
    return node_1.serviceInstanceIdDetector;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/NoopDetector.js
var require_NoopDetector = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.noopDetector = exports.NoopDetector = undefined;

  class NoopDetector {
    detect() {
      return {
        attributes: {}
      };
    }
  }
  exports.NoopDetector = NoopDetector;
  exports.noopDetector = new NoopDetector;
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/index.js
var require_detectors = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.noopDetector = exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = exports.envDetector = undefined;
  var EnvDetector_1 = require_EnvDetector();
  Object.defineProperty(exports, "envDetector", { enumerable: true, get: function() {
    return EnvDetector_1.envDetector;
  } });
  var platform_1 = require_platform5();
  Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function() {
    return platform_1.hostDetector;
  } });
  Object.defineProperty(exports, "osDetector", { enumerable: true, get: function() {
    return platform_1.osDetector;
  } });
  Object.defineProperty(exports, "processDetector", { enumerable: true, get: function() {
    return platform_1.processDetector;
  } });
  Object.defineProperty(exports, "serviceInstanceIdDetector", { enumerable: true, get: function() {
    return platform_1.serviceInstanceIdDetector;
  } });
  var NoopDetector_1 = require_NoopDetector();
  Object.defineProperty(exports, "noopDetector", { enumerable: true, get: function() {
    return NoopDetector_1.noopDetector;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+resources@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/index.js
var require_src10 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.defaultServiceName = exports.emptyResource = exports.defaultResource = exports.resourceFromAttributes = exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = exports.envDetector = exports.detectResources = undefined;
  var detect_resources_1 = require_detect_resources();
  Object.defineProperty(exports, "detectResources", { enumerable: true, get: function() {
    return detect_resources_1.detectResources;
  } });
  var detectors_1 = require_detectors();
  Object.defineProperty(exports, "envDetector", { enumerable: true, get: function() {
    return detectors_1.envDetector;
  } });
  Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function() {
    return detectors_1.hostDetector;
  } });
  Object.defineProperty(exports, "osDetector", { enumerable: true, get: function() {
    return detectors_1.osDetector;
  } });
  Object.defineProperty(exports, "processDetector", { enumerable: true, get: function() {
    return detectors_1.processDetector;
  } });
  Object.defineProperty(exports, "serviceInstanceIdDetector", { enumerable: true, get: function() {
    return detectors_1.serviceInstanceIdDetector;
  } });
  var ResourceImpl_1 = require_ResourceImpl();
  Object.defineProperty(exports, "resourceFromAttributes", { enumerable: true, get: function() {
    return ResourceImpl_1.resourceFromAttributes;
  } });
  Object.defineProperty(exports, "defaultResource", { enumerable: true, get: function() {
    return ResourceImpl_1.defaultResource;
  } });
  Object.defineProperty(exports, "emptyResource", { enumerable: true, get: function() {
    return ResourceImpl_1.emptyResource;
  } });
  var default_service_name_1 = require_default_service_name();
  Object.defineProperty(exports, "defaultServiceName", { enumerable: true, get: function() {
    return default_service_name_1.defaultServiceName;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/enums.js
var require_enums = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ExceptionEventName = undefined;
  exports.ExceptionEventName = "exception";
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.js
var require_Span = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SpanImpl = undefined;
  var api_1 = require_src();
  var core_1 = require_src8();
  var semantic_conventions_1 = require_src2();
  var enums_1 = require_enums();

  class SpanImpl {
    _spanContext;
    kind;
    parentSpanContext;
    attributes = {};
    links = [];
    events = [];
    startTime;
    resource;
    instrumentationScope;
    _droppedAttributesCount = 0;
    _droppedEventsCount = 0;
    _droppedLinksCount = 0;
    _attributesCount = 0;
    name;
    status = {
      code: api_1.SpanStatusCode.UNSET
    };
    endTime = [0, 0];
    _ended = false;
    _duration = [-1, -1];
    _spanProcessor;
    _spanLimits;
    _attributeValueLengthLimit;
    _recordEndMetrics;
    _performanceStartTime;
    _performanceOffset;
    _startTimeProvided;
    constructor(opts) {
      const now = Date.now();
      this._spanContext = opts.spanContext;
      this._performanceStartTime = core_1.otperformance.now();
      this._performanceOffset = now - (this._performanceStartTime + core_1.otperformance.timeOrigin);
      this._startTimeProvided = opts.startTime != null;
      this._spanLimits = opts.spanLimits;
      this._attributeValueLengthLimit = this._spanLimits.attributeValueLengthLimit ?? 0;
      this._spanProcessor = opts.spanProcessor;
      this.name = opts.name;
      this.parentSpanContext = opts.parentSpanContext;
      this.kind = opts.kind;
      if (opts.links) {
        for (const link of opts.links) {
          this.addLink(link);
        }
      }
      this.startTime = this._getTime(opts.startTime ?? now);
      this.resource = opts.resource;
      this.instrumentationScope = opts.scope;
      this._recordEndMetrics = opts.recordEndMetrics;
      if (opts.attributes != null) {
        this.setAttributes(opts.attributes);
      }
      this._spanProcessor.onStart(this, opts.context);
    }
    spanContext() {
      return this._spanContext;
    }
    setAttribute(key, value) {
      if (value == null || this._isSpanEnded())
        return this;
      if (key.length === 0) {
        api_1.diag.warn(`Invalid attribute key: ${key}`);
        return this;
      }
      if (!(0, core_1.isAttributeValue)(value)) {
        api_1.diag.warn(`Invalid attribute value set for key: ${key}`);
        return this;
      }
      const { attributeCountLimit } = this._spanLimits;
      const isNewKey = !Object.prototype.hasOwnProperty.call(this.attributes, key);
      if (attributeCountLimit !== undefined && this._attributesCount >= attributeCountLimit && isNewKey) {
        this._droppedAttributesCount++;
        return this;
      }
      this.attributes[key] = this._truncateToSize(value);
      if (isNewKey) {
        this._attributesCount++;
      }
      return this;
    }
    setAttributes(attributes) {
      for (const key in attributes) {
        if (Object.prototype.hasOwnProperty.call(attributes, key)) {
          this.setAttribute(key, attributes[key]);
        }
      }
      return this;
    }
    addEvent(name, attributesOrStartTime, timeStamp) {
      if (this._isSpanEnded())
        return this;
      const { eventCountLimit } = this._spanLimits;
      if (eventCountLimit === 0) {
        api_1.diag.warn("No events allowed.");
        this._droppedEventsCount++;
        return this;
      }
      if (eventCountLimit !== undefined && this.events.length >= eventCountLimit) {
        if (this._droppedEventsCount === 0) {
          api_1.diag.debug("Dropping extra events.");
        }
        this.events.shift();
        this._droppedEventsCount++;
      }
      if ((0, core_1.isTimeInput)(attributesOrStartTime)) {
        if (!(0, core_1.isTimeInput)(timeStamp)) {
          timeStamp = attributesOrStartTime;
        }
        attributesOrStartTime = undefined;
      }
      const sanitized = (0, core_1.sanitizeAttributes)(attributesOrStartTime);
      const { attributePerEventCountLimit } = this._spanLimits;
      const attributes = {};
      let droppedAttributesCount = 0;
      let eventAttributesCount = 0;
      for (const attr in sanitized) {
        if (!Object.prototype.hasOwnProperty.call(sanitized, attr)) {
          continue;
        }
        const attrVal = sanitized[attr];
        if (attributePerEventCountLimit !== undefined && eventAttributesCount >= attributePerEventCountLimit) {
          droppedAttributesCount++;
          continue;
        }
        attributes[attr] = this._truncateToSize(attrVal);
        eventAttributesCount++;
      }
      this.events.push({
        name,
        attributes,
        time: this._getTime(timeStamp),
        droppedAttributesCount
      });
      return this;
    }
    addLink(link) {
      if (this._isSpanEnded())
        return this;
      const { linkCountLimit } = this._spanLimits;
      if (linkCountLimit === 0) {
        this._droppedLinksCount++;
        return this;
      }
      if (linkCountLimit !== undefined && this.links.length >= linkCountLimit) {
        if (this._droppedLinksCount === 0) {
          api_1.diag.debug("Dropping extra links.");
        }
        this.links.shift();
        this._droppedLinksCount++;
      }
      const { attributePerLinkCountLimit } = this._spanLimits;
      const sanitized = (0, core_1.sanitizeAttributes)(link.attributes);
      const attributes = {};
      let droppedAttributesCount = 0;
      let linkAttributesCount = 0;
      for (const attr in sanitized) {
        if (!Object.prototype.hasOwnProperty.call(sanitized, attr)) {
          continue;
        }
        const attrVal = sanitized[attr];
        if (attributePerLinkCountLimit !== undefined && linkAttributesCount >= attributePerLinkCountLimit) {
          droppedAttributesCount++;
          continue;
        }
        attributes[attr] = this._truncateToSize(attrVal);
        linkAttributesCount++;
      }
      const processedLink = { context: link.context };
      if (linkAttributesCount > 0) {
        processedLink.attributes = attributes;
      }
      if (droppedAttributesCount > 0) {
        processedLink.droppedAttributesCount = droppedAttributesCount;
      }
      this.links.push(processedLink);
      return this;
    }
    addLinks(links) {
      for (const link of links) {
        this.addLink(link);
      }
      return this;
    }
    setStatus(status) {
      if (this._isSpanEnded())
        return this;
      if (status.code === api_1.SpanStatusCode.UNSET)
        return this;
      if (this.status.code === api_1.SpanStatusCode.OK)
        return this;
      const newStatus = { code: status.code };
      if (status.code === api_1.SpanStatusCode.ERROR) {
        if (typeof status.message === "string") {
          newStatus.message = status.message;
        } else if (status.message != null) {
          api_1.diag.warn(`Dropping invalid status.message of type '${typeof status.message}', expected 'string'`);
        }
      }
      this.status = newStatus;
      return this;
    }
    updateName(name) {
      if (this._isSpanEnded())
        return this;
      this.name = name;
      return this;
    }
    end(endTime) {
      if (this._isSpanEnded()) {
        api_1.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);
        return;
      }
      this.endTime = this._getTime(endTime);
      this._duration = (0, core_1.hrTimeDuration)(this.startTime, this.endTime);
      if (this._duration[0] < 0) {
        api_1.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.", this.startTime, this.endTime);
        this.endTime = this.startTime.slice();
        this._duration = [0, 0];
      }
      if (this._droppedEventsCount > 0) {
        api_1.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`);
      }
      if (this._droppedLinksCount > 0) {
        api_1.diag.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`);
      }
      if (this._spanProcessor.onEnding) {
        this._spanProcessor.onEnding(this);
      }
      this._recordEndMetrics?.();
      this._ended = true;
      this._spanProcessor.onEnd(this);
    }
    _getTime(inp) {
      if (typeof inp === "number" && inp <= core_1.otperformance.now()) {
        return (0, core_1.hrTime)(inp + this._performanceOffset);
      }
      if (typeof inp === "number") {
        return (0, core_1.millisToHrTime)(inp);
      }
      if (inp instanceof Date) {
        return (0, core_1.millisToHrTime)(inp.getTime());
      }
      if ((0, core_1.isTimeInputHrTime)(inp)) {
        return inp;
      }
      if (this._startTimeProvided) {
        return (0, core_1.millisToHrTime)(Date.now());
      }
      const msDuration = core_1.otperformance.now() - this._performanceStartTime;
      return (0, core_1.addHrTimes)(this.startTime, (0, core_1.millisToHrTime)(msDuration));
    }
    isRecording() {
      return this._ended === false;
    }
    recordException(exception, time) {
      const attributes = {};
      if (typeof exception === "string") {
        attributes[semantic_conventions_1.ATTR_EXCEPTION_MESSAGE] = exception;
      } else if (exception) {
        if (exception.code) {
          attributes[semantic_conventions_1.ATTR_EXCEPTION_TYPE] = exception.code.toString();
        } else if (exception.name) {
          attributes[semantic_conventions_1.ATTR_EXCEPTION_TYPE] = exception.name;
        }
        if (exception.message) {
          attributes[semantic_conventions_1.ATTR_EXCEPTION_MESSAGE] = exception.message;
        }
        if (exception.stack) {
          attributes[semantic_conventions_1.ATTR_EXCEPTION_STACKTRACE] = exception.stack;
        }
      }
      if (attributes[semantic_conventions_1.ATTR_EXCEPTION_TYPE] || attributes[semantic_conventions_1.ATTR_EXCEPTION_MESSAGE]) {
        this.addEvent(enums_1.ExceptionEventName, attributes, time);
      } else {
        api_1.diag.warn(`Failed to record an exception ${exception}`);
      }
    }
    get duration() {
      return this._duration;
    }
    get ended() {
      return this._ended;
    }
    get droppedAttributesCount() {
      return this._droppedAttributesCount;
    }
    get droppedEventsCount() {
      return this._droppedEventsCount;
    }
    get droppedLinksCount() {
      return this._droppedLinksCount;
    }
    _isSpanEnded() {
      if (this._ended) {
        const error2 = new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);
        api_1.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`, error2);
      }
      return this._ended;
    }
    _truncateToLimitUtil(value, limit) {
      if (value.length <= limit) {
        return value;
      }
      return value.substring(0, limit);
    }
    _truncateToSize(value) {
      const limit = this._attributeValueLengthLimit;
      if (limit <= 0) {
        api_1.diag.warn(`Attribute value limit must be positive, got ${limit}`);
        return value;
      }
      if (typeof value === "string") {
        return this._truncateToLimitUtil(value, limit);
      }
      if (Array.isArray(value)) {
        return value.map((val) => typeof val === "string" ? this._truncateToLimitUtil(val, limit) : val);
      }
      return value;
    }
  }
  exports.SpanImpl = SpanImpl;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/Sampler.js
var require_Sampler = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SamplingDecision = undefined;
  var SamplingDecision;
  (function(SamplingDecision2) {
    SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
    SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
    SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
  })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOffSampler.js
var require_AlwaysOffSampler = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AlwaysOffSampler = undefined;
  var Sampler_1 = require_Sampler();

  class AlwaysOffSampler {
    shouldSample() {
      return {
        decision: Sampler_1.SamplingDecision.NOT_RECORD
      };
    }
    toString() {
      return "AlwaysOffSampler";
    }
  }
  exports.AlwaysOffSampler = AlwaysOffSampler;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOnSampler.js
var require_AlwaysOnSampler = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AlwaysOnSampler = undefined;
  var Sampler_1 = require_Sampler();

  class AlwaysOnSampler {
    shouldSample() {
      return {
        decision: Sampler_1.SamplingDecision.RECORD_AND_SAMPLED
      };
    }
    toString() {
      return "AlwaysOnSampler";
    }
  }
  exports.AlwaysOnSampler = AlwaysOnSampler;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/ParentBasedSampler.js
var require_ParentBasedSampler = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ParentBasedSampler = undefined;
  var api_1 = require_src();
  var core_1 = require_src8();
  var AlwaysOffSampler_1 = require_AlwaysOffSampler();
  var AlwaysOnSampler_1 = require_AlwaysOnSampler();

  class ParentBasedSampler {
    _root;
    _remoteParentSampled;
    _remoteParentNotSampled;
    _localParentSampled;
    _localParentNotSampled;
    constructor(config) {
      this._root = config.root;
      if (!this._root) {
        (0, core_1.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured"));
        this._root = new AlwaysOnSampler_1.AlwaysOnSampler;
      }
      this._remoteParentSampled = config.remoteParentSampled ?? new AlwaysOnSampler_1.AlwaysOnSampler;
      this._remoteParentNotSampled = config.remoteParentNotSampled ?? new AlwaysOffSampler_1.AlwaysOffSampler;
      this._localParentSampled = config.localParentSampled ?? new AlwaysOnSampler_1.AlwaysOnSampler;
      this._localParentNotSampled = config.localParentNotSampled ?? new AlwaysOffSampler_1.AlwaysOffSampler;
    }
    shouldSample(context5, traceId, spanName, spanKind, attributes, links) {
      const parentContext = api_1.trace.getSpanContext(context5);
      if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {
        return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
      }
      if (parentContext.isRemote) {
        if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
          return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
        }
        return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
      }
      if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
        return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
      }
      return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
    }
    toString() {
      return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
    }
  }
  exports.ParentBasedSampler = ParentBasedSampler;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/TraceIdRatioBasedSampler.js
var require_TraceIdRatioBasedSampler = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TraceIdRatioBasedSampler = undefined;
  var api_1 = require_src();
  var Sampler_1 = require_Sampler();

  class TraceIdRatioBasedSampler {
    _ratio;
    _upperBound;
    constructor(ratio = 0) {
      this._ratio = this._normalize(ratio);
      this._upperBound = Math.floor(this._ratio * 4294967295);
    }
    shouldSample(context5, traceId) {
      return {
        decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED : Sampler_1.SamplingDecision.NOT_RECORD
      };
    }
    toString() {
      return `TraceIdRatioBased{${this._ratio}}`;
    }
    _normalize(ratio) {
      if (typeof ratio !== "number" || isNaN(ratio))
        return 0;
      return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;
    }
    _accumulate(traceId) {
      let accumulation = 0;
      for (let i = 0;i < traceId.length / 8; i++) {
        const pos = i * 8;
        const part = parseInt(traceId.slice(pos, pos + 8), 16);
        accumulation = (accumulation ^ part) >>> 0;
      }
      return accumulation;
    }
  }
  exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/config.js
var require_config = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.buildSamplerFromEnv = exports.loadDefaultConfig = undefined;
  var api_1 = require_src();
  var core_1 = require_src8();
  var AlwaysOffSampler_1 = require_AlwaysOffSampler();
  var AlwaysOnSampler_1 = require_AlwaysOnSampler();
  var ParentBasedSampler_1 = require_ParentBasedSampler();
  var TraceIdRatioBasedSampler_1 = require_TraceIdRatioBasedSampler();
  var TracesSamplerValues;
  (function(TracesSamplerValues2) {
    TracesSamplerValues2["AlwaysOff"] = "always_off";
    TracesSamplerValues2["AlwaysOn"] = "always_on";
    TracesSamplerValues2["ParentBasedAlwaysOff"] = "parentbased_always_off";
    TracesSamplerValues2["ParentBasedAlwaysOn"] = "parentbased_always_on";
    TracesSamplerValues2["ParentBasedTraceIdRatio"] = "parentbased_traceidratio";
    TracesSamplerValues2["TraceIdRatio"] = "traceidratio";
  })(TracesSamplerValues || (TracesSamplerValues = {}));
  var DEFAULT_RATIO = 1;
  function loadDefaultConfig() {
    return {
      sampler: buildSamplerFromEnv(),
      forceFlushTimeoutMillis: 30000,
      generalLimits: {
        attributeValueLengthLimit: (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? Infinity,
        attributeCountLimit: (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT") ?? 128
      },
      spanLimits: {
        attributeValueLengthLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? Infinity,
        attributeCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT") ?? 128,
        linkCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_LINK_COUNT_LIMIT") ?? 128,
        eventCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_EVENT_COUNT_LIMIT") ?? 128,
        attributePerEventCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT") ?? 128,
        attributePerLinkCountLimit: (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT") ?? 128
      }
    };
  }
  exports.loadDefaultConfig = loadDefaultConfig;
  function buildSamplerFromEnv() {
    const sampler = (0, core_1.getStringFromEnv)("OTEL_TRACES_SAMPLER") ?? TracesSamplerValues.ParentBasedAlwaysOn;
    switch (sampler) {
      case TracesSamplerValues.AlwaysOn:
        return new AlwaysOnSampler_1.AlwaysOnSampler;
      case TracesSamplerValues.AlwaysOff:
        return new AlwaysOffSampler_1.AlwaysOffSampler;
      case TracesSamplerValues.ParentBasedAlwaysOn:
        return new ParentBasedSampler_1.ParentBasedSampler({
          root: new AlwaysOnSampler_1.AlwaysOnSampler
        });
      case TracesSamplerValues.ParentBasedAlwaysOff:
        return new ParentBasedSampler_1.ParentBasedSampler({
          root: new AlwaysOffSampler_1.AlwaysOffSampler
        });
      case TracesSamplerValues.TraceIdRatio:
        return new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv());
      case TracesSamplerValues.ParentBasedTraceIdRatio:
        return new ParentBasedSampler_1.ParentBasedSampler({
          root: new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv())
        });
      default:
        api_1.diag.error(`OTEL_TRACES_SAMPLER value "${sampler}" invalid, defaulting to "${TracesSamplerValues.ParentBasedAlwaysOn}".`);
        return new ParentBasedSampler_1.ParentBasedSampler({
          root: new AlwaysOnSampler_1.AlwaysOnSampler
        });
    }
  }
  exports.buildSamplerFromEnv = buildSamplerFromEnv;
  function getSamplerProbabilityFromEnv() {
    const probability = (0, core_1.getNumberFromEnv)("OTEL_TRACES_SAMPLER_ARG");
    if (probability == null) {
      api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`);
      return DEFAULT_RATIO;
    }
    if (probability < 0 || probability > 1) {
      api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${probability} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`);
      return DEFAULT_RATIO;
    }
    return probability;
  }
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/utility.js
var require_utility = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.reconfigureLimits = exports.mergeConfig = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = undefined;
  var config_1 = require_config();
  var core_1 = require_src8();
  exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
  exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
  function mergeConfig(userConfig) {
    const perInstanceDefaults = {
      sampler: (0, config_1.buildSamplerFromEnv)()
    };
    const DEFAULT_CONFIG = (0, config_1.loadDefaultConfig)();
    const target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig);
    target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {});
    target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {});
    return target;
  }
  exports.mergeConfig = mergeConfig;
  function reconfigureLimits(userConfig) {
    const spanLimits = Object.assign({}, userConfig.spanLimits);
    spanLimits.attributeCountLimit = userConfig.spanLimits?.attributeCountLimit ?? userConfig.generalLimits?.attributeCountLimit ?? (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT") ?? (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT") ?? exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT;
    spanLimits.attributeValueLengthLimit = userConfig.spanLimits?.attributeValueLengthLimit ?? userConfig.generalLimits?.attributeValueLengthLimit ?? (0, core_1.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? (0, core_1.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT") ?? exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;
    return Object.assign({}, userConfig, { spanLimits });
  }
  exports.reconfigureLimits = reconfigureLimits;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/export/BatchSpanProcessorBase.js
var require_BatchSpanProcessorBase = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BatchSpanProcessorBase = undefined;
  var api_1 = require_src();
  var core_1 = require_src8();

  class BatchSpanProcessorBase {
    _maxExportBatchSize;
    _maxQueueSize;
    _scheduledDelayMillis;
    _exportTimeoutMillis;
    _exporter;
    _isExporting = false;
    _finishedSpans = [];
    _timer;
    _shutdownOnce;
    _droppedSpansCount = 0;
    constructor(exporter, config) {
      this._exporter = exporter;
      this._maxExportBatchSize = typeof config?.maxExportBatchSize === "number" ? config.maxExportBatchSize : (0, core_1.getNumberFromEnv)("OTEL_BSP_MAX_EXPORT_BATCH_SIZE") ?? 512;
      this._maxQueueSize = typeof config?.maxQueueSize === "number" ? config.maxQueueSize : (0, core_1.getNumberFromEnv)("OTEL_BSP_MAX_QUEUE_SIZE") ?? 2048;
      this._scheduledDelayMillis = typeof config?.scheduledDelayMillis === "number" ? config.scheduledDelayMillis : (0, core_1.getNumberFromEnv)("OTEL_BSP_SCHEDULE_DELAY") ?? 5000;
      this._exportTimeoutMillis = typeof config?.exportTimeoutMillis === "number" ? config.exportTimeoutMillis : (0, core_1.getNumberFromEnv)("OTEL_BSP_EXPORT_TIMEOUT") ?? 30000;
      this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
      if (this._maxExportBatchSize > this._maxQueueSize) {
        api_1.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize");
        this._maxExportBatchSize = this._maxQueueSize;
      }
    }
    forceFlush() {
      if (this._shutdownOnce.isCalled) {
        return this._shutdownOnce.promise;
      }
      return this._flushAll();
    }
    onStart(_span, _parentContext) {}
    onEnd(span) {
      if (this._shutdownOnce.isCalled) {
        return;
      }
      if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) {
        return;
      }
      this._addToBuffer(span);
    }
    shutdown() {
      return this._shutdownOnce.call();
    }
    _shutdown() {
      return Promise.resolve().then(() => {
        return this.onShutdown();
      }).then(() => {
        return this._flushAll();
      }).then(() => {
        return this._exporter.shutdown();
      });
    }
    _addToBuffer(span) {
      if (this._finishedSpans.length >= this._maxQueueSize) {
        if (this._droppedSpansCount === 0) {
          api_1.diag.debug("maxQueueSize reached, dropping spans");
        }
        this._droppedSpansCount++;
        return;
      }
      if (this._droppedSpansCount > 0) {
        api_1.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`);
        this._droppedSpansCount = 0;
      }
      this._finishedSpans.push(span);
      this._maybeStartTimer();
    }
    _flushAll() {
      return new Promise((resolve2, reject) => {
        const promises = [];
        const count = Math.ceil(this._finishedSpans.length / this._maxExportBatchSize);
        for (let i = 0, j = count;i < j; i++) {
          promises.push(this._flushOneBatch());
        }
        Promise.all(promises).then(() => {
          resolve2();
        }).catch(reject);
      });
    }
    _flushOneBatch() {
      this._clearTimer();
      if (this._finishedSpans.length === 0) {
        return Promise.resolve();
      }
      return new Promise((resolve2, reject) => {
        const timer = setTimeout(() => {
          reject(new Error("Timeout"));
        }, this._exportTimeoutMillis);
        api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => {
          let spans;
          if (this._finishedSpans.length <= this._maxExportBatchSize) {
            spans = this._finishedSpans;
            this._finishedSpans = [];
          } else {
            spans = this._finishedSpans.splice(0, this._maxExportBatchSize);
          }
          const doExport = () => this._exporter.export(spans, (result) => {
            clearTimeout(timer);
            if (result.code === core_1.ExportResultCode.SUCCESS) {
              resolve2();
            } else {
              reject(result.error ?? new Error("BatchSpanProcessor: span export failed"));
            }
          });
          let pendingResources = null;
          for (let i = 0, len = spans.length;i < len; i++) {
            const span = spans[i];
            if (span.resource.asyncAttributesPending && span.resource.waitForAsyncAttributes) {
              pendingResources ??= [];
              pendingResources.push(span.resource.waitForAsyncAttributes());
            }
          }
          if (pendingResources === null) {
            doExport();
          } else {
            Promise.all(pendingResources).then(doExport, (err) => {
              (0, core_1.globalErrorHandler)(err);
              reject(err);
            });
          }
        });
      });
    }
    _maybeStartTimer() {
      if (this._isExporting)
        return;
      const flush2 = () => {
        this._isExporting = true;
        this._flushOneBatch().finally(() => {
          this._isExporting = false;
          if (this._finishedSpans.length > 0) {
            this._clearTimer();
            this._maybeStartTimer();
          }
        }).catch((e) => {
          this._isExporting = false;
          (0, core_1.globalErrorHandler)(e);
        });
      };
      if (this._finishedSpans.length >= this._maxExportBatchSize) {
        return flush2();
      }
      if (this._timer !== undefined)
        return;
      this._timer = setTimeout(() => flush2(), this._scheduledDelayMillis);
      if (typeof this._timer !== "number") {
        this._timer.unref();
      }
    }
    _clearTimer() {
      if (this._timer !== undefined) {
        clearTimeout(this._timer);
        this._timer = undefined;
      }
    }
  }
  exports.BatchSpanProcessorBase = BatchSpanProcessorBase;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/export/BatchSpanProcessor.js
var require_BatchSpanProcessor = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BatchSpanProcessor = undefined;
  var BatchSpanProcessorBase_1 = require_BatchSpanProcessorBase();

  class BatchSpanProcessor extends BatchSpanProcessorBase_1.BatchSpanProcessorBase {
    onShutdown() {}
  }
  exports.BatchSpanProcessor = BatchSpanProcessor;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/RandomIdGenerator.js
var require_RandomIdGenerator = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.RandomIdGenerator = undefined;
  var SPAN_ID_BYTES = 8;
  var TRACE_ID_BYTES = 16;

  class RandomIdGenerator {
    generateTraceId = getIdGenerator(TRACE_ID_BYTES);
    generateSpanId = getIdGenerator(SPAN_ID_BYTES);
  }
  exports.RandomIdGenerator = RandomIdGenerator;
  var SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);
  function getIdGenerator(bytes) {
    return function generateId() {
      for (let i = 0;i < bytes / 4; i++) {
        SHARED_BUFFER.writeUInt32BE(Math.random() * 2 ** 32 >>> 0, i * 4);
      }
      for (let i = 0;i < bytes; i++) {
        if (SHARED_BUFFER[i] > 0) {
          break;
        } else if (i === bytes - 1) {
          SHARED_BUFFER[bytes - 1] = 1;
        }
      }
      return SHARED_BUFFER.toString("hex", 0, bytes);
    };
  }
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/index.js
var require_node7 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.RandomIdGenerator = exports.BatchSpanProcessor = undefined;
  var BatchSpanProcessor_1 = require_BatchSpanProcessor();
  Object.defineProperty(exports, "BatchSpanProcessor", { enumerable: true, get: function() {
    return BatchSpanProcessor_1.BatchSpanProcessor;
  } });
  var RandomIdGenerator_1 = require_RandomIdGenerator();
  Object.defineProperty(exports, "RandomIdGenerator", { enumerable: true, get: function() {
    return RandomIdGenerator_1.RandomIdGenerator;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/index.js
var require_platform6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.RandomIdGenerator = exports.BatchSpanProcessor = undefined;
  var node_1 = require_node7();
  Object.defineProperty(exports, "BatchSpanProcessor", { enumerable: true, get: function() {
    return node_1.BatchSpanProcessor;
  } });
  Object.defineProperty(exports, "RandomIdGenerator", { enumerable: true, get: function() {
    return node_1.RandomIdGenerator;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/semconv.js
var require_semconv5 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.METRIC_OTEL_SDK_SPAN_STARTED = exports.METRIC_OTEL_SDK_SPAN_LIVE = exports.ATTR_OTEL_SPAN_SAMPLING_RESULT = exports.ATTR_OTEL_SPAN_PARENT_ORIGIN = undefined;
  exports.ATTR_OTEL_SPAN_PARENT_ORIGIN = "otel.span.parent.origin";
  exports.ATTR_OTEL_SPAN_SAMPLING_RESULT = "otel.span.sampling_result";
  exports.METRIC_OTEL_SDK_SPAN_LIVE = "otel.sdk.span.live";
  exports.METRIC_OTEL_SDK_SPAN_STARTED = "otel.sdk.span.started";
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/TracerMetrics.js
var require_TracerMetrics = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TracerMetrics = undefined;
  var Sampler_1 = require_Sampler();
  var semconv_1 = require_semconv5();

  class TracerMetrics {
    startedSpans;
    liveSpans;
    constructor(meter) {
      this.startedSpans = meter.createCounter(semconv_1.METRIC_OTEL_SDK_SPAN_STARTED, {
        unit: "{span}",
        description: "The number of created spans."
      });
      this.liveSpans = meter.createUpDownCounter(semconv_1.METRIC_OTEL_SDK_SPAN_LIVE, {
        unit: "{span}",
        description: "The number of currently live spans."
      });
    }
    startSpan(parentSpanCtx, samplingDecision) {
      const samplingDecisionStr = samplingDecisionToString(samplingDecision);
      this.startedSpans.add(1, {
        [semconv_1.ATTR_OTEL_SPAN_PARENT_ORIGIN]: parentOrigin(parentSpanCtx),
        [semconv_1.ATTR_OTEL_SPAN_SAMPLING_RESULT]: samplingDecisionStr
      });
      if (samplingDecision === Sampler_1.SamplingDecision.NOT_RECORD) {
        return () => {};
      }
      const liveSpanAttributes = {
        [semconv_1.ATTR_OTEL_SPAN_SAMPLING_RESULT]: samplingDecisionStr
      };
      this.liveSpans.add(1, liveSpanAttributes);
      return () => {
        this.liveSpans.add(-1, liveSpanAttributes);
      };
    }
  }
  exports.TracerMetrics = TracerMetrics;
  function parentOrigin(parentSpanContext) {
    if (!parentSpanContext) {
      return "none";
    }
    if (parentSpanContext.isRemote) {
      return "remote";
    }
    return "local";
  }
  function samplingDecisionToString(decision) {
    switch (decision) {
      case Sampler_1.SamplingDecision.RECORD_AND_SAMPLED:
        return "RECORD_AND_SAMPLE";
      case Sampler_1.SamplingDecision.RECORD:
        return "RECORD_ONLY";
      case Sampler_1.SamplingDecision.NOT_RECORD:
        return "DROP";
    }
  }
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/version.js
var require_version5 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.VERSION = undefined;
  exports.VERSION = "2.6.1";
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js
var require_Tracer = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Tracer = undefined;
  var api = require_src();
  var core_1 = require_src8();
  var Span_1 = require_Span();
  var utility_1 = require_utility();
  var platform_1 = require_platform6();
  var TracerMetrics_1 = require_TracerMetrics();
  var version_1 = require_version5();

  class Tracer {
    _sampler;
    _generalLimits;
    _spanLimits;
    _idGenerator;
    instrumentationScope;
    _resource;
    _spanProcessor;
    _tracerMetrics;
    constructor(instrumentationScope, config, resource, spanProcessor) {
      const localConfig = (0, utility_1.mergeConfig)(config);
      this._sampler = localConfig.sampler;
      this._generalLimits = localConfig.generalLimits;
      this._spanLimits = localConfig.spanLimits;
      this._idGenerator = config.idGenerator || new platform_1.RandomIdGenerator;
      this._resource = resource;
      this._spanProcessor = spanProcessor;
      this.instrumentationScope = instrumentationScope;
      const meter = localConfig.meterProvider ? localConfig.meterProvider.getMeter("@opentelemetry/sdk-trace", version_1.VERSION) : api.createNoopMeter();
      this._tracerMetrics = new TracerMetrics_1.TracerMetrics(meter);
    }
    startSpan(name, options = {}, context5 = api.context.active()) {
      if (options.root) {
        context5 = api.trace.deleteSpan(context5);
      }
      const parentSpan = api.trace.getSpan(context5);
      if ((0, core_1.isTracingSuppressed)(context5)) {
        api.diag.debug("Instrumentation suppressed, returning Noop Span");
        const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
        return nonRecordingSpan;
      }
      const parentSpanContext = parentSpan?.spanContext();
      const spanId = this._idGenerator.generateSpanId();
      let validParentSpanContext;
      let traceId;
      let traceState;
      if (!parentSpanContext || !api.trace.isSpanContextValid(parentSpanContext)) {
        traceId = this._idGenerator.generateTraceId();
      } else {
        traceId = parentSpanContext.traceId;
        traceState = parentSpanContext.traceState;
        validParentSpanContext = parentSpanContext;
      }
      const spanKind = options.kind ?? api.SpanKind.INTERNAL;
      const links = (options.links ?? []).map((link) => {
        return {
          context: link.context,
          attributes: (0, core_1.sanitizeAttributes)(link.attributes)
        };
      });
      const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
      const samplingResult = this._sampler.shouldSample(context5, traceId, name, spanKind, attributes, links);
      const recordEndMetrics = this._tracerMetrics.startSpan(parentSpanContext, samplingResult.decision);
      traceState = samplingResult.traceState ?? traceState;
      const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE;
      const spanContext = { traceId, spanId, traceFlags, traceState };
      if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {
        api.diag.debug("Recording is off, propagating context in a non-recording span");
        const nonRecordingSpan = api.trace.wrapSpanContext(spanContext);
        return nonRecordingSpan;
      }
      const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));
      const span = new Span_1.SpanImpl({
        resource: this._resource,
        scope: this.instrumentationScope,
        context: context5,
        spanContext,
        name,
        kind: spanKind,
        links,
        parentSpanContext: validParentSpanContext,
        attributes: initAttributes,
        startTime: options.startTime,
        spanProcessor: this._spanProcessor,
        spanLimits: this._spanLimits,
        recordEndMetrics
      });
      return span;
    }
    startActiveSpan(name, arg2, arg3, arg4) {
      let opts;
      let ctx;
      let fn;
      if (arguments.length < 2) {
        return;
      } else if (arguments.length === 2) {
        fn = arg2;
      } else if (arguments.length === 3) {
        opts = arg2;
        fn = arg3;
      } else {
        opts = arg2;
        ctx = arg3;
        fn = arg4;
      }
      const parentContext = ctx ?? api.context.active();
      const span = this.startSpan(name, opts, parentContext);
      const contextWithSpanSet = api.trace.setSpan(parentContext, span);
      return api.context.with(contextWithSpanSet, fn, undefined, span);
    }
    getGeneralLimits() {
      return this._generalLimits;
    }
    getSpanLimits() {
      return this._spanLimits;
    }
  }
  exports.Tracer = Tracer;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/MultiSpanProcessor.js
var require_MultiSpanProcessor = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MultiSpanProcessor = undefined;
  var core_1 = require_src8();

  class MultiSpanProcessor {
    _spanProcessors;
    constructor(spanProcessors) {
      this._spanProcessors = spanProcessors;
    }
    forceFlush() {
      const promises = [];
      for (const spanProcessor of this._spanProcessors) {
        promises.push(spanProcessor.forceFlush());
      }
      return new Promise((resolve2) => {
        Promise.all(promises).then(() => {
          resolve2();
        }).catch((error2) => {
          (0, core_1.globalErrorHandler)(error2 || new Error("MultiSpanProcessor: forceFlush failed"));
          resolve2();
        });
      });
    }
    onStart(span, context5) {
      for (const spanProcessor of this._spanProcessors) {
        spanProcessor.onStart(span, context5);
      }
    }
    onEnding(span) {
      for (const spanProcessor of this._spanProcessors) {
        if (spanProcessor.onEnding) {
          spanProcessor.onEnding(span);
        }
      }
    }
    onEnd(span) {
      for (const spanProcessor of this._spanProcessors) {
        spanProcessor.onEnd(span);
      }
    }
    shutdown() {
      const promises = [];
      for (const spanProcessor of this._spanProcessors) {
        promises.push(spanProcessor.shutdown());
      }
      return new Promise((resolve2, reject) => {
        Promise.all(promises).then(() => {
          resolve2();
        }, reject);
      });
    }
  }
  exports.MultiSpanProcessor = MultiSpanProcessor;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js
var require_BasicTracerProvider = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BasicTracerProvider = exports.ForceFlushState = undefined;
  var core_1 = require_src8();
  var resources_1 = require_src10();
  var Tracer_1 = require_Tracer();
  var config_1 = require_config();
  var MultiSpanProcessor_1 = require_MultiSpanProcessor();
  var utility_1 = require_utility();
  var ForceFlushState;
  (function(ForceFlushState2) {
    ForceFlushState2[ForceFlushState2["resolved"] = 0] = "resolved";
    ForceFlushState2[ForceFlushState2["timeout"] = 1] = "timeout";
    ForceFlushState2[ForceFlushState2["error"] = 2] = "error";
    ForceFlushState2[ForceFlushState2["unresolved"] = 3] = "unresolved";
  })(ForceFlushState = exports.ForceFlushState || (exports.ForceFlushState = {}));

  class BasicTracerProvider {
    _config;
    _tracers = new Map;
    _resource;
    _activeSpanProcessor;
    constructor(config = {}) {
      const mergedConfig = (0, core_1.merge)({}, (0, config_1.loadDefaultConfig)(), (0, utility_1.reconfigureLimits)(config));
      this._resource = mergedConfig.resource ?? (0, resources_1.defaultResource)();
      this._config = Object.assign({}, mergedConfig, {
        resource: this._resource
      });
      const spanProcessors = [];
      if (config.spanProcessors?.length) {
        spanProcessors.push(...config.spanProcessors);
      }
      this._activeSpanProcessor = new MultiSpanProcessor_1.MultiSpanProcessor(spanProcessors);
    }
    getTracer(name, version, options) {
      const key = `${name}@${version || ""}:${options?.schemaUrl || ""}`;
      if (!this._tracers.has(key)) {
        this._tracers.set(key, new Tracer_1.Tracer({ name, version, schemaUrl: options?.schemaUrl }, this._config, this._resource, this._activeSpanProcessor));
      }
      return this._tracers.get(key);
    }
    forceFlush() {
      const timeout = this._config.forceFlushTimeoutMillis;
      const promises = this._activeSpanProcessor["_spanProcessors"].map((spanProcessor) => {
        return new Promise((resolve2) => {
          let state;
          const timeoutInterval = setTimeout(() => {
            resolve2(new Error(`Span processor did not completed within timeout period of ${timeout} ms`));
            state = ForceFlushState.timeout;
          }, timeout);
          spanProcessor.forceFlush().then(() => {
            clearTimeout(timeoutInterval);
            if (state !== ForceFlushState.timeout) {
              state = ForceFlushState.resolved;
              resolve2(state);
            }
          }).catch((error2) => {
            clearTimeout(timeoutInterval);
            state = ForceFlushState.error;
            resolve2(error2);
          });
        });
      });
      return new Promise((resolve2, reject) => {
        Promise.all(promises).then((results) => {
          const errors = results.filter((result) => result !== ForceFlushState.resolved);
          if (errors.length > 0) {
            reject(errors);
          } else {
            resolve2();
          }
        }).catch((error2) => reject([error2]));
      });
    }
    shutdown() {
      return this._activeSpanProcessor.shutdown();
    }
  }
  exports.BasicTracerProvider = BasicTracerProvider;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/export/ConsoleSpanExporter.js
var require_ConsoleSpanExporter = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ConsoleSpanExporter = undefined;
  var core_1 = require_src8();

  class ConsoleSpanExporter {
    export(spans, resultCallback) {
      return this._sendSpans(spans, resultCallback);
    }
    shutdown() {
      this._sendSpans([]);
      return this.forceFlush();
    }
    forceFlush() {
      return Promise.resolve();
    }
    _exportInfo(span) {
      return {
        resource: {
          attributes: span.resource.attributes
        },
        instrumentationScope: span.instrumentationScope,
        traceId: span.spanContext().traceId,
        parentSpanContext: span.parentSpanContext,
        traceState: span.spanContext().traceState?.serialize(),
        name: span.name,
        id: span.spanContext().spanId,
        kind: span.kind,
        timestamp: (0, core_1.hrTimeToMicroseconds)(span.startTime),
        duration: (0, core_1.hrTimeToMicroseconds)(span.duration),
        attributes: span.attributes,
        status: span.status,
        events: span.events,
        links: span.links
      };
    }
    _sendSpans(spans, done) {
      for (const span of spans) {
        console.dir(this._exportInfo(span), { depth: 3 });
      }
      if (done) {
        return done({ code: core_1.ExportResultCode.SUCCESS });
      }
    }
  }
  exports.ConsoleSpanExporter = ConsoleSpanExporter;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/export/InMemorySpanExporter.js
var require_InMemorySpanExporter = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.InMemorySpanExporter = undefined;
  var core_1 = require_src8();

  class InMemorySpanExporter {
    _finishedSpans = [];
    _stopped = false;
    export(spans, resultCallback) {
      if (this._stopped)
        return resultCallback({
          code: core_1.ExportResultCode.FAILED,
          error: new Error("Exporter has been stopped")
        });
      this._finishedSpans.push(...spans);
      setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);
    }
    shutdown() {
      this._stopped = true;
      this._finishedSpans = [];
      return this.forceFlush();
    }
    forceFlush() {
      return Promise.resolve();
    }
    reset() {
      this._finishedSpans = [];
    }
    getFinishedSpans() {
      return this._finishedSpans;
    }
  }
  exports.InMemorySpanExporter = InMemorySpanExporter;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/export/SimpleSpanProcessor.js
var require_SimpleSpanProcessor = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SimpleSpanProcessor = undefined;
  var api_1 = require_src();
  var core_1 = require_src8();

  class SimpleSpanProcessor {
    _exporter;
    _shutdownOnce;
    _pendingExports;
    constructor(exporter) {
      this._exporter = exporter;
      this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
      this._pendingExports = new Set;
    }
    async forceFlush() {
      await Promise.all(Array.from(this._pendingExports));
      if (this._exporter.forceFlush) {
        await this._exporter.forceFlush();
      }
    }
    onStart(_span, _parentContext) {}
    onEnd(span) {
      if (this._shutdownOnce.isCalled) {
        return;
      }
      if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) {
        return;
      }
      const pendingExport = this._doExport(span).catch((err) => (0, core_1.globalErrorHandler)(err));
      this._pendingExports.add(pendingExport);
      pendingExport.finally(() => this._pendingExports.delete(pendingExport));
    }
    async _doExport(span) {
      if (span.resource.asyncAttributesPending) {
        await span.resource.waitForAsyncAttributes?.();
      }
      const result = await core_1.internal._export(this._exporter, [span]);
      if (result.code !== core_1.ExportResultCode.SUCCESS) {
        throw result.error ?? new Error(`SimpleSpanProcessor: span export failed (status ${result})`);
      }
    }
    shutdown() {
      return this._shutdownOnce.call();
    }
    _shutdown() {
      return this._exporter.shutdown();
    }
  }
  exports.SimpleSpanProcessor = SimpleSpanProcessor;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/export/NoopSpanProcessor.js
var require_NoopSpanProcessor = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NoopSpanProcessor = undefined;

  class NoopSpanProcessor {
    onStart(_span, _context) {}
    onEnd(_span) {}
    shutdown() {
      return Promise.resolve();
    }
    forceFlush() {
      return Promise.resolve();
    }
  }
  exports.NoopSpanProcessor = NoopSpanProcessor;
});

// ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.6.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/src/index.js
var require_src11 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.SimpleSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.RandomIdGenerator = exports.BatchSpanProcessor = exports.BasicTracerProvider = undefined;
  var BasicTracerProvider_1 = require_BasicTracerProvider();
  Object.defineProperty(exports, "BasicTracerProvider", { enumerable: true, get: function() {
    return BasicTracerProvider_1.BasicTracerProvider;
  } });
  var platform_1 = require_platform6();
  Object.defineProperty(exports, "BatchSpanProcessor", { enumerable: true, get: function() {
    return platform_1.BatchSpanProcessor;
  } });
  Object.defineProperty(exports, "RandomIdGenerator", { enumerable: true, get: function() {
    return platform_1.RandomIdGenerator;
  } });
  var ConsoleSpanExporter_1 = require_ConsoleSpanExporter();
  Object.defineProperty(exports, "ConsoleSpanExporter", { enumerable: true, get: function() {
    return ConsoleSpanExporter_1.ConsoleSpanExporter;
  } });
  var InMemorySpanExporter_1 = require_InMemorySpanExporter();
  Object.defineProperty(exports, "InMemorySpanExporter", { enumerable: true, get: function() {
    return InMemorySpanExporter_1.InMemorySpanExporter;
  } });
  var SimpleSpanProcessor_1 = require_SimpleSpanProcessor();
  Object.defineProperty(exports, "SimpleSpanProcessor", { enumerable: true, get: function() {
    return SimpleSpanProcessor_1.SimpleSpanProcessor;
  } });
  var NoopSpanProcessor_1 = require_NoopSpanProcessor();
  Object.defineProperty(exports, "NoopSpanProcessor", { enumerable: true, get: function() {
    return NoopSpanProcessor_1.NoopSpanProcessor;
  } });
  var AlwaysOffSampler_1 = require_AlwaysOffSampler();
  Object.defineProperty(exports, "AlwaysOffSampler", { enumerable: true, get: function() {
    return AlwaysOffSampler_1.AlwaysOffSampler;
  } });
  var AlwaysOnSampler_1 = require_AlwaysOnSampler();
  Object.defineProperty(exports, "AlwaysOnSampler", { enumerable: true, get: function() {
    return AlwaysOnSampler_1.AlwaysOnSampler;
  } });
  var ParentBasedSampler_1 = require_ParentBasedSampler();
  Object.defineProperty(exports, "ParentBasedSampler", { enumerable: true, get: function() {
    return ParentBasedSampler_1.ParentBasedSampler;
  } });
  var TraceIdRatioBasedSampler_1 = require_TraceIdRatioBasedSampler();
  Object.defineProperty(exports, "TraceIdRatioBasedSampler", { enumerable: true, get: function() {
    return TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler;
  } });
  var Sampler_1 = require_Sampler();
  Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
    return Sampler_1.SamplingDecision;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-undici@0.23.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-undici/build/src/version.js
var require_version6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.PACKAGE_NAME = exports.PACKAGE_VERSION = undefined;
  exports.PACKAGE_VERSION = "0.23.0";
  exports.PACKAGE_NAME = "@opentelemetry/instrumentation-undici";
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-undici@0.23.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-undici/build/src/undici.js
var require_undici = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.UndiciInstrumentation = undefined;
  var diagch2 = __require("diagnostics_channel");
  var url_1 = __require("url");
  var instrumentation_1 = require_src6();
  var api_1 = require_src();
  var core_1 = require_src8();
  var semantic_conventions_1 = require_src2();
  var version_1 = require_version6();

  class UndiciInstrumentation extends instrumentation_1.InstrumentationBase {
    _recordFromReq = new WeakMap;
    constructor(config = {}) {
      super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config);
    }
    init() {
      return;
    }
    disable() {
      super.disable();
      this._channelSubs.forEach((sub) => sub.unsubscribe());
      this._channelSubs.length = 0;
    }
    enable() {
      super.enable();
      this._channelSubs = this._channelSubs || [];
      if (this._channelSubs.length > 0) {
        return;
      }
      this.subscribeToChannel("undici:request:create", this.onRequestCreated.bind(this));
      this.subscribeToChannel("undici:client:sendHeaders", this.onRequestHeaders.bind(this));
      this.subscribeToChannel("undici:request:headers", this.onResponseHeaders.bind(this));
      this.subscribeToChannel("undici:request:trailers", this.onDone.bind(this));
      this.subscribeToChannel("undici:request:error", this.onError.bind(this));
    }
    _updateMetricInstruments() {
      this._httpClientDurationHistogram = this.meter.createHistogram(semantic_conventions_1.METRIC_HTTP_CLIENT_REQUEST_DURATION, {
        description: "Measures the duration of outbound HTTP requests.",
        unit: "s",
        valueType: api_1.ValueType.DOUBLE,
        advice: {
          explicitBucketBoundaries: [
            0.005,
            0.01,
            0.025,
            0.05,
            0.075,
            0.1,
            0.25,
            0.5,
            0.75,
            1,
            2.5,
            5,
            7.5,
            10
          ]
        }
      });
    }
    subscribeToChannel(diagnosticChannel, onMessage) {
      const [major, minor] = process.version.replace("v", "").split(".").map((n) => Number(n));
      const useNewSubscribe = major > 18 || major === 18 && minor >= 19;
      let unsubscribe3;
      if (useNewSubscribe) {
        diagch2.subscribe?.(diagnosticChannel, onMessage);
        unsubscribe3 = () => diagch2.unsubscribe?.(diagnosticChannel, onMessage);
      } else {
        const channel3 = diagch2.channel(diagnosticChannel);
        channel3.subscribe(onMessage);
        unsubscribe3 = () => channel3.unsubscribe(onMessage);
      }
      this._channelSubs.push({
        name: diagnosticChannel,
        unsubscribe: unsubscribe3
      });
    }
    parseRequestHeaders(request2) {
      const result = new Map;
      if (Array.isArray(request2.headers)) {
        for (let i = 0;i < request2.headers.length; i += 2) {
          const key = request2.headers[i];
          const value = request2.headers[i + 1];
          if (typeof key === "string") {
            result.set(key.toLowerCase(), value);
          }
        }
      } else if (typeof request2.headers === "string") {
        const headers = request2.headers.split(`\r
`);
        for (const line of headers) {
          if (!line) {
            continue;
          }
          const colonIndex = line.indexOf(":");
          if (colonIndex === -1) {
            continue;
          }
          const key = line.substring(0, colonIndex).toLowerCase();
          const value = line.substring(colonIndex + 1).trim();
          const allValues = result.get(key);
          if (allValues && Array.isArray(allValues)) {
            allValues.push(value);
          } else if (allValues) {
            result.set(key, [allValues, value]);
          } else {
            result.set(key, value);
          }
        }
      }
      return result;
    }
    onRequestCreated({ request: request2 }) {
      const config = this.getConfig();
      const enabled = config.enabled !== false;
      const shouldIgnoreReq = (0, instrumentation_1.safeExecuteInTheMiddle)(() => !enabled || request2.method === "CONNECT" || config.ignoreRequestHook?.(request2), (e) => e && this._diag.error("caught ignoreRequestHook error: ", e), true);
      if (shouldIgnoreReq) {
        return;
      }
      const startTime = (0, core_1.hrTime)();
      let requestUrl;
      try {
        requestUrl = new url_1.URL(request2.path, request2.origin);
      } catch (err) {
        this._diag.warn("could not determine url.full:", err);
        return;
      }
      const urlScheme = requestUrl.protocol.replace(":", "");
      const requestMethod = this.getRequestMethod(request2.method);
      const attributes = {
        [semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: requestMethod,
        [semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]: request2.method,
        [semantic_conventions_1.ATTR_URL_FULL]: requestUrl.toString(),
        [semantic_conventions_1.ATTR_URL_PATH]: requestUrl.pathname,
        [semantic_conventions_1.ATTR_URL_QUERY]: requestUrl.search,
        [semantic_conventions_1.ATTR_URL_SCHEME]: urlScheme
      };
      const schemePorts = { https: "443", http: "80" };
      const serverAddress = requestUrl.hostname;
      const serverPort = requestUrl.port || schemePorts[urlScheme];
      attributes[semantic_conventions_1.ATTR_SERVER_ADDRESS] = serverAddress;
      if (serverPort && !isNaN(Number(serverPort))) {
        attributes[semantic_conventions_1.ATTR_SERVER_PORT] = Number(serverPort);
      }
      const headersMap = this.parseRequestHeaders(request2);
      const userAgentValues = headersMap.get("user-agent");
      if (userAgentValues) {
        const userAgent = Array.isArray(userAgentValues) ? userAgentValues[userAgentValues.length - 1] : userAgentValues;
        attributes[semantic_conventions_1.ATTR_USER_AGENT_ORIGINAL] = userAgent;
      }
      const hookAttributes = (0, instrumentation_1.safeExecuteInTheMiddle)(() => config.startSpanHook?.(request2), (e) => e && this._diag.error("caught startSpanHook error: ", e), true);
      if (hookAttributes) {
        Object.entries(hookAttributes).forEach(([key, val]) => {
          attributes[key] = val;
        });
      }
      const activeCtx = api_1.context.active();
      const currentSpan = api_1.trace.getSpan(activeCtx);
      let span;
      if (config.requireParentforSpans && (!currentSpan || !api_1.trace.isSpanContextValid(currentSpan.spanContext()))) {
        span = api_1.trace.wrapSpanContext(api_1.INVALID_SPAN_CONTEXT);
      } else {
        span = this.tracer.startSpan(requestMethod === "_OTHER" ? "HTTP" : requestMethod, {
          kind: api_1.SpanKind.CLIENT,
          attributes
        }, activeCtx);
      }
      (0, instrumentation_1.safeExecuteInTheMiddle)(() => config.requestHook?.(span, request2), (e) => e && this._diag.error("caught requestHook error: ", e), true);
      const requestContext = api_1.trace.setSpan(api_1.context.active(), span);
      const addedHeaders = {};
      api_1.propagation.inject(requestContext, addedHeaders);
      const headerEntries = Object.entries(addedHeaders);
      for (let i = 0;i < headerEntries.length; i++) {
        const [k, v] = headerEntries[i];
        if (typeof request2.addHeader === "function") {
          request2.addHeader(k, v);
        } else if (typeof request2.headers === "string") {
          request2.headers += `${k}: ${v}\r
`;
        } else if (Array.isArray(request2.headers)) {
          request2.headers.push(k, v);
        }
      }
      this._recordFromReq.set(request2, { span, attributes, startTime });
    }
    onRequestHeaders({ request: request2, socket }) {
      const record = this._recordFromReq.get(request2);
      if (!record) {
        return;
      }
      const config = this.getConfig();
      const { span } = record;
      const { remoteAddress, remotePort } = socket;
      const spanAttributes = {
        [semantic_conventions_1.ATTR_NETWORK_PEER_ADDRESS]: remoteAddress,
        [semantic_conventions_1.ATTR_NETWORK_PEER_PORT]: remotePort
      };
      if (config.headersToSpanAttributes?.requestHeaders) {
        const headersToAttribs = new Set(config.headersToSpanAttributes.requestHeaders.map((n) => n.toLowerCase()));
        const headersMap = this.parseRequestHeaders(request2);
        for (const [name, value] of headersMap.entries()) {
          if (headersToAttribs.has(name)) {
            const attrValue = Array.isArray(value) ? value : [value];
            spanAttributes[`http.request.header.${name}`] = attrValue;
          }
        }
      }
      span.setAttributes(spanAttributes);
    }
    onResponseHeaders({ request: request2, response }) {
      const record = this._recordFromReq.get(request2);
      if (!record) {
        return;
      }
      const { span, attributes } = record;
      const spanAttributes = {
        [semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE]: response.statusCode
      };
      const config = this.getConfig();
      (0, instrumentation_1.safeExecuteInTheMiddle)(() => config.responseHook?.(span, { request: request2, response }), (e) => e && this._diag.error("caught responseHook error: ", e), true);
      if (config.headersToSpanAttributes?.responseHeaders) {
        const headersToAttribs = new Set;
        config.headersToSpanAttributes?.responseHeaders.forEach((name) => headersToAttribs.add(name.toLowerCase()));
        for (let idx = 0;idx < response.headers.length; idx = idx + 2) {
          const name = response.headers[idx].toString().toLowerCase();
          const value = response.headers[idx + 1];
          if (headersToAttribs.has(name)) {
            const attrName = `http.response.header.${name}`;
            if (!Object.hasOwn(spanAttributes, attrName)) {
              spanAttributes[attrName] = [value.toString()];
            } else {
              spanAttributes[attrName].push(value.toString());
            }
          }
        }
      }
      span.setAttributes(spanAttributes);
      span.setStatus({
        code: response.statusCode >= 400 ? api_1.SpanStatusCode.ERROR : api_1.SpanStatusCode.UNSET
      });
      record.attributes = Object.assign(attributes, spanAttributes);
    }
    onDone({ request: request2 }) {
      const record = this._recordFromReq.get(request2);
      if (!record) {
        return;
      }
      const { span, attributes, startTime } = record;
      span.end();
      this._recordFromReq.delete(request2);
      this.recordRequestDuration(attributes, startTime);
    }
    onError({ request: request2, error: error2 }) {
      const record = this._recordFromReq.get(request2);
      if (!record) {
        return;
      }
      const { span, attributes, startTime } = record;
      span.recordException(error2);
      span.setStatus({
        code: api_1.SpanStatusCode.ERROR,
        message: error2.message
      });
      span.end();
      this._recordFromReq.delete(request2);
      attributes[semantic_conventions_1.ATTR_ERROR_TYPE] = error2.message;
      this.recordRequestDuration(attributes, startTime);
    }
    recordRequestDuration(attributes, startTime) {
      const metricsAttributes = {};
      const keysToCopy = [
        semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE,
        semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD,
        semantic_conventions_1.ATTR_SERVER_ADDRESS,
        semantic_conventions_1.ATTR_SERVER_PORT,
        semantic_conventions_1.ATTR_URL_SCHEME,
        semantic_conventions_1.ATTR_ERROR_TYPE
      ];
      keysToCopy.forEach((key) => {
        if (key in attributes) {
          metricsAttributes[key] = attributes[key];
        }
      });
      const durationSeconds = (0, core_1.hrTimeToMilliseconds)((0, core_1.hrTimeDuration)(startTime, (0, core_1.hrTime)())) / 1000;
      this._httpClientDurationHistogram.record(durationSeconds, metricsAttributes);
    }
    getRequestMethod(original) {
      const knownMethods = {
        CONNECT: true,
        OPTIONS: true,
        HEAD: true,
        GET: true,
        POST: true,
        PUT: true,
        PATCH: true,
        DELETE: true,
        TRACE: true,
        QUERY: true
      };
      if (original.toUpperCase() in knownMethods) {
        return original.toUpperCase();
      }
      return "_OTHER";
    }
  }
  exports.UndiciInstrumentation = UndiciInstrumentation;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-undici@0.23.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-undici/build/src/index.js
var require_src12 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.UndiciInstrumentation = undefined;
  var undici_1 = require_undici();
  Object.defineProperty(exports, "UndiciInstrumentation", { enumerable: true, get: function() {
    return undici_1.UndiciInstrumentation;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/enums.js
var require_enums2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AttributeNames = undefined;
  var AttributeNames;
  (function(AttributeNames2) {
    AttributeNames2["AWS_OPERATION"] = "aws.operation";
    AttributeNames2["CLOUD_REGION"] = "cloud.region";
    AttributeNames2["AWS_SERVICE_API"] = "aws.service.api";
    AttributeNames2["AWS_SERVICE_NAME"] = "aws.service.name";
    AttributeNames2["AWS_SERVICE_IDENTIFIER"] = "aws.service.identifier";
    AttributeNames2["AWS_REQUEST_ID"] = "aws.request.id";
    AttributeNames2["AWS_REQUEST_EXTENDED_ID"] = "aws.request.extended_id";
    AttributeNames2["AWS_SIGNATURE_VERSION"] = "aws.signature.version";
    AttributeNames2["AWS_S3_BUCKET"] = "aws.s3.bucket";
    AttributeNames2["AWS_KINESIS_STREAM_NAME"] = "aws.kinesis.stream.name";
  })(AttributeNames = exports.AttributeNames || (exports.AttributeNames = {}));
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/semconv.js
var require_semconv6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ATTR_MESSAGING_SYSTEM = exports.ATTR_MESSAGING_OPERATION_TYPE = exports.ATTR_MESSAGING_OPERATION = exports.ATTR_MESSAGING_MESSAGE_ID = exports.ATTR_MESSAGING_DESTINATION_NAME = exports.ATTR_MESSAGING_BATCH_MESSAGE_COUNT = exports.ATTR_HTTP_STATUS_CODE = exports.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS = exports.ATTR_GEN_AI_USAGE_INPUT_TOKENS = exports.ATTR_GEN_AI_TOKEN_TYPE = exports.ATTR_GEN_AI_SYSTEM = exports.ATTR_GEN_AI_RESPONSE_FINISH_REASONS = exports.ATTR_GEN_AI_REQUEST_TOP_P = exports.ATTR_GEN_AI_REQUEST_TEMPERATURE = exports.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES = exports.ATTR_GEN_AI_REQUEST_MODEL = exports.ATTR_GEN_AI_REQUEST_MAX_TOKENS = exports.ATTR_GEN_AI_OPERATION_NAME = exports.ATTR_FAAS_INVOKED_REGION = exports.ATTR_FAAS_INVOKED_PROVIDER = exports.ATTR_FAAS_INVOKED_NAME = exports.ATTR_DB_SYSTEM = exports.ATTR_DB_STATEMENT = exports.ATTR_DB_OPERATION = exports.ATTR_DB_NAME = exports.ATTR_AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN = exports.ATTR_AWS_STEP_FUNCTIONS_ACTIVITY_ARN = exports.ATTR_AWS_SNS_TOPIC_ARN = exports.ATTR_AWS_SECRETSMANAGER_SECRET_ARN = exports.ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS = exports.ATTR_AWS_DYNAMODB_TABLE_NAMES = exports.ATTR_AWS_DYNAMODB_TABLE_COUNT = exports.ATTR_AWS_DYNAMODB_SELECT = exports.ATTR_AWS_DYNAMODB_SEGMENT = exports.ATTR_AWS_DYNAMODB_SCAN_FORWARD = exports.ATTR_AWS_DYNAMODB_SCANNED_COUNT = exports.ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = exports.ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = exports.ATTR_AWS_DYNAMODB_PROJECTION = exports.ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = exports.ATTR_AWS_DYNAMODB_LIMIT = exports.ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = exports.ATTR_AWS_DYNAMODB_INDEX_NAME = exports.ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = exports.ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = exports.ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = exports.ATTR_AWS_DYNAMODB_COUNT = exports.ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY = exports.ATTR_AWS_DYNAMODB_CONSISTENT_READ = exports.ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = undefined;
  exports.METRIC_GEN_AI_CLIENT_TOKEN_USAGE = exports.METRIC_GEN_AI_CLIENT_OPERATION_DURATION = exports.GEN_AI_TOKEN_TYPE_VALUE_OUTPUT = exports.GEN_AI_TOKEN_TYPE_VALUE_INPUT = exports.GEN_AI_SYSTEM_VALUE_AWS_BEDROCK = exports.GEN_AI_OPERATION_NAME_VALUE_CHAT = exports.DB_SYSTEM_NAME_VALUE_DYNAMODB = exports.DB_SYSTEM_VALUE_DYNAMODB = exports.ATTR_RPC_SYSTEM = exports.ATTR_RPC_SERVICE = exports.ATTR_RPC_METHOD = undefined;
  exports.ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = "aws.dynamodb.attribute_definitions";
  exports.ATTR_AWS_DYNAMODB_CONSISTENT_READ = "aws.dynamodb.consistent_read";
  exports.ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY = "aws.dynamodb.consumed_capacity";
  exports.ATTR_AWS_DYNAMODB_COUNT = "aws.dynamodb.count";
  exports.ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = "aws.dynamodb.exclusive_start_table";
  exports.ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = "aws.dynamodb.global_secondary_indexes";
  exports.ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = "aws.dynamodb.global_secondary_index_updates";
  exports.ATTR_AWS_DYNAMODB_INDEX_NAME = "aws.dynamodb.index_name";
  exports.ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = "aws.dynamodb.item_collection_metrics";
  exports.ATTR_AWS_DYNAMODB_LIMIT = "aws.dynamodb.limit";
  exports.ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = "aws.dynamodb.local_secondary_indexes";
  exports.ATTR_AWS_DYNAMODB_PROJECTION = "aws.dynamodb.projection";
  exports.ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = "aws.dynamodb.provisioned_read_capacity";
  exports.ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = "aws.dynamodb.provisioned_write_capacity";
  exports.ATTR_AWS_DYNAMODB_SCANNED_COUNT = "aws.dynamodb.scanned_count";
  exports.ATTR_AWS_DYNAMODB_SCAN_FORWARD = "aws.dynamodb.scan_forward";
  exports.ATTR_AWS_DYNAMODB_SEGMENT = "aws.dynamodb.segment";
  exports.ATTR_AWS_DYNAMODB_SELECT = "aws.dynamodb.select";
  exports.ATTR_AWS_DYNAMODB_TABLE_COUNT = "aws.dynamodb.table_count";
  exports.ATTR_AWS_DYNAMODB_TABLE_NAMES = "aws.dynamodb.table_names";
  exports.ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS = "aws.dynamodb.total_segments";
  exports.ATTR_AWS_SECRETSMANAGER_SECRET_ARN = "aws.secretsmanager.secret.arn";
  exports.ATTR_AWS_SNS_TOPIC_ARN = "aws.sns.topic.arn";
  exports.ATTR_AWS_STEP_FUNCTIONS_ACTIVITY_ARN = "aws.step_functions.activity.arn";
  exports.ATTR_AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN = "aws.step_functions.state_machine.arn";
  exports.ATTR_DB_NAME = "db.name";
  exports.ATTR_DB_OPERATION = "db.operation";
  exports.ATTR_DB_STATEMENT = "db.statement";
  exports.ATTR_DB_SYSTEM = "db.system";
  exports.ATTR_FAAS_INVOKED_NAME = "faas.invoked_name";
  exports.ATTR_FAAS_INVOKED_PROVIDER = "faas.invoked_provider";
  exports.ATTR_FAAS_INVOKED_REGION = "faas.invoked_region";
  exports.ATTR_GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
  exports.ATTR_GEN_AI_REQUEST_MAX_TOKENS = "gen_ai.request.max_tokens";
  exports.ATTR_GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
  exports.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES = "gen_ai.request.stop_sequences";
  exports.ATTR_GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature";
  exports.ATTR_GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p";
  exports.ATTR_GEN_AI_RESPONSE_FINISH_REASONS = "gen_ai.response.finish_reasons";
  exports.ATTR_GEN_AI_SYSTEM = "gen_ai.system";
  exports.ATTR_GEN_AI_TOKEN_TYPE = "gen_ai.token.type";
  exports.ATTR_GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
  exports.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
  exports.ATTR_HTTP_STATUS_CODE = "http.status_code";
  exports.ATTR_MESSAGING_BATCH_MESSAGE_COUNT = "messaging.batch.message_count";
  exports.ATTR_MESSAGING_DESTINATION_NAME = "messaging.destination.name";
  exports.ATTR_MESSAGING_MESSAGE_ID = "messaging.message.id";
  exports.ATTR_MESSAGING_OPERATION = "messaging.operation";
  exports.ATTR_MESSAGING_OPERATION_TYPE = "messaging.operation.type";
  exports.ATTR_MESSAGING_SYSTEM = "messaging.system";
  exports.ATTR_RPC_METHOD = "rpc.method";
  exports.ATTR_RPC_SERVICE = "rpc.service";
  exports.ATTR_RPC_SYSTEM = "rpc.system";
  exports.DB_SYSTEM_VALUE_DYNAMODB = "dynamodb";
  exports.DB_SYSTEM_NAME_VALUE_DYNAMODB = "dynamodb";
  exports.GEN_AI_OPERATION_NAME_VALUE_CHAT = "chat";
  exports.GEN_AI_SYSTEM_VALUE_AWS_BEDROCK = "aws.bedrock";
  exports.GEN_AI_TOKEN_TYPE_VALUE_INPUT = "input";
  exports.GEN_AI_TOKEN_TYPE_VALUE_OUTPUT = "output";
  exports.METRIC_GEN_AI_CLIENT_OPERATION_DURATION = "gen_ai.client.operation.duration";
  exports.METRIC_GEN_AI_CLIENT_TOKEN_USAGE = "gen_ai.client.token.usage";
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/MessageAttributes.js
var require_MessageAttributes = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.addPropagationFieldsToAttributeNames = exports.extractPropagationContext = exports.injectPropagationContext = exports.contextGetter = exports.contextSetter = exports.MAX_MESSAGE_ATTRIBUTES = undefined;
  var api_1 = require_src();
  exports.MAX_MESSAGE_ATTRIBUTES = 10;

  class ContextSetter {
    set(carrier, key, value) {
      carrier[key] = {
        DataType: "String",
        StringValue: value
      };
    }
  }
  exports.contextSetter = new ContextSetter;

  class ContextGetter {
    keys(carrier) {
      if (carrier == null) {
        return [];
      }
      return Object.keys(carrier);
    }
    get(carrier, key) {
      return carrier?.[key]?.StringValue || carrier?.[key]?.Value;
    }
  }
  exports.contextGetter = new ContextGetter;
  var injectPropagationContext = (attributesMap) => {
    const attributes = attributesMap ?? {};
    if (Object.keys(attributes).length + api_1.propagation.fields().length <= exports.MAX_MESSAGE_ATTRIBUTES) {
      api_1.propagation.inject(api_1.context.active(), attributes, exports.contextSetter);
    } else {
      api_1.diag.warn("aws-sdk instrumentation: cannot set context propagation on SQS/SNS message due to maximum amount of MessageAttributes");
    }
    return attributes;
  };
  exports.injectPropagationContext = injectPropagationContext;
  var extractPropagationContext = (message, sqsExtractContextPropagationFromPayload) => {
    const propagationFields = api_1.propagation.fields();
    const hasPropagationFields = Object.keys(message.MessageAttributes || []).some((attr) => propagationFields.includes(attr));
    if (hasPropagationFields) {
      return message.MessageAttributes;
    } else if (sqsExtractContextPropagationFromPayload && message.Body) {
      try {
        const payload = JSON.parse(message.Body);
        return payload.MessageAttributes;
      } catch {
        api_1.diag.debug("failed to parse SQS payload to extract context propagation, trace might be incomplete.");
      }
    }
    return;
  };
  exports.extractPropagationContext = extractPropagationContext;
  var addPropagationFieldsToAttributeNames = (messageAttributeNames = [], propagationFields) => {
    return messageAttributeNames.length ? Array.from(new Set([...messageAttributeNames, ...propagationFields])) : propagationFields;
  };
  exports.addPropagationFieldsToAttributeNames = addPropagationFieldsToAttributeNames;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/sqs.js
var require_sqs = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SqsServiceExtension = undefined;
  var api_1 = require_src();
  var semantic_conventions_1 = require_src2();
  var semconv_1 = require_semconv6();
  var MessageAttributes_1 = require_MessageAttributes();

  class SqsServiceExtension {
    requestPreSpanHook(request2, _config) {
      const queueUrl = this.extractQueueUrl(request2.commandInput);
      const queueName = this.extractQueueNameFromUrl(queueUrl);
      let spanKind = api_1.SpanKind.CLIENT;
      let spanName;
      const spanAttributes = {
        [semconv_1.ATTR_MESSAGING_SYSTEM]: "aws_sqs",
        [semconv_1.ATTR_MESSAGING_DESTINATION_NAME]: queueName,
        [semantic_conventions_1.ATTR_URL_FULL]: queueUrl
      };
      let isIncoming = false;
      switch (request2.commandName) {
        case "ReceiveMessage":
          {
            isIncoming = true;
            spanKind = api_1.SpanKind.CONSUMER;
            spanName = `${queueName} receive`;
            spanAttributes[semconv_1.ATTR_MESSAGING_OPERATION_TYPE] = "receive";
            request2.commandInput.MessageAttributeNames = (0, MessageAttributes_1.addPropagationFieldsToAttributeNames)(request2.commandInput.MessageAttributeNames, api_1.propagation.fields());
          }
          break;
        case "SendMessage":
        case "SendMessageBatch":
          spanKind = api_1.SpanKind.PRODUCER;
          spanName = `${queueName} send`;
          break;
      }
      return {
        isIncoming,
        spanAttributes,
        spanKind,
        spanName
      };
    }
    requestPostSpanHook = (request2) => {
      switch (request2.commandName) {
        case "SendMessage":
          {
            const origMessageAttributes = request2.commandInput["MessageAttributes"] ?? {};
            if (origMessageAttributes) {
              request2.commandInput["MessageAttributes"] = (0, MessageAttributes_1.injectPropagationContext)(origMessageAttributes);
            }
          }
          break;
        case "SendMessageBatch":
          {
            const entries = request2.commandInput?.Entries;
            if (Array.isArray(entries)) {
              entries.forEach((messageParams) => {
                messageParams.MessageAttributes = (0, MessageAttributes_1.injectPropagationContext)(messageParams.MessageAttributes ?? {});
              });
            }
          }
          break;
      }
    };
    responseHook = (response, span, _tracer, config) => {
      switch (response.request.commandName) {
        case "SendMessage":
          span.setAttribute(semconv_1.ATTR_MESSAGING_MESSAGE_ID, response?.data?.MessageId);
          break;
        case "SendMessageBatch":
          break;
        case "ReceiveMessage": {
          const messages = response?.data?.Messages || [];
          span.setAttribute(semconv_1.ATTR_MESSAGING_BATCH_MESSAGE_COUNT, messages.length);
          for (const message of messages) {
            const propagatedContext = api_1.propagation.extract(api_1.ROOT_CONTEXT, (0, MessageAttributes_1.extractPropagationContext)(message, config.sqsExtractContextPropagationFromPayload), MessageAttributes_1.contextGetter);
            const spanContext = api_1.trace.getSpanContext(propagatedContext);
            if (spanContext) {
              span.addLink({
                context: spanContext,
                attributes: {
                  [semconv_1.ATTR_MESSAGING_MESSAGE_ID]: message.MessageId
                }
              });
            }
          }
          break;
        }
      }
    };
    extractQueueUrl = (commandInput) => {
      return commandInput?.QueueUrl;
    };
    extractQueueNameFromUrl = (queueUrl) => {
      if (!queueUrl)
        return;
      const segments = queueUrl.split("/");
      if (segments.length === 0)
        return;
      return segments[segments.length - 1];
    };
  }
  exports.SqsServiceExtension = SqsServiceExtension;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/bedrock-runtime.js
var require_bedrock_runtime = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BedrockRuntimeServiceExtension = undefined;
  var api_1 = require_src();
  var semconv_1 = require_semconv6();
  var core_1 = require_src8();

  class BedrockRuntimeServiceExtension {
    tokenUsage;
    operationDuration;
    _diag = api_1.diag;
    updateMetricInstruments(meter) {
      this.tokenUsage = meter.createHistogram(semconv_1.METRIC_GEN_AI_CLIENT_TOKEN_USAGE, {
        unit: "{token}",
        description: "Measures number of input and output tokens used",
        valueType: api_1.ValueType.INT,
        advice: {
          explicitBucketBoundaries: [
            1,
            4,
            16,
            64,
            256,
            1024,
            4096,
            16384,
            65536,
            262144,
            1048576,
            4194304,
            16777216,
            67108864
          ]
        }
      });
      this.operationDuration = meter.createHistogram(semconv_1.METRIC_GEN_AI_CLIENT_OPERATION_DURATION, {
        unit: "s",
        description: "GenAI operation duration",
        advice: {
          explicitBucketBoundaries: [
            0.01,
            0.02,
            0.04,
            0.08,
            0.16,
            0.32,
            0.64,
            1.28,
            2.56,
            5.12,
            10.24,
            20.48,
            40.96,
            81.92
          ]
        }
      });
    }
    requestPreSpanHook(request2, config, diag3) {
      switch (request2.commandName) {
        case "Converse":
          return this.requestPreSpanHookConverse(request2, config, diag3, false);
        case "ConverseStream":
          return this.requestPreSpanHookConverse(request2, config, diag3, true);
        case "InvokeModel":
          return this.requestPreSpanHookInvokeModel(request2, config, diag3, false);
        case "InvokeModelWithResponseStream":
          return this.requestPreSpanHookInvokeModel(request2, config, diag3, true);
      }
      return {
        isIncoming: false
      };
    }
    requestPreSpanHookConverse(request2, config, diag3, isStream) {
      let spanName = semconv_1.GEN_AI_OPERATION_NAME_VALUE_CHAT;
      const spanAttributes = {
        [semconv_1.ATTR_GEN_AI_SYSTEM]: semconv_1.GEN_AI_SYSTEM_VALUE_AWS_BEDROCK,
        [semconv_1.ATTR_GEN_AI_OPERATION_NAME]: semconv_1.GEN_AI_OPERATION_NAME_VALUE_CHAT
      };
      const modelId = request2.commandInput.modelId;
      if (modelId) {
        spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MODEL] = modelId;
        if (spanName) {
          spanName += ` ${modelId}`;
        }
      }
      const inferenceConfig = request2.commandInput.inferenceConfig;
      if (inferenceConfig) {
        const { maxTokens, temperature, topP, stopSequences } = inferenceConfig;
        if (maxTokens !== undefined) {
          spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = maxTokens;
        }
        if (temperature !== undefined) {
          spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = temperature;
        }
        if (topP !== undefined) {
          spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = topP;
        }
        if (stopSequences !== undefined) {
          spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = stopSequences;
        }
      }
      return {
        spanName,
        isIncoming: false,
        isStream,
        spanAttributes
      };
    }
    requestPreSpanHookInvokeModel(request2, config, diag3, isStream) {
      let spanName;
      const spanAttributes = {
        [semconv_1.ATTR_GEN_AI_SYSTEM]: semconv_1.GEN_AI_SYSTEM_VALUE_AWS_BEDROCK
      };
      const modelId = request2.commandInput?.modelId;
      if (modelId) {
        spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MODEL] = modelId;
      }
      if (request2.commandInput?.body) {
        const requestBody = JSON.parse(request2.commandInput.body);
        if (modelId.includes("amazon.titan")) {
          if (requestBody.textGenerationConfig?.temperature !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.textGenerationConfig.temperature;
          }
          if (requestBody.textGenerationConfig?.topP !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.textGenerationConfig.topP;
          }
          if (requestBody.textGenerationConfig?.maxTokenCount !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.textGenerationConfig.maxTokenCount;
          }
          if (requestBody.textGenerationConfig?.stopSequences !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.textGenerationConfig.stopSequences;
          }
        } else if (modelId.includes("amazon.nova")) {
          if (requestBody.inferenceConfig?.temperature !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.inferenceConfig.temperature;
          }
          if (requestBody.inferenceConfig?.top_p !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.inferenceConfig.top_p;
          }
          if (requestBody.inferenceConfig?.max_new_tokens !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.inferenceConfig.max_new_tokens;
          }
          if (requestBody.inferenceConfig?.stopSequences !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.inferenceConfig.stopSequences;
          }
        } else if (modelId.includes("anthropic.claude")) {
          if (requestBody.max_tokens !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.max_tokens;
          }
          if (requestBody.temperature !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.temperature;
          }
          if (requestBody.top_p !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.top_p;
          }
          if (requestBody.stop_sequences !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.stop_sequences;
          }
        } else if (modelId.includes("meta.llama")) {
          if (requestBody.max_gen_len !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.max_gen_len;
          }
          if (requestBody.temperature !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.temperature;
          }
          if (requestBody.top_p !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.top_p;
          }
        } else if (modelId.includes("cohere.command-r")) {
          if (requestBody.max_tokens !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.max_tokens;
          }
          if (requestBody.temperature !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.temperature;
          }
          if (requestBody.p !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.p;
          }
          if (requestBody.message !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS] = Math.ceil(requestBody.message.length / 6);
          }
          if (requestBody.stop_sequences !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.stop_sequences;
          }
        } else if (modelId.includes("cohere.command")) {
          if (requestBody.max_tokens !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.max_tokens;
          }
          if (requestBody.temperature !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.temperature;
          }
          if (requestBody.p !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.p;
          }
          if (requestBody.prompt !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS] = Math.ceil(requestBody.prompt.length / 6);
          }
          if (requestBody.stop_sequences !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.stop_sequences;
          }
        } else if (modelId.includes("mistral")) {
          if (requestBody.prompt !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS] = Math.ceil(requestBody.prompt.length / 6);
          }
          if (requestBody.max_tokens !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.max_tokens;
          }
          if (requestBody.temperature !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.temperature;
          }
          if (requestBody.top_p !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.top_p;
          }
          if (requestBody.stop !== undefined) {
            spanAttributes[semconv_1.ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.stop;
          }
        }
      }
      return {
        spanName,
        isIncoming: false,
        isStream,
        spanAttributes
      };
    }
    responseHook(response, span, tracer, config, startTime) {
      if (!span.isRecording()) {
        return;
      }
      switch (response.request.commandName) {
        case "Converse":
          return this.responseHookConverse(response, span, tracer, config, startTime);
        case "ConverseStream":
          return this.responseHookConverseStream(response, span, tracer, config, startTime);
        case "InvokeModel":
          return this.responseHookInvokeModel(response, span, tracer, config);
        case "InvokeModelWithResponseStream":
          return this.responseHookInvokeModelWithResponseStream(response, span, tracer, config);
      }
    }
    responseHookConverse(response, span, tracer, config, startTime) {
      const { stopReason, usage } = response.data;
      BedrockRuntimeServiceExtension.setStopReason(span, stopReason);
      this.setUsage(response, span, usage, startTime);
    }
    responseHookConverseStream(response, span, tracer, config, startTime) {
      return {
        ...response.data,
        stream: this.wrapConverseStreamResponse(response, response.data.stream, span, startTime)
      };
    }
    async* wrapConverseStreamResponse(response, stream, span, startTime) {
      try {
        let usage;
        for await (const item of stream) {
          BedrockRuntimeServiceExtension.setStopReason(span, item.messageStop?.stopReason);
          usage = item.metadata?.usage;
          yield item;
        }
        this.setUsage(response, span, usage, startTime);
      } finally {
        span.end();
      }
    }
    static setStopReason(span, stopReason) {
      if (stopReason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [stopReason]);
      }
    }
    setUsage(response, span, usage, startTime) {
      const sharedMetricAttrs = {
        [semconv_1.ATTR_GEN_AI_SYSTEM]: semconv_1.GEN_AI_SYSTEM_VALUE_AWS_BEDROCK,
        [semconv_1.ATTR_GEN_AI_OPERATION_NAME]: semconv_1.GEN_AI_OPERATION_NAME_VALUE_CHAT,
        [semconv_1.ATTR_GEN_AI_REQUEST_MODEL]: response.request.commandInput.modelId
      };
      const durationSecs = (0, core_1.hrTimeToMilliseconds)((0, core_1.hrTimeDuration)(startTime, (0, core_1.hrTime)())) / 1000;
      this.operationDuration.record(durationSecs, sharedMetricAttrs);
      if (usage) {
        const { inputTokens, outputTokens } = usage;
        if (inputTokens !== undefined) {
          span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, inputTokens);
          this.tokenUsage.record(inputTokens, {
            ...sharedMetricAttrs,
            [semconv_1.ATTR_GEN_AI_TOKEN_TYPE]: semconv_1.GEN_AI_TOKEN_TYPE_VALUE_INPUT
          });
        }
        if (outputTokens !== undefined) {
          span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, outputTokens);
          this.tokenUsage.record(outputTokens, {
            ...sharedMetricAttrs,
            [semconv_1.ATTR_GEN_AI_TOKEN_TYPE]: semconv_1.GEN_AI_TOKEN_TYPE_VALUE_OUTPUT
          });
        }
      }
    }
    responseHookInvokeModel(response, span, tracer, config) {
      const currentModelId = response.request.commandInput?.modelId;
      if (response.data?.body) {
        const decodedResponseBody = new TextDecoder().decode(response.data.body);
        const responseBody = JSON.parse(decodedResponseBody);
        if (currentModelId.includes("amazon.titan")) {
          if (responseBody.inputTextTokenCount !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, responseBody.inputTextTokenCount);
          }
          if (responseBody.results?.[0]?.tokenCount !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, responseBody.results[0].tokenCount);
          }
          if (responseBody.results?.[0]?.completionReason !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
              responseBody.results[0].completionReason
            ]);
          }
        } else if (currentModelId.includes("amazon.nova")) {
          if (responseBody.usage !== undefined) {
            if (responseBody.usage.inputTokens !== undefined) {
              span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, responseBody.usage.inputTokens);
            }
            if (responseBody.usage.outputTokens !== undefined) {
              span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, responseBody.usage.outputTokens);
            }
          }
          if (responseBody.stopReason !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
              responseBody.stopReason
            ]);
          }
        } else if (currentModelId.includes("anthropic.claude")) {
          if (responseBody.usage?.input_tokens !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, responseBody.usage.input_tokens);
          }
          if (responseBody.usage?.output_tokens !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, responseBody.usage.output_tokens);
          }
          if (responseBody.stop_reason !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
              responseBody.stop_reason
            ]);
          }
        } else if (currentModelId.includes("meta.llama")) {
          if (responseBody.prompt_token_count !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, responseBody.prompt_token_count);
          }
          if (responseBody.generation_token_count !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, responseBody.generation_token_count);
          }
          if (responseBody.stop_reason !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
              responseBody.stop_reason
            ]);
          }
        } else if (currentModelId.includes("cohere.command-r")) {
          if (responseBody.text !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, Math.ceil(responseBody.text.length / 6));
          }
          if (responseBody.finish_reason !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
              responseBody.finish_reason
            ]);
          }
        } else if (currentModelId.includes("cohere.command")) {
          if (responseBody.generations?.[0]?.text !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, Math.ceil(responseBody.generations[0].text.length / 6));
          }
          if (responseBody.generations?.[0]?.finish_reason !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
              responseBody.generations[0].finish_reason
            ]);
          }
        } else if (currentModelId.includes("mistral")) {
          if (responseBody.outputs?.[0]?.text !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, Math.ceil(responseBody.outputs[0].text.length / 6));
          }
          if (responseBody.outputs?.[0]?.stop_reason !== undefined) {
            span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
              responseBody.outputs[0].stop_reason
            ]);
          }
        }
      }
    }
    async responseHookInvokeModelWithResponseStream(response, span, tracer, config) {
      const stream = response.data?.body;
      const modelId = response.request.commandInput?.modelId;
      if (!stream || !modelId)
        return;
      response.data.body = async function* () {
        try {
          for await (const chunk of stream) {
            const parsedChunk = this.parseChunk(chunk?.chunk?.bytes);
            if (!parsedChunk) {} else if (modelId.includes("amazon.titan")) {
              BedrockRuntimeServiceExtension.recordTitanAttributes(parsedChunk, span);
            } else if (modelId.includes("anthropic.claude")) {
              BedrockRuntimeServiceExtension.recordClaudeAttributes(parsedChunk, span);
            } else if (modelId.includes("amazon.nova")) {
              BedrockRuntimeServiceExtension.recordNovaAttributes(parsedChunk, span);
            } else if (modelId.includes("meta.llama")) {
              BedrockRuntimeServiceExtension.recordLlamaAttributes(parsedChunk, span);
            } else if (modelId.includes("cohere.command-r")) {
              BedrockRuntimeServiceExtension.recordCohereRAttributes(parsedChunk, span);
            } else if (modelId.includes("cohere.command")) {
              BedrockRuntimeServiceExtension.recordCohereAttributes(parsedChunk, span);
            } else if (modelId.includes("mistral")) {
              BedrockRuntimeServiceExtension.recordMistralAttributes(parsedChunk, span);
            }
            yield chunk;
          }
        } finally {
          span.end();
        }
      }.bind(this)();
      return response.data;
    }
    parseChunk(bytes) {
      if (!bytes || !(bytes instanceof Uint8Array))
        return null;
      try {
        const str = Buffer.from(bytes).toString("utf-8");
        return JSON.parse(str);
      } catch (err) {
        this._diag.warn("Failed to parse streamed chunk", err);
        return null;
      }
    }
    static recordNovaAttributes(parsedChunk, span) {
      if (parsedChunk.metadata?.usage !== undefined) {
        if (parsedChunk.metadata?.usage.inputTokens !== undefined) {
          span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, parsedChunk.metadata.usage.inputTokens);
        }
        if (parsedChunk.metadata?.usage.outputTokens !== undefined) {
          span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, parsedChunk.metadata.usage.outputTokens);
        }
      }
      if (parsedChunk.messageStop?.stopReason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
          parsedChunk.messageStop.stopReason
        ]);
      }
    }
    static recordClaudeAttributes(parsedChunk, span) {
      if (parsedChunk.message?.usage?.input_tokens !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, parsedChunk.message.usage.input_tokens);
      }
      if (parsedChunk.message?.usage?.output_tokens !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, parsedChunk.message.usage.output_tokens);
      }
      if (parsedChunk.delta?.stop_reason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
          parsedChunk.delta.stop_reason
        ]);
      }
    }
    static recordTitanAttributes(parsedChunk, span) {
      if (parsedChunk.inputTextTokenCount !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, parsedChunk.inputTextTokenCount);
      }
      if (parsedChunk.totalOutputTextTokenCount !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, parsedChunk.totalOutputTextTokenCount);
      }
      if (parsedChunk.completionReason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
          parsedChunk.completionReason
        ]);
      }
    }
    static recordLlamaAttributes(parsedChunk, span) {
      if (parsedChunk.prompt_token_count !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_INPUT_TOKENS, parsedChunk.prompt_token_count);
      }
      if (parsedChunk.generation_token_count !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, parsedChunk.generation_token_count);
      }
      if (parsedChunk.stop_reason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
          parsedChunk.stop_reason
        ]);
      }
    }
    static recordMistralAttributes(parsedChunk, span) {
      if (parsedChunk.outputs?.[0]?.text !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, Math.ceil(parsedChunk.outputs[0].text.length / 6));
      }
      if (parsedChunk.outputs?.[0]?.stop_reason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
          parsedChunk.outputs[0].stop_reason
        ]);
      }
    }
    static recordCohereAttributes(parsedChunk, span) {
      if (parsedChunk.generations?.[0]?.text !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, Math.ceil(parsedChunk.generations[0].text.length / 6));
      }
      if (parsedChunk.generations?.[0]?.finish_reason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
          parsedChunk.generations[0].finish_reason
        ]);
      }
    }
    static recordCohereRAttributes(parsedChunk, span) {
      if (parsedChunk.text !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, Math.ceil(parsedChunk.text.length / 6));
      }
      if (parsedChunk.finish_reason !== undefined) {
        span.setAttribute(semconv_1.ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
          parsedChunk.finish_reason
        ]);
      }
    }
  }
  exports.BedrockRuntimeServiceExtension = BedrockRuntimeServiceExtension;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/dynamodb.js
var require_dynamodb = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DynamodbServiceExtension = undefined;
  var api_1 = require_src();
  var instrumentation_1 = require_src6();
  var semantic_conventions_1 = require_src2();
  var semconv_1 = require_semconv6();

  class DynamodbServiceExtension {
    toArray(values) {
      return Array.isArray(values) ? values : [values];
    }
    requestPreSpanHook(normalizedRequest, config, diag3, dbSemconvStability) {
      const spanKind = api_1.SpanKind.CLIENT;
      let spanName;
      const isIncoming = false;
      const operation = normalizedRequest.commandName;
      const tableName = normalizedRequest.commandInput?.TableName;
      const spanAttributes = {};
      if (dbSemconvStability === undefined || dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
        spanAttributes[semconv_1.ATTR_DB_SYSTEM] = semconv_1.DB_SYSTEM_VALUE_DYNAMODB;
        spanAttributes[semconv_1.ATTR_DB_NAME] = tableName;
        spanAttributes[semconv_1.ATTR_DB_OPERATION] = operation;
      }
      if (dbSemconvStability !== undefined && dbSemconvStability & instrumentation_1.SemconvStability.STABLE) {
        spanAttributes[semantic_conventions_1.ATTR_DB_SYSTEM_NAME] = semconv_1.DB_SYSTEM_NAME_VALUE_DYNAMODB;
        spanAttributes[semantic_conventions_1.ATTR_DB_NAMESPACE] = tableName;
        spanAttributes[semantic_conventions_1.ATTR_DB_OPERATION_NAME] = operation;
      }
      if (config.dynamoDBStatementSerializer) {
        try {
          const sanitizedStatement = config.dynamoDBStatementSerializer(operation, normalizedRequest.commandInput);
          if (typeof sanitizedStatement === "string") {
            if (dbSemconvStability === undefined || dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
              spanAttributes[semconv_1.ATTR_DB_STATEMENT] = sanitizedStatement;
            }
            if (dbSemconvStability !== undefined && dbSemconvStability & instrumentation_1.SemconvStability.STABLE) {
              spanAttributes[semantic_conventions_1.ATTR_DB_QUERY_TEXT] = sanitizedStatement;
            }
          }
        } catch (err) {
          diag3.error("failed to sanitize DynamoDB statement", err);
        }
      }
      if (normalizedRequest.commandInput?.TableName) {
        spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_TABLE_NAMES] = [
          normalizedRequest.commandInput.TableName
        ];
      } else if (normalizedRequest.commandInput?.RequestItems) {
        spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_TABLE_NAMES] = Object.keys(normalizedRequest.commandInput.RequestItems);
      }
      if (operation === "CreateTable" || operation === "UpdateTable") {
        if (normalizedRequest.commandInput?.ProvisionedThroughput) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY] = normalizedRequest.commandInput.ProvisionedThroughput.ReadCapacityUnits;
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY] = normalizedRequest.commandInput.ProvisionedThroughput.WriteCapacityUnits;
        }
      }
      if (operation === "GetItem" || operation === "Scan" || operation === "Query") {
        if (normalizedRequest.commandInput?.ConsistentRead) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_CONSISTENT_READ] = normalizedRequest.commandInput.ConsistentRead;
        }
      }
      if (operation === "Query" || operation === "Scan") {
        if (normalizedRequest.commandInput?.ProjectionExpression) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_PROJECTION] = normalizedRequest.commandInput.ProjectionExpression;
        }
      }
      if (operation === "CreateTable") {
        if (normalizedRequest.commandInput?.GlobalSecondaryIndexes) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] = this.toArray(normalizedRequest.commandInput.GlobalSecondaryIndexes).map((x) => JSON.stringify(x));
        }
        if (normalizedRequest.commandInput?.LocalSecondaryIndexes) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES] = this.toArray(normalizedRequest.commandInput.LocalSecondaryIndexes).map((x) => JSON.stringify(x));
        }
      }
      if (operation === "ListTables" || operation === "Query" || operation === "Scan") {
        if (normalizedRequest.commandInput?.Limit) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_LIMIT] = normalizedRequest.commandInput.Limit;
        }
      }
      if (operation === "ListTables") {
        if (normalizedRequest.commandInput?.ExclusiveStartTableName) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE] = normalizedRequest.commandInput.ExclusiveStartTableName;
        }
      }
      if (operation === "Query") {
        if (normalizedRequest.commandInput?.ScanIndexForward) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_SCAN_FORWARD] = normalizedRequest.commandInput.ScanIndexForward;
        }
        if (normalizedRequest.commandInput?.IndexName) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_INDEX_NAME] = normalizedRequest.commandInput.IndexName;
        }
        if (normalizedRequest.commandInput?.Select) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_SELECT] = normalizedRequest.commandInput.Select;
        }
      }
      if (operation === "Scan") {
        if (normalizedRequest.commandInput?.Segment) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_SEGMENT] = normalizedRequest.commandInput?.Segment;
        }
        if (normalizedRequest.commandInput?.TotalSegments) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS] = normalizedRequest.commandInput?.TotalSegments;
        }
        if (normalizedRequest.commandInput?.IndexName) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_INDEX_NAME] = normalizedRequest.commandInput.IndexName;
        }
        if (normalizedRequest.commandInput?.Select) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_SELECT] = normalizedRequest.commandInput.Select;
        }
      }
      if (operation === "UpdateTable") {
        if (normalizedRequest.commandInput?.AttributeDefinitions) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS] = this.toArray(normalizedRequest.commandInput.AttributeDefinitions).map((x) => JSON.stringify(x));
        }
        if (normalizedRequest.commandInput?.GlobalSecondaryIndexUpdates) {
          spanAttributes[semconv_1.ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES] = this.toArray(normalizedRequest.commandInput.GlobalSecondaryIndexUpdates).map((x) => JSON.stringify(x));
        }
      }
      return {
        isIncoming,
        spanAttributes,
        spanKind,
        spanName
      };
    }
    responseHook(response, span, _tracer, _config) {
      if (response.data?.ConsumedCapacity) {
        span.setAttribute(semconv_1.ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY, toArray(response.data.ConsumedCapacity).map((x) => JSON.stringify(x)));
      }
      if (response.data?.ItemCollectionMetrics) {
        span.setAttribute(semconv_1.ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS, this.toArray(response.data.ItemCollectionMetrics).map((x) => JSON.stringify(x)));
      }
      if (response.data?.TableNames) {
        span.setAttribute(semconv_1.ATTR_AWS_DYNAMODB_TABLE_COUNT, response.data?.TableNames.length);
      }
      if (response.data?.Count) {
        span.setAttribute(semconv_1.ATTR_AWS_DYNAMODB_COUNT, response.data?.Count);
      }
      if (response.data?.ScannedCount) {
        span.setAttribute(semconv_1.ATTR_AWS_DYNAMODB_SCANNED_COUNT, response.data?.ScannedCount);
      }
    }
  }
  exports.DynamodbServiceExtension = DynamodbServiceExtension;
  function toArray(values) {
    return Array.isArray(values) ? values : [values];
  }
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/secretsmanager.js
var require_secretsmanager = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SecretsManagerServiceExtension = undefined;
  var api_1 = require_src();
  var semconv_1 = require_semconv6();

  class SecretsManagerServiceExtension {
    requestPreSpanHook(request2, _config) {
      const secretId = request2.commandInput?.SecretId;
      const spanKind = api_1.SpanKind.CLIENT;
      let spanName;
      const spanAttributes = {};
      if (typeof secretId === "string" && secretId.startsWith("arn:aws:secretsmanager:")) {
        spanAttributes[semconv_1.ATTR_AWS_SECRETSMANAGER_SECRET_ARN] = secretId;
      }
      return {
        isIncoming: false,
        spanAttributes,
        spanKind,
        spanName
      };
    }
    responseHook(response, span, tracer, config) {
      const secretArn = response.data?.ARN;
      if (secretArn) {
        span.setAttribute(semconv_1.ATTR_AWS_SECRETSMANAGER_SECRET_ARN, secretArn);
      }
    }
  }
  exports.SecretsManagerServiceExtension = SecretsManagerServiceExtension;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/semconv-obsolete.js
var require_semconv_obsolete = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MESSAGING_OPERATION_VALUE_RECEIVE = exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = exports.ATTR_MESSAGING_DESTINATION_KIND = exports.ATTR_MESSAGING_DESTINATION = exports.ATTR_FAAS_EXECUTION = undefined;
  exports.ATTR_FAAS_EXECUTION = "faas.execution";
  exports.ATTR_MESSAGING_DESTINATION = "messaging.destination";
  exports.ATTR_MESSAGING_DESTINATION_KIND = "messaging.destination_kind";
  exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = "topic";
  exports.MESSAGING_OPERATION_VALUE_RECEIVE = "receive";
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/sns.js
var require_sns = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SnsServiceExtension = undefined;
  var api_1 = require_src();
  var semconv_1 = require_semconv6();
  var semconv_obsolete_1 = require_semconv_obsolete();
  var MessageAttributes_1 = require_MessageAttributes();

  class SnsServiceExtension {
    requestPreSpanHook(request2, _config) {
      let spanKind = api_1.SpanKind.CLIENT;
      let spanName = `SNS ${request2.commandName}`;
      const spanAttributes = {
        [semconv_1.ATTR_MESSAGING_SYSTEM]: "aws.sns"
      };
      if (request2.commandName === "Publish") {
        spanKind = api_1.SpanKind.PRODUCER;
        spanAttributes[semconv_obsolete_1.ATTR_MESSAGING_DESTINATION_KIND] = semconv_obsolete_1.MESSAGING_DESTINATION_KIND_VALUE_TOPIC;
        const { TopicArn, TargetArn, PhoneNumber } = request2.commandInput;
        spanAttributes[semconv_obsolete_1.ATTR_MESSAGING_DESTINATION] = this.extractDestinationName(TopicArn, TargetArn, PhoneNumber);
        spanAttributes["messaging.destination.name"] = TopicArn || TargetArn || PhoneNumber || "unknown";
        spanName = `${PhoneNumber ? "phone_number" : spanAttributes[semconv_obsolete_1.ATTR_MESSAGING_DESTINATION]} send`;
      }
      const topicArn = request2.commandInput?.TopicArn;
      if (topicArn) {
        spanAttributes[semconv_1.ATTR_AWS_SNS_TOPIC_ARN] = topicArn;
      }
      return {
        isIncoming: false,
        spanAttributes,
        spanKind,
        spanName
      };
    }
    requestPostSpanHook(request2) {
      if (request2.commandName === "Publish") {
        const origMessageAttributes = request2.commandInput["MessageAttributes"] ?? {};
        if (origMessageAttributes) {
          request2.commandInput["MessageAttributes"] = (0, MessageAttributes_1.injectPropagationContext)(origMessageAttributes);
        }
      }
    }
    responseHook(response, span, tracer, config) {
      const topicArn = response.data?.TopicArn;
      if (topicArn) {
        span.setAttribute(semconv_1.ATTR_AWS_SNS_TOPIC_ARN, topicArn);
      }
    }
    extractDestinationName(topicArn, targetArn, phoneNumber) {
      if (topicArn || targetArn) {
        const arn = topicArn ?? targetArn;
        try {
          return arn.substring(arn.lastIndexOf(":") + 1);
        } catch (err) {
          return arn;
        }
      } else if (phoneNumber) {
        return phoneNumber;
      } else {
        return "unknown";
      }
    }
  }
  exports.SnsServiceExtension = SnsServiceExtension;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/stepfunctions.js
var require_stepfunctions = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.StepFunctionsServiceExtension = undefined;
  var api_1 = require_src();
  var semconv_1 = require_semconv6();

  class StepFunctionsServiceExtension {
    requestPreSpanHook(request2, _config) {
      const stateMachineArn = request2.commandInput?.stateMachineArn;
      const activityArn = request2.commandInput?.activityArn;
      const spanKind = api_1.SpanKind.CLIENT;
      const spanAttributes = {};
      if (stateMachineArn) {
        spanAttributes[semconv_1.ATTR_AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN] = stateMachineArn;
      }
      if (activityArn) {
        spanAttributes[semconv_1.ATTR_AWS_STEP_FUNCTIONS_ACTIVITY_ARN] = activityArn;
      }
      return {
        isIncoming: false,
        spanAttributes,
        spanKind
      };
    }
  }
  exports.StepFunctionsServiceExtension = StepFunctionsServiceExtension;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/lambda.js
var require_lambda = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LambdaServiceExtension = undefined;
  var api_1 = require_src();
  var semconv_1 = require_semconv6();
  var semconv_obsolete_1 = require_semconv_obsolete();
  var api_2 = require_src();

  class LambdaCommands {
    static Invoke = "Invoke";
  }

  class LambdaServiceExtension {
    requestPreSpanHook(request2, _config) {
      const functionName = this.extractFunctionName(request2.commandInput);
      let spanAttributes = {};
      let spanName;
      switch (request2.commandName) {
        case "Invoke":
          spanAttributes = {
            [semconv_1.ATTR_FAAS_INVOKED_NAME]: functionName,
            [semconv_1.ATTR_FAAS_INVOKED_PROVIDER]: "aws"
          };
          if (request2.region) {
            spanAttributes[semconv_1.ATTR_FAAS_INVOKED_REGION] = request2.region;
          }
          spanName = `${functionName} ${LambdaCommands.Invoke}`;
          break;
      }
      return {
        isIncoming: false,
        spanAttributes,
        spanKind: api_1.SpanKind.CLIENT,
        spanName
      };
    }
    requestPostSpanHook = (request2) => {
      switch (request2.commandName) {
        case LambdaCommands.Invoke:
          {
            if (request2.commandInput) {
              request2.commandInput.ClientContext = injectLambdaPropagationContext(request2.commandInput.ClientContext);
            }
          }
          break;
      }
    };
    responseHook(response, span, tracer, config) {
      switch (response.request.commandName) {
        case LambdaCommands.Invoke:
          {
            span.setAttribute(semconv_obsolete_1.ATTR_FAAS_EXECUTION, response.requestId);
          }
          break;
      }
    }
    extractFunctionName = (commandInput) => {
      return commandInput?.FunctionName;
    };
  }
  exports.LambdaServiceExtension = LambdaServiceExtension;
  var injectLambdaPropagationContext = (clientContext) => {
    try {
      const propagatedContext = {};
      api_2.propagation.inject(api_2.context.active(), propagatedContext);
      const parsedClientContext = clientContext ? JSON.parse(Buffer.from(clientContext, "base64").toString("utf8")) : {};
      const updatedClientContext = {
        ...parsedClientContext,
        custom: {
          ...parsedClientContext.custom,
          ...propagatedContext
        }
      };
      const encodedClientContext = Buffer.from(JSON.stringify(updatedClientContext)).toString("base64");
      if (encodedClientContext.length > 3583) {
        api_1.diag.warn("lambda instrumentation: cannot set context propagation on lambda invoke parameters due to ClientContext length limitations.");
        return clientContext;
      }
      return encodedClientContext;
    } catch (e) {
      api_1.diag.debug("lambda instrumentation: failed to set context propagation on ClientContext", e);
      return clientContext;
    }
  };
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/s3.js
var require_s3 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.S3ServiceExtension = undefined;
  var api_1 = require_src();
  var enums_1 = require_enums2();

  class S3ServiceExtension {
    requestPreSpanHook(request2, _config) {
      const bucketName = request2.commandInput?.Bucket;
      const spanKind = api_1.SpanKind.CLIENT;
      const spanAttributes = {};
      if (bucketName) {
        spanAttributes[enums_1.AttributeNames.AWS_S3_BUCKET] = bucketName;
      }
      const isIncoming = false;
      return {
        isIncoming,
        spanAttributes,
        spanKind
      };
    }
  }
  exports.S3ServiceExtension = S3ServiceExtension;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/kinesis.js
var require_kinesis = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.KinesisServiceExtension = undefined;
  var api_1 = require_src();
  var enums_1 = require_enums2();

  class KinesisServiceExtension {
    requestPreSpanHook(request2, _config) {
      const streamName = request2.commandInput?.StreamName;
      const spanKind = api_1.SpanKind.CLIENT;
      const spanAttributes = {};
      if (streamName) {
        spanAttributes[enums_1.AttributeNames.AWS_KINESIS_STREAM_NAME] = streamName;
      }
      const isIncoming = false;
      return {
        isIncoming,
        spanAttributes,
        spanKind
      };
    }
  }
  exports.KinesisServiceExtension = KinesisServiceExtension;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/ServicesExtensions.js
var require_ServicesExtensions = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ServicesExtensions = undefined;
  var sqs_1 = require_sqs();
  var bedrock_runtime_1 = require_bedrock_runtime();
  var dynamodb_1 = require_dynamodb();
  var secretsmanager_1 = require_secretsmanager();
  var sns_1 = require_sns();
  var stepfunctions_1 = require_stepfunctions();
  var lambda_1 = require_lambda();
  var s3_1 = require_s3();
  var kinesis_1 = require_kinesis();

  class ServicesExtensions {
    services = new Map;
    constructor() {
      this.registerServices();
    }
    registerServices() {
      this.services.set("SecretsManager", new secretsmanager_1.SecretsManagerServiceExtension);
      this.services.set("SFN", new stepfunctions_1.StepFunctionsServiceExtension);
      this.services.set("SQS", new sqs_1.SqsServiceExtension);
      this.services.set("SNS", new sns_1.SnsServiceExtension);
      this.services.set("DynamoDB", new dynamodb_1.DynamodbServiceExtension);
      this.services.set("Lambda", new lambda_1.LambdaServiceExtension);
      this.services.set("S3", new s3_1.S3ServiceExtension);
      this.services.set("Kinesis", new kinesis_1.KinesisServiceExtension);
      this.services.set("BedrockRuntime", new bedrock_runtime_1.BedrockRuntimeServiceExtension);
    }
    requestPreSpanHook(request2, config, diag3, dbSemconvStability) {
      const serviceExtension = this.services.get(request2.serviceName);
      if (!serviceExtension)
        return {
          isIncoming: false
        };
      return serviceExtension.requestPreSpanHook(request2, config, diag3, dbSemconvStability);
    }
    requestPostSpanHook(request2) {
      const serviceExtension = this.services.get(request2.serviceName);
      if (!serviceExtension?.requestPostSpanHook)
        return;
      return serviceExtension.requestPostSpanHook(request2);
    }
    responseHook(response, span, tracer, config, startTime) {
      const serviceExtension = this.services.get(response.request.serviceName);
      return serviceExtension?.responseHook?.(response, span, tracer, config, startTime);
    }
    updateMetricInstruments(meter) {
      for (const serviceExtension of this.services.values()) {
        serviceExtension.updateMetricInstruments?.(meter);
      }
    }
  }
  exports.ServicesExtensions = ServicesExtensions;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/services/index.js
var require_services = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ServicesExtensions = undefined;
  var ServicesExtensions_1 = require_ServicesExtensions();
  Object.defineProperty(exports, "ServicesExtensions", { enumerable: true, get: function() {
    return ServicesExtensions_1.ServicesExtensions;
  } });
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/version.js
var require_version7 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.PACKAGE_NAME = exports.PACKAGE_VERSION = undefined;
  exports.PACKAGE_VERSION = "0.68.0";
  exports.PACKAGE_NAME = "@opentelemetry/instrumentation-aws-sdk";
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/utils.js
var require_utils10 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.bindPromise = exports.extractAttributesFromNormalizedRequest = exports.normalizeV3Request = exports.removeSuffixFromStringIfExists = undefined;
  var api_1 = require_src();
  var semconv_1 = require_semconv6();
  var enums_1 = require_enums2();
  var removeSuffixFromStringIfExists = (str, suffixToRemove) => {
    const suffixLength = suffixToRemove.length;
    return str?.slice(-suffixLength) === suffixToRemove ? str.slice(0, str.length - suffixLength) : str;
  };
  exports.removeSuffixFromStringIfExists = removeSuffixFromStringIfExists;
  var normalizeV3Request = (serviceName, commandNameWithSuffix, commandInput, region) => {
    return {
      serviceName: serviceName?.replace(/\s+/g, ""),
      commandName: (0, exports.removeSuffixFromStringIfExists)(commandNameWithSuffix, "Command"),
      commandInput,
      region
    };
  };
  exports.normalizeV3Request = normalizeV3Request;
  var extractAttributesFromNormalizedRequest = (normalizedRequest) => {
    return {
      [semconv_1.ATTR_RPC_SYSTEM]: "aws-api",
      [semconv_1.ATTR_RPC_METHOD]: normalizedRequest.commandName,
      [semconv_1.ATTR_RPC_SERVICE]: normalizedRequest.serviceName,
      [enums_1.AttributeNames.CLOUD_REGION]: normalizedRequest.region
    };
  };
  exports.extractAttributesFromNormalizedRequest = extractAttributesFromNormalizedRequest;
  var bindPromise = (target, contextForCallbacks, rebindCount = 1) => {
    const origThen = target.then;
    target.then = function(onFulfilled, onRejected) {
      const newOnFulfilled = api_1.context.bind(contextForCallbacks, onFulfilled);
      const newOnRejected = api_1.context.bind(contextForCallbacks, onRejected);
      const patchedPromise = origThen.call(this, newOnFulfilled, newOnRejected);
      return rebindCount > 1 ? (0, exports.bindPromise)(patchedPromise, contextForCallbacks, rebindCount - 1) : patchedPromise;
    };
    return target;
  };
  exports.bindPromise = bindPromise;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/propwrap.js
var require_propwrap = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.propwrap = undefined;
  var __defProp2 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (const key of __getOwnPropNames2(from)) {
        if (!__hasOwnProp2.call(to, key) && key !== except) {
          __defProp2(to, key, {
            get: () => from[key],
            enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
          });
        }
      }
    }
    return to;
  };
  var propwrap = (obj, subpath, wrapper) => {
    const parts = subpath.split(".");
    const namespaces = [obj];
    let namespace = obj;
    let key;
    let val;
    for (let i = 0;i < parts.length; i++) {
      key = parts[i];
      val = namespace[key];
      if (!val) {
        throw new TypeError(`cannot wrap "${subpath}": "<obj>.${parts.slice(0, i).join(".")}" is ${typeof val}`);
      } else if (i < parts.length - 1) {
        if (typeof val !== "object") {
          throw new TypeError(`cannot wrap "${subpath}": "<obj>.${parts.slice(0, i).join(".")}" is not an Object`);
        }
        namespace = val;
        namespaces.push(namespace);
      }
    }
    for (let i = parts.length - 1;i >= 0; i--) {
      key = parts[i];
      namespace = namespaces[i];
      if (i === parts.length - 1) {
        const orig = namespace[key];
        val = wrapper(orig);
      } else {
        val = namespaces[i + 1];
      }
      const desc = __getOwnPropDesc(namespace, key);
      const wrappedNamespace = __defProp2({}, key, {
        value: val,
        enumerable: !desc || desc.enumerable
      });
      __copyProps(wrappedNamespace, namespace, key);
      namespaces[i] = wrappedNamespace;
    }
    return namespaces[0];
  };
  exports.propwrap = propwrap;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/aws-sdk.js
var require_aws_sdk = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AwsInstrumentation = undefined;
  var api_1 = require_src();
  var core_1 = require_src8();
  var enums_1 = require_enums2();
  var services_1 = require_services();
  var version_1 = require_version7();
  var instrumentation_1 = require_src6();
  var utils_1 = require_utils10();
  var propwrap_1 = require_propwrap();
  var semconv_1 = require_semconv6();
  var semantic_conventions_1 = require_src2();
  var V3_CLIENT_CONFIG_KEY = Symbol("opentelemetry.instrumentation.aws-sdk.client.config");

  class AwsInstrumentation extends instrumentation_1.InstrumentationBase {
    static component = "aws-sdk";
    _httpSemconvStability;
    _dbSemconvStability;
    constructor(config = {}) {
      super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config);
      this._httpSemconvStability = (0, instrumentation_1.semconvStabilityFromStr)("http", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
      this._dbSemconvStability = (0, instrumentation_1.semconvStabilityFromStr)("database", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
    }
    init() {
      const v3MiddlewareStackFileOldVersions = new instrumentation_1.InstrumentationNodeModuleFile("@aws-sdk/middleware-stack/dist/cjs/MiddlewareStack.js", [">=3.1.0 <3.35.0"], this.patchV3ConstructStack.bind(this), this.unpatchV3ConstructStack.bind(this));
      const v3MiddlewareStackFileNewVersions = new instrumentation_1.InstrumentationNodeModuleFile("@aws-sdk/middleware-stack/dist-cjs/MiddlewareStack.js", [">=3.35.0"], this.patchV3ConstructStack.bind(this), this.unpatchV3ConstructStack.bind(this));
      const v3MiddlewareStack = new instrumentation_1.InstrumentationNodeModuleDefinition("@aws-sdk/middleware-stack", ["^3.1.0"], undefined, undefined, [v3MiddlewareStackFileOldVersions, v3MiddlewareStackFileNewVersions]);
      const self2 = this;
      const v3SmithyMiddlewareStack = new instrumentation_1.InstrumentationNodeModuleDefinition("@smithy/middleware-stack", [">=2.0.0"], (moduleExports, moduleVersion) => {
        const newExports = (0, propwrap_1.propwrap)(moduleExports, "constructStack", (orig) => {
          self2._diag.debug("propwrapping aws-sdk v3 constructStack");
          return self2._getV3ConstructStackPatch(moduleVersion, orig);
        });
        return newExports;
      });
      const v3SmithyClient = new instrumentation_1.InstrumentationNodeModuleDefinition("@aws-sdk/smithy-client", ["^3.1.0"], this.patchV3SmithyClient.bind(this), this.unpatchV3SmithyClient.bind(this));
      const v3NewSmithyClient = new instrumentation_1.InstrumentationNodeModuleDefinition("@smithy/smithy-client", [">=1.0.3"], this.patchV3SmithyClient.bind(this), this.unpatchV3SmithyClient.bind(this));
      return [
        v3MiddlewareStack,
        v3SmithyMiddlewareStack,
        v3SmithyClient,
        v3NewSmithyClient
      ];
    }
    patchV3ConstructStack(moduleExports, moduleVersion) {
      this._wrap(moduleExports, "constructStack", this._getV3ConstructStackPatch.bind(this, moduleVersion));
      return moduleExports;
    }
    unpatchV3ConstructStack(moduleExports) {
      this._unwrap(moduleExports, "constructStack");
      return moduleExports;
    }
    patchV3SmithyClient(moduleExports) {
      this._wrap(moduleExports.Client.prototype, "send", this._getV3SmithyClientSendPatch.bind(this));
      return moduleExports;
    }
    unpatchV3SmithyClient(moduleExports) {
      this._unwrap(moduleExports.Client.prototype, "send");
      return moduleExports;
    }
    _startAwsV3Span(normalizedRequest, metadata) {
      const name = metadata.spanName ?? `${normalizedRequest.serviceName}.${normalizedRequest.commandName}`;
      const newSpan = this.tracer.startSpan(name, {
        kind: metadata.spanKind ?? api_1.SpanKind.CLIENT,
        attributes: {
          ...(0, utils_1.extractAttributesFromNormalizedRequest)(normalizedRequest),
          ...metadata.spanAttributes
        }
      });
      return newSpan;
    }
    _callUserPreRequestHook(span, request2, moduleVersion) {
      const { preRequestHook } = this.getConfig();
      if (preRequestHook) {
        const requestInfo = {
          moduleVersion,
          request: request2
        };
        (0, instrumentation_1.safeExecuteInTheMiddle)(() => preRequestHook(span, requestInfo), (e) => {
          if (e)
            api_1.diag.error(`${AwsInstrumentation.component} instrumentation: preRequestHook error`, e);
        }, true);
      }
    }
    _callUserResponseHook(span, response) {
      const { responseHook } = this.getConfig();
      if (!responseHook)
        return;
      const responseInfo = {
        response
      };
      (0, instrumentation_1.safeExecuteInTheMiddle)(() => responseHook(span, responseInfo), (e) => {
        if (e)
          api_1.diag.error(`${AwsInstrumentation.component} instrumentation: responseHook error`, e);
      }, true);
    }
    _callUserExceptionResponseHook(span, request2, err) {
      const { exceptionHook } = this.getConfig();
      if (!exceptionHook)
        return;
      const requestInfo = {
        request: request2
      };
      (0, instrumentation_1.safeExecuteInTheMiddle)(() => exceptionHook(span, requestInfo, err), (e) => {
        if (e)
          api_1.diag.error(`${AwsInstrumentation.component} instrumentation: exceptionHook error`, e);
      }, true);
    }
    _getV3ConstructStackPatch(moduleVersion, original) {
      const self2 = this;
      return function constructStack(...args) {
        const stack = original.apply(this, args);
        self2.patchV3MiddlewareStack(moduleVersion, stack);
        return stack;
      };
    }
    _getV3SmithyClientSendPatch(original) {
      return function send(command, ...args) {
        command[V3_CLIENT_CONFIG_KEY] = this.config;
        return original.apply(this, [command, ...args]);
      };
    }
    patchV3MiddlewareStack(moduleVersion, middlewareStackToPatch) {
      if (!(0, instrumentation_1.isWrapped)(middlewareStackToPatch.resolve)) {
        this._wrap(middlewareStackToPatch, "resolve", this._getV3MiddlewareStackResolvePatch.bind(this, moduleVersion));
      }
      this._wrap(middlewareStackToPatch, "clone", this._getV3MiddlewareStackClonePatch.bind(this, moduleVersion));
      this._wrap(middlewareStackToPatch, "concat", this._getV3MiddlewareStackClonePatch.bind(this, moduleVersion));
    }
    _getV3MiddlewareStackClonePatch(moduleVersion, original) {
      const self2 = this;
      return function(...args) {
        const newStack = original.apply(this, args);
        self2.patchV3MiddlewareStack(moduleVersion, newStack);
        return newStack;
      };
    }
    _getV3MiddlewareStackResolvePatch(moduleVersion, original) {
      const self2 = this;
      return function(_handler, awsExecutionContext) {
        const origHandler = original.call(this, _handler, awsExecutionContext);
        const patchedHandler = function(command) {
          const clientConfig = command[V3_CLIENT_CONFIG_KEY];
          const regionPromise = clientConfig?.region?.();
          const serviceName = clientConfig?.serviceId ?? (0, utils_1.removeSuffixFromStringIfExists)(awsExecutionContext.clientName || "AWS", "Client");
          const commandName = awsExecutionContext.commandName ?? command.constructor?.name;
          const normalizedRequest = (0, utils_1.normalizeV3Request)(serviceName, commandName, command.input, undefined);
          const requestMetadata = self2.servicesExtensions.requestPreSpanHook(normalizedRequest, self2.getConfig(), self2._diag, self2._dbSemconvStability);
          const startTime = (0, core_1.hrTime)();
          const span = self2._startAwsV3Span(normalizedRequest, requestMetadata);
          const activeContextWithSpan = api_1.trace.setSpan(api_1.context.active(), span);
          const handlerPromise = new Promise((resolve2, reject) => {
            Promise.resolve(regionPromise).then((resolvedRegion) => {
              normalizedRequest.region = resolvedRegion;
              span.setAttribute(enums_1.AttributeNames.CLOUD_REGION, resolvedRegion);
            }).catch((e) => {
              api_1.diag.debug(`${AwsInstrumentation.component} instrumentation: failed to extract region from async function`, e);
            }).finally(() => {
              self2._callUserPreRequestHook(span, normalizedRequest, moduleVersion);
              const resultPromise = api_1.context.with(activeContextWithSpan, () => {
                self2.servicesExtensions.requestPostSpanHook(normalizedRequest);
                return self2._callOriginalFunction(() => origHandler.call(this, command));
              });
              const promiseWithResponseLogic = resultPromise.then((response) => {
                const requestId = response.output?.$metadata?.requestId;
                if (requestId) {
                  span.setAttribute(enums_1.AttributeNames.AWS_REQUEST_ID, requestId);
                }
                const httpStatusCode = response.output?.$metadata?.httpStatusCode;
                if (httpStatusCode) {
                  if (self2._httpSemconvStability & instrumentation_1.SemconvStability.OLD) {
                    span.setAttribute(semconv_1.ATTR_HTTP_STATUS_CODE, httpStatusCode);
                  }
                  if (self2._httpSemconvStability & instrumentation_1.SemconvStability.STABLE) {
                    span.setAttribute(semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE, httpStatusCode);
                  }
                }
                const extendedRequestId = response.output?.$metadata?.extendedRequestId;
                if (extendedRequestId) {
                  span.setAttribute(enums_1.AttributeNames.AWS_REQUEST_EXTENDED_ID, extendedRequestId);
                }
                const normalizedResponse = {
                  data: response.output,
                  request: normalizedRequest,
                  requestId
                };
                const override = self2.servicesExtensions.responseHook(normalizedResponse, span, self2.tracer, self2.getConfig(), startTime);
                if (override) {
                  response.output = override;
                  normalizedResponse.data = override;
                }
                self2._callUserResponseHook(span, normalizedResponse);
                return response;
              }).catch((err) => {
                const requestId = err?.RequestId;
                if (requestId) {
                  span.setAttribute(enums_1.AttributeNames.AWS_REQUEST_ID, requestId);
                }
                const httpStatusCode = err?.$metadata?.httpStatusCode;
                if (httpStatusCode) {
                  if (self2._httpSemconvStability & instrumentation_1.SemconvStability.OLD) {
                    span.setAttribute(semconv_1.ATTR_HTTP_STATUS_CODE, httpStatusCode);
                  }
                  if (self2._httpSemconvStability & instrumentation_1.SemconvStability.STABLE) {
                    span.setAttribute(semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE, httpStatusCode);
                  }
                }
                const extendedRequestId = err?.extendedRequestId;
                if (extendedRequestId) {
                  span.setAttribute(enums_1.AttributeNames.AWS_REQUEST_EXTENDED_ID, extendedRequestId);
                }
                span.setStatus({
                  code: api_1.SpanStatusCode.ERROR,
                  message: err.message
                });
                span.recordException(err);
                self2._callUserExceptionResponseHook(span, normalizedRequest, err);
                throw err;
              }).finally(() => {
                if (!requestMetadata.isStream) {
                  span.end();
                }
              });
              promiseWithResponseLogic.then((res) => {
                resolve2(res);
              }).catch((err) => reject(err));
            });
          });
          return requestMetadata.isIncoming ? (0, utils_1.bindPromise)(handlerPromise, activeContextWithSpan, 2) : handlerPromise;
        };
        return patchedHandler;
      };
    }
    _callOriginalFunction(originalFunction) {
      if (this.getConfig().suppressInternalInstrumentation) {
        return api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), originalFunction);
      } else {
        return originalFunction();
      }
    }
    _updateMetricInstruments() {
      if (!this.servicesExtensions) {
        this.servicesExtensions = new services_1.ServicesExtensions;
      }
      this.servicesExtensions.updateMetricInstruments(this.meter);
    }
  }
  exports.AwsInstrumentation = AwsInstrumentation;
});

// ../../node_modules/.pnpm/@opentelemetry+instrumentation-aws-sdk@0.68.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-aws-sdk/build/src/index.js
var require_src13 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AwsInstrumentation = undefined;
  var aws_sdk_1 = require_aws_sdk();
  Object.defineProperty(exports, "AwsInstrumentation", { enumerable: true, get: function() {
    return aws_sdk_1.AwsInstrumentation;
  } });
});

// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js
var require_process = __commonJS((exports, module) => {
  var isLinux = () => process.platform === "linux";
  var report = null;
  var getReport = () => {
    if (!report) {
      if (isLinux() && process.report) {
        const orig = process.report.excludeNetwork;
        process.report.excludeNetwork = true;
        report = process.report.getReport();
        process.report.excludeNetwork = orig;
      } else {
        report = {};
      }
    }
    return report;
  };
  module.exports = { isLinux, getReport };
});

// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js
var require_filesystem = __commonJS((exports, module) => {
  var fs2 = __require("fs");
  var LDD_PATH = "/usr/bin/ldd";
  var SELF_PATH = "/proc/self/exe";
  var MAX_LENGTH = 2048;
  var readFileSync2 = (path2) => {
    const fd = fs2.openSync(path2, "r");
    const buffer = Buffer.alloc(MAX_LENGTH);
    const bytesRead = fs2.readSync(fd, buffer, 0, MAX_LENGTH, 0);
    fs2.close(fd, () => {});
    return buffer.subarray(0, bytesRead);
  };
  var readFile2 = (path2) => new Promise((resolve3, reject) => {
    fs2.open(path2, "r", (err, fd) => {
      if (err) {
        reject(err);
      } else {
        const buffer = Buffer.alloc(MAX_LENGTH);
        fs2.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
          resolve3(buffer.subarray(0, bytesRead));
          fs2.close(fd, () => {});
        });
      }
    });
  });
  module.exports = {
    LDD_PATH,
    SELF_PATH,
    readFileSync: readFileSync2,
    readFile: readFile2
  };
});

// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js
var require_elf = __commonJS((exports, module) => {
  var interpreterPath = (elf) => {
    if (elf.length < 64) {
      return null;
    }
    if (elf.readUInt32BE(0) !== 2135247942) {
      return null;
    }
    if (elf.readUInt8(4) !== 2) {
      return null;
    }
    if (elf.readUInt8(5) !== 1) {
      return null;
    }
    const offset = elf.readUInt32LE(32);
    const size = elf.readUInt16LE(54);
    const count = elf.readUInt16LE(56);
    for (let i = 0;i < count; i++) {
      const headerOffset = offset + i * size;
      const type = elf.readUInt32LE(headerOffset);
      if (type === 3) {
        const fileOffset = elf.readUInt32LE(headerOffset + 8);
        const fileSize = elf.readUInt32LE(headerOffset + 32);
        return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, "");
      }
    }
    return null;
  };
  module.exports = {
    interpreterPath
  };
});

// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js
var require_detect_libc = __commonJS((exports, module) => {
  var childProcess = __require("child_process");
  var { isLinux, getReport } = require_process();
  var { LDD_PATH, SELF_PATH, readFile: readFile2, readFileSync: readFileSync2 } = require_filesystem();
  var { interpreterPath } = require_elf();
  var cachedFamilyInterpreter;
  var cachedFamilyFilesystem;
  var cachedVersionFilesystem;
  var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
  var commandOut = "";
  var safeCommand = () => {
    if (!commandOut) {
      return new Promise((resolve3) => {
        childProcess.exec(command, (err, out) => {
          commandOut = err ? " " : out;
          resolve3(commandOut);
        });
      });
    }
    return commandOut;
  };
  var safeCommandSync = () => {
    if (!commandOut) {
      try {
        commandOut = childProcess.execSync(command, { encoding: "utf8" });
      } catch (_err) {
        commandOut = " ";
      }
    }
    return commandOut;
  };
  var GLIBC = "glibc";
  var RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i;
  var MUSL = "musl";
  var isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
  var familyFromReport = () => {
    const report = getReport();
    if (report.header && report.header.glibcVersionRuntime) {
      return GLIBC;
    }
    if (Array.isArray(report.sharedObjects)) {
      if (report.sharedObjects.some(isFileMusl)) {
        return MUSL;
      }
    }
    return null;
  };
  var familyFromCommand = (out) => {
    const [getconf, ldd1] = out.split(/[\r\n]+/);
    if (getconf && getconf.includes(GLIBC)) {
      return GLIBC;
    }
    if (ldd1 && ldd1.includes(MUSL)) {
      return MUSL;
    }
    return null;
  };
  var familyFromInterpreterPath = (path2) => {
    if (path2) {
      if (path2.includes("/ld-musl-")) {
        return MUSL;
      } else if (path2.includes("/ld-linux-")) {
        return GLIBC;
      }
    }
    return null;
  };
  var getFamilyFromLddContent = (content) => {
    content = content.toString();
    if (content.includes("musl")) {
      return MUSL;
    }
    if (content.includes("GNU C Library")) {
      return GLIBC;
    }
    return null;
  };
  var familyFromFilesystem = async () => {
    if (cachedFamilyFilesystem !== undefined) {
      return cachedFamilyFilesystem;
    }
    cachedFamilyFilesystem = null;
    try {
      const lddContent = await readFile2(LDD_PATH);
      cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
    } catch (e) {}
    return cachedFamilyFilesystem;
  };
  var familyFromFilesystemSync = () => {
    if (cachedFamilyFilesystem !== undefined) {
      return cachedFamilyFilesystem;
    }
    cachedFamilyFilesystem = null;
    try {
      const lddContent = readFileSync2(LDD_PATH);
      cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
    } catch (e) {}
    return cachedFamilyFilesystem;
  };
  var familyFromInterpreter = async () => {
    if (cachedFamilyInterpreter !== undefined) {
      return cachedFamilyInterpreter;
    }
    cachedFamilyInterpreter = null;
    try {
      const selfContent = await readFile2(SELF_PATH);
      const path2 = interpreterPath(selfContent);
      cachedFamilyInterpreter = familyFromInterpreterPath(path2);
    } catch (e) {}
    return cachedFamilyInterpreter;
  };
  var familyFromInterpreterSync = () => {
    if (cachedFamilyInterpreter !== undefined) {
      return cachedFamilyInterpreter;
    }
    cachedFamilyInterpreter = null;
    try {
      const selfContent = readFileSync2(SELF_PATH);
      const path2 = interpreterPath(selfContent);
      cachedFamilyInterpreter = familyFromInterpreterPath(path2);
    } catch (e) {}
    return cachedFamilyInterpreter;
  };
  var family = async () => {
    let family2 = null;
    if (isLinux()) {
      family2 = await familyFromInterpreter();
      if (!family2) {
        family2 = await familyFromFilesystem();
        if (!family2) {
          family2 = familyFromReport();
        }
        if (!family2) {
          const out = await safeCommand();
          family2 = familyFromCommand(out);
        }
      }
    }
    return family2;
  };
  var familySync = () => {
    let family2 = null;
    if (isLinux()) {
      family2 = familyFromInterpreterSync();
      if (!family2) {
        family2 = familyFromFilesystemSync();
        if (!family2) {
          family2 = familyFromReport();
        }
        if (!family2) {
          const out = safeCommandSync();
          family2 = familyFromCommand(out);
        }
      }
    }
    return family2;
  };
  var isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC;
  var isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC;
  var versionFromFilesystem = async () => {
    if (cachedVersionFilesystem !== undefined) {
      return cachedVersionFilesystem;
    }
    cachedVersionFilesystem = null;
    try {
      const lddContent = await readFile2(LDD_PATH);
      const versionMatch = lddContent.match(RE_GLIBC_VERSION);
      if (versionMatch) {
        cachedVersionFilesystem = versionMatch[1];
      }
    } catch (e) {}
    return cachedVersionFilesystem;
  };
  var versionFromFilesystemSync = () => {
    if (cachedVersionFilesystem !== undefined) {
      return cachedVersionFilesystem;
    }
    cachedVersionFilesystem = null;
    try {
      const lddContent = readFileSync2(LDD_PATH);
      const versionMatch = lddContent.match(RE_GLIBC_VERSION);
      if (versionMatch) {
        cachedVersionFilesystem = versionMatch[1];
      }
    } catch (e) {}
    return cachedVersionFilesystem;
  };
  var versionFromReport = () => {
    const report = getReport();
    if (report.header && report.header.glibcVersionRuntime) {
      return report.header.glibcVersionRuntime;
    }
    return null;
  };
  var versionSuffix = (s) => s.trim().split(/\s+/)[1];
  var versionFromCommand = (out) => {
    const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/);
    if (getconf && getconf.includes(GLIBC)) {
      return versionSuffix(getconf);
    }
    if (ldd1 && ldd2 && ldd1.includes(MUSL)) {
      return versionSuffix(ldd2);
    }
    return null;
  };
  var version = async () => {
    let version2 = null;
    if (isLinux()) {
      version2 = await versionFromFilesystem();
      if (!version2) {
        version2 = versionFromReport();
      }
      if (!version2) {
        const out = await safeCommand();
        version2 = versionFromCommand(out);
      }
    }
    return version2;
  };
  var versionSync = () => {
    let version2 = null;
    if (isLinux()) {
      version2 = versionFromFilesystemSync();
      if (!version2) {
        version2 = versionFromReport();
      }
      if (!version2) {
        const out = safeCommandSync();
        version2 = versionFromCommand(out);
      }
    }
    return version2;
  };
  module.exports = {
    GLIBC,
    MUSL,
    family,
    familySync,
    isNonGlibcLinux,
    isNonGlibcLinuxSync,
    version,
    versionSync
  };
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js
var require_constants3 = __commonJS((exports, module) => {
  var SEMVER_SPEC_VERSION = "2.0.0";
  var MAX_LENGTH = 256;
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  var MAX_SAFE_COMPONENT_LENGTH = 16;
  var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
  var RELEASE_TYPES = [
    "major",
    "premajor",
    "minor",
    "preminor",
    "patch",
    "prepatch",
    "prerelease"
  ];
  module.exports = {
    MAX_LENGTH,
    MAX_SAFE_COMPONENT_LENGTH,
    MAX_SAFE_BUILD_LENGTH,
    MAX_SAFE_INTEGER,
    RELEASE_TYPES,
    SEMVER_SPEC_VERSION,
    FLAG_INCLUDE_PRERELEASE: 1,
    FLAG_LOOSE: 2
  };
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js
var require_debug = __commonJS((exports, module) => {
  var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
  module.exports = debug2;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js
var require_re = __commonJS((exports, module) => {
  var {
    MAX_SAFE_COMPONENT_LENGTH,
    MAX_SAFE_BUILD_LENGTH,
    MAX_LENGTH
  } = require_constants3();
  var debug2 = require_debug();
  exports = module.exports = {};
  var re = exports.re = [];
  var safeRe = exports.safeRe = [];
  var src = exports.src = [];
  var safeSrc = exports.safeSrc = [];
  var t = exports.t = {};
  var R = 0;
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
  var safeRegexReplacements = [
    ["\\s", 1],
    ["\\d", MAX_LENGTH],
    [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
  ];
  var makeSafeRegex = (value) => {
    for (const [token, max] of safeRegexReplacements) {
      value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
    }
    return value;
  };
  var createToken = (name, value, isGlobal) => {
    const safe = makeSafeRegex(value);
    const index = R++;
    debug2(name, index, value);
    t[name] = index;
    src[index] = value;
    safeSrc[index] = safe;
    re[index] = new RegExp(value, isGlobal ? "g" : undefined);
    safeRe[index] = new RegExp(safe, isGlobal ? "g" : undefined);
  };
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
  createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
  createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
  createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`);
  createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`);
  createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
  createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
  createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
  createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
  createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
  createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
  createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
  createToken("FULL", `^${src[t.FULLPLAIN]}$`);
  createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
  createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
  createToken("GTLT", "((?:<|>)?=?)");
  createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
  createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
  createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?` + `)?)?`);
  createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?` + `)?)?`);
  createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
  createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
  createToken("COERCEPLAIN", `${"(^|[^\\d])" + "(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
  createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
  createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?` + `(?:${src[t.BUILD]})?` + `(?:$|[^\\d])`);
  createToken("COERCERTL", src[t.COERCE], true);
  createToken("COERCERTLFULL", src[t.COERCEFULL], true);
  createToken("LONETILDE", "(?:~>?)");
  createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
  exports.tildeTrimReplace = "$1~";
  createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
  createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
  createToken("LONECARET", "(?:\\^)");
  createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
  exports.caretTrimReplace = "$1^";
  createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
  createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
  createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
  createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
  createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
  exports.comparatorTrimReplace = "$1$2$3";
  createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`);
  createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`);
  createToken("STAR", "(<|>)?=?\\s*\\*");
  createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js
var require_parse_options = __commonJS((exports, module) => {
  var looseOption = Object.freeze({ loose: true });
  var emptyOpts = Object.freeze({});
  var parseOptions = (options) => {
    if (!options) {
      return emptyOpts;
    }
    if (typeof options !== "object") {
      return looseOption;
    }
    return options;
  };
  module.exports = parseOptions;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js
var require_identifiers = __commonJS((exports, module) => {
  var numeric = /^[0-9]+$/;
  var compareIdentifiers = (a, b) => {
    if (typeof a === "number" && typeof b === "number") {
      return a === b ? 0 : a < b ? -1 : 1;
    }
    const anum = numeric.test(a);
    const bnum = numeric.test(b);
    if (anum && bnum) {
      a = +a;
      b = +b;
    }
    return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  };
  var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
  module.exports = {
    compareIdentifiers,
    rcompareIdentifiers
  };
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js
var require_semver3 = __commonJS((exports, module) => {
  var debug2 = require_debug();
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3();
  var { safeRe: re, t } = require_re();
  var parseOptions = require_parse_options();
  var { compareIdentifiers } = require_identifiers();

  class SemVer {
    constructor(version, options) {
      options = parseOptions(options);
      if (version instanceof SemVer) {
        if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
          return version;
        } else {
          version = version.version;
        }
      } else if (typeof version !== "string") {
        throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
      }
      if (version.length > MAX_LENGTH) {
        throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
      }
      debug2("SemVer", version, options);
      this.options = options;
      this.loose = !!options.loose;
      this.includePrerelease = !!options.includePrerelease;
      const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
      if (!m) {
        throw new TypeError(`Invalid Version: ${version}`);
      }
      this.raw = version;
      this.major = +m[1];
      this.minor = +m[2];
      this.patch = +m[3];
      if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
        throw new TypeError("Invalid major version");
      }
      if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
        throw new TypeError("Invalid minor version");
      }
      if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
        throw new TypeError("Invalid patch version");
      }
      if (!m[4]) {
        this.prerelease = [];
      } else {
        this.prerelease = m[4].split(".").map((id) => {
          if (/^[0-9]+$/.test(id)) {
            const num = +id;
            if (num >= 0 && num < MAX_SAFE_INTEGER) {
              return num;
            }
          }
          return id;
        });
      }
      this.build = m[5] ? m[5].split(".") : [];
      this.format();
    }
    format() {
      this.version = `${this.major}.${this.minor}.${this.patch}`;
      if (this.prerelease.length) {
        this.version += `-${this.prerelease.join(".")}`;
      }
      return this.version;
    }
    toString() {
      return this.version;
    }
    compare(other) {
      debug2("SemVer.compare", this.version, this.options, other);
      if (!(other instanceof SemVer)) {
        if (typeof other === "string" && other === this.version) {
          return 0;
        }
        other = new SemVer(other, this.options);
      }
      if (other.version === this.version) {
        return 0;
      }
      return this.compareMain(other) || this.comparePre(other);
    }
    compareMain(other) {
      if (!(other instanceof SemVer)) {
        other = new SemVer(other, this.options);
      }
      if (this.major < other.major) {
        return -1;
      }
      if (this.major > other.major) {
        return 1;
      }
      if (this.minor < other.minor) {
        return -1;
      }
      if (this.minor > other.minor) {
        return 1;
      }
      if (this.patch < other.patch) {
        return -1;
      }
      if (this.patch > other.patch) {
        return 1;
      }
      return 0;
    }
    comparePre(other) {
      if (!(other instanceof SemVer)) {
        other = new SemVer(other, this.options);
      }
      if (this.prerelease.length && !other.prerelease.length) {
        return -1;
      } else if (!this.prerelease.length && other.prerelease.length) {
        return 1;
      } else if (!this.prerelease.length && !other.prerelease.length) {
        return 0;
      }
      let i = 0;
      do {
        const a = this.prerelease[i];
        const b = other.prerelease[i];
        debug2("prerelease compare", i, a, b);
        if (a === undefined && b === undefined) {
          return 0;
        } else if (b === undefined) {
          return 1;
        } else if (a === undefined) {
          return -1;
        } else if (a === b) {
          continue;
        } else {
          return compareIdentifiers(a, b);
        }
      } while (++i);
    }
    compareBuild(other) {
      if (!(other instanceof SemVer)) {
        other = new SemVer(other, this.options);
      }
      let i = 0;
      do {
        const a = this.build[i];
        const b = other.build[i];
        debug2("build compare", i, a, b);
        if (a === undefined && b === undefined) {
          return 0;
        } else if (b === undefined) {
          return 1;
        } else if (a === undefined) {
          return -1;
        } else if (a === b) {
          continue;
        } else {
          return compareIdentifiers(a, b);
        }
      } while (++i);
    }
    inc(release2, identifier, identifierBase) {
      if (release2.startsWith("pre")) {
        if (!identifier && identifierBase === false) {
          throw new Error("invalid increment argument: identifier is empty");
        }
        if (identifier) {
          const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
          if (!match || match[1] !== identifier) {
            throw new Error(`invalid identifier: ${identifier}`);
          }
        }
      }
      switch (release2) {
        case "premajor":
          this.prerelease.length = 0;
          this.patch = 0;
          this.minor = 0;
          this.major++;
          this.inc("pre", identifier, identifierBase);
          break;
        case "preminor":
          this.prerelease.length = 0;
          this.patch = 0;
          this.minor++;
          this.inc("pre", identifier, identifierBase);
          break;
        case "prepatch":
          this.prerelease.length = 0;
          this.inc("patch", identifier, identifierBase);
          this.inc("pre", identifier, identifierBase);
          break;
        case "prerelease":
          if (this.prerelease.length === 0) {
            this.inc("patch", identifier, identifierBase);
          }
          this.inc("pre", identifier, identifierBase);
          break;
        case "release":
          if (this.prerelease.length === 0) {
            throw new Error(`version ${this.raw} is not a prerelease`);
          }
          this.prerelease.length = 0;
          break;
        case "major":
          if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
            this.major++;
          }
          this.minor = 0;
          this.patch = 0;
          this.prerelease = [];
          break;
        case "minor":
          if (this.patch !== 0 || this.prerelease.length === 0) {
            this.minor++;
          }
          this.patch = 0;
          this.prerelease = [];
          break;
        case "patch":
          if (this.prerelease.length === 0) {
            this.patch++;
          }
          this.prerelease = [];
          break;
        case "pre": {
          const base = Number(identifierBase) ? 1 : 0;
          if (this.prerelease.length === 0) {
            this.prerelease = [base];
          } else {
            let i = this.prerelease.length;
            while (--i >= 0) {
              if (typeof this.prerelease[i] === "number") {
                this.prerelease[i]++;
                i = -2;
              }
            }
            if (i === -1) {
              if (identifier === this.prerelease.join(".") && identifierBase === false) {
                throw new Error("invalid increment argument: identifier already exists");
              }
              this.prerelease.push(base);
            }
          }
          if (identifier) {
            let prerelease = [identifier, base];
            if (identifierBase === false) {
              prerelease = [identifier];
            }
            if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
              if (isNaN(this.prerelease[1])) {
                this.prerelease = prerelease;
              }
            } else {
              this.prerelease = prerelease;
            }
          }
          break;
        }
        default:
          throw new Error(`invalid increment argument: ${release2}`);
      }
      this.raw = this.format();
      if (this.build.length) {
        this.raw += `+${this.build.join(".")}`;
      }
      return this;
    }
  }
  module.exports = SemVer;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js
var require_parse = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var parse = (version, options, throwErrors = false) => {
    if (version instanceof SemVer) {
      return version;
    }
    try {
      return new SemVer(version, options);
    } catch (er) {
      if (!throwErrors) {
        return null;
      }
      throw er;
    }
  };
  module.exports = parse;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js
var require_valid = __commonJS((exports, module) => {
  var parse = require_parse();
  var valid = (version, options) => {
    const v = parse(version, options);
    return v ? v.version : null;
  };
  module.exports = valid;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js
var require_clean = __commonJS((exports, module) => {
  var parse = require_parse();
  var clean = (version, options) => {
    const s = parse(version.trim().replace(/^[=v]+/, ""), options);
    return s ? s.version : null;
  };
  module.exports = clean;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js
var require_inc = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var inc = (version, release2, options, identifier, identifierBase) => {
    if (typeof options === "string") {
      identifierBase = identifier;
      identifier = options;
      options = undefined;
    }
    try {
      return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release2, identifier, identifierBase).version;
    } catch (er) {
      return null;
    }
  };
  module.exports = inc;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js
var require_diff = __commonJS((exports, module) => {
  var parse = require_parse();
  var diff = (version1, version2) => {
    const v1 = parse(version1, null, true);
    const v2 = parse(version2, null, true);
    const comparison = v1.compare(v2);
    if (comparison === 0) {
      return null;
    }
    const v1Higher = comparison > 0;
    const highVersion = v1Higher ? v1 : v2;
    const lowVersion = v1Higher ? v2 : v1;
    const highHasPre = !!highVersion.prerelease.length;
    const lowHasPre = !!lowVersion.prerelease.length;
    if (lowHasPre && !highHasPre) {
      if (!lowVersion.patch && !lowVersion.minor) {
        return "major";
      }
      if (lowVersion.compareMain(highVersion) === 0) {
        if (lowVersion.minor && !lowVersion.patch) {
          return "minor";
        }
        return "patch";
      }
    }
    const prefix = highHasPre ? "pre" : "";
    if (v1.major !== v2.major) {
      return prefix + "major";
    }
    if (v1.minor !== v2.minor) {
      return prefix + "minor";
    }
    if (v1.patch !== v2.patch) {
      return prefix + "patch";
    }
    return "prerelease";
  };
  module.exports = diff;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js
var require_major = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var major = (a, loose) => new SemVer(a, loose).major;
  module.exports = major;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js
var require_minor = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var minor = (a, loose) => new SemVer(a, loose).minor;
  module.exports = minor;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js
var require_patch = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var patch = (a, loose) => new SemVer(a, loose).patch;
  module.exports = patch;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js
var require_prerelease = __commonJS((exports, module) => {
  var parse = require_parse();
  var prerelease = (version, options) => {
    const parsed = parse(version, options);
    return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  };
  module.exports = prerelease;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js
var require_compare = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
  module.exports = compare;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js
var require_rcompare = __commonJS((exports, module) => {
  var compare = require_compare();
  var rcompare = (a, b, loose) => compare(b, a, loose);
  module.exports = rcompare;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js
var require_compare_loose = __commonJS((exports, module) => {
  var compare = require_compare();
  var compareLoose = (a, b) => compare(a, b, true);
  module.exports = compareLoose;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js
var require_compare_build = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var compareBuild = (a, b, loose) => {
    const versionA = new SemVer(a, loose);
    const versionB = new SemVer(b, loose);
    return versionA.compare(versionB) || versionA.compareBuild(versionB);
  };
  module.exports = compareBuild;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js
var require_sort = __commonJS((exports, module) => {
  var compareBuild = require_compare_build();
  var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
  module.exports = sort;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js
var require_rsort = __commonJS((exports, module) => {
  var compareBuild = require_compare_build();
  var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
  module.exports = rsort;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js
var require_gt = __commonJS((exports, module) => {
  var compare = require_compare();
  var gt = (a, b, loose) => compare(a, b, loose) > 0;
  module.exports = gt;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js
var require_lt = __commonJS((exports, module) => {
  var compare = require_compare();
  var lt = (a, b, loose) => compare(a, b, loose) < 0;
  module.exports = lt;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js
var require_eq = __commonJS((exports, module) => {
  var compare = require_compare();
  var eq = (a, b, loose) => compare(a, b, loose) === 0;
  module.exports = eq;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js
var require_neq = __commonJS((exports, module) => {
  var compare = require_compare();
  var neq = (a, b, loose) => compare(a, b, loose) !== 0;
  module.exports = neq;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js
var require_gte = __commonJS((exports, module) => {
  var compare = require_compare();
  var gte = (a, b, loose) => compare(a, b, loose) >= 0;
  module.exports = gte;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js
var require_lte = __commonJS((exports, module) => {
  var compare = require_compare();
  var lte = (a, b, loose) => compare(a, b, loose) <= 0;
  module.exports = lte;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js
var require_cmp = __commonJS((exports, module) => {
  var eq = require_eq();
  var neq = require_neq();
  var gt = require_gt();
  var gte = require_gte();
  var lt = require_lt();
  var lte = require_lte();
  var cmp = (a, op, b, loose) => {
    switch (op) {
      case "===":
        if (typeof a === "object") {
          a = a.version;
        }
        if (typeof b === "object") {
          b = b.version;
        }
        return a === b;
      case "!==":
        if (typeof a === "object") {
          a = a.version;
        }
        if (typeof b === "object") {
          b = b.version;
        }
        return a !== b;
      case "":
      case "=":
      case "==":
        return eq(a, b, loose);
      case "!=":
        return neq(a, b, loose);
      case ">":
        return gt(a, b, loose);
      case ">=":
        return gte(a, b, loose);
      case "<":
        return lt(a, b, loose);
      case "<=":
        return lte(a, b, loose);
      default:
        throw new TypeError(`Invalid operator: ${op}`);
    }
  };
  module.exports = cmp;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js
var require_coerce = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var parse = require_parse();
  var { safeRe: re, t } = require_re();
  var coerce = (version, options) => {
    if (version instanceof SemVer) {
      return version;
    }
    if (typeof version === "number") {
      version = String(version);
    }
    if (typeof version !== "string") {
      return null;
    }
    options = options || {};
    let match = null;
    if (!options.rtl) {
      match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
    } else {
      const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
      let next;
      while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
        if (!match || next.index + next[0].length !== match.index + match[0].length) {
          match = next;
        }
        coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
      }
      coerceRtlRegex.lastIndex = -1;
    }
    if (match === null) {
      return null;
    }
    const major = match[2];
    const minor = match[3] || "0";
    const patch = match[4] || "0";
    const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
    const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
    return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
  };
  module.exports = coerce;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js
var require_lrucache = __commonJS((exports, module) => {
  class LRUCache {
    constructor() {
      this.max = 1000;
      this.map = new Map;
    }
    get(key) {
      const value = this.map.get(key);
      if (value === undefined) {
        return;
      } else {
        this.map.delete(key);
        this.map.set(key, value);
        return value;
      }
    }
    delete(key) {
      return this.map.delete(key);
    }
    set(key, value) {
      const deleted = this.delete(key);
      if (!deleted && value !== undefined) {
        if (this.map.size >= this.max) {
          const firstKey = this.map.keys().next().value;
          this.delete(firstKey);
        }
        this.map.set(key, value);
      }
      return this;
    }
  }
  module.exports = LRUCache;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js
var require_range = __commonJS((exports, module) => {
  var SPACE_CHARACTERS = /\s+/g;

  class Range {
    constructor(range, options) {
      options = parseOptions(options);
      if (range instanceof Range) {
        if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
          return range;
        } else {
          return new Range(range.raw, options);
        }
      }
      if (range instanceof Comparator) {
        this.raw = range.value;
        this.set = [[range]];
        this.formatted = undefined;
        return this;
      }
      this.options = options;
      this.loose = !!options.loose;
      this.includePrerelease = !!options.includePrerelease;
      this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
      this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
      if (!this.set.length) {
        throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
      }
      if (this.set.length > 1) {
        const first = this.set[0];
        this.set = this.set.filter((c) => !isNullSet(c[0]));
        if (this.set.length === 0) {
          this.set = [first];
        } else if (this.set.length > 1) {
          for (const c of this.set) {
            if (c.length === 1 && isAny(c[0])) {
              this.set = [c];
              break;
            }
          }
        }
      }
      this.formatted = undefined;
    }
    get range() {
      if (this.formatted === undefined) {
        this.formatted = "";
        for (let i = 0;i < this.set.length; i++) {
          if (i > 0) {
            this.formatted += "||";
          }
          const comps = this.set[i];
          for (let k = 0;k < comps.length; k++) {
            if (k > 0) {
              this.formatted += " ";
            }
            this.formatted += comps[k].toString().trim();
          }
        }
      }
      return this.formatted;
    }
    format() {
      return this.range;
    }
    toString() {
      return this.range;
    }
    parseRange(range) {
      const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
      const memoKey = memoOpts + ":" + range;
      const cached = cache.get(memoKey);
      if (cached) {
        return cached;
      }
      const loose = this.options.loose;
      const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
      range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
      debug2("hyphen replace", range);
      range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
      debug2("comparator trim", range);
      range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
      debug2("tilde trim", range);
      range = range.replace(re[t.CARETTRIM], caretTrimReplace);
      debug2("caret trim", range);
      let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
      if (loose) {
        rangeList = rangeList.filter((comp) => {
          debug2("loose invalid filter", comp, this.options);
          return !!comp.match(re[t.COMPARATORLOOSE]);
        });
      }
      debug2("range list", rangeList);
      const rangeMap = new Map;
      const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
      for (const comp of comparators) {
        if (isNullSet(comp)) {
          return [comp];
        }
        rangeMap.set(comp.value, comp);
      }
      if (rangeMap.size > 1 && rangeMap.has("")) {
        rangeMap.delete("");
      }
      const result = [...rangeMap.values()];
      cache.set(memoKey, result);
      return result;
    }
    intersects(range, options) {
      if (!(range instanceof Range)) {
        throw new TypeError("a Range is required");
      }
      return this.set.some((thisComparators) => {
        return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
          return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
            return rangeComparators.every((rangeComparator) => {
              return thisComparator.intersects(rangeComparator, options);
            });
          });
        });
      });
    }
    test(version) {
      if (!version) {
        return false;
      }
      if (typeof version === "string") {
        try {
          version = new SemVer(version, this.options);
        } catch (er) {
          return false;
        }
      }
      for (let i = 0;i < this.set.length; i++) {
        if (testSet(this.set[i], version, this.options)) {
          return true;
        }
      }
      return false;
    }
  }
  module.exports = Range;
  var LRU = require_lrucache();
  var cache = new LRU;
  var parseOptions = require_parse_options();
  var Comparator = require_comparator();
  var debug2 = require_debug();
  var SemVer = require_semver3();
  var {
    safeRe: re,
    t,
    comparatorTrimReplace,
    tildeTrimReplace,
    caretTrimReplace
  } = require_re();
  var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants3();
  var isNullSet = (c) => c.value === "<0.0.0-0";
  var isAny = (c) => c.value === "";
  var isSatisfiable = (comparators, options) => {
    let result = true;
    const remainingComparators = comparators.slice();
    let testComparator = remainingComparators.pop();
    while (result && remainingComparators.length) {
      result = remainingComparators.every((otherComparator) => {
        return testComparator.intersects(otherComparator, options);
      });
      testComparator = remainingComparators.pop();
    }
    return result;
  };
  var parseComparator = (comp, options) => {
    comp = comp.replace(re[t.BUILD], "");
    debug2("comp", comp, options);
    comp = replaceCarets(comp, options);
    debug2("caret", comp);
    comp = replaceTildes(comp, options);
    debug2("tildes", comp);
    comp = replaceXRanges(comp, options);
    debug2("xrange", comp);
    comp = replaceStars(comp, options);
    debug2("stars", comp);
    return comp;
  };
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
  var replaceTildes = (comp, options) => {
    return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
  };
  var replaceTilde = (comp, options) => {
    const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
    return comp.replace(r, (_, M, m, p, pr) => {
      debug2("tilde", comp, _, M, m, p, pr);
      let ret;
      if (isX(M)) {
        ret = "";
      } else if (isX(m)) {
        ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
      } else if (isX(p)) {
        ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
      } else if (pr) {
        debug2("replaceTilde pr", pr);
        ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
      } else {
        ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
      }
      debug2("tilde return", ret);
      return ret;
    });
  };
  var replaceCarets = (comp, options) => {
    return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
  };
  var replaceCaret = (comp, options) => {
    debug2("caret", comp, options);
    const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
    const z = options.includePrerelease ? "-0" : "";
    return comp.replace(r, (_, M, m, p, pr) => {
      debug2("caret", comp, _, M, m, p, pr);
      let ret;
      if (isX(M)) {
        ret = "";
      } else if (isX(m)) {
        ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
      } else if (isX(p)) {
        if (M === "0") {
          ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
        } else {
          ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
        }
      } else if (pr) {
        debug2("replaceCaret pr", pr);
        if (M === "0") {
          if (m === "0") {
            ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
          } else {
            ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
          }
        } else {
          ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
        }
      } else {
        debug2("no pr");
        if (M === "0") {
          if (m === "0") {
            ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
          } else {
            ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
          }
        } else {
          ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
        }
      }
      debug2("caret return", ret);
      return ret;
    });
  };
  var replaceXRanges = (comp, options) => {
    debug2("replaceXRanges", comp, options);
    return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
  };
  var replaceXRange = (comp, options) => {
    comp = comp.trim();
    const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
    return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
      debug2("xRange", comp, ret, gtlt, M, m, p, pr);
      const xM = isX(M);
      const xm = xM || isX(m);
      const xp = xm || isX(p);
      const anyX = xp;
      if (gtlt === "=" && anyX) {
        gtlt = "";
      }
      pr = options.includePrerelease ? "-0" : "";
      if (xM) {
        if (gtlt === ">" || gtlt === "<") {
          ret = "<0.0.0-0";
        } else {
          ret = "*";
        }
      } else if (gtlt && anyX) {
        if (xm) {
          m = 0;
        }
        p = 0;
        if (gtlt === ">") {
          gtlt = ">=";
          if (xm) {
            M = +M + 1;
            m = 0;
            p = 0;
          } else {
            m = +m + 1;
            p = 0;
          }
        } else if (gtlt === "<=") {
          gtlt = "<";
          if (xm) {
            M = +M + 1;
          } else {
            m = +m + 1;
          }
        }
        if (gtlt === "<") {
          pr = "-0";
        }
        ret = `${gtlt + M}.${m}.${p}${pr}`;
      } else if (xm) {
        ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
      } else if (xp) {
        ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
      }
      debug2("xRange return", ret);
      return ret;
    });
  };
  var replaceStars = (comp, options) => {
    debug2("replaceStars", comp, options);
    return comp.trim().replace(re[t.STAR], "");
  };
  var replaceGTE0 = (comp, options) => {
    debug2("replaceGTE0", comp, options);
    return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
  };
  var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
    if (isX(fM)) {
      from = "";
    } else if (isX(fm)) {
      from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
    } else if (isX(fp)) {
      from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
    } else if (fpr) {
      from = `>=${from}`;
    } else {
      from = `>=${from}${incPr ? "-0" : ""}`;
    }
    if (isX(tM)) {
      to = "";
    } else if (isX(tm)) {
      to = `<${+tM + 1}.0.0-0`;
    } else if (isX(tp)) {
      to = `<${tM}.${+tm + 1}.0-0`;
    } else if (tpr) {
      to = `<=${tM}.${tm}.${tp}-${tpr}`;
    } else if (incPr) {
      to = `<${tM}.${tm}.${+tp + 1}-0`;
    } else {
      to = `<=${to}`;
    }
    return `${from} ${to}`.trim();
  };
  var testSet = (set, version, options) => {
    for (let i = 0;i < set.length; i++) {
      if (!set[i].test(version)) {
        return false;
      }
    }
    if (version.prerelease.length && !options.includePrerelease) {
      for (let i = 0;i < set.length; i++) {
        debug2(set[i].semver);
        if (set[i].semver === Comparator.ANY) {
          continue;
        }
        if (set[i].semver.prerelease.length > 0) {
          const allowed = set[i].semver;
          if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
            return true;
          }
        }
      }
      return false;
    }
    return true;
  };
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js
var require_comparator = __commonJS((exports, module) => {
  var ANY = Symbol("SemVer ANY");

  class Comparator {
    static get ANY() {
      return ANY;
    }
    constructor(comp, options) {
      options = parseOptions(options);
      if (comp instanceof Comparator) {
        if (comp.loose === !!options.loose) {
          return comp;
        } else {
          comp = comp.value;
        }
      }
      comp = comp.trim().split(/\s+/).join(" ");
      debug2("comparator", comp, options);
      this.options = options;
      this.loose = !!options.loose;
      this.parse(comp);
      if (this.semver === ANY) {
        this.value = "";
      } else {
        this.value = this.operator + this.semver.version;
      }
      debug2("comp", this);
    }
    parse(comp) {
      const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
      const m = comp.match(r);
      if (!m) {
        throw new TypeError(`Invalid comparator: ${comp}`);
      }
      this.operator = m[1] !== undefined ? m[1] : "";
      if (this.operator === "=") {
        this.operator = "";
      }
      if (!m[2]) {
        this.semver = ANY;
      } else {
        this.semver = new SemVer(m[2], this.options.loose);
      }
    }
    toString() {
      return this.value;
    }
    test(version) {
      debug2("Comparator.test", version, this.options.loose);
      if (this.semver === ANY || version === ANY) {
        return true;
      }
      if (typeof version === "string") {
        try {
          version = new SemVer(version, this.options);
        } catch (er) {
          return false;
        }
      }
      return cmp(version, this.operator, this.semver, this.options);
    }
    intersects(comp, options) {
      if (!(comp instanceof Comparator)) {
        throw new TypeError("a Comparator is required");
      }
      if (this.operator === "") {
        if (this.value === "") {
          return true;
        }
        return new Range(comp.value, options).test(this.value);
      } else if (comp.operator === "") {
        if (comp.value === "") {
          return true;
        }
        return new Range(this.value, options).test(comp.semver);
      }
      options = parseOptions(options);
      if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
        return false;
      }
      if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
        return false;
      }
      if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
        return true;
      }
      if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
        return true;
      }
      if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
        return true;
      }
      if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
        return true;
      }
      if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
        return true;
      }
      return false;
    }
  }
  module.exports = Comparator;
  var parseOptions = require_parse_options();
  var { safeRe: re, t } = require_re();
  var cmp = require_cmp();
  var debug2 = require_debug();
  var SemVer = require_semver3();
  var Range = require_range();
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js
var require_satisfies = __commonJS((exports, module) => {
  var Range = require_range();
  var satisfies = (version, range, options) => {
    try {
      range = new Range(range, options);
    } catch (er) {
      return false;
    }
    return range.test(version);
  };
  module.exports = satisfies;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js
var require_to_comparators = __commonJS((exports, module) => {
  var Range = require_range();
  var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
  module.exports = toComparators;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js
var require_max_satisfying = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var Range = require_range();
  var maxSatisfying = (versions, range, options) => {
    let max = null;
    let maxSV = null;
    let rangeObj = null;
    try {
      rangeObj = new Range(range, options);
    } catch (er) {
      return null;
    }
    versions.forEach((v) => {
      if (rangeObj.test(v)) {
        if (!max || maxSV.compare(v) === -1) {
          max = v;
          maxSV = new SemVer(max, options);
        }
      }
    });
    return max;
  };
  module.exports = maxSatisfying;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js
var require_min_satisfying = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var Range = require_range();
  var minSatisfying = (versions, range, options) => {
    let min = null;
    let minSV = null;
    let rangeObj = null;
    try {
      rangeObj = new Range(range, options);
    } catch (er) {
      return null;
    }
    versions.forEach((v) => {
      if (rangeObj.test(v)) {
        if (!min || minSV.compare(v) === 1) {
          min = v;
          minSV = new SemVer(min, options);
        }
      }
    });
    return min;
  };
  module.exports = minSatisfying;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js
var require_min_version = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var Range = require_range();
  var gt = require_gt();
  var minVersion = (range, loose) => {
    range = new Range(range, loose);
    let minver = new SemVer("0.0.0");
    if (range.test(minver)) {
      return minver;
    }
    minver = new SemVer("0.0.0-0");
    if (range.test(minver)) {
      return minver;
    }
    minver = null;
    for (let i = 0;i < range.set.length; ++i) {
      const comparators = range.set[i];
      let setMin = null;
      comparators.forEach((comparator) => {
        const compver = new SemVer(comparator.semver.version);
        switch (comparator.operator) {
          case ">":
            if (compver.prerelease.length === 0) {
              compver.patch++;
            } else {
              compver.prerelease.push(0);
            }
            compver.raw = compver.format();
          case "":
          case ">=":
            if (!setMin || gt(compver, setMin)) {
              setMin = compver;
            }
            break;
          case "<":
          case "<=":
            break;
          default:
            throw new Error(`Unexpected operation: ${comparator.operator}`);
        }
      });
      if (setMin && (!minver || gt(minver, setMin))) {
        minver = setMin;
      }
    }
    if (minver && range.test(minver)) {
      return minver;
    }
    return null;
  };
  module.exports = minVersion;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js
var require_valid2 = __commonJS((exports, module) => {
  var Range = require_range();
  var validRange = (range, options) => {
    try {
      return new Range(range, options).range || "*";
    } catch (er) {
      return null;
    }
  };
  module.exports = validRange;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js
var require_outside = __commonJS((exports, module) => {
  var SemVer = require_semver3();
  var Comparator = require_comparator();
  var { ANY } = Comparator;
  var Range = require_range();
  var satisfies = require_satisfies();
  var gt = require_gt();
  var lt = require_lt();
  var lte = require_lte();
  var gte = require_gte();
  var outside = (version, range, hilo, options) => {
    version = new SemVer(version, options);
    range = new Range(range, options);
    let gtfn, ltefn, ltfn, comp, ecomp;
    switch (hilo) {
      case ">":
        gtfn = gt;
        ltefn = lte;
        ltfn = lt;
        comp = ">";
        ecomp = ">=";
        break;
      case "<":
        gtfn = lt;
        ltefn = gte;
        ltfn = gt;
        comp = "<";
        ecomp = "<=";
        break;
      default:
        throw new TypeError('Must provide a hilo val of "<" or ">"');
    }
    if (satisfies(version, range, options)) {
      return false;
    }
    for (let i = 0;i < range.set.length; ++i) {
      const comparators = range.set[i];
      let high = null;
      let low = null;
      comparators.forEach((comparator) => {
        if (comparator.semver === ANY) {
          comparator = new Comparator(">=0.0.0");
        }
        high = high || comparator;
        low = low || comparator;
        if (gtfn(comparator.semver, high.semver, options)) {
          high = comparator;
        } else if (ltfn(comparator.semver, low.semver, options)) {
          low = comparator;
        }
      });
      if (high.operator === comp || high.operator === ecomp) {
        return false;
      }
      if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
        return false;
      } else if (low.operator === ecomp && ltfn(version, low.semver)) {
        return false;
      }
    }
    return true;
  };
  module.exports = outside;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js
var require_gtr = __commonJS((exports, module) => {
  var outside = require_outside();
  var gtr = (version, range, options) => outside(version, range, ">", options);
  module.exports = gtr;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js
var require_ltr = __commonJS((exports, module) => {
  var outside = require_outside();
  var ltr = (version, range, options) => outside(version, range, "<", options);
  module.exports = ltr;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js
var require_intersects = __commonJS((exports, module) => {
  var Range = require_range();
  var intersects = (r1, r2, options) => {
    r1 = new Range(r1, options);
    r2 = new Range(r2, options);
    return r1.intersects(r2, options);
  };
  module.exports = intersects;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js
var require_simplify = __commonJS((exports, module) => {
  var satisfies = require_satisfies();
  var compare = require_compare();
  module.exports = (versions, range, options) => {
    const set = [];
    let first = null;
    let prev = null;
    const v = versions.sort((a, b) => compare(a, b, options));
    for (const version of v) {
      const included = satisfies(version, range, options);
      if (included) {
        prev = version;
        if (!first) {
          first = version;
        }
      } else {
        if (prev) {
          set.push([first, prev]);
        }
        prev = null;
        first = null;
      }
    }
    if (first) {
      set.push([first, null]);
    }
    const ranges = [];
    for (const [min, max] of set) {
      if (min === max) {
        ranges.push(min);
      } else if (!max && min === v[0]) {
        ranges.push("*");
      } else if (!max) {
        ranges.push(`>=${min}`);
      } else if (min === v[0]) {
        ranges.push(`<=${max}`);
      } else {
        ranges.push(`${min} - ${max}`);
      }
    }
    const simplified = ranges.join(" || ");
    const original = typeof range.raw === "string" ? range.raw : String(range);
    return simplified.length < original.length ? simplified : range;
  };
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js
var require_subset = __commonJS((exports, module) => {
  var Range = require_range();
  var Comparator = require_comparator();
  var { ANY } = Comparator;
  var satisfies = require_satisfies();
  var compare = require_compare();
  var subset = (sub, dom, options = {}) => {
    if (sub === dom) {
      return true;
    }
    sub = new Range(sub, options);
    dom = new Range(dom, options);
    let sawNonNull = false;
    OUTER:
      for (const simpleSub of sub.set) {
        for (const simpleDom of dom.set) {
          const isSub = simpleSubset(simpleSub, simpleDom, options);
          sawNonNull = sawNonNull || isSub !== null;
          if (isSub) {
            continue OUTER;
          }
        }
        if (sawNonNull) {
          return false;
        }
      }
    return true;
  };
  var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
  var minimumVersion = [new Comparator(">=0.0.0")];
  var simpleSubset = (sub, dom, options) => {
    if (sub === dom) {
      return true;
    }
    if (sub.length === 1 && sub[0].semver === ANY) {
      if (dom.length === 1 && dom[0].semver === ANY) {
        return true;
      } else if (options.includePrerelease) {
        sub = minimumVersionWithPreRelease;
      } else {
        sub = minimumVersion;
      }
    }
    if (dom.length === 1 && dom[0].semver === ANY) {
      if (options.includePrerelease) {
        return true;
      } else {
        dom = minimumVersion;
      }
    }
    const eqSet = new Set;
    let gt, lt;
    for (const c of sub) {
      if (c.operator === ">" || c.operator === ">=") {
        gt = higherGT(gt, c, options);
      } else if (c.operator === "<" || c.operator === "<=") {
        lt = lowerLT(lt, c, options);
      } else {
        eqSet.add(c.semver);
      }
    }
    if (eqSet.size > 1) {
      return null;
    }
    let gtltComp;
    if (gt && lt) {
      gtltComp = compare(gt.semver, lt.semver, options);
      if (gtltComp > 0) {
        return null;
      } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
        return null;
      }
    }
    for (const eq of eqSet) {
      if (gt && !satisfies(eq, String(gt), options)) {
        return null;
      }
      if (lt && !satisfies(eq, String(lt), options)) {
        return null;
      }
      for (const c of dom) {
        if (!satisfies(eq, String(c), options)) {
          return false;
        }
      }
      return true;
    }
    let higher, lower;
    let hasDomLT, hasDomGT;
    let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
    let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
    if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
      needDomLTPre = false;
    }
    for (const c of dom) {
      hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
      hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
      if (gt) {
        if (needDomGTPre) {
          if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
            needDomGTPre = false;
          }
        }
        if (c.operator === ">" || c.operator === ">=") {
          higher = higherGT(gt, c, options);
          if (higher === c && higher !== gt) {
            return false;
          }
        } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
          return false;
        }
      }
      if (lt) {
        if (needDomLTPre) {
          if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
            needDomLTPre = false;
          }
        }
        if (c.operator === "<" || c.operator === "<=") {
          lower = lowerLT(lt, c, options);
          if (lower === c && lower !== lt) {
            return false;
          }
        } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
          return false;
        }
      }
      if (!c.operator && (lt || gt) && gtltComp !== 0) {
        return false;
      }
    }
    if (gt && hasDomLT && !lt && gtltComp !== 0) {
      return false;
    }
    if (lt && hasDomGT && !gt && gtltComp !== 0) {
      return false;
    }
    if (needDomGTPre || needDomLTPre) {
      return false;
    }
    return true;
  };
  var higherGT = (a, b, options) => {
    if (!a) {
      return b;
    }
    const comp = compare(a.semver, b.semver, options);
    return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
  };
  var lowerLT = (a, b, options) => {
    if (!a) {
      return b;
    }
    const comp = compare(a.semver, b.semver, options);
    return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
  };
  module.exports = subset;
});

// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js
var require_semver4 = __commonJS((exports, module) => {
  var internalRe = require_re();
  var constants = require_constants3();
  var SemVer = require_semver3();
  var identifiers = require_identifiers();
  var parse = require_parse();
  var valid = require_valid();
  var clean = require_clean();
  var inc = require_inc();
  var diff = require_diff();
  var major = require_major();
  var minor = require_minor();
  var patch = require_patch();
  var prerelease = require_prerelease();
  var compare = require_compare();
  var rcompare = require_rcompare();
  var compareLoose = require_compare_loose();
  var compareBuild = require_compare_build();
  var sort = require_sort();
  var rsort = require_rsort();
  var gt = require_gt();
  var lt = require_lt();
  var eq = require_eq();
  var neq = require_neq();
  var gte = require_gte();
  var lte = require_lte();
  var cmp = require_cmp();
  var coerce = require_coerce();
  var Comparator = require_comparator();
  var Range = require_range();
  var satisfies = require_satisfies();
  var toComparators = require_to_comparators();
  var maxSatisfying = require_max_satisfying();
  var minSatisfying = require_min_satisfying();
  var minVersion = require_min_version();
  var validRange = require_valid2();
  var outside = require_outside();
  var gtr = require_gtr();
  var ltr = require_ltr();
  var intersects = require_intersects();
  var simplifyRange = require_simplify();
  var subset = require_subset();
  module.exports = {
    parse,
    valid,
    clean,
    inc,
    diff,
    major,
    minor,
    patch,
    prerelease,
    compare,
    rcompare,
    compareLoose,
    compareBuild,
    sort,
    rsort,
    gt,
    lt,
    eq,
    neq,
    gte,
    lte,
    cmp,
    coerce,
    Comparator,
    Range,
    satisfies,
    toComparators,
    maxSatisfying,
    minSatisfying,
    minVersion,
    validRange,
    outside,
    gtr,
    ltr,
    intersects,
    simplifyRange,
    subset,
    SemVer,
    re: internalRe.re,
    src: internalRe.src,
    tokens: internalRe.t,
    SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
    RELEASE_TYPES: constants.RELEASE_TYPES,
    compareIdentifiers: identifiers.compareIdentifiers,
    rcompareIdentifiers: identifiers.rcompareIdentifiers
  };
});

// ../../node_modules/.pnpm/node-abi@3.89.0/node_modules/node-abi/abi_registry.json
var require_abi_registry = __commonJS((exports, module) => {
  module.exports = [
    {
      runtime: "node",
      target: "11.0.0",
      lts: false,
      future: false,
      abi: "67"
    },
    {
      runtime: "node",
      target: "12.0.0",
      lts: [
        "2019-10-21",
        "2020-11-30"
      ],
      future: false,
      abi: "72"
    },
    {
      runtime: "node",
      target: "13.0.0",
      lts: false,
      future: false,
      abi: "79"
    },
    {
      runtime: "node",
      target: "14.0.0",
      lts: [
        "2020-10-27",
        "2021-10-19"
      ],
      future: false,
      abi: "83"
    },
    {
      runtime: "node",
      target: "15.0.0",
      lts: false,
      future: false,
      abi: "88"
    },
    {
      runtime: "node",
      target: "16.0.0",
      lts: [
        "2021-10-26",
        "2022-10-18"
      ],
      future: false,
      abi: "93"
    },
    {
      runtime: "node",
      target: "17.0.0",
      lts: false,
      future: false,
      abi: "102"
    },
    {
      runtime: "node",
      target: "18.0.0",
      lts: [
        "2022-10-25",
        "2023-10-18"
      ],
      future: false,
      abi: "108"
    },
    {
      runtime: "node",
      target: "19.0.0",
      lts: false,
      future: false,
      abi: "111"
    },
    {
      runtime: "node",
      target: "20.0.0",
      lts: [
        "2023-10-24",
        "2024-10-22"
      ],
      future: false,
      abi: "115"
    },
    {
      runtime: "node",
      target: "21.0.0",
      lts: false,
      future: false,
      abi: "120"
    },
    {
      runtime: "node",
      target: "22.0.0",
      lts: [
        "2024-10-29",
        "2025-10-21"
      ],
      future: false,
      abi: "127"
    },
    {
      runtime: "node",
      target: "23.0.0",
      lts: false,
      future: false,
      abi: "131"
    },
    {
      runtime: "node",
      target: "24.0.0",
      lts: [
        "2025-10-28",
        "2026-10-20"
      ],
      future: false,
      abi: "137"
    },
    {
      runtime: "node",
      target: "25.0.0",
      lts: false,
      future: false,
      abi: "141"
    },
    {
      runtime: "node",
      target: "26.0.0",
      lts: [
        "2026-10-28",
        "2027-10-20"
      ],
      future: true,
      abi: "144"
    },
    {
      abi: "70",
      future: false,
      lts: false,
      runtime: "electron",
      target: "5.0.0-beta.9"
    },
    {
      abi: "73",
      future: false,
      lts: false,
      runtime: "electron",
      target: "6.0.0-beta.1"
    },
    {
      abi: "75",
      future: false,
      lts: false,
      runtime: "electron",
      target: "7.0.0-beta.1"
    },
    {
      abi: "76",
      future: false,
      lts: false,
      runtime: "electron",
      target: "9.0.0-beta.1"
    },
    {
      abi: "76",
      future: false,
      lts: false,
      runtime: "electron",
      target: "8.0.0-beta.1"
    },
    {
      abi: "80",
      future: false,
      lts: false,
      runtime: "electron",
      target: "9.0.0-beta.2"
    },
    {
      abi: "82",
      future: false,
      lts: false,
      runtime: "electron",
      target: "11.0.0-beta.1"
    },
    {
      abi: "82",
      future: false,
      lts: false,
      runtime: "electron",
      target: "10.0.0-beta.1"
    },
    {
      abi: "85",
      future: false,
      lts: false,
      runtime: "electron",
      target: "11.0.0-beta.11"
    },
    {
      abi: "87",
      future: false,
      lts: false,
      runtime: "electron",
      target: "12.0.0-beta.1"
    },
    {
      abi: "89",
      future: false,
      lts: false,
      runtime: "electron",
      target: "15.0.0-alpha.1"
    },
    {
      abi: "89",
      future: false,
      lts: false,
      runtime: "electron",
      target: "14.0.0-beta.1"
    },
    {
      abi: "89",
      future: false,
      lts: false,
      runtime: "electron",
      target: "13.0.0-beta.2"
    },
    {
      abi: "97",
      future: false,
      lts: false,
      runtime: "electron",
      target: "14.0.2"
    },
    {
      abi: "98",
      future: false,
      lts: false,
      runtime: "electron",
      target: "15.0.0-beta.7"
    },
    {
      abi: "99",
      future: false,
      lts: false,
      runtime: "electron",
      target: "16.0.0-alpha.1"
    },
    {
      abi: "101",
      future: false,
      lts: false,
      runtime: "electron",
      target: "17.0.0-alpha.1"
    },
    {
      abi: "103",
      future: false,
      lts: false,
      runtime: "electron",
      target: "18.0.0-alpha.1"
    },
    {
      abi: "106",
      future: false,
      lts: false,
      runtime: "electron",
      target: "19.0.0-alpha.1"
    },
    {
      abi: "107",
      future: false,
      lts: false,
      runtime: "electron",
      target: "20.0.0-alpha.1"
    },
    {
      abi: "109",
      future: false,
      lts: false,
      runtime: "electron",
      target: "21.0.0-alpha.1"
    },
    {
      abi: "110",
      future: false,
      lts: false,
      runtime: "electron",
      target: "22.0.0-alpha.1"
    },
    {
      abi: "113",
      future: false,
      lts: false,
      runtime: "electron",
      target: "23.0.0-alpha.1"
    },
    {
      abi: "114",
      future: false,
      lts: false,
      runtime: "electron",
      target: "24.0.0-alpha.1"
    },
    {
      abi: "116",
      future: false,
      lts: false,
      runtime: "electron",
      target: "26.0.0-alpha.1"
    },
    {
      abi: "116",
      future: false,
      lts: false,
      runtime: "electron",
      target: "25.0.0-alpha.1"
    },
    {
      abi: "118",
      future: false,
      lts: false,
      runtime: "electron",
      target: "27.0.0-alpha.1"
    },
    {
      abi: "119",
      future: false,
      lts: false,
      runtime: "electron",
      target: "28.0.0-alpha.1"
    },
    {
      abi: "121",
      future: false,
      lts: false,
      runtime: "electron",
      target: "29.0.0-alpha.1"
    },
    {
      abi: "123",
      future: false,
      lts: false,
      runtime: "electron",
      target: "31.0.0-alpha.1"
    },
    {
      abi: "123",
      future: false,
      lts: false,
      runtime: "electron",
      target: "30.0.0-alpha.1"
    },
    {
      abi: "125",
      future: false,
      lts: false,
      runtime: "electron",
      target: "31.0.0-beta.7"
    },
    {
      abi: "128",
      future: false,
      lts: false,
      runtime: "electron",
      target: "32.0.0-alpha.1"
    },
    {
      abi: "130",
      future: false,
      lts: false,
      runtime: "electron",
      target: "33.0.0-alpha.1"
    },
    {
      abi: "132",
      future: false,
      lts: false,
      runtime: "electron",
      target: "34.0.0-alpha.1"
    },
    {
      abi: "133",
      future: false,
      lts: false,
      runtime: "electron",
      target: "35.0.0-alpha.1"
    },
    {
      abi: "135",
      future: false,
      lts: false,
      runtime: "electron",
      target: "36.0.0-alpha.1"
    },
    {
      abi: "136",
      future: false,
      lts: false,
      runtime: "electron",
      target: "37.0.0-alpha.1"
    },
    {
      abi: "139",
      future: false,
      lts: false,
      runtime: "electron",
      target: "38.0.0-alpha.1"
    },
    {
      abi: "140",
      future: false,
      lts: false,
      runtime: "electron",
      target: "39.0.0-alpha.1"
    },
    {
      abi: "143",
      future: false,
      lts: false,
      runtime: "electron",
      target: "40.0.0-alpha.2"
    },
    {
      abi: "145",
      future: false,
      lts: false,
      runtime: "electron",
      target: "41.0.0-alpha.1"
    },
    {
      abi: "146",
      future: true,
      lts: false,
      runtime: "electron",
      target: "42.0.0-alpha.1"
    }
  ];
});

// ../../node_modules/.pnpm/node-abi@3.89.0/node_modules/node-abi/index.js
var require_node_abi = __commonJS((exports) => {
  var semver = require_semver4();
  function getNextTarget(runtime, targets) {
    if (targets == null)
      targets = allTargets;
    var latest = targets.filter(function(t) {
      return t.runtime === runtime;
    }).slice(-1)[0];
    var increment = runtime === "electron" ? "minor" : "major";
    var next = semver.inc(latest.target, increment);
    if (runtime === "electron" && semver.parse(latest.target).prerelease.length) {
      next = semver.inc(next, "major");
    }
    return next;
  }
  function getAbi(target, runtime) {
    if (target === String(Number(target)))
      return target;
    if (target)
      target = target.replace(/^v/, "");
    if (!runtime)
      runtime = "node";
    if (runtime === "node") {
      if (!target)
        return process.versions.modules;
      if (target === process.versions.node)
        return process.versions.modules;
    }
    var abi;
    var lastTarget;
    for (var i = 0;i < allTargets.length; i++) {
      var t = allTargets[i];
      if (t.runtime !== runtime)
        continue;
      if (semver.lte(t.target, target) && (!lastTarget || semver.gte(t.target, lastTarget))) {
        abi = t.abi;
        lastTarget = t.target;
      }
    }
    if (abi && semver.lt(target, getNextTarget(runtime)))
      return abi;
    throw new Error("Could not detect abi for version " + target + " and runtime " + runtime + '.  Updating "node-abi" might help solve this issue if it is a new release of ' + runtime);
  }
  function getTarget(abi, runtime) {
    if (abi && abi !== String(Number(abi)))
      return abi;
    if (!runtime)
      runtime = "node";
    if (runtime === "node" && !abi)
      return process.versions.node;
    var match = allTargets.filter(function(t) {
      return t.abi === abi && t.runtime === runtime;
    }).map(function(t) {
      return t.target;
    });
    if (match.length) {
      var betaSeparatorIndex = match[0].indexOf("-");
      return betaSeparatorIndex > -1 ? match[0].substring(0, betaSeparatorIndex) : match[0];
    }
    throw new Error("Could not detect target for abi " + abi + " and runtime " + runtime);
  }
  function sortByTargetFn(a, b) {
    var abiComp = Number(a.abi) - Number(b.abi);
    if (abiComp !== 0)
      return abiComp;
    if (a.target < b.target)
      return -1;
    if (a.target > b.target)
      return 1;
    return 0;
  }
  function loadGeneratedTargets() {
    var registry = require_abi_registry();
    var targets = {
      supported: [],
      additional: [],
      future: []
    };
    registry.forEach(function(item) {
      var target = {
        runtime: item.runtime,
        target: item.target,
        abi: item.abi
      };
      if (item.lts) {
        var startDate = new Date(Date.parse(item.lts[0]));
        var endDate = new Date(Date.parse(item.lts[1]));
        var currentDate = new Date;
        target.lts = startDate < currentDate && currentDate < endDate;
      } else {
        target.lts = false;
      }
      if (target.runtime === "node-webkit") {
        targets.additional.push(target);
      } else if (item.future) {
        targets.future.push(target);
      } else {
        targets.supported.push(target);
      }
    });
    targets.supported.sort(sortByTargetFn);
    targets.additional.sort(sortByTargetFn);
    targets.future.sort(sortByTargetFn);
    return targets;
  }
  var generatedTargets = loadGeneratedTargets();
  var supportedTargets = [
    { runtime: "node", target: "5.0.0", abi: "47", lts: false },
    { runtime: "node", target: "6.0.0", abi: "48", lts: false },
    { runtime: "node", target: "7.0.0", abi: "51", lts: false },
    { runtime: "node", target: "8.0.0", abi: "57", lts: false },
    { runtime: "node", target: "9.0.0", abi: "59", lts: false },
    { runtime: "node", target: "10.0.0", abi: "64", lts: new Date(2018, 10, 1) < new Date && new Date < new Date(2020, 4, 31) },
    { runtime: "electron", target: "0.36.0", abi: "47", lts: false },
    { runtime: "electron", target: "1.1.0", abi: "48", lts: false },
    { runtime: "electron", target: "1.3.0", abi: "49", lts: false },
    { runtime: "electron", target: "1.4.0", abi: "50", lts: false },
    { runtime: "electron", target: "1.5.0", abi: "51", lts: false },
    { runtime: "electron", target: "1.6.0", abi: "53", lts: false },
    { runtime: "electron", target: "1.7.0", abi: "54", lts: false },
    { runtime: "electron", target: "1.8.0", abi: "57", lts: false },
    { runtime: "electron", target: "2.0.0", abi: "57", lts: false },
    { runtime: "electron", target: "3.0.0", abi: "64", lts: false },
    { runtime: "electron", target: "4.0.0", abi: "64", lts: false },
    { runtime: "electron", target: "4.0.4", abi: "69", lts: false }
  ];
  supportedTargets.push.apply(supportedTargets, generatedTargets.supported);
  var additionalTargets = [
    { runtime: "node-webkit", target: "0.13.0", abi: "47", lts: false },
    { runtime: "node-webkit", target: "0.15.0", abi: "48", lts: false },
    { runtime: "node-webkit", target: "0.18.3", abi: "51", lts: false },
    { runtime: "node-webkit", target: "0.23.0", abi: "57", lts: false },
    { runtime: "node-webkit", target: "0.26.5", abi: "59", lts: false }
  ];
  additionalTargets.push.apply(additionalTargets, generatedTargets.additional);
  var deprecatedTargets = [
    { runtime: "node", target: "0.2.0", abi: "1", lts: false },
    { runtime: "node", target: "0.9.1", abi: "0x000A", lts: false },
    { runtime: "node", target: "0.9.9", abi: "0x000B", lts: false },
    { runtime: "node", target: "0.10.4", abi: "11", lts: false },
    { runtime: "node", target: "0.11.0", abi: "0x000C", lts: false },
    { runtime: "node", target: "0.11.8", abi: "13", lts: false },
    { runtime: "node", target: "0.11.11", abi: "14", lts: false },
    { runtime: "node", target: "1.0.0", abi: "42", lts: false },
    { runtime: "node", target: "1.1.0", abi: "43", lts: false },
    { runtime: "node", target: "2.0.0", abi: "44", lts: false },
    { runtime: "node", target: "3.0.0", abi: "45", lts: false },
    { runtime: "node", target: "4.0.0", abi: "46", lts: false },
    { runtime: "electron", target: "0.30.0", abi: "44", lts: false },
    { runtime: "electron", target: "0.31.0", abi: "45", lts: false },
    { runtime: "electron", target: "0.33.0", abi: "46", lts: false }
  ];
  var futureTargets = generatedTargets.future;
  var allTargets = deprecatedTargets.concat(supportedTargets).concat(additionalTargets).concat(futureTargets);
  exports.getAbi = getAbi;
  exports.getTarget = getTarget;
  exports.deprecatedTargets = deprecatedTargets;
  exports.supportedTargets = supportedTargets;
  exports.additionalTargets = additionalTargets;
  exports.futureTargets = futureTargets;
  exports.allTargets = allTargets;
  exports._getNextTarget = getNextTarget;
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-x64-108.node
var require_sentry_cpu_profiler_darwin_x64_108 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-x64-108-1j1p83ek.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-x64-115.node
var require_sentry_cpu_profiler_darwin_x64_115 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-x64-115-zta2d3v2.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-x64-127.node
var require_sentry_cpu_profiler_darwin_x64_127 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-x64-127-xd17x63a.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-x64-137.node
var require_sentry_cpu_profiler_darwin_x64_137 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-x64-137-kfyvwykg.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-arm64-108.node
var require_sentry_cpu_profiler_darwin_arm64_108 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-arm64-108-b3d85t3r.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-arm64-115.node
var require_sentry_cpu_profiler_darwin_arm64_115 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-arm64-115-xcjw77y9.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-arm64-127.node
var require_sentry_cpu_profiler_darwin_arm64_127 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-arm64-127-vrxm7ev9.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-darwin-arm64-137.node
var require_sentry_cpu_profiler_darwin_arm64_137 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-darwin-arm64-137-d5wh0c83.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-win32-x64-108.node
var require_sentry_cpu_profiler_win32_x64_108 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-win32-x64-108-s5z3ybbq.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-win32-x64-115.node
var require_sentry_cpu_profiler_win32_x64_115 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-win32-x64-115-rfcdq56h.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-win32-x64-127.node
var require_sentry_cpu_profiler_win32_x64_127 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-win32-x64-127-j356sfpv.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-win32-x64-137.node
var require_sentry_cpu_profiler_win32_x64_137 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-win32-x64-137-2sd7ssmb.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-musl-108.node
var require_sentry_cpu_profiler_linux_x64_musl_108 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-musl-108-3v69t6bz.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-musl-115.node
var require_sentry_cpu_profiler_linux_x64_musl_115 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-musl-115-3v69t6bz.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-musl-127.node
var require_sentry_cpu_profiler_linux_x64_musl_127 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-musl-127-nbp0q0h1.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-musl-137.node
var require_sentry_cpu_profiler_linux_x64_musl_137 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-musl-137-y0khf4az.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-glibc-108.node
var require_sentry_cpu_profiler_linux_x64_glibc_108 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-glibc-108-kr574pb3.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-glibc-115.node
var require_sentry_cpu_profiler_linux_x64_glibc_115 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-glibc-115-kr574pb3.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-glibc-127.node
var require_sentry_cpu_profiler_linux_x64_glibc_127 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-glibc-127-npxph24x.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-x64-glibc-137.node
var require_sentry_cpu_profiler_linux_x64_glibc_137 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-x64-glibc-137-22yp52fg.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-musl-108.node
var require_sentry_cpu_profiler_linux_arm64_musl_108 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-musl-108-nfet835d.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-musl-115.node
var require_sentry_cpu_profiler_linux_arm64_musl_115 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-musl-115-nfet835d.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-musl-127.node
var require_sentry_cpu_profiler_linux_arm64_musl_127 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-musl-127-nfet835d.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-musl-137.node
var require_sentry_cpu_profiler_linux_arm64_musl_137 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-musl-137-j65an0mb.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-glibc-108.node
var require_sentry_cpu_profiler_linux_arm64_glibc_108 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-glibc-108-2p5wct7c.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-glibc-115.node
var require_sentry_cpu_profiler_linux_arm64_glibc_115 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-glibc-115-2p5wct7c.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-glibc-127.node
var require_sentry_cpu_profiler_linux_arm64_glibc_127 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-glibc-127-7y90cv0w.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/sentry_cpu_profiler-linux-arm64-glibc-137.node
var require_sentry_cpu_profiler_linux_arm64_glibc_137 = __commonJS((exports, module) => {
  module.exports = __require("./sentry_cpu_profiler-linux-arm64-glibc-137-kgcjzcn4.node");
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/types.js
var require_types2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ProfileFormat = undefined;
  var ProfileFormat;
  (function(ProfileFormat2) {
    ProfileFormat2[ProfileFormat2["THREAD"] = 0] = "THREAD";
    ProfileFormat2[ProfileFormat2["CHUNK"] = 1] = "CHUNK";
  })(ProfileFormat || (exports.ProfileFormat = ProfileFormat = {}));
});

// ../../node_modules/.pnpm/@sentry-internal+node-cpu-profiler@2.2.0/node_modules/@sentry-internal/node-cpu-profiler/lib/index.js
var require_lib = __commonJS((exports) => {
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === undefined)
      k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = exports && exports.__exportStar || function(m, exports2) {
    for (var p in m)
      if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
        __createBinding(exports2, m, p);
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CpuProfilerBindings = exports.PrivateCpuProfilerBindings = undefined;
  exports.importCppBindingsModule = importCppBindingsModule;
  var detect_libc_1 = require_detect_libc();
  var node_abi_1 = require_node_abi();
  var node_os_1 = __require("node:os");
  var node_path_1 = __require("node:path");
  var node_process_1 = __require("node:process");
  var node_worker_threads_1 = __require("node:worker_threads");
  var stdlib = (0, detect_libc_1.familySync)();
  var platform2 = process.env["BUILD_PLATFORM"] || (0, node_os_1.platform)();
  var arch2 = process.env["BUILD_ARCH"] || (0, node_os_1.arch)();
  var abi = (0, node_abi_1.getAbi)(node_process_1.versions.node, "node");
  var identifier = [platform2, arch2, stdlib, abi].filter(function(c) {
    return c !== undefined && c !== null;
  }).join("-");
  function importCppBindingsModule() {
    if (node_process_1.env["SENTRY_PROFILER_BINARY_PATH"]) {
      var envPath = node_process_1.env["SENTRY_PROFILER_BINARY_PATH"];
      return __require(envPath);
    }
    if (node_process_1.env["SENTRY_PROFILER_BINARY_DIR"]) {
      var binaryPath = (0, node_path_1.join)((0, node_path_1.resolve)(node_process_1.env["SENTRY_PROFILER_BINARY_DIR"]), "sentry_cpu_profiler-".concat(identifier, ".node"));
      return __require(binaryPath);
    }
    if (process.versions.electron) {
      try {
        return (()=>{throw new Error("Cannot require module "+"../build/Release/sentry_cpu_profiler.node");})();
      } catch (e) {
        console.warn("The '@sentry/profiling-node' binary could not be found. Use '@electron/rebuild' to ensure the native module is built for Electron.");
        throw e;
      }
    }
    if (platform2 === "darwin") {
      if (arch2 === "x64") {
        if (abi === "108") {
          return require_sentry_cpu_profiler_darwin_x64_108();
        }
        if (abi === "115") {
          return require_sentry_cpu_profiler_darwin_x64_115();
        }
        if (abi === "127") {
          return require_sentry_cpu_profiler_darwin_x64_127();
        }
        if (abi === "137") {
          return require_sentry_cpu_profiler_darwin_x64_137();
        }
      }
      if (arch2 === "arm64") {
        if (abi === "108") {
          return require_sentry_cpu_profiler_darwin_arm64_108();
        }
        if (abi === "115") {
          return require_sentry_cpu_profiler_darwin_arm64_115();
        }
        if (abi === "127") {
          return require_sentry_cpu_profiler_darwin_arm64_127();
        }
        if (abi === "137") {
          return require_sentry_cpu_profiler_darwin_arm64_137();
        }
      }
    }
    if (platform2 === "win32") {
      if (arch2 === "x64") {
        if (abi === "108") {
          return require_sentry_cpu_profiler_win32_x64_108();
        }
        if (abi === "115") {
          return require_sentry_cpu_profiler_win32_x64_115();
        }
        if (abi === "127") {
          return require_sentry_cpu_profiler_win32_x64_127();
        }
        if (abi === "137") {
          return require_sentry_cpu_profiler_win32_x64_137();
        }
      }
    }
    if (platform2 === "linux") {
      if (arch2 === "x64") {
        if (stdlib === "musl") {
          if (abi === "108") {
            return require_sentry_cpu_profiler_linux_x64_musl_108();
          }
          if (abi === "115") {
            return require_sentry_cpu_profiler_linux_x64_musl_115();
          }
          if (abi === "127") {
            return require_sentry_cpu_profiler_linux_x64_musl_127();
          }
          if (abi === "137") {
            return require_sentry_cpu_profiler_linux_x64_musl_137();
          }
        }
        if (stdlib === "glibc") {
          if (abi === "108") {
            return require_sentry_cpu_profiler_linux_x64_glibc_108();
          }
          if (abi === "115") {
            return require_sentry_cpu_profiler_linux_x64_glibc_115();
          }
          if (abi === "127") {
            return require_sentry_cpu_profiler_linux_x64_glibc_127();
          }
          if (abi === "137") {
            return require_sentry_cpu_profiler_linux_x64_glibc_137();
          }
        }
      }
      if (arch2 === "arm64") {
        if (stdlib === "musl") {
          if (abi === "108") {
            return require_sentry_cpu_profiler_linux_arm64_musl_108();
          }
          if (abi === "115") {
            return require_sentry_cpu_profiler_linux_arm64_musl_115();
          }
          if (abi === "127") {
            return require_sentry_cpu_profiler_linux_arm64_musl_127();
          }
          if (abi === "137") {
            return require_sentry_cpu_profiler_linux_arm64_musl_137();
          }
        }
        if (stdlib === "glibc") {
          if (abi === "108") {
            return require_sentry_cpu_profiler_linux_arm64_glibc_108();
          }
          if (abi === "115") {
            return require_sentry_cpu_profiler_linux_arm64_glibc_115();
          }
          if (abi === "127") {
            return require_sentry_cpu_profiler_linux_arm64_glibc_127();
          }
          if (abi === "137") {
            return require_sentry_cpu_profiler_linux_arm64_glibc_137();
          }
        }
      }
    }
    return __require("./sentry_cpu_profiler-".concat(identifier, ".node"));
  }
  exports.PrivateCpuProfilerBindings = importCppBindingsModule();
  var Bindings = function() {
    function Bindings2() {}
    Bindings2.prototype.startProfiling = function(name) {
      if (!exports.PrivateCpuProfilerBindings) {
        console.log("[Profiling] Bindings not loaded, ignoring call to startProfiling.");
        return;
      }
      if (typeof exports.PrivateCpuProfilerBindings.startProfiling !== "function") {
        console.log("[Profiling] Native startProfiling function is not available, ignoring call to startProfiling.");
        return;
      }
      return exports.PrivateCpuProfilerBindings.startProfiling(name);
    };
    Bindings2.prototype.stopProfiling = function(name, format) {
      if (!exports.PrivateCpuProfilerBindings) {
        console.log("[Profiling] Bindings not loaded or profile was never started, ignoring call to stopProfiling.");
        return null;
      }
      if (typeof exports.PrivateCpuProfilerBindings.stopProfiling !== "function") {
        console.log("[Profiling] Native stopProfiling function is not available, ignoring call to stopProfiling.");
        return null;
      }
      return exports.PrivateCpuProfilerBindings.stopProfiling(name, format, node_worker_threads_1.threadId, !!global._sentryDebugIds);
    };
    return Bindings2;
  }();
  exports.CpuProfilerBindings = new Bindings;
  __exportStar(require_types2(), exports);
});

// ../../node_modules/.pnpm/postgres-array@2.0.0/node_modules/postgres-array/index.js
var require_postgres_array = __commonJS((exports) => {
  exports.parse = function(source, transform) {
    return new ArrayParser(source, transform).parse();
  };

  class ArrayParser {
    constructor(source, transform) {
      this.source = source;
      this.transform = transform || identity;
      this.position = 0;
      this.entries = [];
      this.recorded = [];
      this.dimension = 0;
    }
    isEof() {
      return this.position >= this.source.length;
    }
    nextCharacter() {
      var character = this.source[this.position++];
      if (character === "\\") {
        return {
          value: this.source[this.position++],
          escaped: true
        };
      }
      return {
        value: character,
        escaped: false
      };
    }
    record(character) {
      this.recorded.push(character);
    }
    newEntry(includeEmpty) {
      var entry;
      if (this.recorded.length > 0 || includeEmpty) {
        entry = this.recorded.join("");
        if (entry === "NULL" && !includeEmpty) {
          entry = null;
        }
        if (entry !== null)
          entry = this.transform(entry);
        this.entries.push(entry);
        this.recorded = [];
      }
    }
    consumeDimensions() {
      if (this.source[0] === "[") {
        while (!this.isEof()) {
          var char2 = this.nextCharacter();
          if (char2.value === "=")
            break;
        }
      }
    }
    parse(nested) {
      var character, parser, quote;
      this.consumeDimensions();
      while (!this.isEof()) {
        character = this.nextCharacter();
        if (character.value === "{" && !quote) {
          this.dimension++;
          if (this.dimension > 1) {
            parser = new ArrayParser(this.source.substr(this.position - 1), this.transform);
            this.entries.push(parser.parse(true));
            this.position += parser.position - 2;
          }
        } else if (character.value === "}" && !quote) {
          this.dimension--;
          if (!this.dimension) {
            this.newEntry();
            if (nested)
              return this.entries;
          }
        } else if (character.value === '"' && !character.escaped) {
          if (quote)
            this.newEntry(true);
          quote = !quote;
        } else if (character.value === "," && !quote) {
          this.newEntry();
        } else {
          this.record(character.value);
        }
      }
      if (this.dimension !== 0) {
        throw new Error("array dimension not balanced");
      }
      return this.entries;
    }
  }
  function identity(value) {
    return value;
  }
});

// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/arrayParser.js
var require_arrayParser = __commonJS((exports, module) => {
  var array = require_postgres_array();
  module.exports = {
    create: function(source, transform) {
      return {
        parse: function() {
          return array.parse(source, transform);
        }
      };
    }
  };
});

// ../../node_modules/.pnpm/postgres-date@1.0.7/node_modules/postgres-date/index.js
var require_postgres_date = __commonJS((exports, module) => {
  var DATE_TIME = /(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/;
  var DATE = /^(\d{1,})-(\d{2})-(\d{2})( BC)?$/;
  var TIME_ZONE = /([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/;
  var INFINITY = /^-?infinity$/;
  module.exports = function parseDate(isoDate) {
    if (INFINITY.test(isoDate)) {
      return Number(isoDate.replace("i", "I"));
    }
    var matches = DATE_TIME.exec(isoDate);
    if (!matches) {
      return getDate(isoDate) || null;
    }
    var isBC = !!matches[8];
    var year = parseInt(matches[1], 10);
    if (isBC) {
      year = bcYearToNegativeYear(year);
    }
    var month = parseInt(matches[2], 10) - 1;
    var day = matches[3];
    var hour = parseInt(matches[4], 10);
    var minute = parseInt(matches[5], 10);
    var second = parseInt(matches[6], 10);
    var ms = matches[7];
    ms = ms ? 1000 * parseFloat(ms) : 0;
    var date2;
    var offset = timeZoneOffset(isoDate);
    if (offset != null) {
      date2 = new Date(Date.UTC(year, month, day, hour, minute, second, ms));
      if (is0To99(year)) {
        date2.setUTCFullYear(year);
      }
      if (offset !== 0) {
        date2.setTime(date2.getTime() - offset);
      }
    } else {
      date2 = new Date(year, month, day, hour, minute, second, ms);
      if (is0To99(year)) {
        date2.setFullYear(year);
      }
    }
    return date2;
  };
  function getDate(isoDate) {
    var matches = DATE.exec(isoDate);
    if (!matches) {
      return;
    }
    var year = parseInt(matches[1], 10);
    var isBC = !!matches[4];
    if (isBC) {
      year = bcYearToNegativeYear(year);
    }
    var month = parseInt(matches[2], 10) - 1;
    var day = matches[3];
    var date2 = new Date(year, month, day);
    if (is0To99(year)) {
      date2.setFullYear(year);
    }
    return date2;
  }
  function timeZoneOffset(isoDate) {
    if (isoDate.endsWith("+00")) {
      return 0;
    }
    var zone = TIME_ZONE.exec(isoDate.split(" ")[1]);
    if (!zone)
      return;
    var type2 = zone[1];
    if (type2 === "Z") {
      return 0;
    }
    var sign = type2 === "-" ? -1 : 1;
    var offset = parseInt(zone[2], 10) * 3600 + parseInt(zone[3] || 0, 10) * 60 + parseInt(zone[4] || 0, 10);
    return offset * sign * 1000;
  }
  function bcYearToNegativeYear(year) {
    return -(year - 1);
  }
  function is0To99(num) {
    return num >= 0 && num < 100;
  }
});

// ../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/mutable.js
var require_mutable = __commonJS((exports, module) => {
  module.exports = extend;
  var hasOwnProperty2 = Object.prototype.hasOwnProperty;
  function extend(target) {
    for (var i = 1;i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (hasOwnProperty2.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  }
});

// ../../node_modules/.pnpm/postgres-interval@1.2.0/node_modules/postgres-interval/index.js
var require_postgres_interval = __commonJS((exports, module) => {
  var extend = require_mutable();
  module.exports = PostgresInterval;
  function PostgresInterval(raw) {
    if (!(this instanceof PostgresInterval)) {
      return new PostgresInterval(raw);
    }
    extend(this, parse(raw));
  }
  var properties = ["seconds", "minutes", "hours", "days", "months", "years"];
  PostgresInterval.prototype.toPostgres = function() {
    var filtered = properties.filter(this.hasOwnProperty, this);
    if (this.milliseconds && filtered.indexOf("seconds") < 0) {
      filtered.push("seconds");
    }
    if (filtered.length === 0)
      return "0";
    return filtered.map(function(property) {
      var value = this[property] || 0;
      if (property === "seconds" && this.milliseconds) {
        value = (value + this.milliseconds / 1000).toFixed(6).replace(/\.?0+$/, "");
      }
      return value + " " + property;
    }, this).join(" ");
  };
  var propertiesISOEquivalent = {
    years: "Y",
    months: "M",
    days: "D",
    hours: "H",
    minutes: "M",
    seconds: "S"
  };
  var dateProperties = ["years", "months", "days"];
  var timeProperties = ["hours", "minutes", "seconds"];
  PostgresInterval.prototype.toISOString = PostgresInterval.prototype.toISO = function() {
    var datePart = dateProperties.map(buildProperty, this).join("");
    var timePart = timeProperties.map(buildProperty, this).join("");
    return "P" + datePart + "T" + timePart;
    function buildProperty(property) {
      var value = this[property] || 0;
      if (property === "seconds" && this.milliseconds) {
        value = (value + this.milliseconds / 1000).toFixed(6).replace(/0+$/, "");
      }
      return value + propertiesISOEquivalent[property];
    }
  };
  var NUMBER = "([+-]?\\d+)";
  var YEAR = NUMBER + "\\s+years?";
  var MONTH = NUMBER + "\\s+mons?";
  var DAY = NUMBER + "\\s+days?";
  var TIME = "([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?";
  var INTERVAL = new RegExp([YEAR, MONTH, DAY, TIME].map(function(regexString) {
    return "(" + regexString + ")?";
  }).join("\\s*"));
  var positions = {
    years: 2,
    months: 4,
    days: 6,
    hours: 9,
    minutes: 10,
    seconds: 11,
    milliseconds: 12
  };
  var negatives = ["hours", "minutes", "seconds", "milliseconds"];
  function parseMilliseconds(fraction) {
    var microseconds = fraction + "000000".slice(fraction.length);
    return parseInt(microseconds, 10) / 1000;
  }
  function parse(interval2) {
    if (!interval2)
      return {};
    var matches = INTERVAL.exec(interval2);
    var isNegative = matches[8] === "-";
    return Object.keys(positions).reduce(function(parsed, property) {
      var position = positions[property];
      var value = matches[position];
      if (!value)
        return parsed;
      value = property === "milliseconds" ? parseMilliseconds(value) : parseInt(value, 10);
      if (!value)
        return parsed;
      if (isNegative && ~negatives.indexOf(property)) {
        value *= -1;
      }
      parsed[property] = value;
      return parsed;
    }, {});
  }
});

// ../../node_modules/.pnpm/postgres-bytea@1.0.1/node_modules/postgres-bytea/index.js
var require_postgres_bytea = __commonJS((exports, module) => {
  var bufferFrom = Buffer.from || Buffer;
  module.exports = function parseBytea(input) {
    if (/^\\x/.test(input)) {
      return bufferFrom(input.substr(2), "hex");
    }
    var output = "";
    var i = 0;
    while (i < input.length) {
      if (input[i] !== "\\") {
        output += input[i];
        ++i;
      } else {
        if (/[0-7]{3}/.test(input.substr(i + 1, 3))) {
          output += String.fromCharCode(parseInt(input.substr(i + 1, 3), 8));
          i += 4;
        } else {
          var backslashes = 1;
          while (i + backslashes < input.length && input[i + backslashes] === "\\") {
            backslashes++;
          }
          for (var k = 0;k < Math.floor(backslashes / 2); ++k) {
            output += "\\";
          }
          i += Math.floor(backslashes / 2) * 2;
        }
      }
    }
    return bufferFrom(output, "binary");
  };
});

// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/textParsers.js
var require_textParsers = __commonJS((exports, module) => {
  var array = require_postgres_array();
  var arrayParser = require_arrayParser();
  var parseDate = require_postgres_date();
  var parseInterval = require_postgres_interval();
  var parseByteA = require_postgres_bytea();
  function allowNull(fn) {
    return function nullAllowed(value) {
      if (value === null)
        return value;
      return fn(value);
    };
  }
  function parseBool(value) {
    if (value === null)
      return value;
    return value === "TRUE" || value === "t" || value === "true" || value === "y" || value === "yes" || value === "on" || value === "1";
  }
  function parseBoolArray(value) {
    if (!value)
      return null;
    return array.parse(value, parseBool);
  }
  function parseBaseTenInt(string) {
    return parseInt(string, 10);
  }
  function parseIntegerArray(value) {
    if (!value)
      return null;
    return array.parse(value, allowNull(parseBaseTenInt));
  }
  function parseBigIntegerArray(value) {
    if (!value)
      return null;
    return array.parse(value, allowNull(function(entry) {
      return parseBigInteger(entry).trim();
    }));
  }
  var parsePointArray = function(value) {
    if (!value) {
      return null;
    }
    var p = arrayParser.create(value, function(entry) {
      if (entry !== null) {
        entry = parsePoint(entry);
      }
      return entry;
    });
    return p.parse();
  };
  var parseFloatArray = function(value) {
    if (!value) {
      return null;
    }
    var p = arrayParser.create(value, function(entry) {
      if (entry !== null) {
        entry = parseFloat(entry);
      }
      return entry;
    });
    return p.parse();
  };
  var parseStringArray = function(value) {
    if (!value) {
      return null;
    }
    var p = arrayParser.create(value);
    return p.parse();
  };
  var parseDateArray = function(value) {
    if (!value) {
      return null;
    }
    var p = arrayParser.create(value, function(entry) {
      if (entry !== null) {
        entry = parseDate(entry);
      }
      return entry;
    });
    return p.parse();
  };
  var parseIntervalArray = function(value) {
    if (!value) {
      return null;
    }
    var p = arrayParser.create(value, function(entry) {
      if (entry !== null) {
        entry = parseInterval(entry);
      }
      return entry;
    });
    return p.parse();
  };
  var parseByteAArray = function(value) {
    if (!value) {
      return null;
    }
    return array.parse(value, allowNull(parseByteA));
  };
  var parseInteger = function(value) {
    return parseInt(value, 10);
  };
  var parseBigInteger = function(value) {
    var valStr = String(value);
    if (/^\d+$/.test(valStr)) {
      return valStr;
    }
    return value;
  };
  var parseJsonArray = function(value) {
    if (!value) {
      return null;
    }
    return array.parse(value, allowNull(JSON.parse));
  };
  var parsePoint = function(value) {
    if (value[0] !== "(") {
      return null;
    }
    value = value.substring(1, value.length - 1).split(",");
    return {
      x: parseFloat(value[0]),
      y: parseFloat(value[1])
    };
  };
  var parseCircle = function(value) {
    if (value[0] !== "<" && value[1] !== "(") {
      return null;
    }
    var point2 = "(";
    var radius = "";
    var pointParsed = false;
    for (var i = 2;i < value.length - 1; i++) {
      if (!pointParsed) {
        point2 += value[i];
      }
      if (value[i] === ")") {
        pointParsed = true;
        continue;
      } else if (!pointParsed) {
        continue;
      }
      if (value[i] === ",") {
        continue;
      }
      radius += value[i];
    }
    var result = parsePoint(point2);
    result.radius = parseFloat(radius);
    return result;
  };
  var init4 = function(register2) {
    register2(20, parseBigInteger);
    register2(21, parseInteger);
    register2(23, parseInteger);
    register2(26, parseInteger);
    register2(700, parseFloat);
    register2(701, parseFloat);
    register2(16, parseBool);
    register2(1082, parseDate);
    register2(1114, parseDate);
    register2(1184, parseDate);
    register2(600, parsePoint);
    register2(651, parseStringArray);
    register2(718, parseCircle);
    register2(1000, parseBoolArray);
    register2(1001, parseByteAArray);
    register2(1005, parseIntegerArray);
    register2(1007, parseIntegerArray);
    register2(1028, parseIntegerArray);
    register2(1016, parseBigIntegerArray);
    register2(1017, parsePointArray);
    register2(1021, parseFloatArray);
    register2(1022, parseFloatArray);
    register2(1231, parseFloatArray);
    register2(1014, parseStringArray);
    register2(1015, parseStringArray);
    register2(1008, parseStringArray);
    register2(1009, parseStringArray);
    register2(1040, parseStringArray);
    register2(1041, parseStringArray);
    register2(1115, parseDateArray);
    register2(1182, parseDateArray);
    register2(1185, parseDateArray);
    register2(1186, parseInterval);
    register2(1187, parseIntervalArray);
    register2(17, parseByteA);
    register2(114, JSON.parse.bind(JSON));
    register2(3802, JSON.parse.bind(JSON));
    register2(199, parseJsonArray);
    register2(3807, parseJsonArray);
    register2(3907, parseStringArray);
    register2(2951, parseStringArray);
    register2(791, parseStringArray);
    register2(1183, parseStringArray);
    register2(1270, parseStringArray);
  };
  module.exports = {
    init: init4
  };
});

// ../../node_modules/.pnpm/pg-int8@1.0.1/node_modules/pg-int8/index.js
var require_pg_int8 = __commonJS((exports, module) => {
  var BASE = 1e6;
  function readInt8(buffer) {
    var high = buffer.readInt32BE(0);
    var low = buffer.readUInt32BE(4);
    var sign = "";
    if (high < 0) {
      high = ~high + (low === 0);
      low = ~low + 1 >>> 0;
      sign = "-";
    }
    var result = "";
    var carry;
    var t;
    var digits;
    var pad;
    var l;
    var i;
    {
      carry = high % BASE;
      high = high / BASE >>> 0;
      t = 4294967296 * carry + low;
      low = t / BASE >>> 0;
      digits = "" + (t - BASE * low);
      if (low === 0 && high === 0) {
        return sign + digits + result;
      }
      pad = "";
      l = 6 - digits.length;
      for (i = 0;i < l; i++) {
        pad += "0";
      }
      result = pad + digits + result;
    }
    {
      carry = high % BASE;
      high = high / BASE >>> 0;
      t = 4294967296 * carry + low;
      low = t / BASE >>> 0;
      digits = "" + (t - BASE * low);
      if (low === 0 && high === 0) {
        return sign + digits + result;
      }
      pad = "";
      l = 6 - digits.length;
      for (i = 0;i < l; i++) {
        pad += "0";
      }
      result = pad + digits + result;
    }
    {
      carry = high % BASE;
      high = high / BASE >>> 0;
      t = 4294967296 * carry + low;
      low = t / BASE >>> 0;
      digits = "" + (t - BASE * low);
      if (low === 0 && high === 0) {
        return sign + digits + result;
      }
      pad = "";
      l = 6 - digits.length;
      for (i = 0;i < l; i++) {
        pad += "0";
      }
      result = pad + digits + result;
    }
    {
      carry = high % BASE;
      t = 4294967296 * carry + low;
      digits = "" + t % BASE;
      return sign + digits + result;
    }
  }
  module.exports = readInt8;
});

// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/binaryParsers.js
var require_binaryParsers = __commonJS((exports, module) => {
  var parseInt64 = require_pg_int8();
  var parseBits = function(data, bits, offset, invert, callback) {
    offset = offset || 0;
    invert = invert || false;
    callback = callback || function(lastValue, newValue, bits2) {
      return lastValue * Math.pow(2, bits2) + newValue;
    };
    var offsetBytes = offset >> 3;
    var inv = function(value) {
      if (invert) {
        return ~value & 255;
      }
      return value;
    };
    var mask = 255;
    var firstBits = 8 - offset % 8;
    if (bits < firstBits) {
      mask = 255 << 8 - bits & 255;
      firstBits = bits;
    }
    if (offset) {
      mask = mask >> offset % 8;
    }
    var result = 0;
    if (offset % 8 + bits >= 8) {
      result = callback(0, inv(data[offsetBytes]) & mask, firstBits);
    }
    var bytes = bits + offset >> 3;
    for (var i = offsetBytes + 1;i < bytes; i++) {
      result = callback(result, inv(data[i]), 8);
    }
    var lastBits = (bits + offset) % 8;
    if (lastBits > 0) {
      result = callback(result, inv(data[bytes]) >> 8 - lastBits, lastBits);
    }
    return result;
  };
  var parseFloatFromBits = function(data, precisionBits, exponentBits) {
    var bias = Math.pow(2, exponentBits - 1) - 1;
    var sign = parseBits(data, 1);
    var exponent = parseBits(data, exponentBits, 1);
    if (exponent === 0) {
      return 0;
    }
    var precisionBitsCounter = 1;
    var parsePrecisionBits = function(lastValue, newValue, bits) {
      if (lastValue === 0) {
        lastValue = 1;
      }
      for (var i = 1;i <= bits; i++) {
        precisionBitsCounter /= 2;
        if ((newValue & 1 << bits - i) > 0) {
          lastValue += precisionBitsCounter;
        }
      }
      return lastValue;
    };
    var mantissa = parseBits(data, precisionBits, exponentBits + 1, false, parsePrecisionBits);
    if (exponent == Math.pow(2, exponentBits + 1) - 1) {
      if (mantissa === 0) {
        return sign === 0 ? Infinity : -Infinity;
      }
      return NaN;
    }
    return (sign === 0 ? 1 : -1) * Math.pow(2, exponent - bias) * mantissa;
  };
  var parseInt16 = function(value) {
    if (parseBits(value, 1) == 1) {
      return -1 * (parseBits(value, 15, 1, true) + 1);
    }
    return parseBits(value, 15, 1);
  };
  var parseInt32 = function(value) {
    if (parseBits(value, 1) == 1) {
      return -1 * (parseBits(value, 31, 1, true) + 1);
    }
    return parseBits(value, 31, 1);
  };
  var parseFloat32 = function(value) {
    return parseFloatFromBits(value, 23, 8);
  };
  var parseFloat64 = function(value) {
    return parseFloatFromBits(value, 52, 11);
  };
  var parseNumeric = function(value) {
    var sign = parseBits(value, 16, 32);
    if (sign == 49152) {
      return NaN;
    }
    var weight = Math.pow(1e4, parseBits(value, 16, 16));
    var result = 0;
    var digits = [];
    var ndigits = parseBits(value, 16);
    for (var i = 0;i < ndigits; i++) {
      result += parseBits(value, 16, 64 + 16 * i) * weight;
      weight /= 1e4;
    }
    var scale = Math.pow(10, parseBits(value, 16, 48));
    return (sign === 0 ? 1 : -1) * Math.round(result * scale) / scale;
  };
  var parseDate = function(isUTC, value) {
    var sign = parseBits(value, 1);
    var rawValue = parseBits(value, 63, 1);
    var result = new Date((sign === 0 ? 1 : -1) * rawValue / 1000 + 946684800000);
    if (!isUTC) {
      result.setTime(result.getTime() + result.getTimezoneOffset() * 60000);
    }
    result.usec = rawValue % 1000;
    result.getMicroSeconds = function() {
      return this.usec;
    };
    result.setMicroSeconds = function(value2) {
      this.usec = value2;
    };
    result.getUTCMicroSeconds = function() {
      return this.usec;
    };
    return result;
  };
  var parseArray = function(value) {
    var dim = parseBits(value, 32);
    var flags = parseBits(value, 32, 32);
    var elementType = parseBits(value, 32, 64);
    var offset = 96;
    var dims = [];
    for (var i = 0;i < dim; i++) {
      dims[i] = parseBits(value, 32, offset);
      offset += 32;
      offset += 32;
    }
    var parseElement = function(elementType2) {
      var length = parseBits(value, 32, offset);
      offset += 32;
      if (length == 4294967295) {
        return null;
      }
      var result;
      if (elementType2 == 23 || elementType2 == 20) {
        result = parseBits(value, length * 8, offset);
        offset += length * 8;
        return result;
      } else if (elementType2 == 25) {
        result = value.toString(this.encoding, offset >> 3, (offset += length << 3) >> 3);
        return result;
      } else {
        console.log("ERROR: ElementType not implemented: " + elementType2);
      }
    };
    var parse = function(dimension, elementType2) {
      var array = [];
      var i2;
      if (dimension.length > 1) {
        var count2 = dimension.shift();
        for (i2 = 0;i2 < count2; i2++) {
          array[i2] = parse(dimension, elementType2);
        }
        dimension.unshift(count2);
      } else {
        for (i2 = 0;i2 < dimension[0]; i2++) {
          array[i2] = parseElement(elementType2);
        }
      }
      return array;
    };
    return parse(dims, elementType);
  };
  var parseText = function(value) {
    return value.toString("utf8");
  };
  var parseBool = function(value) {
    if (value === null)
      return null;
    return parseBits(value, 8) > 0;
  };
  var init4 = function(register2) {
    register2(20, parseInt64);
    register2(21, parseInt16);
    register2(23, parseInt32);
    register2(26, parseInt32);
    register2(1700, parseNumeric);
    register2(700, parseFloat32);
    register2(701, parseFloat64);
    register2(16, parseBool);
    register2(1114, parseDate.bind(null, false));
    register2(1184, parseDate.bind(null, true));
    register2(1000, parseArray);
    register2(1007, parseArray);
    register2(1016, parseArray);
    register2(1008, parseArray);
    register2(1009, parseArray);
    register2(25, parseText);
  };
  module.exports = {
    init: init4
  };
});

// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/builtins.js
var require_builtins = __commonJS((exports, module) => {
  module.exports = {
    BOOL: 16,
    BYTEA: 17,
    CHAR: 18,
    INT8: 20,
    INT2: 21,
    INT4: 23,
    REGPROC: 24,
    TEXT: 25,
    OID: 26,
    TID: 27,
    XID: 28,
    CID: 29,
    JSON: 114,
    XML: 142,
    PG_NODE_TREE: 194,
    SMGR: 210,
    PATH: 602,
    POLYGON: 604,
    CIDR: 650,
    FLOAT4: 700,
    FLOAT8: 701,
    ABSTIME: 702,
    RELTIME: 703,
    TINTERVAL: 704,
    CIRCLE: 718,
    MACADDR8: 774,
    MONEY: 790,
    MACADDR: 829,
    INET: 869,
    ACLITEM: 1033,
    BPCHAR: 1042,
    VARCHAR: 1043,
    DATE: 1082,
    TIME: 1083,
    TIMESTAMP: 1114,
    TIMESTAMPTZ: 1184,
    INTERVAL: 1186,
    TIMETZ: 1266,
    BIT: 1560,
    VARBIT: 1562,
    NUMERIC: 1700,
    REFCURSOR: 1790,
    REGPROCEDURE: 2202,
    REGOPER: 2203,
    REGOPERATOR: 2204,
    REGCLASS: 2205,
    REGTYPE: 2206,
    UUID: 2950,
    TXID_SNAPSHOT: 2970,
    PG_LSN: 3220,
    PG_NDISTINCT: 3361,
    PG_DEPENDENCIES: 3402,
    TSVECTOR: 3614,
    TSQUERY: 3615,
    GTSVECTOR: 3642,
    REGCONFIG: 3734,
    REGDICTIONARY: 3769,
    JSONB: 3802,
    REGNAMESPACE: 4089,
    REGROLE: 4096
  };
});

// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/index.js
var require_pg_types = __commonJS((exports) => {
  var textParsers = require_textParsers();
  var binaryParsers = require_binaryParsers();
  var arrayParser = require_arrayParser();
  var builtinTypes = require_builtins();
  exports.getTypeParser = getTypeParser;
  exports.setTypeParser = setTypeParser;
  exports.arrayParser = arrayParser;
  exports.builtins = builtinTypes;
  var typeParsers = {
    text: {},
    binary: {}
  };
  function noParse(val) {
    return String(val);
  }
  function getTypeParser(oid, format) {
    format = format || "text";
    if (!typeParsers[format]) {
      return noParse;
    }
    return typeParsers[format][oid] || noParse;
  }
  function setTypeParser(oid, format, parseFn) {
    if (typeof format == "function") {
      parseFn = format;
      format = "text";
    }
    typeParsers[format][oid] = parseFn;
  }
  textParsers.init(function(oid, converter) {
    typeParsers.text[oid] = converter;
  });
  binaryParsers.init(function(oid, converter) {
    typeParsers.binary[oid] = converter;
  });
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/defaults.js
var require_defaults = __commonJS((exports, module) => {
  var user2;
  try {
    user2 = process.platform === "win32" ? process.env.USERNAME : process.env.USER;
  } catch {}
  module.exports = {
    host: "localhost",
    user: user2,
    database: undefined,
    password: null,
    connectionString: undefined,
    port: 5432,
    rows: 0,
    binary: false,
    max: 10,
    idleTimeoutMillis: 30000,
    client_encoding: "",
    ssl: false,
    sslnegotiation: undefined,
    application_name: undefined,
    fallback_application_name: undefined,
    options: undefined,
    parseInputDatesAsUTC: false,
    statement_timeout: false,
    lock_timeout: false,
    idle_in_transaction_session_timeout: false,
    query_timeout: false,
    connect_timeout: 0,
    keepalives: 1,
    keepalives_idle: 0
  };
  var pgTypes = require_pg_types();
  var parseBigInteger = pgTypes.getTypeParser(20, "text");
  var parseBigIntegerArray = pgTypes.getTypeParser(1016, "text");
  module.exports.__defineSetter__("parseInt8", function(val) {
    pgTypes.setTypeParser(20, "text", val ? pgTypes.getTypeParser(23, "text") : parseBigInteger);
    pgTypes.setTypeParser(1016, "text", val ? pgTypes.getTypeParser(1007, "text") : parseBigIntegerArray);
  });
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/utils.js
var require_utils11 = __commonJS((exports, module) => {
  var defaults = require_defaults();
  var { isDate } = __require("util/types");
  function escapeElement(elementRepresentation) {
    const escaped = elementRepresentation.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
    return '"' + escaped + '"';
  }
  function arrayString(val) {
    let result = "{";
    for (let i = 0;i < val.length; i++) {
      if (i > 0) {
        result += ",";
      }
      let item = val[i];
      if (item == null) {
        result += "NULL";
      } else if (Array.isArray(item)) {
        result += arrayString(item);
      } else if (ArrayBuffer.isView(item)) {
        if (!(item instanceof Buffer)) {
          item = Buffer.from(item.buffer, item.byteOffset, item.byteLength);
        }
        result += "\\\\x" + item.toString("hex");
      } else {
        result += escapeElement(prepareValue(item));
      }
    }
    result += "}";
    return result;
  }
  var prepareValue = function(val, seen) {
    if (val == null) {
      return null;
    }
    if (typeof val === "object") {
      if (val instanceof Buffer) {
        return val;
      }
      if (ArrayBuffer.isView(val)) {
        return Buffer.from(val.buffer, val.byteOffset, val.byteLength);
      }
      if (isDate(val)) {
        if (defaults.parseInputDatesAsUTC) {
          return dateToStringUTC(val);
        } else {
          return dateToString(val);
        }
      }
      if (Array.isArray(val)) {
        return arrayString(val);
      }
      return prepareObject(val, seen);
    }
    return val.toString();
  };
  function prepareObject(val, seen) {
    if (val && typeof val.toPostgres === "function") {
      seen = seen || [];
      if (seen.indexOf(val) !== -1) {
        throw new Error('circular reference detected while preparing "' + val + '" for query');
      }
      seen.push(val);
      return prepareValue(val.toPostgres(prepareValue), seen);
    }
    return JSON.stringify(val);
  }
  function dateToString(date2) {
    let offset = -date2.getTimezoneOffset();
    let year = date2.getFullYear();
    const isBCYear = year < 1;
    if (isBCYear)
      year = Math.abs(year) + 1;
    let ret = String(year).padStart(4, "0") + "-" + String(date2.getMonth() + 1).padStart(2, "0") + "-" + String(date2.getDate()).padStart(2, "0") + "T" + String(date2.getHours()).padStart(2, "0") + ":" + String(date2.getMinutes()).padStart(2, "0") + ":" + String(date2.getSeconds()).padStart(2, "0") + "." + String(date2.getMilliseconds()).padStart(3, "0");
    if (offset < 0) {
      ret += "-";
      offset *= -1;
    } else {
      ret += "+";
    }
    ret += String(Math.floor(offset / 60)).padStart(2, "0") + ":" + String(offset % 60).padStart(2, "0");
    if (isBCYear)
      ret += " BC";
    return ret;
  }
  function dateToStringUTC(date2) {
    let year = date2.getUTCFullYear();
    const isBCYear = year < 1;
    if (isBCYear)
      year = Math.abs(year) + 1;
    let ret = String(year).padStart(4, "0") + "-" + String(date2.getUTCMonth() + 1).padStart(2, "0") + "-" + String(date2.getUTCDate()).padStart(2, "0") + "T" + String(date2.getUTCHours()).padStart(2, "0") + ":" + String(date2.getUTCMinutes()).padStart(2, "0") + ":" + String(date2.getUTCSeconds()).padStart(2, "0") + "." + String(date2.getUTCMilliseconds()).padStart(3, "0");
    ret += "+00:00";
    if (isBCYear)
      ret += " BC";
    return ret;
  }
  function normalizeQueryConfig(config, values, callback) {
    config = typeof config === "string" ? { text: config } : config;
    if (values) {
      if (typeof values === "function") {
        config.callback = values;
      } else {
        config.values = values;
      }
    }
    if (callback) {
      config.callback = callback;
    }
    return config;
  }
  var escapeIdentifier = function(str) {
    return '"' + str.replace(/"/g, '""') + '"';
  };
  var escapeLiteral = function(str) {
    let hasBackslash = false;
    let escaped = "'";
    if (str == null) {
      return "''";
    }
    if (typeof str !== "string") {
      return "''";
    }
    for (let i = 0;i < str.length; i++) {
      const c = str[i];
      if (c === "'") {
        escaped += c + c;
      } else if (c === "\\") {
        escaped += c + c;
        hasBackslash = true;
      } else {
        escaped += c;
      }
    }
    escaped += "'";
    if (hasBackslash === true) {
      escaped = " E" + escaped;
    }
    return escaped;
  };
  module.exports = {
    prepareValue: function prepareValueWrapper(value) {
      return prepareValue(value);
    },
    normalizeQueryConfig,
    escapeIdentifier,
    escapeLiteral
  };
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/crypto/utils.js
var require_utils12 = __commonJS((exports, module) => {
  var nodeCrypto = __require("crypto");
  module.exports = {
    postgresMd5PasswordHash,
    randomBytes,
    deriveKey,
    sha256,
    hashByName,
    hmacSha256,
    md5
  };
  var webCrypto = nodeCrypto.webcrypto || globalThis.crypto;
  var subtleCrypto = webCrypto.subtle;
  var textEncoder = new TextEncoder;
  function randomBytes(length) {
    return webCrypto.getRandomValues(Buffer.alloc(length));
  }
  async function md5(string) {
    try {
      return nodeCrypto.createHash("md5").update(string, "utf-8").digest("hex");
    } catch (e) {
      const data = typeof string === "string" ? textEncoder.encode(string) : string;
      const hash = await subtleCrypto.digest("MD5", data);
      return Array.from(new Uint8Array(hash)).map((b) => b.toString(16).padStart(2, "0")).join("");
    }
  }
  async function postgresMd5PasswordHash(user2, password, salt) {
    const inner = await md5(password + user2);
    const outer = await md5(Buffer.concat([Buffer.from(inner), salt]));
    return "md5" + outer;
  }
  async function sha256(text2) {
    return await subtleCrypto.digest("SHA-256", text2);
  }
  async function hashByName(hashName, text2) {
    return await subtleCrypto.digest(hashName, text2);
  }
  async function hmacSha256(keyBuffer, msg) {
    const key = await subtleCrypto.importKey("raw", keyBuffer, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
    return await subtleCrypto.sign("HMAC", key, textEncoder.encode(msg));
  }
  async function deriveKey(password, salt, iterations) {
    const key = await subtleCrypto.importKey("raw", textEncoder.encode(password), "PBKDF2", false, ["deriveBits"]);
    const params = { name: "PBKDF2", hash: "SHA-256", salt, iterations };
    return await subtleCrypto.deriveBits(params, key, 32 * 8, ["deriveBits"]);
  }
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/crypto/cert-signatures.js
var require_cert_signatures = __commonJS((exports, module) => {
  function x509Error(msg, cert) {
    return new Error("SASL channel binding: " + msg + " when parsing public certificate " + cert.toString("base64"));
  }
  function readASN1Length(data, index2) {
    let length = data[index2++];
    if (length < 128)
      return { length, index: index2 };
    const lengthBytes = length & 127;
    if (lengthBytes > 4)
      throw x509Error("bad length", data);
    length = 0;
    for (let i = 0;i < lengthBytes; i++) {
      length = length << 8 | data[index2++];
    }
    return { length, index: index2 };
  }
  function readASN1OID(data, index2) {
    if (data[index2++] !== 6)
      throw x509Error("non-OID data", data);
    const { length: OIDLength, index: indexAfterOIDLength } = readASN1Length(data, index2);
    index2 = indexAfterOIDLength;
    const lastIndex = index2 + OIDLength;
    const byte1 = data[index2++];
    let oid = (byte1 / 40 >> 0) + "." + byte1 % 40;
    while (index2 < lastIndex) {
      let value = 0;
      while (index2 < lastIndex) {
        const nextByte = data[index2++];
        value = value << 7 | nextByte & 127;
        if (nextByte < 128)
          break;
      }
      oid += "." + value;
    }
    return { oid, index: index2 };
  }
  function expectASN1Seq(data, index2) {
    if (data[index2++] !== 48)
      throw x509Error("non-sequence data", data);
    return readASN1Length(data, index2);
  }
  function signatureAlgorithmHashFromCertificate(data, index2) {
    if (index2 === undefined)
      index2 = 0;
    index2 = expectASN1Seq(data, index2).index;
    const { length: certInfoLength, index: indexAfterCertInfoLength } = expectASN1Seq(data, index2);
    index2 = indexAfterCertInfoLength + certInfoLength;
    index2 = expectASN1Seq(data, index2).index;
    const { oid, index: indexAfterOID } = readASN1OID(data, index2);
    switch (oid) {
      case "1.2.840.113549.1.1.4":
        return "MD5";
      case "1.2.840.113549.1.1.5":
        return "SHA-1";
      case "1.2.840.113549.1.1.11":
        return "SHA-256";
      case "1.2.840.113549.1.1.12":
        return "SHA-384";
      case "1.2.840.113549.1.1.13":
        return "SHA-512";
      case "1.2.840.113549.1.1.14":
        return "SHA-224";
      case "1.2.840.113549.1.1.15":
        return "SHA512-224";
      case "1.2.840.113549.1.1.16":
        return "SHA512-256";
      case "1.2.840.10045.4.1":
        return "SHA-1";
      case "1.2.840.10045.4.3.1":
        return "SHA-224";
      case "1.2.840.10045.4.3.2":
        return "SHA-256";
      case "1.2.840.10045.4.3.3":
        return "SHA-384";
      case "1.2.840.10045.4.3.4":
        return "SHA-512";
      case "1.2.840.113549.1.1.10": {
        index2 = indexAfterOID;
        index2 = expectASN1Seq(data, index2).index;
        if (data[index2++] !== 160)
          throw x509Error("non-tag data", data);
        index2 = readASN1Length(data, index2).index;
        index2 = expectASN1Seq(data, index2).index;
        const { oid: hashOID } = readASN1OID(data, index2);
        switch (hashOID) {
          case "1.2.840.113549.2.5":
            return "MD5";
          case "1.3.14.3.2.26":
            return "SHA-1";
          case "2.16.840.1.101.3.4.2.1":
            return "SHA-256";
          case "2.16.840.1.101.3.4.2.2":
            return "SHA-384";
          case "2.16.840.1.101.3.4.2.3":
            return "SHA-512";
        }
        throw x509Error("unknown hash OID " + hashOID, data);
      }
      case "1.3.101.110":
      case "1.3.101.112":
        return "SHA-512";
      case "1.3.101.111":
      case "1.3.101.113":
        throw x509Error("Ed448 certificate channel binding is not currently supported by Postgres");
    }
    throw x509Error("unknown OID " + oid, data);
  }
  module.exports = { signatureAlgorithmHashFromCertificate };
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/crypto/sasl.js
var require_sasl = __commonJS((exports, module) => {
  var crypto2 = require_utils12();
  var { signatureAlgorithmHashFromCertificate } = require_cert_signatures();
  function saslprep(password) {
    const nonAsciiSpace = /[\u00A0\u1680\u2000-\u200B\u202F\u205F\u3000]/g;
    const mappedToNothing = /[\u00AD\u034F\u1806\u180B\u180C\u180D\u200C\u200D\u2060\uFE00-\uFE0F\uFEFF]/g;
    return password.replace(nonAsciiSpace, " ").replace(mappedToNothing, "").normalize("NFKC");
  }
  var DEFAULT_MAX_SCRAM_ITERATIONS = 1e5;
  function startSession2(mechanisms, stream, scramMaxIterations = DEFAULT_MAX_SCRAM_ITERATIONS) {
    const candidates = ["SCRAM-SHA-256"];
    if (stream)
      candidates.unshift("SCRAM-SHA-256-PLUS");
    const mechanism = candidates.find((candidate) => mechanisms.includes(candidate));
    if (!mechanism) {
      throw new Error("SASL: Only mechanism(s) " + candidates.join(" and ") + " are supported");
    }
    if (mechanism === "SCRAM-SHA-256-PLUS" && typeof stream.getPeerCertificate !== "function") {
      throw new Error("SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate");
    }
    const clientNonce = crypto2.randomBytes(18).toString("base64");
    const gs2Header = mechanism === "SCRAM-SHA-256-PLUS" ? "p=tls-server-end-point" : stream ? "y" : "n";
    return {
      mechanism,
      clientNonce,
      response: gs2Header + ",,n=*,r=" + clientNonce,
      message: "SASLInitialResponse",
      scramMaxIterations
    };
  }
  async function continueSession(session2, password, serverData, stream) {
    if (session2.message !== "SASLInitialResponse") {
      throw new Error("SASL: Last message was not SASLInitialResponse");
    }
    if (typeof password !== "string") {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");
    }
    if (password === "") {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");
    }
    if (typeof serverData !== "string") {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");
    }
    const sv = parseServerFirstMessage(serverData);
    if (!sv.nonce.startsWith(session2.clientNonce)) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce");
    } else if (sv.nonce.length === session2.clientNonce.length) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");
    }
    const scramMaxIterations = typeof session2.scramMaxIterations === "number" ? session2.scramMaxIterations : DEFAULT_MAX_SCRAM_ITERATIONS;
    if (scramMaxIterations !== 0 && sv.iteration > scramMaxIterations) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration count " + sv.iteration + " exceeds scramMaxIterations of " + scramMaxIterations);
    }
    const clientFirstMessageBare = "n=*,r=" + session2.clientNonce;
    const serverFirstMessage = "r=" + sv.nonce + ",s=" + sv.salt + ",i=" + sv.iteration;
    let channelBinding = stream ? "eSws" : "biws";
    if (session2.mechanism === "SCRAM-SHA-256-PLUS") {
      const peerCert = stream.getPeerCertificate().raw;
      let hashName = signatureAlgorithmHashFromCertificate(peerCert);
      if (hashName === "MD5" || hashName === "SHA-1")
        hashName = "SHA-256";
      const certHash = await crypto2.hashByName(hashName, peerCert);
      const bindingData = Buffer.concat([Buffer.from("p=tls-server-end-point,,"), Buffer.from(certHash)]);
      channelBinding = bindingData.toString("base64");
    }
    const clientFinalMessageWithoutProof = "c=" + channelBinding + ",r=" + sv.nonce;
    const authMessage = clientFirstMessageBare + "," + serverFirstMessage + "," + clientFinalMessageWithoutProof;
    const saltBytes = Buffer.from(sv.salt, "base64");
    const saltedPassword = await crypto2.deriveKey(saslprep(password), saltBytes, sv.iteration);
    const clientKey = await crypto2.hmacSha256(saltedPassword, "Client Key");
    const storedKey = await crypto2.sha256(clientKey);
    const clientSignature = await crypto2.hmacSha256(storedKey, authMessage);
    const clientProof = xorBuffers(Buffer.from(clientKey), Buffer.from(clientSignature)).toString("base64");
    const serverKey = await crypto2.hmacSha256(saltedPassword, "Server Key");
    const serverSignatureBytes = await crypto2.hmacSha256(serverKey, authMessage);
    session2.message = "SASLResponse";
    session2.serverSignature = Buffer.from(serverSignatureBytes).toString("base64");
    session2.response = clientFinalMessageWithoutProof + ",p=" + clientProof;
  }
  function finalizeSession(session2, serverData) {
    if (session2.message !== "SASLResponse") {
      throw new Error("SASL: Last message was not SASLResponse");
    }
    if (typeof serverData !== "string") {
      throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string");
    }
    const { serverSignature } = parseServerFinalMessage(serverData);
    if (serverSignature !== session2.serverSignature) {
      throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match");
    }
  }
  function isPrintableChars(text2) {
    if (typeof text2 !== "string") {
      throw new TypeError("SASL: text must be a string");
    }
    return text2.split("").map((_, i) => text2.charCodeAt(i)).every((c) => c >= 33 && c <= 43 || c >= 45 && c <= 126);
  }
  function isBase64(text2) {
    return /^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(text2);
  }
  function parseAttributePairs(text2) {
    if (typeof text2 !== "string") {
      throw new TypeError("SASL: attribute pairs text must be a string");
    }
    return new Map(text2.split(",").map((attrValue) => {
      if (!/^.=/.test(attrValue)) {
        throw new Error("SASL: Invalid attribute pair entry");
      }
      const name = attrValue[0];
      const value = attrValue.substring(2);
      return [name, value];
    }));
  }
  function parseServerFirstMessage(data) {
    const attrPairs = parseAttributePairs(data);
    const nonce = attrPairs.get("r");
    if (!nonce) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing");
    } else if (!isPrintableChars(nonce)) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters");
    }
    const salt = attrPairs.get("s");
    if (!salt) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing");
    } else if (!isBase64(salt)) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64");
    }
    const iterationText = attrPairs.get("i");
    if (!iterationText) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing");
    } else if (!/^[1-9][0-9]*$/.test(iterationText)) {
      throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count");
    }
    const iteration = parseInt(iterationText, 10);
    return {
      nonce,
      salt,
      iteration
    };
  }
  function parseServerFinalMessage(serverData) {
    const attrPairs = parseAttributePairs(serverData);
    const error2 = attrPairs.get("e");
    const serverSignature = attrPairs.get("v");
    if (error2) {
      throw new Error(`SASL: SCRAM-SERVER-FINAL-MESSAGE: server returned error: "${error2}"`);
    }
    if (!serverSignature) {
      throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");
    } else if (!isBase64(serverSignature)) {
      throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64");
    }
    return {
      serverSignature
    };
  }
  function xorBuffers(a, b) {
    if (!Buffer.isBuffer(a)) {
      throw new TypeError("first argument must be a Buffer");
    }
    if (!Buffer.isBuffer(b)) {
      throw new TypeError("second argument must be a Buffer");
    }
    if (a.length !== b.length) {
      throw new Error("Buffer lengths must match");
    }
    if (a.length === 0) {
      throw new Error("Buffers cannot be empty");
    }
    return Buffer.from(a.map((_, i) => a[i] ^ b[i]));
  }
  module.exports = {
    startSession: startSession2,
    continueSession,
    finalizeSession,
    DEFAULT_MAX_SCRAM_ITERATIONS
  };
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/type-overrides.js
var require_type_overrides = __commonJS((exports, module) => {
  var types2 = require_pg_types();
  function TypeOverrides(userTypes) {
    this._types = userTypes || types2;
    this.text = {};
    this.binary = {};
  }
  TypeOverrides.prototype.getOverrides = function(format) {
    switch (format) {
      case "text":
        return this.text;
      case "binary":
        return this.binary;
      default:
        return {};
    }
  };
  TypeOverrides.prototype.setTypeParser = function(oid, format, parseFn) {
    if (typeof format === "function") {
      parseFn = format;
      format = "text";
    }
    this.getOverrides(format)[oid] = parseFn;
  };
  TypeOverrides.prototype.getTypeParser = function(oid, format) {
    format = format || "text";
    return this.getOverrides(format)[oid] || this._types.getTypeParser(oid, format);
  };
  module.exports = TypeOverrides;
});

// ../../node_modules/.pnpm/pg-connection-string@2.14.0/node_modules/pg-connection-string/index.js
var require_pg_connection_string = __commonJS((exports, module) => {
  function parse(str, options = {}) {
    if (str.charAt(0) === "/") {
      const config2 = str.split(" ");
      return { host: config2[0], database: config2[1] };
    }
    const config = Object.create(null);
    let result;
    let dummyHost = false;
    if (/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(str)) {
      str = encodeURI(str).replace(/%25(\d\d)/g, "%$1");
    }
    try {
      try {
        result = new URL(str, "postgres://base");
      } catch (e) {
        result = new URL(str.replace("@/", "@___DUMMY___/"), "postgres://base");
        dummyHost = true;
      }
    } catch (err) {
      err.input && (err.input = "*****REDACTED*****");
      throw err;
    }
    for (const entry of result.searchParams.entries()) {
      config[entry[0]] = entry[1];
    }
    config.user = config.user || decodeURIComponent(result.username);
    config.password = config.password || decodeURIComponent(result.password);
    if (result.protocol == "socket:") {
      config.host = decodeURI(result.pathname);
      config.database = result.searchParams.get("db");
      config.client_encoding = result.searchParams.get("encoding");
      return config;
    }
    const hostname2 = dummyHost ? "" : result.hostname;
    if (!config.host) {
      config.host = decodeURIComponent(hostname2);
    } else if (hostname2 && /^%2f/i.test(hostname2)) {
      result.pathname = hostname2 + result.pathname;
    }
    if (!config.port) {
      config.port = result.port;
    }
    const pathname = result.pathname.slice(1) || null;
    config.database = pathname ? decodeURI(pathname) : null;
    if (config.ssl === "true" || config.ssl === "1") {
      config.ssl = true;
    }
    if (config.ssl === "0") {
      config.ssl = false;
    }
    if (config.sslcert || config.sslkey || config.sslrootcert || config.sslmode) {
      config.ssl = {};
    }
    if (config.sslnegotiation === "direct" && config.ssl === undefined) {
      config.ssl = true;
    }
    const fs2 = config.sslcert || config.sslkey || config.sslrootcert ? __require("fs") : null;
    if (config.sslcert) {
      config.ssl.cert = fs2.readFileSync(config.sslcert).toString();
    }
    if (config.sslkey) {
      config.ssl.key = fs2.readFileSync(config.sslkey).toString();
    }
    if (config.sslrootcert) {
      config.ssl.ca = fs2.readFileSync(config.sslrootcert).toString();
    }
    if (options.useLibpqCompat && config.uselibpqcompat) {
      throw new Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");
    }
    if (config.uselibpqcompat === "true" || options.useLibpqCompat) {
      switch (config.sslmode) {
        case "disable": {
          config.ssl = false;
          break;
        }
        case "prefer": {
          config.ssl.rejectUnauthorized = false;
          break;
        }
        case "require": {
          if (config.sslrootcert) {
            config.ssl.checkServerIdentity = function() {};
          } else {
            config.ssl.rejectUnauthorized = false;
          }
          break;
        }
        case "verify-ca": {
          if (!config.ssl.ca) {
            throw new Error("SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security.");
          }
          config.ssl.checkServerIdentity = function() {};
          break;
        }
        case "verify-full": {
          break;
        }
      }
    } else {
      switch (config.sslmode) {
        case "disable": {
          config.ssl = false;
          break;
        }
        case "prefer":
        case "require":
        case "verify-ca":
        case "verify-full": {
          if (config.sslmode !== "verify-full") {
            deprecatedSslModeWarning(config.sslmode);
          }
          break;
        }
        case "no-verify": {
          config.ssl.rejectUnauthorized = false;
          break;
        }
      }
    }
    return config;
  }
  function toConnectionOptions(sslConfig) {
    const connectionOptions = Object.entries(sslConfig).reduce((c, [key, value]) => {
      if (value !== undefined && value !== null) {
        c[key] = value;
      }
      return c;
    }, Object.create(null));
    return connectionOptions;
  }
  function toClientConfig(config) {
    const poolConfig = Object.entries(config).reduce((c, [key, value]) => {
      if (key === "ssl") {
        const sslConfig = value;
        if (typeof sslConfig === "boolean") {
          c[key] = sslConfig;
        }
        if (typeof sslConfig === "object") {
          c[key] = toConnectionOptions(sslConfig);
        }
      } else if (value !== undefined && value !== null) {
        if (key === "port") {
          if (value !== "") {
            const v = parseInt(value, 10);
            if (isNaN(v)) {
              throw new Error(`Invalid ${key}: ${value}`);
            }
            c[key] = v;
          }
        } else {
          c[key] = value;
        }
      }
      return c;
    }, Object.create(null));
    return poolConfig;
  }
  function parseIntoClientConfig(str) {
    return toClientConfig(parse(str));
  }
  function deprecatedSslModeWarning(sslmode) {
    if (!deprecatedSslModeWarning.warned && typeof process !== "undefined" && process.emitWarning) {
      deprecatedSslModeWarning.warned = true;
      process.emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
In the next major version (pg-connection-string v3.0.0 and pg v9.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees.

To prepare for this change:
- If you want the current behavior, explicitly use 'sslmode=verify-full'
- If you want libpq compatibility now, use 'uselibpqcompat=true&sslmode=${sslmode}'

See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`);
    }
  }
  module.exports = parse;
  parse.parse = parse;
  parse.toClientConfig = toClientConfig;
  parse.parseIntoClientConfig = parseIntoClientConfig;
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/connection-parameters.js
var require_connection_parameters = __commonJS((exports, module) => {
  var dns = __require("dns");
  var defaults = require_defaults();
  var parse = require_pg_connection_string().parse;
  var val = function(key, config, envVar) {
    if (config[key]) {
      return config[key];
    }
    if (envVar === undefined) {
      envVar = process.env["PG" + key.toUpperCase()];
    } else if (envVar === false) {} else {
      envVar = process.env[envVar];
    }
    return envVar || defaults[key];
  };
  var readSSLConfigFromEnvironment = function() {
    switch (process.env.PGSSLMODE) {
      case "disable":
        return false;
      case "prefer":
      case "require":
      case "verify-ca":
      case "verify-full":
        return true;
      case "no-verify":
        return { rejectUnauthorized: false };
    }
    return defaults.ssl;
  };
  var quoteParamValue = function(value) {
    return "'" + ("" + value).replace(/\\/g, "\\\\").replace(/'/g, "\\'") + "'";
  };
  var add = function(params, config, paramName) {
    const value = config[paramName];
    if (value !== undefined && value !== null) {
      params.push(paramName + "=" + quoteParamValue(value));
    }
  };

  class ConnectionParameters {
    constructor(config) {
      config = typeof config === "string" ? parse(config) : config || {};
      if (config.connectionString) {
        config = Object.assign({}, config, parse(config.connectionString));
      }
      this.user = val("user", config);
      this.database = val("database", config);
      if (this.database === undefined) {
        this.database = this.user;
      }
      this.port = parseInt(val("port", config), 10);
      this.host = val("host", config);
      Object.defineProperty(this, "password", {
        configurable: true,
        enumerable: false,
        writable: true,
        value: val("password", config)
      });
      this.binary = val("binary", config);
      this.options = val("options", config);
      this.ssl = typeof config.ssl === "undefined" ? readSSLConfigFromEnvironment() : config.ssl;
      if (typeof this.ssl === "string") {
        if (this.ssl === "true") {
          this.ssl = true;
        }
      }
      if (this.ssl === "no-verify") {
        this.ssl = { rejectUnauthorized: false };
      }
      if (this.ssl && this.ssl.key) {
        Object.defineProperty(this.ssl, "key", {
          enumerable: false
        });
      }
      this.sslnegotiation = val("sslnegotiation", config, "PGSSLNEGOTIATION");
      if (this.sslnegotiation !== undefined && this.sslnegotiation !== "postgres" && this.sslnegotiation !== "direct") {
        throw new Error(`Invalid sslnegotiation value: "${this.sslnegotiation}". Valid values are "postgres" and "direct".`);
      }
      if (this.sslnegotiation === "direct" && !this.ssl) {
        throw new Error("sslnegotiation=direct requires SSL to be enabled");
      }
      this.client_encoding = val("client_encoding", config);
      this.replication = val("replication", config);
      this.isDomainSocket = !(this.host || "").indexOf("/");
      this.application_name = val("application_name", config, "PGAPPNAME");
      this.fallback_application_name = val("fallback_application_name", config, false);
      this.statement_timeout = val("statement_timeout", config, false);
      this.lock_timeout = val("lock_timeout", config, false);
      this.idle_in_transaction_session_timeout = val("idle_in_transaction_session_timeout", config, false);
      this.query_timeout = val("query_timeout", config, false);
      if (config.connectionTimeoutMillis === undefined) {
        this.connect_timeout = process.env.PGCONNECT_TIMEOUT || 0;
      } else {
        this.connect_timeout = Math.floor(config.connectionTimeoutMillis / 1000);
      }
      if (config.keepAlive === false) {
        this.keepalives = 0;
      } else if (config.keepAlive === true) {
        this.keepalives = 1;
      }
      if (typeof config.keepAliveInitialDelayMillis === "number") {
        this.keepalives_idle = Math.floor(config.keepAliveInitialDelayMillis / 1000);
      }
    }
    getLibpqConnectionString(cb) {
      const params = [];
      add(params, this, "user");
      add(params, this, "password");
      add(params, this, "port");
      add(params, this, "application_name");
      add(params, this, "fallback_application_name");
      add(params, this, "connect_timeout");
      add(params, this, "options");
      const ssl = typeof this.ssl === "object" ? this.ssl : this.ssl ? { sslmode: this.ssl } : {};
      add(params, ssl, "sslmode");
      add(params, ssl, "sslca");
      add(params, ssl, "sslkey");
      add(params, ssl, "sslcert");
      add(params, ssl, "sslrootcert");
      add(params, this, "sslnegotiation");
      if (this.database) {
        params.push("dbname=" + quoteParamValue(this.database));
      }
      if (this.replication) {
        params.push("replication=" + quoteParamValue(this.replication));
      }
      if (this.host) {
        params.push("host=" + quoteParamValue(this.host));
      }
      if (this.isDomainSocket) {
        return cb(null, params.join(" "));
      }
      if (this.client_encoding) {
        params.push("client_encoding=" + quoteParamValue(this.client_encoding));
      }
      dns.lookup(this.host, function(err, address) {
        if (err)
          return cb(err, null);
        params.push("hostaddr=" + quoteParamValue(address));
        return cb(null, params.join(" "));
      });
    }
  }
  module.exports = ConnectionParameters;
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/result.js
var require_result = __commonJS((exports, module) => {
  var types2 = require_pg_types();
  var matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/;

  class Result {
    constructor(rowMode, types3) {
      this.command = null;
      this.rowCount = null;
      this.oid = null;
      this.rows = [];
      this.fields = [];
      this._parsers = undefined;
      this._types = types3;
      this.RowCtor = null;
      this.rowAsArray = rowMode === "array";
      if (this.rowAsArray) {
        this.parseRow = this._parseRowAsArray;
      }
      this._prebuiltEmptyResultObject = null;
    }
    addCommandComplete(msg) {
      let match;
      if (msg.text) {
        match = matchRegexp.exec(msg.text);
      } else {
        match = matchRegexp.exec(msg.command);
      }
      if (match) {
        this.command = match[1];
        if (match[3]) {
          this.oid = parseInt(match[2], 10);
          this.rowCount = parseInt(match[3], 10);
        } else if (match[2]) {
          this.rowCount = parseInt(match[2], 10);
        }
      }
    }
    _parseRowAsArray(rowData) {
      const row = new Array(rowData.length);
      for (let i = 0, len = rowData.length;i < len; i++) {
        const rawValue = rowData[i];
        if (rawValue !== null) {
          row[i] = this._parsers[i](rawValue);
        } else {
          row[i] = null;
        }
      }
      return row;
    }
    parseRow(rowData) {
      const row = { ...this._prebuiltEmptyResultObject };
      for (let i = 0, len = rowData.length;i < len; i++) {
        const rawValue = rowData[i];
        const field = this.fields[i].name;
        if (rawValue !== null) {
          const v = this.fields[i].format === "binary" ? Buffer.from(rawValue) : rawValue;
          row[field] = this._parsers[i](v);
        } else {
          row[field] = null;
        }
      }
      return row;
    }
    addRow(row) {
      this.rows.push(row);
    }
    addFields(fieldDescriptions) {
      this.fields = fieldDescriptions;
      if (this.fields.length) {
        this._parsers = new Array(fieldDescriptions.length);
      }
      const row = Object.create(null);
      for (let i = 0;i < fieldDescriptions.length; i++) {
        const desc2 = fieldDescriptions[i];
        row[desc2.name] = null;
        if (this._types) {
          this._parsers[i] = this._types.getTypeParser(desc2.dataTypeID, desc2.format || "text");
        } else {
          this._parsers[i] = types2.getTypeParser(desc2.dataTypeID, desc2.format || "text");
        }
      }
      this._prebuiltEmptyResultObject = { ...row };
    }
  }
  module.exports = Result;
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/query.js
var require_query = __commonJS((exports, module) => {
  var { EventEmitter } = __require("events");
  var Result = require_result();
  var utils = require_utils11();

  class Query extends EventEmitter {
    constructor(config, values, callback) {
      super();
      config = utils.normalizeQueryConfig(config, values, callback);
      this.text = config.text;
      this.values = config.values;
      this.rows = config.rows;
      this.types = config.types;
      this.name = config.name;
      this.queryMode = config.queryMode;
      this.binary = config.binary;
      this.portal = config.portal || "";
      this.callback = config.callback;
      this._rowMode = config.rowMode;
      if (process.domain && config.callback) {
        this.callback = process.domain.bind(config.callback);
      }
      this._result = new Result(this._rowMode, this.types);
      this._results = this._result;
      this._canceledDueToError = false;
    }
    requiresPreparation() {
      if (this.queryMode === "extended") {
        return true;
      }
      if (this.name) {
        return true;
      }
      if (this.rows) {
        return true;
      }
      if (!this.text) {
        return false;
      }
      if (!this.values) {
        return false;
      }
      return this.values.length > 0;
    }
    _checkForMultirow() {
      if (this._result.command) {
        if (!Array.isArray(this._results)) {
          this._results = [this._result];
        }
        this._result = new Result(this._rowMode, this._result._types);
        this._results.push(this._result);
      }
    }
    handleRowDescription(msg) {
      this._checkForMultirow();
      this._result.addFields(msg.fields);
      this._accumulateRows = this.callback || !this.listeners("row").length;
    }
    handleDataRow(msg) {
      let row;
      if (this._canceledDueToError) {
        return;
      }
      try {
        row = this._result.parseRow(msg.fields);
      } catch (err) {
        this._canceledDueToError = err;
        return;
      }
      this.emit("row", row, this._result);
      if (this._accumulateRows) {
        this._result.addRow(row);
      }
    }
    handleCommandComplete(msg, connection) {
      this._checkForMultirow();
      this._result.addCommandComplete(msg);
      if (this.rows) {
        connection.sync();
      }
    }
    handleEmptyQuery(connection) {
      if (this.rows) {
        connection.sync();
      }
    }
    handleError(err, connection) {
      if (this._canceledDueToError) {
        err = this._canceledDueToError;
        this._canceledDueToError = false;
      }
      if (this.callback) {
        return this.callback(err);
      }
      this.emit("error", err);
    }
    handleReadyForQuery(con) {
      if (this._canceledDueToError) {
        return this.handleError(this._canceledDueToError, con);
      }
      if (this.callback) {
        try {
          this.callback(null, this._results);
        } catch (err) {
          process.nextTick(() => {
            throw err;
          });
        }
      }
      this.emit("end", this._results);
    }
    submit(connection) {
      if (typeof this.text !== "string" && typeof this.name !== "string") {
        return new Error("A query must have either text or a name. Supplying neither is unsupported.");
      }
      const previous = connection.parsedStatements[this.name];
      if (this.text && previous && this.text !== previous) {
        return new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);
      }
      if (this.values && !Array.isArray(this.values)) {
        return new Error("Query values must be an array");
      }
      if (this.requiresPreparation()) {
        connection.stream.cork && connection.stream.cork();
        try {
          this.prepare(connection);
        } finally {
          connection.stream.uncork && connection.stream.uncork();
        }
      } else {
        connection.query(this.text);
      }
      return null;
    }
    hasBeenParsed(connection) {
      return this.name && connection.parsedStatements[this.name];
    }
    handlePortalSuspended(connection) {
      this._getRows(connection, this.rows);
    }
    _getRows(connection, rows) {
      connection.execute({
        portal: this.portal,
        rows
      });
      if (!rows) {
        connection.sync();
      } else {
        connection.flush();
      }
    }
    prepare(connection) {
      if (!this.hasBeenParsed(connection)) {
        connection.parse({
          text: this.text,
          name: this.name,
          types: this.types
        });
      }
      try {
        connection.bind({
          portal: this.portal,
          statement: this.name,
          values: this.values,
          binary: this.binary,
          valueMapper: utils.prepareValue
        });
      } catch (err) {
        connection.close({ type: "S", name: this.name });
        connection.sync();
        this.handleError(err, connection);
        return;
      }
      connection.describe({
        type: "P",
        name: this.portal || ""
      });
      this._getRows(connection, this.rows);
    }
    handleCopyInResponse(connection) {
      connection.sendCopyFail("No source stream defined");
    }
    handleCopyData(msg, connection) {}
  }
  module.exports = Query;
});

// ../../node_modules/.pnpm/pg-protocol@1.15.0/node_modules/pg-protocol/dist/messages.js
var require_messages = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NoticeMessage = exports.DataRowMessage = exports.CommandCompleteMessage = exports.ReadyForQueryMessage = exports.NotificationResponseMessage = exports.BackendKeyDataMessage = exports.AuthenticationMD5Password = exports.ParameterStatusMessage = exports.ParameterDescriptionMessage = exports.RowDescriptionMessage = exports.Field = exports.CopyResponse = exports.CopyDataMessage = exports.DatabaseError = exports.copyDone = exports.emptyQuery = exports.replicationStart = exports.portalSuspended = exports.noData = exports.closeComplete = exports.bindComplete = exports.parseComplete = undefined;
  exports.parseComplete = {
    name: "parseComplete",
    length: 5
  };
  exports.bindComplete = {
    name: "bindComplete",
    length: 5
  };
  exports.closeComplete = {
    name: "closeComplete",
    length: 5
  };
  exports.noData = {
    name: "noData",
    length: 5
  };
  exports.portalSuspended = {
    name: "portalSuspended",
    length: 5
  };
  exports.replicationStart = {
    name: "replicationStart",
    length: 4
  };
  exports.emptyQuery = {
    name: "emptyQuery",
    length: 4
  };
  exports.copyDone = {
    name: "copyDone",
    length: 4
  };

  class DatabaseError extends Error {
    constructor(message, length, name) {
      super(message);
      this.length = length;
      this.name = name;
    }
  }
  exports.DatabaseError = DatabaseError;

  class CopyDataMessage {
    constructor(length, chunk) {
      this.length = length;
      this.chunk = chunk;
      this.name = "copyData";
    }
  }
  exports.CopyDataMessage = CopyDataMessage;

  class CopyResponse {
    constructor(length, name, binary, columnCount) {
      this.length = length;
      this.name = name;
      this.binary = binary;
      this.columnTypes = new Array(columnCount);
    }
  }
  exports.CopyResponse = CopyResponse;

  class Field {
    constructor(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, format) {
      this.name = name;
      this.tableID = tableID;
      this.columnID = columnID;
      this.dataTypeID = dataTypeID;
      this.dataTypeSize = dataTypeSize;
      this.dataTypeModifier = dataTypeModifier;
      this.format = format;
    }
  }
  exports.Field = Field;

  class RowDescriptionMessage {
    constructor(length, fieldCount) {
      this.length = length;
      this.fieldCount = fieldCount;
      this.name = "rowDescription";
      this.fields = new Array(this.fieldCount);
    }
  }
  exports.RowDescriptionMessage = RowDescriptionMessage;

  class ParameterDescriptionMessage {
    constructor(length, parameterCount) {
      this.length = length;
      this.parameterCount = parameterCount;
      this.name = "parameterDescription";
      this.dataTypeIDs = new Array(this.parameterCount);
    }
  }
  exports.ParameterDescriptionMessage = ParameterDescriptionMessage;

  class ParameterStatusMessage {
    constructor(length, parameterName, parameterValue) {
      this.length = length;
      this.parameterName = parameterName;
      this.parameterValue = parameterValue;
      this.name = "parameterStatus";
    }
  }
  exports.ParameterStatusMessage = ParameterStatusMessage;

  class AuthenticationMD5Password {
    constructor(length, salt) {
      this.length = length;
      this.salt = salt;
      this.name = "authenticationMD5Password";
    }
  }
  exports.AuthenticationMD5Password = AuthenticationMD5Password;

  class BackendKeyDataMessage {
    constructor(length, processID, secretKey) {
      this.length = length;
      this.processID = processID;
      this.secretKey = secretKey;
      this.name = "backendKeyData";
    }
  }
  exports.BackendKeyDataMessage = BackendKeyDataMessage;

  class NotificationResponseMessage {
    constructor(length, processId, channel3, payload) {
      this.length = length;
      this.processId = processId;
      this.channel = channel3;
      this.payload = payload;
      this.name = "notification";
    }
  }
  exports.NotificationResponseMessage = NotificationResponseMessage;

  class ReadyForQueryMessage {
    constructor(length, status) {
      this.length = length;
      this.status = status;
      this.name = "readyForQuery";
    }
  }
  exports.ReadyForQueryMessage = ReadyForQueryMessage;

  class CommandCompleteMessage {
    constructor(length, text2) {
      this.length = length;
      this.text = text2;
      this.name = "commandComplete";
    }
  }
  exports.CommandCompleteMessage = CommandCompleteMessage;

  class DataRowMessage {
    constructor(length, fields) {
      this.length = length;
      this.fields = fields;
      this.name = "dataRow";
      this.fieldCount = fields.length;
    }
  }
  exports.DataRowMessage = DataRowMessage;

  class NoticeMessage {
    constructor(length, message) {
      this.length = length;
      this.message = message;
      this.name = "notice";
    }
  }
  exports.NoticeMessage = NoticeMessage;
});

// ../../node_modules/.pnpm/pg-protocol@1.15.0/node_modules/pg-protocol/dist/buffer-writer.js
var require_buffer_writer = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Writer = undefined;

  class Writer {
    constructor(size = 256) {
      this.size = size;
      this.offset = 5;
      this.headerPosition = 0;
      this.buffer = Buffer.allocUnsafe(size);
    }
    ensure(size) {
      const remaining = this.buffer.length - this.offset;
      if (remaining < size) {
        const oldBuffer = this.buffer;
        const newSize = oldBuffer.length + (oldBuffer.length >> 1) + size;
        this.buffer = Buffer.allocUnsafe(newSize);
        oldBuffer.copy(this.buffer);
      }
    }
    addInt32(num) {
      this.ensure(4);
      this.buffer[this.offset++] = num >>> 24 & 255;
      this.buffer[this.offset++] = num >>> 16 & 255;
      this.buffer[this.offset++] = num >>> 8 & 255;
      this.buffer[this.offset++] = num >>> 0 & 255;
      return this;
    }
    addInt16(num) {
      this.ensure(2);
      this.buffer[this.offset++] = num >>> 8 & 255;
      this.buffer[this.offset++] = num >>> 0 & 255;
      return this;
    }
    addCString(string) {
      if (!string) {
        this.ensure(1);
      } else {
        const len = Buffer.byteLength(string);
        this.ensure(len + 1);
        this.buffer.write(string, this.offset, "utf-8");
        this.offset += len;
      }
      this.buffer[this.offset++] = 0;
      return this;
    }
    addString(string = "") {
      const len = Buffer.byteLength(string);
      this.ensure(len);
      this.buffer.write(string, this.offset);
      this.offset += len;
      return this;
    }
    addInt32PrefixedString(string) {
      const len = Buffer.byteLength(string);
      this.ensure(4 + len);
      const buffer = this.buffer;
      let offset = this.offset;
      buffer[offset++] = len >>> 24 & 255;
      buffer[offset++] = len >>> 16 & 255;
      buffer[offset++] = len >>> 8 & 255;
      buffer[offset++] = len >>> 0 & 255;
      buffer.write(string, offset, "utf-8");
      this.offset = offset + len;
      return this;
    }
    add(otherBuffer) {
      this.ensure(otherBuffer.length);
      otherBuffer.copy(this.buffer, this.offset);
      this.offset += otherBuffer.length;
      return this;
    }
    join(code) {
      if (code) {
        this.buffer[this.headerPosition] = code;
        const length = this.offset - (this.headerPosition + 1);
        this.buffer.writeInt32BE(length, this.headerPosition + 1);
      }
      return this.buffer.slice(code ? 0 : 5, this.offset);
    }
    flush(code) {
      const result = this.join(code);
      this.offset = 5;
      this.headerPosition = 0;
      this.buffer = Buffer.allocUnsafe(this.size);
      return result;
    }
    clear() {
      this.offset = 5;
      this.headerPosition = 0;
    }
  }
  exports.Writer = Writer;
});

// ../../node_modules/.pnpm/pg-protocol@1.15.0/node_modules/pg-protocol/dist/serializer.js
var require_serializer = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.serialize = undefined;
  var buffer_writer_1 = require_buffer_writer();
  var writer = new buffer_writer_1.Writer;
  var startup = (opts) => {
    writer.addInt16(3).addInt16(0);
    for (const key of Object.keys(opts)) {
      writer.addCString(key).addCString(opts[key]);
    }
    writer.addCString("client_encoding").addCString("UTF8");
    const bodyBuffer = writer.addCString("").flush();
    const length = bodyBuffer.length + 4;
    return new buffer_writer_1.Writer().addInt32(length).add(bodyBuffer).flush();
  };
  var requestSsl = () => {
    const response = Buffer.allocUnsafe(8);
    response.writeInt32BE(8, 0);
    response.writeInt32BE(80877103, 4);
    return response;
  };
  var password = (password2) => {
    return writer.addCString(password2).flush(112);
  };
  var sendSASLInitialResponseMessage = function(mechanism, initialResponse) {
    writer.addCString(mechanism).addInt32PrefixedString(initialResponse);
    return writer.flush(112);
  };
  var sendSCRAMClientFinalMessage = function(additionalData) {
    return writer.addString(additionalData).flush(112);
  };
  var query = (text2) => {
    return writer.addCString(text2).flush(81);
  };
  var emptyArray = [];
  var parse = (query2) => {
    const name = query2.name || "";
    if (name.length > 63) {
      console.error("Warning! Postgres only supports 63 characters for query names.");
      console.error("You supplied %s (%s)", name, name.length);
      console.error("This can cause conflicts and silent errors executing queries");
    }
    const types2 = query2.types || emptyArray;
    const len = types2.length;
    const buffer = writer.addCString(name).addCString(query2.text).addInt16(len);
    for (let i = 0;i < len; i++) {
      buffer.addInt32(types2[i]);
    }
    return writer.flush(80);
  };
  var paramWriter = new buffer_writer_1.Writer;
  var writeValues = function(values, valueMapper) {
    for (let i = 0;i < values.length; i++) {
      const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i];
      if (mappedVal == null) {
        writer.addInt16(0);
        paramWriter.addInt32(-1);
      } else if (mappedVal instanceof Buffer) {
        writer.addInt16(1);
        paramWriter.addInt32(mappedVal.length);
        paramWriter.add(mappedVal);
      } else {
        writer.addInt16(0);
        paramWriter.addInt32PrefixedString(mappedVal);
      }
    }
  };
  var bind = (config = {}) => {
    const portal = config.portal || "";
    const statement2 = config.statement || "";
    const binary = config.binary || false;
    const values = config.values || emptyArray;
    const len = values.length;
    writer.addCString(portal).addCString(statement2);
    writer.addInt16(len);
    try {
      writeValues(values, config.valueMapper);
    } catch (err) {
      writer.clear();
      paramWriter.clear();
      throw err;
    }
    writer.addInt16(len);
    writer.add(paramWriter.flush());
    writer.addInt16(1);
    writer.addInt16(binary ? 1 : 0);
    return writer.flush(66);
  };
  var emptyExecute = Buffer.from([69, 0, 0, 0, 9, 0, 0, 0, 0, 0]);
  var execute = (config) => {
    if (!config || !config.portal && !config.rows) {
      return emptyExecute;
    }
    const portal = config.portal || "";
    const rows = config.rows || 0;
    const portalLength = Buffer.byteLength(portal);
    const len = 4 + portalLength + 1 + 4;
    const buff = Buffer.allocUnsafe(1 + len);
    buff[0] = 69;
    buff.writeInt32BE(len, 1);
    buff.write(portal, 5, "utf-8");
    buff[portalLength + 5] = 0;
    buff.writeUInt32BE(rows, buff.length - 4);
    return buff;
  };
  var cancel = (processID, secretKey) => {
    const buffer = Buffer.allocUnsafe(16);
    buffer.writeInt32BE(16, 0);
    buffer.writeInt16BE(1234, 4);
    buffer.writeInt16BE(5678, 6);
    buffer.writeInt32BE(processID, 8);
    buffer.writeInt32BE(secretKey, 12);
    return buffer;
  };
  var cstringMessage = (code, string) => {
    const stringLen = Buffer.byteLength(string);
    const len = 4 + stringLen + 1;
    const buffer = Buffer.allocUnsafe(1 + len);
    buffer[0] = code;
    buffer.writeInt32BE(len, 1);
    buffer.write(string, 5, "utf-8");
    buffer[len] = 0;
    return buffer;
  };
  var emptyDescribePortal = writer.addCString("P").flush(68);
  var emptyDescribeStatement = writer.addCString("S").flush(68);
  var describe = (msg) => {
    return msg.name ? cstringMessage(68, `${msg.type}${msg.name || ""}`) : msg.type === "P" ? emptyDescribePortal : emptyDescribeStatement;
  };
  var close2 = (msg) => {
    const text2 = `${msg.type}${msg.name || ""}`;
    return cstringMessage(67, text2);
  };
  var copyData = (chunk) => {
    return writer.add(chunk).flush(100);
  };
  var copyFail = (message) => {
    return cstringMessage(102, message);
  };
  var codeOnlyBuffer = (code) => Buffer.from([code, 0, 0, 0, 4]);
  var flushBuffer = codeOnlyBuffer(72);
  var syncBuffer = codeOnlyBuffer(83);
  var endBuffer = codeOnlyBuffer(88);
  var copyDoneBuffer = codeOnlyBuffer(99);
  var serialize = {
    startup,
    password,
    requestSsl,
    sendSASLInitialResponseMessage,
    sendSCRAMClientFinalMessage,
    query,
    parse,
    bind,
    execute,
    describe,
    close: close2,
    flush: () => flushBuffer,
    sync: () => syncBuffer,
    end: () => endBuffer,
    copyData,
    copyDone: () => copyDoneBuffer,
    copyFail,
    cancel
  };
  exports.serialize = serialize;
});

// ../../node_modules/.pnpm/pg-protocol@1.15.0/node_modules/pg-protocol/dist/buffer-reader.js
var require_buffer_reader = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BufferReader = undefined;

  class BufferReader {
    constructor(offset = 0) {
      this.offset = offset;
      this.buffer = Buffer.allocUnsafe(0);
      this.encoding = "utf-8";
    }
    setBuffer(offset, buffer) {
      this.offset = offset;
      this.buffer = buffer;
    }
    int16() {
      const result = this.buffer.readInt16BE(this.offset);
      this.offset += 2;
      return result;
    }
    byte() {
      const result = this.buffer[this.offset];
      this.offset++;
      return result;
    }
    int32() {
      const result = this.buffer.readInt32BE(this.offset);
      this.offset += 4;
      return result;
    }
    uint32() {
      const result = this.buffer.readUInt32BE(this.offset);
      this.offset += 4;
      return result;
    }
    string(length) {
      const result = this.buffer.toString(this.encoding, this.offset, this.offset + length);
      this.offset += length;
      return result;
    }
    cstring() {
      const start = this.offset;
      let end = start;
      while (this.buffer[end++]) {}
      this.offset = end;
      return this.buffer.toString(this.encoding, start, end - 1);
    }
    bytes(length) {
      const result = this.buffer.slice(this.offset, this.offset + length);
      this.offset += length;
      return result;
    }
  }
  exports.BufferReader = BufferReader;
});

// ../../node_modules/.pnpm/pg-protocol@1.15.0/node_modules/pg-protocol/dist/parser.js
var require_parser = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Parser = undefined;
  var messages_1 = require_messages();
  var buffer_reader_1 = require_buffer_reader();
  var CODE_LENGTH = 1;
  var LEN_LENGTH = 4;
  var HEADER_LENGTH = CODE_LENGTH + LEN_LENGTH;
  var LATEINIT_LENGTH = -1;
  var emptyBuffer = Buffer.allocUnsafe(0);

  class Parser {
    constructor(opts) {
      this.buffer = emptyBuffer;
      this.bufferLength = 0;
      this.bufferOffset = 0;
      this.reader = new buffer_reader_1.BufferReader;
      if ((opts === null || opts === undefined ? undefined : opts.mode) === "binary") {
        throw new Error("Binary mode not supported yet");
      }
      this.mode = (opts === null || opts === undefined ? undefined : opts.mode) || "text";
    }
    parse(buffer, callback) {
      this.mergeBuffer(buffer);
      const bufferFullLength = this.bufferOffset + this.bufferLength;
      let offset = this.bufferOffset;
      while (offset + HEADER_LENGTH <= bufferFullLength) {
        const code = this.buffer[offset];
        const length = this.buffer.readUInt32BE(offset + CODE_LENGTH);
        const fullMessageLength = CODE_LENGTH + length;
        if (fullMessageLength + offset <= bufferFullLength) {
          const message = this.handlePacket(offset + HEADER_LENGTH, code, length, this.buffer);
          callback(message);
          offset += fullMessageLength;
        } else {
          break;
        }
      }
      if (offset === bufferFullLength) {
        this.buffer = emptyBuffer;
        this.bufferLength = 0;
        this.bufferOffset = 0;
      } else {
        this.bufferLength = bufferFullLength - offset;
        this.bufferOffset = offset;
      }
    }
    mergeBuffer(buffer) {
      if (this.bufferLength > 0) {
        const newLength = this.bufferLength + buffer.byteLength;
        const newFullLength = newLength + this.bufferOffset;
        if (newFullLength > this.buffer.byteLength) {
          let newBuffer;
          if (newLength <= this.buffer.byteLength && this.bufferOffset >= this.bufferLength) {
            newBuffer = this.buffer;
          } else {
            let newBufferLength = this.buffer.byteLength * 2;
            while (newLength >= newBufferLength) {
              newBufferLength *= 2;
            }
            newBuffer = Buffer.allocUnsafe(newBufferLength);
          }
          this.buffer.copy(newBuffer, 0, this.bufferOffset, this.bufferOffset + this.bufferLength);
          this.buffer = newBuffer;
          this.bufferOffset = 0;
        }
        buffer.copy(this.buffer, this.bufferOffset + this.bufferLength);
        this.bufferLength = newLength;
      } else {
        this.buffer = buffer;
        this.bufferOffset = 0;
        this.bufferLength = buffer.byteLength;
      }
    }
    handlePacket(offset, code, length, bytes) {
      const { reader } = this;
      reader.setBuffer(offset, bytes);
      let message;
      switch (code) {
        case 50:
          message = messages_1.bindComplete;
          break;
        case 49:
          message = messages_1.parseComplete;
          break;
        case 51:
          message = messages_1.closeComplete;
          break;
        case 110:
          message = messages_1.noData;
          break;
        case 115:
          message = messages_1.portalSuspended;
          break;
        case 99:
          message = messages_1.copyDone;
          break;
        case 87:
          message = messages_1.replicationStart;
          break;
        case 73:
          message = messages_1.emptyQuery;
          break;
        case 68:
          message = parseDataRowMessage(reader);
          break;
        case 67:
          message = parseCommandCompleteMessage(reader);
          break;
        case 90:
          message = parseReadyForQueryMessage(reader);
          break;
        case 65:
          message = parseNotificationMessage(reader);
          break;
        case 82:
          message = parseAuthenticationResponse(reader, length);
          break;
        case 83:
          message = parseParameterStatusMessage(reader);
          break;
        case 75:
          message = parseBackendKeyData(reader);
          break;
        case 69:
          message = parseErrorMessage(reader, "error");
          break;
        case 78:
          message = parseErrorMessage(reader, "notice");
          break;
        case 84:
          message = parseRowDescriptionMessage(reader);
          break;
        case 116:
          message = parseParameterDescriptionMessage(reader);
          break;
        case 71:
          message = parseCopyInMessage(reader);
          break;
        case 72:
          message = parseCopyOutMessage(reader);
          break;
        case 100:
          message = parseCopyData(reader, length);
          break;
        default:
          return new messages_1.DatabaseError("received invalid response: " + code.toString(16), length, "error");
      }
      reader.setBuffer(0, emptyBuffer);
      message.length = length;
      return message;
    }
  }
  exports.Parser = Parser;
  var parseReadyForQueryMessage = (reader) => {
    const status = reader.string(1);
    return new messages_1.ReadyForQueryMessage(LATEINIT_LENGTH, status);
  };
  var parseCommandCompleteMessage = (reader) => {
    const text2 = reader.cstring();
    return new messages_1.CommandCompleteMessage(LATEINIT_LENGTH, text2);
  };
  var parseCopyData = (reader, length) => {
    const chunk = reader.bytes(length - 4);
    return new messages_1.CopyDataMessage(LATEINIT_LENGTH, chunk);
  };
  var parseCopyInMessage = (reader) => parseCopyMessage(reader, "copyInResponse");
  var parseCopyOutMessage = (reader) => parseCopyMessage(reader, "copyOutResponse");
  var parseCopyMessage = (reader, messageName) => {
    const isBinary = reader.byte() !== 0;
    const columnCount = reader.int16();
    const message = new messages_1.CopyResponse(LATEINIT_LENGTH, messageName, isBinary, columnCount);
    for (let i = 0;i < columnCount; i++) {
      message.columnTypes[i] = reader.int16();
    }
    return message;
  };
  var parseNotificationMessage = (reader) => {
    const processId = reader.int32();
    const channel3 = reader.cstring();
    const payload = reader.cstring();
    return new messages_1.NotificationResponseMessage(LATEINIT_LENGTH, processId, channel3, payload);
  };
  var parseRowDescriptionMessage = (reader) => {
    const fieldCount = reader.int16();
    const message = new messages_1.RowDescriptionMessage(LATEINIT_LENGTH, fieldCount);
    for (let i = 0;i < fieldCount; i++) {
      message.fields[i] = parseField(reader);
    }
    return message;
  };
  var parseField = (reader) => {
    const name = reader.cstring();
    const tableID = reader.uint32();
    const columnID = reader.int16();
    const dataTypeID = reader.uint32();
    const dataTypeSize = reader.int16();
    const dataTypeModifier = reader.int32();
    const mode = reader.int16() === 0 ? "text" : "binary";
    return new messages_1.Field(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, mode);
  };
  var parseParameterDescriptionMessage = (reader) => {
    const parameterCount = reader.int16();
    const message = new messages_1.ParameterDescriptionMessage(LATEINIT_LENGTH, parameterCount);
    for (let i = 0;i < parameterCount; i++) {
      message.dataTypeIDs[i] = reader.int32();
    }
    return message;
  };
  var parseDataRowMessage = (reader) => {
    const fieldCount = reader.int16();
    const fields = new Array(fieldCount);
    for (let i = 0;i < fieldCount; i++) {
      const len = reader.int32();
      fields[i] = len === -1 ? null : reader.string(len);
    }
    return new messages_1.DataRowMessage(LATEINIT_LENGTH, fields);
  };
  var parseParameterStatusMessage = (reader) => {
    const name = reader.cstring();
    const value = reader.cstring();
    return new messages_1.ParameterStatusMessage(LATEINIT_LENGTH, name, value);
  };
  var parseBackendKeyData = (reader) => {
    const processID = reader.int32();
    const secretKey = reader.int32();
    return new messages_1.BackendKeyDataMessage(LATEINIT_LENGTH, processID, secretKey);
  };
  var parseAuthenticationResponse = (reader, length) => {
    const code = reader.int32();
    const message = {
      name: "authenticationOk",
      length
    };
    switch (code) {
      case 0:
        break;
      case 3:
        if (message.length === 8) {
          message.name = "authenticationCleartextPassword";
        }
        break;
      case 5:
        if (message.length === 12) {
          message.name = "authenticationMD5Password";
          const salt = reader.bytes(4);
          return new messages_1.AuthenticationMD5Password(LATEINIT_LENGTH, salt);
        }
        break;
      case 10:
        {
          message.name = "authenticationSASL";
          message.mechanisms = [];
          let mechanism;
          do {
            mechanism = reader.cstring();
            if (mechanism) {
              message.mechanisms.push(mechanism);
            }
          } while (mechanism);
        }
        break;
      case 11:
        message.name = "authenticationSASLContinue";
        message.data = reader.string(length - 8);
        break;
      case 12:
        message.name = "authenticationSASLFinal";
        message.data = reader.string(length - 8);
        break;
      default:
        throw new Error("Unknown authenticationOk message type " + code);
    }
    return message;
  };
  var parseErrorMessage = (reader, name) => {
    const fields = {};
    let fieldType = reader.string(1);
    while (fieldType !== "\x00") {
      fields[fieldType] = reader.cstring();
      fieldType = reader.string(1);
    }
    const messageValue = fields.M;
    const message = name === "notice" ? new messages_1.NoticeMessage(LATEINIT_LENGTH, messageValue) : new messages_1.DatabaseError(messageValue, LATEINIT_LENGTH, name);
    message.severity = fields.S;
    message.code = fields.C;
    message.detail = fields.D;
    message.hint = fields.H;
    message.position = fields.P;
    message.internalPosition = fields.p;
    message.internalQuery = fields.q;
    message.where = fields.W;
    message.schema = fields.s;
    message.table = fields.t;
    message.column = fields.c;
    message.dataType = fields.d;
    message.constraint = fields.n;
    message.file = fields.F;
    message.line = fields.L;
    message.routine = fields.R;
    return message;
  };
});

// ../../node_modules/.pnpm/pg-protocol@1.15.0/node_modules/pg-protocol/dist/index.js
var require_dist = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DatabaseError = exports.serialize = undefined;
  exports.parse = parse;
  var messages_1 = require_messages();
  Object.defineProperty(exports, "DatabaseError", { enumerable: true, get: function() {
    return messages_1.DatabaseError;
  } });
  var serializer_1 = require_serializer();
  Object.defineProperty(exports, "serialize", { enumerable: true, get: function() {
    return serializer_1.serialize;
  } });
  var parser_1 = require_parser();
  function parse(stream, callback) {
    const parser = new parser_1.Parser;
    stream.on("data", (buffer) => parser.parse(buffer, callback));
    return new Promise((resolve3) => stream.on("end", () => resolve3()));
  }
});

// ../../node_modules/.pnpm/pg-cloudflare@1.4.0/node_modules/pg-cloudflare/dist/empty.js
var require_empty = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.default = {};
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/stream.js
var require_stream = __commonJS((exports, module) => {
  var { getStream, getSecureStream } = getStreamFuncs();
  module.exports = {
    getStream,
    getSecureStream
  };
  function getNodejsStreamFuncs() {
    function getStream2(ssl) {
      const net2 = __require("net");
      return new net2.Socket;
    }
    function getSecureStream2(options) {
      const tls2 = __require("tls");
      return tls2.connect(options);
    }
    return {
      getStream: getStream2,
      getSecureStream: getSecureStream2
    };
  }
  function getCloudflareStreamFuncs() {
    function getStream2(ssl) {
      const { CloudflareSocket } = require_empty();
      return new CloudflareSocket(ssl);
    }
    function getSecureStream2(options) {
      options.socket.startTls(options);
      return options.socket;
    }
    return {
      getStream: getStream2,
      getSecureStream: getSecureStream2
    };
  }
  function isCloudflareRuntime() {
    if (typeof navigator === "object" && navigator !== null && typeof navigator.userAgent === "string") {
      return navigator.userAgent === "Cloudflare-Workers";
    }
    if (typeof Response === "function") {
      const resp = new Response(null, { cf: { thing: true } });
      if (typeof resp.cf === "object" && resp.cf !== null && resp.cf.thing) {
        return true;
      }
    }
    return false;
  }
  function getStreamFuncs() {
    if (isCloudflareRuntime()) {
      return getCloudflareStreamFuncs();
    }
    return getNodejsStreamFuncs();
  }
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/connection.js
var require_connection = __commonJS((exports, module) => {
  var EventEmitter = __require("events").EventEmitter;
  var { parse, serialize } = require_dist();
  var stream = require_stream();
  var { getStream } = stream;
  var flushBuffer = serialize.flush();
  var syncBuffer = serialize.sync();
  var endBuffer = serialize.end();

  class Connection extends EventEmitter {
    constructor(config) {
      super();
      config = config || {};
      this.stream = config.stream || getStream(config.ssl);
      if (typeof this.stream === "function") {
        this.stream = this.stream(config);
      }
      this._keepAlive = config.keepAlive;
      this._keepAliveInitialDelayMillis = config.keepAliveInitialDelayMillis;
      this.parsedStatements = {};
      this.ssl = config.ssl || false;
      this.sslNegotiation = config.sslNegotiation || "postgres";
      this._ending = false;
      this._emitMessage = false;
      const self2 = this;
      this.on("newListener", function(eventName) {
        if (eventName === "message") {
          self2._emitMessage = true;
        }
      });
    }
    connect(port, host) {
      const self2 = this;
      this._connecting = true;
      this.stream.setNoDelay(true);
      this.stream.connect(port, host);
      this.stream.once("connect", function() {
        if (self2._keepAlive) {
          self2.stream.setKeepAlive(true, self2._keepAliveInitialDelayMillis);
        }
        self2.emit("connect");
      });
      const reportStreamError = function(error2) {
        if (self2._ending && (error2.code === "ECONNRESET" || error2.code === "EPIPE")) {
          return;
        }
        self2.emit("error", error2);
      };
      this.stream.on("error", reportStreamError);
      this.stream.on("close", function() {
        self2.emit("end");
      });
      if (!this.ssl) {
        return this.attachListeners(this.stream);
      }
      if (this.sslNegotiation === "direct") {
        return this.stream.once("connect", function() {
          self2.upgradeToSSL(host, reportStreamError);
        });
      }
      this.stream.once("data", function(buffer) {
        const responseCode = buffer.toString("utf8");
        switch (responseCode) {
          case "S":
            break;
          case "N":
            self2.stream.end();
            return self2.emit("error", new Error("The server does not support SSL connections"));
          default:
            self2.stream.end();
            return self2.emit("error", new Error("There was an error establishing an SSL connection"));
        }
        self2.upgradeToSSL(host, reportStreamError);
      });
    }
    upgradeToSSL(host, reportStreamError) {
      const self2 = this;
      const options = {
        socket: self2.stream
      };
      if (self2.ssl !== true) {
        Object.assign(options, self2.ssl);
        if ("key" in self2.ssl) {
          options.key = self2.ssl.key;
        }
      }
      if (self2.sslNegotiation === "direct") {
        options.ALPNProtocols = ["postgresql"];
      }
      const net2 = __require("net");
      if (net2.isIP && net2.isIP(host) === 0) {
        options.servername = host;
      }
      try {
        self2.stream = stream.getSecureStream(options);
      } catch (err) {
        return self2.emit("error", err);
      }
      self2.attachListeners(self2.stream);
      self2.stream.on("error", reportStreamError);
      self2.emit("sslconnect");
    }
    attachListeners(stream2) {
      parse(stream2, (msg) => {
        const eventName = msg.name === "error" ? "errorMessage" : msg.name;
        if (this._emitMessage) {
          this.emit("message", msg);
        }
        this.emit(eventName, msg);
      });
    }
    requestSsl() {
      this.stream.write(serialize.requestSsl());
    }
    startup(config) {
      this.stream.write(serialize.startup(config));
    }
    cancel(processID, secretKey) {
      this._send(serialize.cancel(processID, secretKey));
    }
    password(password) {
      this._send(serialize.password(password));
    }
    sendSASLInitialResponseMessage(mechanism, initialResponse) {
      this._send(serialize.sendSASLInitialResponseMessage(mechanism, initialResponse));
    }
    sendSCRAMClientFinalMessage(additionalData) {
      this._send(serialize.sendSCRAMClientFinalMessage(additionalData));
    }
    _send(buffer) {
      if (!this.stream.writable) {
        return false;
      }
      return this.stream.write(buffer);
    }
    query(text2) {
      this._send(serialize.query(text2));
    }
    parse(query) {
      this._send(serialize.parse(query));
    }
    bind(config) {
      this._send(serialize.bind(config));
    }
    execute(config) {
      this._send(serialize.execute(config));
    }
    flush() {
      if (this.stream.writable) {
        this.stream.write(flushBuffer);
      }
    }
    sync() {
      this._ending = true;
      this._send(syncBuffer);
    }
    ref() {
      this.stream.ref();
    }
    unref() {
      this.stream.unref();
    }
    end() {
      this._ending = true;
      if (!this._connecting || !this.stream.writable) {
        this.stream.end();
        return;
      }
      return this.stream.write(endBuffer, () => {
        this.stream.end();
      });
    }
    close(msg) {
      this._send(serialize.close(msg));
    }
    describe(msg) {
      this._send(serialize.describe(msg));
    }
    sendCopyFromChunk(chunk) {
      this._send(serialize.copyData(chunk));
    }
    endCopyFrom() {
      this._send(serialize.copyDone());
    }
    sendCopyFail(msg) {
      this._send(serialize.copyFail(msg));
    }
  }
  module.exports = Connection;
});

// ../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js
var require_split2 = __commonJS((exports, module) => {
  var { Transform } = __require("stream");
  var { StringDecoder } = __require("string_decoder");
  var kLast = Symbol("last");
  var kDecoder = Symbol("decoder");
  function transform(chunk, enc, cb) {
    let list;
    if (this.overflow) {
      const buf = this[kDecoder].write(chunk);
      list = buf.split(this.matcher);
      if (list.length === 1)
        return cb();
      list.shift();
      this.overflow = false;
    } else {
      this[kLast] += this[kDecoder].write(chunk);
      list = this[kLast].split(this.matcher);
    }
    this[kLast] = list.pop();
    for (let i = 0;i < list.length; i++) {
      try {
        push(this, this.mapper(list[i]));
      } catch (error2) {
        return cb(error2);
      }
    }
    this.overflow = this[kLast].length > this.maxLength;
    if (this.overflow && !this.skipOverflow) {
      cb(new Error("maximum buffer reached"));
      return;
    }
    cb();
  }
  function flush2(cb) {
    this[kLast] += this[kDecoder].end();
    if (this[kLast]) {
      try {
        push(this, this.mapper(this[kLast]));
      } catch (error2) {
        return cb(error2);
      }
    }
    cb();
  }
  function push(self2, val) {
    if (val !== undefined) {
      self2.push(val);
    }
  }
  function noop(incoming) {
    return incoming;
  }
  function split(matcher, mapper, options) {
    matcher = matcher || /\r?\n/;
    mapper = mapper || noop;
    options = options || {};
    switch (arguments.length) {
      case 1:
        if (typeof matcher === "function") {
          mapper = matcher;
          matcher = /\r?\n/;
        } else if (typeof matcher === "object" && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
          options = matcher;
          matcher = /\r?\n/;
        }
        break;
      case 2:
        if (typeof matcher === "function") {
          options = mapper;
          mapper = matcher;
          matcher = /\r?\n/;
        } else if (typeof mapper === "object") {
          options = mapper;
          mapper = noop;
        }
    }
    options = Object.assign({}, options);
    options.autoDestroy = true;
    options.transform = transform;
    options.flush = flush2;
    options.readableObjectMode = true;
    const stream = new Transform(options);
    stream[kLast] = "";
    stream[kDecoder] = new StringDecoder("utf8");
    stream.matcher = matcher;
    stream.mapper = mapper;
    stream.maxLength = options.maxLength;
    stream.skipOverflow = options.skipOverflow || false;
    stream.overflow = false;
    stream._destroy = function(err, cb) {
      this._writableState.errorEmitted = false;
      cb(err);
    };
    return stream;
  }
  module.exports = split;
});

// ../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/helper.js
var require_helper = __commonJS((exports, module) => {
  var path2 = __require("path");
  var Stream = __require("stream").Stream;
  var split = require_split2();
  var util2 = __require("util");
  var defaultPort = 5432;
  var isWin = process.platform === "win32";
  var warnStream = process.stderr;
  var S_IRWXG = 56;
  var S_IRWXO = 7;
  var S_IFMT = 61440;
  var S_IFREG = 32768;
  function isRegFile(mode) {
    return (mode & S_IFMT) == S_IFREG;
  }
  var fieldNames = ["host", "port", "database", "user", "password"];
  var nrOfFields = fieldNames.length;
  var passKey = fieldNames[nrOfFields - 1];
  function warn2() {
    var isWritable = warnStream instanceof Stream && warnStream.writable === true;
    if (isWritable) {
      var args = Array.prototype.slice.call(arguments).concat(`
`);
      warnStream.write(util2.format.apply(util2, args));
    }
  }
  Object.defineProperty(exports, "isWin", {
    get: function() {
      return isWin;
    },
    set: function(val) {
      isWin = val;
    }
  });
  exports.warnTo = function(stream) {
    var old = warnStream;
    warnStream = stream;
    return old;
  };
  exports.getFileName = function(rawEnv) {
    var env2 = rawEnv || process.env;
    var file = env2.PGPASSFILE || (isWin ? path2.join(env2.APPDATA || "./", "postgresql", "pgpass.conf") : path2.join(env2.HOME || "./", ".pgpass"));
    return file;
  };
  exports.usePgPass = function(stats, fname) {
    if (Object.prototype.hasOwnProperty.call(process.env, "PGPASSWORD")) {
      return false;
    }
    if (isWin) {
      return true;
    }
    fname = fname || "<unkn>";
    if (!isRegFile(stats.mode)) {
      warn2('WARNING: password file "%s" is not a plain file', fname);
      return false;
    }
    if (stats.mode & (S_IRWXG | S_IRWXO)) {
      warn2('WARNING: password file "%s" has group or world access; permissions should be u=rw (0600) or less', fname);
      return false;
    }
    return true;
  };
  var matcher = exports.match = function(connInfo, entry) {
    return fieldNames.slice(0, -1).reduce(function(prev, field, idx) {
      if (idx == 1) {
        if (Number(connInfo[field] || defaultPort) === Number(entry[field])) {
          return prev && true;
        }
      }
      return prev && (entry[field] === "*" || entry[field] === connInfo[field]);
    }, true);
  };
  exports.getPassword = function(connInfo, stream, cb) {
    var pass;
    var lineStream = stream.pipe(split());
    function onLine(line2) {
      var entry = parseLine(line2);
      if (entry && isValidEntry(entry) && matcher(connInfo, entry)) {
        pass = entry[passKey];
        lineStream.end();
      }
    }
    var onEnd = function() {
      stream.destroy();
      cb(pass);
    };
    var onErr = function(err) {
      stream.destroy();
      warn2("WARNING: error on reading file: %s", err);
      cb(undefined);
    };
    stream.on("error", onErr);
    lineStream.on("data", onLine).on("end", onEnd).on("error", onErr);
  };
  var parseLine = exports.parseLine = function(line2) {
    if (line2.length < 11 || line2.match(/^\s+#/)) {
      return null;
    }
    var curChar = "";
    var prevChar = "";
    var fieldIdx = 0;
    var startIdx = 0;
    var endIdx = 0;
    var obj = {};
    var isLastField = false;
    var addToObj = function(idx, i0, i1) {
      var field = line2.substring(i0, i1);
      if (!Object.hasOwnProperty.call(process.env, "PGPASS_NO_DEESCAPE")) {
        field = field.replace(/\\([:\\])/g, "$1");
      }
      obj[fieldNames[idx]] = field;
    };
    for (var i = 0;i < line2.length - 1; i += 1) {
      curChar = line2.charAt(i + 1);
      prevChar = line2.charAt(i);
      isLastField = fieldIdx == nrOfFields - 1;
      if (isLastField) {
        addToObj(fieldIdx, startIdx);
        break;
      }
      if (i >= 0 && curChar == ":" && prevChar !== "\\") {
        addToObj(fieldIdx, startIdx, i + 1);
        startIdx = i + 2;
        fieldIdx += 1;
      }
    }
    obj = Object.keys(obj).length === nrOfFields ? obj : null;
    return obj;
  };
  var isValidEntry = exports.isValidEntry = function(entry) {
    var rules = {
      0: function(x) {
        return x.length > 0;
      },
      1: function(x) {
        if (x === "*") {
          return true;
        }
        x = Number(x);
        return isFinite(x) && x > 0 && x < 9007199254740992 && Math.floor(x) === x;
      },
      2: function(x) {
        return x.length > 0;
      },
      3: function(x) {
        return x.length > 0;
      },
      4: function(x) {
        return x.length > 0;
      }
    };
    for (var idx = 0;idx < fieldNames.length; idx += 1) {
      var rule = rules[idx];
      var value = entry[fieldNames[idx]] || "";
      var res = rule(value);
      if (!res) {
        return false;
      }
    }
    return true;
  };
});

// ../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js
var require_lib2 = __commonJS((exports, module) => {
  var path2 = __require("path");
  var fs2 = __require("fs");
  var helper = require_helper();
  module.exports = function(connInfo, cb) {
    var file = helper.getFileName();
    fs2.stat(file, function(err, stat) {
      if (err || !helper.usePgPass(stat, file)) {
        return cb(undefined);
      }
      var st = fs2.createReadStream(file);
      helper.getPassword(connInfo, st, cb);
    });
  };
  module.exports.warnTo = helper.warnTo;
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/client.js
var require_client = __commonJS((exports, module) => {
  var EventEmitter = __require("events").EventEmitter;
  var utils = require_utils11();
  var nodeUtils = __require("util");
  var sasl = require_sasl();
  var TypeOverrides = require_type_overrides();
  var ConnectionParameters = require_connection_parameters();
  var Query = require_query();
  var defaults = require_defaults();
  var Connection = require_connection();
  var crypto2 = require_utils12();
  var activeQueryDeprecationNotice = nodeUtils.deprecate(() => {}, "Client.activeQuery is deprecated and will be removed in pg@9.0");
  var queryQueueDeprecationNotice = nodeUtils.deprecate(() => {}, "Client.queryQueue is deprecated and will be removed in pg@9.0.");
  var pgPassDeprecationNotice = nodeUtils.deprecate(() => {}, "pgpass support is deprecated and will be removed in pg@9.0. " + "You can provide an async function as the password property to the Client/Pool constructor that returns a password instead. Within this function you can call the pgpass module in your own code.");
  var byoPromiseDeprecationNotice = nodeUtils.deprecate(() => {}, "Passing a custom Promise implementation to the Client/Pool constructor is deprecated and will be removed in pg@9.0.");
  var queryQueueLengthDeprecationNotice = nodeUtils.deprecate(() => {}, "Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.");
  function coerceNumberOrDefault(value, defaultValue) {
    if (typeof value === "number") {
      return Number.isFinite(value) ? value : defaultValue;
    }
    if (typeof value === "string" && value.trim() !== "") {
      const n = Number(value);
      return Number.isFinite(n) ? n : defaultValue;
    }
    return defaultValue;
  }

  class Client3 extends EventEmitter {
    constructor(config) {
      super();
      this.connectionParameters = new ConnectionParameters(config);
      this.user = this.connectionParameters.user;
      this.database = this.connectionParameters.database;
      this.port = this.connectionParameters.port;
      this.host = this.connectionParameters.host;
      Object.defineProperty(this, "password", {
        configurable: true,
        enumerable: false,
        writable: true,
        value: this.connectionParameters.password
      });
      this.replication = this.connectionParameters.replication;
      const c = config || {};
      if (c.Promise) {
        byoPromiseDeprecationNotice();
      }
      this._Promise = c.Promise || global.Promise;
      this._types = new TypeOverrides(c.types);
      this._ending = false;
      this._ended = false;
      this._connecting = false;
      this._connected = false;
      this._connectionError = false;
      this._queryable = true;
      this._activeQuery = null;
      this._txStatus = null;
      this.enableChannelBinding = Boolean(c.enableChannelBinding);
      this.scramMaxIterations = coerceNumberOrDefault(c.scramMaxIterations, sasl.DEFAULT_MAX_SCRAM_ITERATIONS);
      this.connection = c.connection || new Connection({
        stream: c.stream,
        ssl: this.connectionParameters.ssl,
        sslNegotiation: this.connectionParameters.sslnegotiation,
        keepAlive: c.keepAlive || false,
        keepAliveInitialDelayMillis: c.keepAliveInitialDelayMillis || 0,
        encoding: this.connectionParameters.client_encoding || "utf8"
      });
      this._queryQueue = [];
      this.binary = c.binary || defaults.binary;
      this.processID = null;
      this.secretKey = null;
      this.ssl = this.connectionParameters.ssl || false;
      this.sslNegotiation = this.connectionParameters.sslnegotiation || "postgres";
      if (this.ssl && this.ssl.key) {
        Object.defineProperty(this.ssl, "key", {
          enumerable: false
        });
      }
      this._connectionTimeoutMillis = c.connectionTimeoutMillis || 0;
    }
    get activeQuery() {
      activeQueryDeprecationNotice();
      return this._activeQuery;
    }
    set activeQuery(val) {
      activeQueryDeprecationNotice();
      this._activeQuery = val;
    }
    _getActiveQuery() {
      return this._activeQuery;
    }
    _errorAllQueries(err) {
      const enqueueError = (query) => {
        process.nextTick(() => {
          query.handleError(err, this.connection);
        });
      };
      const activeQuery = this._getActiveQuery();
      if (activeQuery) {
        enqueueError(activeQuery);
        this._activeQuery = null;
      }
      this._queryQueue.forEach(enqueueError);
      this._queryQueue.length = 0;
    }
    _connect(callback) {
      const self2 = this;
      const con = this.connection;
      this._connectionCallback = callback;
      if (this._connecting || this._connected) {
        const err = new Error("Client has already been connected. You cannot reuse a client.");
        process.nextTick(() => {
          callback(err);
        });
        return;
      }
      this._connecting = true;
      if (this._connectionTimeoutMillis > 0) {
        this.connectionTimeoutHandle = setTimeout(() => {
          con._ending = true;
          con.stream.destroy(new Error("timeout expired"));
        }, this._connectionTimeoutMillis);
        if (this.connectionTimeoutHandle.unref) {
          this.connectionTimeoutHandle.unref();
        }
      }
      if (this.host && this.host.indexOf("/") === 0) {
        con.connect(this.host + "/.s.PGSQL." + this.port);
      } else {
        con.connect(this.port, this.host);
      }
      con.on("connect", function() {
        if (self2.ssl) {
          if (self2.sslNegotiation !== "direct") {
            con.requestSsl();
          }
        } else {
          con.startup(self2.getStartupConf());
        }
      });
      con.on("sslconnect", function() {
        con.startup(self2.getStartupConf());
      });
      this._attachListeners(con);
      con.once("end", () => {
        const error2 = this._ending ? new Error("Connection terminated") : new Error("Connection terminated unexpectedly");
        clearTimeout(this.connectionTimeoutHandle);
        this._errorAllQueries(error2);
        this._ended = true;
        if (!this._ending) {
          if (this._connecting && !this._connectionError) {
            if (this._connectionCallback) {
              this._connectionCallback(error2);
            } else {
              this._handleErrorEvent(error2);
            }
          } else if (!this._connectionError) {
            this._handleErrorEvent(error2);
          }
        }
        process.nextTick(() => {
          this.emit("end");
        });
      });
    }
    connect(callback) {
      if (callback) {
        this._connect(callback);
        return;
      }
      return new this._Promise((resolve3, reject) => {
        this._connect((error2) => {
          if (error2) {
            reject(error2);
          } else {
            resolve3(this);
          }
        });
      });
    }
    _attachListeners(con) {
      con.on("authenticationCleartextPassword", this._handleAuthCleartextPassword.bind(this));
      con.on("authenticationMD5Password", this._handleAuthMD5Password.bind(this));
      con.on("authenticationSASL", this._handleAuthSASL.bind(this));
      con.on("authenticationSASLContinue", this._handleAuthSASLContinue.bind(this));
      con.on("authenticationSASLFinal", this._handleAuthSASLFinal.bind(this));
      con.on("backendKeyData", this._handleBackendKeyData.bind(this));
      con.on("error", this._handleErrorEvent.bind(this));
      con.on("errorMessage", this._handleErrorMessage.bind(this));
      con.on("readyForQuery", this._handleReadyForQuery.bind(this));
      con.on("notice", this._handleNotice.bind(this));
      con.on("rowDescription", this._handleRowDescription.bind(this));
      con.on("dataRow", this._handleDataRow.bind(this));
      con.on("portalSuspended", this._handlePortalSuspended.bind(this));
      con.on("emptyQuery", this._handleEmptyQuery.bind(this));
      con.on("commandComplete", this._handleCommandComplete.bind(this));
      con.on("parseComplete", this._handleParseComplete.bind(this));
      con.on("copyInResponse", this._handleCopyInResponse.bind(this));
      con.on("copyData", this._handleCopyData.bind(this));
      con.on("notification", this._handleNotification.bind(this));
    }
    _getPassword(cb) {
      const con = this.connection;
      if (typeof this.password === "function") {
        this._Promise.resolve().then(() => this.password(this.connectionParameters)).then((pass) => {
          if (pass !== undefined) {
            if (typeof pass !== "string") {
              con.emit("error", new TypeError("Password must be a string"));
              return;
            }
            this.connectionParameters.password = this.password = pass;
          } else {
            this.connectionParameters.password = this.password = null;
          }
          cb();
        }).catch((err) => {
          con.emit("error", err);
        });
      } else if (this.password !== null) {
        cb();
      } else {
        try {
          const pgPass = require_lib2();
          pgPass(this.connectionParameters, (pass) => {
            if (pass !== undefined) {
              pgPassDeprecationNotice();
              this.connectionParameters.password = this.password = pass;
            }
            cb();
          });
        } catch (e) {
          this.emit("error", e);
        }
      }
    }
    _handleAuthCleartextPassword(msg) {
      this._getPassword(() => {
        this.connection.password(this.password);
      });
    }
    _handleAuthMD5Password(msg) {
      this._getPassword(async () => {
        try {
          const hashedPassword = await crypto2.postgresMd5PasswordHash(this.user, this.password, msg.salt);
          this.connection.password(hashedPassword);
        } catch (e) {
          this.emit("error", e);
        }
      });
    }
    _handleAuthSASL(msg) {
      this._getPassword(() => {
        try {
          this.saslSession = sasl.startSession(msg.mechanisms, this.enableChannelBinding && this.connection.stream, this.scramMaxIterations);
          this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response);
        } catch (err) {
          this.connection.emit("error", err);
        }
      });
    }
    async _handleAuthSASLContinue(msg) {
      try {
        await sasl.continueSession(this.saslSession, this.password, msg.data, this.enableChannelBinding && this.connection.stream);
        this.connection.sendSCRAMClientFinalMessage(this.saslSession.response);
      } catch (err) {
        this.connection.emit("error", err);
      }
    }
    _handleAuthSASLFinal(msg) {
      try {
        sasl.finalizeSession(this.saslSession, msg.data);
        this.saslSession = null;
      } catch (err) {
        this.connection.emit("error", err);
      }
    }
    _handleBackendKeyData(msg) {
      this.processID = msg.processID;
      this.secretKey = msg.secretKey;
    }
    _handleReadyForQuery(msg) {
      if (this._connecting) {
        this._connecting = false;
        this._connected = true;
        clearTimeout(this.connectionTimeoutHandle);
        if (this._connectionCallback) {
          this._connectionCallback(null, this);
          this._connectionCallback = null;
        }
        this.emit("connect");
      }
      const activeQuery = this._getActiveQuery();
      this._activeQuery = null;
      this._txStatus = msg?.status ?? null;
      this.readyForQuery = true;
      if (activeQuery) {
        activeQuery.handleReadyForQuery(this.connection);
      }
      this._pulseQueryQueue();
    }
    _handleErrorWhileConnecting(err) {
      if (this._connectionError) {
        return;
      }
      this._connectionError = true;
      clearTimeout(this.connectionTimeoutHandle);
      if (this._connectionCallback) {
        return this._connectionCallback(err);
      }
      this.emit("error", err);
    }
    _handleErrorEvent(err) {
      if (this._connecting) {
        return this._handleErrorWhileConnecting(err);
      }
      this._queryable = false;
      this._errorAllQueries(err);
      this.emit("error", err);
    }
    _handleErrorMessage(msg) {
      if (this._connecting) {
        return this._handleErrorWhileConnecting(msg);
      }
      const activeQuery = this._getActiveQuery();
      if (!activeQuery) {
        this._handleErrorEvent(msg);
        return;
      }
      this._activeQuery = null;
      activeQuery.handleError(msg, this.connection);
    }
    _handleRowDescription(msg) {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected rowDescription message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      activeQuery.handleRowDescription(msg);
    }
    _handleDataRow(msg) {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected dataRow message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      activeQuery.handleDataRow(msg);
    }
    _handlePortalSuspended(msg) {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected portalSuspended message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      activeQuery.handlePortalSuspended(this.connection);
    }
    _handleEmptyQuery(msg) {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected emptyQuery message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      activeQuery.handleEmptyQuery(this.connection);
    }
    _handleCommandComplete(msg) {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected commandComplete message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      activeQuery.handleCommandComplete(msg, this.connection);
    }
    _handleParseComplete() {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected parseComplete message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      if (activeQuery.name) {
        this.connection.parsedStatements[activeQuery.name] = activeQuery.text;
      }
    }
    _handleCopyInResponse(msg) {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected copyInResponse message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      activeQuery.handleCopyInResponse(this.connection);
    }
    _handleCopyData(msg) {
      const activeQuery = this._getActiveQuery();
      if (activeQuery == null) {
        const error2 = new Error("Received unexpected copyData message from backend.");
        this._handleErrorEvent(error2);
        return;
      }
      activeQuery.handleCopyData(msg, this.connection);
    }
    _handleNotification(msg) {
      this.emit("notification", msg);
    }
    _handleNotice(msg) {
      this.emit("notice", msg);
    }
    getStartupConf() {
      const params = this.connectionParameters;
      const data = {
        user: params.user,
        database: params.database
      };
      const appName = params.application_name || params.fallback_application_name;
      if (appName) {
        data.application_name = appName;
      }
      if (params.replication) {
        data.replication = "" + params.replication;
      }
      if (params.statement_timeout) {
        data.statement_timeout = String(parseInt(params.statement_timeout, 10));
      }
      if (params.lock_timeout) {
        data.lock_timeout = String(parseInt(params.lock_timeout, 10));
      }
      if (params.idle_in_transaction_session_timeout) {
        data.idle_in_transaction_session_timeout = String(parseInt(params.idle_in_transaction_session_timeout, 10));
      }
      if (params.options) {
        data.options = params.options;
      }
      return data;
    }
    cancel(client, query) {
      if (client.activeQuery === query) {
        const con = this.connection;
        if (this.host && this.host.indexOf("/") === 0) {
          con.connect(this.host + "/.s.PGSQL." + this.port);
        } else {
          con.connect(this.port, this.host);
        }
        con.on("connect", function() {
          con.cancel(client.processID, client.secretKey);
        });
      } else if (client._queryQueue.indexOf(query) !== -1) {
        client._queryQueue.splice(client._queryQueue.indexOf(query), 1);
      }
    }
    setTypeParser(oid, format, parseFn) {
      return this._types.setTypeParser(oid, format, parseFn);
    }
    getTypeParser(oid, format) {
      return this._types.getTypeParser(oid, format);
    }
    escapeIdentifier(str) {
      return utils.escapeIdentifier(str);
    }
    escapeLiteral(str) {
      return utils.escapeLiteral(str);
    }
    _pulseQueryQueue() {
      if (this.readyForQuery === true) {
        this._activeQuery = this._queryQueue.shift();
        const activeQuery = this._getActiveQuery();
        if (activeQuery) {
          this.readyForQuery = false;
          this.hasExecuted = true;
          const queryError = activeQuery.submit(this.connection);
          if (queryError) {
            process.nextTick(() => {
              activeQuery.handleError(queryError, this.connection);
              this.readyForQuery = true;
              this._pulseQueryQueue();
            });
          }
        } else if (this.hasExecuted) {
          this._activeQuery = null;
          this.emit("drain");
        }
      }
    }
    query(config, values, callback) {
      let query;
      let result;
      if (config == null) {
        throw new TypeError("Client was passed a null or undefined query");
      }
      if (typeof config.submit === "function") {
        result = query = config;
        if (!query.callback) {
          if (typeof values === "function") {
            query.callback = values;
          } else if (callback) {
            query.callback = callback;
          }
        }
      } else {
        query = new Query(config, values, callback);
        if (!query.callback) {
          result = new this._Promise((resolve3, reject) => {
            query.callback = (err, res) => err ? reject(err) : resolve3(res);
          }).catch((err) => {
            Error.captureStackTrace(err);
            throw err;
          });
        } else if (typeof query.callback !== "function") {
          throw new TypeError("callback is not a function");
        }
      }
      const readTimeout = config.query_timeout || this.connectionParameters.query_timeout;
      if (readTimeout) {
        const queryCallback = query.callback || (() => {});
        const readTimeoutTimer = setTimeout(() => {
          const error2 = new Error("Query read timeout");
          process.nextTick(() => {
            query.handleError(error2, this.connection);
          });
          queryCallback(error2);
          query.callback = () => {};
          const index2 = this._queryQueue.indexOf(query);
          if (index2 > -1) {
            this._queryQueue.splice(index2, 1);
          }
          this._pulseQueryQueue();
        }, readTimeout);
        query.callback = (err, res) => {
          clearTimeout(readTimeoutTimer);
          queryCallback(err, res);
        };
      }
      if (this.binary && !query.binary) {
        query.binary = true;
      }
      if (query._result && !query._result._types) {
        query._result._types = this._types;
      }
      if (!this._queryable) {
        process.nextTick(() => {
          query.handleError(new Error("Client has encountered a connection error and is not queryable"), this.connection);
        });
        return result;
      }
      if (this._ending) {
        process.nextTick(() => {
          query.handleError(new Error("Client was closed and is not queryable"), this.connection);
        });
        return result;
      }
      if (this._queryQueue.length > 0) {
        queryQueueLengthDeprecationNotice();
      }
      this._queryQueue.push(query);
      this._pulseQueryQueue();
      return result;
    }
    ref() {
      this.connection.ref();
    }
    unref() {
      this.connection.unref();
    }
    getTransactionStatus() {
      return this._txStatus;
    }
    end(cb) {
      this._ending = true;
      if (!this.connection._connecting || this._ended) {
        if (cb) {
          cb();
          return;
        } else {
          return this._Promise.resolve();
        }
      }
      if (this._getActiveQuery() || !this._queryable) {
        this.connection.stream.destroy();
      } else {
        this.connection.end();
      }
      if (cb) {
        this.connection.once("end", cb);
      } else {
        return new this._Promise((resolve3) => {
          this.connection.once("end", resolve3);
        });
      }
    }
    get queryQueue() {
      queryQueueDeprecationNotice();
      return this._queryQueue;
    }
  }
  Client3.Query = Query;
  module.exports = Client3;
});

// ../../node_modules/.pnpm/pg-pool@3.14.0_pg@8.22.0/node_modules/pg-pool/index.js
var require_pg_pool = __commonJS((exports, module) => {
  var EventEmitter = __require("events").EventEmitter;
  var NOOP = function() {};
  var removeWhere = (list, predicate) => {
    const i = list.findIndex(predicate);
    return i === -1 ? undefined : list.splice(i, 1)[0];
  };

  class IdleItem {
    constructor(client, idleListener, timeoutId) {
      this.client = client;
      this.idleListener = idleListener;
      this.timeoutId = timeoutId;
    }
  }

  class PendingItem {
    constructor(callback) {
      this.callback = callback;
    }
  }
  function throwOnDoubleRelease() {
    throw new Error("Release called on client which has already been released to the pool.");
  }
  function promisify2(Promise2, callback) {
    if (callback) {
      return { callback, result: undefined };
    }
    let rej;
    let res;
    const cb = function(err, client) {
      err ? rej(err) : res(client);
    };
    const result = new Promise2(function(resolve3, reject) {
      res = resolve3;
      rej = reject;
    }).catch((err) => {
      Error.captureStackTrace(err);
      throw err;
    });
    return { callback: cb, result };
  }
  function makeIdleListener(pool, client) {
    return function idleListener(err) {
      err.client = client;
      client.removeListener("error", idleListener);
      client.on("error", () => {
        pool.log("additional client error after disconnection due to error", err);
      });
      pool._remove(client);
      pool.emit("error", err, client);
    };
  }

  class Pool extends EventEmitter {
    constructor(options, Client3) {
      super();
      this.options = Object.assign({}, options);
      if (options != null && "password" in options) {
        Object.defineProperty(this.options, "password", {
          configurable: true,
          enumerable: false,
          writable: true,
          value: options.password
        });
      }
      if (options != null && options.ssl && options.ssl.key) {
        Object.defineProperty(this.options.ssl, "key", {
          enumerable: false
        });
      }
      this.options.max = this.options.max || this.options.poolSize || 10;
      this.options.min = this.options.min || 0;
      this.options.maxUses = this.options.maxUses || Infinity;
      this.options.allowExitOnIdle = this.options.allowExitOnIdle || false;
      this.options.maxLifetimeSeconds = this.options.maxLifetimeSeconds || 0;
      this.log = this.options.log || function() {};
      this.Client = this.options.Client || Client3 || require_lib3().Client;
      this.Promise = this.options.Promise || global.Promise;
      if (typeof this.options.idleTimeoutMillis === "undefined") {
        this.options.idleTimeoutMillis = 1e4;
      }
      this._clients = [];
      this._idle = [];
      this._expired = new WeakSet;
      this._pendingQueue = [];
      this._endCallback = undefined;
      this.ending = false;
      this.ended = false;
    }
    _promiseTry(f) {
      const Promise2 = this.Promise;
      if (typeof Promise2.try === "function") {
        return Promise2.try(f);
      }
      return new Promise2((resolve3) => resolve3(f()));
    }
    _isFull() {
      return this._clients.length >= this.options.max;
    }
    _isAboveMin() {
      return this._clients.length > this.options.min;
    }
    _pulseQueue() {
      this.log("pulse queue");
      if (this.ended) {
        this.log("pulse queue ended");
        return;
      }
      if (this.ending) {
        this.log("pulse queue on ending");
        if (this._idle.length) {
          this._idle.slice().map((item) => {
            this._remove(item.client);
          });
        }
        if (!this._clients.length) {
          this.ended = true;
          this._endCallback();
        }
        return;
      }
      if (!this._pendingQueue.length) {
        this.log("no queued requests");
        return;
      }
      if (!this._idle.length && this._isFull()) {
        return;
      }
      const pendingItem = this._pendingQueue.shift();
      if (this._idle.length) {
        const idleItem = this._idle.pop();
        clearTimeout(idleItem.timeoutId);
        const client = idleItem.client;
        client.ref && client.ref();
        const idleListener = idleItem.idleListener;
        return this._acquireClient(client, pendingItem, idleListener, false);
      }
      if (!this._isFull()) {
        return this.newClient(pendingItem);
      }
      throw new Error("unexpected condition");
    }
    _remove(client, callback) {
      const removed = removeWhere(this._idle, (item) => item.client === client);
      if (removed !== undefined) {
        clearTimeout(removed.timeoutId);
      }
      this._clients = this._clients.filter((c) => c !== client);
      const context10 = this;
      client.end(() => {
        context10.emit("remove", client);
        if (typeof callback === "function") {
          callback();
        }
      });
    }
    connect(cb) {
      if (this.ending) {
        const err = new Error("Cannot use a pool after calling end on the pool");
        return cb ? cb(err) : this.Promise.reject(err);
      }
      const response = promisify2(this.Promise, cb);
      const result = response.result;
      if (this._isFull() || this._idle.length) {
        if (this._idle.length) {
          process.nextTick(() => this._pulseQueue());
        }
        if (!this.options.connectionTimeoutMillis) {
          this._pendingQueue.push(new PendingItem(response.callback));
          return result;
        }
        const queueCallback = (err, res, done) => {
          clearTimeout(tid);
          response.callback(err, res, done);
        };
        const pendingItem = new PendingItem(queueCallback);
        const tid = setTimeout(() => {
          removeWhere(this._pendingQueue, (i) => i.callback === queueCallback);
          pendingItem.timedOut = true;
          response.callback(new Error("timeout exceeded when trying to connect"));
        }, this.options.connectionTimeoutMillis);
        if (tid.unref) {
          tid.unref();
        }
        this._pendingQueue.push(pendingItem);
        return result;
      }
      this.newClient(new PendingItem(response.callback));
      return result;
    }
    newClient(pendingItem) {
      const client = new this.Client(this.options);
      this._clients.push(client);
      const idleListener = makeIdleListener(this, client);
      this.log("checking client timeout");
      let tid;
      let timeoutHit = false;
      if (this.options.connectionTimeoutMillis) {
        tid = setTimeout(() => {
          if (client.connection) {
            this.log("ending client due to timeout");
            timeoutHit = true;
            client.connection.stream.destroy();
          } else if (!client.isConnected()) {
            this.log("ending client due to timeout");
            timeoutHit = true;
            client.end();
          }
        }, this.options.connectionTimeoutMillis);
      }
      this.log("connecting new client");
      client.connect((err) => {
        if (tid) {
          clearTimeout(tid);
        }
        client.on("error", idleListener);
        if (err) {
          this.log("client failed to connect", err);
          this._clients = this._clients.filter((c) => c !== client);
          if (timeoutHit) {
            err = new Error("Connection terminated due to connection timeout", { cause: err });
          }
          this._pulseQueue();
          if (!pendingItem.timedOut) {
            pendingItem.callback(err, undefined, NOOP);
          }
        } else {
          this.log("new client connected");
          if (this.options.onConnect) {
            this._promiseTry(() => this.options.onConnect(client)).then(() => {
              this._afterConnect(client, pendingItem, idleListener);
            }, (hookErr) => {
              this._clients = this._clients.filter((c) => c !== client);
              client.end(() => {
                this._pulseQueue();
                if (!pendingItem.timedOut) {
                  pendingItem.callback(hookErr, undefined, NOOP);
                }
              });
            });
            return;
          }
          return this._afterConnect(client, pendingItem, idleListener);
        }
      });
    }
    _afterConnect(client, pendingItem, idleListener) {
      if (this.options.maxLifetimeSeconds !== 0) {
        const maxLifetimeTimeout = setTimeout(() => {
          this.log("ending client due to expired lifetime");
          this._expired.add(client);
          const idleIndex = this._idle.findIndex((idleItem) => idleItem.client === client);
          if (idleIndex !== -1) {
            this._acquireClient(client, new PendingItem((err, client2, clientRelease) => clientRelease()), idleListener, false);
          }
        }, this.options.maxLifetimeSeconds * 1000);
        maxLifetimeTimeout.unref();
        client.once("end", () => clearTimeout(maxLifetimeTimeout));
      }
      return this._acquireClient(client, pendingItem, idleListener, true);
    }
    _acquireClient(client, pendingItem, idleListener, isNew) {
      if (isNew) {
        this.emit("connect", client);
      }
      this.emit("acquire", client);
      client.release = this._releaseOnce(client, idleListener);
      client.removeListener("error", idleListener);
      if (!pendingItem.timedOut) {
        if (isNew && this.options.verify) {
          this.options.verify(client, (err) => {
            if (err) {
              client.release(err);
              return pendingItem.callback(err, undefined, NOOP);
            }
            pendingItem.callback(undefined, client, client.release);
          });
        } else {
          pendingItem.callback(undefined, client, client.release);
        }
      } else {
        if (isNew && this.options.verify) {
          this.options.verify(client, client.release);
        } else {
          client.release();
        }
      }
    }
    _releaseOnce(client, idleListener) {
      let released = false;
      return (err) => {
        if (released) {
          throwOnDoubleRelease();
        }
        released = true;
        this._release(client, idleListener, err);
      };
    }
    _release(client, idleListener, err) {
      client.on("error", idleListener);
      client._poolUseCount = (client._poolUseCount || 0) + 1;
      this.emit("release", err, client);
      if (err || this.ending || !client._queryable || client._ending || client._poolUseCount >= this.options.maxUses) {
        if (client._poolUseCount >= this.options.maxUses) {
          this.log("remove expended client");
        }
        return this._remove(client, this._pulseQueue.bind(this));
      }
      const isExpired = this._expired.has(client);
      if (isExpired) {
        this.log("remove expired client");
        this._expired.delete(client);
        return this._remove(client, this._pulseQueue.bind(this));
      }
      let tid;
      if (this.options.idleTimeoutMillis && this._isAboveMin()) {
        tid = setTimeout(() => {
          if (this._isAboveMin()) {
            this.log("remove idle client");
            this._remove(client, this._pulseQueue.bind(this));
          }
        }, this.options.idleTimeoutMillis);
        if (this.options.allowExitOnIdle) {
          tid.unref();
        }
      }
      if (this.options.allowExitOnIdle) {
        client.unref();
      }
      this._idle.push(new IdleItem(client, idleListener, tid));
      this._pulseQueue();
    }
    query(text2, values, cb) {
      if (typeof text2 === "function") {
        const response2 = promisify2(this.Promise, text2);
        setImmediate(function() {
          return response2.callback(new Error("Passing a function as the first parameter to pool.query is not supported"));
        });
        return response2.result;
      }
      if (typeof values === "function") {
        cb = values;
        values = undefined;
      }
      const response = promisify2(this.Promise, cb);
      cb = response.callback;
      this.connect((err, client) => {
        if (err) {
          return cb(err);
        }
        let clientReleased = false;
        const onError = (err2) => {
          if (clientReleased) {
            return;
          }
          clientReleased = true;
          client.release(err2);
          cb(err2);
        };
        client.once("error", onError);
        this.log("dispatching query");
        try {
          client.query(text2, values, (err2, res) => {
            this.log("query dispatched");
            client.removeListener("error", onError);
            if (clientReleased) {
              return;
            }
            clientReleased = true;
            client.release(err2);
            if (err2) {
              return cb(err2);
            }
            return cb(undefined, res);
          });
        } catch (err2) {
          client.release(err2);
          return cb(err2);
        }
      });
      return response.result;
    }
    end(cb) {
      this.log("ending");
      if (this.ending) {
        const err = new Error("Called end on pool more than once");
        return cb ? cb(err) : this.Promise.reject(err);
      }
      this.ending = true;
      const promised = promisify2(this.Promise, cb);
      this._endCallback = promised.callback;
      this._pulseQueue();
      return promised.result;
    }
    get waitingCount() {
      return this._pendingQueue.length;
    }
    get idleCount() {
      return this._idle.length;
    }
    get expiredCount() {
      return this._clients.reduce((acc, client) => acc + (this._expired.has(client) ? 1 : 0), 0);
    }
    get totalCount() {
      return this._clients.length;
    }
  }
  module.exports = Pool;
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/native/query.js
var require_query2 = __commonJS((exports, module) => {
  var EventEmitter = __require("events").EventEmitter;
  var util2 = __require("util");
  var utils = require_utils11();
  var NativeQuery = module.exports = function(config, values, callback) {
    EventEmitter.call(this);
    config = utils.normalizeQueryConfig(config, values, callback);
    this.text = config.text;
    this.values = config.values;
    this.name = config.name;
    this.queryMode = config.queryMode;
    this.callback = config.callback;
    this.state = "new";
    this._arrayMode = config.rowMode === "array";
    this._emitRowEvents = false;
    this.on("newListener", function(event) {
      if (event === "row")
        this._emitRowEvents = true;
    }.bind(this));
  };
  util2.inherits(NativeQuery, EventEmitter);
  var errorFieldMap = {
    sqlState: "code",
    statementPosition: "position",
    messagePrimary: "message",
    context: "where",
    schemaName: "schema",
    tableName: "table",
    columnName: "column",
    dataTypeName: "dataType",
    constraintName: "constraint",
    sourceFile: "file",
    sourceLine: "line",
    sourceFunction: "routine"
  };
  NativeQuery.prototype.handleError = function(err) {
    const fields = this.native.pq.resultErrorFields();
    if (fields) {
      for (const key in fields) {
        const normalizedFieldName = errorFieldMap[key] || key;
        err[normalizedFieldName] = fields[key];
      }
    }
    if (this.callback) {
      this.callback(err);
    } else {
      this.emit("error", err);
    }
    this.state = "error";
  };
  NativeQuery.prototype.then = function(onSuccess, onFailure) {
    return this._getPromise().then(onSuccess, onFailure);
  };
  NativeQuery.prototype.catch = function(callback) {
    return this._getPromise().catch(callback);
  };
  NativeQuery.prototype._getPromise = function() {
    if (this._promise)
      return this._promise;
    this._promise = new Promise(function(resolve3, reject) {
      this._once("end", resolve3);
      this._once("error", reject);
    }.bind(this));
    return this._promise;
  };
  NativeQuery.prototype.submit = function(client) {
    this.state = "running";
    const self2 = this;
    this.native = client.native;
    client.native.arrayMode = this._arrayMode;
    let after = function(err, rows, results) {
      client.native.arrayMode = false;
      setImmediate(function() {
        self2.emit("_done");
      });
      if (err) {
        return self2.handleError(err);
      }
      if (self2._emitRowEvents) {
        if (results.length > 1) {
          rows.forEach((rowOfRows, i) => {
            rowOfRows.forEach((row) => {
              self2.emit("row", row, results[i]);
            });
          });
        } else {
          rows.forEach(function(row) {
            self2.emit("row", row, results);
          });
        }
      }
      self2.state = "end";
      self2.emit("end", results);
      if (self2.callback) {
        self2.callback(null, results);
      }
    };
    if (process.domain) {
      after = process.domain.bind(after);
    }
    if (this.name) {
      if (this.name.length > 63) {
        console.error("Warning! Postgres only supports 63 characters for query names.");
        console.error("You supplied %s (%s)", this.name, this.name.length);
        console.error("This can cause conflicts and silent errors executing queries");
      }
      const values = (this.values || []).map(utils.prepareValue);
      if (client.namedQueries[this.name]) {
        if (this.text && client.namedQueries[this.name] !== this.text) {
          const err = new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);
          return after(err);
        }
        return client.native.execute(this.name, values, after);
      }
      return client.native.prepare(this.name, this.text, values.length, function(err) {
        if (err)
          return after(err);
        client.namedQueries[self2.name] = self2.text;
        return self2.native.execute(self2.name, values, after);
      });
    } else if (this.values) {
      if (!Array.isArray(this.values)) {
        const err = new Error("Query values must be an array");
        return after(err);
      }
      const vals = this.values.map(utils.prepareValue);
      client.native.query(this.text, vals, after);
    } else if (this.queryMode === "extended") {
      client.native.query(this.text, [], after);
    } else {
      client.native.query(this.text, after);
    }
  };
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/native/client.js
var require_client2 = __commonJS((exports, module) => {
  var nodeUtils = __require("util");
  var Native;
  try {
    Native = (()=>{throw new Error("Cannot require module "+"pg-native");})();
  } catch (e) {
    throw e;
  }
  var TypeOverrides = require_type_overrides();
  var EventEmitter = __require("events").EventEmitter;
  var util2 = __require("util");
  var ConnectionParameters = require_connection_parameters();
  var NativeQuery = require_query2();
  var queryQueueLengthDeprecationNotice = nodeUtils.deprecate(() => {}, "Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.");
  var Client3 = module.exports = function(config) {
    EventEmitter.call(this);
    config = config || {};
    this._Promise = config.Promise || global.Promise;
    this._types = new TypeOverrides(config.types);
    this.native = new Native({
      types: this._types
    });
    this._queryQueue = [];
    this._ending = false;
    this._connecting = false;
    this._connected = false;
    this._queryable = true;
    const cp = this.connectionParameters = new ConnectionParameters(config);
    if (config.nativeConnectionString)
      cp.nativeConnectionString = config.nativeConnectionString;
    this.user = cp.user;
    Object.defineProperty(this, "password", {
      configurable: true,
      enumerable: false,
      writable: true,
      value: cp.password
    });
    this.database = cp.database;
    this.host = cp.host;
    this.port = cp.port;
    this.namedQueries = {};
  };
  Client3.Query = NativeQuery;
  util2.inherits(Client3, EventEmitter);
  Client3.prototype._errorAllQueries = function(err) {
    const enqueueError = (query) => {
      process.nextTick(() => {
        query.native = this.native;
        query.handleError(err);
      });
    };
    if (this._hasActiveQuery()) {
      enqueueError(this._activeQuery);
      this._activeQuery = null;
    }
    this._queryQueue.forEach(enqueueError);
    this._queryQueue.length = 0;
  };
  Client3.prototype._connect = function(cb) {
    const self2 = this;
    if (this._connecting) {
      process.nextTick(() => cb(new Error("Client has already been connected. You cannot reuse a client.")));
      return;
    }
    this._connecting = true;
    this.connectionParameters.getLibpqConnectionString(function(err, conString) {
      if (self2.connectionParameters.nativeConnectionString)
        conString = self2.connectionParameters.nativeConnectionString;
      if (err)
        return cb(err);
      self2.native.connect(conString, function(err2) {
        if (err2) {
          self2.native.end();
          return cb(err2);
        }
        self2._connected = true;
        self2.native.on("error", function(err3) {
          self2._queryable = false;
          self2._errorAllQueries(err3);
          self2.emit("error", err3);
        });
        self2.native.on("notification", function(msg) {
          self2.emit("notification", {
            channel: msg.relname,
            payload: msg.extra
          });
        });
        self2.emit("connect");
        self2._pulseQueryQueue(true);
        cb(null, this);
      });
    });
  };
  Client3.prototype.connect = function(callback) {
    if (callback) {
      this._connect(callback);
      return;
    }
    return new this._Promise((resolve3, reject) => {
      this._connect((error2) => {
        if (error2) {
          reject(error2);
        } else {
          resolve3(this);
        }
      });
    });
  };
  Client3.prototype.query = function(config, values, callback) {
    let query;
    let result;
    let readTimeout;
    let readTimeoutTimer;
    let queryCallback;
    if (config === null || config === undefined) {
      throw new TypeError("Client was passed a null or undefined query");
    } else if (typeof config.submit === "function") {
      readTimeout = config.query_timeout || this.connectionParameters.query_timeout;
      result = query = config;
      if (typeof values === "function") {
        config.callback = values;
      }
    } else {
      readTimeout = config.query_timeout || this.connectionParameters.query_timeout;
      query = new NativeQuery(config, values, callback);
      if (!query.callback) {
        let resolveOut, rejectOut;
        result = new this._Promise((resolve3, reject) => {
          resolveOut = resolve3;
          rejectOut = reject;
        }).catch((err) => {
          Error.captureStackTrace(err);
          throw err;
        });
        query.callback = (err, res) => err ? rejectOut(err) : resolveOut(res);
      }
    }
    if (readTimeout) {
      queryCallback = query.callback || (() => {});
      readTimeoutTimer = setTimeout(() => {
        const error2 = new Error("Query read timeout");
        process.nextTick(() => {
          query.handleError(error2, this.connection);
        });
        queryCallback(error2);
        query.callback = () => {};
        const index2 = this._queryQueue.indexOf(query);
        if (index2 > -1) {
          this._queryQueue.splice(index2, 1);
        }
        this._pulseQueryQueue();
      }, readTimeout);
      query.callback = (err, res) => {
        clearTimeout(readTimeoutTimer);
        queryCallback(err, res);
      };
    }
    if (!this._queryable) {
      query.native = this.native;
      process.nextTick(() => {
        query.handleError(new Error("Client has encountered a connection error and is not queryable"));
      });
      return result;
    }
    if (this._ending) {
      query.native = this.native;
      process.nextTick(() => {
        query.handleError(new Error("Client was closed and is not queryable"));
      });
      return result;
    }
    if (this._queryQueue.length > 0) {
      queryQueueLengthDeprecationNotice();
    }
    this._queryQueue.push(query);
    this._pulseQueryQueue();
    return result;
  };
  Client3.prototype.end = function(cb) {
    const self2 = this;
    this._ending = true;
    if (this._connecting && !this._connected) {
      this.once("connect", () => {
        this.end(() => {});
      });
    }
    let result;
    if (!cb) {
      result = new this._Promise(function(resolve3, reject) {
        cb = (err) => err ? reject(err) : resolve3();
      });
    }
    this.native.end(function() {
      self2._connected = false;
      self2._errorAllQueries(new Error("Connection terminated"));
      process.nextTick(() => {
        self2.emit("end");
        if (cb)
          cb();
      });
    });
    return result;
  };
  Client3.prototype._hasActiveQuery = function() {
    return this._activeQuery && this._activeQuery.state !== "error" && this._activeQuery.state !== "end";
  };
  Client3.prototype._pulseQueryQueue = function(initialConnection) {
    if (!this._connected) {
      return;
    }
    if (this._hasActiveQuery()) {
      return;
    }
    const query = this._queryQueue.shift();
    if (!query) {
      if (!initialConnection) {
        this.emit("drain");
      }
      return;
    }
    this._activeQuery = query;
    query.submit(this);
    const self2 = this;
    query.once("_done", function() {
      self2._pulseQueryQueue();
    });
  };
  Client3.prototype.cancel = function(query) {
    if (this._activeQuery === query) {
      this.native.cancel(function() {});
    } else if (this._queryQueue.indexOf(query) !== -1) {
      this._queryQueue.splice(this._queryQueue.indexOf(query), 1);
    }
  };
  Client3.prototype.ref = function() {};
  Client3.prototype.unref = function() {};
  Client3.prototype.setTypeParser = function(oid, format, parseFn) {
    return this._types.setTypeParser(oid, format, parseFn);
  };
  Client3.prototype.getTypeParser = function(oid, format) {
    return this._types.getTypeParser(oid, format);
  };
  Client3.prototype.isConnected = function() {
    return this._connected;
  };
  Client3.prototype.getTransactionStatus = function() {
    return this.native.getTransactionStatus();
  };
});

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/lib/index.js
var require_lib3 = __commonJS((exports, module) => {
  var Client3 = require_client();
  var defaults = require_defaults();
  var Connection = require_connection();
  var Result = require_result();
  var utils = require_utils11();
  var Pool = require_pg_pool();
  var TypeOverrides = require_type_overrides();
  var { DatabaseError } = require_dist();
  var { escapeIdentifier, escapeLiteral } = require_utils11();
  var poolFactory = (Client4) => {
    return class BoundPool extends Pool {
      constructor(options) {
        super(options, Client4);
      }
    };
  };
  var PG = function(clientConstructor2) {
    this.defaults = defaults;
    this.Client = clientConstructor2;
    this.Query = this.Client.Query;
    this.Pool = poolFactory(this.Client);
    this._pools = [];
    this.Connection = Connection;
    this.types = require_pg_types();
    this.DatabaseError = DatabaseError;
    this.TypeOverrides = TypeOverrides;
    this.escapeIdentifier = escapeIdentifier;
    this.escapeLiteral = escapeLiteral;
    this.Result = Result;
    this.utils = utils;
  };
  var clientConstructor = Client3;
  var forceNative = false;
  try {
    forceNative = !!process.env.NODE_PG_FORCE_NATIVE;
  } catch {}
  if (forceNative) {
    clientConstructor = require_client2();
  }
  module.exports = new PG(clientConstructor);
  Object.defineProperty(module.exports, "native", {
    configurable: true,
    enumerable: false,
    get() {
      let native = null;
      try {
        native = new PG(require_client2());
      } catch (err) {
        if (err.code !== "MODULE_NOT_FOUND") {
          throw err;
        }
      }
      Object.defineProperty(module.exports, "native", {
        value: native
      });
      return native;
    }
  });
});

// ../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js
var require_err_helpers = __commonJS((exports, module) => {
  var isErrorLike = (err) => {
    return err && typeof err.message === "string";
  };
  var getErrorCause = (err) => {
    if (!err)
      return;
    const cause = err.cause;
    if (typeof cause === "function") {
      const causeResult = err.cause();
      return isErrorLike(causeResult) ? causeResult : undefined;
    } else {
      return isErrorLike(cause) ? cause : undefined;
    }
  };
  var _stackWithCauses = (err, seen) => {
    if (!isErrorLike(err))
      return "";
    const stack = err.stack || "";
    if (seen.has(err)) {
      return stack + `
causes have become circular...`;
    }
    const cause = getErrorCause(err);
    if (cause) {
      seen.add(err);
      return stack + `
caused by: ` + _stackWithCauses(cause, seen);
    } else {
      return stack;
    }
  };
  var stackWithCauses = (err) => _stackWithCauses(err, new Set);
  var _messageWithCauses = (err, seen, skip) => {
    if (!isErrorLike(err))
      return "";
    const message = skip ? "" : err.message || "";
    if (seen.has(err)) {
      return message + ": ...";
    }
    const cause = getErrorCause(err);
    if (cause) {
      seen.add(err);
      const skipIfVErrorStyleCause = typeof err.cause === "function";
      return message + (skipIfVErrorStyleCause ? "" : ": ") + _messageWithCauses(cause, seen, skipIfVErrorStyleCause);
    } else {
      return message;
    }
  };
  var messageWithCauses = (err) => _messageWithCauses(err, new Set);
  module.exports = {
    isErrorLike,
    getErrorCause,
    stackWithCauses,
    messageWithCauses
  };
});

// ../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-proto.js
var require_err_proto = __commonJS((exports, module) => {
  var seen = Symbol("circular-ref-tag");
  var rawSymbol = Symbol("pino-raw-err-ref");
  var pinoErrProto = Object.create({}, {
    type: {
      enumerable: true,
      writable: true,
      value: undefined
    },
    message: {
      enumerable: true,
      writable: true,
      value: undefined
    },
    stack: {
      enumerable: true,
      writable: true,
      value: undefined
    },
    aggregateErrors: {
      enumerable: true,
      writable: true,
      value: undefined
    },
    raw: {
      enumerable: false,
      get: function() {
        return this[rawSymbol];
      },
      set: function(val) {
        this[rawSymbol] = val;
      }
    }
  });
  Object.defineProperty(pinoErrProto, rawSymbol, {
    writable: true,
    value: {}
  });
  module.exports = {
    pinoErrProto,
    pinoErrorSymbols: {
      seen,
      rawSymbol
    }
  };
});

// ../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js
var require_err = __commonJS((exports, module) => {
  module.exports = errSerializer;
  var { messageWithCauses, stackWithCauses, isErrorLike } = require_err_helpers();
  var { pinoErrProto, pinoErrorSymbols } = require_err_proto();
  var { seen } = pinoErrorSymbols;
  var { toString } = Object.prototype;
  function errSerializer(err) {
    if (!isErrorLike(err)) {
      return err;
    }
    err[seen] = undefined;
    const _err = Object.create(pinoErrProto);
    _err.type = toString.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name;
    _err.message = messageWithCauses(err);
    _err.stack = stackWithCauses(err);
    if (Array.isArray(err.errors)) {
      _err.aggregateErrors = err.errors.map((err2) => errSerializer(err2));
    }
    for (const key in err) {
      if (_err[key] === undefined) {
        const val = err[key];
        if (isErrorLike(val)) {
          if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val, seen)) {
            _err[key] = errSerializer(val);
          }
        } else {
          _err[key] = val;
        }
      }
    }
    delete err[seen];
    _err.raw = err;
    return _err;
  }
});

// ../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js
var require_err_with_cause = __commonJS((exports, module) => {
  module.exports = errWithCauseSerializer;
  var { isErrorLike } = require_err_helpers();
  var { pinoErrProto, pinoErrorSymbols } = require_err_proto();
  var { seen } = pinoErrorSymbols;
  var { toString } = Object.prototype;
  function errWithCauseSerializer(err) {
    if (!isErrorLike(err)) {
      return err;
    }
    err[seen] = undefined;
    const _err = Object.create(pinoErrProto);
    _err.type = toString.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name;
    _err.message = err.message;
    _err.stack = err.stack;
    if (Array.isArray(err.errors)) {
      _err.aggregateErrors = err.errors.map((err2) => errWithCauseSerializer(err2));
    }
    if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) {
      _err.cause = errWithCauseSerializer(err.cause);
    }
    for (const key in err) {
      if (_err[key] === undefined) {
        const val = err[key];
        if (isErrorLike(val)) {
          if (!Object.prototype.hasOwnProperty.call(val, seen)) {
            _err[key] = errWithCauseSerializer(val);
          }
        } else {
          _err[key] = val;
        }
      }
    }
    delete err[seen];
    _err.raw = err;
    return _err;
  }
});

// ../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/req.js
var require_req = __commonJS((exports, module) => {
  module.exports = {
    mapHttpRequest,
    reqSerializer
  };
  var rawSymbol = Symbol("pino-raw-req-ref");
  var pinoReqProto = Object.create({}, {
    id: {
      enumerable: true,
      writable: true,
      value: ""
    },
    method: {
      enumerable: true,
      writable: true,
      value: ""
    },
    url: {
      enumerable: true,
      writable: true,
      value: ""
    },
    query: {
      enumerable: true,
      writable: true,
      value: ""
    },
    params: {
      enumerable: true,
      writable: true,
      value: ""
    },
    headers: {
      enumerable: true,
      writable: true,
      value: {}
    },
    remoteAddress: {
      enumerable: true,
      writable: true,
      value: ""
    },
    remotePort: {
      enumerable: true,
      writable: true,
      value: ""
    },
    raw: {
      enumerable: false,
      get: function() {
        return this[rawSymbol];
      },
      set: function(val) {
        this[rawSymbol] = val;
      }
    }
  });
  Object.defineProperty(pinoReqProto, rawSymbol, {
    writable: true,
    value: {}
  });
  function reqSerializer(req) {
    const connection = req.info || req.socket;
    const _req = Object.create(pinoReqProto);
    _req.id = typeof req.id === "function" ? req.id() : req.id || (req.info ? req.info.id : undefined);
    _req.method = req.method;
    if (req.originalUrl) {
      _req.url = req.originalUrl;
    } else {
      const path2 = req.path;
      _req.url = typeof path2 === "string" ? path2 : req.url ? req.url.path || req.url : undefined;
    }
    if (req.query) {
      _req.query = req.query;
    }
    if (req.params) {
      _req.params = req.params;
    }
    _req.headers = req.headers;
    _req.remoteAddress = connection && connection.remoteAddress;
    _req.remotePort = connection && connection.remotePort;
    _req.raw = req.raw || req;
    return _req;
  }
  function mapHttpRequest(req) {
    return {
      req: reqSerializer(req)
    };
  }
});

// ../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/res.js
var require_res = __commonJS((exports, module) => {
  module.exports = {
    mapHttpResponse,
    resSerializer
  };
  var rawSymbol = Symbol("pino-raw-res-ref");
  var pinoResProto = Object.create({}, {
    statusCode: {
      enumerable: true,
      writable: true,
      value: 0
    },
    headers: {
      enumerable: true,
      writable: true,
      value: ""
    },
    raw: {
      enumerable: false,
      get: function() {
        return this[rawSymbol];
      },
      set: function(val) {
        this[rawSymbol] = val;
      }
    }
  });
  Object.defineProperty(pinoResProto, rawSymbol, {
    writable: true,
    value: {}
  });
  function resSerializer(res) {
    const _res = Object.create(pinoResProto);
    _res.statusCode = res.headersSent ? res.statusCode : null;
    _res.headers = res.getHeaders ? res.getHeaders() : res._headers;
    _res.raw = res;
    return _res;
  }
  function mapHttpResponse(res) {
    return {
      res: resSerializer(res)
    };
  }
});

// ../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js
var require_pino_std_serializers = __commonJS((exports, module) => {
  var errSerializer = require_err();
  var errWithCauseSerializer = require_err_with_cause();
  var reqSerializers = require_req();
  var resSerializers = require_res();
  module.exports = {
    err: errSerializer,
    errWithCause: errWithCauseSerializer,
    mapHttpRequest: reqSerializers.mapHttpRequest,
    mapHttpResponse: resSerializers.mapHttpResponse,
    req: reqSerializers.reqSerializer,
    res: resSerializers.resSerializer,
    wrapErrorSerializer: function wrapErrorSerializer(customSerializer) {
      if (customSerializer === errSerializer)
        return customSerializer;
      return function wrapErrSerializer(err) {
        return customSerializer(errSerializer(err));
      };
    },
    wrapRequestSerializer: function wrapRequestSerializer(customSerializer) {
      if (customSerializer === reqSerializers.reqSerializer)
        return customSerializer;
      return function wrappedReqSerializer(req) {
        return customSerializer(reqSerializers.reqSerializer(req));
      };
    },
    wrapResponseSerializer: function wrapResponseSerializer(customSerializer) {
      if (customSerializer === resSerializers.resSerializer)
        return customSerializer;
      return function wrappedResSerializer(res) {
        return customSerializer(resSerializers.resSerializer(res));
      };
    }
  };
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js
var require_caller = __commonJS((exports, module) => {
  function noOpPrepareStackTrace(_, stack) {
    return stack;
  }
  module.exports = function getCallers() {
    const originalPrepare = Error.prepareStackTrace;
    Error.prepareStackTrace = noOpPrepareStackTrace;
    const stack = new Error().stack;
    Error.prepareStackTrace = originalPrepare;
    if (!Array.isArray(stack)) {
      return;
    }
    const entries = stack.slice(2);
    const fileNames = [];
    for (const entry of entries) {
      if (!entry) {
        continue;
      }
      fileNames.push(entry.getFileName());
    }
    return fileNames;
  };
});

// ../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js
var require_redact = __commonJS((exports, module) => {
  function deepClone(obj) {
    if (obj === null || typeof obj !== "object") {
      return obj;
    }
    if (obj instanceof Date) {
      return new Date(obj.getTime());
    }
    if (obj instanceof Array) {
      const cloned = [];
      for (let i = 0;i < obj.length; i++) {
        cloned[i] = deepClone(obj[i]);
      }
      return cloned;
    }
    if (typeof obj === "object") {
      const cloned = Object.create(Object.getPrototypeOf(obj));
      for (const key in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, key)) {
          cloned[key] = deepClone(obj[key]);
        }
      }
      return cloned;
    }
    return obj;
  }
  function parsePath(path2) {
    const parts = [];
    let current = "";
    let inBrackets = false;
    let inQuotes = false;
    let quoteChar = "";
    for (let i = 0;i < path2.length; i++) {
      const char2 = path2[i];
      if (!inBrackets && char2 === ".") {
        if (current) {
          parts.push(current);
          current = "";
        }
      } else if (char2 === "[") {
        if (current) {
          parts.push(current);
          current = "";
        }
        inBrackets = true;
      } else if (char2 === "]" && inBrackets) {
        parts.push(current);
        current = "";
        inBrackets = false;
        inQuotes = false;
      } else if ((char2 === '"' || char2 === "'") && inBrackets) {
        if (!inQuotes) {
          inQuotes = true;
          quoteChar = char2;
        } else if (char2 === quoteChar) {
          inQuotes = false;
          quoteChar = "";
        } else {
          current += char2;
        }
      } else {
        current += char2;
      }
    }
    if (current) {
      parts.push(current);
    }
    return parts;
  }
  function setValue(obj, parts, value) {
    let current = obj;
    for (let i = 0;i < parts.length - 1; i++) {
      const key = parts[i];
      if (typeof current !== "object" || current === null || !(key in current)) {
        return false;
      }
      if (typeof current[key] !== "object" || current[key] === null) {
        return false;
      }
      current = current[key];
    }
    const lastKey = parts[parts.length - 1];
    if (lastKey === "*") {
      if (Array.isArray(current)) {
        for (let i = 0;i < current.length; i++) {
          current[i] = value;
        }
      } else if (typeof current === "object" && current !== null) {
        for (const key in current) {
          if (Object.prototype.hasOwnProperty.call(current, key)) {
            current[key] = value;
          }
        }
      }
    } else {
      if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) {
        current[lastKey] = value;
      }
    }
    return true;
  }
  function removeKey(obj, parts) {
    let current = obj;
    for (let i = 0;i < parts.length - 1; i++) {
      const key = parts[i];
      if (typeof current !== "object" || current === null || !(key in current)) {
        return false;
      }
      if (typeof current[key] !== "object" || current[key] === null) {
        return false;
      }
      current = current[key];
    }
    const lastKey = parts[parts.length - 1];
    if (lastKey === "*") {
      if (Array.isArray(current)) {
        for (let i = 0;i < current.length; i++) {
          current[i] = undefined;
        }
      } else if (typeof current === "object" && current !== null) {
        for (const key in current) {
          if (Object.prototype.hasOwnProperty.call(current, key)) {
            delete current[key];
          }
        }
      }
    } else {
      if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) {
        delete current[lastKey];
      }
    }
    return true;
  }
  var PATH_NOT_FOUND = Symbol("PATH_NOT_FOUND");
  function getValueIfExists(obj, parts) {
    let current = obj;
    for (const part of parts) {
      if (current === null || current === undefined) {
        return PATH_NOT_FOUND;
      }
      if (typeof current !== "object" || current === null) {
        return PATH_NOT_FOUND;
      }
      if (!(part in current)) {
        return PATH_NOT_FOUND;
      }
      current = current[part];
    }
    return current;
  }
  function getValue(obj, parts) {
    let current = obj;
    for (const part of parts) {
      if (current === null || current === undefined) {
        return;
      }
      if (typeof current !== "object" || current === null) {
        return;
      }
      current = current[part];
    }
    return current;
  }
  function redactPaths(obj, paths, censor, remove = false) {
    for (const path2 of paths) {
      const parts = parsePath(path2);
      if (parts.includes("*")) {
        redactWildcardPath(obj, parts, censor, path2, remove);
      } else {
        if (remove) {
          removeKey(obj, parts);
        } else {
          const value = getValueIfExists(obj, parts);
          if (value === PATH_NOT_FOUND) {
            continue;
          }
          const actualCensor = typeof censor === "function" ? censor(value, parts) : censor;
          setValue(obj, parts, actualCensor);
        }
      }
    }
  }
  function redactWildcardPath(obj, parts, censor, originalPath, remove = false) {
    const wildcardIndex = parts.indexOf("*");
    if (wildcardIndex === parts.length - 1) {
      const parentParts = parts.slice(0, -1);
      let current = obj;
      for (const part of parentParts) {
        if (current === null || current === undefined)
          return;
        if (typeof current !== "object" || current === null)
          return;
        current = current[part];
      }
      if (Array.isArray(current)) {
        if (remove) {
          for (let i = 0;i < current.length; i++) {
            current[i] = undefined;
          }
        } else {
          for (let i = 0;i < current.length; i++) {
            const indexPath = [...parentParts, i.toString()];
            const actualCensor = typeof censor === "function" ? censor(current[i], indexPath) : censor;
            current[i] = actualCensor;
          }
        }
      } else if (typeof current === "object" && current !== null) {
        if (remove) {
          const keysToDelete = [];
          for (const key in current) {
            if (Object.prototype.hasOwnProperty.call(current, key)) {
              keysToDelete.push(key);
            }
          }
          for (const key of keysToDelete) {
            delete current[key];
          }
        } else {
          for (const key in current) {
            const keyPath = [...parentParts, key];
            const actualCensor = typeof censor === "function" ? censor(current[key], keyPath) : censor;
            current[key] = actualCensor;
          }
        }
      }
    } else {
      redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove);
    }
  }
  function redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove = false) {
    const beforeWildcard = parts.slice(0, wildcardIndex);
    const afterWildcard = parts.slice(wildcardIndex + 1);
    const pathArray = [];
    function traverse(current, pathLength) {
      if (pathLength === beforeWildcard.length) {
        if (Array.isArray(current)) {
          for (let i = 0;i < current.length; i++) {
            pathArray[pathLength] = i.toString();
            traverse(current[i], pathLength + 1);
          }
        } else if (typeof current === "object" && current !== null) {
          for (const key in current) {
            pathArray[pathLength] = key;
            traverse(current[key], pathLength + 1);
          }
        }
      } else if (pathLength < beforeWildcard.length) {
        const nextKey = beforeWildcard[pathLength];
        if (current && typeof current === "object" && current !== null && nextKey in current) {
          pathArray[pathLength] = nextKey;
          traverse(current[nextKey], pathLength + 1);
        }
      } else {
        if (afterWildcard.includes("*")) {
          const wrappedCensor = typeof censor === "function" ? (value, path2) => {
            const fullPath = [...pathArray.slice(0, pathLength), ...path2];
            return censor(value, fullPath);
          } : censor;
          redactWildcardPath(current, afterWildcard, wrappedCensor, originalPath, remove);
        } else {
          if (remove) {
            removeKey(current, afterWildcard);
          } else {
            const actualCensor = typeof censor === "function" ? censor(getValue(current, afterWildcard), [...pathArray.slice(0, pathLength), ...afterWildcard]) : censor;
            setValue(current, afterWildcard, actualCensor);
          }
        }
      }
    }
    if (beforeWildcard.length === 0) {
      traverse(obj, 0);
    } else {
      let current = obj;
      for (let i = 0;i < beforeWildcard.length; i++) {
        const part = beforeWildcard[i];
        if (current === null || current === undefined)
          return;
        if (typeof current !== "object" || current === null)
          return;
        current = current[part];
        pathArray[i] = part;
      }
      if (current !== null && current !== undefined) {
        traverse(current, beforeWildcard.length);
      }
    }
  }
  function buildPathStructure(pathsToClone) {
    if (pathsToClone.length === 0) {
      return null;
    }
    const pathStructure = new Map;
    for (const path2 of pathsToClone) {
      const parts = parsePath(path2);
      let current = pathStructure;
      for (let i = 0;i < parts.length; i++) {
        const part = parts[i];
        if (!current.has(part)) {
          current.set(part, new Map);
        }
        current = current.get(part);
      }
    }
    return pathStructure;
  }
  function selectiveClone(obj, pathStructure) {
    if (!pathStructure) {
      return obj;
    }
    function cloneSelectively(source, pathMap, depth = 0) {
      if (!pathMap || pathMap.size === 0) {
        return source;
      }
      if (source === null || typeof source !== "object") {
        return source;
      }
      if (source instanceof Date) {
        return new Date(source.getTime());
      }
      if (Array.isArray(source)) {
        const cloned2 = [];
        for (let i = 0;i < source.length; i++) {
          const indexStr = i.toString();
          if (pathMap.has(indexStr) || pathMap.has("*")) {
            cloned2[i] = cloneSelectively(source[i], pathMap.get(indexStr) || pathMap.get("*"));
          } else {
            cloned2[i] = source[i];
          }
        }
        return cloned2;
      }
      const cloned = Object.create(Object.getPrototypeOf(source));
      for (const key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          if (pathMap.has(key) || pathMap.has("*")) {
            cloned[key] = cloneSelectively(source[key], pathMap.get(key) || pathMap.get("*"));
          } else {
            cloned[key] = source[key];
          }
        }
      }
      return cloned;
    }
    return cloneSelectively(obj, pathStructure);
  }
  function validatePath(path2) {
    if (typeof path2 !== "string") {
      throw new Error("Paths must be (non-empty) strings");
    }
    if (path2 === "") {
      throw new Error("Invalid redaction path ()");
    }
    if (path2.includes("..")) {
      throw new Error(`Invalid redaction path (${path2})`);
    }
    if (path2.includes(",")) {
      throw new Error(`Invalid redaction path (${path2})`);
    }
    let bracketCount = 0;
    let inQuotes = false;
    let quoteChar = "";
    for (let i = 0;i < path2.length; i++) {
      const char2 = path2[i];
      if ((char2 === '"' || char2 === "'") && bracketCount > 0) {
        if (!inQuotes) {
          inQuotes = true;
          quoteChar = char2;
        } else if (char2 === quoteChar) {
          inQuotes = false;
          quoteChar = "";
        }
      } else if (char2 === "[" && !inQuotes) {
        bracketCount++;
      } else if (char2 === "]" && !inQuotes) {
        bracketCount--;
        if (bracketCount < 0) {
          throw new Error(`Invalid redaction path (${path2})`);
        }
      }
    }
    if (bracketCount !== 0) {
      throw new Error(`Invalid redaction path (${path2})`);
    }
  }
  function validatePaths(paths) {
    if (!Array.isArray(paths)) {
      throw new TypeError("paths must be an array");
    }
    for (const path2 of paths) {
      validatePath(path2);
    }
  }
  function slowRedact(options = {}) {
    const {
      paths = [],
      censor = "[REDACTED]",
      serialize = JSON.stringify,
      strict = true,
      remove = false
    } = options;
    validatePaths(paths);
    const pathStructure = buildPathStructure(paths);
    return function redact(obj) {
      if (strict && (obj === null || typeof obj !== "object")) {
        if (obj === null || obj === undefined) {
          return serialize ? serialize(obj) : obj;
        }
        if (typeof obj !== "object") {
          return serialize ? serialize(obj) : obj;
        }
      }
      const cloned = selectiveClone(obj, pathStructure);
      const original = obj;
      let actualCensor = censor;
      if (typeof censor === "function") {
        actualCensor = censor;
      }
      redactPaths(cloned, paths, actualCensor, remove);
      if (serialize === false) {
        cloned.restore = function() {
          return deepClone(original);
        };
        return cloned;
      }
      if (typeof serialize === "function") {
        return serialize(cloned);
      }
      return JSON.stringify(cloned);
    };
  }
  module.exports = slowRedact;
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js
var require_symbols = __commonJS((exports, module) => {
  var setLevelSym = Symbol("pino.setLevel");
  var getLevelSym = Symbol("pino.getLevel");
  var levelValSym = Symbol("pino.levelVal");
  var levelCompSym = Symbol("pino.levelComp");
  var useLevelLabelsSym = Symbol("pino.useLevelLabels");
  var useOnlyCustomLevelsSym = Symbol("pino.useOnlyCustomLevels");
  var mixinSym = Symbol("pino.mixin");
  var lsCacheSym = Symbol("pino.lsCache");
  var chindingsSym = Symbol("pino.chindings");
  var asJsonSym = Symbol("pino.asJson");
  var writeSym = Symbol("pino.write");
  var redactFmtSym = Symbol("pino.redactFmt");
  var timeSym = Symbol("pino.time");
  var timeSliceIndexSym = Symbol("pino.timeSliceIndex");
  var streamSym = Symbol("pino.stream");
  var stringifySym = Symbol("pino.stringify");
  var stringifySafeSym = Symbol("pino.stringifySafe");
  var stringifiersSym = Symbol("pino.stringifiers");
  var endSym = Symbol("pino.end");
  var formatOptsSym = Symbol("pino.formatOpts");
  var messageKeySym = Symbol("pino.messageKey");
  var errorKeySym = Symbol("pino.errorKey");
  var nestedKeySym = Symbol("pino.nestedKey");
  var nestedKeyStrSym = Symbol("pino.nestedKeyStr");
  var mixinMergeStrategySym = Symbol("pino.mixinMergeStrategy");
  var msgPrefixSym = Symbol("pino.msgPrefix");
  var wildcardFirstSym = Symbol("pino.wildcardFirst");
  var serializersSym = Symbol.for("pino.serializers");
  var formattersSym = Symbol.for("pino.formatters");
  var hooksSym = Symbol.for("pino.hooks");
  var needsMetadataGsym = Symbol.for("pino.metadata");
  module.exports = {
    setLevelSym,
    getLevelSym,
    levelValSym,
    levelCompSym,
    useLevelLabelsSym,
    mixinSym,
    lsCacheSym,
    chindingsSym,
    asJsonSym,
    writeSym,
    serializersSym,
    redactFmtSym,
    timeSym,
    timeSliceIndexSym,
    streamSym,
    stringifySym,
    stringifySafeSym,
    stringifiersSym,
    endSym,
    formatOptsSym,
    messageKeySym,
    errorKeySym,
    nestedKeySym,
    wildcardFirstSym,
    needsMetadataGsym,
    useOnlyCustomLevelsSym,
    formattersSym,
    hooksSym,
    nestedKeyStrSym,
    mixinMergeStrategySym,
    msgPrefixSym
  };
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js
var require_redaction = __commonJS((exports, module) => {
  var Redact = require_redact();
  var { redactFmtSym, wildcardFirstSym } = require_symbols();
  var rx = /[^.[\]]+|\[([^[\]]*?)\]/g;
  var CENSOR = "[Redacted]";
  var strict = false;
  function redaction(opts, serialize) {
    const { paths, censor, remove } = handle(opts);
    const shape = paths.reduce((o, str) => {
      rx.lastIndex = 0;
      const first = rx.exec(str);
      const next = rx.exec(str);
      let ns = first[1] !== undefined ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0];
      if (ns === "*") {
        ns = wildcardFirstSym;
      }
      if (next === null) {
        o[ns] = null;
        return o;
      }
      if (o[ns] === null) {
        return o;
      }
      const { index: index2 } = next;
      const nextPath = `${str.substr(index2, str.length - 1)}`;
      o[ns] = o[ns] || [];
      if (ns !== wildcardFirstSym && o[ns].length === 0) {
        o[ns].push(...o[wildcardFirstSym] || []);
      }
      if (ns === wildcardFirstSym) {
        Object.keys(o).forEach(function(k) {
          if (o[k]) {
            o[k].push(nextPath);
          }
        });
      }
      o[ns].push(nextPath);
      return o;
    }, {});
    const result = {
      [redactFmtSym]: Redact({ paths, censor, serialize, strict, remove })
    };
    const topCensor = (...args) => {
      return typeof censor === "function" ? serialize(censor(...args)) : serialize(censor);
    };
    return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => {
      if (shape[k] === null) {
        o[k] = (value) => topCensor(value, [k]);
      } else {
        const wrappedCensor = typeof censor === "function" ? (value, path2) => {
          return censor(value, [k, ...path2]);
        } : censor;
        o[k] = Redact({
          paths: shape[k],
          censor: wrappedCensor,
          serialize,
          strict,
          remove
        });
      }
      return o;
    }, result);
  }
  function handle(opts) {
    if (Array.isArray(opts)) {
      opts = { paths: opts, censor: CENSOR };
      return opts;
    }
    let { paths, censor = CENSOR, remove } = opts;
    if (Array.isArray(paths) === false) {
      throw Error("pino – redact must contain an array of strings");
    }
    if (remove === true)
      censor = undefined;
    return { paths, censor, remove };
  }
  module.exports = redaction;
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/time.js
var require_time3 = __commonJS((exports, module) => {
  var nullTime = () => "";
  var epochTime = () => `,"time":${Date.now()}`;
  var unixTime = () => `,"time":${Math.round(Date.now() / 1000)}`;
  var isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"`;
  var NS_PER_MS = 1000000n;
  var NS_PER_SEC = 1000000000n;
  var startWallTimeNs = BigInt(Date.now()) * NS_PER_MS;
  var startHrTime = process.hrtime.bigint();
  var isoTimeNano = () => {
    const elapsedNs = process.hrtime.bigint() - startHrTime;
    const currentTimeNs = startWallTimeNs + elapsedNs;
    const secondsSinceEpoch = currentTimeNs / NS_PER_SEC;
    const nanosWithinSecond = currentTimeNs % NS_PER_SEC;
    const msSinceEpoch = Number(secondsSinceEpoch * 1000n + nanosWithinSecond / 1000000n);
    const date2 = new Date(msSinceEpoch);
    const year = date2.getUTCFullYear();
    const month = (date2.getUTCMonth() + 1).toString().padStart(2, "0");
    const day = date2.getUTCDate().toString().padStart(2, "0");
    const hours = date2.getUTCHours().toString().padStart(2, "0");
    const minutes = date2.getUTCMinutes().toString().padStart(2, "0");
    const seconds = date2.getUTCSeconds().toString().padStart(2, "0");
    return `,"time":"${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${nanosWithinSecond.toString().padStart(9, "0")}Z"`;
  };
  module.exports = { nullTime, epochTime, unixTime, isoTime, isoTimeNano };
});

// ../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js
var require_quick_format_unescaped = __commonJS((exports, module) => {
  function tryStringify(o) {
    try {
      return JSON.stringify(o);
    } catch (e) {
      return '"[Circular]"';
    }
  }
  module.exports = format;
  function format(f, args, opts) {
    var ss = opts && opts.stringify || tryStringify;
    var offset = 1;
    if (typeof f === "object" && f !== null) {
      var len = args.length + offset;
      if (len === 1)
        return f;
      var objects = new Array(len);
      objects[0] = ss(f);
      for (var index2 = 1;index2 < len; index2++) {
        objects[index2] = ss(args[index2]);
      }
      return objects.join(" ");
    }
    if (typeof f !== "string") {
      return f;
    }
    var argLen = args.length;
    if (argLen === 0)
      return f;
    var str = "";
    var a = 1 - offset;
    var lastPos = -1;
    var flen = f && f.length || 0;
    for (var i = 0;i < flen; ) {
      if (f.charCodeAt(i) === 37 && i + 1 < flen) {
        lastPos = lastPos > -1 ? lastPos : 0;
        switch (f.charCodeAt(i + 1)) {
          case 100:
          case 102:
            if (a >= argLen)
              break;
            if (args[a] == null)
              break;
            if (lastPos < i)
              str += f.slice(lastPos, i);
            str += Number(args[a]);
            lastPos = i + 2;
            i++;
            break;
          case 105:
            if (a >= argLen)
              break;
            if (args[a] == null)
              break;
            if (lastPos < i)
              str += f.slice(lastPos, i);
            str += Math.floor(Number(args[a]));
            lastPos = i + 2;
            i++;
            break;
          case 79:
          case 111:
          case 106:
            if (a >= argLen)
              break;
            if (args[a] === undefined)
              break;
            if (lastPos < i)
              str += f.slice(lastPos, i);
            var type2 = typeof args[a];
            if (type2 === "string") {
              str += "'" + args[a] + "'";
              lastPos = i + 2;
              i++;
              break;
            }
            if (type2 === "function") {
              str += args[a].name || "<anonymous>";
              lastPos = i + 2;
              i++;
              break;
            }
            str += ss(args[a]);
            lastPos = i + 2;
            i++;
            break;
          case 115:
            if (a >= argLen)
              break;
            if (lastPos < i)
              str += f.slice(lastPos, i);
            str += String(args[a]);
            lastPos = i + 2;
            i++;
            break;
          case 37:
            if (lastPos < i)
              str += f.slice(lastPos, i);
            str += "%";
            lastPos = i + 2;
            i++;
            a--;
            break;
        }
        ++a;
      }
      ++i;
    }
    if (lastPos === -1)
      return f;
    else if (lastPos < flen) {
      str += f.slice(lastPos);
    }
    return str;
  }
});

// ../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js
var require_atomic_sleep = __commonJS((exports, module) => {
  if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") {
    let sleep = function(ms) {
      const valid = ms > 0 && ms < Infinity;
      if (valid === false) {
        if (typeof ms !== "number" && typeof ms !== "bigint") {
          throw TypeError("sleep: ms must be a number");
        }
        throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
      }
      Atomics.wait(nil, 0, 0, Number(ms));
    };
    const nil = new Int32Array(new SharedArrayBuffer(4));
    module.exports = sleep;
  } else {
    let sleep = function(ms) {
      const valid = ms > 0 && ms < Infinity;
      if (valid === false) {
        if (typeof ms !== "number" && typeof ms !== "bigint") {
          throw TypeError("sleep: ms must be a number");
        }
        throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
      }
      const target = Date.now() + Number(ms);
      while (target > Date.now()) {}
    };
    module.exports = sleep;
  }
});

// ../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js
var require_sonic_boom = __commonJS((exports, module) => {
  var fs2 = __require("fs");
  var EventEmitter = __require("events");
  var inherits = __require("util").inherits;
  var path2 = __require("path");
  var sleep = require_atomic_sleep();
  var assert = __require("assert");
  var BUSY_WRITE_TIMEOUT = 100;
  var kEmptyBuffer = Buffer.allocUnsafe(0);
  var MAX_WRITE = 16 * 1024;
  var kContentModeBuffer = "buffer";
  var kContentModeUtf8 = "utf8";
  var [major, minor] = (process.versions.node || "0.0").split(".").map(Number);
  var kCopyBuffer = major >= 22 && minor >= 7;
  function openFile(file, sonic) {
    sonic._opening = true;
    sonic._writing = true;
    sonic._asyncDrainScheduled = false;
    function fileOpened(err, fd) {
      if (err) {
        sonic._reopening = false;
        sonic._writing = false;
        sonic._opening = false;
        if (sonic.sync) {
          process.nextTick(() => {
            if (sonic.listenerCount("error") > 0) {
              sonic.emit("error", err);
            }
          });
        } else {
          sonic.emit("error", err);
        }
        return;
      }
      const reopening = sonic._reopening;
      sonic.fd = fd;
      sonic.file = file;
      sonic._reopening = false;
      sonic._opening = false;
      sonic._writing = false;
      if (sonic.sync) {
        process.nextTick(() => sonic.emit("ready"));
      } else {
        sonic.emit("ready");
      }
      if (sonic.destroyed) {
        return;
      }
      if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) {
        sonic._actualWrite();
      } else if (reopening) {
        process.nextTick(() => sonic.emit("drain"));
      }
    }
    const flags = sonic.append ? "a" : "w";
    const mode = sonic.mode;
    if (sonic.sync) {
      try {
        if (sonic.mkdir)
          fs2.mkdirSync(path2.dirname(file), { recursive: true });
        const fd = fs2.openSync(file, flags, mode);
        fileOpened(null, fd);
      } catch (err) {
        fileOpened(err);
        throw err;
      }
    } else if (sonic.mkdir) {
      fs2.mkdir(path2.dirname(file), { recursive: true }, (err) => {
        if (err)
          return fileOpened(err);
        fs2.open(file, flags, mode, fileOpened);
      });
    } else {
      fs2.open(file, flags, mode, fileOpened);
    }
  }
  function SonicBoom(opts) {
    if (!(this instanceof SonicBoom)) {
      return new SonicBoom(opts);
    }
    let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {};
    fd = fd || dest;
    this._len = 0;
    this.fd = -1;
    this._bufs = [];
    this._lens = [];
    this._writing = false;
    this._ending = false;
    this._reopening = false;
    this._asyncDrainScheduled = false;
    this._flushPending = false;
    this._hwm = Math.max(minLength || 0, 16387);
    this.file = null;
    this.destroyed = false;
    this.minLength = minLength || 0;
    this.maxLength = maxLength || 0;
    this.maxWrite = maxWrite || MAX_WRITE;
    this._periodicFlush = periodicFlush || 0;
    this._periodicFlushTimer = undefined;
    this.sync = sync || false;
    this.writable = true;
    this._fsync = fsync || false;
    this.append = append || false;
    this.mode = mode;
    this.retryEAGAIN = retryEAGAIN || (() => true);
    this.mkdir = mkdir || false;
    let fsWriteSync;
    let fsWrite;
    if (contentMode === kContentModeBuffer) {
      this._writingBuf = kEmptyBuffer;
      this.write = writeBuffer;
      this.flush = flushBuffer;
      this.flushSync = flushBufferSync;
      this._actualWrite = actualWriteBuffer;
      fsWriteSync = () => fs2.writeSync(this.fd, this._writingBuf);
      fsWrite = () => fs2.write(this.fd, this._writingBuf, this.release);
    } else if (contentMode === undefined || contentMode === kContentModeUtf8) {
      this._writingBuf = "";
      this.write = write;
      this.flush = flush2;
      this.flushSync = flushSync;
      this._actualWrite = actualWrite;
      fsWriteSync = () => fs2.writeSync(this.fd, this._writingBuf, "utf8");
      fsWrite = () => fs2.write(this.fd, this._writingBuf, "utf8", this.release);
    } else {
      throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
    }
    if (typeof fd === "number") {
      this.fd = fd;
      process.nextTick(() => this.emit("ready"));
    } else if (typeof fd === "string") {
      openFile(fd, this);
    } else {
      throw new Error("SonicBoom supports only file descriptors and files");
    }
    if (this.minLength >= this.maxWrite) {
      throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);
    }
    this.release = (err, n) => {
      if (err) {
        if ((err.code === "EAGAIN" || err.code === "EBUSY") && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) {
          if (this.sync) {
            try {
              sleep(BUSY_WRITE_TIMEOUT);
              this.release(undefined, 0);
            } catch (err2) {
              this.release(err2);
            }
          } else {
            setTimeout(fsWrite, BUSY_WRITE_TIMEOUT);
          }
        } else {
          this._writing = false;
          this.emit("error", err);
        }
        return;
      }
      this.emit("write", n);
      const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n);
      this._len = releasedBufObj.len;
      this._writingBuf = releasedBufObj.writingBuf;
      if (this._writingBuf.length) {
        if (!this.sync) {
          fsWrite();
          return;
        }
        try {
          do {
            const n2 = fsWriteSync();
            const releasedBufObj2 = releaseWritingBuf(this._writingBuf, this._len, n2);
            this._len = releasedBufObj2.len;
            this._writingBuf = releasedBufObj2.writingBuf;
          } while (this._writingBuf.length);
        } catch (err2) {
          this.release(err2);
          return;
        }
      }
      if (this._fsync) {
        fs2.fsyncSync(this.fd);
      }
      const len = this._len;
      if (this._reopening) {
        this._writing = false;
        this._reopening = false;
        this.reopen();
      } else if (len > this.minLength) {
        this._actualWrite();
      } else if (this._ending) {
        if (len > 0) {
          this._actualWrite();
        } else {
          this._writing = false;
          actualClose(this);
        }
      } else {
        this._writing = false;
        if (this.sync) {
          if (!this._asyncDrainScheduled) {
            this._asyncDrainScheduled = true;
            process.nextTick(emitDrain, this);
          }
        } else {
          this.emit("drain");
        }
      }
    };
    this.on("newListener", function(name) {
      if (name === "drain") {
        this._asyncDrainScheduled = false;
      }
    });
    if (this._periodicFlush !== 0) {
      this._periodicFlushTimer = setInterval(() => this.flush(null), this._periodicFlush);
      this._periodicFlushTimer.unref();
    }
  }
  function releaseWritingBuf(writingBuf, len, n) {
    if (typeof writingBuf === "string" && Buffer.byteLength(writingBuf) !== n) {
      n = Buffer.from(writingBuf).subarray(0, n).toString().length;
    }
    len = Math.max(len - n, 0);
    writingBuf = writingBuf.slice(n);
    return { writingBuf, len };
  }
  function emitDrain(sonic) {
    const hasListeners = sonic.listenerCount("drain") > 0;
    if (!hasListeners)
      return;
    sonic._asyncDrainScheduled = false;
    sonic.emit("drain");
  }
  inherits(SonicBoom, EventEmitter);
  function mergeBuf(bufs, len) {
    if (bufs.length === 0) {
      return kEmptyBuffer;
    }
    if (bufs.length === 1) {
      return bufs[0];
    }
    return Buffer.concat(bufs, len);
  }
  function write(data) {
    if (this.destroyed) {
      throw new Error("SonicBoom destroyed");
    }
    const len = this._len + data.length;
    const bufs = this._bufs;
    if (this.maxLength && len > this.maxLength) {
      this.emit("drop", data);
      return this._len < this._hwm;
    }
    if (bufs.length === 0 || bufs[bufs.length - 1].length + data.length > this.maxWrite) {
      bufs.push("" + data);
    } else {
      bufs[bufs.length - 1] += data;
    }
    this._len = len;
    if (!this._writing && this._len >= this.minLength) {
      this._actualWrite();
    }
    return this._len < this._hwm;
  }
  function writeBuffer(data) {
    if (this.destroyed) {
      throw new Error("SonicBoom destroyed");
    }
    const len = this._len + data.length;
    const bufs = this._bufs;
    const lens = this._lens;
    if (this.maxLength && len > this.maxLength) {
      this.emit("drop", data);
      return this._len < this._hwm;
    }
    if (bufs.length === 0 || lens[lens.length - 1] + data.length > this.maxWrite) {
      bufs.push([data]);
      lens.push(data.length);
    } else {
      bufs[bufs.length - 1].push(data);
      lens[lens.length - 1] += data.length;
    }
    this._len = len;
    if (!this._writing && this._len >= this.minLength) {
      this._actualWrite();
    }
    return this._len < this._hwm;
  }
  function callFlushCallbackOnDrain(cb) {
    this._flushPending = true;
    const onDrain = () => {
      if (!this._fsync) {
        try {
          fs2.fsync(this.fd, (err) => {
            this._flushPending = false;
            cb(err);
          });
        } catch (err) {
          cb(err);
        }
      } else {
        this._flushPending = false;
        cb();
      }
      this.off("error", onError);
    };
    const onError = (err) => {
      this._flushPending = false;
      cb(err);
      this.off("drain", onDrain);
    };
    this.once("drain", onDrain);
    this.once("error", onError);
  }
  function flush2(cb) {
    if (cb != null && typeof cb !== "function") {
      throw new Error("flush cb must be a function");
    }
    if (this.destroyed) {
      const error2 = new Error("SonicBoom destroyed");
      if (cb) {
        cb(error2);
        return;
      }
      throw error2;
    }
    if (this.minLength <= 0) {
      cb?.();
      return;
    }
    if (cb) {
      callFlushCallbackOnDrain.call(this, cb);
    }
    if (this._writing) {
      return;
    }
    if (this._bufs.length === 0) {
      this._bufs.push("");
    }
    this._actualWrite();
  }
  function flushBuffer(cb) {
    if (cb != null && typeof cb !== "function") {
      throw new Error("flush cb must be a function");
    }
    if (this.destroyed) {
      const error2 = new Error("SonicBoom destroyed");
      if (cb) {
        cb(error2);
        return;
      }
      throw error2;
    }
    if (this.minLength <= 0) {
      cb?.();
      return;
    }
    if (cb) {
      callFlushCallbackOnDrain.call(this, cb);
    }
    if (this._writing) {
      return;
    }
    if (this._bufs.length === 0) {
      this._bufs.push([]);
      this._lens.push(0);
    }
    this._actualWrite();
  }
  SonicBoom.prototype.reopen = function(file) {
    if (this.destroyed) {
      throw new Error("SonicBoom destroyed");
    }
    if (this._opening) {
      this.once("ready", () => {
        this.reopen(file);
      });
      return;
    }
    if (this._ending) {
      return;
    }
    if (!this.file) {
      throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");
    }
    if (file) {
      this.file = file;
    }
    this._reopening = true;
    if (this._writing) {
      return;
    }
    const fd = this.fd;
    this.once("ready", () => {
      if (fd !== this.fd) {
        fs2.close(fd, (err) => {
          if (err) {
            return this.emit("error", err);
          }
        });
      }
    });
    openFile(this.file, this);
  };
  SonicBoom.prototype.end = function() {
    if (this.destroyed) {
      throw new Error("SonicBoom destroyed");
    }
    if (this._opening) {
      this.once("ready", () => {
        this.end();
      });
      return;
    }
    if (this._ending) {
      return;
    }
    this._ending = true;
    if (this._writing) {
      return;
    }
    if (this._len > 0 && this.fd >= 0) {
      this._actualWrite();
    } else {
      actualClose(this);
    }
  };
  function flushSync() {
    if (this.destroyed) {
      throw new Error("SonicBoom destroyed");
    }
    if (this.fd < 0) {
      throw new Error("sonic boom is not ready yet");
    }
    if (!this._writing && this._writingBuf.length > 0) {
      this._bufs.unshift(this._writingBuf);
      this._writingBuf = "";
    }
    let buf = "";
    while (this._bufs.length || buf) {
      if (buf.length <= 0) {
        buf = this._bufs[0];
      }
      try {
        const n = fs2.writeSync(this.fd, buf, "utf8");
        const releasedBufObj = releaseWritingBuf(buf, this._len, n);
        buf = releasedBufObj.writingBuf;
        this._len = releasedBufObj.len;
        if (buf.length <= 0) {
          this._bufs.shift();
        }
      } catch (err) {
        const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY";
        if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) {
          throw err;
        }
        sleep(BUSY_WRITE_TIMEOUT);
      }
    }
    try {
      fs2.fsyncSync(this.fd);
    } catch {}
  }
  function flushBufferSync() {
    if (this.destroyed) {
      throw new Error("SonicBoom destroyed");
    }
    if (this.fd < 0) {
      throw new Error("sonic boom is not ready yet");
    }
    if (!this._writing && this._writingBuf.length > 0) {
      this._bufs.unshift([this._writingBuf]);
      this._writingBuf = kEmptyBuffer;
    }
    let buf = kEmptyBuffer;
    while (this._bufs.length || buf.length) {
      if (buf.length <= 0) {
        buf = mergeBuf(this._bufs[0], this._lens[0]);
      }
      try {
        const n = fs2.writeSync(this.fd, buf);
        buf = buf.subarray(n);
        this._len = Math.max(this._len - n, 0);
        if (buf.length <= 0) {
          this._bufs.shift();
          this._lens.shift();
        }
      } catch (err) {
        const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY";
        if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) {
          throw err;
        }
        sleep(BUSY_WRITE_TIMEOUT);
      }
    }
  }
  SonicBoom.prototype.destroy = function() {
    if (this.destroyed) {
      return;
    }
    actualClose(this);
  };
  function actualWrite() {
    const release3 = this.release;
    this._writing = true;
    this._writingBuf = this._writingBuf || this._bufs.shift() || "";
    if (this.sync) {
      try {
        const written = fs2.writeSync(this.fd, this._writingBuf, "utf8");
        release3(null, written);
      } catch (err) {
        release3(err);
      }
    } else {
      fs2.write(this.fd, this._writingBuf, "utf8", release3);
    }
  }
  function actualWriteBuffer() {
    const release3 = this.release;
    this._writing = true;
    this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
    if (this.sync) {
      try {
        const written = fs2.writeSync(this.fd, this._writingBuf);
        release3(null, written);
      } catch (err) {
        release3(err);
      }
    } else {
      if (kCopyBuffer) {
        this._writingBuf = Buffer.from(this._writingBuf);
      }
      fs2.write(this.fd, this._writingBuf, release3);
    }
  }
  function actualClose(sonic) {
    if (sonic.fd === -1) {
      sonic.once("ready", actualClose.bind(null, sonic));
      return;
    }
    if (sonic._periodicFlushTimer !== undefined) {
      clearInterval(sonic._periodicFlushTimer);
    }
    sonic.destroyed = true;
    sonic._bufs = [];
    sonic._lens = [];
    assert(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
    try {
      fs2.fsync(sonic.fd, closeWrapped);
    } catch {}
    function closeWrapped() {
      if (sonic.fd !== 1 && sonic.fd !== 2) {
        fs2.close(sonic.fd, done);
      } else {
        done();
      }
    }
    function done(err) {
      if (err) {
        sonic.emit("error", err);
        return;
      }
      if (sonic._ending && !sonic._writing) {
        sonic.emit("finish");
      }
      sonic.emit("close");
    }
  }
  SonicBoom.SonicBoom = SonicBoom;
  SonicBoom.default = SonicBoom;
  module.exports = SonicBoom;
});

// ../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js
var require_on_exit_leak_free = __commonJS((exports, module) => {
  var refs = {
    exit: [],
    beforeExit: []
  };
  var functions = {
    exit: onExit,
    beforeExit: onBeforeExit
  };
  var registry;
  function ensureRegistry() {
    if (registry === undefined) {
      registry = new FinalizationRegistry(clear);
    }
  }
  function install(event) {
    if (refs[event].length > 0) {
      return;
    }
    process.on(event, functions[event]);
  }
  function uninstall(event) {
    if (refs[event].length > 0) {
      return;
    }
    process.removeListener(event, functions[event]);
    if (refs.exit.length === 0 && refs.beforeExit.length === 0) {
      registry = undefined;
    }
  }
  function onExit() {
    callRefs("exit");
  }
  function onBeforeExit() {
    callRefs("beforeExit");
  }
  function callRefs(event) {
    for (const ref of refs[event]) {
      const obj = ref.deref();
      const fn = ref.fn;
      if (obj !== undefined) {
        fn(obj, event);
      }
    }
    refs[event] = [];
  }
  function clear(ref) {
    for (const event of ["exit", "beforeExit"]) {
      const index2 = refs[event].indexOf(ref);
      refs[event].splice(index2, index2 + 1);
      uninstall(event);
    }
  }
  function _register(event, obj, fn) {
    if (obj === undefined) {
      throw new Error("the object can't be undefined");
    }
    install(event);
    const ref = new WeakRef(obj);
    ref.fn = fn;
    ensureRegistry();
    registry.register(obj, ref);
    refs[event].push(ref);
  }
  function register2(obj, fn) {
    _register("exit", obj, fn);
  }
  function registerBeforeExit(obj, fn) {
    _register("beforeExit", obj, fn);
  }
  function unregister(obj) {
    if (registry === undefined) {
      return;
    }
    registry.unregister(obj);
    for (const event of ["exit", "beforeExit"]) {
      refs[event] = refs[event].filter((ref) => {
        const _obj = ref.deref();
        return _obj && _obj !== obj;
      });
      uninstall(event);
    }
  }
  module.exports = {
    register: register2,
    registerBeforeExit,
    unregister
  };
});

// ../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json
var require_package = __commonJS((exports, module) => {
  module.exports = {
    name: "thread-stream",
    version: "3.1.0",
    description: "A streaming way to send data to a Node.js Worker Thread",
    main: "index.js",
    types: "index.d.ts",
    dependencies: {
      "real-require": "^0.2.0"
    },
    devDependencies: {
      "@types/node": "^20.1.0",
      "@types/tap": "^15.0.0",
      "@yao-pkg/pkg": "^5.11.5",
      desm: "^1.3.0",
      fastbench: "^1.0.1",
      husky: "^9.0.6",
      "pino-elasticsearch": "^8.0.0",
      "sonic-boom": "^4.0.1",
      standard: "^17.0.0",
      tap: "^16.2.0",
      "ts-node": "^10.8.0",
      typescript: "^5.3.2",
      "why-is-node-running": "^2.2.2"
    },
    scripts: {
      build: "tsc --noEmit",
      test: 'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',
      "test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts",
      "test:ci:js": 'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',
      "test:ci:ts": 'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',
      "test:yarn": 'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',
      transpile: "sh ./test/ts/transpile.sh",
      prepare: "husky install"
    },
    standard: {
      ignore: [
        "test/ts/**/*",
        "test/syntax-error.mjs"
      ]
    },
    repository: {
      type: "git",
      url: "git+https://github.com/mcollina/thread-stream.git"
    },
    keywords: [
      "worker",
      "thread",
      "threads",
      "stream"
    ],
    author: "Matteo Collina <hello@matteocollina.com>",
    license: "MIT",
    bugs: {
      url: "https://github.com/mcollina/thread-stream/issues"
    },
    homepage: "https://github.com/mcollina/thread-stream#readme"
  };
});

// ../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js
var require_wait = __commonJS((exports, module) => {
  var MAX_TIMEOUT = 1000;
  function wait(state, index2, expected, timeout, done) {
    const max = Date.now() + timeout;
    let current = Atomics.load(state, index2);
    if (current === expected) {
      done(null, "ok");
      return;
    }
    let prior = current;
    const check = (backoff) => {
      if (Date.now() > max) {
        done(null, "timed-out");
      } else {
        setTimeout(() => {
          prior = current;
          current = Atomics.load(state, index2);
          if (current === prior) {
            check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
          } else {
            if (current === expected)
              done(null, "ok");
            else
              done(null, "not-equal");
          }
        }, backoff);
      }
    };
    check(1);
  }
  function waitDiff(state, index2, expected, timeout, done) {
    const max = Date.now() + timeout;
    let current = Atomics.load(state, index2);
    if (current !== expected) {
      done(null, "ok");
      return;
    }
    const check = (backoff) => {
      if (Date.now() > max) {
        done(null, "timed-out");
      } else {
        setTimeout(() => {
          current = Atomics.load(state, index2);
          if (current !== expected) {
            done(null, "ok");
          } else {
            check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
          }
        }, backoff);
      }
    };
    check(1);
  }
  module.exports = { wait, waitDiff };
});

// ../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/indexes.js
var require_indexes = __commonJS((exports, module) => {
  var WRITE_INDEX = 4;
  var READ_INDEX = 8;
  module.exports = {
    WRITE_INDEX,
    READ_INDEX
  };
});

// ../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/index.js
var require_thread_stream = __commonJS((exports, module) => {
  var __dirname = "/home/runner/work/wraps/wraps/node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream";
  var { version: version3 } = require_package();
  var { EventEmitter } = __require("events");
  var { Worker: Worker3 } = __require("worker_threads");
  var { join: join4 } = __require("path");
  var { pathToFileURL } = __require("url");
  var { wait } = require_wait();
  var {
    WRITE_INDEX,
    READ_INDEX
  } = require_indexes();
  var buffer = __require("buffer");
  var assert = __require("assert");
  var kImpl = Symbol("kImpl");
  var MAX_STRING = buffer.constants.MAX_STRING_LENGTH;

  class FakeWeakRef {
    constructor(value) {
      this._value = value;
    }
    deref() {
      return this._value;
    }
  }

  class FakeFinalizationRegistry {
    register() {}
    unregister() {}
  }
  var FinalizationRegistry2 = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry;
  var WeakRef2 = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef;
  var registry = new FinalizationRegistry2((worker) => {
    if (worker.exited) {
      return;
    }
    worker.terminate();
  });
  function createWorker(stream, opts) {
    const { filename, workerData } = opts;
    const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
    const toExecute = bundlerOverrides["thread-stream-worker"] || join4(__dirname, "lib", "worker.js");
    const worker = new Worker3(toExecute, {
      ...opts.workerOpts,
      trackUnmanagedFds: false,
      workerData: {
        filename: filename.indexOf("file://") === 0 ? filename : pathToFileURL(filename).href,
        dataBuf: stream[kImpl].dataBuf,
        stateBuf: stream[kImpl].stateBuf,
        workerData: {
          $context: {
            threadStreamVersion: version3
          },
          ...workerData
        }
      }
    });
    worker.stream = new FakeWeakRef(stream);
    worker.on("message", onWorkerMessage);
    worker.on("exit", onWorkerExit);
    registry.register(stream, worker);
    return worker;
  }
  function drain(stream) {
    assert(!stream[kImpl].sync);
    if (stream[kImpl].needDrain) {
      stream[kImpl].needDrain = false;
      stream.emit("drain");
    }
  }
  function nextFlush(stream) {
    const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
    let leftover = stream[kImpl].data.length - writeIndex;
    if (leftover > 0) {
      if (stream[kImpl].buf.length === 0) {
        stream[kImpl].flushing = false;
        if (stream[kImpl].ending) {
          end(stream);
        } else if (stream[kImpl].needDrain) {
          process.nextTick(drain, stream);
        }
        return;
      }
      let toWrite = stream[kImpl].buf.slice(0, leftover);
      let toWriteBytes = Buffer.byteLength(toWrite);
      if (toWriteBytes <= leftover) {
        stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
        write(stream, toWrite, nextFlush.bind(null, stream));
      } else {
        stream.flush(() => {
          if (stream.destroyed) {
            return;
          }
          Atomics.store(stream[kImpl].state, READ_INDEX, 0);
          Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
          while (toWriteBytes > stream[kImpl].data.length) {
            leftover = leftover / 2;
            toWrite = stream[kImpl].buf.slice(0, leftover);
            toWriteBytes = Buffer.byteLength(toWrite);
          }
          stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
          write(stream, toWrite, nextFlush.bind(null, stream));
        });
      }
    } else if (leftover === 0) {
      if (writeIndex === 0 && stream[kImpl].buf.length === 0) {
        return;
      }
      stream.flush(() => {
        Atomics.store(stream[kImpl].state, READ_INDEX, 0);
        Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
        nextFlush(stream);
      });
    } else {
      destroy(stream, new Error("overwritten"));
    }
  }
  function onWorkerMessage(msg) {
    const stream = this.stream.deref();
    if (stream === undefined) {
      this.exited = true;
      this.terminate();
      return;
    }
    switch (msg.code) {
      case "READY":
        this.stream = new WeakRef2(stream);
        stream.flush(() => {
          stream[kImpl].ready = true;
          stream.emit("ready");
        });
        break;
      case "ERROR":
        destroy(stream, msg.err);
        break;
      case "EVENT":
        if (Array.isArray(msg.args)) {
          stream.emit(msg.name, ...msg.args);
        } else {
          stream.emit(msg.name, msg.args);
        }
        break;
      case "WARNING":
        process.emitWarning(msg.err);
        break;
      default:
        destroy(stream, new Error("this should not happen: " + msg.code));
    }
  }
  function onWorkerExit(code) {
    const stream = this.stream.deref();
    if (stream === undefined) {
      return;
    }
    registry.unregister(stream);
    stream.worker.exited = true;
    stream.worker.off("exit", onWorkerExit);
    destroy(stream, code !== 0 ? new Error("the worker thread exited") : null);
  }

  class ThreadStream extends EventEmitter {
    constructor(opts = {}) {
      super();
      if (opts.bufferSize < 4) {
        throw new Error("bufferSize must at least fit a 4-byte utf-8 char");
      }
      this[kImpl] = {};
      this[kImpl].stateBuf = new SharedArrayBuffer(128);
      this[kImpl].state = new Int32Array(this[kImpl].stateBuf);
      this[kImpl].dataBuf = new SharedArrayBuffer(opts.bufferSize || 4 * 1024 * 1024);
      this[kImpl].data = Buffer.from(this[kImpl].dataBuf);
      this[kImpl].sync = opts.sync || false;
      this[kImpl].ending = false;
      this[kImpl].ended = false;
      this[kImpl].needDrain = false;
      this[kImpl].destroyed = false;
      this[kImpl].flushing = false;
      this[kImpl].ready = false;
      this[kImpl].finished = false;
      this[kImpl].errored = null;
      this[kImpl].closed = false;
      this[kImpl].buf = "";
      this.worker = createWorker(this, opts);
      this.on("message", (message, transferList) => {
        this.worker.postMessage(message, transferList);
      });
    }
    write(data) {
      if (this[kImpl].destroyed) {
        error2(this, new Error("the worker has exited"));
        return false;
      }
      if (this[kImpl].ending) {
        error2(this, new Error("the worker is ending"));
        return false;
      }
      if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) {
        try {
          writeSync(this);
          this[kImpl].flushing = true;
        } catch (err) {
          destroy(this, err);
          return false;
        }
      }
      this[kImpl].buf += data;
      if (this[kImpl].sync) {
        try {
          writeSync(this);
          return true;
        } catch (err) {
          destroy(this, err);
          return false;
        }
      }
      if (!this[kImpl].flushing) {
        this[kImpl].flushing = true;
        setImmediate(nextFlush, this);
      }
      this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0;
      return !this[kImpl].needDrain;
    }
    end() {
      if (this[kImpl].destroyed) {
        return;
      }
      this[kImpl].ending = true;
      end(this);
    }
    flush(cb) {
      if (this[kImpl].destroyed) {
        if (typeof cb === "function") {
          process.nextTick(cb, new Error("the worker has exited"));
        }
        return;
      }
      const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX);
      wait(this[kImpl].state, READ_INDEX, writeIndex, Infinity, (err, res) => {
        if (err) {
          destroy(this, err);
          process.nextTick(cb, err);
          return;
        }
        if (res === "not-equal") {
          this.flush(cb);
          return;
        }
        process.nextTick(cb);
      });
    }
    flushSync() {
      if (this[kImpl].destroyed) {
        return;
      }
      writeSync(this);
      flushSync(this);
    }
    unref() {
      this.worker.unref();
    }
    ref() {
      this.worker.ref();
    }
    get ready() {
      return this[kImpl].ready;
    }
    get destroyed() {
      return this[kImpl].destroyed;
    }
    get closed() {
      return this[kImpl].closed;
    }
    get writable() {
      return !this[kImpl].destroyed && !this[kImpl].ending;
    }
    get writableEnded() {
      return this[kImpl].ending;
    }
    get writableFinished() {
      return this[kImpl].finished;
    }
    get writableNeedDrain() {
      return this[kImpl].needDrain;
    }
    get writableObjectMode() {
      return false;
    }
    get writableErrored() {
      return this[kImpl].errored;
    }
  }
  function error2(stream, err) {
    setImmediate(() => {
      stream.emit("error", err);
    });
  }
  function destroy(stream, err) {
    if (stream[kImpl].destroyed) {
      return;
    }
    stream[kImpl].destroyed = true;
    if (err) {
      stream[kImpl].errored = err;
      error2(stream, err);
    }
    if (!stream.worker.exited) {
      stream.worker.terminate().catch(() => {}).then(() => {
        stream[kImpl].closed = true;
        stream.emit("close");
      });
    } else {
      setImmediate(() => {
        stream[kImpl].closed = true;
        stream.emit("close");
      });
    }
  }
  function write(stream, data, cb) {
    const current = Atomics.load(stream[kImpl].state, WRITE_INDEX);
    const length = Buffer.byteLength(data);
    stream[kImpl].data.write(data, current);
    Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length);
    Atomics.notify(stream[kImpl].state, WRITE_INDEX);
    cb();
    return true;
  }
  function end(stream) {
    if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) {
      return;
    }
    stream[kImpl].ended = true;
    try {
      stream.flushSync();
      let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX);
      Atomics.store(stream[kImpl].state, WRITE_INDEX, -1);
      Atomics.notify(stream[kImpl].state, WRITE_INDEX);
      let spins = 0;
      while (readIndex !== -1) {
        Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000);
        readIndex = Atomics.load(stream[kImpl].state, READ_INDEX);
        if (readIndex === -2) {
          destroy(stream, new Error("end() failed"));
          return;
        }
        if (++spins === 10) {
          destroy(stream, new Error("end() took too long (10s)"));
          return;
        }
      }
      process.nextTick(() => {
        stream[kImpl].finished = true;
        stream.emit("finish");
      });
    } catch (err) {
      destroy(stream, err);
    }
  }
  function writeSync(stream) {
    const cb = () => {
      if (stream[kImpl].ending) {
        end(stream);
      } else if (stream[kImpl].needDrain) {
        process.nextTick(drain, stream);
      }
    };
    stream[kImpl].flushing = false;
    while (stream[kImpl].buf.length !== 0) {
      const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
      let leftover = stream[kImpl].data.length - writeIndex;
      if (leftover === 0) {
        flushSync(stream);
        Atomics.store(stream[kImpl].state, READ_INDEX, 0);
        Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
        continue;
      } else if (leftover < 0) {
        throw new Error("overwritten");
      }
      let toWrite = stream[kImpl].buf.slice(0, leftover);
      let toWriteBytes = Buffer.byteLength(toWrite);
      if (toWriteBytes <= leftover) {
        stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
        write(stream, toWrite, cb);
      } else {
        flushSync(stream);
        Atomics.store(stream[kImpl].state, READ_INDEX, 0);
        Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
        while (toWriteBytes > stream[kImpl].buf.length) {
          leftover = leftover / 2;
          toWrite = stream[kImpl].buf.slice(0, leftover);
          toWriteBytes = Buffer.byteLength(toWrite);
        }
        stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
        write(stream, toWrite, cb);
      }
    }
  }
  function flushSync(stream) {
    if (stream[kImpl].flushing) {
      throw new Error("unable to flush while flushing");
    }
    const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
    let spins = 0;
    while (true) {
      const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX);
      if (readIndex === -2) {
        throw Error("_flushSync failed");
      }
      if (readIndex !== writeIndex) {
        Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000);
      } else {
        break;
      }
      if (++spins === 10) {
        throw new Error("_flushSync took too long (10s)");
      }
    }
  }
  module.exports = ThreadStream;
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js
var require_transport = __commonJS((exports, module) => {
  var __dirname = "/home/runner/work/wraps/wraps/node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib";
  var { createRequire: createRequire2 } = __require("module");
  var getCallers = require_caller();
  var { join: join4, isAbsolute: isAbsolute2, sep: sep2 } = __require("node:path");
  var sleep = require_atomic_sleep();
  var onExit = require_on_exit_leak_free();
  var ThreadStream = require_thread_stream();
  function setupOnExit(stream) {
    onExit.register(stream, autoEnd);
    onExit.registerBeforeExit(stream, flush2);
    stream.on("close", function() {
      onExit.unregister(stream);
    });
  }
  function buildStream(filename, workerData, workerOpts, sync) {
    const stream = new ThreadStream({
      filename,
      workerData,
      workerOpts,
      sync
    });
    stream.on("ready", onReady);
    stream.on("close", function() {
      process.removeListener("exit", onExit2);
    });
    process.on("exit", onExit2);
    function onReady() {
      process.removeListener("exit", onExit2);
      stream.unref();
      if (workerOpts.autoEnd !== false) {
        setupOnExit(stream);
      }
    }
    function onExit2() {
      if (stream.closed) {
        return;
      }
      stream.flushSync();
      sleep(100);
      stream.end();
    }
    return stream;
  }
  function autoEnd(stream) {
    stream.ref();
    stream.flushSync();
    stream.end();
    stream.once("close", function() {
      stream.unref();
    });
  }
  function flush2(stream) {
    stream.flushSync();
  }
  function transport(fullOptions) {
    const { pipeline, targets, levels, dedupe, worker = {}, caller = getCallers(), sync = false } = fullOptions;
    const options = {
      ...fullOptions.options
    };
    const callers = typeof caller === "string" ? [caller] : caller;
    const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
    let target = fullOptions.target;
    if (target && targets) {
      throw new Error("only one of target or targets can be specified");
    }
    if (targets) {
      target = bundlerOverrides["pino-worker"] || join4(__dirname, "worker.js");
      options.targets = targets.filter((dest) => dest.target).map((dest) => {
        return {
          ...dest,
          target: fixTarget(dest.target)
        };
      });
      options.pipelines = targets.filter((dest) => dest.pipeline).map((dest) => {
        return dest.pipeline.map((t) => {
          return {
            ...t,
            level: dest.level,
            target: fixTarget(t.target)
          };
        });
      });
    } else if (pipeline) {
      target = bundlerOverrides["pino-worker"] || join4(__dirname, "worker.js");
      options.pipelines = [pipeline.map((dest) => {
        return {
          ...dest,
          target: fixTarget(dest.target)
        };
      })];
    }
    if (levels) {
      options.levels = levels;
    }
    if (dedupe) {
      options.dedupe = dedupe;
    }
    options.pinoWillSendConfig = true;
    return buildStream(fixTarget(target), options, worker, sync);
    function fixTarget(origin) {
      origin = bundlerOverrides[origin] || origin;
      if (isAbsolute2(origin) || origin.indexOf("file://") === 0) {
        return origin;
      }
      if (origin === "pino/file") {
        return join4(__dirname, "..", "file.js");
      }
      let fixTarget2;
      for (const filePath of callers) {
        try {
          const context10 = filePath === "node:repl" ? process.cwd() + sep2 : filePath;
          fixTarget2 = createRequire2(context10).resolve(origin);
          break;
        } catch (err) {
          continue;
        }
      }
      if (!fixTarget2) {
        throw new Error(`unable to determine transport target for "${origin}"`);
      }
      return fixTarget2;
    }
  }
  module.exports = transport;
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js
var require_tools = __commonJS((exports, module) => {
  var diagChan = __require("node:diagnostics_channel");
  var format = require_quick_format_unescaped();
  var { mapHttpRequest, mapHttpResponse } = require_pino_std_serializers();
  var SonicBoom = require_sonic_boom();
  var onExit = require_on_exit_leak_free();
  var {
    lsCacheSym,
    chindingsSym,
    writeSym,
    serializersSym,
    formatOptsSym,
    endSym,
    stringifiersSym,
    stringifySym,
    stringifySafeSym,
    wildcardFirstSym,
    nestedKeySym,
    formattersSym,
    messageKeySym,
    errorKeySym,
    nestedKeyStrSym,
    msgPrefixSym
  } = require_symbols();
  var { isMainThread: isMainThread4 } = __require("worker_threads");
  var transport = require_transport();
  var asJsonChan = diagChan.tracingChannel("pino_asJson");
  function noop() {}
  function genLog(level, hook) {
    if (!hook)
      return LOG;
    return function hookWrappedLog(...args) {
      hook.call(this, args, LOG, level);
    };
    function LOG(o, ...n) {
      if (typeof o === "object") {
        let msg = o;
        if (o !== null) {
          if (o.method && o.headers && o.socket) {
            o = mapHttpRequest(o);
          } else if (typeof o.setHeader === "function") {
            o = mapHttpResponse(o);
          }
        }
        let formatParams;
        if (msg === null && n.length === 0) {
          formatParams = [null];
        } else {
          msg = n.shift();
          formatParams = n;
        }
        if (typeof this[msgPrefixSym] === "string" && msg !== undefined && msg !== null) {
          msg = this[msgPrefixSym] + msg;
        }
        this[writeSym](o, format(msg, formatParams, this[formatOptsSym]), level);
      } else {
        let msg = o === undefined ? n.shift() : o;
        if (typeof this[msgPrefixSym] === "string" && msg !== undefined && msg !== null) {
          msg = this[msgPrefixSym] + msg;
        }
        this[writeSym](null, format(msg, n, this[formatOptsSym]), level);
      }
    }
  }
  function asString(str) {
    let result = "";
    let last = 0;
    let found = false;
    let point2 = 255;
    const l = str.length;
    if (l > 100) {
      return JSON.stringify(str);
    }
    for (var i = 0;i < l && point2 >= 32; i++) {
      point2 = str.charCodeAt(i);
      if (point2 === 34 || point2 === 92) {
        result += str.slice(last, i) + "\\";
        last = i;
        found = true;
      }
    }
    if (!found) {
      result = str;
    } else {
      result += str.slice(last);
    }
    return point2 < 32 ? JSON.stringify(str) : '"' + result + '"';
  }
  function asJson(obj, msg, num, time2) {
    if (asJsonChan.hasSubscribers === false) {
      return _asJson.call(this, obj, msg, num, time2);
    }
    const store = { instance: this, arguments };
    return asJsonChan.traceSync(_asJson, store, this, obj, msg, num, time2);
  }
  function _asJson(obj, msg, num, time2) {
    const stringify2 = this[stringifySym];
    const stringifySafe = this[stringifySafeSym];
    const stringifiers = this[stringifiersSym];
    const end = this[endSym];
    const chindings = this[chindingsSym];
    const serializers = this[serializersSym];
    const formatters = this[formattersSym];
    const messageKey = this[messageKeySym];
    const errorKey = this[errorKeySym];
    let data = this[lsCacheSym][num] + time2;
    data = data + chindings;
    let value;
    if (formatters.log) {
      obj = formatters.log(obj);
    }
    const wildcardStringifier = stringifiers[wildcardFirstSym];
    let propStr = "";
    for (const key in obj) {
      value = obj[key];
      if (Object.prototype.hasOwnProperty.call(obj, key) && value !== undefined) {
        if (serializers[key]) {
          value = serializers[key](value);
        } else if (key === errorKey && serializers.err) {
          value = serializers.err(value);
        }
        const stringifier = stringifiers[key] || wildcardStringifier;
        switch (typeof value) {
          case "undefined":
          case "function":
            continue;
          case "number":
            if (Number.isFinite(value) === false) {
              value = null;
            }
          case "boolean":
            if (stringifier)
              value = stringifier(value);
            break;
          case "string":
            value = (stringifier || asString)(value);
            break;
          default:
            value = (stringifier || stringify2)(value, stringifySafe);
        }
        if (value === undefined)
          continue;
        const strKey = asString(key);
        propStr += "," + strKey + ":" + value;
      }
    }
    let msgStr = "";
    if (msg !== undefined) {
      value = serializers[messageKey] ? serializers[messageKey](msg) : msg;
      const stringifier = stringifiers[messageKey] || wildcardStringifier;
      switch (typeof value) {
        case "function":
          break;
        case "number":
          if (Number.isFinite(value) === false) {
            value = null;
          }
        case "boolean":
          if (stringifier)
            value = stringifier(value);
          msgStr = ',"' + messageKey + '":' + value;
          break;
        case "string":
          value = (stringifier || asString)(value);
          msgStr = ',"' + messageKey + '":' + value;
          break;
        default:
          value = (stringifier || stringify2)(value, stringifySafe);
          msgStr = ',"' + messageKey + '":' + value;
      }
    }
    if (this[nestedKeySym] && propStr) {
      return data + this[nestedKeyStrSym] + propStr.slice(1) + "}" + msgStr + end;
    } else {
      return data + propStr + msgStr + end;
    }
  }
  function asChindings(instance, bindings) {
    let value;
    let data = instance[chindingsSym];
    const stringify2 = instance[stringifySym];
    const stringifySafe = instance[stringifySafeSym];
    const stringifiers = instance[stringifiersSym];
    const wildcardStringifier = stringifiers[wildcardFirstSym];
    const serializers = instance[serializersSym];
    const formatter = instance[formattersSym].bindings;
    bindings = formatter(bindings);
    for (const key in bindings) {
      value = bindings[key];
      const valid = (key.length < 5 || key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels") && bindings.hasOwnProperty(key) && value !== undefined;
      if (valid === true) {
        value = serializers[key] ? serializers[key](value) : value;
        value = (stringifiers[key] || wildcardStringifier || stringify2)(value, stringifySafe);
        if (value === undefined)
          continue;
        data += ',"' + key + '":' + value;
      }
    }
    return data;
  }
  function hasBeenTampered(stream) {
    return stream.write !== stream.constructor.prototype.write;
  }
  function buildSafeSonicBoom(opts) {
    const stream = new SonicBoom(opts);
    stream.on("error", filterBrokenPipe);
    if (!opts.sync && isMainThread4) {
      onExit.register(stream, autoEnd);
      stream.on("close", function() {
        onExit.unregister(stream);
      });
    }
    return stream;
    function filterBrokenPipe(err) {
      if (err.code === "EPIPE") {
        stream.write = noop;
        stream.end = noop;
        stream.flushSync = noop;
        stream.destroy = noop;
        return;
      }
      stream.removeListener("error", filterBrokenPipe);
      stream.emit("error", err);
    }
  }
  function autoEnd(stream, eventName) {
    if (stream.destroyed) {
      return;
    }
    if (eventName === "beforeExit") {
      stream.flush();
      stream.on("drain", function() {
        stream.end();
      });
    } else {
      stream.flushSync();
    }
  }
  function createArgsNormalizer(defaultOptions) {
    return function normalizeArgs(instance, caller, opts = {}, stream) {
      if (typeof opts === "string") {
        stream = buildSafeSonicBoom({ dest: opts });
        opts = {};
      } else if (typeof stream === "string") {
        if (opts && opts.transport) {
          throw Error("only one of option.transport or stream can be specified");
        }
        stream = buildSafeSonicBoom({ dest: stream });
      } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) {
        stream = opts;
        opts = {};
      } else if (opts.transport) {
        if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) {
          throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");
        }
        if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === "function") {
          throw Error("option.transport.targets do not allow custom level formatters");
        }
        let customLevels;
        if (opts.customLevels) {
          customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels);
        }
        stream = transport({ caller, ...opts.transport, levels: customLevels });
      }
      opts = Object.assign({}, defaultOptions, opts);
      opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers);
      opts.formatters = Object.assign({}, defaultOptions.formatters, opts.formatters);
      if (opts.prettyPrint) {
        throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");
      }
      const { enabled, onChild } = opts;
      if (enabled === false)
        opts.level = "silent";
      if (!onChild)
        opts.onChild = noop;
      if (!stream) {
        if (!hasBeenTampered(process.stdout)) {
          stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 });
        } else {
          stream = process.stdout;
        }
      }
      return { opts, stream };
    };
  }
  function stringify(obj, stringifySafeFn) {
    try {
      return JSON.stringify(obj);
    } catch (_) {
      try {
        const stringify2 = stringifySafeFn || this[stringifySafeSym];
        return stringify2(obj);
      } catch (_2) {
        return '"[unable to serialize, circular reference is too complex to analyze]"';
      }
    }
  }
  function buildFormatters(level, bindings, log3) {
    return {
      level,
      bindings,
      log: log3
    };
  }
  function normalizeDestFileDescriptor(destination) {
    const fd = Number(destination);
    if (typeof destination === "string" && Number.isFinite(fd)) {
      return fd;
    }
    if (destination === undefined) {
      return 1;
    }
    return destination;
  }
  module.exports = {
    noop,
    buildSafeSonicBoom,
    asChindings,
    asJson,
    genLog,
    createArgsNormalizer,
    stringify,
    buildFormatters,
    normalizeDestFileDescriptor
  };
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js
var require_constants4 = __commonJS((exports, module) => {
  var DEFAULT_LEVELS = {
    trace: 10,
    debug: 20,
    info: 30,
    warn: 40,
    error: 50,
    fatal: 60
  };
  var SORTING_ORDER = {
    ASC: "ASC",
    DESC: "DESC"
  };
  module.exports = {
    DEFAULT_LEVELS,
    SORTING_ORDER
  };
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js
var require_levels = __commonJS((exports, module) => {
  var {
    lsCacheSym,
    levelValSym,
    useOnlyCustomLevelsSym,
    streamSym,
    formattersSym,
    hooksSym,
    levelCompSym
  } = require_symbols();
  var { noop, genLog } = require_tools();
  var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants4();
  var levelMethods = {
    fatal: (hook) => {
      const logFatal = genLog(DEFAULT_LEVELS.fatal, hook);
      return function(...args) {
        const stream = this[streamSym];
        logFatal.call(this, ...args);
        if (typeof stream.flushSync === "function") {
          try {
            stream.flushSync();
          } catch (e) {}
        }
      };
    },
    error: (hook) => genLog(DEFAULT_LEVELS.error, hook),
    warn: (hook) => genLog(DEFAULT_LEVELS.warn, hook),
    info: (hook) => genLog(DEFAULT_LEVELS.info, hook),
    debug: (hook) => genLog(DEFAULT_LEVELS.debug, hook),
    trace: (hook) => genLog(DEFAULT_LEVELS.trace, hook)
  };
  var nums = Object.keys(DEFAULT_LEVELS).reduce((o, k) => {
    o[DEFAULT_LEVELS[k]] = k;
    return o;
  }, {});
  var initialLsCache = Object.keys(nums).reduce((o, k) => {
    o[k] = '{"level":' + Number(k);
    return o;
  }, {});
  function genLsCache(instance) {
    const formatter = instance[formattersSym].level;
    const { labels } = instance.levels;
    const cache = {};
    for (const label in labels) {
      const level = formatter(labels[label], Number(label));
      cache[label] = JSON.stringify(level).slice(0, -1);
    }
    instance[lsCacheSym] = cache;
    return instance;
  }
  function isStandardLevel(level, useOnlyCustomLevels) {
    if (useOnlyCustomLevels) {
      return false;
    }
    switch (level) {
      case "fatal":
      case "error":
      case "warn":
      case "info":
      case "debug":
      case "trace":
        return true;
      default:
        return false;
    }
  }
  function setLevel(level) {
    const { labels, values } = this.levels;
    if (typeof level === "number") {
      if (labels[level] === undefined)
        throw Error("unknown level value" + level);
      level = labels[level];
    }
    if (values[level] === undefined)
      throw Error("unknown level " + level);
    const preLevelVal = this[levelValSym];
    const levelVal = this[levelValSym] = values[level];
    const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym];
    const levelComparison = this[levelCompSym];
    const hook = this[hooksSym].logMethod;
    for (const key in values) {
      if (levelComparison(values[key], levelVal) === false) {
        this[key] = noop;
        continue;
      }
      this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key](hook) : genLog(values[key], hook);
    }
    this.emit("level-change", level, levelVal, labels[preLevelVal], preLevelVal, this);
  }
  function getLevel(level) {
    const { levels, levelVal } = this;
    return levels && levels.labels ? levels.labels[levelVal] : "";
  }
  function isLevelEnabled(logLevel) {
    const { values } = this.levels;
    const logLevelVal = values[logLevel];
    return logLevelVal !== undefined && this[levelCompSym](logLevelVal, this[levelValSym]);
  }
  function compareLevel(direction, current, expected) {
    if (direction === SORTING_ORDER.DESC) {
      return current <= expected;
    }
    return current >= expected;
  }
  function genLevelComparison(levelComparison) {
    if (typeof levelComparison === "string") {
      return compareLevel.bind(null, levelComparison);
    }
    return levelComparison;
  }
  function mappings(customLevels = null, useOnlyCustomLevels = false) {
    const customNums = customLevels ? Object.keys(customLevels).reduce((o, k) => {
      o[customLevels[k]] = k;
      return o;
    }, {}) : null;
    const labels = Object.assign(Object.create(Object.prototype, { Infinity: { value: "silent" } }), useOnlyCustomLevels ? null : nums, customNums);
    const values = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels);
    return { labels, values };
  }
  function assertDefaultLevelFound(defaultLevel, customLevels, useOnlyCustomLevels) {
    if (typeof defaultLevel === "number") {
      const values = [].concat(Object.keys(customLevels || {}).map((key) => customLevels[key]), useOnlyCustomLevels ? [] : Object.keys(nums).map((level) => +level), Infinity);
      if (!values.includes(defaultLevel)) {
        throw Error(`default level:${defaultLevel} must be included in custom levels`);
      }
      return;
    }
    const labels = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels);
    if (!(defaultLevel in labels)) {
      throw Error(`default level:${defaultLevel} must be included in custom levels`);
    }
  }
  function assertNoLevelCollisions(levels, customLevels) {
    const { labels, values } = levels;
    for (const k in customLevels) {
      if (k in values) {
        throw Error("levels cannot be overridden");
      }
      if (customLevels[k] in labels) {
        throw Error("pre-existing level values cannot be used for new levels");
      }
    }
  }
  function assertLevelComparison(levelComparison) {
    if (typeof levelComparison === "function") {
      return;
    }
    if (typeof levelComparison === "string" && Object.values(SORTING_ORDER).includes(levelComparison)) {
      return;
    }
    throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type');
  }
  module.exports = {
    initialLsCache,
    genLsCache,
    levelMethods,
    getLevel,
    setLevel,
    isLevelEnabled,
    mappings,
    assertNoLevelCollisions,
    assertDefaultLevelFound,
    genLevelComparison,
    assertLevelComparison
  };
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js
var require_meta = __commonJS((exports, module) => {
  module.exports = { version: "10.1.0" };
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/proto.js
var require_proto = __commonJS((exports, module) => {
  var { EventEmitter } = __require("node:events");
  var {
    lsCacheSym,
    levelValSym,
    setLevelSym,
    getLevelSym,
    chindingsSym,
    mixinSym,
    asJsonSym,
    writeSym,
    mixinMergeStrategySym,
    timeSym,
    timeSliceIndexSym,
    streamSym,
    serializersSym,
    formattersSym,
    errorKeySym,
    messageKeySym,
    useOnlyCustomLevelsSym,
    needsMetadataGsym,
    redactFmtSym,
    stringifySym,
    formatOptsSym,
    stringifiersSym,
    msgPrefixSym,
    hooksSym
  } = require_symbols();
  var {
    getLevel,
    setLevel,
    isLevelEnabled,
    mappings,
    initialLsCache,
    genLsCache,
    assertNoLevelCollisions
  } = require_levels();
  var {
    asChindings,
    asJson,
    buildFormatters,
    stringify,
    noop
  } = require_tools();
  var {
    version: version3
  } = require_meta();
  var redaction = require_redaction();
  var constructor = class Pino {
  };
  var prototype = {
    constructor,
    child,
    bindings,
    setBindings,
    flush: flush2,
    isLevelEnabled,
    version: version3,
    get level() {
      return this[getLevelSym]();
    },
    set level(lvl) {
      this[setLevelSym](lvl);
    },
    get levelVal() {
      return this[levelValSym];
    },
    set levelVal(n) {
      throw Error("levelVal is read-only");
    },
    get msgPrefix() {
      return this[msgPrefixSym];
    },
    get [Symbol.toStringTag]() {
      return "Pino";
    },
    [lsCacheSym]: initialLsCache,
    [writeSym]: write,
    [asJsonSym]: asJson,
    [getLevelSym]: getLevel,
    [setLevelSym]: setLevel
  };
  Object.setPrototypeOf(prototype, EventEmitter.prototype);
  module.exports = function() {
    return Object.create(prototype);
  };
  var resetChildingsFormatter = (bindings2) => bindings2;
  function child(bindings2, options) {
    if (!bindings2) {
      throw Error("missing bindings for child Pino");
    }
    const serializers = this[serializersSym];
    const formatters = this[formattersSym];
    const instance = Object.create(this);
    if (options == null) {
      if (instance[formattersSym].bindings !== resetChildingsFormatter) {
        instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
      }
      instance[chindingsSym] = asChindings(instance, bindings2);
      if (this.onChild !== noop) {
        this.onChild(instance);
      }
      return instance;
    }
    if (options.hasOwnProperty("serializers") === true) {
      instance[serializersSym] = Object.create(null);
      for (const k in serializers) {
        instance[serializersSym][k] = serializers[k];
      }
      const parentSymbols = Object.getOwnPropertySymbols(serializers);
      for (var i = 0;i < parentSymbols.length; i++) {
        const ks = parentSymbols[i];
        instance[serializersSym][ks] = serializers[ks];
      }
      for (const bk in options.serializers) {
        instance[serializersSym][bk] = options.serializers[bk];
      }
      const bindingsSymbols = Object.getOwnPropertySymbols(options.serializers);
      for (var bi = 0;bi < bindingsSymbols.length; bi++) {
        const bks = bindingsSymbols[bi];
        instance[serializersSym][bks] = options.serializers[bks];
      }
    } else
      instance[serializersSym] = serializers;
    if (options.hasOwnProperty("formatters")) {
      const { level, bindings: chindings, log: log3 } = options.formatters;
      instance[formattersSym] = buildFormatters(level || formatters.level, chindings || resetChildingsFormatter, log3 || formatters.log);
    } else {
      instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
    }
    if (options.hasOwnProperty("customLevels") === true) {
      assertNoLevelCollisions(this.levels, options.customLevels);
      instance.levels = mappings(options.customLevels, instance[useOnlyCustomLevelsSym]);
      genLsCache(instance);
    }
    if (typeof options.redact === "object" && options.redact !== null || Array.isArray(options.redact)) {
      instance.redact = options.redact;
      const stringifiers = redaction(instance.redact, stringify);
      const formatOpts = { stringify: stringifiers[redactFmtSym] };
      instance[stringifySym] = stringify;
      instance[stringifiersSym] = stringifiers;
      instance[formatOptsSym] = formatOpts;
    }
    if (typeof options.msgPrefix === "string") {
      instance[msgPrefixSym] = (this[msgPrefixSym] || "") + options.msgPrefix;
    }
    instance[chindingsSym] = asChindings(instance, bindings2);
    if (options.level !== undefined && options.level !== this.level || options.hasOwnProperty("customLevels")) {
      const childLevel = options.level || this.level;
      instance[setLevelSym](childLevel);
    }
    this.onChild(instance);
    return instance;
  }
  function bindings() {
    const chindings = this[chindingsSym];
    const chindingsJson = `{${chindings.substr(1)}}`;
    const bindingsFromJson = JSON.parse(chindingsJson);
    delete bindingsFromJson.pid;
    delete bindingsFromJson.hostname;
    return bindingsFromJson;
  }
  function setBindings(newBindings) {
    const chindings = asChindings(this, newBindings);
    this[chindingsSym] = chindings;
  }
  function defaultMixinMergeStrategy(mergeObject, mixinObject) {
    return Object.assign(mixinObject, mergeObject);
  }
  function write(_obj, msg, num) {
    const t = this[timeSym]();
    const mixin = this[mixinSym];
    const errorKey = this[errorKeySym];
    const messageKey = this[messageKeySym];
    const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy;
    let obj;
    const streamWriteHook = this[hooksSym].streamWrite;
    if (_obj === undefined || _obj === null) {
      obj = {};
    } else if (_obj instanceof Error) {
      obj = { [errorKey]: _obj };
      if (msg === undefined) {
        msg = _obj.message;
      }
    } else {
      obj = _obj;
      if (msg === undefined && _obj[messageKey] === undefined && _obj[errorKey]) {
        msg = _obj[errorKey].message;
      }
    }
    if (mixin) {
      obj = mixinMergeStrategy(obj, mixin(obj, num, this));
    }
    const s = this[asJsonSym](obj, msg, num, t);
    const stream = this[streamSym];
    if (stream[needsMetadataGsym] === true) {
      stream.lastLevel = num;
      stream.lastObj = obj;
      stream.lastMsg = msg;
      stream.lastTime = t.slice(this[timeSliceIndexSym]);
      stream.lastLogger = this;
    }
    stream.write(streamWriteHook ? streamWriteHook(s) : s);
  }
  function flush2(cb) {
    if (cb != null && typeof cb !== "function") {
      throw Error("callback must be a function");
    }
    const stream = this[streamSym];
    if (typeof stream.flush === "function") {
      stream.flush(cb || noop);
    } else if (cb)
      cb();
  }
});

// ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js
var require_safe_stable_stringify = __commonJS((exports, module) => {
  var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
  var stringify = configure();
  stringify.configure = configure;
  stringify.stringify = stringify;
  stringify.default = stringify;
  exports.stringify = stringify;
  exports.configure = configure;
  module.exports = stringify;
  var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
  function strEscape(str) {
    if (str.length < 5000 && !strEscapeSequencesRegExp.test(str)) {
      return `"${str}"`;
    }
    return JSON.stringify(str);
  }
  function sort(array, comparator) {
    if (array.length > 200 || comparator) {
      return array.sort(comparator);
    }
    for (let i = 1;i < array.length; i++) {
      const currentValue = array[i];
      let position = i;
      while (position !== 0 && array[position - 1] > currentValue) {
        array[position] = array[position - 1];
        position--;
      }
      array[position] = currentValue;
    }
    return array;
  }
  var typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)), Symbol.toStringTag).get;
  function isTypedArrayWithEntries(value) {
    return typedArrayPrototypeGetSymbolToStringTag.call(value) !== undefined && value.length !== 0;
  }
  function stringifyTypedArray(array, separator, maximumBreadth) {
    if (array.length < maximumBreadth) {
      maximumBreadth = array.length;
    }
    const whitespace = separator === "," ? "" : " ";
    let res = `"0":${whitespace}${array[0]}`;
    for (let i = 1;i < maximumBreadth; i++) {
      res += `${separator}"${i}":${whitespace}${array[i]}`;
    }
    return res;
  }
  function getCircularValueOption(options) {
    if (hasOwnProperty2.call(options, "circularValue")) {
      const circularValue = options.circularValue;
      if (typeof circularValue === "string") {
        return `"${circularValue}"`;
      }
      if (circularValue == null) {
        return circularValue;
      }
      if (circularValue === Error || circularValue === TypeError) {
        return {
          toString() {
            throw new TypeError("Converting circular structure to JSON");
          }
        };
      }
      throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined');
    }
    return '"[Circular]"';
  }
  function getDeterministicOption(options) {
    let value;
    if (hasOwnProperty2.call(options, "deterministic")) {
      value = options.deterministic;
      if (typeof value !== "boolean" && typeof value !== "function") {
        throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');
      }
    }
    return value === undefined ? true : value;
  }
  function getBooleanOption(options, key) {
    let value;
    if (hasOwnProperty2.call(options, key)) {
      value = options[key];
      if (typeof value !== "boolean") {
        throw new TypeError(`The "${key}" argument must be of type boolean`);
      }
    }
    return value === undefined ? true : value;
  }
  function getPositiveIntegerOption(options, key) {
    let value;
    if (hasOwnProperty2.call(options, key)) {
      value = options[key];
      if (typeof value !== "number") {
        throw new TypeError(`The "${key}" argument must be of type number`);
      }
      if (!Number.isInteger(value)) {
        throw new TypeError(`The "${key}" argument must be an integer`);
      }
      if (value < 1) {
        throw new RangeError(`The "${key}" argument must be >= 1`);
      }
    }
    return value === undefined ? Infinity : value;
  }
  function getItemCount(number) {
    if (number === 1) {
      return "1 item";
    }
    return `${number} items`;
  }
  function getUniqueReplacerSet(replacerArray) {
    const replacerSet = new Set;
    for (const value of replacerArray) {
      if (typeof value === "string" || typeof value === "number") {
        replacerSet.add(String(value));
      }
    }
    return replacerSet;
  }
  function getStrictOption(options) {
    if (hasOwnProperty2.call(options, "strict")) {
      const value = options.strict;
      if (typeof value !== "boolean") {
        throw new TypeError('The "strict" argument must be of type boolean');
      }
      if (value) {
        return (value2) => {
          let message = `Object can not safely be stringified. Received type ${typeof value2}`;
          if (typeof value2 !== "function")
            message += ` (${value2.toString()})`;
          throw new Error(message);
        };
      }
    }
  }
  function configure(options) {
    options = { ...options };
    const fail = getStrictOption(options);
    if (fail) {
      if (options.bigint === undefined) {
        options.bigint = false;
      }
      if (!("circularValue" in options)) {
        options.circularValue = Error;
      }
    }
    const circularValue = getCircularValueOption(options);
    const bigint2 = getBooleanOption(options, "bigint");
    const deterministic = getDeterministicOption(options);
    const comparator = typeof deterministic === "function" ? deterministic : undefined;
    const maximumDepth = getPositiveIntegerOption(options, "maximumDepth");
    const maximumBreadth = getPositiveIntegerOption(options, "maximumBreadth");
    function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) {
      let value = parent[key];
      if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
        value = value.toJSON(key);
      }
      value = replacer.call(parent, key, value);
      switch (typeof value) {
        case "string":
          return strEscape(value);
        case "object": {
          if (value === null) {
            return "null";
          }
          if (stack.indexOf(value) !== -1) {
            return circularValue;
          }
          let res = "";
          let join4 = ",";
          const originalIndentation = indentation;
          if (Array.isArray(value)) {
            if (value.length === 0) {
              return "[]";
            }
            if (maximumDepth < stack.length + 1) {
              return '"[Array]"';
            }
            stack.push(value);
            if (spacer !== "") {
              indentation += spacer;
              res += `
${indentation}`;
              join4 = `,
${indentation}`;
            }
            const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
            let i = 0;
            for (;i < maximumValuesToStringify - 1; i++) {
              const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
              res += tmp2 !== undefined ? tmp2 : "null";
              res += join4;
            }
            const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
            res += tmp !== undefined ? tmp : "null";
            if (value.length - 1 > maximumBreadth) {
              const removedKeys = value.length - maximumBreadth - 1;
              res += `${join4}"... ${getItemCount(removedKeys)} not stringified"`;
            }
            if (spacer !== "") {
              res += `
${originalIndentation}`;
            }
            stack.pop();
            return `[${res}]`;
          }
          let keys = Object.keys(value);
          const keyLength = keys.length;
          if (keyLength === 0) {
            return "{}";
          }
          if (maximumDepth < stack.length + 1) {
            return '"[Object]"';
          }
          let whitespace = "";
          let separator = "";
          if (spacer !== "") {
            indentation += spacer;
            join4 = `,
${indentation}`;
            whitespace = " ";
          }
          const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
          if (deterministic && !isTypedArrayWithEntries(value)) {
            keys = sort(keys, comparator);
          }
          stack.push(value);
          for (let i = 0;i < maximumPropertiesToStringify; i++) {
            const key2 = keys[i];
            const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
            if (tmp !== undefined) {
              res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
              separator = join4;
            }
          }
          if (keyLength > maximumBreadth) {
            const removedKeys = keyLength - maximumBreadth;
            res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
            separator = join4;
          }
          if (spacer !== "" && separator.length > 1) {
            res = `
${indentation}${res}
${originalIndentation}`;
          }
          stack.pop();
          return `{${res}}`;
        }
        case "number":
          return isFinite(value) ? String(value) : fail ? fail(value) : "null";
        case "boolean":
          return value === true ? "true" : "false";
        case "undefined":
          return;
        case "bigint":
          if (bigint2) {
            return String(value);
          }
        default:
          return fail ? fail(value) : undefined;
      }
    }
    function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) {
      if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
        value = value.toJSON(key);
      }
      switch (typeof value) {
        case "string":
          return strEscape(value);
        case "object": {
          if (value === null) {
            return "null";
          }
          if (stack.indexOf(value) !== -1) {
            return circularValue;
          }
          const originalIndentation = indentation;
          let res = "";
          let join4 = ",";
          if (Array.isArray(value)) {
            if (value.length === 0) {
              return "[]";
            }
            if (maximumDepth < stack.length + 1) {
              return '"[Array]"';
            }
            stack.push(value);
            if (spacer !== "") {
              indentation += spacer;
              res += `
${indentation}`;
              join4 = `,
${indentation}`;
            }
            const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
            let i = 0;
            for (;i < maximumValuesToStringify - 1; i++) {
              const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
              res += tmp2 !== undefined ? tmp2 : "null";
              res += join4;
            }
            const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
            res += tmp !== undefined ? tmp : "null";
            if (value.length - 1 > maximumBreadth) {
              const removedKeys = value.length - maximumBreadth - 1;
              res += `${join4}"... ${getItemCount(removedKeys)} not stringified"`;
            }
            if (spacer !== "") {
              res += `
${originalIndentation}`;
            }
            stack.pop();
            return `[${res}]`;
          }
          stack.push(value);
          let whitespace = "";
          if (spacer !== "") {
            indentation += spacer;
            join4 = `,
${indentation}`;
            whitespace = " ";
          }
          let separator = "";
          for (const key2 of replacer) {
            const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
            if (tmp !== undefined) {
              res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
              separator = join4;
            }
          }
          if (spacer !== "" && separator.length > 1) {
            res = `
${indentation}${res}
${originalIndentation}`;
          }
          stack.pop();
          return `{${res}}`;
        }
        case "number":
          return isFinite(value) ? String(value) : fail ? fail(value) : "null";
        case "boolean":
          return value === true ? "true" : "false";
        case "undefined":
          return;
        case "bigint":
          if (bigint2) {
            return String(value);
          }
        default:
          return fail ? fail(value) : undefined;
      }
    }
    function stringifyIndent(key, value, stack, spacer, indentation) {
      switch (typeof value) {
        case "string":
          return strEscape(value);
        case "object": {
          if (value === null) {
            return "null";
          }
          if (typeof value.toJSON === "function") {
            value = value.toJSON(key);
            if (typeof value !== "object") {
              return stringifyIndent(key, value, stack, spacer, indentation);
            }
            if (value === null) {
              return "null";
            }
          }
          if (stack.indexOf(value) !== -1) {
            return circularValue;
          }
          const originalIndentation = indentation;
          if (Array.isArray(value)) {
            if (value.length === 0) {
              return "[]";
            }
            if (maximumDepth < stack.length + 1) {
              return '"[Array]"';
            }
            stack.push(value);
            indentation += spacer;
            let res2 = `
${indentation}`;
            const join5 = `,
${indentation}`;
            const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
            let i = 0;
            for (;i < maximumValuesToStringify - 1; i++) {
              const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
              res2 += tmp2 !== undefined ? tmp2 : "null";
              res2 += join5;
            }
            const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
            res2 += tmp !== undefined ? tmp : "null";
            if (value.length - 1 > maximumBreadth) {
              const removedKeys = value.length - maximumBreadth - 1;
              res2 += `${join5}"... ${getItemCount(removedKeys)} not stringified"`;
            }
            res2 += `
${originalIndentation}`;
            stack.pop();
            return `[${res2}]`;
          }
          let keys = Object.keys(value);
          const keyLength = keys.length;
          if (keyLength === 0) {
            return "{}";
          }
          if (maximumDepth < stack.length + 1) {
            return '"[Object]"';
          }
          indentation += spacer;
          const join4 = `,
${indentation}`;
          let res = "";
          let separator = "";
          let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
          if (isTypedArrayWithEntries(value)) {
            res += stringifyTypedArray(value, join4, maximumBreadth);
            keys = keys.slice(value.length);
            maximumPropertiesToStringify -= value.length;
            separator = join4;
          }
          if (deterministic) {
            keys = sort(keys, comparator);
          }
          stack.push(value);
          for (let i = 0;i < maximumPropertiesToStringify; i++) {
            const key2 = keys[i];
            const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
            if (tmp !== undefined) {
              res += `${separator}${strEscape(key2)}: ${tmp}`;
              separator = join4;
            }
          }
          if (keyLength > maximumBreadth) {
            const removedKeys = keyLength - maximumBreadth;
            res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
            separator = join4;
          }
          if (separator !== "") {
            res = `
${indentation}${res}
${originalIndentation}`;
          }
          stack.pop();
          return `{${res}}`;
        }
        case "number":
          return isFinite(value) ? String(value) : fail ? fail(value) : "null";
        case "boolean":
          return value === true ? "true" : "false";
        case "undefined":
          return;
        case "bigint":
          if (bigint2) {
            return String(value);
          }
        default:
          return fail ? fail(value) : undefined;
      }
    }
    function stringifySimple(key, value, stack) {
      switch (typeof value) {
        case "string":
          return strEscape(value);
        case "object": {
          if (value === null) {
            return "null";
          }
          if (typeof value.toJSON === "function") {
            value = value.toJSON(key);
            if (typeof value !== "object") {
              return stringifySimple(key, value, stack);
            }
            if (value === null) {
              return "null";
            }
          }
          if (stack.indexOf(value) !== -1) {
            return circularValue;
          }
          let res = "";
          const hasLength = value.length !== undefined;
          if (hasLength && Array.isArray(value)) {
            if (value.length === 0) {
              return "[]";
            }
            if (maximumDepth < stack.length + 1) {
              return '"[Array]"';
            }
            stack.push(value);
            const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
            let i = 0;
            for (;i < maximumValuesToStringify - 1; i++) {
              const tmp2 = stringifySimple(String(i), value[i], stack);
              res += tmp2 !== undefined ? tmp2 : "null";
              res += ",";
            }
            const tmp = stringifySimple(String(i), value[i], stack);
            res += tmp !== undefined ? tmp : "null";
            if (value.length - 1 > maximumBreadth) {
              const removedKeys = value.length - maximumBreadth - 1;
              res += `,"... ${getItemCount(removedKeys)} not stringified"`;
            }
            stack.pop();
            return `[${res}]`;
          }
          let keys = Object.keys(value);
          const keyLength = keys.length;
          if (keyLength === 0) {
            return "{}";
          }
          if (maximumDepth < stack.length + 1) {
            return '"[Object]"';
          }
          let separator = "";
          let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
          if (hasLength && isTypedArrayWithEntries(value)) {
            res += stringifyTypedArray(value, ",", maximumBreadth);
            keys = keys.slice(value.length);
            maximumPropertiesToStringify -= value.length;
            separator = ",";
          }
          if (deterministic) {
            keys = sort(keys, comparator);
          }
          stack.push(value);
          for (let i = 0;i < maximumPropertiesToStringify; i++) {
            const key2 = keys[i];
            const tmp = stringifySimple(key2, value[key2], stack);
            if (tmp !== undefined) {
              res += `${separator}${strEscape(key2)}:${tmp}`;
              separator = ",";
            }
          }
          if (keyLength > maximumBreadth) {
            const removedKeys = keyLength - maximumBreadth;
            res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"`;
          }
          stack.pop();
          return `{${res}}`;
        }
        case "number":
          return isFinite(value) ? String(value) : fail ? fail(value) : "null";
        case "boolean":
          return value === true ? "true" : "false";
        case "undefined":
          return;
        case "bigint":
          if (bigint2) {
            return String(value);
          }
        default:
          return fail ? fail(value) : undefined;
      }
    }
    function stringify2(value, replacer, space) {
      if (arguments.length > 1) {
        let spacer = "";
        if (typeof space === "number") {
          spacer = " ".repeat(Math.min(space, 10));
        } else if (typeof space === "string") {
          spacer = space.slice(0, 10);
        }
        if (replacer != null) {
          if (typeof replacer === "function") {
            return stringifyFnReplacer("", { "": value }, [], replacer, spacer, "");
          }
          if (Array.isArray(replacer)) {
            return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, "");
          }
        }
        if (spacer.length !== 0) {
          return stringifyIndent("", value, [], spacer, "");
        }
      }
      return stringifySimple("", value, []);
    }
    return stringify2;
  }
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/multistream.js
var require_multistream = __commonJS((exports, module) => {
  var metadata = Symbol.for("pino.metadata");
  var { DEFAULT_LEVELS } = require_constants4();
  var DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info;
  function multistream(streamsArray, opts) {
    streamsArray = streamsArray || [];
    opts = opts || { dedupe: false };
    const streamLevels = Object.create(DEFAULT_LEVELS);
    streamLevels.silent = Infinity;
    if (opts.levels && typeof opts.levels === "object") {
      Object.keys(opts.levels).forEach((i) => {
        streamLevels[i] = opts.levels[i];
      });
    }
    const res = {
      write,
      add,
      remove,
      emit,
      flushSync,
      end,
      minLevel: 0,
      lastId: 0,
      streams: [],
      clone,
      [metadata]: true,
      streamLevels
    };
    if (Array.isArray(streamsArray)) {
      streamsArray.forEach(add, res);
    } else {
      add.call(res, streamsArray);
    }
    streamsArray = null;
    return res;
    function write(data) {
      let dest;
      const level = this.lastLevel;
      const { streams } = this;
      let recordedLevel = 0;
      let stream;
      for (let i = initLoopVar(streams.length, opts.dedupe);checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) {
        dest = streams[i];
        if (dest.level <= level) {
          if (recordedLevel !== 0 && recordedLevel !== dest.level) {
            break;
          }
          stream = dest.stream;
          if (stream[metadata]) {
            const { lastTime, lastMsg, lastObj, lastLogger } = this;
            stream.lastLevel = level;
            stream.lastTime = lastTime;
            stream.lastMsg = lastMsg;
            stream.lastObj = lastObj;
            stream.lastLogger = lastLogger;
          }
          stream.write(data);
          if (opts.dedupe) {
            recordedLevel = dest.level;
          }
        } else if (!opts.dedupe) {
          break;
        }
      }
    }
    function emit(...args) {
      for (const { stream } of this.streams) {
        if (typeof stream.emit === "function") {
          stream.emit(...args);
        }
      }
    }
    function flushSync() {
      for (const { stream } of this.streams) {
        if (typeof stream.flushSync === "function") {
          stream.flushSync();
        }
      }
    }
    function add(dest) {
      if (!dest) {
        return res;
      }
      const isStream = typeof dest.write === "function" || dest.stream;
      const stream_ = dest.write ? dest : dest.stream;
      if (!isStream) {
        throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");
      }
      const { streams, streamLevels: streamLevels2 } = this;
      let level;
      if (typeof dest.levelVal === "number") {
        level = dest.levelVal;
      } else if (typeof dest.level === "string") {
        level = streamLevels2[dest.level];
      } else if (typeof dest.level === "number") {
        level = dest.level;
      } else {
        level = DEFAULT_INFO_LEVEL;
      }
      const dest_ = {
        stream: stream_,
        level,
        levelVal: undefined,
        id: ++res.lastId
      };
      streams.unshift(dest_);
      streams.sort(compareByLevel);
      this.minLevel = streams[0].level;
      return res;
    }
    function remove(id) {
      const { streams } = this;
      const index2 = streams.findIndex((s) => s.id === id);
      if (index2 >= 0) {
        streams.splice(index2, 1);
        streams.sort(compareByLevel);
        this.minLevel = streams.length > 0 ? streams[0].level : -1;
      }
      return res;
    }
    function end() {
      for (const { stream } of this.streams) {
        if (typeof stream.flushSync === "function") {
          stream.flushSync();
        }
        stream.end();
      }
    }
    function clone(level) {
      const streams = new Array(this.streams.length);
      for (let i = 0;i < streams.length; i++) {
        streams[i] = {
          level,
          stream: this.streams[i].stream
        };
      }
      return {
        write,
        add,
        remove,
        minLevel: level,
        streams,
        clone,
        emit,
        flushSync,
        [metadata]: true
      };
    }
  }
  function compareByLevel(a, b) {
    return a.level - b.level;
  }
  function initLoopVar(length, dedupe) {
    return dedupe ? length - 1 : 0;
  }
  function adjustLoopVar(i, dedupe) {
    return dedupe ? i - 1 : i + 1;
  }
  function checkLoopVar(i, length, dedupe) {
    return dedupe ? i >= 0 : i < length;
  }
  module.exports = multistream;
});

// ../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js
var require_pino = __commonJS((exports, module) => {
  var os4 = __require("node:os");
  var stdSerializers = require_pino_std_serializers();
  var caller = require_caller();
  var redaction = require_redaction();
  var time2 = require_time3();
  var proto = require_proto();
  var symbols = require_symbols();
  var { configure } = require_safe_stable_stringify();
  var { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = require_levels();
  var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants4();
  var {
    createArgsNormalizer,
    asChindings,
    buildSafeSonicBoom,
    buildFormatters,
    stringify,
    normalizeDestFileDescriptor,
    noop
  } = require_tools();
  var { version: version3 } = require_meta();
  var {
    chindingsSym,
    redactFmtSym,
    serializersSym,
    timeSym,
    timeSliceIndexSym,
    streamSym,
    stringifySym,
    stringifySafeSym,
    stringifiersSym,
    setLevelSym,
    endSym,
    formatOptsSym,
    messageKeySym,
    errorKeySym,
    nestedKeySym,
    mixinSym,
    levelCompSym,
    useOnlyCustomLevelsSym,
    formattersSym,
    hooksSym,
    nestedKeyStrSym,
    mixinMergeStrategySym,
    msgPrefixSym
  } = symbols;
  var { epochTime, nullTime } = time2;
  var { pid } = process;
  var hostname2 = os4.hostname();
  var defaultErrorSerializer = stdSerializers.err;
  var defaultOptions = {
    level: "info",
    levelComparison: SORTING_ORDER.ASC,
    levels: DEFAULT_LEVELS,
    messageKey: "msg",
    errorKey: "err",
    nestedKey: null,
    enabled: true,
    base: { pid, hostname: hostname2 },
    serializers: Object.assign(Object.create(null), {
      err: defaultErrorSerializer
    }),
    formatters: Object.assign(Object.create(null), {
      bindings(bindings) {
        return bindings;
      },
      level(label, number) {
        return { level: number };
      }
    }),
    hooks: {
      logMethod: undefined,
      streamWrite: undefined
    },
    timestamp: epochTime,
    name: undefined,
    redact: null,
    customLevels: null,
    useOnlyCustomLevels: false,
    depthLimit: 5,
    edgeLimit: 100
  };
  var normalize3 = createArgsNormalizer(defaultOptions);
  var serializers = Object.assign(Object.create(null), stdSerializers);
  function pino(...args) {
    const instance = {};
    const { opts, stream } = normalize3(instance, caller(), ...args);
    if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== undefined)
      opts.level = opts.level.toLowerCase();
    const {
      redact,
      crlf,
      serializers: serializers2,
      timestamp: timestamp2,
      messageKey,
      errorKey,
      nestedKey,
      base,
      name,
      level,
      customLevels,
      levelComparison,
      mixin,
      mixinMergeStrategy,
      useOnlyCustomLevels,
      formatters,
      hooks,
      depthLimit,
      edgeLimit,
      onChild,
      msgPrefix
    } = opts;
    const stringifySafe = configure({
      maximumDepth: depthLimit,
      maximumBreadth: edgeLimit
    });
    const allFormatters = buildFormatters(formatters.level, formatters.bindings, formatters.log);
    const stringifyFn = stringify.bind({
      [stringifySafeSym]: stringifySafe
    });
    const stringifiers = redact ? redaction(redact, stringifyFn) : {};
    const formatOpts = redact ? { stringify: stringifiers[redactFmtSym] } : { stringify: stringifyFn };
    const end = "}" + (crlf ? `\r
` : `
`);
    const coreChindings = asChindings.bind(null, {
      [chindingsSym]: "",
      [serializersSym]: serializers2,
      [stringifiersSym]: stringifiers,
      [stringifySym]: stringify,
      [stringifySafeSym]: stringifySafe,
      [formattersSym]: allFormatters
    });
    let chindings = "";
    if (base !== null) {
      if (name === undefined) {
        chindings = coreChindings(base);
      } else {
        chindings = coreChindings(Object.assign({}, base, { name }));
      }
    }
    const time3 = timestamp2 instanceof Function ? timestamp2 : timestamp2 ? epochTime : nullTime;
    const timeSliceIndex = time3().indexOf(":") + 1;
    if (useOnlyCustomLevels && !customLevels)
      throw Error("customLevels is required if useOnlyCustomLevels is set true");
    if (mixin && typeof mixin !== "function")
      throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`);
    if (msgPrefix && typeof msgPrefix !== "string")
      throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`);
    assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels);
    const levels = mappings(customLevels, useOnlyCustomLevels);
    if (typeof stream.emit === "function") {
      stream.emit("message", { code: "PINO_CONFIG", config: { levels, messageKey, errorKey } });
    }
    assertLevelComparison(levelComparison);
    const levelCompFunc = genLevelComparison(levelComparison);
    Object.assign(instance, {
      levels,
      [levelCompSym]: levelCompFunc,
      [useOnlyCustomLevelsSym]: useOnlyCustomLevels,
      [streamSym]: stream,
      [timeSym]: time3,
      [timeSliceIndexSym]: timeSliceIndex,
      [stringifySym]: stringify,
      [stringifySafeSym]: stringifySafe,
      [stringifiersSym]: stringifiers,
      [endSym]: end,
      [formatOptsSym]: formatOpts,
      [messageKeySym]: messageKey,
      [errorKeySym]: errorKey,
      [nestedKeySym]: nestedKey,
      [nestedKeyStrSym]: nestedKey ? `,${JSON.stringify(nestedKey)}:{` : "",
      [serializersSym]: serializers2,
      [mixinSym]: mixin,
      [mixinMergeStrategySym]: mixinMergeStrategy,
      [chindingsSym]: chindings,
      [formattersSym]: allFormatters,
      [hooksSym]: hooks,
      silent: noop,
      onChild,
      [msgPrefixSym]: msgPrefix
    });
    Object.setPrototypeOf(instance, proto());
    genLsCache(instance);
    instance[setLevelSym](level);
    return instance;
  }
  module.exports = pino;
  module.exports.destination = (dest = process.stdout.fd) => {
    if (typeof dest === "object") {
      dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd);
      return buildSafeSonicBoom(dest);
    } else {
      return buildSafeSonicBoom({ dest: normalizeDestFileDescriptor(dest), minLength: 0 });
    }
  };
  module.exports.transport = require_transport();
  module.exports.multistream = require_multistream();
  module.exports.levels = mappings();
  module.exports.stdSerializers = serializers;
  module.exports.stdTimeFunctions = Object.assign({}, time2);
  module.exports.symbols = symbols;
  module.exports.version = version3;
  module.exports.default = pino;
  module.exports.pino = pino;
});

// ../../node_modules/.pnpm/@smithy+types@4.14.0/node_modules/@smithy/types/dist-cjs/index.js
var require_dist_cjs = __commonJS((exports) => {
  exports.HttpAuthLocation = undefined;
  (function(HttpAuthLocation) {
    HttpAuthLocation["HEADER"] = "header";
    HttpAuthLocation["QUERY"] = "query";
  })(exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));
  exports.HttpApiKeyAuthLocation = undefined;
  (function(HttpApiKeyAuthLocation) {
    HttpApiKeyAuthLocation["HEADER"] = "header";
    HttpApiKeyAuthLocation["QUERY"] = "query";
  })(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {}));
  exports.EndpointURLScheme = undefined;
  (function(EndpointURLScheme) {
    EndpointURLScheme["HTTP"] = "http";
    EndpointURLScheme["HTTPS"] = "https";
  })(exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));
  exports.AlgorithmId = undefined;
  (function(AlgorithmId) {
    AlgorithmId["MD5"] = "md5";
    AlgorithmId["CRC32"] = "crc32";
    AlgorithmId["CRC32C"] = "crc32c";
    AlgorithmId["SHA1"] = "sha1";
    AlgorithmId["SHA256"] = "sha256";
  })(exports.AlgorithmId || (exports.AlgorithmId = {}));
  var getChecksumConfiguration = (runtimeConfig) => {
    const checksumAlgorithms = [];
    if (runtimeConfig.sha256 !== undefined) {
      checksumAlgorithms.push({
        algorithmId: () => exports.AlgorithmId.SHA256,
        checksumConstructor: () => runtimeConfig.sha256
      });
    }
    if (runtimeConfig.md5 != null) {
      checksumAlgorithms.push({
        algorithmId: () => exports.AlgorithmId.MD5,
        checksumConstructor: () => runtimeConfig.md5
      });
    }
    return {
      addChecksumAlgorithm(algo) {
        checksumAlgorithms.push(algo);
      },
      checksumAlgorithms() {
        return checksumAlgorithms;
      }
    };
  };
  var resolveChecksumRuntimeConfig = (clientConfig) => {
    const runtimeConfig = {};
    clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
      runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
    });
    return runtimeConfig;
  };
  var getDefaultClientConfiguration = (runtimeConfig) => {
    return getChecksumConfiguration(runtimeConfig);
  };
  var resolveDefaultRuntimeConfig = (config) => {
    return resolveChecksumRuntimeConfig(config);
  };
  exports.FieldPosition = undefined;
  (function(FieldPosition) {
    FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
    FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
  })(exports.FieldPosition || (exports.FieldPosition = {}));
  var SMITHY_CONTEXT_KEY = "__smithy_context";
  exports.IniSectionType = undefined;
  (function(IniSectionType) {
    IniSectionType["PROFILE"] = "profile";
    IniSectionType["SSO_SESSION"] = "sso-session";
    IniSectionType["SERVICES"] = "services";
  })(exports.IniSectionType || (exports.IniSectionType = {}));
  exports.RequestHandlerProtocol = undefined;
  (function(RequestHandlerProtocol) {
    RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
    RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
    RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
  })(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));
  exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;
  exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
  exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js
var require_transport2 = __commonJS((exports) => {
  var { SMITHY_CONTEXT_KEY } = require_dist_cjs();
  var getSmithyContext = (context10) => context10[SMITHY_CONTEXT_KEY] || (context10[SMITHY_CONTEXT_KEY] = {});

  class HttpRequest {
    method;
    protocol;
    hostname;
    port;
    path;
    query;
    headers;
    username;
    password;
    fragment;
    body;
    constructor(options) {
      this.method = options.method || "GET";
      this.hostname = options.hostname || "localhost";
      this.port = options.port;
      this.query = options.query || {};
      this.headers = options.headers || {};
      this.body = options.body;
      this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
      this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
      this.username = options.username;
      this.password = options.password;
      this.fragment = options.fragment;
    }
    static clone(request2) {
      const cloned = new HttpRequest({
        ...request2,
        headers: { ...request2.headers }
      });
      if (cloned.query) {
        cloned.query = cloneQuery(cloned.query);
      }
      return cloned;
    }
    static isInstance(request2) {
      if (!request2) {
        return false;
      }
      const req = request2;
      return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
    }
    clone() {
      return HttpRequest.clone(this);
    }
  }
  function cloneQuery(query) {
    return Object.keys(query).reduce((carry, paramName) => {
      const param = query[paramName];
      return {
        ...carry,
        [paramName]: Array.isArray(param) ? [...param] : param
      };
    }, {});
  }

  class HttpResponse {
    statusCode;
    reason;
    headers;
    body;
    constructor(options) {
      this.statusCode = options.statusCode;
      this.reason = options.reason;
      this.headers = options.headers || {};
      this.body = options.body;
    }
    static isInstance(response) {
      if (!response)
        return false;
      const resp = response;
      return typeof resp.statusCode === "number" && typeof resp.headers === "object";
    }
  }
  var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
  var isValidHostLabel = (value, allowSubDomains = false) => {
    if (!allowSubDomains) {
      return VALID_HOST_LABEL_REGEX.test(value);
    }
    const labels = value.split(".");
    for (const label of labels) {
      if (!isValidHostLabel(label)) {
        return false;
      }
    }
    return true;
  };
  function isValidHostname(hostname2) {
    const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
    return hostPattern.test(hostname2);
  }
  var normalizeProvider = (input) => {
    if (typeof input === "function")
      return input;
    const promisified = Promise.resolve(input);
    return () => promisified;
  };
  function parseQueryString(querystring) {
    const query = {};
    querystring = querystring.replace(/^\?/, "");
    if (querystring) {
      for (const pair of querystring.split("&")) {
        let [key, value = null] = pair.split("=");
        key = decodeURIComponent(key);
        if (value) {
          value = decodeURIComponent(value);
        }
        if (!(key in query)) {
          query[key] = value;
        } else if (Array.isArray(query[key])) {
          query[key].push(value);
        } else {
          query[key] = [query[key], value];
        }
      }
    }
    return query;
  }
  var parseUrl2 = (url) => {
    if (typeof url === "string") {
      return parseUrl2(new URL(url));
    }
    const { hostname: hostname2, pathname, port, protocol, search } = url;
    let query;
    if (search) {
      query = parseQueryString(search);
    }
    return {
      hostname: hostname2,
      port: port ? parseInt(port) : undefined,
      protocol,
      path: pathname,
      query
    };
  };
  var toEndpointV1 = (endpoint) => {
    if (typeof endpoint === "object") {
      if ("url" in endpoint) {
        const v1Endpoint = parseUrl2(endpoint.url);
        if (endpoint.headers) {
          v1Endpoint.headers = {};
          for (const name in endpoint.headers) {
            v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
          }
        }
        return v1Endpoint;
      }
      return endpoint;
    }
    return parseUrl2(endpoint);
  };
  exports.HttpRequest = HttpRequest;
  exports.HttpResponse = HttpResponse;
  exports.getSmithyContext = getSmithyContext;
  exports.isValidHostLabel = isValidHostLabel;
  exports.isValidHostname = isValidHostname;
  exports.normalizeProvider = normalizeProvider;
  exports.parseQueryString = parseQueryString;
  exports.parseUrl = parseUrl2;
  exports.toEndpointV1 = toEndpointV1;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js
var require_schema = __commonJS((exports) => {
  var { getSmithyContext, HttpResponse, toEndpointV1 } = require_transport2();
  var deref = (schemaRef) => {
    if (typeof schemaRef === "function") {
      return schemaRef();
    }
    return schemaRef;
  };
  var operation = (namespace, name, traits, input, output) => ({
    name,
    namespace,
    traits,
    input,
    output
  });
  var schemaDeserializationMiddleware = (config) => (next, context10) => async (args) => {
    const { response } = await next(args);
    const { operationSchema } = getSmithyContext(context10);
    const [, ns, n, t, i, o] = operationSchema ?? [];
    try {
      const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {
        ...config,
        ...context10
      }, response);
      return {
        response,
        output: parsed
      };
    } catch (error3) {
      Object.defineProperty(error3, "$response", {
        value: response,
        enumerable: false,
        writable: false,
        configurable: false
      });
      if (!("$metadata" in error3)) {
        const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
        try {
          error3.message += `
  ` + hint;
        } catch (e) {
          if (!context10.logger || context10.logger?.constructor?.name === "NoOpLogger") {
            console.warn(hint);
          } else {
            context10.logger?.warn?.(hint);
          }
        }
        if (typeof error3.$responseBodyText !== "undefined") {
          if (error3.$response) {
            error3.$response.body = error3.$responseBodyText;
          }
        }
        try {
          if (HttpResponse.isInstance(response)) {
            const { headers = {}, statusCode } = response;
            const headerEntries = Object.entries(headers);
            error3.$metadata = {
              httpStatusCode: statusCode,
              requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
              extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
              cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
            };
          }
        } catch (e) {}
      }
      throw error3;
    }
  };
  var findHeader = (pattern, headers) => {
    return (headers.find(([k]) => {
      return k.match(pattern);
    }) || [undefined, undefined])[1];
  };
  var schemaSerializationMiddleware = (config) => (next, context10) => async (args) => {
    const { operationSchema } = getSmithyContext(context10);
    const [, ns, n, t, i, o] = operationSchema ?? [];
    const endpoint = context10.endpointV2 ? async () => toEndpointV1(context10.endpointV2) : config.endpoint;
    const request2 = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {
      ...config,
      ...context10,
      endpoint
    });
    return next({
      ...args,
      request: request2
    });
  };
  var deserializerMiddlewareOption = {
    name: "deserializerMiddleware",
    step: "deserialize",
    tags: ["DESERIALIZER"],
    override: true
  };
  var serializerMiddlewareOption = {
    name: "serializerMiddleware",
    step: "serialize",
    tags: ["SERIALIZER"],
    override: true
  };
  function getSchemaSerdePlugin(config) {
    return {
      applyToStack: (commandStack) => {
        commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);
        commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
        config.protocol.setSerdeContext(config);
      }
    };
  }

  class Schema2 {
    name;
    namespace;
    traits;
    static assign(instance, values) {
      const schema = Object.assign(instance, values);
      return schema;
    }
    static [Symbol.hasInstance](lhs) {
      const isPrototype = this.prototype.isPrototypeOf(lhs);
      if (!isPrototype && typeof lhs === "object" && lhs !== null) {
        const list2 = lhs;
        return list2.symbol === this.symbol;
      }
      return isPrototype;
    }
    getName() {
      return this.namespace + "#" + this.name;
    }
  }

  class ListSchema extends Schema2 {
    static symbol = Symbol.for("@smithy/lis");
    name;
    traits;
    valueSchema;
    symbol = ListSchema.symbol;
  }
  var list = (namespace, name, traits, valueSchema) => Schema2.assign(new ListSchema, {
    name,
    namespace,
    traits,
    valueSchema
  });

  class MapSchema extends Schema2 {
    static symbol = Symbol.for("@smithy/map");
    name;
    traits;
    keySchema;
    valueSchema;
    symbol = MapSchema.symbol;
  }
  var map = (namespace, name, traits, keySchema, valueSchema) => Schema2.assign(new MapSchema, {
    name,
    namespace,
    traits,
    keySchema,
    valueSchema
  });

  class OperationSchema extends Schema2 {
    static symbol = Symbol.for("@smithy/ope");
    name;
    traits;
    input;
    output;
    symbol = OperationSchema.symbol;
  }
  var op = (namespace, name, traits, input, output) => Schema2.assign(new OperationSchema, {
    name,
    namespace,
    traits,
    input,
    output
  });

  class StructureSchema extends Schema2 {
    static symbol = Symbol.for("@smithy/str");
    name;
    traits;
    memberNames;
    memberList;
    symbol = StructureSchema.symbol;
  }
  var struct = (namespace, name, traits, memberNames, memberList) => Schema2.assign(new StructureSchema, {
    name,
    namespace,
    traits,
    memberNames,
    memberList
  });

  class ErrorSchema extends StructureSchema {
    static symbol = Symbol.for("@smithy/err");
    ctor;
    symbol = ErrorSchema.symbol;
  }
  var error2 = (namespace, name, traits, memberNames, memberList, ctor) => Schema2.assign(new ErrorSchema, {
    name,
    namespace,
    traits,
    memberNames,
    memberList,
    ctor: null
  });
  var traitsCache = [];
  function translateTraits(indicator) {
    if (typeof indicator === "object") {
      return indicator;
    }
    indicator = indicator | 0;
    if (traitsCache[indicator]) {
      return traitsCache[indicator];
    }
    const traits = {};
    let i = 0;
    for (const trait of [
      "httpLabel",
      "idempotent",
      "idempotencyToken",
      "sensitive",
      "httpPayload",
      "httpResponseCode",
      "httpQueryParams"
    ]) {
      if ((indicator >> i++ & 1) === 1) {
        traits[trait] = 1;
      }
    }
    return traitsCache[indicator] = traits;
  }
  var anno = {
    it: Symbol.for("@smithy/nor-struct-it"),
    ns: Symbol.for("@smithy/ns")
  };
  var simpleSchemaCacheN = [];
  var simpleSchemaCacheS = {};

  class NormalizedSchema {
    ref;
    memberName;
    static symbol = Symbol.for("@smithy/nor");
    symbol = NormalizedSchema.symbol;
    name;
    schema;
    _isMemberSchema;
    traits;
    memberTraits;
    normalizedTraits;
    constructor(ref, memberName) {
      this.ref = ref;
      this.memberName = memberName;
      const traitStack = [];
      let _ref = ref;
      let schema = ref;
      this._isMemberSchema = false;
      while (isMemberSchema(_ref)) {
        traitStack.push(_ref[1]);
        _ref = _ref[0];
        schema = deref(_ref);
        this._isMemberSchema = true;
      }
      if (traitStack.length > 0) {
        this.memberTraits = {};
        for (let i = traitStack.length - 1;i >= 0; --i) {
          const traitSet = traitStack[i];
          Object.assign(this.memberTraits, translateTraits(traitSet));
        }
      } else {
        this.memberTraits = 0;
      }
      if (schema instanceof NormalizedSchema) {
        const computedMemberTraits = this.memberTraits;
        Object.assign(this, schema);
        this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
        this.normalizedTraits = undefined;
        this.memberName = memberName ?? schema.memberName;
        return;
      }
      this.schema = deref(schema);
      if (isStaticSchema(this.schema)) {
        this.name = `${this.schema[1]}#${this.schema[2]}`;
        this.traits = this.schema[3];
      } else {
        this.name = this.memberName ?? String(schema);
        this.traits = 0;
      }
      if (this._isMemberSchema && !memberName) {
        throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
      }
    }
    static [Symbol.hasInstance](lhs) {
      const isPrototype = this.prototype.isPrototypeOf(lhs);
      if (!isPrototype && typeof lhs === "object" && lhs !== null) {
        const ns = lhs;
        return ns.symbol === this.symbol;
      }
      return isPrototype;
    }
    static of(ref) {
      const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null;
      if (typeof ref === "number") {
        if (simpleSchemaCacheN[ref]) {
          return simpleSchemaCacheN[ref];
        }
      } else if (typeof ref === "string") {
        if (simpleSchemaCacheS[ref]) {
          return simpleSchemaCacheS[ref];
        }
      } else if (keyAble) {
        if (ref[anno.ns]) {
          return ref[anno.ns];
        }
      }
      const sc = deref(ref);
      if (sc instanceof NormalizedSchema) {
        return sc;
      }
      if (isMemberSchema(sc)) {
        const [ns2, traits] = sc;
        if (ns2 instanceof NormalizedSchema) {
          Object.assign(ns2.getMergedTraits(), translateTraits(traits));
          return ns2;
        }
        throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
      }
      const ns = new NormalizedSchema(sc);
      if (keyAble) {
        return ref[anno.ns] = ns;
      }
      if (typeof sc === "string") {
        return simpleSchemaCacheS[sc] = ns;
      }
      if (typeof sc === "number") {
        return simpleSchemaCacheN[sc] = ns;
      }
      return ns;
    }
    getSchema() {
      const sc = this.schema;
      if (Array.isArray(sc) && sc[0] === 0) {
        return sc[4];
      }
      return sc;
    }
    getName(withNamespace = false) {
      const { name } = this;
      const short = !withNamespace && name && name.includes("#");
      return short ? name.split("#")[1] : name || undefined;
    }
    getMemberName() {
      return this.memberName;
    }
    isMemberSchema() {
      return this._isMemberSchema;
    }
    isListSchema() {
      const sc = this.getSchema();
      return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1;
    }
    isMapSchema() {
      const sc = this.getSchema();
      return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2;
    }
    isStructSchema() {
      const sc = this.getSchema();
      if (typeof sc !== "object") {
        return false;
      }
      const id = sc[0];
      return id === 3 || id === -3 || id === 4;
    }
    isUnionSchema() {
      const sc = this.getSchema();
      if (typeof sc !== "object") {
        return false;
      }
      return sc[0] === 4;
    }
    isBlobSchema() {
      const sc = this.getSchema();
      return sc === 21 || sc === 42;
    }
    isTimestampSchema() {
      const sc = this.getSchema();
      return typeof sc === "number" && sc >= 4 && sc <= 7;
    }
    isUnitSchema() {
      return this.getSchema() === "unit";
    }
    isDocumentSchema() {
      return this.getSchema() === 15;
    }
    isStringSchema() {
      return this.getSchema() === 0;
    }
    isBooleanSchema() {
      return this.getSchema() === 2;
    }
    isNumericSchema() {
      return this.getSchema() === 1;
    }
    isBigIntegerSchema() {
      return this.getSchema() === 17;
    }
    isBigDecimalSchema() {
      return this.getSchema() === 19;
    }
    isStreaming() {
      const { streaming } = this.getMergedTraits();
      return !!streaming || this.getSchema() === 42;
    }
    isIdempotencyToken() {
      return !!this.getMergedTraits().idempotencyToken;
    }
    getMergedTraits() {
      return this.normalizedTraits ?? (this.normalizedTraits = {
        ...this.getOwnTraits(),
        ...this.getMemberTraits()
      });
    }
    getMemberTraits() {
      return translateTraits(this.memberTraits);
    }
    getOwnTraits() {
      return translateTraits(this.traits);
    }
    getKeySchema() {
      const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];
      if (!isDoc && !isMap) {
        throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
      }
      const schema = this.getSchema();
      const memberSchema = isDoc ? 15 : schema[4] ?? 0;
      return member2([memberSchema, 0], "key");
    }
    getValueSchema() {
      const sc = this.getSchema();
      const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];
      const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : undefined;
      if (memberSchema != null) {
        return member2([memberSchema, 0], isMap ? "value" : "member");
      }
      throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
    }
    getMemberSchema(memberName) {
      const struct2 = this.getSchema();
      if (this.isStructSchema() && struct2[4].includes(memberName)) {
        const i = struct2[4].indexOf(memberName);
        const memberSchema = struct2[5][i];
        return member2(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
      }
      if (this.isDocumentSchema()) {
        return member2([15, 0], memberName);
      }
      throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);
    }
    getMemberSchemas() {
      const buffer = {};
      try {
        for (const [k, v] of this.structIterator()) {
          buffer[k] = v;
        }
      } catch (ignored) {}
      return buffer;
    }
    getEventStreamMember() {
      if (this.isStructSchema()) {
        for (const [memberName, memberSchema] of this.structIterator()) {
          if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {
            return memberName;
          }
        }
      }
      return "";
    }
    *structIterator() {
      if (this.isUnitSchema()) {
        return;
      }
      if (!this.isStructSchema()) {
        throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
      }
      const struct2 = this.getSchema();
      const z = struct2[4].length;
      let it = struct2[anno.it];
      if (it && z === it.length) {
        yield* it;
        return;
      }
      it = Array(z);
      for (let i = 0;i < z; ++i) {
        const k = struct2[4][i];
        const v = member2([struct2[5][i], 0], k);
        yield it[i] = [k, v];
      }
      struct2[anno.it] = it;
    }
  }
  function member2(memberSchema, memberName) {
    if (memberSchema instanceof NormalizedSchema) {
      return Object.assign(memberSchema, {
        memberName,
        _isMemberSchema: true
      });
    }
    const internalCtorAccess = NormalizedSchema;
    return new internalCtorAccess(memberSchema, memberName);
  }
  var isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
  var isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;

  class SimpleSchema extends Schema2 {
    static symbol = Symbol.for("@smithy/sim");
    name;
    schemaRef;
    traits;
    symbol = SimpleSchema.symbol;
  }
  var sim = (namespace, name, schemaRef, traits) => Schema2.assign(new SimpleSchema, {
    name,
    namespace,
    traits,
    schemaRef
  });
  var simAdapter = (namespace, name, traits, schemaRef) => Schema2.assign(new SimpleSchema, {
    name,
    namespace,
    traits,
    schemaRef
  });
  var SCHEMA = {
    BLOB: 21,
    STREAMING_BLOB: 42,
    BOOLEAN: 2,
    STRING: 0,
    NUMERIC: 1,
    BIG_INTEGER: 17,
    BIG_DECIMAL: 19,
    DOCUMENT: 15,
    TIMESTAMP_DEFAULT: 4,
    TIMESTAMP_DATE_TIME: 5,
    TIMESTAMP_HTTP_DATE: 6,
    TIMESTAMP_EPOCH_SECONDS: 7,
    LIST_MODIFIER: 64,
    MAP_MODIFIER: 128
  };

  class TypeRegistry {
    namespace;
    schemas;
    exceptions;
    static registries = new Map;
    constructor(namespace, schemas = new Map, exceptions = new Map) {
      this.namespace = namespace;
      this.schemas = schemas;
      this.exceptions = exceptions;
    }
    static for(namespace) {
      if (!TypeRegistry.registries.has(namespace)) {
        TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));
      }
      return TypeRegistry.registries.get(namespace);
    }
    copyFrom(other) {
      const { schemas, exceptions } = this;
      for (const [k, v] of other.schemas) {
        if (!schemas.has(k)) {
          schemas.set(k, v);
        }
      }
      for (const [k, v] of other.exceptions) {
        if (!exceptions.has(k)) {
          exceptions.set(k, v);
        }
      }
    }
    register(shapeId, schema) {
      const qualifiedName = this.normalizeShapeId(shapeId);
      for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) {
        r.schemas.set(qualifiedName, schema);
      }
    }
    getSchema(shapeId) {
      const id = this.normalizeShapeId(shapeId);
      if (!this.schemas.has(id)) {
        if (!shapeId.includes("#")) {
          const suffix = "#" + shapeId;
          const candidates = [];
          for (const [shapeId2, schema] of this.schemas.entries()) {
            if (shapeId2.endsWith(suffix)) {
              candidates.push(schema);
            }
          }
          if (candidates.length === 1) {
            return candidates[0];
          }
        }
        throw new Error(`@smithy/core/schema - schema not found for ${id}`);
      }
      return this.schemas.get(id);
    }
    registerError(es, ctor) {
      const $error2 = es;
      const ns = $error2[1];
      for (const r of [this, TypeRegistry.for(ns)]) {
        r.schemas.set(ns + "#" + $error2[2], $error2);
        r.exceptions.set($error2, ctor);
      }
    }
    getErrorCtor(es) {
      const $error2 = es;
      if (this.exceptions.has($error2)) {
        return this.exceptions.get($error2);
      }
      const registry = TypeRegistry.for($error2[1]);
      return registry.exceptions.get($error2);
    }
    getBaseException() {
      for (const exceptionKey of this.exceptions.keys()) {
        if (Array.isArray(exceptionKey)) {
          const [, ns, name] = exceptionKey;
          const id = ns + "#" + name;
          if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
            return exceptionKey;
          }
        }
      }
      return;
    }
    find(predicate) {
      for (const schema of this.schemas.values()) {
        if (predicate(schema)) {
          return schema;
        }
      }
      return;
    }
    clear() {
      this.schemas.clear();
      this.exceptions.clear();
    }
    normalizeShapeId(shapeId) {
      if (shapeId.includes("#")) {
        return shapeId;
      }
      return this.namespace + "#" + shapeId;
    }
  }
  exports.ErrorSchema = ErrorSchema;
  exports.ListSchema = ListSchema;
  exports.MapSchema = MapSchema;
  exports.NormalizedSchema = NormalizedSchema;
  exports.OperationSchema = OperationSchema;
  exports.SCHEMA = SCHEMA;
  exports.Schema = Schema2;
  exports.SimpleSchema = SimpleSchema;
  exports.StructureSchema = StructureSchema;
  exports.TypeRegistry = TypeRegistry;
  exports.deref = deref;
  exports.deserializerMiddlewareOption = deserializerMiddlewareOption;
  exports.error = error2;
  exports.getSchemaSerdePlugin = getSchemaSerdePlugin;
  exports.isStaticSchema = isStaticSchema;
  exports.list = list;
  exports.map = map;
  exports.op = op;
  exports.operation = operation;
  exports.serializerMiddlewareOption = serializerMiddlewareOption;
  exports.sim = sim;
  exports.simAdapter = simAdapter;
  exports.simpleSchemaCacheN = simpleSchemaCacheN;
  exports.simpleSchemaCacheS = simpleSchemaCacheS;
  exports.struct = struct;
  exports.traitsCache = traitsCache;
  exports.translateTraits = translateTraits;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/client/index.js
var require_client3 = __commonJS((exports) => {
  var { getSmithyContext, normalizeProvider } = require_transport2();
  exports.getSmithyContext = getSmithyContext;
  exports.normalizeProvider = normalizeProvider;
  var { SMITHY_CONTEXT_KEY, AlgorithmId } = require_dist_cjs();
  exports.AlgorithmId = AlgorithmId;
  var { NormalizedSchema } = require_schema();
  var getAllAliases = (name, aliases) => {
    const _aliases = [];
    if (name) {
      _aliases.push(name);
    }
    if (aliases) {
      for (const alias of aliases) {
        _aliases.push(alias);
      }
    }
    return _aliases;
  };
  var getMiddlewareNameWithAliases = (name, aliases) => {
    return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
  };
  var constructStack = () => {
    let absoluteEntries = [];
    let relativeEntries = [];
    let identifyOnResolve = false;
    const entriesNameSet = new Set;
    const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]);
    const removeByName = (toRemove) => {
      let isRemoved = false;
      const filterCb = (entry) => {
        const aliases = getAllAliases(entry.name, entry.aliases);
        if (aliases.includes(toRemove)) {
          isRemoved = true;
          for (const alias of aliases) {
            entriesNameSet.delete(alias);
          }
          return false;
        }
        return true;
      };
      absoluteEntries = absoluteEntries.filter(filterCb);
      relativeEntries = relativeEntries.filter(filterCb);
      return isRemoved;
    };
    const removeByReference = (toRemove) => {
      let isRemoved = false;
      const filterCb = (entry) => {
        if (entry.middleware === toRemove) {
          isRemoved = true;
          for (const alias of getAllAliases(entry.name, entry.aliases)) {
            entriesNameSet.delete(alias);
          }
          return false;
        }
        return true;
      };
      absoluteEntries = absoluteEntries.filter(filterCb);
      relativeEntries = relativeEntries.filter(filterCb);
      return isRemoved;
    };
    const cloneTo = (toStack) => {
      absoluteEntries.forEach((entry) => {
        toStack.add(entry.middleware, { ...entry });
      });
      relativeEntries.forEach((entry) => {
        toStack.addRelativeTo(entry.middleware, { ...entry });
      });
      toStack.identifyOnResolve?.(stack.identifyOnResolve());
      return toStack;
    };
    const expandRelativeMiddlewareList = (from) => {
      const expandedMiddlewareList = [];
      from.before.forEach((entry) => {
        if (entry.before.length === 0 && entry.after.length === 0) {
          expandedMiddlewareList.push(entry);
        } else {
          expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
        }
      });
      expandedMiddlewareList.push(from);
      from.after.reverse().forEach((entry) => {
        if (entry.before.length === 0 && entry.after.length === 0) {
          expandedMiddlewareList.push(entry);
        } else {
          expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
        }
      });
      return expandedMiddlewareList;
    };
    const getMiddlewareList = (debug2 = false) => {
      const normalizedAbsoluteEntries = [];
      const normalizedRelativeEntries = [];
      const normalizedEntriesNameMap = {};
      absoluteEntries.forEach((entry) => {
        const normalizedEntry = {
          ...entry,
          before: [],
          after: []
        };
        for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
          normalizedEntriesNameMap[alias] = normalizedEntry;
        }
        normalizedAbsoluteEntries.push(normalizedEntry);
      });
      relativeEntries.forEach((entry) => {
        const normalizedEntry = {
          ...entry,
          before: [],
          after: []
        };
        for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
          normalizedEntriesNameMap[alias] = normalizedEntry;
        }
        normalizedRelativeEntries.push(normalizedEntry);
      });
      normalizedRelativeEntries.forEach((entry) => {
        if (entry.toMiddleware) {
          const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
          if (toMiddleware === undefined) {
            if (debug2) {
              return;
            }
            throw new Error(`${entry.toMiddleware} is not found when adding ` + `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + `middleware ${entry.relation} ${entry.toMiddleware}`);
          }
          if (entry.relation === "after") {
            toMiddleware.after.push(entry);
          }
          if (entry.relation === "before") {
            toMiddleware.before.push(entry);
          }
        }
      });
      const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {
        wholeList.push(...expandedMiddlewareList);
        return wholeList;
      }, []);
      return mainChain;
    };
    const stack = {
      add: (middleware, options = {}) => {
        const { name, override, aliases: _aliases } = options;
        const entry = {
          step: "initialize",
          priority: "normal",
          middleware,
          ...options
        };
        const aliases = getAllAliases(name, _aliases);
        if (aliases.length > 0) {
          if (aliases.some((alias) => entriesNameSet.has(alias))) {
            if (!override)
              throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
            for (const alias of aliases) {
              const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
              if (toOverrideIndex === -1) {
                continue;
              }
              const toOverride = absoluteEntries[toOverrideIndex];
              if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {
                throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + `${toOverride.priority} priority in ${toOverride.step} step cannot ` + `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + `${entry.priority} priority in ${entry.step} step.`);
              }
              absoluteEntries.splice(toOverrideIndex, 1);
            }
          }
          for (const alias of aliases) {
            entriesNameSet.add(alias);
          }
        }
        absoluteEntries.push(entry);
      },
      addRelativeTo: (middleware, options) => {
        const { name, override, aliases: _aliases } = options;
        const entry = {
          middleware,
          ...options
        };
        const aliases = getAllAliases(name, _aliases);
        if (aliases.length > 0) {
          if (aliases.some((alias) => entriesNameSet.has(alias))) {
            if (!override)
              throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
            for (const alias of aliases) {
              const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
              if (toOverrideIndex === -1) {
                continue;
              }
              const toOverride = relativeEntries[toOverrideIndex];
              if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
                throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + `"${entry.toMiddleware}" middleware.`);
              }
              relativeEntries.splice(toOverrideIndex, 1);
            }
          }
          for (const alias of aliases) {
            entriesNameSet.add(alias);
          }
        }
        relativeEntries.push(entry);
      },
      clone: () => cloneTo(constructStack()),
      use: (plugin) => {
        plugin.applyToStack(stack);
      },
      remove: (toRemove) => {
        if (typeof toRemove === "string")
          return removeByName(toRemove);
        else
          return removeByReference(toRemove);
      },
      removeByTag: (toRemove) => {
        let isRemoved = false;
        const filterCb = (entry) => {
          const { tags, name, aliases: _aliases } = entry;
          if (tags && tags.includes(toRemove)) {
            const aliases = getAllAliases(name, _aliases);
            for (const alias of aliases) {
              entriesNameSet.delete(alias);
            }
            isRemoved = true;
            return false;
          }
          return true;
        };
        absoluteEntries = absoluteEntries.filter(filterCb);
        relativeEntries = relativeEntries.filter(filterCb);
        return isRemoved;
      },
      concat: (from) => {
        const cloned = cloneTo(constructStack());
        cloned.use(from);
        cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));
        return cloned;
      },
      applyToStack: cloneTo,
      identify: () => {
        return getMiddlewareList(true).map((mw) => {
          const step = mw.step ?? mw.relation + " " + mw.toMiddleware;
          return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
        });
      },
      identifyOnResolve(toggle) {
        if (typeof toggle === "boolean")
          identifyOnResolve = toggle;
        return identifyOnResolve;
      },
      resolve: (handler, context10) => {
        for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
          handler = middleware(handler, context10);
        }
        if (identifyOnResolve) {
          console.log(stack.identify());
        }
        return handler;
      }
    };
    return stack;
  };
  var stepWeights = {
    initialize: 5,
    serialize: 4,
    build: 3,
    finalizeRequest: 2,
    deserialize: 1
  };
  var priorityWeights = {
    high: 3,
    normal: 2,
    low: 1
  };
  var invalidFunction = (message) => () => {
    throw new Error(message);
  };
  var invalidProvider = (message) => () => Promise.reject(message);
  var getCircularReplacer = () => {
    const seen = new WeakSet;
    return (key, value) => {
      if (typeof value === "object" && value !== null) {
        if (seen.has(value)) {
          return "[Circular]";
        }
        seen.add(value);
      }
      return value;
    };
  };
  var sleep = (seconds) => {
    return new Promise((resolve3) => setTimeout(resolve3, seconds * 1000));
  };
  var waiterServiceDefaults = {
    minDelay: 2,
    maxDelay: 120
  };
  var WaiterState;
  (function(WaiterState2) {
    WaiterState2["ABORTED"] = "ABORTED";
    WaiterState2["FAILURE"] = "FAILURE";
    WaiterState2["SUCCESS"] = "SUCCESS";
    WaiterState2["RETRY"] = "RETRY";
    WaiterState2["TIMEOUT"] = "TIMEOUT";
  })(WaiterState || (WaiterState = {}));
  var checkExceptions = (result) => {
    if (result.state === WaiterState.ABORTED) {
      const abortError = new Error(`${JSON.stringify({
        ...result,
        reason: "Request was aborted"
      }, getCircularReplacer())}`);
      abortError.name = "AbortError";
      throw abortError;
    } else if (result.state === WaiterState.TIMEOUT) {
      const timeoutError = new Error(`${JSON.stringify({
        ...result,
        reason: "Waiter has timed out"
      }, getCircularReplacer())}`);
      timeoutError.name = "TimeoutError";
      throw timeoutError;
    } else if (result.state !== WaiterState.SUCCESS) {
      throw new Error(`${JSON.stringify(result, getCircularReplacer())}`);
    }
    return result;
  };
  var runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {
    const observedResponses = {};
    const [minDelayMs, maxDelayMs] = [minDelay * 1000, maxDelay * 1000];
    let currentAttempt = 0;
    const waitUntil = Date.now() + maxWaitTime * 1000;
    const warn403Time = Date.now() + 60000;
    let didWarn403 = false;
    while (true) {
      if (currentAttempt > 0) {
        const delayMs = exponentialBackoffWithJitter(minDelayMs, maxDelayMs, currentAttempt, waitUntil);
        if (abortController?.signal?.aborted || abortSignal?.aborted) {
          const message = "AbortController signal aborted.";
          observedResponses[message] |= 0;
          observedResponses[message] += 1;
          return { state: WaiterState.ABORTED, observedResponses };
        }
        if (Date.now() + delayMs > waitUntil) {
          return { state: WaiterState.TIMEOUT, observedResponses };
        }
        await sleep(delayMs / 1000);
      }
      const { state, reason } = await acceptorChecks(client, input);
      if (reason) {
        const message = createMessageFromResponse(reason);
        observedResponses[message] |= 0;
        observedResponses[message] += 1;
      }
      if (state !== WaiterState.RETRY) {
        return { state, reason, final: reason, observedResponses };
      }
      currentAttempt += 1;
      if (!didWarn403 && Date.now() >= warn403Time) {
        checkWarn403(observedResponses, client);
        didWarn403 = true;
      }
    }
  };
  var checkWarn403 = (observedResponses = {}, client) => {
    const orderedErrors = Object.keys(observedResponses);
    let count403 = 0;
    for (const response of orderedErrors) {
      const n = observedResponses[response] | 0;
      if (response.startsWith("403:")) {
        count403 += n;
      }
    }
    const clientLogger = client?.config?.logger;
    const warningLogger = typeof clientLogger?.warn === "function" && !clientLogger.constructor?.name?.includes?.("NoOpLogger") ? clientLogger : console;
    if (count403 >= 3 || orderedErrors[orderedErrors.length - 1]?.startsWith("403:")) {
      warningLogger.warn(`@smithy/util-waiter WARN - 403 status code encountered during waiter polling.`);
    }
  };
  var createMessageFromResponse = (reason) => {
    const status = reason?.$response?.statusCode ?? reason?.$metadata?.httpStatusCode;
    if (reason?.$responseBodyText) {
      return `${status ? status + ": " : ""}Deserialization error for body: ${reason.$responseBodyText}`;
    }
    if (status) {
      if (reason?.$response || reason?.message) {
        return `${status ?? "Unknown"}: ${reason?.message}`;
      }
      return `${status}: OK`;
    }
    return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown");
  };
  var exponentialBackoffWithJitter = (minDelayMs, maxDelayMs, attempt, waitUntil) => {
    const attemptCountCeiling = Math.log(maxDelayMs / minDelayMs) / Math.log(2) + 1;
    if (attempt > attemptCountCeiling) {
      return maxDelayMs;
    }
    const delay = minDelayMs * 2 ** (attempt - 1);
    const capped = Math.min(delay, maxDelayMs);
    const waitFor = randomInRange(minDelayMs, capped);
    if (Date.now() + waitFor > waitUntil) {
      const timeRemaining = waitUntil - Date.now();
      return Math.max(0, timeRemaining - 500);
    }
    return waitFor;
  };
  var randomInRange = (min, max) => min + Math.random() * (max - min);
  var validateWaiterOptions = (options) => {
    if (options.maxWaitTime <= 0) {
      throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);
    } else if (options.minDelay <= 0) {
      throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);
    } else if (options.maxDelay <= 0) {
      throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);
    } else if (options.maxWaitTime <= options.minDelay) {
      throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);
    } else if (options.maxDelay < options.minDelay) {
      throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);
    }
  };
  var abortTimeout = (abortSignal) => {
    let onAbort;
    const promise = new Promise((resolve3) => {
      onAbort = () => resolve3({ state: WaiterState.ABORTED });
      if (typeof abortSignal.addEventListener === "function") {
        abortSignal.addEventListener("abort", onAbort);
      } else {
        abortSignal.onabort = onAbort;
      }
    });
    return {
      clearListener() {
        if (typeof abortSignal.removeEventListener === "function") {
          abortSignal.removeEventListener("abort", onAbort);
        }
      },
      aborted: promise
    };
  };
  var createWaiter = async (options, input, acceptorChecks) => {
    const params = {
      ...waiterServiceDefaults,
      ...options
    };
    validateWaiterOptions(params);
    const exitConditions = [runPolling(params, input, acceptorChecks)];
    const finalize = [];
    if (options.abortSignal) {
      const { aborted, clearListener } = abortTimeout(options.abortSignal);
      finalize.push(clearListener);
      exitConditions.push(aborted);
    }
    if (options.abortController?.signal) {
      const { aborted, clearListener } = abortTimeout(options.abortController.signal);
      finalize.push(clearListener);
      exitConditions.push(aborted);
    }
    return Promise.race(exitConditions).then((result) => {
      for (const fn of finalize) {
        fn();
      }
      return result;
    });
  };

  class Client4 {
    config;
    middlewareStack = constructStack();
    initConfig;
    handlers;
    constructor(config) {
      this.config = config;
      const { protocol, protocolSettings } = config;
      if (protocolSettings) {
        if (typeof protocol === "function") {
          config.protocol = new protocol(protocolSettings);
        }
      }
    }
    send(command, optionsOrCb, cb) {
      const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined;
      const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
      const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;
      let handler;
      if (useHandlerCache) {
        if (!this.handlers) {
          this.handlers = new WeakMap;
        }
        const handlers2 = this.handlers;
        if (handlers2.has(command.constructor)) {
          handler = handlers2.get(command.constructor);
        } else {
          handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
          handlers2.set(command.constructor, handler);
        }
      } else {
        delete this.handlers;
        handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
      }
      if (callback) {
        handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {});
      } else {
        return handler(command).then((result) => result.output);
      }
    }
    destroy() {
      this.config?.requestHandler?.destroy?.();
      delete this.handlers;
    }
  }
  var SENSITIVE_STRING$1 = "***SensitiveInformation***";
  function schemaLogFilter(schema, data) {
    if (data == null) {
      return data;
    }
    const ns = NormalizedSchema.of(schema);
    if (ns.getMergedTraits().sensitive) {
      return SENSITIVE_STRING$1;
    }
    if (ns.isListSchema()) {
      const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;
      if (isSensitive) {
        return SENSITIVE_STRING$1;
      }
    } else if (ns.isMapSchema()) {
      const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;
      if (isSensitive) {
        return SENSITIVE_STRING$1;
      }
    } else if (ns.isStructSchema() && typeof data === "object") {
      const object = data;
      const newObject = {};
      for (const [member2, memberNs] of ns.structIterator()) {
        if (object[member2] != null) {
          newObject[member2] = schemaLogFilter(memberNs, object[member2]);
        }
      }
      return newObject;
    }
    return data;
  }

  class Command {
    middlewareStack = constructStack();
    schema;
    static classBuilder() {
      return new ClassBuilder;
    }
    resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) {
      for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
        this.middlewareStack.use(mw);
      }
      const stack = clientStack.concat(this.middlewareStack);
      const { logger } = configuration;
      const handlerExecutionContext = {
        logger,
        clientName,
        commandName,
        inputFilterSensitiveLog,
        outputFilterSensitiveLog,
        [SMITHY_CONTEXT_KEY]: {
          commandInstance: this,
          ...smithyContext
        },
        ...additionalContext
      };
      const { requestHandler } = configuration;
      let requestOptions = options ?? {};
      if (smithyContext.eventStream) {
        requestOptions = {
          isEventStream: true,
          ...requestOptions
        };
      }
      return stack.resolve((request2) => requestHandler.handle(request2.request, requestOptions), handlerExecutionContext);
    }
  }

  class ClassBuilder {
    _init = () => {};
    _ep = {};
    _middlewareFn = () => [];
    _commandName = "";
    _clientName = "";
    _additionalContext = {};
    _smithyContext = {};
    _inputFilterSensitiveLog = undefined;
    _outputFilterSensitiveLog = undefined;
    _serializer = null;
    _deserializer = null;
    _operationSchema;
    init(cb) {
      this._init = cb;
    }
    ep(endpointParameterInstructions) {
      this._ep = endpointParameterInstructions;
      return this;
    }
    m(middlewareSupplier) {
      this._middlewareFn = middlewareSupplier;
      return this;
    }
    s(service, operation, smithyContext = {}) {
      this._smithyContext = {
        service,
        operation,
        ...smithyContext
      };
      return this;
    }
    c(additionalContext = {}) {
      this._additionalContext = additionalContext;
      return this;
    }
    n(clientName, commandName) {
      this._clientName = clientName;
      this._commandName = commandName;
      return this;
    }
    f(inputFilter = (_) => _, outputFilter = (_) => _) {
      this._inputFilterSensitiveLog = inputFilter;
      this._outputFilterSensitiveLog = outputFilter;
      return this;
    }
    ser(serializer) {
      this._serializer = serializer;
      return this;
    }
    de(deserializer) {
      this._deserializer = deserializer;
      return this;
    }
    sc(operation) {
      this._operationSchema = operation;
      this._smithyContext.operationSchema = operation;
      return this;
    }
    build() {
      const closure = this;
      let CommandRef;
      return CommandRef = class extends Command {
        input;
        static getEndpointParameterInstructions() {
          return closure._ep;
        }
        constructor(...[input]) {
          super();
          this.input = input ?? {};
          closure._init(this);
          this.schema = closure._operationSchema;
        }
        resolveMiddleware(stack, configuration, options) {
          const op = closure._operationSchema;
          const input = op?.[4] ?? op?.input;
          const output = op?.[5] ?? op?.output;
          return this.resolveMiddlewareWithContext(stack, configuration, options, {
            CommandCtor: CommandRef,
            middlewareFn: closure._middlewareFn,
            clientName: closure._clientName,
            commandName: closure._commandName,
            inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),
            outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),
            smithyContext: closure._smithyContext,
            additionalContext: closure._additionalContext
          });
        }
        serialize = closure._serializer;
        deserialize = closure._deserializer;
      };
    }
  }
  var SENSITIVE_STRING = "***SensitiveInformation***";
  var createAggregatedClient = (commands, Client5, options) => {
    for (const [command, CommandCtor] of Object.entries(commands)) {
      const methodImpl = async function(args, optionsOrCb, cb) {
        const command2 = new CommandCtor(args);
        if (typeof optionsOrCb === "function") {
          this.send(command2, optionsOrCb);
        } else if (typeof cb === "function") {
          if (typeof optionsOrCb !== "object")
            throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
          this.send(command2, optionsOrCb || {}, cb);
        } else {
          return this.send(command2, optionsOrCb);
        }
      };
      const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
      Client5.prototype[methodName] = methodImpl;
    }
    const { paginators = {}, waiters = {} } = options ?? {};
    for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {
      if (Client5.prototype[paginatorName] === undefined) {
        Client5.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) {
          return paginatorFn({
            ...paginationConfiguration,
            client: this
          }, commandInput, ...rest);
        };
      }
    }
    for (const [waiterName, waiterFn] of Object.entries(waiters)) {
      if (Client5.prototype[waiterName] === undefined) {
        Client5.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) {
          let config = waiterConfiguration;
          if (typeof waiterConfiguration === "number") {
            config = {
              maxWaitTime: waiterConfiguration
            };
          }
          return waiterFn({
            ...config,
            client: this
          }, commandInput, ...rest);
        };
      }
    }
  };

  class ServiceException extends Error {
    $fault;
    $response;
    $retryable;
    $metadata;
    constructor(options) {
      super(options.message);
      Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
      this.name = options.name;
      this.$fault = options.$fault;
      this.$metadata = options.$metadata;
    }
    static isInstance(value) {
      if (!value)
        return false;
      const candidate = value;
      return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
    }
    static [Symbol.hasInstance](instance) {
      if (!instance)
        return false;
      const candidate = instance;
      if (this === ServiceException) {
        return ServiceException.isInstance(instance);
      }
      if (ServiceException.isInstance(instance)) {
        if (candidate.name && this.name) {
          return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
        }
        return this.prototype.isPrototypeOf(instance);
      }
      return false;
    }
  }
  var decorateServiceException = (exception, additions = {}) => {
    Object.entries(additions).filter(([, v]) => v !== undefined).forEach(([k, v]) => {
      if (exception[k] == undefined || exception[k] === "") {
        exception[k] = v;
      }
    });
    const message = exception.message || exception.Message || "UnknownError";
    exception.message = message;
    delete exception.Message;
    return exception;
  };
  var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
    const $metadata = deserializeMetadata(output);
    const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
    const response = new exceptionCtor({
      name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError",
      $fault: "client",
      $metadata
    });
    throw decorateServiceException(response, parsedBody);
  };
  var withBaseException = (ExceptionCtor) => {
    return ({ output, parsedBody, errorCode }) => {
      throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
    };
  };
  var deserializeMetadata = (output) => ({
    httpStatusCode: output.statusCode,
    requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
    extendedRequestId: output.headers["x-amz-id-2"],
    cfId: output.headers["x-amz-cf-id"]
  });
  var loadConfigsForDefaultMode = (mode) => {
    switch (mode) {
      case "standard":
        return {
          retryMode: "standard",
          connectionTimeout: 3100
        };
      case "in-region":
        return {
          retryMode: "standard",
          connectionTimeout: 1100
        };
      case "cross-region":
        return {
          retryMode: "standard",
          connectionTimeout: 3100
        };
      case "mobile":
        return {
          retryMode: "standard",
          connectionTimeout: 30000
        };
      default:
        return {};
    }
  };
  var warningEmitted = false;
  var emitWarningIfUnsupportedVersion = (version3) => {
    if (version3 && !warningEmitted && parseInt(version3.substring(1, version3.indexOf("."))) < 16) {
      warningEmitted = true;
    }
  };
  var knownAlgorithms = Object.values(AlgorithmId);
  var getChecksumConfiguration = (runtimeConfig) => {
    const checksumAlgorithms = [];
    for (const id in AlgorithmId) {
      const algorithmId = AlgorithmId[id];
      if (runtimeConfig[algorithmId] === undefined) {
        continue;
      }
      checksumAlgorithms.push({
        algorithmId: () => algorithmId,
        checksumConstructor: () => runtimeConfig[algorithmId]
      });
    }
    for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {
      checksumAlgorithms.push({
        algorithmId: () => id,
        checksumConstructor: () => ChecksumCtor
      });
    }
    return {
      addChecksumAlgorithm(algo) {
        runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};
        const id = algo.algorithmId();
        const ctor = algo.checksumConstructor();
        if (knownAlgorithms.includes(id)) {
          runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;
        } else {
          runtimeConfig.checksumAlgorithms[id] = ctor;
        }
        checksumAlgorithms.push(algo);
      },
      checksumAlgorithms() {
        return checksumAlgorithms;
      }
    };
  };
  var resolveChecksumRuntimeConfig = (clientConfig) => {
    const runtimeConfig = {};
    clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
      const id = checksumAlgorithm.algorithmId();
      if (knownAlgorithms.includes(id)) {
        runtimeConfig[id] = checksumAlgorithm.checksumConstructor();
      }
    });
    return runtimeConfig;
  };
  var getRetryConfiguration = (runtimeConfig) => {
    return {
      setRetryStrategy(retryStrategy) {
        runtimeConfig.retryStrategy = retryStrategy;
      },
      retryStrategy() {
        return runtimeConfig.retryStrategy;
      }
    };
  };
  var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
    const runtimeConfig = {};
    runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
    return runtimeConfig;
  };
  var getDefaultExtensionConfiguration = (runtimeConfig) => {
    return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
  };
  var getDefaultClientConfiguration = getDefaultExtensionConfiguration;
  var resolveDefaultRuntimeConfig = (config) => {
    return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
  };
  var getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];
  var getValueFromTextNode = (obj) => {
    const textNodeName = "#text";
    for (const key in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key][textNodeName] !== undefined) {
        obj[key] = obj[key][textNodeName];
      } else if (typeof obj[key] === "object" && obj[key] !== null) {
        obj[key] = getValueFromTextNode(obj[key]);
      }
    }
    return obj;
  };
  var isSerializableHeaderValue = (value) => {
    return value != null;
  };

  class NoOpLogger {
    trace() {}
    debug() {}
    info() {}
    warn() {}
    error() {}
  }
  function map(arg0, arg1, arg2) {
    let target;
    let filter;
    let instructions;
    if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
      target = {};
      instructions = arg0;
    } else {
      target = arg0;
      if (typeof arg1 === "function") {
        filter = arg1;
        instructions = arg2;
        return mapWithFilter(target, filter, instructions);
      } else {
        instructions = arg1;
      }
    }
    for (const key of Object.keys(instructions)) {
      if (!Array.isArray(instructions[key])) {
        target[key] = instructions[key];
        continue;
      }
      applyInstruction(target, null, instructions, key);
    }
    return target;
  }
  var convertMap = (target) => {
    const output = {};
    for (const [k, v] of Object.entries(target || {})) {
      output[k] = [, v];
    }
    return output;
  };
  var take = (source, instructions) => {
    const out = {};
    for (const key in instructions) {
      applyInstruction(out, source, instructions, key);
    }
    return out;
  };
  var mapWithFilter = (target, filter, instructions) => {
    return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
      if (Array.isArray(value)) {
        _instructions[key] = value;
      } else {
        if (typeof value === "function") {
          _instructions[key] = [filter, value()];
        } else {
          _instructions[key] = [filter, value];
        }
      }
      return _instructions;
    }, {}));
  };
  var applyInstruction = (target, source, instructions, targetKey) => {
    if (source !== null) {
      let instruction = instructions[targetKey];
      if (typeof instruction === "function") {
        instruction = [, instruction];
      }
      const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
      if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) {
        target[targetKey] = valueFn(source[sourceKey]);
      }
      return;
    }
    let [filter, value] = instructions[targetKey];
    if (typeof value === "function") {
      let _value;
      const defaultFilterPassed = filter === undefined && (_value = value()) != null;
      const customFilterPassed = typeof filter === "function" && !!filter(undefined) || typeof filter !== "function" && !!filter;
      if (defaultFilterPassed) {
        target[targetKey] = _value;
      } else if (customFilterPassed) {
        target[targetKey] = value();
      }
    } else {
      const defaultFilterPassed = filter === undefined && value != null;
      const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter;
      if (defaultFilterPassed || customFilterPassed) {
        target[targetKey] = value;
      }
    }
  };
  var nonNullish = (_) => _ != null;
  var pass = (_) => _;
  var serializeFloat = (value) => {
    if (value !== value) {
      return "NaN";
    }
    switch (value) {
      case Infinity:
        return "Infinity";
      case -Infinity:
        return "-Infinity";
      default:
        return value;
    }
  };
  var serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z");
  var _json = (obj) => {
    if (obj == null) {
      return {};
    }
    if (Array.isArray(obj)) {
      return obj.filter((_) => _ != null).map(_json);
    }
    if (typeof obj === "object") {
      const target = {};
      for (const key of Object.keys(obj)) {
        if (obj[key] == null) {
          continue;
        }
        target[key] = _json(obj[key]);
      }
      return target;
    }
    return obj;
  };
  exports.Client = Client4;
  exports.Command = Command;
  exports.NoOpLogger = NoOpLogger;
  exports.SENSITIVE_STRING = SENSITIVE_STRING;
  exports.ServiceException = ServiceException;
  exports.WaiterState = WaiterState;
  exports._json = _json;
  exports.checkExceptions = checkExceptions;
  exports.constructStack = constructStack;
  exports.convertMap = convertMap;
  exports.createAggregatedClient = createAggregatedClient;
  exports.createWaiter = createWaiter;
  exports.decorateServiceException = decorateServiceException;
  exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
  exports.getArrayIfSingleItem = getArrayIfSingleItem;
  exports.getChecksumConfiguration = getChecksumConfiguration;
  exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
  exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration;
  exports.getRetryConfiguration = getRetryConfiguration;
  exports.getValueFromTextNode = getValueFromTextNode;
  exports.invalidFunction = invalidFunction;
  exports.invalidProvider = invalidProvider;
  exports.isSerializableHeaderValue = isSerializableHeaderValue;
  exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode;
  exports.map = map;
  exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig;
  exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
  exports.resolveRetryRuntimeConfig = resolveRetryRuntimeConfig;
  exports.schemaLogFilter = schemaLogFilter;
  exports.serializeDateTime = serializeDateTime;
  exports.serializeFloat = serializeFloat;
  exports.take = take;
  exports.throwDefaultError = throwDefaultError;
  exports.waiterServiceDefaults = waiterServiceDefaults;
  exports.withBaseException = withBaseException;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/config/index.js
var require_config2 = __commonJS((exports) => {
  var { homedir } = __require("node:os");
  var { sep: sep2, join: join4 } = __require("node:path");
  var { createHash: createHash2 } = __require("node:crypto");
  var { readFile: readFile$1 } = __require("node:fs/promises");
  var { IniSectionType } = require_dist_cjs();
  var { normalizeProvider } = require_client3();
  var { isValidHostLabel } = require_transport2();

  class ProviderError extends Error {
    name = "ProviderError";
    tryNextLink;
    constructor(message, options = true) {
      let logger;
      let tryNextLink = true;
      if (typeof options === "boolean") {
        logger = undefined;
        tryNextLink = options;
      } else if (options != null && typeof options === "object") {
        logger = options.logger;
        tryNextLink = options.tryNextLink ?? true;
      }
      super(message);
      this.tryNextLink = tryNextLink;
      Object.setPrototypeOf(this, ProviderError.prototype);
      logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
    }
    static from(error2, options = true) {
      return Object.assign(new this(error2.message, options), error2);
    }
  }

  class CredentialsProviderError extends ProviderError {
    name = "CredentialsProviderError";
    constructor(message, options = true) {
      super(message, options);
      Object.setPrototypeOf(this, CredentialsProviderError.prototype);
    }
  }

  class TokenProviderError extends ProviderError {
    name = "TokenProviderError";
    constructor(message, options = true) {
      super(message, options);
      Object.setPrototypeOf(this, TokenProviderError.prototype);
    }
  }
  var chain = (...providers) => async () => {
    if (providers.length === 0) {
      throw new ProviderError("No providers in chain");
    }
    let lastProviderError;
    for (const provider of providers) {
      try {
        const credentials = await provider();
        return credentials;
      } catch (err) {
        lastProviderError = err;
        if (err?.tryNextLink) {
          continue;
        }
        throw err;
      }
    }
    throw lastProviderError;
  };
  var fromValue = (staticValue) => () => Promise.resolve(staticValue);
  var memoize = (provider, isExpired, requiresRefresh) => {
    let resolved;
    let pending;
    let hasResult;
    let isConstant = false;
    const coalesceProvider = async () => {
      if (!pending) {
        pending = provider();
      }
      try {
        resolved = await pending;
        hasResult = true;
        isConstant = false;
      } finally {
        pending = undefined;
      }
      return resolved;
    };
    if (isExpired === undefined) {
      return async (options) => {
        if (!hasResult || options?.forceRefresh) {
          resolved = await coalesceProvider();
        }
        return resolved;
      };
    }
    return async (options) => {
      if (!hasResult || options?.forceRefresh) {
        resolved = await coalesceProvider();
      }
      if (isConstant) {
        return resolved;
      }
      if (requiresRefresh && !requiresRefresh(resolved)) {
        isConstant = true;
        return resolved;
      }
      if (isExpired(resolved)) {
        await coalesceProvider();
        return resolved;
      }
      return resolved;
    };
  };
  var booleanSelector = (obj, key, type2) => {
    if (!(key in obj))
      return;
    if (obj[key] === "true")
      return true;
    if (obj[key] === "false")
      return false;
    throw new Error(`Cannot load ${type2} "${key}". Expected "true" or "false", got ${obj[key]}.`);
  };
  var numberSelector = (obj, key, type2) => {
    if (!(key in obj))
      return;
    const numberValue = parseInt(obj[key], 10);
    if (Number.isNaN(numberValue)) {
      throw new TypeError(`Cannot load ${type2} '${key}'. Expected number, got '${obj[key]}'.`);
    }
    return numberValue;
  };
  var SelectorType;
  (function(SelectorType2) {
    SelectorType2["ENV"] = "env";
    SelectorType2["CONFIG"] = "shared config entry";
  })(SelectorType || (SelectorType = {}));
  var homeDirCache = {};
  var getHomeDirCacheKey = () => {
    if (process && process.geteuid) {
      return `${process.geteuid()}`;
    }
    return "DEFAULT";
  };
  var getHomeDir = () => {
    const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep2}` } = process.env;
    if (HOME)
      return HOME;
    if (USERPROFILE)
      return USERPROFILE;
    if (HOMEPATH)
      return `${HOMEDRIVE}${HOMEPATH}`;
    const homeDirCacheKey = getHomeDirCacheKey();
    if (!homeDirCache[homeDirCacheKey])
      homeDirCache[homeDirCacheKey] = homedir();
    return homeDirCache[homeDirCacheKey];
  };
  var ENV_PROFILE = "AWS_PROFILE";
  var DEFAULT_PROFILE = "default";
  var getProfileName = (init4) => init4.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
  var getSSOTokenFilepath = (id) => {
    const hasher = createHash2("sha1");
    const cacheName = hasher.update(id).digest("hex");
    return join4(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
  };
  var tokenIntercept = {};
  var getSSOTokenFromFile = async (id) => {
    if (tokenIntercept[id]) {
      return tokenIntercept[id];
    }
    const ssoTokenFilepath = getSSOTokenFilepath(id);
    const ssoTokenText = await readFile$1(ssoTokenFilepath, "utf8");
    return JSON.parse(ssoTokenText);
  };
  var CONFIG_PREFIX_SEPARATOR = ".";
  var getConfigData = (data) => Object.entries(data).filter(([key]) => {
    const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
    if (indexOfSeparator === -1) {
      return false;
    }
    return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator));
  }).reduce((acc, [key, value]) => {
    const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
    const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
    acc[updatedKey] = value;
    return acc;
  }, {
    ...data.default && { default: data.default }
  });
  var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
  var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join4(getHomeDir(), ".aws", "config");
  var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
  var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join4(getHomeDir(), ".aws", "credentials");
  var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
  var profileNameBlockList = ["__proto__", "profile __proto__"];
  var parseIni = (iniData) => {
    const map = {};
    let currentSection;
    let currentSubSection;
    for (const iniLine of iniData.split(/\r?\n/)) {
      const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
      const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
      if (isSection) {
        currentSection = undefined;
        currentSubSection = undefined;
        const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
        const matches = prefixKeyRegex.exec(sectionName);
        if (matches) {
          const [, prefix, , name] = matches;
          if (Object.values(IniSectionType).includes(prefix)) {
            currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
          }
        } else {
          currentSection = sectionName;
        }
        if (profileNameBlockList.includes(sectionName)) {
          throw new Error(`Found invalid profile name "${sectionName}"`);
        }
      } else if (currentSection) {
        const indexOfEqualsSign = trimmedLine.indexOf("=");
        if (![0, -1].includes(indexOfEqualsSign)) {
          const [name, value] = [
            trimmedLine.substring(0, indexOfEqualsSign).trim(),
            trimmedLine.substring(indexOfEqualsSign + 1).trim()
          ];
          if (value === "") {
            currentSubSection = name;
          } else {
            if (currentSubSection && iniLine.trimStart() === iniLine) {
              currentSubSection = undefined;
            }
            map[currentSection] = map[currentSection] || {};
            const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
            map[currentSection][key] = value;
          }
        }
      }
    }
    return map;
  };
  var filePromises = {};
  var fileIntercept = {};
  var readFile2 = (path2, options) => {
    if (fileIntercept[path2] !== undefined) {
      return fileIntercept[path2];
    }
    if (!filePromises[path2] || options?.ignoreCache) {
      filePromises[path2] = readFile$1(path2, "utf8");
    }
    return filePromises[path2];
  };
  var swallowError$1 = () => ({});
  var loadSharedConfigFiles = async (init4 = {}) => {
    const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init4;
    const homeDir = getHomeDir();
    const relativeHomeDirPrefix = "~/";
    let resolvedFilepath = filepath;
    if (filepath.startsWith(relativeHomeDirPrefix)) {
      resolvedFilepath = join4(homeDir, filepath.slice(2));
    }
    let resolvedConfigFilepath = configFilepath;
    if (configFilepath.startsWith(relativeHomeDirPrefix)) {
      resolvedConfigFilepath = join4(homeDir, configFilepath.slice(2));
    }
    const parsedFiles = await Promise.all([
      readFile2(resolvedConfigFilepath, {
        ignoreCache: init4.ignoreCache
      }).then(parseIni).then(getConfigData).catch(swallowError$1),
      readFile2(resolvedFilepath, {
        ignoreCache: init4.ignoreCache
      }).then(parseIni).catch(swallowError$1)
    ]);
    return {
      configFile: parsedFiles[0],
      credentialsFile: parsedFiles[1]
    };
  };
  var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
  var swallowError = () => ({});
  var loadSsoSessionData = async (init4 = {}) => readFile2(init4.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
  var mergeConfigFiles = (...files) => {
    const merged = {};
    for (const file of files) {
      for (const [key, values] of Object.entries(file)) {
        if (merged[key] !== undefined) {
          Object.assign(merged[key], values);
        } else {
          merged[key] = values;
        }
      }
    }
    return merged;
  };
  var parseKnownFiles = async (init4) => {
    const parsedFiles = await loadSharedConfigFiles(init4);
    return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
  };
  var externalDataInterceptor = {
    getFileRecord() {
      return fileIntercept;
    },
    interceptFile(path2, contents) {
      fileIntercept[path2] = Promise.resolve(contents);
    },
    getTokenRecord() {
      return tokenIntercept;
    },
    interceptToken(id, contents) {
      tokenIntercept[id] = contents;
    }
  };
  function getSelectorName(functionString) {
    try {
      const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
      constants.delete("CONFIG");
      constants.delete("CONFIG_PREFIX_SEPARATOR");
      constants.delete("ENV");
      return [...constants].join(", ");
    } catch (e) {
      return functionString;
    }
  }
  var fromEnv = (envVarSelector, options) => async () => {
    try {
      const config = envVarSelector(process.env, options);
      if (config === undefined) {
        throw new Error;
      }
      return config;
    } catch (e) {
      throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });
    }
  };
  var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init4 } = {}) => async () => {
    const profile = getProfileName(init4);
    const { configFile, credentialsFile } = await loadSharedConfigFiles(init4);
    const profileFromCredentials = credentialsFile[profile] || {};
    const profileFromConfig = configFile[profile] || {};
    const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
    try {
      const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
      const configValue = configSelector(mergedProfile, cfgFile);
      if (configValue === undefined) {
        throw new Error;
      }
      return configValue;
    } catch (e) {
      throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init4.logger });
    }
  };
  var isFunction = (func) => typeof func === "function";
  var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue);
  var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
    const { signingName, logger } = configuration;
    const envOptions = { signingName, logger };
    return memoize(chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
  };
  var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
  var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
  var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
  var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),
    configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),
    default: false
  };
  var nodeDualstackConfigSelectors = {
    environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),
    configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),
    default: undefined
  };
  var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
  var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
  var DEFAULT_USE_FIPS_ENDPOINT = false;
  var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),
    configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
    default: false
  };
  var nodeFipsConfigSelectors = {
    environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),
    configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
    default: undefined
  };
  var resolveCustomEndpointsConfig = (input) => {
    const { tls: tls2, endpoint, urlParser, useDualstackEndpoint } = input;
    return Object.assign(input, {
      tls: tls2 ?? true,
      endpoint: normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
      isCustomEndpoint: true,
      useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false)
    });
  };
  var getEndpointFromRegion = async (input) => {
    const { tls: tls2 = true } = input;
    const region = await input.region();
    const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
    if (!dnsHostRegex.test(region)) {
      throw new Error("Invalid region in client config");
    }
    const useDualstackEndpoint = await input.useDualstackEndpoint();
    const useFipsEndpoint = await input.useFipsEndpoint();
    const { hostname: hostname2 } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
    if (!hostname2) {
      throw new Error("Cannot resolve hostname from client config");
    }
    return input.urlParser(`${tls2 ? "https:" : "http:"}//${hostname2}`);
  };
  var resolveEndpointsConfig = (input) => {
    const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false);
    const { endpoint, useFipsEndpoint, urlParser, tls: tls2 } = input;
    return Object.assign(input, {
      tls: tls2 ?? true,
      endpoint: endpoint ? normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),
      isCustomEndpoint: !!endpoint,
      useDualstackEndpoint
    });
  };
  var REGION_ENV_NAME = "AWS_REGION";
  var REGION_INI_NAME = "region";
  var NODE_REGION_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => env2[REGION_ENV_NAME],
    configFileSelector: (profile) => profile[REGION_INI_NAME],
    default: () => {
      throw new Error("Region is missing");
    }
  };
  var NODE_REGION_CONFIG_FILE_OPTIONS = {
    preferredFile: "credentials"
  };
  var validRegions = new Set;
  var checkRegion = (region, check = isValidHostLabel) => {
    if (!validRegions.has(region) && !check(region)) {
      if (region === "*") {
        console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
      } else {
        throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
      }
    } else {
      validRegions.add(region);
    }
  };
  var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
  var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
  var resolveRegionConfig = (input) => {
    const { region, useFipsEndpoint } = input;
    if (!region) {
      throw new Error("Region is missing");
    }
    return Object.assign(input, {
      region: async () => {
        const providedRegion = typeof region === "function" ? await region() : region;
        const realRegion = getRealRegion(providedRegion);
        checkRegion(realRegion);
        return realRegion;
      },
      useFipsEndpoint: async () => {
        const providedRegion = typeof region === "string" ? region : await region();
        if (isFipsRegion(providedRegion)) {
          return true;
        }
        return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
      }
    });
  };
  var getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname;
  var getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : undefined;
  var getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws";
  var getResolvedSigningRegion = (hostname2, { signingRegion, regionRegex, useFipsEndpoint }) => {
    if (signingRegion) {
      return signingRegion;
    } else if (useFipsEndpoint) {
      const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
      const regionRegexmatchArray = hostname2.match(regionRegexJs);
      if (regionRegexmatchArray) {
        return regionRegexmatchArray[0].slice(1, -1);
      }
    }
  };
  var getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => {
    const partition = getResolvedPartition(region, { partitionHash });
    const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
    const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
    const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);
    const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);
    const hostname2 = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
    if (hostname2 === undefined) {
      throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
    }
    const signingRegion = getResolvedSigningRegion(hostname2, {
      signingRegion: regionHash[resolvedRegion]?.signingRegion,
      regionRegex: partitionHash[partition].regionRegex,
      useFipsEndpoint
    });
    return {
      partition,
      signingService,
      hostname: hostname2,
      ...signingRegion && { signingRegion },
      ...regionHash[resolvedRegion]?.signingService && {
        signingService: regionHash[resolvedRegion].signingService
      }
    };
  };
  var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
  var AWS_REGION_ENV = "AWS_REGION";
  var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
  var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
  var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
  var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
  var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
  var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
  var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => {
      return env2[AWS_DEFAULTS_MODE_ENV];
    },
    configFileSelector: (profile) => {
      return profile[AWS_DEFAULTS_MODE_CONFIG];
    },
    default: "legacy"
  };
  var resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => {
    const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
    switch (mode?.toLowerCase()) {
      case "auto":
        return resolveNodeDefaultsModeAuto(region);
      case "in-region":
      case "cross-region":
      case "mobile":
      case "standard":
      case "legacy":
        return Promise.resolve(mode?.toLocaleLowerCase());
      case undefined:
        return Promise.resolve("legacy");
      default:
        throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
    }
  });
  var resolveNodeDefaultsModeAuto = async (clientRegion) => {
    if (clientRegion) {
      const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
      const inferredRegion = await inferPhysicalRegion();
      if (!inferredRegion) {
        return "standard";
      }
      if (resolvedRegion === inferredRegion) {
        return "in-region";
      } else {
        return "cross-region";
      }
    }
    return "standard";
  };
  var inferPhysicalRegion = async () => {
    if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {
      return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];
    }
    if (!process.env[ENV_IMDS_DISABLED]) {
      try {
        const endpoint = await getImdsEndpoint();
        return (await imdsHttpGet({ hostname: endpoint.hostname, path: IMDS_REGION_PATH })).toString();
      } catch (e) {}
    }
  };
  var getImdsEndpoint = async () => {
    const envEndpoint = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;
    if (envEndpoint) {
      const url = new URL(envEndpoint);
      return { hostname: url.hostname, path: url.pathname };
    }
    const envMode = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE;
    if (envMode === "IPv6") {
      return { hostname: "fd00:ec2::254", path: "/" };
    }
    return { hostname: "169.254.169.254", path: "/" };
  };
  var imdsHttpGet = async ({ hostname: hostname2, path: path2 }) => {
    const { request: request2 } = __require("node:http");
    return new Promise((resolve3, reject) => {
      const req = request2({
        method: "GET",
        hostname: hostname2.replace(/^\[(.+)]$/, "$1"),
        path: path2,
        timeout: 1000,
        signal: AbortSignal.timeout(1000)
      });
      req.on("error", (err) => {
        reject(err);
        req.destroy();
      });
      req.on("timeout", () => {
        reject(new Error("TimeoutError from instance metadata service"));
        req.destroy();
      });
      req.on("response", (res) => {
        const { statusCode = 400 } = res;
        if (statusCode < 200 || 300 <= statusCode) {
          reject(Object.assign(new Error("Error response received from instance metadata service"), { statusCode }));
          req.destroy();
          return;
        }
        const chunks = [];
        res.on("data", (chunk) => chunks.push(chunk));
        res.on("end", () => {
          resolve3(Buffer.concat(chunks));
          req.destroy();
        });
      });
      req.end();
    });
  };
  exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR;
  exports.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT;
  exports.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT;
  exports.CredentialsProviderError = CredentialsProviderError;
  exports.DEFAULT_PROFILE = DEFAULT_PROFILE;
  exports.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT;
  exports.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT;
  exports.ENV_PROFILE = ENV_PROFILE;
  exports.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT;
  exports.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT;
  exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
  exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
  exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS;
  exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS;
  exports.ProviderError = ProviderError;
  exports.REGION_ENV_NAME = REGION_ENV_NAME;
  exports.REGION_INI_NAME = REGION_INI_NAME;
  exports.SelectorType = SelectorType;
  exports.TokenProviderError = TokenProviderError;
  exports.booleanSelector = booleanSelector;
  exports.chain = chain;
  exports.externalDataInterceptor = externalDataInterceptor;
  exports.fromStatic = fromStatic;
  exports.fromValue = fromValue;
  exports.getHomeDir = getHomeDir;
  exports.getProfileName = getProfileName;
  exports.getRegionInfo = getRegionInfo;
  exports.getSSOTokenFilepath = getSSOTokenFilepath;
  exports.getSSOTokenFromFile = getSSOTokenFromFile;
  exports.loadConfig = loadConfig;
  exports.loadSharedConfigFiles = loadSharedConfigFiles;
  exports.loadSsoSessionData = loadSsoSessionData;
  exports.memoize = memoize;
  exports.nodeDualstackConfigSelectors = nodeDualstackConfigSelectors;
  exports.nodeFipsConfigSelectors = nodeFipsConfigSelectors;
  exports.numberSelector = numberSelector;
  exports.parseKnownFiles = parseKnownFiles;
  exports.readFile = readFile2;
  exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
  exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig;
  exports.resolveEndpointsConfig = resolveEndpointsConfig;
  exports.resolveRegionConfig = resolveRegionConfig;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js
var require_endpoints = __commonJS((exports) => {
  var { CONFIG_PREFIX_SEPARATOR, loadConfig } = require_config2();
  var { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel } = require_transport2();
  exports.isValidHostLabel = isValidHostLabel;
  exports.middlewareEndpointToEndpointV1 = toEndpointV1;
  exports.toEndpointV1 = toEndpointV1;
  var { EndpointURLScheme } = require_dist_cjs();
  var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
  var CONFIG_ENDPOINT_URL = "endpoint_url";
  var getEndpointUrlConfig = (serviceId) => ({
    environmentVariableSelector: (env2) => {
      const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
      const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
      if (serviceEndpointUrl)
        return serviceEndpointUrl;
      const endpointUrl = env2[ENV_ENDPOINT_URL];
      if (endpointUrl)
        return endpointUrl;
      return;
    },
    configFileSelector: (profile, config) => {
      if (config && profile.services) {
        const servicesSection = config[["services", profile.services].join(CONFIG_PREFIX_SEPARATOR)];
        if (servicesSection) {
          const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
          const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)];
          if (endpointUrl2)
            return endpointUrl2;
        }
      }
      const endpointUrl = profile[CONFIG_ENDPOINT_URL];
      if (endpointUrl)
        return endpointUrl;
      return;
    },
    default: undefined
  });
  var getEndpointFromConfig = async (serviceId) => loadConfig(getEndpointUrlConfig(serviceId ?? ""))();
  var resolveParamsForS3 = async (endpointParams) => {
    const bucket = endpointParams?.Bucket || "";
    if (typeof endpointParams.Bucket === "string") {
      endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
    }
    if (isArnBucketName(bucket)) {
      if (endpointParams.ForcePathStyle === true) {
        throw new Error("Path-style addressing cannot be used with ARN buckets");
      }
    } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) {
      endpointParams.ForcePathStyle = true;
    }
    if (endpointParams.DisableMultiRegionAccessPoints) {
      endpointParams.disableMultiRegionAccessPoints = true;
      endpointParams.DisableMRAP = true;
    }
    return endpointParams;
  };
  var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
  var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
  var DOTS_PATTERN = /\.\./;
  var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
  var isArnBucketName = (bucketName) => {
    const [arn, partition, service, , , bucket] = bucketName.split(":");
    const isArn = arn === "arn" && bucketName.split(":").length >= 6;
    const isValidArn = Boolean(isArn && partition && service && bucket);
    if (isArn && !isValidArn) {
      throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
    }
    return isValidArn;
  };
  var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
    const configProvider = async () => {
      let configValue;
      if (isClientContextParam) {
        const clientContextParams = config.clientContextParams;
        const nestedValue = clientContextParams?.[configKey];
        configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
      } else {
        configValue = config[configKey] ?? config[canonicalEndpointParamKey];
      }
      if (typeof configValue === "function") {
        return configValue();
      }
      return configValue;
    };
    if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") {
      return async () => {
        const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
        const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;
        return configValue;
      };
    }
    if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
      return async () => {
        const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
        const configValue = credentials?.accountId ?? credentials?.AccountId;
        return configValue;
      };
    }
    if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
      return async () => {
        if (config.isCustomEndpoint === false) {
          return;
        }
        const endpoint = await configProvider();
        if (endpoint && typeof endpoint === "object") {
          if ("url" in endpoint) {
            return endpoint.url.href;
          }
          if ("hostname" in endpoint) {
            const { protocol, hostname: hostname2, port, path: path2 } = endpoint;
            return `${protocol}//${hostname2}${port ? ":" + port : ""}${path2}`;
          }
        }
        return endpoint;
      };
    }
    return configProvider;
  };
  function bindGetEndpointFromInstructions(getEndpointFromConfig2) {
    return async (commandInput, instructionsSupplier, clientConfig, context10) => {
      if (!clientConfig.isCustomEndpoint) {
        let endpointFromConfig;
        if (clientConfig.serviceConfiguredEndpoint) {
          endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
        } else {
          endpointFromConfig = await getEndpointFromConfig2(clientConfig.serviceId);
        }
        if (endpointFromConfig) {
          clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
          clientConfig.isCustomEndpoint = true;
        }
      }
      const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
      if (typeof clientConfig.endpointProvider !== "function") {
        throw new Error("config.endpointProvider is not set.");
      }
      const endpoint = clientConfig.endpointProvider(endpointParams, context10);
      if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {
        const customEndpoint = await clientConfig.endpoint();
        if (customEndpoint?.headers) {
          endpoint.headers ??= {};
          for (const [name, value] of Object.entries(customEndpoint.headers)) {
            endpoint.headers[name] = Array.isArray(value) ? value : [value];
          }
        }
      }
      return endpoint;
    };
  }
  var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
    const endpointParams = {};
    const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
    for (const [name, instruction] of Object.entries(instructions)) {
      switch (instruction.type) {
        case "staticContextParams":
          endpointParams[name] = instruction.value;
          break;
        case "contextParams":
          endpointParams[name] = commandInput[instruction.name];
          break;
        case "clientContextParams":
        case "builtInParams":
          endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
          break;
        case "operationContextParams":
          endpointParams[name] = instruction.get(commandInput);
          break;
        default:
          throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
      }
    }
    if (Object.keys(instructions).length === 0) {
      Object.assign(endpointParams, clientConfig);
    }
    if (String(clientConfig.serviceId).toLowerCase() === "s3") {
      await resolveParamsForS3(endpointParams);
    }
    return endpointParams;
  };
  function setFeature(context10, feature, value) {
    if (!context10.__smithy_context) {
      context10.__smithy_context = { features: {} };
    } else if (!context10.__smithy_context.features) {
      context10.__smithy_context.features = {};
    }
    context10.__smithy_context.features[feature] = value;
  }
  function bindEndpointMiddleware(getEndpointFromConfig2) {
    const getEndpointFromInstructions2 = bindGetEndpointFromInstructions(getEndpointFromConfig2);
    return ({ config, instructions }) => {
      return (next, context10) => async (args) => {
        if (config.isCustomEndpoint) {
          setFeature(context10, "ENDPOINT_OVERRIDE", "N");
        }
        const endpoint = await getEndpointFromInstructions2(args.input, {
          getEndpointParameterInstructions() {
            return instructions;
          }
        }, { ...config }, context10);
        context10.endpointV2 = endpoint;
        context10.authSchemes = endpoint.properties?.authSchemes;
        const authScheme = context10.authSchemes?.[0];
        if (authScheme) {
          context10["signing_region"] = authScheme.signingRegion;
          context10["signing_service"] = authScheme.signingName;
          const smithyContext = getSmithyContext(context10);
          const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
          if (httpAuthOption) {
            httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
              signing_region: authScheme.signingRegion,
              signingRegion: authScheme.signingRegion,
              signing_service: authScheme.signingName,
              signingName: authScheme.signingName,
              signingRegionSet: authScheme.signingRegionSet
            }, authScheme.properties);
          }
        }
        return next({
          ...args
        });
      };
    };
  }
  var serializerMiddlewareOption = {
    name: "serializerMiddleware"
  };
  var endpointMiddlewareOptions = {
    step: "serialize",
    tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
    name: "endpointV2Middleware",
    override: true,
    relation: "before",
    toMiddleware: serializerMiddlewareOption.name
  };
  function bindGetEndpointPlugin(getEndpointFromConfig2) {
    const endpointMiddleware2 = bindEndpointMiddleware(getEndpointFromConfig2);
    return (config, instructions) => ({
      applyToStack: (clientStack) => {
        clientStack.addRelativeTo(endpointMiddleware2({
          config,
          instructions
        }), endpointMiddlewareOptions);
      }
    });
  }
  function bindResolveEndpointConfig(getEndpointFromConfig2) {
    return (input) => {
      const tls2 = input.tls ?? true;
      const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
      const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined;
      const isCustomEndpoint = !!endpoint;
      const resolvedConfig = Object.assign(input, {
        endpoint: customEndpointProvider,
        tls: tls2,
        isCustomEndpoint,
        useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),
        useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false)
      });
      let configuredEndpointPromise = undefined;
      resolvedConfig.serviceConfiguredEndpoint = async () => {
        if (input.serviceId && !configuredEndpointPromise) {
          configuredEndpointPromise = getEndpointFromConfig2(input.serviceId);
        }
        return configuredEndpointPromise;
      };
      return resolvedConfig;
    };
  }

  class BinaryDecisionDiagram {
    nodes;
    root;
    conditions;
    results;
    constructor(bdd, root, conditions, results) {
      this.nodes = bdd;
      this.root = root;
      this.conditions = conditions;
      this.results = results;
    }
    static from(bdd, root, conditions, results) {
      return new BinaryDecisionDiagram(bdd, root, conditions, results);
    }
  }

  class EndpointCache {
    capacity;
    data = new Map;
    parameters = [];
    constructor({ size, params }) {
      this.capacity = size ?? 50;
      if (params) {
        this.parameters = params;
      }
    }
    get(endpointParams, resolver) {
      const key = this.hash(endpointParams);
      if (key === false) {
        return resolver();
      }
      if (!this.data.has(key)) {
        if (this.data.size > this.capacity + 10) {
          const keys = this.data.keys();
          let i = 0;
          while (true) {
            const { value, done } = keys.next();
            this.data.delete(value);
            if (done || ++i > 10) {
              break;
            }
          }
        }
        this.data.set(key, resolver());
      }
      return this.data.get(key);
    }
    size() {
      return this.data.size;
    }
    hash(endpointParams) {
      let buffer = "";
      const { parameters } = this;
      if (parameters.length === 0) {
        return false;
      }
      for (const param of parameters) {
        const val = String(endpointParams[param] ?? "");
        if (val.includes("|;")) {
          return false;
        }
        buffer += val + "|;";
      }
      return buffer;
    }
  }

  class EndpointError extends Error {
    constructor(message) {
      super(message);
      this.name = "EndpointError";
    }
  }
  var debugId = "endpoints";
  function toDebugString(input) {
    if (typeof input !== "object" || input == null) {
      return input;
    }
    if ("ref" in input) {
      return `$${toDebugString(input.ref)}`;
    }
    if ("fn" in input) {
      return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`;
    }
    return JSON.stringify(input, null, 2);
  }
  var customEndpointFunctions = {};
  var booleanEquals = (value1, value2) => value1 === value2;
  function coalesce(...args) {
    for (const arg of args) {
      if (arg != null) {
        return arg;
      }
    }
    return;
  }
  var getAttrPathList = (path2) => {
    const parts = path2.split(".");
    const pathList = [];
    for (const part of parts) {
      const squareBracketIndex = part.indexOf("[");
      if (squareBracketIndex !== -1) {
        if (part.indexOf("]") !== part.length - 1) {
          throw new EndpointError(`Path: '${path2}' does not end with ']'`);
        }
        const arrayIndex = part.slice(squareBracketIndex + 1, -1);
        if (Number.isNaN(parseInt(arrayIndex))) {
          throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path2}'`);
        }
        if (squareBracketIndex !== 0) {
          pathList.push(part.slice(0, squareBracketIndex));
        }
        pathList.push(arrayIndex);
      } else {
        pathList.push(part);
      }
    }
    return pathList;
  };
  var getAttr = (value, path2) => getAttrPathList(path2).reduce((acc, index2) => {
    if (typeof acc !== "object") {
      throw new EndpointError(`Index '${index2}' in '${path2}' not found in '${JSON.stringify(value)}'`);
    } else if (Array.isArray(acc)) {
      const i = parseInt(index2);
      return acc[i < 0 ? acc.length + i : i];
    }
    return acc[index2];
  }, value);
  var isSet = (value) => value != null;
  function ite(condition, trueValue, falseValue) {
    return condition ? trueValue : falseValue;
  }
  var not2 = (value) => !value;
  var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
  var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]");
  var DEFAULT_PORTS = {
    [EndpointURLScheme.HTTP]: 80,
    [EndpointURLScheme.HTTPS]: 443
  };
  var parseURL = (value) => {
    const whatwgURL = (() => {
      try {
        if (value instanceof URL) {
          return value;
        }
        if (typeof value === "object" && "hostname" in value) {
          const { hostname: hostname3, port, protocol: protocol2 = "", path: path2 = "", query = {} } = value;
          const url = new URL(`${protocol2}//${hostname3}${port ? `:${port}` : ""}${path2}`);
          url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&");
          return url;
        }
        return new URL(value);
      } catch (error2) {
        return null;
      }
    })();
    if (!whatwgURL) {
      console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);
      return null;
    }
    const urlString = whatwgURL.href;
    const { host, hostname: hostname2, pathname, protocol, search } = whatwgURL;
    if (search) {
      return null;
    }
    const scheme = protocol.slice(0, -1);
    if (!Object.values(EndpointURLScheme).includes(scheme)) {
      return null;
    }
    const isIp = isIpAddress(hostname2);
    const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);
    const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;
    return {
      scheme,
      authority,
      path: pathname,
      normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
      isIp
    };
  };
  function split(value, delimiter, limit) {
    if (limit === 1) {
      return [value];
    }
    if (value === "") {
      return [""];
    }
    const parts = value.split(delimiter);
    if (limit === 0) {
      return parts;
    }
    return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter));
  }
  var stringEquals = (value1, value2) => value1 === value2;
  var substring = (input, start, stop, reverse) => {
    if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
      return null;
    }
    if (!reverse) {
      return input.substring(start, stop);
    }
    return input.substring(input.length - stop, input.length - start);
  };
  var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
  var endpointFunctions = {
    booleanEquals,
    coalesce,
    getAttr,
    isSet,
    isValidHostLabel,
    ite,
    not: not2,
    parseURL,
    split,
    stringEquals,
    substring,
    uriEncode
  };
  var evaluateTemplate = (template2, options) => {
    const evaluatedTemplateArr = [];
    const { referenceRecord, endpointParams } = options;
    let currentIndex = 0;
    while (currentIndex < template2.length) {
      const openingBraceIndex = template2.indexOf("{", currentIndex);
      if (openingBraceIndex === -1) {
        evaluatedTemplateArr.push(template2.slice(currentIndex));
        break;
      }
      evaluatedTemplateArr.push(template2.slice(currentIndex, openingBraceIndex));
      const closingBraceIndex = template2.indexOf("}", openingBraceIndex);
      if (closingBraceIndex === -1) {
        evaluatedTemplateArr.push(template2.slice(openingBraceIndex));
        break;
      }
      if (template2[openingBraceIndex + 1] === "{" && template2[closingBraceIndex + 1] === "}") {
        evaluatedTemplateArr.push(template2.slice(openingBraceIndex + 1, closingBraceIndex));
        currentIndex = closingBraceIndex + 2;
      }
      const parameterName = template2.substring(openingBraceIndex + 1, closingBraceIndex);
      if (parameterName.includes("#")) {
        const [refName, attrName] = parameterName.split("#");
        evaluatedTemplateArr.push(getAttr(referenceRecord[refName] ?? endpointParams[refName], attrName));
      } else {
        evaluatedTemplateArr.push(referenceRecord[parameterName] ?? endpointParams[parameterName]);
      }
      currentIndex = closingBraceIndex + 1;
    }
    return evaluatedTemplateArr.join("");
  };
  var getReferenceValue = ({ ref }, options) => {
    return options.referenceRecord[ref] ?? options.endpointParams[ref];
  };
  var evaluateExpression = (obj, keyName, options) => {
    if (typeof obj === "string") {
      return evaluateTemplate(obj, options);
    } else if (obj["fn"]) {
      return group$2.callFunction(obj, options);
    } else if (obj["ref"]) {
      return getReferenceValue(obj, options);
    }
    throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
  };
  var callFunction = ({ fn, argv }, options) => {
    const evaluatedArgs = Array(argv.length);
    for (let i = 0;i < evaluatedArgs.length; ++i) {
      const arg = argv[i];
      if (typeof arg === "boolean" || typeof arg === "number") {
        evaluatedArgs[i] = arg;
      } else {
        evaluatedArgs[i] = group$2.evaluateExpression(arg, "arg", options);
      }
    }
    const namespaceSeparatorIndex = fn.indexOf(".");
    if (namespaceSeparatorIndex !== -1) {
      const namespaceFunctions = customEndpointFunctions[fn.slice(0, namespaceSeparatorIndex)];
      const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)];
      if (typeof customFunction === "function") {
        return customFunction(...evaluatedArgs);
      }
    }
    const callable = endpointFunctions[fn];
    if (typeof callable === "function") {
      return callable(...evaluatedArgs);
    }
    throw new Error(`function ${fn} not loaded in endpointFunctions.`);
  };
  var group$2 = {
    evaluateExpression,
    callFunction
  };
  var evaluateCondition = (condition, options) => {
    const { assign } = condition;
    if (assign && assign in options.referenceRecord) {
      throw new EndpointError(`'${assign}' is already defined in Reference Record.`);
    }
    const value = callFunction(condition, options);
    options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`);
    const result = value === "" ? true : !!value;
    if (assign != null) {
      return { result, toAssign: { name: assign, value } };
    }
    return { result };
  };
  var getEndpointHeaders = (headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => {
    acc[headerKey] = headerVal.map((headerValEntry) => {
      const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
      if (typeof processedExpr !== "string") {
        throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);
      }
      return processedExpr;
    });
    return acc;
  }, {});
  var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => {
    acc[propertyKey] = group$1.getEndpointProperty(propertyVal, options);
    return acc;
  }, {});
  var getEndpointProperty = (property, options) => {
    if (Array.isArray(property)) {
      return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
    }
    switch (typeof property) {
      case "string":
        return evaluateTemplate(property, options);
      case "object":
        if (property === null) {
          throw new EndpointError(`Unexpected endpoint property: ${property}`);
        }
        return group$1.getEndpointProperties(property, options);
      case "boolean":
        return property;
      default:
        throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);
    }
  };
  var group$1 = {
    getEndpointProperty,
    getEndpointProperties
  };
  var getEndpointUrl = (endpointUrl, options) => {
    const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
    if (typeof expression === "string") {
      try {
        return new URL(expression);
      } catch (error2) {
        console.error(`Failed to construct URL with ${expression}`, error2);
        throw error2;
      }
    }
    throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);
  };
  var RESULT = 1e8;
  var decideEndpoint = (bdd, options) => {
    const { nodes, root, results, conditions } = bdd;
    let ref = root;
    const referenceRecord = {};
    const closure = {
      referenceRecord,
      endpointParams: options.endpointParams,
      logger: options.logger
    };
    while (ref !== 1 && ref !== -1 && ref < RESULT) {
      const node_i = 3 * (Math.abs(ref) - 1);
      const [condition_i, highRef, lowRef] = [nodes[node_i], nodes[node_i + 1], nodes[node_i + 2]];
      const [fn, argv, assign] = conditions[condition_i];
      const evaluation = evaluateCondition({ fn, assign, argv }, closure);
      if (evaluation.toAssign) {
        const { name, value } = evaluation.toAssign;
        referenceRecord[name] = value;
      }
      ref = ref >= 0 === evaluation.result ? highRef : lowRef;
    }
    if (ref >= RESULT) {
      const result = results[ref - RESULT];
      if (result[0] === -1) {
        const [, errorExpression] = result;
        throw new EndpointError(evaluateExpression(errorExpression, "Error", closure));
      }
      const [url, properties, headers] = result;
      return {
        url: getEndpointUrl(url, closure),
        properties: getEndpointProperties(properties, closure),
        headers: getEndpointHeaders(headers ?? {}, closure)
      };
    }
    throw new EndpointError(`No matching endpoint.`);
  };
  var evaluateConditions = (conditions = [], options) => {
    const conditionsReferenceRecord = {};
    const conditionOptions = {
      ...options,
      referenceRecord: { ...options.referenceRecord }
    };
    let didAssign = false;
    for (const condition of conditions) {
      const { result, toAssign } = evaluateCondition(condition, conditionOptions);
      if (!result) {
        return { result };
      }
      if (toAssign) {
        didAssign = true;
        conditionsReferenceRecord[toAssign.name] = toAssign.value;
        conditionOptions.referenceRecord[toAssign.name] = toAssign.value;
        options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
      }
    }
    if (didAssign) {
      return { result: true, referenceRecord: conditionsReferenceRecord };
    }
    return { result: true };
  };
  var evaluateEndpointRule = (endpointRule, options) => {
    const { conditions, endpoint } = endpointRule;
    const { result, referenceRecord } = evaluateConditions(conditions, options);
    if (!result) {
      return;
    }
    const endpointRuleOptions = referenceRecord ? {
      ...options,
      referenceRecord: { ...options.referenceRecord, ...referenceRecord }
    } : options;
    const { url, properties, headers } = endpoint;
    options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);
    const endpointToReturn = { url: getEndpointUrl(url, endpointRuleOptions) };
    if (headers != null) {
      endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions);
    }
    if (properties != null) {
      endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions);
    }
    return endpointToReturn;
  };
  var evaluateErrorRule = (errorRule, options) => {
    const { conditions, error: error2 } = errorRule;
    const { result, referenceRecord } = evaluateConditions(conditions, options);
    if (!result) {
      return;
    }
    const errorRuleOptions = referenceRecord ? {
      ...options,
      referenceRecord: { ...options.referenceRecord, ...referenceRecord }
    } : options;
    throw new EndpointError(evaluateExpression(error2, "Error", errorRuleOptions));
  };
  var evaluateRules = (rules, options) => {
    for (const rule of rules) {
      if (rule.type === "endpoint") {
        const endpointOrUndefined = evaluateEndpointRule(rule, options);
        if (endpointOrUndefined) {
          return endpointOrUndefined;
        }
      } else if (rule.type === "error") {
        evaluateErrorRule(rule, options);
      } else if (rule.type === "tree") {
        const endpointOrUndefined = group.evaluateTreeRule(rule, options);
        if (endpointOrUndefined) {
          return endpointOrUndefined;
        }
      } else {
        throw new EndpointError(`Unknown endpoint rule: ${rule}`);
      }
    }
    throw new EndpointError(`Rules evaluation failed`);
  };
  var evaluateTreeRule = (treeRule, options) => {
    const { conditions, rules } = treeRule;
    const { result, referenceRecord } = evaluateConditions(conditions, options);
    if (!result) {
      return;
    }
    const treeRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options;
    return group.evaluateRules(rules, treeRuleOptions);
  };
  var group = {
    evaluateRules,
    evaluateTreeRule
  };
  var resolveEndpoint = (ruleSetObject, options) => {
    const { endpointParams, logger } = options;
    const { parameters, rules } = ruleSetObject;
    options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
    for (const paramKey in parameters) {
      const parameter = parameters[paramKey];
      const endpointParam = endpointParams[paramKey];
      if (endpointParam == null && parameter.default != null) {
        endpointParams[paramKey] = parameter.default;
        continue;
      }
      if (parameter.required && endpointParam == null) {
        throw new EndpointError(`Missing required parameter: '${paramKey}'`);
      }
    }
    const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });
    options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
    return endpoint;
  };
  var resolveEndpointRequiredConfig = (input) => {
    const { endpoint } = input;
    if (endpoint === undefined) {
      input.endpoint = async () => {
        throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
      };
    }
    return input;
  };
  var getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig);
  var resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig);
  var endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);
  var getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig);
  exports.BinaryDecisionDiagram = BinaryDecisionDiagram;
  exports.EndpointCache = EndpointCache;
  exports.EndpointError = EndpointError;
  exports.customEndpointFunctions = customEndpointFunctions;
  exports.decideEndpoint = decideEndpoint;
  exports.endpointMiddleware = endpointMiddleware;
  exports.endpointMiddlewareOptions = endpointMiddlewareOptions;
  exports.getEndpointFromInstructions = getEndpointFromInstructions;
  exports.getEndpointPlugin = getEndpointPlugin;
  exports.isIpAddress = isIpAddress;
  exports.resolveEndpoint = resolveEndpoint;
  exports.resolveEndpointConfig = resolveEndpointConfig;
  exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig;
  exports.resolveParams = resolveParams;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js
var require_serde = __commonJS((exports) => {
  var { createHmac, createHash: createHash2, getRandomValues } = __require("node:crypto");
  var { ReadStream, lstatSync, fstatSync } = __require("node:fs");
  var { HttpResponse } = require_transport2();
  var { toEndpointV1 } = require_endpoints();
  var { Duplex, Readable: Readable2, Writable: Writable2, PassThrough } = __require("node:stream");
  var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
  var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
    if (!isArrayBuffer(input)) {
      throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
    }
    return Buffer.from(input, offset, length);
  };
  var fromString = (input, encoding) => {
    if (typeof input !== "string") {
      throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
    }
    return encoding ? Buffer.from(input, encoding) : Buffer.from(input);
  };
  var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
  var fromBase64$1 = (input) => {
    if (input.length * 3 % 4 !== 0) {
      throw new TypeError(`Incorrect padding on base64 string.`);
    }
    if (!BASE64_REGEX.exec(input)) {
      throw new TypeError(`Invalid base64 string.`);
    }
    const buffer = fromString(input, "base64");
    return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
  };
  var fromUtf8$1 = (input) => {
    const buf = fromString(input, "utf8");
    return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
  };
  var toBase64$1 = (_input) => {
    let input;
    if (typeof _input === "string") {
      input = fromUtf8$1(_input);
    } else {
      input = _input;
    }
    if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
      throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
    }
    return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
  };
  function bindUint8ArrayBlobAdapter(toUtf82, fromUtf82, toBase642, fromBase642) {
    return class Uint8ArrayBlobAdapter2 extends Uint8Array {
      static fromString(source, encoding = "utf-8") {
        if (typeof source === "string") {
          if (encoding === "base64") {
            return Uint8ArrayBlobAdapter2.mutate(fromBase642(source));
          }
          return Uint8ArrayBlobAdapter2.mutate(fromUtf82(source));
        }
        throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
      }
      static mutate(source) {
        Object.setPrototypeOf(source, Uint8ArrayBlobAdapter2.prototype);
        return source;
      }
      transformToString(encoding = "utf-8") {
        if (encoding === "base64") {
          return toBase642(this);
        }
        return toUtf82(this);
      }
    };
  }
  var toUtf8$1 = (input) => {
    if (typeof input === "string") {
      return input;
    }
    if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
      throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
    }
    return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
  };
  var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
  function bindV4(getRandomValues2) {
    if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
      return () => crypto.randomUUID();
    }
    return () => {
      const rnds = new Uint8Array(16);
      getRandomValues2(rnds);
      rnds[6] = rnds[6] & 15 | 64;
      rnds[8] = rnds[8] & 63 | 128;
      return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
    };
  }
  var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
  var parseBoolean = (value) => {
    switch (value) {
      case "true":
        return true;
      case "false":
        return false;
      default:
        throw new Error(`Unable to parse boolean value "${value}"`);
    }
  };
  var expectBoolean = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (typeof value === "number") {
      if (value === 0 || value === 1) {
        logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
      }
      if (value === 0) {
        return false;
      }
      if (value === 1) {
        return true;
      }
    }
    if (typeof value === "string") {
      const lower = value.toLowerCase();
      if (lower === "false" || lower === "true") {
        logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
      }
      if (lower === "false") {
        return false;
      }
      if (lower === "true") {
        return true;
      }
    }
    if (typeof value === "boolean") {
      return value;
    }
    throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
  };
  var expectNumber = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (typeof value === "string") {
      const parsed = parseFloat(value);
      if (!Number.isNaN(parsed)) {
        if (String(parsed) !== String(value)) {
          logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
        }
        return parsed;
      }
    }
    if (typeof value === "number") {
      return value;
    }
    throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
  };
  var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
  var expectFloat32 = (value) => {
    const expected = expectNumber(value);
    if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
      if (Math.abs(expected) > MAX_FLOAT) {
        throw new TypeError(`Expected 32-bit float, got ${value}`);
      }
    }
    return expected;
  };
  var expectLong = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (Number.isInteger(value) && !Number.isNaN(value)) {
      return value;
    }
    throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
  };
  var expectInt = expectLong;
  var expectInt32 = (value) => expectSizedInt(value, 32);
  var expectShort = (value) => expectSizedInt(value, 16);
  var expectByte = (value) => expectSizedInt(value, 8);
  var expectSizedInt = (value, size) => {
    const expected = expectLong(value);
    if (expected !== undefined && castInt(expected, size) !== expected) {
      throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
    }
    return expected;
  };
  var castInt = (value, size) => {
    switch (size) {
      case 32:
        return Int32Array.of(value)[0];
      case 16:
        return Int16Array.of(value)[0];
      case 8:
        return Int8Array.of(value)[0];
    }
  };
  var expectNonNull = (value, location) => {
    if (value === null || value === undefined) {
      if (location) {
        throw new TypeError(`Expected a non-null value for ${location}`);
      }
      throw new TypeError("Expected a non-null value");
    }
    return value;
  };
  var expectObject = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (typeof value === "object" && !Array.isArray(value)) {
      return value;
    }
    const receivedType = Array.isArray(value) ? "array" : typeof value;
    throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
  };
  var expectString = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (typeof value === "string") {
      return value;
    }
    if (["boolean", "number", "bigint"].includes(typeof value)) {
      logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
      return String(value);
    }
    throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
  };
  var expectUnion = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    const asObject = expectObject(value);
    const setKeys = [];
    for (const k in asObject) {
      if (asObject[k] != null) {
        setKeys.push(k);
      }
    }
    if (setKeys.length === 0) {
      throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
    }
    if (setKeys.length > 1) {
      throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
    }
    return asObject;
  };
  var strictParseDouble = (value) => {
    if (typeof value == "string") {
      return expectNumber(parseNumber(value));
    }
    return expectNumber(value);
  };
  var strictParseFloat = strictParseDouble;
  var strictParseFloat32 = (value) => {
    if (typeof value == "string") {
      return expectFloat32(parseNumber(value));
    }
    return expectFloat32(value);
  };
  var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
  var parseNumber = (value) => {
    const matches = value.match(NUMBER_REGEX);
    if (matches === null || matches[0].length !== value.length) {
      throw new TypeError(`Expected real number, got implicit NaN`);
    }
    return parseFloat(value);
  };
  var limitedParseDouble = (value) => {
    if (typeof value == "string") {
      return parseFloatString(value);
    }
    return expectNumber(value);
  };
  var handleFloat = limitedParseDouble;
  var limitedParseFloat = limitedParseDouble;
  var limitedParseFloat32 = (value) => {
    if (typeof value == "string") {
      return parseFloatString(value);
    }
    return expectFloat32(value);
  };
  var parseFloatString = (value) => {
    switch (value) {
      case "NaN":
        return NaN;
      case "Infinity":
        return Infinity;
      case "-Infinity":
        return -Infinity;
      default:
        throw new Error(`Unable to parse float value: ${value}`);
    }
  };
  var strictParseLong = (value) => {
    if (typeof value === "string") {
      return expectLong(parseNumber(value));
    }
    return expectLong(value);
  };
  var strictParseInt = strictParseLong;
  var strictParseInt32 = (value) => {
    if (typeof value === "string") {
      return expectInt32(parseNumber(value));
    }
    return expectInt32(value);
  };
  var strictParseShort = (value) => {
    if (typeof value === "string") {
      return expectShort(parseNumber(value));
    }
    return expectShort(value);
  };
  var strictParseByte = (value) => {
    if (typeof value === "string") {
      return expectByte(parseNumber(value));
    }
    return expectByte(value);
  };
  var stackTraceWarning = (message) => {
    return String(new TypeError(message).stack || message).split(`
`).slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join(`
`);
  };
  var logger = {
    warn: console.warn
  };
  var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
  var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
  function dateToUtcString(date3) {
    const year2 = date3.getUTCFullYear();
    const month = date3.getUTCMonth();
    const dayOfWeek = date3.getUTCDay();
    const dayOfMonthInt = date3.getUTCDate();
    const hoursInt = date3.getUTCHours();
    const minutesInt = date3.getUTCMinutes();
    const secondsInt = date3.getUTCSeconds();
    const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
    const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
    const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
    const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
    return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year2} ${hoursString}:${minutesString}:${secondsString} GMT`;
  }
  var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
  var parseRfc3339DateTime = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (typeof value !== "string") {
      throw new TypeError("RFC-3339 date-times must be expressed as strings");
    }
    const match = RFC3339.exec(value);
    if (!match) {
      throw new TypeError("Invalid RFC-3339 date-time value");
    }
    const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
    const year2 = strictParseShort(stripLeadingZeroes(yearStr));
    const month = parseDateValue(monthStr, "month", 1, 12);
    const day = parseDateValue(dayStr, "day", 1, 31);
    return buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
  };
  var RFC3339_WITH_OFFSET$1 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
  var parseRfc3339DateTimeWithOffset = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (typeof value !== "string") {
      throw new TypeError("RFC-3339 date-times must be expressed as strings");
    }
    const match = RFC3339_WITH_OFFSET$1.exec(value);
    if (!match) {
      throw new TypeError("Invalid RFC-3339 date-time value");
    }
    const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;
    const year2 = strictParseShort(stripLeadingZeroes(yearStr));
    const month = parseDateValue(monthStr, "month", 1, 12);
    const day = parseDateValue(dayStr, "day", 1, 31);
    const date3 = buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
    if (offsetStr.toUpperCase() != "Z") {
      date3.setTime(date3.getTime() - parseOffsetToMilliseconds(offsetStr));
    }
    return date3;
  };
  var IMF_FIXDATE$1 = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
  var RFC_850_DATE$1 = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
  var ASC_TIME$1 = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
  var parseRfc7231DateTime = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    if (typeof value !== "string") {
      throw new TypeError("RFC-7231 date-times must be expressed as strings");
    }
    let match = IMF_FIXDATE$1.exec(value);
    if (match) {
      const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
      return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
    }
    match = RFC_850_DATE$1.exec(value);
    if (match) {
      const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
      return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
        hours,
        minutes,
        seconds,
        fractionalMilliseconds
      }));
    }
    match = ASC_TIME$1.exec(value);
    if (match) {
      const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
      return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
    }
    throw new TypeError("Invalid RFC-7231 date-time value");
  };
  var parseEpochTimestamp = (value) => {
    if (value === null || value === undefined) {
      return;
    }
    let valueAsDouble;
    if (typeof value === "number") {
      valueAsDouble = value;
    } else if (typeof value === "string") {
      valueAsDouble = strictParseDouble(value);
    } else if (typeof value === "object" && value.tag === 1) {
      valueAsDouble = value.value;
    } else {
      throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
    }
    if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {
      throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
    }
    return new Date(Math.round(valueAsDouble * 1000));
  };
  var buildDate = (year2, month, day, time3) => {
    const adjustedMonth = month - 1;
    validateDayOfMonth(year2, adjustedMonth, day);
    return new Date(Date.UTC(year2, adjustedMonth, day, parseDateValue(time3.hours, "hour", 0, 23), parseDateValue(time3.minutes, "minute", 0, 59), parseDateValue(time3.seconds, "seconds", 0, 60), parseMilliseconds(time3.fractionalMilliseconds)));
  };
  var parseTwoDigitYear = (value) => {
    const thisYear = new Date().getUTCFullYear();
    const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
    if (valueInThisCentury < thisYear) {
      return valueInThisCentury + 100;
    }
    return valueInThisCentury;
  };
  var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;
  var adjustRfc850Year = (input) => {
    if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {
      return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
    }
    return input;
  };
  var parseMonthByShortName = (value) => {
    const monthIdx = MONTHS.indexOf(value);
    if (monthIdx < 0) {
      throw new TypeError(`Invalid month: ${value}`);
    }
    return monthIdx + 1;
  };
  var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  var validateDayOfMonth = (year2, month, day) => {
    let maxDays = DAYS_IN_MONTH[month];
    if (month === 1 && isLeapYear(year2)) {
      maxDays = 29;
    }
    if (day > maxDays) {
      throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year2}: ${day}`);
    }
  };
  var isLeapYear = (year2) => {
    return year2 % 4 === 0 && (year2 % 100 !== 0 || year2 % 400 === 0);
  };
  var parseDateValue = (value, type2, lower, upper) => {
    const dateVal = strictParseByte(stripLeadingZeroes(value));
    if (dateVal < lower || dateVal > upper) {
      throw new TypeError(`${type2} must be between ${lower} and ${upper}, inclusive`);
    }
    return dateVal;
  };
  var parseMilliseconds = (value) => {
    if (value === null || value === undefined) {
      return 0;
    }
    return strictParseFloat32("0." + value) * 1000;
  };
  var parseOffsetToMilliseconds = (value) => {
    const directionStr = value[0];
    let direction = 1;
    if (directionStr == "+") {
      direction = 1;
    } else if (directionStr == "-") {
      direction = -1;
    } else {
      throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
    }
    const hour = Number(value.substring(1, 3));
    const minute = Number(value.substring(4, 6));
    return direction * (hour * 60 + minute) * 60 * 1000;
  };
  var stripLeadingZeroes = (value) => {
    let idx = 0;
    while (idx < value.length - 1 && value.charAt(idx) === "0") {
      idx++;
    }
    if (idx === 0) {
      return value;
    }
    return value.slice(idx);
  };
  var LazyJsonString = function LazyJsonString2(val) {
    const str = Object.assign(new String(val), {
      deserializeJSON() {
        return JSON.parse(String(val));
      },
      toString() {
        return String(val);
      },
      toJSON() {
        return String(val);
      }
    });
    return str;
  };
  LazyJsonString.from = (object) => {
    if (object && typeof object === "object" && (object instanceof LazyJsonString || ("deserializeJSON" in object))) {
      return object;
    } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
      return LazyJsonString(String(object));
    }
    return LazyJsonString(JSON.stringify(object));
  };
  LazyJsonString.fromObject = LazyJsonString.from;
  function quoteHeader(part) {
    if (part.includes(",") || part.includes('"')) {
      part = `"${part.replace(/"/g, "\\\"")}"`;
    }
    return part;
  }
  var ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
  var mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
  var time2 = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
  var date2 = `(\\d?\\d)`;
  var year = `(\\d{4})`;
  var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
  var IMF_FIXDATE = new RegExp(`^${ddd}, ${date2} ${mmm} ${year} ${time2} GMT$`);
  var RFC_850_DATE = new RegExp(`^${ddd}, ${date2}-${mmm}-(\\d\\d) ${time2} GMT$`);
  var ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time2} ${year}$`);
  var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
  var _parseEpochTimestamp = (value) => {
    if (value == null) {
      return;
    }
    let num = NaN;
    if (typeof value === "number") {
      num = value;
    } else if (typeof value === "string") {
      if (!/^-?\d*\.?\d+$/.test(value)) {
        throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
      }
      num = Number.parseFloat(value);
    } else if (typeof value === "object" && value.tag === 1) {
      num = value.value;
    }
    if (isNaN(num) || Math.abs(num) === Infinity) {
      throw new TypeError("Epoch timestamps must be valid finite numbers.");
    }
    return new Date(Math.round(num * 1000));
  };
  var _parseRfc3339DateTimeWithOffset = (value) => {
    if (value == null) {
      return;
    }
    if (typeof value !== "string") {
      throw new TypeError("RFC3339 timestamps must be strings");
    }
    const matches = RFC3339_WITH_OFFSET.exec(value);
    if (!matches) {
      throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
    }
    const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
    range(monthStr, 1, 12);
    range(dayStr, 1, 31);
    range(hours, 0, 23);
    range(minutes, 0, 59);
    range(seconds, 0, 60);
    const date3 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));
    date3.setUTCFullYear(Number(yearStr));
    if (offsetStr.toUpperCase() != "Z") {
      const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [undefined, "+", 0, 0];
      const scalar = sign === "-" ? 1 : -1;
      date3.setTime(date3.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));
    }
    return date3;
  };
  var _parseRfc7231DateTime = (value) => {
    if (value == null) {
      return;
    }
    if (typeof value !== "string") {
      throw new TypeError("RFC7231 timestamps must be strings.");
    }
    let day;
    let month;
    let year2;
    let hour;
    let minute;
    let second;
    let fraction;
    let matches;
    if (matches = IMF_FIXDATE.exec(value)) {
      [, day, month, year2, hour, minute, second, fraction] = matches;
    } else if (matches = RFC_850_DATE.exec(value)) {
      [, day, month, year2, hour, minute, second, fraction] = matches;
      year2 = (Number(year2) + 1900).toString();
    } else if (matches = ASC_TIME.exec(value)) {
      [, month, day, hour, minute, second, fraction, year2] = matches;
    }
    if (year2 && second) {
      const timestamp2 = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);
      range(day, 1, 31);
      range(hour, 0, 23);
      range(minute, 0, 59);
      range(second, 0, 60);
      const date3 = new Date(timestamp2);
      date3.setUTCFullYear(Number(year2));
      return date3;
    }
    throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
  };
  function range(v, min, max) {
    const _v = Number(v);
    if (_v < min || _v > max) {
      throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
    }
  }
  function splitEvery(value, delimiter, numDelimiters) {
    if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
      throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
    }
    const segments = value.split(delimiter);
    if (numDelimiters === 1) {
      return segments;
    }
    const compoundSegments = [];
    let currentSegment = "";
    for (let i = 0;i < segments.length; i++) {
      if (currentSegment === "") {
        currentSegment = segments[i];
      } else {
        currentSegment += delimiter + segments[i];
      }
      if ((i + 1) % numDelimiters === 0) {
        compoundSegments.push(currentSegment);
        currentSegment = "";
      }
    }
    if (currentSegment !== "") {
      compoundSegments.push(currentSegment);
    }
    return compoundSegments;
  }
  var splitHeader = (value) => {
    const z = value.length;
    const values = [];
    let withinQuotes = false;
    let prevChar = undefined;
    let anchor = 0;
    for (let i = 0;i < z; ++i) {
      const char2 = value[i];
      switch (char2) {
        case `"`:
          if (prevChar !== "\\") {
            withinQuotes = !withinQuotes;
          }
          break;
        case ",":
          if (!withinQuotes) {
            values.push(value.slice(anchor, i));
            anchor = i + 1;
          }
          break;
      }
      prevChar = char2;
    }
    values.push(value.slice(anchor));
    return values.map((v) => {
      v = v.trim();
      const z2 = v.length;
      if (z2 < 2) {
        return v;
      }
      if (v[0] === `"` && v[z2 - 1] === `"`) {
        v = v.slice(1, z2 - 1);
      }
      return v.replace(/\\"/g, '"');
    });
  };
  var format = /^-?\d*(\.\d+)?$/;

  class NumericValue {
    string;
    type;
    constructor(string, type2) {
      this.string = string;
      this.type = type2;
      if (!format.test(string)) {
        throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
      }
    }
    toString() {
      return this.string;
    }
    static [Symbol.hasInstance](object) {
      if (!object || typeof object !== "object") {
        return false;
      }
      const _nv = object;
      return NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
    }
  }
  function nv(input) {
    return new NumericValue(String(input), "bigDecimal");
  }
  var SHORT_TO_HEX = {};
  var HEX_TO_SHORT = {};
  for (let i = 0;i < 256; i++) {
    let encodedByte = i.toString(16).toLowerCase();
    if (encodedByte.length === 1) {
      encodedByte = `0${encodedByte}`;
    }
    SHORT_TO_HEX[i] = encodedByte;
    HEX_TO_SHORT[encodedByte] = i;
  }
  function fromHex(encoded) {
    if (encoded.length % 2 !== 0) {
      throw new Error("Hex encoded strings must have an even number length");
    }
    const out = new Uint8Array(encoded.length / 2);
    for (let i = 0;i < encoded.length; i += 2) {
      const encodedByte = encoded.slice(i, i + 2).toLowerCase();
      if (encodedByte in HEX_TO_SHORT) {
        out[i / 2] = HEX_TO_SHORT[encodedByte];
      } else {
        throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
      }
    }
    return out;
  }
  function toHex(bytes) {
    let out = "";
    for (let i = 0;i < bytes.byteLength; i++) {
      out += SHORT_TO_HEX[bytes[i]];
    }
    return out;
  }
  var calculateBodyLength = (body) => {
    if (!body) {
      return 0;
    }
    if (typeof body === "string") {
      return Buffer.byteLength(body);
    } else if (typeof body.byteLength === "number") {
      return body.byteLength;
    } else if (typeof body.size === "number") {
      return body.size;
    } else if (typeof body.start === "number" && typeof body.end === "number") {
      return body.end + 1 - body.start;
    } else if (body instanceof ReadStream) {
      if (body.path != null) {
        return lstatSync(body.path).size;
      } else if (typeof body.fd === "number") {
        return fstatSync(body.fd).size;
      }
    }
    throw new Error(`Body Length computation failed for ${body}`);
  };
  var toUint8Array = (data) => {
    if (typeof data === "string") {
      return fromUtf8$1(data);
    }
    if (ArrayBuffer.isView(data)) {
      return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
    }
    return new Uint8Array(data);
  };
  var deserializerMiddleware = (options, deserializer) => (next, context10) => async (args) => {
    const { response } = await next(args);
    try {
      const parsed = await deserializer(response, options);
      return {
        response,
        output: parsed
      };
    } catch (error2) {
      Object.defineProperty(error2, "$response", {
        value: response,
        enumerable: false,
        writable: false,
        configurable: false
      });
      if (!("$metadata" in error2)) {
        const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
        try {
          error2.message += `
  ` + hint;
        } catch (e) {
          if (!context10.logger || context10.logger?.constructor?.name === "NoOpLogger") {
            console.warn(hint);
          } else {
            context10.logger?.warn?.(hint);
          }
        }
        if (typeof error2.$responseBodyText !== "undefined") {
          if (error2.$response) {
            error2.$response.body = error2.$responseBodyText;
          }
        }
        try {
          if (HttpResponse.isInstance(response)) {
            const { headers = {} } = response;
            const headerEntries = Object.entries(headers);
            error2.$metadata = {
              httpStatusCode: response.statusCode,
              requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
              extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
              cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
            };
          }
        } catch (e) {}
      }
      throw error2;
    }
  };
  var findHeader = (pattern, headers) => {
    return (headers.find(([k]) => {
      return k.match(pattern);
    }) || [undefined, undefined])[1];
  };
  var serializerMiddleware = (options, serializer) => (next, context10) => async (args) => {
    const endpointConfig = options;
    const endpoint = context10.endpointV2 ? async () => toEndpointV1(context10.endpointV2) : endpointConfig.endpoint;
    if (!endpoint) {
      throw new Error("No valid endpoint provider available.");
    }
    const request2 = await serializer(args.input, { ...options, endpoint });
    return next({
      ...args,
      request: request2
    });
  };
  var deserializerMiddlewareOption = {
    name: "deserializerMiddleware",
    step: "deserialize",
    tags: ["DESERIALIZER"],
    override: true
  };
  var serializerMiddlewareOption = {
    name: "serializerMiddleware",
    step: "serialize",
    tags: ["SERIALIZER"],
    override: true
  };
  function getSerdePlugin(config, serializer, deserializer) {
    return {
      applyToStack: (commandStack) => {
        commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);
        commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);
      }
    };
  }

  class Hash {
    algorithmIdentifier;
    secret;
    hash;
    constructor(algorithmIdentifier, secret) {
      this.algorithmIdentifier = algorithmIdentifier;
      this.secret = secret;
      this.reset();
    }
    update(toHash, encoding) {
      this.hash.update(toUint8Array(castSourceData(toHash, encoding)));
    }
    digest() {
      return Promise.resolve(this.hash.digest());
    }
    reset() {
      this.hash = this.secret ? createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : createHash2(this.algorithmIdentifier);
    }
  }
  function castSourceData(toCast, encoding) {
    if (Buffer.isBuffer(toCast)) {
      return toCast;
    }
    if (typeof toCast === "string") {
      return fromString(toCast, encoding);
    }
    if (ArrayBuffer.isView(toCast)) {
      return fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
    }
    return fromArrayBuffer(toCast);
  }
  var ChecksumStream$1 = class ChecksumStream2 extends Duplex {
    expectedChecksum;
    checksumSourceLocation;
    checksum;
    source;
    base64Encoder;
    pendingCallback = null;
    constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
      super();
      if (typeof source.pipe === "function") {
        this.source = source;
      } else {
        throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
      }
      this.base64Encoder = base64Encoder ?? toBase64$1;
      this.expectedChecksum = expectedChecksum;
      this.checksum = checksum;
      this.checksumSourceLocation = checksumSourceLocation;
      this.source.pipe(this);
    }
    _read(size) {
      if (this.pendingCallback) {
        const callback = this.pendingCallback;
        this.pendingCallback = null;
        callback();
      }
    }
    _write(chunk, encoding, callback) {
      try {
        this.checksum.update(chunk);
        const canPushMore = this.push(chunk);
        if (!canPushMore) {
          this.pendingCallback = callback;
          return;
        }
      } catch (e) {
        return callback(e);
      }
      return callback();
    }
    async _final(callback) {
      try {
        const digest = await this.checksum.digest();
        const received = this.base64Encoder(digest);
        if (this.expectedChecksum !== received) {
          return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + ` in response header "${this.checksumSourceLocation}".`));
        }
      } catch (e) {
        return callback(e);
      }
      this.push(null);
      return callback();
    }
  };
  var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
  var isBlob = (blob) => {
    return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
  };
  var fromUtf8 = (input) => new TextEncoder().encode(input);
  var chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
  var alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {
    acc[c] = Number(i);
    return acc;
  }, {});
  var alphabetByValue = chars.split("");
  var bitsPerLetter = 6;
  var bitsPerByte = 8;
  var maxLetterValue = 63;
  function toBase64(_input) {
    let input;
    if (typeof _input === "string") {
      input = fromUtf8(_input);
    } else {
      input = _input;
    }
    const isArrayLike = typeof input === "object" && typeof input.length === "number";
    const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number";
    if (!isArrayLike && !isUint8Array) {
      throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
    }
    let str = "";
    for (let i = 0;i < input.length; i += 3) {
      let bits = 0;
      let bitLength = 0;
      for (let j = i, limit = Math.min(i + 3, input.length);j < limit; j++) {
        bits |= input[j] << (limit - j - 1) * bitsPerByte;
        bitLength += bitsPerByte;
      }
      const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);
      bits <<= bitClusterCount * bitsPerLetter - bitLength;
      for (let k = 1;k <= bitClusterCount; k++) {
        const offset = (bitClusterCount - k) * bitsPerLetter;
        str += alphabetByValue[(bits & maxLetterValue << offset) >> offset];
      }
      str += "==".slice(0, 4 - bitClusterCount);
    }
    return str;
  }
  var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {};

  class ChecksumStream extends ReadableStreamRef {
  }
  var createChecksumStream$1 = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => {
    if (!isReadableStream(source)) {
      throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
    }
    const encoder = base64Encoder ?? toBase64;
    if (typeof TransformStream !== "function") {
      throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
    }
    const transform = new TransformStream({
      start() {},
      async transform(chunk, controller) {
        checksum.update(chunk);
        controller.enqueue(chunk);
      },
      async flush(controller) {
        const digest = await checksum.digest();
        const received = encoder(digest);
        if (expectedChecksum !== received) {
          const error2 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + ` in response header "${checksumSourceLocation}".`);
          controller.error(error2);
        } else {
          controller.terminate();
        }
      }
    });
    source.pipeThrough(transform);
    const readable = transform.readable;
    Object.setPrototypeOf(readable, ChecksumStream.prototype);
    return readable;
  };
  function createChecksumStream(init4) {
    if (typeof ReadableStream === "function" && isReadableStream(init4.source)) {
      return createChecksumStream$1(init4);
    }
    return new ChecksumStream$1(init4);
  }

  class ByteArrayCollector {
    allocByteArray;
    byteLength = 0;
    byteArrays = [];
    constructor(allocByteArray) {
      this.allocByteArray = allocByteArray;
    }
    push(byteArray) {
      this.byteArrays.push(byteArray);
      this.byteLength += byteArray.byteLength;
    }
    flush() {
      if (this.byteArrays.length === 1) {
        const bytes = this.byteArrays[0];
        this.reset();
        return bytes;
      }
      const aggregation = this.allocByteArray(this.byteLength);
      let cursor = 0;
      for (let i = 0;i < this.byteArrays.length; ++i) {
        const bytes = this.byteArrays[i];
        aggregation.set(bytes, cursor);
        cursor += bytes.byteLength;
      }
      this.reset();
      return aggregation;
    }
    reset() {
      this.byteArrays = [];
      this.byteLength = 0;
    }
  }
  function createBufferedReadableStream(upstream, size, logger2) {
    const reader = upstream.getReader();
    let streamBufferingLoggedWarning = false;
    let bytesSeen = 0;
    const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))];
    let mode = -1;
    const pull = async (controller) => {
      const { value, done } = await reader.read();
      const chunk = value;
      if (done) {
        if (mode !== -1) {
          const remainder = flush2(buffers, mode);
          if (sizeOf(remainder) > 0) {
            controller.enqueue(remainder);
          }
        }
        controller.close();
      } else {
        const chunkMode = modeOf(chunk, false);
        if (mode !== chunkMode) {
          if (mode >= 0) {
            controller.enqueue(flush2(buffers, mode));
          }
          mode = chunkMode;
        }
        if (mode === -1) {
          controller.enqueue(chunk);
          return;
        }
        const chunkSize = sizeOf(chunk);
        bytesSeen += chunkSize;
        const bufferSize = sizeOf(buffers[mode]);
        if (chunkSize >= size && bufferSize === 0) {
          controller.enqueue(chunk);
        } else {
          const newSize = merge2(buffers, mode, chunk);
          if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
            streamBufferingLoggedWarning = true;
            logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
          }
          if (newSize >= size) {
            controller.enqueue(flush2(buffers, mode));
          } else {
            await pull(controller);
          }
        }
      }
    };
    return new ReadableStream({
      pull
    });
  }
  function merge2(buffers, mode, chunk) {
    switch (mode) {
      case 0:
        buffers[0] += chunk;
        return sizeOf(buffers[0]);
      case 1:
      case 2:
        buffers[mode].push(chunk);
        return sizeOf(buffers[mode]);
    }
  }
  function flush2(buffers, mode) {
    switch (mode) {
      case 0:
        const s = buffers[0];
        buffers[0] = "";
        return s;
      case 1:
      case 2:
        return buffers[mode].flush();
    }
    throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);
  }
  function sizeOf(chunk) {
    return chunk?.byteLength ?? chunk?.length ?? 0;
  }
  function modeOf(chunk, allowBuffer = true) {
    if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) {
      return 2;
    }
    if (chunk instanceof Uint8Array) {
      return 1;
    }
    if (typeof chunk === "string") {
      return 0;
    }
    return -1;
  }
  function createBufferedReadable(upstream, size, logger2) {
    if (isReadableStream(upstream)) {
      return createBufferedReadableStream(upstream, size, logger2);
    }
    const downstream = new Readable2({ read() {} });
    let streamBufferingLoggedWarning = false;
    let bytesSeen = 0;
    const buffers = [
      "",
      new ByteArrayCollector((size2) => new Uint8Array(size2)),
      new ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2)))
    ];
    let mode = -1;
    upstream.on("data", (chunk) => {
      const chunkMode = modeOf(chunk, true);
      if (mode !== chunkMode) {
        if (mode >= 0) {
          downstream.push(flush2(buffers, mode));
        }
        mode = chunkMode;
      }
      if (mode === -1) {
        downstream.push(chunk);
        return;
      }
      const chunkSize = sizeOf(chunk);
      bytesSeen += chunkSize;
      const bufferSize = sizeOf(buffers[mode]);
      if (chunkSize >= size && bufferSize === 0) {
        downstream.push(chunk);
      } else {
        const newSize = merge2(buffers, mode, chunk);
        if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
          streamBufferingLoggedWarning = true;
          logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
        }
        if (newSize >= size) {
          downstream.push(flush2(buffers, mode));
        }
      }
    });
    upstream.on("end", () => {
      if (mode !== -1) {
        const remainder = flush2(buffers, mode);
        if (sizeOf(remainder) > 0) {
          downstream.push(remainder);
        }
      }
      downstream.push(null);
    });
    return downstream;
  }
  var getAwsChunkedEncodingStream$1 = (readableStream, options) => {
    const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
    const checksumRequired = base64Encoder !== undefined && bodyLengthChecker !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined;
    const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
    const reader = readableStream.getReader();
    return new ReadableStream({
      async pull(controller) {
        const { value, done } = await reader.read();
        if (done) {
          controller.enqueue(`0\r
`);
          if (checksumRequired) {
            const checksum = base64Encoder(await digest);
            controller.enqueue(`${checksumLocationName}:${checksum}\r
`);
            controller.enqueue(`\r
`);
          }
          controller.close();
        } else {
          controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r
${value}\r
`);
        }
      }
    });
  };
  function getAwsChunkedEncodingStream(stream, options) {
    const readable = stream;
    const readableStream = stream;
    if (isReadableStream(readableStream)) {
      return getAwsChunkedEncodingStream$1(readableStream, options);
    }
    const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
    const checksumRequired = base64Encoder !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined;
    const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined;
    const awsChunkedEncodingStream = new Readable2({
      read: () => {}
    });
    readable.on("data", (data) => {
      const length = bodyLengthChecker(data) || 0;
      if (length === 0) {
        return;
      }
      awsChunkedEncodingStream.push(`${length.toString(16)}\r
`);
      awsChunkedEncodingStream.push(data);
      awsChunkedEncodingStream.push(`\r
`);
    });
    readable.on("end", async () => {
      awsChunkedEncodingStream.push(`0\r
`);
      if (checksumRequired) {
        const checksum = base64Encoder(await digest);
        awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
`);
        awsChunkedEncodingStream.push(`\r
`);
      }
      awsChunkedEncodingStream.push(null);
    });
    return awsChunkedEncodingStream;
  }
  async function headStream$1(stream, bytes) {
    let byteLengthCounter = 0;
    const chunks = [];
    const reader = stream.getReader();
    let isDone = false;
    while (!isDone) {
      const { done, value } = await reader.read();
      if (value) {
        chunks.push(value);
        byteLengthCounter += value?.byteLength ?? 0;
      }
      if (byteLengthCounter >= bytes) {
        break;
      }
      isDone = done;
    }
    reader.releaseLock();
    const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));
    let offset = 0;
    for (const chunk of chunks) {
      if (chunk.byteLength > collected.byteLength - offset) {
        collected.set(chunk.subarray(0, collected.byteLength - offset), offset);
        break;
      } else {
        collected.set(chunk, offset);
      }
      offset += chunk.length;
    }
    return collected;
  }
  var headStream = (stream, bytes) => {
    if (isReadableStream(stream)) {
      return headStream$1(stream, bytes);
    }
    return new Promise((resolve3, reject) => {
      const collector = new Collector$1;
      collector.limit = bytes;
      stream.pipe(collector);
      stream.on("error", (err) => {
        collector.end();
        reject(err);
      });
      collector.on("error", reject);
      collector.on("finish", function() {
        const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
        resolve3(bytes2);
      });
    });
  };
  var Collector$1 = class Collector2 extends Writable2 {
    buffers = [];
    limit = Infinity;
    bytesBuffered = 0;
    _write(chunk, encoding, callback) {
      this.buffers.push(chunk);
      this.bytesBuffered += chunk.byteLength ?? 0;
      if (this.bytesBuffered >= this.limit) {
        const excess = this.bytesBuffered - this.limit;
        const tailBuffer = this.buffers[this.buffers.length - 1];
        this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);
        this.emit("finish");
      }
      callback();
    }
  };
  var toUtf8 = (input) => {
    if (typeof input === "string") {
      return input;
    }
    if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
      throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
    }
    return new TextDecoder("utf-8").decode(input);
  };
  var fromBase64 = (input) => {
    let totalByteLength = input.length / 4 * 3;
    if (input.slice(-2) === "==") {
      totalByteLength -= 2;
    } else if (input.slice(-1) === "=") {
      totalByteLength--;
    }
    const out = new ArrayBuffer(totalByteLength);
    const dataView = new DataView(out);
    for (let i = 0;i < input.length; i += 4) {
      let bits = 0;
      let bitLength = 0;
      for (let j = i, limit = i + 3;j <= limit; j++) {
        if (input[j] !== "=") {
          if (!(input[j] in alphabetByEncoding)) {
            throw new TypeError(`Invalid character ${input[j]} in base64 string.`);
          }
          bits |= alphabetByEncoding[input[j]] << (limit - j) * bitsPerLetter;
          bitLength += bitsPerLetter;
        } else {
          bits >>= bitsPerLetter;
        }
      }
      const chunkOffset = i / 4 * 3;
      bits >>= bitLength % bitsPerByte;
      const byteLength = Math.floor(bitLength / bitsPerByte);
      for (let k = 0;k < byteLength; k++) {
        const offset = (byteLength - k - 1) * bitsPerByte;
        dataView.setUint8(chunkOffset + k, (bits & 255 << offset) >> offset);
      }
    }
    return new Uint8Array(out);
  };
  var streamCollector$1 = async (stream) => {
    if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") {
      if (Blob.prototype.arrayBuffer !== undefined) {
        return new Uint8Array(await stream.arrayBuffer());
      }
      return collectBlob(stream);
    }
    return collectStream(stream);
  };
  async function collectBlob(blob) {
    const base64 = await readToBase64(blob);
    const arrayBuffer = fromBase64(base64);
    return new Uint8Array(arrayBuffer);
  }
  async function collectStream(stream) {
    const chunks = [];
    const reader = stream.getReader();
    let isDone = false;
    let length = 0;
    while (!isDone) {
      const { done, value } = await reader.read();
      if (value) {
        chunks.push(value);
        length += value.length;
      }
      isDone = done;
    }
    const collected = new Uint8Array(length);
    let offset = 0;
    for (const chunk of chunks) {
      collected.set(chunk, offset);
      offset += chunk.length;
    }
    return collected;
  }
  function readToBase64(blob) {
    return new Promise((resolve3, reject) => {
      const reader = new FileReader;
      reader.onloadend = () => {
        if (reader.readyState !== 2) {
          return reject(new Error("Reader aborted too early"));
        }
        const result = reader.result ?? "";
        const commaIndex = result.indexOf(",");
        const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
        resolve3(result.substring(dataOffset));
      };
      reader.onabort = () => reject(new Error("Read aborted"));
      reader.onerror = () => reject(reader.error);
      reader.readAsDataURL(blob);
    });
  }
  var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1 = "The stream has already been transformed.";
  var sdkStreamMixin$1 = (stream) => {
    if (!isBlobInstance(stream) && !isReadableStream(stream)) {
      const name = stream?.__proto__?.constructor?.name || stream;
      throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
    }
    let transformed = false;
    const transformToByteArray = async () => {
      if (transformed) {
        throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
      }
      transformed = true;
      return await streamCollector$1(stream);
    };
    const blobToWebStream = (blob) => {
      if (typeof blob.stream !== "function") {
        throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
` + "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
      }
      return blob.stream();
    };
    return Object.assign(stream, {
      transformToByteArray,
      transformToString: async (encoding) => {
        const buf = await transformToByteArray();
        if (encoding === "base64") {
          return toBase64(buf);
        } else if (encoding === "hex") {
          return toHex(buf);
        } else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") {
          return toUtf8(buf);
        } else if (typeof TextDecoder === "function") {
          return new TextDecoder(encoding).decode(buf);
        } else {
          throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
        }
      },
      transformToWebStream: () => {
        if (transformed) {
          throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
        }
        transformed = true;
        if (isBlobInstance(stream)) {
          return blobToWebStream(stream);
        } else if (isReadableStream(stream)) {
          return stream;
        } else {
          throw new Error(`Cannot transform payload to web stream, got ${stream}`);
        }
      }
    });
  };
  var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;

  class Collector extends Writable2 {
    bufferedBytes = [];
    _write(chunk, encoding, callback) {
      this.bufferedBytes.push(chunk);
      callback();
    }
  }
  var isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream;
  async function collectReadableStream(stream) {
    const chunks = [];
    const reader = stream.getReader();
    let isDone = false;
    let length = 0;
    while (!isDone) {
      const { done, value } = await reader.read();
      if (value) {
        chunks.push(value);
        length += value.length;
      }
      isDone = done;
    }
    const collected = new Uint8Array(length);
    let offset = 0;
    for (const chunk of chunks) {
      collected.set(chunk, offset);
      offset += chunk.length;
    }
    return collected;
  }
  var streamCollector = (stream) => {
    if (isReadableStreamInstance(stream)) {
      return collectReadableStream(stream);
    }
    return new Promise((resolve3, reject) => {
      const collector = new Collector;
      stream.pipe(collector);
      stream.on("error", (err) => {
        collector.end();
        reject(err);
      });
      collector.on("error", reject);
      collector.on("finish", function() {
        const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
        resolve3(bytes);
      });
    });
  };
  var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
  var sdkStreamMixin = (stream) => {
    if (!(stream instanceof Readable2)) {
      try {
        return sdkStreamMixin$1(stream);
      } catch (e) {
        const name = stream?.__proto__?.constructor?.name || stream;
        throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
      }
    }
    let transformed = false;
    const transformToByteArray = async () => {
      if (transformed) {
        throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
      }
      transformed = true;
      return await streamCollector(stream);
    };
    return Object.assign(stream, {
      transformToByteArray,
      transformToString: async (encoding) => {
        const buf = await transformToByteArray();
        if (encoding === undefined || Buffer.isEncoding(encoding)) {
          return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
        } else {
          const decoder = new TextDecoder(encoding);
          return decoder.decode(buf);
        }
      },
      transformToWebStream: () => {
        if (transformed) {
          throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
        }
        if (stream.readableFlowing !== null) {
          throw new Error("The stream has been consumed by other callbacks.");
        }
        if (typeof Readable2.toWeb !== "function") {
          throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
        }
        transformed = true;
        return Readable2.toWeb(stream);
      }
    });
  };
  async function splitStream$1(stream) {
    if (typeof stream.stream === "function") {
      stream = stream.stream();
    }
    const readableStream = stream;
    return readableStream.tee();
  }
  async function splitStream(stream) {
    if (isReadableStream(stream) || isBlob(stream)) {
      return splitStream$1(stream);
    }
    const stream1 = new PassThrough;
    const stream2 = new PassThrough;
    stream.pipe(stream1);
    stream.pipe(stream2);
    return [stream1, stream2];
  }

  class Uint8ArrayBlobAdapter extends bindUint8ArrayBlobAdapter(toUtf8$1, fromUtf8$1, toBase64$1, fromBase64$1) {
  }
  var _getRandomValues = getRandomValues;
  var v4 = bindV4(_getRandomValues);
  var generateIdempotencyToken = v4;
  exports.ChecksumStream = ChecksumStream$1;
  exports.Hash = Hash;
  exports.LazyJsonString = LazyJsonString;
  exports.NumericValue = NumericValue;
  exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter;
  exports._parseEpochTimestamp = _parseEpochTimestamp;
  exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset;
  exports._parseRfc7231DateTime = _parseRfc7231DateTime;
  exports.calculateBodyLength = calculateBodyLength;
  exports.copyDocumentWithTransform = copyDocumentWithTransform;
  exports.createBufferedReadable = createBufferedReadable;
  exports.createChecksumStream = createChecksumStream;
  exports.dateToUtcString = dateToUtcString;
  exports.deserializerMiddleware = deserializerMiddleware;
  exports.deserializerMiddlewareOption = deserializerMiddlewareOption;
  exports.expectBoolean = expectBoolean;
  exports.expectByte = expectByte;
  exports.expectFloat32 = expectFloat32;
  exports.expectInt = expectInt;
  exports.expectInt32 = expectInt32;
  exports.expectLong = expectLong;
  exports.expectNonNull = expectNonNull;
  exports.expectNumber = expectNumber;
  exports.expectObject = expectObject;
  exports.expectShort = expectShort;
  exports.expectString = expectString;
  exports.expectUnion = expectUnion;
  exports.fromArrayBuffer = fromArrayBuffer;
  exports.fromBase64 = fromBase64$1;
  exports.fromHex = fromHex;
  exports.fromString = fromString;
  exports.fromUtf8 = fromUtf8$1;
  exports.generateIdempotencyToken = generateIdempotencyToken;
  exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
  exports.getSerdePlugin = getSerdePlugin;
  exports.handleFloat = handleFloat;
  exports.headStream = headStream;
  exports.isArrayBuffer = isArrayBuffer;
  exports.isBlob = isBlob;
  exports.isReadableStream = isReadableStream;
  exports.limitedParseDouble = limitedParseDouble;
  exports.limitedParseFloat = limitedParseFloat;
  exports.limitedParseFloat32 = limitedParseFloat32;
  exports.logger = logger;
  exports.nv = nv;
  exports.parseBoolean = parseBoolean;
  exports.parseEpochTimestamp = parseEpochTimestamp;
  exports.parseRfc3339DateTime = parseRfc3339DateTime;
  exports.parseRfc3339DateTimeWithOffset = parseRfc3339DateTimeWithOffset;
  exports.parseRfc7231DateTime = parseRfc7231DateTime;
  exports.quoteHeader = quoteHeader;
  exports.sdkStreamMixin = sdkStreamMixin;
  exports.serializerMiddleware = serializerMiddleware;
  exports.serializerMiddlewareOption = serializerMiddlewareOption;
  exports.splitEvery = splitEvery;
  exports.splitHeader = splitHeader;
  exports.splitStream = splitStream;
  exports.strictParseByte = strictParseByte;
  exports.strictParseDouble = strictParseDouble;
  exports.strictParseFloat = strictParseFloat;
  exports.strictParseFloat32 = strictParseFloat32;
  exports.strictParseInt = strictParseInt;
  exports.strictParseInt32 = strictParseInt32;
  exports.strictParseLong = strictParseLong;
  exports.strictParseShort = strictParseShort;
  exports.toBase64 = toBase64$1;
  exports.toHex = toHex;
  exports.toUint8Array = toUint8Array;
  exports.toUtf8 = toUtf8$1;
  exports.v4 = v4;
});

// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.js
var require_tslib = __commonJS((exports, module) => {
  var __extends;
  var __assign;
  var __rest;
  var __decorate;
  var __param;
  var __esDecorate;
  var __runInitializers;
  var __propKey;
  var __setFunctionName;
  var __metadata;
  var __awaiter;
  var __generator;
  var __exportStar;
  var __values;
  var __read;
  var __spread;
  var __spreadArrays;
  var __spreadArray;
  var __await;
  var __asyncGenerator;
  var __asyncDelegator;
  var __asyncValues;
  var __makeTemplateObject;
  var __importStar;
  var __importDefault;
  var __classPrivateFieldGet;
  var __classPrivateFieldSet;
  var __classPrivateFieldIn;
  var __createBinding;
  var __addDisposableResource;
  var __disposeResources;
  var __rewriteRelativeImportExtension;
  (function(factory) {
    var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
    if (typeof define === "function" && define.amd) {
      define("tslib", ["exports"], function(exports2) {
        factory(createExporter(root, createExporter(exports2)));
      });
    } else if (typeof module === "object" && typeof exports === "object") {
      factory(createExporter(root, createExporter(exports)));
    } else {
      factory(createExporter(root));
    }
    function createExporter(exports2, previous) {
      if (exports2 !== root) {
        if (typeof Object.create === "function") {
          Object.defineProperty(exports2, "__esModule", { value: true });
        } else {
          exports2.__esModule = true;
        }
      }
      return function(id, v) {
        return exports2[id] = previous ? previous(id, v) : v;
      };
    }
  })(function(exporter) {
    var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
      d.__proto__ = b;
    } || function(d, b) {
      for (var p in b)
        if (Object.prototype.hasOwnProperty.call(b, p))
          d[p] = b[p];
    };
    __extends = function(d, b) {
      if (typeof b !== "function" && b !== null)
        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
      extendStatics(d, b);
      function __() {
        this.constructor = d;
      }
      d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
    };
    __assign = Object.assign || function(t) {
      for (var s, i = 1, n = arguments.length;i < n; i++) {
        s = arguments[i];
        for (var p in s)
          if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
      }
      return t;
    };
    __rest = function(s, e) {
      var t = {};
      for (var p in s)
        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
          t[p] = s[p];
      if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
            t[p[i]] = s[p[i]];
        }
      return t;
    };
    __decorate = function(decorators, target, key, desc2) {
      var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
      if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
        r = Reflect.decorate(decorators, target, key, desc2);
      else
        for (var i = decorators.length - 1;i >= 0; i--)
          if (d = decorators[i])
            r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
      return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    __param = function(paramIndex, decorator) {
      return function(target, key) {
        decorator(target, key, paramIndex);
      };
    };
    __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== undefined && typeof f !== "function")
          throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1;i >= 0; i--) {
        var context10 = {};
        for (var p in contextIn)
          context10[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access)
          context10.access[p] = contextIn.access[p];
        context10.addInitializer = function(f) {
          if (done)
            throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context10);
        if (kind === "accessor") {
          if (result === undefined)
            continue;
          if (result === null || typeof result !== "object")
            throw new TypeError("Object expected");
          if (_ = accept(result.get))
            descriptor.get = _;
          if (_ = accept(result.set))
            descriptor.set = _;
          if (_ = accept(result.init))
            initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field")
            initializers.unshift(_);
          else
            descriptor[key] = _;
        }
      }
      if (target)
        Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    __runInitializers = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0;i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : undefined;
    };
    __propKey = function(x) {
      return typeof x === "symbol" ? x : "".concat(x);
    };
    __setFunctionName = function(f, name, prefix) {
      if (typeof name === "symbol")
        name = name.description ? "[".concat(name.description, "]") : "";
      return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
    };
    __metadata = function(metadataKey, metadataValue) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
        return Reflect.metadata(metadataKey, metadataValue);
    };
    __awaiter = function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve3) {
          resolve3(value);
        });
      }
      return new (P || (P = Promise))(function(resolve3, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    __generator = function(thisArg, body) {
      var _ = { label: 0, sent: function() {
        if (t[0] & 1)
          throw t[1];
        return t[1];
      }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
      return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([n, v]);
        };
      }
      function step(op) {
        if (f)
          throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _)
          try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
              return t;
            if (y = 0, t)
              op = [op[0] & 2, t.value];
            switch (op[0]) {
              case 0:
              case 1:
                t = op;
                break;
              case 4:
                _.label++;
                return { value: op[1], done: false };
              case 5:
                _.label++;
                y = op[1];
                op = [0];
                continue;
              case 7:
                op = _.ops.pop();
                _.trys.pop();
                continue;
              default:
                if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                  _ = 0;
                  continue;
                }
                if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                  _.label = op[1];
                  break;
                }
                if (op[0] === 6 && _.label < t[1]) {
                  _.label = t[1];
                  t = op;
                  break;
                }
                if (t && _.label < t[2]) {
                  _.label = t[2];
                  _.ops.push(op);
                  break;
                }
                if (t[2])
                  _.ops.pop();
                _.trys.pop();
                continue;
            }
            op = body.call(thisArg, _);
          } catch (e) {
            op = [6, e];
            y = 0;
          } finally {
            f = t = 0;
          }
        if (op[0] & 5)
          throw op[1];
        return { value: op[0] ? op[1] : undefined, done: true };
      }
    };
    __exportStar = function(m, o) {
      for (var p in m)
        if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
          __createBinding(o, m, p);
    };
    __createBinding = Object.create ? function(o, m, k, k2) {
      if (k2 === undefined)
        k2 = k;
      var desc2 = Object.getOwnPropertyDescriptor(m, k);
      if (!desc2 || ("get" in desc2 ? !m.__esModule : desc2.writable || desc2.configurable)) {
        desc2 = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc2);
    } : function(o, m, k, k2) {
      if (k2 === undefined)
        k2 = k;
      o[k2] = m[k];
    };
    __values = function(o) {
      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
      if (m)
        return m.call(o);
      if (o && typeof o.length === "number")
        return {
          next: function() {
            if (o && i >= o.length)
              o = undefined;
            return { value: o && o[i++], done: !o };
          }
        };
      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    };
    __read = function(o, n) {
      var m = typeof Symbol === "function" && o[Symbol.iterator];
      if (!m)
        return o;
      var i = m.call(o), r, ar = [], e;
      try {
        while ((n === undefined || n-- > 0) && !(r = i.next()).done)
          ar.push(r.value);
      } catch (error2) {
        e = { error: error2 };
      } finally {
        try {
          if (r && !r.done && (m = i["return"]))
            m.call(i);
        } finally {
          if (e)
            throw e.error;
        }
      }
      return ar;
    };
    __spread = function() {
      for (var ar = [], i = 0;i < arguments.length; i++)
        ar = ar.concat(__read(arguments[i]));
      return ar;
    };
    __spreadArrays = function() {
      for (var s = 0, i = 0, il = arguments.length;i < il; i++)
        s += arguments[i].length;
      for (var r = Array(s), k = 0, i = 0;i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
          r[k] = a[j];
      return r;
    };
    __spreadArray = function(to, from, pack) {
      if (pack || arguments.length === 2)
        for (var i = 0, l = from.length, ar;i < l; i++) {
          if (ar || !(i in from)) {
            if (!ar)
              ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
          }
        }
      return to.concat(ar || Array.prototype.slice.call(from));
    };
    __await = function(v) {
      return this instanceof __await ? (this.v = v, this) : new __await(v);
    };
    __asyncGenerator = function(thisArg, _arguments, generator) {
      if (!Symbol.asyncIterator)
        throw new TypeError("Symbol.asyncIterator is not defined.");
      var g = generator.apply(thisArg, _arguments || []), i, q = [];
      return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
        return this;
      }, i;
      function awaitReturn(f) {
        return function(v) {
          return Promise.resolve(v).then(f, reject);
        };
      }
      function verb(n, f) {
        if (g[n]) {
          i[n] = function(v) {
            return new Promise(function(a, b) {
              q.push([n, v, a, b]) > 1 || resume2(n, v);
            });
          };
          if (f)
            i[n] = f(i[n]);
        }
      }
      function resume2(n, v) {
        try {
          step(g[n](v));
        } catch (e) {
          settle(q[0][3], e);
        }
      }
      function step(r) {
        r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
      }
      function fulfill(value) {
        resume2("next", value);
      }
      function reject(value) {
        resume2("throw", value);
      }
      function settle(f, v) {
        if (f(v), q.shift(), q.length)
          resume2(q[0][0], q[0][1]);
      }
    };
    __asyncDelegator = function(o) {
      var i, p;
      return i = {}, verb("next"), verb("throw", function(e) {
        throw e;
      }), verb("return"), i[Symbol.iterator] = function() {
        return this;
      }, i;
      function verb(n, f) {
        i[n] = o[n] ? function(v) {
          return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
        } : f;
      }
    };
    __asyncValues = function(o) {
      if (!Symbol.asyncIterator)
        throw new TypeError("Symbol.asyncIterator is not defined.");
      var m = o[Symbol.asyncIterator], i;
      return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
        return this;
      }, i);
      function verb(n) {
        i[n] = o[n] && function(v) {
          return new Promise(function(resolve3, reject) {
            v = o[n](v), settle(resolve3, reject, v.done, v.value);
          });
        };
      }
      function settle(resolve3, reject, d, v) {
        Promise.resolve(v).then(function(v2) {
          resolve3({ value: v2, done: d });
        }, reject);
      }
    };
    __makeTemplateObject = function(cooked, raw) {
      if (Object.defineProperty) {
        Object.defineProperty(cooked, "raw", { value: raw });
      } else {
        cooked.raw = raw;
      }
      return cooked;
    };
    var __setModuleDefault = Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    };
    var ownKeys = function(o) {
      ownKeys = Object.getOwnPropertyNames || function(o2) {
        var ar = [];
        for (var k in o2)
          if (Object.prototype.hasOwnProperty.call(o2, k))
            ar[ar.length] = k;
        return ar;
      };
      return ownKeys(o);
    };
    __importStar = function(mod) {
      if (mod && mod.__esModule)
        return mod;
      var result = {};
      if (mod != null) {
        for (var k = ownKeys(mod), i = 0;i < k.length; i++)
          if (k[i] !== "default")
            __createBinding(result, mod, k[i]);
      }
      __setModuleDefault(result, mod);
      return result;
    };
    __importDefault = function(mod) {
      return mod && mod.__esModule ? mod : { default: mod };
    };
    __classPrivateFieldGet = function(receiver, state, kind, f) {
      if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a getter");
      if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot read private member from an object whose class did not declare it");
      return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
    };
    __classPrivateFieldSet = function(receiver, state, value, kind, f) {
      if (kind === "m")
        throw new TypeError("Private method is not writable");
      if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a setter");
      if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot write private member to an object whose class did not declare it");
      return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
    };
    __classPrivateFieldIn = function(state, receiver) {
      if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
        throw new TypeError("Cannot use 'in' operator on non-object");
      return typeof state === "function" ? receiver === state : state.has(receiver);
    };
    __addDisposableResource = function(env2, value, async) {
      if (value !== null && value !== undefined) {
        if (typeof value !== "object" && typeof value !== "function")
          throw new TypeError("Object expected.");
        var dispose, inner;
        if (async) {
          if (!Symbol.asyncDispose)
            throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === undefined) {
          if (!Symbol.dispose)
            throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async)
            inner = dispose;
        }
        if (typeof dispose !== "function")
          throw new TypeError("Object not disposable.");
        if (inner)
          dispose = function() {
            try {
              inner.call(this);
            } catch (e) {
              return Promise.reject(e);
            }
          };
        env2.stack.push({ value, dispose, async });
      } else if (async) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error2, e.suppressed = suppressed, e;
    };
    __disposeResources = function(env2) {
      function fail(e) {
        env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
        env2.hasError = true;
      }
      var r, s = 0;
      function next() {
        while (r = env2.stack.pop()) {
          try {
            if (!r.async && s === 1)
              return s = 0, env2.stack.push(r), Promise.resolve().then(next);
            if (r.dispose) {
              var result = r.dispose.call(r.value);
              if (r.async)
                return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
            } else
              s |= 1;
          } catch (e) {
            fail(e);
          }
        }
        if (s === 1)
          return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
        if (env2.hasError)
          throw env2.error;
      }
      return next();
    };
    __rewriteRelativeImportExtension = function(path2, preserveJsx) {
      if (typeof path2 === "string" && /^\.\.?\//.test(path2)) {
        return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
          return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
        });
      }
      return path2;
    };
    exporter("__extends", __extends);
    exporter("__assign", __assign);
    exporter("__rest", __rest);
    exporter("__decorate", __decorate);
    exporter("__param", __param);
    exporter("__esDecorate", __esDecorate);
    exporter("__runInitializers", __runInitializers);
    exporter("__propKey", __propKey);
    exporter("__setFunctionName", __setFunctionName);
    exporter("__metadata", __metadata);
    exporter("__awaiter", __awaiter);
    exporter("__generator", __generator);
    exporter("__exportStar", __exportStar);
    exporter("__createBinding", __createBinding);
    exporter("__values", __values);
    exporter("__read", __read);
    exporter("__spread", __spread);
    exporter("__spreadArrays", __spreadArrays);
    exporter("__spreadArray", __spreadArray);
    exporter("__await", __await);
    exporter("__asyncGenerator", __asyncGenerator);
    exporter("__asyncDelegator", __asyncDelegator);
    exporter("__asyncValues", __asyncValues);
    exporter("__makeTemplateObject", __makeTemplateObject);
    exporter("__importStar", __importStar);
    exporter("__importDefault", __importDefault);
    exporter("__classPrivateFieldGet", __classPrivateFieldGet);
    exporter("__classPrivateFieldSet", __classPrivateFieldSet);
    exporter("__classPrivateFieldIn", __classPrivateFieldIn);
    exporter("__addDisposableResource", __addDisposableResource);
    exporter("__disposeResources", __disposeResources);
    exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
  });
});

// ../../node_modules/.pnpm/@smithy+is-array-buffer@2.2.0/node_modules/@smithy/is-array-buffer/dist-cjs/index.js
var require_dist_cjs2 = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var src_exports = {};
  __export3(src_exports, {
    isArrayBuffer: () => isArrayBuffer
  });
  module.exports = __toCommonJS(src_exports);
  var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer");
});

// ../../node_modules/.pnpm/@smithy+util-buffer-from@2.2.0/node_modules/@smithy/util-buffer-from/dist-cjs/index.js
var require_dist_cjs3 = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var src_exports = {};
  __export3(src_exports, {
    fromArrayBuffer: () => fromArrayBuffer,
    fromString: () => fromString
  });
  module.exports = __toCommonJS(src_exports);
  var import_is_array_buffer = require_dist_cjs2();
  var import_buffer = __require("buffer");
  var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {
    if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {
      throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
    }
    return import_buffer.Buffer.from(input, offset, length);
  }, "fromArrayBuffer");
  var fromString = /* @__PURE__ */ __name((input, encoding) => {
    if (typeof input !== "string") {
      throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
    }
    return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);
  }, "fromString");
});

// ../../node_modules/.pnpm/@smithy+util-utf8@2.3.0/node_modules/@smithy/util-utf8/dist-cjs/index.js
var require_dist_cjs4 = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var src_exports = {};
  __export3(src_exports, {
    fromUtf8: () => fromUtf8,
    toUint8Array: () => toUint8Array,
    toUtf8: () => toUtf8
  });
  module.exports = __toCommonJS(src_exports);
  var import_util_buffer_from = require_dist_cjs3();
  var fromUtf8 = /* @__PURE__ */ __name((input) => {
    const buf = (0, import_util_buffer_from.fromString)(input, "utf8");
    return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
  }, "fromUtf8");
  var toUint8Array = /* @__PURE__ */ __name((data) => {
    if (typeof data === "string") {
      return fromUtf8(data);
    }
    if (ArrayBuffer.isView(data)) {
      return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
    }
    return new Uint8Array(data);
  }, "toUint8Array");
  var toUtf8 = /* @__PURE__ */ __name((input) => {
    if (typeof input === "string") {
      return input;
    }
    if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
      throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
    }
    return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
  }, "toUtf8");
});

// ../../node_modules/.pnpm/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/convertToBuffer.js
var require_convertToBuffer = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.convertToBuffer = undefined;
  var util_utf8_1 = require_dist_cjs4();
  var fromUtf8 = typeof Buffer !== "undefined" && Buffer.from ? function(input) {
    return Buffer.from(input, "utf8");
  } : util_utf8_1.fromUtf8;
  function convertToBuffer(data) {
    if (data instanceof Uint8Array)
      return data;
    if (typeof data === "string") {
      return fromUtf8(data);
    }
    if (ArrayBuffer.isView(data)) {
      return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
    }
    return new Uint8Array(data);
  }
  exports.convertToBuffer = convertToBuffer;
});

// ../../node_modules/.pnpm/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/isEmptyData.js
var require_isEmptyData = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isEmptyData = undefined;
  function isEmptyData(data) {
    if (typeof data === "string") {
      return data.length === 0;
    }
    return data.byteLength === 0;
  }
  exports.isEmptyData = isEmptyData;
});

// ../../node_modules/.pnpm/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/numToUint8.js
var require_numToUint8 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.numToUint8 = undefined;
  function numToUint8(num) {
    return new Uint8Array([
      (num & 4278190080) >> 24,
      (num & 16711680) >> 16,
      (num & 65280) >> 8,
      num & 255
    ]);
  }
  exports.numToUint8 = numToUint8;
});

// ../../node_modules/.pnpm/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js
var require_uint32ArrayFrom = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.uint32ArrayFrom = undefined;
  function uint32ArrayFrom(a_lookUpTable) {
    if (!Uint32Array.from) {
      var return_array = new Uint32Array(a_lookUpTable.length);
      var a_index = 0;
      while (a_index < a_lookUpTable.length) {
        return_array[a_index] = a_lookUpTable[a_index];
        a_index += 1;
      }
      return return_array;
    }
    return Uint32Array.from(a_lookUpTable);
  }
  exports.uint32ArrayFrom = uint32ArrayFrom;
});

// ../../node_modules/.pnpm/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/index.js
var require_main = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = undefined;
  var convertToBuffer_1 = require_convertToBuffer();
  Object.defineProperty(exports, "convertToBuffer", { enumerable: true, get: function() {
    return convertToBuffer_1.convertToBuffer;
  } });
  var isEmptyData_1 = require_isEmptyData();
  Object.defineProperty(exports, "isEmptyData", { enumerable: true, get: function() {
    return isEmptyData_1.isEmptyData;
  } });
  var numToUint8_1 = require_numToUint8();
  Object.defineProperty(exports, "numToUint8", { enumerable: true, get: function() {
    return numToUint8_1.numToUint8;
  } });
  var uint32ArrayFrom_1 = require_uint32ArrayFrom();
  Object.defineProperty(exports, "uint32ArrayFrom", { enumerable: true, get: function() {
    return uint32ArrayFrom_1.uint32ArrayFrom;
  } });
});

// ../../node_modules/.pnpm/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js
var require_aws_crc32 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AwsCrc32 = undefined;
  var tslib_1 = require_tslib();
  var util_1 = require_main();
  var index_1 = require_main2();
  var AwsCrc32 = function() {
    function AwsCrc322() {
      this.crc32 = new index_1.Crc32;
    }
    AwsCrc322.prototype.update = function(toHash) {
      if ((0, util_1.isEmptyData)(toHash))
        return;
      this.crc32.update((0, util_1.convertToBuffer)(toHash));
    };
    AwsCrc322.prototype.digest = function() {
      return tslib_1.__awaiter(this, undefined, undefined, function() {
        return tslib_1.__generator(this, function(_a) {
          return [2, (0, util_1.numToUint8)(this.crc32.digest())];
        });
      });
    };
    AwsCrc322.prototype.reset = function() {
      this.crc32 = new index_1.Crc32;
    };
    return AwsCrc322;
  }();
  exports.AwsCrc32 = AwsCrc32;
});

// ../../node_modules/.pnpm/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/index.js
var require_main2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AwsCrc32 = exports.Crc32 = exports.crc32 = undefined;
  var tslib_1 = require_tslib();
  var util_1 = require_main();
  function crc32(data) {
    return new Crc32().update(data).digest();
  }
  exports.crc32 = crc32;
  var Crc32 = function() {
    function Crc322() {
      this.checksum = 4294967295;
    }
    Crc322.prototype.update = function(data) {
      var e_1, _a;
      try {
        for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next();!data_1_1.done; data_1_1 = data_1.next()) {
          var byte = data_1_1.value;
          this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255];
        }
      } catch (e_1_1) {
        e_1 = { error: e_1_1 };
      } finally {
        try {
          if (data_1_1 && !data_1_1.done && (_a = data_1.return))
            _a.call(data_1);
        } finally {
          if (e_1)
            throw e_1.error;
        }
      }
      return this;
    };
    Crc322.prototype.digest = function() {
      return (this.checksum ^ 4294967295) >>> 0;
    };
    return Crc322;
  }();
  exports.Crc32 = Crc32;
  var a_lookUpTable = [
    0,
    1996959894,
    3993919788,
    2567524794,
    124634137,
    1886057615,
    3915621685,
    2657392035,
    249268274,
    2044508324,
    3772115230,
    2547177864,
    162941995,
    2125561021,
    3887607047,
    2428444049,
    498536548,
    1789927666,
    4089016648,
    2227061214,
    450548861,
    1843258603,
    4107580753,
    2211677639,
    325883990,
    1684777152,
    4251122042,
    2321926636,
    335633487,
    1661365465,
    4195302755,
    2366115317,
    997073096,
    1281953886,
    3579855332,
    2724688242,
    1006888145,
    1258607687,
    3524101629,
    2768942443,
    901097722,
    1119000684,
    3686517206,
    2898065728,
    853044451,
    1172266101,
    3705015759,
    2882616665,
    651767980,
    1373503546,
    3369554304,
    3218104598,
    565507253,
    1454621731,
    3485111705,
    3099436303,
    671266974,
    1594198024,
    3322730930,
    2970347812,
    795835527,
    1483230225,
    3244367275,
    3060149565,
    1994146192,
    31158534,
    2563907772,
    4023717930,
    1907459465,
    112637215,
    2680153253,
    3904427059,
    2013776290,
    251722036,
    2517215374,
    3775830040,
    2137656763,
    141376813,
    2439277719,
    3865271297,
    1802195444,
    476864866,
    2238001368,
    4066508878,
    1812370925,
    453092731,
    2181625025,
    4111451223,
    1706088902,
    314042704,
    2344532202,
    4240017532,
    1658658271,
    366619977,
    2362670323,
    4224994405,
    1303535960,
    984961486,
    2747007092,
    3569037538,
    1256170817,
    1037604311,
    2765210733,
    3554079995,
    1131014506,
    879679996,
    2909243462,
    3663771856,
    1141124467,
    855842277,
    2852801631,
    3708648649,
    1342533948,
    654459306,
    3188396048,
    3373015174,
    1466479909,
    544179635,
    3110523913,
    3462522015,
    1591671054,
    702138776,
    2966460450,
    3352799412,
    1504918807,
    783551873,
    3082640443,
    3233442989,
    3988292384,
    2596254646,
    62317068,
    1957810842,
    3939845945,
    2647816111,
    81470997,
    1943803523,
    3814918930,
    2489596804,
    225274430,
    2053790376,
    3826175755,
    2466906013,
    167816743,
    2097651377,
    4027552580,
    2265490386,
    503444072,
    1762050814,
    4150417245,
    2154129355,
    426522225,
    1852507879,
    4275313526,
    2312317920,
    282753626,
    1742555852,
    4189708143,
    2394877945,
    397917763,
    1622183637,
    3604390888,
    2714866558,
    953729732,
    1340076626,
    3518719985,
    2797360999,
    1068828381,
    1219638859,
    3624741850,
    2936675148,
    906185462,
    1090812512,
    3747672003,
    2825379669,
    829329135,
    1181335161,
    3412177804,
    3160834842,
    628085408,
    1382605366,
    3423369109,
    3138078467,
    570562233,
    1426400815,
    3317316542,
    2998733608,
    733239954,
    1555261956,
    3268935591,
    3050360625,
    752459403,
    1541320221,
    2607071920,
    3965973030,
    1969922972,
    40735498,
    2617837225,
    3943577151,
    1913087877,
    83908371,
    2512341634,
    3803740692,
    2075208622,
    213261112,
    2463272603,
    3855990285,
    2094854071,
    198958881,
    2262029012,
    4057260610,
    1759359992,
    534414190,
    2176718541,
    4139329115,
    1873836001,
    414664567,
    2282248934,
    4279200368,
    1711684554,
    285281116,
    2405801727,
    4167216745,
    1634467795,
    376229701,
    2685067896,
    3608007406,
    1308918612,
    956543938,
    2808555105,
    3495958263,
    1231636301,
    1047427035,
    2932959818,
    3654703836,
    1088359270,
    936918000,
    2847714899,
    3736837829,
    1202900863,
    817233897,
    3183342108,
    3401237130,
    1404277552,
    615818150,
    3134207493,
    3453421203,
    1423857449,
    601450431,
    3009837614,
    3294710456,
    1567103746,
    711928724,
    3020668471,
    3272380065,
    1510334235,
    755167117
  ];
  var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);
  var aws_crc32_1 = require_aws_crc32();
  Object.defineProperty(exports, "AwsCrc32", { enumerable: true, get: function() {
    return aws_crc32_1.AwsCrc32;
  } });
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js
var require_event_streams = __commonJS((exports) => {
  var { Crc32 } = require_main2();
  var { toHex, fromHex, toUtf8, fromUtf8 } = require_serde();
  var { Readable: Readable2 } = __require("node:stream");

  class Int64 {
    bytes;
    constructor(bytes) {
      this.bytes = bytes;
      if (bytes.byteLength !== 8) {
        throw new Error("Int64 buffers must be exactly 8 bytes");
      }
    }
    static fromNumber(number) {
      if (number > 9223372036854776000 || number < -9223372036854776000) {
        throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
      }
      const bytes = new Uint8Array(8);
      for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
        bytes[i] = remaining;
      }
      if (number < 0) {
        negate(bytes);
      }
      return new Int64(bytes);
    }
    valueOf() {
      const bytes = this.bytes.slice(0);
      const negative = bytes[0] & 128;
      if (negative) {
        negate(bytes);
      }
      return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);
    }
    toString() {
      return String(this.valueOf());
    }
  }
  function negate(bytes) {
    for (let i = 0;i < 8; i++) {
      bytes[i] ^= 255;
    }
    for (let i = 7;i > -1; i--) {
      bytes[i]++;
      if (bytes[i] !== 0)
        break;
    }
  }

  class HeaderMarshaller {
    toUtf8;
    fromUtf8;
    constructor(toUtf82, fromUtf82) {
      this.toUtf8 = toUtf82;
      this.fromUtf8 = fromUtf82;
    }
    format(headers) {
      const chunks = [];
      for (const headerName of Object.keys(headers)) {
        const bytes = this.fromUtf8(headerName);
        chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
      }
      const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
      let position = 0;
      for (const chunk of chunks) {
        out.set(chunk, position);
        position += chunk.byteLength;
      }
      return out;
    }
    formatHeaderValue(header) {
      switch (header.type) {
        case "boolean":
          return Uint8Array.from([header.value ? 0 : 1]);
        case "byte":
          return Uint8Array.from([2, header.value]);
        case "short":
          const shortView = new DataView(new ArrayBuffer(3));
          shortView.setUint8(0, 3);
          shortView.setInt16(1, header.value, false);
          return new Uint8Array(shortView.buffer);
        case "integer":
          const intView = new DataView(new ArrayBuffer(5));
          intView.setUint8(0, 4);
          intView.setInt32(1, header.value, false);
          return new Uint8Array(intView.buffer);
        case "long":
          const longBytes = new Uint8Array(9);
          longBytes[0] = 5;
          longBytes.set(header.value.bytes, 1);
          return longBytes;
        case "binary":
          const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
          binView.setUint8(0, 6);
          binView.setUint16(1, header.value.byteLength, false);
          const binBytes = new Uint8Array(binView.buffer);
          binBytes.set(header.value, 3);
          return binBytes;
        case "string":
          const utf8Bytes = this.fromUtf8(header.value);
          const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
          strView.setUint8(0, 7);
          strView.setUint16(1, utf8Bytes.byteLength, false);
          const strBytes = new Uint8Array(strView.buffer);
          strBytes.set(utf8Bytes, 3);
          return strBytes;
        case "timestamp":
          const tsBytes = new Uint8Array(9);
          tsBytes[0] = 8;
          tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
          return tsBytes;
        case "uuid":
          if (!UUID_PATTERN.test(header.value)) {
            throw new Error(`Invalid UUID received: ${header.value}`);
          }
          const uuidBytes = new Uint8Array(17);
          uuidBytes[0] = 9;
          uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1);
          return uuidBytes;
      }
    }
    parse(headers) {
      const out = {};
      let position = 0;
      while (position < headers.byteLength) {
        const nameLength = headers.getUint8(position++);
        const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));
        position += nameLength;
        switch (headers.getUint8(position++)) {
          case 0:
            out[name] = {
              type: BOOLEAN_TAG,
              value: true
            };
            break;
          case 1:
            out[name] = {
              type: BOOLEAN_TAG,
              value: false
            };
            break;
          case 2:
            out[name] = {
              type: BYTE_TAG,
              value: headers.getInt8(position++)
            };
            break;
          case 3:
            out[name] = {
              type: SHORT_TAG,
              value: headers.getInt16(position, false)
            };
            position += 2;
            break;
          case 4:
            out[name] = {
              type: INT_TAG,
              value: headers.getInt32(position, false)
            };
            position += 4;
            break;
          case 5:
            out[name] = {
              type: LONG_TAG,
              value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))
            };
            position += 8;
            break;
          case 6:
            const binaryLength = headers.getUint16(position, false);
            position += 2;
            out[name] = {
              type: BINARY_TAG,
              value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength)
            };
            position += binaryLength;
            break;
          case 7:
            const stringLength = headers.getUint16(position, false);
            position += 2;
            out[name] = {
              type: STRING_TAG,
              value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength))
            };
            position += stringLength;
            break;
          case 8:
            out[name] = {
              type: TIMESTAMP_TAG,
              value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())
            };
            position += 8;
            break;
          case 9:
            const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);
            position += 16;
            out[name] = {
              type: UUID_TAG,
              value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`
            };
            break;
          default:
            throw new Error(`Unrecognized header type tag`);
        }
      }
      return out;
    }
  }
  var HEADER_VALUE_TYPE;
  (function(HEADER_VALUE_TYPE2) {
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid";
  })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
  var BOOLEAN_TAG = "boolean";
  var BYTE_TAG = "byte";
  var SHORT_TAG = "short";
  var INT_TAG = "integer";
  var LONG_TAG = "long";
  var BINARY_TAG = "binary";
  var STRING_TAG = "string";
  var TIMESTAMP_TAG = "timestamp";
  var UUID_TAG = "uuid";
  var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
  var PRELUDE_MEMBER_LENGTH = 4;
  var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
  var CHECKSUM_LENGTH = 4;
  var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;
  function splitMessage({ byteLength, byteOffset, buffer }) {
    if (byteLength < MINIMUM_MESSAGE_LENGTH) {
      throw new Error("Provided message too short to accommodate event stream message overhead");
    }
    const view = new DataView(buffer, byteOffset, byteLength);
    const messageLength = view.getUint32(0, false);
    if (byteLength !== messageLength) {
      throw new Error("Reported message length does not match received message length");
    }
    const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);
    const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);
    const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);
    const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));
    if (expectedPreludeChecksum !== checksummer.digest()) {
      throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);
    }
    checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));
    if (expectedMessageChecksum !== checksummer.digest()) {
      throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);
    }
    return {
      headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),
      body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH))
    };
  }

  class EventStreamCodec {
    headerMarshaller;
    messageBuffer;
    isEndOfStream;
    constructor(toUtf82, fromUtf82) {
      this.headerMarshaller = new HeaderMarshaller(toUtf82, fromUtf82);
      this.messageBuffer = [];
      this.isEndOfStream = false;
    }
    feed(message) {
      this.messageBuffer.push(this.decode(message));
    }
    endOfStream() {
      this.isEndOfStream = true;
    }
    getMessage() {
      const message = this.messageBuffer.pop();
      const isEndOfStream = this.isEndOfStream;
      return {
        getMessage() {
          return message;
        },
        isEndOfStream() {
          return isEndOfStream;
        }
      };
    }
    getAvailableMessages() {
      const messages = this.messageBuffer;
      this.messageBuffer = [];
      const isEndOfStream = this.isEndOfStream;
      return {
        getMessages() {
          return messages;
        },
        isEndOfStream() {
          return isEndOfStream;
        }
      };
    }
    encode({ headers: rawHeaders, body }) {
      const headers = this.headerMarshaller.format(rawHeaders);
      const length = headers.byteLength + body.byteLength + 16;
      const out = new Uint8Array(length);
      const view = new DataView(out.buffer, out.byteOffset, out.byteLength);
      const checksum = new Crc32;
      view.setUint32(0, length, false);
      view.setUint32(4, headers.byteLength, false);
      view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);
      out.set(headers, 12);
      out.set(body, headers.byteLength + 12);
      view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);
      return out;
    }
    decode(message) {
      const { headers, body } = splitMessage(message);
      return { headers: this.headerMarshaller.parse(headers), body };
    }
    formatHeaders(rawHeaders) {
      return this.headerMarshaller.format(rawHeaders);
    }
  }

  class MessageDecoderStream {
    options;
    constructor(options) {
      this.options = options;
    }
    [Symbol.asyncIterator]() {
      return this.asyncIterator();
    }
    async* asyncIterator() {
      for await (const bytes of this.options.inputStream) {
        const decoded = this.options.decoder.decode(bytes);
        yield decoded;
      }
    }
  }

  class MessageEncoderStream {
    options;
    constructor(options) {
      this.options = options;
    }
    [Symbol.asyncIterator]() {
      return this.asyncIterator();
    }
    async* asyncIterator() {
      for await (const msg of this.options.messageStream) {
        const encoded = this.options.encoder.encode(msg);
        yield encoded;
      }
      if (this.options.includeEndFrame) {
        yield new Uint8Array(0);
      }
    }
  }

  class SmithyMessageDecoderStream {
    options;
    constructor(options) {
      this.options = options;
    }
    [Symbol.asyncIterator]() {
      return this.asyncIterator();
    }
    async* asyncIterator() {
      for await (const message of this.options.messageStream) {
        const deserialized = await this.options.deserializer(message);
        if (deserialized === undefined)
          continue;
        yield deserialized;
      }
    }
  }

  class SmithyMessageEncoderStream {
    options;
    constructor(options) {
      this.options = options;
    }
    [Symbol.asyncIterator]() {
      return this.asyncIterator();
    }
    async* asyncIterator() {
      for await (const chunk of this.options.inputStream) {
        const payloadBuf = this.options.serializer(chunk);
        yield payloadBuf;
      }
    }
  }
  function getChunkedStream(source) {
    let currentMessageTotalLength = 0;
    let currentMessagePendingLength = 0;
    let currentMessage = null;
    let messageLengthBuffer = null;
    const allocateMessage = (size) => {
      if (typeof size !== "number") {
        throw new Error("Attempted to allocate an event message where size was not a number: " + size);
      }
      currentMessageTotalLength = size;
      currentMessagePendingLength = 4;
      currentMessage = new Uint8Array(size);
      const currentMessageView = new DataView(currentMessage.buffer);
      currentMessageView.setUint32(0, size, false);
    };
    const iterator = async function* () {
      const sourceIterator = source[Symbol.asyncIterator]();
      while (true) {
        const { value, done } = await sourceIterator.next();
        if (done) {
          if (!currentMessageTotalLength) {
            return;
          } else if (currentMessageTotalLength === currentMessagePendingLength) {
            yield currentMessage;
          } else {
            throw new Error("Truncated event message received.");
          }
          return;
        }
        const chunkLength = value.length;
        let currentOffset = 0;
        while (currentOffset < chunkLength) {
          if (!currentMessage) {
            const bytesRemaining = chunkLength - currentOffset;
            if (!messageLengthBuffer) {
              messageLengthBuffer = new Uint8Array(4);
            }
            const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);
            messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);
            currentMessagePendingLength += numBytesForTotal;
            currentOffset += numBytesForTotal;
            if (currentMessagePendingLength < 4) {
              break;
            }
            allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));
            messageLengthBuffer = null;
          }
          const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);
          currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);
          currentMessagePendingLength += numBytesToWrite;
          currentOffset += numBytesToWrite;
          if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {
            yield currentMessage;
            currentMessage = null;
            currentMessageTotalLength = 0;
            currentMessagePendingLength = 0;
          }
        }
      }
    };
    return {
      [Symbol.asyncIterator]: iterator
    };
  }
  function getUnmarshalledStream(source, options) {
    const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);
    return {
      [Symbol.asyncIterator]: async function* () {
        for await (const chunk of source) {
          const message = options.eventStreamCodec.decode(chunk);
          const type2 = await messageUnmarshaller(message);
          if (type2 === undefined)
            continue;
          yield type2;
        }
      }
    };
  }
  function getMessageUnmarshaller(deserializer, toUtf82) {
    return async function(message) {
      const { value: messageType } = message.headers[":message-type"];
      if (messageType === "error") {
        const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError");
        unmodeledError.name = message.headers[":error-code"].value;
        throw unmodeledError;
      } else if (messageType === "exception") {
        const code = message.headers[":exception-type"].value;
        const exception = { [code]: message };
        const deserializedException = await deserializer(exception);
        if (deserializedException.$unknown) {
          const error2 = new Error(toUtf82(message.body));
          error2.name = code;
          throw error2;
        }
        throw deserializedException[code];
      } else if (messageType === "event") {
        const event = {
          [message.headers[":event-type"].value]: message
        };
        const deserialized = await deserializer(event);
        if (deserialized.$unknown)
          return;
        return deserialized;
      } else {
        throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`);
      }
    };
  }
  var EventStreamMarshaller$1 = class EventStreamMarshaller2 {
    eventStreamCodec;
    utfEncoder;
    constructor({ utf8Encoder, utf8Decoder }) {
      this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);
      this.utfEncoder = utf8Encoder;
    }
    deserialize(body, deserializer) {
      const inputStream = getChunkedStream(body);
      return new SmithyMessageDecoderStream({
        messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),
        deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder)
      });
    }
    serialize(inputStream, serializer) {
      return new MessageEncoderStream({
        messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),
        encoder: this.eventStreamCodec,
        includeEndFrame: true
      });
    }
  };
  var eventStreamSerdeProvider$1 = (options) => new EventStreamMarshaller$1(options);

  class EventStreamMarshaller {
    universalMarshaller;
    constructor({ utf8Encoder, utf8Decoder }) {
      this.universalMarshaller = new EventStreamMarshaller$1({
        utf8Decoder,
        utf8Encoder
      });
    }
    deserialize(body, deserializer) {
      const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readableToIterable(body);
      return this.universalMarshaller.deserialize(bodyIterable, deserializer);
    }
    serialize(input, serializer) {
      return Readable2.from(this.universalMarshaller.serialize(input, serializer));
    }
  }
  var eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);
  async function* readableToIterable(readStream) {
    let streamEnded = false;
    let generationEnded = false;
    const records = new Array;
    readStream.on("error", (err) => {
      if (!streamEnded) {
        streamEnded = true;
      }
      if (err) {
        throw err;
      }
    });
    readStream.on("data", (data) => {
      records.push(data);
    });
    readStream.on("end", () => {
      streamEnded = true;
    });
    while (!generationEnded) {
      const value = await new Promise((resolve3) => setTimeout(() => resolve3(records.shift()), 0));
      if (value) {
        yield value;
      }
      generationEnded = streamEnded && records.length === 0;
    }
  }
  var readableStreamToIterable = (readableStream) => ({
    [Symbol.asyncIterator]: async function* () {
      const reader = readableStream.getReader();
      try {
        while (true) {
          const { done, value } = await reader.read();
          if (done)
            return;
          yield value;
        }
      } finally {
        reader.releaseLock();
      }
    }
  });
  var iterableToReadableStream = (asyncIterable) => {
    const iterator = asyncIterable[Symbol.asyncIterator]();
    return new ReadableStream({
      async pull(controller) {
        const { done, value } = await iterator.next();
        if (done) {
          return controller.close();
        }
        controller.enqueue(value);
      }
    });
  };
  var resolveEventStreamSerdeConfig = (input) => Object.assign(input, {
    eventStreamMarshaller: input.eventStreamSerdeProvider(input)
  });

  class EventStreamSerde {
    marshaller;
    serializer;
    deserializer;
    serdeContext;
    defaultContentType;
    constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType }) {
      this.marshaller = marshaller;
      this.serializer = serializer;
      this.deserializer = deserializer;
      this.serdeContext = serdeContext;
      this.defaultContentType = defaultContentType;
    }
    async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
      const marshaller = this.marshaller;
      const eventStreamMember = requestSchema.getEventStreamMember();
      const unionSchema = requestSchema.getMemberSchema(eventStreamMember);
      const serializer = this.serializer;
      const defaultContentType = this.defaultContentType;
      const initialRequestMarker = Symbol("initialRequestMarker");
      const eventStreamIterable = {
        async* [Symbol.asyncIterator]() {
          if (initialRequest) {
            const headers = {
              ":event-type": { type: "string", value: "initial-request" },
              ":message-type": { type: "string", value: "event" },
              ":content-type": { type: "string", value: defaultContentType }
            };
            serializer.write(requestSchema, initialRequest);
            const body = serializer.flush();
            yield {
              [initialRequestMarker]: true,
              headers,
              body
            };
          }
          for await (const page of eventStream) {
            yield page;
          }
        }
      };
      return marshaller.serialize(eventStreamIterable, (event) => {
        if (event[initialRequestMarker]) {
          return {
            headers: event.headers,
            body: event.body
          };
        }
        let unionMember = "";
        for (const key in event) {
          if (key !== "__type") {
            unionMember = key;
            break;
          }
        }
        const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
        const headers = {
          ":event-type": { type: "string", value: eventType },
          ":message-type": { type: "string", value: "event" },
          ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType },
          ...additionalHeaders
        };
        return {
          headers,
          body
        };
      });
    }
    async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
      const marshaller = this.marshaller;
      const eventStreamMember = responseSchema.getEventStreamMember();
      const unionSchema = responseSchema.getMemberSchema(eventStreamMember);
      const memberSchemas = unionSchema.getMemberSchemas();
      const initialResponseMarker = Symbol("initialResponseMarker");
      const asyncIterable = marshaller.deserialize(response.body, async (event) => {
        let unionMember = "";
        for (const key in event) {
          if (key !== "__type") {
            unionMember = key;
            break;
          }
        }
        const body = event[unionMember].body;
        if (unionMember === "initial-response") {
          const dataObject = await this.deserializer.read(responseSchema, body);
          delete dataObject[eventStreamMember];
          return {
            [initialResponseMarker]: true,
            ...dataObject
          };
        } else if (unionMember in memberSchemas) {
          const eventStreamSchema = memberSchemas[unionMember];
          if (eventStreamSchema.isStructSchema()) {
            const out = {};
            let hasBindings = false;
            for (const [name, member2] of eventStreamSchema.structIterator()) {
              const { eventHeader, eventPayload } = member2.getMergedTraits();
              hasBindings = hasBindings || Boolean(eventHeader || eventPayload);
              if (eventPayload) {
                if (member2.isBlobSchema()) {
                  out[name] = body;
                } else if (member2.isStringSchema()) {
                  out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);
                } else if (member2.isStructSchema()) {
                  out[name] = await this.deserializer.read(member2, body);
                }
              } else if (eventHeader) {
                const value = event[unionMember].headers[name]?.value;
                if (value != null) {
                  if (member2.isNumericSchema()) {
                    if (value && typeof value === "object" && "bytes" in value) {
                      out[name] = BigInt(value.toString());
                    } else {
                      out[name] = Number(value);
                    }
                  } else {
                    out[name] = value;
                  }
                }
              }
            }
            if (hasBindings) {
              return {
                [unionMember]: out
              };
            }
            if (body.byteLength === 0) {
              return {
                [unionMember]: {}
              };
            }
          }
          return {
            [unionMember]: await this.deserializer.read(eventStreamSchema, body)
          };
        } else {
          return {
            $unknown: event
          };
        }
      });
      const asyncIterator = asyncIterable[Symbol.asyncIterator]();
      const firstEvent = await asyncIterator.next();
      if (firstEvent.done) {
        return asyncIterable;
      }
      if (firstEvent.value?.[initialResponseMarker]) {
        if (!responseSchema) {
          throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
        }
        for (const key in firstEvent.value) {
          initialResponseContainer[key] = firstEvent.value[key];
        }
      }
      return {
        async* [Symbol.asyncIterator]() {
          if (!firstEvent?.value?.[initialResponseMarker]) {
            yield firstEvent.value;
          }
          while (true) {
            const { done, value } = await asyncIterator.next();
            if (done) {
              break;
            }
            yield value;
          }
        }
      };
    }
    writeEventBody(unionMember, unionSchema, event) {
      const serializer = this.serializer;
      let eventType = unionMember;
      let explicitPayloadMember = null;
      let explicitPayloadContentType;
      const isKnownSchema = (() => {
        const struct = unionSchema.getSchema();
        return struct[4].includes(unionMember);
      })();
      const additionalHeaders = {};
      if (!isKnownSchema) {
        const [type2, value] = event[unionMember];
        eventType = type2;
        serializer.write(15, value);
      } else {
        const eventSchema = unionSchema.getMemberSchema(unionMember);
        if (eventSchema.isStructSchema()) {
          for (const [memberName, memberSchema] of eventSchema.structIterator()) {
            const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
            if (eventPayload) {
              explicitPayloadMember = memberName;
            } else if (eventHeader) {
              const value = event[unionMember][memberName];
              let type2 = "binary";
              if (memberSchema.isNumericSchema()) {
                if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {
                  type2 = "integer";
                } else {
                  type2 = "long";
                }
              } else if (memberSchema.isTimestampSchema()) {
                type2 = "timestamp";
              } else if (memberSchema.isStringSchema()) {
                type2 = "string";
              } else if (memberSchema.isBooleanSchema()) {
                type2 = "boolean";
              }
              if (value != null) {
                additionalHeaders[memberName] = {
                  type: type2,
                  value
                };
                delete event[unionMember][memberName];
              }
            }
          }
          if (explicitPayloadMember !== null) {
            const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);
            if (payloadSchema.isBlobSchema()) {
              explicitPayloadContentType = "application/octet-stream";
            } else if (payloadSchema.isStringSchema()) {
              explicitPayloadContentType = "text/plain";
            }
            serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);
          } else {
            serializer.write(eventSchema, event[unionMember]);
          }
        } else if (eventSchema.isUnitSchema()) {
          serializer.write(eventSchema, {});
        } else {
          throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
        }
      }
      const messageSerialization = serializer.flush() ?? new Uint8Array;
      const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization;
      return {
        body,
        eventType,
        explicitPayloadContentType,
        additionalHeaders
      };
    }
  }
  exports.EventStreamCodec = EventStreamCodec;
  exports.EventStreamMarshaller = EventStreamMarshaller;
  exports.EventStreamSerde = EventStreamSerde;
  exports.HeaderMarshaller = HeaderMarshaller;
  exports.Int64 = Int64;
  exports.MessageDecoderStream = MessageDecoderStream;
  exports.MessageEncoderStream = MessageEncoderStream;
  exports.SmithyMessageDecoderStream = SmithyMessageDecoderStream;
  exports.SmithyMessageEncoderStream = SmithyMessageEncoderStream;
  exports.UniversalEventStreamMarshaller = EventStreamMarshaller$1;
  exports.eventStreamSerdeProvider = eventStreamSerdeProvider;
  exports.getChunkedStream = getChunkedStream;
  exports.getMessageUnmarshaller = getMessageUnmarshaller;
  exports.getUnmarshalledStream = getUnmarshalledStream;
  exports.iterableToReadableStream = iterableToReadableStream;
  exports.readableStreamToIterable = readableStreamToIterable;
  exports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig;
  exports.universalEventStreamSerdeProvider = eventStreamSerdeProvider$1;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js
var require_protocols = __commonJS((exports) => {
  var { Uint8ArrayBlobAdapter, sdkStreamMixin, splitEvery, splitHeader, fromBase64, _parseEpochTimestamp, _parseRfc7231DateTime, _parseRfc3339DateTimeWithOffset, LazyJsonString, NumericValue, toUtf8, fromUtf8, generateIdempotencyToken, toBase64, dateToUtcString, quoteHeader } = require_serde();
  var { TypeRegistry, NormalizedSchema, translateTraits } = require_schema();
  var { HttpRequest, HttpResponse } = require_transport2();
  var { isValidHostname, parseQueryString, parseUrl: parseUrl2 } = require_transport2();
  exports.HttpRequest = HttpRequest;
  exports.HttpResponse = HttpResponse;
  exports.isValidHostname = isValidHostname;
  exports.parseQueryString = parseQueryString;
  exports.parseUrl = parseUrl2;
  var { FieldPosition } = require_dist_cjs();
  var collectBody = async (streamBody = new Uint8Array, context10) => {
    if (streamBody instanceof Uint8Array) {
      return Uint8ArrayBlobAdapter.mutate(streamBody);
    }
    if (!streamBody) {
      return Uint8ArrayBlobAdapter.mutate(new Uint8Array);
    }
    const fromContext = context10.streamCollector(streamBody);
    return Uint8ArrayBlobAdapter.mutate(await fromContext);
  };
  function extendedEncodeURIComponent(str) {
    return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
      return "%" + c.charCodeAt(0).toString(16).toUpperCase();
    });
  }

  class SerdeContext {
    serdeContext;
    setSerdeContext(serdeContext) {
      this.serdeContext = serdeContext;
    }
  }

  class HttpProtocol extends SerdeContext {
    options;
    compositeErrorRegistry;
    constructor(options) {
      super();
      this.options = options;
      this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
      for (const etr of options.errorTypeRegistries ?? []) {
        this.compositeErrorRegistry.copyFrom(etr);
      }
    }
    getRequestType() {
      return HttpRequest;
    }
    getResponseType() {
      return HttpResponse;
    }
    setSerdeContext(serdeContext) {
      this.serdeContext = serdeContext;
      this.serializer.setSerdeContext(serdeContext);
      this.deserializer.setSerdeContext(serdeContext);
      if (this.getPayloadCodec()) {
        this.getPayloadCodec().setSerdeContext(serdeContext);
      }
    }
    updateServiceEndpoint(request2, endpoint) {
      if ("url" in endpoint) {
        request2.protocol = endpoint.url.protocol;
        request2.hostname = endpoint.url.hostname;
        request2.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;
        request2.path = endpoint.url.pathname;
        request2.fragment = endpoint.url.hash || undefined;
        request2.username = endpoint.url.username || undefined;
        request2.password = endpoint.url.password || undefined;
        if (!request2.query) {
          request2.query = {};
        }
        for (const [k, v] of endpoint.url.searchParams.entries()) {
          request2.query[k] = v;
        }
        if (endpoint.headers) {
          for (const name in endpoint.headers) {
            request2.headers[name] = endpoint.headers[name].join(", ");
          }
        }
        return request2;
      } else {
        request2.protocol = endpoint.protocol;
        request2.hostname = endpoint.hostname;
        request2.port = endpoint.port ? Number(endpoint.port) : undefined;
        request2.path = endpoint.path;
        request2.query = {
          ...endpoint.query
        };
        if (endpoint.headers) {
          for (const name in endpoint.headers) {
            request2.headers[name] = endpoint.headers[name];
          }
        }
        return request2;
      }
    }
    setHostPrefix(request2, operationSchema, input) {
      if (this.serdeContext?.disableHostPrefix) {
        return;
      }
      const inputNs = NormalizedSchema.of(operationSchema.input);
      const opTraits = translateTraits(operationSchema.traits ?? {});
      if (opTraits.endpoint) {
        let hostPrefix = opTraits.endpoint?.[0];
        if (typeof hostPrefix === "string") {
          for (const [name, member2] of inputNs.structIterator()) {
            if (!member2.getMergedTraits().hostLabel) {
              continue;
            }
            const replacement = input[name];
            if (typeof replacement !== "string") {
              throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
            }
            hostPrefix = hostPrefix.replace(`{${name}}`, replacement);
          }
          request2.hostname = hostPrefix + request2.hostname;
        }
      }
    }
    deserializeMetadata(output) {
      return {
        httpStatusCode: output.statusCode,
        requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
        extendedRequestId: output.headers["x-amz-id-2"],
        cfId: output.headers["x-amz-cf-id"]
      };
    }
    async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
      const eventStreamSerde = await this.loadEventStreamCapability();
      return eventStreamSerde.serializeEventStream({
        eventStream,
        requestSchema,
        initialRequest
      });
    }
    async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
      const eventStreamSerde = await this.loadEventStreamCapability();
      return eventStreamSerde.deserializeEventStream({
        response,
        responseSchema,
        initialResponseContainer
      });
    }
    async loadEventStreamCapability() {
      const { EventStreamSerde, eventStreamSerdeProvider } = require_event_streams();
      const marshaller = this.resolveEventStreamMarshaller(eventStreamSerdeProvider);
      return new EventStreamSerde({
        marshaller,
        serializer: this.serializer,
        deserializer: this.deserializer,
        serdeContext: this.serdeContext,
        defaultContentType: this.getDefaultContentType()
      });
    }
    resolveEventStreamMarshaller(importedProvider) {
      const context10 = this.serdeContext;
      if (context10.eventStreamMarshaller) {
        return context10.eventStreamMarshaller;
      }
      return importedProvider(this.serdeContext);
    }
    getDefaultContentType() {
      throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
    }
    async deserializeHttpMessage(schema, context10, response, arg4, arg5) {
      return [];
    }
    getEventStreamMarshaller() {
      const context10 = this.serdeContext;
      if (!context10.eventStreamMarshaller) {
        throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
      }
      return context10.eventStreamMarshaller;
    }
  }

  class HttpBindingProtocol extends HttpProtocol {
    async serializeRequest(operationSchema, _input, context10) {
      const input = _input && typeof _input === "object" ? _input : {};
      const serializer = this.serializer;
      const query = {};
      const headers = {};
      const endpoint = await context10.endpoint();
      const ns = NormalizedSchema.of(operationSchema?.input);
      const payloadMemberNames = [];
      const payloadMemberSchemas = [];
      let hasNonHttpBindingMember = false;
      let payload;
      const request2 = new HttpRequest({
        protocol: "",
        hostname: "",
        port: undefined,
        path: "",
        fragment: undefined,
        query,
        headers,
        body: undefined
      });
      if (endpoint) {
        this.updateServiceEndpoint(request2, endpoint);
        this.setHostPrefix(request2, operationSchema, input);
        const opTraits = translateTraits(operationSchema.traits);
        if (opTraits.http) {
          request2.method = opTraits.http[0];
          const [path2, search] = opTraits.http[1].split("?");
          if (request2.path == "/") {
            request2.path = path2;
          } else {
            request2.path += path2;
          }
          const traitSearchParams = new URLSearchParams(search ?? "");
          for (const [key, value] of traitSearchParams) {
            query[key] = value;
          }
        }
      }
      for (const [memberName, memberNs] of ns.structIterator()) {
        const memberTraits = memberNs.getMergedTraits() ?? {};
        const inputMemberValue = input[memberName];
        if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
          if (memberTraits.httpLabel) {
            if (request2.path.includes(`{${memberName}+}`) || request2.path.includes(`{${memberName}}`)) {
              throw new Error(`No value provided for input HTTP label: ${memberName}.`);
            }
          }
          continue;
        }
        if (memberTraits.httpPayload) {
          const isStreaming = memberNs.isStreaming();
          if (isStreaming) {
            const isEventStream = memberNs.isStructSchema();
            if (isEventStream) {
              if (input[memberName]) {
                payload = await this.serializeEventStream({
                  eventStream: input[memberName],
                  requestSchema: ns
                });
              }
            } else {
              payload = inputMemberValue;
            }
          } else {
            serializer.write(memberNs, inputMemberValue);
            payload = serializer.flush();
          }
        } else if (memberTraits.httpLabel) {
          serializer.write(memberNs, inputMemberValue);
          const replacement = serializer.flush();
          if (request2.path.includes(`{${memberName}+}`)) {
            request2.path = request2.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/"));
          } else if (request2.path.includes(`{${memberName}}`)) {
            request2.path = request2.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
          }
        } else if (memberTraits.httpHeader) {
          serializer.write(memberNs, inputMemberValue);
          headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
        } else if (typeof memberTraits.httpPrefixHeaders === "string") {
          for (const key in inputMemberValue) {
            const val = inputMemberValue[key];
            const amalgam = memberTraits.httpPrefixHeaders + key;
            serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
            headers[amalgam.toLowerCase()] = serializer.flush();
          }
        } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
          this.serializeQuery(memberNs, inputMemberValue, query);
        } else {
          hasNonHttpBindingMember = true;
          payloadMemberNames.push(memberName);
          payloadMemberSchemas.push(memberNs);
        }
      }
      if (hasNonHttpBindingMember && input) {
        const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#");
        const requiredMembers = ns.getSchema()[6];
        const payloadSchema = [
          3,
          namespace,
          name,
          ns.getMergedTraits(),
          payloadMemberNames,
          payloadMemberSchemas,
          undefined
        ];
        if (requiredMembers) {
          payloadSchema[6] = requiredMembers;
        } else {
          payloadSchema.pop();
        }
        serializer.write(payloadSchema, input);
        payload = serializer.flush();
      }
      request2.headers = headers;
      request2.query = query;
      request2.body = payload;
      return request2;
    }
    serializeQuery(ns, data, query) {
      const serializer = this.serializer;
      const traits = ns.getMergedTraits();
      if (traits.httpQueryParams) {
        for (const key in data) {
          if (!(key in query)) {
            const val = data[key];
            const valueSchema = ns.getValueSchema();
            Object.assign(valueSchema.getMergedTraits(), {
              ...traits,
              httpQuery: key,
              httpQueryParams: undefined
            });
            this.serializeQuery(valueSchema, val, query);
          }
        }
        return;
      }
      if (ns.isListSchema()) {
        const sparse = !!ns.getMergedTraits().sparse;
        const buffer = [];
        for (const item of data) {
          serializer.write([ns.getValueSchema(), traits], item);
          const serializable = serializer.flush();
          if (sparse || serializable !== undefined) {
            buffer.push(serializable);
          }
        }
        query[traits.httpQuery] = buffer;
      } else {
        serializer.write([ns, traits], data);
        query[traits.httpQuery] = serializer.flush();
      }
    }
    async deserializeResponse(operationSchema, context10, response) {
      const deserializer = this.deserializer;
      const ns = NormalizedSchema.of(operationSchema.output);
      const dataObject = {};
      if (response.statusCode >= 300) {
        const bytes = await collectBody(response.body, context10);
        if (bytes.byteLength > 0) {
          Object.assign(dataObject, await deserializer.read(15, bytes));
        }
        await this.handleError(operationSchema, context10, response, dataObject, this.deserializeMetadata(response));
        throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
      }
      for (const header in response.headers) {
        const value = response.headers[header];
        delete response.headers[header];
        response.headers[header.toLowerCase()] = value;
      }
      const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context10, response, dataObject);
      if (nonHttpBindingMembers.length) {
        const bytes = await collectBody(response.body, context10);
        if (bytes.byteLength > 0) {
          const dataFromBody = await deserializer.read(ns, bytes);
          for (const member2 of nonHttpBindingMembers) {
            if (dataFromBody[member2] != null) {
              dataObject[member2] = dataFromBody[member2];
            }
          }
        }
      } else if (nonHttpBindingMembers.discardResponseBody) {
        await collectBody(response.body, context10);
      }
      dataObject.$metadata = this.deserializeMetadata(response);
      return dataObject;
    }
    async deserializeHttpMessage(schema, context10, response, arg4, arg5) {
      let dataObject;
      if (arg4 instanceof Set) {
        dataObject = arg5;
      } else {
        dataObject = arg4;
      }
      let discardResponseBody = true;
      const deserializer = this.deserializer;
      const ns = NormalizedSchema.of(schema);
      const nonHttpBindingMembers = [];
      for (const [memberName, memberSchema] of ns.structIterator()) {
        const memberTraits = memberSchema.getMemberTraits();
        if (memberTraits.httpPayload) {
          discardResponseBody = false;
          const isStreaming = memberSchema.isStreaming();
          if (isStreaming) {
            const isEventStream = memberSchema.isStructSchema();
            if (isEventStream) {
              dataObject[memberName] = await this.deserializeEventStream({
                response,
                responseSchema: ns
              });
            } else {
              dataObject[memberName] = sdkStreamMixin(response.body);
            }
          } else if (response.body) {
            const bytes = await collectBody(response.body, context10);
            if (bytes.byteLength > 0) {
              dataObject[memberName] = await deserializer.read(memberSchema, bytes);
            }
          }
        } else if (memberTraits.httpHeader) {
          const key = String(memberTraits.httpHeader).toLowerCase();
          const value = response.headers[key];
          if (value != null) {
            if (memberSchema.isListSchema()) {
              const headerListValueSchema = memberSchema.getValueSchema();
              headerListValueSchema.getMergedTraits().httpHeader = key;
              let sections;
              if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === 4) {
                sections = splitEvery(value, ",", 2);
              } else {
                sections = splitHeader(value);
              }
              const list = [];
              for (const section of sections) {
                list.push(await deserializer.read(headerListValueSchema, section.trim()));
              }
              dataObject[memberName] = list;
            } else {
              dataObject[memberName] = await deserializer.read(memberSchema, value);
            }
          }
        } else if (memberTraits.httpPrefixHeaders !== undefined) {
          dataObject[memberName] = {};
          for (const header in response.headers) {
            if (header.startsWith(memberTraits.httpPrefixHeaders)) {
              const value = response.headers[header];
              const valueSchema = memberSchema.getValueSchema();
              valueSchema.getMergedTraits().httpHeader = header;
              dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
            }
          }
        } else if (memberTraits.httpResponseCode) {
          dataObject[memberName] = response.statusCode;
        } else {
          nonHttpBindingMembers.push(memberName);
        }
      }
      nonHttpBindingMembers.discardResponseBody = discardResponseBody;
      return nonHttpBindingMembers;
    }
  }

  class RpcProtocol extends HttpProtocol {
    async serializeRequest(operationSchema, _input, context10) {
      const serializer = this.serializer;
      const query = {};
      const headers = {};
      const endpoint = await context10.endpoint();
      const ns = NormalizedSchema.of(operationSchema?.input);
      const schema = ns.getSchema();
      let payload;
      const input = _input && typeof _input === "object" ? _input : {};
      const request2 = new HttpRequest({
        protocol: "",
        hostname: "",
        port: undefined,
        path: "/",
        fragment: undefined,
        query,
        headers,
        body: undefined
      });
      if (endpoint) {
        this.updateServiceEndpoint(request2, endpoint);
        this.setHostPrefix(request2, operationSchema, input);
      }
      if (input) {
        const eventStreamMember = ns.getEventStreamMember();
        if (eventStreamMember) {
          if (input[eventStreamMember]) {
            const initialRequest = {};
            for (const [memberName, memberSchema] of ns.structIterator()) {
              if (memberName !== eventStreamMember && input[memberName]) {
                serializer.write(memberSchema, input[memberName]);
                initialRequest[memberName] = serializer.flush();
              }
            }
            payload = await this.serializeEventStream({
              eventStream: input[eventStreamMember],
              requestSchema: ns,
              initialRequest
            });
          }
        } else {
          serializer.write(schema, input);
          payload = serializer.flush();
        }
      }
      request2.headers = Object.assign(request2.headers, headers);
      request2.query = query;
      request2.body = payload;
      request2.method = "POST";
      return request2;
    }
    async deserializeResponse(operationSchema, context10, response) {
      const deserializer = this.deserializer;
      const ns = NormalizedSchema.of(operationSchema.output);
      const dataObject = {};
      if (response.statusCode >= 300) {
        const bytes = await collectBody(response.body, context10);
        if (bytes.byteLength > 0) {
          Object.assign(dataObject, await deserializer.read(15, bytes));
        }
        await this.handleError(operationSchema, context10, response, dataObject, this.deserializeMetadata(response));
        throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
      }
      for (const header in response.headers) {
        const value = response.headers[header];
        delete response.headers[header];
        response.headers[header.toLowerCase()] = value;
      }
      const eventStreamMember = ns.getEventStreamMember();
      if (eventStreamMember) {
        dataObject[eventStreamMember] = await this.deserializeEventStream({
          response,
          responseSchema: ns,
          initialResponseContainer: dataObject
        });
      } else {
        const bytes = await collectBody(response.body, context10);
        if (bytes.byteLength > 0) {
          Object.assign(dataObject, await deserializer.read(ns, bytes));
        }
      }
      dataObject.$metadata = this.deserializeMetadata(response);
      return dataObject;
    }
  }
  var resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
    if (input != null && input[memberName] !== undefined) {
      const labelValue = labelValueProvider();
      if (labelValue == null || labelValue.length <= 0) {
        throw new Error("Empty value provided for input HTTP label: " + memberName + ".");
      }
      resolvedPath2 = resolvedPath2.replace(uriLabel, isGreedyLabel ? labelValue.split("/").map((segment2) => extendedEncodeURIComponent(segment2)).join("/") : extendedEncodeURIComponent(labelValue));
    } else {
      throw new Error("No value provided for input HTTP label: " + memberName + ".");
    }
    return resolvedPath2;
  };
  function requestBuilder(input, context10) {
    return new RequestBuilder(input, context10);
  }

  class RequestBuilder {
    input;
    context;
    query = {};
    method = "";
    headers = {};
    path = "";
    body = null;
    hostname = "";
    resolvePathStack = [];
    constructor(input, context10) {
      this.input = input;
      this.context = context10;
    }
    async build() {
      const { hostname: hostname2, protocol = "https", port, path: basePath } = await this.context.endpoint();
      this.path = basePath;
      for (const resolvePath of this.resolvePathStack) {
        resolvePath(this.path);
      }
      return new HttpRequest({
        protocol,
        hostname: this.hostname || hostname2,
        port,
        method: this.method,
        path: this.path,
        query: this.query,
        body: this.body,
        headers: this.headers
      });
    }
    hn(hostname2) {
      this.hostname = hostname2;
      return this;
    }
    bp(uriLabel) {
      this.resolvePathStack.push((basePath) => {
        this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
      });
      return this;
    }
    p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
      this.resolvePathStack.push((path2) => {
        this.path = resolvedPath(path2, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
      });
      return this;
    }
    h(headers) {
      this.headers = headers;
      return this;
    }
    q(query) {
      this.query = query;
      return this;
    }
    b(body) {
      this.body = body;
      return this;
    }
    m(method) {
      this.method = method;
      return this;
    }
  }
  function determineTimestampFormat(ns, settings) {
    if (settings.timestampFormat.useTrait) {
      if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) {
        return ns.getSchema();
      }
    }
    const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();
    const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : undefined : undefined;
    return bindingFormat ?? settings.timestampFormat.default;
  }

  class FromStringShapeDeserializer extends SerdeContext {
    settings;
    constructor(settings) {
      super();
      this.settings = settings;
    }
    read(_schema, data) {
      const ns = NormalizedSchema.of(_schema);
      if (ns.isListSchema()) {
        return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
      }
      if (ns.isBlobSchema()) {
        return (this.serdeContext?.base64Decoder ?? fromBase64)(data);
      }
      if (ns.isTimestampSchema()) {
        const format = determineTimestampFormat(ns, this.settings);
        switch (format) {
          case 5:
            return _parseRfc3339DateTimeWithOffset(data);
          case 6:
            return _parseRfc7231DateTime(data);
          case 7:
            return _parseEpochTimestamp(data);
          default:
            console.warn("Missing timestamp format, parsing value with Date constructor:", data);
            return new Date(data);
        }
      }
      if (ns.isStringSchema()) {
        const mediaType = ns.getMergedTraits().mediaType;
        let intermediateValue = data;
        if (mediaType) {
          if (ns.getMergedTraits().httpHeader) {
            intermediateValue = this.base64ToUtf8(intermediateValue);
          }
          const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
          if (isJson) {
            intermediateValue = LazyJsonString.from(intermediateValue);
          }
          return intermediateValue;
        }
      }
      if (ns.isNumericSchema()) {
        return Number(data);
      }
      if (ns.isBigIntegerSchema()) {
        return BigInt(data);
      }
      if (ns.isBigDecimalSchema()) {
        return new NumericValue(data, "bigDecimal");
      }
      if (ns.isBooleanSchema()) {
        return String(data).toLowerCase() === "true";
      }
      return data;
    }
    base64ToUtf8(base64String) {
      return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));
    }
  }

  class HttpInterceptingShapeDeserializer extends SerdeContext {
    codecDeserializer;
    stringDeserializer;
    constructor(codecDeserializer, codecSettings) {
      super();
      this.codecDeserializer = codecDeserializer;
      this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);
    }
    setSerdeContext(serdeContext) {
      this.stringDeserializer.setSerdeContext(serdeContext);
      this.codecDeserializer.setSerdeContext(serdeContext);
      this.serdeContext = serdeContext;
    }
    read(schema, data) {
      const ns = NormalizedSchema.of(schema);
      const traits = ns.getMergedTraits();
      const toString = this.serdeContext?.utf8Encoder ?? toUtf8;
      if (traits.httpHeader || traits.httpResponseCode) {
        return this.stringDeserializer.read(ns, toString(data));
      }
      if (traits.httpPayload) {
        if (ns.isBlobSchema()) {
          const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8;
          if (typeof data === "string") {
            return toBytes(data);
          }
          return data;
        } else if (ns.isStringSchema()) {
          if ("byteLength" in data) {
            return toString(data);
          }
          return data;
        }
      }
      return this.codecDeserializer.read(ns, data);
    }
  }

  class ToStringShapeSerializer extends SerdeContext {
    settings;
    stringBuffer = "";
    constructor(settings) {
      super();
      this.settings = settings;
    }
    write(schema, value) {
      const ns = NormalizedSchema.of(schema);
      switch (typeof value) {
        case "object":
          if (value === null) {
            this.stringBuffer = "null";
            return;
          }
          if (ns.isTimestampSchema()) {
            if (!(value instanceof Date)) {
              throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);
            }
            const format = determineTimestampFormat(ns, this.settings);
            switch (format) {
              case 5:
                this.stringBuffer = value.toISOString().replace(".000Z", "Z");
                break;
              case 6:
                this.stringBuffer = dateToUtcString(value);
                break;
              case 7:
                this.stringBuffer = String(value.getTime() / 1000);
                break;
              default:
                console.warn("Missing timestamp format, using epoch seconds", value);
                this.stringBuffer = String(value.getTime() / 1000);
            }
            return;
          }
          if (ns.isBlobSchema() && "byteLength" in value) {
            this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value);
            return;
          }
          if (ns.isListSchema() && Array.isArray(value)) {
            let buffer = "";
            for (const item of value) {
              this.write([ns.getValueSchema(), ns.getMergedTraits()], item);
              const headerItem = this.flush();
              const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem);
              if (buffer !== "") {
                buffer += ", ";
              }
              buffer += serialized;
            }
            this.stringBuffer = buffer;
            return;
          }
          this.stringBuffer = JSON.stringify(value, null, 2);
          break;
        case "string":
          const mediaType = ns.getMergedTraits().mediaType;
          let intermediateValue = value;
          if (mediaType) {
            const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
            if (isJson) {
              intermediateValue = LazyJsonString.from(intermediateValue);
            }
            if (ns.getMergedTraits().httpHeader) {
              this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString());
              return;
            }
          }
          this.stringBuffer = value;
          break;
        default:
          if (ns.isIdempotencyToken()) {
            this.stringBuffer = generateIdempotencyToken();
          } else {
            this.stringBuffer = String(value);
          }
      }
    }
    flush() {
      const buffer = this.stringBuffer;
      this.stringBuffer = "";
      return buffer;
    }
  }

  class HttpInterceptingShapeSerializer {
    codecSerializer;
    stringSerializer;
    buffer;
    constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {
      this.codecSerializer = codecSerializer;
      this.stringSerializer = stringSerializer;
    }
    setSerdeContext(serdeContext) {
      this.codecSerializer.setSerdeContext(serdeContext);
      this.stringSerializer.setSerdeContext(serdeContext);
    }
    write(schema, value) {
      const ns = NormalizedSchema.of(schema);
      const traits = ns.getMergedTraits();
      if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
        this.stringSerializer.write(ns, value);
        this.buffer = this.stringSerializer.flush();
        return;
      }
      return this.codecSerializer.write(ns, value);
    }
    flush() {
      if (this.buffer !== undefined) {
        const buffer = this.buffer;
        this.buffer = undefined;
        return buffer;
      }
      return this.codecSerializer.flush();
    }
  }

  class Field {
    name;
    kind;
    values;
    constructor({ name, kind = FieldPosition.HEADER, values = [] }) {
      this.name = name;
      this.kind = kind;
      this.values = values;
    }
    add(value) {
      this.values.push(value);
    }
    set(values) {
      this.values = values;
    }
    remove(value) {
      this.values = this.values.filter((v) => v !== value);
    }
    toString() {
      return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", ");
    }
    get() {
      return this.values;
    }
  }

  class Fields {
    entries = {};
    encoding;
    constructor({ fields = [], encoding = "utf-8" }) {
      fields.forEach(this.setField.bind(this));
      this.encoding = encoding;
    }
    setField(field) {
      this.entries[field.name.toLowerCase()] = field;
    }
    getField(name) {
      return this.entries[name.toLowerCase()];
    }
    removeField(name) {
      delete this.entries[name.toLowerCase()];
    }
    getByType(kind) {
      return Object.values(this.entries).filter((field) => field.kind === kind);
    }
  }
  var getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
    return {
      setHttpHandler(handler) {
        runtimeConfig.httpHandler = handler;
      },
      httpHandler() {
        return runtimeConfig.httpHandler;
      },
      updateHttpClientConfig(key, value) {
        runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
      },
      httpHandlerConfigs() {
        return runtimeConfig.httpHandler.httpHandlerConfigs();
      }
    };
  };
  var resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
    return {
      httpHandler: httpHandlerExtensionConfiguration.httpHandler()
    };
  };
  var CONTENT_LENGTH_HEADER = "content-length";
  function contentLengthMiddleware(bodyLengthChecker) {
    return (next) => async (args) => {
      const request2 = args.request;
      if (HttpRequest.isInstance(request2)) {
        const { body, headers } = request2;
        if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {
          try {
            const length = bodyLengthChecker(body);
            request2.headers = {
              ...request2.headers,
              [CONTENT_LENGTH_HEADER]: String(length)
            };
          } catch (error2) {}
        }
      }
      return next({
        ...args,
        request: request2
      });
    };
  }
  var contentLengthMiddlewareOptions = {
    step: "build",
    tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
    name: "contentLengthMiddleware",
    override: true
  };
  var getContentLengthPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
    }
  });
  var escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);
  var hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
  var escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/");
  function buildQueryString(query) {
    const parts = [];
    for (let key of Object.keys(query).sort()) {
      const value = query[key];
      key = escapeUri(key);
      if (Array.isArray(value)) {
        for (let i = 0, iLen = value.length;i < iLen; i++) {
          parts.push(`${key}=${escapeUri(value[i])}`);
        }
      } else {
        let qsEntry = key;
        if (value || typeof value === "string") {
          qsEntry += `=${escapeUri(value)}`;
        }
        parts.push(qsEntry);
      }
    }
    return parts.join("&");
  }
  exports.Field = Field;
  exports.Fields = Fields;
  exports.FromStringShapeDeserializer = FromStringShapeDeserializer;
  exports.HttpBindingProtocol = HttpBindingProtocol;
  exports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;
  exports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;
  exports.HttpProtocol = HttpProtocol;
  exports.RequestBuilder = RequestBuilder;
  exports.RpcProtocol = RpcProtocol;
  exports.SerdeContext = SerdeContext;
  exports.ToStringShapeSerializer = ToStringShapeSerializer;
  exports.buildQueryString = buildQueryString;
  exports.collectBody = collectBody;
  exports.contentLengthMiddleware = contentLengthMiddleware;
  exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions;
  exports.determineTimestampFormat = determineTimestampFormat;
  exports.escapeUri = escapeUri;
  exports.escapeUriPath = escapeUriPath;
  exports.extendedEncodeURIComponent = extendedEncodeURIComponent;
  exports.getContentLengthPlugin = getContentLengthPlugin;
  exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;
  exports.requestBuilder = requestBuilder;
  exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;
  exports.resolvedPath = resolvedPath;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js
var require_retry = __commonJS((exports) => {
  var { Readable: Readable2 } = __require("node:stream");
  var { NoOpLogger, normalizeProvider } = require_client3();
  var { HttpResponse, HttpRequest } = require_protocols();
  var { parseRfc7231DateTime, v4 } = require_serde();
  var isStreamingPayload = (request2) => request2?.body instanceof Readable2 || typeof ReadableStream !== "undefined" && request2?.body instanceof ReadableStream;
  var CLOCK_SKEW_ERROR_CODES = [
    "AuthFailure",
    "InvalidSignatureException",
    "RequestExpired",
    "RequestInTheFuture",
    "RequestTimeTooSkewed",
    "SignatureDoesNotMatch"
  ];
  var THROTTLING_ERROR_CODES = [
    "BandwidthLimitExceeded",
    "EC2ThrottledException",
    "LimitExceededException",
    "PriorRequestNotComplete",
    "ProvisionedThroughputExceededException",
    "RequestLimitExceeded",
    "RequestThrottled",
    "RequestThrottledException",
    "SlowDown",
    "ThrottledException",
    "Throttling",
    "ThrottlingException",
    "TooManyRequestsException",
    "TransactionInProgressException"
  ];
  var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
  var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
  var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
  var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND", "EAI_AGAIN"];
  var isRetryableByTrait = (error2) => error2?.$retryable !== undefined;
  var isClockSkewError = (error2) => CLOCK_SKEW_ERROR_CODES.includes(error2.name);
  var isClockSkewCorrectedError = (error2) => error2.$metadata?.clockSkewCorrected;
  var isBrowserNetworkError = (error2) => {
    const errorMessages = new Set([
      "Failed to fetch",
      "NetworkError when attempting to fetch resource",
      "The Internet connection appears to be offline",
      "Load failed",
      "Network request failed"
    ]);
    const isValid = error2 && error2 instanceof TypeError;
    if (!isValid) {
      return false;
    }
    return errorMessages.has(error2.message);
  };
  var isThrottlingError = (error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true;
  var isTransientError = (error2, depth = 0) => isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== undefined && depth <= 10 && isTransientError(error2.cause, depth + 1);
  var isServerError = (error2) => {
    if (error2.$metadata?.httpStatusCode !== undefined) {
      const statusCode = error2.$metadata.httpStatusCode;
      if (500 <= statusCode && statusCode <= 599 && !isTransientError(error2)) {
        return true;
      }
      return false;
    }
    return false;
  };
  function isNodeJsHttp2TransientError(error2) {
    return error2.code === "ERR_HTTP2_STREAM_ERROR" && error2.message.includes("NGHTTP2_REFUSED_STREAM");
  }
  var DEFAULT_RETRY_DELAY_BASE = 100;
  var MAXIMUM_RETRY_DELAY = 20 * 1000;
  var THROTTLING_RETRY_DELAY_BASE = 500;
  var INITIAL_RETRY_TOKENS = 500;
  var RETRY_COST = 5;
  var TIMEOUT_RETRY_COST = 10;
  var NO_RETRY_INCREMENT = 1;
  var INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
  var REQUEST_HEADER = "amz-sdk-request";
  function parseRetryAfterHeader3(response, logger) {
    if (!HttpResponse.isInstance(response)) {
      return;
    }
    for (const header of Object.keys(response.headers)) {
      const h = header.toLowerCase();
      if (h === "retry-after") {
        const retryAfter = response.headers[header];
        let retryAfterSeconds = NaN;
        if (retryAfter.endsWith("GMT")) {
          try {
            const date2 = parseRfc7231DateTime(retryAfter);
            retryAfterSeconds = (date2.getTime() - Date.now()) / 1000;
          } catch (e) {
            logger?.trace?.("Failed to parse retry-after header");
            logger?.trace?.(e);
          }
        } else if (retryAfter.match(/ GMT, ((\d+)|(\d+\.\d+))$/)) {
          retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\d.]+)$/)?.[1]);
        } else if (retryAfter.match(/^((\d+)|(\d+\.\d+))$/)) {
          retryAfterSeconds = Number(retryAfter);
        } else if (Date.parse(retryAfter) >= Date.now()) {
          retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1000;
        }
        if (isNaN(retryAfterSeconds)) {
          return;
        }
        return new Date(Date.now() + retryAfterSeconds * 1000);
      } else if (h === "x-amz-retry-after") {
        const v = response.headers[header];
        const backoffMilliseconds = Number(v);
        if (isNaN(backoffMilliseconds)) {
          logger?.trace?.(`Failed to parse x-amz-retry-after=${v}`);
          return;
        }
        return new Date(Date.now() + backoffMilliseconds);
      }
    }
  }
  function getRetryAfterHint(response, logger) {
    return parseRetryAfterHeader3(response, logger);
  }
  var asSdkError = (error2) => {
    if (error2 instanceof Error)
      return error2;
    if (error2 instanceof Object)
      return Object.assign(new Error, error2);
    if (typeof error2 === "string")
      return new Error(error2);
    return new Error(`AWS SDK error wrapper for ${error2}`);
  };
  function bindRetryMiddleware(isStreamingPayload2) {
    return (options) => (next, context10) => async (args) => {
      let retryStrategy = await options.retryStrategy();
      const maxAttempts = await options.maxAttempts();
      if (isRetryStrategyV2(retryStrategy)) {
        retryStrategy = retryStrategy;
        let retryToken = await retryStrategy.acquireInitialRetryToken((context10["partition_id"] ?? "") + (context10.__retryLongPoll ? ":longpoll" : ""));
        let lastError = new Error;
        let attempts = 0;
        let totalRetryDelay = 0;
        const { request: request2 } = args;
        const isRequest = HttpRequest.isInstance(request2);
        if (isRequest) {
          request2.headers[INVOCATION_ID_HEADER] = v4();
        }
        while (true) {
          try {
            if (isRequest) {
              request2.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
            }
            const { response, output } = await next(args);
            retryStrategy.recordSuccess(retryToken);
            output.$metadata.attempts = attempts + 1;
            output.$metadata.totalRetryDelay = totalRetryDelay;
            return { response, output };
          } catch (e) {
            const retryErrorInfo = getRetryErrorInfo(e, options.logger);
            lastError = asSdkError(e);
            if (isRequest && isStreamingPayload2(request2)) {
              (context10.logger instanceof NoOpLogger ? console : context10.logger)?.warn("An error was encountered in a non-retryable streaming request.");
              throw lastError;
            }
            try {
              retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
            } catch (refreshError) {
              if (!lastError.$metadata) {
                lastError.$metadata = {};
              }
              lastError.$metadata.attempts = attempts + 1;
              lastError.$metadata.totalRetryDelay = totalRetryDelay;
              throw lastError;
            }
            attempts = retryToken.getRetryCount();
            const delay = retryToken.getRetryDelay();
            totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay;
            if (delay > 0) {
              await cooldown(delay);
            }
          }
        }
      } else {
        retryStrategy = retryStrategy;
        if (retryStrategy?.mode) {
          context10.userAgent = [...context10.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
        }
        return retryStrategy.retry(next, args);
      }
    };
  }
  var cooldown = (ms) => new Promise((resolve3) => setTimeout(resolve3, ms));
  var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
  var getRetryErrorInfo = (error2, logger) => {
    const errorInfo = {
      error: error2,
      errorType: getRetryErrorType(error2)
    };
    const retryAfterHint = parseRetryAfterHeader3(error2.$response, logger);
    if (retryAfterHint) {
      errorInfo.retryAfterHint = retryAfterHint;
    }
    return errorInfo;
  };
  var getRetryErrorType = (error2) => {
    if (isThrottlingError(error2))
      return "THROTTLING";
    if (isTransientError(error2))
      return "TRANSIENT";
    if (isServerError(error2))
      return "SERVER_ERROR";
    return "CLIENT_ERROR";
  };
  var retryMiddlewareOptions = {
    name: "retryMiddleware",
    tags: ["RETRY"],
    step: "finalizeRequest",
    priority: "high",
    override: true
  };
  function bindGetRetryPlugin(isStreamingPayload2) {
    const retryMiddleware2 = bindRetryMiddleware(isStreamingPayload2);
    return (options) => ({
      applyToStack: (clientStack) => {
        clientStack.add(retryMiddleware2(options), retryMiddlewareOptions);
      }
    });
  }

  class DefaultRateLimiter {
    static setTimeoutFn = (fn, delay) => setTimeout(fn, delay);
    beta;
    minCapacity;
    minFillRate;
    scaleConstant;
    smooth;
    enabled = false;
    availableTokens = 0;
    lastMaxRate = 0;
    measuredTxRate = 0;
    requestCount = 0;
    fillRate;
    lastThrottleTime;
    lastTimestamp = 0;
    lastTxRateBucket;
    maxCapacity;
    timeWindow = 0;
    constructor(options) {
      this.beta = options?.beta ?? 0.7;
      this.minCapacity = options?.minCapacity ?? 1;
      this.minFillRate = options?.minFillRate ?? 0.5;
      this.scaleConstant = options?.scaleConstant ?? 0.4;
      this.smooth = options?.smooth ?? 0.8;
      this.lastThrottleTime = this.getCurrentTimeInSeconds();
      this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
      this.fillRate = this.minFillRate;
      this.maxCapacity = this.minCapacity;
    }
    async getSendToken() {
      return this.acquireTokenBucket(1);
    }
    updateClientSendingRate(response) {
      let calculatedRate;
      this.updateMeasuredRate();
      const retryErrorInfo = response;
      const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || isThrottlingError(retryErrorInfo?.error ?? response);
      if (isThrottling) {
        const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
        this.lastMaxRate = rateToUse;
        this.calculateTimeWindow();
        this.lastThrottleTime = this.getCurrentTimeInSeconds();
        calculatedRate = this.cubicThrottle(rateToUse);
        this.enableTokenBucket();
      } else {
        this.calculateTimeWindow();
        calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
      }
      const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
      this.updateTokenBucketRate(newRate);
    }
    getCurrentTimeInSeconds() {
      return Date.now() / 1000;
    }
    async acquireTokenBucket(amount) {
      if (!this.enabled) {
        return;
      }
      this.refillTokenBucket();
      while (amount > this.availableTokens) {
        const delay = (amount - this.availableTokens) / this.fillRate * 1000;
        await new Promise((resolve3) => DefaultRateLimiter.setTimeoutFn(resolve3, delay));
        this.refillTokenBucket();
      }
      this.availableTokens = this.availableTokens - amount;
    }
    refillTokenBucket() {
      const timestamp2 = this.getCurrentTimeInSeconds();
      if (!this.lastTimestamp) {
        this.lastTimestamp = timestamp2;
        return;
      }
      const fillAmount = (timestamp2 - this.lastTimestamp) * this.fillRate;
      this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount);
      this.lastTimestamp = timestamp2;
    }
    calculateTimeWindow() {
      this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));
    }
    cubicThrottle(rateToUse) {
      return this.getPrecise(rateToUse * this.beta);
    }
    cubicSuccess(timestamp2) {
      return this.getPrecise(this.scaleConstant * Math.pow(timestamp2 - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
    }
    enableTokenBucket() {
      this.enabled = true;
    }
    updateTokenBucketRate(newRate) {
      this.refillTokenBucket();
      this.fillRate = Math.max(newRate, this.minFillRate);
      this.maxCapacity = Math.max(newRate, this.minCapacity);
      this.availableTokens = Math.min(this.availableTokens, this.maxCapacity);
    }
    updateMeasuredRate() {
      const t = this.getCurrentTimeInSeconds();
      const timeBucket = Math.floor(t * 2) / 2;
      this.requestCount++;
      if (timeBucket > this.lastTxRateBucket) {
        const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
        this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
        this.requestCount = 0;
        this.lastTxRateBucket = timeBucket;
      }
    }
    getPrecise(num) {
      return parseFloat(num.toFixed(8));
    }
  }

  class Retry {
    static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true";
    static delay() {
      return Retry.v2026 ? 50 : 100;
    }
    static throttlingDelay() {
      return Retry.v2026 ? 1000 : 500;
    }
    static cost() {
      return Retry.v2026 ? 14 : 5;
    }
    static throttlingCost() {
      return Retry.v2026 ? 5 : 10;
    }
    static modifiedCostType() {
      return Retry.v2026 ? "THROTTLING" : "TRANSIENT";
    }
  }

  class DefaultRetryBackoffStrategy {
    x = Retry.delay();
    computeNextBackoffDelay(i) {
      const b = Math.random();
      const r = 2;
      const t_i = b * Math.min(this.x * r ** i, MAXIMUM_RETRY_DELAY);
      return Math.floor(t_i);
    }
    setDelayBase(delay) {
      this.x = delay;
    }
  }

  class DefaultRetryToken {
    delay;
    count;
    cost;
    longPoll;
    $retryLog = {
      acquisitionDelay: 0
    };
    constructor(delay, count2, cost, longPoll) {
      this.delay = delay;
      this.count = count2;
      this.cost = cost;
      this.longPoll = longPoll;
    }
    getRetryCount() {
      return this.count;
    }
    getRetryDelay() {
      return Math.min(MAXIMUM_RETRY_DELAY, this.delay);
    }
    getRetryCost() {
      return this.cost;
    }
    isLongPoll() {
      return this.longPoll;
    }
  }
  var RETRY_MODES;
  (function(RETRY_MODES2) {
    RETRY_MODES2["STANDARD"] = "standard";
    RETRY_MODES2["ADAPTIVE"] = "adaptive";
  })(RETRY_MODES || (RETRY_MODES = {}));
  var DEFAULT_MAX_ATTEMPTS = 3;
  var DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;
  var refusal = {
    incompatible: 1,
    attempts: 2,
    capacity: 3
  };
  var StandardRetryStrategy$1 = class StandardRetryStrategy2 {
    mode = RETRY_MODES.STANDARD;
    retryBackoffStrategy;
    capacity = INITIAL_RETRY_TOKENS;
    maxAttemptsProvider;
    baseDelay;
    constructor(arg1) {
      if (typeof arg1 === "number") {
        this.maxAttemptsProvider = async () => arg1;
      } else if (typeof arg1 === "function") {
        this.maxAttemptsProvider = arg1;
      } else if (arg1 && typeof arg1 === "object") {
        this.maxAttemptsProvider = async () => arg1.maxAttempts;
        this.baseDelay = arg1.baseDelay;
        this.retryBackoffStrategy = arg1.backoff;
      }
      this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS;
      this.baseDelay ??= Retry.delay();
      this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy;
    }
    async acquireInitialRetryToken(retryTokenScope) {
      return new DefaultRetryToken(Retry.delay(), 0, undefined, Retry.v2026 && retryTokenScope.includes(":longpoll"));
    }
    async refreshRetryTokenForRetry(token, errorInfo) {
      const maxAttempts = await this.getMaxAttempts();
      const retryCode = this.retryCode(token, errorInfo, maxAttempts);
      const shouldRetry = retryCode === 0;
      const isLongPoll = token.isLongPoll?.();
      if (shouldRetry || isLongPoll) {
        const errorType = errorInfo.errorType;
        this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry.throttlingDelay() : this.baseDelay);
        const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
        let retryDelay = delayFromErrorType;
        if (errorInfo.retryAfterHint instanceof Date) {
          retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5000));
        }
        if (!shouldRetry) {
          const longPollBackoff = Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0;
          if (longPollBackoff > 0) {
            await new Promise((r) => setTimeout(r, longPollBackoff));
          }
        } else {
          const capacityCost = this.getCapacityCost(errorType);
          this.capacity -= capacityCost;
          const nextToken = new DefaultRetryToken(0, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);
          await new Promise((r) => setTimeout(r, retryDelay));
          nextToken.$retryLog.acquisitionDelay = retryDelay;
          return nextToken;
        }
      }
      throw new Error("No retry token available");
    }
    recordSuccess(token) {
      this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
    }
    getCapacity() {
      return this.capacity;
    }
    async maxAttempts() {
      return this.maxAttemptsProvider();
    }
    async getMaxAttempts() {
      try {
        return await this.maxAttemptsProvider();
      } catch (error2) {
        console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
        return DEFAULT_MAX_ATTEMPTS;
      }
    }
    retryCode(tokenToRenew, errorInfo, maxAttempts) {
      const attempts = tokenToRenew.getRetryCount() + 1;
      const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible;
      const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts;
      const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity;
      return retryableStatus || attemptStatus || capacityStatus;
    }
    getCapacityCost(errorType) {
      return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost();
    }
    isRetryableError(errorType) {
      return errorType === "THROTTLING" || errorType === "TRANSIENT";
    }
  };
  var AdaptiveRetryStrategy$1 = class AdaptiveRetryStrategy2 {
    mode = RETRY_MODES.ADAPTIVE;
    rateLimiter;
    standardRetryStrategy;
    constructor(maxAttemptsProvider, options) {
      const { rateLimiter } = options ?? {};
      this.rateLimiter = rateLimiter ?? new DefaultRateLimiter;
      this.standardRetryStrategy = options ? new StandardRetryStrategy$1({
        maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3,
        ...options
      }) : new StandardRetryStrategy$1(maxAttemptsProvider);
    }
    async acquireInitialRetryToken(retryTokenScope) {
      const token = await this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
      await this.rateLimiter.getSendToken();
      return token;
    }
    async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
      this.rateLimiter.updateClientSendingRate(errorInfo);
      const token = await this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
      await this.rateLimiter.getSendToken();
      return token;
    }
    recordSuccess(token) {
      this.rateLimiter.updateClientSendingRate({});
      this.standardRetryStrategy.recordSuccess(token);
    }
    async maxAttemptsProvider() {
      return this.standardRetryStrategy.maxAttempts();
    }
  };

  class ConfiguredRetryStrategy extends StandardRetryStrategy$1 {
    computeNextBackoffDelay;
    constructor(maxAttempts, computeNextBackoffDelay = Retry.delay()) {
      super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts);
      if (typeof computeNextBackoffDelay === "number") {
        this.computeNextBackoffDelay = () => computeNextBackoffDelay;
      } else {
        this.computeNextBackoffDelay = computeNextBackoffDelay;
      }
      this.retryBackoffStrategy.computeNextBackoffDelay = (completedAttempt) => {
        const nextAttempt = completedAttempt + 1;
        return this.computeNextBackoffDelay(nextAttempt);
      };
    }
  }
  var getDefaultRetryQuota = (initialRetryTokens, options) => {
    const MAX_CAPACITY = initialRetryTokens;
    const noRetryIncrement = NO_RETRY_INCREMENT;
    const retryCost = RETRY_COST;
    const timeoutRetryCost = TIMEOUT_RETRY_COST;
    let availableCapacity = initialRetryTokens;
    const getCapacityAmount = (error2) => error2.name === "TimeoutError" ? timeoutRetryCost : retryCost;
    const hasRetryTokens = (error2) => getCapacityAmount(error2) <= availableCapacity;
    const retrieveRetryTokens = (error2) => {
      if (!hasRetryTokens(error2)) {
        throw new Error("No retry token available");
      }
      const capacityAmount = getCapacityAmount(error2);
      availableCapacity -= capacityAmount;
      return capacityAmount;
    };
    const releaseRetryTokens = (capacityReleaseAmount) => {
      availableCapacity += capacityReleaseAmount ?? noRetryIncrement;
      availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
    };
    return Object.freeze({
      hasRetryTokens,
      retrieveRetryTokens,
      releaseRetryTokens
    });
  };
  var defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
  var defaultRetryDecider = (error2) => {
    if (!error2) {
      return false;
    }
    return isRetryableByTrait(error2) || isClockSkewError(error2) || isThrottlingError(error2) || isTransientError(error2);
  };

  class StandardRetryStrategy {
    maxAttemptsProvider;
    retryDecider;
    delayDecider;
    retryQuota;
    mode = RETRY_MODES.STANDARD;
    constructor(maxAttemptsProvider, options) {
      this.maxAttemptsProvider = maxAttemptsProvider;
      this.retryDecider = options?.retryDecider ?? defaultRetryDecider;
      this.delayDecider = options?.delayDecider ?? defaultDelayDecider;
      this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS);
    }
    shouldRetry(error2, attempts, maxAttempts) {
      return attempts < maxAttempts && this.retryDecider(error2) && this.retryQuota.hasRetryTokens(error2);
    }
    async getMaxAttempts() {
      let maxAttempts;
      try {
        maxAttempts = await this.maxAttemptsProvider();
      } catch (error2) {
        maxAttempts = DEFAULT_MAX_ATTEMPTS;
      }
      return maxAttempts;
    }
    async retry(next, args, options) {
      let retryTokenAmount;
      let attempts = 0;
      let totalDelay = 0;
      const maxAttempts = await this.getMaxAttempts();
      const { request: request2 } = args;
      if (HttpRequest.isInstance(request2)) {
        request2.headers[INVOCATION_ID_HEADER] = v4();
      }
      while (true) {
        try {
          if (HttpRequest.isInstance(request2)) {
            request2.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
          }
          if (options?.beforeRequest) {
            await options.beforeRequest();
          }
          const { response, output } = await next(args);
          if (options?.afterRequest) {
            options.afterRequest(response);
          }
          this.retryQuota.releaseRetryTokens(retryTokenAmount);
          output.$metadata.attempts = attempts + 1;
          output.$metadata.totalRetryDelay = totalDelay;
          return { response, output };
        } catch (e) {
          const err = asSdkError(e);
          attempts++;
          if (this.shouldRetry(err, attempts, maxAttempts)) {
            retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
            const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts);
            const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
            const delay = Math.max(delayFromResponse || 0, delayFromDecider);
            totalDelay += delay;
            await new Promise((resolve3) => setTimeout(resolve3, delay));
            continue;
          }
          if (!err.$metadata) {
            err.$metadata = {};
          }
          err.$metadata.attempts = attempts;
          err.$metadata.totalRetryDelay = totalDelay;
          throw err;
        }
      }
    }
  }
  var getDelayFromRetryAfterHeader = (response) => {
    if (!HttpResponse.isInstance(response))
      return;
    const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
    if (!retryAfterHeaderName)
      return;
    const retryAfter = response.headers[retryAfterHeaderName];
    const retryAfterSeconds = Number(retryAfter);
    if (!Number.isNaN(retryAfterSeconds))
      return Math.min(retryAfterSeconds * 1000, 20000);
    const retryAfterDate = new Date(retryAfter);
    return Math.min(retryAfterDate.getTime() - Date.now(), 20000);
  };

  class AdaptiveRetryStrategy extends StandardRetryStrategy {
    rateLimiter;
    constructor(maxAttemptsProvider, options) {
      const { rateLimiter, ...superOptions } = options ?? {};
      super(maxAttemptsProvider, superOptions);
      this.rateLimiter = rateLimiter ?? new DefaultRateLimiter;
      this.mode = RETRY_MODES.ADAPTIVE;
    }
    async retry(next, args) {
      return super.retry(next, args, {
        beforeRequest: async () => {
          return this.rateLimiter.getSendToken();
        },
        afterRequest: (response) => {
          this.rateLimiter.updateClientSendingRate(response);
        }
      });
    }
  }
  var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
  var CONFIG_MAX_ATTEMPTS = "max_attempts";
  var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => {
      const value = env2[ENV_MAX_ATTEMPTS];
      if (!value)
        return;
      const maxAttempt = parseInt(value);
      if (Number.isNaN(maxAttempt)) {
        throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
      }
      return maxAttempt;
    },
    configFileSelector: (profile) => {
      const value = profile[CONFIG_MAX_ATTEMPTS];
      if (!value)
        return;
      const maxAttempt = parseInt(value);
      if (Number.isNaN(maxAttempt)) {
        throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
      }
      return maxAttempt;
    },
    default: DEFAULT_MAX_ATTEMPTS
  };
  var resolveRetryConfig = (input, defaults2) => {
    const { retryStrategy, retryMode } = input;
    const { defaultMaxAttempts = DEFAULT_MAX_ATTEMPTS, defaultBaseDelay = Retry.delay() } = defaults2 ?? {};
    const maxAttemptsProvider = normalizeProvider(input.maxAttempts ?? defaultMaxAttempts);
    let controller = retryStrategy ? Promise.resolve(retryStrategy) : undefined;
    const getDefault = async () => {
      const maxAttempts = await maxAttemptsProvider();
      const adaptive = await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE;
      if (adaptive) {
        return new AdaptiveRetryStrategy$1(maxAttemptsProvider, {
          maxAttempts,
          baseDelay: defaultBaseDelay
        });
      }
      return new StandardRetryStrategy$1({
        maxAttempts,
        baseDelay: defaultBaseDelay
      });
    };
    return Object.assign(input, {
      maxAttempts: maxAttemptsProvider,
      retryStrategy: () => controller ??= getDefault()
    });
  };
  var ENV_RETRY_MODE = "AWS_RETRY_MODE";
  var CONFIG_RETRY_MODE = "retry_mode";
  var NODE_RETRY_MODE_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE],
    configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
    default: DEFAULT_RETRY_MODE
  };
  var omitRetryHeadersMiddleware = () => (next) => async (args) => {
    const { request: request2 } = args;
    if (HttpRequest.isInstance(request2)) {
      delete request2.headers[INVOCATION_ID_HEADER];
      delete request2.headers[REQUEST_HEADER];
    }
    return next(args);
  };
  var omitRetryHeadersMiddlewareOptions = {
    name: "omitRetryHeadersMiddleware",
    tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
    relation: "before",
    toMiddleware: "awsAuthMiddleware",
    override: true
  };
  var getOmitRetryHeadersPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
    }
  });
  var retryMiddleware = bindRetryMiddleware(isStreamingPayload);
  var getRetryPlugin = bindGetRetryPlugin(isStreamingPayload);
  exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy$1;
  exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS;
  exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE;
  exports.ConfiguredRetryStrategy = ConfiguredRetryStrategy;
  exports.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS;
  exports.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE;
  exports.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE;
  exports.DefaultRateLimiter = DefaultRateLimiter;
  exports.DeprecatedAdaptiveRetryStrategy = AdaptiveRetryStrategy;
  exports.DeprecatedStandardRetryStrategy = StandardRetryStrategy;
  exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS;
  exports.ENV_RETRY_MODE = ENV_RETRY_MODE;
  exports.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS;
  exports.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER;
  exports.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY;
  exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS;
  exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS;
  exports.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT;
  exports.REQUEST_HEADER = REQUEST_HEADER;
  exports.RETRY_COST = RETRY_COST;
  exports.RETRY_MODES = RETRY_MODES;
  exports.Retry = Retry;
  exports.StandardRetryStrategy = StandardRetryStrategy$1;
  exports.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE;
  exports.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST;
  exports.defaultDelayDecider = defaultDelayDecider;
  exports.defaultRetryDecider = defaultRetryDecider;
  exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin;
  exports.getRetryAfterHint = getRetryAfterHint;
  exports.getRetryPlugin = getRetryPlugin;
  exports.isBrowserNetworkError = isBrowserNetworkError;
  exports.isClockSkewCorrectedError = isClockSkewCorrectedError;
  exports.isClockSkewError = isClockSkewError;
  exports.isNodeJsHttp2TransientError = isNodeJsHttp2TransientError;
  exports.isRetryableByTrait = isRetryableByTrait;
  exports.isServerError = isServerError;
  exports.isThrottlingError = isThrottlingError;
  exports.isTransientError = isTransientError;
  exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware;
  exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions;
  exports.resolveRetryConfig = resolveRetryConfig;
  exports.retryMiddleware = retryMiddleware;
  exports.retryMiddlewareOptions = retryMiddlewareOptions;
});

// ../../node_modules/.pnpm/@aws+lambda-invoke-store@0.2.4/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js
var require_invoke_store = __commonJS((exports) => {
  var PROTECTED_KEYS = {
    REQUEST_ID: Symbol.for("_AWS_LAMBDA_REQUEST_ID"),
    X_RAY_TRACE_ID: Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),
    TENANT_ID: Symbol.for("_AWS_LAMBDA_TENANT_ID")
  };
  var NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? "");
  if (!NO_GLOBAL_AWS_LAMBDA) {
    globalThis.awslambda = globalThis.awslambda || {};
  }

  class InvokeStoreBase {
    static PROTECTED_KEYS = PROTECTED_KEYS;
    isProtectedKey(key) {
      return Object.values(PROTECTED_KEYS).includes(key);
    }
    getRequestId() {
      return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-";
    }
    getXRayTraceId() {
      return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID);
    }
    getTenantId() {
      return this.get(PROTECTED_KEYS.TENANT_ID);
    }
  }

  class InvokeStoreSingle extends InvokeStoreBase {
    currentContext;
    getContext() {
      return this.currentContext;
    }
    hasContext() {
      return this.currentContext !== undefined;
    }
    get(key) {
      return this.currentContext?.[key];
    }
    set(key, value) {
      if (this.isProtectedKey(key)) {
        throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
      }
      this.currentContext = this.currentContext || {};
      this.currentContext[key] = value;
    }
    run(context10, fn) {
      this.currentContext = context10;
      return fn();
    }
  }

  class InvokeStoreMulti extends InvokeStoreBase {
    als;
    static async create() {
      const instance = new InvokeStoreMulti;
      const asyncHooks = await import("node:async_hooks");
      instance.als = new asyncHooks.AsyncLocalStorage;
      return instance;
    }
    getContext() {
      return this.als.getStore();
    }
    hasContext() {
      return this.als.getStore() !== undefined;
    }
    get(key) {
      return this.als.getStore()?.[key];
    }
    set(key, value) {
      if (this.isProtectedKey(key)) {
        throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
      }
      const store = this.als.getStore();
      if (!store) {
        throw new Error("No context available");
      }
      store[key] = value;
    }
    run(context10, fn) {
      return this.als.run(context10, fn);
    }
  }
  exports.InvokeStore = undefined;
  (function(InvokeStore) {
    let instance = null;
    async function getInstanceAsync(forceInvokeStoreMulti) {
      if (!instance) {
        instance = (async () => {
          const isMulti = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env;
          const newInstance = isMulti ? await InvokeStoreMulti.create() : new InvokeStoreSingle;
          if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) {
            return globalThis.awslambda.InvokeStore;
          } else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) {
            globalThis.awslambda.InvokeStore = newInstance;
            return newInstance;
          } else {
            return newInstance;
          }
        })();
      }
      return instance;
    }
    InvokeStore.getInstanceAsync = getInstanceAsync;
    InvokeStore._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? {
      reset: () => {
        instance = null;
        if (globalThis.awslambda?.InvokeStore) {
          delete globalThis.awslambda.InvokeStore;
        }
        globalThis.awslambda = { InvokeStore: undefined };
      }
    } : undefined;
  })(exports.InvokeStore || (exports.InvokeStore = {}));
  exports.InvokeStoreBase = InvokeStoreBase;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/index.js
var require_dist_cjs5 = __commonJS((exports) => {
  var { getSmithyContext } = require_transport2();
  exports.getSmithyContext = getSmithyContext;
  var { HttpRequest } = require_protocols();
  var { requestBuilder } = require_protocols();
  exports.requestBuilder = requestBuilder;
  var { HttpApiKeyAuthLocation } = require_dist_cjs();
  var resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
    if (!authSchemePreference || authSchemePreference.length === 0) {
      return candidateAuthOptions;
    }
    const preferredAuthOptions = [];
    for (const preferredSchemeName of authSchemePreference) {
      for (const candidateAuthOption of candidateAuthOptions) {
        const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1];
        if (candidateAuthSchemeName === preferredSchemeName) {
          preferredAuthOptions.push(candidateAuthOption);
        }
      }
    }
    for (const candidateAuthOption of candidateAuthOptions) {
      if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {
        preferredAuthOptions.push(candidateAuthOption);
      }
    }
    return preferredAuthOptions;
  };
  function convertHttpAuthSchemesToMap(httpAuthSchemes) {
    const map = new Map;
    for (const scheme of httpAuthSchemes) {
      map.set(scheme.schemeId, scheme);
    }
    return map;
  }
  var httpAuthSchemeMiddleware = (config, mwOptions) => (next, context10) => async (args) => {
    const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context10, args.input));
    const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
    const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
    const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
    const smithyContext = getSmithyContext(context10);
    const failureReasons = [];
    for (const option of resolvedOptions) {
      const scheme = authSchemes.get(option.schemeId);
      if (!scheme) {
        failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
        continue;
      }
      const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
      if (!identityProvider) {
        failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
        continue;
      }
      const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context10) || {};
      option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
      option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
      smithyContext.selectedHttpAuthScheme = {
        httpAuthOption: option,
        identity: await identityProvider(option.identityProperties),
        signer: scheme.signer
      };
      break;
    }
    if (!smithyContext.selectedHttpAuthScheme) {
      throw new Error(failureReasons.join(`
`));
    }
    return next(args);
  };
  var httpAuthSchemeEndpointRuleSetMiddlewareOptions = {
    step: "serialize",
    tags: ["HTTP_AUTH_SCHEME"],
    name: "httpAuthSchemeMiddleware",
    override: true,
    relation: "before",
    toMiddleware: "endpointV2Middleware"
  };
  var getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
    applyToStack: (clientStack) => {
      clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
        httpAuthSchemeParametersProvider,
        identityProviderConfigProvider
      }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);
    }
  });
  var httpAuthSchemeMiddlewareOptions = {
    step: "serialize",
    tags: ["HTTP_AUTH_SCHEME"],
    name: "httpAuthSchemeMiddleware",
    override: true,
    relation: "before",
    toMiddleware: "serializerMiddleware"
  };
  var getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
    applyToStack: (clientStack) => {
      clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
        httpAuthSchemeParametersProvider,
        identityProviderConfigProvider
      }), httpAuthSchemeMiddlewareOptions);
    }
  });
  var defaultErrorHandler = (signingProperties) => (error2) => {
    throw error2;
  };
  var defaultSuccessHandler = (httpResponse, signingProperties) => {};
  var httpSigningMiddleware = (config) => (next, context10) => async (args) => {
    if (!HttpRequest.isInstance(args.request)) {
      return next(args);
    }
    const smithyContext = getSmithyContext(context10);
    const scheme = smithyContext.selectedHttpAuthScheme;
    if (!scheme) {
      throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
    }
    const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
    const output = await next({
      ...args,
      request: await signer.sign(args.request, identity, signingProperties)
    }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
    (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
    return output;
  };
  var httpSigningMiddlewareOptions = {
    step: "finalizeRequest",
    tags: ["HTTP_SIGNING"],
    name: "httpSigningMiddleware",
    aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"],
    override: true,
    relation: "after",
    toMiddleware: "retryMiddleware"
  };
  var getHttpSigningPlugin = (config) => ({
    applyToStack: (clientStack) => {
      clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions);
    }
  });
  var normalizeProvider = (input) => {
    if (typeof input === "function")
      return input;
    const promisified = Promise.resolve(input);
    return () => promisified;
  };
  var makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {
    let command = new CommandCtor(input);
    command = withCommand(command) ?? command;
    return await client.send(command, ...args);
  };
  function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {
    return async function* paginateOperation(config, input, ...additionalArguments) {
      const _input = input;
      let token = config.startingToken ?? _input[inputTokenName];
      let hasNext = true;
      let page;
      while (hasNext) {
        _input[inputTokenName] = token;
        if (pageSizeTokenName) {
          _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;
        }
        if (config.client instanceof ClientCtor) {
          page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);
        } else {
          throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);
        }
        yield page;
        const prevToken = token;
        token = get(page, outputTokenName);
        hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
      }
      return;
    };
  }
  var get = (fromObject, path2) => {
    let cursor = fromObject;
    const pathComponents = path2.split(".");
    for (const step of pathComponents) {
      if (!cursor || typeof cursor !== "object") {
        return;
      }
      cursor = cursor[step];
    }
    return cursor;
  };
  function setFeature(context10, feature, value) {
    if (!context10.__smithy_context) {
      context10.__smithy_context = {
        features: {}
      };
    } else if (!context10.__smithy_context.features) {
      context10.__smithy_context.features = {};
    }
    context10.__smithy_context.features[feature] = value;
  }

  class DefaultIdentityProviderConfig {
    authSchemes = new Map;
    constructor(config) {
      for (const key in config) {
        const value = config[key];
        if (value !== undefined) {
          this.authSchemes.set(key, value);
        }
      }
    }
    getIdentityProvider(schemeId) {
      return this.authSchemes.get(schemeId);
    }
  }

  class HttpApiKeyAuthSigner {
    async sign(httpRequest, identity, signingProperties) {
      if (!signingProperties) {
        throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");
      }
      if (!signingProperties.name) {
        throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");
      }
      if (!signingProperties.in) {
        throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");
      }
      if (!identity.apiKey) {
        throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
      }
      const clonedRequest = HttpRequest.clone(httpRequest);
      if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {
        clonedRequest.query[signingProperties.name] = identity.apiKey;
      } else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) {
        clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;
      } else {
        throw new Error("request can only be signed with `apiKey` locations `query` or `header`, " + "but found: `" + signingProperties.in + "`");
      }
      return clonedRequest;
    }
  }

  class HttpBearerAuthSigner {
    async sign(httpRequest, identity, signingProperties) {
      const clonedRequest = HttpRequest.clone(httpRequest);
      if (!identity.token) {
        throw new Error("request could not be signed with `token` since the `token` is not defined");
      }
      clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`;
      return clonedRequest;
    }
  }

  class NoAuthSigner {
    async sign(httpRequest, identity, signingProperties) {
      return httpRequest;
    }
  }
  var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) {
    return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
  };
  var EXPIRATION_MS = 300000;
  var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
  var doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined;
  var memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
    if (provider === undefined) {
      return;
    }
    const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
    let resolved;
    let pending;
    let hasResult;
    let isConstant = false;
    const coalesceProvider = async (options) => {
      if (!pending) {
        pending = normalizedProvider(options);
      }
      try {
        resolved = await pending;
        hasResult = true;
        isConstant = false;
      } finally {
        pending = undefined;
      }
      return resolved;
    };
    if (isExpired === undefined) {
      return async (options) => {
        if (!hasResult || options?.forceRefresh) {
          resolved = await coalesceProvider(options);
        }
        return resolved;
      };
    }
    return async (options) => {
      if (!hasResult || options?.forceRefresh) {
        resolved = await coalesceProvider(options);
      }
      if (isConstant) {
        return resolved;
      }
      if (!requiresRefresh(resolved)) {
        isConstant = true;
        return resolved;
      }
      if (isExpired(resolved)) {
        await coalesceProvider(options);
        return resolved;
      }
      return resolved;
    };
  };
  exports.DefaultIdentityProviderConfig = DefaultIdentityProviderConfig;
  exports.EXPIRATION_MS = EXPIRATION_MS;
  exports.HttpApiKeyAuthSigner = HttpApiKeyAuthSigner;
  exports.HttpBearerAuthSigner = HttpBearerAuthSigner;
  exports.NoAuthSigner = NoAuthSigner;
  exports.createIsIdentityExpiredFunction = createIsIdentityExpiredFunction;
  exports.createPaginator = createPaginator;
  exports.doesIdentityRequireRefresh = doesIdentityRequireRefresh;
  exports.getHttpAuthSchemeEndpointRuleSetPlugin = getHttpAuthSchemeEndpointRuleSetPlugin;
  exports.getHttpAuthSchemePlugin = getHttpAuthSchemePlugin;
  exports.getHttpSigningPlugin = getHttpSigningPlugin;
  exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = httpAuthSchemeEndpointRuleSetMiddlewareOptions;
  exports.httpAuthSchemeMiddleware = httpAuthSchemeMiddleware;
  exports.httpAuthSchemeMiddlewareOptions = httpAuthSchemeMiddlewareOptions;
  exports.httpSigningMiddleware = httpSigningMiddleware;
  exports.httpSigningMiddlewareOptions = httpSigningMiddlewareOptions;
  exports.isIdentityExpired = isIdentityExpired;
  exports.memoizeIdentityProvider = memoizeIdentityProvider;
  exports.normalizeProvider = normalizeProvider;
  exports.setFeature = setFeature;
});

// ../../node_modules/.pnpm/bowser@2.14.1/node_modules/bowser/es5.js
var require_es5 = __commonJS((exports, module) => {
  (function(e, t) {
    typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.bowser = t() : e.bowser = t();
  })(exports, function() {
    return function(e) {
      var t = {};
      function r(i) {
        if (t[i])
          return t[i].exports;
        var n = t[i] = { i, l: false, exports: {} };
        return e[i].call(n.exports, n, n.exports, r), n.l = true, n.exports;
      }
      return r.m = e, r.c = t, r.d = function(e2, t2, i) {
        r.o(e2, t2) || Object.defineProperty(e2, t2, { enumerable: true, get: i });
      }, r.r = function(e2) {
        typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
      }, r.t = function(e2, t2) {
        if (1 & t2 && (e2 = r(e2)), 8 & t2)
          return e2;
        if (4 & t2 && typeof e2 == "object" && e2 && e2.__esModule)
          return e2;
        var i = Object.create(null);
        if (r.r(i), Object.defineProperty(i, "default", { enumerable: true, value: e2 }), 2 & t2 && typeof e2 != "string")
          for (var n in e2)
            r.d(i, n, function(t3) {
              return e2[t3];
            }.bind(null, n));
        return i;
      }, r.n = function(e2) {
        var t2 = e2 && e2.__esModule ? function() {
          return e2.default;
        } : function() {
          return e2;
        };
        return r.d(t2, "a", t2), t2;
      }, r.o = function(e2, t2) {
        return Object.prototype.hasOwnProperty.call(e2, t2);
      }, r.p = "", r(r.s = 90);
    }({ 17: function(e, t, r) {
      t.__esModule = true, t.default = undefined;
      var i = r(18), n = function() {
        function e2() {}
        return e2.getFirstMatch = function(e3, t2) {
          var r2 = t2.match(e3);
          return r2 && r2.length > 0 && r2[1] || "";
        }, e2.getSecondMatch = function(e3, t2) {
          var r2 = t2.match(e3);
          return r2 && r2.length > 1 && r2[2] || "";
        }, e2.matchAndReturnConst = function(e3, t2, r2) {
          if (e3.test(t2))
            return r2;
        }, e2.getWindowsVersionName = function(e3) {
          switch (e3) {
            case "NT":
              return "NT";
            case "XP":
              return "XP";
            case "NT 5.0":
              return "2000";
            case "NT 5.1":
              return "XP";
            case "NT 5.2":
              return "2003";
            case "NT 6.0":
              return "Vista";
            case "NT 6.1":
              return "7";
            case "NT 6.2":
              return "8";
            case "NT 6.3":
              return "8.1";
            case "NT 10.0":
              return "10";
            default:
              return;
          }
        }, e2.getMacOSVersionName = function(e3) {
          var t2 = e3.split(".").splice(0, 2).map(function(e4) {
            return parseInt(e4, 10) || 0;
          });
          t2.push(0);
          var r2 = t2[0], i2 = t2[1];
          if (r2 === 10)
            switch (i2) {
              case 5:
                return "Leopard";
              case 6:
                return "Snow Leopard";
              case 7:
                return "Lion";
              case 8:
                return "Mountain Lion";
              case 9:
                return "Mavericks";
              case 10:
                return "Yosemite";
              case 11:
                return "El Capitan";
              case 12:
                return "Sierra";
              case 13:
                return "High Sierra";
              case 14:
                return "Mojave";
              case 15:
                return "Catalina";
              default:
                return;
            }
          switch (r2) {
            case 11:
              return "Big Sur";
            case 12:
              return "Monterey";
            case 13:
              return "Ventura";
            case 14:
              return "Sonoma";
            case 15:
              return "Sequoia";
            default:
              return;
          }
        }, e2.getAndroidVersionName = function(e3) {
          var t2 = e3.split(".").splice(0, 2).map(function(e4) {
            return parseInt(e4, 10) || 0;
          });
          if (t2.push(0), !(t2[0] === 1 && t2[1] < 5))
            return t2[0] === 1 && t2[1] < 6 ? "Cupcake" : t2[0] === 1 && t2[1] >= 6 ? "Donut" : t2[0] === 2 && t2[1] < 2 ? "Eclair" : t2[0] === 2 && t2[1] === 2 ? "Froyo" : t2[0] === 2 && t2[1] > 2 ? "Gingerbread" : t2[0] === 3 ? "Honeycomb" : t2[0] === 4 && t2[1] < 1 ? "Ice Cream Sandwich" : t2[0] === 4 && t2[1] < 4 ? "Jelly Bean" : t2[0] === 4 && t2[1] >= 4 ? "KitKat" : t2[0] === 5 ? "Lollipop" : t2[0] === 6 ? "Marshmallow" : t2[0] === 7 ? "Nougat" : t2[0] === 8 ? "Oreo" : t2[0] === 9 ? "Pie" : undefined;
        }, e2.getVersionPrecision = function(e3) {
          return e3.split(".").length;
        }, e2.compareVersions = function(t2, r2, i2) {
          i2 === undefined && (i2 = false);
          var n2 = e2.getVersionPrecision(t2), a = e2.getVersionPrecision(r2), o = Math.max(n2, a), s = 0, u = e2.map([t2, r2], function(t3) {
            var r3 = o - e2.getVersionPrecision(t3), i3 = t3 + new Array(r3 + 1).join(".0");
            return e2.map(i3.split("."), function(e3) {
              return new Array(20 - e3.length).join("0") + e3;
            }).reverse();
          });
          for (i2 && (s = o - Math.min(n2, a)), o -= 1;o >= s; ) {
            if (u[0][o] > u[1][o])
              return 1;
            if (u[0][o] === u[1][o]) {
              if (o === s)
                return 0;
              o -= 1;
            } else if (u[0][o] < u[1][o])
              return -1;
          }
        }, e2.map = function(e3, t2) {
          var r2, i2 = [];
          if (Array.prototype.map)
            return Array.prototype.map.call(e3, t2);
          for (r2 = 0;r2 < e3.length; r2 += 1)
            i2.push(t2(e3[r2]));
          return i2;
        }, e2.find = function(e3, t2) {
          var r2, i2;
          if (Array.prototype.find)
            return Array.prototype.find.call(e3, t2);
          for (r2 = 0, i2 = e3.length;r2 < i2; r2 += 1) {
            var n2 = e3[r2];
            if (t2(n2, r2))
              return n2;
          }
        }, e2.assign = function(e3) {
          for (var t2, r2, i2 = e3, n2 = arguments.length, a = new Array(n2 > 1 ? n2 - 1 : 0), o = 1;o < n2; o++)
            a[o - 1] = arguments[o];
          if (Object.assign)
            return Object.assign.apply(Object, [e3].concat(a));
          var s = function() {
            var e4 = a[t2];
            typeof e4 == "object" && e4 !== null && Object.keys(e4).forEach(function(t3) {
              i2[t3] = e4[t3];
            });
          };
          for (t2 = 0, r2 = a.length;t2 < r2; t2 += 1)
            s();
          return e3;
        }, e2.getBrowserAlias = function(e3) {
          return i.BROWSER_ALIASES_MAP[e3];
        }, e2.getBrowserTypeByAlias = function(e3) {
          return i.BROWSER_MAP[e3] || "";
        }, e2;
      }();
      t.default = n, e.exports = t.default;
    }, 18: function(e, t, r) {
      t.__esModule = true, t.ENGINE_MAP = t.OS_MAP = t.PLATFORMS_MAP = t.BROWSER_MAP = t.BROWSER_ALIASES_MAP = undefined;
      t.BROWSER_ALIASES_MAP = { AmazonBot: "amazonbot", "Amazon Silk": "amazon_silk", "Android Browser": "android", BaiduSpider: "baiduspider", Bada: "bada", BingCrawler: "bingcrawler", Brave: "brave", BlackBerry: "blackberry", "ChatGPT-User": "chatgpt_user", Chrome: "chrome", ClaudeBot: "claudebot", Chromium: "chromium", Diffbot: "diffbot", DuckDuckBot: "duckduckbot", DuckDuckGo: "duckduckgo", Electron: "electron", Epiphany: "epiphany", FacebookExternalHit: "facebookexternalhit", Firefox: "firefox", Focus: "focus", Generic: "generic", "Google Search": "google_search", Googlebot: "googlebot", GPTBot: "gptbot", "Internet Explorer": "ie", InternetArchiveCrawler: "internetarchivecrawler", "K-Meleon": "k_meleon", LibreWolf: "librewolf", Linespider: "linespider", Maxthon: "maxthon", "Meta-ExternalAds": "meta_externalads", "Meta-ExternalAgent": "meta_externalagent", "Meta-ExternalFetcher": "meta_externalfetcher", "Meta-WebIndexer": "meta_webindexer", "Microsoft Edge": "edge", "MZ Browser": "mz", "NAVER Whale Browser": "naver", "OAI-SearchBot": "oai_searchbot", Omgilibot: "omgilibot", Opera: "opera", "Opera Coast": "opera_coast", "Pale Moon": "pale_moon", PerplexityBot: "perplexitybot", "Perplexity-User": "perplexity_user", PhantomJS: "phantomjs", PingdomBot: "pingdombot", Puffin: "puffin", QQ: "qq", QQLite: "qqlite", QupZilla: "qupzilla", Roku: "roku", Safari: "safari", Sailfish: "sailfish", "Samsung Internet for Android": "samsung_internet", SlackBot: "slackbot", SeaMonkey: "seamonkey", Sleipnir: "sleipnir", "Sogou Browser": "sogou", Swing: "swing", Tizen: "tizen", "UC Browser": "uc", Vivaldi: "vivaldi", "WebOS Browser": "webos", WeChat: "wechat", YahooSlurp: "yahooslurp", "Yandex Browser": "yandex", YandexBot: "yandexbot", YouBot: "youbot" };
      t.BROWSER_MAP = { amazonbot: "AmazonBot", amazon_silk: "Amazon Silk", android: "Android Browser", baiduspider: "BaiduSpider", bada: "Bada", bingcrawler: "BingCrawler", blackberry: "BlackBerry", brave: "Brave", chatgpt_user: "ChatGPT-User", chrome: "Chrome", claudebot: "ClaudeBot", chromium: "Chromium", diffbot: "Diffbot", duckduckbot: "DuckDuckBot", duckduckgo: "DuckDuckGo", edge: "Microsoft Edge", electron: "Electron", epiphany: "Epiphany", facebookexternalhit: "FacebookExternalHit", firefox: "Firefox", focus: "Focus", generic: "Generic", google_search: "Google Search", googlebot: "Googlebot", gptbot: "GPTBot", ie: "Internet Explorer", internetarchivecrawler: "InternetArchiveCrawler", k_meleon: "K-Meleon", librewolf: "LibreWolf", linespider: "Linespider", maxthon: "Maxthon", meta_externalads: "Meta-ExternalAds", meta_externalagent: "Meta-ExternalAgent", meta_externalfetcher: "Meta-ExternalFetcher", meta_webindexer: "Meta-WebIndexer", mz: "MZ Browser", naver: "NAVER Whale Browser", oai_searchbot: "OAI-SearchBot", omgilibot: "Omgilibot", opera: "Opera", opera_coast: "Opera Coast", pale_moon: "Pale Moon", perplexitybot: "PerplexityBot", perplexity_user: "Perplexity-User", phantomjs: "PhantomJS", pingdombot: "PingdomBot", puffin: "Puffin", qq: "QQ Browser", qqlite: "QQ Browser Lite", qupzilla: "QupZilla", roku: "Roku", safari: "Safari", sailfish: "Sailfish", samsung_internet: "Samsung Internet for Android", seamonkey: "SeaMonkey", slackbot: "SlackBot", sleipnir: "Sleipnir", sogou: "Sogou Browser", swing: "Swing", tizen: "Tizen", uc: "UC Browser", vivaldi: "Vivaldi", webos: "WebOS Browser", wechat: "WeChat", yahooslurp: "YahooSlurp", yandex: "Yandex Browser", yandexbot: "YandexBot", youbot: "YouBot" };
      t.PLATFORMS_MAP = { bot: "bot", desktop: "desktop", mobile: "mobile", tablet: "tablet", tv: "tv" };
      t.OS_MAP = { Android: "Android", Bada: "Bada", BlackBerry: "BlackBerry", ChromeOS: "Chrome OS", HarmonyOS: "HarmonyOS", iOS: "iOS", Linux: "Linux", MacOS: "macOS", PlayStation4: "PlayStation 4", Roku: "Roku", Tizen: "Tizen", WebOS: "WebOS", Windows: "Windows", WindowsPhone: "Windows Phone" };
      t.ENGINE_MAP = { Blink: "Blink", EdgeHTML: "EdgeHTML", Gecko: "Gecko", Presto: "Presto", Trident: "Trident", WebKit: "WebKit" };
    }, 90: function(e, t, r) {
      t.__esModule = true, t.default = undefined;
      var i, n = (i = r(91)) && i.__esModule ? i : { default: i }, a = r(18);
      function o(e2, t2) {
        for (var r2 = 0;r2 < t2.length; r2++) {
          var i2 = t2[r2];
          i2.enumerable = i2.enumerable || false, i2.configurable = true, "value" in i2 && (i2.writable = true), Object.defineProperty(e2, i2.key, i2);
        }
      }
      var s = function() {
        function e2() {}
        var t2, r2, i2;
        return e2.getParser = function(e3, t3, r3) {
          if (t3 === undefined && (t3 = false), r3 === undefined && (r3 = null), typeof e3 != "string")
            throw new Error("UserAgent should be a string");
          return new n.default(e3, t3, r3);
        }, e2.parse = function(e3, t3) {
          return t3 === undefined && (t3 = null), new n.default(e3, t3).getResult();
        }, t2 = e2, i2 = [{ key: "BROWSER_MAP", get: function() {
          return a.BROWSER_MAP;
        } }, { key: "ENGINE_MAP", get: function() {
          return a.ENGINE_MAP;
        } }, { key: "OS_MAP", get: function() {
          return a.OS_MAP;
        } }, { key: "PLATFORMS_MAP", get: function() {
          return a.PLATFORMS_MAP;
        } }], (r2 = null) && o(t2.prototype, r2), i2 && o(t2, i2), e2;
      }();
      t.default = s, e.exports = t.default;
    }, 91: function(e, t, r) {
      t.__esModule = true, t.default = undefined;
      var i = u(r(92)), n = u(r(93)), a = u(r(94)), o = u(r(95)), s = u(r(17));
      function u(e2) {
        return e2 && e2.__esModule ? e2 : { default: e2 };
      }
      var d = function() {
        function e2(e3, t3, r2) {
          if (t3 === undefined && (t3 = false), r2 === undefined && (r2 = null), e3 == null || e3 === "")
            throw new Error("UserAgent parameter can't be empty");
          this._ua = e3;
          var i2 = false;
          typeof t3 == "boolean" ? (i2 = t3, this._hints = r2) : this._hints = t3 != null && typeof t3 == "object" ? t3 : null, this.parsedResult = {}, i2 !== true && this.parse();
        }
        var t2 = e2.prototype;
        return t2.getHints = function() {
          return this._hints;
        }, t2.hasBrand = function(e3) {
          if (!this._hints || !Array.isArray(this._hints.brands))
            return false;
          var t3 = e3.toLowerCase();
          return this._hints.brands.some(function(e4) {
            return e4.brand && e4.brand.toLowerCase() === t3;
          });
        }, t2.getBrandVersion = function(e3) {
          if (this._hints && Array.isArray(this._hints.brands)) {
            var t3 = e3.toLowerCase(), r2 = this._hints.brands.find(function(e4) {
              return e4.brand && e4.brand.toLowerCase() === t3;
            });
            return r2 ? r2.version : undefined;
          }
        }, t2.getUA = function() {
          return this._ua;
        }, t2.test = function(e3) {
          return e3.test(this._ua);
        }, t2.parseBrowser = function() {
          var e3 = this;
          this.parsedResult.browser = {};
          var t3 = s.default.find(i.default, function(t4) {
            if (typeof t4.test == "function")
              return t4.test(e3);
            if (Array.isArray(t4.test))
              return t4.test.some(function(t5) {
                return e3.test(t5);
              });
            throw new Error("Browser's test function is not valid");
          });
          return t3 && (this.parsedResult.browser = t3.describe(this.getUA(), this)), this.parsedResult.browser;
        }, t2.getBrowser = function() {
          return this.parsedResult.browser ? this.parsedResult.browser : this.parseBrowser();
        }, t2.getBrowserName = function(e3) {
          return e3 ? String(this.getBrowser().name).toLowerCase() || "" : this.getBrowser().name || "";
        }, t2.getBrowserVersion = function() {
          return this.getBrowser().version;
        }, t2.getOS = function() {
          return this.parsedResult.os ? this.parsedResult.os : this.parseOS();
        }, t2.parseOS = function() {
          var e3 = this;
          this.parsedResult.os = {};
          var t3 = s.default.find(n.default, function(t4) {
            if (typeof t4.test == "function")
              return t4.test(e3);
            if (Array.isArray(t4.test))
              return t4.test.some(function(t5) {
                return e3.test(t5);
              });
            throw new Error("Browser's test function is not valid");
          });
          return t3 && (this.parsedResult.os = t3.describe(this.getUA())), this.parsedResult.os;
        }, t2.getOSName = function(e3) {
          var t3 = this.getOS().name;
          return e3 ? String(t3).toLowerCase() || "" : t3 || "";
        }, t2.getOSVersion = function() {
          return this.getOS().version;
        }, t2.getPlatform = function() {
          return this.parsedResult.platform ? this.parsedResult.platform : this.parsePlatform();
        }, t2.getPlatformType = function(e3) {
          e3 === undefined && (e3 = false);
          var t3 = this.getPlatform().type;
          return e3 ? String(t3).toLowerCase() || "" : t3 || "";
        }, t2.parsePlatform = function() {
          var e3 = this;
          this.parsedResult.platform = {};
          var t3 = s.default.find(a.default, function(t4) {
            if (typeof t4.test == "function")
              return t4.test(e3);
            if (Array.isArray(t4.test))
              return t4.test.some(function(t5) {
                return e3.test(t5);
              });
            throw new Error("Browser's test function is not valid");
          });
          return t3 && (this.parsedResult.platform = t3.describe(this.getUA())), this.parsedResult.platform;
        }, t2.getEngine = function() {
          return this.parsedResult.engine ? this.parsedResult.engine : this.parseEngine();
        }, t2.getEngineName = function(e3) {
          return e3 ? String(this.getEngine().name).toLowerCase() || "" : this.getEngine().name || "";
        }, t2.parseEngine = function() {
          var e3 = this;
          this.parsedResult.engine = {};
          var t3 = s.default.find(o.default, function(t4) {
            if (typeof t4.test == "function")
              return t4.test(e3);
            if (Array.isArray(t4.test))
              return t4.test.some(function(t5) {
                return e3.test(t5);
              });
            throw new Error("Browser's test function is not valid");
          });
          return t3 && (this.parsedResult.engine = t3.describe(this.getUA())), this.parsedResult.engine;
        }, t2.parse = function() {
          return this.parseBrowser(), this.parseOS(), this.parsePlatform(), this.parseEngine(), this;
        }, t2.getResult = function() {
          return s.default.assign({}, this.parsedResult);
        }, t2.satisfies = function(e3) {
          var t3 = this, r2 = {}, i2 = 0, n2 = {}, a2 = 0;
          if (Object.keys(e3).forEach(function(t4) {
            var o3 = e3[t4];
            typeof o3 == "string" ? (n2[t4] = o3, a2 += 1) : typeof o3 == "object" && (r2[t4] = o3, i2 += 1);
          }), i2 > 0) {
            var o2 = Object.keys(r2), u2 = s.default.find(o2, function(e4) {
              return t3.isOS(e4);
            });
            if (u2) {
              var d2 = this.satisfies(r2[u2]);
              if (d2 !== undefined)
                return d2;
            }
            var c = s.default.find(o2, function(e4) {
              return t3.isPlatform(e4);
            });
            if (c) {
              var f = this.satisfies(r2[c]);
              if (f !== undefined)
                return f;
            }
          }
          if (a2 > 0) {
            var l = Object.keys(n2), b = s.default.find(l, function(e4) {
              return t3.isBrowser(e4, true);
            });
            if (b !== undefined)
              return this.compareVersion(n2[b]);
          }
        }, t2.isBrowser = function(e3, t3) {
          t3 === undefined && (t3 = false);
          var r2 = this.getBrowserName().toLowerCase(), i2 = e3.toLowerCase(), n2 = s.default.getBrowserTypeByAlias(i2);
          return t3 && n2 && (i2 = n2.toLowerCase()), i2 === r2;
        }, t2.compareVersion = function(e3) {
          var t3 = [0], r2 = e3, i2 = false, n2 = this.getBrowserVersion();
          if (typeof n2 == "string")
            return e3[0] === ">" || e3[0] === "<" ? (r2 = e3.substr(1), e3[1] === "=" ? (i2 = true, r2 = e3.substr(2)) : t3 = [], e3[0] === ">" ? t3.push(1) : t3.push(-1)) : e3[0] === "=" ? r2 = e3.substr(1) : e3[0] === "~" && (i2 = true, r2 = e3.substr(1)), t3.indexOf(s.default.compareVersions(n2, r2, i2)) > -1;
        }, t2.isOS = function(e3) {
          return this.getOSName(true) === String(e3).toLowerCase();
        }, t2.isPlatform = function(e3) {
          return this.getPlatformType(true) === String(e3).toLowerCase();
        }, t2.isEngine = function(e3) {
          return this.getEngineName(true) === String(e3).toLowerCase();
        }, t2.is = function(e3, t3) {
          return t3 === undefined && (t3 = false), this.isBrowser(e3, t3) || this.isOS(e3) || this.isPlatform(e3);
        }, t2.some = function(e3) {
          var t3 = this;
          return e3 === undefined && (e3 = []), e3.some(function(e4) {
            return t3.is(e4);
          });
        }, e2;
      }();
      t.default = d, e.exports = t.default;
    }, 92: function(e, t, r) {
      t.__esModule = true, t.default = undefined;
      var i, n = (i = r(17)) && i.__esModule ? i : { default: i };
      var a = /version\/(\d+(\.?_?\d+)+)/i, o = [{ test: [/gptbot/i], describe: function(e2) {
        var t2 = { name: "GPTBot" }, r2 = n.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/chatgpt-user/i], describe: function(e2) {
        var t2 = { name: "ChatGPT-User" }, r2 = n.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/oai-searchbot/i], describe: function(e2) {
        var t2 = { name: "OAI-SearchBot" }, r2 = n.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i], describe: function(e2) {
        var t2 = { name: "ClaudeBot" }, r2 = n.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/omgilibot/i, /webzio-extended/i], describe: function(e2) {
        var t2 = { name: "Omgilibot" }, r2 = n.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/diffbot/i], describe: function(e2) {
        var t2 = { name: "Diffbot" }, r2 = n.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/perplexitybot/i], describe: function(e2) {
        var t2 = { name: "PerplexityBot" }, r2 = n.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/perplexity-user/i], describe: function(e2) {
        var t2 = { name: "Perplexity-User" }, r2 = n.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/youbot/i], describe: function(e2) {
        var t2 = { name: "YouBot" }, r2 = n.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/meta-webindexer/i], describe: function(e2) {
        var t2 = { name: "Meta-WebIndexer" }, r2 = n.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/meta-externalads/i], describe: function(e2) {
        var t2 = { name: "Meta-ExternalAds" }, r2 = n.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/meta-externalagent/i], describe: function(e2) {
        var t2 = { name: "Meta-ExternalAgent" }, r2 = n.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/meta-externalfetcher/i], describe: function(e2) {
        var t2 = { name: "Meta-ExternalFetcher" }, r2 = n.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/googlebot/i], describe: function(e2) {
        var t2 = { name: "Googlebot" }, r2 = n.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/linespider/i], describe: function(e2) {
        var t2 = { name: "Linespider" }, r2 = n.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/amazonbot/i], describe: function(e2) {
        var t2 = { name: "AmazonBot" }, r2 = n.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/bingbot/i], describe: function(e2) {
        var t2 = { name: "BingCrawler" }, r2 = n.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/baiduspider/i], describe: function(e2) {
        var t2 = { name: "BaiduSpider" }, r2 = n.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/duckduckbot/i], describe: function(e2) {
        var t2 = { name: "DuckDuckBot" }, r2 = n.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/ia_archiver/i], describe: function(e2) {
        var t2 = { name: "InternetArchiveCrawler" }, r2 = n.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/facebookexternalhit/i, /facebookcatalog/i], describe: function() {
        return { name: "FacebookExternalHit" };
      } }, { test: [/slackbot/i, /slack-imgProxy/i], describe: function(e2) {
        var t2 = { name: "SlackBot" }, r2 = n.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/yahoo!?[\s/]*slurp/i], describe: function() {
        return { name: "YahooSlurp" };
      } }, { test: [/yandexbot/i, /yandexmobilebot/i], describe: function() {
        return { name: "YandexBot" };
      } }, { test: [/pingdom/i], describe: function() {
        return { name: "PingdomBot" };
      } }, { test: [/opera/i], describe: function(e2) {
        var t2 = { name: "Opera" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/opr\/|opios/i], describe: function(e2) {
        var t2 = { name: "Opera" }, r2 = n.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/SamsungBrowser/i], describe: function(e2) {
        var t2 = { name: "Samsung Internet for Android" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/Whale/i], describe: function(e2) {
        var t2 = { name: "NAVER Whale Browser" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/PaleMoon/i], describe: function(e2) {
        var t2 = { name: "Pale Moon" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/MZBrowser/i], describe: function(e2) {
        var t2 = { name: "MZ Browser" }, r2 = n.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/focus/i], describe: function(e2) {
        var t2 = { name: "Focus" }, r2 = n.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/swing/i], describe: function(e2) {
        var t2 = { name: "Swing" }, r2 = n.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/coast/i], describe: function(e2) {
        var t2 = { name: "Opera Coast" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/opt\/\d+(?:.?_?\d+)+/i], describe: function(e2) {
        var t2 = { name: "Opera Touch" }, r2 = n.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/yabrowser/i], describe: function(e2) {
        var t2 = { name: "Yandex Browser" }, r2 = n.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/ucbrowser/i], describe: function(e2) {
        var t2 = { name: "UC Browser" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/Maxthon|mxios/i], describe: function(e2) {
        var t2 = { name: "Maxthon" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/epiphany/i], describe: function(e2) {
        var t2 = { name: "Epiphany" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/puffin/i], describe: function(e2) {
        var t2 = { name: "Puffin" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/sleipnir/i], describe: function(e2) {
        var t2 = { name: "Sleipnir" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/k-meleon/i], describe: function(e2) {
        var t2 = { name: "K-Meleon" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/micromessenger/i], describe: function(e2) {
        var t2 = { name: "WeChat" }, r2 = n.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/qqbrowser/i], describe: function(e2) {
        var t2 = { name: /qqbrowserlite/i.test(e2) ? "QQ Browser Lite" : "QQ Browser" }, r2 = n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/msie|trident/i], describe: function(e2) {
        var t2 = { name: "Internet Explorer" }, r2 = n.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/\sedg\//i], describe: function(e2) {
        var t2 = { name: "Microsoft Edge" }, r2 = n.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/edg([ea]|ios)/i], describe: function(e2) {
        var t2 = { name: "Microsoft Edge" }, r2 = n.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/vivaldi/i], describe: function(e2) {
        var t2 = { name: "Vivaldi" }, r2 = n.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/seamonkey/i], describe: function(e2) {
        var t2 = { name: "SeaMonkey" }, r2 = n.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/sailfish/i], describe: function(e2) {
        var t2 = { name: "Sailfish" }, r2 = n.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/silk/i], describe: function(e2) {
        var t2 = { name: "Amazon Silk" }, r2 = n.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/phantom/i], describe: function(e2) {
        var t2 = { name: "PhantomJS" }, r2 = n.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/slimerjs/i], describe: function(e2) {
        var t2 = { name: "SlimerJS" }, r2 = n.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e2) {
        var t2 = { name: "BlackBerry" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/(web|hpw)[o0]s/i], describe: function(e2) {
        var t2 = { name: "WebOS Browser" }, r2 = n.default.getFirstMatch(a, e2) || n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/bada/i], describe: function(e2) {
        var t2 = { name: "Bada" }, r2 = n.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/tizen/i], describe: function(e2) {
        var t2 = { name: "Tizen" }, r2 = n.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/qupzilla/i], describe: function(e2) {
        var t2 = { name: "QupZilla" }, r2 = n.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/librewolf/i], describe: function(e2) {
        var t2 = { name: "LibreWolf" }, r2 = n.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/firefox|iceweasel|fxios/i], describe: function(e2) {
        var t2 = { name: "Firefox" }, r2 = n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/electron/i], describe: function(e2) {
        var t2 = { name: "Electron" }, r2 = n.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/sogoumobilebrowser/i, /metasr/i, /se 2\.[x]/i], describe: function(e2) {
        var t2 = { name: "Sogou Browser" }, r2 = n.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i, e2), i2 = n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, e2), a2 = n.default.getFirstMatch(/se ([\d.]+)x/i, e2), o2 = r2 || i2 || a2;
        return o2 && (t2.version = o2), t2;
      } }, { test: [/MiuiBrowser/i], describe: function(e2) {
        var t2 = { name: "Miui" }, r2 = n.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: function(e2) {
        return !!e2.hasBrand("DuckDuckGo") || e2.test(/\sDdg\/[\d.]+$/i);
      }, describe: function(e2, t2) {
        var r2 = { name: "DuckDuckGo" };
        if (t2) {
          var i2 = t2.getBrandVersion("DuckDuckGo");
          if (i2)
            return r2.version = i2, r2;
        }
        var a2 = n.default.getFirstMatch(/\sDdg\/([\d.]+)$/i, e2);
        return a2 && (r2.version = a2), r2;
      } }, { test: function(e2) {
        return e2.hasBrand("Brave");
      }, describe: function(e2, t2) {
        var r2 = { name: "Brave" };
        if (t2) {
          var i2 = t2.getBrandVersion("Brave");
          if (i2)
            return r2.version = i2, r2;
        }
        return r2;
      } }, { test: [/chromium/i], describe: function(e2) {
        var t2 = { name: "Chromium" }, r2 = n.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, e2) || n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/chrome|crios|crmo/i], describe: function(e2) {
        var t2 = { name: "Chrome" }, r2 = n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/GSA/i], describe: function(e2) {
        var t2 = { name: "Google Search" }, r2 = n.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: function(e2) {
        var t2 = !e2.test(/like android/i), r2 = e2.test(/android/i);
        return t2 && r2;
      }, describe: function(e2) {
        var t2 = { name: "Android Browser" }, r2 = n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/playstation 4/i], describe: function(e2) {
        var t2 = { name: "PlayStation 4" }, r2 = n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/safari|applewebkit/i], describe: function(e2) {
        var t2 = { name: "Safari" }, r2 = n.default.getFirstMatch(a, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/.*/i], describe: function(e2) {
        var t2 = e2.search("\\(") !== -1 ? /^(.*)\/(.*)[ \t]\((.*)/ : /^(.*)\/(.*) /;
        return { name: n.default.getFirstMatch(t2, e2), version: n.default.getSecondMatch(t2, e2) };
      } }];
      t.default = o, e.exports = t.default;
    }, 93: function(e, t, r) {
      t.__esModule = true, t.default = undefined;
      var i, n = (i = r(17)) && i.__esModule ? i : { default: i }, a = r(18);
      var o = [{ test: [/Roku\/DVP/], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, e2);
        return { name: a.OS_MAP.Roku, version: t2 };
      } }, { test: [/windows phone/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, e2);
        return { name: a.OS_MAP.WindowsPhone, version: t2 };
      } }, { test: [/windows /i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, e2), r2 = n.default.getWindowsVersionName(t2);
        return { name: a.OS_MAP.Windows, version: t2, versionName: r2 };
      } }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function(e2) {
        var t2 = { name: a.OS_MAP.iOS }, r2 = n.default.getSecondMatch(/(Version\/)(\d[\d.]+)/, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/macintosh/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, e2).replace(/[_\s]/g, "."), r2 = n.default.getMacOSVersionName(t2), i2 = { name: a.OS_MAP.MacOS, version: t2 };
        return r2 && (i2.versionName = r2), i2;
      } }, { test: [/(ipod|iphone|ipad)/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, e2).replace(/[_\s]/g, ".");
        return { name: a.OS_MAP.iOS, version: t2 };
      } }, { test: [/OpenHarmony/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i, e2);
        return { name: a.OS_MAP.HarmonyOS, version: t2 };
      } }, { test: function(e2) {
        var t2 = !e2.test(/like android/i), r2 = e2.test(/android/i);
        return t2 && r2;
      }, describe: function(e2) {
        var t2 = n.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, e2), r2 = n.default.getAndroidVersionName(t2), i2 = { name: a.OS_MAP.Android, version: t2 };
        return r2 && (i2.versionName = r2), i2;
      } }, { test: [/(web|hpw)[o0]s/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, e2), r2 = { name: a.OS_MAP.WebOS };
        return t2 && t2.length && (r2.version = t2), r2;
      } }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, e2) || n.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, e2) || n.default.getFirstMatch(/\bbb(\d+)/i, e2);
        return { name: a.OS_MAP.BlackBerry, version: t2 };
      } }, { test: [/bada/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, e2);
        return { name: a.OS_MAP.Bada, version: t2 };
      } }, { test: [/tizen/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, e2);
        return { name: a.OS_MAP.Tizen, version: t2 };
      } }, { test: [/linux/i], describe: function() {
        return { name: a.OS_MAP.Linux };
      } }, { test: [/CrOS/], describe: function() {
        return { name: a.OS_MAP.ChromeOS };
      } }, { test: [/PlayStation 4/], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, e2);
        return { name: a.OS_MAP.PlayStation4, version: t2 };
      } }];
      t.default = o, e.exports = t.default;
    }, 94: function(e, t, r) {
      t.__esModule = true, t.default = undefined;
      var i, n = (i = r(17)) && i.__esModule ? i : { default: i }, a = r(18);
      var o = [{ test: [/googlebot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Google" };
      } }, { test: [/linespider/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Line" };
      } }, { test: [/amazonbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Amazon" };
      } }, { test: [/gptbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "OpenAI" };
      } }, { test: [/chatgpt-user/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "OpenAI" };
      } }, { test: [/oai-searchbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "OpenAI" };
      } }, { test: [/baiduspider/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Baidu" };
      } }, { test: [/bingbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Bing" };
      } }, { test: [/duckduckbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "DuckDuckGo" };
      } }, { test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Anthropic" };
      } }, { test: [/omgilibot/i, /webzio-extended/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Webz.io" };
      } }, { test: [/diffbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Diffbot" };
      } }, { test: [/perplexitybot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Perplexity AI" };
      } }, { test: [/perplexity-user/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Perplexity AI" };
      } }, { test: [/youbot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "You.com" };
      } }, { test: [/ia_archiver/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Internet Archive" };
      } }, { test: [/meta-webindexer/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" };
      } }, { test: [/meta-externalads/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" };
      } }, { test: [/meta-externalagent/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" };
      } }, { test: [/meta-externalfetcher/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" };
      } }, { test: [/facebookexternalhit/i, /facebookcatalog/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" };
      } }, { test: [/slackbot/i, /slack-imgProxy/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Slack" };
      } }, { test: [/yahoo/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Yahoo" };
      } }, { test: [/yandexbot/i, /yandexmobilebot/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Yandex" };
      } }, { test: [/pingdom/i], describe: function() {
        return { type: a.PLATFORMS_MAP.bot, vendor: "Pingdom" };
      } }, { test: [/huawei/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/(can-l01)/i, e2) && "Nova", r2 = { type: a.PLATFORMS_MAP.mobile, vendor: "Huawei" };
        return t2 && (r2.model = t2), r2;
      } }, { test: [/nexus\s*(?:7|8|9|10).*/i], describe: function() {
        return { type: a.PLATFORMS_MAP.tablet, vendor: "Nexus" };
      } }, { test: [/ipad/i], describe: function() {
        return { type: a.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" };
      } }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function() {
        return { type: a.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" };
      } }, { test: [/kftt build/i], describe: function() {
        return { type: a.PLATFORMS_MAP.tablet, vendor: "Amazon", model: "Kindle Fire HD 7" };
      } }, { test: [/silk/i], describe: function() {
        return { type: a.PLATFORMS_MAP.tablet, vendor: "Amazon" };
      } }, { test: [/tablet(?! pc)/i], describe: function() {
        return { type: a.PLATFORMS_MAP.tablet };
      } }, { test: function(e2) {
        var t2 = e2.test(/ipod|iphone/i), r2 = e2.test(/like (ipod|iphone)/i);
        return t2 && !r2;
      }, describe: function(e2) {
        var t2 = n.default.getFirstMatch(/(ipod|iphone)/i, e2);
        return { type: a.PLATFORMS_MAP.mobile, vendor: "Apple", model: t2 };
      } }, { test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], describe: function() {
        return { type: a.PLATFORMS_MAP.mobile, vendor: "Nexus" };
      } }, { test: [/Nokia/i], describe: function(e2) {
        var t2 = n.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i, e2), r2 = { type: a.PLATFORMS_MAP.mobile, vendor: "Nokia" };
        return t2 && (r2.model = t2), r2;
      } }, { test: [/[^-]mobi/i], describe: function() {
        return { type: a.PLATFORMS_MAP.mobile };
      } }, { test: function(e2) {
        return e2.getBrowserName(true) === "blackberry";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.mobile, vendor: "BlackBerry" };
      } }, { test: function(e2) {
        return e2.getBrowserName(true) === "bada";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.mobile };
      } }, { test: function(e2) {
        return e2.getBrowserName() === "windows phone";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.mobile, vendor: "Microsoft" };
      } }, { test: function(e2) {
        var t2 = Number(String(e2.getOSVersion()).split(".")[0]);
        return e2.getOSName(true) === "android" && t2 >= 3;
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.tablet };
      } }, { test: function(e2) {
        return e2.getOSName(true) === "android";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.mobile };
      } }, { test: [/smart-?tv|smarttv/i], describe: function() {
        return { type: a.PLATFORMS_MAP.tv };
      } }, { test: [/netcast/i], describe: function() {
        return { type: a.PLATFORMS_MAP.tv };
      } }, { test: function(e2) {
        return e2.getOSName(true) === "macos";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.desktop, vendor: "Apple" };
      } }, { test: function(e2) {
        return e2.getOSName(true) === "windows";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.desktop };
      } }, { test: function(e2) {
        return e2.getOSName(true) === "linux";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.desktop };
      } }, { test: function(e2) {
        return e2.getOSName(true) === "playstation 4";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.tv };
      } }, { test: function(e2) {
        return e2.getOSName(true) === "roku";
      }, describe: function() {
        return { type: a.PLATFORMS_MAP.tv };
      } }];
      t.default = o, e.exports = t.default;
    }, 95: function(e, t, r) {
      t.__esModule = true, t.default = undefined;
      var i, n = (i = r(17)) && i.__esModule ? i : { default: i }, a = r(18);
      var o = [{ test: function(e2) {
        return e2.getBrowserName(true) === "microsoft edge";
      }, describe: function(e2) {
        if (/\sedg\//i.test(e2))
          return { name: a.ENGINE_MAP.Blink };
        var t2 = n.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, e2);
        return { name: a.ENGINE_MAP.EdgeHTML, version: t2 };
      } }, { test: [/trident/i], describe: function(e2) {
        var t2 = { name: a.ENGINE_MAP.Trident }, r2 = n.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: function(e2) {
        return e2.test(/presto/i);
      }, describe: function(e2) {
        var t2 = { name: a.ENGINE_MAP.Presto }, r2 = n.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: function(e2) {
        var t2 = e2.test(/gecko/i), r2 = e2.test(/like gecko/i);
        return t2 && !r2;
      }, describe: function(e2) {
        var t2 = { name: a.ENGINE_MAP.Gecko }, r2 = n.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }, { test: [/(apple)?webkit\/537\.36/i], describe: function() {
        return { name: a.ENGINE_MAP.Blink };
      } }, { test: [/(apple)?webkit/i], describe: function(e2) {
        var t2 = { name: a.ENGINE_MAP.WebKit }, r2 = n.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, e2);
        return r2 && (t2.version = r2), t2;
      } }];
      t.default = o, e.exports = t.default;
    } });
  });
});

// ../../node_modules/.pnpm/@aws-sdk+core@3.974.23/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js
var require_client4 = __commonJS((exports) => {
  var __dirname = "/home/runner/work/wraps/wraps/node_modules/.pnpm/@aws-sdk+core@3.974.23/node_modules/@aws-sdk/core/dist-cjs/submodules/client";
  var { Retry, RETRY_MODES } = require_retry();
  var { HttpRequest, parseUrl: parseUrl2 } = require_protocols();
  var { InvokeStore } = require_invoke_store();
  var { normalizeProvider } = require_dist_cjs5();
  var { platform: platform3, release: release3 } = __require("node:os");
  var { versions: versions2, env: env2 } = __require("node:process");
  var { booleanSelector, SelectorType, loadConfig, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS } = require_config2();
  var { REGION_ENV_NAME, REGION_INI_NAME, resolveRegionConfig } = require_config2();
  exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
  exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
  exports.REGION_ENV_NAME = REGION_ENV_NAME;
  exports.REGION_INI_NAME = REGION_INI_NAME;
  exports.resolveRegionConfig = resolveRegionConfig;
  var { readFile: readFile2 } = __require("node:fs/promises");
  var { normalize: normalize3, sep: sep2, join: join4 } = __require("node:path");
  var { isValidHostLabel, isIpAddress, customEndpointFunctions } = require_endpoints();
  var { EndpointError, resolveEndpoint } = require_endpoints();
  exports.EndpointError = EndpointError;
  exports.isIpAddress = isIpAddress;
  exports.resolveEndpoint = resolveEndpoint;
  var state = {
    warningEmitted: false
  };
  var emitWarningIfUnsupportedVersion = (version3) => {
    if (version3 && !state.warningEmitted) {
      if (process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED === "true") {
        state.warningEmitted = true;
        return;
      }
      const userMajorVersion = parseInt(version3.substring(1, version3.indexOf(".")));
      const vv = 22;
      if (userMajorVersion < vv) {
        state.warningEmitted = true;
        process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
versions published after the first week of January 2027
will require node >=${vv}. You are running node ${version3}.

To continue receiving updates to AWS services, bug fixes,
and security updates please upgrade to node >=${vv}.

More information can be found at: https://a.co/c895JFp`);
      }
    }
  };
  var longPollMiddleware = () => (next, context10) => async (args) => {
    context10.__retryLongPoll = true;
    return next(args);
  };
  var longPollMiddlewareOptions = {
    name: "longPollMiddleware",
    tags: ["RETRY"],
    step: "initialize",
    override: true
  };
  var getLongPollPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
    }
  });
  function setCredentialFeature(credentials, feature, value) {
    if (!credentials.$source) {
      credentials.$source = {};
    }
    credentials.$source[feature] = value;
    return credentials;
  }
  Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
  function setFeature(context10, feature, value) {
    if (!context10.__aws_sdk_context) {
      context10.__aws_sdk_context = {
        features: {}
      };
    } else if (!context10.__aws_sdk_context.features) {
      context10.__aws_sdk_context.features = {};
    }
    context10.__aws_sdk_context.features[feature] = value;
  }
  function setTokenFeature(token, feature, value) {
    if (!token.$source) {
      token.$source = {};
    }
    token.$source[feature] = value;
    return token;
  }
  function resolveHostHeaderConfig(input) {
    return input;
  }
  var hostHeaderMiddleware = (options) => (next) => async (args) => {
    if (!HttpRequest.isInstance(args.request))
      return next(args);
    const { request: request2 } = args;
    const { handlerProtocol = "" } = options.requestHandler.metadata || {};
    if (handlerProtocol.indexOf("h2") >= 0 && !request2.headers[":authority"]) {
      delete request2.headers["host"];
      request2.headers[":authority"] = request2.hostname + (request2.port ? ":" + request2.port : "");
    } else if (!request2.headers["host"]) {
      let host = request2.hostname;
      if (request2.port != null)
        host += `:${request2.port}`;
      request2.headers["host"] = host;
    }
    return next(args);
  };
  var hostHeaderMiddlewareOptions = {
    name: "hostHeaderMiddleware",
    step: "build",
    priority: "low",
    tags: ["HOST"],
    override: true
  };
  var getHostHeaderPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
    }
  });
  var loggerMiddleware = () => (next, context10) => async (args) => {
    try {
      const response = await next(args);
      const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context10;
      const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
      const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context10.inputFilterSensitiveLog;
      const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context10.outputFilterSensitiveLog;
      const { $metadata, ...outputWithoutMetadata } = response.output;
      logger?.info?.({
        clientName,
        commandName,
        input: inputFilterSensitiveLog(args.input),
        output: outputFilterSensitiveLog(outputWithoutMetadata),
        metadata: $metadata
      });
      return response;
    } catch (error2) {
      const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context10;
      const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
      const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context10.inputFilterSensitiveLog;
      logger?.error?.({
        clientName,
        commandName,
        input: inputFilterSensitiveLog(args.input),
        error: error2,
        metadata: error2.$metadata
      });
      throw error2;
    }
  };
  var loggerMiddlewareOptions = {
    name: "loggerMiddleware",
    tags: ["LOGGER"],
    step: "initialize",
    override: true
  };
  var getLoggerPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
    }
  });
  var recursionDetectionMiddlewareOptions = {
    step: "build",
    tags: ["RECURSION_DETECTION"],
    name: "recursionDetectionMiddleware",
    override: true,
    priority: "low"
  };
  var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
  var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
  var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
  var recursionDetectionMiddleware = () => (next) => async (args) => {
    const { request: request2 } = args;
    if (!HttpRequest.isInstance(request2)) {
      return next(args);
    }
    const traceIdHeader = Object.keys(request2.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;
    if (request2.headers.hasOwnProperty(traceIdHeader)) {
      return next(args);
    }
    const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
    const traceIdFromEnv = process.env[ENV_TRACE_ID];
    const invokeStore = await InvokeStore.getInstanceAsync();
    const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
    const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
    const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
    if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
      request2.headers[TRACE_ID_HEADER_NAME] = traceId;
    }
    return next({
      ...args,
      request: request2
    });
  };
  var getRecursionDetectionPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);
    }
  });
  var DEFAULT_UA_APP_ID = undefined;
  function isValidUserAgentAppId(appId) {
    if (appId === undefined) {
      return true;
    }
    return typeof appId === "string" && appId.length <= 50;
  }
  function resolveUserAgentConfig(input) {
    const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
    const { customUserAgent } = input;
    return Object.assign(input, {
      customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
      userAgentAppId: async () => {
        const appId = await normalizedAppIdProvider();
        if (!isValidUserAgentAppId(appId)) {
          const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
          if (typeof appId !== "string") {
            logger?.warn("userAgentAppId must be a string or undefined.");
          } else if (appId.length > 50) {
            logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
          }
        }
        return appId;
      }
    });
  }
  var partitionsInfo = {
    partitions: [
      {
        id: "aws",
        outputs: {
          dnsSuffix: "amazonaws.com",
          dualStackDnsSuffix: "api.aws",
          implicitGlobalRegion: "us-east-1",
          name: "aws",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
        regions: {
          "af-south-1": {
            description: "Africa (Cape Town)"
          },
          "ap-east-1": {
            description: "Asia Pacific (Hong Kong)"
          },
          "ap-east-2": {
            description: "Asia Pacific (Taipei)"
          },
          "ap-northeast-1": {
            description: "Asia Pacific (Tokyo)"
          },
          "ap-northeast-2": {
            description: "Asia Pacific (Seoul)"
          },
          "ap-northeast-3": {
            description: "Asia Pacific (Osaka)"
          },
          "ap-south-1": {
            description: "Asia Pacific (Mumbai)"
          },
          "ap-south-2": {
            description: "Asia Pacific (Hyderabad)"
          },
          "ap-southeast-1": {
            description: "Asia Pacific (Singapore)"
          },
          "ap-southeast-2": {
            description: "Asia Pacific (Sydney)"
          },
          "ap-southeast-3": {
            description: "Asia Pacific (Jakarta)"
          },
          "ap-southeast-4": {
            description: "Asia Pacific (Melbourne)"
          },
          "ap-southeast-5": {
            description: "Asia Pacific (Malaysia)"
          },
          "ap-southeast-6": {
            description: "Asia Pacific (New Zealand)"
          },
          "ap-southeast-7": {
            description: "Asia Pacific (Thailand)"
          },
          "aws-global": {
            description: "aws global region"
          },
          "ca-central-1": {
            description: "Canada (Central)"
          },
          "ca-west-1": {
            description: "Canada West (Calgary)"
          },
          "eu-central-1": {
            description: "Europe (Frankfurt)"
          },
          "eu-central-2": {
            description: "Europe (Zurich)"
          },
          "eu-north-1": {
            description: "Europe (Stockholm)"
          },
          "eu-south-1": {
            description: "Europe (Milan)"
          },
          "eu-south-2": {
            description: "Europe (Spain)"
          },
          "eu-west-1": {
            description: "Europe (Ireland)"
          },
          "eu-west-2": {
            description: "Europe (London)"
          },
          "eu-west-3": {
            description: "Europe (Paris)"
          },
          "il-central-1": {
            description: "Israel (Tel Aviv)"
          },
          "me-central-1": {
            description: "Middle East (UAE)"
          },
          "me-south-1": {
            description: "Middle East (Bahrain)"
          },
          "mx-central-1": {
            description: "Mexico (Central)"
          },
          "sa-east-1": {
            description: "South America (Sao Paulo)"
          },
          "us-east-1": {
            description: "US East (N. Virginia)"
          },
          "us-east-2": {
            description: "US East (Ohio)"
          },
          "us-west-1": {
            description: "US West (N. California)"
          },
          "us-west-2": {
            description: "US West (Oregon)"
          }
        }
      },
      {
        id: "aws-cn",
        outputs: {
          dnsSuffix: "amazonaws.com.cn",
          dualStackDnsSuffix: "api.amazonwebservices.com.cn",
          implicitGlobalRegion: "cn-northwest-1",
          name: "aws-cn",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^cn\\-\\w+\\-\\d+$",
        regions: {
          "aws-cn-global": {
            description: "aws-cn global region"
          },
          "cn-north-1": {
            description: "China (Beijing)"
          },
          "cn-northwest-1": {
            description: "China (Ningxia)"
          }
        }
      },
      {
        id: "aws-eusc",
        outputs: {
          dnsSuffix: "amazonaws.eu",
          dualStackDnsSuffix: "api.amazonwebservices.eu",
          implicitGlobalRegion: "eusc-de-east-1",
          name: "aws-eusc",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
        regions: {
          "eusc-de-east-1": {
            description: "AWS European Sovereign Cloud (Germany)"
          }
        }
      },
      {
        id: "aws-iso",
        outputs: {
          dnsSuffix: "c2s.ic.gov",
          dualStackDnsSuffix: "api.aws.ic.gov",
          implicitGlobalRegion: "us-iso-east-1",
          name: "aws-iso",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-global": {
            description: "aws-iso global region"
          },
          "us-iso-east-1": {
            description: "US ISO East"
          },
          "us-iso-west-1": {
            description: "US ISO WEST"
          }
        }
      },
      {
        id: "aws-iso-b",
        outputs: {
          dnsSuffix: "sc2s.sgov.gov",
          dualStackDnsSuffix: "api.aws.scloud",
          implicitGlobalRegion: "us-isob-east-1",
          name: "aws-iso-b",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-b-global": {
            description: "aws-iso-b global region"
          },
          "us-isob-east-1": {
            description: "US ISOB East (Ohio)"
          },
          "us-isob-west-1": {
            description: "US ISOB West"
          }
        }
      },
      {
        id: "aws-iso-e",
        outputs: {
          dnsSuffix: "cloud.adc-e.uk",
          dualStackDnsSuffix: "api.cloud-aws.adc-e.uk",
          implicitGlobalRegion: "eu-isoe-west-1",
          name: "aws-iso-e",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-e-global": {
            description: "aws-iso-e global region"
          },
          "eu-isoe-west-1": {
            description: "EU ISOE West"
          }
        }
      },
      {
        id: "aws-iso-f",
        outputs: {
          dnsSuffix: "csp.hci.ic.gov",
          dualStackDnsSuffix: "api.aws.hci.ic.gov",
          implicitGlobalRegion: "us-isof-south-1",
          name: "aws-iso-f",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
        regions: {
          "aws-iso-f-global": {
            description: "aws-iso-f global region"
          },
          "us-isof-east-1": {
            description: "US ISOF EAST"
          },
          "us-isof-south-1": {
            description: "US ISOF SOUTH"
          }
        }
      },
      {
        id: "aws-us-gov",
        outputs: {
          dnsSuffix: "amazonaws.com",
          dualStackDnsSuffix: "api.aws",
          implicitGlobalRegion: "us-gov-west-1",
          name: "aws-us-gov",
          supportsDualStack: true,
          supportsFIPS: true
        },
        regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
        regions: {
          "aws-us-gov-global": {
            description: "aws-us-gov global region"
          },
          "us-gov-east-1": {
            description: "AWS GovCloud (US-East)"
          },
          "us-gov-west-1": {
            description: "AWS GovCloud (US-West)"
          }
        }
      }
    ],
    version: "1.1"
  };
  var selectedPartitionsInfo = partitionsInfo;
  var selectedUserAgentPrefix = "";
  var partition = (value) => {
    const { partitions } = selectedPartitionsInfo;
    for (const partition2 of partitions) {
      const { regions, outputs } = partition2;
      for (const [region, regionData] of Object.entries(regions)) {
        if (region === value) {
          return {
            ...outputs,
            ...regionData
          };
        }
      }
    }
    for (const partition2 of partitions) {
      const { regionRegex, outputs } = partition2;
      if (new RegExp(regionRegex).test(value)) {
        return {
          ...outputs
        };
      }
    }
    const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws");
    if (!DEFAULT_PARTITION) {
      throw new Error("Provided region was not found in the partition array or regex," + " and default partition with id 'aws' doesn't exist.");
    }
    return {
      ...DEFAULT_PARTITION.outputs
    };
  };
  var setPartitionInfo = (partitionsInfo2, userAgentPrefix = "") => {
    selectedPartitionsInfo = partitionsInfo2;
    selectedUserAgentPrefix = userAgentPrefix;
  };
  var useDefaultPartitionInfo = () => {
    setPartitionInfo(partitionsInfo, "");
  };
  var getUserAgentPrefix = () => selectedUserAgentPrefix;
  var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
  async function checkFeatures(context10, config, args) {
    const request2 = args.request;
    if (request2?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
      setFeature(context10, "PROTOCOL_RPC_V2_CBOR", "M");
    }
    if (typeof config.retryStrategy === "function") {
      const retryStrategy = await config.retryStrategy();
      if (typeof retryStrategy.mode === "string") {
        switch (retryStrategy.mode) {
          case RETRY_MODES.ADAPTIVE:
            setFeature(context10, "RETRY_MODE_ADAPTIVE", "F");
            break;
          case RETRY_MODES.STANDARD:
            setFeature(context10, "RETRY_MODE_STANDARD", "E");
            break;
        }
      }
    }
    if (typeof config.accountIdEndpointMode === "function") {
      const endpointV2 = context10.endpointV2;
      if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
        setFeature(context10, "ACCOUNT_ID_ENDPOINT", "O");
      }
      switch (await config.accountIdEndpointMode?.()) {
        case "disabled":
          setFeature(context10, "ACCOUNT_ID_MODE_DISABLED", "Q");
          break;
        case "preferred":
          setFeature(context10, "ACCOUNT_ID_MODE_PREFERRED", "P");
          break;
        case "required":
          setFeature(context10, "ACCOUNT_ID_MODE_REQUIRED", "R");
          break;
      }
    }
    const identity = context10.__smithy_context?.selectedHttpAuthScheme?.identity;
    if (identity?.$source) {
      const credentials = identity;
      if (credentials.accountId) {
        setFeature(context10, "RESOLVED_ACCOUNT_ID", "T");
      }
      for (const [key, value] of Object.entries(credentials.$source ?? {})) {
        setFeature(context10, key, value);
      }
    }
  }
  var USER_AGENT = "user-agent";
  var X_AMZ_USER_AGENT = "x-amz-user-agent";
  var SPACE = " ";
  var UA_NAME_SEPARATOR = "/";
  var UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
  var UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
  var UA_ESCAPE_CHAR = "-";
  var BYTE_LIMIT = 1024;
  function encodeFeatures(features) {
    let buffer = "";
    for (const key in features) {
      const val = features[key];
      if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
        if (buffer.length) {
          buffer += "," + val;
        } else {
          buffer += val;
        }
        continue;
      }
      break;
    }
    return buffer;
  }
  var userAgentMiddleware = (options) => (next, context10) => async (args) => {
    const { request: request2 } = args;
    if (!HttpRequest.isInstance(request2)) {
      return next(args);
    }
    const { headers } = request2;
    const userAgent = context10?.userAgent?.map(escapeUserAgent) || [];
    const defaultUserAgent2 = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
    await checkFeatures(context10, options, args);
    const awsContext = context10;
    defaultUserAgent2.push(`m/${encodeFeatures(Object.assign({}, context10.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
    const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
    const appId = await options.userAgentAppId();
    if (appId) {
      defaultUserAgent2.push(escapeUserAgent([`app`, `${appId}`]));
    }
    const prefix = getUserAgentPrefix();
    const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent2, ...userAgent, ...customUserAgent]).join(SPACE);
    const normalUAValue = [
      ...defaultUserAgent2.filter((section) => section.startsWith("aws-sdk-")),
      ...customUserAgent
    ].join(SPACE);
    if (options.runtime !== "browser") {
      if (normalUAValue) {
        headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
      }
      headers[USER_AGENT] = sdkUserAgentValue;
    } else {
      headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
    }
    return next({
      ...args,
      request: request2
    });
  };
  var escapeUserAgent = (userAgentPair) => {
    const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
    const version3 = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
    const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
    const prefix = name.substring(0, prefixSeparatorIndex);
    let uaName = name.substring(prefixSeparatorIndex + 1);
    if (prefix === "api") {
      uaName = uaName.toLowerCase();
    }
    return [prefix, uaName, version3].filter((item) => item && item.length > 0).reduce((acc, item, index2) => {
      switch (index2) {
        case 0:
          return item;
        case 1:
          return `${acc}/${item}`;
        default:
          return `${acc}#${item}`;
      }
    }, "");
  };
  var getUserAgentMiddlewareOptions = {
    name: "getUserAgentMiddleware",
    step: "build",
    priority: "low",
    tags: ["SET_USER_AGENT", "USER_AGENT"],
    override: true
  };
  var getUserAgentPlugin = (config) => ({
    applyToStack: (clientStack) => {
      clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
    }
  });
  var getRuntimeUserAgentPair = () => {
    const runtimesToCheck = ["deno", "bun", "llrt"];
    for (const runtime of runtimesToCheck) {
      if (versions2[runtime]) {
        return [`md/${runtime}`, versions2[runtime]];
      }
    }
    return ["md/nodejs", versions2.node];
  };
  var getNodeModulesParentDirs = (dirname3) => {
    const cwd = process.cwd();
    if (!dirname3) {
      return [cwd];
    }
    const normalizedPath = normalize3(dirname3);
    const parts = normalizedPath.split(sep2);
    const nodeModulesIndex = parts.indexOf("node_modules");
    const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(sep2) : normalizedPath;
    if (cwd === parentDir) {
      return [cwd];
    }
    return [parentDir, cwd];
  };
  var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
  var getSanitizedTypeScriptVersion = (version3 = "") => {
    const match = version3.match(SEMVER_REGEX);
    if (!match) {
      return;
    }
    const [major, minor, patch, prerelease] = [match[1], match[2], match[3], match[4]];
    return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
  };
  var ALLOWED_PREFIXES = ["^", "~", ">=", "<=", ">", "<"];
  var ALLOWED_DIST_TAGS = ["latest", "beta", "dev", "rc", "insiders", "next"];
  var getSanitizedDevTypeScriptVersion = (version3 = "") => {
    if (ALLOWED_DIST_TAGS.includes(version3)) {
      return version3;
    }
    const prefix = ALLOWED_PREFIXES.find((p) => version3.startsWith(p)) ?? "";
    const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version3.slice(prefix.length));
    if (!sanitizedTypeScriptVersion) {
      return;
    }
    return `${prefix}${sanitizedTypeScriptVersion}`;
  };
  var tscVersion;
  var TS_PACKAGE_JSON = join4("node_modules", "typescript", "package.json");
  var getTypeScriptUserAgentPair = async () => {
    if (tscVersion === null) {
      return;
    } else if (typeof tscVersion === "string") {
      return ["md/tsc", tscVersion];
    }
    let isTypeScriptDetectionDisabled = false;
    try {
      isTypeScriptDetectionDisabled = booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", SelectorType.ENV) || false;
    } catch {}
    if (isTypeScriptDetectionDisabled) {
      tscVersion = null;
      return;
    }
    const dirname3 = typeof __dirname !== "undefined" ? __dirname : undefined;
    const nodeModulesParentDirs = getNodeModulesParentDirs(dirname3);
    let versionFromApp;
    for (const nodeModulesParentDir of nodeModulesParentDirs) {
      try {
        const appPackageJsonPath = join4(nodeModulesParentDir, "package.json");
        const packageJson = await readFile2(appPackageJsonPath, "utf-8");
        const { dependencies, devDependencies } = JSON.parse(packageJson);
        const version3 = devDependencies?.typescript ?? dependencies?.typescript;
        if (typeof version3 !== "string") {
          continue;
        }
        versionFromApp = version3;
        break;
      } catch {}
    }
    if (!versionFromApp) {
      tscVersion = null;
      return;
    }
    let versionFromNodeModules;
    for (const nodeModulesParentDir of nodeModulesParentDirs) {
      try {
        const tsPackageJsonPath = join4(nodeModulesParentDir, TS_PACKAGE_JSON);
        const packageJson = await readFile2(tsPackageJsonPath, "utf-8");
        const { version: version3 } = JSON.parse(packageJson);
        const sanitizedVersion2 = getSanitizedTypeScriptVersion(version3);
        if (typeof sanitizedVersion2 !== "string") {
          continue;
        }
        versionFromNodeModules = sanitizedVersion2;
        break;
      } catch {}
    }
    if (versionFromNodeModules) {
      tscVersion = versionFromNodeModules;
      return ["md/tsc", tscVersion];
    }
    const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp);
    if (typeof sanitizedVersion !== "string") {
      tscVersion = null;
      return;
    }
    tscVersion = `dev_${sanitizedVersion}`;
    return ["md/tsc", tscVersion];
  };
  var crtAvailability = {
    isCrtAvailable: false
  };
  var isCrtAvailable = () => {
    if (crtAvailability.isCrtAvailable) {
      return ["md/crt-avail"];
    }
    return null;
  };
  var createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
    const runtimeUserAgentPair = getRuntimeUserAgentPair();
    return async (config) => {
      const sections = [
        ["aws-sdk-js", clientVersion],
        ["ua", "2.1"],
        [`os/${platform3()}`, release3()],
        ["lang/js"],
        runtimeUserAgentPair
      ];
      const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
      if (typescriptUserAgentPair) {
        sections.push(typescriptUserAgentPair);
      }
      const crtAvailable = isCrtAvailable();
      if (crtAvailable) {
        sections.push(crtAvailable);
      }
      if (serviceId) {
        sections.push([`api/${serviceId}`, clientVersion]);
      }
      if (env2.AWS_EXECUTION_ENV) {
        sections.push([`exec-env/${env2.AWS_EXECUTION_ENV}`]);
      }
      const appId = await config?.userAgentAppId?.();
      const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
      return resolvedUserAgent;
    };
  };
  var defaultUserAgent = createDefaultUserAgentProvider;
  var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
  var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
  var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
  var NODE_APP_ID_CONFIG_OPTIONS = {
    environmentVariableSelector: (env3) => env3[UA_APP_ID_ENV_NAME],
    configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
    default: DEFAULT_UA_APP_ID
  };
  var createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => {
    const module2 = require_es5();
    const parse = module2.parse ?? module2.default.parse ?? (() => "");
    const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined;
    const sections = [
      ["aws-sdk-js", clientVersion],
      ["ua", "2.1"],
      [`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version],
      ["lang/js"],
      ["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`]
    ];
    if (serviceId) {
      sections.push([`api/${serviceId}`, clientVersion]);
    }
    const appId = await config?.userAgentAppId?.();
    if (appId) {
      sections.push([`app/${appId}`]);
    }
    return sections;
  };
  var fallback = {
    os(ua) {
      if (/iPhone|iPad|iPod/.test(ua))
        return "iOS";
      if (/Macintosh|Mac OS X/.test(ua))
        return "macOS";
      if (/Windows NT/.test(ua))
        return "Windows";
      if (/Android/.test(ua))
        return "Android";
      if (/Linux/.test(ua))
        return "Linux";
      return;
    },
    browser(ua) {
      if (/EdgiOS|EdgA|Edg\//.test(ua))
        return "Microsoft Edge";
      if (/Firefox\//.test(ua))
        return "Firefox";
      if (/Chrome\//.test(ua))
        return "Chrome";
      if (/Safari\//.test(ua))
        return "Safari";
      return;
    }
  };
  var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
    if (allowSubDomains) {
      for (const label of value.split(".")) {
        if (!isVirtualHostableS3Bucket(label)) {
          return false;
        }
      }
      return true;
    }
    if (!isValidHostLabel(value)) {
      return false;
    }
    if (value.length < 3 || value.length > 63) {
      return false;
    }
    if (value !== value.toLowerCase()) {
      return false;
    }
    if (isIpAddress(value)) {
      return false;
    }
    return true;
  };
  var ARN_DELIMITER = ":";
  var RESOURCE_DELIMITER = "/";
  var parseArn = (value) => {
    const segments = value.split(ARN_DELIMITER);
    if (segments.length < 6)
      return null;
    const [arn, partition2, service, region, accountId, ...resourcePath] = segments;
    if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "")
      return null;
    const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
    return {
      partition: partition2,
      service,
      region,
      accountId,
      resourceId
    };
  };
  var awsEndpointFunctions = {
    isVirtualHostableS3Bucket,
    parseArn,
    partition
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
  var resolveDefaultAwsRegionalEndpointsConfig = (input) => {
    if (typeof input.endpointProvider !== "function") {
      throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");
    }
    const { endpoint } = input;
    if (endpoint === undefined) {
      input.endpoint = async () => {
        return toEndpointV1(input.endpointProvider({
          Region: typeof input.region === "function" ? await input.region() : input.region,
          UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint,
          UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint,
          Endpoint: undefined
        }, { logger: input.logger }));
      };
    }
    return input;
  };
  var toEndpointV1 = (endpoint) => parseUrl2(endpoint.url);
  function stsRegionDefaultResolver(loaderConfig = {}) {
    return loadConfig({
      ...NODE_REGION_CONFIG_OPTIONS,
      async default() {
        if (!warning.silence) {
          console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
        }
        return "us-east-1";
      }
    }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
  }
  var warning = {
    silence: false
  };
  var getAwsRegionExtensionConfiguration = (runtimeConfig) => {
    return {
      setRegion(region) {
        runtimeConfig.region = region;
      },
      region() {
        return runtimeConfig.region;
      }
    };
  };
  var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
    return {
      region: awsRegionExtensionConfiguration.region()
    };
  };
  exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID;
  exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS;
  exports.UA_APP_ID_ENV_NAME = UA_APP_ID_ENV_NAME;
  exports.UA_APP_ID_INI_NAME = UA_APP_ID_INI_NAME;
  exports.awsEndpointFunctions = awsEndpointFunctions;
  exports.createDefaultUserAgentProvider = createDefaultUserAgentProvider;
  exports.createUserAgentStringParsingProvider = createUserAgentStringParsingProvider;
  exports.crtAvailability = crtAvailability;
  exports.defaultUserAgent = defaultUserAgent;
  exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
  exports.fallback = fallback;
  exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration;
  exports.getHostHeaderPlugin = getHostHeaderPlugin;
  exports.getLoggerPlugin = getLoggerPlugin;
  exports.getLongPollPlugin = getLongPollPlugin;
  exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin;
  exports.getUserAgentMiddlewareOptions = getUserAgentMiddlewareOptions;
  exports.getUserAgentPlugin = getUserAgentPlugin;
  exports.getUserAgentPrefix = getUserAgentPrefix;
  exports.hostHeaderMiddleware = hostHeaderMiddleware;
  exports.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions;
  exports.isVirtualHostableS3Bucket = isVirtualHostableS3Bucket;
  exports.loggerMiddleware = loggerMiddleware;
  exports.loggerMiddlewareOptions = loggerMiddlewareOptions;
  exports.parseArn = parseArn;
  exports.partition = partition;
  exports.recursionDetectionMiddleware = recursionDetectionMiddleware;
  exports.recursionDetectionMiddlewareOptions = recursionDetectionMiddlewareOptions;
  exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration;
  exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig;
  exports.resolveHostHeaderConfig = resolveHostHeaderConfig;
  exports.resolveUserAgentConfig = resolveUserAgentConfig;
  exports.setCredentialFeature = setCredentialFeature;
  exports.setFeature = setFeature;
  exports.setPartitionInfo = setPartitionInfo;
  exports.setTokenFeature = setTokenFeature;
  exports.state = state;
  exports.stsRegionDefaultResolver = stsRegionDefaultResolver;
  exports.stsRegionWarning = warning;
  exports.toEndpointV1 = toEndpointV1;
  exports.useDefaultPartitionInfo = useDefaultPartitionInfo;
  exports.userAgentMiddleware = userAgentMiddleware;
});

// ../../node_modules/.pnpm/@smithy+signature-v4@5.5.2/node_modules/@smithy/signature-v4/dist-cjs/index.js
var require_dist_cjs6 = __commonJS((exports) => {
  var { fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require_serde();
  var { normalizeProvider } = require_client3();
  var { escapeUri, HttpRequest } = require_protocols();

  class HeaderFormatter {
    format(headers) {
      const chunks = [];
      for (const headerName of Object.keys(headers)) {
        const bytes = fromUtf8(headerName);
        chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
      }
      const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
      let position = 0;
      for (const chunk of chunks) {
        out.set(chunk, position);
        position += chunk.byteLength;
      }
      return out;
    }
    formatHeaderValue(header) {
      switch (header.type) {
        case "boolean":
          return Uint8Array.from([header.value ? 0 : 1]);
        case "byte":
          return Uint8Array.from([2, header.value]);
        case "short":
          const shortView = new DataView(new ArrayBuffer(3));
          shortView.setUint8(0, 3);
          shortView.setInt16(1, header.value, false);
          return new Uint8Array(shortView.buffer);
        case "integer":
          const intView = new DataView(new ArrayBuffer(5));
          intView.setUint8(0, 4);
          intView.setInt32(1, header.value, false);
          return new Uint8Array(intView.buffer);
        case "long":
          const longBytes = new Uint8Array(9);
          longBytes[0] = 5;
          longBytes.set(header.value.bytes, 1);
          return longBytes;
        case "binary":
          const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
          binView.setUint8(0, 6);
          binView.setUint16(1, header.value.byteLength, false);
          const binBytes = new Uint8Array(binView.buffer);
          binBytes.set(header.value, 3);
          return binBytes;
        case "string":
          const utf8Bytes = fromUtf8(header.value);
          const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
          strView.setUint8(0, 7);
          strView.setUint16(1, utf8Bytes.byteLength, false);
          const strBytes = new Uint8Array(strView.buffer);
          strBytes.set(utf8Bytes, 3);
          return strBytes;
        case "timestamp":
          const tsBytes = new Uint8Array(9);
          tsBytes[0] = 8;
          tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
          return tsBytes;
        case "uuid":
          if (!UUID_PATTERN.test(header.value)) {
            throw new Error(`Invalid UUID received: ${header.value}`);
          }
          const uuidBytes = new Uint8Array(17);
          uuidBytes[0] = 9;
          uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1);
          return uuidBytes;
      }
    }
  }
  var HEADER_VALUE_TYPE;
  (function(HEADER_VALUE_TYPE2) {
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp";
    HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid";
  })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
  var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;

  class Int64 {
    bytes;
    constructor(bytes) {
      this.bytes = bytes;
      if (bytes.byteLength !== 8) {
        throw new Error("Int64 buffers must be exactly 8 bytes");
      }
    }
    static fromNumber(number) {
      if (number > 9223372036854776000 || number < -9223372036854776000) {
        throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
      }
      const bytes = new Uint8Array(8);
      for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
        bytes[i] = remaining;
      }
      if (number < 0) {
        negate(bytes);
      }
      return new Int64(bytes);
    }
    valueOf() {
      const bytes = this.bytes.slice(0);
      const negative = bytes[0] & 128;
      if (negative) {
        negate(bytes);
      }
      return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);
    }
    toString() {
      return String(this.valueOf());
    }
  }
  function negate(bytes) {
    for (let i = 0;i < 8; i++) {
      bytes[i] ^= 255;
    }
    for (let i = 7;i > -1; i--) {
      bytes[i]++;
      if (bytes[i] !== 0)
        break;
    }
  }
  var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
  var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
  var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
  var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
  var EXPIRES_QUERY_PARAM = "X-Amz-Expires";
  var SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
  var TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
  var REGION_SET_PARAM = "X-Amz-Region-Set";
  var AUTH_HEADER = "authorization";
  var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
  var DATE_HEADER = "date";
  var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];
  var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();
  var SHA256_HEADER = "x-amz-content-sha256";
  var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
  var HOST_HEADER = "host";
  var ALWAYS_UNSIGNABLE_HEADERS = {
    authorization: true,
    "cache-control": true,
    connection: true,
    expect: true,
    from: true,
    "keep-alive": true,
    "max-forwards": true,
    pragma: true,
    referer: true,
    te: true,
    trailer: true,
    "transfer-encoding": true,
    upgrade: true,
    "user-agent": true,
    "x-amzn-trace-id": true
  };
  var PROXY_HEADER_PATTERN = /^proxy-/;
  var SEC_HEADER_PATTERN = /^sec-/;
  var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];
  var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
  var ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256";
  var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
  var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
  var MAX_CACHE_SIZE = 50;
  var KEY_TYPE_IDENTIFIER = "aws4_request";
  var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
  var getCanonicalQuery = ({ query = {} }) => {
    const keys = [];
    const serialized = {};
    for (const key of Object.keys(query)) {
      if (key.toLowerCase() === SIGNATURE_HEADER) {
        continue;
      }
      const encodedKey = escapeUri(key);
      keys.push(encodedKey);
      const value = query[key];
      if (typeof value === "string") {
        serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;
      } else if (Array.isArray(value)) {
        serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${escapeUri(value2)}`]), []).sort().join("&");
      }
    }
    return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
  };
  var iso8601 = (time2) => toDate(time2).toISOString().replace(/\.\d{3}Z$/, "Z");
  var toDate = (time2) => {
    if (typeof time2 === "number") {
      return new Date(time2 * 1000);
    }
    if (typeof time2 === "string") {
      if (Number(time2)) {
        return new Date(Number(time2) * 1000);
      }
      return new Date(time2);
    }
    return time2;
  };

  class SignatureV4Base {
    service;
    regionProvider;
    credentialProvider;
    sha256;
    uriEscapePath;
    applyChecksum;
    constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
      this.service = service;
      this.sha256 = sha256;
      this.uriEscapePath = uriEscapePath;
      this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
      this.regionProvider = normalizeProvider(region);
      this.credentialProvider = normalizeProvider(credentials);
    }
    createCanonicalRequest(request2, canonicalHeaders, payloadHash) {
      const sortedHeaders = Object.keys(canonicalHeaders).sort();
      return `${request2.method}
${this.getCanonicalPath(request2)}
${getCanonicalQuery(request2)}
${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(`
`)}

${sortedHeaders.join(";")}
${payloadHash}`;
    }
    async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
      const hash = new this.sha256;
      hash.update(toUint8Array(canonicalRequest));
      const hashedRequest = await hash.digest();
      return `${algorithmIdentifier}
${longDate}
${credentialScope}
${toHex(hashedRequest)}`;
    }
    getCanonicalPath({ path: path2 }) {
      if (this.uriEscapePath) {
        const normalizedPathSegments = [];
        for (const pathSegment of path2.split("/")) {
          if (pathSegment?.length === 0)
            continue;
          if (pathSegment === ".")
            continue;
          if (pathSegment === "..") {
            normalizedPathSegments.pop();
          } else {
            normalizedPathSegments.push(pathSegment);
          }
        }
        const normalizedPath = `${path2?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path2?.endsWith("/") ? "/" : ""}`;
        const doubleEncoded = escapeUri(normalizedPath);
        return doubleEncoded.replace(/%2F/g, "/");
      }
      return path2;
    }
    validateResolvedCredentials(credentials) {
      if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
        throw new Error("Resolved credential object is not valid");
      }
    }
    formatDate(now) {
      const longDate = iso8601(now).replace(/[\-:]/g, "");
      return {
        longDate,
        shortDate: longDate.slice(0, 8)
      };
    }
    getCanonicalHeaderList(headers) {
      return Object.keys(headers).sort().join(";");
    }
  }
  var signingKeyCache = {};
  var cacheQueue = [];
  var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
  var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
    const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
    const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;
    if (cacheKey in signingKeyCache) {
      return signingKeyCache[cacheKey];
    }
    cacheQueue.push(cacheKey);
    while (cacheQueue.length > MAX_CACHE_SIZE) {
      delete signingKeyCache[cacheQueue.shift()];
    }
    let key = `AWS4${credentials.secretAccessKey}`;
    for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {
      key = await hmac(sha256Constructor, key, signable);
    }
    return signingKeyCache[cacheKey] = key;
  };
  var clearCredentialCache = () => {
    cacheQueue.length = 0;
    Object.keys(signingKeyCache).forEach((cacheKey) => {
      delete signingKeyCache[cacheKey];
    });
  };
  var hmac = (ctor, secret, data) => {
    const hash = new ctor(secret);
    hash.update(toUint8Array(data));
    return hash.digest();
  };
  var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
    const canonical = {};
    for (const headerName of Object.keys(headers).sort()) {
      if (headers[headerName] == undefined) {
        continue;
      }
      const canonicalHeaderName = headerName.toLowerCase();
      if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
        if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
          continue;
        }
      }
      canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
    }
    return canonical;
  };
  var getPayloadHash = async ({ headers, body }, hashConstructor) => {
    for (const headerName of Object.keys(headers)) {
      if (headerName.toLowerCase() === SHA256_HEADER) {
        return headers[headerName];
      }
    }
    if (body == undefined) {
      return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
    } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {
      const hashCtor = new hashConstructor;
      hashCtor.update(toUint8Array(body));
      return toHex(await hashCtor.digest());
    }
    return UNSIGNED_PAYLOAD;
  };
  var hasHeader = (soughtHeader, headers) => {
    soughtHeader = soughtHeader.toLowerCase();
    for (const headerName of Object.keys(headers)) {
      if (soughtHeader === headerName.toLowerCase()) {
        return true;
      }
    }
    return false;
  };
  var moveHeadersToQuery = (request2, options = {}) => {
    const { headers, query = {} } = HttpRequest.clone(request2);
    for (const name of Object.keys(headers)) {
      const lname = name.toLowerCase();
      if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
        query[name] = headers[name];
        delete headers[name];
      }
    }
    return {
      ...request2,
      headers,
      query
    };
  };
  var prepareRequest = (request2) => {
    request2 = HttpRequest.clone(request2);
    for (const headerName of Object.keys(request2.headers)) {
      if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
        delete request2.headers[headerName];
      }
    }
    return request2;
  };

  class SignatureV4 extends SignatureV4Base {
    headerFormatter = new HeaderFormatter;
    constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
      super({
        applyChecksum,
        credentials,
        region,
        service,
        sha256,
        uriEscapePath
      });
    }
    async presign(originalRequest, options = {}) {
      const { signingDate = new Date, expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options;
      const credentials = await this.credentialProvider();
      this.validateResolvedCredentials(credentials);
      const region = signingRegion ?? await this.regionProvider();
      const { longDate, shortDate } = this.formatDate(signingDate);
      if (expiresIn > MAX_PRESIGNED_TTL) {
        return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future");
      }
      const scope = createScope(shortDate, region, signingService ?? this.service);
      const request2 = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });
      if (credentials.sessionToken) {
        request2.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;
      }
      request2.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;
      request2.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;
      request2.query[AMZ_DATE_QUERY_PARAM] = longDate;
      request2.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
      const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders);
      request2.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);
      request2.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request2, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));
      return request2;
    }
    async sign(toSign, options) {
      if (typeof toSign === "string") {
        return this.signString(toSign, options);
      } else if (toSign.headers && toSign.payload) {
        return this.signEvent(toSign, options);
      } else if (toSign.message) {
        return this.signMessage(toSign, options);
      } else {
        return this.signRequest(toSign, options);
      }
    }
    async signEvent({ headers, payload }, { signingDate = new Date, priorSignature, signingRegion, signingService, eventStreamCredentials }) {
      const region = signingRegion ?? await this.regionProvider();
      const { shortDate, longDate } = this.formatDate(signingDate);
      const scope = createScope(shortDate, region, signingService ?? this.service);
      const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);
      const hash = new this.sha256;
      hash.update(headers);
      const hashedHeaders = toHex(await hash.digest());
      const stringToSign = [
        EVENT_ALGORITHM_IDENTIFIER,
        longDate,
        scope,
        priorSignature,
        hashedHeaders,
        hashedPayload
      ].join(`
`);
      return this.signString(stringToSign, {
        signingDate,
        signingRegion: region,
        signingService,
        eventStreamCredentials
      });
    }
    async signMessage(signableMessage, { signingDate = new Date, signingRegion, signingService, eventStreamCredentials }) {
      const promise = this.signEvent({
        headers: this.headerFormatter.format(signableMessage.message.headers),
        payload: signableMessage.message.body
      }, {
        signingDate,
        signingRegion,
        signingService,
        priorSignature: signableMessage.priorSignature,
        eventStreamCredentials
      });
      return promise.then((signature) => {
        return { message: signableMessage.message, signature };
      });
    }
    async signString(stringToSign, { signingDate = new Date, signingRegion, signingService, eventStreamCredentials } = {}) {
      const credentials = eventStreamCredentials ?? await this.credentialProvider();
      this.validateResolvedCredentials(credentials);
      const region = signingRegion ?? await this.regionProvider();
      const { shortDate } = this.formatDate(signingDate);
      const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
      hash.update(toUint8Array(stringToSign));
      return toHex(await hash.digest());
    }
    async signRequest(requestToSign, { signingDate = new Date, signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
      const credentials = await this.credentialProvider();
      this.validateResolvedCredentials(credentials);
      const region = signingRegion ?? await this.regionProvider();
      const request2 = prepareRequest(requestToSign);
      const { longDate, shortDate } = this.formatDate(signingDate);
      const scope = createScope(shortDate, region, signingService ?? this.service);
      request2.headers[AMZ_DATE_HEADER] = longDate;
      if (credentials.sessionToken) {
        request2.headers[TOKEN_HEADER] = credentials.sessionToken;
      }
      const payloadHash = await getPayloadHash(request2, this.sha256);
      if (!hasHeader(SHA256_HEADER, request2.headers) && this.applyChecksum) {
        request2.headers[SHA256_HEADER] = payloadHash;
      }
      const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders);
      const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request2, canonicalHeaders, payloadHash));
      request2.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} ` + `Credential=${credentials.accessKeyId}/${scope}, ` + `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` + `Signature=${signature}`;
      return request2;
    }
    async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
      const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
      const hash = new this.sha256(await keyPromise);
      hash.update(toUint8Array(stringToSign));
      return toHex(await hash.digest());
    }
    getSigningKey(credentials, region, shortDate, service) {
      return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
    }
  }
  var signatureV4aContainer = {
    SignatureV4a: null
  };
  exports.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER;
  exports.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A;
  exports.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM;
  exports.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS;
  exports.AMZ_DATE_HEADER = AMZ_DATE_HEADER;
  exports.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM;
  exports.AUTH_HEADER = AUTH_HEADER;
  exports.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM;
  exports.DATE_HEADER = DATE_HEADER;
  exports.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER;
  exports.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM;
  exports.GENERATED_HEADERS = GENERATED_HEADERS;
  exports.HOST_HEADER = HOST_HEADER;
  exports.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER;
  exports.MAX_CACHE_SIZE = MAX_CACHE_SIZE;
  exports.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL;
  exports.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN;
  exports.REGION_SET_PARAM = REGION_SET_PARAM;
  exports.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN;
  exports.SHA256_HEADER = SHA256_HEADER;
  exports.SIGNATURE_HEADER = SIGNATURE_HEADER;
  exports.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM;
  exports.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM;
  exports.SignatureV4 = SignatureV4;
  exports.SignatureV4Base = SignatureV4Base;
  exports.TOKEN_HEADER = TOKEN_HEADER;
  exports.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM;
  exports.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS;
  exports.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD;
  exports.clearCredentialCache = clearCredentialCache;
  exports.createScope = createScope;
  exports.getCanonicalHeaders = getCanonicalHeaders;
  exports.getCanonicalQuery = getCanonicalQuery;
  exports.getPayloadHash = getPayloadHash;
  exports.getSigningKey = getSigningKey;
  exports.hasHeader = hasHeader;
  exports.moveHeadersToQuery = moveHeadersToQuery;
  exports.prepareRequest = prepareRequest;
  exports.signatureV4aContainer = signatureV4aContainer;
});

// ../../node_modules/.pnpm/@aws-sdk+core@3.974.23/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js
var require_httpAuthSchemes = __commonJS((exports) => {
  var { HttpResponse, HttpRequest } = require_protocols();
  var { normalizeProvider, memoizeIdentityProvider, isIdentityExpired, doesIdentityRequireRefresh } = require_dist_cjs5();
  var { ProviderError } = require_config2();
  var { setCredentialFeature } = require_client4();
  var { SignatureV4 } = require_dist_cjs6();
  var getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
  var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
  var isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;
  var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
    const clockTimeInMs = Date.parse(clockTime);
    if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
      return clockTimeInMs - Date.now();
    }
    return currentSystemClockOffset;
  };
  var throwSigningPropertyError = (name, property) => {
    if (!property) {
      throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
    }
    return property;
  };
  var validateSigningProperties = async (signingProperties) => {
    const context10 = throwSigningPropertyError("context", signingProperties.context);
    const config = throwSigningPropertyError("config", signingProperties.config);
    const authScheme = context10.endpointV2?.properties?.authSchemes?.[0];
    const signerFunction = throwSigningPropertyError("signer", config.signer);
    const signer = await signerFunction(authScheme);
    const signingRegion = signingProperties?.signingRegion;
    const signingRegionSet = signingProperties?.signingRegionSet;
    const signingName = signingProperties?.signingName;
    return {
      config,
      signer,
      signingRegion,
      signingRegionSet,
      signingName
    };
  };

  class AwsSdkSigV4Signer {
    async sign(httpRequest, identity, signingProperties) {
      if (!HttpRequest.isInstance(httpRequest)) {
        throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
      }
      const validatedProps = await validateSigningProperties(signingProperties);
      const { config, signer } = validatedProps;
      let { signingRegion, signingName } = validatedProps;
      const handlerExecutionContext = signingProperties.context;
      if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
        const [first, second] = handlerExecutionContext.authSchemes;
        if (first?.name === "sigv4a" && second?.name === "sigv4") {
          signingRegion = second?.signingRegion ?? signingRegion;
          signingName = second?.signingName ?? signingName;
        }
      }
      signingProperties._preRequestSystemClockOffset = config.systemClockOffset;
      const signedRequest = await signer.sign(httpRequest, {
        signingDate: getSkewCorrectedDate(config.systemClockOffset),
        signingRegion,
        signingService: signingName
      });
      return signedRequest;
    }
    errorHandler(signingProperties) {
      return (error2) => {
        const errorException = error2;
        const serverTime = errorException.ServerTime ?? getDateHeader(errorException.$response);
        if (serverTime) {
          const config = throwSigningPropertyError("config", signingProperties.config);
          const preRequestOffset = signingProperties._preRequestSystemClockOffset;
          const newOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
          const isLocalCorrection = newOffset !== config.systemClockOffset;
          const isConcurrentCorrection = preRequestOffset !== undefined && preRequestOffset !== newOffset;
          const clockSkewCorrected = isLocalCorrection || isConcurrentCorrection;
          if (clockSkewCorrected && errorException.$metadata) {
            config.systemClockOffset = newOffset;
            errorException.$metadata.clockSkewCorrected = true;
          }
        }
        throw error2;
      };
    }
    successHandler(httpResponse, signingProperties) {
      const dateHeader = getDateHeader(httpResponse);
      if (dateHeader) {
        const config = throwSigningPropertyError("config", signingProperties.config);
        config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
      }
    }
  }
  var AWSSDKSigV4Signer = AwsSdkSigV4Signer;

  class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
    async sign(httpRequest, identity, signingProperties) {
      if (!HttpRequest.isInstance(httpRequest)) {
        throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
      }
      const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
      const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
      const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(",");
      signingProperties._preRequestSystemClockOffset = config.systemClockOffset;
      const signedRequest = await signer.sign(httpRequest, {
        signingDate: getSkewCorrectedDate(config.systemClockOffset),
        signingRegion: multiRegionOverride,
        signingService: signingName
      });
      return signedRequest;
    }
  }
  var getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
  var getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
  var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
  var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
  var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
    environmentVariableSelector: (env2, options) => {
      if (options?.signingName) {
        const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
        if (bearerTokenKey in env2)
          return ["httpBearerAuth"];
      }
      if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2))
        return;
      return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
    },
    configFileSelector: (profile) => {
      if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
        return;
      return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
    },
    default: []
  };
  var resolveAwsSdkSigV4AConfig = (config) => {
    config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);
    return config;
  };
  var NODE_SIGV4A_CONFIG_OPTIONS = {
    environmentVariableSelector(env2) {
      if (env2.AWS_SIGV4A_SIGNING_REGION_SET) {
        return env2.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
      }
      throw new ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
        tryNextLink: true
      });
    },
    configFileSelector(profile) {
      if (profile.sigv4a_signing_region_set) {
        return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
      }
      throw new ProviderError("sigv4a_signing_region_set not set in profile.", {
        tryNextLink: true
      });
    },
    default: undefined
  };
  var resolveAwsSdkSigV4Config = (config) => {
    let inputCredentials = config.credentials;
    let isUserSupplied = !!config.credentials;
    let resolvedCredentials = undefined;
    Object.defineProperty(config, "credentials", {
      set(credentials) {
        if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
          isUserSupplied = true;
        }
        inputCredentials = credentials;
        const memoizedProvider = normalizeCredentialProvider(config, {
          credentials: inputCredentials,
          credentialDefaultProvider: config.credentialDefaultProvider
        });
        const boundProvider = bindCallerConfig(config, memoizedProvider);
        if (isUserSupplied && !boundProvider.attributed) {
          const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
          resolvedCredentials = async (options) => {
            const creds = await boundProvider(options);
            const attributedCreds = creds;
            if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
              return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
            }
            return attributedCreds;
          };
          resolvedCredentials.memoized = boundProvider.memoized;
          resolvedCredentials.configBound = boundProvider.configBound;
          resolvedCredentials.attributed = true;
        } else {
          resolvedCredentials = boundProvider;
        }
      },
      get() {
        return resolvedCredentials;
      },
      enumerable: true,
      configurable: true
    });
    config.credentials = inputCredentials;
    const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
    let signer;
    if (config.signer) {
      signer = normalizeProvider(config.signer);
    } else if (config.regionInfoProvider) {
      signer = () => normalizeProvider(config.region)().then(async (region) => [
        await config.regionInfoProvider(region, {
          useFipsEndpoint: await config.useFipsEndpoint(),
          useDualstackEndpoint: await config.useDualstackEndpoint()
        }) || {},
        region
      ]).then(([regionInfo, region]) => {
        const { signingRegion, signingService } = regionInfo;
        config.signingRegion = config.signingRegion || signingRegion || region;
        config.signingName = config.signingName || signingService || config.serviceId;
        const params = {
          ...config,
          credentials: config.credentials,
          region: config.signingRegion,
          service: config.signingName,
          sha256,
          uriEscapePath: signingEscapePath
        };
        const SignerCtor = config.signerConstructor || SignatureV4;
        return new SignerCtor(params);
      });
    } else {
      signer = async (authScheme) => {
        authScheme = Object.assign({}, {
          name: "sigv4",
          signingName: config.signingName || config.defaultSigningName,
          signingRegion: await normalizeProvider(config.region)(),
          properties: {}
        }, authScheme);
        const signingRegion = authScheme.signingRegion;
        const signingService = authScheme.signingName;
        config.signingRegion = config.signingRegion || signingRegion;
        config.signingName = config.signingName || signingService || config.serviceId;
        const params = {
          ...config,
          credentials: config.credentials,
          region: config.signingRegion,
          service: config.signingName,
          sha256,
          uriEscapePath: signingEscapePath
        };
        const SignerCtor = config.signerConstructor || SignatureV4;
        return new SignerCtor(params);
      };
    }
    const resolvedConfig = Object.assign(config, {
      systemClockOffset,
      signingEscapePath,
      signer
    });
    return resolvedConfig;
  };
  var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
  function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) {
    let credentialsProvider;
    if (credentials) {
      if (!credentials?.memoized) {
        credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);
      } else {
        credentialsProvider = credentials;
      }
    } else {
      if (credentialDefaultProvider) {
        credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {
          parentClientConfig: config
        })));
      } else {
        credentialsProvider = async () => {
          throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
        };
      }
    }
    credentialsProvider.memoized = true;
    return credentialsProvider;
  }
  function bindCallerConfig(config, credentialsProvider) {
    if (credentialsProvider.configBound) {
      return credentialsProvider;
    }
    const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
    fn.memoized = credentialsProvider.memoized;
    fn.configBound = true;
    return fn;
  }
  exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer;
  exports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner;
  exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer;
  exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
  exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS;
  exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
  exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config;
  exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig;
  exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config;
  exports.validateSigningProperties = validateSigningProperties;
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider = __commonJS((exports) => {
  var { resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { getSmithyContext, normalizeProvider } = require_client3();
  exports.defaultSchedulerHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "scheduler",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  exports.defaultSchedulerHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  exports.resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/package.json
var require_package2 = __commonJS((exports, module) => {
  module.exports = {
    name: "@aws-sdk/client-scheduler",
    description: "AWS SDK for JavaScript Scheduler Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-scheduler",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-scheduler"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-env@3.972.49/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js
var require_dist_cjs7 = __commonJS((exports) => {
  var { setCredentialFeature } = require_client4();
  var { CredentialsProviderError } = require_config2();
  var ENV_KEY = "AWS_ACCESS_KEY_ID";
  var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
  var ENV_SESSION = "AWS_SESSION_TOKEN";
  var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
  var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
  var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
  var fromEnv = (init4) => async () => {
    init4?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
    const accessKeyId = process.env[ENV_KEY];
    const secretAccessKey = process.env[ENV_SECRET];
    const sessionToken = process.env[ENV_SESSION];
    const expiry = process.env[ENV_EXPIRATION];
    const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
    const accountId = process.env[ENV_ACCOUNT_ID];
    if (accessKeyId && secretAccessKey) {
      const credentials = {
        accessKeyId,
        secretAccessKey,
        ...sessionToken && { sessionToken },
        ...expiry && { expiration: new Date(expiry) },
        ...credentialScope && { credentialScope },
        ...accountId && { accountId }
      };
      setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
      return credentials;
    }
    throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init4?.logger });
  };
  exports.ENV_ACCOUNT_ID = ENV_ACCOUNT_ID;
  exports.ENV_CREDENTIAL_SCOPE = ENV_CREDENTIAL_SCOPE;
  exports.ENV_EXPIRATION = ENV_EXPIRATION;
  exports.ENV_KEY = ENV_KEY;
  exports.ENV_SECRET = ENV_SECRET;
  exports.ENV_SESSION = ENV_SESSION;
  exports.fromEnv = fromEnv;
});

// ../../node_modules/.pnpm/@smithy+credential-provider-imds@4.4.2/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js
var require_dist_cjs8 = __commonJS((exports) => {
  var { ProviderError, CredentialsProviderError, loadConfig } = require_config2();
  var node_http = __require("node:http");
  var { parseUrl: parseUrl2 } = require_protocols();
  var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string";
  var fromImdsCredentials = (creds) => ({
    accessKeyId: creds.AccessKeyId,
    secretAccessKey: creds.SecretAccessKey,
    sessionToken: creds.Token,
    expiration: new Date(creds.Expiration),
    ...creds.AccountId && { accountId: creds.AccountId }
  });
  var DEFAULT_TIMEOUT2 = 1000;
  var DEFAULT_MAX_RETRIES = 0;
  var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT2 }) => ({ maxRetries, timeout });
  function httpRequest(options) {
    return new Promise((resolve3, reject) => {
      const req = node_http.request({
        method: "GET",
        ...options,
        hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1")
      });
      req.on("error", (err) => {
        reject(Object.assign(new ProviderError("Unable to connect to instance metadata service"), err));
        req.destroy();
      });
      req.on("timeout", () => {
        reject(new ProviderError("TimeoutError from instance metadata service"));
        req.destroy();
      });
      req.on("response", (res) => {
        const { statusCode = 400 } = res;
        if (statusCode < 200 || 300 <= statusCode) {
          reject(Object.assign(new ProviderError("Error response received from instance metadata service"), { statusCode }));
          req.destroy();
        }
        const chunks = [];
        res.on("data", (chunk) => {
          chunks.push(chunk);
        });
        res.on("end", () => {
          resolve3(Buffer.concat(chunks));
          req.destroy();
        });
      });
      req.end();
    });
  }
  var retry = (toRetry, maxRetries) => {
    let promise = toRetry();
    for (let i = 0;i < maxRetries; i++) {
      promise = promise.catch(toRetry);
    }
    return promise;
  };
  var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
  var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
  var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
  var fromContainerMetadata = (init4 = {}) => {
    const { timeout, maxRetries } = providerConfigFromInit(init4);
    return () => retry(async () => {
      const requestOptions = await getCmdsUri({ logger: init4.logger });
      const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
      if (!isImdsCredentials(credsResponse)) {
        throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
          logger: init4.logger
        });
      }
      return fromImdsCredentials(credsResponse);
    }, maxRetries);
  };
  var requestFromEcsImds = async (timeout, options) => {
    if (process.env[ENV_CMDS_AUTH_TOKEN]) {
      options.headers = {
        ...options.headers,
        Authorization: process.env[ENV_CMDS_AUTH_TOKEN]
      };
    }
    const buffer = await httpRequest({
      ...options,
      timeout
    });
    return buffer.toString();
  };
  var CMDS_IP = "169.254.170.2";
  var GREENGRASS_HOSTS = new Set(["localhost", "127.0.0.1"]);
  var GREENGRASS_PROTOCOLS = new Set(["http:", "https:"]);
  var getCmdsUri = async ({ logger }) => {
    if (process.env[ENV_CMDS_RELATIVE_URI]) {
      return {
        hostname: CMDS_IP,
        path: process.env[ENV_CMDS_RELATIVE_URI]
      };
    }
    if (process.env[ENV_CMDS_FULL_URI]) {
      let parsed;
      try {
        parsed = new URL(process.env[ENV_CMDS_FULL_URI]);
      } catch {
        throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });
      }
      if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {
        throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
          tryNextLink: false,
          logger
        });
      }
      if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {
        throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
          tryNextLink: false,
          logger
        });
      }
      return {
        protocol: parsed.protocol,
        hostname: parsed.hostname,
        path: parsed.pathname + parsed.search,
        port: parsed.port ? parseInt(parsed.port, 10) : undefined
      };
    }
    throw new CredentialsProviderError("The container metadata credential provider cannot be used unless" + ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` + " variable is set", {
      tryNextLink: false,
      logger
    });
  };

  class InstanceMetadataV1FallbackError extends CredentialsProviderError {
    tryNextLink;
    name = "InstanceMetadataV1FallbackError";
    constructor(message, tryNextLink = true) {
      super(message, tryNextLink);
      this.tryNextLink = tryNextLink;
      Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);
    }
  }
  var Endpoint;
  (function(Endpoint2) {
    Endpoint2["IPv4"] = "http://169.254.169.254";
    Endpoint2["IPv6"] = "http://[fd00:ec2::254]";
  })(Endpoint || (Endpoint = {}));
  var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
  var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
  var ENDPOINT_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_NAME],
    configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],
    default: undefined
  };
  var EndpointMode;
  (function(EndpointMode2) {
    EndpointMode2["IPv4"] = "IPv4";
    EndpointMode2["IPv6"] = "IPv6";
  })(EndpointMode || (EndpointMode = {}));
  var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";
  var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode";
  var ENDPOINT_MODE_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_MODE_NAME],
    configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],
    default: EndpointMode.IPv4
  };
  var getInstanceMetadataEndpoint = async () => parseUrl2(await getFromEndpointConfig() || await getFromEndpointModeConfig());
  var getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();
  var getFromEndpointModeConfig = async () => {
    const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
    switch (endpointMode) {
      case EndpointMode.IPv4:
        return Endpoint.IPv4;
      case EndpointMode.IPv6:
        return Endpoint.IPv6;
      default:
        throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);
    }
  };
  var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;
  var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;
  var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html";
  var getExtendedInstanceMetadataCredentials = (credentials, logger) => {
    const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
    const newExpiration = new Date(Date.now() + refreshInterval * 1000);
    logger.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these " + `credentials will be attempted after ${new Date(newExpiration)}.
For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
    const originalExpiration = credentials.originalExpiration ?? credentials.expiration;
    return {
      ...credentials,
      ...originalExpiration ? { originalExpiration } : {},
      expiration: newExpiration
    };
  };
  var staticStabilityProvider = (provider, options = {}) => {
    const logger = options?.logger || console;
    let pastCredentials;
    return async () => {
      let credentials;
      try {
        credentials = await provider();
        if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {
          credentials = getExtendedInstanceMetadataCredentials(credentials, logger);
        }
      } catch (e) {
        if (pastCredentials) {
          logger.warn("Credential renew failed: ", e);
          credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);
        } else {
          throw e;
        }
      }
      pastCredentials = credentials;
      return credentials;
    };
  };
  var IMDS_PATH = "/latest/meta-data/iam/security-credentials/";
  var IMDS_TOKEN_PATH = "/latest/api/token";
  var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED";
  var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled";
  var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token";
  var fromInstanceMetadata = (init4 = {}) => staticStabilityProvider(getInstanceMetadataProvider(init4), { logger: init4.logger });
  var getInstanceMetadataProvider = (init4 = {}) => {
    let disableFetchToken = false;
    const { logger, profile } = init4;
    const { timeout, maxRetries } = providerConfigFromInit(init4);
    const getCredentials = async (maxRetries2, options) => {
      const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;
      if (isImdsV1Fallback) {
        let fallbackBlockedFromProfile = false;
        let fallbackBlockedFromProcessEnv = false;
        const configValue = await loadConfig({
          environmentVariableSelector: (env2) => {
            const envValue = env2[AWS_EC2_METADATA_V1_DISABLED];
            fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
            if (envValue === undefined) {
              throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init4.logger });
            }
            return fallbackBlockedFromProcessEnv;
          },
          configFileSelector: (profile2) => {
            const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];
            fallbackBlockedFromProfile = !!profileValue && profileValue !== "false";
            return fallbackBlockedFromProfile;
          },
          default: false
        }, {
          profile
        })();
        if (init4.ec2MetadataV1Disabled || configValue) {
          const causes = [];
          if (init4.ec2MetadataV1Disabled)
            causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");
          if (fallbackBlockedFromProfile)
            causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);
          if (fallbackBlockedFromProcessEnv)
            causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);
          throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`);
        }
      }
      const imdsProfile = (await retry(async () => {
        let profile2;
        try {
          profile2 = await getProfile(options);
        } catch (err) {
          if (err.statusCode === 401) {
            disableFetchToken = false;
          }
          throw err;
        }
        return profile2;
      }, maxRetries2)).trim();
      return retry(async () => {
        let creds;
        try {
          creds = await getCredentialsFromProfile(imdsProfile, options, init4);
        } catch (err) {
          if (err.statusCode === 401) {
            disableFetchToken = false;
          }
          throw err;
        }
        return creds;
      }, maxRetries2);
    };
    return async () => {
      const endpoint = await getInstanceMetadataEndpoint();
      if (disableFetchToken) {
        logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)");
        return getCredentials(maxRetries, { ...endpoint, timeout });
      } else {
        let token;
        try {
          token = (await getMetadataToken({ ...endpoint, timeout })).toString();
        } catch (error2) {
          if (error2?.statusCode === 400) {
            throw Object.assign(error2, {
              message: "EC2 Metadata token request returned error"
            });
          } else if (error2.message === "TimeoutError" || [403, 404, 405].includes(error2.statusCode)) {
            disableFetchToken = true;
          }
          logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)");
          return getCredentials(maxRetries, { ...endpoint, timeout });
        }
        return getCredentials(maxRetries, {
          ...endpoint,
          headers: {
            [X_AWS_EC2_METADATA_TOKEN]: token
          },
          timeout
        });
      }
    };
  };
  var getMetadataToken = async (options) => httpRequest({
    ...options,
    path: IMDS_TOKEN_PATH,
    method: "PUT",
    headers: {
      "x-aws-ec2-metadata-token-ttl-seconds": "21600"
    }
  });
  var getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();
  var getCredentialsFromProfile = async (profile, options, init4) => {
    const credentialsResponse = JSON.parse((await httpRequest({
      ...options,
      path: IMDS_PATH + profile
    })).toString());
    if (!isImdsCredentials(credentialsResponse)) {
      throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
        logger: init4.logger
      });
    }
    return fromImdsCredentials(credentialsResponse);
  };
  exports.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES;
  exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT2;
  exports.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN;
  exports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI;
  exports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI;
  exports.Endpoint = Endpoint;
  exports.fromContainerMetadata = fromContainerMetadata;
  exports.fromInstanceMetadata = fromInstanceMetadata;
  exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;
  exports.httpRequest = httpRequest;
  exports.providerConfigFromInit = providerConfigFromInit;
});

// ../../node_modules/.pnpm/@smithy+node-http-handler@4.8.2/node_modules/@smithy/node-http-handler/dist-cjs/index.js
var require_dist_cjs9 = __commonJS((exports) => {
  var { buildQueryString, HttpResponse } = require_protocols();
  var node_https = __require("node:https");
  var { Readable: Readable2, Writable: Writable2 } = __require("node:stream");
  var http22 = __require("node:http2");
  function buildAbortError(abortSignal) {
    const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : undefined;
    if (reason) {
      if (reason instanceof Error) {
        const abortError3 = new Error("Request aborted");
        abortError3.name = "AbortError";
        abortError3.cause = reason;
        return abortError3;
      }
      const abortError2 = new Error(String(reason));
      abortError2.name = "AbortError";
      return abortError2;
    }
    const abortError = new Error("Request aborted");
    abortError.name = "AbortError";
    return abortError;
  }
  var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
  var getTransformedHeaders = (headers) => {
    const transformedHeaders = {};
    for (const name in headers) {
      const headerValues = headers[name];
      transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
    }
    return transformedHeaders;
  };
  var timing = {
    setTimeout: (cb, ms) => setTimeout(cb, ms),
    clearTimeout: (timeoutId) => clearTimeout(timeoutId)
  };
  var DEFER_EVENT_LISTENER_TIME$2 = 1000;
  var setConnectionTimeout = (request2, reject, timeoutInMs = 0) => {
    if (!timeoutInMs) {
      return -1;
    }
    const registerTimeout = (offset) => {
      const timeoutId = timing.setTimeout(() => {
        request2.destroy();
        reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
          name: "TimeoutError"
        }));
      }, timeoutInMs - offset);
      const doWithSocket = (socket) => {
        if (socket?.connecting) {
          socket.on("connect", () => {
            timing.clearTimeout(timeoutId);
          });
        } else {
          timing.clearTimeout(timeoutId);
        }
      };
      if (request2.socket) {
        doWithSocket(request2.socket);
      } else {
        request2.on("socket", doWithSocket);
      }
    };
    if (timeoutInMs < 2000) {
      registerTimeout(0);
      return 0;
    }
    return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
  };
  var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {
    if (timeoutInMs) {
      return timing.setTimeout(() => {
        let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
        if (throwOnRequestTimeout) {
          const error2 = Object.assign(new Error(msg), {
            name: "TimeoutError",
            code: "ETIMEDOUT"
          });
          req.destroy(error2);
          reject(error2);
        } else {
          msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
          logger?.warn?.(msg);
        }
      }, timeoutInMs);
    }
    return -1;
  };
  var DEFER_EVENT_LISTENER_TIME$1 = 3000;
  var setSocketKeepAlive = (request2, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
    if (keepAlive !== true) {
      return -1;
    }
    const registerListener = () => {
      if (request2.socket) {
        request2.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
      } else {
        request2.on("socket", (socket) => {
          socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
        });
      }
    };
    if (deferTimeMs === 0) {
      registerListener();
      return 0;
    }
    return timing.setTimeout(registerListener, deferTimeMs);
  };
  var DEFER_EVENT_LISTENER_TIME = 3000;
  var setSocketTimeout = (request2, reject, timeoutInMs = 0) => {
    const registerTimeout = (offset) => {
      const timeout = timeoutInMs - offset;
      const onTimeout = () => {
        request2.destroy();
        reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
      };
      if (request2.socket) {
        request2.socket.setTimeout(timeout, onTimeout);
        request2.on("close", () => request2.socket?.removeListener("timeout", onTimeout));
      } else {
        request2.setTimeout(timeout, onTimeout);
      }
    };
    if (0 < timeoutInMs && timeoutInMs < 6000) {
      registerTimeout(0);
      return 0;
    }
    return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
  };
  var MIN_WAIT_TIME = 6000;
  async function writeRequestBody(httpRequest, request2, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
    const headers = request2.headers;
    const expect = headers ? headers.Expect || headers.expect : undefined;
    let timeoutId = -1;
    let sendBody = true;
    if (!externalAgent && expect === "100-continue") {
      sendBody = await Promise.race([
        new Promise((resolve3) => {
          timeoutId = Number(timing.setTimeout(() => resolve3(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
        }),
        new Promise((resolve3) => {
          httpRequest.on("continue", () => {
            timing.clearTimeout(timeoutId);
            resolve3(true);
          });
          httpRequest.on("response", () => {
            timing.clearTimeout(timeoutId);
            resolve3(false);
          });
          httpRequest.on("error", () => {
            timing.clearTimeout(timeoutId);
            resolve3(false);
          });
        })
      ]);
    }
    if (sendBody) {
      writeBody(httpRequest, request2.body);
    }
  }
  function writeBody(httpRequest, body) {
    if (body instanceof Readable2) {
      body.pipe(httpRequest);
      return;
    }
    if (body) {
      const isBuffer = Buffer.isBuffer(body);
      const isString2 = typeof body === "string";
      if (isBuffer || isString2) {
        if (isBuffer && body.byteLength === 0) {
          httpRequest.end();
        } else {
          httpRequest.end(body);
        }
        return;
      }
      const uint8 = body;
      if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") {
        httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));
        return;
      }
      httpRequest.end(Buffer.from(body));
      return;
    }
    httpRequest.end();
  }
  var DEFAULT_REQUEST_TIMEOUT = 0;
  var hAgent = undefined;
  var hRequest = undefined;

  class NodeHttpHandler {
    config;
    configProvider;
    socketWarningTimestamp = 0;
    externalAgent = false;
    metadata = { handlerProtocol: "http/1.1" };
    static create(instanceOrOptions) {
      if (typeof instanceOrOptions?.handle === "function") {
        return instanceOrOptions;
      }
      return new NodeHttpHandler(instanceOrOptions);
    }
    static checkSocketUsage(agent2, socketWarningTimestamp, logger = console) {
      const { sockets, requests, maxSockets } = agent2;
      if (typeof maxSockets !== "number" || maxSockets === Infinity) {
        return socketWarningTimestamp;
      }
      const interval2 = 15000;
      if (Date.now() - interval2 < socketWarningTimestamp) {
        return socketWarningTimestamp;
      }
      if (sockets && requests) {
        for (const origin in sockets) {
          const socketsInUse = sockets[origin]?.length ?? 0;
          const requestsEnqueued = requests[origin]?.length ?? 0;
          if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
            logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
            return Date.now();
          }
        }
      }
      return socketWarningTimestamp;
    }
    constructor(options) {
      this.configProvider = new Promise((resolve3, reject) => {
        if (typeof options === "function") {
          options().then((_options) => {
            resolve3(this.resolveDefaultConfig(_options));
          }).catch(reject);
        } else {
          resolve3(this.resolveDefaultConfig(options));
        }
      });
    }
    destroy() {
      this.config?.httpAgent?.destroy();
      this.config?.httpsAgent?.destroy();
    }
    async handle(request2, { abortSignal, requestTimeout } = {}) {
      if (!this.config) {
        this.config = await this.configProvider;
      }
      const config = this.config;
      const isSSL = request2.protocol === "https:";
      if (!isSSL && !this.config.httpAgent) {
        this.config.httpAgent = await this.config.httpAgentProvider();
      }
      return new Promise((_resolve, _reject) => {
        let writeRequestBodyPromise = undefined;
        let socketWarningTimeoutId = -1;
        let connectionTimeoutId = -1;
        let requestTimeoutId = -1;
        let socketTimeoutId = -1;
        let keepAliveTimeoutId = -1;
        const clearTimeouts = () => {
          timing.clearTimeout(socketWarningTimeoutId);
          timing.clearTimeout(connectionTimeoutId);
          timing.clearTimeout(requestTimeoutId);
          timing.clearTimeout(socketTimeoutId);
          timing.clearTimeout(keepAliveTimeoutId);
        };
        const resolve3 = async (arg) => {
          await writeRequestBodyPromise;
          clearTimeouts();
          _resolve(arg);
        };
        const reject = async (arg) => {
          await writeRequestBodyPromise;
          clearTimeouts();
          _reject(arg);
        };
        if (abortSignal?.aborted) {
          const abortError = buildAbortError(abortSignal);
          reject(abortError);
          return;
        }
        const headers = request2.headers;
        const expectContinue = headers ? (headers.Expect ?? headers.expect) === "100-continue" : false;
        let agent2 = isSSL ? config.httpsAgent : config.httpAgent;
        if (expectContinue && !this.externalAgent) {
          agent2 = new (isSSL ? node_https.Agent : hAgent)({
            keepAlive: false,
            maxSockets: Infinity
          });
        }
        socketWarningTimeoutId = timing.setTimeout(() => {
          this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent2, this.socketWarningTimestamp, config.logger);
        }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));
        const queryString = request2.query ? buildQueryString(request2.query) : "";
        let auth = undefined;
        if (request2.username != null || request2.password != null) {
          const username = request2.username ?? "";
          const password = request2.password ?? "";
          auth = `${username}:${password}`;
        }
        let path2 = request2.path;
        if (queryString) {
          path2 += `?${queryString}`;
        }
        if (request2.fragment) {
          path2 += `#${request2.fragment}`;
        }
        let hostname2 = request2.hostname ?? "";
        if (hostname2[0] === "[" && hostname2.endsWith("]")) {
          hostname2 = request2.hostname.slice(1, -1);
        } else {
          hostname2 = request2.hostname;
        }
        const nodeHttpsOptions = {
          headers: request2.headers,
          host: hostname2,
          method: request2.method,
          path: path2,
          port: request2.port,
          agent: agent2,
          auth
        };
        const requestFunc = isSSL ? node_https.request : hRequest;
        const req = requestFunc(nodeHttpsOptions, (res) => {
          const httpResponse = new HttpResponse({
            statusCode: res.statusCode || -1,
            reason: res.statusMessage,
            headers: getTransformedHeaders(res.headers),
            body: res
          });
          resolve3({ response: httpResponse });
        });
        req.on("error", (err) => {
          if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
            reject(Object.assign(err, { name: "TimeoutError" }));
          } else {
            reject(err);
          }
        });
        if (abortSignal) {
          const onAbort = () => {
            req.destroy();
            const abortError = buildAbortError(abortSignal);
            reject(abortError);
          };
          if (typeof abortSignal.addEventListener === "function") {
            const signal = abortSignal;
            signal.addEventListener("abort", onAbort, { once: true });
            req.once("close", () => signal.removeEventListener("abort", onAbort));
          } else {
            abortSignal.onabort = onAbort;
          }
        }
        const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
        connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
        requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);
        socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
        const httpAgent = nodeHttpsOptions.agent;
        if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
          keepAliveTimeoutId = setSocketKeepAlive(req, {
            keepAlive: httpAgent.keepAlive,
            keepAliveMsecs: httpAgent.keepAliveMsecs
          });
        }
        writeRequestBodyPromise = writeRequestBody(req, request2, effectiveRequestTimeout, this.externalAgent).catch((e) => {
          clearTimeouts();
          return _reject(e);
        });
      });
    }
    updateHttpClientConfig(key, value) {
      this.config = undefined;
      this.configProvider = this.configProvider.then((config) => {
        return {
          ...config,
          [key]: value
        };
      });
    }
    httpHandlerConfigs() {
      return this.config ?? {};
    }
    resolveDefaultConfig(options) {
      const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger } = options || {};
      const keepAlive = true;
      const maxSockets = 50;
      return {
        connectionTimeout,
        requestTimeout,
        socketTimeout,
        socketAcquisitionWarningTimeout,
        throwOnRequestTimeout,
        httpAgentProvider: async () => {
          const node_http = __require("node:http");
          const { Agent: Agent3, request: request2 } = node_http.default ?? node_http;
          hRequest = request2;
          hAgent = Agent3;
          if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
            this.externalAgent = true;
            return httpAgent;
          }
          return new hAgent({ keepAlive, maxSockets, ...httpAgent });
        },
        httpsAgent: (() => {
          if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
            this.externalAgent = true;
            return httpsAgent;
          }
          return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
        })(),
        logger
      };
    }
  }
  var ids = new Uint16Array(1);

  class ClientHttp2SessionRef {
    id = ids[0]++;
    total = 0;
    max = 0;
    session;
    refs = 0;
    constructor(session2) {
      session2.unref();
      this.session = session2;
    }
    retain() {
      if (this.session.destroyed) {
        throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");
      }
      this.refs += 1;
      this.total += 1;
      this.max = Math.max(this.refs, this.max);
      this.session.ref();
    }
    free() {
      if (this.session.destroyed) {
        return;
      }
      this.refs -= 1;
      if (this.refs === 0) {
        this.session.unref();
      }
      if (this.refs < 0) {
        throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.");
      }
    }
    deref() {
      return this.session;
    }
    close() {
      if (!this.session.closed) {
        this.session.close();
      }
    }
    destroy() {
      this.refs = 0;
      if (!this.session.destroyed) {
        this.session.destroy();
      }
    }
    useCount() {
      return this.refs;
    }
  }

  class NodeHttp2ConnectionPool {
    sessions = [];
    maxConcurrency = 0;
    constructor(sessions) {
      this.sessions = (sessions ?? []).map((session2) => new ClientHttp2SessionRef(session2));
    }
    poll() {
      let cleanup = false;
      for (const session2 of this.sessions) {
        if (session2.deref().destroyed) {
          cleanup = true;
          continue;
        }
        if (!this.maxConcurrency || session2.useCount() < this.maxConcurrency) {
          return session2;
        }
      }
      if (cleanup) {
        for (const session2 of this.sessions) {
          if (session2.deref().destroyed) {
            this.remove(session2);
          }
        }
      }
    }
    offerLast(ref) {
      this.sessions.push(ref);
    }
    remove(ref) {
      const ix = this.sessions.indexOf(ref);
      if (ix > -1) {
        this.sessions.splice(ix, 1);
      }
    }
    [Symbol.iterator]() {
      return this.sessions[Symbol.iterator]();
    }
    setMaxConcurrency(maxConcurrency) {
      this.maxConcurrency = maxConcurrency;
    }
    destroy(ref) {
      this.remove(ref);
      ref.destroy();
    }
  }

  class NodeHttp2ConnectionManager {
    config;
    connectOptions;
    connectionPools = new Map;
    constructor(config) {
      this.config = config;
      if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
        throw new RangeError("maxConcurrency must be greater than zero.");
      }
    }
    lease(requestContext, connectionConfiguration) {
      const url = this.getUrlString(requestContext);
      const pool2 = this.getPool(url);
      if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {
        const available = pool2.poll();
        if (available) {
          available.retain();
          return available;
        }
      }
      const ref = new ClientHttp2SessionRef(this.connect(url));
      const session2 = ref.deref();
      if (this.config.maxConcurrency) {
        session2.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
          if (err) {
            throw new Error("Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString());
          }
        });
      }
      const graceful = () => {
        this.removeFromPoolAndClose(url, ref);
      };
      const ensureDestroyed = () => {
        this.removeFromPoolAndCheckedDestroy(url, ref);
      };
      session2.on("goaway", graceful);
      session2.on("error", ensureDestroyed);
      session2.on("frameError", ensureDestroyed);
      session2.on("close", ensureDestroyed);
      if (connectionConfiguration.requestTimeout) {
        session2.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
      }
      pool2.offerLast(ref);
      ref.retain();
      return ref;
    }
    release(_requestContext, ref) {
      ref.free();
    }
    createIsolatedSession(requestContext, connectionConfiguration) {
      const url = this.getUrlString(requestContext);
      const ref = new ClientHttp2SessionRef(this.connect(url));
      const session2 = ref.deref();
      session2.settings({ maxConcurrentStreams: 1 });
      const ensureDestroyed = () => {
        ref.destroy();
      };
      session2.on("error", ensureDestroyed);
      session2.on("frameError", ensureDestroyed);
      session2.on("close", ensureDestroyed);
      if (connectionConfiguration.requestTimeout) {
        session2.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
      }
      ref.retain();
      return ref;
    }
    destroy() {
      for (const [url, connectionPool] of this.connectionPools) {
        for (const session2 of [...connectionPool]) {
          session2.destroy();
        }
        this.connectionPools.delete(url);
      }
    }
    setMaxConcurrentStreams(maxConcurrentStreams) {
      if (maxConcurrentStreams && maxConcurrentStreams <= 0) {
        throw new RangeError("maxConcurrentStreams must be greater than zero.");
      }
      this.config.maxConcurrency = maxConcurrentStreams;
      for (const pool2 of this.connectionPools.values()) {
        pool2.setMaxConcurrency(maxConcurrentStreams);
      }
    }
    setDisableConcurrentStreams(disableConcurrentStreams) {
      this.config.disableConcurrency = disableConcurrentStreams;
    }
    setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) {
      this.connectOptions = nodeHttp2ConnectOptions;
    }
    debug() {
      const pools = {};
      for (const [url, pool2] of this.connectionPools) {
        const sessions = [];
        for (const ref of pool2) {
          sessions.push({
            id: ref.id,
            active: ref.useCount(),
            maxConcurrent: ref.max,
            totalRequests: ref.total
          });
        }
        pools[url] = { sessions };
      }
      return pools;
    }
    removeFromPoolAndClose(authority, ref) {
      this.connectionPools.get(authority)?.remove(ref);
      ref.close();
    }
    removeFromPoolAndCheckedDestroy(authority, ref) {
      this.connectionPools.get(authority)?.remove(ref);
      ref.destroy();
    }
    getPool(url) {
      if (!this.connectionPools.has(url)) {
        const pool2 = new NodeHttp2ConnectionPool;
        if (this.config.maxConcurrency) {
          pool2.setMaxConcurrency(this.config.maxConcurrency);
        }
        this.connectionPools.set(url, pool2);
      }
      return this.connectionPools.get(url);
    }
    getUrlString(request2) {
      return request2.destination.toString();
    }
    connect(url) {
      return this.connectOptions === undefined ? http22.connect(url) : http22.connect(url, this.connectOptions);
    }
  }
  var { constants } = http22;

  class NodeHttp2Handler {
    config;
    configProvider;
    metadata = { handlerProtocol: "h2" };
    connectionManager = new NodeHttp2ConnectionManager({});
    static create(instanceOrOptions) {
      if (typeof instanceOrOptions?.handle === "function") {
        return instanceOrOptions;
      }
      return new NodeHttp2Handler(instanceOrOptions);
    }
    constructor(options) {
      this.configProvider = new Promise((resolve3, reject) => {
        if (typeof options === "function") {
          options().then((opts) => {
            resolve3(opts || {});
          }).catch(reject);
        } else {
          resolve3(options || {});
        }
      });
    }
    destroy() {
      this.connectionManager.destroy();
    }
    async handle(request2, { abortSignal, requestTimeout, isEventStream } = {}) {
      if (!this.config) {
        this.config = await this.configProvider;
        const { disableConcurrentStreams: disableConcurrentStreams2, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;
        this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams2 ?? false);
        if (maxConcurrentStreams) {
          this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);
        }
        if (nodeHttp2ConnectOptions) {
          this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);
        }
      }
      const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
      const useIsolatedSession = disableConcurrentStreams || isEventStream;
      const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
      return new Promise((_resolve, _reject) => {
        let fulfilled = false;
        let writeRequestBodyPromise = undefined;
        const resolve3 = async (arg) => {
          await writeRequestBodyPromise;
          _resolve(arg);
        };
        const reject = async (arg) => {
          await writeRequestBodyPromise;
          _reject(arg);
        };
        if (abortSignal?.aborted) {
          fulfilled = true;
          const abortError = buildAbortError(abortSignal);
          reject(abortError);
          return;
        }
        const { hostname: hostname2, method, port, protocol, query } = request2;
        let auth = "";
        if (request2.username != null || request2.password != null) {
          const username = request2.username ?? "";
          const password = request2.password ?? "";
          auth = `${username}:${password}@`;
        }
        const authority = `${protocol}//${auth}${hostname2}${port ? `:${port}` : ""}`;
        const requestContext = { destination: new URL(authority) };
        const connectConfig = {
          requestTimeout: this.config?.sessionTimeout,
          isEventStream
        };
        const ref = useIsolatedSession ? this.connectionManager.createIsolatedSession(requestContext, connectConfig) : this.connectionManager.lease(requestContext, connectConfig);
        const session2 = ref.deref();
        const rejectWithDestroy = (err) => {
          if (useIsolatedSession) {
            ref.destroy();
          }
          fulfilled = true;
          reject(err);
        };
        const queryString = query ? buildQueryString(query) : "";
        let path2 = request2.path;
        if (queryString) {
          path2 += `?${queryString}`;
        }
        if (request2.fragment) {
          path2 += `#${request2.fragment}`;
        }
        const clientHttp2Stream = session2.request({
          ...request2.headers,
          [constants.HTTP2_HEADER_PATH]: path2,
          [constants.HTTP2_HEADER_METHOD]: method
        });
        if (effectiveRequestTimeout) {
          clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {
            clientHttp2Stream.close();
            const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
            timeoutError.name = "TimeoutError";
            rejectWithDestroy(timeoutError);
          });
        }
        if (abortSignal) {
          const onAbort = () => {
            clientHttp2Stream.close();
            const abortError = buildAbortError(abortSignal);
            rejectWithDestroy(abortError);
          };
          if (typeof abortSignal.addEventListener === "function") {
            const signal = abortSignal;
            signal.addEventListener("abort", onAbort, { once: true });
            clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort));
          } else {
            abortSignal.onabort = onAbort;
          }
        }
        clientHttp2Stream.on("frameError", (type2, code, id) => {
          rejectWithDestroy(new Error(`Frame type id ${type2} in stream id ${id} has failed with code ${code}.`));
        });
        clientHttp2Stream.on("error", rejectWithDestroy);
        clientHttp2Stream.on("aborted", () => {
          rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
        });
        clientHttp2Stream.on("response", (headers) => {
          const httpResponse = new HttpResponse({
            statusCode: headers[":status"] ?? -1,
            headers: getTransformedHeaders(headers),
            body: clientHttp2Stream
          });
          fulfilled = true;
          resolve3({ response: httpResponse });
          if (useIsolatedSession) {
            session2.close();
          }
        });
        clientHttp2Stream.on("close", () => {
          if (useIsolatedSession) {
            ref.destroy();
          } else {
            this.connectionManager.release(requestContext, ref);
          }
          if (!fulfilled) {
            rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
          }
        });
        writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request2, effectiveRequestTimeout);
      });
    }
    updateHttpClientConfig(key, value) {
      this.config = undefined;
      this.configProvider = this.configProvider.then((config) => {
        return {
          ...config,
          [key]: value
        };
      });
    }
    httpHandlerConfigs() {
      return this.config ?? {};
    }
  }

  class Collector extends Writable2 {
    bufferedBytes = [];
    _write(chunk, encoding, callback) {
      this.bufferedBytes.push(chunk);
      callback();
    }
  }
  var streamCollector = (stream) => {
    if (isReadableStreamInstance(stream)) {
      return collectReadableStream(stream);
    }
    return new Promise((resolve3, reject) => {
      const collector = new Collector;
      stream.pipe(collector);
      stream.on("error", (err) => {
        collector.end();
        reject(err);
      });
      collector.on("error", reject);
      collector.on("finish", function() {
        const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
        resolve3(bytes);
      });
    });
  };
  var isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream;
  async function collectReadableStream(stream) {
    const chunks = [];
    const reader = stream.getReader();
    let isDone = false;
    let length = 0;
    while (!isDone) {
      const { done, value } = await reader.read();
      if (value) {
        chunks.push(value);
        length += value.length;
      }
      isDone = done;
    }
    const collected = new Uint8Array(length);
    let offset = 0;
    for (const chunk of chunks) {
      collected.set(chunk, offset);
      offset += chunk.length;
    }
    return collected;
  }
  exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
  exports.NodeHttp2Handler = NodeHttp2Handler;
  exports.NodeHttpHandler = NodeHttpHandler;
  exports.streamCollector = streamCollector;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.51/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js
var require_checkUrl = __commonJS((exports) => {
  var { CredentialsProviderError } = require_config2();
  var ECS_CONTAINER_HOST = "169.254.170.2";
  var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
  var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
  exports.checkUrl = (url, logger) => {
    if (url.protocol === "https:") {
      return;
    }
    if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) {
      return;
    }
    if (url.hostname.includes("[")) {
      if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") {
        return;
      }
    } else {
      if (url.hostname === "localhost") {
        return;
      }
      const ipComponents = url.hostname.split(".");
      const inRange = (component) => {
        const num = parseInt(component, 10);
        return 0 <= num && num <= 255;
      };
      if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) {
        return;
      }
    }
    throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
  - loopback CIDR 127.0.0.0/8 or [::1/128]
  - ECS container host 169.254.170.2
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.51/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js
var require_requestHelpers = __commonJS((exports) => {
  var { CredentialsProviderError } = require_config2();
  var { HttpRequest } = require_protocols();
  var { parseRfc3339DateTime } = require_serde();
  var { sdkStreamMixin } = require_serde();
  exports.createGetRequest = function createGetRequest(url) {
    return new HttpRequest({
      protocol: url.protocol,
      hostname: url.hostname,
      port: Number(url.port),
      path: url.pathname,
      query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {
        acc[k] = v;
        return acc;
      }, {}),
      fragment: url.hash
    });
  };
  exports.getCredentials = async function getCredentials(response, logger) {
    const stream = sdkStreamMixin(response.body);
    const str = await stream.transformToString();
    if (response.statusCode === 200) {
      const parsed = JSON.parse(str);
      if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
        throw new CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger });
      }
      return {
        accessKeyId: parsed.AccessKeyId,
        secretAccessKey: parsed.SecretAccessKey,
        sessionToken: parsed.Token,
        expiration: parseRfc3339DateTime(parsed.Expiration)
      };
    }
    if (response.statusCode >= 400 && response.statusCode < 500) {
      let parsedBody = {};
      try {
        parsedBody = JSON.parse(str);
      } catch (e) {}
      throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
        Code: parsedBody.Code,
        Message: parsedBody.Message
      });
    }
    throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.51/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js
var require_retry_wrapper = __commonJS((exports) => {
  exports.retryWrapper = (toRetry, maxRetries, delayMs) => {
    return async () => {
      for (let i = 0;i < maxRetries; ++i) {
        try {
          return await toRetry();
        } catch (e) {
          await new Promise((resolve3) => setTimeout(resolve3, delayMs));
        }
      }
      return await toRetry();
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.51/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js
var require_fromHttp = __commonJS((exports) => {
  var { setCredentialFeature } = require_client4();
  var { CredentialsProviderError } = require_config2();
  var { NodeHttpHandler } = require_dist_cjs9();
  var fs2 = __require("node:fs/promises");
  var { checkUrl } = require_checkUrl();
  var { createGetRequest, getCredentials } = require_requestHelpers();
  var { retryWrapper } = require_retry_wrapper();
  var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
  var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
  var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
  var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
  var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
  exports.fromHttp = (options = {}) => {
    options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
    let host;
    const relative2 = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
    const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
    const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
    const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
    const warn2 = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
    if (relative2 && full) {
      warn2("@aws-sdk/credential-provider-http: " + "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
      warn2("awsContainerCredentialsFullUri will take precedence.");
    }
    if (token && tokenFile) {
      warn2("@aws-sdk/credential-provider-http: " + "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
      warn2("awsContainerAuthorizationToken will take precedence.");
    }
    if (full) {
      host = full;
    } else if (relative2) {
      host = `${DEFAULT_LINK_LOCAL_HOST}${relative2}`;
    } else {
      throw new CredentialsProviderError(`No HTTP credential provider host provided.
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
    }
    const url = new URL(host);
    checkUrl(url, options.logger);
    const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 });
    const requestTimeout = options.timeout ?? 1000;
    const provider = retryWrapper(async () => {
      const request2 = createGetRequest(url);
      if (token) {
        request2.headers.Authorization = token;
      } else if (tokenFile) {
        request2.headers.Authorization = (await fs2.readFile(tokenFile)).toString();
      }
      try {
        const result = await requestHandler.handle(request2, { requestTimeout });
        return getCredentials(result.response).then((creds) => setCredentialFeature(creds, "CREDENTIALS_HTTP", "z"));
      } catch (e) {
        throw new CredentialsProviderError(String(e), { logger: options.logger });
      }
    }, options.maxRetries ?? 3, options.timeout ?? 1000);
    return async () => {
      try {
        return await provider();
      } finally {
        requestHandler.destroy?.();
      }
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.51/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js
var require_dist_cjs10 = __commonJS((exports) => {
  var { fromHttp } = require_fromHttp();
  exports.fromHttp = fromHttp;
});

// ../../node_modules/.pnpm/@smithy+core@3.26.0/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js
var require_cbor = __commonJS((exports) => {
  var { nv, NumericValue, calculateBodyLength, _parseEpochTimestamp, fromBase64, generateIdempotencyToken } = require_serde();
  var { HttpRequest, collectBody, SerdeContext, RpcProtocol } = require_protocols();
  var { NormalizedSchema, deref, TypeRegistry } = require_schema();
  var { getSmithyContext } = require_transport2();
  var majorUint64 = 0;
  var majorNegativeInt64 = 1;
  var majorUnstructuredByteString = 2;
  var majorUtf8String = 3;
  var majorList = 4;
  var majorMap = 5;
  var majorTag = 6;
  var majorSpecial = 7;
  var specialFalse = 20;
  var specialTrue = 21;
  var specialNull = 22;
  var specialUndefined = 23;
  var extendedOneByte = 24;
  var extendedFloat16 = 25;
  var extendedFloat32 = 26;
  var extendedFloat64 = 27;
  var minorIndefinite = 31;
  function alloc(size) {
    return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size);
  }
  var tagSymbol = Symbol("@smithy/core/cbor::tagSymbol");
  function tag(data2) {
    data2[tagSymbol] = true;
    return data2;
  }
  var USE_BUFFER$1 = typeof Buffer !== "undefined";
  var textDecoder2 = new TextDecoder;
  var payload = alloc(0);
  var isBuffer = false;
  var dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
  var _offset = 0;
  function setPayload(bytes) {
    payload = bytes;
    isBuffer = USE_BUFFER$1 && payload instanceof Buffer;
    dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
  }
  function decode(at, to) {
    if (at >= to) {
      throw new Error("unexpected end of (decode) payload.");
    }
    const major = (payload[at] & 224) >> 5;
    const minor = payload[at] & 31;
    if (minor === minorIndefinite && 2 <= major && major <= 5) {
      return decodeIndefinite(at, to);
    }
    switch (major) {
      case majorUint64:
      case majorNegativeInt64:
      case majorTag: {
        let unsignedInt;
        let offset;
        if (minor < 24) {
          unsignedInt = minor;
          offset = 1;
        } else {
          switch (minor) {
            case extendedOneByte:
              if (to - at < 2) {
                overflow(1);
              }
              unsignedInt = payload[at + 1];
              offset = 2;
              break;
            case extendedFloat16:
              if (to - at < 3) {
                overflow(2);
              }
              unsignedInt = dataView$1.getUint16(at + 1);
              offset = 3;
              break;
            case extendedFloat32:
              if (to - at < 5) {
                overflow(4);
              }
              unsignedInt = dataView$1.getUint32(at + 1);
              offset = 5;
              break;
            case extendedFloat64:
              if (to - at < 9) {
                overflow(8);
              }
              {
                const hi = dataView$1.getUint32(at + 1);
                if (hi < 2097152) {
                  unsignedInt = hi * 4294967296 + dataView$1.getUint32(at + 5);
                } else {
                  unsignedInt = dataView$1.getBigUint64(at + 1);
                }
              }
              offset = 9;
              break;
            default:
              unexpectedMinor(minor);
          }
        }
        if (major === majorUint64) {
          _offset = offset;
          return castBigInt(unsignedInt);
        } else if (major === majorNegativeInt64) {
          let negativeInt;
          if (typeof unsignedInt === "bigint") {
            negativeInt = BigInt(-1) - unsignedInt;
          } else {
            negativeInt = -1 - unsignedInt;
          }
          _offset = offset;
          return castBigInt(negativeInt);
        } else {
          return decodeTagValue(at, to, minor, unsignedInt, offset);
        }
      }
      case majorUtf8String:
        return decodeUtf8String(at, to);
      case majorMap:
        return decodeMap(at, to);
      case majorList:
        return decodeList(at, to);
      case majorUnstructuredByteString:
        return decodeUnstructuredByteString(at, to);
      default:
        return decodeSpecial(at, to);
    }
  }
  function decodeIndefinite(at, to) {
    const major = (payload[at] & 224) >> 5;
    const minor = payload[at] & 31;
    if (minor === minorIndefinite) {
      switch (major) {
        case majorUtf8String:
          return decodeUtf8StringIndefinite(at, to);
        case majorMap:
          return decodeMapIndefinite(at, to);
        case majorList:
          return decodeListIndefinite(at, to);
        case majorUnstructuredByteString:
          return decodeUnstructuredByteStringIndefinite(at, to);
      }
    }
  }
  function bytesToFloat16(a, b) {
    const sign = a >> 7;
    const exponent = (a & 124) >> 2;
    const fraction = (a & 3) << 8 | b;
    const scalar = sign === 0 ? 1 : -1;
    if (exponent === 0) {
      if (fraction === 0) {
        return 0;
      }
      return scalar * (Math.pow(2, 1 - 15) * (fraction / 1024));
    } else if (exponent === 31) {
      if (fraction === 0) {
        return scalar * Infinity;
      }
      return NaN;
    }
    return scalar * (Math.pow(2, exponent - 15) * (1 + fraction / 1024));
  }
  function decodeMap(at, to) {
    const mapDataLength = decodeCount(at, to);
    if (mapDataLength < 15) {
      return decodeMapSmall(at, to, mapDataLength);
    }
    return decodeMapLarge(at, to, mapDataLength);
  }
  function decodeMapLarge(at, to, mapDataLength) {
    const offset = _offset;
    at += offset;
    const base = at;
    const map = Object.create(null);
    for (let i = 0;i < mapDataLength; ++i) {
      const key = decodeUtf8String(at, to);
      at += _offset;
      const valMajor = (payload[at] & 224) >> 5;
      if (valMajor === majorUtf8String) {
        map[key] = decodeUtf8String(at, to);
      } else {
        map[key] = decode(at, to);
      }
      at += _offset;
    }
    _offset = offset + (at - base);
    Object.setPrototypeOf(map, Object.prototype);
    return map;
  }
  function decodeMapSmall(at, to, mapDataLength) {
    const offset = _offset;
    at += offset;
    const base = at;
    const map = {};
    for (let i = 0;i < mapDataLength; ++i) {
      const key = decodeUtf8String(at, to);
      at += _offset;
      map[key] = decode(at, to);
      at += _offset;
    }
    _offset = offset + (at - base);
    return map;
  }
  function decodeList(at, to) {
    const listDataLength = decodeCount(at, to);
    const offset = _offset;
    at += offset;
    const base = at;
    const list = Array(listDataLength);
    for (let i = 0;i < listDataLength; ++i) {
      list[i] = decode(at, to);
      at += _offset;
    }
    _offset = offset + (at - base);
    return list;
  }
  function decodeUtf8String(at, to) {
    const length = decodeCount(at, to);
    const offset = _offset;
    at += offset;
    if (to - at < length) {
      overflow(length);
    }
    _offset = offset + length;
    if (length < 24) {
      return decodeUtf8StringCached(at, length);
    }
    if (isBuffer) {
      return payload.toString("utf-8", at, at + length);
    }
    return textDecoder2.decode(payload.subarray(at, at + length));
  }
  var stringCache = new Array(2048);
  var stringCacheEpochs = new Uint16Array(2048);
  var cacheEpoch = 0;
  function advanceDecodingEpoch() {
    cacheEpoch = cacheEpoch + 1 & 65535;
  }
  function decodeUtf8StringCached(at, length) {
    let h = length;
    for (let i = 0;i < length; ++i) {
      h = h * 31 + payload[at + i] | 0;
    }
    const slot = h >>> 0 & 2047;
    const cached = stringCache[slot];
    if (cached !== undefined) {
      if (cached.length === length) {
        let match = true;
        for (let i = 0;i < length; ++i) {
          if (cached.charCodeAt(i) !== payload[at + i]) {
            match = false;
            break;
          }
        }
        if (match) {
          stringCacheEpochs[slot] = cacheEpoch;
          return cached;
        }
      }
    }
    const result = isBuffer ? payload.toString("utf-8", at, at + length) : textDecoder2.decode(payload.subarray(at, at + length));
    if (stringCacheEpochs[slot] !== cacheEpoch) {
      stringCache[slot] = result;
      stringCacheEpochs[slot] = cacheEpoch;
    }
    return result;
  }
  function decodeUnstructuredByteString(at, to) {
    const length = decodeCount(at, to);
    const offset = _offset;
    at += offset;
    if (to - at < length) {
      overflow(length);
    }
    const value = payload.subarray(at, at + length);
    _offset = offset + length;
    return value;
  }
  function decodeTagValue(at, to, minor, unsignedInt, offset) {
    if (minor === 2 || minor === 3) {
      const length = decodeCount(at + offset, to);
      let b = BigInt(0);
      const start = at + offset + _offset;
      for (let i = start;i < start + length; ++i) {
        b = b << BigInt(8) | BigInt(payload[i]);
      }
      _offset = offset + _offset + length;
      return minor === 3 ? -b - BigInt(1) : b;
    } else if (minor === 4) {
      const decimalFraction = decode(at + offset, to);
      const [exponent, mantissa] = decimalFraction;
      const normalizer = mantissa < 0 ? -1 : 1;
      const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa));
      let numericString;
      const sign = mantissa < 0 ? "-" : "";
      numericString = exponent === 0 ? mantissaStr : mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent);
      numericString = numericString.replace(/^0+/g, "");
      if (numericString === "") {
        numericString = "0";
      }
      if (numericString[0] === ".") {
        numericString = "0" + numericString;
      }
      numericString = sign + numericString;
      _offset = offset + _offset;
      return nv(numericString);
    } else {
      const value = decode(at + offset, to);
      const valueOffset = _offset;
      _offset = offset + valueOffset;
      return tag({ tag: castBigInt(unsignedInt), value });
    }
  }
  function decodeSpecial(at, to) {
    const minor = payload[at] & 31;
    switch (minor) {
      case specialTrue:
      case specialFalse:
        _offset = 1;
        return minor === specialTrue;
      case specialNull:
        _offset = 1;
        return null;
      case specialUndefined:
        _offset = 1;
        return null;
      case extendedFloat16:
        if (to - at < 3) {
          throw new Error("incomplete float16 at end of buf.");
        }
        _offset = 3;
        return bytesToFloat16(payload[at + 1], payload[at + 2]);
      case extendedFloat32:
        if (to - at < 5) {
          throw new Error("incomplete float32 at end of buf.");
        }
        _offset = 5;
        return dataView$1.getFloat32(at + 1);
      case extendedFloat64:
        if (to - at < 9) {
          throw new Error("incomplete float64 at end of buf.");
        }
        _offset = 9;
        return dataView$1.getFloat64(at + 1);
      default:
        unexpectedMinor(minor);
    }
  }
  function decodeCount(at, to) {
    const minor = payload[at] & 31;
    if (minor < 24) {
      _offset = 1;
      return minor;
    }
    switch (minor) {
      case extendedOneByte:
        if (to - at < 2) {
          overflow(1);
        }
        _offset = 2;
        return payload[at + 1];
      case extendedFloat16:
        if (to - at < 3) {
          overflow(2);
        }
        _offset = 3;
        return dataView$1.getUint16(at + 1);
      case extendedFloat32:
        if (to - at < 5) {
          overflow(4);
        }
        _offset = 5;
        return dataView$1.getUint32(at + 1);
      case extendedFloat64:
        if (to - at < 9) {
          overflow(8);
        }
        _offset = 9;
        return demote(dataView$1.getBigUint64(at + 1));
      default:
        unexpectedMinor(minor);
    }
  }
  function decodeMapIndefinite(at, to) {
    at += 1;
    const base = at;
    const map = {};
    for (;at < to; ) {
      if (payload[at] === 255) {
        _offset = at - base + 2;
        return map;
      }
      const key = decodeUtf8String(at, to);
      at += _offset;
      map[key] = decode(at, to);
      at += _offset;
    }
    throw new Error("expected break marker.");
  }
  function decodeListIndefinite(at, to) {
    at += 1;
    const list = [];
    for (const base = at;at < to; ) {
      if (payload[at] === 255) {
        _offset = at - base + 2;
        return list;
      }
      list.push(decode(at, to));
      at += _offset;
    }
    throw new Error("expected break marker.");
  }
  function decodeUtf8StringIndefinite(at, to) {
    at += 1;
    const vector2 = [];
    for (const base = at;at < to; ) {
      if (payload[at] === 255) {
        const data2 = alloc(vector2.length);
        data2.set(vector2, 0);
        _offset = at - base + 2;
        if (USE_BUFFER$1) {
          return data2.toString("utf-8", 0, data2.length);
        }
        return textDecoder2.decode(data2);
      }
      const major = (payload[at] & 224) >> 5;
      const minor = payload[at] & 31;
      if (major !== majorUtf8String) {
        unexpectedMajorInIndefiniteString(major);
      }
      if (minor === minorIndefinite) {
        throw new Error("nested indefinite string.");
      }
      const bytes = decodeUnstructuredByteString(at, to);
      const length = _offset;
      at += length;
      for (let i = 0;i < bytes.length; ++i) {
        vector2.push(bytes[i]);
      }
    }
    throw new Error("expected break marker.");
  }
  function decodeUnstructuredByteStringIndefinite(at, to) {
    at += 1;
    const vector2 = [];
    for (const base = at;at < to; ) {
      if (payload[at] === 255) {
        const data2 = alloc(vector2.length);
        data2.set(vector2, 0);
        _offset = at - base + 2;
        return data2;
      }
      const major = (payload[at] & 224) >> 5;
      const minor = payload[at] & 31;
      if (major !== majorUnstructuredByteString) {
        unexpectedMajorInIndefiniteString(major);
      }
      if (minor === minorIndefinite) {
        throw new Error("nested indefinite string.");
      }
      const bytes = decodeUnstructuredByteString(at, to);
      const length = _offset;
      at += length;
      for (let i = 0;i < bytes.length; ++i) {
        vector2.push(bytes[i]);
      }
    }
    throw new Error("expected break marker.");
  }
  function castBigInt(bigInt) {
    if (typeof bigInt === "number") {
      return bigInt;
    }
    const num = Number(bigInt);
    if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) {
      return num;
    }
    return bigInt;
  }
  function demote(bigInteger) {
    const num = Number(bigInteger);
    if (num < Number.MIN_SAFE_INTEGER || Number.MAX_SAFE_INTEGER < num) {
      console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${bigInteger}) to ${num} with loss of precision.`));
    }
    return num;
  }
  function overflow(n) {
    throw new Error(`length ${n} greater than remaining buf len.`);
  }
  function unexpectedMinor(minor) {
    throw new Error(`unexpected minor value ${minor}.`);
  }
  function unexpectedMajorInIndefiniteString(major) {
    throw new Error(`unexpected major type ${major} in indefinite string.`);
  }
  var USE_BUFFER = typeof Buffer !== "undefined";
  var encodeStringCache = new Map;
  var encodeCacheEpoch = 0;
  var encodeCacheSaturated = false;
  var initialSize = 2048;
  var data = alloc(initialSize);
  var dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
  var cursor = 0;
  function encode(_input) {
    const encodeStack = [_input];
    while (encodeStack.length) {
      const input = encodeStack.pop();
      if (typeof input === "string") {
        const len = input.length;
        if (USE_BUFFER) {
          ensureSpace(len * 3 + 9);
          if (len > 23) {
            encodeHeader(majorUtf8String, Buffer.byteLength(input));
            cursor += data.write(input, cursor);
          } else {
            encodeStringCached(input);
          }
        } else {
          const maxBytes = len * 3;
          ensureSpace(maxBytes + 9);
          const headerPos = cursor;
          const result = new TextEncoder().encodeInto(input, data.subarray(cursor + 9));
          const byteLen = result.written;
          let headerSize;
          if (byteLen < 24) {
            headerSize = 1;
          } else if (byteLen < 256) {
            headerSize = 2;
          } else if (byteLen < 65536) {
            headerSize = 3;
          } else if (byteLen < 4294967296) {
            headerSize = 5;
          } else {
            headerSize = 9;
          }
          if (headerSize < 9) {
            data.copyWithin(headerPos + headerSize, headerPos + 9, headerPos + 9 + byteLen);
          }
          cursor = headerPos;
          encodeInteger(majorUtf8String, byteLen);
          cursor += byteLen;
        }
        continue;
      }
      if (data.byteLength - cursor < 9) {
        ensureSpace(64);
      }
      if (typeof input === "number") {
        if (Number.isInteger(input)) {
          const nonNegative = input >= 0;
          const major = nonNegative ? majorUint64 : majorNegativeInt64;
          const value = nonNegative ? input : -input - 1;
          if (value < 24) {
            data[cursor++] = major << 5 | value;
          } else if (value < 256) {
            data[cursor++] = major << 5 | 24;
            data[cursor++] = value;
          } else if (value < 65536) {
            data[cursor++] = major << 5 | extendedFloat16;
            data[cursor++] = value >> 8;
            data[cursor++] = value & 255;
          } else if (value < 4294967296) {
            data[cursor++] = major << 5 | extendedFloat32;
            dataView.setUint32(cursor, value);
            cursor += 4;
          } else {
            data[cursor++] = major << 5 | extendedFloat64;
            const hi = value / 4294967296 | 0;
            const lo = value - hi * 4294967296 | 0;
            dataView.setUint32(cursor, hi);
            dataView.setUint32(cursor + 4, lo);
            cursor += 8;
          }
          continue;
        }
        data[cursor++] = majorSpecial << 5 | extendedFloat64;
        dataView.setFloat64(cursor, input);
        cursor += 8;
        continue;
      } else if (typeof input === "bigint") {
        const nonNegative = input >= 0;
        const major = nonNegative ? majorUint64 : majorNegativeInt64;
        const value = nonNegative ? input : -input - BigInt(1);
        if (value < BigInt("18446744073709551616")) {
          const n = Number(value);
          if (n < 4294967296) {
            encodeInteger(major, n);
          } else {
            data[cursor++] = major << 5 | extendedFloat64;
            dataView.setBigUint64(cursor, value);
            cursor += 8;
          }
        } else {
          const binaryBigInt = value.toString(2);
          const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));
          let b = value;
          let i = 0;
          while (bigIntBytes.byteLength - ++i >= 0) {
            bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));
            b >>= BigInt(8);
          }
          ensureSpace(bigIntBytes.byteLength * 2 + 16);
          data[cursor++] = nonNegative ? 194 : 195;
          encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
          data.set(bigIntBytes, cursor);
          cursor += bigIntBytes.byteLength;
        }
        continue;
      } else if (input === null) {
        data[cursor++] = majorSpecial << 5 | specialNull;
        continue;
      } else if (typeof input === "boolean") {
        data[cursor++] = majorSpecial << 5 | (input ? specialTrue : specialFalse);
        continue;
      } else if (typeof input === "undefined") {
        throw new Error("@smithy/core/cbor: client may not serialize undefined value.");
      } else if (Array.isArray(input)) {
        encodeInteger(majorList, input.length);
        ensureSpace(input.length * 9 + 64);
        for (let i = input.length - 1;i >= 0; --i) {
          encodeStack.push(input[i]);
        }
        continue;
      } else if (typeof input.byteLength === "number") {
        ensureSpace(input.length * 2 + 9);
        encodeInteger(majorUnstructuredByteString, input.length);
        data.set(input, cursor);
        cursor += input.byteLength;
        continue;
      } else if (typeof input === "object") {
        if (input instanceof NumericValue) {
          const decimalIndex = input.string.indexOf(".");
          const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
          const mantissa = BigInt(input.string.replace(".", ""));
          data[cursor++] = 196;
          encodeInteger(majorList, 2);
          encodeStack.push(mantissa);
          encodeStack.push(exponent);
          continue;
        }
        if (input[tagSymbol]) {
          if ("tag" in input && "value" in input) {
            encodeStack.push(input.value);
            encodeHeader(majorTag, input.tag);
            continue;
          } else {
            throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: " + JSON.stringify(input));
          }
        }
        const keys = Object.keys(input);
        const len = keys.length;
        encodeInteger(majorMap, len);
        for (let i = len - 1;i >= 0; --i) {
          encodeStack.push(input[keys[i]]);
          encodeStack.push(keys[i]);
        }
        continue;
      }
      throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`);
    }
  }
  function advanceEncodingEpoch() {
    encodeCacheEpoch = encodeCacheEpoch + 1 & 65535;
    encodeCacheSaturated = false;
  }
  function toUint8Array() {
    const out = alloc(cursor);
    out.set(data.subarray(0, cursor), 0);
    cursor = 0;
    return out;
  }
  function resize(size) {
    const old = data;
    data = alloc(size);
    if (old) {
      if (old.copy) {
        old.copy(data, 0, 0, old.byteLength);
      } else {
        data.set(old, 0);
      }
    }
    dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
  }
  function encodeStringCached(input) {
    const cached = encodeStringCache.get(input);
    if (cached !== undefined) {
      data.set(cached.bytes, cursor);
      cursor += cached.bytes.length;
      cached.epoch = encodeCacheEpoch;
      return;
    }
    const start = cursor;
    const byteLen = Buffer.byteLength(input);
    encodeInteger(majorUtf8String, byteLen);
    cursor += data.write(input, cursor);
    const bytes = Uint8Array.prototype.slice.call(data, start, cursor);
    if (encodeStringCache.size >= 2048) {
      if (encodeCacheSaturated) {
        return;
      }
      let evicted = 0;
      for (const [key, entry] of encodeStringCache) {
        if (evicted >= 1024) {
          break;
        }
        if (entry.epoch !== encodeCacheEpoch) {
          encodeStringCache.delete(key);
          evicted++;
        }
      }
      if (evicted === 0) {
        encodeCacheSaturated = true;
        return;
      }
    }
    if (encodeStringCache.size < 2048) {
      encodeStringCache.set(input, { epoch: encodeCacheEpoch, bytes });
    }
  }
  function ensureSpace(bytes) {
    const remaining = data.byteLength - cursor;
    if (remaining < bytes) {
      if (cursor < 16000000) {
        resize(Math.max(data.byteLength * 4, data.byteLength + bytes));
      } else {
        resize(data.byteLength + bytes + 16000000);
      }
    }
  }
  function encodeHeader(major, value) {
    if (value < 24) {
      data[cursor++] = major << 5 | value;
    } else if (value < 256) {
      data[cursor++] = major << 5 | 24;
      data[cursor++] = value;
    } else if (value < 65536) {
      data[cursor++] = major << 5 | extendedFloat16;
      dataView.setUint16(cursor, value);
      cursor += 2;
    } else if (value < 4294967296) {
      data[cursor++] = major << 5 | extendedFloat32;
      dataView.setUint32(cursor, value);
      cursor += 4;
    } else {
      data[cursor++] = major << 5 | extendedFloat64;
      dataView.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value));
      cursor += 8;
    }
  }
  function encodeInteger(major, value) {
    if (value < 24) {
      data[cursor++] = major << 5 | value;
    } else if (value < 256) {
      data[cursor++] = major << 5 | 24;
      data[cursor++] = value;
    } else if (value < 65536) {
      data[cursor++] = major << 5 | extendedFloat16;
      data[cursor++] = value >> 8;
      data[cursor++] = value & 255;
    } else if (value < 4294967296) {
      data[cursor++] = major << 5 | extendedFloat32;
      dataView.setUint32(cursor, value);
      cursor += 4;
    } else {
      data[cursor++] = major << 5 | extendedFloat64;
      const hi = value / 4294967296 | 0;
      const lo = value - hi * 4294967296 | 0;
      dataView.setUint32(cursor, hi);
      dataView.setUint32(cursor + 4, lo);
      cursor += 8;
    }
  }
  var cbor = {
    deserialize(payload2) {
      advanceDecodingEpoch();
      setPayload(payload2);
      return decode(0, payload2.length);
    },
    serialize(input) {
      advanceEncodingEpoch();
      try {
        encode(input);
        return toUint8Array();
      } catch (e) {
        toUint8Array();
        throw e;
      }
    },
    resizeEncodingBuffer(size) {
      resize(size);
    }
  };
  var parseCborBody = (streamBody, context10) => {
    return collectBody(streamBody, context10).then(async (bytes) => {
      if (bytes.length) {
        try {
          return cbor.deserialize(bytes);
        } catch (e) {
          Object.defineProperty(e, "$responseBodyText", {
            value: context10.utf8Encoder(bytes)
          });
          throw e;
        }
      }
      return {};
    });
  };
  var dateToTag = (date2) => {
    return tag({
      tag: 1,
      value: date2.getTime() / 1000
    });
  };
  var parseCborErrorBody = async (errorBody, context10) => {
    const value = await parseCborBody(errorBody, context10);
    value.message = value.message ?? value.Message;
    return value;
  };
  var loadSmithyRpcV2CborErrorCode = (output, data2) => {
    const sanitizeErrorCode = (rawValue) => {
      let cleanValue = rawValue;
      if (typeof cleanValue === "number") {
        cleanValue = cleanValue.toString();
      }
      if (cleanValue.indexOf(",") >= 0) {
        cleanValue = cleanValue.split(",")[0];
      }
      if (cleanValue.indexOf(":") >= 0) {
        cleanValue = cleanValue.split(":")[0];
      }
      if (cleanValue.indexOf("#") >= 0) {
        cleanValue = cleanValue.split("#")[1];
      }
      return cleanValue;
    };
    if (data2["__type"] !== undefined) {
      return sanitizeErrorCode(data2["__type"]);
    }
    let codeKey;
    for (const key in data2) {
      if (key.toLowerCase() === "code") {
        codeKey = key;
        break;
      }
    }
    if (codeKey && data2[codeKey] !== undefined) {
      return sanitizeErrorCode(data2[codeKey]);
    }
  };
  var checkCborResponse = (response) => {
    if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") {
      throw new Error("Malformed RPCv2 CBOR response, status: " + response.statusCode);
    }
  };
  var buildHttpRpcRequest = async (context10, headers, path2, resolvedHostname, body) => {
    const endpoint = await context10.endpoint();
    const { hostname: hostname2, protocol = "https", port, path: basePath } = endpoint;
    const contents = {
      protocol,
      hostname: hostname2,
      port,
      method: "POST",
      path: basePath.endsWith("/") ? basePath.slice(0, -1) + path2 : basePath + path2,
      headers: {
        ...headers
      }
    };
    if (resolvedHostname !== undefined) {
      contents.hostname = resolvedHostname;
    }
    if (endpoint.headers) {
      for (const name in endpoint.headers) {
        contents.headers[name] = endpoint.headers[name];
      }
    }
    if (body !== undefined) {
      contents.body = body;
      try {
        contents.headers["content-length"] = String(calculateBodyLength(body));
      } catch (e) {}
    }
    return new HttpRequest(contents);
  };

  class CborCodec extends SerdeContext {
    createSerializer() {
      const serializer = new CborShapeSerializer;
      serializer.setSerdeContext(this.serdeContext);
      return serializer;
    }
    createDeserializer() {
      const deserializer = new CborShapeDeserializer;
      deserializer.setSerdeContext(this.serdeContext);
      return deserializer;
    }
  }

  class CborShapeSerializer extends SerdeContext {
    value;
    write(schema, value) {
      this.value = this.serialize(schema, value);
    }
    serialize(schema, source) {
      const ns = NormalizedSchema.of(schema);
      if (source == null) {
        if (ns.isIdempotencyToken()) {
          return generateIdempotencyToken();
        }
        return source;
      }
      if (ns.isBlobSchema()) {
        if (typeof source === "string") {
          return (this.serdeContext?.base64Decoder ?? fromBase64)(source);
        }
        return source;
      }
      if (ns.isTimestampSchema()) {
        if (typeof source === "number" || typeof source === "bigint") {
          return dateToTag(new Date(Number(source) / 1000 | 0));
        }
        return dateToTag(source);
      }
      if (typeof source === "function" || typeof source === "object") {
        const sourceObject = source;
        if (ns.isListSchema() && Array.isArray(sourceObject)) {
          const sparse = !!ns.getMergedTraits().sparse;
          const newArray = [];
          let i = 0;
          for (const item of sourceObject) {
            const value = this.serialize(ns.getValueSchema(), item);
            if (value != null || sparse) {
              newArray[i++] = value;
            }
          }
          return newArray;
        }
        if (sourceObject instanceof Date) {
          return dateToTag(sourceObject);
        }
        const newObject = {};
        if (ns.isMapSchema()) {
          const sparse = !!ns.getMergedTraits().sparse;
          for (const key in sourceObject) {
            const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
            if (value != null || sparse) {
              newObject[key] = value;
            }
          }
        } else if (ns.isStructSchema()) {
          for (const [key, memberSchema] of ns.structIterator()) {
            const value = this.serialize(memberSchema, sourceObject[key]);
            if (value != null) {
              newObject[key] = value;
            }
          }
          const isUnion = ns.isUnionSchema();
          if (isUnion && Array.isArray(sourceObject.$unknown)) {
            const [k, v] = sourceObject.$unknown;
            newObject[k] = v;
          } else if (typeof sourceObject.__type === "string") {
            for (const k in sourceObject) {
              if (!(k in newObject)) {
                newObject[k] = this.serialize(15, sourceObject[k]);
              }
            }
          }
        } else if (ns.isDocumentSchema()) {
          for (const key in sourceObject) {
            newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
          }
        } else if (ns.isBigDecimalSchema()) {
          return sourceObject;
        }
        return newObject;
      }
      return source;
    }
    flush() {
      const buffer = cbor.serialize(this.value);
      this.value = undefined;
      return buffer;
    }
  }

  class CborShapeDeserializer extends SerdeContext {
    read(schema, bytes) {
      const data2 = cbor.deserialize(bytes);
      return this.readValue(schema, data2);
    }
    readValue(_schema, value) {
      const ns = NormalizedSchema.of(_schema);
      if (ns.isTimestampSchema()) {
        if (typeof value === "number") {
          return _parseEpochTimestamp(value);
        }
        if (typeof value === "object") {
          if (value.tag === 1 && "value" in value) {
            return _parseEpochTimestamp(value.value);
          }
        }
      }
      if (ns.isBlobSchema()) {
        if (typeof value === "string") {
          return (this.serdeContext?.base64Decoder ?? fromBase64)(value);
        }
        return value;
      }
      if (typeof value === "undefined" || typeof value === "boolean" || typeof value === "number" || typeof value === "string" || typeof value === "bigint" || typeof value === "symbol") {
        return value;
      } else if (typeof value === "object") {
        if (value === null) {
          return null;
        }
        if ("byteLength" in value) {
          return value;
        }
        if (value instanceof Date) {
          return value;
        }
        if (ns.isDocumentSchema()) {
          return value;
        }
        if (ns.isListSchema()) {
          const newArray = [];
          const memberSchema = ns.getValueSchema();
          for (const item of value) {
            const itemValue = this.readValue(memberSchema, item);
            newArray.push(itemValue);
          }
          return newArray;
        }
        const newObject = {};
        if (ns.isMapSchema()) {
          const targetSchema = ns.getValueSchema();
          for (const key in value) {
            const itemValue = this.readValue(targetSchema, value[key]);
            newObject[key] = itemValue;
          }
        } else if (ns.isStructSchema()) {
          const isUnion = ns.isUnionSchema();
          let keys;
          if (isUnion) {
            keys = new Set;
            for (const k in value) {
              if (k !== "__type") {
                keys.add(k);
              }
            }
          }
          for (const [key, memberSchema] of ns.structIterator()) {
            if (isUnion) {
              keys.delete(key);
            }
            if (value[key] != null) {
              newObject[key] = this.readValue(memberSchema, value[key]);
            }
          }
          if (isUnion && keys?.size === 1) {
            let newObjectEmpty = true;
            for (const _ in newObject) {
              newObjectEmpty = false;
              break;
            }
            if (newObjectEmpty) {
              const k = keys.values().next().value;
              newObject.$unknown = [k, value[k]];
            }
          } else if (typeof value.__type === "string") {
            for (const k in value) {
              if (!(k in newObject)) {
                newObject[k] = value[k];
              }
            }
          }
        } else if (value instanceof NumericValue) {
          return value;
        }
        return newObject;
      } else {
        return value;
      }
    }
  }

  class SmithyRpcV2CborProtocol extends RpcProtocol {
    codec = new CborCodec;
    serializer = this.codec.createSerializer();
    deserializer = this.codec.createDeserializer();
    constructor({ defaultNamespace, errorTypeRegistries }) {
      super({ defaultNamespace, errorTypeRegistries });
    }
    getShapeId() {
      return "smithy.protocols#rpcv2Cbor";
    }
    getPayloadCodec() {
      return this.codec;
    }
    async serializeRequest(operationSchema, input, context10) {
      const request2 = await super.serializeRequest(operationSchema, input, context10);
      Object.assign(request2.headers, {
        "content-type": this.getDefaultContentType(),
        "smithy-protocol": "rpc-v2-cbor",
        accept: this.getDefaultContentType()
      });
      if (deref(operationSchema.input) === "unit") {
        delete request2.body;
        delete request2.headers["content-type"];
      } else {
        if (!request2.body) {
          this.serializer.write(15, {});
          request2.body = this.serializer.flush();
        }
        try {
          request2.headers["content-length"] = String(request2.body.byteLength);
        } catch (e) {}
      }
      const { service, operation } = getSmithyContext(context10);
      const path2 = `/service/${service}/operation/${operation}`;
      if (request2.path.endsWith("/")) {
        request2.path += path2.slice(1);
      } else {
        request2.path += path2;
      }
      return request2;
    }
    async deserializeResponse(operationSchema, context10, response) {
      return super.deserializeResponse(operationSchema, context10, response);
    }
    async handleError(operationSchema, context10, response, dataObject, metadata) {
      const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
      const errorMetadata = {
        $metadata: metadata,
        $fault: response.statusCode <= 500 ? "client" : "server"
      };
      let namespace = this.options.defaultNamespace;
      if (errorName.includes("#")) {
        [namespace] = errorName.split("#");
      }
      const registry = this.compositeErrorRegistry;
      const nsRegistry = TypeRegistry.for(namespace);
      registry.copyFrom(nsRegistry);
      let errorSchema;
      try {
        errorSchema = registry.getSchema(errorName);
      } catch (e) {
        if (dataObject.Message) {
          dataObject.message = dataObject.Message;
        }
        const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
        registry.copyFrom(syntheticRegistry);
        const baseExceptionSchema = registry.getBaseException();
        if (baseExceptionSchema) {
          const ErrorCtor2 = registry.getErrorCtor(baseExceptionSchema);
          throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
        }
        throw Object.assign(new Error(errorName), errorMetadata, dataObject);
      }
      const ns = NormalizedSchema.of(errorSchema);
      const ErrorCtor = registry.getErrorCtor(errorSchema);
      const message = dataObject.message ?? dataObject.Message ?? "Unknown";
      const exception = new ErrorCtor({});
      const output = {};
      for (const [name, member2] of ns.structIterator()) {
        output[name] = this.deserializer.readValue(member2, dataObject[name]);
      }
      throw Object.assign(exception, errorMetadata, {
        $fault: ns.getMergedTraits().error,
        message
      }, output);
    }
    getDefaultContentType() {
      return "application/cbor";
    }
  }
  exports.CborCodec = CborCodec;
  exports.CborShapeDeserializer = CborShapeDeserializer;
  exports.CborShapeSerializer = CborShapeSerializer;
  exports.SmithyRpcV2CborProtocol = SmithyRpcV2CborProtocol;
  exports.buildHttpRpcRequest = buildHttpRpcRequest;
  exports.cbor = cbor;
  exports.checkCborResponse = checkCborResponse;
  exports.dateToTag = dateToTag;
  exports.loadSmithyRpcV2CborErrorCode = loadSmithyRpcV2CborErrorCode;
  exports.parseCborBody = parseCborBody;
  exports.parseCborErrorBody = parseCborErrorBody;
  exports.tag = tag;
  exports.tagSymbol = tagSymbol;
});

// ../../node_modules/.pnpm/@aws-sdk+xml-builder@3.972.31/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js
var require_xml_parser = __commonJS((exports) => {
  exports.parseXML = function parseXML(xml) {
    const state = new AwsXmlParser(xml);
    return state.parse();
  };

  class AwsXmlParser {
    x;
    i = 0;
    z;
    constructor(x) {
      this.x = x;
      this.x = x.replace(/\r\n?/g, `
`);
      this.z = this.x.length;
    }
    parse() {
      const p = this;
      const { z } = p;
      while (p.i < z) {
        p.trim();
        if (p.i >= z) {
          break;
        }
        if (p.isNext("<?")) {
          p.readTo("?>");
          p.trim();
        } else if (p.isNext("<!--")) {
          p.readTo("-->");
          p.trim();
        } else if (p.isNext("<!DOCTYPE", false)) {
          p.skipDoctype();
          p.trim();
        } else if (p.x[p.i] === "<") {
          const root = p.parseTag();
          return { [root.tag]: root.value };
        } else {
          throw new Error("@aws-sdk XML parse error: unexpected content.");
        }
      }
      throw new Error("@aws-sdk XML parse error: no root element.");
    }
    isNext(s, caseSensitive = true) {
      const p = this;
      if (caseSensitive) {
        return p.x.startsWith(s, p.i);
      }
      return p.x.toLowerCase().startsWith(s.toLowerCase(), p.i);
    }
    readTo(stop) {
      const p = this;
      const _i = p.x.indexOf(stop, p.i);
      if (_i === -1) {
        throw new Error(`@aws-sdk XML parse error: expected "${stop}" not found.`);
      }
      const result = p.x.slice(p.i, _i);
      p.i = _i + stop.length;
      return result;
    }
    trim() {
      const p = this;
      while (p.i < p.z && ` 	\r
`.includes(p.x[p.i])) {
        ++p.i;
      }
    }
    readAttrValue() {
      const p = this;
      const quote = p.x[p.i];
      ++p.i;
      let value = "";
      while (p.i < p.z && p.x[p.i] !== quote) {
        value += p.x[p.i++];
      }
      ++p.i;
      return p.decodeEntities(value);
    }
    parseTag() {
      const p = this;
      ++p.i;
      let tag = "";
      while (p.i < p.z && !` 	\r
>/`.includes(p.x[p.i])) {
        tag += p.x[p.i++];
      }
      let hasAttrs = false;
      const attrs = Object.create(null);
      while (p.i < p.z) {
        p.trim();
        if (">/".includes(p.x[p.i])) {
          break;
        }
        let name = "";
        while (p.i < p.z && !`= 	\r
>/?`.includes(p.x[p.i])) {
          name += p.x[p.i++];
        }
        p.trim();
        if (p.x[p.i] !== "=") {
          break;
        }
        ++p.i;
        p.trim();
        attrs[name] = p.readAttrValue();
        hasAttrs = true;
      }
      if (p.i >= p.z) {
        throw new Error("@aws-sdk XML parse error: unexpected end of input.");
      }
      if (p.x[p.i] === "/") {
        ++p.i;
        if (p.i >= p.z || p.x[p.i] !== ">") {
          throw new Error("@aws-sdk XML parse error: expected > at the end of self-closing tag.");
        }
        ++p.i;
        Object.setPrototypeOf(attrs, Object.prototype);
        return { tag, value: hasAttrs ? attrs : "" };
      }
      if (p.x[p.i] !== ">") {
        throw new Error("@aws-sdk XML parse error: expected > at the end of opening tag.");
      }
      ++p.i;
      const textParts = [];
      const childTags = [];
      let hasElementChild = false;
      while (p.i < p.z) {
        if (p.isNext("</")) {
          break;
        }
        if (p.x[p.i] === "<") {
          if (p.isNext("<!--")) {
            p.readTo("-->");
          } else if (p.isNext("<![CDATA[")) {
            p.i += 9;
            textParts.push(p.readTo("]]>"));
          } else if (p.isNext("<?")) {
            p.readTo("?>");
          } else {
            hasElementChild = true;
            childTags.push(p.parseTag());
          }
        } else {
          let text2 = "";
          while (p.i < p.z && p.x[p.i] !== "<") {
            text2 += p.x[p.i++];
          }
          textParts.push(p.decodeEntities(text2));
        }
      }
      if (!p.isNext("</")) {
        throw new Error(`@aws-sdk XML parse error: missing closing tag </${tag}>.`);
      }
      p.i += 2;
      const closeTag = p.readTo(">").trim();
      if (closeTag !== tag) {
        throw new Error(`@aws-sdk XML parse error: mismatched tags <${tag}> and </${closeTag}>.`);
      }
      if (!hasAttrs && textParts.length === 0 && !hasElementChild) {
        return { tag, value: "" };
      }
      if (!hasAttrs && !hasElementChild) {
        const text2 = textParts.length === 1 ? textParts[0] : textParts.join("");
        if (text2.trim() === "" && text2.includes(`
`)) {
          return { tag, value: "" };
        }
        return { tag, value: text2 };
      }
      const obj = Object.create(null);
      for (const text2 of textParts) {
        if (text2.trim() === "" && text2.includes(`
`)) {
          continue;
        }
        obj["#text"] = "#text" in obj ? obj["#text"] + text2 : text2;
      }
      for (const child of childTags) {
        if (child.tag in obj) {
          if (Array.isArray(obj[child.tag])) {
            obj[child.tag].push(child.value);
          } else {
            obj[child.tag] = [obj[child.tag], child.value];
          }
        } else {
          obj[child.tag] = child.value;
        }
      }
      for (const [k, v] of Object.entries(attrs)) {
        obj[k] = v;
      }
      Object.setPrototypeOf(obj, Object.prototype);
      return { tag, value: obj };
    }
    static ENTITIES = {
      amp: "&",
      lt: "<",
      gt: ">",
      quot: '"',
      apos: "'"
    };
    skipDoctype() {
      const p = this;
      p.i += 9;
      let depth = 0;
      while (p.i < p.z) {
        const c = p.x[p.i];
        if (c === "[") {
          ++depth;
        } else if (c === "]") {
          --depth;
        } else if (c === ">" && depth === 0) {
          ++p.i;
          return;
        }
        ++p.i;
      }
      throw new Error("@aws-sdk XML parse error: unclosed DOCTYPE.");
    }
    decodeEntities(s) {
      return s.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g, (_, hex, dec, named) => {
        if (hex) {
          return String.fromCharCode(parseInt(hex, 16));
        }
        if (dec) {
          return String.fromCharCode(parseInt(dec, 10));
        }
        return AwsXmlParser.ENTITIES[named] ?? "";
      });
    }
  }
});

// ../../node_modules/.pnpm/@aws-sdk+xml-builder@3.972.31/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js
var require_dist_cjs11 = __commonJS((exports) => {
  var { parseXML } = require_xml_parser();
  exports.parseXML = parseXML;
  var ATTR_ESCAPE_RE = /[&<>"]/g;
  var ATTR_ESCAPE_MAP = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;"
  };
  function escapeAttribute(value) {
    return value.replace(ATTR_ESCAPE_RE, (ch) => ATTR_ESCAPE_MAP[ch]);
  }
  var ELEMENT_ESCAPE_RE = /[&"'<>\r\n\u0085\u2028]/g;
  var ELEMENT_ESCAPE_MAP = {
    "&": "&amp;",
    '"': "&quot;",
    "'": "&apos;",
    "<": "&lt;",
    ">": "&gt;",
    "\r": "&#x0D;",
    "\n": "&#x0A;",
    "": "&#x85;",
    "\u2028": "&#x2028;"
  };
  function escapeElement(value) {
    return value.replace(ELEMENT_ESCAPE_RE, (ch) => ELEMENT_ESCAPE_MAP[ch]);
  }

  class XmlText {
    value;
    constructor(value) {
      this.value = value;
    }
    toString() {
      return escapeElement("" + this.value);
    }
  }

  class XmlNode {
    name;
    children;
    attributes = {};
    static of(name, childText, withName) {
      const node2 = new XmlNode(name);
      if (childText !== undefined) {
        node2.addChildNode(new XmlText(childText));
      }
      if (withName !== undefined) {
        node2.withName(withName);
      }
      return node2;
    }
    constructor(name, children = []) {
      this.name = name;
      this.children = children;
    }
    withName(name) {
      this.name = name;
      return this;
    }
    addAttribute(name, value) {
      this.attributes[name] = value;
      return this;
    }
    addChildNode(child) {
      this.children.push(child);
      return this;
    }
    removeAttribute(name) {
      delete this.attributes[name];
      return this;
    }
    n(name) {
      this.name = name;
      return this;
    }
    c(child) {
      this.children.push(child);
      return this;
    }
    a(name, value) {
      if (value != null) {
        this.attributes[name] = value;
      }
      return this;
    }
    cc(input, field, withName = field) {
      if (input[field] != null) {
        const node2 = XmlNode.of(field, input[field]).withName(withName);
        this.c(node2);
      }
    }
    l(input, listName, memberName, valueProvider) {
      if (input[listName] != null) {
        const nodes = valueProvider();
        nodes.map((node2) => {
          node2.withName(memberName);
          this.c(node2);
        });
      }
    }
    lc(input, listName, memberName, valueProvider) {
      if (input[listName] != null) {
        const nodes = valueProvider();
        const containerNode = new XmlNode(memberName);
        nodes.map((node2) => {
          containerNode.c(node2);
        });
        this.c(containerNode);
      }
    }
    toString() {
      const hasChildren = Boolean(this.children.length);
      let xmlText = `<${this.name}`;
      const attributes = this.attributes;
      for (const attributeName of Object.keys(attributes)) {
        const attribute = attributes[attributeName];
        if (attribute != null) {
          xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
        }
      }
      return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}</${this.name}>`;
    }
  }
  exports.XmlNode = XmlNode;
  exports.XmlText = XmlText;
});

// ../../node_modules/.pnpm/@aws-sdk+core@3.974.23/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js
var require_protocols2 = __commonJS((exports) => {
  var { SmithyRpcV2CborProtocol, loadSmithyRpcV2CborErrorCode } = require_cbor();
  var { TypeRegistry, NormalizedSchema, deref } = require_schema();
  var { decorateServiceException, getValueFromTextNode } = require_client3();
  var { collectBody, determineTimestampFormat, RpcProtocol, HttpBindingProtocol, HttpInterceptingShapeSerializer, HttpInterceptingShapeDeserializer, FromStringShapeDeserializer, extendedEncodeURIComponent } = require_protocols();
  var { NumericValue, toUtf8, fromBase64, LazyJsonString, parseEpochTimestamp, parseRfc7231DateTime, parseRfc3339DateTimeWithOffset, toBase64, dateToUtcString, generateIdempotencyToken, expectUnion } = require_serde();
  var { parseXML, XmlNode, XmlText } = require_dist_cjs11();

  class ProtocolLib {
    queryCompat;
    errorRegistry;
    constructor(queryCompat = false) {
      this.queryCompat = queryCompat;
    }
    resolveRestContentType(defaultContentType, inputSchema) {
      const members = inputSchema.getMemberSchemas();
      const httpPayloadMember = Object.values(members).find((m) => {
        return !!m.getMergedTraits().httpPayload;
      });
      if (httpPayloadMember) {
        const mediaType = httpPayloadMember.getMergedTraits().mediaType;
        if (mediaType) {
          return mediaType;
        } else if (httpPayloadMember.isStringSchema()) {
          return "text/plain";
        } else if (httpPayloadMember.isBlobSchema()) {
          return "application/octet-stream";
        } else {
          return defaultContentType;
        }
      } else if (!inputSchema.isUnitSchema()) {
        const hasBody = Object.values(members).find((m) => {
          const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
          const noPrefixHeaders = httpPrefixHeaders === undefined;
          return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
        });
        if (hasBody) {
          return defaultContentType;
        }
      }
    }
    async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
      let errorName = errorIdentifier;
      if (errorIdentifier.includes("#")) {
        [, errorName] = errorIdentifier.split("#");
      }
      const errorMetadata = {
        $metadata: metadata,
        $fault: response.statusCode < 500 ? "client" : "server"
      };
      if (!this.errorRegistry) {
        throw new Error("@aws-sdk/core/protocols - error handler not initialized.");
      }
      try {
        const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ?? this.errorRegistry.getSchema(errorIdentifier);
        return { errorSchema, errorMetadata };
      } catch (e) {
        dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
        const synthetic = this.errorRegistry;
        const baseExceptionSchema = synthetic.getBaseException();
        if (baseExceptionSchema) {
          const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
          throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);
        }
        const d = dataObject;
        const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message;
        throw this.decorateServiceException(Object.assign(new Error(message), {
          name: errorName
        }, errorMetadata), dataObject);
      }
    }
    compose(composite, errorIdentifier, defaultNamespace) {
      let namespace = defaultNamespace;
      if (errorIdentifier.includes("#")) {
        [namespace] = errorIdentifier.split("#");
      }
      const staticRegistry = TypeRegistry.for(namespace);
      const defaultSyntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace);
      composite.copyFrom(staticRegistry);
      composite.copyFrom(defaultSyntheticRegistry);
      this.errorRegistry = composite;
    }
    decorateServiceException(exception, additions = {}) {
      if (this.queryCompat) {
        const msg = exception.Message ?? additions.Message;
        const error2 = decorateServiceException(exception, additions);
        if (msg) {
          error2.message = msg;
        }
        const errorObj = error2.Error ?? {};
        errorObj.Type = error2.Error?.Type;
        errorObj.Code = error2.Error?.Code;
        errorObj.Message = error2.Error?.message ?? error2.Error?.Message ?? msg;
        error2.Error = errorObj;
        const reqId = error2.$metadata.requestId;
        if (reqId) {
          error2.RequestId = reqId;
        }
        return error2;
      }
      return decorateServiceException(exception, additions);
    }
    setQueryCompatError(output, response) {
      const queryErrorHeader = response.headers?.["x-amzn-query-error"];
      if (output !== undefined && queryErrorHeader != null) {
        const [Code, Type] = queryErrorHeader.split(";");
        const keys = Object.keys(output);
        const Error2 = {
          Code,
          Type
        };
        output.Code = Code;
        output.Type = Type;
        for (let i = 0;i < keys.length; i++) {
          const k = keys[i];
          Error2[k === "message" ? "Message" : k] = output[k];
        }
        delete Error2.__type;
        output.Error = Error2;
      }
    }
    queryCompatOutput(queryCompatErrorData, errorData) {
      if (queryCompatErrorData.Error) {
        errorData.Error = queryCompatErrorData.Error;
      }
      if (queryCompatErrorData.Type) {
        errorData.Type = queryCompatErrorData.Type;
      }
      if (queryCompatErrorData.Code) {
        errorData.Code = queryCompatErrorData.Code;
      }
    }
    findQueryCompatibleError(registry, errorName) {
      try {
        return registry.getSchema(errorName);
      } catch (e) {
        return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);
      }
    }
  }

  class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {
    awsQueryCompatible;
    mixin;
    constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible }) {
      super({ defaultNamespace, errorTypeRegistries });
      this.awsQueryCompatible = !!awsQueryCompatible;
      this.mixin = new ProtocolLib(this.awsQueryCompatible);
    }
    async serializeRequest(operationSchema, input, context10) {
      const request2 = await super.serializeRequest(operationSchema, input, context10);
      if (this.awsQueryCompatible) {
        request2.headers["x-amzn-query-mode"] = "true";
      }
      return request2;
    }
    async handleError(operationSchema, context10, response, dataObject, metadata) {
      if (this.awsQueryCompatible) {
        this.mixin.setQueryCompatError(dataObject, response);
      }
      const errorName = (() => {
        const compatHeader = response.headers["x-amzn-query-error"];
        if (compatHeader && this.awsQueryCompatible) {
          return compatHeader.split(";")[0];
        }
        return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
      })();
      this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);
      const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
      const ns = NormalizedSchema.of(errorSchema);
      const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
      const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
      const exception = new ErrorCtor({});
      const output = {};
      for (const [name, member2] of ns.structIterator()) {
        if (dataObject[name] != null) {
          output[name] = this.deserializer.readValue(member2, dataObject[name]);
        }
      }
      if (this.awsQueryCompatible) {
        this.mixin.queryCompatOutput(dataObject, output);
      }
      throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
        $fault: ns.getMergedTraits().error,
        message
      }, output), dataObject);
    }
  }
  var _toStr = (val) => {
    if (val == null) {
      return val;
    }
    if (typeof val === "number" || typeof val === "bigint") {
      const warning = new Error(`Received number ${val} where a string was expected.`);
      warning.name = "Warning";
      console.warn(warning);
      return String(val);
    }
    if (typeof val === "boolean") {
      const warning = new Error(`Received boolean ${val} where a string was expected.`);
      warning.name = "Warning";
      console.warn(warning);
      return String(val);
    }
    return val;
  };
  var _toBool = (val) => {
    if (val == null) {
      return val;
    }
    if (typeof val === "string") {
      const lowercase = val.toLowerCase();
      if (val !== "" && lowercase !== "false" && lowercase !== "true") {
        const warning = new Error(`Received string "${val}" where a boolean was expected.`);
        warning.name = "Warning";
        console.warn(warning);
      }
      return val !== "" && lowercase !== "false";
    }
    return val;
  };
  var _toNum = (val) => {
    if (val == null) {
      return val;
    }
    if (typeof val === "string") {
      const num = Number(val);
      if (num.toString() !== val) {
        const warning = new Error(`Received string "${val}" where a number was expected.`);
        warning.name = "Warning";
        console.warn(warning);
        return val;
      }
      return num;
    }
    return val;
  };

  class SerdeContextConfig {
    serdeContext;
    setSerdeContext(serdeContext) {
      this.serdeContext = serdeContext;
    }
  }

  class UnionSerde {
    from;
    to;
    keys;
    constructor(from, to) {
      this.from = from;
      this.to = to;
      const keys = Object.keys(this.from);
      const set = new Set(keys);
      set.delete("__type");
      this.keys = set;
    }
    mark(key) {
      this.keys.delete(key);
    }
    hasUnknown() {
      return this.keys.size === 1 && Object.keys(this.to).length === 0;
    }
    writeUnknown() {
      if (this.hasUnknown()) {
        const k = this.keys.values().next().value;
        const v = this.from[k];
        this.to.$unknown = [k, v];
      }
    }
  }
  function jsonReviver(key, value, context10) {
    if (context10?.source) {
      const numericString = context10.source;
      if (typeof value === "number") {
        if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
          const isFractional = numericString.includes(".");
          if (isFractional) {
            return new NumericValue(numericString, "bigDecimal");
          } else {
            return BigInt(numericString);
          }
        }
      }
    }
    return value;
  }
  var collectBodyString = (streamBody, context10) => collectBody(streamBody, context10).then((body) => (context10?.utf8Encoder ?? toUtf8)(body));
  var parseJsonBody = (streamBody, context10) => collectBodyString(streamBody, context10).then((encoded) => {
    if (encoded.length) {
      try {
        return JSON.parse(encoded);
      } catch (e) {
        if (e?.name === "SyntaxError") {
          Object.defineProperty(e, "$responseBodyText", {
            value: encoded
          });
        }
        throw e;
      }
    }
    return {};
  });
  var parseJsonErrorBody = async (errorBody, context10) => {
    const value = await parseJsonBody(errorBody, context10);
    value.message = value.message ?? value.Message;
    return value;
  };
  var findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
  var sanitizeErrorCode = (rawValue) => {
    let cleanValue = rawValue;
    if (typeof cleanValue === "number") {
      cleanValue = cleanValue.toString();
    }
    if (cleanValue.indexOf(",") >= 0) {
      cleanValue = cleanValue.split(",")[0];
    }
    if (cleanValue.indexOf(":") >= 0) {
      cleanValue = cleanValue.split(":")[0];
    }
    if (cleanValue.indexOf("#") >= 0) {
      cleanValue = cleanValue.split("#")[1];
    }
    return cleanValue;
  };
  var loadRestJsonErrorCode = (output, data) => {
    return loadErrorCode(output, data, ["header", "code", "type"]);
  };
  var loadJsonRpcErrorCode = (output, data, queryCompat = false) => {
    return loadErrorCode(output, data, queryCompat ? ["code", "header", "type"] : ["type", "code", "header"]);
  };
  var loadErrorCode = ({ headers }, data, order) => {
    while (order.length > 0) {
      const location = order.shift();
      switch (location) {
        case "header":
          const headerKey = findKey(headers ?? {}, "x-amzn-errortype");
          if (headerKey !== undefined) {
            return sanitizeErrorCode(headers[headerKey]);
          }
          break;
        case "code":
          const codeKey = findKey(data ?? {}, "code");
          if (codeKey && data[codeKey] !== undefined) {
            return sanitizeErrorCode(data[codeKey]);
          }
          break;
        case "type":
          if (data?.__type !== undefined) {
            return sanitizeErrorCode(data.__type);
          }
          break;
      }
    }
  };

  class JsonShapeDeserializer extends SerdeContextConfig {
    settings;
    constructor(settings) {
      super();
      this.settings = settings;
    }
    async read(schema, data) {
      return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));
    }
    readObject(schema, data) {
      return this._read(schema, data);
    }
    _read(schema, value) {
      const isObject = value !== null && typeof value === "object";
      const ns = NormalizedSchema.of(schema);
      if (isObject) {
        if (ns.isStructSchema()) {
          const record = value;
          const union2 = ns.isUnionSchema();
          const out = {};
          let nameMap = undefined;
          const { jsonName } = this.settings;
          if (jsonName) {
            nameMap = {};
          }
          let unionSerde;
          if (union2) {
            unionSerde = new UnionSerde(record, out);
          }
          for (const [memberName, memberSchema] of ns.structIterator()) {
            let fromKey = memberName;
            if (jsonName) {
              fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
              nameMap[fromKey] = memberName;
            }
            if (union2) {
              unionSerde.mark(fromKey);
            }
            if (record[fromKey] != null) {
              out[memberName] = this._read(memberSchema, record[fromKey]);
            }
          }
          if (union2) {
            unionSerde.writeUnknown();
          } else if (typeof record.__type === "string") {
            for (const k in record) {
              const v = record[k];
              const t = jsonName ? nameMap[k] ?? k : k;
              if (!(t in out)) {
                out[t] = v;
              }
            }
          }
          return out;
        }
        if (Array.isArray(value) && ns.isListSchema()) {
          const listMember = ns.getValueSchema();
          const out = [];
          for (const item of value) {
            out.push(this._read(listMember, item));
          }
          return out;
        }
        if (ns.isMapSchema()) {
          const mapMember = ns.getValueSchema();
          const out = {};
          for (const _k in value) {
            out[_k] = this._read(mapMember, value[_k]);
          }
          return out;
        }
      }
      if (ns.isBlobSchema() && typeof value === "string") {
        return fromBase64(value);
      }
      const mediaType = ns.getMergedTraits().mediaType;
      if (ns.isStringSchema() && typeof value === "string" && mediaType) {
        const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
        if (isJson) {
          return LazyJsonString.from(value);
        }
        return value;
      }
      if (ns.isTimestampSchema() && value != null) {
        const format = determineTimestampFormat(ns, this.settings);
        switch (format) {
          case 5:
            return parseRfc3339DateTimeWithOffset(value);
          case 6:
            return parseRfc7231DateTime(value);
          case 7:
            return parseEpochTimestamp(value);
          default:
            console.warn("Missing timestamp format, parsing value with Date constructor:", value);
            return new Date(value);
        }
      }
      if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
        return BigInt(value);
      }
      if (ns.isBigDecimalSchema() && value != null) {
        if (value instanceof NumericValue) {
          return value;
        }
        const untyped = value;
        if (untyped.type === "bigDecimal" && "string" in untyped) {
          return new NumericValue(untyped.string, untyped.type);
        }
        return new NumericValue(String(value), "bigDecimal");
      }
      if (ns.isNumericSchema() && typeof value === "string") {
        switch (value) {
          case "Infinity":
            return Infinity;
          case "-Infinity":
            return -Infinity;
          case "NaN":
            return NaN;
        }
        return value;
      }
      if (ns.isDocumentSchema()) {
        if (isObject) {
          const out = Array.isArray(value) ? [] : {};
          for (const k in value) {
            const v = value[k];
            if (v instanceof NumericValue) {
              out[k] = v;
            } else {
              out[k] = this._read(ns, v);
            }
          }
          return out;
        } else {
          return structuredClone(value);
        }
      }
      return value;
    }
  }
  var NUMERIC_CONTROL_CHAR = String.fromCharCode(925);

  class JsonReplacer {
    values = new Map;
    counter = 0;
    stage = 0;
    createReplacer() {
      if (this.stage === 1) {
        throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");
      }
      if (this.stage === 2) {
        throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
      }
      this.stage = 1;
      return (key, value) => {
        if (value instanceof NumericValue) {
          const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
          this.values.set(`"${v}"`, value.string);
          return v;
        }
        if (typeof value === "bigint") {
          const s = value.toString();
          const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s;
          this.values.set(`"${v}"`, s);
          return v;
        }
        return value;
      };
    }
    replaceInJson(json2) {
      if (this.stage === 0) {
        throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");
      }
      if (this.stage === 2) {
        throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
      }
      this.stage = 2;
      if (this.counter === 0) {
        return json2;
      }
      for (const [key, value] of this.values) {
        json2 = json2.replace(key, value);
      }
      return json2;
    }
  }

  class JsonShapeSerializer extends SerdeContextConfig {
    settings;
    buffer;
    useReplacer = false;
    rootSchema;
    constructor(settings) {
      super();
      this.settings = settings;
    }
    write(schema, value) {
      this.rootSchema = NormalizedSchema.of(schema);
      this.buffer = this._write(this.rootSchema, value);
    }
    flush() {
      const { rootSchema, useReplacer } = this;
      this.rootSchema = undefined;
      this.useReplacer = false;
      if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {
        if (!useReplacer) {
          return JSON.stringify(this.buffer);
        }
        const replacer = new JsonReplacer;
        return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
      }
      return this.buffer;
    }
    writeDiscriminatedDocument(schema, value) {
      this.write(schema, value);
      if (typeof this.buffer === "object") {
        this.buffer.__type = NormalizedSchema.of(schema).getName(true);
      }
    }
    _write(schema, value, container) {
      const isObject = value !== null && typeof value === "object";
      const ns = NormalizedSchema.of(schema);
      if (isObject) {
        if (ns.isStructSchema()) {
          const record = value;
          const out = {};
          const { jsonName } = this.settings;
          let nameMap = undefined;
          if (jsonName) {
            nameMap = {};
          }
          let outCount = 0;
          for (const [memberName, memberSchema] of ns.structIterator()) {
            const serializableValue = this._write(memberSchema, record[memberName], ns);
            if (serializableValue !== undefined) {
              let targetKey = memberName;
              if (jsonName) {
                targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;
                nameMap[memberName] = targetKey;
              }
              out[targetKey] = serializableValue;
              outCount++;
            }
          }
          if (ns.isUnionSchema() && outCount === 0) {
            const { $unknown } = record;
            if (Array.isArray($unknown)) {
              const [k, v] = $unknown;
              out[k] = this._write(15, v);
            }
          } else if (typeof record.__type === "string") {
            for (const k in record) {
              const v = record[k];
              const targetKey = jsonName ? nameMap[k] ?? k : k;
              if (!(targetKey in out)) {
                out[targetKey] = this._write(15, v);
              }
            }
          }
          return out;
        }
        if (Array.isArray(value) && ns.isListSchema()) {
          const listMember = ns.getValueSchema();
          const out = [];
          const sparse = !!ns.getMergedTraits().sparse;
          for (const item of value) {
            if (sparse || item != null) {
              out.push(this._write(listMember, item));
            }
          }
          return out;
        }
        if (ns.isMapSchema()) {
          const mapMember = ns.getValueSchema();
          const out = {};
          const sparse = !!ns.getMergedTraits().sparse;
          for (const _k in value) {
            const _v = value[_k];
            if (sparse || _v != null) {
              out[_k] = this._write(mapMember, _v);
            }
          }
          return out;
        }
        if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
          if (ns === this.rootSchema) {
            return value;
          }
          return (this.serdeContext?.base64Encoder ?? toBase64)(value);
        }
        if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
          const format = determineTimestampFormat(ns, this.settings);
          switch (format) {
            case 5:
              return value.toISOString().replace(".000Z", "Z");
            case 6:
              return dateToUtcString(value);
            case 7:
              return value.getTime() / 1000;
            default:
              console.warn("Missing timestamp format, using epoch seconds", value);
              return value.getTime() / 1000;
          }
        }
        if (value instanceof NumericValue) {
          this.useReplacer = true;
        }
      }
      if (value === null && container?.isStructSchema()) {
        return;
      }
      if (ns.isStringSchema()) {
        if (typeof value === "undefined" && ns.isIdempotencyToken()) {
          return generateIdempotencyToken();
        }
        const mediaType = ns.getMergedTraits().mediaType;
        if (value != null && mediaType) {
          const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
          if (isJson) {
            return LazyJsonString.from(value);
          }
        }
        return value;
      }
      if (typeof value === "number" && ns.isNumericSchema()) {
        if (Math.abs(value) === Infinity || isNaN(value)) {
          return String(value);
        }
        return value;
      }
      if (typeof value === "string" && ns.isBlobSchema()) {
        if (ns === this.rootSchema) {
          return value;
        }
        return (this.serdeContext?.base64Encoder ?? toBase64)(value);
      }
      if (typeof value === "bigint") {
        this.useReplacer = true;
      }
      if (ns.isDocumentSchema()) {
        if (isObject) {
          const out = Array.isArray(value) ? [] : {};
          for (const k in value) {
            const v = value[k];
            if (v instanceof NumericValue) {
              this.useReplacer = true;
              out[k] = v;
            } else {
              out[k] = this._write(ns, v);
            }
          }
          return out;
        } else {
          return structuredClone(value);
        }
      }
      return value;
    }
  }

  class JsonCodec extends SerdeContextConfig {
    settings;
    constructor(settings) {
      super();
      this.settings = settings;
    }
    createSerializer() {
      const serializer = new JsonShapeSerializer(this.settings);
      serializer.setSerdeContext(this.serdeContext);
      return serializer;
    }
    createDeserializer() {
      const deserializer = new JsonShapeDeserializer(this.settings);
      deserializer.setSerdeContext(this.serdeContext);
      return deserializer;
    }
  }

  class AwsJsonRpcProtocol extends RpcProtocol {
    serializer;
    deserializer;
    serviceTarget;
    codec;
    mixin;
    awsQueryCompatible;
    constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec }) {
      super({
        defaultNamespace,
        errorTypeRegistries
      });
      this.serviceTarget = serviceTarget;
      this.codec = jsonCodec ?? new JsonCodec({
        timestampFormat: {
          useTrait: true,
          default: 7
        },
        jsonName: false
      });
      this.serializer = this.codec.createSerializer();
      this.deserializer = this.codec.createDeserializer();
      this.awsQueryCompatible = !!awsQueryCompatible;
      this.mixin = new ProtocolLib(this.awsQueryCompatible);
    }
    async serializeRequest(operationSchema, input, context10) {
      const request2 = await super.serializeRequest(operationSchema, input, context10);
      if (!request2.path.endsWith("/")) {
        request2.path += "/";
      }
      request2.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
      request2.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
      if (this.awsQueryCompatible) {
        request2.headers["x-amzn-query-mode"] = "true";
      }
      if (deref(operationSchema.input) === "unit" || !request2.body) {
        request2.body = "{}";
      }
      return request2;
    }
    getPayloadCodec() {
      return this.codec;
    }
    async handleError(operationSchema, context10, response, dataObject, metadata) {
      const { awsQueryCompatible } = this;
      if (awsQueryCompatible) {
        this.mixin.setQueryCompatError(dataObject, response);
      }
      const errorIdentifier = loadJsonRpcErrorCode(response, dataObject, awsQueryCompatible) ?? "Unknown";
      this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
      const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
      const ns = NormalizedSchema.of(errorSchema);
      const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
      const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
      const exception = new ErrorCtor({});
      const output = {};
      const errorDeserializer = this.codec.createDeserializer();
      for (const [name, member2] of ns.structIterator()) {
        if (dataObject[name] != null) {
          output[name] = errorDeserializer.readObject(member2, dataObject[name]);
        }
      }
      if (awsQueryCompatible) {
        this.mixin.queryCompatOutput(dataObject, output);
      }
      throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
        $fault: ns.getMergedTraits().error,
        message
      }, output), dataObject);
    }
  }

  class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
    constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec }) {
      super({
        defaultNamespace,
        errorTypeRegistries,
        serviceTarget,
        awsQueryCompatible,
        jsonCodec
      });
    }
    getShapeId() {
      return "aws.protocols#awsJson1_0";
    }
    getJsonRpcVersion() {
      return "1.0";
    }
    getDefaultContentType() {
      return "application/x-amz-json-1.0";
    }
  }

  class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
    constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec }) {
      super({
        defaultNamespace,
        errorTypeRegistries,
        serviceTarget,
        awsQueryCompatible,
        jsonCodec
      });
    }
    getShapeId() {
      return "aws.protocols#awsJson1_1";
    }
    getJsonRpcVersion() {
      return "1.1";
    }
    getDefaultContentType() {
      return "application/x-amz-json-1.1";
    }
  }

  class AwsRestJsonProtocol extends HttpBindingProtocol {
    serializer;
    deserializer;
    codec;
    mixin = new ProtocolLib;
    constructor({ defaultNamespace, errorTypeRegistries }) {
      super({
        defaultNamespace,
        errorTypeRegistries
      });
      const settings = {
        timestampFormat: {
          useTrait: true,
          default: 7
        },
        httpBindings: true,
        jsonName: true
      };
      this.codec = new JsonCodec(settings);
      this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
      this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
    }
    getShapeId() {
      return "aws.protocols#restJson1";
    }
    getPayloadCodec() {
      return this.codec;
    }
    setSerdeContext(serdeContext) {
      this.codec.setSerdeContext(serdeContext);
      super.setSerdeContext(serdeContext);
    }
    async serializeRequest(operationSchema, input, context10) {
      const request2 = await super.serializeRequest(operationSchema, input, context10);
      const inputSchema = NormalizedSchema.of(operationSchema.input);
      if (!request2.headers["content-type"]) {
        const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
        if (contentType) {
          request2.headers["content-type"] = contentType;
        }
      }
      if (request2.body == null && request2.headers["content-type"] === this.getDefaultContentType()) {
        request2.body = "{}";
      }
      return request2;
    }
    async deserializeResponse(operationSchema, context10, response) {
      const output = await super.deserializeResponse(operationSchema, context10, response);
      const outputSchema = NormalizedSchema.of(operationSchema.output);
      for (const [name, member2] of outputSchema.structIterator()) {
        if (member2.getMemberTraits().httpPayload && !(name in output)) {
          output[name] = null;
        }
      }
      return output;
    }
    async handleError(operationSchema, context10, response, dataObject, metadata) {
      const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
      this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
      const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
      const ns = NormalizedSchema.of(errorSchema);
      const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
      const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
      const exception = new ErrorCtor({});
      await this.deserializeHttpMessage(errorSchema, context10, response, dataObject);
      const output = {};
      const errorDeserializer = this.codec.createDeserializer();
      for (const [name, member2] of ns.structIterator()) {
        const target = member2.getMergedTraits().jsonName ?? name;
        output[name] = errorDeserializer.readObject(member2, dataObject[target]);
      }
      throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
        $fault: ns.getMergedTraits().error,
        message
      }, output), dataObject);
    }
    getDefaultContentType() {
      return "application/json";
    }
  }
  var awsExpectUnion = (value) => {
    if (value == null) {
      return;
    }
    if (typeof value === "object" && "__type" in value) {
      delete value.__type;
    }
    return expectUnion(value);
  };

  class XmlShapeDeserializer extends SerdeContextConfig {
    settings;
    stringDeserializer;
    constructor(settings) {
      super();
      this.settings = settings;
      this.stringDeserializer = new FromStringShapeDeserializer(settings);
    }
    setSerdeContext(serdeContext) {
      this.serdeContext = serdeContext;
      this.stringDeserializer.setSerdeContext(serdeContext);
    }
    read(schema, bytes, key) {
      const ns = NormalizedSchema.of(schema);
      const memberSchemas = ns.getMemberSchemas();
      const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => {
        return !!memberNs.getMemberTraits().eventPayload;
      });
      if (isEventPayload) {
        const output = {};
        const memberName = Object.keys(memberSchemas)[0];
        const eventMemberSchema = memberSchemas[memberName];
        if (eventMemberSchema.isBlobSchema()) {
          output[memberName] = bytes;
        } else {
          output[memberName] = this.read(memberSchemas[memberName], bytes);
        }
        return output;
      }
      const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);
      const parsedObject = this.parseXml(xmlString);
      return this.readSchema(schema, key ? parsedObject[key] : parsedObject);
    }
    readSchema(_schema, value) {
      const ns = NormalizedSchema.of(_schema);
      if (ns.isUnitSchema()) {
        return;
      }
      const traits = ns.getMergedTraits();
      if (ns.isListSchema() && !Array.isArray(value)) {
        return this.readSchema(ns, [value]);
      }
      if (value == null) {
        return value;
      }
      if (typeof value === "object") {
        const flat = !!traits.xmlFlattened;
        if (ns.isListSchema()) {
          const listValue = ns.getValueSchema();
          const buffer2 = [];
          const sourceKey = listValue.getMergedTraits().xmlName ?? "member";
          const source = flat ? value : (value[0] ?? value)[sourceKey];
          if (source == null) {
            return buffer2;
          }
          const sourceArray = Array.isArray(source) ? source : [source];
          for (const v of sourceArray) {
            buffer2.push(this.readSchema(listValue, v));
          }
          return buffer2;
        }
        const buffer = {};
        if (ns.isMapSchema()) {
          const keyNs = ns.getKeySchema();
          const memberNs = ns.getValueSchema();
          let entries;
          if (flat) {
            entries = Array.isArray(value) ? value : [value];
          } else {
            entries = Array.isArray(value.entry) ? value.entry : [value.entry];
          }
          const keyProperty = keyNs.getMergedTraits().xmlName ?? "key";
          const valueProperty = memberNs.getMergedTraits().xmlName ?? "value";
          for (const entry of entries) {
            const key = entry[keyProperty];
            const value2 = entry[valueProperty];
            buffer[key] = this.readSchema(memberNs, value2);
          }
          return buffer;
        }
        if (ns.isStructSchema()) {
          const union2 = ns.isUnionSchema();
          let unionSerde;
          if (union2) {
            unionSerde = new UnionSerde(value, buffer);
          }
          for (const [memberName, memberSchema] of ns.structIterator()) {
            const memberTraits = memberSchema.getMergedTraits();
            const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName();
            if (union2) {
              unionSerde.mark(xmlObjectKey);
            }
            if (value[xmlObjectKey] != null) {
              buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);
            }
          }
          if (union2) {
            unionSerde.writeUnknown();
          }
          return buffer;
        }
        if (ns.isDocumentSchema()) {
          return value;
        }
        throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);
      }
      if (ns.isListSchema()) {
        return [];
      }
      if (ns.isMapSchema() || ns.isStructSchema()) {
        return {};
      }
      return this.stringDeserializer.read(ns, value);
    }
    parseXml(xml) {
      if (xml.length) {
        let parsedObj;
        try {
          parsedObj = parseXML(xml);
        } catch (e) {
          if (e && typeof e === "object") {
            Object.defineProperty(e, "$responseBodyText", {
              value: xml
            });
          }
          throw e;
        }
        const textNodeName = "#text";
        const key = Object.keys(parsedObj)[0];
        const parsedObjToReturn = parsedObj[key];
        if (parsedObjToReturn[textNodeName]) {
          parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
          delete parsedObjToReturn[textNodeName];
        }
        return getValueFromTextNode(parsedObjToReturn);
      }
      return {};
    }
  }

  class QueryShapeSerializer extends SerdeContextConfig {
    settings;
    buffer;
    constructor(settings) {
      super();
      this.settings = settings;
    }
    write(schema, value, prefix = "") {
      if (this.buffer === undefined) {
        this.buffer = "";
      }
      const ns = NormalizedSchema.of(schema);
      if (prefix && !prefix.endsWith(".")) {
        prefix += ".";
      }
      if (ns.isBlobSchema()) {
        if (typeof value === "string" || value instanceof Uint8Array) {
          this.writeKey(prefix);
          this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));
        }
      } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
        if (value != null) {
          this.writeKey(prefix);
          this.writeValue(String(value));
        } else if (ns.isIdempotencyToken()) {
          this.writeKey(prefix);
          this.writeValue(generateIdempotencyToken());
        }
      } else if (ns.isBigIntegerSchema()) {
        if (value != null) {
          this.writeKey(prefix);
          this.writeValue(String(value));
        }
      } else if (ns.isBigDecimalSchema()) {
        if (value != null) {
          this.writeKey(prefix);
          this.writeValue(value instanceof NumericValue ? value.string : String(value));
        }
      } else if (ns.isTimestampSchema()) {
        if (value instanceof Date) {
          this.writeKey(prefix);
          const format = determineTimestampFormat(ns, this.settings);
          switch (format) {
            case 5:
              this.writeValue(value.toISOString().replace(".000Z", "Z"));
              break;
            case 6:
              this.writeValue(dateToUtcString(value));
              break;
            case 7:
              this.writeValue(String(value.getTime() / 1000));
              break;
          }
        }
      } else if (ns.isDocumentSchema()) {
        if (Array.isArray(value)) {
          this.write(64 | 15, value, prefix);
        } else if (value instanceof Date) {
          this.write(4, value, prefix);
        } else if (value instanceof Uint8Array) {
          this.write(21, value, prefix);
        } else if (value && typeof value === "object") {
          this.write(128 | 15, value, prefix);
        } else {
          this.writeKey(prefix);
          this.writeValue(String(value));
        }
      } else if (ns.isListSchema()) {
        if (Array.isArray(value)) {
          if (value.length === 0) {
            if (this.settings.serializeEmptyLists) {
              this.writeKey(prefix);
              this.writeValue("");
            }
          } else {
            const member2 = ns.getValueSchema();
            const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;
            let i = 1;
            for (const item of value) {
              if (item == null) {
                continue;
              }
              const traits = member2.getMergedTraits();
              const suffix = this.getKey("member", traits.xmlName, traits.ec2QueryName);
              const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;
              this.write(member2, item, key);
              ++i;
            }
          }
        }
      } else if (ns.isMapSchema()) {
        if (value && typeof value === "object") {
          const keySchema = ns.getKeySchema();
          const memberSchema = ns.getValueSchema();
          const flat = ns.getMergedTraits().xmlFlattened;
          let i = 1;
          for (const k in value) {
            const v = value[k];
            if (v == null) {
              continue;
            }
            const keyTraits = keySchema.getMergedTraits();
            const keySuffix = this.getKey("key", keyTraits.xmlName, keyTraits.ec2QueryName);
            const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;
            const valTraits = memberSchema.getMergedTraits();
            const valueSuffix = this.getKey("value", valTraits.xmlName, valTraits.ec2QueryName);
            const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;
            this.write(keySchema, k, key);
            this.write(memberSchema, v, valueKey);
            ++i;
          }
        }
      } else if (ns.isStructSchema()) {
        if (value && typeof value === "object") {
          let didWriteMember = false;
          for (const [memberName, member2] of ns.structIterator()) {
            if (value[memberName] == null && !member2.isIdempotencyToken()) {
              continue;
            }
            const traits = member2.getMergedTraits();
            const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, "struct");
            const key = `${prefix}${suffix}`;
            this.write(member2, value[memberName], key);
            didWriteMember = true;
          }
          if (!didWriteMember && ns.isUnionSchema()) {
            const { $unknown } = value;
            if (Array.isArray($unknown)) {
              const [k, v] = $unknown;
              const key = `${prefix}${k}`;
              this.write(15, v, key);
            }
          }
        }
      } else if (ns.isUnitSchema())
        ;
      else {
        throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);
      }
    }
    flush() {
      if (this.buffer === undefined) {
        throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");
      }
      const str = this.buffer;
      delete this.buffer;
      return str;
    }
    getKey(memberName, xmlName, ec2QueryName, keySource) {
      const { ec2, capitalizeKeys } = this.settings;
      if (ec2 && ec2QueryName) {
        return ec2QueryName;
      }
      const key = xmlName ?? memberName;
      if (capitalizeKeys && keySource === "struct") {
        return key[0].toUpperCase() + key.slice(1);
      }
      return key;
    }
    writeKey(key) {
      if (key.endsWith(".")) {
        key = key.slice(0, key.length - 1);
      }
      this.buffer += `&${extendedEncodeURIComponent(key)}=`;
    }
    writeValue(value) {
      this.buffer += extendedEncodeURIComponent(value);
    }
  }

  class AwsQueryProtocol extends RpcProtocol {
    options;
    serializer;
    deserializer;
    mixin = new ProtocolLib;
    constructor(options) {
      super({
        defaultNamespace: options.defaultNamespace,
        errorTypeRegistries: options.errorTypeRegistries
      });
      this.options = options;
      const settings = {
        timestampFormat: {
          useTrait: true,
          default: 5
        },
        httpBindings: false,
        xmlNamespace: options.xmlNamespace,
        serviceNamespace: options.defaultNamespace,
        serializeEmptyLists: true
      };
      this.serializer = new QueryShapeSerializer(settings);
      this.deserializer = new XmlShapeDeserializer(settings);
    }
    getShapeId() {
      return "aws.protocols#awsQuery";
    }
    setSerdeContext(serdeContext) {
      this.serializer.setSerdeContext(serdeContext);
      this.deserializer.setSerdeContext(serdeContext);
    }
    getPayloadCodec() {
      throw new Error("AWSQuery protocol has no payload codec.");
    }
    async serializeRequest(operationSchema, input, context10) {
      const request2 = await super.serializeRequest(operationSchema, input, context10);
      if (!request2.path.endsWith("/")) {
        request2.path += "/";
      }
      request2.headers["content-type"] = "application/x-www-form-urlencoded";
      if (deref(operationSchema.input) === "unit" || !request2.body) {
        request2.body = "";
      }
      const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
      request2.body = `Action=${action}&Version=${this.options.version}` + request2.body;
      if (request2.body.endsWith("&")) {
        request2.body = request2.body.slice(-1);
      }
      return request2;
    }
    async deserializeResponse(operationSchema, context10, response) {
      const deserializer = this.deserializer;
      const ns = NormalizedSchema.of(operationSchema.output);
      const dataObject = {};
      if (response.statusCode >= 300) {
        const bytes2 = await collectBody(response.body, context10);
        if (bytes2.byteLength > 0) {
          Object.assign(dataObject, await deserializer.read(15, bytes2));
        }
        await this.handleError(operationSchema, context10, response, dataObject, this.deserializeMetadata(response));
      }
      for (const header in response.headers) {
        const value = response.headers[header];
        delete response.headers[header];
        response.headers[header.toLowerCase()] = value;
      }
      const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
      const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : undefined;
      const bytes = await collectBody(response.body, context10);
      if (bytes.byteLength > 0) {
        Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
      }
      dataObject.$metadata = this.deserializeMetadata(response);
      return dataObject;
    }
    useNestedResult() {
      return true;
    }
    async handleError(operationSchema, context10, response, dataObject, metadata) {
      const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
      this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
      const errorData = this.loadQueryError(dataObject) ?? {};
      const message = this.loadQueryErrorMessage(dataObject);
      errorData.message = message;
      errorData.Error = {
        Type: errorData.Type,
        Code: errorData.Code,
        Message: message
      };
      const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);
      const ns = NormalizedSchema.of(errorSchema);
      const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
      const exception = new ErrorCtor({});
      const output = {
        Type: errorData.Error.Type,
        Code: errorData.Error.Code,
        Error: errorData.Error
      };
      for (const [name, member2] of ns.structIterator()) {
        const target = member2.getMergedTraits().xmlName ?? name;
        const value = errorData[target] ?? dataObject[target];
        output[name] = this.deserializer.readSchema(member2, value);
      }
      throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
        $fault: ns.getMergedTraits().error,
        message
      }, output), dataObject);
    }
    loadQueryErrorCode(output, data) {
      const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;
      if (code !== undefined) {
        return code;
      }
      if (output.statusCode == 404) {
        return "NotFound";
      }
    }
    loadQueryError(data) {
      return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;
    }
    loadQueryErrorMessage(data) {
      const errorData = this.loadQueryError(data);
      return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
    }
    getDefaultContentType() {
      return "application/x-www-form-urlencoded";
    }
  }

  class AwsEc2QueryProtocol extends AwsQueryProtocol {
    options;
    constructor(options) {
      super(options);
      this.options = options;
      const ec2Settings = {
        capitalizeKeys: true,
        flattenLists: true,
        serializeEmptyLists: false,
        ec2: true
      };
      Object.assign(this.serializer.settings, ec2Settings);
    }
    getShapeId() {
      return "aws.protocols#ec2Query";
    }
    useNestedResult() {
      return false;
    }
  }
  var parseXmlBody = (streamBody, context10) => collectBodyString(streamBody, context10).then((encoded) => {
    if (encoded.length) {
      let parsedObj;
      try {
        parsedObj = parseXML(encoded);
      } catch (e) {
        if (e && typeof e === "object") {
          Object.defineProperty(e, "$responseBodyText", {
            value: encoded
          });
        }
        throw e;
      }
      const textNodeName = "#text";
      const key = Object.keys(parsedObj)[0];
      const parsedObjToReturn = parsedObj[key];
      if (parsedObjToReturn[textNodeName]) {
        parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
        delete parsedObjToReturn[textNodeName];
      }
      return getValueFromTextNode(parsedObjToReturn);
    }
    return {};
  });
  var parseXmlErrorBody = async (errorBody, context10) => {
    const value = await parseXmlBody(errorBody, context10);
    if (value.Error) {
      value.Error.message = value.Error.message ?? value.Error.Message;
    }
    return value;
  };
  var loadRestXmlErrorCode = (output, data) => {
    if (data?.Error?.Code !== undefined) {
      return data.Error.Code;
    }
    if (data?.Code !== undefined) {
      return data.Code;
    }
    if (output.statusCode == 404) {
      return "NotFound";
    }
  };

  class XmlShapeSerializer extends SerdeContextConfig {
    settings;
    stringBuffer;
    byteBuffer;
    buffer;
    constructor(settings) {
      super();
      this.settings = settings;
    }
    write(schema, value) {
      const ns = NormalizedSchema.of(schema);
      if (ns.isStringSchema() && typeof value === "string") {
        this.stringBuffer = value;
      } else if (ns.isBlobSchema()) {
        this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? fromBase64)(value);
      } else {
        this.buffer = this.writeStruct(ns, value, undefined);
        const traits = ns.getMergedTraits();
        if (traits.httpPayload && !traits.xmlName) {
          this.buffer.withName(ns.getName());
        }
      }
    }
    flush() {
      if (this.byteBuffer !== undefined) {
        const bytes = this.byteBuffer;
        delete this.byteBuffer;
        return bytes;
      }
      if (this.stringBuffer !== undefined) {
        const str = this.stringBuffer;
        delete this.stringBuffer;
        return str;
      }
      const buffer = this.buffer;
      if (this.settings.xmlNamespace) {
        if (!buffer?.attributes?.["xmlns"]) {
          buffer.addAttribute("xmlns", this.settings.xmlNamespace);
        }
      }
      delete this.buffer;
      return buffer.toString();
    }
    writeStruct(ns, value, parentXmlns) {
      const traits = ns.getMergedTraits();
      const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName();
      if (!name || !ns.isStructSchema()) {
        throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`);
      }
      const structXmlNode = XmlNode.of(name);
      const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
      for (const [memberName, memberSchema] of ns.structIterator()) {
        const val = value[memberName];
        if (val != null || memberSchema.isIdempotencyToken()) {
          if (memberSchema.getMergedTraits().xmlAttribute) {
            structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));
            continue;
          }
          if (memberSchema.isListSchema()) {
            this.writeList(memberSchema, val, structXmlNode, xmlns);
          } else if (memberSchema.isMapSchema()) {
            this.writeMap(memberSchema, val, structXmlNode, xmlns);
          } else if (memberSchema.isStructSchema()) {
            structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));
          } else {
            const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());
            this.writeSimpleInto(memberSchema, val, memberNode, xmlns);
            structXmlNode.addChildNode(memberNode);
          }
        }
      }
      const { $unknown } = value;
      if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) {
        const [k, v] = $unknown;
        const node2 = XmlNode.of(k);
        if (typeof v !== "string") {
          if (value instanceof XmlNode || value instanceof XmlText) {
            structXmlNode.addChildNode(value);
          } else {
            throw new Error(`@aws-sdk - $unknown union member in XML requires ` + `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);
          }
        }
        this.writeSimpleInto(0, v, node2, xmlns);
        structXmlNode.addChildNode(node2);
      }
      if (xmlns) {
        structXmlNode.addAttribute(xmlnsAttr, xmlns);
      }
      return structXmlNode;
    }
    writeList(listMember, array, container, parentXmlns) {
      if (!listMember.isMemberSchema()) {
        throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`);
      }
      const listTraits = listMember.getMergedTraits();
      const listValueSchema = listMember.getValueSchema();
      const listValueTraits = listValueSchema.getMergedTraits();
      const sparse = !!listValueTraits.sparse;
      const flat = !!listTraits.xmlFlattened;
      const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);
      const writeItem = (container2, value) => {
        if (listValueSchema.isListSchema()) {
          this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns);
        } else if (listValueSchema.isMapSchema()) {
          this.writeMap(listValueSchema, value, container2, xmlns);
        } else if (listValueSchema.isStructSchema()) {
          const struct = this.writeStruct(listValueSchema, value, xmlns);
          container2.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"));
        } else {
          const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member");
          this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);
          container2.addChildNode(listItemNode);
        }
      };
      if (flat) {
        for (const value of array) {
          if (sparse || value != null) {
            writeItem(container, value);
          }
        }
      } else {
        const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());
        if (xmlns) {
          listNode.addAttribute(xmlnsAttr, xmlns);
        }
        for (const value of array) {
          if (sparse || value != null) {
            writeItem(listNode, value);
          }
        }
        container.addChildNode(listNode);
      }
    }
    writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) {
      if (!mapMember.isMemberSchema()) {
        throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);
      }
      const mapTraits = mapMember.getMergedTraits();
      const mapKeySchema = mapMember.getKeySchema();
      const mapKeyTraits = mapKeySchema.getMergedTraits();
      const keyTag = mapKeyTraits.xmlName ?? "key";
      const mapValueSchema = mapMember.getValueSchema();
      const mapValueTraits = mapValueSchema.getMergedTraits();
      const valueTag = mapValueTraits.xmlName ?? "value";
      const sparse = !!mapValueTraits.sparse;
      const flat = !!mapTraits.xmlFlattened;
      const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);
      const addKeyValue = (entry, key, val) => {
        const keyNode = XmlNode.of(keyTag, key);
        const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);
        if (keyXmlns) {
          keyNode.addAttribute(keyXmlnsAttr, keyXmlns);
        }
        entry.addChildNode(keyNode);
        let valueNode = XmlNode.of(valueTag);
        if (mapValueSchema.isListSchema()) {
          this.writeList(mapValueSchema, val, valueNode, xmlns);
        } else if (mapValueSchema.isMapSchema()) {
          this.writeMap(mapValueSchema, val, valueNode, xmlns, true);
        } else if (mapValueSchema.isStructSchema()) {
          valueNode = this.writeStruct(mapValueSchema, val, xmlns);
        } else {
          this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);
        }
        entry.addChildNode(valueNode);
      };
      if (flat) {
        for (const key in map) {
          const val = map[key];
          if (sparse || val != null) {
            const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
            addKeyValue(entry, key, val);
            container.addChildNode(entry);
          }
        }
      } else {
        let mapNode;
        if (!containerIsMap) {
          mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
          if (xmlns) {
            mapNode.addAttribute(xmlnsAttr, xmlns);
          }
          container.addChildNode(mapNode);
        }
        for (const key in map) {
          const val = map[key];
          if (sparse || val != null) {
            const entry = XmlNode.of("entry");
            addKeyValue(entry, key, val);
            (containerIsMap ? container : mapNode).addChildNode(entry);
          }
        }
      }
    }
    writeSimple(_schema, value) {
      if (value === null) {
        throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");
      }
      const ns = NormalizedSchema.of(_schema);
      let nodeContents = null;
      if (value && typeof value === "object") {
        if (ns.isBlobSchema()) {
          nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value);
        } else if (ns.isTimestampSchema() && value instanceof Date) {
          const format = determineTimestampFormat(ns, this.settings);
          switch (format) {
            case 5:
              nodeContents = value.toISOString().replace(".000Z", "Z");
              break;
            case 6:
              nodeContents = dateToUtcString(value);
              break;
            case 7:
              nodeContents = String(value.getTime() / 1000);
              break;
            default:
              console.warn("Missing timestamp format, using http date", value);
              nodeContents = dateToUtcString(value);
              break;
          }
        } else if (ns.isBigDecimalSchema() && value) {
          if (value instanceof NumericValue) {
            return value.string;
          }
          return String(value);
        } else if (ns.isMapSchema() || ns.isListSchema()) {
          throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.");
        } else {
          throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);
        }
      }
      if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
        nodeContents = String(value);
      }
      if (ns.isStringSchema()) {
        if (value === undefined && ns.isIdempotencyToken()) {
          nodeContents = generateIdempotencyToken();
        } else {
          nodeContents = String(value);
        }
      }
      if (nodeContents === null) {
        throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);
      }
      return nodeContents;
    }
    writeSimpleInto(_schema, value, into, parentXmlns) {
      const nodeContents = this.writeSimple(_schema, value);
      const ns = NormalizedSchema.of(_schema);
      const content = new XmlText(nodeContents);
      const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
      if (xmlns) {
        into.addAttribute(xmlnsAttr, xmlns);
      }
      into.addChildNode(content);
    }
    getXmlnsAttribute(ns, parentXmlns) {
      const traits = ns.getMergedTraits();
      const [prefix, xmlns] = traits.xmlNamespace ?? [];
      if (xmlns && xmlns !== parentXmlns) {
        return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns];
      }
      return [undefined, undefined];
    }
  }

  class XmlCodec extends SerdeContextConfig {
    settings;
    constructor(settings) {
      super();
      this.settings = settings;
    }
    createSerializer() {
      const serializer = new XmlShapeSerializer(this.settings);
      serializer.setSerdeContext(this.serdeContext);
      return serializer;
    }
    createDeserializer() {
      const deserializer = new XmlShapeDeserializer(this.settings);
      deserializer.setSerdeContext(this.serdeContext);
      return deserializer;
    }
  }

  class AwsRestXmlProtocol extends HttpBindingProtocol {
    codec;
    serializer;
    deserializer;
    mixin = new ProtocolLib;
    constructor(options) {
      super(options);
      const settings = {
        timestampFormat: {
          useTrait: true,
          default: 5
        },
        httpBindings: true,
        xmlNamespace: options.xmlNamespace,
        serviceNamespace: options.defaultNamespace
      };
      this.codec = new XmlCodec(settings);
      this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
      this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
    }
    getPayloadCodec() {
      return this.codec;
    }
    getShapeId() {
      return "aws.protocols#restXml";
    }
    async serializeRequest(operationSchema, input, context10) {
      const request2 = await super.serializeRequest(operationSchema, input, context10);
      const inputSchema = NormalizedSchema.of(operationSchema.input);
      if (!request2.headers["content-type"]) {
        const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
        if (contentType) {
          request2.headers["content-type"] = contentType;
        }
      }
      if (typeof request2.body === "string" && request2.headers["content-type"] === this.getDefaultContentType() && !request2.body.startsWith("<?xml ") && !this.hasUnstructuredPayloadBinding(inputSchema)) {
        request2.body = '<?xml version="1.0" encoding="UTF-8"?>' + request2.body;
      }
      return request2;
    }
    async deserializeResponse(operationSchema, context10, response) {
      return super.deserializeResponse(operationSchema, context10, response);
    }
    async handleError(operationSchema, context10, response, dataObject, metadata) {
      const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
      this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
      if (dataObject.Error && typeof dataObject.Error === "object") {
        for (const key of Object.keys(dataObject.Error)) {
          dataObject[key] = dataObject.Error[key];
          if (key.toLowerCase() === "message") {
            dataObject.message = dataObject.Error[key];
          }
        }
      }
      if (dataObject.RequestId && !metadata.requestId) {
        metadata.requestId = dataObject.RequestId;
      }
      const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
      const ns = NormalizedSchema.of(errorSchema);
      const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "UnknownError";
      const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
      const exception = new ErrorCtor({});
      await this.deserializeHttpMessage(errorSchema, context10, response, dataObject);
      const output = {};
      const errorDeserializer = this.codec.createDeserializer();
      for (const [name, member2] of ns.structIterator()) {
        const target = member2.getMergedTraits().xmlName ?? name;
        const value = dataObject.Error?.[target] ?? dataObject[target];
        output[name] = errorDeserializer.readSchema(member2, value);
      }
      throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
        $fault: ns.getMergedTraits().error,
        message
      }, output), dataObject);
    }
    getDefaultContentType() {
      return "application/xml";
    }
    hasUnstructuredPayloadBinding(ns) {
      for (const [, member2] of ns.structIterator()) {
        if (member2.getMergedTraits().httpPayload) {
          return !(member2.isStructSchema() || member2.isMapSchema() || member2.isListSchema());
        }
      }
      return false;
    }
  }
  exports.AwsEc2QueryProtocol = AwsEc2QueryProtocol;
  exports.AwsJson1_0Protocol = AwsJson1_0Protocol;
  exports.AwsJson1_1Protocol = AwsJson1_1Protocol;
  exports.AwsJsonRpcProtocol = AwsJsonRpcProtocol;
  exports.AwsQueryProtocol = AwsQueryProtocol;
  exports.AwsRestJsonProtocol = AwsRestJsonProtocol;
  exports.AwsRestXmlProtocol = AwsRestXmlProtocol;
  exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol;
  exports.JsonCodec = JsonCodec;
  exports.JsonShapeDeserializer = JsonShapeDeserializer;
  exports.JsonShapeSerializer = JsonShapeSerializer;
  exports.QueryShapeSerializer = QueryShapeSerializer;
  exports.XmlCodec = XmlCodec;
  exports.XmlShapeDeserializer = XmlShapeDeserializer;
  exports.XmlShapeSerializer = XmlShapeSerializer;
  exports._toBool = _toBool;
  exports._toNum = _toNum;
  exports._toStr = _toStr;
  exports.awsExpectUnion = awsExpectUnion;
  exports.loadJsonRpcErrorCode = loadJsonRpcErrorCode;
  exports.loadRestJsonErrorCode = loadRestJsonErrorCode;
  exports.loadRestXmlErrorCode = loadRestXmlErrorCode;
  exports.parseJsonBody = parseJsonBody;
  exports.parseJsonErrorBody = parseJsonErrorBody;
  exports.parseXmlBody = parseXmlBody;
  exports.parseXmlErrorBody = parseXmlErrorBody;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.23/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js
var require_sso_oidc = __commonJS((exports) => {
  var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs5();
  var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config2();
  var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { parseUrl: parseUrl2, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry();
  var { TypeRegistry, getSchemaSerdePlugin } = require_schema();
  var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require_serde();
  var { streamCollector, NodeHttpHandler } = require_dist_cjs9();
  var { AwsRestJsonProtocol } = require_protocols2();
  var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "sso-oauth",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createSmithyApiNoAuthHttpAuthOption(authParameters) {
    return {
      schemeId: "smithy.api#noAuth"
    };
  }
  var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      case "CreateToken": {
        options.push(createSmithyApiNoAuthHttpAuthOption());
        break;
      }
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  var resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "sso-oauth"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var version3 = "3.997.22";
  var packageInfo = {
    version: version3
  };
  var k = "ref";
  var a = -1;
  var b = true;
  var c = "isSet";
  var d = "PartitionResult";
  var e = "booleanEquals";
  var f = "getAttr";
  var g = { [k]: "Endpoint" };
  var h = { [k]: d };
  var i = {};
  var j = [{ [k]: "Region" }];
  var _data = {
    conditions: [
      [c, [g]],
      [c, j],
      ["aws.partition", j, d],
      [e, [{ [k]: "UseFIPS" }, b]],
      [e, [{ [k]: "UseDualStack" }, b]],
      [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
      [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
      ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]]
    ],
    results: [
      [a],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [g, i],
      ["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://oidc.{Region}.amazonaws.com", i],
      ["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://oidc.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    13,
    3,
    1,
    4,
    r + 12,
    2,
    5,
    r + 12,
    3,
    8,
    6,
    4,
    7,
    r + 11,
    5,
    r + 9,
    r + 10,
    4,
    11,
    9,
    6,
    10,
    r + 8,
    7,
    r + 6,
    r + 7,
    5,
    12,
    r + 5,
    6,
    r + 4,
    r + 5,
    3,
    r + 1,
    14,
    4,
    r + 2,
    r + 3
  ]);
  var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  var defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;

  class SSOOIDCServiceException extends ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
    }
  }

  class AccessDeniedException extends SSOOIDCServiceException {
    name = "AccessDeniedException";
    $fault = "client";
    error;
    reason;
    error_description;
    constructor(opts) {
      super({
        name: "AccessDeniedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AccessDeniedException.prototype);
      this.error = opts.error;
      this.reason = opts.reason;
      this.error_description = opts.error_description;
    }
  }

  class AuthorizationPendingException extends SSOOIDCServiceException {
    name = "AuthorizationPendingException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "AuthorizationPendingException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AuthorizationPendingException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class ExpiredTokenException extends SSOOIDCServiceException {
    name = "ExpiredTokenException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "ExpiredTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExpiredTokenException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class InternalServerException extends SSOOIDCServiceException {
    name = "InternalServerException";
    $fault = "server";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "InternalServerException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InternalServerException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class InvalidClientException extends SSOOIDCServiceException {
    name = "InvalidClientException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "InvalidClientException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidClientException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class InvalidGrantException extends SSOOIDCServiceException {
    name = "InvalidGrantException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "InvalidGrantException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidGrantException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class InvalidRequestException extends SSOOIDCServiceException {
    name = "InvalidRequestException";
    $fault = "client";
    error;
    reason;
    error_description;
    constructor(opts) {
      super({
        name: "InvalidRequestException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidRequestException.prototype);
      this.error = opts.error;
      this.reason = opts.reason;
      this.error_description = opts.error_description;
    }
  }

  class InvalidScopeException extends SSOOIDCServiceException {
    name = "InvalidScopeException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "InvalidScopeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidScopeException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class SlowDownException extends SSOOIDCServiceException {
    name = "SlowDownException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "SlowDownException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SlowDownException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class UnauthorizedClientException extends SSOOIDCServiceException {
    name = "UnauthorizedClientException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "UnauthorizedClientException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, UnauthorizedClientException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }

  class UnsupportedGrantTypeException extends SSOOIDCServiceException {
    name = "UnsupportedGrantTypeException";
    $fault = "client";
    error;
    error_description;
    constructor(opts) {
      super({
        name: "UnsupportedGrantTypeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);
      this.error = opts.error;
      this.error_description = opts.error_description;
    }
  }
  var _ADE = "AccessDeniedException";
  var _APE = "AuthorizationPendingException";
  var _AT = "AccessToken";
  var _CS = "ClientSecret";
  var _CT = "CreateToken";
  var _CTR = "CreateTokenRequest";
  var _CTRr = "CreateTokenResponse";
  var _CV = "CodeVerifier";
  var _ETE = "ExpiredTokenException";
  var _ICE = "InvalidClientException";
  var _IGE = "InvalidGrantException";
  var _IRE = "InvalidRequestException";
  var _ISE = "InternalServerException";
  var _ISEn = "InvalidScopeException";
  var _IT = "IdToken";
  var _RT = "RefreshToken";
  var _SDE = "SlowDownException";
  var _UCE = "UnauthorizedClientException";
  var _UGTE = "UnsupportedGrantTypeException";
  var _aT = "accessToken";
  var _c = "client";
  var _cI = "clientId";
  var _cS = "clientSecret";
  var _cV = "codeVerifier";
  var _co = "code";
  var _dC = "deviceCode";
  var _e = "error";
  var _eI = "expiresIn";
  var _ed = "error_description";
  var _gT = "grantType";
  var _h = "http";
  var _hE = "httpError";
  var _iT = "idToken";
  var _r = "reason";
  var _rT = "refreshToken";
  var _rU = "redirectUri";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc";
  var _sc = "scope";
  var _se = "server";
  var _tT = "tokenType";
  var n0 = "com.amazonaws.ssooidc";
  var _s_registry = TypeRegistry.for(_s);
  var SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
  _s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var AccessDeniedException$ = [
    -3,
    n0,
    _ADE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _r, _ed],
    [0, 0, 0]
  ];
  n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
  var AuthorizationPendingException$ = [
    -3,
    n0,
    _APE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);
  var ExpiredTokenException$ = [
    -3,
    n0,
    _ETE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
  var InternalServerException$ = [
    -3,
    n0,
    _ISE,
    { [_e]: _se, [_hE]: 500 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(InternalServerException$, InternalServerException);
  var InvalidClientException$ = [
    -3,
    n0,
    _ICE,
    { [_e]: _c, [_hE]: 401 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(InvalidClientException$, InvalidClientException);
  var InvalidGrantException$ = [
    -3,
    n0,
    _IGE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(InvalidGrantException$, InvalidGrantException);
  var InvalidRequestException$ = [
    -3,
    n0,
    _IRE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _r, _ed],
    [0, 0, 0]
  ];
  n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
  var InvalidScopeException$ = [
    -3,
    n0,
    _ISEn,
    { [_e]: _c, [_hE]: 400 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(InvalidScopeException$, InvalidScopeException);
  var SlowDownException$ = [
    -3,
    n0,
    _SDE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(SlowDownException$, SlowDownException);
  var UnauthorizedClientException$ = [
    -3,
    n0,
    _UCE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);
  var UnsupportedGrantTypeException$ = [
    -3,
    n0,
    _UGTE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _ed],
    [0, 0]
  ];
  n0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);
  var errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var AccessToken = [0, n0, _AT, 8, 0];
  var ClientSecret = [0, n0, _CS, 8, 0];
  var CodeVerifier = [0, n0, _CV, 8, 0];
  var IdToken = [0, n0, _IT, 8, 0];
  var RefreshToken = [0, n0, _RT, 8, 0];
  var CreateTokenRequest$ = [
    3,
    n0,
    _CTR,
    0,
    [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],
    [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],
    3
  ];
  var CreateTokenResponse$ = [
    3,
    n0,
    _CTRr,
    0,
    [_aT, _tT, _eI, _rT, _iT],
    [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]]
  ];
  var CreateToken$ = [
    9,
    n0,
    _CT,
    { [_h]: ["POST", "/token", 200] },
    () => CreateTokenRequest$,
    () => CreateTokenResponse$
  ];
  var getRuntimeConfig$1 = (config) => {
    return {
      apiVersion: "2019-06-10",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsRestJsonProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.ssooidc",
        errorTypeRegistries,
        version: "2019-06-10",
        serviceTarget: "AWSSSOOIDCService"
      },
      serviceId: config?.serviceId ?? "SSO OIDC",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getRuntimeConfig$1(config);
    emitWarningIfUnsupportedVersion$1(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class SSOOIDCClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class CreateTokenCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").sc(CreateToken$).build() {
  }
  var commands = {
    CreateTokenCommand
  };

  class SSOOIDC extends SSOOIDCClient {
  }
  createAggregatedClient(commands, SSOOIDC);
  var AccessDeniedExceptionReason = {
    KMS_ACCESS_DENIED: "KMS_AccessDeniedException"
  };
  var InvalidRequestExceptionReason = {
    KMS_DISABLED_KEY: "KMS_DisabledException",
    KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
    KMS_INVALID_STATE: "KMS_InvalidStateException",
    KMS_KEY_NOT_FOUND: "KMS_NotFoundException"
  };
  exports.AccessDeniedException = AccessDeniedException;
  exports.AccessDeniedException$ = AccessDeniedException$;
  exports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;
  exports.AuthorizationPendingException = AuthorizationPendingException;
  exports.AuthorizationPendingException$ = AuthorizationPendingException$;
  exports.CreateToken$ = CreateToken$;
  exports.CreateTokenCommand = CreateTokenCommand;
  exports.CreateTokenRequest$ = CreateTokenRequest$;
  exports.CreateTokenResponse$ = CreateTokenResponse$;
  exports.ExpiredTokenException = ExpiredTokenException;
  exports.ExpiredTokenException$ = ExpiredTokenException$;
  exports.InternalServerException = InternalServerException;
  exports.InternalServerException$ = InternalServerException$;
  exports.InvalidClientException = InvalidClientException;
  exports.InvalidClientException$ = InvalidClientException$;
  exports.InvalidGrantException = InvalidGrantException;
  exports.InvalidGrantException$ = InvalidGrantException$;
  exports.InvalidRequestException = InvalidRequestException;
  exports.InvalidRequestException$ = InvalidRequestException$;
  exports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;
  exports.InvalidScopeException = InvalidScopeException;
  exports.InvalidScopeException$ = InvalidScopeException$;
  exports.SSOOIDC = SSOOIDC;
  exports.SSOOIDCClient = SSOOIDCClient;
  exports.SSOOIDCServiceException = SSOOIDCServiceException;
  exports.SSOOIDCServiceException$ = SSOOIDCServiceException$;
  exports.SlowDownException = SlowDownException;
  exports.SlowDownException$ = SlowDownException$;
  exports.UnauthorizedClientException = UnauthorizedClientException;
  exports.UnauthorizedClientException$ = UnauthorizedClientException$;
  exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException;
  exports.UnsupportedGrantTypeException$ = UnsupportedGrantTypeException$;
  exports.errorTypeRegistries = errorTypeRegistries;
});

// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1074.0/node_modules/@aws-sdk/token-providers/dist-cjs/index.js
var require_dist_cjs12 = __commonJS((exports) => {
  var { setTokenFeature } = require_client4();
  var { getBearerTokenEnvKey } = require_httpAuthSchemes();
  var { TokenProviderError, getSSOTokenFilepath, parseKnownFiles, getProfileName, loadSsoSessionData, getSSOTokenFromFile, memoize, chain } = require_config2();
  var { promises } = __require("node:fs");
  var fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
    logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
    if (!signingName) {
      throw new TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
    }
    const bearerTokenKey = getBearerTokenEnvKey(signingName);
    if (!(bearerTokenKey in process.env)) {
      throw new TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
    }
    const token = { token: process.env[bearerTokenKey] };
    setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
    return token;
  };
  var EXPIRE_WINDOW_MS = 5 * 60 * 1000;
  var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
  var getSsoOidcClient = async (ssoRegion, init4 = {}, callerClientConfig) => {
    const { SSOOIDCClient } = require_sso_oidc();
    const coalesce = (prop) => init4.clientConfig?.[prop] ?? init4.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
    const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init4.clientConfig ?? {}, {
      region: ssoRegion ?? init4.clientConfig?.region,
      logger: coalesce("logger"),
      userAgentAppId: coalesce("userAgentAppId")
    }));
    return ssoOidcClient;
  };
  var getNewSsoOidcToken = async (ssoToken, ssoRegion, init4 = {}, callerClientConfig) => {
    const { CreateTokenCommand } = require_sso_oidc();
    const ssoOidcClient = await getSsoOidcClient(ssoRegion, init4, callerClientConfig);
    return ssoOidcClient.send(new CreateTokenCommand({
      clientId: ssoToken.clientId,
      clientSecret: ssoToken.clientSecret,
      refreshToken: ssoToken.refreshToken,
      grantType: "refresh_token"
    }));
  };
  var validateTokenExpiry = (token) => {
    if (token.expiration && token.expiration.getTime() < Date.now()) {
      throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
    }
  };
  var validateTokenKey = (key, value, forRefresh = false) => {
    if (typeof value === "undefined") {
      throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
    }
  };
  var { writeFile } = promises;
  var writeSSOTokenToFile = (id, ssoToken) => {
    const tokenFilepath = getSSOTokenFilepath(id);
    const tokenString = JSON.stringify(ssoToken, null, 2);
    return writeFile(tokenFilepath, tokenString);
  };
  var lastRefreshAttemptTime = new Date(0);
  var fromSso = (init4 = {}) => async ({ callerClientConfig } = {}) => {
    init4.logger?.debug("@aws-sdk/token-providers - fromSso");
    const profiles = await parseKnownFiles(init4);
    const profileName = getProfileName({
      profile: init4.profile ?? callerClientConfig?.profile
    });
    const profile = profiles[profileName];
    if (!profile) {
      throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
    } else if (!profile["sso_session"]) {
      throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
    }
    const ssoSessionName = profile["sso_session"];
    const ssoSessions = await loadSsoSessionData(init4);
    const ssoSession = ssoSessions[ssoSessionName];
    if (!ssoSession) {
      throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
    }
    for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
      if (!ssoSession[ssoSessionRequiredKey]) {
        throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
      }
    }
    ssoSession["sso_start_url"];
    const ssoRegion = ssoSession["sso_region"];
    let ssoToken;
    try {
      ssoToken = await getSSOTokenFromFile(ssoSessionName);
    } catch (e) {
      throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
    }
    validateTokenKey("accessToken", ssoToken.accessToken);
    validateTokenKey("expiresAt", ssoToken.expiresAt);
    const { accessToken, expiresAt } = ssoToken;
    const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
    if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
      return existingToken;
    }
    if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {
      validateTokenExpiry(existingToken);
      return existingToken;
    }
    validateTokenKey("clientId", ssoToken.clientId, true);
    validateTokenKey("clientSecret", ssoToken.clientSecret, true);
    validateTokenKey("refreshToken", ssoToken.refreshToken, true);
    try {
      lastRefreshAttemptTime.setTime(Date.now());
      const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init4, callerClientConfig);
      validateTokenKey("accessToken", newSsoOidcToken.accessToken);
      validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
      const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
      try {
        await writeSSOTokenToFile(ssoSessionName, {
          ...ssoToken,
          accessToken: newSsoOidcToken.accessToken,
          expiresAt: newTokenExpiration.toISOString(),
          refreshToken: newSsoOidcToken.refreshToken
        });
      } catch (error2) {}
      return {
        token: newSsoOidcToken.accessToken,
        expiration: newTokenExpiration
      };
    } catch (error2) {
      validateTokenExpiry(existingToken);
      return existingToken;
    }
  };
  var fromStatic = ({ token, logger }) => async () => {
    logger?.debug("@aws-sdk/token-providers - fromStatic");
    if (!token || !token.token) {
      throw new TokenProviderError(`Please pass a valid token to fromStatic`, false);
    }
    return token;
  };
  var nodeProvider = (init4 = {}) => memoize(chain(fromSso(init4), async () => {
    throw new TokenProviderError("Could not load token from any providers", false);
  }), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined);
  exports.fromEnvSigningName = fromEnvSigningName;
  exports.fromSso = fromSso;
  exports.fromStatic = fromStatic;
  exports.nodeProvider = nodeProvider;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.23/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js
var require_sso = __commonJS((exports) => {
  var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs5();
  var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config2();
  var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { parseUrl: parseUrl2, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry();
  var { TypeRegistry, getSchemaSerdePlugin } = require_schema();
  var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require_serde();
  var { streamCollector, NodeHttpHandler } = require_dist_cjs9();
  var { AwsRestJsonProtocol } = require_protocols2();
  var defaultSSOHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "awsssoportal",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createSmithyApiNoAuthHttpAuthOption(authParameters) {
    return {
      schemeId: "smithy.api#noAuth"
    };
  }
  var defaultSSOHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      case "GetRoleCredentials": {
        options.push(createSmithyApiNoAuthHttpAuthOption());
        break;
      }
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  var resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "awsssoportal"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var version3 = "3.997.22";
  var packageInfo = {
    version: version3
  };
  var k = "ref";
  var a = -1;
  var b = true;
  var c = "isSet";
  var d = "PartitionResult";
  var e = "booleanEquals";
  var f = "getAttr";
  var g = { [k]: "Endpoint" };
  var h = { [k]: d };
  var i = {};
  var j = [{ [k]: "Region" }];
  var _data = {
    conditions: [
      [c, [g]],
      [c, j],
      ["aws.partition", j, d],
      [e, [{ [k]: "UseFIPS" }, b]],
      [e, [{ [k]: "UseDualStack" }, b]],
      [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
      [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
      ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]]
    ],
    results: [
      [a],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [g, i],
      ["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://portal.sso.{Region}.amazonaws.com", i],
      ["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    13,
    3,
    1,
    4,
    r + 12,
    2,
    5,
    r + 12,
    3,
    8,
    6,
    4,
    7,
    r + 11,
    5,
    r + 9,
    r + 10,
    4,
    11,
    9,
    6,
    10,
    r + 8,
    7,
    r + 6,
    r + 7,
    5,
    12,
    r + 5,
    6,
    r + 4,
    r + 5,
    3,
    r + 1,
    14,
    4,
    r + 2,
    r + 3
  ]);
  var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  var defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;

  class SSOServiceException extends ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, SSOServiceException.prototype);
    }
  }

  class InvalidRequestException extends SSOServiceException {
    name = "InvalidRequestException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidRequestException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidRequestException.prototype);
    }
  }

  class ResourceNotFoundException extends SSOServiceException {
    name = "ResourceNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ResourceNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
    }
  }

  class TooManyRequestsException extends SSOServiceException {
    name = "TooManyRequestsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TooManyRequestsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TooManyRequestsException.prototype);
    }
  }

  class UnauthorizedException extends SSOServiceException {
    name = "UnauthorizedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "UnauthorizedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, UnauthorizedException.prototype);
    }
  }
  var _ATT = "AccessTokenType";
  var _GRC = "GetRoleCredentials";
  var _GRCR = "GetRoleCredentialsRequest";
  var _GRCRe = "GetRoleCredentialsResponse";
  var _IRE = "InvalidRequestException";
  var _RC = "RoleCredentials";
  var _RNFE = "ResourceNotFoundException";
  var _SAKT = "SecretAccessKeyType";
  var _STT = "SessionTokenType";
  var _TMRE = "TooManyRequestsException";
  var _UE = "UnauthorizedException";
  var _aI = "accountId";
  var _aKI = "accessKeyId";
  var _aT = "accessToken";
  var _ai = "account_id";
  var _c = "client";
  var _e = "error";
  var _ex = "expiration";
  var _h = "http";
  var _hE = "httpError";
  var _hH = "httpHeader";
  var _hQ = "httpQuery";
  var _m = "message";
  var _rC = "roleCredentials";
  var _rN = "roleName";
  var _rn = "role_name";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
  var _sAK = "secretAccessKey";
  var _sT = "sessionToken";
  var _xasbt = "x-amz-sso_bearer_token";
  var n0 = "com.amazonaws.sso";
  var _s_registry = TypeRegistry.for(_s);
  var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
  _s_registry.registerError(SSOServiceException$, SSOServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var InvalidRequestException$ = [
    -3,
    n0,
    _IRE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
  var ResourceNotFoundException$ = [
    -3,
    n0,
    _RNFE,
    { [_e]: _c, [_hE]: 404 },
    [_m],
    [0]
  ];
  n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
  var TooManyRequestsException$ = [
    -3,
    n0,
    _TMRE,
    { [_e]: _c, [_hE]: 429 },
    [_m],
    [0]
  ];
  n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
  var UnauthorizedException$ = [
    -3,
    n0,
    _UE,
    { [_e]: _c, [_hE]: 401 },
    [_m],
    [0]
  ];
  n0_registry.registerError(UnauthorizedException$, UnauthorizedException);
  var errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var AccessTokenType = [0, n0, _ATT, 8, 0];
  var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
  var SessionTokenType = [0, n0, _STT, 8, 0];
  var GetRoleCredentialsRequest$ = [
    3,
    n0,
    _GRCR,
    0,
    [_rN, _aI, _aT],
    [[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]],
    3
  ];
  var GetRoleCredentialsResponse$ = [
    3,
    n0,
    _GRCRe,
    0,
    [_rC],
    [[() => RoleCredentials$, 0]]
  ];
  var RoleCredentials$ = [
    3,
    n0,
    _RC,
    0,
    [_aKI, _sAK, _sT, _ex],
    [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
  ];
  var GetRoleCredentials$ = [
    9,
    n0,
    _GRC,
    { [_h]: ["GET", "/federation/credentials", 200] },
    () => GetRoleCredentialsRequest$,
    () => GetRoleCredentialsResponse$
  ];
  var getRuntimeConfig$1 = (config) => {
    return {
      apiVersion: "2019-06-10",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsRestJsonProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.sso",
        errorTypeRegistries,
        version: "2019-06-10",
        serviceTarget: "SWBPortalService"
      },
      serviceId: config?.serviceId ?? "SSO",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getRuntimeConfig$1(config);
    emitWarningIfUnsupportedVersion$1(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class SSOClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class GetRoleCredentialsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build() {
  }
  var commands = {
    GetRoleCredentialsCommand
  };

  class SSO extends SSOClient {
  }
  createAggregatedClient(commands, SSO);
  exports.GetRoleCredentials$ = GetRoleCredentials$;
  exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
  exports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;
  exports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;
  exports.InvalidRequestException = InvalidRequestException;
  exports.InvalidRequestException$ = InvalidRequestException$;
  exports.ResourceNotFoundException = ResourceNotFoundException;
  exports.ResourceNotFoundException$ = ResourceNotFoundException$;
  exports.RoleCredentials$ = RoleCredentials$;
  exports.SSO = SSO;
  exports.SSOClient = SSOClient;
  exports.SSOServiceException = SSOServiceException;
  exports.SSOServiceException$ = SSOServiceException$;
  exports.TooManyRequestsException = TooManyRequestsException;
  exports.TooManyRequestsException$ = TooManyRequestsException$;
  exports.UnauthorizedException = UnauthorizedException;
  exports.UnauthorizedException$ = UnauthorizedException$;
  exports.errorTypeRegistries = errorTypeRegistries;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js
var require_loadSso_BGYXHf8s = __commonJS((exports) => {
  var { GetRoleCredentialsCommand, SSOClient } = require_sso();
  exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
  exports.SSOClient = SSOClient;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.972.55/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js
var require_dist_cjs13 = __commonJS((exports) => {
  var { CredentialsProviderError, getSSOTokenFromFile, getProfileName, parseKnownFiles, loadSsoSessionData } = require_config2();
  var { setCredentialFeature } = require_client4();
  var { fromSso } = require_dist_cjs12();
  var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
  var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
  var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
    let token;
    const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
    if (ssoSession) {
      try {
        const _token = await fromSso({
          profile,
          filepath,
          configFilepath,
          ignoreCache,
          clientConfig,
          parentClientConfig,
          logger
        })({ callerClientConfig });
        token = {
          accessToken: _token.token,
          expiresAt: new Date(_token.expiration).toISOString()
        };
      } catch (e) {
        throw new CredentialsProviderError(e.message, {
          tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
          logger
        });
      }
    } else {
      try {
        token = await getSSOTokenFromFile(ssoStartUrl);
      } catch (e) {
        throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
          tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
          logger
        });
      }
    }
    if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
      throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
        tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
        logger
      });
    }
    const { accessToken } = token;
    const { SSOClient, GetRoleCredentialsCommand } = require_loadSso_BGYXHf8s();
    const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, {
      logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
      region: clientConfig?.region ?? ssoRegion,
      userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId
    }));
    let ssoResp;
    try {
      ssoResp = await sso.send(new GetRoleCredentialsCommand({
        accountId: ssoAccountId,
        roleName: ssoRoleName,
        accessToken
      }));
    } catch (e) {
      throw new CredentialsProviderError(e, {
        tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
        logger
      });
    }
    const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
    if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
      throw new CredentialsProviderError("SSO returns an invalid temporary credential.", {
        tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
        logger
      });
    }
    const credentials = {
      accessKeyId,
      secretAccessKey,
      sessionToken,
      expiration: new Date(expiration),
      ...credentialScope && { credentialScope },
      ...accountId && { accountId }
    };
    if (ssoSession) {
      setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
    } else {
      setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
    }
    return credentials;
  };
  var validateSsoProfile = (profile, logger) => {
    const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
    if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
      throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` + `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
    }
    return profile;
  };
  var fromSSO = (init4 = {}) => async ({ callerClientConfig } = {}) => {
    init4.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
    const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init4;
    const { ssoClient } = init4;
    const profileName = getProfileName({
      profile: init4.profile ?? callerClientConfig?.profile
    });
    if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
      const profiles = await parseKnownFiles(init4);
      const profile = profiles[profileName];
      if (!profile) {
        throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init4.logger });
      }
      if (!isSsoProfile(profile)) {
        throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
          logger: init4.logger
        });
      }
      if (profile?.sso_session) {
        const ssoSessions = await loadSsoSessionData(init4);
        const session2 = ssoSessions[profile.sso_session];
        const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
        if (ssoRegion && ssoRegion !== session2.sso_region) {
          throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
            tryNextLink: false,
            logger: init4.logger
          });
        }
        if (ssoStartUrl && ssoStartUrl !== session2.sso_start_url) {
          throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
            tryNextLink: false,
            logger: init4.logger
          });
        }
        profile.sso_region = session2.sso_region;
        profile.sso_start_url = session2.sso_start_url;
      }
      const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init4.logger);
      return resolveSSOCredentials({
        ssoStartUrl: sso_start_url,
        ssoSession: sso_session,
        ssoAccountId: sso_account_id,
        ssoRegion: sso_region,
        ssoRoleName: sso_role_name,
        ssoClient,
        clientConfig: init4.clientConfig,
        parentClientConfig: init4.parentClientConfig,
        callerClientConfig: init4.callerClientConfig,
        profile: profileName,
        filepath: init4.filepath,
        configFilepath: init4.configFilepath,
        ignoreCache: init4.ignoreCache,
        logger: init4.logger
      });
    } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
      throw new CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init4.logger });
    } else {
      return resolveSSOCredentials({
        ssoStartUrl,
        ssoSession,
        ssoAccountId,
        ssoRegion,
        ssoRoleName,
        ssoClient,
        clientConfig: init4.clientConfig,
        parentClientConfig: init4.parentClientConfig,
        callerClientConfig: init4.callerClientConfig,
        profile: profileName,
        filepath: init4.filepath,
        configFilepath: init4.configFilepath,
        ignoreCache: init4.ignoreCache,
        logger: init4.logger
      });
    }
  };
  exports.fromSSO = fromSSO;
  exports.isSsoProfile = isSsoProfile;
  exports.validateSsoProfile = validateSsoProfile;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.23/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js
var require_signin = __commonJS((exports) => {
  var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs5();
  var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config2();
  var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { parseUrl: parseUrl2, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry();
  var { TypeRegistry, getSchemaSerdePlugin } = require_schema();
  var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require_serde();
  var { streamCollector, NodeHttpHandler } = require_dist_cjs9();
  var { AwsRestJsonProtocol } = require_protocols2();
  var defaultSigninHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "signin",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createSmithyApiNoAuthHttpAuthOption(authParameters) {
    return {
      schemeId: "smithy.api#noAuth"
    };
  }
  var defaultSigninHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      case "CreateOAuth2Token": {
        options.push(createSmithyApiNoAuthHttpAuthOption());
        break;
      }
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  var resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "signin"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var version3 = "3.997.22";
  var packageInfo = {
    version: version3
  };
  var p = "ref";
  var a = -1;
  var b = true;
  var c = "isSet";
  var d = "booleanEquals";
  var e = "PartitionResult";
  var f = "stringEquals";
  var g = "getAttr";
  var h = "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}";
  var i = { [p]: "Endpoint" };
  var j = { fn: g, argv: [{ [p]: e }, "name"] };
  var k = { [p]: e };
  var l = { [p]: "Region" };
  var m = { authSchemes: [{ name: "sigv4", signingName: "signin", signingRegion: "{Region}" }] };
  var n = {};
  var o = [l];
  var _data = {
    conditions: [
      [c, o],
      [d, [{ fn: "coalesce", argv: [{ [p]: "IsControlPlane" }, false] }, b]],
      [c, [i]],
      ["aws.partition", o, e],
      [d, [{ [p]: "UseFIPS" }, b]],
      [d, [{ [p]: "UseDualStack" }, b]],
      [f, [j, "aws"]],
      [f, [j, "aws-cn"]],
      [d, [{ fn: g, argv: [k, "supportsDualStack"] }, b]],
      [f, [l, "us-gov-west-1"]],
      [f, [j, "aws-us-gov"]],
      [d, [{ fn: g, argv: [k, "supportsFIPS"] }, b]],
      [f, [j, "aws-iso"]],
      [f, [j, "aws-iso-b"]],
      [f, [j, "aws-iso-f"]],
      [f, [j, "aws-iso-e"]],
      [f, [j, "aws-eusc"]]
    ],
    results: [
      [a],
      ["https://signin.{Region}.api.aws", m],
      ["https://signin.{Region}.api.amazonwebservices.com.cn", m],
      [h, m],
      ["https://{Region}.signin.aws.amazon.com", n],
      ["https://{Region}.signin.amazonaws.cn", n],
      ["https://{Region}.signin.amazonaws-us-gov.com", n],
      ["https://{Region}.signin.c2shome.ic.gov", n],
      ["https://{Region}.signin.sc2shome.sgov.gov", n],
      ["https://{Region}.signin.csphome.hci.ic.gov", n],
      ["https://{Region}.signin.csphome.adc-e.uk", n],
      ["https://{Region}.signin.amazonaws-eusc.eu", n],
      ["https://signin-fips.amazonaws-us-gov.com", n],
      ["https://{Region}.signin-fips.amazonaws-us-gov.com", n],
      ["https://{Region}.signin.{PartitionResult#dnsSuffix}", n],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [i, n],
      ["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", n],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", n],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      [h, n],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://signin.{Region}.{PartitionResult#dnsSuffix}", n],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    4,
    3,
    2,
    30,
    r + 25,
    1,
    24,
    5,
    2,
    30,
    6,
    3,
    7,
    26,
    4,
    18,
    8,
    5,
    17,
    9,
    6,
    r + 4,
    10,
    7,
    r + 5,
    11,
    10,
    r + 6,
    12,
    12,
    r + 7,
    13,
    13,
    r + 8,
    14,
    14,
    r + 9,
    15,
    15,
    r + 10,
    16,
    16,
    r + 11,
    r + 14,
    8,
    r + 22,
    r + 23,
    5,
    22,
    19,
    9,
    r + 12,
    20,
    10,
    r + 13,
    21,
    11,
    r + 20,
    r + 21,
    8,
    23,
    r + 19,
    11,
    r + 18,
    r + 19,
    2,
    29,
    25,
    3,
    32,
    26,
    4,
    27,
    r + 25,
    5,
    r + 25,
    28,
    9,
    r + 12,
    r + 25,
    3,
    32,
    30,
    4,
    r + 15,
    31,
    5,
    r + 16,
    r + 17,
    6,
    r + 1,
    33,
    7,
    r + 2,
    r + 3
  ]);
  var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "IsControlPlane", "Region", "UseDualStack", "UseFIPS"]
  });
  var defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;

  class SigninServiceException extends ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, SigninServiceException.prototype);
    }
  }

  class AccessDeniedException extends SigninServiceException {
    name = "AccessDeniedException";
    $fault = "client";
    error;
    constructor(opts) {
      super({
        name: "AccessDeniedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AccessDeniedException.prototype);
      this.error = opts.error;
    }
  }

  class InternalServerException extends SigninServiceException {
    name = "InternalServerException";
    $fault = "server";
    error;
    constructor(opts) {
      super({
        name: "InternalServerException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InternalServerException.prototype);
      this.error = opts.error;
    }
  }

  class TooManyRequestsError extends SigninServiceException {
    name = "TooManyRequestsError";
    $fault = "client";
    error;
    constructor(opts) {
      super({
        name: "TooManyRequestsError",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TooManyRequestsError.prototype);
      this.error = opts.error;
    }
  }

  class ValidationException extends SigninServiceException {
    name = "ValidationException";
    $fault = "client";
    error;
    constructor(opts) {
      super({
        name: "ValidationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ValidationException.prototype);
      this.error = opts.error;
    }
  }
  var _ADE = "AccessDeniedException";
  var _AT = "AccessToken";
  var _COAT = "CreateOAuth2Token";
  var _COATR = "CreateOAuth2TokenRequest";
  var _COATRB = "CreateOAuth2TokenRequestBody";
  var _COATRBr = "CreateOAuth2TokenResponseBody";
  var _COATRr = "CreateOAuth2TokenResponse";
  var _ISE = "InternalServerException";
  var _RT = "RefreshToken";
  var _TMRE = "TooManyRequestsError";
  var _VE = "ValidationException";
  var _aKI = "accessKeyId";
  var _aT = "accessToken";
  var _c = "client";
  var _cI = "clientId";
  var _cV = "codeVerifier";
  var _co = "code";
  var _e = "error";
  var _eI = "expiresIn";
  var _gT = "grantType";
  var _h = "http";
  var _hE = "httpError";
  var _iT = "idToken";
  var _jN = "jsonName";
  var _m = "message";
  var _rT = "refreshToken";
  var _rU = "redirectUri";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
  var _sAK = "secretAccessKey";
  var _sT = "sessionToken";
  var _se = "server";
  var _tI = "tokenInput";
  var _tO = "tokenOutput";
  var _tT = "tokenType";
  var n0 = "com.amazonaws.signin";
  var _s_registry = TypeRegistry.for(_s);
  var SigninServiceException$ = [-3, _s, "SigninServiceException", 0, [], []];
  _s_registry.registerError(SigninServiceException$, SigninServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var AccessDeniedException$ = [
    -3,
    n0,
    _ADE,
    { [_e]: _c },
    [_e, _m],
    [0, 0],
    2
  ];
  n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
  var InternalServerException$ = [
    -3,
    n0,
    _ISE,
    { [_e]: _se, [_hE]: 500 },
    [_e, _m],
    [0, 0],
    2
  ];
  n0_registry.registerError(InternalServerException$, InternalServerException);
  var TooManyRequestsError$ = [
    -3,
    n0,
    _TMRE,
    { [_e]: _c, [_hE]: 429 },
    [_e, _m],
    [0, 0],
    2
  ];
  n0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);
  var ValidationException$ = [
    -3,
    n0,
    _VE,
    { [_e]: _c, [_hE]: 400 },
    [_e, _m],
    [0, 0],
    2
  ];
  n0_registry.registerError(ValidationException$, ValidationException);
  var errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var RefreshToken = [0, n0, _RT, 8, 0];
  var AccessToken$ = [
    3,
    n0,
    _AT,
    8,
    [_aKI, _sAK, _sT],
    [[0, { [_jN]: _aKI }], [0, { [_jN]: _sAK }], [0, { [_jN]: _sT }]],
    3
  ];
  var CreateOAuth2TokenRequest$ = [
    3,
    n0,
    _COATR,
    0,
    [_tI],
    [[() => CreateOAuth2TokenRequestBody$, 16]],
    1
  ];
  var CreateOAuth2TokenRequestBody$ = [
    3,
    n0,
    _COATRB,
    0,
    [_cI, _gT, _co, _rU, _cV, _rT],
    [[0, { [_jN]: _cI }], [0, { [_jN]: _gT }], 0, [0, { [_jN]: _rU }], [0, { [_jN]: _cV }], [() => RefreshToken, { [_jN]: _rT }]],
    2
  ];
  var CreateOAuth2TokenResponse$ = [
    3,
    n0,
    _COATRr,
    0,
    [_tO],
    [[() => CreateOAuth2TokenResponseBody$, 16]],
    1
  ];
  var CreateOAuth2TokenResponseBody$ = [
    3,
    n0,
    _COATRBr,
    0,
    [_aT, _tT, _eI, _rT, _iT],
    [[() => AccessToken$, { [_jN]: _aT }], [0, { [_jN]: _tT }], [1, { [_jN]: _eI }], [() => RefreshToken, { [_jN]: _rT }], [0, { [_jN]: _iT }]],
    4
  ];
  var CreateOAuth2Token$ = [
    9,
    n0,
    _COAT,
    { [_h]: ["POST", "/v1/token", 200] },
    () => CreateOAuth2TokenRequest$,
    () => CreateOAuth2TokenResponse$
  ];
  var getRuntimeConfig$1 = (config) => {
    return {
      apiVersion: "2023-01-01",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsRestJsonProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.signin",
        errorTypeRegistries,
        version: "2023-01-01",
        serviceTarget: "Signin"
      },
      serviceId: config?.serviceId ?? "Signin",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getRuntimeConfig$1(config);
    emitWarningIfUnsupportedVersion$1(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class SigninClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class CreateOAuth2TokenCommand extends Command.classBuilder().ep({
    ...commonParams,
    IsControlPlane: { type: "staticContextParams", value: false }
  }).m(function(Command2, cs, config, o2) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("Signin", "CreateOAuth2Token", {}).n("SigninClient", "CreateOAuth2TokenCommand").sc(CreateOAuth2Token$).build() {
  }
  var commands = {
    CreateOAuth2TokenCommand
  };

  class Signin extends SigninClient {
  }
  createAggregatedClient(commands, Signin);
  var OAuth2ErrorCode = {
    AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED",
    CONFLICT: "CONFLICT",
    INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS",
    INVALID_REQUEST: "INVALID_REQUEST",
    RESOURCE_NOT_FOUND: "RESOURCE_NOT_FOUND",
    SERVER_ERROR: "server_error",
    SERVICE_QUOTA_EXCEEDED: "SERVICE_QUOTA_EXCEEDED",
    TOKEN_EXPIRED: "TOKEN_EXPIRED",
    USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED"
  };
  exports.AccessDeniedException = AccessDeniedException;
  exports.AccessDeniedException$ = AccessDeniedException$;
  exports.AccessToken$ = AccessToken$;
  exports.CreateOAuth2Token$ = CreateOAuth2Token$;
  exports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;
  exports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$;
  exports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$;
  exports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$;
  exports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$;
  exports.InternalServerException = InternalServerException;
  exports.InternalServerException$ = InternalServerException$;
  exports.OAuth2ErrorCode = OAuth2ErrorCode;
  exports.Signin = Signin;
  exports.SigninClient = SigninClient;
  exports.SigninServiceException = SigninServiceException;
  exports.SigninServiceException$ = SigninServiceException$;
  exports.TooManyRequestsError = TooManyRequestsError;
  exports.TooManyRequestsError$ = TooManyRequestsError$;
  exports.ValidationException = ValidationException;
  exports.ValidationException$ = ValidationException$;
  exports.errorTypeRegistries = errorTypeRegistries;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-login@3.972.55/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js
var require_dist_cjs14 = __commonJS((exports) => {
  var { setCredentialFeature } = require_client4();
  var { CredentialsProviderError, readFile: readFile2, parseKnownFiles, getProfileName } = require_config2();
  var { HttpRequest } = require_protocols();
  var { createHash: createHash2, createPrivateKey, createPublicKey, sign } = __require("node:crypto");
  var { promises } = __require("node:fs");
  var { homedir } = __require("node:os");
  var { dirname: dirname3, join: join4 } = __require("node:path");

  class LoginCredentialsFetcher {
    profileData;
    init;
    callerClientConfig;
    static REFRESH_THRESHOLD = 5 * 60 * 1000;
    constructor(profileData, init4, callerClientConfig) {
      this.profileData = profileData;
      this.init = init4;
      this.callerClientConfig = callerClientConfig;
    }
    async loadCredentials() {
      const token = await this.loadToken();
      if (!token) {
        throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
      }
      const accessToken = token.accessToken;
      const now = Date.now();
      const expiryTime = new Date(accessToken.expiresAt).getTime();
      const timeUntilExpiry = expiryTime - now;
      if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {
        return this.refresh(token);
      }
      return {
        accessKeyId: accessToken.accessKeyId,
        secretAccessKey: accessToken.secretAccessKey,
        sessionToken: accessToken.sessionToken,
        accountId: accessToken.accountId,
        expiration: new Date(accessToken.expiresAt)
      };
    }
    get logger() {
      return this.init?.logger;
    }
    get loginSession() {
      return this.profileData.login_session;
    }
    async refresh(token) {
      const { SigninClient, CreateOAuth2TokenCommand } = require_signin();
      const { logger, userAgentAppId } = this.callerClientConfig ?? {};
      const isH2 = (requestHandler2) => {
        return requestHandler2?.metadata?.handlerProtocol === "h2";
      };
      const requestHandler = isH2(this.callerClientConfig?.requestHandler) ? undefined : this.callerClientConfig?.requestHandler;
      const region = this.profileData.region ?? await this.callerClientConfig?.region?.() ?? process.env.AWS_REGION;
      const client = new SigninClient({
        credentials: {
          accessKeyId: "",
          secretAccessKey: ""
        },
        region,
        requestHandler,
        logger,
        userAgentAppId,
        ...this.init?.clientConfig
      });
      this.createDPoPInterceptor(client.middlewareStack);
      const commandInput = {
        tokenInput: {
          clientId: token.clientId,
          refreshToken: token.refreshToken,
          grantType: "refresh_token"
        }
      };
      try {
        const response = await client.send(new CreateOAuth2TokenCommand(commandInput));
        const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
        const { refreshToken, expiresIn } = response.tokenOutput ?? {};
        if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
          throw new CredentialsProviderError("Token refresh response missing required fields", {
            logger: this.logger,
            tryNextLink: false
          });
        }
        const expiresInMs = (expiresIn ?? 900) * 1000;
        const expiration = new Date(Date.now() + expiresInMs);
        const updatedToken = {
          ...token,
          accessToken: {
            ...token.accessToken,
            accessKeyId,
            secretAccessKey,
            sessionToken,
            expiresAt: expiration.toISOString()
          },
          refreshToken
        };
        await this.saveToken(updatedToken);
        const newAccessToken = updatedToken.accessToken;
        return {
          accessKeyId: newAccessToken.accessKeyId,
          secretAccessKey: newAccessToken.secretAccessKey,
          sessionToken: newAccessToken.sessionToken,
          accountId: newAccessToken.accountId,
          expiration
        };
      } catch (error2) {
        if (error2.name === "AccessDeniedException") {
          const errorType = error2.error;
          let message;
          switch (errorType) {
            case "TOKEN_EXPIRED":
              message = "Your session has expired. Please reauthenticate.";
              break;
            case "USER_CREDENTIALS_CHANGED":
              message = "Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";
              break;
            case "INSUFFICIENT_PERMISSIONS":
              message = "Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";
              break;
            default:
              message = `Failed to refresh token: ${String(error2)}. Please re-authenticate using \`aws login\``;
          }
          throw new CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
        }
        throw new CredentialsProviderError(`Failed to refresh token: ${String(error2)}. Please re-authenticate using aws login`, { logger: this.logger });
      }
    }
    async loadToken() {
      const tokenFilePath = this.getTokenFilePath();
      try {
        let tokenData;
        try {
          tokenData = await readFile2(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
        } catch {
          tokenData = await promises.readFile(tokenFilePath, "utf8");
        }
        const token = JSON.parse(tokenData);
        const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]);
        if (!token.accessToken?.accountId) {
          missingFields.push("accountId");
        }
        if (missingFields.length > 0) {
          throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
            logger: this.logger,
            tryNextLink: false
          });
        }
        return token;
      } catch (error2) {
        throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error2)}`, {
          logger: this.logger,
          tryNextLink: false
        });
      }
    }
    async saveToken(token) {
      const tokenFilePath = this.getTokenFilePath();
      const directory = dirname3(tokenFilePath);
      try {
        await promises.mkdir(directory, { recursive: true });
      } catch (error2) {}
      await promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
    }
    getTokenFilePath() {
      const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join4(homedir(), ".aws", "login", "cache");
      const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
      const loginSessionSha256 = createHash2("sha256").update(loginSessionBytes).digest("hex");
      return join4(directory, `${loginSessionSha256}.json`);
    }
    derToRawSignature(derSignature) {
      let offset = 2;
      if (derSignature[offset] !== 2) {
        throw new Error("Invalid DER signature");
      }
      offset++;
      const rLength = derSignature[offset++];
      let r = derSignature.subarray(offset, offset + rLength);
      offset += rLength;
      if (derSignature[offset] !== 2) {
        throw new Error("Invalid DER signature");
      }
      offset++;
      const sLength = derSignature[offset++];
      let s = derSignature.subarray(offset, offset + sLength);
      r = r[0] === 0 ? r.subarray(1) : r;
      s = s[0] === 0 ? s.subarray(1) : s;
      const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);
      const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);
      return Buffer.concat([rPadded, sPadded]);
    }
    createDPoPInterceptor(middlewareStack) {
      middlewareStack.add((next) => async (args) => {
        if (HttpRequest.isInstance(args.request)) {
          const request2 = args.request;
          const actualEndpoint = `${request2.protocol}//${request2.hostname}${request2.port ? `:${request2.port}` : ""}${request2.path}`;
          const dpop = await this.generateDpop(request2.method, actualEndpoint);
          request2.headers = {
            ...request2.headers,
            DPoP: dpop
          };
        }
        return next(args);
      }, {
        step: "finalizeRequest",
        name: "dpopInterceptor",
        override: true
      });
    }
    async generateDpop(method = "POST", endpoint) {
      const token = await this.loadToken();
      try {
        const privateKey = createPrivateKey({
          key: token.dpopKey,
          format: "pem",
          type: "sec1"
        });
        const publicKey = createPublicKey(privateKey);
        const publicDer = publicKey.export({ format: "der", type: "spki" });
        let pointStart = -1;
        for (let i = 0;i < publicDer.length; i++) {
          if (publicDer[i] === 4) {
            pointStart = i;
            break;
          }
        }
        const x = publicDer.slice(pointStart + 1, pointStart + 33);
        const y = publicDer.slice(pointStart + 33, pointStart + 65);
        const header = {
          alg: "ES256",
          typ: "dpop+jwt",
          jwk: {
            kty: "EC",
            crv: "P-256",
            x: x.toString("base64url"),
            y: y.toString("base64url")
          }
        };
        const payload = {
          jti: crypto.randomUUID(),
          htm: method,
          htu: endpoint,
          iat: Math.floor(Date.now() / 1000)
        };
        const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url");
        const payloadB64 = Buffer.from(JSON.stringify(payload)).toString("base64url");
        const message = `${headerB64}.${payloadB64}`;
        const asn1Signature = sign("sha256", Buffer.from(message), privateKey);
        const rawSignature = this.derToRawSignature(asn1Signature);
        const signatureB64 = rawSignature.toString("base64url");
        return `${message}.${signatureB64}`;
      } catch (error2) {
        throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error2 instanceof Error ? error2.message : String(error2)}`, { logger: this.logger, tryNextLink: false });
      }
    }
  }
  var fromLoginCredentials = (init4) => async ({ callerClientConfig } = {}) => {
    init4?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
    const profiles = await parseKnownFiles(init4 || {});
    const profileName = getProfileName({
      profile: init4?.profile ?? callerClientConfig?.profile
    });
    const profile = profiles[profileName];
    if (!profile?.login_session) {
      throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
        tryNextLink: true,
        logger: init4?.logger
      });
    }
    const fetcher = new LoginCredentialsFetcher(profile, init4, callerClientConfig);
    const credentials = await fetcher.loadCredentials();
    return setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
  };
  exports.fromLoginCredentials = fromLoginCredentials;
});

// ../../node_modules/.pnpm/@aws-sdk+signature-v4-multi-region@3.996.35/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js
var require_dist_cjs15 = __commonJS((exports) => {
  var { SignatureV4, signatureV4aContainer } = require_dist_cjs6();
  var signatureV4CrtContainer = {
    CrtSignerV4: null
  };
  var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
  var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();

  class SignatureV4SignWithCredentials extends SignatureV4 {
    async signWithCredentials(requestToSign, credentials, options) {
      const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
      requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
      const privateAccess = this;
      setSingleOverride(privateAccess, credentialsWithoutSessionToken);
      return privateAccess.signRequest(requestToSign, options ?? {});
    }
    async presignWithCredentials(requestToSign, credentials, options) {
      const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
      delete requestToSign.headers[SESSION_TOKEN_HEADER];
      requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
      requestToSign.query = requestToSign.query ?? {};
      requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
      const privateAccess = this;
      setSingleOverride(privateAccess, credentialsWithoutSessionToken);
      return this.presign(requestToSign, options);
    }
  }
  function getCredentialsWithoutSessionToken(credentials) {
    return {
      accessKeyId: credentials.accessKeyId,
      secretAccessKey: credentials.secretAccessKey,
      expiration: credentials.expiration
    };
  }
  function setSingleOverride(privateAccess, credentialsWithoutSessionToken) {
    const currentCredentialProvider = privateAccess.credentialProvider;
    privateAccess.credentialProvider = () => {
      privateAccess.credentialProvider = currentCredentialProvider;
      return Promise.resolve(credentialsWithoutSessionToken);
    };
  }

  class SignatureV4MultiRegion {
    sigv4aSigner;
    sigv4Signer;
    signerOptions;
    static sigv4aDependency() {
      if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") {
        return "crt";
      } else if (typeof signatureV4aContainer.SignatureV4a === "function") {
        return "js";
      }
      return "none";
    }
    constructor(options) {
      this.sigv4Signer = new SignatureV4SignWithCredentials(options);
      this.signerOptions = options;
    }
    async sign(requestToSign, options = {}) {
      if (options.signingRegion === "*") {
        return this.getSigv4aSigner().sign(requestToSign, options);
      }
      return this.sigv4Signer.sign(requestToSign, options);
    }
    async signWithCredentials(requestToSign, credentials, options = {}) {
      if (options.signingRegion === "*") {
        const signer = this.getSigv4aSigner();
        const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
        if (CrtSignerV4 && signer instanceof CrtSignerV4) {
          return signer.signWithCredentials(requestToSign, credentials, options);
        } else {
          throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` + `Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. ` + `You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` + `or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. ` + `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
        }
      }
      return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
    }
    async presign(originalRequest, options = {}) {
      if (options.signingRegion === "*") {
        const signer = this.getSigv4aSigner();
        const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
        if (CrtSignerV4 && signer instanceof CrtSignerV4) {
          return signer.presign(originalRequest, options);
        } else {
          throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` + `Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. ` + `You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` + `or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. ` + `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
        }
      }
      return this.sigv4Signer.presign(originalRequest, options);
    }
    async presignWithCredentials(originalRequest, credentials, options = {}) {
      if (options.signingRegion === "*") {
        throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
      }
      return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
    }
    getSigv4aSigner() {
      if (!this.sigv4aSigner) {
        const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
        const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;
        if (this.signerOptions.runtime === "node") {
          if (!CrtSignerV4 && !JsSigV4aSigner) {
            throw new Error("Neither CRT nor JS SigV4a implementation is available. " + "Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. " + "For more information please go to " + "https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
          }
          if (CrtSignerV4 && typeof CrtSignerV4 === "function") {
            this.sigv4aSigner = new CrtSignerV4({
              ...this.signerOptions,
              signingAlgorithm: 1
            });
          } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") {
            this.sigv4aSigner = new JsSigV4aSigner({
              ...this.signerOptions
            });
          } else {
            throw new Error("Available SigV4a implementation is not a valid constructor. " + "Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a." + "For more information please go to " + "https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
          }
        } else {
          if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") {
            throw new Error("JS SigV4a implementation is not available or not a valid constructor. " + "Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. " + "You must also register the package by calling [require('@aws-sdk/signature-v4a');] " + "or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. " + "For more information please go to " + "https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");
          }
          this.sigv4aSigner = new JsSigV4aSigner({
            ...this.signerOptions
          });
        }
      }
      return this.sigv4aSigner;
    }
  }
  exports.SignatureV4MultiRegion = SignatureV4MultiRegion;
  exports.SignatureV4SignWithCredentials = SignatureV4SignWithCredentials;
  exports.signatureV4CrtContainer = signatureV4CrtContainer;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.23/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js
var require_sts = __commonJS((exports) => {
  var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, setCredentialFeature, stsRegionDefaultResolver } = require_client4();
  var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs5();
  var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config2();
  var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveParams, resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { parseUrl: parseUrl2, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry();
  var { TypeRegistry, getSchemaSerdePlugin } = require_schema();
  var { resolveAwsSdkSigV4Config, resolveAwsSdkSigV4AConfig, AwsSdkSigV4Signer, AwsSdkSigV4ASigner, NODE_SIGV4A_CONFIG_OPTIONS, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { SignatureV4MultiRegion } = require_dist_cjs15();
  var { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require_serde();
  var { streamCollector, NodeHttpHandler } = require_dist_cjs9();
  var { AwsQueryProtocol } = require_protocols2();
  var q = "ref";
  var a = -1;
  var b = true;
  var c = "isSet";
  var d = "PartitionResult";
  var e = "booleanEquals";
  var f = "stringEquals";
  var g = "getAttr";
  var h = "us-east-1";
  var i = "sigv4";
  var j = "sts";
  var k = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
  var l = { [q]: "Endpoint" };
  var m = { [q]: "Region" };
  var n = { [q]: d };
  var o = {};
  var p = [m];
  var _data = {
    conditions: [
      [c, [l]],
      [c, p],
      ["aws.partition", p, d],
      [e, [{ [q]: "UseFIPS" }, b]],
      [e, [{ [q]: "UseDualStack" }, b]],
      [f, [m, "aws-global"]],
      [e, [{ [q]: "UseGlobalEndpoint" }, b]],
      [f, [m, "eu-central-1"]],
      [e, [{ fn: g, argv: [n, "supportsDualStack"] }, b]],
      [e, [{ fn: g, argv: [n, "supportsFIPS"] }, b]],
      [f, [m, "ap-south-1"]],
      [f, [m, "eu-north-1"]],
      [f, [m, "eu-west-1"]],
      [f, [m, "eu-west-2"]],
      [f, [m, "eu-west-3"]],
      [f, [m, "sa-east-1"]],
      [f, [m, h]],
      [f, [m, "us-east-2"]],
      [f, [m, "us-west-2"]],
      [f, [m, "us-west-1"]],
      [f, [m, "ca-central-1"]],
      [f, [m, "ap-southeast-1"]],
      [f, [m, "ap-northeast-1"]],
      [f, [m, "ap-southeast-2"]],
      [f, [{ fn: g, argv: [n, "name"] }, "aws-us-gov"]]
    ],
    results: [
      [a],
      ["https://sts.amazonaws.com", { authSchemes: [{ name: i, signingName: j, signingRegion: h }] }],
      [k, { authSchemes: [{ name: i, signingName: j, signingRegion: "{Region}" }] }],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [l, o],
      ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://sts.{Region}.amazonaws.com", o],
      ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      [k, o],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    30,
    3,
    1,
    4,
    r + 14,
    2,
    5,
    r + 14,
    3,
    25,
    6,
    4,
    24,
    7,
    5,
    r + 1,
    8,
    6,
    9,
    r + 13,
    7,
    r + 1,
    10,
    10,
    r + 1,
    11,
    11,
    r + 1,
    12,
    12,
    r + 1,
    13,
    13,
    r + 1,
    14,
    14,
    r + 1,
    15,
    15,
    r + 1,
    16,
    16,
    r + 1,
    17,
    17,
    r + 1,
    18,
    18,
    r + 1,
    19,
    19,
    r + 1,
    20,
    20,
    r + 1,
    21,
    21,
    r + 1,
    22,
    22,
    r + 1,
    23,
    23,
    r + 1,
    r + 2,
    8,
    r + 11,
    r + 12,
    4,
    28,
    26,
    9,
    27,
    r + 10,
    24,
    r + 8,
    r + 9,
    8,
    29,
    r + 7,
    9,
    r + 6,
    r + 7,
    3,
    r + 3,
    31,
    4,
    r + 4,
    r + 5
  ]);
  var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
  });
  var defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
  var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context10, input) => {
    if (!input) {
      throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
    }
    const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context10, input);
    const instructionsFn = getSmithyContext(context10)?.commandInstance?.constructor?.getEndpointParameterInstructions;
    if (!instructionsFn) {
      throw new Error(`getEndpointParameterInstructions() is not defined on '${context10.commandName}'`);
    }
    const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
    return Object.assign(defaultParameters, endpointParameters);
  };
  var _defaultSTSHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  var defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "sts",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createAwsAuthSigv4aHttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4a",
      signingProperties: {
        name: "sts",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createSmithyApiNoAuthHttpAuthOption(authParameters) {
    return {
      schemeId: "smithy.api#noAuth"
    };
  }
  var createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver2, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
    const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
      const endpoint = defaultEndpointResolver2(authParameters);
      const authSchemes = endpoint.properties?.authSchemes;
      if (!authSchemes) {
        return defaultHttpAuthSchemeResolver(authParameters);
      }
      const options = [];
      for (const scheme of authSchemes) {
        const { name: resolvedName, properties = {}, ...rest } = scheme;
        const name = resolvedName.toLowerCase();
        if (resolvedName !== name) {
          console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
        }
        let schemeId;
        if (name === "sigv4a") {
          schemeId = "aws.auth#sigv4a";
          const sigv4Present = authSchemes.find((s) => {
            const name2 = s.name.toLowerCase();
            return name2 !== "sigv4a" && name2.startsWith("sigv4");
          });
          if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
            continue;
          }
        } else if (name.startsWith("sigv4")) {
          schemeId = "aws.auth#sigv4";
        } else {
          throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
        }
        const createOption = createHttpAuthOptionFunctions[schemeId];
        if (!createOption) {
          throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
        }
        const option = createOption(authParameters);
        option.schemeId = schemeId;
        option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties };
        options.push(option);
      }
      return options;
    };
    return endpointRuleSetHttpAuthSchemeProvider;
  };
  var _defaultSTSHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      case "AssumeRoleWithWebIdentity": {
        options.push(createSmithyApiNoAuthHttpAuthOption());
        options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
        break;
      }
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
        options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
      }
    }
    return options;
  };
  var defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {
    "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
    "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
    "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption
  });
  var resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    const config_1 = resolveAwsSdkSigV4AConfig(config_0);
    return Object.assign(config_1, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      useGlobalEndpoint: options.useGlobalEndpoint ?? false,
      defaultSigningName: "sts"
    });
  };
  var commonParams = {
    UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var version3 = "3.997.22";
  var packageInfo = {
    version: version3
  };

  class STSServiceException extends ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, STSServiceException.prototype);
    }
  }

  class ExpiredTokenException extends STSServiceException {
    name = "ExpiredTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ExpiredTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExpiredTokenException.prototype);
    }
  }

  class MalformedPolicyDocumentException extends STSServiceException {
    name = "MalformedPolicyDocumentException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MalformedPolicyDocumentException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
    }
  }

  class PackedPolicyTooLargeException extends STSServiceException {
    name = "PackedPolicyTooLargeException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "PackedPolicyTooLargeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
    }
  }

  class RegionDisabledException extends STSServiceException {
    name = "RegionDisabledException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "RegionDisabledException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RegionDisabledException.prototype);
    }
  }

  class IDPRejectedClaimException extends STSServiceException {
    name = "IDPRejectedClaimException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "IDPRejectedClaimException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
    }
  }

  class InvalidIdentityTokenException extends STSServiceException {
    name = "InvalidIdentityTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidIdentityTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
    }
  }

  class IDPCommunicationErrorException extends STSServiceException {
    name = "IDPCommunicationErrorException";
    $fault = "client";
    $retryable = {};
    constructor(opts) {
      super({
        name: "IDPCommunicationErrorException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
    }
  }
  var _A = "Arn";
  var _AKI = "AccessKeyId";
  var _AR = "AssumeRole";
  var _ARI = "AssumedRoleId";
  var _ARR = "AssumeRoleRequest";
  var _ARRs = "AssumeRoleResponse";
  var _ARU = "AssumedRoleUser";
  var _ARWWI = "AssumeRoleWithWebIdentity";
  var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
  var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
  var _Au = "Audience";
  var _C = "Credentials";
  var _CA = "ContextAssertion";
  var _DS = "DurationSeconds";
  var _E = "Expiration";
  var _EI = "ExternalId";
  var _ETE = "ExpiredTokenException";
  var _IDPCEE = "IDPCommunicationErrorException";
  var _IDPRCE = "IDPRejectedClaimException";
  var _IITE = "InvalidIdentityTokenException";
  var _K = "Key";
  var _MPDE = "MalformedPolicyDocumentException";
  var _P = "Policy";
  var _PA = "PolicyArns";
  var _PAr = "ProviderArn";
  var _PC = "ProvidedContexts";
  var _PCLT = "ProvidedContextsListType";
  var _PCr = "ProvidedContext";
  var _PDT = "PolicyDescriptorType";
  var _PI = "ProviderId";
  var _PPS = "PackedPolicySize";
  var _PPTLE = "PackedPolicyTooLargeException";
  var _Pr = "Provider";
  var _RA = "RoleArn";
  var _RDE = "RegionDisabledException";
  var _RSN = "RoleSessionName";
  var _SAK = "SecretAccessKey";
  var _SFWIT = "SubjectFromWebIdentityToken";
  var _SI = "SourceIdentity";
  var _SN = "SerialNumber";
  var _ST = "SessionToken";
  var _T = "Tags";
  var _TC = "TokenCode";
  var _TTK = "TransitiveTagKeys";
  var _Ta = "Tag";
  var _V = "Value";
  var _WIT = "WebIdentityToken";
  var _a = "arn";
  var _aKST = "accessKeySecretType";
  var _aQE = "awsQueryError";
  var _c = "client";
  var _cTT = "clientTokenType";
  var _e = "error";
  var _hE = "httpError";
  var _m = "message";
  var _pDLT = "policyDescriptorListType";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
  var _tLT = "tagListType";
  var n0 = "com.amazonaws.sts";
  var _s_registry = TypeRegistry.for(_s);
  var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
  _s_registry.registerError(STSServiceException$, STSServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var ExpiredTokenException$ = [
    -3,
    n0,
    _ETE,
    { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
  var IDPCommunicationErrorException$ = [
    -3,
    n0,
    _IDPCEE,
    { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
  var IDPRejectedClaimException$ = [
    -3,
    n0,
    _IDPRCE,
    { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
  var InvalidIdentityTokenException$ = [
    -3,
    n0,
    _IITE,
    { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
  var MalformedPolicyDocumentException$ = [
    -3,
    n0,
    _MPDE,
    { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
  var PackedPolicyTooLargeException$ = [
    -3,
    n0,
    _PPTLE,
    { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
  var RegionDisabledException$ = [
    -3,
    n0,
    _RDE,
    { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  n0_registry.registerError(RegionDisabledException$, RegionDisabledException);
  var errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var accessKeySecretType = [0, n0, _aKST, 8, 0];
  var clientTokenType = [0, n0, _cTT, 8, 0];
  var AssumedRoleUser$ = [
    3,
    n0,
    _ARU,
    0,
    [_ARI, _A],
    [0, 0],
    2
  ];
  var AssumeRoleRequest$ = [
    3,
    n0,
    _ARR,
    0,
    [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
    [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
    2
  ];
  var AssumeRoleResponse$ = [
    3,
    n0,
    _ARRs,
    0,
    [_C, _ARU, _PPS, _SI],
    [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
  ];
  var AssumeRoleWithWebIdentityRequest$ = [
    3,
    n0,
    _ARWWIR,
    0,
    [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
    [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
    3
  ];
  var AssumeRoleWithWebIdentityResponse$ = [
    3,
    n0,
    _ARWWIRs,
    0,
    [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
    [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
  ];
  var Credentials$ = [
    3,
    n0,
    _C,
    0,
    [_AKI, _SAK, _ST, _E],
    [0, [() => accessKeySecretType, 0], 0, 4],
    4
  ];
  var PolicyDescriptorType$ = [
    3,
    n0,
    _PDT,
    0,
    [_a],
    [0]
  ];
  var ProvidedContext$ = [
    3,
    n0,
    _PCr,
    0,
    [_PAr, _CA],
    [0, 0]
  ];
  var Tag$ = [
    3,
    n0,
    _Ta,
    0,
    [_K, _V],
    [0, 0],
    2
  ];
  var policyDescriptorListType = [
    1,
    n0,
    _pDLT,
    0,
    () => PolicyDescriptorType$
  ];
  var ProvidedContextsListType = [
    1,
    n0,
    _PCLT,
    0,
    () => ProvidedContext$
  ];
  var tagListType = [
    1,
    n0,
    _tLT,
    0,
    () => Tag$
  ];
  var AssumeRole$ = [
    9,
    n0,
    _AR,
    0,
    () => AssumeRoleRequest$,
    () => AssumeRoleResponse$
  ];
  var AssumeRoleWithWebIdentity$ = [
    9,
    n0,
    _ARWWI,
    0,
    () => AssumeRoleWithWebIdentityRequest$,
    () => AssumeRoleWithWebIdentityResponse$
  ];
  var getRuntimeConfig$1 = (config) => {
    return {
      apiVersion: "2011-06-15",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "aws.auth#sigv4a",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
          signer: new AwsSdkSigV4ASigner
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsQueryProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.sts",
        errorTypeRegistries,
        xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
        version: "2011-06-15",
        serviceTarget: "AWSSecurityTokenServiceV20110615"
      },
      serviceId: config?.serviceId ?? "STS",
      signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getRuntimeConfig$1(config);
    emitWarningIfUnsupportedVersion$1(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "aws.auth#sigv4a",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
          signer: new AwsSdkSigV4ASigner
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class STSClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials,
          "aws.auth#sigv4a": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class AssumeRoleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {
  }

  class AssumeRoleWithWebIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {
  }
  var commands = {
    AssumeRoleCommand,
    AssumeRoleWithWebIdentityCommand
  };

  class STS extends STSClient {
  }
  createAggregatedClient(commands, STS);
  var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
    if (typeof assumedRoleUser?.Arn === "string") {
      const arnComponents = assumedRoleUser.Arn.split(":");
      if (arnComponents.length > 4 && arnComponents[4] !== "") {
        return arnComponents[4];
      }
    }
    return;
  };
  var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
    const region = typeof _region === "function" ? await _region() : _region;
    const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
    let stsDefaultRegion = "";
    const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
    credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
    return resolvedRegion;
  };
  var getDefaultRoleAssumer$1 = (stsOptions, STSClient2) => {
    let stsClient;
    let closureSourceCreds;
    return async (sourceCreds, params) => {
      closureSourceCreds = sourceCreds;
      if (!stsClient) {
        const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
        const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
          logger,
          profile
        });
        const isCompatibleRequestHandler = !isH2(requestHandler);
        stsClient = new STSClient2({
          ...stsOptions,
          userAgentAppId,
          profile,
          credentialDefaultProvider: () => async () => closureSourceCreds,
          region: resolvedRegion,
          requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
          logger
        });
      }
      const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
      if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
        throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
      }
      const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
      const credentials = {
        accessKeyId: Credentials.AccessKeyId,
        secretAccessKey: Credentials.SecretAccessKey,
        sessionToken: Credentials.SessionToken,
        expiration: Credentials.Expiration,
        ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
        ...accountId && { accountId }
      };
      setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
      return credentials;
    };
  };
  var getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient2) => {
    let stsClient;
    return async (params) => {
      if (!stsClient) {
        const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
        const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
          logger,
          profile
        });
        const isCompatibleRequestHandler = !isH2(requestHandler);
        stsClient = new STSClient2({
          ...stsOptions,
          userAgentAppId,
          profile,
          region: resolvedRegion,
          requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
          logger
        });
      }
      const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
      if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
        throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
      }
      const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
      const credentials = {
        accessKeyId: Credentials.AccessKeyId,
        secretAccessKey: Credentials.SecretAccessKey,
        sessionToken: Credentials.SessionToken,
        expiration: Credentials.Expiration,
        ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
        ...accountId && { accountId }
      };
      if (accountId) {
        setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
      }
      setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
      return credentials;
    };
  };
  var isH2 = (requestHandler) => {
    return requestHandler?.metadata?.handlerProtocol === "h2";
  };
  var getCustomizableStsClientCtor = (baseCtor, customizations) => {
    if (!customizations)
      return baseCtor;
    else
      return class CustomizableSTSClient extends baseCtor {
        constructor(config) {
          super(config);
          for (const customization of customizations) {
            this.middlewareStack.use(customization);
          }
        }
      };
  };
  var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
  var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
  var decorateDefaultCredentialProvider = (provider) => (input) => provider({
    roleAssumer: getDefaultRoleAssumer(input),
    roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
    ...input
  });
  exports.AssumeRole$ = AssumeRole$;
  exports.AssumeRoleCommand = AssumeRoleCommand;
  exports.AssumeRoleRequest$ = AssumeRoleRequest$;
  exports.AssumeRoleResponse$ = AssumeRoleResponse$;
  exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$;
  exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
  exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
  exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
  exports.AssumedRoleUser$ = AssumedRoleUser$;
  exports.Credentials$ = Credentials$;
  exports.ExpiredTokenException = ExpiredTokenException;
  exports.ExpiredTokenException$ = ExpiredTokenException$;
  exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
  exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
  exports.IDPRejectedClaimException = IDPRejectedClaimException;
  exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
  exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
  exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
  exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
  exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
  exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
  exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
  exports.PolicyDescriptorType$ = PolicyDescriptorType$;
  exports.ProvidedContext$ = ProvidedContext$;
  exports.RegionDisabledException = RegionDisabledException;
  exports.RegionDisabledException$ = RegionDisabledException$;
  exports.STS = STS;
  exports.STSClient = STSClient;
  exports.STSServiceException = STSServiceException;
  exports.STSServiceException$ = STSServiceException$;
  exports.Tag$ = Tag$;
  exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
  exports.errorTypeRegistries = errorTypeRegistries;
  exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
  exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.972.49/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
var require_dist_cjs16 = __commonJS((exports) => {
  var { externalDataInterceptor, CredentialsProviderError, parseKnownFiles, getProfileName } = require_config2();
  var { exec } = __require("node:child_process");
  var { promisify: promisify2 } = __require("node:util");
  var { setCredentialFeature } = require_client4();
  var getValidatedProcessCredentials = (profileName, data, profiles) => {
    if (data.Version !== 1) {
      throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
    }
    if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {
      throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
    }
    if (data.Expiration) {
      const currentTime = new Date;
      const expireTime = new Date(data.Expiration);
      if (expireTime < currentTime) {
        throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
      }
    }
    let accountId = data.AccountId;
    if (!accountId && profiles?.[profileName]?.aws_account_id) {
      accountId = profiles[profileName].aws_account_id;
    }
    const credentials = {
      accessKeyId: data.AccessKeyId,
      secretAccessKey: data.SecretAccessKey,
      ...data.SessionToken && { sessionToken: data.SessionToken },
      ...data.Expiration && { expiration: new Date(data.Expiration) },
      ...data.CredentialScope && { credentialScope: data.CredentialScope },
      ...accountId && { accountId }
    };
    setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
    return credentials;
  };
  var resolveProcessCredentials = async (profileName, profiles, logger) => {
    const profile = profiles[profileName];
    if (profiles[profileName]) {
      const credentialProcess = profile["credential_process"];
      if (credentialProcess !== undefined) {
        const execPromise = promisify2(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);
        try {
          const { stdout } = await execPromise(credentialProcess);
          let data;
          try {
            data = JSON.parse(stdout.trim());
          } catch {
            throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
          }
          return getValidatedProcessCredentials(profileName, data, profiles);
        } catch (error2) {
          throw new CredentialsProviderError(error2.message, { logger });
        }
      } else {
        throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
      }
    } else {
      throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
        logger
      });
    }
  };
  var fromProcess = (init4 = {}) => async ({ callerClientConfig } = {}) => {
    init4.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
    const profiles = await parseKnownFiles(init4);
    return resolveProcessCredentials(getProfileName({
      profile: init4.profile ?? callerClientConfig?.profile
    }), profiles, init4.logger);
  };
  exports.fromProcess = fromProcess;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.972.55/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js
var require_fromWebToken = __commonJS((exports) => {
  exports.fromWebToken = (init4) => async (awsIdentityProperties) => {
    init4.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
    const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init4;
    let { roleAssumerWithWebIdentity } = init4;
    if (!roleAssumerWithWebIdentity) {
      const { getDefaultRoleAssumerWithWebIdentity } = require_sts();
      roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
        ...init4.clientConfig,
        credentialProviderLogger: init4.logger,
        parentClientConfig: {
          ...awsIdentityProperties?.callerClientConfig,
          ...init4.parentClientConfig
        }
      }, init4.clientPlugins);
    }
    return roleAssumerWithWebIdentity({
      RoleArn: roleArn,
      RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
      WebIdentityToken: webIdentityToken,
      ProviderId: providerId,
      PolicyArns: policyArns,
      Policy: policy,
      DurationSeconds: durationSeconds
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.972.55/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js
var require_fromTokenFile = __commonJS((exports) => {
  var { setCredentialFeature } = require_client4();
  var { CredentialsProviderError, externalDataInterceptor } = require_config2();
  var { readFileSync: readFileSync2 } = __require("node:fs");
  var { fromWebToken } = require_fromWebToken();
  var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
  var ENV_ROLE_ARN = "AWS_ROLE_ARN";
  var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
  exports.fromTokenFile = (init4 = {}) => async (awsIdentityProperties) => {
    init4.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
    const webIdentityTokenFile = init4?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
    const roleArn = init4?.roleArn ?? process.env[ENV_ROLE_ARN];
    const roleSessionName = init4?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
    if (!webIdentityTokenFile || !roleArn) {
      throw new CredentialsProviderError("Web identity configuration not specified", {
        logger: init4.logger
      });
    }
    const credentials = await fromWebToken({
      ...init4,
      webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? readFileSync2(webIdentityTokenFile, { encoding: "ascii" }),
      roleArn,
      roleSessionName
    })(awsIdentityProperties);
    if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
      setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
    }
    return credentials;
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.972.55/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js
var require_dist_cjs17 = __commonJS((exports) => {
  var __exportStar = (m, e) => {
    Object.assign(e, m);
  };
  __exportStar(require_fromTokenFile(), exports);
  __exportStar(require_fromWebToken(), exports);
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.972.56/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
var require_dist_cjs18 = __commonJS((exports) => {
  var { CredentialsProviderError, chain, getProfileName, parseKnownFiles } = require_config2();
  var { setCredentialFeature } = require_client4();
  var { fromLoginCredentials } = require_dist_cjs14();
  var resolveCredentialSource = (credentialSource, profileName, logger) => {
    const sourceProvidersMap = {
      EcsContainer: async (options) => {
        const { fromHttp } = require_dist_cjs10();
        const { fromContainerMetadata } = require_dist_cjs8();
        logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
        return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
      },
      Ec2InstanceMetadata: async (options) => {
        logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
        const { fromInstanceMetadata } = require_dist_cjs8();
        return async () => fromInstanceMetadata(options)().then(setNamedProvider);
      },
      Environment: async (options) => {
        logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
        const { fromEnv } = require_dist_cjs7();
        return async () => fromEnv(options)().then(setNamedProvider);
      }
    };
    if (credentialSource in sourceProvidersMap) {
      return sourceProvidersMap[credentialSource];
    } else {
      throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` + `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
    }
  };
  var setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
  var isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
    return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
  };
  var isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
    const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
    if (withSourceProfile) {
      logger?.debug?.(`    ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
    }
    return withSourceProfile;
  };
  var isCredentialSourceProfile = (arg, { profile, logger }) => {
    const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
    if (withProviderProfile) {
      logger?.debug?.(`    ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
    }
    return withProviderProfile;
  };
  var resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData2) => {
    options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
    const profileData = profiles[profileName];
    const { source_profile, region } = profileData;
    if (!options.roleAssumer) {
      const { getDefaultRoleAssumer } = require_sts();
      options.roleAssumer = getDefaultRoleAssumer({
        ...options.clientConfig,
        credentialProviderLogger: options.logger,
        parentClientConfig: {
          ...callerClientConfig,
          ...options?.parentClientConfig,
          region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region
        }
      }, options.clientPlugins);
    }
    if (source_profile && source_profile in visitedProfiles) {
      throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` + ` ${getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
    }
    options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
    const sourceCredsProvider = source_profile ? resolveProfileData2(source_profile, profiles, options, callerClientConfig, {
      ...visitedProfiles,
      [source_profile]: true
    }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
    if (isCredentialSourceWithoutRoleArn(profileData)) {
      return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
    } else {
      const params = {
        RoleArn: profileData.role_arn,
        RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
        ExternalId: profileData.external_id,
        DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
      };
      const { mfa_serial } = profileData;
      if (mfa_serial) {
        if (!options.mfaCodeProvider) {
          throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
        }
        params.SerialNumber = mfa_serial;
        params.TokenCode = await options.mfaCodeProvider(mfa_serial);
      }
      const sourceCreds = await sourceCredsProvider;
      return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
    }
  };
  var isCredentialSourceWithoutRoleArn = (section) => {
    return !section.role_arn && !!section.credential_source;
  };
  var isLoginProfile = (data) => {
    return Boolean(data && data.login_session);
  };
  var resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
    const credentials = await fromLoginCredentials({
      ...options,
      profile: profileName
    })({ callerClientConfig });
    return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
  };
  var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
  var resolveProcessCredentials = async (options, profile) => {
    const { fromProcess } = require_dist_cjs16();
    const credentials = await fromProcess({
      ...options,
      profile
    })();
    return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
  };
  var resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
    const { fromSSO } = require_dist_cjs13();
    return fromSSO({
      profile,
      logger: options.logger,
      parentClientConfig: options.parentClientConfig,
      clientConfig: options.clientConfig
    })({
      callerClientConfig
    }).then((creds) => {
      if (profileData.sso_session) {
        return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
      } else {
        return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
      }
    });
  };
  var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
  var isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
  var resolveStaticCredentials = async (profile, options) => {
    options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
    const credentials = {
      accessKeyId: profile.aws_access_key_id,
      secretAccessKey: profile.aws_secret_access_key,
      sessionToken: profile.aws_session_token,
      ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
      ...profile.aws_account_id && { accountId: profile.aws_account_id }
    };
    return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
  };
  var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
  var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
    const { fromTokenFile } = require_dist_cjs17();
    const credentials = await fromTokenFile({
      webIdentityTokenFile: profile.web_identity_token_file,
      roleArn: profile.role_arn,
      roleSessionName: profile.role_session_name,
      roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
      logger: options.logger,
      parentClientConfig: options.parentClientConfig
    })({
      callerClientConfig
    });
    return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
  };
  var resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
    const data = profiles[profileName];
    if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
      return resolveStaticCredentials(data, options);
    }
    if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
      return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
    }
    if (isStaticCredsProfile(data)) {
      return resolveStaticCredentials(data, options);
    }
    if (isWebIdentityProfile(data)) {
      return resolveWebIdentityCredentials(data, options, callerClientConfig);
    }
    if (isProcessProfile(data)) {
      return resolveProcessCredentials(options, profileName);
    }
    if (isSsoProfile(data)) {
      return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
    }
    if (isLoginProfile(data)) {
      return resolveLoginCredentials(profileName, options, callerClientConfig);
    }
    throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
  };
  var fromIni = (init4 = {}) => async ({ callerClientConfig } = {}) => {
    init4.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
    const profiles = await parseKnownFiles(init4);
    return resolveProfileData(getProfileName({
      profile: init4.profile ?? callerClientConfig?.profile
    }), profiles, init4, callerClientConfig);
  };
  exports.fromIni = fromIni;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.972.58/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
var require_dist_cjs19 = __commonJS((exports) => {
  var { ENV_KEY, ENV_SECRET, fromEnv } = require_dist_cjs7();
  var { chain, CredentialsProviderError, ENV_PROFILE } = require_config2();
  var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
  var remoteProvider = async (init4) => {
    const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = require_dist_cjs8();
    if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
      init4.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
      const { fromHttp } = require_dist_cjs10();
      return chain(fromHttp(init4), fromContainerMetadata(init4));
    }
    if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
      return async () => {
        throw new CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init4.logger });
      };
    }
    init4.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");
    return fromInstanceMetadata(init4);
  };
  function memoizeChain(providers, treatAsExpired) {
    const chain2 = internalCreateChain(providers);
    let activeLock;
    let passiveLock;
    let credentials;
    let forceRefreshLock;
    const provider = async (options) => {
      if (options?.forceRefresh) {
        if (!forceRefreshLock) {
          forceRefreshLock = chain2(options).then((c) => {
            credentials = c;
          }).finally(() => {
            forceRefreshLock = undefined;
          });
        }
        await forceRefreshLock;
        return credentials;
      }
      if (credentials?.expiration) {
        if (credentials?.expiration?.getTime() < Date.now()) {
          credentials = undefined;
        }
      }
      if (activeLock) {
        await activeLock;
      } else if (!credentials || treatAsExpired?.(credentials)) {
        if (credentials) {
          if (!passiveLock) {
            passiveLock = chain2(options).then((c) => {
              credentials = c;
            }).finally(() => {
              passiveLock = undefined;
            });
          }
        } else {
          activeLock = chain2(options).then((c) => {
            credentials = c;
          }).finally(() => {
            activeLock = undefined;
          });
          return provider(options);
        }
      }
      return credentials;
    };
    return provider;
  }
  var internalCreateChain = (providers) => async (awsIdentityProperties) => {
    let lastProviderError;
    for (const provider of providers) {
      try {
        return await provider(awsIdentityProperties);
      } catch (err) {
        lastProviderError = err;
        if (err?.tryNextLink) {
          continue;
        }
        throw err;
      }
    }
    throw lastProviderError;
  };
  var multipleCredentialSourceWarningEmitted = false;
  var defaultProvider = (init4 = {}) => memoizeChain([
    async () => {
      const profile = init4.profile ?? process.env[ENV_PROFILE];
      if (profile) {
        const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];
        if (envStaticCredentialsAreSet) {
          if (!multipleCredentialSourceWarningEmitted) {
            const warnFn = init4.logger?.warn && init4.logger?.constructor?.name !== "NoOpLogger" ? init4.logger.warn.bind(init4.logger) : console.warn;
            warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
    Multiple credential sources detected: 
    Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
    This SDK will proceed with the AWS_PROFILE value.
    
    However, a future version may change this behavior to prefer the ENV static credentials.
    Please ensure that your environment only sets either the AWS_PROFILE or the
    AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
`);
            multipleCredentialSourceWarningEmitted = true;
          }
        }
        throw new CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
          logger: init4.logger,
          tryNextLink: true
        });
      }
      init4.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
      return fromEnv(init4)();
    },
    async (awsIdentityProperties) => {
      init4.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
      const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init4;
      if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
        throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init4.logger });
      }
      const { fromSSO } = require_dist_cjs13();
      return fromSSO(init4)(awsIdentityProperties);
    },
    async (awsIdentityProperties) => {
      init4.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
      const { fromIni } = require_dist_cjs18();
      return fromIni(init4)(awsIdentityProperties);
    },
    async (awsIdentityProperties) => {
      init4.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
      const { fromProcess } = require_dist_cjs16();
      return fromProcess(init4)(awsIdentityProperties);
    },
    async (awsIdentityProperties) => {
      init4.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
      const { fromTokenFile } = require_dist_cjs17();
      return fromTokenFile(init4)(awsIdentityProperties);
    },
    async () => {
      init4.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
      return (await remoteProvider(init4))();
    },
    async () => {
      throw new CredentialsProviderError("Could not load credentials from any providers", {
        tryNextLink: false,
        logger: init4.logger
      });
    }
  ], credentialsTreatedAsExpired);
  var credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;
  var credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;
  exports.credentialsTreatedAsExpired = credentialsTreatedAsExpired;
  exports.credentialsWillNeedRefresh = credentialsWillNeedRefresh;
  exports.defaultProvider = defaultProvider;
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/endpoint/bdd.js
var require_bdd = __commonJS((exports) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var k = "ref";
  var a = -1;
  var b = true;
  var c = "isSet";
  var d = "PartitionResult";
  var e = "booleanEquals";
  var f = "getAttr";
  var g = { [k]: "Endpoint" };
  var h = { [k]: d };
  var i = {};
  var j = [{ [k]: "Region" }];
  var _data = {
    conditions: [
      [c, [g]],
      [c, j],
      ["aws.partition", j, d],
      [e, [{ [k]: "UseFIPS" }, b]],
      [e, [{ [k]: "UseDualStack" }, b]],
      [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
      [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]]
    ],
    results: [
      [a],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [g, i],
      ["https://scheduler-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://scheduler-fips.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://scheduler.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://scheduler.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    12,
    3,
    1,
    4,
    r + 11,
    2,
    5,
    r + 11,
    3,
    8,
    6,
    4,
    7,
    r + 10,
    5,
    r + 8,
    r + 9,
    4,
    10,
    9,
    6,
    r + 6,
    r + 7,
    5,
    11,
    r + 5,
    6,
    r + 4,
    r + 5,
    3,
    r + 1,
    13,
    4,
    r + 2,
    r + 3
  ]);
  exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver = __commonJS((exports) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd();
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  exports.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/models/SchedulerServiceException.js
var require_SchedulerServiceException = __commonJS((exports) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports.__ServiceException = __ServiceException;
  exports.SchedulerServiceException = class SchedulerServiceException extends __ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, SchedulerServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/models/errors.js
var require_errors = __commonJS((exports) => {
  var { SchedulerServiceException: __BaseException } = require_SchedulerServiceException();
  exports.InternalServerException = class InternalServerException extends __BaseException {
    name = "InternalServerException";
    $fault = "server";
    Message;
    constructor(opts) {
      super({
        name: "InternalServerException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InternalServerException.prototype);
      this.Message = opts.Message;
    }
  };
  exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
    name = "ResourceNotFoundException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "ResourceNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
      this.Message = opts.Message;
    }
  };
  exports.ThrottlingException = class ThrottlingException extends __BaseException {
    name = "ThrottlingException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "ThrottlingException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ThrottlingException.prototype);
      this.Message = opts.Message;
    }
  };
  exports.ValidationException = class ValidationException extends __BaseException {
    name = "ValidationException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "ValidationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ValidationException.prototype);
      this.Message = opts.Message;
    }
  };
  exports.ConflictException = class ConflictException extends __BaseException {
    name = "ConflictException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "ConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ConflictException.prototype);
      this.Message = opts.Message;
    }
  };
  exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
    name = "ServiceQuotaExceededException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "ServiceQuotaExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
      this.Message = opts.Message;
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/schemas/schemas_0.js
var require_schemas_0 = __commonJS((exports) => {
  var _A = "Arn";
  var _AAC = "ActionAfterCompletion";
  var _API = "AssignPublicIp";
  var _AVC = "AwsVpcConfiguration";
  var _CD = "CreationDate";
  var _CE = "ConflictException";
  var _CPS = "CapacityProviderStrategy";
  var _CPSI = "CapacityProviderStrategyItem";
  var _CS = "CreateSchedule";
  var _CSG = "CreateScheduleGroup";
  var _CSGI = "CreateScheduleGroupInput";
  var _CSGO = "CreateScheduleGroupOutput";
  var _CSI = "CreateScheduleInput";
  var _CSO = "CreateScheduleOutput";
  var _CT = "ClientToken";
  var _D = "Description";
  var _DLC = "DeadLetterConfig";
  var _DS = "DeleteSchedule";
  var _DSG = "DeleteScheduleGroup";
  var _DSGI = "DeleteScheduleGroupInput";
  var _DSGO = "DeleteScheduleGroupOutput";
  var _DSI = "DeleteScheduleInput";
  var _DSO = "DeleteScheduleOutput";
  var _DT = "DetailType";
  var _EBP = "EventBridgeParameters";
  var _ED = "EndDate";
  var _EEC = "EnableExecuteCommand";
  var _EECSMT = "EnableECSManagedTags";
  var _EP = "EcsParameters";
  var _FTW = "FlexibleTimeWindow";
  var _G = "Group";
  var _GN = "GroupName";
  var _GS = "GetSchedule";
  var _GSG = "GetScheduleGroup";
  var _GSGI = "GetScheduleGroupInput";
  var _GSGO = "GetScheduleGroupOutput";
  var _GSI = "GetScheduleInput";
  var _GSO = "GetScheduleOutput";
  var _I = "Input";
  var _ISE = "InternalServerException";
  var _K = "Key";
  var _KKA = "KmsKeyArn";
  var _KP = "KinesisParameters";
  var _LMD = "LastModificationDate";
  var _LS = "ListSchedules";
  var _LSG = "ListScheduleGroups";
  var _LSGI = "ListScheduleGroupsInput";
  var _LSGO = "ListScheduleGroupsOutput";
  var _LSI = "ListSchedulesInput";
  var _LSO = "ListSchedulesOutput";
  var _LT = "LaunchType";
  var _LTFR = "ListTagsForResource";
  var _LTFRI = "ListTagsForResourceInput";
  var _LTFRO = "ListTagsForResourceOutput";
  var _M = "Message";
  var _MEAIS = "MaximumEventAgeInSeconds";
  var _MGI = "MessageGroupId";
  var _MR = "MaxResults";
  var _MRA = "MaximumRetryAttempts";
  var _MWIM = "MaximumWindowInMinutes";
  var _Mo = "Mode";
  var _N = "Name";
  var _NC = "NetworkConfiguration";
  var _NP = "NamePrefix";
  var _NT = "NextToken";
  var _PC = "PlacementConstraints";
  var _PCl = "PlacementConstraint";
  var _PK = "PartitionKey";
  var _PPL = "PipelineParameterList";
  var _PS = "PlacementStrategy";
  var _PSl = "PlacementStrategies";
  var _PT = "PropagateTags";
  var _PV = "PlatformVersion";
  var _RA = "ResourceArn";
  var _RAo = "RoleArn";
  var _RI = "ReferenceId";
  var _RNFE = "ResourceNotFoundException";
  var _RP = "RetryPolicy";
  var _S = "Subnets";
  var _SA = "ScheduleArn";
  var _SD = "StartDate";
  var _SE = "ScheduleExpression";
  var _SET = "ScheduleExpressionTimezone";
  var _SG = "SecurityGroups";
  var _SGA = "ScheduleGroupArn";
  var _SGL = "ScheduleGroupList";
  var _SGS = "ScheduleGroupSummary";
  var _SGc = "ScheduleGroups";
  var _SGch = "ScheduleGroup";
  var _SL = "ScheduleList";
  var _SMPP = "SageMakerPipelineParameter";
  var _SMPPL = "SageMakerPipelineParameterList";
  var _SMPPa = "SageMakerPipelineParameters";
  var _SP = "SqsParameters";
  var _SQEE = "ServiceQuotaExceededException";
  var _SS = "ScheduleSummary";
  var _Sc = "Schedules";
  var _So = "Source";
  var _St = "State";
  var _T = "Tags";
  var _TC = "TaskCount";
  var _TDA = "TaskDefinitionArn";
  var _TE = "ThrottlingException";
  var _TK = "TagKeys";
  var _TL = "TagList";
  var _TR = "TagResource";
  var _TRI = "TagResourceInput";
  var _TRO = "TagResourceOutput";
  var _TS = "TargetSummary";
  var _Ta = "Target";
  var _Tag = "Tag";
  var _UR = "UntagResource";
  var _URI = "UntagResourceInput";
  var _URO = "UntagResourceOutput";
  var _US = "UpdateSchedule";
  var _USI = "UpdateScheduleInput";
  var _USO = "UpdateScheduleOutput";
  var _V = "Value";
  var _VE = "ValidationException";
  var _aC = "awsvpcConfiguration";
  var _b = "base";
  var _c = "client";
  var _cP = "capacityProvider";
  var _cT = "clientToken";
  var _e = "error";
  var _ex = "expression";
  var _f = "field";
  var _gN = "groupName";
  var _h = "http";
  var _hE = "httpError";
  var _hQ = "httpQuery";
  var _iT = "idempotencyToken";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.scheduler";
  var _se = "server";
  var _t = "type";
  var _w = "weight";
  var n0 = "com.amazonaws.scheduler";
  var { TypeRegistry } = require_schema();
  var { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException } = require_errors();
  var { SchedulerServiceException } = require_SchedulerServiceException();
  var _s_registry = TypeRegistry.for(_s);
  var SchedulerServiceException$ = [-3, _s, "SchedulerServiceException", 0, [], []];
  exports.SchedulerServiceException$ = SchedulerServiceException$;
  _s_registry.registerError(SchedulerServiceException$, SchedulerServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var ConflictException$ = [
    -3,
    n0,
    _CE,
    { [_e]: _c, [_hE]: 409 },
    [_M],
    [0],
    1
  ];
  exports.ConflictException$ = ConflictException$;
  n0_registry.registerError(ConflictException$, ConflictException);
  var InternalServerException$ = [
    -3,
    n0,
    _ISE,
    { [_e]: _se, [_hE]: 500 },
    [_M],
    [0],
    1
  ];
  exports.InternalServerException$ = InternalServerException$;
  n0_registry.registerError(InternalServerException$, InternalServerException);
  var ResourceNotFoundException$ = [
    -3,
    n0,
    _RNFE,
    { [_e]: _c, [_hE]: 404 },
    [_M],
    [0],
    1
  ];
  exports.ResourceNotFoundException$ = ResourceNotFoundException$;
  n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
  var ServiceQuotaExceededException$ = [
    -3,
    n0,
    _SQEE,
    { [_e]: _c, [_hE]: 402 },
    [_M],
    [0],
    1
  ];
  exports.ServiceQuotaExceededException$ = ServiceQuotaExceededException$;
  n0_registry.registerError(ServiceQuotaExceededException$, ServiceQuotaExceededException);
  var ThrottlingException$ = [
    -3,
    n0,
    _TE,
    { [_e]: _c, [_hE]: 429 },
    [_M],
    [0],
    1
  ];
  exports.ThrottlingException$ = ThrottlingException$;
  n0_registry.registerError(ThrottlingException$, ThrottlingException);
  var ValidationException$ = [
    -3,
    n0,
    _VE,
    { [_e]: _c, [_hE]: 400 },
    [_M],
    [0],
    1
  ];
  exports.ValidationException$ = ValidationException$;
  n0_registry.registerError(ValidationException$, ValidationException);
  exports.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var AwsVpcConfiguration$ = [
    3,
    n0,
    _AVC,
    0,
    [_S, _SG, _API],
    [64 | 0, 64 | 0, 0],
    1
  ];
  exports.AwsVpcConfiguration$ = AwsVpcConfiguration$;
  var CapacityProviderStrategyItem$ = [
    3,
    n0,
    _CPSI,
    0,
    [_cP, _w, _b],
    [0, 1, 1],
    1
  ];
  exports.CapacityProviderStrategyItem$ = CapacityProviderStrategyItem$;
  var CreateScheduleGroupInput$ = [
    3,
    n0,
    _CSGI,
    0,
    [_N, _T, _CT],
    [[0, 1], () => TagList, [0, 4]],
    1
  ];
  exports.CreateScheduleGroupInput$ = CreateScheduleGroupInput$;
  var CreateScheduleGroupOutput$ = [
    3,
    n0,
    _CSGO,
    0,
    [_SGA],
    [0],
    1
  ];
  exports.CreateScheduleGroupOutput$ = CreateScheduleGroupOutput$;
  var CreateScheduleInput$ = [
    3,
    n0,
    _CSI,
    0,
    [_N, _SE, _Ta, _FTW, _GN, _SD, _ED, _D, _SET, _St, _KKA, _CT, _AAC],
    [[0, 1], 0, () => Target$, () => FlexibleTimeWindow$, 0, 4, 4, 0, 0, 0, 0, [0, 4], 0],
    4
  ];
  exports.CreateScheduleInput$ = CreateScheduleInput$;
  var CreateScheduleOutput$ = [
    3,
    n0,
    _CSO,
    0,
    [_SA],
    [0],
    1
  ];
  exports.CreateScheduleOutput$ = CreateScheduleOutput$;
  var DeadLetterConfig$ = [
    3,
    n0,
    _DLC,
    0,
    [_A],
    [0]
  ];
  exports.DeadLetterConfig$ = DeadLetterConfig$;
  var DeleteScheduleGroupInput$ = [
    3,
    n0,
    _DSGI,
    0,
    [_N, _CT],
    [[0, 1], [0, { [_hQ]: _cT, [_iT]: 1 }]],
    1
  ];
  exports.DeleteScheduleGroupInput$ = DeleteScheduleGroupInput$;
  var DeleteScheduleGroupOutput$ = [
    3,
    n0,
    _DSGO,
    0,
    [],
    []
  ];
  exports.DeleteScheduleGroupOutput$ = DeleteScheduleGroupOutput$;
  var DeleteScheduleInput$ = [
    3,
    n0,
    _DSI,
    0,
    [_N, _GN, _CT],
    [[0, 1], [0, { [_hQ]: _gN }], [0, { [_hQ]: _cT, [_iT]: 1 }]],
    1
  ];
  exports.DeleteScheduleInput$ = DeleteScheduleInput$;
  var DeleteScheduleOutput$ = [
    3,
    n0,
    _DSO,
    0,
    [],
    []
  ];
  exports.DeleteScheduleOutput$ = DeleteScheduleOutput$;
  var EcsParameters$ = [
    3,
    n0,
    _EP,
    0,
    [_TDA, _TC, _LT, _NC, _PV, _G, _CPS, _EECSMT, _EEC, _PC, _PS, _PT, _RI, _T],
    [0, 1, 0, () => NetworkConfiguration$, 0, 0, () => CapacityProviderStrategy, 2, 2, () => PlacementConstraints, () => PlacementStrategies, 0, 0, [1, n0, _T, 0, 128 | 0]],
    1
  ];
  exports.EcsParameters$ = EcsParameters$;
  var EventBridgeParameters$ = [
    3,
    n0,
    _EBP,
    0,
    [_DT, _So],
    [0, 0],
    2
  ];
  exports.EventBridgeParameters$ = EventBridgeParameters$;
  var FlexibleTimeWindow$ = [
    3,
    n0,
    _FTW,
    0,
    [_Mo, _MWIM],
    [0, 1],
    1
  ];
  exports.FlexibleTimeWindow$ = FlexibleTimeWindow$;
  var GetScheduleGroupInput$ = [
    3,
    n0,
    _GSGI,
    0,
    [_N],
    [[0, 1]],
    1
  ];
  exports.GetScheduleGroupInput$ = GetScheduleGroupInput$;
  var GetScheduleGroupOutput$ = [
    3,
    n0,
    _GSGO,
    0,
    [_A, _N, _St, _CD, _LMD],
    [0, 0, 0, 4, 4]
  ];
  exports.GetScheduleGroupOutput$ = GetScheduleGroupOutput$;
  var GetScheduleInput$ = [
    3,
    n0,
    _GSI,
    0,
    [_N, _GN],
    [[0, 1], [0, { [_hQ]: _gN }]],
    1
  ];
  exports.GetScheduleInput$ = GetScheduleInput$;
  var GetScheduleOutput$ = [
    3,
    n0,
    _GSO,
    0,
    [_A, _GN, _N, _SE, _SD, _ED, _D, _SET, _St, _CD, _LMD, _KKA, _Ta, _FTW, _AAC],
    [0, 0, 0, 0, 4, 4, 0, 0, 0, 4, 4, 0, () => Target$, () => FlexibleTimeWindow$, 0]
  ];
  exports.GetScheduleOutput$ = GetScheduleOutput$;
  var KinesisParameters$ = [
    3,
    n0,
    _KP,
    0,
    [_PK],
    [0],
    1
  ];
  exports.KinesisParameters$ = KinesisParameters$;
  var ListScheduleGroupsInput$ = [
    3,
    n0,
    _LSGI,
    0,
    [_NP, _NT, _MR],
    [[0, { [_hQ]: _NP }], [0, { [_hQ]: _NT }], [1, { [_hQ]: _MR }]]
  ];
  exports.ListScheduleGroupsInput$ = ListScheduleGroupsInput$;
  var ListScheduleGroupsOutput$ = [
    3,
    n0,
    _LSGO,
    0,
    [_SGc, _NT],
    [() => ScheduleGroupList, 0],
    1
  ];
  exports.ListScheduleGroupsOutput$ = ListScheduleGroupsOutput$;
  var ListSchedulesInput$ = [
    3,
    n0,
    _LSI,
    0,
    [_GN, _NP, _St, _NT, _MR],
    [[0, { [_hQ]: _SGch }], [0, { [_hQ]: _NP }], [0, { [_hQ]: _St }], [0, { [_hQ]: _NT }], [1, { [_hQ]: _MR }]]
  ];
  exports.ListSchedulesInput$ = ListSchedulesInput$;
  var ListSchedulesOutput$ = [
    3,
    n0,
    _LSO,
    0,
    [_Sc, _NT],
    [() => ScheduleList, 0],
    1
  ];
  exports.ListSchedulesOutput$ = ListSchedulesOutput$;
  var ListTagsForResourceInput$ = [
    3,
    n0,
    _LTFRI,
    0,
    [_RA],
    [[0, 1]],
    1
  ];
  exports.ListTagsForResourceInput$ = ListTagsForResourceInput$;
  var ListTagsForResourceOutput$ = [
    3,
    n0,
    _LTFRO,
    0,
    [_T],
    [() => TagList]
  ];
  exports.ListTagsForResourceOutput$ = ListTagsForResourceOutput$;
  var NetworkConfiguration$ = [
    3,
    n0,
    _NC,
    0,
    [_aC],
    [() => AwsVpcConfiguration$]
  ];
  exports.NetworkConfiguration$ = NetworkConfiguration$;
  var PlacementConstraint$ = [
    3,
    n0,
    _PCl,
    0,
    [_t, _ex],
    [0, 0]
  ];
  exports.PlacementConstraint$ = PlacementConstraint$;
  var PlacementStrategy$ = [
    3,
    n0,
    _PS,
    0,
    [_t, _f],
    [0, 0]
  ];
  exports.PlacementStrategy$ = PlacementStrategy$;
  var RetryPolicy$ = [
    3,
    n0,
    _RP,
    0,
    [_MEAIS, _MRA],
    [1, 1]
  ];
  exports.RetryPolicy$ = RetryPolicy$;
  var SageMakerPipelineParameter$ = [
    3,
    n0,
    _SMPP,
    0,
    [_N, _V],
    [0, 0],
    2
  ];
  exports.SageMakerPipelineParameter$ = SageMakerPipelineParameter$;
  var SageMakerPipelineParameters$ = [
    3,
    n0,
    _SMPPa,
    0,
    [_PPL],
    [() => SageMakerPipelineParameterList]
  ];
  exports.SageMakerPipelineParameters$ = SageMakerPipelineParameters$;
  var ScheduleGroupSummary$ = [
    3,
    n0,
    _SGS,
    0,
    [_A, _N, _St, _CD, _LMD],
    [0, 0, 0, 4, 4]
  ];
  exports.ScheduleGroupSummary$ = ScheduleGroupSummary$;
  var ScheduleSummary$ = [
    3,
    n0,
    _SS,
    0,
    [_A, _N, _GN, _St, _CD, _LMD, _Ta],
    [0, 0, 0, 0, 4, 4, () => TargetSummary$]
  ];
  exports.ScheduleSummary$ = ScheduleSummary$;
  var SqsParameters$ = [
    3,
    n0,
    _SP,
    0,
    [_MGI],
    [0]
  ];
  exports.SqsParameters$ = SqsParameters$;
  var Tag$ = [
    3,
    n0,
    _Tag,
    0,
    [_K, _V],
    [0, 0],
    2
  ];
  exports.Tag$ = Tag$;
  var TagResourceInput$ = [
    3,
    n0,
    _TRI,
    0,
    [_RA, _T],
    [[0, 1], () => TagList],
    2
  ];
  exports.TagResourceInput$ = TagResourceInput$;
  var TagResourceOutput$ = [
    3,
    n0,
    _TRO,
    0,
    [],
    []
  ];
  exports.TagResourceOutput$ = TagResourceOutput$;
  var Target$ = [
    3,
    n0,
    _Ta,
    0,
    [_A, _RAo, _DLC, _RP, _I, _EP, _EBP, _KP, _SMPPa, _SP],
    [0, 0, () => DeadLetterConfig$, () => RetryPolicy$, 0, () => EcsParameters$, () => EventBridgeParameters$, () => KinesisParameters$, () => SageMakerPipelineParameters$, () => SqsParameters$],
    2
  ];
  exports.Target$ = Target$;
  var TargetSummary$ = [
    3,
    n0,
    _TS,
    0,
    [_A],
    [0],
    1
  ];
  exports.TargetSummary$ = TargetSummary$;
  var UntagResourceInput$ = [
    3,
    n0,
    _URI,
    0,
    [_RA, _TK],
    [[0, 1], [64 | 0, { [_hQ]: _TK }]],
    2
  ];
  exports.UntagResourceInput$ = UntagResourceInput$;
  var UntagResourceOutput$ = [
    3,
    n0,
    _URO,
    0,
    [],
    []
  ];
  exports.UntagResourceOutput$ = UntagResourceOutput$;
  var UpdateScheduleInput$ = [
    3,
    n0,
    _USI,
    0,
    [_N, _SE, _Ta, _FTW, _GN, _SD, _ED, _D, _SET, _St, _KKA, _CT, _AAC],
    [[0, 1], 0, () => Target$, () => FlexibleTimeWindow$, 0, 4, 4, 0, 0, 0, 0, [0, 4], 0],
    4
  ];
  exports.UpdateScheduleInput$ = UpdateScheduleInput$;
  var UpdateScheduleOutput$ = [
    3,
    n0,
    _USO,
    0,
    [_SA],
    [0],
    1
  ];
  exports.UpdateScheduleOutput$ = UpdateScheduleOutput$;
  var CapacityProviderStrategy = [
    1,
    n0,
    _CPS,
    0,
    () => CapacityProviderStrategyItem$
  ];
  var PlacementConstraints = [
    1,
    n0,
    _PC,
    0,
    () => PlacementConstraint$
  ];
  var PlacementStrategies = [
    1,
    n0,
    _PSl,
    0,
    () => PlacementStrategy$
  ];
  var SageMakerPipelineParameterList = [
    1,
    n0,
    _SMPPL,
    0,
    () => SageMakerPipelineParameter$
  ];
  var ScheduleGroupList = [
    1,
    n0,
    _SGL,
    0,
    () => ScheduleGroupSummary$
  ];
  var ScheduleList = [
    1,
    n0,
    _SL,
    0,
    () => ScheduleSummary$
  ];
  var SecurityGroups = 64 | 0;
  var Subnets = 64 | 0;
  var TagKeyList = 64 | 0;
  var TagList = [
    1,
    n0,
    _TL,
    0,
    () => Tag$
  ];
  var Tags = [
    1,
    n0,
    _T,
    0,
    128 | 0
  ];
  var TagMap = 128 | 0;
  exports.CreateSchedule$ = [
    9,
    n0,
    _CS,
    { [_h]: ["POST", "/schedules/{Name}", 200] },
    () => CreateScheduleInput$,
    () => CreateScheduleOutput$
  ];
  exports.CreateScheduleGroup$ = [
    9,
    n0,
    _CSG,
    { [_h]: ["POST", "/schedule-groups/{Name}", 200] },
    () => CreateScheduleGroupInput$,
    () => CreateScheduleGroupOutput$
  ];
  exports.DeleteSchedule$ = [
    9,
    n0,
    _DS,
    { [_h]: ["DELETE", "/schedules/{Name}", 200] },
    () => DeleteScheduleInput$,
    () => DeleteScheduleOutput$
  ];
  exports.DeleteScheduleGroup$ = [
    9,
    n0,
    _DSG,
    { [_h]: ["DELETE", "/schedule-groups/{Name}", 200] },
    () => DeleteScheduleGroupInput$,
    () => DeleteScheduleGroupOutput$
  ];
  exports.GetSchedule$ = [
    9,
    n0,
    _GS,
    { [_h]: ["GET", "/schedules/{Name}", 200] },
    () => GetScheduleInput$,
    () => GetScheduleOutput$
  ];
  exports.GetScheduleGroup$ = [
    9,
    n0,
    _GSG,
    { [_h]: ["GET", "/schedule-groups/{Name}", 200] },
    () => GetScheduleGroupInput$,
    () => GetScheduleGroupOutput$
  ];
  exports.ListScheduleGroups$ = [
    9,
    n0,
    _LSG,
    { [_h]: ["GET", "/schedule-groups", 200] },
    () => ListScheduleGroupsInput$,
    () => ListScheduleGroupsOutput$
  ];
  exports.ListSchedules$ = [
    9,
    n0,
    _LS,
    { [_h]: ["GET", "/schedules", 200] },
    () => ListSchedulesInput$,
    () => ListSchedulesOutput$
  ];
  exports.ListTagsForResource$ = [
    9,
    n0,
    _LTFR,
    { [_h]: ["GET", "/tags/{ResourceArn}", 200] },
    () => ListTagsForResourceInput$,
    () => ListTagsForResourceOutput$
  ];
  exports.TagResource$ = [
    9,
    n0,
    _TR,
    { [_h]: ["POST", "/tags/{ResourceArn}", 200] },
    () => TagResourceInput$,
    () => TagResourceOutput$
  ];
  exports.UntagResource$ = [
    9,
    n0,
    _UR,
    { [_h]: ["DELETE", "/tags/{ResourceArn}", 200] },
    () => UntagResourceInput$,
    () => UntagResourceOutput$
  ];
  exports.UpdateSchedule$ = [
    9,
    n0,
    _US,
    { [_h]: ["PUT", "/schedules/{Name}", 200] },
    () => UpdateScheduleInput$,
    () => UpdateScheduleOutput$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared = __commonJS((exports) => {
  var { AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsRestJsonProtocol } = require_protocols2();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultSchedulerHttpAuthSchemeProvider } = require_httpAuthSchemeProvider();
  var { defaultEndpointResolver } = require_endpointResolver();
  var { errorTypeRegistries } = require_schemas_0();
  exports.getRuntimeConfig = (config) => {
    return {
      apiVersion: "2021-06-30",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSchedulerHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsRestJsonProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.scheduler",
        errorTypeRegistries,
        version: "2021-06-30",
        serviceTarget: "AWSChronosService"
      },
      serviceId: config?.serviceId ?? "Scheduler",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/runtimeConfig.js
var require_runtimeConfig = __commonJS((exports) => {
  var packageInfo = require_package2();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require_retry();
  var { calculateBodyLength, Hash } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared();
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-scheduler@3.1074.0/node_modules/@aws-sdk/client-scheduler/dist-cjs/index.js
var require_dist_cjs20 = __commonJS((exports) => {
  var __exportStar = (m, e) => {
    Object.assign(e, m);
  };
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs5();
  var { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveRegionConfig } = require_config2();
  var { resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultSchedulerHttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider();
  var { getRuntimeConfig } = require_runtimeConfig();
  var { CreateSchedule$, CreateScheduleGroup$, DeleteSchedule$, DeleteScheduleGroup$, GetSchedule$, GetScheduleGroup$, ListScheduleGroups$, ListSchedules$, ListTagsForResource$, TagResource$, UntagResource$, UpdateSchedule$ } = require_schemas_0();
  __exportStar(require_schemas_0(), exports);
  __exportStar(require_errors(), exports);
  var { SchedulerServiceException } = require_SchedulerServiceException();
  exports.SchedulerServiceException = SchedulerServiceException;
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "scheduler"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class SchedulerClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSchedulerHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class CreateScheduleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "CreateSchedule", {}).n("SchedulerClient", "CreateScheduleCommand").sc(CreateSchedule$).build() {
  }

  class CreateScheduleGroupCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "CreateScheduleGroup", {}).n("SchedulerClient", "CreateScheduleGroupCommand").sc(CreateScheduleGroup$).build() {
  }

  class DeleteScheduleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "DeleteSchedule", {}).n("SchedulerClient", "DeleteScheduleCommand").sc(DeleteSchedule$).build() {
  }

  class DeleteScheduleGroupCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "DeleteScheduleGroup", {}).n("SchedulerClient", "DeleteScheduleGroupCommand").sc(DeleteScheduleGroup$).build() {
  }

  class GetScheduleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "GetSchedule", {}).n("SchedulerClient", "GetScheduleCommand").sc(GetSchedule$).build() {
  }

  class GetScheduleGroupCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "GetScheduleGroup", {}).n("SchedulerClient", "GetScheduleGroupCommand").sc(GetScheduleGroup$).build() {
  }

  class ListScheduleGroupsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "ListScheduleGroups", {}).n("SchedulerClient", "ListScheduleGroupsCommand").sc(ListScheduleGroups$).build() {
  }

  class ListSchedulesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "ListSchedules", {}).n("SchedulerClient", "ListSchedulesCommand").sc(ListSchedules$).build() {
  }

  class ListTagsForResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "ListTagsForResource", {}).n("SchedulerClient", "ListTagsForResourceCommand").sc(ListTagsForResource$).build() {
  }

  class TagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "TagResource", {}).n("SchedulerClient", "TagResourceCommand").sc(TagResource$).build() {
  }

  class UntagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "UntagResource", {}).n("SchedulerClient", "UntagResourceCommand").sc(UntagResource$).build() {
  }

  class UpdateScheduleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSChronosService", "UpdateSchedule", {}).n("SchedulerClient", "UpdateScheduleCommand").sc(UpdateSchedule$).build() {
  }
  var paginateListScheduleGroups = createPaginator(SchedulerClient, ListScheduleGroupsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListSchedules = createPaginator(SchedulerClient, ListSchedulesCommand, "NextToken", "NextToken", "MaxResults");
  var commands = {
    CreateScheduleCommand,
    CreateScheduleGroupCommand,
    DeleteScheduleCommand,
    DeleteScheduleGroupCommand,
    GetScheduleCommand,
    GetScheduleGroupCommand,
    ListScheduleGroupsCommand,
    ListSchedulesCommand,
    ListTagsForResourceCommand,
    TagResourceCommand,
    UntagResourceCommand,
    UpdateScheduleCommand
  };
  var paginators = {
    paginateListScheduleGroups,
    paginateListSchedules
  };

  class Scheduler extends SchedulerClient {
  }
  createAggregatedClient(commands, Scheduler, { paginators });
  var ActionAfterCompletion = {
    DELETE: "DELETE",
    NONE: "NONE"
  };
  var AssignPublicIp = {
    DISABLED: "DISABLED",
    ENABLED: "ENABLED"
  };
  var FlexibleTimeWindowMode = {
    FLEXIBLE: "FLEXIBLE",
    OFF: "OFF"
  };
  var ScheduleState = {
    DISABLED: "DISABLED",
    ENABLED: "ENABLED"
  };
  var LaunchType = {
    EC2: "EC2",
    EXTERNAL: "EXTERNAL",
    FARGATE: "FARGATE"
  };
  var PlacementConstraintType = {
    DISTINCT_INSTANCE: "distinctInstance",
    MEMBER_OF: "memberOf"
  };
  var PlacementStrategyType = {
    BINPACK: "binpack",
    RANDOM: "random",
    SPREAD: "spread"
  };
  var PropagateTags = {
    TASK_DEFINITION: "TASK_DEFINITION"
  };
  var ScheduleGroupState = {
    ACTIVE: "ACTIVE",
    DELETING: "DELETING"
  };
  exports.ActionAfterCompletion = ActionAfterCompletion;
  exports.AssignPublicIp = AssignPublicIp;
  exports.CreateScheduleCommand = CreateScheduleCommand;
  exports.CreateScheduleGroupCommand = CreateScheduleGroupCommand;
  exports.DeleteScheduleCommand = DeleteScheduleCommand;
  exports.DeleteScheduleGroupCommand = DeleteScheduleGroupCommand;
  exports.FlexibleTimeWindowMode = FlexibleTimeWindowMode;
  exports.GetScheduleCommand = GetScheduleCommand;
  exports.GetScheduleGroupCommand = GetScheduleGroupCommand;
  exports.LaunchType = LaunchType;
  exports.ListScheduleGroupsCommand = ListScheduleGroupsCommand;
  exports.ListSchedulesCommand = ListSchedulesCommand;
  exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
  exports.PlacementConstraintType = PlacementConstraintType;
  exports.PlacementStrategyType = PlacementStrategyType;
  exports.PropagateTags = PropagateTags;
  exports.ScheduleGroupState = ScheduleGroupState;
  exports.ScheduleState = ScheduleState;
  exports.Scheduler = Scheduler;
  exports.SchedulerClient = SchedulerClient;
  exports.TagResourceCommand = TagResourceCommand;
  exports.UntagResourceCommand = UntagResourceCommand;
  exports.UpdateScheduleCommand = UpdateScheduleCommand;
  exports.paginateListScheduleGroups = paginateListScheduleGroups;
  exports.paginateListSchedules = paginateListSchedules;
});

// ../../node_modules/.pnpm/@aws-sdk+middleware-sdk-sqs@3.972.31/node_modules/@aws-sdk/middleware-sdk-sqs/dist-cjs/index.js
var require_dist_cjs21 = __commonJS((exports) => {
  var { NoOpLogger } = require_client3();
  var { toUint8Array, toHex } = require_serde();
  var resolveQueueUrlConfig = (config) => {
    return Object.assign(config, {
      useQueueUrlAsEndpoint: config.useQueueUrlAsEndpoint ?? true
    });
  };
  function queueUrlMiddleware({ useQueueUrlAsEndpoint, endpoint }) {
    return (next, context10) => {
      return async (args) => {
        const { input } = args;
        const resolvedEndpoint = context10.endpointV2;
        if (!endpoint && input.QueueUrl && resolvedEndpoint && useQueueUrlAsEndpoint) {
          const logger = context10.logger instanceof NoOpLogger || !context10.logger?.warn ? console : context10.logger;
          try {
            const queueUrl = new URL(input.QueueUrl);
            const queueUrlOrigin = new URL(queueUrl.origin);
            if (resolvedEndpoint.url.origin !== queueUrlOrigin.origin) {
              logger.warn(`QueueUrl=${input.QueueUrl} differs from SQSClient resolved endpoint=${resolvedEndpoint.url.toString()}, using QueueUrl host as endpoint.
Set [endpoint=string] or [useQueueUrlAsEndpoint=false] on the SQSClient.`);
              context10.endpointV2 = {
                ...resolvedEndpoint,
                url: queueUrlOrigin
              };
            }
          } catch (e) {
            logger.warn(e);
          }
        }
        return next(args);
      };
    };
  }
  var queueUrlMiddlewareOptions = {
    name: "queueUrlMiddleware",
    relation: "after",
    toMiddleware: "endpointV2Middleware",
    override: true
  };
  var getQueueUrlPlugin = (config) => ({
    applyToStack: (clientStack) => {
      clientStack.addRelativeTo(queueUrlMiddleware(config), queueUrlMiddlewareOptions);
    }
  });
  function receiveMessageMiddleware(options) {
    return (next) => async (args) => {
      const resp = await next({ ...args });
      if (options.md5 === false) {
        return resp;
      }
      const output = resp.output;
      const messageIds = [];
      if (output.Messages !== undefined) {
        for (const message of output.Messages) {
          const md5 = message.MD5OfBody;
          const hash = new options.md5;
          hash.update(toUint8Array(message.Body || ""));
          if (md5 !== toHex(await hash.digest())) {
            messageIds.push(message.MessageId);
          }
        }
      }
      if (messageIds.length > 0) {
        throw new Error("Invalid MD5 checksum on messages: " + messageIds.join(", "));
      }
      return resp;
    };
  }
  var receiveMessageMiddlewareOptions = {
    step: "initialize",
    tags: ["VALIDATE_BODY_MD5"],
    name: "receiveMessageMiddleware",
    override: true
  };
  var getReceiveMessagePlugin = (config) => ({
    applyToStack: (clientStack) => {
      clientStack.add(receiveMessageMiddleware(config), receiveMessageMiddlewareOptions);
    }
  });
  var sendMessageMiddleware = (options) => (next) => async (args) => {
    const resp = await next({ ...args });
    if (options.md5 === false) {
      return resp;
    }
    const output = resp.output;
    const hash = new options.md5;
    hash.update(toUint8Array(args.input.MessageBody || ""));
    if (output.MD5OfMessageBody !== toHex(await hash.digest())) {
      throw new Error("InvalidChecksumError");
    }
    return resp;
  };
  var sendMessageMiddlewareOptions = {
    step: "initialize",
    tags: ["VALIDATE_BODY_MD5"],
    name: "sendMessageMiddleware",
    override: true
  };
  var getSendMessagePlugin = (config) => ({
    applyToStack: (clientStack) => {
      clientStack.add(sendMessageMiddleware(config), sendMessageMiddlewareOptions);
    }
  });
  var sendMessageBatchMiddleware = (options) => (next) => async (args) => {
    const resp = await next({ ...args });
    if (options.md5 === false) {
      return resp;
    }
    const output = resp.output;
    const messageIds = [];
    const entries = {};
    if (output.Successful !== undefined) {
      for (const entry of output.Successful) {
        if (entry.Id !== undefined) {
          entries[entry.Id] = entry;
        }
      }
    }
    for (const entry of args.input.Entries) {
      if (entries[entry.Id]) {
        const md5 = entries[entry.Id].MD5OfMessageBody;
        const hash = new options.md5;
        hash.update(toUint8Array(entry.MessageBody || ""));
        if (md5 !== toHex(await hash.digest())) {
          messageIds.push(entries[entry.Id].MessageId);
        }
      }
    }
    if (messageIds.length > 0) {
      throw new Error("Invalid MD5 checksum on messages: " + messageIds.join(", "));
    }
    return resp;
  };
  var sendMessageBatchMiddlewareOptions = {
    step: "initialize",
    tags: ["VALIDATE_BODY_MD5"],
    name: "sendMessageBatchMiddleware",
    override: true
  };
  var getSendMessageBatchPlugin = (config) => ({
    applyToStack: (clientStack) => {
      clientStack.add(sendMessageBatchMiddleware(config), sendMessageBatchMiddlewareOptions);
    }
  });
  exports.getQueueUrlPlugin = getQueueUrlPlugin;
  exports.getReceiveMessagePlugin = getReceiveMessagePlugin;
  exports.getSendMessageBatchPlugin = getSendMessageBatchPlugin;
  exports.getSendMessagePlugin = getSendMessagePlugin;
  exports.queueUrlMiddleware = queueUrlMiddleware;
  exports.queueUrlMiddlewareOptions = queueUrlMiddlewareOptions;
  exports.receiveMessageMiddleware = receiveMessageMiddleware;
  exports.receiveMessageMiddlewareOptions = receiveMessageMiddlewareOptions;
  exports.resolveQueueUrlConfig = resolveQueueUrlConfig;
  exports.sendMessageBatchMiddleware = sendMessageBatchMiddleware;
  exports.sendMessageBatchMiddlewareOptions = sendMessageBatchMiddlewareOptions;
  exports.sendMessageMiddleware = sendMessageMiddleware;
  exports.sendMessageMiddlewareOptions = sendMessageMiddlewareOptions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider2 = __commonJS((exports) => {
  var { resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { getSmithyContext, normalizeProvider } = require_client3();
  exports.defaultSQSHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "sqs",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  exports.defaultSQSHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  exports.resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/package.json
var require_package3 = __commonJS((exports, module) => {
  module.exports = {
    name: "@aws-sdk/client-sqs",
    description: "AWS SDK for JavaScript Sqs Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      test: "yarn g:vitest run --passWithNoTests",
      "test:watch": "yarn g:vitest watch --passWithNoTests",
      "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
      "test:integration:watch": "yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts",
      "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
      "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
      "test:browser": "yarn g:vitest run -c vitest.config.browser.e2e.mts",
      "test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.e2e.mts",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/middleware-sdk-sqs": "^3.972.31",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@smithy/snapshot-testing": "^2.1.7",
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3",
      vitest: "^4.0.17"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sqs",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-sqs"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/endpoint/bdd.js
var require_bdd2 = __commonJS((exports) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var k = "ref";
  var a = -1;
  var b = true;
  var c = "isSet";
  var d = "PartitionResult";
  var e = "booleanEquals";
  var f = "getAttr";
  var g = { [k]: "Endpoint" };
  var h = { [k]: d };
  var i = {};
  var j = [{ [k]: "Region" }];
  var _data = {
    conditions: [
      [c, [g]],
      [c, j],
      ["aws.partition", j, d],
      [e, [{ [k]: "UseFIPS" }, b]],
      [e, [{ [k]: "UseDualStack" }, b]],
      [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
      [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
      ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]]
    ],
    results: [
      [a],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [g, i],
      ["https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://sqs.{Region}.amazonaws.com", i],
      ["https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://sqs.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    13,
    3,
    1,
    4,
    r + 12,
    2,
    5,
    r + 12,
    3,
    8,
    6,
    4,
    7,
    r + 11,
    5,
    r + 9,
    r + 10,
    4,
    11,
    9,
    6,
    10,
    r + 8,
    7,
    r + 6,
    r + 7,
    5,
    12,
    r + 5,
    6,
    r + 4,
    r + 5,
    3,
    r + 1,
    14,
    4,
    r + 2,
    r + 3
  ]);
  exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver2 = __commonJS((exports) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd2();
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  exports.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/models/SQSServiceException.js
var require_SQSServiceException = __commonJS((exports) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports.__ServiceException = __ServiceException;
  exports.SQSServiceException = class SQSServiceException extends __ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, SQSServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/models/errors.js
var require_errors2 = __commonJS((exports) => {
  var { SQSServiceException: __BaseException } = require_SQSServiceException();
  exports.InvalidAddress = class InvalidAddress extends __BaseException {
    name = "InvalidAddress";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidAddress",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidAddress.prototype);
    }
  };
  exports.InvalidSecurity = class InvalidSecurity extends __BaseException {
    name = "InvalidSecurity";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidSecurity",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidSecurity.prototype);
    }
  };
  exports.OverLimit = class OverLimit extends __BaseException {
    name = "OverLimit";
    $fault = "client";
    constructor(opts) {
      super({
        name: "OverLimit",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, OverLimit.prototype);
    }
  };
  exports.QueueDoesNotExist = class QueueDoesNotExist extends __BaseException {
    name = "QueueDoesNotExist";
    $fault = "client";
    constructor(opts) {
      super({
        name: "QueueDoesNotExist",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, QueueDoesNotExist.prototype);
    }
  };
  exports.RequestThrottled = class RequestThrottled extends __BaseException {
    name = "RequestThrottled";
    $fault = "client";
    constructor(opts) {
      super({
        name: "RequestThrottled",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RequestThrottled.prototype);
    }
  };
  exports.UnsupportedOperation = class UnsupportedOperation extends __BaseException {
    name = "UnsupportedOperation";
    $fault = "client";
    constructor(opts) {
      super({
        name: "UnsupportedOperation",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, UnsupportedOperation.prototype);
    }
  };
  exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
    name = "ResourceNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ResourceNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
    }
  };
  exports.MessageNotInflight = class MessageNotInflight extends __BaseException {
    name = "MessageNotInflight";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MessageNotInflight",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MessageNotInflight.prototype);
    }
  };
  exports.ReceiptHandleIsInvalid = class ReceiptHandleIsInvalid extends __BaseException {
    name = "ReceiptHandleIsInvalid";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ReceiptHandleIsInvalid",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ReceiptHandleIsInvalid.prototype);
    }
  };
  exports.BatchEntryIdsNotDistinct = class BatchEntryIdsNotDistinct extends __BaseException {
    name = "BatchEntryIdsNotDistinct";
    $fault = "client";
    constructor(opts) {
      super({
        name: "BatchEntryIdsNotDistinct",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, BatchEntryIdsNotDistinct.prototype);
    }
  };
  exports.EmptyBatchRequest = class EmptyBatchRequest extends __BaseException {
    name = "EmptyBatchRequest";
    $fault = "client";
    constructor(opts) {
      super({
        name: "EmptyBatchRequest",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, EmptyBatchRequest.prototype);
    }
  };
  exports.InvalidBatchEntryId = class InvalidBatchEntryId extends __BaseException {
    name = "InvalidBatchEntryId";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidBatchEntryId",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidBatchEntryId.prototype);
    }
  };
  exports.TooManyEntriesInBatchRequest = class TooManyEntriesInBatchRequest extends __BaseException {
    name = "TooManyEntriesInBatchRequest";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TooManyEntriesInBatchRequest",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TooManyEntriesInBatchRequest.prototype);
    }
  };
  exports.InvalidAttributeName = class InvalidAttributeName extends __BaseException {
    name = "InvalidAttributeName";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidAttributeName",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidAttributeName.prototype);
    }
  };
  exports.InvalidAttributeValue = class InvalidAttributeValue extends __BaseException {
    name = "InvalidAttributeValue";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidAttributeValue",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidAttributeValue.prototype);
    }
  };
  exports.QueueDeletedRecently = class QueueDeletedRecently extends __BaseException {
    name = "QueueDeletedRecently";
    $fault = "client";
    constructor(opts) {
      super({
        name: "QueueDeletedRecently",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, QueueDeletedRecently.prototype);
    }
  };
  exports.QueueNameExists = class QueueNameExists extends __BaseException {
    name = "QueueNameExists";
    $fault = "client";
    constructor(opts) {
      super({
        name: "QueueNameExists",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, QueueNameExists.prototype);
    }
  };
  exports.InvalidIdFormat = class InvalidIdFormat extends __BaseException {
    name = "InvalidIdFormat";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidIdFormat",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidIdFormat.prototype);
    }
  };
  exports.PurgeQueueInProgress = class PurgeQueueInProgress extends __BaseException {
    name = "PurgeQueueInProgress";
    $fault = "client";
    constructor(opts) {
      super({
        name: "PurgeQueueInProgress",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PurgeQueueInProgress.prototype);
    }
  };
  exports.KmsAccessDenied = class KmsAccessDenied extends __BaseException {
    name = "KmsAccessDenied";
    $fault = "client";
    constructor(opts) {
      super({
        name: "KmsAccessDenied",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, KmsAccessDenied.prototype);
    }
  };
  exports.KmsDisabled = class KmsDisabled extends __BaseException {
    name = "KmsDisabled";
    $fault = "client";
    constructor(opts) {
      super({
        name: "KmsDisabled",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, KmsDisabled.prototype);
    }
  };
  exports.KmsInvalidKeyUsage = class KmsInvalidKeyUsage extends __BaseException {
    name = "KmsInvalidKeyUsage";
    $fault = "client";
    constructor(opts) {
      super({
        name: "KmsInvalidKeyUsage",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, KmsInvalidKeyUsage.prototype);
    }
  };
  exports.KmsInvalidState = class KmsInvalidState extends __BaseException {
    name = "KmsInvalidState";
    $fault = "client";
    constructor(opts) {
      super({
        name: "KmsInvalidState",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, KmsInvalidState.prototype);
    }
  };
  exports.KmsNotFound = class KmsNotFound extends __BaseException {
    name = "KmsNotFound";
    $fault = "client";
    constructor(opts) {
      super({
        name: "KmsNotFound",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, KmsNotFound.prototype);
    }
  };
  exports.KmsOptInRequired = class KmsOptInRequired extends __BaseException {
    name = "KmsOptInRequired";
    $fault = "client";
    constructor(opts) {
      super({
        name: "KmsOptInRequired",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, KmsOptInRequired.prototype);
    }
  };
  exports.KmsThrottled = class KmsThrottled extends __BaseException {
    name = "KmsThrottled";
    $fault = "client";
    constructor(opts) {
      super({
        name: "KmsThrottled",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, KmsThrottled.prototype);
    }
  };
  exports.InvalidMessageContents = class InvalidMessageContents extends __BaseException {
    name = "InvalidMessageContents";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidMessageContents",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidMessageContents.prototype);
    }
  };
  exports.BatchRequestTooLong = class BatchRequestTooLong extends __BaseException {
    name = "BatchRequestTooLong";
    $fault = "client";
    constructor(opts) {
      super({
        name: "BatchRequestTooLong",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, BatchRequestTooLong.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/schemas/schemas_0.js
var require_schemas_02 = __commonJS((exports) => {
  var _A = "Actions";
  var _AN = "ActionName";
  var _ANOMM = "ApproximateNumberOfMessagesMoved";
  var _ANOMTM = "ApproximateNumberOfMessagesToMove";
  var _ANt = "AttributeNames";
  var _ANtt = "AttributeName";
  var _AP = "AddPermission";
  var _APR = "AddPermissionRequest";
  var _AWSAI = "AWSAccountIds";
  var _AWSAIc = "AWSAccountId";
  var _At = "Attributes";
  var _Att = "Attribute";
  var _B = "Body";
  var _BEIND = "BatchEntryIdsNotDistinct";
  var _BL = "BinaryList";
  var _BLV = "BinaryListValues";
  var _BLVi = "BinaryListValue";
  var _BREE = "BatchResultErrorEntry";
  var _BREEL = "BatchResultErrorEntryList";
  var _BRTL = "BatchRequestTooLong";
  var _BV = "BinaryValue";
  var _C = "Code";
  var _CMMT = "CancelMessageMoveTask";
  var _CMMTR = "CancelMessageMoveTaskRequest";
  var _CMMTRa = "CancelMessageMoveTaskResult";
  var _CMV = "ChangeMessageVisibility";
  var _CMVB = "ChangeMessageVisibilityBatch";
  var _CMVBR = "ChangeMessageVisibilityBatchRequest";
  var _CMVBRE = "ChangeMessageVisibilityBatchRequestEntry";
  var _CMVBREL = "ChangeMessageVisibilityBatchRequestEntryList";
  var _CMVBRELh = "ChangeMessageVisibilityBatchResultEntryList";
  var _CMVBREh = "ChangeMessageVisibilityBatchResultEntry";
  var _CMVBRh = "ChangeMessageVisibilityBatchResult";
  var _CMVR = "ChangeMessageVisibilityRequest";
  var _CQ = "CreateQueue";
  var _CQR = "CreateQueueRequest";
  var _CQRr = "CreateQueueResult";
  var _DA = "DestinationArn";
  var _DM = "DeleteMessage";
  var _DMB = "DeleteMessageBatch";
  var _DMBR = "DeleteMessageBatchRequest";
  var _DMBRE = "DeleteMessageBatchRequestEntry";
  var _DMBREL = "DeleteMessageBatchRequestEntryList";
  var _DMBRELe = "DeleteMessageBatchResultEntryList";
  var _DMBREe = "DeleteMessageBatchResultEntry";
  var _DMBRe = "DeleteMessageBatchResult";
  var _DMR = "DeleteMessageRequest";
  var _DQ = "DeleteQueue";
  var _DQR = "DeleteQueueRequest";
  var _DS = "DelaySeconds";
  var _DT = "DataType";
  var _E = "Entries";
  var _EBR = "EmptyBatchRequest";
  var _F = "Failed";
  var _FR = "FailureReason";
  var _GQA = "GetQueueAttributes";
  var _GQAR = "GetQueueAttributesRequest";
  var _GQARe = "GetQueueAttributesResult";
  var _GQU = "GetQueueUrl";
  var _GQUR = "GetQueueUrlRequest";
  var _GQURe = "GetQueueUrlResult";
  var _I = "Id";
  var _IA = "InvalidAddress";
  var _IAN = "InvalidAttributeName";
  var _IAV = "InvalidAttributeValue";
  var _IBEI = "InvalidBatchEntryId";
  var _IIF = "InvalidIdFormat";
  var _IMC = "InvalidMessageContents";
  var _IS = "InvalidSecurity";
  var _K = "Key";
  var _KAD = "KmsAccessDenied";
  var _KD = "KmsDisabled";
  var _KIKU = "KmsInvalidKeyUsage";
  var _KIS = "KmsInvalidState";
  var _KNF = "KmsNotFound";
  var _KOIR = "KmsOptInRequired";
  var _KT = "KmsThrottled";
  var _L = "Label";
  var _LDLSQ = "ListDeadLetterSourceQueues";
  var _LDLSQR = "ListDeadLetterSourceQueuesRequest";
  var _LDLSQRi = "ListDeadLetterSourceQueuesResult";
  var _LMMT = "ListMessageMoveTasks";
  var _LMMTR = "ListMessageMoveTasksRequest";
  var _LMMTRE = "ListMessageMoveTasksResultEntry";
  var _LMMTREL = "ListMessageMoveTasksResultEntryList";
  var _LMMTRi = "ListMessageMoveTasksResult";
  var _LQ = "ListQueues";
  var _LQR = "ListQueuesRequest";
  var _LQRi = "ListQueuesResult";
  var _LQT = "ListQueueTags";
  var _LQTR = "ListQueueTagsRequest";
  var _LQTRi = "ListQueueTagsResult";
  var _M = "Message";
  var _MA = "MessageAttributes";
  var _MAN = "MessageAttributeNames";
  var _MANe = "MessageAttributeName";
  var _MAV = "MessageAttributeValue";
  var _MAe = "MessageAttribute";
  var _MB = "MessageBody";
  var _MBAM = "MessageBodyAttributeMap";
  var _MBSAM = "MessageBodySystemAttributeMap";
  var _MDI = "MessageDeduplicationId";
  var _MDOB = "MD5OfBody";
  var _MDOMA = "MD5OfMessageAttributes";
  var _MDOMB = "MD5OfMessageBody";
  var _MDOMSA = "MD5OfMessageSystemAttributes";
  var _MGI = "MessageGroupId";
  var _MI = "MessageId";
  var _ML = "MessageList";
  var _MNI = "MessageNotInflight";
  var _MNOM = "MaxNumberOfMessages";
  var _MNOMPS = "MaxNumberOfMessagesPerSecond";
  var _MR = "MaxResults";
  var _MSA = "MessageSystemAttributes";
  var _MSAM = "MessageSystemAttributeMap";
  var _MSAN = "MessageSystemAttributeNames";
  var _MSAV = "MessageSystemAttributeValue";
  var _MSAe = "MessageSystemAttribute";
  var _Me = "Messages";
  var _N = "Name";
  var _NT = "NextToken";
  var _OL = "OverLimit";
  var _PQ = "PurgeQueue";
  var _PQIP = "PurgeQueueInProgress";
  var _PQR = "PurgeQueueRequest";
  var _QAM = "QueueAttributeMap";
  var _QDNE = "QueueDoesNotExist";
  var _QDR = "QueueDeletedRecently";
  var _QN = "QueueName";
  var _QNE = "QueueNameExists";
  var _QNP = "QueueNamePrefix";
  var _QOAWSAI = "QueueOwnerAWSAccountId";
  var _QU = "QueueUrl";
  var _QUu = "QueueUrls";
  var _R = "Results";
  var _RH = "ReceiptHandle";
  var _RHII = "ReceiptHandleIsInvalid";
  var _RM = "ReceiveMessage";
  var _RMR = "ReceiveMessageRequest";
  var _RMRe = "ReceiveMessageResult";
  var _RNFE = "ResourceNotFoundException";
  var _RP = "RemovePermission";
  var _RPR = "RemovePermissionRequest";
  var _RRAI = "ReceiveRequestAttemptId";
  var _RT = "RequestThrottled";
  var _S = "Successful";
  var _SA = "SourceArn";
  var _SF = "SenderFault";
  var _SL = "StringList";
  var _SLV = "StringListValues";
  var _SLVt = "StringListValue";
  var _SM = "SendMessage";
  var _SMB = "SendMessageBatch";
  var _SMBR = "SendMessageBatchRequest";
  var _SMBRE = "SendMessageBatchRequestEntry";
  var _SMBREL = "SendMessageBatchRequestEntryList";
  var _SMBRELe = "SendMessageBatchResultEntryList";
  var _SMBREe = "SendMessageBatchResultEntry";
  var _SMBRe = "SendMessageBatchResult";
  var _SMMT = "StartMessageMoveTask";
  var _SMMTR = "StartMessageMoveTaskRequest";
  var _SMMTRt = "StartMessageMoveTaskResult";
  var _SMR = "SendMessageRequest";
  var _SMRe = "SendMessageResult";
  var _SN = "SequenceNumber";
  var _SQA = "SetQueueAttributes";
  var _SQAR = "SetQueueAttributesRequest";
  var _ST = "StartedTimestamp";
  var _SV = "StringValue";
  var _St = "Status";
  var _T = "Tag";
  var _TH = "TaskHandle";
  var _TK = "TagKeys";
  var _TKa = "TagKey";
  var _TM = "TagMap";
  var _TMEIBR = "TooManyEntriesInBatchRequest";
  var _TQ = "TagQueue";
  var _TQR = "TagQueueRequest";
  var _Ta = "Tags";
  var _UO = "UnsupportedOperation";
  var _UQ = "UntagQueue";
  var _UQR = "UntagQueueRequest";
  var _V = "Value";
  var _VT = "VisibilityTimeout";
  var _WTS = "WaitTimeSeconds";
  var _aQE = "awsQueryError";
  var _c = "client";
  var _e = "error";
  var _hE = "httpError";
  var _m = "message";
  var _qU = "queueUrls";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sqs";
  var _t = "tags";
  var _xF = "xmlFlattened";
  var _xN = "xmlName";
  var n0 = "com.amazonaws.sqs";
  var { TypeRegistry } = require_schema();
  var { BatchEntryIdsNotDistinct, BatchRequestTooLong, EmptyBatchRequest, InvalidAddress, InvalidAttributeName, InvalidAttributeValue, InvalidBatchEntryId, InvalidIdFormat, InvalidMessageContents, InvalidSecurity, KmsAccessDenied, KmsDisabled, KmsInvalidKeyUsage, KmsInvalidState, KmsNotFound, KmsOptInRequired, KmsThrottled, MessageNotInflight, OverLimit, PurgeQueueInProgress, QueueDeletedRecently, QueueDoesNotExist, QueueNameExists, ReceiptHandleIsInvalid, RequestThrottled, ResourceNotFoundException, TooManyEntriesInBatchRequest, UnsupportedOperation } = require_errors2();
  var { SQSServiceException } = require_SQSServiceException();
  var _s_registry = TypeRegistry.for(_s);
  var SQSServiceException$ = [-3, _s, "SQSServiceException", 0, [], []];
  exports.SQSServiceException$ = SQSServiceException$;
  _s_registry.registerError(SQSServiceException$, SQSServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var BatchEntryIdsNotDistinct$ = [
    -3,
    n0,
    _BEIND,
    { [_aQE]: [`AWS.SimpleQueueService.BatchEntryIdsNotDistinct`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.BatchEntryIdsNotDistinct$ = BatchEntryIdsNotDistinct$;
  n0_registry.registerError(BatchEntryIdsNotDistinct$, BatchEntryIdsNotDistinct);
  var BatchRequestTooLong$ = [
    -3,
    n0,
    _BRTL,
    { [_aQE]: [`AWS.SimpleQueueService.BatchRequestTooLong`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.BatchRequestTooLong$ = BatchRequestTooLong$;
  n0_registry.registerError(BatchRequestTooLong$, BatchRequestTooLong);
  var EmptyBatchRequest$ = [
    -3,
    n0,
    _EBR,
    { [_aQE]: [`AWS.SimpleQueueService.EmptyBatchRequest`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.EmptyBatchRequest$ = EmptyBatchRequest$;
  n0_registry.registerError(EmptyBatchRequest$, EmptyBatchRequest);
  var InvalidAddress$ = [
    -3,
    n0,
    _IA,
    { [_aQE]: [`InvalidAddress`, 404], [_e]: _c, [_hE]: 404 },
    [_m],
    [0]
  ];
  exports.InvalidAddress$ = InvalidAddress$;
  n0_registry.registerError(InvalidAddress$, InvalidAddress);
  var InvalidAttributeName$ = [
    -3,
    n0,
    _IAN,
    { [_e]: _c },
    [_m],
    [0]
  ];
  exports.InvalidAttributeName$ = InvalidAttributeName$;
  n0_registry.registerError(InvalidAttributeName$, InvalidAttributeName);
  var InvalidAttributeValue$ = [
    -3,
    n0,
    _IAV,
    { [_e]: _c },
    [_m],
    [0]
  ];
  exports.InvalidAttributeValue$ = InvalidAttributeValue$;
  n0_registry.registerError(InvalidAttributeValue$, InvalidAttributeValue);
  var InvalidBatchEntryId$ = [
    -3,
    n0,
    _IBEI,
    { [_aQE]: [`AWS.SimpleQueueService.InvalidBatchEntryId`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidBatchEntryId$ = InvalidBatchEntryId$;
  n0_registry.registerError(InvalidBatchEntryId$, InvalidBatchEntryId);
  var InvalidIdFormat$ = [
    -3,
    n0,
    _IIF,
    { [_e]: _c },
    [],
    []
  ];
  exports.InvalidIdFormat$ = InvalidIdFormat$;
  n0_registry.registerError(InvalidIdFormat$, InvalidIdFormat);
  var InvalidMessageContents$ = [
    -3,
    n0,
    _IMC,
    { [_e]: _c },
    [_m],
    [0]
  ];
  exports.InvalidMessageContents$ = InvalidMessageContents$;
  n0_registry.registerError(InvalidMessageContents$, InvalidMessageContents);
  var InvalidSecurity$ = [
    -3,
    n0,
    _IS,
    { [_aQE]: [`InvalidSecurity`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.InvalidSecurity$ = InvalidSecurity$;
  n0_registry.registerError(InvalidSecurity$, InvalidSecurity);
  var KmsAccessDenied$ = [
    -3,
    n0,
    _KAD,
    { [_aQE]: [`KMS.AccessDeniedException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.KmsAccessDenied$ = KmsAccessDenied$;
  n0_registry.registerError(KmsAccessDenied$, KmsAccessDenied);
  var KmsDisabled$ = [
    -3,
    n0,
    _KD,
    { [_aQE]: [`KMS.DisabledException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.KmsDisabled$ = KmsDisabled$;
  n0_registry.registerError(KmsDisabled$, KmsDisabled);
  var KmsInvalidKeyUsage$ = [
    -3,
    n0,
    _KIKU,
    { [_aQE]: [`KMS.InvalidKeyUsageException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.KmsInvalidKeyUsage$ = KmsInvalidKeyUsage$;
  n0_registry.registerError(KmsInvalidKeyUsage$, KmsInvalidKeyUsage);
  var KmsInvalidState$ = [
    -3,
    n0,
    _KIS,
    { [_aQE]: [`KMS.InvalidStateException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.KmsInvalidState$ = KmsInvalidState$;
  n0_registry.registerError(KmsInvalidState$, KmsInvalidState);
  var KmsNotFound$ = [
    -3,
    n0,
    _KNF,
    { [_aQE]: [`KMS.NotFoundException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.KmsNotFound$ = KmsNotFound$;
  n0_registry.registerError(KmsNotFound$, KmsNotFound);
  var KmsOptInRequired$ = [
    -3,
    n0,
    _KOIR,
    { [_aQE]: [`KMS.OptInRequired`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.KmsOptInRequired$ = KmsOptInRequired$;
  n0_registry.registerError(KmsOptInRequired$, KmsOptInRequired);
  var KmsThrottled$ = [
    -3,
    n0,
    _KT,
    { [_aQE]: [`KMS.ThrottlingException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.KmsThrottled$ = KmsThrottled$;
  n0_registry.registerError(KmsThrottled$, KmsThrottled);
  var MessageNotInflight$ = [
    -3,
    n0,
    _MNI,
    { [_aQE]: [`AWS.SimpleQueueService.MessageNotInflight`, 400], [_e]: _c, [_hE]: 400 },
    [],
    []
  ];
  exports.MessageNotInflight$ = MessageNotInflight$;
  n0_registry.registerError(MessageNotInflight$, MessageNotInflight);
  var OverLimit$ = [
    -3,
    n0,
    _OL,
    { [_aQE]: [`OverLimit`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.OverLimit$ = OverLimit$;
  n0_registry.registerError(OverLimit$, OverLimit);
  var PurgeQueueInProgress$ = [
    -3,
    n0,
    _PQIP,
    { [_aQE]: [`AWS.SimpleQueueService.PurgeQueueInProgress`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.PurgeQueueInProgress$ = PurgeQueueInProgress$;
  n0_registry.registerError(PurgeQueueInProgress$, PurgeQueueInProgress);
  var QueueDeletedRecently$ = [
    -3,
    n0,
    _QDR,
    { [_aQE]: [`AWS.SimpleQueueService.QueueDeletedRecently`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.QueueDeletedRecently$ = QueueDeletedRecently$;
  n0_registry.registerError(QueueDeletedRecently$, QueueDeletedRecently);
  var QueueDoesNotExist$ = [
    -3,
    n0,
    _QDNE,
    { [_aQE]: [`AWS.SimpleQueueService.NonExistentQueue`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.QueueDoesNotExist$ = QueueDoesNotExist$;
  n0_registry.registerError(QueueDoesNotExist$, QueueDoesNotExist);
  var QueueNameExists$ = [
    -3,
    n0,
    _QNE,
    { [_aQE]: [`QueueAlreadyExists`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.QueueNameExists$ = QueueNameExists$;
  n0_registry.registerError(QueueNameExists$, QueueNameExists);
  var ReceiptHandleIsInvalid$ = [
    -3,
    n0,
    _RHII,
    { [_aQE]: [`ReceiptHandleIsInvalid`, 404], [_e]: _c, [_hE]: 404 },
    [_m],
    [0]
  ];
  exports.ReceiptHandleIsInvalid$ = ReceiptHandleIsInvalid$;
  n0_registry.registerError(ReceiptHandleIsInvalid$, ReceiptHandleIsInvalid);
  var RequestThrottled$ = [
    -3,
    n0,
    _RT,
    { [_aQE]: [`RequestThrottled`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.RequestThrottled$ = RequestThrottled$;
  n0_registry.registerError(RequestThrottled$, RequestThrottled);
  var ResourceNotFoundException$ = [
    -3,
    n0,
    _RNFE,
    { [_aQE]: [`ResourceNotFoundException`, 404], [_e]: _c, [_hE]: 404 },
    [_m],
    [0]
  ];
  exports.ResourceNotFoundException$ = ResourceNotFoundException$;
  n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
  var TooManyEntriesInBatchRequest$ = [
    -3,
    n0,
    _TMEIBR,
    { [_aQE]: [`AWS.SimpleQueueService.TooManyEntriesInBatchRequest`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.TooManyEntriesInBatchRequest$ = TooManyEntriesInBatchRequest$;
  n0_registry.registerError(TooManyEntriesInBatchRequest$, TooManyEntriesInBatchRequest);
  var UnsupportedOperation$ = [
    -3,
    n0,
    _UO,
    { [_aQE]: [`AWS.SimpleQueueService.UnsupportedOperation`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.UnsupportedOperation$ = UnsupportedOperation$;
  n0_registry.registerError(UnsupportedOperation$, UnsupportedOperation);
  exports.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var AddPermissionRequest$ = [
    3,
    n0,
    _APR,
    0,
    [_QU, _L, _AWSAI, _A],
    [0, 0, [64 | 0, { [_xF]: 1, [_xN]: _AWSAIc }], [64 | 0, { [_xF]: 1, [_xN]: _AN }]],
    4
  ];
  exports.AddPermissionRequest$ = AddPermissionRequest$;
  var BatchResultErrorEntry$ = [
    3,
    n0,
    _BREE,
    0,
    [_I, _SF, _C, _M],
    [0, 2, 0, 0],
    3
  ];
  exports.BatchResultErrorEntry$ = BatchResultErrorEntry$;
  var CancelMessageMoveTaskRequest$ = [
    3,
    n0,
    _CMMTR,
    0,
    [_TH],
    [0],
    1
  ];
  exports.CancelMessageMoveTaskRequest$ = CancelMessageMoveTaskRequest$;
  var CancelMessageMoveTaskResult$ = [
    3,
    n0,
    _CMMTRa,
    0,
    [_ANOMM],
    [1]
  ];
  exports.CancelMessageMoveTaskResult$ = CancelMessageMoveTaskResult$;
  var ChangeMessageVisibilityBatchRequest$ = [
    3,
    n0,
    _CMVBR,
    0,
    [_QU, _E],
    [0, [() => ChangeMessageVisibilityBatchRequestEntryList, { [_xF]: 1, [_xN]: _CMVBRE }]],
    2
  ];
  exports.ChangeMessageVisibilityBatchRequest$ = ChangeMessageVisibilityBatchRequest$;
  var ChangeMessageVisibilityBatchRequestEntry$ = [
    3,
    n0,
    _CMVBRE,
    0,
    [_I, _RH, _VT],
    [0, 0, 1],
    2
  ];
  exports.ChangeMessageVisibilityBatchRequestEntry$ = ChangeMessageVisibilityBatchRequestEntry$;
  var ChangeMessageVisibilityBatchResult$ = [
    3,
    n0,
    _CMVBRh,
    0,
    [_S, _F],
    [[() => ChangeMessageVisibilityBatchResultEntryList, { [_xF]: 1, [_xN]: _CMVBREh }], [() => BatchResultErrorEntryList, { [_xF]: 1, [_xN]: _BREE }]],
    2
  ];
  exports.ChangeMessageVisibilityBatchResult$ = ChangeMessageVisibilityBatchResult$;
  var ChangeMessageVisibilityBatchResultEntry$ = [
    3,
    n0,
    _CMVBREh,
    0,
    [_I],
    [0],
    1
  ];
  exports.ChangeMessageVisibilityBatchResultEntry$ = ChangeMessageVisibilityBatchResultEntry$;
  var ChangeMessageVisibilityRequest$ = [
    3,
    n0,
    _CMVR,
    0,
    [_QU, _RH, _VT],
    [0, 0, 1],
    3
  ];
  exports.ChangeMessageVisibilityRequest$ = ChangeMessageVisibilityRequest$;
  var CreateQueueRequest$ = [
    3,
    n0,
    _CQR,
    0,
    [_QN, _At, _t],
    [0, [() => QueueAttributeMap, { [_xF]: 1, [_xN]: _Att }], [() => TagMap, { [_xF]: 1, [_xN]: _T }]],
    1
  ];
  exports.CreateQueueRequest$ = CreateQueueRequest$;
  var CreateQueueResult$ = [
    3,
    n0,
    _CQRr,
    0,
    [_QU],
    [0]
  ];
  exports.CreateQueueResult$ = CreateQueueResult$;
  var DeleteMessageBatchRequest$ = [
    3,
    n0,
    _DMBR,
    0,
    [_QU, _E],
    [0, [() => DeleteMessageBatchRequestEntryList, { [_xF]: 1, [_xN]: _DMBRE }]],
    2
  ];
  exports.DeleteMessageBatchRequest$ = DeleteMessageBatchRequest$;
  var DeleteMessageBatchRequestEntry$ = [
    3,
    n0,
    _DMBRE,
    0,
    [_I, _RH],
    [0, 0],
    2
  ];
  exports.DeleteMessageBatchRequestEntry$ = DeleteMessageBatchRequestEntry$;
  var DeleteMessageBatchResult$ = [
    3,
    n0,
    _DMBRe,
    0,
    [_S, _F],
    [[() => DeleteMessageBatchResultEntryList, { [_xF]: 1, [_xN]: _DMBREe }], [() => BatchResultErrorEntryList, { [_xF]: 1, [_xN]: _BREE }]],
    2
  ];
  exports.DeleteMessageBatchResult$ = DeleteMessageBatchResult$;
  var DeleteMessageBatchResultEntry$ = [
    3,
    n0,
    _DMBREe,
    0,
    [_I],
    [0],
    1
  ];
  exports.DeleteMessageBatchResultEntry$ = DeleteMessageBatchResultEntry$;
  var DeleteMessageRequest$ = [
    3,
    n0,
    _DMR,
    0,
    [_QU, _RH],
    [0, 0],
    2
  ];
  exports.DeleteMessageRequest$ = DeleteMessageRequest$;
  var DeleteQueueRequest$ = [
    3,
    n0,
    _DQR,
    0,
    [_QU],
    [0],
    1
  ];
  exports.DeleteQueueRequest$ = DeleteQueueRequest$;
  var GetQueueAttributesRequest$ = [
    3,
    n0,
    _GQAR,
    0,
    [_QU, _ANt],
    [0, [64 | 0, { [_xF]: 1, [_xN]: _ANtt }]],
    1
  ];
  exports.GetQueueAttributesRequest$ = GetQueueAttributesRequest$;
  var GetQueueAttributesResult$ = [
    3,
    n0,
    _GQARe,
    0,
    [_At],
    [[() => QueueAttributeMap, { [_xF]: 1, [_xN]: _Att }]]
  ];
  exports.GetQueueAttributesResult$ = GetQueueAttributesResult$;
  var GetQueueUrlRequest$ = [
    3,
    n0,
    _GQUR,
    0,
    [_QN, _QOAWSAI],
    [0, 0],
    1
  ];
  exports.GetQueueUrlRequest$ = GetQueueUrlRequest$;
  var GetQueueUrlResult$ = [
    3,
    n0,
    _GQURe,
    0,
    [_QU],
    [0]
  ];
  exports.GetQueueUrlResult$ = GetQueueUrlResult$;
  var ListDeadLetterSourceQueuesRequest$ = [
    3,
    n0,
    _LDLSQR,
    0,
    [_QU, _NT, _MR],
    [0, 0, 1],
    1
  ];
  exports.ListDeadLetterSourceQueuesRequest$ = ListDeadLetterSourceQueuesRequest$;
  var ListDeadLetterSourceQueuesResult$ = [
    3,
    n0,
    _LDLSQRi,
    0,
    [_qU, _NT],
    [[64 | 0, { [_xF]: 1, [_xN]: _QU }], 0],
    1
  ];
  exports.ListDeadLetterSourceQueuesResult$ = ListDeadLetterSourceQueuesResult$;
  var ListMessageMoveTasksRequest$ = [
    3,
    n0,
    _LMMTR,
    0,
    [_SA, _MR],
    [0, 1],
    1
  ];
  exports.ListMessageMoveTasksRequest$ = ListMessageMoveTasksRequest$;
  var ListMessageMoveTasksResult$ = [
    3,
    n0,
    _LMMTRi,
    { [_xN]: _LMMTRi },
    [_R],
    [[() => ListMessageMoveTasksResultEntryList, { [_xF]: 1, [_xN]: _LMMTRE }]]
  ];
  exports.ListMessageMoveTasksResult$ = ListMessageMoveTasksResult$;
  var ListMessageMoveTasksResultEntry$ = [
    3,
    n0,
    _LMMTRE,
    0,
    [_TH, _St, _SA, _DA, _MNOMPS, _ANOMM, _ANOMTM, _FR, _ST],
    [0, 0, 0, 0, 1, 1, 1, 0, 1]
  ];
  exports.ListMessageMoveTasksResultEntry$ = ListMessageMoveTasksResultEntry$;
  var ListQueuesRequest$ = [
    3,
    n0,
    _LQR,
    0,
    [_QNP, _NT, _MR],
    [0, 0, 1]
  ];
  exports.ListQueuesRequest$ = ListQueuesRequest$;
  var ListQueuesResult$ = [
    3,
    n0,
    _LQRi,
    0,
    [_QUu, _NT],
    [[64 | 0, { [_xF]: 1, [_xN]: _QU }], 0]
  ];
  exports.ListQueuesResult$ = ListQueuesResult$;
  var ListQueueTagsRequest$ = [
    3,
    n0,
    _LQTR,
    0,
    [_QU],
    [0],
    1
  ];
  exports.ListQueueTagsRequest$ = ListQueueTagsRequest$;
  var ListQueueTagsResult$ = [
    3,
    n0,
    _LQTRi,
    0,
    [_Ta],
    [[() => TagMap, { [_xF]: 1, [_xN]: _T }]]
  ];
  exports.ListQueueTagsResult$ = ListQueueTagsResult$;
  var Message$ = [
    3,
    n0,
    _M,
    0,
    [_MI, _RH, _MDOB, _B, _At, _MDOMA, _MA],
    [0, 0, 0, 0, [() => MessageSystemAttributeMap, { [_xF]: 1, [_xN]: _Att }], 0, [() => MessageBodyAttributeMap, { [_xF]: 1, [_xN]: _MAe }]]
  ];
  exports.Message$ = Message$;
  var MessageAttributeValue$ = [
    3,
    n0,
    _MAV,
    0,
    [_DT, _SV, _BV, _SLV, _BLV],
    [0, 0, 21, [() => StringList, { [_xF]: 1, [_xN]: _SLVt }], [() => BinaryList, { [_xF]: 1, [_xN]: _BLVi }]],
    1
  ];
  exports.MessageAttributeValue$ = MessageAttributeValue$;
  var MessageSystemAttributeValue$ = [
    3,
    n0,
    _MSAV,
    0,
    [_DT, _SV, _BV, _SLV, _BLV],
    [0, 0, 21, [() => StringList, { [_xF]: 1, [_xN]: _SLVt }], [() => BinaryList, { [_xF]: 1, [_xN]: _BLVi }]],
    1
  ];
  exports.MessageSystemAttributeValue$ = MessageSystemAttributeValue$;
  var PurgeQueueRequest$ = [
    3,
    n0,
    _PQR,
    0,
    [_QU],
    [0],
    1
  ];
  exports.PurgeQueueRequest$ = PurgeQueueRequest$;
  var ReceiveMessageRequest$ = [
    3,
    n0,
    _RMR,
    0,
    [_QU, _ANt, _MSAN, _MAN, _MNOM, _VT, _WTS, _RRAI],
    [0, [64 | 0, { [_xF]: 1, [_xN]: _ANtt }], [64 | 0, { [_xF]: 1, [_xN]: _ANtt }], [64 | 0, { [_xF]: 1, [_xN]: _MANe }], 1, 1, 1, 0],
    1
  ];
  exports.ReceiveMessageRequest$ = ReceiveMessageRequest$;
  var ReceiveMessageResult$ = [
    3,
    n0,
    _RMRe,
    0,
    [_Me],
    [[() => MessageList, { [_xF]: 1, [_xN]: _M }]]
  ];
  exports.ReceiveMessageResult$ = ReceiveMessageResult$;
  var RemovePermissionRequest$ = [
    3,
    n0,
    _RPR,
    0,
    [_QU, _L],
    [0, 0],
    2
  ];
  exports.RemovePermissionRequest$ = RemovePermissionRequest$;
  var SendMessageBatchRequest$ = [
    3,
    n0,
    _SMBR,
    0,
    [_QU, _E],
    [0, [() => SendMessageBatchRequestEntryList, { [_xF]: 1, [_xN]: _SMBRE }]],
    2
  ];
  exports.SendMessageBatchRequest$ = SendMessageBatchRequest$;
  var SendMessageBatchRequestEntry$ = [
    3,
    n0,
    _SMBRE,
    0,
    [_I, _MB, _DS, _MA, _MSA, _MDI, _MGI],
    [0, 0, 1, [() => MessageBodyAttributeMap, { [_xF]: 1, [_xN]: _MAe }], [() => MessageBodySystemAttributeMap, { [_xF]: 1, [_xN]: _MSAe }], 0, 0],
    2
  ];
  exports.SendMessageBatchRequestEntry$ = SendMessageBatchRequestEntry$;
  var SendMessageBatchResult$ = [
    3,
    n0,
    _SMBRe,
    0,
    [_S, _F],
    [[() => SendMessageBatchResultEntryList, { [_xF]: 1, [_xN]: _SMBREe }], [() => BatchResultErrorEntryList, { [_xF]: 1, [_xN]: _BREE }]],
    2
  ];
  exports.SendMessageBatchResult$ = SendMessageBatchResult$;
  var SendMessageBatchResultEntry$ = [
    3,
    n0,
    _SMBREe,
    0,
    [_I, _MI, _MDOMB, _MDOMA, _MDOMSA, _SN],
    [0, 0, 0, 0, 0, 0],
    3
  ];
  exports.SendMessageBatchResultEntry$ = SendMessageBatchResultEntry$;
  var SendMessageRequest$ = [
    3,
    n0,
    _SMR,
    0,
    [_QU, _MB, _DS, _MA, _MSA, _MDI, _MGI],
    [0, 0, 1, [() => MessageBodyAttributeMap, { [_xF]: 1, [_xN]: _MAe }], [() => MessageBodySystemAttributeMap, { [_xF]: 1, [_xN]: _MSAe }], 0, 0],
    2
  ];
  exports.SendMessageRequest$ = SendMessageRequest$;
  var SendMessageResult$ = [
    3,
    n0,
    _SMRe,
    0,
    [_MDOMB, _MDOMA, _MDOMSA, _MI, _SN],
    [0, 0, 0, 0, 0]
  ];
  exports.SendMessageResult$ = SendMessageResult$;
  var SetQueueAttributesRequest$ = [
    3,
    n0,
    _SQAR,
    0,
    [_QU, _At],
    [0, [() => QueueAttributeMap, { [_xF]: 1, [_xN]: _Att }]],
    2
  ];
  exports.SetQueueAttributesRequest$ = SetQueueAttributesRequest$;
  var StartMessageMoveTaskRequest$ = [
    3,
    n0,
    _SMMTR,
    0,
    [_SA, _DA, _MNOMPS],
    [0, 0, 1],
    1
  ];
  exports.StartMessageMoveTaskRequest$ = StartMessageMoveTaskRequest$;
  var StartMessageMoveTaskResult$ = [
    3,
    n0,
    _SMMTRt,
    0,
    [_TH],
    [0]
  ];
  exports.StartMessageMoveTaskResult$ = StartMessageMoveTaskResult$;
  var TagQueueRequest$ = [
    3,
    n0,
    _TQR,
    0,
    [_QU, _Ta],
    [0, [() => TagMap, { [_xF]: 1, [_xN]: _T }]],
    2
  ];
  exports.TagQueueRequest$ = TagQueueRequest$;
  var UntagQueueRequest$ = [
    3,
    n0,
    _UQR,
    0,
    [_QU, _TK],
    [0, [64 | 0, { [_xF]: 1, [_xN]: _TKa }]],
    2
  ];
  exports.UntagQueueRequest$ = UntagQueueRequest$;
  var __Unit = "unit";
  var ActionNameList = 64 | 0;
  var AttributeNameList = 64 | 0;
  var AWSAccountIdList = 64 | 0;
  var BatchResultErrorEntryList = [
    1,
    n0,
    _BREEL,
    0,
    () => BatchResultErrorEntry$
  ];
  var BinaryList = [
    1,
    n0,
    _BL,
    0,
    [
      21,
      { [_xN]: _BLVi }
    ]
  ];
  var ChangeMessageVisibilityBatchRequestEntryList = [
    1,
    n0,
    _CMVBREL,
    0,
    () => ChangeMessageVisibilityBatchRequestEntry$
  ];
  var ChangeMessageVisibilityBatchResultEntryList = [
    1,
    n0,
    _CMVBRELh,
    0,
    () => ChangeMessageVisibilityBatchResultEntry$
  ];
  var DeleteMessageBatchRequestEntryList = [
    1,
    n0,
    _DMBREL,
    0,
    () => DeleteMessageBatchRequestEntry$
  ];
  var DeleteMessageBatchResultEntryList = [
    1,
    n0,
    _DMBRELe,
    0,
    () => DeleteMessageBatchResultEntry$
  ];
  var ListMessageMoveTasksResultEntryList = [
    1,
    n0,
    _LMMTREL,
    0,
    () => ListMessageMoveTasksResultEntry$
  ];
  var MessageAttributeNameList = 64 | 0;
  var MessageList = [
    1,
    n0,
    _ML,
    0,
    [
      () => Message$,
      0
    ]
  ];
  var MessageSystemAttributeList = 64 | 0;
  var QueueUrlList = 64 | 0;
  var SendMessageBatchRequestEntryList = [
    1,
    n0,
    _SMBREL,
    0,
    [
      () => SendMessageBatchRequestEntry$,
      0
    ]
  ];
  var SendMessageBatchResultEntryList = [
    1,
    n0,
    _SMBRELe,
    0,
    () => SendMessageBatchResultEntry$
  ];
  var StringList = [
    1,
    n0,
    _SL,
    0,
    [
      0,
      { [_xN]: _SLVt }
    ]
  ];
  var TagKeyList = 64 | 0;
  var MessageBodyAttributeMap = [
    2,
    n0,
    _MBAM,
    0,
    [
      0,
      { [_xN]: _N }
    ],
    [
      () => MessageAttributeValue$,
      { [_xN]: _V }
    ]
  ];
  var MessageBodySystemAttributeMap = [
    2,
    n0,
    _MBSAM,
    0,
    [
      0,
      { [_xN]: _N }
    ],
    [
      () => MessageSystemAttributeValue$,
      { [_xN]: _V }
    ]
  ];
  var MessageSystemAttributeMap = [
    2,
    n0,
    _MSAM,
    0,
    [
      0,
      { [_xN]: _N }
    ],
    [
      0,
      { [_xN]: _V }
    ]
  ];
  var QueueAttributeMap = [
    2,
    n0,
    _QAM,
    0,
    [
      0,
      { [_xN]: _N }
    ],
    [
      0,
      { [_xN]: _V }
    ]
  ];
  var TagMap = [
    2,
    n0,
    _TM,
    0,
    [
      0,
      { [_xN]: _K }
    ],
    [
      0,
      { [_xN]: _V }
    ]
  ];
  exports.AddPermission$ = [
    9,
    n0,
    _AP,
    0,
    () => AddPermissionRequest$,
    () => __Unit
  ];
  exports.CancelMessageMoveTask$ = [
    9,
    n0,
    _CMMT,
    0,
    () => CancelMessageMoveTaskRequest$,
    () => CancelMessageMoveTaskResult$
  ];
  exports.ChangeMessageVisibility$ = [
    9,
    n0,
    _CMV,
    0,
    () => ChangeMessageVisibilityRequest$,
    () => __Unit
  ];
  exports.ChangeMessageVisibilityBatch$ = [
    9,
    n0,
    _CMVB,
    0,
    () => ChangeMessageVisibilityBatchRequest$,
    () => ChangeMessageVisibilityBatchResult$
  ];
  exports.CreateQueue$ = [
    9,
    n0,
    _CQ,
    0,
    () => CreateQueueRequest$,
    () => CreateQueueResult$
  ];
  exports.DeleteMessage$ = [
    9,
    n0,
    _DM,
    0,
    () => DeleteMessageRequest$,
    () => __Unit
  ];
  exports.DeleteMessageBatch$ = [
    9,
    n0,
    _DMB,
    0,
    () => DeleteMessageBatchRequest$,
    () => DeleteMessageBatchResult$
  ];
  exports.DeleteQueue$ = [
    9,
    n0,
    _DQ,
    0,
    () => DeleteQueueRequest$,
    () => __Unit
  ];
  exports.GetQueueAttributes$ = [
    9,
    n0,
    _GQA,
    0,
    () => GetQueueAttributesRequest$,
    () => GetQueueAttributesResult$
  ];
  exports.GetQueueUrl$ = [
    9,
    n0,
    _GQU,
    0,
    () => GetQueueUrlRequest$,
    () => GetQueueUrlResult$
  ];
  exports.ListDeadLetterSourceQueues$ = [
    9,
    n0,
    _LDLSQ,
    0,
    () => ListDeadLetterSourceQueuesRequest$,
    () => ListDeadLetterSourceQueuesResult$
  ];
  exports.ListMessageMoveTasks$ = [
    9,
    n0,
    _LMMT,
    0,
    () => ListMessageMoveTasksRequest$,
    () => ListMessageMoveTasksResult$
  ];
  exports.ListQueues$ = [
    9,
    n0,
    _LQ,
    0,
    () => ListQueuesRequest$,
    () => ListQueuesResult$
  ];
  exports.ListQueueTags$ = [
    9,
    n0,
    _LQT,
    0,
    () => ListQueueTagsRequest$,
    () => ListQueueTagsResult$
  ];
  exports.PurgeQueue$ = [
    9,
    n0,
    _PQ,
    0,
    () => PurgeQueueRequest$,
    () => __Unit
  ];
  exports.ReceiveMessage$ = [
    9,
    n0,
    _RM,
    0,
    () => ReceiveMessageRequest$,
    () => ReceiveMessageResult$
  ];
  exports.RemovePermission$ = [
    9,
    n0,
    _RP,
    0,
    () => RemovePermissionRequest$,
    () => __Unit
  ];
  exports.SendMessage$ = [
    9,
    n0,
    _SM,
    0,
    () => SendMessageRequest$,
    () => SendMessageResult$
  ];
  exports.SendMessageBatch$ = [
    9,
    n0,
    _SMB,
    0,
    () => SendMessageBatchRequest$,
    () => SendMessageBatchResult$
  ];
  exports.SetQueueAttributes$ = [
    9,
    n0,
    _SQA,
    0,
    () => SetQueueAttributesRequest$,
    () => __Unit
  ];
  exports.StartMessageMoveTask$ = [
    9,
    n0,
    _SMMT,
    0,
    () => StartMessageMoveTaskRequest$,
    () => StartMessageMoveTaskResult$
  ];
  exports.TagQueue$ = [
    9,
    n0,
    _TQ,
    0,
    () => TagQueueRequest$,
    () => __Unit
  ];
  exports.UntagQueue$ = [
    9,
    n0,
    _UQ,
    0,
    () => UntagQueueRequest$,
    () => __Unit
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared2 = __commonJS((exports) => {
  var { AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsJson1_0Protocol } = require_protocols2();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultSQSHttpAuthSchemeProvider } = require_httpAuthSchemeProvider2();
  var { defaultEndpointResolver } = require_endpointResolver2();
  var { errorTypeRegistries } = require_schemas_02();
  exports.getRuntimeConfig = (config) => {
    return {
      apiVersion: "2012-11-05",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSQSHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsJson1_0Protocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.sqs",
        errorTypeRegistries,
        version: "2012-11-05",
        serviceTarget: "AmazonSQS",
        awsQueryCompatible: true
      },
      serviceId: config?.serviceId ?? "SQS",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/runtimeConfig.js
var require_runtimeConfig2 = __commonJS((exports) => {
  var packageInfo = require_package3();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require_retry();
  var { calculateBodyLength, Hash } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared2();
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      md5: config?.md5 ?? Hash.bind(null, "md5"),
      region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sqs@3.1074.0/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js
var require_dist_cjs22 = __commonJS((exports) => {
  var __exportStar = (m, e) => {
    Object.assign(e, m);
  };
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getLongPollPlugin } = require_client4();
  var { resolveQueueUrlConfig, getQueueUrlPlugin, getReceiveMessagePlugin, getSendMessageBatchPlugin, getSendMessagePlugin } = require_dist_cjs21();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs5();
  var { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveRegionConfig } = require_config2();
  var { resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultSQSHttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider2();
  var { getRuntimeConfig } = require_runtimeConfig2();
  var { AddPermission$, CancelMessageMoveTask$, ChangeMessageVisibilityBatch$, ChangeMessageVisibility$, CreateQueue$, DeleteMessageBatch$, DeleteMessage$, DeleteQueue$, GetQueueAttributes$, GetQueueUrl$, ListDeadLetterSourceQueues$, ListMessageMoveTasks$, ListQueues$, ListQueueTags$, PurgeQueue$, ReceiveMessage$, RemovePermission$, SendMessageBatch$, SendMessage$, SetQueueAttributes$, StartMessageMoveTask$, TagQueue$, UntagQueue$ } = require_schemas_02();
  __exportStar(require_schemas_02(), exports);
  __exportStar(require_errors2(), exports);
  var { SQSServiceException } = require_SQSServiceException();
  exports.SQSServiceException = SQSServiceException;
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "sqs"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class SQSClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveQueueUrlConfig(_config_6);
      const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
      const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
      this.config = _config_9;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getQueueUrlPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSQSHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class AddPermissionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "AddPermission", {}).n("SQSClient", "AddPermissionCommand").sc(AddPermission$).build() {
  }

  class CancelMessageMoveTaskCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "CancelMessageMoveTask", {}).n("SQSClient", "CancelMessageMoveTaskCommand").sc(CancelMessageMoveTask$).build() {
  }

  class ChangeMessageVisibilityBatchCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "ChangeMessageVisibilityBatch", {}).n("SQSClient", "ChangeMessageVisibilityBatchCommand").sc(ChangeMessageVisibilityBatch$).build() {
  }

  class ChangeMessageVisibilityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "ChangeMessageVisibility", {}).n("SQSClient", "ChangeMessageVisibilityCommand").sc(ChangeMessageVisibility$).build() {
  }

  class CreateQueueCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "CreateQueue", {}).n("SQSClient", "CreateQueueCommand").sc(CreateQueue$).build() {
  }

  class DeleteMessageBatchCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "DeleteMessageBatch", {}).n("SQSClient", "DeleteMessageBatchCommand").sc(DeleteMessageBatch$).build() {
  }

  class DeleteMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "DeleteMessage", {}).n("SQSClient", "DeleteMessageCommand").sc(DeleteMessage$).build() {
  }

  class DeleteQueueCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "DeleteQueue", {}).n("SQSClient", "DeleteQueueCommand").sc(DeleteQueue$).build() {
  }

  class GetQueueAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "GetQueueAttributes", {}).n("SQSClient", "GetQueueAttributesCommand").sc(GetQueueAttributes$).build() {
  }

  class GetQueueUrlCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "GetQueueUrl", {}).n("SQSClient", "GetQueueUrlCommand").sc(GetQueueUrl$).build() {
  }

  class ListDeadLetterSourceQueuesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "ListDeadLetterSourceQueues", {}).n("SQSClient", "ListDeadLetterSourceQueuesCommand").sc(ListDeadLetterSourceQueues$).build() {
  }

  class ListMessageMoveTasksCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "ListMessageMoveTasks", {}).n("SQSClient", "ListMessageMoveTasksCommand").sc(ListMessageMoveTasks$).build() {
  }

  class ListQueuesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "ListQueues", {}).n("SQSClient", "ListQueuesCommand").sc(ListQueues$).build() {
  }

  class ListQueueTagsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "ListQueueTags", {}).n("SQSClient", "ListQueueTagsCommand").sc(ListQueueTags$).build() {
  }

  class PurgeQueueCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "PurgeQueue", {}).n("SQSClient", "PurgeQueueCommand").sc(PurgeQueue$).build() {
  }

  class ReceiveMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [
      getEndpointPlugin(config, Command2.getEndpointParameterInstructions()),
      getReceiveMessagePlugin(config),
      getLongPollPlugin(config)
    ];
  }).s("AmazonSQS", "ReceiveMessage", {}).n("SQSClient", "ReceiveMessageCommand").sc(ReceiveMessage$).build() {
  }

  class RemovePermissionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "RemovePermission", {}).n("SQSClient", "RemovePermissionCommand").sc(RemovePermission$).build() {
  }

  class SendMessageBatchCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [
      getEndpointPlugin(config, Command2.getEndpointParameterInstructions()),
      getSendMessageBatchPlugin(config)
    ];
  }).s("AmazonSQS", "SendMessageBatch", {}).n("SQSClient", "SendMessageBatchCommand").sc(SendMessageBatch$).build() {
  }

  class SendMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [
      getEndpointPlugin(config, Command2.getEndpointParameterInstructions()),
      getSendMessagePlugin(config)
    ];
  }).s("AmazonSQS", "SendMessage", {}).n("SQSClient", "SendMessageCommand").sc(SendMessage$).build() {
  }

  class SetQueueAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "SetQueueAttributes", {}).n("SQSClient", "SetQueueAttributesCommand").sc(SetQueueAttributes$).build() {
  }

  class StartMessageMoveTaskCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "StartMessageMoveTask", {}).n("SQSClient", "StartMessageMoveTaskCommand").sc(StartMessageMoveTask$).build() {
  }

  class TagQueueCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "TagQueue", {}).n("SQSClient", "TagQueueCommand").sc(TagQueue$).build() {
  }

  class UntagQueueCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AmazonSQS", "UntagQueue", {}).n("SQSClient", "UntagQueueCommand").sc(UntagQueue$).build() {
  }
  var paginateListDeadLetterSourceQueues = createPaginator(SQSClient, ListDeadLetterSourceQueuesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListQueues = createPaginator(SQSClient, ListQueuesCommand, "NextToken", "NextToken", "MaxResults");
  var commands = {
    AddPermissionCommand,
    CancelMessageMoveTaskCommand,
    ChangeMessageVisibilityCommand,
    ChangeMessageVisibilityBatchCommand,
    CreateQueueCommand,
    DeleteMessageCommand,
    DeleteMessageBatchCommand,
    DeleteQueueCommand,
    GetQueueAttributesCommand,
    GetQueueUrlCommand,
    ListDeadLetterSourceQueuesCommand,
    ListMessageMoveTasksCommand,
    ListQueuesCommand,
    ListQueueTagsCommand,
    PurgeQueueCommand,
    ReceiveMessageCommand,
    RemovePermissionCommand,
    SendMessageCommand,
    SendMessageBatchCommand,
    SetQueueAttributesCommand,
    StartMessageMoveTaskCommand,
    TagQueueCommand,
    UntagQueueCommand
  };
  var paginators = {
    paginateListDeadLetterSourceQueues,
    paginateListQueues
  };

  class SQS extends SQSClient {
  }
  createAggregatedClient(commands, SQS, { paginators });
  var QueueAttributeName = {
    All: "All",
    ApproximateNumberOfMessages: "ApproximateNumberOfMessages",
    ApproximateNumberOfMessagesDelayed: "ApproximateNumberOfMessagesDelayed",
    ApproximateNumberOfMessagesNotVisible: "ApproximateNumberOfMessagesNotVisible",
    ContentBasedDeduplication: "ContentBasedDeduplication",
    CreatedTimestamp: "CreatedTimestamp",
    DeduplicationScope: "DeduplicationScope",
    DelaySeconds: "DelaySeconds",
    FifoQueue: "FifoQueue",
    FifoThroughputLimit: "FifoThroughputLimit",
    KmsDataKeyReusePeriodSeconds: "KmsDataKeyReusePeriodSeconds",
    KmsMasterKeyId: "KmsMasterKeyId",
    LastModifiedTimestamp: "LastModifiedTimestamp",
    MaximumMessageSize: "MaximumMessageSize",
    MessageRetentionPeriod: "MessageRetentionPeriod",
    Policy: "Policy",
    QueueArn: "QueueArn",
    ReceiveMessageWaitTimeSeconds: "ReceiveMessageWaitTimeSeconds",
    RedriveAllowPolicy: "RedriveAllowPolicy",
    RedrivePolicy: "RedrivePolicy",
    SqsManagedSseEnabled: "SqsManagedSseEnabled",
    VisibilityTimeout: "VisibilityTimeout"
  };
  var MessageSystemAttributeName = {
    AWSTraceHeader: "AWSTraceHeader",
    All: "All",
    ApproximateFirstReceiveTimestamp: "ApproximateFirstReceiveTimestamp",
    ApproximateReceiveCount: "ApproximateReceiveCount",
    DeadLetterQueueSourceArn: "DeadLetterQueueSourceArn",
    MessageDeduplicationId: "MessageDeduplicationId",
    MessageGroupId: "MessageGroupId",
    SenderId: "SenderId",
    SentTimestamp: "SentTimestamp",
    SequenceNumber: "SequenceNumber"
  };
  var MessageSystemAttributeNameForSends = {
    AWSTraceHeader: "AWSTraceHeader"
  };
  exports.AddPermissionCommand = AddPermissionCommand;
  exports.CancelMessageMoveTaskCommand = CancelMessageMoveTaskCommand;
  exports.ChangeMessageVisibilityBatchCommand = ChangeMessageVisibilityBatchCommand;
  exports.ChangeMessageVisibilityCommand = ChangeMessageVisibilityCommand;
  exports.CreateQueueCommand = CreateQueueCommand;
  exports.DeleteMessageBatchCommand = DeleteMessageBatchCommand;
  exports.DeleteMessageCommand = DeleteMessageCommand;
  exports.DeleteQueueCommand = DeleteQueueCommand;
  exports.GetQueueAttributesCommand = GetQueueAttributesCommand;
  exports.GetQueueUrlCommand = GetQueueUrlCommand;
  exports.ListDeadLetterSourceQueuesCommand = ListDeadLetterSourceQueuesCommand;
  exports.ListMessageMoveTasksCommand = ListMessageMoveTasksCommand;
  exports.ListQueueTagsCommand = ListQueueTagsCommand;
  exports.ListQueuesCommand = ListQueuesCommand;
  exports.MessageSystemAttributeName = MessageSystemAttributeName;
  exports.MessageSystemAttributeNameForSends = MessageSystemAttributeNameForSends;
  exports.PurgeQueueCommand = PurgeQueueCommand;
  exports.QueueAttributeName = QueueAttributeName;
  exports.ReceiveMessageCommand = ReceiveMessageCommand;
  exports.RemovePermissionCommand = RemovePermissionCommand;
  exports.SQS = SQS;
  exports.SQSClient = SQSClient;
  exports.SendMessageBatchCommand = SendMessageBatchCommand;
  exports.SendMessageCommand = SendMessageCommand;
  exports.SetQueueAttributesCommand = SetQueueAttributesCommand;
  exports.StartMessageMoveTaskCommand = StartMessageMoveTaskCommand;
  exports.TagQueueCommand = TagQueueCommand;
  exports.UntagQueueCommand = UntagQueueCommand;
  exports.paginateListDeadLetterSourceQueues = paginateListDeadLetterSourceQueues;
  exports.paginateListQueues = paginateListQueues;
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider3 = __commonJS((exports) => {
  var { resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { getSmithyContext, normalizeProvider } = require_client3();
  exports.defaultPinpointSMSVoiceV2HttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "sms-voice",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  exports.defaultPinpointSMSVoiceV2HttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  exports.resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/package.json
var require_package4 = __commonJS((exports, module) => {
  module.exports = {
    name: "@aws-sdk/client-pinpoint-sms-voice-v2",
    description: "AWS SDK for JavaScript Pinpoint Sms Voice V2 Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-pinpoint-sms-voice-v2",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-pinpoint-sms-voice-v2"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/endpoint/bdd.js
var require_bdd3 = __commonJS((exports) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var k2 = "ref";
  var a = -1;
  var b2 = true;
  var c = "isSet";
  var d2 = "PartitionResult";
  var e = "booleanEquals";
  var f2 = "getAttr";
  var g2 = { [k2]: "Endpoint" };
  var h2 = { [k2]: d2 };
  var i = {};
  var j = [{ [k2]: "Region" }];
  var _data = {
    conditions: [
      [c, [g2]],
      [c, j],
      ["aws.partition", j, d2],
      [e, [{ [k2]: "UseFIPS" }, b2]],
      [e, [{ [k2]: "UseDualStack" }, b2]],
      [e, [{ fn: f2, argv: [h2, "supportsDualStack"] }, b2]],
      [e, [{ fn: f2, argv: [h2, "supportsFIPS"] }, b2]]
    ],
    results: [
      [a],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [g2, i],
      ["https://sms-voice-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://sms-voice-fips.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://sms-voice.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://sms-voice.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    12,
    3,
    1,
    4,
    r + 11,
    2,
    5,
    r + 11,
    3,
    8,
    6,
    4,
    7,
    r + 10,
    5,
    r + 8,
    r + 9,
    4,
    10,
    9,
    6,
    r + 6,
    r + 7,
    5,
    11,
    r + 5,
    6,
    r + 4,
    r + 5,
    3,
    r + 1,
    13,
    4,
    r + 2,
    r + 3
  ]);
  exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver3 = __commonJS((exports) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd3();
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  exports.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/models/PinpointSMSVoiceV2ServiceException.js
var require_PinpointSMSVoiceV2ServiceException = __commonJS((exports) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports.__ServiceException = __ServiceException;
  exports.PinpointSMSVoiceV2ServiceException = class PinpointSMSVoiceV2ServiceException extends __ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, PinpointSMSVoiceV2ServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/models/errors.js
var require_errors3 = __commonJS((exports) => {
  var { PinpointSMSVoiceV2ServiceException: __BaseException } = require_PinpointSMSVoiceV2ServiceException();
  exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
    name = "AccessDeniedException";
    $fault = "client";
    Message;
    Reason;
    constructor(opts) {
      super({
        name: "AccessDeniedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AccessDeniedException.prototype);
      this.Message = opts.Message;
      this.Reason = opts.Reason;
    }
  };
  exports.ConflictException = class ConflictException extends __BaseException {
    name = "ConflictException";
    $fault = "client";
    Message;
    Reason;
    ResourceType;
    ResourceId;
    constructor(opts) {
      super({
        name: "ConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ConflictException.prototype);
      this.Message = opts.Message;
      this.Reason = opts.Reason;
      this.ResourceType = opts.ResourceType;
      this.ResourceId = opts.ResourceId;
    }
  };
  exports.InternalServerException = class InternalServerException extends __BaseException {
    name = "InternalServerException";
    $fault = "server";
    $retryable = {};
    Message;
    RequestId;
    constructor(opts) {
      super({
        name: "InternalServerException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InternalServerException.prototype);
      this.Message = opts.Message;
      this.RequestId = opts.RequestId;
    }
  };
  exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
    name = "ResourceNotFoundException";
    $fault = "client";
    Message;
    ResourceType;
    ResourceId;
    constructor(opts) {
      super({
        name: "ResourceNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
      this.Message = opts.Message;
      this.ResourceType = opts.ResourceType;
      this.ResourceId = opts.ResourceId;
    }
  };
  exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
    name = "ServiceQuotaExceededException";
    $fault = "client";
    Message;
    Reason;
    constructor(opts) {
      super({
        name: "ServiceQuotaExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
      this.Message = opts.Message;
      this.Reason = opts.Reason;
    }
  };
  exports.ThrottlingException = class ThrottlingException extends __BaseException {
    name = "ThrottlingException";
    $fault = "client";
    $retryable = {
      throttling: true
    };
    Message;
    constructor(opts) {
      super({
        name: "ThrottlingException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ThrottlingException.prototype);
      this.Message = opts.Message;
    }
  };
  exports.ValidationException = class ValidationException extends __BaseException {
    name = "ValidationException";
    $fault = "client";
    Message;
    Reason;
    Fields;
    constructor(opts) {
      super({
        name: "ValidationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ValidationException.prototype);
      this.Message = opts.Message;
      this.Reason = opts.Reason;
      this.Fields = opts.Fields;
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/schemas/schemas_0.js
var require_schemas_03 = __commonJS((exports) => {
  var _A = "Action";
  var _AA = "AccountAttribute";
  var _AAL = "AccountAttributeList";
  var _AAc = "AccountAttributes";
  var _AAd = "AdditionalAttributes";
  var _AB = "AttachmentBody";
  var _ABs = "AssociationBehavior";
  var _AD = "AccountDefault";
  var _ADE = "AccessDeniedException";
  var _AL = "AccountLimit";
  var _ALL = "AccountLimitList";
  var _ALc = "AccountLimits";
  var _AOI = "AssociateOriginationIdentity";
  var _AOIR = "AssociateOriginationIdentityRequest";
  var _AOIRs = "AssociateOriginationIdentityResult";
  var _APC = "AssociateProtectConfiguration";
  var _APCR = "AssociateProtectConfigurationRequest";
  var _APCRs = "AssociateProtectConfigurationResult";
  var _AR = "AwsReview";
  var _ART = "AwsReviewingTimestamp";
  var _AS = "AttachmentStatus";
  var _AT = "ApprovedTimestamp";
  var _ATr = "ArchivedTimestamp";
  var _AU = "AttachmentUrl";
  var _AUER = "AttachmentUploadErrorReason";
  var _AVN = "ApprovedVersionNumber";
  var _C = "Country";
  var _CCS = "CreateConfigurationSet";
  var _CCSR = "CreateConfigurationSetRequest";
  var _CCSRr = "CreateConfigurationSetResult";
  var _CE = "ConflictException";
  var _CED = "CreateEventDestination";
  var _CEDR = "CreateEventDestinationRequest";
  var _CEDRr = "CreateEventDestinationResult";
  var _CL = "CarrierLookup";
  var _CLR = "CarrierLookupRequest";
  var _CLRa = "CarrierLookupResult";
  var _CLS = "CountryLaunchStatus";
  var _CLSF = "CountryLaunchStatusFilter";
  var _CLSFL = "CountryLaunchStatusFilterList";
  var _CLSI = "CountryLaunchStatusInformation";
  var _CLSIL = "CountryLaunchStatusInformationList";
  var _CN = "CarrierName";
  var _CNC = "CreateNotifyConfiguration";
  var _CNCR = "CreateNotifyConfigurationRequest";
  var _CNCRr = "CreateNotifyConfigurationResult";
  var _CNo = "CountryName";
  var _COIR = "CustomerOwnedIdentityRequired";
  var _COOL = "CreateOptOutList";
  var _COOLR = "CreateOptOutListRequest";
  var _COOLRr = "CreateOptOutListResult";
  var _CP = "CreatePool";
  var _CPC = "CreateProtectConfiguration";
  var _CPCR = "CreateProtectConfigurationRequest";
  var _CPCRr = "CreateProtectConfigurationResult";
  var _CPR = "CreatePoolRequest";
  var _CPRr = "CreatePoolResult";
  var _CR = "CreateRegistration";
  var _CRA = "CreateRcsAgent";
  var _CRAR = "CreateRcsAgentRequest";
  var _CRARr = "CreateRcsAgentResult";
  var _CRARre = "CreateRegistrationAssociationRequest";
  var _CRARrea = "CreateRegistrationAssociationResult";
  var _CRARreat = "CreateRegistrationAttachmentRequest";
  var _CRARreate = "CreateRegistrationAttachmentResult";
  var _CRAr = "CreateRegistrationAssociation";
  var _CRAre = "CreateRegistrationAttachment";
  var _CRR = "CreateRegistrationRequest";
  var _CRRr = "CreateRegistrationResult";
  var _CRS = "CountryRuleSet";
  var _CRSU = "CountryRuleSetUpdates";
  var _CRV = "CreateRegistrationVersion";
  var _CRVR = "CreateRegistrationVersionRequest";
  var _CRVRr = "CreateRegistrationVersionResult";
  var _CS = "CarrierStatus";
  var _CSA = "ConfigurationSetArn";
  var _CSF = "ConfigurationSetFilter";
  var _CSFL = "ConfigurationSetFilterList";
  var _CSI = "CarrierStatusInformation";
  var _CSIL = "CarrierStatusInformationList";
  var _CSILo = "ConfigurationSetInformationList";
  var _CSIo = "ConfigurationSetInformation";
  var _CSN = "ConfigurationSetName";
  var _CSNo = "ConfigurationSetNames";
  var _CSo = "ConfigurationSets";
  var _CT = "ClientToken";
  var _CTr = "CreatedTimestamp";
  var _CVDN = "CreateVerifiedDestinationNumber";
  var _CVDNR = "CreateVerifiedDestinationNumberRequest";
  var _CVDNRr = "CreateVerifiedDestinationNumberResult";
  var _CVN = "CurrentVersionNumber";
  var _CWLD = "CloudWatchLogsDestination";
  var _Ca = "Carrier";
  var _Ch = "Channels";
  var _Co = "Content";
  var _Con = "Context";
  var _D = "Description";
  var _DAA = "DescribeAccountAttributes";
  var _DAAR = "DescribeAccountAttributesRequest";
  var _DAARe = "DescribeAccountAttributesResult";
  var _DADPC = "DeleteAccountDefaultProtectConfiguration";
  var _DADPCR = "DeleteAccountDefaultProtectConfigurationRequest";
  var _DADPCRe = "DeleteAccountDefaultProtectConfigurationResult";
  var _DAL = "DescribeAccountLimits";
  var _DALR = "DescribeAccountLimitsRequest";
  var _DALRe = "DescribeAccountLimitsResult";
  var _DB = "DisassociationBehavior";
  var _DCC = "DialingCountryCode";
  var _DCP = "DestinationCountryParameters";
  var _DCS = "DeleteConfigurationSet";
  var _DCSR = "DeleteConfigurationSetRequest";
  var _DCSRe = "DeleteConfigurationSetResult";
  var _DCSRes = "DescribeConfigurationSetsRequest";
  var _DCSResc = "DescribeConfigurationSetsResult";
  var _DCSe = "DescribeConfigurationSets";
  var _DDMT = "DeleteDefaultMessageType";
  var _DDMTR = "DeleteDefaultMessageTypeRequest";
  var _DDMTRe = "DeleteDefaultMessageTypeResult";
  var _DDSI = "DeleteDefaultSenderId";
  var _DDSIR = "DeleteDefaultSenderIdRequest";
  var _DDSIRe = "DeleteDefaultSenderIdResult";
  var _DED = "DeleteEventDestination";
  var _DEDR = "DeleteEventDestinationRequest";
  var _DEDRe = "DeleteEventDestinationResult";
  var _DH = "DisplayHints";
  var _DK = "DeleteKeyword";
  var _DKR = "DeleteKeywordRequest";
  var _DKRe = "DeleteKeywordResult";
  var _DKRes = "DescribeKeywordsRequest";
  var _DKResc = "DescribeKeywordsResult";
  var _DKe = "DescribeKeywords";
  var _DL = "DocumentationLink";
  var _DMFE = "DefaultMessageFeedbackEnabled";
  var _DMMSLO = "DeleteMediaMessageSpendLimitOverride";
  var _DMMSLOR = "DeleteMediaMessageSpendLimitOverrideRequest";
  var _DMMSLORe = "DeleteMediaMessageSpendLimitOverrideResult";
  var _DMT = "DefaultMessageType";
  var _DN = "DisplayName";
  var _DNC = "DeleteNotifyConfiguration";
  var _DNCR = "DeleteNotifyConfigurationRequest";
  var _DNCRe = "DeleteNotifyConfigurationResult";
  var _DNCRes = "DescribeNotifyConfigurationsRequest";
  var _DNCResc = "DescribeNotifyConfigurationsResult";
  var _DNCe = "DescribeNotifyConfigurations";
  var _DNMSLO = "DeleteNotifyMessageSpendLimitOverride";
  var _DNMSLOR = "DeleteNotifyMessageSpendLimitOverrideRequest";
  var _DNMSLORe = "DeleteNotifyMessageSpendLimitOverrideResult";
  var _DNT = "DescribeNotifyTemplates";
  var _DNTR = "DescribeNotifyTemplatesRequest";
  var _DNTRe = "DescribeNotifyTemplatesResult";
  var _DOI = "DisassociateOriginationIdentity";
  var _DOIR = "DisassociateOriginationIdentityRequest";
  var _DOIRi = "DisassociateOriginationIdentityResult";
  var _DOOL = "DeleteOptOutList";
  var _DOOLR = "DeleteOptOutListRequest";
  var _DOOLRe = "DeleteOptOutListResult";
  var _DOOLRes = "DescribeOptOutListsRequest";
  var _DOOLResc = "DescribeOptOutListsResult";
  var _DOOLe = "DescribeOptOutLists";
  var _DOON = "DeleteOptedOutNumber";
  var _DOONR = "DeleteOptedOutNumberRequest";
  var _DOONRe = "DeleteOptedOutNumberResult";
  var _DOONRes = "DescribeOptedOutNumbersRequest";
  var _DOONResc = "DescribeOptedOutNumbersResult";
  var _DOONe = "DescribeOptedOutNumbers";
  var _DP = "DeletePool";
  var _DPC = "DeleteProtectConfiguration";
  var _DPCA = "DefaultProtectConfigurationArn";
  var _DPCI = "DefaultProtectConfigurationId";
  var _DPCR = "DeleteProtectConfigurationRequest";
  var _DPCRSNO = "DeleteProtectConfigurationRuleSetNumberOverride";
  var _DPCRSNOR = "DeleteProtectConfigurationRuleSetNumberOverrideRequest";
  var _DPCRSNORe = "DeleteProtectConfigurationRuleSetNumberOverrideResult";
  var _DPCRe = "DeleteProtectConfigurationResult";
  var _DPCRes = "DescribeProtectConfigurationsRequest";
  var _DPCResc = "DescribeProtectConfigurationsResult";
  var _DPCRi = "DisassociateProtectConfigurationRequest";
  var _DPCRis = "DisassociateProtectConfigurationResult";
  var _DPCe = "DescribeProtectConfigurations";
  var _DPCi = "DisassociateProtectConfiguration";
  var _DPE = "DeletionProtectionEnabled";
  var _DPN = "DestinationPhoneNumber";
  var _DPNR = "DescribePhoneNumbersRequest";
  var _DPNRe = "DescribePhoneNumbersResult";
  var _DPNe = "DestinationPhoneNumbers";
  var _DPNes = "DescribePhoneNumbers";
  var _DPR = "DeletePoolRequest";
  var _DPRe = "DeletePoolResult";
  var _DPRes = "DescribePoolsRequest";
  var _DPResc = "DescribePoolsResult";
  var _DPe = "DescribePools";
  var _DR = "DeniedReason";
  var _DRA = "DeleteRcsAgent";
  var _DRACLS = "DescribeRcsAgentCountryLaunchStatus";
  var _DRACLSR = "DescribeRcsAgentCountryLaunchStatusRequest";
  var _DRACLSRe = "DescribeRcsAgentCountryLaunchStatusResult";
  var _DRAR = "DeleteRcsAgentRequest";
  var _DRARe = "DeleteRcsAgentResult";
  var _DRARel = "DeleteRegistrationAttachmentRequest";
  var _DRARele = "DeleteRegistrationAttachmentResult";
  var _DRARes = "DescribeRcsAgentsRequest";
  var _DRAResc = "DescribeRcsAgentsResult";
  var _DRARescr = "DescribeRegistrationAttachmentsRequest";
  var _DRARescri = "DescribeRegistrationAttachmentsResult";
  var _DRAe = "DeleteRegistrationAttachment";
  var _DRAes = "DescribeRcsAgents";
  var _DRAesc = "DescribeRegistrationAttachments";
  var _DRFD = "DescribeRegistrationFieldDefinitions";
  var _DRFDR = "DescribeRegistrationFieldDefinitionsRequest";
  var _DRFDRe = "DescribeRegistrationFieldDefinitionsResult";
  var _DRFV = "DeleteRegistrationFieldValue";
  var _DRFVR = "DeleteRegistrationFieldValueRequest";
  var _DRFVRe = "DeleteRegistrationFieldValueResult";
  var _DRFVRes = "DescribeRegistrationFieldValuesRequest";
  var _DRFVResc = "DescribeRegistrationFieldValuesResult";
  var _DRFVe = "DescribeRegistrationFieldValues";
  var _DRP = "DeleteResourcePolicy";
  var _DRPR = "DeleteResourcePolicyRequest";
  var _DRPRe = "DeleteResourcePolicyResult";
  var _DRR = "DeleteRegistrationRequest";
  var _DRRe = "DeleteRegistrationResult";
  var _DRRes = "DescribeRegistrationsRequest";
  var _DRResc = "DescribeRegistrationsResult";
  var _DRSD = "DescribeRegistrationSectionDefinitions";
  var _DRSDR = "DescribeRegistrationSectionDefinitionsRequest";
  var _DRSDRe = "DescribeRegistrationSectionDefinitionsResult";
  var _DRTD = "DescribeRegistrationTypeDefinitions";
  var _DRTDR = "DescribeRegistrationTypeDefinitionsRequest";
  var _DRTDRe = "DescribeRegistrationTypeDefinitionsResult";
  var _DRV = "DescribeRegistrationVersions";
  var _DRVR = "DescribeRegistrationVersionsRequest";
  var _DRVRe = "DescribeRegistrationVersionsResult";
  var _DRVRi = "DiscardRegistrationVersionRequest";
  var _DRVRis = "DiscardRegistrationVersionResult";
  var _DRVi = "DiscardRegistrationVersion";
  var _DRe = "DeniedReasons";
  var _DRel = "DeleteRegistration";
  var _DRes = "DescribeRegistrations";
  var _DRr = "DryRun";
  var _DSA = "DeliveryStreamArn";
  var _DSI = "DefaultSenderId";
  var _DSIR = "DescribeSenderIdsRequest";
  var _DSIRe = "DescribeSenderIdsResult";
  var _DSIe = "DescribeSenderIds";
  var _DSL = "DescribeSpendLimits";
  var _DSLR = "DescribeSpendLimitsRequest";
  var _DSLRe = "DescribeSpendLimitsResult";
  var _DT = "DocumentationTitle";
  var _DTI = "DefaultTemplateId";
  var _DTMSLO = "DeleteTextMessageSpendLimitOverride";
  var _DTMSLOR = "DeleteTextMessageSpendLimitOverrideRequest";
  var _DTMSLORe = "DeleteTextMessageSpendLimitOverrideResult";
  var _DTe = "DeniedTimestamp";
  var _DTi = "DiscardedTimestamp";
  var _DTr = "DraftTimestamp";
  var _DV = "DefaultValue";
  var _DVDN = "DeleteVerifiedDestinationNumber";
  var _DVDNR = "DeleteVerifiedDestinationNumberRequest";
  var _DVDNRe = "DeleteVerifiedDestinationNumberResult";
  var _DVDNRes = "DescribeVerifiedDestinationNumbersRequest";
  var _DVDNResc = "DescribeVerifiedDestinationNumbersResult";
  var _DVDNe = "DescribeVerifiedDestinationNumbers";
  var _DVMSLO = "DeleteVoiceMessageSpendLimitOverride";
  var _DVMSLOR = "DeleteVoiceMessageSpendLimitOverrideRequest";
  var _DVMSLORe = "DeleteVoiceMessageSpendLimitOverrideResult";
  var _E = "Enabled";
  var _EC = "EnabledChannels";
  var _ECn = "EnabledCountries";
  var _ED = "EventDestinations";
  var _EDL = "EventDestinationList";
  var _EDN = "EventDestinationName";
  var _EDv = "EventDestination";
  var _EL = "EnforcedLimit";
  var _EPN = "E164PhoneNumber";
  var _ET = "ExpirationTimestamp";
  var _ETV = "ExampleTextValue";
  var _EUOO = "EndUserOptedOut";
  var _F = "Fields";
  var _FP = "FieldPath";
  var _FPi = "FieldPaths";
  var _FR = "FieldRequirement";
  var _FT = "FieldType";
  var _Fe = "Feedback";
  var _Fi = "Filters";
  var _GPCCRS = "GetProtectConfigurationCountryRuleSet";
  var _GPCCRSR = "GetProtectConfigurationCountryRuleSetRequest";
  var _GPCCRSRe = "GetProtectConfigurationCountryRuleSetResult";
  var _GRP = "GetResourcePolicy";
  var _GRPR = "GetResourcePolicyRequest";
  var _GRPRe = "GetResourcePolicyResult";
  var _ICC = "IsoCountryCode";
  var _ICCs = "IsoCountryCodes";
  var _IRA = "IamRoleArn";
  var _ISE = "InternalServerException";
  var _ISEn = "InternationalSendingEnabled";
  var _K = "Keyword";
  var _KA = "KeywordAction";
  var _KF = "KeywordFilter";
  var _KFD = "KinesisFirehoseDestination";
  var _KFL = "KeywordFilterList";
  var _KI = "KeywordInformation";
  var _KIL = "KeywordInformationList";
  var _KM = "KeywordMessage";
  var _Ke = "Keywords";
  var _Key = "Key";
  var _LC = "LanguageCode";
  var _LD = "LongDescription";
  var _LDVN = "LatestDeniedVersionNumber";
  var _LGA = "LogGroupArn";
  var _LNC = "ListNotifyCountries";
  var _LNCR = "ListNotifyCountriesRequest";
  var _LNCRi = "ListNotifyCountriesResult";
  var _LPCRSNO = "ListProtectConfigurationRuleSetNumberOverrides";
  var _LPCRSNOF = "ListProtectConfigurationRuleSetNumberOverrideFilter";
  var _LPCRSNOR = "ListProtectConfigurationRuleSetNumberOverridesRequest";
  var _LPCRSNORi = "ListProtectConfigurationRuleSetNumberOverridesResult";
  var _LPOI = "ListPoolOriginationIdentities";
  var _LPOIR = "ListPoolOriginationIdentitiesRequest";
  var _LPOIRi = "ListPoolOriginationIdentitiesResult";
  var _LRA = "ListRegistrationAssociations";
  var _LRAR = "ListRegistrationAssociationsRequest";
  var _LRARi = "ListRegistrationAssociationsResult";
  var _LTFR = "ListTagsForResource";
  var _LTFRR = "ListTagsForResourceRequest";
  var _LTFRRi = "ListTagsForResourceResult";
  var _M = "Message";
  var _MB = "MessageBody";
  var _MBTT = "MessageBodyTextType";
  var _MC = "MinChoices";
  var _MCC = "MCC";
  var _MCa = "MaxChoices";
  var _MET = "MatchingEventTypes";
  var _MFE = "MessageFeedbackEnabled";
  var _MFS = "MessageFeedbackStatus";
  var _MI = "MessageId";
  var _ML = "MonthlyLimit";
  var _MLP = "MonthlyLeasingPrice";
  var _MLa = "MaxLimit";
  var _MLax = "MaxLength";
  var _MLi = "MinLength";
  var _MNC = "MNC";
  var _MP = "MaxPrice";
  var _MPPM = "MaxPricePerMinute";
  var _MR = "MaxResults";
  var _MT = "MessageType";
  var _MTe = "MessageTypes";
  var _MU = "MediaUrls";
  var _MV = "MinValue";
  var _MVa = "MaxValue";
  var _Ma = "Max";
  var _N = "Name";
  var _NC = "NotifyConfigurations";
  var _NCA = "NotifyConfigurationArn";
  var _NCF = "NotifyConfigurationFilter";
  var _NCFL = "NotifyConfigurationFilterList";
  var _NCI = "NotifyConfigurationId";
  var _NCIL = "NotifyConfigurationInformationList";
  var _NCILo = "NotifyCountryInformationList";
  var _NCIo = "NotifyConfigurationIds";
  var _NCIot = "NotifyConfigurationInformation";
  var _NCIoti = "NotifyCountryInformation";
  var _NCo = "NotifyCountries";
  var _NCu = "NumberCapability";
  var _NCum = "NumberCapabilities";
  var _NETL = "NonEmptyTagList";
  var _NT = "NextToken";
  var _NTF = "NotifyTemplateFilter";
  var _NTFL = "NotifyTemplateFilterList";
  var _NTI = "NotifyTemplateInformation";
  var _NTIL = "NotifyTemplateInformationList";
  var _NTo = "NotifyTemplates";
  var _NTu = "NumberType";
  var _O = "Owner";
  var _OI = "OriginationIdentity";
  var _OIA = "OriginationIdentityArn";
  var _OIM = "OriginationIdentityMetadata";
  var _OIML = "OriginationIdentityMetadataList";
  var _OIr = "OriginationIdentities";
  var _OOF = "OptedOutFilter";
  var _OOFL = "OptedOutFilterList";
  var _OOL = "OptOutLists";
  var _OOLA = "OptOutListArn";
  var _OOLI = "OptOutListInformation";
  var _OOLIL = "OptOutListInformationList";
  var _OOLN = "OptOutListName";
  var _OOLNp = "OptOutListNames";
  var _OON = "OptedOutNumber";
  var _OONI = "OptedOutNumberInformation";
  var _OONIL = "OptedOutNumberInformationList";
  var _OONp = "OptedOutNumbers";
  var _OOT = "OptedOutTimestamp";
  var _Op = "Option";
  var _Opt = "Options";
  var _Ov = "Overridden";
  var _P = "Policy";
  var _PA = "PoolArn";
  var _PC = "ProtectConfigurations";
  var _PCA = "ProtectConfigurationArn";
  var _PCCRS = "ProtectConfigurationCountryRuleSet";
  var _PCCRSI = "ProtectConfigurationCountryRuleSetInformation";
  var _PCF = "ProtectConfigurationFilter";
  var _PCFL = "ProtectConfigurationFilterList";
  var _PCI = "ProtectConfigurationId";
  var _PCIL = "ProtectConfigurationInformationList";
  var _PCIr = "ProtectConfigurationIds";
  var _PCIro = "ProtectConfigurationInformation";
  var _PCRSNO = "ProtectConfigurationRuleSetNumberOverride";
  var _PCRSNOFI = "ProtectConfigurationRuleSetNumberOverrideFilterItem";
  var _PCRSNOL = "ProtectConfigurationRuleSetNumberOverrideList";
  var _PF = "PoolFilter";
  var _PFL = "PoolFilterList";
  var _PI = "PoolId";
  var _PIL = "PoolInformationList";
  var _PIo = "PoolIds";
  var _PIoo = "PoolInformation";
  var _PK = "PutKeyword";
  var _PKR = "PutKeywordRequest";
  var _PKRu = "PutKeywordResult";
  var _PMF = "PutMessageFeedback";
  var _PMFR = "PutMessageFeedbackRequest";
  var _PMFRu = "PutMessageFeedbackResult";
  var _PN = "PhoneNumber";
  var _PNA = "PhoneNumberArn";
  var _PNF = "PhoneNumberFilter";
  var _PNFL = "PhoneNumberFilterList";
  var _PNI = "PhoneNumberIds";
  var _PNIL = "PhoneNumberInformationList";
  var _PNIh = "PhoneNumberInformation";
  var _PNIho = "PhoneNumberId";
  var _PNT = "PhoneNumberType";
  var _PNh = "PhoneNumbers";
  var _POIF = "PoolOriginationIdentitiesFilter";
  var _POIFL = "PoolOriginationIdentitiesFilterList";
  var _POON = "PutOptedOutNumber";
  var _POONR = "PutOptedOutNumberRequest";
  var _POONRu = "PutOptedOutNumberResult";
  var _PPCRSNO = "PutProtectConfigurationRuleSetNumberOverride";
  var _PPCRSNOR = "PutProtectConfigurationRuleSetNumberOverrideRequest";
  var _PPCRSNORu = "PutProtectConfigurationRuleSetNumberOverrideResult";
  var _PRFV = "PutRegistrationFieldValue";
  var _PRFVR = "PutRegistrationFieldValueRequest";
  var _PRFVRu = "PutRegistrationFieldValueResult";
  var _PRP = "PutResourcePolicy";
  var _PRPR = "PutResourcePolicyRequest";
  var _PRPRu = "PutResourcePolicyResult";
  var _PS = "ProtectStatus";
  var _Pa = "Pattern";
  var _Po = "Pools";
  var _R = "Reason";
  var _RA = "RegistrationArn";
  var _RAA = "RcsAgentArn";
  var _RAAe = "RegistrationAttachmentArn";
  var _RAF = "RcsAgentFilter";
  var _RAFL = "RcsAgentFilterList";
  var _RAFLe = "RegistrationAssociationFilterList";
  var _RAFLeg = "RegistrationAttachmentFilterList";
  var _RAFe = "RegistrationAssociationFilter";
  var _RAFeg = "RegistrationAttachmentFilter";
  var _RAI = "RcsAgentId";
  var _RAIL = "RcsAgentInformationList";
  var _RAILe = "RegistrationAttachmentsInformationList";
  var _RAIc = "RcsAgentIds";
  var _RAIcs = "RcsAgentInformation";
  var _RAIe = "RegistrationAttachmentId";
  var _RAIeg = "RegistrationAttachmentIds";
  var _RAIegi = "RegistrationAttachmentsInformation";
  var _RAM = "RegistrationAssociationMetadata";
  var _RAML = "RegistrationAssociationMetadataList";
  var _RAT = "RequiresAuthenticationTimestamp";
  var _RAc = "RcsAgents";
  var _RAe = "ResourceArn";
  var _RAeg = "RegistrationAttachments";
  var _RAegi = "RegistrationAssociations";
  var _RDRI = "RegistrationDeniedReasonInformation";
  var _RDRIL = "RegistrationDeniedReasonInformationList";
  var _RF = "RegistrationFilter";
  var _RFD = "RegistrationFieldDefinitions";
  var _RFDH = "RegistrationFieldDisplayHints";
  var _RFDL = "RegistrationFieldDefinitionList";
  var _RFDe = "RegistrationFieldDefinition";
  var _RFL = "RegistrationFilterList";
  var _RFV = "RegistrationFieldValues";
  var _RFVI = "RegistrationFieldValueInformation";
  var _RFVIL = "RegistrationFieldValueInformationList";
  var _RI = "ResourceId";
  var _RIL = "RegistrationInformationList";
  var _RIe = "RequestId";
  var _RIeg = "RegistrationId";
  var _RIegi = "RegistrationIds";
  var _RIegis = "RegistrationInformation";
  var _RMB = "ResolvedMessageBody";
  var _RNFE = "ResourceNotFoundException";
  var _RPI = "RcsPlatformId";
  var _RPN = "ReleasePhoneNumber";
  var _RPNR = "ReleasePhoneNumberRequest";
  var _RPNRe = "ReleasePhoneNumberResult";
  var _RPNReq = "RequestPhoneNumberRequest";
  var _RPNRequ = "RequestPhoneNumberResult";
  var _RPNe = "RequestPhoneNumber";
  var _RR = "RejectionReason";
  var _RS = "RegistrationStatus";
  var _RSD = "RegistrationSectionDefinitions";
  var _RSDH = "RegistrationSectionDisplayHints";
  var _RSDL = "RegistrationSectionDefinitionList";
  var _RSDe = "RegistrationSectionDefinition";
  var _RSI = "ReleaseSenderId";
  var _RSIR = "ReleaseSenderIdRequest";
  var _RSIRe = "ReleaseSenderIdResult";
  var _RSIReq = "RequestSenderIdRequest";
  var _RSIRequ = "RequestSenderIdResult";
  var _RSIe = "RequestSenderId";
  var _RSNO = "RuleSetNumberOverrides";
  var _RT = "ResourceType";
  var _RTD = "RegistrationTypeDefinitions";
  var _RTDH = "RegistrationTypeDisplayHints";
  var _RTDL = "RegistrationTypeDefinitionList";
  var _RTDe = "RegistrationTypeDefinition";
  var _RTF = "RegistrationTypeFilter";
  var _RTFL = "RegistrationTypeFilterList";
  var _RTe = "RegistrationType";
  var _RTeg = "RegistrationTypes";
  var _RTev = "ReviewingTimestamp";
  var _RTevo = "RevokedTimestamp";
  var _RV = "RegistrationVersions";
  var _RVF = "RegistrationVersionFilter";
  var _RVFL = "RegistrationVersionFilterList";
  var _RVI = "RegistrationVersionInformation";
  var _RVIL = "RegistrationVersionInformationList";
  var _RVS = "RegistrationVersionStatus";
  var _RVSH = "RegistrationVersionStatusHistory";
  var _Re = "Registrations";
  var _Reg = "Registered";
  var _Req = "Required";
  var _S = "Status";
  var _SA = "SupportedAssociations";
  var _SADPC = "SetAccountDefaultProtectConfiguration";
  var _SADPCR = "SetAccountDefaultProtectConfigurationRequest";
  var _SADPCRe = "SetAccountDefaultProtectConfigurationResult";
  var _SAL = "SupportedAssociationList";
  var _SAu = "SupportedAssociation";
  var _SC = "SelectChoices";
  var _SCu = "SupportedChannels";
  var _SCup = "SupportedCountries";
  var _SD = "SnsDestination";
  var _SDMFE = "SetDefaultMessageFeedbackEnabled";
  var _SDMFER = "SetDefaultMessageFeedbackEnabledRequest";
  var _SDMFERe = "SetDefaultMessageFeedbackEnabledResult";
  var _SDMT = "SetDefaultMessageType";
  var _SDMTR = "SetDefaultMessageTypeRequest";
  var _SDMTRe = "SetDefaultMessageTypeResult";
  var _SDNVC = "SendDestinationNumberVerificationCode";
  var _SDNVCR = "SendDestinationNumberVerificationCodeRequest";
  var _SDNVCRe = "SendDestinationNumberVerificationCodeResult";
  var _SDSI = "SetDefaultSenderId";
  var _SDSIR = "SetDefaultSenderIdRequest";
  var _SDSIRe = "SetDefaultSenderIdResult";
  var _SDh = "ShortDescription";
  var _SI = "SenderId";
  var _SIA = "SenderIdArn";
  var _SIAC = "SenderIdAndCountry";
  var _SIF = "SenderIdFilter";
  var _SIFL = "SenderIdFilterList";
  var _SII = "SenderIdInformation";
  var _SIIL = "SenderIdInformationList";
  var _SIL = "SenderIdList";
  var _SIe = "SenderIds";
  var _SL = "SpendLimits";
  var _SLL = "SpendLimitList";
  var _SLp = "SpendLimit";
  var _SMM = "SendMediaMessage";
  var _SMMR = "SendMediaMessageRequest";
  var _SMMRe = "SendMediaMessageResult";
  var _SMMSLO = "SetMediaMessageSpendLimitOverride";
  var _SMMSLOR = "SetMediaMessageSpendLimitOverrideRequest";
  var _SMMSLORe = "SetMediaMessageSpendLimitOverrideResult";
  var _SMOOE = "SelfManagedOptOutsEnabled";
  var _SNMSLO = "SetNotifyMessageSpendLimitOverride";
  var _SNMSLOR = "SetNotifyMessageSpendLimitOverrideRequest";
  var _SNMSLORe = "SetNotifyMessageSpendLimitOverrideResult";
  var _SNTM = "SendNotifyTextMessage";
  var _SNTMR = "SendNotifyTextMessageRequest";
  var _SNTMRe = "SendNotifyTextMessageResult";
  var _SNVM = "SendNotifyVoiceMessage";
  var _SNVMR = "SendNotifyVoiceMessageRequest";
  var _SNVMRe = "SendNotifyVoiceMessageResult";
  var _SOD = "SelectOptionDescriptions";
  var _SODL = "SelectOptionDescriptionsList";
  var _SODe = "SelectOptionDescription";
  var _SP = "SectionPath";
  var _SPe = "SectionPaths";
  var _SQEE = "ServiceQuotaExceededException";
  var _SRE = "SharedRoutesEnabled";
  var _SRV = "SubmitRegistrationVersion";
  var _SRVR = "SubmitRegistrationVersionRequest";
  var _SRVRu = "SubmitRegistrationVersionResult";
  var _ST = "SupportedTiers";
  var _STM = "SendTextMessage";
  var _STMR = "SendTextMessageRequest";
  var _STMRe = "SendTextMessageResult";
  var _STMSLO = "SetTextMessageSpendLimitOverride";
  var _STMSLOR = "SetTextMessageSpendLimitOverrideRequest";
  var _STMSLORe = "SetTextMessageSpendLimitOverrideResult";
  var _STu = "SubmittedTimestamp";
  var _SUC = "SupportedUseCases";
  var _SV = "SelectValidation";
  var _SVI = "SupportedVoiceIds";
  var _SVM = "SendVoiceMessage";
  var _SVMR = "SendVoiceMessageRequest";
  var _SVMRe = "SendVoiceMessageResult";
  var _SVMSLO = "SetVoiceMessageSpendLimitOverride";
  var _SVMSLOR = "SetVoiceMessageSpendLimitOverrideRequest";
  var _SVMSLORe = "SetVoiceMessageSpendLimitOverrideResult";
  var _Sa = "Sample";
  var _So = "Source";
  var _T = "Tags";
  var _TA = "TierAccess";
  var _TAI = "TestingAgentInformation";
  var _TAIe = "TestingAgentId";
  var _TAe = "TestingAgent";
  var _TAo = "TopicArn";
  var _TE = "ThrottlingException";
  var _TI = "TemplateIds";
  var _TIe = "TemplateId";
  var _TK = "TagKeys";
  var _TL = "TagList";
  var _TR = "TagResource";
  var _TRR = "TagResourceRequest";
  var _TRRa = "TagResourceResult";
  var _TT = "TemplateType";
  var _TTL = "TimeToLive";
  var _TUS = "TierUpgradeStatus";
  var _TV = "TextValue";
  var _TVD = "TextValidationDescription";
  var _TVM = "TemplateVariableMetadata";
  var _TVMe = "TemplateVariablesMap";
  var _TVe = "TextValidation";
  var _TVem = "TemplateVariables";
  var _TWCA = "TwoWayChannelArn";
  var _TWCR = "TwoWayChannelRole";
  var _TWE = "TwoWayEnabled";
  var _Ta = "Tag";
  var _Ti = "Tier";
  var _Tit = "Title";
  var _Ty = "Type";
  var _U = "Used";
  var _UC = "UseCase";
  var _UCs = "UseCases";
  var _UED = "UpdateEventDestination";
  var _UEDR = "UpdateEventDestinationRequest";
  var _UEDRp = "UpdateEventDestinationResult";
  var _UNC = "UpdateNotifyConfiguration";
  var _UNCR = "UpdateNotifyConfigurationRequest";
  var _UNCRp = "UpdateNotifyConfigurationResult";
  var _UP = "UpdatePool";
  var _UPC = "UpdateProtectConfiguration";
  var _UPCCRS = "UpdateProtectConfigurationCountryRuleSet";
  var _UPCCRSR = "UpdateProtectConfigurationCountryRuleSetRequest";
  var _UPCCRSRp = "UpdateProtectConfigurationCountryRuleSetResult";
  var _UPCR = "UpdateProtectConfigurationRequest";
  var _UPCRp = "UpdateProtectConfigurationResult";
  var _UPN = "UpdatePhoneNumber";
  var _UPNR = "UpdatePhoneNumberRequest";
  var _UPNRp = "UpdatePhoneNumberResult";
  var _UPR = "UpdatePoolRequest";
  var _UPRp = "UpdatePoolResult";
  var _UR = "UntagResource";
  var _URA = "UpdateRcsAgent";
  var _URAR = "UpdateRcsAgentRequest";
  var _URARp = "UpdateRcsAgentResult";
  var _URR = "UntagResourceRequest";
  var _URRn = "UntagResourceResult";
  var _USI = "UpdateSenderId";
  var _USIR = "UpdateSenderIdRequest";
  var _USIRp = "UpdateSenderIdResult";
  var _V = "Value";
  var _VC = "VerificationChannel";
  var _VCe = "VerificationCode";
  var _VDN = "VerifiedDestinationNumbers";
  var _VDNA = "VerifiedDestinationNumberArn";
  var _VDNF = "VerifiedDestinationNumberFilter";
  var _VDNFL = "VerifiedDestinationNumberFilterList";
  var _VDNI = "VerifiedDestinationNumberId";
  var _VDNIL = "VerifiedDestinationNumberInformationList";
  var _VDNIe = "VerifiedDestinationNumberIds";
  var _VDNIer = "VerifiedDestinationNumberInformation";
  var _VDNR = "VerifyDestinationNumberRequest";
  var _VDNRe = "VerifyDestinationNumberResult";
  var _VDNe = "VerifyDestinationNumber";
  var _VE = "ValidationException";
  var _VEF = "ValidationExceptionField";
  var _VEFL = "ValidationExceptionFieldList";
  var _VI = "VoiceId";
  var _VN = "VersionNumber";
  var _VNe = "VersionNumbers";
  var _Va = "Values";
  var _Var = "Variables";
  var _Ve = "Version";
  var _c = "client";
  var _e = "error";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.pinpointsmsvoicev2";
  var _se = "server";
  var n0 = "com.amazonaws.pinpointsmsvoicev2";
  var { TypeRegistry } = require_schema();
  var { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException } = require_errors3();
  var { PinpointSMSVoiceV2ServiceException } = require_PinpointSMSVoiceV2ServiceException();
  var _s_registry = TypeRegistry.for(_s);
  var PinpointSMSVoiceV2ServiceException$ = [-3, _s, "PinpointSMSVoiceV2ServiceException", 0, [], []];
  exports.PinpointSMSVoiceV2ServiceException$ = PinpointSMSVoiceV2ServiceException$;
  _s_registry.registerError(PinpointSMSVoiceV2ServiceException$, PinpointSMSVoiceV2ServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var AccessDeniedException$ = [
    -3,
    n0,
    _ADE,
    { [_e]: _c },
    [_M, _R],
    [0, 0]
  ];
  exports.AccessDeniedException$ = AccessDeniedException$;
  n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
  var ConflictException$ = [
    -3,
    n0,
    _CE,
    { [_e]: _c },
    [_M, _R, _RT, _RI],
    [0, 0, 0, 0]
  ];
  exports.ConflictException$ = ConflictException$;
  n0_registry.registerError(ConflictException$, ConflictException);
  var InternalServerException$ = [
    -3,
    n0,
    _ISE,
    { [_e]: _se },
    [_M, _RIe],
    [0, 0]
  ];
  exports.InternalServerException$ = InternalServerException$;
  n0_registry.registerError(InternalServerException$, InternalServerException);
  var ResourceNotFoundException$ = [
    -3,
    n0,
    _RNFE,
    { [_e]: _c },
    [_M, _RT, _RI],
    [0, 0, 0]
  ];
  exports.ResourceNotFoundException$ = ResourceNotFoundException$;
  n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
  var ServiceQuotaExceededException$ = [
    -3,
    n0,
    _SQEE,
    { [_e]: _c },
    [_M, _R],
    [0, 0]
  ];
  exports.ServiceQuotaExceededException$ = ServiceQuotaExceededException$;
  n0_registry.registerError(ServiceQuotaExceededException$, ServiceQuotaExceededException);
  var ThrottlingException$ = [
    -3,
    n0,
    _TE,
    { [_e]: _c },
    [_M],
    [0]
  ];
  exports.ThrottlingException$ = ThrottlingException$;
  n0_registry.registerError(ThrottlingException$, ThrottlingException);
  var ValidationException$ = [
    -3,
    n0,
    _VE,
    { [_e]: _c },
    [_M, _R, _F],
    [0, 0, () => ValidationExceptionFieldList]
  ];
  exports.ValidationException$ = ValidationException$;
  n0_registry.registerError(ValidationException$, ValidationException);
  exports.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var AccountAttribute$ = [
    3,
    n0,
    _AA,
    0,
    [_N, _V],
    [0, 0],
    2
  ];
  exports.AccountAttribute$ = AccountAttribute$;
  var AccountLimit$ = [
    3,
    n0,
    _AL,
    0,
    [_N, _U, _Ma],
    [0, 1, 1],
    3
  ];
  exports.AccountLimit$ = AccountLimit$;
  var AssociateOriginationIdentityRequest$ = [
    3,
    n0,
    _AOIR,
    0,
    [_PI, _OI, _ICC, _CT],
    [0, 0, 0, [0, 4]],
    2
  ];
  exports.AssociateOriginationIdentityRequest$ = AssociateOriginationIdentityRequest$;
  var AssociateOriginationIdentityResult$ = [
    3,
    n0,
    _AOIRs,
    0,
    [_PA, _PI, _OIA, _OI, _ICC],
    [0, 0, 0, 0, 0]
  ];
  exports.AssociateOriginationIdentityResult$ = AssociateOriginationIdentityResult$;
  var AssociateProtectConfigurationRequest$ = [
    3,
    n0,
    _APCR,
    0,
    [_PCI, _CSN],
    [0, 0],
    2
  ];
  exports.AssociateProtectConfigurationRequest$ = AssociateProtectConfigurationRequest$;
  var AssociateProtectConfigurationResult$ = [
    3,
    n0,
    _APCRs,
    0,
    [_CSA, _CSN, _PCA, _PCI],
    [0, 0, 0, 0],
    4
  ];
  exports.AssociateProtectConfigurationResult$ = AssociateProtectConfigurationResult$;
  var CarrierLookupRequest$ = [
    3,
    n0,
    _CLR,
    0,
    [_PN],
    [0],
    1
  ];
  exports.CarrierLookupRequest$ = CarrierLookupRequest$;
  var CarrierLookupResult$ = [
    3,
    n0,
    _CLRa,
    0,
    [_EPN, _PNT, _DCC, _ICC, _C, _MCC, _MNC, _Ca],
    [0, 0, 0, 0, 0, 0, 0, 0],
    2
  ];
  exports.CarrierLookupResult$ = CarrierLookupResult$;
  var CarrierStatusInformation$ = [
    3,
    n0,
    _CSI,
    0,
    [_CN, _S],
    [0, 0],
    2
  ];
  exports.CarrierStatusInformation$ = CarrierStatusInformation$;
  var CloudWatchLogsDestination$ = [
    3,
    n0,
    _CWLD,
    0,
    [_IRA, _LGA],
    [0, 0],
    2
  ];
  exports.CloudWatchLogsDestination$ = CloudWatchLogsDestination$;
  var ConfigurationSetFilter$ = [
    3,
    n0,
    _CSF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.ConfigurationSetFilter$ = ConfigurationSetFilter$;
  var ConfigurationSetInformation$ = [
    3,
    n0,
    _CSIo,
    0,
    [_CSA, _CSN, _ED, _CTr, _DMT, _DSI, _DMFE, _PCI],
    [0, 0, () => EventDestinationList, 4, 0, 0, 2, 0],
    4
  ];
  exports.ConfigurationSetInformation$ = ConfigurationSetInformation$;
  var CountryLaunchStatusFilter$ = [
    3,
    n0,
    _CLSF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.CountryLaunchStatusFilter$ = CountryLaunchStatusFilter$;
  var CountryLaunchStatusInformation$ = [
    3,
    n0,
    _CLSI,
    0,
    [_ICC, _S, _RIeg, _CS, _RPI],
    [0, 0, 0, () => CarrierStatusInformationList, 0],
    4
  ];
  exports.CountryLaunchStatusInformation$ = CountryLaunchStatusInformation$;
  var CreateConfigurationSetRequest$ = [
    3,
    n0,
    _CCSR,
    0,
    [_CSN, _T, _CT],
    [0, () => TagList, [0, 4]],
    1
  ];
  exports.CreateConfigurationSetRequest$ = CreateConfigurationSetRequest$;
  var CreateConfigurationSetResult$ = [
    3,
    n0,
    _CCSRr,
    0,
    [_CSA, _CSN, _T, _CTr],
    [0, 0, () => TagList, 4]
  ];
  exports.CreateConfigurationSetResult$ = CreateConfigurationSetResult$;
  var CreateEventDestinationRequest$ = [
    3,
    n0,
    _CEDR,
    0,
    [_CSN, _EDN, _MET, _CWLD, _KFD, _SD, _CT],
    [0, 0, 64 | 0, () => CloudWatchLogsDestination$, () => KinesisFirehoseDestination$, () => SnsDestination$, [0, 4]],
    3
  ];
  exports.CreateEventDestinationRequest$ = CreateEventDestinationRequest$;
  var CreateEventDestinationResult$ = [
    3,
    n0,
    _CEDRr,
    0,
    [_CSA, _CSN, _EDv],
    [0, 0, () => EventDestination$]
  ];
  exports.CreateEventDestinationResult$ = CreateEventDestinationResult$;
  var CreateNotifyConfigurationRequest$ = [
    3,
    n0,
    _CNCR,
    0,
    [_DN, _UC, _EC, _DTI, _PI, _ECn, _DPE, _CT, _T],
    [0, 0, 64 | 0, 0, 0, 64 | 0, 2, [0, 4], () => TagList],
    3
  ];
  exports.CreateNotifyConfigurationRequest$ = CreateNotifyConfigurationRequest$;
  var CreateNotifyConfigurationResult$ = [
    3,
    n0,
    _CNCRr,
    0,
    [_NCA, _NCI, _DN, _UC, _EC, _Ti, _TUS, _S, _DPE, _CTr, _DTI, _PI, _ECn, _RR, _T],
    [0, 0, 0, 0, 64 | 0, 0, 0, 0, 2, 4, 0, 0, 64 | 0, 0, () => TagList],
    10
  ];
  exports.CreateNotifyConfigurationResult$ = CreateNotifyConfigurationResult$;
  var CreateOptOutListRequest$ = [
    3,
    n0,
    _COOLR,
    0,
    [_OOLN, _T, _CT],
    [0, () => TagList, [0, 4]],
    1
  ];
  exports.CreateOptOutListRequest$ = CreateOptOutListRequest$;
  var CreateOptOutListResult$ = [
    3,
    n0,
    _COOLRr,
    0,
    [_OOLA, _OOLN, _T, _CTr],
    [0, 0, () => TagList, 4]
  ];
  exports.CreateOptOutListResult$ = CreateOptOutListResult$;
  var CreatePoolRequest$ = [
    3,
    n0,
    _CPR,
    0,
    [_OI, _MT, _ICC, _DPE, _T, _CT],
    [0, 0, 0, 2, () => TagList, [0, 4]],
    2
  ];
  exports.CreatePoolRequest$ = CreatePoolRequest$;
  var CreatePoolResult$ = [
    3,
    n0,
    _CPRr,
    0,
    [_PA, _PI, _S, _MT, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _SRE, _DPE, _T, _CTr],
    [0, 0, 0, 0, 2, 0, 0, 2, 0, 2, 2, () => TagList, 4]
  ];
  exports.CreatePoolResult$ = CreatePoolResult$;
  var CreateProtectConfigurationRequest$ = [
    3,
    n0,
    _CPCR,
    0,
    [_CT, _DPE, _T],
    [[0, 4], 2, () => TagList]
  ];
  exports.CreateProtectConfigurationRequest$ = CreateProtectConfigurationRequest$;
  var CreateProtectConfigurationResult$ = [
    3,
    n0,
    _CPCRr,
    0,
    [_PCA, _PCI, _CTr, _AD, _DPE, _T],
    [0, 0, 4, 2, 2, () => TagList],
    5
  ];
  exports.CreateProtectConfigurationResult$ = CreateProtectConfigurationResult$;
  var CreateRcsAgentRequest$ = [
    3,
    n0,
    _CRAR,
    0,
    [_DPE, _OOLN, _T, _CT],
    [2, 0, () => TagList, [0, 4]]
  ];
  exports.CreateRcsAgentRequest$ = CreateRcsAgentRequest$;
  var CreateRcsAgentResult$ = [
    3,
    n0,
    _CRARr,
    0,
    [_RAA, _RAI, _S, _DPE, _CTr, _SMOOE, _TWE, _OOLN, _TWCA, _TWCR, _T],
    [0, 0, 0, 2, 4, 2, 2, 0, 0, 0, () => TagList],
    7
  ];
  exports.CreateRcsAgentResult$ = CreateRcsAgentResult$;
  var CreateRegistrationAssociationRequest$ = [
    3,
    n0,
    _CRARre,
    0,
    [_RIeg, _RI],
    [0, 0],
    2
  ];
  exports.CreateRegistrationAssociationRequest$ = CreateRegistrationAssociationRequest$;
  var CreateRegistrationAssociationResult$ = [
    3,
    n0,
    _CRARrea,
    0,
    [_RA, _RIeg, _RTe, _RAe, _RI, _RT, _ICC, _PN],
    [0, 0, 0, 0, 0, 0, 0, 0],
    6
  ];
  exports.CreateRegistrationAssociationResult$ = CreateRegistrationAssociationResult$;
  var CreateRegistrationAttachmentRequest$ = [
    3,
    n0,
    _CRARreat,
    0,
    [_AB, _AU, _T, _CT],
    [21, 0, () => TagList, [0, 4]]
  ];
  exports.CreateRegistrationAttachmentRequest$ = CreateRegistrationAttachmentRequest$;
  var CreateRegistrationAttachmentResult$ = [
    3,
    n0,
    _CRARreate,
    0,
    [_RAAe, _RAIe, _AS, _CTr, _T],
    [0, 0, 0, 4, () => TagList],
    4
  ];
  exports.CreateRegistrationAttachmentResult$ = CreateRegistrationAttachmentResult$;
  var CreateRegistrationRequest$ = [
    3,
    n0,
    _CRR,
    0,
    [_RTe, _T, _CT],
    [0, () => TagList, [0, 4]],
    1
  ];
  exports.CreateRegistrationRequest$ = CreateRegistrationRequest$;
  var CreateRegistrationResult$ = [
    3,
    n0,
    _CRRr,
    0,
    [_RA, _RIeg, _RTe, _RS, _CVN, _CTr, _AAd, _T],
    [0, 0, 0, 0, 1, 4, 128 | 0, () => TagList],
    6
  ];
  exports.CreateRegistrationResult$ = CreateRegistrationResult$;
  var CreateRegistrationVersionRequest$ = [
    3,
    n0,
    _CRVR,
    0,
    [_RIeg],
    [0],
    1
  ];
  exports.CreateRegistrationVersionRequest$ = CreateRegistrationVersionRequest$;
  var CreateRegistrationVersionResult$ = [
    3,
    n0,
    _CRVRr,
    0,
    [_RA, _RIeg, _VN, _RVS, _RVSH],
    [0, 0, 1, 0, () => RegistrationVersionStatusHistory$],
    5
  ];
  exports.CreateRegistrationVersionResult$ = CreateRegistrationVersionResult$;
  var CreateVerifiedDestinationNumberRequest$ = [
    3,
    n0,
    _CVDNR,
    0,
    [_DPN, _RAI, _T, _CT],
    [0, 0, () => TagList, [0, 4]],
    1
  ];
  exports.CreateVerifiedDestinationNumberRequest$ = CreateVerifiedDestinationNumberRequest$;
  var CreateVerifiedDestinationNumberResult$ = [
    3,
    n0,
    _CVDNRr,
    0,
    [_VDNA, _VDNI, _DPN, _S, _CTr, _RAI, _T],
    [0, 0, 0, 0, 4, 0, () => TagList],
    5
  ];
  exports.CreateVerifiedDestinationNumberResult$ = CreateVerifiedDestinationNumberResult$;
  var DeleteAccountDefaultProtectConfigurationRequest$ = [
    3,
    n0,
    _DADPCR,
    0,
    [],
    []
  ];
  exports.DeleteAccountDefaultProtectConfigurationRequest$ = DeleteAccountDefaultProtectConfigurationRequest$;
  var DeleteAccountDefaultProtectConfigurationResult$ = [
    3,
    n0,
    _DADPCRe,
    0,
    [_DPCA, _DPCI],
    [0, 0],
    2
  ];
  exports.DeleteAccountDefaultProtectConfigurationResult$ = DeleteAccountDefaultProtectConfigurationResult$;
  var DeleteConfigurationSetRequest$ = [
    3,
    n0,
    _DCSR,
    0,
    [_CSN],
    [0],
    1
  ];
  exports.DeleteConfigurationSetRequest$ = DeleteConfigurationSetRequest$;
  var DeleteConfigurationSetResult$ = [
    3,
    n0,
    _DCSRe,
    0,
    [_CSA, _CSN, _ED, _DMT, _DSI, _DMFE, _CTr],
    [0, 0, () => EventDestinationList, 0, 0, 2, 4]
  ];
  exports.DeleteConfigurationSetResult$ = DeleteConfigurationSetResult$;
  var DeleteDefaultMessageTypeRequest$ = [
    3,
    n0,
    _DDMTR,
    0,
    [_CSN],
    [0],
    1
  ];
  exports.DeleteDefaultMessageTypeRequest$ = DeleteDefaultMessageTypeRequest$;
  var DeleteDefaultMessageTypeResult$ = [
    3,
    n0,
    _DDMTRe,
    0,
    [_CSA, _CSN, _MT],
    [0, 0, 0]
  ];
  exports.DeleteDefaultMessageTypeResult$ = DeleteDefaultMessageTypeResult$;
  var DeleteDefaultSenderIdRequest$ = [
    3,
    n0,
    _DDSIR,
    0,
    [_CSN],
    [0],
    1
  ];
  exports.DeleteDefaultSenderIdRequest$ = DeleteDefaultSenderIdRequest$;
  var DeleteDefaultSenderIdResult$ = [
    3,
    n0,
    _DDSIRe,
    0,
    [_CSA, _CSN, _SI],
    [0, 0, 0]
  ];
  exports.DeleteDefaultSenderIdResult$ = DeleteDefaultSenderIdResult$;
  var DeleteEventDestinationRequest$ = [
    3,
    n0,
    _DEDR,
    0,
    [_CSN, _EDN],
    [0, 0],
    2
  ];
  exports.DeleteEventDestinationRequest$ = DeleteEventDestinationRequest$;
  var DeleteEventDestinationResult$ = [
    3,
    n0,
    _DEDRe,
    0,
    [_CSA, _CSN, _EDv],
    [0, 0, () => EventDestination$]
  ];
  exports.DeleteEventDestinationResult$ = DeleteEventDestinationResult$;
  var DeleteKeywordRequest$ = [
    3,
    n0,
    _DKR,
    0,
    [_OI, _K],
    [0, 0],
    2
  ];
  exports.DeleteKeywordRequest$ = DeleteKeywordRequest$;
  var DeleteKeywordResult$ = [
    3,
    n0,
    _DKRe,
    0,
    [_OIA, _OI, _K, _KM, _KA],
    [0, 0, 0, 0, 0]
  ];
  exports.DeleteKeywordResult$ = DeleteKeywordResult$;
  var DeleteMediaMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _DMMSLOR,
    0,
    [],
    []
  ];
  exports.DeleteMediaMessageSpendLimitOverrideRequest$ = DeleteMediaMessageSpendLimitOverrideRequest$;
  var DeleteMediaMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _DMMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.DeleteMediaMessageSpendLimitOverrideResult$ = DeleteMediaMessageSpendLimitOverrideResult$;
  var DeleteNotifyConfigurationRequest$ = [
    3,
    n0,
    _DNCR,
    0,
    [_NCI],
    [0],
    1
  ];
  exports.DeleteNotifyConfigurationRequest$ = DeleteNotifyConfigurationRequest$;
  var DeleteNotifyConfigurationResult$ = [
    3,
    n0,
    _DNCRe,
    0,
    [_NCA, _NCI, _DN, _UC, _EC, _Ti, _TUS, _S, _DPE, _CTr, _DTI, _PI, _ECn, _RR],
    [0, 0, 0, 0, 64 | 0, 0, 0, 0, 2, 4, 0, 0, 64 | 0, 0],
    10
  ];
  exports.DeleteNotifyConfigurationResult$ = DeleteNotifyConfigurationResult$;
  var DeleteNotifyMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _DNMSLOR,
    0,
    [],
    []
  ];
  exports.DeleteNotifyMessageSpendLimitOverrideRequest$ = DeleteNotifyMessageSpendLimitOverrideRequest$;
  var DeleteNotifyMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _DNMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.DeleteNotifyMessageSpendLimitOverrideResult$ = DeleteNotifyMessageSpendLimitOverrideResult$;
  var DeleteOptedOutNumberRequest$ = [
    3,
    n0,
    _DOONR,
    0,
    [_OOLN, _OON],
    [0, 0],
    2
  ];
  exports.DeleteOptedOutNumberRequest$ = DeleteOptedOutNumberRequest$;
  var DeleteOptedOutNumberResult$ = [
    3,
    n0,
    _DOONRe,
    0,
    [_OOLA, _OOLN, _OON, _OOT, _EUOO],
    [0, 0, 0, 4, 2]
  ];
  exports.DeleteOptedOutNumberResult$ = DeleteOptedOutNumberResult$;
  var DeleteOptOutListRequest$ = [
    3,
    n0,
    _DOOLR,
    0,
    [_OOLN],
    [0],
    1
  ];
  exports.DeleteOptOutListRequest$ = DeleteOptOutListRequest$;
  var DeleteOptOutListResult$ = [
    3,
    n0,
    _DOOLRe,
    0,
    [_OOLA, _OOLN, _CTr],
    [0, 0, 4]
  ];
  exports.DeleteOptOutListResult$ = DeleteOptOutListResult$;
  var DeletePoolRequest$ = [
    3,
    n0,
    _DPR,
    0,
    [_PI],
    [0],
    1
  ];
  exports.DeletePoolRequest$ = DeletePoolRequest$;
  var DeletePoolResult$ = [
    3,
    n0,
    _DPRe,
    0,
    [_PA, _PI, _S, _MT, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _SRE, _CTr],
    [0, 0, 0, 0, 2, 0, 0, 2, 0, 2, 4]
  ];
  exports.DeletePoolResult$ = DeletePoolResult$;
  var DeleteProtectConfigurationRequest$ = [
    3,
    n0,
    _DPCR,
    0,
    [_PCI],
    [0],
    1
  ];
  exports.DeleteProtectConfigurationRequest$ = DeleteProtectConfigurationRequest$;
  var DeleteProtectConfigurationResult$ = [
    3,
    n0,
    _DPCRe,
    0,
    [_PCA, _PCI, _CTr, _AD, _DPE],
    [0, 0, 4, 2, 2],
    5
  ];
  exports.DeleteProtectConfigurationResult$ = DeleteProtectConfigurationResult$;
  var DeleteProtectConfigurationRuleSetNumberOverrideRequest$ = [
    3,
    n0,
    _DPCRSNOR,
    0,
    [_PCI, _DPN],
    [0, 0],
    2
  ];
  exports.DeleteProtectConfigurationRuleSetNumberOverrideRequest$ = DeleteProtectConfigurationRuleSetNumberOverrideRequest$;
  var DeleteProtectConfigurationRuleSetNumberOverrideResult$ = [
    3,
    n0,
    _DPCRSNORe,
    0,
    [_PCA, _PCI, _DPN, _CTr, _A, _ICC, _ET],
    [0, 0, 0, 4, 0, 0, 4],
    5
  ];
  exports.DeleteProtectConfigurationRuleSetNumberOverrideResult$ = DeleteProtectConfigurationRuleSetNumberOverrideResult$;
  var DeleteRcsAgentRequest$ = [
    3,
    n0,
    _DRAR,
    0,
    [_RAI],
    [0],
    1
  ];
  exports.DeleteRcsAgentRequest$ = DeleteRcsAgentRequest$;
  var DeleteRcsAgentResult$ = [
    3,
    n0,
    _DRARe,
    0,
    [_RAA, _RAI, _S, _CTr, _DPE, _SMOOE, _TWE, _OOLN, _TWCA, _TWCR],
    [0, 0, 0, 4, 2, 2, 2, 0, 0, 0],
    7
  ];
  exports.DeleteRcsAgentResult$ = DeleteRcsAgentResult$;
  var DeleteRegistrationAttachmentRequest$ = [
    3,
    n0,
    _DRARel,
    0,
    [_RAIe],
    [0],
    1
  ];
  exports.DeleteRegistrationAttachmentRequest$ = DeleteRegistrationAttachmentRequest$;
  var DeleteRegistrationAttachmentResult$ = [
    3,
    n0,
    _DRARele,
    0,
    [_RAAe, _RAIe, _AS, _CTr, _AUER],
    [0, 0, 0, 4, 0],
    4
  ];
  exports.DeleteRegistrationAttachmentResult$ = DeleteRegistrationAttachmentResult$;
  var DeleteRegistrationFieldValueRequest$ = [
    3,
    n0,
    _DRFVR,
    0,
    [_RIeg, _FP],
    [0, 0],
    2
  ];
  exports.DeleteRegistrationFieldValueRequest$ = DeleteRegistrationFieldValueRequest$;
  var DeleteRegistrationFieldValueResult$ = [
    3,
    n0,
    _DRFVRe,
    0,
    [_RA, _RIeg, _VN, _FP, _SC, _TV, _RAIe],
    [0, 0, 1, 0, 64 | 0, 0, 0],
    4
  ];
  exports.DeleteRegistrationFieldValueResult$ = DeleteRegistrationFieldValueResult$;
  var DeleteRegistrationRequest$ = [
    3,
    n0,
    _DRR,
    0,
    [_RIeg],
    [0],
    1
  ];
  exports.DeleteRegistrationRequest$ = DeleteRegistrationRequest$;
  var DeleteRegistrationResult$ = [
    3,
    n0,
    _DRRe,
    0,
    [_RA, _RIeg, _RTe, _RS, _CVN, _CTr, _AVN, _LDVN, _AAd],
    [0, 0, 0, 0, 1, 4, 1, 1, 128 | 0],
    6
  ];
  exports.DeleteRegistrationResult$ = DeleteRegistrationResult$;
  var DeleteResourcePolicyRequest$ = [
    3,
    n0,
    _DRPR,
    0,
    [_RAe],
    [0],
    1
  ];
  exports.DeleteResourcePolicyRequest$ = DeleteResourcePolicyRequest$;
  var DeleteResourcePolicyResult$ = [
    3,
    n0,
    _DRPRe,
    0,
    [_RAe, _P, _CTr],
    [0, 0, 4]
  ];
  exports.DeleteResourcePolicyResult$ = DeleteResourcePolicyResult$;
  var DeleteTextMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _DTMSLOR,
    0,
    [],
    []
  ];
  exports.DeleteTextMessageSpendLimitOverrideRequest$ = DeleteTextMessageSpendLimitOverrideRequest$;
  var DeleteTextMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _DTMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.DeleteTextMessageSpendLimitOverrideResult$ = DeleteTextMessageSpendLimitOverrideResult$;
  var DeleteVerifiedDestinationNumberRequest$ = [
    3,
    n0,
    _DVDNR,
    0,
    [_VDNI],
    [0],
    1
  ];
  exports.DeleteVerifiedDestinationNumberRequest$ = DeleteVerifiedDestinationNumberRequest$;
  var DeleteVerifiedDestinationNumberResult$ = [
    3,
    n0,
    _DVDNRe,
    0,
    [_VDNA, _VDNI, _DPN, _CTr],
    [0, 0, 0, 4],
    4
  ];
  exports.DeleteVerifiedDestinationNumberResult$ = DeleteVerifiedDestinationNumberResult$;
  var DeleteVoiceMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _DVMSLOR,
    0,
    [],
    []
  ];
  exports.DeleteVoiceMessageSpendLimitOverrideRequest$ = DeleteVoiceMessageSpendLimitOverrideRequest$;
  var DeleteVoiceMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _DVMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.DeleteVoiceMessageSpendLimitOverrideResult$ = DeleteVoiceMessageSpendLimitOverrideResult$;
  var DescribeAccountAttributesRequest$ = [
    3,
    n0,
    _DAAR,
    0,
    [_NT, _MR],
    [0, 1]
  ];
  exports.DescribeAccountAttributesRequest$ = DescribeAccountAttributesRequest$;
  var DescribeAccountAttributesResult$ = [
    3,
    n0,
    _DAARe,
    0,
    [_AAc, _NT],
    [() => AccountAttributeList, 0]
  ];
  exports.DescribeAccountAttributesResult$ = DescribeAccountAttributesResult$;
  var DescribeAccountLimitsRequest$ = [
    3,
    n0,
    _DALR,
    0,
    [_NT, _MR],
    [0, 1]
  ];
  exports.DescribeAccountLimitsRequest$ = DescribeAccountLimitsRequest$;
  var DescribeAccountLimitsResult$ = [
    3,
    n0,
    _DALRe,
    0,
    [_ALc, _NT],
    [() => AccountLimitList, 0]
  ];
  exports.DescribeAccountLimitsResult$ = DescribeAccountLimitsResult$;
  var DescribeConfigurationSetsRequest$ = [
    3,
    n0,
    _DCSRes,
    0,
    [_CSNo, _Fi, _NT, _MR],
    [64 | 0, () => ConfigurationSetFilterList, 0, 1]
  ];
  exports.DescribeConfigurationSetsRequest$ = DescribeConfigurationSetsRequest$;
  var DescribeConfigurationSetsResult$ = [
    3,
    n0,
    _DCSResc,
    0,
    [_CSo, _NT],
    [() => ConfigurationSetInformationList, 0]
  ];
  exports.DescribeConfigurationSetsResult$ = DescribeConfigurationSetsResult$;
  var DescribeKeywordsRequest$ = [
    3,
    n0,
    _DKRes,
    0,
    [_OI, _Ke, _Fi, _NT, _MR],
    [0, 64 | 0, () => KeywordFilterList, 0, 1],
    1
  ];
  exports.DescribeKeywordsRequest$ = DescribeKeywordsRequest$;
  var DescribeKeywordsResult$ = [
    3,
    n0,
    _DKResc,
    0,
    [_OIA, _OI, _Ke, _NT],
    [0, 0, () => KeywordInformationList, 0]
  ];
  exports.DescribeKeywordsResult$ = DescribeKeywordsResult$;
  var DescribeNotifyConfigurationsRequest$ = [
    3,
    n0,
    _DNCRes,
    0,
    [_NCIo, _Fi, _NT, _MR],
    [64 | 0, () => NotifyConfigurationFilterList, 0, 1]
  ];
  exports.DescribeNotifyConfigurationsRequest$ = DescribeNotifyConfigurationsRequest$;
  var DescribeNotifyConfigurationsResult$ = [
    3,
    n0,
    _DNCResc,
    0,
    [_NC, _NT],
    [() => NotifyConfigurationInformationList, 0]
  ];
  exports.DescribeNotifyConfigurationsResult$ = DescribeNotifyConfigurationsResult$;
  var DescribeNotifyTemplatesRequest$ = [
    3,
    n0,
    _DNTR,
    0,
    [_TI, _Fi, _NT, _MR],
    [64 | 0, () => NotifyTemplateFilterList, 0, 1]
  ];
  exports.DescribeNotifyTemplatesRequest$ = DescribeNotifyTemplatesRequest$;
  var DescribeNotifyTemplatesResult$ = [
    3,
    n0,
    _DNTRe,
    0,
    [_NTo, _NT],
    [() => NotifyTemplateInformationList, 0]
  ];
  exports.DescribeNotifyTemplatesResult$ = DescribeNotifyTemplatesResult$;
  var DescribeOptedOutNumbersRequest$ = [
    3,
    n0,
    _DOONRes,
    0,
    [_OOLN, _OONp, _Fi, _NT, _MR],
    [0, 64 | 0, () => OptedOutFilterList, 0, 1],
    1
  ];
  exports.DescribeOptedOutNumbersRequest$ = DescribeOptedOutNumbersRequest$;
  var DescribeOptedOutNumbersResult$ = [
    3,
    n0,
    _DOONResc,
    0,
    [_OOLA, _OOLN, _OONp, _NT],
    [0, 0, () => OptedOutNumberInformationList, 0]
  ];
  exports.DescribeOptedOutNumbersResult$ = DescribeOptedOutNumbersResult$;
  var DescribeOptOutListsRequest$ = [
    3,
    n0,
    _DOOLRes,
    0,
    [_OOLNp, _NT, _MR, _O],
    [64 | 0, 0, 1, 0]
  ];
  exports.DescribeOptOutListsRequest$ = DescribeOptOutListsRequest$;
  var DescribeOptOutListsResult$ = [
    3,
    n0,
    _DOOLResc,
    0,
    [_OOL, _NT],
    [() => OptOutListInformationList, 0]
  ];
  exports.DescribeOptOutListsResult$ = DescribeOptOutListsResult$;
  var DescribePhoneNumbersRequest$ = [
    3,
    n0,
    _DPNR,
    0,
    [_PNI, _Fi, _NT, _MR, _O],
    [64 | 0, () => PhoneNumberFilterList, 0, 1, 0]
  ];
  exports.DescribePhoneNumbersRequest$ = DescribePhoneNumbersRequest$;
  var DescribePhoneNumbersResult$ = [
    3,
    n0,
    _DPNRe,
    0,
    [_PNh, _NT],
    [() => PhoneNumberInformationList, 0]
  ];
  exports.DescribePhoneNumbersResult$ = DescribePhoneNumbersResult$;
  var DescribePoolsRequest$ = [
    3,
    n0,
    _DPRes,
    0,
    [_PIo, _Fi, _NT, _MR, _O],
    [64 | 0, () => PoolFilterList, 0, 1, 0]
  ];
  exports.DescribePoolsRequest$ = DescribePoolsRequest$;
  var DescribePoolsResult$ = [
    3,
    n0,
    _DPResc,
    0,
    [_Po, _NT],
    [() => PoolInformationList, 0]
  ];
  exports.DescribePoolsResult$ = DescribePoolsResult$;
  var DescribeProtectConfigurationsRequest$ = [
    3,
    n0,
    _DPCRes,
    0,
    [_PCIr, _Fi, _NT, _MR],
    [64 | 0, () => ProtectConfigurationFilterList, 0, 1]
  ];
  exports.DescribeProtectConfigurationsRequest$ = DescribeProtectConfigurationsRequest$;
  var DescribeProtectConfigurationsResult$ = [
    3,
    n0,
    _DPCResc,
    0,
    [_PC, _NT],
    [() => ProtectConfigurationInformationList, 0]
  ];
  exports.DescribeProtectConfigurationsResult$ = DescribeProtectConfigurationsResult$;
  var DescribeRcsAgentCountryLaunchStatusRequest$ = [
    3,
    n0,
    _DRACLSR,
    0,
    [_RAI, _ICCs, _Fi, _MR, _NT],
    [0, 64 | 0, () => CountryLaunchStatusFilterList, 1, 0],
    1
  ];
  exports.DescribeRcsAgentCountryLaunchStatusRequest$ = DescribeRcsAgentCountryLaunchStatusRequest$;
  var DescribeRcsAgentCountryLaunchStatusResult$ = [
    3,
    n0,
    _DRACLSRe,
    0,
    [_RAI, _RAA, _CLS, _NT],
    [0, 0, () => CountryLaunchStatusInformationList, 0],
    2
  ];
  exports.DescribeRcsAgentCountryLaunchStatusResult$ = DescribeRcsAgentCountryLaunchStatusResult$;
  var DescribeRcsAgentsRequest$ = [
    3,
    n0,
    _DRARes,
    0,
    [_RAIc, _O, _Fi, _NT, _MR],
    [64 | 0, 0, () => RcsAgentFilterList, 0, 1]
  ];
  exports.DescribeRcsAgentsRequest$ = DescribeRcsAgentsRequest$;
  var DescribeRcsAgentsResult$ = [
    3,
    n0,
    _DRAResc,
    0,
    [_RAc, _NT],
    [() => RcsAgentInformationList, 0]
  ];
  exports.DescribeRcsAgentsResult$ = DescribeRcsAgentsResult$;
  var DescribeRegistrationAttachmentsRequest$ = [
    3,
    n0,
    _DRARescr,
    0,
    [_RAIeg, _Fi, _NT, _MR],
    [64 | 0, () => RegistrationAttachmentFilterList, 0, 1]
  ];
  exports.DescribeRegistrationAttachmentsRequest$ = DescribeRegistrationAttachmentsRequest$;
  var DescribeRegistrationAttachmentsResult$ = [
    3,
    n0,
    _DRARescri,
    0,
    [_RAeg, _NT],
    [() => RegistrationAttachmentsInformationList, 0],
    1
  ];
  exports.DescribeRegistrationAttachmentsResult$ = DescribeRegistrationAttachmentsResult$;
  var DescribeRegistrationFieldDefinitionsRequest$ = [
    3,
    n0,
    _DRFDR,
    0,
    [_RTe, _SP, _FPi, _NT, _MR],
    [0, 0, 64 | 0, 0, 1],
    1
  ];
  exports.DescribeRegistrationFieldDefinitionsRequest$ = DescribeRegistrationFieldDefinitionsRequest$;
  var DescribeRegistrationFieldDefinitionsResult$ = [
    3,
    n0,
    _DRFDRe,
    0,
    [_RTe, _RFD, _NT],
    [0, () => RegistrationFieldDefinitionList, 0],
    2
  ];
  exports.DescribeRegistrationFieldDefinitionsResult$ = DescribeRegistrationFieldDefinitionsResult$;
  var DescribeRegistrationFieldValuesRequest$ = [
    3,
    n0,
    _DRFVRes,
    0,
    [_RIeg, _VN, _SP, _FPi, _NT, _MR],
    [0, 1, 0, 64 | 0, 0, 1],
    1
  ];
  exports.DescribeRegistrationFieldValuesRequest$ = DescribeRegistrationFieldValuesRequest$;
  var DescribeRegistrationFieldValuesResult$ = [
    3,
    n0,
    _DRFVResc,
    0,
    [_RA, _RIeg, _VN, _RFV, _NT],
    [0, 0, 1, () => RegistrationFieldValueInformationList, 0],
    4
  ];
  exports.DescribeRegistrationFieldValuesResult$ = DescribeRegistrationFieldValuesResult$;
  var DescribeRegistrationSectionDefinitionsRequest$ = [
    3,
    n0,
    _DRSDR,
    0,
    [_RTe, _SPe, _NT, _MR],
    [0, 64 | 0, 0, 1],
    1
  ];
  exports.DescribeRegistrationSectionDefinitionsRequest$ = DescribeRegistrationSectionDefinitionsRequest$;
  var DescribeRegistrationSectionDefinitionsResult$ = [
    3,
    n0,
    _DRSDRe,
    0,
    [_RTe, _RSD, _NT],
    [0, () => RegistrationSectionDefinitionList, 0],
    2
  ];
  exports.DescribeRegistrationSectionDefinitionsResult$ = DescribeRegistrationSectionDefinitionsResult$;
  var DescribeRegistrationsRequest$ = [
    3,
    n0,
    _DRRes,
    0,
    [_RIegi, _Fi, _NT, _MR],
    [64 | 0, () => RegistrationFilterList, 0, 1]
  ];
  exports.DescribeRegistrationsRequest$ = DescribeRegistrationsRequest$;
  var DescribeRegistrationsResult$ = [
    3,
    n0,
    _DRResc,
    0,
    [_Re, _NT],
    [() => RegistrationInformationList, 0],
    1
  ];
  exports.DescribeRegistrationsResult$ = DescribeRegistrationsResult$;
  var DescribeRegistrationTypeDefinitionsRequest$ = [
    3,
    n0,
    _DRTDR,
    0,
    [_RTeg, _Fi, _NT, _MR],
    [64 | 0, () => RegistrationTypeFilterList, 0, 1]
  ];
  exports.DescribeRegistrationTypeDefinitionsRequest$ = DescribeRegistrationTypeDefinitionsRequest$;
  var DescribeRegistrationTypeDefinitionsResult$ = [
    3,
    n0,
    _DRTDRe,
    0,
    [_RTD, _NT],
    [() => RegistrationTypeDefinitionList, 0],
    1
  ];
  exports.DescribeRegistrationTypeDefinitionsResult$ = DescribeRegistrationTypeDefinitionsResult$;
  var DescribeRegistrationVersionsRequest$ = [
    3,
    n0,
    _DRVR,
    0,
    [_RIeg, _VNe, _Fi, _NT, _MR],
    [0, 64 | 1, () => RegistrationVersionFilterList, 0, 1],
    1
  ];
  exports.DescribeRegistrationVersionsRequest$ = DescribeRegistrationVersionsRequest$;
  var DescribeRegistrationVersionsResult$ = [
    3,
    n0,
    _DRVRe,
    0,
    [_RA, _RIeg, _RV, _NT],
    [0, 0, () => RegistrationVersionInformationList, 0],
    3
  ];
  exports.DescribeRegistrationVersionsResult$ = DescribeRegistrationVersionsResult$;
  var DescribeSenderIdsRequest$ = [
    3,
    n0,
    _DSIR,
    0,
    [_SIe, _Fi, _NT, _MR, _O],
    [() => SenderIdList, () => SenderIdFilterList, 0, 1, 0]
  ];
  exports.DescribeSenderIdsRequest$ = DescribeSenderIdsRequest$;
  var DescribeSenderIdsResult$ = [
    3,
    n0,
    _DSIRe,
    0,
    [_SIe, _NT],
    [() => SenderIdInformationList, 0]
  ];
  exports.DescribeSenderIdsResult$ = DescribeSenderIdsResult$;
  var DescribeSpendLimitsRequest$ = [
    3,
    n0,
    _DSLR,
    0,
    [_NT, _MR],
    [0, 1]
  ];
  exports.DescribeSpendLimitsRequest$ = DescribeSpendLimitsRequest$;
  var DescribeSpendLimitsResult$ = [
    3,
    n0,
    _DSLRe,
    0,
    [_SL, _NT],
    [() => SpendLimitList, 0]
  ];
  exports.DescribeSpendLimitsResult$ = DescribeSpendLimitsResult$;
  var DescribeVerifiedDestinationNumbersRequest$ = [
    3,
    n0,
    _DVDNRes,
    0,
    [_VDNIe, _DPNe, _Fi, _NT, _MR],
    [64 | 0, 64 | 0, () => VerifiedDestinationNumberFilterList, 0, 1]
  ];
  exports.DescribeVerifiedDestinationNumbersRequest$ = DescribeVerifiedDestinationNumbersRequest$;
  var DescribeVerifiedDestinationNumbersResult$ = [
    3,
    n0,
    _DVDNResc,
    0,
    [_VDN, _NT],
    [() => VerifiedDestinationNumberInformationList, 0],
    1
  ];
  exports.DescribeVerifiedDestinationNumbersResult$ = DescribeVerifiedDestinationNumbersResult$;
  var DisassociateOriginationIdentityRequest$ = [
    3,
    n0,
    _DOIR,
    0,
    [_PI, _OI, _ICC, _CT],
    [0, 0, 0, [0, 4]],
    2
  ];
  exports.DisassociateOriginationIdentityRequest$ = DisassociateOriginationIdentityRequest$;
  var DisassociateOriginationIdentityResult$ = [
    3,
    n0,
    _DOIRi,
    0,
    [_PA, _PI, _OIA, _OI, _ICC],
    [0, 0, 0, 0, 0]
  ];
  exports.DisassociateOriginationIdentityResult$ = DisassociateOriginationIdentityResult$;
  var DisassociateProtectConfigurationRequest$ = [
    3,
    n0,
    _DPCRi,
    0,
    [_PCI, _CSN],
    [0, 0],
    2
  ];
  exports.DisassociateProtectConfigurationRequest$ = DisassociateProtectConfigurationRequest$;
  var DisassociateProtectConfigurationResult$ = [
    3,
    n0,
    _DPCRis,
    0,
    [_CSA, _CSN, _PCA, _PCI],
    [0, 0, 0, 0],
    4
  ];
  exports.DisassociateProtectConfigurationResult$ = DisassociateProtectConfigurationResult$;
  var DiscardRegistrationVersionRequest$ = [
    3,
    n0,
    _DRVRi,
    0,
    [_RIeg],
    [0],
    1
  ];
  exports.DiscardRegistrationVersionRequest$ = DiscardRegistrationVersionRequest$;
  var DiscardRegistrationVersionResult$ = [
    3,
    n0,
    _DRVRis,
    0,
    [_RA, _RIeg, _VN, _RVS, _RVSH],
    [0, 0, 1, 0, () => RegistrationVersionStatusHistory$],
    5
  ];
  exports.DiscardRegistrationVersionResult$ = DiscardRegistrationVersionResult$;
  var EventDestination$ = [
    3,
    n0,
    _EDv,
    0,
    [_EDN, _E, _MET, _CWLD, _KFD, _SD],
    [0, 2, 64 | 0, () => CloudWatchLogsDestination$, () => KinesisFirehoseDestination$, () => SnsDestination$],
    3
  ];
  exports.EventDestination$ = EventDestination$;
  var GetProtectConfigurationCountryRuleSetRequest$ = [
    3,
    n0,
    _GPCCRSR,
    0,
    [_PCI, _NCu],
    [0, 0],
    2
  ];
  exports.GetProtectConfigurationCountryRuleSetRequest$ = GetProtectConfigurationCountryRuleSetRequest$;
  var GetProtectConfigurationCountryRuleSetResult$ = [
    3,
    n0,
    _GPCCRSRe,
    0,
    [_PCA, _PCI, _NCu, _CRS],
    [0, 0, 0, () => ProtectConfigurationCountryRuleSet],
    4
  ];
  exports.GetProtectConfigurationCountryRuleSetResult$ = GetProtectConfigurationCountryRuleSetResult$;
  var GetResourcePolicyRequest$ = [
    3,
    n0,
    _GRPR,
    0,
    [_RAe],
    [0],
    1
  ];
  exports.GetResourcePolicyRequest$ = GetResourcePolicyRequest$;
  var GetResourcePolicyResult$ = [
    3,
    n0,
    _GRPRe,
    0,
    [_RAe, _P, _CTr],
    [0, 0, 4]
  ];
  exports.GetResourcePolicyResult$ = GetResourcePolicyResult$;
  var KeywordFilter$ = [
    3,
    n0,
    _KF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.KeywordFilter$ = KeywordFilter$;
  var KeywordInformation$ = [
    3,
    n0,
    _KI,
    0,
    [_K, _KM, _KA],
    [0, 0, 0],
    3
  ];
  exports.KeywordInformation$ = KeywordInformation$;
  var KinesisFirehoseDestination$ = [
    3,
    n0,
    _KFD,
    0,
    [_IRA, _DSA],
    [0, 0],
    2
  ];
  exports.KinesisFirehoseDestination$ = KinesisFirehoseDestination$;
  var ListNotifyCountriesRequest$ = [
    3,
    n0,
    _LNCR,
    0,
    [_Ch, _UCs, _Ti, _NT, _MR],
    [64 | 0, 64 | 0, 0, 0, 1]
  ];
  exports.ListNotifyCountriesRequest$ = ListNotifyCountriesRequest$;
  var ListNotifyCountriesResult$ = [
    3,
    n0,
    _LNCRi,
    0,
    [_NCo, _NT],
    [() => NotifyCountryInformationList, 0]
  ];
  exports.ListNotifyCountriesResult$ = ListNotifyCountriesResult$;
  var ListPoolOriginationIdentitiesRequest$ = [
    3,
    n0,
    _LPOIR,
    0,
    [_PI, _Fi, _NT, _MR],
    [0, () => PoolOriginationIdentitiesFilterList, 0, 1],
    1
  ];
  exports.ListPoolOriginationIdentitiesRequest$ = ListPoolOriginationIdentitiesRequest$;
  var ListPoolOriginationIdentitiesResult$ = [
    3,
    n0,
    _LPOIRi,
    0,
    [_PA, _PI, _OIr, _NT],
    [0, 0, () => OriginationIdentityMetadataList, 0]
  ];
  exports.ListPoolOriginationIdentitiesResult$ = ListPoolOriginationIdentitiesResult$;
  var ListProtectConfigurationRuleSetNumberOverridesRequest$ = [
    3,
    n0,
    _LPCRSNOR,
    0,
    [_PCI, _Fi, _NT, _MR],
    [0, () => ListProtectConfigurationRuleSetNumberOverrideFilter, 0, 1],
    1
  ];
  exports.ListProtectConfigurationRuleSetNumberOverridesRequest$ = ListProtectConfigurationRuleSetNumberOverridesRequest$;
  var ListProtectConfigurationRuleSetNumberOverridesResult$ = [
    3,
    n0,
    _LPCRSNORi,
    0,
    [_PCA, _PCI, _RSNO, _NT],
    [0, 0, () => ProtectConfigurationRuleSetNumberOverrideList, 0],
    2
  ];
  exports.ListProtectConfigurationRuleSetNumberOverridesResult$ = ListProtectConfigurationRuleSetNumberOverridesResult$;
  var ListRegistrationAssociationsRequest$ = [
    3,
    n0,
    _LRAR,
    0,
    [_RIeg, _Fi, _NT, _MR],
    [0, () => RegistrationAssociationFilterList, 0, 1],
    1
  ];
  exports.ListRegistrationAssociationsRequest$ = ListRegistrationAssociationsRequest$;
  var ListRegistrationAssociationsResult$ = [
    3,
    n0,
    _LRARi,
    0,
    [_RA, _RIeg, _RTe, _RAegi, _NT],
    [0, 0, 0, () => RegistrationAssociationMetadataList, 0],
    4
  ];
  exports.ListRegistrationAssociationsResult$ = ListRegistrationAssociationsResult$;
  var ListTagsForResourceRequest$ = [
    3,
    n0,
    _LTFRR,
    0,
    [_RAe],
    [0],
    1
  ];
  exports.ListTagsForResourceRequest$ = ListTagsForResourceRequest$;
  var ListTagsForResourceResult$ = [
    3,
    n0,
    _LTFRRi,
    0,
    [_RAe, _T],
    [0, () => TagList]
  ];
  exports.ListTagsForResourceResult$ = ListTagsForResourceResult$;
  var NotifyConfigurationFilter$ = [
    3,
    n0,
    _NCF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.NotifyConfigurationFilter$ = NotifyConfigurationFilter$;
  var NotifyConfigurationInformation$ = [
    3,
    n0,
    _NCIot,
    0,
    [_NCA, _NCI, _DN, _UC, _EC, _Ti, _TUS, _S, _DPE, _CTr, _DTI, _PI, _ECn, _RR],
    [0, 0, 0, 0, 64 | 0, 0, 0, 0, 2, 4, 0, 0, 64 | 0, 0],
    10
  ];
  exports.NotifyConfigurationInformation$ = NotifyConfigurationInformation$;
  var NotifyCountryInformation$ = [
    3,
    n0,
    _NCIoti,
    0,
    [_ICC, _CNo, _SCu, _SUC, _ST, _COIR],
    [0, 0, 64 | 0, 64 | 0, 64 | 0, 2],
    6
  ];
  exports.NotifyCountryInformation$ = NotifyCountryInformation$;
  var NotifyTemplateFilter$ = [
    3,
    n0,
    _NTF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.NotifyTemplateFilter$ = NotifyTemplateFilter$;
  var NotifyTemplateInformation$ = [
    3,
    n0,
    _NTI,
    0,
    [_TIe, _Ve, _TT, _Ch, _CTr, _TA, _S, _SCup, _LC, _Co, _Var, _SVI],
    [0, 1, 0, 64 | 0, 4, 64 | 0, 0, 64 | 0, 0, 0, () => TemplateVariablesMap, 64 | 0],
    5
  ];
  exports.NotifyTemplateInformation$ = NotifyTemplateInformation$;
  var OptedOutFilter$ = [
    3,
    n0,
    _OOF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.OptedOutFilter$ = OptedOutFilter$;
  var OptedOutNumberInformation$ = [
    3,
    n0,
    _OONI,
    0,
    [_OON, _OOT, _EUOO],
    [0, 4, 2],
    3
  ];
  exports.OptedOutNumberInformation$ = OptedOutNumberInformation$;
  var OptOutListInformation$ = [
    3,
    n0,
    _OOLI,
    0,
    [_OOLA, _OOLN, _CTr],
    [0, 0, 4],
    3
  ];
  exports.OptOutListInformation$ = OptOutListInformation$;
  var OriginationIdentityMetadata$ = [
    3,
    n0,
    _OIM,
    0,
    [_OIA, _OI, _ICC, _NCum, _PN],
    [0, 0, 0, 64 | 0, 0],
    4
  ];
  exports.OriginationIdentityMetadata$ = OriginationIdentityMetadata$;
  var PhoneNumberFilter$ = [
    3,
    n0,
    _PNF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.PhoneNumberFilter$ = PhoneNumberFilter$;
  var PhoneNumberInformation$ = [
    3,
    n0,
    _PNIh,
    0,
    [_PNA, _PN, _S, _ICC, _MT, _NCum, _NTu, _MLP, _TWE, _SMOOE, _OOLN, _DPE, _CTr, _PNIho, _TWCA, _TWCR, _ISEn, _PI, _RIeg],
    [0, 0, 0, 0, 0, 64 | 0, 0, 0, 2, 2, 0, 2, 4, 0, 0, 0, 2, 0, 0],
    13
  ];
  exports.PhoneNumberInformation$ = PhoneNumberInformation$;
  var PoolFilter$ = [
    3,
    n0,
    _PF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.PoolFilter$ = PoolFilter$;
  var PoolInformation$ = [
    3,
    n0,
    _PIoo,
    0,
    [_PA, _PI, _S, _MT, _TWE, _SMOOE, _OOLN, _SRE, _DPE, _CTr, _TWCA, _TWCR],
    [0, 0, 0, 0, 2, 2, 0, 2, 2, 4, 0, 0],
    10
  ];
  exports.PoolInformation$ = PoolInformation$;
  var PoolOriginationIdentitiesFilter$ = [
    3,
    n0,
    _POIF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.PoolOriginationIdentitiesFilter$ = PoolOriginationIdentitiesFilter$;
  var ProtectConfigurationCountryRuleSetInformation$ = [
    3,
    n0,
    _PCCRSI,
    0,
    [_PS],
    [0],
    1
  ];
  exports.ProtectConfigurationCountryRuleSetInformation$ = ProtectConfigurationCountryRuleSetInformation$;
  var ProtectConfigurationFilter$ = [
    3,
    n0,
    _PCF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.ProtectConfigurationFilter$ = ProtectConfigurationFilter$;
  var ProtectConfigurationInformation$ = [
    3,
    n0,
    _PCIro,
    0,
    [_PCA, _PCI, _CTr, _AD, _DPE],
    [0, 0, 4, 2, 2],
    5
  ];
  exports.ProtectConfigurationInformation$ = ProtectConfigurationInformation$;
  var ProtectConfigurationRuleSetNumberOverride$ = [
    3,
    n0,
    _PCRSNO,
    0,
    [_DPN, _CTr, _A, _ICC, _ET],
    [0, 4, 0, 0, 4],
    3
  ];
  exports.ProtectConfigurationRuleSetNumberOverride$ = ProtectConfigurationRuleSetNumberOverride$;
  var ProtectConfigurationRuleSetNumberOverrideFilterItem$ = [
    3,
    n0,
    _PCRSNOFI,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.ProtectConfigurationRuleSetNumberOverrideFilterItem$ = ProtectConfigurationRuleSetNumberOverrideFilterItem$;
  var PutKeywordRequest$ = [
    3,
    n0,
    _PKR,
    0,
    [_OI, _K, _KM, _KA],
    [0, 0, 0, 0],
    3
  ];
  exports.PutKeywordRequest$ = PutKeywordRequest$;
  var PutKeywordResult$ = [
    3,
    n0,
    _PKRu,
    0,
    [_OIA, _OI, _K, _KM, _KA],
    [0, 0, 0, 0, 0]
  ];
  exports.PutKeywordResult$ = PutKeywordResult$;
  var PutMessageFeedbackRequest$ = [
    3,
    n0,
    _PMFR,
    0,
    [_MI, _MFS],
    [0, 0],
    2
  ];
  exports.PutMessageFeedbackRequest$ = PutMessageFeedbackRequest$;
  var PutMessageFeedbackResult$ = [
    3,
    n0,
    _PMFRu,
    0,
    [_MI, _MFS],
    [0, 0],
    2
  ];
  exports.PutMessageFeedbackResult$ = PutMessageFeedbackResult$;
  var PutOptedOutNumberRequest$ = [
    3,
    n0,
    _POONR,
    0,
    [_OOLN, _OON],
    [0, 0],
    2
  ];
  exports.PutOptedOutNumberRequest$ = PutOptedOutNumberRequest$;
  var PutOptedOutNumberResult$ = [
    3,
    n0,
    _POONRu,
    0,
    [_OOLA, _OOLN, _OON, _OOT, _EUOO],
    [0, 0, 0, 4, 2]
  ];
  exports.PutOptedOutNumberResult$ = PutOptedOutNumberResult$;
  var PutProtectConfigurationRuleSetNumberOverrideRequest$ = [
    3,
    n0,
    _PPCRSNOR,
    0,
    [_PCI, _DPN, _A, _CT, _ET],
    [0, 0, 0, [0, 4], 4],
    3
  ];
  exports.PutProtectConfigurationRuleSetNumberOverrideRequest$ = PutProtectConfigurationRuleSetNumberOverrideRequest$;
  var PutProtectConfigurationRuleSetNumberOverrideResult$ = [
    3,
    n0,
    _PPCRSNORu,
    0,
    [_PCA, _PCI, _DPN, _CTr, _A, _ICC, _ET],
    [0, 0, 0, 4, 0, 0, 4],
    5
  ];
  exports.PutProtectConfigurationRuleSetNumberOverrideResult$ = PutProtectConfigurationRuleSetNumberOverrideResult$;
  var PutRegistrationFieldValueRequest$ = [
    3,
    n0,
    _PRFVR,
    0,
    [_RIeg, _FP, _SC, _TV, _RAIe],
    [0, 0, 64 | 0, 0, 0],
    2
  ];
  exports.PutRegistrationFieldValueRequest$ = PutRegistrationFieldValueRequest$;
  var PutRegistrationFieldValueResult$ = [
    3,
    n0,
    _PRFVRu,
    0,
    [_RA, _RIeg, _VN, _FP, _SC, _TV, _RAIe],
    [0, 0, 1, 0, 64 | 0, 0, 0],
    4
  ];
  exports.PutRegistrationFieldValueResult$ = PutRegistrationFieldValueResult$;
  var PutResourcePolicyRequest$ = [
    3,
    n0,
    _PRPR,
    0,
    [_RAe, _P],
    [0, 0],
    2
  ];
  exports.PutResourcePolicyRequest$ = PutResourcePolicyRequest$;
  var PutResourcePolicyResult$ = [
    3,
    n0,
    _PRPRu,
    0,
    [_RAe, _P, _CTr],
    [0, 0, 4]
  ];
  exports.PutResourcePolicyResult$ = PutResourcePolicyResult$;
  var RcsAgentFilter$ = [
    3,
    n0,
    _RAF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.RcsAgentFilter$ = RcsAgentFilter$;
  var RcsAgentInformation$ = [
    3,
    n0,
    _RAIcs,
    0,
    [_RAA, _RAI, _S, _CTr, _DPE, _SMOOE, _TWE, _OOLN, _TWCA, _TWCR, _PI, _TAe],
    [0, 0, 0, 4, 2, 2, 2, 0, 0, 0, 0, () => TestingAgentInformation$],
    7
  ];
  exports.RcsAgentInformation$ = RcsAgentInformation$;
  var RegistrationAssociationFilter$ = [
    3,
    n0,
    _RAFe,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.RegistrationAssociationFilter$ = RegistrationAssociationFilter$;
  var RegistrationAssociationMetadata$ = [
    3,
    n0,
    _RAM,
    0,
    [_RAe, _RI, _RT, _ICC, _PN],
    [0, 0, 0, 0, 0],
    3
  ];
  exports.RegistrationAssociationMetadata$ = RegistrationAssociationMetadata$;
  var RegistrationAttachmentFilter$ = [
    3,
    n0,
    _RAFeg,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.RegistrationAttachmentFilter$ = RegistrationAttachmentFilter$;
  var RegistrationAttachmentsInformation$ = [
    3,
    n0,
    _RAIegi,
    0,
    [_RAAe, _RAIe, _AS, _CTr, _AUER, _AU],
    [0, 0, 0, 4, 0, 0],
    4
  ];
  exports.RegistrationAttachmentsInformation$ = RegistrationAttachmentsInformation$;
  var RegistrationDeniedReasonInformation$ = [
    3,
    n0,
    _RDRI,
    0,
    [_R, _SDh, _LD, _DT, _DL],
    [0, 0, 0, 0, 0],
    2
  ];
  exports.RegistrationDeniedReasonInformation$ = RegistrationDeniedReasonInformation$;
  var RegistrationFieldDefinition$ = [
    3,
    n0,
    _RFDe,
    0,
    [_SP, _FP, _FT, _FR, _DH, _SV, _TVe],
    [0, 0, 0, 0, () => RegistrationFieldDisplayHints$, () => SelectValidation$, () => TextValidation$],
    5
  ];
  exports.RegistrationFieldDefinition$ = RegistrationFieldDefinition$;
  var RegistrationFieldDisplayHints$ = [
    3,
    n0,
    _RFDH,
    0,
    [_Tit, _SDh, _LD, _DT, _DL, _SOD, _TVD, _ETV],
    [0, 0, 0, 0, 0, () => SelectOptionDescriptionsList, 0, 0],
    2
  ];
  exports.RegistrationFieldDisplayHints$ = RegistrationFieldDisplayHints$;
  var RegistrationFieldValueInformation$ = [
    3,
    n0,
    _RFVI,
    0,
    [_FP, _SC, _TV, _RAIe, _DR, _Fe],
    [0, 64 | 0, 0, 0, 0, 0],
    1
  ];
  exports.RegistrationFieldValueInformation$ = RegistrationFieldValueInformation$;
  var RegistrationFilter$ = [
    3,
    n0,
    _RF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.RegistrationFilter$ = RegistrationFilter$;
  var RegistrationInformation$ = [
    3,
    n0,
    _RIegis,
    0,
    [_RA, _RIeg, _RTe, _RS, _CVN, _CTr, _AVN, _LDVN, _AAd],
    [0, 0, 0, 0, 1, 4, 1, 1, 128 | 0],
    6
  ];
  exports.RegistrationInformation$ = RegistrationInformation$;
  var RegistrationSectionDefinition$ = [
    3,
    n0,
    _RSDe,
    0,
    [_SP, _DH],
    [0, () => RegistrationSectionDisplayHints$],
    2
  ];
  exports.RegistrationSectionDefinition$ = RegistrationSectionDefinition$;
  var RegistrationSectionDisplayHints$ = [
    3,
    n0,
    _RSDH,
    0,
    [_Tit, _SDh, _LD, _DT, _DL],
    [0, 0, 0, 0, 0],
    2
  ];
  exports.RegistrationSectionDisplayHints$ = RegistrationSectionDisplayHints$;
  var RegistrationTypeDefinition$ = [
    3,
    n0,
    _RTDe,
    0,
    [_RTe, _DH, _SA],
    [0, () => RegistrationTypeDisplayHints$, () => SupportedAssociationList],
    2
  ];
  exports.RegistrationTypeDefinition$ = RegistrationTypeDefinition$;
  var RegistrationTypeDisplayHints$ = [
    3,
    n0,
    _RTDH,
    0,
    [_Tit, _SDh, _LD, _DT, _DL],
    [0, 0, 0, 0, 0],
    1
  ];
  exports.RegistrationTypeDisplayHints$ = RegistrationTypeDisplayHints$;
  var RegistrationTypeFilter$ = [
    3,
    n0,
    _RTF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.RegistrationTypeFilter$ = RegistrationTypeFilter$;
  var RegistrationVersionFilter$ = [
    3,
    n0,
    _RVF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.RegistrationVersionFilter$ = RegistrationVersionFilter$;
  var RegistrationVersionInformation$ = [
    3,
    n0,
    _RVI,
    0,
    [_VN, _RVS, _RVSH, _DRe, _Fe],
    [1, 0, () => RegistrationVersionStatusHistory$, () => RegistrationDeniedReasonInformationList, 0],
    3
  ];
  exports.RegistrationVersionInformation$ = RegistrationVersionInformation$;
  var RegistrationVersionStatusHistory$ = [
    3,
    n0,
    _RVSH,
    0,
    [_DTr, _STu, _ART, _RTev, _RAT, _AT, _DTi, _DTe, _RTevo, _ATr],
    [4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
    1
  ];
  exports.RegistrationVersionStatusHistory$ = RegistrationVersionStatusHistory$;
  var ReleasePhoneNumberRequest$ = [
    3,
    n0,
    _RPNR,
    0,
    [_PNIho],
    [0],
    1
  ];
  exports.ReleasePhoneNumberRequest$ = ReleasePhoneNumberRequest$;
  var ReleasePhoneNumberResult$ = [
    3,
    n0,
    _RPNRe,
    0,
    [_PNA, _PNIho, _PN, _S, _ICC, _MT, _NCum, _NTu, _MLP, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _RIeg, _CTr],
    [0, 0, 0, 0, 0, 0, 64 | 0, 0, 0, 2, 0, 0, 2, 0, 0, 4]
  ];
  exports.ReleasePhoneNumberResult$ = ReleasePhoneNumberResult$;
  var ReleaseSenderIdRequest$ = [
    3,
    n0,
    _RSIR,
    0,
    [_SI, _ICC],
    [0, 0],
    2
  ];
  exports.ReleaseSenderIdRequest$ = ReleaseSenderIdRequest$;
  var ReleaseSenderIdResult$ = [
    3,
    n0,
    _RSIRe,
    0,
    [_SIA, _SI, _ICC, _MTe, _MLP, _Reg, _RIeg],
    [0, 0, 0, 64 | 0, 0, 2, 0],
    6
  ];
  exports.ReleaseSenderIdResult$ = ReleaseSenderIdResult$;
  var RequestPhoneNumberRequest$ = [
    3,
    n0,
    _RPNReq,
    0,
    [_ICC, _MT, _NCum, _NTu, _OOLN, _PI, _RIeg, _ISEn, _DPE, _T, _CT],
    [0, 0, 64 | 0, 0, 0, 0, 0, 2, 2, () => TagList, [0, 4]],
    4
  ];
  exports.RequestPhoneNumberRequest$ = RequestPhoneNumberRequest$;
  var RequestPhoneNumberResult$ = [
    3,
    n0,
    _RPNRequ,
    0,
    [_PNA, _PNIho, _PN, _S, _ICC, _MT, _NCum, _NTu, _MLP, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _ISEn, _DPE, _PI, _RIeg, _T, _CTr],
    [0, 0, 0, 0, 0, 0, 64 | 0, 0, 0, 2, 0, 0, 2, 0, 2, 2, 0, 0, () => TagList, 4]
  ];
  exports.RequestPhoneNumberResult$ = RequestPhoneNumberResult$;
  var RequestSenderIdRequest$ = [
    3,
    n0,
    _RSIReq,
    0,
    [_SI, _ICC, _MTe, _DPE, _T, _CT],
    [0, 0, 64 | 0, 2, () => TagList, [0, 4]],
    2
  ];
  exports.RequestSenderIdRequest$ = RequestSenderIdRequest$;
  var RequestSenderIdResult$ = [
    3,
    n0,
    _RSIRequ,
    0,
    [_SIA, _SI, _ICC, _MTe, _MLP, _DPE, _Reg, _T],
    [0, 0, 0, 64 | 0, 0, 2, 2, () => TagList],
    7
  ];
  exports.RequestSenderIdResult$ = RequestSenderIdResult$;
  var SelectOptionDescription$ = [
    3,
    n0,
    _SODe,
    0,
    [_Op, _Tit, _D],
    [0, 0, 0],
    1
  ];
  exports.SelectOptionDescription$ = SelectOptionDescription$;
  var SelectValidation$ = [
    3,
    n0,
    _SV,
    0,
    [_MC, _MCa, _Opt],
    [1, 1, 64 | 0],
    3
  ];
  exports.SelectValidation$ = SelectValidation$;
  var SendDestinationNumberVerificationCodeRequest$ = [
    3,
    n0,
    _SDNVCR,
    0,
    [_VDNI, _VC, _LC, _OI, _CSN, _Con, _DCP],
    [0, 0, 0, 0, 0, 128 | 0, 128 | 0],
    2
  ];
  exports.SendDestinationNumberVerificationCodeRequest$ = SendDestinationNumberVerificationCodeRequest$;
  var SendDestinationNumberVerificationCodeResult$ = [
    3,
    n0,
    _SDNVCRe,
    0,
    [_MI],
    [0],
    1
  ];
  exports.SendDestinationNumberVerificationCodeResult$ = SendDestinationNumberVerificationCodeResult$;
  var SenderIdAndCountry$ = [
    3,
    n0,
    _SIAC,
    0,
    [_SI, _ICC],
    [0, 0],
    2
  ];
  exports.SenderIdAndCountry$ = SenderIdAndCountry$;
  var SenderIdFilter$ = [
    3,
    n0,
    _SIF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.SenderIdFilter$ = SenderIdFilter$;
  var SenderIdInformation$ = [
    3,
    n0,
    _SII,
    0,
    [_SIA, _SI, _ICC, _MTe, _MLP, _DPE, _Reg, _RIeg],
    [0, 0, 0, 64 | 0, 0, 2, 2, 0],
    7
  ];
  exports.SenderIdInformation$ = SenderIdInformation$;
  var SendMediaMessageRequest$ = [
    3,
    n0,
    _SMMR,
    0,
    [_DPN, _OI, _MB, _MU, _CSN, _MP, _TTL, _Con, _DRr, _PCI, _MFE],
    [0, 0, 0, 64 | 0, 0, 0, 1, 128 | 0, 2, 0, 2],
    2
  ];
  exports.SendMediaMessageRequest$ = SendMediaMessageRequest$;
  var SendMediaMessageResult$ = [
    3,
    n0,
    _SMMRe,
    0,
    [_MI],
    [0]
  ];
  exports.SendMediaMessageResult$ = SendMediaMessageResult$;
  var SendNotifyTextMessageRequest$ = [
    3,
    n0,
    _SNTMR,
    0,
    [_NCI, _DPN, _TVem, _TIe, _TTL, _Con, _CSN, _DRr, _MFE],
    [0, 0, 128 | 0, 0, 1, 128 | 0, 0, 2, 2],
    3
  ];
  exports.SendNotifyTextMessageRequest$ = SendNotifyTextMessageRequest$;
  var SendNotifyTextMessageResult$ = [
    3,
    n0,
    _SNTMRe,
    0,
    [_MI, _TIe, _RMB],
    [0, 0, 0]
  ];
  exports.SendNotifyTextMessageResult$ = SendNotifyTextMessageResult$;
  var SendNotifyVoiceMessageRequest$ = [
    3,
    n0,
    _SNVMR,
    0,
    [_NCI, _DPN, _TVem, _TIe, _VI, _TTL, _Con, _CSN, _DRr, _MFE],
    [0, 0, 128 | 0, 0, 0, 1, 128 | 0, 0, 2, 2],
    3
  ];
  exports.SendNotifyVoiceMessageRequest$ = SendNotifyVoiceMessageRequest$;
  var SendNotifyVoiceMessageResult$ = [
    3,
    n0,
    _SNVMRe,
    0,
    [_MI, _TIe, _RMB],
    [0, 0, 0]
  ];
  exports.SendNotifyVoiceMessageResult$ = SendNotifyVoiceMessageResult$;
  var SendTextMessageRequest$ = [
    3,
    n0,
    _STMR,
    0,
    [_DPN, _OI, _MB, _MT, _K, _CSN, _MP, _TTL, _Con, _DCP, _DRr, _PCI, _MFE],
    [0, 0, 0, 0, 0, 0, 0, 1, 128 | 0, 128 | 0, 2, 0, 2],
    1
  ];
  exports.SendTextMessageRequest$ = SendTextMessageRequest$;
  var SendTextMessageResult$ = [
    3,
    n0,
    _STMRe,
    0,
    [_MI],
    [0]
  ];
  exports.SendTextMessageResult$ = SendTextMessageResult$;
  var SendVoiceMessageRequest$ = [
    3,
    n0,
    _SVMR,
    0,
    [_DPN, _OI, _MB, _MBTT, _VI, _CSN, _MPPM, _TTL, _Con, _DRr, _PCI, _MFE],
    [0, 0, 0, 0, 0, 0, 0, 1, 128 | 0, 2, 0, 2],
    2
  ];
  exports.SendVoiceMessageRequest$ = SendVoiceMessageRequest$;
  var SendVoiceMessageResult$ = [
    3,
    n0,
    _SVMRe,
    0,
    [_MI],
    [0]
  ];
  exports.SendVoiceMessageResult$ = SendVoiceMessageResult$;
  var SetAccountDefaultProtectConfigurationRequest$ = [
    3,
    n0,
    _SADPCR,
    0,
    [_PCI],
    [0],
    1
  ];
  exports.SetAccountDefaultProtectConfigurationRequest$ = SetAccountDefaultProtectConfigurationRequest$;
  var SetAccountDefaultProtectConfigurationResult$ = [
    3,
    n0,
    _SADPCRe,
    0,
    [_DPCA, _DPCI],
    [0, 0],
    2
  ];
  exports.SetAccountDefaultProtectConfigurationResult$ = SetAccountDefaultProtectConfigurationResult$;
  var SetDefaultMessageFeedbackEnabledRequest$ = [
    3,
    n0,
    _SDMFER,
    0,
    [_CSN, _MFE],
    [0, 2],
    2
  ];
  exports.SetDefaultMessageFeedbackEnabledRequest$ = SetDefaultMessageFeedbackEnabledRequest$;
  var SetDefaultMessageFeedbackEnabledResult$ = [
    3,
    n0,
    _SDMFERe,
    0,
    [_CSA, _CSN, _MFE],
    [0, 0, 2]
  ];
  exports.SetDefaultMessageFeedbackEnabledResult$ = SetDefaultMessageFeedbackEnabledResult$;
  var SetDefaultMessageTypeRequest$ = [
    3,
    n0,
    _SDMTR,
    0,
    [_CSN, _MT],
    [0, 0],
    2
  ];
  exports.SetDefaultMessageTypeRequest$ = SetDefaultMessageTypeRequest$;
  var SetDefaultMessageTypeResult$ = [
    3,
    n0,
    _SDMTRe,
    0,
    [_CSA, _CSN, _MT],
    [0, 0, 0]
  ];
  exports.SetDefaultMessageTypeResult$ = SetDefaultMessageTypeResult$;
  var SetDefaultSenderIdRequest$ = [
    3,
    n0,
    _SDSIR,
    0,
    [_CSN, _SI],
    [0, 0],
    2
  ];
  exports.SetDefaultSenderIdRequest$ = SetDefaultSenderIdRequest$;
  var SetDefaultSenderIdResult$ = [
    3,
    n0,
    _SDSIRe,
    0,
    [_CSA, _CSN, _SI],
    [0, 0, 0]
  ];
  exports.SetDefaultSenderIdResult$ = SetDefaultSenderIdResult$;
  var SetMediaMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _SMMSLOR,
    0,
    [_ML],
    [1],
    1
  ];
  exports.SetMediaMessageSpendLimitOverrideRequest$ = SetMediaMessageSpendLimitOverrideRequest$;
  var SetMediaMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _SMMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.SetMediaMessageSpendLimitOverrideResult$ = SetMediaMessageSpendLimitOverrideResult$;
  var SetNotifyMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _SNMSLOR,
    0,
    [_ML],
    [1],
    1
  ];
  exports.SetNotifyMessageSpendLimitOverrideRequest$ = SetNotifyMessageSpendLimitOverrideRequest$;
  var SetNotifyMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _SNMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.SetNotifyMessageSpendLimitOverrideResult$ = SetNotifyMessageSpendLimitOverrideResult$;
  var SetTextMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _STMSLOR,
    0,
    [_ML],
    [1],
    1
  ];
  exports.SetTextMessageSpendLimitOverrideRequest$ = SetTextMessageSpendLimitOverrideRequest$;
  var SetTextMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _STMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.SetTextMessageSpendLimitOverrideResult$ = SetTextMessageSpendLimitOverrideResult$;
  var SetVoiceMessageSpendLimitOverrideRequest$ = [
    3,
    n0,
    _SVMSLOR,
    0,
    [_ML],
    [1],
    1
  ];
  exports.SetVoiceMessageSpendLimitOverrideRequest$ = SetVoiceMessageSpendLimitOverrideRequest$;
  var SetVoiceMessageSpendLimitOverrideResult$ = [
    3,
    n0,
    _SVMSLORe,
    0,
    [_ML],
    [1]
  ];
  exports.SetVoiceMessageSpendLimitOverrideResult$ = SetVoiceMessageSpendLimitOverrideResult$;
  var SnsDestination$ = [
    3,
    n0,
    _SD,
    0,
    [_TAo],
    [0],
    1
  ];
  exports.SnsDestination$ = SnsDestination$;
  var SpendLimit$ = [
    3,
    n0,
    _SLp,
    0,
    [_N, _EL, _MLa, _Ov],
    [0, 1, 1, 2],
    4
  ];
  exports.SpendLimit$ = SpendLimit$;
  var SubmitRegistrationVersionRequest$ = [
    3,
    n0,
    _SRVR,
    0,
    [_RIeg, _AR],
    [0, 2],
    1
  ];
  exports.SubmitRegistrationVersionRequest$ = SubmitRegistrationVersionRequest$;
  var SubmitRegistrationVersionResult$ = [
    3,
    n0,
    _SRVRu,
    0,
    [_RA, _RIeg, _VN, _RVS, _RVSH, _AR],
    [0, 0, 1, 0, () => RegistrationVersionStatusHistory$, 2],
    6
  ];
  exports.SubmitRegistrationVersionResult$ = SubmitRegistrationVersionResult$;
  var SupportedAssociation$ = [
    3,
    n0,
    _SAu,
    0,
    [_RT, _ABs, _DB, _ICC],
    [0, 0, 0, 0],
    3
  ];
  exports.SupportedAssociation$ = SupportedAssociation$;
  var Tag$ = [
    3,
    n0,
    _Ta,
    0,
    [_Key, _V],
    [0, 0],
    2
  ];
  exports.Tag$ = Tag$;
  var TagResourceRequest$ = [
    3,
    n0,
    _TRR,
    0,
    [_RAe, _T],
    [0, () => NonEmptyTagList],
    2
  ];
  exports.TagResourceRequest$ = TagResourceRequest$;
  var TagResourceResult$ = [
    3,
    n0,
    _TRRa,
    0,
    [],
    []
  ];
  exports.TagResourceResult$ = TagResourceResult$;
  var TemplateVariableMetadata$ = [
    3,
    n0,
    _TVM,
    0,
    [_Ty, _Req, _D, _MLax, _MV, _MVa, _DV, _Pa, _Sa, _So],
    [0, 2, 0, 1, 1, 1, 0, 0, 0, 0],
    2
  ];
  exports.TemplateVariableMetadata$ = TemplateVariableMetadata$;
  var TestingAgentInformation$ = [
    3,
    n0,
    _TAI,
    0,
    [_S, _RIeg, _TAIe],
    [0, 0, 0],
    2
  ];
  exports.TestingAgentInformation$ = TestingAgentInformation$;
  var TextValidation$ = [
    3,
    n0,
    _TVe,
    0,
    [_MLi, _MLax, _Pa],
    [1, 1, 0],
    3
  ];
  exports.TextValidation$ = TextValidation$;
  var UntagResourceRequest$ = [
    3,
    n0,
    _URR,
    0,
    [_RAe, _TK],
    [0, 64 | 0],
    2
  ];
  exports.UntagResourceRequest$ = UntagResourceRequest$;
  var UntagResourceResult$ = [
    3,
    n0,
    _URRn,
    0,
    [],
    []
  ];
  exports.UntagResourceResult$ = UntagResourceResult$;
  var UpdateEventDestinationRequest$ = [
    3,
    n0,
    _UEDR,
    0,
    [_CSN, _EDN, _E, _MET, _CWLD, _KFD, _SD],
    [0, 0, 2, 64 | 0, () => CloudWatchLogsDestination$, () => KinesisFirehoseDestination$, () => SnsDestination$],
    2
  ];
  exports.UpdateEventDestinationRequest$ = UpdateEventDestinationRequest$;
  var UpdateEventDestinationResult$ = [
    3,
    n0,
    _UEDRp,
    0,
    [_CSA, _CSN, _EDv],
    [0, 0, () => EventDestination$]
  ];
  exports.UpdateEventDestinationResult$ = UpdateEventDestinationResult$;
  var UpdateNotifyConfigurationRequest$ = [
    3,
    n0,
    _UNCR,
    0,
    [_NCI, _DTI, _PI, _ECn, _EC, _DPE],
    [0, 0, 0, 64 | 0, 64 | 0, 2],
    1
  ];
  exports.UpdateNotifyConfigurationRequest$ = UpdateNotifyConfigurationRequest$;
  var UpdateNotifyConfigurationResult$ = [
    3,
    n0,
    _UNCRp,
    0,
    [_NCA, _NCI, _DN, _UC, _EC, _Ti, _TUS, _S, _DPE, _CTr, _DTI, _PI, _ECn, _RR],
    [0, 0, 0, 0, 64 | 0, 0, 0, 0, 2, 4, 0, 0, 64 | 0, 0],
    10
  ];
  exports.UpdateNotifyConfigurationResult$ = UpdateNotifyConfigurationResult$;
  var UpdatePhoneNumberRequest$ = [
    3,
    n0,
    _UPNR,
    0,
    [_PNIho, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _ISEn, _DPE],
    [0, 2, 0, 0, 2, 0, 2, 2],
    1
  ];
  exports.UpdatePhoneNumberRequest$ = UpdatePhoneNumberRequest$;
  var UpdatePhoneNumberResult$ = [
    3,
    n0,
    _UPNRp,
    0,
    [_PNA, _PNIho, _PN, _S, _ICC, _MT, _NCum, _NTu, _MLP, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _ISEn, _DPE, _RIeg, _CTr],
    [0, 0, 0, 0, 0, 0, 64 | 0, 0, 0, 2, 0, 0, 2, 0, 2, 2, 0, 4]
  ];
  exports.UpdatePhoneNumberResult$ = UpdatePhoneNumberResult$;
  var UpdatePoolRequest$ = [
    3,
    n0,
    _UPR,
    0,
    [_PI, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _SRE, _DPE],
    [0, 2, 0, 0, 2, 0, 2, 2],
    1
  ];
  exports.UpdatePoolRequest$ = UpdatePoolRequest$;
  var UpdatePoolResult$ = [
    3,
    n0,
    _UPRp,
    0,
    [_PA, _PI, _S, _MT, _TWE, _TWCA, _TWCR, _SMOOE, _OOLN, _SRE, _DPE, _CTr],
    [0, 0, 0, 0, 2, 0, 0, 2, 0, 2, 2, 4]
  ];
  exports.UpdatePoolResult$ = UpdatePoolResult$;
  var UpdateProtectConfigurationCountryRuleSetRequest$ = [
    3,
    n0,
    _UPCCRSR,
    0,
    [_PCI, _NCu, _CRSU],
    [0, 0, () => ProtectConfigurationCountryRuleSet],
    3
  ];
  exports.UpdateProtectConfigurationCountryRuleSetRequest$ = UpdateProtectConfigurationCountryRuleSetRequest$;
  var UpdateProtectConfigurationCountryRuleSetResult$ = [
    3,
    n0,
    _UPCCRSRp,
    0,
    [_PCA, _PCI, _NCu, _CRS],
    [0, 0, 0, () => ProtectConfigurationCountryRuleSet],
    4
  ];
  exports.UpdateProtectConfigurationCountryRuleSetResult$ = UpdateProtectConfigurationCountryRuleSetResult$;
  var UpdateProtectConfigurationRequest$ = [
    3,
    n0,
    _UPCR,
    0,
    [_PCI, _DPE],
    [0, 2],
    1
  ];
  exports.UpdateProtectConfigurationRequest$ = UpdateProtectConfigurationRequest$;
  var UpdateProtectConfigurationResult$ = [
    3,
    n0,
    _UPCRp,
    0,
    [_PCA, _PCI, _CTr, _AD, _DPE],
    [0, 0, 4, 2, 2],
    5
  ];
  exports.UpdateProtectConfigurationResult$ = UpdateProtectConfigurationResult$;
  var UpdateRcsAgentRequest$ = [
    3,
    n0,
    _URAR,
    0,
    [_RAI, _DPE, _OOLN, _SMOOE, _TWCA, _TWCR, _TWE],
    [0, 2, 0, 2, 0, 0, 2],
    1
  ];
  exports.UpdateRcsAgentRequest$ = UpdateRcsAgentRequest$;
  var UpdateRcsAgentResult$ = [
    3,
    n0,
    _URARp,
    0,
    [_RAA, _RAI, _S, _CTr, _DPE, _SMOOE, _TWE, _OOLN, _TWCA, _TWCR],
    [0, 0, 0, 4, 2, 2, 2, 0, 0, 0],
    7
  ];
  exports.UpdateRcsAgentResult$ = UpdateRcsAgentResult$;
  var UpdateSenderIdRequest$ = [
    3,
    n0,
    _USIR,
    0,
    [_SI, _ICC, _DPE],
    [0, 0, 2],
    2
  ];
  exports.UpdateSenderIdRequest$ = UpdateSenderIdRequest$;
  var UpdateSenderIdResult$ = [
    3,
    n0,
    _USIRp,
    0,
    [_SIA, _SI, _ICC, _MTe, _MLP, _DPE, _Reg, _RIeg],
    [0, 0, 0, 64 | 0, 0, 2, 2, 0],
    7
  ];
  exports.UpdateSenderIdResult$ = UpdateSenderIdResult$;
  var ValidationExceptionField$ = [
    3,
    n0,
    _VEF,
    0,
    [_N, _M],
    [0, 0],
    2
  ];
  exports.ValidationExceptionField$ = ValidationExceptionField$;
  var VerifiedDestinationNumberFilter$ = [
    3,
    n0,
    _VDNF,
    0,
    [_N, _Va],
    [0, 64 | 0],
    2
  ];
  exports.VerifiedDestinationNumberFilter$ = VerifiedDestinationNumberFilter$;
  var VerifiedDestinationNumberInformation$ = [
    3,
    n0,
    _VDNIer,
    0,
    [_VDNA, _VDNI, _DPN, _S, _CTr, _RAI],
    [0, 0, 0, 0, 4, 0],
    5
  ];
  exports.VerifiedDestinationNumberInformation$ = VerifiedDestinationNumberInformation$;
  var VerifyDestinationNumberRequest$ = [
    3,
    n0,
    _VDNR,
    0,
    [_VDNI, _VCe],
    [0, 0],
    2
  ];
  exports.VerifyDestinationNumberRequest$ = VerifyDestinationNumberRequest$;
  var VerifyDestinationNumberResult$ = [
    3,
    n0,
    _VDNRe,
    0,
    [_VDNA, _VDNI, _DPN, _S, _CTr],
    [0, 0, 0, 0, 4],
    5
  ];
  exports.VerifyDestinationNumberResult$ = VerifyDestinationNumberResult$;
  var AccountAttributeList = [
    1,
    n0,
    _AAL,
    0,
    () => AccountAttribute$
  ];
  var AccountLimitList = [
    1,
    n0,
    _ALL,
    0,
    () => AccountLimit$
  ];
  var CarrierStatusInformationList = [
    1,
    n0,
    _CSIL,
    0,
    () => CarrierStatusInformation$
  ];
  var ConfigurationSetFilterList = [
    1,
    n0,
    _CSFL,
    0,
    () => ConfigurationSetFilter$
  ];
  var ConfigurationSetInformationList = [
    1,
    n0,
    _CSILo,
    0,
    () => ConfigurationSetInformation$
  ];
  var ConfigurationSetNameList = 64 | 0;
  var CountryLaunchStatusFilterList = [
    1,
    n0,
    _CLSFL,
    0,
    () => CountryLaunchStatusFilter$
  ];
  var CountryLaunchStatusInformationList = [
    1,
    n0,
    _CLSIL,
    0,
    () => CountryLaunchStatusInformation$
  ];
  var DestinationPhoneNumberList = 64 | 0;
  var EventDestinationList = [
    1,
    n0,
    _EDL,
    0,
    () => EventDestination$
  ];
  var EventTypeList = 64 | 0;
  var FieldPathList = 64 | 0;
  var FilterValueList = 64 | 0;
  var IsoCountryCodeList = 64 | 0;
  var KeywordFilterList = [
    1,
    n0,
    _KFL,
    0,
    () => KeywordFilter$
  ];
  var KeywordInformationList = [
    1,
    n0,
    _KIL,
    0,
    () => KeywordInformation$
  ];
  var KeywordList = 64 | 0;
  var ListProtectConfigurationRuleSetNumberOverrideFilter = [
    1,
    n0,
    _LPCRSNOF,
    0,
    () => ProtectConfigurationRuleSetNumberOverrideFilterItem$
  ];
  var MediaUrlList = 64 | 0;
  var MessageTypeList = 64 | 0;
  var NonEmptyTagList = [
    1,
    n0,
    _NETL,
    0,
    () => Tag$
  ];
  var NotifyConfigurationFilterList = [
    1,
    n0,
    _NCFL,
    0,
    () => NotifyConfigurationFilter$
  ];
  var NotifyConfigurationIdList = 64 | 0;
  var NotifyConfigurationInformationList = [
    1,
    n0,
    _NCIL,
    0,
    () => NotifyConfigurationInformation$
  ];
  var NotifyConfigurationTierList = 64 | 0;
  var NotifyCountryInformationList = [
    1,
    n0,
    _NCILo,
    0,
    () => NotifyCountryInformation$
  ];
  var NotifyEnabledChannelsList = 64 | 0;
  var NotifyTemplateFilterList = [
    1,
    n0,
    _NTFL,
    0,
    () => NotifyTemplateFilter$
  ];
  var NotifyTemplateIdList = 64 | 0;
  var NotifyTemplateInformationList = [
    1,
    n0,
    _NTIL,
    0,
    () => NotifyTemplateInformation$
  ];
  var NotifyTierList = 64 | 0;
  var NotifyUseCaseList = 64 | 0;
  var NumberCapabilityList = 64 | 0;
  var OptedOutFilterList = [
    1,
    n0,
    _OOFL,
    0,
    () => OptedOutFilter$
  ];
  var OptedOutNumberInformationList = [
    1,
    n0,
    _OONIL,
    0,
    () => OptedOutNumberInformation$
  ];
  var OptedOutNumberList = 64 | 0;
  var OptOutListInformationList = [
    1,
    n0,
    _OOLIL,
    0,
    () => OptOutListInformation$
  ];
  var OptOutListNameList = 64 | 0;
  var OriginationIdentityMetadataList = [
    1,
    n0,
    _OIML,
    0,
    () => OriginationIdentityMetadata$
  ];
  var PhoneNumberFilterList = [
    1,
    n0,
    _PNFL,
    0,
    () => PhoneNumberFilter$
  ];
  var PhoneNumberIdList = 64 | 0;
  var PhoneNumberInformationList = [
    1,
    n0,
    _PNIL,
    0,
    () => PhoneNumberInformation$
  ];
  var PoolFilterList = [
    1,
    n0,
    _PFL,
    0,
    () => PoolFilter$
  ];
  var PoolIdList = 64 | 0;
  var PoolInformationList = [
    1,
    n0,
    _PIL,
    0,
    () => PoolInformation$
  ];
  var PoolOriginationIdentitiesFilterList = [
    1,
    n0,
    _POIFL,
    0,
    () => PoolOriginationIdentitiesFilter$
  ];
  var ProtectConfigurationFilterList = [
    1,
    n0,
    _PCFL,
    0,
    () => ProtectConfigurationFilter$
  ];
  var ProtectConfigurationIdList = 64 | 0;
  var ProtectConfigurationInformationList = [
    1,
    n0,
    _PCIL,
    0,
    () => ProtectConfigurationInformation$
  ];
  var ProtectConfigurationRuleSetNumberOverrideList = [
    1,
    n0,
    _PCRSNOL,
    0,
    () => ProtectConfigurationRuleSetNumberOverride$
  ];
  var RcsAgentFilterList = [
    1,
    n0,
    _RAFL,
    0,
    () => RcsAgentFilter$
  ];
  var RcsAgentIdList = 64 | 0;
  var RcsAgentInformationList = [
    1,
    n0,
    _RAIL,
    0,
    () => RcsAgentInformation$
  ];
  var RegistrationAssociationFilterList = [
    1,
    n0,
    _RAFLe,
    0,
    () => RegistrationAssociationFilter$
  ];
  var RegistrationAssociationMetadataList = [
    1,
    n0,
    _RAML,
    0,
    () => RegistrationAssociationMetadata$
  ];
  var RegistrationAttachmentFilterList = [
    1,
    n0,
    _RAFLeg,
    0,
    () => RegistrationAttachmentFilter$
  ];
  var RegistrationAttachmentIdList = 64 | 0;
  var RegistrationAttachmentsInformationList = [
    1,
    n0,
    _RAILe,
    0,
    () => RegistrationAttachmentsInformation$
  ];
  var RegistrationDeniedReasonInformationList = [
    1,
    n0,
    _RDRIL,
    0,
    () => RegistrationDeniedReasonInformation$
  ];
  var RegistrationFieldDefinitionList = [
    1,
    n0,
    _RFDL,
    0,
    () => RegistrationFieldDefinition$
  ];
  var RegistrationFieldValueInformationList = [
    1,
    n0,
    _RFVIL,
    0,
    () => RegistrationFieldValueInformation$
  ];
  var RegistrationFilterList = [
    1,
    n0,
    _RFL,
    0,
    () => RegistrationFilter$
  ];
  var RegistrationIdList = 64 | 0;
  var RegistrationInformationList = [
    1,
    n0,
    _RIL,
    0,
    () => RegistrationInformation$
  ];
  var RegistrationSectionDefinitionList = [
    1,
    n0,
    _RSDL,
    0,
    () => RegistrationSectionDefinition$
  ];
  var RegistrationTypeDefinitionList = [
    1,
    n0,
    _RTDL,
    0,
    () => RegistrationTypeDefinition$
  ];
  var RegistrationTypeFilterList = [
    1,
    n0,
    _RTFL,
    0,
    () => RegistrationTypeFilter$
  ];
  var RegistrationTypeList = 64 | 0;
  var RegistrationVersionFilterList = [
    1,
    n0,
    _RVFL,
    0,
    () => RegistrationVersionFilter$
  ];
  var RegistrationVersionInformationList = [
    1,
    n0,
    _RVIL,
    0,
    () => RegistrationVersionInformation$
  ];
  var RegistrationVersionNumberList = 64 | 1;
  var SectionPathList = 64 | 0;
  var SelectChoiceList = 64 | 0;
  var SelectOptionDescriptionsList = [
    1,
    n0,
    _SODL,
    0,
    () => SelectOptionDescription$
  ];
  var SenderIdFilterList = [
    1,
    n0,
    _SIFL,
    0,
    () => SenderIdFilter$
  ];
  var SenderIdInformationList = [
    1,
    n0,
    _SIIL,
    0,
    () => SenderIdInformation$
  ];
  var SenderIdList = [
    1,
    n0,
    _SIL,
    0,
    () => SenderIdAndCountry$
  ];
  var SpendLimitList = [
    1,
    n0,
    _SLL,
    0,
    () => SpendLimit$
  ];
  var StringList = 64 | 0;
  var SupportedAssociationList = [
    1,
    n0,
    _SAL,
    0,
    () => SupportedAssociation$
  ];
  var TagKeyList = 64 | 0;
  var TagList = [
    1,
    n0,
    _TL,
    0,
    () => Tag$
  ];
  var ValidationExceptionFieldList = [
    1,
    n0,
    _VEFL,
    0,
    () => ValidationExceptionField$
  ];
  var VerifiedDestinationNumberFilterList = [
    1,
    n0,
    _VDNFL,
    0,
    () => VerifiedDestinationNumberFilter$
  ];
  var VerifiedDestinationNumberIdList = 64 | 0;
  var VerifiedDestinationNumberInformationList = [
    1,
    n0,
    _VDNIL,
    0,
    () => VerifiedDestinationNumberInformation$
  ];
  var VoiceIdList = 64 | 0;
  var ContextMap = 128 | 0;
  var DestinationCountryParameters = 128 | 0;
  var ProtectConfigurationCountryRuleSet = [
    2,
    n0,
    _PCCRS,
    0,
    0,
    () => ProtectConfigurationCountryRuleSetInformation$
  ];
  var StringMap = 128 | 0;
  var TemplateVariablesMap = [
    2,
    n0,
    _TVMe,
    0,
    0,
    () => TemplateVariableMetadata$
  ];
  var TemplateVariableSubstitutionMap = 128 | 0;
  exports.AssociateOriginationIdentity$ = [
    9,
    n0,
    _AOI,
    0,
    () => AssociateOriginationIdentityRequest$,
    () => AssociateOriginationIdentityResult$
  ];
  exports.AssociateProtectConfiguration$ = [
    9,
    n0,
    _APC,
    0,
    () => AssociateProtectConfigurationRequest$,
    () => AssociateProtectConfigurationResult$
  ];
  exports.CarrierLookup$ = [
    9,
    n0,
    _CL,
    0,
    () => CarrierLookupRequest$,
    () => CarrierLookupResult$
  ];
  exports.CreateConfigurationSet$ = [
    9,
    n0,
    _CCS,
    0,
    () => CreateConfigurationSetRequest$,
    () => CreateConfigurationSetResult$
  ];
  exports.CreateEventDestination$ = [
    9,
    n0,
    _CED,
    0,
    () => CreateEventDestinationRequest$,
    () => CreateEventDestinationResult$
  ];
  exports.CreateNotifyConfiguration$ = [
    9,
    n0,
    _CNC,
    0,
    () => CreateNotifyConfigurationRequest$,
    () => CreateNotifyConfigurationResult$
  ];
  exports.CreateOptOutList$ = [
    9,
    n0,
    _COOL,
    0,
    () => CreateOptOutListRequest$,
    () => CreateOptOutListResult$
  ];
  exports.CreatePool$ = [
    9,
    n0,
    _CP,
    0,
    () => CreatePoolRequest$,
    () => CreatePoolResult$
  ];
  exports.CreateProtectConfiguration$ = [
    9,
    n0,
    _CPC,
    0,
    () => CreateProtectConfigurationRequest$,
    () => CreateProtectConfigurationResult$
  ];
  exports.CreateRcsAgent$ = [
    9,
    n0,
    _CRA,
    0,
    () => CreateRcsAgentRequest$,
    () => CreateRcsAgentResult$
  ];
  exports.CreateRegistration$ = [
    9,
    n0,
    _CR,
    0,
    () => CreateRegistrationRequest$,
    () => CreateRegistrationResult$
  ];
  exports.CreateRegistrationAssociation$ = [
    9,
    n0,
    _CRAr,
    0,
    () => CreateRegistrationAssociationRequest$,
    () => CreateRegistrationAssociationResult$
  ];
  exports.CreateRegistrationAttachment$ = [
    9,
    n0,
    _CRAre,
    0,
    () => CreateRegistrationAttachmentRequest$,
    () => CreateRegistrationAttachmentResult$
  ];
  exports.CreateRegistrationVersion$ = [
    9,
    n0,
    _CRV,
    0,
    () => CreateRegistrationVersionRequest$,
    () => CreateRegistrationVersionResult$
  ];
  exports.CreateVerifiedDestinationNumber$ = [
    9,
    n0,
    _CVDN,
    0,
    () => CreateVerifiedDestinationNumberRequest$,
    () => CreateVerifiedDestinationNumberResult$
  ];
  exports.DeleteAccountDefaultProtectConfiguration$ = [
    9,
    n0,
    _DADPC,
    0,
    () => DeleteAccountDefaultProtectConfigurationRequest$,
    () => DeleteAccountDefaultProtectConfigurationResult$
  ];
  exports.DeleteConfigurationSet$ = [
    9,
    n0,
    _DCS,
    0,
    () => DeleteConfigurationSetRequest$,
    () => DeleteConfigurationSetResult$
  ];
  exports.DeleteDefaultMessageType$ = [
    9,
    n0,
    _DDMT,
    0,
    () => DeleteDefaultMessageTypeRequest$,
    () => DeleteDefaultMessageTypeResult$
  ];
  exports.DeleteDefaultSenderId$ = [
    9,
    n0,
    _DDSI,
    0,
    () => DeleteDefaultSenderIdRequest$,
    () => DeleteDefaultSenderIdResult$
  ];
  exports.DeleteEventDestination$ = [
    9,
    n0,
    _DED,
    0,
    () => DeleteEventDestinationRequest$,
    () => DeleteEventDestinationResult$
  ];
  exports.DeleteKeyword$ = [
    9,
    n0,
    _DK,
    0,
    () => DeleteKeywordRequest$,
    () => DeleteKeywordResult$
  ];
  exports.DeleteMediaMessageSpendLimitOverride$ = [
    9,
    n0,
    _DMMSLO,
    0,
    () => DeleteMediaMessageSpendLimitOverrideRequest$,
    () => DeleteMediaMessageSpendLimitOverrideResult$
  ];
  exports.DeleteNotifyConfiguration$ = [
    9,
    n0,
    _DNC,
    0,
    () => DeleteNotifyConfigurationRequest$,
    () => DeleteNotifyConfigurationResult$
  ];
  exports.DeleteNotifyMessageSpendLimitOverride$ = [
    9,
    n0,
    _DNMSLO,
    0,
    () => DeleteNotifyMessageSpendLimitOverrideRequest$,
    () => DeleteNotifyMessageSpendLimitOverrideResult$
  ];
  exports.DeleteOptedOutNumber$ = [
    9,
    n0,
    _DOON,
    0,
    () => DeleteOptedOutNumberRequest$,
    () => DeleteOptedOutNumberResult$
  ];
  exports.DeleteOptOutList$ = [
    9,
    n0,
    _DOOL,
    0,
    () => DeleteOptOutListRequest$,
    () => DeleteOptOutListResult$
  ];
  exports.DeletePool$ = [
    9,
    n0,
    _DP,
    0,
    () => DeletePoolRequest$,
    () => DeletePoolResult$
  ];
  exports.DeleteProtectConfiguration$ = [
    9,
    n0,
    _DPC,
    0,
    () => DeleteProtectConfigurationRequest$,
    () => DeleteProtectConfigurationResult$
  ];
  exports.DeleteProtectConfigurationRuleSetNumberOverride$ = [
    9,
    n0,
    _DPCRSNO,
    0,
    () => DeleteProtectConfigurationRuleSetNumberOverrideRequest$,
    () => DeleteProtectConfigurationRuleSetNumberOverrideResult$
  ];
  exports.DeleteRcsAgent$ = [
    9,
    n0,
    _DRA,
    0,
    () => DeleteRcsAgentRequest$,
    () => DeleteRcsAgentResult$
  ];
  exports.DeleteRegistration$ = [
    9,
    n0,
    _DRel,
    0,
    () => DeleteRegistrationRequest$,
    () => DeleteRegistrationResult$
  ];
  exports.DeleteRegistrationAttachment$ = [
    9,
    n0,
    _DRAe,
    0,
    () => DeleteRegistrationAttachmentRequest$,
    () => DeleteRegistrationAttachmentResult$
  ];
  exports.DeleteRegistrationFieldValue$ = [
    9,
    n0,
    _DRFV,
    0,
    () => DeleteRegistrationFieldValueRequest$,
    () => DeleteRegistrationFieldValueResult$
  ];
  exports.DeleteResourcePolicy$ = [
    9,
    n0,
    _DRP,
    0,
    () => DeleteResourcePolicyRequest$,
    () => DeleteResourcePolicyResult$
  ];
  exports.DeleteTextMessageSpendLimitOverride$ = [
    9,
    n0,
    _DTMSLO,
    0,
    () => DeleteTextMessageSpendLimitOverrideRequest$,
    () => DeleteTextMessageSpendLimitOverrideResult$
  ];
  exports.DeleteVerifiedDestinationNumber$ = [
    9,
    n0,
    _DVDN,
    0,
    () => DeleteVerifiedDestinationNumberRequest$,
    () => DeleteVerifiedDestinationNumberResult$
  ];
  exports.DeleteVoiceMessageSpendLimitOverride$ = [
    9,
    n0,
    _DVMSLO,
    0,
    () => DeleteVoiceMessageSpendLimitOverrideRequest$,
    () => DeleteVoiceMessageSpendLimitOverrideResult$
  ];
  exports.DescribeAccountAttributes$ = [
    9,
    n0,
    _DAA,
    0,
    () => DescribeAccountAttributesRequest$,
    () => DescribeAccountAttributesResult$
  ];
  exports.DescribeAccountLimits$ = [
    9,
    n0,
    _DAL,
    0,
    () => DescribeAccountLimitsRequest$,
    () => DescribeAccountLimitsResult$
  ];
  exports.DescribeConfigurationSets$ = [
    9,
    n0,
    _DCSe,
    0,
    () => DescribeConfigurationSetsRequest$,
    () => DescribeConfigurationSetsResult$
  ];
  exports.DescribeKeywords$ = [
    9,
    n0,
    _DKe,
    0,
    () => DescribeKeywordsRequest$,
    () => DescribeKeywordsResult$
  ];
  exports.DescribeNotifyConfigurations$ = [
    9,
    n0,
    _DNCe,
    0,
    () => DescribeNotifyConfigurationsRequest$,
    () => DescribeNotifyConfigurationsResult$
  ];
  exports.DescribeNotifyTemplates$ = [
    9,
    n0,
    _DNT,
    0,
    () => DescribeNotifyTemplatesRequest$,
    () => DescribeNotifyTemplatesResult$
  ];
  exports.DescribeOptedOutNumbers$ = [
    9,
    n0,
    _DOONe,
    0,
    () => DescribeOptedOutNumbersRequest$,
    () => DescribeOptedOutNumbersResult$
  ];
  exports.DescribeOptOutLists$ = [
    9,
    n0,
    _DOOLe,
    0,
    () => DescribeOptOutListsRequest$,
    () => DescribeOptOutListsResult$
  ];
  exports.DescribePhoneNumbers$ = [
    9,
    n0,
    _DPNes,
    0,
    () => DescribePhoneNumbersRequest$,
    () => DescribePhoneNumbersResult$
  ];
  exports.DescribePools$ = [
    9,
    n0,
    _DPe,
    0,
    () => DescribePoolsRequest$,
    () => DescribePoolsResult$
  ];
  exports.DescribeProtectConfigurations$ = [
    9,
    n0,
    _DPCe,
    0,
    () => DescribeProtectConfigurationsRequest$,
    () => DescribeProtectConfigurationsResult$
  ];
  exports.DescribeRcsAgentCountryLaunchStatus$ = [
    9,
    n0,
    _DRACLS,
    0,
    () => DescribeRcsAgentCountryLaunchStatusRequest$,
    () => DescribeRcsAgentCountryLaunchStatusResult$
  ];
  exports.DescribeRcsAgents$ = [
    9,
    n0,
    _DRAes,
    0,
    () => DescribeRcsAgentsRequest$,
    () => DescribeRcsAgentsResult$
  ];
  exports.DescribeRegistrationAttachments$ = [
    9,
    n0,
    _DRAesc,
    0,
    () => DescribeRegistrationAttachmentsRequest$,
    () => DescribeRegistrationAttachmentsResult$
  ];
  exports.DescribeRegistrationFieldDefinitions$ = [
    9,
    n0,
    _DRFD,
    0,
    () => DescribeRegistrationFieldDefinitionsRequest$,
    () => DescribeRegistrationFieldDefinitionsResult$
  ];
  exports.DescribeRegistrationFieldValues$ = [
    9,
    n0,
    _DRFVe,
    0,
    () => DescribeRegistrationFieldValuesRequest$,
    () => DescribeRegistrationFieldValuesResult$
  ];
  exports.DescribeRegistrations$ = [
    9,
    n0,
    _DRes,
    0,
    () => DescribeRegistrationsRequest$,
    () => DescribeRegistrationsResult$
  ];
  exports.DescribeRegistrationSectionDefinitions$ = [
    9,
    n0,
    _DRSD,
    0,
    () => DescribeRegistrationSectionDefinitionsRequest$,
    () => DescribeRegistrationSectionDefinitionsResult$
  ];
  exports.DescribeRegistrationTypeDefinitions$ = [
    9,
    n0,
    _DRTD,
    0,
    () => DescribeRegistrationTypeDefinitionsRequest$,
    () => DescribeRegistrationTypeDefinitionsResult$
  ];
  exports.DescribeRegistrationVersions$ = [
    9,
    n0,
    _DRV,
    0,
    () => DescribeRegistrationVersionsRequest$,
    () => DescribeRegistrationVersionsResult$
  ];
  exports.DescribeSenderIds$ = [
    9,
    n0,
    _DSIe,
    0,
    () => DescribeSenderIdsRequest$,
    () => DescribeSenderIdsResult$
  ];
  exports.DescribeSpendLimits$ = [
    9,
    n0,
    _DSL,
    0,
    () => DescribeSpendLimitsRequest$,
    () => DescribeSpendLimitsResult$
  ];
  exports.DescribeVerifiedDestinationNumbers$ = [
    9,
    n0,
    _DVDNe,
    0,
    () => DescribeVerifiedDestinationNumbersRequest$,
    () => DescribeVerifiedDestinationNumbersResult$
  ];
  exports.DisassociateOriginationIdentity$ = [
    9,
    n0,
    _DOI,
    0,
    () => DisassociateOriginationIdentityRequest$,
    () => DisassociateOriginationIdentityResult$
  ];
  exports.DisassociateProtectConfiguration$ = [
    9,
    n0,
    _DPCi,
    0,
    () => DisassociateProtectConfigurationRequest$,
    () => DisassociateProtectConfigurationResult$
  ];
  exports.DiscardRegistrationVersion$ = [
    9,
    n0,
    _DRVi,
    0,
    () => DiscardRegistrationVersionRequest$,
    () => DiscardRegistrationVersionResult$
  ];
  exports.GetProtectConfigurationCountryRuleSet$ = [
    9,
    n0,
    _GPCCRS,
    0,
    () => GetProtectConfigurationCountryRuleSetRequest$,
    () => GetProtectConfigurationCountryRuleSetResult$
  ];
  exports.GetResourcePolicy$ = [
    9,
    n0,
    _GRP,
    0,
    () => GetResourcePolicyRequest$,
    () => GetResourcePolicyResult$
  ];
  exports.ListNotifyCountries$ = [
    9,
    n0,
    _LNC,
    0,
    () => ListNotifyCountriesRequest$,
    () => ListNotifyCountriesResult$
  ];
  exports.ListPoolOriginationIdentities$ = [
    9,
    n0,
    _LPOI,
    0,
    () => ListPoolOriginationIdentitiesRequest$,
    () => ListPoolOriginationIdentitiesResult$
  ];
  exports.ListProtectConfigurationRuleSetNumberOverrides$ = [
    9,
    n0,
    _LPCRSNO,
    0,
    () => ListProtectConfigurationRuleSetNumberOverridesRequest$,
    () => ListProtectConfigurationRuleSetNumberOverridesResult$
  ];
  exports.ListRegistrationAssociations$ = [
    9,
    n0,
    _LRA,
    0,
    () => ListRegistrationAssociationsRequest$,
    () => ListRegistrationAssociationsResult$
  ];
  exports.ListTagsForResource$ = [
    9,
    n0,
    _LTFR,
    0,
    () => ListTagsForResourceRequest$,
    () => ListTagsForResourceResult$
  ];
  exports.PutKeyword$ = [
    9,
    n0,
    _PK,
    0,
    () => PutKeywordRequest$,
    () => PutKeywordResult$
  ];
  exports.PutMessageFeedback$ = [
    9,
    n0,
    _PMF,
    0,
    () => PutMessageFeedbackRequest$,
    () => PutMessageFeedbackResult$
  ];
  exports.PutOptedOutNumber$ = [
    9,
    n0,
    _POON,
    0,
    () => PutOptedOutNumberRequest$,
    () => PutOptedOutNumberResult$
  ];
  exports.PutProtectConfigurationRuleSetNumberOverride$ = [
    9,
    n0,
    _PPCRSNO,
    0,
    () => PutProtectConfigurationRuleSetNumberOverrideRequest$,
    () => PutProtectConfigurationRuleSetNumberOverrideResult$
  ];
  exports.PutRegistrationFieldValue$ = [
    9,
    n0,
    _PRFV,
    0,
    () => PutRegistrationFieldValueRequest$,
    () => PutRegistrationFieldValueResult$
  ];
  exports.PutResourcePolicy$ = [
    9,
    n0,
    _PRP,
    0,
    () => PutResourcePolicyRequest$,
    () => PutResourcePolicyResult$
  ];
  exports.ReleasePhoneNumber$ = [
    9,
    n0,
    _RPN,
    0,
    () => ReleasePhoneNumberRequest$,
    () => ReleasePhoneNumberResult$
  ];
  exports.ReleaseSenderId$ = [
    9,
    n0,
    _RSI,
    0,
    () => ReleaseSenderIdRequest$,
    () => ReleaseSenderIdResult$
  ];
  exports.RequestPhoneNumber$ = [
    9,
    n0,
    _RPNe,
    0,
    () => RequestPhoneNumberRequest$,
    () => RequestPhoneNumberResult$
  ];
  exports.RequestSenderId$ = [
    9,
    n0,
    _RSIe,
    0,
    () => RequestSenderIdRequest$,
    () => RequestSenderIdResult$
  ];
  exports.SendDestinationNumberVerificationCode$ = [
    9,
    n0,
    _SDNVC,
    0,
    () => SendDestinationNumberVerificationCodeRequest$,
    () => SendDestinationNumberVerificationCodeResult$
  ];
  exports.SendMediaMessage$ = [
    9,
    n0,
    _SMM,
    0,
    () => SendMediaMessageRequest$,
    () => SendMediaMessageResult$
  ];
  exports.SendNotifyTextMessage$ = [
    9,
    n0,
    _SNTM,
    0,
    () => SendNotifyTextMessageRequest$,
    () => SendNotifyTextMessageResult$
  ];
  exports.SendNotifyVoiceMessage$ = [
    9,
    n0,
    _SNVM,
    0,
    () => SendNotifyVoiceMessageRequest$,
    () => SendNotifyVoiceMessageResult$
  ];
  exports.SendTextMessage$ = [
    9,
    n0,
    _STM,
    0,
    () => SendTextMessageRequest$,
    () => SendTextMessageResult$
  ];
  exports.SendVoiceMessage$ = [
    9,
    n0,
    _SVM,
    0,
    () => SendVoiceMessageRequest$,
    () => SendVoiceMessageResult$
  ];
  exports.SetAccountDefaultProtectConfiguration$ = [
    9,
    n0,
    _SADPC,
    0,
    () => SetAccountDefaultProtectConfigurationRequest$,
    () => SetAccountDefaultProtectConfigurationResult$
  ];
  exports.SetDefaultMessageFeedbackEnabled$ = [
    9,
    n0,
    _SDMFE,
    0,
    () => SetDefaultMessageFeedbackEnabledRequest$,
    () => SetDefaultMessageFeedbackEnabledResult$
  ];
  exports.SetDefaultMessageType$ = [
    9,
    n0,
    _SDMT,
    0,
    () => SetDefaultMessageTypeRequest$,
    () => SetDefaultMessageTypeResult$
  ];
  exports.SetDefaultSenderId$ = [
    9,
    n0,
    _SDSI,
    0,
    () => SetDefaultSenderIdRequest$,
    () => SetDefaultSenderIdResult$
  ];
  exports.SetMediaMessageSpendLimitOverride$ = [
    9,
    n0,
    _SMMSLO,
    0,
    () => SetMediaMessageSpendLimitOverrideRequest$,
    () => SetMediaMessageSpendLimitOverrideResult$
  ];
  exports.SetNotifyMessageSpendLimitOverride$ = [
    9,
    n0,
    _SNMSLO,
    0,
    () => SetNotifyMessageSpendLimitOverrideRequest$,
    () => SetNotifyMessageSpendLimitOverrideResult$
  ];
  exports.SetTextMessageSpendLimitOverride$ = [
    9,
    n0,
    _STMSLO,
    0,
    () => SetTextMessageSpendLimitOverrideRequest$,
    () => SetTextMessageSpendLimitOverrideResult$
  ];
  exports.SetVoiceMessageSpendLimitOverride$ = [
    9,
    n0,
    _SVMSLO,
    0,
    () => SetVoiceMessageSpendLimitOverrideRequest$,
    () => SetVoiceMessageSpendLimitOverrideResult$
  ];
  exports.SubmitRegistrationVersion$ = [
    9,
    n0,
    _SRV,
    0,
    () => SubmitRegistrationVersionRequest$,
    () => SubmitRegistrationVersionResult$
  ];
  exports.TagResource$ = [
    9,
    n0,
    _TR,
    0,
    () => TagResourceRequest$,
    () => TagResourceResult$
  ];
  exports.UntagResource$ = [
    9,
    n0,
    _UR,
    0,
    () => UntagResourceRequest$,
    () => UntagResourceResult$
  ];
  exports.UpdateEventDestination$ = [
    9,
    n0,
    _UED,
    0,
    () => UpdateEventDestinationRequest$,
    () => UpdateEventDestinationResult$
  ];
  exports.UpdateNotifyConfiguration$ = [
    9,
    n0,
    _UNC,
    0,
    () => UpdateNotifyConfigurationRequest$,
    () => UpdateNotifyConfigurationResult$
  ];
  exports.UpdatePhoneNumber$ = [
    9,
    n0,
    _UPN,
    0,
    () => UpdatePhoneNumberRequest$,
    () => UpdatePhoneNumberResult$
  ];
  exports.UpdatePool$ = [
    9,
    n0,
    _UP,
    0,
    () => UpdatePoolRequest$,
    () => UpdatePoolResult$
  ];
  exports.UpdateProtectConfiguration$ = [
    9,
    n0,
    _UPC,
    0,
    () => UpdateProtectConfigurationRequest$,
    () => UpdateProtectConfigurationResult$
  ];
  exports.UpdateProtectConfigurationCountryRuleSet$ = [
    9,
    n0,
    _UPCCRS,
    0,
    () => UpdateProtectConfigurationCountryRuleSetRequest$,
    () => UpdateProtectConfigurationCountryRuleSetResult$
  ];
  exports.UpdateRcsAgent$ = [
    9,
    n0,
    _URA,
    0,
    () => UpdateRcsAgentRequest$,
    () => UpdateRcsAgentResult$
  ];
  exports.UpdateSenderId$ = [
    9,
    n0,
    _USI,
    0,
    () => UpdateSenderIdRequest$,
    () => UpdateSenderIdResult$
  ];
  exports.VerifyDestinationNumber$ = [
    9,
    n0,
    _VDNe,
    0,
    () => VerifyDestinationNumberRequest$,
    () => VerifyDestinationNumberResult$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared3 = __commonJS((exports) => {
  var { AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsJson1_0Protocol } = require_protocols2();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultPinpointSMSVoiceV2HttpAuthSchemeProvider } = require_httpAuthSchemeProvider3();
  var { defaultEndpointResolver } = require_endpointResolver3();
  var { errorTypeRegistries } = require_schemas_03();
  exports.getRuntimeConfig = (config) => {
    return {
      apiVersion: "2022-03-31",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultPinpointSMSVoiceV2HttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsJson1_0Protocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.pinpointsmsvoicev2",
        errorTypeRegistries,
        version: "2022-03-31",
        serviceTarget: "PinpointSMSVoiceV2"
      },
      serviceId: config?.serviceId ?? "Pinpoint SMS Voice V2",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/runtimeConfig.js
var require_runtimeConfig3 = __commonJS((exports) => {
  var packageInfo = require_package4();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require_retry();
  var { calculateBodyLength, Hash } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared3();
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-pinpoint-sms-voice-v2@3.1074.0/node_modules/@aws-sdk/client-pinpoint-sms-voice-v2/dist-cjs/index.js
var require_dist_cjs23 = __commonJS((exports) => {
  var __exportStar = (m2, e) => {
    Object.assign(e, m2);
  };
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs5();
  var { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveRegionConfig } = require_config2();
  var { resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultPinpointSMSVoiceV2HttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider3();
  var { getRuntimeConfig } = require_runtimeConfig3();
  var { AssociateOriginationIdentity$, AssociateProtectConfiguration$, CarrierLookup$, CreateConfigurationSet$, CreateEventDestination$, CreateNotifyConfiguration$, CreateOptOutList$, CreatePool$, CreateProtectConfiguration$, CreateRcsAgent$, CreateRegistrationAssociation$, CreateRegistrationAttachment$, CreateRegistration$, CreateRegistrationVersion$, CreateVerifiedDestinationNumber$, DeleteAccountDefaultProtectConfiguration$, DeleteConfigurationSet$, DeleteDefaultMessageType$, DeleteDefaultSenderId$, DeleteEventDestination$, DeleteKeyword$, DeleteMediaMessageSpendLimitOverride$, DeleteNotifyConfiguration$, DeleteNotifyMessageSpendLimitOverride$, DeleteOptedOutNumber$, DeleteOptOutList$, DeletePool$, DeleteProtectConfiguration$, DeleteProtectConfigurationRuleSetNumberOverride$, DeleteRcsAgent$, DeleteRegistrationAttachment$, DeleteRegistration$, DeleteRegistrationFieldValue$, DeleteResourcePolicy$, DeleteTextMessageSpendLimitOverride$, DeleteVerifiedDestinationNumber$, DeleteVoiceMessageSpendLimitOverride$, DescribeAccountAttributes$, DescribeAccountLimits$, DescribeConfigurationSets$, DescribeKeywords$, DescribeNotifyConfigurations$, DescribeNotifyTemplates$, DescribeOptedOutNumbers$, DescribeOptOutLists$, DescribePhoneNumbers$, DescribePools$, DescribeProtectConfigurations$, DescribeRcsAgentCountryLaunchStatus$, DescribeRcsAgents$, DescribeRegistrationAttachments$, DescribeRegistrationFieldDefinitions$, DescribeRegistrationFieldValues$, DescribeRegistrations$, DescribeRegistrationSectionDefinitions$, DescribeRegistrationTypeDefinitions$, DescribeRegistrationVersions$, DescribeSenderIds$, DescribeSpendLimits$, DescribeVerifiedDestinationNumbers$, DisassociateOriginationIdentity$, DisassociateProtectConfiguration$, DiscardRegistrationVersion$, GetProtectConfigurationCountryRuleSet$, GetResourcePolicy$, ListNotifyCountries$, ListPoolOriginationIdentities$, ListProtectConfigurationRuleSetNumberOverrides$, ListRegistrationAssociations$, ListTagsForResource$, PutKeyword$, PutMessageFeedback$, PutOptedOutNumber$, PutProtectConfigurationRuleSetNumberOverride$, PutRegistrationFieldValue$, PutResourcePolicy$, ReleasePhoneNumber$, ReleaseSenderId$, RequestPhoneNumber$, RequestSenderId$, SendDestinationNumberVerificationCode$, SendMediaMessage$, SendNotifyTextMessage$, SendNotifyVoiceMessage$, SendTextMessage$, SendVoiceMessage$, SetAccountDefaultProtectConfiguration$, SetDefaultMessageFeedbackEnabled$, SetDefaultMessageType$, SetDefaultSenderId$, SetMediaMessageSpendLimitOverride$, SetNotifyMessageSpendLimitOverride$, SetTextMessageSpendLimitOverride$, SetVoiceMessageSpendLimitOverride$, SubmitRegistrationVersion$, TagResource$, UntagResource$, UpdateEventDestination$, UpdateNotifyConfiguration$, UpdatePhoneNumber$, UpdatePool$, UpdateProtectConfiguration$, UpdateProtectConfigurationCountryRuleSet$, UpdateRcsAgent$, UpdateSenderId$, VerifyDestinationNumber$ } = require_schemas_03();
  __exportStar(require_schemas_03(), exports);
  __exportStar(require_errors3(), exports);
  var { PinpointSMSVoiceV2ServiceException } = require_PinpointSMSVoiceV2ServiceException();
  exports.PinpointSMSVoiceV2ServiceException = PinpointSMSVoiceV2ServiceException;
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "sms-voice"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class PinpointSMSVoiceV2Client extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultPinpointSMSVoiceV2HttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class AssociateOriginationIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "AssociateOriginationIdentity", {}).n("PinpointSMSVoiceV2Client", "AssociateOriginationIdentityCommand").sc(AssociateOriginationIdentity$).build() {
  }

  class AssociateProtectConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "AssociateProtectConfiguration", {}).n("PinpointSMSVoiceV2Client", "AssociateProtectConfigurationCommand").sc(AssociateProtectConfiguration$).build() {
  }

  class CarrierLookupCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CarrierLookup", {}).n("PinpointSMSVoiceV2Client", "CarrierLookupCommand").sc(CarrierLookup$).build() {
  }

  class CreateConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateConfigurationSet", {}).n("PinpointSMSVoiceV2Client", "CreateConfigurationSetCommand").sc(CreateConfigurationSet$).build() {
  }

  class CreateEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateEventDestination", {}).n("PinpointSMSVoiceV2Client", "CreateEventDestinationCommand").sc(CreateEventDestination$).build() {
  }

  class CreateNotifyConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateNotifyConfiguration", {}).n("PinpointSMSVoiceV2Client", "CreateNotifyConfigurationCommand").sc(CreateNotifyConfiguration$).build() {
  }

  class CreateOptOutListCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateOptOutList", {}).n("PinpointSMSVoiceV2Client", "CreateOptOutListCommand").sc(CreateOptOutList$).build() {
  }

  class CreatePoolCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreatePool", {}).n("PinpointSMSVoiceV2Client", "CreatePoolCommand").sc(CreatePool$).build() {
  }

  class CreateProtectConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateProtectConfiguration", {}).n("PinpointSMSVoiceV2Client", "CreateProtectConfigurationCommand").sc(CreateProtectConfiguration$).build() {
  }

  class CreateRcsAgentCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateRcsAgent", {}).n("PinpointSMSVoiceV2Client", "CreateRcsAgentCommand").sc(CreateRcsAgent$).build() {
  }

  class CreateRegistrationAssociationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateRegistrationAssociation", {}).n("PinpointSMSVoiceV2Client", "CreateRegistrationAssociationCommand").sc(CreateRegistrationAssociation$).build() {
  }

  class CreateRegistrationAttachmentCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateRegistrationAttachment", {}).n("PinpointSMSVoiceV2Client", "CreateRegistrationAttachmentCommand").sc(CreateRegistrationAttachment$).build() {
  }

  class CreateRegistrationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateRegistration", {}).n("PinpointSMSVoiceV2Client", "CreateRegistrationCommand").sc(CreateRegistration$).build() {
  }

  class CreateRegistrationVersionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateRegistrationVersion", {}).n("PinpointSMSVoiceV2Client", "CreateRegistrationVersionCommand").sc(CreateRegistrationVersion$).build() {
  }

  class CreateVerifiedDestinationNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "CreateVerifiedDestinationNumber", {}).n("PinpointSMSVoiceV2Client", "CreateVerifiedDestinationNumberCommand").sc(CreateVerifiedDestinationNumber$).build() {
  }

  class DeleteAccountDefaultProtectConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteAccountDefaultProtectConfiguration", {}).n("PinpointSMSVoiceV2Client", "DeleteAccountDefaultProtectConfigurationCommand").sc(DeleteAccountDefaultProtectConfiguration$).build() {
  }

  class DeleteConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteConfigurationSet", {}).n("PinpointSMSVoiceV2Client", "DeleteConfigurationSetCommand").sc(DeleteConfigurationSet$).build() {
  }

  class DeleteDefaultMessageTypeCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteDefaultMessageType", {}).n("PinpointSMSVoiceV2Client", "DeleteDefaultMessageTypeCommand").sc(DeleteDefaultMessageType$).build() {
  }

  class DeleteDefaultSenderIdCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteDefaultSenderId", {}).n("PinpointSMSVoiceV2Client", "DeleteDefaultSenderIdCommand").sc(DeleteDefaultSenderId$).build() {
  }

  class DeleteEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteEventDestination", {}).n("PinpointSMSVoiceV2Client", "DeleteEventDestinationCommand").sc(DeleteEventDestination$).build() {
  }

  class DeleteKeywordCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteKeyword", {}).n("PinpointSMSVoiceV2Client", "DeleteKeywordCommand").sc(DeleteKeyword$).build() {
  }

  class DeleteMediaMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteMediaMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "DeleteMediaMessageSpendLimitOverrideCommand").sc(DeleteMediaMessageSpendLimitOverride$).build() {
  }

  class DeleteNotifyConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteNotifyConfiguration", {}).n("PinpointSMSVoiceV2Client", "DeleteNotifyConfigurationCommand").sc(DeleteNotifyConfiguration$).build() {
  }

  class DeleteNotifyMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteNotifyMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "DeleteNotifyMessageSpendLimitOverrideCommand").sc(DeleteNotifyMessageSpendLimitOverride$).build() {
  }

  class DeleteOptedOutNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteOptedOutNumber", {}).n("PinpointSMSVoiceV2Client", "DeleteOptedOutNumberCommand").sc(DeleteOptedOutNumber$).build() {
  }

  class DeleteOptOutListCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteOptOutList", {}).n("PinpointSMSVoiceV2Client", "DeleteOptOutListCommand").sc(DeleteOptOutList$).build() {
  }

  class DeletePoolCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeletePool", {}).n("PinpointSMSVoiceV2Client", "DeletePoolCommand").sc(DeletePool$).build() {
  }

  class DeleteProtectConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteProtectConfiguration", {}).n("PinpointSMSVoiceV2Client", "DeleteProtectConfigurationCommand").sc(DeleteProtectConfiguration$).build() {
  }

  class DeleteProtectConfigurationRuleSetNumberOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteProtectConfigurationRuleSetNumberOverride", {}).n("PinpointSMSVoiceV2Client", "DeleteProtectConfigurationRuleSetNumberOverrideCommand").sc(DeleteProtectConfigurationRuleSetNumberOverride$).build() {
  }

  class DeleteRcsAgentCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteRcsAgent", {}).n("PinpointSMSVoiceV2Client", "DeleteRcsAgentCommand").sc(DeleteRcsAgent$).build() {
  }

  class DeleteRegistrationAttachmentCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteRegistrationAttachment", {}).n("PinpointSMSVoiceV2Client", "DeleteRegistrationAttachmentCommand").sc(DeleteRegistrationAttachment$).build() {
  }

  class DeleteRegistrationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteRegistration", {}).n("PinpointSMSVoiceV2Client", "DeleteRegistrationCommand").sc(DeleteRegistration$).build() {
  }

  class DeleteRegistrationFieldValueCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteRegistrationFieldValue", {}).n("PinpointSMSVoiceV2Client", "DeleteRegistrationFieldValueCommand").sc(DeleteRegistrationFieldValue$).build() {
  }

  class DeleteResourcePolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteResourcePolicy", {}).n("PinpointSMSVoiceV2Client", "DeleteResourcePolicyCommand").sc(DeleteResourcePolicy$).build() {
  }

  class DeleteTextMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteTextMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "DeleteTextMessageSpendLimitOverrideCommand").sc(DeleteTextMessageSpendLimitOverride$).build() {
  }

  class DeleteVerifiedDestinationNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteVerifiedDestinationNumber", {}).n("PinpointSMSVoiceV2Client", "DeleteVerifiedDestinationNumberCommand").sc(DeleteVerifiedDestinationNumber$).build() {
  }

  class DeleteVoiceMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DeleteVoiceMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "DeleteVoiceMessageSpendLimitOverrideCommand").sc(DeleteVoiceMessageSpendLimitOverride$).build() {
  }

  class DescribeAccountAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeAccountAttributes", {}).n("PinpointSMSVoiceV2Client", "DescribeAccountAttributesCommand").sc(DescribeAccountAttributes$).build() {
  }

  class DescribeAccountLimitsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeAccountLimits", {}).n("PinpointSMSVoiceV2Client", "DescribeAccountLimitsCommand").sc(DescribeAccountLimits$).build() {
  }

  class DescribeConfigurationSetsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeConfigurationSets", {}).n("PinpointSMSVoiceV2Client", "DescribeConfigurationSetsCommand").sc(DescribeConfigurationSets$).build() {
  }

  class DescribeKeywordsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeKeywords", {}).n("PinpointSMSVoiceV2Client", "DescribeKeywordsCommand").sc(DescribeKeywords$).build() {
  }

  class DescribeNotifyConfigurationsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeNotifyConfigurations", {}).n("PinpointSMSVoiceV2Client", "DescribeNotifyConfigurationsCommand").sc(DescribeNotifyConfigurations$).build() {
  }

  class DescribeNotifyTemplatesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeNotifyTemplates", {}).n("PinpointSMSVoiceV2Client", "DescribeNotifyTemplatesCommand").sc(DescribeNotifyTemplates$).build() {
  }

  class DescribeOptedOutNumbersCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeOptedOutNumbers", {}).n("PinpointSMSVoiceV2Client", "DescribeOptedOutNumbersCommand").sc(DescribeOptedOutNumbers$).build() {
  }

  class DescribeOptOutListsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeOptOutLists", {}).n("PinpointSMSVoiceV2Client", "DescribeOptOutListsCommand").sc(DescribeOptOutLists$).build() {
  }

  class DescribePhoneNumbersCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribePhoneNumbers", {}).n("PinpointSMSVoiceV2Client", "DescribePhoneNumbersCommand").sc(DescribePhoneNumbers$).build() {
  }

  class DescribePoolsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribePools", {}).n("PinpointSMSVoiceV2Client", "DescribePoolsCommand").sc(DescribePools$).build() {
  }

  class DescribeProtectConfigurationsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeProtectConfigurations", {}).n("PinpointSMSVoiceV2Client", "DescribeProtectConfigurationsCommand").sc(DescribeProtectConfigurations$).build() {
  }

  class DescribeRcsAgentCountryLaunchStatusCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRcsAgentCountryLaunchStatus", {}).n("PinpointSMSVoiceV2Client", "DescribeRcsAgentCountryLaunchStatusCommand").sc(DescribeRcsAgentCountryLaunchStatus$).build() {
  }

  class DescribeRcsAgentsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRcsAgents", {}).n("PinpointSMSVoiceV2Client", "DescribeRcsAgentsCommand").sc(DescribeRcsAgents$).build() {
  }

  class DescribeRegistrationAttachmentsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRegistrationAttachments", {}).n("PinpointSMSVoiceV2Client", "DescribeRegistrationAttachmentsCommand").sc(DescribeRegistrationAttachments$).build() {
  }

  class DescribeRegistrationFieldDefinitionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRegistrationFieldDefinitions", {}).n("PinpointSMSVoiceV2Client", "DescribeRegistrationFieldDefinitionsCommand").sc(DescribeRegistrationFieldDefinitions$).build() {
  }

  class DescribeRegistrationFieldValuesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRegistrationFieldValues", {}).n("PinpointSMSVoiceV2Client", "DescribeRegistrationFieldValuesCommand").sc(DescribeRegistrationFieldValues$).build() {
  }

  class DescribeRegistrationsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRegistrations", {}).n("PinpointSMSVoiceV2Client", "DescribeRegistrationsCommand").sc(DescribeRegistrations$).build() {
  }

  class DescribeRegistrationSectionDefinitionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRegistrationSectionDefinitions", {}).n("PinpointSMSVoiceV2Client", "DescribeRegistrationSectionDefinitionsCommand").sc(DescribeRegistrationSectionDefinitions$).build() {
  }

  class DescribeRegistrationTypeDefinitionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRegistrationTypeDefinitions", {}).n("PinpointSMSVoiceV2Client", "DescribeRegistrationTypeDefinitionsCommand").sc(DescribeRegistrationTypeDefinitions$).build() {
  }

  class DescribeRegistrationVersionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeRegistrationVersions", {}).n("PinpointSMSVoiceV2Client", "DescribeRegistrationVersionsCommand").sc(DescribeRegistrationVersions$).build() {
  }

  class DescribeSenderIdsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeSenderIds", {}).n("PinpointSMSVoiceV2Client", "DescribeSenderIdsCommand").sc(DescribeSenderIds$).build() {
  }

  class DescribeSpendLimitsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeSpendLimits", {}).n("PinpointSMSVoiceV2Client", "DescribeSpendLimitsCommand").sc(DescribeSpendLimits$).build() {
  }

  class DescribeVerifiedDestinationNumbersCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DescribeVerifiedDestinationNumbers", {}).n("PinpointSMSVoiceV2Client", "DescribeVerifiedDestinationNumbersCommand").sc(DescribeVerifiedDestinationNumbers$).build() {
  }

  class DisassociateOriginationIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DisassociateOriginationIdentity", {}).n("PinpointSMSVoiceV2Client", "DisassociateOriginationIdentityCommand").sc(DisassociateOriginationIdentity$).build() {
  }

  class DisassociateProtectConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DisassociateProtectConfiguration", {}).n("PinpointSMSVoiceV2Client", "DisassociateProtectConfigurationCommand").sc(DisassociateProtectConfiguration$).build() {
  }

  class DiscardRegistrationVersionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "DiscardRegistrationVersion", {}).n("PinpointSMSVoiceV2Client", "DiscardRegistrationVersionCommand").sc(DiscardRegistrationVersion$).build() {
  }

  class GetProtectConfigurationCountryRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "GetProtectConfigurationCountryRuleSet", {}).n("PinpointSMSVoiceV2Client", "GetProtectConfigurationCountryRuleSetCommand").sc(GetProtectConfigurationCountryRuleSet$).build() {
  }

  class GetResourcePolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "GetResourcePolicy", {}).n("PinpointSMSVoiceV2Client", "GetResourcePolicyCommand").sc(GetResourcePolicy$).build() {
  }

  class ListNotifyCountriesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "ListNotifyCountries", {}).n("PinpointSMSVoiceV2Client", "ListNotifyCountriesCommand").sc(ListNotifyCountries$).build() {
  }

  class ListPoolOriginationIdentitiesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "ListPoolOriginationIdentities", {}).n("PinpointSMSVoiceV2Client", "ListPoolOriginationIdentitiesCommand").sc(ListPoolOriginationIdentities$).build() {
  }

  class ListProtectConfigurationRuleSetNumberOverridesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "ListProtectConfigurationRuleSetNumberOverrides", {}).n("PinpointSMSVoiceV2Client", "ListProtectConfigurationRuleSetNumberOverridesCommand").sc(ListProtectConfigurationRuleSetNumberOverrides$).build() {
  }

  class ListRegistrationAssociationsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "ListRegistrationAssociations", {}).n("PinpointSMSVoiceV2Client", "ListRegistrationAssociationsCommand").sc(ListRegistrationAssociations$).build() {
  }

  class ListTagsForResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "ListTagsForResource", {}).n("PinpointSMSVoiceV2Client", "ListTagsForResourceCommand").sc(ListTagsForResource$).build() {
  }

  class PutKeywordCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "PutKeyword", {}).n("PinpointSMSVoiceV2Client", "PutKeywordCommand").sc(PutKeyword$).build() {
  }

  class PutMessageFeedbackCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "PutMessageFeedback", {}).n("PinpointSMSVoiceV2Client", "PutMessageFeedbackCommand").sc(PutMessageFeedback$).build() {
  }

  class PutOptedOutNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "PutOptedOutNumber", {}).n("PinpointSMSVoiceV2Client", "PutOptedOutNumberCommand").sc(PutOptedOutNumber$).build() {
  }

  class PutProtectConfigurationRuleSetNumberOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "PutProtectConfigurationRuleSetNumberOverride", {}).n("PinpointSMSVoiceV2Client", "PutProtectConfigurationRuleSetNumberOverrideCommand").sc(PutProtectConfigurationRuleSetNumberOverride$).build() {
  }

  class PutRegistrationFieldValueCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "PutRegistrationFieldValue", {}).n("PinpointSMSVoiceV2Client", "PutRegistrationFieldValueCommand").sc(PutRegistrationFieldValue$).build() {
  }

  class PutResourcePolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "PutResourcePolicy", {}).n("PinpointSMSVoiceV2Client", "PutResourcePolicyCommand").sc(PutResourcePolicy$).build() {
  }

  class ReleasePhoneNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "ReleasePhoneNumber", {}).n("PinpointSMSVoiceV2Client", "ReleasePhoneNumberCommand").sc(ReleasePhoneNumber$).build() {
  }

  class ReleaseSenderIdCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "ReleaseSenderId", {}).n("PinpointSMSVoiceV2Client", "ReleaseSenderIdCommand").sc(ReleaseSenderId$).build() {
  }

  class RequestPhoneNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "RequestPhoneNumber", {}).n("PinpointSMSVoiceV2Client", "RequestPhoneNumberCommand").sc(RequestPhoneNumber$).build() {
  }

  class RequestSenderIdCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "RequestSenderId", {}).n("PinpointSMSVoiceV2Client", "RequestSenderIdCommand").sc(RequestSenderId$).build() {
  }

  class SendDestinationNumberVerificationCodeCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SendDestinationNumberVerificationCode", {}).n("PinpointSMSVoiceV2Client", "SendDestinationNumberVerificationCodeCommand").sc(SendDestinationNumberVerificationCode$).build() {
  }

  class SendMediaMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SendMediaMessage", {}).n("PinpointSMSVoiceV2Client", "SendMediaMessageCommand").sc(SendMediaMessage$).build() {
  }

  class SendNotifyTextMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SendNotifyTextMessage", {}).n("PinpointSMSVoiceV2Client", "SendNotifyTextMessageCommand").sc(SendNotifyTextMessage$).build() {
  }

  class SendNotifyVoiceMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SendNotifyVoiceMessage", {}).n("PinpointSMSVoiceV2Client", "SendNotifyVoiceMessageCommand").sc(SendNotifyVoiceMessage$).build() {
  }

  class SendTextMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SendTextMessage", {}).n("PinpointSMSVoiceV2Client", "SendTextMessageCommand").sc(SendTextMessage$).build() {
  }

  class SendVoiceMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SendVoiceMessage", {}).n("PinpointSMSVoiceV2Client", "SendVoiceMessageCommand").sc(SendVoiceMessage$).build() {
  }

  class SetAccountDefaultProtectConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetAccountDefaultProtectConfiguration", {}).n("PinpointSMSVoiceV2Client", "SetAccountDefaultProtectConfigurationCommand").sc(SetAccountDefaultProtectConfiguration$).build() {
  }

  class SetDefaultMessageFeedbackEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetDefaultMessageFeedbackEnabled", {}).n("PinpointSMSVoiceV2Client", "SetDefaultMessageFeedbackEnabledCommand").sc(SetDefaultMessageFeedbackEnabled$).build() {
  }

  class SetDefaultMessageTypeCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetDefaultMessageType", {}).n("PinpointSMSVoiceV2Client", "SetDefaultMessageTypeCommand").sc(SetDefaultMessageType$).build() {
  }

  class SetDefaultSenderIdCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetDefaultSenderId", {}).n("PinpointSMSVoiceV2Client", "SetDefaultSenderIdCommand").sc(SetDefaultSenderId$).build() {
  }

  class SetMediaMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetMediaMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "SetMediaMessageSpendLimitOverrideCommand").sc(SetMediaMessageSpendLimitOverride$).build() {
  }

  class SetNotifyMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetNotifyMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "SetNotifyMessageSpendLimitOverrideCommand").sc(SetNotifyMessageSpendLimitOverride$).build() {
  }

  class SetTextMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetTextMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "SetTextMessageSpendLimitOverrideCommand").sc(SetTextMessageSpendLimitOverride$).build() {
  }

  class SetVoiceMessageSpendLimitOverrideCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SetVoiceMessageSpendLimitOverride", {}).n("PinpointSMSVoiceV2Client", "SetVoiceMessageSpendLimitOverrideCommand").sc(SetVoiceMessageSpendLimitOverride$).build() {
  }

  class SubmitRegistrationVersionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "SubmitRegistrationVersion", {}).n("PinpointSMSVoiceV2Client", "SubmitRegistrationVersionCommand").sc(SubmitRegistrationVersion$).build() {
  }

  class TagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "TagResource", {}).n("PinpointSMSVoiceV2Client", "TagResourceCommand").sc(TagResource$).build() {
  }

  class UntagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UntagResource", {}).n("PinpointSMSVoiceV2Client", "UntagResourceCommand").sc(UntagResource$).build() {
  }

  class UpdateEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdateEventDestination", {}).n("PinpointSMSVoiceV2Client", "UpdateEventDestinationCommand").sc(UpdateEventDestination$).build() {
  }

  class UpdateNotifyConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdateNotifyConfiguration", {}).n("PinpointSMSVoiceV2Client", "UpdateNotifyConfigurationCommand").sc(UpdateNotifyConfiguration$).build() {
  }

  class UpdatePhoneNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdatePhoneNumber", {}).n("PinpointSMSVoiceV2Client", "UpdatePhoneNumberCommand").sc(UpdatePhoneNumber$).build() {
  }

  class UpdatePoolCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdatePool", {}).n("PinpointSMSVoiceV2Client", "UpdatePoolCommand").sc(UpdatePool$).build() {
  }

  class UpdateProtectConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdateProtectConfiguration", {}).n("PinpointSMSVoiceV2Client", "UpdateProtectConfigurationCommand").sc(UpdateProtectConfiguration$).build() {
  }

  class UpdateProtectConfigurationCountryRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdateProtectConfigurationCountryRuleSet", {}).n("PinpointSMSVoiceV2Client", "UpdateProtectConfigurationCountryRuleSetCommand").sc(UpdateProtectConfigurationCountryRuleSet$).build() {
  }

  class UpdateRcsAgentCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdateRcsAgent", {}).n("PinpointSMSVoiceV2Client", "UpdateRcsAgentCommand").sc(UpdateRcsAgent$).build() {
  }

  class UpdateSenderIdCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "UpdateSenderId", {}).n("PinpointSMSVoiceV2Client", "UpdateSenderIdCommand").sc(UpdateSenderId$).build() {
  }

  class VerifyDestinationNumberCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("PinpointSMSVoiceV2", "VerifyDestinationNumber", {}).n("PinpointSMSVoiceV2Client", "VerifyDestinationNumberCommand").sc(VerifyDestinationNumber$).build() {
  }
  var paginateDescribeAccountAttributes = createPaginator(PinpointSMSVoiceV2Client, DescribeAccountAttributesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeAccountLimits = createPaginator(PinpointSMSVoiceV2Client, DescribeAccountLimitsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeConfigurationSets = createPaginator(PinpointSMSVoiceV2Client, DescribeConfigurationSetsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeKeywords = createPaginator(PinpointSMSVoiceV2Client, DescribeKeywordsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeNotifyConfigurations = createPaginator(PinpointSMSVoiceV2Client, DescribeNotifyConfigurationsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeNotifyTemplates = createPaginator(PinpointSMSVoiceV2Client, DescribeNotifyTemplatesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeOptedOutNumbers = createPaginator(PinpointSMSVoiceV2Client, DescribeOptedOutNumbersCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeOptOutLists = createPaginator(PinpointSMSVoiceV2Client, DescribeOptOutListsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribePhoneNumbers = createPaginator(PinpointSMSVoiceV2Client, DescribePhoneNumbersCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribePools = createPaginator(PinpointSMSVoiceV2Client, DescribePoolsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeProtectConfigurations = createPaginator(PinpointSMSVoiceV2Client, DescribeProtectConfigurationsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRcsAgentCountryLaunchStatus = createPaginator(PinpointSMSVoiceV2Client, DescribeRcsAgentCountryLaunchStatusCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRcsAgents = createPaginator(PinpointSMSVoiceV2Client, DescribeRcsAgentsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRegistrationAttachments = createPaginator(PinpointSMSVoiceV2Client, DescribeRegistrationAttachmentsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRegistrationFieldDefinitions = createPaginator(PinpointSMSVoiceV2Client, DescribeRegistrationFieldDefinitionsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRegistrationFieldValues = createPaginator(PinpointSMSVoiceV2Client, DescribeRegistrationFieldValuesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRegistrationSectionDefinitions = createPaginator(PinpointSMSVoiceV2Client, DescribeRegistrationSectionDefinitionsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRegistrations = createPaginator(PinpointSMSVoiceV2Client, DescribeRegistrationsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRegistrationTypeDefinitions = createPaginator(PinpointSMSVoiceV2Client, DescribeRegistrationTypeDefinitionsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeRegistrationVersions = createPaginator(PinpointSMSVoiceV2Client, DescribeRegistrationVersionsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeSenderIds = createPaginator(PinpointSMSVoiceV2Client, DescribeSenderIdsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeSpendLimits = createPaginator(PinpointSMSVoiceV2Client, DescribeSpendLimitsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateDescribeVerifiedDestinationNumbers = createPaginator(PinpointSMSVoiceV2Client, DescribeVerifiedDestinationNumbersCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListNotifyCountries = createPaginator(PinpointSMSVoiceV2Client, ListNotifyCountriesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListPoolOriginationIdentities = createPaginator(PinpointSMSVoiceV2Client, ListPoolOriginationIdentitiesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListProtectConfigurationRuleSetNumberOverrides = createPaginator(PinpointSMSVoiceV2Client, ListProtectConfigurationRuleSetNumberOverridesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListRegistrationAssociations = createPaginator(PinpointSMSVoiceV2Client, ListRegistrationAssociationsCommand, "NextToken", "NextToken", "MaxResults");
  var commands = {
    AssociateOriginationIdentityCommand,
    AssociateProtectConfigurationCommand,
    CarrierLookupCommand,
    CreateConfigurationSetCommand,
    CreateEventDestinationCommand,
    CreateNotifyConfigurationCommand,
    CreateOptOutListCommand,
    CreatePoolCommand,
    CreateProtectConfigurationCommand,
    CreateRcsAgentCommand,
    CreateRegistrationCommand,
    CreateRegistrationAssociationCommand,
    CreateRegistrationAttachmentCommand,
    CreateRegistrationVersionCommand,
    CreateVerifiedDestinationNumberCommand,
    DeleteAccountDefaultProtectConfigurationCommand,
    DeleteConfigurationSetCommand,
    DeleteDefaultMessageTypeCommand,
    DeleteDefaultSenderIdCommand,
    DeleteEventDestinationCommand,
    DeleteKeywordCommand,
    DeleteMediaMessageSpendLimitOverrideCommand,
    DeleteNotifyConfigurationCommand,
    DeleteNotifyMessageSpendLimitOverrideCommand,
    DeleteOptedOutNumberCommand,
    DeleteOptOutListCommand,
    DeletePoolCommand,
    DeleteProtectConfigurationCommand,
    DeleteProtectConfigurationRuleSetNumberOverrideCommand,
    DeleteRcsAgentCommand,
    DeleteRegistrationCommand,
    DeleteRegistrationAttachmentCommand,
    DeleteRegistrationFieldValueCommand,
    DeleteResourcePolicyCommand,
    DeleteTextMessageSpendLimitOverrideCommand,
    DeleteVerifiedDestinationNumberCommand,
    DeleteVoiceMessageSpendLimitOverrideCommand,
    DescribeAccountAttributesCommand,
    DescribeAccountLimitsCommand,
    DescribeConfigurationSetsCommand,
    DescribeKeywordsCommand,
    DescribeNotifyConfigurationsCommand,
    DescribeNotifyTemplatesCommand,
    DescribeOptedOutNumbersCommand,
    DescribeOptOutListsCommand,
    DescribePhoneNumbersCommand,
    DescribePoolsCommand,
    DescribeProtectConfigurationsCommand,
    DescribeRcsAgentCountryLaunchStatusCommand,
    DescribeRcsAgentsCommand,
    DescribeRegistrationAttachmentsCommand,
    DescribeRegistrationFieldDefinitionsCommand,
    DescribeRegistrationFieldValuesCommand,
    DescribeRegistrationsCommand,
    DescribeRegistrationSectionDefinitionsCommand,
    DescribeRegistrationTypeDefinitionsCommand,
    DescribeRegistrationVersionsCommand,
    DescribeSenderIdsCommand,
    DescribeSpendLimitsCommand,
    DescribeVerifiedDestinationNumbersCommand,
    DisassociateOriginationIdentityCommand,
    DisassociateProtectConfigurationCommand,
    DiscardRegistrationVersionCommand,
    GetProtectConfigurationCountryRuleSetCommand,
    GetResourcePolicyCommand,
    ListNotifyCountriesCommand,
    ListPoolOriginationIdentitiesCommand,
    ListProtectConfigurationRuleSetNumberOverridesCommand,
    ListRegistrationAssociationsCommand,
    ListTagsForResourceCommand,
    PutKeywordCommand,
    PutMessageFeedbackCommand,
    PutOptedOutNumberCommand,
    PutProtectConfigurationRuleSetNumberOverrideCommand,
    PutRegistrationFieldValueCommand,
    PutResourcePolicyCommand,
    ReleasePhoneNumberCommand,
    ReleaseSenderIdCommand,
    RequestPhoneNumberCommand,
    RequestSenderIdCommand,
    SendDestinationNumberVerificationCodeCommand,
    SendMediaMessageCommand,
    SendNotifyTextMessageCommand,
    SendNotifyVoiceMessageCommand,
    SendTextMessageCommand,
    SendVoiceMessageCommand,
    SetAccountDefaultProtectConfigurationCommand,
    SetDefaultMessageFeedbackEnabledCommand,
    SetDefaultMessageTypeCommand,
    SetDefaultSenderIdCommand,
    SetMediaMessageSpendLimitOverrideCommand,
    SetNotifyMessageSpendLimitOverrideCommand,
    SetTextMessageSpendLimitOverrideCommand,
    SetVoiceMessageSpendLimitOverrideCommand,
    SubmitRegistrationVersionCommand,
    TagResourceCommand,
    UntagResourceCommand,
    UpdateEventDestinationCommand,
    UpdateNotifyConfigurationCommand,
    UpdatePhoneNumberCommand,
    UpdatePoolCommand,
    UpdateProtectConfigurationCommand,
    UpdateProtectConfigurationCountryRuleSetCommand,
    UpdateRcsAgentCommand,
    UpdateSenderIdCommand,
    VerifyDestinationNumberCommand
  };
  var paginators = {
    paginateDescribeAccountAttributes,
    paginateDescribeAccountLimits,
    paginateDescribeConfigurationSets,
    paginateDescribeKeywords,
    paginateDescribeNotifyConfigurations,
    paginateDescribeNotifyTemplates,
    paginateDescribeOptedOutNumbers,
    paginateDescribeOptOutLists,
    paginateDescribePhoneNumbers,
    paginateDescribePools,
    paginateDescribeProtectConfigurations,
    paginateDescribeRcsAgentCountryLaunchStatus,
    paginateDescribeRcsAgents,
    paginateDescribeRegistrationAttachments,
    paginateDescribeRegistrationFieldDefinitions,
    paginateDescribeRegistrationFieldValues,
    paginateDescribeRegistrations,
    paginateDescribeRegistrationSectionDefinitions,
    paginateDescribeRegistrationTypeDefinitions,
    paginateDescribeRegistrationVersions,
    paginateDescribeSenderIds,
    paginateDescribeSpendLimits,
    paginateDescribeVerifiedDestinationNumbers,
    paginateListNotifyCountries,
    paginateListPoolOriginationIdentities,
    paginateListProtectConfigurationRuleSetNumberOverrides,
    paginateListRegistrationAssociations
  };

  class PinpointSMSVoiceV2 extends PinpointSMSVoiceV2Client {
  }
  createAggregatedClient(commands, PinpointSMSVoiceV2, { paginators });
  var AccessDeniedExceptionReason = {
    ACCOUNT_DISABLED: "ACCOUNT_DISABLED",
    INSUFFICIENT_ACCOUNT_REPUTATION: "INSUFFICIENT_ACCOUNT_REPUTATION"
  };
  var AccountAttributeName = {
    ACCOUNT_TIER: "ACCOUNT_TIER",
    DEFAULT_PROTECT_CONFIGURATION_ID: "DEFAULT_PROTECT_CONFIGURATION_ID"
  };
  var AccountLimitName = {
    CONFIGURATION_SETS: "CONFIGURATION_SETS",
    OPT_OUT_LISTS: "OPT_OUT_LISTS",
    PHONE_NUMBERS: "PHONE_NUMBERS",
    POOLS: "POOLS",
    REGISTRATIONS: "REGISTRATIONS",
    REGISTRATION_ATTACHMENTS: "REGISTRATION_ATTACHMENTS",
    SENDER_IDS: "SENDER_IDS",
    VERIFIED_DESTINATION_NUMBERS: "VERIFIED_DESTINATION_NUMBERS"
  };
  var ConflictExceptionReason = {
    CREATE_REGISTRATION_VERSION_NOT_ALLOWED: "CREATE_REGISTRATION_VERSION_NOT_ALLOWED",
    DELETION_PROTECTION_ENABLED: "DELETION_PROTECTION_ENABLED",
    DESTINATION_COUNTRY_BLOCKED_BY_PROTECT_CONFIGURATION: "DESTINATION_COUNTRY_BLOCKED_BY_PROTECT_CONFIGURATION",
    DESTINATION_PHONE_NUMBER_BLOCKED_BY_PROTECT_NUMBER_OVERRIDE: "DESTINATION_PHONE_NUMBER_BLOCKED_BY_PROTECT_NUMBER_OVERRIDE",
    DESTINATION_PHONE_NUMBER_NOT_VERIFIED: "DESTINATION_PHONE_NUMBER_NOT_VERIFIED",
    DESTINATION_PHONE_NUMBER_OPTED_OUT: "DESTINATION_PHONE_NUMBER_OPTED_OUT",
    DISASSOCIATE_REGISTRATION_NOT_ALLOWED: "DISASSOCIATE_REGISTRATION_NOT_ALLOWED",
    DISCARD_REGISTRATION_VERSION_NOT_ALLOWED: "DISCARD_REGISTRATION_VERSION_NOT_ALLOWED",
    EDIT_REGISTRATION_FIELD_VALUES_NOT_ALLOWED: "EDIT_REGISTRATION_FIELD_VALUES_NOT_ALLOWED",
    EVENT_DESTINATION_MISMATCH: "EVENT_DESTINATION_MISMATCH",
    KEYWORD_MISMATCH: "KEYWORD_MISMATCH",
    LAST_PHONE_NUMBER: "LAST_PHONE_NUMBER",
    MESSAGE_TYPE_MISMATCH: "MESSAGE_TYPE_MISMATCH",
    NOTIFY_CONFIGURATION_NOT_ACTIVE: "NOTIFY_CONFIGURATION_NOT_ACTIVE",
    NO_ORIGINATION_IDENTITIES_FOUND: "NO_ORIGINATION_IDENTITIES_FOUND",
    NUMBER_CAPABILITIES_MISMATCH: "NUMBER_CAPABILITIES_MISMATCH",
    OPT_OUT_LIST_MISMATCH: "OPT_OUT_LIST_MISMATCH",
    PHONE_NUMBER_ASSOCIATED_TO_POOL: "PHONE_NUMBER_ASSOCIATED_TO_POOL",
    PHONE_NUMBER_ASSOCIATED_TO_REGISTRATION: "PHONE_NUMBER_ASSOCIATED_TO_REGISTRATION",
    PHONE_NUMBER_NOT_ASSOCIATED_TO_POOL: "PHONE_NUMBER_NOT_ASSOCIATED_TO_POOL",
    PHONE_NUMBER_NOT_IN_REGISTRATION_REGION: "PHONE_NUMBER_NOT_IN_REGISTRATION_REGION",
    POOL_ASSOCIATED_TO_NOTIFY_CONFIGURATION: "POOL_ASSOCIATED_TO_NOTIFY_CONFIGURATION",
    PROTECT_CONFIGURATION_ASSOCIATED_WITH_CONFIGURATION_SET: "PROTECT_CONFIGURATION_ASSOCIATED_WITH_CONFIGURATION_SET",
    PROTECT_CONFIGURATION_IS_ACCOUNT_DEFAULT: "PROTECT_CONFIGURATION_IS_ACCOUNT_DEFAULT",
    PROTECT_CONFIGURATION_NOT_ASSOCIATED_WITH_CONFIGURATION_SET: "PROTECT_CONFIGURATION_NOT_ASSOCIATED_WITH_CONFIGURATION_SET",
    RCS_AGENT_ALREADY_ASSOCIATED_TO_REGISTRATION_TYPE: "RCS_AGENT_ALREADY_ASSOCIATED_TO_REGISTRATION_TYPE",
    RCS_AGENT_ASSOCIATED_TO_POOL: "RCS_AGENT_ASSOCIATED_TO_POOL",
    REGISTRATION_ALREADY_SUBMITTED: "REGISTRATION_ALREADY_SUBMITTED",
    REGISTRATION_NOT_COMPLETE: "REGISTRATION_NOT_COMPLETE",
    RESOURCE_ALREADY_ASSOCIATED: "RESOURCE_ALREADY_ASSOCIATED",
    RESOURCE_ALREADY_EXISTS: "RESOURCE_ALREADY_EXISTS",
    RESOURCE_DELETION_NOT_ALLOWED: "RESOURCE_DELETION_NOT_ALLOWED",
    RESOURCE_MODIFICATION_NOT_ALLOWED: "RESOURCE_MODIFICATION_NOT_ALLOWED",
    RESOURCE_NOT_ACTIVE: "RESOURCE_NOT_ACTIVE",
    RESOURCE_NOT_EMPTY: "RESOURCE_NOT_EMPTY",
    SELF_MANAGED_OPT_OUTS_MISMATCH: "SELF_MANAGED_OPT_OUTS_MISMATCH",
    SENDER_ID_ASSOCIATED_TO_POOL: "SENDER_ID_ASSOCIATED_TO_POOL",
    SUBMIT_REGISTRATION_VERSION_NOT_ALLOWED: "SUBMIT_REGISTRATION_VERSION_NOT_ALLOWED",
    TWO_WAY_CONFIG_MISMATCH: "TWO_WAY_CONFIG_MISMATCH",
    VERIFICATION_ALREADY_COMPLETE: "VERIFICATION_ALREADY_COMPLETE",
    VERIFICATION_CODE_EXPIRED: "VERIFICATION_CODE_EXPIRED"
  };
  var ResourceType = {
    ACCOUNT: "account",
    CONFIGURATION_SET: "configuration-set",
    EVENT_DESTINATION: "event-destination",
    KEYWORD: "keyword",
    MESSAGE: "message",
    MESSAGE_TEMPLATE: "message-template",
    NOTIFY_CONFIGURATION: "notify-configuration",
    NOTIFY_TEMPLATE: "notify-template",
    OPTED_OUT_NUMBER: "opted-out-number",
    OPT_OUT_LIST: "opt-out-list",
    PHONE_NUMBER: "phone-number",
    POLICY: "policy",
    POOL: "pool",
    PROTECT_CONFIGURATION: "protect-configuration",
    RCS_AGENT: "rcs-agent",
    REGISTRATION: "registration",
    REGISTRATION_ATTACHMENT: "registration-attachment",
    SENDER_ID: "sender-id",
    VERIFIED_DESTINATION_NUMBER: "verified-destination-number"
  };
  var ServiceQuotaExceededExceptionReason = {
    ASSOCIATIONS_PER_REGISTRATION: "ASSOCIATIONS_PER_REGISTRATION",
    CONFIGURATION_SETS_PER_ACCOUNT: "CONFIGURATION_SETS_PER_ACCOUNT",
    DAILY_DESTINATION_CALL_LIMIT: "DAILY_DESTINATION_CALL_LIMIT",
    DAILY_NOTIFY_TIER_MESSAGE_LIMIT: "DAILY_NOTIFY_TIER_MESSAGE_LIMIT",
    EVENT_DESTINATIONS_PER_CONFIGURATION_SET: "EVENT_DESTINATIONS_PER_CONFIGURATION_SET",
    KEYWORDS_PER_PHONE_NUMBER: "KEYWORDS_PER_PHONE_NUMBER",
    KEYWORDS_PER_POOL: "KEYWORDS_PER_POOL",
    MONTHLY_SPEND_LIMIT_REACHED_FOR_MEDIA: "MONTHLY_SPEND_LIMIT_REACHED_FOR_MEDIA",
    MONTHLY_SPEND_LIMIT_REACHED_FOR_NOTIFY: "MONTHLY_SPEND_LIMIT_REACHED_FOR_NOTIFY",
    MONTHLY_SPEND_LIMIT_REACHED_FOR_TEXT: "MONTHLY_SPEND_LIMIT_REACHED_FOR_TEXT",
    MONTHLY_SPEND_LIMIT_REACHED_FOR_VOICE: "MONTHLY_SPEND_LIMIT_REACHED_FOR_VOICE",
    NOTIFY_CONFIGURATIONS_PER_ACCOUNT: "NOTIFY_CONFIGURATIONS_PER_ACCOUNT",
    OPT_OUT_LISTS_PER_ACCOUNT: "OPT_OUT_LISTS_PER_ACCOUNT",
    ORIGINATION_IDENTITIES_PER_POOL: "ORIGINATION_IDENTITIES_PER_POOL",
    PHONE_NUMBERS_PER_ACCOUNT: "PHONE_NUMBERS_PER_ACCOUNT",
    PHONE_NUMBERS_PER_REGISTRATION: "PHONE_NUMBERS_PER_REGISTRATION",
    POOLS_PER_ACCOUNT: "POOLS_PER_ACCOUNT",
    PROTECT_CONFIGURATIONS_PER_ACCOUNT: "PROTECT_CONFIGURATIONS_PER_ACCOUNT",
    RCS_AGENTS_PER_ACCOUNT: "RCS_AGENTS_PER_ACCOUNT",
    REGISTRATIONS_PER_ACCOUNT: "REGISTRATIONS_PER_ACCOUNT",
    REGISTRATION_ATTACHMENTS_CREATED_PER_DAY: "REGISTRATION_ATTACHMENTS_CREATED_PER_DAY",
    REGISTRATION_ATTACHMENTS_PER_ACCOUNT: "REGISTRATION_ATTACHMENTS_PER_ACCOUNT",
    REGISTRATION_VERSIONS_CREATED_PER_DAY: "REGISTRATION_VERSIONS_CREATED_PER_DAY",
    SENDER_IDS_PER_ACCOUNT: "SENDER_IDS_PER_ACCOUNT",
    TAGS_PER_RESOURCE: "TAGS_PER_RESOURCE",
    VERIFICATION_ATTEMPTS_PER_DAY: "VERIFICATION_ATTEMPTS_PER_DAY",
    VERIFIED_DESTINATION_NUMBERS_PER_ACCOUNT: "VERIFIED_DESTINATION_NUMBERS_PER_ACCOUNT"
  };
  var ValidationExceptionReason = {
    ATTACHMENT_TYPE_NOT_SUPPORTED: "ATTACHMENT_TYPE_NOT_SUPPORTED",
    CANNOT_ADD_OPTED_OUT_NUMBER: "CANNOT_ADD_OPTED_OUT_NUMBER",
    CANNOT_PARSE: "CANNOT_PARSE",
    CHANNEL_NOT_ENABLED: "CHANNEL_NOT_ENABLED",
    COUNTRY_CODE_MISMATCH: "COUNTRY_CODE_MISMATCH",
    COUNTRY_NOT_ENABLED: "COUNTRY_NOT_ENABLED",
    DESTINATION_COUNTRY_BLOCKED: "DESTINATION_COUNTRY_BLOCKED",
    FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
    INTERNATIONAL_SENDING_NOT_SUPPORTED: "INTERNATIONAL_SENDING_NOT_SUPPORTED",
    INVALID_ARN: "INVALID_ARN",
    INVALID_FILTER_VALUES: "INVALID_FILTER_VALUES",
    INVALID_IDENTITY_FOR_DESTINATION_COUNTRY: "INVALID_IDENTITY_FOR_DESTINATION_COUNTRY",
    INVALID_NEXT_TOKEN: "INVALID_NEXT_TOKEN",
    INVALID_PARAMETER: "INVALID_PARAMETER",
    INVALID_REGISTRATION_ASSOCIATION: "INVALID_REGISTRATION_ASSOCIATION",
    INVALID_REQUEST: "INVALID_REQUEST",
    MAXIMUM_SIZE_EXCEEDED: "MAXIMUM_SIZE_EXCEEDED",
    MEDIA_TYPE_NOT_SUPPORTED: "MEDIA_TYPE_NOT_SUPPORTED",
    MISSING_PARAMETER: "MISSING_PARAMETER",
    OTHER: "OTHER",
    PARAMETERS_CANNOT_BE_USED_TOGETHER: "PARAMETERS_CANNOT_BE_USED_TOGETHER",
    PHONE_NUMBER_CANNOT_BE_OPTED_IN: "PHONE_NUMBER_CANNOT_BE_OPTED_IN",
    PHONE_NUMBER_CANNOT_BE_RELEASED: "PHONE_NUMBER_CANNOT_BE_RELEASED",
    PRICE_OVER_THRESHOLD: "PRICE_OVER_THRESHOLD",
    REGISTRATION_FIELD_CANNOT_BE_DELETED: "REGISTRATION_FIELD_CANNOT_BE_DELETED",
    REQUESTED_SPEND_LIMIT_HIGHER_THAN_SERVICE_LIMIT: "REQUESTED_SPEND_LIMIT_HIGHER_THAN_SERVICE_LIMIT",
    RESOURCE_NOT_ACCESSIBLE: "RESOURCE_NOT_ACCESSIBLE",
    SENDER_ID_NOT_REGISTERED: "SENDER_ID_NOT_REGISTERED",
    SENDER_ID_NOT_SUPPORTED: "SENDER_ID_NOT_SUPPORTED",
    SENDER_ID_REQUIRES_REGISTRATION: "SENDER_ID_REQUIRES_REGISTRATION",
    TWO_WAY_CHANNEL_NOT_PRESENT: "TWO_WAY_CHANNEL_NOT_PRESENT",
    TWO_WAY_NOT_ENABLED: "TWO_WAY_NOT_ENABLED",
    TWO_WAY_NOT_SUPPORTED_IN_COUNTRY: "TWO_WAY_NOT_SUPPORTED_IN_COUNTRY",
    TWO_WAY_NOT_SUPPORTED_IN_REGION: "TWO_WAY_NOT_SUPPORTED_IN_REGION",
    TWO_WAY_TOPIC_NOT_PRESENT: "TWO_WAY_TOPIC_NOT_PRESENT",
    UNKNOWN_OPERATION: "UNKNOWN_OPERATION",
    UNKNOWN_REGISTRATION_FIELD: "UNKNOWN_REGISTRATION_FIELD",
    UNKNOWN_REGISTRATION_SECTION: "UNKNOWN_REGISTRATION_SECTION",
    UNKNOWN_REGISTRATION_TYPE: "UNKNOWN_REGISTRATION_TYPE",
    UNKNOWN_REGISTRATION_VERSION: "UNKNOWN_REGISTRATION_VERSION",
    UNSPECIFIED_PARAMETER_NOT_SUPPORTED: "UNSPECIFIED_PARAMETER_NOT_SUPPORTED",
    VERIFICATION_CODE_MISMATCH: "VERIFICATION_CODE_MISMATCH",
    VOICE_CAPABILITY_NOT_AVAILABLE: "VOICE_CAPABILITY_NOT_AVAILABLE"
  };
  var AttachmentStatus = {
    DELETED: "DELETED",
    UPLOAD_COMPLETE: "UPLOAD_COMPLETE",
    UPLOAD_FAILED: "UPLOAD_FAILED",
    UPLOAD_IN_PROGRESS: "UPLOAD_IN_PROGRESS"
  };
  var AttachmentUploadErrorReason = {
    INTERNAL_ERROR: "INTERNAL_ERROR"
  };
  var PhoneNumberType = {
    INVALID: "INVALID",
    LANDLINE: "LANDLINE",
    MOBILE: "MOBILE",
    OTHER: "OTHER"
  };
  var CarrierStatus = {
    ACTIVE: "ACTIVE",
    PENDING: "PENDING",
    REJECTED: "REJECTED"
  };
  var ConfigurationSetFilterName = {
    DEFAULT_MESSAGE_FEEDBACK_ENABLED: "default-message-feedback-enabled",
    DEFAULT_MESSAGE_TYPE: "default-message-type",
    DEFAULT_SENDER_ID: "default-sender-id",
    EVENT_DESTINATION_NAME: "event-destination-name",
    MATCHING_EVENT_TYPES: "matching-event-types",
    PROTECT_CONFIGURATION_ID: "protect-configuration-id"
  };
  var MessageType = {
    PROMOTIONAL: "PROMOTIONAL",
    TRANSACTIONAL: "TRANSACTIONAL"
  };
  var EventType = {
    ALL: "ALL",
    MEDIA_ALL: "MEDIA_ALL",
    MEDIA_BLOCKED: "MEDIA_BLOCKED",
    MEDIA_CARRIER_BLOCKED: "MEDIA_CARRIER_BLOCKED",
    MEDIA_CARRIER_UNREACHABLE: "MEDIA_CARRIER_UNREACHABLE",
    MEDIA_DELIVERED: "MEDIA_DELIVERED",
    MEDIA_FILE_INACCESSIBLE: "MEDIA_FILE_INACCESSIBLE",
    MEDIA_FILE_SIZE_EXCEEDED: "MEDIA_FILE_SIZE_EXCEEDED",
    MEDIA_FILE_TYPE_UNSUPPORTED: "MEDIA_FILE_TYPE_UNSUPPORTED",
    MEDIA_INVALID: "MEDIA_INVALID",
    MEDIA_INVALID_MESSAGE: "MEDIA_INVALID_MESSAGE",
    MEDIA_PENDING: "MEDIA_PENDING",
    MEDIA_QUEUED: "MEDIA_QUEUED",
    MEDIA_SPAM: "MEDIA_SPAM",
    MEDIA_SUCCESSFUL: "MEDIA_SUCCESSFUL",
    MEDIA_TTL_EXPIRED: "MEDIA_TTL_EXPIRED",
    MEDIA_UNKNOWN: "MEDIA_UNKNOWN",
    MEDIA_UNREACHABLE: "MEDIA_UNREACHABLE",
    TEXT_ALL: "TEXT_ALL",
    TEXT_BLOCKED: "TEXT_BLOCKED",
    TEXT_CARRIER_BLOCKED: "TEXT_CARRIER_BLOCKED",
    TEXT_CARRIER_UNREACHABLE: "TEXT_CARRIER_UNREACHABLE",
    TEXT_DELIVERED: "TEXT_DELIVERED",
    TEXT_INVALID: "TEXT_INVALID",
    TEXT_INVALID_MESSAGE: "TEXT_INVALID_MESSAGE",
    TEXT_PENDING: "TEXT_PENDING",
    TEXT_PROTECT_BLOCKED: "TEXT_PROTECT_BLOCKED",
    TEXT_QUEUED: "TEXT_QUEUED",
    TEXT_SENT: "TEXT_SENT",
    TEXT_SPAM: "TEXT_SPAM",
    TEXT_SUCCESSFUL: "TEXT_SUCCESSFUL",
    TEXT_TTL_EXPIRED: "TEXT_TTL_EXPIRED",
    TEXT_UNKNOWN: "TEXT_UNKNOWN",
    TEXT_UNREACHABLE: "TEXT_UNREACHABLE",
    VOICE_ALL: "VOICE_ALL",
    VOICE_ANSWERED: "VOICE_ANSWERED",
    VOICE_BUSY: "VOICE_BUSY",
    VOICE_COMPLETED: "VOICE_COMPLETED",
    VOICE_FAILED: "VOICE_FAILED",
    VOICE_INITIATED: "VOICE_INITIATED",
    VOICE_NO_ANSWER: "VOICE_NO_ANSWER",
    VOICE_RINGING: "VOICE_RINGING",
    VOICE_TTL_EXPIRED: "VOICE_TTL_EXPIRED"
  };
  var CountryLaunchStatus = {
    ACTIVE: "ACTIVE",
    CREATED: "CREATED",
    PARTIAL: "PARTIAL",
    PENDING: "PENDING",
    REJECTED: "REJECTED"
  };
  var CountryLaunchStatusFilterName = {
    COUNTRY_LAUNCH_STATUS: "country-launch-status"
  };
  var NumberCapability = {
    MMS: "MMS",
    RCS: "RCS",
    SMS: "SMS",
    VOICE: "VOICE"
  };
  var NotifyConfigurationUseCase = {
    CODE_VERIFICATION: "CODE_VERIFICATION"
  };
  var NotifyConfigurationStatus = {
    ACTIVE: "ACTIVE",
    PENDING: "PENDING",
    REJECTED: "REJECTED",
    REQUIRES_VERIFICATION: "REQUIRES_VERIFICATION"
  };
  var NotifyConfigurationTier = {
    ADVANCED: "ADVANCED",
    BASIC: "BASIC"
  };
  var TierUpgradeStatus = {
    ADVANCED: "ADVANCED",
    BASIC: "BASIC",
    PENDING_UPGRADE: "PENDING_UPGRADE",
    REJECTED: "REJECTED"
  };
  var PoolStatus = {
    ACTIVE: "ACTIVE",
    CREATING: "CREATING",
    DELETING: "DELETING"
  };
  var RcsAgentStatus = {
    ACTIVE: "ACTIVE",
    CREATED: "CREATED",
    DELETED: "DELETED",
    PARTIAL: "PARTIAL",
    PENDING: "PENDING",
    TESTING: "TESTING"
  };
  var RegistrationStatus = {
    AWS_REVIEWING: "AWS_REVIEWING",
    CLOSED: "CLOSED",
    COMPLETE: "COMPLETE",
    CREATED: "CREATED",
    DELETED: "DELETED",
    PROVISIONING: "PROVISIONING",
    REQUIRES_AUTHENTICATION: "REQUIRES_AUTHENTICATION",
    REQUIRES_UPDATES: "REQUIRES_UPDATES",
    REVIEWING: "REVIEWING",
    SUBMITTED: "SUBMITTED"
  };
  var RegistrationVersionStatus = {
    APPROVED: "APPROVED",
    ARCHIVED: "ARCHIVED",
    AWS_REVIEWING: "AWS_REVIEWING",
    DENIED: "DENIED",
    DISCARDED: "DISCARDED",
    DRAFT: "DRAFT",
    REQUIRES_AUTHENTICATION: "REQUIRES_AUTHENTICATION",
    REQUIRES_OFFLINE_REVIEW: "REQUIRES_OFFLINE_REVIEW",
    REVIEWING: "REVIEWING",
    REVOKED: "REVOKED",
    SUBMITTED: "SUBMITTED"
  };
  var VerificationStatus = {
    PENDING: "PENDING",
    UNSUPPORTED: "UNSUPPORTED",
    VERIFIED: "VERIFIED"
  };
  var KeywordAction = {
    AUTOMATIC_RESPONSE: "AUTOMATIC_RESPONSE",
    OPT_IN: "OPT_IN",
    OPT_OUT: "OPT_OUT"
  };
  var ProtectConfigurationRuleOverrideAction = {
    ALLOW: "ALLOW",
    BLOCK: "BLOCK"
  };
  var KeywordFilterName = {
    KEYWORD_ACTION: "keyword-action"
  };
  var NotifyConfigurationFilterName = {
    DEFAULT_POOL: "default-pool",
    DEFAULT_TEMPLATE: "default-template",
    DELETION_PROTECTION_ENABLED: "deletion-protection-enabled",
    DISPLAY_NAME: "display-name",
    ENABLED_CHANNELS: "enabled-channels",
    ENABLED_COUNTRIES: "enabled-countries",
    STATUS: "status",
    TIER_UPGRADE_STATUS: "tier-upgrade-status",
    USE_CASE: "use-case"
  };
  var NotifyTemplateFilterName = {
    CHANNELS: "channels",
    LANGUAGE_CODE: "language-code",
    SUPPORTED_COUNTRIES: "supported-countries",
    SUPPORTED_VOICE_IDS: "supported-voice-ids",
    TEMPLATE_TYPE: "template-type",
    TIER_ACCESS: "tier-access"
  };
  var NotifyTemplateStatus = {
    ACTIVE: "ACTIVE",
    INACTIVE: "INACTIVE"
  };
  var VoiceId = {
    AMY: "AMY",
    ASTRID: "ASTRID",
    BIANCA: "BIANCA",
    BRIAN: "BRIAN",
    CAMILA: "CAMILA",
    CARLA: "CARLA",
    CARMEN: "CARMEN",
    CELINE: "CELINE",
    CHANTAL: "CHANTAL",
    CONCHITA: "CONCHITA",
    CRISTIANO: "CRISTIANO",
    DORA: "DORA",
    EMMA: "EMMA",
    ENRIQUE: "ENRIQUE",
    EWA: "EWA",
    FILIZ: "FILIZ",
    GERAINT: "GERAINT",
    GIORGIO: "GIORGIO",
    GWYNETH: "GWYNETH",
    HANS: "HANS",
    INES: "INES",
    IVY: "IVY",
    JACEK: "JACEK",
    JAN: "JAN",
    JOANNA: "JOANNA",
    JOEY: "JOEY",
    JUSTIN: "JUSTIN",
    KARL: "KARL",
    KENDRA: "KENDRA",
    KIMBERLY: "KIMBERLY",
    LEA: "LEA",
    LIV: "LIV",
    LOTTE: "LOTTE",
    LUCIA: "LUCIA",
    LUPE: "LUPE",
    MADS: "MADS",
    MAJA: "MAJA",
    MARLENE: "MARLENE",
    MATHIEU: "MATHIEU",
    MATTHEW: "MATTHEW",
    MAXIM: "MAXIM",
    MIA: "MIA",
    MIGUEL: "MIGUEL",
    MIZUKI: "MIZUKI",
    NAJA: "NAJA",
    NICOLE: "NICOLE",
    PENELOPE: "PENELOPE",
    RAVEENA: "RAVEENA",
    RICARDO: "RICARDO",
    RUBEN: "RUBEN",
    RUSSELL: "RUSSELL",
    SALLI: "SALLI",
    SEOYEON: "SEOYEON",
    TAKUMI: "TAKUMI",
    TATYANA: "TATYANA",
    VICKI: "VICKI",
    VITORIA: "VITORIA",
    ZEINA: "ZEINA",
    ZHIYU: "ZHIYU"
  };
  var NotifyTemplateType = {
    OTP_VERIFICATION: "OTP_VERIFICATION"
  };
  var TemplateVariableSource = {
    CUSTOMER: "CUSTOMER",
    SYSTEM: "SYSTEM"
  };
  var TemplateVariableType = {
    BOOLEAN: "BOOLEAN",
    INTEGER: "INTEGER",
    STRING: "STRING"
  };
  var OptedOutFilterName = {
    END_USER_OPTED_OUT: "end-user-opted-out"
  };
  var Owner = {
    SELF: "SELF",
    SHARED: "SHARED"
  };
  var PhoneNumberFilterName = {
    DELETION_PROTECTION_ENABLED: "deletion-protection-enabled",
    ISO_COUNTRY_CODE: "iso-country-code",
    MESSAGE_TYPE: "message-type",
    NUMBER_CAPABILITY: "number-capability",
    NUMBER_TYPE: "number-type",
    OPT_OUT_LIST_NAME: "opt-out-list-name",
    SELF_MANAGED_OPT_OUTS_ENABLED: "self-managed-opt-outs-enabled",
    STATUS: "status",
    TWO_WAY_CHANNEL_ARN: "two-way-channel-arn",
    TWO_WAY_ENABLED: "two-way-enabled"
  };
  var NumberType = {
    LONG_CODE: "LONG_CODE",
    SHORT_CODE: "SHORT_CODE",
    SIMULATOR: "SIMULATOR",
    TEN_DLC: "TEN_DLC",
    TOLL_FREE: "TOLL_FREE"
  };
  var NumberStatus = {
    ACTIVE: "ACTIVE",
    ASSOCIATING: "ASSOCIATING",
    DELETED: "DELETED",
    DISASSOCIATING: "DISASSOCIATING",
    PENDING: "PENDING"
  };
  var PoolFilterName = {
    DELETION_PROTECTION_ENABLED: "deletion-protection-enabled",
    MESSAGE_TYPE: "message-type",
    OPT_OUT_LIST_NAME: "opt-out-list-name",
    SELF_MANAGED_OPT_OUTS_ENABLED: "self-managed-opt-outs-enabled",
    SHARED_ROUTES_ENABLED: "shared-routes-enabled",
    STATUS: "status",
    TWO_WAY_CHANNEL_ARN: "two-way-channel-arn",
    TWO_WAY_ENABLED: "two-way-enabled"
  };
  var ProtectConfigurationFilterName = {
    ACCOUNT_DEFAULT: "account-default",
    DELETION_PROTECTION_ENABLED: "deletion-protection-enabled"
  };
  var RcsAgentFilterName = {
    DELETION_PROTECTION_ENABLED: "deletion-protection-enabled",
    OPT_OUT_LIST_NAME: "opt-out-list-name",
    SELF_MANAGED_OPT_OUTS_ENABLED: "self-managed-opt-outs-enabled",
    STATUS: "status",
    TWO_WAY_CHANNEL_ARN: "two-way-channel-arn",
    TWO_WAY_ENABLED: "two-way-enabled"
  };
  var TestingAgentStatus = {
    ACTIVE: "ACTIVE",
    CREATED: "CREATED",
    PENDING: "PENDING"
  };
  var RegistrationAttachmentFilterName = {
    ATTACHMENT_STATUS: "attachment-status"
  };
  var FieldRequirement = {
    CONDITIONAL: "CONDITIONAL",
    OPTIONAL: "OPTIONAL",
    REQUIRED: "REQUIRED"
  };
  var FieldType = {
    ATTACHMENT: "ATTACHMENT",
    SELECT: "SELECT",
    TEXT: "TEXT"
  };
  var RegistrationFilterName = {
    REGISTRATION_STATUS: "registration-status",
    REGISTRATION_TYPE: "registration-type"
  };
  var RegistrationTypeFilterName = {
    SUPPORTED_ASSOCIATION_ISO_COUNTRY_CODE: "supported-association-iso-country-code",
    SUPPORTED_ASSOCIATION_RESOURCE_TYPE: "supported-association-resource-type"
  };
  var RegistrationAssociationBehavior = {
    ASSOCIATE_AFTER_COMPLETE: "ASSOCIATE_AFTER_COMPLETE",
    ASSOCIATE_BEFORE_SUBMIT: "ASSOCIATE_BEFORE_SUBMIT",
    ASSOCIATE_ON_APPROVAL: "ASSOCIATE_ON_APPROVAL"
  };
  var RegistrationDisassociationBehavior = {
    DELETE_REGISTRATION_DISASSOCIATES: "DELETE_REGISTRATION_DISASSOCIATES",
    DISASSOCIATE_ALL_ALLOWS_DELETE_REGISTRATION: "DISASSOCIATE_ALL_ALLOWS_DELETE_REGISTRATION",
    DISASSOCIATE_ALL_CLOSES_REGISTRATION: "DISASSOCIATE_ALL_CLOSES_REGISTRATION"
  };
  var RegistrationVersionFilterName = {
    REGISTRATION_VERSION_STATUS: "registration-version-status"
  };
  var SenderIdFilterName = {
    DELETION_PROTECTION_ENABLED: "deletion-protection-enabled",
    ISO_COUNTRY_CODE: "iso-country-code",
    MESSAGE_TYPE: "message-type",
    REGISTERED: "registered",
    SENDER_ID: "sender-id"
  };
  var SpendLimitName = {
    MEDIA_MESSAGE_MONTHLY_SPEND_LIMIT: "MEDIA_MESSAGE_MONTHLY_SPEND_LIMIT",
    NOTIFY_MESSAGE_MONTHLY_SPEND_LIMIT: "NOTIFY_MESSAGE_MONTHLY_SPEND_LIMIT",
    TEXT_MESSAGE_MONTHLY_SPEND_LIMIT: "TEXT_MESSAGE_MONTHLY_SPEND_LIMIT",
    VOICE_MESSAGE_MONTHLY_SPEND_LIMIT: "VOICE_MESSAGE_MONTHLY_SPEND_LIMIT"
  };
  var VerifiedDestinationNumberFilterName = {
    RCS_AGENT_ID: "rcs-agent-id",
    STATUS: "status"
  };
  var DestinationCountryParameterKey = {
    IN_ENTITY_ID: "IN_ENTITY_ID",
    IN_TEMPLATE_ID: "IN_TEMPLATE_ID"
  };
  var ProtectStatus = {
    ALLOW: "ALLOW",
    BLOCK: "BLOCK",
    FILTER: "FILTER",
    MONITOR: "MONITOR"
  };
  var LanguageCode = {
    DE_DE: "DE_DE",
    EN_GB: "EN_GB",
    EN_US: "EN_US",
    ES_419: "ES_419",
    ES_ES: "ES_ES",
    FR_CA: "FR_CA",
    FR_FR: "FR_FR",
    IT_IT: "IT_IT",
    JA_JP: "JA_JP",
    KO_KR: "KO_KR",
    PT_BR: "PT_BR",
    ZH_CN: "ZH_CN",
    ZH_TW: "ZH_TW"
  };
  var PoolOriginationIdentitiesFilterName = {
    ISO_COUNTRY_CODE: "iso-country-code",
    NUMBER_CAPABILITY: "number-capability"
  };
  var ProtectConfigurationRuleSetNumberOverrideFilterName = {
    ACTION: "action",
    CREATED_AFTER: "created-after",
    CREATED_BEFORE: "created-before",
    DESTINATION_PHONE_NUMBER_BEGINS_WITH: "destination-phone-number-begins-with",
    EXPIRES_AFTER: "expires-after",
    EXPIRES_BEFORE: "expires-before",
    ISO_COUNTRY_CODE: "iso-country-code"
  };
  var RegistrationAssociationFilterName = {
    ISO_COUNTRY_CODE: "iso-country-code",
    RESOURCE_TYPE: "resource-type"
  };
  var MessageFeedbackStatus = {
    FAILED: "FAILED",
    RECEIVED: "RECEIVED"
  };
  var RequestableNumberType = {
    LONG_CODE: "LONG_CODE",
    SIMULATOR: "SIMULATOR",
    TEN_DLC: "TEN_DLC",
    TOLL_FREE: "TOLL_FREE"
  };
  var VerificationChannel = {
    TEXT: "TEXT",
    VOICE: "VOICE"
  };
  var VoiceMessageBodyTextType = {
    SSML: "SSML",
    TEXT: "TEXT"
  };
  exports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;
  exports.AccountAttributeName = AccountAttributeName;
  exports.AccountLimitName = AccountLimitName;
  exports.AssociateOriginationIdentityCommand = AssociateOriginationIdentityCommand;
  exports.AssociateProtectConfigurationCommand = AssociateProtectConfigurationCommand;
  exports.AttachmentStatus = AttachmentStatus;
  exports.AttachmentUploadErrorReason = AttachmentUploadErrorReason;
  exports.CarrierLookupCommand = CarrierLookupCommand;
  exports.CarrierStatus = CarrierStatus;
  exports.ConfigurationSetFilterName = ConfigurationSetFilterName;
  exports.ConflictExceptionReason = ConflictExceptionReason;
  exports.CountryLaunchStatus = CountryLaunchStatus;
  exports.CountryLaunchStatusFilterName = CountryLaunchStatusFilterName;
  exports.CreateConfigurationSetCommand = CreateConfigurationSetCommand;
  exports.CreateEventDestinationCommand = CreateEventDestinationCommand;
  exports.CreateNotifyConfigurationCommand = CreateNotifyConfigurationCommand;
  exports.CreateOptOutListCommand = CreateOptOutListCommand;
  exports.CreatePoolCommand = CreatePoolCommand;
  exports.CreateProtectConfigurationCommand = CreateProtectConfigurationCommand;
  exports.CreateRcsAgentCommand = CreateRcsAgentCommand;
  exports.CreateRegistrationAssociationCommand = CreateRegistrationAssociationCommand;
  exports.CreateRegistrationAttachmentCommand = CreateRegistrationAttachmentCommand;
  exports.CreateRegistrationCommand = CreateRegistrationCommand;
  exports.CreateRegistrationVersionCommand = CreateRegistrationVersionCommand;
  exports.CreateVerifiedDestinationNumberCommand = CreateVerifiedDestinationNumberCommand;
  exports.DeleteAccountDefaultProtectConfigurationCommand = DeleteAccountDefaultProtectConfigurationCommand;
  exports.DeleteConfigurationSetCommand = DeleteConfigurationSetCommand;
  exports.DeleteDefaultMessageTypeCommand = DeleteDefaultMessageTypeCommand;
  exports.DeleteDefaultSenderIdCommand = DeleteDefaultSenderIdCommand;
  exports.DeleteEventDestinationCommand = DeleteEventDestinationCommand;
  exports.DeleteKeywordCommand = DeleteKeywordCommand;
  exports.DeleteMediaMessageSpendLimitOverrideCommand = DeleteMediaMessageSpendLimitOverrideCommand;
  exports.DeleteNotifyConfigurationCommand = DeleteNotifyConfigurationCommand;
  exports.DeleteNotifyMessageSpendLimitOverrideCommand = DeleteNotifyMessageSpendLimitOverrideCommand;
  exports.DeleteOptOutListCommand = DeleteOptOutListCommand;
  exports.DeleteOptedOutNumberCommand = DeleteOptedOutNumberCommand;
  exports.DeletePoolCommand = DeletePoolCommand;
  exports.DeleteProtectConfigurationCommand = DeleteProtectConfigurationCommand;
  exports.DeleteProtectConfigurationRuleSetNumberOverrideCommand = DeleteProtectConfigurationRuleSetNumberOverrideCommand;
  exports.DeleteRcsAgentCommand = DeleteRcsAgentCommand;
  exports.DeleteRegistrationAttachmentCommand = DeleteRegistrationAttachmentCommand;
  exports.DeleteRegistrationCommand = DeleteRegistrationCommand;
  exports.DeleteRegistrationFieldValueCommand = DeleteRegistrationFieldValueCommand;
  exports.DeleteResourcePolicyCommand = DeleteResourcePolicyCommand;
  exports.DeleteTextMessageSpendLimitOverrideCommand = DeleteTextMessageSpendLimitOverrideCommand;
  exports.DeleteVerifiedDestinationNumberCommand = DeleteVerifiedDestinationNumberCommand;
  exports.DeleteVoiceMessageSpendLimitOverrideCommand = DeleteVoiceMessageSpendLimitOverrideCommand;
  exports.DescribeAccountAttributesCommand = DescribeAccountAttributesCommand;
  exports.DescribeAccountLimitsCommand = DescribeAccountLimitsCommand;
  exports.DescribeConfigurationSetsCommand = DescribeConfigurationSetsCommand;
  exports.DescribeKeywordsCommand = DescribeKeywordsCommand;
  exports.DescribeNotifyConfigurationsCommand = DescribeNotifyConfigurationsCommand;
  exports.DescribeNotifyTemplatesCommand = DescribeNotifyTemplatesCommand;
  exports.DescribeOptOutListsCommand = DescribeOptOutListsCommand;
  exports.DescribeOptedOutNumbersCommand = DescribeOptedOutNumbersCommand;
  exports.DescribePhoneNumbersCommand = DescribePhoneNumbersCommand;
  exports.DescribePoolsCommand = DescribePoolsCommand;
  exports.DescribeProtectConfigurationsCommand = DescribeProtectConfigurationsCommand;
  exports.DescribeRcsAgentCountryLaunchStatusCommand = DescribeRcsAgentCountryLaunchStatusCommand;
  exports.DescribeRcsAgentsCommand = DescribeRcsAgentsCommand;
  exports.DescribeRegistrationAttachmentsCommand = DescribeRegistrationAttachmentsCommand;
  exports.DescribeRegistrationFieldDefinitionsCommand = DescribeRegistrationFieldDefinitionsCommand;
  exports.DescribeRegistrationFieldValuesCommand = DescribeRegistrationFieldValuesCommand;
  exports.DescribeRegistrationSectionDefinitionsCommand = DescribeRegistrationSectionDefinitionsCommand;
  exports.DescribeRegistrationTypeDefinitionsCommand = DescribeRegistrationTypeDefinitionsCommand;
  exports.DescribeRegistrationVersionsCommand = DescribeRegistrationVersionsCommand;
  exports.DescribeRegistrationsCommand = DescribeRegistrationsCommand;
  exports.DescribeSenderIdsCommand = DescribeSenderIdsCommand;
  exports.DescribeSpendLimitsCommand = DescribeSpendLimitsCommand;
  exports.DescribeVerifiedDestinationNumbersCommand = DescribeVerifiedDestinationNumbersCommand;
  exports.DestinationCountryParameterKey = DestinationCountryParameterKey;
  exports.DisassociateOriginationIdentityCommand = DisassociateOriginationIdentityCommand;
  exports.DisassociateProtectConfigurationCommand = DisassociateProtectConfigurationCommand;
  exports.DiscardRegistrationVersionCommand = DiscardRegistrationVersionCommand;
  exports.EventType = EventType;
  exports.FieldRequirement = FieldRequirement;
  exports.FieldType = FieldType;
  exports.GetProtectConfigurationCountryRuleSetCommand = GetProtectConfigurationCountryRuleSetCommand;
  exports.GetResourcePolicyCommand = GetResourcePolicyCommand;
  exports.KeywordAction = KeywordAction;
  exports.KeywordFilterName = KeywordFilterName;
  exports.LanguageCode = LanguageCode;
  exports.ListNotifyCountriesCommand = ListNotifyCountriesCommand;
  exports.ListPoolOriginationIdentitiesCommand = ListPoolOriginationIdentitiesCommand;
  exports.ListProtectConfigurationRuleSetNumberOverridesCommand = ListProtectConfigurationRuleSetNumberOverridesCommand;
  exports.ListRegistrationAssociationsCommand = ListRegistrationAssociationsCommand;
  exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
  exports.MessageFeedbackStatus = MessageFeedbackStatus;
  exports.MessageType = MessageType;
  exports.NotifyConfigurationFilterName = NotifyConfigurationFilterName;
  exports.NotifyConfigurationStatus = NotifyConfigurationStatus;
  exports.NotifyConfigurationTier = NotifyConfigurationTier;
  exports.NotifyConfigurationUseCase = NotifyConfigurationUseCase;
  exports.NotifyTemplateFilterName = NotifyTemplateFilterName;
  exports.NotifyTemplateStatus = NotifyTemplateStatus;
  exports.NotifyTemplateType = NotifyTemplateType;
  exports.NumberCapability = NumberCapability;
  exports.NumberStatus = NumberStatus;
  exports.NumberType = NumberType;
  exports.OptedOutFilterName = OptedOutFilterName;
  exports.Owner = Owner;
  exports.PhoneNumberFilterName = PhoneNumberFilterName;
  exports.PhoneNumberType = PhoneNumberType;
  exports.PinpointSMSVoiceV2 = PinpointSMSVoiceV2;
  exports.PinpointSMSVoiceV2Client = PinpointSMSVoiceV2Client;
  exports.PoolFilterName = PoolFilterName;
  exports.PoolOriginationIdentitiesFilterName = PoolOriginationIdentitiesFilterName;
  exports.PoolStatus = PoolStatus;
  exports.ProtectConfigurationFilterName = ProtectConfigurationFilterName;
  exports.ProtectConfigurationRuleOverrideAction = ProtectConfigurationRuleOverrideAction;
  exports.ProtectConfigurationRuleSetNumberOverrideFilterName = ProtectConfigurationRuleSetNumberOverrideFilterName;
  exports.ProtectStatus = ProtectStatus;
  exports.PutKeywordCommand = PutKeywordCommand;
  exports.PutMessageFeedbackCommand = PutMessageFeedbackCommand;
  exports.PutOptedOutNumberCommand = PutOptedOutNumberCommand;
  exports.PutProtectConfigurationRuleSetNumberOverrideCommand = PutProtectConfigurationRuleSetNumberOverrideCommand;
  exports.PutRegistrationFieldValueCommand = PutRegistrationFieldValueCommand;
  exports.PutResourcePolicyCommand = PutResourcePolicyCommand;
  exports.RcsAgentFilterName = RcsAgentFilterName;
  exports.RcsAgentStatus = RcsAgentStatus;
  exports.RegistrationAssociationBehavior = RegistrationAssociationBehavior;
  exports.RegistrationAssociationFilterName = RegistrationAssociationFilterName;
  exports.RegistrationAttachmentFilterName = RegistrationAttachmentFilterName;
  exports.RegistrationDisassociationBehavior = RegistrationDisassociationBehavior;
  exports.RegistrationFilterName = RegistrationFilterName;
  exports.RegistrationStatus = RegistrationStatus;
  exports.RegistrationTypeFilterName = RegistrationTypeFilterName;
  exports.RegistrationVersionFilterName = RegistrationVersionFilterName;
  exports.RegistrationVersionStatus = RegistrationVersionStatus;
  exports.ReleasePhoneNumberCommand = ReleasePhoneNumberCommand;
  exports.ReleaseSenderIdCommand = ReleaseSenderIdCommand;
  exports.RequestPhoneNumberCommand = RequestPhoneNumberCommand;
  exports.RequestSenderIdCommand = RequestSenderIdCommand;
  exports.RequestableNumberType = RequestableNumberType;
  exports.ResourceType = ResourceType;
  exports.SendDestinationNumberVerificationCodeCommand = SendDestinationNumberVerificationCodeCommand;
  exports.SendMediaMessageCommand = SendMediaMessageCommand;
  exports.SendNotifyTextMessageCommand = SendNotifyTextMessageCommand;
  exports.SendNotifyVoiceMessageCommand = SendNotifyVoiceMessageCommand;
  exports.SendTextMessageCommand = SendTextMessageCommand;
  exports.SendVoiceMessageCommand = SendVoiceMessageCommand;
  exports.SenderIdFilterName = SenderIdFilterName;
  exports.ServiceQuotaExceededExceptionReason = ServiceQuotaExceededExceptionReason;
  exports.SetAccountDefaultProtectConfigurationCommand = SetAccountDefaultProtectConfigurationCommand;
  exports.SetDefaultMessageFeedbackEnabledCommand = SetDefaultMessageFeedbackEnabledCommand;
  exports.SetDefaultMessageTypeCommand = SetDefaultMessageTypeCommand;
  exports.SetDefaultSenderIdCommand = SetDefaultSenderIdCommand;
  exports.SetMediaMessageSpendLimitOverrideCommand = SetMediaMessageSpendLimitOverrideCommand;
  exports.SetNotifyMessageSpendLimitOverrideCommand = SetNotifyMessageSpendLimitOverrideCommand;
  exports.SetTextMessageSpendLimitOverrideCommand = SetTextMessageSpendLimitOverrideCommand;
  exports.SetVoiceMessageSpendLimitOverrideCommand = SetVoiceMessageSpendLimitOverrideCommand;
  exports.SpendLimitName = SpendLimitName;
  exports.SubmitRegistrationVersionCommand = SubmitRegistrationVersionCommand;
  exports.TagResourceCommand = TagResourceCommand;
  exports.TemplateVariableSource = TemplateVariableSource;
  exports.TemplateVariableType = TemplateVariableType;
  exports.TestingAgentStatus = TestingAgentStatus;
  exports.TierUpgradeStatus = TierUpgradeStatus;
  exports.UntagResourceCommand = UntagResourceCommand;
  exports.UpdateEventDestinationCommand = UpdateEventDestinationCommand;
  exports.UpdateNotifyConfigurationCommand = UpdateNotifyConfigurationCommand;
  exports.UpdatePhoneNumberCommand = UpdatePhoneNumberCommand;
  exports.UpdatePoolCommand = UpdatePoolCommand;
  exports.UpdateProtectConfigurationCommand = UpdateProtectConfigurationCommand;
  exports.UpdateProtectConfigurationCountryRuleSetCommand = UpdateProtectConfigurationCountryRuleSetCommand;
  exports.UpdateRcsAgentCommand = UpdateRcsAgentCommand;
  exports.UpdateSenderIdCommand = UpdateSenderIdCommand;
  exports.ValidationExceptionReason = ValidationExceptionReason;
  exports.VerificationChannel = VerificationChannel;
  exports.VerificationStatus = VerificationStatus;
  exports.VerifiedDestinationNumberFilterName = VerifiedDestinationNumberFilterName;
  exports.VerifyDestinationNumberCommand = VerifyDestinationNumberCommand;
  exports.VoiceId = VoiceId;
  exports.VoiceMessageBodyTextType = VoiceMessageBodyTextType;
  exports.paginateDescribeAccountAttributes = paginateDescribeAccountAttributes;
  exports.paginateDescribeAccountLimits = paginateDescribeAccountLimits;
  exports.paginateDescribeConfigurationSets = paginateDescribeConfigurationSets;
  exports.paginateDescribeKeywords = paginateDescribeKeywords;
  exports.paginateDescribeNotifyConfigurations = paginateDescribeNotifyConfigurations;
  exports.paginateDescribeNotifyTemplates = paginateDescribeNotifyTemplates;
  exports.paginateDescribeOptOutLists = paginateDescribeOptOutLists;
  exports.paginateDescribeOptedOutNumbers = paginateDescribeOptedOutNumbers;
  exports.paginateDescribePhoneNumbers = paginateDescribePhoneNumbers;
  exports.paginateDescribePools = paginateDescribePools;
  exports.paginateDescribeProtectConfigurations = paginateDescribeProtectConfigurations;
  exports.paginateDescribeRcsAgentCountryLaunchStatus = paginateDescribeRcsAgentCountryLaunchStatus;
  exports.paginateDescribeRcsAgents = paginateDescribeRcsAgents;
  exports.paginateDescribeRegistrationAttachments = paginateDescribeRegistrationAttachments;
  exports.paginateDescribeRegistrationFieldDefinitions = paginateDescribeRegistrationFieldDefinitions;
  exports.paginateDescribeRegistrationFieldValues = paginateDescribeRegistrationFieldValues;
  exports.paginateDescribeRegistrationSectionDefinitions = paginateDescribeRegistrationSectionDefinitions;
  exports.paginateDescribeRegistrationTypeDefinitions = paginateDescribeRegistrationTypeDefinitions;
  exports.paginateDescribeRegistrationVersions = paginateDescribeRegistrationVersions;
  exports.paginateDescribeRegistrations = paginateDescribeRegistrations;
  exports.paginateDescribeSenderIds = paginateDescribeSenderIds;
  exports.paginateDescribeSpendLimits = paginateDescribeSpendLimits;
  exports.paginateDescribeVerifiedDestinationNumbers = paginateDescribeVerifiedDestinationNumbers;
  exports.paginateListNotifyCountries = paginateListNotifyCountries;
  exports.paginateListPoolOriginationIdentities = paginateListPoolOriginationIdentities;
  exports.paginateListProtectConfigurationRuleSetNumberOverrides = paginateListProtectConfigurationRuleSetNumberOverrides;
  exports.paginateListRegistrationAssociations = paginateListRegistrationAssociations;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/endpoint/bdd.js
var require_bdd4 = __commonJS((exports) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var m2 = "ref";
  var a = -1;
  var b2 = true;
  var c = "isSet";
  var d2 = "PartitionResult";
  var e = "booleanEquals";
  var f2 = "getAttr";
  var g2 = { [m2]: "EndpointId" };
  var h2 = { [m2]: "Endpoint" };
  var i = { [m2]: d2 };
  var j = { authSchemes: [{ name: "sigv4a", signingName: "ses", signingRegionSet: ["*"] }] };
  var k2 = {};
  var l = [{ [m2]: "Region" }];
  var _data = {
    conditions: [
      [c, l],
      ["aws.partition", l, d2],
      [c, [g2]],
      ["isValidHostLabel", [g2, b2]],
      [c, [h2]],
      [e, [{ [m2]: "UseFIPS" }, b2]],
      [e, [{ [m2]: "UseDualStack" }, b2]],
      [e, [{ fn: f2, argv: [i, "supportsDualStack"] }, b2]],
      [e, [{ fn: f2, argv: [i, "supportsFIPS"] }, b2]]
    ],
    results: [
      [a],
      [h2, j],
      ["https://{EndpointId}.endpoints.email.global.{PartitionResult#dualStackDnsSuffix}", j],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://{EndpointId}.endpoints.email.{PartitionResult#dnsSuffix}", j],
      [a, "Invalid Configuration: FIPS is not supported with multi-region endpoints"],
      [a, "EndpointId must be a valid host label"],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [h2, k2],
      ["https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k2],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://email-fips.{Region}.{PartitionResult#dnsSuffix}", k2],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://email.{Region}.{PartitionResult#dualStackDnsSuffix}", k2],
      ["https://email.{Region}.{PartitionResult#dnsSuffix}", k2],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    3,
    4,
    1,
    5,
    4,
    4,
    14,
    r + 16,
    2,
    16,
    6,
    4,
    14,
    7,
    5,
    10,
    8,
    6,
    9,
    r + 15,
    7,
    r + 14,
    r + 3,
    6,
    12,
    11,
    8,
    r + 12,
    r + 13,
    7,
    13,
    r + 11,
    8,
    r + 10,
    r + 11,
    5,
    r + 7,
    15,
    6,
    r + 8,
    r + 9,
    3,
    17,
    r + 6,
    4,
    21,
    18,
    5,
    r + 5,
    19,
    6,
    20,
    r + 4,
    7,
    r + 2,
    r + 3,
    5,
    r + 5,
    r + 1
  ]);
  exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver4 = __commonJS((exports) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd4();
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "EndpointId", "Region", "UseDualStack", "UseFIPS"]
  });
  exports.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider4 = __commonJS((exports) => {
  var { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { SignatureV4MultiRegion } = require_dist_cjs15();
  var { getSmithyContext, normalizeProvider } = require_client3();
  var { resolveParams } = require_endpoints();
  var { defaultEndpointResolver } = require_endpointResolver4();
  var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context10, input) => {
    if (!input) {
      throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
    }
    const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context10, input);
    const instructionsFn = getSmithyContext(context10)?.commandInstance?.constructor?.getEndpointParameterInstructions;
    if (!instructionsFn) {
      throw new Error(`getEndpointParameterInstructions() is not defined on '${context10.commandName}'`);
    }
    const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
    return Object.assign(defaultParameters, endpointParameters);
  };
  var _defaultSESv2HttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  exports.defaultSESv2HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSESv2HttpAuthSchemeParametersProvider);
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "ses",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createAwsAuthSigv4aHttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4a",
      signingProperties: {
        name: "ses",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  var createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver2, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
    const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
      const endpoint = defaultEndpointResolver2(authParameters);
      const authSchemes = endpoint.properties?.authSchemes;
      if (!authSchemes) {
        return defaultHttpAuthSchemeResolver(authParameters);
      }
      const options = [];
      for (const scheme of authSchemes) {
        const { name: resolvedName, properties = {}, ...rest } = scheme;
        const name = resolvedName.toLowerCase();
        if (resolvedName !== name) {
          console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
        }
        let schemeId;
        if (name === "sigv4a") {
          schemeId = "aws.auth#sigv4a";
          const sigv4Present = authSchemes.find((s) => {
            const name2 = s.name.toLowerCase();
            return name2 !== "sigv4a" && name2.startsWith("sigv4");
          });
          if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
            continue;
          }
        } else if (name.startsWith("sigv4")) {
          schemeId = "aws.auth#sigv4";
        } else {
          throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
        }
        const createOption = createHttpAuthOptionFunctions[schemeId];
        if (!createOption) {
          throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
        }
        const option = createOption(authParameters);
        option.schemeId = schemeId;
        option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties };
        options.push(option);
      }
      return options;
    };
    return endpointRuleSetHttpAuthSchemeProvider;
  };
  var _defaultSESv2HttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
        options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
      }
    }
    return options;
  };
  exports.defaultSESv2HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSESv2HttpAuthSchemeProvider, {
    "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
    "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption
  });
  exports.resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    const config_1 = resolveAwsSdkSigV4AConfig(config_0);
    return Object.assign(config_1, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/package.json
var require_package5 = __commonJS((exports, module) => {
  module.exports = {
    name: "@aws-sdk/client-sesv2",
    description: "AWS SDK for JavaScript Sesv2 Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/signature-v4-multi-region": "^3.996.35",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sesv2",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-sesv2"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/models/SESv2ServiceException.js
var require_SESv2ServiceException = __commonJS((exports) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports.__ServiceException = __ServiceException;
  exports.SESv2ServiceException = class SESv2ServiceException extends __ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, SESv2ServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/models/errors.js
var require_errors4 = __commonJS((exports) => {
  var { SESv2ServiceException: __BaseException } = require_SESv2ServiceException();
  exports.AccountSuspendedException = class AccountSuspendedException extends __BaseException {
    name = "AccountSuspendedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "AccountSuspendedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AccountSuspendedException.prototype);
    }
  };
  exports.AlreadyExistsException = class AlreadyExistsException extends __BaseException {
    name = "AlreadyExistsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "AlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AlreadyExistsException.prototype);
    }
  };
  exports.BadRequestException = class BadRequestException extends __BaseException {
    name = "BadRequestException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "BadRequestException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, BadRequestException.prototype);
    }
  };
  exports.InternalServiceErrorException = class InternalServiceErrorException extends __BaseException {
    name = "InternalServiceErrorException";
    $fault = "server";
    constructor(opts) {
      super({
        name: "InternalServiceErrorException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InternalServiceErrorException.prototype);
    }
  };
  exports.NotFoundException = class NotFoundException extends __BaseException {
    name = "NotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "NotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, NotFoundException.prototype);
    }
  };
  exports.TooManyRequestsException = class TooManyRequestsException extends __BaseException {
    name = "TooManyRequestsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TooManyRequestsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TooManyRequestsException.prototype);
    }
  };
  exports.ConcurrentModificationException = class ConcurrentModificationException extends __BaseException {
    name = "ConcurrentModificationException";
    $fault = "server";
    constructor(opts) {
      super({
        name: "ConcurrentModificationException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
    }
  };
  exports.ConflictException = class ConflictException extends __BaseException {
    name = "ConflictException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ConflictException.prototype);
    }
  };
  exports.LimitExceededException = class LimitExceededException extends __BaseException {
    name = "LimitExceededException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "LimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, LimitExceededException.prototype);
    }
  };
  exports.MailFromDomainNotVerifiedException = class MailFromDomainNotVerifiedException extends __BaseException {
    name = "MailFromDomainNotVerifiedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MailFromDomainNotVerifiedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MailFromDomainNotVerifiedException.prototype);
    }
  };
  exports.MessageRejected = class MessageRejected extends __BaseException {
    name = "MessageRejected";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MessageRejected",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MessageRejected.prototype);
    }
  };
  exports.SendingPausedException = class SendingPausedException extends __BaseException {
    name = "SendingPausedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "SendingPausedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SendingPausedException.prototype);
    }
  };
  exports.InvalidNextTokenException = class InvalidNextTokenException extends __BaseException {
    name = "InvalidNextTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidNextTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/schemas/schemas_0.js
var require_schemas_04 = __commonJS((exports) => {
  var _A = "Attachment";
  var _AA = "ArchiveArn";
  var _AAp = "ApplicationArn";
  var _ACEA = "AdditionalContactEmailAddress";
  var _ACEAd = "AdditionalContactEmailAddresses";
  var _AD = "AccountDetails";
  var _ADt = "AttributesData";
  var _AE = "AdminEmail";
  var _AEE = "AlreadyExistsException";
  var _AL = "AttachmentList";
  var _AO = "ArchivingOptions";
  var _AS = "AccountStatus";
  var _ASD = "ActiveSubscribedDomains";
  var _ASE = "AccountSuspendedException";
  var _ASMS = "AwsSesManagedStatus";
  var _AT = "AssociatedTimestamp";
  var _AWE = "AutoWarmupEnabled";
  var _Ag = "Aggregation";
  var _At = "Attachments";
  var _Att = "Attributes";
  var _B = "Body";
  var _BA = "BccAddresses";
  var _BE = "BlacklistEntry";
  var _BEC = "BulkEmailContent";
  var _BEE = "BulkEmailEntry";
  var _BEEL = "BulkEmailEntryList";
  var _BEER = "BulkEmailEntryResult";
  var _BEERL = "BulkEmailEntryResultList";
  var _BEERu = "BulkEmailEntryResults";
  var _BEEu = "BulkEmailEntries";
  var _BEl = "BlacklistEntries";
  var _BGMD = "BatchGetMetricData";
  var _BGMDQ = "BatchGetMetricDataQuery";
  var _BGMDQa = "BatchGetMetricDataQueries";
  var _BGMDR = "BatchGetMetricDataRequest";
  var _BGMDRa = "BatchGetMetricDataResponse";
  var _BIN = "BlacklistItemNames";
  var _BOMF = "BehaviorOnMxFailure";
  var _BR = "BlacklistReport";
  var _BRE = "BadRequestException";
  var _BST = "BounceSubType";
  var _BT = "BounceType";
  var _Bo = "Bounce";
  var _C = "Complaint";
  var _CA = "CcAddresses";
  var _CC = "CreateContact";
  var _CCL = "CreateContactList";
  var _CCLR = "CreateContactListRequest";
  var _CCLRr = "CreateContactListResponse";
  var _CCR = "CreateContactRequest";
  var _CCRr = "CreateContactResponse";
  var _CCS = "CreateConfigurationSet";
  var _CCSED = "CreateConfigurationSetEventDestination";
  var _CCSEDR = "CreateConfigurationSetEventDestinationRequest";
  var _CCSEDRr = "CreateConfigurationSetEventDestinationResponse";
  var _CCSR = "CreateConfigurationSetRequest";
  var _CCSRr = "CreateConfigurationSetResponse";
  var _CCVET = "CreateCustomVerificationEmailTemplate";
  var _CCVETR = "CreateCustomVerificationEmailTemplateRequest";
  var _CCVETRr = "CreateCustomVerificationEmailTemplateResponse";
  var _CD = "ContentDisposition";
  var _CDIP = "CreateDedicatedIpPool";
  var _CDIPR = "CreateDedicatedIpPoolRequest";
  var _CDIPRr = "CreateDedicatedIpPoolResponse";
  var _CDTR = "CreateDeliverabilityTestReport";
  var _CDTRR = "CreateDeliverabilityTestReportRequest";
  var _CDTRRr = "CreateDeliverabilityTestReportResponse";
  var _CDo = "ContentDescription";
  var _CDr = "CreateDate";
  var _CE = "ConflictException";
  var _CEI = "CreateEmailIdentity";
  var _CEIP = "CreateEmailIdentityPolicy";
  var _CEIPR = "CreateEmailIdentityPolicyRequest";
  var _CEIPRr = "CreateEmailIdentityPolicyResponse";
  var _CEIR = "CreateEmailIdentityRequest";
  var _CEIRr = "CreateEmailIdentityResponse";
  var _CEJ = "CancelExportJob";
  var _CEJR = "CancelExportJobRequest";
  var _CEJRa = "CancelExportJobResponse";
  var _CEJRr = "CreateExportJobRequest";
  var _CEJRre = "CreateExportJobResponse";
  var _CEJr = "CreateExportJob";
  var _CET = "CreateEmailTemplate";
  var _CETR = "CreateEmailTemplateRequest";
  var _CETRr = "CreateEmailTemplateResponse";
  var _CFT = "ComplaintFeedbackType";
  var _CI = "ContentId";
  var _CIJ = "CreateImportJob";
  var _CIJR = "CreateImportJobRequest";
  var _CIJRr = "CreateImportJobResponse";
  var _CIa = "CampaignId";
  var _CIas = "CaseId";
  var _CL = "ContactLanguage";
  var _CLD = "ContactListDestination";
  var _CLIA = "ContactListImportAction";
  var _CLN = "ContactListName";
  var _CLo = "ContactList";
  var _CLon = "ContactLists";
  var _CME = "ConcurrentModificationException";
  var _CMRE = "CreateMultiRegionEndpoint";
  var _CMRER = "CreateMultiRegionEndpointRequest";
  var _CMRERr = "CreateMultiRegionEndpointResponse";
  var _CMS = "CustomerManagedStatus";
  var _CRD = "CustomRedirectDomain";
  var _CS = "ConfigurationSets";
  var _CSKL = "CurrentSigningKeyLength";
  var _CSN = "ConfigurationSetName";
  var _CST = "ComplaintSubType";
  var _CT = "ContentType";
  var _CTE = "ContentTransferEncoding";
  var _CTEo = "ConditionThresholdEnabled";
  var _CTR = "CreateTenantRequest";
  var _CTRA = "CreateTenantResourceAssociation";
  var _CTRAR = "CreateTenantResourceAssociationRequest";
  var _CTRARr = "CreateTenantResourceAssociationResponse";
  var _CTRr = "CreateTenantResponse";
  var _CTo = "CompletedTimestamp";
  var _CTon = "ConditionThreshold";
  var _CTr = "CreatedTimestamp";
  var _CTre = "CreateTenant";
  var _CV = "ConfidenceVerdict";
  var _CVET = "CustomVerificationEmailTemplates";
  var _CVETL = "CustomVerificationEmailTemplatesList";
  var _CVETM = "CustomVerificationEmailTemplateMetadata";
  var _CVT = "ConfidenceVerdictThreshold";
  var _CWD = "CloudWatchDestination";
  var _CWDC = "CloudWatchDimensionConfiguration";
  var _CWDCl = "CloudWatchDimensionConfigurations";
  var _Ca = "Cause";
  var _Ch = "Charset";
  var _Co = "Contact";
  var _Cod = "Code";
  var _Con = "Content";
  var _Cont = "Contacts";
  var _D = "Dimensions";
  var _DA = "DkimAttributes";
  var _DAa = "DashboardAttributes";
  var _DC = "DiagnosticCode";
  var _DCL = "DeleteContactList";
  var _DCLR = "DeleteContactListRequest";
  var _DCLRe = "DeleteContactListResponse";
  var _DCR = "DeleteContactRequest";
  var _DCRe = "DeleteContactResponse";
  var _DCS = "DeleteConfigurationSet";
  var _DCSED = "DeleteConfigurationSetEventDestination";
  var _DCSEDR = "DeleteConfigurationSetEventDestinationRequest";
  var _DCSEDRe = "DeleteConfigurationSetEventDestinationResponse";
  var _DCSR = "DeleteConfigurationSetRequest";
  var _DCSRe = "DeleteConfigurationSetResponse";
  var _DCVET = "DeleteCustomVerificationEmailTemplate";
  var _DCVETR = "DeleteCustomVerificationEmailTemplateRequest";
  var _DCVETRe = "DeleteCustomVerificationEmailTemplateResponse";
  var _DCe = "DefaultContent";
  var _DCel = "DeleteContact";
  var _DCi = "DimensionConfigurations";
  var _DDC = "DomainDeliverabilityCampaign";
  var _DDCL = "DomainDeliverabilityCampaignList";
  var _DDCo = "DomainDeliverabilityCampaigns";
  var _DDIP = "DeleteDedicatedIpPool";
  var _DDIPR = "DeleteDedicatedIpPoolRequest";
  var _DDIPRe = "DeleteDedicatedIpPoolResponse";
  var _DDTO = "DomainDeliverabilityTrackingOption";
  var _DDTOo = "DomainDeliverabilityTrackingOptions";
  var _DDV = "DefaultDimensionValue";
  var _DE = "DashboardEnabled";
  var _DEI = "DeleteEmailIdentity";
  var _DEIP = "DeleteEmailIdentityPolicy";
  var _DEIPR = "DeleteEmailIdentityPolicyRequest";
  var _DEIPRe = "DeleteEmailIdentityPolicyResponse";
  var _DEIR = "DeleteEmailIdentityRequest";
  var _DEIRe = "DeleteEmailIdentityResponse";
  var _DET = "DefaultEmailTags";
  var _DETR = "DeleteEmailTemplateRequest";
  var _DETRe = "DeleteEmailTemplateResponse";
  var _DETe = "DeleteEmailTemplate";
  var _DF = "DataFormat";
  var _DI = "DedicatedIp";
  var _DIAWE = "DedicatedIpAutoWarmupEnabled";
  var _DIL = "DedicatedIpList";
  var _DIP = "DomainIspPlacements";
  var _DIPe = "DedicatedIpPool";
  var _DIPed = "DedicatedIpPools";
  var _DIPo = "DomainIspPlacement";
  var _DIe = "DedicatedIps";
  var _DMRE = "DeleteMultiRegionEndpoint";
  var _DMRER = "DeleteMultiRegionEndpointRequest";
  var _DMRERe = "DeleteMultiRegionEndpointResponse";
  var _DN = "DimensionName";
  var _DNi = "DisplayName";
  var _DO = "DeliveryOptions";
  var _DOa = "DashboardOptions";
  var _DP = "DkimPercentage";
  var _DPN = "DestinationPoolName";
  var _DR = "DeleteRate";
  var _DS = "DkimStatus";
  var _DSA = "DkimSigningAttributes";
  var _DSAO = "DomainSigningAttributesOrigin";
  var _DSAe = "DeliveryStreamArn";
  var _DSD = "DeleteSuppressedDestination";
  var _DSDR = "DeleteSuppressedDestinationRequest";
  var _DSDRe = "DeleteSuppressedDestinationResponse";
  var _DSPK = "DomainSigningPrivateKey";
  var _DSS = "DomainSigningSelector";
  var _DSSe = "DefaultSubscriptionStatus";
  var _DT = "DkimTokens";
  var _DTR = "DeleteTenantRequest";
  var _DTRA = "DeleteTenantResourceAssociation";
  var _DTRAR = "DeleteTenantResourceAssociationRequest";
  var _DTRARe = "DeleteTenantResourceAssociationResponse";
  var _DTRe = "DeleteTenantResponse";
  var _DTRel = "DeliverabilityTestReport";
  var _DTReli = "DeliverabilityTestReports";
  var _DTS = "DeliverabilityTestStatus";
  var _DTe = "DeleteTenant";
  var _DV = "DailyVolume";
  var _DVS = "DimensionValueSource";
  var _DVa = "DailyVolumes";
  var _Da = "Data";
  var _De = "Description";
  var _Des = "Destination";
  var _Det = "Details";
  var _Do = "Domain";
  var _E = "Errors";
  var _EA = "EmailAddress";
  var _EAFL = "EmailAddressFilterList";
  var _EAIME = "EmailAddressInsightsMailboxEvaluations";
  var _EAIV = "EmailAddressInsightsVerdict";
  var _EBA = "EventBusArn";
  var _EBD = "EventBridgeDestination";
  var _EC = "EmailContent";
  var _ED = "EndDate";
  var _EDD = "EventDestinationDefinition";
  var _EDN = "EventDestinationName";
  var _EDS = "ExportDataSource";
  var _EDv = "EventDestination";
  var _EDve = "EventDetails";
  var _EDven = "EventDestinations";
  var _EDx = "ExportDestination";
  var _EDxp = "ExportDimensions";
  var _EFE = "EmailForwardingEnabled";
  var _EI = "EmailIdentity";
  var _EIL = "EmailInsightsList";
  var _EIm = "EmailInsights";
  var _EIma = "EmailIdentities";
  var _EIn = "EndpointId";
  var _EJ = "ExportJobs";
  var _EJS = "ExportJobSummary";
  var _EJSL = "ExportJobSummaryList";
  var _EM = "EngagementMetrics";
  var _EMr = "ErrorMessage";
  var _EMx = "ExportMetric";
  var _EMxp = "ExportMetrics";
  var _EN = "EndpointName";
  var _ERC = "ExportedRecordsCount";
  var _ES = "EmailSubject";
  var _ESFL = "EmailSubjectFilterList";
  var _EST = "ExportSourceType";
  var _ESn = "EnforcementStatus";
  var _ESx = "ExportStatistics";
  var _ET = "EmailTags";
  var _ETC = "EmailTemplateContent";
  var _ETM = "EmailTemplateMetadata";
  var _ETML = "EmailTemplateMetadataList";
  var _ETr = "ErrorType";
  var _En = "Enabled";
  var _Er = "Error";
  var _Es = "Esps";
  var _Ev = "Events";
  var _Eva = "Evaluations";
  var _Ex = "Exclude";
  var _F = "Filter";
  var _FA = "FromAddress";
  var _FEA = "FromEmailAddress";
  var _FEAIA = "FromEmailAddressIdentityArn";
  var _FFEA = "FeedbackForwardingEmailAddress";
  var _FFEAIA = "FeedbackForwardingEmailAddressIdentityArn";
  var _FFS = "FeedbackForwardingStatus";
  var _FI = "FailureInfo";
  var _FIe = "FeedbackId";
  var _FN = "FileName";
  var _FRC = "FailedRecordsCount";
  var _FRSU = "FailedRecordsS3Url";
  var _FRURL = "FailureRedirectionURL";
  var _FS = "FilteredStatus";
  var _FSDT = "FirstSeenDateTime";
  var _G = "Global";
  var _GA = "GuardianAttributes";
  var _GAR = "GetAccountRequest";
  var _GARe = "GetAccountResponse";
  var _GAe = "GetAccount";
  var _GBR = "GetBlacklistReports";
  var _GBRR = "GetBlacklistReportsRequest";
  var _GBRRe = "GetBlacklistReportsResponse";
  var _GC = "GetContact";
  var _GCL = "GetContactList";
  var _GCLR = "GetContactListRequest";
  var _GCLRe = "GetContactListResponse";
  var _GCR = "GetContactRequest";
  var _GCRe = "GetContactResponse";
  var _GCS = "GetConfigurationSet";
  var _GCSED = "GetConfigurationSetEventDestinations";
  var _GCSEDR = "GetConfigurationSetEventDestinationsRequest";
  var _GCSEDRe = "GetConfigurationSetEventDestinationsResponse";
  var _GCSR = "GetConfigurationSetRequest";
  var _GCSRe = "GetConfigurationSetResponse";
  var _GCVET = "GetCustomVerificationEmailTemplate";
  var _GCVETR = "GetCustomVerificationEmailTemplateRequest";
  var _GCVETRe = "GetCustomVerificationEmailTemplateResponse";
  var _GDDC = "GetDomainDeliverabilityCampaign";
  var _GDDCR = "GetDomainDeliverabilityCampaignRequest";
  var _GDDCRe = "GetDomainDeliverabilityCampaignResponse";
  var _GDDO = "GetDeliverabilityDashboardOptions";
  var _GDDOR = "GetDeliverabilityDashboardOptionsRequest";
  var _GDDORe = "GetDeliverabilityDashboardOptionsResponse";
  var _GDI = "GetDedicatedIp";
  var _GDIP = "GetDedicatedIpPool";
  var _GDIPR = "GetDedicatedIpPoolRequest";
  var _GDIPRe = "GetDedicatedIpPoolResponse";
  var _GDIR = "GetDedicatedIpRequest";
  var _GDIRe = "GetDedicatedIpResponse";
  var _GDIRet = "GetDedicatedIpsRequest";
  var _GDIRete = "GetDedicatedIpsResponse";
  var _GDIe = "GetDedicatedIps";
  var _GDSR = "GetDomainStatisticsReport";
  var _GDSRR = "GetDomainStatisticsReportRequest";
  var _GDSRRe = "GetDomainStatisticsReportResponse";
  var _GDTR = "GetDeliverabilityTestReport";
  var _GDTRR = "GetDeliverabilityTestReportRequest";
  var _GDTRRe = "GetDeliverabilityTestReportResponse";
  var _GEAI = "GetEmailAddressInsights";
  var _GEAIR = "GetEmailAddressInsightsRequest";
  var _GEAIRe = "GetEmailAddressInsightsResponse";
  var _GEI = "GetEmailIdentity";
  var _GEIP = "GetEmailIdentityPolicies";
  var _GEIPR = "GetEmailIdentityPoliciesRequest";
  var _GEIPRe = "GetEmailIdentityPoliciesResponse";
  var _GEIR = "GetEmailIdentityRequest";
  var _GEIRe = "GetEmailIdentityResponse";
  var _GEJ = "GetExportJob";
  var _GEJR = "GetExportJobRequest";
  var _GEJRe = "GetExportJobResponse";
  var _GET = "GetEmailTemplate";
  var _GETR = "GetEmailTemplateRequest";
  var _GETRe = "GetEmailTemplateResponse";
  var _GIJ = "GetImportJob";
  var _GIJR = "GetImportJobRequest";
  var _GIJRe = "GetImportJobResponse";
  var _GMI = "GetMessageInsights";
  var _GMIR = "GetMessageInsightsRequest";
  var _GMIRe = "GetMessageInsightsResponse";
  var _GMRE = "GetMultiRegionEndpoint";
  var _GMRER = "GetMultiRegionEndpointRequest";
  var _GMRERe = "GetMultiRegionEndpointResponse";
  var _GO = "GuardianOptions";
  var _GRE = "GetReputationEntity";
  var _GRER = "GetReputationEntityRequest";
  var _GRERe = "GetReputationEntityResponse";
  var _GSD = "GetSuppressedDestination";
  var _GSDR = "GetSuppressedDestinationRequest";
  var _GSDRe = "GetSuppressedDestinationResponse";
  var _GT = "GetTenant";
  var _GTR = "GetTenantRequest";
  var _GTRe = "GetTenantResponse";
  var _H = "Html";
  var _HP = "HttpsPolicy";
  var _HVDR = "HasValidDnsRecords";
  var _HVS = "HasValidSyntax";
  var _He = "Headers";
  var _I = "Id";
  var _IC = "InboxCount";
  var _ID = "ImportDestination";
  var _IDS = "ImportDataSource";
  var _IDT = "ImportDestinationType";
  var _IDs = "IsDisposable";
  var _IE = "InsightsEvent";
  var _IEA = "InsightsEmailAddress";
  var _IEn = "InsightsEvents";
  var _II = "IdentityInfo";
  var _IIL = "IdentityInfoList";
  var _IJ = "ImportJobs";
  var _IJS = "ImportJobSummary";
  var _IJSL = "ImportJobSummaryList";
  var _IN = "IspName";
  var _INTE = "InvalidNextTokenException";
  var _INd = "IdentityName";
  var _IP = "InboxPercentage";
  var _IPTO = "InboxPlacementTrackingOption";
  var _IPs = "IspPlacements";
  var _IPsp = "IspPlacement";
  var _IRA = "IsRoleAddress";
  var _IRAa = "IamRoleArn";
  var _IRC = "InboxRawCount";
  var _IRI = "IsRandomInput";
  var _ISEE = "InternalServiceErrorException";
  var _IT = "IdentityType";
  var _IU = "ImageUrl";
  var _IV = "IsValid";
  var _Im = "Impact";
  var _In = "Insights";
  var _Inc = "Include";
  var _Ip = "Ip";
  var _Is = "Isp";
  var _JI = "JobId";
  var _JS = "JobStatus";
  var _K = "Key";
  var _KFD = "KinesisFirehoseDestination";
  var _LC = "ListContacts";
  var _LCF = "ListContactsFilter";
  var _LCL = "ListContactLists";
  var _LCLR = "ListContactListsRequest";
  var _LCLRi = "ListContactListsResponse";
  var _LCR = "ListContactsRequest";
  var _LCRi = "ListContactsResponse";
  var _LCS = "ListConfigurationSets";
  var _LCSR = "ListConfigurationSetsRequest";
  var _LCSRi = "ListConfigurationSetsResponse";
  var _LCT = "LastCheckedTimestamp";
  var _LCVET = "ListCustomVerificationEmailTemplates";
  var _LCVETR = "ListCustomVerificationEmailTemplatesRequest";
  var _LCVETRi = "ListCustomVerificationEmailTemplatesResponse";
  var _LDDC = "ListDomainDeliverabilityCampaigns";
  var _LDDCR = "ListDomainDeliverabilityCampaignsRequest";
  var _LDDCRi = "ListDomainDeliverabilityCampaignsResponse";
  var _LDE = "LastDeliveryEvent";
  var _LDIP = "ListDedicatedIpPools";
  var _LDIPR = "ListDedicatedIpPoolsRequest";
  var _LDIPRi = "ListDedicatedIpPoolsResponse";
  var _LDTR = "ListDeliverabilityTestReports";
  var _LDTRR = "ListDeliverabilityTestReportsRequest";
  var _LDTRRi = "ListDeliverabilityTestReportsResponse";
  var _LEE = "LimitExceededException";
  var _LEEa = "LastEngagementEvent";
  var _LEI = "ListEmailIdentities";
  var _LEIR = "ListEmailIdentitiesRequest";
  var _LEIRi = "ListEmailIdentitiesResponse";
  var _LEJ = "ListExportJobs";
  var _LEJR = "ListExportJobsRequest";
  var _LEJRi = "ListExportJobsResponse";
  var _LET = "ListEmailTemplates";
  var _LETR = "ListEmailTemplatesRequest";
  var _LETRi = "ListEmailTemplatesResponse";
  var _LFS = "LastFreshStart";
  var _LIJ = "ListImportJobs";
  var _LIJR = "ListImportJobsRequest";
  var _LIJRi = "ListImportJobsResponse";
  var _LKGT = "LastKeyGenerationTimestamp";
  var _LMO = "ListManagementOptions";
  var _LMRE = "ListMultiRegionEndpoints";
  var _LMRER = "ListMultiRegionEndpointsRequest";
  var _LMRERi = "ListMultiRegionEndpointsResponse";
  var _LOC = "ListOfContacts";
  var _LOCL = "ListOfContactLists";
  var _LR = "ListRecommendations";
  var _LRE = "ListReputationEntities";
  var _LRER = "ListReputationEntitiesRequest";
  var _LRERi = "ListReputationEntitiesResponse";
  var _LRR = "ListRecommendationsRequest";
  var _LRRi = "ListRecommendationsResponse";
  var _LRT = "ListResourceTenants";
  var _LRTR = "ListResourceTenantsRequest";
  var _LRTRi = "ListResourceTenantsResponse";
  var _LSD = "ListSuppressedDestinations";
  var _LSDR = "ListSuppressedDestinationsRequest";
  var _LSDRi = "ListSuppressedDestinationsResponse";
  var _LSDT = "LastSeenDateTime";
  var _LST = "LastSuccessTimestamp";
  var _LT = "ListingTime";
  var _LTFR = "ListTagsForResource";
  var _LTFRR = "ListTagsForResourceRequest";
  var _LTFRRi = "ListTagsForResourceResponse";
  var _LTR = "ListTenantsRequest";
  var _LTRR = "ListTenantResourcesRequest";
  var _LTRRi = "ListTenantResourcesResponse";
  var _LTRi = "ListTenantsResponse";
  var _LTRis = "ListTenantResources";
  var _LTi = "ListTenants";
  var _LUT = "LastUpdatedTimestamp";
  var _LUTa = "LastUpdateTime";
  var _M = "Metric";
  var _MDE = "MetricDataError";
  var _MDEL = "MetricDataErrorList";
  var _MDR = "MetricDataResult";
  var _MDRL = "MetricDataResultList";
  var _MDS = "MaxDeliverySeconds";
  var _MDSe = "MetricsDataSource";
  var _ME = "MailboxExists";
  var _MET = "MatchingEventTypes";
  var _MFA = "MailFromAttributes";
  var _MFD = "MailFromDomain";
  var _MFDNVE = "MailFromDomainNotVerifiedException";
  var _MFDS = "MailFromDomainStatus";
  var _MH = "MessageHeader";
  var _MHL = "MessageHeaderList";
  var _MHS = "Max24HourSend";
  var _MI = "MessageId";
  var _MIDS = "MessageInsightsDataSource";
  var _MIF = "MessageInsightsFilters";
  var _MP = "MissingPercentage";
  var _MR = "MessageRejected";
  var _MRE = "MultiRegionEndpoints";
  var _MREu = "MultiRegionEndpoint";
  var _MRa = "MaxResults";
  var _MSR = "MaxSendRate";
  var _MT = "MailType";
  var _MTL = "MessageTagList";
  var _MTe = "MessageTag";
  var _MV = "MailboxValidation";
  var _Me = "Message";
  var _Met = "Metrics";
  var _N = "Namespace";
  var _NFE = "NotFoundException";
  var _NSKL = "NextSigningKeyLength";
  var _NT = "NextToken";
  var _Na = "Name";
  var _OCT = "OverallConfidenceThreshold";
  var _OP = "OverallPlacement";
  var _OSD = "OptimizedSharedDelivery";
  var _OV = "OverallVolume";
  var _P = "Policy";
  var _PAD = "PutAccountDetails";
  var _PADIWA = "PutAccountDedicatedIpWarmupAttributes";
  var _PADIWAR = "PutAccountDedicatedIpWarmupAttributesRequest";
  var _PADIWARu = "PutAccountDedicatedIpWarmupAttributesResponse";
  var _PADR = "PutAccountDetailsRequest";
  var _PADRu = "PutAccountDetailsResponse";
  var _PAE = "ProductionAccessEnabled";
  var _PASA = "PutAccountSendingAttributes";
  var _PASAR = "PutAccountSendingAttributesRequest";
  var _PASARu = "PutAccountSendingAttributesResponse";
  var _PASARut = "PutAccountSuppressionAttributesRequest";
  var _PASARutc = "PutAccountSuppressionAttributesResponse";
  var _PASAu = "PutAccountSuppressionAttributes";
  var _PAVA = "PutAccountVdmAttributes";
  var _PAVAR = "PutAccountVdmAttributesRequest";
  var _PAVARu = "PutAccountVdmAttributesResponse";
  var _PCSAO = "PutConfigurationSetArchivingOptions";
  var _PCSAOR = "PutConfigurationSetArchivingOptionsRequest";
  var _PCSAORu = "PutConfigurationSetArchivingOptionsResponse";
  var _PCSDO = "PutConfigurationSetDeliveryOptions";
  var _PCSDOR = "PutConfigurationSetDeliveryOptionsRequest";
  var _PCSDORu = "PutConfigurationSetDeliveryOptionsResponse";
  var _PCSRO = "PutConfigurationSetReputationOptions";
  var _PCSROR = "PutConfigurationSetReputationOptionsRequest";
  var _PCSRORu = "PutConfigurationSetReputationOptionsResponse";
  var _PCSSO = "PutConfigurationSetSendingOptions";
  var _PCSSOR = "PutConfigurationSetSendingOptionsRequest";
  var _PCSSORu = "PutConfigurationSetSendingOptionsResponse";
  var _PCSSORut = "PutConfigurationSetSuppressionOptionsRequest";
  var _PCSSORuto = "PutConfigurationSetSuppressionOptionsResponse";
  var _PCSSOu = "PutConfigurationSetSuppressionOptions";
  var _PCSTO = "PutConfigurationSetTrackingOptions";
  var _PCSTOR = "PutConfigurationSetTrackingOptionsRequest";
  var _PCSTORu = "PutConfigurationSetTrackingOptionsResponse";
  var _PCSVO = "PutConfigurationSetVdmOptions";
  var _PCSVOR = "PutConfigurationSetVdmOptionsRequest";
  var _PCSVORu = "PutConfigurationSetVdmOptionsResponse";
  var _PD = "PinpointDestination";
  var _PDDO = "PutDeliverabilityDashboardOption";
  var _PDDOR = "PutDeliverabilityDashboardOptionRequest";
  var _PDDORu = "PutDeliverabilityDashboardOptionResponse";
  var _PDIIP = "PutDedicatedIpInPool";
  var _PDIIPR = "PutDedicatedIpInPoolRequest";
  var _PDIIPRu = "PutDedicatedIpInPoolResponse";
  var _PDIPSA = "PutDedicatedIpPoolScalingAttributes";
  var _PDIPSAR = "PutDedicatedIpPoolScalingAttributesRequest";
  var _PDIPSARu = "PutDedicatedIpPoolScalingAttributesResponse";
  var _PDIWA = "PutDedicatedIpWarmupAttributes";
  var _PDIWAR = "PutDedicatedIpWarmupAttributesRequest";
  var _PDIWARu = "PutDedicatedIpWarmupAttributesResponse";
  var _PEICSA = "PutEmailIdentityConfigurationSetAttributes";
  var _PEICSAR = "PutEmailIdentityConfigurationSetAttributesRequest";
  var _PEICSARu = "PutEmailIdentityConfigurationSetAttributesResponse";
  var _PEIDA = "PutEmailIdentityDkimAttributes";
  var _PEIDAR = "PutEmailIdentityDkimAttributesRequest";
  var _PEIDARu = "PutEmailIdentityDkimAttributesResponse";
  var _PEIDSA = "PutEmailIdentityDkimSigningAttributes";
  var _PEIDSAR = "PutEmailIdentityDkimSigningAttributesRequest";
  var _PEIDSARu = "PutEmailIdentityDkimSigningAttributesResponse";
  var _PEIFA = "PutEmailIdentityFeedbackAttributes";
  var _PEIFAR = "PutEmailIdentityFeedbackAttributesRequest";
  var _PEIFARu = "PutEmailIdentityFeedbackAttributesResponse";
  var _PEIMFA = "PutEmailIdentityMailFromAttributes";
  var _PEIMFAR = "PutEmailIdentityMailFromAttributesRequest";
  var _PEIMFARu = "PutEmailIdentityMailFromAttributesResponse";
  var _PESD = "PendingExpirationSubscribedDomains";
  var _PI = "ProjectedInbox";
  var _PK = "PrivateKey";
  var _PN = "PoolName";
  var _PNS = "PrimaryNameServer";
  var _PNo = "PolicyName";
  var _PRC = "ProcessedRecordsCount";
  var _PS = "PageSize";
  var _PSD = "PutSuppressedDestination";
  var _PSDR = "PutSuppressedDestinationRequest";
  var _PSDRu = "PutSuppressedDestinationResponse";
  var _PSl = "PlacementStatistics";
  var _PSr = "ProjectedSpam";
  var _PTSA = "PutTenantSuppressionAttributes";
  var _PTSAR = "PutTenantSuppressionAttributesRequest";
  var _PTSARu = "PutTenantSuppressionAttributesResponse";
  var _PV = "ProjectedVolume";
  var _Po = "Policies";
  var _Q = "Queries";
  var _R = "Results";
  var _RA = "ResourceArn";
  var _RC = "RawContent";
  var _RD = "ReviewDetails";
  var _RDR = "ReadDeleteRate";
  var _RDo = "RoutesDetails";
  var _RDou = "RouteDetails";
  var _RE = "ReputationEntity";
  var _REC = "ReplacementEmailContent";
  var _REL = "ReputationEntitiesList";
  var _REP = "ReputationEntityPolicy";
  var _RER = "ReputationEntityReference";
  var _RET = "ReputationEntityType";
  var _REe = "ReputationEntities";
  var _RH = "ReplacementHeaders";
  var _RI = "ReportId";
  var _RIe = "ReputationImpact";
  var _RL = "RecommendationsList";
  var _RM = "RawMessage";
  var _RME = "ReputationMetricsEnabled";
  var _RMP = "ReputationManagementPolicy";
  var _RN = "RblName";
  var _RNe = "ReportName";
  var _RO = "ReputationOptions";
  var _RR = "ReadRate";
  var _RRP = "ReadRatePercent";
  var _RT = "ReplacementTags";
  var _RTA = "ReplyToAddresses";
  var _RTD = "ReplacementTemplateData";
  var _RTM = "ResourceTenantMetadata";
  var _RTML = "ResourceTenantMetadataList";
  var _RTe = "ResourceTenants";
  var _RTen = "RenderedTemplate";
  var _RTep = "ReplacementTemplate";
  var _RTes = "ResourceType";
  var _Ra = "Raw";
  var _Re = "Recommendations";
  var _Rea = "Reasons";
  var _Reas = "Reason";
  var _Rec = "Recommendation";
  var _Reg = "Regions";
  var _Regi = "Region";
  var _Ro = "Routes";
  var _Rou = "Route";
  var _S = "Status";
  var _SA = "SuppressionAttributes";
  var _SAO = "SigningAttributesOrigin";
  var _SAi = "SigningAttributes";
  var _SBE = "SendBulkEmail";
  var _SBER = "SendBulkEmailRequest";
  var _SBERe = "SendBulkEmailResponse";
  var _SC = "SpamCount";
  var _SCT = "SuppressionConditionThreshold";
  var _SCTu = "SuppressionConfidenceThreshold";
  var _SCVE = "SendCustomVerificationEmail";
  var _SCVER = "SendCustomVerificationEmailRequest";
  var _SCVERe = "SendCustomVerificationEmailResponse";
  var _SD = "StartDate";
  var _SDA = "SuppressedDestinationAttributes";
  var _SDS = "SuppressedDestinationSummaries";
  var _SDSu = "SuppressedDestinationSummary";
  var _SDn = "SnsDestination";
  var _SDu = "SuppressedDestination";
  var _SDub = "SubscribedDomain";
  var _SDubs = "SubscribedDomains";
  var _SE = "SigningEnabled";
  var _SED = "SubscriptionExpiryDate";
  var _SER = "SendEmailRequest";
  var _SERe = "SendEmailResponse";
  var _SEe = "SendingEnabled";
  var _SEen = "SendEmail";
  var _SHZ = "SigningHostedZone";
  var _SI = "SendingIps";
  var _SLD = "SuppressionListDestination";
  var _SLH = "SentLast24Hours";
  var _SLIA = "SuppressionListImportAction";
  var _SM = "ScalingMode";
  var _SN = "SerialNumber";
  var _SO = "SendingOptions";
  var _SOAR = "SOARecord";
  var _SOu = "SuppressionOptions";
  var _SP = "SpamPercentage";
  var _SPE = "SendingPausedException";
  var _SPN = "SendingPoolName";
  var _SPp = "SpfPercentage";
  var _SQ = "SendQuota";
  var _SR = "SuppressedReasons";
  var _SRC = "SpamRawCount";
  var _SRURL = "SuccessRedirectionURL";
  var _SRt = "StatusRecord";
  var _SS = "SendingStatus";
  var _SSA = "SendingStatusAggregate";
  var _SSD = "SubscriptionStartDate";
  var _SSu = "SuppressionScope";
  var _SSub = "SubscriptionStatus";
  var _SU = "S3Url";
  var _SVA = "SuppressionValidationAttributes";
  var _SVO = "SuppressionValidationOptions";
  var _Si = "Simple";
  var _St = "Statistics";
  var _Su = "Subject";
  var _T = "Text";
  var _TA = "TenantArn";
  var _TAe = "TemplateArn";
  var _TAo = "ToAddresses";
  var _TAop = "TopicArn";
  var _TC = "TemplateContent";
  var _TD = "TemplateData";
  var _TDP = "TopicDefaultPreferences";
  var _TF = "TopicFilter";
  var _TI = "TenantId";
  var _TIL = "TenantInfoList";
  var _TIe = "TenantInfo";
  var _TIr = "TrackedIsps";
  var _TK = "TagKeys";
  var _TL = "TagList";
  var _TM = "TemplatesMetadata";
  var _TMRE = "TooManyRequestsException";
  var _TN = "TemplateName";
  var _TNe = "TenantName";
  var _TNo = "TopicName";
  var _TO = "TrackingOptions";
  var _TP = "TopicPreferences";
  var _TPL = "TopicPreferenceList";
  var _TPl = "TlsPolicy";
  var _TPo = "TopicPreference";
  var _TR = "TenantResources";
  var _TRET = "TestRenderEmailTemplate";
  var _TRETR = "TestRenderEmailTemplateRequest";
  var _TRETRe = "TestRenderEmailTemplateResponse";
  var _TRL = "TenantResourceList";
  var _TRR = "TagResourceRequest";
  var _TRRa = "TagResourceResponse";
  var _TRa = "TagResource";
  var _TRe = "TenantResource";
  var _TS = "TemplateSubject";
  var _TSA = "TenantSuppressionAttributes";
  var _Ta = "Tags";
  var _Tag = "Tag";
  var _Te = "Template";
  var _Ten = "Tenant";
  var _Tena = "Tenants";
  var _Ti = "Timestamp";
  var _Tim = "Timestamps";
  var _To = "Topics";
  var _Tok = "Tokens";
  var _Top = "Topic";
  var _Ty = "Type";
  var _UA = "UnsubscribeAll";
  var _UC = "UpdateContact";
  var _UCD = "UseCaseDescription";
  var _UCL = "UpdateContactList";
  var _UCLR = "UpdateContactListRequest";
  var _UCLRp = "UpdateContactListResponse";
  var _UCR = "UpdateContactRequest";
  var _UCRp = "UpdateContactResponse";
  var _UCSED = "UpdateConfigurationSetEventDestination";
  var _UCSEDR = "UpdateConfigurationSetEventDestinationRequest";
  var _UCSEDRp = "UpdateConfigurationSetEventDestinationResponse";
  var _UCVET = "UpdateCustomVerificationEmailTemplate";
  var _UCVETR = "UpdateCustomVerificationEmailTemplateRequest";
  var _UCVETRp = "UpdateCustomVerificationEmailTemplateResponse";
  var _UDIPU = "UseDefaultIfPreferenceUnavailable";
  var _UEIP = "UpdateEmailIdentityPolicy";
  var _UEIPR = "UpdateEmailIdentityPolicyRequest";
  var _UEIPRp = "UpdateEmailIdentityPolicyResponse";
  var _UET = "UpdateEmailTemplate";
  var _UETR = "UpdateEmailTemplateRequest";
  var _UETRp = "UpdateEmailTemplateResponse";
  var _UR = "UntagResource";
  var _URECMS = "UpdateReputationEntityCustomerManagedStatus";
  var _URECMSR = "UpdateReputationEntityCustomerManagedStatusRequest";
  var _URECMSRp = "UpdateReputationEntityCustomerManagedStatusResponse";
  var _UREP = "UpdateReputationEntityPolicy";
  var _UREPR = "UpdateReputationEntityPolicyRequest";
  var _UREPRp = "UpdateReputationEntityPolicyResponse";
  var _URR = "UntagResourceRequest";
  var _URRn = "UntagResourceResponse";
  var _V = "Value";
  var _VA = "VdmAttributes";
  var _VAa = "ValidationAttributes";
  var _VE = "VdmEnabled";
  var _VFSS = "VerifiedForSendingStatus";
  var _VI = "VerificationInfo";
  var _VO = "VdmOptions";
  var _VOa = "ValidationOptions";
  var _VS = "VolumeStatistics";
  var _VSe = "VerificationStatus";
  var _Va = "Values";
  var _WP = "WarmupPercentage";
  var _WS = "WarmupStatus";
  var _WURL = "WebsiteURL";
  var _c = "client";
  var _e = "error";
  var _h = "http";
  var _hE = "httpError";
  var _hQ = "httpQuery";
  var _m = "message";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sesv2";
  var _se = "server";
  var n0 = "com.amazonaws.sesv2";
  var { TypeRegistry } = require_schema();
  var { AccountSuspendedException, AlreadyExistsException, BadRequestException, ConcurrentModificationException, ConflictException, InternalServiceErrorException, InvalidNextTokenException, LimitExceededException, MailFromDomainNotVerifiedException, MessageRejected, NotFoundException, SendingPausedException, TooManyRequestsException } = require_errors4();
  var { SESv2ServiceException } = require_SESv2ServiceException();
  var _s_registry = TypeRegistry.for(_s);
  var SESv2ServiceException$ = [-3, _s, "SESv2ServiceException", 0, [], []];
  exports.SESv2ServiceException$ = SESv2ServiceException$;
  _s_registry.registerError(SESv2ServiceException$, SESv2ServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var AccountSuspendedException$ = [
    -3,
    n0,
    _ASE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.AccountSuspendedException$ = AccountSuspendedException$;
  n0_registry.registerError(AccountSuspendedException$, AccountSuspendedException);
  var AlreadyExistsException$ = [
    -3,
    n0,
    _AEE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.AlreadyExistsException$ = AlreadyExistsException$;
  n0_registry.registerError(AlreadyExistsException$, AlreadyExistsException);
  var BadRequestException$ = [
    -3,
    n0,
    _BRE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.BadRequestException$ = BadRequestException$;
  n0_registry.registerError(BadRequestException$, BadRequestException);
  var ConcurrentModificationException$ = [
    -3,
    n0,
    _CME,
    { [_e]: _se, [_hE]: 500 },
    [_m],
    [0]
  ];
  exports.ConcurrentModificationException$ = ConcurrentModificationException$;
  n0_registry.registerError(ConcurrentModificationException$, ConcurrentModificationException);
  var ConflictException$ = [
    -3,
    n0,
    _CE,
    { [_e]: _c, [_hE]: 409 },
    [_m],
    [0]
  ];
  exports.ConflictException$ = ConflictException$;
  n0_registry.registerError(ConflictException$, ConflictException);
  var InternalServiceErrorException$ = [
    -3,
    n0,
    _ISEE,
    { [_e]: _se, [_hE]: 500 },
    [_m],
    [0]
  ];
  exports.InternalServiceErrorException$ = InternalServiceErrorException$;
  n0_registry.registerError(InternalServiceErrorException$, InternalServiceErrorException);
  var InvalidNextTokenException$ = [
    -3,
    n0,
    _INTE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidNextTokenException$ = InvalidNextTokenException$;
  n0_registry.registerError(InvalidNextTokenException$, InvalidNextTokenException);
  var LimitExceededException$ = [
    -3,
    n0,
    _LEE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.LimitExceededException$ = LimitExceededException$;
  n0_registry.registerError(LimitExceededException$, LimitExceededException);
  var MailFromDomainNotVerifiedException$ = [
    -3,
    n0,
    _MFDNVE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.MailFromDomainNotVerifiedException$ = MailFromDomainNotVerifiedException$;
  n0_registry.registerError(MailFromDomainNotVerifiedException$, MailFromDomainNotVerifiedException);
  var MessageRejected$ = [
    -3,
    n0,
    _MR,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.MessageRejected$ = MessageRejected$;
  n0_registry.registerError(MessageRejected$, MessageRejected);
  var NotFoundException$ = [
    -3,
    n0,
    _NFE,
    { [_e]: _c, [_hE]: 404 },
    [_m],
    [0]
  ];
  exports.NotFoundException$ = NotFoundException$;
  n0_registry.registerError(NotFoundException$, NotFoundException);
  var SendingPausedException$ = [
    -3,
    n0,
    _SPE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.SendingPausedException$ = SendingPausedException$;
  n0_registry.registerError(SendingPausedException$, SendingPausedException);
  var TooManyRequestsException$ = [
    -3,
    n0,
    _TMRE,
    { [_e]: _c, [_hE]: 429 },
    [_m],
    [0]
  ];
  exports.TooManyRequestsException$ = TooManyRequestsException$;
  n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
  exports.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var AdditionalContactEmailAddress = [0, n0, _ACEA, 8, 0];
  var EmailSubject = [0, n0, _ES, 8, 0];
  var InsightsEmailAddress = [0, n0, _IEA, 8, 0];
  var PrivateKey = [0, n0, _PK, 8, 0];
  var UseCaseDescription = [0, n0, _UCD, 8, 0];
  var WebsiteURL = [0, n0, _WURL, 8, 0];
  var AccountDetails$ = [
    3,
    n0,
    _AD,
    0,
    [_MT, _WURL, _CL, _UCD, _ACEAd, _RD],
    [0, [() => WebsiteURL, 0], 0, [() => UseCaseDescription, 0], [() => AdditionalContactEmailAddresses, 0], () => ReviewDetails$]
  ];
  exports.AccountDetails$ = AccountDetails$;
  var ArchivingOptions$ = [
    3,
    n0,
    _AO,
    0,
    [_AA],
    [0]
  ];
  exports.ArchivingOptions$ = ArchivingOptions$;
  var Attachment$ = [
    3,
    n0,
    _A,
    0,
    [_RC, _FN, _CD, _CDo, _CI, _CTE, _CT],
    [21, 0, 0, 0, 0, 0, 0],
    2
  ];
  exports.Attachment$ = Attachment$;
  var BatchGetMetricDataQuery$ = [
    3,
    n0,
    _BGMDQ,
    0,
    [_I, _N, _M, _SD, _ED, _D],
    [0, 0, 0, 4, 4, 128 | 0],
    5
  ];
  exports.BatchGetMetricDataQuery$ = BatchGetMetricDataQuery$;
  var BatchGetMetricDataRequest$ = [
    3,
    n0,
    _BGMDR,
    0,
    [_Q],
    [() => BatchGetMetricDataQueries],
    1
  ];
  exports.BatchGetMetricDataRequest$ = BatchGetMetricDataRequest$;
  var BatchGetMetricDataResponse$ = [
    3,
    n0,
    _BGMDRa,
    0,
    [_R, _E],
    [() => MetricDataResultList, () => MetricDataErrorList]
  ];
  exports.BatchGetMetricDataResponse$ = BatchGetMetricDataResponse$;
  var BlacklistEntry$ = [
    3,
    n0,
    _BE,
    0,
    [_RN, _LT, _De],
    [0, 4, 0]
  ];
  exports.BlacklistEntry$ = BlacklistEntry$;
  var Body$ = [
    3,
    n0,
    _B,
    0,
    [_T, _H],
    [() => Content$, () => Content$]
  ];
  exports.Body$ = Body$;
  var Bounce$ = [
    3,
    n0,
    _Bo,
    0,
    [_BT, _BST, _DC],
    [0, 0, 0]
  ];
  exports.Bounce$ = Bounce$;
  var BulkEmailContent$ = [
    3,
    n0,
    _BEC,
    0,
    [_Te],
    [() => Template$]
  ];
  exports.BulkEmailContent$ = BulkEmailContent$;
  var BulkEmailEntry$ = [
    3,
    n0,
    _BEE,
    0,
    [_Des, _RT, _REC, _RH],
    [() => Destination$, () => MessageTagList, () => ReplacementEmailContent$, () => MessageHeaderList],
    1
  ];
  exports.BulkEmailEntry$ = BulkEmailEntry$;
  var BulkEmailEntryResult$ = [
    3,
    n0,
    _BEER,
    0,
    [_S, _Er, _MI],
    [0, 0, 0]
  ];
  exports.BulkEmailEntryResult$ = BulkEmailEntryResult$;
  var CancelExportJobRequest$ = [
    3,
    n0,
    _CEJR,
    0,
    [_JI],
    [[0, 1]],
    1
  ];
  exports.CancelExportJobRequest$ = CancelExportJobRequest$;
  var CancelExportJobResponse$ = [
    3,
    n0,
    _CEJRa,
    0,
    [],
    []
  ];
  exports.CancelExportJobResponse$ = CancelExportJobResponse$;
  var CloudWatchDestination$ = [
    3,
    n0,
    _CWD,
    0,
    [_DCi],
    [() => CloudWatchDimensionConfigurations],
    1
  ];
  exports.CloudWatchDestination$ = CloudWatchDestination$;
  var CloudWatchDimensionConfiguration$ = [
    3,
    n0,
    _CWDC,
    0,
    [_DN, _DVS, _DDV],
    [0, 0, 0],
    3
  ];
  exports.CloudWatchDimensionConfiguration$ = CloudWatchDimensionConfiguration$;
  var Complaint$ = [
    3,
    n0,
    _C,
    0,
    [_CST, _CFT],
    [0, 0]
  ];
  exports.Complaint$ = Complaint$;
  var Contact$ = [
    3,
    n0,
    _Co,
    0,
    [_EA, _TP, _TDP, _UA, _LUT],
    [0, () => TopicPreferenceList, () => TopicPreferenceList, 2, 4]
  ];
  exports.Contact$ = Contact$;
  var ContactList$ = [
    3,
    n0,
    _CLo,
    0,
    [_CLN, _LUT],
    [0, 4]
  ];
  exports.ContactList$ = ContactList$;
  var ContactListDestination$ = [
    3,
    n0,
    _CLD,
    0,
    [_CLN, _CLIA],
    [0, 0],
    2
  ];
  exports.ContactListDestination$ = ContactListDestination$;
  var Content$ = [
    3,
    n0,
    _Con,
    0,
    [_Da, _Ch],
    [0, 0],
    1
  ];
  exports.Content$ = Content$;
  var CreateConfigurationSetEventDestinationRequest$ = [
    3,
    n0,
    _CCSEDR,
    0,
    [_CSN, _EDN, _EDv],
    [[0, 1], 0, () => EventDestinationDefinition$],
    3
  ];
  exports.CreateConfigurationSetEventDestinationRequest$ = CreateConfigurationSetEventDestinationRequest$;
  var CreateConfigurationSetEventDestinationResponse$ = [
    3,
    n0,
    _CCSEDRr,
    0,
    [],
    []
  ];
  exports.CreateConfigurationSetEventDestinationResponse$ = CreateConfigurationSetEventDestinationResponse$;
  var CreateConfigurationSetRequest$ = [
    3,
    n0,
    _CCSR,
    0,
    [_CSN, _TO, _DO, _RO, _SO, _Ta, _SOu, _VO, _AO],
    [0, () => TrackingOptions$, () => DeliveryOptions$, () => ReputationOptions$, () => SendingOptions$, () => TagList, () => SuppressionOptions$, () => VdmOptions$, () => ArchivingOptions$],
    1
  ];
  exports.CreateConfigurationSetRequest$ = CreateConfigurationSetRequest$;
  var CreateConfigurationSetResponse$ = [
    3,
    n0,
    _CCSRr,
    0,
    [],
    []
  ];
  exports.CreateConfigurationSetResponse$ = CreateConfigurationSetResponse$;
  var CreateContactListRequest$ = [
    3,
    n0,
    _CCLR,
    0,
    [_CLN, _To, _De, _Ta],
    [0, () => Topics, 0, () => TagList],
    1
  ];
  exports.CreateContactListRequest$ = CreateContactListRequest$;
  var CreateContactListResponse$ = [
    3,
    n0,
    _CCLRr,
    0,
    [],
    []
  ];
  exports.CreateContactListResponse$ = CreateContactListResponse$;
  var CreateContactRequest$ = [
    3,
    n0,
    _CCR,
    0,
    [_CLN, _EA, _TP, _UA, _ADt],
    [[0, 1], 0, () => TopicPreferenceList, 2, 0],
    2
  ];
  exports.CreateContactRequest$ = CreateContactRequest$;
  var CreateContactResponse$ = [
    3,
    n0,
    _CCRr,
    0,
    [],
    []
  ];
  exports.CreateContactResponse$ = CreateContactResponse$;
  var CreateCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _CCVETR,
    0,
    [_TN, _FEA, _TS, _TC, _SRURL, _FRURL, _Ta],
    [0, 0, 0, 0, 0, 0, () => TagList],
    6
  ];
  exports.CreateCustomVerificationEmailTemplateRequest$ = CreateCustomVerificationEmailTemplateRequest$;
  var CreateCustomVerificationEmailTemplateResponse$ = [
    3,
    n0,
    _CCVETRr,
    0,
    [],
    []
  ];
  exports.CreateCustomVerificationEmailTemplateResponse$ = CreateCustomVerificationEmailTemplateResponse$;
  var CreateDedicatedIpPoolRequest$ = [
    3,
    n0,
    _CDIPR,
    0,
    [_PN, _Ta, _SM],
    [0, () => TagList, 0],
    1
  ];
  exports.CreateDedicatedIpPoolRequest$ = CreateDedicatedIpPoolRequest$;
  var CreateDedicatedIpPoolResponse$ = [
    3,
    n0,
    _CDIPRr,
    0,
    [],
    []
  ];
  exports.CreateDedicatedIpPoolResponse$ = CreateDedicatedIpPoolResponse$;
  var CreateDeliverabilityTestReportRequest$ = [
    3,
    n0,
    _CDTRR,
    0,
    [_FEA, _Con, _RNe, _Ta],
    [0, () => EmailContent$, 0, () => TagList],
    2
  ];
  exports.CreateDeliverabilityTestReportRequest$ = CreateDeliverabilityTestReportRequest$;
  var CreateDeliverabilityTestReportResponse$ = [
    3,
    n0,
    _CDTRRr,
    0,
    [_RI, _DTS],
    [0, 0],
    2
  ];
  exports.CreateDeliverabilityTestReportResponse$ = CreateDeliverabilityTestReportResponse$;
  var CreateEmailIdentityPolicyRequest$ = [
    3,
    n0,
    _CEIPR,
    0,
    [_EI, _PNo, _P],
    [[0, 1], [0, 1], 0],
    3
  ];
  exports.CreateEmailIdentityPolicyRequest$ = CreateEmailIdentityPolicyRequest$;
  var CreateEmailIdentityPolicyResponse$ = [
    3,
    n0,
    _CEIPRr,
    0,
    [],
    []
  ];
  exports.CreateEmailIdentityPolicyResponse$ = CreateEmailIdentityPolicyResponse$;
  var CreateEmailIdentityRequest$ = [
    3,
    n0,
    _CEIR,
    0,
    [_EI, _Ta, _DSA, _CSN],
    [0, () => TagList, [() => DkimSigningAttributes$, 0], 0],
    1
  ];
  exports.CreateEmailIdentityRequest$ = CreateEmailIdentityRequest$;
  var CreateEmailIdentityResponse$ = [
    3,
    n0,
    _CEIRr,
    0,
    [_IT, _VFSS, _DA],
    [0, 2, () => DkimAttributes$]
  ];
  exports.CreateEmailIdentityResponse$ = CreateEmailIdentityResponse$;
  var CreateEmailTemplateRequest$ = [
    3,
    n0,
    _CETR,
    0,
    [_TN, _TC, _Ta],
    [0, () => EmailTemplateContent$, () => TagList],
    2
  ];
  exports.CreateEmailTemplateRequest$ = CreateEmailTemplateRequest$;
  var CreateEmailTemplateResponse$ = [
    3,
    n0,
    _CETRr,
    0,
    [],
    []
  ];
  exports.CreateEmailTemplateResponse$ = CreateEmailTemplateResponse$;
  var CreateExportJobRequest$ = [
    3,
    n0,
    _CEJRr,
    0,
    [_EDS, _EDx],
    [[() => ExportDataSource$, 0], () => ExportDestination$],
    2
  ];
  exports.CreateExportJobRequest$ = CreateExportJobRequest$;
  var CreateExportJobResponse$ = [
    3,
    n0,
    _CEJRre,
    0,
    [_JI],
    [0]
  ];
  exports.CreateExportJobResponse$ = CreateExportJobResponse$;
  var CreateImportJobRequest$ = [
    3,
    n0,
    _CIJR,
    0,
    [_ID, _IDS],
    [() => ImportDestination$, () => ImportDataSource$],
    2
  ];
  exports.CreateImportJobRequest$ = CreateImportJobRequest$;
  var CreateImportJobResponse$ = [
    3,
    n0,
    _CIJRr,
    0,
    [_JI],
    [0]
  ];
  exports.CreateImportJobResponse$ = CreateImportJobResponse$;
  var CreateMultiRegionEndpointRequest$ = [
    3,
    n0,
    _CMRER,
    0,
    [_EN, _Det, _Ta],
    [0, () => Details$, () => TagList],
    2
  ];
  exports.CreateMultiRegionEndpointRequest$ = CreateMultiRegionEndpointRequest$;
  var CreateMultiRegionEndpointResponse$ = [
    3,
    n0,
    _CMRERr,
    0,
    [_S, _EIn],
    [0, 0]
  ];
  exports.CreateMultiRegionEndpointResponse$ = CreateMultiRegionEndpointResponse$;
  var CreateTenantRequest$ = [
    3,
    n0,
    _CTR,
    0,
    [_TNe, _Ta, _SA],
    [0, () => TagList, () => TenantSuppressionAttributes$],
    1
  ];
  exports.CreateTenantRequest$ = CreateTenantRequest$;
  var CreateTenantResourceAssociationRequest$ = [
    3,
    n0,
    _CTRAR,
    0,
    [_TNe, _RA],
    [0, 0],
    2
  ];
  exports.CreateTenantResourceAssociationRequest$ = CreateTenantResourceAssociationRequest$;
  var CreateTenantResourceAssociationResponse$ = [
    3,
    n0,
    _CTRARr,
    0,
    [],
    []
  ];
  exports.CreateTenantResourceAssociationResponse$ = CreateTenantResourceAssociationResponse$;
  var CreateTenantResponse$ = [
    3,
    n0,
    _CTRr,
    0,
    [_TNe, _TI, _TA, _CTr, _Ta, _SS, _SA],
    [0, 0, 0, 4, () => TagList, 0, () => TenantSuppressionAttributes$]
  ];
  exports.CreateTenantResponse$ = CreateTenantResponse$;
  var CustomVerificationEmailTemplateMetadata$ = [
    3,
    n0,
    _CVETM,
    0,
    [_TN, _FEA, _TS, _SRURL, _FRURL],
    [0, 0, 0, 0, 0]
  ];
  exports.CustomVerificationEmailTemplateMetadata$ = CustomVerificationEmailTemplateMetadata$;
  var DailyVolume$ = [
    3,
    n0,
    _DV,
    0,
    [_SD, _VS, _DIP],
    [4, () => VolumeStatistics$, () => DomainIspPlacements]
  ];
  exports.DailyVolume$ = DailyVolume$;
  var DashboardAttributes$ = [
    3,
    n0,
    _DAa,
    0,
    [_EM],
    [0]
  ];
  exports.DashboardAttributes$ = DashboardAttributes$;
  var DashboardOptions$ = [
    3,
    n0,
    _DOa,
    0,
    [_EM],
    [0]
  ];
  exports.DashboardOptions$ = DashboardOptions$;
  var DedicatedIp$ = [
    3,
    n0,
    _DI,
    0,
    [_Ip, _WS, _WP, _PN],
    [0, 0, 1, 0],
    3
  ];
  exports.DedicatedIp$ = DedicatedIp$;
  var DedicatedIpPool$ = [
    3,
    n0,
    _DIPe,
    0,
    [_PN, _SM],
    [0, 0],
    2
  ];
  exports.DedicatedIpPool$ = DedicatedIpPool$;
  var DeleteConfigurationSetEventDestinationRequest$ = [
    3,
    n0,
    _DCSEDR,
    0,
    [_CSN, _EDN],
    [[0, 1], [0, 1]],
    2
  ];
  exports.DeleteConfigurationSetEventDestinationRequest$ = DeleteConfigurationSetEventDestinationRequest$;
  var DeleteConfigurationSetEventDestinationResponse$ = [
    3,
    n0,
    _DCSEDRe,
    0,
    [],
    []
  ];
  exports.DeleteConfigurationSetEventDestinationResponse$ = DeleteConfigurationSetEventDestinationResponse$;
  var DeleteConfigurationSetRequest$ = [
    3,
    n0,
    _DCSR,
    0,
    [_CSN],
    [[0, 1]],
    1
  ];
  exports.DeleteConfigurationSetRequest$ = DeleteConfigurationSetRequest$;
  var DeleteConfigurationSetResponse$ = [
    3,
    n0,
    _DCSRe,
    0,
    [],
    []
  ];
  exports.DeleteConfigurationSetResponse$ = DeleteConfigurationSetResponse$;
  var DeleteContactListRequest$ = [
    3,
    n0,
    _DCLR,
    0,
    [_CLN],
    [[0, 1]],
    1
  ];
  exports.DeleteContactListRequest$ = DeleteContactListRequest$;
  var DeleteContactListResponse$ = [
    3,
    n0,
    _DCLRe,
    0,
    [],
    []
  ];
  exports.DeleteContactListResponse$ = DeleteContactListResponse$;
  var DeleteContactRequest$ = [
    3,
    n0,
    _DCR,
    0,
    [_CLN, _EA],
    [[0, 1], [0, 1]],
    2
  ];
  exports.DeleteContactRequest$ = DeleteContactRequest$;
  var DeleteContactResponse$ = [
    3,
    n0,
    _DCRe,
    0,
    [],
    []
  ];
  exports.DeleteContactResponse$ = DeleteContactResponse$;
  var DeleteCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _DCVETR,
    0,
    [_TN],
    [[0, 1]],
    1
  ];
  exports.DeleteCustomVerificationEmailTemplateRequest$ = DeleteCustomVerificationEmailTemplateRequest$;
  var DeleteCustomVerificationEmailTemplateResponse$ = [
    3,
    n0,
    _DCVETRe,
    0,
    [],
    []
  ];
  exports.DeleteCustomVerificationEmailTemplateResponse$ = DeleteCustomVerificationEmailTemplateResponse$;
  var DeleteDedicatedIpPoolRequest$ = [
    3,
    n0,
    _DDIPR,
    0,
    [_PN],
    [[0, 1]],
    1
  ];
  exports.DeleteDedicatedIpPoolRequest$ = DeleteDedicatedIpPoolRequest$;
  var DeleteDedicatedIpPoolResponse$ = [
    3,
    n0,
    _DDIPRe,
    0,
    [],
    []
  ];
  exports.DeleteDedicatedIpPoolResponse$ = DeleteDedicatedIpPoolResponse$;
  var DeleteEmailIdentityPolicyRequest$ = [
    3,
    n0,
    _DEIPR,
    0,
    [_EI, _PNo],
    [[0, 1], [0, 1]],
    2
  ];
  exports.DeleteEmailIdentityPolicyRequest$ = DeleteEmailIdentityPolicyRequest$;
  var DeleteEmailIdentityPolicyResponse$ = [
    3,
    n0,
    _DEIPRe,
    0,
    [],
    []
  ];
  exports.DeleteEmailIdentityPolicyResponse$ = DeleteEmailIdentityPolicyResponse$;
  var DeleteEmailIdentityRequest$ = [
    3,
    n0,
    _DEIR,
    0,
    [_EI],
    [[0, 1]],
    1
  ];
  exports.DeleteEmailIdentityRequest$ = DeleteEmailIdentityRequest$;
  var DeleteEmailIdentityResponse$ = [
    3,
    n0,
    _DEIRe,
    0,
    [],
    []
  ];
  exports.DeleteEmailIdentityResponse$ = DeleteEmailIdentityResponse$;
  var DeleteEmailTemplateRequest$ = [
    3,
    n0,
    _DETR,
    0,
    [_TN],
    [[0, 1]],
    1
  ];
  exports.DeleteEmailTemplateRequest$ = DeleteEmailTemplateRequest$;
  var DeleteEmailTemplateResponse$ = [
    3,
    n0,
    _DETRe,
    0,
    [],
    []
  ];
  exports.DeleteEmailTemplateResponse$ = DeleteEmailTemplateResponse$;
  var DeleteMultiRegionEndpointRequest$ = [
    3,
    n0,
    _DMRER,
    0,
    [_EN],
    [[0, 1]],
    1
  ];
  exports.DeleteMultiRegionEndpointRequest$ = DeleteMultiRegionEndpointRequest$;
  var DeleteMultiRegionEndpointResponse$ = [
    3,
    n0,
    _DMRERe,
    0,
    [_S],
    [0]
  ];
  exports.DeleteMultiRegionEndpointResponse$ = DeleteMultiRegionEndpointResponse$;
  var DeleteSuppressedDestinationRequest$ = [
    3,
    n0,
    _DSDR,
    0,
    [_EA, _TNe],
    [[0, 1], [0, { [_hQ]: _TNe }]],
    1
  ];
  exports.DeleteSuppressedDestinationRequest$ = DeleteSuppressedDestinationRequest$;
  var DeleteSuppressedDestinationResponse$ = [
    3,
    n0,
    _DSDRe,
    0,
    [],
    []
  ];
  exports.DeleteSuppressedDestinationResponse$ = DeleteSuppressedDestinationResponse$;
  var DeleteTenantRequest$ = [
    3,
    n0,
    _DTR,
    0,
    [_TNe],
    [0],
    1
  ];
  exports.DeleteTenantRequest$ = DeleteTenantRequest$;
  var DeleteTenantResourceAssociationRequest$ = [
    3,
    n0,
    _DTRAR,
    0,
    [_TNe, _RA],
    [0, 0],
    2
  ];
  exports.DeleteTenantResourceAssociationRequest$ = DeleteTenantResourceAssociationRequest$;
  var DeleteTenantResourceAssociationResponse$ = [
    3,
    n0,
    _DTRARe,
    0,
    [],
    []
  ];
  exports.DeleteTenantResourceAssociationResponse$ = DeleteTenantResourceAssociationResponse$;
  var DeleteTenantResponse$ = [
    3,
    n0,
    _DTRe,
    0,
    [],
    []
  ];
  exports.DeleteTenantResponse$ = DeleteTenantResponse$;
  var DeliverabilityTestReport$ = [
    3,
    n0,
    _DTRel,
    0,
    [_RI, _RNe, _Su, _FEA, _CDr, _DTS],
    [0, 0, 0, 0, 4, 0]
  ];
  exports.DeliverabilityTestReport$ = DeliverabilityTestReport$;
  var DeliveryOptions$ = [
    3,
    n0,
    _DO,
    0,
    [_TPl, _SPN, _MDS],
    [0, 0, 1]
  ];
  exports.DeliveryOptions$ = DeliveryOptions$;
  var Destination$ = [
    3,
    n0,
    _Des,
    0,
    [_TAo, _CA, _BA],
    [64 | 0, 64 | 0, 64 | 0]
  ];
  exports.Destination$ = Destination$;
  var Details$ = [
    3,
    n0,
    _Det,
    0,
    [_RDo],
    [() => RoutesDetails],
    1
  ];
  exports.Details$ = Details$;
  var DkimAttributes$ = [
    3,
    n0,
    _DA,
    0,
    [_SE, _S, _Tok, _SHZ, _SAO, _NSKL, _CSKL, _LKGT],
    [2, 0, 64 | 0, 0, 0, 0, 0, 4]
  ];
  exports.DkimAttributes$ = DkimAttributes$;
  var DkimSigningAttributes$ = [
    3,
    n0,
    _DSA,
    0,
    [_DSS, _DSPK, _NSKL, _DSAO],
    [0, [() => PrivateKey, 0], 0, 0]
  ];
  exports.DkimSigningAttributes$ = DkimSigningAttributes$;
  var DomainDeliverabilityCampaign$ = [
    3,
    n0,
    _DDC,
    0,
    [_CIa, _IU, _Su, _FA, _SI, _FSDT, _LSDT, _IC, _SC, _RR, _DR, _RDR, _PV, _Es],
    [0, 0, 0, 0, 64 | 0, 4, 4, 1, 1, 1, 1, 1, 1, 64 | 0]
  ];
  exports.DomainDeliverabilityCampaign$ = DomainDeliverabilityCampaign$;
  var DomainDeliverabilityTrackingOption$ = [
    3,
    n0,
    _DDTO,
    0,
    [_Do, _SSD, _IPTO],
    [0, 4, () => InboxPlacementTrackingOption$]
  ];
  exports.DomainDeliverabilityTrackingOption$ = DomainDeliverabilityTrackingOption$;
  var DomainIspPlacement$ = [
    3,
    n0,
    _DIPo,
    0,
    [_IN, _IRC, _SRC, _IP, _SP],
    [0, 1, 1, 1, 1]
  ];
  exports.DomainIspPlacement$ = DomainIspPlacement$;
  var EmailAddressInsightsMailboxEvaluations$ = [
    3,
    n0,
    _EAIME,
    0,
    [_HVS, _HVDR, _ME, _IRA, _IDs, _IRI],
    [() => EmailAddressInsightsVerdict$, () => EmailAddressInsightsVerdict$, () => EmailAddressInsightsVerdict$, () => EmailAddressInsightsVerdict$, () => EmailAddressInsightsVerdict$, () => EmailAddressInsightsVerdict$]
  ];
  exports.EmailAddressInsightsMailboxEvaluations$ = EmailAddressInsightsMailboxEvaluations$;
  var EmailAddressInsightsVerdict$ = [
    3,
    n0,
    _EAIV,
    0,
    [_CV],
    [0]
  ];
  exports.EmailAddressInsightsVerdict$ = EmailAddressInsightsVerdict$;
  var EmailContent$ = [
    3,
    n0,
    _EC,
    0,
    [_Si, _Ra, _Te],
    [() => Message$, () => RawMessage$, () => Template$]
  ];
  exports.EmailContent$ = EmailContent$;
  var EmailInsights$ = [
    3,
    n0,
    _EIm,
    0,
    [_Des, _Is, _Ev],
    [[() => InsightsEmailAddress, 0], 0, () => InsightsEvents]
  ];
  exports.EmailInsights$ = EmailInsights$;
  var EmailTemplateContent$ = [
    3,
    n0,
    _ETC,
    0,
    [_Su, _T, _H],
    [0, 0, 0]
  ];
  exports.EmailTemplateContent$ = EmailTemplateContent$;
  var EmailTemplateMetadata$ = [
    3,
    n0,
    _ETM,
    0,
    [_TN, _CTr],
    [0, 4]
  ];
  exports.EmailTemplateMetadata$ = EmailTemplateMetadata$;
  var EventBridgeDestination$ = [
    3,
    n0,
    _EBD,
    0,
    [_EBA],
    [0],
    1
  ];
  exports.EventBridgeDestination$ = EventBridgeDestination$;
  var EventDestination$ = [
    3,
    n0,
    _EDv,
    0,
    [_Na, _MET, _En, _KFD, _CWD, _SDn, _EBD, _PD],
    [0, 64 | 0, 2, () => KinesisFirehoseDestination$, () => CloudWatchDestination$, () => SnsDestination$, () => EventBridgeDestination$, () => PinpointDestination$],
    2
  ];
  exports.EventDestination$ = EventDestination$;
  var EventDestinationDefinition$ = [
    3,
    n0,
    _EDD,
    0,
    [_En, _MET, _KFD, _CWD, _SDn, _EBD, _PD],
    [2, 64 | 0, () => KinesisFirehoseDestination$, () => CloudWatchDestination$, () => SnsDestination$, () => EventBridgeDestination$, () => PinpointDestination$]
  ];
  exports.EventDestinationDefinition$ = EventDestinationDefinition$;
  var EventDetails$ = [
    3,
    n0,
    _EDve,
    0,
    [_Bo, _C],
    [() => Bounce$, () => Complaint$]
  ];
  exports.EventDetails$ = EventDetails$;
  var ExportDataSource$ = [
    3,
    n0,
    _EDS,
    0,
    [_MDSe, _MIDS],
    [() => MetricsDataSource$, [() => MessageInsightsDataSource$, 0]]
  ];
  exports.ExportDataSource$ = ExportDataSource$;
  var ExportDestination$ = [
    3,
    n0,
    _EDx,
    0,
    [_DF, _SU],
    [0, 0],
    1
  ];
  exports.ExportDestination$ = ExportDestination$;
  var ExportJobSummary$ = [
    3,
    n0,
    _EJS,
    0,
    [_JI, _EST, _JS, _CTr, _CTo],
    [0, 0, 0, 4, 4]
  ];
  exports.ExportJobSummary$ = ExportJobSummary$;
  var ExportMetric$ = [
    3,
    n0,
    _EMx,
    0,
    [_Na, _Ag],
    [0, 0]
  ];
  exports.ExportMetric$ = ExportMetric$;
  var ExportStatistics$ = [
    3,
    n0,
    _ESx,
    0,
    [_PRC, _ERC],
    [1, 1]
  ];
  exports.ExportStatistics$ = ExportStatistics$;
  var FailureInfo$ = [
    3,
    n0,
    _FI,
    0,
    [_FRSU, _EMr],
    [0, 0]
  ];
  exports.FailureInfo$ = FailureInfo$;
  var GetAccountRequest$ = [
    3,
    n0,
    _GAR,
    0,
    [],
    []
  ];
  exports.GetAccountRequest$ = GetAccountRequest$;
  var GetAccountResponse$ = [
    3,
    n0,
    _GARe,
    0,
    [_DIAWE, _ESn, _PAE, _SQ, _SEe, _SA, _Det, _VA],
    [2, 0, 2, () => SendQuota$, 2, () => SuppressionAttributes$, [() => AccountDetails$, 0], () => VdmAttributes$]
  ];
  exports.GetAccountResponse$ = GetAccountResponse$;
  var GetBlacklistReportsRequest$ = [
    3,
    n0,
    _GBRR,
    0,
    [_BIN],
    [[64 | 0, { [_hQ]: _BIN }]],
    1
  ];
  exports.GetBlacklistReportsRequest$ = GetBlacklistReportsRequest$;
  var GetBlacklistReportsResponse$ = [
    3,
    n0,
    _GBRRe,
    0,
    [_BR],
    [() => BlacklistReport],
    1
  ];
  exports.GetBlacklistReportsResponse$ = GetBlacklistReportsResponse$;
  var GetConfigurationSetEventDestinationsRequest$ = [
    3,
    n0,
    _GCSEDR,
    0,
    [_CSN],
    [[0, 1]],
    1
  ];
  exports.GetConfigurationSetEventDestinationsRequest$ = GetConfigurationSetEventDestinationsRequest$;
  var GetConfigurationSetEventDestinationsResponse$ = [
    3,
    n0,
    _GCSEDRe,
    0,
    [_EDven],
    [() => EventDestinations]
  ];
  exports.GetConfigurationSetEventDestinationsResponse$ = GetConfigurationSetEventDestinationsResponse$;
  var GetConfigurationSetRequest$ = [
    3,
    n0,
    _GCSR,
    0,
    [_CSN],
    [[0, 1]],
    1
  ];
  exports.GetConfigurationSetRequest$ = GetConfigurationSetRequest$;
  var GetConfigurationSetResponse$ = [
    3,
    n0,
    _GCSRe,
    0,
    [_CSN, _TO, _DO, _RO, _SO, _Ta, _SOu, _VO, _AO],
    [0, () => TrackingOptions$, () => DeliveryOptions$, () => ReputationOptions$, () => SendingOptions$, () => TagList, () => SuppressionOptions$, () => VdmOptions$, () => ArchivingOptions$]
  ];
  exports.GetConfigurationSetResponse$ = GetConfigurationSetResponse$;
  var GetContactListRequest$ = [
    3,
    n0,
    _GCLR,
    0,
    [_CLN],
    [[0, 1]],
    1
  ];
  exports.GetContactListRequest$ = GetContactListRequest$;
  var GetContactListResponse$ = [
    3,
    n0,
    _GCLRe,
    0,
    [_CLN, _To, _De, _CTr, _LUT, _Ta],
    [0, () => Topics, 0, 4, 4, () => TagList]
  ];
  exports.GetContactListResponse$ = GetContactListResponse$;
  var GetContactRequest$ = [
    3,
    n0,
    _GCR,
    0,
    [_CLN, _EA],
    [[0, 1], [0, 1]],
    2
  ];
  exports.GetContactRequest$ = GetContactRequest$;
  var GetContactResponse$ = [
    3,
    n0,
    _GCRe,
    0,
    [_CLN, _EA, _TP, _TDP, _UA, _ADt, _CTr, _LUT],
    [0, 0, () => TopicPreferenceList, () => TopicPreferenceList, 2, 0, 4, 4]
  ];
  exports.GetContactResponse$ = GetContactResponse$;
  var GetCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _GCVETR,
    0,
    [_TN],
    [[0, 1]],
    1
  ];
  exports.GetCustomVerificationEmailTemplateRequest$ = GetCustomVerificationEmailTemplateRequest$;
  var GetCustomVerificationEmailTemplateResponse$ = [
    3,
    n0,
    _GCVETRe,
    0,
    [_TN, _FEA, _TS, _TC, _Ta, _SRURL, _FRURL],
    [0, 0, 0, 0, () => TagList, 0, 0]
  ];
  exports.GetCustomVerificationEmailTemplateResponse$ = GetCustomVerificationEmailTemplateResponse$;
  var GetDedicatedIpPoolRequest$ = [
    3,
    n0,
    _GDIPR,
    0,
    [_PN],
    [[0, 1]],
    1
  ];
  exports.GetDedicatedIpPoolRequest$ = GetDedicatedIpPoolRequest$;
  var GetDedicatedIpPoolResponse$ = [
    3,
    n0,
    _GDIPRe,
    0,
    [_DIPe],
    [() => DedicatedIpPool$]
  ];
  exports.GetDedicatedIpPoolResponse$ = GetDedicatedIpPoolResponse$;
  var GetDedicatedIpRequest$ = [
    3,
    n0,
    _GDIR,
    0,
    [_Ip],
    [[0, 1]],
    1
  ];
  exports.GetDedicatedIpRequest$ = GetDedicatedIpRequest$;
  var GetDedicatedIpResponse$ = [
    3,
    n0,
    _GDIRe,
    0,
    [_DI],
    [() => DedicatedIp$]
  ];
  exports.GetDedicatedIpResponse$ = GetDedicatedIpResponse$;
  var GetDedicatedIpsRequest$ = [
    3,
    n0,
    _GDIRet,
    0,
    [_PN, _NT, _PS],
    [[0, { [_hQ]: _PN }], [0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.GetDedicatedIpsRequest$ = GetDedicatedIpsRequest$;
  var GetDedicatedIpsResponse$ = [
    3,
    n0,
    _GDIRete,
    0,
    [_DIe, _NT],
    [() => DedicatedIpList, 0]
  ];
  exports.GetDedicatedIpsResponse$ = GetDedicatedIpsResponse$;
  var GetDeliverabilityDashboardOptionsRequest$ = [
    3,
    n0,
    _GDDOR,
    0,
    [],
    []
  ];
  exports.GetDeliverabilityDashboardOptionsRequest$ = GetDeliverabilityDashboardOptionsRequest$;
  var GetDeliverabilityDashboardOptionsResponse$ = [
    3,
    n0,
    _GDDORe,
    0,
    [_DE, _SED, _AS, _ASD, _PESD],
    [2, 4, 0, () => DomainDeliverabilityTrackingOptions, () => DomainDeliverabilityTrackingOptions],
    1
  ];
  exports.GetDeliverabilityDashboardOptionsResponse$ = GetDeliverabilityDashboardOptionsResponse$;
  var GetDeliverabilityTestReportRequest$ = [
    3,
    n0,
    _GDTRR,
    0,
    [_RI],
    [[0, 1]],
    1
  ];
  exports.GetDeliverabilityTestReportRequest$ = GetDeliverabilityTestReportRequest$;
  var GetDeliverabilityTestReportResponse$ = [
    3,
    n0,
    _GDTRRe,
    0,
    [_DTRel, _OP, _IPs, _Me, _Ta],
    [() => DeliverabilityTestReport$, () => PlacementStatistics$, () => IspPlacements, 0, () => TagList],
    3
  ];
  exports.GetDeliverabilityTestReportResponse$ = GetDeliverabilityTestReportResponse$;
  var GetDomainDeliverabilityCampaignRequest$ = [
    3,
    n0,
    _GDDCR,
    0,
    [_CIa],
    [[0, 1]],
    1
  ];
  exports.GetDomainDeliverabilityCampaignRequest$ = GetDomainDeliverabilityCampaignRequest$;
  var GetDomainDeliverabilityCampaignResponse$ = [
    3,
    n0,
    _GDDCRe,
    0,
    [_DDC],
    [() => DomainDeliverabilityCampaign$],
    1
  ];
  exports.GetDomainDeliverabilityCampaignResponse$ = GetDomainDeliverabilityCampaignResponse$;
  var GetDomainStatisticsReportRequest$ = [
    3,
    n0,
    _GDSRR,
    0,
    [_Do, _SD, _ED],
    [[0, 1], [4, { [_hQ]: _SD }], [4, { [_hQ]: _ED }]],
    3
  ];
  exports.GetDomainStatisticsReportRequest$ = GetDomainStatisticsReportRequest$;
  var GetDomainStatisticsReportResponse$ = [
    3,
    n0,
    _GDSRRe,
    0,
    [_OV, _DVa],
    [() => OverallVolume$, () => DailyVolumes],
    2
  ];
  exports.GetDomainStatisticsReportResponse$ = GetDomainStatisticsReportResponse$;
  var GetEmailAddressInsightsRequest$ = [
    3,
    n0,
    _GEAIR,
    0,
    [_EA],
    [0],
    1
  ];
  exports.GetEmailAddressInsightsRequest$ = GetEmailAddressInsightsRequest$;
  var GetEmailAddressInsightsResponse$ = [
    3,
    n0,
    _GEAIRe,
    0,
    [_MV],
    [() => MailboxValidation$]
  ];
  exports.GetEmailAddressInsightsResponse$ = GetEmailAddressInsightsResponse$;
  var GetEmailIdentityPoliciesRequest$ = [
    3,
    n0,
    _GEIPR,
    0,
    [_EI],
    [[0, 1]],
    1
  ];
  exports.GetEmailIdentityPoliciesRequest$ = GetEmailIdentityPoliciesRequest$;
  var GetEmailIdentityPoliciesResponse$ = [
    3,
    n0,
    _GEIPRe,
    0,
    [_Po],
    [128 | 0]
  ];
  exports.GetEmailIdentityPoliciesResponse$ = GetEmailIdentityPoliciesResponse$;
  var GetEmailIdentityRequest$ = [
    3,
    n0,
    _GEIR,
    0,
    [_EI],
    [[0, 1]],
    1
  ];
  exports.GetEmailIdentityRequest$ = GetEmailIdentityRequest$;
  var GetEmailIdentityResponse$ = [
    3,
    n0,
    _GEIRe,
    0,
    [_IT, _FFS, _VFSS, _DA, _MFA, _Po, _Ta, _CSN, _VSe, _VI],
    [0, 2, 2, () => DkimAttributes$, () => MailFromAttributes$, 128 | 0, () => TagList, 0, 0, () => VerificationInfo$]
  ];
  exports.GetEmailIdentityResponse$ = GetEmailIdentityResponse$;
  var GetEmailTemplateRequest$ = [
    3,
    n0,
    _GETR,
    0,
    [_TN],
    [[0, 1]],
    1
  ];
  exports.GetEmailTemplateRequest$ = GetEmailTemplateRequest$;
  var GetEmailTemplateResponse$ = [
    3,
    n0,
    _GETRe,
    0,
    [_TN, _TC, _Ta],
    [0, () => EmailTemplateContent$, () => TagList],
    2
  ];
  exports.GetEmailTemplateResponse$ = GetEmailTemplateResponse$;
  var GetExportJobRequest$ = [
    3,
    n0,
    _GEJR,
    0,
    [_JI],
    [[0, 1]],
    1
  ];
  exports.GetExportJobRequest$ = GetExportJobRequest$;
  var GetExportJobResponse$ = [
    3,
    n0,
    _GEJRe,
    0,
    [_JI, _EST, _JS, _EDx, _EDS, _CTr, _CTo, _FI, _St],
    [0, 0, 0, () => ExportDestination$, [() => ExportDataSource$, 0], 4, 4, () => FailureInfo$, () => ExportStatistics$]
  ];
  exports.GetExportJobResponse$ = GetExportJobResponse$;
  var GetImportJobRequest$ = [
    3,
    n0,
    _GIJR,
    0,
    [_JI],
    [[0, 1]],
    1
  ];
  exports.GetImportJobRequest$ = GetImportJobRequest$;
  var GetImportJobResponse$ = [
    3,
    n0,
    _GIJRe,
    0,
    [_JI, _ID, _IDS, _FI, _JS, _CTr, _CTo, _PRC, _FRC],
    [0, () => ImportDestination$, () => ImportDataSource$, () => FailureInfo$, 0, 4, 4, 1, 1]
  ];
  exports.GetImportJobResponse$ = GetImportJobResponse$;
  var GetMessageInsightsRequest$ = [
    3,
    n0,
    _GMIR,
    0,
    [_MI],
    [[0, 1]],
    1
  ];
  exports.GetMessageInsightsRequest$ = GetMessageInsightsRequest$;
  var GetMessageInsightsResponse$ = [
    3,
    n0,
    _GMIRe,
    0,
    [_MI, _FEA, _Su, _ET, _In],
    [0, [() => InsightsEmailAddress, 0], [() => EmailSubject, 0], () => MessageTagList, [() => EmailInsightsList, 0]]
  ];
  exports.GetMessageInsightsResponse$ = GetMessageInsightsResponse$;
  var GetMultiRegionEndpointRequest$ = [
    3,
    n0,
    _GMRER,
    0,
    [_EN],
    [[0, 1]],
    1
  ];
  exports.GetMultiRegionEndpointRequest$ = GetMultiRegionEndpointRequest$;
  var GetMultiRegionEndpointResponse$ = [
    3,
    n0,
    _GMRERe,
    0,
    [_EN, _EIn, _Ro, _S, _CTr, _LUT],
    [0, 0, () => Routes, 0, 4, 4]
  ];
  exports.GetMultiRegionEndpointResponse$ = GetMultiRegionEndpointResponse$;
  var GetReputationEntityRequest$ = [
    3,
    n0,
    _GRER,
    0,
    [_RER, _RET],
    [[0, 1], [0, 1]],
    2
  ];
  exports.GetReputationEntityRequest$ = GetReputationEntityRequest$;
  var GetReputationEntityResponse$ = [
    3,
    n0,
    _GRERe,
    0,
    [_RE],
    [() => ReputationEntity$]
  ];
  exports.GetReputationEntityResponse$ = GetReputationEntityResponse$;
  var GetSuppressedDestinationRequest$ = [
    3,
    n0,
    _GSDR,
    0,
    [_EA, _TNe],
    [[0, 1], [0, { [_hQ]: _TNe }]],
    1
  ];
  exports.GetSuppressedDestinationRequest$ = GetSuppressedDestinationRequest$;
  var GetSuppressedDestinationResponse$ = [
    3,
    n0,
    _GSDRe,
    0,
    [_SDu],
    [() => SuppressedDestination$],
    1
  ];
  exports.GetSuppressedDestinationResponse$ = GetSuppressedDestinationResponse$;
  var GetTenantRequest$ = [
    3,
    n0,
    _GTR,
    0,
    [_TNe],
    [0],
    1
  ];
  exports.GetTenantRequest$ = GetTenantRequest$;
  var GetTenantResponse$ = [
    3,
    n0,
    _GTRe,
    0,
    [_Ten],
    [() => Tenant$]
  ];
  exports.GetTenantResponse$ = GetTenantResponse$;
  var GuardianAttributes$ = [
    3,
    n0,
    _GA,
    0,
    [_OSD],
    [0]
  ];
  exports.GuardianAttributes$ = GuardianAttributes$;
  var GuardianOptions$ = [
    3,
    n0,
    _GO,
    0,
    [_OSD],
    [0]
  ];
  exports.GuardianOptions$ = GuardianOptions$;
  var IdentityInfo$ = [
    3,
    n0,
    _II,
    0,
    [_IT, _INd, _SEe, _VSe],
    [0, 0, 2, 0]
  ];
  exports.IdentityInfo$ = IdentityInfo$;
  var ImportDataSource$ = [
    3,
    n0,
    _IDS,
    0,
    [_SU, _DF],
    [0, 0],
    2
  ];
  exports.ImportDataSource$ = ImportDataSource$;
  var ImportDestination$ = [
    3,
    n0,
    _ID,
    0,
    [_SLD, _CLD],
    [() => SuppressionListDestination$, () => ContactListDestination$]
  ];
  exports.ImportDestination$ = ImportDestination$;
  var ImportJobSummary$ = [
    3,
    n0,
    _IJS,
    0,
    [_JI, _ID, _JS, _CTr, _PRC, _FRC],
    [0, () => ImportDestination$, 0, 4, 1, 1]
  ];
  exports.ImportJobSummary$ = ImportJobSummary$;
  var InboxPlacementTrackingOption$ = [
    3,
    n0,
    _IPTO,
    0,
    [_G, _TIr],
    [2, 64 | 0]
  ];
  exports.InboxPlacementTrackingOption$ = InboxPlacementTrackingOption$;
  var InsightsEvent$ = [
    3,
    n0,
    _IE,
    0,
    [_Ti, _Ty, _Det],
    [4, 0, () => EventDetails$]
  ];
  exports.InsightsEvent$ = InsightsEvent$;
  var IspPlacement$ = [
    3,
    n0,
    _IPsp,
    0,
    [_IN, _PSl],
    [0, () => PlacementStatistics$]
  ];
  exports.IspPlacement$ = IspPlacement$;
  var KinesisFirehoseDestination$ = [
    3,
    n0,
    _KFD,
    0,
    [_IRAa, _DSAe],
    [0, 0],
    2
  ];
  exports.KinesisFirehoseDestination$ = KinesisFirehoseDestination$;
  var ListConfigurationSetsRequest$ = [
    3,
    n0,
    _LCSR,
    0,
    [_NT, _PS],
    [[0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListConfigurationSetsRequest$ = ListConfigurationSetsRequest$;
  var ListConfigurationSetsResponse$ = [
    3,
    n0,
    _LCSRi,
    0,
    [_CS, _NT],
    [64 | 0, 0]
  ];
  exports.ListConfigurationSetsResponse$ = ListConfigurationSetsResponse$;
  var ListContactListsRequest$ = [
    3,
    n0,
    _LCLR,
    0,
    [_PS, _NT],
    [[1, { [_hQ]: _PS }], [0, { [_hQ]: _NT }]]
  ];
  exports.ListContactListsRequest$ = ListContactListsRequest$;
  var ListContactListsResponse$ = [
    3,
    n0,
    _LCLRi,
    0,
    [_CLon, _NT],
    [() => ListOfContactLists, 0]
  ];
  exports.ListContactListsResponse$ = ListContactListsResponse$;
  var ListContactsFilter$ = [
    3,
    n0,
    _LCF,
    0,
    [_FS, _TF],
    [0, () => TopicFilter$]
  ];
  exports.ListContactsFilter$ = ListContactsFilter$;
  var ListContactsRequest$ = [
    3,
    n0,
    _LCR,
    0,
    [_CLN, _F, _PS, _NT],
    [[0, 1], () => ListContactsFilter$, 1, 0],
    1
  ];
  exports.ListContactsRequest$ = ListContactsRequest$;
  var ListContactsResponse$ = [
    3,
    n0,
    _LCRi,
    0,
    [_Cont, _NT],
    [() => ListOfContacts, 0]
  ];
  exports.ListContactsResponse$ = ListContactsResponse$;
  var ListCustomVerificationEmailTemplatesRequest$ = [
    3,
    n0,
    _LCVETR,
    0,
    [_NT, _PS],
    [[0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListCustomVerificationEmailTemplatesRequest$ = ListCustomVerificationEmailTemplatesRequest$;
  var ListCustomVerificationEmailTemplatesResponse$ = [
    3,
    n0,
    _LCVETRi,
    0,
    [_CVET, _NT],
    [() => CustomVerificationEmailTemplatesList, 0]
  ];
  exports.ListCustomVerificationEmailTemplatesResponse$ = ListCustomVerificationEmailTemplatesResponse$;
  var ListDedicatedIpPoolsRequest$ = [
    3,
    n0,
    _LDIPR,
    0,
    [_NT, _PS],
    [[0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListDedicatedIpPoolsRequest$ = ListDedicatedIpPoolsRequest$;
  var ListDedicatedIpPoolsResponse$ = [
    3,
    n0,
    _LDIPRi,
    0,
    [_DIPed, _NT],
    [64 | 0, 0]
  ];
  exports.ListDedicatedIpPoolsResponse$ = ListDedicatedIpPoolsResponse$;
  var ListDeliverabilityTestReportsRequest$ = [
    3,
    n0,
    _LDTRR,
    0,
    [_NT, _PS],
    [[0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListDeliverabilityTestReportsRequest$ = ListDeliverabilityTestReportsRequest$;
  var ListDeliverabilityTestReportsResponse$ = [
    3,
    n0,
    _LDTRRi,
    0,
    [_DTReli, _NT],
    [() => DeliverabilityTestReports, 0],
    1
  ];
  exports.ListDeliverabilityTestReportsResponse$ = ListDeliverabilityTestReportsResponse$;
  var ListDomainDeliverabilityCampaignsRequest$ = [
    3,
    n0,
    _LDDCR,
    0,
    [_SD, _ED, _SDub, _NT, _PS],
    [[4, { [_hQ]: _SD }], [4, { [_hQ]: _ED }], [0, 1], [0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]],
    3
  ];
  exports.ListDomainDeliverabilityCampaignsRequest$ = ListDomainDeliverabilityCampaignsRequest$;
  var ListDomainDeliverabilityCampaignsResponse$ = [
    3,
    n0,
    _LDDCRi,
    0,
    [_DDCo, _NT],
    [() => DomainDeliverabilityCampaignList, 0],
    1
  ];
  exports.ListDomainDeliverabilityCampaignsResponse$ = ListDomainDeliverabilityCampaignsResponse$;
  var ListEmailIdentitiesRequest$ = [
    3,
    n0,
    _LEIR,
    0,
    [_NT, _PS],
    [[0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListEmailIdentitiesRequest$ = ListEmailIdentitiesRequest$;
  var ListEmailIdentitiesResponse$ = [
    3,
    n0,
    _LEIRi,
    0,
    [_EIma, _NT],
    [() => IdentityInfoList, 0]
  ];
  exports.ListEmailIdentitiesResponse$ = ListEmailIdentitiesResponse$;
  var ListEmailTemplatesRequest$ = [
    3,
    n0,
    _LETR,
    0,
    [_NT, _PS],
    [[0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListEmailTemplatesRequest$ = ListEmailTemplatesRequest$;
  var ListEmailTemplatesResponse$ = [
    3,
    n0,
    _LETRi,
    0,
    [_TM, _NT],
    [() => EmailTemplateMetadataList, 0]
  ];
  exports.ListEmailTemplatesResponse$ = ListEmailTemplatesResponse$;
  var ListExportJobsRequest$ = [
    3,
    n0,
    _LEJR,
    0,
    [_NT, _PS, _EST, _JS],
    [0, 1, 0, 0]
  ];
  exports.ListExportJobsRequest$ = ListExportJobsRequest$;
  var ListExportJobsResponse$ = [
    3,
    n0,
    _LEJRi,
    0,
    [_EJ, _NT],
    [() => ExportJobSummaryList, 0]
  ];
  exports.ListExportJobsResponse$ = ListExportJobsResponse$;
  var ListImportJobsRequest$ = [
    3,
    n0,
    _LIJR,
    0,
    [_IDT, _NT, _PS],
    [0, 0, 1]
  ];
  exports.ListImportJobsRequest$ = ListImportJobsRequest$;
  var ListImportJobsResponse$ = [
    3,
    n0,
    _LIJRi,
    0,
    [_IJ, _NT],
    [() => ImportJobSummaryList, 0]
  ];
  exports.ListImportJobsResponse$ = ListImportJobsResponse$;
  var ListManagementOptions$ = [
    3,
    n0,
    _LMO,
    0,
    [_CLN, _TNo],
    [0, 0],
    1
  ];
  exports.ListManagementOptions$ = ListManagementOptions$;
  var ListMultiRegionEndpointsRequest$ = [
    3,
    n0,
    _LMRER,
    0,
    [_NT, _PS],
    [[0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListMultiRegionEndpointsRequest$ = ListMultiRegionEndpointsRequest$;
  var ListMultiRegionEndpointsResponse$ = [
    3,
    n0,
    _LMRERi,
    0,
    [_MRE, _NT],
    [() => MultiRegionEndpoints, 0]
  ];
  exports.ListMultiRegionEndpointsResponse$ = ListMultiRegionEndpointsResponse$;
  var ListRecommendationsRequest$ = [
    3,
    n0,
    _LRR,
    0,
    [_F, _NT, _PS],
    [128 | 0, 0, 1]
  ];
  exports.ListRecommendationsRequest$ = ListRecommendationsRequest$;
  var ListRecommendationsResponse$ = [
    3,
    n0,
    _LRRi,
    0,
    [_Re, _NT],
    [() => RecommendationsList, 0]
  ];
  exports.ListRecommendationsResponse$ = ListRecommendationsResponse$;
  var ListReputationEntitiesRequest$ = [
    3,
    n0,
    _LRER,
    0,
    [_F, _NT, _PS],
    [128 | 0, 0, 1]
  ];
  exports.ListReputationEntitiesRequest$ = ListReputationEntitiesRequest$;
  var ListReputationEntitiesResponse$ = [
    3,
    n0,
    _LRERi,
    0,
    [_REe, _NT],
    [() => ReputationEntitiesList, 0]
  ];
  exports.ListReputationEntitiesResponse$ = ListReputationEntitiesResponse$;
  var ListResourceTenantsRequest$ = [
    3,
    n0,
    _LRTR,
    0,
    [_RA, _PS, _NT],
    [0, 1, 0],
    1
  ];
  exports.ListResourceTenantsRequest$ = ListResourceTenantsRequest$;
  var ListResourceTenantsResponse$ = [
    3,
    n0,
    _LRTRi,
    0,
    [_RTe, _NT],
    [() => ResourceTenantMetadataList, 0]
  ];
  exports.ListResourceTenantsResponse$ = ListResourceTenantsResponse$;
  var ListSuppressedDestinationsRequest$ = [
    3,
    n0,
    _LSDR,
    0,
    [_TNe, _Rea, _SD, _ED, _NT, _PS],
    [[0, { [_hQ]: _TNe }], [64 | 0, { [_hQ]: _Reas }], [4, { [_hQ]: _SD }], [4, { [_hQ]: _ED }], [0, { [_hQ]: _NT }], [1, { [_hQ]: _PS }]]
  ];
  exports.ListSuppressedDestinationsRequest$ = ListSuppressedDestinationsRequest$;
  var ListSuppressedDestinationsResponse$ = [
    3,
    n0,
    _LSDRi,
    0,
    [_SDS, _NT],
    [() => SuppressedDestinationSummaries, 0]
  ];
  exports.ListSuppressedDestinationsResponse$ = ListSuppressedDestinationsResponse$;
  var ListTagsForResourceRequest$ = [
    3,
    n0,
    _LTFRR,
    0,
    [_RA],
    [[0, { [_hQ]: _RA }]],
    1
  ];
  exports.ListTagsForResourceRequest$ = ListTagsForResourceRequest$;
  var ListTagsForResourceResponse$ = [
    3,
    n0,
    _LTFRRi,
    0,
    [_Ta],
    [() => TagList],
    1
  ];
  exports.ListTagsForResourceResponse$ = ListTagsForResourceResponse$;
  var ListTenantResourcesRequest$ = [
    3,
    n0,
    _LTRR,
    0,
    [_TNe, _F, _PS, _NT],
    [0, 128 | 0, 1, 0],
    1
  ];
  exports.ListTenantResourcesRequest$ = ListTenantResourcesRequest$;
  var ListTenantResourcesResponse$ = [
    3,
    n0,
    _LTRRi,
    0,
    [_TR, _NT],
    [() => TenantResourceList, 0]
  ];
  exports.ListTenantResourcesResponse$ = ListTenantResourcesResponse$;
  var ListTenantsRequest$ = [
    3,
    n0,
    _LTR,
    0,
    [_NT, _PS],
    [0, 1]
  ];
  exports.ListTenantsRequest$ = ListTenantsRequest$;
  var ListTenantsResponse$ = [
    3,
    n0,
    _LTRi,
    0,
    [_Tena, _NT],
    [() => TenantInfoList, 0]
  ];
  exports.ListTenantsResponse$ = ListTenantsResponse$;
  var MailboxValidation$ = [
    3,
    n0,
    _MV,
    0,
    [_IV, _Eva],
    [() => EmailAddressInsightsVerdict$, () => EmailAddressInsightsMailboxEvaluations$]
  ];
  exports.MailboxValidation$ = MailboxValidation$;
  var MailFromAttributes$ = [
    3,
    n0,
    _MFA,
    0,
    [_MFD, _MFDS, _BOMF],
    [0, 0, 0],
    3
  ];
  exports.MailFromAttributes$ = MailFromAttributes$;
  var Message$ = [
    3,
    n0,
    _Me,
    0,
    [_Su, _B, _He, _At],
    [() => Content$, () => Body$, () => MessageHeaderList, () => AttachmentList],
    2
  ];
  exports.Message$ = Message$;
  var MessageHeader$ = [
    3,
    n0,
    _MH,
    0,
    [_Na, _V],
    [0, 0],
    2
  ];
  exports.MessageHeader$ = MessageHeader$;
  var MessageInsightsDataSource$ = [
    3,
    n0,
    _MIDS,
    0,
    [_SD, _ED, _Inc, _Ex, _MRa],
    [4, 4, [() => MessageInsightsFilters$, 0], [() => MessageInsightsFilters$, 0], 1],
    2
  ];
  exports.MessageInsightsDataSource$ = MessageInsightsDataSource$;
  var MessageInsightsFilters$ = [
    3,
    n0,
    _MIF,
    0,
    [_FEA, _Des, _Su, _Is, _LDE, _LEEa],
    [[() => EmailAddressFilterList, 0], [() => EmailAddressFilterList, 0], [() => EmailSubjectFilterList, 0], 64 | 0, 64 | 0, 64 | 0]
  ];
  exports.MessageInsightsFilters$ = MessageInsightsFilters$;
  var MessageTag$ = [
    3,
    n0,
    _MTe,
    0,
    [_Na, _V],
    [0, 0],
    2
  ];
  exports.MessageTag$ = MessageTag$;
  var MetricDataError$ = [
    3,
    n0,
    _MDE,
    0,
    [_I, _Cod, _Me],
    [0, 0, 0]
  ];
  exports.MetricDataError$ = MetricDataError$;
  var MetricDataResult$ = [
    3,
    n0,
    _MDR,
    0,
    [_I, _Tim, _Va],
    [0, 64 | 4, 64 | 1]
  ];
  exports.MetricDataResult$ = MetricDataResult$;
  var MetricsDataSource$ = [
    3,
    n0,
    _MDSe,
    0,
    [_D, _N, _Met, _SD, _ED],
    [[2, n0, _EDxp, 0, 0, 64 | 0], 0, () => ExportMetrics, 4, 4],
    5
  ];
  exports.MetricsDataSource$ = MetricsDataSource$;
  var MultiRegionEndpoint$ = [
    3,
    n0,
    _MREu,
    0,
    [_EN, _S, _EIn, _Reg, _CTr, _LUT],
    [0, 0, 0, 64 | 0, 4, 4]
  ];
  exports.MultiRegionEndpoint$ = MultiRegionEndpoint$;
  var OverallVolume$ = [
    3,
    n0,
    _OV,
    0,
    [_VS, _RRP, _DIP],
    [() => VolumeStatistics$, 1, () => DomainIspPlacements]
  ];
  exports.OverallVolume$ = OverallVolume$;
  var PinpointDestination$ = [
    3,
    n0,
    _PD,
    0,
    [_AAp],
    [0]
  ];
  exports.PinpointDestination$ = PinpointDestination$;
  var PlacementStatistics$ = [
    3,
    n0,
    _PSl,
    0,
    [_IP, _SP, _MP, _SPp, _DP],
    [1, 1, 1, 1, 1]
  ];
  exports.PlacementStatistics$ = PlacementStatistics$;
  var PutAccountDedicatedIpWarmupAttributesRequest$ = [
    3,
    n0,
    _PADIWAR,
    0,
    [_AWE],
    [2]
  ];
  exports.PutAccountDedicatedIpWarmupAttributesRequest$ = PutAccountDedicatedIpWarmupAttributesRequest$;
  var PutAccountDedicatedIpWarmupAttributesResponse$ = [
    3,
    n0,
    _PADIWARu,
    0,
    [],
    []
  ];
  exports.PutAccountDedicatedIpWarmupAttributesResponse$ = PutAccountDedicatedIpWarmupAttributesResponse$;
  var PutAccountDetailsRequest$ = [
    3,
    n0,
    _PADR,
    0,
    [_MT, _WURL, _CL, _UCD, _ACEAd, _PAE],
    [0, [() => WebsiteURL, 0], 0, [() => UseCaseDescription, 0], [() => AdditionalContactEmailAddresses, 0], 2],
    2
  ];
  exports.PutAccountDetailsRequest$ = PutAccountDetailsRequest$;
  var PutAccountDetailsResponse$ = [
    3,
    n0,
    _PADRu,
    0,
    [],
    []
  ];
  exports.PutAccountDetailsResponse$ = PutAccountDetailsResponse$;
  var PutAccountSendingAttributesRequest$ = [
    3,
    n0,
    _PASAR,
    0,
    [_SEe],
    [2]
  ];
  exports.PutAccountSendingAttributesRequest$ = PutAccountSendingAttributesRequest$;
  var PutAccountSendingAttributesResponse$ = [
    3,
    n0,
    _PASARu,
    0,
    [],
    []
  ];
  exports.PutAccountSendingAttributesResponse$ = PutAccountSendingAttributesResponse$;
  var PutAccountSuppressionAttributesRequest$ = [
    3,
    n0,
    _PASARut,
    0,
    [_SR, _VAa],
    [64 | 0, () => SuppressionValidationAttributes$]
  ];
  exports.PutAccountSuppressionAttributesRequest$ = PutAccountSuppressionAttributesRequest$;
  var PutAccountSuppressionAttributesResponse$ = [
    3,
    n0,
    _PASARutc,
    0,
    [],
    []
  ];
  exports.PutAccountSuppressionAttributesResponse$ = PutAccountSuppressionAttributesResponse$;
  var PutAccountVdmAttributesRequest$ = [
    3,
    n0,
    _PAVAR,
    0,
    [_VA],
    [() => VdmAttributes$],
    1
  ];
  exports.PutAccountVdmAttributesRequest$ = PutAccountVdmAttributesRequest$;
  var PutAccountVdmAttributesResponse$ = [
    3,
    n0,
    _PAVARu,
    0,
    [],
    []
  ];
  exports.PutAccountVdmAttributesResponse$ = PutAccountVdmAttributesResponse$;
  var PutConfigurationSetArchivingOptionsRequest$ = [
    3,
    n0,
    _PCSAOR,
    0,
    [_CSN, _AA],
    [[0, 1], 0],
    1
  ];
  exports.PutConfigurationSetArchivingOptionsRequest$ = PutConfigurationSetArchivingOptionsRequest$;
  var PutConfigurationSetArchivingOptionsResponse$ = [
    3,
    n0,
    _PCSAORu,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetArchivingOptionsResponse$ = PutConfigurationSetArchivingOptionsResponse$;
  var PutConfigurationSetDeliveryOptionsRequest$ = [
    3,
    n0,
    _PCSDOR,
    0,
    [_CSN, _TPl, _SPN, _MDS],
    [[0, 1], 0, 0, 1],
    1
  ];
  exports.PutConfigurationSetDeliveryOptionsRequest$ = PutConfigurationSetDeliveryOptionsRequest$;
  var PutConfigurationSetDeliveryOptionsResponse$ = [
    3,
    n0,
    _PCSDORu,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetDeliveryOptionsResponse$ = PutConfigurationSetDeliveryOptionsResponse$;
  var PutConfigurationSetReputationOptionsRequest$ = [
    3,
    n0,
    _PCSROR,
    0,
    [_CSN, _RME],
    [[0, 1], 2],
    1
  ];
  exports.PutConfigurationSetReputationOptionsRequest$ = PutConfigurationSetReputationOptionsRequest$;
  var PutConfigurationSetReputationOptionsResponse$ = [
    3,
    n0,
    _PCSRORu,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetReputationOptionsResponse$ = PutConfigurationSetReputationOptionsResponse$;
  var PutConfigurationSetSendingOptionsRequest$ = [
    3,
    n0,
    _PCSSOR,
    0,
    [_CSN, _SEe],
    [[0, 1], 2],
    1
  ];
  exports.PutConfigurationSetSendingOptionsRequest$ = PutConfigurationSetSendingOptionsRequest$;
  var PutConfigurationSetSendingOptionsResponse$ = [
    3,
    n0,
    _PCSSORu,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetSendingOptionsResponse$ = PutConfigurationSetSendingOptionsResponse$;
  var PutConfigurationSetSuppressionOptionsRequest$ = [
    3,
    n0,
    _PCSSORut,
    0,
    [_CSN, _SSu, _SR, _VOa],
    [[0, 1], 0, 64 | 0, () => SuppressionValidationOptions$],
    1
  ];
  exports.PutConfigurationSetSuppressionOptionsRequest$ = PutConfigurationSetSuppressionOptionsRequest$;
  var PutConfigurationSetSuppressionOptionsResponse$ = [
    3,
    n0,
    _PCSSORuto,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetSuppressionOptionsResponse$ = PutConfigurationSetSuppressionOptionsResponse$;
  var PutConfigurationSetTrackingOptionsRequest$ = [
    3,
    n0,
    _PCSTOR,
    0,
    [_CSN, _CRD, _HP],
    [[0, 1], 0, 0],
    1
  ];
  exports.PutConfigurationSetTrackingOptionsRequest$ = PutConfigurationSetTrackingOptionsRequest$;
  var PutConfigurationSetTrackingOptionsResponse$ = [
    3,
    n0,
    _PCSTORu,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetTrackingOptionsResponse$ = PutConfigurationSetTrackingOptionsResponse$;
  var PutConfigurationSetVdmOptionsRequest$ = [
    3,
    n0,
    _PCSVOR,
    0,
    [_CSN, _VO],
    [[0, 1], () => VdmOptions$],
    1
  ];
  exports.PutConfigurationSetVdmOptionsRequest$ = PutConfigurationSetVdmOptionsRequest$;
  var PutConfigurationSetVdmOptionsResponse$ = [
    3,
    n0,
    _PCSVORu,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetVdmOptionsResponse$ = PutConfigurationSetVdmOptionsResponse$;
  var PutDedicatedIpInPoolRequest$ = [
    3,
    n0,
    _PDIIPR,
    0,
    [_Ip, _DPN],
    [[0, 1], 0],
    2
  ];
  exports.PutDedicatedIpInPoolRequest$ = PutDedicatedIpInPoolRequest$;
  var PutDedicatedIpInPoolResponse$ = [
    3,
    n0,
    _PDIIPRu,
    0,
    [],
    []
  ];
  exports.PutDedicatedIpInPoolResponse$ = PutDedicatedIpInPoolResponse$;
  var PutDedicatedIpPoolScalingAttributesRequest$ = [
    3,
    n0,
    _PDIPSAR,
    0,
    [_PN, _SM],
    [[0, 1], 0],
    2
  ];
  exports.PutDedicatedIpPoolScalingAttributesRequest$ = PutDedicatedIpPoolScalingAttributesRequest$;
  var PutDedicatedIpPoolScalingAttributesResponse$ = [
    3,
    n0,
    _PDIPSARu,
    0,
    [],
    []
  ];
  exports.PutDedicatedIpPoolScalingAttributesResponse$ = PutDedicatedIpPoolScalingAttributesResponse$;
  var PutDedicatedIpWarmupAttributesRequest$ = [
    3,
    n0,
    _PDIWAR,
    0,
    [_Ip, _WP],
    [[0, 1], 1],
    2
  ];
  exports.PutDedicatedIpWarmupAttributesRequest$ = PutDedicatedIpWarmupAttributesRequest$;
  var PutDedicatedIpWarmupAttributesResponse$ = [
    3,
    n0,
    _PDIWARu,
    0,
    [],
    []
  ];
  exports.PutDedicatedIpWarmupAttributesResponse$ = PutDedicatedIpWarmupAttributesResponse$;
  var PutDeliverabilityDashboardOptionRequest$ = [
    3,
    n0,
    _PDDOR,
    0,
    [_DE, _SDubs],
    [2, () => DomainDeliverabilityTrackingOptions],
    1
  ];
  exports.PutDeliverabilityDashboardOptionRequest$ = PutDeliverabilityDashboardOptionRequest$;
  var PutDeliverabilityDashboardOptionResponse$ = [
    3,
    n0,
    _PDDORu,
    0,
    [],
    []
  ];
  exports.PutDeliverabilityDashboardOptionResponse$ = PutDeliverabilityDashboardOptionResponse$;
  var PutEmailIdentityConfigurationSetAttributesRequest$ = [
    3,
    n0,
    _PEICSAR,
    0,
    [_EI, _CSN],
    [[0, 1], 0],
    1
  ];
  exports.PutEmailIdentityConfigurationSetAttributesRequest$ = PutEmailIdentityConfigurationSetAttributesRequest$;
  var PutEmailIdentityConfigurationSetAttributesResponse$ = [
    3,
    n0,
    _PEICSARu,
    0,
    [],
    []
  ];
  exports.PutEmailIdentityConfigurationSetAttributesResponse$ = PutEmailIdentityConfigurationSetAttributesResponse$;
  var PutEmailIdentityDkimAttributesRequest$ = [
    3,
    n0,
    _PEIDAR,
    0,
    [_EI, _SE],
    [[0, 1], 2],
    1
  ];
  exports.PutEmailIdentityDkimAttributesRequest$ = PutEmailIdentityDkimAttributesRequest$;
  var PutEmailIdentityDkimAttributesResponse$ = [
    3,
    n0,
    _PEIDARu,
    0,
    [],
    []
  ];
  exports.PutEmailIdentityDkimAttributesResponse$ = PutEmailIdentityDkimAttributesResponse$;
  var PutEmailIdentityDkimSigningAttributesRequest$ = [
    3,
    n0,
    _PEIDSAR,
    0,
    [_EI, _SAO, _SAi],
    [[0, 1], 0, [() => DkimSigningAttributes$, 0]],
    2
  ];
  exports.PutEmailIdentityDkimSigningAttributesRequest$ = PutEmailIdentityDkimSigningAttributesRequest$;
  var PutEmailIdentityDkimSigningAttributesResponse$ = [
    3,
    n0,
    _PEIDSARu,
    0,
    [_DS, _DT, _SHZ],
    [0, 64 | 0, 0]
  ];
  exports.PutEmailIdentityDkimSigningAttributesResponse$ = PutEmailIdentityDkimSigningAttributesResponse$;
  var PutEmailIdentityFeedbackAttributesRequest$ = [
    3,
    n0,
    _PEIFAR,
    0,
    [_EI, _EFE],
    [[0, 1], 2],
    1
  ];
  exports.PutEmailIdentityFeedbackAttributesRequest$ = PutEmailIdentityFeedbackAttributesRequest$;
  var PutEmailIdentityFeedbackAttributesResponse$ = [
    3,
    n0,
    _PEIFARu,
    0,
    [],
    []
  ];
  exports.PutEmailIdentityFeedbackAttributesResponse$ = PutEmailIdentityFeedbackAttributesResponse$;
  var PutEmailIdentityMailFromAttributesRequest$ = [
    3,
    n0,
    _PEIMFAR,
    0,
    [_EI, _MFD, _BOMF],
    [[0, 1], 0, 0],
    1
  ];
  exports.PutEmailIdentityMailFromAttributesRequest$ = PutEmailIdentityMailFromAttributesRequest$;
  var PutEmailIdentityMailFromAttributesResponse$ = [
    3,
    n0,
    _PEIMFARu,
    0,
    [],
    []
  ];
  exports.PutEmailIdentityMailFromAttributesResponse$ = PutEmailIdentityMailFromAttributesResponse$;
  var PutSuppressedDestinationRequest$ = [
    3,
    n0,
    _PSDR,
    0,
    [_EA, _Reas, _TNe],
    [0, 0, 0],
    2
  ];
  exports.PutSuppressedDestinationRequest$ = PutSuppressedDestinationRequest$;
  var PutSuppressedDestinationResponse$ = [
    3,
    n0,
    _PSDRu,
    0,
    [],
    []
  ];
  exports.PutSuppressedDestinationResponse$ = PutSuppressedDestinationResponse$;
  var PutTenantSuppressionAttributesRequest$ = [
    3,
    n0,
    _PTSAR,
    0,
    [_TNe, _SR, _SSu],
    [0, 64 | 0, 0],
    1
  ];
  exports.PutTenantSuppressionAttributesRequest$ = PutTenantSuppressionAttributesRequest$;
  var PutTenantSuppressionAttributesResponse$ = [
    3,
    n0,
    _PTSARu,
    0,
    [],
    []
  ];
  exports.PutTenantSuppressionAttributesResponse$ = PutTenantSuppressionAttributesResponse$;
  var RawMessage$ = [
    3,
    n0,
    _RM,
    0,
    [_Da],
    [21],
    1
  ];
  exports.RawMessage$ = RawMessage$;
  var Recommendation$ = [
    3,
    n0,
    _Rec,
    0,
    [_RA, _Ty, _De, _S, _CTr, _LUT, _Im],
    [0, 0, 0, 0, 4, 4, 0]
  ];
  exports.Recommendation$ = Recommendation$;
  var ReplacementEmailContent$ = [
    3,
    n0,
    _REC,
    0,
    [_RTep],
    [() => ReplacementTemplate$]
  ];
  exports.ReplacementEmailContent$ = ReplacementEmailContent$;
  var ReplacementTemplate$ = [
    3,
    n0,
    _RTep,
    0,
    [_RTD],
    [0]
  ];
  exports.ReplacementTemplate$ = ReplacementTemplate$;
  var ReputationEntity$ = [
    3,
    n0,
    _RE,
    0,
    [_RER, _RET, _RMP, _CMS, _ASMS, _SSA, _RIe],
    [0, 0, 0, () => StatusRecord$, () => StatusRecord$, 0, 0]
  ];
  exports.ReputationEntity$ = ReputationEntity$;
  var ReputationOptions$ = [
    3,
    n0,
    _RO,
    0,
    [_RME, _LFS],
    [2, 4]
  ];
  exports.ReputationOptions$ = ReputationOptions$;
  var ResourceTenantMetadata$ = [
    3,
    n0,
    _RTM,
    0,
    [_TNe, _TI, _RA, _AT],
    [0, 0, 0, 4]
  ];
  exports.ResourceTenantMetadata$ = ResourceTenantMetadata$;
  var ReviewDetails$ = [
    3,
    n0,
    _RD,
    0,
    [_S, _CIas],
    [0, 0]
  ];
  exports.ReviewDetails$ = ReviewDetails$;
  var Route$ = [
    3,
    n0,
    _Rou,
    0,
    [_Regi],
    [0],
    1
  ];
  exports.Route$ = Route$;
  var RouteDetails$ = [
    3,
    n0,
    _RDou,
    0,
    [_Regi],
    [0],
    1
  ];
  exports.RouteDetails$ = RouteDetails$;
  var SendBulkEmailRequest$ = [
    3,
    n0,
    _SBER,
    0,
    [_DCe, _BEEu, _FEA, _FEAIA, _RTA, _FFEA, _FFEAIA, _DET, _CSN, _EIn, _TNe],
    [() => BulkEmailContent$, () => BulkEmailEntryList, 0, 0, 64 | 0, 0, 0, () => MessageTagList, 0, 0, 0],
    2
  ];
  exports.SendBulkEmailRequest$ = SendBulkEmailRequest$;
  var SendBulkEmailResponse$ = [
    3,
    n0,
    _SBERe,
    0,
    [_BEERu],
    [() => BulkEmailEntryResultList],
    1
  ];
  exports.SendBulkEmailResponse$ = SendBulkEmailResponse$;
  var SendCustomVerificationEmailRequest$ = [
    3,
    n0,
    _SCVER,
    0,
    [_EA, _TN, _CSN],
    [0, 0, 0],
    2
  ];
  exports.SendCustomVerificationEmailRequest$ = SendCustomVerificationEmailRequest$;
  var SendCustomVerificationEmailResponse$ = [
    3,
    n0,
    _SCVERe,
    0,
    [_MI],
    [0]
  ];
  exports.SendCustomVerificationEmailResponse$ = SendCustomVerificationEmailResponse$;
  var SendEmailRequest$ = [
    3,
    n0,
    _SER,
    0,
    [_Con, _FEA, _FEAIA, _Des, _RTA, _FFEA, _FFEAIA, _ET, _CSN, _EIn, _TNe, _LMO],
    [() => EmailContent$, 0, 0, () => Destination$, 64 | 0, 0, 0, () => MessageTagList, 0, 0, 0, () => ListManagementOptions$],
    1
  ];
  exports.SendEmailRequest$ = SendEmailRequest$;
  var SendEmailResponse$ = [
    3,
    n0,
    _SERe,
    0,
    [_MI],
    [0]
  ];
  exports.SendEmailResponse$ = SendEmailResponse$;
  var SendingOptions$ = [
    3,
    n0,
    _SO,
    0,
    [_SEe],
    [2]
  ];
  exports.SendingOptions$ = SendingOptions$;
  var SendQuota$ = [
    3,
    n0,
    _SQ,
    0,
    [_MHS, _MSR, _SLH],
    [1, 1, 1]
  ];
  exports.SendQuota$ = SendQuota$;
  var SnsDestination$ = [
    3,
    n0,
    _SDn,
    0,
    [_TAop],
    [0],
    1
  ];
  exports.SnsDestination$ = SnsDestination$;
  var SOARecord$ = [
    3,
    n0,
    _SOAR,
    0,
    [_PNS, _AE, _SN],
    [0, 0, 1]
  ];
  exports.SOARecord$ = SOARecord$;
  var StatusRecord$ = [
    3,
    n0,
    _SRt,
    0,
    [_S, _Ca, _LUT],
    [0, 0, 4]
  ];
  exports.StatusRecord$ = StatusRecord$;
  var SuppressedDestination$ = [
    3,
    n0,
    _SDu,
    0,
    [_EA, _Reas, _LUTa, _Att, _TNe],
    [0, 0, 4, () => SuppressedDestinationAttributes$, 0],
    3
  ];
  exports.SuppressedDestination$ = SuppressedDestination$;
  var SuppressedDestinationAttributes$ = [
    3,
    n0,
    _SDA,
    0,
    [_MI, _FIe],
    [0, 0]
  ];
  exports.SuppressedDestinationAttributes$ = SuppressedDestinationAttributes$;
  var SuppressedDestinationSummary$ = [
    3,
    n0,
    _SDSu,
    0,
    [_EA, _Reas, _LUTa],
    [0, 0, 4],
    3
  ];
  exports.SuppressedDestinationSummary$ = SuppressedDestinationSummary$;
  var SuppressionAttributes$ = [
    3,
    n0,
    _SA,
    0,
    [_SR, _VAa],
    [64 | 0, () => SuppressionValidationAttributes$]
  ];
  exports.SuppressionAttributes$ = SuppressionAttributes$;
  var SuppressionConditionThreshold$ = [
    3,
    n0,
    _SCT,
    0,
    [_CTEo, _OCT],
    [0, () => SuppressionConfidenceThreshold$],
    1
  ];
  exports.SuppressionConditionThreshold$ = SuppressionConditionThreshold$;
  var SuppressionConfidenceThreshold$ = [
    3,
    n0,
    _SCTu,
    0,
    [_CVT],
    [0],
    1
  ];
  exports.SuppressionConfidenceThreshold$ = SuppressionConfidenceThreshold$;
  var SuppressionListDestination$ = [
    3,
    n0,
    _SLD,
    0,
    [_SLIA],
    [0],
    1
  ];
  exports.SuppressionListDestination$ = SuppressionListDestination$;
  var SuppressionOptions$ = [
    3,
    n0,
    _SOu,
    0,
    [_SR, _SSu, _VOa],
    [64 | 0, 0, () => SuppressionValidationOptions$]
  ];
  exports.SuppressionOptions$ = SuppressionOptions$;
  var SuppressionValidationAttributes$ = [
    3,
    n0,
    _SVA,
    0,
    [_CTon],
    [() => SuppressionConditionThreshold$],
    1
  ];
  exports.SuppressionValidationAttributes$ = SuppressionValidationAttributes$;
  var SuppressionValidationOptions$ = [
    3,
    n0,
    _SVO,
    0,
    [_CTon],
    [() => SuppressionConditionThreshold$],
    1
  ];
  exports.SuppressionValidationOptions$ = SuppressionValidationOptions$;
  var Tag$ = [
    3,
    n0,
    _Tag,
    0,
    [_K, _V],
    [0, 0],
    2
  ];
  exports.Tag$ = Tag$;
  var TagResourceRequest$ = [
    3,
    n0,
    _TRR,
    0,
    [_RA, _Ta],
    [0, () => TagList],
    2
  ];
  exports.TagResourceRequest$ = TagResourceRequest$;
  var TagResourceResponse$ = [
    3,
    n0,
    _TRRa,
    0,
    [],
    []
  ];
  exports.TagResourceResponse$ = TagResourceResponse$;
  var Template$ = [
    3,
    n0,
    _Te,
    0,
    [_TN, _TAe, _TC, _TD, _He, _At],
    [0, 0, () => EmailTemplateContent$, 0, () => MessageHeaderList, () => AttachmentList]
  ];
  exports.Template$ = Template$;
  var Tenant$ = [
    3,
    n0,
    _Ten,
    0,
    [_TNe, _TI, _TA, _CTr, _Ta, _SS, _SA],
    [0, 0, 0, 4, () => TagList, 0, () => TenantSuppressionAttributes$]
  ];
  exports.Tenant$ = Tenant$;
  var TenantInfo$ = [
    3,
    n0,
    _TIe,
    0,
    [_TNe, _TI, _TA, _CTr],
    [0, 0, 0, 4]
  ];
  exports.TenantInfo$ = TenantInfo$;
  var TenantResource$ = [
    3,
    n0,
    _TRe,
    0,
    [_RTes, _RA],
    [0, 0]
  ];
  exports.TenantResource$ = TenantResource$;
  var TenantSuppressionAttributes$ = [
    3,
    n0,
    _TSA,
    0,
    [_SR, _SSu],
    [64 | 0, 0]
  ];
  exports.TenantSuppressionAttributes$ = TenantSuppressionAttributes$;
  var TestRenderEmailTemplateRequest$ = [
    3,
    n0,
    _TRETR,
    0,
    [_TN, _TD],
    [[0, 1], 0],
    2
  ];
  exports.TestRenderEmailTemplateRequest$ = TestRenderEmailTemplateRequest$;
  var TestRenderEmailTemplateResponse$ = [
    3,
    n0,
    _TRETRe,
    0,
    [_RTen],
    [0],
    1
  ];
  exports.TestRenderEmailTemplateResponse$ = TestRenderEmailTemplateResponse$;
  var Topic$ = [
    3,
    n0,
    _Top,
    0,
    [_TNo, _DNi, _DSSe, _De],
    [0, 0, 0, 0],
    3
  ];
  exports.Topic$ = Topic$;
  var TopicFilter$ = [
    3,
    n0,
    _TF,
    0,
    [_TNo, _UDIPU],
    [0, 2]
  ];
  exports.TopicFilter$ = TopicFilter$;
  var TopicPreference$ = [
    3,
    n0,
    _TPo,
    0,
    [_TNo, _SSub],
    [0, 0],
    2
  ];
  exports.TopicPreference$ = TopicPreference$;
  var TrackingOptions$ = [
    3,
    n0,
    _TO,
    0,
    [_CRD, _HP],
    [0, 0],
    1
  ];
  exports.TrackingOptions$ = TrackingOptions$;
  var UntagResourceRequest$ = [
    3,
    n0,
    _URR,
    0,
    [_RA, _TK],
    [[0, { [_hQ]: _RA }], [64 | 0, { [_hQ]: _TK }]],
    2
  ];
  exports.UntagResourceRequest$ = UntagResourceRequest$;
  var UntagResourceResponse$ = [
    3,
    n0,
    _URRn,
    0,
    [],
    []
  ];
  exports.UntagResourceResponse$ = UntagResourceResponse$;
  var UpdateConfigurationSetEventDestinationRequest$ = [
    3,
    n0,
    _UCSEDR,
    0,
    [_CSN, _EDN, _EDv],
    [[0, 1], [0, 1], () => EventDestinationDefinition$],
    3
  ];
  exports.UpdateConfigurationSetEventDestinationRequest$ = UpdateConfigurationSetEventDestinationRequest$;
  var UpdateConfigurationSetEventDestinationResponse$ = [
    3,
    n0,
    _UCSEDRp,
    0,
    [],
    []
  ];
  exports.UpdateConfigurationSetEventDestinationResponse$ = UpdateConfigurationSetEventDestinationResponse$;
  var UpdateContactListRequest$ = [
    3,
    n0,
    _UCLR,
    0,
    [_CLN, _To, _De],
    [[0, 1], () => Topics, 0],
    1
  ];
  exports.UpdateContactListRequest$ = UpdateContactListRequest$;
  var UpdateContactListResponse$ = [
    3,
    n0,
    _UCLRp,
    0,
    [],
    []
  ];
  exports.UpdateContactListResponse$ = UpdateContactListResponse$;
  var UpdateContactRequest$ = [
    3,
    n0,
    _UCR,
    0,
    [_CLN, _EA, _TP, _UA, _ADt],
    [[0, 1], [0, 1], () => TopicPreferenceList, 2, 0],
    2
  ];
  exports.UpdateContactRequest$ = UpdateContactRequest$;
  var UpdateContactResponse$ = [
    3,
    n0,
    _UCRp,
    0,
    [],
    []
  ];
  exports.UpdateContactResponse$ = UpdateContactResponse$;
  var UpdateCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _UCVETR,
    0,
    [_TN, _FEA, _TS, _TC, _SRURL, _FRURL],
    [[0, 1], 0, 0, 0, 0, 0],
    6
  ];
  exports.UpdateCustomVerificationEmailTemplateRequest$ = UpdateCustomVerificationEmailTemplateRequest$;
  var UpdateCustomVerificationEmailTemplateResponse$ = [
    3,
    n0,
    _UCVETRp,
    0,
    [],
    []
  ];
  exports.UpdateCustomVerificationEmailTemplateResponse$ = UpdateCustomVerificationEmailTemplateResponse$;
  var UpdateEmailIdentityPolicyRequest$ = [
    3,
    n0,
    _UEIPR,
    0,
    [_EI, _PNo, _P],
    [[0, 1], [0, 1], 0],
    3
  ];
  exports.UpdateEmailIdentityPolicyRequest$ = UpdateEmailIdentityPolicyRequest$;
  var UpdateEmailIdentityPolicyResponse$ = [
    3,
    n0,
    _UEIPRp,
    0,
    [],
    []
  ];
  exports.UpdateEmailIdentityPolicyResponse$ = UpdateEmailIdentityPolicyResponse$;
  var UpdateEmailTemplateRequest$ = [
    3,
    n0,
    _UETR,
    0,
    [_TN, _TC],
    [[0, 1], () => EmailTemplateContent$],
    2
  ];
  exports.UpdateEmailTemplateRequest$ = UpdateEmailTemplateRequest$;
  var UpdateEmailTemplateResponse$ = [
    3,
    n0,
    _UETRp,
    0,
    [],
    []
  ];
  exports.UpdateEmailTemplateResponse$ = UpdateEmailTemplateResponse$;
  var UpdateReputationEntityCustomerManagedStatusRequest$ = [
    3,
    n0,
    _URECMSR,
    0,
    [_RET, _RER, _SS],
    [[0, 1], [0, 1], 0],
    3
  ];
  exports.UpdateReputationEntityCustomerManagedStatusRequest$ = UpdateReputationEntityCustomerManagedStatusRequest$;
  var UpdateReputationEntityCustomerManagedStatusResponse$ = [
    3,
    n0,
    _URECMSRp,
    0,
    [],
    []
  ];
  exports.UpdateReputationEntityCustomerManagedStatusResponse$ = UpdateReputationEntityCustomerManagedStatusResponse$;
  var UpdateReputationEntityPolicyRequest$ = [
    3,
    n0,
    _UREPR,
    0,
    [_RET, _RER, _REP],
    [[0, 1], [0, 1], 0],
    3
  ];
  exports.UpdateReputationEntityPolicyRequest$ = UpdateReputationEntityPolicyRequest$;
  var UpdateReputationEntityPolicyResponse$ = [
    3,
    n0,
    _UREPRp,
    0,
    [],
    []
  ];
  exports.UpdateReputationEntityPolicyResponse$ = UpdateReputationEntityPolicyResponse$;
  var VdmAttributes$ = [
    3,
    n0,
    _VA,
    0,
    [_VE, _DAa, _GA],
    [0, () => DashboardAttributes$, () => GuardianAttributes$],
    1
  ];
  exports.VdmAttributes$ = VdmAttributes$;
  var VdmOptions$ = [
    3,
    n0,
    _VO,
    0,
    [_DOa, _GO],
    [() => DashboardOptions$, () => GuardianOptions$]
  ];
  exports.VdmOptions$ = VdmOptions$;
  var VerificationInfo$ = [
    3,
    n0,
    _VI,
    0,
    [_LCT, _LST, _ETr, _SOAR],
    [4, 4, 0, () => SOARecord$]
  ];
  exports.VerificationInfo$ = VerificationInfo$;
  var VolumeStatistics$ = [
    3,
    n0,
    _VS,
    0,
    [_IRC, _SRC, _PI, _PSr],
    [1, 1, 1, 1]
  ];
  exports.VolumeStatistics$ = VolumeStatistics$;
  var AdditionalContactEmailAddresses = [
    1,
    n0,
    _ACEAd,
    8,
    [
      () => AdditionalContactEmailAddress,
      0
    ]
  ];
  var AttachmentList = [
    1,
    n0,
    _AL,
    0,
    () => Attachment$
  ];
  var BatchGetMetricDataQueries = [
    1,
    n0,
    _BGMDQa,
    0,
    () => BatchGetMetricDataQuery$
  ];
  var BlacklistEntries = [
    1,
    n0,
    _BEl,
    0,
    () => BlacklistEntry$
  ];
  var BlacklistItemNames = 64 | 0;
  var BulkEmailEntryList = [
    1,
    n0,
    _BEEL,
    0,
    () => BulkEmailEntry$
  ];
  var BulkEmailEntryResultList = [
    1,
    n0,
    _BEERL,
    0,
    () => BulkEmailEntryResult$
  ];
  var CloudWatchDimensionConfigurations = [
    1,
    n0,
    _CWDCl,
    0,
    () => CloudWatchDimensionConfiguration$
  ];
  var ConfigurationSetNameList = 64 | 0;
  var CustomVerificationEmailTemplatesList = [
    1,
    n0,
    _CVETL,
    0,
    () => CustomVerificationEmailTemplateMetadata$
  ];
  var DailyVolumes = [
    1,
    n0,
    _DVa,
    0,
    () => DailyVolume$
  ];
  var DedicatedIpList = [
    1,
    n0,
    _DIL,
    0,
    () => DedicatedIp$
  ];
  var DeliverabilityTestReports = [
    1,
    n0,
    _DTReli,
    0,
    () => DeliverabilityTestReport$
  ];
  var DnsTokenList = 64 | 0;
  var DomainDeliverabilityCampaignList = [
    1,
    n0,
    _DDCL,
    0,
    () => DomainDeliverabilityCampaign$
  ];
  var DomainDeliverabilityTrackingOptions = [
    1,
    n0,
    _DDTOo,
    0,
    () => DomainDeliverabilityTrackingOption$
  ];
  var DomainIspPlacements = [
    1,
    n0,
    _DIP,
    0,
    () => DomainIspPlacement$
  ];
  var EmailAddressFilterList = [
    1,
    n0,
    _EAFL,
    0,
    [
      () => InsightsEmailAddress,
      0
    ]
  ];
  var EmailAddressList = 64 | 0;
  var EmailInsightsList = [
    1,
    n0,
    _EIL,
    0,
    [
      () => EmailInsights$,
      0
    ]
  ];
  var EmailSubjectFilterList = [
    1,
    n0,
    _ESFL,
    0,
    [
      () => EmailSubject,
      0
    ]
  ];
  var EmailTemplateMetadataList = [
    1,
    n0,
    _ETML,
    0,
    () => EmailTemplateMetadata$
  ];
  var Esps = 64 | 0;
  var EventDestinations = [
    1,
    n0,
    _EDven,
    0,
    () => EventDestination$
  ];
  var EventTypes = 64 | 0;
  var ExportDimensionValue = 64 | 0;
  var ExportJobSummaryList = [
    1,
    n0,
    _EJSL,
    0,
    () => ExportJobSummary$
  ];
  var ExportMetrics = [
    1,
    n0,
    _EMxp,
    0,
    () => ExportMetric$
  ];
  var IdentityInfoList = [
    1,
    n0,
    _IIL,
    0,
    () => IdentityInfo$
  ];
  var ImportJobSummaryList = [
    1,
    n0,
    _IJSL,
    0,
    () => ImportJobSummary$
  ];
  var InsightsEvents = [
    1,
    n0,
    _IEn,
    0,
    () => InsightsEvent$
  ];
  var IpList = 64 | 0;
  var IspFilterList = 64 | 0;
  var IspNameList = 64 | 0;
  var IspPlacements = [
    1,
    n0,
    _IPs,
    0,
    () => IspPlacement$
  ];
  var LastDeliveryEventList = 64 | 0;
  var LastEngagementEventList = 64 | 0;
  var ListOfContactLists = [
    1,
    n0,
    _LOCL,
    0,
    () => ContactList$
  ];
  var ListOfContacts = [
    1,
    n0,
    _LOC,
    0,
    () => Contact$
  ];
  var ListOfDedicatedIpPools = 64 | 0;
  var MessageHeaderList = [
    1,
    n0,
    _MHL,
    0,
    () => MessageHeader$
  ];
  var MessageTagList = [
    1,
    n0,
    _MTL,
    0,
    () => MessageTag$
  ];
  var MetricDataErrorList = [
    1,
    n0,
    _MDEL,
    0,
    () => MetricDataError$
  ];
  var MetricDataResultList = [
    1,
    n0,
    _MDRL,
    0,
    () => MetricDataResult$
  ];
  var MetricValueList = 64 | 1;
  var MultiRegionEndpoints = [
    1,
    n0,
    _MRE,
    0,
    () => MultiRegionEndpoint$
  ];
  var RecommendationsList = [
    1,
    n0,
    _RL,
    0,
    () => Recommendation$
  ];
  var Regions = 64 | 0;
  var ReputationEntitiesList = [
    1,
    n0,
    _REL,
    0,
    () => ReputationEntity$
  ];
  var ResourceTenantMetadataList = [
    1,
    n0,
    _RTML,
    0,
    () => ResourceTenantMetadata$
  ];
  var Routes = [
    1,
    n0,
    _Ro,
    0,
    () => Route$
  ];
  var RoutesDetails = [
    1,
    n0,
    _RDo,
    0,
    () => RouteDetails$
  ];
  var SuppressedDestinationSummaries = [
    1,
    n0,
    _SDS,
    0,
    () => SuppressedDestinationSummary$
  ];
  var SuppressionListReasons = 64 | 0;
  var TagKeyList = 64 | 0;
  var TagList = [
    1,
    n0,
    _TL,
    0,
    () => Tag$
  ];
  var TenantInfoList = [
    1,
    n0,
    _TIL,
    0,
    () => TenantInfo$
  ];
  var TenantResourceList = [
    1,
    n0,
    _TRL,
    0,
    () => TenantResource$
  ];
  var TimestampList = 64 | 4;
  var TopicPreferenceList = [
    1,
    n0,
    _TPL,
    0,
    () => TopicPreference$
  ];
  var Topics = [
    1,
    n0,
    _To,
    0,
    () => Topic$
  ];
  var BlacklistReport = [
    2,
    n0,
    _BR,
    0,
    0,
    () => BlacklistEntries
  ];
  var Dimensions = 128 | 0;
  var ExportDimensions = [
    2,
    n0,
    _EDxp,
    0,
    0,
    64 | 0
  ];
  var ListRecommendationsFilter = 128 | 0;
  var ListTenantResourcesFilter = 128 | 0;
  var PolicyMap = 128 | 0;
  var ReputationEntityFilter = 128 | 0;
  exports.BatchGetMetricData$ = [
    9,
    n0,
    _BGMD,
    { [_h]: ["POST", "/v2/email/metrics/batch", 200] },
    () => BatchGetMetricDataRequest$,
    () => BatchGetMetricDataResponse$
  ];
  exports.CancelExportJob$ = [
    9,
    n0,
    _CEJ,
    { [_h]: ["PUT", "/v2/email/export-jobs/{JobId}/cancel", 200] },
    () => CancelExportJobRequest$,
    () => CancelExportJobResponse$
  ];
  exports.CreateConfigurationSet$ = [
    9,
    n0,
    _CCS,
    { [_h]: ["POST", "/v2/email/configuration-sets", 200] },
    () => CreateConfigurationSetRequest$,
    () => CreateConfigurationSetResponse$
  ];
  exports.CreateConfigurationSetEventDestination$ = [
    9,
    n0,
    _CCSED,
    { [_h]: ["POST", "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations", 200] },
    () => CreateConfigurationSetEventDestinationRequest$,
    () => CreateConfigurationSetEventDestinationResponse$
  ];
  exports.CreateContact$ = [
    9,
    n0,
    _CC,
    { [_h]: ["POST", "/v2/email/contact-lists/{ContactListName}/contacts", 200] },
    () => CreateContactRequest$,
    () => CreateContactResponse$
  ];
  exports.CreateContactList$ = [
    9,
    n0,
    _CCL,
    { [_h]: ["POST", "/v2/email/contact-lists", 200] },
    () => CreateContactListRequest$,
    () => CreateContactListResponse$
  ];
  exports.CreateCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _CCVET,
    { [_h]: ["POST", "/v2/email/custom-verification-email-templates", 200] },
    () => CreateCustomVerificationEmailTemplateRequest$,
    () => CreateCustomVerificationEmailTemplateResponse$
  ];
  exports.CreateDedicatedIpPool$ = [
    9,
    n0,
    _CDIP,
    { [_h]: ["POST", "/v2/email/dedicated-ip-pools", 200] },
    () => CreateDedicatedIpPoolRequest$,
    () => CreateDedicatedIpPoolResponse$
  ];
  exports.CreateDeliverabilityTestReport$ = [
    9,
    n0,
    _CDTR,
    { [_h]: ["POST", "/v2/email/deliverability-dashboard/test", 200] },
    () => CreateDeliverabilityTestReportRequest$,
    () => CreateDeliverabilityTestReportResponse$
  ];
  exports.CreateEmailIdentity$ = [
    9,
    n0,
    _CEI,
    { [_h]: ["POST", "/v2/email/identities", 200] },
    () => CreateEmailIdentityRequest$,
    () => CreateEmailIdentityResponse$
  ];
  exports.CreateEmailIdentityPolicy$ = [
    9,
    n0,
    _CEIP,
    { [_h]: ["POST", "/v2/email/identities/{EmailIdentity}/policies/{PolicyName}", 200] },
    () => CreateEmailIdentityPolicyRequest$,
    () => CreateEmailIdentityPolicyResponse$
  ];
  exports.CreateEmailTemplate$ = [
    9,
    n0,
    _CET,
    { [_h]: ["POST", "/v2/email/templates", 200] },
    () => CreateEmailTemplateRequest$,
    () => CreateEmailTemplateResponse$
  ];
  exports.CreateExportJob$ = [
    9,
    n0,
    _CEJr,
    { [_h]: ["POST", "/v2/email/export-jobs", 200] },
    () => CreateExportJobRequest$,
    () => CreateExportJobResponse$
  ];
  exports.CreateImportJob$ = [
    9,
    n0,
    _CIJ,
    { [_h]: ["POST", "/v2/email/import-jobs", 200] },
    () => CreateImportJobRequest$,
    () => CreateImportJobResponse$
  ];
  exports.CreateMultiRegionEndpoint$ = [
    9,
    n0,
    _CMRE,
    { [_h]: ["POST", "/v2/email/multi-region-endpoints", 200] },
    () => CreateMultiRegionEndpointRequest$,
    () => CreateMultiRegionEndpointResponse$
  ];
  exports.CreateTenant$ = [
    9,
    n0,
    _CTre,
    { [_h]: ["POST", "/v2/email/tenants", 200] },
    () => CreateTenantRequest$,
    () => CreateTenantResponse$
  ];
  exports.CreateTenantResourceAssociation$ = [
    9,
    n0,
    _CTRA,
    { [_h]: ["POST", "/v2/email/tenants/resources", 200] },
    () => CreateTenantResourceAssociationRequest$,
    () => CreateTenantResourceAssociationResponse$
  ];
  exports.DeleteConfigurationSet$ = [
    9,
    n0,
    _DCS,
    { [_h]: ["DELETE", "/v2/email/configuration-sets/{ConfigurationSetName}", 200] },
    () => DeleteConfigurationSetRequest$,
    () => DeleteConfigurationSetResponse$
  ];
  exports.DeleteConfigurationSetEventDestination$ = [
    9,
    n0,
    _DCSED,
    { [_h]: ["DELETE", "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}", 200] },
    () => DeleteConfigurationSetEventDestinationRequest$,
    () => DeleteConfigurationSetEventDestinationResponse$
  ];
  exports.DeleteContact$ = [
    9,
    n0,
    _DCel,
    { [_h]: ["DELETE", "/v2/email/contact-lists/{ContactListName}/contacts/{EmailAddress}", 200] },
    () => DeleteContactRequest$,
    () => DeleteContactResponse$
  ];
  exports.DeleteContactList$ = [
    9,
    n0,
    _DCL,
    { [_h]: ["DELETE", "/v2/email/contact-lists/{ContactListName}", 200] },
    () => DeleteContactListRequest$,
    () => DeleteContactListResponse$
  ];
  exports.DeleteCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _DCVET,
    { [_h]: ["DELETE", "/v2/email/custom-verification-email-templates/{TemplateName}", 200] },
    () => DeleteCustomVerificationEmailTemplateRequest$,
    () => DeleteCustomVerificationEmailTemplateResponse$
  ];
  exports.DeleteDedicatedIpPool$ = [
    9,
    n0,
    _DDIP,
    { [_h]: ["DELETE", "/v2/email/dedicated-ip-pools/{PoolName}", 200] },
    () => DeleteDedicatedIpPoolRequest$,
    () => DeleteDedicatedIpPoolResponse$
  ];
  exports.DeleteEmailIdentity$ = [
    9,
    n0,
    _DEI,
    { [_h]: ["DELETE", "/v2/email/identities/{EmailIdentity}", 200] },
    () => DeleteEmailIdentityRequest$,
    () => DeleteEmailIdentityResponse$
  ];
  exports.DeleteEmailIdentityPolicy$ = [
    9,
    n0,
    _DEIP,
    { [_h]: ["DELETE", "/v2/email/identities/{EmailIdentity}/policies/{PolicyName}", 200] },
    () => DeleteEmailIdentityPolicyRequest$,
    () => DeleteEmailIdentityPolicyResponse$
  ];
  exports.DeleteEmailTemplate$ = [
    9,
    n0,
    _DETe,
    { [_h]: ["DELETE", "/v2/email/templates/{TemplateName}", 200] },
    () => DeleteEmailTemplateRequest$,
    () => DeleteEmailTemplateResponse$
  ];
  exports.DeleteMultiRegionEndpoint$ = [
    9,
    n0,
    _DMRE,
    { [_h]: ["DELETE", "/v2/email/multi-region-endpoints/{EndpointName}", 200] },
    () => DeleteMultiRegionEndpointRequest$,
    () => DeleteMultiRegionEndpointResponse$
  ];
  exports.DeleteSuppressedDestination$ = [
    9,
    n0,
    _DSD,
    { [_h]: ["DELETE", "/v2/email/suppression/addresses/{EmailAddress}", 200] },
    () => DeleteSuppressedDestinationRequest$,
    () => DeleteSuppressedDestinationResponse$
  ];
  exports.DeleteTenant$ = [
    9,
    n0,
    _DTe,
    { [_h]: ["POST", "/v2/email/tenants/delete", 200] },
    () => DeleteTenantRequest$,
    () => DeleteTenantResponse$
  ];
  exports.DeleteTenantResourceAssociation$ = [
    9,
    n0,
    _DTRA,
    { [_h]: ["POST", "/v2/email/tenants/resources/delete", 200] },
    () => DeleteTenantResourceAssociationRequest$,
    () => DeleteTenantResourceAssociationResponse$
  ];
  exports.GetAccount$ = [
    9,
    n0,
    _GAe,
    { [_h]: ["GET", "/v2/email/account", 200] },
    () => GetAccountRequest$,
    () => GetAccountResponse$
  ];
  exports.GetBlacklistReports$ = [
    9,
    n0,
    _GBR,
    { [_h]: ["GET", "/v2/email/deliverability-dashboard/blacklist-report", 200] },
    () => GetBlacklistReportsRequest$,
    () => GetBlacklistReportsResponse$
  ];
  exports.GetConfigurationSet$ = [
    9,
    n0,
    _GCS,
    { [_h]: ["GET", "/v2/email/configuration-sets/{ConfigurationSetName}", 200] },
    () => GetConfigurationSetRequest$,
    () => GetConfigurationSetResponse$
  ];
  exports.GetConfigurationSetEventDestinations$ = [
    9,
    n0,
    _GCSED,
    { [_h]: ["GET", "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations", 200] },
    () => GetConfigurationSetEventDestinationsRequest$,
    () => GetConfigurationSetEventDestinationsResponse$
  ];
  exports.GetContact$ = [
    9,
    n0,
    _GC,
    { [_h]: ["GET", "/v2/email/contact-lists/{ContactListName}/contacts/{EmailAddress}", 200] },
    () => GetContactRequest$,
    () => GetContactResponse$
  ];
  exports.GetContactList$ = [
    9,
    n0,
    _GCL,
    { [_h]: ["GET", "/v2/email/contact-lists/{ContactListName}", 200] },
    () => GetContactListRequest$,
    () => GetContactListResponse$
  ];
  exports.GetCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _GCVET,
    { [_h]: ["GET", "/v2/email/custom-verification-email-templates/{TemplateName}", 200] },
    () => GetCustomVerificationEmailTemplateRequest$,
    () => GetCustomVerificationEmailTemplateResponse$
  ];
  exports.GetDedicatedIp$ = [
    9,
    n0,
    _GDI,
    { [_h]: ["GET", "/v2/email/dedicated-ips/{Ip}", 200] },
    () => GetDedicatedIpRequest$,
    () => GetDedicatedIpResponse$
  ];
  exports.GetDedicatedIpPool$ = [
    9,
    n0,
    _GDIP,
    { [_h]: ["GET", "/v2/email/dedicated-ip-pools/{PoolName}", 200] },
    () => GetDedicatedIpPoolRequest$,
    () => GetDedicatedIpPoolResponse$
  ];
  exports.GetDedicatedIps$ = [
    9,
    n0,
    _GDIe,
    { [_h]: ["GET", "/v2/email/dedicated-ips", 200] },
    () => GetDedicatedIpsRequest$,
    () => GetDedicatedIpsResponse$
  ];
  exports.GetDeliverabilityDashboardOptions$ = [
    9,
    n0,
    _GDDO,
    { [_h]: ["GET", "/v2/email/deliverability-dashboard", 200] },
    () => GetDeliverabilityDashboardOptionsRequest$,
    () => GetDeliverabilityDashboardOptionsResponse$
  ];
  exports.GetDeliverabilityTestReport$ = [
    9,
    n0,
    _GDTR,
    { [_h]: ["GET", "/v2/email/deliverability-dashboard/test-reports/{ReportId}", 200] },
    () => GetDeliverabilityTestReportRequest$,
    () => GetDeliverabilityTestReportResponse$
  ];
  exports.GetDomainDeliverabilityCampaign$ = [
    9,
    n0,
    _GDDC,
    { [_h]: ["GET", "/v2/email/deliverability-dashboard/campaigns/{CampaignId}", 200] },
    () => GetDomainDeliverabilityCampaignRequest$,
    () => GetDomainDeliverabilityCampaignResponse$
  ];
  exports.GetDomainStatisticsReport$ = [
    9,
    n0,
    _GDSR,
    { [_h]: ["GET", "/v2/email/deliverability-dashboard/statistics-report/{Domain}", 200] },
    () => GetDomainStatisticsReportRequest$,
    () => GetDomainStatisticsReportResponse$
  ];
  exports.GetEmailAddressInsights$ = [
    9,
    n0,
    _GEAI,
    { [_h]: ["POST", "/v2/email/email-address-insights", 200] },
    () => GetEmailAddressInsightsRequest$,
    () => GetEmailAddressInsightsResponse$
  ];
  exports.GetEmailIdentity$ = [
    9,
    n0,
    _GEI,
    { [_h]: ["GET", "/v2/email/identities/{EmailIdentity}", 200] },
    () => GetEmailIdentityRequest$,
    () => GetEmailIdentityResponse$
  ];
  exports.GetEmailIdentityPolicies$ = [
    9,
    n0,
    _GEIP,
    { [_h]: ["GET", "/v2/email/identities/{EmailIdentity}/policies", 200] },
    () => GetEmailIdentityPoliciesRequest$,
    () => GetEmailIdentityPoliciesResponse$
  ];
  exports.GetEmailTemplate$ = [
    9,
    n0,
    _GET,
    { [_h]: ["GET", "/v2/email/templates/{TemplateName}", 200] },
    () => GetEmailTemplateRequest$,
    () => GetEmailTemplateResponse$
  ];
  exports.GetExportJob$ = [
    9,
    n0,
    _GEJ,
    { [_h]: ["GET", "/v2/email/export-jobs/{JobId}", 200] },
    () => GetExportJobRequest$,
    () => GetExportJobResponse$
  ];
  exports.GetImportJob$ = [
    9,
    n0,
    _GIJ,
    { [_h]: ["GET", "/v2/email/import-jobs/{JobId}", 200] },
    () => GetImportJobRequest$,
    () => GetImportJobResponse$
  ];
  exports.GetMessageInsights$ = [
    9,
    n0,
    _GMI,
    { [_h]: ["GET", "/v2/email/insights/{MessageId}", 200] },
    () => GetMessageInsightsRequest$,
    () => GetMessageInsightsResponse$
  ];
  exports.GetMultiRegionEndpoint$ = [
    9,
    n0,
    _GMRE,
    { [_h]: ["GET", "/v2/email/multi-region-endpoints/{EndpointName}", 200] },
    () => GetMultiRegionEndpointRequest$,
    () => GetMultiRegionEndpointResponse$
  ];
  exports.GetReputationEntity$ = [
    9,
    n0,
    _GRE,
    { [_h]: ["GET", "/v2/email/reputation/entities/{ReputationEntityType}/{ReputationEntityReference}", 200] },
    () => GetReputationEntityRequest$,
    () => GetReputationEntityResponse$
  ];
  exports.GetSuppressedDestination$ = [
    9,
    n0,
    _GSD,
    { [_h]: ["GET", "/v2/email/suppression/addresses/{EmailAddress}", 200] },
    () => GetSuppressedDestinationRequest$,
    () => GetSuppressedDestinationResponse$
  ];
  exports.GetTenant$ = [
    9,
    n0,
    _GT,
    { [_h]: ["POST", "/v2/email/tenants/get", 200] },
    () => GetTenantRequest$,
    () => GetTenantResponse$
  ];
  exports.ListConfigurationSets$ = [
    9,
    n0,
    _LCS,
    { [_h]: ["GET", "/v2/email/configuration-sets", 200] },
    () => ListConfigurationSetsRequest$,
    () => ListConfigurationSetsResponse$
  ];
  exports.ListContactLists$ = [
    9,
    n0,
    _LCL,
    { [_h]: ["GET", "/v2/email/contact-lists", 200] },
    () => ListContactListsRequest$,
    () => ListContactListsResponse$
  ];
  exports.ListContacts$ = [
    9,
    n0,
    _LC,
    { [_h]: ["POST", "/v2/email/contact-lists/{ContactListName}/contacts/list", 200] },
    () => ListContactsRequest$,
    () => ListContactsResponse$
  ];
  exports.ListCustomVerificationEmailTemplates$ = [
    9,
    n0,
    _LCVET,
    { [_h]: ["GET", "/v2/email/custom-verification-email-templates", 200] },
    () => ListCustomVerificationEmailTemplatesRequest$,
    () => ListCustomVerificationEmailTemplatesResponse$
  ];
  exports.ListDedicatedIpPools$ = [
    9,
    n0,
    _LDIP,
    { [_h]: ["GET", "/v2/email/dedicated-ip-pools", 200] },
    () => ListDedicatedIpPoolsRequest$,
    () => ListDedicatedIpPoolsResponse$
  ];
  exports.ListDeliverabilityTestReports$ = [
    9,
    n0,
    _LDTR,
    { [_h]: ["GET", "/v2/email/deliverability-dashboard/test-reports", 200] },
    () => ListDeliverabilityTestReportsRequest$,
    () => ListDeliverabilityTestReportsResponse$
  ];
  exports.ListDomainDeliverabilityCampaigns$ = [
    9,
    n0,
    _LDDC,
    { [_h]: ["GET", "/v2/email/deliverability-dashboard/domains/{SubscribedDomain}/campaigns", 200] },
    () => ListDomainDeliverabilityCampaignsRequest$,
    () => ListDomainDeliverabilityCampaignsResponse$
  ];
  exports.ListEmailIdentities$ = [
    9,
    n0,
    _LEI,
    { [_h]: ["GET", "/v2/email/identities", 200] },
    () => ListEmailIdentitiesRequest$,
    () => ListEmailIdentitiesResponse$
  ];
  exports.ListEmailTemplates$ = [
    9,
    n0,
    _LET,
    { [_h]: ["GET", "/v2/email/templates", 200] },
    () => ListEmailTemplatesRequest$,
    () => ListEmailTemplatesResponse$
  ];
  exports.ListExportJobs$ = [
    9,
    n0,
    _LEJ,
    { [_h]: ["POST", "/v2/email/list-export-jobs", 200] },
    () => ListExportJobsRequest$,
    () => ListExportJobsResponse$
  ];
  exports.ListImportJobs$ = [
    9,
    n0,
    _LIJ,
    { [_h]: ["POST", "/v2/email/import-jobs/list", 200] },
    () => ListImportJobsRequest$,
    () => ListImportJobsResponse$
  ];
  exports.ListMultiRegionEndpoints$ = [
    9,
    n0,
    _LMRE,
    { [_h]: ["GET", "/v2/email/multi-region-endpoints", 200] },
    () => ListMultiRegionEndpointsRequest$,
    () => ListMultiRegionEndpointsResponse$
  ];
  exports.ListRecommendations$ = [
    9,
    n0,
    _LR,
    { [_h]: ["POST", "/v2/email/vdm/recommendations", 200] },
    () => ListRecommendationsRequest$,
    () => ListRecommendationsResponse$
  ];
  exports.ListReputationEntities$ = [
    9,
    n0,
    _LRE,
    { [_h]: ["POST", "/v2/email/reputation/entities", 200] },
    () => ListReputationEntitiesRequest$,
    () => ListReputationEntitiesResponse$
  ];
  exports.ListResourceTenants$ = [
    9,
    n0,
    _LRT,
    { [_h]: ["POST", "/v2/email/resources/tenants/list", 200] },
    () => ListResourceTenantsRequest$,
    () => ListResourceTenantsResponse$
  ];
  exports.ListSuppressedDestinations$ = [
    9,
    n0,
    _LSD,
    { [_h]: ["GET", "/v2/email/suppression/addresses", 200] },
    () => ListSuppressedDestinationsRequest$,
    () => ListSuppressedDestinationsResponse$
  ];
  exports.ListTagsForResource$ = [
    9,
    n0,
    _LTFR,
    { [_h]: ["GET", "/v2/email/tags", 200] },
    () => ListTagsForResourceRequest$,
    () => ListTagsForResourceResponse$
  ];
  exports.ListTenantResources$ = [
    9,
    n0,
    _LTRis,
    { [_h]: ["POST", "/v2/email/tenants/resources/list", 200] },
    () => ListTenantResourcesRequest$,
    () => ListTenantResourcesResponse$
  ];
  exports.ListTenants$ = [
    9,
    n0,
    _LTi,
    { [_h]: ["POST", "/v2/email/tenants/list", 200] },
    () => ListTenantsRequest$,
    () => ListTenantsResponse$
  ];
  exports.PutAccountDedicatedIpWarmupAttributes$ = [
    9,
    n0,
    _PADIWA,
    { [_h]: ["PUT", "/v2/email/account/dedicated-ips/warmup", 200] },
    () => PutAccountDedicatedIpWarmupAttributesRequest$,
    () => PutAccountDedicatedIpWarmupAttributesResponse$
  ];
  exports.PutAccountDetails$ = [
    9,
    n0,
    _PAD,
    { [_h]: ["POST", "/v2/email/account/details", 200] },
    () => PutAccountDetailsRequest$,
    () => PutAccountDetailsResponse$
  ];
  exports.PutAccountSendingAttributes$ = [
    9,
    n0,
    _PASA,
    { [_h]: ["PUT", "/v2/email/account/sending", 200] },
    () => PutAccountSendingAttributesRequest$,
    () => PutAccountSendingAttributesResponse$
  ];
  exports.PutAccountSuppressionAttributes$ = [
    9,
    n0,
    _PASAu,
    { [_h]: ["PUT", "/v2/email/account/suppression", 200] },
    () => PutAccountSuppressionAttributesRequest$,
    () => PutAccountSuppressionAttributesResponse$
  ];
  exports.PutAccountVdmAttributes$ = [
    9,
    n0,
    _PAVA,
    { [_h]: ["PUT", "/v2/email/account/vdm", 200] },
    () => PutAccountVdmAttributesRequest$,
    () => PutAccountVdmAttributesResponse$
  ];
  exports.PutConfigurationSetArchivingOptions$ = [
    9,
    n0,
    _PCSAO,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/archiving-options", 200] },
    () => PutConfigurationSetArchivingOptionsRequest$,
    () => PutConfigurationSetArchivingOptionsResponse$
  ];
  exports.PutConfigurationSetDeliveryOptions$ = [
    9,
    n0,
    _PCSDO,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/delivery-options", 200] },
    () => PutConfigurationSetDeliveryOptionsRequest$,
    () => PutConfigurationSetDeliveryOptionsResponse$
  ];
  exports.PutConfigurationSetReputationOptions$ = [
    9,
    n0,
    _PCSRO,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/reputation-options", 200] },
    () => PutConfigurationSetReputationOptionsRequest$,
    () => PutConfigurationSetReputationOptionsResponse$
  ];
  exports.PutConfigurationSetSendingOptions$ = [
    9,
    n0,
    _PCSSO,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/sending", 200] },
    () => PutConfigurationSetSendingOptionsRequest$,
    () => PutConfigurationSetSendingOptionsResponse$
  ];
  exports.PutConfigurationSetSuppressionOptions$ = [
    9,
    n0,
    _PCSSOu,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/suppression-options", 200] },
    () => PutConfigurationSetSuppressionOptionsRequest$,
    () => PutConfigurationSetSuppressionOptionsResponse$
  ];
  exports.PutConfigurationSetTrackingOptions$ = [
    9,
    n0,
    _PCSTO,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/tracking-options", 200] },
    () => PutConfigurationSetTrackingOptionsRequest$,
    () => PutConfigurationSetTrackingOptionsResponse$
  ];
  exports.PutConfigurationSetVdmOptions$ = [
    9,
    n0,
    _PCSVO,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/vdm-options", 200] },
    () => PutConfigurationSetVdmOptionsRequest$,
    () => PutConfigurationSetVdmOptionsResponse$
  ];
  exports.PutDedicatedIpInPool$ = [
    9,
    n0,
    _PDIIP,
    { [_h]: ["PUT", "/v2/email/dedicated-ips/{Ip}/pool", 200] },
    () => PutDedicatedIpInPoolRequest$,
    () => PutDedicatedIpInPoolResponse$
  ];
  exports.PutDedicatedIpPoolScalingAttributes$ = [
    9,
    n0,
    _PDIPSA,
    { [_h]: ["PUT", "/v2/email/dedicated-ip-pools/{PoolName}/scaling", 200] },
    () => PutDedicatedIpPoolScalingAttributesRequest$,
    () => PutDedicatedIpPoolScalingAttributesResponse$
  ];
  exports.PutDedicatedIpWarmupAttributes$ = [
    9,
    n0,
    _PDIWA,
    { [_h]: ["PUT", "/v2/email/dedicated-ips/{Ip}/warmup", 200] },
    () => PutDedicatedIpWarmupAttributesRequest$,
    () => PutDedicatedIpWarmupAttributesResponse$
  ];
  exports.PutDeliverabilityDashboardOption$ = [
    9,
    n0,
    _PDDO,
    { [_h]: ["PUT", "/v2/email/deliverability-dashboard", 200] },
    () => PutDeliverabilityDashboardOptionRequest$,
    () => PutDeliverabilityDashboardOptionResponse$
  ];
  exports.PutEmailIdentityConfigurationSetAttributes$ = [
    9,
    n0,
    _PEICSA,
    { [_h]: ["PUT", "/v2/email/identities/{EmailIdentity}/configuration-set", 200] },
    () => PutEmailIdentityConfigurationSetAttributesRequest$,
    () => PutEmailIdentityConfigurationSetAttributesResponse$
  ];
  exports.PutEmailIdentityDkimAttributes$ = [
    9,
    n0,
    _PEIDA,
    { [_h]: ["PUT", "/v2/email/identities/{EmailIdentity}/dkim", 200] },
    () => PutEmailIdentityDkimAttributesRequest$,
    () => PutEmailIdentityDkimAttributesResponse$
  ];
  exports.PutEmailIdentityDkimSigningAttributes$ = [
    9,
    n0,
    _PEIDSA,
    { [_h]: ["PUT", "/v2/email/identities/{EmailIdentity}/dkim/signing", 200] },
    () => PutEmailIdentityDkimSigningAttributesRequest$,
    () => PutEmailIdentityDkimSigningAttributesResponse$
  ];
  exports.PutEmailIdentityFeedbackAttributes$ = [
    9,
    n0,
    _PEIFA,
    { [_h]: ["PUT", "/v2/email/identities/{EmailIdentity}/feedback", 200] },
    () => PutEmailIdentityFeedbackAttributesRequest$,
    () => PutEmailIdentityFeedbackAttributesResponse$
  ];
  exports.PutEmailIdentityMailFromAttributes$ = [
    9,
    n0,
    _PEIMFA,
    { [_h]: ["PUT", "/v2/email/identities/{EmailIdentity}/mail-from", 200] },
    () => PutEmailIdentityMailFromAttributesRequest$,
    () => PutEmailIdentityMailFromAttributesResponse$
  ];
  exports.PutSuppressedDestination$ = [
    9,
    n0,
    _PSD,
    { [_h]: ["PUT", "/v2/email/suppression/addresses", 200] },
    () => PutSuppressedDestinationRequest$,
    () => PutSuppressedDestinationResponse$
  ];
  exports.PutTenantSuppressionAttributes$ = [
    9,
    n0,
    _PTSA,
    { [_h]: ["POST", "/v2/email/tenant/suppression", 200] },
    () => PutTenantSuppressionAttributesRequest$,
    () => PutTenantSuppressionAttributesResponse$
  ];
  exports.SendBulkEmail$ = [
    9,
    n0,
    _SBE,
    { [_h]: ["POST", "/v2/email/outbound-bulk-emails", 200] },
    () => SendBulkEmailRequest$,
    () => SendBulkEmailResponse$
  ];
  exports.SendCustomVerificationEmail$ = [
    9,
    n0,
    _SCVE,
    { [_h]: ["POST", "/v2/email/outbound-custom-verification-emails", 200] },
    () => SendCustomVerificationEmailRequest$,
    () => SendCustomVerificationEmailResponse$
  ];
  exports.SendEmail$ = [
    9,
    n0,
    _SEen,
    { [_h]: ["POST", "/v2/email/outbound-emails", 200] },
    () => SendEmailRequest$,
    () => SendEmailResponse$
  ];
  exports.TagResource$ = [
    9,
    n0,
    _TRa,
    { [_h]: ["POST", "/v2/email/tags", 200] },
    () => TagResourceRequest$,
    () => TagResourceResponse$
  ];
  exports.TestRenderEmailTemplate$ = [
    9,
    n0,
    _TRET,
    { [_h]: ["POST", "/v2/email/templates/{TemplateName}/render", 200] },
    () => TestRenderEmailTemplateRequest$,
    () => TestRenderEmailTemplateResponse$
  ];
  exports.UntagResource$ = [
    9,
    n0,
    _UR,
    { [_h]: ["DELETE", "/v2/email/tags", 200] },
    () => UntagResourceRequest$,
    () => UntagResourceResponse$
  ];
  exports.UpdateConfigurationSetEventDestination$ = [
    9,
    n0,
    _UCSED,
    { [_h]: ["PUT", "/v2/email/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}", 200] },
    () => UpdateConfigurationSetEventDestinationRequest$,
    () => UpdateConfigurationSetEventDestinationResponse$
  ];
  exports.UpdateContact$ = [
    9,
    n0,
    _UC,
    { [_h]: ["PUT", "/v2/email/contact-lists/{ContactListName}/contacts/{EmailAddress}", 200] },
    () => UpdateContactRequest$,
    () => UpdateContactResponse$
  ];
  exports.UpdateContactList$ = [
    9,
    n0,
    _UCL,
    { [_h]: ["PUT", "/v2/email/contact-lists/{ContactListName}", 200] },
    () => UpdateContactListRequest$,
    () => UpdateContactListResponse$
  ];
  exports.UpdateCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _UCVET,
    { [_h]: ["PUT", "/v2/email/custom-verification-email-templates/{TemplateName}", 200] },
    () => UpdateCustomVerificationEmailTemplateRequest$,
    () => UpdateCustomVerificationEmailTemplateResponse$
  ];
  exports.UpdateEmailIdentityPolicy$ = [
    9,
    n0,
    _UEIP,
    { [_h]: ["PUT", "/v2/email/identities/{EmailIdentity}/policies/{PolicyName}", 200] },
    () => UpdateEmailIdentityPolicyRequest$,
    () => UpdateEmailIdentityPolicyResponse$
  ];
  exports.UpdateEmailTemplate$ = [
    9,
    n0,
    _UET,
    { [_h]: ["PUT", "/v2/email/templates/{TemplateName}", 200] },
    () => UpdateEmailTemplateRequest$,
    () => UpdateEmailTemplateResponse$
  ];
  exports.UpdateReputationEntityCustomerManagedStatus$ = [
    9,
    n0,
    _URECMS,
    { [_h]: ["PUT", "/v2/email/reputation/entities/{ReputationEntityType}/{ReputationEntityReference}/customer-managed-status", 200] },
    () => UpdateReputationEntityCustomerManagedStatusRequest$,
    () => UpdateReputationEntityCustomerManagedStatusResponse$
  ];
  exports.UpdateReputationEntityPolicy$ = [
    9,
    n0,
    _UREP,
    { [_h]: ["PUT", "/v2/email/reputation/entities/{ReputationEntityType}/{ReputationEntityReference}/policy", 200] },
    () => UpdateReputationEntityPolicyRequest$,
    () => UpdateReputationEntityPolicyResponse$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared4 = __commonJS((exports) => {
  var { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsRestJsonProtocol } = require_protocols2();
  var { SignatureV4MultiRegion } = require_dist_cjs15();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultSESv2HttpAuthSchemeProvider } = require_httpAuthSchemeProvider4();
  var { defaultEndpointResolver } = require_endpointResolver4();
  var { errorTypeRegistries } = require_schemas_04();
  exports.getRuntimeConfig = (config) => {
    return {
      apiVersion: "2019-09-27",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSESv2HttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "aws.auth#sigv4a",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
          signer: new AwsSdkSigV4ASigner
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsRestJsonProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.sesv2",
        errorTypeRegistries,
        version: "2019-09-27",
        serviceTarget: "SimpleEmailService_v2"
      },
      serviceId: config?.serviceId ?? "SESv2",
      signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/runtimeConfig.js
var require_runtimeConfig4 = __commonJS((exports) => {
  var packageInfo = require_package5();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require_retry();
  var { calculateBodyLength, Hash } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared4();
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sesv2@3.1074.0/node_modules/@aws-sdk/client-sesv2/dist-cjs/index.js
var require_dist_cjs24 = __commonJS((exports) => {
  var __exportStar = (m2, e) => {
    Object.assign(e, m2);
  };
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs5();
  var { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveRegionConfig } = require_config2();
  var { resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultSESv2HttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider4();
  var { getRuntimeConfig } = require_runtimeConfig4();
  var { BatchGetMetricData$, CancelExportJob$, CreateConfigurationSet$, CreateConfigurationSetEventDestination$, CreateContact$, CreateContactList$, CreateCustomVerificationEmailTemplate$, CreateDedicatedIpPool$, CreateDeliverabilityTestReport$, CreateEmailIdentity$, CreateEmailIdentityPolicy$, CreateEmailTemplate$, CreateExportJob$, CreateImportJob$, CreateMultiRegionEndpoint$, CreateTenant$, CreateTenantResourceAssociation$, DeleteConfigurationSet$, DeleteConfigurationSetEventDestination$, DeleteContact$, DeleteContactList$, DeleteCustomVerificationEmailTemplate$, DeleteDedicatedIpPool$, DeleteEmailIdentity$, DeleteEmailIdentityPolicy$, DeleteEmailTemplate$, DeleteMultiRegionEndpoint$, DeleteSuppressedDestination$, DeleteTenant$, DeleteTenantResourceAssociation$, GetAccount$, GetBlacklistReports$, GetConfigurationSet$, GetConfigurationSetEventDestinations$, GetContact$, GetContactList$, GetCustomVerificationEmailTemplate$, GetDedicatedIp$, GetDedicatedIpPool$, GetDedicatedIps$, GetDeliverabilityDashboardOptions$, GetDeliverabilityTestReport$, GetDomainDeliverabilityCampaign$, GetDomainStatisticsReport$, GetEmailAddressInsights$, GetEmailIdentity$, GetEmailIdentityPolicies$, GetEmailTemplate$, GetExportJob$, GetImportJob$, GetMessageInsights$, GetMultiRegionEndpoint$, GetReputationEntity$, GetSuppressedDestination$, GetTenant$, ListConfigurationSets$, ListContactLists$, ListContacts$, ListCustomVerificationEmailTemplates$, ListDedicatedIpPools$, ListDeliverabilityTestReports$, ListDomainDeliverabilityCampaigns$, ListEmailIdentities$, ListEmailTemplates$, ListExportJobs$, ListImportJobs$, ListMultiRegionEndpoints$, ListRecommendations$, ListReputationEntities$, ListResourceTenants$, ListSuppressedDestinations$, ListTagsForResource$, ListTenantResources$, ListTenants$, PutAccountDedicatedIpWarmupAttributes$, PutAccountDetails$, PutAccountSendingAttributes$, PutAccountSuppressionAttributes$, PutAccountVdmAttributes$, PutConfigurationSetArchivingOptions$, PutConfigurationSetDeliveryOptions$, PutConfigurationSetReputationOptions$, PutConfigurationSetSendingOptions$, PutConfigurationSetSuppressionOptions$, PutConfigurationSetTrackingOptions$, PutConfigurationSetVdmOptions$, PutDedicatedIpInPool$, PutDedicatedIpPoolScalingAttributes$, PutDedicatedIpWarmupAttributes$, PutDeliverabilityDashboardOption$, PutEmailIdentityConfigurationSetAttributes$, PutEmailIdentityDkimAttributes$, PutEmailIdentityDkimSigningAttributes$, PutEmailIdentityFeedbackAttributes$, PutEmailIdentityMailFromAttributes$, PutSuppressedDestination$, PutTenantSuppressionAttributes$, SendBulkEmail$, SendCustomVerificationEmail$, SendEmail$, TagResource$, TestRenderEmailTemplate$, UntagResource$, UpdateConfigurationSetEventDestination$, UpdateContact$, UpdateContactList$, UpdateCustomVerificationEmailTemplate$, UpdateEmailIdentityPolicy$, UpdateEmailTemplate$, UpdateReputationEntityCustomerManagedStatus$, UpdateReputationEntityPolicy$ } = require_schemas_04();
  __exportStar(require_schemas_04(), exports);
  __exportStar(require_errors4(), exports);
  var { SESv2ServiceException } = require_SESv2ServiceException();
  exports.SESv2ServiceException = SESv2ServiceException;
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "ses"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class SESv2Client extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSESv2HttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials,
          "aws.auth#sigv4a": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class BatchGetMetricDataCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "BatchGetMetricData", {}).n("SESv2Client", "BatchGetMetricDataCommand").sc(BatchGetMetricData$).build() {
  }

  class CancelExportJobCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CancelExportJob", {}).n("SESv2Client", "CancelExportJobCommand").sc(CancelExportJob$).build() {
  }

  class CreateConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateConfigurationSet", {}).n("SESv2Client", "CreateConfigurationSetCommand").sc(CreateConfigurationSet$).build() {
  }

  class CreateConfigurationSetEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateConfigurationSetEventDestination", {}).n("SESv2Client", "CreateConfigurationSetEventDestinationCommand").sc(CreateConfigurationSetEventDestination$).build() {
  }

  class CreateContactCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateContact", {}).n("SESv2Client", "CreateContactCommand").sc(CreateContact$).build() {
  }

  class CreateContactListCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateContactList", {}).n("SESv2Client", "CreateContactListCommand").sc(CreateContactList$).build() {
  }

  class CreateCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateCustomVerificationEmailTemplate", {}).n("SESv2Client", "CreateCustomVerificationEmailTemplateCommand").sc(CreateCustomVerificationEmailTemplate$).build() {
  }

  class CreateDedicatedIpPoolCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateDedicatedIpPool", {}).n("SESv2Client", "CreateDedicatedIpPoolCommand").sc(CreateDedicatedIpPool$).build() {
  }

  class CreateDeliverabilityTestReportCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateDeliverabilityTestReport", {}).n("SESv2Client", "CreateDeliverabilityTestReportCommand").sc(CreateDeliverabilityTestReport$).build() {
  }

  class CreateEmailIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateEmailIdentity", {}).n("SESv2Client", "CreateEmailIdentityCommand").sc(CreateEmailIdentity$).build() {
  }

  class CreateEmailIdentityPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateEmailIdentityPolicy", {}).n("SESv2Client", "CreateEmailIdentityPolicyCommand").sc(CreateEmailIdentityPolicy$).build() {
  }

  class CreateEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateEmailTemplate", {}).n("SESv2Client", "CreateEmailTemplateCommand").sc(CreateEmailTemplate$).build() {
  }

  class CreateExportJobCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateExportJob", {}).n("SESv2Client", "CreateExportJobCommand").sc(CreateExportJob$).build() {
  }

  class CreateImportJobCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateImportJob", {}).n("SESv2Client", "CreateImportJobCommand").sc(CreateImportJob$).build() {
  }

  class CreateMultiRegionEndpointCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateMultiRegionEndpoint", {}).n("SESv2Client", "CreateMultiRegionEndpointCommand").sc(CreateMultiRegionEndpoint$).build() {
  }

  class CreateTenantCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateTenant", {}).n("SESv2Client", "CreateTenantCommand").sc(CreateTenant$).build() {
  }

  class CreateTenantResourceAssociationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "CreateTenantResourceAssociation", {}).n("SESv2Client", "CreateTenantResourceAssociationCommand").sc(CreateTenantResourceAssociation$).build() {
  }

  class DeleteConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteConfigurationSet", {}).n("SESv2Client", "DeleteConfigurationSetCommand").sc(DeleteConfigurationSet$).build() {
  }

  class DeleteConfigurationSetEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteConfigurationSetEventDestination", {}).n("SESv2Client", "DeleteConfigurationSetEventDestinationCommand").sc(DeleteConfigurationSetEventDestination$).build() {
  }

  class DeleteContactCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteContact", {}).n("SESv2Client", "DeleteContactCommand").sc(DeleteContact$).build() {
  }

  class DeleteContactListCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteContactList", {}).n("SESv2Client", "DeleteContactListCommand").sc(DeleteContactList$).build() {
  }

  class DeleteCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteCustomVerificationEmailTemplate", {}).n("SESv2Client", "DeleteCustomVerificationEmailTemplateCommand").sc(DeleteCustomVerificationEmailTemplate$).build() {
  }

  class DeleteDedicatedIpPoolCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteDedicatedIpPool", {}).n("SESv2Client", "DeleteDedicatedIpPoolCommand").sc(DeleteDedicatedIpPool$).build() {
  }

  class DeleteEmailIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteEmailIdentity", {}).n("SESv2Client", "DeleteEmailIdentityCommand").sc(DeleteEmailIdentity$).build() {
  }

  class DeleteEmailIdentityPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteEmailIdentityPolicy", {}).n("SESv2Client", "DeleteEmailIdentityPolicyCommand").sc(DeleteEmailIdentityPolicy$).build() {
  }

  class DeleteEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteEmailTemplate", {}).n("SESv2Client", "DeleteEmailTemplateCommand").sc(DeleteEmailTemplate$).build() {
  }

  class DeleteMultiRegionEndpointCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteMultiRegionEndpoint", {}).n("SESv2Client", "DeleteMultiRegionEndpointCommand").sc(DeleteMultiRegionEndpoint$).build() {
  }

  class DeleteSuppressedDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteSuppressedDestination", {}).n("SESv2Client", "DeleteSuppressedDestinationCommand").sc(DeleteSuppressedDestination$).build() {
  }

  class DeleteTenantCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteTenant", {}).n("SESv2Client", "DeleteTenantCommand").sc(DeleteTenant$).build() {
  }

  class DeleteTenantResourceAssociationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "DeleteTenantResourceAssociation", {}).n("SESv2Client", "DeleteTenantResourceAssociationCommand").sc(DeleteTenantResourceAssociation$).build() {
  }

  class GetAccountCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetAccount", {}).n("SESv2Client", "GetAccountCommand").sc(GetAccount$).build() {
  }

  class GetBlacklistReportsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetBlacklistReports", {}).n("SESv2Client", "GetBlacklistReportsCommand").sc(GetBlacklistReports$).build() {
  }

  class GetConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetConfigurationSet", {}).n("SESv2Client", "GetConfigurationSetCommand").sc(GetConfigurationSet$).build() {
  }

  class GetConfigurationSetEventDestinationsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetConfigurationSetEventDestinations", {}).n("SESv2Client", "GetConfigurationSetEventDestinationsCommand").sc(GetConfigurationSetEventDestinations$).build() {
  }

  class GetContactCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetContact", {}).n("SESv2Client", "GetContactCommand").sc(GetContact$).build() {
  }

  class GetContactListCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetContactList", {}).n("SESv2Client", "GetContactListCommand").sc(GetContactList$).build() {
  }

  class GetCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetCustomVerificationEmailTemplate", {}).n("SESv2Client", "GetCustomVerificationEmailTemplateCommand").sc(GetCustomVerificationEmailTemplate$).build() {
  }

  class GetDedicatedIpCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetDedicatedIp", {}).n("SESv2Client", "GetDedicatedIpCommand").sc(GetDedicatedIp$).build() {
  }

  class GetDedicatedIpPoolCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetDedicatedIpPool", {}).n("SESv2Client", "GetDedicatedIpPoolCommand").sc(GetDedicatedIpPool$).build() {
  }

  class GetDedicatedIpsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetDedicatedIps", {}).n("SESv2Client", "GetDedicatedIpsCommand").sc(GetDedicatedIps$).build() {
  }

  class GetDeliverabilityDashboardOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetDeliverabilityDashboardOptions", {}).n("SESv2Client", "GetDeliverabilityDashboardOptionsCommand").sc(GetDeliverabilityDashboardOptions$).build() {
  }

  class GetDeliverabilityTestReportCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetDeliverabilityTestReport", {}).n("SESv2Client", "GetDeliverabilityTestReportCommand").sc(GetDeliverabilityTestReport$).build() {
  }

  class GetDomainDeliverabilityCampaignCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetDomainDeliverabilityCampaign", {}).n("SESv2Client", "GetDomainDeliverabilityCampaignCommand").sc(GetDomainDeliverabilityCampaign$).build() {
  }

  class GetDomainStatisticsReportCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetDomainStatisticsReport", {}).n("SESv2Client", "GetDomainStatisticsReportCommand").sc(GetDomainStatisticsReport$).build() {
  }

  class GetEmailAddressInsightsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetEmailAddressInsights", {}).n("SESv2Client", "GetEmailAddressInsightsCommand").sc(GetEmailAddressInsights$).build() {
  }

  class GetEmailIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetEmailIdentity", {}).n("SESv2Client", "GetEmailIdentityCommand").sc(GetEmailIdentity$).build() {
  }

  class GetEmailIdentityPoliciesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetEmailIdentityPolicies", {}).n("SESv2Client", "GetEmailIdentityPoliciesCommand").sc(GetEmailIdentityPolicies$).build() {
  }

  class GetEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetEmailTemplate", {}).n("SESv2Client", "GetEmailTemplateCommand").sc(GetEmailTemplate$).build() {
  }

  class GetExportJobCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetExportJob", {}).n("SESv2Client", "GetExportJobCommand").sc(GetExportJob$).build() {
  }

  class GetImportJobCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetImportJob", {}).n("SESv2Client", "GetImportJobCommand").sc(GetImportJob$).build() {
  }

  class GetMessageInsightsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetMessageInsights", {}).n("SESv2Client", "GetMessageInsightsCommand").sc(GetMessageInsights$).build() {
  }

  class GetMultiRegionEndpointCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetMultiRegionEndpoint", {}).n("SESv2Client", "GetMultiRegionEndpointCommand").sc(GetMultiRegionEndpoint$).build() {
  }

  class GetReputationEntityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetReputationEntity", {}).n("SESv2Client", "GetReputationEntityCommand").sc(GetReputationEntity$).build() {
  }

  class GetSuppressedDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetSuppressedDestination", {}).n("SESv2Client", "GetSuppressedDestinationCommand").sc(GetSuppressedDestination$).build() {
  }

  class GetTenantCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "GetTenant", {}).n("SESv2Client", "GetTenantCommand").sc(GetTenant$).build() {
  }

  class ListConfigurationSetsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListConfigurationSets", {}).n("SESv2Client", "ListConfigurationSetsCommand").sc(ListConfigurationSets$).build() {
  }

  class ListContactListsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListContactLists", {}).n("SESv2Client", "ListContactListsCommand").sc(ListContactLists$).build() {
  }

  class ListContactsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListContacts", {}).n("SESv2Client", "ListContactsCommand").sc(ListContacts$).build() {
  }

  class ListCustomVerificationEmailTemplatesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListCustomVerificationEmailTemplates", {}).n("SESv2Client", "ListCustomVerificationEmailTemplatesCommand").sc(ListCustomVerificationEmailTemplates$).build() {
  }

  class ListDedicatedIpPoolsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListDedicatedIpPools", {}).n("SESv2Client", "ListDedicatedIpPoolsCommand").sc(ListDedicatedIpPools$).build() {
  }

  class ListDeliverabilityTestReportsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListDeliverabilityTestReports", {}).n("SESv2Client", "ListDeliverabilityTestReportsCommand").sc(ListDeliverabilityTestReports$).build() {
  }

  class ListDomainDeliverabilityCampaignsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListDomainDeliverabilityCampaigns", {}).n("SESv2Client", "ListDomainDeliverabilityCampaignsCommand").sc(ListDomainDeliverabilityCampaigns$).build() {
  }

  class ListEmailIdentitiesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListEmailIdentities", {}).n("SESv2Client", "ListEmailIdentitiesCommand").sc(ListEmailIdentities$).build() {
  }

  class ListEmailTemplatesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListEmailTemplates", {}).n("SESv2Client", "ListEmailTemplatesCommand").sc(ListEmailTemplates$).build() {
  }

  class ListExportJobsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListExportJobs", {}).n("SESv2Client", "ListExportJobsCommand").sc(ListExportJobs$).build() {
  }

  class ListImportJobsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListImportJobs", {}).n("SESv2Client", "ListImportJobsCommand").sc(ListImportJobs$).build() {
  }

  class ListMultiRegionEndpointsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListMultiRegionEndpoints", {}).n("SESv2Client", "ListMultiRegionEndpointsCommand").sc(ListMultiRegionEndpoints$).build() {
  }

  class ListRecommendationsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListRecommendations", {}).n("SESv2Client", "ListRecommendationsCommand").sc(ListRecommendations$).build() {
  }

  class ListReputationEntitiesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListReputationEntities", {}).n("SESv2Client", "ListReputationEntitiesCommand").sc(ListReputationEntities$).build() {
  }

  class ListResourceTenantsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListResourceTenants", {}).n("SESv2Client", "ListResourceTenantsCommand").sc(ListResourceTenants$).build() {
  }

  class ListSuppressedDestinationsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListSuppressedDestinations", {}).n("SESv2Client", "ListSuppressedDestinationsCommand").sc(ListSuppressedDestinations$).build() {
  }

  class ListTagsForResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListTagsForResource", {}).n("SESv2Client", "ListTagsForResourceCommand").sc(ListTagsForResource$).build() {
  }

  class ListTenantResourcesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListTenantResources", {}).n("SESv2Client", "ListTenantResourcesCommand").sc(ListTenantResources$).build() {
  }

  class ListTenantsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "ListTenants", {}).n("SESv2Client", "ListTenantsCommand").sc(ListTenants$).build() {
  }

  class PutAccountDedicatedIpWarmupAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutAccountDedicatedIpWarmupAttributes", {}).n("SESv2Client", "PutAccountDedicatedIpWarmupAttributesCommand").sc(PutAccountDedicatedIpWarmupAttributes$).build() {
  }

  class PutAccountDetailsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutAccountDetails", {}).n("SESv2Client", "PutAccountDetailsCommand").sc(PutAccountDetails$).build() {
  }

  class PutAccountSendingAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutAccountSendingAttributes", {}).n("SESv2Client", "PutAccountSendingAttributesCommand").sc(PutAccountSendingAttributes$).build() {
  }

  class PutAccountSuppressionAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutAccountSuppressionAttributes", {}).n("SESv2Client", "PutAccountSuppressionAttributesCommand").sc(PutAccountSuppressionAttributes$).build() {
  }

  class PutAccountVdmAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutAccountVdmAttributes", {}).n("SESv2Client", "PutAccountVdmAttributesCommand").sc(PutAccountVdmAttributes$).build() {
  }

  class PutConfigurationSetArchivingOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutConfigurationSetArchivingOptions", {}).n("SESv2Client", "PutConfigurationSetArchivingOptionsCommand").sc(PutConfigurationSetArchivingOptions$).build() {
  }

  class PutConfigurationSetDeliveryOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutConfigurationSetDeliveryOptions", {}).n("SESv2Client", "PutConfigurationSetDeliveryOptionsCommand").sc(PutConfigurationSetDeliveryOptions$).build() {
  }

  class PutConfigurationSetReputationOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutConfigurationSetReputationOptions", {}).n("SESv2Client", "PutConfigurationSetReputationOptionsCommand").sc(PutConfigurationSetReputationOptions$).build() {
  }

  class PutConfigurationSetSendingOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutConfigurationSetSendingOptions", {}).n("SESv2Client", "PutConfigurationSetSendingOptionsCommand").sc(PutConfigurationSetSendingOptions$).build() {
  }

  class PutConfigurationSetSuppressionOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutConfigurationSetSuppressionOptions", {}).n("SESv2Client", "PutConfigurationSetSuppressionOptionsCommand").sc(PutConfigurationSetSuppressionOptions$).build() {
  }

  class PutConfigurationSetTrackingOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutConfigurationSetTrackingOptions", {}).n("SESv2Client", "PutConfigurationSetTrackingOptionsCommand").sc(PutConfigurationSetTrackingOptions$).build() {
  }

  class PutConfigurationSetVdmOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutConfigurationSetVdmOptions", {}).n("SESv2Client", "PutConfigurationSetVdmOptionsCommand").sc(PutConfigurationSetVdmOptions$).build() {
  }

  class PutDedicatedIpInPoolCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutDedicatedIpInPool", {}).n("SESv2Client", "PutDedicatedIpInPoolCommand").sc(PutDedicatedIpInPool$).build() {
  }

  class PutDedicatedIpPoolScalingAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutDedicatedIpPoolScalingAttributes", {}).n("SESv2Client", "PutDedicatedIpPoolScalingAttributesCommand").sc(PutDedicatedIpPoolScalingAttributes$).build() {
  }

  class PutDedicatedIpWarmupAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutDedicatedIpWarmupAttributes", {}).n("SESv2Client", "PutDedicatedIpWarmupAttributesCommand").sc(PutDedicatedIpWarmupAttributes$).build() {
  }

  class PutDeliverabilityDashboardOptionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutDeliverabilityDashboardOption", {}).n("SESv2Client", "PutDeliverabilityDashboardOptionCommand").sc(PutDeliverabilityDashboardOption$).build() {
  }

  class PutEmailIdentityConfigurationSetAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutEmailIdentityConfigurationSetAttributes", {}).n("SESv2Client", "PutEmailIdentityConfigurationSetAttributesCommand").sc(PutEmailIdentityConfigurationSetAttributes$).build() {
  }

  class PutEmailIdentityDkimAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutEmailIdentityDkimAttributes", {}).n("SESv2Client", "PutEmailIdentityDkimAttributesCommand").sc(PutEmailIdentityDkimAttributes$).build() {
  }

  class PutEmailIdentityDkimSigningAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutEmailIdentityDkimSigningAttributes", {}).n("SESv2Client", "PutEmailIdentityDkimSigningAttributesCommand").sc(PutEmailIdentityDkimSigningAttributes$).build() {
  }

  class PutEmailIdentityFeedbackAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutEmailIdentityFeedbackAttributes", {}).n("SESv2Client", "PutEmailIdentityFeedbackAttributesCommand").sc(PutEmailIdentityFeedbackAttributes$).build() {
  }

  class PutEmailIdentityMailFromAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutEmailIdentityMailFromAttributes", {}).n("SESv2Client", "PutEmailIdentityMailFromAttributesCommand").sc(PutEmailIdentityMailFromAttributes$).build() {
  }

  class PutSuppressedDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutSuppressedDestination", {}).n("SESv2Client", "PutSuppressedDestinationCommand").sc(PutSuppressedDestination$).build() {
  }

  class PutTenantSuppressionAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "PutTenantSuppressionAttributes", {}).n("SESv2Client", "PutTenantSuppressionAttributesCommand").sc(PutTenantSuppressionAttributes$).build() {
  }

  class SendBulkEmailCommand extends Command.classBuilder().ep({
    ...commonParams,
    EndpointId: { type: "contextParams", name: "EndpointId" }
  }).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "SendBulkEmail", {}).n("SESv2Client", "SendBulkEmailCommand").sc(SendBulkEmail$).build() {
  }

  class SendCustomVerificationEmailCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "SendCustomVerificationEmail", {}).n("SESv2Client", "SendCustomVerificationEmailCommand").sc(SendCustomVerificationEmail$).build() {
  }

  class SendEmailCommand extends Command.classBuilder().ep({
    ...commonParams,
    EndpointId: { type: "contextParams", name: "EndpointId" }
  }).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "SendEmail", {}).n("SESv2Client", "SendEmailCommand").sc(SendEmail$).build() {
  }

  class TagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "TagResource", {}).n("SESv2Client", "TagResourceCommand").sc(TagResource$).build() {
  }

  class TestRenderEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "TestRenderEmailTemplate", {}).n("SESv2Client", "TestRenderEmailTemplateCommand").sc(TestRenderEmailTemplate$).build() {
  }

  class UntagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UntagResource", {}).n("SESv2Client", "UntagResourceCommand").sc(UntagResource$).build() {
  }

  class UpdateConfigurationSetEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateConfigurationSetEventDestination", {}).n("SESv2Client", "UpdateConfigurationSetEventDestinationCommand").sc(UpdateConfigurationSetEventDestination$).build() {
  }

  class UpdateContactCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateContact", {}).n("SESv2Client", "UpdateContactCommand").sc(UpdateContact$).build() {
  }

  class UpdateContactListCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateContactList", {}).n("SESv2Client", "UpdateContactListCommand").sc(UpdateContactList$).build() {
  }

  class UpdateCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateCustomVerificationEmailTemplate", {}).n("SESv2Client", "UpdateCustomVerificationEmailTemplateCommand").sc(UpdateCustomVerificationEmailTemplate$).build() {
  }

  class UpdateEmailIdentityPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateEmailIdentityPolicy", {}).n("SESv2Client", "UpdateEmailIdentityPolicyCommand").sc(UpdateEmailIdentityPolicy$).build() {
  }

  class UpdateEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateEmailTemplate", {}).n("SESv2Client", "UpdateEmailTemplateCommand").sc(UpdateEmailTemplate$).build() {
  }

  class UpdateReputationEntityCustomerManagedStatusCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateReputationEntityCustomerManagedStatus", {}).n("SESv2Client", "UpdateReputationEntityCustomerManagedStatusCommand").sc(UpdateReputationEntityCustomerManagedStatus$).build() {
  }

  class UpdateReputationEntityPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService_v2", "UpdateReputationEntityPolicy", {}).n("SESv2Client", "UpdateReputationEntityPolicyCommand").sc(UpdateReputationEntityPolicy$).build() {
  }
  var paginateGetDedicatedIps = createPaginator(SESv2Client, GetDedicatedIpsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListConfigurationSets = createPaginator(SESv2Client, ListConfigurationSetsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListContactLists = createPaginator(SESv2Client, ListContactListsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListContacts = createPaginator(SESv2Client, ListContactsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListCustomVerificationEmailTemplates = createPaginator(SESv2Client, ListCustomVerificationEmailTemplatesCommand, "NextToken", "NextToken", "PageSize");
  var paginateListDedicatedIpPools = createPaginator(SESv2Client, ListDedicatedIpPoolsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListDeliverabilityTestReports = createPaginator(SESv2Client, ListDeliverabilityTestReportsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListDomainDeliverabilityCampaigns = createPaginator(SESv2Client, ListDomainDeliverabilityCampaignsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListEmailIdentities = createPaginator(SESv2Client, ListEmailIdentitiesCommand, "NextToken", "NextToken", "PageSize");
  var paginateListEmailTemplates = createPaginator(SESv2Client, ListEmailTemplatesCommand, "NextToken", "NextToken", "PageSize");
  var paginateListExportJobs = createPaginator(SESv2Client, ListExportJobsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListImportJobs = createPaginator(SESv2Client, ListImportJobsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListMultiRegionEndpoints = createPaginator(SESv2Client, ListMultiRegionEndpointsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListRecommendations = createPaginator(SESv2Client, ListRecommendationsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListReputationEntities = createPaginator(SESv2Client, ListReputationEntitiesCommand, "NextToken", "NextToken", "PageSize");
  var paginateListResourceTenants = createPaginator(SESv2Client, ListResourceTenantsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListSuppressedDestinations = createPaginator(SESv2Client, ListSuppressedDestinationsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListTenantResources = createPaginator(SESv2Client, ListTenantResourcesCommand, "NextToken", "NextToken", "PageSize");
  var paginateListTenants = createPaginator(SESv2Client, ListTenantsCommand, "NextToken", "NextToken", "PageSize");
  var commands = {
    BatchGetMetricDataCommand,
    CancelExportJobCommand,
    CreateConfigurationSetCommand,
    CreateConfigurationSetEventDestinationCommand,
    CreateContactCommand,
    CreateContactListCommand,
    CreateCustomVerificationEmailTemplateCommand,
    CreateDedicatedIpPoolCommand,
    CreateDeliverabilityTestReportCommand,
    CreateEmailIdentityCommand,
    CreateEmailIdentityPolicyCommand,
    CreateEmailTemplateCommand,
    CreateExportJobCommand,
    CreateImportJobCommand,
    CreateMultiRegionEndpointCommand,
    CreateTenantCommand,
    CreateTenantResourceAssociationCommand,
    DeleteConfigurationSetCommand,
    DeleteConfigurationSetEventDestinationCommand,
    DeleteContactCommand,
    DeleteContactListCommand,
    DeleteCustomVerificationEmailTemplateCommand,
    DeleteDedicatedIpPoolCommand,
    DeleteEmailIdentityCommand,
    DeleteEmailIdentityPolicyCommand,
    DeleteEmailTemplateCommand,
    DeleteMultiRegionEndpointCommand,
    DeleteSuppressedDestinationCommand,
    DeleteTenantCommand,
    DeleteTenantResourceAssociationCommand,
    GetAccountCommand,
    GetBlacklistReportsCommand,
    GetConfigurationSetCommand,
    GetConfigurationSetEventDestinationsCommand,
    GetContactCommand,
    GetContactListCommand,
    GetCustomVerificationEmailTemplateCommand,
    GetDedicatedIpCommand,
    GetDedicatedIpPoolCommand,
    GetDedicatedIpsCommand,
    GetDeliverabilityDashboardOptionsCommand,
    GetDeliverabilityTestReportCommand,
    GetDomainDeliverabilityCampaignCommand,
    GetDomainStatisticsReportCommand,
    GetEmailAddressInsightsCommand,
    GetEmailIdentityCommand,
    GetEmailIdentityPoliciesCommand,
    GetEmailTemplateCommand,
    GetExportJobCommand,
    GetImportJobCommand,
    GetMessageInsightsCommand,
    GetMultiRegionEndpointCommand,
    GetReputationEntityCommand,
    GetSuppressedDestinationCommand,
    GetTenantCommand,
    ListConfigurationSetsCommand,
    ListContactListsCommand,
    ListContactsCommand,
    ListCustomVerificationEmailTemplatesCommand,
    ListDedicatedIpPoolsCommand,
    ListDeliverabilityTestReportsCommand,
    ListDomainDeliverabilityCampaignsCommand,
    ListEmailIdentitiesCommand,
    ListEmailTemplatesCommand,
    ListExportJobsCommand,
    ListImportJobsCommand,
    ListMultiRegionEndpointsCommand,
    ListRecommendationsCommand,
    ListReputationEntitiesCommand,
    ListResourceTenantsCommand,
    ListSuppressedDestinationsCommand,
    ListTagsForResourceCommand,
    ListTenantResourcesCommand,
    ListTenantsCommand,
    PutAccountDedicatedIpWarmupAttributesCommand,
    PutAccountDetailsCommand,
    PutAccountSendingAttributesCommand,
    PutAccountSuppressionAttributesCommand,
    PutAccountVdmAttributesCommand,
    PutConfigurationSetArchivingOptionsCommand,
    PutConfigurationSetDeliveryOptionsCommand,
    PutConfigurationSetReputationOptionsCommand,
    PutConfigurationSetSendingOptionsCommand,
    PutConfigurationSetSuppressionOptionsCommand,
    PutConfigurationSetTrackingOptionsCommand,
    PutConfigurationSetVdmOptionsCommand,
    PutDedicatedIpInPoolCommand,
    PutDedicatedIpPoolScalingAttributesCommand,
    PutDedicatedIpWarmupAttributesCommand,
    PutDeliverabilityDashboardOptionCommand,
    PutEmailIdentityConfigurationSetAttributesCommand,
    PutEmailIdentityDkimAttributesCommand,
    PutEmailIdentityDkimSigningAttributesCommand,
    PutEmailIdentityFeedbackAttributesCommand,
    PutEmailIdentityMailFromAttributesCommand,
    PutSuppressedDestinationCommand,
    PutTenantSuppressionAttributesCommand,
    SendBulkEmailCommand,
    SendCustomVerificationEmailCommand,
    SendEmailCommand,
    TagResourceCommand,
    TestRenderEmailTemplateCommand,
    UntagResourceCommand,
    UpdateConfigurationSetEventDestinationCommand,
    UpdateContactCommand,
    UpdateContactListCommand,
    UpdateCustomVerificationEmailTemplateCommand,
    UpdateEmailIdentityPolicyCommand,
    UpdateEmailTemplateCommand,
    UpdateReputationEntityCustomerManagedStatusCommand,
    UpdateReputationEntityPolicyCommand
  };
  var paginators = {
    paginateGetDedicatedIps,
    paginateListConfigurationSets,
    paginateListContactLists,
    paginateListContacts,
    paginateListCustomVerificationEmailTemplates,
    paginateListDedicatedIpPools,
    paginateListDeliverabilityTestReports,
    paginateListDomainDeliverabilityCampaigns,
    paginateListEmailIdentities,
    paginateListEmailTemplates,
    paginateListExportJobs,
    paginateListImportJobs,
    paginateListMultiRegionEndpoints,
    paginateListRecommendations,
    paginateListReputationEntities,
    paginateListResourceTenants,
    paginateListSuppressedDestinations,
    paginateListTenantResources,
    paginateListTenants
  };

  class SESv2 extends SESv2Client {
  }
  createAggregatedClient(commands, SESv2, { paginators });
  var ContactLanguage = {
    EN: "EN",
    JA: "JA"
  };
  var MailType = {
    MARKETING: "MARKETING",
    TRANSACTIONAL: "TRANSACTIONAL"
  };
  var ReviewStatus = {
    DENIED: "DENIED",
    FAILED: "FAILED",
    GRANTED: "GRANTED",
    PENDING: "PENDING"
  };
  var AttachmentContentDisposition = {
    ATTACHMENT: "ATTACHMENT",
    INLINE: "INLINE"
  };
  var AttachmentContentTransferEncoding = {
    BASE64: "BASE64",
    QUOTED_PRINTABLE: "QUOTED_PRINTABLE",
    SEVEN_BIT: "SEVEN_BIT"
  };
  var MetricDimensionName = {
    CONFIGURATION_SET: "CONFIGURATION_SET",
    EMAIL_IDENTITY: "EMAIL_IDENTITY",
    ISP: "ISP"
  };
  var Metric = {
    CLICK: "CLICK",
    COMPLAINT: "COMPLAINT",
    DELIVERY: "DELIVERY",
    DELIVERY_CLICK: "DELIVERY_CLICK",
    DELIVERY_COMPLAINT: "DELIVERY_COMPLAINT",
    DELIVERY_OPEN: "DELIVERY_OPEN",
    OPEN: "OPEN",
    PERMANENT_BOUNCE: "PERMANENT_BOUNCE",
    SEND: "SEND",
    TRANSIENT_BOUNCE: "TRANSIENT_BOUNCE"
  };
  var MetricNamespace = {
    VDM: "VDM"
  };
  var QueryErrorCode = {
    ACCESS_DENIED: "ACCESS_DENIED",
    INTERNAL_FAILURE: "INTERNAL_FAILURE"
  };
  var BehaviorOnMxFailure = {
    REJECT_MESSAGE: "REJECT_MESSAGE",
    USE_DEFAULT_VALUE: "USE_DEFAULT_VALUE"
  };
  var BounceType = {
    PERMANENT: "PERMANENT",
    TRANSIENT: "TRANSIENT",
    UNDETERMINED: "UNDETERMINED"
  };
  var BulkEmailStatus = {
    ACCOUNT_DAILY_QUOTA_EXCEEDED: "ACCOUNT_DAILY_QUOTA_EXCEEDED",
    ACCOUNT_SENDING_PAUSED: "ACCOUNT_SENDING_PAUSED",
    ACCOUNT_SUSPENDED: "ACCOUNT_SUSPENDED",
    ACCOUNT_THROTTLED: "ACCOUNT_THROTTLED",
    CONFIGURATION_SET_NOT_FOUND: "CONFIGURATION_SET_NOT_FOUND",
    CONFIGURATION_SET_SENDING_PAUSED: "CONFIGURATION_SET_SENDING_PAUSED",
    FAILED: "FAILED",
    INVALID_PARAMETER: "INVALID_PARAMETER",
    INVALID_SENDING_POOL_NAME: "INVALID_SENDING_POOL_NAME",
    MAIL_FROM_DOMAIN_NOT_VERIFIED: "MAIL_FROM_DOMAIN_NOT_VERIFIED",
    MESSAGE_REJECTED: "MESSAGE_REJECTED",
    SUCCESS: "SUCCESS",
    TEMPLATE_NOT_FOUND: "TEMPLATE_NOT_FOUND",
    TRANSIENT_FAILURE: "TRANSIENT_FAILURE"
  };
  var DimensionValueSource = {
    EMAIL_HEADER: "EMAIL_HEADER",
    LINK_TAG: "LINK_TAG",
    MESSAGE_TAG: "MESSAGE_TAG"
  };
  var SubscriptionStatus = {
    OPT_IN: "OPT_IN",
    OPT_OUT: "OPT_OUT"
  };
  var ContactListImportAction = {
    DELETE: "DELETE",
    PUT: "PUT"
  };
  var TlsPolicy = {
    OPTIONAL: "OPTIONAL",
    REQUIRE: "REQUIRE"
  };
  var SuppressionListReason = {
    BOUNCE: "BOUNCE",
    COMPLAINT: "COMPLAINT"
  };
  var SuppressionListScope = {
    ACCOUNT: "ACCOUNT",
    TENANT: "TENANT"
  };
  var FeatureStatus = {
    DISABLED: "DISABLED",
    ENABLED: "ENABLED"
  };
  var SuppressionConfidenceVerdictThreshold = {
    HIGH: "HIGH",
    MANAGED: "MANAGED",
    MEDIUM: "MEDIUM"
  };
  var HttpsPolicy = {
    OPTIONAL: "OPTIONAL",
    REQUIRE: "REQUIRE",
    REQUIRE_OPEN_ONLY: "REQUIRE_OPEN_ONLY"
  };
  var EventType = {
    BOUNCE: "BOUNCE",
    CLICK: "CLICK",
    COMPLAINT: "COMPLAINT",
    DELIVERY: "DELIVERY",
    DELIVERY_DELAY: "DELIVERY_DELAY",
    OPEN: "OPEN",
    REJECT: "REJECT",
    RENDERING_FAILURE: "RENDERING_FAILURE",
    SEND: "SEND",
    SUBSCRIPTION: "SUBSCRIPTION"
  };
  var ScalingMode = {
    MANAGED: "MANAGED",
    STANDARD: "STANDARD"
  };
  var DeliverabilityTestStatus = {
    COMPLETED: "COMPLETED",
    IN_PROGRESS: "IN_PROGRESS"
  };
  var DkimSigningAttributesOrigin = {
    AWS_SES: "AWS_SES",
    AWS_SES_AF_SOUTH_1: "AWS_SES_AF_SOUTH_1",
    AWS_SES_AP_NORTHEAST_1: "AWS_SES_AP_NORTHEAST_1",
    AWS_SES_AP_NORTHEAST_2: "AWS_SES_AP_NORTHEAST_2",
    AWS_SES_AP_NORTHEAST_3: "AWS_SES_AP_NORTHEAST_3",
    AWS_SES_AP_SOUTHEAST_1: "AWS_SES_AP_SOUTHEAST_1",
    AWS_SES_AP_SOUTHEAST_2: "AWS_SES_AP_SOUTHEAST_2",
    AWS_SES_AP_SOUTHEAST_3: "AWS_SES_AP_SOUTHEAST_3",
    AWS_SES_AP_SOUTHEAST_5: "AWS_SES_AP_SOUTHEAST_5",
    AWS_SES_AP_SOUTH_1: "AWS_SES_AP_SOUTH_1",
    AWS_SES_AP_SOUTH_2: "AWS_SES_AP_SOUTH_2",
    AWS_SES_CA_CENTRAL_1: "AWS_SES_CA_CENTRAL_1",
    AWS_SES_CA_WEST_1: "AWS_SES_CA_WEST_1",
    AWS_SES_EU_CENTRAL_1: "AWS_SES_EU_CENTRAL_1",
    AWS_SES_EU_CENTRAL_2: "AWS_SES_EU_CENTRAL_2",
    AWS_SES_EU_NORTH_1: "AWS_SES_EU_NORTH_1",
    AWS_SES_EU_SOUTH_1: "AWS_SES_EU_SOUTH_1",
    AWS_SES_EU_WEST_1: "AWS_SES_EU_WEST_1",
    AWS_SES_EU_WEST_2: "AWS_SES_EU_WEST_2",
    AWS_SES_EU_WEST_3: "AWS_SES_EU_WEST_3",
    AWS_SES_IL_CENTRAL_1: "AWS_SES_IL_CENTRAL_1",
    AWS_SES_ME_CENTRAL_1: "AWS_SES_ME_CENTRAL_1",
    AWS_SES_ME_SOUTH_1: "AWS_SES_ME_SOUTH_1",
    AWS_SES_SA_EAST_1: "AWS_SES_SA_EAST_1",
    AWS_SES_US_EAST_1: "AWS_SES_US_EAST_1",
    AWS_SES_US_EAST_2: "AWS_SES_US_EAST_2",
    AWS_SES_US_WEST_1: "AWS_SES_US_WEST_1",
    AWS_SES_US_WEST_2: "AWS_SES_US_WEST_2",
    EXTERNAL: "EXTERNAL"
  };
  var DkimSigningKeyLength = {
    RSA_1024_BIT: "RSA_1024_BIT",
    RSA_2048_BIT: "RSA_2048_BIT"
  };
  var DkimStatus = {
    FAILED: "FAILED",
    NOT_STARTED: "NOT_STARTED",
    PENDING: "PENDING",
    SUCCESS: "SUCCESS",
    TEMPORARY_FAILURE: "TEMPORARY_FAILURE"
  };
  var IdentityType = {
    DOMAIN: "DOMAIN",
    EMAIL_ADDRESS: "EMAIL_ADDRESS",
    MANAGED_DOMAIN: "MANAGED_DOMAIN"
  };
  var DeliveryEventType = {
    COMPLAINT: "COMPLAINT",
    DELIVERY: "DELIVERY",
    PERMANENT_BOUNCE: "PERMANENT_BOUNCE",
    SEND: "SEND",
    TRANSIENT_BOUNCE: "TRANSIENT_BOUNCE",
    UNDETERMINED_BOUNCE: "UNDETERMINED_BOUNCE"
  };
  var EngagementEventType = {
    CLICK: "CLICK",
    OPEN: "OPEN"
  };
  var MetricAggregation = {
    RATE: "RATE",
    VOLUME: "VOLUME"
  };
  var DataFormat = {
    CSV: "CSV",
    JSON: "JSON"
  };
  var SuppressionListImportAction = {
    DELETE: "DELETE",
    PUT: "PUT"
  };
  var Status = {
    CREATING: "CREATING",
    DELETING: "DELETING",
    FAILED: "FAILED",
    READY: "READY"
  };
  var SendingStatus = {
    DISABLED: "DISABLED",
    ENABLED: "ENABLED",
    REINSTATED: "REINSTATED"
  };
  var WarmupStatus = {
    DONE: "DONE",
    IN_PROGRESS: "IN_PROGRESS",
    NOT_APPLICABLE: "NOT_APPLICABLE"
  };
  var DeliverabilityDashboardAccountStatus = {
    ACTIVE: "ACTIVE",
    DISABLED: "DISABLED",
    PENDING_EXPIRATION: "PENDING_EXPIRATION"
  };
  var EmailAddressInsightsConfidenceVerdict = {
    HIGH: "HIGH",
    LOW: "LOW",
    MEDIUM: "MEDIUM"
  };
  var ExportSourceType = {
    MESSAGE_INSIGHTS: "MESSAGE_INSIGHTS",
    METRICS_DATA: "METRICS_DATA"
  };
  var JobStatus = {
    CANCELLED: "CANCELLED",
    COMPLETED: "COMPLETED",
    CREATED: "CREATED",
    FAILED: "FAILED",
    PROCESSING: "PROCESSING"
  };
  var MailFromDomainStatus = {
    FAILED: "FAILED",
    PENDING: "PENDING",
    SUCCESS: "SUCCESS",
    TEMPORARY_FAILURE: "TEMPORARY_FAILURE"
  };
  var VerificationError = {
    DNS_SERVER_ERROR: "DNS_SERVER_ERROR",
    HOST_NOT_FOUND: "HOST_NOT_FOUND",
    INVALID_VALUE: "INVALID_VALUE",
    REPLICATION_ACCESS_DENIED: "REPLICATION_ACCESS_DENIED",
    REPLICATION_PRIMARY_BYO_DKIM_NOT_SUPPORTED: "REPLICATION_PRIMARY_BYO_DKIM_NOT_SUPPORTED",
    REPLICATION_PRIMARY_INVALID_REGION: "REPLICATION_PRIMARY_INVALID_REGION",
    REPLICATION_PRIMARY_NOT_FOUND: "REPLICATION_PRIMARY_NOT_FOUND",
    REPLICATION_REPLICA_AS_PRIMARY_NOT_SUPPORTED: "REPLICATION_REPLICA_AS_PRIMARY_NOT_SUPPORTED",
    SERVICE_ERROR: "SERVICE_ERROR",
    TYPE_NOT_FOUND: "TYPE_NOT_FOUND"
  };
  var VerificationStatus = {
    FAILED: "FAILED",
    NOT_STARTED: "NOT_STARTED",
    PENDING: "PENDING",
    SUCCESS: "SUCCESS",
    TEMPORARY_FAILURE: "TEMPORARY_FAILURE"
  };
  var ReputationEntityType = {
    RESOURCE: "RESOURCE"
  };
  var RecommendationImpact = {
    HIGH: "HIGH",
    LOW: "LOW"
  };
  var ImportDestinationType = {
    CONTACT_LIST: "CONTACT_LIST",
    SUPPRESSION_LIST: "SUPPRESSION_LIST"
  };
  var ListRecommendationsFilterKey = {
    IMPACT: "IMPACT",
    RESOURCE_ARN: "RESOURCE_ARN",
    STATUS: "STATUS",
    TYPE: "TYPE"
  };
  var RecommendationStatus = {
    FIXED: "FIXED",
    OPEN: "OPEN"
  };
  var RecommendationType = {
    BIMI: "BIMI",
    BOUNCE: "BOUNCE",
    COMPLAINT: "COMPLAINT",
    DKIM: "DKIM",
    DMARC: "DMARC",
    FEEDBACK_3P: "FEEDBACK_3P",
    IP_LISTING: "IP_LISTING",
    SPF: "SPF"
  };
  var ReputationEntityFilterKey = {
    ENTITY_REFERENCE_PREFIX: "ENTITY_REFERENCE_PREFIX",
    ENTITY_TYPE: "ENTITY_TYPE",
    REPUTATION_IMPACT: "REPUTATION_IMPACT",
    STATUS: "SENDING_STATUS"
  };
  var ListTenantResourcesFilterKey = {
    RESOURCE_TYPE: "RESOURCE_TYPE"
  };
  var ResourceType = {
    CONFIGURATION_SET: "CONFIGURATION_SET",
    EMAIL_IDENTITY: "EMAIL_IDENTITY",
    EMAIL_TEMPLATE: "EMAIL_TEMPLATE"
  };
  exports.AttachmentContentDisposition = AttachmentContentDisposition;
  exports.AttachmentContentTransferEncoding = AttachmentContentTransferEncoding;
  exports.BatchGetMetricDataCommand = BatchGetMetricDataCommand;
  exports.BehaviorOnMxFailure = BehaviorOnMxFailure;
  exports.BounceType = BounceType;
  exports.BulkEmailStatus = BulkEmailStatus;
  exports.CancelExportJobCommand = CancelExportJobCommand;
  exports.ContactLanguage = ContactLanguage;
  exports.ContactListImportAction = ContactListImportAction;
  exports.CreateConfigurationSetCommand = CreateConfigurationSetCommand;
  exports.CreateConfigurationSetEventDestinationCommand = CreateConfigurationSetEventDestinationCommand;
  exports.CreateContactCommand = CreateContactCommand;
  exports.CreateContactListCommand = CreateContactListCommand;
  exports.CreateCustomVerificationEmailTemplateCommand = CreateCustomVerificationEmailTemplateCommand;
  exports.CreateDedicatedIpPoolCommand = CreateDedicatedIpPoolCommand;
  exports.CreateDeliverabilityTestReportCommand = CreateDeliverabilityTestReportCommand;
  exports.CreateEmailIdentityCommand = CreateEmailIdentityCommand;
  exports.CreateEmailIdentityPolicyCommand = CreateEmailIdentityPolicyCommand;
  exports.CreateEmailTemplateCommand = CreateEmailTemplateCommand;
  exports.CreateExportJobCommand = CreateExportJobCommand;
  exports.CreateImportJobCommand = CreateImportJobCommand;
  exports.CreateMultiRegionEndpointCommand = CreateMultiRegionEndpointCommand;
  exports.CreateTenantCommand = CreateTenantCommand;
  exports.CreateTenantResourceAssociationCommand = CreateTenantResourceAssociationCommand;
  exports.DataFormat = DataFormat;
  exports.DeleteConfigurationSetCommand = DeleteConfigurationSetCommand;
  exports.DeleteConfigurationSetEventDestinationCommand = DeleteConfigurationSetEventDestinationCommand;
  exports.DeleteContactCommand = DeleteContactCommand;
  exports.DeleteContactListCommand = DeleteContactListCommand;
  exports.DeleteCustomVerificationEmailTemplateCommand = DeleteCustomVerificationEmailTemplateCommand;
  exports.DeleteDedicatedIpPoolCommand = DeleteDedicatedIpPoolCommand;
  exports.DeleteEmailIdentityCommand = DeleteEmailIdentityCommand;
  exports.DeleteEmailIdentityPolicyCommand = DeleteEmailIdentityPolicyCommand;
  exports.DeleteEmailTemplateCommand = DeleteEmailTemplateCommand;
  exports.DeleteMultiRegionEndpointCommand = DeleteMultiRegionEndpointCommand;
  exports.DeleteSuppressedDestinationCommand = DeleteSuppressedDestinationCommand;
  exports.DeleteTenantCommand = DeleteTenantCommand;
  exports.DeleteTenantResourceAssociationCommand = DeleteTenantResourceAssociationCommand;
  exports.DeliverabilityDashboardAccountStatus = DeliverabilityDashboardAccountStatus;
  exports.DeliverabilityTestStatus = DeliverabilityTestStatus;
  exports.DeliveryEventType = DeliveryEventType;
  exports.DimensionValueSource = DimensionValueSource;
  exports.DkimSigningAttributesOrigin = DkimSigningAttributesOrigin;
  exports.DkimSigningKeyLength = DkimSigningKeyLength;
  exports.DkimStatus = DkimStatus;
  exports.EmailAddressInsightsConfidenceVerdict = EmailAddressInsightsConfidenceVerdict;
  exports.EngagementEventType = EngagementEventType;
  exports.EventType = EventType;
  exports.ExportSourceType = ExportSourceType;
  exports.FeatureStatus = FeatureStatus;
  exports.GetAccountCommand = GetAccountCommand;
  exports.GetBlacklistReportsCommand = GetBlacklistReportsCommand;
  exports.GetConfigurationSetCommand = GetConfigurationSetCommand;
  exports.GetConfigurationSetEventDestinationsCommand = GetConfigurationSetEventDestinationsCommand;
  exports.GetContactCommand = GetContactCommand;
  exports.GetContactListCommand = GetContactListCommand;
  exports.GetCustomVerificationEmailTemplateCommand = GetCustomVerificationEmailTemplateCommand;
  exports.GetDedicatedIpCommand = GetDedicatedIpCommand;
  exports.GetDedicatedIpPoolCommand = GetDedicatedIpPoolCommand;
  exports.GetDedicatedIpsCommand = GetDedicatedIpsCommand;
  exports.GetDeliverabilityDashboardOptionsCommand = GetDeliverabilityDashboardOptionsCommand;
  exports.GetDeliverabilityTestReportCommand = GetDeliverabilityTestReportCommand;
  exports.GetDomainDeliverabilityCampaignCommand = GetDomainDeliverabilityCampaignCommand;
  exports.GetDomainStatisticsReportCommand = GetDomainStatisticsReportCommand;
  exports.GetEmailAddressInsightsCommand = GetEmailAddressInsightsCommand;
  exports.GetEmailIdentityCommand = GetEmailIdentityCommand;
  exports.GetEmailIdentityPoliciesCommand = GetEmailIdentityPoliciesCommand;
  exports.GetEmailTemplateCommand = GetEmailTemplateCommand;
  exports.GetExportJobCommand = GetExportJobCommand;
  exports.GetImportJobCommand = GetImportJobCommand;
  exports.GetMessageInsightsCommand = GetMessageInsightsCommand;
  exports.GetMultiRegionEndpointCommand = GetMultiRegionEndpointCommand;
  exports.GetReputationEntityCommand = GetReputationEntityCommand;
  exports.GetSuppressedDestinationCommand = GetSuppressedDestinationCommand;
  exports.GetTenantCommand = GetTenantCommand;
  exports.HttpsPolicy = HttpsPolicy;
  exports.IdentityType = IdentityType;
  exports.ImportDestinationType = ImportDestinationType;
  exports.JobStatus = JobStatus;
  exports.ListConfigurationSetsCommand = ListConfigurationSetsCommand;
  exports.ListContactListsCommand = ListContactListsCommand;
  exports.ListContactsCommand = ListContactsCommand;
  exports.ListCustomVerificationEmailTemplatesCommand = ListCustomVerificationEmailTemplatesCommand;
  exports.ListDedicatedIpPoolsCommand = ListDedicatedIpPoolsCommand;
  exports.ListDeliverabilityTestReportsCommand = ListDeliverabilityTestReportsCommand;
  exports.ListDomainDeliverabilityCampaignsCommand = ListDomainDeliverabilityCampaignsCommand;
  exports.ListEmailIdentitiesCommand = ListEmailIdentitiesCommand;
  exports.ListEmailTemplatesCommand = ListEmailTemplatesCommand;
  exports.ListExportJobsCommand = ListExportJobsCommand;
  exports.ListImportJobsCommand = ListImportJobsCommand;
  exports.ListMultiRegionEndpointsCommand = ListMultiRegionEndpointsCommand;
  exports.ListRecommendationsCommand = ListRecommendationsCommand;
  exports.ListRecommendationsFilterKey = ListRecommendationsFilterKey;
  exports.ListReputationEntitiesCommand = ListReputationEntitiesCommand;
  exports.ListResourceTenantsCommand = ListResourceTenantsCommand;
  exports.ListSuppressedDestinationsCommand = ListSuppressedDestinationsCommand;
  exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
  exports.ListTenantResourcesCommand = ListTenantResourcesCommand;
  exports.ListTenantResourcesFilterKey = ListTenantResourcesFilterKey;
  exports.ListTenantsCommand = ListTenantsCommand;
  exports.MailFromDomainStatus = MailFromDomainStatus;
  exports.MailType = MailType;
  exports.Metric = Metric;
  exports.MetricAggregation = MetricAggregation;
  exports.MetricDimensionName = MetricDimensionName;
  exports.MetricNamespace = MetricNamespace;
  exports.PutAccountDedicatedIpWarmupAttributesCommand = PutAccountDedicatedIpWarmupAttributesCommand;
  exports.PutAccountDetailsCommand = PutAccountDetailsCommand;
  exports.PutAccountSendingAttributesCommand = PutAccountSendingAttributesCommand;
  exports.PutAccountSuppressionAttributesCommand = PutAccountSuppressionAttributesCommand;
  exports.PutAccountVdmAttributesCommand = PutAccountVdmAttributesCommand;
  exports.PutConfigurationSetArchivingOptionsCommand = PutConfigurationSetArchivingOptionsCommand;
  exports.PutConfigurationSetDeliveryOptionsCommand = PutConfigurationSetDeliveryOptionsCommand;
  exports.PutConfigurationSetReputationOptionsCommand = PutConfigurationSetReputationOptionsCommand;
  exports.PutConfigurationSetSendingOptionsCommand = PutConfigurationSetSendingOptionsCommand;
  exports.PutConfigurationSetSuppressionOptionsCommand = PutConfigurationSetSuppressionOptionsCommand;
  exports.PutConfigurationSetTrackingOptionsCommand = PutConfigurationSetTrackingOptionsCommand;
  exports.PutConfigurationSetVdmOptionsCommand = PutConfigurationSetVdmOptionsCommand;
  exports.PutDedicatedIpInPoolCommand = PutDedicatedIpInPoolCommand;
  exports.PutDedicatedIpPoolScalingAttributesCommand = PutDedicatedIpPoolScalingAttributesCommand;
  exports.PutDedicatedIpWarmupAttributesCommand = PutDedicatedIpWarmupAttributesCommand;
  exports.PutDeliverabilityDashboardOptionCommand = PutDeliverabilityDashboardOptionCommand;
  exports.PutEmailIdentityConfigurationSetAttributesCommand = PutEmailIdentityConfigurationSetAttributesCommand;
  exports.PutEmailIdentityDkimAttributesCommand = PutEmailIdentityDkimAttributesCommand;
  exports.PutEmailIdentityDkimSigningAttributesCommand = PutEmailIdentityDkimSigningAttributesCommand;
  exports.PutEmailIdentityFeedbackAttributesCommand = PutEmailIdentityFeedbackAttributesCommand;
  exports.PutEmailIdentityMailFromAttributesCommand = PutEmailIdentityMailFromAttributesCommand;
  exports.PutSuppressedDestinationCommand = PutSuppressedDestinationCommand;
  exports.PutTenantSuppressionAttributesCommand = PutTenantSuppressionAttributesCommand;
  exports.QueryErrorCode = QueryErrorCode;
  exports.RecommendationImpact = RecommendationImpact;
  exports.RecommendationStatus = RecommendationStatus;
  exports.RecommendationType = RecommendationType;
  exports.ReputationEntityFilterKey = ReputationEntityFilterKey;
  exports.ReputationEntityType = ReputationEntityType;
  exports.ResourceType = ResourceType;
  exports.ReviewStatus = ReviewStatus;
  exports.SESv2 = SESv2;
  exports.SESv2Client = SESv2Client;
  exports.ScalingMode = ScalingMode;
  exports.SendBulkEmailCommand = SendBulkEmailCommand;
  exports.SendCustomVerificationEmailCommand = SendCustomVerificationEmailCommand;
  exports.SendEmailCommand = SendEmailCommand;
  exports.SendingStatus = SendingStatus;
  exports.Status = Status;
  exports.SubscriptionStatus = SubscriptionStatus;
  exports.SuppressionConfidenceVerdictThreshold = SuppressionConfidenceVerdictThreshold;
  exports.SuppressionListImportAction = SuppressionListImportAction;
  exports.SuppressionListReason = SuppressionListReason;
  exports.SuppressionListScope = SuppressionListScope;
  exports.TagResourceCommand = TagResourceCommand;
  exports.TestRenderEmailTemplateCommand = TestRenderEmailTemplateCommand;
  exports.TlsPolicy = TlsPolicy;
  exports.UntagResourceCommand = UntagResourceCommand;
  exports.UpdateConfigurationSetEventDestinationCommand = UpdateConfigurationSetEventDestinationCommand;
  exports.UpdateContactCommand = UpdateContactCommand;
  exports.UpdateContactListCommand = UpdateContactListCommand;
  exports.UpdateCustomVerificationEmailTemplateCommand = UpdateCustomVerificationEmailTemplateCommand;
  exports.UpdateEmailIdentityPolicyCommand = UpdateEmailIdentityPolicyCommand;
  exports.UpdateEmailTemplateCommand = UpdateEmailTemplateCommand;
  exports.UpdateReputationEntityCustomerManagedStatusCommand = UpdateReputationEntityCustomerManagedStatusCommand;
  exports.UpdateReputationEntityPolicyCommand = UpdateReputationEntityPolicyCommand;
  exports.VerificationError = VerificationError;
  exports.VerificationStatus = VerificationStatus;
  exports.WarmupStatus = WarmupStatus;
  exports.paginateGetDedicatedIps = paginateGetDedicatedIps;
  exports.paginateListConfigurationSets = paginateListConfigurationSets;
  exports.paginateListContactLists = paginateListContactLists;
  exports.paginateListContacts = paginateListContacts;
  exports.paginateListCustomVerificationEmailTemplates = paginateListCustomVerificationEmailTemplates;
  exports.paginateListDedicatedIpPools = paginateListDedicatedIpPools;
  exports.paginateListDeliverabilityTestReports = paginateListDeliverabilityTestReports;
  exports.paginateListDomainDeliverabilityCampaigns = paginateListDomainDeliverabilityCampaigns;
  exports.paginateListEmailIdentities = paginateListEmailIdentities;
  exports.paginateListEmailTemplates = paginateListEmailTemplates;
  exports.paginateListExportJobs = paginateListExportJobs;
  exports.paginateListImportJobs = paginateListImportJobs;
  exports.paginateListMultiRegionEndpoints = paginateListMultiRegionEndpoints;
  exports.paginateListRecommendations = paginateListRecommendations;
  exports.paginateListReputationEntities = paginateListReputationEntities;
  exports.paginateListResourceTenants = paginateListResourceTenants;
  exports.paginateListSuppressedDestinations = paginateListSuppressedDestinations;
  exports.paginateListTenantResources = paginateListTenantResources;
  exports.paginateListTenants = paginateListTenants;
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider5 = __commonJS((exports) => {
  var { resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { getSmithyContext, normalizeProvider } = require_client3();
  exports.defaultSESHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "ses",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  exports.defaultSESHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  exports.resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/package.json
var require_package6 = __commonJS((exports, module) => {
  module.exports = {
    name: "@aws-sdk/client-ses",
    description: "AWS SDK for JavaScript Ses Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      test: "yarn g:vitest run --passWithNoTests",
      "test:watch": "yarn g:vitest watch --passWithNoTests",
      "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
      "test:integration:watch": "yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts",
      "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
      "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@smithy/snapshot-testing": "^2.1.7",
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3",
      vitest: "^4.0.17"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-ses",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-ses"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/endpoint/bdd.js
var require_bdd5 = __commonJS((exports) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var k2 = "ref";
  var a = -1;
  var b2 = true;
  var c = "isSet";
  var d2 = "PartitionResult";
  var e = "booleanEquals";
  var f2 = "getAttr";
  var g2 = { [k2]: "Endpoint" };
  var h2 = { [k2]: d2 };
  var i = {};
  var j = [{ [k2]: "Region" }];
  var _data = {
    conditions: [
      [c, [g2]],
      [c, j],
      ["aws.partition", j, d2],
      [e, [{ [k2]: "UseFIPS" }, b2]],
      [e, [{ [k2]: "UseDualStack" }, b2]],
      [e, [{ fn: f2, argv: [h2, "supportsDualStack"] }, b2]],
      [e, [{ fn: f2, argv: [h2, "supportsFIPS"] }, b2]]
    ],
    results: [
      [a],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [g2, i],
      ["https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://email-fips.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://email.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://email.{Region}.{PartitionResult#dnsSuffix}", i],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    12,
    3,
    1,
    4,
    r + 11,
    2,
    5,
    r + 11,
    3,
    8,
    6,
    4,
    7,
    r + 10,
    5,
    r + 8,
    r + 9,
    4,
    10,
    9,
    6,
    r + 6,
    r + 7,
    5,
    11,
    r + 5,
    6,
    r + 4,
    r + 5,
    3,
    r + 1,
    13,
    4,
    r + 2,
    r + 3
  ]);
  exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver5 = __commonJS((exports) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd5();
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  exports.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/models/SESServiceException.js
var require_SESServiceException = __commonJS((exports) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports.__ServiceException = __ServiceException;
  exports.SESServiceException = class SESServiceException extends __ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, SESServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/models/errors.js
var require_errors5 = __commonJS((exports) => {
  var { SESServiceException: __BaseException } = require_SESServiceException();
  exports.AccountSendingPausedException = class AccountSendingPausedException extends __BaseException {
    name = "AccountSendingPausedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "AccountSendingPausedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AccountSendingPausedException.prototype);
    }
  };
  exports.AlreadyExistsException = class AlreadyExistsException extends __BaseException {
    name = "AlreadyExistsException";
    $fault = "client";
    Name;
    constructor(opts) {
      super({
        name: "AlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AlreadyExistsException.prototype);
      this.Name = opts.Name;
    }
  };
  exports.CannotDeleteException = class CannotDeleteException extends __BaseException {
    name = "CannotDeleteException";
    $fault = "client";
    Name;
    constructor(opts) {
      super({
        name: "CannotDeleteException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CannotDeleteException.prototype);
      this.Name = opts.Name;
    }
  };
  exports.LimitExceededException = class LimitExceededException extends __BaseException {
    name = "LimitExceededException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "LimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, LimitExceededException.prototype);
    }
  };
  exports.RuleSetDoesNotExistException = class RuleSetDoesNotExistException extends __BaseException {
    name = "RuleSetDoesNotExistException";
    $fault = "client";
    Name;
    constructor(opts) {
      super({
        name: "RuleSetDoesNotExistException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RuleSetDoesNotExistException.prototype);
      this.Name = opts.Name;
    }
  };
  exports.ConfigurationSetAlreadyExistsException = class ConfigurationSetAlreadyExistsException extends __BaseException {
    name = "ConfigurationSetAlreadyExistsException";
    $fault = "client";
    ConfigurationSetName;
    constructor(opts) {
      super({
        name: "ConfigurationSetAlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ConfigurationSetAlreadyExistsException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
    }
  };
  exports.ConfigurationSetDoesNotExistException = class ConfigurationSetDoesNotExistException extends __BaseException {
    name = "ConfigurationSetDoesNotExistException";
    $fault = "client";
    ConfigurationSetName;
    constructor(opts) {
      super({
        name: "ConfigurationSetDoesNotExistException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ConfigurationSetDoesNotExistException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
    }
  };
  exports.ConfigurationSetSendingPausedException = class ConfigurationSetSendingPausedException extends __BaseException {
    name = "ConfigurationSetSendingPausedException";
    $fault = "client";
    ConfigurationSetName;
    constructor(opts) {
      super({
        name: "ConfigurationSetSendingPausedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ConfigurationSetSendingPausedException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
    }
  };
  exports.InvalidConfigurationSetException = class InvalidConfigurationSetException extends __BaseException {
    name = "InvalidConfigurationSetException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidConfigurationSetException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidConfigurationSetException.prototype);
    }
  };
  exports.EventDestinationAlreadyExistsException = class EventDestinationAlreadyExistsException extends __BaseException {
    name = "EventDestinationAlreadyExistsException";
    $fault = "client";
    ConfigurationSetName;
    EventDestinationName;
    constructor(opts) {
      super({
        name: "EventDestinationAlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, EventDestinationAlreadyExistsException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
      this.EventDestinationName = opts.EventDestinationName;
    }
  };
  exports.InvalidCloudWatchDestinationException = class InvalidCloudWatchDestinationException extends __BaseException {
    name = "InvalidCloudWatchDestinationException";
    $fault = "client";
    ConfigurationSetName;
    EventDestinationName;
    constructor(opts) {
      super({
        name: "InvalidCloudWatchDestinationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidCloudWatchDestinationException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
      this.EventDestinationName = opts.EventDestinationName;
    }
  };
  exports.InvalidFirehoseDestinationException = class InvalidFirehoseDestinationException extends __BaseException {
    name = "InvalidFirehoseDestinationException";
    $fault = "client";
    ConfigurationSetName;
    EventDestinationName;
    constructor(opts) {
      super({
        name: "InvalidFirehoseDestinationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidFirehoseDestinationException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
      this.EventDestinationName = opts.EventDestinationName;
    }
  };
  exports.InvalidSNSDestinationException = class InvalidSNSDestinationException extends __BaseException {
    name = "InvalidSNSDestinationException";
    $fault = "client";
    ConfigurationSetName;
    EventDestinationName;
    constructor(opts) {
      super({
        name: "InvalidSNSDestinationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidSNSDestinationException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
      this.EventDestinationName = opts.EventDestinationName;
    }
  };
  exports.InvalidTrackingOptionsException = class InvalidTrackingOptionsException extends __BaseException {
    name = "InvalidTrackingOptionsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidTrackingOptionsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidTrackingOptionsException.prototype);
    }
  };
  exports.TrackingOptionsAlreadyExistsException = class TrackingOptionsAlreadyExistsException extends __BaseException {
    name = "TrackingOptionsAlreadyExistsException";
    $fault = "client";
    ConfigurationSetName;
    constructor(opts) {
      super({
        name: "TrackingOptionsAlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TrackingOptionsAlreadyExistsException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
    }
  };
  exports.CustomVerificationEmailInvalidContentException = class CustomVerificationEmailInvalidContentException extends __BaseException {
    name = "CustomVerificationEmailInvalidContentException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "CustomVerificationEmailInvalidContentException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CustomVerificationEmailInvalidContentException.prototype);
    }
  };
  exports.CustomVerificationEmailTemplateAlreadyExistsException = class CustomVerificationEmailTemplateAlreadyExistsException extends __BaseException {
    name = "CustomVerificationEmailTemplateAlreadyExistsException";
    $fault = "client";
    CustomVerificationEmailTemplateName;
    constructor(opts) {
      super({
        name: "CustomVerificationEmailTemplateAlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CustomVerificationEmailTemplateAlreadyExistsException.prototype);
      this.CustomVerificationEmailTemplateName = opts.CustomVerificationEmailTemplateName;
    }
  };
  exports.FromEmailAddressNotVerifiedException = class FromEmailAddressNotVerifiedException extends __BaseException {
    name = "FromEmailAddressNotVerifiedException";
    $fault = "client";
    FromEmailAddress;
    constructor(opts) {
      super({
        name: "FromEmailAddressNotVerifiedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, FromEmailAddressNotVerifiedException.prototype);
      this.FromEmailAddress = opts.FromEmailAddress;
    }
  };
  exports.InvalidLambdaFunctionException = class InvalidLambdaFunctionException extends __BaseException {
    name = "InvalidLambdaFunctionException";
    $fault = "client";
    FunctionArn;
    constructor(opts) {
      super({
        name: "InvalidLambdaFunctionException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidLambdaFunctionException.prototype);
      this.FunctionArn = opts.FunctionArn;
    }
  };
  exports.InvalidS3ConfigurationException = class InvalidS3ConfigurationException extends __BaseException {
    name = "InvalidS3ConfigurationException";
    $fault = "client";
    Bucket;
    constructor(opts) {
      super({
        name: "InvalidS3ConfigurationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidS3ConfigurationException.prototype);
      this.Bucket = opts.Bucket;
    }
  };
  exports.InvalidSnsTopicException = class InvalidSnsTopicException extends __BaseException {
    name = "InvalidSnsTopicException";
    $fault = "client";
    Topic;
    constructor(opts) {
      super({
        name: "InvalidSnsTopicException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidSnsTopicException.prototype);
      this.Topic = opts.Topic;
    }
  };
  exports.RuleDoesNotExistException = class RuleDoesNotExistException extends __BaseException {
    name = "RuleDoesNotExistException";
    $fault = "client";
    Name;
    constructor(opts) {
      super({
        name: "RuleDoesNotExistException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RuleDoesNotExistException.prototype);
      this.Name = opts.Name;
    }
  };
  exports.InvalidTemplateException = class InvalidTemplateException extends __BaseException {
    name = "InvalidTemplateException";
    $fault = "client";
    TemplateName;
    constructor(opts) {
      super({
        name: "InvalidTemplateException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidTemplateException.prototype);
      this.TemplateName = opts.TemplateName;
    }
  };
  exports.CustomVerificationEmailTemplateDoesNotExistException = class CustomVerificationEmailTemplateDoesNotExistException extends __BaseException {
    name = "CustomVerificationEmailTemplateDoesNotExistException";
    $fault = "client";
    CustomVerificationEmailTemplateName;
    constructor(opts) {
      super({
        name: "CustomVerificationEmailTemplateDoesNotExistException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CustomVerificationEmailTemplateDoesNotExistException.prototype);
      this.CustomVerificationEmailTemplateName = opts.CustomVerificationEmailTemplateName;
    }
  };
  exports.EventDestinationDoesNotExistException = class EventDestinationDoesNotExistException extends __BaseException {
    name = "EventDestinationDoesNotExistException";
    $fault = "client";
    ConfigurationSetName;
    EventDestinationName;
    constructor(opts) {
      super({
        name: "EventDestinationDoesNotExistException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, EventDestinationDoesNotExistException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
      this.EventDestinationName = opts.EventDestinationName;
    }
  };
  exports.TrackingOptionsDoesNotExistException = class TrackingOptionsDoesNotExistException extends __BaseException {
    name = "TrackingOptionsDoesNotExistException";
    $fault = "client";
    ConfigurationSetName;
    constructor(opts) {
      super({
        name: "TrackingOptionsDoesNotExistException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TrackingOptionsDoesNotExistException.prototype);
      this.ConfigurationSetName = opts.ConfigurationSetName;
    }
  };
  exports.TemplateDoesNotExistException = class TemplateDoesNotExistException extends __BaseException {
    name = "TemplateDoesNotExistException";
    $fault = "client";
    TemplateName;
    constructor(opts) {
      super({
        name: "TemplateDoesNotExistException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TemplateDoesNotExistException.prototype);
      this.TemplateName = opts.TemplateName;
    }
  };
  exports.InvalidDeliveryOptionsException = class InvalidDeliveryOptionsException extends __BaseException {
    name = "InvalidDeliveryOptionsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidDeliveryOptionsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidDeliveryOptionsException.prototype);
    }
  };
  exports.InvalidPolicyException = class InvalidPolicyException extends __BaseException {
    name = "InvalidPolicyException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidPolicyException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidPolicyException.prototype);
    }
  };
  exports.InvalidRenderingParameterException = class InvalidRenderingParameterException extends __BaseException {
    name = "InvalidRenderingParameterException";
    $fault = "client";
    TemplateName;
    constructor(opts) {
      super({
        name: "InvalidRenderingParameterException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidRenderingParameterException.prototype);
      this.TemplateName = opts.TemplateName;
    }
  };
  exports.MailFromDomainNotVerifiedException = class MailFromDomainNotVerifiedException extends __BaseException {
    name = "MailFromDomainNotVerifiedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MailFromDomainNotVerifiedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MailFromDomainNotVerifiedException.prototype);
    }
  };
  exports.MessageRejected = class MessageRejected extends __BaseException {
    name = "MessageRejected";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MessageRejected",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MessageRejected.prototype);
    }
  };
  exports.MissingRenderingAttributeException = class MissingRenderingAttributeException extends __BaseException {
    name = "MissingRenderingAttributeException";
    $fault = "client";
    TemplateName;
    constructor(opts) {
      super({
        name: "MissingRenderingAttributeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MissingRenderingAttributeException.prototype);
      this.TemplateName = opts.TemplateName;
    }
  };
  exports.ProductionAccessNotGrantedException = class ProductionAccessNotGrantedException extends __BaseException {
    name = "ProductionAccessNotGrantedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ProductionAccessNotGrantedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ProductionAccessNotGrantedException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/schemas/schemas_0.js
var require_schemas_05 = __commonJS((exports) => {
  var _A = "After";
  var _AD = "ArrivalDate";
  var _AEE = "AlreadyExistsException";
  var _AHA = "AddHeaderAction";
  var _ASPE = "AccountSendingPausedException";
  var _Ac = "Actions";
  var _Act = "Action";
  var _B = "Bucket";
  var _BA = "BounceAction";
  var _BAc = "BccAddresses";
  var _BED = "BulkEmailDestination";
  var _BEDL = "BulkEmailDestinationList";
  var _BEDS = "BulkEmailDestinationStatus";
  var _BEDSL = "BulkEmailDestinationStatusList";
  var _BN = "BucketName";
  var _BOMXF = "BehaviorOnMXFailure";
  var _BRI = "BouncedRecipientInfo";
  var _BRIL = "BouncedRecipientInfoList";
  var _BS = "BounceSender";
  var _BSA = "BounceSenderArn";
  var _BT = "BounceType";
  var _BTo = "BounceTopic";
  var _Bo = "Body";
  var _Bou = "Bounces";
  var _C = "Content";
  var _CA = "ConnectAction";
  var _CAc = "CcAddresses";
  var _CCS = "CreateConfigurationSet";
  var _CCSED = "CreateConfigurationSetEventDestination";
  var _CCSEDR = "CreateConfigurationSetEventDestinationRequest";
  var _CCSEDRr = "CreateConfigurationSetEventDestinationResponse";
  var _CCSR = "CreateConfigurationSetRequest";
  var _CCSRr = "CreateConfigurationSetResponse";
  var _CCSTO = "CreateConfigurationSetTrackingOptions";
  var _CCSTOR = "CreateConfigurationSetTrackingOptionsRequest";
  var _CCSTORr = "CreateConfigurationSetTrackingOptionsResponse";
  var _CCVET = "CreateCustomVerificationEmailTemplate";
  var _CCVETR = "CreateCustomVerificationEmailTemplateRequest";
  var _CDE = "CannotDeleteException";
  var _CRD = "CustomRedirectDomain";
  var _CRF = "CreateReceiptFilter";
  var _CRFR = "CreateReceiptFilterRequest";
  var _CRFRr = "CreateReceiptFilterResponse";
  var _CRR = "CreateReceiptRule";
  var _CRRR = "CreateReceiptRuleRequest";
  var _CRRRr = "CreateReceiptRuleResponse";
  var _CRRS = "CloneReceiptRuleSet";
  var _CRRSR = "CloneReceiptRuleSetRequest";
  var _CRRSRl = "CloneReceiptRuleSetResponse";
  var _CRRSRr = "CreateReceiptRuleSetRequest";
  var _CRRSRre = "CreateReceiptRuleSetResponse";
  var _CRRSr = "CreateReceiptRuleSet";
  var _CS = "ConfigurationSet";
  var _CSAEE = "ConfigurationSetAlreadyExistsException";
  var _CSAN = "ConfigurationSetAttributeNames";
  var _CSDNEE = "ConfigurationSetDoesNotExistException";
  var _CSN = "ConfigurationSetName";
  var _CSSPE = "ConfigurationSetSendingPausedException";
  var _CSo = "ConfigurationSets";
  var _CT = "ComplaintTopic";
  var _CTR = "CreateTemplateRequest";
  var _CTRr = "CreateTemplateResponse";
  var _CTr = "CreatedTimestamp";
  var _CTre = "CreateTemplate";
  var _CVEICE = "CustomVerificationEmailInvalidContentException";
  var _CVET = "CustomVerificationEmailTemplate";
  var _CVETAEE = "CustomVerificationEmailTemplateAlreadyExistsException";
  var _CVETDNEE = "CustomVerificationEmailTemplateDoesNotExistException";
  var _CVETN = "CustomVerificationEmailTemplateName";
  var _CVETu = "CustomVerificationEmailTemplates";
  var _CWD = "CloudWatchDestination";
  var _CWDC = "CloudWatchDimensionConfiguration";
  var _CWDCl = "CloudWatchDimensionConfigurations";
  var _Ch = "Charset";
  var _Ci = "Cidr";
  var _Co = "Complaints";
  var _D = "Destination";
  var _DA = "DkimAttributes";
  var _DARRS = "DescribeActiveReceiptRuleSet";
  var _DARRSR = "DescribeActiveReceiptRuleSetRequest";
  var _DARRSRe = "DescribeActiveReceiptRuleSetResponse";
  var _DAe = "DeliveryAttempts";
  var _DC = "DimensionConfigurations";
  var _DCS = "DeleteConfigurationSet";
  var _DCSED = "DeleteConfigurationSetEventDestination";
  var _DCSEDR = "DeleteConfigurationSetEventDestinationRequest";
  var _DCSEDRe = "DeleteConfigurationSetEventDestinationResponse";
  var _DCSR = "DeleteConfigurationSetRequest";
  var _DCSRe = "DeleteConfigurationSetResponse";
  var _DCSRes = "DescribeConfigurationSetRequest";
  var _DCSResc = "DescribeConfigurationSetResponse";
  var _DCSTO = "DeleteConfigurationSetTrackingOptions";
  var _DCSTOR = "DeleteConfigurationSetTrackingOptionsRequest";
  var _DCSTORe = "DeleteConfigurationSetTrackingOptionsResponse";
  var _DCSe = "DescribeConfigurationSet";
  var _DCVET = "DeleteCustomVerificationEmailTemplate";
  var _DCVETR = "DeleteCustomVerificationEmailTemplateRequest";
  var _DCi = "DiagnosticCode";
  var _DDV = "DefaultDimensionValue";
  var _DE = "DkimEnabled";
  var _DI = "DeleteIdentity";
  var _DIP = "DeleteIdentityPolicy";
  var _DIPR = "DeleteIdentityPolicyRequest";
  var _DIPRe = "DeleteIdentityPolicyResponse";
  var _DIR = "DeleteIdentityRequest";
  var _DIRe = "DeleteIdentityResponse";
  var _DN = "DimensionName";
  var _DO = "DeliveryOptions";
  var _DRF = "DeleteReceiptFilter";
  var _DRFR = "DeleteReceiptFilterRequest";
  var _DRFRe = "DeleteReceiptFilterResponse";
  var _DRR = "DeleteReceiptRule";
  var _DRRR = "DeleteReceiptRuleRequest";
  var _DRRRe = "DeleteReceiptRuleResponse";
  var _DRRRes = "DescribeReceiptRuleRequest";
  var _DRRResc = "DescribeReceiptRuleResponse";
  var _DRRS = "DeleteReceiptRuleSet";
  var _DRRSR = "DeleteReceiptRuleSetRequest";
  var _DRRSRe = "DeleteReceiptRuleSetResponse";
  var _DRRSRes = "DescribeReceiptRuleSetRequest";
  var _DRRSResc = "DescribeReceiptRuleSetResponse";
  var _DRRSe = "DescribeReceiptRuleSet";
  var _DRRe = "DescribeReceiptRule";
  var _DSARN = "DeliveryStreamARN";
  var _DT = "DkimTokens";
  var _DTD = "DefaultTemplateData";
  var _DTR = "DeleteTemplateRequest";
  var _DTRe = "DeleteTemplateResponse";
  var _DTe = "DeliveryTopic";
  var _DTef = "DefaultTags";
  var _DTel = "DeleteTemplate";
  var _DVEA = "DeleteVerifiedEmailAddress";
  var _DVEAR = "DeleteVerifiedEmailAddressRequest";
  var _DVS = "DimensionValueSource";
  var _DVSk = "DkimVerificationStatus";
  var _Da = "Data";
  var _De = "Destinations";
  var _Do = "Domain";
  var _E = "Error";
  var _EA = "EmailAddress";
  var _ED = "EventDestination";
  var _EDAEE = "EventDestinationAlreadyExistsException";
  var _EDDNEE = "EventDestinationDoesNotExistException";
  var _EDN = "EventDestinationName";
  var _EDv = "EventDestinations";
  var _EF = "ExtensionField";
  var _EFL = "ExtensionFieldList";
  var _EFx = "ExtensionFields";
  var _En = "Enabled";
  var _Enc = "Encoding";
  var _Ex = "Explanation";
  var _F = "Filter";
  var _FA = "FunctionArn";
  var _FAr = "FromArn";
  var _FE = "ForwardingEnabled";
  var _FEA = "FromEmailAddress";
  var _FEANVE = "FromEmailAddressNotVerifiedException";
  var _FN = "FilterName";
  var _FR = "FinalRecipient";
  var _FRURL = "FailureRedirectionURL";
  var _Fi = "Filters";
  var _GASE = "GetAccountSendingEnabled";
  var _GASER = "GetAccountSendingEnabledResponse";
  var _GCVET = "GetCustomVerificationEmailTemplate";
  var _GCVETR = "GetCustomVerificationEmailTemplateRequest";
  var _GCVETRe = "GetCustomVerificationEmailTemplateResponse";
  var _GIDA = "GetIdentityDkimAttributes";
  var _GIDAR = "GetIdentityDkimAttributesRequest";
  var _GIDARe = "GetIdentityDkimAttributesResponse";
  var _GIMFDA = "GetIdentityMailFromDomainAttributes";
  var _GIMFDAR = "GetIdentityMailFromDomainAttributesRequest";
  var _GIMFDARe = "GetIdentityMailFromDomainAttributesResponse";
  var _GINA = "GetIdentityNotificationAttributes";
  var _GINAR = "GetIdentityNotificationAttributesRequest";
  var _GINARe = "GetIdentityNotificationAttributesResponse";
  var _GIP = "GetIdentityPolicies";
  var _GIPR = "GetIdentityPoliciesRequest";
  var _GIPRe = "GetIdentityPoliciesResponse";
  var _GIVA = "GetIdentityVerificationAttributes";
  var _GIVAR = "GetIdentityVerificationAttributesRequest";
  var _GIVARe = "GetIdentityVerificationAttributesResponse";
  var _GSQ = "GetSendQuota";
  var _GSQR = "GetSendQuotaResponse";
  var _GSS = "GetSendStatistics";
  var _GSSR = "GetSendStatisticsResponse";
  var _GT = "GetTemplate";
  var _GTR = "GetTemplateRequest";
  var _GTRe = "GetTemplateResponse";
  var _H = "Html";
  var _HIBNE = "HeadersInBounceNotificationsEnabled";
  var _HICNE = "HeadersInComplaintNotificationsEnabled";
  var _HIDNE = "HeadersInDeliveryNotificationsEnabled";
  var _HN = "HeaderName";
  var _HP = "HtmlPart";
  var _HV = "HeaderValue";
  var _I = "Identity";
  var _IAMRARN = "IAMRoleARN";
  var _IARN = "InstanceARN";
  var _ICSE = "InvalidConfigurationSetException";
  var _ICWDE = "InvalidCloudWatchDestinationException";
  var _IDA = "IdentityDkimAttributes";
  var _IDOE = "InvalidDeliveryOptionsException";
  var _IF = "IpFilter";
  var _IFDE = "InvalidFirehoseDestinationException";
  var _ILFE = "InvalidLambdaFunctionException";
  var _IMFDA = "IdentityMailFromDomainAttributes";
  var _INA = "IdentityNotificationAttributes";
  var _IPE = "InvalidPolicyException";
  var _IRA = "IamRoleArn";
  var _IRPE = "InvalidRenderingParameterException";
  var _ISCE = "InvalidS3ConfigurationException";
  var _ISNSDE = "InvalidSNSDestinationException";
  var _ISTE = "InvalidSnsTopicException";
  var _IT = "InvocationType";
  var _ITE = "InvalidTemplateException";
  var _ITOE = "InvalidTrackingOptionsException";
  var _ITd = "IdentityType";
  var _IVA = "IdentityVerificationAttributes";
  var _Id = "Identities";
  var _KFD = "KinesisFirehoseDestination";
  var _KKA = "KmsKeyArn";
  var _LA = "LambdaAction";
  var _LAD = "LastAttemptDate";
  var _LCS = "ListConfigurationSets";
  var _LCSR = "ListConfigurationSetsRequest";
  var _LCSRi = "ListConfigurationSetsResponse";
  var _LCVET = "ListCustomVerificationEmailTemplates";
  var _LCVETR = "ListCustomVerificationEmailTemplatesRequest";
  var _LCVETRi = "ListCustomVerificationEmailTemplatesResponse";
  var _LEE = "LimitExceededException";
  var _LFS = "LastFreshStart";
  var _LI = "ListIdentities";
  var _LIP = "ListIdentityPolicies";
  var _LIPR = "ListIdentityPoliciesRequest";
  var _LIPRi = "ListIdentityPoliciesResponse";
  var _LIR = "ListIdentitiesRequest";
  var _LIRi = "ListIdentitiesResponse";
  var _LRF = "ListReceiptFilters";
  var _LRFR = "ListReceiptFiltersRequest";
  var _LRFRi = "ListReceiptFiltersResponse";
  var _LRRS = "ListReceiptRuleSets";
  var _LRRSR = "ListReceiptRuleSetsRequest";
  var _LRRSRi = "ListReceiptRuleSetsResponse";
  var _LT = "ListTemplates";
  var _LTR = "ListTemplatesRequest";
  var _LTRi = "ListTemplatesResponse";
  var _LVEA = "ListVerifiedEmailAddresses";
  var _LVEAR = "ListVerifiedEmailAddressesResponse";
  var _M = "Message";
  var _MD = "MessageDsn";
  var _MET = "MatchingEventTypes";
  var _MFD = "MailFromDomain";
  var _MFDA = "MailFromDomainAttributes";
  var _MFDNVE = "MailFromDomainNotVerifiedException";
  var _MFDS = "MailFromDomainStatus";
  var _MHS = "Max24HourSend";
  var _MI = "MessageId";
  var _MIa = "MaxItems";
  var _MR = "MessageRejected";
  var _MRAE = "MissingRenderingAttributeException";
  var _MRa = "MaxResults";
  var _MSR = "MaxSendRate";
  var _MT = "MessageTag";
  var _MTL = "MessageTagList";
  var _Me = "Metadata";
  var _N = "Name";
  var _NA = "NotificationAttributes";
  var _NT = "NextToken";
  var _NTo = "NotificationType";
  var _OA = "OrganizationArn";
  var _OKP = "ObjectKeyPrefix";
  var _OMI = "OriginalMessageId";
  var _ORSN = "OriginalRuleSetName";
  var _P = "Policies";
  var _PANGE = "ProductionAccessNotGrantedException";
  var _PCSDO = "PutConfigurationSetDeliveryOptions";
  var _PCSDOR = "PutConfigurationSetDeliveryOptionsRequest";
  var _PCSDORu = "PutConfigurationSetDeliveryOptionsResponse";
  var _PIP = "PutIdentityPolicy";
  var _PIPR = "PutIdentityPolicyRequest";
  var _PIPRu = "PutIdentityPolicyResponse";
  var _PN = "PolicyName";
  var _PNo = "PolicyNames";
  var _Po = "Policy";
  var _R = "Recipient";
  var _RA = "RecipientArn";
  var _RAL = "ReceiptActionsList";
  var _RAe = "ReceiptAction";
  var _RDF = "RecipientDsnFields";
  var _RDNEE = "RuleDoesNotExistException";
  var _RF = "ReceiptFilter";
  var _RFL = "ReceiptFilterList";
  var _RIF = "ReceiptIpFilter";
  var _RM = "ReportingMta";
  var _RME = "ReputationMetricsEnabled";
  var _RMa = "RawMessage";
  var _RMe = "RemoteMta";
  var _RN = "RuleName";
  var _RNu = "RuleNames";
  var _RO = "ReputationOptions";
  var _RP = "ReturnPath";
  var _RPA = "ReturnPathArn";
  var _RR = "ReceiptRule";
  var _RRL = "ReceiptRulesList";
  var _RRRS = "ReorderReceiptRuleSet";
  var _RRRSR = "ReorderReceiptRuleSetRequest";
  var _RRRSRe = "ReorderReceiptRuleSetResponse";
  var _RRSL = "ReceiptRuleSetsLists";
  var _RRSM = "ReceiptRuleSetMetadata";
  var _RS = "RuleSets";
  var _RSDNEE = "RuleSetDoesNotExistException";
  var _RSN = "RuleSetName";
  var _RT = "ReplacementTags";
  var _RTA = "ReplyToAddresses";
  var _RTD = "ReplacementTemplateData";
  var _RTe = "RenderedTemplate";
  var _Re = "Recipients";
  var _Rej = "Rejects";
  var _Ru = "Rule";
  var _Rul = "Rules";
  var _S = "Sender";
  var _SA = "S3Action";
  var _SARRS = "SetActiveReceiptRuleSet";
  var _SARRSR = "SetActiveReceiptRuleSetRequest";
  var _SARRSRe = "SetActiveReceiptRuleSetResponse";
  var _SAo = "SourceArn";
  var _SAt = "StopAction";
  var _SB = "SendBounce";
  var _SBR = "SendBounceRequest";
  var _SBRe = "SendBounceResponse";
  var _SBTE = "SendBulkTemplatedEmail";
  var _SBTER = "SendBulkTemplatedEmailRequest";
  var _SBTERe = "SendBulkTemplatedEmailResponse";
  var _SC = "StatusCode";
  var _SCVE = "SendCustomVerificationEmail";
  var _SCVER = "SendCustomVerificationEmailRequest";
  var _SCVERe = "SendCustomVerificationEmailResponse";
  var _SDP = "SendDataPoints";
  var _SDPL = "SendDataPointList";
  var _SDPe = "SendDataPoint";
  var _SE = "ScanEnabled";
  var _SER = "SendEmailRequest";
  var _SERe = "SendEmailResponse";
  var _SEe = "SendingEnabled";
  var _SEen = "SendEmail";
  var _SIDE = "SetIdentityDkimEnabled";
  var _SIDER = "SetIdentityDkimEnabledRequest";
  var _SIDERe = "SetIdentityDkimEnabledResponse";
  var _SIFFE = "SetIdentityFeedbackForwardingEnabled";
  var _SIFFER = "SetIdentityFeedbackForwardingEnabledRequest";
  var _SIFFERe = "SetIdentityFeedbackForwardingEnabledResponse";
  var _SIHINE = "SetIdentityHeadersInNotificationsEnabled";
  var _SIHINER = "SetIdentityHeadersInNotificationsEnabledRequest";
  var _SIHINERe = "SetIdentityHeadersInNotificationsEnabledResponse";
  var _SIMFD = "SetIdentityMailFromDomain";
  var _SIMFDR = "SetIdentityMailFromDomainRequest";
  var _SIMFDRe = "SetIdentityMailFromDomainResponse";
  var _SINT = "SetIdentityNotificationTopic";
  var _SINTR = "SetIdentityNotificationTopicRequest";
  var _SINTRe = "SetIdentityNotificationTopicResponse";
  var _SLH = "SentLast24Hours";
  var _SNSA = "SNSAction";
  var _SNSD = "SNSDestination";
  var _SP = "SubjectPart";
  var _SRC = "SmtpReplyCode";
  var _SRE = "SendRawEmail";
  var _SRER = "SendRawEmailRequest";
  var _SRERe = "SendRawEmailResponse";
  var _SRRP = "SetReceiptRulePosition";
  var _SRRPR = "SetReceiptRulePositionRequest";
  var _SRRPRe = "SetReceiptRulePositionResponse";
  var _SRURL = "SuccessRedirectionURL";
  var _ST = "SnsTopic";
  var _STE = "SendTemplatedEmail";
  var _STER = "SendTemplatedEmailRequest";
  var _STERe = "SendTemplatedEmailResponse";
  var _Sc = "Scope";
  var _So = "Source";
  var _St = "Status";
  var _Su = "Subject";
  var _T = "Topic";
  var _TA = "TopicArn";
  var _TARN = "TopicARN";
  var _TAe = "TemplateArn";
  var _TAo = "ToAddresses";
  var _TC = "TemplateContent";
  var _TD = "TemplateData";
  var _TDNEE = "TemplateDoesNotExistException";
  var _TM = "TemplatesMetadata";
  var _TML = "TemplateMetadataList";
  var _TMe = "TemplateMetadata";
  var _TN = "TemplateName";
  var _TO = "TrackingOptions";
  var _TOAEE = "TrackingOptionsAlreadyExistsException";
  var _TODNEE = "TrackingOptionsDoesNotExistException";
  var _TP = "TlsPolicy";
  var _TPe = "TextPart";
  var _TRT = "TestRenderTemplate";
  var _TRTR = "TestRenderTemplateRequest";
  var _TRTRe = "TestRenderTemplateResponse";
  var _TS = "TemplateSubject";
  var _Ta = "Tags";
  var _Te = "Text";
  var _Tem = "Template";
  var _Ti = "Timestamp";
  var _UASE = "UpdateAccountSendingEnabled";
  var _UASER = "UpdateAccountSendingEnabledRequest";
  var _UCSED = "UpdateConfigurationSetEventDestination";
  var _UCSEDR = "UpdateConfigurationSetEventDestinationRequest";
  var _UCSEDRp = "UpdateConfigurationSetEventDestinationResponse";
  var _UCSRME = "UpdateConfigurationSetReputationMetricsEnabled";
  var _UCSRMER = "UpdateConfigurationSetReputationMetricsEnabledRequest";
  var _UCSSE = "UpdateConfigurationSetSendingEnabled";
  var _UCSSER = "UpdateConfigurationSetSendingEnabledRequest";
  var _UCSTO = "UpdateConfigurationSetTrackingOptions";
  var _UCSTOR = "UpdateConfigurationSetTrackingOptionsRequest";
  var _UCSTORp = "UpdateConfigurationSetTrackingOptionsResponse";
  var _UCVET = "UpdateCustomVerificationEmailTemplate";
  var _UCVETR = "UpdateCustomVerificationEmailTemplateRequest";
  var _URR = "UpdateReceiptRule";
  var _URRR = "UpdateReceiptRuleRequest";
  var _URRRp = "UpdateReceiptRuleResponse";
  var _UT = "UpdateTemplate";
  var _UTR = "UpdateTemplateRequest";
  var _UTRp = "UpdateTemplateResponse";
  var _V = "Value";
  var _VA = "VerificationAttributes";
  var _VDD = "VerifyDomainDkim";
  var _VDDR = "VerifyDomainDkimRequest";
  var _VDDRe = "VerifyDomainDkimResponse";
  var _VDI = "VerifyDomainIdentity";
  var _VDIR = "VerifyDomainIdentityRequest";
  var _VDIRe = "VerifyDomainIdentityResponse";
  var _VEA = "VerifiedEmailAddresses";
  var _VEAR = "VerifyEmailAddressRequest";
  var _VEAe = "VerifyEmailAddress";
  var _VEI = "VerifyEmailIdentity";
  var _VEIR = "VerifyEmailIdentityRequest";
  var _VEIRe = "VerifyEmailIdentityResponse";
  var _VS = "VerificationStatus";
  var _VT = "VerificationToken";
  var _WA = "WorkmailAction";
  var _aQE = "awsQueryError";
  var _c = "client";
  var _e = "error";
  var _hE = "httpError";
  var _m = "message";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.ses";
  var n0 = "com.amazonaws.ses";
  var { TypeRegistry } = require_schema();
  var { AccountSendingPausedException, AlreadyExistsException, CannotDeleteException, ConfigurationSetAlreadyExistsException, ConfigurationSetDoesNotExistException, ConfigurationSetSendingPausedException, CustomVerificationEmailInvalidContentException, CustomVerificationEmailTemplateAlreadyExistsException, CustomVerificationEmailTemplateDoesNotExistException, EventDestinationAlreadyExistsException, EventDestinationDoesNotExistException, FromEmailAddressNotVerifiedException, InvalidCloudWatchDestinationException, InvalidConfigurationSetException, InvalidDeliveryOptionsException, InvalidFirehoseDestinationException, InvalidLambdaFunctionException, InvalidPolicyException, InvalidRenderingParameterException, InvalidS3ConfigurationException, InvalidSNSDestinationException, InvalidSnsTopicException, InvalidTemplateException, InvalidTrackingOptionsException, LimitExceededException, MailFromDomainNotVerifiedException, MessageRejected, MissingRenderingAttributeException, ProductionAccessNotGrantedException, RuleDoesNotExistException, RuleSetDoesNotExistException, TemplateDoesNotExistException, TrackingOptionsAlreadyExistsException, TrackingOptionsDoesNotExistException } = require_errors5();
  var { SESServiceException } = require_SESServiceException();
  var _s_registry = TypeRegistry.for(_s);
  var SESServiceException$ = [-3, _s, "SESServiceException", 0, [], []];
  exports.SESServiceException$ = SESServiceException$;
  _s_registry.registerError(SESServiceException$, SESServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var AccountSendingPausedException$ = [
    -3,
    n0,
    _ASPE,
    { [_aQE]: [`AccountSendingPausedException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.AccountSendingPausedException$ = AccountSendingPausedException$;
  n0_registry.registerError(AccountSendingPausedException$, AccountSendingPausedException);
  var AlreadyExistsException$ = [
    -3,
    n0,
    _AEE,
    { [_aQE]: [`AlreadyExists`, 400], [_e]: _c, [_hE]: 400 },
    [_N, _m],
    [0, 0]
  ];
  exports.AlreadyExistsException$ = AlreadyExistsException$;
  n0_registry.registerError(AlreadyExistsException$, AlreadyExistsException);
  var CannotDeleteException$ = [
    -3,
    n0,
    _CDE,
    { [_aQE]: [`CannotDelete`, 400], [_e]: _c, [_hE]: 400 },
    [_N, _m],
    [0, 0]
  ];
  exports.CannotDeleteException$ = CannotDeleteException$;
  n0_registry.registerError(CannotDeleteException$, CannotDeleteException);
  var ConfigurationSetAlreadyExistsException$ = [
    -3,
    n0,
    _CSAEE,
    { [_aQE]: [`ConfigurationSetAlreadyExists`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _m],
    [0, 0]
  ];
  exports.ConfigurationSetAlreadyExistsException$ = ConfigurationSetAlreadyExistsException$;
  n0_registry.registerError(ConfigurationSetAlreadyExistsException$, ConfigurationSetAlreadyExistsException);
  var ConfigurationSetDoesNotExistException$ = [
    -3,
    n0,
    _CSDNEE,
    { [_aQE]: [`ConfigurationSetDoesNotExist`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _m],
    [0, 0]
  ];
  exports.ConfigurationSetDoesNotExistException$ = ConfigurationSetDoesNotExistException$;
  n0_registry.registerError(ConfigurationSetDoesNotExistException$, ConfigurationSetDoesNotExistException);
  var ConfigurationSetSendingPausedException$ = [
    -3,
    n0,
    _CSSPE,
    { [_aQE]: [`ConfigurationSetSendingPausedException`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _m],
    [0, 0]
  ];
  exports.ConfigurationSetSendingPausedException$ = ConfigurationSetSendingPausedException$;
  n0_registry.registerError(ConfigurationSetSendingPausedException$, ConfigurationSetSendingPausedException);
  var CustomVerificationEmailInvalidContentException$ = [
    -3,
    n0,
    _CVEICE,
    { [_aQE]: [`CustomVerificationEmailInvalidContent`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.CustomVerificationEmailInvalidContentException$ = CustomVerificationEmailInvalidContentException$;
  n0_registry.registerError(CustomVerificationEmailInvalidContentException$, CustomVerificationEmailInvalidContentException);
  var CustomVerificationEmailTemplateAlreadyExistsException$ = [
    -3,
    n0,
    _CVETAEE,
    { [_aQE]: [`CustomVerificationEmailTemplateAlreadyExists`, 400], [_e]: _c, [_hE]: 400 },
    [_CVETN, _m],
    [0, 0]
  ];
  exports.CustomVerificationEmailTemplateAlreadyExistsException$ = CustomVerificationEmailTemplateAlreadyExistsException$;
  n0_registry.registerError(CustomVerificationEmailTemplateAlreadyExistsException$, CustomVerificationEmailTemplateAlreadyExistsException);
  var CustomVerificationEmailTemplateDoesNotExistException$ = [
    -3,
    n0,
    _CVETDNEE,
    { [_aQE]: [`CustomVerificationEmailTemplateDoesNotExist`, 400], [_e]: _c, [_hE]: 400 },
    [_CVETN, _m],
    [0, 0]
  ];
  exports.CustomVerificationEmailTemplateDoesNotExistException$ = CustomVerificationEmailTemplateDoesNotExistException$;
  n0_registry.registerError(CustomVerificationEmailTemplateDoesNotExistException$, CustomVerificationEmailTemplateDoesNotExistException);
  var EventDestinationAlreadyExistsException$ = [
    -3,
    n0,
    _EDAEE,
    { [_aQE]: [`EventDestinationAlreadyExists`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _EDN, _m],
    [0, 0, 0]
  ];
  exports.EventDestinationAlreadyExistsException$ = EventDestinationAlreadyExistsException$;
  n0_registry.registerError(EventDestinationAlreadyExistsException$, EventDestinationAlreadyExistsException);
  var EventDestinationDoesNotExistException$ = [
    -3,
    n0,
    _EDDNEE,
    { [_aQE]: [`EventDestinationDoesNotExist`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _EDN, _m],
    [0, 0, 0]
  ];
  exports.EventDestinationDoesNotExistException$ = EventDestinationDoesNotExistException$;
  n0_registry.registerError(EventDestinationDoesNotExistException$, EventDestinationDoesNotExistException);
  var FromEmailAddressNotVerifiedException$ = [
    -3,
    n0,
    _FEANVE,
    { [_aQE]: [`FromEmailAddressNotVerified`, 400], [_e]: _c, [_hE]: 400 },
    [_FEA, _m],
    [0, 0]
  ];
  exports.FromEmailAddressNotVerifiedException$ = FromEmailAddressNotVerifiedException$;
  n0_registry.registerError(FromEmailAddressNotVerifiedException$, FromEmailAddressNotVerifiedException);
  var InvalidCloudWatchDestinationException$ = [
    -3,
    n0,
    _ICWDE,
    { [_aQE]: [`InvalidCloudWatchDestination`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _EDN, _m],
    [0, 0, 0]
  ];
  exports.InvalidCloudWatchDestinationException$ = InvalidCloudWatchDestinationException$;
  n0_registry.registerError(InvalidCloudWatchDestinationException$, InvalidCloudWatchDestinationException);
  var InvalidConfigurationSetException$ = [
    -3,
    n0,
    _ICSE,
    { [_aQE]: [`InvalidConfigurationSet`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidConfigurationSetException$ = InvalidConfigurationSetException$;
  n0_registry.registerError(InvalidConfigurationSetException$, InvalidConfigurationSetException);
  var InvalidDeliveryOptionsException$ = [
    -3,
    n0,
    _IDOE,
    { [_aQE]: [`InvalidDeliveryOptions`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidDeliveryOptionsException$ = InvalidDeliveryOptionsException$;
  n0_registry.registerError(InvalidDeliveryOptionsException$, InvalidDeliveryOptionsException);
  var InvalidFirehoseDestinationException$ = [
    -3,
    n0,
    _IFDE,
    { [_aQE]: [`InvalidFirehoseDestination`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _EDN, _m],
    [0, 0, 0]
  ];
  exports.InvalidFirehoseDestinationException$ = InvalidFirehoseDestinationException$;
  n0_registry.registerError(InvalidFirehoseDestinationException$, InvalidFirehoseDestinationException);
  var InvalidLambdaFunctionException$ = [
    -3,
    n0,
    _ILFE,
    { [_aQE]: [`InvalidLambdaFunction`, 400], [_e]: _c, [_hE]: 400 },
    [_FA, _m],
    [0, 0]
  ];
  exports.InvalidLambdaFunctionException$ = InvalidLambdaFunctionException$;
  n0_registry.registerError(InvalidLambdaFunctionException$, InvalidLambdaFunctionException);
  var InvalidPolicyException$ = [
    -3,
    n0,
    _IPE,
    { [_aQE]: [`InvalidPolicy`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidPolicyException$ = InvalidPolicyException$;
  n0_registry.registerError(InvalidPolicyException$, InvalidPolicyException);
  var InvalidRenderingParameterException$ = [
    -3,
    n0,
    _IRPE,
    { [_aQE]: [`InvalidRenderingParameter`, 400], [_e]: _c, [_hE]: 400 },
    [_TN, _m],
    [0, 0]
  ];
  exports.InvalidRenderingParameterException$ = InvalidRenderingParameterException$;
  n0_registry.registerError(InvalidRenderingParameterException$, InvalidRenderingParameterException);
  var InvalidS3ConfigurationException$ = [
    -3,
    n0,
    _ISCE,
    { [_aQE]: [`InvalidS3Configuration`, 400], [_e]: _c, [_hE]: 400 },
    [_B, _m],
    [0, 0]
  ];
  exports.InvalidS3ConfigurationException$ = InvalidS3ConfigurationException$;
  n0_registry.registerError(InvalidS3ConfigurationException$, InvalidS3ConfigurationException);
  var InvalidSNSDestinationException$ = [
    -3,
    n0,
    _ISNSDE,
    { [_aQE]: [`InvalidSNSDestination`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _EDN, _m],
    [0, 0, 0]
  ];
  exports.InvalidSNSDestinationException$ = InvalidSNSDestinationException$;
  n0_registry.registerError(InvalidSNSDestinationException$, InvalidSNSDestinationException);
  var InvalidSnsTopicException$ = [
    -3,
    n0,
    _ISTE,
    { [_aQE]: [`InvalidSnsTopic`, 400], [_e]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports.InvalidSnsTopicException$ = InvalidSnsTopicException$;
  n0_registry.registerError(InvalidSnsTopicException$, InvalidSnsTopicException);
  var InvalidTemplateException$ = [
    -3,
    n0,
    _ITE,
    { [_aQE]: [`InvalidTemplate`, 400], [_e]: _c, [_hE]: 400 },
    [_TN, _m],
    [0, 0]
  ];
  exports.InvalidTemplateException$ = InvalidTemplateException$;
  n0_registry.registerError(InvalidTemplateException$, InvalidTemplateException);
  var InvalidTrackingOptionsException$ = [
    -3,
    n0,
    _ITOE,
    { [_aQE]: [`InvalidTrackingOptions`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidTrackingOptionsException$ = InvalidTrackingOptionsException$;
  n0_registry.registerError(InvalidTrackingOptionsException$, InvalidTrackingOptionsException);
  var LimitExceededException$ = [
    -3,
    n0,
    _LEE,
    { [_aQE]: [`LimitExceeded`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.LimitExceededException$ = LimitExceededException$;
  n0_registry.registerError(LimitExceededException$, LimitExceededException);
  var MailFromDomainNotVerifiedException$ = [
    -3,
    n0,
    _MFDNVE,
    { [_aQE]: [`MailFromDomainNotVerifiedException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.MailFromDomainNotVerifiedException$ = MailFromDomainNotVerifiedException$;
  n0_registry.registerError(MailFromDomainNotVerifiedException$, MailFromDomainNotVerifiedException);
  var MessageRejected$ = [
    -3,
    n0,
    _MR,
    { [_aQE]: [`MessageRejected`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.MessageRejected$ = MessageRejected$;
  n0_registry.registerError(MessageRejected$, MessageRejected);
  var MissingRenderingAttributeException$ = [
    -3,
    n0,
    _MRAE,
    { [_aQE]: [`MissingRenderingAttribute`, 400], [_e]: _c, [_hE]: 400 },
    [_TN, _m],
    [0, 0]
  ];
  exports.MissingRenderingAttributeException$ = MissingRenderingAttributeException$;
  n0_registry.registerError(MissingRenderingAttributeException$, MissingRenderingAttributeException);
  var ProductionAccessNotGrantedException$ = [
    -3,
    n0,
    _PANGE,
    { [_aQE]: [`ProductionAccessNotGranted`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.ProductionAccessNotGrantedException$ = ProductionAccessNotGrantedException$;
  n0_registry.registerError(ProductionAccessNotGrantedException$, ProductionAccessNotGrantedException);
  var RuleDoesNotExistException$ = [
    -3,
    n0,
    _RDNEE,
    { [_aQE]: [`RuleDoesNotExist`, 400], [_e]: _c, [_hE]: 400 },
    [_N, _m],
    [0, 0]
  ];
  exports.RuleDoesNotExistException$ = RuleDoesNotExistException$;
  n0_registry.registerError(RuleDoesNotExistException$, RuleDoesNotExistException);
  var RuleSetDoesNotExistException$ = [
    -3,
    n0,
    _RSDNEE,
    { [_aQE]: [`RuleSetDoesNotExist`, 400], [_e]: _c, [_hE]: 400 },
    [_N, _m],
    [0, 0]
  ];
  exports.RuleSetDoesNotExistException$ = RuleSetDoesNotExistException$;
  n0_registry.registerError(RuleSetDoesNotExistException$, RuleSetDoesNotExistException);
  var TemplateDoesNotExistException$ = [
    -3,
    n0,
    _TDNEE,
    { [_aQE]: [`TemplateDoesNotExist`, 400], [_e]: _c, [_hE]: 400 },
    [_TN, _m],
    [0, 0]
  ];
  exports.TemplateDoesNotExistException$ = TemplateDoesNotExistException$;
  n0_registry.registerError(TemplateDoesNotExistException$, TemplateDoesNotExistException);
  var TrackingOptionsAlreadyExistsException$ = [
    -3,
    n0,
    _TOAEE,
    { [_aQE]: [`TrackingOptionsAlreadyExistsException`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _m],
    [0, 0]
  ];
  exports.TrackingOptionsAlreadyExistsException$ = TrackingOptionsAlreadyExistsException$;
  n0_registry.registerError(TrackingOptionsAlreadyExistsException$, TrackingOptionsAlreadyExistsException);
  var TrackingOptionsDoesNotExistException$ = [
    -3,
    n0,
    _TODNEE,
    { [_aQE]: [`TrackingOptionsDoesNotExistException`, 400], [_e]: _c, [_hE]: 400 },
    [_CSN, _m],
    [0, 0]
  ];
  exports.TrackingOptionsDoesNotExistException$ = TrackingOptionsDoesNotExistException$;
  n0_registry.registerError(TrackingOptionsDoesNotExistException$, TrackingOptionsDoesNotExistException);
  exports.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var AddHeaderAction$ = [
    3,
    n0,
    _AHA,
    0,
    [_HN, _HV],
    [0, 0],
    2
  ];
  exports.AddHeaderAction$ = AddHeaderAction$;
  var Body$ = [
    3,
    n0,
    _Bo,
    0,
    [_Te, _H],
    [() => Content$, () => Content$]
  ];
  exports.Body$ = Body$;
  var BounceAction$ = [
    3,
    n0,
    _BA,
    0,
    [_SRC, _M, _S, _TA, _SC],
    [0, 0, 0, 0, 0],
    3
  ];
  exports.BounceAction$ = BounceAction$;
  var BouncedRecipientInfo$ = [
    3,
    n0,
    _BRI,
    0,
    [_R, _RA, _BT, _RDF],
    [0, 0, 0, () => RecipientDsnFields$],
    1
  ];
  exports.BouncedRecipientInfo$ = BouncedRecipientInfo$;
  var BulkEmailDestination$ = [
    3,
    n0,
    _BED,
    0,
    [_D, _RT, _RTD],
    [() => Destination$, () => MessageTagList, 0],
    1
  ];
  exports.BulkEmailDestination$ = BulkEmailDestination$;
  var BulkEmailDestinationStatus$ = [
    3,
    n0,
    _BEDS,
    0,
    [_St, _E, _MI],
    [0, 0, 0]
  ];
  exports.BulkEmailDestinationStatus$ = BulkEmailDestinationStatus$;
  var CloneReceiptRuleSetRequest$ = [
    3,
    n0,
    _CRRSR,
    0,
    [_RSN, _ORSN],
    [0, 0],
    2
  ];
  exports.CloneReceiptRuleSetRequest$ = CloneReceiptRuleSetRequest$;
  var CloneReceiptRuleSetResponse$ = [
    3,
    n0,
    _CRRSRl,
    0,
    [],
    []
  ];
  exports.CloneReceiptRuleSetResponse$ = CloneReceiptRuleSetResponse$;
  var CloudWatchDestination$ = [
    3,
    n0,
    _CWD,
    0,
    [_DC],
    [() => CloudWatchDimensionConfigurations],
    1
  ];
  exports.CloudWatchDestination$ = CloudWatchDestination$;
  var CloudWatchDimensionConfiguration$ = [
    3,
    n0,
    _CWDC,
    0,
    [_DN, _DVS, _DDV],
    [0, 0, 0],
    3
  ];
  exports.CloudWatchDimensionConfiguration$ = CloudWatchDimensionConfiguration$;
  var ConfigurationSet$ = [
    3,
    n0,
    _CS,
    0,
    [_N],
    [0],
    1
  ];
  exports.ConfigurationSet$ = ConfigurationSet$;
  var ConnectAction$ = [
    3,
    n0,
    _CA,
    0,
    [_IARN, _IAMRARN],
    [0, 0],
    2
  ];
  exports.ConnectAction$ = ConnectAction$;
  var Content$ = [
    3,
    n0,
    _C,
    0,
    [_Da, _Ch],
    [0, 0],
    1
  ];
  exports.Content$ = Content$;
  var CreateConfigurationSetEventDestinationRequest$ = [
    3,
    n0,
    _CCSEDR,
    0,
    [_CSN, _ED],
    [0, () => EventDestination$],
    2
  ];
  exports.CreateConfigurationSetEventDestinationRequest$ = CreateConfigurationSetEventDestinationRequest$;
  var CreateConfigurationSetEventDestinationResponse$ = [
    3,
    n0,
    _CCSEDRr,
    0,
    [],
    []
  ];
  exports.CreateConfigurationSetEventDestinationResponse$ = CreateConfigurationSetEventDestinationResponse$;
  var CreateConfigurationSetRequest$ = [
    3,
    n0,
    _CCSR,
    0,
    [_CS],
    [() => ConfigurationSet$],
    1
  ];
  exports.CreateConfigurationSetRequest$ = CreateConfigurationSetRequest$;
  var CreateConfigurationSetResponse$ = [
    3,
    n0,
    _CCSRr,
    0,
    [],
    []
  ];
  exports.CreateConfigurationSetResponse$ = CreateConfigurationSetResponse$;
  var CreateConfigurationSetTrackingOptionsRequest$ = [
    3,
    n0,
    _CCSTOR,
    0,
    [_CSN, _TO],
    [0, () => TrackingOptions$],
    2
  ];
  exports.CreateConfigurationSetTrackingOptionsRequest$ = CreateConfigurationSetTrackingOptionsRequest$;
  var CreateConfigurationSetTrackingOptionsResponse$ = [
    3,
    n0,
    _CCSTORr,
    0,
    [],
    []
  ];
  exports.CreateConfigurationSetTrackingOptionsResponse$ = CreateConfigurationSetTrackingOptionsResponse$;
  var CreateCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _CCVETR,
    0,
    [_TN, _FEA, _TS, _TC, _SRURL, _FRURL],
    [0, 0, 0, 0, 0, 0],
    6
  ];
  exports.CreateCustomVerificationEmailTemplateRequest$ = CreateCustomVerificationEmailTemplateRequest$;
  var CreateReceiptFilterRequest$ = [
    3,
    n0,
    _CRFR,
    0,
    [_F],
    [() => ReceiptFilter$],
    1
  ];
  exports.CreateReceiptFilterRequest$ = CreateReceiptFilterRequest$;
  var CreateReceiptFilterResponse$ = [
    3,
    n0,
    _CRFRr,
    0,
    [],
    []
  ];
  exports.CreateReceiptFilterResponse$ = CreateReceiptFilterResponse$;
  var CreateReceiptRuleRequest$ = [
    3,
    n0,
    _CRRR,
    0,
    [_RSN, _Ru, _A],
    [0, () => ReceiptRule$, 0],
    2
  ];
  exports.CreateReceiptRuleRequest$ = CreateReceiptRuleRequest$;
  var CreateReceiptRuleResponse$ = [
    3,
    n0,
    _CRRRr,
    0,
    [],
    []
  ];
  exports.CreateReceiptRuleResponse$ = CreateReceiptRuleResponse$;
  var CreateReceiptRuleSetRequest$ = [
    3,
    n0,
    _CRRSRr,
    0,
    [_RSN],
    [0],
    1
  ];
  exports.CreateReceiptRuleSetRequest$ = CreateReceiptRuleSetRequest$;
  var CreateReceiptRuleSetResponse$ = [
    3,
    n0,
    _CRRSRre,
    0,
    [],
    []
  ];
  exports.CreateReceiptRuleSetResponse$ = CreateReceiptRuleSetResponse$;
  var CreateTemplateRequest$ = [
    3,
    n0,
    _CTR,
    0,
    [_Tem],
    [() => Template$],
    1
  ];
  exports.CreateTemplateRequest$ = CreateTemplateRequest$;
  var CreateTemplateResponse$ = [
    3,
    n0,
    _CTRr,
    0,
    [],
    []
  ];
  exports.CreateTemplateResponse$ = CreateTemplateResponse$;
  var CustomVerificationEmailTemplate$ = [
    3,
    n0,
    _CVET,
    0,
    [_TN, _FEA, _TS, _SRURL, _FRURL],
    [0, 0, 0, 0, 0]
  ];
  exports.CustomVerificationEmailTemplate$ = CustomVerificationEmailTemplate$;
  var DeleteConfigurationSetEventDestinationRequest$ = [
    3,
    n0,
    _DCSEDR,
    0,
    [_CSN, _EDN],
    [0, 0],
    2
  ];
  exports.DeleteConfigurationSetEventDestinationRequest$ = DeleteConfigurationSetEventDestinationRequest$;
  var DeleteConfigurationSetEventDestinationResponse$ = [
    3,
    n0,
    _DCSEDRe,
    0,
    [],
    []
  ];
  exports.DeleteConfigurationSetEventDestinationResponse$ = DeleteConfigurationSetEventDestinationResponse$;
  var DeleteConfigurationSetRequest$ = [
    3,
    n0,
    _DCSR,
    0,
    [_CSN],
    [0],
    1
  ];
  exports.DeleteConfigurationSetRequest$ = DeleteConfigurationSetRequest$;
  var DeleteConfigurationSetResponse$ = [
    3,
    n0,
    _DCSRe,
    0,
    [],
    []
  ];
  exports.DeleteConfigurationSetResponse$ = DeleteConfigurationSetResponse$;
  var DeleteConfigurationSetTrackingOptionsRequest$ = [
    3,
    n0,
    _DCSTOR,
    0,
    [_CSN],
    [0],
    1
  ];
  exports.DeleteConfigurationSetTrackingOptionsRequest$ = DeleteConfigurationSetTrackingOptionsRequest$;
  var DeleteConfigurationSetTrackingOptionsResponse$ = [
    3,
    n0,
    _DCSTORe,
    0,
    [],
    []
  ];
  exports.DeleteConfigurationSetTrackingOptionsResponse$ = DeleteConfigurationSetTrackingOptionsResponse$;
  var DeleteCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _DCVETR,
    0,
    [_TN],
    [0],
    1
  ];
  exports.DeleteCustomVerificationEmailTemplateRequest$ = DeleteCustomVerificationEmailTemplateRequest$;
  var DeleteIdentityPolicyRequest$ = [
    3,
    n0,
    _DIPR,
    0,
    [_I, _PN],
    [0, 0],
    2
  ];
  exports.DeleteIdentityPolicyRequest$ = DeleteIdentityPolicyRequest$;
  var DeleteIdentityPolicyResponse$ = [
    3,
    n0,
    _DIPRe,
    0,
    [],
    []
  ];
  exports.DeleteIdentityPolicyResponse$ = DeleteIdentityPolicyResponse$;
  var DeleteIdentityRequest$ = [
    3,
    n0,
    _DIR,
    0,
    [_I],
    [0],
    1
  ];
  exports.DeleteIdentityRequest$ = DeleteIdentityRequest$;
  var DeleteIdentityResponse$ = [
    3,
    n0,
    _DIRe,
    0,
    [],
    []
  ];
  exports.DeleteIdentityResponse$ = DeleteIdentityResponse$;
  var DeleteReceiptFilterRequest$ = [
    3,
    n0,
    _DRFR,
    0,
    [_FN],
    [0],
    1
  ];
  exports.DeleteReceiptFilterRequest$ = DeleteReceiptFilterRequest$;
  var DeleteReceiptFilterResponse$ = [
    3,
    n0,
    _DRFRe,
    0,
    [],
    []
  ];
  exports.DeleteReceiptFilterResponse$ = DeleteReceiptFilterResponse$;
  var DeleteReceiptRuleRequest$ = [
    3,
    n0,
    _DRRR,
    0,
    [_RSN, _RN],
    [0, 0],
    2
  ];
  exports.DeleteReceiptRuleRequest$ = DeleteReceiptRuleRequest$;
  var DeleteReceiptRuleResponse$ = [
    3,
    n0,
    _DRRRe,
    0,
    [],
    []
  ];
  exports.DeleteReceiptRuleResponse$ = DeleteReceiptRuleResponse$;
  var DeleteReceiptRuleSetRequest$ = [
    3,
    n0,
    _DRRSR,
    0,
    [_RSN],
    [0],
    1
  ];
  exports.DeleteReceiptRuleSetRequest$ = DeleteReceiptRuleSetRequest$;
  var DeleteReceiptRuleSetResponse$ = [
    3,
    n0,
    _DRRSRe,
    0,
    [],
    []
  ];
  exports.DeleteReceiptRuleSetResponse$ = DeleteReceiptRuleSetResponse$;
  var DeleteTemplateRequest$ = [
    3,
    n0,
    _DTR,
    0,
    [_TN],
    [0],
    1
  ];
  exports.DeleteTemplateRequest$ = DeleteTemplateRequest$;
  var DeleteTemplateResponse$ = [
    3,
    n0,
    _DTRe,
    0,
    [],
    []
  ];
  exports.DeleteTemplateResponse$ = DeleteTemplateResponse$;
  var DeleteVerifiedEmailAddressRequest$ = [
    3,
    n0,
    _DVEAR,
    0,
    [_EA],
    [0],
    1
  ];
  exports.DeleteVerifiedEmailAddressRequest$ = DeleteVerifiedEmailAddressRequest$;
  var DeliveryOptions$ = [
    3,
    n0,
    _DO,
    0,
    [_TP],
    [0]
  ];
  exports.DeliveryOptions$ = DeliveryOptions$;
  var DescribeActiveReceiptRuleSetRequest$ = [
    3,
    n0,
    _DARRSR,
    0,
    [],
    []
  ];
  exports.DescribeActiveReceiptRuleSetRequest$ = DescribeActiveReceiptRuleSetRequest$;
  var DescribeActiveReceiptRuleSetResponse$ = [
    3,
    n0,
    _DARRSRe,
    0,
    [_Me, _Rul],
    [() => ReceiptRuleSetMetadata$, () => ReceiptRulesList]
  ];
  exports.DescribeActiveReceiptRuleSetResponse$ = DescribeActiveReceiptRuleSetResponse$;
  var DescribeConfigurationSetRequest$ = [
    3,
    n0,
    _DCSRes,
    0,
    [_CSN, _CSAN],
    [0, 64 | 0],
    1
  ];
  exports.DescribeConfigurationSetRequest$ = DescribeConfigurationSetRequest$;
  var DescribeConfigurationSetResponse$ = [
    3,
    n0,
    _DCSResc,
    0,
    [_CS, _EDv, _TO, _DO, _RO],
    [() => ConfigurationSet$, () => EventDestinations, () => TrackingOptions$, () => DeliveryOptions$, () => ReputationOptions$]
  ];
  exports.DescribeConfigurationSetResponse$ = DescribeConfigurationSetResponse$;
  var DescribeReceiptRuleRequest$ = [
    3,
    n0,
    _DRRRes,
    0,
    [_RSN, _RN],
    [0, 0],
    2
  ];
  exports.DescribeReceiptRuleRequest$ = DescribeReceiptRuleRequest$;
  var DescribeReceiptRuleResponse$ = [
    3,
    n0,
    _DRRResc,
    0,
    [_Ru],
    [() => ReceiptRule$]
  ];
  exports.DescribeReceiptRuleResponse$ = DescribeReceiptRuleResponse$;
  var DescribeReceiptRuleSetRequest$ = [
    3,
    n0,
    _DRRSRes,
    0,
    [_RSN],
    [0],
    1
  ];
  exports.DescribeReceiptRuleSetRequest$ = DescribeReceiptRuleSetRequest$;
  var DescribeReceiptRuleSetResponse$ = [
    3,
    n0,
    _DRRSResc,
    0,
    [_Me, _Rul],
    [() => ReceiptRuleSetMetadata$, () => ReceiptRulesList]
  ];
  exports.DescribeReceiptRuleSetResponse$ = DescribeReceiptRuleSetResponse$;
  var Destination$ = [
    3,
    n0,
    _D,
    0,
    [_TAo, _CAc, _BAc],
    [64 | 0, 64 | 0, 64 | 0]
  ];
  exports.Destination$ = Destination$;
  var EventDestination$ = [
    3,
    n0,
    _ED,
    0,
    [_N, _MET, _En, _KFD, _CWD, _SNSD],
    [0, 64 | 0, 2, () => KinesisFirehoseDestination$, () => CloudWatchDestination$, () => SNSDestination$],
    2
  ];
  exports.EventDestination$ = EventDestination$;
  var ExtensionField$ = [
    3,
    n0,
    _EF,
    0,
    [_N, _V],
    [0, 0],
    2
  ];
  exports.ExtensionField$ = ExtensionField$;
  var GetAccountSendingEnabledResponse$ = [
    3,
    n0,
    _GASER,
    0,
    [_En],
    [2]
  ];
  exports.GetAccountSendingEnabledResponse$ = GetAccountSendingEnabledResponse$;
  var GetCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _GCVETR,
    0,
    [_TN],
    [0],
    1
  ];
  exports.GetCustomVerificationEmailTemplateRequest$ = GetCustomVerificationEmailTemplateRequest$;
  var GetCustomVerificationEmailTemplateResponse$ = [
    3,
    n0,
    _GCVETRe,
    0,
    [_TN, _FEA, _TS, _TC, _SRURL, _FRURL],
    [0, 0, 0, 0, 0, 0]
  ];
  exports.GetCustomVerificationEmailTemplateResponse$ = GetCustomVerificationEmailTemplateResponse$;
  var GetIdentityDkimAttributesRequest$ = [
    3,
    n0,
    _GIDAR,
    0,
    [_Id],
    [64 | 0],
    1
  ];
  exports.GetIdentityDkimAttributesRequest$ = GetIdentityDkimAttributesRequest$;
  var GetIdentityDkimAttributesResponse$ = [
    3,
    n0,
    _GIDARe,
    0,
    [_DA],
    [() => DkimAttributes],
    1
  ];
  exports.GetIdentityDkimAttributesResponse$ = GetIdentityDkimAttributesResponse$;
  var GetIdentityMailFromDomainAttributesRequest$ = [
    3,
    n0,
    _GIMFDAR,
    0,
    [_Id],
    [64 | 0],
    1
  ];
  exports.GetIdentityMailFromDomainAttributesRequest$ = GetIdentityMailFromDomainAttributesRequest$;
  var GetIdentityMailFromDomainAttributesResponse$ = [
    3,
    n0,
    _GIMFDARe,
    0,
    [_MFDA],
    [() => MailFromDomainAttributes],
    1
  ];
  exports.GetIdentityMailFromDomainAttributesResponse$ = GetIdentityMailFromDomainAttributesResponse$;
  var GetIdentityNotificationAttributesRequest$ = [
    3,
    n0,
    _GINAR,
    0,
    [_Id],
    [64 | 0],
    1
  ];
  exports.GetIdentityNotificationAttributesRequest$ = GetIdentityNotificationAttributesRequest$;
  var GetIdentityNotificationAttributesResponse$ = [
    3,
    n0,
    _GINARe,
    0,
    [_NA],
    [() => NotificationAttributes],
    1
  ];
  exports.GetIdentityNotificationAttributesResponse$ = GetIdentityNotificationAttributesResponse$;
  var GetIdentityPoliciesRequest$ = [
    3,
    n0,
    _GIPR,
    0,
    [_I, _PNo],
    [0, 64 | 0],
    2
  ];
  exports.GetIdentityPoliciesRequest$ = GetIdentityPoliciesRequest$;
  var GetIdentityPoliciesResponse$ = [
    3,
    n0,
    _GIPRe,
    0,
    [_P],
    [128 | 0],
    1
  ];
  exports.GetIdentityPoliciesResponse$ = GetIdentityPoliciesResponse$;
  var GetIdentityVerificationAttributesRequest$ = [
    3,
    n0,
    _GIVAR,
    0,
    [_Id],
    [64 | 0],
    1
  ];
  exports.GetIdentityVerificationAttributesRequest$ = GetIdentityVerificationAttributesRequest$;
  var GetIdentityVerificationAttributesResponse$ = [
    3,
    n0,
    _GIVARe,
    0,
    [_VA],
    [() => VerificationAttributes],
    1
  ];
  exports.GetIdentityVerificationAttributesResponse$ = GetIdentityVerificationAttributesResponse$;
  var GetSendQuotaResponse$ = [
    3,
    n0,
    _GSQR,
    0,
    [_MHS, _MSR, _SLH],
    [1, 1, 1]
  ];
  exports.GetSendQuotaResponse$ = GetSendQuotaResponse$;
  var GetSendStatisticsResponse$ = [
    3,
    n0,
    _GSSR,
    0,
    [_SDP],
    [() => SendDataPointList]
  ];
  exports.GetSendStatisticsResponse$ = GetSendStatisticsResponse$;
  var GetTemplateRequest$ = [
    3,
    n0,
    _GTR,
    0,
    [_TN],
    [0],
    1
  ];
  exports.GetTemplateRequest$ = GetTemplateRequest$;
  var GetTemplateResponse$ = [
    3,
    n0,
    _GTRe,
    0,
    [_Tem],
    [() => Template$]
  ];
  exports.GetTemplateResponse$ = GetTemplateResponse$;
  var IdentityDkimAttributes$ = [
    3,
    n0,
    _IDA,
    0,
    [_DE, _DVSk, _DT],
    [2, 0, 64 | 0],
    2
  ];
  exports.IdentityDkimAttributes$ = IdentityDkimAttributes$;
  var IdentityMailFromDomainAttributes$ = [
    3,
    n0,
    _IMFDA,
    0,
    [_MFD, _MFDS, _BOMXF],
    [0, 0, 0],
    3
  ];
  exports.IdentityMailFromDomainAttributes$ = IdentityMailFromDomainAttributes$;
  var IdentityNotificationAttributes$ = [
    3,
    n0,
    _INA,
    0,
    [_BTo, _CT, _DTe, _FE, _HIBNE, _HICNE, _HIDNE],
    [0, 0, 0, 2, 2, 2, 2],
    4
  ];
  exports.IdentityNotificationAttributes$ = IdentityNotificationAttributes$;
  var IdentityVerificationAttributes$ = [
    3,
    n0,
    _IVA,
    0,
    [_VS, _VT],
    [0, 0],
    1
  ];
  exports.IdentityVerificationAttributes$ = IdentityVerificationAttributes$;
  var KinesisFirehoseDestination$ = [
    3,
    n0,
    _KFD,
    0,
    [_IAMRARN, _DSARN],
    [0, 0],
    2
  ];
  exports.KinesisFirehoseDestination$ = KinesisFirehoseDestination$;
  var LambdaAction$ = [
    3,
    n0,
    _LA,
    0,
    [_FA, _TA, _IT],
    [0, 0, 0],
    1
  ];
  exports.LambdaAction$ = LambdaAction$;
  var ListConfigurationSetsRequest$ = [
    3,
    n0,
    _LCSR,
    0,
    [_NT, _MIa],
    [0, 1]
  ];
  exports.ListConfigurationSetsRequest$ = ListConfigurationSetsRequest$;
  var ListConfigurationSetsResponse$ = [
    3,
    n0,
    _LCSRi,
    0,
    [_CSo, _NT],
    [() => ConfigurationSets, 0]
  ];
  exports.ListConfigurationSetsResponse$ = ListConfigurationSetsResponse$;
  var ListCustomVerificationEmailTemplatesRequest$ = [
    3,
    n0,
    _LCVETR,
    0,
    [_NT, _MRa],
    [0, 1]
  ];
  exports.ListCustomVerificationEmailTemplatesRequest$ = ListCustomVerificationEmailTemplatesRequest$;
  var ListCustomVerificationEmailTemplatesResponse$ = [
    3,
    n0,
    _LCVETRi,
    0,
    [_CVETu, _NT],
    [() => CustomVerificationEmailTemplates, 0]
  ];
  exports.ListCustomVerificationEmailTemplatesResponse$ = ListCustomVerificationEmailTemplatesResponse$;
  var ListIdentitiesRequest$ = [
    3,
    n0,
    _LIR,
    0,
    [_ITd, _NT, _MIa],
    [0, 0, 1]
  ];
  exports.ListIdentitiesRequest$ = ListIdentitiesRequest$;
  var ListIdentitiesResponse$ = [
    3,
    n0,
    _LIRi,
    0,
    [_Id, _NT],
    [64 | 0, 0],
    1
  ];
  exports.ListIdentitiesResponse$ = ListIdentitiesResponse$;
  var ListIdentityPoliciesRequest$ = [
    3,
    n0,
    _LIPR,
    0,
    [_I],
    [0],
    1
  ];
  exports.ListIdentityPoliciesRequest$ = ListIdentityPoliciesRequest$;
  var ListIdentityPoliciesResponse$ = [
    3,
    n0,
    _LIPRi,
    0,
    [_PNo],
    [64 | 0],
    1
  ];
  exports.ListIdentityPoliciesResponse$ = ListIdentityPoliciesResponse$;
  var ListReceiptFiltersRequest$ = [
    3,
    n0,
    _LRFR,
    0,
    [],
    []
  ];
  exports.ListReceiptFiltersRequest$ = ListReceiptFiltersRequest$;
  var ListReceiptFiltersResponse$ = [
    3,
    n0,
    _LRFRi,
    0,
    [_Fi],
    [() => ReceiptFilterList]
  ];
  exports.ListReceiptFiltersResponse$ = ListReceiptFiltersResponse$;
  var ListReceiptRuleSetsRequest$ = [
    3,
    n0,
    _LRRSR,
    0,
    [_NT],
    [0]
  ];
  exports.ListReceiptRuleSetsRequest$ = ListReceiptRuleSetsRequest$;
  var ListReceiptRuleSetsResponse$ = [
    3,
    n0,
    _LRRSRi,
    0,
    [_RS, _NT],
    [() => ReceiptRuleSetsLists, 0]
  ];
  exports.ListReceiptRuleSetsResponse$ = ListReceiptRuleSetsResponse$;
  var ListTemplatesRequest$ = [
    3,
    n0,
    _LTR,
    0,
    [_NT, _MIa],
    [0, 1]
  ];
  exports.ListTemplatesRequest$ = ListTemplatesRequest$;
  var ListTemplatesResponse$ = [
    3,
    n0,
    _LTRi,
    0,
    [_TM, _NT],
    [() => TemplateMetadataList, 0]
  ];
  exports.ListTemplatesResponse$ = ListTemplatesResponse$;
  var ListVerifiedEmailAddressesResponse$ = [
    3,
    n0,
    _LVEAR,
    0,
    [_VEA],
    [64 | 0]
  ];
  exports.ListVerifiedEmailAddressesResponse$ = ListVerifiedEmailAddressesResponse$;
  var Message$ = [
    3,
    n0,
    _M,
    0,
    [_Su, _Bo],
    [() => Content$, () => Body$],
    2
  ];
  exports.Message$ = Message$;
  var MessageDsn$ = [
    3,
    n0,
    _MD,
    0,
    [_RM, _AD, _EFx],
    [0, 4, () => ExtensionFieldList],
    1
  ];
  exports.MessageDsn$ = MessageDsn$;
  var MessageTag$ = [
    3,
    n0,
    _MT,
    0,
    [_N, _V],
    [0, 0],
    2
  ];
  exports.MessageTag$ = MessageTag$;
  var PutConfigurationSetDeliveryOptionsRequest$ = [
    3,
    n0,
    _PCSDOR,
    0,
    [_CSN, _DO],
    [0, () => DeliveryOptions$],
    1
  ];
  exports.PutConfigurationSetDeliveryOptionsRequest$ = PutConfigurationSetDeliveryOptionsRequest$;
  var PutConfigurationSetDeliveryOptionsResponse$ = [
    3,
    n0,
    _PCSDORu,
    0,
    [],
    []
  ];
  exports.PutConfigurationSetDeliveryOptionsResponse$ = PutConfigurationSetDeliveryOptionsResponse$;
  var PutIdentityPolicyRequest$ = [
    3,
    n0,
    _PIPR,
    0,
    [_I, _PN, _Po],
    [0, 0, 0],
    3
  ];
  exports.PutIdentityPolicyRequest$ = PutIdentityPolicyRequest$;
  var PutIdentityPolicyResponse$ = [
    3,
    n0,
    _PIPRu,
    0,
    [],
    []
  ];
  exports.PutIdentityPolicyResponse$ = PutIdentityPolicyResponse$;
  var RawMessage$ = [
    3,
    n0,
    _RMa,
    0,
    [_Da],
    [21],
    1
  ];
  exports.RawMessage$ = RawMessage$;
  var ReceiptAction$ = [
    3,
    n0,
    _RAe,
    0,
    [_SA, _BA, _WA, _LA, _SAt, _AHA, _SNSA, _CA],
    [() => S3Action$, () => BounceAction$, () => WorkmailAction$, () => LambdaAction$, () => StopAction$, () => AddHeaderAction$, () => SNSAction$, () => ConnectAction$]
  ];
  exports.ReceiptAction$ = ReceiptAction$;
  var ReceiptFilter$ = [
    3,
    n0,
    _RF,
    0,
    [_N, _IF],
    [0, () => ReceiptIpFilter$],
    2
  ];
  exports.ReceiptFilter$ = ReceiptFilter$;
  var ReceiptIpFilter$ = [
    3,
    n0,
    _RIF,
    0,
    [_Po, _Ci],
    [0, 0],
    2
  ];
  exports.ReceiptIpFilter$ = ReceiptIpFilter$;
  var ReceiptRule$ = [
    3,
    n0,
    _RR,
    0,
    [_N, _En, _TP, _Re, _Ac, _SE],
    [0, 2, 0, 64 | 0, () => ReceiptActionsList, 2],
    1
  ];
  exports.ReceiptRule$ = ReceiptRule$;
  var ReceiptRuleSetMetadata$ = [
    3,
    n0,
    _RRSM,
    0,
    [_N, _CTr],
    [0, 4]
  ];
  exports.ReceiptRuleSetMetadata$ = ReceiptRuleSetMetadata$;
  var RecipientDsnFields$ = [
    3,
    n0,
    _RDF,
    0,
    [_Act, _St, _FR, _RMe, _DCi, _LAD, _EFx],
    [0, 0, 0, 0, 0, 4, () => ExtensionFieldList],
    2
  ];
  exports.RecipientDsnFields$ = RecipientDsnFields$;
  var ReorderReceiptRuleSetRequest$ = [
    3,
    n0,
    _RRRSR,
    0,
    [_RSN, _RNu],
    [0, 64 | 0],
    2
  ];
  exports.ReorderReceiptRuleSetRequest$ = ReorderReceiptRuleSetRequest$;
  var ReorderReceiptRuleSetResponse$ = [
    3,
    n0,
    _RRRSRe,
    0,
    [],
    []
  ];
  exports.ReorderReceiptRuleSetResponse$ = ReorderReceiptRuleSetResponse$;
  var ReputationOptions$ = [
    3,
    n0,
    _RO,
    0,
    [_SEe, _RME, _LFS],
    [2, 2, 4]
  ];
  exports.ReputationOptions$ = ReputationOptions$;
  var S3Action$ = [
    3,
    n0,
    _SA,
    0,
    [_BN, _TA, _OKP, _KKA, _IRA],
    [0, 0, 0, 0, 0],
    1
  ];
  exports.S3Action$ = S3Action$;
  var SendBounceRequest$ = [
    3,
    n0,
    _SBR,
    0,
    [_OMI, _BS, _BRIL, _Ex, _MD, _BSA],
    [0, 0, () => BouncedRecipientInfoList, 0, () => MessageDsn$, 0],
    3
  ];
  exports.SendBounceRequest$ = SendBounceRequest$;
  var SendBounceResponse$ = [
    3,
    n0,
    _SBRe,
    0,
    [_MI],
    [0]
  ];
  exports.SendBounceResponse$ = SendBounceResponse$;
  var SendBulkTemplatedEmailRequest$ = [
    3,
    n0,
    _SBTER,
    0,
    [_So, _Tem, _DTD, _De, _SAo, _RTA, _RP, _RPA, _CSN, _DTef, _TAe],
    [0, 0, 0, () => BulkEmailDestinationList, 0, 64 | 0, 0, 0, 0, () => MessageTagList, 0],
    4
  ];
  exports.SendBulkTemplatedEmailRequest$ = SendBulkTemplatedEmailRequest$;
  var SendBulkTemplatedEmailResponse$ = [
    3,
    n0,
    _SBTERe,
    0,
    [_St],
    [() => BulkEmailDestinationStatusList],
    1
  ];
  exports.SendBulkTemplatedEmailResponse$ = SendBulkTemplatedEmailResponse$;
  var SendCustomVerificationEmailRequest$ = [
    3,
    n0,
    _SCVER,
    0,
    [_EA, _TN, _CSN],
    [0, 0, 0],
    2
  ];
  exports.SendCustomVerificationEmailRequest$ = SendCustomVerificationEmailRequest$;
  var SendCustomVerificationEmailResponse$ = [
    3,
    n0,
    _SCVERe,
    0,
    [_MI],
    [0]
  ];
  exports.SendCustomVerificationEmailResponse$ = SendCustomVerificationEmailResponse$;
  var SendDataPoint$ = [
    3,
    n0,
    _SDPe,
    0,
    [_Ti, _DAe, _Bou, _Co, _Rej],
    [4, 1, 1, 1, 1]
  ];
  exports.SendDataPoint$ = SendDataPoint$;
  var SendEmailRequest$ = [
    3,
    n0,
    _SER,
    0,
    [_So, _D, _M, _RTA, _RP, _SAo, _RPA, _Ta, _CSN],
    [0, () => Destination$, () => Message$, 64 | 0, 0, 0, 0, () => MessageTagList, 0],
    3
  ];
  exports.SendEmailRequest$ = SendEmailRequest$;
  var SendEmailResponse$ = [
    3,
    n0,
    _SERe,
    0,
    [_MI],
    [0],
    1
  ];
  exports.SendEmailResponse$ = SendEmailResponse$;
  var SendRawEmailRequest$ = [
    3,
    n0,
    _SRER,
    0,
    [_RMa, _So, _De, _FAr, _SAo, _RPA, _Ta, _CSN],
    [() => RawMessage$, 0, 64 | 0, 0, 0, 0, () => MessageTagList, 0],
    1
  ];
  exports.SendRawEmailRequest$ = SendRawEmailRequest$;
  var SendRawEmailResponse$ = [
    3,
    n0,
    _SRERe,
    0,
    [_MI],
    [0],
    1
  ];
  exports.SendRawEmailResponse$ = SendRawEmailResponse$;
  var SendTemplatedEmailRequest$ = [
    3,
    n0,
    _STER,
    0,
    [_So, _D, _Tem, _TD, _RTA, _RP, _SAo, _RPA, _Ta, _CSN, _TAe],
    [0, () => Destination$, 0, 0, 64 | 0, 0, 0, 0, () => MessageTagList, 0, 0],
    4
  ];
  exports.SendTemplatedEmailRequest$ = SendTemplatedEmailRequest$;
  var SendTemplatedEmailResponse$ = [
    3,
    n0,
    _STERe,
    0,
    [_MI],
    [0],
    1
  ];
  exports.SendTemplatedEmailResponse$ = SendTemplatedEmailResponse$;
  var SetActiveReceiptRuleSetRequest$ = [
    3,
    n0,
    _SARRSR,
    0,
    [_RSN],
    [0]
  ];
  exports.SetActiveReceiptRuleSetRequest$ = SetActiveReceiptRuleSetRequest$;
  var SetActiveReceiptRuleSetResponse$ = [
    3,
    n0,
    _SARRSRe,
    0,
    [],
    []
  ];
  exports.SetActiveReceiptRuleSetResponse$ = SetActiveReceiptRuleSetResponse$;
  var SetIdentityDkimEnabledRequest$ = [
    3,
    n0,
    _SIDER,
    0,
    [_I, _DE],
    [0, 2],
    2
  ];
  exports.SetIdentityDkimEnabledRequest$ = SetIdentityDkimEnabledRequest$;
  var SetIdentityDkimEnabledResponse$ = [
    3,
    n0,
    _SIDERe,
    0,
    [],
    []
  ];
  exports.SetIdentityDkimEnabledResponse$ = SetIdentityDkimEnabledResponse$;
  var SetIdentityFeedbackForwardingEnabledRequest$ = [
    3,
    n0,
    _SIFFER,
    0,
    [_I, _FE],
    [0, 2],
    2
  ];
  exports.SetIdentityFeedbackForwardingEnabledRequest$ = SetIdentityFeedbackForwardingEnabledRequest$;
  var SetIdentityFeedbackForwardingEnabledResponse$ = [
    3,
    n0,
    _SIFFERe,
    0,
    [],
    []
  ];
  exports.SetIdentityFeedbackForwardingEnabledResponse$ = SetIdentityFeedbackForwardingEnabledResponse$;
  var SetIdentityHeadersInNotificationsEnabledRequest$ = [
    3,
    n0,
    _SIHINER,
    0,
    [_I, _NTo, _En],
    [0, 0, 2],
    3
  ];
  exports.SetIdentityHeadersInNotificationsEnabledRequest$ = SetIdentityHeadersInNotificationsEnabledRequest$;
  var SetIdentityHeadersInNotificationsEnabledResponse$ = [
    3,
    n0,
    _SIHINERe,
    0,
    [],
    []
  ];
  exports.SetIdentityHeadersInNotificationsEnabledResponse$ = SetIdentityHeadersInNotificationsEnabledResponse$;
  var SetIdentityMailFromDomainRequest$ = [
    3,
    n0,
    _SIMFDR,
    0,
    [_I, _MFD, _BOMXF],
    [0, 0, 0],
    1
  ];
  exports.SetIdentityMailFromDomainRequest$ = SetIdentityMailFromDomainRequest$;
  var SetIdentityMailFromDomainResponse$ = [
    3,
    n0,
    _SIMFDRe,
    0,
    [],
    []
  ];
  exports.SetIdentityMailFromDomainResponse$ = SetIdentityMailFromDomainResponse$;
  var SetIdentityNotificationTopicRequest$ = [
    3,
    n0,
    _SINTR,
    0,
    [_I, _NTo, _ST],
    [0, 0, 0],
    2
  ];
  exports.SetIdentityNotificationTopicRequest$ = SetIdentityNotificationTopicRequest$;
  var SetIdentityNotificationTopicResponse$ = [
    3,
    n0,
    _SINTRe,
    0,
    [],
    []
  ];
  exports.SetIdentityNotificationTopicResponse$ = SetIdentityNotificationTopicResponse$;
  var SetReceiptRulePositionRequest$ = [
    3,
    n0,
    _SRRPR,
    0,
    [_RSN, _RN, _A],
    [0, 0, 0],
    2
  ];
  exports.SetReceiptRulePositionRequest$ = SetReceiptRulePositionRequest$;
  var SetReceiptRulePositionResponse$ = [
    3,
    n0,
    _SRRPRe,
    0,
    [],
    []
  ];
  exports.SetReceiptRulePositionResponse$ = SetReceiptRulePositionResponse$;
  var SNSAction$ = [
    3,
    n0,
    _SNSA,
    0,
    [_TA, _Enc],
    [0, 0],
    1
  ];
  exports.SNSAction$ = SNSAction$;
  var SNSDestination$ = [
    3,
    n0,
    _SNSD,
    0,
    [_TARN],
    [0],
    1
  ];
  exports.SNSDestination$ = SNSDestination$;
  var StopAction$ = [
    3,
    n0,
    _SAt,
    0,
    [_Sc, _TA],
    [0, 0],
    1
  ];
  exports.StopAction$ = StopAction$;
  var Template$ = [
    3,
    n0,
    _Tem,
    0,
    [_TN, _SP, _TPe, _HP],
    [0, 0, 0, 0],
    1
  ];
  exports.Template$ = Template$;
  var TemplateMetadata$ = [
    3,
    n0,
    _TMe,
    0,
    [_N, _CTr],
    [0, 4]
  ];
  exports.TemplateMetadata$ = TemplateMetadata$;
  var TestRenderTemplateRequest$ = [
    3,
    n0,
    _TRTR,
    0,
    [_TN, _TD],
    [0, 0],
    2
  ];
  exports.TestRenderTemplateRequest$ = TestRenderTemplateRequest$;
  var TestRenderTemplateResponse$ = [
    3,
    n0,
    _TRTRe,
    0,
    [_RTe],
    [0]
  ];
  exports.TestRenderTemplateResponse$ = TestRenderTemplateResponse$;
  var TrackingOptions$ = [
    3,
    n0,
    _TO,
    0,
    [_CRD],
    [0]
  ];
  exports.TrackingOptions$ = TrackingOptions$;
  var UpdateAccountSendingEnabledRequest$ = [
    3,
    n0,
    _UASER,
    0,
    [_En],
    [2]
  ];
  exports.UpdateAccountSendingEnabledRequest$ = UpdateAccountSendingEnabledRequest$;
  var UpdateConfigurationSetEventDestinationRequest$ = [
    3,
    n0,
    _UCSEDR,
    0,
    [_CSN, _ED],
    [0, () => EventDestination$],
    2
  ];
  exports.UpdateConfigurationSetEventDestinationRequest$ = UpdateConfigurationSetEventDestinationRequest$;
  var UpdateConfigurationSetEventDestinationResponse$ = [
    3,
    n0,
    _UCSEDRp,
    0,
    [],
    []
  ];
  exports.UpdateConfigurationSetEventDestinationResponse$ = UpdateConfigurationSetEventDestinationResponse$;
  var UpdateConfigurationSetReputationMetricsEnabledRequest$ = [
    3,
    n0,
    _UCSRMER,
    0,
    [_CSN, _En],
    [0, 2],
    2
  ];
  exports.UpdateConfigurationSetReputationMetricsEnabledRequest$ = UpdateConfigurationSetReputationMetricsEnabledRequest$;
  var UpdateConfigurationSetSendingEnabledRequest$ = [
    3,
    n0,
    _UCSSER,
    0,
    [_CSN, _En],
    [0, 2],
    2
  ];
  exports.UpdateConfigurationSetSendingEnabledRequest$ = UpdateConfigurationSetSendingEnabledRequest$;
  var UpdateConfigurationSetTrackingOptionsRequest$ = [
    3,
    n0,
    _UCSTOR,
    0,
    [_CSN, _TO],
    [0, () => TrackingOptions$],
    2
  ];
  exports.UpdateConfigurationSetTrackingOptionsRequest$ = UpdateConfigurationSetTrackingOptionsRequest$;
  var UpdateConfigurationSetTrackingOptionsResponse$ = [
    3,
    n0,
    _UCSTORp,
    0,
    [],
    []
  ];
  exports.UpdateConfigurationSetTrackingOptionsResponse$ = UpdateConfigurationSetTrackingOptionsResponse$;
  var UpdateCustomVerificationEmailTemplateRequest$ = [
    3,
    n0,
    _UCVETR,
    0,
    [_TN, _FEA, _TS, _TC, _SRURL, _FRURL],
    [0, 0, 0, 0, 0, 0],
    1
  ];
  exports.UpdateCustomVerificationEmailTemplateRequest$ = UpdateCustomVerificationEmailTemplateRequest$;
  var UpdateReceiptRuleRequest$ = [
    3,
    n0,
    _URRR,
    0,
    [_RSN, _Ru],
    [0, () => ReceiptRule$],
    2
  ];
  exports.UpdateReceiptRuleRequest$ = UpdateReceiptRuleRequest$;
  var UpdateReceiptRuleResponse$ = [
    3,
    n0,
    _URRRp,
    0,
    [],
    []
  ];
  exports.UpdateReceiptRuleResponse$ = UpdateReceiptRuleResponse$;
  var UpdateTemplateRequest$ = [
    3,
    n0,
    _UTR,
    0,
    [_Tem],
    [() => Template$],
    1
  ];
  exports.UpdateTemplateRequest$ = UpdateTemplateRequest$;
  var UpdateTemplateResponse$ = [
    3,
    n0,
    _UTRp,
    0,
    [],
    []
  ];
  exports.UpdateTemplateResponse$ = UpdateTemplateResponse$;
  var VerifyDomainDkimRequest$ = [
    3,
    n0,
    _VDDR,
    0,
    [_Do],
    [0],
    1
  ];
  exports.VerifyDomainDkimRequest$ = VerifyDomainDkimRequest$;
  var VerifyDomainDkimResponse$ = [
    3,
    n0,
    _VDDRe,
    0,
    [_DT],
    [64 | 0],
    1
  ];
  exports.VerifyDomainDkimResponse$ = VerifyDomainDkimResponse$;
  var VerifyDomainIdentityRequest$ = [
    3,
    n0,
    _VDIR,
    0,
    [_Do],
    [0],
    1
  ];
  exports.VerifyDomainIdentityRequest$ = VerifyDomainIdentityRequest$;
  var VerifyDomainIdentityResponse$ = [
    3,
    n0,
    _VDIRe,
    0,
    [_VT],
    [0],
    1
  ];
  exports.VerifyDomainIdentityResponse$ = VerifyDomainIdentityResponse$;
  var VerifyEmailAddressRequest$ = [
    3,
    n0,
    _VEAR,
    0,
    [_EA],
    [0],
    1
  ];
  exports.VerifyEmailAddressRequest$ = VerifyEmailAddressRequest$;
  var VerifyEmailIdentityRequest$ = [
    3,
    n0,
    _VEIR,
    0,
    [_EA],
    [0],
    1
  ];
  exports.VerifyEmailIdentityRequest$ = VerifyEmailIdentityRequest$;
  var VerifyEmailIdentityResponse$ = [
    3,
    n0,
    _VEIRe,
    0,
    [],
    []
  ];
  exports.VerifyEmailIdentityResponse$ = VerifyEmailIdentityResponse$;
  var WorkmailAction$ = [
    3,
    n0,
    _WA,
    0,
    [_OA, _TA],
    [0, 0],
    1
  ];
  exports.WorkmailAction$ = WorkmailAction$;
  var __Unit = "unit";
  var AddressList = 64 | 0;
  var BouncedRecipientInfoList = [
    1,
    n0,
    _BRIL,
    0,
    () => BouncedRecipientInfo$
  ];
  var BulkEmailDestinationList = [
    1,
    n0,
    _BEDL,
    0,
    () => BulkEmailDestination$
  ];
  var BulkEmailDestinationStatusList = [
    1,
    n0,
    _BEDSL,
    0,
    () => BulkEmailDestinationStatus$
  ];
  var CloudWatchDimensionConfigurations = [
    1,
    n0,
    _CWDCl,
    0,
    () => CloudWatchDimensionConfiguration$
  ];
  var ConfigurationSetAttributeList = 64 | 0;
  var ConfigurationSets = [
    1,
    n0,
    _CSo,
    0,
    () => ConfigurationSet$
  ];
  var CustomVerificationEmailTemplates = [
    1,
    n0,
    _CVETu,
    0,
    () => CustomVerificationEmailTemplate$
  ];
  var EventDestinations = [
    1,
    n0,
    _EDv,
    0,
    () => EventDestination$
  ];
  var EventTypes = 64 | 0;
  var ExtensionFieldList = [
    1,
    n0,
    _EFL,
    0,
    () => ExtensionField$
  ];
  var IdentityList = 64 | 0;
  var MessageTagList = [
    1,
    n0,
    _MTL,
    0,
    () => MessageTag$
  ];
  var PolicyNameList = 64 | 0;
  var ReceiptActionsList = [
    1,
    n0,
    _RAL,
    0,
    () => ReceiptAction$
  ];
  var ReceiptFilterList = [
    1,
    n0,
    _RFL,
    0,
    () => ReceiptFilter$
  ];
  var ReceiptRuleNamesList = 64 | 0;
  var ReceiptRuleSetsLists = [
    1,
    n0,
    _RRSL,
    0,
    () => ReceiptRuleSetMetadata$
  ];
  var ReceiptRulesList = [
    1,
    n0,
    _RRL,
    0,
    () => ReceiptRule$
  ];
  var RecipientsList = 64 | 0;
  var SendDataPointList = [
    1,
    n0,
    _SDPL,
    0,
    () => SendDataPoint$
  ];
  var TemplateMetadataList = [
    1,
    n0,
    _TML,
    0,
    () => TemplateMetadata$
  ];
  var VerificationTokenList = 64 | 0;
  var DkimAttributes = [
    2,
    n0,
    _DA,
    0,
    0,
    () => IdentityDkimAttributes$
  ];
  var MailFromDomainAttributes = [
    2,
    n0,
    _MFDA,
    0,
    0,
    () => IdentityMailFromDomainAttributes$
  ];
  var NotificationAttributes = [
    2,
    n0,
    _NA,
    0,
    0,
    () => IdentityNotificationAttributes$
  ];
  var PolicyMap = 128 | 0;
  var VerificationAttributes = [
    2,
    n0,
    _VA,
    0,
    0,
    () => IdentityVerificationAttributes$
  ];
  exports.CloneReceiptRuleSet$ = [
    9,
    n0,
    _CRRS,
    0,
    () => CloneReceiptRuleSetRequest$,
    () => CloneReceiptRuleSetResponse$
  ];
  exports.CreateConfigurationSet$ = [
    9,
    n0,
    _CCS,
    0,
    () => CreateConfigurationSetRequest$,
    () => CreateConfigurationSetResponse$
  ];
  exports.CreateConfigurationSetEventDestination$ = [
    9,
    n0,
    _CCSED,
    0,
    () => CreateConfigurationSetEventDestinationRequest$,
    () => CreateConfigurationSetEventDestinationResponse$
  ];
  exports.CreateConfigurationSetTrackingOptions$ = [
    9,
    n0,
    _CCSTO,
    0,
    () => CreateConfigurationSetTrackingOptionsRequest$,
    () => CreateConfigurationSetTrackingOptionsResponse$
  ];
  exports.CreateCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _CCVET,
    0,
    () => CreateCustomVerificationEmailTemplateRequest$,
    () => __Unit
  ];
  exports.CreateReceiptFilter$ = [
    9,
    n0,
    _CRF,
    0,
    () => CreateReceiptFilterRequest$,
    () => CreateReceiptFilterResponse$
  ];
  exports.CreateReceiptRule$ = [
    9,
    n0,
    _CRR,
    0,
    () => CreateReceiptRuleRequest$,
    () => CreateReceiptRuleResponse$
  ];
  exports.CreateReceiptRuleSet$ = [
    9,
    n0,
    _CRRSr,
    0,
    () => CreateReceiptRuleSetRequest$,
    () => CreateReceiptRuleSetResponse$
  ];
  exports.CreateTemplate$ = [
    9,
    n0,
    _CTre,
    0,
    () => CreateTemplateRequest$,
    () => CreateTemplateResponse$
  ];
  exports.DeleteConfigurationSet$ = [
    9,
    n0,
    _DCS,
    0,
    () => DeleteConfigurationSetRequest$,
    () => DeleteConfigurationSetResponse$
  ];
  exports.DeleteConfigurationSetEventDestination$ = [
    9,
    n0,
    _DCSED,
    0,
    () => DeleteConfigurationSetEventDestinationRequest$,
    () => DeleteConfigurationSetEventDestinationResponse$
  ];
  exports.DeleteConfigurationSetTrackingOptions$ = [
    9,
    n0,
    _DCSTO,
    0,
    () => DeleteConfigurationSetTrackingOptionsRequest$,
    () => DeleteConfigurationSetTrackingOptionsResponse$
  ];
  exports.DeleteCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _DCVET,
    0,
    () => DeleteCustomVerificationEmailTemplateRequest$,
    () => __Unit
  ];
  exports.DeleteIdentity$ = [
    9,
    n0,
    _DI,
    0,
    () => DeleteIdentityRequest$,
    () => DeleteIdentityResponse$
  ];
  exports.DeleteIdentityPolicy$ = [
    9,
    n0,
    _DIP,
    0,
    () => DeleteIdentityPolicyRequest$,
    () => DeleteIdentityPolicyResponse$
  ];
  exports.DeleteReceiptFilter$ = [
    9,
    n0,
    _DRF,
    0,
    () => DeleteReceiptFilterRequest$,
    () => DeleteReceiptFilterResponse$
  ];
  exports.DeleteReceiptRule$ = [
    9,
    n0,
    _DRR,
    0,
    () => DeleteReceiptRuleRequest$,
    () => DeleteReceiptRuleResponse$
  ];
  exports.DeleteReceiptRuleSet$ = [
    9,
    n0,
    _DRRS,
    0,
    () => DeleteReceiptRuleSetRequest$,
    () => DeleteReceiptRuleSetResponse$
  ];
  exports.DeleteTemplate$ = [
    9,
    n0,
    _DTel,
    0,
    () => DeleteTemplateRequest$,
    () => DeleteTemplateResponse$
  ];
  exports.DeleteVerifiedEmailAddress$ = [
    9,
    n0,
    _DVEA,
    0,
    () => DeleteVerifiedEmailAddressRequest$,
    () => __Unit
  ];
  exports.DescribeActiveReceiptRuleSet$ = [
    9,
    n0,
    _DARRS,
    0,
    () => DescribeActiveReceiptRuleSetRequest$,
    () => DescribeActiveReceiptRuleSetResponse$
  ];
  exports.DescribeConfigurationSet$ = [
    9,
    n0,
    _DCSe,
    0,
    () => DescribeConfigurationSetRequest$,
    () => DescribeConfigurationSetResponse$
  ];
  exports.DescribeReceiptRule$ = [
    9,
    n0,
    _DRRe,
    0,
    () => DescribeReceiptRuleRequest$,
    () => DescribeReceiptRuleResponse$
  ];
  exports.DescribeReceiptRuleSet$ = [
    9,
    n0,
    _DRRSe,
    0,
    () => DescribeReceiptRuleSetRequest$,
    () => DescribeReceiptRuleSetResponse$
  ];
  exports.GetAccountSendingEnabled$ = [
    9,
    n0,
    _GASE,
    0,
    () => __Unit,
    () => GetAccountSendingEnabledResponse$
  ];
  exports.GetCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _GCVET,
    0,
    () => GetCustomVerificationEmailTemplateRequest$,
    () => GetCustomVerificationEmailTemplateResponse$
  ];
  exports.GetIdentityDkimAttributes$ = [
    9,
    n0,
    _GIDA,
    0,
    () => GetIdentityDkimAttributesRequest$,
    () => GetIdentityDkimAttributesResponse$
  ];
  exports.GetIdentityMailFromDomainAttributes$ = [
    9,
    n0,
    _GIMFDA,
    0,
    () => GetIdentityMailFromDomainAttributesRequest$,
    () => GetIdentityMailFromDomainAttributesResponse$
  ];
  exports.GetIdentityNotificationAttributes$ = [
    9,
    n0,
    _GINA,
    0,
    () => GetIdentityNotificationAttributesRequest$,
    () => GetIdentityNotificationAttributesResponse$
  ];
  exports.GetIdentityPolicies$ = [
    9,
    n0,
    _GIP,
    0,
    () => GetIdentityPoliciesRequest$,
    () => GetIdentityPoliciesResponse$
  ];
  exports.GetIdentityVerificationAttributes$ = [
    9,
    n0,
    _GIVA,
    0,
    () => GetIdentityVerificationAttributesRequest$,
    () => GetIdentityVerificationAttributesResponse$
  ];
  exports.GetSendQuota$ = [
    9,
    n0,
    _GSQ,
    0,
    () => __Unit,
    () => GetSendQuotaResponse$
  ];
  exports.GetSendStatistics$ = [
    9,
    n0,
    _GSS,
    0,
    () => __Unit,
    () => GetSendStatisticsResponse$
  ];
  exports.GetTemplate$ = [
    9,
    n0,
    _GT,
    0,
    () => GetTemplateRequest$,
    () => GetTemplateResponse$
  ];
  exports.ListConfigurationSets$ = [
    9,
    n0,
    _LCS,
    0,
    () => ListConfigurationSetsRequest$,
    () => ListConfigurationSetsResponse$
  ];
  exports.ListCustomVerificationEmailTemplates$ = [
    9,
    n0,
    _LCVET,
    0,
    () => ListCustomVerificationEmailTemplatesRequest$,
    () => ListCustomVerificationEmailTemplatesResponse$
  ];
  exports.ListIdentities$ = [
    9,
    n0,
    _LI,
    0,
    () => ListIdentitiesRequest$,
    () => ListIdentitiesResponse$
  ];
  exports.ListIdentityPolicies$ = [
    9,
    n0,
    _LIP,
    0,
    () => ListIdentityPoliciesRequest$,
    () => ListIdentityPoliciesResponse$
  ];
  exports.ListReceiptFilters$ = [
    9,
    n0,
    _LRF,
    0,
    () => ListReceiptFiltersRequest$,
    () => ListReceiptFiltersResponse$
  ];
  exports.ListReceiptRuleSets$ = [
    9,
    n0,
    _LRRS,
    0,
    () => ListReceiptRuleSetsRequest$,
    () => ListReceiptRuleSetsResponse$
  ];
  exports.ListTemplates$ = [
    9,
    n0,
    _LT,
    0,
    () => ListTemplatesRequest$,
    () => ListTemplatesResponse$
  ];
  exports.ListVerifiedEmailAddresses$ = [
    9,
    n0,
    _LVEA,
    0,
    () => __Unit,
    () => ListVerifiedEmailAddressesResponse$
  ];
  exports.PutConfigurationSetDeliveryOptions$ = [
    9,
    n0,
    _PCSDO,
    0,
    () => PutConfigurationSetDeliveryOptionsRequest$,
    () => PutConfigurationSetDeliveryOptionsResponse$
  ];
  exports.PutIdentityPolicy$ = [
    9,
    n0,
    _PIP,
    0,
    () => PutIdentityPolicyRequest$,
    () => PutIdentityPolicyResponse$
  ];
  exports.ReorderReceiptRuleSet$ = [
    9,
    n0,
    _RRRS,
    0,
    () => ReorderReceiptRuleSetRequest$,
    () => ReorderReceiptRuleSetResponse$
  ];
  exports.SendBounce$ = [
    9,
    n0,
    _SB,
    0,
    () => SendBounceRequest$,
    () => SendBounceResponse$
  ];
  exports.SendBulkTemplatedEmail$ = [
    9,
    n0,
    _SBTE,
    0,
    () => SendBulkTemplatedEmailRequest$,
    () => SendBulkTemplatedEmailResponse$
  ];
  exports.SendCustomVerificationEmail$ = [
    9,
    n0,
    _SCVE,
    0,
    () => SendCustomVerificationEmailRequest$,
    () => SendCustomVerificationEmailResponse$
  ];
  exports.SendEmail$ = [
    9,
    n0,
    _SEen,
    0,
    () => SendEmailRequest$,
    () => SendEmailResponse$
  ];
  exports.SendRawEmail$ = [
    9,
    n0,
    _SRE,
    0,
    () => SendRawEmailRequest$,
    () => SendRawEmailResponse$
  ];
  exports.SendTemplatedEmail$ = [
    9,
    n0,
    _STE,
    0,
    () => SendTemplatedEmailRequest$,
    () => SendTemplatedEmailResponse$
  ];
  exports.SetActiveReceiptRuleSet$ = [
    9,
    n0,
    _SARRS,
    0,
    () => SetActiveReceiptRuleSetRequest$,
    () => SetActiveReceiptRuleSetResponse$
  ];
  exports.SetIdentityDkimEnabled$ = [
    9,
    n0,
    _SIDE,
    0,
    () => SetIdentityDkimEnabledRequest$,
    () => SetIdentityDkimEnabledResponse$
  ];
  exports.SetIdentityFeedbackForwardingEnabled$ = [
    9,
    n0,
    _SIFFE,
    0,
    () => SetIdentityFeedbackForwardingEnabledRequest$,
    () => SetIdentityFeedbackForwardingEnabledResponse$
  ];
  exports.SetIdentityHeadersInNotificationsEnabled$ = [
    9,
    n0,
    _SIHINE,
    0,
    () => SetIdentityHeadersInNotificationsEnabledRequest$,
    () => SetIdentityHeadersInNotificationsEnabledResponse$
  ];
  exports.SetIdentityMailFromDomain$ = [
    9,
    n0,
    _SIMFD,
    0,
    () => SetIdentityMailFromDomainRequest$,
    () => SetIdentityMailFromDomainResponse$
  ];
  exports.SetIdentityNotificationTopic$ = [
    9,
    n0,
    _SINT,
    0,
    () => SetIdentityNotificationTopicRequest$,
    () => SetIdentityNotificationTopicResponse$
  ];
  exports.SetReceiptRulePosition$ = [
    9,
    n0,
    _SRRP,
    0,
    () => SetReceiptRulePositionRequest$,
    () => SetReceiptRulePositionResponse$
  ];
  exports.TestRenderTemplate$ = [
    9,
    n0,
    _TRT,
    0,
    () => TestRenderTemplateRequest$,
    () => TestRenderTemplateResponse$
  ];
  exports.UpdateAccountSendingEnabled$ = [
    9,
    n0,
    _UASE,
    0,
    () => UpdateAccountSendingEnabledRequest$,
    () => __Unit
  ];
  exports.UpdateConfigurationSetEventDestination$ = [
    9,
    n0,
    _UCSED,
    0,
    () => UpdateConfigurationSetEventDestinationRequest$,
    () => UpdateConfigurationSetEventDestinationResponse$
  ];
  exports.UpdateConfigurationSetReputationMetricsEnabled$ = [
    9,
    n0,
    _UCSRME,
    0,
    () => UpdateConfigurationSetReputationMetricsEnabledRequest$,
    () => __Unit
  ];
  exports.UpdateConfigurationSetSendingEnabled$ = [
    9,
    n0,
    _UCSSE,
    0,
    () => UpdateConfigurationSetSendingEnabledRequest$,
    () => __Unit
  ];
  exports.UpdateConfigurationSetTrackingOptions$ = [
    9,
    n0,
    _UCSTO,
    0,
    () => UpdateConfigurationSetTrackingOptionsRequest$,
    () => UpdateConfigurationSetTrackingOptionsResponse$
  ];
  exports.UpdateCustomVerificationEmailTemplate$ = [
    9,
    n0,
    _UCVET,
    0,
    () => UpdateCustomVerificationEmailTemplateRequest$,
    () => __Unit
  ];
  exports.UpdateReceiptRule$ = [
    9,
    n0,
    _URR,
    0,
    () => UpdateReceiptRuleRequest$,
    () => UpdateReceiptRuleResponse$
  ];
  exports.UpdateTemplate$ = [
    9,
    n0,
    _UT,
    0,
    () => UpdateTemplateRequest$,
    () => UpdateTemplateResponse$
  ];
  exports.VerifyDomainDkim$ = [
    9,
    n0,
    _VDD,
    0,
    () => VerifyDomainDkimRequest$,
    () => VerifyDomainDkimResponse$
  ];
  exports.VerifyDomainIdentity$ = [
    9,
    n0,
    _VDI,
    0,
    () => VerifyDomainIdentityRequest$,
    () => VerifyDomainIdentityResponse$
  ];
  exports.VerifyEmailAddress$ = [
    9,
    n0,
    _VEAe,
    0,
    () => VerifyEmailAddressRequest$,
    () => __Unit
  ];
  exports.VerifyEmailIdentity$ = [
    9,
    n0,
    _VEI,
    0,
    () => VerifyEmailIdentityRequest$,
    () => VerifyEmailIdentityResponse$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared5 = __commonJS((exports) => {
  var { AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsQueryProtocol } = require_protocols2();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultSESHttpAuthSchemeProvider } = require_httpAuthSchemeProvider5();
  var { defaultEndpointResolver } = require_endpointResolver5();
  var { errorTypeRegistries } = require_schemas_05();
  exports.getRuntimeConfig = (config) => {
    return {
      apiVersion: "2010-12-01",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSESHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsQueryProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.ses",
        errorTypeRegistries,
        xmlNamespace: "http://ses.amazonaws.com/doc/2010-12-01/",
        version: "2010-12-01",
        serviceTarget: "SimpleEmailService"
      },
      serviceId: config?.serviceId ?? "SES",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/runtimeConfig.js
var require_runtimeConfig5 = __commonJS((exports) => {
  var packageInfo = require_package6();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require_retry();
  var { calculateBodyLength, Hash } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared5();
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-ses@3.1074.0/node_modules/@aws-sdk/client-ses/dist-cjs/index.js
var require_dist_cjs25 = __commonJS((exports) => {
  var __exportStar = (m2, e) => {
    Object.assign(e, m2);
  };
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs5();
  var { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createWaiter, checkExceptions, WaiterState, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveRegionConfig } = require_config2();
  var { resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultSESHttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider5();
  var { getRuntimeConfig } = require_runtimeConfig5();
  var { CloneReceiptRuleSet$, CreateConfigurationSet$, CreateConfigurationSetEventDestination$, CreateConfigurationSetTrackingOptions$, CreateCustomVerificationEmailTemplate$, CreateReceiptFilter$, CreateReceiptRule$, CreateReceiptRuleSet$, CreateTemplate$, DeleteConfigurationSet$, DeleteConfigurationSetEventDestination$, DeleteConfigurationSetTrackingOptions$, DeleteCustomVerificationEmailTemplate$, DeleteIdentity$, DeleteIdentityPolicy$, DeleteReceiptFilter$, DeleteReceiptRule$, DeleteReceiptRuleSet$, DeleteTemplate$, DeleteVerifiedEmailAddress$, DescribeActiveReceiptRuleSet$, DescribeConfigurationSet$, DescribeReceiptRule$, DescribeReceiptRuleSet$, GetAccountSendingEnabled$, GetCustomVerificationEmailTemplate$, GetIdentityDkimAttributes$, GetIdentityMailFromDomainAttributes$, GetIdentityNotificationAttributes$, GetIdentityPolicies$, GetIdentityVerificationAttributes$, GetSendQuota$, GetSendStatistics$, GetTemplate$, ListConfigurationSets$, ListCustomVerificationEmailTemplates$, ListIdentities$, ListIdentityPolicies$, ListReceiptFilters$, ListReceiptRuleSets$, ListTemplates$, ListVerifiedEmailAddresses$, PutConfigurationSetDeliveryOptions$, PutIdentityPolicy$, ReorderReceiptRuleSet$, SendBounce$, SendBulkTemplatedEmail$, SendCustomVerificationEmail$, SendEmail$, SendRawEmail$, SendTemplatedEmail$, SetActiveReceiptRuleSet$, SetIdentityDkimEnabled$, SetIdentityFeedbackForwardingEnabled$, SetIdentityHeadersInNotificationsEnabled$, SetIdentityMailFromDomain$, SetIdentityNotificationTopic$, SetReceiptRulePosition$, TestRenderTemplate$, UpdateAccountSendingEnabled$, UpdateConfigurationSetEventDestination$, UpdateConfigurationSetReputationMetricsEnabled$, UpdateConfigurationSetSendingEnabled$, UpdateConfigurationSetTrackingOptions$, UpdateCustomVerificationEmailTemplate$, UpdateReceiptRule$, UpdateTemplate$, VerifyDomainDkim$, VerifyDomainIdentity$, VerifyEmailAddress$, VerifyEmailIdentity$ } = require_schemas_05();
  __exportStar(require_schemas_05(), exports);
  __exportStar(require_errors5(), exports);
  var { SESServiceException } = require_SESServiceException();
  exports.SESServiceException = SESServiceException;
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "ses"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class SESClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSESHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class CloneReceiptRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CloneReceiptRuleSet", {}).n("SESClient", "CloneReceiptRuleSetCommand").sc(CloneReceiptRuleSet$).build() {
  }

  class CreateConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateConfigurationSet", {}).n("SESClient", "CreateConfigurationSetCommand").sc(CreateConfigurationSet$).build() {
  }

  class CreateConfigurationSetEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateConfigurationSetEventDestination", {}).n("SESClient", "CreateConfigurationSetEventDestinationCommand").sc(CreateConfigurationSetEventDestination$).build() {
  }

  class CreateConfigurationSetTrackingOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateConfigurationSetTrackingOptions", {}).n("SESClient", "CreateConfigurationSetTrackingOptionsCommand").sc(CreateConfigurationSetTrackingOptions$).build() {
  }

  class CreateCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateCustomVerificationEmailTemplate", {}).n("SESClient", "CreateCustomVerificationEmailTemplateCommand").sc(CreateCustomVerificationEmailTemplate$).build() {
  }

  class CreateReceiptFilterCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateReceiptFilter", {}).n("SESClient", "CreateReceiptFilterCommand").sc(CreateReceiptFilter$).build() {
  }

  class CreateReceiptRuleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateReceiptRule", {}).n("SESClient", "CreateReceiptRuleCommand").sc(CreateReceiptRule$).build() {
  }

  class CreateReceiptRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateReceiptRuleSet", {}).n("SESClient", "CreateReceiptRuleSetCommand").sc(CreateReceiptRuleSet$).build() {
  }

  class CreateTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "CreateTemplate", {}).n("SESClient", "CreateTemplateCommand").sc(CreateTemplate$).build() {
  }

  class DeleteConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteConfigurationSet", {}).n("SESClient", "DeleteConfigurationSetCommand").sc(DeleteConfigurationSet$).build() {
  }

  class DeleteConfigurationSetEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteConfigurationSetEventDestination", {}).n("SESClient", "DeleteConfigurationSetEventDestinationCommand").sc(DeleteConfigurationSetEventDestination$).build() {
  }

  class DeleteConfigurationSetTrackingOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteConfigurationSetTrackingOptions", {}).n("SESClient", "DeleteConfigurationSetTrackingOptionsCommand").sc(DeleteConfigurationSetTrackingOptions$).build() {
  }

  class DeleteCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteCustomVerificationEmailTemplate", {}).n("SESClient", "DeleteCustomVerificationEmailTemplateCommand").sc(DeleteCustomVerificationEmailTemplate$).build() {
  }

  class DeleteIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteIdentity", {}).n("SESClient", "DeleteIdentityCommand").sc(DeleteIdentity$).build() {
  }

  class DeleteIdentityPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteIdentityPolicy", {}).n("SESClient", "DeleteIdentityPolicyCommand").sc(DeleteIdentityPolicy$).build() {
  }

  class DeleteReceiptFilterCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteReceiptFilter", {}).n("SESClient", "DeleteReceiptFilterCommand").sc(DeleteReceiptFilter$).build() {
  }

  class DeleteReceiptRuleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteReceiptRule", {}).n("SESClient", "DeleteReceiptRuleCommand").sc(DeleteReceiptRule$).build() {
  }

  class DeleteReceiptRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteReceiptRuleSet", {}).n("SESClient", "DeleteReceiptRuleSetCommand").sc(DeleteReceiptRuleSet$).build() {
  }

  class DeleteTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteTemplate", {}).n("SESClient", "DeleteTemplateCommand").sc(DeleteTemplate$).build() {
  }

  class DeleteVerifiedEmailAddressCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DeleteVerifiedEmailAddress", {}).n("SESClient", "DeleteVerifiedEmailAddressCommand").sc(DeleteVerifiedEmailAddress$).build() {
  }

  class DescribeActiveReceiptRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DescribeActiveReceiptRuleSet", {}).n("SESClient", "DescribeActiveReceiptRuleSetCommand").sc(DescribeActiveReceiptRuleSet$).build() {
  }

  class DescribeConfigurationSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DescribeConfigurationSet", {}).n("SESClient", "DescribeConfigurationSetCommand").sc(DescribeConfigurationSet$).build() {
  }

  class DescribeReceiptRuleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DescribeReceiptRule", {}).n("SESClient", "DescribeReceiptRuleCommand").sc(DescribeReceiptRule$).build() {
  }

  class DescribeReceiptRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "DescribeReceiptRuleSet", {}).n("SESClient", "DescribeReceiptRuleSetCommand").sc(DescribeReceiptRuleSet$).build() {
  }

  class GetAccountSendingEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetAccountSendingEnabled", {}).n("SESClient", "GetAccountSendingEnabledCommand").sc(GetAccountSendingEnabled$).build() {
  }

  class GetCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetCustomVerificationEmailTemplate", {}).n("SESClient", "GetCustomVerificationEmailTemplateCommand").sc(GetCustomVerificationEmailTemplate$).build() {
  }

  class GetIdentityDkimAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetIdentityDkimAttributes", {}).n("SESClient", "GetIdentityDkimAttributesCommand").sc(GetIdentityDkimAttributes$).build() {
  }

  class GetIdentityMailFromDomainAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetIdentityMailFromDomainAttributes", {}).n("SESClient", "GetIdentityMailFromDomainAttributesCommand").sc(GetIdentityMailFromDomainAttributes$).build() {
  }

  class GetIdentityNotificationAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetIdentityNotificationAttributes", {}).n("SESClient", "GetIdentityNotificationAttributesCommand").sc(GetIdentityNotificationAttributes$).build() {
  }

  class GetIdentityPoliciesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetIdentityPolicies", {}).n("SESClient", "GetIdentityPoliciesCommand").sc(GetIdentityPolicies$).build() {
  }

  class GetIdentityVerificationAttributesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetIdentityVerificationAttributes", {}).n("SESClient", "GetIdentityVerificationAttributesCommand").sc(GetIdentityVerificationAttributes$).build() {
  }

  class GetSendQuotaCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetSendQuota", {}).n("SESClient", "GetSendQuotaCommand").sc(GetSendQuota$).build() {
  }

  class GetSendStatisticsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetSendStatistics", {}).n("SESClient", "GetSendStatisticsCommand").sc(GetSendStatistics$).build() {
  }

  class GetTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "GetTemplate", {}).n("SESClient", "GetTemplateCommand").sc(GetTemplate$).build() {
  }

  class ListConfigurationSetsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListConfigurationSets", {}).n("SESClient", "ListConfigurationSetsCommand").sc(ListConfigurationSets$).build() {
  }

  class ListCustomVerificationEmailTemplatesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListCustomVerificationEmailTemplates", {}).n("SESClient", "ListCustomVerificationEmailTemplatesCommand").sc(ListCustomVerificationEmailTemplates$).build() {
  }

  class ListIdentitiesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListIdentities", {}).n("SESClient", "ListIdentitiesCommand").sc(ListIdentities$).build() {
  }

  class ListIdentityPoliciesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListIdentityPolicies", {}).n("SESClient", "ListIdentityPoliciesCommand").sc(ListIdentityPolicies$).build() {
  }

  class ListReceiptFiltersCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListReceiptFilters", {}).n("SESClient", "ListReceiptFiltersCommand").sc(ListReceiptFilters$).build() {
  }

  class ListReceiptRuleSetsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListReceiptRuleSets", {}).n("SESClient", "ListReceiptRuleSetsCommand").sc(ListReceiptRuleSets$).build() {
  }

  class ListTemplatesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListTemplates", {}).n("SESClient", "ListTemplatesCommand").sc(ListTemplates$).build() {
  }

  class ListVerifiedEmailAddressesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ListVerifiedEmailAddresses", {}).n("SESClient", "ListVerifiedEmailAddressesCommand").sc(ListVerifiedEmailAddresses$).build() {
  }

  class PutConfigurationSetDeliveryOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "PutConfigurationSetDeliveryOptions", {}).n("SESClient", "PutConfigurationSetDeliveryOptionsCommand").sc(PutConfigurationSetDeliveryOptions$).build() {
  }

  class PutIdentityPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "PutIdentityPolicy", {}).n("SESClient", "PutIdentityPolicyCommand").sc(PutIdentityPolicy$).build() {
  }

  class ReorderReceiptRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "ReorderReceiptRuleSet", {}).n("SESClient", "ReorderReceiptRuleSetCommand").sc(ReorderReceiptRuleSet$).build() {
  }

  class SendBounceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SendBounce", {}).n("SESClient", "SendBounceCommand").sc(SendBounce$).build() {
  }

  class SendBulkTemplatedEmailCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SendBulkTemplatedEmail", {}).n("SESClient", "SendBulkTemplatedEmailCommand").sc(SendBulkTemplatedEmail$).build() {
  }

  class SendCustomVerificationEmailCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SendCustomVerificationEmail", {}).n("SESClient", "SendCustomVerificationEmailCommand").sc(SendCustomVerificationEmail$).build() {
  }

  class SendEmailCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SendEmail", {}).n("SESClient", "SendEmailCommand").sc(SendEmail$).build() {
  }

  class SendRawEmailCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SendRawEmail", {}).n("SESClient", "SendRawEmailCommand").sc(SendRawEmail$).build() {
  }

  class SendTemplatedEmailCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SendTemplatedEmail", {}).n("SESClient", "SendTemplatedEmailCommand").sc(SendTemplatedEmail$).build() {
  }

  class SetActiveReceiptRuleSetCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SetActiveReceiptRuleSet", {}).n("SESClient", "SetActiveReceiptRuleSetCommand").sc(SetActiveReceiptRuleSet$).build() {
  }

  class SetIdentityDkimEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SetIdentityDkimEnabled", {}).n("SESClient", "SetIdentityDkimEnabledCommand").sc(SetIdentityDkimEnabled$).build() {
  }

  class SetIdentityFeedbackForwardingEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SetIdentityFeedbackForwardingEnabled", {}).n("SESClient", "SetIdentityFeedbackForwardingEnabledCommand").sc(SetIdentityFeedbackForwardingEnabled$).build() {
  }

  class SetIdentityHeadersInNotificationsEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SetIdentityHeadersInNotificationsEnabled", {}).n("SESClient", "SetIdentityHeadersInNotificationsEnabledCommand").sc(SetIdentityHeadersInNotificationsEnabled$).build() {
  }

  class SetIdentityMailFromDomainCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SetIdentityMailFromDomain", {}).n("SESClient", "SetIdentityMailFromDomainCommand").sc(SetIdentityMailFromDomain$).build() {
  }

  class SetIdentityNotificationTopicCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SetIdentityNotificationTopic", {}).n("SESClient", "SetIdentityNotificationTopicCommand").sc(SetIdentityNotificationTopic$).build() {
  }

  class SetReceiptRulePositionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "SetReceiptRulePosition", {}).n("SESClient", "SetReceiptRulePositionCommand").sc(SetReceiptRulePosition$).build() {
  }

  class TestRenderTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "TestRenderTemplate", {}).n("SESClient", "TestRenderTemplateCommand").sc(TestRenderTemplate$).build() {
  }

  class UpdateAccountSendingEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateAccountSendingEnabled", {}).n("SESClient", "UpdateAccountSendingEnabledCommand").sc(UpdateAccountSendingEnabled$).build() {
  }

  class UpdateConfigurationSetEventDestinationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateConfigurationSetEventDestination", {}).n("SESClient", "UpdateConfigurationSetEventDestinationCommand").sc(UpdateConfigurationSetEventDestination$).build() {
  }

  class UpdateConfigurationSetReputationMetricsEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateConfigurationSetReputationMetricsEnabled", {}).n("SESClient", "UpdateConfigurationSetReputationMetricsEnabledCommand").sc(UpdateConfigurationSetReputationMetricsEnabled$).build() {
  }

  class UpdateConfigurationSetSendingEnabledCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateConfigurationSetSendingEnabled", {}).n("SESClient", "UpdateConfigurationSetSendingEnabledCommand").sc(UpdateConfigurationSetSendingEnabled$).build() {
  }

  class UpdateConfigurationSetTrackingOptionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateConfigurationSetTrackingOptions", {}).n("SESClient", "UpdateConfigurationSetTrackingOptionsCommand").sc(UpdateConfigurationSetTrackingOptions$).build() {
  }

  class UpdateCustomVerificationEmailTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateCustomVerificationEmailTemplate", {}).n("SESClient", "UpdateCustomVerificationEmailTemplateCommand").sc(UpdateCustomVerificationEmailTemplate$).build() {
  }

  class UpdateReceiptRuleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateReceiptRule", {}).n("SESClient", "UpdateReceiptRuleCommand").sc(UpdateReceiptRule$).build() {
  }

  class UpdateTemplateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "UpdateTemplate", {}).n("SESClient", "UpdateTemplateCommand").sc(UpdateTemplate$).build() {
  }

  class VerifyDomainDkimCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "VerifyDomainDkim", {}).n("SESClient", "VerifyDomainDkimCommand").sc(VerifyDomainDkim$).build() {
  }

  class VerifyDomainIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "VerifyDomainIdentity", {}).n("SESClient", "VerifyDomainIdentityCommand").sc(VerifyDomainIdentity$).build() {
  }

  class VerifyEmailAddressCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "VerifyEmailAddress", {}).n("SESClient", "VerifyEmailAddressCommand").sc(VerifyEmailAddress$).build() {
  }

  class VerifyEmailIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("SimpleEmailService", "VerifyEmailIdentity", {}).n("SESClient", "VerifyEmailIdentityCommand").sc(VerifyEmailIdentity$).build() {
  }
  var paginateListCustomVerificationEmailTemplates = createPaginator(SESClient, ListCustomVerificationEmailTemplatesCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListIdentities = createPaginator(SESClient, ListIdentitiesCommand, "NextToken", "NextToken", "MaxItems");
  var checkState = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new GetIdentityVerificationAttributesCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          let objectProjection_2 = Object.values(result.VerificationAttributes).map((element_1) => {
            return element_1.VerificationStatus;
          });
          return objectProjection_2;
        };
        let allStringEq_4 = returnComparator().length > 0;
        for (let element_3 of returnComparator()) {
          allStringEq_4 = allStringEq_4 && element_3 == "Success";
        }
        if (allStringEq_4) {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForIdentityExists = async (params, input) => {
    const serviceDefaults = { minDelay: 3, maxDelay: 120 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
  };
  var waitUntilIdentityExists = async (params, input) => {
    const serviceDefaults = { minDelay: 3, maxDelay: 120 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
    return checkExceptions(result);
  };
  var commands = {
    CloneReceiptRuleSetCommand,
    CreateConfigurationSetCommand,
    CreateConfigurationSetEventDestinationCommand,
    CreateConfigurationSetTrackingOptionsCommand,
    CreateCustomVerificationEmailTemplateCommand,
    CreateReceiptFilterCommand,
    CreateReceiptRuleCommand,
    CreateReceiptRuleSetCommand,
    CreateTemplateCommand,
    DeleteConfigurationSetCommand,
    DeleteConfigurationSetEventDestinationCommand,
    DeleteConfigurationSetTrackingOptionsCommand,
    DeleteCustomVerificationEmailTemplateCommand,
    DeleteIdentityCommand,
    DeleteIdentityPolicyCommand,
    DeleteReceiptFilterCommand,
    DeleteReceiptRuleCommand,
    DeleteReceiptRuleSetCommand,
    DeleteTemplateCommand,
    DeleteVerifiedEmailAddressCommand,
    DescribeActiveReceiptRuleSetCommand,
    DescribeConfigurationSetCommand,
    DescribeReceiptRuleCommand,
    DescribeReceiptRuleSetCommand,
    GetAccountSendingEnabledCommand,
    GetCustomVerificationEmailTemplateCommand,
    GetIdentityDkimAttributesCommand,
    GetIdentityMailFromDomainAttributesCommand,
    GetIdentityNotificationAttributesCommand,
    GetIdentityPoliciesCommand,
    GetIdentityVerificationAttributesCommand,
    GetSendQuotaCommand,
    GetSendStatisticsCommand,
    GetTemplateCommand,
    ListConfigurationSetsCommand,
    ListCustomVerificationEmailTemplatesCommand,
    ListIdentitiesCommand,
    ListIdentityPoliciesCommand,
    ListReceiptFiltersCommand,
    ListReceiptRuleSetsCommand,
    ListTemplatesCommand,
    ListVerifiedEmailAddressesCommand,
    PutConfigurationSetDeliveryOptionsCommand,
    PutIdentityPolicyCommand,
    ReorderReceiptRuleSetCommand,
    SendBounceCommand,
    SendBulkTemplatedEmailCommand,
    SendCustomVerificationEmailCommand,
    SendEmailCommand,
    SendRawEmailCommand,
    SendTemplatedEmailCommand,
    SetActiveReceiptRuleSetCommand,
    SetIdentityDkimEnabledCommand,
    SetIdentityFeedbackForwardingEnabledCommand,
    SetIdentityHeadersInNotificationsEnabledCommand,
    SetIdentityMailFromDomainCommand,
    SetIdentityNotificationTopicCommand,
    SetReceiptRulePositionCommand,
    TestRenderTemplateCommand,
    UpdateAccountSendingEnabledCommand,
    UpdateConfigurationSetEventDestinationCommand,
    UpdateConfigurationSetReputationMetricsEnabledCommand,
    UpdateConfigurationSetSendingEnabledCommand,
    UpdateConfigurationSetTrackingOptionsCommand,
    UpdateCustomVerificationEmailTemplateCommand,
    UpdateReceiptRuleCommand,
    UpdateTemplateCommand,
    VerifyDomainDkimCommand,
    VerifyDomainIdentityCommand,
    VerifyEmailAddressCommand,
    VerifyEmailIdentityCommand
  };
  var paginators = {
    paginateListCustomVerificationEmailTemplates,
    paginateListIdentities
  };
  var waiters = {
    waitUntilIdentityExists
  };

  class SES extends SESClient {
  }
  createAggregatedClient(commands, SES, { paginators, waiters });
  var BehaviorOnMXFailure = {
    RejectMessage: "RejectMessage",
    UseDefaultValue: "UseDefaultValue"
  };
  var BounceType = {
    ContentRejected: "ContentRejected",
    DoesNotExist: "DoesNotExist",
    ExceededQuota: "ExceededQuota",
    MessageTooLarge: "MessageTooLarge",
    TemporaryFailure: "TemporaryFailure",
    Undefined: "Undefined"
  };
  var DsnAction = {
    DELAYED: "delayed",
    DELIVERED: "delivered",
    EXPANDED: "expanded",
    FAILED: "failed",
    RELAYED: "relayed"
  };
  var BulkEmailStatus = {
    AccountDailyQuotaExceeded: "AccountDailyQuotaExceeded",
    AccountSendingPaused: "AccountSendingPaused",
    AccountSuspended: "AccountSuspended",
    AccountThrottled: "AccountThrottled",
    ConfigurationSetDoesNotExist: "ConfigurationSetDoesNotExist",
    ConfigurationSetSendingPaused: "ConfigurationSetSendingPaused",
    Failed: "Failed",
    InvalidParameterValue: "InvalidParameterValue",
    InvalidSendingPoolName: "InvalidSendingPoolName",
    MailFromDomainNotVerified: "MailFromDomainNotVerified",
    MessageRejected: "MessageRejected",
    Success: "Success",
    TemplateDoesNotExist: "TemplateDoesNotExist",
    TransientFailure: "TransientFailure"
  };
  var DimensionValueSource = {
    EMAIL_HEADER: "emailHeader",
    LINK_TAG: "linkTag",
    MESSAGE_TAG: "messageTag"
  };
  var ConfigurationSetAttribute = {
    DELIVERY_OPTIONS: "deliveryOptions",
    EVENT_DESTINATIONS: "eventDestinations",
    REPUTATION_OPTIONS: "reputationOptions",
    TRACKING_OPTIONS: "trackingOptions"
  };
  var EventType = {
    BOUNCE: "bounce",
    CLICK: "click",
    COMPLAINT: "complaint",
    DELIVERY: "delivery",
    OPEN: "open",
    REJECT: "reject",
    RENDERING_FAILURE: "renderingFailure",
    SEND: "send"
  };
  var ReceiptFilterPolicy = {
    Allow: "Allow",
    Block: "Block"
  };
  var InvocationType = {
    Event: "Event",
    RequestResponse: "RequestResponse"
  };
  var SNSActionEncoding = {
    Base64: "Base64",
    UTF8: "UTF-8"
  };
  var StopScope = {
    RULE_SET: "RuleSet"
  };
  var TlsPolicy = {
    Optional: "Optional",
    Require: "Require"
  };
  var CustomMailFromStatus = {
    Failed: "Failed",
    Pending: "Pending",
    Success: "Success",
    TemporaryFailure: "TemporaryFailure"
  };
  var VerificationStatus = {
    Failed: "Failed",
    NotStarted: "NotStarted",
    Pending: "Pending",
    Success: "Success",
    TemporaryFailure: "TemporaryFailure"
  };
  var IdentityType = {
    Domain: "Domain",
    EmailAddress: "EmailAddress"
  };
  var NotificationType = {
    Bounce: "Bounce",
    Complaint: "Complaint",
    Delivery: "Delivery"
  };
  exports.BehaviorOnMXFailure = BehaviorOnMXFailure;
  exports.BounceType = BounceType;
  exports.BulkEmailStatus = BulkEmailStatus;
  exports.CloneReceiptRuleSetCommand = CloneReceiptRuleSetCommand;
  exports.ConfigurationSetAttribute = ConfigurationSetAttribute;
  exports.CreateConfigurationSetCommand = CreateConfigurationSetCommand;
  exports.CreateConfigurationSetEventDestinationCommand = CreateConfigurationSetEventDestinationCommand;
  exports.CreateConfigurationSetTrackingOptionsCommand = CreateConfigurationSetTrackingOptionsCommand;
  exports.CreateCustomVerificationEmailTemplateCommand = CreateCustomVerificationEmailTemplateCommand;
  exports.CreateReceiptFilterCommand = CreateReceiptFilterCommand;
  exports.CreateReceiptRuleCommand = CreateReceiptRuleCommand;
  exports.CreateReceiptRuleSetCommand = CreateReceiptRuleSetCommand;
  exports.CreateTemplateCommand = CreateTemplateCommand;
  exports.CustomMailFromStatus = CustomMailFromStatus;
  exports.DeleteConfigurationSetCommand = DeleteConfigurationSetCommand;
  exports.DeleteConfigurationSetEventDestinationCommand = DeleteConfigurationSetEventDestinationCommand;
  exports.DeleteConfigurationSetTrackingOptionsCommand = DeleteConfigurationSetTrackingOptionsCommand;
  exports.DeleteCustomVerificationEmailTemplateCommand = DeleteCustomVerificationEmailTemplateCommand;
  exports.DeleteIdentityCommand = DeleteIdentityCommand;
  exports.DeleteIdentityPolicyCommand = DeleteIdentityPolicyCommand;
  exports.DeleteReceiptFilterCommand = DeleteReceiptFilterCommand;
  exports.DeleteReceiptRuleCommand = DeleteReceiptRuleCommand;
  exports.DeleteReceiptRuleSetCommand = DeleteReceiptRuleSetCommand;
  exports.DeleteTemplateCommand = DeleteTemplateCommand;
  exports.DeleteVerifiedEmailAddressCommand = DeleteVerifiedEmailAddressCommand;
  exports.DescribeActiveReceiptRuleSetCommand = DescribeActiveReceiptRuleSetCommand;
  exports.DescribeConfigurationSetCommand = DescribeConfigurationSetCommand;
  exports.DescribeReceiptRuleCommand = DescribeReceiptRuleCommand;
  exports.DescribeReceiptRuleSetCommand = DescribeReceiptRuleSetCommand;
  exports.DimensionValueSource = DimensionValueSource;
  exports.DsnAction = DsnAction;
  exports.EventType = EventType;
  exports.GetAccountSendingEnabledCommand = GetAccountSendingEnabledCommand;
  exports.GetCustomVerificationEmailTemplateCommand = GetCustomVerificationEmailTemplateCommand;
  exports.GetIdentityDkimAttributesCommand = GetIdentityDkimAttributesCommand;
  exports.GetIdentityMailFromDomainAttributesCommand = GetIdentityMailFromDomainAttributesCommand;
  exports.GetIdentityNotificationAttributesCommand = GetIdentityNotificationAttributesCommand;
  exports.GetIdentityPoliciesCommand = GetIdentityPoliciesCommand;
  exports.GetIdentityVerificationAttributesCommand = GetIdentityVerificationAttributesCommand;
  exports.GetSendQuotaCommand = GetSendQuotaCommand;
  exports.GetSendStatisticsCommand = GetSendStatisticsCommand;
  exports.GetTemplateCommand = GetTemplateCommand;
  exports.IdentityType = IdentityType;
  exports.InvocationType = InvocationType;
  exports.ListConfigurationSetsCommand = ListConfigurationSetsCommand;
  exports.ListCustomVerificationEmailTemplatesCommand = ListCustomVerificationEmailTemplatesCommand;
  exports.ListIdentitiesCommand = ListIdentitiesCommand;
  exports.ListIdentityPoliciesCommand = ListIdentityPoliciesCommand;
  exports.ListReceiptFiltersCommand = ListReceiptFiltersCommand;
  exports.ListReceiptRuleSetsCommand = ListReceiptRuleSetsCommand;
  exports.ListTemplatesCommand = ListTemplatesCommand;
  exports.ListVerifiedEmailAddressesCommand = ListVerifiedEmailAddressesCommand;
  exports.NotificationType = NotificationType;
  exports.PutConfigurationSetDeliveryOptionsCommand = PutConfigurationSetDeliveryOptionsCommand;
  exports.PutIdentityPolicyCommand = PutIdentityPolicyCommand;
  exports.ReceiptFilterPolicy = ReceiptFilterPolicy;
  exports.ReorderReceiptRuleSetCommand = ReorderReceiptRuleSetCommand;
  exports.SES = SES;
  exports.SESClient = SESClient;
  exports.SNSActionEncoding = SNSActionEncoding;
  exports.SendBounceCommand = SendBounceCommand;
  exports.SendBulkTemplatedEmailCommand = SendBulkTemplatedEmailCommand;
  exports.SendCustomVerificationEmailCommand = SendCustomVerificationEmailCommand;
  exports.SendEmailCommand = SendEmailCommand;
  exports.SendRawEmailCommand = SendRawEmailCommand;
  exports.SendTemplatedEmailCommand = SendTemplatedEmailCommand;
  exports.SetActiveReceiptRuleSetCommand = SetActiveReceiptRuleSetCommand;
  exports.SetIdentityDkimEnabledCommand = SetIdentityDkimEnabledCommand;
  exports.SetIdentityFeedbackForwardingEnabledCommand = SetIdentityFeedbackForwardingEnabledCommand;
  exports.SetIdentityHeadersInNotificationsEnabledCommand = SetIdentityHeadersInNotificationsEnabledCommand;
  exports.SetIdentityMailFromDomainCommand = SetIdentityMailFromDomainCommand;
  exports.SetIdentityNotificationTopicCommand = SetIdentityNotificationTopicCommand;
  exports.SetReceiptRulePositionCommand = SetReceiptRulePositionCommand;
  exports.StopScope = StopScope;
  exports.TestRenderTemplateCommand = TestRenderTemplateCommand;
  exports.TlsPolicy = TlsPolicy;
  exports.UpdateAccountSendingEnabledCommand = UpdateAccountSendingEnabledCommand;
  exports.UpdateConfigurationSetEventDestinationCommand = UpdateConfigurationSetEventDestinationCommand;
  exports.UpdateConfigurationSetReputationMetricsEnabledCommand = UpdateConfigurationSetReputationMetricsEnabledCommand;
  exports.UpdateConfigurationSetSendingEnabledCommand = UpdateConfigurationSetSendingEnabledCommand;
  exports.UpdateConfigurationSetTrackingOptionsCommand = UpdateConfigurationSetTrackingOptionsCommand;
  exports.UpdateCustomVerificationEmailTemplateCommand = UpdateCustomVerificationEmailTemplateCommand;
  exports.UpdateReceiptRuleCommand = UpdateReceiptRuleCommand;
  exports.UpdateTemplateCommand = UpdateTemplateCommand;
  exports.VerificationStatus = VerificationStatus;
  exports.VerifyDomainDkimCommand = VerifyDomainDkimCommand;
  exports.VerifyDomainIdentityCommand = VerifyDomainIdentityCommand;
  exports.VerifyEmailAddressCommand = VerifyEmailAddressCommand;
  exports.VerifyEmailIdentityCommand = VerifyEmailIdentityCommand;
  exports.paginateListCustomVerificationEmailTemplates = paginateListCustomVerificationEmailTemplates;
  exports.paginateListIdentities = paginateListIdentities;
  exports.waitForIdentityExists = waitForIdentityExists;
  exports.waitUntilIdentityExists = waitUntilIdentityExists;
});

// ../../node_modules/.pnpm/@smithy+property-provider@4.2.13/node_modules/@smithy/property-provider/dist-cjs/index.js
var require_dist_cjs26 = __commonJS((exports) => {
  class ProviderError extends Error {
    name = "ProviderError";
    tryNextLink;
    constructor(message, options = true) {
      let logger;
      let tryNextLink = true;
      if (typeof options === "boolean") {
        logger = undefined;
        tryNextLink = options;
      } else if (options != null && typeof options === "object") {
        logger = options.logger;
        tryNextLink = options.tryNextLink ?? true;
      }
      super(message);
      this.tryNextLink = tryNextLink;
      Object.setPrototypeOf(this, ProviderError.prototype);
      logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
    }
    static from(error2, options = true) {
      return Object.assign(new this(error2.message, options), error2);
    }
  }

  class CredentialsProviderError extends ProviderError {
    name = "CredentialsProviderError";
    constructor(message, options = true) {
      super(message, options);
      Object.setPrototypeOf(this, CredentialsProviderError.prototype);
    }
  }

  class TokenProviderError extends ProviderError {
    name = "TokenProviderError";
    constructor(message, options = true) {
      super(message, options);
      Object.setPrototypeOf(this, TokenProviderError.prototype);
    }
  }
  var chain = (...providers) => async () => {
    if (providers.length === 0) {
      throw new ProviderError("No providers in chain");
    }
    let lastProviderError;
    for (const provider of providers) {
      try {
        const credentials = await provider();
        return credentials;
      } catch (err) {
        lastProviderError = err;
        if (err?.tryNextLink) {
          continue;
        }
        throw err;
      }
    }
    throw lastProviderError;
  };
  var fromStatic = (staticValue) => () => Promise.resolve(staticValue);
  var memoize = (provider, isExpired, requiresRefresh) => {
    let resolved;
    let pending;
    let hasResult;
    let isConstant = false;
    const coalesceProvider = async () => {
      if (!pending) {
        pending = provider();
      }
      try {
        resolved = await pending;
        hasResult = true;
        isConstant = false;
      } finally {
        pending = undefined;
      }
      return resolved;
    };
    if (isExpired === undefined) {
      return async (options) => {
        if (!hasResult || options?.forceRefresh) {
          resolved = await coalesceProvider();
        }
        return resolved;
      };
    }
    return async (options) => {
      if (!hasResult || options?.forceRefresh) {
        resolved = await coalesceProvider();
      }
      if (isConstant) {
        return resolved;
      }
      if (requiresRefresh && !requiresRefresh(resolved)) {
        isConstant = true;
        return resolved;
      }
      if (isExpired(resolved)) {
        await coalesceProvider();
        return resolved;
      }
      return resolved;
    };
  };
  exports.CredentialsProviderError = CredentialsProviderError;
  exports.ProviderError = ProviderError;
  exports.TokenProviderError = TokenProviderError;
  exports.chain = chain;
  exports.fromStatic = fromStatic;
  exports.memoize = memoize;
});

// ../../node_modules/.pnpm/@smithy+shared-ini-file-loader@4.4.8/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js
var require_getHomeDir = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getHomeDir = undefined;
  var os_1 = __require("os");
  var path_1 = __require("path");
  var homeDirCache = {};
  var getHomeDirCacheKey = () => {
    if (process && process.geteuid) {
      return `${process.geteuid()}`;
    }
    return "DEFAULT";
  };
  var getHomeDir = () => {
    const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;
    if (HOME)
      return HOME;
    if (USERPROFILE)
      return USERPROFILE;
    if (HOMEPATH)
      return `${HOMEDRIVE}${HOMEPATH}`;
    const homeDirCacheKey = getHomeDirCacheKey();
    if (!homeDirCache[homeDirCacheKey])
      homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();
    return homeDirCache[homeDirCacheKey];
  };
  exports.getHomeDir = getHomeDir;
});

// ../../node_modules/.pnpm/@smithy+shared-ini-file-loader@4.4.8/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js
var require_getSSOTokenFilepath = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getSSOTokenFilepath = undefined;
  var crypto_1 = __require("crypto");
  var path_1 = __require("path");
  var getHomeDir_1 = require_getHomeDir();
  var getSSOTokenFilepath = (id) => {
    const hasher = (0, crypto_1.createHash)("sha1");
    const cacheName = hasher.update(id).digest("hex");
    return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`);
  };
  exports.getSSOTokenFilepath = getSSOTokenFilepath;
});

// ../../node_modules/.pnpm/@smithy+shared-ini-file-loader@4.4.8/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js
var require_getSSOTokenFromFile = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getSSOTokenFromFile = exports.tokenIntercept = undefined;
  var promises_1 = __require("fs/promises");
  var getSSOTokenFilepath_1 = require_getSSOTokenFilepath();
  exports.tokenIntercept = {};
  var getSSOTokenFromFile = async (id) => {
    if (exports.tokenIntercept[id]) {
      return exports.tokenIntercept[id];
    }
    const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);
    const ssoTokenText = await (0, promises_1.readFile)(ssoTokenFilepath, "utf8");
    return JSON.parse(ssoTokenText);
  };
  exports.getSSOTokenFromFile = getSSOTokenFromFile;
});

// ../../node_modules/.pnpm/@smithy+shared-ini-file-loader@4.4.8/node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js
var require_readFile = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.readFile = exports.fileIntercept = exports.filePromises = undefined;
  var promises_1 = __require("node:fs/promises");
  exports.filePromises = {};
  exports.fileIntercept = {};
  var readFile2 = (path2, options) => {
    if (exports.fileIntercept[path2] !== undefined) {
      return exports.fileIntercept[path2];
    }
    if (!exports.filePromises[path2] || options?.ignoreCache) {
      exports.filePromises[path2] = (0, promises_1.readFile)(path2, "utf8");
    }
    return exports.filePromises[path2];
  };
  exports.readFile = readFile2;
});

// ../../node_modules/.pnpm/@smithy+shared-ini-file-loader@4.4.8/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js
var require_dist_cjs27 = __commonJS((exports) => {
  var getHomeDir = require_getHomeDir();
  var getSSOTokenFilepath = require_getSSOTokenFilepath();
  var getSSOTokenFromFile = require_getSSOTokenFromFile();
  var path2 = __require("path");
  var types4 = require_dist_cjs();
  var readFile2 = require_readFile();
  var ENV_PROFILE = "AWS_PROFILE";
  var DEFAULT_PROFILE = "default";
  var getProfileName = (init4) => init4.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
  var CONFIG_PREFIX_SEPARATOR = ".";
  var getConfigData = (data) => Object.entries(data).filter(([key]) => {
    const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
    if (indexOfSeparator === -1) {
      return false;
    }
    return Object.values(types4.IniSectionType).includes(key.substring(0, indexOfSeparator));
  }).reduce((acc, [key, value]) => {
    const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
    const updatedKey = key.substring(0, indexOfSeparator) === types4.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
    acc[updatedKey] = value;
    return acc;
  }, {
    ...data.default && { default: data.default }
  });
  var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
  var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path2.join(getHomeDir.getHomeDir(), ".aws", "config");
  var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
  var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path2.join(getHomeDir.getHomeDir(), ".aws", "credentials");
  var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
  var profileNameBlockList = ["__proto__", "profile __proto__"];
  var parseIni = (iniData) => {
    const map = {};
    let currentSection;
    let currentSubSection;
    for (const iniLine of iniData.split(/\r?\n/)) {
      const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
      const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
      if (isSection) {
        currentSection = undefined;
        currentSubSection = undefined;
        const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
        const matches = prefixKeyRegex.exec(sectionName);
        if (matches) {
          const [, prefix, , name] = matches;
          if (Object.values(types4.IniSectionType).includes(prefix)) {
            currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
          }
        } else {
          currentSection = sectionName;
        }
        if (profileNameBlockList.includes(sectionName)) {
          throw new Error(`Found invalid profile name "${sectionName}"`);
        }
      } else if (currentSection) {
        const indexOfEqualsSign = trimmedLine.indexOf("=");
        if (![0, -1].includes(indexOfEqualsSign)) {
          const [name, value] = [
            trimmedLine.substring(0, indexOfEqualsSign).trim(),
            trimmedLine.substring(indexOfEqualsSign + 1).trim()
          ];
          if (value === "") {
            currentSubSection = name;
          } else {
            if (currentSubSection && iniLine.trimStart() === iniLine) {
              currentSubSection = undefined;
            }
            map[currentSection] = map[currentSection] || {};
            const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
            map[currentSection][key] = value;
          }
        }
      }
    }
    return map;
  };
  var swallowError$1 = () => ({});
  var loadSharedConfigFiles = async (init4 = {}) => {
    const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init4;
    const homeDir = getHomeDir.getHomeDir();
    const relativeHomeDirPrefix = "~/";
    let resolvedFilepath = filepath;
    if (filepath.startsWith(relativeHomeDirPrefix)) {
      resolvedFilepath = path2.join(homeDir, filepath.slice(2));
    }
    let resolvedConfigFilepath = configFilepath;
    if (configFilepath.startsWith(relativeHomeDirPrefix)) {
      resolvedConfigFilepath = path2.join(homeDir, configFilepath.slice(2));
    }
    const parsedFiles = await Promise.all([
      readFile2.readFile(resolvedConfigFilepath, {
        ignoreCache: init4.ignoreCache
      }).then(parseIni).then(getConfigData).catch(swallowError$1),
      readFile2.readFile(resolvedFilepath, {
        ignoreCache: init4.ignoreCache
      }).then(parseIni).catch(swallowError$1)
    ]);
    return {
      configFile: parsedFiles[0],
      credentialsFile: parsedFiles[1]
    };
  };
  var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(types4.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
  var swallowError = () => ({});
  var loadSsoSessionData = async (init4 = {}) => readFile2.readFile(init4.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
  var mergeConfigFiles = (...files) => {
    const merged = {};
    for (const file of files) {
      for (const [key, values] of Object.entries(file)) {
        if (merged[key] !== undefined) {
          Object.assign(merged[key], values);
        } else {
          merged[key] = values;
        }
      }
    }
    return merged;
  };
  var parseKnownFiles = async (init4) => {
    const parsedFiles = await loadSharedConfigFiles(init4);
    return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
  };
  var externalDataInterceptor = {
    getFileRecord() {
      return readFile2.fileIntercept;
    },
    interceptFile(path3, contents) {
      readFile2.fileIntercept[path3] = Promise.resolve(contents);
    },
    getTokenRecord() {
      return getSSOTokenFromFile.tokenIntercept;
    },
    interceptToken(id, contents) {
      getSSOTokenFromFile.tokenIntercept[id] = contents;
    }
  };
  exports.getSSOTokenFromFile = getSSOTokenFromFile.getSSOTokenFromFile;
  exports.readFile = readFile2.readFile;
  exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR;
  exports.DEFAULT_PROFILE = DEFAULT_PROFILE;
  exports.ENV_PROFILE = ENV_PROFILE;
  exports.externalDataInterceptor = externalDataInterceptor;
  exports.getProfileName = getProfileName;
  exports.loadSharedConfigFiles = loadSharedConfigFiles;
  exports.loadSsoSessionData = loadSsoSessionData;
  exports.parseKnownFiles = parseKnownFiles;
  Object.prototype.hasOwnProperty.call(getHomeDir, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: getHomeDir["__proto__"]
  });
  Object.keys(getHomeDir).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = getHomeDir[k2];
  });
  Object.prototype.hasOwnProperty.call(getSSOTokenFilepath, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: getSSOTokenFilepath["__proto__"]
  });
  Object.keys(getSSOTokenFilepath).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = getSSOTokenFilepath[k2];
  });
});

// ../../node_modules/.pnpm/@smithy+protocol-http@5.3.13/node_modules/@smithy/protocol-http/dist-cjs/index.js
var require_dist_cjs28 = __commonJS((exports) => {
  var types4 = require_dist_cjs();
  var getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
    return {
      setHttpHandler(handler) {
        runtimeConfig.httpHandler = handler;
      },
      httpHandler() {
        return runtimeConfig.httpHandler;
      },
      updateHttpClientConfig(key, value) {
        runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
      },
      httpHandlerConfigs() {
        return runtimeConfig.httpHandler.httpHandlerConfigs();
      }
    };
  };
  var resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
    return {
      httpHandler: httpHandlerExtensionConfiguration.httpHandler()
    };
  };

  class Field {
    name;
    kind;
    values;
    constructor({ name, kind = types4.FieldPosition.HEADER, values = [] }) {
      this.name = name;
      this.kind = kind;
      this.values = values;
    }
    add(value) {
      this.values.push(value);
    }
    set(values) {
      this.values = values;
    }
    remove(value) {
      this.values = this.values.filter((v2) => v2 !== value);
    }
    toString() {
      return this.values.map((v2) => v2.includes(",") || v2.includes(" ") ? `"${v2}"` : v2).join(", ");
    }
    get() {
      return this.values;
    }
  }

  class Fields {
    entries = {};
    encoding;
    constructor({ fields = [], encoding = "utf-8" }) {
      fields.forEach(this.setField.bind(this));
      this.encoding = encoding;
    }
    setField(field) {
      this.entries[field.name.toLowerCase()] = field;
    }
    getField(name) {
      return this.entries[name.toLowerCase()];
    }
    removeField(name) {
      delete this.entries[name.toLowerCase()];
    }
    getByType(kind) {
      return Object.values(this.entries).filter((field) => field.kind === kind);
    }
  }

  class HttpRequest {
    method;
    protocol;
    hostname;
    port;
    path;
    query;
    headers;
    username;
    password;
    fragment;
    body;
    constructor(options) {
      this.method = options.method || "GET";
      this.hostname = options.hostname || "localhost";
      this.port = options.port;
      this.query = options.query || {};
      this.headers = options.headers || {};
      this.body = options.body;
      this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
      this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
      this.username = options.username;
      this.password = options.password;
      this.fragment = options.fragment;
    }
    static clone(request2) {
      const cloned = new HttpRequest({
        ...request2,
        headers: { ...request2.headers }
      });
      if (cloned.query) {
        cloned.query = cloneQuery(cloned.query);
      }
      return cloned;
    }
    static isInstance(request2) {
      if (!request2) {
        return false;
      }
      const req = request2;
      return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
    }
    clone() {
      return HttpRequest.clone(this);
    }
  }
  function cloneQuery(query) {
    return Object.keys(query).reduce((carry, paramName) => {
      const param = query[paramName];
      return {
        ...carry,
        [paramName]: Array.isArray(param) ? [...param] : param
      };
    }, {});
  }

  class HttpResponse {
    statusCode;
    reason;
    headers;
    body;
    constructor(options) {
      this.statusCode = options.statusCode;
      this.reason = options.reason;
      this.headers = options.headers || {};
      this.body = options.body;
    }
    static isInstance(response) {
      if (!response)
        return false;
      const resp = response;
      return typeof resp.statusCode === "number" && typeof resp.headers === "object";
    }
  }
  function isValidHostname(hostname2) {
    const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
    return hostPattern.test(hostname2);
  }
  exports.Field = Field;
  exports.Fields = Fields;
  exports.HttpRequest = HttpRequest;
  exports.HttpResponse = HttpResponse;
  exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;
  exports.isValidHostname = isValidHostname;
  exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+middleware-host-header@3.972.9/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js
var require_dist_cjs29 = __commonJS((exports) => {
  var protocolHttp = require_dist_cjs28();
  function resolveHostHeaderConfig(input) {
    return input;
  }
  var hostHeaderMiddleware = (options) => (next) => async (args) => {
    if (!protocolHttp.HttpRequest.isInstance(args.request))
      return next(args);
    const { request: request2 } = args;
    const { handlerProtocol = "" } = options.requestHandler.metadata || {};
    if (handlerProtocol.indexOf("h2") >= 0 && !request2.headers[":authority"]) {
      delete request2.headers["host"];
      request2.headers[":authority"] = request2.hostname + (request2.port ? ":" + request2.port : "");
    } else if (!request2.headers["host"]) {
      let host = request2.hostname;
      if (request2.port != null)
        host += `:${request2.port}`;
      request2.headers["host"] = host;
    }
    return next(args);
  };
  var hostHeaderMiddlewareOptions = {
    name: "hostHeaderMiddleware",
    step: "build",
    priority: "low",
    tags: ["HOST"],
    override: true
  };
  var getHostHeaderPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
    }
  });
  exports.getHostHeaderPlugin = getHostHeaderPlugin;
  exports.hostHeaderMiddleware = hostHeaderMiddleware;
  exports.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions;
  exports.resolveHostHeaderConfig = resolveHostHeaderConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+middleware-logger@3.972.9/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js
var require_dist_cjs30 = __commonJS((exports) => {
  var loggerMiddleware = () => (next, context10) => async (args) => {
    try {
      const response = await next(args);
      const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context10;
      const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
      const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context10.inputFilterSensitiveLog;
      const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context10.outputFilterSensitiveLog;
      const { $metadata, ...outputWithoutMetadata } = response.output;
      logger?.info?.({
        clientName,
        commandName,
        input: inputFilterSensitiveLog(args.input),
        output: outputFilterSensitiveLog(outputWithoutMetadata),
        metadata: $metadata
      });
      return response;
    } catch (error2) {
      const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context10;
      const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
      const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context10.inputFilterSensitiveLog;
      logger?.error?.({
        clientName,
        commandName,
        input: inputFilterSensitiveLog(args.input),
        error: error2,
        metadata: error2.$metadata
      });
      throw error2;
    }
  };
  var loggerMiddlewareOptions = {
    name: "loggerMiddleware",
    tags: ["LOGGER"],
    step: "initialize",
    override: true
  };
  var getLoggerPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
    }
  });
  exports.getLoggerPlugin = getLoggerPlugin;
  exports.loggerMiddleware = loggerMiddleware;
  exports.loggerMiddlewareOptions = loggerMiddlewareOptions;
});

// ../../node_modules/.pnpm/@aws-sdk+middleware-recursion-detection@3.972.10/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js
var require_recursionDetectionMiddleware = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.recursionDetectionMiddleware = undefined;
  var lambda_invoke_store_1 = require_invoke_store();
  var protocol_http_1 = require_dist_cjs28();
  var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
  var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
  var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
  var recursionDetectionMiddleware = () => (next) => async (args) => {
    const { request: request2 } = args;
    if (!protocol_http_1.HttpRequest.isInstance(request2)) {
      return next(args);
    }
    const traceIdHeader = Object.keys(request2.headers ?? {}).find((h2) => h2.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;
    if (request2.headers.hasOwnProperty(traceIdHeader)) {
      return next(args);
    }
    const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
    const traceIdFromEnv = process.env[ENV_TRACE_ID];
    const invokeStore = await lambda_invoke_store_1.InvokeStore.getInstanceAsync();
    const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
    const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
    const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
    if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
      request2.headers[TRACE_ID_HEADER_NAME] = traceId;
    }
    return next({
      ...args,
      request: request2
    });
  };
  exports.recursionDetectionMiddleware = recursionDetectionMiddleware;
});

// ../../node_modules/.pnpm/@aws-sdk+middleware-recursion-detection@3.972.10/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js
var require_dist_cjs31 = __commonJS((exports) => {
  var recursionDetectionMiddleware = require_recursionDetectionMiddleware();
  var recursionDetectionMiddlewareOptions = {
    step: "build",
    tags: ["RECURSION_DETECTION"],
    name: "recursionDetectionMiddleware",
    override: true,
    priority: "low"
  };
  var getRecursionDetectionPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);
    }
  });
  exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin;
  Object.prototype.hasOwnProperty.call(recursionDetectionMiddleware, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: recursionDetectionMiddleware["__proto__"]
  });
  Object.keys(recursionDetectionMiddleware).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = recursionDetectionMiddleware[k2];
  });
});

// ../../node_modules/.pnpm/@smithy+util-endpoints@3.3.4/node_modules/@smithy/util-endpoints/dist-cjs/index.js
var require_dist_cjs32 = __commonJS((exports) => {
  var types4 = require_dist_cjs();

  class EndpointCache {
    capacity;
    data = new Map;
    parameters = [];
    constructor({ size, params }) {
      this.capacity = size ?? 50;
      if (params) {
        this.parameters = params;
      }
    }
    get(endpointParams, resolver) {
      const key = this.hash(endpointParams);
      if (key === false) {
        return resolver();
      }
      if (!this.data.has(key)) {
        if (this.data.size > this.capacity + 10) {
          const keys = this.data.keys();
          let i = 0;
          while (true) {
            const { value, done } = keys.next();
            this.data.delete(value);
            if (done || ++i > 10) {
              break;
            }
          }
        }
        this.data.set(key, resolver());
      }
      return this.data.get(key);
    }
    size() {
      return this.data.size;
    }
    hash(endpointParams) {
      let buffer = "";
      const { parameters } = this;
      if (parameters.length === 0) {
        return false;
      }
      for (const param of parameters) {
        const val = String(endpointParams[param] ?? "");
        if (val.includes("|;")) {
          return false;
        }
        buffer += val + "|;";
      }
      return buffer;
    }
  }
  var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
  var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]");
  var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
  var isValidHostLabel = (value, allowSubDomains = false) => {
    if (!allowSubDomains) {
      return VALID_HOST_LABEL_REGEX.test(value);
    }
    const labels = value.split(".");
    for (const label of labels) {
      if (!isValidHostLabel(label)) {
        return false;
      }
    }
    return true;
  };
  var customEndpointFunctions = {};
  var debugId = "endpoints";
  function toDebugString(input) {
    if (typeof input !== "object" || input == null) {
      return input;
    }
    if ("ref" in input) {
      return `$${toDebugString(input.ref)}`;
    }
    if ("fn" in input) {
      return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`;
    }
    return JSON.stringify(input, null, 2);
  }

  class EndpointError extends Error {
    constructor(message) {
      super(message);
      this.name = "EndpointError";
    }
  }
  var booleanEquals = (value1, value2) => value1 === value2;
  var getAttrPathList = (path2) => {
    const parts = path2.split(".");
    const pathList = [];
    for (const part of parts) {
      const squareBracketIndex = part.indexOf("[");
      if (squareBracketIndex !== -1) {
        if (part.indexOf("]") !== part.length - 1) {
          throw new EndpointError(`Path: '${path2}' does not end with ']'`);
        }
        const arrayIndex = part.slice(squareBracketIndex + 1, -1);
        if (Number.isNaN(parseInt(arrayIndex))) {
          throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path2}'`);
        }
        if (squareBracketIndex !== 0) {
          pathList.push(part.slice(0, squareBracketIndex));
        }
        pathList.push(arrayIndex);
      } else {
        pathList.push(part);
      }
    }
    return pathList;
  };
  var getAttr = (value, path2) => getAttrPathList(path2).reduce((acc, index2) => {
    if (typeof acc !== "object") {
      throw new EndpointError(`Index '${index2}' in '${path2}' not found in '${JSON.stringify(value)}'`);
    } else if (Array.isArray(acc)) {
      return acc[parseInt(index2)];
    }
    return acc[index2];
  }, value);
  var isSet = (value) => value != null;
  var not2 = (value) => !value;
  var DEFAULT_PORTS = {
    [types4.EndpointURLScheme.HTTP]: 80,
    [types4.EndpointURLScheme.HTTPS]: 443
  };
  var parseURL = (value) => {
    const whatwgURL = (() => {
      try {
        if (value instanceof URL) {
          return value;
        }
        if (typeof value === "object" && "hostname" in value) {
          const { hostname: hostname3, port, protocol: protocol2 = "", path: path2 = "", query = {} } = value;
          const url = new URL(`${protocol2}//${hostname3}${port ? `:${port}` : ""}${path2}`);
          url.search = Object.entries(query).map(([k2, v2]) => `${k2}=${v2}`).join("&");
          return url;
        }
        return new URL(value);
      } catch (error2) {
        return null;
      }
    })();
    if (!whatwgURL) {
      console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);
      return null;
    }
    const urlString = whatwgURL.href;
    const { host, hostname: hostname2, pathname, protocol, search } = whatwgURL;
    if (search) {
      return null;
    }
    const scheme = protocol.slice(0, -1);
    if (!Object.values(types4.EndpointURLScheme).includes(scheme)) {
      return null;
    }
    const isIp = isIpAddress(hostname2);
    const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);
    const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;
    return {
      scheme,
      authority,
      path: pathname,
      normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
      isIp
    };
  };
  var stringEquals = (value1, value2) => value1 === value2;
  var substring = (input, start, stop, reverse) => {
    if (start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
      return null;
    }
    if (!reverse) {
      return input.substring(start, stop);
    }
    return input.substring(input.length - stop, input.length - start);
  };
  var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
  var endpointFunctions = {
    booleanEquals,
    getAttr,
    isSet,
    isValidHostLabel,
    not: not2,
    parseURL,
    stringEquals,
    substring,
    uriEncode
  };
  var evaluateTemplate = (template2, options) => {
    const evaluatedTemplateArr = [];
    const templateContext = {
      ...options.endpointParams,
      ...options.referenceRecord
    };
    let currentIndex = 0;
    while (currentIndex < template2.length) {
      const openingBraceIndex = template2.indexOf("{", currentIndex);
      if (openingBraceIndex === -1) {
        evaluatedTemplateArr.push(template2.slice(currentIndex));
        break;
      }
      evaluatedTemplateArr.push(template2.slice(currentIndex, openingBraceIndex));
      const closingBraceIndex = template2.indexOf("}", openingBraceIndex);
      if (closingBraceIndex === -1) {
        evaluatedTemplateArr.push(template2.slice(openingBraceIndex));
        break;
      }
      if (template2[openingBraceIndex + 1] === "{" && template2[closingBraceIndex + 1] === "}") {
        evaluatedTemplateArr.push(template2.slice(openingBraceIndex + 1, closingBraceIndex));
        currentIndex = closingBraceIndex + 2;
      }
      const parameterName = template2.substring(openingBraceIndex + 1, closingBraceIndex);
      if (parameterName.includes("#")) {
        const [refName, attrName] = parameterName.split("#");
        evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));
      } else {
        evaluatedTemplateArr.push(templateContext[parameterName]);
      }
      currentIndex = closingBraceIndex + 1;
    }
    return evaluatedTemplateArr.join("");
  };
  var getReferenceValue = ({ ref }, options) => {
    const referenceRecord = {
      ...options.endpointParams,
      ...options.referenceRecord
    };
    return referenceRecord[ref];
  };
  var evaluateExpression = (obj, keyName, options) => {
    if (typeof obj === "string") {
      return evaluateTemplate(obj, options);
    } else if (obj["fn"]) {
      return group$2.callFunction(obj, options);
    } else if (obj["ref"]) {
      return getReferenceValue(obj, options);
    }
    throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
  };
  var callFunction = ({ fn, argv }, options) => {
    const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options));
    const fnSegments = fn.split(".");
    if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {
      return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
    }
    return endpointFunctions[fn](...evaluatedArgs);
  };
  var group$2 = {
    evaluateExpression,
    callFunction
  };
  var evaluateCondition = ({ assign, ...fnArgs }, options) => {
    if (assign && assign in options.referenceRecord) {
      throw new EndpointError(`'${assign}' is already defined in Reference Record.`);
    }
    const value = callFunction(fnArgs, options);
    options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);
    return {
      result: value === "" ? true : !!value,
      ...assign != null && { toAssign: { name: assign, value } }
    };
  };
  var evaluateConditions = (conditions = [], options) => {
    const conditionsReferenceRecord = {};
    for (const condition of conditions) {
      const { result, toAssign } = evaluateCondition(condition, {
        ...options,
        referenceRecord: {
          ...options.referenceRecord,
          ...conditionsReferenceRecord
        }
      });
      if (!result) {
        return { result };
      }
      if (toAssign) {
        conditionsReferenceRecord[toAssign.name] = toAssign.value;
        options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
      }
    }
    return { result: true, referenceRecord: conditionsReferenceRecord };
  };
  var getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({
    ...acc,
    [headerKey]: headerVal.map((headerValEntry) => {
      const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
      if (typeof processedExpr !== "string") {
        throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);
      }
      return processedExpr;
    })
  }), {});
  var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({
    ...acc,
    [propertyKey]: group$1.getEndpointProperty(propertyVal, options)
  }), {});
  var getEndpointProperty = (property, options) => {
    if (Array.isArray(property)) {
      return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
    }
    switch (typeof property) {
      case "string":
        return evaluateTemplate(property, options);
      case "object":
        if (property === null) {
          throw new EndpointError(`Unexpected endpoint property: ${property}`);
        }
        return group$1.getEndpointProperties(property, options);
      case "boolean":
        return property;
      default:
        throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);
    }
  };
  var group$1 = {
    getEndpointProperty,
    getEndpointProperties
  };
  var getEndpointUrl = (endpointUrl, options) => {
    const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
    if (typeof expression === "string") {
      try {
        return new URL(expression);
      } catch (error2) {
        console.error(`Failed to construct URL with ${expression}`, error2);
        throw error2;
      }
    }
    throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);
  };
  var evaluateEndpointRule = (endpointRule, options) => {
    const { conditions, endpoint } = endpointRule;
    const { result, referenceRecord } = evaluateConditions(conditions, options);
    if (!result) {
      return;
    }
    const endpointRuleOptions = {
      ...options,
      referenceRecord: { ...options.referenceRecord, ...referenceRecord }
    };
    const { url, properties, headers } = endpoint;
    options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);
    return {
      ...headers != null && {
        headers: getEndpointHeaders(headers, endpointRuleOptions)
      },
      ...properties != null && {
        properties: getEndpointProperties(properties, endpointRuleOptions)
      },
      url: getEndpointUrl(url, endpointRuleOptions)
    };
  };
  var evaluateErrorRule = (errorRule, options) => {
    const { conditions, error: error2 } = errorRule;
    const { result, referenceRecord } = evaluateConditions(conditions, options);
    if (!result) {
      return;
    }
    throw new EndpointError(evaluateExpression(error2, "Error", {
      ...options,
      referenceRecord: { ...options.referenceRecord, ...referenceRecord }
    }));
  };
  var evaluateRules = (rules, options) => {
    for (const rule of rules) {
      if (rule.type === "endpoint") {
        const endpointOrUndefined = evaluateEndpointRule(rule, options);
        if (endpointOrUndefined) {
          return endpointOrUndefined;
        }
      } else if (rule.type === "error") {
        evaluateErrorRule(rule, options);
      } else if (rule.type === "tree") {
        const endpointOrUndefined = group.evaluateTreeRule(rule, options);
        if (endpointOrUndefined) {
          return endpointOrUndefined;
        }
      } else {
        throw new EndpointError(`Unknown endpoint rule: ${rule}`);
      }
    }
    throw new EndpointError(`Rules evaluation failed`);
  };
  var evaluateTreeRule = (treeRule, options) => {
    const { conditions, rules } = treeRule;
    const { result, referenceRecord } = evaluateConditions(conditions, options);
    if (!result) {
      return;
    }
    return group.evaluateRules(rules, {
      ...options,
      referenceRecord: { ...options.referenceRecord, ...referenceRecord }
    });
  };
  var group = {
    evaluateRules,
    evaluateTreeRule
  };
  var resolveEndpoint = (ruleSetObject, options) => {
    const { endpointParams, logger } = options;
    const { parameters, rules } = ruleSetObject;
    options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
    const paramsWithDefault = Object.entries(parameters).filter(([, v2]) => v2.default != null).map(([k2, v2]) => [k2, v2.default]);
    if (paramsWithDefault.length > 0) {
      for (const [paramKey, paramDefaultValue] of paramsWithDefault) {
        endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;
      }
    }
    const requiredParams = Object.entries(parameters).filter(([, v2]) => v2.required).map(([k2]) => k2);
    for (const requiredParam of requiredParams) {
      if (endpointParams[requiredParam] == null) {
        throw new EndpointError(`Missing required parameter: '${requiredParam}'`);
      }
    }
    const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });
    options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
    return endpoint;
  };
  exports.EndpointCache = EndpointCache;
  exports.EndpointError = EndpointError;
  exports.customEndpointFunctions = customEndpointFunctions;
  exports.isIpAddress = isIpAddress;
  exports.isValidHostLabel = isValidHostLabel;
  exports.resolveEndpoint = resolveEndpoint;
});

// ../../node_modules/.pnpm/@smithy+querystring-parser@4.2.13/node_modules/@smithy/querystring-parser/dist-cjs/index.js
var require_dist_cjs33 = __commonJS((exports) => {
  function parseQueryString(querystring) {
    const query = {};
    querystring = querystring.replace(/^\?/, "");
    if (querystring) {
      for (const pair of querystring.split("&")) {
        let [key, value = null] = pair.split("=");
        key = decodeURIComponent(key);
        if (value) {
          value = decodeURIComponent(value);
        }
        if (!(key in query)) {
          query[key] = value;
        } else if (Array.isArray(query[key])) {
          query[key].push(value);
        } else {
          query[key] = [query[key], value];
        }
      }
    }
    return query;
  }
  exports.parseQueryString = parseQueryString;
});

// ../../node_modules/.pnpm/@smithy+url-parser@4.2.13/node_modules/@smithy/url-parser/dist-cjs/index.js
var require_dist_cjs34 = __commonJS((exports) => {
  var querystringParser = require_dist_cjs33();
  var parseUrl2 = (url) => {
    if (typeof url === "string") {
      return parseUrl2(new URL(url));
    }
    const { hostname: hostname2, pathname, port, protocol, search } = url;
    let query;
    if (search) {
      query = querystringParser.parseQueryString(search);
    }
    return {
      hostname: hostname2,
      port: port ? parseInt(port) : undefined,
      protocol,
      path: pathname,
      query
    };
  };
  exports.parseUrl = parseUrl2;
});

// ../../node_modules/.pnpm/@aws-sdk+util-endpoints@3.996.6/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js
var require_dist_cjs35 = __commonJS((exports) => {
  var utilEndpoints = require_dist_cjs32();
  var urlParser = require_dist_cjs34();
  var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
    if (allowSubDomains) {
      for (const label of value.split(".")) {
        if (!isVirtualHostableS3Bucket(label)) {
          return false;
        }
      }
      return true;
    }
    if (!utilEndpoints.isValidHostLabel(value)) {
      return false;
    }
    if (value.length < 3 || value.length > 63) {
      return false;
    }
    if (value !== value.toLowerCase()) {
      return false;
    }
    if (utilEndpoints.isIpAddress(value)) {
      return false;
    }
    return true;
  };
  var ARN_DELIMITER = ":";
  var RESOURCE_DELIMITER = "/";
  var parseArn = (value) => {
    const segments = value.split(ARN_DELIMITER);
    if (segments.length < 6)
      return null;
    const [arn, partition2, service, region, accountId, ...resourcePath] = segments;
    if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "")
      return null;
    const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
    return {
      partition: partition2,
      service,
      region,
      accountId,
      resourceId
    };
  };
  var partitions = [
    {
      id: "aws",
      outputs: {
        dnsSuffix: "amazonaws.com",
        dualStackDnsSuffix: "api.aws",
        implicitGlobalRegion: "us-east-1",
        name: "aws",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
      regions: {
        "af-south-1": {
          description: "Africa (Cape Town)"
        },
        "ap-east-1": {
          description: "Asia Pacific (Hong Kong)"
        },
        "ap-east-2": {
          description: "Asia Pacific (Taipei)"
        },
        "ap-northeast-1": {
          description: "Asia Pacific (Tokyo)"
        },
        "ap-northeast-2": {
          description: "Asia Pacific (Seoul)"
        },
        "ap-northeast-3": {
          description: "Asia Pacific (Osaka)"
        },
        "ap-south-1": {
          description: "Asia Pacific (Mumbai)"
        },
        "ap-south-2": {
          description: "Asia Pacific (Hyderabad)"
        },
        "ap-southeast-1": {
          description: "Asia Pacific (Singapore)"
        },
        "ap-southeast-2": {
          description: "Asia Pacific (Sydney)"
        },
        "ap-southeast-3": {
          description: "Asia Pacific (Jakarta)"
        },
        "ap-southeast-4": {
          description: "Asia Pacific (Melbourne)"
        },
        "ap-southeast-5": {
          description: "Asia Pacific (Malaysia)"
        },
        "ap-southeast-6": {
          description: "Asia Pacific (New Zealand)"
        },
        "ap-southeast-7": {
          description: "Asia Pacific (Thailand)"
        },
        "aws-global": {
          description: "aws global region"
        },
        "ca-central-1": {
          description: "Canada (Central)"
        },
        "ca-west-1": {
          description: "Canada West (Calgary)"
        },
        "eu-central-1": {
          description: "Europe (Frankfurt)"
        },
        "eu-central-2": {
          description: "Europe (Zurich)"
        },
        "eu-north-1": {
          description: "Europe (Stockholm)"
        },
        "eu-south-1": {
          description: "Europe (Milan)"
        },
        "eu-south-2": {
          description: "Europe (Spain)"
        },
        "eu-west-1": {
          description: "Europe (Ireland)"
        },
        "eu-west-2": {
          description: "Europe (London)"
        },
        "eu-west-3": {
          description: "Europe (Paris)"
        },
        "il-central-1": {
          description: "Israel (Tel Aviv)"
        },
        "me-central-1": {
          description: "Middle East (UAE)"
        },
        "me-south-1": {
          description: "Middle East (Bahrain)"
        },
        "mx-central-1": {
          description: "Mexico (Central)"
        },
        "sa-east-1": {
          description: "South America (Sao Paulo)"
        },
        "us-east-1": {
          description: "US East (N. Virginia)"
        },
        "us-east-2": {
          description: "US East (Ohio)"
        },
        "us-west-1": {
          description: "US West (N. California)"
        },
        "us-west-2": {
          description: "US West (Oregon)"
        }
      }
    },
    {
      id: "aws-cn",
      outputs: {
        dnsSuffix: "amazonaws.com.cn",
        dualStackDnsSuffix: "api.amazonwebservices.com.cn",
        implicitGlobalRegion: "cn-northwest-1",
        name: "aws-cn",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^cn\\-\\w+\\-\\d+$",
      regions: {
        "aws-cn-global": {
          description: "aws-cn global region"
        },
        "cn-north-1": {
          description: "China (Beijing)"
        },
        "cn-northwest-1": {
          description: "China (Ningxia)"
        }
      }
    },
    {
      id: "aws-eusc",
      outputs: {
        dnsSuffix: "amazonaws.eu",
        dualStackDnsSuffix: "api.amazonwebservices.eu",
        implicitGlobalRegion: "eusc-de-east-1",
        name: "aws-eusc",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
      regions: {
        "eusc-de-east-1": {
          description: "AWS European Sovereign Cloud (Germany)"
        }
      }
    },
    {
      id: "aws-iso",
      outputs: {
        dnsSuffix: "c2s.ic.gov",
        dualStackDnsSuffix: "api.aws.ic.gov",
        implicitGlobalRegion: "us-iso-east-1",
        name: "aws-iso",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
      regions: {
        "aws-iso-global": {
          description: "aws-iso global region"
        },
        "us-iso-east-1": {
          description: "US ISO East"
        },
        "us-iso-west-1": {
          description: "US ISO WEST"
        }
      }
    },
    {
      id: "aws-iso-b",
      outputs: {
        dnsSuffix: "sc2s.sgov.gov",
        dualStackDnsSuffix: "api.aws.scloud",
        implicitGlobalRegion: "us-isob-east-1",
        name: "aws-iso-b",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
      regions: {
        "aws-iso-b-global": {
          description: "aws-iso-b global region"
        },
        "us-isob-east-1": {
          description: "US ISOB East (Ohio)"
        },
        "us-isob-west-1": {
          description: "US ISOB West"
        }
      }
    },
    {
      id: "aws-iso-e",
      outputs: {
        dnsSuffix: "cloud.adc-e.uk",
        dualStackDnsSuffix: "api.cloud-aws.adc-e.uk",
        implicitGlobalRegion: "eu-isoe-west-1",
        name: "aws-iso-e",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
      regions: {
        "aws-iso-e-global": {
          description: "aws-iso-e global region"
        },
        "eu-isoe-west-1": {
          description: "EU ISOE West"
        }
      }
    },
    {
      id: "aws-iso-f",
      outputs: {
        dnsSuffix: "csp.hci.ic.gov",
        dualStackDnsSuffix: "api.aws.hci.ic.gov",
        implicitGlobalRegion: "us-isof-south-1",
        name: "aws-iso-f",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
      regions: {
        "aws-iso-f-global": {
          description: "aws-iso-f global region"
        },
        "us-isof-east-1": {
          description: "US ISOF EAST"
        },
        "us-isof-south-1": {
          description: "US ISOF SOUTH"
        }
      }
    },
    {
      id: "aws-us-gov",
      outputs: {
        dnsSuffix: "amazonaws.com",
        dualStackDnsSuffix: "api.aws",
        implicitGlobalRegion: "us-gov-west-1",
        name: "aws-us-gov",
        supportsDualStack: true,
        supportsFIPS: true
      },
      regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
      regions: {
        "aws-us-gov-global": {
          description: "aws-us-gov global region"
        },
        "us-gov-east-1": {
          description: "AWS GovCloud (US-East)"
        },
        "us-gov-west-1": {
          description: "AWS GovCloud (US-West)"
        }
      }
    }
  ];
  var version3 = "1.1";
  var partitionsInfo = {
    partitions,
    version: version3
  };
  var selectedPartitionsInfo = partitionsInfo;
  var selectedUserAgentPrefix = "";
  var partition = (value) => {
    const { partitions: partitions2 } = selectedPartitionsInfo;
    for (const partition2 of partitions2) {
      const { regions, outputs } = partition2;
      for (const [region, regionData] of Object.entries(regions)) {
        if (region === value) {
          return {
            ...outputs,
            ...regionData
          };
        }
      }
    }
    for (const partition2 of partitions2) {
      const { regionRegex, outputs } = partition2;
      if (new RegExp(regionRegex).test(value)) {
        return {
          ...outputs
        };
      }
    }
    const DEFAULT_PARTITION = partitions2.find((partition2) => partition2.id === "aws");
    if (!DEFAULT_PARTITION) {
      throw new Error("Provided region was not found in the partition array or regex," + " and default partition with id 'aws' doesn't exist.");
    }
    return {
      ...DEFAULT_PARTITION.outputs
    };
  };
  var setPartitionInfo = (partitionsInfo2, userAgentPrefix = "") => {
    selectedPartitionsInfo = partitionsInfo2;
    selectedUserAgentPrefix = userAgentPrefix;
  };
  var useDefaultPartitionInfo = () => {
    setPartitionInfo(partitionsInfo, "");
  };
  var getUserAgentPrefix = () => selectedUserAgentPrefix;
  var awsEndpointFunctions = {
    isVirtualHostableS3Bucket,
    parseArn,
    partition
  };
  utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions;
  var resolveDefaultAwsRegionalEndpointsConfig = (input) => {
    if (typeof input.endpointProvider !== "function") {
      throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");
    }
    const { endpoint } = input;
    if (endpoint === undefined) {
      input.endpoint = async () => {
        return toEndpointV1(input.endpointProvider({
          Region: typeof input.region === "function" ? await input.region() : input.region,
          UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint,
          UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint,
          Endpoint: undefined
        }, { logger: input.logger }));
      };
    }
    return input;
  };
  var toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url);
  exports.EndpointError = utilEndpoints.EndpointError;
  exports.isIpAddress = utilEndpoints.isIpAddress;
  exports.resolveEndpoint = utilEndpoints.resolveEndpoint;
  exports.awsEndpointFunctions = awsEndpointFunctions;
  exports.getUserAgentPrefix = getUserAgentPrefix;
  exports.partition = partition;
  exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig;
  exports.setPartitionInfo = setPartitionInfo;
  exports.toEndpointV1 = toEndpointV1;
  exports.useDefaultPartitionInfo = useDefaultPartitionInfo;
});

// ../../node_modules/.pnpm/@smithy+service-error-classification@4.2.13/node_modules/@smithy/service-error-classification/dist-cjs/index.js
var require_dist_cjs36 = __commonJS((exports) => {
  var CLOCK_SKEW_ERROR_CODES = [
    "AuthFailure",
    "InvalidSignatureException",
    "RequestExpired",
    "RequestInTheFuture",
    "RequestTimeTooSkewed",
    "SignatureDoesNotMatch"
  ];
  var THROTTLING_ERROR_CODES = [
    "BandwidthLimitExceeded",
    "EC2ThrottledException",
    "LimitExceededException",
    "PriorRequestNotComplete",
    "ProvisionedThroughputExceededException",
    "RequestLimitExceeded",
    "RequestThrottled",
    "RequestThrottledException",
    "SlowDown",
    "ThrottledException",
    "Throttling",
    "ThrottlingException",
    "TooManyRequestsException",
    "TransactionInProgressException"
  ];
  var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
  var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
  var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
  var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"];
  var isRetryableByTrait = (error2) => error2?.$retryable !== undefined;
  var isClockSkewError = (error2) => CLOCK_SKEW_ERROR_CODES.includes(error2.name);
  var isClockSkewCorrectedError = (error2) => error2.$metadata?.clockSkewCorrected;
  var isBrowserNetworkError = (error2) => {
    const errorMessages = new Set([
      "Failed to fetch",
      "NetworkError when attempting to fetch resource",
      "The Internet connection appears to be offline",
      "Load failed",
      "Network request failed"
    ]);
    const isValid = error2 && error2 instanceof TypeError;
    if (!isValid) {
      return false;
    }
    return errorMessages.has(error2.message);
  };
  var isThrottlingError = (error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true;
  var isTransientError = (error2, depth = 0) => isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || error2.cause !== undefined && depth <= 10 && isTransientError(error2.cause, depth + 1);
  var isServerError = (error2) => {
    if (error2.$metadata?.httpStatusCode !== undefined) {
      const statusCode = error2.$metadata.httpStatusCode;
      if (500 <= statusCode && statusCode <= 599 && !isTransientError(error2)) {
        return true;
      }
      return false;
    }
    return false;
  };
  exports.isBrowserNetworkError = isBrowserNetworkError;
  exports.isClockSkewCorrectedError = isClockSkewCorrectedError;
  exports.isClockSkewError = isClockSkewError;
  exports.isRetryableByTrait = isRetryableByTrait;
  exports.isServerError = isServerError;
  exports.isThrottlingError = isThrottlingError;
  exports.isTransientError = isTransientError;
});

// ../../node_modules/.pnpm/@smithy+util-retry@4.3.1/node_modules/@smithy/util-retry/dist-cjs/index.js
var require_dist_cjs37 = __commonJS((exports) => {
  var serviceErrorClassification = require_dist_cjs36();
  exports.RETRY_MODES = undefined;
  (function(RETRY_MODES) {
    RETRY_MODES["STANDARD"] = "standard";
    RETRY_MODES["ADAPTIVE"] = "adaptive";
  })(exports.RETRY_MODES || (exports.RETRY_MODES = {}));
  var DEFAULT_MAX_ATTEMPTS = 3;
  var DEFAULT_RETRY_MODE = exports.RETRY_MODES.STANDARD;

  class DefaultRateLimiter {
    static setTimeoutFn = setTimeout;
    beta;
    minCapacity;
    minFillRate;
    scaleConstant;
    smooth;
    enabled = false;
    availableTokens = 0;
    lastMaxRate = 0;
    measuredTxRate = 0;
    requestCount = 0;
    fillRate;
    lastThrottleTime;
    lastTimestamp = 0;
    lastTxRateBucket;
    maxCapacity;
    timeWindow = 0;
    constructor(options) {
      this.beta = options?.beta ?? 0.7;
      this.minCapacity = options?.minCapacity ?? 1;
      this.minFillRate = options?.minFillRate ?? 0.5;
      this.scaleConstant = options?.scaleConstant ?? 0.4;
      this.smooth = options?.smooth ?? 0.8;
      this.lastThrottleTime = this.getCurrentTimeInSeconds();
      this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
      this.fillRate = this.minFillRate;
      this.maxCapacity = this.minCapacity;
    }
    async getSendToken() {
      return this.acquireTokenBucket(1);
    }
    updateClientSendingRate(response) {
      let calculatedRate;
      this.updateMeasuredRate();
      const retryErrorInfo = response;
      const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || serviceErrorClassification.isThrottlingError(retryErrorInfo?.error ?? response);
      if (isThrottling) {
        const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
        this.lastMaxRate = rateToUse;
        this.calculateTimeWindow();
        this.lastThrottleTime = this.getCurrentTimeInSeconds();
        calculatedRate = this.cubicThrottle(rateToUse);
        this.enableTokenBucket();
      } else {
        this.calculateTimeWindow();
        calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
      }
      const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
      this.updateTokenBucketRate(newRate);
    }
    getCurrentTimeInSeconds() {
      return Date.now() / 1000;
    }
    async acquireTokenBucket(amount) {
      if (!this.enabled) {
        return;
      }
      this.refillTokenBucket();
      if (amount > this.availableTokens) {
        const delay = (amount - this.availableTokens) / this.fillRate * 1000;
        await new Promise((resolve3) => DefaultRateLimiter.setTimeoutFn(resolve3, delay));
      }
      this.availableTokens = this.availableTokens - amount;
    }
    refillTokenBucket() {
      const timestamp2 = this.getCurrentTimeInSeconds();
      if (!this.lastTimestamp) {
        this.lastTimestamp = timestamp2;
        return;
      }
      const fillAmount = (timestamp2 - this.lastTimestamp) * this.fillRate;
      this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount);
      this.lastTimestamp = timestamp2;
    }
    calculateTimeWindow() {
      this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));
    }
    cubicThrottle(rateToUse) {
      return this.getPrecise(rateToUse * this.beta);
    }
    cubicSuccess(timestamp2) {
      return this.getPrecise(this.scaleConstant * Math.pow(timestamp2 - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
    }
    enableTokenBucket() {
      this.enabled = true;
    }
    updateTokenBucketRate(newRate) {
      this.refillTokenBucket();
      this.fillRate = Math.max(newRate, this.minFillRate);
      this.maxCapacity = Math.max(newRate, this.minCapacity);
      this.availableTokens = Math.min(this.availableTokens, this.maxCapacity);
    }
    updateMeasuredRate() {
      const t = this.getCurrentTimeInSeconds();
      const timeBucket = Math.floor(t * 2) / 2;
      this.requestCount++;
      if (timeBucket > this.lastTxRateBucket) {
        const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
        this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
        this.requestCount = 0;
        this.lastTxRateBucket = timeBucket;
      }
    }
    getPrecise(num) {
      return parseFloat(num.toFixed(8));
    }
  }
  var DEFAULT_RETRY_DELAY_BASE = 100;
  var MAXIMUM_RETRY_DELAY = 20 * 1000;
  var THROTTLING_RETRY_DELAY_BASE = 500;
  var INITIAL_RETRY_TOKENS = 500;
  var RETRY_COST = 5;
  var TIMEOUT_RETRY_COST = 10;
  var NO_RETRY_INCREMENT = 1;
  var INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
  var REQUEST_HEADER = "amz-sdk-request";

  class Retry {
    static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true";
    static delay() {
      return Retry.v2026 ? 50 : 100;
    }
    static throttlingDelay() {
      return Retry.v2026 ? 1000 : 500;
    }
    static cost() {
      return Retry.v2026 ? 14 : 5;
    }
    static throttlingCost() {
      return Retry.v2026 ? 5 : 10;
    }
    static modifiedCostType() {
      return Retry.v2026 ? "THROTTLING" : "TRANSIENT";
    }
  }

  class DefaultRetryBackoffStrategy {
    x = Retry.delay();
    computeNextBackoffDelay(i) {
      const b2 = Math.random();
      const r = 2;
      const t_i = b2 * Math.min(this.x * r ** i, MAXIMUM_RETRY_DELAY);
      return Math.floor(t_i);
    }
    setDelayBase(delay) {
      this.x = delay;
    }
  }

  class DefaultRetryToken {
    delay;
    count;
    cost;
    longPoll;
    constructor(delay, count2, cost, longPoll) {
      this.delay = delay;
      this.count = count2;
      this.cost = cost;
      this.longPoll = longPoll;
    }
    getRetryCount() {
      return this.count;
    }
    getRetryDelay() {
      return Math.min(MAXIMUM_RETRY_DELAY, this.delay);
    }
    getRetryCost() {
      return this.cost;
    }
    isLongPoll() {
      return this.longPoll;
    }
  }

  class StandardRetryStrategy {
    mode = exports.RETRY_MODES.STANDARD;
    capacity = INITIAL_RETRY_TOKENS;
    retryBackoffStrategy;
    maxAttemptsProvider;
    baseDelay;
    constructor(arg1) {
      if (typeof arg1 === "number") {
        this.maxAttemptsProvider = async () => arg1;
      } else if (typeof arg1 === "function") {
        this.maxAttemptsProvider = arg1;
      } else if (arg1 && typeof arg1 === "object") {
        this.maxAttemptsProvider = async () => arg1.maxAttempts;
        this.baseDelay = arg1.baseDelay;
        this.retryBackoffStrategy = arg1.backoff;
      }
      this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS;
      this.baseDelay ??= Retry.delay();
      this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy;
    }
    async acquireInitialRetryToken(retryTokenScope) {
      return new DefaultRetryToken(Retry.delay(), 0, undefined, Retry.v2026 && retryTokenScope.includes(":longpoll"));
    }
    async refreshRetryTokenForRetry(token, errorInfo) {
      const maxAttempts = await this.getMaxAttempts();
      const shouldRetry = this.shouldRetry(token, errorInfo, maxAttempts);
      if (shouldRetry || token.isLongPoll?.()) {
        const errorType = errorInfo.errorType;
        this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry.throttlingDelay() : this.baseDelay);
        const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
        let retryDelay = delayFromErrorType;
        if (errorInfo.retryAfterHint instanceof Date) {
          retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5000));
        }
        if (!shouldRetry) {
          throw Object.assign(new Error("No retry token available"), { $backoff: Retry.v2026 ? retryDelay : 0 });
        } else {
          const capacityCost = this.getCapacityCost(errorType);
          this.capacity -= capacityCost;
          return new DefaultRetryToken(retryDelay, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);
        }
      }
      throw new Error("No retry token available");
    }
    recordSuccess(token) {
      this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
    }
    getCapacity() {
      return this.capacity;
    }
    async getMaxAttempts() {
      try {
        return await this.maxAttemptsProvider();
      } catch (error2) {
        console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
        return DEFAULT_MAX_ATTEMPTS;
      }
    }
    shouldRetry(tokenToRenew, errorInfo, maxAttempts) {
      const attempts = tokenToRenew.getRetryCount() + 1;
      return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);
    }
    getCapacityCost(errorType) {
      return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost();
    }
    isRetryableError(errorType) {
      return errorType === "THROTTLING" || errorType === "TRANSIENT";
    }
    async maxAttempts() {
      return this.maxAttemptsProvider();
    }
  }

  class AdaptiveRetryStrategy {
    mode = exports.RETRY_MODES.ADAPTIVE;
    rateLimiter;
    standardRetryStrategy;
    constructor(maxAttemptsProvider, options) {
      const { rateLimiter } = options ?? {};
      this.rateLimiter = rateLimiter ?? new DefaultRateLimiter;
      this.standardRetryStrategy = options ? new StandardRetryStrategy({
        maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3,
        ...options
      }) : new StandardRetryStrategy(maxAttemptsProvider);
    }
    async acquireInitialRetryToken(retryTokenScope) {
      await this.rateLimiter.getSendToken();
      return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
    }
    async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
      this.rateLimiter.updateClientSendingRate(errorInfo);
      return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
    }
    recordSuccess(token) {
      this.rateLimiter.updateClientSendingRate({});
      this.standardRetryStrategy.recordSuccess(token);
    }
    async maxAttemptsProvider() {
      return this.standardRetryStrategy.maxAttempts();
    }
  }

  class ConfiguredRetryStrategy extends StandardRetryStrategy {
    computeNextBackoffDelay;
    constructor(maxAttempts, computeNextBackoffDelay = Retry.delay()) {
      super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts);
      if (typeof computeNextBackoffDelay === "number") {
        this.computeNextBackoffDelay = () => computeNextBackoffDelay;
      } else {
        this.computeNextBackoffDelay = computeNextBackoffDelay;
      }
    }
    async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
      const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
      token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());
      return token;
    }
  }
  exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
  exports.ConfiguredRetryStrategy = ConfiguredRetryStrategy;
  exports.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS;
  exports.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE;
  exports.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE;
  exports.DefaultRateLimiter = DefaultRateLimiter;
  exports.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS;
  exports.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER;
  exports.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY;
  exports.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT;
  exports.REQUEST_HEADER = REQUEST_HEADER;
  exports.RETRY_COST = RETRY_COST;
  exports.Retry = Retry;
  exports.StandardRetryStrategy = StandardRetryStrategy;
  exports.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE;
  exports.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST;
});

// ../../node_modules/.pnpm/@aws-sdk+middleware-user-agent@3.972.29/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js
var require_dist_cjs38 = __commonJS((exports) => {
  var core = require_dist_cjs5();
  var utilEndpoints = require_dist_cjs35();
  var protocolHttp = require_dist_cjs28();
  var client = require_client4();
  var utilRetry = require_dist_cjs37();
  var DEFAULT_UA_APP_ID = undefined;
  function isValidUserAgentAppId(appId) {
    if (appId === undefined) {
      return true;
    }
    return typeof appId === "string" && appId.length <= 50;
  }
  function resolveUserAgentConfig(input) {
    const normalizedAppIdProvider = core.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
    const { customUserAgent } = input;
    return Object.assign(input, {
      customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
      userAgentAppId: async () => {
        const appId = await normalizedAppIdProvider();
        if (!isValidUserAgentAppId(appId)) {
          const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
          if (typeof appId !== "string") {
            logger?.warn("userAgentAppId must be a string or undefined.");
          } else if (appId.length > 50) {
            logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
          }
        }
        return appId;
      }
    });
  }
  var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
  async function checkFeatures(context10, config, args) {
    const request2 = args.request;
    if (request2?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
      client.setFeature(context10, "PROTOCOL_RPC_V2_CBOR", "M");
    }
    if (typeof config.retryStrategy === "function") {
      const retryStrategy = await config.retryStrategy();
      if (typeof retryStrategy.mode === "string") {
        switch (retryStrategy.mode) {
          case utilRetry.RETRY_MODES.ADAPTIVE:
            client.setFeature(context10, "RETRY_MODE_ADAPTIVE", "F");
            break;
          case utilRetry.RETRY_MODES.STANDARD:
            client.setFeature(context10, "RETRY_MODE_STANDARD", "E");
            break;
        }
      }
    }
    if (typeof config.accountIdEndpointMode === "function") {
      const endpointV2 = context10.endpointV2;
      if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
        client.setFeature(context10, "ACCOUNT_ID_ENDPOINT", "O");
      }
      switch (await config.accountIdEndpointMode?.()) {
        case "disabled":
          client.setFeature(context10, "ACCOUNT_ID_MODE_DISABLED", "Q");
          break;
        case "preferred":
          client.setFeature(context10, "ACCOUNT_ID_MODE_PREFERRED", "P");
          break;
        case "required":
          client.setFeature(context10, "ACCOUNT_ID_MODE_REQUIRED", "R");
          break;
      }
    }
    const identity = context10.__smithy_context?.selectedHttpAuthScheme?.identity;
    if (identity?.$source) {
      const credentials = identity;
      if (credentials.accountId) {
        client.setFeature(context10, "RESOLVED_ACCOUNT_ID", "T");
      }
      for (const [key, value] of Object.entries(credentials.$source ?? {})) {
        client.setFeature(context10, key, value);
      }
    }
  }
  var USER_AGENT = "user-agent";
  var X_AMZ_USER_AGENT = "x-amz-user-agent";
  var SPACE = " ";
  var UA_NAME_SEPARATOR = "/";
  var UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
  var UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
  var UA_ESCAPE_CHAR = "-";
  var BYTE_LIMIT = 1024;
  function encodeFeatures(features) {
    let buffer = "";
    for (const key in features) {
      const val = features[key];
      if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
        if (buffer.length) {
          buffer += "," + val;
        } else {
          buffer += val;
        }
        continue;
      }
      break;
    }
    return buffer;
  }
  var userAgentMiddleware = (options) => (next, context10) => async (args) => {
    const { request: request2 } = args;
    if (!protocolHttp.HttpRequest.isInstance(request2)) {
      return next(args);
    }
    const { headers } = request2;
    const userAgent = context10?.userAgent?.map(escapeUserAgent) || [];
    const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
    await checkFeatures(context10, options, args);
    const awsContext = context10;
    defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context10.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
    const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
    const appId = await options.userAgentAppId();
    if (appId) {
      defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));
    }
    const prefix = utilEndpoints.getUserAgentPrefix();
    const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
    const normalUAValue = [
      ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
      ...customUserAgent
    ].join(SPACE);
    if (options.runtime !== "browser") {
      if (normalUAValue) {
        headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
      }
      headers[USER_AGENT] = sdkUserAgentValue;
    } else {
      headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
    }
    return next({
      ...args,
      request: request2
    });
  };
  var escapeUserAgent = (userAgentPair) => {
    const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
    const version3 = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
    const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
    const prefix = name.substring(0, prefixSeparatorIndex);
    let uaName = name.substring(prefixSeparatorIndex + 1);
    if (prefix === "api") {
      uaName = uaName.toLowerCase();
    }
    return [prefix, uaName, version3].filter((item) => item && item.length > 0).reduce((acc, item, index2) => {
      switch (index2) {
        case 0:
          return item;
        case 1:
          return `${acc}/${item}`;
        default:
          return `${acc}#${item}`;
      }
    }, "");
  };
  var getUserAgentMiddlewareOptions = {
    name: "getUserAgentMiddleware",
    step: "build",
    priority: "low",
    tags: ["SET_USER_AGENT", "USER_AGENT"],
    override: true
  };
  var getUserAgentPlugin = (config) => ({
    applyToStack: (clientStack) => {
      clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
    }
  });
  exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID;
  exports.getUserAgentMiddlewareOptions = getUserAgentMiddlewareOptions;
  exports.getUserAgentPlugin = getUserAgentPlugin;
  exports.resolveUserAgentConfig = resolveUserAgentConfig;
  exports.userAgentMiddleware = userAgentMiddleware;
});

// ../../node_modules/.pnpm/@smithy+util-config-provider@4.2.2/node_modules/@smithy/util-config-provider/dist-cjs/index.js
var require_dist_cjs39 = __commonJS((exports) => {
  var booleanSelector = (obj, key, type2) => {
    if (!(key in obj))
      return;
    if (obj[key] === "true")
      return true;
    if (obj[key] === "false")
      return false;
    throw new Error(`Cannot load ${type2} "${key}". Expected "true" or "false", got ${obj[key]}.`);
  };
  var numberSelector = (obj, key, type2) => {
    if (!(key in obj))
      return;
    const numberValue = parseInt(obj[key], 10);
    if (Number.isNaN(numberValue)) {
      throw new TypeError(`Cannot load ${type2} '${key}'. Expected number, got '${obj[key]}'.`);
    }
    return numberValue;
  };
  exports.SelectorType = undefined;
  (function(SelectorType) {
    SelectorType["ENV"] = "env";
    SelectorType["CONFIG"] = "shared config entry";
  })(exports.SelectorType || (exports.SelectorType = {}));
  exports.booleanSelector = booleanSelector;
  exports.numberSelector = numberSelector;
});

// ../../node_modules/.pnpm/@smithy+util-middleware@4.2.13/node_modules/@smithy/util-middleware/dist-cjs/index.js
var require_dist_cjs40 = __commonJS((exports) => {
  var types4 = require_dist_cjs();
  var getSmithyContext = (context10) => context10[types4.SMITHY_CONTEXT_KEY] || (context10[types4.SMITHY_CONTEXT_KEY] = {});
  var normalizeProvider = (input) => {
    if (typeof input === "function")
      return input;
    const promisified = Promise.resolve(input);
    return () => promisified;
  };
  exports.getSmithyContext = getSmithyContext;
  exports.normalizeProvider = normalizeProvider;
});

// ../../node_modules/.pnpm/@smithy+config-resolver@4.4.14/node_modules/@smithy/config-resolver/dist-cjs/index.js
var require_dist_cjs41 = __commonJS((exports) => {
  var utilConfigProvider = require_dist_cjs39();
  var utilMiddleware = require_dist_cjs40();
  var utilEndpoints = require_dist_cjs32();
  var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
  var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
  var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
  var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
    configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
    default: false
  };
  var nodeDualstackConfigSelectors = {
    environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
    configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
    default: undefined
  };
  var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
  var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
  var DEFAULT_USE_FIPS_ENDPOINT = false;
  var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
    configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
    default: false
  };
  var nodeFipsConfigSelectors = {
    environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
    configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
    default: undefined
  };
  var resolveCustomEndpointsConfig = (input) => {
    const { tls: tls2, endpoint, urlParser, useDualstackEndpoint } = input;
    return Object.assign(input, {
      tls: tls2 ?? true,
      endpoint: utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
      isCustomEndpoint: true,
      useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false)
    });
  };
  var getEndpointFromRegion = async (input) => {
    const { tls: tls2 = true } = input;
    const region = await input.region();
    const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
    if (!dnsHostRegex.test(region)) {
      throw new Error("Invalid region in client config");
    }
    const useDualstackEndpoint = await input.useDualstackEndpoint();
    const useFipsEndpoint = await input.useFipsEndpoint();
    const { hostname: hostname2 } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
    if (!hostname2) {
      throw new Error("Cannot resolve hostname from client config");
    }
    return input.urlParser(`${tls2 ? "https:" : "http:"}//${hostname2}`);
  };
  var resolveEndpointsConfig = (input) => {
    const useDualstackEndpoint = utilMiddleware.normalizeProvider(input.useDualstackEndpoint ?? false);
    const { endpoint, useFipsEndpoint, urlParser, tls: tls2 } = input;
    return Object.assign(input, {
      tls: tls2 ?? true,
      endpoint: endpoint ? utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),
      isCustomEndpoint: !!endpoint,
      useDualstackEndpoint
    });
  };
  var REGION_ENV_NAME = "AWS_REGION";
  var REGION_INI_NAME = "region";
  var NODE_REGION_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => env2[REGION_ENV_NAME],
    configFileSelector: (profile) => profile[REGION_INI_NAME],
    default: () => {
      throw new Error("Region is missing");
    }
  };
  var NODE_REGION_CONFIG_FILE_OPTIONS = {
    preferredFile: "credentials"
  };
  var validRegions = new Set;
  var checkRegion = (region, check = utilEndpoints.isValidHostLabel) => {
    if (!validRegions.has(region) && !check(region)) {
      if (region === "*") {
        console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
      } else {
        throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
      }
    } else {
      validRegions.add(region);
    }
  };
  var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
  var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
  var resolveRegionConfig = (input) => {
    const { region, useFipsEndpoint } = input;
    if (!region) {
      throw new Error("Region is missing");
    }
    return Object.assign(input, {
      region: async () => {
        const providedRegion = typeof region === "function" ? await region() : region;
        const realRegion = getRealRegion(providedRegion);
        checkRegion(realRegion);
        return realRegion;
      },
      useFipsEndpoint: async () => {
        const providedRegion = typeof region === "string" ? region : await region();
        if (isFipsRegion(providedRegion)) {
          return true;
        }
        return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
      }
    });
  };
  var getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname;
  var getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : undefined;
  var getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws";
  var getResolvedSigningRegion = (hostname2, { signingRegion, regionRegex, useFipsEndpoint }) => {
    if (signingRegion) {
      return signingRegion;
    } else if (useFipsEndpoint) {
      const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
      const regionRegexmatchArray = hostname2.match(regionRegexJs);
      if (regionRegexmatchArray) {
        return regionRegexmatchArray[0].slice(1, -1);
      }
    }
  };
  var getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => {
    const partition = getResolvedPartition(region, { partitionHash });
    const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
    const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
    const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);
    const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);
    const hostname2 = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
    if (hostname2 === undefined) {
      throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
    }
    const signingRegion = getResolvedSigningRegion(hostname2, {
      signingRegion: regionHash[resolvedRegion]?.signingRegion,
      regionRegex: partitionHash[partition].regionRegex,
      useFipsEndpoint
    });
    return {
      partition,
      signingService,
      hostname: hostname2,
      ...signingRegion && { signingRegion },
      ...regionHash[resolvedRegion]?.signingService && {
        signingService: regionHash[resolvedRegion].signingService
      }
    };
  };
  exports.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT;
  exports.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT;
  exports.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT;
  exports.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT;
  exports.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT;
  exports.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT;
  exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
  exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
  exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS;
  exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS;
  exports.REGION_ENV_NAME = REGION_ENV_NAME;
  exports.REGION_INI_NAME = REGION_INI_NAME;
  exports.getRegionInfo = getRegionInfo;
  exports.nodeDualstackConfigSelectors = nodeDualstackConfigSelectors;
  exports.nodeFipsConfigSelectors = nodeFipsConfigSelectors;
  exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
  exports.resolveEndpointsConfig = resolveEndpointsConfig;
  exports.resolveRegionConfig = resolveRegionConfig;
});

// ../../node_modules/.pnpm/@smithy+middleware-content-length@4.2.13/node_modules/@smithy/middleware-content-length/dist-cjs/index.js
var require_dist_cjs42 = __commonJS((exports) => {
  var protocolHttp = require_dist_cjs28();
  var CONTENT_LENGTH_HEADER = "content-length";
  function contentLengthMiddleware(bodyLengthChecker) {
    return (next) => async (args) => {
      const request2 = args.request;
      if (protocolHttp.HttpRequest.isInstance(request2)) {
        const { body, headers } = request2;
        if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {
          try {
            const length = bodyLengthChecker(body);
            request2.headers = {
              ...request2.headers,
              [CONTENT_LENGTH_HEADER]: String(length)
            };
          } catch (error2) {}
        }
      }
      return next({
        ...args,
        request: request2
      });
    };
  }
  var contentLengthMiddlewareOptions = {
    step: "build",
    tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
    name: "contentLengthMiddleware",
    override: true
  };
  var getContentLengthPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
    }
  });
  exports.contentLengthMiddleware = contentLengthMiddleware;
  exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions;
  exports.getContentLengthPlugin = getContentLengthPlugin;
});

// ../../node_modules/.pnpm/@smithy+node-config-provider@4.3.13/node_modules/@smithy/node-config-provider/dist-cjs/index.js
var require_dist_cjs43 = __commonJS((exports) => {
  var propertyProvider = require_dist_cjs26();
  var sharedIniFileLoader = require_dist_cjs27();
  function getSelectorName(functionString) {
    try {
      const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
      constants.delete("CONFIG");
      constants.delete("CONFIG_PREFIX_SEPARATOR");
      constants.delete("ENV");
      return [...constants].join(", ");
    } catch (e) {
      return functionString;
    }
  }
  var fromEnv = (envVarSelector, options) => async () => {
    try {
      const config = envVarSelector(process.env, options);
      if (config === undefined) {
        throw new Error;
      }
      return config;
    } catch (e) {
      throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });
    }
  };
  var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init4 } = {}) => async () => {
    const profile = sharedIniFileLoader.getProfileName(init4);
    const { configFile, credentialsFile } = await sharedIniFileLoader.loadSharedConfigFiles(init4);
    const profileFromCredentials = credentialsFile[profile] || {};
    const profileFromConfig = configFile[profile] || {};
    const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
    try {
      const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
      const configValue = configSelector(mergedProfile, cfgFile);
      if (configValue === undefined) {
        throw new Error;
      }
      return configValue;
    } catch (e) {
      throw new propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init4.logger });
    }
  };
  var isFunction = (func) => typeof func === "function";
  var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue);
  var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
    const { signingName, logger } = configuration;
    const envOptions = { signingName, logger };
    return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
  };
  exports.loadConfig = loadConfig;
});

// ../../node_modules/.pnpm/@smithy+middleware-endpoint@4.4.29/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js
var require_getEndpointUrlConfig = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getEndpointUrlConfig = undefined;
  var shared_ini_file_loader_1 = require_dist_cjs27();
  var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
  var CONFIG_ENDPOINT_URL = "endpoint_url";
  var getEndpointUrlConfig = (serviceId) => ({
    environmentVariableSelector: (env2) => {
      const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
      const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
      if (serviceEndpointUrl)
        return serviceEndpointUrl;
      const endpointUrl = env2[ENV_ENDPOINT_URL];
      if (endpointUrl)
        return endpointUrl;
      return;
    },
    configFileSelector: (profile, config) => {
      if (config && profile.services) {
        const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
        if (servicesSection) {
          const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
          const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
          if (endpointUrl2)
            return endpointUrl2;
        }
      }
      const endpointUrl = profile[CONFIG_ENDPOINT_URL];
      if (endpointUrl)
        return endpointUrl;
      return;
    },
    default: undefined
  });
  exports.getEndpointUrlConfig = getEndpointUrlConfig;
});

// ../../node_modules/.pnpm/@smithy+middleware-endpoint@4.4.29/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js
var require_getEndpointFromConfig = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getEndpointFromConfig = undefined;
  var node_config_provider_1 = require_dist_cjs43();
  var getEndpointUrlConfig_1 = require_getEndpointUrlConfig();
  var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))();
  exports.getEndpointFromConfig = getEndpointFromConfig;
});

// ../../node_modules/.pnpm/@smithy+middleware-serde@4.2.17/node_modules/@smithy/middleware-serde/dist-cjs/index.js
var require_dist_cjs44 = __commonJS((exports) => {
  var protocolHttp = require_dist_cjs28();
  var endpoints = require_endpoints();
  var deserializerMiddleware = (options, deserializer) => (next, context10) => async (args) => {
    const { response } = await next(args);
    try {
      const parsed = await deserializer(response, options);
      return {
        response,
        output: parsed
      };
    } catch (error2) {
      Object.defineProperty(error2, "$response", {
        value: response,
        enumerable: false,
        writable: false,
        configurable: false
      });
      if (!("$metadata" in error2)) {
        const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
        try {
          error2.message += `
  ` + hint;
        } catch (e) {
          if (!context10.logger || context10.logger?.constructor?.name === "NoOpLogger") {
            console.warn(hint);
          } else {
            context10.logger?.warn?.(hint);
          }
        }
        if (typeof error2.$responseBodyText !== "undefined") {
          if (error2.$response) {
            error2.$response.body = error2.$responseBodyText;
          }
        }
        try {
          if (protocolHttp.HttpResponse.isInstance(response)) {
            const { headers = {} } = response;
            const headerEntries = Object.entries(headers);
            error2.$metadata = {
              httpStatusCode: response.statusCode,
              requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
              extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
              cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
            };
          }
        } catch (e) {}
      }
      throw error2;
    }
  };
  var findHeader = (pattern, headers) => {
    return (headers.find(([k2]) => {
      return k2.match(pattern);
    }) || [undefined, undefined])[1];
  };
  var serializerMiddleware = (options, serializer) => (next, context10) => async (args) => {
    const endpointConfig = options;
    const endpoint = context10.endpointV2 ? async () => endpoints.toEndpointV1(context10.endpointV2) : endpointConfig.endpoint;
    if (!endpoint) {
      throw new Error("No valid endpoint provider available.");
    }
    const request2 = await serializer(args.input, { ...options, endpoint });
    return next({
      ...args,
      request: request2
    });
  };
  var deserializerMiddlewareOption = {
    name: "deserializerMiddleware",
    step: "deserialize",
    tags: ["DESERIALIZER"],
    override: true
  };
  var serializerMiddlewareOption = {
    name: "serializerMiddleware",
    step: "serialize",
    tags: ["SERIALIZER"],
    override: true
  };
  function getSerdePlugin(config, serializer, deserializer) {
    return {
      applyToStack: (commandStack) => {
        commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);
        commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);
      }
    };
  }
  exports.deserializerMiddleware = deserializerMiddleware;
  exports.deserializerMiddlewareOption = deserializerMiddlewareOption;
  exports.getSerdePlugin = getSerdePlugin;
  exports.serializerMiddleware = serializerMiddleware;
  exports.serializerMiddlewareOption = serializerMiddlewareOption;
});

// ../../node_modules/.pnpm/@smithy+middleware-endpoint@4.4.29/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js
var require_dist_cjs45 = __commonJS((exports) => {
  var core = require_dist_cjs5();
  var utilMiddleware = require_dist_cjs40();
  var getEndpointFromConfig = require_getEndpointFromConfig();
  var urlParser = require_dist_cjs34();
  var middlewareSerde = require_dist_cjs44();
  var resolveParamsForS3 = async (endpointParams) => {
    const bucket = endpointParams?.Bucket || "";
    if (typeof endpointParams.Bucket === "string") {
      endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
    }
    if (isArnBucketName(bucket)) {
      if (endpointParams.ForcePathStyle === true) {
        throw new Error("Path-style addressing cannot be used with ARN buckets");
      }
    } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) {
      endpointParams.ForcePathStyle = true;
    }
    if (endpointParams.DisableMultiRegionAccessPoints) {
      endpointParams.disableMultiRegionAccessPoints = true;
      endpointParams.DisableMRAP = true;
    }
    return endpointParams;
  };
  var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
  var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
  var DOTS_PATTERN = /\.\./;
  var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
  var isArnBucketName = (bucketName) => {
    const [arn, partition, service, , , bucket] = bucketName.split(":");
    const isArn = arn === "arn" && bucketName.split(":").length >= 6;
    const isValidArn = Boolean(isArn && partition && service && bucket);
    if (isArn && !isValidArn) {
      throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
    }
    return isValidArn;
  };
  var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
    const configProvider = async () => {
      let configValue;
      if (isClientContextParam) {
        const clientContextParams = config.clientContextParams;
        const nestedValue = clientContextParams?.[configKey];
        configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
      } else {
        configValue = config[configKey] ?? config[canonicalEndpointParamKey];
      }
      if (typeof configValue === "function") {
        return configValue();
      }
      return configValue;
    };
    if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") {
      return async () => {
        const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
        const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;
        return configValue;
      };
    }
    if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
      return async () => {
        const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
        const configValue = credentials?.accountId ?? credentials?.AccountId;
        return configValue;
      };
    }
    if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
      return async () => {
        if (config.isCustomEndpoint === false) {
          return;
        }
        const endpoint = await configProvider();
        if (endpoint && typeof endpoint === "object") {
          if ("url" in endpoint) {
            return endpoint.url.href;
          }
          if ("hostname" in endpoint) {
            const { protocol, hostname: hostname2, port, path: path2 } = endpoint;
            return `${protocol}//${hostname2}${port ? ":" + port : ""}${path2}`;
          }
        }
        return endpoint;
      };
    }
    return configProvider;
  };
  var toEndpointV1 = (endpoint) => {
    if (typeof endpoint === "object") {
      if ("url" in endpoint) {
        const v1Endpoint = urlParser.parseUrl(endpoint.url);
        if (endpoint.headers) {
          v1Endpoint.headers = {};
          for (const [name, values] of Object.entries(endpoint.headers)) {
            v1Endpoint.headers[name.toLowerCase()] = values.join(", ");
          }
        }
        return v1Endpoint;
      }
      return endpoint;
    }
    return urlParser.parseUrl(endpoint);
  };
  var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context10) => {
    if (!clientConfig.isCustomEndpoint) {
      let endpointFromConfig;
      if (clientConfig.serviceConfiguredEndpoint) {
        endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
      } else {
        endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId);
      }
      if (endpointFromConfig) {
        clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
        clientConfig.isCustomEndpoint = true;
      }
    }
    const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
    if (typeof clientConfig.endpointProvider !== "function") {
      throw new Error("config.endpointProvider is not set.");
    }
    const endpoint = clientConfig.endpointProvider(endpointParams, context10);
    if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {
      const customEndpoint = await clientConfig.endpoint();
      if (customEndpoint?.headers) {
        endpoint.headers ??= {};
        for (const [name, value] of Object.entries(customEndpoint.headers)) {
          endpoint.headers[name] = Array.isArray(value) ? value : [value];
        }
      }
    }
    return endpoint;
  };
  var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
    const endpointParams = {};
    const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
    for (const [name, instruction] of Object.entries(instructions)) {
      switch (instruction.type) {
        case "staticContextParams":
          endpointParams[name] = instruction.value;
          break;
        case "contextParams":
          endpointParams[name] = commandInput[instruction.name];
          break;
        case "clientContextParams":
        case "builtInParams":
          endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
          break;
        case "operationContextParams":
          endpointParams[name] = instruction.get(commandInput);
          break;
        default:
          throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
      }
    }
    if (Object.keys(instructions).length === 0) {
      Object.assign(endpointParams, clientConfig);
    }
    if (String(clientConfig.serviceId).toLowerCase() === "s3") {
      await resolveParamsForS3(endpointParams);
    }
    return endpointParams;
  };
  var endpointMiddleware = ({ config, instructions }) => {
    return (next, context10) => async (args) => {
      if (config.isCustomEndpoint) {
        core.setFeature(context10, "ENDPOINT_OVERRIDE", "N");
      }
      const endpoint = await getEndpointFromInstructions(args.input, {
        getEndpointParameterInstructions() {
          return instructions;
        }
      }, { ...config }, context10);
      context10.endpointV2 = endpoint;
      context10.authSchemes = endpoint.properties?.authSchemes;
      const authScheme = context10.authSchemes?.[0];
      if (authScheme) {
        context10["signing_region"] = authScheme.signingRegion;
        context10["signing_service"] = authScheme.signingName;
        const smithyContext = utilMiddleware.getSmithyContext(context10);
        const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
        if (httpAuthOption) {
          httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
            signing_region: authScheme.signingRegion,
            signingRegion: authScheme.signingRegion,
            signing_service: authScheme.signingName,
            signingName: authScheme.signingName,
            signingRegionSet: authScheme.signingRegionSet
          }, authScheme.properties);
        }
      }
      return next({
        ...args
      });
    };
  };
  var endpointMiddlewareOptions = {
    step: "serialize",
    tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
    name: "endpointV2Middleware",
    override: true,
    relation: "before",
    toMiddleware: middlewareSerde.serializerMiddlewareOption.name
  };
  var getEndpointPlugin = (config, instructions) => ({
    applyToStack: (clientStack) => {
      clientStack.addRelativeTo(endpointMiddleware({
        config,
        instructions
      }), endpointMiddlewareOptions);
    }
  });
  var resolveEndpointConfig = (input) => {
    const tls2 = input.tls ?? true;
    const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
    const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined;
    const isCustomEndpoint = !!endpoint;
    const resolvedConfig = Object.assign(input, {
      endpoint: customEndpointProvider,
      tls: tls2,
      isCustomEndpoint,
      useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false),
      useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false)
    });
    let configuredEndpointPromise = undefined;
    resolvedConfig.serviceConfiguredEndpoint = async () => {
      if (input.serviceId && !configuredEndpointPromise) {
        configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId);
      }
      return configuredEndpointPromise;
    };
    return resolvedConfig;
  };
  var resolveEndpointRequiredConfig = (input) => {
    const { endpoint } = input;
    if (endpoint === undefined) {
      input.endpoint = async () => {
        throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
      };
    }
    return input;
  };
  exports.endpointMiddleware = endpointMiddleware;
  exports.endpointMiddlewareOptions = endpointMiddlewareOptions;
  exports.getEndpointFromInstructions = getEndpointFromInstructions;
  exports.getEndpointPlugin = getEndpointPlugin;
  exports.resolveEndpointConfig = resolveEndpointConfig;
  exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig;
  exports.resolveParams = resolveParams;
  exports.toEndpointV1 = toEndpointV1;
});

// ../../node_modules/.pnpm/@smithy+uuid@1.1.2/node_modules/@smithy/uuid/dist-cjs/randomUUID.js
var require_randomUUID = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.randomUUID = undefined;
  var tslib_1 = require_tslib();
  var crypto_1 = tslib_1.__importDefault(__require("crypto"));
  exports.randomUUID = crypto_1.default.randomUUID.bind(crypto_1.default);
});

// ../../node_modules/.pnpm/@smithy+uuid@1.1.2/node_modules/@smithy/uuid/dist-cjs/index.js
var require_dist_cjs46 = __commonJS((exports) => {
  var randomUUID = require_randomUUID();
  var decimalToHex = Array.from({ length: 256 }, (_2, i) => i.toString(16).padStart(2, "0"));
  var v4 = () => {
    if (randomUUID.randomUUID) {
      return randomUUID.randomUUID();
    }
    const rnds = new Uint8Array(16);
    crypto.getRandomValues(rnds);
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
  };
  exports.v4 = v4;
});

// ../../node_modules/.pnpm/@smithy+middleware-stack@4.2.13/node_modules/@smithy/middleware-stack/dist-cjs/index.js
var require_dist_cjs47 = __commonJS((exports) => {
  var getAllAliases = (name, aliases) => {
    const _aliases = [];
    if (name) {
      _aliases.push(name);
    }
    if (aliases) {
      for (const alias of aliases) {
        _aliases.push(alias);
      }
    }
    return _aliases;
  };
  var getMiddlewareNameWithAliases = (name, aliases) => {
    return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
  };
  var constructStack = () => {
    let absoluteEntries = [];
    let relativeEntries = [];
    let identifyOnResolve = false;
    const entriesNameSet = new Set;
    const sort = (entries) => entries.sort((a, b2) => stepWeights[b2.step] - stepWeights[a.step] || priorityWeights[b2.priority || "normal"] - priorityWeights[a.priority || "normal"]);
    const removeByName = (toRemove) => {
      let isRemoved = false;
      const filterCb = (entry) => {
        const aliases = getAllAliases(entry.name, entry.aliases);
        if (aliases.includes(toRemove)) {
          isRemoved = true;
          for (const alias of aliases) {
            entriesNameSet.delete(alias);
          }
          return false;
        }
        return true;
      };
      absoluteEntries = absoluteEntries.filter(filterCb);
      relativeEntries = relativeEntries.filter(filterCb);
      return isRemoved;
    };
    const removeByReference = (toRemove) => {
      let isRemoved = false;
      const filterCb = (entry) => {
        if (entry.middleware === toRemove) {
          isRemoved = true;
          for (const alias of getAllAliases(entry.name, entry.aliases)) {
            entriesNameSet.delete(alias);
          }
          return false;
        }
        return true;
      };
      absoluteEntries = absoluteEntries.filter(filterCb);
      relativeEntries = relativeEntries.filter(filterCb);
      return isRemoved;
    };
    const cloneTo = (toStack) => {
      absoluteEntries.forEach((entry) => {
        toStack.add(entry.middleware, { ...entry });
      });
      relativeEntries.forEach((entry) => {
        toStack.addRelativeTo(entry.middleware, { ...entry });
      });
      toStack.identifyOnResolve?.(stack.identifyOnResolve());
      return toStack;
    };
    const expandRelativeMiddlewareList = (from) => {
      const expandedMiddlewareList = [];
      from.before.forEach((entry) => {
        if (entry.before.length === 0 && entry.after.length === 0) {
          expandedMiddlewareList.push(entry);
        } else {
          expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
        }
      });
      expandedMiddlewareList.push(from);
      from.after.reverse().forEach((entry) => {
        if (entry.before.length === 0 && entry.after.length === 0) {
          expandedMiddlewareList.push(entry);
        } else {
          expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
        }
      });
      return expandedMiddlewareList;
    };
    const getMiddlewareList = (debug2 = false) => {
      const normalizedAbsoluteEntries = [];
      const normalizedRelativeEntries = [];
      const normalizedEntriesNameMap = {};
      absoluteEntries.forEach((entry) => {
        const normalizedEntry = {
          ...entry,
          before: [],
          after: []
        };
        for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
          normalizedEntriesNameMap[alias] = normalizedEntry;
        }
        normalizedAbsoluteEntries.push(normalizedEntry);
      });
      relativeEntries.forEach((entry) => {
        const normalizedEntry = {
          ...entry,
          before: [],
          after: []
        };
        for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
          normalizedEntriesNameMap[alias] = normalizedEntry;
        }
        normalizedRelativeEntries.push(normalizedEntry);
      });
      normalizedRelativeEntries.forEach((entry) => {
        if (entry.toMiddleware) {
          const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
          if (toMiddleware === undefined) {
            if (debug2) {
              return;
            }
            throw new Error(`${entry.toMiddleware} is not found when adding ` + `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + `middleware ${entry.relation} ${entry.toMiddleware}`);
          }
          if (entry.relation === "after") {
            toMiddleware.after.push(entry);
          }
          if (entry.relation === "before") {
            toMiddleware.before.push(entry);
          }
        }
      });
      const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {
        wholeList.push(...expandedMiddlewareList);
        return wholeList;
      }, []);
      return mainChain;
    };
    const stack = {
      add: (middleware, options = {}) => {
        const { name, override, aliases: _aliases } = options;
        const entry = {
          step: "initialize",
          priority: "normal",
          middleware,
          ...options
        };
        const aliases = getAllAliases(name, _aliases);
        if (aliases.length > 0) {
          if (aliases.some((alias) => entriesNameSet.has(alias))) {
            if (!override)
              throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
            for (const alias of aliases) {
              const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
              if (toOverrideIndex === -1) {
                continue;
              }
              const toOverride = absoluteEntries[toOverrideIndex];
              if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {
                throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + `${toOverride.priority} priority in ${toOverride.step} step cannot ` + `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + `${entry.priority} priority in ${entry.step} step.`);
              }
              absoluteEntries.splice(toOverrideIndex, 1);
            }
          }
          for (const alias of aliases) {
            entriesNameSet.add(alias);
          }
        }
        absoluteEntries.push(entry);
      },
      addRelativeTo: (middleware, options) => {
        const { name, override, aliases: _aliases } = options;
        const entry = {
          middleware,
          ...options
        };
        const aliases = getAllAliases(name, _aliases);
        if (aliases.length > 0) {
          if (aliases.some((alias) => entriesNameSet.has(alias))) {
            if (!override)
              throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
            for (const alias of aliases) {
              const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
              if (toOverrideIndex === -1) {
                continue;
              }
              const toOverride = relativeEntries[toOverrideIndex];
              if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
                throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + `"${entry.toMiddleware}" middleware.`);
              }
              relativeEntries.splice(toOverrideIndex, 1);
            }
          }
          for (const alias of aliases) {
            entriesNameSet.add(alias);
          }
        }
        relativeEntries.push(entry);
      },
      clone: () => cloneTo(constructStack()),
      use: (plugin) => {
        plugin.applyToStack(stack);
      },
      remove: (toRemove) => {
        if (typeof toRemove === "string")
          return removeByName(toRemove);
        else
          return removeByReference(toRemove);
      },
      removeByTag: (toRemove) => {
        let isRemoved = false;
        const filterCb = (entry) => {
          const { tags, name, aliases: _aliases } = entry;
          if (tags && tags.includes(toRemove)) {
            const aliases = getAllAliases(name, _aliases);
            for (const alias of aliases) {
              entriesNameSet.delete(alias);
            }
            isRemoved = true;
            return false;
          }
          return true;
        };
        absoluteEntries = absoluteEntries.filter(filterCb);
        relativeEntries = relativeEntries.filter(filterCb);
        return isRemoved;
      },
      concat: (from) => {
        const cloned = cloneTo(constructStack());
        cloned.use(from);
        cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));
        return cloned;
      },
      applyToStack: cloneTo,
      identify: () => {
        return getMiddlewareList(true).map((mw) => {
          const step = mw.step ?? mw.relation + " " + mw.toMiddleware;
          return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
        });
      },
      identifyOnResolve(toggle) {
        if (typeof toggle === "boolean")
          identifyOnResolve = toggle;
        return identifyOnResolve;
      },
      resolve: (handler, context10) => {
        for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
          handler = middleware(handler, context10);
        }
        if (identifyOnResolve) {
          console.log(stack.identify());
        }
        return handler;
      }
    };
    return stack;
  };
  var stepWeights = {
    initialize: 5,
    serialize: 4,
    build: 3,
    finalizeRequest: 2,
    deserialize: 1
  };
  var priorityWeights = {
    high: 3,
    normal: 2,
    low: 1
  };
  exports.constructStack = constructStack;
});

// ../../node_modules/.pnpm/@smithy+smithy-client@4.12.9/node_modules/@smithy/smithy-client/dist-cjs/index.js
var require_dist_cjs48 = __commonJS((exports) => {
  var middlewareStack = require_dist_cjs47();
  var types4 = require_dist_cjs();
  var schema = require_schema();
  var serde = require_serde();
  var protocols = require_protocols();

  class Client4 {
    config;
    middlewareStack = middlewareStack.constructStack();
    initConfig;
    handlers;
    constructor(config) {
      this.config = config;
      const { protocol, protocolSettings } = config;
      if (protocolSettings) {
        if (typeof protocol === "function") {
          config.protocol = new protocol(protocolSettings);
        }
      }
    }
    send(command, optionsOrCb, cb) {
      const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined;
      const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
      const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;
      let handler;
      if (useHandlerCache) {
        if (!this.handlers) {
          this.handlers = new WeakMap;
        }
        const handlers2 = this.handlers;
        if (handlers2.has(command.constructor)) {
          handler = handlers2.get(command.constructor);
        } else {
          handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
          handlers2.set(command.constructor, handler);
        }
      } else {
        delete this.handlers;
        handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
      }
      if (callback) {
        handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {});
      } else {
        return handler(command).then((result) => result.output);
      }
    }
    destroy() {
      this.config?.requestHandler?.destroy?.();
      delete this.handlers;
    }
  }
  var SENSITIVE_STRING$1 = "***SensitiveInformation***";
  function schemaLogFilter(schema$1, data) {
    if (data == null) {
      return data;
    }
    const ns = schema.NormalizedSchema.of(schema$1);
    if (ns.getMergedTraits().sensitive) {
      return SENSITIVE_STRING$1;
    }
    if (ns.isListSchema()) {
      const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;
      if (isSensitive) {
        return SENSITIVE_STRING$1;
      }
    } else if (ns.isMapSchema()) {
      const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;
      if (isSensitive) {
        return SENSITIVE_STRING$1;
      }
    } else if (ns.isStructSchema() && typeof data === "object") {
      const object = data;
      const newObject = {};
      for (const [member2, memberNs] of ns.structIterator()) {
        if (object[member2] != null) {
          newObject[member2] = schemaLogFilter(memberNs, object[member2]);
        }
      }
      return newObject;
    }
    return data;
  }

  class Command {
    middlewareStack = middlewareStack.constructStack();
    schema;
    static classBuilder() {
      return new ClassBuilder;
    }
    resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) {
      for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
        this.middlewareStack.use(mw);
      }
      const stack = clientStack.concat(this.middlewareStack);
      const { logger } = configuration;
      const handlerExecutionContext = {
        logger,
        clientName,
        commandName,
        inputFilterSensitiveLog,
        outputFilterSensitiveLog,
        [types4.SMITHY_CONTEXT_KEY]: {
          commandInstance: this,
          ...smithyContext
        },
        ...additionalContext
      };
      const { requestHandler } = configuration;
      return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext);
    }
  }

  class ClassBuilder {
    _init = () => {};
    _ep = {};
    _middlewareFn = () => [];
    _commandName = "";
    _clientName = "";
    _additionalContext = {};
    _smithyContext = {};
    _inputFilterSensitiveLog = undefined;
    _outputFilterSensitiveLog = undefined;
    _serializer = null;
    _deserializer = null;
    _operationSchema;
    init(cb) {
      this._init = cb;
    }
    ep(endpointParameterInstructions) {
      this._ep = endpointParameterInstructions;
      return this;
    }
    m(middlewareSupplier) {
      this._middlewareFn = middlewareSupplier;
      return this;
    }
    s(service, operation, smithyContext = {}) {
      this._smithyContext = {
        service,
        operation,
        ...smithyContext
      };
      return this;
    }
    c(additionalContext = {}) {
      this._additionalContext = additionalContext;
      return this;
    }
    n(clientName, commandName) {
      this._clientName = clientName;
      this._commandName = commandName;
      return this;
    }
    f(inputFilter = (_2) => _2, outputFilter = (_2) => _2) {
      this._inputFilterSensitiveLog = inputFilter;
      this._outputFilterSensitiveLog = outputFilter;
      return this;
    }
    ser(serializer) {
      this._serializer = serializer;
      return this;
    }
    de(deserializer) {
      this._deserializer = deserializer;
      return this;
    }
    sc(operation) {
      this._operationSchema = operation;
      this._smithyContext.operationSchema = operation;
      return this;
    }
    build() {
      const closure = this;
      let CommandRef;
      return CommandRef = class extends Command {
        input;
        static getEndpointParameterInstructions() {
          return closure._ep;
        }
        constructor(...[input]) {
          super();
          this.input = input ?? {};
          closure._init(this);
          this.schema = closure._operationSchema;
        }
        resolveMiddleware(stack, configuration, options) {
          const op = closure._operationSchema;
          const input = op?.[4] ?? op?.input;
          const output = op?.[5] ?? op?.output;
          return this.resolveMiddlewareWithContext(stack, configuration, options, {
            CommandCtor: CommandRef,
            middlewareFn: closure._middlewareFn,
            clientName: closure._clientName,
            commandName: closure._commandName,
            inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_2) => _2),
            outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_2) => _2),
            smithyContext: closure._smithyContext,
            additionalContext: closure._additionalContext
          });
        }
        serialize = closure._serializer;
        deserialize = closure._deserializer;
      };
    }
  }
  var SENSITIVE_STRING = "***SensitiveInformation***";
  var createAggregatedClient = (commands, Client5, options) => {
    for (const [command, CommandCtor] of Object.entries(commands)) {
      const methodImpl = async function(args, optionsOrCb, cb) {
        const command2 = new CommandCtor(args);
        if (typeof optionsOrCb === "function") {
          this.send(command2, optionsOrCb);
        } else if (typeof cb === "function") {
          if (typeof optionsOrCb !== "object")
            throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
          this.send(command2, optionsOrCb || {}, cb);
        } else {
          return this.send(command2, optionsOrCb);
        }
      };
      const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
      Client5.prototype[methodName] = methodImpl;
    }
    const { paginators = {}, waiters = {} } = options ?? {};
    for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {
      if (Client5.prototype[paginatorName] === undefined) {
        Client5.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) {
          return paginatorFn({
            ...paginationConfiguration,
            client: this
          }, commandInput, ...rest);
        };
      }
    }
    for (const [waiterName, waiterFn] of Object.entries(waiters)) {
      if (Client5.prototype[waiterName] === undefined) {
        Client5.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) {
          let config = waiterConfiguration;
          if (typeof waiterConfiguration === "number") {
            config = {
              maxWaitTime: waiterConfiguration
            };
          }
          return waiterFn({
            ...config,
            client: this
          }, commandInput, ...rest);
        };
      }
    }
  };

  class ServiceException extends Error {
    $fault;
    $response;
    $retryable;
    $metadata;
    constructor(options) {
      super(options.message);
      Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
      this.name = options.name;
      this.$fault = options.$fault;
      this.$metadata = options.$metadata;
    }
    static isInstance(value) {
      if (!value)
        return false;
      const candidate = value;
      return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
    }
    static [Symbol.hasInstance](instance) {
      if (!instance)
        return false;
      const candidate = instance;
      if (this === ServiceException) {
        return ServiceException.isInstance(instance);
      }
      if (ServiceException.isInstance(instance)) {
        if (candidate.name && this.name) {
          return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
        }
        return this.prototype.isPrototypeOf(instance);
      }
      return false;
    }
  }
  var decorateServiceException = (exception, additions = {}) => {
    Object.entries(additions).filter(([, v2]) => v2 !== undefined).forEach(([k2, v2]) => {
      if (exception[k2] == undefined || exception[k2] === "") {
        exception[k2] = v2;
      }
    });
    const message = exception.message || exception.Message || "UnknownError";
    exception.message = message;
    delete exception.Message;
    return exception;
  };
  var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
    const $metadata = deserializeMetadata(output);
    const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
    const response = new exceptionCtor({
      name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError",
      $fault: "client",
      $metadata
    });
    throw decorateServiceException(response, parsedBody);
  };
  var withBaseException = (ExceptionCtor) => {
    return ({ output, parsedBody, errorCode }) => {
      throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
    };
  };
  var deserializeMetadata = (output) => ({
    httpStatusCode: output.statusCode,
    requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
    extendedRequestId: output.headers["x-amz-id-2"],
    cfId: output.headers["x-amz-cf-id"]
  });
  var loadConfigsForDefaultMode = (mode) => {
    switch (mode) {
      case "standard":
        return {
          retryMode: "standard",
          connectionTimeout: 3100
        };
      case "in-region":
        return {
          retryMode: "standard",
          connectionTimeout: 1100
        };
      case "cross-region":
        return {
          retryMode: "standard",
          connectionTimeout: 3100
        };
      case "mobile":
        return {
          retryMode: "standard",
          connectionTimeout: 30000
        };
      default:
        return {};
    }
  };
  var warningEmitted = false;
  var emitWarningIfUnsupportedVersion = (version3) => {
    if (version3 && !warningEmitted && parseInt(version3.substring(1, version3.indexOf("."))) < 16) {
      warningEmitted = true;
    }
  };
  var knownAlgorithms = Object.values(types4.AlgorithmId);
  var getChecksumConfiguration = (runtimeConfig) => {
    const checksumAlgorithms = [];
    for (const id in types4.AlgorithmId) {
      const algorithmId = types4.AlgorithmId[id];
      if (runtimeConfig[algorithmId] === undefined) {
        continue;
      }
      checksumAlgorithms.push({
        algorithmId: () => algorithmId,
        checksumConstructor: () => runtimeConfig[algorithmId]
      });
    }
    for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {
      checksumAlgorithms.push({
        algorithmId: () => id,
        checksumConstructor: () => ChecksumCtor
      });
    }
    return {
      addChecksumAlgorithm(algo) {
        runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};
        const id = algo.algorithmId();
        const ctor = algo.checksumConstructor();
        if (knownAlgorithms.includes(id)) {
          runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;
        } else {
          runtimeConfig.checksumAlgorithms[id] = ctor;
        }
        checksumAlgorithms.push(algo);
      },
      checksumAlgorithms() {
        return checksumAlgorithms;
      }
    };
  };
  var resolveChecksumRuntimeConfig = (clientConfig) => {
    const runtimeConfig = {};
    clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
      const id = checksumAlgorithm.algorithmId();
      if (knownAlgorithms.includes(id)) {
        runtimeConfig[id] = checksumAlgorithm.checksumConstructor();
      }
    });
    return runtimeConfig;
  };
  var getRetryConfiguration = (runtimeConfig) => {
    return {
      setRetryStrategy(retryStrategy) {
        runtimeConfig.retryStrategy = retryStrategy;
      },
      retryStrategy() {
        return runtimeConfig.retryStrategy;
      }
    };
  };
  var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
    const runtimeConfig = {};
    runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
    return runtimeConfig;
  };
  var getDefaultExtensionConfiguration = (runtimeConfig) => {
    return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
  };
  var getDefaultClientConfiguration = getDefaultExtensionConfiguration;
  var resolveDefaultRuntimeConfig = (config) => {
    return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
  };
  var getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];
  var getValueFromTextNode = (obj) => {
    const textNodeName = "#text";
    for (const key in obj) {
      if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {
        obj[key] = obj[key][textNodeName];
      } else if (typeof obj[key] === "object" && obj[key] !== null) {
        obj[key] = getValueFromTextNode(obj[key]);
      }
    }
    return obj;
  };
  var isSerializableHeaderValue = (value) => {
    return value != null;
  };

  class NoOpLogger {
    trace() {}
    debug() {}
    info() {}
    warn() {}
    error() {}
  }
  function map(arg0, arg1, arg2) {
    let target;
    let filter;
    let instructions;
    if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
      target = {};
      instructions = arg0;
    } else {
      target = arg0;
      if (typeof arg1 === "function") {
        filter = arg1;
        instructions = arg2;
        return mapWithFilter(target, filter, instructions);
      } else {
        instructions = arg1;
      }
    }
    for (const key of Object.keys(instructions)) {
      if (!Array.isArray(instructions[key])) {
        target[key] = instructions[key];
        continue;
      }
      applyInstruction(target, null, instructions, key);
    }
    return target;
  }
  var convertMap = (target) => {
    const output = {};
    for (const [k2, v2] of Object.entries(target || {})) {
      output[k2] = [, v2];
    }
    return output;
  };
  var take = (source, instructions) => {
    const out = {};
    for (const key in instructions) {
      applyInstruction(out, source, instructions, key);
    }
    return out;
  };
  var mapWithFilter = (target, filter, instructions) => {
    return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
      if (Array.isArray(value)) {
        _instructions[key] = value;
      } else {
        if (typeof value === "function") {
          _instructions[key] = [filter, value()];
        } else {
          _instructions[key] = [filter, value];
        }
      }
      return _instructions;
    }, {}));
  };
  var applyInstruction = (target, source, instructions, targetKey) => {
    if (source !== null) {
      let instruction = instructions[targetKey];
      if (typeof instruction === "function") {
        instruction = [, instruction];
      }
      const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
      if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) {
        target[targetKey] = valueFn(source[sourceKey]);
      }
      return;
    }
    let [filter, value] = instructions[targetKey];
    if (typeof value === "function") {
      let _value;
      const defaultFilterPassed = filter === undefined && (_value = value()) != null;
      const customFilterPassed = typeof filter === "function" && !!filter(undefined) || typeof filter !== "function" && !!filter;
      if (defaultFilterPassed) {
        target[targetKey] = _value;
      } else if (customFilterPassed) {
        target[targetKey] = value();
      }
    } else {
      const defaultFilterPassed = filter === undefined && value != null;
      const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter;
      if (defaultFilterPassed || customFilterPassed) {
        target[targetKey] = value;
      }
    }
  };
  var nonNullish = (_2) => _2 != null;
  var pass = (_2) => _2;
  var serializeFloat = (value) => {
    if (value !== value) {
      return "NaN";
    }
    switch (value) {
      case Infinity:
        return "Infinity";
      case -Infinity:
        return "-Infinity";
      default:
        return value;
    }
  };
  var serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z");
  var _json = (obj) => {
    if (obj == null) {
      return {};
    }
    if (Array.isArray(obj)) {
      return obj.filter((_2) => _2 != null).map(_json);
    }
    if (typeof obj === "object") {
      const target = {};
      for (const key of Object.keys(obj)) {
        if (obj[key] == null) {
          continue;
        }
        target[key] = _json(obj[key]);
      }
      return target;
    }
    return obj;
  };
  exports.collectBody = protocols.collectBody;
  exports.extendedEncodeURIComponent = protocols.extendedEncodeURIComponent;
  exports.resolvedPath = protocols.resolvedPath;
  exports.Client = Client4;
  exports.Command = Command;
  exports.NoOpLogger = NoOpLogger;
  exports.SENSITIVE_STRING = SENSITIVE_STRING;
  exports.ServiceException = ServiceException;
  exports._json = _json;
  exports.convertMap = convertMap;
  exports.createAggregatedClient = createAggregatedClient;
  exports.decorateServiceException = decorateServiceException;
  exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
  exports.getArrayIfSingleItem = getArrayIfSingleItem;
  exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
  exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration;
  exports.getValueFromTextNode = getValueFromTextNode;
  exports.isSerializableHeaderValue = isSerializableHeaderValue;
  exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode;
  exports.map = map;
  exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
  exports.serializeDateTime = serializeDateTime;
  exports.serializeFloat = serializeFloat;
  exports.take = take;
  exports.throwDefaultError = throwDefaultError;
  exports.withBaseException = withBaseException;
  Object.prototype.hasOwnProperty.call(serde, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: serde["__proto__"]
  });
  Object.keys(serde).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = serde[k2];
  });
});

// ../../node_modules/.pnpm/@smithy+middleware-retry@4.5.1/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js
var require_isStreamingPayload = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.isStreamingPayload = undefined;
  var stream_1 = __require("stream");
  var isStreamingPayload = (request2) => request2?.body instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && request2?.body instanceof ReadableStream;
  exports.isStreamingPayload = isStreamingPayload;
});

// ../../node_modules/.pnpm/@smithy+middleware-retry@4.5.1/node_modules/@smithy/middleware-retry/dist-cjs/index.js
var require_dist_cjs49 = __commonJS((exports) => {
  var utilRetry = require_dist_cjs37();
  var protocolHttp = require_dist_cjs28();
  var serviceErrorClassification = require_dist_cjs36();
  var uuid2 = require_dist_cjs46();
  var utilMiddleware = require_dist_cjs40();
  var smithyClient = require_dist_cjs48();
  var isStreamingPayload = require_isStreamingPayload();
  var serde = require_serde();
  var asSdkError = (error2) => {
    if (error2 instanceof Error)
      return error2;
    if (error2 instanceof Object)
      return Object.assign(new Error, error2);
    if (typeof error2 === "string")
      return new Error(error2);
    return new Error(`AWS SDK error wrapper for ${error2}`);
  };
  var getDefaultRetryQuota = (initialRetryTokens, options) => {
    const MAX_CAPACITY = initialRetryTokens;
    const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT;
    const retryCost = utilRetry.RETRY_COST;
    const timeoutRetryCost = utilRetry.TIMEOUT_RETRY_COST;
    let availableCapacity = initialRetryTokens;
    const getCapacityAmount = (error2) => error2.name === "TimeoutError" ? timeoutRetryCost : retryCost;
    const hasRetryTokens = (error2) => getCapacityAmount(error2) <= availableCapacity;
    const retrieveRetryTokens = (error2) => {
      if (!hasRetryTokens(error2)) {
        throw new Error("No retry token available");
      }
      const capacityAmount = getCapacityAmount(error2);
      availableCapacity -= capacityAmount;
      return capacityAmount;
    };
    const releaseRetryTokens = (capacityReleaseAmount) => {
      availableCapacity += capacityReleaseAmount ?? noRetryIncrement;
      availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
    };
    return Object.freeze({
      hasRetryTokens,
      retrieveRetryTokens,
      releaseRetryTokens
    });
  };
  var defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
  var defaultRetryDecider = (error2) => {
    if (!error2) {
      return false;
    }
    return serviceErrorClassification.isRetryableByTrait(error2) || serviceErrorClassification.isClockSkewError(error2) || serviceErrorClassification.isThrottlingError(error2) || serviceErrorClassification.isTransientError(error2);
  };

  class StandardRetryStrategy {
    maxAttemptsProvider;
    retryDecider;
    delayDecider;
    retryQuota;
    mode = utilRetry.RETRY_MODES.STANDARD;
    constructor(maxAttemptsProvider, options) {
      this.maxAttemptsProvider = maxAttemptsProvider;
      this.retryDecider = options?.retryDecider ?? defaultRetryDecider;
      this.delayDecider = options?.delayDecider ?? defaultDelayDecider;
      this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS);
    }
    shouldRetry(error2, attempts, maxAttempts) {
      return attempts < maxAttempts && this.retryDecider(error2) && this.retryQuota.hasRetryTokens(error2);
    }
    async getMaxAttempts() {
      let maxAttempts;
      try {
        maxAttempts = await this.maxAttemptsProvider();
      } catch (error2) {
        maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS;
      }
      return maxAttempts;
    }
    async retry(next, args, options) {
      let retryTokenAmount;
      let attempts = 0;
      let totalDelay = 0;
      const maxAttempts = await this.getMaxAttempts();
      const { request: request2 } = args;
      if (protocolHttp.HttpRequest.isInstance(request2)) {
        request2.headers[utilRetry.INVOCATION_ID_HEADER] = uuid2.v4();
      }
      while (true) {
        try {
          if (protocolHttp.HttpRequest.isInstance(request2)) {
            request2.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
          }
          if (options?.beforeRequest) {
            await options.beforeRequest();
          }
          const { response, output } = await next(args);
          if (options?.afterRequest) {
            options.afterRequest(response);
          }
          this.retryQuota.releaseRetryTokens(retryTokenAmount);
          output.$metadata.attempts = attempts + 1;
          output.$metadata.totalRetryDelay = totalDelay;
          return { response, output };
        } catch (e) {
          const err = asSdkError(e);
          attempts++;
          if (this.shouldRetry(err, attempts, maxAttempts)) {
            retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
            const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.DEFAULT_RETRY_DELAY_BASE, attempts);
            const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
            const delay = Math.max(delayFromResponse || 0, delayFromDecider);
            totalDelay += delay;
            await new Promise((resolve3) => setTimeout(resolve3, delay));
            continue;
          }
          if (!err.$metadata) {
            err.$metadata = {};
          }
          err.$metadata.attempts = attempts;
          err.$metadata.totalRetryDelay = totalDelay;
          throw err;
        }
      }
    }
  }
  var getDelayFromRetryAfterHeader = (response) => {
    if (!protocolHttp.HttpResponse.isInstance(response))
      return;
    const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
    if (!retryAfterHeaderName)
      return;
    const retryAfter = response.headers[retryAfterHeaderName];
    const retryAfterSeconds = Number(retryAfter);
    if (!Number.isNaN(retryAfterSeconds))
      return retryAfterSeconds * 1000;
    const retryAfterDate = new Date(retryAfter);
    return retryAfterDate.getTime() - Date.now();
  };

  class AdaptiveRetryStrategy extends StandardRetryStrategy {
    rateLimiter;
    constructor(maxAttemptsProvider, options) {
      const { rateLimiter, ...superOptions } = options ?? {};
      super(maxAttemptsProvider, superOptions);
      this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter;
      this.mode = utilRetry.RETRY_MODES.ADAPTIVE;
    }
    async retry(next, args) {
      return super.retry(next, args, {
        beforeRequest: async () => {
          return this.rateLimiter.getSendToken();
        },
        afterRequest: (response) => {
          this.rateLimiter.updateClientSendingRate(response);
        }
      });
    }
  }
  var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
  var CONFIG_MAX_ATTEMPTS = "max_attempts";
  var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => {
      const value = env2[ENV_MAX_ATTEMPTS];
      if (!value)
        return;
      const maxAttempt = parseInt(value);
      if (Number.isNaN(maxAttempt)) {
        throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
      }
      return maxAttempt;
    },
    configFileSelector: (profile) => {
      const value = profile[CONFIG_MAX_ATTEMPTS];
      if (!value)
        return;
      const maxAttempt = parseInt(value);
      if (Number.isNaN(maxAttempt)) {
        throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
      }
      return maxAttempt;
    },
    default: utilRetry.DEFAULT_MAX_ATTEMPTS
  };
  var resolveRetryConfig = (input) => {
    const { retryStrategy, retryMode } = input;
    const maxAttempts = utilMiddleware.normalizeProvider(input.maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS);
    let controller = retryStrategy ? Promise.resolve(retryStrategy) : undefined;
    const getDefault = async () => await utilMiddleware.normalizeProvider(retryMode)() === utilRetry.RETRY_MODES.ADAPTIVE ? new utilRetry.AdaptiveRetryStrategy(maxAttempts) : new utilRetry.StandardRetryStrategy(maxAttempts);
    return Object.assign(input, {
      maxAttempts,
      retryStrategy: () => controller ??= getDefault()
    });
  };
  var ENV_RETRY_MODE = "AWS_RETRY_MODE";
  var CONFIG_RETRY_MODE = "retry_mode";
  var NODE_RETRY_MODE_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE],
    configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
    default: utilRetry.DEFAULT_RETRY_MODE
  };
  var omitRetryHeadersMiddleware = () => (next) => async (args) => {
    const { request: request2 } = args;
    if (protocolHttp.HttpRequest.isInstance(request2)) {
      delete request2.headers[utilRetry.INVOCATION_ID_HEADER];
      delete request2.headers[utilRetry.REQUEST_HEADER];
    }
    return next(args);
  };
  var omitRetryHeadersMiddlewareOptions = {
    name: "omitRetryHeadersMiddleware",
    tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
    relation: "before",
    toMiddleware: "awsAuthMiddleware",
    override: true
  };
  var getOmitRetryHeadersPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
    }
  });
  function parseRetryAfterHeader3(response, logger) {
    if (!protocolHttp.HttpResponse.isInstance(response)) {
      return;
    }
    for (const header of Object.keys(response.headers)) {
      const h2 = header.toLowerCase();
      if (h2 === "retry-after") {
        const retryAfter = response.headers[header];
        let retryAfterSeconds = NaN;
        if (retryAfter.endsWith("GMT")) {
          try {
            const date2 = serde.parseRfc7231DateTime(retryAfter);
            retryAfterSeconds = (date2.getTime() - Date.now()) / 1000;
          } catch (e) {
            logger?.trace?.("Failed to parse retry-after header");
            logger?.trace?.(e);
          }
        } else if (retryAfter.match(/ GMT, ((\d+)|(\d+\.\d+))$/)) {
          retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\d.]+)$/)?.[1]);
        } else if (retryAfter.match(/^((\d+)|(\d+\.\d+))$/)) {
          retryAfterSeconds = Number(retryAfter);
        } else if (Date.parse(retryAfter) >= Date.now()) {
          retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1000;
        }
        if (isNaN(retryAfterSeconds)) {
          return;
        }
        return new Date(Date.now() + retryAfterSeconds * 1000);
      } else if (h2 === "x-amz-retry-after") {
        const v2 = response.headers[header];
        const backoffMilliseconds = Number(v2);
        if (isNaN(backoffMilliseconds)) {
          logger?.trace?.(`Failed to parse x-amz-retry-after=${v2}`);
          return;
        }
        return new Date(Date.now() + backoffMilliseconds);
      }
    }
  }
  function getRetryAfterHint(response, logger) {
    return parseRetryAfterHeader3(response, logger);
  }
  var retryMiddleware = (options) => (next, context10) => async (args) => {
    let retryStrategy = await options.retryStrategy();
    const maxAttempts = await options.maxAttempts();
    if (isRetryStrategyV2(retryStrategy)) {
      retryStrategy = retryStrategy;
      let retryToken = await retryStrategy.acquireInitialRetryToken((context10["partition_id"] ?? "") + (context10.__retryLongPoll ? ":longpoll" : ""));
      let lastError = new Error;
      let attempts = 0;
      let totalRetryDelay = 0;
      const { request: request2 } = args;
      const isRequest = protocolHttp.HttpRequest.isInstance(request2);
      if (isRequest) {
        request2.headers[utilRetry.INVOCATION_ID_HEADER] = uuid2.v4();
      }
      while (true) {
        try {
          if (isRequest) {
            request2.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
          }
          const { response, output } = await next(args);
          retryStrategy.recordSuccess(retryToken);
          output.$metadata.attempts = attempts + 1;
          output.$metadata.totalRetryDelay = totalRetryDelay;
          return { response, output };
        } catch (e) {
          const retryErrorInfo = getRetryErrorInfo(e, options.logger);
          lastError = asSdkError(e);
          if (isRequest && isStreamingPayload.isStreamingPayload(request2)) {
            (context10.logger instanceof smithyClient.NoOpLogger ? console : context10.logger)?.warn("An error was encountered in a non-retryable streaming request.");
            throw lastError;
          }
          try {
            retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
          } catch (refreshError) {
            if (typeof refreshError.$backoff === "number") {
              await cooldown(refreshError.$backoff);
            }
            if (!lastError.$metadata) {
              lastError.$metadata = {};
            }
            lastError.$metadata.attempts = attempts + 1;
            lastError.$metadata.totalRetryDelay = totalRetryDelay;
            throw lastError;
          }
          attempts = retryToken.getRetryCount();
          const delay = retryToken.getRetryDelay();
          totalRetryDelay += delay;
          await cooldown(delay);
        }
      }
    } else {
      retryStrategy = retryStrategy;
      if (retryStrategy?.mode) {
        context10.userAgent = [...context10.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
      }
      return retryStrategy.retry(next, args);
    }
  };
  var cooldown = (ms) => new Promise((resolve3) => setTimeout(resolve3, ms));
  var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
  var getRetryErrorInfo = (error2, logger) => {
    const errorInfo = {
      error: error2,
      errorType: getRetryErrorType(error2)
    };
    const retryAfterHint = parseRetryAfterHeader3(error2.$response, logger);
    if (retryAfterHint) {
      errorInfo.retryAfterHint = retryAfterHint;
    }
    return errorInfo;
  };
  var getRetryErrorType = (error2) => {
    if (serviceErrorClassification.isThrottlingError(error2))
      return "THROTTLING";
    if (serviceErrorClassification.isTransientError(error2))
      return "TRANSIENT";
    if (serviceErrorClassification.isServerError(error2))
      return "SERVER_ERROR";
    return "CLIENT_ERROR";
  };
  var retryMiddlewareOptions = {
    name: "retryMiddleware",
    tags: ["RETRY"],
    step: "finalizeRequest",
    priority: "high",
    override: true
  };
  var getRetryPlugin = (options) => ({
    applyToStack: (clientStack) => {
      clientStack.add(retryMiddleware(options), retryMiddlewareOptions);
    }
  });
  exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
  exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS;
  exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE;
  exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS;
  exports.ENV_RETRY_MODE = ENV_RETRY_MODE;
  exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS;
  exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS;
  exports.StandardRetryStrategy = StandardRetryStrategy;
  exports.defaultDelayDecider = defaultDelayDecider;
  exports.defaultRetryDecider = defaultRetryDecider;
  exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin;
  exports.getRetryAfterHint = getRetryAfterHint;
  exports.getRetryPlugin = getRetryPlugin;
  exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware;
  exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions;
  exports.resolveRetryConfig = resolveRetryConfig;
  exports.retryMiddleware = retryMiddleware;
  exports.retryMiddlewareOptions = retryMiddlewareOptions;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = undefined;
  var httpAuthSchemes_1 = require_httpAuthSchemes();
  var util_middleware_1 = require_dist_cjs40();
  var STSClient_1 = require_STSClient();
  var defaultSTSHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: (0, util_middleware_1.getSmithyContext)(context10).operation,
      region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "sts",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createSmithyApiNoAuthHttpAuthOption(authParameters) {
    return {
      schemeId: "smithy.api#noAuth"
    };
  }
  var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      case "AssumeRoleWithWebIdentity": {
        options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
        break;
      }
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;
  var resolveStsAuthConfig = (input) => Object.assign(input, {
    stsClientCtor: STSClient_1.STSClient
  });
  exports.resolveStsAuthConfig = resolveStsAuthConfig;
  var resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = (0, exports.resolveStsAuthConfig)(config);
    const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config_0);
    return Object.assign(config_1, {
      authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? [])
    });
  };
  exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/EndpointParameters.js
var require_EndpointParameters = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.commonParams = exports.resolveClientEndpointParameters = undefined;
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      useGlobalEndpoint: options.useGlobalEndpoint ?? false,
      defaultSigningName: "sts"
    });
  };
  exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
  exports.commonParams = {
    UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/package.json
var require_package7 = __commonJS((exports, module) => {
  module.exports = {
    name: "@aws-sdk/nested-clients",
    version: "3.996.19",
    description: "Nested clients for AWS SDK packages.",
    main: "./dist-cjs/index.js",
    module: "./dist-es/index.js",
    types: "./dist-types/index.d.ts",
    scripts: {
      build: "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline nested-clients",
      "build:es": "tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
      lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients",
      test: "yarn g:vitest run",
      "test:watch": "yarn g:vitest watch"
    },
    engines: {
      node: ">=20.0.0"
    },
    sideEffects: false,
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/javascript/"
    },
    license: "Apache-2.0",
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.973.27",
      "@aws-sdk/middleware-host-header": "^3.972.9",
      "@aws-sdk/middleware-logger": "^3.972.9",
      "@aws-sdk/middleware-recursion-detection": "^3.972.10",
      "@aws-sdk/middleware-user-agent": "^3.972.29",
      "@aws-sdk/region-config-resolver": "^3.972.11",
      "@aws-sdk/types": "^3.973.7",
      "@aws-sdk/util-endpoints": "^3.996.6",
      "@aws-sdk/util-user-agent-browser": "^3.972.9",
      "@aws-sdk/util-user-agent-node": "^3.973.15",
      "@smithy/config-resolver": "^4.4.14",
      "@smithy/core": "^3.23.14",
      "@smithy/fetch-http-handler": "^5.3.16",
      "@smithy/hash-node": "^4.2.13",
      "@smithy/invalid-dependency": "^4.2.13",
      "@smithy/middleware-content-length": "^4.2.13",
      "@smithy/middleware-endpoint": "^4.4.29",
      "@smithy/middleware-retry": "^4.5.0",
      "@smithy/middleware-serde": "^4.2.17",
      "@smithy/middleware-stack": "^4.2.13",
      "@smithy/node-config-provider": "^4.3.13",
      "@smithy/node-http-handler": "^4.5.2",
      "@smithy/protocol-http": "^5.3.13",
      "@smithy/smithy-client": "^4.12.9",
      "@smithy/types": "^4.14.0",
      "@smithy/url-parser": "^4.2.13",
      "@smithy/util-base64": "^4.3.2",
      "@smithy/util-body-length-browser": "^4.2.2",
      "@smithy/util-body-length-node": "^4.2.3",
      "@smithy/util-defaults-mode-browser": "^4.3.45",
      "@smithy/util-defaults-mode-node": "^4.2.49",
      "@smithy/util-endpoints": "^3.3.4",
      "@smithy/util-middleware": "^4.2.13",
      "@smithy/util-retry": "^4.3.0",
      "@smithy/util-utf8": "^4.2.2",
      tslib: "^2.6.2"
    },
    devDependencies: {
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "./cognito-identity.d.ts",
      "./cognito-identity.js",
      "./signin.d.ts",
      "./signin.js",
      "./sso-oidc.d.ts",
      "./sso-oidc.js",
      "./sso.d.ts",
      "./sso.js",
      "./sts.d.ts",
      "./sts.js",
      "dist-*/**"
    ],
    browser: {
      "./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser",
      "./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser",
      "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser",
      "./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser",
      "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser"
    },
    "react-native": {},
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "packages/nested-clients"
    },
    exports: {
      "./package.json": "./package.json",
      "./sso-oidc": {
        types: "./dist-types/submodules/sso-oidc/index.d.ts",
        module: "./dist-es/submodules/sso-oidc/index.js",
        node: "./dist-cjs/submodules/sso-oidc/index.js",
        import: "./dist-es/submodules/sso-oidc/index.js",
        require: "./dist-cjs/submodules/sso-oidc/index.js"
      },
      "./sts": {
        types: "./dist-types/submodules/sts/index.d.ts",
        module: "./dist-es/submodules/sts/index.js",
        node: "./dist-cjs/submodules/sts/index.js",
        import: "./dist-es/submodules/sts/index.js",
        require: "./dist-cjs/submodules/sts/index.js"
      },
      "./signin": {
        types: "./dist-types/submodules/signin/index.d.ts",
        module: "./dist-es/submodules/signin/index.js",
        node: "./dist-cjs/submodules/signin/index.js",
        import: "./dist-es/submodules/signin/index.js",
        require: "./dist-cjs/submodules/signin/index.js"
      },
      "./cognito-identity": {
        types: "./dist-types/submodules/cognito-identity/index.d.ts",
        module: "./dist-es/submodules/cognito-identity/index.js",
        node: "./dist-cjs/submodules/cognito-identity/index.js",
        import: "./dist-es/submodules/cognito-identity/index.js",
        require: "./dist-cjs/submodules/cognito-identity/index.js"
      },
      "./sso": {
        types: "./dist-types/submodules/sso/index.d.ts",
        module: "./dist-es/submodules/sso/index.js",
        node: "./dist-cjs/submodules/sso/index.js",
        import: "./dist-es/submodules/sso/index.js",
        require: "./dist-cjs/submodules/sso/index.js"
      }
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+util-user-agent-node@3.973.15/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
var require_dist_cjs50 = __commonJS((exports) => {
  var __dirname = "/home/runner/work/wraps/wraps/node_modules/.pnpm/@aws-sdk+util-user-agent-node@3.973.15/node_modules/@aws-sdk/util-user-agent-node/dist-cjs";
  var node_os = __require("node:os");
  var node_process = __require("node:process");
  var utilConfigProvider = require_dist_cjs39();
  var promises = __require("node:fs/promises");
  var node_path = __require("node:path");
  var middlewareUserAgent = require_dist_cjs38();
  var getRuntimeUserAgentPair = () => {
    const runtimesToCheck = ["deno", "bun", "llrt"];
    for (const runtime of runtimesToCheck) {
      if (node_process.versions[runtime]) {
        return [`md/${runtime}`, node_process.versions[runtime]];
      }
    }
    return ["md/nodejs", node_process.versions.node];
  };
  var getNodeModulesParentDirs = (dirname3) => {
    const cwd = process.cwd();
    if (!dirname3) {
      return [cwd];
    }
    const normalizedPath = node_path.normalize(dirname3);
    const parts = normalizedPath.split(node_path.sep);
    const nodeModulesIndex = parts.indexOf("node_modules");
    const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : normalizedPath;
    if (cwd === parentDir) {
      return [cwd];
    }
    return [parentDir, cwd];
  };
  var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
  var getSanitizedTypeScriptVersion = (version3 = "") => {
    const match = version3.match(SEMVER_REGEX);
    if (!match) {
      return;
    }
    const [major, minor, patch, prerelease] = [match[1], match[2], match[3], match[4]];
    return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
  };
  var ALLOWED_PREFIXES = ["^", "~", ">=", "<=", ">", "<"];
  var ALLOWED_DIST_TAGS = ["latest", "beta", "dev", "rc", "insiders", "next"];
  var getSanitizedDevTypeScriptVersion = (version3 = "") => {
    if (ALLOWED_DIST_TAGS.includes(version3)) {
      return version3;
    }
    const prefix = ALLOWED_PREFIXES.find((p2) => version3.startsWith(p2)) ?? "";
    const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version3.slice(prefix.length));
    if (!sanitizedTypeScriptVersion) {
      return;
    }
    return `${prefix}${sanitizedTypeScriptVersion}`;
  };
  var tscVersion;
  var TS_PACKAGE_JSON = node_path.join("node_modules", "typescript", "package.json");
  var getTypeScriptUserAgentPair = async () => {
    if (tscVersion === null) {
      return;
    } else if (typeof tscVersion === "string") {
      return ["md/tsc", tscVersion];
    }
    let isTypeScriptDetectionDisabled = false;
    try {
      isTypeScriptDetectionDisabled = utilConfigProvider.booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", utilConfigProvider.SelectorType.ENV) || false;
    } catch {}
    if (isTypeScriptDetectionDisabled) {
      tscVersion = null;
      return;
    }
    const dirname3 = typeof __dirname !== "undefined" ? __dirname : undefined;
    const nodeModulesParentDirs = getNodeModulesParentDirs(dirname3);
    let versionFromApp;
    for (const nodeModulesParentDir of nodeModulesParentDirs) {
      try {
        const appPackageJsonPath = node_path.join(nodeModulesParentDir, "package.json");
        const packageJson = await promises.readFile(appPackageJsonPath, "utf-8");
        const { dependencies, devDependencies } = JSON.parse(packageJson);
        const version3 = devDependencies?.typescript ?? dependencies?.typescript;
        if (typeof version3 !== "string") {
          continue;
        }
        versionFromApp = version3;
        break;
      } catch {}
    }
    if (!versionFromApp) {
      tscVersion = null;
      return;
    }
    let versionFromNodeModules;
    for (const nodeModulesParentDir of nodeModulesParentDirs) {
      try {
        const tsPackageJsonPath = node_path.join(nodeModulesParentDir, TS_PACKAGE_JSON);
        const packageJson = await promises.readFile(tsPackageJsonPath, "utf-8");
        const { version: version3 } = JSON.parse(packageJson);
        const sanitizedVersion2 = getSanitizedTypeScriptVersion(version3);
        if (typeof sanitizedVersion2 !== "string") {
          continue;
        }
        versionFromNodeModules = sanitizedVersion2;
        break;
      } catch {}
    }
    if (versionFromNodeModules) {
      tscVersion = versionFromNodeModules;
      return ["md/tsc", tscVersion];
    }
    const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp);
    if (typeof sanitizedVersion !== "string") {
      tscVersion = null;
      return;
    }
    tscVersion = `dev_${sanitizedVersion}`;
    return ["md/tsc", tscVersion];
  };
  var crtAvailability = {
    isCrtAvailable: false
  };
  var isCrtAvailable = () => {
    if (crtAvailability.isCrtAvailable) {
      return ["md/crt-avail"];
    }
    return null;
  };
  var createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
    const runtimeUserAgentPair = getRuntimeUserAgentPair();
    return async (config) => {
      const sections = [
        ["aws-sdk-js", clientVersion],
        ["ua", "2.1"],
        [`os/${node_os.platform()}`, node_os.release()],
        ["lang/js"],
        runtimeUserAgentPair
      ];
      const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
      if (typescriptUserAgentPair) {
        sections.push(typescriptUserAgentPair);
      }
      const crtAvailable = isCrtAvailable();
      if (crtAvailable) {
        sections.push(crtAvailable);
      }
      if (serviceId) {
        sections.push([`api/${serviceId}`, clientVersion]);
      }
      if (node_process.env.AWS_EXECUTION_ENV) {
        sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]);
      }
      const appId = await config?.userAgentAppId?.();
      const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
      return resolvedUserAgent;
    };
  };
  var defaultUserAgent = createDefaultUserAgentProvider;
  var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
  var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
  var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
  var NODE_APP_ID_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],
    configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
    default: middlewareUserAgent.DEFAULT_UA_APP_ID
  };
  exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS;
  exports.UA_APP_ID_ENV_NAME = UA_APP_ID_ENV_NAME;
  exports.UA_APP_ID_INI_NAME = UA_APP_ID_INI_NAME;
  exports.createDefaultUserAgentProvider = createDefaultUserAgentProvider;
  exports.crtAvailability = crtAvailability;
  exports.defaultUserAgent = defaultUserAgent;
});

// ../../node_modules/.pnpm/@smithy+is-array-buffer@4.2.2/node_modules/@smithy/is-array-buffer/dist-cjs/index.js
var require_dist_cjs51 = __commonJS((exports) => {
  var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
  exports.isArrayBuffer = isArrayBuffer;
});

// ../../node_modules/.pnpm/@smithy+util-buffer-from@4.2.2/node_modules/@smithy/util-buffer-from/dist-cjs/index.js
var require_dist_cjs52 = __commonJS((exports) => {
  var isArrayBuffer = require_dist_cjs51();
  var buffer = __require("buffer");
  var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
    if (!isArrayBuffer.isArrayBuffer(input)) {
      throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
    }
    return buffer.Buffer.from(input, offset, length);
  };
  var fromString = (input, encoding) => {
    if (typeof input !== "string") {
      throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
    }
    return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input);
  };
  exports.fromArrayBuffer = fromArrayBuffer;
  exports.fromString = fromString;
});

// ../../node_modules/.pnpm/@smithy+util-utf8@4.2.2/node_modules/@smithy/util-utf8/dist-cjs/index.js
var require_dist_cjs53 = __commonJS((exports) => {
  var utilBufferFrom = require_dist_cjs52();
  var fromUtf8 = (input) => {
    const buf = utilBufferFrom.fromString(input, "utf8");
    return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
  };
  var toUint8Array = (data) => {
    if (typeof data === "string") {
      return fromUtf8(data);
    }
    if (ArrayBuffer.isView(data)) {
      return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
    }
    return new Uint8Array(data);
  };
  var toUtf8 = (input) => {
    if (typeof input === "string") {
      return input;
    }
    if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
      throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
    }
    return utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
  };
  exports.fromUtf8 = fromUtf8;
  exports.toUint8Array = toUint8Array;
  exports.toUtf8 = toUtf8;
});

// ../../node_modules/.pnpm/@smithy+hash-node@4.2.13/node_modules/@smithy/hash-node/dist-cjs/index.js
var require_dist_cjs54 = __commonJS((exports) => {
  var utilBufferFrom = require_dist_cjs52();
  var utilUtf8 = require_dist_cjs53();
  var buffer = __require("buffer");
  var crypto2 = __require("crypto");

  class Hash {
    algorithmIdentifier;
    secret;
    hash;
    constructor(algorithmIdentifier, secret) {
      this.algorithmIdentifier = algorithmIdentifier;
      this.secret = secret;
      this.reset();
    }
    update(toHash, encoding) {
      this.hash.update(utilUtf8.toUint8Array(castSourceData(toHash, encoding)));
    }
    digest() {
      return Promise.resolve(this.hash.digest());
    }
    reset() {
      this.hash = this.secret ? crypto2.createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : crypto2.createHash(this.algorithmIdentifier);
    }
  }
  function castSourceData(toCast, encoding) {
    if (buffer.Buffer.isBuffer(toCast)) {
      return toCast;
    }
    if (typeof toCast === "string") {
      return utilBufferFrom.fromString(toCast, encoding);
    }
    if (ArrayBuffer.isView(toCast)) {
      return utilBufferFrom.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
    }
    return utilBufferFrom.fromArrayBuffer(toCast);
  }
  exports.Hash = Hash;
});

// ../../node_modules/.pnpm/@smithy+util-body-length-node@4.2.3/node_modules/@smithy/util-body-length-node/dist-cjs/index.js
var require_dist_cjs55 = __commonJS((exports) => {
  var node_fs = __require("node:fs");
  var calculateBodyLength = (body) => {
    if (!body) {
      return 0;
    }
    if (typeof body === "string") {
      return Buffer.byteLength(body);
    } else if (typeof body.byteLength === "number") {
      return body.byteLength;
    } else if (typeof body.size === "number") {
      return body.size;
    } else if (typeof body.start === "number" && typeof body.end === "number") {
      return body.end + 1 - body.start;
    } else if (body instanceof node_fs.ReadStream) {
      if (body.path != null) {
        return node_fs.lstatSync(body.path).size;
      } else if (typeof body.fd === "number") {
        return node_fs.fstatSync(body.fd).size;
      }
    }
    throw new Error(`Body Length computation failed for ${body}`);
  };
  exports.calculateBodyLength = calculateBodyLength;
});

// ../../node_modules/.pnpm/@smithy+util-defaults-mode-node@4.2.49/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js
var require_dist_cjs56 = __commonJS((exports) => {
  var configResolver = require_dist_cjs41();
  var nodeConfigProvider = require_dist_cjs43();
  var propertyProvider = require_dist_cjs26();
  var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
  var AWS_REGION_ENV = "AWS_REGION";
  var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
  var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
  var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
  var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
  var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
  var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
  var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
    environmentVariableSelector: (env2) => {
      return env2[AWS_DEFAULTS_MODE_ENV];
    },
    configFileSelector: (profile) => {
      return profile[AWS_DEFAULTS_MODE_CONFIG];
    },
    default: "legacy"
  };
  var resolveDefaultsModeConfig = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => propertyProvider.memoize(async () => {
    const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
    switch (mode?.toLowerCase()) {
      case "auto":
        return resolveNodeDefaultsModeAuto(region);
      case "in-region":
      case "cross-region":
      case "mobile":
      case "standard":
      case "legacy":
        return Promise.resolve(mode?.toLocaleLowerCase());
      case undefined:
        return Promise.resolve("legacy");
      default:
        throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
    }
  });
  var resolveNodeDefaultsModeAuto = async (clientRegion) => {
    if (clientRegion) {
      const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
      const inferredRegion = await inferPhysicalRegion();
      if (!inferredRegion) {
        return "standard";
      }
      if (resolvedRegion === inferredRegion) {
        return "in-region";
      } else {
        return "cross-region";
      }
    }
    return "standard";
  };
  var inferPhysicalRegion = async () => {
    if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {
      return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];
    }
    if (!process.env[ENV_IMDS_DISABLED]) {
      try {
        const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require_dist_cjs8()));
        const endpoint = await getInstanceMetadataEndpoint();
        return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();
      } catch (e) {}
    }
  };
  exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig;
});

// ../../node_modules/.pnpm/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js
var require_fromBase64 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.fromBase64 = undefined;
  var util_buffer_from_1 = require_dist_cjs52();
  var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
  var fromBase64 = (input) => {
    if (input.length * 3 % 4 !== 0) {
      throw new TypeError(`Incorrect padding on base64 string.`);
    }
    if (!BASE64_REGEX.exec(input)) {
      throw new TypeError(`Invalid base64 string.`);
    }
    const buffer = (0, util_buffer_from_1.fromString)(input, "base64");
    return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
  };
  exports.fromBase64 = fromBase64;
});

// ../../node_modules/.pnpm/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-cjs/toBase64.js
var require_toBase64 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.toBase64 = undefined;
  var util_buffer_from_1 = require_dist_cjs52();
  var util_utf8_1 = require_dist_cjs53();
  var toBase64 = (_input) => {
    let input;
    if (typeof _input === "string") {
      input = (0, util_utf8_1.fromUtf8)(_input);
    } else {
      input = _input;
    }
    if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
      throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
    }
    return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64");
  };
  exports.toBase64 = toBase64;
});

// ../../node_modules/.pnpm/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-cjs/index.js
var require_dist_cjs57 = __commonJS((exports) => {
  var fromBase64 = require_fromBase64();
  var toBase64 = require_toBase64();
  Object.prototype.hasOwnProperty.call(fromBase64, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: fromBase64["__proto__"]
  });
  Object.keys(fromBase64).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = fromBase64[k2];
  });
  Object.prototype.hasOwnProperty.call(toBase64, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: toBase64["__proto__"]
  });
  Object.keys(toBase64).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = toBase64[k2];
  });
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js
var require_ruleset = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ruleSet = undefined;
  var F = "required";
  var G = "type";
  var H = "fn";
  var I = "argv";
  var J = "ref";
  var a = false;
  var b2 = true;
  var c = "booleanEquals";
  var d2 = "stringEquals";
  var e = "sigv4";
  var f2 = "sts";
  var g2 = "us-east-1";
  var h2 = "endpoint";
  var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
  var j = "tree";
  var k2 = "error";
  var l = "getAttr";
  var m2 = { [F]: false, [G]: "string" };
  var n2 = { [F]: true, default: false, [G]: "boolean" };
  var o = { [J]: "Endpoint" };
  var p2 = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
  var q = { [J]: "Region" };
  var r = { [H]: "aws.partition", [I]: [q], assign: "PartitionResult" };
  var s = { [J]: "UseFIPS" };
  var t = { [J]: "UseDualStack" };
  var u = {
    url: "https://sts.amazonaws.com",
    properties: { authSchemes: [{ name: e, signingName: f2, signingRegion: g2 }] },
    headers: {}
  };
  var v2 = {};
  var w = { conditions: [{ [H]: d2, [I]: [q, "aws-global"] }], [h2]: u, [G]: h2 };
  var x = { [H]: c, [I]: [s, true] };
  var y2 = { [H]: c, [I]: [t, true] };
  var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
  var A = { [J]: "PartitionResult" };
  var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] };
  var C = [{ [H]: "isSet", [I]: [o] }];
  var D2 = [x];
  var E = [y2];
  var _data = {
    version: "1.0",
    parameters: { Region: m2, UseDualStack: n2, UseFIPS: n2, Endpoint: m2, UseGlobalEndpoint: n2 },
    rules: [
      {
        conditions: [
          { [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b2] },
          { [H]: "not", [I]: C },
          p2,
          r,
          { [H]: c, [I]: [s, a] },
          { [H]: c, [I]: [t, a] }
        ],
        rules: [
          { conditions: [{ [H]: d2, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h2 },
          w,
          { conditions: [{ [H]: d2, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, g2] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h2 },
          { conditions: [{ [H]: d2, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h2 },
          {
            endpoint: {
              url: i,
              properties: { authSchemes: [{ name: e, signingName: f2, signingRegion: "{Region}" }] },
              headers: v2
            },
            [G]: h2
          }
        ],
        [G]: j
      },
      {
        conditions: C,
        rules: [
          { conditions: D2, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k2 },
          { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k2 },
          { endpoint: { url: o, properties: v2, headers: v2 }, [G]: h2 }
        ],
        [G]: j
      },
      {
        conditions: [p2],
        rules: [
          {
            conditions: [r],
            rules: [
              {
                conditions: [x, y2],
                rules: [
                  {
                    conditions: [{ [H]: c, [I]: [b2, z] }, B],
                    rules: [
                      {
                        endpoint: {
                          url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
                          properties: v2,
                          headers: v2
                        },
                        [G]: h2
                      }
                    ],
                    [G]: j
                  },
                  { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k2 }
                ],
                [G]: j
              },
              {
                conditions: D2,
                rules: [
                  {
                    conditions: [{ [H]: c, [I]: [z, b2] }],
                    rules: [
                      {
                        conditions: [{ [H]: d2, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }],
                        endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v2, headers: v2 },
                        [G]: h2
                      },
                      {
                        endpoint: {
                          url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",
                          properties: v2,
                          headers: v2
                        },
                        [G]: h2
                      }
                    ],
                    [G]: j
                  },
                  { error: "FIPS is enabled but this partition does not support FIPS", [G]: k2 }
                ],
                [G]: j
              },
              {
                conditions: E,
                rules: [
                  {
                    conditions: [B],
                    rules: [
                      {
                        endpoint: {
                          url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",
                          properties: v2,
                          headers: v2
                        },
                        [G]: h2
                      }
                    ],
                    [G]: j
                  },
                  { error: "DualStack is enabled but this partition does not support DualStack", [G]: k2 }
                ],
                [G]: j
              },
              w,
              { endpoint: { url: i, properties: v2, headers: v2 }, [G]: h2 }
            ],
            [G]: j
          }
        ],
        [G]: j
      },
      { error: "Invalid Configuration: Missing Region", [G]: k2 }
    ]
  };
  exports.ruleSet = _data;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js
var require_endpointResolver6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.defaultEndpointResolver = undefined;
  var util_endpoints_1 = require_dist_cjs35();
  var util_endpoints_2 = require_dist_cjs32();
  var ruleset_1 = require_ruleset();
  var cache = new util_endpoints_2.EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
  });
  var defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
      endpointParams,
      logger: context10.logger
    }));
  };
  exports.defaultEndpointResolver = defaultEndpointResolver;
  util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/STSServiceException.js
var require_STSServiceException = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.STSServiceException = exports.__ServiceException = undefined;
  var smithy_client_1 = require_dist_cjs48();
  Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() {
    return smithy_client_1.ServiceException;
  } });

  class STSServiceException extends smithy_client_1.ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, STSServiceException.prototype);
    }
  }
  exports.STSServiceException = STSServiceException;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/errors.js
var require_errors6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = undefined;
  var STSServiceException_1 = require_STSServiceException();

  class ExpiredTokenException extends STSServiceException_1.STSServiceException {
    name = "ExpiredTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ExpiredTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExpiredTokenException.prototype);
    }
  }
  exports.ExpiredTokenException = ExpiredTokenException;

  class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException {
    name = "MalformedPolicyDocumentException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MalformedPolicyDocumentException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
    }
  }
  exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;

  class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException {
    name = "PackedPolicyTooLargeException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "PackedPolicyTooLargeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
    }
  }
  exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;

  class RegionDisabledException extends STSServiceException_1.STSServiceException {
    name = "RegionDisabledException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "RegionDisabledException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RegionDisabledException.prototype);
    }
  }
  exports.RegionDisabledException = RegionDisabledException;

  class IDPRejectedClaimException extends STSServiceException_1.STSServiceException {
    name = "IDPRejectedClaimException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "IDPRejectedClaimException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
    }
  }
  exports.IDPRejectedClaimException = IDPRejectedClaimException;

  class InvalidIdentityTokenException extends STSServiceException_1.STSServiceException {
    name = "InvalidIdentityTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidIdentityTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
    }
  }
  exports.InvalidIdentityTokenException = InvalidIdentityTokenException;

  class IDPCommunicationErrorException extends STSServiceException_1.STSServiceException {
    name = "IDPCommunicationErrorException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "IDPCommunicationErrorException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
    }
  }
  exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/schemas/schemas_0.js
var require_schemas_06 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AssumeRoleWithWebIdentity$ = exports.AssumeRole$ = exports.Tag$ = exports.ProvidedContext$ = exports.PolicyDescriptorType$ = exports.Credentials$ = exports.AssumeRoleWithWebIdentityResponse$ = exports.AssumeRoleWithWebIdentityRequest$ = exports.AssumeRoleResponse$ = exports.AssumeRoleRequest$ = exports.AssumedRoleUser$ = exports.errorTypeRegistries = exports.RegionDisabledException$ = exports.PackedPolicyTooLargeException$ = exports.MalformedPolicyDocumentException$ = exports.InvalidIdentityTokenException$ = exports.IDPRejectedClaimException$ = exports.IDPCommunicationErrorException$ = exports.ExpiredTokenException$ = exports.STSServiceException$ = undefined;
  var _A = "Arn";
  var _AKI = "AccessKeyId";
  var _AR = "AssumeRole";
  var _ARI = "AssumedRoleId";
  var _ARR = "AssumeRoleRequest";
  var _ARRs = "AssumeRoleResponse";
  var _ARU = "AssumedRoleUser";
  var _ARWWI = "AssumeRoleWithWebIdentity";
  var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
  var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
  var _Au = "Audience";
  var _C = "Credentials";
  var _CA = "ContextAssertion";
  var _DS = "DurationSeconds";
  var _E = "Expiration";
  var _EI = "ExternalId";
  var _ETE = "ExpiredTokenException";
  var _IDPCEE = "IDPCommunicationErrorException";
  var _IDPRCE = "IDPRejectedClaimException";
  var _IITE = "InvalidIdentityTokenException";
  var _K = "Key";
  var _MPDE = "MalformedPolicyDocumentException";
  var _P = "Policy";
  var _PA = "PolicyArns";
  var _PAr = "ProviderArn";
  var _PC = "ProvidedContexts";
  var _PCLT = "ProvidedContextsListType";
  var _PCr = "ProvidedContext";
  var _PDT = "PolicyDescriptorType";
  var _PI = "ProviderId";
  var _PPS = "PackedPolicySize";
  var _PPTLE = "PackedPolicyTooLargeException";
  var _Pr = "Provider";
  var _RA = "RoleArn";
  var _RDE = "RegionDisabledException";
  var _RSN = "RoleSessionName";
  var _SAK = "SecretAccessKey";
  var _SFWIT = "SubjectFromWebIdentityToken";
  var _SI = "SourceIdentity";
  var _SN = "SerialNumber";
  var _ST = "SessionToken";
  var _T = "Tags";
  var _TC = "TokenCode";
  var _TTK = "TransitiveTagKeys";
  var _Ta = "Tag";
  var _V = "Value";
  var _WIT = "WebIdentityToken";
  var _a = "arn";
  var _aKST = "accessKeySecretType";
  var _aQE = "awsQueryError";
  var _c = "client";
  var _cTT = "clientTokenType";
  var _e = "error";
  var _hE = "httpError";
  var _m = "message";
  var _pDLT = "policyDescriptorListType";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
  var _tLT = "tagListType";
  var n0 = "com.amazonaws.sts";
  var schema_1 = require_schema();
  var errors_1 = require_errors6();
  var STSServiceException_1 = require_STSServiceException();
  var _s_registry = schema_1.TypeRegistry.for(_s);
  exports.STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
  _s_registry.registerError(exports.STSServiceException$, STSServiceException_1.STSServiceException);
  var n0_registry = schema_1.TypeRegistry.for(n0);
  exports.ExpiredTokenException$ = [
    -3,
    n0,
    _ETE,
    { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(exports.ExpiredTokenException$, errors_1.ExpiredTokenException);
  exports.IDPCommunicationErrorException$ = [
    -3,
    n0,
    _IDPCEE,
    { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(exports.IDPCommunicationErrorException$, errors_1.IDPCommunicationErrorException);
  exports.IDPRejectedClaimException$ = [
    -3,
    n0,
    _IDPRCE,
    { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  n0_registry.registerError(exports.IDPRejectedClaimException$, errors_1.IDPRejectedClaimException);
  exports.InvalidIdentityTokenException$ = [
    -3,
    n0,
    _IITE,
    { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(exports.InvalidIdentityTokenException$, errors_1.InvalidIdentityTokenException);
  exports.MalformedPolicyDocumentException$ = [
    -3,
    n0,
    _MPDE,
    { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(exports.MalformedPolicyDocumentException$, errors_1.MalformedPolicyDocumentException);
  exports.PackedPolicyTooLargeException$ = [
    -3,
    n0,
    _PPTLE,
    { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(exports.PackedPolicyTooLargeException$, errors_1.PackedPolicyTooLargeException);
  exports.RegionDisabledException$ = [
    -3,
    n0,
    _RDE,
    { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  n0_registry.registerError(exports.RegionDisabledException$, errors_1.RegionDisabledException);
  exports.errorTypeRegistries = [_s_registry, n0_registry];
  var accessKeySecretType = [0, n0, _aKST, 8, 0];
  var clientTokenType = [0, n0, _cTT, 8, 0];
  exports.AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2];
  exports.AssumeRoleRequest$ = [
    3,
    n0,
    _ARR,
    0,
    [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
    [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
    2
  ];
  exports.AssumeRoleResponse$ = [
    3,
    n0,
    _ARRs,
    0,
    [_C, _ARU, _PPS, _SI],
    [[() => exports.Credentials$, 0], () => exports.AssumedRoleUser$, 1, 0]
  ];
  exports.AssumeRoleWithWebIdentityRequest$ = [
    3,
    n0,
    _ARWWIR,
    0,
    [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
    [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
    3
  ];
  exports.AssumeRoleWithWebIdentityResponse$ = [
    3,
    n0,
    _ARWWIRs,
    0,
    [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
    [[() => exports.Credentials$, 0], 0, () => exports.AssumedRoleUser$, 1, 0, 0, 0]
  ];
  exports.Credentials$ = [
    3,
    n0,
    _C,
    0,
    [_AKI, _SAK, _ST, _E],
    [0, [() => accessKeySecretType, 0], 0, 4],
    4
  ];
  exports.PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
  exports.ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
  exports.Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2];
  var policyDescriptorListType = [1, n0, _pDLT, 0, () => exports.PolicyDescriptorType$];
  var ProvidedContextsListType = [1, n0, _PCLT, 0, () => exports.ProvidedContext$];
  var tagKeyListType = 64 | 0;
  var tagListType = [1, n0, _tLT, 0, () => exports.Tag$];
  exports.AssumeRole$ = [9, n0, _AR, 0, () => exports.AssumeRoleRequest$, () => exports.AssumeRoleResponse$];
  exports.AssumeRoleWithWebIdentity$ = [
    9,
    n0,
    _ARWWI,
    0,
    () => exports.AssumeRoleWithWebIdentityRequest$,
    () => exports.AssumeRoleWithWebIdentityResponse$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js
var require_runtimeConfig_shared6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getRuntimeConfig = undefined;
  var httpAuthSchemes_1 = require_httpAuthSchemes();
  var protocols_1 = require_protocols2();
  var core_1 = require_dist_cjs5();
  var smithy_client_1 = require_dist_cjs48();
  var url_parser_1 = require_dist_cjs34();
  var util_base64_1 = require_dist_cjs57();
  var util_utf8_1 = require_dist_cjs53();
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider6();
  var endpointResolver_1 = require_endpointResolver6();
  var schemas_0_1 = require_schemas_06();
  var getRuntimeConfig = (config) => {
    return {
      apiVersion: "2011-06-15",
      base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
      base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new httpAuthSchemes_1.AwsSdkSigV4Signer
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new core_1.NoAuthSigner
        }
      ],
      logger: config?.logger ?? new smithy_client_1.NoOpLogger,
      protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.sts",
        errorTypeRegistries: schemas_0_1.errorTypeRegistries,
        xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
        version: "2011-06-15",
        serviceTarget: "AWSSecurityTokenServiceV20110615"
      },
      serviceId: config?.serviceId ?? "STS",
      urlParser: config?.urlParser ?? url_parser_1.parseUrl,
      utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js
var require_runtimeConfig6 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getRuntimeConfig = undefined;
  var tslib_1 = require_tslib();
  var package_json_1 = tslib_1.__importDefault(require_package7());
  var client_1 = require_client4();
  var httpAuthSchemes_1 = require_httpAuthSchemes();
  var util_user_agent_node_1 = require_dist_cjs50();
  var config_resolver_1 = require_dist_cjs41();
  var core_1 = require_dist_cjs5();
  var hash_node_1 = require_dist_cjs54();
  var middleware_retry_1 = require_dist_cjs49();
  var node_config_provider_1 = require_dist_cjs43();
  var node_http_handler_1 = require_dist_cjs9();
  var smithy_client_1 = require_dist_cjs48();
  var util_body_length_node_1 = require_dist_cjs55();
  var util_defaults_mode_node_1 = require_dist_cjs56();
  var util_retry_1 = require_dist_cjs37();
  var runtimeConfig_shared_1 = require_runtimeConfig_shared6();
  var getRuntimeConfig = (config) => {
    (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
    const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
    const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
    const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
    (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
          signer: new httpAuthSchemes_1.AwsSdkSigV4Signer
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new core_1.NoAuthSigner
        }
      ],
      maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
        ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+region-config-resolver@3.972.11/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js
var require_stsRegionDefaultResolver = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.warning = undefined;
  exports.stsRegionDefaultResolver = stsRegionDefaultResolver;
  var config_resolver_1 = require_dist_cjs41();
  var node_config_provider_1 = require_dist_cjs43();
  function stsRegionDefaultResolver(loaderConfig = {}) {
    return (0, node_config_provider_1.loadConfig)({
      ...config_resolver_1.NODE_REGION_CONFIG_OPTIONS,
      async default() {
        if (!exports.warning.silence) {
          console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
        }
        return "us-east-1";
      }
    }, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
  }
  exports.warning = {
    silence: false
  };
});

// ../../node_modules/.pnpm/@aws-sdk+region-config-resolver@3.972.11/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js
var require_dist_cjs58 = __commonJS((exports) => {
  var stsRegionDefaultResolver = require_stsRegionDefaultResolver();
  var configResolver = require_dist_cjs41();
  var getAwsRegionExtensionConfiguration = (runtimeConfig) => {
    return {
      setRegion(region) {
        runtimeConfig.region = region;
      },
      region() {
        return runtimeConfig.region;
      }
    };
  };
  var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
    return {
      region: awsRegionExtensionConfiguration.region()
    };
  };
  exports.NODE_REGION_CONFIG_FILE_OPTIONS = configResolver.NODE_REGION_CONFIG_FILE_OPTIONS;
  exports.NODE_REGION_CONFIG_OPTIONS = configResolver.NODE_REGION_CONFIG_OPTIONS;
  exports.REGION_ENV_NAME = configResolver.REGION_ENV_NAME;
  exports.REGION_INI_NAME = configResolver.REGION_INI_NAME;
  exports.resolveRegionConfig = configResolver.resolveRegionConfig;
  exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration;
  exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration;
  Object.prototype.hasOwnProperty.call(stsRegionDefaultResolver, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: stsRegionDefaultResolver["__proto__"]
  });
  Object.keys(stsRegionDefaultResolver).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = stsRegionDefaultResolver[k2];
  });
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js
var require_httpAuthExtensionConfiguration = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = undefined;
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeExtensions.js
var require_runtimeExtensions = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.resolveRuntimeExtensions = undefined;
  var region_config_resolver_1 = require_dist_cjs58();
  var protocol_http_1 = require_dist_cjs28();
  var smithy_client_1 = require_dist_cjs48();
  var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration();
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
  };
  exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js
var require_STSClient = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.STSClient = exports.__Client = undefined;
  var middleware_host_header_1 = require_dist_cjs29();
  var middleware_logger_1 = require_dist_cjs30();
  var middleware_recursion_detection_1 = require_dist_cjs31();
  var middleware_user_agent_1 = require_dist_cjs38();
  var config_resolver_1 = require_dist_cjs41();
  var core_1 = require_dist_cjs5();
  var schema_1 = require_schema();
  var middleware_content_length_1 = require_dist_cjs42();
  var middleware_endpoint_1 = require_dist_cjs45();
  var middleware_retry_1 = require_dist_cjs49();
  var smithy_client_1 = require_dist_cjs48();
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function() {
    return smithy_client_1.Client;
  } });
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider6();
  var EndpointParameters_1 = require_EndpointParameters();
  var runtimeConfig_1 = require_runtimeConfig6();
  var runtimeExtensions_1 = require_runtimeExtensions();

  class STSClient extends smithy_client_1.Client {
    config;
    constructor(...[configuration]) {
      const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
      const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
      const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
      const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
      const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
      const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
      const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
      const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use((0, schema_1.getSchemaSerdePlugin)(this.config));
      this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
      this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
      this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
      this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
      this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
      this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
      this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
        httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
    }
    destroy() {
      super.destroy();
    }
  }
  exports.STSClient = STSClient;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.996.19/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js
var require_sts2 = __commonJS((exports) => {
  var STSClient = require_STSClient();
  var smithyClient = require_dist_cjs48();
  var middlewareEndpoint = require_dist_cjs45();
  var EndpointParameters = require_EndpointParameters();
  var schemas_0 = require_schemas_06();
  var errors = require_errors6();
  var client = require_client4();
  var regionConfigResolver = require_dist_cjs58();
  var STSServiceException = require_STSServiceException();

  class AssumeRoleCommand extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(schemas_0.AssumeRole$).build() {
  }

  class AssumeRoleWithWebIdentityCommand extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(schemas_0.AssumeRoleWithWebIdentity$).build() {
  }
  var commands = {
    AssumeRoleCommand,
    AssumeRoleWithWebIdentityCommand
  };

  class STS extends STSClient.STSClient {
  }
  smithyClient.createAggregatedClient(commands, STS);
  var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
    if (typeof assumedRoleUser?.Arn === "string") {
      const arnComponents = assumedRoleUser.Arn.split(":");
      if (arnComponents.length > 4 && arnComponents[4] !== "") {
        return arnComponents[4];
      }
    }
    return;
  };
  var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
    const region = typeof _region === "function" ? await _region() : _region;
    const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
    let stsDefaultRegion = "";
    const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
    credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
    return resolvedRegion;
  };
  var getDefaultRoleAssumer$1 = (stsOptions, STSClient2) => {
    let stsClient;
    let closureSourceCreds;
    return async (sourceCreds, params) => {
      closureSourceCreds = sourceCreds;
      if (!stsClient) {
        const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
        const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
          logger,
          profile
        });
        const isCompatibleRequestHandler = !isH2(requestHandler);
        stsClient = new STSClient2({
          ...stsOptions,
          userAgentAppId,
          profile,
          credentialDefaultProvider: () => async () => closureSourceCreds,
          region: resolvedRegion,
          requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
          logger
        });
      }
      const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
      if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
        throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
      }
      const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
      const credentials = {
        accessKeyId: Credentials.AccessKeyId,
        secretAccessKey: Credentials.SecretAccessKey,
        sessionToken: Credentials.SessionToken,
        expiration: Credentials.Expiration,
        ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
        ...accountId && { accountId }
      };
      client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
      return credentials;
    };
  };
  var getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient2) => {
    let stsClient;
    return async (params) => {
      if (!stsClient) {
        const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
        const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
          logger,
          profile
        });
        const isCompatibleRequestHandler = !isH2(requestHandler);
        stsClient = new STSClient2({
          ...stsOptions,
          userAgentAppId,
          profile,
          region: resolvedRegion,
          requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
          logger
        });
      }
      const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
      if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
        throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
      }
      const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
      const credentials = {
        accessKeyId: Credentials.AccessKeyId,
        secretAccessKey: Credentials.SecretAccessKey,
        sessionToken: Credentials.SessionToken,
        expiration: Credentials.Expiration,
        ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
        ...accountId && { accountId }
      };
      if (accountId) {
        client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
      }
      client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
      return credentials;
    };
  };
  var isH2 = (requestHandler) => {
    return requestHandler?.metadata?.handlerProtocol === "h2";
  };
  var getCustomizableStsClientCtor = (baseCtor, customizations) => {
    if (!customizations)
      return baseCtor;
    else
      return class CustomizableSTSClient extends baseCtor {
        constructor(config) {
          super(config);
          for (const customization of customizations) {
            this.middlewareStack.use(customization);
          }
        }
      };
  };
  var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
  var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
  var decorateDefaultCredentialProvider = (provider) => (input) => provider({
    roleAssumer: getDefaultRoleAssumer(input),
    roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
    ...input
  });
  exports.$Command = smithyClient.Command;
  exports.STSServiceException = STSServiceException.STSServiceException;
  exports.AssumeRoleCommand = AssumeRoleCommand;
  exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
  exports.STS = STS;
  exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
  exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
  exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
  Object.prototype.hasOwnProperty.call(STSClient, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: STSClient["__proto__"]
  });
  Object.keys(STSClient).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = STSClient[k2];
  });
  Object.prototype.hasOwnProperty.call(schemas_0, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: schemas_0["__proto__"]
  });
  Object.keys(schemas_0).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = schemas_0[k2];
  });
  Object.prototype.hasOwnProperty.call(errors, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: errors["__proto__"]
  });
  Object.keys(errors).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = errors[k2];
  });
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.972.29/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js
var require_fromWebToken2 = __commonJS((exports) => {
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k2, k22) {
    if (k22 === undefined)
      k22 = k2;
    var desc2 = Object.getOwnPropertyDescriptor(m2, k2);
    if (!desc2 || ("get" in desc2 ? !m2.__esModule : desc2.writable || desc2.configurable)) {
      desc2 = { enumerable: true, get: function() {
        return m2[k2];
      } };
    }
    Object.defineProperty(o, k22, desc2);
  } : function(o, m2, k2, k22) {
    if (k22 === undefined)
      k22 = k2;
    o[k22] = m2[k2];
  });
  var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
    Object.defineProperty(o, "default", { enumerable: true, value: v2 });
  } : function(o, v2) {
    o["default"] = v2;
  });
  var __importStar = exports && exports.__importStar || function() {
    var ownKeys = function(o) {
      ownKeys = Object.getOwnPropertyNames || function(o2) {
        var ar = [];
        for (var k2 in o2)
          if (Object.prototype.hasOwnProperty.call(o2, k2))
            ar[ar.length] = k2;
        return ar;
      };
      return ownKeys(o);
    };
    return function(mod) {
      if (mod && mod.__esModule)
        return mod;
      var result = {};
      if (mod != null) {
        for (var k2 = ownKeys(mod), i = 0;i < k2.length; i++)
          if (k2[i] !== "default")
            __createBinding(result, mod, k2[i]);
      }
      __setModuleDefault(result, mod);
      return result;
    };
  }();
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.fromWebToken = undefined;
  var fromWebToken = (init4) => async (awsIdentityProperties) => {
    init4.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
    const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init4;
    let { roleAssumerWithWebIdentity } = init4;
    if (!roleAssumerWithWebIdentity) {
      const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require_sts2()));
      roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
        ...init4.clientConfig,
        credentialProviderLogger: init4.logger,
        parentClientConfig: {
          ...awsIdentityProperties?.callerClientConfig,
          ...init4.parentClientConfig
        }
      }, init4.clientPlugins);
    }
    return roleAssumerWithWebIdentity({
      RoleArn: roleArn,
      RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
      WebIdentityToken: webIdentityToken,
      ProviderId: providerId,
      PolicyArns: policyArns,
      Policy: policy,
      DurationSeconds: durationSeconds
    });
  };
  exports.fromWebToken = fromWebToken;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.972.29/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js
var require_fromTokenFile2 = __commonJS((exports) => {
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.fromTokenFile = undefined;
  var client_1 = require_client4();
  var property_provider_1 = require_dist_cjs26();
  var shared_ini_file_loader_1 = require_dist_cjs27();
  var node_fs_1 = __require("node:fs");
  var fromWebToken_1 = require_fromWebToken2();
  var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
  var ENV_ROLE_ARN = "AWS_ROLE_ARN";
  var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
  var fromTokenFile = (init4 = {}) => async (awsIdentityProperties) => {
    init4.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
    const webIdentityTokenFile = init4?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
    const roleArn = init4?.roleArn ?? process.env[ENV_ROLE_ARN];
    const roleSessionName = init4?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
    if (!webIdentityTokenFile || !roleArn) {
      throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", {
        logger: init4.logger
      });
    }
    const credentials = await (0, fromWebToken_1.fromWebToken)({
      ...init4,
      webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
      roleArn,
      roleSessionName
    })(awsIdentityProperties);
    if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
      (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
    }
    return credentials;
  };
  exports.fromTokenFile = fromTokenFile;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.972.29/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js
var require_dist_cjs59 = __commonJS((exports) => {
  var fromTokenFile = require_fromTokenFile2();
  var fromWebToken = require_fromWebToken2();
  Object.prototype.hasOwnProperty.call(fromTokenFile, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: fromTokenFile["__proto__"]
  });
  Object.keys(fromTokenFile).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = fromTokenFile[k2];
  });
  Object.prototype.hasOwnProperty.call(fromWebToken, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
    enumerable: true,
    value: fromWebToken["__proto__"]
  });
  Object.keys(fromWebToken).forEach(function(k2) {
    if (k2 !== "default" && !Object.prototype.hasOwnProperty.call(exports, k2))
      exports[k2] = fromWebToken[k2];
  });
});

// ../../node_modules/.pnpm/@vercel+oidc@3.0.4/node_modules/@vercel/oidc/dist/get-context.js
var require_get_context = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var get_context_exports = {};
  __export3(get_context_exports, {
    SYMBOL_FOR_REQ_CONTEXT: () => SYMBOL_FOR_REQ_CONTEXT,
    getContext: () => getContext3
  });
  module.exports = __toCommonJS(get_context_exports);
  var SYMBOL_FOR_REQ_CONTEXT = Symbol.for("@vercel/request-context");
  function getContext3() {
    const fromSymbol = globalThis;
    return fromSymbol[SYMBOL_FOR_REQ_CONTEXT]?.get?.() ?? {};
  }
});

// ../../node_modules/.pnpm/@vercel+oidc@3.0.4/node_modules/@vercel/oidc/dist/token-error.js
var require_token_error = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var token_error_exports = {};
  __export3(token_error_exports, {
    VercelOidcTokenError: () => VercelOidcTokenError
  });
  module.exports = __toCommonJS(token_error_exports);

  class VercelOidcTokenError extends Error {
    constructor(message, cause) {
      super(message);
      this.name = "VercelOidcTokenError";
      this.cause = cause;
    }
    toString() {
      if (this.cause) {
        return `${this.name}: ${this.message}: ${this.cause}`;
      }
      return `${this.name}: ${this.message}`;
    }
  }
});

// ../../node_modules/.pnpm/@vercel+oidc@3.0.4/node_modules/@vercel/oidc/dist/token-io.js
var require_token_io = __commonJS((exports, module) => {
  var __create2 = Object.create;
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __getProtoOf2 = Object.getPrototypeOf;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod));
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var token_io_exports = {};
  __export3(token_io_exports, {
    findRootDir: () => findRootDir,
    getUserDataDir: () => getUserDataDir
  });
  module.exports = __toCommonJS(token_io_exports);
  var import_path2 = __toESM2(__require("path"));
  var import_fs = __toESM2(__require("fs"));
  var import_os = __toESM2(__require("os"));
  var import_token_error = require_token_error();
  function findRootDir() {
    try {
      let dir = process.cwd();
      while (dir !== import_path2.default.dirname(dir)) {
        const pkgPath = import_path2.default.join(dir, ".vercel");
        if (import_fs.default.existsSync(pkgPath)) {
          return dir;
        }
        dir = import_path2.default.dirname(dir);
      }
    } catch (e) {
      throw new import_token_error.VercelOidcTokenError("Token refresh only supported in node server environments");
    }
    throw new import_token_error.VercelOidcTokenError("Unable to find root directory");
  }
  function getUserDataDir() {
    if (process.env.XDG_DATA_HOME) {
      return process.env.XDG_DATA_HOME;
    }
    switch (import_os.default.platform()) {
      case "darwin":
        return import_path2.default.join(import_os.default.homedir(), "Library/Application Support");
      case "linux":
        return import_path2.default.join(import_os.default.homedir(), ".local/share");
      case "win32":
        if (process.env.LOCALAPPDATA) {
          return process.env.LOCALAPPDATA;
        }
        return null;
      default:
        return null;
    }
  }
});

// ../../node_modules/.pnpm/@vercel+oidc@3.0.4/node_modules/@vercel/oidc/dist/token-util.js
var require_token_util = __commonJS((exports, module) => {
  var __create2 = Object.create;
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __getProtoOf2 = Object.getPrototypeOf;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod));
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var token_util_exports = {};
  __export3(token_util_exports, {
    assertVercelOidcTokenResponse: () => assertVercelOidcTokenResponse,
    findProjectInfo: () => findProjectInfo,
    getTokenPayload: () => getTokenPayload,
    getVercelCliToken: () => getVercelCliToken,
    getVercelDataDir: () => getVercelDataDir,
    getVercelOidcToken: () => getVercelOidcToken2,
    isExpired: () => isExpired,
    loadToken: () => loadToken,
    saveToken: () => saveToken
  });
  module.exports = __toCommonJS(token_util_exports);
  var path2 = __toESM2(__require("path"));
  var fs2 = __toESM2(__require("fs"));
  var import_token_error = require_token_error();
  var import_token_io = require_token_io();
  function getVercelDataDir() {
    const vercelFolder = "com.vercel.cli";
    const dataDir = (0, import_token_io.getUserDataDir)();
    if (!dataDir) {
      return null;
    }
    return path2.join(dataDir, vercelFolder);
  }
  function getVercelCliToken() {
    const dataDir = getVercelDataDir();
    if (!dataDir) {
      return null;
    }
    const tokenPath = path2.join(dataDir, "auth.json");
    if (!fs2.existsSync(tokenPath)) {
      return null;
    }
    const token = fs2.readFileSync(tokenPath, "utf8");
    if (!token) {
      return null;
    }
    return JSON.parse(token).token;
  }
  async function getVercelOidcToken2(authToken, projectId, teamId) {
    try {
      const url = `https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId ? `&teamId=${teamId}` : ""}`;
      const res = await fetch(url, {
        method: "POST",
        headers: {
          Authorization: `Bearer ${authToken}`
        }
      });
      if (!res.ok) {
        throw new import_token_error.VercelOidcTokenError(`Failed to refresh OIDC token: ${res.statusText}`);
      }
      const tokenRes = await res.json();
      assertVercelOidcTokenResponse(tokenRes);
      return tokenRes;
    } catch (e) {
      throw new import_token_error.VercelOidcTokenError(`Failed to refresh OIDC token`, e);
    }
  }
  function assertVercelOidcTokenResponse(res) {
    if (!res || typeof res !== "object") {
      throw new TypeError("Expected an object");
    }
    if (!("token" in res) || typeof res.token !== "string") {
      throw new TypeError("Expected a string-valued token property");
    }
  }
  function findProjectInfo() {
    const dir = (0, import_token_io.findRootDir)();
    if (!dir) {
      throw new import_token_error.VercelOidcTokenError("Unable to find root directory");
    }
    try {
      const prjPath = path2.join(dir, ".vercel", "project.json");
      if (!fs2.existsSync(prjPath)) {
        throw new import_token_error.VercelOidcTokenError("project.json not found");
      }
      const prj = JSON.parse(fs2.readFileSync(prjPath, "utf8"));
      if (typeof prj.projectId !== "string" && typeof prj.orgId !== "string") {
        throw new TypeError("Expected a string-valued projectId property");
      }
      return { projectId: prj.projectId, teamId: prj.orgId };
    } catch (e) {
      throw new import_token_error.VercelOidcTokenError(`Unable to find project ID`, e);
    }
  }
  function saveToken(token, projectId) {
    try {
      const dir = (0, import_token_io.getUserDataDir)();
      if (!dir) {
        throw new import_token_error.VercelOidcTokenError("Unable to find user data directory");
      }
      const tokenPath = path2.join(dir, "com.vercel.token", `${projectId}.json`);
      const tokenJson = JSON.stringify(token);
      fs2.mkdirSync(path2.dirname(tokenPath), { mode: 504, recursive: true });
      fs2.writeFileSync(tokenPath, tokenJson);
      fs2.chmodSync(tokenPath, 432);
      return;
    } catch (e) {
      throw new import_token_error.VercelOidcTokenError(`Failed to save token`, e);
    }
  }
  function loadToken(projectId) {
    try {
      const dir = (0, import_token_io.getUserDataDir)();
      if (!dir) {
        return null;
      }
      const tokenPath = path2.join(dir, "com.vercel.token", `${projectId}.json`);
      if (!fs2.existsSync(tokenPath)) {
        return null;
      }
      const token = JSON.parse(fs2.readFileSync(tokenPath, "utf8"));
      assertVercelOidcTokenResponse(token);
      return token;
    } catch (e) {
      throw new import_token_error.VercelOidcTokenError(`Failed to load token`, e);
    }
  }
  function getTokenPayload(token) {
    const tokenParts = token.split(".");
    if (tokenParts.length !== 3) {
      throw new import_token_error.VercelOidcTokenError("Invalid token");
    }
    const base64 = tokenParts[1].replace(/-/g, "+").replace(/_/g, "/");
    const padded = base64.padEnd(base64.length + (4 - base64.length % 4) % 4, "=");
    return JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
  }
  var TIME_15_MINUTES_IN_MS = 15 * 60 * 1000;
  function isExpired(token) {
    return token.exp * 1000 < Date.now() + TIME_15_MINUTES_IN_MS;
  }
});

// ../../node_modules/.pnpm/@vercel+oidc@3.0.4/node_modules/@vercel/oidc/dist/token.js
var require_token = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var token_exports = {};
  __export3(token_exports, {
    refreshToken: () => refreshToken
  });
  module.exports = __toCommonJS(token_exports);
  var import_token_error = require_token_error();
  var import_token_util = require_token_util();
  async function refreshToken() {
    const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
    let maybeToken = (0, import_token_util.loadToken)(projectId);
    if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
      const authToken = (0, import_token_util.getVercelCliToken)();
      if (!authToken) {
        throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token: login to vercel cli");
      }
      if (!projectId) {
        throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token: project id not found");
      }
      maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
      if (!maybeToken) {
        throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
      }
      (0, import_token_util.saveToken)(maybeToken, projectId);
    }
    process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
    return;
  }
});

// ../../node_modules/.pnpm/@vercel+oidc@3.0.4/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js
var require_get_vercel_oidc_token = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var get_vercel_oidc_token_exports = {};
  __export3(get_vercel_oidc_token_exports, {
    getVercelOidcToken: () => getVercelOidcToken2,
    getVercelOidcTokenSync: () => getVercelOidcTokenSync2
  });
  module.exports = __toCommonJS(get_vercel_oidc_token_exports);
  var import_get_context = require_get_context();
  var import_token_error = require_token_error();
  async function getVercelOidcToken2() {
    let token = "";
    let err;
    try {
      token = getVercelOidcTokenSync2();
    } catch (error2) {
      err = error2;
    }
    try {
      const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
        await Promise.resolve().then(() => __toESM(require_token_util())),
        await Promise.resolve().then(() => __toESM(require_token()))
      ]);
      if (!token || isExpired(getTokenPayload(token))) {
        await refreshToken();
        token = getVercelOidcTokenSync2();
      }
    } catch (error2) {
      if (err?.message && error2 instanceof Error) {
        error2.message = `${err.message}
${error2.message}`;
      }
      throw new import_token_error.VercelOidcTokenError(`Failed to refresh OIDC token`, error2);
    }
    return token;
  }
  function getVercelOidcTokenSync2() {
    const token = (0, import_get_context.getContext)().headers?.["x-vercel-oidc-token"] ?? process.env.VERCEL_OIDC_TOKEN;
    if (!token) {
      throw new Error(`The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?`);
    }
    return token;
  }
});

// ../../node_modules/.pnpm/@vercel+oidc@3.0.4/node_modules/@vercel/oidc/dist/index.js
var require_dist2 = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var src_exports = {};
  __export3(src_exports, {
    getContext: () => import_get_context.getContext,
    getVercelOidcToken: () => import_get_vercel_oidc_token.getVercelOidcToken,
    getVercelOidcTokenSync: () => import_get_vercel_oidc_token.getVercelOidcTokenSync
  });
  module.exports = __toCommonJS(src_exports);
  var import_get_vercel_oidc_token = require_get_vercel_oidc_token();
  var import_get_context = require_get_context();
});

// ../../node_modules/.pnpm/@vercel+oidc-aws-credentials-provider@3.0.4/node_modules/@vercel/oidc-aws-credentials-provider/dist/aws-credentials-provider.js
var require_aws_credentials_provider = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var aws_credentials_provider_exports = {};
  __export3(aws_credentials_provider_exports, {
    awsCredentialsProvider: () => awsCredentialsProvider2
  });
  module.exports = __toCommonJS(aws_credentials_provider_exports);
  var import_credential_provider_web_identity = require_dist_cjs59();
  var import_oidc = require_dist2();
  function awsCredentialsProvider2(init4) {
    return async () => {
      return (0, import_credential_provider_web_identity.fromWebToken)({
        ...init4,
        webIdentityToken: (0, import_oidc.getVercelOidcTokenSync)()
      })();
    };
  }
});

// ../../node_modules/.pnpm/@vercel+oidc-aws-credentials-provider@3.0.4/node_modules/@vercel/oidc-aws-credentials-provider/dist/index.js
var require_dist3 = __commonJS((exports, module) => {
  var __defProp3 = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  var __export3 = (target, all) => {
    for (var name in all)
      __defProp3(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except2, desc2) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames2(from))
        if (!__hasOwnProp2.call(to, key) && key !== except2)
          __defProp3(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
  var src_exports = {};
  __export3(src_exports, {
    awsCredentialsProvider: () => import_aws_credentials_provider.awsCredentialsProvider
  });
  module.exports = __toCommonJS(src_exports);
  var import_aws_credentials_provider = require_aws_credentials_provider();
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/createCredentialChain.js
var require_createCredentialChain = __commonJS((exports) => {
  var { ProviderError } = require_config2();
  exports.createCredentialChain = (...credentialProviders) => {
    let expireAfter = -1;
    const baseFunction = async (awsIdentityProperties) => {
      const credentials = await propertyProviderChain(...credentialProviders)(awsIdentityProperties);
      if (!credentials.expiration && expireAfter !== -1) {
        credentials.expiration = new Date(Date.now() + expireAfter);
      }
      return credentials;
    };
    const withOptions = Object.assign(baseFunction, {
      expireAfter(milliseconds) {
        if (milliseconds < 5 * 60000) {
          throw new Error("@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.");
        }
        expireAfter = milliseconds;
        return withOptions;
      }
    });
    return withOptions;
  };
  var propertyProviderChain = (...providers) => async (awsIdentityProperties) => {
    if (providers.length === 0) {
      throw new ProviderError("No providers in chain", { tryNextLink: false });
    }
    let lastProviderError;
    for (const provider of providers) {
      try {
        return await provider(awsIdentityProperties);
      } catch (err) {
        lastProviderError = err;
        if (err?.tryNextLink) {
          continue;
        }
        throw err;
      }
    }
    throw lastProviderError;
  };
  exports.propertyProviderChain = propertyProviderChain;
});

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.23/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js
var require_cognito_identity = __commonJS((exports) => {
  var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs5();
  var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config2();
  var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { parseUrl: parseUrl2, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry();
  var { TypeRegistry, getSchemaSerdePlugin } = require_schema();
  var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require_serde();
  var { streamCollector, NodeHttpHandler: NodeHttpHandler2 } = require_dist_cjs9();
  var { AwsJson1_1Protocol } = require_protocols2();
  var defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "cognito-identity",
        region: authParameters.region
      },
      propertiesExtractor: (config, context10) => ({
        signingProperties: {
          config,
          context: context10
        }
      })
    };
  }
  function createSmithyApiNoAuthHttpAuthOption(authParameters) {
    return {
      schemeId: "smithy.api#noAuth"
    };
  }
  var defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {
    const options = [];
    switch (authParameters.operation) {
      case "GetCredentialsForIdentity": {
        options.push(createSmithyApiNoAuthHttpAuthOption());
        break;
      }
      case "GetId": {
        options.push(createSmithyApiNoAuthHttpAuthOption());
        break;
      }
      default: {
        options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options;
  };
  var resolveHttpAuthSchemeConfig = (config) => {
    const config_0 = resolveAwsSdkSigV4Config(config);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
    });
  };
  var resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
      useDualstackEndpoint: options.useDualstackEndpoint ?? false,
      useFipsEndpoint: options.useFipsEndpoint ?? false,
      defaultSigningName: "cognito-identity"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var version3 = "3.997.22";
  var packageInfo = {
    version: version3
  };
  var m2 = "ref";
  var a = -1;
  var b2 = true;
  var c = "isSet";
  var d2 = "PartitionResult";
  var e = "booleanEquals";
  var f2 = "getAttr";
  var g2 = "stringEquals";
  var h2 = { [m2]: "Endpoint" };
  var i = { [m2]: d2 };
  var j = { [m2]: "Region" };
  var k2 = {};
  var l = [j];
  var _data = {
    conditions: [
      [c, [h2]],
      [c, l],
      ["aws.partition", l, d2],
      [e, [{ [m2]: "UseFIPS" }, b2]],
      [e, [{ fn: f2, argv: [i, "supportsFIPS"] }, b2]],
      [e, [{ [m2]: "UseDualStack" }, b2]],
      [e, [{ fn: f2, argv: [i, "supportsDualStack"] }, b2]],
      [g2, [{ fn: f2, argv: [i, "name"] }, "aws"]],
      [g2, [j, "us-east-1"]],
      [g2, [j, "us-east-2"]],
      [g2, [j, "us-west-1"]],
      [g2, [j, "us-west-2"]]
    ],
    results: [
      [a],
      [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [h2, k2],
      ["https://cognito-identity-fips.us-east-1.amazonaws.com", k2],
      ["https://cognito-identity-fips.us-east-2.amazonaws.com", k2],
      ["https://cognito-identity-fips.us-west-1.amazonaws.com", k2],
      ["https://cognito-identity-fips.us-west-2.amazonaws.com", k2],
      ["https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k2],
      [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}", k2],
      [a, "FIPS is enabled but this partition does not support FIPS"],
      ["https://cognito-identity.{Region}.amazonaws.com", k2],
      ["https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}", k2],
      [a, "DualStack is enabled but this partition does not support DualStack"],
      ["https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}", k2],
      [a, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    17,
    3,
    1,
    4,
    r + 16,
    2,
    5,
    r + 16,
    3,
    9,
    6,
    5,
    7,
    r + 15,
    6,
    8,
    r + 14,
    7,
    r + 12,
    r + 13,
    4,
    11,
    10,
    5,
    r + 9,
    r + 11,
    5,
    12,
    r + 10,
    6,
    13,
    r + 9,
    8,
    r + 4,
    14,
    9,
    r + 5,
    15,
    10,
    r + 6,
    16,
    11,
    r + 7,
    r + 8,
    3,
    r + 1,
    18,
    5,
    r + 2,
    r + 3
  ]);
  var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
  var cache = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  var defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;

  class CognitoIdentityServiceException extends ServiceException {
    constructor(options) {
      super(options);
      Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);
    }
  }

  class ExternalServiceException extends CognitoIdentityServiceException {
    name = "ExternalServiceException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ExternalServiceException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExternalServiceException.prototype);
    }
  }

  class InternalErrorException extends CognitoIdentityServiceException {
    name = "InternalErrorException";
    $fault = "server";
    constructor(opts) {
      super({
        name: "InternalErrorException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InternalErrorException.prototype);
    }
  }

  class InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {
    name = "InvalidIdentityPoolConfigurationException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidIdentityPoolConfigurationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);
    }
  }

  class InvalidParameterException extends CognitoIdentityServiceException {
    name = "InvalidParameterException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidParameterException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidParameterException.prototype);
    }
  }

  class NotAuthorizedException extends CognitoIdentityServiceException {
    name = "NotAuthorizedException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "NotAuthorizedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, NotAuthorizedException.prototype);
    }
  }

  class ResourceConflictException extends CognitoIdentityServiceException {
    name = "ResourceConflictException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ResourceConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceConflictException.prototype);
    }
  }

  class ResourceNotFoundException extends CognitoIdentityServiceException {
    name = "ResourceNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ResourceNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
    }
  }

  class TooManyRequestsException extends CognitoIdentityServiceException {
    name = "TooManyRequestsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TooManyRequestsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TooManyRequestsException.prototype);
    }
  }

  class LimitExceededException extends CognitoIdentityServiceException {
    name = "LimitExceededException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "LimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, LimitExceededException.prototype);
    }
  }
  var _AI = "AccountId";
  var _AKI = "AccessKeyId";
  var _C = "Credentials";
  var _CRA = "CustomRoleArn";
  var _E = "Expiration";
  var _ESE = "ExternalServiceException";
  var _GCFI = "GetCredentialsForIdentity";
  var _GCFII = "GetCredentialsForIdentityInput";
  var _GCFIR = "GetCredentialsForIdentityResponse";
  var _GI = "GetId";
  var _GII = "GetIdInput";
  var _GIR = "GetIdResponse";
  var _IEE = "InternalErrorException";
  var _II = "IdentityId";
  var _IIPCE = "InvalidIdentityPoolConfigurationException";
  var _IPE = "InvalidParameterException";
  var _IPI = "IdentityPoolId";
  var _IPT = "IdentityProviderToken";
  var _L = "Logins";
  var _LEE = "LimitExceededException";
  var _LM = "LoginsMap";
  var _NAE = "NotAuthorizedException";
  var _RCE = "ResourceConflictException";
  var _RNFE = "ResourceNotFoundException";
  var _SK = "SecretKey";
  var _SKS = "SecretKeyString";
  var _ST = "SessionToken";
  var _TMRE = "TooManyRequestsException";
  var _c = "client";
  var _e = "error";
  var _hE = "httpError";
  var _m = "message";
  var _s = "smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity";
  var _se = "server";
  var n0 = "com.amazonaws.cognitoidentity";
  var _s_registry = TypeRegistry.for(_s);
  var CognitoIdentityServiceException$ = [-3, _s, "CognitoIdentityServiceException", 0, [], []];
  _s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var ExternalServiceException$ = [
    -3,
    n0,
    _ESE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(ExternalServiceException$, ExternalServiceException);
  var InternalErrorException$ = [
    -3,
    n0,
    _IEE,
    { [_e]: _se },
    [_m],
    [0]
  ];
  n0_registry.registerError(InternalErrorException$, InternalErrorException);
  var InvalidIdentityPoolConfigurationException$ = [
    -3,
    n0,
    _IIPCE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);
  var InvalidParameterException$ = [
    -3,
    n0,
    _IPE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(InvalidParameterException$, InvalidParameterException);
  var LimitExceededException$ = [
    -3,
    n0,
    _LEE,
    { [_e]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  n0_registry.registerError(LimitExceededException$, LimitExceededException);
  var NotAuthorizedException$ = [
    -3,
    n0,
    _NAE,
    { [_e]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  n0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);
  var ResourceConflictException$ = [
    -3,
    n0,
    _RCE,
    { [_e]: _c, [_hE]: 409 },
    [_m],
    [0]
  ];
  n0_registry.registerError(ResourceConflictException$, ResourceConflictException);
  var ResourceNotFoundException$ = [
    -3,
    n0,
    _RNFE,
    { [_e]: _c, [_hE]: 404 },
    [_m],
    [0]
  ];
  n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
  var TooManyRequestsException$ = [
    -3,
    n0,
    _TMRE,
    { [_e]: _c, [_hE]: 429 },
    [_m],
    [0]
  ];
  n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
  var errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var IdentityProviderToken = [0, n0, _IPT, 8, 0];
  var SecretKeyString = [0, n0, _SKS, 8, 0];
  var Credentials$ = [
    3,
    n0,
    _C,
    0,
    [_AKI, _SK, _ST, _E],
    [0, [() => SecretKeyString, 0], 0, 4]
  ];
  var GetCredentialsForIdentityInput$ = [
    3,
    n0,
    _GCFII,
    0,
    [_II, _L, _CRA],
    [0, [() => LoginsMap, 0], 0],
    1
  ];
  var GetCredentialsForIdentityResponse$ = [
    3,
    n0,
    _GCFIR,
    0,
    [_II, _C],
    [0, [() => Credentials$, 0]]
  ];
  var GetIdInput$ = [
    3,
    n0,
    _GII,
    0,
    [_IPI, _AI, _L],
    [0, 0, [() => LoginsMap, 0]],
    1
  ];
  var GetIdResponse$ = [
    3,
    n0,
    _GIR,
    0,
    [_II],
    [0]
  ];
  var LoginsMap = [
    2,
    n0,
    _LM,
    0,
    [
      0,
      0
    ],
    [
      () => IdentityProviderToken,
      0
    ]
  ];
  var GetCredentialsForIdentity$ = [
    9,
    n0,
    _GCFI,
    0,
    () => GetCredentialsForIdentityInput$,
    () => GetCredentialsForIdentityResponse$
  ];
  var GetId$ = [
    9,
    n0,
    _GI,
    0,
    () => GetIdInput$,
    () => GetIdResponse$
  ];
  var getRuntimeConfig$1 = (config) => {
    return {
      apiVersion: "2014-06-30",
      base64Decoder: config?.base64Decoder ?? fromBase64,
      base64Encoder: config?.base64Encoder ?? toBase64,
      disableHostPrefix: config?.disableHostPrefix ?? false,
      endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
      extensions: config?.extensions ?? [],
      httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCognitoIdentityHttpAuthSchemeProvider,
      httpAuthSchemes: config?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      logger: config?.logger ?? new NoOpLogger,
      protocol: config?.protocol ?? AwsJson1_1Protocol,
      protocolSettings: config?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.cognitoidentity",
        errorTypeRegistries,
        xmlNamespace: "http://cognito-identity.amazonaws.com/doc/2014-06-30/",
        version: "2014-06-30",
        serviceTarget: "AWSCognitoIdentityService"
      },
      serviceId: config?.serviceId ?? "Cognito Identity",
      urlParser: config?.urlParser ?? parseUrl2,
      utf8Decoder: config?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config?.utf8Encoder ?? toUtf8
    };
  };
  var getRuntimeConfig = (config) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getRuntimeConfig$1(config);
    emitWarningIfUnsupportedVersion$1(process.version);
    const loaderConfig = {
      profile: config?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
      defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
      region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: NodeHttpHandler2.create(config?.requestHandler ?? defaultConfigProvider),
      retryMode: config?.retryMode ?? loadConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config),
      sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
      streamCollector: config?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config) => {
    return {
      httpAuthSchemes: config.httpAuthSchemes(),
      httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
      credentials: config.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class CognitoIdentityClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class GetCredentialsForIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSCognitoIdentityService", "GetCredentialsForIdentity", {}).n("CognitoIdentityClient", "GetCredentialsForIdentityCommand").sc(GetCredentialsForIdentity$).build() {
  }

  class GetIdCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
    return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
  }).s("AWSCognitoIdentityService", "GetId", {}).n("CognitoIdentityClient", "GetIdCommand").sc(GetId$).build() {
  }
  var commands = {
    GetCredentialsForIdentityCommand,
    GetIdCommand
  };

  class CognitoIdentity extends CognitoIdentityClient {
  }
  createAggregatedClient(commands, CognitoIdentity);
  exports.CognitoIdentity = CognitoIdentity;
  exports.CognitoIdentityClient = CognitoIdentityClient;
  exports.CognitoIdentityServiceException = CognitoIdentityServiceException;
  exports.CognitoIdentityServiceException$ = CognitoIdentityServiceException$;
  exports.Credentials$ = Credentials$;
  exports.ExternalServiceException = ExternalServiceException;
  exports.ExternalServiceException$ = ExternalServiceException$;
  exports.GetCredentialsForIdentity$ = GetCredentialsForIdentity$;
  exports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand;
  exports.GetCredentialsForIdentityInput$ = GetCredentialsForIdentityInput$;
  exports.GetCredentialsForIdentityResponse$ = GetCredentialsForIdentityResponse$;
  exports.GetId$ = GetId$;
  exports.GetIdCommand = GetIdCommand;
  exports.GetIdInput$ = GetIdInput$;
  exports.GetIdResponse$ = GetIdResponse$;
  exports.InternalErrorException = InternalErrorException;
  exports.InternalErrorException$ = InternalErrorException$;
  exports.InvalidIdentityPoolConfigurationException = InvalidIdentityPoolConfigurationException;
  exports.InvalidIdentityPoolConfigurationException$ = InvalidIdentityPoolConfigurationException$;
  exports.InvalidParameterException = InvalidParameterException;
  exports.InvalidParameterException$ = InvalidParameterException$;
  exports.LimitExceededException = LimitExceededException;
  exports.LimitExceededException$ = LimitExceededException$;
  exports.NotAuthorizedException = NotAuthorizedException;
  exports.NotAuthorizedException$ = NotAuthorizedException$;
  exports.ResourceConflictException = ResourceConflictException;
  exports.ResourceConflictException$ = ResourceConflictException$;
  exports.ResourceNotFoundException = ResourceNotFoundException;
  exports.ResourceNotFoundException$ = ResourceNotFoundException$;
  exports.TooManyRequestsException = TooManyRequestsException;
  exports.TooManyRequestsException$ = TooManyRequestsException$;
  exports.errorTypeRegistries = errorTypeRegistries;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-cognito-identity@3.972.48/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/loadCognitoIdentity-v413cIIq.js
var require_loadCognitoIdentity_v413cIIq = __commonJS((exports) => {
  var { CognitoIdentityClient, GetCredentialsForIdentityCommand, GetIdCommand } = require_cognito_identity();
  exports.CognitoIdentityClient = CognitoIdentityClient;
  exports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand;
  exports.GetIdCommand = GetIdCommand;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-provider-cognito-identity@3.972.48/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js
var require_dist_cjs60 = __commonJS((exports) => {
  var { CredentialsProviderError } = require_config2();
  function resolveLogins(logins) {
    return Promise.all(Object.keys(logins).reduce((arr, name) => {
      const tokenOrProvider = logins[name];
      if (typeof tokenOrProvider === "string") {
        arr.push([name, tokenOrProvider]);
      } else {
        arr.push(tokenOrProvider().then((token) => [name, token]));
      }
      return arr;
    }, [])).then((resolvedPairs) => resolvedPairs.reduce((logins2, [key, value]) => {
      logins2[key] = value;
      return logins2;
    }, {}));
  }
  function fromCognitoIdentity(parameters) {
    return async (awsIdentityProperties) => {
      parameters.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");
      const { GetCredentialsForIdentityCommand, CognitoIdentityClient } = require_loadCognitoIdentity_v413cIIq();
      const fromConfigs = (property) => parameters.clientConfig?.[property] ?? parameters.parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property];
      const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters.logger), SessionToken } = throwOnMissingCredentials(parameters.logger) } = await (parameters.client ?? new CognitoIdentityClient(Object.assign({}, parameters.clientConfig ?? {}, {
        region: fromConfigs("region"),
        profile: fromConfigs("profile"),
        userAgentAppId: fromConfigs("userAgentAppId")
      }))).send(new GetCredentialsForIdentityCommand({
        CustomRoleArn: parameters.customRoleArn,
        IdentityId: parameters.identityId,
        Logins: parameters.logins ? await resolveLogins(parameters.logins) : undefined
      }));
      return {
        identityId: parameters.identityId,
        accessKeyId: AccessKeyId,
        secretAccessKey: SecretKey,
        sessionToken: SessionToken,
        expiration: Expiration
      };
    };
  }
  function throwOnMissingAccessKeyId(logger) {
    throw new CredentialsProviderError("Response from Amazon Cognito contained no access key ID", { logger });
  }
  function throwOnMissingCredentials(logger) {
    throw new CredentialsProviderError("Response from Amazon Cognito contained no credentials", { logger });
  }
  function throwOnMissingSecretKey(logger) {
    throw new CredentialsProviderError("Response from Amazon Cognito contained no secret key", { logger });
  }
  var STORE_NAME = "IdentityIds";

  class IndexedDbStorage {
    dbName;
    constructor(dbName = "aws:cognito-identity-ids") {
      this.dbName = dbName;
    }
    getItem(key) {
      return this.withObjectStore("readonly", (store) => {
        const req = store.get(key);
        return new Promise((resolve3) => {
          req.onerror = () => resolve3(null);
          req.onsuccess = () => resolve3(req.result ? req.result.value : null);
        });
      }).catch(() => null);
    }
    removeItem(key) {
      return this.withObjectStore("readwrite", (store) => {
        const req = store.delete(key);
        return new Promise((resolve3, reject) => {
          req.onerror = () => reject(req.error);
          req.onsuccess = () => resolve3();
        });
      });
    }
    setItem(id, value) {
      return this.withObjectStore("readwrite", (store) => {
        const req = store.put({ id, value });
        return new Promise((resolve3, reject) => {
          req.onerror = () => reject(req.error);
          req.onsuccess = () => resolve3();
        });
      });
    }
    getDb() {
      const openDbRequest = self.indexedDB.open(this.dbName, 1);
      return new Promise((resolve3, reject) => {
        openDbRequest.onsuccess = () => {
          resolve3(openDbRequest.result);
        };
        openDbRequest.onerror = () => {
          reject(openDbRequest.error);
        };
        openDbRequest.onblocked = () => {
          reject(new Error("Unable to access DB"));
        };
        openDbRequest.onupgradeneeded = () => {
          const db2 = openDbRequest.result;
          db2.onerror = () => {
            reject(new Error("Failed to create object store"));
          };
          db2.createObjectStore(STORE_NAME, { keyPath: "id" });
        };
      });
    }
    withObjectStore(mode, action) {
      return this.getDb().then((db2) => {
        const tx = db2.transaction(STORE_NAME, mode);
        tx.oncomplete = () => db2.close();
        return new Promise((resolve3, reject) => {
          tx.onerror = () => reject(tx.error);
          resolve3(action(tx.objectStore(STORE_NAME)));
        }).catch((err) => {
          db2.close();
          throw err;
        });
      });
    }
  }

  class InMemoryStorage {
    store;
    constructor(store = {}) {
      this.store = store;
    }
    getItem(key) {
      if (key in this.store) {
        return this.store[key];
      }
      return null;
    }
    removeItem(key) {
      delete this.store[key];
    }
    setItem(key, value) {
      this.store[key] = value;
    }
  }
  var inMemoryStorage = new InMemoryStorage;
  function localStorage2() {
    if (typeof self === "object" && self.indexedDB) {
      return new IndexedDbStorage;
    }
    if (typeof window === "object" && window.localStorage) {
      return window.localStorage;
    }
    return inMemoryStorage;
  }
  function fromCognitoIdentityPool({ accountId, cache = localStorage2(), client, clientConfig, customRoleArn, identityPoolId, logins, userIdentifier = !logins || Object.keys(logins).length === 0 ? "ANONYMOUS" : undefined, logger, parentClientConfig }) {
    logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");
    const cacheKey = userIdentifier ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}` : undefined;
    let provider = async (awsIdentityProperties) => {
      const { GetIdCommand, CognitoIdentityClient } = require_loadCognitoIdentity_v413cIIq();
      const fromConfigs = (property) => clientConfig?.[property] ?? parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property];
      const _client = client ?? new CognitoIdentityClient(Object.assign({}, clientConfig ?? {}, {
        region: fromConfigs("region"),
        profile: fromConfigs("profile"),
        userAgentAppId: fromConfigs("userAgentAppId")
      }));
      let identityId = cacheKey && await cache.getItem(cacheKey);
      if (!identityId) {
        const { IdentityId = throwOnMissingId(logger) } = await _client.send(new GetIdCommand({
          AccountId: accountId,
          IdentityPoolId: identityPoolId,
          Logins: logins ? await resolveLogins(logins) : undefined
        }));
        identityId = IdentityId;
        if (cacheKey) {
          Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => {});
        }
      }
      provider = fromCognitoIdentity({
        client: _client,
        customRoleArn,
        logins,
        identityId
      });
      return provider(awsIdentityProperties);
    };
    return (awsIdentityProperties) => provider(awsIdentityProperties).catch(async (err) => {
      if (cacheKey) {
        Promise.resolve(cache.removeItem(cacheKey)).catch(() => {});
      }
      throw err;
    });
  }
  function throwOnMissingId(logger) {
    throw new CredentialsProviderError("Response from Amazon Cognito contained no identity ID", { logger });
  }
  exports.fromCognitoIdentity = fromCognitoIdentity;
  exports.fromCognitoIdentityPool = fromCognitoIdentityPool;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromCognitoIdentity.js
var require_fromCognitoIdentity = __commonJS((exports) => {
  var { fromCognitoIdentity: _fromCognitoIdentity } = require_dist_cjs60();
  var fromCognitoIdentity = (options) => _fromCognitoIdentity({
    ...options
  });
  exports.fromCognitoIdentity = fromCognitoIdentity;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromCognitoIdentityPool.js
var require_fromCognitoIdentityPool = __commonJS((exports) => {
  var { fromCognitoIdentityPool: _fromCognitoIdentityPool } = require_dist_cjs60();
  var fromCognitoIdentityPool = (options) => _fromCognitoIdentityPool({
    ...options
  });
  exports.fromCognitoIdentityPool = fromCognitoIdentityPool;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromContainerMetadata.js
var require_fromContainerMetadata = __commonJS((exports) => {
  var { fromContainerMetadata: _fromContainerMetadata } = require_dist_cjs8();
  var fromContainerMetadata = (init4) => {
    init4?.logger?.debug("@smithy/credential-provider-imds", "fromContainerMetadata");
    return _fromContainerMetadata(init4);
  };
  exports.fromContainerMetadata = fromContainerMetadata;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromEnv.js
var require_fromEnv = __commonJS((exports) => {
  var { fromEnv: _fromEnv } = require_dist_cjs7();
  var fromEnv = (init4) => _fromEnv(init4);
  exports.fromEnv = fromEnv;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromIni.js
var require_fromIni = __commonJS((exports) => {
  var { fromIni: _fromIni } = require_dist_cjs18();
  var fromIni = (init4 = {}) => _fromIni({
    ...init4
  });
  exports.fromIni = fromIni;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromInstanceMetadata.js
var require_fromInstanceMetadata = __commonJS((exports) => {
  var { setCredentialFeature } = require_client4();
  var { fromInstanceMetadata: _fromInstanceMetadata } = require_dist_cjs8();
  var fromInstanceMetadata = (init4) => {
    init4?.logger?.debug("@smithy/credential-provider-imds", "fromInstanceMetadata");
    return async () => _fromInstanceMetadata(init4)().then((creds) => setCredentialFeature(creds, "CREDENTIALS_IMDS", "0"));
  };
  exports.fromInstanceMetadata = fromInstanceMetadata;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromLoginCredentials.js
var require_fromLoginCredentials = __commonJS((exports) => {
  var { fromLoginCredentials: _fromLoginCredentials } = require_dist_cjs14();
  var fromLoginCredentials = (init4) => _fromLoginCredentials({
    ...init4
  });
  exports.fromLoginCredentials = fromLoginCredentials;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromNodeProviderChain.js
var require_fromNodeProviderChain = __commonJS((exports) => {
  var { defaultProvider } = require_dist_cjs19();
  exports.fromNodeProviderChain = (init4 = {}) => defaultProvider({
    ...init4
  });
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromProcess.js
var require_fromProcess = __commonJS((exports) => {
  var { fromProcess: _fromProcess } = require_dist_cjs16();
  var fromProcess = (init4) => _fromProcess(init4);
  exports.fromProcess = fromProcess;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromSSO.js
var require_fromSSO = __commonJS((exports) => {
  var { fromSSO: _fromSSO } = require_dist_cjs13();
  var fromSSO = (init4 = {}) => {
    return _fromSSO({ ...init4 });
  };
  exports.fromSSO = fromSSO;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/loadSts.js
var require_loadSts = __commonJS((exports) => {
  var { AssumeRoleCommand, STSClient } = require_sts();
  exports.AssumeRoleCommand = AssumeRoleCommand;
  exports.STSClient = STSClient;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromTemporaryCredentials.base.js
var require_fromTemporaryCredentials_base = __commonJS((exports) => {
  var { normalizeProvider } = require_dist_cjs5();
  var { CredentialsProviderError } = require_config2();
  var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
  exports.fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {
    let stsClient;
    return async (awsIdentityProperties = {}) => {
      const { callerClientConfig } = awsIdentityProperties;
      const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;
      const logger = options.logger ?? callerClientConfig?.logger;
      logger?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");
      const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? "aws-sdk-js-" + Date.now() };
      if (params?.SerialNumber) {
        if (!options.mfaCodeProvider) {
          throw new CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {
            tryNextLink: false,
            logger
          });
        }
        params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);
      }
      const { AssumeRoleCommand, STSClient } = require_loadSts();
      if (!stsClient) {
        const defaultCredentialsOrError = typeof credentialDefaultProvider === "function" ? credentialDefaultProvider() : undefined;
        const credentialSources = [
          options.masterCredentials,
          options.clientConfig?.credentials,
          void callerClientConfig?.credentials,
          callerClientConfig?.credentialDefaultProvider?.(),
          defaultCredentialsOrError
        ];
        let credentialSource = "STS client default credentials";
        if (credentialSources[0]) {
          credentialSource = "options.masterCredentials";
        } else if (credentialSources[1]) {
          credentialSource = "options.clientConfig.credentials";
        } else if (credentialSources[2]) {
          credentialSource = "caller client's credentials";
          throw new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");
        } else if (credentialSources[3]) {
          credentialSource = "caller client's credentialDefaultProvider";
        } else if (credentialSources[4]) {
          credentialSource = "AWS SDK default credentials";
        }
        const regionSources = [
          options.clientConfig?.region,
          callerClientConfig?.region,
          await regionProvider?.({
            profile
          }),
          ASSUME_ROLE_DEFAULT_REGION
        ];
        let regionSource = "default partition's default region";
        if (regionSources[0]) {
          regionSource = "options.clientConfig.region";
        } else if (regionSources[1]) {
          regionSource = "caller client's region";
        } else if (regionSources[2]) {
          regionSource = "file or env region";
        }
        const requestHandlerSources = [
          filterRequestHandler(options.clientConfig?.requestHandler),
          filterRequestHandler(callerClientConfig?.requestHandler)
        ];
        let requestHandlerSource = "STS default requestHandler";
        if (requestHandlerSources[0]) {
          requestHandlerSource = "options.clientConfig.requestHandler";
        } else if (requestHandlerSources[1]) {
          requestHandlerSource = "caller client's requestHandler";
        }
        logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` + `${regionSource}=${await normalizeProvider(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);
        stsClient = new STSClient({
          userAgentAppId: callerClientConfig?.userAgentAppId,
          ...options.clientConfig,
          credentials: coalesce(credentialSources),
          logger,
          profile,
          region: coalesce(regionSources),
          requestHandler: coalesce(requestHandlerSources)
        });
      }
      if (options.clientPlugins) {
        for (const plugin of options.clientPlugins) {
          stsClient.middlewareStack.use(plugin);
        }
      }
      const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));
      if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
        throw new CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {
          logger
        });
      }
      return {
        accessKeyId: Credentials.AccessKeyId,
        secretAccessKey: Credentials.SecretAccessKey,
        sessionToken: Credentials.SessionToken,
        expiration: Credentials.Expiration,
        credentialScope: Credentials.CredentialScope
      };
    };
  };
  var filterRequestHandler = (requestHandler) => {
    return requestHandler?.metadata?.handlerProtocol === "h2" ? undefined : requestHandler;
  };
  var coalesce = (args) => {
    for (const item of args) {
      if (item !== undefined) {
        return item;
      }
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromTemporaryCredentials.js
var require_fromTemporaryCredentials = __commonJS((exports) => {
  var { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS } = require_config2();
  var { fromNodeProviderChain } = require_fromNodeProviderChain();
  var { fromTemporaryCredentials: fromTemporaryCredentialsBase } = require_fromTemporaryCredentials_base();
  var fromTemporaryCredentials = (options) => {
    return fromTemporaryCredentialsBase(options, fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => loadConfig({
      environmentVariableSelector: (env2) => env2.AWS_REGION,
      configFileSelector: (profileData) => {
        return profileData.region;
      },
      default: () => {
        return;
      }
    }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, profile })());
  };
  exports.fromTemporaryCredentials = fromTemporaryCredentials;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromTokenFile.js
var require_fromTokenFile3 = __commonJS((exports) => {
  var { fromTokenFile: _fromTokenFile } = require_dist_cjs17();
  var fromTokenFile = (init4 = {}) => _fromTokenFile({
    ...init4
  });
  exports.fromTokenFile = fromTokenFile;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/fromWebToken.js
var require_fromWebToken3 = __commonJS((exports) => {
  var { fromWebToken: _fromWebToken } = require_dist_cjs17();
  var fromWebToken = (init4) => _fromWebToken({
    ...init4
  });
  exports.fromWebToken = fromWebToken;
});

// ../../node_modules/.pnpm/@aws-sdk+credential-providers@3.1074.0/node_modules/@aws-sdk/credential-providers/dist-cjs/index.js
var require_dist_cjs61 = __commonJS((exports) => {
  var __exportStar = (m2, e) => {
    Object.assign(e, m2);
  };
  __exportStar(require_createCredentialChain(), exports);
  __exportStar(require_fromCognitoIdentity(), exports);
  __exportStar(require_fromCognitoIdentityPool(), exports);
  __exportStar(require_fromContainerMetadata(), exports);
  __exportStar(require_fromEnv(), exports);
  var { fromHttp } = require_dist_cjs10();
  exports.fromHttp = fromHttp;
  __exportStar(require_fromIni(), exports);
  __exportStar(require_fromInstanceMetadata(), exports);
  __exportStar(require_fromLoginCredentials(), exports);
  __exportStar(require_fromNodeProviderChain(), exports);
  __exportStar(require_fromProcess(), exports);
  __exportStar(require_fromSSO(), exports);
  __exportStar(require_fromTemporaryCredentials(), exports);
  __exportStar(require_fromTokenFile3(), exports);
  __exportStar(require_fromWebToken3(), exports);
});

// ../../node_modules/.pnpm/react@19.2.7/node_modules/react/cjs/react.development.js
var require_react_development = __commonJS((exports, module) => {
  (function() {
    function defineDeprecationWarning(methodName, info) {
      Object.defineProperty(Component.prototype, methodName, {
        get: function() {
          console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
        }
      });
    }
    function getIteratorFn(maybeIterable) {
      if (maybeIterable === null || typeof maybeIterable !== "object")
        return null;
      maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
      return typeof maybeIterable === "function" ? maybeIterable : null;
    }
    function warnNoop(publicInstance, callerName) {
      publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
      var warningKey = publicInstance + "." + callerName;
      didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
    }
    function Component(props, context10, updater) {
      this.props = props;
      this.context = context10;
      this.refs = emptyObject;
      this.updater = updater || ReactNoopUpdateQueue;
    }
    function ComponentDummy() {}
    function PureComponent(props, context10, updater) {
      this.props = props;
      this.context = context10;
      this.refs = emptyObject;
      this.updater = updater || ReactNoopUpdateQueue;
    }
    function noop() {}
    function testStringCoercion(value) {
      return "" + value;
    }
    function checkKeyStringCoercion(value) {
      try {
        testStringCoercion(value);
        var JSCompiler_inline_result = false;
      } catch (e) {
        JSCompiler_inline_result = true;
      }
      if (JSCompiler_inline_result) {
        JSCompiler_inline_result = console;
        var JSCompiler_temp_const = JSCompiler_inline_result.error;
        var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
        JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
        return testStringCoercion(value);
      }
    }
    function getComponentNameFromType(type2) {
      if (type2 == null)
        return null;
      if (typeof type2 === "function")
        return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
      if (typeof type2 === "string")
        return type2;
      switch (type2) {
        case REACT_FRAGMENT_TYPE:
          return "Fragment";
        case REACT_PROFILER_TYPE:
          return "Profiler";
        case REACT_STRICT_MODE_TYPE:
          return "StrictMode";
        case REACT_SUSPENSE_TYPE:
          return "Suspense";
        case REACT_SUSPENSE_LIST_TYPE:
          return "SuspenseList";
        case REACT_ACTIVITY_TYPE:
          return "Activity";
      }
      if (typeof type2 === "object")
        switch (typeof type2.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type2.$$typeof) {
          case REACT_PORTAL_TYPE:
            return "Portal";
          case REACT_CONTEXT_TYPE:
            return type2.displayName || "Context";
          case REACT_CONSUMER_TYPE:
            return (type2._context.displayName || "Context") + ".Consumer";
          case REACT_FORWARD_REF_TYPE:
            var innerType = type2.render;
            type2 = type2.displayName;
            type2 || (type2 = innerType.displayName || innerType.name || "", type2 = type2 !== "" ? "ForwardRef(" + type2 + ")" : "ForwardRef");
            return type2;
          case REACT_MEMO_TYPE:
            return innerType = type2.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type2.type) || "Memo";
          case REACT_LAZY_TYPE:
            innerType = type2._payload;
            type2 = type2._init;
            try {
              return getComponentNameFromType(type2(innerType));
            } catch (x) {}
        }
      return null;
    }
    function getTaskName(type2) {
      if (type2 === REACT_FRAGMENT_TYPE)
        return "<>";
      if (typeof type2 === "object" && type2 !== null && type2.$$typeof === REACT_LAZY_TYPE)
        return "<...>";
      try {
        var name = getComponentNameFromType(type2);
        return name ? "<" + name + ">" : "<...>";
      } catch (x) {
        return "<...>";
      }
    }
    function getOwner() {
      var dispatcher = ReactSharedInternals.A;
      return dispatcher === null ? null : dispatcher.getOwner();
    }
    function UnknownOwner() {
      return Error("react-stack-top-frame");
    }
    function hasValidKey(config2) {
      if (hasOwnProperty2.call(config2, "key")) {
        var getter = Object.getOwnPropertyDescriptor(config2, "key").get;
        if (getter && getter.isReactWarning)
          return false;
      }
      return config2.key !== undefined;
    }
    function defineKeyPropWarningGetter(props, displayName) {
      function warnAboutAccessingKey() {
        specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
      }
      warnAboutAccessingKey.isReactWarning = true;
      Object.defineProperty(props, "key", {
        get: warnAboutAccessingKey,
        configurable: true
      });
    }
    function elementRefGetterWithDeprecationWarning() {
      var componentName = getComponentNameFromType(this.type);
      didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
      componentName = this.props.ref;
      return componentName !== undefined ? componentName : null;
    }
    function ReactElement(type2, key, props, owner, debugStack, debugTask) {
      var refProp = props.ref;
      type2 = {
        $$typeof: REACT_ELEMENT_TYPE,
        type: type2,
        key,
        props,
        _owner: owner
      };
      (refProp !== undefined ? refProp : null) !== null ? Object.defineProperty(type2, "ref", {
        enumerable: false,
        get: elementRefGetterWithDeprecationWarning
      }) : Object.defineProperty(type2, "ref", { enumerable: false, value: null });
      type2._store = {};
      Object.defineProperty(type2._store, "validated", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: 0
      });
      Object.defineProperty(type2, "_debugInfo", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: null
      });
      Object.defineProperty(type2, "_debugStack", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: debugStack
      });
      Object.defineProperty(type2, "_debugTask", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: debugTask
      });
      Object.freeze && (Object.freeze(type2.props), Object.freeze(type2));
      return type2;
    }
    function cloneAndReplaceKey(oldElement, newKey) {
      newKey = ReactElement(oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask);
      oldElement._store && (newKey._store.validated = oldElement._store.validated);
      return newKey;
    }
    function validateChildKeys(node2) {
      isValidElement(node2) ? node2._store && (node2._store.validated = 1) : typeof node2 === "object" && node2 !== null && node2.$$typeof === REACT_LAZY_TYPE && (node2._payload.status === "fulfilled" ? isValidElement(node2._payload.value) && node2._payload.value._store && (node2._payload.value._store.validated = 1) : node2._store && (node2._store.validated = 1));
    }
    function isValidElement(object2) {
      return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE;
    }
    function escape(key) {
      var escaperLookup = { "=": "=0", ":": "=2" };
      return "$" + key.replace(/[=:]/g, function(match) {
        return escaperLookup[match];
      });
    }
    function getElementKey(element, index2) {
      return typeof element === "object" && element !== null && element.key != null ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index2.toString(36);
    }
    function resolveThenable(thenable) {
      switch (thenable.status) {
        case "fulfilled":
          return thenable.value;
        case "rejected":
          throw thenable.reason;
        default:
          switch (typeof thenable.status === "string" ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) {
            thenable.status === "pending" && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
          }, function(error49) {
            thenable.status === "pending" && (thenable.status = "rejected", thenable.reason = error49);
          })), thenable.status) {
            case "fulfilled":
              return thenable.value;
            case "rejected":
              throw thenable.reason;
          }
      }
      throw thenable;
    }
    function mapIntoArray(children, array2, escapedPrefix, nameSoFar, callback) {
      var type2 = typeof children;
      if (type2 === "undefined" || type2 === "boolean")
        children = null;
      var invokeCallback = false;
      if (children === null)
        invokeCallback = true;
      else
        switch (type2) {
          case "bigint":
          case "string":
          case "number":
            invokeCallback = true;
            break;
          case "object":
            switch (children.$$typeof) {
              case REACT_ELEMENT_TYPE:
              case REACT_PORTAL_TYPE:
                invokeCallback = true;
                break;
              case REACT_LAZY_TYPE:
                return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array2, escapedPrefix, nameSoFar, callback);
            }
        }
      if (invokeCallback) {
        invokeCallback = children;
        callback = callback(invokeCallback);
        var childKey = nameSoFar === "" ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
        isArrayImpl(callback) ? (escapedPrefix = "", childKey != null && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array2, escapedPrefix, "", function(c) {
          return c;
        })) : callback != null && (isValidElement(callback) && (callback.key != null && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (callback.key == null || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), nameSoFar !== "" && invokeCallback != null && isValidElement(invokeCallback) && invokeCallback.key == null && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array2.push(callback));
        return 1;
      }
      invokeCallback = 0;
      childKey = nameSoFar === "" ? "." : nameSoFar + ":";
      if (isArrayImpl(children))
        for (var i = 0;i < children.length; i++)
          nameSoFar = children[i], type2 = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array2, escapedPrefix, type2, callback);
      else if (i = getIteratorFn(children), typeof i === "function")
        for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = true), children = i.call(children), i = 0;!(nameSoFar = children.next()).done; )
          nameSoFar = nameSoFar.value, type2 = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array2, escapedPrefix, type2, callback);
      else if (type2 === "object") {
        if (typeof children.then === "function")
          return mapIntoArray(resolveThenable(children), array2, escapedPrefix, nameSoFar, callback);
        array2 = String(children);
        throw Error("Objects are not valid as a React child (found: " + (array2 === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : array2) + "). If you meant to render a collection of children, use an array instead.");
      }
      return invokeCallback;
    }
    function mapChildren(children, func, context10) {
      if (children == null)
        return children;
      var result = [], count2 = 0;
      mapIntoArray(children, result, "", "", function(child) {
        return func.call(context10, child, count2++);
      });
      return result;
    }
    function lazyInitializer(payload) {
      if (payload._status === -1) {
        var ioInfo = payload._ioInfo;
        ioInfo != null && (ioInfo.start = ioInfo.end = performance.now());
        ioInfo = payload._result;
        var thenable = ioInfo();
        thenable.then(function(moduleObject) {
          if (payload._status === 0 || payload._status === -1) {
            payload._status = 1;
            payload._result = moduleObject;
            var _ioInfo = payload._ioInfo;
            _ioInfo != null && (_ioInfo.end = performance.now());
            thenable.status === undefined && (thenable.status = "fulfilled", thenable.value = moduleObject);
          }
        }, function(error49) {
          if (payload._status === 0 || payload._status === -1) {
            payload._status = 2;
            payload._result = error49;
            var _ioInfo2 = payload._ioInfo;
            _ioInfo2 != null && (_ioInfo2.end = performance.now());
            thenable.status === undefined && (thenable.status = "rejected", thenable.reason = error49);
          }
        });
        ioInfo = payload._ioInfo;
        if (ioInfo != null) {
          ioInfo.value = thenable;
          var displayName = thenable.displayName;
          typeof displayName === "string" && (ioInfo.name = displayName);
        }
        payload._status === -1 && (payload._status = 0, payload._result = thenable);
      }
      if (payload._status === 1)
        return ioInfo = payload._result, ioInfo === undefined && console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))

Did you accidentally put curly braces around the import?`, ioInfo), "default" in ioInfo || console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))`, ioInfo), ioInfo.default;
      throw payload._result;
    }
    function resolveDispatcher() {
      var dispatcher = ReactSharedInternals.H;
      dispatcher === null && console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);
      return dispatcher;
    }
    function releaseAsyncTransition() {
      ReactSharedInternals.asyncTransitions--;
    }
    function enqueueTask(task) {
      if (enqueueTaskImpl === null)
        try {
          var requireString = ("require" + Math.random()).slice(0, 7);
          enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
        } catch (_err) {
          enqueueTaskImpl = function(callback) {
            didWarnAboutMessageChannel === false && (didWarnAboutMessageChannel = true, typeof MessageChannel === "undefined" && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
            var channel3 = new MessageChannel;
            channel3.port1.onmessage = callback;
            channel3.port2.postMessage(undefined);
          };
        }
      return enqueueTaskImpl(task);
    }
    function aggregateErrors(errors3) {
      return 1 < errors3.length && typeof AggregateError === "function" ? new AggregateError(errors3) : errors3[0];
    }
    function popActScope(prevActQueue, prevActScopeDepth) {
      prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
      actScopeDepth = prevActScopeDepth;
    }
    function recursivelyFlushAsyncActWork(returnValue, resolve3, reject) {
      var queue = ReactSharedInternals.actQueue;
      if (queue !== null)
        if (queue.length !== 0)
          try {
            flushActQueue(queue);
            enqueueTask(function() {
              return recursivelyFlushAsyncActWork(returnValue, resolve3, reject);
            });
            return;
          } catch (error49) {
            ReactSharedInternals.thrownErrors.push(error49);
          }
        else
          ReactSharedInternals.actQueue = null;
      0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve3(returnValue);
    }
    function flushActQueue(queue) {
      if (!isFlushing) {
        isFlushing = true;
        var i = 0;
        try {
          for (;i < queue.length; i++) {
            var callback = queue[i];
            do {
              ReactSharedInternals.didUsePromise = false;
              var continuation = callback(false);
              if (continuation !== null) {
                if (ReactSharedInternals.didUsePromise) {
                  queue[i] = callback;
                  queue.splice(0, i);
                  return;
                }
                callback = continuation;
              } else
                break;
            } while (1);
          }
          queue.length = 0;
        } catch (error49) {
          queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error49);
        } finally {
          isFlushing = false;
        }
      }
    }
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
    var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
      isMounted: function() {
        return false;
      },
      enqueueForceUpdate: function(publicInstance) {
        warnNoop(publicInstance, "forceUpdate");
      },
      enqueueReplaceState: function(publicInstance) {
        warnNoop(publicInstance, "replaceState");
      },
      enqueueSetState: function(publicInstance) {
        warnNoop(publicInstance, "setState");
      }
    }, assign = Object.assign, emptyObject = {};
    Object.freeze(emptyObject);
    Component.prototype.isReactComponent = {};
    Component.prototype.setState = function(partialState, callback) {
      if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null)
        throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
      this.updater.enqueueSetState(this, partialState, callback, "setState");
    };
    Component.prototype.forceUpdate = function(callback) {
      this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
    };
    var deprecatedAPIs = {
      isMounted: [
        "isMounted",
        "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
      ],
      replaceState: [
        "replaceState",
        "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
      ]
    };
    for (fnName in deprecatedAPIs)
      deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
    ComponentDummy.prototype = Component.prototype;
    deprecatedAPIs = PureComponent.prototype = new ComponentDummy;
    deprecatedAPIs.constructor = PureComponent;
    assign(deprecatedAPIs, Component.prototype);
    deprecatedAPIs.isPureReactComponent = true;
    var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
      H: null,
      A: null,
      T: null,
      S: null,
      actQueue: null,
      asyncTransitions: 0,
      isBatchingLegacy: false,
      didScheduleLegacyUpdate: false,
      didUsePromise: false,
      thrownErrors: [],
      getCurrentStack: null,
      recentlyCreatedOwnerStacks: 0
    }, hasOwnProperty2 = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
      return null;
    };
    deprecatedAPIs = {
      react_stack_bottom_frame: function(callStackForError) {
        return callStackForError();
      }
    };
    var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
    var didWarnAboutElementRef = {};
    var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs, UnknownOwner)();
    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
    var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = typeof reportError === "function" ? reportError : function(error49) {
      if (typeof window === "object" && typeof window.ErrorEvent === "function") {
        var event = new window.ErrorEvent("error", {
          bubbles: true,
          cancelable: true,
          message: typeof error49 === "object" && error49 !== null && typeof error49.message === "string" ? String(error49.message) : String(error49),
          error: error49
        });
        if (!window.dispatchEvent(event))
          return;
      } else if (typeof process === "object" && typeof process.emit === "function") {
        process.emit("uncaughtException", error49);
        return;
      }
      console.error(error49);
    }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = typeof queueMicrotask === "function" ? function(callback) {
      queueMicrotask(function() {
        return queueMicrotask(callback);
      });
    } : enqueueTask;
    deprecatedAPIs = Object.freeze({
      __proto__: null,
      c: function(size) {
        return resolveDispatcher().useMemoCache(size);
      }
    });
    var fnName = {
      map: mapChildren,
      forEach: function(children, forEachFunc, forEachContext) {
        mapChildren(children, function() {
          forEachFunc.apply(this, arguments);
        }, forEachContext);
      },
      count: function(children) {
        var n2 = 0;
        mapChildren(children, function() {
          n2++;
        });
        return n2;
      },
      toArray: function(children) {
        return mapChildren(children, function(child) {
          return child;
        }) || [];
      },
      only: function(children) {
        if (!isValidElement(children))
          throw Error("React.Children.only expected to receive a single React element child.");
        return children;
      }
    };
    exports.Activity = REACT_ACTIVITY_TYPE;
    exports.Children = fnName;
    exports.Component = Component;
    exports.Fragment = REACT_FRAGMENT_TYPE;
    exports.Profiler = REACT_PROFILER_TYPE;
    exports.PureComponent = PureComponent;
    exports.StrictMode = REACT_STRICT_MODE_TYPE;
    exports.Suspense = REACT_SUSPENSE_TYPE;
    exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
    exports.__COMPILER_RUNTIME = deprecatedAPIs;
    exports.act = function(callback) {
      var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
      actScopeDepth++;
      var queue = ReactSharedInternals.actQueue = prevActQueue !== null ? prevActQueue : [], didAwaitActCall = false;
      try {
        var result = callback();
      } catch (error49) {
        ReactSharedInternals.thrownErrors.push(error49);
      }
      if (0 < ReactSharedInternals.thrownErrors.length)
        throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
      if (result !== null && typeof result === "object" && typeof result.then === "function") {
        var thenable = result;
        queueSeveralMicrotasks(function() {
          didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
        });
        return {
          then: function(resolve3, reject) {
            didAwaitActCall = true;
            thenable.then(function(returnValue) {
              popActScope(prevActQueue, prevActScopeDepth);
              if (prevActScopeDepth === 0) {
                try {
                  flushActQueue(queue), enqueueTask(function() {
                    return recursivelyFlushAsyncActWork(returnValue, resolve3, reject);
                  });
                } catch (error$0) {
                  ReactSharedInternals.thrownErrors.push(error$0);
                }
                if (0 < ReactSharedInternals.thrownErrors.length) {
                  var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
                  ReactSharedInternals.thrownErrors.length = 0;
                  reject(_thrownError);
                }
              } else
                resolve3(returnValue);
            }, function(error49) {
              popActScope(prevActQueue, prevActScopeDepth);
              0 < ReactSharedInternals.thrownErrors.length ? (error49 = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error49)) : reject(error49);
            });
          }
        };
      }
      var returnValue$jscomp$0 = result;
      popActScope(prevActQueue, prevActScopeDepth);
      prevActScopeDepth === 0 && (flushActQueue(queue), queue.length !== 0 && queueSeveralMicrotasks(function() {
        didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
      }), ReactSharedInternals.actQueue = null);
      if (0 < ReactSharedInternals.thrownErrors.length)
        throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
      return {
        then: function(resolve3, reject) {
          didAwaitActCall = true;
          prevActScopeDepth === 0 ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
            return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve3, reject);
          })) : resolve3(returnValue$jscomp$0);
        }
      };
    };
    exports.cache = function(fn) {
      return function() {
        return fn.apply(null, arguments);
      };
    };
    exports.cacheSignal = function() {
      return null;
    };
    exports.captureOwnerStack = function() {
      var getCurrentStack = ReactSharedInternals.getCurrentStack;
      return getCurrentStack === null ? null : getCurrentStack();
    };
    exports.cloneElement = function(element, config2, children) {
      if (element === null || element === undefined)
        throw Error("The argument must be a React element, but you passed " + element + ".");
      var props = assign({}, element.props), key = element.key, owner = element._owner;
      if (config2 != null) {
        var JSCompiler_inline_result;
        a: {
          if (hasOwnProperty2.call(config2, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config2, "ref").get) && JSCompiler_inline_result.isReactWarning) {
            JSCompiler_inline_result = false;
            break a;
          }
          JSCompiler_inline_result = config2.ref !== undefined;
        }
        JSCompiler_inline_result && (owner = getOwner());
        hasValidKey(config2) && (checkKeyStringCoercion(config2.key), key = "" + config2.key);
        for (propName in config2)
          !hasOwnProperty2.call(config2, propName) || propName === "key" || propName === "__self" || propName === "__source" || propName === "ref" && config2.ref === undefined || (props[propName] = config2[propName]);
      }
      var propName = arguments.length - 2;
      if (propName === 1)
        props.children = children;
      else if (1 < propName) {
        JSCompiler_inline_result = Array(propName);
        for (var i = 0;i < propName; i++)
          JSCompiler_inline_result[i] = arguments[i + 2];
        props.children = JSCompiler_inline_result;
      }
      props = ReactElement(element.type, key, props, owner, element._debugStack, element._debugTask);
      for (key = 2;key < arguments.length; key++)
        validateChildKeys(arguments[key]);
      return props;
    };
    exports.createContext = function(defaultValue) {
      defaultValue = {
        $$typeof: REACT_CONTEXT_TYPE,
        _currentValue: defaultValue,
        _currentValue2: defaultValue,
        _threadCount: 0,
        Provider: null,
        Consumer: null
      };
      defaultValue.Provider = defaultValue;
      defaultValue.Consumer = {
        $$typeof: REACT_CONSUMER_TYPE,
        _context: defaultValue
      };
      defaultValue._currentRenderer = null;
      defaultValue._currentRenderer2 = null;
      return defaultValue;
    };
    exports.createElement = function(type2, config2, children) {
      for (var i = 2;i < arguments.length; i++)
        validateChildKeys(arguments[i]);
      i = {};
      var key = null;
      if (config2 != null)
        for (propName in didWarnAboutOldJSXRuntime || !("__self" in config2) || "key" in config2 || (didWarnAboutOldJSXRuntime = true, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config2) && (checkKeyStringCoercion(config2.key), key = "" + config2.key), config2)
          hasOwnProperty2.call(config2, propName) && propName !== "key" && propName !== "__self" && propName !== "__source" && (i[propName] = config2[propName]);
      var childrenLength = arguments.length - 2;
      if (childrenLength === 1)
        i.children = children;
      else if (1 < childrenLength) {
        for (var childArray = Array(childrenLength), _i = 0;_i < childrenLength; _i++)
          childArray[_i] = arguments[_i + 2];
        Object.freeze && Object.freeze(childArray);
        i.children = childArray;
      }
      if (type2 && type2.defaultProps)
        for (propName in childrenLength = type2.defaultProps, childrenLength)
          i[propName] === undefined && (i[propName] = childrenLength[propName]);
      key && defineKeyPropWarningGetter(i, typeof type2 === "function" ? type2.displayName || type2.name || "Unknown" : type2);
      var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
      return ReactElement(type2, key, i, getOwner(), propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type2)) : unknownOwnerDebugTask);
    };
    exports.createRef = function() {
      var refObject = { current: null };
      Object.seal(refObject);
      return refObject;
    };
    exports.forwardRef = function(render) {
      render != null && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof render !== "function" ? console.error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render) : render.length !== 0 && render.length !== 2 && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
      render != null && render.defaultProps != null && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
      var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
      Object.defineProperty(elementType, "displayName", {
        enumerable: false,
        configurable: true,
        get: function() {
          return ownName;
        },
        set: function(name) {
          ownName = name;
          render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
        }
      });
      return elementType;
    };
    exports.isValidElement = isValidElement;
    exports.lazy = function(ctor) {
      ctor = { _status: -1, _result: ctor };
      var lazyType = {
        $$typeof: REACT_LAZY_TYPE,
        _payload: ctor,
        _init: lazyInitializer
      }, ioInfo = {
        name: "lazy",
        start: -1,
        end: -1,
        value: null,
        owner: null,
        debugStack: Error("react-stack-top-frame"),
        debugTask: console.createTask ? console.createTask("lazy()") : null
      };
      ctor._ioInfo = ioInfo;
      lazyType._debugInfo = [{ awaited: ioInfo }];
      return lazyType;
    };
    exports.memo = function(type2, compare) {
      type2 == null && console.error("memo: The first argument must be a component. Instead received: %s", type2 === null ? "null" : typeof type2);
      compare = {
        $$typeof: REACT_MEMO_TYPE,
        type: type2,
        compare: compare === undefined ? null : compare
      };
      var ownName;
      Object.defineProperty(compare, "displayName", {
        enumerable: false,
        configurable: true,
        get: function() {
          return ownName;
        },
        set: function(name) {
          ownName = name;
          type2.name || type2.displayName || (Object.defineProperty(type2, "name", { value: name }), type2.displayName = name);
        }
      });
      return compare;
    };
    exports.startTransition = function(scope) {
      var prevTransition = ReactSharedInternals.T, currentTransition = {};
      currentTransition._updatedFibers = new Set;
      ReactSharedInternals.T = currentTransition;
      try {
        var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
        onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue);
        typeof returnValue === "object" && returnValue !== null && typeof returnValue.then === "function" && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
      } catch (error49) {
        reportGlobalError(error49);
      } finally {
        prevTransition === null && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), prevTransition !== null && currentTransition.types !== null && (prevTransition.types !== null && prevTransition.types !== currentTransition.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
      }
    };
    exports.unstable_useCacheRefresh = function() {
      return resolveDispatcher().useCacheRefresh();
    };
    exports.use = function(usable) {
      return resolveDispatcher().use(usable);
    };
    exports.useActionState = function(action, initialState, permalink) {
      return resolveDispatcher().useActionState(action, initialState, permalink);
    };
    exports.useCallback = function(callback, deps) {
      return resolveDispatcher().useCallback(callback, deps);
    };
    exports.useContext = function(Context) {
      var dispatcher = resolveDispatcher();
      Context.$$typeof === REACT_CONSUMER_TYPE && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?");
      return dispatcher.useContext(Context);
    };
    exports.useDebugValue = function(value, formatterFn) {
      return resolveDispatcher().useDebugValue(value, formatterFn);
    };
    exports.useDeferredValue = function(value, initialValue) {
      return resolveDispatcher().useDeferredValue(value, initialValue);
    };
    exports.useEffect = function(create, deps) {
      create == null && console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");
      return resolveDispatcher().useEffect(create, deps);
    };
    exports.useEffectEvent = function(callback) {
      return resolveDispatcher().useEffectEvent(callback);
    };
    exports.useId = function() {
      return resolveDispatcher().useId();
    };
    exports.useImperativeHandle = function(ref, create, deps) {
      return resolveDispatcher().useImperativeHandle(ref, create, deps);
    };
    exports.useInsertionEffect = function(create, deps) {
      create == null && console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?");
      return resolveDispatcher().useInsertionEffect(create, deps);
    };
    exports.useLayoutEffect = function(create, deps) {
      create == null && console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?");
      return resolveDispatcher().useLayoutEffect(create, deps);
    };
    exports.useMemo = function(create, deps) {
      return resolveDispatcher().useMemo(create, deps);
    };
    exports.useOptimistic = function(passthrough, reducer) {
      return resolveDispatcher().useOptimistic(passthrough, reducer);
    };
    exports.useReducer = function(reducer, initialArg, init4) {
      return resolveDispatcher().useReducer(reducer, initialArg, init4);
    };
    exports.useRef = function(initialValue) {
      return resolveDispatcher().useRef(initialValue);
    };
    exports.useState = function(initialState) {
      return resolveDispatcher().useState(initialState);
    };
    exports.useSyncExternalStore = function(subscribe4, getSnapshot, getServerSnapshot) {
      return resolveDispatcher().useSyncExternalStore(subscribe4, getSnapshot, getServerSnapshot);
    };
    exports.useTransition = function() {
      return resolveDispatcher().useTransition();
    };
    exports.version = "19.2.7";
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  })();
});

// ../../node_modules/.pnpm/react@19.2.7/node_modules/react/index.js
var require_react = __commonJS((exports, module) => {
  var react_development = __toESM(require_react_development());
  if (false) {} else {
    module.exports = react_development;
  }
});

// ../../node_modules/.pnpm/react@19.2.7/node_modules/react/cjs/react-jsx-runtime.development.js
var require_react_jsx_runtime_development = __commonJS((exports) => {
  var React = __toESM(require_react());
  (function() {
    function getComponentNameFromType(type2) {
      if (type2 == null)
        return null;
      if (typeof type2 === "function")
        return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
      if (typeof type2 === "string")
        return type2;
      switch (type2) {
        case REACT_FRAGMENT_TYPE:
          return "Fragment";
        case REACT_PROFILER_TYPE:
          return "Profiler";
        case REACT_STRICT_MODE_TYPE:
          return "StrictMode";
        case REACT_SUSPENSE_TYPE:
          return "Suspense";
        case REACT_SUSPENSE_LIST_TYPE:
          return "SuspenseList";
        case REACT_ACTIVITY_TYPE:
          return "Activity";
      }
      if (typeof type2 === "object")
        switch (typeof type2.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type2.$$typeof) {
          case REACT_PORTAL_TYPE:
            return "Portal";
          case REACT_CONTEXT_TYPE:
            return type2.displayName || "Context";
          case REACT_CONSUMER_TYPE:
            return (type2._context.displayName || "Context") + ".Consumer";
          case REACT_FORWARD_REF_TYPE:
            var innerType = type2.render;
            type2 = type2.displayName;
            type2 || (type2 = innerType.displayName || innerType.name || "", type2 = type2 !== "" ? "ForwardRef(" + type2 + ")" : "ForwardRef");
            return type2;
          case REACT_MEMO_TYPE:
            return innerType = type2.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type2.type) || "Memo";
          case REACT_LAZY_TYPE:
            innerType = type2._payload;
            type2 = type2._init;
            try {
              return getComponentNameFromType(type2(innerType));
            } catch (x) {}
        }
      return null;
    }
    function testStringCoercion(value) {
      return "" + value;
    }
    function checkKeyStringCoercion(value) {
      try {
        testStringCoercion(value);
        var JSCompiler_inline_result = false;
      } catch (e) {
        JSCompiler_inline_result = true;
      }
      if (JSCompiler_inline_result) {
        JSCompiler_inline_result = console;
        var JSCompiler_temp_const = JSCompiler_inline_result.error;
        var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
        JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
        return testStringCoercion(value);
      }
    }
    function getTaskName(type2) {
      if (type2 === REACT_FRAGMENT_TYPE)
        return "<>";
      if (typeof type2 === "object" && type2 !== null && type2.$$typeof === REACT_LAZY_TYPE)
        return "<...>";
      try {
        var name = getComponentNameFromType(type2);
        return name ? "<" + name + ">" : "<...>";
      } catch (x) {
        return "<...>";
      }
    }
    function getOwner() {
      var dispatcher = ReactSharedInternals.A;
      return dispatcher === null ? null : dispatcher.getOwner();
    }
    function UnknownOwner() {
      return Error("react-stack-top-frame");
    }
    function hasValidKey(config2) {
      if (hasOwnProperty2.call(config2, "key")) {
        var getter = Object.getOwnPropertyDescriptor(config2, "key").get;
        if (getter && getter.isReactWarning)
          return false;
      }
      return config2.key !== undefined;
    }
    function defineKeyPropWarningGetter(props, displayName) {
      function warnAboutAccessingKey() {
        specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
      }
      warnAboutAccessingKey.isReactWarning = true;
      Object.defineProperty(props, "key", {
        get: warnAboutAccessingKey,
        configurable: true
      });
    }
    function elementRefGetterWithDeprecationWarning() {
      var componentName = getComponentNameFromType(this.type);
      didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
      componentName = this.props.ref;
      return componentName !== undefined ? componentName : null;
    }
    function ReactElement(type2, key, props, owner, debugStack, debugTask) {
      var refProp = props.ref;
      type2 = {
        $$typeof: REACT_ELEMENT_TYPE,
        type: type2,
        key,
        props,
        _owner: owner
      };
      (refProp !== undefined ? refProp : null) !== null ? Object.defineProperty(type2, "ref", {
        enumerable: false,
        get: elementRefGetterWithDeprecationWarning
      }) : Object.defineProperty(type2, "ref", { enumerable: false, value: null });
      type2._store = {};
      Object.defineProperty(type2._store, "validated", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: 0
      });
      Object.defineProperty(type2, "_debugInfo", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: null
      });
      Object.defineProperty(type2, "_debugStack", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: debugStack
      });
      Object.defineProperty(type2, "_debugTask", {
        configurable: false,
        enumerable: false,
        writable: true,
        value: debugTask
      });
      Object.freeze && (Object.freeze(type2.props), Object.freeze(type2));
      return type2;
    }
    function jsxDEVImpl(type2, config2, maybeKey, isStaticChildren, debugStack, debugTask) {
      var children = config2.children;
      if (children !== undefined)
        if (isStaticChildren)
          if (isArrayImpl(children)) {
            for (isStaticChildren = 0;isStaticChildren < children.length; isStaticChildren++)
              validateChildKeys(children[isStaticChildren]);
            Object.freeze && Object.freeze(children);
          } else
            console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
        else
          validateChildKeys(children);
      if (hasOwnProperty2.call(config2, "key")) {
        children = getComponentNameFromType(type2);
        var keys = Object.keys(config2).filter(function(k2) {
          return k2 !== "key";
        });
        isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
        didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(`A props object containing a "key" prop is being spread into JSX:
  let props = %s;
  <%s {...props} />
React keys must be passed directly to JSX without using spread:
  let props = %s;
  <%s key={someKey} {...props} />`, isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = true);
      }
      children = null;
      maybeKey !== undefined && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
      hasValidKey(config2) && (checkKeyStringCoercion(config2.key), children = "" + config2.key);
      if ("key" in config2) {
        maybeKey = {};
        for (var propName in config2)
          propName !== "key" && (maybeKey[propName] = config2[propName]);
      } else
        maybeKey = config2;
      children && defineKeyPropWarningGetter(maybeKey, typeof type2 === "function" ? type2.displayName || type2.name || "Unknown" : type2);
      return ReactElement(type2, children, maybeKey, getOwner(), debugStack, debugTask);
    }
    function validateChildKeys(node2) {
      isValidElement(node2) ? node2._store && (node2._store.validated = 1) : typeof node2 === "object" && node2 !== null && node2.$$typeof === REACT_LAZY_TYPE && (node2._payload.status === "fulfilled" ? isValidElement(node2._payload.value) && node2._payload.value._store && (node2._payload.value._store.validated = 1) : node2._store && (node2._store.validated = 1));
    }
    function isValidElement(object2) {
      return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE;
    }
    var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty2 = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
      return null;
    };
    React = {
      react_stack_bottom_frame: function(callStackForError) {
        return callStackForError();
      }
    };
    var specialPropKeyWarningShown;
    var didWarnAboutElementRef = {};
    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
    var didWarnAboutKeySpread = {};
    exports.Fragment = REACT_FRAGMENT_TYPE;
    exports.jsx = function(type2, config2, maybeKey) {
      var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
      return jsxDEVImpl(type2, config2, maybeKey, false, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type2)) : unknownOwnerDebugTask);
    };
    exports.jsxs = function(type2, config2, maybeKey) {
      var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
      return jsxDEVImpl(type2, config2, maybeKey, true, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type2)) : unknownOwnerDebugTask);
    };
  })();
});

// ../../node_modules/.pnpm/react@19.2.7/node_modules/react/jsx-runtime.js
var require_jsx_runtime = __commonJS((exports, module) => {
  var react_jsx_runtime_development = __toESM(require_react_jsx_runtime_development());
  if (false) {} else {
    module.exports = react_jsx_runtime_development;
  }
});

// ../../node_modules/.pnpm/@react-email+body@0.3.0_react@19.2.7/node_modules/@react-email/body/dist/index.mjs
var React, import_jsx_runtime, marginProperties, paddingProperties, Body;
var init_dist = __esm(() => {
  React = __toESM(require_react(), 1);
  import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  marginProperties = [
    "margin",
    "marginTop",
    "marginBottom",
    "marginRight",
    "marginLeft",
    "marginInline",
    "marginBlock",
    "marginBlockStart",
    "marginBlockEnd",
    "marginInlineStart",
    "marginInlineEnd"
  ];
  paddingProperties = [
    "padding",
    "paddingTop",
    "paddingBottom",
    "paddingRight",
    "paddingLeft",
    "paddingInline",
    "paddingBlock",
    "paddingBlockStart",
    "paddingBlockEnd",
    "paddingInlineStart",
    "paddingInlineEnd"
  ];
  Body = React.forwardRef(({ children, style, ...props }, ref) => {
    const bodyStyle = {
      background: style?.background,
      backgroundColor: style?.backgroundColor
    };
    if (style)
      for (const property of [...marginProperties, ...paddingProperties])
        bodyStyle[property] = style[property] !== undefined ? 0 : undefined;
    return /* @__PURE__ */ import_jsx_runtime.jsx("body", {
      ...props,
      style: bodyStyle,
      ref,
      children: /* @__PURE__ */ import_jsx_runtime.jsx("table", {
        border: 0,
        width: "100%",
        cellPadding: "0",
        cellSpacing: "0",
        role: "presentation",
        align: "center",
        children: /* @__PURE__ */ import_jsx_runtime.jsx("tbody", { children: /* @__PURE__ */ import_jsx_runtime.jsx("tr", { children: /* @__PURE__ */ import_jsx_runtime.jsx("td", {
          style,
          children
        }) }) })
      })
    });
  });
  Body.displayName = "Body";
});

// ../../node_modules/.pnpm/@react-email+button@0.2.1_react@19.2.7/node_modules/@react-email/button/dist/index.mjs
function convertToPx(value) {
  let px = 0;
  if (!value)
    return px;
  if (typeof value === "number")
    return value;
  const matches = /^([\d.]+)(px|em|rem|%)$/.exec(value);
  if (matches && matches.length === 3) {
    const numValue = Number.parseFloat(matches[1]);
    switch (matches[2]) {
      case "px":
        return numValue;
      case "em":
      case "rem":
        px = numValue * 16;
        return px;
      case "%":
        px = numValue / 100 * 600;
        return px;
      default:
        return numValue;
    }
  }
  return 0;
}
function parsePaddingValue(value) {
  if (typeof value === "number")
    return {
      paddingTop: value,
      paddingBottom: value,
      paddingLeft: value,
      paddingRight: value
    };
  if (typeof value === "string") {
    const values = value.toString().trim().split(/\s+/);
    if (values.length === 1)
      return {
        paddingTop: values[0],
        paddingBottom: values[0],
        paddingLeft: values[0],
        paddingRight: values[0]
      };
    if (values.length === 2)
      return {
        paddingTop: values[0],
        paddingRight: values[1],
        paddingBottom: values[0],
        paddingLeft: values[1]
      };
    if (values.length === 3)
      return {
        paddingTop: values[0],
        paddingRight: values[1],
        paddingBottom: values[2],
        paddingLeft: values[1]
      };
    if (values.length === 4)
      return {
        paddingTop: values[0],
        paddingRight: values[1],
        paddingBottom: values[2],
        paddingLeft: values[3]
      };
  }
  return {
    paddingTop: undefined,
    paddingBottom: undefined,
    paddingLeft: undefined,
    paddingRight: undefined
  };
}
function parsePadding(properties) {
  let paddingTop;
  let paddingRight;
  let paddingBottom;
  let paddingLeft;
  for (const [key, value] of Object.entries(properties))
    if (key === "padding")
      ({ paddingTop, paddingBottom, paddingLeft, paddingRight } = parsePaddingValue(value));
    else if (key === "paddingTop")
      paddingTop = value;
    else if (key === "paddingRight")
      paddingRight = value;
    else if (key === "paddingBottom")
      paddingBottom = value;
    else if (key === "paddingLeft")
      paddingLeft = value;
  return {
    paddingTop: paddingTop ? convertToPx(paddingTop) : undefined,
    paddingRight: paddingRight ? convertToPx(paddingRight) : undefined,
    paddingBottom: paddingBottom ? convertToPx(paddingBottom) : undefined,
    paddingLeft: paddingLeft ? convertToPx(paddingLeft) : undefined
  };
}
function computeFontWidthAndSpaceCount(expectedWidth) {
  if (expectedWidth === 0)
    return [0, 0];
  let smallestSpaceCount = 0;
  const computeRequiredFontWidth = () => {
    if (smallestSpaceCount > 0)
      return expectedWidth / smallestSpaceCount / 2;
    return Number.POSITIVE_INFINITY;
  };
  while (computeRequiredFontWidth() > maxFontWidth)
    smallestSpaceCount++;
  return [computeRequiredFontWidth(), smallestSpaceCount];
}
var React2, import_jsx_runtime2, pxToPt = (px) => typeof px === "number" && !Number.isNaN(Number(px)) ? px * 3 / 4 : undefined, maxFontWidth = 5, Button;
var init_dist2 = __esm(() => {
  React2 = __toESM(require_react(), 1);
  import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  Button = React2.forwardRef(({ children, style, target = "_blank", ...props }, ref) => {
    const { paddingTop, paddingRight, paddingBottom, paddingLeft } = parsePadding(style ?? {});
    const textRaise = pxToPt((paddingTop ?? 0) + (paddingBottom ?? 0));
    const [plFontWidth, plSpaceCount] = computeFontWidthAndSpaceCount(paddingLeft ?? 0);
    const [prFontWidth, prSpaceCount] = computeFontWidthAndSpaceCount(paddingRight ?? 0);
    return /* @__PURE__ */ import_jsx_runtime2.jsxs("a", {
      ...props,
      ref,
      style: {
        lineHeight: "100%",
        textDecoration: "none",
        display: "inline-block",
        maxWidth: "100%",
        msoPaddingAlt: "0px",
        ...style,
        paddingTop,
        paddingRight,
        paddingBottom,
        paddingLeft
      },
      target,
      children: [
        /* @__PURE__ */ import_jsx_runtime2.jsx("span", { dangerouslySetInnerHTML: { __html: `<!--[if mso]><i style="mso-font-width:${plFontWidth * 100}%;mso-text-raise:${textRaise}" hidden>${"&#8202;".repeat(plSpaceCount)}</i><![endif]-->` } }),
        /* @__PURE__ */ import_jsx_runtime2.jsx("span", {
          style: {
            maxWidth: "100%",
            display: "inline-block",
            lineHeight: "120%",
            msoPaddingAlt: "0px",
            msoTextRaise: pxToPt(paddingBottom)
          },
          children
        }),
        /* @__PURE__ */ import_jsx_runtime2.jsx("span", { dangerouslySetInnerHTML: { __html: `<!--[if mso]><i style="mso-font-width:${prFontWidth * 100}%" hidden>${"&#8202;".repeat(prSpaceCount)}&#8203;</i><![endif]-->` } })
      ]
    });
  });
  Button.displayName = "Button";
});

// ../../node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/prism.js
var require_prism = __commonJS((exports, module) => {
  var _self = typeof window !== "undefined" ? window : typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope ? self : {};
  var Prism = function(_self2) {
    var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
    var uniqueId = 0;
    var plainTextGrammar = {};
    var _2 = {
      manual: _self2.Prism && _self2.Prism.manual,
      disableWorkerMessageHandler: _self2.Prism && _self2.Prism.disableWorkerMessageHandler,
      util: {
        encode: function encode3(tokens) {
          if (tokens instanceof Token) {
            return new Token(tokens.type, encode3(tokens.content), tokens.alias);
          } else if (Array.isArray(tokens)) {
            return tokens.map(encode3);
          } else {
            return tokens.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
          }
        },
        type: function(o) {
          return Object.prototype.toString.call(o).slice(8, -1);
        },
        objId: function(obj) {
          if (!obj["__id"]) {
            Object.defineProperty(obj, "__id", { value: ++uniqueId });
          }
          return obj["__id"];
        },
        clone: function deepClone(o, visited) {
          visited = visited || {};
          var clone2;
          var id;
          switch (_2.util.type(o)) {
            case "Object":
              id = _2.util.objId(o);
              if (visited[id]) {
                return visited[id];
              }
              clone2 = {};
              visited[id] = clone2;
              for (var key in o) {
                if (o.hasOwnProperty(key)) {
                  clone2[key] = deepClone(o[key], visited);
                }
              }
              return clone2;
            case "Array":
              id = _2.util.objId(o);
              if (visited[id]) {
                return visited[id];
              }
              clone2 = [];
              visited[id] = clone2;
              o.forEach(function(v2, i) {
                clone2[i] = deepClone(v2, visited);
              });
              return clone2;
            default:
              return o;
          }
        },
        getLanguage: function(element) {
          while (element) {
            var m2 = lang.exec(element.className);
            if (m2) {
              return m2[1].toLowerCase();
            }
            element = element.parentElement;
          }
          return "none";
        },
        setLanguage: function(element, language) {
          element.className = element.className.replace(RegExp(lang, "gi"), "");
          element.classList.add("language-" + language);
        },
        currentScript: function() {
          if (typeof document === "undefined") {
            return null;
          }
          if (document.currentScript && document.currentScript.tagName === "SCRIPT" && 1 < 2) {
            return document.currentScript;
          }
          try {
            throw new Error;
          } catch (err) {
            var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];
            if (src) {
              var scripts = document.getElementsByTagName("script");
              for (var i in scripts) {
                if (scripts[i].src == src) {
                  return scripts[i];
                }
              }
            }
            return null;
          }
        },
        isActive: function(element, className, defaultActivation) {
          var no = "no-" + className;
          while (element) {
            var classList = element.classList;
            if (classList.contains(className)) {
              return true;
            }
            if (classList.contains(no)) {
              return false;
            }
            element = element.parentElement;
          }
          return !!defaultActivation;
        }
      },
      languages: {
        plain: plainTextGrammar,
        plaintext: plainTextGrammar,
        text: plainTextGrammar,
        txt: plainTextGrammar,
        extend: function(id, redef) {
          var lang2 = _2.util.clone(_2.languages[id]);
          for (var key in redef) {
            lang2[key] = redef[key];
          }
          return lang2;
        },
        insertBefore: function(inside, before, insert, root) {
          root = root || _2.languages;
          var grammar = root[inside];
          var ret = {};
          for (var token in grammar) {
            if (grammar.hasOwnProperty(token)) {
              if (token == before) {
                for (var newToken in insert) {
                  if (insert.hasOwnProperty(newToken)) {
                    ret[newToken] = insert[newToken];
                  }
                }
              }
              if (!insert.hasOwnProperty(token)) {
                ret[token] = grammar[token];
              }
            }
          }
          var old = root[inside];
          root[inside] = ret;
          _2.languages.DFS(_2.languages, function(key, value) {
            if (value === old && key != inside) {
              this[key] = ret;
            }
          });
          return ret;
        },
        DFS: function DFS(o, callback, type2, visited) {
          visited = visited || {};
          var objId = _2.util.objId;
          for (var i in o) {
            if (o.hasOwnProperty(i)) {
              callback.call(o, i, o[i], type2 || i);
              var property = o[i];
              var propertyType = _2.util.type(property);
              if (propertyType === "Object" && !visited[objId(property)]) {
                visited[objId(property)] = true;
                DFS(property, callback, null, visited);
              } else if (propertyType === "Array" && !visited[objId(property)]) {
                visited[objId(property)] = true;
                DFS(property, callback, i, visited);
              }
            }
          }
        }
      },
      plugins: {},
      highlightAll: function(async, callback) {
        _2.highlightAllUnder(document, async, callback);
      },
      highlightAllUnder: function(container, async, callback) {
        var env2 = {
          callback,
          container,
          selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
        };
        _2.hooks.run("before-highlightall", env2);
        env2.elements = Array.prototype.slice.apply(env2.container.querySelectorAll(env2.selector));
        _2.hooks.run("before-all-elements-highlight", env2);
        for (var i = 0, element;element = env2.elements[i++]; ) {
          _2.highlightElement(element, async === true, env2.callback);
        }
      },
      highlightElement: function(element, async, callback) {
        var language = _2.util.getLanguage(element);
        var grammar = _2.languages[language];
        _2.util.setLanguage(element, language);
        var parent = element.parentElement;
        if (parent && parent.nodeName.toLowerCase() === "pre") {
          _2.util.setLanguage(parent, language);
        }
        var code = element.textContent;
        var env2 = {
          element,
          language,
          grammar,
          code
        };
        function insertHighlightedCode(highlightedCode) {
          env2.highlightedCode = highlightedCode;
          _2.hooks.run("before-insert", env2);
          env2.element.innerHTML = env2.highlightedCode;
          _2.hooks.run("after-highlight", env2);
          _2.hooks.run("complete", env2);
          callback && callback.call(env2.element);
        }
        _2.hooks.run("before-sanity-check", env2);
        parent = env2.element.parentElement;
        if (parent && parent.nodeName.toLowerCase() === "pre" && !parent.hasAttribute("tabindex")) {
          parent.setAttribute("tabindex", "0");
        }
        if (!env2.code) {
          _2.hooks.run("complete", env2);
          callback && callback.call(env2.element);
          return;
        }
        _2.hooks.run("before-highlight", env2);
        if (!env2.grammar) {
          insertHighlightedCode(_2.util.encode(env2.code));
          return;
        }
        if (async && _self2.Worker) {
          var worker = new Worker(_2.filename);
          worker.onmessage = function(evt) {
            insertHighlightedCode(evt.data);
          };
          worker.postMessage(JSON.stringify({
            language: env2.language,
            code: env2.code,
            immediateClose: true
          }));
        } else {
          insertHighlightedCode(_2.highlight(env2.code, env2.grammar, env2.language));
        }
      },
      highlight: function(text2, grammar, language) {
        var env2 = {
          code: text2,
          grammar,
          language
        };
        _2.hooks.run("before-tokenize", env2);
        if (!env2.grammar) {
          throw new Error('The language "' + env2.language + '" has no grammar.');
        }
        env2.tokens = _2.tokenize(env2.code, env2.grammar);
        _2.hooks.run("after-tokenize", env2);
        return Token.stringify(_2.util.encode(env2.tokens), env2.language);
      },
      tokenize: function(text2, grammar) {
        var rest = grammar.rest;
        if (rest) {
          for (var token in rest) {
            grammar[token] = rest[token];
          }
          delete grammar.rest;
        }
        var tokenList = new LinkedList;
        addAfter(tokenList, tokenList.head, text2);
        matchGrammar(text2, tokenList, grammar, tokenList.head, 0);
        return toArray(tokenList);
      },
      hooks: {
        all: {},
        add: function(name, callback) {
          var hooks = _2.hooks.all;
          hooks[name] = hooks[name] || [];
          hooks[name].push(callback);
        },
        run: function(name, env2) {
          var callbacks = _2.hooks.all[name];
          if (!callbacks || !callbacks.length) {
            return;
          }
          for (var i = 0, callback;callback = callbacks[i++]; ) {
            callback(env2);
          }
        }
      },
      Token
    };
    _self2.Prism = _2;
    function Token(type2, content, alias, matchedStr) {
      this.type = type2;
      this.content = content;
      this.alias = alias;
      this.length = (matchedStr || "").length | 0;
    }
    Token.stringify = function stringify(o, language) {
      if (typeof o == "string") {
        return o;
      }
      if (Array.isArray(o)) {
        var s = "";
        o.forEach(function(e) {
          s += stringify(e, language);
        });
        return s;
      }
      var env2 = {
        type: o.type,
        content: stringify(o.content, language),
        tag: "span",
        classes: ["token", o.type],
        attributes: {},
        language
      };
      var aliases = o.alias;
      if (aliases) {
        if (Array.isArray(aliases)) {
          Array.prototype.push.apply(env2.classes, aliases);
        } else {
          env2.classes.push(aliases);
        }
      }
      _2.hooks.run("wrap", env2);
      var attributes = "";
      for (var name in env2.attributes) {
        attributes += " " + name + '="' + (env2.attributes[name] || "").replace(/"/g, "&quot;") + '"';
      }
      return "<" + env2.tag + ' class="' + env2.classes.join(" ") + '"' + attributes + ">" + env2.content + "</" + env2.tag + ">";
    };
    function matchPattern(pattern, pos, text2, lookbehind) {
      pattern.lastIndex = pos;
      var match = pattern.exec(text2);
      if (match && lookbehind && match[1]) {
        var lookbehindLength = match[1].length;
        match.index += lookbehindLength;
        match[0] = match[0].slice(lookbehindLength);
      }
      return match;
    }
    function matchGrammar(text2, tokenList, grammar, startNode, startPos, rematch) {
      for (var token in grammar) {
        if (!grammar.hasOwnProperty(token) || !grammar[token]) {
          continue;
        }
        var patterns = grammar[token];
        patterns = Array.isArray(patterns) ? patterns : [patterns];
        for (var j = 0;j < patterns.length; ++j) {
          if (rematch && rematch.cause == token + "," + j) {
            return;
          }
          var patternObj = patterns[j];
          var inside = patternObj.inside;
          var lookbehind = !!patternObj.lookbehind;
          var greedy = !!patternObj.greedy;
          var alias = patternObj.alias;
          if (greedy && !patternObj.pattern.global) {
            var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
            patternObj.pattern = RegExp(patternObj.pattern.source, flags + "g");
          }
          var pattern = patternObj.pattern || patternObj;
          for (var currentNode = startNode.next, pos = startPos;currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next) {
            if (rematch && pos >= rematch.reach) {
              break;
            }
            var str = currentNode.value;
            if (tokenList.length > text2.length) {
              return;
            }
            if (str instanceof Token) {
              continue;
            }
            var removeCount = 1;
            var match;
            if (greedy) {
              match = matchPattern(pattern, pos, text2, lookbehind);
              if (!match || match.index >= text2.length) {
                break;
              }
              var from = match.index;
              var to = match.index + match[0].length;
              var p2 = pos;
              p2 += currentNode.value.length;
              while (from >= p2) {
                currentNode = currentNode.next;
                p2 += currentNode.value.length;
              }
              p2 -= currentNode.value.length;
              pos = p2;
              if (currentNode.value instanceof Token) {
                continue;
              }
              for (var k2 = currentNode;k2 !== tokenList.tail && (p2 < to || typeof k2.value === "string"); k2 = k2.next) {
                removeCount++;
                p2 += k2.value.length;
              }
              removeCount--;
              str = text2.slice(pos, p2);
              match.index -= pos;
            } else {
              match = matchPattern(pattern, 0, str, lookbehind);
              if (!match) {
                continue;
              }
            }
            var from = match.index;
            var matchStr = match[0];
            var before = str.slice(0, from);
            var after = str.slice(from + matchStr.length);
            var reach = pos + str.length;
            if (rematch && reach > rematch.reach) {
              rematch.reach = reach;
            }
            var removeFrom = currentNode.prev;
            if (before) {
              removeFrom = addAfter(tokenList, removeFrom, before);
              pos += before.length;
            }
            removeRange(tokenList, removeFrom, removeCount);
            var wrapped = new Token(token, inside ? _2.tokenize(matchStr, inside) : matchStr, alias, matchStr);
            currentNode = addAfter(tokenList, removeFrom, wrapped);
            if (after) {
              addAfter(tokenList, currentNode, after);
            }
            if (removeCount > 1) {
              var nestedRematch = {
                cause: token + "," + j,
                reach
              };
              matchGrammar(text2, tokenList, grammar, currentNode.prev, pos, nestedRematch);
              if (rematch && nestedRematch.reach > rematch.reach) {
                rematch.reach = nestedRematch.reach;
              }
            }
          }
        }
      }
    }
    function LinkedList() {
      var head = { value: null, prev: null, next: null };
      var tail = { value: null, prev: head, next: null };
      head.next = tail;
      this.head = head;
      this.tail = tail;
      this.length = 0;
    }
    function addAfter(list, node2, value) {
      var next = node2.next;
      var newNode = { value, prev: node2, next };
      node2.next = newNode;
      next.prev = newNode;
      list.length++;
      return newNode;
    }
    function removeRange(list, node2, count2) {
      var next = node2.next;
      for (var i = 0;i < count2 && next !== list.tail; i++) {
        next = next.next;
      }
      node2.next = next;
      next.prev = node2;
      list.length -= i;
    }
    function toArray(list) {
      var array2 = [];
      var node2 = list.head.next;
      while (node2 !== list.tail) {
        array2.push(node2.value);
        node2 = node2.next;
      }
      return array2;
    }
    if (!_self2.document) {
      if (!_self2.addEventListener) {
        return _2;
      }
      if (!_2.disableWorkerMessageHandler) {
        _self2.addEventListener("message", function(evt) {
          var message = JSON.parse(evt.data);
          var lang2 = message.language;
          var code = message.code;
          var immediateClose = message.immediateClose;
          _self2.postMessage(_2.highlight(code, _2.languages[lang2], lang2));
          if (immediateClose) {
            _self2.close();
          }
        }, false);
      }
      return _2;
    }
    var script = _2.util.currentScript();
    if (script) {
      _2.filename = script.src;
      if (script.hasAttribute("data-manual")) {
        _2.manual = true;
      }
    }
    function highlightAutomaticallyCallback() {
      if (!_2.manual) {
        _2.highlightAll();
      }
    }
    if (!_2.manual) {
      var readyState = document.readyState;
      if (readyState === "loading" || readyState === "interactive" && script && script.defer) {
        document.addEventListener("DOMContentLoaded", highlightAutomaticallyCallback);
      } else {
        if (window.requestAnimationFrame) {
          window.requestAnimationFrame(highlightAutomaticallyCallback);
        } else {
          window.setTimeout(highlightAutomaticallyCallback, 16);
        }
      }
    }
    return _2;
  }(_self);
  if (typeof module !== "undefined" && module.exports) {
    module.exports = Prism;
  }
  if (typeof global !== "undefined") {
    global.Prism = Prism;
  }
  Prism.languages.markup = {
    comment: {
      pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
      greedy: true
    },
    prolog: {
      pattern: /<\?[\s\S]+?\?>/,
      greedy: true
    },
    doctype: {
      pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
      greedy: true,
      inside: {
        "internal-subset": {
          pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
          lookbehind: true,
          greedy: true,
          inside: null
        },
        string: {
          pattern: /"[^"]*"|'[^']*'/,
          greedy: true
        },
        punctuation: /^<!|>$|[[\]]/,
        "doctype-tag": /^DOCTYPE/i,
        name: /[^\s<>'"]+/
      }
    },
    cdata: {
      pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
      greedy: true
    },
    tag: {
      pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
      greedy: true,
      inside: {
        tag: {
          pattern: /^<\/?[^\s>\/]+/,
          inside: {
            punctuation: /^<\/?/,
            namespace: /^[^\s>\/:]+:/
          }
        },
        "special-attr": [],
        "attr-value": {
          pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
          inside: {
            punctuation: [
              {
                pattern: /^=/,
                alias: "attr-equals"
              },
              {
                pattern: /^(\s*)["']|["']$/,
                lookbehind: true
              }
            ]
          }
        },
        punctuation: /\/?>/,
        "attr-name": {
          pattern: /[^\s>\/]+/,
          inside: {
            namespace: /^[^\s>\/:]+:/
          }
        }
      }
    },
    entity: [
      {
        pattern: /&[\da-z]{1,8};/i,
        alias: "named-entity"
      },
      /&#x?[\da-f]{1,8};/i
    ]
  };
  Prism.languages.markup["tag"].inside["attr-value"].inside["entity"] = Prism.languages.markup["entity"];
  Prism.languages.markup["doctype"].inside["internal-subset"].inside = Prism.languages.markup;
  Prism.hooks.add("wrap", function(env2) {
    if (env2.type === "entity") {
      env2.attributes["title"] = env2.content.replace(/&amp;/, "&");
    }
  });
  Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
    value: function addInlined(tagName, lang) {
      var includedCdataInside = {};
      includedCdataInside["language-" + lang] = {
        pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
        lookbehind: true,
        inside: Prism.languages[lang]
      };
      includedCdataInside["cdata"] = /^<!\[CDATA\[|\]\]>$/i;
      var inside = {
        "included-cdata": {
          pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
          inside: includedCdataInside
        }
      };
      inside["language-" + lang] = {
        pattern: /[\s\S]+/,
        inside: Prism.languages[lang]
      };
      var def = {};
      def[tagName] = {
        pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
          return tagName;
        }), "i"),
        lookbehind: true,
        greedy: true,
        inside
      };
      Prism.languages.insertBefore("markup", "cdata", def);
    }
  });
  Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
    value: function(attrName, lang) {
      Prism.languages.markup.tag.inside["special-attr"].push({
        pattern: RegExp(/(^|["'\s])/.source + "(?:" + attrName + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"),
        lookbehind: true,
        inside: {
          "attr-name": /^[^\s=]+/,
          "attr-value": {
            pattern: /=[\s\S]+/,
            inside: {
              value: {
                pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
                lookbehind: true,
                alias: [lang, "language-" + lang],
                inside: Prism.languages[lang]
              },
              punctuation: [
                {
                  pattern: /^=/,
                  alias: "attr-equals"
                },
                /"|'/
              ]
            }
          }
        }
      });
    }
  });
  Prism.languages.html = Prism.languages.markup;
  Prism.languages.mathml = Prism.languages.markup;
  Prism.languages.svg = Prism.languages.markup;
  Prism.languages.xml = Prism.languages.extend("markup", {});
  Prism.languages.ssml = Prism.languages.xml;
  Prism.languages.atom = Prism.languages.xml;
  Prism.languages.rss = Prism.languages.xml;
  (function(Prism2) {
    var string4 = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
    Prism2.languages.css = {
      comment: /\/\*[\s\S]*?\*\//,
      atrule: {
        pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + string4.source + ")*?" + /(?:;|(?=\s*\{))/.source),
        inside: {
          rule: /^@[\w-]+/,
          "selector-function-argument": {
            pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
            lookbehind: true,
            alias: "selector"
          },
          keyword: {
            pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
            lookbehind: true
          }
        }
      },
      url: {
        pattern: RegExp("\\burl\\((?:" + string4.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
        greedy: true,
        inside: {
          function: /^url/i,
          punctuation: /^\(|\)$/,
          string: {
            pattern: RegExp("^" + string4.source + "$"),
            alias: "url"
          }
        }
      },
      selector: {
        pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + string4.source + ")*(?=\\s*\\{)"),
        lookbehind: true
      },
      string: {
        pattern: string4,
        greedy: true
      },
      property: {
        pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
        lookbehind: true
      },
      important: /!important\b/i,
      function: {
        pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
        lookbehind: true
      },
      punctuation: /[(){};:,]/
    };
    Prism2.languages.css["atrule"].inside.rest = Prism2.languages.css;
    var markup = Prism2.languages.markup;
    if (markup) {
      markup.tag.addInlined("style", "css");
      markup.tag.addAttribute("style", "css");
    }
  })(Prism);
  Prism.languages.clike = {
    comment: [
      {
        pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
        lookbehind: true,
        greedy: true
      },
      {
        pattern: /(^|[^\\:])\/\/.*/,
        lookbehind: true,
        greedy: true
      }
    ],
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    "class-name": {
      pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
      lookbehind: true,
      inside: {
        punctuation: /[.\\]/
      }
    },
    keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
    boolean: /\b(?:false|true)\b/,
    function: /\b\w+(?=\()/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
    punctuation: /[{}[\];(),.:]/
  };
  Prism.languages.javascript = Prism.languages.extend("clike", {
    "class-name": [
      Prism.languages.clike["class-name"],
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
        lookbehind: true
      }
    ],
    keyword: [
      {
        pattern: /((?:^|\})\s*)catch\b/,
        lookbehind: true
      },
      {
        pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
        lookbehind: true
      }
    ],
    function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
    number: {
      pattern: RegExp(/(^|[^\w$])/.source + "(?:" + (/NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source),
      lookbehind: true
    },
    operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
  });
  Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
  Prism.languages.insertBefore("javascript", "keyword", {
    regex: {
      pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),
      lookbehind: true,
      greedy: true,
      inside: {
        "regex-source": {
          pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
          lookbehind: true,
          alias: "language-regex",
          inside: Prism.languages.regex
        },
        "regex-delimiter": /^\/|\/$/,
        "regex-flags": /^[a-z]+$/
      }
    },
    "function-variable": {
      pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
      alias: "function"
    },
    parameter: [
      {
        pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
        lookbehind: true,
        inside: Prism.languages.javascript
      },
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
        lookbehind: true,
        inside: Prism.languages.javascript
      },
      {
        pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
        lookbehind: true,
        inside: Prism.languages.javascript
      },
      {
        pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
        lookbehind: true,
        inside: Prism.languages.javascript
      }
    ],
    constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
  });
  Prism.languages.insertBefore("javascript", "string", {
    hashbang: {
      pattern: /^#!.*/,
      greedy: true,
      alias: "comment"
    },
    "template-string": {
      pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
      greedy: true,
      inside: {
        "template-punctuation": {
          pattern: /^`|`$/,
          alias: "string"
        },
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
          lookbehind: true,
          inside: {
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            rest: Prism.languages.javascript
          }
        },
        string: /[\s\S]+/
      }
    },
    "string-property": {
      pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
      lookbehind: true,
      greedy: true,
      alias: "property"
    }
  });
  Prism.languages.insertBefore("javascript", "operator", {
    "literal-property": {
      pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
      lookbehind: true,
      alias: "property"
    }
  });
  if (Prism.languages.markup) {
    Prism.languages.markup.tag.addInlined("script", "javascript");
    Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript");
  }
  Prism.languages.js = Prism.languages.javascript;
  (function() {
    if (typeof Prism === "undefined" || typeof document === "undefined") {
      return;
    }
    if (!Element.prototype.matches) {
      Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
    }
    var LOADING_MESSAGE = "Loading…";
    var FAILURE_MESSAGE = function(status, message) {
      return "✖ Error " + status + " while fetching file: " + message;
    };
    var FAILURE_EMPTY_MESSAGE = "✖ Error: File does not exist or is empty";
    var EXTENSIONS = {
      js: "javascript",
      py: "python",
      rb: "ruby",
      ps1: "powershell",
      psm1: "powershell",
      sh: "bash",
      bat: "batch",
      h: "c",
      tex: "latex"
    };
    var STATUS_ATTR = "data-src-status";
    var STATUS_LOADING = "loading";
    var STATUS_LOADED = "loaded";
    var STATUS_FAILED = "failed";
    var SELECTOR = "pre[data-src]:not([" + STATUS_ATTR + '="' + STATUS_LOADED + '"])' + ":not([" + STATUS_ATTR + '="' + STATUS_LOADING + '"])';
    function loadFile(src, success2, error49) {
      var xhr = new XMLHttpRequest;
      xhr.open("GET", src, true);
      xhr.onreadystatechange = function() {
        if (xhr.readyState == 4) {
          if (xhr.status < 400 && xhr.responseText) {
            success2(xhr.responseText);
          } else {
            if (xhr.status >= 400) {
              error49(FAILURE_MESSAGE(xhr.status, xhr.statusText));
            } else {
              error49(FAILURE_EMPTY_MESSAGE);
            }
          }
        }
      };
      xhr.send(null);
    }
    function parseRange(range) {
      var m2 = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(range || "");
      if (m2) {
        var start = Number(m2[1]);
        var comma = m2[2];
        var end = m2[3];
        if (!comma) {
          return [start, start];
        }
        if (!end) {
          return [start, undefined];
        }
        return [start, Number(end)];
      }
      return;
    }
    Prism.hooks.add("before-highlightall", function(env2) {
      env2.selector += ", " + SELECTOR;
    });
    Prism.hooks.add("before-sanity-check", function(env2) {
      var pre = env2.element;
      if (pre.matches(SELECTOR)) {
        env2.code = "";
        pre.setAttribute(STATUS_ATTR, STATUS_LOADING);
        var code = pre.appendChild(document.createElement("CODE"));
        code.textContent = LOADING_MESSAGE;
        var src = pre.getAttribute("data-src");
        var language = env2.language;
        if (language === "none") {
          var extension = (/\.(\w+)$/.exec(src) || [, "none"])[1];
          language = EXTENSIONS[extension] || extension;
        }
        Prism.util.setLanguage(code, language);
        Prism.util.setLanguage(pre, language);
        var autoloader = Prism.plugins.autoloader;
        if (autoloader) {
          autoloader.loadLanguages(language);
        }
        loadFile(src, function(text2) {
          pre.setAttribute(STATUS_ATTR, STATUS_LOADED);
          var range = parseRange(pre.getAttribute("data-range"));
          if (range) {
            var lines = text2.split(/\r\n?|\n/g);
            var start = range[0];
            var end = range[1] == null ? lines.length : range[1];
            if (start < 0) {
              start += lines.length;
            }
            start = Math.max(0, Math.min(start - 1, lines.length));
            if (end < 0) {
              end += lines.length;
            }
            end = Math.max(0, Math.min(end, lines.length));
            text2 = lines.slice(start, end).join(`
`);
            if (!pre.hasAttribute("data-start")) {
              pre.setAttribute("data-start", String(start + 1));
            }
          }
          code.textContent = text2;
          Prism.highlightElement(code);
        }, function(error49) {
          pre.setAttribute(STATUS_ATTR, STATUS_FAILED);
          code.textContent = error49;
        });
      }
    });
    Prism.plugins.fileHighlight = {
      highlight: function highlight(container) {
        var elements = (container || document).querySelectorAll(SELECTOR);
        for (var i = 0, element;element = elements[i++]; ) {
          Prism.highlightElement(element);
        }
      }
    };
    var logged = false;
    Prism.fileHighlight = function() {
      if (!logged) {
        console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.");
        logged = true;
      }
      Prism.plugins.fileHighlight.highlight.apply(this, arguments);
    };
  })();
});

// ../../node_modules/.pnpm/@react-email+code-block@0.2.1_react@19.2.7/node_modules/@react-email/code-block/dist/index.mjs
var React$1, PrismImport, import_jsx_runtime3, Prism$1, stylesForToken = (token, theme) => {
  let styles = { ...theme[token.type] };
  const aliases = Array.isArray(token.alias) ? token.alias : [token.alias];
  for (const alias of aliases)
    styles = {
      ...styles,
      ...theme[alias]
    };
  return styles;
}, CodeBlockLine = ({ token, theme, inheritedStyles }) => {
  if (token instanceof Prism$1.Token) {
    const styleForToken = {
      ...inheritedStyles,
      ...stylesForToken(token, theme)
    };
    if (token.content instanceof Prism$1.Token)
      return /* @__PURE__ */ import_jsx_runtime3.jsx("span", {
        style: styleForToken,
        children: /* @__PURE__ */ import_jsx_runtime3.jsx(CodeBlockLine, {
          theme,
          token: token.content
        })
      });
    if (typeof token.content === "string")
      return /* @__PURE__ */ import_jsx_runtime3.jsx("span", {
        style: styleForToken,
        children: token.content
      });
    return /* @__PURE__ */ import_jsx_runtime3.jsx(import_jsx_runtime3.Fragment, { children: token.content.map((subToken, i) => /* @__PURE__ */ import_jsx_runtime3.jsx(CodeBlockLine, {
      inheritedStyles: styleForToken,
      theme,
      token: subToken
    }, i)) });
  }
  return /* @__PURE__ */ import_jsx_runtime3.jsx("span", {
    style: inheritedStyles,
    children: token.replaceAll(" ", " ‍​")
  });
}, CodeBlock, xonokai, vscDarkPlus, duotoneForest, holiTheme, cb, vs, materialDark, dracula, shadesOfPurple, gruvboxDark, baseAteliersulphurpoolLight, coldarkCold, solarizedDarkAtom, synthwave84, materialOceanic, duotoneSpace, materialLight, duotoneSea, a11yDark, darcula, zTouch, duotoneEarth, gruvboxLight, oneDark, duotoneDark, lucario, coldarkDark, atomDark, pojoaque, duotoneLight, nightOwl, laserwave, coyWithoutShadows, hopscotch, oneLight, nord, ghcolors, vesper;
var init_dist3 = __esm(() => {
  React$1 = __toESM(require_react(), 1);
  PrismImport = __toESM(require_prism(), 1);
  import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  Prism$1 = PrismImport.default ?? PrismImport;
  Prism$1.languages.markup = {
    comment: {
      pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
      greedy: true
    },
    prolog: {
      pattern: /<\?[\s\S]+?\?>/,
      greedy: true
    },
    doctype: {
      pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
      greedy: true,
      inside: {
        "internal-subset": {
          pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
          lookbehind: true,
          greedy: true,
          inside: null
        },
        string: {
          pattern: /"[^"]*"|'[^']*'/,
          greedy: true
        },
        punctuation: /^<!|>$|[[\]]/,
        "doctype-tag": /^DOCTYPE/i,
        name: /[^\s<>'"]+/
      }
    },
    cdata: {
      pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
      greedy: true
    },
    tag: {
      pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
      greedy: true,
      inside: {
        tag: {
          pattern: /^<\/?[^\s>\/]+/,
          inside: {
            punctuation: /^<\/?/,
            namespace: /^[^\s>\/:]+:/
          }
        },
        "special-attr": [],
        "attr-value": {
          pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
          inside: { punctuation: [{
            pattern: /^=/,
            alias: "attr-equals"
          }, {
            pattern: /^(\s*)["']|["']$/,
            lookbehind: true
          }] }
        },
        punctuation: /\/?>/,
        "attr-name": {
          pattern: /[^\s>\/]+/,
          inside: { namespace: /^[^\s>\/:]+:/ }
        }
      }
    },
    entity: [{
      pattern: /&[\da-z]{1,8};/i,
      alias: "named-entity"
    }, /&#x?[\da-f]{1,8};/i]
  }, Prism$1.languages.markup.tag.inside["attr-value"].inside.entity = Prism$1.languages.markup.entity, Prism$1.languages.markup.doctype.inside["internal-subset"].inside = Prism$1.languages.markup, Prism$1.hooks.add("wrap", function(e) {
    e.type === "entity" && (e.attributes.title = e.content.replace(/&amp;/, "&"));
  }), Object.defineProperty(Prism$1.languages.markup.tag, "addInlined", { value: function(e, t) {
    var n2 = {}, n2 = (n2["language-" + t] = {
      pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
      lookbehind: true,
      inside: Prism$1.languages[t]
    }, n2.cdata = /^<!\[CDATA\[|\]\]>$/i, { "included-cdata": {
      pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
      inside: n2
    } }), t = (n2["language-" + t] = {
      pattern: /[\s\S]+/,
      inside: Prism$1.languages[t]
    }, {});
    t[e] = {
      pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
        return e;
      }), "i"),
      lookbehind: true,
      greedy: true,
      inside: n2
    }, Prism$1.languages.insertBefore("markup", "cdata", t);
  } }), Object.defineProperty(Prism$1.languages.markup.tag, "addAttribute", { value: function(e, t) {
    Prism$1.languages.markup.tag.inside["special-attr"].push({
      pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"),
      lookbehind: true,
      inside: {
        "attr-name": /^[^\s=]+/,
        "attr-value": {
          pattern: /=[\s\S]+/,
          inside: {
            value: {
              pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
              lookbehind: true,
              alias: [t, "language-" + t],
              inside: Prism$1.languages[t]
            },
            punctuation: [{
              pattern: /^=/,
              alias: "attr-equals"
            }, /"|'/]
          }
        }
      }
    });
  } }), Prism$1.languages.html = Prism$1.languages.markup, Prism$1.languages.mathml = Prism$1.languages.markup, Prism$1.languages.svg = Prism$1.languages.markup, Prism$1.languages.xml = Prism$1.languages.extend("markup", {}), Prism$1.languages.ssml = Prism$1.languages.xml, Prism$1.languages.atom = Prism$1.languages.xml, Prism$1.languages.rss = Prism$1.languages.xml, function(e) {
    var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/, t = (e.languages.css = {
      comment: /\/\*[\s\S]*?\*\//,
      atrule: {
        pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + t.source + ")*?" + /(?:;|(?=\s*\{))/.source),
        inside: {
          rule: /^@[\w-]+/,
          "selector-function-argument": {
            pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
            lookbehind: true,
            alias: "selector"
          },
          keyword: {
            pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
            lookbehind: true
          }
        }
      },
      url: {
        pattern: RegExp("\\burl\\((?:" + t.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
        greedy: true,
        inside: {
          function: /^url/i,
          punctuation: /^\(|\)$/,
          string: {
            pattern: RegExp("^" + t.source + "$"),
            alias: "url"
          }
        }
      },
      selector: {
        pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + t.source + ")*(?=\\s*\\{)"),
        lookbehind: true
      },
      string: {
        pattern: t,
        greedy: true
      },
      property: {
        pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
        lookbehind: true
      },
      important: /!important\b/i,
      function: {
        pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
        lookbehind: true
      },
      punctuation: /[(){};:,]/
    }, e.languages.css.atrule.inside.rest = e.languages.css, e.languages.markup);
    t && (t.tag.addInlined("style", "css"), t.tag.addAttribute("style", "css"));
  }(Prism$1), Prism$1.languages.clike = {
    comment: [{
      pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
      lookbehind: true,
      greedy: true
    }, {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: true,
      greedy: true
    }],
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    "class-name": {
      pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
      lookbehind: true,
      inside: { punctuation: /[.\\]/ }
    },
    keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
    boolean: /\b(?:false|true)\b/,
    function: /\b\w+(?=\()/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
    punctuation: /[{}[\];(),.:]/
  }, function(e) {
    var t = {
      pattern: /\\[\\(){}[\]^$+*?|.]/,
      alias: "escape"
    }, n2 = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/, a = "(?:[^\\\\-]|" + n2.source + ")", a = RegExp(a + "-" + a), r = {
      pattern: /(<|')[^<>']+(?=[>']$)/,
      lookbehind: true,
      alias: "variable"
    };
    e.languages.regex = {
      "char-class": {
        pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,
        lookbehind: true,
        inside: {
          "char-class-negation": {
            pattern: /(^\[)\^/,
            lookbehind: true,
            alias: "operator"
          },
          "char-class-punctuation": {
            pattern: /^\[|\]$/,
            alias: "punctuation"
          },
          range: {
            pattern: a,
            inside: {
              escape: n2,
              "range-punctuation": {
                pattern: /-/,
                alias: "operator"
              }
            }
          },
          "special-escape": t,
          "char-set": {
            pattern: /\\[wsd]|\\p\{[^{}]+\}/i,
            alias: "class-name"
          },
          escape: n2
        }
      },
      "special-escape": t,
      "char-set": {
        pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i,
        alias: "class-name"
      },
      backreference: [{
        pattern: /\\(?![123][0-7]{2})[1-9]/,
        alias: "keyword"
      }, {
        pattern: /\\k<[^<>']+>/,
        alias: "keyword",
        inside: { "group-name": r }
      }],
      anchor: {
        pattern: /[$^]|\\[ABbGZz]/,
        alias: "function"
      },
      escape: n2,
      group: [{
        pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,
        alias: "punctuation",
        inside: { "group-name": r }
      }, {
        pattern: /\)/,
        alias: "punctuation"
      }],
      quantifier: {
        pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,
        alias: "number"
      },
      alternation: {
        pattern: /\|/,
        alias: "keyword"
      }
    };
  }(Prism$1), Prism$1.languages.javascript = Prism$1.languages.extend("clike", {
    "class-name": [Prism$1.languages.clike["class-name"], {
      pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
      lookbehind: true
    }],
    keyword: [{
      pattern: /((?:^|\})\s*)catch\b/,
      lookbehind: true
    }, {
      pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
      lookbehind: true
    }],
    function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
    number: {
      pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source),
      lookbehind: true
    },
    operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
  }), Prism$1.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism$1.languages.insertBefore("javascript", "keyword", {
    regex: {
      pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),
      lookbehind: true,
      greedy: true,
      inside: {
        "regex-source": {
          pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
          lookbehind: true,
          alias: "language-regex",
          inside: Prism$1.languages.regex
        },
        "regex-delimiter": /^\/|\/$/,
        "regex-flags": /^[a-z]+$/
      }
    },
    "function-variable": {
      pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
      alias: "function"
    },
    parameter: [
      {
        pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
        lookbehind: true,
        inside: Prism$1.languages.javascript
      },
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
        lookbehind: true,
        inside: Prism$1.languages.javascript
      },
      {
        pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
        lookbehind: true,
        inside: Prism$1.languages.javascript
      },
      {
        pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
        lookbehind: true,
        inside: Prism$1.languages.javascript
      }
    ],
    constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
  }), Prism$1.languages.insertBefore("javascript", "string", {
    hashbang: {
      pattern: /^#!.*/,
      greedy: true,
      alias: "comment"
    },
    "template-string": {
      pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
      greedy: true,
      inside: {
        "template-punctuation": {
          pattern: /^`|`$/,
          alias: "string"
        },
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
          lookbehind: true,
          inside: {
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            rest: Prism$1.languages.javascript
          }
        },
        string: /[\s\S]+/
      }
    },
    "string-property": {
      pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
      lookbehind: true,
      greedy: true,
      alias: "property"
    }
  }), Prism$1.languages.insertBefore("javascript", "operator", { "literal-property": {
    pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
    lookbehind: true,
    alias: "property"
  } }), Prism$1.languages.markup && (Prism$1.languages.markup.tag.addInlined("script", "javascript"), Prism$1.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism$1.languages.js = Prism$1.languages.javascript, Prism$1.languages.abap = {
    comment: /^\*.*/m,
    string: /(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
    "string-template": {
      pattern: /([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,
      lookbehind: true,
      alias: "string"
    },
    "eol-comment": {
      pattern: /(^|\s)".*/m,
      lookbehind: true,
      alias: "comment"
    },
    keyword: {
      pattern: /(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,
      lookbehind: true
    },
    number: /\b\d+\b/,
    operator: {
      pattern: /(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,
      lookbehind: true
    },
    "string-operator": {
      pattern: /(\s)&&?(?=\s)/,
      lookbehind: true,
      alias: "keyword"
    },
    "token-operator": [{
      pattern: /(\w)(?:->?|=>|[~|{}])(?=\w)/,
      lookbehind: true,
      alias: "punctuation"
    }, {
      pattern: /[|{}]/,
      alias: "punctuation"
    }],
    punctuation: /[,.:()]/
  }, function() {
    var e = "(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";
    Prism$1.languages.abnf = {
      comment: /;.*/,
      string: {
        pattern: /(?:%[is])?"[^"\n\r]*"/,
        greedy: true,
        inside: { punctuation: /^%[is]/ }
      },
      range: {
        pattern: /%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,
        alias: "number"
      },
      terminal: {
        pattern: /%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,
        alias: "number"
      },
      repetition: {
        pattern: /(^|[^\w-])(?:\d*\*\d*|\d+)/,
        lookbehind: true,
        alias: "operator"
      },
      definition: {
        pattern: /(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,
        lookbehind: true,
        alias: "keyword",
        inside: { punctuation: /<|>/ }
      },
      "core-rule": {
        pattern: RegExp("(?:(^|[^<\\w-])" + e + "|<" + e + ">)(?![\\w-])", "i"),
        lookbehind: true,
        alias: ["rule", "constant"],
        inside: { punctuation: /<|>/ }
      },
      rule: {
        pattern: /(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,
        lookbehind: true,
        inside: { punctuation: /<|>/ }
      },
      operator: /=\/?|\//,
      punctuation: /[()\[\]]/
    };
  }(), Prism$1.languages.actionscript = Prism$1.languages.extend("javascript", {
    keyword: /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,
    operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/
  }), Prism$1.languages.actionscript["class-name"].alias = "function", delete Prism$1.languages.actionscript.parameter, delete Prism$1.languages.actionscript["literal-property"], Prism$1.languages.markup && Prism$1.languages.insertBefore("actionscript", "string", { xml: {
    pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,
    lookbehind: true,
    inside: Prism$1.languages.markup
  } }), Prism$1.languages.ada = {
    comment: /--.*/,
    string: /"(?:""|[^"\r\f\n])*"/,
    number: [{ pattern: /\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i }, { pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i }],
    attribute: {
      pattern: /\b'\w+/,
      alias: "attr-name"
    },
    keyword: /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
    boolean: /\b(?:false|true)\b/i,
    operator: /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,
    punctuation: /\.\.?|[,;():]/,
    char: /'.'/,
    variable: /\b[a-z](?:\w)*\b/i
  }, Prism$1.languages.agda = {
    comment: /\{-[\s\S]*?(?:-\}|$)|--.*/,
    string: {
      pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
      greedy: true
    },
    punctuation: /[(){}⦃⦄.;@]/,
    "class-name": {
      pattern: /((?:data|record) +)\S+/,
      lookbehind: true
    },
    function: {
      pattern: /(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,
      lookbehind: true
    },
    operator: {
      pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,
      lookbehind: true
    },
    keyword: /\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/
  }, Prism$1.languages.al = {
    comment: /\/\/.*|\/\*[\s\S]*?\*\//,
    string: {
      pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,
      greedy: true
    },
    function: {
      pattern: /(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,
      lookbehind: true
    },
    keyword: [/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i, /\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],
    number: /\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,
    boolean: /\b(?:false|true)\b/i,
    variable: /\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,
    "class-name": /\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,
    operator: /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,
    punctuation: /[()\[\]{}:.;,]/
  }, Prism$1.languages.antlr4 = {
    comment: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
    string: {
      pattern: /'(?:\\.|[^\\'\r\n])*'/,
      greedy: true
    },
    "character-class": {
      pattern: /\[(?:\\.|[^\\\]\r\n])*\]/,
      greedy: true,
      alias: "regex",
      inside: {
        range: {
          pattern: /([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,
          lookbehind: true,
          alias: "punctuation"
        },
        escape: /\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,
        punctuation: /[\[\]]/
      }
    },
    action: {
      pattern: /\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,
      greedy: true,
      inside: {
        content: {
          pattern: /(\{)[\s\S]+(?=\})/,
          lookbehind: true
        },
        punctuation: /[{}]/
      }
    },
    command: {
      pattern: /(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,
      lookbehind: true,
      inside: {
        function: /\b\w+(?=\s*(?:[,(]|$))/,
        punctuation: /[,()]/
      }
    },
    annotation: {
      pattern: /@\w+(?:::\w+)*/,
      alias: "keyword"
    },
    label: {
      pattern: /#[ \t]*\w+/,
      alias: "punctuation"
    },
    keyword: /\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,
    definition: [{
      pattern: /\b[a-z]\w*(?=\s*:)/,
      alias: ["rule", "class-name"]
    }, {
      pattern: /\b[A-Z]\w*(?=\s*:)/,
      alias: ["token", "constant"]
    }],
    constant: /\b[A-Z][A-Z_]*\b/,
    operator: /\.\.|->|[|~]|[*+?]\??/,
    punctuation: /[;:()=]/
  }, Prism$1.languages.g4 = Prism$1.languages.antlr4, Prism$1.languages.apacheconf = {
    comment: /#.*/,
    "directive-inline": {
      pattern: /(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,
      lookbehind: true,
      alias: "property"
    },
    "directive-block": {
      pattern: /<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,
      inside: {
        "directive-block": {
          pattern: /^<\/?\w+/,
          inside: { punctuation: /^<\/?/ },
          alias: "tag"
        },
        "directive-block-parameter": {
          pattern: /.*[^>]/,
          inside: {
            punctuation: /:/,
            string: {
              pattern: /("|').*\1/,
              inside: { variable: /[$%]\{?(?:\w\.?[-+:]?)+\}?/ }
            }
          },
          alias: "attr-value"
        },
        punctuation: />/
      },
      alias: "tag"
    },
    "directive-flags": {
      pattern: /\[(?:[\w=],?)+\]/,
      alias: "keyword"
    },
    string: {
      pattern: /("|').*\1/,
      inside: { variable: /[$%]\{?(?:\w\.?[-+:]?)+\}?/ }
    },
    variable: /[$%]\{?(?:\w\.?[-+:]?)+\}?/,
    regex: /\^?.*\$|\^.*\$?/
  }, Prism$1.languages.sql = {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
      lookbehind: true
    },
    variable: [{
      pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
      greedy: true
    }, /@[\w.$]+/],
    string: {
      pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
      greedy: true,
      lookbehind: true
    },
    identifier: {
      pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
      greedy: true,
      lookbehind: true,
      inside: { punctuation: /^`|`$/ }
    },
    function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,
    keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
    boolean: /\b(?:FALSE|NULL|TRUE)\b/i,
    number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
    operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
    punctuation: /[;[\]()`,.]/
  }, function(e) {
    var t = /\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i, n2 = /\b(?:(?=[a-z_]\w*\s*[<\[])|(?!<keyword>))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source.replace(/<keyword>/g, function() {
      return t.source;
    });
    function a(e$1) {
      return RegExp(e$1.replace(/<CLASS-NAME>/g, function() {
        return n2;
      }), "i");
    }
    var r = {
      keyword: t,
      punctuation: /[()\[\]{};,:.<>]/
    };
    e.languages.apex = {
      comment: e.languages.clike.comment,
      string: e.languages.clike.string,
      sql: {
        pattern: /((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,
        lookbehind: true,
        greedy: true,
        alias: "language-sql",
        inside: e.languages.sql
      },
      annotation: {
        pattern: /@\w+\b/,
        alias: "punctuation"
      },
      "class-name": [
        {
          pattern: a(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)<CLASS-NAME>/.source),
          lookbehind: true,
          inside: r
        },
        {
          pattern: a(/(\(\s*)<CLASS-NAME>(?=\s*\)\s*[\w(])/.source),
          lookbehind: true,
          inside: r
        },
        {
          pattern: a(/<CLASS-NAME>(?=\s*\w+\s*[;=,(){:])/.source),
          inside: r
        }
      ],
      trigger: {
        pattern: /(\btrigger\s+)\w+\b/i,
        lookbehind: true,
        alias: "class-name"
      },
      keyword: t,
      function: /\b[a-z_]\w*(?=\s*\()/i,
      boolean: /\b(?:false|true)\b/i,
      number: /(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,
      operator: /[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<<?=?|>{1,3}=?/,
      punctuation: /[()\[\]{};,.]/
    };
  }(Prism$1), Prism$1.languages.apl = {
    comment: /(?:⍝|#[! ]).*$/m,
    string: {
      pattern: /'(?:[^'\r\n]|'')*'/,
      greedy: true
    },
    number: /¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
    statement: /:[A-Z][a-z][A-Za-z]*\b/,
    "system-function": {
      pattern: /⎕[A-Z]+/i,
      alias: "function"
    },
    constant: /[⍬⌾#⎕⍞]/,
    function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
    "monadic-operator": {
      pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
      alias: "operator"
    },
    "dyadic-operator": {
      pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
      alias: "operator"
    },
    assignment: {
      pattern: /←/,
      alias: "keyword"
    },
    punctuation: /[\[;\]()◇⋄]/,
    dfn: {
      pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
      alias: "builtin"
    }
  }, Prism$1.languages.applescript = {
    comment: [
      /\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,
      /--.+/,
      /#.+/
    ],
    string: /"(?:\\.|[^"\\\r\n])*"/,
    number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,
    operator: [/[&=≠≤≥*+\-\/÷^]|[<>]=?/, /\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],
    keyword: /\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,
    "class-name": /\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,
    punctuation: /[{}():,¬«»《》]/
  }, Prism$1.languages.aql = {
    comment: /\/\/.*|\/\*[\s\S]*?\*\//,
    property: {
      pattern: /([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
      greedy: true
    },
    identifier: {
      pattern: /([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
      greedy: true
    },
    variable: /@@?\w+/,
    keyword: [
      {
        pattern: /(\bWITH\s+)COUNT(?=\s+INTO\b)/i,
        lookbehind: true
      },
      /\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,
      {
        pattern: /(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,
        lookbehind: true
      },
      {
        pattern: /(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,
        lookbehind: true
      },
      { pattern: /\bOPTIONS(?=\s*\{)/i }
    ],
    function: /\b(?!\d)\w+(?=\s*\()/,
    boolean: /\b(?:false|true)\b/i,
    range: {
      pattern: /\.\./,
      alias: "operator"
    },
    number: [
      /\b0b[01]+/i,
      /\b0x[0-9a-f]+/i,
      /(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i
    ],
    operator: /\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,
    punctuation: /::|[?.:,;()[\]{}]/
  }, Prism$1.languages.c = Prism$1.languages.extend("clike", {
    comment: {
      pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
      greedy: true
    },
    string: {
      pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
      greedy: true
    },
    "class-name": {
      pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
      lookbehind: true
    },
    keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
    operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
  }), Prism$1.languages.insertBefore("c", "string", { char: {
    pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
    greedy: true
  } }), Prism$1.languages.insertBefore("c", "string", { macro: {
    pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
    lookbehind: true,
    greedy: true,
    alias: "property",
    inside: {
      string: [{
        pattern: /^(#\s*include\s*)<[^>]+>/,
        lookbehind: true
      }, Prism$1.languages.c.string],
      char: Prism$1.languages.c.char,
      comment: Prism$1.languages.c.comment,
      "macro-name": [{
        pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
        lookbehind: true
      }, {
        pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
        lookbehind: true,
        alias: "function"
      }],
      directive: {
        pattern: /^(#\s*)[a-z]+/,
        lookbehind: true,
        alias: "keyword"
      },
      "directive-hash": /^#/,
      punctuation: /##|\\(?=[\r\n])/,
      expression: {
        pattern: /\S[\s\S]*/,
        inside: Prism$1.languages.c
      }
    }
  } }), Prism$1.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete Prism$1.languages.c.boolean, function(e) {
    var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, n2 = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
      return t.source;
    });
    e.languages.cpp = e.languages.extend("c", {
      "class-name": [
        {
          pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
            return t.source;
          })),
          lookbehind: true
        },
        /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
        /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
        /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
      ],
      keyword: t,
      number: {
        pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
        greedy: true
      },
      operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
      boolean: /\b(?:false|true)\b/
    }), e.languages.insertBefore("cpp", "string", {
      module: {
        pattern: RegExp(/(\b(?:import|module)\s+)/.source + "(?:" + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
          return n2;
        }) + ")"),
        lookbehind: true,
        greedy: true,
        inside: {
          string: /^[<"][\s\S]+/,
          operator: /:/,
          punctuation: /\./
        }
      },
      "raw-string": {
        pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
        alias: "string",
        greedy: true
      }
    }), e.languages.insertBefore("cpp", "keyword", { "generic-function": {
      pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
      inside: {
        function: /^\w+/,
        generic: {
          pattern: /<[\s\S]+/,
          alias: "class-name",
          inside: e.languages.cpp
        }
      }
    } }), e.languages.insertBefore("cpp", "operator", { "double-colon": {
      pattern: /::/,
      alias: "punctuation"
    } }), e.languages.insertBefore("cpp", "class-name", { "base-clause": {
      pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
      lookbehind: true,
      greedy: true,
      inside: e.languages.extend("cpp", {})
    } }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
  }(Prism$1), Prism$1.languages.arduino = Prism$1.languages.extend("cpp", {
    keyword: /\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,
    constant: /\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,
    builtin: /\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/
  }), Prism$1.languages.ino = Prism$1.languages.arduino, Prism$1.languages.arff = {
    comment: /%.*/,
    string: {
      pattern: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    keyword: /@(?:attribute|data|end|relation)\b/i,
    number: /\b\d+(?:\.\d+)?\b/,
    punctuation: /[{},]/
  }, Prism$1.languages.armasm = {
    comment: {
      pattern: /;.*/,
      greedy: true
    },
    string: {
      pattern: /"(?:[^"\r\n]|"")*"/,
      greedy: true,
      inside: { variable: {
        pattern: /((?:^|[^$])(?:\${2})*)\$\w+/,
        lookbehind: true
      } }
    },
    char: {
      pattern: /'(?:[^'\r\n]{0,4}|'')'/,
      greedy: true
    },
    "version-symbol": {
      pattern: /\|[\w@]+\|/,
      greedy: true,
      alias: "property"
    },
    boolean: /\b(?:FALSE|TRUE)\b/,
    directive: {
      pattern: /\b(?:ALIAS|ALIGN|AREA|ARM|ASSERT|ATTR|CN|CODE|CODE16|CODE32|COMMON|CP|DATA|DCB|DCD|DCDO|DCDU|DCFD|DCFDU|DCI|DCQ|DCQU|DCW|DCWU|DN|ELIF|ELSE|END|ENDFUNC|ENDIF|ENDP|ENTRY|EQU|EXPORT|EXPORTAS|EXTERN|FIELD|FILL|FN|FUNCTION|GBLA|GBLL|GBLS|GET|GLOBAL|IF|IMPORT|INCBIN|INCLUDE|INFO|KEEP|LCLA|LCLL|LCLS|LTORG|MACRO|MAP|MEND|MEXIT|NOFP|OPT|PRESERVE8|PROC|QN|READONLY|RELOC|REQUIRE|REQUIRE8|RLIST|ROUT|SETA|SETL|SETS|SN|SPACE|SUBT|THUMB|THUMBX|TTL|WEND|WHILE)\b/,
      alias: "property"
    },
    instruction: {
      pattern: /((?:^|(?:^|[^\\])(?:\r\n?|\n))[ \t]*(?:(?:[A-Z][A-Z0-9_]*[a-z]\w*|[a-z]\w*|\d+)[ \t]+)?)\b[A-Z.]+\b/,
      lookbehind: true,
      alias: "keyword"
    },
    variable: /\$\w+/,
    number: /(?:\b[2-9]_\d+|(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e-?\d+)?|\b0(?:[fd]_|x)[0-9a-f]+|&[0-9a-f]+)\b/i,
    register: {
      pattern: /\b(?:r\d|lr)\b/,
      alias: "symbol"
    },
    operator: /<>|<<|>>|&&|\|\||[=!<>/]=?|[+\-*%#?&|^]|:[A-Z]+:/,
    punctuation: /[()[\],]/
  }, Prism$1.languages["arm-asm"] = Prism$1.languages.armasm, function(e) {
    for (var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n2 = {
      pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
      lookbehind: true,
      alias: "punctuation",
      inside: null
    }, a = {
      bash: n2,
      environment: {
        pattern: RegExp("\\$" + t),
        alias: "constant"
      },
      variable: [
        {
          pattern: /\$?\(\([\s\S]+?\)\)/,
          greedy: true,
          inside: {
            variable: [{
              pattern: /(^\$\(\([\s\S]+)\)\)/,
              lookbehind: true
            }, /^\$\(\(/],
            number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
            operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
            punctuation: /\(\(?|\)\)?|,|;/
          }
        },
        {
          pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
          greedy: true,
          inside: { variable: /^\$\(|^`|\)$|`$/ }
        },
        {
          pattern: /\$\{[^}]+\}/,
          greedy: true,
          inside: {
            operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
            punctuation: /[\[\]]/,
            environment: {
              pattern: RegExp("(\\{)" + t),
              lookbehind: true,
              alias: "constant"
            }
          }
        },
        /\$(?:\w+|[#?*!@$])/
      ],
      entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
    }, r = (e.languages.bash = {
      shebang: {
        pattern: /^#!\s*\/.*/,
        alias: "important"
      },
      comment: {
        pattern: /(^|[^"{\\$])#.*/,
        lookbehind: true
      },
      "function-name": [{
        pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
        lookbehind: true,
        alias: "function"
      }, {
        pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
        alias: "function"
      }],
      "for-or-select": {
        pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
        alias: "variable",
        lookbehind: true
      },
      "assign-left": {
        pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
        inside: { environment: {
          pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t),
          lookbehind: true,
          alias: "constant"
        } },
        alias: "variable",
        lookbehind: true
      },
      parameter: {
        pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
        alias: "variable",
        lookbehind: true
      },
      string: [
        {
          pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
          lookbehind: true,
          greedy: true,
          inside: a
        },
        {
          pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
          lookbehind: true,
          greedy: true,
          inside: { bash: n2 }
        },
        {
          pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
          lookbehind: true,
          greedy: true,
          inside: a
        },
        {
          pattern: /(^|[^$\\])'[^']*'/,
          lookbehind: true,
          greedy: true
        },
        {
          pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
          greedy: true,
          inside: { entity: a.entity }
        }
      ],
      environment: {
        pattern: RegExp("\\$?" + t),
        alias: "constant"
      },
      variable: a.variable,
      function: {
        pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
        lookbehind: true
      },
      keyword: {
        pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
        lookbehind: true
      },
      builtin: {
        pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
        lookbehind: true,
        alias: "class-name"
      },
      boolean: {
        pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
        lookbehind: true
      },
      "file-descriptor": {
        pattern: /\B&\d\b/,
        alias: "important"
      },
      operator: {
        pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
        inside: { "file-descriptor": {
          pattern: /^\d/,
          alias: "important"
        } }
      },
      punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
      number: {
        pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
        lookbehind: true
      }
    }, n2.inside = e.languages.bash, [
      "comment",
      "function-name",
      "for-or-select",
      "assign-left",
      "parameter",
      "string",
      "environment",
      "function",
      "keyword",
      "builtin",
      "boolean",
      "file-descriptor",
      "operator",
      "punctuation",
      "number"
    ]), i = a.variable[1].inside, o = 0;o < r.length; o++)
      i[r[o]] = e.languages.bash[r[o]];
    e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
  }(Prism$1), function(e) {
    var t = /[*&][^\s[\]{},]+/, n2 = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, a = "(?:" + n2.source + "(?:[ \t]+" + t.source + ")?|" + t.source + "(?:[ \t]+" + n2.source + ")?)", r = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
      return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
    }), i = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
    function o(e$1, t$1) {
      t$1 = (t$1 || "").replace(/m/g, "") + "m";
      var n$1 = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
        return a;
      }).replace(/<<value>>/g, function() {
        return e$1;
      });
      return RegExp(n$1, t$1);
    }
    e.languages.yaml = {
      scalar: {
        pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
          return a;
        })),
        lookbehind: true,
        alias: "string"
      },
      comment: /#.*/,
      key: {
        pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
          return a;
        }).replace(/<<key>>/g, function() {
          return "(?:" + r + "|" + i + ")";
        })),
        lookbehind: true,
        greedy: true,
        alias: "atrule"
      },
      directive: {
        pattern: /(^[ \t]*)%.+/m,
        lookbehind: true,
        alias: "important"
      },
      datetime: {
        pattern: o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),
        lookbehind: true,
        alias: "number"
      },
      boolean: {
        pattern: o(/false|true/.source, "i"),
        lookbehind: true,
        alias: "important"
      },
      null: {
        pattern: o(/null|~/.source, "i"),
        lookbehind: true,
        alias: "important"
      },
      string: {
        pattern: o(i),
        lookbehind: true,
        greedy: true
      },
      number: {
        pattern: o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"),
        lookbehind: true
      },
      tag: n2,
      important: t,
      punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
    }, e.languages.yml = e.languages.yaml;
  }(Prism$1), function(s) {
    var t = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
    function e(e$1) {
      return e$1 = e$1.replace(/<inner>/g, function() {
        return t;
      }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + e$1 + ")");
    }
    var n2 = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, a = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
      return n2;
    }), r = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source, l = (s.languages.markdown = s.languages.extend("markup", {}), s.languages.insertBefore("markdown", "prolog", {
      "front-matter-block": {
        pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
        lookbehind: true,
        greedy: true,
        inside: {
          punctuation: /^---|---$/,
          "front-matter": {
            pattern: /\S+(?:\s+\S+)*/,
            alias: ["yaml", "language-yaml"],
            inside: s.languages.yaml
          }
        }
      },
      blockquote: {
        pattern: /^>(?:[\t ]*>)*/m,
        alias: "punctuation"
      },
      table: {
        pattern: RegExp("^" + a + r + "(?:" + a + ")*", "m"),
        inside: {
          "table-data-rows": {
            pattern: RegExp("^(" + a + r + ")(?:" + a + ")*$"),
            lookbehind: true,
            inside: {
              "table-data": {
                pattern: RegExp(n2),
                inside: s.languages.markdown
              },
              punctuation: /\|/
            }
          },
          "table-line": {
            pattern: RegExp("^(" + a + ")" + r + "$"),
            lookbehind: true,
            inside: { punctuation: /\||:?-{3,}:?/ }
          },
          "table-header-row": {
            pattern: RegExp("^" + a + "$"),
            inside: {
              "table-header": {
                pattern: RegExp(n2),
                alias: "important",
                inside: s.languages.markdown
              },
              punctuation: /\|/
            }
          }
        }
      },
      code: [{
        pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
        lookbehind: true,
        alias: "keyword"
      }, {
        pattern: /^```[\s\S]*?^```$/m,
        greedy: true,
        inside: {
          "code-block": {
            pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
            lookbehind: true
          },
          "code-language": {
            pattern: /^(```).+/,
            lookbehind: true
          },
          punctuation: /```/
        }
      }],
      title: [{
        pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
        alias: "important",
        inside: { punctuation: /==+$|--+$/ }
      }, {
        pattern: /(^\s*)#.+/m,
        lookbehind: true,
        alias: "important",
        inside: { punctuation: /^#+|#+$/ }
      }],
      hr: {
        pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
        lookbehind: true,
        alias: "punctuation"
      },
      list: {
        pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
        lookbehind: true,
        alias: "punctuation"
      },
      "url-reference": {
        pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
        inside: {
          variable: {
            pattern: /^(!?\[)[^\]]+/,
            lookbehind: true
          },
          string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
          punctuation: /^[\[\]!:]|[<>]/
        },
        alias: "url"
      },
      bold: {
        pattern: e(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
        lookbehind: true,
        greedy: true,
        inside: {
          content: {
            pattern: /(^..)[\s\S]+(?=..$)/,
            lookbehind: true,
            inside: {}
          },
          punctuation: /\*\*|__/
        }
      },
      italic: {
        pattern: e(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
        lookbehind: true,
        greedy: true,
        inside: {
          content: {
            pattern: /(^.)[\s\S]+(?=.$)/,
            lookbehind: true,
            inside: {}
          },
          punctuation: /[*_]/
        }
      },
      strike: {
        pattern: e(/(~~?)(?:(?!~)<inner>)+\2/.source),
        lookbehind: true,
        greedy: true,
        inside: {
          content: {
            pattern: /(^~~?)[\s\S]+(?=\1$)/,
            lookbehind: true,
            inside: {}
          },
          punctuation: /~~?/
        }
      },
      "code-snippet": {
        pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
        lookbehind: true,
        greedy: true,
        alias: ["code", "keyword"]
      },
      url: {
        pattern: e(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
        lookbehind: true,
        greedy: true,
        inside: {
          operator: /^!/,
          content: {
            pattern: /(^\[)[^\]]+(?=\])/,
            lookbehind: true,
            inside: {}
          },
          variable: {
            pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
            lookbehind: true
          },
          url: {
            pattern: /(^\]\()[^\s)]+/,
            lookbehind: true
          },
          string: {
            pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
            lookbehind: true
          }
        }
      }
    }), [
      "url",
      "bold",
      "italic",
      "strike"
    ].forEach(function(t$1) {
      [
        "url",
        "bold",
        "italic",
        "strike",
        "code-snippet"
      ].forEach(function(e$1) {
        t$1 !== e$1 && (s.languages.markdown[t$1].inside.content.inside[e$1] = s.languages.markdown[e$1]);
      });
    }), s.hooks.add("after-tokenize", function(e$1) {
      e$1.language !== "markdown" && e$1.language !== "md" || function e$2(t$1) {
        if (t$1 && typeof t$1 != "string")
          for (var n$1 = 0, a$1 = t$1.length;n$1 < a$1; n$1++) {
            var r$1, i = t$1[n$1];
            i.type !== "code" ? e$2(i.content) : (r$1 = i.content[1], i = i.content[3], r$1 && i && r$1.type === "code-language" && i.type === "code-block" && typeof r$1.content == "string" && (r$1 = r$1.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), r$1 = "language-" + (r$1 = (/[a-z][\w-]*/i.exec(r$1) || [""])[0].toLowerCase()), i.alias ? typeof i.alias == "string" ? i.alias = [i.alias, r$1] : i.alias.push(r$1) : i.alias = [r$1]));
          }
      }(e$1.tokens);
    }), s.hooks.add("wrap", function(e$1) {
      if (e$1.type === "code-block") {
        for (var t$1 = "", n$1 = 0, a$1 = e$1.classes.length;n$1 < a$1; n$1++) {
          var r$1 = e$1.classes[n$1], r$1 = /language-(.+)/.exec(r$1);
          if (r$1) {
            t$1 = r$1[1];
            break;
          }
        }
        var i, o = s.languages[t$1];
        o ? e$1.content = s.highlight(function(e$2) {
          e$2 = e$2.replace(l, "");
          return e$2 = e$2.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(e$3, t$2) {
            var n$2;
            return (t$2 = t$2.toLowerCase())[0] === "#" ? (n$2 = t$2[1] === "x" ? parseInt(t$2.slice(2), 16) : Number(t$2.slice(1)), c(n$2)) : d2[t$2] || e$3;
          });
        }(e$1.content), o, t$1) : t$1 && t$1 !== "none" && s.plugins.autoloader && (i = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(10000000000000000 * Math.random()), e$1.attributes.id = i, s.plugins.autoloader.loadLanguages(t$1, function() {
          var e$2 = document.getElementById(i);
          e$2 && (e$2.innerHTML = s.highlight(e$2.textContent, s.languages[t$1], t$1));
        }));
      }
    }), RegExp(s.languages.markup.tag.pattern.source, "gi")), d2 = {
      amp: "&",
      lt: "<",
      gt: ">",
      quot: '"'
    }, c = String.fromCodePoint || String.fromCharCode;
    s.languages.md = s.languages.markdown;
  }(Prism$1), function(n2) {
    function e(e$1, t) {
      return {
        pattern: RegExp(/\{!/.source + "(?:" + (t || e$1) + ")" + /$[\s\S]*\}/.source, "m"),
        greedy: true,
        inside: {
          embedded: {
            pattern: /(^\{!\w+\b)[\s\S]+(?=\}$)/,
            lookbehind: true,
            alias: "language-" + e$1,
            inside: n2.languages[e$1]
          },
          string: /[\s\S]+/
        }
      };
    }
    n2.languages.arturo = {
      comment: {
        pattern: /;.*/,
        greedy: true
      },
      character: {
        pattern: /`.`/,
        alias: "char",
        greedy: true
      },
      number: { pattern: /\b\d+(?:\.\d+(?:\.\d+(?:-[\w+-]+)?)?)?\b/ },
      string: {
        pattern: /"(?:[^"\\\r\n]|\\.)*"/,
        greedy: true
      },
      regex: {
        pattern: /\{\/.*?\/\}/,
        greedy: true
      },
      "html-string": e("html"),
      "css-string": e("css"),
      "js-string": e("js"),
      "md-string": e("md"),
      "sql-string": e("sql"),
      "sh-string": e("shell", "sh"),
      multistring: {
        pattern: /».*|\{:[\s\S]*?:\}|\{[\s\S]*?\}|^-{6}$[\s\S]*/m,
        alias: "string",
        greedy: true
      },
      label: {
        pattern: /\w+\b\??:/,
        alias: "property"
      },
      literal: {
        pattern: /'(?:\w+\b\??:?)/,
        alias: "constant"
      },
      type: {
        pattern: /:(?:\w+\b\??:?)/,
        alias: "class-name"
      },
      color: /#\w+/,
      predicate: {
        pattern: /\b(?:all|and|any|ascii|attr|attribute|attributeLabel|binary|block|char|contains|database|date|dictionary|empty|equal|even|every|exists|false|floating|function|greater|greaterOrEqual|if|in|inline|integer|is|key|label|leap|less|lessOrEqual|literal|logical|lower|nand|negative|nor|not|notEqual|null|numeric|odd|or|path|pathLabel|positive|prefix|prime|regex|same|set|some|sorted|standalone|string|subset|suffix|superset|symbol|symbolLiteral|true|try|type|unless|upper|when|whitespace|word|xnor|xor|zero)\?/,
        alias: "keyword"
      },
      "builtin-function": {
        pattern: /\b(?:abs|acos|acosh|acsec|acsech|actan|actanh|add|after|alert|alias|and|angle|append|arg|args|arity|array|as|asec|asech|asin|asinh|atan|atan2|atanh|attr|attrs|average|before|benchmark|blend|break|call|capitalize|case|ceil|chop|clear|clip|close|color|combine|conj|continue|copy|cos|cosh|crc|csec|csech|ctan|ctanh|cursor|darken|dec|decode|define|delete|desaturate|deviation|dialog|dictionary|difference|digest|digits|div|do|download|drop|dup|e|else|empty|encode|ensure|env|escape|execute|exit|exp|extend|extract|factors|fdiv|filter|first|flatten|floor|fold|from|function|gamma|gcd|get|goto|hash|hypot|if|inc|indent|index|infinity|info|input|insert|inspect|intersection|invert|jaro|join|keys|kurtosis|last|let|levenshtein|lighten|list|ln|log|loop|lower|mail|map|match|max|median|min|mod|module|mul|nand|neg|new|nor|normalize|not|now|null|open|or|outdent|pad|palette|panic|path|pause|permissions|permutate|pi|pop|popup|pow|powerset|powmod|prefix|print|prints|process|product|query|random|range|read|relative|remove|rename|render|repeat|replace|request|return|reverse|round|sample|saturate|script|sec|sech|select|serve|set|shl|shr|shuffle|sin|sinh|size|skewness|slice|sort|spin|split|sqrt|squeeze|stack|strip|sub|suffix|sum|switch|symbols|symlink|sys|take|tan|tanh|terminal|terminate|to|truncate|try|type|unclip|union|unique|unless|until|unzip|upper|values|var|variance|volume|webview|while|with|wordwrap|write|xnor|xor|zip)\b/,
        alias: "keyword"
      },
      sugar: {
        pattern: /->|=>|\||::/,
        alias: "operator"
      },
      punctuation: /[()[\],]/,
      symbol: { pattern: /<:|-:|ø|@|#|\+|\||\*|\$|---|-|%|\/|\.\.|\^|~|=|<|>|\\/ },
      boolean: { pattern: /\b(?:false|maybe|true)\b/ }
    }, n2.languages.art = n2.languages.arturo;
  }(Prism$1), function(e) {
    var t = {
      pattern: /(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,
      lookbehind: true,
      inside: {
        quoted: {
          pattern: /([$`])(?:(?!\1)[^\\]|\\.)*\1/,
          inside: { punctuation: /^[$`]|[$`]$/ }
        },
        interpreted: {
          pattern: /'(?:[^'\\]|\\.)*'/,
          inside: { punctuation: /^'|'$/ }
        },
        string: /"(?:[^"\\]|\\.)*"/,
        variable: /\w+(?==)/,
        punctuation: /^\[|\]$|,/,
        operator: /=/,
        "attr-value": /(?!^\s+$).+/
      }
    }, r = e.languages.asciidoc = {
      "comment-block": {
        pattern: /^(\/{4,})$[\s\S]*?^\1/m,
        alias: "comment"
      },
      table: {
        pattern: /^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,
        inside: {
          specifiers: {
            pattern: /(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,
            alias: "attr-value"
          },
          punctuation: {
            pattern: /(^|[^\\])[|!]=*/,
            lookbehind: true
          }
        }
      },
      "passthrough-block": {
        pattern: /^(\+{4,})$[\s\S]*?^\1$/m,
        inside: { punctuation: /^\++|\++$/ }
      },
      "literal-block": {
        pattern: /^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,
        inside: { punctuation: /^(?:-+|\.+)|(?:-+|\.+)$/ }
      },
      "other-block": {
        pattern: /^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,
        inside: { punctuation: /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/ }
      },
      "list-punctuation": {
        pattern: /(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,
        lookbehind: true,
        alias: "punctuation"
      },
      "list-label": {
        pattern: /(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,
        lookbehind: true,
        alias: "symbol"
      },
      "indented-block": {
        pattern: /((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,
        lookbehind: true
      },
      comment: /^\/\/.*/m,
      title: {
        pattern: /^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,
        alias: "important",
        inside: { punctuation: /^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/ }
      },
      "attribute-entry": {
        pattern: /^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,
        alias: "tag"
      },
      attributes: t,
      hr: {
        pattern: /^'{3,}$/m,
        alias: "punctuation"
      },
      "page-break": {
        pattern: /^<{3,}$/m,
        alias: "punctuation"
      },
      admonition: {
        pattern: /^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,
        alias: "keyword"
      },
      callout: [{
        pattern: /(^[ \t]*)<?\d*>/m,
        lookbehind: true,
        alias: "symbol"
      }, {
        pattern: /<\d+>/,
        alias: "symbol"
      }],
      macro: {
        pattern: /\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,
        inside: {
          function: /^[a-z\d-]+(?=:)/,
          punctuation: /^::?/,
          attributes: {
            pattern: /(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,
            inside: t.inside
          }
        }
      },
      inline: {
        pattern: /(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,
        lookbehind: true,
        inside: {
          attributes: t,
          url: {
            pattern: /^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,
            inside: { punctuation: /^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/ }
          },
          "attribute-ref": {
            pattern: /^\{.+\}$/,
            inside: {
              variable: {
                pattern: /(^\{)[a-z\d,+_-]+/,
                lookbehind: true
              },
              operator: /^[=?!#%@$]|!(?=[:}])/,
              punctuation: /^\{|\}$|::?/
            }
          },
          italic: {
            pattern: /^(['_])[\s\S]+\1$/,
            inside: { punctuation: /^(?:''?|__?)|(?:''?|__?)$/ }
          },
          bold: {
            pattern: /^\*[\s\S]+\*$/,
            inside: { punctuation: /^\*\*?|\*\*?$/ }
          },
          punctuation: /^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/
        }
      },
      replacement: {
        pattern: /\((?:C|R|TM)\)/,
        alias: "builtin"
      },
      entity: /&#?[\da-z]{1,8};/i,
      "line-continuation": {
        pattern: /(^| )\+$/m,
        lookbehind: true,
        alias: "punctuation"
      }
    };
    function n2(e$1) {
      for (var t$1 = {}, n$1 = 0, a = (e$1 = e$1.split(" ")).length;n$1 < a; n$1++)
        t$1[e$1[n$1]] = r[e$1[n$1]];
      return t$1;
    }
    t.inside.interpreted.inside.rest = n2("macro inline replacement entity"), r["passthrough-block"].inside.rest = n2("macro"), r["literal-block"].inside.rest = n2("callout"), r.table.inside.rest = n2("comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation"), r["other-block"].inside.rest = n2("table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation"), r.title.inside.rest = n2("macro inline replacement entity"), e.hooks.add("wrap", function(e$1) {
      e$1.type === "entity" && (e$1.attributes.title = e$1.content.replace(/&amp;/, "&"));
    }), e.languages.adoc = e.languages.asciidoc;
  }(Prism$1), function(n2) {
    function a(e$1, n$1) {
      return e$1.replace(/<<(\d+)>>/g, function(e$2, t$1) {
        return "(?:" + n$1[+t$1] + ")";
      });
    }
    function r(e$1, t$1, n$1) {
      return RegExp(a(e$1, t$1), n$1 || "");
    }
    function e(e$1, t$1) {
      for (var n$1 = 0;n$1 < t$1; n$1++)
        e$1 = e$1.replace(/<<self>>/g, function() {
          return "(?:" + e$1 + ")";
        });
      return e$1.replace(/<<self>>/g, "[^\\s\\S]");
    }
    var t = "bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void", i = "class enum interface record struct", o = "add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)", s = "abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";
    function l(e$1) {
      return "\\b(?:" + e$1.trim().replace(/ /g, "|") + ")\\b";
    }
    var d2 = l(i), c = RegExp(l(t + " " + i + " " + o + " " + s)), o = l(i + " " + o + " " + s), t = l(t + " " + i + " " + s), i = e(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2), s = e(/\((?:[^()]|<<self>>)*\)/.source, 2), u = /@?\b[A-Za-z_]\w*\b/.source, p2 = a(/<<0>>(?:\s*<<1>>)?/.source, [u, i]), o = a(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [o, p2]), m2 = /\[\s*(?:,\s*)*\]/.source, g2 = a(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source, [o, m2]), b2 = a(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [
      i,
      s,
      m2
    ]), b2 = a(/\(<<0>>+(?:,<<0>>+)+\)/.source, [b2]), b2 = a(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [
      b2,
      o,
      m2
    ]), m2 = {
      keyword: c,
      punctuation: /[<>()?,.:[\]]/
    }, E = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source, f2 = /"(?:\\.|[^\\"\r\n])*"/.source, g2 = (n2.languages.csharp = n2.languages.extend("clike", {
      string: [{
        pattern: r(/(^|[^$\\])<<0>>/.source, [/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source]),
        lookbehind: true,
        greedy: true
      }, {
        pattern: r(/(^|[^@$\\])<<0>>/.source, [f2]),
        lookbehind: true,
        greedy: true
      }],
      "class-name": [
        {
          pattern: r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [o]),
          lookbehind: true,
          inside: m2
        },
        {
          pattern: r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [u, b2]),
          lookbehind: true,
          inside: m2
        },
        {
          pattern: r(/(\busing\s+)<<0>>(?=\s*=)/.source, [u]),
          lookbehind: true
        },
        {
          pattern: r(/(\b<<0>>\s+)<<1>>/.source, [d2, p2]),
          lookbehind: true,
          inside: m2
        },
        {
          pattern: r(/(\bcatch\s*\(\s*)<<0>>/.source, [o]),
          lookbehind: true,
          inside: m2
        },
        {
          pattern: r(/(\bwhere\s+)<<0>>/.source, [u]),
          lookbehind: true
        },
        {
          pattern: r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [g2]),
          lookbehind: true,
          inside: m2
        },
        {
          pattern: r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source, [
            b2,
            t,
            u
          ]),
          inside: m2
        }
      ],
      keyword: c,
      number: /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,
      operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
      punctuation: /\?\.?|::|[{}[\];(),.:]/
    }), n2.languages.insertBefore("csharp", "number", { range: {
      pattern: /\.\./,
      alias: "operator"
    } }), n2.languages.insertBefore("csharp", "punctuation", { "named-parameter": {
      pattern: r(/([(,]\s*)<<0>>(?=\s*:)/.source, [u]),
      lookbehind: true,
      alias: "punctuation"
    } }), n2.languages.insertBefore("csharp", "class-name", {
      namespace: {
        pattern: r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source, [u]),
        lookbehind: true,
        inside: { punctuation: /\./ }
      },
      "type-expression": {
        pattern: r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source, [s]),
        lookbehind: true,
        alias: "class-name",
        inside: m2
      },
      "return-type": {
        pattern: r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source, [b2, o]),
        inside: m2,
        alias: "class-name"
      },
      "constructor-invocation": {
        pattern: r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [b2]),
        lookbehind: true,
        inside: m2,
        alias: "class-name"
      },
      "generic-method": {
        pattern: r(/<<0>>\s*<<1>>(?=\s*\()/.source, [u, i]),
        inside: {
          function: r(/^<<0>>/.source, [u]),
          generic: {
            pattern: RegExp(i),
            alias: "class-name",
            inside: m2
          }
        }
      },
      "type-list": {
        pattern: r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source, [
          d2,
          p2,
          u,
          b2,
          c.source,
          s,
          /\bnew\s*\(\s*\)/.source
        ]),
        lookbehind: true,
        inside: {
          "record-arguments": {
            pattern: r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [p2, s]),
            lookbehind: true,
            greedy: true,
            inside: n2.languages.csharp
          },
          keyword: c,
          "class-name": {
            pattern: RegExp(b2),
            greedy: true,
            inside: m2
          },
          punctuation: /[,()]/
        }
      },
      preprocessor: {
        pattern: /(^[\t ]*)#.*/m,
        lookbehind: true,
        alias: "property",
        inside: { directive: {
          pattern: /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
          lookbehind: true,
          alias: "keyword"
        } }
      }
    }), f2 + "|" + E), t = a(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source, [g2]), i = e(a(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [t]), 2), d2 = /\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source, u = a(/<<0>>(?:\s*\(<<1>>*\))?/.source, [o, i]), h2 = (n2.languages.insertBefore("csharp", "class-name", { attribute: {
      pattern: r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source, [d2, u]),
      lookbehind: true,
      greedy: true,
      inside: {
        target: {
          pattern: r(/^<<0>>(?=\s*:)/.source, [d2]),
          alias: "keyword"
        },
        "attribute-arguments": {
          pattern: r(/\(<<0>>*\)/.source, [i]),
          inside: n2.languages.csharp
        },
        "class-name": {
          pattern: RegExp(o),
          inside: { punctuation: /\./ }
        },
        punctuation: /[:,]/
      }
    } }), /:[^}\r\n]+/.source), p2 = e(a(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [t]), 2), s = a(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [p2, h2]), c = e(a(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source, [g2]), 2), b2 = a(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [c, h2]);
    function S2(e$1, t$1) {
      return {
        interpolation: {
          pattern: r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [e$1]),
          lookbehind: true,
          inside: {
            "format-string": {
              pattern: r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [t$1, h2]),
              lookbehind: true,
              inside: { punctuation: /^:/ }
            },
            punctuation: /^\{|\}$/,
            expression: {
              pattern: /[\s\S]+/,
              alias: "language-csharp",
              inside: n2.languages.csharp
            }
          }
        },
        string: /[\s\S]+/
      };
    }
    n2.languages.insertBefore("csharp", "string", {
      "interpolation-string": [{
        pattern: r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source, [s]),
        lookbehind: true,
        greedy: true,
        inside: S2(s, p2)
      }, {
        pattern: r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [b2]),
        lookbehind: true,
        greedy: true,
        inside: S2(b2, c)
      }],
      char: {
        pattern: RegExp(E),
        greedy: true
      }
    }), n2.languages.dotnet = n2.languages.cs = n2.languages.csharp;
  }(Prism$1), Prism$1.languages.aspnet = Prism$1.languages.extend("markup", {
    "page-directive": {
      pattern: /<%\s*@.*%>/,
      alias: "tag",
      inside: {
        "page-directive": {
          pattern: /<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,
          alias: "tag"
        },
        rest: Prism$1.languages.markup.tag.inside
      }
    },
    directive: {
      pattern: /<%.*%>/,
      alias: "tag",
      inside: {
        directive: {
          pattern: /<%\s*?[$=%#:]{0,2}|%>/,
          alias: "tag"
        },
        rest: Prism$1.languages.csharp
      }
    }
  }), Prism$1.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/, Prism$1.languages.insertBefore("inside", "punctuation", { directive: Prism$1.languages.aspnet.directive }, Prism$1.languages.aspnet.tag.inside["attr-value"]), Prism$1.languages.insertBefore("aspnet", "comment", { "asp-comment": {
    pattern: /<%--[\s\S]*?--%>/,
    alias: ["asp", "comment"]
  } }), Prism$1.languages.insertBefore("aspnet", Prism$1.languages.javascript ? "script" : "tag", { "asp-script": {
    pattern: /(<script(?=.*runat=['"]?server\b)[^>]*>)[\s\S]*?(?=<\/script>)/i,
    lookbehind: true,
    alias: ["asp", "script"],
    inside: Prism$1.languages.csharp || {}
  } }), Prism$1.languages.asm6502 = {
    comment: /;.*/,
    directive: {
      pattern: /\.\w+(?= )/,
      alias: "property"
    },
    string: /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,
    "op-code": {
      pattern: /\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,
      alias: "keyword"
    },
    "hex-number": {
      pattern: /#?\$[\da-f]{1,4}\b/i,
      alias: "number"
    },
    "binary-number": {
      pattern: /#?%[01]+\b/,
      alias: "number"
    },
    "decimal-number": {
      pattern: /#?\b\d+\b/,
      alias: "number"
    },
    register: {
      pattern: /\b[xya]\b/i,
      alias: "variable"
    },
    punctuation: /[(),:]/
  }, Prism$1.languages.asmatmel = {
    comment: {
      pattern: /;.*/,
      greedy: true
    },
    string: {
      pattern: /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    constant: /\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[01]))\b/,
    directive: {
      pattern: /\.\w+(?= )/,
      alias: "property"
    },
    "r-register": {
      pattern: /\br(?:\d|[12]\d|3[01])\b/,
      alias: "variable"
    },
    "op-code": {
      pattern: /\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,
      alias: "keyword"
    },
    "hex-number": {
      pattern: /#?\$[\da-f]{2,4}\b/i,
      alias: "number"
    },
    "binary-number": {
      pattern: /#?%[01]+\b/,
      alias: "number"
    },
    "decimal-number": {
      pattern: /#?\b\d+\b/,
      alias: "number"
    },
    register: {
      pattern: /\b[acznvshtixy]\b/i,
      alias: "variable"
    },
    operator: />>=?|<<=?|&[&=]?|\|[\|=]?|[-+*/%^!=<>?]=?/,
    punctuation: /[(),:]/
  }, Prism$1.languages.autohotkey = {
    comment: [{
      pattern: /(^|\s);.*/,
      lookbehind: true
    }, {
      pattern: /(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,
      lookbehind: true,
      greedy: true
    }],
    tag: {
      pattern: /^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,
      lookbehind: true
    },
    string: /"(?:[^"\n\r]|"")*"/,
    variable: /%\w+%/,
    number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
    operator: /\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,
    boolean: /\b(?:false|true)\b/,
    command: {
      pattern: /\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,
      alias: "selector"
    },
    constant: /\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,
    builtin: /\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,
    symbol: /\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,
    directive: {
      pattern: /#[a-z]+\b/i,
      alias: "important"
    },
    keyword: /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,
    function: /[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,
    punctuation: /[{}[\]():,]/
  }, Prism$1.languages.autoit = {
    comment: [/;.*/, {
      pattern: /(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,
      lookbehind: true
    }],
    url: {
      pattern: /(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,
      lookbehind: true
    },
    string: {
      pattern: /(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,
      greedy: true,
      inside: { variable: /([%$@])\w+\1/ }
    },
    directive: {
      pattern: /(^[\t ]*)#[\w-]+/m,
      lookbehind: true,
      alias: "keyword"
    },
    function: /\b\w+(?=\()/,
    variable: /[$@]\w+/,
    keyword: /\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,
    number: /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,
    boolean: /\b(?:False|True)\b/i,
    operator: /<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,
    punctuation: /[\[\]().,:]/
  }, function(e) {
    function t(e$1, t$1, n$1) {
      return RegExp((a$1 = t$1, e$1.replace(/<<(\d+)>>/g, function(e$2, t$2) {
        return a$1[+t$2];
      })), n$1 || "");
      var a$1;
    }
    var n2 = /bool|clip|float|int|string|val/.source, a = [
      [
        /is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source,
        /apply|assert|default|eval|import|nop|select|undefined/.source,
        /opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source,
        /hex(?:value)?|value/.source,
        /abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source,
        /a?sinh?|a?cosh?|a?tan[2h]?/.source,
        /(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,
        /average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,
        /getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source,
        /chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source,
        /isversionorgreater|version(?:number|string)/.source,
        /buildpixeltype|colorspacenametopixeltype/.source,
        /addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source
      ].join("|"),
      [
        /has(?:audio|video)/.source,
        /height|width/.source,
        /frame(?:count|rate)|framerate(?:denominator|numerator)/.source,
        /getparity|is(?:field|frame)based/.source,
        /bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source,
        /audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source
      ].join("|"),
      [
        /avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source,
        /coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source,
        /(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source,
        /addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source,
        /blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source,
        /trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,
        /assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source,
        /amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source,
        /animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source,
        /imagewriter/.source,
        /blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source
      ].join("|")
    ].join("|");
    e.languages.avisynth = {
      comment: [
        {
          pattern: /(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
          lookbehind: true,
          greedy: true
        },
        {
          pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
          lookbehind: true,
          greedy: true
        },
        {
          pattern: /(^|[^\\$])#.*/,
          lookbehind: true,
          greedy: true
        }
      ],
      argument: {
        pattern: t(/\b(?:<<0>>)\s+("?)\w+\1/.source, [n2], "i"),
        inside: { keyword: /^\w+/ }
      },
      "argument-label": {
        pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
        lookbehind: true,
        inside: {
          "argument-name": {
            pattern: /^\w+/,
            alias: "punctuation"
          },
          punctuation: /=$/
        }
      },
      string: [{
        pattern: /"""[\s\S]*?"""/,
        greedy: true
      }, {
        pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
        greedy: true,
        inside: { constant: { pattern: /\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/ } }
      }],
      variable: /\b(?:last)\b/i,
      boolean: /\b(?:false|no|true|yes)\b/i,
      keyword: /\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,
      constant: /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,
      "builtin-function": {
        pattern: t(/\b(?:<<0>>)\b/.source, [a], "i"),
        alias: "function"
      },
      "type-cast": {
        pattern: t(/\b(?:<<0>>)(?=\s*\()/.source, [n2], "i"),
        alias: "keyword"
      },
      function: {
        pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
        lookbehind: true
      },
      "line-continuation": {
        pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
        lookbehind: true,
        alias: "punctuation"
      },
      number: /\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
      operator: /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
      punctuation: /[{}\[\]();,.]/
    }, e.languages.avs = e.languages.avisynth;
  }(Prism$1), Prism$1.languages["avro-idl"] = {
    comment: {
      pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
      lookbehind: true,
      greedy: true
    },
    annotation: {
      pattern: /@(?:[$\w.-]|`[^\r\n`]+`)+/,
      greedy: true,
      alias: "function"
    },
    "function-identifier": {
      pattern: /`[^\r\n`]+`(?=\s*\()/,
      greedy: true,
      alias: "function"
    },
    identifier: {
      pattern: /`[^\r\n`]+`/,
      greedy: true
    },
    "class-name": {
      pattern: /(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,
      lookbehind: true,
      greedy: true
    },
    keyword: /\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    number: [{
      pattern: /(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,
      lookbehind: true
    }, /-?\b(?:Infinity|NaN)\b/],
    operator: /=/,
    punctuation: /[()\[\]{}<>.:,;-]/
  }, Prism$1.languages.avdl = Prism$1.languages["avro-idl"], Prism$1.languages.awk = {
    hashbang: {
      pattern: /^#!.*/,
      greedy: true,
      alias: "comment"
    },
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\])"(?:[^\\"\r\n]|\\.)*"/,
      lookbehind: true,
      greedy: true
    },
    regex: {
      pattern: /((?:^|[^\w\s)])\s*)\/(?:[^\/\\\r\n]|\\.)*\//,
      lookbehind: true,
      greedy: true
    },
    variable: /\$\w+/,
    keyword: /\b(?:BEGIN|BEGINFILE|END|ENDFILE|break|case|continue|default|delete|do|else|exit|for|function|getline|if|in|next|nextfile|printf?|return|switch|while)\b|@(?:include|load)\b/,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[a-fA-F0-9]+)\b/,
    operator: /--|\+\+|!?~|>&|>>|<<|(?:\*\*|[<>!=+\-*/%^])=?|&&|\|[|&]|[?:]/,
    punctuation: /[()[\]{},;]/
  }, Prism$1.languages.gawk = Prism$1.languages.awk, Prism$1.languages.basic = {
    comment: {
      pattern: /(?:!|REM\b).+/i,
      inside: { keyword: /^REM/i }
    },
    string: {
      pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,
      greedy: true
    },
    number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
    keyword: /\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,
    function: /\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,
    operator: /<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,
    punctuation: /[,;:()]/
  }, function() {
    var e = /%%?[~:\w]+%?|!\S+!/, t = {
      pattern: /\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,
      alias: "attr-name",
      inside: { punctuation: /:/ }
    }, n2 = /"(?:[\\"]"|[^"])*"(?!")/, a = /(?:\b|-)\d+\b/;
    Prism$1.languages.batch = {
      comment: [/^::.*/m, {
        pattern: /((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,
        lookbehind: true
      }],
      label: {
        pattern: /^:.*/m,
        alias: "property"
      },
      command: [
        {
          pattern: /((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,
          lookbehind: true,
          inside: {
            keyword: /\b(?:do|in)\b|^for\b/i,
            string: n2,
            parameter: t,
            variable: e,
            number: a,
            punctuation: /[()',]/
          }
        },
        {
          pattern: /((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,
          lookbehind: true,
          inside: {
            keyword: /\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,
            string: n2,
            parameter: t,
            variable: e,
            number: a,
            operator: /\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i
          }
        },
        {
          pattern: /((?:^|[&()])[ \t]*)else\b/im,
          lookbehind: true,
          inside: { keyword: /^else\b/i }
        },
        {
          pattern: /((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,
          lookbehind: true,
          inside: {
            keyword: /^set\b/i,
            string: n2,
            parameter: t,
            variable: [e, /\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],
            number: a,
            operator: /[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,
            punctuation: /[()',]/
          }
        },
        {
          pattern: /((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,
          lookbehind: true,
          inside: {
            keyword: /^\w+\b/,
            string: n2,
            parameter: t,
            label: {
              pattern: /(^\s*):\S+/m,
              lookbehind: true,
              alias: "property"
            },
            variable: e,
            number: a,
            operator: /\^/
          }
        }
      ],
      operator: /[&@]/,
      punctuation: /[()']/
    };
  }(), Prism$1.languages.bbcode = { tag: {
    pattern: /\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,
    inside: {
      tag: {
        pattern: /^\[\/?[^\s=\]]+/,
        inside: { punctuation: /^\[\/?/ }
      },
      "attr-value": {
        pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,
        inside: { punctuation: [/^=/, {
          pattern: /^(\s*)["']|["']$/,
          lookbehind: true
        }] }
      },
      punctuation: /\]/,
      "attr-name": /[^\s=\]]+/
    }
  } }, Prism$1.languages.shortcode = Prism$1.languages.bbcode, Prism$1.languages.bbj = {
    comment: {
      pattern: /(^|[^\\:])rem\s+.*/i,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /(['"])(?:(?!\1|\\).|\\.)*\1/,
      greedy: true
    },
    number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
    keyword: /\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|declare|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,
    function: /\b\w+(?=\()/,
    boolean: /\b(?:BBjAPI\.TRUE|BBjAPI\.FALSE)\b/i,
    operator: /<[=>]?|>=?|[+\-*\/^=&]|\b(?:and|not|or|xor)\b/i,
    punctuation: /[.,;:()]/
  }, Prism$1.languages.bicep = {
    comment: [{
      pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
      lookbehind: true,
      greedy: true
    }, {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: true,
      greedy: true
    }],
    property: [{
      pattern: /([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,
      lookbehind: true
    }, {
      pattern: /([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,
      lookbehind: true,
      greedy: true
    }],
    string: [{
      pattern: /'''[^'][\s\S]*?'''/,
      greedy: true
    }, {
      pattern: /(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,
      lookbehind: true,
      greedy: true
    }],
    "interpolated-string": {
      pattern: /(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,
      lookbehind: true,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /\$\{[^{}\r\n]*\}/,
          inside: {
            expression: {
              pattern: /(^\$\{)[\s\S]+(?=\}$)/,
              lookbehind: true
            },
            punctuation: /^\$\{|\}$/
          }
        },
        string: /[\s\S]+/
      }
    },
    datatype: {
      pattern: /(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,
      lookbehind: true,
      alias: "class-name"
    },
    boolean: /\b(?:false|true)\b/,
    keyword: /\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,
    decorator: /@\w+\b/,
    function: /\b[a-z_]\w*(?=[ \t]*\()/i,
    number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
    operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside = Prism$1.languages.bicep, Prism$1.languages.birb = Prism$1.languages.extend("clike", {
    string: {
      pattern: /r?("|')(?:\\.|(?!\1)[^\\])*\1/,
      greedy: true
    },
    "class-name": [/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/, /\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],
    keyword: /\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,
    operator: /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,
    variable: /\b[a-z_]\w*\b/
  }), Prism$1.languages.insertBefore("birb", "function", { metadata: {
    pattern: /<\w+>/,
    greedy: true,
    alias: "symbol"
  } }), Prism$1.languages.bison = Prism$1.languages.extend("c", {}), Prism$1.languages.insertBefore("bison", "comment", { bison: {
    pattern: /^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,
    inside: {
      c: {
        pattern: /%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,
        inside: {
          delimiter: {
            pattern: /^%?\{|%?\}$/,
            alias: "punctuation"
          },
          "bison-variable": {
            pattern: /[$@](?:<[^\s>]+>)?[\w$]+/,
            alias: "variable",
            inside: { punctuation: /<|>/ }
          },
          rest: Prism$1.languages.c
        }
      },
      comment: Prism$1.languages.c.comment,
      string: Prism$1.languages.c.string,
      property: /\S+(?=:)/,
      keyword: /%\w+/,
      number: {
        pattern: /(^|[^@])\b(?:0x[\da-f]+|\d+)/i,
        lookbehind: true
      },
      punctuation: /%[%?]|[|:;\[\]<>]/
    }
  } }), Prism$1.languages.bnf = {
    string: { pattern: /"[^\r\n"]*"|'[^\r\n']*'/ },
    definition: {
      pattern: /<[^<>\r\n\t]+>(?=\s*::=)/,
      alias: ["rule", "keyword"],
      inside: { punctuation: /^<|>$/ }
    },
    rule: {
      pattern: /<[^<>\r\n\t]+>/,
      inside: { punctuation: /^<|>$/ }
    },
    operator: /::=|[|()[\]{}*+?]|\.{3}/
  }, Prism$1.languages.rbnf = Prism$1.languages.bnf, Prism$1.languages.bqn = {
    shebang: {
      pattern: /^#![ \t]*\/.*/,
      alias: "important",
      greedy: true
    },
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    "string-literal": {
      pattern: /"(?:[^"]|"")*"/,
      greedy: true,
      alias: "string"
    },
    "character-literal": {
      pattern: /'(?:[\s\S]|[\uD800-\uDBFF][\uDC00-\uDFFF])'/,
      greedy: true,
      alias: "char"
    },
    function: /•[\w¯.∞π]+[\w¯.∞π]*/,
    "dot-notation-on-brackets": {
      pattern: /\{(?=.*\}\.)|\}\./,
      alias: "namespace"
    },
    "special-name": {
      pattern: /(?:𝕨|𝕩|𝕗|𝕘|𝕤|𝕣|𝕎|𝕏|𝔽|𝔾|𝕊|_𝕣_|_𝕣)/,
      alias: "keyword"
    },
    "dot-notation-on-name": {
      pattern: /[A-Za-z_][\w¯∞π]*\./,
      alias: "namespace"
    },
    "word-number-scientific": {
      pattern: /\d+(?:\.\d+)?[eE]¯?\d+/,
      alias: "number"
    },
    "word-name": {
      pattern: /[A-Za-z_][\w¯∞π]*/,
      alias: "symbol"
    },
    "word-number": {
      pattern: /[¯∞π]?(?:\d*\.?\b\d+(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π))?/,
      alias: "number"
    },
    "null-literal": {
      pattern: /@/,
      alias: "char"
    },
    "primitive-functions": {
      pattern: /[-+×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!]/,
      alias: "operator"
    },
    "primitive-1-operators": {
      pattern: /[`˜˘¨⁼⌜´˝˙]/,
      alias: "operator"
    },
    "primitive-2-operators": {
      pattern: /[∘⊸⟜○⌾⎉⚇⍟⊘◶⎊]/,
      alias: "operator"
    },
    punctuation: /[←⇐↩(){}⟨⟩[\]‿·⋄,.;:?]/
  }, Prism$1.languages.brainfuck = {
    pointer: {
      pattern: /<|>/,
      alias: "keyword"
    },
    increment: {
      pattern: /\+/,
      alias: "inserted"
    },
    decrement: {
      pattern: /-/,
      alias: "deleted"
    },
    branching: {
      pattern: /\[|\]/,
      alias: "important"
    },
    operator: /[.,]/,
    comment: /\S+/
  }, Prism$1.languages.brightscript = {
    comment: /(?:\brem|').*/i,
    "directive-statement": {
      pattern: /(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,
      lookbehind: true,
      alias: "property",
      inside: {
        "error-message": {
          pattern: /(^#error).+/,
          lookbehind: true
        },
        directive: {
          pattern: /^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,
          alias: "keyword"
        },
        expression: {
          pattern: /[\s\S]+/,
          inside: null
        }
      }
    },
    property: {
      pattern: /([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /"(?:[^"\r\n]|"")*"(?!")/,
      greedy: true
    },
    "class-name": {
      pattern: /(\bAs[\t ]+)\w+/i,
      lookbehind: true
    },
    keyword: /\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,
    boolean: /\b(?:false|true)\b/i,
    function: /\b(?!\d)\w+(?=[\t ]*\()/,
    number: /(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,
    operator: /--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,
    punctuation: /[.,;()[\]{}]/,
    constant: /\b(?:LINE_NUM)\b/i
  }, Prism$1.languages.brightscript["directive-statement"].inside.expression.inside = Prism$1.languages.brightscript, Prism$1.languages.bro = {
    comment: {
      pattern: /(^|[^\\$])#.*/,
      lookbehind: true,
      inside: { italic: /\b(?:FIXME|TODO|XXX)\b/ }
    },
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    boolean: /\b[TF]\b/,
    function: {
      pattern: /(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,
      lookbehind: true
    },
    builtin: /(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,
    constant: {
      pattern: /(\bconst[ \t]+)\w+/i,
      lookbehind: true
    },
    keyword: /\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,
    operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.bsl = {
    comment: /\/\/.*/,
    string: [{
      pattern: /"(?:[^"]|"")*"(?!")/,
      greedy: true
    }, { pattern: /'(?:[^'\r\n\\]|\\.)*'/ }],
    keyword: [{
      pattern: /(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,
      lookbehind: true
    }, { pattern: /\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i }],
    number: {
      pattern: /(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,
      lookbehind: true
    },
    operator: [
      /[<>+\-*/]=?|[%=]/,
      {
        pattern: /(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,
        lookbehind: true
      },
      { pattern: /\b(?:and|not|or)\b/i }
    ],
    punctuation: /\(\.|\.\)|[()\[\]:;,.]/,
    directive: [{
      pattern: /^([ \t]*)&.*/m,
      lookbehind: true,
      greedy: true,
      alias: "important"
    }, {
      pattern: /^([ \t]*)#.*/gm,
      lookbehind: true,
      greedy: true,
      alias: "important"
    }]
  }, Prism$1.languages.oscript = Prism$1.languages.bsl, Prism$1.languages.cfscript = Prism$1.languages.extend("clike", {
    comment: [{
      pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
      lookbehind: true,
      inside: { annotation: {
        pattern: /(?:^|[^.])@[\w\.]+/,
        alias: "punctuation"
      } }
    }, {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: true,
      greedy: true
    }],
    keyword: /\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,
    operator: [/\+\+|--|&&|\|\||::|=>|[!=]==|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|:/, /\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],
    scope: {
      pattern: /\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,
      alias: "global"
    },
    type: {
      pattern: /\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,
      alias: "builtin"
    }
  }), Prism$1.languages.insertBefore("cfscript", "keyword", { "function-variable": {
    pattern: /[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
    alias: "function"
  } }), delete Prism$1.languages.cfscript["class-name"], Prism$1.languages.cfc = Prism$1.languages.cfscript, Prism$1.languages.chaiscript = Prism$1.languages.extend("clike", {
    string: {
      pattern: /(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,
      lookbehind: true,
      greedy: true
    },
    "class-name": [{
      pattern: /(\bclass\s+)\w+/,
      lookbehind: true
    }, {
      pattern: /(\b(?:attr|def)\s+)\w+(?=\s*::)/,
      lookbehind: true
    }],
    keyword: /\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,
    number: [Prism$1.languages.cpp.number, /\b(?:Infinity|NaN)\b/],
    operator: />>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/
  }), Prism$1.languages.insertBefore("chaiscript", "operator", { "parameter-type": {
    pattern: /([,(]\s*)\w+(?=\s+\w)/,
    lookbehind: true,
    alias: "class-name"
  } }), Prism$1.languages.insertBefore("chaiscript", "string", { "string-interpolation": {
    pattern: /(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,
    lookbehind: true,
    greedy: true,
    inside: {
      interpolation: {
        pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,
        lookbehind: true,
        inside: {
          "interpolation-expression": {
            pattern: /(^\$\{)[\s\S]+(?=\}$)/,
            lookbehind: true,
            inside: Prism$1.languages.chaiscript
          },
          "interpolation-punctuation": {
            pattern: /^\$\{|\}$/,
            alias: "punctuation"
          }
        }
      },
      string: /[\s\S]+/
    }
  } }), Prism$1.languages.cil = {
    comment: /\/\/.*/,
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    directive: {
      pattern: /(^|\W)\.[a-z]+(?=\s)/,
      lookbehind: true,
      alias: "class-name"
    },
    variable: /\[[\w\.]+\]/,
    keyword: /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
    function: /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,
    boolean: /\b(?:false|true)\b/,
    number: /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,
    punctuation: /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
  }, Prism$1.languages.cilkc = Prism$1.languages.insertBefore("c", "function", { "parallel-keyword": {
    pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
    alias: "keyword"
  } }), Prism$1.languages["cilk-c"] = Prism$1.languages.cilkc, Prism$1.languages.cilkcpp = Prism$1.languages.insertBefore("cpp", "function", { "parallel-keyword": {
    pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
    alias: "keyword"
  } }), Prism$1.languages["cilk-cpp"] = Prism$1.languages.cilkcpp, Prism$1.languages.cilk = Prism$1.languages.cilkcpp, Prism$1.languages.clojure = {
    comment: {
      pattern: /;.*/,
      greedy: true
    },
    string: {
      pattern: /"(?:[^"\\]|\\.)*"/,
      greedy: true
    },
    char: /\\\w+/,
    symbol: {
      pattern: /(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,
      lookbehind: true
    },
    keyword: {
      pattern: /(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,
      lookbehind: true
    },
    boolean: /\b(?:false|nil|true)\b/,
    number: {
      pattern: /(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,
      lookbehind: true
    },
    function: {
      pattern: /((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,
      lookbehind: true
    },
    operator: /[#@^`~]/,
    punctuation: /[{}\[\](),]/
  }, Prism$1.languages.cmake = {
    comment: /#.*/,
    string: {
      pattern: /"(?:[^\\"]|\\.)*"/,
      greedy: true,
      inside: { interpolation: {
        pattern: /\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,
        inside: {
          punctuation: /\$\{|\}/,
          variable: /\w+/
        }
      } }
    },
    variable: /\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,
    property: /\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,
    keyword: /\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,
    boolean: /\b(?:FALSE|OFF|ON|TRUE)\b/,
    namespace: /\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,
    operator: /\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,
    inserted: {
      pattern: /\b\w+::\w+\b/,
      alias: "class-name"
    },
    number: /\b\d+(?:\.\d+)*\b/,
    function: /\b[a-z_]\w*(?=\s*\()\b/i,
    punctuation: /[()>}]|\$[<{]/
  }, Prism$1.languages.cobol = {
    comment: {
      pattern: /\*>.*|(^[ \t]*)\*.*/m,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
      greedy: true
    },
    level: {
      pattern: /(^[ \t]*)\d+\b/m,
      lookbehind: true,
      greedy: true,
      alias: "number"
    },
    "class-name": {
      pattern: /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
      lookbehind: true,
      inside: {
        number: {
          pattern: /(\()\d+/,
          lookbehind: true
        },
        punctuation: /[()]/
      }
    },
    keyword: {
      pattern: /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,
      lookbehind: true
    },
    boolean: {
      pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
      lookbehind: true
    },
    number: {
      pattern: /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
      lookbehind: true
    },
    operator: [/<>|[<>]=?|[=+*/&]/, {
      pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
      lookbehind: true
    }],
    punctuation: /[.:,()]/
  }, function(e) {
    var t = /#(?!\{).+/, n2 = {
      pattern: /#\{[^}]+\}/,
      alias: "variable"
    };
    e.languages.coffeescript = e.languages.extend("javascript", {
      comment: t,
      string: [{
        pattern: /'(?:\\[\s\S]|[^\\'])*'/,
        greedy: true
      }, {
        pattern: /"(?:\\[\s\S]|[^\\"])*"/,
        greedy: true,
        inside: { interpolation: n2 }
      }],
      keyword: /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
      "class-member": {
        pattern: /@(?!\d)\w+/,
        alias: "variable"
      }
    }), e.languages.insertBefore("coffeescript", "comment", {
      "multiline-comment": {
        pattern: /###[\s\S]+?###/,
        alias: "comment"
      },
      "block-regex": {
        pattern: /\/{3}[\s\S]*?\/{3}/,
        alias: "regex",
        inside: {
          comment: t,
          interpolation: n2
        }
      }
    }), e.languages.insertBefore("coffeescript", "string", {
      "inline-javascript": {
        pattern: /`(?:\\[\s\S]|[^\\`])*`/,
        inside: {
          delimiter: {
            pattern: /^`|`$/,
            alias: "punctuation"
          },
          script: {
            pattern: /[\s\S]+/,
            alias: "language-javascript",
            inside: e.languages.javascript
          }
        }
      },
      "multiline-string": [{
        pattern: /'''[\s\S]*?'''/,
        greedy: true,
        alias: "string"
      }, {
        pattern: /"""[\s\S]*?"""/,
        greedy: true,
        alias: "string",
        inside: { interpolation: n2 }
      }]
    }), e.languages.insertBefore("coffeescript", "keyword", { property: /(?!\d)\w+(?=\s*:(?!:))/ }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
  }(Prism$1), Prism$1.languages.concurnas = {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
      lookbehind: true,
      greedy: true
    },
    langext: {
      pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
      greedy: true,
      inside: {
        "class-name": /^\w+/,
        string: {
          pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
          lookbehind: true
        },
        punctuation: /\|\|/
      }
    },
    function: {
      pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
      lookbehind: true
    },
    keyword: /\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
    boolean: /\b(?:false|true)\b/,
    number: /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
    punctuation: /[{}[\];(),.:]/,
    operator: /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
    annotation: {
      pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
      alias: "builtin"
    }
  }, Prism$1.languages.insertBefore("concurnas", "langext", {
    "regex-literal": {
      pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
          lookbehind: true,
          inside: Prism$1.languages.concurnas
        },
        regex: /[\s\S]+/
      }
    },
    "string-literal": {
      pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
          lookbehind: true,
          inside: Prism$1.languages.concurnas
        },
        string: /[\s\S]+/
      }
    }
  }), Prism$1.languages.conc = Prism$1.languages.concurnas, function() {
    function e(e$1) {
      return RegExp(/([ \t])/.source + "(?:" + e$1 + ")" + /(?=[\s;]|$)/.source, "i");
    }
    Prism$1.languages.csp = {
      directive: {
        pattern: /(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,
        lookbehind: true,
        alias: "property"
      },
      scheme: {
        pattern: e(/[a-z][a-z0-9.+-]*:/.source),
        lookbehind: true
      },
      none: {
        pattern: e(/'none'/.source),
        lookbehind: true,
        alias: "keyword"
      },
      nonce: {
        pattern: e(/'nonce-[-+/\w=]+'/.source),
        lookbehind: true,
        alias: "number"
      },
      hash: {
        pattern: e(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
        lookbehind: true,
        alias: "number"
      },
      host: {
        pattern: e(/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source + "|" + /\*[^\s;,']*/.source + "|" + /[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source),
        lookbehind: true,
        alias: "url",
        inside: { important: /\*/ }
      },
      keyword: [{
        pattern: e(/'unsafe-[a-z-]+'/.source),
        lookbehind: true,
        alias: "unsafe"
      }, {
        pattern: e(/'[a-z-]+'/.source),
        lookbehind: true,
        alias: "safe"
      }],
      punctuation: /;/
    };
  }(), function(e) {
    var t = /(?:(?!\s)[\d$+<=a-zA-Z\x80-\uFFFF])+/.source, n2 = /[^{}@#]+/.source, a = n2 + /\{[^}#@]*\}/.source, r = /(?:h|hours|hrs|m|min|minutes)/.source;
    e.languages.cooklang = {
      comment: {
        pattern: /\[-[\s\S]*?-\]|--.*/,
        greedy: true
      },
      meta: {
        pattern: />>.*:.*/,
        inside: { property: {
          pattern: /(>>\s*)[^\s:](?:[^:]*[^\s:])?/,
          lookbehind: true
        } }
      },
      "cookware-group": {
        pattern: /* @__PURE__ */ new RegExp("#(?:" + a + "|" + t + ")"),
        inside: {
          cookware: {
            pattern: /* @__PURE__ */ new RegExp("(^#)(?:" + n2 + ")"),
            lookbehind: true,
            alias: "variable"
          },
          "cookware-keyword": {
            pattern: /^#/,
            alias: "keyword"
          },
          "quantity-group": {
            pattern: /* @__PURE__ */ new RegExp(/\{[^{}@#]*\}/),
            inside: {
              quantity: {
                pattern: new RegExp(/(^\{)/.source + n2),
                lookbehind: true,
                alias: "number"
              },
              punctuation: /[{}]/
            }
          }
        }
      },
      "ingredient-group": {
        pattern: /* @__PURE__ */ new RegExp("@(?:" + a + "|" + t + ")"),
        inside: {
          ingredient: {
            pattern: /* @__PURE__ */ new RegExp("(^@)(?:" + n2 + ")"),
            lookbehind: true,
            alias: "variable"
          },
          "ingredient-keyword": {
            pattern: /^@/,
            alias: "keyword"
          },
          "amount-group": {
            pattern: /\{[^{}]*\}/,
            inside: {
              amount: {
                pattern: /([\{|])[^{}|*%]+/,
                lookbehind: true,
                alias: "number"
              },
              unit: {
                pattern: /(%)[^}]+/,
                lookbehind: true,
                alias: "symbol"
              },
              "servings-scaler": {
                pattern: /\*/,
                alias: "operator"
              },
              "servings-alternative-separator": {
                pattern: /\|/,
                alias: "operator"
              },
              "unit-separator": {
                pattern: /(?:%|(\*)%)/,
                lookbehind: true,
                alias: "operator"
              },
              punctuation: /[{}]/
            }
          }
        }
      },
      "timer-group": {
        pattern: /~(?!\s)[^@#~{}]*\{[^{}]*\}/,
        inside: {
          timer: {
            pattern: /(^~)[^{]+/,
            lookbehind: true,
            alias: "variable"
          },
          "duration-group": {
            pattern: /\{[^{}]*\}/,
            inside: {
              punctuation: /[{}]/,
              unit: {
                pattern: new RegExp(/(%\s*)/.source + r + /\b/.source),
                lookbehind: true,
                alias: "symbol"
              },
              operator: /%/,
              duration: {
                pattern: /\d+/,
                alias: "number"
              }
            }
          },
          "timer-keyword": {
            pattern: /^~/,
            alias: "keyword"
          }
        }
      }
    };
  }(Prism$1), function(e) {
    for (var t = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source, n2 = 0;n2 < 2; n2++)
      t = t.replace(/<self>/g, function() {
        return t;
      });
    t = t.replace(/<self>/g, "[]"), e.languages.coq = {
      comment: RegExp(t),
      string: {
        pattern: /"(?:[^"]|"")*"(?!")/,
        greedy: true
      },
      attribute: [{
        pattern: RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(/<comment>/g, function() {
          return t;
        })),
        greedy: true,
        alias: "attr-name",
        inside: {
          comment: RegExp(t),
          string: {
            pattern: /"(?:[^"]|"")*"(?!")/,
            greedy: true
          },
          operator: /=/,
          punctuation: /^#\[|\]$|[,()]/
        }
      }, {
        pattern: /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
        alias: "attr-name"
      }],
      keyword: /\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,
      number: /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
      punct: {
        pattern: /@\{|\{\||\[=|:>/,
        alias: "punctuation"
      },
      operator: /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
      punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
    };
  }(Prism$1), function(e) {
    e.languages.ruby = e.languages.extend("clike", {
      comment: {
        pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
        greedy: true
      },
      "class-name": {
        pattern: /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
        lookbehind: true,
        inside: { punctuation: /[.\\]/ }
      },
      keyword: /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
      operator: /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
      punctuation: /[(){}[\].,;]/
    }), e.languages.insertBefore("ruby", "operator", { "double-colon": {
      pattern: /::/,
      alias: "punctuation"
    } });
    var t = {
      pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
      lookbehind: true,
      inside: {
        content: {
          pattern: /^(#\{)[\s\S]+(?=\}$)/,
          lookbehind: true,
          inside: e.languages.ruby
        },
        delimiter: {
          pattern: /^#\{|\}$/,
          alias: "punctuation"
        }
      }
    }, n2 = (delete e.languages.ruby.function, "(?:" + [
      /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
      /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
      /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
      /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
      /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
    ].join("|") + ")"), a = /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;
    e.languages.insertBefore("ruby", "keyword", {
      "regex-literal": [{
        pattern: RegExp(/%r/.source + n2 + /[egimnosux]{0,6}/.source),
        greedy: true,
        inside: {
          interpolation: t,
          regex: /[\s\S]+/
        }
      }, {
        pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
        lookbehind: true,
        greedy: true,
        inside: {
          interpolation: t,
          regex: /[\s\S]+/
        }
      }],
      variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
      symbol: [{
        pattern: RegExp(/(^|[^:]):/.source + a),
        lookbehind: true,
        greedy: true
      }, {
        pattern: RegExp(/([\r\n{(,][ \t]*)/.source + a + /(?=:(?!:))/.source),
        lookbehind: true,
        greedy: true
      }],
      "method-definition": {
        pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
        lookbehind: true,
        inside: {
          function: /\b\w+$/,
          keyword: /^self\b/,
          "class-name": /^\w+/,
          punctuation: /\./
        }
      }
    }), e.languages.insertBefore("ruby", "string", {
      "string-literal": [
        {
          pattern: RegExp(/%[qQiIwWs]?/.source + n2),
          greedy: true,
          inside: {
            interpolation: t,
            string: /[\s\S]+/
          }
        },
        {
          pattern: /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
          greedy: true,
          inside: {
            interpolation: t,
            string: /[\s\S]+/
          }
        },
        {
          pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
          alias: "heredoc-string",
          greedy: true,
          inside: {
            delimiter: {
              pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
              inside: {
                symbol: /\b\w+/,
                punctuation: /^<<[-~]?/
              }
            },
            interpolation: t,
            string: /[\s\S]+/
          }
        },
        {
          pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
          alias: "heredoc-string",
          greedy: true,
          inside: {
            delimiter: {
              pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
              inside: {
                symbol: /\b\w+/,
                punctuation: /^<<[-~]?'|'$/
              }
            },
            string: /[\s\S]+/
          }
        }
      ],
      "command-literal": [{
        pattern: RegExp(/%x/.source + n2),
        greedy: true,
        inside: {
          interpolation: t,
          command: {
            pattern: /[\s\S]+/,
            alias: "string"
          }
        }
      }, {
        pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
        greedy: true,
        inside: {
          interpolation: t,
          command: {
            pattern: /[\s\S]+/,
            alias: "string"
          }
        }
      }]
    }), delete e.languages.ruby.string, e.languages.insertBefore("ruby", "number", {
      builtin: /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
      constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
    }), e.languages.rb = e.languages.ruby;
  }(Prism$1), function(e) {
    e.languages.crystal = e.languages.extend("ruby", {
      keyword: [/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/, {
        pattern: /(\.\s*)(?:is_a|responds_to)\?/,
        lookbehind: true
      }],
      number: /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
      operator: [/->/, e.languages.ruby.operator],
      punctuation: /[(){}[\].,;\\]/
    }), e.languages.insertBefore("crystal", "string-literal", {
      attribute: {
        pattern: /@\[.*?\]/,
        inside: {
          delimiter: {
            pattern: /^@\[|\]$/,
            alias: "punctuation"
          },
          attribute: {
            pattern: /^(\s*)\w+/,
            lookbehind: true,
            alias: "class-name"
          },
          args: {
            pattern: /\S(?:[\s\S]*\S)?/,
            inside: e.languages.crystal
          }
        }
      },
      expansion: {
        pattern: /\{(?:\{.*?\}|%.*?%)\}/,
        inside: {
          content: {
            pattern: /^(\{.)[\s\S]+(?=.\}$)/,
            lookbehind: true,
            inside: e.languages.crystal
          },
          delimiter: {
            pattern: /^\{[\{%]|[\}%]\}$/,
            alias: "operator"
          }
        }
      },
      char: {
        pattern: /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
        greedy: true
      }
    });
  }(Prism$1), function(e) {
    var t = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, t = (e.languages.css.selector = {
      pattern: e.languages.css.selector.pattern,
      lookbehind: true,
      inside: t = {
        "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
        "pseudo-class": /:[-\w]+/,
        class: /\.[-\w]+/,
        id: /#[-\w]+/,
        attribute: {
          pattern: RegExp(`\\[(?:[^[\\]"']|` + t.source + ")*\\]"),
          greedy: true,
          inside: {
            punctuation: /^\[|\]$/,
            "case-sensitivity": {
              pattern: /(\s)[si]$/i,
              lookbehind: true,
              alias: "keyword"
            },
            namespace: {
              pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,
              lookbehind: true,
              inside: { punctuation: /\|$/ }
            },
            "attr-name": {
              pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,
              lookbehind: true
            },
            "attr-value": [t, {
              pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,
              lookbehind: true
            }],
            operator: /[|~*^$]?=/
          }
        },
        "n-th": [{
          pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,
          lookbehind: true,
          inside: {
            number: /[\dn]+/,
            operator: /[+-]/
          }
        }, {
          pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i,
          lookbehind: true
        }],
        combinator: />|\+|~|\|\|/,
        punctuation: /[(),]/
      }
    }, e.languages.css.atrule.inside["selector-function-argument"].inside = t, e.languages.insertBefore("css", "property", { variable: {
      pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,
      lookbehind: true
    } }), {
      pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
      lookbehind: true
    }), n2 = {
      pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
      lookbehind: true
    };
    e.languages.insertBefore("css", "function", {
      operator: {
        pattern: /(\s)[+\-*\/](?=\s)/,
        lookbehind: true
      },
      hexcode: {
        pattern: /\B#[\da-f]{3,8}\b/i,
        alias: "color"
      },
      color: [{
        pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
        lookbehind: true
      }, {
        pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
        inside: {
          unit: t,
          number: n2,
          function: /[\w-]+(?=\()/,
          punctuation: /[(),]/
        }
      }],
      entity: /\\[\da-f]{1,8}/i,
      unit: t,
      number: n2
    });
  }(Prism$1), Prism$1.languages.csv = {
    value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
    punctuation: /,/
  }, function(e) {
    var t = "(?:" + (/"""(?:[^\\"]|"(?!""\2)|<esc>)*"""/.source + "|" + /'''(?:[^\\']|'(?!''\2)|<esc>)*'''/.source + "|" + /"(?:[^\\\r\n"]|"(?!\2)|<esc>)*"/.source + "|" + /'(?:[^\\\r\n']|'(?!\2)|<esc>)*'/.source).replace(/<esc>/g, /\\(?:(?!\2)|\2(?:[^()\r\n]|\([^()]*\)))/.source) + ")";
    e.languages.cue = {
      comment: {
        pattern: /\/\/.*/,
        greedy: true
      },
      "string-literal": {
        pattern: RegExp(/(^|[^#"'\\])(#*)/.source + t + /(?!["'])\2/.source),
        lookbehind: true,
        greedy: true,
        inside: {
          escape: {
            pattern: /(?=[\s\S]*["'](#*)$)\\\1(?:U[a-fA-F0-9]{1,8}|u[a-fA-F0-9]{1,4}|x[a-fA-F0-9]{1,2}|\d{2,3}|[^(])/,
            greedy: true,
            alias: "string"
          },
          interpolation: {
            pattern: /(?=[\s\S]*["'](#*)$)\\\1\([^()]*\)/,
            greedy: true,
            inside: {
              punctuation: /^\\#*\(|\)$/,
              expression: {
                pattern: /[\s\S]+/,
                inside: null
              }
            }
          },
          string: /[\s\S]+/
        }
      },
      keyword: {
        pattern: /(^|[^\w$])(?:for|if|import|in|let|null|package)(?![\w$])/,
        lookbehind: true
      },
      boolean: {
        pattern: /(^|[^\w$])(?:false|true)(?![\w$])/,
        lookbehind: true
      },
      builtin: {
        pattern: /(^|[^\w$])(?:bool|bytes|float|float(?:32|64)|u?int(?:8|16|32|64|128)?|number|rune|string)(?![\w$])/,
        lookbehind: true
      },
      attribute: {
        pattern: /@[\w$]+(?=\s*\()/,
        alias: "function"
      },
      function: {
        pattern: /(^|[^\w$])[a-z_$][\w$]*(?=\s*\()/i,
        lookbehind: true
      },
      number: {
        pattern: /(^|[^\w$.])(?:0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|0[xX][0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[eE][+-]?\d+(?:_\d+)*)?(?:[KMGTP]i?)?)(?![\w$])/,
        lookbehind: true
      },
      operator: /\.{3}|_\|_|&&?|\|\|?|[=!]~|[<>=!]=?|[+\-*/?]/,
      punctuation: /[()[\]{},.:]/
    }, e.languages.cue["string-literal"].inside.interpolation.inside.expression.inside = e.languages.cue;
  }(Prism$1), Prism$1.languages.cypher = {
    comment: /\/\/.*/,
    string: {
      pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
      greedy: true
    },
    "class-name": {
      pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
      lookbehind: true,
      greedy: true
    },
    relationship: {
      pattern: /(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
      lookbehind: true,
      greedy: true,
      alias: "property"
    },
    identifier: {
      pattern: /`(?:[^`\\\r\n])*`/,
      greedy: true
    },
    variable: /\$\w+/,
    keyword: /\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,
    function: /\b\w+\b(?=\s*\()/,
    boolean: /\b(?:false|null|true)\b/i,
    number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
    operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
    punctuation: /[()[\]{},;.]/
  }, Prism$1.languages.d = Prism$1.languages.extend("clike", {
    comment: [{
      pattern: /^\s*#!.+/,
      greedy: true
    }, {
      pattern: RegExp(/(^|[^\\])/.source + "(?:" + [
        /\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,
        /\/\/.*/.source,
        /\/\*[\s\S]*?\*\//.source
      ].join("|") + ")"),
      lookbehind: true,
      greedy: true
    }],
    string: [{
      pattern: RegExp([
        /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,
        /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,
        /\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,
        /\bq"(.)[\s\S]*?\2"/.source,
        /(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source
      ].join("|"), "m"),
      greedy: true
    }, {
      pattern: /\bq\{(?:\{[^{}]*\}|[^{}])*\}/,
      greedy: true,
      alias: "token-string"
    }],
    keyword: /\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,
    number: [/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i, {
      pattern: /((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,
      lookbehind: true
    }],
    operator: /\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/
  }), Prism$1.languages.insertBefore("d", "string", { char: /'(?:\\(?:\W|\w+)|[^\\])'/ }), Prism$1.languages.insertBefore("d", "keyword", { property: /\B@\w*/ }), Prism$1.languages.insertBefore("d", "function", { register: {
    pattern: /\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,
    alias: "variable"
  } }), function(e) {
    var t = [/\b(?:async|sync|yield)\*/, /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/], n2 = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, a = {
      pattern: RegExp(n2 + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
      lookbehind: true,
      inside: { namespace: {
        pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
        inside: { punctuation: /\./ }
      } }
    };
    e.languages.dart = e.languages.extend("clike", {
      "class-name": [a, {
        pattern: RegExp(n2 + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),
        lookbehind: true,
        inside: a.inside
      }],
      keyword: t,
      operator: /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/
    }), e.languages.insertBefore("dart", "string", {
      "string-literal": {
        pattern: /r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,
        greedy: true,
        inside: {
          interpolation: {
            pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
            lookbehind: true,
            inside: {
              punctuation: /^\$\{?|\}$/,
              expression: {
                pattern: /[\s\S]+/,
                inside: e.languages.dart
              }
            }
          },
          string: /[\s\S]+/
        }
      },
      string: undefined
    }), e.languages.insertBefore("dart", "class-name", { metadata: {
      pattern: /@\w+/,
      alias: "function"
    } }), e.languages.insertBefore("dart", "class-name", { generics: {
      pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
      inside: {
        "class-name": a,
        keyword: t,
        punctuation: /[<>(),.:]/,
        operator: /[?&|]/
      }
    } });
  }(Prism$1), Prism$1.languages.dataweave = {
    url: /\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,
    property: {
      pattern: /(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,
      greedy: true
    },
    string: {
      pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
      greedy: true
    },
    "mime-type": /\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,
    date: {
      pattern: /\|[\w:+-]+\|/,
      greedy: true
    },
    comment: [{
      pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
      lookbehind: true,
      greedy: true
    }, {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: true,
      greedy: true
    }],
    regex: {
      pattern: /\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,
      greedy: true
    },
    keyword: /\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,
    function: /\b[A-Z_]\w*(?=\s*\()/i,
    number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
    punctuation: /[{}[\];(),.:@]/,
    operator: /<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,
    boolean: /\b(?:false|true)\b/
  }, Prism$1.languages.dax = {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,
      lookbehind: true
    },
    "data-field": {
      pattern: /'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,
      alias: "symbol"
    },
    measure: {
      pattern: /\[[ \w\xA0-\uFFFF]+\]/,
      alias: "constant"
    },
    string: {
      pattern: /"(?:[^"]|"")*"(?!")/,
      greedy: true
    },
    function: /\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,
    keyword: /\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,
    boolean: {
      pattern: /\b(?:FALSE|NULL|TRUE)\b/i,
      alias: "constant"
    },
    number: /\b\d+(?:\.\d*)?|\B\.\d+\b/,
    operator: /:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,
    punctuation: /[;\[\](){}`,.]/
  }, Prism$1.languages.dhall = {
    comment: /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
    string: {
      pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
      greedy: true,
      inside: { interpolation: {
        pattern: /\$\{[^{}]*\}/,
        inside: {
          expression: {
            pattern: /(^\$\{)[\s\S]+(?=\}$)/,
            lookbehind: true,
            alias: "language-dhall",
            inside: null
          },
          punctuation: /\$\{|\}/
        }
      } }
    },
    label: {
      pattern: /`[^`]*`/,
      greedy: true
    },
    url: {
      pattern: /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
      greedy: true
    },
    env: {
      pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
      greedy: true,
      inside: {
        function: /^env/,
        operator: /^:/,
        variable: /[\s\S]+/
      }
    },
    hash: {
      pattern: /\bsha256:[\da-fA-F]{64}\b/,
      inside: {
        function: /sha256/,
        operator: /:/,
        number: /[\da-fA-F]{64}/
      }
    },
    keyword: /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
    builtin: /\b(?:None|Some)\b/,
    boolean: /\b(?:False|True)\b/,
    number: /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
    operator: /\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
    punctuation: /\.\.|[{}\[\](),./]/,
    "class-name": /\b[A-Z]\w*\b/
  }, Prism$1.languages.dhall.string.inside.interpolation.inside.expression.inside = Prism$1.languages.dhall, function(a) {
    a.languages.diff = { coord: [
      /^(?:\*{3}|-{3}|\+{3}).*$/m,
      /^@@.*@@$/m,
      /^\d.*$/m
    ] };
    var r = {
      "deleted-sign": "-",
      "deleted-arrow": "<",
      "inserted-sign": "+",
      "inserted-arrow": ">",
      unchanged: " ",
      diff: "!"
    };
    Object.keys(r).forEach(function(e) {
      var t = r[e], n2 = [];
      /^\w+$/.test(e) || n2.push(/\w+/.exec(e)[0]), e === "diff" && n2.push("bold"), a.languages.diff[e] = {
        pattern: RegExp("^(?:[" + t + `].*(?:\r
?|
|(?![\\s\\S])))+`, "m"),
        alias: n2,
        inside: {
          line: {
            pattern: /(.)(?=[\s\S]).*(?:\r\n?|\n)?/,
            lookbehind: true
          },
          prefix: {
            pattern: /[\s\S]/,
            alias: /\w+/.exec(e)[0]
          }
        }
      };
    }), Object.defineProperty(a.languages.diff, "PREFIXES", { value: r });
  }(Prism$1), function(m2) {
    function g2(e, t) {
      return "___" + e.toUpperCase() + t + "___";
    }
    Object.defineProperties(m2.languages["markup-templating"] = {}, {
      buildPlaceholders: { value: function(a, r, e, i) {
        var o;
        a.language === r && (o = a.tokenStack = [], a.code = a.code.replace(e, function(e$1) {
          if (typeof i == "function" && !i(e$1))
            return e$1;
          for (var t, n2 = o.length;a.code.indexOf(t = g2(r, n2)) !== -1; )
            ++n2;
          return o[n2] = e$1, t;
        }), a.grammar = m2.languages.markup);
      } },
      tokenizePlaceholders: { value: function(d2, c) {
        var u, p2;
        d2.language === c && d2.tokenStack && (d2.grammar = m2.languages[c], u = 0, p2 = Object.keys(d2.tokenStack), function e(t) {
          for (var n2 = 0;n2 < t.length && !(u >= p2.length); n2++) {
            var a, r, i, o, s, l = t[n2];
            typeof l == "string" || l.content && typeof l.content == "string" ? (a = p2[u], i = d2.tokenStack[a], o = typeof l == "string" ? l : l.content, a = g2(c, a), -1 < (s = o.indexOf(a)) && (++u, r = o.substring(0, s), i = new m2.Token(c, m2.tokenize(i, d2.grammar), "language-" + c, i), o = o.substring(s + a.length), s = [], r && s.push.apply(s, e([r])), s.push(i), o && s.push.apply(s, e([o])), typeof l == "string" ? t.splice.apply(t, [n2, 1].concat(s)) : l.content = s)) : l.content && e(l.content);
          }
          return t;
        }(d2.tokens));
      } }
    });
  }(Prism$1), function(e) {
    e.languages.django = {
      comment: /^\{#[\s\S]*?#\}$/,
      tag: {
        pattern: /(^\{%[+-]?\s*)\w+/,
        lookbehind: true,
        alias: "keyword"
      },
      delimiter: {
        pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
        alias: "punctuation"
      },
      string: {
        pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
        greedy: true
      },
      filter: {
        pattern: /(\|)\w+/,
        lookbehind: true,
        alias: "function"
      },
      test: {
        pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
        lookbehind: true,
        alias: "function"
      },
      function: /\b[a-z_]\w+(?=\s*\()/i,
      keyword: /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
      operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
      number: /\b\d+(?:\.\d+)?\b/,
      boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
      variable: /\b\w+\b/,
      punctuation: /[{}[\](),.:;]/
    };
    var t = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g, n2 = e.languages["markup-templating"];
    e.hooks.add("before-tokenize", function(e$1) {
      n2.buildPlaceholders(e$1, "django", t);
    }), e.hooks.add("after-tokenize", function(e$1) {
      n2.tokenizePlaceholders(e$1, "django");
    }), e.languages.jinja2 = e.languages.django, e.hooks.add("before-tokenize", function(e$1) {
      n2.buildPlaceholders(e$1, "jinja2", t);
    }), e.hooks.add("after-tokenize", function(e$1) {
      n2.tokenizePlaceholders(e$1, "jinja2");
    });
  }(Prism$1), Prism$1.languages["dns-zone-file"] = {
    comment: /;.*/,
    string: {
      pattern: /"(?:\\.|[^"\\\r\n])*"/,
      greedy: true
    },
    variable: [{
      pattern: /(^\$ORIGIN[ \t]+)\S+/m,
      lookbehind: true
    }, {
      pattern: /(^|\s)@(?=\s|$)/,
      lookbehind: true
    }],
    keyword: /^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,
    class: {
      pattern: /(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,
      lookbehind: true,
      alias: "keyword"
    },
    type: {
      pattern: /(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,
      lookbehind: true,
      alias: "keyword"
    },
    punctuation: /[()]/
  }, Prism$1.languages["dns-zone"] = Prism$1.languages["dns-zone-file"], function(e) {
    var t = /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source, n2 = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g, function() {
      return t;
    }), a = /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source, r = /--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g, function() {
      return a;
    }), i = {
      pattern: RegExp(a),
      greedy: true
    }, o = {
      pattern: /(^[ \t]*)#.*/m,
      lookbehind: true,
      greedy: true
    };
    function s(e$1, t$1) {
      return e$1 = e$1.replace(/<OPT>/g, function() {
        return r;
      }).replace(/<SP>/g, function() {
        return n2;
      }), RegExp(e$1, t$1);
    }
    e.languages.docker = {
      instruction: {
        pattern: /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,
        lookbehind: true,
        greedy: true,
        inside: {
          options: {
            pattern: s(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source, "i"),
            lookbehind: true,
            greedy: true,
            inside: {
              property: {
                pattern: /(^|\s)--[\w-]+/,
                lookbehind: true
              },
              string: [i, {
                pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/,
                lookbehind: true
              }],
              operator: /\\$/m,
              punctuation: /=/
            }
          },
          keyword: [
            {
              pattern: s(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source, "i"),
              lookbehind: true,
              greedy: true
            },
            {
              pattern: s(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source, "i"),
              lookbehind: true,
              greedy: true
            },
            {
              pattern: s(/(^ONBUILD<SP>)\w+/.source, "i"),
              lookbehind: true,
              greedy: true
            },
            {
              pattern: /^\w+/,
              greedy: true
            }
          ],
          comment: o,
          string: i,
          variable: /\$(?:\w+|\{[^{}"'\\]*\})/,
          operator: /\\$/m
        }
      },
      comment: o
    }, e.languages.dockerfile = e.languages.docker;
  }(Prism$1), function(e) {
    var n2 = "(?:" + [
      /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,
      /-?(?:\.\d+|\d+(?:\.\d*)?)/.source,
      /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,
      /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/.source
    ].join("|") + ")", t = { markup: {
      pattern: /(^<)[\s\S]+(?=>$)/,
      lookbehind: true,
      alias: [
        "language-markup",
        "language-html",
        "language-xml"
      ],
      inside: e.languages.markup
    } };
    function a(e$1, t$1) {
      return RegExp(e$1.replace(/<ID>/g, function() {
        return n2;
      }), t$1);
    }
    e.languages.dot = {
      comment: {
        pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
        greedy: true
      },
      "graph-name": {
        pattern: a(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source, "i"),
        lookbehind: true,
        greedy: true,
        alias: "class-name",
        inside: t
      },
      "attr-value": {
        pattern: a(/(=[ \t\r\n]*)<ID>/.source),
        lookbehind: true,
        greedy: true,
        inside: t
      },
      "attr-name": {
        pattern: a(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
        lookbehind: true,
        greedy: true,
        inside: t
      },
      keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
      "compass-point": {
        pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
        lookbehind: true,
        alias: "builtin"
      },
      node: {
        pattern: a(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
        lookbehind: true,
        greedy: true,
        inside: t
      },
      operator: /[=:]|-[->]/,
      punctuation: /[\[\]{};,]/
    }, e.languages.gv = e.languages.dot;
  }(Prism$1), Prism$1.languages.ebnf = {
    comment: /\(\*[\s\S]*?\*\)/,
    string: {
      pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
      greedy: true
    },
    special: {
      pattern: /\?[^?\r\n]*\?/,
      greedy: true,
      alias: "class-name"
    },
    definition: {
      pattern: /^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,
      lookbehind: true,
      alias: ["rule", "keyword"]
    },
    rule: /\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,
    punctuation: /\([:/]|[:/]\)|[.,;()[\]{}]/,
    operator: /[-=|*/!]/
  }, Prism$1.languages.editorconfig = {
    comment: /[;#].*/,
    section: {
      pattern: /(^[ \t]*)\[.+\]/m,
      lookbehind: true,
      alias: "selector",
      inside: {
        regex: /\\\\[\[\]{},!?.*]/,
        operator: /[!?]|\.\.|\*{1,2}/,
        punctuation: /[\[\]{},]/
      }
    },
    key: {
      pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
      lookbehind: true,
      alias: "attr-name"
    },
    value: {
      pattern: /=.*/,
      alias: "attr-value",
      inside: { punctuation: /^=/ }
    }
  }, Prism$1.languages.eiffel = {
    comment: /--.*/,
    string: [
      {
        pattern: /"([^[]*)\[[\s\S]*?\]\1"/,
        greedy: true
      },
      {
        pattern: /"([^{]*)\{[\s\S]*?\}\1"/,
        greedy: true
      },
      {
        pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,
        greedy: true
      }
    ],
    char: /'(?:%.|[^%'\r\n])+'/,
    keyword: /\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
    boolean: /\b(?:False|True)\b/i,
    "class-name": /\b[A-Z][\dA-Z_]*\b/,
    number: [/\b0[xcb][\da-f](?:_*[\da-f])*\b/i, /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],
    punctuation: /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
    operator: /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
  }, function(t) {
    t.languages.ejs = {
      delimiter: {
        pattern: /^<%[-_=]?|[-_]?%>$/,
        alias: "punctuation"
      },
      comment: /^#[\s\S]*/,
      "language-javascript": {
        pattern: /[\s\S]+/,
        inside: t.languages.javascript
      }
    }, t.hooks.add("before-tokenize", function(e) {
      t.languages["markup-templating"].buildPlaceholders(e, "ejs", /<%(?!%)[\s\S]+?%>/g);
    }), t.hooks.add("after-tokenize", function(e) {
      t.languages["markup-templating"].tokenizePlaceholders(e, "ejs");
    }), t.languages.eta = t.languages.ejs;
  }(Prism$1), Prism$1.languages.elixir = {
    doc: {
      pattern: /@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,
      inside: {
        attribute: /^@\w+/,
        string: /['"][\s\S]+/
      }
    },
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    regex: {
      pattern: /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,
      greedy: true
    },
    string: [
      {
        pattern: /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,
        greedy: true,
        inside: {}
      },
      {
        pattern: /("""|''')[\s\S]*?\1/,
        greedy: true,
        inside: {}
      },
      {
        pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
        greedy: true,
        inside: {}
      }
    ],
    atom: {
      pattern: /(^|[^:]):\w+/,
      lookbehind: true,
      alias: "symbol"
    },
    module: {
      pattern: /\b[A-Z]\w*\b/,
      alias: "class-name"
    },
    "attr-name": /\b\w+\??:(?!:)/,
    argument: {
      pattern: /(^|[^&])&\d+/,
      lookbehind: true,
      alias: "variable"
    },
    attribute: {
      pattern: /@\w+/,
      alias: "variable"
    },
    function: /\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,
    number: /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,
    keyword: /\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,
    boolean: /\b(?:false|nil|true)\b/,
    operator: [
      /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,
      {
        pattern: /([^<])<(?!<)/,
        lookbehind: true
      },
      {
        pattern: /([^>])>(?!>)/,
        lookbehind: true
      }
    ],
    punctuation: /<<|>>|[.,%\[\]{}()]/
  }, Prism$1.languages.elixir.string.forEach(function(e) {
    e.inside = { interpolation: {
      pattern: /#\{[^}]+\}/,
      inside: {
        delimiter: {
          pattern: /^#\{|\}$/,
          alias: "punctuation"
        },
        rest: Prism$1.languages.elixir
      }
    } };
  }), Prism$1.languages.elm = {
    comment: /--.*|\{-[\s\S]*?-\}/,
    char: {
      pattern: /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,
      greedy: true
    },
    string: [{
      pattern: /"""[\s\S]*?"""/,
      greedy: true
    }, {
      pattern: /"(?:[^\\"\r\n]|\\.)*"/,
      greedy: true
    }],
    "import-statement": {
      pattern: /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,
      lookbehind: true,
      inside: { keyword: /\b(?:as|exposing|import)\b/ }
    },
    keyword: /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,
    builtin: /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,
    number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,
    operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,
    hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,
    constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,
    punctuation: /[{}[\]|(),.:]/
  }, Prism$1.languages.lua = {
    comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
    string: {
      pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
      greedy: true
    },
    number: /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,
    keyword: /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,
    function: /(?!\d)\w+(?=\s*(?:[({]))/,
    operator: [/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/, {
      pattern: /(^|[^.])\.\.(?!\.)/,
      lookbehind: true
    }],
    punctuation: /[\[\](){},;]|\.+|:+/
  }, function(t) {
    t.languages.etlua = {
      delimiter: {
        pattern: /^<%[-=]?|-?%>$/,
        alias: "punctuation"
      },
      "language-lua": {
        pattern: /[\s\S]+/,
        inside: t.languages.lua
      }
    }, t.hooks.add("before-tokenize", function(e) {
      t.languages["markup-templating"].buildPlaceholders(e, "etlua", /<%[\s\S]+?%>/g);
    }), t.hooks.add("after-tokenize", function(e) {
      t.languages["markup-templating"].tokenizePlaceholders(e, "etlua");
    });
  }(Prism$1), function(t) {
    t.languages.erb = {
      delimiter: {
        pattern: /^(\s*)<%=?|%>(?=\s*$)/,
        lookbehind: true,
        alias: "punctuation"
      },
      ruby: {
        pattern: /\s*\S[\s\S]*/,
        alias: "language-ruby",
        inside: t.languages.ruby
      }
    }, t.hooks.add("before-tokenize", function(e) {
      t.languages["markup-templating"].buildPlaceholders(e, "erb", /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g);
    }), t.hooks.add("after-tokenize", function(e) {
      t.languages["markup-templating"].tokenizePlaceholders(e, "erb");
    });
  }(Prism$1), Prism$1.languages.erlang = {
    comment: /%.+/,
    string: {
      pattern: /"(?:\\.|[^\\"\r\n])*"/,
      greedy: true
    },
    "quoted-function": {
      pattern: /'(?:\\.|[^\\'\r\n])+'(?=\()/,
      alias: "function"
    },
    "quoted-atom": {
      pattern: /'(?:\\.|[^\\'\r\n])+'/,
      alias: "atom"
    },
    boolean: /\b(?:false|true)\b/,
    keyword: /\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,
    number: [
      /\$\\?./,
      /\b\d+#[a-z0-9]+/i,
      /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i
    ],
    function: /\b[a-z][\w@]*(?=\()/,
    variable: {
      pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
      lookbehind: true
    },
    operator: [
      /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,
      {
        pattern: /(^|[^<])<(?!<)/,
        lookbehind: true
      },
      {
        pattern: /(^|[^>])>(?!>)/,
        lookbehind: true
      }
    ],
    atom: /\b[a-z][\w@]*/,
    punctuation: /[()[\]{}:;,.#|]|<<|>>/
  }, Prism$1.languages["excel-formula"] = {
    comment: {
      pattern: /(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /"(?:[^"]|"")*"(?!")/,
      greedy: true
    },
    reference: {
      pattern: /(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,
      greedy: true,
      alias: "string",
      inside: {
        operator: /!$/,
        punctuation: /'/,
        sheet: {
          pattern: /[^[\]]+$/,
          alias: "function"
        },
        file: {
          pattern: /\[[^[\]]+\]$/,
          inside: { punctuation: /[[\]]/ }
        },
        path: /[\s\S]+/
      }
    },
    "function-name": {
      pattern: /\b[A-Z]\w*(?=\()/i,
      alias: "builtin"
    },
    range: {
      pattern: /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,
      alias: "selector",
      inside: {
        operator: /:/,
        cell: /\$?[A-Z]+\$?\d+/i,
        column: /\$?[A-Z]+/i,
        row: /\$?\d+/
      }
    },
    cell: {
      pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,
      alias: "selector"
    },
    number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
    boolean: /\b(?:FALSE|TRUE)\b/i,
    operator: /[-+*/^%=&,]|<[=>]?|>=?/,
    punctuation: /[[\]();{}|]/
  }, Prism$1.languages.xlsx = Prism$1.languages.xls = Prism$1.languages["excel-formula"], Prism$1.languages.fsharp = Prism$1.languages.extend("clike", {
    comment: [{
      pattern: /(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,
      lookbehind: true,
      greedy: true
    }, {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: true,
      greedy: true
    }],
    string: {
      pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,
      greedy: true
    },
    "class-name": {
      pattern: /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,
      lookbehind: true,
      inside: {
        operator: /->|\*/,
        punctuation: /\./
      }
    },
    keyword: /\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,
    number: [
      /\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,
      /\b0b[01]+(?:uy|y)?\b/,
      /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,
      /\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/
    ],
    operator: /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/
  }), Prism$1.languages.insertBefore("fsharp", "keyword", { preprocessor: {
    pattern: /(^[\t ]*)#.*/m,
    lookbehind: true,
    alias: "property",
    inside: { directive: {
      pattern: /(^#)\b(?:else|endif|if|light|line|nowarn)\b/,
      lookbehind: true,
      alias: "keyword"
    } }
  } }), Prism$1.languages.insertBefore("fsharp", "punctuation", { "computation-expression": {
    pattern: /\b[_a-z]\w*(?=\s*\{)/i,
    alias: "keyword"
  } }), Prism$1.languages.insertBefore("fsharp", "string", {
    annotation: {
      pattern: /\[<.+?>\]/,
      greedy: true,
      inside: {
        punctuation: /^\[<|>\]$/,
        "class-name": {
          pattern: /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,
          lookbehind: true
        },
        "annotation-content": {
          pattern: /[\s\S]+/,
          inside: Prism$1.languages.fsharp
        }
      }
    },
    char: {
      pattern: /'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,
      greedy: true
    }
  }), function(e) {
    function t(e$1) {
      return (e$1 + "").replace(/([.?*+\^$\[\]\\(){}|\-])/g, "\\$1");
    }
    function n2(e$1) {
      return /* @__PURE__ */ new RegExp("(^|\\s)(?:" + e$1.map(t).join("|") + ")(?=\\s|$)");
    }
    var a = { function: /\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/ }, r = { number: /\\[^\s']|%\w/ }, i = {
      comment: [
        {
          pattern: /(^|\s)(?:! .*|!$)/,
          lookbehind: true,
          inside: a
        },
        {
          pattern: /(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,
          lookbehind: true,
          greedy: true,
          inside: a
        },
        {
          pattern: /(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
          lookbehind: true,
          greedy: true,
          inside: a
        }
      ],
      number: [
        {
          pattern: /(^|\s)[+-]?\d+(?=\s|$)/,
          lookbehind: true
        },
        {
          pattern: /(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,
          lookbehind: true
        },
        {
          pattern: /(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,
          lookbehind: true
        },
        {
          pattern: /(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,
          lookbehind: true
        },
        {
          pattern: /(^|\s)-\d+-\d+\/\d+(?=\s|$)/,
          lookbehind: true
        },
        {
          pattern: /(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,
          lookbehind: true
        },
        {
          pattern: /(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,
          lookbehind: true
        },
        {
          pattern: /(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,
          lookbehind: true
        }
      ],
      regexp: {
        pattern: /(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,
        lookbehind: true,
        alias: "number",
        inside: {
          variable: /\\\S/,
          keyword: /[+?*\[\]^$(){}.|]/,
          operator: {
            pattern: /(\/)[idmsr]+(?:-[idmsr]+)?/,
            lookbehind: true
          }
        }
      },
      boolean: {
        pattern: /(^|\s)[tf](?=\s|$)/,
        lookbehind: true
      },
      "custom-string": {
        pattern: /(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,
        lookbehind: true,
        greedy: true,
        alias: "string",
        inside: { number: /\\\S|%\w|\// }
      },
      "multiline-string": [
        {
          pattern: /(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,
          lookbehind: true,
          greedy: true,
          alias: "string",
          inside: {
            number: r.number,
            "semicolon-or-setlocal": {
              pattern: /([\r\n][ \t]*);(?=\s|$)/,
              lookbehind: true,
              alias: "function"
            }
          }
        },
        {
          pattern: /(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,
          lookbehind: true,
          greedy: true,
          alias: "string",
          inside: r
        },
        {
          pattern: /(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
          lookbehind: true,
          greedy: true,
          alias: "string",
          inside: r
        }
      ],
      "special-using": {
        pattern: /(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,
        lookbehind: true,
        alias: "function",
        inside: { string: {
          pattern: /(\s)[^:\s]+/,
          lookbehind: true
        } }
      },
      "stack-effect-delimiter": [
        {
          pattern: /(^|\s)(?:call|eval|execute)?\((?=\s)/,
          lookbehind: true,
          alias: "operator"
        },
        {
          pattern: /(\s)--(?=\s)/,
          lookbehind: true,
          alias: "operator"
        },
        {
          pattern: /(\s)\)(?=\s|$)/,
          lookbehind: true,
          alias: "operator"
        }
      ],
      combinators: {
        pattern: null,
        lookbehind: true,
        alias: "keyword"
      },
      "kernel-builtin": {
        pattern: null,
        lookbehind: true,
        alias: "variable"
      },
      "sequences-builtin": {
        pattern: null,
        lookbehind: true,
        alias: "variable"
      },
      "math-builtin": {
        pattern: null,
        lookbehind: true,
        alias: "variable"
      },
      "constructor-word": {
        pattern: /(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,
        lookbehind: true,
        alias: "keyword"
      },
      "other-builtin-syntax": {
        pattern: null,
        lookbehind: true,
        alias: "operator"
      },
      "conventionally-named-word": {
        pattern: /(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,
        lookbehind: true,
        alias: "keyword"
      },
      "colon-syntax": {
        pattern: /(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,
        lookbehind: true,
        greedy: true,
        alias: "function"
      },
      "semicolon-or-setlocal": {
        pattern: /(\s)(?:;|:>)(?=\s|$)/,
        lookbehind: true,
        alias: "function"
      },
      "curly-brace-literal-delimiter": [{
        pattern: /(^|\s)[a-z]*\{(?=\s)/i,
        lookbehind: true,
        alias: "operator"
      }, {
        pattern: /(\s)\}(?=\s|$)/,
        lookbehind: true,
        alias: "operator"
      }],
      "quotation-delimiter": [{
        pattern: /(^|\s)\[(?=\s)/,
        lookbehind: true,
        alias: "operator"
      }, {
        pattern: /(\s)\](?=\s|$)/,
        lookbehind: true,
        alias: "operator"
      }],
      "normal-word": {
        pattern: /(^|\s)[^"\s]\S*(?=\s|$)/,
        lookbehind: true
      },
      string: {
        pattern: /"(?:\\\S|[^"\\])*"/,
        greedy: true,
        inside: r
      }
    }, o = {
      "kernel-builtin": [
        "or",
        "2nipd",
        "4drop",
        "tuck",
        "wrapper",
        "nip",
        "wrapper?",
        "callstack>array",
        "die",
        "dupd",
        "callstack",
        "callstack?",
        "3dup",
        "hashcode",
        "pick",
        "4nip",
        "build",
        ">boolean",
        "nipd",
        "clone",
        "5nip",
        "eq?",
        "?",
        "=",
        "swapd",
        "2over",
        "clear",
        "2dup",
        "get-retainstack",
        "not",
        "tuple?",
        "dup",
        "3nipd",
        "call",
        "-rotd",
        "object",
        "drop",
        "assert=",
        "assert?",
        "-rot",
        "execute",
        "boa",
        "get-callstack",
        "curried?",
        "3drop",
        "pickd",
        "overd",
        "over",
        "roll",
        "3nip",
        "swap",
        "and",
        "2nip",
        "rotd",
        "throw",
        "(clone)",
        "hashcode*",
        "spin",
        "reach",
        "4dup",
        "equal?",
        "get-datastack",
        "assert",
        "2drop",
        "<wrapper>",
        "boolean?",
        "identity-hashcode",
        "identity-tuple?",
        "null",
        "composed?",
        "new",
        "5drop",
        "rot",
        "-roll",
        "xor",
        "identity-tuple",
        "boolean"
      ],
      "other-builtin-syntax": [
        "=======",
        "recursive",
        "flushable",
        ">>",
        "<<<<<<",
        "M\\",
        "B",
        "PRIVATE>",
        "\\",
        "======",
        "final",
        "inline",
        "delimiter",
        "deprecated",
        "<PRIVATE",
        ">>>>>>",
        "<<<<<<<",
        "parse-complex",
        "malformed-complex",
        "read-only",
        ">>>>>>>",
        "call-next-method",
        "<<",
        "foldable",
        "$",
        "$[",
        "${"
      ],
      "sequences-builtin": [
        "member-eq?",
        "mismatch",
        "append",
        "assert-sequence=",
        "longer",
        "repetition",
        "clone-like",
        "3sequence",
        "assert-sequence?",
        "last-index-from",
        "reversed",
        "index-from",
        "cut*",
        "pad-tail",
        "join-as",
        "remove-eq!",
        "concat-as",
        "but-last",
        "snip",
        "nths",
        "nth",
        "sequence",
        "longest",
        "slice?",
        "<slice>",
        "remove-nth",
        "tail-slice",
        "empty?",
        "tail*",
        "member?",
        "virtual-sequence?",
        "set-length",
        "drop-prefix",
        "iota",
        "unclip",
        "bounds-error?",
        "unclip-last-slice",
        "non-negative-integer-expected",
        "non-negative-integer-expected?",
        "midpoint@",
        "longer?",
        "?set-nth",
        "?first",
        "rest-slice",
        "prepend-as",
        "prepend",
        "fourth",
        "sift",
        "subseq-start",
        "new-sequence",
        "?last",
        "like",
        "first4",
        "1sequence",
        "reverse",
        "slice",
        "virtual@",
        "repetition?",
        "set-last",
        "index",
        "4sequence",
        "max-length",
        "set-second",
        "immutable-sequence",
        "first2",
        "first3",
        "supremum",
        "unclip-slice",
        "suffix!",
        "insert-nth",
        "tail",
        "3append",
        "short",
        "suffix",
        "concat",
        "flip",
        "immutable?",
        "reverse!",
        "2sequence",
        "sum",
        "delete-all",
        "indices",
        "snip-slice",
        "<iota>",
        "check-slice",
        "sequence?",
        "head",
        "append-as",
        "halves",
        "sequence=",
        "collapse-slice",
        "?second",
        "slice-error?",
        "product",
        "bounds-check?",
        "bounds-check",
        "immutable",
        "virtual-exemplar",
        "harvest",
        "remove",
        "pad-head",
        "last",
        "set-fourth",
        "cartesian-product",
        "remove-eq",
        "shorten",
        "shorter",
        "reversed?",
        "shorter?",
        "shortest",
        "head-slice",
        "pop*",
        "tail-slice*",
        "but-last-slice",
        "iota?",
        "append!",
        "cut-slice",
        "new-resizable",
        "head-slice*",
        "sequence-hashcode",
        "pop",
        "set-nth",
        "?nth",
        "second",
        "join",
        "immutable-sequence?",
        "<reversed>",
        "3append-as",
        "virtual-sequence",
        "subseq?",
        "remove-nth!",
        "length",
        "last-index",
        "lengthen",
        "assert-sequence",
        "copy",
        "move",
        "third",
        "first",
        "tail?",
        "set-first",
        "prefix",
        "bounds-error",
        "<repetition>",
        "exchange",
        "surround",
        "cut",
        "min-length",
        "set-third",
        "push-all",
        "head?",
        "subseq-start-from",
        "delete-slice",
        "rest",
        "sum-lengths",
        "head*",
        "infimum",
        "remove!",
        "glue",
        "slice-error",
        "subseq",
        "push",
        "replace-slice",
        "subseq-as",
        "unclip-last"
      ],
      "math-builtin": [
        "number=",
        "next-power-of-2",
        "?1+",
        "fp-special?",
        "imaginary-part",
        "float>bits",
        "number?",
        "fp-infinity?",
        "bignum?",
        "fp-snan?",
        "denominator",
        "gcd",
        "*",
        "+",
        "fp-bitwise=",
        "-",
        "u>=",
        "/",
        ">=",
        "bitand",
        "power-of-2?",
        "log2-expects-positive",
        "neg?",
        "<",
        "log2",
        ">",
        "integer?",
        "number",
        "bits>double",
        "2/",
        "zero?",
        "bits>float",
        "float?",
        "shift",
        "ratio?",
        "rect>",
        "even?",
        "ratio",
        "fp-sign",
        "bitnot",
        ">fixnum",
        "complex?",
        "/i",
        "integer>fixnum",
        "/f",
        "sgn",
        ">bignum",
        "next-float",
        "u<",
        "u>",
        "mod",
        "recip",
        "rational",
        ">float",
        "2^",
        "integer",
        "fixnum?",
        "neg",
        "fixnum",
        "sq",
        "bignum",
        ">rect",
        "bit?",
        "fp-qnan?",
        "simple-gcd",
        "complex",
        "<fp-nan>",
        "real",
        ">fraction",
        "double>bits",
        "bitor",
        "rem",
        "fp-nan-payload",
        "real-part",
        "log2-expects-positive?",
        "prev-float",
        "align",
        "unordered?",
        "float",
        "fp-nan?",
        "abs",
        "bitxor",
        "integer>fixnum-strict",
        "u<=",
        "odd?",
        "<=",
        "/mod",
        ">integer",
        "real?",
        "rational?",
        "numerator"
      ]
    };
    Object.keys(o).forEach(function(e$1) {
      i[e$1].pattern = n2(o[e$1]);
    });
    i.combinators.pattern = n2([
      "2bi",
      "while",
      "2tri",
      "bi*",
      "4dip",
      "both?",
      "same?",
      "tri@",
      "curry",
      "prepose",
      "3bi",
      "?if",
      "tri*",
      "2keep",
      "3keep",
      "curried",
      "2keepd",
      "when",
      "2bi*",
      "2tri*",
      "4keep",
      "bi@",
      "keepdd",
      "do",
      "unless*",
      "tri-curry",
      "if*",
      "loop",
      "bi-curry*",
      "when*",
      "2bi@",
      "2tri@",
      "with",
      "2with",
      "either?",
      "bi",
      "until",
      "3dip",
      "3curry",
      "tri-curry*",
      "tri-curry@",
      "bi-curry",
      "keepd",
      "compose",
      "2dip",
      "if",
      "3tri",
      "unless",
      "tuple",
      "keep",
      "2curry",
      "tri",
      "most",
      "while*",
      "dip",
      "composed",
      "bi-curry@",
      "find-last-from",
      "trim-head-slice",
      "map-as",
      "each-from",
      "none?",
      "trim-tail",
      "partition",
      "if-empty",
      "accumulate*",
      "reject!",
      "find-from",
      "accumulate-as",
      "collector-for-as",
      "reject",
      "map",
      "map-sum",
      "accumulate!",
      "2each-from",
      "follow",
      "supremum-by",
      "map!",
      "unless-empty",
      "collector",
      "padding",
      "reduce-index",
      "replicate-as",
      "infimum-by",
      "trim-tail-slice",
      "count",
      "find-index",
      "filter",
      "accumulate*!",
      "reject-as",
      "map-integers",
      "map-find",
      "reduce",
      "selector",
      "interleave",
      "2map",
      "filter-as",
      "binary-reduce",
      "map-index-as",
      "find",
      "produce",
      "filter!",
      "replicate",
      "cartesian-map",
      "cartesian-each",
      "find-index-from",
      "map-find-last",
      "3map-as",
      "3map",
      "find-last",
      "selector-as",
      "2map-as",
      "2map-reduce",
      "accumulate",
      "each",
      "each-index",
      "accumulate*-as",
      "when-empty",
      "all?",
      "collector-as",
      "push-either",
      "new-like",
      "collector-for",
      "2selector",
      "push-if",
      "2all?",
      "map-reduce",
      "3each",
      "any?",
      "trim-slice",
      "2reduce",
      "change-nth",
      "produce-as",
      "2each",
      "trim",
      "trim-head",
      "cartesian-find",
      "map-index",
      "if-zero",
      "each-integer",
      "unless-zero",
      "(find-integer)",
      "when-zero",
      "find-last-integer",
      "(all-integers?)",
      "times",
      "(each-integer)",
      "find-integer",
      "all-integers?",
      "unless-negative",
      "if-positive",
      "when-positive",
      "when-negative",
      "unless-positive",
      "if-negative",
      "case",
      "2cleave",
      "cond>quot",
      "case>quot",
      "3cleave",
      "wrong-values",
      "to-fixed-point",
      "alist>quot",
      "cond",
      "cleave",
      "call-effect",
      "recursive-hashcode",
      "spread",
      "deep-spread>quot",
      "2||",
      "0||",
      "n||",
      "0&&",
      "2&&",
      "3||",
      "1||",
      "1&&",
      "n&&",
      "3&&",
      "smart-unless*",
      "keep-inputs",
      "reduce-outputs",
      "smart-when*",
      "cleave>array",
      "smart-with",
      "smart-apply",
      "smart-if",
      "inputs/outputs",
      "output>sequence-n",
      "map-outputs",
      "map-reduce-outputs",
      "dropping",
      "output>array",
      "smart-map-reduce",
      "smart-2map-reduce",
      "output>array-n",
      "nullary",
      "input<sequence",
      "append-outputs",
      "drop-inputs",
      "inputs",
      "smart-2reduce",
      "drop-outputs",
      "smart-reduce",
      "preserving",
      "smart-when",
      "outputs",
      "append-outputs-as",
      "smart-unless",
      "smart-if*",
      "sum-outputs",
      "input<sequence-unsafe",
      "output>sequence"
    ]), e.languages.factor = i;
  }(Prism$1), Prism$1.languages.false = {
    comment: { pattern: /\{[^}]*\}/ },
    string: {
      pattern: /"[^"]*"/,
      greedy: true
    },
    "character-code": {
      pattern: /'(?:[^\r]|\r\n?)/,
      alias: "number"
    },
    "assembler-code": {
      pattern: /\d+`/,
      alias: "important"
    },
    number: /\d+/,
    operator: /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
    punctuation: /\[|\]/,
    variable: /[a-z]/,
    "non-standard": {
      pattern: /[()<BDO®]/,
      alias: "bold"
    }
  }, Prism$1.languages["firestore-security-rules"] = Prism$1.languages.extend("clike", {
    comment: /\/\/.*/,
    keyword: /\b(?:allow|function|if|match|null|return|rules_version|service)\b/,
    operator: /&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/
  }), delete Prism$1.languages["firestore-security-rules"]["class-name"], Prism$1.languages.insertBefore("firestore-security-rules", "keyword", {
    path: {
      pattern: /(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,
      lookbehind: true,
      greedy: true,
      inside: {
        variable: {
          pattern: /\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,
          inside: {
            operator: /=/,
            keyword: /\*\*/,
            punctuation: /[.$(){}]/
          }
        },
        punctuation: /\//
      }
    },
    method: {
      pattern: /(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,
      lookbehind: true,
      alias: "builtin",
      inside: { punctuation: /,/ }
    }
  }), function(e) {
    e.languages.flow = e.languages.extend("javascript", {}), e.languages.insertBefore("flow", "keyword", { type: [{
      pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,
      alias: "class-name"
    }] }), e.languages.flow["function-variable"].pattern = /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i, delete e.languages.flow.parameter, e.languages.insertBefore("flow", "operator", { "flow-punctuation": {
      pattern: /\{\||\|\}/,
      alias: "punctuation"
    } }), Array.isArray(e.languages.flow.keyword) || (e.languages.flow.keyword = [e.languages.flow.keyword]), e.languages.flow.keyword.unshift({
      pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
      lookbehind: true
    }, {
      pattern: /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,
      lookbehind: true
    });
  }(Prism$1), Prism$1.languages.fortran = {
    "quoted-number": {
      pattern: /[BOZ](['"])[A-F0-9]+\1/i,
      alias: "number"
    },
    string: {
      pattern: /(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,
      inside: { comment: {
        pattern: /(&(?:\r\n?|\n)\s*)!.*/,
        lookbehind: true
      } }
    },
    comment: {
      pattern: /!.*/,
      greedy: true
    },
    boolean: /\.(?:FALSE|TRUE)\.(?:_\w+)?/i,
    number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,
    keyword: [
      /\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,
      /\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,
      /\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,
      /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i
    ],
    operator: [/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i, {
      pattern: /(^|(?!\().)\/(?!\))/,
      lookbehind: true
    }],
    punctuation: /\(\/|\/\)|[(),;:&]/
  }, function(n2) {
    for (var a = /[^<()"']|\((?:<expr>)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source, e = 0;e < 2; e++)
      a = a.replace(/<expr>/g, function() {
        return a;
      });
    var a = a.replace(/<expr>/g, /[^\s\S]/.source), t = {
      comment: /<#--[\s\S]*?-->/,
      string: [{
        pattern: /\br("|')(?:(?!\1)[^\\]|\\.)*\1/,
        greedy: true
      }, {
        pattern: RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:<expr>))*\})*\1/.source.replace(/<expr>/g, function() {
          return a;
        })),
        greedy: true,
        inside: { interpolation: {
          pattern: RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:<expr>))*\}/.source.replace(/<expr>/g, function() {
            return a;
          })),
          lookbehind: true,
          inside: {
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            rest: null
          }
        } }
      }],
      keyword: /\b(?:as)\b/,
      boolean: /\b(?:false|true)\b/,
      "builtin-function": {
        pattern: /((?:^|[^?])\?\s*)\w+/,
        lookbehind: true,
        alias: "function"
      },
      function: /\b\w+(?=\s*\()/,
      number: /\b\d+(?:\.\d+)?\b/,
      operator: /\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,
      punctuation: /[,;.:()[\]{}]/
    };
    t.string[1].inside.interpolation.inside.rest = t, n2.languages.ftl = {
      "ftl-comment": {
        pattern: /^<#--[\s\S]*/,
        alias: "comment"
      },
      "ftl-directive": {
        pattern: /^<[\s\S]+>$/,
        inside: {
          directive: {
            pattern: /(^<\/?)[#@][a-z]\w*/i,
            lookbehind: true,
            alias: "keyword"
          },
          punctuation: /^<\/?|\/?>$/,
          content: {
            pattern: /\s*\S[\s\S]*/,
            alias: "ftl",
            inside: t
          }
        }
      },
      "ftl-interpolation": {
        pattern: /^\$\{[\s\S]*\}$/,
        inside: {
          punctuation: /^\$\{|\}$/,
          content: {
            pattern: /\s*\S[\s\S]*/,
            alias: "ftl",
            inside: t
          }
        }
      }
    }, n2.hooks.add("before-tokenize", function(e$1) {
      var t$1 = RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:<expr>)*?>|\$\{(?:<expr>)*?\}/.source.replace(/<expr>/g, function() {
        return a;
      }), "gi");
      n2.languages["markup-templating"].buildPlaceholders(e$1, "ftl", t$1);
    }), n2.hooks.add("after-tokenize", function(e$1) {
      n2.languages["markup-templating"].tokenizePlaceholders(e$1, "ftl");
    });
  }(Prism$1), Prism$1.languages.gamemakerlanguage = Prism$1.languages.gml = Prism$1.languages.extend("clike", {
    keyword: /\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,
    number: /(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,
    operator: /--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,
    constant: /\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,
    variable: /\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/
  }), Prism$1.languages.gap = {
    shell: {
      pattern: /^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,
      greedy: true,
      inside: {
        gap: {
          pattern: /^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,
          lookbehind: true,
          inside: null
        },
        punctuation: /^gap>/
      }
    },
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,
      lookbehind: true,
      greedy: true,
      inside: { continuation: {
        pattern: /([\r\n])>/,
        lookbehind: true,
        alias: "punctuation"
      } }
    },
    keyword: /\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,
    boolean: /\b(?:false|true)\b/,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    number: {
      pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,
      lookbehind: true
    },
    continuation: {
      pattern: /([\r\n])>/,
      lookbehind: true,
      alias: "punctuation"
    },
    operator: /->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,
    punctuation: /[()[\]{},;.:]/
  }, Prism$1.languages.gap.shell.inside.gap.inside = Prism$1.languages.gap, Prism$1.languages.gcode = {
    comment: /;.*|\B\(.*?\)\B/,
    string: {
      pattern: /"(?:""|[^"])*"/,
      greedy: true
    },
    keyword: /\b[GM]\d+(?:\.\d+)?\b/,
    property: /\b[A-Z]/,
    checksum: {
      pattern: /(\*)\d+/,
      lookbehind: true,
      alias: "number"
    },
    punctuation: /[:*]/
  }, Prism$1.languages.gdscript = {
    comment: /#.*/,
    string: {
      pattern: /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,
      greedy: true
    },
    "class-name": {
      pattern: /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,
      lookbehind: true
    },
    keyword: /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,
    function: /\b[a-z_]\w*(?=[ \t]*\()/i,
    variable: /\$\w+/,
    number: [/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/, /\b(?:INF|NAN|PI|TAU)\b/],
    constant: /\b[A-Z][A-Z_\d]*\b/,
    boolean: /\b(?:false|true)\b/,
    operator: /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,
    punctuation: /[.:,;()[\]{}]/
  }, Prism$1.languages.gedcom = {
    "line-value": {
      pattern: /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,
      lookbehind: true,
      inside: { pointer: {
        pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,
        alias: "variable"
      } }
    },
    record: {
      pattern: /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
      lookbehind: true,
      alias: "tag"
    },
    level: {
      pattern: /(^[\t ]*)\d+/m,
      lookbehind: true,
      alias: "number"
    },
    pointer: {
      pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,
      alias: "variable"
    }
  }, Prism$1.languages.gettext = {
    comment: [
      {
        pattern: /# .*/,
        greedy: true,
        alias: "translator-comment"
      },
      {
        pattern: /#\..*/,
        greedy: true,
        alias: "extracted-comment"
      },
      {
        pattern: /#:.*/,
        greedy: true,
        alias: "reference-comment"
      },
      {
        pattern: /#,.*/,
        greedy: true,
        alias: "flag-comment"
      },
      {
        pattern: /#\|.*/,
        greedy: true,
        alias: "previously-untranslated-comment"
      },
      {
        pattern: /#.*/,
        greedy: true
      }
    ],
    string: {
      pattern: /(^|[^\\])"(?:[^"\\]|\\.)*"/,
      lookbehind: true,
      greedy: true
    },
    keyword: /^msg(?:ctxt|id|id_plural|str)\b/m,
    number: /\b\d+\b/,
    punctuation: /[\[\]]/
  }, Prism$1.languages.po = Prism$1.languages.gettext, function(e) {
    var t = /(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;
    e.languages.gherkin = {
      pystring: {
        pattern: /("""|''')[\s\S]+?\1/,
        alias: "string"
      },
      comment: {
        pattern: /(^[ \t]*)#.*/m,
        lookbehind: true
      },
      tag: {
        pattern: /(^[ \t]*)@\S*/m,
        lookbehind: true
      },
      feature: {
        pattern: /((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,
        lookbehind: true,
        inside: {
          important: {
            pattern: /(:)[^\r\n]+/,
            lookbehind: true
          },
          keyword: /[^:\r\n]+:/
        }
      },
      scenario: {
        pattern: /(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,
        lookbehind: true,
        inside: {
          important: {
            pattern: /(:)[^\r\n]*/,
            lookbehind: true
          },
          keyword: /[^:\r\n]+:/
        }
      },
      "table-body": {
        pattern: RegExp("(" + t + ")(?:" + t + ")+"),
        lookbehind: true,
        inside: {
          outline: {
            pattern: /<[^>]+>/,
            alias: "variable"
          },
          td: {
            pattern: /\s*[^\s|][^|]*/,
            alias: "string"
          },
          punctuation: /\|/
        }
      },
      "table-head": {
        pattern: RegExp(t),
        inside: {
          th: {
            pattern: /\s*[^\s|][^|]*/,
            alias: "variable"
          },
          punctuation: /\|/
        }
      },
      atrule: {
        pattern: /(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,
        lookbehind: true
      },
      string: {
        pattern: /"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,
        inside: { outline: {
          pattern: /<[^>]+>/,
          alias: "variable"
        } }
      },
      outline: {
        pattern: /<[^>]+>/,
        alias: "variable"
      }
    };
  }(Prism$1), Prism$1.languages.git = {
    comment: /^#.*/m,
    deleted: /^[-–].*/m,
    inserted: /^\+.*/m,
    string: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
    command: {
      pattern: /^.*\$ git .*$/m,
      inside: { parameter: /\s--?\w+/ }
    },
    coord: /^@@.*@@$/m,
    "commit-sha1": /^commit \w{40}$/m
  }, Prism$1.languages.glsl = Prism$1.languages.extend("c", { keyword: /\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/ }), Prism$1.languages.gn = {
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    "string-literal": {
      pattern: /(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,
      lookbehind: true,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,
          lookbehind: true,
          inside: {
            number: /^\$0x[\s\S]{2}$/,
            variable: /^\$\w+$/,
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            expression: {
              pattern: /[\s\S]+/,
              inside: null
            }
          }
        },
        string: /[\s\S]+/
      }
    },
    keyword: /\b(?:else|if)\b/,
    boolean: /\b(?:false|true)\b/,
    "builtin-function": {
      pattern: /\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,
      alias: "keyword"
    },
    function: /\b[a-z_]\w*(?=\s*\()/i,
    constant: /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,
    number: /-?\b\d+\b/,
    operator: /[-+!=<>]=?|&&|\|\|/,
    punctuation: /[(){}[\],.]/
  }, Prism$1.languages.gn["string-literal"].inside.interpolation.inside.expression.inside = Prism$1.languages.gn, Prism$1.languages.gni = Prism$1.languages.gn, Prism$1.languages["linker-script"] = {
    comment: {
      pattern: /(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,
      lookbehind: true,
      greedy: true
    },
    identifier: {
      pattern: /"[^"\r\n]*"/,
      greedy: true
    },
    "location-counter": {
      pattern: /\B\.\B/,
      alias: "important"
    },
    section: {
      pattern: /(^|[^\w*])\.\w+\b/,
      lookbehind: true,
      alias: "keyword"
    },
    function: /\b[A-Z][A-Z_]*(?=\s*\()/,
    number: /\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,
    operator: />>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,
    punctuation: /[(){},;]/
  }, Prism$1.languages.ld = Prism$1.languages["linker-script"], Prism$1.languages.go = Prism$1.languages.extend("clike", {
    string: {
      pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
      lookbehind: true,
      greedy: true
    },
    keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,
    boolean: /\b(?:_|false|iota|nil|true)\b/,
    number: [
      /\b0(?:b[01_]+|o[0-7_]+)i?\b/i,
      /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
      /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i
    ],
    operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
    builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/
  }), Prism$1.languages.insertBefore("go", "string", { char: {
    pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/,
    greedy: true
  } }), delete Prism$1.languages.go["class-name"], Prism$1.languages["go-mod"] = Prism$1.languages["go-module"] = {
    comment: {
      pattern: /\/\/.*/,
      greedy: true
    },
    version: {
      pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,
      lookbehind: true,
      alias: "number"
    },
    "go-version": {
      pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,
      lookbehind: true,
      alias: "number"
    },
    keyword: {
      pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,
      lookbehind: true
    },
    operator: /=>/,
    punctuation: /[()[\],]/
  }, function(e) {
    var t = {
      pattern: /((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,
      lookbehind: true,
      inside: {
        "interpolation-punctuation": {
          pattern: /^\$\{?|\}$/,
          alias: "punctuation"
        },
        expression: {
          pattern: /[\s\S]+/,
          inside: null
        }
      }
    };
    e.languages.gradle = e.languages.extend("clike", {
      string: {
        pattern: /'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,
        greedy: true
      },
      keyword: /\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,
      number: /\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,
      operator: {
        pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
        lookbehind: true
      },
      punctuation: /\.+|[{}[\];(),:$]/
    }), e.languages.insertBefore("gradle", "string", {
      shebang: {
        pattern: /#!.+/,
        alias: "comment",
        greedy: true
      },
      "interpolation-string": {
        pattern: /"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,
        greedy: true,
        inside: {
          interpolation: t,
          string: /[\s\S]+/
        }
      }
    }), e.languages.insertBefore("gradle", "punctuation", { "spock-block": /\b(?:and|cleanup|expect|given|setup|then|when|where):/ }), e.languages.insertBefore("gradle", "function", { annotation: {
      pattern: /(^|[^.])@\w+/,
      lookbehind: true,
      alias: "punctuation"
    } }), t.inside.expression.inside = e.languages.gradle;
  }(Prism$1), Prism$1.languages.graphql = {
    comment: /#.*/,
    description: {
      pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,
      greedy: true,
      alias: "string",
      inside: { "language-markdown": {
        pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,
        lookbehind: true,
        inside: Prism$1.languages.markdown
      } }
    },
    string: {
      pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,
      greedy: true
    },
    number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
    boolean: /\b(?:false|true)\b/,
    variable: /\$[a-z_]\w*/i,
    directive: {
      pattern: /@[a-z_]\w*/i,
      alias: "function"
    },
    "attr-name": {
      pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,
      greedy: true
    },
    "atom-input": {
      pattern: /\b[A-Z]\w*Input\b/,
      alias: "class-name"
    },
    scalar: /\b(?:Boolean|Float|ID|Int|String)\b/,
    constant: /\b[A-Z][A-Z_\d]*\b/,
    "class-name": {
      pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,
      lookbehind: true
    },
    fragment: {
      pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,
      lookbehind: true,
      alias: "function"
    },
    "definition-mutation": {
      pattern: /(\bmutation\s+)[a-zA-Z_]\w*/,
      lookbehind: true,
      alias: "function"
    },
    "definition-query": {
      pattern: /(\bquery\s+)[a-zA-Z_]\w*/,
      lookbehind: true,
      alias: "function"
    },
    keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,
    operator: /[!=|&]|\.{3}/,
    "property-query": /\w+(?=\s*\()/,
    object: /\w+(?=\s*\{)/,
    punctuation: /[!(){}\[\]:=,]/,
    property: /\w+/
  }, Prism$1.hooks.add("after-tokenize", function(e) {
    if (e.language === "graphql")
      for (var o = e.tokens.filter(function(e$1) {
        return typeof e$1 != "string" && e$1.type !== "comment" && e$1.type !== "scalar";
      }), s = 0;s < o.length; ) {
        var t = o[s++];
        if (t.type === "keyword" && t.content === "mutation") {
          var n2 = [];
          if (u(["definition-mutation", "punctuation"]) && c(1).content === "(") {
            s += 2;
            var a = p2(/^\($/, /^\)$/);
            if (a === -1)
              continue;
            for (;s < a; s++) {
              var r = c(0);
              r.type === "variable" && (m2(r, "variable-input"), n2.push(r.content));
            }
            s = a + 1;
          }
          if (u(["punctuation", "property-query"]) && c(0).content === "{" && (s++, m2(c(0), "property-mutation"), 0 < n2.length)) {
            var i = p2(/^\{$/, /^\}$/);
            if (i !== -1)
              for (var l = s;l < i; l++) {
                var d2 = o[l];
                d2.type === "variable" && 0 <= n2.indexOf(d2.content) && m2(d2, "variable-input");
              }
          }
        }
      }
    function c(e$1) {
      return o[s + e$1];
    }
    function u(e$1, t$1) {
      t$1 = t$1 || 0;
      for (var n$1 = 0;n$1 < e$1.length; n$1++) {
        var a$1 = c(n$1 + t$1);
        if (!a$1 || a$1.type !== e$1[n$1])
          return;
      }
      return 1;
    }
    function p2(e$1, t$1) {
      for (var n$1 = 1, a$1 = s;a$1 < o.length; a$1++) {
        var r$1 = o[a$1], i$1 = r$1.content;
        if (r$1.type === "punctuation" && typeof i$1 == "string") {
          if (e$1.test(i$1))
            n$1++;
          else if (t$1.test(i$1) && --n$1 === 0)
            return a$1;
        }
      }
      return -1;
    }
    function m2(e$1, t$1) {
      var n$1 = e$1.alias;
      n$1 ? Array.isArray(n$1) || (e$1.alias = n$1 = [n$1]) : e$1.alias = n$1 = [], n$1.push(t$1);
    }
  }), function(e) {
    var t = {
      pattern: /((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,
      lookbehind: true,
      inside: {
        "interpolation-punctuation": {
          pattern: /^\$\{?|\}$/,
          alias: "punctuation"
        },
        expression: {
          pattern: /[\s\S]+/,
          inside: null
        }
      }
    };
    e.languages.groovy = e.languages.extend("clike", {
      string: {
        pattern: /'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,
        greedy: true
      },
      keyword: /\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,
      number: /\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,
      operator: {
        pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
        lookbehind: true
      },
      punctuation: /\.+|[{}[\];(),:$]/
    }), e.languages.insertBefore("groovy", "string", {
      shebang: {
        pattern: /#!.+/,
        alias: "comment",
        greedy: true
      },
      "interpolation-string": {
        pattern: /"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,
        greedy: true,
        inside: {
          interpolation: t,
          string: /[\s\S]+/
        }
      }
    }), e.languages.insertBefore("groovy", "punctuation", { "spock-block": /\b(?:and|cleanup|expect|given|setup|then|when|where):/ }), e.languages.insertBefore("groovy", "function", { annotation: {
      pattern: /(^|[^.])@\w+/,
      lookbehind: true,
      alias: "punctuation"
    } }), t.inside.expression.inside = e.languages.groovy;
  }(Prism$1), Prism$1.languages.less = Prism$1.languages.extend("css", {
    comment: [/\/\*[\s\S]*?\*\//, {
      pattern: /(^|[^\\])\/\/.*/,
      lookbehind: true
    }],
    atrule: {
      pattern: /@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,
      inside: { punctuation: /[:()]/ }
    },
    selector: {
      pattern: /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,
      inside: { variable: /@+[\w-]+/ }
    },
    property: /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,
    operator: /[+\-*\/]/
  }), Prism$1.languages.insertBefore("less", "property", {
    variable: [{
      pattern: /@[\w-]+\s*:/,
      inside: { punctuation: /:/ }
    }, /@@?[\w-]+/],
    "mixin-usage": {
      pattern: /([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,
      lookbehind: true,
      alias: "function"
    }
  }), Prism$1.languages.scss = Prism$1.languages.extend("css", {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
      lookbehind: true
    },
    atrule: {
      pattern: /@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,
      inside: { rule: /@[\w-]+/ }
    },
    url: /(?:[-a-z]+-)?url(?=\()/i,
    selector: {
      pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,
      inside: {
        parent: {
          pattern: /&/,
          alias: "important"
        },
        placeholder: /%[-\w]+/,
        variable: /\$[-\w]+|#\{\$[-\w]+\}/
      }
    },
    property: {
      pattern: /(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,
      inside: { variable: /\$[-\w]+|#\{\$[-\w]+\}/ }
    }
  }), Prism$1.languages.insertBefore("scss", "atrule", { keyword: [/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i, {
    pattern: /( )(?:from|through)(?= )/,
    lookbehind: true
  }] }), Prism$1.languages.insertBefore("scss", "important", { variable: /\$[-\w]+|#\{\$[-\w]+\}/ }), Prism$1.languages.insertBefore("scss", "function", {
    "module-modifier": {
      pattern: /\b(?:as|hide|show|with)\b/i,
      alias: "keyword"
    },
    placeholder: {
      pattern: /%[-\w]+/,
      alias: "selector"
    },
    statement: {
      pattern: /\B!(?:default|optional)\b/i,
      alias: "keyword"
    },
    boolean: /\b(?:false|true)\b/,
    null: {
      pattern: /\bnull\b/,
      alias: "keyword"
    },
    operator: {
      pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,
      lookbehind: true
    }
  }), Prism$1.languages.scss.atrule.inside.rest = Prism$1.languages.scss, function(e) {
    var n2 = /\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source, a = /\)|\((?![^|()\n]+\))/.source;
    function t(e$1, t$1) {
      return RegExp(e$1.replace(/<MOD>/g, function() {
        return "(?:" + n2 + ")";
      }).replace(/<PAR>/g, function() {
        return "(?:" + a + ")";
      }), t$1 || "");
    }
    var r = {
      css: {
        pattern: /\{[^{}]+\}/,
        inside: { rest: e.languages.css }
      },
      "class-id": {
        pattern: /(\()[^()]+(?=\))/,
        lookbehind: true,
        alias: "attr-value"
      },
      lang: {
        pattern: /(\[)[^\[\]]+(?=\])/,
        lookbehind: true,
        alias: "attr-value"
      },
      punctuation: /[\\\/]\d+|\S/
    }, e = e.languages.textile = e.languages.extend("markup", { phrase: {
      pattern: /(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,
      lookbehind: true,
      inside: {
        "block-tag": {
          pattern: t(/^[a-z]\w*(?:<MOD>|<PAR>|[<>=])*\./.source),
          inside: {
            modifier: {
              pattern: t(/(^[a-z]\w*)(?:<MOD>|<PAR>|[<>=])+(?=\.)/.source),
              lookbehind: true,
              inside: r
            },
            tag: /^[a-z]\w*/,
            punctuation: /\.$/
          }
        },
        list: {
          pattern: t(/^[*#]+<MOD>*\s+\S.*/.source, "m"),
          inside: {
            modifier: {
              pattern: t(/(^[*#]+)<MOD>+/.source),
              lookbehind: true,
              inside: r
            },
            punctuation: /^[*#]+/
          }
        },
        table: {
          pattern: t(/^(?:(?:<MOD>|<PAR>|[<>=^~])+\.\s*)?(?:\|(?:(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.|(?!(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source, "m"),
          inside: {
            modifier: {
              pattern: t(/(^|\|(?:\r?\n|\r)?)(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+(?=\.)/.source),
              lookbehind: true,
              inside: r
            },
            punctuation: /\||^\./
          }
        },
        inline: {
          pattern: t(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])<MOD>*.+?\2(?![a-zA-Z\d])/.source),
          lookbehind: true,
          inside: {
            bold: {
              pattern: t(/(^(\*\*?)<MOD>*).+?(?=\2)/.source),
              lookbehind: true
            },
            italic: {
              pattern: t(/(^(__?)<MOD>*).+?(?=\2)/.source),
              lookbehind: true
            },
            cite: {
              pattern: t(/(^\?\?<MOD>*).+?(?=\?\?)/.source),
              lookbehind: true,
              alias: "string"
            },
            code: {
              pattern: t(/(^@<MOD>*).+?(?=@)/.source),
              lookbehind: true,
              alias: "keyword"
            },
            inserted: {
              pattern: t(/(^\+<MOD>*).+?(?=\+)/.source),
              lookbehind: true
            },
            deleted: {
              pattern: t(/(^-<MOD>*).+?(?=-)/.source),
              lookbehind: true
            },
            span: {
              pattern: t(/(^%<MOD>*).+?(?=%)/.source),
              lookbehind: true
            },
            modifier: {
              pattern: t(/(^\*\*|__|\?\?|[*_%@+\-^~])<MOD>+/.source),
              lookbehind: true,
              inside: r
            },
            punctuation: /[*_%?@+\-^~]+/
          }
        },
        "link-ref": {
          pattern: /^\[[^\]]+\]\S+$/m,
          inside: {
            string: {
              pattern: /(^\[)[^\]]+(?=\])/,
              lookbehind: true
            },
            url: {
              pattern: /(^\])\S+$/,
              lookbehind: true
            },
            punctuation: /[\[\]]/
          }
        },
        link: {
          pattern: t(/"<MOD>*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),
          inside: {
            text: {
              pattern: t(/(^"<MOD>*)[^"]+(?=")/.source),
              lookbehind: true
            },
            modifier: {
              pattern: t(/(^")<MOD>+/.source),
              lookbehind: true,
              inside: r
            },
            url: {
              pattern: /(:).+/,
              lookbehind: true
            },
            punctuation: /[":]/
          }
        },
        image: {
          pattern: t(/!(?:<MOD>|<PAR>|[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),
          inside: {
            source: {
              pattern: t(/(^!(?:<MOD>|<PAR>|[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),
              lookbehind: true,
              alias: "url"
            },
            modifier: {
              pattern: t(/(^!)(?:<MOD>|<PAR>|[<>=])+/.source),
              lookbehind: true,
              inside: r
            },
            url: {
              pattern: /(:).+/,
              lookbehind: true
            },
            punctuation: /[!:]/
          }
        },
        footnote: {
          pattern: /\b\[\d+\]/,
          alias: "comment",
          inside: { punctuation: /\[|\]/ }
        },
        acronym: {
          pattern: /\b[A-Z\d]+\([^)]+\)/,
          inside: {
            comment: {
              pattern: /(\()[^()]+(?=\))/,
              lookbehind: true
            },
            punctuation: /[()]/
          }
        },
        mark: {
          pattern: /\b\((?:C|R|TM)\)/,
          alias: "comment",
          inside: { punctuation: /[()]/ }
        }
      }
    } }), r = e.phrase.inside, i = {
      inline: r.inline,
      link: r.link,
      image: r.image,
      footnote: r.footnote,
      acronym: r.acronym,
      mark: r.mark
    }, e = (e.tag.pattern = /<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i, r.inline.inside), e = (e.bold.inside = i, e.italic.inside = i, e.inserted.inside = i, e.deleted.inside = i, e.span.inside = i, r.table.inside);
    e.inline = i.inline, e.link = i.link, e.image = i.image, e.footnote = i.footnote, e.acronym = i.acronym, e.mark = i.mark;
  }(Prism$1), function(e) {
    e.languages.haml = {
      "multiline-comment": {
        pattern: /((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,
        lookbehind: true,
        alias: "comment"
      },
      "multiline-code": [{
        pattern: /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,
        lookbehind: true,
        inside: e.languages.ruby
      }, {
        pattern: /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,
        lookbehind: true,
        inside: e.languages.ruby
      }],
      filter: {
        pattern: /((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,
        lookbehind: true,
        inside: { "filter-name": {
          pattern: /^:[\w-]+/,
          alias: "symbol"
        } }
      },
      markup: {
        pattern: /((?:^|\r?\n|\r)[\t ]*)<.+/,
        lookbehind: true,
        inside: e.languages.markup
      },
      doctype: {
        pattern: /((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,
        lookbehind: true
      },
      tag: {
        pattern: /((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,
        lookbehind: true,
        inside: {
          attributes: [
            {
              pattern: /(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,
              lookbehind: true,
              inside: e.languages.ruby
            },
            {
              pattern: /\([^)]+\)/,
              inside: {
                "attr-value": {
                  pattern: /(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,
                  lookbehind: true
                },
                "attr-name": /[\w:-]+(?=\s*!?=|\s*[,)])/,
                punctuation: /[=(),]/
              }
            },
            {
              pattern: /\[[^\]]+\]/,
              inside: e.languages.ruby
            }
          ],
          punctuation: /[<>]/
        }
      },
      code: {
        pattern: /((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,
        lookbehind: true,
        inside: e.languages.ruby
      },
      interpolation: {
        pattern: /#\{[^}]+\}/,
        inside: {
          delimiter: {
            pattern: /^#\{|\}$/,
            alias: "punctuation"
          },
          ruby: {
            pattern: /[\s\S]+/,
            inside: e.languages.ruby
          }
        }
      },
      punctuation: {
        pattern: /((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,
        lookbehind: true
      }
    };
    for (var t = [
      "css",
      {
        filter: "coffee",
        language: "coffeescript"
      },
      "erb",
      "javascript",
      "less",
      "markdown",
      "ruby",
      "scss",
      "textile"
    ], n2 = {}, a = 0, r = t.length;a < r; a++) {
      var i = t[a];
      e.languages[(i = typeof i == "string" ? {
        filter: i,
        language: i
      } : i).language] && (n2["filter-" + i.filter] = {
        pattern: RegExp("((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+".replace("{{filter_name}}", function() {
          return i.filter;
        })),
        lookbehind: true,
        inside: {
          "filter-name": {
            pattern: /^:[\w-]+/,
            alias: "symbol"
          },
          text: {
            pattern: /[\s\S]+/,
            alias: [i.language, "language-" + i.language],
            inside: e.languages[i.language]
          }
        }
      });
    }
    e.languages.insertBefore("haml", "filter", n2);
  }(Prism$1), function(t) {
    t.languages.handlebars = {
      comment: /\{\{![\s\S]*?\}\}/,
      delimiter: {
        pattern: /^\{\{\{?|\}\}\}?$/,
        alias: "punctuation"
      },
      string: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,
      number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,
      boolean: /\b(?:false|true)\b/,
      block: {
        pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,
        lookbehind: true,
        alias: "keyword"
      },
      brackets: {
        pattern: /\[[^\]]+\]/,
        inside: {
          punctuation: /\[|\]/,
          variable: /[\s\S]+/
        }
      },
      punctuation: /[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,
      variable: /[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/
    }, t.hooks.add("before-tokenize", function(e) {
      t.languages["markup-templating"].buildPlaceholders(e, "handlebars", /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g);
    }), t.hooks.add("after-tokenize", function(e) {
      t.languages["markup-templating"].tokenizePlaceholders(e, "handlebars");
    }), t.languages.hbs = t.languages.handlebars, t.languages.mustache = t.languages.handlebars;
  }(Prism$1), Prism$1.languages.haskell = {
    comment: {
      pattern: /(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,
      lookbehind: true
    },
    char: {
      pattern: /'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,
      alias: "string"
    },
    string: {
      pattern: /"(?:[^\\"]|\\(?:\S|\s+\\))*"/,
      greedy: true
    },
    keyword: /\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,
    "import-statement": {
      pattern: /(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,
      lookbehind: true,
      inside: {
        keyword: /\b(?:as|hiding|import|qualified)\b/,
        punctuation: /\./
      }
    },
    builtin: /\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,
    number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,
    operator: [
      {
        pattern: /`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,
        greedy: true
      },
      {
        pattern: /(\s)\.(?=\s)/,
        lookbehind: true
      },
      /[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/
    ],
    hvariable: {
      pattern: /\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,
      inside: { punctuation: /\./ }
    },
    constant: {
      pattern: /\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,
      inside: { punctuation: /\./ }
    },
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.hs = Prism$1.languages.haskell, Prism$1.languages.haxe = Prism$1.languages.extend("clike", {
    string: {
      pattern: /"(?:[^"\\]|\\[\s\S])*"/,
      greedy: true
    },
    "class-name": [{
      pattern: /(\b(?:abstract|class|enum|extends|implements|interface|new|typedef)\s+)[A-Z_]\w*/,
      lookbehind: true
    }, /\b[A-Z]\w*/],
    keyword: /\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|final|for|from|function|if|implements|import|in|inline|interface|macro|new|null|operator|overload|override|package|private|public|return|static|super|switch|throw|to|try|typedef|untyped|using|var|while)(?!\.)\b/,
    function: {
      pattern: /\b[a-z_]\w*(?=\s*(?:<[^<>]*>\s*)?\()/i,
      greedy: true
    },
    operator: /\.{3}|\+\+|--|&&|\|\||->|=>|(?:<<?|>{1,3}|[-+*/%!=&|^])=?|[?:~]/
  }), Prism$1.languages.insertBefore("haxe", "string", { "string-interpolation": {
    pattern: /'(?:[^'\\]|\\[\s\S])*'/,
    greedy: true,
    inside: {
      interpolation: {
        pattern: /(^|[^\\])\$(?:\w+|\{[^{}]+\})/,
        lookbehind: true,
        inside: {
          "interpolation-punctuation": {
            pattern: /^\$\{?|\}$/,
            alias: "punctuation"
          },
          expression: {
            pattern: /[\s\S]+/,
            inside: Prism$1.languages.haxe
          }
        }
      },
      string: /[\s\S]+/
    }
  } }), Prism$1.languages.insertBefore("haxe", "class-name", { regex: {
    pattern: /~\/(?:[^\/\\\r\n]|\\.)+\/[a-z]*/,
    greedy: true,
    inside: {
      "regex-flags": /\b[a-z]+$/,
      "regex-source": {
        pattern: /^(~\/)[\s\S]+(?=\/$)/,
        lookbehind: true,
        alias: "language-regex",
        inside: Prism$1.languages.regex
      },
      "regex-delimiter": /^~\/|\/$/
    }
  } }), Prism$1.languages.insertBefore("haxe", "keyword", {
    preprocessor: {
      pattern: /#(?:else|elseif|end|if)\b.*/,
      alias: "property"
    },
    metadata: {
      pattern: /@:?[\w.]+/,
      alias: "symbol"
    },
    reification: {
      pattern: /\$(?:\w+|(?=\{))/,
      alias: "important"
    }
  }), Prism$1.languages.hcl = {
    comment: /(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,
    heredoc: {
      pattern: /<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,
      greedy: true,
      alias: "string"
    },
    keyword: [
      {
        pattern: /(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,
        inside: { type: {
          pattern: /(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,
          lookbehind: true,
          alias: "variable"
        } }
      },
      {
        pattern: /(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,
        inside: { type: {
          pattern: /(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,
          lookbehind: true,
          alias: "variable"
        } }
      },
      /[\w-]+(?=\s+\{)/
    ],
    property: [/[-\w\.]+(?=\s*=(?!=))/, /"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],
    string: {
      pattern: /"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,
      greedy: true,
      inside: { interpolation: {
        pattern: /(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,
        lookbehind: true,
        inside: {
          type: {
            pattern: /(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,
            lookbehind: true,
            alias: "variable"
          },
          keyword: /\b(?:count|data|local|module|path|self|terraform|var)\b/i,
          function: /\w+(?=\()/,
          string: {
            pattern: /"(?:\\[\s\S]|[^\\"])*"/,
            greedy: true
          },
          number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,
          punctuation: /[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/
        }
      } }
    },
    number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,
    boolean: /\b(?:false|true)\b/i,
    punctuation: /[=\[\]{}]/
  }, Prism$1.languages.hlsl = Prism$1.languages.extend("c", {
    "class-name": [Prism$1.languages.c["class-name"], /\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],
    keyword: [/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/, /\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],
    number: /(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,
    boolean: /\b(?:false|true)\b/
  }), Prism$1.languages.hoon = {
    comment: {
      pattern: /::.*/,
      greedy: true
    },
    string: {
      pattern: /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,
      greedy: true
    },
    constant: /%(?:\.[ny]|[\w-]+)/,
    "class-name": /@(?:[a-z0-9-]*[a-z0-9])?|\*/i,
    function: /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,
    keyword: /\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
  }, Prism$1.languages.hpkp = {
    directive: {
      pattern: /\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,
      alias: "property"
    },
    operator: /=/,
    punctuation: /;/
  }, Prism$1.languages.hsts = {
    directive: {
      pattern: /\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,
      alias: "property"
    },
    operator: /=/,
    punctuation: /;/
  }, Prism$1.languages.json = {
    property: {
      pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
      lookbehind: true,
      greedy: true
    },
    comment: {
      pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
      greedy: true
    },
    number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
    punctuation: /[{}[\],]/,
    operator: /:/,
    boolean: /\b(?:false|true)\b/,
    null: {
      pattern: /\bnull\b/,
      alias: "keyword"
    }
  }, Prism$1.languages.webmanifest = Prism$1.languages.json, Prism$1.languages.uri = {
    scheme: {
      pattern: /^[a-z][a-z0-9+.-]*:/im,
      greedy: true,
      inside: { "scheme-delimiter": /:$/ }
    },
    fragment: {
      pattern: /#[\w\-.~!$&'()*+,;=%:@/?]*/,
      inside: { "fragment-delimiter": /^#/ }
    },
    query: {
      pattern: /\?[\w\-.~!$&'()*+,;=%:@/?]*/,
      inside: {
        "query-delimiter": {
          pattern: /^\?/,
          greedy: true
        },
        "pair-delimiter": /[&;]/,
        pair: {
          pattern: /^[^=][\s\S]*/,
          inside: {
            key: /^[^=]+/,
            value: {
              pattern: /(^=)[\s\S]+/,
              lookbehind: true
            }
          }
        }
      }
    },
    authority: {
      pattern: RegExp(/^\/\//.source + /(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source + "(?:" + /\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source + "|" + /[\w\-.~!$&'()*+,;=%]*/.source + ")" + /(?::\d*)?/.source, "m"),
      inside: {
        "authority-delimiter": /^\/\//,
        "user-info-segment": {
          pattern: /^[\w\-.~!$&'()*+,;=%:]*@/,
          inside: {
            "user-info-delimiter": /@$/,
            "user-info": /^[\w\-.~!$&'()*+,;=%:]+/
          }
        },
        "port-segment": {
          pattern: /:\d*$/,
          inside: {
            "port-delimiter": /^:/,
            port: /^\d+/
          }
        },
        host: {
          pattern: /[\s\S]+/,
          inside: {
            "ip-literal": {
              pattern: /^\[[\s\S]+\]$/,
              inside: {
                "ip-literal-delimiter": /^\[|\]$/,
                "ipv-future": /^v[\s\S]+/,
                "ipv6-address": /^[\s\S]+/
              }
            },
            "ipv4-address": /^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/
          }
        }
      }
    },
    path: {
      pattern: /^[\w\-.~!$&'()*+,;=%:@/]+/m,
      inside: { "path-separator": /\// }
    }
  }, Prism$1.languages.url = Prism$1.languages.uri, function(e) {
    function t(e$1) {
      return RegExp("(^(?:" + e$1 + "):[ \t]*(?![ \t]))[^]+", "i");
    }
    e.languages.http = {
      "request-line": {
        pattern: /^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,
        inside: {
          method: {
            pattern: /^[A-Z]+\b/,
            alias: "property"
          },
          "request-target": {
            pattern: /^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,
            lookbehind: true,
            alias: "url",
            inside: e.languages.uri
          },
          "http-version": {
            pattern: /^(\s)HTTP\/[\d.]+/,
            lookbehind: true,
            alias: "property"
          }
        }
      },
      "response-status": {
        pattern: /^HTTP\/[\d.]+ \d+ .+/m,
        inside: {
          "http-version": {
            pattern: /^HTTP\/[\d.]+/,
            alias: "property"
          },
          "status-code": {
            pattern: /^(\s)\d+(?=\s)/,
            lookbehind: true,
            alias: "number"
          },
          "reason-phrase": {
            pattern: /^(\s).+/,
            lookbehind: true,
            alias: "string"
          }
        }
      },
      header: {
        pattern: /^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,
        inside: {
          "header-value": [
            {
              pattern: t(/Content-Security-Policy/.source),
              lookbehind: true,
              alias: ["csp", "languages-csp"],
              inside: e.languages.csp
            },
            {
              pattern: t(/Public-Key-Pins(?:-Report-Only)?/.source),
              lookbehind: true,
              alias: ["hpkp", "languages-hpkp"],
              inside: e.languages.hpkp
            },
            {
              pattern: t(/Strict-Transport-Security/.source),
              lookbehind: true,
              alias: ["hsts", "languages-hsts"],
              inside: e.languages.hsts
            },
            {
              pattern: t(/[^:]+/.source),
              lookbehind: true
            }
          ],
          "header-name": {
            pattern: /^[^:]+/,
            alias: "keyword"
          },
          punctuation: /^:/
        }
      }
    };
    var n2, a, r, i, o = e.languages, s = {
      "application/javascript": o.javascript,
      "application/json": o.json || o.javascript,
      "application/xml": o.xml,
      "text/xml": o.xml,
      "text/html": o.html,
      "text/css": o.css,
      "text/plain": o.plain
    }, l = {
      "application/json": true,
      "application/xml": true
    };
    for (n2 in s)
      s[n2] && (a = a || {}, r = l[n2] ? (i = undefined, i = (r = n2).replace(/^[a-z]+\//, ""), "(?:" + r + "|" + ("\\w+/(?:[\\w.-]+\\+)+" + i + "(?![+\\w.-])") + ")") : n2, a[n2.replace(/\//g, "-")] = {
        pattern: RegExp("(" + /content-type:\s*/.source + r + /(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source + ")" + /[^ \t\w-][\s\S]*/.source, "i"),
        lookbehind: true,
        inside: s[n2]
      });
    a && e.languages.insertBefore("http", "header", a);
  }(Prism$1), Prism$1.languages.ichigojam = {
    comment: /(?:\B'|REM)(?:[^\n\r]*)/i,
    string: {
      pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,
      greedy: true
    },
    number: /\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
    keyword: /\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,
    function: /\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,
    label: /(?:\B@\S+)/,
    operator: /<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,
    punctuation: /[\[,;:()\]]/
  }, Prism$1.languages.icon = {
    comment: /#.*/,
    string: {
      pattern: /(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,
      greedy: true
    },
    number: /\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,
    "builtin-keyword": {
      pattern: /&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,
      alias: "variable"
    },
    directive: {
      pattern: /\$\w+/,
      alias: "builtin"
    },
    keyword: /\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,
    function: /\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,
    operator: /[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,
    punctuation: /[\[\](){},;]/
  }, function(e) {
    function n2(e$1, t$1) {
      return t$1 <= 0 ? /[]/.source : e$1.replace(/<SELF>/g, function() {
        return n2(e$1, t$1 - 1);
      });
    }
    var t = /'[{}:=,](?:[^']|'')*'(?!')/, a = {
      pattern: /''/,
      greedy: true,
      alias: "operator"
    }, r = {
      pattern: t,
      greedy: true,
      inside: { escape: a }
    }, i = n2(/\{(?:[^{}']|'(?![{},'])|''|<STR>|<SELF>)*\}/.source.replace(/<STR>/g, function() {
      return t.source;
    }), 8), o = {
      pattern: RegExp(i),
      inside: {
        message: {
          pattern: /^(\{)[\s\S]+(?=\}$)/,
          lookbehind: true,
          inside: null
        },
        "message-delimiter": {
          pattern: /./,
          alias: "punctuation"
        }
      }
    };
    e.languages["icu-message-format"] = {
      argument: {
        pattern: RegExp(i),
        greedy: true,
        inside: {
          content: {
            pattern: /^(\{)[\s\S]+(?=\}$)/,
            lookbehind: true,
            inside: {
              "argument-name": {
                pattern: /^(\s*)[^{}:=,\s]+/,
                lookbehind: true
              },
              "choice-style": {
                pattern: /^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,
                lookbehind: true,
                inside: {
                  punctuation: /\|/,
                  range: {
                    pattern: /^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,
                    lookbehind: true,
                    inside: {
                      operator: /[<#\u2264]/,
                      number: /\S+/
                    }
                  },
                  rest: null
                }
              },
              "plural-style": {
                pattern: /^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,
                lookbehind: true,
                inside: {
                  offset: /^offset:\s*\d+/,
                  "nested-message": o,
                  selector: {
                    pattern: /=\d+|[^{}:=,\s]+/,
                    inside: { keyword: /^(?:few|many|one|other|two|zero)$/ }
                  }
                }
              },
              "select-style": {
                pattern: /^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,
                lookbehind: true,
                inside: {
                  "nested-message": o,
                  selector: {
                    pattern: /[^{}:=,\s]+/,
                    inside: { keyword: /^other$/ }
                  }
                }
              },
              keyword: /\b(?:choice|plural|select|selectordinal)\b/,
              "arg-type": {
                pattern: /\b(?:date|duration|number|ordinal|spellout|time)\b/,
                alias: "keyword"
              },
              "arg-skeleton": {
                pattern: /(,\s*)::[^{}:=,\s]+/,
                lookbehind: true
              },
              "arg-style": {
                pattern: /(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,
                lookbehind: true
              },
              "arg-style-text": {
                pattern: RegExp(/(^\s*,\s*(?=\S))/.source + n2(/(?:[^{}']|'[^']*'|\{(?:<SELF>)?\})+/.source, 8) + "$"),
                lookbehind: true,
                alias: "string"
              },
              punctuation: /,/
            }
          },
          "argument-delimiter": {
            pattern: /./,
            alias: "operator"
          }
        }
      },
      escape: a,
      string: r
    }, o.inside.message.inside = e.languages["icu-message-format"], e.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest = e.languages["icu-message-format"];
  }(Prism$1), Prism$1.languages.idris = Prism$1.languages.extend("haskell", {
    comment: { pattern: /(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m },
    keyword: /\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,
    builtin: undefined
  }), Prism$1.languages.insertBefore("idris", "keyword", { "import-statement": {
    pattern: /(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,
    lookbehind: true,
    inside: { punctuation: /\./ }
  } }), Prism$1.languages.idr = Prism$1.languages.idris, function(e) {
    e.languages.ignore = {
      comment: /^#.*/m,
      entry: {
        pattern: /\S(?:.*(?:(?:\\ )|\S))?/,
        alias: "string",
        inside: {
          operator: /^!|\*\*?|\?/,
          regex: {
            pattern: /(^|[^\\])\[[^\[\]]*\]/,
            lookbehind: true
          },
          punctuation: /\//
        }
      }
    }, e.languages.gitignore = e.languages.ignore, e.languages.hgignore = e.languages.ignore, e.languages.npmignore = e.languages.ignore;
  }(Prism$1), Prism$1.languages.inform7 = {
    string: {
      pattern: /"[^"]*"/,
      inside: { substitution: {
        pattern: /\[[^\[\]]+\]/,
        inside: { delimiter: {
          pattern: /\[|\]/,
          alias: "punctuation"
        } }
      } }
    },
    comment: {
      pattern: /\[[^\[\]]+\]/,
      greedy: true
    },
    title: {
      pattern: /^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,
      alias: "important"
    },
    number: {
      pattern: /(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,
      lookbehind: true
    },
    verb: {
      pattern: /(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,
      lookbehind: true,
      alias: "operator"
    },
    keyword: {
      pattern: /(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,
      lookbehind: true
    },
    property: {
      pattern: /(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,
      lookbehind: true,
      alias: "symbol"
    },
    position: {
      pattern: /(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,
      lookbehind: true,
      alias: "keyword"
    },
    type: {
      pattern: /(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,
      lookbehind: true,
      alias: "variable"
    },
    punctuation: /[.,:;(){}]/
  }, Prism$1.languages.inform7.string.inside.substitution.inside.rest = Prism$1.languages.inform7, Prism$1.languages.inform7.string.inside.substitution.inside.rest.text = {
    pattern: /\S(?:\s*\S)*/,
    alias: "comment"
  }, Prism$1.languages.ini = {
    comment: {
      pattern: /(^[ \f\t\v]*)[#;][^\n\r]*/m,
      lookbehind: true
    },
    section: {
      pattern: /(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,
      lookbehind: true,
      inside: {
        "section-name": {
          pattern: /(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,
          lookbehind: true,
          alias: "selector"
        },
        punctuation: /\[|\]/
      }
    },
    key: {
      pattern: /(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,
      lookbehind: true,
      alias: "attr-name"
    },
    value: {
      pattern: /(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,
      lookbehind: true,
      alias: "attr-value",
      inside: { "inner-value": {
        pattern: /^("|').+(?=\1$)/,
        lookbehind: true
      } }
    },
    punctuation: /=/
  }, Prism$1.languages.io = {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,
      lookbehind: true,
      greedy: true
    },
    "triple-quoted-string": {
      pattern: /"""(?:\\[\s\S]|(?!""")[^\\])*"""/,
      greedy: true,
      alias: "string"
    },
    string: {
      pattern: /"(?:\\.|[^\\\r\n"])*"/,
      greedy: true
    },
    keyword: /\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,
    builtin: /\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,
    boolean: /\b(?:false|nil|true)\b/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,
    operator: /[=!*/%+\-^&|]=|>>?=?|<<?=?|:?:?=|\+\+?|--?|\*\*?|\/\/?|%|\|\|?|&&?|\b(?:and|not|or|return)\b|@@?|\?\??|\.\./,
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.j = {
    comment: {
      pattern: /\bNB\..*/,
      greedy: true
    },
    string: {
      pattern: /'(?:''|[^'\r\n])*'/,
      greedy: true
    },
    keyword: /\b(?:(?:CR|LF|adverb|conjunction|def|define|dyad|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,
    verb: {
      pattern: /(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,
      alias: "keyword"
    },
    number: /\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,
    adverb: {
      pattern: /[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,
      alias: "builtin"
    },
    operator: /[=a][.:]|_\./,
    conjunction: {
      pattern: /&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,
      alias: "variable"
    },
    punctuation: /[()]/
  }, function(e) {
    var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n2 = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, a = {
      pattern: RegExp(/(^|[^\w.])/.source + n2 + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
      lookbehind: true,
      inside: {
        namespace: {
          pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
          inside: { punctuation: /\./ }
        },
        punctuation: /\./
      }
    };
    e.languages.java = e.languages.extend("clike", {
      string: {
        pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
        lookbehind: true,
        greedy: true
      },
      "class-name": [
        a,
        {
          pattern: RegExp(/(^|[^\w.])/.source + n2 + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
          lookbehind: true,
          inside: a.inside
        },
        {
          pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + n2 + /[A-Z]\w*\b/.source),
          lookbehind: true,
          inside: a.inside
        }
      ],
      keyword: t,
      function: [e.languages.clike.function, {
        pattern: /(::\s*)[a-z_]\w*/,
        lookbehind: true
      }],
      number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
      operator: {
        pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
        lookbehind: true
      },
      constant: /\b[A-Z][A-Z_\d]+\b/
    }), e.languages.insertBefore("java", "string", {
      "triple-quoted-string": {
        pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
        greedy: true,
        alias: "string"
      },
      char: {
        pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
        greedy: true
      }
    }), e.languages.insertBefore("java", "class-name", {
      annotation: {
        pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
        lookbehind: true,
        alias: "punctuation"
      },
      generics: {
        pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
        inside: {
          "class-name": a,
          keyword: t,
          punctuation: /[<>(),.:]/,
          operator: /[?&|]/
        }
      },
      import: [{
        pattern: RegExp(/(\bimport\s+)/.source + n2 + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
        lookbehind: true,
        inside: {
          namespace: a.inside.namespace,
          punctuation: /\./,
          operator: /\*/,
          "class-name": /\w+/
        }
      }, {
        pattern: RegExp(/(\bimport\s+static\s+)/.source + n2 + /(?:\w+|\*)(?=\s*;)/.source),
        lookbehind: true,
        alias: "static",
        inside: {
          namespace: a.inside.namespace,
          static: /\b\w+$/,
          punctuation: /\./,
          operator: /\*/,
          "class-name": /\w+/
        }
      }],
      namespace: {
        pattern: RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
          return t.source;
        })),
        lookbehind: true,
        inside: { punctuation: /\./ }
      }
    });
  }(Prism$1), Prism$1.languages.scala = Prism$1.languages.extend("java", {
    "triple-quoted-string": {
      pattern: /"""[\s\S]*?"""/,
      greedy: true,
      alias: "string"
    },
    string: {
      pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    keyword: /<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,
    number: /\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,
    builtin: /\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,
    symbol: /'[^\d\s\\]\w*/
  }), Prism$1.languages.insertBefore("scala", "triple-quoted-string", { "string-interpolation": {
    pattern: /\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,
    greedy: true,
    inside: {
      id: {
        pattern: /^\w+/,
        greedy: true,
        alias: "function"
      },
      escape: {
        pattern: /\\\$"|\$[$"]/,
        greedy: true,
        alias: "symbol"
      },
      interpolation: {
        pattern: /\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
        greedy: true,
        inside: {
          punctuation: /^\$\{?|\}$/,
          expression: {
            pattern: /[\s\S]+/,
            inside: Prism$1.languages.scala
          }
        }
      },
      string: /[\s\S]+/
    }
  } }), delete Prism$1.languages.scala["class-name"], delete Prism$1.languages.scala.function, delete Prism$1.languages.scala.constant, function(l) {
    var e = l.languages.javadoclike = {
      parameter: {
        pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,
        lookbehind: true
      },
      keyword: {
        pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,
        lookbehind: true
      },
      punctuation: /[{}]/
    };
    Object.defineProperty(e, "addSupport", { value: function(e$1, s) {
      (e$1 = typeof e$1 == "string" ? [e$1] : e$1).forEach(function(e$2) {
        var t = function(e$3) {
          e$3.inside || (e$3.inside = {}), e$3.inside.rest = s;
        }, n2 = "doc-comment";
        if (a = l.languages[e$2]) {
          var a, r = a[n2];
          if ((r = r ? r : (a = l.languages.insertBefore(e$2, "comment", { "doc-comment": {
            pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,
            lookbehind: true,
            alias: "comment"
          } }))[n2]) instanceof RegExp && (r = a[n2] = { pattern: r }), Array.isArray(r))
            for (var i = 0, o = r.length;i < o; i++)
              r[i] instanceof RegExp && (r[i] = { pattern: r[i] }), t(r[i]);
          else
            t(r);
        }
      });
    } }), e.addSupport([
      "java",
      "javascript",
      "php"
    ], e);
  }(Prism$1), function(e) {
    var t = /(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m, n2 = /#\s*\w+(?:\s*\([^()]*\))?/.source, a = /(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(/<mem>/g, function() {
      return n2;
    });
    e.languages.javadoc = e.languages.extend("javadoclike", {}), e.languages.insertBefore("javadoc", "keyword", {
      reference: {
        pattern: RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source + "(?:" + a + ")"),
        lookbehind: true,
        inside: {
          function: {
            pattern: /(#\s*)\w+(?=\s*\()/,
            lookbehind: true
          },
          field: {
            pattern: /(#\s*)\w+/,
            lookbehind: true
          },
          namespace: {
            pattern: /\b(?:[a-z]\w*\s*\.\s*)+/,
            inside: { punctuation: /\./ }
          },
          "class-name": /\b[A-Z]\w*/,
          keyword: e.languages.java.keyword,
          punctuation: /[#()[\],.]/
        }
      },
      "class-name": {
        pattern: /(@param\s+)<[A-Z]\w*>/,
        lookbehind: true,
        inside: { punctuation: /[.<>]/ }
      },
      "code-section": [{
        pattern: /(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,
        lookbehind: true,
        inside: { code: {
          pattern: t,
          lookbehind: true,
          inside: e.languages.java,
          alias: "language-java"
        } }
      }, {
        pattern: /(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,
        lookbehind: true,
        inside: { line: {
          pattern: t,
          lookbehind: true,
          inside: {
            tag: e.languages.markup.tag,
            entity: e.languages.markup.entity,
            code: {
              pattern: /.+/,
              inside: e.languages.java,
              alias: "language-java"
            }
          }
        } }
      }],
      tag: e.languages.markup.tag,
      entity: e.languages.markup.entity
    }), e.languages.javadoclike.addSupport("java", e.languages.javadoc);
  }(Prism$1), Prism$1.languages.javastacktrace = {
    summary: {
      pattern: /^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,
      lookbehind: true,
      inside: {
        keyword: {
          pattern: /^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,
          lookbehind: true
        },
        string: {
          pattern: /^(\s*)"[^"]*"/,
          lookbehind: true
        },
        exceptions: {
          pattern: /^(:?\s*)[\w$.]+(?=:|$)/,
          lookbehind: true,
          inside: {
            "class-name": /[\w$]+$/,
            namespace: /\b[a-z]\w*\b/,
            punctuation: /\./
          }
        },
        message: {
          pattern: /(:\s*)\S.*/,
          lookbehind: true,
          alias: "string"
        },
        punctuation: /:/
      }
    },
    "stack-frame": {
      pattern: /^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,
      lookbehind: true,
      inside: {
        keyword: {
          pattern: /^(\s*)at(?= )/,
          lookbehind: true
        },
        source: [{
          pattern: /(\()\w+\.\w+:\d+(?=\))/,
          lookbehind: true,
          inside: {
            file: /^\w+\.\w+/,
            punctuation: /:/,
            "line-number": {
              pattern: /\b\d+\b/,
              alias: "number"
            }
          }
        }, {
          pattern: /(\()[^()]*(?=\))/,
          lookbehind: true,
          inside: { keyword: /^(?:Native Method|Unknown Source)$/ }
        }],
        "class-name": /[\w$]+(?=\.(?:<init>|[\w$]+)\()/,
        function: /(?:<init>|[\w$]+)(?=\()/,
        "class-loader": {
          pattern: /(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,
          lookbehind: true,
          alias: "namespace",
          inside: { punctuation: /\./ }
        },
        module: {
          pattern: /([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,
          lookbehind: true,
          inside: {
            version: {
              pattern: /(@)[\s\S]+/,
              lookbehind: true,
              alias: "number"
            },
            punctuation: /[@.]/
          }
        },
        namespace: {
          pattern: /(?:\b[a-z]\w*\.)+/,
          inside: { punctuation: /\./ }
        },
        punctuation: /[()/.]/
      }
    },
    more: {
      pattern: /^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,
      lookbehind: true,
      inside: {
        punctuation: /\.{3}/,
        number: /\d+/,
        keyword: /\b[a-z]+(?: [a-z]+)*\b/
      }
    }
  }, Prism$1.languages.jexl = {
    string: /(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
    transform: {
      pattern: /(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,
      alias: "function",
      lookbehind: true
    },
    function: /[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,
    number: /\b\d+(?:\.\d+)?\b|\B\.\d+\b/,
    operator: /[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,
    boolean: /\b(?:false|true)\b/,
    keyword: /\bin\b/,
    punctuation: /[{}[\](),.]/
  }, Prism$1.languages.jolie = Prism$1.languages.extend("clike", {
    string: {
      pattern: /(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,
      lookbehind: true,
      greedy: true
    },
    "class-name": {
      pattern: /((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,
      lookbehind: true
    },
    keyword: /\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,
    function: /\b[a-z_]\w*(?=[ \t]*[@(])/i,
    number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,
    operator: /-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,
    punctuation: /[()[\]{},;.:]/,
    builtin: /\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/
  }), Prism$1.languages.insertBefore("jolie", "keyword", {
    aggregates: {
      pattern: /(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,
      lookbehind: true,
      inside: {
        keyword: /\bwith\b/,
        "class-name": /\w+/,
        punctuation: /,/
      }
    },
    redirects: {
      pattern: /(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,
      lookbehind: true,
      inside: {
        punctuation: /,/,
        "class-name": /\w+/,
        operator: /=>/
      }
    },
    property: { pattern: /\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/ }
  }), function(e) {
    var t = /\\\((?:[^()]|\([^()]*\))*\)/.source, n2 = RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g, function() {
      return t;
    })), a = { interpolation: {
      pattern: RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + t),
      lookbehind: true,
      inside: {
        content: {
          pattern: /^(\\\()[\s\S]+(?=\)$)/,
          lookbehind: true,
          inside: null
        },
        punctuation: /^\\\(|\)$/
      }
    } }, e = e.languages.jq = {
      comment: /#.*/,
      property: {
        pattern: RegExp(n2.source + /(?=\s*:(?!:))/.source),
        lookbehind: true,
        greedy: true,
        inside: a
      },
      string: {
        pattern: n2,
        lookbehind: true,
        greedy: true,
        inside: a
      },
      function: {
        pattern: /(\bdef\s+)[a-z_]\w+/i,
        lookbehind: true
      },
      variable: /\B\$\w+/,
      "property-literal": {
        pattern: /\b[a-z_]\w*(?=\s*:(?!:))/i,
        alias: "property"
      },
      keyword: /\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,
      boolean: /\b(?:false|true)\b/,
      number: /(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,
      operator: [{
        pattern: /\|=?/,
        alias: "pipe"
      }, /\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],
      "c-style-function": {
        pattern: /\b[a-z_]\w*(?=\s*\()/i,
        alias: "function"
      },
      punctuation: /::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,
      dot: {
        pattern: /\./,
        alias: "important"
      }
    };
    a.interpolation.inside.content.inside = e;
  }(Prism$1), function(g2) {
    var e = g2.languages.javascript["template-string"], n2 = e.pattern.source, b2 = e.inside.interpolation, E = b2.inside["interpolation-punctuation"], i = b2.pattern.source;
    function t(e$1, t$1) {
      if (g2.languages[e$1])
        return {
          pattern: RegExp("((?:" + t$1 + ")\\s*)" + n2),
          lookbehind: true,
          greedy: true,
          inside: {
            "template-punctuation": {
              pattern: /^`|`$/,
              alias: "string"
            },
            "embedded-code": {
              pattern: /[\s\S]+/,
              alias: e$1
            }
          }
        };
    }
    function f2(e$1, t$1, n$1) {
      e$1 = {
        code: e$1,
        grammar: t$1,
        language: n$1
      };
      return g2.hooks.run("before-tokenize", e$1), e$1.tokens = g2.tokenize(e$1.code, e$1.grammar), g2.hooks.run("after-tokenize", e$1), e$1.tokens;
    }
    function l(a$1, e$1, r) {
      var t$1 = g2.tokenize(a$1, { interpolation: {
        pattern: RegExp(i),
        lookbehind: true
      } }), u = 0, p2 = {}, t$1 = f2(t$1.map(function(e$2) {
        if (typeof e$2 == "string")
          return e$2;
        for (var t$2, n$1, e$2 = e$2.content;a$1.indexOf((n$1 = u++, t$2 = "___" + r.toUpperCase() + "_" + n$1 + "___")) !== -1; )
          ;
        return p2[t$2] = e$2, t$2;
      }).join(""), e$1, r), m2 = Object.keys(p2);
      return u = 0, function e$2(t$2) {
        for (var n$1 = 0;n$1 < t$2.length; n$1++) {
          if (u >= m2.length)
            return;
          var a$2, r$1, i$1, o, s, l$1, d$1, c = t$2[n$1];
          typeof c == "string" || typeof c.content == "string" ? (a$2 = m2[u], (d$1 = (l$1 = typeof c == "string" ? c : c.content).indexOf(a$2)) !== -1 && (++u, r$1 = l$1.substring(0, d$1), s = p2[a$2], i$1 = undefined, (o = {})["interpolation-punctuation"] = E, (o = g2.tokenize(s, o)).length === 3 && ((i$1 = [1, 1]).push.apply(i$1, f2(o[1], g2.languages.javascript, "javascript")), o.splice.apply(o, i$1)), i$1 = new g2.Token("interpolation", o, b2.alias, s), o = l$1.substring(d$1 + a$2.length), s = [], r$1 && s.push(r$1), s.push(i$1), o && (e$2(l$1 = [o]), s.push.apply(s, l$1)), typeof c == "string" ? (t$2.splice.apply(t$2, [n$1, 1].concat(s)), n$1 += s.length - 1) : c.content = s)) : (d$1 = c.content, Array.isArray(d$1) ? e$2(d$1) : e$2([d$1]));
        }
      }(t$1), new g2.Token(r, t$1, "language-" + r, a$1);
    }
    g2.languages.javascript["template-string"] = [
      t("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),
      t("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),
      t("svg", /\bsvg/.source),
      t("markdown", /\b(?:markdown|md)/.source),
      t("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),
      t("sql", /\bsql/.source),
      e
    ].filter(Boolean);
    var a = {
      javascript: true,
      js: true,
      typescript: true,
      ts: true,
      jsx: true,
      tsx: true
    };
    function d2(e$1) {
      return typeof e$1 == "string" ? e$1 : Array.isArray(e$1) ? e$1.map(d2).join("") : d2(e$1.content);
    }
    g2.hooks.add("after-tokenize", function(e$1) {
      e$1.language in a && function e$2(t$1) {
        for (var n$1 = 0, a$1 = t$1.length;n$1 < a$1; n$1++) {
          var r, i$1, o, s = t$1[n$1];
          typeof s != "string" && (r = s.content, Array.isArray(r) ? s.type === "template-string" ? (s = r[1], r.length === 3 && typeof s != "string" && s.type === "embedded-code" && (i$1 = d2(s), s = s.alias, s = Array.isArray(s) ? s[0] : s, o = g2.languages[s]) && (r[1] = l(i$1, o, s))) : e$2(r) : typeof r != "string" && e$2([r]));
        }
      }(e$1.tokens);
    });
  }(Prism$1), function(e) {
    e.languages.typescript = e.languages.extend("javascript", {
      "class-name": {
        pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
        lookbehind: true,
        greedy: true,
        inside: null
      },
      builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
    }), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
    var t = e.languages.extend("typescript", {});
    delete t["class-name"], e.languages.typescript["class-name"].inside = t, e.languages.insertBefore("typescript", "function", {
      decorator: {
        pattern: /@[$\w\xA0-\uFFFF]+/,
        inside: {
          at: {
            pattern: /^@/,
            alias: "operator"
          },
          function: /^[\s\S]+/
        }
      },
      "generic-function": {
        pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
        greedy: true,
        inside: {
          function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
          generic: {
            pattern: /<[\s\S]+/,
            alias: "class-name",
            inside: t
          }
        }
      }
    }), e.languages.ts = e.languages.typescript;
  }(Prism$1), function(e) {
    var t = e.languages.javascript, n2 = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source, a = "(@(?:arg|argument|param|property)\\s+(?:" + n2 + "\\s+)?)";
    e.languages.jsdoc = e.languages.extend("javadoclike", { parameter: {
      pattern: RegExp(a + /(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),
      lookbehind: true,
      inside: { punctuation: /\./ }
    } }), e.languages.insertBefore("jsdoc", "keyword", {
      "optional-parameter": {
        pattern: RegExp(a + /\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),
        lookbehind: true,
        inside: {
          parameter: {
            pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/,
            lookbehind: true,
            inside: { punctuation: /\./ }
          },
          code: {
            pattern: /(=)[\s\S]*(?=\]$)/,
            lookbehind: true,
            inside: t,
            alias: "language-javascript"
          },
          punctuation: /[=[\]]/
        }
      },
      "class-name": [{
        pattern: RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g, function() {
          return n2;
        })),
        lookbehind: true,
        inside: { punctuation: /\./ }
      }, {
        pattern: RegExp("(@[a-z]+\\s+)" + n2),
        lookbehind: true,
        inside: {
          string: t.string,
          number: t.number,
          boolean: t.boolean,
          keyword: e.languages.typescript.keyword,
          operator: /=>|\.\.\.|[&|?:*]/,
          punctuation: /[.,;=<>{}()[\]]/
        }
      }],
      example: {
        pattern: /(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,
        lookbehind: true,
        inside: { code: {
          pattern: /^([\t ]*(?:\*\s*)?)\S.*$/m,
          lookbehind: true,
          inside: t,
          alias: "language-javascript"
        } }
      }
    }), e.languages.javadoclike.addSupport("javascript", e.languages.jsdoc);
  }(Prism$1), Prism$1.languages.n4js = Prism$1.languages.extend("javascript", { keyword: /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ }), Prism$1.languages.insertBefore("n4js", "constant", { annotation: {
    pattern: /@+\w+/,
    alias: "operator"
  } }), Prism$1.languages.n4jsd = Prism$1.languages.n4js, function(e) {
    function t(e$1, t$1) {
      return RegExp(e$1.replace(/<ID>/g, function() {
        return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
      }), t$1);
    }
    e.languages.insertBefore("javascript", "function-variable", { "method-variable": {
      pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source),
      lookbehind: true,
      alias: [
        "function-variable",
        "method",
        "function",
        "property-access"
      ]
    } }), e.languages.insertBefore("javascript", "function", { method: {
      pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source),
      lookbehind: true,
      alias: ["function", "property-access"]
    } }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{
      pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,
      alias: "class-name"
    }, {
      pattern: /\b(?:[A-Z]\w*)Error\b/,
      alias: "class-name"
    }] }), e.languages.insertBefore("javascript", "keyword", {
      imports: {
        pattern: t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),
        lookbehind: true,
        inside: e.languages.javascript
      },
      exports: {
        pattern: t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),
        lookbehind: true,
        inside: e.languages.javascript
      }
    }), e.languages.javascript.keyword.unshift({
      pattern: /\b(?:as|default|export|from|import)\b/,
      alias: "module"
    }, {
      pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,
      alias: "control-flow"
    }, {
      pattern: /\bnull\b/,
      alias: ["null", "nil"]
    }, {
      pattern: /\bundefined\b/,
      alias: "nil"
    }), e.languages.insertBefore("javascript", "operator", {
      spread: {
        pattern: /\.{3}/,
        alias: "operator"
      },
      arrow: {
        pattern: /=>/,
        alias: "operator"
      }
    }), e.languages.insertBefore("javascript", "punctuation", {
      "property-access": {
        pattern: t(/(\.\s*)#?<ID>/.source),
        lookbehind: true
      },
      "maybe-class-name": {
        pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,
        lookbehind: true
      },
      dom: {
        pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,
        alias: "variable"
      },
      console: {
        pattern: /\bconsole(?=\s*\.)/,
        alias: "class-name"
      }
    });
    for (var n2 = [
      "function",
      "function-variable",
      "method",
      "method-variable",
      "property-access"
    ], a = 0;a < n2.length; a++) {
      var r = n2[a], i = e.languages.javascript[r], r = (i = e.util.type(i) === "RegExp" ? e.languages.javascript[r] = { pattern: i } : i).inside || {};
      (i.inside = r)["maybe-class-name"] = /^[A-Z][\s\S]*/;
    }
  }(Prism$1), function(e) {
    var t = /("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;
    e.languages.json5 = e.languages.extend("json", {
      property: [{
        pattern: RegExp(t.source + "(?=\\s*:)"),
        greedy: true
      }, {
        pattern: /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,
        alias: "unquoted"
      }],
      string: {
        pattern: t,
        greedy: true
      },
      number: /[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/
    });
  }(Prism$1), Prism$1.languages.jsonp = Prism$1.languages.extend("json", { punctuation: /[{}[\]();,.]/ }), Prism$1.languages.insertBefore("jsonp", "punctuation", { function: /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/ }), Prism$1.languages.jsstacktrace = {
    "error-message": {
      pattern: /^\S.*/m,
      alias: "string"
    },
    "stack-frame": {
      pattern: /(^[ \t]+)at[ \t].*/m,
      lookbehind: true,
      inside: {
        "not-my-code": {
          pattern: /^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,
          alias: "comment"
        },
        filename: {
          pattern: /(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,
          lookbehind: true,
          alias: "url"
        },
        function: {
          pattern: /(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,
          lookbehind: true,
          inside: { punctuation: /\./ }
        },
        punctuation: /[()]/,
        keyword: /\b(?:at|new)\b/,
        alias: {
          pattern: /\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,
          alias: "variable"
        },
        "line-number": {
          pattern: /:\d+(?::\d+)?\b/,
          alias: "number",
          inside: { punctuation: /:/ }
        }
      }
    }
  }, Prism$1.languages.julia = {
    comment: {
      pattern: /(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,
      lookbehind: true
    },
    regex: {
      pattern: /r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,
      greedy: true
    },
    string: {
      pattern: /"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,
      greedy: true
    },
    char: {
      pattern: /(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,
      lookbehind: true,
      greedy: true
    },
    keyword: /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,
    boolean: /\b(?:false|true)\b/,
    number: /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,
    operator: /&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,
    punctuation: /::?|[{}[\]();,.?]/,
    constant: /\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/
  }, Prism$1.languages.keepalived = {
    comment: {
      pattern: /[#!].*/,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,
      lookbehind: true,
      greedy: true
    },
    ip: {
      pattern: RegExp(/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}<ipv4>|(?:[\da-f]{1,4}:){0,5}:<ipv4>|::(?:[\da-f]{1,4}:){0,5}<ipv4>|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|<ipv4>(?:\/\d{1,2})?)\b/.source.replace(/<ipv4>/g, function() {
        return /(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source;
      }), "i"),
      alias: "number"
    },
    path: {
      pattern: /(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,
      lookbehind: true,
      alias: "string"
    },
    variable: /\$\{?\w+\}?/,
    email: {
      pattern: /[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,
      alias: "string"
    },
    "conditional-configuration": {
      pattern: /@\^?[\w-]+/,
      alias: "variable"
    },
    operator: /=/,
    property: /\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,
    constant: /\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,
    number: {
      pattern: /(^|[^\w.-])-?\d+(?:\.\d+)?/,
      lookbehind: true
    },
    boolean: /\b(?:false|no|off|on|true|yes)\b/,
    punctuation: /[\{\}]/
  }, Prism$1.languages.keyman = {
    comment: {
      pattern: /\bc .*/i,
      greedy: true
    },
    string: {
      pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
      greedy: true
    },
    "virtual-key": {
      pattern: /\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,
      greedy: true,
      alias: "function"
    },
    "header-keyword": {
      pattern: /&\w+/,
      alias: "bold"
    },
    "header-statement": {
      pattern: /\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,
      alias: "bold"
    },
    "rule-keyword": {
      pattern: /\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,
      alias: "keyword"
    },
    "structural-keyword": {
      pattern: /\b(?:ansi|begin|group|match|newcontext|nomatch|postkeystroke|readonly|unicode|using keys)\b/i,
      alias: "keyword"
    },
    "compile-target": {
      pattern: /\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,
      alias: "property"
    },
    number: /\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,
    operator: /[+>\\$]|\.\./,
    punctuation: /[()=,]/
  }, function(e) {
    e.languages.kotlin = e.languages.extend("clike", {
      keyword: {
        pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
        lookbehind: true
      },
      function: [{
        pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,
        greedy: true
      }, {
        pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,
        lookbehind: true,
        greedy: true
      }],
      number: /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,
      operator: /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/
    }), delete e.languages.kotlin["class-name"];
    var t = {
      "interpolation-punctuation": {
        pattern: /^\$\{?|\}$/,
        alias: "punctuation"
      },
      expression: {
        pattern: /[\s\S]+/,
        inside: e.languages.kotlin
      }
    };
    e.languages.insertBefore("kotlin", "string", {
      "string-literal": [{
        pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,
        alias: "multiline",
        inside: {
          interpolation: {
            pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i,
            inside: t
          },
          string: /[\s\S]+/
        }
      }, {
        pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,
        alias: "singleline",
        inside: {
          interpolation: {
            pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,
            lookbehind: true,
            inside: t
          },
          string: /[\s\S]+/
        }
      }],
      char: {
        pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,
        greedy: true
      }
    }), delete e.languages.kotlin.string, e.languages.insertBefore("kotlin", "keyword", { annotation: {
      pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,
      alias: "builtin"
    } }), e.languages.insertBefore("kotlin", "function", { label: {
      pattern: /\b\w+@|@\w+\b/,
      alias: "symbol"
    } }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
  }(Prism$1), function(e) {
    var n2 = /\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;
    function t(e$1, t$1) {
      return RegExp(e$1.replace(/<nonId>/g, n2), t$1);
    }
    e.languages.kumir = {
      comment: { pattern: /\|.*/ },
      prolog: {
        pattern: /#.*/,
        greedy: true
      },
      string: {
        pattern: /"[^\n\r"]*"|'[^\n\r']*'/,
        greedy: true
      },
      boolean: {
        pattern: t(/(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)/.source),
        lookbehind: true
      },
      "operator-word": {
        pattern: t(/(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)/.source),
        lookbehind: true,
        alias: "keyword"
      },
      "system-variable": {
        pattern: t(/(^|[<nonId>])знач(?=[<nonId>]|$)/.source),
        lookbehind: true,
        alias: "keyword"
      },
      type: [{
        pattern: t(/(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[<nonId>]|$)/.source),
        lookbehind: true,
        alias: "builtin"
      }, {
        pattern: t(/(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)/.source),
        lookbehind: true,
        alias: "important"
      }],
      keyword: {
        pattern: t(/(^|[<nonId>])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)/.source),
        lookbehind: true
      },
      name: {
        pattern: t(/(^|[<nonId>])[^\d<nonId>][^<nonId>]*(?:\x20+[^<nonId>]+)*(?=[<nonId>]|$)/.source),
        lookbehind: true
      },
      number: {
        pattern: t(/(^|[<nonId>])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[<nonId>]|$)/.source, "i"),
        lookbehind: true
      },
      punctuation: /:=|[(),:;\[\]]/,
      "operator-char": {
        pattern: /\*\*?|<[=>]?|>=?|[-+/=]/,
        alias: "operator"
      }
    }, e.languages.kum = e.languages.kumir;
  }(Prism$1), Prism$1.languages.kusto = {
    comment: {
      pattern: /\/\/.*/,
      greedy: true
    },
    string: {
      pattern: /```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,
      greedy: true
    },
    verb: {
      pattern: /(\|\s*)[a-z][\w-]*/i,
      lookbehind: true,
      alias: "keyword"
    },
    command: {
      pattern: /\.[a-z][a-z\d-]*\b/,
      alias: "keyword"
    },
    "class-name": /\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,
    keyword: /\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,
    boolean: /\b(?:false|null|true)\b/,
    function: /\b[a-z_]\w*(?=\s*\()/,
    datetime: [{
      pattern: /\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,
      alias: "number"
    }, {
      pattern: /[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,
      alias: "number"
    }],
    number: /\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,
    operator: /=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,
    punctuation: /[()\[\]{},;.:]/
  }, function(e) {
    var t = /\\(?:[^a-z()[\]]|[a-z*]+)/i, n2 = { "equation-command": {
      pattern: t,
      alias: "regex"
    } };
    e.languages.latex = {
      comment: /%.*/,
      cdata: {
        pattern: /(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
        lookbehind: true
      },
      equation: [{
        pattern: /\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,
        inside: n2,
        alias: "string"
      }, {
        pattern: /(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
        lookbehind: true,
        inside: n2,
        alias: "string"
      }],
      keyword: {
        pattern: /(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
        lookbehind: true
      },
      url: {
        pattern: /(\\url\{)[^}]+(?=\})/,
        lookbehind: true
      },
      headline: {
        pattern: /(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
        lookbehind: true,
        alias: "class-name"
      },
      function: {
        pattern: t,
        alias: "selector"
      },
      punctuation: /[[\]{}&]/
    }, e.languages.tex = e.languages.latex, e.languages.context = e.languages.latex;
  }(Prism$1), function(t) {
    var e = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, n2 = [
      {
        pattern: /\b(?:false|true)\b/i,
        alias: "boolean"
      },
      {
        pattern: /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,
        greedy: true,
        lookbehind: true
      },
      {
        pattern: /(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,
        greedy: true,
        lookbehind: true
      },
      /\b(?:null)\b/i,
      /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/
    ], a = /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i, r = /<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/, i = /[{}\[\](),:;]/, o = (t.languages.php = {
      delimiter: {
        pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i,
        alias: "important"
      },
      comment: e,
      variable: /\$+(?:\w+\b|(?=\{))/,
      package: {
        pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
        lookbehind: true,
        inside: { punctuation: /\\/ }
      },
      "class-name-definition": {
        pattern: /(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,
        lookbehind: true,
        alias: "class-name"
      },
      "function-definition": {
        pattern: /(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,
        lookbehind: true,
        alias: "function"
      },
      keyword: [
        {
          pattern: /(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,
          alias: "type-casting",
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,
          alias: "type-hint",
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,
          alias: "return-type",
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,
          alias: "type-declaration",
          greedy: true
        },
        {
          pattern: /(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,
          alias: "type-declaration",
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /\b(?:parent|self|static)(?=\s*::)/i,
          alias: "static-context",
          greedy: true
        },
        {
          pattern: /(\byield\s+)from\b/i,
          lookbehind: true
        },
        /\bclass\b/i,
        {
          pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,
          lookbehind: true
        }
      ],
      "argument-name": {
        pattern: /([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,
        lookbehind: true
      },
      "class-name": [
        {
          pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /(\|\s*)\b[a-z_]\w*(?!\\)\b/i,
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,
          greedy: true
        },
        {
          pattern: /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,
          alias: "class-name-fully-qualified",
          greedy: true,
          lookbehind: true,
          inside: { punctuation: /\\/ }
        },
        {
          pattern: /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,
          alias: "class-name-fully-qualified",
          greedy: true,
          inside: { punctuation: /\\/ }
        },
        {
          pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
          alias: "class-name-fully-qualified",
          greedy: true,
          lookbehind: true,
          inside: { punctuation: /\\/ }
        },
        {
          pattern: /\b[a-z_]\w*(?=\s*\$)/i,
          alias: "type-declaration",
          greedy: true
        },
        {
          pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,
          alias: ["class-name-fully-qualified", "type-declaration"],
          greedy: true,
          inside: { punctuation: /\\/ }
        },
        {
          pattern: /\b[a-z_]\w*(?=\s*::)/i,
          alias: "static-context",
          greedy: true
        },
        {
          pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,
          alias: ["class-name-fully-qualified", "static-context"],
          greedy: true,
          inside: { punctuation: /\\/ }
        },
        {
          pattern: /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,
          alias: "type-hint",
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,
          alias: ["class-name-fully-qualified", "type-hint"],
          greedy: true,
          lookbehind: true,
          inside: { punctuation: /\\/ }
        },
        {
          pattern: /(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,
          alias: "return-type",
          greedy: true,
          lookbehind: true
        },
        {
          pattern: /(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
          alias: ["class-name-fully-qualified", "return-type"],
          greedy: true,
          lookbehind: true,
          inside: { punctuation: /\\/ }
        }
      ],
      constant: n2,
      function: {
        pattern: /(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,
        lookbehind: true,
        inside: { punctuation: /\\/ }
      },
      property: {
        pattern: /(->\s*)\w+/,
        lookbehind: true
      },
      number: a,
      operator: r,
      punctuation: i
    }, {
      pattern: /\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,
      lookbehind: true,
      inside: t.languages.php
    }), o = [
      {
        pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,
        alias: "nowdoc-string",
        greedy: true,
        inside: { delimiter: {
          pattern: /^<<<'[^']+'|[a-z_]\w*;$/i,
          alias: "symbol",
          inside: { punctuation: /^<<<'?|[';]$/ }
        } }
      },
      {
        pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,
        alias: "heredoc-string",
        greedy: true,
        inside: {
          delimiter: {
            pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,
            alias: "symbol",
            inside: { punctuation: /^<<<"?|[";]$/ }
          },
          interpolation: o
        }
      },
      {
        pattern: /`(?:\\[\s\S]|[^\\`])*`/,
        alias: "backtick-quoted-string",
        greedy: true
      },
      {
        pattern: /'(?:\\[\s\S]|[^\\'])*'/,
        alias: "single-quoted-string",
        greedy: true
      },
      {
        pattern: /"(?:\\[\s\S]|[^\\"])*"/,
        alias: "double-quoted-string",
        greedy: true,
        inside: { interpolation: o }
      }
    ];
    t.languages.insertBefore("php", "variable", {
      string: o,
      attribute: {
        pattern: /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,
        greedy: true,
        inside: {
          "attribute-content": {
            pattern: /^(#\[)[\s\S]+(?=\]$)/,
            lookbehind: true,
            inside: {
              comment: e,
              string: o,
              "attribute-class-name": [{
                pattern: /([^:]|^)\b[a-z_]\w*(?!\\)\b/i,
                alias: "class-name",
                greedy: true,
                lookbehind: true
              }, {
                pattern: /([^:]|^)(?:\\?\b[a-z_]\w*)+/i,
                alias: ["class-name", "class-name-fully-qualified"],
                greedy: true,
                lookbehind: true,
                inside: { punctuation: /\\/ }
              }],
              constant: n2,
              number: a,
              operator: r,
              punctuation: i
            }
          },
          delimiter: {
            pattern: /^#\[|\]$/,
            alias: "punctuation"
          }
        }
      }
    }), t.hooks.add("before-tokenize", function(e$1) {
      /<\?/.test(e$1.code) && t.languages["markup-templating"].buildPlaceholders(e$1, "php", /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g);
    }), t.hooks.add("after-tokenize", function(e$1) {
      t.languages["markup-templating"].tokenizePlaceholders(e$1, "php");
    });
  }(Prism$1), function(t) {
    t.languages.latte = {
      comment: /^\{\*[\s\S]*/,
      "latte-tag": {
        pattern: /(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,
        lookbehind: true,
        alias: "important"
      },
      delimiter: {
        pattern: /^\{\/?|\}$/,
        alias: "punctuation"
      },
      php: {
        pattern: /\S(?:[\s\S]*\S)?/,
        alias: "language-php",
        inside: t.languages.php
      }
    };
    var n2 = t.languages.extend("markup", {});
    t.languages.insertBefore("inside", "attr-value", { "n-attr": {
      pattern: /n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,
      inside: {
        "attr-name": {
          pattern: /^[^\s=]+/,
          alias: "important"
        },
        "attr-value": {
          pattern: /=[\s\S]+/,
          inside: {
            punctuation: [/^=/, {
              pattern: /^(\s*)["']|["']$/,
              lookbehind: true
            }],
            php: {
              pattern: /\S(?:[\s\S]*\S)?/,
              inside: t.languages.php
            }
          }
        }
      }
    } }, n2.tag), t.hooks.add("before-tokenize", function(e) {
      e.language === "latte" && (t.languages["markup-templating"].buildPlaceholders(e, "latte", /\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g), e.grammar = n2);
    }), t.hooks.add("after-tokenize", function(e) {
      t.languages["markup-templating"].tokenizePlaceholders(e, "latte");
    });
  }(Prism$1), Prism$1.languages.scheme = {
    comment: /;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,
    string: {
      pattern: /"(?:[^"\\]|\\.)*"/,
      greedy: true
    },
    symbol: {
      pattern: /'[^()\[\]#'\s]+/,
      greedy: true
    },
    char: {
      pattern: /#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,
      greedy: true
    },
    "lambda-parameter": [{
      pattern: /((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,
      lookbehind: true
    }, {
      pattern: /((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,
      lookbehind: true
    }],
    keyword: {
      pattern: /((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,
      lookbehind: true
    },
    builtin: {
      pattern: /((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,
      lookbehind: true
    },
    operator: {
      pattern: /((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,
      lookbehind: true
    },
    number: {
      pattern: RegExp(function(t) {
        for (var e in t)
          t[e] = t[e].replace(/<[\w\s]+>/g, function(e$1) {
            return "(?:" + t[e$1].trim() + ")";
          });
        return t[e];
      }({
        "<ureal dec>": /\d+(?:\/\d+)|(?:\d+(?:\.\d*)?|\.\d+)(?:[esfdl][+-]?\d+)?/.source,
        "<real dec>": /[+-]?<ureal dec>|[+-](?:inf|nan)\.0/.source,
        "<imaginary dec>": /[+-](?:<ureal dec>|(?:inf|nan)\.0)?i/.source,
        "<complex dec>": /<real dec>(?:@<real dec>|<imaginary dec>)?|<imaginary dec>/.source,
        "<num dec>": /(?:#d(?:#[ei])?|#[ei](?:#d)?)?<complex dec>/.source,
        "<ureal box>": /[0-9a-f]+(?:\/[0-9a-f]+)?/.source,
        "<real box>": /[+-]?<ureal box>|[+-](?:inf|nan)\.0/.source,
        "<imaginary box>": /[+-](?:<ureal box>|(?:inf|nan)\.0)?i/.source,
        "<complex box>": /<real box>(?:@<real box>|<imaginary box>)?|<imaginary box>/.source,
        "<num box>": /#[box](?:#[ei])?|(?:#[ei])?#[box]<complex box>/.source,
        "<number>": /(^|[()\[\]\s])(?:<num dec>|<num box>)(?=[()\[\]\s]|$)/.source
      }), "i"),
      lookbehind: true
    },
    boolean: {
      pattern: /(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,
      lookbehind: true
    },
    function: {
      pattern: /((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,
      lookbehind: true
    },
    identifier: {
      pattern: /(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,
      lookbehind: true,
      greedy: true
    },
    punctuation: /[()\[\]']/
  }, function(e) {
    for (var t = /\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/.source, n2 = 0;n2 < 5; n2++)
      t = t.replace(/<expr>/g, function() {
        return t;
      });
    var t = t.replace(/<expr>/g, /[^\s\S]/.source), a = e.languages.lilypond = {
      comment: /%(?:(?!\{).*|\{[\s\S]*?%\})/,
      "embedded-scheme": {
        pattern: RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|<expr>))/.source.replace(/<expr>/g, function() {
          return t;
        }), "m"),
        lookbehind: true,
        greedy: true,
        inside: {
          scheme: {
            pattern: /^(#)[\s\S]+$/,
            lookbehind: true,
            alias: "language-scheme",
            inside: {
              "embedded-lilypond": {
                pattern: /#\{[\s\S]*?#\}/,
                greedy: true,
                inside: {
                  punctuation: /^#\{|#\}$/,
                  lilypond: {
                    pattern: /[\s\S]+/,
                    alias: "language-lilypond",
                    inside: null
                  }
                }
              },
              rest: e.languages.scheme
            }
          },
          punctuation: /#/
        }
      },
      string: {
        pattern: /"(?:[^"\\]|\\.)*"/,
        greedy: true
      },
      "class-name": {
        pattern: /(\\new\s+)[\w-]+/,
        lookbehind: true
      },
      keyword: {
        pattern: /\\[a-z][-\w]*/i,
        inside: { punctuation: /^\\/ }
      },
      operator: /[=|]|<<|>>/,
      punctuation: {
        pattern: /(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,
        lookbehind: true
      },
      number: /\b\d+(?:\/\d+)?\b/
    };
    a["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside = a, e.languages.ly = a;
  }(Prism$1), Prism$1.languages.liquid = {
    comment: {
      pattern: /(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,
      lookbehind: true
    },
    delimiter: {
      pattern: /^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,
      alias: "punctuation"
    },
    string: {
      pattern: /"[^"]*"|'[^']*'/,
      greedy: true
    },
    keyword: /\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,
    object: /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,
    function: [{
      pattern: /(\|\s*)\w+/,
      lookbehind: true,
      alias: "filter"
    }, {
      pattern: /(\.\s*)(?:first|last|size)/,
      lookbehind: true
    }],
    boolean: /\b(?:false|nil|true)\b/,
    range: {
      pattern: /\.\./,
      alias: "operator"
    },
    number: /\b\d+(?:\.\d+)?\b/,
    operator: /[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,
    punctuation: /[.,\[\]()]/,
    empty: {
      pattern: /\bempty\b/,
      alias: "keyword"
    }
  }, Prism$1.hooks.add("before-tokenize", function(e) {
    var t = false;
    Prism$1.languages["markup-templating"].buildPlaceholders(e, "liquid", /\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g, function(e$1) {
      e$1 = /^\{%-?\s*(\w+)/.exec(e$1);
      if (e$1) {
        e$1 = e$1[1];
        if (e$1 === "raw" && !t)
          return t = true;
        if (e$1 === "endraw")
          return !(t = false);
      }
      return !t;
    });
  }), Prism$1.hooks.add("after-tokenize", function(e) {
    Prism$1.languages["markup-templating"].tokenizePlaceholders(e, "liquid");
  }), function(e) {
    function t(e$1) {
      return RegExp(/(\()/.source + "(?:" + e$1 + ")" + /(?=[\s\)])/.source);
    }
    function n2(e$1) {
      return RegExp(/([\s([])/.source + "(?:" + e$1 + ")" + /(?=[\s)])/.source);
    }
    var a = /(?!\d)[-+*/~!@$%^=<>{}\w]+/.source, r = "&" + a, i = "(\\()", o = "(?=\\s)", s = /(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source, o = {
      heading: {
        pattern: /;;;.*/,
        alias: ["comment", "title"]
      },
      comment: /;.*/,
      string: {
        pattern: /"(?:[^"\\]|\\.)*"/,
        greedy: true,
        inside: {
          argument: /[-A-Z]+(?=[.,\s])/,
          symbol: RegExp("`" + a + "'")
        }
      },
      "quoted-symbol": {
        pattern: RegExp("#?'" + a),
        alias: ["variable", "symbol"]
      },
      "lisp-property": {
        pattern: RegExp(":" + a),
        alias: "property"
      },
      splice: {
        pattern: RegExp(",@?" + a),
        alias: ["symbol", "variable"]
      },
      keyword: [{
        pattern: RegExp(i + "(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)" + o),
        lookbehind: true
      }, {
        pattern: RegExp(i + "(?:append|by|collect|concat|do|finally|for|in|return)" + o),
        lookbehind: true
      }],
      declare: {
        pattern: t(/declare/.source),
        lookbehind: true,
        alias: "keyword"
      },
      interactive: {
        pattern: t(/interactive/.source),
        lookbehind: true,
        alias: "keyword"
      },
      boolean: {
        pattern: n2(/nil|t/.source),
        lookbehind: true
      },
      number: {
        pattern: n2(/[-+]?\d+(?:\.\d*)?/.source),
        lookbehind: true
      },
      defvar: {
        pattern: RegExp(i + "def(?:const|custom|group|var)\\s+" + a),
        lookbehind: true,
        inside: {
          keyword: /^def[a-z]+/,
          variable: RegExp(a)
        }
      },
      defun: {
        pattern: RegExp(i + /(?:cl-)?(?:defmacro|defun\*?)\s+/.source + a + /\s+\(/.source + s + /\)/.source),
        lookbehind: true,
        greedy: true,
        inside: {
          keyword: /^(?:cl-)?def\S+/,
          arguments: null,
          function: {
            pattern: RegExp("(^\\s)" + a),
            lookbehind: true
          },
          punctuation: /[()]/
        }
      },
      lambda: {
        pattern: RegExp(i + "lambda\\s+\\(\\s*(?:&?" + a + "(?:\\s+&?" + a + ")*\\s*)?\\)"),
        lookbehind: true,
        greedy: true,
        inside: {
          keyword: /^lambda/,
          arguments: null,
          punctuation: /[()]/
        }
      },
      car: {
        pattern: RegExp(i + a),
        lookbehind: true
      },
      punctuation: [/(?:['`,]?\(|[)\[\]])/, {
        pattern: /(\s)\.(?=\s)/,
        lookbehind: true
      }]
    }, r = {
      "lisp-marker": RegExp(r),
      varform: {
        pattern: RegExp(/\(/.source + a + /\s+(?=\S)/.source + s + /\)/.source),
        inside: o
      },
      argument: {
        pattern: RegExp(/(^|[\s(])/.source + a),
        lookbehind: true,
        alias: "variable"
      },
      rest: o
    }, l = "\\S+(?:\\s+\\S+)*", i = {
      pattern: RegExp(i + s + "(?=\\))"),
      lookbehind: true,
      inside: {
        "rest-vars": {
          pattern: RegExp("&(?:body|rest)\\s+" + l),
          inside: r
        },
        "other-marker-vars": {
          pattern: RegExp("&(?:aux|optional)\\s+" + l),
          inside: r
        },
        keys: {
          pattern: RegExp("&key\\s+" + l + "(?:\\s+&allow-other-keys)?"),
          inside: r
        },
        argument: {
          pattern: RegExp(a),
          alias: "variable"
        },
        punctuation: /[()]/
      }
    };
    o.lambda.inside.arguments = i, o.defun.inside.arguments = e.util.clone(i), o.defun.inside.arguments.inside.sublist = i, e.languages.lisp = o, e.languages.elisp = o, e.languages.emacs = o, e.languages["emacs-lisp"] = o;
  }(Prism$1), Prism$1.languages.livescript = {
    comment: [{
      pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
      lookbehind: true
    }, {
      pattern: /(^|[^\\])#.*/,
      lookbehind: true
    }],
    "interpolated-string": {
      pattern: /(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,
      lookbehind: true,
      greedy: true,
      inside: {
        variable: {
          pattern: /(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,
          lookbehind: true
        },
        interpolation: {
          pattern: /(^|[^\\])#\{[^}]+\}/m,
          lookbehind: true,
          inside: { "interpolation-punctuation": {
            pattern: /^#\{|\}$/,
            alias: "variable"
          } }
        },
        string: /[\s\S]+/
      }
    },
    string: [
      {
        pattern: /('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,
        greedy: true
      },
      {
        pattern: /<\[[\s\S]*?\]>/,
        greedy: true
      },
      /\\[^\s,;\])}]+/
    ],
    regex: [{
      pattern: /\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,
      greedy: true,
      inside: { comment: {
        pattern: /(^|[^\\])#.*/,
        lookbehind: true
      } }
    }, {
      pattern: /\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,
      greedy: true
    }],
    keyword: {
      pattern: /(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,
      lookbehind: true
    },
    "keyword-operator": {
      pattern: /(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,
      lookbehind: true,
      alias: "operator"
    },
    boolean: {
      pattern: /(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,
      lookbehind: true
    },
    argument: {
      pattern: /(^|(?!\.&\.)[^&])&(?!&)\d*/m,
      lookbehind: true,
      alias: "variable"
    },
    number: /\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,
    identifier: /[a-z_](?:-?[a-z]|[\d_])*/i,
    operator: [{
      pattern: /( )\.(?= )/,
      lookbehind: true
    }, /\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<<?<?|--?!?|~~?!?|[|=?])?|>[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],
    punctuation: /[(){}\[\]|.,:;`]/
  }, Prism$1.languages.livescript["interpolated-string"].inside.interpolation.inside.rest = Prism$1.languages.livescript, Prism$1.languages.llvm = {
    comment: /;.*/,
    string: {
      pattern: /"[^"]*"/,
      greedy: true
    },
    boolean: /\b(?:false|true)\b/,
    variable: /[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,
    label: /(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,
    type: {
      pattern: /\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,
      alias: "class-name"
    },
    keyword: /\b[a-z_][a-z_0-9]*\b/,
    number: /[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,
    punctuation: /[{}[\];(),.!*=<>]/
  }, Prism$1.languages.log = {
    string: {
      pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,
      greedy: true
    },
    exception: {
      pattern: /(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,
      lookbehind: true,
      greedy: true,
      alias: ["javastacktrace", "language-javastacktrace"],
      inside: Prism$1.languages.javastacktrace || {
        keyword: /\bat\b/,
        function: /[a-z_][\w$]*(?=\()/,
        punctuation: /[.:()]/
      }
    },
    level: [
      {
        pattern: /\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,
        alias: ["error", "important"]
      },
      {
        pattern: /\b(?:WARN|WARNING|WRN)\b/,
        alias: ["warning", "important"]
      },
      {
        pattern: /\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,
        alias: ["info", "keyword"]
      },
      {
        pattern: /\b(?:DBG|DEBUG|FINE)\b/,
        alias: ["debug", "keyword"]
      },
      {
        pattern: /\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,
        alias: ["trace", "comment"]
      }
    ],
    property: {
      pattern: /((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,
      lookbehind: true
    },
    separator: {
      pattern: /(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,
      lookbehind: true,
      alias: "comment"
    },
    url: /\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,
    email: {
      pattern: /(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,
      lookbehind: true,
      alias: "url"
    },
    "ip-address": {
      pattern: /\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,
      alias: "constant"
    },
    "mac-address": {
      pattern: /\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,
      alias: "constant"
    },
    domain: {
      pattern: /(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,
      lookbehind: true,
      alias: "constant"
    },
    uuid: {
      pattern: /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,
      alias: "constant"
    },
    hash: {
      pattern: /\b(?:[a-f0-9]{32}){1,2}\b/i,
      alias: "constant"
    },
    "file-path": {
      pattern: /\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,
      lookbehind: true,
      greedy: true,
      alias: "string"
    },
    date: {
      pattern: RegExp(/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source + "|" + /\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source + "|" + /\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source, "i"),
      alias: "number"
    },
    time: {
      pattern: /\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,
      alias: "number"
    },
    boolean: /\b(?:false|null|true)\b/i,
    number: {
      pattern: /(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,
      lookbehind: true
    },
    operator: /[;:?<=>~/@!$%&+\-|^(){}*#]/,
    punctuation: /[\[\].,]/
  }, Prism$1.languages.lolcode = {
    comment: [/\bOBTW\s[\s\S]*?\sTLDR\b/, /\bBTW.+/],
    string: {
      pattern: /"(?::.|[^":])*"/,
      inside: {
        variable: /:\{[^}]+\}/,
        symbol: [
          /:\([a-f\d]+\)/i,
          /:\[[^\]]+\]/,
          /:[)>o":]/
        ]
      },
      greedy: true
    },
    number: /(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,
    symbol: {
      pattern: /(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,
      lookbehind: true,
      inside: { keyword: /A(?=\s)/ }
    },
    label: {
      pattern: /((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,
      lookbehind: true,
      alias: "string"
    },
    function: {
      pattern: /((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,
      lookbehind: true
    },
    keyword: [{
      pattern: /(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,
      lookbehind: true
    }, /'Z(?=\s|,|$)/],
    boolean: {
      pattern: /(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,
      lookbehind: true
    },
    variable: {
      pattern: /(^|\s)IT(?=\s|,|$)/,
      lookbehind: true
    },
    operator: {
      pattern: /(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,
      lookbehind: true
    },
    punctuation: /\.{3}|…|,|!/
  }, Prism$1.languages.magma = {
    output: {
      pattern: /^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,
      lookbehind: true,
      greedy: true
    },
    comment: {
      pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,
      lookbehind: true,
      greedy: true
    },
    keyword: /\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,
    boolean: /\b(?:false|true)\b/,
    generator: {
      pattern: /\b[a-z_]\w*(?=\s*<)/i,
      alias: "class-name"
    },
    function: /\b[a-z_]\w*(?=\s*\()/i,
    number: {
      pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,
      lookbehind: true
    },
    operator: /->|[-+*/^~!|#=]|:=|\.\./,
    punctuation: /[()[\]{}<>,;.:]/
  }, Prism$1.languages.makefile = {
    comment: {
      pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
      lookbehind: true
    },
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    "builtin-target": {
      pattern: /\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,
      alias: "builtin"
    },
    target: {
      pattern: /^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,
      alias: "symbol",
      inside: { variable: /\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/ }
    },
    variable: /\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,
    keyword: /-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,
    function: {
      pattern: /(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,
      lookbehind: true
    },
    operator: /(?:::|[?:+!])?=|[|@]/,
    punctuation: /[:;(){}]/
  }, function(e) {
    var t = /\bvoid\b|<org>|\b(?:complex|numeric|pointer(?:\s*\([^()]*\))?|real|string|(?:class|struct)\s+\w+|transmorphic)(?:\s*<org>)?/.source.replace(/<org>/g, /\b(?:(?:col|row)?vector|matrix|scalar)\b/.source);
    e.languages.mata = {
      comment: {
        pattern: /\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,
        greedy: true
      },
      string: {
        pattern: /"[^"\r\n]*"|[‘`']".*?"[’`']/,
        greedy: true
      },
      "class-name": {
        pattern: /(\b(?:class|extends|struct)\s+)\w+(?=\s*(?:\{|\bextends\b))/,
        lookbehind: true
      },
      type: {
        pattern: RegExp(t),
        alias: "class-name",
        inside: {
          punctuation: /[()]/,
          keyword: /\b(?:class|function|struct|void)\b/
        }
      },
      keyword: /\b(?:break|class|continue|do|else|end|extends|external|final|for|function|goto|if|pragma|private|protected|public|return|static|struct|unset|unused|version|virtual|while)\b/,
      constant: /\bNULL\b/,
      number: {
        pattern: /(^|[^\w.])(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|\d[a-f0-9]*(?:\.[a-f0-9]+)?x[+-]?\d+)i?(?![\w.])/i,
        lookbehind: true
      },
      missing: {
        pattern: /(^|[^\w.])(?:\.[a-z]?)(?![\w.])/,
        lookbehind: true,
        alias: "symbol"
      },
      function: /\b[a-z_]\w*(?=\s*\()/i,
      operator: /\.\.|\+\+|--|&&|\|\||:?(?:[!=<>]=|[+\-*/^<>&|:])|[!?=\\#’`']/,
      punctuation: /[()[\]{},;.]/
    };
  }(Prism$1), Prism$1.languages.matlab = {
    comment: [/%\{[\s\S]*?\}%/, /%.+/],
    string: {
      pattern: /\B'(?:''|[^'\r\n])*'/,
      greedy: true
    },
    number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,
    keyword: /\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,
    function: /\b(?!\d)\w+(?=\s*\()/,
    operator: /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,
    punctuation: /\.{3}|[.,;\[\](){}!]/
  }, function() {
    var e = /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i;
    Prism$1.languages.maxscript = {
      comment: {
        pattern: /\/\*[\s\S]*?(?:\*\/|$)|--.*/,
        greedy: true
      },
      string: {
        pattern: /(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,
        lookbehind: true,
        greedy: true
      },
      path: {
        pattern: /\$(?:[\w/\\.*?]|'[^']*')*/,
        greedy: true,
        alias: "string"
      },
      "function-call": {
        pattern: RegExp("((?:" + /^/.source + "|" + /[;=<>+\-*/^({\[]/.source + "|" + /\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source + ")[ \t]*)(?!" + e.source + ")" + /[a-z_]\w*\b/.source + "(?=[ \t]*(?:(?!" + e.source + ")" + /[a-z_]/.source + "|" + /\d|-\.?\d/.source + "|" + /[({'"$@#?]/.source + "))", "im"),
        lookbehind: true,
        greedy: true,
        alias: "function"
      },
      "function-definition": {
        pattern: /(\b(?:fn|function)\s+)\w+\b/i,
        lookbehind: true,
        alias: "function"
      },
      argument: {
        pattern: /\b[a-z_]\w*(?=:)/i,
        alias: "attr-name"
      },
      keyword: e,
      boolean: /\b(?:false|true)\b/,
      time: {
        pattern: /(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,
        lookbehind: true,
        alias: "number"
      },
      number: [{
        pattern: /(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,
        lookbehind: true
      }, /\b(?:e|pi)\b/],
      constant: /\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,
      color: {
        pattern: /\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,
        alias: "constant"
      },
      operator: /[-+*/<>=!]=?|[&^?]|#(?!\()/,
      punctuation: /[()\[\]{}.:,;]|#(?=\()|\\$/m
    };
  }(), Prism$1.languages.mel = {
    comment: {
      pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
      greedy: true
    },
    code: {
      pattern: /`(?:\\.|[^\\`])*`/,
      greedy: true,
      alias: "italic",
      inside: {
        delimiter: {
          pattern: /^`|`$/,
          alias: "punctuation"
        },
        statement: {
          pattern: /[\s\S]+/,
          inside: null
        }
      }
    },
    string: {
      pattern: /"(?:\\.|[^\\"\r\n])*"/,
      greedy: true
    },
    variable: /\$\w+/,
    number: /\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,
    flag: {
      pattern: /-[^\d\W]\w*/,
      alias: "operator"
    },
    keyword: /\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,
    function: {
      pattern: /((?:^|[{;])[ \t]*)[a-z_]\w*\b(?!\s*(?:\.(?!\.)|[[{=]))|\b[a-z_]\w*(?=[ \t]*\()/im,
      lookbehind: true,
      greedy: true
    },
    "tensor-punctuation": {
      pattern: /<<|>>/,
      alias: "punctuation"
    },
    operator: /\+[+=]?|-[-=]?|&&|\|\||[<>]=?|[*\/!=]=?|[%^]/,
    punctuation: /[.,:;?\[\](){}]/
  }, Prism$1.languages.mel.code.inside.statement.inside = Prism$1.languages.mel, Prism$1.languages.mermaid = {
    comment: {
      pattern: /%%.*/,
      greedy: true
    },
    style: {
      pattern: /^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,
      lookbehind: true,
      inside: {
        property: /\b\w[\w-]*(?=[ \t]*:)/,
        operator: /:/,
        punctuation: /,/
      }
    },
    "inter-arrow-label": {
      pattern: /([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,
      lookbehind: true,
      greedy: true,
      inside: {
        arrow: {
          pattern: /(?:\.+->?|--+[->]|==+[=>])$/,
          alias: "operator"
        },
        label: {
          pattern: /^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,
          lookbehind: true,
          alias: "property"
        },
        "arrow-head": {
          pattern: /^\S+/,
          alias: ["arrow", "operator"]
        }
      }
    },
    arrow: [
      {
        pattern: /(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,
        lookbehind: true,
        alias: "operator"
      },
      {
        pattern: /(^|[^<>ox.=-])(?:[<ox](?:==+|--+|-\.*-)[>ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,
        lookbehind: true,
        alias: "operator"
      },
      {
        pattern: /(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,
        lookbehind: true,
        alias: "operator"
      },
      {
        pattern: /(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,
        lookbehind: true,
        alias: "operator"
      }
    ],
    label: {
      pattern: /(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,
      lookbehind: true,
      greedy: true,
      alias: "property"
    },
    text: {
      pattern: /(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,
      alias: "string"
    },
    string: {
      pattern: /"[^"\r\n]*"/,
      greedy: true
    },
    annotation: {
      pattern: /<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,
      alias: "important"
    },
    keyword: [{
      pattern: /(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,
      lookbehind: true,
      greedy: true
    }, {
      pattern: /(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,
      lookbehind: true,
      greedy: true
    }],
    entity: /#[a-z0-9]+;/,
    operator: {
      pattern: /(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,
      lookbehind: true
    },
    punctuation: /[(){};]/
  }, Prism$1.languages.metafont = {
    comment: {
      pattern: /%.*/,
      greedy: true
    },
    string: {
      pattern: /"[^\r\n"]*"/,
      greedy: true
    },
    number: /\d*\.?\d+/,
    boolean: /\b(?:false|true)\b/,
    punctuation: [
      /[,;()]/,
      {
        pattern: /(^|[^{}])(?:\{|\})(?![{}])/,
        lookbehind: true
      },
      {
        pattern: /(^|[^[])\[(?!\[)/,
        lookbehind: true
      },
      {
        pattern: /(^|[^\]])\](?!\])/,
        lookbehind: true
      }
    ],
    constant: [
      {
        pattern: /(^|[^!?])\?\?\?(?![!?])/,
        lookbehind: true
      },
      {
        pattern: /(^|[^/*\\])(?:\\|\\\\)(?![/*\\])/,
        lookbehind: true
      },
      /\b(?:_|blankpicture|bp|cc|cm|dd|ditto|down|eps|epsilon|fullcircle|halfcircle|identity|in|infinity|left|mm|nullpen|nullpicture|origin|pc|penrazor|penspeck|pensquare|penstroke|proof|pt|quartercircle|relax|right|smoke|unitpixel|unitsquare|up)\b/
    ],
    quantity: {
      pattern: /\b(?:autorounding|blacker|boundarychar|charcode|chardp|chardx|chardy|charext|charht|charic|charwd|currentwindow|day|designsize|displaying|fillin|fontmaking|granularity|hppp|join_radius|month|o_correction|pausing|pen_(?:bot|lft|rt|top)|pixels_per_inch|proofing|showstopping|smoothing|time|tolerance|tracingcapsules|tracingchoices|tracingcommands|tracingedges|tracingequations|tracingmacros|tracingonline|tracingoutput|tracingpens|tracingrestores|tracingspecs|tracingstats|tracingtitles|turningcheck|vppp|warningcheck|xoffset|year|yoffset)\b/,
      alias: "keyword"
    },
    command: {
      pattern: /\b(?:addto|batchmode|charlist|cull|display|errhelp|errmessage|errorstopmode|everyjob|extensible|fontdimen|headerbyte|inner|interim|let|ligtable|message|newinternal|nonstopmode|numspecial|openwindow|outer|randomseed|save|scrollmode|shipout|show|showdependencies|showstats|showtoken|showvariable|special)\b/,
      alias: "builtin"
    },
    operator: [
      {
        pattern: /(^|[^>=<:|])(?:<|<=|=|=:|\|=:|\|=:>|=:\|>|=:\||\|=:\||\|=:\|>|\|=:\|>>|>|>=|:|:=|<>|::|\|\|:)(?![>=<:|])/,
        lookbehind: true
      },
      {
        pattern: /(^|[^+-])(?:\+|\+\+|-{1,3}|\+-\+)(?![+-])/,
        lookbehind: true
      },
      {
        pattern: /(^|[^/*\\])(?:\*|\*\*|\/)(?![/*\\])/,
        lookbehind: true
      },
      {
        pattern: /(^|[^.])(?:\.{2,3})(?!\.)/,
        lookbehind: true
      },
      {
        pattern: /(^|[^@#&$])&(?![@#&$])/,
        lookbehind: true
      },
      /\b(?:and|not|or)\b/
    ],
    macro: {
      pattern: /\b(?:abs|beginchar|bot|byte|capsule_def|ceiling|change_width|clear_pen_memory|clearit|clearpen|clearxy|counterclockwise|cullit|cutdraw|cutoff|decr|define_blacker_pixels|define_corrected_pixels|define_good_x_pixels|define_good_y_pixels|define_horizontal_corrected_pixels|define_pixels|define_whole_blacker_pixels|define_whole_pixels|define_whole_vertical_blacker_pixels|define_whole_vertical_pixels|dir|direction|directionpoint|div|dotprod|downto|draw|drawdot|endchar|erase|fill|filldraw|fix_units|flex|font_coding_scheme|font_extra_space|font_identifier|font_normal_shrink|font_normal_space|font_normal_stretch|font_quad|font_size|font_slant|font_x_height|gfcorners|gobble|gobbled|good\.(?:bot|lft|rt|top|x|y)|grayfont|hide|hround|imagerules|incr|interact|interpath|intersectionpoint|inverse|italcorr|killtext|labelfont|labels|lft|loggingall|lowres_fix|makegrid|makelabel(?:\.(?:bot|lft|rt|top)(?:\.nodot)?)?|max|min|mod|mode_def|mode_setup|nodisplays|notransforms|numtok|openit|penlabels|penpos|pickup|proofoffset|proofrule|proofrulethickness|range|reflectedabout|rotatedabout|rotatedaround|round|rt|savepen|screenchars|screenrule|screenstrokes|shipit|showit|slantfont|softjoin|solve|stop|superellipse|tensepath|thru|titlefont|top|tracingall|tracingnone|undraw|undrawdot|unfill|unfilldraw|upto|vround)\b/,
      alias: "function"
    },
    builtin: /\b(?:ASCII|angle|char|cosd|decimal|directiontime|floor|hex|intersectiontimes|jobname|known|length|makepath|makepen|mexp|mlog|normaldeviate|oct|odd|pencircle|penoffset|point|postcontrol|precontrol|reverse|rotated|sind|sqrt|str|subpath|substring|totalweight|turningnumber|uniformdeviate|unknown|xpart|xxpart|xypart|ypart|yxpart|yypart)\b/,
    keyword: /\b(?:also|at|atleast|begingroup|charexists|contour|controls|curl|cycle|def|delimiters|doublepath|dropping|dump|else|elseif|end|enddef|endfor|endgroup|endinput|exitif|exitunless|expandafter|fi|for|forever|forsuffixes|from|if|input|inwindow|keeping|kern|of|primarydef|quote|readstring|scaled|scantokens|secondarydef|shifted|skipto|slanted|step|tension|tertiarydef|to|transformed|until|vardef|withpen|withweight|xscaled|yscaled|zscaled)\b/,
    type: {
      pattern: /\b(?:boolean|expr|numeric|pair|path|pen|picture|primary|secondary|string|suffix|tertiary|text|transform)\b/,
      alias: "property"
    },
    variable: {
      pattern: /(^|[^@#&$])(?:@#|#@|#|@)(?![@#&$])|\b(?:aspect_ratio|currentpen|currentpicture|currenttransform|d|extra_beginchar|extra_endchar|extra_setup|h|localfont|mag|mode|screen_cols|screen_rows|w|whatever|x|y|z)\b/,
      lookbehind: true
    }
  }, Prism$1.languages.mizar = {
    comment: /::.+/,
    keyword: /@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,
    parameter: {
      pattern: /\$(?:10|\d)/,
      alias: "variable"
    },
    variable: /\b\w+(?=:)/,
    number: /(?:\b|-)\d+\b/,
    operator: /\.\.\.|->|&|\.?=/,
    punctuation: /\(#|#\)|[,:;\[\](){}]/
  }, function(e) {
    var t = "(?:" + [
      "$eq",
      "$gt",
      "$gte",
      "$in",
      "$lt",
      "$lte",
      "$ne",
      "$nin",
      "$and",
      "$not",
      "$nor",
      "$or",
      "$exists",
      "$type",
      "$expr",
      "$jsonSchema",
      "$mod",
      "$regex",
      "$text",
      "$where",
      "$geoIntersects",
      "$geoWithin",
      "$near",
      "$nearSphere",
      "$all",
      "$elemMatch",
      "$size",
      "$bitsAllClear",
      "$bitsAllSet",
      "$bitsAnyClear",
      "$bitsAnySet",
      "$comment",
      "$elemMatch",
      "$meta",
      "$slice",
      "$currentDate",
      "$inc",
      "$min",
      "$max",
      "$mul",
      "$rename",
      "$set",
      "$setOnInsert",
      "$unset",
      "$addToSet",
      "$pop",
      "$pull",
      "$push",
      "$pullAll",
      "$each",
      "$position",
      "$slice",
      "$sort",
      "$bit",
      "$addFields",
      "$bucket",
      "$bucketAuto",
      "$collStats",
      "$count",
      "$currentOp",
      "$facet",
      "$geoNear",
      "$graphLookup",
      "$group",
      "$indexStats",
      "$limit",
      "$listLocalSessions",
      "$listSessions",
      "$lookup",
      "$match",
      "$merge",
      "$out",
      "$planCacheStats",
      "$project",
      "$redact",
      "$replaceRoot",
      "$replaceWith",
      "$sample",
      "$set",
      "$skip",
      "$sort",
      "$sortByCount",
      "$unionWith",
      "$unset",
      "$unwind",
      "$setWindowFields",
      "$abs",
      "$accumulator",
      "$acos",
      "$acosh",
      "$add",
      "$addToSet",
      "$allElementsTrue",
      "$and",
      "$anyElementTrue",
      "$arrayElemAt",
      "$arrayToObject",
      "$asin",
      "$asinh",
      "$atan",
      "$atan2",
      "$atanh",
      "$avg",
      "$binarySize",
      "$bsonSize",
      "$ceil",
      "$cmp",
      "$concat",
      "$concatArrays",
      "$cond",
      "$convert",
      "$cos",
      "$dateFromParts",
      "$dateToParts",
      "$dateFromString",
      "$dateToString",
      "$dayOfMonth",
      "$dayOfWeek",
      "$dayOfYear",
      "$degreesToRadians",
      "$divide",
      "$eq",
      "$exp",
      "$filter",
      "$first",
      "$floor",
      "$function",
      "$gt",
      "$gte",
      "$hour",
      "$ifNull",
      "$in",
      "$indexOfArray",
      "$indexOfBytes",
      "$indexOfCP",
      "$isArray",
      "$isNumber",
      "$isoDayOfWeek",
      "$isoWeek",
      "$isoWeekYear",
      "$last",
      "$last",
      "$let",
      "$literal",
      "$ln",
      "$log",
      "$log10",
      "$lt",
      "$lte",
      "$ltrim",
      "$map",
      "$max",
      "$mergeObjects",
      "$meta",
      "$min",
      "$millisecond",
      "$minute",
      "$mod",
      "$month",
      "$multiply",
      "$ne",
      "$not",
      "$objectToArray",
      "$or",
      "$pow",
      "$push",
      "$radiansToDegrees",
      "$range",
      "$reduce",
      "$regexFind",
      "$regexFindAll",
      "$regexMatch",
      "$replaceOne",
      "$replaceAll",
      "$reverseArray",
      "$round",
      "$rtrim",
      "$second",
      "$setDifference",
      "$setEquals",
      "$setIntersection",
      "$setIsSubset",
      "$setUnion",
      "$size",
      "$sin",
      "$slice",
      "$split",
      "$sqrt",
      "$stdDevPop",
      "$stdDevSamp",
      "$strcasecmp",
      "$strLenBytes",
      "$strLenCP",
      "$substr",
      "$substrBytes",
      "$substrCP",
      "$subtract",
      "$sum",
      "$switch",
      "$tan",
      "$toBool",
      "$toDate",
      "$toDecimal",
      "$toDouble",
      "$toInt",
      "$toLong",
      "$toObjectId",
      "$toString",
      "$toLower",
      "$toUpper",
      "$trim",
      "$trunc",
      "$type",
      "$week",
      "$year",
      "$zip",
      "$count",
      "$dateAdd",
      "$dateDiff",
      "$dateSubtract",
      "$dateTrunc",
      "$getField",
      "$rand",
      "$sampleRate",
      "$setField",
      "$unsetField",
      "$comment",
      "$explain",
      "$hint",
      "$max",
      "$maxTimeMS",
      "$min",
      "$orderby",
      "$query",
      "$returnKey",
      "$showDiskLoc",
      "$natural"
    ].map(function(e$1) {
      return e$1.replace("$", "\\$");
    }).join("|") + ")\\b";
    e.languages.mongodb = e.languages.extend("javascript", {}), e.languages.insertBefore("mongodb", "string", { property: {
      pattern: /(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,
      greedy: true,
      inside: { keyword: RegExp(`^(['"])?` + t + "(?:\\1)?$") }
    } }), e.languages.mongodb.string.inside = {
      url: {
        pattern: /https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,
        greedy: true
      },
      entity: {
        pattern: /\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,
        greedy: true
      }
    }, e.languages.insertBefore("mongodb", "constant", { builtin: {
      pattern: RegExp("\\b(?:" + [
        "ObjectId",
        "Code",
        "BinData",
        "DBRef",
        "Timestamp",
        "NumberLong",
        "NumberDecimal",
        "MaxKey",
        "MinKey",
        "RegExp",
        "ISODate",
        "UUID"
      ].join("|") + ")\\b"),
      alias: "keyword"
    } });
  }(Prism$1), Prism$1.languages.monkey = {
    comment: {
      pattern: /^#Rem\s[\s\S]*?^#End|'.+/im,
      greedy: true
    },
    string: {
      pattern: /"[^"\r\n]*"/,
      greedy: true
    },
    preprocessor: {
      pattern: /(^[ \t]*)#.+/m,
      lookbehind: true,
      greedy: true,
      alias: "property"
    },
    function: /\b\w+(?=\()/,
    "type-char": {
      pattern: /\b[?%#$]/,
      alias: "class-name"
    },
    number: {
      pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,
      lookbehind: true
    },
    keyword: /\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,
    operator: /\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,
    punctuation: /[.,:;()\[\]]/
  }, Prism$1.languages.moonscript = {
    comment: /--.*/,
    string: [{
      pattern: /'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,
      greedy: true
    }, {
      pattern: /"[^"]*"/,
      greedy: true,
      inside: { interpolation: {
        pattern: /#\{[^{}]*\}/,
        inside: {
          moonscript: {
            pattern: /(^#\{)[\s\S]+(?=\})/,
            lookbehind: true,
            inside: null
          },
          "interpolation-punctuation": {
            pattern: /#\{|\}/,
            alias: "punctuation"
          }
        }
      } }
    }],
    "class-name": [{
      pattern: /(\b(?:class|extends)[ \t]+)\w+/,
      lookbehind: true
    }, /\b[A-Z]\w*/],
    keyword: /\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,
    variable: /@@?\w*/,
    property: {
      pattern: /\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,
      lookbehind: true
    },
    function: {
      pattern: /\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,
      inside: { punctuation: /\./ }
    },
    boolean: /\b(?:false|true)\b/,
    number: /(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,
    operator: /\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,
    punctuation: /[.,()[\]{}\\]/
  }, Prism$1.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside = Prism$1.languages.moonscript, Prism$1.languages.moon = Prism$1.languages.moonscript, Prism$1.languages.n1ql = {
    comment: {
      pattern: /\/\*[\s\S]*?(?:$|\*\/)|--.*/,
      greedy: true
    },
    string: {
      pattern: /(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,
      greedy: true
    },
    identifier: {
      pattern: /`(?:\\[\s\S]|[^\\`]|``)*`/,
      greedy: true
    },
    parameter: /\$[\w.]+/,
    keyword: /\b(?:ADVISE|ALL|ALTER|ANALYZE|AS|ASC|AT|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|COMMITTED|CONNECT|CONTINUE|CORRELATE|CORRELATED|COVER|CREATE|CURRENT|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FILTER|FLATTEN|FLUSH|FOLLOWING|FOR|FORCE|FROM|FTS|FUNCTION|GOLANG|GRANT|GROUP|GROUPS|GSI|HASH|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|ISOLATION|JAVASCRIPT|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LANGUAGE|LAST|LEFT|LET|LETTING|LEVEL|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NL|NO|NTH_VALUE|NULL|NULLS|NUMBER|OBJECT|OFFSET|ON|OPTION|OPTIONS|ORDER|OTHERS|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PRECEDING|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROBE|PROCEDURE|PUBLIC|RANGE|RAW|REALM|REDUCE|RENAME|RESPECT|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|ROW|ROWS|SATISFIES|SAVEPOINT|SCHEMA|SCOPE|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TIES|TO|TRAN|TRANSACTION|TRIGGER|TRUNCATE|UNBOUNDED|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WINDOW|WITH|WORK|XOR)\b/i,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    boolean: /\b(?:FALSE|TRUE)\b/i,
    number: /(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
    operator: /[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,
    punctuation: /[;[\](),.{}:]/
  }, Prism$1.languages["nand2tetris-hdl"] = {
    comment: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
    keyword: /\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,
    boolean: /\b(?:false|true)\b/,
    function: /\b[A-Za-z][A-Za-z0-9]*(?=\()/,
    number: /\b\d+\b/,
    operator: /=|\.\./,
    punctuation: /[{}[\];(),:]/
  }, function(e) {
    var t = /\{[^\r\n\[\]{}]*\}/, n2 = {
      "quoted-string": {
        pattern: /"(?:[^"\\]|\\.)*"/,
        alias: "operator"
      },
      "command-param-id": {
        pattern: /(\s)\w+:/,
        lookbehind: true,
        alias: "property"
      },
      "command-param-value": [
        {
          pattern: t,
          alias: "selector"
        },
        {
          pattern: /([\t ])\S+/,
          lookbehind: true,
          greedy: true,
          alias: "operator"
        },
        {
          pattern: /\S(?:.*\S)?/,
          alias: "operator"
        }
      ]
    };
    function a(e$1) {
      return typeof e$1 == "string" ? e$1 : Array.isArray(e$1) ? e$1.map(a).join("") : a(e$1.content);
    }
    e.languages.naniscript = {
      comment: {
        pattern: /^([\t ]*);.*/m,
        lookbehind: true
      },
      define: {
        pattern: /^>.+/m,
        alias: "tag",
        inside: {
          value: {
            pattern: /(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,
            lookbehind: true,
            alias: "operator"
          },
          key: {
            pattern: /(^>)\w+/,
            lookbehind: true
          }
        }
      },
      label: {
        pattern: /^([\t ]*)#[\t ]*\w+[\t ]*$/m,
        lookbehind: true,
        alias: "regex"
      },
      command: {
        pattern: /^([\t ]*)@\w+(?=[\t ]|$).*/m,
        lookbehind: true,
        alias: "function",
        inside: {
          "command-name": /^@\w+/,
          expression: {
            pattern: t,
            greedy: true,
            alias: "selector"
          },
          "command-params": {
            pattern: /\s*\S[\s\S]*/,
            inside: n2
          }
        }
      },
      "generic-text": {
        pattern: /(^[ \t]*)[^#@>;\s].*/m,
        lookbehind: true,
        alias: "punctuation",
        inside: {
          "escaped-char": /\\[{}\[\]"]/,
          expression: {
            pattern: t,
            greedy: true,
            alias: "selector"
          },
          "inline-command": {
            pattern: /\[[\t ]*\w[^\r\n\[\]]*\]/,
            greedy: true,
            alias: "function",
            inside: {
              "command-params": {
                pattern: /(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,
                lookbehind: true,
                inside: n2
              },
              "command-param-name": {
                pattern: /^(\[[\t ]*)\w+/,
                lookbehind: true,
                alias: "name"
              },
              "start-stop-char": /[\[\]]/
            }
          }
        }
      }
    }, e.languages.nani = e.languages.naniscript, e.hooks.add("after-tokenize", function(e$1) {
      e$1.tokens.forEach(function(e$2) {
        var t$1;
        typeof e$2 == "string" || e$2.type !== "generic-text" || function(e$3) {
          for (var t$2 = [], n$1 = 0;n$1 < e$3.length; n$1++) {
            var a$1 = e$3[n$1], a$1 = "[]{}".indexOf(a$1);
            if (a$1 !== -1) {
              if (a$1 % 2 == 0)
                t$2.push(a$1 + 1);
              else if (t$2.pop() !== a$1)
                return;
            }
          }
          return t$2.length === 0;
        }(t$1 = a(e$2)) || (e$2.type = "bad-line", e$2.content = t$1);
      });
    });
  }(Prism$1), Prism$1.languages.nasm = {
    comment: /;.*$/m,
    string: /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,
    label: {
      pattern: /(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,
      lookbehind: true,
      alias: "function"
    },
    keyword: [
      /\[?BITS (?:16|32|64)\]?/,
      {
        pattern: /(^\s*)section\s*[a-z.]+:?/im,
        lookbehind: true
      },
      /(?:extern|global)[^;\r\n]*/i,
      /(?:CPU|DEFAULT|FLOAT).*$/m
    ],
    register: {
      pattern: /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,
      alias: "variable"
    },
    number: /(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,
    operator: /[\[\]*+\-\/%<>=&|$!]/
  }, Prism$1.languages.neon = {
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    datetime: {
      pattern: /(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,
      lookbehind: true,
      alias: "number"
    },
    key: {
      pattern: /(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,
      lookbehind: true,
      alias: "property"
    },
    number: {
      pattern: /(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,
      lookbehind: true
    },
    boolean: {
      pattern: /(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,
      lookbehind: true
    },
    null: {
      pattern: /(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,
      lookbehind: true,
      alias: "keyword"
    },
    string: {
      pattern: /(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,
      lookbehind: true,
      greedy: true
    },
    literal: {
      pattern: /(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,
      lookbehind: true,
      alias: "string"
    },
    punctuation: /[,:=[\]{}()-]/
  }, Prism$1.languages.nevod = {
    comment: /\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,
    string: {
      pattern: /(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,
      greedy: true,
      inside: { "string-attrs": /!$|!\*$|\*$/ }
    },
    namespace: {
      pattern: /(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,
      lookbehind: true
    },
    pattern: {
      pattern: /(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,
      lookbehind: true,
      inside: {
        "pattern-name": {
          pattern: /^#?[a-zA-Z0-9\-.]+/,
          alias: "class-name"
        },
        fields: {
          pattern: /\(.*\)/,
          inside: {
            "field-name": {
              pattern: /[a-zA-Z0-9\-.]+/,
              alias: "variable"
            },
            punctuation: /[,()]/,
            operator: {
              pattern: /~/,
              alias: "field-hidden-mark"
            }
          }
        }
      }
    },
    search: {
      pattern: /(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,
      alias: "function",
      lookbehind: true
    },
    keyword: /@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,
    "standard-pattern": {
      pattern: /\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,
      inside: {
        "standard-pattern-name": {
          pattern: /^[a-zA-Z0-9\-.]+/,
          alias: "builtin"
        },
        quantifier: {
          pattern: /\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,
          alias: "number"
        },
        "standard-pattern-attr": {
          pattern: /[a-zA-Z0-9\-.]+/,
          alias: "builtin"
        },
        punctuation: /[,()]/
      }
    },
    quantifier: {
      pattern: /\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,
      alias: "number"
    },
    operator: [
      {
        pattern: /=/,
        alias: "pattern-def"
      },
      {
        pattern: /&/,
        alias: "conjunction"
      },
      {
        pattern: /~/,
        alias: "exception"
      },
      {
        pattern: /\?/,
        alias: "optionality"
      },
      {
        pattern: /[[\]]/,
        alias: "repetition"
      },
      {
        pattern: /[{}]/,
        alias: "variation"
      },
      {
        pattern: /[+_]/,
        alias: "sequence"
      },
      {
        pattern: /\.{2,3}/,
        alias: "span"
      }
    ],
    "field-capture": [{
      pattern: /([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,
      lookbehind: true,
      inside: {
        "field-name": {
          pattern: /[a-zA-Z0-9\-.]+/,
          alias: "variable"
        },
        colon: /:/
      }
    }, {
      pattern: /[a-zA-Z0-9\-.]+\s*:/,
      inside: {
        "field-name": {
          pattern: /[a-zA-Z0-9\-.]+/,
          alias: "variable"
        },
        colon: /:/
      }
    }],
    punctuation: /[:;,()]/,
    name: /[a-zA-Z0-9\-.]+/
  }, function() {
    var e = /\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;
    Prism$1.languages.nginx = {
      comment: {
        pattern: /(^|[\s{};])#.*/,
        lookbehind: true,
        greedy: true
      },
      directive: {
        pattern: /(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,
        lookbehind: true,
        greedy: true,
        inside: {
          string: {
            pattern: /((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,
            lookbehind: true,
            greedy: true,
            inside: {
              escape: {
                pattern: /\\["'\\nrt]/,
                alias: "entity"
              },
              variable: e
            }
          },
          comment: {
            pattern: /(\s)#.*/,
            lookbehind: true,
            greedy: true
          },
          keyword: {
            pattern: /^\S+/,
            greedy: true
          },
          boolean: {
            pattern: /(\s)(?:off|on)(?!\S)/,
            lookbehind: true
          },
          number: {
            pattern: /(\s)\d+[a-z]*(?!\S)/i,
            lookbehind: true
          },
          variable: e
        }
      },
      punctuation: /[{};]/
    };
  }(), Prism$1.languages.nim = {
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    string: {
      pattern: /(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,
      greedy: true
    },
    char: {
      pattern: /'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,
      greedy: true
    },
    function: {
      pattern: /(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,
      greedy: true,
      inside: { operator: /\*$/ }
    },
    identifier: {
      pattern: /`[^`\r\n]+`/,
      greedy: true,
      inside: { punctuation: /`/ }
    },
    number: /\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,
    keyword: /\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,
    operator: {
      pattern: /(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,
      lookbehind: true
    },
    punctuation: /[({\[]\.|\.[)}\]]|[`(){}\[\],:]/
  }, Prism$1.languages.nix = {
    comment: {
      pattern: /\/\*[\s\S]*?\*\/|#.*/,
      greedy: true
    },
    string: {
      pattern: /"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,
      greedy: true,
      inside: { interpolation: {
        pattern: /(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,
        lookbehind: true,
        inside: null
      } }
    },
    url: [/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/, {
      pattern: /([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,
      lookbehind: true
    }],
    antiquotation: {
      pattern: /\$(?=\{)/,
      alias: "important"
    },
    number: /\b\d+\b/,
    keyword: /\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,
    function: /\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,
    boolean: /\b(?:false|true)\b/,
    operator: /[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,
    punctuation: /[{}()[\].,:;]/
  }, Prism$1.languages.nix.string.inside.interpolation.inside = Prism$1.languages.nix, Prism$1.languages.nsis = {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    keyword: {
      pattern: /(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|KnownFolderPath|LabelAddress|TempFileName|WinVer)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|RtlLanguage|ShellVarContextAll|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Target|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,
      lookbehind: true
    },
    property: /\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,
    constant: /\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,
    variable: /\$\w[\w\.]*/,
    number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
    operator: /--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,
    punctuation: /[{}[\];(),.:]/,
    important: {
      pattern: /(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,
      lookbehind: true
    }
  }, Prism$1.languages.objectivec = Prism$1.languages.extend("c", {
    string: {
      pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
      greedy: true
    },
    keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,
    operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
  }), delete Prism$1.languages.objectivec["class-name"], Prism$1.languages.objc = Prism$1.languages.objectivec, Prism$1.languages.ocaml = {
    comment: {
      pattern: /\(\*[\s\S]*?\*\)/,
      greedy: true
    },
    char: {
      pattern: /'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,
      greedy: true
    },
    string: [{
      pattern: /"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,
      greedy: true
    }, {
      pattern: /\{([a-z_]*)\|[\s\S]*?\|\1\}/,
      greedy: true
    }],
    number: [
      /\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,
      /\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,
      /\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i
    ],
    directive: {
      pattern: /\B#\w+/,
      alias: "property"
    },
    label: {
      pattern: /\B~\w+/,
      alias: "property"
    },
    "type-variable": {
      pattern: /\B'\w+/,
      alias: "function"
    },
    variant: {
      pattern: /`\w+/,
      alias: "symbol"
    },
    keyword: /\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,
    boolean: /\b(?:false|true)\b/,
    "operator-like-punctuation": {
      pattern: /\[[<>|]|[>|]\]|\{<|>\}/,
      alias: "punctuation"
    },
    operator: /\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,
    punctuation: /;;|::|[(){}\[\].,:;#]|\b_\b/
  }, function() {
    var e = /\\(?:["'\\abefnrtv]|0[0-7]{2}|U[\dA-Fa-f]{6}|u[\dA-Fa-f]{4}|x[\dA-Fa-f]{2})/;
    Prism$1.languages.odin = {
      comment: [
        {
          pattern: /\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:\*(?!\/)|[^*])*(?:\*\/|$))*(?:\*\/|$)/,
          greedy: true
        },
        {
          pattern: /#![^\n\r]*/,
          greedy: true
        },
        {
          pattern: /\/\/[^\n\r]*/,
          greedy: true
        }
      ],
      char: {
        pattern: /'(?:\\(?:.|[0Uux][0-9A-Fa-f]{1,6})|[^\n\r'\\])'/,
        greedy: true,
        inside: { symbol: e }
      },
      string: [{
        pattern: /`[^`]*`/,
        greedy: true
      }, {
        pattern: /"(?:\\.|[^\n\r"\\])*"/,
        greedy: true,
        inside: { symbol: e }
      }],
      directive: {
        pattern: /#\w+/,
        alias: "property"
      },
      number: /\b0(?:b[01_]+|d[\d_]+|h_*(?:(?:(?:[\dA-Fa-f]_*){8}){1,2}|(?:[\dA-Fa-f]_*){4})|o[0-7_]+|x[\dA-F_a-f]+|z[\dAB_ab]+)\b|(?:\b\d+(?:\.(?!\.)\d*)?|\B\.\d+)(?:[Ee][+-]?\d*)?[ijk]?(?!\w)/,
      discard: {
        pattern: /\b_\b/,
        alias: "keyword"
      },
      "procedure-definition": {
        pattern: /\b\w+(?=[ \t]*(?::\s*){2}proc\b)/,
        alias: "function"
      },
      keyword: /\b(?:asm|auto_cast|bit_set|break|case|cast|context|continue|defer|distinct|do|dynamic|else|enum|fallthrough|for|foreign|if|import|in|map|matrix|not_in|or_else|or_return|package|proc|return|struct|switch|transmute|typeid|union|using|when|where)\b/,
      "procedure-name": {
        pattern: /\b\w+(?=[ \t]*\()/,
        alias: "function"
      },
      boolean: /\b(?:false|nil|true)\b/,
      "constant-parameter-sign": {
        pattern: /\$/,
        alias: "important"
      },
      undefined: {
        pattern: /---/,
        alias: "operator"
      },
      arrow: {
        pattern: /->/,
        alias: "punctuation"
      },
      operator: /\+\+|--|\.\.[<=]?|(?:&~|[-!*+/=~]|[%&<>|]{1,2})=?|[?^]/,
      punctuation: /[(),.:;@\[\]{}]/
    };
  }(), function(e) {
    e.languages.opencl = e.languages.extend("c", {
      keyword: /\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,
      number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,
      boolean: /\b(?:false|true)\b/,
      "constant-opencl-kernel": {
        pattern: /\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,
        alias: "constant"
      }
    }), e.languages.insertBefore("opencl", "class-name", { "builtin-type": {
      pattern: /\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,
      alias: "keyword"
    } });
    var t = {
      "type-opencl-host": {
        pattern: /\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,
        alias: "keyword"
      },
      "boolean-opencl-host": {
        pattern: /\bCL_(?:FALSE|TRUE)\b/,
        alias: "boolean"
      },
      "constant-opencl-host": {
        pattern: /\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,
        alias: "constant"
      },
      "function-opencl-host": {
        pattern: /\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,
        alias: "function"
      }
    };
    e.languages.insertBefore("c", "keyword", t), e.languages.cpp && (t["type-opencl-host-cpp"] = {
      pattern: /\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,
      alias: "keyword"
    }, e.languages.insertBefore("cpp", "keyword", t));
  }(Prism$1), Prism$1.languages.openqasm = {
    comment: /\/\*[\s\S]*?\*\/|\/\/.*/,
    string: {
      pattern: /"[^"\r\n\t]*"|'[^'\r\n\t]*'/,
      greedy: true
    },
    keyword: /\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,
    "class-name": /\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,
    function: /\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,
    constant: /\b(?:euler|pi|tau)\b|π|𝜏|ℇ/,
    number: {
      pattern: /(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,
      lookbehind: true
    },
    operator: /->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,
    punctuation: /[(){}\[\];,:.]/
  }, Prism$1.languages.qasm = Prism$1.languages.openqasm, Prism$1.languages.oz = {
    comment: {
      pattern: /\/\*[\s\S]*?\*\/|%.*/,
      greedy: true
    },
    string: {
      pattern: /"(?:[^"\\]|\\[\s\S])*"/,
      greedy: true
    },
    atom: {
      pattern: /'(?:[^'\\]|\\[\s\S])*'/,
      greedy: true,
      alias: "builtin"
    },
    keyword: /\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,
    function: [/\b[a-z][A-Za-z\d]*(?=\()/, {
      pattern: /(\{)[A-Z][A-Za-z\d]*\b/,
      lookbehind: true
    }],
    number: /\b(?:0[bx][\da-f]+|\d+(?:\.\d*)?(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,
    variable: /`(?:[^`\\]|\\.)+`/,
    "attr-name": /\b\w+(?=[ \t]*:(?![:=]))/,
    operator: /:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,
    punctuation: /[\[\](){}.:;?]/
  }, Prism$1.languages.parigp = {
    comment: /\/\*[\s\S]*?\*\/|\\\\.*/,
    string: {
      pattern: /"(?:[^"\\\r\n]|\\.)*"/,
      greedy: true
    },
    keyword: function() {
      var e = (e = [
        "breakpoint",
        "break",
        "dbg_down",
        "dbg_err",
        "dbg_up",
        "dbg_x",
        "forcomposite",
        "fordiv",
        "forell",
        "forpart",
        "forprime",
        "forstep",
        "forsubgroup",
        "forvec",
        "for",
        "iferr",
        "if",
        "local",
        "my",
        "next",
        "return",
        "until",
        "while"
      ]).map(function(e$1) {
        return e$1.split("").join(" *");
      }).join("|");
      return RegExp("\\b(?:" + e + ")\\b");
    }(),
    function: /\b\w(?:[\w ]*\w)?(?= *\()/,
    number: {
      pattern: /((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,
      lookbehind: true
    },
    operator: /\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,
    punctuation: /[\[\]{}().,:;|]/
  }, function(e) {
    var t = e.languages.parser = e.languages.extend("markup", {
      keyword: {
        pattern: /(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,
        lookbehind: true
      },
      variable: {
        pattern: /(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,
        lookbehind: true,
        inside: { punctuation: /\.|:+/ }
      },
      function: {
        pattern: /(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,
        lookbehind: true,
        inside: {
          keyword: {
            pattern: /(^@)(?:GET_|SET_)/,
            lookbehind: true
          },
          punctuation: /\.|:+/
        }
      },
      escape: {
        pattern: /\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,
        alias: "builtin"
      },
      punctuation: /[\[\](){};]/
    }), t = e.languages.insertBefore("parser", "keyword", {
      "parser-comment": {
        pattern: /(\s)#.*/,
        lookbehind: true,
        alias: "comment"
      },
      expression: {
        pattern: /(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,
        greedy: true,
        lookbehind: true,
        inside: {
          string: {
            pattern: /(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,
            lookbehind: true
          },
          keyword: t.keyword,
          variable: t.variable,
          function: t.function,
          boolean: /\b(?:false|true)\b/,
          number: /\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,
          escape: t.escape,
          operator: /[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,
          punctuation: t.punctuation
        }
      }
    });
    e.languages.insertBefore("inside", "punctuation", {
      expression: t.expression,
      keyword: t.keyword,
      variable: t.variable,
      function: t.function,
      escape: t.escape,
      "parser-punctuation": {
        pattern: t.punctuation,
        alias: "punctuation"
      }
    }, t.tag.inside["attr-value"]);
  }(Prism$1), Prism$1.languages.pascal = {
    directive: {
      pattern: /\{\$[\s\S]*?\}/,
      greedy: true,
      alias: ["marco", "property"]
    },
    comment: {
      pattern: /\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,
      greedy: true
    },
    string: {
      pattern: /(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,
      greedy: true
    },
    asm: {
      pattern: /(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,
      lookbehind: true,
      greedy: true,
      inside: null
    },
    keyword: [
      {
        pattern: /(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,
        lookbehind: true
      },
      {
        pattern: /(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,
        lookbehind: true
      },
      {
        pattern: /(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,
        lookbehind: true
      },
      {
        pattern: /(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,
        lookbehind: true
      }
    ],
    number: [/(?:[&%]\d+|\$[a-f\d]+)/i, /\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],
    operator: [/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/, {
      pattern: /(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,
      lookbehind: true
    }],
    punctuation: /\(\.|\.\)|[()\[\]:;,.]/
  }, Prism$1.languages.pascal.asm.inside = Prism$1.languages.extend("pascal", {
    asm: undefined,
    keyword: undefined,
    operator: undefined
  }), Prism$1.languages.objectpascal = Prism$1.languages.pascal, function(e) {
    var t = /\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source, n2 = /(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g, function() {
      return t;
    }), a = e.languages.pascaligo = {
      comment: /\(\*[\s\S]+?\*\)|\/\/.*/,
      string: {
        pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,
        greedy: true
      },
      "class-name": [
        {
          pattern: RegExp(/(\btype\s+\w+\s+is\s+)<type>/.source.replace(/<type>/g, function() {
            return n2;
          }), "i"),
          lookbehind: true,
          inside: null
        },
        {
          pattern: RegExp(/<type>(?=\s+is\b)/.source.replace(/<type>/g, function() {
            return n2;
          }), "i"),
          inside: null
        },
        {
          pattern: RegExp(/(:\s*)<type>/.source.replace(/<type>/g, function() {
            return n2;
          })),
          lookbehind: true,
          inside: null
        }
      ],
      keyword: {
        pattern: /(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,
        lookbehind: true
      },
      boolean: {
        pattern: /(^|[^&])\b(?:False|True)\b/i,
        lookbehind: true
      },
      builtin: {
        pattern: /(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,
        lookbehind: true
      },
      function: /\b\w+(?=\s*\()/,
      number: [/%[01]+|&[0-7]+|\$[a-f\d]+/i, /\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],
      operator: /->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,
      punctuation: /\(\.|\.\)|[()\[\]:;,.{}]/
    }, r = [
      "comment",
      "keyword",
      "builtin",
      "operator",
      "punctuation"
    ].reduce(function(e$1, t$1) {
      return e$1[t$1] = a[t$1], e$1;
    }, {});
    a["class-name"].forEach(function(e$1) {
      e$1.inside = r;
    });
  }(Prism$1), Prism$1.languages.psl = {
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    string: {
      pattern: /"(?:\\.|[^\\"])*"/,
      greedy: true,
      inside: { symbol: /\\[ntrbA-Z"\\]/ }
    },
    "heredoc-string": {
      pattern: /<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,
      alias: "string",
      greedy: true
    },
    keyword: /\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,
    constant: /\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SEP_HORIZ|R_SEP_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|VOID|WARN)\b/,
    boolean: /\b(?:FALSE|False|NO|No|TRUE|True|YES|Yes|false|no|true|yes)\b/,
    variable: /\b(?:PslDebug|errno|exit_status)\b/,
    builtin: {
      pattern: /\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,
      alias: "builtin-function"
    },
    "foreach-variable": {
      pattern: /(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,
      lookbehind: true,
      greedy: true
    },
    function: /\b[_a-z]\w*\b(?=\s*\()/i,
    number: /\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,
    operator: /--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,
    punctuation: /[(){}\[\];,]/
  }, Prism$1.languages.pcaxis = {
    string: /"[^"]*"/,
    keyword: {
      pattern: /((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,
      lookbehind: true,
      greedy: true,
      inside: {
        keyword: /^[-A-Z\d]+/,
        language: {
          pattern: /^(\s*)\[[-\w]+\]/,
          lookbehind: true,
          inside: {
            punctuation: /^\[|\]$/,
            property: /[-\w]+/
          }
        },
        "sub-key": {
          pattern: /^(\s*)\S[\s\S]*/,
          lookbehind: true,
          inside: {
            parameter: {
              pattern: /"[^"]*"/,
              alias: "property"
            },
            punctuation: /^\(|\)$|,/
          }
        }
      }
    },
    operator: /=/,
    tlist: {
      pattern: /TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,
      greedy: true,
      inside: {
        function: /^TLIST/,
        property: {
          pattern: /^(\s*\(\s*)\w+/,
          lookbehind: true
        },
        string: /"[^"]*"/,
        punctuation: /[(),]/,
        operator: /-/
      }
    },
    punctuation: /[;,]/,
    number: {
      pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/,
      lookbehind: true
    },
    boolean: /NO|YES/
  }, Prism$1.languages.px = Prism$1.languages.pcaxis, Prism$1.languages.peoplecode = {
    comment: RegExp([
      /\/\*[\s\S]*?\*\//.source,
      /\bREM[^;]*;/.source,
      /<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,
      /\/\+[\s\S]*?\+\//.source
    ].join("|")),
    string: {
      pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,
      greedy: true
    },
    variable: /%\w+/,
    "function-definition": {
      pattern: /((?:^|[^\w-])(?:function|method)\s+)\w+/i,
      lookbehind: true,
      alias: "function"
    },
    "class-name": {
      pattern: /((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,
      lookbehind: true,
      inside: { punctuation: /:/ }
    },
    keyword: /\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,
    "operator-keyword": {
      pattern: /\b(?:and|not|or)\b/i,
      alias: "operator"
    },
    function: /[_a-z]\w*(?=\s*\()/i,
    boolean: /\b(?:false|true)\b/i,
    number: /\b\d+(?:\.\d+)?\b/,
    operator: /<>|[<>]=?|!=|\*\*|[-+*/|=@]/,
    punctuation: /[:.;,()[\]]/
  }, Prism$1.languages.pcode = Prism$1.languages.peoplecode, function(e) {
    var t = /(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;
    e.languages.perl = {
      comment: [{
        pattern: /(^\s*)=\w[\s\S]*?=cut.*/m,
        lookbehind: true,
        greedy: true
      }, {
        pattern: /(^|[^\\$])#.*/,
        lookbehind: true,
        greedy: true
      }],
      string: [
        {
          pattern: RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source + "(?:" + [
            /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
            /([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,
            t
          ].join("|") + ")"),
          greedy: true
        },
        {
          pattern: /("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,
          greedy: true
        },
        {
          pattern: /'(?:[^'\\\r\n]|\\.)*'/,
          greedy: true
        }
      ],
      regex: [
        {
          pattern: RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source + "(?:" + [
            /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
            /([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,
            t
          ].join("|") + ")" + /[msixpodualngc]*/.source),
          greedy: true
        },
        {
          pattern: RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source + "(?:" + [
            /([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,
            /([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,
            t + /\s*/.source + t
          ].join("|") + ")" + /[msixpodualngcer]*/.source),
          lookbehind: true,
          greedy: true
        },
        {
          pattern: /\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,
          greedy: true
        }
      ],
      variable: [
        /[&*$@%]\{\^[A-Z]+\}/,
        /[&*$@%]\^[A-Z_]/,
        /[&*$@%]#?(?=\{)/,
        /[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,
        /[&*$@%]\d+/,
        /(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/
      ],
      filehandle: {
        pattern: /<(?![<=])\S*?>|\b_\b/,
        alias: "symbol"
      },
      "v-string": {
        pattern: /v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,
        alias: "string"
      },
      function: {
        pattern: /(\bsub[ \t]+)\w+/,
        lookbehind: true
      },
      keyword: /\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,
      number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,
      operator: /-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,
      punctuation: /[{}[\];(),:]/
    };
  }(Prism$1), function(e) {
    var t = /(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source;
    e.languages.phpdoc = e.languages.extend("javadoclike", { parameter: {
      pattern: RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:" + t + "\\s+)?)\\$\\w+"),
      lookbehind: true
    } }), e.languages.insertBefore("phpdoc", "keyword", { "class-name": [{
      pattern: RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)" + t),
      lookbehind: true,
      inside: {
        keyword: /\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,
        punctuation: /[|\\[\]()]/
      }
    }] }), e.languages.javadoclike.addSupport("php", e.languages.phpdoc);
  }(Prism$1), Prism$1.languages.insertBefore("php", "variable", {
    this: {
      pattern: /\$this\b/,
      alias: "keyword"
    },
    global: /\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,
    scope: {
      pattern: /\b[\w\\]+::/,
      inside: {
        keyword: /\b(?:parent|self|static)\b/,
        punctuation: /::|\\/
      }
    }
  }), function(e) {
    var t = /\$\w+|%[a-z]+%/, n2 = /\[[^[\]]*\]/.source, a = /(?:[drlu]|do|down|le|left|ri|right|up)/.source, a = "(?:-+" + a + "-+|\\.+" + a + "\\.+|-+(?:" + n2 + "-*)?|" + n2 + "-+|\\.+(?:" + n2 + "\\.*)?|" + n2 + "\\.+)", n2 = /(?:>{1,2}|\/{1,2}|\\{1,2}|\|>|[#*^+{xo])/.source;
    e.languages["plant-uml"] = {
      comment: {
        pattern: /(^[ \t]*)(?:'.*|\/'[\s\S]*?'\/)/m,
        lookbehind: true,
        greedy: true
      },
      preprocessor: {
        pattern: /(^[ \t]*)!.*/m,
        lookbehind: true,
        greedy: true,
        alias: "property",
        inside: { variable: t }
      },
      delimiter: {
        pattern: /(^[ \t]*)@(?:end|start)uml\b/m,
        lookbehind: true,
        greedy: true,
        alias: "punctuation"
      },
      arrow: {
        pattern: RegExp(/(^|[^-.<>?|\\[\]ox])/.source + (/[[?]?[ox]?/.source + "(?:" + a + n2 + "|" + /(?:<{1,2}|\/{1,2}|\\{1,2}|<\||[#*^+}xo])/.source + a + "(?:" + n2 + ")?)" + /[ox]?[\]?]?/.source) + /(?![-.<>?|\\\]ox])/.source),
        lookbehind: true,
        greedy: true,
        alias: "operator",
        inside: {
          expression: {
            pattern: /(\[)[^[\]]+(?=\])/,
            lookbehind: true,
            inside: null
          },
          punctuation: /\[(?=$|\])|^\]/
        }
      },
      string: {
        pattern: /"[^"]*"/,
        greedy: true
      },
      text: {
        pattern: /(\[[ \t]*[\r\n]+(?![\r\n]))[^\]]*(?=\])/,
        lookbehind: true,
        greedy: true,
        alias: "string"
      },
      keyword: [
        {
          pattern: /^([ \t]*)(?:abstract\s+class|end\s+(?:box|fork|group|merge|note|ref|split|title)|(?:fork|split)(?:\s+again)?|activate|actor|agent|alt|annotation|artifact|autoactivate|autonumber|backward|binary|boundary|box|break|caption|card|case|circle|class|clock|cloud|collections|component|concise|control|create|critical|database|deactivate|destroy|detach|diamond|else|elseif|end|end[hr]note|endif|endswitch|endwhile|entity|enum|file|folder|footer|frame|group|[hr]?note|header|hexagon|hide|if|interface|label|legend|loop|map|namespace|network|newpage|node|nwdiag|object|opt|package|page|par|participant|person|queue|rectangle|ref|remove|repeat|restore|return|robust|scale|set|show|skinparam|stack|start|state|stop|storage|switch|title|together|usecase|usecase\/|while)(?=\s|$)/m,
          lookbehind: true,
          greedy: true
        },
        /\b(?:elseif|equals|not|while)(?=\s*\()/,
        /\b(?:as|is|then)\b/
      ],
      divider: {
        pattern: /^==.+==$/m,
        greedy: true,
        alias: "important"
      },
      time: {
        pattern: /@(?:\d+(?:[:/]\d+){2}|[+-]?\d+|:[a-z]\w*(?:[+-]\d+)?)\b/i,
        greedy: true,
        alias: "number"
      },
      color: {
        pattern: /#(?:[a-z_]+|[a-fA-F0-9]+)\b/,
        alias: "symbol"
      },
      variable: t,
      punctuation: /[:,;()[\]{}]|\.{3}/
    }, e.languages["plant-uml"].arrow.inside.expression.inside = e.languages["plant-uml"], e.languages.plantuml = e.languages["plant-uml"];
  }(Prism$1), Prism$1.languages.plsql = Prism$1.languages.extend("sql", {
    comment: {
      pattern: /\/\*[\s\S]*?\*\/|--.*/,
      greedy: true
    },
    keyword: /\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,
    operator: /:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/
  }), Prism$1.languages.insertBefore("plsql", "operator", { label: {
    pattern: /<<\s*\w+\s*>>/,
    alias: "symbol"
  } }), Prism$1.languages.powerquery = {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
      lookbehind: true,
      greedy: true
    },
    "quoted-identifier": {
      pattern: /#"(?:[^"\r\n]|"")*"(?!")/,
      greedy: true
    },
    string: {
      pattern: /(?:#!)?"(?:[^"\r\n]|"")*"(?!")/,
      greedy: true
    },
    constant: [
      /\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,
      /\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,
      /\bOccurrence\.(?:All|First|Last)\b/,
      /\bOrder\.(?:Ascending|Descending)\b/,
      /\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,
      /\bMissingField\.(?:Error|Ignore|UseNull)\b/,
      /\bQuoteStyle\.(?:Csv|None)\b/,
      /\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,
      /\bGroupKind\.(?:Global|Local)\b/,
      /\bExtraValues\.(?:Error|Ignore|List)\b/,
      /\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,
      /\bJoinSide\.(?:Left|Right)\b/,
      /\bPrecision\.(?:Decimal|Double)\b/,
      /\bRelativePosition\.From(?:End|Start)\b/,
      /\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,
      /\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,
      /\bnull\b/
    ],
    boolean: /\b(?:false|true)\b/,
    keyword: /\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,
    function: {
      pattern: /(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i,
      lookbehind: true
    },
    "data-type": {
      pattern: /\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,
      alias: "class-name"
    },
    number: {
      pattern: /\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,
      lookbehind: true
    },
    operator: /[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,
    punctuation: /[,;\[\](){}]/
  }, Prism$1.languages.pq = Prism$1.languages.powerquery, Prism$1.languages.mscript = Prism$1.languages.powerquery, function() {
    var e = Prism$1.languages.powershell = {
      comment: [{
        pattern: /(^|[^`])<#[\s\S]*?#>/,
        lookbehind: true
      }, {
        pattern: /(^|[^`])#.*/,
        lookbehind: true
      }],
      string: [{
        pattern: /"(?:`[\s\S]|[^`"])*"/,
        greedy: true,
        inside: null
      }, {
        pattern: /'(?:[^']|'')*'/,
        greedy: true
      }],
      namespace: /\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,
      boolean: /\$(?:false|true)\b/i,
      variable: /\$\w+\b/,
      function: [/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i, /\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],
      keyword: /\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,
      operator: {
        pattern: /(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,
        lookbehind: true
      },
      punctuation: /[|{}[\];(),.]/
    };
    e.string[0].inside = {
      function: {
        pattern: /(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,
        lookbehind: true,
        inside: e
      },
      boolean: e.boolean,
      variable: e.variable
    };
  }(), Prism$1.languages.processing = Prism$1.languages.extend("clike", {
    keyword: /\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,
    function: /\b\w+(?=\s*\()/,
    operator: /<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/
  }), Prism$1.languages.insertBefore("processing", "number", {
    constant: /\b(?!XML\b)[A-Z][A-Z\d_]+\b/,
    type: {
      pattern: /\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,
      alias: "class-name"
    }
  }), Prism$1.languages.prolog = {
    comment: {
      pattern: /\/\*[\s\S]*?\*\/|%.*/,
      greedy: true
    },
    string: {
      pattern: /(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,
      greedy: true
    },
    builtin: /\b(?:fx|fy|xf[xy]?|yfx?)\b/,
    function: /\b[a-z]\w*(?:(?=\()|\/\d+)/,
    number: /\b\d+(?:\.\d*)?/,
    operator: /[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,
    punctuation: /[(){}\[\],]/
  }, function(e) {
    var t = [
      "on",
      "ignoring",
      "group_right",
      "group_left",
      "by",
      "without"
    ], n2 = [
      "sum",
      "min",
      "max",
      "avg",
      "group",
      "stddev",
      "stdvar",
      "count",
      "count_values",
      "bottomk",
      "topk",
      "quantile"
    ].concat(t, ["offset"]);
    e.languages.promql = {
      comment: {
        pattern: /(^[ \t]*)#.*/m,
        lookbehind: true
      },
      "vector-match": {
        pattern: /* @__PURE__ */ new RegExp("((?:" + t.join("|") + ")\\s*)\\([^)]*\\)"),
        lookbehind: true,
        inside: {
          "label-key": {
            pattern: /\b[^,]+\b/,
            alias: "attr-name"
          },
          punctuation: /[(),]/
        }
      },
      "context-labels": {
        pattern: /\{[^{}]*\}/,
        inside: {
          "label-key": {
            pattern: /\b[a-z_]\w*(?=\s*(?:=|![=~]))/,
            alias: "attr-name"
          },
          "label-value": {
            pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
            greedy: true,
            alias: "attr-value"
          },
          punctuation: /\{|\}|=~?|![=~]|,/
        }
      },
      "context-range": [{
        pattern: /\[[\w\s:]+\]/,
        inside: {
          punctuation: /\[|\]|:/,
          "range-duration": {
            pattern: /\b(?:\d+(?:[smhdwy]|ms))+\b/i,
            alias: "number"
          }
        }
      }, {
        pattern: /(\boffset\s+)\w+/,
        lookbehind: true,
        inside: { "range-duration": {
          pattern: /\b(?:\d+(?:[smhdwy]|ms))+\b/i,
          alias: "number"
        } }
      }],
      keyword: new RegExp("\\b(?:" + n2.join("|") + ")\\b", "i"),
      function: /\b[a-z_]\w*(?=\s*\()/i,
      number: /[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,
      operator: /[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,
      punctuation: /[{};()`,.[\]]/
    };
  }(Prism$1), Prism$1.languages.properties = {
    comment: /^[ \t]*[#!].*$/m,
    value: {
      pattern: /(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,
      lookbehind: true,
      alias: "attr-value"
    },
    key: {
      pattern: /^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,
      alias: "attr-name"
    },
    punctuation: /[=:]/
  }, function(e) {
    var t = /\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;
    e.languages.protobuf = e.languages.extend("clike", {
      "class-name": [{
        pattern: /(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,
        lookbehind: true
      }, {
        pattern: /(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,
        lookbehind: true
      }],
      keyword: /\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,
      function: /\b[a-z_]\w*(?=\s*\()/i
    }), e.languages.insertBefore("protobuf", "operator", {
      map: {
        pattern: /\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,
        alias: "class-name",
        inside: {
          punctuation: /[<>.,]/,
          builtin: t
        }
      },
      builtin: t,
      "positional-class-name": {
        pattern: /(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,
        alias: "class-name",
        inside: { punctuation: /\./ }
      },
      annotation: {
        pattern: /(\[\s*)[a-z_]\w*(?=\s*=)/i,
        lookbehind: true
      }
    });
  }(Prism$1), function(e) {
    var t = {
      pattern: /(\b\d+)(?:%|[a-z]+)/,
      lookbehind: true
    }, n2 = {
      pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
      lookbehind: true
    }, t = {
      comment: {
        pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
        lookbehind: true
      },
      url: {
        pattern: /\burl\((["']?).*?\1\)/i,
        greedy: true
      },
      string: {
        pattern: /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,
        greedy: true
      },
      interpolation: null,
      func: null,
      important: /\B!(?:important|optional)\b/i,
      keyword: {
        pattern: /(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,
        lookbehind: true
      },
      hexcode: /#[\da-f]{3,6}/i,
      color: [/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, {
        pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
        inside: {
          unit: t,
          number: n2,
          function: /[\w-]+(?=\()/,
          punctuation: /[(),]/
        }
      }],
      entity: /\\[\da-f]{1,8}/i,
      unit: t,
      boolean: /\b(?:false|true)\b/,
      operator: [/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],
      number: n2,
      punctuation: /[{}()\[\];:,]/
    };
    t.interpolation = {
      pattern: /\{[^\r\n}:]+\}/,
      alias: "variable",
      inside: {
        delimiter: {
          pattern: /^\{|\}$/,
          alias: "punctuation"
        },
        rest: t
      }
    }, t.func = {
      pattern: /[\w-]+\([^)]*\).*/,
      inside: {
        function: /^[^(]+/,
        rest: t
      }
    }, e.languages.stylus = {
      "atrule-declaration": {
        pattern: /(^[ \t]*)@.+/m,
        lookbehind: true,
        inside: {
          atrule: /^@[\w-]+/,
          rest: t
        }
      },
      "variable-declaration": {
        pattern: /(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,
        lookbehind: true,
        inside: {
          variable: /^\S+/,
          rest: t
        }
      },
      statement: {
        pattern: /(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,
        lookbehind: true,
        inside: {
          keyword: /^\S+/,
          rest: t
        }
      },
      "property-declaration": {
        pattern: /((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,
        lookbehind: true,
        inside: {
          property: {
            pattern: /^[^\s:]+/,
            inside: { interpolation: t.interpolation }
          },
          rest: t
        }
      },
      selector: {
        pattern: /(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,
        lookbehind: true,
        inside: {
          interpolation: t.interpolation,
          comment: t.comment,
          punctuation: /[{},]/
        }
      },
      func: t.func,
      string: t.string,
      comment: {
        pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
        lookbehind: true,
        greedy: true
      },
      interpolation: t.interpolation,
      punctuation: /[{}()\[\];:.]/
    };
  }(Prism$1), Prism$1.languages.twig = {
    comment: /^\{#[\s\S]*?#\}$/,
    "tag-name": {
      pattern: /(^\{%-?\s*)\w+/,
      lookbehind: true,
      alias: "keyword"
    },
    delimiter: {
      pattern: /^\{[{%]-?|-?[%}]\}$/,
      alias: "punctuation"
    },
    string: {
      pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
      inside: { punctuation: /^['"]|['"]$/ }
    },
    keyword: /\b(?:even|if|odd)\b/,
    boolean: /\b(?:false|null|true)\b/,
    number: /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
    operator: [{
      pattern: /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,
      lookbehind: true
    }, /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],
    punctuation: /[()\[\]{}:.,]/
  }, Prism$1.hooks.add("before-tokenize", function(e) {
    e.language === "twig" && Prism$1.languages["markup-templating"].buildPlaceholders(e, "twig", /\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g);
  }), Prism$1.hooks.add("after-tokenize", function(e) {
    Prism$1.languages["markup-templating"].tokenizePlaceholders(e, "twig");
  }), function(e) {
    e.languages.pug = {
      comment: {
        pattern: /(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,
        lookbehind: true
      },
      "multiline-script": {
        pattern: /(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
        lookbehind: true,
        inside: e.languages.javascript
      },
      filter: {
        pattern: /(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
        lookbehind: true,
        inside: {
          "filter-name": {
            pattern: /^:[\w-]+/,
            alias: "variable"
          },
          text: /\S[\s\S]*/
        }
      },
      "multiline-plain-text": {
        pattern: /(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
        lookbehind: true
      },
      markup: {
        pattern: /(^[\t ]*)<.+/m,
        lookbehind: true,
        inside: e.languages.markup
      },
      doctype: {
        pattern: /((?:^|\n)[\t ]*)doctype(?: .+)?/,
        lookbehind: true
      },
      "flow-control": {
        pattern: /(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,
        lookbehind: true,
        inside: {
          each: {
            pattern: /^each .+? in\b/,
            inside: {
              keyword: /\b(?:each|in)\b/,
              punctuation: /,/
            }
          },
          branch: {
            pattern: /^(?:case|default|else|if|unless|when|while)\b/,
            alias: "keyword"
          },
          rest: e.languages.javascript
        }
      },
      keyword: {
        pattern: /(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,
        lookbehind: true
      },
      mixin: [{
        pattern: /(^[\t ]*)mixin .+/m,
        lookbehind: true,
        inside: {
          keyword: /^mixin/,
          function: /\w+(?=\s*\(|\s*$)/,
          punctuation: /[(),.]/
        }
      }, {
        pattern: /(^[\t ]*)\+.+/m,
        lookbehind: true,
        inside: {
          name: {
            pattern: /^\+\w+/,
            alias: "function"
          },
          rest: e.languages.javascript
        }
      }],
      script: {
        pattern: /(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,
        lookbehind: true,
        inside: e.languages.javascript
      },
      "plain-text": {
        pattern: /(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,
        lookbehind: true
      },
      tag: {
        pattern: /(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,
        lookbehind: true,
        inside: {
          attributes: [{
            pattern: /&[^(]+\([^)]+\)/,
            inside: e.languages.javascript
          }, {
            pattern: /\([^)]+\)/,
            inside: {
              "attr-value": {
                pattern: /(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,
                lookbehind: true,
                inside: e.languages.javascript
              },
              "attr-name": /[\w-]+(?=\s*!?=|\s*[,)])/,
              punctuation: /[!=(),]+/
            }
          }],
          punctuation: /:/,
          "attr-id": /#[\w\-]+/,
          "attr-class": /\.[\w\-]+/
        }
      },
      code: [{
        pattern: /(^[\t ]*(?:-|!?=)).+/m,
        lookbehind: true,
        inside: e.languages.javascript
      }],
      punctuation: /[.\-!=|]+/
    };
    for (var t = /(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source, n2 = [
      {
        filter: "atpl",
        language: "twig"
      },
      {
        filter: "coffee",
        language: "coffeescript"
      },
      "ejs",
      "handlebars",
      "less",
      "livescript",
      "markdown",
      {
        filter: "sass",
        language: "scss"
      },
      "stylus"
    ], a = {}, r = 0, i = n2.length;r < i; r++) {
      var o = n2[r];
      e.languages[(o = typeof o == "string" ? {
        filter: o,
        language: o
      } : o).language] && (a["filter-" + o.filter] = {
        pattern: RegExp(t.replace("<filter_name>", function() {
          return o.filter;
        }), "m"),
        lookbehind: true,
        inside: {
          "filter-name": {
            pattern: /^:[\w-]+/,
            alias: "variable"
          },
          text: {
            pattern: /\S[\s\S]*/,
            alias: [o.language, "language-" + o.language],
            inside: e.languages[o.language]
          }
        }
      });
    }
    e.languages.insertBefore("pug", "filter", a);
  }(Prism$1), function(e) {
    e.languages.puppet = {
      heredoc: [
        {
          pattern: /(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,
          lookbehind: true,
          alias: "string",
          inside: { punctuation: /(?=\S).*\S(?= *$)/ }
        },
        {
          pattern: /(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,
          lookbehind: true,
          greedy: true,
          alias: "string",
          inside: { punctuation: /(?=\S).*\S(?= *$)/ }
        },
        {
          pattern: /@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,
          alias: "string",
          inside: { punctuation: {
            pattern: /(\().+?(?=\))/,
            lookbehind: true
          } }
        }
      ],
      "multiline-comment": {
        pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
        lookbehind: true,
        greedy: true,
        alias: "comment"
      },
      regex: {
        pattern: /((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,
        lookbehind: true,
        greedy: true,
        inside: { "extended-regex": {
          pattern: /^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,
          inside: { comment: /#.*/ }
        } }
      },
      comment: {
        pattern: /(^|[^\\])#.*/,
        lookbehind: true,
        greedy: true
      },
      string: {
        pattern: /(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,
        greedy: true,
        inside: { "double-quoted": {
          pattern: /^"[\s\S]*"$/,
          inside: {}
        } }
      },
      variable: {
        pattern: /\$(?:::)?\w+(?:::\w+)*/,
        inside: { punctuation: /::/ }
      },
      "attr-name": /(?:\b\w+|\*)(?=\s*=>)/,
      function: [{
        pattern: /(\.)(?!\d)\w+/,
        lookbehind: true
      }, /\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],
      number: /\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,
      boolean: /\b(?:false|true)\b/,
      keyword: /\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,
      datatype: {
        pattern: /\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,
        alias: "symbol"
      },
      operator: /=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,
      punctuation: /[\[\]{}().,;]|:+/
    };
    var t = [{
      pattern: /(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,
      lookbehind: true,
      inside: {
        "short-variable": {
          pattern: /(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,
          lookbehind: true,
          alias: "variable",
          inside: { punctuation: /::/ }
        },
        delimiter: {
          pattern: /^\$/,
          alias: "variable"
        },
        rest: e.languages.puppet
      }
    }, {
      pattern: /(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,
      lookbehind: true,
      alias: "variable",
      inside: { punctuation: /::/ }
    }];
    e.languages.puppet.heredoc[0].inside.interpolation = t, e.languages.puppet.string.inside["double-quoted"].inside.interpolation = t;
  }(Prism$1), function(a) {
    a.languages.pure = {
      comment: [
        {
          pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
          lookbehind: true
        },
        {
          pattern: /(^|[^\\:])\/\/.*/,
          lookbehind: true
        },
        /#!.+/
      ],
      "inline-lang": {
        pattern: /%<[\s\S]+?%>/,
        greedy: true,
        inside: {
          lang: {
            pattern: /(^%< *)-\*-.+?-\*-/,
            lookbehind: true,
            alias: "comment"
          },
          delimiter: {
            pattern: /^%<.*|%>$/,
            alias: "punctuation"
          }
        }
      },
      string: {
        pattern: /"(?:\\.|[^"\\\r\n])*"/,
        greedy: true
      },
      number: {
        pattern: /((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,
        lookbehind: true
      },
      keyword: /\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,
      function: /\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,
      special: {
        pattern: /\b__[a-z]+__\b/i,
        alias: "builtin"
      },
      operator: /(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,
      punctuation: /[(){}\[\];,|]/
    };
    var r = /%< *-\*- *<lang>\d* *-\*-[\s\S]+?%>/.source;
    [
      "c",
      {
        lang: "c++",
        alias: "cpp"
      },
      "fortran"
    ].forEach(function(e) {
      var t, n2 = e;
      typeof e != "string" && (n2 = e.alias, e = e.lang), a.languages[n2] && ((t = {})["inline-lang-" + n2] = {
        pattern: RegExp(r.replace("<lang>", e.replace(/([.+*?\/\\(){}\[\]])/g, "\\$1")), "i"),
        inside: a.util.clone(a.languages.pure["inline-lang"].inside)
      }, t["inline-lang-" + n2].inside.rest = a.util.clone(a.languages[n2]), a.languages.insertBefore("pure", "inline-lang", t));
    }), a.languages.c && (a.languages.pure["inline-lang"].inside.rest = a.util.clone(a.languages.c));
  }(Prism$1), Prism$1.languages.purebasic = Prism$1.languages.extend("clike", {
    comment: /;.*/,
    keyword: /\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,
    function: /\b\w+(?:\.\w+)?\s*(?=\()/,
    number: /(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,
    operator: /(?:@\*?|\?|\*)\w+\$?|-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*/@]/
  }), Prism$1.languages.insertBefore("purebasic", "keyword", {
    tag: /#\w+\$?/,
    asm: {
      pattern: /(^[\t ]*)!.*/m,
      lookbehind: true,
      alias: "tag",
      inside: {
        comment: /;.*/,
        string: {
          pattern: /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,
          greedy: true
        },
        "label-reference-anonymous": {
          pattern: /(!\s*j[a-z]+\s+)@[fb]/i,
          lookbehind: true,
          alias: "fasm-label"
        },
        "label-reference-addressed": {
          pattern: /(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,
          lookbehind: true,
          alias: "fasm-label"
        },
        keyword: [/\b(?:extern|global)\b[^;\r\n]*/i, /\b(?:CPU|DEFAULT|FLOAT)\b.*/],
        function: {
          pattern: /^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,
          lookbehind: true
        },
        "function-inline": {
          pattern: /(:\s*)[\da-z]+(?=\s)/i,
          lookbehind: true,
          alias: "function"
        },
        label: {
          pattern: /^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,
          lookbehind: true,
          alias: "fasm-label"
        },
        register: /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,
        number: /(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,
        operator: /[\[\]*+\-/%<>=&|$!,.:]/
      }
    }
  }), delete Prism$1.languages.purebasic["class-name"], delete Prism$1.languages.purebasic.boolean, Prism$1.languages.pbfasm = Prism$1.languages.purebasic, Prism$1.languages.purescript = Prism$1.languages.extend("haskell", {
    keyword: /\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,
    "import-statement": {
      pattern: /(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,
      lookbehind: true,
      inside: {
        keyword: /\b(?:as|hiding|import)\b/,
        punctuation: /\./
      }
    },
    builtin: /\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,
    operator: [
      Prism$1.languages.haskell.operator[0],
      Prism$1.languages.haskell.operator[2],
      /[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/
    ]
  }), Prism$1.languages.purs = Prism$1.languages.purescript, Prism$1.languages.python = {
    comment: {
      pattern: /(^|[^\\])#.*/,
      lookbehind: true,
      greedy: true
    },
    "string-interpolation": {
      pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
          lookbehind: true,
          inside: {
            "format-spec": {
              pattern: /(:)[^:(){}]+(?=\}$)/,
              lookbehind: true
            },
            "conversion-option": {
              pattern: /![sra](?=[:}]$)/,
              alias: "punctuation"
            },
            rest: null
          }
        },
        string: /[\s\S]+/
      }
    },
    "triple-quoted-string": {
      pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
      greedy: true,
      alias: "string"
    },
    string: {
      pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
      greedy: true
    },
    function: {
      pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
      lookbehind: true
    },
    "class-name": {
      pattern: /(\bclass\s+)\w+/i,
      lookbehind: true
    },
    decorator: {
      pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
      lookbehind: true,
      alias: ["annotation", "punctuation"],
      inside: { punctuation: /\./ }
    },
    keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
    builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
    boolean: /\b(?:False|None|True)\b/,
    number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
    operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism$1.languages.python, Prism$1.languages.py = Prism$1.languages.python, function(e) {
    function a(e$1, n$1) {
      return e$1.replace(/<<(\d+)>>/g, function(e$2, t$1) {
        return "(?:" + n$1[+t$1] + ")";
      });
    }
    function t(e$1, t$1, n$1) {
      return RegExp(a(e$1, t$1), n$1 || "");
    }
    var n2 = RegExp("\\b(?:" + "Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within".trim().replace(/ /g, "|") + ")\\b"), r = a(/<<0>>(?:\s*\.\s*<<0>>)*/.source, [/\b[A-Za-z_]\w*\b/.source]), i = {
      keyword: n2,
      punctuation: /[<>()?,.:[\]]/
    }, o = /"(?:\\.|[^\\"])*"/.source, r = (e.languages.qsharp = e.languages.extend("clike", {
      comment: /\/\/.*/,
      string: [{
        pattern: t(/(^|[^$\\])<<0>>/.source, [o]),
        lookbehind: true,
        greedy: true
      }],
      "class-name": [{
        pattern: t(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source, [r]),
        lookbehind: true,
        inside: i
      }, {
        pattern: t(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source, [r]),
        lookbehind: true,
        inside: i
      }],
      keyword: n2,
      number: /(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,
      operator: /\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,
      punctuation: /::|[{}[\];(),.:]/
    }), e.languages.insertBefore("qsharp", "number", { range: {
      pattern: /\.\./,
      alias: "operator"
    } }), function(e$1, t$1) {
      for (var n$1 = 0;n$1 < t$1; n$1++)
        e$1 = e$1.replace(/<<self>>/g, function() {
          return "(?:" + e$1 + ")";
        });
      return e$1.replace(/<<self>>/g, "[^\\s\\S]");
    }(a(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source, [o]), 2));
    e.languages.insertBefore("qsharp", "string", { "interpolation-string": {
      pattern: t(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source, [r]),
      greedy: true,
      inside: {
        interpolation: {
          pattern: t(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source, [r]),
          lookbehind: true,
          inside: {
            punctuation: /^\{|\}$/,
            expression: {
              pattern: /[\s\S]+/,
              alias: "language-qsharp",
              inside: e.languages.qsharp
            }
          }
        },
        string: /[\s\S]+/
      }
    } });
  }(Prism$1), Prism$1.languages.qs = Prism$1.languages.qsharp, Prism$1.languages.q = {
    string: /"(?:\\.|[^"\\\r\n])*"/,
    comment: [
      {
        pattern: /([\t )\]}])\/.*/,
        lookbehind: true,
        greedy: true
      },
      {
        pattern: /(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,
        lookbehind: true,
        greedy: true
      },
      {
        pattern: /^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,
        greedy: true
      },
      {
        pattern: /^#!.+/m,
        greedy: true
      }
    ],
    symbol: /`(?::\S+|[\w.]*)/,
    datetime: {
      pattern: /0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,
      alias: "number"
    },
    number: /\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,
    keyword: /\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,
    adverb: {
      pattern: /['\/\\]:?|\beach\b/,
      alias: "function"
    },
    verb: {
      pattern: /(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,
      alias: "operator"
    },
    punctuation: /[(){}\[\];.]/
  }, function(e) {
    for (var t = /"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source, n2 = /\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source, a = /(?:[^\\()[\]{}"'/]|<string>|\/(?![*/])|<comment>|\(<expr>*\)|\[<expr>*\]|\{<expr>*\}|\\[\s\S])/.source.replace(/<string>/g, function() {
      return t;
    }).replace(/<comment>/g, function() {
      return n2;
    }), r = 0;r < 2; r++)
      a = a.replace(/<expr>/g, function() {
        return a;
      });
    a = a.replace(/<expr>/g, "[^\\s\\S]"), e.languages.qml = {
      comment: {
        pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
        greedy: true
      },
      "javascript-function": {
        pattern: RegExp(/((?:^|;)[ \t]*)function\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*\(<js>*\)\s*\{<js>*\}/.source.replace(/<js>/g, function() {
          return a;
        }), "m"),
        lookbehind: true,
        greedy: true,
        alias: "language-javascript",
        inside: e.languages.javascript
      },
      "class-name": {
        pattern: /((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,
        lookbehind: true
      },
      property: [{
        pattern: /((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,
        lookbehind: true
      }, {
        pattern: /((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,
        lookbehind: true,
        inside: {
          keyword: /^property/,
          property: /\w+(?:\.\w+)*/
        }
      }],
      "javascript-expression": {
        pattern: RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}])<js>)+/.source.replace(/<js>/g, function() {
          return a;
        }), "m"),
        lookbehind: true,
        greedy: true,
        alias: "language-javascript",
        inside: e.languages.javascript
      },
      string: {
        pattern: /"(?:\\.|[^\\"\r\n])*"/,
        greedy: true
      },
      keyword: /\b(?:as|import|on)\b/,
      punctuation: /[{}[\]:;,]/
    };
  }(Prism$1), Prism$1.languages.qore = Prism$1.languages.extend("clike", {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,
      lookbehind: true
    },
    string: {
      pattern: /("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,
      greedy: true
    },
    keyword: /\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,
    boolean: /\b(?:false|true)\b/i,
    function: /\$?\b(?!\d)\w+(?=\()/,
    number: /\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,
    operator: {
      pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,
      lookbehind: true
    },
    variable: /\$(?!\d)\w+\b/
  }), Prism$1.languages.r = {
    comment: /#.*/,
    string: {
      pattern: /(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    "percent-operator": {
      pattern: /%[^%\s]*%/,
      alias: "operator"
    },
    boolean: /\b(?:FALSE|TRUE)\b/,
    ellipsis: /\.\.(?:\.|\d+)/,
    number: [/\b(?:Inf|NaN)\b/, /(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],
    keyword: /\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,
    operator: /->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,
    punctuation: /[(){}\[\],;]/
  }, Prism$1.languages.racket = Prism$1.languages.extend("scheme", { "lambda-parameter": {
    pattern: /([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,
    lookbehind: true
  } }), Prism$1.languages.insertBefore("racket", "string", { lang: {
    pattern: /^#lang.+/m,
    greedy: true,
    alias: "keyword"
  } }), Prism$1.languages.rkt = Prism$1.languages.racket, function(e) {
    var a = /\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source, r = /@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source + "|" + /'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;
    function t(e$1, t$1) {
      for (var n$1 = 0;n$1 < t$1; n$1++)
        e$1 = e$1.replace(/<self>/g, function() {
          return "(?:" + e$1 + ")";
        });
      return e$1.replace(/<self>/g, "[^\\s\\S]").replace(/<str>/g, "(?:" + r + ")").replace(/<comment>/g, "(?:" + a + ")");
    }
    var n2 = t(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2), i = t(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 1), o = t(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2), s = t(/<(?:[^<>'"@/]|<comment>|<self>)*>/.source, 1), s = /@/.source + /(?:await\b\s*)?/.source + "(?:" + /(?!await\b)\w+\b/.source + "|" + n2 + ")(?:" + /[?!]?\.\w+\b/.source + "|(?:" + s + ")?" + n2 + "|" + i + ")*" + /(?![?!\.(\[]|<(?!\/))/.source, i = "(?:" + /"[^"@]*"|'[^'@]*'|[^\s'"@>=]+(?=[\s>])/.source + `|["'][^"'@]*(?:(?:` + (/@(?![\w()])/.source + "|" + s) + `)[^"'@]*)+["'])`, l = /(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*<tagAttrValue>|(?=[\s/>])))+)?/.source.replace(/<tagAttrValue>/, i), d2 = /(?!\d)[^\s>\/=$<%]+/.source + l + /\s*\/?>/.source, l = /\B@?/.source + "(?:" + /<([a-zA-Z][\w:]*)/.source + l + /\s*>/.source + "(?:" + /[^<]/.source + "|" + /<\/?(?!\1\b)/.source + d2 + "|" + t(/<\1/.source + l + /\s*>/.source + "(?:" + /[^<]/.source + "|" + /<\/?(?!\1\b)/.source + d2 + "|<self>)*" + /<\/\1\s*>/.source, 2) + ")*" + /<\/\1\s*>/.source + "|" + /</.source + d2 + ")";
    e.languages.cshtml = e.languages.extend("markup", {});
    l = {
      pattern: /\S[\s\S]*/,
      alias: "language-csharp",
      inside: e.languages.insertBefore("csharp", "string", { html: {
        pattern: RegExp(l),
        greedy: true,
        inside: e.languages.cshtml
      } }, { csharp: e.languages.extend("csharp", {}) })
    }, s = {
      pattern: RegExp(/(^|[^@])/.source + s),
      lookbehind: true,
      greedy: true,
      alias: "variable",
      inside: {
        keyword: /^@/,
        csharp: l
      }
    };
    e.languages.cshtml.tag.pattern = RegExp(/<\/?/.source + d2), e.languages.cshtml.tag.inside["attr-value"].pattern = RegExp(/=\s*/.source + i), e.languages.insertBefore("inside", "punctuation", { value: s }, e.languages.cshtml.tag.inside["attr-value"]), e.languages.insertBefore("cshtml", "prolog", {
      "razor-comment": {
        pattern: /@\*[\s\S]*?\*@/,
        greedy: true,
        alias: "comment"
      },
      block: {
        pattern: RegExp(/(^|[^@])@/.source + "(?:" + [
          o,
          /(?:code|functions)\s*/.source + o,
          /(?:for|foreach|lock|switch|using|while)\s*/.source + n2 + /\s*/.source + o,
          /do\s*/.source + o + /\s*while\s*/.source + n2 + /(?:\s*;)?/.source,
          /try\s*/.source + o + /\s*catch\s*/.source + n2 + /\s*/.source + o + /\s*finally\s*/.source + o,
          /if\s*/.source + n2 + /\s*/.source + o + "(?:" + /\s*else/.source + "(?:" + /\s+if\s*/.source + n2 + ")?" + /\s*/.source + o + ")*",
          /helper\s+\w+\s*/.source + n2 + /\s*/.source + o
        ].join("|") + ")"),
        lookbehind: true,
        greedy: true,
        inside: {
          keyword: /^@\w*/,
          csharp: l
        }
      },
      directive: {
        pattern: /^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,
        lookbehind: true,
        greedy: true,
        inside: {
          keyword: /^@\w+/,
          csharp: l
        }
      },
      value: s,
      "delegate-operator": {
        pattern: /(^|[^@])@(?=<)/,
        lookbehind: true,
        alias: "operator"
      }
    }), e.languages.razor = e.languages.cshtml;
  }(Prism$1), function(i) {
    var e = i.util.clone(i.languages.javascript), n2 = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, a = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, r = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
    function t(e$1, t$1) {
      return e$1 = e$1.replace(/<S>/g, function() {
        return n2;
      }).replace(/<BRACES>/g, function() {
        return a;
      }).replace(/<SPREAD>/g, function() {
        return r;
      }), RegExp(e$1, t$1);
    }
    r = t(r).source, i.languages.jsx = i.languages.extend("markup", e), i.languages.jsx.tag.pattern = t(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source), i.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, i.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, i.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, i.languages.jsx.tag.inside.comment = e.comment, i.languages.insertBefore("inside", "attr-name", { spread: {
      pattern: t(/<SPREAD>/.source),
      inside: i.languages.jsx
    } }, i.languages.jsx.tag), i.languages.insertBefore("inside", "special-attr", { script: {
      pattern: t(/=<BRACES>/.source),
      alias: "language-javascript",
      inside: {
        "script-punctuation": {
          pattern: /^=(?=\{)/,
          alias: "punctuation"
        },
        rest: i.languages.jsx
      }
    } }, i.languages.jsx.tag);
    function o(e$1) {
      for (var t$1 = [], n$1 = 0;n$1 < e$1.length; n$1++) {
        var a$1 = e$1[n$1], r$1 = false;
        typeof a$1 != "string" && (a$1.type === "tag" && a$1.content[0] && a$1.content[0].type === "tag" ? a$1.content[0].content[0].content === "</" ? 0 < t$1.length && t$1[t$1.length - 1].tagName === s(a$1.content[0].content[1]) && t$1.pop() : a$1.content[a$1.content.length - 1].content !== "/>" && t$1.push({
          tagName: s(a$1.content[0].content[1]),
          openedBraces: 0
        }) : 0 < t$1.length && a$1.type === "punctuation" && a$1.content === "{" ? t$1[t$1.length - 1].openedBraces++ : 0 < t$1.length && 0 < t$1[t$1.length - 1].openedBraces && a$1.type === "punctuation" && a$1.content === "}" ? t$1[t$1.length - 1].openedBraces-- : r$1 = true), (r$1 || typeof a$1 == "string") && 0 < t$1.length && t$1[t$1.length - 1].openedBraces === 0 && (r$1 = s(a$1), n$1 < e$1.length - 1 && (typeof e$1[n$1 + 1] == "string" || e$1[n$1 + 1].type === "plain-text") && (r$1 += s(e$1[n$1 + 1]), e$1.splice(n$1 + 1, 1)), 0 < n$1 && (typeof e$1[n$1 - 1] == "string" || e$1[n$1 - 1].type === "plain-text") && (r$1 = s(e$1[n$1 - 1]) + r$1, e$1.splice(n$1 - 1, 1), n$1--), e$1[n$1] = new i.Token("plain-text", r$1, null, r$1)), a$1.content && typeof a$1.content != "string" && o(a$1.content);
      }
    }
    var s = function(e$1) {
      return e$1 ? typeof e$1 == "string" ? e$1 : typeof e$1.content == "string" ? e$1.content : e$1.content.map(s).join("") : "";
    };
    i.hooks.add("after-tokenize", function(e$1) {
      e$1.language !== "jsx" && e$1.language !== "tsx" || o(e$1.tokens);
    });
  }(Prism$1), function(e) {
    var t = e.util.clone(e.languages.typescript), t = (e.languages.tsx = e.languages.extend("jsx", t), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"], e.languages.tsx.tag);
    t.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + t.pattern.source + ")", t.pattern.flags), t.lookbehind = true;
  }(Prism$1), Prism$1.languages.reason = Prism$1.languages.extend("clike", {
    string: {
      pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
      greedy: true
    },
    "class-name": /\b[A-Z]\w*/,
    keyword: /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,
    operator: /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/
  }), Prism$1.languages.insertBefore("reason", "class-name", {
    char: {
      pattern: /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,
      greedy: true
    },
    constructor: /\b[A-Z]\w*\b(?!\s*\.)/,
    label: {
      pattern: /\b[a-z]\w*(?=::)/,
      alias: "symbol"
    }
  }), delete Prism$1.languages.reason.function, Prism$1.languages.rego = {
    comment: /#.*/,
    property: {
      pattern: /(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i,
      lookbehind: true,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/,
      lookbehind: true,
      greedy: true
    },
    keyword: /\b(?:as|default|else|import|not|null|package|set(?=\s*\()|some|with)\b/,
    boolean: /\b(?:false|true)\b/,
    function: {
      pattern: /\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,
      inside: {
        namespace: /\b\w+\b(?=\s*\.)/,
        punctuation: /\./
      }
    },
    number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
    operator: /[-+*/%|&]|[<>:=]=?|!=|\b_\b/,
    punctuation: /[,;.\[\]{}()]/
  }, Prism$1.languages.renpy = {
    comment: {
      pattern: /(^|[^\\])#.+/,
      lookbehind: true
    },
    string: {
      pattern: /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,
      greedy: true
    },
    function: /\b[a-z_]\w*(?=\()/i,
    property: /\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,
    tag: /\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,
    keyword: /\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,
    boolean: /\b(?:[Ff]alse|[Tt]rue)\b/,
    number: /(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,
    operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.rpy = Prism$1.languages.renpy, Prism$1.languages.rescript = {
    comment: {
      pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
      greedy: true
    },
    char: {
      pattern: /'(?:[^\r\n\\]|\\(?:.|\w+))'/,
      greedy: true
    },
    string: {
      pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
      greedy: true
    },
    "class-name": /\b[A-Z]\w*|@[a-z.]*|#[A-Za-z]\w*|#\d/,
    function: {
      pattern: /[a-zA-Z]\w*(?=\()|(\.)[a-z]\w*/,
      lookbehind: true
    },
    number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
    boolean: /\b(?:false|true)\b/,
    "attr-value": /[A-Za-z]\w*(?==)/,
    constant: {
      pattern: /(\btype\s+)[a-z]\w*/,
      lookbehind: true
    },
    tag: {
      pattern: /(<)[a-z]\w*|(?:<\/)[a-z]\w*/,
      lookbehind: true,
      inside: { operator: /<|>|\// }
    },
    keyword: /\b(?:and|as|assert|begin|bool|class|constraint|do|done|downto|else|end|exception|external|float|for|fun|function|if|in|include|inherit|initializer|int|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|string|switch|then|to|try|type|when|while|with)\b/,
    operator: /\.{3}|:[:=]?|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/,
    punctuation: /[(){}[\],;.]/
  }, Prism$1.languages.insertBefore("rescript", "string", { "template-string": {
    pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
    greedy: true,
    inside: {
      "template-punctuation": {
        pattern: /^`|`$/,
        alias: "string"
      },
      interpolation: {
        pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
        lookbehind: true,
        inside: {
          "interpolation-punctuation": {
            pattern: /^\$\{|\}$/,
            alias: "tag"
          },
          rest: Prism$1.languages.rescript
        }
      },
      string: /[\s\S]+/
    }
  } }), Prism$1.languages.res = Prism$1.languages.rescript, Prism$1.languages.rest = {
    table: [{
      pattern: /(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,
      lookbehind: true,
      inside: { punctuation: /\||(?:\+[=-]+)+\+/ }
    }, {
      pattern: /(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,
      lookbehind: true,
      inside: { punctuation: /[=-]+/ }
    }],
    "substitution-def": {
      pattern: /(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,
      lookbehind: true,
      inside: {
        substitution: {
          pattern: /^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,
          alias: "attr-value",
          inside: { punctuation: /^\||\|$/ }
        },
        directive: {
          pattern: /( )(?! )[^:]+::/,
          lookbehind: true,
          alias: "function",
          inside: { punctuation: /::$/ }
        }
      }
    },
    "link-target": [{
      pattern: /(^[\t ]*\.\. )\[[^\]]+\]/m,
      lookbehind: true,
      alias: "string",
      inside: { punctuation: /^\[|\]$/ }
    }, {
      pattern: /(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,
      lookbehind: true,
      alias: "string",
      inside: { punctuation: /^_|:$/ }
    }],
    directive: {
      pattern: /(^[\t ]*\.\. )[^:]+::/m,
      lookbehind: true,
      alias: "function",
      inside: { punctuation: /::$/ }
    },
    comment: {
      pattern: /(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,
      lookbehind: true
    },
    title: [{
      pattern: /^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,
      inside: {
        punctuation: /^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
        important: /.+/
      }
    }, {
      pattern: /(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,
      lookbehind: true,
      inside: {
        punctuation: /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
        important: /.+/
      }
    }],
    hr: {
      pattern: /((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,
      lookbehind: true,
      alias: "punctuation"
    },
    field: {
      pattern: /(^[\t ]*):[^:\r\n]+:(?= )/m,
      lookbehind: true,
      alias: "attr-name"
    },
    "command-line-option": {
      pattern: /(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,
      lookbehind: true,
      alias: "symbol"
    },
    "literal-block": {
      pattern: /::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,
      inside: { "literal-block-punctuation": {
        pattern: /^::/,
        alias: "punctuation"
      } }
    },
    "quoted-literal-block": {
      pattern: /::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,
      inside: { "literal-block-punctuation": {
        pattern: /^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,
        alias: "punctuation"
      } }
    },
    "list-bullet": {
      pattern: /(^[\t ]*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,
      lookbehind: true,
      alias: "punctuation"
    },
    "doctest-block": {
      pattern: /(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,
      lookbehind: true,
      inside: { punctuation: /^>>>/ }
    },
    inline: [{
      pattern: /(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,
      lookbehind: true,
      inside: {
        bold: {
          pattern: /(^\*\*).+(?=\*\*$)/,
          lookbehind: true
        },
        italic: {
          pattern: /(^\*).+(?=\*$)/,
          lookbehind: true
        },
        "inline-literal": {
          pattern: /(^``).+(?=``$)/,
          lookbehind: true,
          alias: "symbol"
        },
        role: {
          pattern: /^:[^:]+:|:[^:]+:$/,
          alias: "function",
          inside: { punctuation: /^:|:$/ }
        },
        "interpreted-text": {
          pattern: /(^`).+(?=`$)/,
          lookbehind: true,
          alias: "attr-value"
        },
        substitution: {
          pattern: /(^\|).+(?=\|$)/,
          lookbehind: true,
          alias: "attr-value"
        },
        punctuation: /\*\*?|``?|\|/
      }
    }],
    link: [{
      pattern: /\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,
      alias: "string",
      inside: { punctuation: /^\[|\]_$/ }
    }, {
      pattern: /(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,
      alias: "string",
      inside: { punctuation: /^_?`|`$|`?_?_$/ }
    }],
    punctuation: {
      pattern: /(^[\t ]*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,
      lookbehind: true
    }
  }, Prism$1.languages.rip = {
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    char: {
      pattern: /\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,
      greedy: true
    },
    string: {
      pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    regex: {
      pattern: /(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,
      lookbehind: true,
      greedy: true
    },
    keyword: /(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,
    builtin: /@|\bSystem\b/,
    boolean: /\b(?:false|true)\b/,
    date: /\b\d{4}-\d{2}-\d{2}\b/,
    time: /\b\d{2}:\d{2}:\d{2}\b/,
    datetime: /\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,
    symbol: /:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,
    number: /[+-]?\b(?:\d+\.\d+|\d+)\b/,
    punctuation: /(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,
    reference: /[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/
  }, Prism$1.languages.roboconf = {
    comment: /#.*/,
    keyword: {
      pattern: /(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,
      lookbehind: true
    },
    component: {
      pattern: /[\w-]+(?=[ \t]*\{)/,
      alias: "variable"
    },
    property: /[\w.-]+(?=[ \t]*:)/,
    value: {
      pattern: /(=[ \t]*(?![ \t]))[^,;]+/,
      lookbehind: true,
      alias: "attr-value"
    },
    optional: {
      pattern: /\(optional\)/,
      alias: "builtin"
    },
    wildcard: {
      pattern: /(\.)\*/,
      lookbehind: true,
      alias: "operator"
    },
    punctuation: /[{},.;:=]/
  }, function(e) {
    var r = {
      pattern: /(^[ \t]*| {2}|\t)#.*/m,
      lookbehind: true,
      greedy: true
    }, i = {
      pattern: /((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,
      lookbehind: true,
      inside: { punctuation: /^[$@&%]\{|\}$/ }
    };
    function t(e$1, t$1) {
      var n$1, a$1 = { "section-header": {
        pattern: /^ ?\*{3}.+?\*{3}/,
        alias: "keyword"
      } };
      for (n$1 in t$1)
        a$1[n$1] = t$1[n$1];
      return a$1.tag = {
        pattern: /([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,
        lookbehind: true,
        inside: { punctuation: /\[|\]/ }
      }, a$1.variable = i, a$1.comment = r, {
        pattern: RegExp(/^ ?\*{3}[ \t]*<name>[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(/<name>/g, function() {
          return e$1;
        }), "im"),
        alias: "section",
        inside: a$1
      };
    }
    var n2 = {
      pattern: /(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,
      lookbehind: true,
      alias: "string"
    }, a = {
      pattern: /([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,
      lookbehind: true,
      alias: "function",
      inside: { variable: i }
    }, o = {
      pattern: /([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,
      lookbehind: true,
      inside: { variable: i }
    };
    e.languages.robotframework = {
      settings: t("Settings", {
        documentation: {
          pattern: /([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,
          lookbehind: true,
          alias: "string"
        },
        property: {
          pattern: /([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,
          lookbehind: true
        }
      }),
      variables: t("Variables"),
      "test-cases": t("Test Cases", {
        "test-name": a,
        documentation: n2,
        property: o
      }),
      keywords: t("Keywords", {
        "keyword-name": a,
        documentation: n2,
        property: o
      }),
      tasks: t("Tasks", {
        "task-name": a,
        documentation: n2,
        property: o
      }),
      comment: r
    }, e.languages.robot = e.languages.robotframework;
  }(Prism$1), function(e) {
    for (var t = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, n2 = 0;n2 < 2; n2++)
      t = t.replace(/<self>/g, function() {
        return t;
      });
    t = t.replace(/<self>/g, function() {
      return /[^\s\S]/.source;
    }), e.languages.rust = {
      comment: [{
        pattern: RegExp(/(^|[^\\])/.source + t),
        lookbehind: true,
        greedy: true
      }, {
        pattern: /(^|[^\\:])\/\/.*/,
        lookbehind: true,
        greedy: true
      }],
      string: {
        pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,
        greedy: true
      },
      char: {
        pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,
        greedy: true
      },
      attribute: {
        pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,
        greedy: true,
        alias: "attr-name",
        inside: { string: null }
      },
      "closure-params": {
        pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,
        lookbehind: true,
        greedy: true,
        inside: {
          "closure-punctuation": {
            pattern: /^\||\|$/,
            alias: "punctuation"
          },
          rest: null
        }
      },
      "lifetime-annotation": {
        pattern: /'\w+/,
        alias: "symbol"
      },
      "fragment-specifier": {
        pattern: /(\$\w+:)[a-z]+/,
        lookbehind: true,
        alias: "punctuation"
      },
      variable: /\$\w+/,
      "function-definition": {
        pattern: /(\bfn\s+)\w+/,
        lookbehind: true,
        alias: "function"
      },
      "type-definition": {
        pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
        lookbehind: true,
        alias: "class-name"
      },
      "module-declaration": [{
        pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
        lookbehind: true,
        alias: "namespace"
      }, {
        pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
        lookbehind: true,
        alias: "namespace",
        inside: { punctuation: /::/ }
      }],
      keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],
      function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
      macro: {
        pattern: /\b\w+!/,
        alias: "property"
      },
      constant: /\b[A-Z_][A-Z_\d]+\b/,
      "class-name": /\b[A-Z]\w*\b/,
      namespace: {
        pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
        inside: { punctuation: /::/ }
      },
      number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
      boolean: /\b(?:false|true)\b/,
      punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
      operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
    }, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
  }(Prism$1), function(e) {
    var t = /(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source, n2 = /\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i, a = {
      pattern: RegExp(t + "[bx]"),
      alias: "number"
    }, r = { pattern: /&[a-z_]\w*/i }, i = {
      pattern: /((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,
      lookbehind: true,
      alias: "keyword"
    }, o = {
      pattern: /(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,
      alias: "keyword",
      lookbehind: true
    }, s = [/\/\*[\s\S]*?\*\//, {
      pattern: /(^[ \t]*|;\s*)\*[^;]*;/m,
      lookbehind: true
    }], l = {
      pattern: RegExp(t),
      greedy: true
    }, d2 = /[$%@.(){}\[\];,\\]/, c = {
      pattern: /%?\b\w+(?=\()/,
      alias: "keyword"
    }, u = {
      function: c,
      "arg-value": {
        pattern: /(=\s*)[A-Z\.]+/i,
        lookbehind: true
      },
      operator: /=/,
      "macro-variable": r,
      arg: {
        pattern: /[A-Z]+/i,
        alias: "keyword"
      },
      number: n2,
      "numeric-constant": a,
      punctuation: d2,
      string: l
    }, p2 = {
      pattern: /\b(?:format|put)\b=?[\w'$.]+/i,
      inside: {
        keyword: /^(?:format|put)(?==)/i,
        equals: /=/,
        format: {
          pattern: /(?:\w|\$\d)+\.\d?/,
          alias: "number"
        }
      }
    }, m2 = {
      pattern: /\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,
      inside: {
        keyword: /^(?:format|put)/i,
        format: {
          pattern: /[\w$]+\.\d?/,
          alias: "number"
        }
      }
    }, g2 = {
      pattern: /((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,
      lookbehind: true,
      alias: "keyword"
    }, b2 = {
      pattern: /(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,
      lookbehind: true,
      alias: "keyword"
    }, E = /aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source, f2 = {
      pattern: RegExp(/(^|\s)(?:action\s+)?(?:<act>)\.[a-z]+\b[^;]+/.source.replace(/<act>/g, function() {
        return E;
      }), "i"),
      lookbehind: true,
      inside: {
        keyword: RegExp(/(?:<act>)\.[a-z]+\b/.source.replace(/<act>/g, function() {
          return E;
        }), "i"),
        action: {
          pattern: /(?:action)/i,
          alias: "keyword"
        },
        comment: s,
        function: c,
        "arg-value": u["arg-value"],
        operator: u.operator,
        argument: u.arg,
        number: n2,
        "numeric-constant": a,
        punctuation: d2,
        string: l
      }
    }, h2 = {
      pattern: /((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,
      lookbehind: true
    };
    e.languages.sas = {
      datalines: {
        pattern: /^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,
        lookbehind: true,
        alias: "string",
        inside: {
          keyword: { pattern: /^(?:cards|(?:data)?lines)/i },
          punctuation: /;/
        }
      },
      "proc-sql": {
        pattern: /(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,
        lookbehind: true,
        inside: {
          sql: {
            pattern: RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:<str>|[^;"'])+;/.source.replace(/<str>/g, function() {
              return t;
            }), "im"),
            alias: "language-sql",
            inside: e.languages.sql
          },
          "global-statements": g2,
          "sql-statements": {
            pattern: /(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,
            lookbehind: true,
            alias: "keyword"
          },
          number: n2,
          "numeric-constant": a,
          punctuation: d2,
          string: l
        }
      },
      "proc-groovy": {
        pattern: /(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,
        lookbehind: true,
        inside: {
          comment: s,
          groovy: {
            pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g, function() {
              return t;
            }), "im"),
            lookbehind: true,
            alias: "language-groovy",
            inside: e.languages.groovy
          },
          keyword: h2,
          "submit-statement": b2,
          "global-statements": g2,
          number: n2,
          "numeric-constant": a,
          punctuation: d2,
          string: l
        }
      },
      "proc-lua": {
        pattern: /(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,
        lookbehind: true,
        inside: {
          comment: s,
          lua: {
            pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g, function() {
              return t;
            }), "im"),
            lookbehind: true,
            alias: "language-lua",
            inside: e.languages.lua
          },
          keyword: h2,
          "submit-statement": b2,
          "global-statements": g2,
          number: n2,
          "numeric-constant": a,
          punctuation: d2,
          string: l
        }
      },
      "proc-cas": {
        pattern: /(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,
        lookbehind: true,
        inside: {
          comment: s,
          "statement-var": {
            pattern: /((?:^|\s)=?)saveresult\s[^;]+/im,
            lookbehind: true,
            inside: {
              statement: {
                pattern: /^saveresult\s+\S+/i,
                inside: { keyword: /^(?:saveresult)/i }
              },
              rest: u
            }
          },
          "cas-actions": f2,
          statement: {
            pattern: /((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,
            lookbehind: true,
            inside: u
          },
          step: o,
          keyword: h2,
          function: c,
          format: p2,
          altformat: m2,
          "global-statements": g2,
          number: n2,
          "numeric-constant": a,
          punctuation: d2,
          string: l
        }
      },
      "proc-args": {
        pattern: RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|<str>)+;/.source.replace(/<str>/g, function() {
          return t;
        }), "im"),
        lookbehind: true,
        inside: u
      },
      "macro-keyword": i,
      "macro-variable": r,
      "macro-string-functions": {
        pattern: /((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,
        lookbehind: true,
        inside: {
          function: {
            pattern: /%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,
            alias: "keyword"
          },
          "macro-keyword": i,
          "macro-variable": r,
          "escaped-char": { pattern: /%['"()<>=¬^~;,#]/ },
          punctuation: d2
        }
      },
      "macro-declaration": {
        pattern: /^%macro[^;]+(?=;)/im,
        inside: { keyword: /%macro/i }
      },
      "macro-end": {
        pattern: /^%mend[^;]+(?=;)/im,
        inside: { keyword: /%mend/i }
      },
      macro: {
        pattern: /%_\w+(?=\()/,
        alias: "keyword"
      },
      input: {
        pattern: /\binput\s[-\w\s/*.$&]+;/i,
        inside: {
          input: {
            alias: "keyword",
            pattern: /^input/i
          },
          comment: s,
          number: n2,
          "numeric-constant": a
        }
      },
      "options-args": {
        pattern: /(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,
        lookbehind: true,
        inside: u
      },
      "cas-actions": f2,
      comment: s,
      function: c,
      format: p2,
      altformat: m2,
      "numeric-constant": a,
      datetime: {
        pattern: RegExp(t + "(?:dt?|t)"),
        alias: "number"
      },
      string: l,
      step: o,
      keyword: h2,
      "operator-keyword": {
        pattern: /\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,
        alias: "operator"
      },
      number: n2,
      operator: /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,
      punctuation: d2
    };
  }(Prism$1), function(e) {
    e.languages.sass = e.languages.extend("css", { comment: {
      pattern: /^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,
      lookbehind: true,
      greedy: true
    } }), e.languages.insertBefore("sass", "atrule", { "atrule-line": {
      pattern: /^(?:[ \t]*)[@+=].+/m,
      greedy: true,
      inside: { atrule: /(?:@[\w-]+|[+=])/ }
    } }), delete e.languages.sass.atrule;
    var t = /\$[-\w]+|#\{\$[-\w]+\}/, n2 = [/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/, {
      pattern: /(\s)-(?=\s)/,
      lookbehind: true
    }];
    e.languages.insertBefore("sass", "property", {
      "variable-line": {
        pattern: /^[ \t]*\$.+/m,
        greedy: true,
        inside: {
          punctuation: /:/,
          variable: t,
          operator: n2
        }
      },
      "property-line": {
        pattern: /^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,
        greedy: true,
        inside: {
          property: [/[^:\s]+(?=\s*:)/, {
            pattern: /(:)[^:\s]+/,
            lookbehind: true
          }],
          punctuation: /:/,
          variable: t,
          operator: n2,
          important: e.languages.sass.important
        }
      }
    }), delete e.languages.sass.property, delete e.languages.sass.important, e.languages.insertBefore("sass", "punctuation", { selector: {
      pattern: /^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,
      lookbehind: true,
      greedy: true
    } });
  }(Prism$1), function(e) {
    var t = [
      /"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,
      /'[^']*'/.source,
      /\$'(?:[^'\\]|\\[\s\S])*'/.source,
      /<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source
    ].join("|");
    e.languages["shell-session"] = {
      command: {
        pattern: RegExp(/^/.source + "(?:" + /[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source + "|" + /[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source + ")?" + /[$#%](?=\s)/.source + /(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<<str>>)+/.source.replace(/<<str>>/g, function() {
          return t;
        }), "m"),
        greedy: true,
        inside: {
          info: {
            pattern: /^[^#$%]+/,
            alias: "punctuation",
            inside: {
              user: /^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,
              punctuation: /:/,
              path: /[\s\S]+/
            }
          },
          bash: {
            pattern: /(^[$#%]\s*)\S[\s\S]*/,
            lookbehind: true,
            alias: "language-bash",
            inside: e.languages.bash
          },
          "shell-symbol": {
            pattern: /^[$#%]/,
            alias: "important"
          }
        }
      },
      output: /.(?:.*(?:[\r\n]|.$))*/
    }, e.languages["sh-session"] = e.languages.shellsession = e.languages["shell-session"];
  }(Prism$1), Prism$1.languages.smali = {
    comment: /#.*/,
    string: {
      pattern: /"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,
      greedy: true
    },
    "class-name": {
      pattern: /(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,
      lookbehind: true,
      inside: {
        "class-name": {
          pattern: /(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,
          lookbehind: true
        },
        namespace: {
          pattern: /^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,
          lookbehind: true,
          inside: { punctuation: /\// }
        },
        builtin: /^L/
      }
    },
    builtin: [{
      pattern: /([();\[])[BCDFIJSVZ]+/,
      lookbehind: true
    }, {
      pattern: /([\w$>]:)[BCDFIJSVZ]/,
      lookbehind: true
    }],
    keyword: [
      {
        pattern: /(\.end\s+)[\w-]+/,
        lookbehind: true
      },
      {
        pattern: /(^|[^\w.-])\.(?!\d)[\w-]+/,
        lookbehind: true
      },
      {
        pattern: /(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,
        lookbehind: true
      }
    ],
    function: {
      pattern: /(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,
      lookbehind: true
    },
    field: {
      pattern: /[\w$]+(?=:)/,
      alias: "variable"
    },
    register: {
      pattern: /(^|[^\w.-])[vp]\d(?![\w.-])/,
      lookbehind: true,
      alias: "variable"
    },
    boolean: {
      pattern: /(^|[^\w.-])(?:false|true)(?![\w.-])/,
      lookbehind: true
    },
    number: {
      pattern: /(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,
      lookbehind: true
    },
    label: {
      pattern: /(:)\w+/,
      lookbehind: true,
      alias: "property"
    },
    operator: /->|\.\.|[\[=]/,
    punctuation: /[{}(),;:]/
  }, Prism$1.languages.smalltalk = {
    comment: {
      pattern: /"(?:""|[^"])*"/,
      greedy: true
    },
    char: {
      pattern: /\$./,
      greedy: true
    },
    string: {
      pattern: /'(?:''|[^'])*'/,
      greedy: true
    },
    symbol: /#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,
    "block-arguments": {
      pattern: /(\[\s*):[^\[|]*\|/,
      lookbehind: true,
      inside: {
        variable: /:[\da-z]+/i,
        punctuation: /\|/
      }
    },
    "temporary-variables": {
      pattern: /\|[^|]+\|/,
      inside: {
        variable: /[\da-z]+/i,
        punctuation: /\|/
      }
    },
    keyword: /\b(?:new|nil|self|super)\b/,
    boolean: /\b(?:false|true)\b/,
    number: [/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/, /\b\d+(?:\.\d+)?(?:e-?\d+)?/],
    operator: /[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,
    punctuation: /[.;:?\[\](){}]/
  }, function(n2) {
    n2.languages.smarty = {
      comment: {
        pattern: /^\{\*[\s\S]*?\*\}/,
        greedy: true
      },
      "embedded-php": {
        pattern: /^\{php\}[\s\S]*?\{\/php\}/,
        greedy: true,
        inside: {
          smarty: {
            pattern: /^\{php\}|\{\/php\}$/,
            inside: null
          },
          php: {
            pattern: /[\s\S]+/,
            alias: "language-php",
            inside: n2.languages.php
          }
        }
      },
      string: [{
        pattern: /"(?:\\.|[^"\\\r\n])*"/,
        greedy: true,
        inside: {
          interpolation: {
            pattern: /\{[^{}]*\}|`[^`]*`/,
            inside: {
              "interpolation-punctuation": {
                pattern: /^[{`]|[`}]$/,
                alias: "punctuation"
              },
              expression: {
                pattern: /[\s\S]+/,
                inside: null
              }
            }
          },
          variable: /\$\w+/
        }
      }, {
        pattern: /'(?:\\.|[^'\\\r\n])*'/,
        greedy: true
      }],
      keyword: {
        pattern: /(^\{\/?)[a-z_]\w*\b(?!\()/i,
        lookbehind: true,
        greedy: true
      },
      delimiter: {
        pattern: /^\{\/?|\}$/,
        greedy: true,
        alias: "punctuation"
      },
      number: /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
      variable: [
        /\$(?!\d)\w+/,
        /#(?!\d)\w+#/,
        {
          pattern: /(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,
          lookbehind: true
        },
        {
          pattern: /(\[)(?!\d)\w+(?=\])/,
          lookbehind: true
        }
      ],
      function: {
        pattern: /(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,
        lookbehind: true
      },
      "attr-name": /\b[a-z_]\w*(?=\s*=)/i,
      boolean: /\b(?:false|no|off|on|true|yes)\b/,
      punctuation: /[\[\](){}.,:`]|->/,
      operator: [
        /[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,
        /\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,
        /\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/
      ]
    }, n2.languages.smarty["embedded-php"].inside.smarty.inside = n2.languages.smarty, n2.languages.smarty.string[0].inside.interpolation.inside.expression.inside = n2.languages.smarty;
    var e = /"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/, a = RegExp(/\{\*[\s\S]*?\*\}/.source + "|" + /\{php\}[\s\S]*?\{\/php\}/.source + "|" + /\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>)*\})*\})*\}/.source.replace(/<str>/g, function() {
      return e.source;
    }), "g");
    n2.hooks.add("before-tokenize", function(e$1) {
      var t = false;
      n2.languages["markup-templating"].buildPlaceholders(e$1, "smarty", a, function(e$2) {
        return !(t = e$2 !== "{/literal}" && t) && (e$2 === "{literal}" && (t = true), true);
      });
    }), n2.hooks.add("after-tokenize", function(e$1) {
      n2.languages["markup-templating"].tokenizePlaceholders(e$1, "smarty");
    });
  }(Prism$1), function(e) {
    var t = /\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i;
    e.languages.sml = {
      comment: /\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,
      string: {
        pattern: /#?"(?:[^"\\]|\\.)*"/,
        greedy: true
      },
      "class-name": [{
        pattern: RegExp(/((?:^|[^:]):\s*)<TERMINAL>(?:\s*(?:(?:\*|->)\s*<TERMINAL>|,\s*<TERMINAL>(?:(?=<NOT-LAST>)|(?!<NOT-LAST>)\s+<LONG-ID>)))*/.source.replace(/<NOT-LAST>/g, function() {
          return /\s*(?:[*,]|->)/.source;
        }).replace(/<TERMINAL>/g, function() {
          return /(?:'[\w']*|<LONG-ID>|\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+<LONG-ID>)*/.source;
        }).replace(/<LONG-ID>/g, function() {
          return /(?!<KEYWORD>)[a-z\d_][\w'.]*/.source;
        }).replace(/<KEYWORD>/g, function() {
          return t.source;
        }), "i"),
        lookbehind: true,
        greedy: true,
        inside: null
      }, {
        pattern: /((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,
        lookbehind: true
      }],
      function: {
        pattern: /((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,
        lookbehind: true
      },
      keyword: t,
      variable: {
        pattern: /(^|[^\w'])'[\w']*/,
        lookbehind: true
      },
      number: /~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,
      word: {
        pattern: /\b0w(?:\d+|x[\da-f]+)\b/i,
        alias: "constant"
      },
      boolean: /\b(?:false|true)\b/i,
      operator: /\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,
      punctuation: /[(){}\[\].:,;]/
    }, e.languages.sml["class-name"][0].inside = e.languages.sml, e.languages.smlnj = e.languages.sml;
  }(Prism$1), Prism$1.languages.solidity = Prism$1.languages.extend("clike", {
    "class-name": {
      pattern: /(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,
      lookbehind: true
    },
    keyword: /\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,
    operator: /=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/
  }), Prism$1.languages.insertBefore("solidity", "keyword", { builtin: /\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/ }), Prism$1.languages.insertBefore("solidity", "number", { version: {
    pattern: /([<>]=?|\^)\d+\.\d+\.\d+\b/,
    lookbehind: true,
    alias: "number"
  } }), Prism$1.languages.sol = Prism$1.languages.solidity, function(e) {
    var t = {
      pattern: /\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,
      alias: "constant",
      inside: { punctuation: /[{}]/ }
    };
    e.languages["solution-file"] = {
      comment: {
        pattern: /#.*/,
        greedy: true
      },
      string: {
        pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
        greedy: true,
        inside: { guid: t }
      },
      object: {
        pattern: /^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,
        lookbehind: true,
        greedy: true,
        alias: "keyword"
      },
      property: {
        pattern: /^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,
        lookbehind: true,
        inside: { guid: t }
      },
      guid: t,
      number: /\b\d+(?:\.\d+)*\b/,
      boolean: /\b(?:FALSE|TRUE)\b/,
      operator: /=/,
      punctuation: /[(),]/
    }, e.languages.sln = e.languages["solution-file"];
  }(Prism$1), function(n2) {
    var e = /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, t = /\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;
    n2.languages.soy = {
      comment: [/\/\*[\s\S]*?\*\//, {
        pattern: /(\s)\/\/.*/,
        lookbehind: true,
        greedy: true
      }],
      "command-arg": {
        pattern: /(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,
        lookbehind: true,
        alias: "string",
        inside: { punctuation: /\./ }
      },
      parameter: {
        pattern: /(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,
        lookbehind: true,
        alias: "variable"
      },
      keyword: [{
        pattern: /(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,
        lookbehind: true
      }, /\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],
      delimiter: {
        pattern: /^\{+\/?|\/?\}+$/,
        alias: "punctuation"
      },
      property: /\w+(?==)/,
      variable: {
        pattern: /\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,
        inside: {
          string: {
            pattern: e,
            greedy: true
          },
          number: t,
          punctuation: /[\[\].?]/
        }
      },
      string: {
        pattern: e,
        greedy: true
      },
      function: [/\w+(?=\()/, {
        pattern: /(\|[^\S\r\n]*)\w+/,
        lookbehind: true
      }],
      boolean: /\b(?:false|true)\b/,
      number: t,
      operator: /\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,
      punctuation: /[{}()\[\]|.,:]/
    }, n2.hooks.add("before-tokenize", function(e$1) {
      var t$1 = false;
      n2.languages["markup-templating"].buildPlaceholders(e$1, "soy", /\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g, function(e$2) {
        return !(t$1 = e$2 !== "{/literal}" && t$1) && (e$2 === "{literal}" && (t$1 = true), true);
      });
    }), n2.hooks.add("after-tokenize", function(e$1) {
      n2.languages["markup-templating"].tokenizePlaceholders(e$1, "soy");
    });
  }(Prism$1), Prism$1.languages.turtle = {
    comment: {
      pattern: /#.*/,
      greedy: true
    },
    "multiline-string": {
      pattern: /"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,
      greedy: true,
      alias: "string",
      inside: { comment: /#.*/ }
    },
    string: {
      pattern: /"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,
      greedy: true
    },
    url: {
      pattern: /<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,
      greedy: true,
      inside: { punctuation: /[<>]/ }
    },
    function: {
      pattern: /(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,
      inside: {
        "local-name": {
          pattern: /([^:]*:)[\s\S]+/,
          lookbehind: true
        },
        prefix: {
          pattern: /[\s\S]+/,
          inside: { punctuation: /:/ }
        }
      }
    },
    number: /[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,
    punctuation: /[{}.,;()[\]]|\^\^/,
    boolean: /\b(?:false|true)\b/,
    keyword: [/(?:\ba|@prefix|@base)\b|=/, /\b(?:base|graph|prefix)\b/i],
    tag: {
      pattern: /@[a-z]+(?:-[a-z\d]+)*/i,
      inside: { punctuation: /@/ }
    }
  }, Prism$1.languages.trig = Prism$1.languages.turtle, Prism$1.languages.sparql = Prism$1.languages.extend("turtle", {
    boolean: /\b(?:false|true)\b/i,
    variable: {
      pattern: /[?$]\w+/,
      greedy: true
    }
  }), Prism$1.languages.insertBefore("sparql", "punctuation", { keyword: [
    /\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,
    /\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,
    /\b(?:BASE|GRAPH|PREFIX)\b/i
  ] }), Prism$1.languages.rq = Prism$1.languages.sparql, Prism$1.languages["splunk-spl"] = {
    comment: /`comment\("(?:\\.|[^\\"])*"\)`/,
    string: {
      pattern: /"(?:\\.|[^\\"])*"/,
      greedy: true
    },
    keyword: /\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,
    "operator-word": {
      pattern: /\b(?:and|as|by|not|or|xor)\b/i,
      alias: "operator"
    },
    function: /\b\w+(?=\s*\()/,
    property: /\b\w+(?=\s*=(?!=))/,
    date: {
      pattern: /\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,
      alias: "number"
    },
    number: /\b\d+(?:\.\d+)?\b/,
    boolean: /\b(?:f|false|t|true)\b/i,
    operator: /[<>=]=?|[-+*/%|]/,
    punctuation: /[()[\],]/
  }, Prism$1.languages.sqf = Prism$1.languages.extend("clike", {
    string: {
      pattern: /"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,
      greedy: true
    },
    keyword: /\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,
    boolean: /\b(?:false|true)\b/i,
    function: /\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,
    number: /(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,
    operator: /##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,
    "magic-variable": {
      pattern: /\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,
      alias: "keyword"
    },
    constant: /\bDIK(?:_[a-z\d]+)+\b/i
  }), Prism$1.languages.insertBefore("sqf", "string", { macro: {
    pattern: /(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,
    lookbehind: true,
    greedy: true,
    alias: "property",
    inside: {
      directive: {
        pattern: /#[a-z]+\b/i,
        alias: "keyword"
      },
      comment: Prism$1.languages.sqf.comment
    }
  } }), delete Prism$1.languages.sqf["class-name"], Prism$1.languages.squirrel = Prism$1.languages.extend("clike", {
    comment: [Prism$1.languages.clike.comment[0], {
      pattern: /(^|[^\\:])(?:\/\/|#).*/,
      lookbehind: true,
      greedy: true
    }],
    string: {
      pattern: /(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,
      lookbehind: true,
      greedy: true
    },
    "class-name": {
      pattern: /(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,
      lookbehind: true,
      inside: { punctuation: /\./ }
    },
    keyword: /\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,
    number: /\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,
    operator: /\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,
    punctuation: /[(){}\[\],;.]/
  }), Prism$1.languages.insertBefore("squirrel", "string", { char: {
    pattern: /(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,
    lookbehind: true,
    greedy: true
  } }), Prism$1.languages.insertBefore("squirrel", "operator", {
    "attribute-punctuation": {
      pattern: /<\/|\/>/,
      alias: "important"
    },
    lambda: {
      pattern: /@(?=\()/,
      alias: "operator"
    }
  }), function(e) {
    var t = /\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/;
    e.languages.stan = {
      comment: /\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,
      string: {
        pattern: /"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,
        greedy: true
      },
      directive: {
        pattern: /^([ \t]*)#include\b.*/m,
        lookbehind: true,
        alias: "property"
      },
      "function-arg": {
        pattern: RegExp("(" + t.source + /\s*\(\s*/.source + ")" + /[a-zA-Z]\w*/.source),
        lookbehind: true,
        alias: "function"
      },
      constraint: {
        pattern: /(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,
        lookbehind: true,
        inside: {
          expression: {
            pattern: /(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,
            lookbehind: true,
            inside: null
          },
          property: /\b[a-z]\w*(?=\s*=)/i,
          operator: /=/,
          punctuation: /^<|>$|,/
        }
      },
      keyword: [
        {
          pattern: /\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,
          alias: "program-block"
        },
        /\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,
        t
      ],
      function: /\b[a-z]\w*(?=\s*\()/i,
      number: /(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
      boolean: /\b(?:false|true)\b/,
      operator: /<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,
      punctuation: /[()\[\]{},;]/
    }, e.languages.stan.constraint.inside.expression.inside = e.languages.stan;
  }(Prism$1), Prism$1.languages.stata = {
    comment: [{
      pattern: /(^[ \t]*)\*.*/m,
      lookbehind: true,
      greedy: true
    }, {
      pattern: /(^|\s)\/\/.*|\/\*[\s\S]*?\*\//,
      lookbehind: true,
      greedy: true
    }],
    "string-literal": {
      pattern: /"[^"\r\n]*"|[‘`']".*?"[’`']/,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /\$\{[^{}]*\}|[‘`']\w[^’`'\r\n]*[’`']/,
          inside: {
            punctuation: /^\$\{|\}$/,
            expression: {
              pattern: /[\s\S]+/,
              inside: null
            }
          }
        },
        string: /[\s\S]+/
      }
    },
    mata: {
      pattern: /(^[ \t]*mata[ \t]*:)[\s\S]+?(?=^end\b)/m,
      lookbehind: true,
      greedy: true,
      alias: "language-mata",
      inside: Prism$1.languages.mata
    },
    java: {
      pattern: /(^[ \t]*java[ \t]*:)[\s\S]+?(?=^end\b)/m,
      lookbehind: true,
      greedy: true,
      alias: "language-java",
      inside: Prism$1.languages.java
    },
    python: {
      pattern: /(^[ \t]*python[ \t]*:)[\s\S]+?(?=^end\b)/m,
      lookbehind: true,
      greedy: true,
      alias: "language-python",
      inside: Prism$1.languages.python
    },
    command: {
      pattern: /(^[ \t]*(?:\.[ \t]+)?(?:(?:bayes|bootstrap|by|bysort|capture|collect|fmm|fp|frame|jackknife|mfp|mi|nestreg|noisily|permute|quietly|rolling|simulate|statsby|stepwise|svy|version|xi)\b[^:\r\n]*:[ \t]*|(?:capture|noisily|quietly|version)[ \t]+)?)[a-zA-Z]\w*/m,
      lookbehind: true,
      greedy: true,
      alias: "keyword"
    },
    variable: /\$\w+|[‘`']\w[^’`'\r\n]*[’`']/,
    keyword: /\b(?:bayes|bootstrap|by|bysort|capture|clear|collect|fmm|fp|frame|if|in|jackknife|mi[ \t]+estimate|mfp|nestreg|noisily|of|permute|quietly|rolling|simulate|sort|statsby|stepwise|svy|varlist|version|xi)\b/,
    boolean: /\b(?:off|on)\b/,
    number: /\b\d+(?:\.\d+)?\b|\B\.\d+/,
    function: /\b[a-z_]\w*(?=\()/i,
    operator: /\+\+|--|##?|[<>!=~]=?|[+\-*^&|/]/,
    punctuation: /[(){}[\],:]/
  }, Prism$1.languages.stata["string-literal"].inside.interpolation.inside.expression.inside = Prism$1.languages.stata, Prism$1.languages.iecst = {
    comment: [{
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,
      lookbehind: true,
      greedy: true
    }, {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: true,
      greedy: true
    }],
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    keyword: [/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i, /\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/],
    "class-name": /\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,
    address: {
      pattern: /%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,
      alias: "symbol"
    },
    number: /\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    boolean: /\b(?:FALSE|NULL|TRUE)\b/,
    operator: /S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    punctuation: /[()[\].,;]/
  }, Prism$1.languages.supercollider = {
    comment: {
      pattern: /\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,
      greedy: true
    },
    string: {
      pattern: /(^|[^\\])"(?:[^"\\]|\\[\s\S])*"/,
      lookbehind: true,
      greedy: true
    },
    char: {
      pattern: /\$(?:[^\\\r\n]|\\.)/,
      greedy: true
    },
    symbol: {
      pattern: /(^|[^\\])'(?:[^'\\]|\\[\s\S])*'|\\\w+/,
      lookbehind: true,
      greedy: true
    },
    keyword: /\b(?:_|arg|classvar|const|nil|var|while)\b/,
    boolean: /\b(?:false|true)\b/,
    label: {
      pattern: /\b[a-z_]\w*(?=\s*:)/,
      alias: "property"
    },
    number: /\b(?:inf|pi|0x[0-9a-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(?:pi)?|\d+r[0-9a-zA-Z]+(?:\.[0-9a-zA-Z]+)?|\d+[sb]{1,4}\d*)\b/,
    "class-name": /\b[A-Z]\w*\b/,
    operator: /\.{2,3}|#(?![[{])|&&|[!=]==?|\+>>|\+{1,3}|-[->]|=>|>>|\?\?|@\|?@|\|(?:@|[!=]=)?\||!\?|<[!=>]|\*{1,2}|<{2,3}\*?|[-!%&/<>?@|=`]/,
    punctuation: /[{}()[\].:,;]|#[[{]/
  }, Prism$1.languages.sclang = Prism$1.languages.supercollider, Prism$1.languages.swift = {
    comment: {
      pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
      lookbehind: true,
      greedy: true
    },
    "string-literal": [{
      pattern: RegExp(/(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source),
      lookbehind: true,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/,
          lookbehind: true,
          inside: null
        },
        "interpolation-punctuation": {
          pattern: /^\)|\\\($/,
          alias: "punctuation"
        },
        punctuation: /\\(?=[\r\n])/,
        string: /[\s\S]+/
      }
    }, {
      pattern: RegExp(/(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"),
      lookbehind: true,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,
          lookbehind: true,
          inside: null
        },
        "interpolation-punctuation": {
          pattern: /^\)|\\#+\($/,
          alias: "punctuation"
        },
        string: /[\s\S]+/
      }
    }],
    directive: {
      pattern: RegExp(/#/.source + "(?:" + /(?:elseif|if)\b/.source + "(?:[ \t]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+|" + /(?:else|endif)\b/.source + ")"),
      alias: "property",
      inside: {
        "directive-name": /^#\w+/,
        boolean: /\b(?:false|true)\b/,
        number: /\b\d+(?:\.\d+)*\b/,
        operator: /!|&&|\|\||[<>]=?/,
        punctuation: /[(),]/
      }
    },
    literal: {
      pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,
      alias: "constant"
    },
    "other-directive": {
      pattern: /#\w+\b/,
      alias: "property"
    },
    attribute: {
      pattern: /@\w+/,
      alias: "atrule"
    },
    "function-definition": {
      pattern: /(\bfunc\s+)\w+/,
      lookbehind: true,
      alias: "function"
    },
    label: {
      pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,
      lookbehind: true,
      alias: "important"
    },
    keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
    boolean: /\b(?:false|true)\b/,
    nil: {
      pattern: /\bnil\b/,
      alias: "constant"
    },
    "short-argument": /\$\d+\b/,
    omit: {
      pattern: /\b_\b/,
      alias: "keyword"
    },
    number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
    "class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
    operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,
    punctuation: /[{}[\]();,.:\\]/
  }, Prism$1.languages.swift["string-literal"].forEach(function(e) {
    e.inside.interpolation.inside = Prism$1.languages.swift;
  }), function(e) {
    var t = {
      pattern: /^[;#].*/m,
      greedy: true
    }, n2 = /"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source;
    e.languages.systemd = {
      comment: t,
      section: {
        pattern: /^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,
        greedy: true,
        inside: {
          punctuation: /^\[|\]$/,
          "section-name": {
            pattern: /[\s\S]+/,
            alias: "selector"
          }
        }
      },
      key: {
        pattern: /^[^\s=]+(?=[ \t]*=)/m,
        greedy: true,
        alias: "attr-name"
      },
      value: {
        pattern: RegExp(/(=[ \t]*(?!\s))/.source + "(?:" + n2 + `|(?=[^"\r
]))(?:` + /[^\s\\]/.source + '|[ \t]+(?:(?![ \t"])|' + n2 + ")|" + /\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source + ")*"),
        lookbehind: true,
        greedy: true,
        alias: "attr-value",
        inside: {
          comment: t,
          quoted: {
            pattern: RegExp(/(^|\s)/.source + n2),
            lookbehind: true,
            greedy: true
          },
          punctuation: /\\$/m,
          boolean: {
            pattern: /^(?:false|no|off|on|true|yes)$/,
            greedy: true
          }
        }
      },
      punctuation: /=/
    };
  }(Prism$1), function(n2) {
    function a(e, t, n$1) {
      return {
        pattern: RegExp("<#" + e + "[\\s\\S]*?#>"),
        alias: "block",
        inside: {
          delimiter: {
            pattern: RegExp("^<#" + e + "|#>$"),
            alias: "important"
          },
          content: {
            pattern: /[\s\S]+/,
            inside: t,
            alias: n$1
          }
        }
      };
    }
    n2.languages["t4-templating"] = Object.defineProperty({}, "createT4", { value: function(e) {
      var t = n2.languages[e], e = "language-" + e;
      return { block: {
        pattern: /<#[\s\S]+?#>/,
        inside: {
          directive: a("@", {
            "attr-value": {
              pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,
              inside: { punctuation: /^=|^["']|["']$/ }
            },
            keyword: /\b\w+(?=\s)/,
            "attr-name": /\b\w+/
          }),
          expression: a("=", t, e),
          "class-feature": a("\\+", t, e),
          standard: a("", t, e)
        }
      } };
    } });
  }(Prism$1), Prism$1.languages.t4 = Prism$1.languages["t4-cs"] = Prism$1.languages["t4-templating"].createT4("csharp"), Prism$1.languages.vbnet = Prism$1.languages.extend("basic", {
    comment: [{
      pattern: /(?:!|REM\b).+/i,
      inside: { keyword: /^REM/i }
    }, {
      pattern: /(^|[^\\:])'.*/,
      lookbehind: true,
      greedy: true
    }],
    string: {
      pattern: /(^|[^"])"(?:""|[^"])*"(?!")/,
      lookbehind: true,
      greedy: true
    },
    keyword: /(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,
    punctuation: /[,;:(){}]/
  }), Prism$1.languages["t4-vb"] = Prism$1.languages["t4-templating"].createT4("vbnet"), Prism$1.languages.tap = {
    fail: /not ok[^#{\n\r]*/,
    pass: /ok[^#{\n\r]*/,
    pragma: /pragma [+-][a-z]+/,
    bailout: /bail out!.*/i,
    version: /TAP version \d+/i,
    plan: /\b\d+\.\.\d+(?: +#.*)?/,
    subtest: {
      pattern: /# Subtest(?:: .*)?/,
      greedy: true
    },
    punctuation: /[{}]/,
    directive: /#.*/,
    yamlish: {
      pattern: /(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,
      lookbehind: true,
      inside: Prism$1.languages.yaml,
      alias: "language-yaml"
    }
  }, Prism$1.languages.tcl = {
    comment: {
      pattern: /(^|[^\\])#.*/,
      lookbehind: true
    },
    string: {
      pattern: /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,
      greedy: true
    },
    variable: [
      {
        pattern: /(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,
        lookbehind: true
      },
      {
        pattern: /(\$)\{[^}]+\}/,
        lookbehind: true
      },
      {
        pattern: /(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,
        lookbehind: true
      }
    ],
    function: {
      pattern: /(^[\t ]*proc[ \t]+)\S+/m,
      lookbehind: true
    },
    builtin: [{
      pattern: /(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,
      lookbehind: true
    }, /\b(?:else|elseif)\b/],
    scope: {
      pattern: /(^[\t ]*)(?:global|upvar|variable)\b/m,
      lookbehind: true,
      alias: "constant"
    },
    keyword: {
      pattern: /(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,
      lookbehind: true
    },
    operator: /!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,
    punctuation: /[{}()\[\]]/
  }, function(t) {
    t.languages.tt2 = t.languages.extend("clike", {
      comment: /#.*|\[%#[\s\S]*?%\]/,
      keyword: /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,
      punctuation: /[[\]{},()]/
    }), t.languages.insertBefore("tt2", "number", {
      operator: /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,
      variable: { pattern: /\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i }
    }), t.languages.insertBefore("tt2", "keyword", { delimiter: {
      pattern: /^(?:\[%|%%)-?|-?%\]$/,
      alias: "punctuation"
    } }), t.languages.insertBefore("tt2", "string", {
      "single-quoted-string": {
        pattern: /'[^\\']*(?:\\[\s\S][^\\']*)*'/,
        greedy: true,
        alias: "string"
      },
      "double-quoted-string": {
        pattern: /"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,
        greedy: true,
        alias: "string",
        inside: { variable: { pattern: /\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i } }
      }
    }), delete t.languages.tt2.string, t.hooks.add("before-tokenize", function(e) {
      t.languages["markup-templating"].buildPlaceholders(e, "tt2", /\[%[\s\S]+?%\]/g);
    }), t.hooks.add("after-tokenize", function(e) {
      t.languages["markup-templating"].tokenizePlaceholders(e, "tt2");
    });
  }(Prism$1), function(e) {
    var t = /(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;
    function n2(e$1) {
      return e$1.replace(/__/g, function() {
        return t;
      });
    }
    e.languages.toml = {
      comment: {
        pattern: /#.*/,
        greedy: true
      },
      table: {
        pattern: RegExp(n2(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source), "m"),
        lookbehind: true,
        greedy: true,
        alias: "class-name"
      },
      key: {
        pattern: RegExp(n2(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source), "m"),
        lookbehind: true,
        greedy: true,
        alias: "property"
      },
      string: {
        pattern: /"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,
        greedy: true
      },
      date: [{
        pattern: /\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,
        alias: "number"
      }, {
        pattern: /\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,
        alias: "number"
      }],
      number: /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,
      boolean: /\b(?:false|true)\b/,
      punctuation: /[.,=[\]{}]/
    };
  }(Prism$1), function(e) {
    e.languages.tremor = {
      comment: {
        pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
        lookbehind: true
      },
      "interpolated-string": null,
      extractor: {
        pattern: /\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,
        greedy: true,
        inside: {
          regex: {
            pattern: /(^re)\|[\s\S]+/,
            lookbehind: true
          },
          function: /^\w+/,
          value: /\|[\s\S]+/
        }
      },
      identifier: {
        pattern: /`[^`]*`/,
        greedy: true
      },
      function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,
      keyword: /\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,
      boolean: /\b(?:false|null|true)\b/i,
      number: /\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,
      "pattern-punctuation": {
        pattern: /%(?=[({[])/,
        alias: "punctuation"
      },
      operator: /[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?>?=?|(?:absent|and|not|or|present|xor)\b/,
      punctuation: /::|[;\[\]()\{\},.:]/
    };
    var t = /#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source;
    e.languages.tremor["interpolated-string"] = {
      pattern: RegExp(/(^|[^\\])/.source + '(?:"""(?:' + /[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source + "|" + t + ')*"""|"(?:' + /[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source + "|" + t + ')*")'),
      lookbehind: true,
      greedy: true,
      inside: {
        interpolation: {
          pattern: RegExp(t),
          inside: {
            punctuation: /^#\{|\}$/,
            expression: {
              pattern: /[\s\S]+/,
              inside: e.languages.tremor
            }
          }
        },
        string: /[\s\S]+/
      }
    }, e.languages.troy = e.languages.tremor, e.languages.trickle = e.languages.tremor;
  }(Prism$1), function(e) {
    var t = /\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;
    e.languages.typoscript = {
      comment: [
        {
          pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
          lookbehind: true
        },
        {
          pattern: /(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,
          lookbehind: true,
          greedy: true
        },
        {
          pattern: /(^|[^"'])#.*/,
          lookbehind: true,
          greedy: true
        }
      ],
      function: [{
        pattern: /<INCLUDE_TYPOSCRIPT:\s*source\s*=\s*(?:"[^"\r\n]*"|'[^'\r\n]*')\s*>/,
        inside: {
          string: {
            pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
            inside: { keyword: t }
          },
          keyword: { pattern: /INCLUDE_TYPOSCRIPT/ }
        }
      }, {
        pattern: /@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,
        inside: { string: /"[^"\r\n]*"|'[^'\r\n]*'/ }
      }],
      string: {
        pattern: /^([^=]*=[< ]?)(?:(?!\]\n).)*/,
        lookbehind: true,
        inside: {
          function: /\{\$.*\}/,
          keyword: t,
          number: /^\d+$/,
          punctuation: /[,|:]/
        }
      },
      keyword: t,
      number: {
        pattern: /\b\d+\s*[.{=]/,
        inside: { operator: /[.{=]/ }
      },
      tag: {
        pattern: /\.?[-\w\\]+\.?/,
        inside: { punctuation: /\./ }
      },
      punctuation: /[{}[\];(),.:|]/,
      operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/
    }, e.languages.tsconfig = e.languages.typoscript;
  }(Prism$1), Prism$1.languages.unrealscript = {
    comment: /\/\/.*|\/\*[\s\S]*?\*\//,
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: true
    },
    category: {
      pattern: /(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,
      lookbehind: true,
      greedy: true,
      alias: "property"
    },
    metadata: {
      pattern: /(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,
      lookbehind: true,
      greedy: true,
      inside: {
        property: /\b\w+(?=\s*=)/,
        operator: /=/,
        punctuation: /[<>|]/
      }
    },
    macro: {
      pattern: /`\w+/,
      alias: "property"
    },
    "class-name": {
      pattern: /(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,
      lookbehind: true
    },
    keyword: /\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,
    function: /\b[a-z_]\w*(?=\s*\()/i,
    boolean: /\b(?:false|true)\b/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    operator: />>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,
    punctuation: /[()[\]{};,.]/
  }, Prism$1.languages.uc = Prism$1.languages.uscript = Prism$1.languages.unrealscript, Prism$1.languages.uorazor = {
    "comment-hash": {
      pattern: /#.*/,
      alias: "comment",
      greedy: true
    },
    "comment-slash": {
      pattern: /\/\/.*/,
      alias: "comment",
      greedy: true
    },
    string: {
      pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
      inside: { punctuation: /^['"]|['"]$/ },
      greedy: true
    },
    "source-layers": {
      pattern: /\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,
      alias: "function"
    },
    "source-commands": {
      pattern: /\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,
      alias: "function"
    },
    "tag-name": {
      pattern: /(^\{%-?\s*)\w+/,
      lookbehind: true,
      alias: "keyword"
    },
    delimiter: {
      pattern: /^\{[{%]-?|-?[%}]\}$/,
      alias: "punctuation"
    },
    function: /\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,
    keyword: /\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,
    boolean: /\b(?:false|null|true)\b/,
    number: /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
    operator: [{
      pattern: /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,
      lookbehind: true
    }, /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],
    punctuation: /[()\[\]{}:.,]/
  }, function(e) {
    var t = {
      pattern: /[\s\S]+/,
      inside: null
    };
    e.languages.v = e.languages.extend("clike", {
      string: {
        pattern: /r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
        alias: "quoted-string",
        greedy: true,
        inside: { interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,
          lookbehind: true,
          inside: {
            "interpolation-variable": {
              pattern: /^\$\w[\s\S]*$/,
              alias: "variable"
            },
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            "interpolation-expression": t
          }
        } }
      },
      "class-name": {
        pattern: /(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,
        lookbehind: true
      },
      keyword: /(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,
      number: /\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,
      operator: /~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,
      builtin: /\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/
    }), t.inside = e.languages.v, e.languages.insertBefore("v", "string", { char: {
      pattern: /`(?:\\`|\\?[^`]{1,2})`/,
      alias: "rune"
    } }), e.languages.insertBefore("v", "operator", {
      attribute: {
        pattern: /(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,
        lookbehind: true,
        alias: "annotation",
        inside: {
          punctuation: /[\[\]]/,
          keyword: /\w+/
        }
      },
      generic: {
        pattern: /<\w+>(?=\s*[\)\{])/,
        inside: {
          punctuation: /[<>]/,
          "class-name": /\w+/
        }
      }
    }), e.languages.insertBefore("v", "function", { "generic-function": {
      pattern: /\b\w+\s*<\w+>(?=\()/,
      inside: {
        function: /^\w+/,
        generic: {
          pattern: /<\w+>/,
          inside: e.languages.v.generic.inside
        }
      }
    } });
  }(Prism$1), Prism$1.languages.vala = Prism$1.languages.extend("clike", {
    "class-name": [
      {
        pattern: /\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,
        inside: { punctuation: /\./ }
      },
      {
        pattern: /(\[)[A-Z]\w*(?:\.\w+)*\b/,
        lookbehind: true,
        inside: { punctuation: /\./ }
      },
      {
        pattern: /(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,
        lookbehind: true,
        inside: { punctuation: /\./ }
      },
      {
        pattern: /((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,
        lookbehind: true,
        inside: { punctuation: /\./ }
      }
    ],
    keyword: /\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,
    function: /\b\w+(?=\s*\()/,
    number: /(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,
    operator: /\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,
    punctuation: /[{}[\];(),.:]/,
    constant: /\b[A-Z0-9_]+\b/
  }), Prism$1.languages.insertBefore("vala", "string", {
    "raw-string": {
      pattern: /"""[\s\S]*?"""/,
      greedy: true,
      alias: "string"
    },
    "template-string": {
      pattern: /@"[\s\S]*?"/,
      greedy: true,
      inside: {
        interpolation: {
          pattern: /\$(?:\([^)]*\)|[a-zA-Z]\w*)/,
          inside: {
            delimiter: {
              pattern: /^\$\(?|\)$/,
              alias: "punctuation"
            },
            rest: Prism$1.languages.vala
          }
        },
        string: /[\s\S]+/
      }
    }
  }), Prism$1.languages.insertBefore("vala", "keyword", { regex: {
    pattern: /\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,
    greedy: true,
    inside: {
      "regex-source": {
        pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
        lookbehind: true,
        alias: "language-regex",
        inside: Prism$1.languages.regex
      },
      "regex-delimiter": /^\//,
      "regex-flags": /^[a-z]+$/
    }
  } }), function(e) {
    e.languages.velocity = e.languages.extend("markup", {});
    var t = {
      variable: {
        pattern: /(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,
        lookbehind: true,
        inside: {}
      },
      string: {
        pattern: /"[^"]*"|'[^']*'/,
        greedy: true
      },
      number: /\b\d+\b/,
      boolean: /\b(?:false|true)\b/,
      operator: /[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,
      punctuation: /[(){}[\]:,.]/
    };
    t.variable.inside = {
      string: t.string,
      function: {
        pattern: /([^\w-])[a-z][\w-]*(?=\()/,
        lookbehind: true
      },
      number: t.number,
      boolean: t.boolean,
      punctuation: t.punctuation
    }, e.languages.insertBefore("velocity", "comment", {
      unparsed: {
        pattern: /(^|[^\\])#\[\[[\s\S]*?\]\]#/,
        lookbehind: true,
        greedy: true,
        inside: { punctuation: /^#\[\[|\]\]#$/ }
      },
      "velocity-comment": [{
        pattern: /(^|[^\\])#\*[\s\S]*?\*#/,
        lookbehind: true,
        greedy: true,
        alias: "comment"
      }, {
        pattern: /(^|[^\\])##.*/,
        lookbehind: true,
        greedy: true,
        alias: "comment"
      }],
      directive: {
        pattern: /(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,
        lookbehind: true,
        inside: {
          keyword: {
            pattern: /^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,
            inside: { punctuation: /[{}]/ }
          },
          rest: t
        }
      },
      variable: t.variable
    }), e.languages.velocity.tag.inside["attr-value"].inside.rest = e.languages.velocity;
  }(Prism$1), Prism$1.languages.verilog = {
    comment: {
      pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
      greedy: true
    },
    string: {
      pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
      greedy: true
    },
    "kernel-function": {
      pattern: /\B\$\w+\b/,
      alias: "property"
    },
    constant: /\B`\w+\b/,
    function: /\b\w+(?=\()/,
    keyword: /\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,
    important: /\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,
    number: /\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,
    operator: /[-+{}^~%*\/?=!<>&|]+/,
    punctuation: /[[\];(),.:]/
  }, Prism$1.languages.vhdl = {
    comment: /--.+/,
    "vhdl-vectors": {
      pattern: /\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,
      alias: "number"
    },
    "quoted-function": {
      pattern: /"\S+?"(?=\()/,
      alias: "function"
    },
    string: /"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,
    attribute: {
      pattern: /\b'\w+/,
      alias: "attr-name"
    },
    keyword: /\b(?:access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|private|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|view|wait|when|while|with)\b/i,
    boolean: /\b(?:false|true)\b/i,
    function: /\w+(?=\()/,
    number: /'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,
    operator: /[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.vim = {
    string: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,
    comment: /".*/,
    function: /\b\w+(?=\()/,
    keyword: /\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,
    builtin: /\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,
    number: /\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,
    operator: /\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,
    punctuation: /[{}[\](),;:]/
  }, Prism$1.languages["visual-basic"] = {
    comment: {
      pattern: /(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,
      inside: { keyword: /^REM/i }
    },
    directive: {
      pattern: /#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,
      alias: "property",
      greedy: true
    },
    string: {
      pattern: /\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,
      greedy: true
    },
    date: {
      pattern: /#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,
      alias: "number"
    },
    number: /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,
    boolean: /\b(?:False|Nothing|True)\b/i,
    keyword: /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,
    operator: /[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,
    punctuation: /[{}().,:?]/
  }, Prism$1.languages.vb = Prism$1.languages["visual-basic"], Prism$1.languages.vba = Prism$1.languages["visual-basic"], Prism$1.languages.warpscript = {
    comment: /#.*|\/\/.*|\/\*[\s\S]*?\*\//,
    string: {
      pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,
      greedy: true
    },
    variable: /\$\S+/,
    macro: {
      pattern: /@\S+/,
      alias: "property"
    },
    keyword: /\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,
    number: /[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,
    boolean: /\b(?:F|T|false|true)\b/,
    punctuation: /<%|%>|[{}[\]()]/,
    operator: /==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/
  }, Prism$1.languages.wasm = {
    comment: [/\(;[\s\S]*?;\)/, {
      pattern: /;;.*/,
      greedy: true
    }],
    string: {
      pattern: /"(?:\\[\s\S]|[^"\\])*"/,
      greedy: true
    },
    keyword: [
      {
        pattern: /\b(?:align|offset)=/,
        inside: { operator: /=/ }
      },
      {
        pattern: /\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,
        inside: { punctuation: /\./ }
      },
      /\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/
    ],
    variable: /\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,
    number: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,
    punctuation: /[()]/
  }, function(e) {
    var t, n2 = /(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source, a = "(?:" + /\b(?:unsigned\s+)?long\s+long(?![\w-])/.source + "|" + /\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source + "|" + /(?!(?:unrestricted|unsigned)\b)/.source + n2 + /(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source + ")" + /(?:\s*\?)?/.source, r = {};
    for (t in e.languages["web-idl"] = {
      comment: {
        pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
        greedy: true
      },
      string: {
        pattern: /"[^"]*"/,
        greedy: true
      },
      namespace: {
        pattern: RegExp(/(\bnamespace\s+)/.source + n2),
        lookbehind: true
      },
      "class-name": [
        {
          pattern: /(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,
          lookbehind: true,
          inside: r
        },
        {
          pattern: RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source + a),
          lookbehind: true,
          inside: r
        },
        {
          pattern: RegExp("(" + /\bcallback\s+/.source + n2 + /\s*=\s*/.source + ")" + a),
          lookbehind: true,
          inside: r
        },
        {
          pattern: RegExp(/(\btypedef\b\s*)/.source + a),
          lookbehind: true,
          inside: r
        },
        {
          pattern: RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source + n2),
          lookbehind: true
        },
        {
          pattern: RegExp(/(:\s*)/.source + n2),
          lookbehind: true
        },
        RegExp(n2 + /(?=\s+(?:implements|includes)\b)/.source),
        {
          pattern: RegExp(/(\b(?:implements|includes)\s+)/.source + n2),
          lookbehind: true
        },
        {
          pattern: RegExp(a + "(?=" + /\s*(?:\.{3}\s*)?/.source + n2 + /\s*[(),;=]/.source + ")"),
          inside: r
        }
      ],
      builtin: /\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,
      keyword: [/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/, /\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],
      boolean: /\b(?:false|true)\b/,
      number: {
        pattern: /(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,
        lookbehind: true
      },
      operator: /\.{3}|[=:?<>-]/,
      punctuation: /[(){}[\].,;]/
    }, e.languages["web-idl"])
      t !== "class-name" && (r[t] = e.languages["web-idl"][t]);
    e.languages.webidl = e.languages["web-idl"];
  }(Prism$1), Prism$1.languages.wgsl = {
    comment: {
      pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
      greedy: true
    },
    "builtin-attribute": {
      pattern: /(@)builtin\(.*?\)/,
      lookbehind: true,
      inside: {
        attribute: {
          pattern: /^builtin/,
          alias: "attr-name"
        },
        punctuation: /[(),]/,
        "built-in-values": {
          pattern: /\b(?:frag_depth|front_facing|global_invocation_id|instance_index|local_invocation_id|local_invocation_index|num_workgroups|position|sample_index|sample_mask|vertex_index|workgroup_id)\b/,
          alias: "attr-value"
        }
      }
    },
    attributes: {
      pattern: /(@)(?:align|binding|compute|const|fragment|group|id|interpolate|invariant|location|size|vertex|workgroup_size)/i,
      lookbehind: true,
      alias: "attr-name"
    },
    functions: {
      pattern: /\b(fn\s+)[_a-zA-Z]\w*(?=[(<])/,
      lookbehind: true,
      alias: "function"
    },
    keyword: /\b(?:bitcast|break|case|const|continue|continuing|default|discard|else|enable|fallthrough|fn|for|function|if|let|loop|private|return|storage|struct|switch|type|uniform|var|while|workgroup)\b/,
    builtin: /\b(?:abs|acos|acosh|all|any|array|asin|asinh|atan|atan2|atanh|atomic|atomicAdd|atomicAnd|atomicCompareExchangeWeak|atomicExchange|atomicLoad|atomicMax|atomicMin|atomicOr|atomicStore|atomicSub|atomicXor|bool|ceil|clamp|cos|cosh|countLeadingZeros|countOneBits|countTrailingZeros|cross|degrees|determinant|distance|dot|dpdx|dpdxCoarse|dpdxFine|dpdy|dpdyCoarse|dpdyFine|exp|exp2|extractBits|f32|f64|faceForward|firstLeadingBit|floor|fma|fract|frexp|fwidth|fwidthCoarse|fwidthFine|i32|i64|insertBits|inverseSqrt|ldexp|length|log|log2|mat[2-4]x[2-4]|max|min|mix|modf|normalize|override|pack2x16float|pack2x16snorm|pack2x16unorm|pack4x8snorm|pack4x8unorm|pow|ptr|quantizeToF16|radians|reflect|refract|reverseBits|round|sampler|sampler_comparison|select|shiftLeft|shiftRight|sign|sin|sinh|smoothstep|sqrt|staticAssert|step|storageBarrier|tan|tanh|textureDimensions|textureGather|textureGatherCompare|textureLoad|textureNumLayers|textureNumLevels|textureNumSamples|textureSample|textureSampleBias|textureSampleCompare|textureSampleCompareLevel|textureSampleGrad|textureSampleLevel|textureStore|texture_1d|texture_2d|texture_2d_array|texture_3d|texture_cube|texture_cube_array|texture_depth_2d|texture_depth_2d_array|texture_depth_cube|texture_depth_cube_array|texture_depth_multisampled_2d|texture_multisampled_2d|texture_storage_1d|texture_storage_2d|texture_storage_2d_array|texture_storage_3d|transpose|trunc|u32|u64|unpack2x16float|unpack2x16snorm|unpack2x16unorm|unpack4x8snorm|unpack4x8unorm|vec[2-4]|workgroupBarrier)\b/,
    "function-calls": {
      pattern: /\b[_a-z]\w*(?=\()/i,
      alias: "function"
    },
    "class-name": /\b(?:[A-Z][A-Za-z0-9]*)\b/,
    "bool-literal": {
      pattern: /\b(?:false|true)\b/,
      alias: "boolean"
    },
    "hex-int-literal": {
      pattern: /\b0[xX][0-9a-fA-F]+[iu]?\b(?![.pP])/,
      alias: "number"
    },
    "hex-float-literal": {
      pattern: /\b0[xX][0-9a-fA-F]*(?:\.[0-9a-fA-F]*)?(?:[pP][+-]?\d+[fh]?)?/,
      alias: "number"
    },
    "decimal-float-literal": [
      {
        pattern: /\d*\.\d+(?:[eE](?:\+|-)?\d+)?[fh]?/,
        alias: "number"
      },
      {
        pattern: /\d+\.\d*(?:[eE](?:\+|-)?\d+)?[fh]?/,
        alias: "number"
      },
      {
        pattern: /\d+[eE](?:\+|-)?\d+[fh]?/,
        alias: "number"
      },
      {
        pattern: /\b\d+[fh]\b/,
        alias: "number"
      }
    ],
    "int-literal": {
      pattern: /\b\d+[iu]?\b/,
      alias: "number"
    },
    operator: [
      { pattern: /(?:\^|~|\|(?!\|)|\|\||&&|<<|>>|!)(?!=)/ },
      { pattern: /&(?![&=])/ },
      { pattern: /(?:\+=|-=|\*=|\/=|%=|\^=|&=|\|=|<<=|>>=)/ },
      {
        pattern: /(^|[^<>=!])=(?![=>])/,
        lookbehind: true
      },
      {
        pattern: /(?:==|!=|<=|\+\+|--|(^|[^=])>=)/,
        lookbehind: true
      },
      { pattern: /(?:(?:[+%]|(?:\*(?!\w)))(?!=))|(?:-(?!>))|(?:\/(?!\/))/ },
      { pattern: /->/ }
    ],
    punctuation: /[@(){}[\],;<>:.]/
  }, Prism$1.languages.wiki = Prism$1.languages.extend("markup", {
    "block-comment": {
      pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
      lookbehind: true,
      alias: "comment"
    },
    heading: {
      pattern: /^(=+)[^=\r\n].*?\1/m,
      inside: {
        punctuation: /^=+|=+$/,
        important: /.+/
      }
    },
    emphasis: {
      pattern: /('{2,5}).+?\1/,
      inside: {
        "bold-italic": {
          pattern: /(''''').+?(?=\1)/,
          lookbehind: true,
          alias: ["bold", "italic"]
        },
        bold: {
          pattern: /(''')[^'](?:.*?[^'])?(?=\1)/,
          lookbehind: true
        },
        italic: {
          pattern: /('')[^'](?:.*?[^'])?(?=\1)/,
          lookbehind: true
        },
        punctuation: /^''+|''+$/
      }
    },
    hr: {
      pattern: /^-{4,}/m,
      alias: "punctuation"
    },
    url: [/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i, /\[\[.+?\]\]|\[.+?\]/],
    variable: [
      /__[A-Z]+__/,
      /\{{3}.+?\}{3}/,
      /\{\{.+?\}\}/
    ],
    symbol: [/^#redirect/im, /~{3,5}/],
    "table-tag": {
      pattern: /((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,
      lookbehind: true,
      inside: {
        "table-bar": {
          pattern: /\|$/,
          alias: "punctuation"
        },
        rest: Prism$1.languages.markup.tag.inside
      }
    },
    punctuation: /^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m
  }), Prism$1.languages.insertBefore("wiki", "tag", { nowiki: {
    pattern: /<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,
    inside: { tag: {
      pattern: /<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,
      inside: Prism$1.languages.markup.tag.inside
    } }
  } }), Prism$1.languages.wolfram = {
    comment: /\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,
    string: {
      pattern: /"(?:\\.|[^"\\\r\n])*"/,
      greedy: true
    },
    keyword: /\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,
    context: {
      pattern: /\b\w+`+\w*/,
      alias: "class-name"
    },
    blank: {
      pattern: /\b\w+_\b/,
      alias: "regex"
    },
    "global-variable": {
      pattern: /\$\w+/,
      alias: "variable"
    },
    boolean: /\b(?:False|True)\b/,
    number: /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,
    operator: /\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
    punctuation: /[{}[\];(),.:]/
  }, Prism$1.languages.mathematica = Prism$1.languages.wolfram, Prism$1.languages.wl = Prism$1.languages.wolfram, Prism$1.languages.nb = Prism$1.languages.wolfram, Prism$1.languages.wren = {
    comment: [{
      pattern: /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,
      greedy: true
    }, {
      pattern: /(^|[^\\:])\/\/.*/,
      lookbehind: true,
      greedy: true
    }],
    "triple-quoted-string": {
      pattern: /"""[\s\S]*?"""/,
      greedy: true,
      alias: "string"
    },
    "string-literal": null,
    hashbang: {
      pattern: /^#!\/.+/,
      greedy: true,
      alias: "comment"
    },
    attribute: {
      pattern: /#!?[ \t\u3000]*\w+/,
      alias: "keyword"
    },
    "class-name": [{
      pattern: /(\bclass\s+)\w+/,
      lookbehind: true
    }, /\b[A-Z][a-z\d_]*\b/],
    constant: /\b[A-Z][A-Z\d_]*\b/,
    null: {
      pattern: /\bnull\b/,
      alias: "keyword"
    },
    keyword: /\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,
    boolean: /\b(?:false|true)\b/,
    number: /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,
    function: /\b[a-z_]\w*(?=\s*[({])/i,
    operator: /<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,
    punctuation: /[\[\](){}.,;]/
  }, Prism$1.languages.wren["string-literal"] = {
    pattern: /(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,
    lookbehind: true,
    greedy: true,
    inside: {
      interpolation: {
        pattern: /((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,
        lookbehind: true,
        inside: {
          expression: {
            pattern: /^(%\()[\s\S]+(?=\)$)/,
            lookbehind: true,
            inside: Prism$1.languages.wren
          },
          "interpolation-punctuation": {
            pattern: /^%\(|\)$/,
            alias: "punctuation"
          }
        }
      },
      string: /[\s\S]+/
    }
  }, function(e) {
    e.languages.xeora = e.languages.extend("markup", {
      constant: {
        pattern: /\$(?:DomainContents|PageRenderDuration)\$/,
        inside: { punctuation: { pattern: /\$/ } }
      },
      variable: {
        pattern: /\$@?(?:#+|[-+*~=^])?[\w.]+\$/,
        inside: {
          punctuation: { pattern: /[$.]/ },
          operator: { pattern: /#+|[-+*~=^@]/ }
        }
      },
      "function-inline": {
        pattern: /\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,
        inside: {
          variable: {
            pattern: /(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,
            inside: {
              punctuation: { pattern: /[,.|]/ },
              operator: { pattern: /#+|[-+*~=^@]/ }
            }
          },
          punctuation: { pattern: /\$\w:|[$:?.,|]/ }
        },
        alias: "function"
      },
      "function-block": {
        pattern: /\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,
        inside: { punctuation: { pattern: /[$:{}?.,|]/ } },
        alias: "function"
      },
      "directive-inline": {
        pattern: /\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,
        inside: { punctuation: {
          pattern: /\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,
          inside: { tag: { pattern: /#\d/ } }
        } },
        alias: "function"
      },
      "directive-block-open": {
        pattern: /\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,
        inside: {
          punctuation: {
            pattern: /\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,
            inside: { tag: { pattern: /#\d/ } }
          },
          attribute: {
            pattern: /![A-Z]+$/,
            inside: { punctuation: { pattern: /!/ } },
            alias: "keyword"
          }
        },
        alias: "function"
      },
      "directive-block-separator": {
        pattern: /\}:[-\w.]+:\{/,
        inside: { punctuation: { pattern: /[:{}]/ } },
        alias: "function"
      },
      "directive-block-close": {
        pattern: /\}:[-\w.]+\$/,
        inside: { punctuation: { pattern: /[:{}$]/ } },
        alias: "function"
      }
    }), e.languages.insertBefore("inside", "punctuation", { variable: e.languages.xeora["function-inline"].inside.variable }, e.languages.xeora["function-block"]), e.languages.xeoracube = e.languages.xeora;
  }(Prism$1), function(n2) {
    function e(e$1, t$1) {
      n2.languages[e$1] && n2.languages.insertBefore(e$1, "comment", { "doc-comment": t$1 });
    }
    var t = n2.languages.markup.tag, a = {
      pattern: /\/\/\/.*/,
      greedy: true,
      alias: "comment",
      inside: { tag: t }
    }, t = {
      pattern: /'''.*/,
      greedy: true,
      alias: "comment",
      inside: { tag: t }
    };
    e("csharp", a), e("fsharp", a), e("vbnet", t);
  }(Prism$1), Prism$1.languages.xojo = {
    comment: {
      pattern: /(?:'|\/\/|Rem\b).+/i,
      greedy: true
    },
    string: {
      pattern: /"(?:""|[^"])*"/,
      greedy: true
    },
    number: [/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i, /&[bchou][a-z\d]+/i],
    directive: {
      pattern: /#(?:Else|ElseIf|Endif|If|Pragma)\b/i,
      alias: "property"
    },
    keyword: /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,
    operator: /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,
    punctuation: /[.,;:()]/
  }, function(i) {
    i.languages.xquery = i.languages.extend("markup", {
      "xquery-comment": {
        pattern: /\(:[\s\S]*?:\)/,
        greedy: true,
        alias: "comment"
      },
      string: {
        pattern: /(["'])(?:\1\1|(?!\1)[\s\S])*\1/,
        greedy: true
      },
      extension: {
        pattern: /\(#.+?#\)/,
        alias: "symbol"
      },
      variable: /\$[-\w:]+/,
      axis: {
        pattern: /(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,
        lookbehind: true,
        alias: "operator"
      },
      "keyword-operator": {
        pattern: /(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,
        lookbehind: true,
        alias: "operator"
      },
      keyword: {
        pattern: /(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,
        lookbehind: true
      },
      function: /[\w-]+(?::[\w-]+)*(?=\s*\()/,
      "xquery-element": {
        pattern: /(element\s+)[\w-]+(?::[\w-]+)*/,
        lookbehind: true,
        alias: "tag"
      },
      "xquery-attribute": {
        pattern: /(attribute\s+)[\w-]+(?::[\w-]+)*/,
        lookbehind: true,
        alias: "attr-name"
      },
      builtin: {
        pattern: /(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,
        lookbehind: true
      },
      number: /\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,
      operator: [/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/, {
        pattern: /(\s)-(?=\s)/,
        lookbehind: true
      }],
      punctuation: /[[\](){},;:/]/
    }), i.languages.xquery.tag.pattern = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/, i.languages.xquery.tag.inside["attr-value"].pattern = /=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/, i.languages.xquery.tag.inside["attr-value"].inside.punctuation = /^="|"$/, i.languages.xquery.tag.inside["attr-value"].inside.expression = {
      pattern: /\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,
      inside: i.languages.xquery,
      alias: "language-xquery"
    };
    function o(e) {
      for (var t = [], n2 = 0;n2 < e.length; n2++) {
        var a = e[n2], r = false;
        typeof a != "string" && (a.type === "tag" && a.content[0] && a.content[0].type === "tag" ? a.content[0].content[0].content === "</" ? 0 < t.length && t[t.length - 1].tagName === s(a.content[0].content[1]) && t.pop() : a.content[a.content.length - 1].content !== "/>" && t.push({
          tagName: s(a.content[0].content[1]),
          openedBraces: 0
        }) : !(0 < t.length && a.type === "punctuation" && a.content === "{") || e[n2 + 1] && e[n2 + 1].type === "punctuation" && e[n2 + 1].content === "{" || e[n2 - 1] && e[n2 - 1].type === "plain-text" && e[n2 - 1].content === "{" ? 0 < t.length && 0 < t[t.length - 1].openedBraces && a.type === "punctuation" && a.content === "}" ? t[t.length - 1].openedBraces-- : a.type !== "comment" && (r = true) : t[t.length - 1].openedBraces++), (r || typeof a == "string") && 0 < t.length && t[t.length - 1].openedBraces === 0 && (r = s(a), n2 < e.length - 1 && (typeof e[n2 + 1] == "string" || e[n2 + 1].type === "plain-text") && (r += s(e[n2 + 1]), e.splice(n2 + 1, 1)), 0 < n2 && (typeof e[n2 - 1] == "string" || e[n2 - 1].type === "plain-text") && (r = s(e[n2 - 1]) + r, e.splice(n2 - 1, 1), n2--), /^\s+$/.test(r) ? e[n2] = r : e[n2] = new i.Token("plain-text", r, null, r)), a.content && typeof a.content != "string" && o(a.content);
      }
    }
    var s = function(e) {
      return typeof e == "string" ? e : typeof e.content == "string" ? e.content : e.content.map(s).join("");
    };
    i.hooks.add("after-tokenize", function(e) {
      e.language === "xquery" && o(e.tokens);
    });
  }(Prism$1), Prism$1.languages.yang = {
    comment: /\/\*[\s\S]*?\*\/|\/\/.*/,
    string: {
      pattern: /"(?:[^\\"]|\\.)*"|'[^']*'/,
      greedy: true
    },
    keyword: {
      pattern: /(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,
      lookbehind: true
    },
    namespace: {
      pattern: /(\s)[a-z_][\w.-]*(?=:)/i,
      lookbehind: true
    },
    boolean: /\b(?:false|true)\b/,
    operator: /\+/,
    punctuation: /[{};:]/
  }, function(t) {
    function e(e$1) {
      return function() {
        return e$1;
      };
    }
    var n2 = /\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/, a = "\\b(?!" + n2.source + ")(?!\\d)\\w+\\b", r = /align\s*\((?:[^()]|\([^()]*\))*\)/.source, a = "(?!\\s)(?:!?\\s*(?:" + /(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*<ALIGN>|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(/<ALIGN>/g, e(r)) + "\\s*)*" + /(?:\bpromise\b|(?:\berror\.)?<ID>(?:\.<ID>)*(?!\s+<ID>))/.source.replace(/<ID>/g, e(a)) + ")+";
    t.languages.zig = {
      comment: [{
        pattern: /\/\/[/!].*/,
        alias: "doc-comment"
      }, /\/{2}.*/],
      string: [{
        pattern: /(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,
        lookbehind: true,
        greedy: true
      }, {
        pattern: /([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,
        lookbehind: true,
        greedy: true
      }],
      char: {
        pattern: /(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,
        lookbehind: true,
        greedy: true
      },
      builtin: /\B@(?!\d)\w+(?=\s*\()/,
      label: {
        pattern: /(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,
        lookbehind: true
      },
      "class-name": [
        /\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,
        {
          pattern: RegExp(/(:\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?[=;,)])|<TYPE>(?=\s*(?:<ALIGN>\s*)?\{)/.source.replace(/<TYPE>/g, e(a)).replace(/<ALIGN>/g, e(r))),
          lookbehind: true,
          inside: null
        },
        {
          pattern: RegExp(/(\)\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?;)/.source.replace(/<TYPE>/g, e(a)).replace(/<ALIGN>/g, e(r))),
          lookbehind: true,
          inside: null
        }
      ],
      "builtin-type": {
        pattern: /\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,
        alias: "keyword"
      },
      keyword: n2,
      function: /\b(?!\d)\w+(?=\s*\()/,
      number: /\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,
      boolean: /\b(?:false|true)\b/,
      operator: /\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,
      punctuation: /[.:,;(){}[\]]/
    }, t.languages.zig["class-name"].forEach(function(e$1) {
      e$1.inside === null && (e$1.inside = t.languages.zig);
    });
  }(Prism$1);
  CodeBlock = React$1.forwardRef(({ code, fontFamily, lineNumbers, theme, language, ...rest }, ref) => {
    const languageGrammar = Prism$1.languages[language];
    if (typeof languageGrammar === "undefined")
      throw new Error(`CodeBlock: There is no language defined on Prism called ${language}`);
    const tokensPerLine = code.split(/\r\n|\r|\n/gm).map((line2) => Prism$1.tokenize(line2, languageGrammar));
    return /* @__PURE__ */ import_jsx_runtime3.jsx("pre", {
      ...rest,
      ref,
      style: {
        ...theme.base,
        width: "100%",
        ...rest.style
      },
      children: /* @__PURE__ */ import_jsx_runtime3.jsx("code", { children: tokensPerLine.map((tokensForLine, lineIndex) => /* @__PURE__ */ import_jsx_runtime3.jsxs(React$1.Fragment, { children: [
        lineNumbers ? /* @__PURE__ */ import_jsx_runtime3.jsx("span", {
          style: {
            width: "2em",
            height: "1em",
            display: "inline-block",
            fontFamily
          },
          children: lineIndex + 1
        }) : null,
        tokensForLine.map((token, i) => /* @__PURE__ */ import_jsx_runtime3.jsx(CodeBlockLine, {
          inheritedStyles: { fontFamily },
          theme,
          token
        }, i)),
        /* @__PURE__ */ import_jsx_runtime3.jsx("br", {})
      ] }, lineIndex)) })
    });
  });
  CodeBlock.displayName = "CodeBlock";
  xonokai = {
    base: {
      MozTabSize: "2",
      OTabSize: "2",
      tabSize: "2",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      whiteSpace: "pre-wrap",
      wordWrap: "normal",
      fontFamily: 'Menlo, Monaco, "Courier New", monospace',
      fontSize: "14px",
      color: "#76d9e6",
      textShadow: "none",
      background: "#2a2a2a",
      padding: "15px",
      borderRadius: "4px",
      border: "1px solid #e1e1e8",
      overflow: "auto",
      position: "relative"
    },
    namespace: { opacity: ".7" },
    comment: { color: "#6f705e" },
    prolog: { color: "#6f705e" },
    doctype: { color: "#6f705e" },
    cdata: { color: "#6f705e" },
    operator: { color: "#a77afe" },
    boolean: { color: "#a77afe" },
    number: { color: "#a77afe" },
    "attr-name": { color: "#e6d06c" },
    string: { color: "#e6d06c" },
    entity: {
      color: "#e6d06c",
      cursor: "help"
    },
    url: { color: "#e6d06c" },
    selector: { color: "#a6e22d" },
    inserted: { color: "#a6e22d" },
    atrule: { color: "#ef3b7d" },
    "attr-value": { color: "#ef3b7d" },
    keyword: { color: "#ef3b7d" },
    important: {
      color: "#ef3b7d",
      fontWeight: "bold"
    },
    deleted: { color: "#ef3b7d" },
    regex: { color: "#76d9e6" },
    statement: {
      color: "#76d9e6",
      fontWeight: "bold"
    },
    placeholder: { color: "#fff" },
    variable: { color: "#fff" },
    bold: { fontWeight: "bold" },
    punctuation: { color: "#bebec5" },
    italic: { fontStyle: "italic" }
  };
  vscDarkPlus = {
    base: {
      color: "#d4d4d4",
      fontSize: "13px",
      textShadow: "none",
      fontFamily: 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      background: "#1e1e1e"
    },
    "doctype .token.doctype-tag": { color: "#569CD6" },
    "doctype .token.name": { color: "#9cdcfe" },
    comment: { color: "#6a9955" },
    prolog: { color: "#6a9955" },
    punctuation: { color: "#d4d4d4" },
    property: { color: "#9cdcfe" },
    tag: { color: "#569cd6" },
    boolean: { color: "#569cd6" },
    number: { color: "#b5cea8" },
    constant: { color: "#9cdcfe" },
    symbol: { color: "#b5cea8" },
    inserted: { color: "#b5cea8" },
    unit: { color: "#b5cea8" },
    selector: { color: "#d7ba7d" },
    "attr-name": { color: "#9cdcfe" },
    string: { color: "#ce9178" },
    char: { color: "#ce9178" },
    builtin: { color: "#ce9178" },
    deleted: { color: "#ce9178" },
    operator: { color: "#d4d4d4" },
    entity: { color: "#569cd6" },
    "operator.arrow": { color: "#569CD6" },
    atrule: { color: "#ce9178" },
    "atrule .token.rule": { color: "#c586c0" },
    "atrule .token.url": { color: "#9cdcfe" },
    "atrule .token.url .token.function": { color: "#dcdcaa" },
    "atrule .token.url .token.punctuation": { color: "#d4d4d4" },
    keyword: { color: "#569CD6" },
    "keyword.module": { color: "#c586c0" },
    "keyword.control-flow": { color: "#c586c0" },
    function: { color: "#dcdcaa" },
    "function .token.maybe-class-name": { color: "#dcdcaa" },
    regex: { color: "#d16969" },
    important: { color: "#569cd6" },
    italic: { fontStyle: "italic" },
    "class-name": { color: "#4ec9b0" },
    "maybe-class-name": { color: "#4ec9b0" },
    console: { color: "#9cdcfe" },
    parameter: { color: "#9cdcfe" },
    interpolation: { color: "#9cdcfe" },
    "punctuation.interpolation-punctuation": { color: "#569cd6" },
    variable: { color: "#9cdcfe" },
    "imports .token.maybe-class-name": { color: "#9cdcfe" },
    "exports .token.maybe-class-name": { color: "#9cdcfe" },
    escape: { color: "#d7ba7d" },
    "tag .token.punctuation": { color: "#808080" },
    cdata: { color: "#808080" },
    "attr-value": { color: "#ce9178" },
    "attr-value .token.punctuation": { color: "#ce9178" },
    "attr-value .token.punctuation.attr-equals": { color: "#d4d4d4" },
    namespace: { color: "#4ec9b0" }
  };
  duotoneForest = {
    base: {
      fontFamily: 'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',
      fontSize: "14px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      background: "#2a2d2a",
      color: "#687d68",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#535f53" },
    prolog: { color: "#535f53" },
    doctype: { color: "#535f53" },
    cdata: { color: "#535f53" },
    punctuation: { color: "#535f53" },
    namespace: { opacity: ".7" },
    tag: { color: "#a2b34d" },
    operator: { color: "#a2b34d" },
    number: { color: "#a2b34d" },
    property: { color: "#687d68" },
    function: { color: "#687d68" },
    "tag-id": { color: "#f0fff0" },
    selector: { color: "#f0fff0" },
    "atrule-id": { color: "#f0fff0" },
    "attr-name": { color: "#b3d6b3" },
    boolean: { color: "#e5fb79" },
    string: { color: "#e5fb79" },
    entity: {
      color: "#e5fb79",
      cursor: "help"
    },
    url: { color: "#e5fb79" },
    "attr-value": { color: "#e5fb79" },
    keyword: { color: "#e5fb79" },
    control: { color: "#e5fb79" },
    directive: { color: "#e5fb79" },
    unit: { color: "#e5fb79" },
    statement: { color: "#e5fb79" },
    regex: { color: "#e5fb79" },
    atrule: { color: "#e5fb79" },
    placeholder: { color: "#e5fb79" },
    variable: { color: "#e5fb79" },
    deleted: { textDecoration: "line-through" },
    inserted: {
      borderBottom: "1px dotted #f0fff0",
      textDecoration: "none"
    },
    italic: { fontStyle: "italic" },
    important: {
      fontWeight: "bold",
      color: "#b3d6b3"
    },
    bold: { fontWeight: "bold" }
  };
  holiTheme = {
    base: {},
    comment: { color: "#446e69" },
    prolog: { color: "#446e69" },
    doctype: { color: "#446e69" },
    cdata: { color: "#446e69" },
    punctuation: { color: "#d6b007" },
    property: { color: "#d6e7ff" },
    tag: { color: "#d6e7ff" },
    boolean: { color: "#d6e7ff" },
    number: { color: "#d6e7ff" },
    constant: { color: "#d6e7ff" },
    symbol: { color: "#d6e7ff" },
    deleted: { color: "#d6e7ff" },
    selector: { color: "#e60067" },
    "attr-name": { color: "#e60067" },
    builtin: { color: "#e60067" },
    inserted: { color: "#e60067" },
    string: { color: "#49c6ec" },
    char: { color: "#49c6ec" },
    operator: {
      color: "#ec8e01",
      background: "transparent"
    },
    entity: {
      color: "#ec8e01",
      background: "transparent"
    },
    url: {
      color: "#ec8e01",
      background: "transparent"
    },
    atrule: { color: "#0fe468" },
    "attr-value": { color: "#0fe468" },
    keyword: { color: "#0fe468" },
    function: { color: "#78f3e9" },
    "class-name": { color: "#78f3e9" },
    regex: { color: "#d6e7ff" },
    important: { color: "#d6e7ff" },
    variable: { color: "#d6e7ff" }
  };
  cb = {
    base: {
      color: "#fff",
      textShadow: "0 1px 1px #000",
      fontFamily: 'Menlo, Monaco, "Courier New", monospace',
      direction: "ltr",
      textAlign: "left",
      wordSpacing: "normal",
      whiteSpace: "pre",
      wordWrap: "normal",
      lineHeight: "1.4",
      background: "#222",
      border: "0",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "15px",
      margin: "1em 0",
      overflow: "auto",
      MozBorderRadius: "8px",
      WebkitBorderRadius: "8px",
      borderRadius: "8px"
    },
    comment: { color: "#797979" },
    prolog: { color: "#797979" },
    doctype: { color: "#797979" },
    cdata: { color: "#797979" },
    selector: { color: "#fff" },
    operator: { color: "#fff" },
    punctuation: { color: "#fff" },
    namespace: { opacity: ".7" },
    tag: { color: "#ffd893" },
    boolean: { color: "#ffd893" },
    atrule: { color: "#B0C975" },
    "attr-value": { color: "#B0C975" },
    hex: { color: "#B0C975" },
    string: { color: "#B0C975" },
    property: { color: "#c27628" },
    entity: {
      color: "#c27628",
      cursor: "help"
    },
    url: { color: "#c27628" },
    "attr-name": { color: "#c27628" },
    keyword: { color: "#c27628" },
    regex: { color: "#9B71C6" },
    function: { color: "#e5a638" },
    constant: { color: "#e5a638" },
    variable: { color: "#fdfba8" },
    number: { color: "#8799B0" },
    important: { color: "#E45734" },
    deliminator: { color: "#E45734" }
  };
  vs = {
    base: {
      color: "#393A34",
      fontFamily: '"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      fontSize: ".9em",
      lineHeight: "1.2em",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      border: "1px solid #dddddd",
      backgroundColor: "white"
    },
    comment: {
      color: "#008000",
      fontStyle: "italic"
    },
    prolog: {
      color: "#008000",
      fontStyle: "italic"
    },
    doctype: {
      color: "#008000",
      fontStyle: "italic"
    },
    cdata: {
      color: "#008000",
      fontStyle: "italic"
    },
    namespace: { opacity: ".7" },
    string: { color: "#A31515" },
    punctuation: { color: "#393A34" },
    operator: { color: "#393A34" },
    url: { color: "#36acaa" },
    symbol: { color: "#36acaa" },
    number: { color: "#36acaa" },
    boolean: { color: "#36acaa" },
    variable: { color: "#36acaa" },
    constant: { color: "#36acaa" },
    inserted: { color: "#36acaa" },
    atrule: { color: "#0000ff" },
    keyword: { color: "#0000ff" },
    "attr-value": { color: "#0000ff" },
    function: { color: "#393A34" },
    deleted: { color: "#9a050f" },
    selector: { color: "#800000" },
    important: {
      color: "#e90",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    "class-name": { color: "#2B91AF" },
    tag: { color: "#800000" },
    "attr-name": { color: "#ff0000" },
    property: { color: "#ff0000" },
    regex: { color: "#ff0000" },
    entity: { color: "#ff0000" },
    "directive.tag .tag": {
      background: "#ffff00",
      color: "#393A34"
    }
  };
  materialDark = {
    base: {
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      color: "#eee",
      background: "#2f2f2f",
      fontFamily: "Roboto Mono, monospace",
      fontSize: "1em",
      lineHeight: "1.5em",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      overflow: "auto",
      position: "relative",
      margin: "0.5em 0",
      padding: "1.25em 1em"
    },
    atrule: { color: "#c792ea" },
    "attr-name": { color: "#ffcb6b" },
    "attr-value": { color: "#a5e844" },
    attribute: { color: "#a5e844" },
    boolean: { color: "#c792ea" },
    builtin: { color: "#ffcb6b" },
    cdata: { color: "#80cbc4" },
    char: { color: "#80cbc4" },
    class: { color: "#ffcb6b" },
    "class-name": { color: "#f2ff00" },
    comment: { color: "#616161" },
    constant: { color: "#c792ea" },
    deleted: { color: "#ff6666" },
    doctype: { color: "#616161" },
    entity: { color: "#ff6666" },
    function: { color: "#c792ea" },
    hexcode: { color: "#f2ff00" },
    id: {
      color: "#c792ea",
      fontWeight: "bold"
    },
    important: {
      color: "#c792ea",
      fontWeight: "bold"
    },
    inserted: { color: "#80cbc4" },
    keyword: { color: "#c792ea" },
    number: { color: "#fd9170" },
    operator: { color: "#89ddff" },
    prolog: { color: "#616161" },
    property: { color: "#80cbc4" },
    "pseudo-class": { color: "#a5e844" },
    "pseudo-element": { color: "#a5e844" },
    punctuation: { color: "#89ddff" },
    regex: { color: "#f2ff00" },
    selector: { color: "#ff6666" },
    string: { color: "#a5e844" },
    symbol: { color: "#c792ea" },
    tag: { color: "#ff6666" },
    unit: { color: "#fd9170" },
    url: { color: "#ff6666" },
    variable: { color: "#ff6666" }
  };
  dracula = {
    base: {
      color: "#f8f8f2",
      background: "#282a36",
      textShadow: "0 1px rgba(0, 0, 0, 0.3)",
      fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      borderRadius: "0.3em"
    },
    comment: { color: "#6272a4" },
    prolog: { color: "#6272a4" },
    doctype: { color: "#6272a4" },
    cdata: { color: "#6272a4" },
    punctuation: { color: "#f8f8f2" },
    property: { color: "#ff79c6" },
    tag: { color: "#ff79c6" },
    constant: { color: "#ff79c6" },
    symbol: { color: "#ff79c6" },
    deleted: { color: "#ff79c6" },
    boolean: { color: "#bd93f9" },
    number: { color: "#bd93f9" },
    selector: { color: "#50fa7b" },
    "attr-name": { color: "#50fa7b" },
    string: { color: "#50fa7b" },
    char: { color: "#50fa7b" },
    builtin: { color: "#50fa7b" },
    inserted: { color: "#50fa7b" },
    operator: { color: "#f8f8f2" },
    entity: {
      color: "#f8f8f2",
      cursor: "help"
    },
    url: { color: "#f8f8f2" },
    variable: { color: "#f8f8f2" },
    atrule: { color: "#f1fa8c" },
    "attr-value": { color: "#f1fa8c" },
    function: { color: "#f1fa8c" },
    "class-name": { color: "#f1fa8c" },
    keyword: { color: "#8be9fd" },
    regex: { color: "#ffb86c" },
    important: {
      color: "#ffb86c",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  shadesOfPurple = {
    base: {},
    "": { fontWeight: "400" },
    comment: { color: "#b362ff" },
    prolog: { color: "#b362ff" },
    cdata: { color: "#b362ff" },
    delimiter: { color: "#ff9d00" },
    keyword: { color: "#ff9d00" },
    selector: { color: "#ff9d00" },
    important: { color: "#ff9d00" },
    atrule: { color: "#ff9d00" },
    operator: {
      color: "rgb(255, 180, 84)",
      background: "none"
    },
    "attr-name": { color: "rgb(255, 180, 84)" },
    punctuation: { color: "#ffffff" },
    boolean: { color: "rgb(255, 98, 140)" },
    tag: { color: "rgb(255, 157, 0)" },
    "tag .punctuation": { color: "rgb(255, 157, 0)" },
    doctype: { color: "rgb(255, 157, 0)" },
    builtin: { color: "rgb(255, 157, 0)" },
    entity: {
      color: "#6897bb",
      background: "none"
    },
    symbol: { color: "#6897bb" },
    number: { color: "#ff628c" },
    property: { color: "#ff628c" },
    constant: { color: "#ff628c" },
    variable: { color: "#ff628c" },
    string: { color: "#a5ff90" },
    char: { color: "#a5ff90" },
    "attr-value": { color: "#a5c261" },
    "attr-value .punctuation": { color: "#a5c261" },
    "attr-value .punctuation:first-child": { color: "#a9b7c6" },
    url: {
      color: "#287bde",
      textDecoration: "underline",
      background: "none"
    },
    function: { color: "rgb(250, 208, 0)" },
    regex: { background: "#364135" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    inserted: { background: "#00ff00" },
    deleted: { background: "#ff000d" },
    "class-name": { color: "#fb94ff" }
  };
  gruvboxDark = {
    base: {
      color: "#ebdbb2",
      fontFamily: 'Consolas, Monaco, "Andale Mono", monospace',
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto",
      background: "#1d2021"
    },
    comment: { color: "#a89984" },
    prolog: { color: "#a89984" },
    cdata: { color: "#a89984" },
    delimiter: { color: "#fb4934" },
    boolean: { color: "#fb4934" },
    keyword: { color: "#fb4934" },
    selector: { color: "#fb4934" },
    important: { color: "#fb4934" },
    atrule: { color: "#fb4934" },
    operator: { color: "#a89984" },
    punctuation: { color: "#a89984" },
    "attr-name": { color: "#a89984" },
    tag: { color: "#fabd2f" },
    "tag .punctuation": { color: "#fabd2f" },
    doctype: { color: "#fabd2f" },
    builtin: { color: "#fabd2f" },
    entity: { color: "#d3869b" },
    number: { color: "#d3869b" },
    symbol: { color: "#d3869b" },
    property: { color: "#fb4934" },
    constant: { color: "#fb4934" },
    variable: { color: "#fb4934" },
    string: { color: "#b8bb26" },
    char: { color: "#b8bb26" },
    "attr-value": { color: "#a89984" },
    "attr-value .punctuation": { color: "#a89984" },
    url: {
      color: "#b8bb26",
      textDecoration: "underline"
    },
    function: { color: "#fabd2f" },
    regex: { background: "#b8bb26" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    inserted: { background: "#a89984" },
    deleted: { background: "#fb4934" }
  };
  baseAteliersulphurpoolLight = {
    base: {
      fontFamily: 'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',
      fontSize: "14px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      background: "#f5f7ff",
      color: "#5e6687",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#898ea4" },
    prolog: { color: "#898ea4" },
    doctype: { color: "#898ea4" },
    cdata: { color: "#898ea4" },
    punctuation: { color: "#5e6687" },
    namespace: { opacity: ".7" },
    operator: { color: "#c76b29" },
    boolean: { color: "#c76b29" },
    number: { color: "#c76b29" },
    property: { color: "#c08b30" },
    tag: { color: "#3d8fd1" },
    string: { color: "#22a2c9" },
    selector: { color: "#6679cc" },
    "attr-name": { color: "#c76b29" },
    entity: {
      color: "#22a2c9",
      cursor: "help"
    },
    url: { color: "#22a2c9" },
    "attr-value": { color: "#ac9739" },
    keyword: { color: "#ac9739" },
    control: { color: "#ac9739" },
    directive: { color: "#ac9739" },
    unit: { color: "#ac9739" },
    statement: { color: "#22a2c9" },
    regex: { color: "#22a2c9" },
    atrule: { color: "#22a2c9" },
    placeholder: { color: "#3d8fd1" },
    variable: { color: "#3d8fd1" },
    deleted: { textDecoration: "line-through" },
    inserted: {
      borderBottom: "1px dotted #202746",
      textDecoration: "none"
    },
    italic: { fontStyle: "italic" },
    important: {
      fontWeight: "bold",
      color: "#c94922"
    },
    bold: { fontWeight: "bold" }
  };
  coldarkCold = {
    base: {
      color: "#111b27",
      background: "#e3eaf2",
      fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto"
    },
    comment: { color: "#3c526d" },
    prolog: { color: "#3c526d" },
    doctype: { color: "#3c526d" },
    cdata: { color: "#3c526d" },
    punctuation: { color: "#111b27" },
    "delimiter.important": {
      color: "#006d6d",
      fontWeight: "inherit"
    },
    "selector .parent": { color: "#006d6d" },
    tag: { color: "#006d6d" },
    "tag .token.punctuation": { color: "#006d6d" },
    "attr-name": { color: "#755f00" },
    boolean: { color: "#755f00" },
    "boolean.important": { color: "#755f00" },
    number: { color: "#755f00" },
    constant: { color: "#755f00" },
    "selector .token.attribute": { color: "#755f00" },
    "class-name": { color: "#005a8e" },
    key: { color: "#005a8e" },
    parameter: { color: "#005a8e" },
    property: { color: "#005a8e" },
    "property-access": { color: "#005a8e" },
    variable: { color: "#005a8e" },
    "attr-value": { color: "#116b00" },
    inserted: { color: "#116b00" },
    color: { color: "#116b00" },
    "selector .token.value": { color: "#116b00" },
    string: { color: "#116b00" },
    "string .token.url-link": { color: "#116b00" },
    builtin: { color: "#af00af" },
    "keyword-array": { color: "#af00af" },
    package: { color: "#af00af" },
    regex: { color: "#af00af" },
    function: { color: "#7c00aa" },
    "selector .token.class": { color: "#7c00aa" },
    "selector .token.id": { color: "#7c00aa" },
    "atrule .token.rule": { color: "#a04900" },
    combinator: { color: "#a04900" },
    keyword: { color: "#a04900" },
    operator: { color: "#a04900" },
    "pseudo-class": { color: "#a04900" },
    "pseudo-element": { color: "#a04900" },
    selector: { color: "#a04900" },
    unit: { color: "#a04900" },
    deleted: { color: "#c22f2e" },
    important: {
      color: "#c22f2e",
      fontWeight: "bold"
    },
    "keyword-this": {
      color: "#005a8e",
      fontWeight: "bold"
    },
    this: {
      color: "#005a8e",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    entity: { cursor: "help" },
    "token.tab:not(:empty):before": { color: "#3c526d" },
    "token.cr:before": { color: "#3c526d" },
    "token.lf:before": { color: "#3c526d" },
    "token.space:before": { color: "#3c526d" }
  };
  solarizedDarkAtom = {
    base: {
      color: "#839496",
      textShadow: "0 1px rgba(0, 0, 0, 0.3)",
      fontFamily: "Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      borderRadius: "0.3em",
      background: "#002b36"
    },
    comment: { color: "#586e75" },
    prolog: { color: "#586e75" },
    doctype: { color: "#586e75" },
    cdata: { color: "#586e75" },
    punctuation: { color: "#93a1a1" },
    property: { color: "#268bd2" },
    keyword: { color: "#268bd2" },
    tag: { color: "#268bd2" },
    "class-name": {
      color: "#FFFFB6",
      textDecoration: "underline"
    },
    boolean: { color: "#b58900" },
    constant: { color: "#b58900" },
    symbol: { color: "#dc322f" },
    deleted: { color: "#dc322f" },
    number: { color: "#859900" },
    selector: { color: "#859900" },
    "attr-name": { color: "#859900" },
    string: { color: "#859900" },
    char: { color: "#859900" },
    builtin: { color: "#859900" },
    inserted: { color: "#859900" },
    variable: { color: "#268bd2" },
    operator: { color: "#EDEDED" },
    function: { color: "#268bd2" },
    regex: { color: "#E9C062" },
    important: {
      color: "#fd971f",
      fontWeight: "bold"
    },
    entity: {
      color: "#FFFFB6",
      cursor: "help"
    },
    url: { color: "#96CBFE" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    atrule: { color: "#F9EE98" },
    "attr-value": { color: "#F9EE98" }
  };
  synthwave84 = {
    base: {
      color: "#f92aad",
      textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",
      background: "none",
      fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
      fontSize: "1em",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      backgroundColor: "transparent !important",
      backgroundImage: "linear-gradient(to bottom, #2a2139 75%, #34294f)"
    },
    comment: { color: "#8e8e8e" },
    "block-comment": { color: "#8e8e8e" },
    prolog: { color: "#8e8e8e" },
    doctype: { color: "#8e8e8e" },
    cdata: { color: "#8e8e8e" },
    punctuation: { color: "#ccc" },
    tag: { color: "#e2777a" },
    "attr-name": { color: "#e2777a" },
    namespace: { color: "#e2777a" },
    number: { color: "#e2777a" },
    unit: { color: "#e2777a" },
    hexcode: { color: "#e2777a" },
    deleted: { color: "#e2777a" },
    property: {
      color: "#72f1b8",
      textShadow: "0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"
    },
    selector: {
      color: "#72f1b8",
      textShadow: "0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"
    },
    "function-name": { color: "#6196cc" },
    boolean: {
      color: "#fdfdfd",
      textShadow: "0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"
    },
    "selector .token.id": {
      color: "#fdfdfd",
      textShadow: "0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"
    },
    function: {
      color: "#fdfdfd",
      textShadow: "0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"
    },
    "class-name": {
      color: "#fff5f6",
      textShadow: "0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"
    },
    constant: {
      color: "#f92aad",
      textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
    },
    symbol: {
      color: "#f92aad",
      textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
    },
    important: {
      color: "#f4eee4",
      textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575",
      fontWeight: "bold"
    },
    atrule: {
      color: "#f4eee4",
      textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
    },
    keyword: {
      color: "#f4eee4",
      textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
    },
    "selector .token.class": {
      color: "#f4eee4",
      textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
    },
    builtin: {
      color: "#f4eee4",
      textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
    },
    string: { color: "#f87c32" },
    char: { color: "#f87c32" },
    "attr-value": { color: "#f87c32" },
    regex: { color: "#f87c32" },
    variable: { color: "#f87c32" },
    operator: { color: "#67cdcc" },
    entity: {
      color: "#67cdcc",
      cursor: "help"
    },
    url: { color: "#67cdcc" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    inserted: { color: "green" }
  };
  materialOceanic = {
    base: {
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      color: "#c3cee3",
      background: "#263238",
      fontFamily: "Roboto Mono, monospace",
      fontSize: "1em",
      lineHeight: "1.5em",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      overflow: "auto",
      position: "relative",
      margin: "0.5em 0",
      padding: "1.25em 1em"
    },
    atrule: { color: "#c792ea" },
    "attr-name": { color: "#ffcb6b" },
    "attr-value": { color: "#c3e88d" },
    attribute: { color: "#c3e88d" },
    boolean: { color: "#c792ea" },
    builtin: { color: "#ffcb6b" },
    cdata: { color: "#80cbc4" },
    char: { color: "#80cbc4" },
    class: { color: "#ffcb6b" },
    "class-name": { color: "#f2ff00" },
    color: { color: "#f2ff00" },
    comment: { color: "#546e7a" },
    constant: { color: "#c792ea" },
    deleted: { color: "#f07178" },
    doctype: { color: "#546e7a" },
    entity: { color: "#f07178" },
    function: { color: "#c792ea" },
    hexcode: { color: "#f2ff00" },
    id: {
      color: "#c792ea",
      fontWeight: "bold"
    },
    important: {
      color: "#c792ea",
      fontWeight: "bold"
    },
    inserted: { color: "#80cbc4" },
    keyword: {
      color: "#c792ea",
      fontStyle: "italic"
    },
    number: { color: "#fd9170" },
    operator: { color: "#89ddff" },
    prolog: { color: "#546e7a" },
    property: { color: "#80cbc4" },
    "pseudo-class": { color: "#c3e88d" },
    "pseudo-element": { color: "#c3e88d" },
    punctuation: { color: "#89ddff" },
    regex: { color: "#f2ff00" },
    selector: { color: "#f07178" },
    string: { color: "#c3e88d" },
    symbol: { color: "#c792ea" },
    tag: { color: "#f07178" },
    unit: { color: "#f07178" },
    url: { color: "#fd9170" },
    variable: { color: "#f07178" }
  };
  duotoneSpace = {
    base: {
      fontFamily: 'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',
      fontSize: "14px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      background: "#24242e",
      color: "#767693",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#5b5b76" },
    prolog: { color: "#5b5b76" },
    doctype: { color: "#5b5b76" },
    cdata: { color: "#5b5b76" },
    punctuation: { color: "#5b5b76" },
    namespace: { opacity: ".7" },
    tag: { color: "#dd672c" },
    operator: { color: "#dd672c" },
    number: { color: "#dd672c" },
    property: { color: "#767693" },
    function: { color: "#767693" },
    "tag-id": { color: "#ebebff" },
    selector: { color: "#ebebff" },
    "atrule-id": { color: "#ebebff" },
    "attr-name": { color: "#aaaaca" },
    boolean: { color: "#fe8c52" },
    string: { color: "#fe8c52" },
    entity: {
      color: "#fe8c52",
      cursor: "help"
    },
    url: { color: "#fe8c52" },
    "attr-value": { color: "#fe8c52" },
    keyword: { color: "#fe8c52" },
    control: { color: "#fe8c52" },
    directive: { color: "#fe8c52" },
    unit: { color: "#fe8c52" },
    statement: { color: "#fe8c52" },
    regex: { color: "#fe8c52" },
    atrule: { color: "#fe8c52" },
    placeholder: { color: "#fe8c52" },
    variable: { color: "#fe8c52" },
    deleted: { textDecoration: "line-through" },
    inserted: {
      borderBottom: "1px dotted #ebebff",
      textDecoration: "none"
    },
    italic: { fontStyle: "italic" },
    important: {
      fontWeight: "bold",
      color: "#aaaaca"
    },
    bold: { fontWeight: "bold" }
  };
  materialLight = {
    base: {
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      color: "#90a4ae",
      background: "#fafafa",
      fontFamily: "Roboto Mono, monospace",
      fontSize: "1em",
      lineHeight: "1.5em",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      overflow: "auto",
      position: "relative",
      margin: "0.5em 0",
      padding: "1.25em 1em"
    },
    atrule: { color: "#7c4dff" },
    "attr-name": { color: "#39adb5" },
    "attr-value": { color: "#f6a434" },
    attribute: { color: "#f6a434" },
    boolean: { color: "#7c4dff" },
    builtin: { color: "#39adb5" },
    cdata: { color: "#39adb5" },
    char: { color: "#39adb5" },
    class: { color: "#39adb5" },
    "class-name": { color: "#6182b8" },
    comment: { color: "#aabfc9" },
    constant: { color: "#7c4dff" },
    deleted: { color: "#e53935" },
    doctype: { color: "#aabfc9" },
    entity: { color: "#e53935" },
    function: { color: "#7c4dff" },
    hexcode: { color: "#f76d47" },
    id: {
      color: "#7c4dff",
      fontWeight: "bold"
    },
    important: {
      color: "#7c4dff",
      fontWeight: "bold"
    },
    inserted: { color: "#39adb5" },
    keyword: { color: "#7c4dff" },
    number: { color: "#f76d47" },
    operator: { color: "#39adb5" },
    prolog: { color: "#aabfc9" },
    property: { color: "#39adb5" },
    "pseudo-class": { color: "#f6a434" },
    "pseudo-element": { color: "#f6a434" },
    punctuation: { color: "#39adb5" },
    regex: { color: "#6182b8" },
    selector: { color: "#e53935" },
    string: { color: "#f6a434" },
    symbol: { color: "#7c4dff" },
    tag: { color: "#e53935" },
    unit: { color: "#f76d47" },
    url: { color: "#e53935" },
    variable: { color: "#e53935" }
  };
  duotoneSea = {
    base: {
      fontFamily: 'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',
      fontSize: "14px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      background: "#1d262f",
      color: "#57718e",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#4a5f78" },
    prolog: { color: "#4a5f78" },
    doctype: { color: "#4a5f78" },
    cdata: { color: "#4a5f78" },
    punctuation: { color: "#4a5f78" },
    namespace: { opacity: ".7" },
    tag: { color: "#0aa370" },
    operator: { color: "#0aa370" },
    number: { color: "#0aa370" },
    property: { color: "#57718e" },
    function: { color: "#57718e" },
    "tag-id": { color: "#ebf4ff" },
    selector: { color: "#ebf4ff" },
    "atrule-id": { color: "#ebf4ff" },
    "attr-name": { color: "#7eb6f6" },
    boolean: { color: "#47ebb4" },
    string: { color: "#47ebb4" },
    entity: {
      color: "#47ebb4",
      cursor: "help"
    },
    url: { color: "#47ebb4" },
    "attr-value": { color: "#47ebb4" },
    keyword: { color: "#47ebb4" },
    control: { color: "#47ebb4" },
    directive: { color: "#47ebb4" },
    unit: { color: "#47ebb4" },
    statement: { color: "#47ebb4" },
    regex: { color: "#47ebb4" },
    atrule: { color: "#47ebb4" },
    placeholder: { color: "#47ebb4" },
    variable: { color: "#47ebb4" },
    deleted: { textDecoration: "line-through" },
    inserted: {
      borderBottom: "1px dotted #ebf4ff",
      textDecoration: "none"
    },
    italic: { fontStyle: "italic" },
    important: {
      fontWeight: "bold",
      color: "#7eb6f6"
    },
    bold: { fontWeight: "bold" }
  };
  a11yDark = {
    base: {
      color: "#f8f8f2",
      background: "#2b2b2b",
      fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto",
      borderRadius: "0.3em"
    },
    comment: { color: "#d4d0ab" },
    prolog: { color: "#d4d0ab" },
    doctype: { color: "#d4d0ab" },
    cdata: { color: "#d4d0ab" },
    punctuation: { color: "#fefefe" },
    property: { color: "#ffa07a" },
    tag: { color: "#ffa07a" },
    constant: { color: "#ffa07a" },
    symbol: { color: "#ffa07a" },
    deleted: { color: "#ffa07a" },
    boolean: { color: "#00e0e0" },
    number: { color: "#00e0e0" },
    selector: { color: "#abe338" },
    "attr-name": { color: "#abe338" },
    string: { color: "#abe338" },
    char: { color: "#abe338" },
    builtin: { color: "#abe338" },
    inserted: { color: "#abe338" },
    operator: { color: "#00e0e0" },
    entity: {
      color: "#00e0e0",
      cursor: "help"
    },
    url: { color: "#00e0e0" },
    variable: { color: "#00e0e0" },
    atrule: { color: "#ffd700" },
    "attr-value": { color: "#ffd700" },
    function: { color: "#ffd700" },
    keyword: { color: "#00e0e0" },
    regex: { color: "#ffd700" },
    important: {
      color: "#ffd700",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  darcula = {
    base: {
      color: "#a9b7c6",
      fontFamily: "Consolas, Monaco, 'Andale Mono', monospace",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      background: "#2b2b2b"
    },
    comment: { color: "#808080" },
    prolog: { color: "#808080" },
    cdata: { color: "#808080" },
    delimiter: { color: "#cc7832" },
    boolean: { color: "#cc7832" },
    keyword: { color: "#cc7832" },
    selector: { color: "#cc7832" },
    important: { color: "#cc7832" },
    atrule: { color: "#cc7832" },
    operator: { color: "#a9b7c6" },
    punctuation: { color: "#a9b7c6" },
    "attr-name": { color: "#a9b7c6" },
    tag: { color: "#e8bf6a" },
    "tag .punctuation": { color: "#e8bf6a" },
    doctype: { color: "#e8bf6a" },
    builtin: { color: "#e8bf6a" },
    entity: { color: "#6897bb" },
    number: { color: "#6897bb" },
    symbol: { color: "#6897bb" },
    property: { color: "#9876aa" },
    constant: { color: "#9876aa" },
    variable: { color: "#9876aa" },
    string: { color: "#6a8759" },
    char: { color: "#6a8759" },
    "attr-value": { color: "#a5c261" },
    "attr-value .punctuation": { color: "#a5c261" },
    "attr-value .punctuation:first-child": { color: "#a9b7c6" },
    url: {
      color: "#287bde",
      textDecoration: "underline"
    },
    function: { color: "#ffc66d" },
    regex: { background: "#364135" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    inserted: { background: "#294436" },
    deleted: { background: "#484a4a" }
  };
  zTouch = {
    base: {
      color: "white",
      fontFamily: "monospace",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      lineHeight: "25px",
      fontSize: "18px",
      margin: "0.5em 0",
      background: "#0a143c",
      padding: "1em",
      overflow: "auto"
    },
    comment: {
      color: "rgb(99, 119, 119)",
      fontStyle: "italic"
    },
    prolog: {
      color: "rgb(99, 119, 119)",
      fontStyle: "italic"
    },
    cdata: {
      color: "rgb(99, 119, 119)",
      fontStyle: "italic"
    },
    punctuation: { color: "rgb(199, 146, 234)" },
    deleted: {
      color: "rgba(239, 83, 80, 0.56)",
      fontStyle: "italic"
    },
    symbol: { color: "rgb(128, 203, 196)" },
    property: { color: "rgb(128, 203, 196)" },
    tag: { color: "rgb(127, 219, 202)" },
    operator: { color: "rgb(127, 219, 202)" },
    keyword: { color: "rgb(127, 219, 202)" },
    boolean: { color: "rgb(255, 88, 116)" },
    number: { color: "rgb(247, 140, 108)" },
    constant: { color: "rgb(34 183 199)" },
    function: { color: "rgb(34 183 199)" },
    builtin: { color: "rgb(34 183 199)" },
    char: { color: "rgb(34 183 199)" },
    selector: {
      color: "rgb(199, 146, 234)",
      fontStyle: "italic"
    },
    doctype: {
      color: "rgb(199, 146, 234)",
      fontStyle: "italic"
    },
    "attr-name": {
      color: "rgb(173, 219, 103)",
      fontStyle: "italic"
    },
    inserted: {
      color: "rgb(173, 219, 103)",
      fontStyle: "italic"
    },
    string: { color: "rgb(173, 219, 103)" },
    url: { color: "rgb(173, 219, 103)" },
    entity: { color: "rgb(173, 219, 103)" },
    "class-name": { color: "rgb(255, 203, 139)" },
    atrule: { color: "rgb(255, 203, 139)" },
    "attr-value": { color: "rgb(255, 203, 139)" },
    regex: { color: "rgb(214, 222, 235)" },
    important: {
      color: "rgb(214, 222, 235)",
      fontWeight: "bold"
    },
    variable: { color: "rgb(214, 222, 235)" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  duotoneEarth = {
    base: {
      fontFamily: 'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',
      fontSize: "14px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      background: "#322d29",
      color: "#88786d",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#6a5f58" },
    prolog: { color: "#6a5f58" },
    doctype: { color: "#6a5f58" },
    cdata: { color: "#6a5f58" },
    punctuation: { color: "#6a5f58" },
    namespace: { opacity: ".7" },
    tag: { color: "#bfa05a" },
    operator: { color: "#bfa05a" },
    number: { color: "#bfa05a" },
    property: { color: "#88786d" },
    function: { color: "#88786d" },
    "tag-id": { color: "#fff3eb" },
    selector: { color: "#fff3eb" },
    "atrule-id": { color: "#fff3eb" },
    "attr-name": { color: "#a48774" },
    boolean: { color: "#fcc440" },
    string: { color: "#fcc440" },
    entity: {
      color: "#fcc440",
      cursor: "help"
    },
    url: { color: "#fcc440" },
    "attr-value": { color: "#fcc440" },
    keyword: { color: "#fcc440" },
    control: { color: "#fcc440" },
    directive: { color: "#fcc440" },
    unit: { color: "#fcc440" },
    statement: { color: "#fcc440" },
    regex: { color: "#fcc440" },
    atrule: { color: "#fcc440" },
    placeholder: { color: "#fcc440" },
    variable: { color: "#fcc440" },
    deleted: { textDecoration: "line-through" },
    inserted: {
      borderBottom: "1px dotted #fff3eb",
      textDecoration: "none"
    },
    italic: { fontStyle: "italic" },
    important: {
      fontWeight: "bold",
      color: "#a48774"
    },
    bold: { fontWeight: "bold" }
  };
  gruvboxLight = {
    base: {
      color: "#3c3836",
      fontFamily: 'Consolas, Monaco, "Andale Mono", monospace',
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto",
      background: "#f9f5d7"
    },
    comment: { color: "#7c6f64" },
    prolog: { color: "#7c6f64" },
    cdata: { color: "#7c6f64" },
    delimiter: { color: "#9d0006" },
    boolean: { color: "#9d0006" },
    keyword: { color: "#9d0006" },
    selector: { color: "#9d0006" },
    important: { color: "#9d0006" },
    atrule: { color: "#9d0006" },
    operator: { color: "#7c6f64" },
    punctuation: { color: "#7c6f64" },
    "attr-name": { color: "#7c6f64" },
    tag: { color: "#b57614" },
    "tag .punctuation": { color: "#b57614" },
    doctype: { color: "#b57614" },
    builtin: { color: "#b57614" },
    entity: { color: "#8f3f71" },
    number: { color: "#8f3f71" },
    symbol: { color: "#8f3f71" },
    property: { color: "#9d0006" },
    constant: { color: "#9d0006" },
    variable: { color: "#9d0006" },
    string: { color: "#797403" },
    char: { color: "#797403" },
    "attr-value": { color: "#7c6f64" },
    "attr-value .punctuation": { color: "#7c6f64" },
    url: {
      color: "#797403",
      textDecoration: "underline"
    },
    function: { color: "#b57614" },
    regex: { background: "#797403" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    inserted: { background: "#7c6f64" },
    deleted: { background: "#9d0006" }
  };
  oneDark = {
    base: {
      background: "hsl(220, 13%, 18%)",
      color: "hsl(220, 14%, 71%)",
      textShadow: "0 1px rgba(0, 0, 0, 0.3)",
      fontFamily: '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "2",
      OTabSize: "2",
      tabSize: "2",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto",
      borderRadius: "0.3em"
    },
    comment: {
      color: "hsl(220, 10%, 40%)",
      fontStyle: "italic"
    },
    prolog: { color: "hsl(220, 10%, 40%)" },
    cdata: { color: "hsl(220, 10%, 40%)" },
    doctype: { color: "hsl(220, 14%, 71%)" },
    punctuation: { color: "hsl(220, 14%, 71%)" },
    entity: {
      color: "hsl(220, 14%, 71%)",
      cursor: "help"
    },
    "attr-name": { color: "hsl(29, 54%, 61%)" },
    "class-name": { color: "hsl(29, 54%, 61%)" },
    boolean: { color: "hsl(29, 54%, 61%)" },
    constant: { color: "hsl(29, 54%, 61%)" },
    number: { color: "hsl(29, 54%, 61%)" },
    atrule: { color: "hsl(29, 54%, 61%)" },
    keyword: { color: "hsl(286, 60%, 67%)" },
    property: { color: "hsl(355, 65%, 65%)" },
    tag: { color: "hsl(355, 65%, 65%)" },
    symbol: { color: "hsl(355, 65%, 65%)" },
    deleted: { color: "hsl(355, 65%, 65%)" },
    important: { color: "hsl(355, 65%, 65%)" },
    selector: { color: "hsl(95, 38%, 62%)" },
    string: { color: "hsl(95, 38%, 62%)" },
    char: { color: "hsl(95, 38%, 62%)" },
    builtin: { color: "hsl(95, 38%, 62%)" },
    inserted: { color: "hsl(95, 38%, 62%)" },
    regex: { color: "hsl(95, 38%, 62%)" },
    "attr-value": { color: "hsl(95, 38%, 62%)" },
    "attr-value > .token.punctuation": { color: "hsl(95, 38%, 62%)" },
    variable: { color: "hsl(207, 82%, 66%)" },
    operator: { color: "hsl(207, 82%, 66%)" },
    function: { color: "hsl(207, 82%, 66%)" },
    url: { color: "hsl(187, 47%, 55%)" },
    "attr-value > .token.punctuation.attr-equals": { color: "hsl(220, 14%, 71%)" },
    "special-attr > .token.attr-value > .token.value.css": { color: "hsl(220, 14%, 71%)" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    namespace: { opacity: "0.8" },
    "token.tab:not(:empty):before": {
      color: "hsla(220, 14%, 71%, 0.15)",
      textShadow: "none"
    },
    "token.cr:before": {
      color: "hsla(220, 14%, 71%, 0.15)",
      textShadow: "none"
    },
    "token.lf:before": {
      color: "hsla(220, 14%, 71%, 0.15)",
      textShadow: "none"
    },
    "token.space:before": {
      color: "hsla(220, 14%, 71%, 0.15)",
      textShadow: "none"
    }
  };
  duotoneDark = {
    base: {
      fontFamily: 'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',
      fontSize: "14px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      background: "#2a2734",
      color: "#9a86fd",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#6c6783" },
    prolog: { color: "#6c6783" },
    doctype: { color: "#6c6783" },
    cdata: { color: "#6c6783" },
    punctuation: { color: "#6c6783" },
    namespace: { opacity: ".7" },
    tag: { color: "#e09142" },
    operator: { color: "#e09142" },
    number: { color: "#e09142" },
    property: { color: "#9a86fd" },
    function: { color: "#9a86fd" },
    "tag-id": { color: "#eeebff" },
    selector: { color: "#eeebff" },
    "atrule-id": { color: "#eeebff" },
    "attr-name": { color: "#c4b9fe" },
    boolean: { color: "#ffcc99" },
    string: { color: "#ffcc99" },
    entity: {
      color: "#ffcc99",
      cursor: "help"
    },
    url: { color: "#ffcc99" },
    "attr-value": { color: "#ffcc99" },
    keyword: { color: "#ffcc99" },
    control: { color: "#ffcc99" },
    directive: { color: "#ffcc99" },
    unit: { color: "#ffcc99" },
    statement: { color: "#ffcc99" },
    regex: { color: "#ffcc99" },
    atrule: { color: "#ffcc99" },
    placeholder: { color: "#ffcc99" },
    variable: { color: "#ffcc99" },
    deleted: { textDecoration: "line-through" },
    inserted: {
      borderBottom: "1px dotted #eeebff",
      textDecoration: "none"
    },
    italic: { fontStyle: "italic" },
    important: {
      fontWeight: "bold",
      color: "#c4b9fe"
    },
    bold: { fontWeight: "bold" }
  };
  lucario = {
    base: {
      color: "#f8f8f2",
      background: "#263E52",
      textShadow: "0 1px rgba(0, 0, 0, 0.3)",
      fontFamily: "Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      borderRadius: "0.3em"
    },
    comment: { color: "#5c98cd" },
    prolog: { color: "#5c98cd" },
    doctype: { color: "#5c98cd" },
    cdata: { color: "#5c98cd" },
    punctuation: { color: "#f8f8f2" },
    property: { color: "#F05E5D" },
    tag: { color: "#F05E5D" },
    constant: { color: "#F05E5D" },
    symbol: { color: "#F05E5D" },
    deleted: { color: "#F05E5D" },
    boolean: { color: "#BC94F9" },
    number: { color: "#BC94F9" },
    selector: { color: "#FCFCD6" },
    "attr-name": { color: "#FCFCD6" },
    string: { color: "#FCFCD6" },
    char: { color: "#FCFCD6" },
    builtin: { color: "#FCFCD6" },
    inserted: { color: "#FCFCD6" },
    operator: { color: "#f8f8f2" },
    entity: {
      color: "#f8f8f2",
      cursor: "help"
    },
    url: { color: "#f8f8f2" },
    variable: { color: "#f8f8f2" },
    atrule: { color: "#66D8EF" },
    "attr-value": { color: "#66D8EF" },
    function: { color: "#66D8EF" },
    "class-name": { color: "#66D8EF" },
    keyword: { color: "#6EB26E" },
    regex: { color: "#F05E5D" },
    important: {
      color: "#F05E5D",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  coldarkDark = {
    base: {
      color: "#e3eaf2",
      background: "#111b27",
      fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto"
    },
    comment: { color: "#8da1b9" },
    prolog: { color: "#8da1b9" },
    doctype: { color: "#8da1b9" },
    cdata: { color: "#8da1b9" },
    punctuation: { color: "#e3eaf2" },
    "delimiter.important": {
      color: "#66cccc",
      fontWeight: "inherit"
    },
    "selector .parent": { color: "#66cccc" },
    tag: { color: "#66cccc" },
    "tag .token.punctuation": { color: "#66cccc" },
    "attr-name": { color: "#e6d37a" },
    boolean: { color: "#e6d37a" },
    "boolean.important": { color: "#e6d37a" },
    number: { color: "#e6d37a" },
    constant: { color: "#e6d37a" },
    "selector .token.attribute": { color: "#e6d37a" },
    "class-name": { color: "#6cb8e6" },
    key: { color: "#6cb8e6" },
    parameter: { color: "#6cb8e6" },
    property: { color: "#6cb8e6" },
    "property-access": { color: "#6cb8e6" },
    variable: { color: "#6cb8e6" },
    "attr-value": { color: "#91d076" },
    inserted: { color: "#91d076" },
    color: { color: "#91d076" },
    "selector .token.value": { color: "#91d076" },
    string: { color: "#91d076" },
    "string .token.url-link": { color: "#91d076" },
    builtin: { color: "#f4adf4" },
    "keyword-array": { color: "#f4adf4" },
    package: { color: "#f4adf4" },
    regex: { color: "#f4adf4" },
    function: { color: "#c699e3" },
    "selector .token.class": { color: "#c699e3" },
    "selector .token.id": { color: "#c699e3" },
    "atrule .token.rule": { color: "#e9ae7e" },
    combinator: { color: "#e9ae7e" },
    keyword: { color: "#e9ae7e" },
    operator: { color: "#e9ae7e" },
    "pseudo-class": { color: "#e9ae7e" },
    "pseudo-element": { color: "#e9ae7e" },
    selector: { color: "#e9ae7e" },
    unit: { color: "#e9ae7e" },
    deleted: { color: "#cd6660" },
    important: {
      color: "#cd6660",
      fontWeight: "bold"
    },
    "keyword-this": {
      color: "#6cb8e6",
      fontWeight: "bold"
    },
    this: {
      color: "#6cb8e6",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    entity: { cursor: "help" },
    "token.tab:not(:empty):before": { color: "#8da1b9" },
    "token.cr:before": { color: "#8da1b9" },
    "token.lf:before": { color: "#8da1b9" },
    "token.space:before": { color: "#8da1b9" }
  };
  atomDark = {
    base: {
      color: "#c5c8c6",
      textShadow: "0 1px rgba(0, 0, 0, 0.3)",
      fontFamily: "Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      borderRadius: "0.3em",
      background: "#1d1f21"
    },
    comment: { color: "#7C7C7C" },
    prolog: { color: "#7C7C7C" },
    doctype: { color: "#7C7C7C" },
    cdata: { color: "#7C7C7C" },
    punctuation: { color: "#c5c8c6" },
    property: { color: "#96CBFE" },
    keyword: { color: "#96CBFE" },
    tag: { color: "#96CBFE" },
    "class-name": {
      color: "#FFFFB6",
      textDecoration: "underline"
    },
    boolean: { color: "#99CC99" },
    constant: { color: "#99CC99" },
    symbol: { color: "#f92672" },
    deleted: { color: "#f92672" },
    number: { color: "#FF73FD" },
    selector: { color: "#A8FF60" },
    "attr-name": { color: "#A8FF60" },
    string: { color: "#A8FF60" },
    char: { color: "#A8FF60" },
    builtin: { color: "#A8FF60" },
    inserted: { color: "#A8FF60" },
    variable: { color: "#C6C5FE" },
    operator: { color: "#EDEDED" },
    entity: {
      color: "#FFFFB6",
      cursor: "help"
    },
    url: { color: "#96CBFE" },
    atrule: { color: "#F9EE98" },
    "attr-value": { color: "#F9EE98" },
    function: { color: "#DAD085" },
    regex: { color: "#E9C062" },
    important: {
      color: "#fd971f",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  pojoaque = {
    base: {
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      whiteSpace: "pre-wrap",
      wordBreak: "break-all",
      wordWrap: "break-word",
      fontFamily: 'Menlo, Monaco, "Courier New", monospace',
      fontSize: "15px",
      lineHeight: "1.5",
      color: "#DCCF8F",
      textShadow: "0",
      borderRadius: "5px",
      border: "1px solid #000",
      background: "#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",
      padding: "12px",
      overflow: "auto"
    },
    namespace: { opacity: ".7" },
    comment: {
      color: "#586e75",
      fontStyle: "italic"
    },
    prolog: {
      color: "#586e75",
      fontStyle: "italic"
    },
    doctype: {
      color: "#586e75",
      fontStyle: "italic"
    },
    cdata: {
      color: "#586e75",
      fontStyle: "italic"
    },
    number: { color: "#b89859" },
    string: { color: "#468966" },
    char: { color: "#468966" },
    builtin: { color: "#468966" },
    inserted: { color: "#468966" },
    "attr-name": { color: "#b89859" },
    operator: { color: "#dccf8f" },
    entity: {
      color: "#dccf8f",
      cursor: "help"
    },
    url: { color: "#dccf8f" },
    selector: { color: "#859900" },
    regex: { color: "#859900" },
    atrule: { color: "#cb4b16" },
    keyword: { color: "#cb4b16" },
    "attr-value": { color: "#468966" },
    function: { color: "#b58900" },
    variable: { color: "#b58900" },
    placeholder: { color: "#b58900" },
    property: { color: "#b89859" },
    tag: { color: "#ffb03b" },
    boolean: { color: "#b89859" },
    constant: { color: "#b89859" },
    symbol: { color: "#b89859" },
    important: { color: "#dc322f" },
    statement: { color: "#dc322f" },
    deleted: { color: "#dc322f" },
    punctuation: { color: "#dccf8f" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  duotoneLight = {
    base: {
      fontFamily: 'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',
      fontSize: "14px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      background: "#faf8f5",
      color: "#728fcb",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#b6ad9a" },
    prolog: { color: "#b6ad9a" },
    doctype: { color: "#b6ad9a" },
    cdata: { color: "#b6ad9a" },
    punctuation: { color: "#b6ad9a" },
    namespace: { opacity: ".7" },
    tag: { color: "#063289" },
    operator: { color: "#063289" },
    number: { color: "#063289" },
    property: { color: "#b29762" },
    function: { color: "#b29762" },
    "tag-id": { color: "#2d2006" },
    selector: { color: "#2d2006" },
    "atrule-id": { color: "#2d2006" },
    "attr-name": { color: "#896724" },
    boolean: { color: "#728fcb" },
    string: { color: "#728fcb" },
    entity: {
      color: "#728fcb",
      cursor: "help"
    },
    url: { color: "#728fcb" },
    "attr-value": { color: "#728fcb" },
    keyword: { color: "#728fcb" },
    control: { color: "#728fcb" },
    directive: { color: "#728fcb" },
    unit: { color: "#728fcb" },
    statement: { color: "#728fcb" },
    regex: { color: "#728fcb" },
    atrule: { color: "#728fcb" },
    placeholder: { color: "#93abdc" },
    variable: { color: "#93abdc" },
    deleted: { textDecoration: "line-through" },
    inserted: {
      borderBottom: "1px dotted #2d2006",
      textDecoration: "none"
    },
    italic: { fontStyle: "italic" },
    important: {
      fontWeight: "bold",
      color: "#896724"
    },
    bold: { fontWeight: "bold" }
  };
  nightOwl = {
    base: {
      color: "white",
      fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      fontSize: "1em",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto",
      background: "#011627"
    },
    comment: {
      color: "rgb(99, 119, 119)",
      fontStyle: "italic"
    },
    prolog: {
      color: "rgb(99, 119, 119)",
      fontStyle: "italic"
    },
    cdata: {
      color: "rgb(99, 119, 119)",
      fontStyle: "italic"
    },
    punctuation: { color: "rgb(199, 146, 234)" },
    deleted: {
      color: "rgba(239, 83, 80, 0.56)",
      fontStyle: "italic"
    },
    symbol: { color: "rgb(128, 203, 196)" },
    property: { color: "rgb(128, 203, 196)" },
    tag: { color: "rgb(127, 219, 202)" },
    operator: { color: "rgb(127, 219, 202)" },
    keyword: { color: "rgb(127, 219, 202)" },
    boolean: { color: "rgb(255, 88, 116)" },
    number: { color: "rgb(247, 140, 108)" },
    constant: { color: "rgb(130, 170, 255)" },
    function: { color: "rgb(130, 170, 255)" },
    builtin: { color: "rgb(130, 170, 255)" },
    char: { color: "rgb(130, 170, 255)" },
    selector: {
      color: "rgb(199, 146, 234)",
      fontStyle: "italic"
    },
    doctype: {
      color: "rgb(199, 146, 234)",
      fontStyle: "italic"
    },
    "attr-name": {
      color: "rgb(173, 219, 103)",
      fontStyle: "italic"
    },
    inserted: {
      color: "rgb(173, 219, 103)",
      fontStyle: "italic"
    },
    string: { color: "rgb(173, 219, 103)" },
    url: { color: "rgb(173, 219, 103)" },
    entity: { color: "rgb(173, 219, 103)" },
    "class-name": { color: "rgb(255, 203, 139)" },
    atrule: { color: "rgb(255, 203, 139)" },
    "attr-value": { color: "rgb(255, 203, 139)" },
    regex: { color: "rgb(214, 222, 235)" },
    important: {
      color: "rgb(214, 222, 235)",
      fontWeight: "bold"
    },
    variable: { color: "rgb(214, 222, 235)" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  laserwave = {
    base: {
      background: "#27212e",
      color: "#ffffff",
      fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
      fontSize: "1em",
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "2",
      OTabSize: "2",
      tabSize: "2",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto",
      borderRadius: "0.5em"
    },
    comment: { color: "#91889b" },
    prolog: { color: "#91889b" },
    cdata: { color: "#91889b" },
    punctuation: { color: "#7b6995" },
    builtin: { color: "#ffe261" },
    constant: { color: "#ffe261" },
    boolean: { color: "#ffe261" },
    number: { color: "#b381c5" },
    important: { color: "#40b4c4" },
    atrule: { color: "#40b4c4" },
    property: { color: "#40b4c4" },
    keyword: { color: "#40b4c4" },
    doctype: { color: "#74dfc4" },
    operator: { color: "#74dfc4" },
    inserted: { color: "#74dfc4" },
    tag: { color: "#74dfc4" },
    "class-name": { color: "#74dfc4" },
    symbol: { color: "#74dfc4" },
    "attr-name": { color: "#eb64b9" },
    function: { color: "#eb64b9" },
    deleted: { color: "#eb64b9" },
    selector: { color: "#eb64b9" },
    "attr-value": { color: "#b4dce7" },
    regex: { color: "#b4dce7" },
    char: { color: "#b4dce7" },
    string: { color: "#b4dce7" },
    entity: {
      color: "#ffffff",
      cursor: "help"
    },
    url: { color: "#ffffff" },
    variable: { color: "#ffffff" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    namespace: { opacity: "0.7" }
  };
  coyWithoutShadows = {
    base: {
      color: "black",
      background: "none",
      fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
      fontSize: "1em",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      position: "relative",
      borderLeft: "10px solid #358ccb",
      boxShadow: "-1px 0 0 0 #358ccb, 0 0 0 1px #dfdfdf",
      backgroundColor: "#fdfdfd",
      backgroundImage: "linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",
      backgroundSize: "3em 3em",
      backgroundOrigin: "content-box",
      backgroundAttachment: "local",
      margin: ".5em 0",
      padding: "0 1em"
    },
    comment: { color: "#7D8B99" },
    "block-comment": { color: "#7D8B99" },
    prolog: { color: "#7D8B99" },
    doctype: { color: "#7D8B99" },
    cdata: { color: "#7D8B99" },
    punctuation: { color: "#5F6364" },
    property: { color: "#c92c2c" },
    tag: { color: "#c92c2c" },
    boolean: { color: "#c92c2c" },
    number: { color: "#c92c2c" },
    "function-name": { color: "#c92c2c" },
    constant: { color: "#c92c2c" },
    symbol: { color: "#c92c2c" },
    deleted: { color: "#c92c2c" },
    selector: { color: "#2f9c0a" },
    "attr-name": { color: "#2f9c0a" },
    string: { color: "#2f9c0a" },
    char: { color: "#2f9c0a" },
    function: { color: "#2f9c0a" },
    builtin: { color: "#2f9c0a" },
    inserted: { color: "#2f9c0a" },
    operator: {
      color: "#a67f59",
      background: "rgba(255, 255, 255, 0.5)"
    },
    entity: {
      color: "#a67f59",
      background: "rgba(255, 255, 255, 0.5)",
      cursor: "help"
    },
    url: {
      color: "#a67f59",
      background: "rgba(255, 255, 255, 0.5)"
    },
    variable: {
      color: "#a67f59",
      background: "rgba(255, 255, 255, 0.5)"
    },
    atrule: { color: "#1990b8" },
    "attr-value": { color: "#1990b8" },
    keyword: { color: "#1990b8" },
    "class-name": { color: "#1990b8" },
    regex: { color: "#e90" },
    important: {
      color: "#e90",
      fontWeight: "normal"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    namespace: { opacity: ".7" }
  };
  hopscotch = {
    base: {
      fontFamily: '"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',
      fontSize: "16px",
      lineHeight: "1.375",
      direction: "ltr",
      textAlign: "left",
      wordSpacing: "normal",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      whiteSpace: "pre-wrap",
      wordBreak: "break-all",
      wordWrap: "break-word",
      background: "#322931",
      color: "#b9b5b8",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto"
    },
    comment: { color: "#797379" },
    prolog: { color: "#797379" },
    doctype: { color: "#797379" },
    cdata: { color: "#797379" },
    punctuation: { color: "#b9b5b8" },
    null: { color: "#fd8b19" },
    operator: { color: "#fd8b19" },
    boolean: { color: "#fd8b19" },
    number: { color: "#fd8b19" },
    property: { color: "#fdcc59" },
    tag: { color: "#1290bf" },
    string: { color: "#149b93" },
    selector: { color: "#c85e7c" },
    "attr-name": { color: "#fd8b19" },
    entity: {
      color: "#149b93",
      cursor: "help"
    },
    url: { color: "#149b93" },
    "attr-value": { color: "#8fc13e" },
    keyword: { color: "#8fc13e" },
    control: { color: "#8fc13e" },
    directive: { color: "#8fc13e" },
    unit: { color: "#8fc13e" },
    statement: { color: "#149b93" },
    regex: { color: "#149b93" },
    atrule: { color: "#149b93" },
    placeholder: { color: "#1290bf" },
    variable: { color: "#1290bf" },
    important: {
      color: "#dd464c",
      fontWeight: "bold"
    }
  };
  oneLight = {
    base: {
      background: "hsl(230, 1%, 98%)",
      color: "hsl(230, 8%, 24%)",
      fontFamily: '"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      lineHeight: "1.5",
      MozTabSize: "2",
      OTabSize: "2",
      tabSize: "2",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: "0.5em 0",
      overflow: "auto",
      borderRadius: "0.3em"
    },
    comment: {
      color: "hsl(230, 4%, 64%)",
      fontStyle: "italic"
    },
    prolog: { color: "hsl(230, 4%, 64%)" },
    cdata: { color: "hsl(230, 4%, 64%)" },
    doctype: { color: "hsl(230, 8%, 24%)" },
    punctuation: { color: "hsl(230, 8%, 24%)" },
    entity: {
      color: "hsl(230, 8%, 24%)",
      cursor: "help"
    },
    "attr-name": { color: "hsl(35, 99%, 36%)" },
    "class-name": { color: "hsl(35, 99%, 36%)" },
    boolean: { color: "hsl(35, 99%, 36%)" },
    constant: { color: "hsl(35, 99%, 36%)" },
    number: { color: "hsl(35, 99%, 36%)" },
    atrule: { color: "hsl(35, 99%, 36%)" },
    keyword: { color: "hsl(301, 63%, 40%)" },
    property: { color: "hsl(5, 74%, 59%)" },
    tag: { color: "hsl(5, 74%, 59%)" },
    symbol: { color: "hsl(5, 74%, 59%)" },
    deleted: { color: "hsl(5, 74%, 59%)" },
    important: { color: "hsl(5, 74%, 59%)" },
    selector: { color: "hsl(119, 34%, 47%)" },
    string: { color: "hsl(119, 34%, 47%)" },
    char: { color: "hsl(119, 34%, 47%)" },
    builtin: { color: "hsl(119, 34%, 47%)" },
    inserted: { color: "hsl(119, 34%, 47%)" },
    regex: { color: "hsl(119, 34%, 47%)" },
    "attr-value": { color: "hsl(119, 34%, 47%)" },
    "attr-value > .token.punctuation": { color: "hsl(119, 34%, 47%)" },
    variable: { color: "hsl(221, 87%, 60%)" },
    operator: { color: "hsl(221, 87%, 60%)" },
    function: { color: "hsl(221, 87%, 60%)" },
    url: { color: "hsl(198, 99%, 37%)" },
    "attr-value > .token.punctuation.attr-equals": { color: "hsl(230, 8%, 24%)" },
    "special-attr > .token.attr-value > .token.value.css": { color: "hsl(230, 8%, 24%)" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" },
    namespace: { opacity: "0.8" },
    "token.tab:not(:empty):before": { color: "hsla(230, 8%, 24%, 0.2)" },
    "token.cr:before": { color: "hsla(230, 8%, 24%, 0.2)" },
    "token.lf:before": { color: "hsla(230, 8%, 24%, 0.2)" },
    "token.space:before": { color: "hsla(230, 8%, 24%, 0.2)" }
  };
  nord = {
    base: {
      color: "#f8f8f2",
      background: "#2E3440",
      fontFamily: `"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      borderRadius: "0.3em"
    },
    comment: { color: "#636f88" },
    prolog: { color: "#636f88" },
    doctype: { color: "#636f88" },
    cdata: { color: "#636f88" },
    punctuation: { color: "#81A1C1" },
    property: { color: "#81A1C1" },
    tag: { color: "#81A1C1" },
    constant: { color: "#81A1C1" },
    symbol: { color: "#81A1C1" },
    deleted: { color: "#81A1C1" },
    number: { color: "#B48EAD" },
    boolean: { color: "#81A1C1" },
    selector: { color: "#A3BE8C" },
    "attr-name": { color: "#A3BE8C" },
    string: { color: "#A3BE8C" },
    char: { color: "#A3BE8C" },
    builtin: { color: "#A3BE8C" },
    inserted: { color: "#A3BE8C" },
    operator: { color: "#81A1C1" },
    entity: {
      color: "#81A1C1",
      cursor: "help"
    },
    url: { color: "#81A1C1" },
    variable: { color: "#81A1C1" },
    atrule: { color: "#88C0D0" },
    "attr-value": { color: "#88C0D0" },
    function: { color: "#88C0D0" },
    "class-name": { color: "#88C0D0" },
    keyword: { color: "#81A1C1" },
    regex: { color: "#EBCB8B" },
    important: {
      color: "#EBCB8B",
      fontWeight: "bold"
    },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  ghcolors = {
    base: {
      color: "#393A34",
      fontFamily: '"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',
      direction: "ltr",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      fontSize: ".9em",
      lineHeight: "1.2em",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      hyphens: "none",
      padding: "1em",
      margin: ".5em 0",
      overflow: "auto",
      border: "1px solid #dddddd",
      backgroundColor: "white"
    },
    comment: {
      color: "#999988",
      fontStyle: "italic"
    },
    prolog: {
      color: "#999988",
      fontStyle: "italic"
    },
    doctype: {
      color: "#999988",
      fontStyle: "italic"
    },
    cdata: {
      color: "#999988",
      fontStyle: "italic"
    },
    namespace: { opacity: ".7" },
    string: { color: "#e3116c" },
    "attr-value": { color: "#e3116c" },
    punctuation: { color: "#393A34" },
    operator: { color: "#393A34" },
    entity: { color: "#36acaa" },
    url: { color: "#36acaa" },
    symbol: { color: "#36acaa" },
    number: { color: "#36acaa" },
    boolean: { color: "#36acaa" },
    variable: { color: "#36acaa" },
    constant: { color: "#36acaa" },
    property: { color: "#36acaa" },
    regex: { color: "#36acaa" },
    inserted: { color: "#36acaa" },
    atrule: { color: "#00a4db" },
    keyword: { color: "#00a4db" },
    "attr-name": { color: "#00a4db" },
    function: {
      color: "#9a050f",
      fontWeight: "bold"
    },
    deleted: { color: "#9a050f" },
    tag: { color: "#00009f" },
    selector: { color: "#00009f" },
    important: { fontWeight: "bold" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
  vesper = {
    base: {
      color: "#a0a0a0",
      fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
      textAlign: "left",
      whiteSpace: "pre",
      wordSpacing: "normal",
      wordBreak: "normal",
      wordWrap: "normal",
      lineHeight: "1.5",
      MozTabSize: "4",
      OTabSize: "4",
      tabSize: "4",
      WebkitHyphens: "none",
      MozHyphens: "none",
      MsHyphens: "none",
      hyphens: "none",
      overflowX: "auto",
      backgroundColor: "#1E1E1E"
    },
    selection: {
      textShadow: "none",
      background: "#ffffff25"
    },
    print: { textShadow: "none" },
    pre: {
      color: "#a0a0a0",
      background: "#101010"
    },
    comment: { color: "#8b8b8b94" },
    punctuation: { color: "#8b8b8b94" },
    variable: { color: "#a0a0a0" },
    tag: { color: "#a0a0a0" },
    hexcode: { color: "#a0a0a0" },
    string: { color: "rgb(161, 252, 234)" },
    url: { color: "#a0a0a0" },
    keyword: { color: "#fff" },
    deleted: { color: "#fff" },
    function: { color: "#ffc799" },
    builtin: { color: "#fff" },
    number: { color: "#fff" },
    char: { color: "#fff" },
    constant: { color: "#fff" },
    boolean: { color: "#fff" },
    changed: { color: "#fff" },
    symbol: { color: "#99ffe4" },
    inserted: { color: "#ffc799" },
    "attr-name": { color: "#a0a0a0" },
    selector: { color: "#a0a0a0" },
    property: { color: "#a0a0a0" },
    regex: { color: "#a0a0a0" },
    important: { fontWeight: "bold" },
    bold: { fontWeight: "bold" },
    italic: { fontStyle: "italic" }
  };
});

// ../../node_modules/.pnpm/@react-email+code-inline@0.0.6_react@19.2.7/node_modules/@react-email/code-inline/dist/index.mjs
var React3, import_jsx_runtime4, CodeInline;
var init_dist4 = __esm(() => {
  React3 = __toESM(require_react(), 1);
  import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  CodeInline = React3.forwardRef(({ children, ...props }, ref) => {
    return /* @__PURE__ */ import_jsx_runtime4.jsxs(import_jsx_runtime4.Fragment, { children: [
      /* @__PURE__ */ import_jsx_runtime4.jsx("style", { children: `
        meta ~ .cino {
          display: none !important;
          opacity: 0 !important;
        }

        meta ~ .cio {
          display: block !important;
        }
      ` }),
      /* @__PURE__ */ import_jsx_runtime4.jsx("code", {
        ...props,
        className: `${props.className ? props.className : ""} cino`,
        children
      }),
      /* @__PURE__ */ import_jsx_runtime4.jsx("span", {
        ...props,
        className: `${props.className ? props.className : ""} cio`,
        ref,
        style: {
          display: "none",
          ...props.style
        },
        children
      })
    ] });
  });
  CodeInline.displayName = "CodeInline";
});

// ../../node_modules/.pnpm/@react-email+column@0.0.14_react@19.2.7/node_modules/@react-email/column/dist/index.mjs
var React4, import_jsx_runtime5, Column2;
var init_dist5 = __esm(() => {
  React4 = __toESM(require_react(), 1);
  import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  Column2 = React4.forwardRef(({ children, style, ...props }, ref) => {
    return /* @__PURE__ */ import_jsx_runtime5.jsx("td", {
      ...props,
      "data-id": "__react-email-column",
      ref,
      style,
      children
    });
  });
  Column2.displayName = "Column";
});

// ../../node_modules/.pnpm/@react-email+container@0.0.16_react@19.2.7/node_modules/@react-email/container/dist/index.mjs
var React5, import_jsx_runtime6, Container;
var init_dist6 = __esm(() => {
  React5 = __toESM(require_react(), 1);
  import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  Container = React5.forwardRef(({ children, style, ...props }, ref) => {
    return /* @__PURE__ */ import_jsx_runtime6.jsx("table", {
      align: "center",
      width: "100%",
      ...props,
      border: 0,
      cellPadding: "0",
      cellSpacing: "0",
      ref,
      role: "presentation",
      style: {
        maxWidth: "37.5em",
        ...style
      },
      children: /* @__PURE__ */ import_jsx_runtime6.jsx("tbody", { children: /* @__PURE__ */ import_jsx_runtime6.jsx("tr", {
        style: { width: "100%" },
        children: /* @__PURE__ */ import_jsx_runtime6.jsx("td", { children })
      }) })
    });
  });
  Container.displayName = "Container";
});

// ../../node_modules/.pnpm/@react-email+font@0.0.10_react@19.2.7/node_modules/@react-email/font/dist/index.mjs
var import_jsx_runtime7, Font = ({ fontFamily, fallbackFontFamily, webFont, fontStyle = "normal", fontWeight = 400 }) => {
  const src = webFont ? `src: url(${webFont.url}) format('${webFont.format}');` : "";
  return /* @__PURE__ */ import_jsx_runtime7.jsx("style", { dangerouslySetInnerHTML: { __html: `
    @font-face {
      font-family: '${fontFamily}';
      font-style: ${fontStyle};
      font-weight: ${fontWeight};
      mso-font-alt: '${Array.isArray(fallbackFontFamily) ? fallbackFontFamily[0] : fallbackFontFamily}';
      ${src}
    }

    * {
      font-family: '${fontFamily}', ${Array.isArray(fallbackFontFamily) ? fallbackFontFamily.join(", ") : fallbackFontFamily};
    }
  ` } });
};
var init_dist7 = __esm(() => {
  import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
});

// ../../node_modules/.pnpm/@react-email+head@0.0.13_react@19.2.7/node_modules/@react-email/head/dist/index.mjs
var React6, import_jsx_runtime8, Head;
var init_dist8 = __esm(() => {
  React6 = __toESM(require_react(), 1);
  import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  Head = React6.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ import_jsx_runtime8.jsxs("head", {
    ...props,
    ref,
    children: [
      /* @__PURE__ */ import_jsx_runtime8.jsx("meta", {
        content: "text/html; charset=UTF-8",
        httpEquiv: "Content-Type"
      }),
      /* @__PURE__ */ import_jsx_runtime8.jsx("meta", { name: "x-apple-disable-message-reformatting" }),
      children
    ]
  }));
  Head.displayName = "Head";
});

// ../../node_modules/.pnpm/@react-email+heading@0.0.16_react@19.2.7/node_modules/@react-email/heading/dist/index.mjs
var React7, import_jsx_runtime9, withMargin = (props) => {
  const candidates = [
    withSpace(props.m, ["margin"]),
    withSpace(props.mx, ["marginLeft", "marginRight"]),
    withSpace(props.my, ["marginTop", "marginBottom"]),
    withSpace(props.mt, ["marginTop"]),
    withSpace(props.mr, ["marginRight"]),
    withSpace(props.mb, ["marginBottom"]),
    withSpace(props.ml, ["marginLeft"])
  ];
  const mergedStyles = {};
  for (const style of candidates)
    if (Object.keys(style).length > 0)
      Object.assign(mergedStyles, style);
  return mergedStyles;
}, withSpace = (value, properties) => {
  const styles = {};
  if (value === undefined)
    return styles;
  if (Number.isNaN(Number.parseFloat(String(value))))
    return styles;
  for (const property of properties)
    styles[property] = `${value}px`;
  return styles;
}, Heading;
var init_dist9 = __esm(() => {
  React7 = __toESM(require_react(), 1);
  import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  Heading = React7.forwardRef(({ as: Tag = "h1", children, style, m: m2, mx, my, mt, mr, mb, ml, ...props }, ref) => {
    return /* @__PURE__ */ import_jsx_runtime9.jsx(Tag, {
      ...props,
      ref,
      style: {
        ...withMargin({
          m: m2,
          mx,
          my,
          mt,
          mr,
          mb,
          ml
        }),
        ...style
      },
      children
    });
  });
  Heading.displayName = "Heading";
});

// ../../node_modules/.pnpm/@react-email+hr@0.0.12_react@19.2.7/node_modules/@react-email/hr/dist/index.mjs
var React8, import_jsx_runtime10, Hr;
var init_dist10 = __esm(() => {
  React8 = __toESM(require_react(), 1);
  import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  Hr = React8.forwardRef(({ style, ...props }, ref) => /* @__PURE__ */ import_jsx_runtime10.jsx("hr", {
    ...props,
    ref,
    style: {
      width: "100%",
      border: "none",
      borderTop: "1px solid #eaeaea",
      ...style
    }
  }));
  Hr.displayName = "Hr";
});

// ../../node_modules/.pnpm/@react-email+html@0.0.12_react@19.2.7/node_modules/@react-email/html/dist/index.mjs
var React9, import_jsx_runtime11, Html;
var init_dist11 = __esm(() => {
  React9 = __toESM(require_react(), 1);
  import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  Html = React9.forwardRef(({ children, lang = "en", dir = "ltr", ...props }, ref) => /* @__PURE__ */ import_jsx_runtime11.jsx("html", {
    ...props,
    dir,
    lang,
    ref,
    children
  }));
  Html.displayName = "Html";
});

// ../../node_modules/.pnpm/@react-email+img@0.0.12_react@19.2.7/node_modules/@react-email/img/dist/index.mjs
var React10, import_jsx_runtime12, Img;
var init_dist12 = __esm(() => {
  React10 = __toESM(require_react(), 1);
  import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  Img = React10.forwardRef(({ alt, src, width, height, style, ...props }, ref) => /* @__PURE__ */ import_jsx_runtime12.jsx("img", {
    ...props,
    alt,
    height,
    ref,
    src,
    style: {
      display: "block",
      outline: "none",
      border: "none",
      textDecoration: "none",
      ...style
    },
    width
  }));
  Img.displayName = "Img";
});

// ../../node_modules/.pnpm/@react-email+link@0.0.13_react@19.2.7/node_modules/@react-email/link/dist/index.mjs
var React11, import_jsx_runtime13, Link;
var init_dist13 = __esm(() => {
  React11 = __toESM(require_react(), 1);
  import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  Link = React11.forwardRef(({ target = "_blank", style, ...props }, ref) => /* @__PURE__ */ import_jsx_runtime13.jsx("a", {
    ...props,
    ref,
    style: {
      color: "#067df7",
      textDecorationLine: "none",
      ...style
    },
    target,
    children: props.children
  }));
  Link.displayName = "Link";
});

// ../../node_modules/.pnpm/marked@15.0.12/node_modules/marked/lib/marked.esm.js
function _getDefaults() {
  return {
    async: false,
    breaks: false,
    extensions: null,
    gfm: true,
    hooks: null,
    pedantic: false,
    renderer: null,
    silent: false,
    tokenizer: null,
    walkTokens: null
  };
}
function changeDefaults(newDefaults) {
  _defaults = newDefaults;
}
function edit(regex, opt = "") {
  let source = typeof regex === "string" ? regex : regex.source;
  const obj = {
    replace: (name, val) => {
      let valSource = typeof val === "string" ? val : val.source;
      valSource = valSource.replace(other.caret, "$1");
      source = source.replace(name, valSource);
      return obj;
    },
    getRegex: () => {
      return new RegExp(source, opt);
    }
  };
  return obj;
}
function escape2(html2, encode3) {
  if (encode3) {
    if (other.escapeTest.test(html2)) {
      return html2.replace(other.escapeReplace, getEscapeReplacement);
    }
  } else {
    if (other.escapeTestNoEncode.test(html2)) {
      return html2.replace(other.escapeReplaceNoEncode, getEscapeReplacement);
    }
  }
  return html2;
}
function cleanUrl(href) {
  try {
    href = encodeURI(href).replace(other.percentDecode, "%");
  } catch {
    return null;
  }
  return href;
}
function splitCells(tableRow, count2) {
  const row = tableRow.replace(other.findPipe, (match, offset, str) => {
    let escaped = false;
    let curr = offset;
    while (--curr >= 0 && str[curr] === "\\")
      escaped = !escaped;
    if (escaped) {
      return "|";
    } else {
      return " |";
    }
  }), cells = row.split(other.splitPipe);
  let i = 0;
  if (!cells[0].trim()) {
    cells.shift();
  }
  if (cells.length > 0 && !cells.at(-1)?.trim()) {
    cells.pop();
  }
  if (count2) {
    if (cells.length > count2) {
      cells.splice(count2);
    } else {
      while (cells.length < count2)
        cells.push("");
    }
  }
  for (;i < cells.length; i++) {
    cells[i] = cells[i].trim().replace(other.slashPipe, "|");
  }
  return cells;
}
function rtrim(str, c, invert) {
  const l = str.length;
  if (l === 0) {
    return "";
  }
  let suffLen = 0;
  while (suffLen < l) {
    const currChar = str.charAt(l - suffLen - 1);
    if (currChar === c && !invert) {
      suffLen++;
    } else if (currChar !== c && invert) {
      suffLen++;
    } else {
      break;
    }
  }
  return str.slice(0, l - suffLen);
}
function findClosingBracket(str, b2) {
  if (str.indexOf(b2[1]) === -1) {
    return -1;
  }
  let level = 0;
  for (let i = 0;i < str.length; i++) {
    if (str[i] === "\\") {
      i++;
    } else if (str[i] === b2[0]) {
      level++;
    } else if (str[i] === b2[1]) {
      level--;
      if (level < 0) {
        return i;
      }
    }
  }
  if (level > 0) {
    return -2;
  }
  return -1;
}
function outputLink(cap, link2, raw, lexer2, rules) {
  const href = link2.href;
  const title = link2.title || null;
  const text2 = cap[1].replace(rules.other.outputLinkReplace, "$1");
  lexer2.state.inLink = true;
  const token = {
    type: cap[0].charAt(0) === "!" ? "image" : "link",
    raw,
    href,
    title,
    text: text2,
    tokens: lexer2.inlineTokens(text2)
  };
  lexer2.state.inLink = false;
  return token;
}
function indentCodeCompensation(raw, text2, rules) {
  const matchIndentToCode = raw.match(rules.other.indentCodeCompensation);
  if (matchIndentToCode === null) {
    return text2;
  }
  const indentToCode = matchIndentToCode[1];
  return text2.split(`
`).map((node2) => {
    const matchIndentInNode = node2.match(rules.other.beginningSpace);
    if (matchIndentInNode === null) {
      return node2;
    }
    const [indentInNode] = matchIndentInNode;
    if (indentInNode.length >= indentToCode.length) {
      return node2.slice(indentToCode.length);
    }
    return node2;
  }).join(`
`);
}
function marked(src, opt) {
  return markedInstance.parse(src, opt);
}
var _defaults, noopTest, other, newline, blockCode, fences, hr, heading, bullet, lheadingCore, lheading, lheadingGfm, _paragraph, blockText, _blockLabel, def, list, _tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", _comment, html, paragraph, blockquote, blockNormal, gfmTable, blockGfm, blockPedantic, escape, inlineCode, br, inlineText, _punctuation, _punctuationOrSpace, _notPunctuationOrSpace, punctuation, _punctuationGfmStrongEm, _punctuationOrSpaceGfmStrongEm, _notPunctuationOrSpaceGfmStrongEm, blockSkip, emStrongLDelimCore, emStrongLDelim, emStrongLDelimGfm, emStrongRDelimAstCore = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", emStrongRDelimAst, emStrongRDelimAstGfm, emStrongRDelimUnd, anyPunctuation, autolink, _inlineComment, tag, _inlineLabel, link, reflink, nolink, reflinkSearch, inlineNormal, inlinePedantic, inlineGfm, inlineBreaks, block, inline, escapeReplacements, getEscapeReplacement = (ch) => escapeReplacements[ch], _Tokenizer = class {
  options;
  rules;
  lexer;
  constructor(options2) {
    this.options = options2 || _defaults;
  }
  space(src) {
    const cap = this.rules.block.newline.exec(src);
    if (cap && cap[0].length > 0) {
      return {
        type: "space",
        raw: cap[0]
      };
    }
  }
  code(src) {
    const cap = this.rules.block.code.exec(src);
    if (cap) {
      const text2 = cap[0].replace(this.rules.other.codeRemoveIndent, "");
      return {
        type: "code",
        raw: cap[0],
        codeBlockStyle: "indented",
        text: !this.options.pedantic ? rtrim(text2, `
`) : text2
      };
    }
  }
  fences(src) {
    const cap = this.rules.block.fences.exec(src);
    if (cap) {
      const raw = cap[0];
      const text2 = indentCodeCompensation(raw, cap[3] || "", this.rules);
      return {
        type: "code",
        raw,
        lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : cap[2],
        text: text2
      };
    }
  }
  heading(src) {
    const cap = this.rules.block.heading.exec(src);
    if (cap) {
      let text2 = cap[2].trim();
      if (this.rules.other.endingHash.test(text2)) {
        const trimmed = rtrim(text2, "#");
        if (this.options.pedantic) {
          text2 = trimmed.trim();
        } else if (!trimmed || this.rules.other.endingSpaceChar.test(trimmed)) {
          text2 = trimmed.trim();
        }
      }
      return {
        type: "heading",
        raw: cap[0],
        depth: cap[1].length,
        text: text2,
        tokens: this.lexer.inline(text2)
      };
    }
  }
  hr(src) {
    const cap = this.rules.block.hr.exec(src);
    if (cap) {
      return {
        type: "hr",
        raw: rtrim(cap[0], `
`)
      };
    }
  }
  blockquote(src) {
    const cap = this.rules.block.blockquote.exec(src);
    if (cap) {
      let lines = rtrim(cap[0], `
`).split(`
`);
      let raw = "";
      let text2 = "";
      const tokens = [];
      while (lines.length > 0) {
        let inBlockquote = false;
        const currentLines = [];
        let i;
        for (i = 0;i < lines.length; i++) {
          if (this.rules.other.blockquoteStart.test(lines[i])) {
            currentLines.push(lines[i]);
            inBlockquote = true;
          } else if (!inBlockquote) {
            currentLines.push(lines[i]);
          } else {
            break;
          }
        }
        lines = lines.slice(i);
        const currentRaw = currentLines.join(`
`);
        const currentText = currentRaw.replace(this.rules.other.blockquoteSetextReplace, `
    $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
        raw = raw ? `${raw}
${currentRaw}` : currentRaw;
        text2 = text2 ? `${text2}
${currentText}` : currentText;
        const top = this.lexer.state.top;
        this.lexer.state.top = true;
        this.lexer.blockTokens(currentText, tokens, true);
        this.lexer.state.top = top;
        if (lines.length === 0) {
          break;
        }
        const lastToken = tokens.at(-1);
        if (lastToken?.type === "code") {
          break;
        } else if (lastToken?.type === "blockquote") {
          const oldToken = lastToken;
          const newText = oldToken.raw + `
` + lines.join(`
`);
          const newToken = this.blockquote(newText);
          tokens[tokens.length - 1] = newToken;
          raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;
          text2 = text2.substring(0, text2.length - oldToken.text.length) + newToken.text;
          break;
        } else if (lastToken?.type === "list") {
          const oldToken = lastToken;
          const newText = oldToken.raw + `
` + lines.join(`
`);
          const newToken = this.list(newText);
          tokens[tokens.length - 1] = newToken;
          raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;
          text2 = text2.substring(0, text2.length - oldToken.raw.length) + newToken.raw;
          lines = newText.substring(tokens.at(-1).raw.length).split(`
`);
          continue;
        }
      }
      return {
        type: "blockquote",
        raw,
        tokens,
        text: text2
      };
    }
  }
  list(src) {
    let cap = this.rules.block.list.exec(src);
    if (cap) {
      let bull = cap[1].trim();
      const isordered = bull.length > 1;
      const list2 = {
        type: "list",
        raw: "",
        ordered: isordered,
        start: isordered ? +bull.slice(0, -1) : "",
        loose: false,
        items: []
      };
      bull = isordered ? `\\d{1,9}\\${bull.slice(-1)}` : `\\${bull}`;
      if (this.options.pedantic) {
        bull = isordered ? bull : "[*+-]";
      }
      const itemRegex = this.rules.other.listItemRegex(bull);
      let endsWithBlankLine = false;
      while (src) {
        let endEarly = false;
        let raw = "";
        let itemContents = "";
        if (!(cap = itemRegex.exec(src))) {
          break;
        }
        if (this.rules.block.hr.test(src)) {
          break;
        }
        raw = cap[0];
        src = src.substring(raw.length);
        let line2 = cap[2].split(`
`, 1)[0].replace(this.rules.other.listReplaceTabs, (t) => " ".repeat(3 * t.length));
        let nextLine = src.split(`
`, 1)[0];
        let blankLine = !line2.trim();
        let indent = 0;
        if (this.options.pedantic) {
          indent = 2;
          itemContents = line2.trimStart();
        } else if (blankLine) {
          indent = cap[1].length + 1;
        } else {
          indent = cap[2].search(this.rules.other.nonSpaceChar);
          indent = indent > 4 ? 1 : indent;
          itemContents = line2.slice(indent);
          indent += cap[1].length;
        }
        if (blankLine && this.rules.other.blankLine.test(nextLine)) {
          raw += nextLine + `
`;
          src = src.substring(nextLine.length + 1);
          endEarly = true;
        }
        if (!endEarly) {
          const nextBulletRegex = this.rules.other.nextBulletRegex(indent);
          const hrRegex = this.rules.other.hrRegex(indent);
          const fencesBeginRegex = this.rules.other.fencesBeginRegex(indent);
          const headingBeginRegex = this.rules.other.headingBeginRegex(indent);
          const htmlBeginRegex = this.rules.other.htmlBeginRegex(indent);
          while (src) {
            const rawLine = src.split(`
`, 1)[0];
            let nextLineWithoutTabs;
            nextLine = rawLine;
            if (this.options.pedantic) {
              nextLine = nextLine.replace(this.rules.other.listReplaceNesting, "  ");
              nextLineWithoutTabs = nextLine;
            } else {
              nextLineWithoutTabs = nextLine.replace(this.rules.other.tabCharGlobal, "    ");
            }
            if (fencesBeginRegex.test(nextLine)) {
              break;
            }
            if (headingBeginRegex.test(nextLine)) {
              break;
            }
            if (htmlBeginRegex.test(nextLine)) {
              break;
            }
            if (nextBulletRegex.test(nextLine)) {
              break;
            }
            if (hrRegex.test(nextLine)) {
              break;
            }
            if (nextLineWithoutTabs.search(this.rules.other.nonSpaceChar) >= indent || !nextLine.trim()) {
              itemContents += `
` + nextLineWithoutTabs.slice(indent);
            } else {
              if (blankLine) {
                break;
              }
              if (line2.replace(this.rules.other.tabCharGlobal, "    ").search(this.rules.other.nonSpaceChar) >= 4) {
                break;
              }
              if (fencesBeginRegex.test(line2)) {
                break;
              }
              if (headingBeginRegex.test(line2)) {
                break;
              }
              if (hrRegex.test(line2)) {
                break;
              }
              itemContents += `
` + nextLine;
            }
            if (!blankLine && !nextLine.trim()) {
              blankLine = true;
            }
            raw += rawLine + `
`;
            src = src.substring(rawLine.length + 1);
            line2 = nextLineWithoutTabs.slice(indent);
          }
        }
        if (!list2.loose) {
          if (endsWithBlankLine) {
            list2.loose = true;
          } else if (this.rules.other.doubleBlankLine.test(raw)) {
            endsWithBlankLine = true;
          }
        }
        let istask = null;
        let ischecked;
        if (this.options.gfm) {
          istask = this.rules.other.listIsTask.exec(itemContents);
          if (istask) {
            ischecked = istask[0] !== "[ ] ";
            itemContents = itemContents.replace(this.rules.other.listReplaceTask, "");
          }
        }
        list2.items.push({
          type: "list_item",
          raw,
          task: !!istask,
          checked: ischecked,
          loose: false,
          text: itemContents,
          tokens: []
        });
        list2.raw += raw;
      }
      const lastItem = list2.items.at(-1);
      if (lastItem) {
        lastItem.raw = lastItem.raw.trimEnd();
        lastItem.text = lastItem.text.trimEnd();
      } else {
        return;
      }
      list2.raw = list2.raw.trimEnd();
      for (let i = 0;i < list2.items.length; i++) {
        this.lexer.state.top = false;
        list2.items[i].tokens = this.lexer.blockTokens(list2.items[i].text, []);
        if (!list2.loose) {
          const spacers = list2.items[i].tokens.filter((t) => t.type === "space");
          const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t) => this.rules.other.anyLine.test(t.raw));
          list2.loose = hasMultipleLineBreaks;
        }
      }
      if (list2.loose) {
        for (let i = 0;i < list2.items.length; i++) {
          list2.items[i].loose = true;
        }
      }
      return list2;
    }
  }
  html(src) {
    const cap = this.rules.block.html.exec(src);
    if (cap) {
      const token = {
        type: "html",
        block: true,
        raw: cap[0],
        pre: cap[1] === "pre" || cap[1] === "script" || cap[1] === "style",
        text: cap[0]
      };
      return token;
    }
  }
  def(src) {
    const cap = this.rules.block.def.exec(src);
    if (cap) {
      const tag2 = cap[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " ");
      const href = cap[2] ? cap[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "";
      const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : cap[3];
      return {
        type: "def",
        tag: tag2,
        raw: cap[0],
        href,
        title
      };
    }
  }
  table(src) {
    const cap = this.rules.block.table.exec(src);
    if (!cap) {
      return;
    }
    if (!this.rules.other.tableDelimiter.test(cap[2])) {
      return;
    }
    const headers = splitCells(cap[1]);
    const aligns = cap[2].replace(this.rules.other.tableAlignChars, "").split("|");
    const rows = cap[3]?.trim() ? cap[3].replace(this.rules.other.tableRowBlankLine, "").split(`
`) : [];
    const item = {
      type: "table",
      raw: cap[0],
      header: [],
      align: [],
      rows: []
    };
    if (headers.length !== aligns.length) {
      return;
    }
    for (const align of aligns) {
      if (this.rules.other.tableAlignRight.test(align)) {
        item.align.push("right");
      } else if (this.rules.other.tableAlignCenter.test(align)) {
        item.align.push("center");
      } else if (this.rules.other.tableAlignLeft.test(align)) {
        item.align.push("left");
      } else {
        item.align.push(null);
      }
    }
    for (let i = 0;i < headers.length; i++) {
      item.header.push({
        text: headers[i],
        tokens: this.lexer.inline(headers[i]),
        header: true,
        align: item.align[i]
      });
    }
    for (const row of rows) {
      item.rows.push(splitCells(row, item.header.length).map((cell, i) => {
        return {
          text: cell,
          tokens: this.lexer.inline(cell),
          header: false,
          align: item.align[i]
        };
      }));
    }
    return item;
  }
  lheading(src) {
    const cap = this.rules.block.lheading.exec(src);
    if (cap) {
      return {
        type: "heading",
        raw: cap[0],
        depth: cap[2].charAt(0) === "=" ? 1 : 2,
        text: cap[1],
        tokens: this.lexer.inline(cap[1])
      };
    }
  }
  paragraph(src) {
    const cap = this.rules.block.paragraph.exec(src);
    if (cap) {
      const text2 = cap[1].charAt(cap[1].length - 1) === `
` ? cap[1].slice(0, -1) : cap[1];
      return {
        type: "paragraph",
        raw: cap[0],
        text: text2,
        tokens: this.lexer.inline(text2)
      };
    }
  }
  text(src) {
    const cap = this.rules.block.text.exec(src);
    if (cap) {
      return {
        type: "text",
        raw: cap[0],
        text: cap[0],
        tokens: this.lexer.inline(cap[0])
      };
    }
  }
  escape(src) {
    const cap = this.rules.inline.escape.exec(src);
    if (cap) {
      return {
        type: "escape",
        raw: cap[0],
        text: cap[1]
      };
    }
  }
  tag(src) {
    const cap = this.rules.inline.tag.exec(src);
    if (cap) {
      if (!this.lexer.state.inLink && this.rules.other.startATag.test(cap[0])) {
        this.lexer.state.inLink = true;
      } else if (this.lexer.state.inLink && this.rules.other.endATag.test(cap[0])) {
        this.lexer.state.inLink = false;
      }
      if (!this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(cap[0])) {
        this.lexer.state.inRawBlock = true;
      } else if (this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(cap[0])) {
        this.lexer.state.inRawBlock = false;
      }
      return {
        type: "html",
        raw: cap[0],
        inLink: this.lexer.state.inLink,
        inRawBlock: this.lexer.state.inRawBlock,
        block: false,
        text: cap[0]
      };
    }
  }
  link(src) {
    const cap = this.rules.inline.link.exec(src);
    if (cap) {
      const trimmedUrl = cap[2].trim();
      if (!this.options.pedantic && this.rules.other.startAngleBracket.test(trimmedUrl)) {
        if (!this.rules.other.endAngleBracket.test(trimmedUrl)) {
          return;
        }
        const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), "\\");
        if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {
          return;
        }
      } else {
        const lastParenIndex = findClosingBracket(cap[2], "()");
        if (lastParenIndex === -2) {
          return;
        }
        if (lastParenIndex > -1) {
          const start = cap[0].indexOf("!") === 0 ? 5 : 4;
          const linkLen = start + cap[1].length + lastParenIndex;
          cap[2] = cap[2].substring(0, lastParenIndex);
          cap[0] = cap[0].substring(0, linkLen).trim();
          cap[3] = "";
        }
      }
      let href = cap[2];
      let title = "";
      if (this.options.pedantic) {
        const link2 = this.rules.other.pedanticHrefTitle.exec(href);
        if (link2) {
          href = link2[1];
          title = link2[3];
        }
      } else {
        title = cap[3] ? cap[3].slice(1, -1) : "";
      }
      href = href.trim();
      if (this.rules.other.startAngleBracket.test(href)) {
        if (this.options.pedantic && !this.rules.other.endAngleBracket.test(trimmedUrl)) {
          href = href.slice(1);
        } else {
          href = href.slice(1, -1);
        }
      }
      return outputLink(cap, {
        href: href ? href.replace(this.rules.inline.anyPunctuation, "$1") : href,
        title: title ? title.replace(this.rules.inline.anyPunctuation, "$1") : title
      }, cap[0], this.lexer, this.rules);
    }
  }
  reflink(src, links) {
    let cap;
    if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {
      const linkString = (cap[2] || cap[1]).replace(this.rules.other.multipleSpaceGlobal, " ");
      const link2 = links[linkString.toLowerCase()];
      if (!link2) {
        const text2 = cap[0].charAt(0);
        return {
          type: "text",
          raw: text2,
          text: text2
        };
      }
      return outputLink(cap, link2, cap[0], this.lexer, this.rules);
    }
  }
  emStrong(src, maskedSrc, prevChar = "") {
    let match = this.rules.inline.emStrongLDelim.exec(src);
    if (!match)
      return;
    if (match[3] && prevChar.match(this.rules.other.unicodeAlphaNumeric))
      return;
    const nextChar = match[1] || match[2] || "";
    if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
      const lLength = [...match[0]].length - 1;
      let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
      const endReg = match[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
      endReg.lastIndex = 0;
      maskedSrc = maskedSrc.slice(-1 * src.length + lLength);
      while ((match = endReg.exec(maskedSrc)) != null) {
        rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
        if (!rDelim)
          continue;
        rLength = [...rDelim].length;
        if (match[3] || match[4]) {
          delimTotal += rLength;
          continue;
        } else if (match[5] || match[6]) {
          if (lLength % 3 && !((lLength + rLength) % 3)) {
            midDelimTotal += rLength;
            continue;
          }
        }
        delimTotal -= rLength;
        if (delimTotal > 0)
          continue;
        rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
        const lastCharLength = [...match[0]][0].length;
        const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);
        if (Math.min(lLength, rLength) % 2) {
          const text22 = raw.slice(1, -1);
          return {
            type: "em",
            raw,
            text: text22,
            tokens: this.lexer.inlineTokens(text22)
          };
        }
        const text2 = raw.slice(2, -2);
        return {
          type: "strong",
          raw,
          text: text2,
          tokens: this.lexer.inlineTokens(text2)
        };
      }
    }
  }
  codespan(src) {
    const cap = this.rules.inline.code.exec(src);
    if (cap) {
      let text2 = cap[2].replace(this.rules.other.newLineCharGlobal, " ");
      const hasNonSpaceChars = this.rules.other.nonSpaceChar.test(text2);
      const hasSpaceCharsOnBothEnds = this.rules.other.startingSpaceChar.test(text2) && this.rules.other.endingSpaceChar.test(text2);
      if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
        text2 = text2.substring(1, text2.length - 1);
      }
      return {
        type: "codespan",
        raw: cap[0],
        text: text2
      };
    }
  }
  br(src) {
    const cap = this.rules.inline.br.exec(src);
    if (cap) {
      return {
        type: "br",
        raw: cap[0]
      };
    }
  }
  del(src) {
    const cap = this.rules.inline.del.exec(src);
    if (cap) {
      return {
        type: "del",
        raw: cap[0],
        text: cap[2],
        tokens: this.lexer.inlineTokens(cap[2])
      };
    }
  }
  autolink(src) {
    const cap = this.rules.inline.autolink.exec(src);
    if (cap) {
      let text2, href;
      if (cap[2] === "@") {
        text2 = cap[1];
        href = "mailto:" + text2;
      } else {
        text2 = cap[1];
        href = text2;
      }
      return {
        type: "link",
        raw: cap[0],
        text: text2,
        href,
        tokens: [
          {
            type: "text",
            raw: text2,
            text: text2
          }
        ]
      };
    }
  }
  url(src) {
    let cap;
    if (cap = this.rules.inline.url.exec(src)) {
      let text2, href;
      if (cap[2] === "@") {
        text2 = cap[0];
        href = "mailto:" + text2;
      } else {
        let prevCapZero;
        do {
          prevCapZero = cap[0];
          cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? "";
        } while (prevCapZero !== cap[0]);
        text2 = cap[0];
        if (cap[1] === "www.") {
          href = "http://" + cap[0];
        } else {
          href = cap[0];
        }
      }
      return {
        type: "link",
        raw: cap[0],
        text: text2,
        href,
        tokens: [
          {
            type: "text",
            raw: text2,
            text: text2
          }
        ]
      };
    }
  }
  inlineText(src) {
    const cap = this.rules.inline.text.exec(src);
    if (cap) {
      const escaped = this.lexer.state.inRawBlock;
      return {
        type: "text",
        raw: cap[0],
        text: cap[0],
        escaped
      };
    }
  }
}, _Lexer = class __Lexer {
  tokens;
  options;
  state;
  tokenizer;
  inlineQueue;
  constructor(options2) {
    this.tokens = [];
    this.tokens.links = /* @__PURE__ */ Object.create(null);
    this.options = options2 || _defaults;
    this.options.tokenizer = this.options.tokenizer || new _Tokenizer;
    this.tokenizer = this.options.tokenizer;
    this.tokenizer.options = this.options;
    this.tokenizer.lexer = this;
    this.inlineQueue = [];
    this.state = {
      inLink: false,
      inRawBlock: false,
      top: true
    };
    const rules = {
      other,
      block: block.normal,
      inline: inline.normal
    };
    if (this.options.pedantic) {
      rules.block = block.pedantic;
      rules.inline = inline.pedantic;
    } else if (this.options.gfm) {
      rules.block = block.gfm;
      if (this.options.breaks) {
        rules.inline = inline.breaks;
      } else {
        rules.inline = inline.gfm;
      }
    }
    this.tokenizer.rules = rules;
  }
  static get rules() {
    return {
      block,
      inline
    };
  }
  static lex(src, options2) {
    const lexer2 = new __Lexer(options2);
    return lexer2.lex(src);
  }
  static lexInline(src, options2) {
    const lexer2 = new __Lexer(options2);
    return lexer2.inlineTokens(src);
  }
  lex(src) {
    src = src.replace(other.carriageReturn, `
`);
    this.blockTokens(src, this.tokens);
    for (let i = 0;i < this.inlineQueue.length; i++) {
      const next = this.inlineQueue[i];
      this.inlineTokens(next.src, next.tokens);
    }
    this.inlineQueue = [];
    return this.tokens;
  }
  blockTokens(src, tokens = [], lastParagraphClipped = false) {
    if (this.options.pedantic) {
      src = src.replace(other.tabCharGlobal, "    ").replace(other.spaceLine, "");
    }
    while (src) {
      let token;
      if (this.options.extensions?.block?.some((extTokenizer) => {
        if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
          src = src.substring(token.raw.length);
          tokens.push(token);
          return true;
        }
        return false;
      })) {
        continue;
      }
      if (token = this.tokenizer.space(src)) {
        src = src.substring(token.raw.length);
        const lastToken = tokens.at(-1);
        if (token.raw.length === 1 && lastToken !== undefined) {
          lastToken.raw += `
`;
        } else {
          tokens.push(token);
        }
        continue;
      }
      if (token = this.tokenizer.code(src)) {
        src = src.substring(token.raw.length);
        const lastToken = tokens.at(-1);
        if (lastToken?.type === "paragraph" || lastToken?.type === "text") {
          lastToken.raw += `
` + token.raw;
          lastToken.text += `
` + token.text;
          this.inlineQueue.at(-1).src = lastToken.text;
        } else {
          tokens.push(token);
        }
        continue;
      }
      if (token = this.tokenizer.fences(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.heading(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.hr(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.blockquote(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.list(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.html(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.def(src)) {
        src = src.substring(token.raw.length);
        const lastToken = tokens.at(-1);
        if (lastToken?.type === "paragraph" || lastToken?.type === "text") {
          lastToken.raw += `
` + token.raw;
          lastToken.text += `
` + token.raw;
          this.inlineQueue.at(-1).src = lastToken.text;
        } else if (!this.tokens.links[token.tag]) {
          this.tokens.links[token.tag] = {
            href: token.href,
            title: token.title
          };
        }
        continue;
      }
      if (token = this.tokenizer.table(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.lheading(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      let cutSrc = src;
      if (this.options.extensions?.startBlock) {
        let startIndex = Infinity;
        const tempSrc = src.slice(1);
        let tempStart;
        this.options.extensions.startBlock.forEach((getStartIndex) => {
          tempStart = getStartIndex.call({ lexer: this }, tempSrc);
          if (typeof tempStart === "number" && tempStart >= 0) {
            startIndex = Math.min(startIndex, tempStart);
          }
        });
        if (startIndex < Infinity && startIndex >= 0) {
          cutSrc = src.substring(0, startIndex + 1);
        }
      }
      if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
        const lastToken = tokens.at(-1);
        if (lastParagraphClipped && lastToken?.type === "paragraph") {
          lastToken.raw += `
` + token.raw;
          lastToken.text += `
` + token.text;
          this.inlineQueue.pop();
          this.inlineQueue.at(-1).src = lastToken.text;
        } else {
          tokens.push(token);
        }
        lastParagraphClipped = cutSrc.length !== src.length;
        src = src.substring(token.raw.length);
        continue;
      }
      if (token = this.tokenizer.text(src)) {
        src = src.substring(token.raw.length);
        const lastToken = tokens.at(-1);
        if (lastToken?.type === "text") {
          lastToken.raw += `
` + token.raw;
          lastToken.text += `
` + token.text;
          this.inlineQueue.pop();
          this.inlineQueue.at(-1).src = lastToken.text;
        } else {
          tokens.push(token);
        }
        continue;
      }
      if (src) {
        const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
        if (this.options.silent) {
          console.error(errMsg);
          break;
        } else {
          throw new Error(errMsg);
        }
      }
    }
    this.state.top = true;
    return tokens;
  }
  inline(src, tokens = []) {
    this.inlineQueue.push({ src, tokens });
    return tokens;
  }
  inlineTokens(src, tokens = []) {
    let maskedSrc = src;
    let match = null;
    if (this.tokens.links) {
      const links = Object.keys(this.tokens.links);
      if (links.length > 0) {
        while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {
          if (links.includes(match[0].slice(match[0].lastIndexOf("[") + 1, -1))) {
            maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);
          }
        }
      }
    }
    while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
      maskedSrc = maskedSrc.slice(0, match.index) + "++" + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
    }
    while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
      maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
    }
    let keepPrevChar = false;
    let prevChar = "";
    while (src) {
      if (!keepPrevChar) {
        prevChar = "";
      }
      keepPrevChar = false;
      let token;
      if (this.options.extensions?.inline?.some((extTokenizer) => {
        if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
          src = src.substring(token.raw.length);
          tokens.push(token);
          return true;
        }
        return false;
      })) {
        continue;
      }
      if (token = this.tokenizer.escape(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.tag(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.link(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.reflink(src, this.tokens.links)) {
        src = src.substring(token.raw.length);
        const lastToken = tokens.at(-1);
        if (token.type === "text" && lastToken?.type === "text") {
          lastToken.raw += token.raw;
          lastToken.text += token.text;
        } else {
          tokens.push(token);
        }
        continue;
      }
      if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.codespan(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.br(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.del(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (token = this.tokenizer.autolink(src)) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      if (!this.state.inLink && (token = this.tokenizer.url(src))) {
        src = src.substring(token.raw.length);
        tokens.push(token);
        continue;
      }
      let cutSrc = src;
      if (this.options.extensions?.startInline) {
        let startIndex = Infinity;
        const tempSrc = src.slice(1);
        let tempStart;
        this.options.extensions.startInline.forEach((getStartIndex) => {
          tempStart = getStartIndex.call({ lexer: this }, tempSrc);
          if (typeof tempStart === "number" && tempStart >= 0) {
            startIndex = Math.min(startIndex, tempStart);
          }
        });
        if (startIndex < Infinity && startIndex >= 0) {
          cutSrc = src.substring(0, startIndex + 1);
        }
      }
      if (token = this.tokenizer.inlineText(cutSrc)) {
        src = src.substring(token.raw.length);
        if (token.raw.slice(-1) !== "_") {
          prevChar = token.raw.slice(-1);
        }
        keepPrevChar = true;
        const lastToken = tokens.at(-1);
        if (lastToken?.type === "text") {
          lastToken.raw += token.raw;
          lastToken.text += token.text;
        } else {
          tokens.push(token);
        }
        continue;
      }
      if (src) {
        const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
        if (this.options.silent) {
          console.error(errMsg);
          break;
        } else {
          throw new Error(errMsg);
        }
      }
    }
    return tokens;
  }
}, _Renderer = class {
  options;
  parser;
  constructor(options2) {
    this.options = options2 || _defaults;
  }
  space(token) {
    return "";
  }
  code({ text: text2, lang, escaped }) {
    const langString = (lang || "").match(other.notSpaceStart)?.[0];
    const code = text2.replace(other.endingNewline, "") + `
`;
    if (!langString) {
      return "<pre><code>" + (escaped ? code : escape2(code, true)) + `</code></pre>
`;
    }
    return '<pre><code class="language-' + escape2(langString) + '">' + (escaped ? code : escape2(code, true)) + `</code></pre>
`;
  }
  blockquote({ tokens }) {
    const body = this.parser.parse(tokens);
    return `<blockquote>
${body}</blockquote>
`;
  }
  html({ text: text2 }) {
    return text2;
  }
  heading({ tokens, depth }) {
    return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>
`;
  }
  hr(token) {
    return `<hr>
`;
  }
  list(token) {
    const ordered = token.ordered;
    const start = token.start;
    let body = "";
    for (let j = 0;j < token.items.length; j++) {
      const item = token.items[j];
      body += this.listitem(item);
    }
    const type2 = ordered ? "ol" : "ul";
    const startAttr = ordered && start !== 1 ? ' start="' + start + '"' : "";
    return "<" + type2 + startAttr + `>
` + body + "</" + type2 + `>
`;
  }
  listitem(item) {
    let itemBody = "";
    if (item.task) {
      const checkbox = this.checkbox({ checked: !!item.checked });
      if (item.loose) {
        if (item.tokens[0]?.type === "paragraph") {
          item.tokens[0].text = checkbox + " " + item.tokens[0].text;
          if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === "text") {
            item.tokens[0].tokens[0].text = checkbox + " " + escape2(item.tokens[0].tokens[0].text);
            item.tokens[0].tokens[0].escaped = true;
          }
        } else {
          item.tokens.unshift({
            type: "text",
            raw: checkbox + " ",
            text: checkbox + " ",
            escaped: true
          });
        }
      } else {
        itemBody += checkbox + " ";
      }
    }
    itemBody += this.parser.parse(item.tokens, !!item.loose);
    return `<li>${itemBody}</li>
`;
  }
  checkbox({ checked }) {
    return "<input " + (checked ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
  }
  paragraph({ tokens }) {
    return `<p>${this.parser.parseInline(tokens)}</p>
`;
  }
  table(token) {
    let header = "";
    let cell = "";
    for (let j = 0;j < token.header.length; j++) {
      cell += this.tablecell(token.header[j]);
    }
    header += this.tablerow({ text: cell });
    let body = "";
    for (let j = 0;j < token.rows.length; j++) {
      const row = token.rows[j];
      cell = "";
      for (let k2 = 0;k2 < row.length; k2++) {
        cell += this.tablecell(row[k2]);
      }
      body += this.tablerow({ text: cell });
    }
    if (body)
      body = `<tbody>${body}</tbody>`;
    return `<table>
<thead>
` + header + `</thead>
` + body + `</table>
`;
  }
  tablerow({ text: text2 }) {
    return `<tr>
${text2}</tr>
`;
  }
  tablecell(token) {
    const content = this.parser.parseInline(token.tokens);
    const type2 = token.header ? "th" : "td";
    const tag2 = token.align ? `<${type2} align="${token.align}">` : `<${type2}>`;
    return tag2 + content + `</${type2}>
`;
  }
  strong({ tokens }) {
    return `<strong>${this.parser.parseInline(tokens)}</strong>`;
  }
  em({ tokens }) {
    return `<em>${this.parser.parseInline(tokens)}</em>`;
  }
  codespan({ text: text2 }) {
    return `<code>${escape2(text2, true)}</code>`;
  }
  br(token) {
    return "<br>";
  }
  del({ tokens }) {
    return `<del>${this.parser.parseInline(tokens)}</del>`;
  }
  link({ href, title, tokens }) {
    const text2 = this.parser.parseInline(tokens);
    const cleanHref = cleanUrl(href);
    if (cleanHref === null) {
      return text2;
    }
    href = cleanHref;
    let out = '<a href="' + href + '"';
    if (title) {
      out += ' title="' + escape2(title) + '"';
    }
    out += ">" + text2 + "</a>";
    return out;
  }
  image({ href, title, text: text2, tokens }) {
    if (tokens) {
      text2 = this.parser.parseInline(tokens, this.parser.textRenderer);
    }
    const cleanHref = cleanUrl(href);
    if (cleanHref === null) {
      return escape2(text2);
    }
    href = cleanHref;
    let out = `<img src="${href}" alt="${text2}"`;
    if (title) {
      out += ` title="${escape2(title)}"`;
    }
    out += ">";
    return out;
  }
  text(token) {
    return "tokens" in token && token.tokens ? this.parser.parseInline(token.tokens) : ("escaped" in token) && token.escaped ? token.text : escape2(token.text);
  }
}, _TextRenderer = class {
  strong({ text: text2 }) {
    return text2;
  }
  em({ text: text2 }) {
    return text2;
  }
  codespan({ text: text2 }) {
    return text2;
  }
  del({ text: text2 }) {
    return text2;
  }
  html({ text: text2 }) {
    return text2;
  }
  text({ text: text2 }) {
    return text2;
  }
  link({ text: text2 }) {
    return "" + text2;
  }
  image({ text: text2 }) {
    return "" + text2;
  }
  br() {
    return "";
  }
}, _Parser = class __Parser {
  options;
  renderer;
  textRenderer;
  constructor(options2) {
    this.options = options2 || _defaults;
    this.options.renderer = this.options.renderer || new _Renderer;
    this.renderer = this.options.renderer;
    this.renderer.options = this.options;
    this.renderer.parser = this;
    this.textRenderer = new _TextRenderer;
  }
  static parse(tokens, options2) {
    const parser2 = new __Parser(options2);
    return parser2.parse(tokens);
  }
  static parseInline(tokens, options2) {
    const parser2 = new __Parser(options2);
    return parser2.parseInline(tokens);
  }
  parse(tokens, top = true) {
    let out = "";
    for (let i = 0;i < tokens.length; i++) {
      const anyToken = tokens[i];
      if (this.options.extensions?.renderers?.[anyToken.type]) {
        const genericToken = anyToken;
        const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);
        if (ret !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(genericToken.type)) {
          out += ret || "";
          continue;
        }
      }
      const token = anyToken;
      switch (token.type) {
        case "space": {
          out += this.renderer.space(token);
          continue;
        }
        case "hr": {
          out += this.renderer.hr(token);
          continue;
        }
        case "heading": {
          out += this.renderer.heading(token);
          continue;
        }
        case "code": {
          out += this.renderer.code(token);
          continue;
        }
        case "table": {
          out += this.renderer.table(token);
          continue;
        }
        case "blockquote": {
          out += this.renderer.blockquote(token);
          continue;
        }
        case "list": {
          out += this.renderer.list(token);
          continue;
        }
        case "html": {
          out += this.renderer.html(token);
          continue;
        }
        case "paragraph": {
          out += this.renderer.paragraph(token);
          continue;
        }
        case "text": {
          let textToken = token;
          let body = this.renderer.text(textToken);
          while (i + 1 < tokens.length && tokens[i + 1].type === "text") {
            textToken = tokens[++i];
            body += `
` + this.renderer.text(textToken);
          }
          if (top) {
            out += this.renderer.paragraph({
              type: "paragraph",
              raw: body,
              text: body,
              tokens: [{ type: "text", raw: body, text: body, escaped: true }]
            });
          } else {
            out += body;
          }
          continue;
        }
        default: {
          const errMsg = 'Token with "' + token.type + '" type was not found.';
          if (this.options.silent) {
            console.error(errMsg);
            return "";
          } else {
            throw new Error(errMsg);
          }
        }
      }
    }
    return out;
  }
  parseInline(tokens, renderer = this.renderer) {
    let out = "";
    for (let i = 0;i < tokens.length; i++) {
      const anyToken = tokens[i];
      if (this.options.extensions?.renderers?.[anyToken.type]) {
        const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);
        if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(anyToken.type)) {
          out += ret || "";
          continue;
        }
      }
      const token = anyToken;
      switch (token.type) {
        case "escape": {
          out += renderer.text(token);
          break;
        }
        case "html": {
          out += renderer.html(token);
          break;
        }
        case "link": {
          out += renderer.link(token);
          break;
        }
        case "image": {
          out += renderer.image(token);
          break;
        }
        case "strong": {
          out += renderer.strong(token);
          break;
        }
        case "em": {
          out += renderer.em(token);
          break;
        }
        case "codespan": {
          out += renderer.codespan(token);
          break;
        }
        case "br": {
          out += renderer.br(token);
          break;
        }
        case "del": {
          out += renderer.del(token);
          break;
        }
        case "text": {
          out += renderer.text(token);
          break;
        }
        default: {
          const errMsg = 'Token with "' + token.type + '" type was not found.';
          if (this.options.silent) {
            console.error(errMsg);
            return "";
          } else {
            throw new Error(errMsg);
          }
        }
      }
    }
    return out;
  }
}, _Hooks, Marked = class {
  defaults = _getDefaults();
  options = this.setOptions;
  parse = this.parseMarkdown(true);
  parseInline = this.parseMarkdown(false);
  Parser = _Parser;
  Renderer = _Renderer;
  TextRenderer = _TextRenderer;
  Lexer = _Lexer;
  Tokenizer = _Tokenizer;
  Hooks = _Hooks;
  constructor(...args) {
    this.use(...args);
  }
  walkTokens(tokens, callback) {
    let values = [];
    for (const token of tokens) {
      values = values.concat(callback.call(this, token));
      switch (token.type) {
        case "table": {
          const tableToken = token;
          for (const cell of tableToken.header) {
            values = values.concat(this.walkTokens(cell.tokens, callback));
          }
          for (const row of tableToken.rows) {
            for (const cell of row) {
              values = values.concat(this.walkTokens(cell.tokens, callback));
            }
          }
          break;
        }
        case "list": {
          const listToken = token;
          values = values.concat(this.walkTokens(listToken.items, callback));
          break;
        }
        default: {
          const genericToken = token;
          if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
            this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
              const tokens2 = genericToken[childTokens].flat(Infinity);
              values = values.concat(this.walkTokens(tokens2, callback));
            });
          } else if (genericToken.tokens) {
            values = values.concat(this.walkTokens(genericToken.tokens, callback));
          }
        }
      }
    }
    return values;
  }
  use(...args) {
    const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };
    args.forEach((pack) => {
      const opts = { ...pack };
      opts.async = this.defaults.async || opts.async || false;
      if (pack.extensions) {
        pack.extensions.forEach((ext) => {
          if (!ext.name) {
            throw new Error("extension name required");
          }
          if ("renderer" in ext) {
            const prevRenderer = extensions.renderers[ext.name];
            if (prevRenderer) {
              extensions.renderers[ext.name] = function(...args2) {
                let ret = ext.renderer.apply(this, args2);
                if (ret === false) {
                  ret = prevRenderer.apply(this, args2);
                }
                return ret;
              };
            } else {
              extensions.renderers[ext.name] = ext.renderer;
            }
          }
          if ("tokenizer" in ext) {
            if (!ext.level || ext.level !== "block" && ext.level !== "inline") {
              throw new Error("extension level must be 'block' or 'inline'");
            }
            const extLevel = extensions[ext.level];
            if (extLevel) {
              extLevel.unshift(ext.tokenizer);
            } else {
              extensions[ext.level] = [ext.tokenizer];
            }
            if (ext.start) {
              if (ext.level === "block") {
                if (extensions.startBlock) {
                  extensions.startBlock.push(ext.start);
                } else {
                  extensions.startBlock = [ext.start];
                }
              } else if (ext.level === "inline") {
                if (extensions.startInline) {
                  extensions.startInline.push(ext.start);
                } else {
                  extensions.startInline = [ext.start];
                }
              }
            }
          }
          if ("childTokens" in ext && ext.childTokens) {
            extensions.childTokens[ext.name] = ext.childTokens;
          }
        });
        opts.extensions = extensions;
      }
      if (pack.renderer) {
        const renderer = this.defaults.renderer || new _Renderer(this.defaults);
        for (const prop in pack.renderer) {
          if (!(prop in renderer)) {
            throw new Error(`renderer '${prop}' does not exist`);
          }
          if (["options", "parser"].includes(prop)) {
            continue;
          }
          const rendererProp = prop;
          const rendererFunc = pack.renderer[rendererProp];
          const prevRenderer = renderer[rendererProp];
          renderer[rendererProp] = (...args2) => {
            let ret = rendererFunc.apply(renderer, args2);
            if (ret === false) {
              ret = prevRenderer.apply(renderer, args2);
            }
            return ret || "";
          };
        }
        opts.renderer = renderer;
      }
      if (pack.tokenizer) {
        const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);
        for (const prop in pack.tokenizer) {
          if (!(prop in tokenizer)) {
            throw new Error(`tokenizer '${prop}' does not exist`);
          }
          if (["options", "rules", "lexer"].includes(prop)) {
            continue;
          }
          const tokenizerProp = prop;
          const tokenizerFunc = pack.tokenizer[tokenizerProp];
          const prevTokenizer = tokenizer[tokenizerProp];
          tokenizer[tokenizerProp] = (...args2) => {
            let ret = tokenizerFunc.apply(tokenizer, args2);
            if (ret === false) {
              ret = prevTokenizer.apply(tokenizer, args2);
            }
            return ret;
          };
        }
        opts.tokenizer = tokenizer;
      }
      if (pack.hooks) {
        const hooks = this.defaults.hooks || new _Hooks;
        for (const prop in pack.hooks) {
          if (!(prop in hooks)) {
            throw new Error(`hook '${prop}' does not exist`);
          }
          if (["options", "block"].includes(prop)) {
            continue;
          }
          const hooksProp = prop;
          const hooksFunc = pack.hooks[hooksProp];
          const prevHook = hooks[hooksProp];
          if (_Hooks.passThroughHooks.has(prop)) {
            hooks[hooksProp] = (arg) => {
              if (this.defaults.async) {
                return Promise.resolve(hooksFunc.call(hooks, arg)).then((ret2) => {
                  return prevHook.call(hooks, ret2);
                });
              }
              const ret = hooksFunc.call(hooks, arg);
              return prevHook.call(hooks, ret);
            };
          } else {
            hooks[hooksProp] = (...args2) => {
              let ret = hooksFunc.apply(hooks, args2);
              if (ret === false) {
                ret = prevHook.apply(hooks, args2);
              }
              return ret;
            };
          }
        }
        opts.hooks = hooks;
      }
      if (pack.walkTokens) {
        const walkTokens2 = this.defaults.walkTokens;
        const packWalktokens = pack.walkTokens;
        opts.walkTokens = function(token) {
          let values = [];
          values.push(packWalktokens.call(this, token));
          if (walkTokens2) {
            values = values.concat(walkTokens2.call(this, token));
          }
          return values;
        };
      }
      this.defaults = { ...this.defaults, ...opts };
    });
    return this;
  }
  setOptions(opt) {
    this.defaults = { ...this.defaults, ...opt };
    return this;
  }
  lexer(src, options2) {
    return _Lexer.lex(src, options2 ?? this.defaults);
  }
  parser(tokens, options2) {
    return _Parser.parse(tokens, options2 ?? this.defaults);
  }
  parseMarkdown(blockType) {
    const parse22 = (src, options2) => {
      const origOpt = { ...options2 };
      const opt = { ...this.defaults, ...origOpt };
      const throwError = this.onError(!!opt.silent, !!opt.async);
      if (this.defaults.async === true && origOpt.async === false) {
        return throwError(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
      }
      if (typeof src === "undefined" || src === null) {
        return throwError(new Error("marked(): input parameter is undefined or null"));
      }
      if (typeof src !== "string") {
        return throwError(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(src) + ", string expected"));
      }
      if (opt.hooks) {
        opt.hooks.options = opt;
        opt.hooks.block = blockType;
      }
      const lexer2 = opt.hooks ? opt.hooks.provideLexer() : blockType ? _Lexer.lex : _Lexer.lexInline;
      const parser2 = opt.hooks ? opt.hooks.provideParser() : blockType ? _Parser.parse : _Parser.parseInline;
      if (opt.async) {
        return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then((src2) => lexer2(src2, opt)).then((tokens) => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens).then((tokens) => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then((tokens) => parser2(tokens, opt)).then((html2) => opt.hooks ? opt.hooks.postprocess(html2) : html2).catch(throwError);
      }
      try {
        if (opt.hooks) {
          src = opt.hooks.preprocess(src);
        }
        let tokens = lexer2(src, opt);
        if (opt.hooks) {
          tokens = opt.hooks.processAllTokens(tokens);
        }
        if (opt.walkTokens) {
          this.walkTokens(tokens, opt.walkTokens);
        }
        let html2 = parser2(tokens, opt);
        if (opt.hooks) {
          html2 = opt.hooks.postprocess(html2);
        }
        return html2;
      } catch (e) {
        return throwError(e);
      }
    };
    return parse22;
  }
  onError(silent, async) {
    return (e) => {
      e.message += `
Please report this to https://github.com/markedjs/marked.`;
      if (silent) {
        const msg = "<p>An error occurred:</p><pre>" + escape2(e.message + "", true) + "</pre>";
        if (async) {
          return Promise.resolve(msg);
        }
        return msg;
      }
      if (async) {
        return Promise.reject(e);
      }
      throw e;
    };
  }
}, markedInstance, options, setOptions, use, walkTokens, parseInline, parser, lexer;
var init_marked_esm = __esm(() => {
  _defaults = _getDefaults();
  noopTest = { exec: () => null };
  other = {
    codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
    outputLinkReplace: /\\([\[\]])/g,
    indentCodeCompensation: /^(\s+)(?:```)/,
    beginningSpace: /^\s+/,
    endingHash: /#$/,
    startingSpaceChar: /^ /,
    endingSpaceChar: / $/,
    nonSpaceChar: /[^ ]/,
    newLineCharGlobal: /\n/g,
    tabCharGlobal: /\t/g,
    multipleSpaceGlobal: /\s+/g,
    blankLine: /^[ \t]*$/,
    doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
    blockquoteStart: /^ {0,3}>/,
    blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
    blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
    listReplaceTabs: /^\t+/,
    listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
    listIsTask: /^\[[ xX]\] /,
    listReplaceTask: /^\[[ xX]\] +/,
    anyLine: /\n.*\n/,
    hrefBrackets: /^<(.*)>$/,
    tableDelimiter: /[:|]/,
    tableAlignChars: /^\||\| *$/g,
    tableRowBlankLine: /\n[ \t]*$/,
    tableAlignRight: /^ *-+: *$/,
    tableAlignCenter: /^ *:-+: *$/,
    tableAlignLeft: /^ *:-+ *$/,
    startATag: /^<a /i,
    endATag: /^<\/a>/i,
    startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
    endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
    startAngleBracket: /^</,
    endAngleBracket: />$/,
    pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
    unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
    escapeTest: /[&<>"']/,
    escapeReplace: /[&<>"']/g,
    escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
    escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
    unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,
    caret: /(^|[^\[])\^/g,
    percentDecode: /%25/g,
    findPipe: /\|/g,
    splitPipe: / \|/,
    slashPipe: /\\\|/g,
    carriageReturn: /\r\n|\r/g,
    spaceLine: /^ +$/gm,
    notSpaceStart: /^\S*/,
    endingNewline: /\n$/,
    listItemRegex: (bull) => new RegExp(`^( {0,3}${bull})((?:[	 ][^\\n]*)?(?:\\n|$))`),
    nextBulletRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),
    hrRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
    fencesBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\`\`\`|~~~)`),
    headingBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`),
    htmlBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}<(?:[a-z].*>|!--)`, "i")
  };
  newline = /^(?:[ \t]*(?:\n|$))+/;
  blockCode = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
  fences = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
  hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
  heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
  bullet = /(?:[*+-]|\d{1,9}[.)])/;
  lheadingCore = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
  lheading = edit(lheadingCore).replace(/bull/g, bullet).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
  lheadingGfm = edit(lheadingCore).replace(/bull/g, bullet).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
  _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
  blockText = /^[^\n]+/;
  _blockLabel = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
  def = edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", _blockLabel).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
  list = edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, bullet).getRegex();
  _comment = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
  html = edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))", "i").replace("comment", _comment).replace("tag", _tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
  paragraph = edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
  blockquote = edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", paragraph).getRegex();
  blockNormal = {
    blockquote,
    code: blockCode,
    def,
    fences,
    heading,
    hr,
    html,
    lheading,
    list,
    newline,
    paragraph,
    table: noopTest,
    text: blockText
  };
  gfmTable = edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3}\t)[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
  blockGfm = {
    ...blockNormal,
    lheading: lheadingGfm,
    table: gfmTable,
    paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", gfmTable).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex()
  };
  blockPedantic = {
    ...blockNormal,
    html: edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", _comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
    def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
    heading: /^(#{1,6})(.*)(?:\n+|$)/,
    fences: noopTest,
    lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
    paragraph: edit(_paragraph).replace("hr", hr).replace("heading", ` *#{1,6} *[^
]`).replace("lheading", lheading).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
  };
  escape = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
  inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
  br = /^( {2,}|\\)\n(?!\s*$)/;
  inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
  _punctuation = /[\p{P}\p{S}]/u;
  _punctuationOrSpace = /[\s\p{P}\p{S}]/u;
  _notPunctuationOrSpace = /[^\s\p{P}\p{S}]/u;
  punctuation = edit(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, _punctuationOrSpace).getRegex();
  _punctuationGfmStrongEm = /(?!~)[\p{P}\p{S}]/u;
  _punctuationOrSpaceGfmStrongEm = /(?!~)[\s\p{P}\p{S}]/u;
  _notPunctuationOrSpaceGfmStrongEm = /(?:[^\s\p{P}\p{S}]|~)/u;
  blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g;
  emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
  emStrongLDelim = edit(emStrongLDelimCore, "u").replace(/punct/g, _punctuation).getRegex();
  emStrongLDelimGfm = edit(emStrongLDelimCore, "u").replace(/punct/g, _punctuationGfmStrongEm).getRegex();
  emStrongRDelimAst = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
  emStrongRDelimAstGfm = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpaceGfmStrongEm).replace(/punctSpace/g, _punctuationOrSpaceGfmStrongEm).replace(/punct/g, _punctuationGfmStrongEm).getRegex();
  emStrongRDelimUnd = edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
  anyPunctuation = edit(/\\(punct)/, "gu").replace(/punct/g, _punctuation).getRegex();
  autolink = edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
  _inlineComment = edit(_comment).replace("(?:-->|$)", "-->").getRegex();
  tag = edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", _inlineComment).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
  _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
  link = edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", _inlineLabel).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
  reflink = edit(/^!?\[(label)\]\[(ref)\]/).replace("label", _inlineLabel).replace("ref", _blockLabel).getRegex();
  nolink = edit(/^!?\[(ref)\](?:\[\])?/).replace("ref", _blockLabel).getRegex();
  reflinkSearch = edit("reflink|nolink(?!\\()", "g").replace("reflink", reflink).replace("nolink", nolink).getRegex();
  inlineNormal = {
    _backpedal: noopTest,
    anyPunctuation,
    autolink,
    blockSkip,
    br,
    code: inlineCode,
    del: noopTest,
    emStrongLDelim,
    emStrongRDelimAst,
    emStrongRDelimUnd,
    escape,
    link,
    nolink,
    punctuation,
    reflink,
    reflinkSearch,
    tag,
    text: inlineText,
    url: noopTest
  };
  inlinePedantic = {
    ...inlineNormal,
    link: edit(/^!?\[(label)\]\((.*?)\)/).replace("label", _inlineLabel).getRegex(),
    reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _inlineLabel).getRegex()
  };
  inlineGfm = {
    ...inlineNormal,
    emStrongRDelimAst: emStrongRDelimAstGfm,
    emStrongLDelim: emStrongLDelimGfm,
    url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
    _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
    del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
    text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
  };
  inlineBreaks = {
    ...inlineGfm,
    br: edit(br).replace("{2,}", "*").getRegex(),
    text: edit(inlineGfm.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
  };
  block = {
    normal: blockNormal,
    gfm: blockGfm,
    pedantic: blockPedantic
  };
  inline = {
    normal: inlineNormal,
    gfm: inlineGfm,
    breaks: inlineBreaks,
    pedantic: inlinePedantic
  };
  escapeReplacements = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;",
    "'": "&#39;"
  };
  _Hooks = class {
    options;
    block;
    constructor(options2) {
      this.options = options2 || _defaults;
    }
    static passThroughHooks = /* @__PURE__ */ new Set([
      "preprocess",
      "postprocess",
      "processAllTokens"
    ]);
    preprocess(markdown) {
      return markdown;
    }
    postprocess(html2) {
      return html2;
    }
    processAllTokens(tokens) {
      return tokens;
    }
    provideLexer() {
      return this.block ? _Lexer.lex : _Lexer.lexInline;
    }
    provideParser() {
      return this.block ? _Parser.parse : _Parser.parseInline;
    }
  };
  markedInstance = new Marked;
  marked.options = marked.setOptions = function(options2) {
    markedInstance.setOptions(options2);
    marked.defaults = markedInstance.defaults;
    changeDefaults(marked.defaults);
    return marked;
  };
  marked.getDefaults = _getDefaults;
  marked.defaults = _defaults;
  marked.use = function(...args) {
    markedInstance.use(...args);
    marked.defaults = markedInstance.defaults;
    changeDefaults(marked.defaults);
    return marked;
  };
  marked.walkTokens = function(tokens, callback) {
    return markedInstance.walkTokens(tokens, callback);
  };
  marked.parseInline = markedInstance.parseInline;
  marked.Parser = _Parser;
  marked.parser = _Parser.parse;
  marked.Renderer = _Renderer;
  marked.TextRenderer = _TextRenderer;
  marked.Lexer = _Lexer;
  marked.lexer = _Lexer.lex;
  marked.Tokenizer = _Tokenizer;
  marked.Hooks = _Hooks;
  marked.parse = marked;
  options = marked.options;
  setOptions = marked.setOptions;
  use = marked.use;
  walkTokens = marked.walkTokens;
  parseInline = marked.parseInline;
  parser = _Parser.parse;
  lexer = _Lexer.lex;
});

// ../../node_modules/.pnpm/@react-email+markdown@0.0.18_react@19.2.7/node_modules/@react-email/markdown/dist/index.mjs
function camelToKebabCase(str) {
  return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
}
function escapeQuotes(value) {
  if (typeof value === "string" && value.includes('"'))
    return value.replace(/"/g, "&#x27;");
  return value;
}
function parseCssInJsToInlineCss(cssProperties) {
  if (!cssProperties)
    return "";
  const numericalCssProperties = [
    "width",
    "height",
    "margin",
    "marginTop",
    "marginRight",
    "marginBottom",
    "marginLeft",
    "padding",
    "paddingTop",
    "paddingRight",
    "paddingBottom",
    "paddingLeft",
    "borderWidth",
    "borderTopWidth",
    "borderRightWidth",
    "borderBottomWidth",
    "borderLeftWidth",
    "outlineWidth",
    "top",
    "right",
    "bottom",
    "left",
    "fontSize",
    "letterSpacing",
    "wordSpacing",
    "maxWidth",
    "minWidth",
    "maxHeight",
    "minHeight",
    "borderRadius",
    "borderTopLeftRadius",
    "borderTopRightRadius",
    "borderBottomLeftRadius",
    "borderBottomRightRadius",
    "textIndent",
    "gridColumnGap",
    "gridRowGap",
    "gridGap",
    "translateX",
    "translateY"
  ];
  return Object.entries(cssProperties).map(([property, value]) => {
    if (typeof value === "number" && numericalCssProperties.includes(property))
      return `${camelToKebabCase(property)}:${value}px`;
    const escapedValue = escapeQuotes(value);
    return `${camelToKebabCase(property)}:${escapedValue}`;
  }).join(";");
}
var React12, import_jsx_runtime14, emptyStyle, baseHeaderStyles, h1, h2, h3, h4, h5, h6, bold, italic, blockQuote, codeInline, codeBlock, link2, styles, Markdown;
var init_dist14 = __esm(() => {
  init_marked_esm();
  React12 = __toESM(require_react(), 1);
  import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  emptyStyle = {};
  baseHeaderStyles = {
    fontWeight: "500",
    paddingTop: 20
  };
  h1 = {
    ...baseHeaderStyles,
    fontSize: "2.5rem"
  };
  h2 = {
    ...baseHeaderStyles,
    fontSize: "2rem"
  };
  h3 = {
    ...baseHeaderStyles,
    fontSize: "1.75rem"
  };
  h4 = {
    ...baseHeaderStyles,
    fontSize: "1.5rem"
  };
  h5 = {
    ...baseHeaderStyles,
    fontSize: "1.25rem"
  };
  h6 = {
    ...baseHeaderStyles,
    fontSize: "1rem"
  };
  bold = { fontWeight: "bold" };
  italic = { fontStyle: "italic" };
  blockQuote = {
    background: "#f9f9f9",
    borderLeft: "10px solid #ccc",
    margin: "1.5em 10px",
    padding: "1em 10px"
  };
  codeInline = {
    color: "#212529",
    fontSize: "87.5%",
    display: "inline",
    background: " #f8f8f8",
    fontFamily: "SFMono-Regular,Menlo,Monaco,Consolas,monospace"
  };
  codeBlock = {
    ...codeInline,
    display: "block",
    paddingTop: 10,
    paddingRight: 10,
    paddingLeft: 10,
    paddingBottom: 1,
    marginBottom: 20,
    background: " #f8f8f8"
  };
  link2 = {
    color: "#007bff",
    textDecoration: "underline",
    backgroundColor: "transparent"
  };
  styles = {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    blockQuote,
    bold,
    italic,
    link: link2,
    codeBlock: {
      ...codeBlock,
      wordWrap: "break-word"
    },
    codeInline: {
      ...codeInline,
      wordWrap: "break-word"
    },
    p: emptyStyle,
    li: emptyStyle,
    ul: emptyStyle,
    ol: emptyStyle,
    image: emptyStyle,
    br: emptyStyle,
    hr: emptyStyle,
    table: emptyStyle,
    thead: emptyStyle,
    tbody: emptyStyle,
    th: emptyStyle,
    td: emptyStyle,
    tr: emptyStyle,
    strikethrough: emptyStyle
  };
  Markdown = React12.forwardRef(({ children, markdownContainerStyles, markdownCustomStyles, ...props }, ref) => {
    const finalStyles = {
      ...styles,
      ...markdownCustomStyles
    };
    const renderer = new _Renderer;
    renderer.blockquote = ({ tokens }) => {
      const text2 = renderer.parser.parse(tokens);
      return `<blockquote${parseCssInJsToInlineCss(finalStyles.blockQuote) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.blockQuote)}"` : ""}>
${text2}</blockquote>
`;
    };
    renderer.br = () => {
      return `<br${parseCssInJsToInlineCss(finalStyles.br) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.br)}"` : ""} />`;
    };
    renderer.code = ({ text: text2 }) => {
      text2 = `${text2.replace(/\n$/, "")}
`;
      return `<pre${parseCssInJsToInlineCss(finalStyles.codeBlock) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.codeBlock)}"` : ""}><code>${text2}</code></pre>
`;
    };
    renderer.codespan = ({ text: text2 }) => {
      return `<code${parseCssInJsToInlineCss(finalStyles.codeInline) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.codeInline)}"` : ""}>${text2}</code>`;
    };
    renderer.del = ({ tokens }) => {
      const text2 = renderer.parser.parseInline(tokens);
      return `<del${parseCssInJsToInlineCss(finalStyles.strikethrough) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.strikethrough)}"` : ""}>${text2}</del>`;
    };
    renderer.em = ({ tokens }) => {
      const text2 = renderer.parser.parseInline(tokens);
      return `<em${parseCssInJsToInlineCss(finalStyles.italic) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.italic)}"` : ""}>${text2}</em>`;
    };
    renderer.heading = ({ tokens, depth }) => {
      const text2 = renderer.parser.parseInline(tokens);
      return `<h${depth}${parseCssInJsToInlineCss(finalStyles[`h${depth}`]) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles[`h${depth}`])}"` : ""}>${text2}</h${depth}>`;
    };
    renderer.hr = () => {
      return `<hr${parseCssInJsToInlineCss(finalStyles.hr) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.hr)}"` : ""} />
`;
    };
    renderer.image = ({ href, text: text2, title }) => {
      return `<img src="${href.replaceAll('"', "&quot;")}" alt="${text2.replaceAll('"', "&quot;")}"${title ? ` title="${title}"` : ""}${parseCssInJsToInlineCss(finalStyles.image) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.image)}"` : ""}>`;
    };
    renderer.link = ({ href, title, tokens }) => {
      const text2 = renderer.parser.parseInline(tokens);
      return `<a href="${href}" target="_blank"${title ? ` title="${title}"` : ""}${parseCssInJsToInlineCss(finalStyles.link) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.link)}"` : ""}>${text2}</a>`;
    };
    renderer.listitem = ({ tokens }) => {
      const text2 = tokens.some((token) => token.type === "list") ? renderer.parser.parse(tokens) : renderer.parser.parseInline(tokens);
      return `<li${parseCssInJsToInlineCss(finalStyles.li) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.li)}"` : ""}>${text2}</li>
`;
    };
    renderer.list = ({ items, ordered, start }) => {
      const type2 = ordered ? "ol" : "ul";
      const startAt = ordered && start !== 1 ? ` start="${start}"` : "";
      const styles$1 = parseCssInJsToInlineCss(finalStyles[ordered ? "ol" : "ul"]);
      return "<" + type2 + startAt + `${styles$1 !== "" ? ` style="${styles$1}"` : ""}>
` + items.map((item) => renderer.listitem(item)).join("") + "</" + type2 + `>
`;
    };
    renderer.paragraph = ({ tokens }) => {
      const text2 = renderer.parser.parseInline(tokens);
      return `<p${parseCssInJsToInlineCss(finalStyles.p) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.p)}"` : ""}>${text2}</p>
`;
    };
    renderer.strong = ({ tokens }) => {
      const text2 = renderer.parser.parseInline(tokens);
      return `<strong${parseCssInJsToInlineCss(finalStyles.bold) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.bold)}"` : ""}>${text2}</strong>`;
    };
    renderer.table = ({ header, rows }) => {
      const styleTable = parseCssInJsToInlineCss(finalStyles.table);
      const styleThead = parseCssInJsToInlineCss(finalStyles.thead);
      const styleTbody = parseCssInJsToInlineCss(finalStyles.tbody);
      const theadRow = renderer.tablerow({ text: header.map((cell) => renderer.tablecell(cell)).join("") });
      const tbodyRows = rows.map((row) => renderer.tablerow({ text: row.map((cell) => renderer.tablecell(cell)).join("") })).join("");
      const thead = `<thead${styleThead ? ` style="${styleThead}"` : ""}>
${theadRow}</thead>`;
      const tbody = `<tbody${styleTbody ? ` style="${styleTbody}"` : ""}>${tbodyRows}</tbody>`;
      return `<table${styleTable ? ` style="${styleTable}"` : ""}>
${thead}
${tbody}</table>
`;
    };
    renderer.tablecell = ({ tokens, align, header }) => {
      const text2 = renderer.parser.parseInline(tokens);
      const type2 = header ? "th" : "td";
      return `${align ? `<${type2} align="${align}"${parseCssInJsToInlineCss(finalStyles.td) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.td)}"` : ""}>` : `<${type2}${parseCssInJsToInlineCss(finalStyles.td) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.td)}"` : ""}>`}${text2}</${type2}>
`;
    };
    renderer.tablerow = ({ text: text2 }) => {
      return `<tr${parseCssInJsToInlineCss(finalStyles.tr) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.tr)}"` : ""}>
${text2}</tr>
`;
    };
    return /* @__PURE__ */ import_jsx_runtime14.jsx("div", {
      ...props,
      dangerouslySetInnerHTML: { __html: marked.parse(children, {
        renderer,
        async: false
      }) },
      "data-id": "react-email-markdown",
      ref,
      style: markdownContainerStyles
    });
  });
  Markdown.displayName = "Markdown";
});

// ../../node_modules/.pnpm/@react-email+preview@0.0.14_react@19.2.7/node_modules/@react-email/preview/dist/index.mjs
var React13, import_jsx_runtime15, PREVIEW_MAX_LENGTH = 150, Preview, whiteSpaceCodes = " ‌​‍‎‏\uFEFF", renderWhiteSpace = (text2) => {
  if (text2.length >= PREVIEW_MAX_LENGTH)
    return null;
  return /* @__PURE__ */ import_jsx_runtime15.jsx("div", { children: whiteSpaceCodes.repeat(PREVIEW_MAX_LENGTH - text2.length) });
};
var init_dist15 = __esm(() => {
  React13 = __toESM(require_react(), 1);
  import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  Preview = React13.forwardRef(({ children = "", ...props }, ref) => {
    const text2 = (Array.isArray(children) ? children.join("") : children).substring(0, PREVIEW_MAX_LENGTH);
    return /* @__PURE__ */ import_jsx_runtime15.jsxs("div", {
      style: {
        display: "none",
        overflow: "hidden",
        lineHeight: "1px",
        opacity: 0,
        maxHeight: 0,
        maxWidth: 0
      },
      "data-skip-in-text": true,
      ...props,
      ref,
      children: [text2, renderWhiteSpace(text2)]
    });
  });
  Preview.displayName = "Preview";
});

// ../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/html.mjs
var exports_html = {};
__export(exports_html, {
  printers: () => Ll,
  parsers: () => Qr,
  options: () => ds,
  languages: () => ms,
  default: () => ws
});
function Ns(e) {
  return this[e < 0 ? this.length + e : e];
}
function Os(e) {
  if (typeof e == "string")
    return Ye;
  if (Array.isArray(e))
    return je;
  if (!e)
    return;
  let { type: t } = e;
  if (bt.has(t))
    return t;
}
function Is(e) {
  let t = e === null ? "null" : typeof e;
  if (t !== "string" && t !== "object")
    return `Unexpected doc '${t}', 
Expected it to be 'string' or 'object'.`;
  if (wt(e))
    throw new Error("doc is valid.");
  let r = Object.prototype.toString.call(e);
  if (r !== "[object Object]")
    return `Unexpected doc '${r}'.`;
  let n2 = Ds([...bt].map((i) => `'${i}'`));
  return `Unexpected doc.type '${e.type}'.
Expected it to be ${n2}.`;
}
function ar(e, t) {
  if (typeof e == "string")
    return t(e);
  let r = new Map;
  return n2(e);
  function n2(s) {
    if (r.has(s))
      return r.get(s);
    let a = i(s);
    return r.set(s, a), a;
  }
  function i(s) {
    switch (wt(s)) {
      case je:
        return t(s.map(n2));
      case Le:
        return t({ ...s, parts: s.parts.map(n2) });
      case Pe:
        return t({ ...s, breakContents: n2(s.breakContents), flatContents: n2(s.flatContents) });
      case Ne: {
        let { expandedStates: a, contents: o } = s;
        return a ? (a = a.map(n2), o = a[0]) : o = n2(o), t({ ...s, contents: o, expandedStates: a });
      }
      case ye:
      case Ae:
      case Oe:
      case Tt:
      case Ct:
        return t({ ...s, contents: n2(s.contents) });
      case Ye:
      case St:
      case Et:
      case vt:
      case Y:
      case De:
        return t(s);
      default:
        throw new rn(s);
    }
  }
}
function L(e, t = nn) {
  return ar(e, (r) => typeof r == "string" ? q(t, r.split(`
`)) : r);
}
function A(e) {
  return D2(e), { type: Ae, contents: e };
}
function Rs(e, t) {
  return an(e), D2(t), { type: ye, contents: t, n: e };
}
function on(e) {
  return Rs(Number.NEGATIVE_INFINITY, e);
}
function xt(e) {
  return sn(e), { type: Le, parts: e };
}
function C(e, t = {}) {
  return D2(e), kt(t.expandedStates, true), { type: Ne, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
}
function X(e, t = "", r = {}) {
  return D2(e), t !== "" && D2(t), { type: Pe, breakContents: e, flatContents: t, groupId: r.groupId };
}
function ln(e, t) {
  return D2(e), { type: Oe, contents: e, groupId: t.groupId, negate: t.negate };
}
function q(e, t) {
  D2(e), kt(t);
  let r = [];
  for (let n2 = 0;n2 < t.length; n2++)
    n2 !== 0 && r.push(e), r.push(t[n2]);
  return r;
}
function Hs(e, t) {
  let { preferred: r, alternate: n2 } = t === true || t === "'" ? Fs : qs, { length: i } = e, s = 0, a = 0;
  for (let o = 0;o < i; o++) {
    let c = e.charCodeAt(o);
    c === r.codePoint ? s++ : c === n2.codePoint && a++;
  }
  return (s > a ? n2 : r).character;
}
function or2(e) {
  if (typeof e != "string")
    throw new TypeError("Expected a string");
  return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
function fn(e, t, r) {
  if (e.kind === "text" || e.kind === "comment")
    return null;
  if (e.kind === "yaml" && delete t.value, e.kind === "attribute") {
    let { fullName: n2, value: i } = e;
    n2 === "style" || n2 === "class" || n2 === "srcset" && (r.fullName === "img" || r.fullName === "source") || n2 === "allow" && r.fullName === "iframe" || n2.startsWith("on") || n2.startsWith("@") || n2.startsWith(":") || n2.startsWith(".") || n2.startsWith("#") || n2.startsWith("v-") || n2 === "vars" && r.fullName === "style" || (n2 === "setup" || n2 === "generic") && r.fullName === "script" || n2 === "slot-scope" || n2.startsWith("(") || n2.startsWith("[") || n2.startsWith("*") || n2.startsWith("bind") || n2.startsWith("i18n") || n2.startsWith("on-") || n2.startsWith("ng-") || i?.includes("{{") ? delete t.value : i && (t.value = w(0, i, /'|&quot;|&apos;/gu, '"'));
  }
  if (e.kind === "docType" && (t.value = w(0, e.value.toLowerCase(), /\s+/gu, " ")), e.kind === "angularControlFlowBlock" && e.parameters?.children)
    for (let n2 of t.parameters.children)
      Gs.has(e.name) ? delete n2.expression : n2.expression = n2.expression.trim();
  e.kind === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.kind === "angularLetDeclarationInitializer" && delete t.value, e.kind === "element" && e.isVoid && !e.isSelfClosing && (t.isSelfClosing = true);
}
function K(e, t = true) {
  return [A([k2, e]), t ? k2 : ""];
}
function W(e, t) {
  let r = e.type === "NGRoot" ? e.node.type === "NGMicrosyntax" && e.node.body.length === 1 && e.node.body[0].type === "NGMicrosyntaxExpression" ? e.node.body[0].expression : e.node : e.type === "JsExpressionRoot" ? e.node : e;
  return r && (r.type === "ObjectExpression" || r.type === "ArrayExpression" || (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression" || t.parser === "__ng_binding" || t.parser === "__ng_directive") && (r.type === "TemplateLiteral" || r.type === "StringLiteral"));
}
async function x(e, t, r, n2) {
  r = { __isInHtmlAttribute: true, __embeddedInHtml: true, ...r };
  let i = true;
  n2 && (r.__onHtmlBindingRoot = (a, o) => {
    i = n2(a, o);
  });
  let s = await t(e, r, t);
  return i ? C(s) : K(s);
}
function $s(e, t, r, n2) {
  let { node: i } = r, s = n2.originalText.slice(i.sourceSpan.start.offset, i.sourceSpan.end.offset);
  return /^\s*$/u.test(s) ? "" : x(s, e, { parser: "__ng_directive", __isInHtmlAttribute: false }, W);
}
function js() {
  let e = globalThis, t = e.Deno?.build?.os;
  return typeof t == "string" ? t === "windows" : e.navigator?.platform?.startsWith("Win") ?? e.process?.platform?.startsWith("win") ?? false;
}
function Sn(e) {
  if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:")
    throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
  return e;
}
function Ks(e) {
  return e = Sn(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
}
function Qs(e) {
  e = Sn(e);
  let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
  return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t;
}
function ur(e) {
  return Xs ? Qs(e) : Ks(e);
}
function Js(e) {
  return Array.isArray(e) && e.length > 0;
}
function vn(e, t) {
  if (!t)
    return;
  let r = En(t).toLowerCase();
  return e.find(({ filenames: n2 }) => n2?.some((i) => i.toLowerCase() === r)) ?? e.find(({ extensions: n2 }) => n2?.some((i) => r.endsWith(i)));
}
function Zs(e, t) {
  if (t)
    return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`));
}
function Tn(e, t) {
  if (t) {
    if (Cn(t))
      try {
        t = ur(t);
      } catch {
        return;
      }
    if (typeof t == "string")
      return e.find(({ isSupported: r }) => r?.({ filepath: t }));
  }
}
function ta(e, t) {
  let r = _n(0, e.plugins).flatMap((i) => i.languages ?? []);
  return (Zs(r, t.language) ?? vn(r, t.physicalFile) ?? vn(r, t.file) ?? Tn(r, t.physicalFile) ?? Tn(r, t.file) ?? ea?.(r, t.physicalFile))?.parsers[0];
}
function ra(e) {
  return !!e?.[yt];
}
function na(e) {
  let t = e.slice(0, Xe);
  if (t !== "---" && t !== "+++")
    return;
  let r = e.indexOf(`
`, Xe);
  if (r === -1)
    return;
  let n2 = e.slice(Xe, r).trim(), i = e.indexOf(`
${t}`, r), s = n2;
  if (s || (s = t === "+++" ? "toml" : "yaml"), i === -1 && t === "---" && s === "yaml" && (i = e.indexOf(`
...`, r)), i === -1)
    return;
  let a = i + 1 + Xe, o = e.charAt(a + 1);
  if (!/\s?/u.test(o))
    return;
  let c = e.slice(0, a), u;
  return { language: s, explicitLanguage: n2 || null, value: e.slice(r + 1, i), startDelimiter: t, endDelimiter: c.slice(-Xe), raw: c, start: { line: 1, column: 0, index: 0 }, end: { index: c.length, get line() {
    return u ?? (u = c.split(`
`)), u.length;
  }, get column() {
    return u ?? (u = c.split(`
`)), F(0, u, -1).length;
  } }, [yt]: true };
}
function ia(e) {
  let t = na(e);
  return t ? { frontMatter: t, get content() {
    let { raw: r } = t;
    return w(0, r, /[^\n]/gu, " ") + e.slice(r.length);
  } } : { content: e };
}
function sa(e) {
  return e.kind === "element" && !e.hasExplicitNamespace && !["html", "svg"].includes(e.namespace);
}
function Nt(e, t) {
  return !!(e.kind === "ieConditionalComment" && e.lastChild && !e.lastChild.isSelfClosing && !e.lastChild.endSourceSpan || e.kind === "ieConditionalComment" && !e.complete || pe(e) && e.children.some((r) => r.kind !== "text" && r.kind !== "interpolation") || Ot(e, t) && !H(e, t) && e.kind !== "interpolation");
}
function he(e) {
  return e.kind === "attribute" || !e.parent || !e.prev ? false : oa(e.prev);
}
function oa(e) {
  return e.kind === "comment" && e.value.trim() === "prettier-ignore";
}
function O2(e) {
  return e.kind === "text" || e.kind === "comment";
}
function H(e, t) {
  return e.kind === "element" && (e.fullName === "script" || e.fullName === "style" || e.fullName === "svg:style" || e.fullName === "svg:script" || e.fullName === "mj-style" && t.parser === "mjml" || ue(e) && (e.name === "script" || e.name === "style"));
}
function xn(e, t) {
  return e.children && !H(e, t);
}
function An(e, t) {
  return H(e, t) || e.kind === "interpolation" || dr(e);
}
function dr(e) {
  return Fn(e).startsWith("pre");
}
function yn(e, t) {
  let r = n2();
  if (r && !e.prev && e.parent?.tagDefinition?.ignoreFirstLf)
    return e.kind === "interpolation";
  return r;
  function n2() {
    return ce(e) || e.kind === "angularControlFlowBlock" ? false : (e.kind === "text" || e.kind === "interpolation") && e.prev && (e.prev.kind === "text" || e.prev.kind === "interpolation") ? true : !e.parent || e.parent.cssDisplay === "none" ? false : pe(e.parent) ? true : !(!e.prev && (e.parent.kind === "root" || pe(e) && e.parent || H(e.parent, t) || Je(e.parent, t) || !ma(e.parent.cssDisplay)) || e.prev && !ga(e.prev.cssDisplay));
  }
}
function Nn(e, t) {
  return ce(e) || e.kind === "angularControlFlowBlock" ? false : (e.kind === "text" || e.kind === "interpolation") && e.next && (e.next.kind === "text" || e.next.kind === "interpolation") ? true : !e.parent || e.parent.cssDisplay === "none" ? false : pe(e.parent) ? true : !(!e.next && (e.parent.kind === "root" || pe(e) && e.parent || H(e.parent, t) || Je(e.parent, t) || !fa(e.parent.cssDisplay)) || e.next && !da(e.next.cssDisplay));
}
function Ln(e, t) {
  return _a2(e.cssDisplay) && !H(e, t);
}
function Ke(e) {
  return ce(e) || e.next && e.sourceSpan.end && e.sourceSpan.end.line + 1 < e.next.sourceSpan.start.line;
}
function Pn(e) {
  return gr(e) || e.kind === "element" && e.children.length > 0 && (["body", "script", "style"].includes(e.name) || e.children.some((t) => ca(t))) || e.firstChild && e.firstChild === e.lastChild && e.firstChild.kind !== "text" && Dn(e.firstChild) && (!e.lastChild.isTrailingSpaceSensitive || In(e.lastChild));
}
function gr(e) {
  return e.kind === "element" && e.children.length > 0 && (["html", "head", "ul", "ol", "select"].includes(e.name) || e.cssDisplay.startsWith("table") && e.cssDisplay !== "table-cell");
}
function Lt(e) {
  return Rn(e) || e.prev && la(e.prev) || On(e);
}
function la(e) {
  return Rn(e) || e.kind === "element" && e.fullName === "br" || On(e);
}
function On(e) {
  return Dn(e) && In(e);
}
function Dn(e) {
  return e.hasLeadingSpaces && (e.prev ? e.prev.sourceSpan.end.line < e.sourceSpan.start.line : e.parent.kind === "root" || e.parent.startSourceSpan.end.line < e.sourceSpan.start.line);
}
function In(e) {
  return e.hasTrailingSpaces && (e.next ? e.next.sourceSpan.start.line > e.sourceSpan.end.line : e.parent.kind === "root" || e.parent.endSourceSpan && e.parent.endSourceSpan.start.line > e.sourceSpan.end.line);
}
function Rn(e) {
  switch (e.kind) {
    case "ieConditionalComment":
    case "comment":
    case "directive":
      return true;
    case "element":
      return ["script", "select"].includes(e.name);
  }
  return false;
}
function Pt(e) {
  return e.lastChild ? Pt(e.lastChild) : e;
}
function ca(e) {
  return e.children?.some((t) => t.kind !== "text");
}
function Mn(e) {
  if (e)
    switch (e) {
      case "module":
      case "text/javascript":
      case "text/babel":
      case "text/jsx":
      case "application/javascript":
        return "babel";
      case "application/x-typescript":
        return "typescript";
      case "text/markdown":
        return "markdown";
      case "text/html":
        return "html";
      case "text/x-handlebars-template":
        return "glimmer";
      default:
        if (e.endsWith("json") || e.endsWith("importmap") || e === "speculationrules")
          return "json";
    }
}
function ua(e, t) {
  let { name: r, attrMap: n2 } = e;
  if (r !== "script" || Object.prototype.hasOwnProperty.call(n2, "src"))
    return;
  let { type: i, lang: s } = e.attrMap;
  return !s && !i ? "babel" : At(t, { language: s }) ?? Mn(i);
}
function pa(e, t) {
  if (!Ot(e, t))
    return;
  let { attrMap: r } = e;
  if (Object.prototype.hasOwnProperty.call(r, "src"))
    return;
  let { type: n2, lang: i } = r;
  return At(t, { language: i }) ?? Mn(n2);
}
function ha(e, t) {
  if (e.name === "style") {
    let { lang: r } = e.attrMap;
    return r ? At(t, { language: r }) : "css";
  }
  if (e.name === "mj-style" && t.parser === "mjml")
    return "css";
}
function _r(e, t) {
  return ua(e, t) ?? ha(e, t) ?? pa(e, t);
}
function Qe(e) {
  return e === "block" || e === "list-item" || e.startsWith("table");
}
function ma(e) {
  return !Qe(e) && e !== "inline-block";
}
function fa(e) {
  return !Qe(e) && e !== "inline-block";
}
function da(e) {
  return !Qe(e);
}
function ga(e) {
  return !Qe(e);
}
function _a2(e) {
  return !Qe(e) && e !== "inline-block";
}
function pe(e) {
  return Fn(e).startsWith("pre");
}
function Sa(e, t) {
  let r = e;
  for (;r; ) {
    if (t(r))
      return true;
    r = r.parent;
  }
  return false;
}
function Bn(e, t) {
  if (me(e, t))
    return "block";
  if (e.prev?.kind === "comment") {
    let n2 = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);
    if (n2)
      return n2[1];
  }
  let r = false;
  if (e.kind === "element" && e.namespace === "svg")
    if (Sa(e, (n2) => n2.fullName === "svg:foreignObject"))
      r = true;
    else
      return e.name === "svg" ? "inline-block" : "block";
  switch (t.htmlWhitespaceSensitivity) {
    case "strict":
      return "inline";
    case "ignore":
      return "block";
    default:
      if (e.kind === "element" && (!e.namespace || r || ue(e)) && Object.prototype.hasOwnProperty.call(hr2, e.name))
        return hr2[e.name];
  }
  return bn;
}
function Fn(e) {
  return e.kind === "element" && (!e.namespace || ue(e)) && Object.prototype.hasOwnProperty.call(mr, e.name) ? mr[e.name] : wn;
}
function Sr(e) {
  return w(0, w(0, e, "&apos;", "'"), "&quot;", '"');
}
function b2(e) {
  return Sr(e.value);
}
function Je(e, t) {
  return me(e, t) && !Ea.has(e.fullName);
}
function me(e, t) {
  return t.parser === "vue" && e.kind === "element" && e.parent.kind === "root" && e.fullName.toLowerCase() !== "html";
}
function Ot(e, t) {
  return me(e, t) && (Je(e, t) || e.attrMap.lang && e.attrMap.lang !== "html");
}
function qn(e) {
  let t = e.fullName;
  return t.charAt(0) === "#" || t === "slot-scope" || t === "v-slot" || t.startsWith("v-slot:");
}
function Hn(e, t) {
  let r = e.parent;
  if (!me(r, t))
    return false;
  let n2 = r.fullName, i = e.fullName;
  return n2 === "script" && i === "setup" || n2 === "style" && i === "vars";
}
function Dt(e, t = e.value) {
  return e.parent.isWhitespaceSensitive ? e.parent.isIndentationSensitive ? L(t) : L(y2.dedentString(fr(t)), v2) : q(_2, y2.split(t));
}
function It(e, t) {
  return me(e, t) && e.name === "script";
}
function Ca(e) {
  let { valueSpan: t, value: r } = e;
  return t.end.offset - t.start.offset === r.length + 2;
}
function Rt(e, t) {
  if (Ca(e))
    return false;
  let { value: r } = e;
  return /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r) || t.parser === "lwc" && r.startsWith("{") && r.endsWith("}");
}
async function Wn(e, t, r) {
  let n2 = b2(r.node), i = [];
  for (let [s, a] of n2.split(Vn).entries())
    if (s % 2 === 0)
      i.push(L(a));
    else
      try {
        i.push(C(["{{", A([_2, await x(a, e, { parser: "__ng_interpolation", __isInHtmlInterpolation: true })]), _2, "}}"]));
      } catch {
        i.push("{{", L(a), "}}");
      }
  return i;
}
function Ta(e, t, { node: r }) {
  let n2 = b2(r);
  return K(xt(Dt(r, n2.trim())), !n2.includes("@@"));
}
function ka(e) {
  let t = [];
  for (let r of e.split(";")) {
    if (r = y2.trim(r), !r)
      continue;
    let [n2, ...i] = y2.split(r);
    t.push({ name: n2, value: i });
  }
  return t;
}
function Qn(e, t, r) {
  let { node: n2 } = r, i = Xn(b2(n2));
  return i.length === 0 ? [""] : K(i.map(({ name: s, value: a }, o) => [[s, ...a].join(" "), o === i.length - 1 ? X(";") : [";", _2]]));
}
function Jn(e) {
  return e === "\t" || e === `
` || e === "\f" || e === "\r" || e === " ";
}
function Pa(e) {
  let t = e.length, r, n2, i, s, a, o = 0, c;
  function u(m2) {
    let g2, E = m2.exec(e.substring(o));
    if (E)
      return [g2] = E, o += g2.length, g2;
  }
  let p2 = [];
  for (;; ) {
    if (u(Aa), o >= t) {
      if (p2.length === 0)
        throw new Error("Must contain one or more image candidate strings.");
      return p2;
    }
    c = o, r = u(ya), n2 = [], r.slice(-1) === "," ? (r = r.replace(Na, ""), S2()) : d2();
  }
  function d2() {
    for (u(xa), i = "", s = "in descriptor";; ) {
      if (a = e.charAt(o), s === "in descriptor")
        if (Jn(a))
          i && (n2.push(i), i = "", s = "after descriptor");
        else if (a === ",") {
          o += 1, i && n2.push(i), S2();
          return;
        } else if (a === "(")
          i += a, s = "in parens";
        else if (a === "") {
          i && n2.push(i), S2();
          return;
        } else
          i += a;
      else if (s === "in parens")
        if (a === ")")
          i += a, s = "in descriptor";
        else if (a === "") {
          n2.push(i), S2();
          return;
        } else
          i += a;
      else if (s === "after descriptor" && !Jn(a))
        if (a === "") {
          S2();
          return;
        } else
          s = "in descriptor", o -= 1;
      o += 1;
    }
  }
  function S2() {
    let m2 = false, g2, E, P2, z2, le = {}, ee, _t, ke, Ge, nr;
    for (z2 = 0;z2 < n2.length; z2++)
      ee = n2[z2], _t = ee[ee.length - 1], ke = ee.substring(0, ee.length - 1), Ge = parseInt(ke, 10), nr = parseFloat(ke), Zn.test(ke) && _t === "w" ? ((g2 || E) && (m2 = true), Ge === 0 ? m2 = true : g2 = Ge) : La.test(ke) && _t === "x" ? ((g2 || E || P2) && (m2 = true), nr < 0 ? m2 = true : E = nr) : Zn.test(ke) && _t === "h" ? ((P2 || E) && (m2 = true), Ge === 0 ? m2 = true : P2 = Ge) : m2 = true;
    if (!m2)
      le.source = { value: r, startOffset: c }, g2 && (le.width = { value: g2 }), E && (le.density = { value: E }), P2 && (le.height = { value: P2 }), p2.push(le);
    else
      throw new Error(`Invalid srcset descriptor found in "${e}" at "${ee}".`);
  }
}
function ni(e, t, r) {
  let n2 = b2(r.node), i = ei(n2), s = Oa.filter((m2) => i.some((g2) => Object.prototype.hasOwnProperty.call(g2, m2)));
  if (s.length > 1)
    throw new Error("Mixed descriptor in srcset is not supported");
  let [a] = s, o = ri[a], c = i.map((m2) => m2.source.value), u = Math.max(...c.map((m2) => m2.length)), p2 = i.map((m2) => m2[a] ? String(m2[a].value) : ""), d2 = p2.map((m2) => {
    let g2 = m2.indexOf(".");
    return g2 === -1 ? m2.length : g2;
  }), S2 = Math.max(...d2);
  return K(q([",", _2], c.map((m2, g2) => {
    let E = [m2], P2 = p2[g2];
    if (P2) {
      let z2 = u - m2.length + 1, le = S2 - d2[g2], ee = " ".repeat(z2 + le);
      E.push(X(ee, " "), P2 + o);
    }
    return E;
  })));
}
function Da(e, t) {
  let { root: r } = e;
  return vr.has(r) || vr.set(r, r.children.some((n2) => It(n2, t) && ["ts", "typescript"].includes(n2.attrMap.lang))), vr.get(r);
}
function ai(e, t, r) {
  let n2 = b2(r.node);
  return x(`type T<${n2}> = any`, e, { parser: "babel-ts", __isEmbeddedTypescriptGenericParameters: true }, W);
}
function oi(e, t, r, n2) {
  let i = b2(r.node), s = G(r, n2) ? "babel-ts" : "babel";
  return x(`function _(${i}) {}`, e, { parser: s, __isVueBindings: true });
}
async function li(e, t, r, n2) {
  let i = b2(r.node), { left: s, operator: a, right: o } = Ia(i), c = G(r, n2);
  return [C(await x(`function _(${s}) {}`, e, { parser: c ? "babel-ts" : "babel", __isVueForBindingLeft: true })), " ", a, " ", await x(o, e, { parser: c ? "__ts_expression" : "__js_expression" })];
}
function Ia(e) {
  let t = /(.*?)\s+(in|of)\s+(.*)/su, r = /,([^,\]}]*)(?:,([^,\]}]*))?$/u, n2 = /^\(|\)$/gu, i = e.match(t);
  if (!i)
    return;
  let s = { for: i[3].trim() };
  if (!s.for)
    return;
  let a = w(0, i[1].trim(), n2, ""), o = a.match(r);
  o ? (s.alias = a.replace(r, ""), s.iterator1 = o[1].trim(), o[2] && (s.iterator2 = o[2].trim())) : s.alias = a;
  let c = [s.alias, s.iterator1, s.iterator2];
  if (!c.some((u, p2) => !u && (p2 === 0 || c.slice(p2 + 1).some(Boolean))))
    return { left: c.filter(Boolean).join(","), operator: i[2], right: s.for };
}
async function Ma(e, t, r, n2) {
  try {
    return await ci(e, t, r, n2);
  } catch (a) {
    if (a.cause?.code !== "BABEL_PARSER_SYNTAX_ERROR")
      throw a;
  }
  let i = b2(r.node), s = G(r, n2) ? "__vue_ts_event_binding" : "__vue_event_binding";
  return x(i, e, { parser: s }, W);
}
function Ba(e, t, r, n2) {
  let i = b2(r.node), s = G(r, n2) ? "__vue_ts_expression" : "__vue_expression";
  return x(i, e, { parser: s }, W);
}
function ci(e, t, r, n2) {
  let i = b2(r.node), s = G(r, n2) ? "__ts_expression" : "__js_expression";
  return x(i, e, { parser: s }, W);
}
function qa(e, t) {
  let { node: r } = e, { value: n2 } = r;
  if (n2)
    return Rt(r, t) ? [r.rawName, "=", n2] : Fa.find(({ test: i }) => i(e, t))?.print;
}
function Ha(e) {
  return async (t, r, n2, i) => {
    let s = await e(t, r, n2, i);
    if (s)
      return s = ar(s, (a) => typeof a == "string" ? w(0, a, '"', "&quot;") : a), [n2.node.rawName, '="', C(s), '"'];
  };
}
function Ze(e, t) {
  return [e.isSelfClosing ? "" : Va(e, t), fe(e, t)];
}
function Va(e, t) {
  return e.lastChild && _e(e.lastChild) ? "" : [Ua(e, t), Mt(e, t)];
}
function fe(e, t) {
  return (e.next ? $(e.next) : ge(e.parent)) ? "" : [de(e, t), V(e, t)];
}
function Ua(e, t) {
  return ge(e) ? de(e.lastChild, t) : "";
}
function V(e, t) {
  return _e(e) ? Mt(e.parent, t) : et(e) ? Bt(e.next, t) : "";
}
function Mt(e, t) {
  if (mi(e, t))
    return "";
  switch (e.kind) {
    case "ieConditionalComment":
      return "<!";
    case "element":
      if (e.hasHtmComponentClosingTag)
        return "<//";
    default:
      return `</${e.rawName}`;
  }
}
function de(e, t) {
  if (mi(e, t))
    return "";
  switch (e.kind) {
    case "ieConditionalComment":
    case "ieConditionalEndComment":
      return "[endif]-->";
    case "ieConditionalStartComment":
      return "]><!-->";
    case "interpolation":
      return "}}";
    case "angularIcuExpression":
      return "}";
    case "element":
      if (e.isSelfClosing)
        return "/>";
    default:
      return ">";
  }
}
function mi(e, t) {
  return !e.isSelfClosing && !e.endSourceSpan && (he(e) || Nt(e.parent, t));
}
function $(e) {
  return e.prev && e.prev.kind !== "docType" && e.kind !== "angularControlFlowBlock" && !O2(e.prev) && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
}
function ge(e) {
  return e.lastChild?.isTrailingSpaceSensitive && !e.lastChild.hasTrailingSpaces && !O2(Pt(e.lastChild)) && !pe(e);
}
function _e(e) {
  return !e.next && !e.hasTrailingSpaces && e.isTrailingSpaceSensitive && O2(Pt(e));
}
function et(e) {
  return e.next && !O2(e.next) && O2(e) && e.isTrailingSpaceSensitive && !e.hasTrailingSpaces;
}
function Wa(e) {
  let t = e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);
  return t ? t[1] ? t[1].split(/\s+/u) : true : false;
}
function tt(e) {
  return !e.prev && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
}
function Ga(e, t, r) {
  let { node: n2 } = e;
  if (!Ie(n2.attrs))
    return n2.isSelfClosing ? " " : "";
  let i = n2.prev?.kind === "comment" && Wa(n2.prev.value), s = typeof i == "boolean" ? () => i : Array.isArray(i) ? (d2) => i.includes(d2.rawName) : () => false, a = e.map(({ node: d2 }) => s(d2) ? L(t.originalText.slice(Q(d2), te(d2))) : r(), "attrs"), o = n2.kind === "element" && n2.fullName === "script" && n2.attrs.length === 1 && n2.attrs[0].fullName === "src" && n2.children.length === 0, u = t.singleAttributePerLine && n2.attrs.length > 1 && !me(n2, t) ? v2 : _2, p2 = [A([o ? " " : _2, q(u, a)])];
  return n2.firstChild && tt(n2.firstChild) || n2.isSelfClosing && ge(n2.parent) || o ? p2.push(n2.isSelfClosing ? " " : "") : p2.push(t.bracketSameLine ? n2.isSelfClosing ? " " : "" : n2.isSelfClosing ? _2 : k2), p2;
}
function $a(e) {
  return e.firstChild && tt(e.firstChild) ? "" : Ft(e);
}
function rt(e, t, r) {
  let { node: n2 } = e;
  return [Se(n2, t), Ga(e, t, r), n2.isSelfClosing ? "" : $a(n2)];
}
function Se(e, t) {
  return e.prev && et(e.prev) ? "" : [U(e, t), Bt(e, t)];
}
function U(e, t) {
  return tt(e) ? Ft(e.parent) : $(e) ? de(e.prev, t) : "";
}
function Bt(e, t) {
  switch (e.kind) {
    case "ieConditionalComment":
    case "ieConditionalStartComment":
      return `<!--[if ${e.condition}`;
    case "ieConditionalEndComment":
      return "<!--<!";
    case "interpolation":
      return "{{";
    case "docType": {
      if (e.value === "html") {
        let { filepath: n2 } = t;
        if (n2 && /\.html?$/u.test(n2))
          return hi;
      }
      let r = Q(e);
      return t.originalText.slice(r, r + hi.length);
    }
    case "angularIcuExpression":
      return "{";
    case "element":
      if (e.condition)
        return `<!--[if ${e.condition}]><!--><${e.rawName}`;
    default:
      return `<${e.rawName}`;
  }
}
function Ft(e) {
  switch (e.kind) {
    case "ieConditionalComment":
      return "]>";
    case "element":
      if (e.condition)
        return "><!--<![endif]-->";
    default:
      return ">";
  }
}
function za(e, t) {
  if (!e.endSourceSpan)
    return "";
  let r = e.startSourceSpan.end.offset;
  e.firstChild && tt(e.firstChild) && (r -= Ft(e).length);
  let n2 = e.endSourceSpan.start.offset;
  return e.lastChild && _e(e.lastChild) ? n2 += Mt(e, t).length : ge(e) && (n2 -= de(e.lastChild, t).length), t.originalText.slice(r, n2);
}
function ja(e, t) {
  let { node: r } = e;
  switch (r.kind) {
    case "element":
      if (H(r, t) || r.kind === "interpolation")
        return;
      if (!r.isSelfClosing && Ot(r, t)) {
        let n2 = _r(r, t);
        return n2 ? async (i, s) => {
          let a = qt(r, t), o = /^\s*$/u.test(a), c = "";
          return o || (c = await i(fr(a), { parser: n2, __embeddedInHtml: true }), o = c === ""), [U(r, t), C(rt(e, t, s)), o ? "" : v2, c, o ? "" : v2, Ze(r, t), V(r, t)];
        } : undefined;
      }
      break;
    case "text":
      if (H(r.parent, t)) {
        let n2 = _r(r.parent, t);
        if (n2)
          return async (i) => {
            let s = n2 === "markdown" ? y2.dedentString(r.value.replace(/^[^\S\n]*\n/u, "")) : r.value, a = { parser: n2, __embeddedInHtml: true };
            if (t.parser === "html" && n2 === "babel") {
              let o = "script", { attrMap: c } = r.parent;
              c && (c.type === "module" || (c.type === "text/babel" || c.type === "text/jsx") && c["data-type"] === "module") && (o = "module"), a.__babelSourceType = o;
            }
            return [j, U(r, t), await i(s, a), V(r, t)];
          };
      } else if (r.parent.kind === "interpolation")
        return async (n2) => {
          let i = { __isInHtmlInterpolation: true, __embeddedInHtml: true };
          return t.parser === "angular" ? i.parser = "__ng_interpolation" : t.parser === "vue" ? i.parser = G(e, t) ? "__vue_ts_expression" : "__vue_expression" : i.parser = "__js_expression", [A([_2, await n2(r.value, i)]), r.parent.next && $(r.parent.next) ? " " : _2];
        };
      break;
    case "attribute":
      return pi(e, t);
    case "angularControlFlowBlockParameters":
      return Ya.has(e.parent.name) ? gn : undefined;
    case "angularLetDeclarationInitializer":
      return (n2) => x(r.value, n2, { parser: "__ng_binding", __isInHtmlAttribute: false });
  }
}
function it(e) {
  if (nt !== null && typeof nt.property) {
    let t = nt;
    return nt = it.prototype = null, t;
  }
  return nt = it.prototype = e ?? Object.create(null), new it;
}
function Tr(e) {
  return it(e);
}
function Ka(e, t = "type") {
  Tr(e);
  function r(n2) {
    let i = n2[t], s = e[i];
    if (!Array.isArray(s))
      throw Object.assign(new Error(`Missing visitor keys for '${i}'.`), { node: n2 });
    return s;
  }
  return r;
}
function ki(e) {
  let t = te(e);
  return e.kind === "element" && !e.endSourceSpan && Ie(e.children) ? Math.max(t, ki(F(0, e.children, -1))) : t;
}
function st(e, t, r) {
  let n2 = e.node;
  if (he(n2)) {
    let i = ki(n2);
    return [U(n2, t), L(y2.trimEnd(t.originalText.slice(Q(n2) + (n2.prev && et(n2.prev) ? Bt(n2).length : 0), i - (n2.next && $(n2.next) ? de(n2, t).length : 0)))), V(n2, t)];
  }
  return r();
}
function Ht(e, t) {
  return O2(e) && O2(t) ? e.isTrailingSpaceSensitive ? e.hasTrailingSpaces ? Lt(t) ? v2 : _2 : "" : Lt(t) ? v2 : k2 : et(e) && (he(t) || t.firstChild || t.isSelfClosing || t.kind === "element" && t.attrs.length > 0) || e.kind === "element" && e.isSelfClosing && $(t) ? "" : !t.isLeadingSpaceSensitive || Lt(t) || $(t) && e.lastChild && _e(e.lastChild) && e.lastChild.lastChild && _e(e.lastChild.lastChild) ? v2 : t.hasLeadingSpaces ? _2 : k2;
}
function Re(e, t, r) {
  let { node: n2 } = e;
  if (gr(n2))
    return [j, ...e.map(() => {
      let s = e.node, a = s.prev ? Ht(s.prev, s) : "";
      return [a ? [a, Ke(s.prev) ? v2 : ""] : "", st(e, t, r)];
    }, "children")];
  let i = n2.children.map(() => Symbol(""));
  return e.map(({ node: s, index: a }) => {
    if (O2(s)) {
      if (s.prev && O2(s.prev)) {
        let m2 = Ht(s.prev, s);
        if (m2)
          return Ke(s.prev) ? [v2, v2, st(e, t, r)] : [m2, st(e, t, r)];
      }
      return st(e, t, r);
    }
    let o = [], c = [], u = [], p2 = [], d2 = s.prev ? Ht(s.prev, s) : "", S2 = s.next ? Ht(s, s.next) : "";
    return d2 && (Ke(s.prev) ? o.push(v2, v2) : d2 === v2 ? o.push(v2) : O2(s.prev) ? c.push(d2) : c.push(X("", k2, { groupId: i[a - 1] }))), S2 && (Ke(s) ? O2(s.next) && p2.push(v2, v2) : S2 === v2 ? O2(s.next) && p2.push(v2) : u.push(S2)), [...o, C([...c, C([st(e, t, r), ...u], { id: i[a] })]), ...p2];
  }, "children");
}
function xi(e, t, r) {
  let { node: n2 } = e, i = [];
  if (eo(e) && i.push("} "), i.push("@", n2.name), n2.parameters && i.push(" (", C(r("parameters")), ")"), !Za(n2)) {
    i.push(" {");
    let s = Ai(n2);
    n2.children.length > 0 ? (n2.firstChild.hasLeadingSpaces = true, n2.lastChild.hasTrailingSpaces = true, i.push(A([v2, Re(e, t, r)])), s && i.push(v2, "}")) : s && i.push("}");
  }
  return C(i, { shouldBreak: true });
}
function Ai(e) {
  return !(e.next?.kind === "angularControlFlowBlock" && wi.get(e.name)?.has(e.next.name));
}
function Za(e) {
  return Ja(e) && e.endSourceSpan && e.endSourceSpan.start.offset === e.endSourceSpan.end.offset;
}
function eo(e) {
  let { previous: t } = e;
  return t?.kind === "angularControlFlowBlock" && !he(t) && !Ai(t);
}
function yi(e, t, r) {
  return [A([k2, q([";", _2], e.map(r, "children"))]), k2];
}
function Ni(e, t, r) {
  let { node: n2 } = e;
  return [Se(n2, t), C([n2.switchValue.trim(), ", ", n2.type, n2.cases.length > 0 ? [",", A([_2, q(_2, e.map(r, "cases"))])] : "", k2]), fe(n2, t)];
}
function Li(e, t, r) {
  let { node: n2 } = e;
  return [n2.value, " {", C([A([k2, e.map(({ node: i, isLast: s }) => {
    let a = [r()];
    return i.kind === "text" && (i.hasLeadingSpaces && a.unshift(_2), i.hasTrailingSpaces && !s && a.push(_2)), a;
  }, "expression")]), k2]), "}"];
}
function Pi(e, t, r) {
  let { node: n2 } = e;
  if (Nt(n2, t))
    return [U(n2, t), C(rt(e, t, r)), L(qt(n2, t)), ...Ze(n2, t), V(n2, t)];
  let i = n2.children.length === 1 && (n2.firstChild.kind === "interpolation" || n2.firstChild.kind === "angularIcuExpression") && n2.firstChild.isLeadingSpaceSensitive && !n2.firstChild.hasLeadingSpaces && n2.lastChild.isTrailingSpaceSensitive && !n2.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), a = (p2) => C([C(rt(e, t, r), { id: s }), p2, Ze(n2, t)]), o = (p2) => i ? ln(p2, { groupId: s }) : (H(n2, t) || Je(n2, t)) && n2.parent.kind === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? p2 : A(p2), c = () => i ? X(k2, "", { groupId: s }) : n2.firstChild.hasLeadingSpaces && n2.firstChild.isLeadingSpaceSensitive ? _2 : n2.firstChild.kind === "text" && n2.isWhitespaceSensitive && n2.isIndentationSensitive ? on(k2) : k2, u = () => (n2.next ? $(n2.next) : ge(n2.parent)) ? n2.lastChild.hasTrailingSpaces && n2.lastChild.isTrailingSpaceSensitive ? " " : "" : i ? X(k2, "", { groupId: s }) : n2.lastChild.hasTrailingSpaces && n2.lastChild.isTrailingSpaceSensitive ? _2 : (n2.lastChild.kind === "comment" || n2.lastChild.kind === "text" && n2.isWhitespaceSensitive && n2.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`, "u").test(n2.lastChild.value) ? "" : k2;
  return n2.children.length === 0 ? a(n2.hasDanglingSpaces && n2.isDanglingSpaceSensitive ? _2 : "") : a([Pn(n2) ? j : "", o([c(), Re(e, t, r)]), u()]);
}
function at(e, t = true) {
  if (e[0] != ":")
    return [null, e];
  let r = e.indexOf(":", 1);
  if (r === -1) {
    if (t)
      throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);
    return [null, e];
  }
  return [e.slice(1, r), e.slice(r + 1)];
}
function br2(e) {
  return at(e)[1] === "ng-container";
}
function wr(e) {
  return at(e)[1] === "ng-content";
}
function Me(e) {
  return e === null ? null : at(e)[0];
}
function Ee(e, t) {
  return e ? `:${e}:${t}` : t;
}
function Oi(e) {
  return e.replace(to, (...t) => t[1].toUpperCase());
}
function Ar() {
  return Vt || (Vt = {}, ot(re.HTML, ["iframe|srcdoc", "*|innerHTML", "*|outerHTML"]), ot(re.STYLE, ["*|style"]), ot(re.URL, ["*|formAction", "area|href", "a|href", "a|xlink:href", "form|action", "annotation|href", "annotation|xlink:href", "annotation-xml|href", "annotation-xml|xlink:href", "maction|href", "maction|xlink:href", "malignmark|href", "malignmark|xlink:href", "math|href", "math|xlink:href", "mroot|href", "mroot|xlink:href", "msqrt|href", "msqrt|xlink:href", "merror|href", "merror|xlink:href", "mfrac|href", "mfrac|xlink:href", "mglyph|href", "mglyph|xlink:href", "msub|href", "msub|xlink:href", "msup|href", "msup|xlink:href", "msubsup|href", "msubsup|xlink:href", "mmultiscripts|href", "mmultiscripts|xlink:href", "mprescripts|href", "mprescripts|xlink:href", "mi|href", "mi|xlink:href", "mn|href", "mn|xlink:href", "mo|href", "mo|xlink:href", "mpadded|href", "mpadded|xlink:href", "mphantom|href", "mphantom|xlink:href", "mrow|href", "mrow|xlink:href", "ms|href", "ms|xlink:href", "mspace|href", "mspace|xlink:href", "mstyle|href", "mstyle|xlink:href", "mtable|href", "mtable|xlink:href", "mtd|href", "mtd|xlink:href", "mtr|href", "mtr|xlink:href", "mtext|href", "mtext|xlink:href", "mover|href", "mover|xlink:href", "munder|href", "munder|xlink:href", "munderover|href", "munderover|xlink:href", "semantics|href", "semantics|xlink:href", "none|href", "none|xlink:href", "img|src", "video|src"]), ot(re.RESOURCE_URL, ["base|href", "embed|src", "frame|src", "iframe|src", "link|href", "object|codebase", "object|data", "script|src", "script|href", "script|xlink:href"]), ot(re.ATTRIBUTE_NO_BINDING, ["animate|attributeName", "set|attributeName", "animateMotion|attributeName", "animateTransform|attributeName", "unknown|attributeName", "iframe|sandbox", "iframe|allow", "iframe|allowFullscreen", "iframe|referrerPolicy", "iframe|csp", "iframe|fetchPriority", "unknown|sandbox", "unknown|allow", "unknown|allowFullscreen", "unknown|referrerPolicy", "unknown|csp", "unknown|fetchPriority"])), Vt;
}
function ot(e, t) {
  for (let r of t)
    Vt[r.toLowerCase()] = e;
}
function lo(e) {
  switch (e) {
    case "width":
    case "height":
    case "minWidth":
    case "minHeight":
    case "maxWidth":
    case "maxHeight":
    case "left":
    case "top":
    case "bottom":
    case "right":
    case "fontSize":
    case "outlineWidth":
    case "outlineOffset":
    case "paddingTop":
    case "paddingLeft":
    case "paddingBottom":
    case "paddingRight":
    case "marginTop":
    case "marginLeft":
    case "marginBottom":
    case "marginRight":
    case "borderRadius":
    case "borderWidth":
    case "borderTopWidth":
    case "borderLeftWidth":
    case "borderRightWidth":
    case "borderBottomWidth":
    case "textIndent":
      return true;
    default:
      return false;
  }
}
function Be(e) {
  return lt2 || (Mi = new f2({ canSelfClose: true }), lt2 = Object.assign(Object.create(null), { base: new f2({ isVoid: true }), meta: new f2({ isVoid: true }), area: new f2({ isVoid: true }), embed: new f2({ isVoid: true }), link: new f2({ isVoid: true }), img: new f2({ isVoid: true }), input: new f2({ isVoid: true }), param: new f2({ isVoid: true }), hr: new f2({ isVoid: true }), br: new f2({ isVoid: true }), source: new f2({ isVoid: true }), track: new f2({ isVoid: true }), wbr: new f2({ isVoid: true }), p: new f2({ closedByChildren: ["address", "article", "aside", "blockquote", "div", "dl", "fieldset", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "main", "nav", "ol", "p", "pre", "section", "table", "ul"], closedByParent: true }), thead: new f2({ closedByChildren: ["tbody", "tfoot"] }), tbody: new f2({ closedByChildren: ["tbody", "tfoot"], closedByParent: true }), tfoot: new f2({ closedByChildren: ["tbody"], closedByParent: true }), tr: new f2({ closedByChildren: ["tr"], closedByParent: true }), td: new f2({ closedByChildren: ["td", "th"], closedByParent: true }), th: new f2({ closedByChildren: ["td", "th"], closedByParent: true }), col: new f2({ isVoid: true }), svg: new f2({ implicitNamespacePrefix: "svg" }), foreignObject: new f2({ implicitNamespacePrefix: "svg", preventNamespaceInheritance: true }), math: new f2({ implicitNamespacePrefix: "math" }), li: new f2({ closedByChildren: ["li"], closedByParent: true }), dt: new f2({ closedByChildren: ["dt", "dd"] }), dd: new f2({ closedByChildren: ["dt", "dd"], closedByParent: true }), rb: new f2({ closedByChildren: ["rb", "rt", "rtc", "rp"], closedByParent: true }), rt: new f2({ closedByChildren: ["rb", "rt", "rtc", "rp"], closedByParent: true }), rtc: new f2({ closedByChildren: ["rb", "rtc", "rp"], closedByParent: true }), rp: new f2({ closedByChildren: ["rb", "rt", "rtc", "rp"], closedByParent: true }), optgroup: new f2({ closedByChildren: ["optgroup"], closedByParent: true }), option: new f2({ closedByChildren: ["option", "optgroup"], closedByParent: true }), pre: new f2({ ignoreFirstLf: true }), listing: new f2({ ignoreFirstLf: true }), style: new f2({ contentType: R2.RAW_TEXT }), script: new f2({ contentType: R2.RAW_TEXT }), title: new f2({ contentType: { default: R2.ESCAPABLE_RAW_TEXT, svg: R2.PARSABLE_DATA } }), textarea: new f2({ contentType: R2.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true }) }), new Ri().allKnownElementNames().forEach((t) => {
    !lt2[t] && Me(t) === null && (lt2[t] = new f2({ canSelfClose: false }));
  })), lt2[e] ?? Mi;
}
function ct(e) {
  return e >= 9 && e <= 32 || e == 160;
}
function ut(e) {
  return 48 <= e && e <= 57;
}
function Fe(e) {
  return e >= 97 && e <= 122 || e >= 65 && e <= 90;
}
function Bi(e) {
  return e >= 97 && e <= 102 || e >= 65 && e <= 70 || ut(e);
}
function pt(e) {
  return e === 10 || e === 13;
}
function yr(e) {
  return 48 <= e && e <= 55;
}
function Ut(e) {
  return e === 39 || e === 34 || e === 96;
}
function Wt(e, t, r = null) {
  let n2 = [], i = e.visit ? (s) => e.visit(s, r) || s.visit(e, r) : (s) => s.visit(e, r);
  return t.forEach((s) => {
    let a = i(s);
    a && n2.push(a);
  }), n2;
}
function ns(e, t, r, n2 = {}) {
  let i = new Io(new mt(e, t), r, n2);
  return i.tokenize(), new Lo(Vo(i.tokens), i.errors, i.nonNormalizedIcuExpressions);
}
function be(e) {
  return `Unexpected character "${e === 0 ? "EOF" : String.fromCharCode(e)}"`;
}
function Qi(e) {
  return `Unknown entity "${e}" - use the "&#<decimal>;" or  "&#x<hex>;" syntax`;
}
function Oo(e, t) {
  return `Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`;
}
function T(e) {
  return !ct(e) || e === 0;
}
function we(e) {
  return ct(e) || e === 62 || e === 60 || e === 47 || e === 39 || e === 34 || e === 61 || e === 0;
}
function Ro(e) {
  return (e < 97 || 122 < e) && (e < 65 || 90 < e) && (e < 48 || e > 57);
}
function Mo(e) {
  return e === 59 || e === 0 || !Bi(e);
}
function Bo(e) {
  return e === 59 || e === 0 || !Fe(e);
}
function Fo(e) {
  return e !== 125;
}
function qo(e, t) {
  return Ji(e) === Ji(t);
}
function Ji(e) {
  return e >= 97 && e <= 122 ? e - 97 + 65 : e;
}
function Ho(e) {
  return Fe(e) || ut(e) || e === 95;
}
function Zi(e) {
  return e !== 59 && T(e);
}
function zt(e) {
  return e === 95 || e >= 65 && e <= 90;
}
function es(e) {
  return Fe(e) || ut(e) || e === 95;
}
function ts(e) {
  return e === 47 || e === 62 || e === 60 || e === 0;
}
function Vo(e) {
  let t = [], r;
  for (let n2 = 0;n2 < e.length; n2++) {
    let i = e[n2];
    r && r.type === l.TEXT && i.type === l.TEXT || r && r.type === l.ATTR_VALUE_TEXT && i.type === l.ATTR_VALUE_TEXT ? (r.parts[0] += i.parts[0], r.sourceSpan.end = i.sourceSpan.end) : (r = i, t.push(r));
  }
  return t;
}
function ss(e, t) {
  return e.length > 0 && e[e.length - 1] === t;
}
function as(e, t) {
  return Te[t] !== undefined ? Te[t] || e : /^#x[a-f0-9]+$/i.test(t) ? String.fromCodePoint(parseInt(t.slice(2), 16)) : /^#\d+$/.test(t) ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e;
}
function Qt(e, t = {}) {
  let { canSelfClose: r = false, allowHtmComponentClosingTags: n2 = false, isTagNameCaseSensitive: i = false, getTagContentType: s, tokenizeAngularBlocks: a = false, tokenizeAngularLetDeclaration: o = false, enableAngularSelectorlessSyntax: c = false } = t;
  return $o().parse(e, "angular-html-parser", { tokenizeExpansionForms: a, canSelfClose: r, allowHtmComponentClosingTags: n2, tokenizeBlocks: a, tokenizeLet: o, selectorlessEnabled: c }, i, s);
}
function Yo(e, t) {
  for (let r of zo)
    r(e, t);
  return e;
}
function jo(e) {
  e.walk((t) => {
    if (t.kind === "element" && t.tagDefinition.ignoreFirstLf && t.children.length > 0 && t.children[0].kind === "text" && t.children[0].value[0] === `
`) {
      let r = t.children[0];
      r.value.length === 1 ? t.removeChild(r) : r.value = r.value.slice(1);
    }
  });
}
function Xo(e) {
  let t = (r) => r.kind === "element" && r.prev?.kind === "ieConditionalStartComment" && r.prev.sourceSpan.end.offset === r.startSourceSpan.start.offset && r.firstChild?.kind === "ieConditionalEndComment" && r.firstChild.sourceSpan.start.offset === r.startSourceSpan.end.offset;
  e.walk((r) => {
    if (r.children)
      for (let n2 = 0;n2 < r.children.length; n2++) {
        let i = r.children[n2];
        if (!t(i))
          continue;
        let { prev: s, firstChild: a } = i;
        r.removeChild(s), n2--;
        let o = new h7(s.sourceSpan.start, a.sourceSpan.end), c = new h7(o.start, i.sourceSpan.end);
        i.condition = s.condition, i.sourceSpan = c, i.startSourceSpan = o, i.removeChild(a);
      }
  });
}
function Ko(e, t, r) {
  e.walk((n2) => {
    if (n2.children)
      for (let i = 0;i < n2.children.length; i++) {
        let s = n2.children[i];
        if (s.kind !== "text" && !t(s))
          continue;
        s.kind !== "text" && (s.kind = "text", s.value = r(s));
        let a = s.prev;
        !a || a.kind !== "text" || (a.value += s.value, a.sourceSpan = new h7(a.sourceSpan.start, s.sourceSpan.end), n2.removeChild(s), i--);
      }
  });
}
function Qo(e) {
  return Ko(e, (t) => t.kind === "cdata", (t) => `<![CDATA[${t.value}]]>`);
}
function Jo(e) {
  let t = (r) => r.kind === "element" && r.attrs.length === 0 && r.children.length === 1 && r.firstChild.kind === "text" && !y2.hasWhitespaceCharacter(r.children[0].value) && !r.firstChild.hasLeadingSpaces && !r.firstChild.hasTrailingSpaces && r.isLeadingSpaceSensitive && !r.hasLeadingSpaces && r.isTrailingSpaceSensitive && !r.hasTrailingSpaces && r.prev?.kind === "text" && r.next?.kind === "text";
  e.walk((r) => {
    if (r.children)
      for (let n2 = 0;n2 < r.children.length; n2++) {
        let i = r.children[n2];
        if (!t(i))
          continue;
        let { prev: s, next: a } = i;
        s.value += `<${i.rawName}>` + i.firstChild.value + `</${i.rawName}>` + a.value, s.sourceSpan = new h7(s.sourceSpan.start, a.sourceSpan.end), s.isTrailingSpaceSensitive = a.isTrailingSpaceSensitive, s.hasTrailingSpaces = a.hasTrailingSpaces, r.removeChild(i), n2--, r.removeChild(a);
      }
  });
}
function Zo(e, t) {
  if (t.parser === "html")
    return;
  let r = /\{\{(.+?)\}\}/su;
  e.walk((n2) => {
    if (xn(n2, t))
      for (let i of n2.children) {
        if (i.kind !== "text")
          continue;
        let s = i.sourceSpan.start, a = null, o = i.value.split(r);
        for (let c = 0;c < o.length; c++, s = a) {
          let u = o[c];
          if (c % 2 === 0) {
            a = s.moveBy(u.length), u.length > 0 && n2.insertChildBefore(i, { kind: "text", value: u, sourceSpan: new h7(s, a) });
            continue;
          }
          a = s.moveBy(u.length + 4), n2.insertChildBefore(i, { kind: "interpolation", sourceSpan: new h7(s, a), children: u.length === 0 ? [] : [{ kind: "text", value: u, sourceSpan: new h7(s.moveBy(2), a.moveBy(-2)) }] });
        }
        n2.removeChild(i);
      }
  });
}
function el(e, t) {
  e.walk((r) => {
    let n2 = r.$children;
    if (!n2)
      return;
    if (n2.length === 0 || n2.length === 1 && n2[0].kind === "text" && y2.trim(n2[0].value).length === 0) {
      r.hasDanglingSpaces = n2.length > 0, r.$children = [];
      return;
    }
    let i = An(r, t), s = dr(r);
    if (!i)
      for (let a = 0;a < n2.length; a++) {
        let o = n2[a];
        if (o.kind !== "text")
          continue;
        let { leadingWhitespace: c, text: u, trailingWhitespace: p2 } = kn(o.value), d2 = o.prev, S2 = o.next;
        u ? (o.value = u, o.sourceSpan = new h7(o.sourceSpan.start.moveBy(c.length), o.sourceSpan.end.moveBy(-p2.length)), c && (d2 && (d2.hasTrailingSpaces = true), o.hasLeadingSpaces = true), p2 && (o.hasTrailingSpaces = true, S2 && (S2.hasLeadingSpaces = true))) : (r.removeChild(o), a--, (c || p2) && (d2 && (d2.hasTrailingSpaces = true), S2 && (S2.hasLeadingSpaces = true)));
      }
    r.isWhitespaceSensitive = i, r.isIndentationSensitive = s;
  });
}
function tl(e) {
  e.walk((t) => {
    t.isSelfClosing = !t.children || t.kind === "element" && (t.tagDefinition.isVoid || t.endSourceSpan && t.startSourceSpan.start === t.endSourceSpan.start && t.startSourceSpan.end === t.endSourceSpan.end);
  });
}
function rl(e, t) {
  e.walk((r) => {
    r.kind === "element" && (r.hasHtmComponentClosingTag = r.endSourceSpan && /^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset, r.endSourceSpan.end.offset)));
  });
}
function nl(e, t) {
  e.walk((r) => {
    r.cssDisplay = Bn(r, t);
  });
}
function il(e, t) {
  e.walk((r) => {
    let { children: n2 } = r;
    if (n2) {
      if (n2.length === 0) {
        r.isDanglingSpaceSensitive = Ln(r, t);
        return;
      }
      for (let i of n2)
        i.isLeadingSpaceSensitive = yn(i, t), i.isTrailingSpaceSensitive = Nn(i, t);
      for (let i = 0;i < n2.length; i++) {
        let s = n2[i];
        s.isLeadingSpaceSensitive = (i === 0 || s.prev.isTrailingSpaceSensitive) && s.isLeadingSpaceSensitive, s.isTrailingSpaceSensitive = (i === n2.length - 1 || s.next.isLeadingSpaceSensitive) && s.isTrailingSpaceSensitive;
      }
    }
  });
}
function sl(e, t, r) {
  let { node: n2 } = e;
  switch (n2.kind) {
    case "root":
      return t.__onHtmlRoot && t.__onHtmlRoot(n2), [C(Re(e, t, r)), v2];
    case "element":
    case "ieConditionalComment":
      return Pi(e, t, r);
    case "angularControlFlowBlock":
      return xi(e, t, r);
    case "angularControlFlowBlockParameters":
      return yi(e, t, r);
    case "angularControlFlowBlockParameter":
      return y2.trim(n2.expression);
    case "angularLetDeclaration":
      return C(["@let ", C([n2.id, " =", C(A([_2, r("init")]))]), ";"]);
    case "angularLetDeclarationInitializer":
      return n2.value;
    case "angularIcuExpression":
      return Ni(e, t, r);
    case "angularIcuCase":
      return Li(e, t, r);
    case "ieConditionalStartComment":
    case "ieConditionalEndComment":
      return [Se(n2), fe(n2)];
    case "interpolation":
      return [Se(n2, t), ...e.map(r, "children"), fe(n2, t)];
    case "text": {
      if (n2.parent.kind === "interpolation") {
        let o = /\n[^\S\n]*$/u, c = o.test(n2.value), u = c ? n2.value.replace(o, "") : n2.value;
        return [L(u), c ? v2 : ""];
      }
      let i = U(n2, t), s = Dt(n2), a = V(n2, t);
      return s[0] = [i, s[0]], s.push([s.pop(), a]), xt(s);
    }
    case "docType":
      return [C([Se(n2, t), " ", w(0, n2.value.replace(/^html\b/iu, "html"), /\s+/gu, " ")]), fe(n2, t)];
    case "comment":
      return [U(n2, t), L(t.originalText.slice(Q(n2), te(n2))), V(n2, t)];
    case "attribute": {
      if (n2.value === null)
        return n2.rawName;
      let i = Sr(n2.value), s = Rt(n2, t) ? "" : pn(i, '"');
      return [n2.rawName, "=", s, L(s === '"' ? w(0, i, '"', "&quot;") : w(0, i, "'", "&apos;")), s];
    }
    case "frontMatter":
    case "cdata":
    default:
      throw new mn(n2, "HTML");
  }
}
function ll(e, t) {
  let r = new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
  return Object.assign(r, t);
}
function Jt(e) {
  return { ...cl, ...e };
}
function Gr(e) {
  let { canSelfClose: t, allowHtmComponentClosingTags: r, isTagNameCaseSensitive: n2, shouldParseAsRawText: i, tokenizeAngularBlocks: s, tokenizeAngularLetDeclaration: a } = e;
  return { canSelfClose: t, allowHtmComponentClosingTags: r, isTagNameCaseSensitive: n2, getTagContentType: i ? (...o) => i(...o) ? R2.RAW_TEXT : undefined : undefined, tokenizeAngularBlocks: s, tokenizeAngularLetDeclaration: a };
}
function ul(e, t) {
  let r = e.map(t);
  return r.some((n2, i) => n2 !== e[i]) ? r : e;
}
function Es(e, t) {
  if (e.value)
    for (let { regex: r, parse: n2 } of pl) {
      let i = e.value.match(r);
      if (i)
        return n2(e, i, t);
    }
  return null;
}
function hl(e, t, r) {
  let { openingTagSuffix: n2, condition: i, data: s } = t.groups, a = 4 + n2.length, o = e.sourceSpan.start.moveBy(a), c = o.moveBy(s.length), [u, p2] = (() => {
    try {
      return [true, r(s, o).children];
    } catch {
      return [false, [{ kind: "text", value: s, sourceSpan: new h7(o, c) }]];
    }
  })();
  return { kind: "ieConditionalComment", complete: u, children: p2, condition: w(0, i.trim(), /\s+/gu, " "), sourceSpan: e.sourceSpan, startSourceSpan: new h7(e.sourceSpan.start, o), endSourceSpan: new h7(c, e.sourceSpan.end) };
}
function ml(e, t) {
  let { condition: r } = t.groups;
  return { kind: "ieConditionalStartComment", condition: w(0, r.trim(), /\s+/gu, " "), sourceSpan: e.sourceSpan };
}
function fl(e) {
  return { kind: "ieConditionalEndComment", sourceSpan: e.sourceSpan };
}
function Ts(e, t, r, n2) {
  Wt(new Yr, e.children, { parseOptions: r }), t && e.children.unshift(t);
  let i = new tr(e);
  return i.walk((s) => {
    if (s.kind === "comment") {
      let a = Es(s, n2);
      a && s.parent.replaceChild(s, a);
    }
    dl(s), gl(s), _l(s);
  }), i;
}
function dl(e) {
  if (e.kind === "block") {
    if (e.name = w(0, e.name.toLowerCase(), /\s+/gu, " ").trim(), e.kind = "angularControlFlowBlock", !Ie(e.parameters)) {
      delete e.parameters;
      return;
    }
    for (let t of e.parameters)
      t.kind = "angularControlFlowBlockParameter";
    e.parameters = { kind: "angularControlFlowBlockParameters", children: e.parameters, sourceSpan: new h7(e.parameters[0].sourceSpan.start, F(0, e.parameters, -1).sourceSpan.end) };
  }
}
function gl(e) {
  e.kind === "letDeclaration" && (e.kind = "angularLetDeclaration", e.id = e.name, e.init = { kind: "angularLetDeclarationInitializer", sourceSpan: new h7(e.valueSpan.start, e.valueSpan.end), value: e.value }, delete e.name, delete e.value);
}
function _l(e) {
  e.kind === "expansion" && (e.kind = "angularIcuExpression"), e.kind === "expansionCase" && (e.kind = "angularIcuCase");
}
function Cs(e, t) {
  let r = e.toLowerCase();
  return t(r) ? r : e;
}
function vs2(e) {
  let t = e.name.startsWith(":") ? e.name.slice(1).split(":")[0] : null, r = e.nameSpan.toString(), n2 = t !== null && r.startsWith(`${t}:`), i = n2 ? r.slice(t.length + 1) : r;
  e.name = i, e.namespace = t, e.hasExplicitNamespace = n2;
}
function Sl(e) {
  switch (e.kind) {
    case "element":
      vs2(e);
      for (let t of e.attrs)
        vs2(t), t.valueSpan ? (t.value = t.valueSpan.toString(), /["']/u.test(t.value[0]) && (t.value = t.value.slice(1, -1))) : t.value = null;
      break;
    case "comment":
      e.value = e.sourceSpan.toString().slice(4, -3);
      break;
    case "text":
      e.value = e.sourceSpan.toString();
      break;
  }
}
function El(e, t) {
  if (e.kind === "element") {
    let r = Be(t.isTagNameCaseSensitive ? e.name : e.name.toLowerCase());
    !e.namespace || e.namespace === r.implicitNamespacePrefix || ue(e) ? e.tagDefinition = r : e.tagDefinition = Be("");
  }
}
function Cl(e) {
  e.sourceSpan && e.endSourceSpan && (e.sourceSpan = new h7(e.sourceSpan.start, e.endSourceSpan.end));
}
function vl(e, t) {
  if (e.kind === "element" && (t.normalizeTagName && (!e.namespace || e.namespace === e.tagDefinition.implicitNamespacePrefix || ue(e)) && (e.name = Cs(e.name, (r) => _s.has(r))), t.normalizeAttributeName))
    for (let r of e.attrs)
      r.namespace || (r.name = Cs(r.name, (n2) => Zt.has(e.name) && (Zt.get("*").has(n2) || Zt.get(e.name).has(n2))));
}
function Xr(e, t) {
  let { rootNodes: r, errors: n2 } = Qt(e, Gr(t));
  return n2.length > 0 && jr(n2[0]), { parseOptions: t, rootNodes: r };
}
function bs(e, t) {
  let r = Gr(t), { rootNodes: n2, errors: i } = Qt(e, r);
  if (n2.some((u) => u.kind === "docType" && u.value === "html" || u.kind === "element" && u.name.toLowerCase() === "html"))
    return Xr(e, rr);
  let a, o = () => a ?? (a = Qt(e, { ...r, getTagContentType: undefined })), c = (u) => {
    let { offset: p2 } = u.startSourceSpan.start;
    return o().rootNodes.find((d2) => d2.kind === "element" && d2.startSourceSpan.start.offset === p2) ?? u;
  };
  for (let [u, p2] of n2.entries())
    if (p2.kind === "element") {
      if (p2.isVoid)
        i = o().errors, n2[u] = c(p2);
      else if (Tl(p2)) {
        let { endSourceSpan: d2, startSourceSpan: S2 } = p2, m2 = o().errors.find((g2) => g2.span.start.offset > S2.start.offset && g2.span.start.offset < d2.end.offset);
        m2 && jr(m2), n2[u] = c(p2);
      }
    }
  return i.length > 0 && jr(i[0]), { parseOptions: t, rootNodes: n2 };
}
function Tl(e) {
  if (e.kind !== "element" || e.name !== "template")
    return false;
  let t = e.attrs.find((r) => r.name === "lang")?.value;
  return !t || t === "html";
}
function jr(e) {
  let { msg: t, span: { start: r, end: n2 } } = e;
  throw gs(t, { loc: { start: { line: r.line + 1, column: r.col + 1 }, end: { line: n2.line + 1, column: n2.col + 1 } }, cause: e });
}
function bl(e, t, r, n2, i, s) {
  let { offset: a } = n2, o = w(0, t.slice(0, a), /[^\n]/gu, " ") + r, c = Kr(o, e, { ...i, shouldParseFrontMatter: false }, s);
  c.sourceSpan = new h7(n2, F(0, c.children, -1).sourceSpan.end);
  let u = c.children[0];
  return u.length === a ? c.children.shift() : (u.sourceSpan = new h7(u.sourceSpan.start.moveBy(a), u.sourceSpan.end), u.value = u.value.slice(a)), c;
}
function Kr(e, t, r, n2 = {}) {
  let { frontMatter: i, content: s } = r.shouldParseFrontMatter ? pr(e) : { content: e }, a = new mt(e, n2.filepath), o = new qe(a, 0, 0, 0), c = o.moveBy(e.length), { parseOptions: u, rootNodes: p2 } = t(s, r), d2 = { kind: "root", sourceSpan: new h7(o, c), children: p2 }, S2;
  if (i) {
    let [g2, E] = [i.start, i.end].map((P2) => new qe(a, P2.index, P2.line - 1, P2.column));
    S2 = { ...i, kind: "frontMatter", sourceSpan: new h7(g2, E) };
  }
  return Ts(d2, S2, u, (g2, E) => bl(t, e, g2, E, u, n2));
}
function gt2(e) {
  let t = Jt(e), r = t.name === "vue" ? bs : Xr;
  return { parse: (n2, i) => Kr(n2, r, t, i), hasPragma: vi, hasIgnorePragma: Ti, astFormat: "html", locStart: Q, locEnd: te };
}
var Jr, Zr = (e) => {
  throw TypeError(e);
}, ks = (e, t, r) => (t in e) ? Jr(e, t, { enumerable: true, configurable: true, writable: true, value: r }) : e[t] = r, en = (e, t) => {
  for (var r in t)
    Jr(e, r, { get: t[r], enumerable: true });
}, ir = (e, t, r) => ks(e, typeof t != "symbol" ? t + "" : t, r), xs = (e, t, r) => t.has(e) || Zr("Cannot " + r), $e = (e, t, r) => (xs(e, t, "read from private field"), r ? r.call(e) : t.get(e)), tn = (e, t, r) => t.has(e) ? Zr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ws, xe = (e, t) => (r, n2, ...i) => r | 1 && n2 == null ? undefined : (t.call(n2) ?? n2[e]).apply(n2, i), As, ys, w, Ls, F, Ps = () => {}, ze, Ye = "string", je = "array", St = "cursor", Ae = "indent", ye = "align", Et = "trim", Ne = "group", Le = "fill", Pe = "if-break", Oe = "indent-if-break", Ct = "line-suffix", vt = "line-suffix-boundary", Y = "line", Tt = "label", De = "break-parent", bt, wt, Ds = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e), sr, rn, D2, kt, sn, an, j, _2, k2, Ms, v2, Bs, nn, cn, un, Fs, qs, pn, lr = class {
  #e;
  constructor(t) {
    this.#e = new Set(t);
  }
  getLeadingWhitespaceCount(t) {
    let r = this.#e, n2 = 0;
    for (let i = 0;i < t.length && r.has(t.charAt(i)); i++)
      n2++;
    return n2;
  }
  getTrailingWhitespaceCount(t) {
    let r = this.#e, n2 = 0;
    for (let i = t.length - 1;i >= 0 && r.has(t.charAt(i)); i--)
      n2++;
    return n2;
  }
  getLeadingWhitespace(t) {
    let r = this.getLeadingWhitespaceCount(t);
    return t.slice(0, r);
  }
  getTrailingWhitespace(t) {
    let r = this.getTrailingWhitespaceCount(t);
    return t.slice(t.length - r);
  }
  hasLeadingWhitespace(t) {
    return this.#e.has(t.charAt(0));
  }
  hasTrailingWhitespace(t) {
    return this.#e.has(F(0, t, -1));
  }
  trimStart(t) {
    let r = this.getLeadingWhitespaceCount(t);
    return t.slice(r);
  }
  trimEnd(t) {
    let r = this.getTrailingWhitespaceCount(t);
    return t.slice(0, t.length - r);
  }
  trim(t) {
    return this.trimEnd(this.trimStart(t));
  }
  split(t, r = false) {
    let n2 = `[${or2([...this.#e].join(""))}]+`, i = new RegExp(r ? `(${n2})` : n2, "u");
    return t.split(i);
  }
  hasWhitespaceCharacter(t) {
    let r = this.#e;
    return Array.prototype.some.call(t, (n2) => r.has(n2));
  }
  hasNonWhitespaceCharacter(t) {
    let r = this.#e;
    return Array.prototype.some.call(t, (n2) => !r.has(n2));
  }
  isWhitespaceOnly(t) {
    let r = this.#e;
    return Array.prototype.every.call(t, (n2) => r.has(n2));
  }
  #t(t) {
    let r = Number.POSITIVE_INFINITY;
    for (let n2 of t.split(`
`)) {
      if (n2.length === 0)
        continue;
      let i = this.getLeadingWhitespaceCount(n2);
      if (i === 0)
        return 0;
      n2.length !== i && i < r && (r = i);
    }
    return r === Number.POSITIVE_INFINITY ? 0 : r;
  }
  dedentString(t) {
    let r = this.#t(t);
    return r === 0 ? t : t.split(`
`).map((n2) => n2.slice(r)).join(`
`);
  }
}, hn, Vs, Us, y2, cr, mn, Ws, Gs, dn, gn, zs, Ys, _n, Xs, En = (e) => String(e).split(/[/\\]/u).pop(), Cn = (e) => String(e).startsWith("file:"), Ie, ea = undefined, At, yt, ce, Xe = 3, pr, bn = "inline", hr2, wn = "normal", mr, ue, aa = (e) => w(0, e, /^[\t\f\r ]*\n/gu, ""), fr = (e) => aa(y2.trimEnd(e)), kn = (e) => {
  let t = e, r = y2.getLeadingWhitespace(t);
  r && (t = t.slice(r.length));
  let n2 = y2.getTrailingWhitespace(t);
  return n2 && (t = t.slice(0, -n2.length)), { leadingWhitespace: r, trailingWhitespace: n2, text: t };
}, Ea, Vn, Un = ({ node: { value: e } }) => Vn.test(e), Er = (e) => (t, r, n2) => x(b2(n2.node), t, { parser: e }, W), va, Gn, $n = ({ node: e }, t) => !t.parentParser && e.fullName === "class" && !e.value.includes("{{"), zn = (e, t, r) => b2(r.node).trim().split(/\s+/u).join(" "), Cr, wa, Yn = ({ node: e }, t) => wa.has(e.fullName) && !t.parentParser && !e.value.includes("{{"), jn = (e, t, r) => x(b2(r.node), e, { parser: "babel", __isHtmlInlineEventHandler: true }, () => false), Xn, Kn = ({ node: e }, t) => e.fullName === "allow" && !t.parentParser && e.parent.fullName === "iframe" && !e.value.includes("{{"), xa, Aa, ya, Na, Zn, La, ei, ti = (e) => e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source"), ri, Oa, ii = ({ node: e }, t) => e.fullName === "style" && !t.parentParser && !e.value.includes("{{"), si = async (e, t, r) => K(await e(b2(r.node), { parser: "css", __isHTMLStyleAttribute: true })), vr, G, Ra, ui, Fa, pi, Q = (e) => e.sourceSpan.start.offset, te = (e) => e.sourceSpan.end.offset, hi = "<!doctype", qt, Ya, fi, nt = null, Xa = 10, di, I, gi, Qa, _i, Si = "format", Ei, Ci, vi = (e) => Ci.test(e), Ti = (e) => Ei.test(e), bi = (e) => `<!-- @${Si} -->

${e}`, wi, Ja = (e) => e?.kind === "angularControlFlowBlock" && (e.name === "case" || e.name === "default"), R2, kr, xr, re, to, Vt, Di = class {
}, ro = "boolean", no = "number", io = "string", so = "object", ao, Ii, oo, Ri, f2 = class {
  constructor({ closedByChildren: e, implicitNamespacePrefix: t, contentType: r = R2.PARSABLE_DATA, closedByParent: n2 = false, isVoid: i = false, ignoreFirstLf: s = false, preventNamespaceInheritance: a = false, canSelfClose: o = false } = {}) {
    this.closedByChildren = {}, this.closedByParent = false, e && e.length > 0 && e.forEach((c) => this.closedByChildren[c] = true), this.isVoid = i, this.closedByParent = n2 || i, this.implicitNamespacePrefix = t || null, this.contentType = r, this.ignoreFirstLf = s, this.preventNamespaceInheritance = a, this.canSelfClose = o ?? i;
  }
  isClosedByChild(e) {
    return this.isVoid || e.toLowerCase() in this.closedByChildren;
  }
  getContentType(e) {
    return typeof this.contentType == "object" ? (e === undefined ? undefined : this.contentType[e]) ?? this.contentType.default : this.contentType;
  }
}, Mi, lt2, qe = class qi {
  constructor(t, r, n2, i) {
    this.file = t, this.offset = r, this.line = n2, this.col = i;
  }
  toString() {
    return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;
  }
  moveBy(t) {
    let r = this.file.content, n2 = r.length, i = this.offset, s = this.line, a = this.col;
    for (;i > 0 && t < 0; )
      if (i--, t++, r.charCodeAt(i) == 10) {
        s--;
        let o = r.substring(0, i - 1).lastIndexOf(String.fromCharCode(10));
        a = o > 0 ? i - o : i;
      } else
        a--;
    for (;i < n2 && t > 0; ) {
      let o = r.charCodeAt(i);
      i++, t--, o == 10 ? (s++, a = 0) : a++;
    }
    return new qi(this.file, i, s, a);
  }
  getContext(t, r) {
    let n2 = this.file.content, i = this.offset;
    if (i != null) {
      i > n2.length - 1 && (i = n2.length - 1);
      let s = i, a = 0, o = 0;
      for (;a < t && i > 0 && (i--, a++, !(n2[i] == `
` && ++o == r)); )
        ;
      for (a = 0, o = 0;a < t && s < n2.length - 1 && (s++, a++, !(n2[s] == `
` && ++o == r)); )
        ;
      return { before: n2.substring(i, this.offset), after: n2.substring(this.offset, s + 1) };
    }
    return null;
  }
}, mt = class {
  constructor(e, t) {
    this.content = e, this.url = t;
  }
}, h7 = class {
  constructor(e, t, r = e, n2 = null) {
    this.start = e, this.end = t, this.fullStart = r, this.details = n2;
  }
  toString() {
    return this.start.file.content.substring(this.start.offset, this.end.offset);
  }
}, Fi, ne2, Ce = class {
  constructor(e, t) {
    this.sourceSpan = e, this.i18n = t;
  }
}, Hi, Vi, Ui, Wi = class {
  constructor(e, t, r, n2, i) {
    this.value = e, this.expression = t, this.sourceSpan = r, this.valueSourceSpan = n2, this.expSourceSpan = i, this.kind = "expansionCase";
  }
  visit(e, t) {
    return e.visitExpansionCase(this, t);
  }
}, Gi, ie, $i = class {
  constructor(e, t) {
    this.value = e, this.sourceSpan = t, this.kind = "comment";
  }
  visit(e, t) {
    return e.visitComment(this, t);
  }
}, zi = class {
  constructor(e, t) {
    this.value = e, this.sourceSpan = t, this.kind = "docType";
  }
  visit(e, t) {
    return e.visitDocType(this, t);
  }
}, ve, J, Yi = class {
  constructor(e, t, r, n2, i = null) {
    this.name = e, this.attrs = t, this.sourceSpan = r, this.startSourceSpan = n2, this.endSourceSpan = i, this.kind = "directive";
  }
  visit(e, t) {
    return e.visitDirective(this, t);
  }
}, Nr = class {
  constructor(e, t) {
    this.expression = e, this.sourceSpan = t, this.kind = "blockParameter", this.startSourceSpan = null, this.endSourceSpan = null;
  }
  visit(e, t) {
    return e.visitBlockParameter(this, t);
  }
}, Lr = class {
  constructor(e, t, r, n2, i) {
    this.name = e, this.value = t, this.sourceSpan = r, this.nameSpan = n2, this.valueSpan = i, this.kind = "letDeclaration", this.startSourceSpan = null, this.endSourceSpan = null;
  }
  visit(e, t) {
    return e.visitLetDeclaration(this, t);
  }
}, Pr = class {
  constructor() {}
  visitElement(e, t) {
    this.visitChildren(t, (r) => {
      r(e.attrs), r(e.directives), r(e.children);
    });
  }
  visitAttribute(e, t) {}
  visitText(e, t) {}
  visitCdata(e, t) {}
  visitComment(e, t) {}
  visitDocType(e, t) {}
  visitExpansion(e, t) {
    return this.visitChildren(t, (r) => {
      r(e.cases);
    });
  }
  visitExpansionCase(e, t) {}
  visitBlock(e, t) {
    this.visitChildren(t, (r) => {
      r(e.parameters), r(e.children);
    });
  }
  visitBlockParameter(e, t) {}
  visitLetDeclaration(e, t) {}
  visitComponent(e, t) {
    this.visitChildren(t, (r) => {
      r(e.attrs), r(e.children);
    });
  }
  visitDirective(e, t) {
    this.visitChildren(t, (r) => {
      r(e.attrs);
    });
  }
  visitChildren(e, t) {
    let r = [], n2 = this;
    function i(s) {
      s && r.push(Wt(n2, s, e));
    }
    return t(i), Array.prototype.concat.apply([], r);
  }
}, Te, co = "", l, Lo = class {
  constructor(e, t, r) {
    this.tokens = e, this.errors = t, this.nonNormalizedIcuExpressions = r;
  }
}, Po, Mr, Do, ft, Io = class {
  constructor(e, t, r) {
    this._getTagContentType = t, this._currentTokenStart = null, this._currentTokenType = null, this._expansionCaseStack = [], this._openDirectiveCount = 0, this._inInterpolation = false, this._fullNameStack = [], this.tokens = [], this.errors = [], this.nonNormalizedIcuExpressions = [], this._tokenizeIcu = r.tokenizeExpansionForms || false, this._leadingTriviaCodePoints = r.leadingTriviaChars && r.leadingTriviaChars.map((i) => i.codePointAt(0) || 0), this._canSelfClose = r.canSelfClose || false, this._allowHtmComponentClosingTags = r.allowHtmComponentClosingTags || false;
    let n2 = r.range || { endPos: e.content.length, startPos: 0, startLine: 0, startCol: 0 };
    this._cursor = r.escapedString ? new Uo(e, n2) : new is2(e, n2), this._preserveLineEndings = r.preserveLineEndings || false, this._i18nNormalizeLineEndingsInICUs = r.i18nNormalizeLineEndingsInICUs || false, this._tokenizeBlocks = r.tokenizeBlocks ?? true, this._tokenizeLet = r.tokenizeLet ?? true, this._selectorlessEnabled = r.selectorlessEnabled ?? false;
    try {
      this._cursor.init();
    } catch (i) {
      this.handleError(i);
    }
  }
  _processCarriageReturns(e) {
    return this._preserveLineEndings ? e : e.replace(Po, `
`);
  }
  tokenize() {
    for (;this._cursor.peek() !== 0; ) {
      let e = this._cursor.clone();
      try {
        if (this._attemptCharCode(60))
          if (this._attemptCharCode(33))
            this._attemptStr("[CDATA[") ? this._consumeCdata(e) : this._attemptStr("--") ? this._consumeComment(e) : this._attemptStrCaseInsensitive("doctype") ? this._consumeDocType(e) : this._consumeBogusComment(e);
          else if (this._attemptCharCode(47))
            this._consumeTagClose(e);
          else {
            let t = this._cursor.clone();
            this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e);
          }
        else
          this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._isLetStart() ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._isBlockStart() ? this._consumeBlockStart(e) : this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode(125) ? this._consumeBlockEnd(e) : this._tokenizeIcu && this._tokenizeExpansionForm() || this._consumeWithInterpolation(l.TEXT, l.INTERPOLATION, () => this._isTextEnd(), () => this._isTagStart());
      } catch (t) {
        this.handleError(t);
      }
    }
    this._beginToken(l.EOF), this._endToken([]);
  }
  _getBlockName() {
    let e = false, t = this._cursor.clone();
    return this._attemptCharCodeUntilFn((r) => ct(r) ? !e : Ho(r) ? (e = true, false) : true), this._cursor.getChars(t).trim();
  }
  _consumeBlockStart(e) {
    this._requireCharCode(64), this._beginToken(l.BLOCK_OPEN_START, e);
    let t = this._endToken([this._getBlockName()]);
    if (this._cursor.peek() === 40)
      if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(T), this._attemptCharCode(41))
        this._attemptCharCodeUntilFn(T);
      else {
        t.type = l.INCOMPLETE_BLOCK_OPEN;
        return;
      }
    this._attemptCharCode(123) ? (this._beginToken(l.BLOCK_OPEN_END), this._endToken([])) : this._isBlockStart() && (t.parts[0] === "case" || t.parts[0] === "default") ? (this._beginToken(l.BLOCK_OPEN_END), this._endToken([]), this._beginToken(l.BLOCK_CLOSE), this._endToken([])) : t.type = l.INCOMPLETE_BLOCK_OPEN;
  }
  _consumeBlockEnd(e) {
    this._beginToken(l.BLOCK_CLOSE, e), this._endToken([]);
  }
  _consumeBlockParameters() {
    for (this._attemptCharCodeUntilFn(Zi);this._cursor.peek() !== 41 && this._cursor.peek() !== 0; ) {
      this._beginToken(l.BLOCK_PARAMETER);
      let e = this._cursor.clone(), t = null, r = 0;
      for (;this._cursor.peek() !== 59 && this._cursor.peek() !== 0 || t !== null; ) {
        let n2 = this._cursor.peek();
        if (n2 === 92)
          this._cursor.advance();
        else if (n2 === t)
          t = null;
        else if (t === null && Ut(n2))
          t = n2;
        else if (n2 === 40 && t === null)
          r++;
        else if (n2 === 41 && t === null) {
          if (r === 0)
            break;
          r > 0 && r--;
        }
        this._cursor.advance();
      }
      this._endToken([this._cursor.getChars(e)]), this._attemptCharCodeUntilFn(Zi);
    }
  }
  _consumeLetDeclaration(e) {
    if (this._requireStr("@let"), this._beginToken(l.LET_START, e), ct(this._cursor.peek()))
      this._attemptCharCodeUntilFn(T);
    else {
      let r = this._endToken([this._cursor.getChars(e)]);
      r.type = l.INCOMPLETE_LET;
      return;
    }
    let t = this._endToken([this._getLetDeclarationName()]);
    if (this._attemptCharCodeUntilFn(T), !this._attemptCharCode(61)) {
      t.type = l.INCOMPLETE_LET;
      return;
    }
    this._attemptCharCodeUntilFn((r) => T(r) && !pt(r)), this._consumeLetDeclarationValue(), this._cursor.peek() === 59 ? (this._beginToken(l.LET_END), this._endToken([]), this._cursor.advance()) : (t.type = l.INCOMPLETE_LET, t.sourceSpan = this._cursor.getSpan(e));
  }
  _getLetDeclarationName() {
    let e = this._cursor.clone(), t = false;
    return this._attemptCharCodeUntilFn((r) => Fe(r) || r === 36 || r === 95 || t && ut(r) ? (t = true, false) : true), this._cursor.getChars(e).trim();
  }
  _consumeLetDeclarationValue() {
    let e = this._cursor.clone();
    for (this._beginToken(l.LET_VALUE, e);this._cursor.peek() !== 0; ) {
      let t = this._cursor.peek();
      if (t === 59)
        break;
      Ut(t) && (this._cursor.advance(), this._attemptCharCodeUntilFn((r) => r === 92 ? (this._cursor.advance(), false) : r === t)), this._cursor.advance();
    }
    this._endToken([this._cursor.getChars(e)]);
  }
  _tokenizeExpansionForm() {
    if (this.isExpansionFormStart())
      return this._consumeExpansionFormStart(), true;
    if (Fo(this._cursor.peek()) && this._isInExpansionForm())
      return this._consumeExpansionCaseStart(), true;
    if (this._cursor.peek() === 125) {
      if (this._isInExpansionCase())
        return this._consumeExpansionCaseEnd(), true;
      if (this._isInExpansionForm())
        return this._consumeExpansionFormEnd(), true;
    }
    return false;
  }
  _beginToken(e, t = this._cursor.clone()) {
    this._currentTokenStart = t, this._currentTokenType = e;
  }
  _endToken(e, t) {
    if (this._currentTokenStart === null)
      throw new ne2(this._cursor.getSpan(t), "Programming error - attempted to end a token when there was no start to the token");
    if (this._currentTokenType === null)
      throw new ne2(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type");
    let r = { type: this._currentTokenType, parts: e, sourceSpan: (t ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints) };
    return this.tokens.push(r), this._currentTokenStart = null, this._currentTokenType = null, r;
  }
  _createError(e, t) {
    this._isInExpansionForm() && (e += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);
    let r = new ne2(t, e);
    return this._currentTokenStart = null, this._currentTokenType = null, r;
  }
  handleError(e) {
    if (e instanceof Vr && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof ne2)
      this.errors.push(e);
    else
      throw e;
  }
  _attemptCharCode(e) {
    return this._cursor.peek() === e ? (this._cursor.advance(), true) : false;
  }
  _attemptCharCodeCaseInsensitive(e) {
    return qo(this._cursor.peek(), e) ? (this._cursor.advance(), true) : false;
  }
  _requireCharCode(e) {
    let t = this._cursor.clone();
    if (!this._attemptCharCode(e))
      throw this._createError(be(this._cursor.peek()), this._cursor.getSpan(t));
  }
  _attemptStr(e) {
    let t = e.length;
    if (this._cursor.charsLeft() < t)
      return false;
    let r = this._cursor.clone();
    for (let n2 = 0;n2 < t; n2++)
      if (!this._attemptCharCode(e.charCodeAt(n2)))
        return this._cursor = r, false;
    return true;
  }
  _attemptStrCaseInsensitive(e) {
    for (let t = 0;t < e.length; t++)
      if (!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))
        return false;
    return true;
  }
  _requireStr(e) {
    let t = this._cursor.clone();
    if (!this._attemptStr(e))
      throw this._createError(be(this._cursor.peek()), this._cursor.getSpan(t));
  }
  _requireStrCaseInsensitive(e) {
    let t = this._cursor.clone();
    if (!this._attemptStrCaseInsensitive(e))
      throw this._createError(be(this._cursor.peek()), this._cursor.getSpan(t));
  }
  _attemptCharCodeUntilFn(e) {
    for (;!e(this._cursor.peek()); )
      this._cursor.advance();
  }
  _requireCharCodeUntilFn(e, t) {
    let r = this._cursor.clone();
    if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t)
      throw this._createError(be(this._cursor.peek()), this._cursor.getSpan(r));
  }
  _attemptUntilChar(e) {
    for (;this._cursor.peek() !== e; )
      this._cursor.advance();
  }
  _readChar() {
    let e = String.fromCodePoint(this._cursor.peek());
    return this._cursor.advance(), e;
  }
  _peekStr(e) {
    let t = e.length;
    if (this._cursor.charsLeft() < t)
      return false;
    let r = this._cursor.clone();
    for (let n2 = 0;n2 < t; n2++) {
      if (r.peek() !== e.charCodeAt(n2))
        return false;
      r.advance();
    }
    return true;
  }
  _isBlockStart() {
    return this._cursor.peek() === 64 && Do.some((e) => this._peekStr(e));
  }
  _isLetStart() {
    return this._cursor.peek() === 64 && this._peekStr("@let");
  }
  _consumeEntity(e) {
    this._beginToken(l.ENCODED_ENTITY);
    let t = this._cursor.clone();
    if (this._cursor.advance(), this._attemptCharCode(35)) {
      let r = this._attemptCharCode(120) || this._attemptCharCode(88), n2 = this._cursor.clone();
      if (this._attemptCharCodeUntilFn(Mo), this._cursor.peek() != 59) {
        this._cursor.advance();
        let s = r ? Mr.HEX : Mr.DEC;
        throw this._createError(Oo(s, this._cursor.getChars(t)), this._cursor.getSpan());
      }
      let i = this._cursor.getChars(n2);
      this._cursor.advance();
      try {
        let s = parseInt(i, r ? 16 : 10);
        this._endToken([String.fromCodePoint(s), this._cursor.getChars(t)]);
      } catch {
        throw this._createError(Qi(this._cursor.getChars(t)), this._cursor.getSpan());
      }
    } else {
      let r = this._cursor.clone();
      if (this._attemptCharCodeUntilFn(Bo), this._cursor.peek() != 59)
        this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
      else {
        let n2 = this._cursor.getChars(r);
        this._cursor.advance();
        let i = Te.hasOwnProperty(n2) && Te[n2];
        if (!i)
          throw this._createError(Qi(n2), this._cursor.getSpan(t));
        this._endToken([i, `&${n2};`]);
      }
    }
  }
  _consumeRawText(e, t) {
    this._beginToken(e ? l.ESCAPABLE_RAW_TEXT : l.RAW_TEXT);
    let r = [];
    for (;; ) {
      let n2 = this._cursor.clone(), i = t();
      if (this._cursor = n2, i)
        break;
      e && this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(r.join(""))]), r.length = 0, this._consumeEntity(l.ESCAPABLE_RAW_TEXT), this._beginToken(l.ESCAPABLE_RAW_TEXT)) : r.push(this._readChar());
    }
    this._endToken([this._processCarriageReturns(r.join(""))]);
  }
  _consumeComment(e) {
    this._beginToken(l.COMMENT_START, e), this._endToken([]), this._consumeRawText(false, () => this._attemptStr("-->")), this._beginToken(l.COMMENT_END), this._requireStr("-->"), this._endToken([]);
  }
  _consumeBogusComment(e) {
    this._beginToken(l.COMMENT_START, e), this._endToken([]), this._consumeRawText(false, () => this._cursor.peek() === 62), this._beginToken(l.COMMENT_END), this._cursor.advance(), this._endToken([]);
  }
  _consumeCdata(e) {
    this._beginToken(l.CDATA_START, e), this._endToken([]), this._consumeRawText(false, () => this._attemptStr("]]>")), this._beginToken(l.CDATA_END), this._requireStr("]]>"), this._endToken([]);
  }
  _consumeDocType(e) {
    this._beginToken(l.DOC_TYPE_START, e), this._endToken([]), this._consumeRawText(false, () => this._cursor.peek() === 62), this._beginToken(l.DOC_TYPE_END), this._cursor.advance(), this._endToken([]);
  }
  _consumePrefixAndName(e) {
    let t = this._cursor.clone(), r = "";
    for (;this._cursor.peek() !== 58 && !Ro(this._cursor.peek()); )
      this._cursor.advance();
    let n2;
    this._cursor.peek() === 58 ? (r = this._cursor.getChars(t), this._cursor.advance(), n2 = this._cursor.clone()) : n2 = t, this._requireCharCodeUntilFn(e, r === "" ? 0 : 1);
    let i = this._cursor.getChars(n2);
    return [r, i];
  }
  _consumeTagOpen(e) {
    let t, r, n2, i, s = [];
    try {
      if (this._selectorlessEnabled && zt(this._cursor.peek()))
        i = this._consumeComponentOpenStart(e), [n2, r, t] = i.parts, r && (n2 += `:${r}`), t && (n2 += `:${t}`), this._attemptCharCodeUntilFn(T);
      else {
        if (!Fe(this._cursor.peek()))
          throw this._createError(be(this._cursor.peek()), this._cursor.getSpan(e));
        i = this._consumeTagOpenStart(e), r = i.parts[0], t = n2 = i.parts[1], this._attemptCharCodeUntilFn(T);
      }
      for (;!ts(this._cursor.peek()); )
        if (this._selectorlessEnabled && this._cursor.peek() === 64) {
          let o = this._cursor.clone(), c = o.clone();
          c.advance(), zt(c.peek()) && this._consumeDirective(o, c);
        } else {
          let o = this._consumeAttribute();
          s.push(o);
        }
      i.type === l.COMPONENT_OPEN_START ? this._consumeComponentOpenEnd() : this._consumeTagOpenEnd();
    } catch (o) {
      if (o instanceof ne2) {
        i ? i.type = i.type === l.COMPONENT_OPEN_START ? l.INCOMPLETE_COMPONENT_OPEN : l.INCOMPLETE_TAG_OPEN : (this._beginToken(l.TEXT, e), this._endToken(["<"]));
        return;
      }
      throw o;
    }
    if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === l.TAG_OPEN_END_VOID)
      return;
    let a = this._getTagContentType(t, r, this._fullNameStack.length > 0, s);
    this._handleFullNameStackForTagOpen(r, t), a === R2.RAW_TEXT ? this._consumeRawTextWithTagClose(r, i, n2, false) : a === R2.ESCAPABLE_RAW_TEXT && this._consumeRawTextWithTagClose(r, i, n2, true);
  }
  _consumeRawTextWithTagClose(e, t, r, n2) {
    this._consumeRawText(n2, () => !this._attemptCharCode(60) || !this._attemptCharCode(47) || (this._attemptCharCodeUntilFn(T), !this._attemptStrCaseInsensitive(e && t.type !== l.COMPONENT_OPEN_START ? `${e}:${r}` : r)) ? false : (this._attemptCharCodeUntilFn(T), this._attemptCharCode(62))), this._beginToken(t.type === l.COMPONENT_OPEN_START ? l.COMPONENT_CLOSE : l.TAG_CLOSE), this._requireCharCodeUntilFn((i) => i === 62, 3), this._cursor.advance(), this._endToken(t.parts), this._handleFullNameStackForTagClose(e, r);
  }
  _consumeTagOpenStart(e) {
    this._beginToken(l.TAG_OPEN_START, e);
    let t = this._consumePrefixAndName(we);
    return this._endToken(t);
  }
  _consumeComponentOpenStart(e) {
    this._beginToken(l.COMPONENT_OPEN_START, e);
    let t = this._consumeComponentName();
    return this._endToken(t);
  }
  _consumeComponentName() {
    let e = this._cursor.clone();
    for (;es(this._cursor.peek()); )
      this._cursor.advance();
    let t = this._cursor.getChars(e), r = "", n2 = "";
    return this._cursor.peek() === 58 && (this._cursor.advance(), [r, n2] = this._consumePrefixAndName(we)), [t, r, n2];
  }
  _consumeAttribute() {
    let [e, t] = this._consumeAttributeName(), r;
    return this._attemptCharCodeUntilFn(T), this._attemptCharCode(61) && (this._attemptCharCodeUntilFn(T), r = this._consumeAttributeValue()), this._attemptCharCodeUntilFn(T), { prefix: e, name: t, value: r };
  }
  _consumeAttributeName() {
    let e = this._cursor.peek();
    if (e === 39 || e === 34)
      throw this._createError(be(e), this._cursor.getSpan());
    this._beginToken(l.ATTR_NAME);
    let t;
    if (this._openDirectiveCount > 0) {
      let n2 = 0;
      t = (i) => {
        if (this._openDirectiveCount > 0) {
          if (i === 40)
            n2++;
          else if (i === 41) {
            if (n2 === 0)
              return true;
            n2--;
          }
        }
        return we(i);
      };
    } else if (e === 91) {
      let n2 = 0;
      t = (i) => (i === 91 ? n2++ : i === 93 && n2--, n2 <= 0 ? we(i) : pt(i));
    } else
      t = we;
    let r = this._consumePrefixAndName(t);
    return this._endToken(r), r;
  }
  _consumeAttributeValue() {
    let e;
    if (this._cursor.peek() === 39 || this._cursor.peek() === 34) {
      let t = this._cursor.peek();
      this._consumeQuote(t);
      let r = () => this._cursor.peek() === t;
      e = this._consumeWithInterpolation(l.ATTR_VALUE_TEXT, l.ATTR_VALUE_INTERPOLATION, r, r), this._consumeQuote(t);
    } else {
      let t = () => we(this._cursor.peek());
      e = this._consumeWithInterpolation(l.ATTR_VALUE_TEXT, l.ATTR_VALUE_INTERPOLATION, t, t);
    }
    return e;
  }
  _consumeQuote(e) {
    this._beginToken(l.ATTR_QUOTE), this._requireCharCode(e), this._endToken([String.fromCodePoint(e)]);
  }
  _consumeTagOpenEnd() {
    let e = this._attemptCharCode(47) ? l.TAG_OPEN_END_VOID : l.TAG_OPEN_END;
    this._beginToken(e), this._requireCharCode(62), this._endToken([]);
  }
  _consumeComponentOpenEnd() {
    let e = this._attemptCharCode(47) ? l.COMPONENT_OPEN_END_VOID : l.COMPONENT_OPEN_END;
    this._beginToken(e), this._requireCharCode(62), this._endToken([]);
  }
  _consumeTagClose(e) {
    if (this._selectorlessEnabled) {
      let t = e.clone();
      for (;t.peek() !== 62 && !zt(t.peek()); )
        t.advance();
      if (zt(t.peek())) {
        this._beginToken(l.COMPONENT_CLOSE, e);
        let r = this._consumeComponentName();
        this._attemptCharCodeUntilFn(T), this._requireCharCode(62), this._endToken(r);
        return;
      }
    }
    if (this._beginToken(l.TAG_CLOSE, e), this._attemptCharCodeUntilFn(T), this._allowHtmComponentClosingTags && this._attemptCharCode(47))
      this._attemptCharCodeUntilFn(T), this._requireCharCode(62), this._endToken([]);
    else {
      let [t, r] = this._consumePrefixAndName(we);
      this._attemptCharCodeUntilFn(T), this._requireCharCode(62), this._endToken([t, r]), this._handleFullNameStackForTagClose(t, r);
    }
  }
  _consumeExpansionFormStart() {
    this._beginToken(l.EXPANSION_FORM_START), this._requireCharCode(123), this._endToken([]), this._expansionCaseStack.push(l.EXPANSION_FORM_START), this._beginToken(l.RAW_TEXT);
    let e = this._readUntil(44), t = this._processCarriageReturns(e);
    if (this._i18nNormalizeLineEndingsInICUs)
      this._endToken([t]);
    else {
      let n2 = this._endToken([e]);
      t !== e && this.nonNormalizedIcuExpressions.push(n2);
    }
    this._requireCharCode(44), this._attemptCharCodeUntilFn(T), this._beginToken(l.RAW_TEXT);
    let r = this._readUntil(44);
    this._endToken([r]), this._requireCharCode(44), this._attemptCharCodeUntilFn(T);
  }
  _consumeExpansionCaseStart() {
    this._beginToken(l.EXPANSION_CASE_VALUE);
    let e = this._readUntil(123).trim();
    this._endToken([e]), this._attemptCharCodeUntilFn(T), this._beginToken(l.EXPANSION_CASE_EXP_START), this._requireCharCode(123), this._endToken([]), this._attemptCharCodeUntilFn(T), this._expansionCaseStack.push(l.EXPANSION_CASE_EXP_START);
  }
  _consumeExpansionCaseEnd() {
    this._beginToken(l.EXPANSION_CASE_EXP_END), this._requireCharCode(125), this._endToken([]), this._attemptCharCodeUntilFn(T), this._expansionCaseStack.pop();
  }
  _consumeExpansionFormEnd() {
    this._beginToken(l.EXPANSION_FORM_END), this._requireCharCode(125), this._endToken([]), this._expansionCaseStack.pop();
  }
  _consumeWithInterpolation(e, t, r, n2) {
    this._beginToken(e);
    let i = [];
    for (;!r(); ) {
      let a = this._cursor.clone();
      this._attemptStr(ft.start) ? (this._endToken([this._processCarriageReturns(i.join(""))], a), i.length = 0, this._consumeInterpolation(t, a, n2), this._beginToken(e)) : this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(i.join(""))]), i.length = 0, this._consumeEntity(e), this._beginToken(e)) : i.push(this._readChar());
    }
    this._inInterpolation = false;
    let s = this._processCarriageReturns(i.join(""));
    return this._endToken([s]), s;
  }
  _consumeInterpolation(e, t, r) {
    let n2 = [];
    this._beginToken(e, t), n2.push(ft.start);
    let i = this._cursor.clone(), s = null, a = false;
    for (;this._cursor.peek() !== 0 && (r === null || !r()); ) {
      let o = this._cursor.clone();
      if (this._isTagStart()) {
        this._cursor = o, n2.push(this._getProcessedChars(i, o)), this._endToken(n2);
        return;
      }
      if (s === null)
        if (this._attemptStr(ft.end)) {
          n2.push(this._getProcessedChars(i, o)), n2.push(ft.end), this._endToken(n2);
          return;
        } else
          this._attemptStr("//") && (a = true);
      let c = this._cursor.peek();
      this._cursor.advance(), c === 92 ? this._cursor.advance() : c === s ? s = null : !a && s === null && Ut(c) && (s = c);
    }
    n2.push(this._getProcessedChars(i, this._cursor)), this._endToken(n2);
  }
  _consumeDirective(e, t) {
    for (this._requireCharCode(64), this._cursor.advance();es(this._cursor.peek()); )
      this._cursor.advance();
    this._beginToken(l.DIRECTIVE_NAME, e);
    let r = this._cursor.getChars(t);
    if (this._endToken([r]), this._attemptCharCodeUntilFn(T), this._cursor.peek() === 40) {
      for (this._openDirectiveCount++, this._beginToken(l.DIRECTIVE_OPEN), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(T);!ts(this._cursor.peek()) && this._cursor.peek() !== 41; )
        this._consumeAttribute();
      if (this._attemptCharCodeUntilFn(T), this._openDirectiveCount--, this._cursor.peek() !== 41) {
        if (this._cursor.peek() === 62 || this._cursor.peek() === 47)
          return;
        throw this._createError(be(this._cursor.peek()), this._cursor.getSpan(e));
      }
      this._beginToken(l.DIRECTIVE_CLOSE), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(T);
    }
  }
  _getProcessedChars(e, t) {
    return this._processCarriageReturns(t.getChars(e));
  }
  _isTextEnd() {
    return !!(this._isTagStart() || this._cursor.peek() === 0 || this._tokenizeIcu && !this._inInterpolation && (this.isExpansionFormStart() || this._cursor.peek() === 125 && this._isInExpansionCase()) || this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._isBlockStart() || this._isLetStart() || this._cursor.peek() === 125));
  }
  _isTagStart() {
    if (this._cursor.peek() === 60) {
      let e = this._cursor.clone();
      e.advance();
      let t = e.peek();
      if (97 <= t && t <= 122 || 65 <= t && t <= 90 || t === 47 || t === 33)
        return true;
    }
    return false;
  }
  _readUntil(e) {
    let t = this._cursor.clone();
    return this._attemptUntilChar(e), this._cursor.getChars(t);
  }
  _isInExpansion() {
    return this._isInExpansionCase() || this._isInExpansionForm();
  }
  _isInExpansionCase() {
    return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === l.EXPANSION_CASE_EXP_START;
  }
  _isInExpansionForm() {
    return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === l.EXPANSION_FORM_START;
  }
  isExpansionFormStart() {
    if (this._cursor.peek() !== 123)
      return false;
    let e = this._cursor.clone(), t = this._attemptStr(ft.start);
    return this._cursor = e, !t;
  }
  _handleFullNameStackForTagOpen(e, t) {
    let r = Ee(e, t);
    (this._fullNameStack.length === 0 || this._fullNameStack[this._fullNameStack.length - 1] === r) && this._fullNameStack.push(r);
  }
  _handleFullNameStackForTagClose(e, t) {
    let r = Ee(e, t);
    this._fullNameStack.length !== 0 && this._fullNameStack[this._fullNameStack.length - 1] === r && this._fullNameStack.pop();
  }
}, is2 = class Br {
  constructor(t, r) {
    if (t instanceof Br) {
      this.file = t.file, this.input = t.input, this.end = t.end;
      let n2 = t.state;
      this.state = { peek: n2.peek, offset: n2.offset, line: n2.line, column: n2.column };
    } else {
      if (!r)
        throw new Error("Programming error: the range argument must be provided with a file argument.");
      this.file = t, this.input = t.content, this.end = r.endPos, this.state = { peek: -1, offset: r.startPos, line: r.startLine, column: r.startCol };
    }
  }
  clone() {
    return new Br(this);
  }
  peek() {
    return this.state.peek;
  }
  charsLeft() {
    return this.end - this.state.offset;
  }
  diff(t) {
    return this.state.offset - t.state.offset;
  }
  advance() {
    this.advanceState(this.state);
  }
  init() {
    this.updatePeek(this.state);
  }
  getSpan(t, r) {
    t = t || this;
    let n2 = t;
    if (r)
      for (;this.diff(t) > 0 && r.indexOf(t.peek()) !== -1; )
        n2 === t && (t = t.clone()), t.advance();
    let i = this.locationFromCursor(t);
    return new h7(i, this.locationFromCursor(this), n2 !== t ? this.locationFromCursor(n2) : i);
  }
  getChars(t) {
    return this.input.substring(t.state.offset, this.state.offset);
  }
  charAt(t) {
    return this.input.charCodeAt(t);
  }
  advanceState(t) {
    if (t.offset >= this.end)
      throw this.state = t, new Vr('Unexpected character "EOF"', this);
    let r = this.charAt(t.offset);
    r === 10 ? (t.line++, t.column = 0) : pt(r) || t.column++, t.offset++, this.updatePeek(t);
  }
  updatePeek(t) {
    t.peek = t.offset >= this.end ? 0 : this.charAt(t.offset);
  }
  locationFromCursor(t) {
    return new qe(t.file, t.state.offset, t.state.line, t.state.column);
  }
}, Uo, Vr, N2, Wo = class {
  constructor(e, t) {
    this.rootNodes = e, this.errors = t;
  }
}, ls = class {
  constructor(e) {
    this.getTagDefinition = e;
  }
  parse(e, t, r, n2 = false, i) {
    let s = (m2) => (g2, ...E) => m2(g2.toLowerCase(), ...E), a = n2 ? this.getTagDefinition : s(this.getTagDefinition), o = (m2) => a(m2).getContentType(), c = n2 ? i : s(i), u = ns(e, t, i ? (m2, g2, E, P2) => {
      let z2 = c(m2, g2, E, P2);
      return z2 !== undefined ? z2 : o(m2);
    } : o, r), p2 = r && r.canSelfClose || false, d2 = r && r.allowHtmComponentClosingTags || false, S2 = new Go(u.tokens, a, p2, d2, n2);
    return S2.build(), new Wo(S2.rootNodes, [...u.errors, ...S2.errors]);
  }
}, Go = class cs {
  constructor(t, r, n2, i, s) {
    this.tokens = t, this.tagDefinitionResolver = r, this.canSelfClose = n2, this.allowHtmComponentClosingTags = i, this.isTagNameCaseSensitive = s, this._index = -1, this._containerStack = [], this.rootNodes = [], this.errors = [], this._advance();
  }
  build() {
    for (;this._peek.type !== l.EOF; )
      this._peek.type === l.TAG_OPEN_START || this._peek.type === l.INCOMPLETE_TAG_OPEN ? this._consumeElementStartTag(this._advance()) : this._peek.type === l.TAG_CLOSE ? (this._closeVoidElement(), this._consumeElementEndTag(this._advance())) : this._peek.type === l.CDATA_START ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === l.COMMENT_START ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === l.TEXT || this._peek.type === l.RAW_TEXT || this._peek.type === l.ESCAPABLE_RAW_TEXT ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === l.EXPANSION_FORM_START ? this._consumeExpansion(this._advance()) : this._peek.type === l.BLOCK_OPEN_START ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === l.BLOCK_CLOSE ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === l.INCOMPLETE_BLOCK_OPEN ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === l.LET_START ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === l.DOC_TYPE_START ? this._consumeDocType(this._advance()) : this._peek.type === l.INCOMPLETE_LET ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._peek.type === l.COMPONENT_OPEN_START || this._peek.type === l.INCOMPLETE_COMPONENT_OPEN ? this._consumeComponentStartTag(this._advance()) : this._peek.type === l.COMPONENT_CLOSE ? this._consumeComponentEndTag(this._advance()) : this._advance();
    for (let t of this._containerStack)
      t instanceof ve && this.errors.push(N2.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
  }
  _advance() {
    let t = this._peek;
    return this._index < this.tokens.length - 1 && this._index++, this._peek = this.tokens[this._index], t;
  }
  _advanceIf(t) {
    return this._peek.type === t ? this._advance() : null;
  }
  _consumeCdata(t) {
    let r = this._advance(), n2 = this._getText(r), i = this._advanceIf(l.CDATA_END);
    this._addToParent(new Vi(n2, new h7(t.sourceSpan.start, (i || r).sourceSpan.end), [r]));
  }
  _consumeComment(t) {
    let r = this._advanceIf(l.RAW_TEXT), n2 = this._advanceIf(l.COMMENT_END), i = r != null ? r.parts[0].trim() : null, s = n2 == null ? t.sourceSpan : new h7(t.sourceSpan.start, n2.sourceSpan.end, t.sourceSpan.fullStart);
    this._addToParent(new $i(i, s));
  }
  _consumeDocType(t) {
    let r = this._advanceIf(l.RAW_TEXT), n2 = this._advanceIf(l.DOC_TYPE_END), i = r != null ? r.parts[0].trim() : null, s = new h7(t.sourceSpan.start, (n2 || r || t).sourceSpan.end);
    this._addToParent(new zi(i, s));
  }
  _consumeExpansion(t) {
    let r = this._advance(), n2 = this._advance(), i = [];
    for (;this._peek.type === l.EXPANSION_CASE_VALUE; ) {
      let a = this._parseExpansionCase();
      if (!a)
        return;
      i.push(a);
    }
    if (this._peek.type !== l.EXPANSION_FORM_END) {
      this.errors.push(N2.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
      return;
    }
    let s = new h7(t.sourceSpan.start, this._peek.sourceSpan.end, t.sourceSpan.fullStart);
    this._addToParent(new Ui(r.parts[0], n2.parts[0], i, s, r.sourceSpan)), this._advance();
  }
  _parseExpansionCase() {
    let t = this._advance();
    if (this._peek.type !== l.EXPANSION_CASE_EXP_START)
      return this.errors.push(N2.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
    let r = this._advance(), n2 = this._collectExpansionExpTokens(r);
    if (!n2)
      return null;
    let i = this._advance();
    n2.push({ type: l.EOF, parts: [], sourceSpan: i.sourceSpan });
    let s = new cs(n2, this.tagDefinitionResolver, this.canSelfClose, this.allowHtmComponentClosingTags, this.isTagNameCaseSensitive);
    if (s.build(), s.errors.length > 0)
      return this.errors = this.errors.concat(s.errors), null;
    let a = new h7(t.sourceSpan.start, i.sourceSpan.end, t.sourceSpan.fullStart), o = new h7(r.sourceSpan.start, i.sourceSpan.end, r.sourceSpan.fullStart);
    return new Wi(t.parts[0], s.rootNodes, a, t.sourceSpan, o);
  }
  _collectExpansionExpTokens(t) {
    let r = [], n2 = [l.EXPANSION_CASE_EXP_START];
    for (;; ) {
      if ((this._peek.type === l.EXPANSION_FORM_START || this._peek.type === l.EXPANSION_CASE_EXP_START) && n2.push(this._peek.type), this._peek.type === l.EXPANSION_CASE_EXP_END)
        if (ss(n2, l.EXPANSION_CASE_EXP_START)) {
          if (n2.pop(), n2.length === 0)
            return r;
        } else
          return this.errors.push(N2.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
      if (this._peek.type === l.EXPANSION_FORM_END)
        if (ss(n2, l.EXPANSION_FORM_START))
          n2.pop();
        else
          return this.errors.push(N2.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
      if (this._peek.type === l.EOF)
        return this.errors.push(N2.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
      r.push(this._advance());
    }
  }
  _getText(t) {
    let r = t.parts[0];
    if (r.length > 0 && r[0] == `
`) {
      var n2;
      let i = this._getClosestElementLikeParent();
      i != null && i.children.length == 0 && (!((n2 = this._getTagDefinition(i)) === null || n2 === undefined) && n2.ignoreFirstLf) && (r = r.substring(1));
    }
    return r;
  }
  _consumeText(t) {
    let r = [t], n2 = t.sourceSpan, i = t.parts[0];
    if (i.length > 0 && i[0] === `
`) {
      var s;
      let a = this._getContainer();
      a != null && a.children.length === 0 && (!((s = this._getTagDefinition(a)) === null || s === undefined) && s.ignoreFirstLf) && (i = i.substring(1), r[0] = { type: t.type, sourceSpan: t.sourceSpan, parts: [i] });
    }
    for (;this._peek.type === l.INTERPOLATION || this._peek.type === l.TEXT || this._peek.type === l.ENCODED_ENTITY; )
      t = this._advance(), r.push(t), t.type === l.INTERPOLATION ? i += t.parts.join("").replace(/&([^;]+);/g, as) : t.type === l.ENCODED_ENTITY ? i += t.parts[0] : i += t.parts.join("");
    if (i.length > 0) {
      let a = t.sourceSpan;
      this._addToParent(new Hi(i, new h7(n2.start, a.end, n2.fullStart, n2.details), r));
    }
  }
  _closeVoidElement() {
    var t;
    let r = this._getContainer();
    r !== null && (!((t = this._getTagDefinition(r)) === null || t === undefined) && t.isVoid) && this._containerStack.pop();
  }
  _consumeElementStartTag(t) {
    var r;
    let n2 = [], i = [];
    this._consumeAttributesAndDirectives(n2, i);
    let s = this._getElementFullName(t, this._getClosestElementLikeParent()), a = this._getTagDefinition(s), o = false;
    if (this._peek.type === l.TAG_OPEN_END_VOID) {
      this._advance(), o = true;
      let E = this._getTagDefinition(s);
      this.canSelfClose || E?.canSelfClose || Me(s) !== null || E?.isVoid || this.errors.push(N2.create(s, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`));
    } else
      this._peek.type === l.TAG_OPEN_END && (this._advance(), o = false);
    let c = this._peek.sourceSpan.fullStart, u = new h7(t.sourceSpan.start, c, t.sourceSpan.fullStart), p2 = new h7(t.sourceSpan.start, c, t.sourceSpan.fullStart), d2 = new h7(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), S2 = new ie(s, n2, i, [], o, u, p2, undefined, d2, a?.isVoid ?? false), m2 = this._getContainer(), g2 = m2 !== null && !!(!((r = this._getTagDefinition(m2)) === null || r === undefined) && r.isClosedByChild(S2.name));
    this._pushContainer(S2, g2), o ? this._popContainer(s, ie, u) : t.type === l.INCOMPLETE_TAG_OPEN && (this._popContainer(s, ie, null), this.errors.push(N2.create(s, u, `Opening tag "${s}" not terminated.`)));
  }
  _consumeComponentStartTag(t) {
    var r;
    let n2 = t.parts[0], i = [], s = [];
    this._consumeAttributesAndDirectives(i, s);
    let a = this._getClosestElementLikeParent(), o = this._getComponentTagName(t, a), c = this._getComponentFullName(t, a), u = this._peek.type === l.COMPONENT_OPEN_END_VOID;
    this._advance();
    let p2 = this._peek.sourceSpan.fullStart, d2 = new h7(t.sourceSpan.start, p2, t.sourceSpan.fullStart), S2 = new h7(t.sourceSpan.start, p2, t.sourceSpan.fullStart), m2 = new J(n2, o, c, i, s, [], u, d2, S2, undefined), g2 = this._getContainer(), E = g2 !== null && m2.tagName !== null && !!(!((r = this._getTagDefinition(g2)) === null || r === undefined) && r.isClosedByChild(m2.tagName));
    this._pushContainer(m2, E), u ? this._popContainer(c, J, d2) : t.type === l.INCOMPLETE_COMPONENT_OPEN && (this._popContainer(c, J, null), this.errors.push(N2.create(c, d2, `Opening tag "${c}" not terminated.`)));
  }
  _consumeAttributesAndDirectives(t, r) {
    for (;this._peek.type === l.ATTR_NAME || this._peek.type === l.DIRECTIVE_NAME; )
      this._peek.type === l.DIRECTIVE_NAME ? r.push(this._consumeDirective(this._peek)) : t.push(this._consumeAttr(this._advance()));
  }
  _consumeComponentEndTag(t) {
    let r = this._getComponentFullName(t, this._getClosestElementLikeParent());
    if (!this._popContainer(r, J, t.sourceSpan)) {
      let n2 = this._containerStack[this._containerStack.length - 1], i;
      n2 instanceof J && n2.componentName === t.parts[0] ? i = `, did you mean "${n2.fullName}"?` : i = ". It may happen when the tag has already been closed by another tag.";
      let s = `Unexpected closing tag "${r}"${i}`;
      this.errors.push(N2.create(r, t.sourceSpan, s));
    }
  }
  _getTagDefinition(t) {
    return typeof t == "string" ? this.tagDefinitionResolver(t) : t instanceof ie ? this.tagDefinitionResolver(t.name) : t instanceof J && t.tagName !== null ? this.tagDefinitionResolver(t.tagName) : null;
  }
  _pushContainer(t, r) {
    r && this._containerStack.pop(), this._addToParent(t), this._containerStack.push(t);
  }
  _consumeElementEndTag(t) {
    var r;
    let n2 = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t, this._getClosestElementLikeParent());
    if (n2 && (!((r = this._getTagDefinition(n2)) === null || r === undefined) && r.isVoid))
      this.errors.push(N2.create(n2, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
    else if (!this._popContainer(n2, ie, t.sourceSpan)) {
      let i = `Unexpected closing tag "${n2}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
      this.errors.push(N2.create(n2, t.sourceSpan, i));
    }
  }
  _popContainer(t, r, n2) {
    let i = false;
    for (let a = this._containerStack.length - 1;a >= 0; a--) {
      var s;
      let o = this._containerStack[a], c = o instanceof J ? o.fullName : o.name;
      if (Me(c) ? c === t : (c === t || t === null) && o instanceof r)
        return o.endSourceSpan = n2, o.sourceSpan.end = n2 !== null ? n2.end : o.sourceSpan.end, this._containerStack.splice(a, this._containerStack.length - a), !i;
      (o instanceof ve || !(!((s = this._getTagDefinition(o)) === null || s === undefined) && s.closedByParent)) && (i = true);
    }
    return false;
  }
  _consumeAttr(t) {
    let r = Ee(t.parts[0], t.parts[1]), n2 = t.sourceSpan.end, i;
    this._peek.type === l.ATTR_QUOTE && (i = this._advance());
    let s = "", a = [], o, c;
    if (this._peek.type === l.ATTR_VALUE_TEXT)
      for (o = this._peek.sourceSpan, c = this._peek.sourceSpan.end;this._peek.type === l.ATTR_VALUE_TEXT || this._peek.type === l.ATTR_VALUE_INTERPOLATION || this._peek.type === l.ENCODED_ENTITY; ) {
        let p2 = this._advance();
        a.push(p2), p2.type === l.ATTR_VALUE_INTERPOLATION ? s += p2.parts.join("").replace(/&([^;]+);/g, as) : p2.type === l.ENCODED_ENTITY ? s += p2.parts[0] : s += p2.parts.join(""), c = n2 = p2.sourceSpan.end;
      }
    this._peek.type === l.ATTR_QUOTE && (c = n2 = this._advance().sourceSpan.end);
    let u = o && c && new h7(i?.sourceSpan.start ?? o.start, c, i?.sourceSpan.fullStart ?? o.fullStart);
    return new Gi(r, s, new h7(t.sourceSpan.start, n2, t.sourceSpan.fullStart), t.sourceSpan, u, a.length > 0 ? a : undefined, undefined);
  }
  _consumeDirective(t) {
    let r = [], n2 = t.sourceSpan.end, i = null;
    if (this._advance(), this._peek.type === l.DIRECTIVE_OPEN) {
      for (n2 = this._peek.sourceSpan.end, this._advance();this._peek.type === l.ATTR_NAME; )
        r.push(this._consumeAttr(this._advance()));
      this._peek.type === l.DIRECTIVE_CLOSE ? (i = this._peek.sourceSpan, this._advance()) : this.errors.push(N2.create(null, t.sourceSpan, "Unterminated directive definition"));
    }
    let s = new h7(t.sourceSpan.start, n2, t.sourceSpan.fullStart), a = new h7(s.start, i === null ? t.sourceSpan.end : i.end, s.fullStart);
    return new Yi(t.parts[0], r, a, s, i);
  }
  _consumeBlockOpen(t) {
    let r = [];
    for (;this._peek.type === l.BLOCK_PARAMETER; ) {
      let o = this._advance();
      r.push(new Nr(o.parts[0], o.sourceSpan));
    }
    this._peek.type === l.BLOCK_OPEN_END && this._advance();
    let n2 = this._peek.sourceSpan.fullStart, i = new h7(t.sourceSpan.start, n2, t.sourceSpan.fullStart), s = new h7(t.sourceSpan.start, n2, t.sourceSpan.fullStart), a = new ve(t.parts[0], r, [], i, t.sourceSpan, s);
    this._pushContainer(a, false);
  }
  _consumeBlockClose(t) {
    this._popContainer(null, ve, t.sourceSpan) || this.errors.push(N2.create(null, t.sourceSpan, 'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "&#125;" HTML entity instead.'));
  }
  _consumeIncompleteBlock(t) {
    let r = [];
    for (;this._peek.type === l.BLOCK_PARAMETER; ) {
      let o = this._advance();
      r.push(new Nr(o.parts[0], o.sourceSpan));
    }
    let n2 = this._peek.sourceSpan.fullStart, i = new h7(t.sourceSpan.start, n2, t.sourceSpan.fullStart), s = new h7(t.sourceSpan.start, n2, t.sourceSpan.fullStart), a = new ve(t.parts[0], r, [], i, t.sourceSpan, s);
    this._pushContainer(a, false), this._popContainer(null, ve, null), this.errors.push(N2.create(t.parts[0], i, `Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "&#64;" HTML entity instead.`));
  }
  _consumeLet(t) {
    let r = t.parts[0], n2, i;
    if (this._peek.type !== l.LET_VALUE) {
      this.errors.push(N2.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${r}". Declaration must have a value.`));
      return;
    } else
      n2 = this._advance();
    if (this._peek.type !== l.LET_END) {
      this.errors.push(N2.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));
      return;
    } else
      i = this._advance();
    let s = i.sourceSpan.fullStart, a = new h7(t.sourceSpan.start, s, t.sourceSpan.fullStart), o = t.sourceSpan.toString().lastIndexOf(r), c = new h7(t.sourceSpan.start.moveBy(o), t.sourceSpan.end), u = new Lr(r, n2.parts[0], a, c, n2.sourceSpan);
    this._addToParent(u);
  }
  _consumeIncompleteLet(t) {
    let r = t.parts[0] ?? "", n2 = r ? ` "${r}"` : "";
    if (r.length > 0) {
      let i = t.sourceSpan.toString().lastIndexOf(r), s = new h7(t.sourceSpan.start.moveBy(i), t.sourceSpan.end), a = new h7(t.sourceSpan.start, t.sourceSpan.start.moveBy(0)), o = new Lr(r, "", t.sourceSpan, s, a);
      this._addToParent(o);
    }
    this.errors.push(N2.create(t.parts[0], t.sourceSpan, `Incomplete @let declaration${n2}. @let declarations must be written as \`@let <name> = <value>;\``));
  }
  _getContainer() {
    return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
  }
  _getClosestElementLikeParent() {
    for (let t = this._containerStack.length - 1;t > -1; t--) {
      let r = this._containerStack[t];
      if (r instanceof ie || r instanceof J)
        return r;
    }
    return null;
  }
  _addToParent(t) {
    let r = this._getContainer();
    r === null ? this.rootNodes.push(t) : r.children.push(t);
  }
  _getElementFullName(t, r) {
    return Ee(this._getPrefix(t, r), t.parts[1]);
  }
  _getComponentFullName(t, r) {
    let n2 = t.parts[0], i = this._getComponentTagName(t, r);
    return i === null ? n2 : i.startsWith(":") ? n2 + i : `${n2}:${i}`;
  }
  _getComponentTagName(t, r) {
    let n2 = this._getPrefix(t, r), i = t.parts[2];
    return !n2 && !i ? null : !n2 && i ? i : Ee(n2, i || "ng-component");
  }
  _getPrefix(t, r) {
    var n2;
    let i, s;
    if (t.type === l.COMPONENT_OPEN_START || t.type === l.INCOMPLETE_COMPONENT_OPEN || t.type === l.COMPONENT_CLOSE ? (i = t.parts[1], s = t.parts[2]) : (i = t.parts[0], s = t.parts[1]), i = i || ((n2 = this._getTagDefinition(s)) === null || n2 === undefined ? undefined : n2.implicitNamespacePrefix) || "", !i && r) {
      let a = r instanceof ie ? r.name : r.tagName;
      if (a !== null) {
        let o = at(a)[1], c = this._getTagDefinition(o);
        c !== null && !c.preventNamespaceInheritance && (i = Me(a));
      }
    }
    return i;
  }
}, us, Ur = null, $o = () => (Ur || (Ur = new us), Ur), zo, ps, al, hs, ms, Wr, fs2 = "HTML", ol, ds, Qr, gs, cl, Zt, _s, er, Ss, oe, $r, zr, We = class We2 {
  constructor(t = {}) {
    tn(this, oe);
    ir(this, "kind");
    ir(this, "parent");
    for (let r of new Set([...Ss, ...Object.keys(t)]))
      this.setProperty(r, t[r]);
    if (ce(t))
      for (let r of Object.getOwnPropertySymbols(t))
        this.setProperty(r, t[r]);
  }
  setProperty(t, r) {
    if (this[t] !== r) {
      if (t in er && (r = r.map((n2) => this.createChild(n2))), !Ss.has(t)) {
        this[t] = r;
        return;
      }
      Object.defineProperty(this, t, { value: r, enumerable: false, configurable: true });
    }
  }
  map(t) {
    let r;
    for (let n2 in er) {
      let i = this[n2];
      if (i) {
        let s = ul(i, (a) => a.map(t));
        r !== i && (r || (r = new We2({ parent: this.parent })), r.setProperty(n2, s));
      }
    }
    if (r)
      for (let n2 in this)
        n2 in er || (r[n2] = this[n2]);
    return t(r || this);
  }
  walk(t) {
    for (let r in er) {
      let n2 = this[r];
      if (n2)
        for (let i = 0;i < n2.length; i++)
          n2[i].walk(t);
    }
    t(this);
  }
  createChild(t) {
    let r = t instanceof We2 ? t.clone() : new We2(t);
    return r.setProperty("parent", this), r;
  }
  insertChildBefore(t, r) {
    let n2 = this.$children;
    n2.splice(n2.indexOf(t), 0, this.createChild(r));
  }
  removeChild(t) {
    let r = this.$children;
    r.splice(r.indexOf(t), 1);
  }
  replaceChild(t, r) {
    let n2 = this.$children;
    n2[n2.indexOf(t)] = this.createChild(r);
  }
  clone() {
    return new We2(this);
  }
  get $children() {
    return this[$e(this, oe, $r)];
  }
  set $children(t) {
    this[$e(this, oe, $r)] = t;
  }
  get firstChild() {
    return this.$children?.[0];
  }
  get lastChild() {
    return F(1, this.$children, -1);
  }
  get prev() {
    let t = $e(this, oe, zr);
    return t[t.indexOf(this) - 1];
  }
  get next() {
    let t = $e(this, oe, zr);
    return t[t.indexOf(this) + 1];
  }
  get rawName() {
    return this.hasExplicitNamespace ? this.fullName : this.name;
  }
  get fullName() {
    return this.namespace ? this.namespace + ":" + this.name : this.name;
  }
  get attrMap() {
    return Object.fromEntries(this.attrs.map((t) => [t.fullName, t.value]));
  }
}, tr, pl, Yr, rr, wl, kl, xl, Al, yl, Nl, Ll;
var init_html = __esm(() => {
  Jr = Object.defineProperty;
  ws = {};
  en(ws, { languages: () => ms, options: () => ds, parsers: () => Qr, printers: () => Ll });
  As = String.prototype.replaceAll ?? function(e, t) {
    return e.global ? this.replace(e, t) : this.split(e).join(t);
  };
  ys = xe("replaceAll", function() {
    if (typeof this == "string")
      return As;
  });
  w = ys;
  Ls = xe("at", function() {
    if (Array.isArray(this) || typeof this == "string")
      return Ns;
  });
  F = Ls;
  ze = Ps;
  bt = new Set([St, Ae, ye, Et, Ne, Le, Pe, Oe, Ct, vt, Y, Tt, De]);
  wt = Os;
  sr = class extends Error {
    name = "InvalidDocError";
    constructor(t) {
      super(Is(t)), this.doc = t;
    }
  };
  rn = sr;
  D2 = ze;
  kt = ze;
  sn = ze;
  an = ze;
  j = { type: De };
  _2 = { type: Y };
  k2 = { type: Y, soft: true };
  Ms = { type: Y, hard: true };
  v2 = [Ms, j];
  Bs = { type: Y, hard: true, literal: true };
  nn = [Bs, j];
  cn = Object.freeze({ character: "'", codePoint: 39 });
  un = Object.freeze({ character: '"', codePoint: 34 });
  Fs = Object.freeze({ preferred: cn, alternate: un });
  qs = Object.freeze({ preferred: un, alternate: cn });
  pn = Hs;
  hn = lr;
  Vs = ["\t", `
`, "\f", "\r", " "];
  Us = new hn(Vs);
  y2 = Us;
  cr = class extends Error {
    name = "UnexpectedNodeError";
    constructor(t, r, n2 = "type") {
      super(`Unexpected ${r} node ${n2}: ${JSON.stringify(t[n2])}.`), this.node = t;
    }
  };
  mn = cr;
  Ws = new Set(["sourceSpan", "startSourceSpan", "endSourceSpan", "nameSpan", "valueSpan", "keySpan", "tagDefinition", "tokens", "valueTokens", "switchValueSourceSpan", "expSourceSpan", "valueSourceSpan"]);
  Gs = new Set(["if", "else if", "for", "switch", "case"]);
  fn.ignoredProperties = Ws;
  dn = fn;
  gn = $s;
  zs = Array.prototype.toReversed ?? function() {
    return [...this].reverse();
  };
  Ys = xe("toReversed", function() {
    if (Array.isArray(this))
      return zs;
  });
  _n = Ys;
  Xs = js();
  Ie = Js;
  At = ta;
  yt = Symbol.for("PRETTIER_IS_FRONT_MATTER");
  ce = ra;
  pr = ia;
  hr2 = { area: "none", base: "none", basefont: "none", datalist: "none", head: "none", link: "none", meta: "none", noembed: "none", noframes: "none", param: "block", rp: "none", script: "block", style: "none", template: "inline", title: "none", html: "block", body: "block", address: "block", blockquote: "block", center: "block", dialog: "block", div: "block", figure: "block", figcaption: "block", footer: "block", form: "block", header: "block", hr: "block", legend: "block", listing: "block", main: "block", p: "block", plaintext: "block", pre: "block", search: "block", xmp: "block", slot: "contents", ruby: "ruby", rt: "ruby-text", article: "block", aside: "block", h1: "block", h2: "block", h3: "block", h4: "block", h5: "block", h6: "block", hgroup: "block", nav: "block", section: "block", dir: "block", dd: "block", dl: "block", dt: "block", menu: "block", ol: "block", ul: "block", li: "list-item", table: "table", caption: "table-caption", colgroup: "table-column-group", col: "table-column", thead: "table-header-group", tbody: "table-row-group", tfoot: "table-footer-group", tr: "table-row", td: "table-cell", th: "table-cell", input: "inline-block", button: "inline-block", fieldset: "block", details: "block", summary: "block", marquee: "inline-block", select: "inline-block", source: "block", track: "block", meter: "inline-block", progress: "inline-block", object: "inline-block", video: "inline-block", audio: "inline-block", option: "block", optgroup: "block" };
  mr = { listing: "pre", plaintext: "pre", pre: "pre", xmp: "pre", nobr: "nowrap", table: "initial", textarea: "pre-wrap" };
  ue = sa;
  Ea = new Set(["template", "style", "script"]);
  Vn = /\{\{(.+?)\}\}/su;
  va = [{ test(e) {
    let t = e.node.fullName;
    return t.startsWith("(") && t.endsWith(")") || t.startsWith("on-");
  }, print: Er("__ng_action") }, { test(e) {
    let t = e.node.fullName;
    return t.startsWith("[") && t.endsWith("]") || /^bind(?:on)?-/u.test(t) || /^ng-(?:if|show|hide|class|style)$/u.test(t);
  }, print: Er("__ng_binding") }, { test: (e) => e.node.fullName.startsWith("*"), print: Er("__ng_directive") }, { test: (e) => /^i18n(?:-.+)?$/u.test(e.node.fullName), print: Ta }, { test: Un, print: Wn }].map(({ test: e, print: t }) => ({ test: (r, n2) => n2.parser === "angular" && e(r), print: t }));
  Gn = va;
  Cr = ["onabort", "onafterprint", "onauxclick", "onbeforeinput", "onbeforematch", "onbeforeprint", "onbeforetoggle", "onbeforeunload", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncommand", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncopy", "oncuechange", "oncut", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onoffline", "ononline", "onpagehide", "onpagereveal", "onpageshow", "onpageswap", "onpaste", "onpause", "onplay", "onplaying", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onscrollend", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwheel"];
  wa = new Set(Cr);
  Xn = ka;
  xa = /^[ \t\n\r\u000c]+/;
  Aa = /^[, \t\n\r\u000c]+/;
  ya = /^[^ \t\n\r\u000c]+/;
  Na = /[,]+$/;
  Zn = /^\d+$/;
  La = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;
  ei = Pa;
  ri = { width: "w", height: "h", density: "x" };
  Oa = Object.keys(ri);
  vr = new WeakMap;
  G = Da;
  Ra = [{ test: (e) => e.node.fullName === "v-for", print: li }, { test: (e, t) => e.node.fullName === "generic" && It(e.parent, t), print: ai }, { test: ({ node: e }, t) => qn(e) || Hn(e, t), print: oi }, { test(e) {
    let t = e.node.fullName;
    return t.startsWith("@") || t.startsWith("v-on:");
  }, print: Ma }, { test(e) {
    let t = e.node.fullName;
    return t.startsWith(":") || t.startsWith(".") || t.startsWith("v-bind:");
  }, print: Ba }, { test: (e) => e.node.fullName.startsWith("v-"), print: ci }].map(({ test: e, print: t }) => ({ test: (r, n2) => n2.parser === "vue" && e(r, n2), print: t }));
  ui = Ra;
  Fa = [{ test: ti, print: ni }, { test: ii, print: si }, { test: Yn, print: jn }, { test: $n, print: zn }, { test: Kn, print: Qn }, ...ui, ...Gn].map(({ test: e, print: t }) => ({ test: e, print: Ha(t) }));
  pi = qa;
  qt = za;
  Ya = new Set(["if", "else if", "for", "switch", "case"]);
  fi = ja;
  for (let e = 0;e <= Xa; e++)
    it();
  di = Ka;
  I = [["children"], []];
  gi = { root: I[0], element: ["attrs", "children"], ieConditionalComment: I[0], ieConditionalStartComment: I[1], ieConditionalEndComment: I[1], interpolation: I[0], text: I[0], docType: I[1], comment: I[1], attribute: I[1], cdata: I[1], angularControlFlowBlock: ["children", "parameters"], angularControlFlowBlockParameters: I[0], angularControlFlowBlockParameter: I[1], angularLetDeclaration: ["init"], angularLetDeclarationInitializer: I[1], angularIcuExpression: ["cases"], angularIcuCase: ["expression"] };
  Qa = di(gi, "kind");
  _i = Qa;
  Ei = /^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u;
  Ci = /^\s*<!--\s*@(?:format|prettier)\s*-->/u;
  wi = new Map([["if", new Set(["else if", "else"])], ["else if", new Set(["else if", "else"])], ["for", new Set(["empty"])], ["defer", new Set(["placeholder", "error", "loading"])], ["placeholder", new Set(["placeholder", "error", "loading"])], ["error", new Set(["placeholder", "error", "loading"])], ["loading", new Set(["placeholder", "error", "loading"])]]);
  R2 = function(e) {
    return e[e.RAW_TEXT = 0] = "RAW_TEXT", e[e.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", e[e.PARSABLE_DATA = 2] = "PARSABLE_DATA", e;
  }({});
  kr = { name: "custom-elements" };
  xr = { name: "no-errors-schema" };
  re = function(e) {
    return e[e.NONE = 0] = "NONE", e[e.HTML = 1] = "HTML", e[e.STYLE = 2] = "STYLE", e[e.SCRIPT = 3] = "SCRIPT", e[e.URL = 4] = "URL", e[e.RESOURCE_URL = 5] = "RESOURCE_URL", e[e.ATTRIBUTE_NO_BINDING = 6] = "ATTRIBUTE_NO_BINDING", e;
  }({});
  to = /-+([a-z0-9])/g;
  ao = ["[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored", "[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", ":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":svg:graphics^:svg:|", ":svg:animation^:svg:|*begin,*end,*repeat", ":svg:geometry^:svg:|", ":svg:componentTransferFunction^:svg:|", ":svg:gradient^:svg:|", ":svg:textContent^:svg:graphics|", ":svg:textPositioning^:svg:textContent|", "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", "audio^media|", "br^[HTMLElement]|clear", "base^[HTMLElement]|href,target", "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", "canvas^[HTMLElement]|#height,#width", "content^[HTMLElement]|select", "dl^[HTMLElement]|!compact", "data^[HTMLElement]|value", "datalist^[HTMLElement]|", "details^[HTMLElement]|!open", "dialog^[HTMLElement]|!open,returnValue", "dir^[HTMLElement]|!compact", "div^[HTMLElement]|align", "embed^[HTMLElement]|align,height,name,src,type,width", "fieldset^[HTMLElement]|!disabled,name", "font^[HTMLElement]|color,face,size", "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", "hr^[HTMLElement]|align,color,!noShade,size,width", "head^[HTMLElement]|", "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", "html^[HTMLElement]|version", "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", "input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width", "li^[HTMLElement]|type,#value", "label^[HTMLElement]|htmlFor", "legend^[HTMLElement]|align", "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", "map^[HTMLElement]|name", "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", "menu^[HTMLElement]|!compact", "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", "ins,del^[HTMLElement]|cite,dateTime", "ol^[HTMLElement]|!compact,!reversed,#start,type", "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", "optgroup^[HTMLElement]|!disabled,label", "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", "output^[HTMLElement]|defaultValue,%htmlFor,name,value", "p^[HTMLElement]|align", "param^[HTMLElement]|name,type,value,valueType", "picture^[HTMLElement]|", "pre^[HTMLElement]|#width", "progress^[HTMLElement]|#max,#value", "q,blockquote,cite^[HTMLElement]|", "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", "selectedcontent^[HTMLElement]|", "slot^[HTMLElement]|name", "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", "span^[HTMLElement]|", "style^[HTMLElement]|!disabled,media,type", "search^[HTMLELement]|", "caption^[HTMLElement]|align", "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", "template^[HTMLElement]|", "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", "time^[HTMLElement]|dateTime", "title^[HTMLElement]|text", "track^[HTMLElement]|!default,kind,label,src,srclang", "ul^[HTMLElement]|!compact,type", "unknown^[HTMLElement]|", "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", ":svg:a^:svg:graphics|", ":svg:animate^:svg:animation|", ":svg:animateMotion^:svg:animation|", ":svg:animateTransform^:svg:animation|", ":svg:circle^:svg:geometry|", ":svg:clipPath^:svg:graphics|", ":svg:defs^:svg:graphics|", ":svg:desc^:svg:|", ":svg:discard^:svg:|", ":svg:ellipse^:svg:geometry|", ":svg:feBlend^:svg:|", ":svg:feColorMatrix^:svg:|", ":svg:feComponentTransfer^:svg:|", ":svg:feComposite^:svg:|", ":svg:feConvolveMatrix^:svg:|", ":svg:feDiffuseLighting^:svg:|", ":svg:feDisplacementMap^:svg:|", ":svg:feDistantLight^:svg:|", ":svg:feDropShadow^:svg:|", ":svg:feFlood^:svg:|", ":svg:feFuncA^:svg:componentTransferFunction|", ":svg:feFuncB^:svg:componentTransferFunction|", ":svg:feFuncG^:svg:componentTransferFunction|", ":svg:feFuncR^:svg:componentTransferFunction|", ":svg:feGaussianBlur^:svg:|", ":svg:feImage^:svg:|", ":svg:feMerge^:svg:|", ":svg:feMergeNode^:svg:|", ":svg:feMorphology^:svg:|", ":svg:feOffset^:svg:|", ":svg:fePointLight^:svg:|", ":svg:feSpecularLighting^:svg:|", ":svg:feSpotLight^:svg:|", ":svg:feTile^:svg:|", ":svg:feTurbulence^:svg:|", ":svg:filter^:svg:|", ":svg:foreignObject^:svg:graphics|", ":svg:g^:svg:graphics|", ":svg:image^:svg:graphics|decoding", ":svg:line^:svg:geometry|", ":svg:linearGradient^:svg:gradient|", ":svg:mpath^:svg:|", ":svg:marker^:svg:|", ":svg:mask^:svg:|", ":svg:metadata^:svg:|", ":svg:path^:svg:geometry|", ":svg:pattern^:svg:|", ":svg:polygon^:svg:geometry|", ":svg:polyline^:svg:geometry|", ":svg:radialGradient^:svg:gradient|", ":svg:rect^:svg:geometry|", ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", ":svg:script^:svg:|type", ":svg:set^:svg:animation|", ":svg:stop^:svg:|", ":svg:style^:svg:|!disabled,media,title,type", ":svg:switch^:svg:graphics|", ":svg:symbol^:svg:|", ":svg:tspan^:svg:textPositioning|", ":svg:text^:svg:textPositioning|", ":svg:textPath^:svg:textContent|", ":svg:title^:svg:|", ":svg:use^:svg:graphics|", ":svg:view^:svg:|#zoomAndPan", "data^[HTMLElement]|value", "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", "summary^[HTMLElement]|", "time^[HTMLElement]|dateTime", ":svg:cursor^:svg:|", ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":math:math^:math:|", ":math:maction^:math:|", ":math:menclose^:math:|", ":math:merror^:math:|", ":math:mfenced^:math:|", ":math:mfrac^:math:|", ":math:mi^:math:|", ":math:mmultiscripts^:math:|", ":math:mn^:math:|", ":math:mo^:math:|", ":math:mover^:math:|", ":math:mpadded^:math:|", ":math:mphantom^:math:|", ":math:mroot^:math:|", ":math:mrow^:math:|", ":math:ms^:math:|", ":math:mspace^:math:|", ":math:msqrt^:math:|", ":math:mstyle^:math:|", ":math:msub^:math:|", ":math:msubsup^:math:|", ":math:msup^:math:|", ":math:mtable^:math:|", ":math:mtd^:math:|", ":math:mtext^:math:|", ":math:mtr^:math:|", ":math:munder^:math:|", ":math:munderover^:math:|", ":math:semantics^:math:|"];
  Ii = new Map(Object.entries({ class: "className", for: "htmlFor", formaction: "formAction", innerHtml: "innerHTML", readonly: "readOnly", tabindex: "tabIndex", "aria-activedescendant": "ariaActiveDescendantElement", "aria-atomic": "ariaAtomic", "aria-autocomplete": "ariaAutoComplete", "aria-busy": "ariaBusy", "aria-checked": "ariaChecked", "aria-colcount": "ariaColCount", "aria-colindex": "ariaColIndex", "aria-colindextext": "ariaColIndexText", "aria-colspan": "ariaColSpan", "aria-controls": "ariaControlsElements", "aria-current": "ariaCurrent", "aria-describedby": "ariaDescribedByElements", "aria-description": "ariaDescription", "aria-details": "ariaDetailsElements", "aria-disabled": "ariaDisabled", "aria-errormessage": "ariaErrorMessageElements", "aria-expanded": "ariaExpanded", "aria-flowto": "ariaFlowToElements", "aria-haspopup": "ariaHasPopup", "aria-hidden": "ariaHidden", "aria-invalid": "ariaInvalid", "aria-keyshortcuts": "ariaKeyShortcuts", "aria-label": "ariaLabel", "aria-labelledby": "ariaLabelledByElements", "aria-level": "ariaLevel", "aria-live": "ariaLive", "aria-modal": "ariaModal", "aria-multiline": "ariaMultiLine", "aria-multiselectable": "ariaMultiSelectable", "aria-orientation": "ariaOrientation", "aria-owns": "ariaOwnsElements", "aria-placeholder": "ariaPlaceholder", "aria-posinset": "ariaPosInSet", "aria-pressed": "ariaPressed", "aria-readonly": "ariaReadOnly", "aria-required": "ariaRequired", "aria-roledescription": "ariaRoleDescription", "aria-rowcount": "ariaRowCount", "aria-rowindex": "ariaRowIndex", "aria-rowindextext": "ariaRowIndexText", "aria-rowspan": "ariaRowSpan", "aria-selected": "ariaSelected", "aria-setsize": "ariaSetSize", "aria-sort": "ariaSort", "aria-valuemax": "ariaValueMax", "aria-valuemin": "ariaValueMin", "aria-valuenow": "ariaValueNow", "aria-valuetext": "ariaValueText" }));
  oo = Array.from(Ii).reduce((e, [t, r]) => (e.set(t, r), e), new Map);
  Ri = class extends Di {
    constructor() {
      super(), this._schema = new Map, this._eventSchema = new Map, ao.forEach((e) => {
        let t = new Map, r = new Set, [n2, i] = e.split("|"), s = i.split(","), [a, o] = n2.split("^");
        a.split(",").forEach((u) => {
          this._schema.set(u.toLowerCase(), t), this._eventSchema.set(u.toLowerCase(), r);
        });
        let c = o && this._schema.get(o.toLowerCase());
        if (c) {
          for (let [u, p2] of c)
            t.set(u, p2);
          for (let u of this._eventSchema.get(o.toLowerCase()))
            r.add(u);
        }
        s.forEach((u) => {
          if (u.length > 0)
            switch (u[0]) {
              case "*":
                r.add(u.substring(1));
                break;
              case "!":
                t.set(u.substring(1), ro);
                break;
              case "#":
                t.set(u.substring(1), no);
                break;
              case "%":
                t.set(u.substring(1), so);
                break;
              default:
                t.set(u, io);
            }
        });
      });
    }
    hasProperty(e, t, r) {
      if (r.some((n2) => n2.name === xr.name))
        return true;
      if (e.indexOf("-") > -1) {
        if (br2(e) || wr(e))
          return false;
        if (r.some((n2) => n2.name === kr.name))
          return true;
      }
      return (this._schema.get(e.toLowerCase()) || this._schema.get("unknown")).has(t);
    }
    hasElement(e, t) {
      return t.some((r) => r.name === xr.name) || e.indexOf("-") > -1 && (br2(e) || wr(e) || t.some((r) => r.name === kr.name)) ? true : this._schema.has(e.toLowerCase());
    }
    securityContext(e, t, r) {
      r && (t = this.getMappedPropName(t)), e = e.toLowerCase(), t = t.toLowerCase();
      let n2 = Ar()[e + "|" + t];
      return n2 || (n2 = Ar()["*|" + t], n2 || re.NONE);
    }
    getMappedPropName(e) {
      return Ii.get(e) ?? e;
    }
    getDefaultComponentElementName() {
      return "ng-component";
    }
    validateProperty(e) {
      return e.toLowerCase().startsWith("on") ? { error: true, msg: `Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...
If '${e}' is a directive input, make sure the directive is imported by the current module.` } : { error: false };
    }
    validateAttribute(e) {
      return e.toLowerCase().startsWith("on") ? { error: true, msg: `Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...` } : { error: false };
    }
    allKnownElementNames() {
      return Array.from(this._schema.keys());
    }
    allKnownAttributesOfElement(e) {
      let t = this._schema.get(e.toLowerCase()) || this._schema.get("unknown");
      return Array.from(t.keys()).map((r) => oo.get(r) ?? r);
    }
    allKnownEventsOfElement(e) {
      return Array.from(this._eventSchema.get(e.toLowerCase()) ?? []);
    }
    normalizeAnimationStyleProperty(e) {
      return Oi(e);
    }
    normalizeAnimationStyleValue(e, t, r) {
      let n2 = "", i = r.toString().trim(), s = null;
      if (lo(e) && r !== 0 && r !== "0")
        if (typeof r == "number")
          n2 = "px";
        else {
          let a = r.match(/^[+-]?[\d\.]+([a-z]*)$/);
          a && a[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`);
        }
      return { error: s, value: i + n2 };
    }
  };
  Fi = function(e) {
    return e[e.WARNING = 0] = "WARNING", e[e.ERROR = 1] = "ERROR", e;
  }({});
  ne2 = class extends Error {
    constructor(e, t, r = Fi.ERROR, n2) {
      super(t), this.span = e, this.msg = t, this.level = r, this.relatedError = n2, Object.setPrototypeOf(this, new.target.prototype);
    }
    contextualMessage() {
      let e = this.span.start.getContext(100, 3);
      return e ? `${this.msg} ("${e.before}[${Fi[this.level]} ->]${e.after}")` : this.msg;
    }
    toString() {
      let e = this.span.details ? `, ${this.span.details}` : "";
      return `${this.contextualMessage()}: ${this.span.start}${e}`;
    }
  };
  Hi = class extends Ce {
    constructor(e, t, r, n2) {
      super(t, n2), this.value = e, this.tokens = r, this.kind = "text";
    }
    visit(e, t) {
      return e.visitText(this, t);
    }
  };
  Vi = class extends Ce {
    constructor(e, t, r, n2) {
      super(t, n2), this.value = e, this.tokens = r, this.kind = "cdata";
    }
    visit(e, t) {
      return e.visitCdata(this, t);
    }
  };
  Ui = class extends Ce {
    constructor(e, t, r, n2, i, s) {
      super(n2, s), this.switchValue = e, this.type = t, this.cases = r, this.switchValueSourceSpan = i, this.kind = "expansion";
    }
    visit(e, t) {
      return e.visitExpansion(this, t);
    }
  };
  Gi = class extends Ce {
    constructor(e, t, r, n2, i, s, a) {
      super(r, a), this.name = e, this.value = t, this.keySpan = n2, this.valueSpan = i, this.valueTokens = s, this.kind = "attribute";
    }
    visit(e, t) {
      return e.visitAttribute(this, t);
    }
    get nameSpan() {
      return this.keySpan;
    }
  };
  ie = class extends Ce {
    constructor(e, t, r, n2, i, s, a, o = null, c = null, u, p2) {
      super(s, p2), this.name = e, this.attrs = t, this.directives = r, this.children = n2, this.isSelfClosing = i, this.startSourceSpan = a, this.endSourceSpan = o, this.nameSpan = c, this.isVoid = u, this.kind = "element";
    }
    visit(e, t) {
      return e.visitElement(this, t);
    }
  };
  ve = class extends Ce {
    constructor(e, t, r, n2, i, s, a = null, o) {
      super(n2, o), this.name = e, this.parameters = t, this.children = r, this.nameSpan = i, this.startSourceSpan = s, this.endSourceSpan = a, this.kind = "block";
    }
    visit(e, t) {
      return e.visitBlock(this, t);
    }
  };
  J = class extends Ce {
    constructor(e, t, r, n2, i, s, a, o, c, u = null, p2) {
      super(o, p2), this.componentName = e, this.tagName = t, this.fullName = r, this.attrs = n2, this.directives = i, this.children = s, this.isSelfClosing = a, this.startSourceSpan = c, this.endSourceSpan = u, this.kind = "component";
    }
    visit(e, t) {
      return e.visitComponent(this, t);
    }
  };
  Te = { AElig: "Æ", AMP: "&", amp: "&", Aacute: "Á", Abreve: "Ă", Acirc: "Â", Acy: "А", Afr: "\uD835\uDD04", Agrave: "À", Alpha: "Α", Amacr: "Ā", And: "⩓", Aogon: "Ą", Aopf: "\uD835\uDD38", ApplyFunction: "⁡", af: "⁡", Aring: "Å", angst: "Å", Ascr: "\uD835\uDC9C", Assign: "≔", colone: "≔", coloneq: "≔", Atilde: "Ã", Auml: "Ä", Backslash: "∖", setminus: "∖", setmn: "∖", smallsetminus: "∖", ssetmn: "∖", Barv: "⫧", Barwed: "⌆", doublebarwedge: "⌆", Bcy: "Б", Because: "∵", becaus: "∵", because: "∵", Bernoullis: "ℬ", Bscr: "ℬ", bernou: "ℬ", Beta: "Β", Bfr: "\uD835\uDD05", Bopf: "\uD835\uDD39", Breve: "˘", breve: "˘", Bumpeq: "≎", HumpDownHump: "≎", bump: "≎", CHcy: "Ч", COPY: "©", copy: "©", Cacute: "Ć", Cap: "⋒", CapitalDifferentialD: "ⅅ", DD: "ⅅ", Cayleys: "ℭ", Cfr: "ℭ", Ccaron: "Č", Ccedil: "Ç", Ccirc: "Ĉ", Cconint: "∰", Cdot: "Ċ", Cedilla: "¸", cedil: "¸", CenterDot: "·", centerdot: "·", middot: "·", Chi: "Χ", CircleDot: "⊙", odot: "⊙", CircleMinus: "⊖", ominus: "⊖", CirclePlus: "⊕", oplus: "⊕", CircleTimes: "⊗", otimes: "⊗", ClockwiseContourIntegral: "∲", cwconint: "∲", CloseCurlyDoubleQuote: "”", rdquo: "”", rdquor: "”", CloseCurlyQuote: "’", rsquo: "’", rsquor: "’", Colon: "∷", Proportion: "∷", Colone: "⩴", Congruent: "≡", equiv: "≡", Conint: "∯", DoubleContourIntegral: "∯", ContourIntegral: "∮", conint: "∮", oint: "∮", Copf: "ℂ", complexes: "ℂ", Coproduct: "∐", coprod: "∐", CounterClockwiseContourIntegral: "∳", awconint: "∳", Cross: "⨯", Cscr: "\uD835\uDC9E", Cup: "⋓", CupCap: "≍", asympeq: "≍", DDotrahd: "⤑", DJcy: "Ђ", DScy: "Ѕ", DZcy: "Џ", Dagger: "‡", ddagger: "‡", Darr: "↡", Dashv: "⫤", DoubleLeftTee: "⫤", Dcaron: "Ď", Dcy: "Д", Del: "∇", nabla: "∇", Delta: "Δ", Dfr: "\uD835\uDD07", DiacriticalAcute: "´", acute: "´", DiacriticalDot: "˙", dot: "˙", DiacriticalDoubleAcute: "˝", dblac: "˝", DiacriticalGrave: "`", grave: "`", DiacriticalTilde: "˜", tilde: "˜", Diamond: "⋄", diam: "⋄", diamond: "⋄", DifferentialD: "ⅆ", dd: "ⅆ", Dopf: "\uD835\uDD3B", Dot: "¨", DoubleDot: "¨", die: "¨", uml: "¨", DotDot: "⃜", DotEqual: "≐", doteq: "≐", esdot: "≐", DoubleDownArrow: "⇓", Downarrow: "⇓", dArr: "⇓", DoubleLeftArrow: "⇐", Leftarrow: "⇐", lArr: "⇐", DoubleLeftRightArrow: "⇔", Leftrightarrow: "⇔", hArr: "⇔", iff: "⇔", DoubleLongLeftArrow: "⟸", Longleftarrow: "⟸", xlArr: "⟸", DoubleLongLeftRightArrow: "⟺", Longleftrightarrow: "⟺", xhArr: "⟺", DoubleLongRightArrow: "⟹", Longrightarrow: "⟹", xrArr: "⟹", DoubleRightArrow: "⇒", Implies: "⇒", Rightarrow: "⇒", rArr: "⇒", DoubleRightTee: "⊨", vDash: "⊨", DoubleUpArrow: "⇑", Uparrow: "⇑", uArr: "⇑", DoubleUpDownArrow: "⇕", Updownarrow: "⇕", vArr: "⇕", DoubleVerticalBar: "∥", par: "∥", parallel: "∥", shortparallel: "∥", spar: "∥", DownArrow: "↓", ShortDownArrow: "↓", darr: "↓", downarrow: "↓", DownArrowBar: "⤓", DownArrowUpArrow: "⇵", duarr: "⇵", DownBreve: "̑", DownLeftRightVector: "⥐", DownLeftTeeVector: "⥞", DownLeftVector: "↽", leftharpoondown: "↽", lhard: "↽", DownLeftVectorBar: "⥖", DownRightTeeVector: "⥟", DownRightVector: "⇁", rhard: "⇁", rightharpoondown: "⇁", DownRightVectorBar: "⥗", DownTee: "⊤", top: "⊤", DownTeeArrow: "↧", mapstodown: "↧", Dscr: "\uD835\uDC9F", Dstrok: "Đ", ENG: "Ŋ", ETH: "Ð", Eacute: "É", Ecaron: "Ě", Ecirc: "Ê", Ecy: "Э", Edot: "Ė", Efr: "\uD835\uDD08", Egrave: "È", Element: "∈", in: "∈", isin: "∈", isinv: "∈", Emacr: "Ē", EmptySmallSquare: "◻", EmptyVerySmallSquare: "▫", Eogon: "Ę", Eopf: "\uD835\uDD3C", Epsilon: "Ε", Equal: "⩵", EqualTilde: "≂", eqsim: "≂", esim: "≂", Equilibrium: "⇌", rightleftharpoons: "⇌", rlhar: "⇌", Escr: "ℰ", expectation: "ℰ", Esim: "⩳", Eta: "Η", Euml: "Ë", Exists: "∃", exist: "∃", ExponentialE: "ⅇ", ee: "ⅇ", exponentiale: "ⅇ", Fcy: "Ф", Ffr: "\uD835\uDD09", FilledSmallSquare: "◼", FilledVerySmallSquare: "▪", blacksquare: "▪", squarf: "▪", squf: "▪", Fopf: "\uD835\uDD3D", ForAll: "∀", forall: "∀", Fouriertrf: "ℱ", Fscr: "ℱ", GJcy: "Ѓ", GT: ">", gt: ">", Gamma: "Γ", Gammad: "Ϝ", Gbreve: "Ğ", Gcedil: "Ģ", Gcirc: "Ĝ", Gcy: "Г", Gdot: "Ġ", Gfr: "\uD835\uDD0A", Gg: "⋙", ggg: "⋙", Gopf: "\uD835\uDD3E", GreaterEqual: "≥", ge: "≥", geq: "≥", GreaterEqualLess: "⋛", gel: "⋛", gtreqless: "⋛", GreaterFullEqual: "≧", gE: "≧", geqq: "≧", GreaterGreater: "⪢", GreaterLess: "≷", gl: "≷", gtrless: "≷", GreaterSlantEqual: "⩾", geqslant: "⩾", ges: "⩾", GreaterTilde: "≳", gsim: "≳", gtrsim: "≳", Gscr: "\uD835\uDCA2", Gt: "≫", NestedGreaterGreater: "≫", gg: "≫", HARDcy: "Ъ", Hacek: "ˇ", caron: "ˇ", Hat: "^", Hcirc: "Ĥ", Hfr: "ℌ", Poincareplane: "ℌ", HilbertSpace: "ℋ", Hscr: "ℋ", hamilt: "ℋ", Hopf: "ℍ", quaternions: "ℍ", HorizontalLine: "─", boxh: "─", Hstrok: "Ħ", HumpEqual: "≏", bumpe: "≏", bumpeq: "≏", IEcy: "Е", IJlig: "Ĳ", IOcy: "Ё", Iacute: "Í", Icirc: "Î", Icy: "И", Idot: "İ", Ifr: "ℑ", Im: "ℑ", image: "ℑ", imagpart: "ℑ", Igrave: "Ì", Imacr: "Ī", ImaginaryI: "ⅈ", ii: "ⅈ", Int: "∬", Integral: "∫", int: "∫", Intersection: "⋂", bigcap: "⋂", xcap: "⋂", InvisibleComma: "⁣", ic: "⁣", InvisibleTimes: "⁢", it: "⁢", Iogon: "Į", Iopf: "\uD835\uDD40", Iota: "Ι", Iscr: "ℐ", imagline: "ℐ", Itilde: "Ĩ", Iukcy: "І", Iuml: "Ï", Jcirc: "Ĵ", Jcy: "Й", Jfr: "\uD835\uDD0D", Jopf: "\uD835\uDD41", Jscr: "\uD835\uDCA5", Jsercy: "Ј", Jukcy: "Є", KHcy: "Х", KJcy: "Ќ", Kappa: "Κ", Kcedil: "Ķ", Kcy: "К", Kfr: "\uD835\uDD0E", Kopf: "\uD835\uDD42", Kscr: "\uD835\uDCA6", LJcy: "Љ", LT: "<", lt: "<", Lacute: "Ĺ", Lambda: "Λ", Lang: "⟪", Laplacetrf: "ℒ", Lscr: "ℒ", lagran: "ℒ", Larr: "↞", twoheadleftarrow: "↞", Lcaron: "Ľ", Lcedil: "Ļ", Lcy: "Л", LeftAngleBracket: "⟨", lang: "⟨", langle: "⟨", LeftArrow: "←", ShortLeftArrow: "←", larr: "←", leftarrow: "←", slarr: "←", LeftArrowBar: "⇤", larrb: "⇤", LeftArrowRightArrow: "⇆", leftrightarrows: "⇆", lrarr: "⇆", LeftCeiling: "⌈", lceil: "⌈", LeftDoubleBracket: "⟦", lobrk: "⟦", LeftDownTeeVector: "⥡", LeftDownVector: "⇃", dharl: "⇃", downharpoonleft: "⇃", LeftDownVectorBar: "⥙", LeftFloor: "⌊", lfloor: "⌊", LeftRightArrow: "↔", harr: "↔", leftrightarrow: "↔", LeftRightVector: "⥎", LeftTee: "⊣", dashv: "⊣", LeftTeeArrow: "↤", mapstoleft: "↤", LeftTeeVector: "⥚", LeftTriangle: "⊲", vartriangleleft: "⊲", vltri: "⊲", LeftTriangleBar: "⧏", LeftTriangleEqual: "⊴", ltrie: "⊴", trianglelefteq: "⊴", LeftUpDownVector: "⥑", LeftUpTeeVector: "⥠", LeftUpVector: "↿", uharl: "↿", upharpoonleft: "↿", LeftUpVectorBar: "⥘", LeftVector: "↼", leftharpoonup: "↼", lharu: "↼", LeftVectorBar: "⥒", LessEqualGreater: "⋚", leg: "⋚", lesseqgtr: "⋚", LessFullEqual: "≦", lE: "≦", leqq: "≦", LessGreater: "≶", lessgtr: "≶", lg: "≶", LessLess: "⪡", LessSlantEqual: "⩽", leqslant: "⩽", les: "⩽", LessTilde: "≲", lesssim: "≲", lsim: "≲", Lfr: "\uD835\uDD0F", Ll: "⋘", Lleftarrow: "⇚", lAarr: "⇚", Lmidot: "Ŀ", LongLeftArrow: "⟵", longleftarrow: "⟵", xlarr: "⟵", LongLeftRightArrow: "⟷", longleftrightarrow: "⟷", xharr: "⟷", LongRightArrow: "⟶", longrightarrow: "⟶", xrarr: "⟶", Lopf: "\uD835\uDD43", LowerLeftArrow: "↙", swarr: "↙", swarrow: "↙", LowerRightArrow: "↘", searr: "↘", searrow: "↘", Lsh: "↰", lsh: "↰", Lstrok: "Ł", Lt: "≪", NestedLessLess: "≪", ll: "≪", Map: "⤅", Mcy: "М", MediumSpace: " ", Mellintrf: "ℳ", Mscr: "ℳ", phmmat: "ℳ", Mfr: "\uD835\uDD10", MinusPlus: "∓", mnplus: "∓", mp: "∓", Mopf: "\uD835\uDD44", Mu: "Μ", NJcy: "Њ", Nacute: "Ń", Ncaron: "Ň", Ncedil: "Ņ", Ncy: "Н", NegativeMediumSpace: "​", NegativeThickSpace: "​", NegativeThinSpace: "​", NegativeVeryThinSpace: "​", ZeroWidthSpace: "​", NewLine: `
`, Nfr: "\uD835\uDD11", NoBreak: "⁠", NonBreakingSpace: " ", nbsp: " ", Nopf: "ℕ", naturals: "ℕ", Not: "⫬", NotCongruent: "≢", nequiv: "≢", NotCupCap: "≭", NotDoubleVerticalBar: "∦", npar: "∦", nparallel: "∦", nshortparallel: "∦", nspar: "∦", NotElement: "∉", notin: "∉", notinva: "∉", NotEqual: "≠", ne: "≠", NotEqualTilde: "≂̸", nesim: "≂̸", NotExists: "∄", nexist: "∄", nexists: "∄", NotGreater: "≯", ngt: "≯", ngtr: "≯", NotGreaterEqual: "≱", nge: "≱", ngeq: "≱", NotGreaterFullEqual: "≧̸", ngE: "≧̸", ngeqq: "≧̸", NotGreaterGreater: "≫̸", nGtv: "≫̸", NotGreaterLess: "≹", ntgl: "≹", NotGreaterSlantEqual: "⩾̸", ngeqslant: "⩾̸", nges: "⩾̸", NotGreaterTilde: "≵", ngsim: "≵", NotHumpDownHump: "≎̸", nbump: "≎̸", NotHumpEqual: "≏̸", nbumpe: "≏̸", NotLeftTriangle: "⋪", nltri: "⋪", ntriangleleft: "⋪", NotLeftTriangleBar: "⧏̸", NotLeftTriangleEqual: "⋬", nltrie: "⋬", ntrianglelefteq: "⋬", NotLess: "≮", nless: "≮", nlt: "≮", NotLessEqual: "≰", nle: "≰", nleq: "≰", NotLessGreater: "≸", ntlg: "≸", NotLessLess: "≪̸", nLtv: "≪̸", NotLessSlantEqual: "⩽̸", nleqslant: "⩽̸", nles: "⩽̸", NotLessTilde: "≴", nlsim: "≴", NotNestedGreaterGreater: "⪢̸", NotNestedLessLess: "⪡̸", NotPrecedes: "⊀", npr: "⊀", nprec: "⊀", NotPrecedesEqual: "⪯̸", npre: "⪯̸", npreceq: "⪯̸", NotPrecedesSlantEqual: "⋠", nprcue: "⋠", NotReverseElement: "∌", notni: "∌", notniva: "∌", NotRightTriangle: "⋫", nrtri: "⋫", ntriangleright: "⋫", NotRightTriangleBar: "⧐̸", NotRightTriangleEqual: "⋭", nrtrie: "⋭", ntrianglerighteq: "⋭", NotSquareSubset: "⊏̸", NotSquareSubsetEqual: "⋢", nsqsube: "⋢", NotSquareSuperset: "⊐̸", NotSquareSupersetEqual: "⋣", nsqsupe: "⋣", NotSubset: "⊂⃒", nsubset: "⊂⃒", vnsub: "⊂⃒", NotSubsetEqual: "⊈", nsube: "⊈", nsubseteq: "⊈", NotSucceeds: "⊁", nsc: "⊁", nsucc: "⊁", NotSucceedsEqual: "⪰̸", nsce: "⪰̸", nsucceq: "⪰̸", NotSucceedsSlantEqual: "⋡", nsccue: "⋡", NotSucceedsTilde: "≿̸", NotSuperset: "⊃⃒", nsupset: "⊃⃒", vnsup: "⊃⃒", NotSupersetEqual: "⊉", nsupe: "⊉", nsupseteq: "⊉", NotTilde: "≁", nsim: "≁", NotTildeEqual: "≄", nsime: "≄", nsimeq: "≄", NotTildeFullEqual: "≇", ncong: "≇", NotTildeTilde: "≉", nap: "≉", napprox: "≉", NotVerticalBar: "∤", nmid: "∤", nshortmid: "∤", nsmid: "∤", Nscr: "\uD835\uDCA9", Ntilde: "Ñ", Nu: "Ν", OElig: "Œ", Oacute: "Ó", Ocirc: "Ô", Ocy: "О", Odblac: "Ő", Ofr: "\uD835\uDD12", Ograve: "Ò", Omacr: "Ō", Omega: "Ω", ohm: "Ω", Omicron: "Ο", Oopf: "\uD835\uDD46", OpenCurlyDoubleQuote: "“", ldquo: "“", OpenCurlyQuote: "‘", lsquo: "‘", Or: "⩔", Oscr: "\uD835\uDCAA", Oslash: "Ø", Otilde: "Õ", Otimes: "⨷", Ouml: "Ö", OverBar: "‾", oline: "‾", OverBrace: "⏞", OverBracket: "⎴", tbrk: "⎴", OverParenthesis: "⏜", PartialD: "∂", part: "∂", Pcy: "П", Pfr: "\uD835\uDD13", Phi: "Φ", Pi: "Π", PlusMinus: "±", plusmn: "±", pm: "±", Popf: "ℙ", primes: "ℙ", Pr: "⪻", Precedes: "≺", pr: "≺", prec: "≺", PrecedesEqual: "⪯", pre: "⪯", preceq: "⪯", PrecedesSlantEqual: "≼", prcue: "≼", preccurlyeq: "≼", PrecedesTilde: "≾", precsim: "≾", prsim: "≾", Prime: "″", Product: "∏", prod: "∏", Proportional: "∝", prop: "∝", propto: "∝", varpropto: "∝", vprop: "∝", Pscr: "\uD835\uDCAB", Psi: "Ψ", QUOT: '"', quot: '"', Qfr: "\uD835\uDD14", Qopf: "ℚ", rationals: "ℚ", Qscr: "\uD835\uDCAC", RBarr: "⤐", drbkarow: "⤐", REG: "®", circledR: "®", reg: "®", Racute: "Ŕ", Rang: "⟫", Rarr: "↠", twoheadrightarrow: "↠", Rarrtl: "⤖", Rcaron: "Ř", Rcedil: "Ŗ", Rcy: "Р", Re: "ℜ", Rfr: "ℜ", real: "ℜ", realpart: "ℜ", ReverseElement: "∋", SuchThat: "∋", ni: "∋", niv: "∋", ReverseEquilibrium: "⇋", leftrightharpoons: "⇋", lrhar: "⇋", ReverseUpEquilibrium: "⥯", duhar: "⥯", Rho: "Ρ", RightAngleBracket: "⟩", rang: "⟩", rangle: "⟩", RightArrow: "→", ShortRightArrow: "→", rarr: "→", rightarrow: "→", srarr: "→", RightArrowBar: "⇥", rarrb: "⇥", RightArrowLeftArrow: "⇄", rightleftarrows: "⇄", rlarr: "⇄", RightCeiling: "⌉", rceil: "⌉", RightDoubleBracket: "⟧", robrk: "⟧", RightDownTeeVector: "⥝", RightDownVector: "⇂", dharr: "⇂", downharpoonright: "⇂", RightDownVectorBar: "⥕", RightFloor: "⌋", rfloor: "⌋", RightTee: "⊢", vdash: "⊢", RightTeeArrow: "↦", map: "↦", mapsto: "↦", RightTeeVector: "⥛", RightTriangle: "⊳", vartriangleright: "⊳", vrtri: "⊳", RightTriangleBar: "⧐", RightTriangleEqual: "⊵", rtrie: "⊵", trianglerighteq: "⊵", RightUpDownVector: "⥏", RightUpTeeVector: "⥜", RightUpVector: "↾", uharr: "↾", upharpoonright: "↾", RightUpVectorBar: "⥔", RightVector: "⇀", rharu: "⇀", rightharpoonup: "⇀", RightVectorBar: "⥓", Ropf: "ℝ", reals: "ℝ", RoundImplies: "⥰", Rrightarrow: "⇛", rAarr: "⇛", Rscr: "ℛ", realine: "ℛ", Rsh: "↱", rsh: "↱", RuleDelayed: "⧴", SHCHcy: "Щ", SHcy: "Ш", SOFTcy: "Ь", Sacute: "Ś", Sc: "⪼", Scaron: "Š", Scedil: "Ş", Scirc: "Ŝ", Scy: "С", Sfr: "\uD835\uDD16", ShortUpArrow: "↑", UpArrow: "↑", uarr: "↑", uparrow: "↑", Sigma: "Σ", SmallCircle: "∘", compfn: "∘", Sopf: "\uD835\uDD4A", Sqrt: "√", radic: "√", Square: "□", squ: "□", square: "□", SquareIntersection: "⊓", sqcap: "⊓", SquareSubset: "⊏", sqsub: "⊏", sqsubset: "⊏", SquareSubsetEqual: "⊑", sqsube: "⊑", sqsubseteq: "⊑", SquareSuperset: "⊐", sqsup: "⊐", sqsupset: "⊐", SquareSupersetEqual: "⊒", sqsupe: "⊒", sqsupseteq: "⊒", SquareUnion: "⊔", sqcup: "⊔", Sscr: "\uD835\uDCAE", Star: "⋆", sstarf: "⋆", Sub: "⋐", Subset: "⋐", SubsetEqual: "⊆", sube: "⊆", subseteq: "⊆", Succeeds: "≻", sc: "≻", succ: "≻", SucceedsEqual: "⪰", sce: "⪰", succeq: "⪰", SucceedsSlantEqual: "≽", sccue: "≽", succcurlyeq: "≽", SucceedsTilde: "≿", scsim: "≿", succsim: "≿", Sum: "∑", sum: "∑", Sup: "⋑", Supset: "⋑", Superset: "⊃", sup: "⊃", supset: "⊃", SupersetEqual: "⊇", supe: "⊇", supseteq: "⊇", THORN: "Þ", TRADE: "™", trade: "™", TSHcy: "Ћ", TScy: "Ц", Tab: "\t", Tau: "Τ", Tcaron: "Ť", Tcedil: "Ţ", Tcy: "Т", Tfr: "\uD835\uDD17", Therefore: "∴", there4: "∴", therefore: "∴", Theta: "Θ", ThickSpace: "  ", ThinSpace: " ", thinsp: " ", Tilde: "∼", sim: "∼", thicksim: "∼", thksim: "∼", TildeEqual: "≃", sime: "≃", simeq: "≃", TildeFullEqual: "≅", cong: "≅", TildeTilde: "≈", ap: "≈", approx: "≈", asymp: "≈", thickapprox: "≈", thkap: "≈", Topf: "\uD835\uDD4B", TripleDot: "⃛", tdot: "⃛", Tscr: "\uD835\uDCAF", Tstrok: "Ŧ", Uacute: "Ú", Uarr: "↟", Uarrocir: "⥉", Ubrcy: "Ў", Ubreve: "Ŭ", Ucirc: "Û", Ucy: "У", Udblac: "Ű", Ufr: "\uD835\uDD18", Ugrave: "Ù", Umacr: "Ū", UnderBar: "_", lowbar: "_", UnderBrace: "⏟", UnderBracket: "⎵", bbrk: "⎵", UnderParenthesis: "⏝", Union: "⋃", bigcup: "⋃", xcup: "⋃", UnionPlus: "⊎", uplus: "⊎", Uogon: "Ų", Uopf: "\uD835\uDD4C", UpArrowBar: "⤒", UpArrowDownArrow: "⇅", udarr: "⇅", UpDownArrow: "↕", updownarrow: "↕", varr: "↕", UpEquilibrium: "⥮", udhar: "⥮", UpTee: "⊥", bot: "⊥", bottom: "⊥", perp: "⊥", UpTeeArrow: "↥", mapstoup: "↥", UpperLeftArrow: "↖", nwarr: "↖", nwarrow: "↖", UpperRightArrow: "↗", nearr: "↗", nearrow: "↗", Upsi: "ϒ", upsih: "ϒ", Upsilon: "Υ", Uring: "Ů", Uscr: "\uD835\uDCB0", Utilde: "Ũ", Uuml: "Ü", VDash: "⊫", Vbar: "⫫", Vcy: "В", Vdash: "⊩", Vdashl: "⫦", Vee: "⋁", bigvee: "⋁", xvee: "⋁", Verbar: "‖", Vert: "‖", VerticalBar: "∣", mid: "∣", shortmid: "∣", smid: "∣", VerticalLine: "|", verbar: "|", vert: "|", VerticalSeparator: "❘", VerticalTilde: "≀", wr: "≀", wreath: "≀", VeryThinSpace: " ", hairsp: " ", Vfr: "\uD835\uDD19", Vopf: "\uD835\uDD4D", Vscr: "\uD835\uDCB1", Vvdash: "⊪", Wcirc: "Ŵ", Wedge: "⋀", bigwedge: "⋀", xwedge: "⋀", Wfr: "\uD835\uDD1A", Wopf: "\uD835\uDD4E", Wscr: "\uD835\uDCB2", Xfr: "\uD835\uDD1B", Xi: "Ξ", Xopf: "\uD835\uDD4F", Xscr: "\uD835\uDCB3", YAcy: "Я", YIcy: "Ї", YUcy: "Ю", Yacute: "Ý", Ycirc: "Ŷ", Ycy: "Ы", Yfr: "\uD835\uDD1C", Yopf: "\uD835\uDD50", Yscr: "\uD835\uDCB4", Yuml: "Ÿ", ZHcy: "Ж", Zacute: "Ź", Zcaron: "Ž", Zcy: "З", Zdot: "Ż", Zeta: "Ζ", Zfr: "ℨ", zeetrf: "ℨ", Zopf: "ℤ", integers: "ℤ", Zscr: "\uD835\uDCB5", aacute: "á", abreve: "ă", ac: "∾", mstpos: "∾", acE: "∾̳", acd: "∿", acirc: "â", acy: "а", aelig: "æ", afr: "\uD835\uDD1E", agrave: "à", alefsym: "ℵ", aleph: "ℵ", alpha: "α", amacr: "ā", amalg: "⨿", and: "∧", wedge: "∧", andand: "⩕", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", angle: "∠", ange: "⦤", angmsd: "∡", measuredangle: "∡", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angzarr: "⍼", aogon: "ą", aopf: "\uD835\uDD52", apE: "⩰", apacir: "⩯", ape: "≊", approxeq: "≊", apid: "≋", apos: "'", aring: "å", ascr: "\uD835\uDCB6", ast: "*", midast: "*", atilde: "ã", auml: "ä", awint: "⨑", bNot: "⫭", backcong: "≌", bcong: "≌", backepsilon: "϶", bepsi: "϶", backprime: "‵", bprime: "‵", backsim: "∽", bsim: "∽", backsimeq: "⋍", bsime: "⋍", barvee: "⊽", barwed: "⌅", barwedge: "⌅", bbrktbrk: "⎶", bcy: "б", bdquo: "„", ldquor: "„", bemptyv: "⦰", beta: "β", beth: "ℶ", between: "≬", twixt: "≬", bfr: "\uD835\uDD1F", bigcirc: "◯", xcirc: "◯", bigodot: "⨀", xodot: "⨀", bigoplus: "⨁", xoplus: "⨁", bigotimes: "⨂", xotime: "⨂", bigsqcup: "⨆", xsqcup: "⨆", bigstar: "★", starf: "★", bigtriangledown: "▽", xdtri: "▽", bigtriangleup: "△", xutri: "△", biguplus: "⨄", xuplus: "⨄", bkarow: "⤍", rbarr: "⤍", blacklozenge: "⧫", lozf: "⧫", blacktriangle: "▴", utrif: "▴", blacktriangledown: "▾", dtrif: "▾", blacktriangleleft: "◂", ltrif: "◂", blacktriangleright: "▸", rtrif: "▸", blank: "␣", blk12: "▒", blk14: "░", blk34: "▓", block: "█", bne: "=⃥", bnequiv: "≡⃥", bnot: "⌐", bopf: "\uD835\uDD53", bowtie: "⋈", boxDL: "╗", boxDR: "╔", boxDl: "╖", boxDr: "╓", boxH: "═", boxHD: "╦", boxHU: "╩", boxHd: "╤", boxHu: "╧", boxUL: "╝", boxUR: "╚", boxUl: "╜", boxUr: "╙", boxV: "║", boxVH: "╬", boxVL: "╣", boxVR: "╠", boxVh: "╫", boxVl: "╢", boxVr: "╟", boxbox: "⧉", boxdL: "╕", boxdR: "╒", boxdl: "┐", boxdr: "┌", boxhD: "╥", boxhU: "╨", boxhd: "┬", boxhu: "┴", boxminus: "⊟", minusb: "⊟", boxplus: "⊞", plusb: "⊞", boxtimes: "⊠", timesb: "⊠", boxuL: "╛", boxuR: "╘", boxul: "┘", boxur: "└", boxv: "│", boxvH: "╪", boxvL: "╡", boxvR: "╞", boxvh: "┼", boxvl: "┤", boxvr: "├", brvbar: "¦", bscr: "\uD835\uDCB7", bsemi: "⁏", bsol: "\\", bsolb: "⧅", bsolhsub: "⟈", bull: "•", bullet: "•", bumpE: "⪮", cacute: "ć", cap: "∩", capand: "⩄", capbrcup: "⩉", capcap: "⩋", capcup: "⩇", capdot: "⩀", caps: "∩︀", caret: "⁁", ccaps: "⩍", ccaron: "č", ccedil: "ç", ccirc: "ĉ", ccups: "⩌", ccupssm: "⩐", cdot: "ċ", cemptyv: "⦲", cent: "¢", cfr: "\uD835\uDD20", chcy: "ч", check: "✓", checkmark: "✓", chi: "χ", cir: "○", cirE: "⧃", circ: "ˆ", circeq: "≗", cire: "≗", circlearrowleft: "↺", olarr: "↺", circlearrowright: "↻", orarr: "↻", circledS: "Ⓢ", oS: "Ⓢ", circledast: "⊛", oast: "⊛", circledcirc: "⊚", ocir: "⊚", circleddash: "⊝", odash: "⊝", cirfnint: "⨐", cirmid: "⫯", cirscir: "⧂", clubs: "♣", clubsuit: "♣", colon: ":", comma: ",", commat: "@", comp: "∁", complement: "∁", congdot: "⩭", copf: "\uD835\uDD54", copysr: "℗", crarr: "↵", cross: "✗", cscr: "\uD835\uDCB8", csub: "⫏", csube: "⫑", csup: "⫐", csupe: "⫒", ctdot: "⋯", cudarrl: "⤸", cudarrr: "⤵", cuepr: "⋞", curlyeqprec: "⋞", cuesc: "⋟", curlyeqsucc: "⋟", cularr: "↶", curvearrowleft: "↶", cularrp: "⤽", cup: "∪", cupbrcap: "⩈", cupcap: "⩆", cupcup: "⩊", cupdot: "⊍", cupor: "⩅", cups: "∪︀", curarr: "↷", curvearrowright: "↷", curarrm: "⤼", curlyvee: "⋎", cuvee: "⋎", curlywedge: "⋏", cuwed: "⋏", curren: "¤", cwint: "∱", cylcty: "⌭", dHar: "⥥", dagger: "†", daleth: "ℸ", dash: "‐", hyphen: "‐", dbkarow: "⤏", rBarr: "⤏", dcaron: "ď", dcy: "д", ddarr: "⇊", downdownarrows: "⇊", ddotseq: "⩷", eDDot: "⩷", deg: "°", delta: "δ", demptyv: "⦱", dfisht: "⥿", dfr: "\uD835\uDD21", diamondsuit: "♦", diams: "♦", digamma: "ϝ", gammad: "ϝ", disin: "⋲", div: "÷", divide: "÷", divideontimes: "⋇", divonx: "⋇", djcy: "ђ", dlcorn: "⌞", llcorner: "⌞", dlcrop: "⌍", dollar: "$", dopf: "\uD835\uDD55", doteqdot: "≑", eDot: "≑", dotminus: "∸", minusd: "∸", dotplus: "∔", plusdo: "∔", dotsquare: "⊡", sdotb: "⊡", drcorn: "⌟", lrcorner: "⌟", drcrop: "⌌", dscr: "\uD835\uDCB9", dscy: "ѕ", dsol: "⧶", dstrok: "đ", dtdot: "⋱", dtri: "▿", triangledown: "▿", dwangle: "⦦", dzcy: "џ", dzigrarr: "⟿", eacute: "é", easter: "⩮", ecaron: "ě", ecir: "≖", eqcirc: "≖", ecirc: "ê", ecolon: "≕", eqcolon: "≕", ecy: "э", edot: "ė", efDot: "≒", fallingdotseq: "≒", efr: "\uD835\uDD22", eg: "⪚", egrave: "è", egs: "⪖", eqslantgtr: "⪖", egsdot: "⪘", el: "⪙", elinters: "⏧", ell: "ℓ", els: "⪕", eqslantless: "⪕", elsdot: "⪗", emacr: "ē", empty: "∅", emptyset: "∅", emptyv: "∅", varnothing: "∅", emsp13: " ", emsp14: " ", emsp: " ", eng: "ŋ", ensp: " ", eogon: "ę", eopf: "\uD835\uDD56", epar: "⋕", eparsl: "⧣", eplus: "⩱", epsi: "ε", epsilon: "ε", epsiv: "ϵ", straightepsilon: "ϵ", varepsilon: "ϵ", equals: "=", equest: "≟", questeq: "≟", equivDD: "⩸", eqvparsl: "⧥", erDot: "≓", risingdotseq: "≓", erarr: "⥱", escr: "ℯ", eta: "η", eth: "ð", euml: "ë", euro: "€", excl: "!", fcy: "ф", female: "♀", ffilig: "ﬃ", fflig: "ﬀ", ffllig: "ﬄ", ffr: "\uD835\uDD23", filig: "ﬁ", fjlig: "fj", flat: "♭", fllig: "ﬂ", fltns: "▱", fnof: "ƒ", fopf: "\uD835\uDD57", fork: "⋔", pitchfork: "⋔", forkv: "⫙", fpartint: "⨍", frac12: "½", half: "½", frac13: "⅓", frac14: "¼", frac15: "⅕", frac16: "⅙", frac18: "⅛", frac23: "⅔", frac25: "⅖", frac34: "¾", frac35: "⅗", frac38: "⅜", frac45: "⅘", frac56: "⅚", frac58: "⅝", frac78: "⅞", frasl: "⁄", frown: "⌢", sfrown: "⌢", fscr: "\uD835\uDCBB", gEl: "⪌", gtreqqless: "⪌", gacute: "ǵ", gamma: "γ", gap: "⪆", gtrapprox: "⪆", gbreve: "ğ", gcirc: "ĝ", gcy: "г", gdot: "ġ", gescc: "⪩", gesdot: "⪀", gesdoto: "⪂", gesdotol: "⪄", gesl: "⋛︀", gesles: "⪔", gfr: "\uD835\uDD24", gimel: "ℷ", gjcy: "ѓ", glE: "⪒", gla: "⪥", glj: "⪤", gnE: "≩", gneqq: "≩", gnap: "⪊", gnapprox: "⪊", gne: "⪈", gneq: "⪈", gnsim: "⋧", gopf: "\uD835\uDD58", gscr: "ℊ", gsime: "⪎", gsiml: "⪐", gtcc: "⪧", gtcir: "⩺", gtdot: "⋗", gtrdot: "⋗", gtlPar: "⦕", gtquest: "⩼", gtrarr: "⥸", gvertneqq: "≩︀", gvnE: "≩︀", hardcy: "ъ", harrcir: "⥈", harrw: "↭", leftrightsquigarrow: "↭", hbar: "ℏ", hslash: "ℏ", planck: "ℏ", plankv: "ℏ", hcirc: "ĥ", hearts: "♥", heartsuit: "♥", hellip: "…", mldr: "…", hercon: "⊹", hfr: "\uD835\uDD25", hksearow: "⤥", searhk: "⤥", hkswarow: "⤦", swarhk: "⤦", hoarr: "⇿", homtht: "∻", hookleftarrow: "↩", larrhk: "↩", hookrightarrow: "↪", rarrhk: "↪", hopf: "\uD835\uDD59", horbar: "―", hscr: "\uD835\uDCBD", hstrok: "ħ", hybull: "⁃", iacute: "í", icirc: "î", icy: "и", iecy: "е", iexcl: "¡", ifr: "\uD835\uDD26", igrave: "ì", iiiint: "⨌", qint: "⨌", iiint: "∭", tint: "∭", iinfin: "⧜", iiota: "℩", ijlig: "ĳ", imacr: "ī", imath: "ı", inodot: "ı", imof: "⊷", imped: "Ƶ", incare: "℅", infin: "∞", infintie: "⧝", intcal: "⊺", intercal: "⊺", intlarhk: "⨗", intprod: "⨼", iprod: "⨼", iocy: "ё", iogon: "į", iopf: "\uD835\uDD5A", iota: "ι", iquest: "¿", iscr: "\uD835\uDCBE", isinE: "⋹", isindot: "⋵", isins: "⋴", isinsv: "⋳", itilde: "ĩ", iukcy: "і", iuml: "ï", jcirc: "ĵ", jcy: "й", jfr: "\uD835\uDD27", jmath: "ȷ", jopf: "\uD835\uDD5B", jscr: "\uD835\uDCBF", jsercy: "ј", jukcy: "є", kappa: "κ", kappav: "ϰ", varkappa: "ϰ", kcedil: "ķ", kcy: "к", kfr: "\uD835\uDD28", kgreen: "ĸ", khcy: "х", kjcy: "ќ", kopf: "\uD835\uDD5C", kscr: "\uD835\uDCC0", lAtail: "⤛", lBarr: "⤎", lEg: "⪋", lesseqqgtr: "⪋", lHar: "⥢", lacute: "ĺ", laemptyv: "⦴", lambda: "λ", langd: "⦑", lap: "⪅", lessapprox: "⪅", laquo: "«", larrbfs: "⤟", larrfs: "⤝", larrlp: "↫", looparrowleft: "↫", larrpl: "⤹", larrsim: "⥳", larrtl: "↢", leftarrowtail: "↢", lat: "⪫", latail: "⤙", late: "⪭", lates: "⪭︀", lbarr: "⤌", lbbrk: "❲", lbrace: "{", lcub: "{", lbrack: "[", lsqb: "[", lbrke: "⦋", lbrksld: "⦏", lbrkslu: "⦍", lcaron: "ľ", lcedil: "ļ", lcy: "л", ldca: "⤶", ldrdhar: "⥧", ldrushar: "⥋", ldsh: "↲", le: "≤", leq: "≤", leftleftarrows: "⇇", llarr: "⇇", leftthreetimes: "⋋", lthree: "⋋", lescc: "⪨", lesdot: "⩿", lesdoto: "⪁", lesdotor: "⪃", lesg: "⋚︀", lesges: "⪓", lessdot: "⋖", ltdot: "⋖", lfisht: "⥼", lfr: "\uD835\uDD29", lgE: "⪑", lharul: "⥪", lhblk: "▄", ljcy: "љ", llhard: "⥫", lltri: "◺", lmidot: "ŀ", lmoust: "⎰", lmoustache: "⎰", lnE: "≨", lneqq: "≨", lnap: "⪉", lnapprox: "⪉", lne: "⪇", lneq: "⪇", lnsim: "⋦", loang: "⟬", loarr: "⇽", longmapsto: "⟼", xmap: "⟼", looparrowright: "↬", rarrlp: "↬", lopar: "⦅", lopf: "\uD835\uDD5D", loplus: "⨭", lotimes: "⨴", lowast: "∗", loz: "◊", lozenge: "◊", lpar: "(", lparlt: "⦓", lrhard: "⥭", lrm: "‎", lrtri: "⊿", lsaquo: "‹", lscr: "\uD835\uDCC1", lsime: "⪍", lsimg: "⪏", lsquor: "‚", sbquo: "‚", lstrok: "ł", ltcc: "⪦", ltcir: "⩹", ltimes: "⋉", ltlarr: "⥶", ltquest: "⩻", ltrPar: "⦖", ltri: "◃", triangleleft: "◃", lurdshar: "⥊", luruhar: "⥦", lvertneqq: "≨︀", lvnE: "≨︀", mDDot: "∺", macr: "¯", strns: "¯", male: "♂", malt: "✠", maltese: "✠", marker: "▮", mcomma: "⨩", mcy: "м", mdash: "—", mfr: "\uD835\uDD2A", mho: "℧", micro: "µ", midcir: "⫰", minus: "−", minusdu: "⨪", mlcp: "⫛", models: "⊧", mopf: "\uD835\uDD5E", mscr: "\uD835\uDCC2", mu: "μ", multimap: "⊸", mumap: "⊸", nGg: "⋙̸", nGt: "≫⃒", nLeftarrow: "⇍", nlArr: "⇍", nLeftrightarrow: "⇎", nhArr: "⇎", nLl: "⋘̸", nLt: "≪⃒", nRightarrow: "⇏", nrArr: "⇏", nVDash: "⊯", nVdash: "⊮", nacute: "ń", nang: "∠⃒", napE: "⩰̸", napid: "≋̸", napos: "ŉ", natur: "♮", natural: "♮", ncap: "⩃", ncaron: "ň", ncedil: "ņ", ncongdot: "⩭̸", ncup: "⩂", ncy: "н", ndash: "–", neArr: "⇗", nearhk: "⤤", nedot: "≐̸", nesear: "⤨", toea: "⤨", nfr: "\uD835\uDD2B", nharr: "↮", nleftrightarrow: "↮", nhpar: "⫲", nis: "⋼", nisd: "⋺", njcy: "њ", nlE: "≦̸", nleqq: "≦̸", nlarr: "↚", nleftarrow: "↚", nldr: "‥", nopf: "\uD835\uDD5F", not: "¬", notinE: "⋹̸", notindot: "⋵̸", notinvb: "⋷", notinvc: "⋶", notnivb: "⋾", notnivc: "⋽", nparsl: "⫽⃥", npart: "∂̸", npolint: "⨔", nrarr: "↛", nrightarrow: "↛", nrarrc: "⤳̸", nrarrw: "↝̸", nscr: "\uD835\uDCC3", nsub: "⊄", nsubE: "⫅̸", nsubseteqq: "⫅̸", nsup: "⊅", nsupE: "⫆̸", nsupseteqq: "⫆̸", ntilde: "ñ", nu: "ν", num: "#", numero: "№", numsp: " ", nvDash: "⊭", nvHarr: "⤄", nvap: "≍⃒", nvdash: "⊬", nvge: "≥⃒", nvgt: ">⃒", nvinfin: "⧞", nvlArr: "⤂", nvle: "≤⃒", nvlt: "<⃒", nvltrie: "⊴⃒", nvrArr: "⤃", nvrtrie: "⊵⃒", nvsim: "∼⃒", nwArr: "⇖", nwarhk: "⤣", nwnear: "⤧", oacute: "ó", ocirc: "ô", ocy: "о", odblac: "ő", odiv: "⨸", odsold: "⦼", oelig: "œ", ofcir: "⦿", ofr: "\uD835\uDD2C", ogon: "˛", ograve: "ò", ogt: "⧁", ohbar: "⦵", olcir: "⦾", olcross: "⦻", olt: "⧀", omacr: "ō", omega: "ω", omicron: "ο", omid: "⦶", oopf: "\uD835\uDD60", opar: "⦷", operp: "⦹", or: "∨", vee: "∨", ord: "⩝", order: "ℴ", orderof: "ℴ", oscr: "ℴ", ordf: "ª", ordm: "º", origof: "⊶", oror: "⩖", orslope: "⩗", orv: "⩛", oslash: "ø", osol: "⊘", otilde: "õ", otimesas: "⨶", ouml: "ö", ovbar: "⌽", para: "¶", parsim: "⫳", parsl: "⫽", pcy: "п", percnt: "%", period: ".", permil: "‰", pertenk: "‱", pfr: "\uD835\uDD2D", phi: "φ", phiv: "ϕ", straightphi: "ϕ", varphi: "ϕ", phone: "☎", pi: "π", piv: "ϖ", varpi: "ϖ", planckh: "ℎ", plus: "+", plusacir: "⨣", pluscir: "⨢", plusdu: "⨥", pluse: "⩲", plussim: "⨦", plustwo: "⨧", pointint: "⨕", popf: "\uD835\uDD61", pound: "£", prE: "⪳", prap: "⪷", precapprox: "⪷", precnapprox: "⪹", prnap: "⪹", precneqq: "⪵", prnE: "⪵", precnsim: "⋨", prnsim: "⋨", prime: "′", profalar: "⌮", profline: "⌒", profsurf: "⌓", prurel: "⊰", pscr: "\uD835\uDCC5", psi: "ψ", puncsp: " ", qfr: "\uD835\uDD2E", qopf: "\uD835\uDD62", qprime: "⁗", qscr: "\uD835\uDCC6", quatint: "⨖", quest: "?", rAtail: "⤜", rHar: "⥤", race: "∽̱", racute: "ŕ", raemptyv: "⦳", rangd: "⦒", range: "⦥", raquo: "»", rarrap: "⥵", rarrbfs: "⤠", rarrc: "⤳", rarrfs: "⤞", rarrpl: "⥅", rarrsim: "⥴", rarrtl: "↣", rightarrowtail: "↣", rarrw: "↝", rightsquigarrow: "↝", ratail: "⤚", ratio: "∶", rbbrk: "❳", rbrace: "}", rcub: "}", rbrack: "]", rsqb: "]", rbrke: "⦌", rbrksld: "⦎", rbrkslu: "⦐", rcaron: "ř", rcedil: "ŗ", rcy: "р", rdca: "⤷", rdldhar: "⥩", rdsh: "↳", rect: "▭", rfisht: "⥽", rfr: "\uD835\uDD2F", rharul: "⥬", rho: "ρ", rhov: "ϱ", varrho: "ϱ", rightrightarrows: "⇉", rrarr: "⇉", rightthreetimes: "⋌", rthree: "⋌", ring: "˚", rlm: "‏", rmoust: "⎱", rmoustache: "⎱", rnmid: "⫮", roang: "⟭", roarr: "⇾", ropar: "⦆", ropf: "\uD835\uDD63", roplus: "⨮", rotimes: "⨵", rpar: ")", rpargt: "⦔", rppolint: "⨒", rsaquo: "›", rscr: "\uD835\uDCC7", rtimes: "⋊", rtri: "▹", triangleright: "▹", rtriltri: "⧎", ruluhar: "⥨", rx: "℞", sacute: "ś", scE: "⪴", scap: "⪸", succapprox: "⪸", scaron: "š", scedil: "ş", scirc: "ŝ", scnE: "⪶", succneqq: "⪶", scnap: "⪺", succnapprox: "⪺", scnsim: "⋩", succnsim: "⋩", scpolint: "⨓", scy: "с", sdot: "⋅", sdote: "⩦", seArr: "⇘", sect: "§", semi: ";", seswar: "⤩", tosa: "⤩", sext: "✶", sfr: "\uD835\uDD30", sharp: "♯", shchcy: "щ", shcy: "ш", shy: "­", sigma: "σ", sigmaf: "ς", sigmav: "ς", varsigma: "ς", simdot: "⩪", simg: "⪞", simgE: "⪠", siml: "⪝", simlE: "⪟", simne: "≆", simplus: "⨤", simrarr: "⥲", smashp: "⨳", smeparsl: "⧤", smile: "⌣", ssmile: "⌣", smt: "⪪", smte: "⪬", smtes: "⪬︀", softcy: "ь", sol: "/", solb: "⧄", solbar: "⌿", sopf: "\uD835\uDD64", spades: "♠", spadesuit: "♠", sqcaps: "⊓︀", sqcups: "⊔︀", sscr: "\uD835\uDCC8", star: "☆", sub: "⊂", subset: "⊂", subE: "⫅", subseteqq: "⫅", subdot: "⪽", subedot: "⫃", submult: "⫁", subnE: "⫋", subsetneqq: "⫋", subne: "⊊", subsetneq: "⊊", subplus: "⪿", subrarr: "⥹", subsim: "⫇", subsub: "⫕", subsup: "⫓", sung: "♪", sup1: "¹", sup2: "²", sup3: "³", supE: "⫆", supseteqq: "⫆", supdot: "⪾", supdsub: "⫘", supedot: "⫄", suphsol: "⟉", suphsub: "⫗", suplarr: "⥻", supmult: "⫂", supnE: "⫌", supsetneqq: "⫌", supne: "⊋", supsetneq: "⊋", supplus: "⫀", supsim: "⫈", supsub: "⫔", supsup: "⫖", swArr: "⇙", swnwar: "⤪", szlig: "ß", target: "⌖", tau: "τ", tcaron: "ť", tcedil: "ţ", tcy: "т", telrec: "⌕", tfr: "\uD835\uDD31", theta: "θ", thetasym: "ϑ", thetav: "ϑ", vartheta: "ϑ", thorn: "þ", times: "×", timesbar: "⨱", timesd: "⨰", topbot: "⌶", topcir: "⫱", topf: "\uD835\uDD65", topfork: "⫚", tprime: "‴", triangle: "▵", utri: "▵", triangleq: "≜", trie: "≜", tridot: "◬", triminus: "⨺", triplus: "⨹", trisb: "⧍", tritime: "⨻", trpezium: "⏢", tscr: "\uD835\uDCC9", tscy: "ц", tshcy: "ћ", tstrok: "ŧ", uHar: "⥣", uacute: "ú", ubrcy: "ў", ubreve: "ŭ", ucirc: "û", ucy: "у", udblac: "ű", ufisht: "⥾", ufr: "\uD835\uDD32", ugrave: "ù", uhblk: "▀", ulcorn: "⌜", ulcorner: "⌜", ulcrop: "⌏", ultri: "◸", umacr: "ū", uogon: "ų", uopf: "\uD835\uDD66", upsi: "υ", upsilon: "υ", upuparrows: "⇈", uuarr: "⇈", urcorn: "⌝", urcorner: "⌝", urcrop: "⌎", uring: "ů", urtri: "◹", uscr: "\uD835\uDCCA", utdot: "⋰", utilde: "ũ", uuml: "ü", uwangle: "⦧", vBar: "⫨", vBarv: "⫩", vangrt: "⦜", varsubsetneq: "⊊︀", vsubne: "⊊︀", varsubsetneqq: "⫋︀", vsubnE: "⫋︀", varsupsetneq: "⊋︀", vsupne: "⊋︀", varsupsetneqq: "⫌︀", vsupnE: "⫌︀", vcy: "в", veebar: "⊻", veeeq: "≚", vellip: "⋮", vfr: "\uD835\uDD33", vopf: "\uD835\uDD67", vscr: "\uD835\uDCCB", vzigzag: "⦚", wcirc: "ŵ", wedbar: "⩟", wedgeq: "≙", weierp: "℘", wp: "℘", wfr: "\uD835\uDD34", wopf: "\uD835\uDD68", wscr: "\uD835\uDCCC", xfr: "\uD835\uDD35", xi: "ξ", xnis: "⋻", xopf: "\uD835\uDD69", xscr: "\uD835\uDCCD", yacute: "ý", yacy: "я", ycirc: "ŷ", ycy: "ы", yen: "¥", yfr: "\uD835\uDD36", yicy: "ї", yopf: "\uD835\uDD6A", yscr: "\uD835\uDCCE", yucy: "ю", yuml: "ÿ", zacute: "ź", zcaron: "ž", zcy: "з", zdot: "ż", zeta: "ζ", zfr: "\uD835\uDD37", zhcy: "ж", zigrarr: "⇝", zopf: "\uD835\uDD6B", zscr: "\uD835\uDCCF", zwj: "‍", zwnj: "‌" };
  Te.ngsp = co;
  l = function(e) {
    return e[e.TAG_OPEN_START = 0] = "TAG_OPEN_START", e[e.TAG_OPEN_END = 1] = "TAG_OPEN_END", e[e.TAG_OPEN_END_VOID = 2] = "TAG_OPEN_END_VOID", e[e.TAG_CLOSE = 3] = "TAG_CLOSE", e[e.INCOMPLETE_TAG_OPEN = 4] = "INCOMPLETE_TAG_OPEN", e[e.TEXT = 5] = "TEXT", e[e.ESCAPABLE_RAW_TEXT = 6] = "ESCAPABLE_RAW_TEXT", e[e.RAW_TEXT = 7] = "RAW_TEXT", e[e.INTERPOLATION = 8] = "INTERPOLATION", e[e.ENCODED_ENTITY = 9] = "ENCODED_ENTITY", e[e.COMMENT_START = 10] = "COMMENT_START", e[e.COMMENT_END = 11] = "COMMENT_END", e[e.CDATA_START = 12] = "CDATA_START", e[e.CDATA_END = 13] = "CDATA_END", e[e.ATTR_NAME = 14] = "ATTR_NAME", e[e.ATTR_QUOTE = 15] = "ATTR_QUOTE", e[e.ATTR_VALUE_TEXT = 16] = "ATTR_VALUE_TEXT", e[e.ATTR_VALUE_INTERPOLATION = 17] = "ATTR_VALUE_INTERPOLATION", e[e.DOC_TYPE_START = 18] = "DOC_TYPE_START", e[e.DOC_TYPE_END = 19] = "DOC_TYPE_END", e[e.EXPANSION_FORM_START = 20] = "EXPANSION_FORM_START", e[e.EXPANSION_CASE_VALUE = 21] = "EXPANSION_CASE_VALUE", e[e.EXPANSION_CASE_EXP_START = 22] = "EXPANSION_CASE_EXP_START", e[e.EXPANSION_CASE_EXP_END = 23] = "EXPANSION_CASE_EXP_END", e[e.EXPANSION_FORM_END = 24] = "EXPANSION_FORM_END", e[e.BLOCK_OPEN_START = 25] = "BLOCK_OPEN_START", e[e.BLOCK_OPEN_END = 26] = "BLOCK_OPEN_END", e[e.BLOCK_CLOSE = 27] = "BLOCK_CLOSE", e[e.BLOCK_PARAMETER = 28] = "BLOCK_PARAMETER", e[e.INCOMPLETE_BLOCK_OPEN = 29] = "INCOMPLETE_BLOCK_OPEN", e[e.LET_START = 30] = "LET_START", e[e.LET_VALUE = 31] = "LET_VALUE", e[e.LET_END = 32] = "LET_END", e[e.INCOMPLETE_LET = 33] = "INCOMPLETE_LET", e[e.COMPONENT_OPEN_START = 34] = "COMPONENT_OPEN_START", e[e.COMPONENT_OPEN_END = 35] = "COMPONENT_OPEN_END", e[e.COMPONENT_OPEN_END_VOID = 36] = "COMPONENT_OPEN_END_VOID", e[e.COMPONENT_CLOSE = 37] = "COMPONENT_CLOSE", e[e.INCOMPLETE_COMPONENT_OPEN = 38] = "INCOMPLETE_COMPONENT_OPEN", e[e.DIRECTIVE_NAME = 39] = "DIRECTIVE_NAME", e[e.DIRECTIVE_OPEN = 40] = "DIRECTIVE_OPEN", e[e.DIRECTIVE_CLOSE = 41] = "DIRECTIVE_CLOSE", e[e.EOF = 42] = "EOF", e;
  }({});
  Po = /\r\n?/g;
  Mr = function(e) {
    return e.HEX = "hexadecimal", e.DEC = "decimal", e;
  }(Mr || {});
  Do = ["@if", "@else", "@for", "@switch", "@case", "@default", "@empty", "@defer", "@placeholder", "@loading", "@error"];
  ft = { start: "{{", end: "}}" };
  Uo = class Fr extends is2 {
    constructor(t, r) {
      t instanceof Fr ? (super(t), this.internalState = { ...t.internalState }) : (super(t, r), this.internalState = this.state);
    }
    advance() {
      this.state = this.internalState, super.advance(), this.processEscapeSequence();
    }
    init() {
      super.init(), this.processEscapeSequence();
    }
    clone() {
      return new Fr(this);
    }
    getChars(t) {
      let r = t.clone(), n2 = "";
      for (;r.internalState.offset < this.internalState.offset; )
        n2 += String.fromCodePoint(r.peek()), r.advance();
      return n2;
    }
    processEscapeSequence() {
      let t = () => this.internalState.peek;
      if (t() === 92)
        if (this.internalState = { ...this.state }, this.advanceState(this.internalState), t() === 110)
          this.state.peek = 10;
        else if (t() === 114)
          this.state.peek = 13;
        else if (t() === 118)
          this.state.peek = 11;
        else if (t() === 116)
          this.state.peek = 9;
        else if (t() === 98)
          this.state.peek = 8;
        else if (t() === 102)
          this.state.peek = 12;
        else if (t() === 117)
          if (this.advanceState(this.internalState), t() === 123) {
            this.advanceState(this.internalState);
            let r = this.clone(), n2 = 0;
            for (;t() !== 125; )
              this.advanceState(this.internalState), n2++;
            this.state.peek = this.decodeHexDigits(r, n2);
          } else {
            let r = this.clone();
            this.advanceState(this.internalState), this.advanceState(this.internalState), this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 4);
          }
        else if (t() === 120) {
          this.advanceState(this.internalState);
          let r = this.clone();
          this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2);
        } else if (yr(t())) {
          let r = "", n2 = 0, i = this.clone();
          for (;yr(t()) && n2 < 3; )
            i = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n2++;
          this.state.peek = parseInt(r, 8), this.internalState = i.internalState;
        } else
          pt(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
    }
    decodeHexDigits(t, r) {
      let n2 = this.input.slice(t.internalState.offset, t.internalState.offset + r), i = parseInt(n2, 16);
      if (isNaN(i))
        throw t.state = t.internalState, new Vr("Invalid hexadecimal escape sequence", t);
      return i;
    }
  };
  Vr = class extends Error {
    constructor(e, t) {
      super(e), this.msg = e, this.cursor = t, Object.setPrototypeOf(this, new.target.prototype);
    }
  };
  N2 = class os4 extends ne2 {
    static create(t, r, n2) {
      return new os4(t, r, n2);
    }
    constructor(t, r, n2) {
      super(r, n2), this.elementName = t;
    }
  };
  us = class extends ls {
    constructor() {
      super(Be);
    }
    parse(e, t, r, n2 = false, i) {
      return super.parse(e, t, r, n2, i);
    }
  };
  zo = [jo, Xo, Qo, Zo, el, nl, tl, rl, il, Jo];
  ps = Yo;
  al = { features: { experimental_frontMatterSupport: { massageAstNode: true, embed: true, print: true } }, preprocess: ps, print: sl, insertPragma: bi, massageAstNode: dn, embed: fi, getVisitorKeys: _i };
  hs = al;
  ms = [{ name: "Angular", type: "markup", aceMode: "html", extensions: [".component.html"], tmScope: "text.html.basic", aliases: ["xhtml"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["angular"], vscodeLanguageIds: ["html"], filenames: [], linguistLanguageId: 146 }, { name: "HTML", type: "markup", aceMode: "html", extensions: [".html", ".hta", ".htm", ".html.hl", ".inc", ".xht", ".xhtml"], tmScope: "text.html.basic", aliases: ["xhtml"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["html"], vscodeLanguageIds: ["html"], linguistLanguageId: 146 }, { name: "Lightning Web Components", type: "markup", aceMode: "html", extensions: [], tmScope: "text.html.basic", aliases: ["xhtml"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["lwc"], vscodeLanguageIds: ["html"], filenames: [], linguistLanguageId: 146 }, { name: "MJML", type: "markup", aceMode: "html", extensions: [".mjml"], tmScope: "text.mjml.basic", aliases: ["MJML", "mjml"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["mjml"], filenames: [], vscodeLanguageIds: ["mjml"], linguistLanguageId: 146 }, { name: "Vue", type: "markup", aceMode: "vue", extensions: [".vue"], tmScope: "source.vue", codemirrorMode: "vue", codemirrorMimeType: "text/x-vue", parsers: ["vue"], vscodeLanguageIds: ["vue"], linguistLanguageId: 391 }];
  Wr = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, objectWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap object literals.", choices: [{ value: "preserve", description: "Keep as multi-line, if there is a newline between the opening brace and first property." }, { value: "collapse", description: "Fit to a single line when possible." }] }, singleQuote: { category: "Common", type: "boolean", default: false, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { category: "Common", type: "boolean", default: false, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { category: "Common", type: "boolean", default: false, description: "Enforce single attribute per line in HTML, Vue and JSX." } };
  ol = { bracketSameLine: Wr.bracketSameLine, htmlWhitespaceSensitivity: { category: fs2, type: "choice", default: "css", description: "How to handle whitespaces in HTML.", choices: [{ value: "css", description: "Respect the default value of CSS display property." }, { value: "strict", description: "Whitespaces are considered sensitive." }, { value: "ignore", description: "Whitespaces are considered insensitive." }] }, singleAttributePerLine: Wr.singleAttributePerLine, vueIndentScriptAndStyle: { category: fs2, type: "boolean", default: false, description: "Indent script and style tags in Vue files." } };
  ds = ol;
  Qr = {};
  en(Qr, { angular: () => Al, html: () => wl, lwc: () => Nl, mjml: () => xl, vue: () => yl });
  gs = ll;
  cl = { canSelfClose: true, normalizeTagName: false, normalizeAttributeName: false, allowHtmComponentClosingTags: false, isTagNameCaseSensitive: false, shouldParseFrontMatter: true };
  Zt = new Map([["*", new Set(["accesskey", "autocapitalize", "autocorrect", "autofocus", "class", "contenteditable", "dir", "draggable", "enterkeyhint", "exportparts", "hidden", "id", "inert", "inputmode", "is", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "nonce", "part", "popover", "slot", "spellcheck", "style", "tabindex", "title", "translate", "writingsuggestions"])], ["a", new Set(["charset", "coords", "download", "href", "hreflang", "name", "ping", "referrerpolicy", "rel", "rev", "shape", "target", "type"])], ["applet", new Set(["align", "alt", "archive", "code", "codebase", "height", "hspace", "name", "object", "vspace", "width"])], ["area", new Set(["alt", "coords", "download", "href", "hreflang", "nohref", "ping", "referrerpolicy", "rel", "shape", "target", "type"])], ["audio", new Set(["autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src"])], ["base", new Set(["href", "target"])], ["basefont", new Set(["color", "face", "size"])], ["blockquote", new Set(["cite"])], ["body", new Set(["alink", "background", "bgcolor", "link", "text", "vlink"])], ["br", new Set(["clear"])], ["button", new Set(["command", "commandfor", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "popovertarget", "popovertargetaction", "type", "value"])], ["canvas", new Set(["height", "width"])], ["caption", new Set(["align"])], ["col", new Set(["align", "char", "charoff", "span", "valign", "width"])], ["colgroup", new Set(["align", "char", "charoff", "span", "valign", "width"])], ["data", new Set(["value"])], ["del", new Set(["cite", "datetime"])], ["details", new Set(["name", "open"])], ["dialog", new Set(["closedby", "open"])], ["dir", new Set(["compact"])], ["div", new Set(["align"])], ["dl", new Set(["compact"])], ["embed", new Set(["height", "src", "type", "width"])], ["fieldset", new Set(["disabled", "form", "name"])], ["font", new Set(["color", "face", "size"])], ["form", new Set(["accept", "accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"])], ["frame", new Set(["frameborder", "longdesc", "marginheight", "marginwidth", "name", "noresize", "scrolling", "src"])], ["frameset", new Set(["cols", "rows"])], ["h1", new Set(["align"])], ["h2", new Set(["align"])], ["h3", new Set(["align"])], ["h4", new Set(["align"])], ["h5", new Set(["align"])], ["h6", new Set(["align"])], ["head", new Set(["profile"])], ["hr", new Set(["align", "noshade", "size", "width"])], ["html", new Set(["manifest", "version"])], ["iframe", new Set(["align", "allow", "allowfullscreen", "allowpaymentrequest", "allowusermedia", "frameborder", "height", "loading", "longdesc", "marginheight", "marginwidth", "name", "referrerpolicy", "sandbox", "scrolling", "src", "srcdoc", "width"])], ["img", new Set(["align", "alt", "border", "crossorigin", "decoding", "fetchpriority", "height", "hspace", "ismap", "loading", "longdesc", "name", "referrerpolicy", "sizes", "src", "srcset", "usemap", "vspace", "width"])], ["input", new Set(["accept", "align", "alpha", "alt", "autocomplete", "checked", "colorspace", "dirname", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "ismap", "list", "max", "maxlength", "min", "minlength", "multiple", "name", "pattern", "placeholder", "popovertarget", "popovertargetaction", "readonly", "required", "size", "src", "step", "type", "usemap", "value", "width"])], ["ins", new Set(["cite", "datetime"])], ["isindex", new Set(["prompt"])], ["label", new Set(["for", "form"])], ["legend", new Set(["align"])], ["li", new Set(["type", "value"])], ["link", new Set(["as", "blocking", "charset", "color", "crossorigin", "disabled", "fetchpriority", "href", "hreflang", "imagesizes", "imagesrcset", "integrity", "media", "referrerpolicy", "rel", "rev", "sizes", "target", "type"])], ["map", new Set(["name"])], ["menu", new Set(["compact"])], ["meta", new Set(["charset", "content", "http-equiv", "media", "name", "scheme"])], ["meter", new Set(["high", "low", "max", "min", "optimum", "value"])], ["object", new Set(["align", "archive", "border", "classid", "codebase", "codetype", "data", "declare", "form", "height", "hspace", "name", "standby", "type", "typemustmatch", "usemap", "vspace", "width"])], ["ol", new Set(["compact", "reversed", "start", "type"])], ["optgroup", new Set(["disabled", "label"])], ["option", new Set(["disabled", "label", "selected", "value"])], ["output", new Set(["for", "form", "name"])], ["p", new Set(["align"])], ["param", new Set(["name", "type", "value", "valuetype"])], ["pre", new Set(["width"])], ["progress", new Set(["max", "value"])], ["q", new Set(["cite"])], ["script", new Set(["async", "blocking", "charset", "crossorigin", "defer", "fetchpriority", "integrity", "language", "nomodule", "referrerpolicy", "src", "type"])], ["select", new Set(["autocomplete", "disabled", "form", "multiple", "name", "required", "size"])], ["slot", new Set(["name"])], ["source", new Set(["height", "media", "sizes", "src", "srcset", "type", "width"])], ["style", new Set(["blocking", "media", "type"])], ["table", new Set(["align", "bgcolor", "border", "cellpadding", "cellspacing", "frame", "rules", "summary", "width"])], ["tbody", new Set(["align", "char", "charoff", "valign"])], ["td", new Set(["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"])], ["template", new Set(["shadowrootclonable", "shadowrootcustomelementregistry", "shadowrootdelegatesfocus", "shadowrootmode", "shadowrootserializable"])], ["textarea", new Set(["autocomplete", "cols", "dirname", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "wrap"])], ["tfoot", new Set(["align", "char", "charoff", "valign"])], ["th", new Set(["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"])], ["thead", new Set(["align", "char", "charoff", "valign"])], ["time", new Set(["datetime"])], ["tr", new Set(["align", "bgcolor", "char", "charoff", "valign"])], ["track", new Set(["default", "kind", "label", "src", "srclang"])], ["ul", new Set(["compact", "type"])], ["video", new Set(["autoplay", "controls", "crossorigin", "height", "loop", "muted", "playsinline", "poster", "preload", "src", "width"])]]);
  _s = new Set(["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fencedframe", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "math", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nextid", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rb", "rbc", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "search", "section", "select", "selectedcontent", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp"]);
  er = { attrs: true, children: true, cases: true, expression: true };
  Ss = new Set(["parent"]);
  oe = new WeakSet, $r = function() {
    return this.kind === "angularIcuCase" ? "expression" : this.kind === "angularIcuExpression" ? "cases" : "children";
  }, zr = function() {
    return this.parent?.$children ?? [];
  };
  tr = We;
  pl = [{ regex: /^(?<openingTagSuffix>\[if(?<condition>[^\]]*)\]>)(?<data>.*?)<!\s*\[endif\]$/su, parse: hl }, { regex: /^\[if(?<condition>[^\]]*)\]><!$/u, parse: ml }, { regex: /^<!\s*\[endif\]$/u, parse: fl }];
  Yr = class extends Pr {
    visitExpansionCase(t, r) {
      r.parseOptions.name === "angular" && this.visitChildren(r, (n2) => {
        n2(t.expression);
      });
    }
    visit(t, { parseOptions: r }) {
      Sl(t), El(t, r), vl(t, r), Cl(t);
    }
  };
  rr = Jt({ name: "html", normalizeTagName: true, normalizeAttributeName: true, allowHtmComponentClosingTags: true });
  wl = gt2(rr);
  kl = new Set(["mj-style", "mj-raw"]);
  xl = gt2({ ...rr, name: "mjml", shouldParseAsRawText: (e) => kl.has(e) });
  Al = gt2({ name: "angular", tokenizeAngularBlocks: true, tokenizeAngularLetDeclaration: true });
  yl = gt2({ name: "vue", isTagNameCaseSensitive: true, shouldParseAsRawText(e, t, r, n2) {
    return e.toLowerCase() !== "html" && !r && (e !== "template" || n2.some(({ name: i, value: s }) => i === "lang" && s !== "html" && s !== "" && s !== undefined));
  } });
  Nl = gt2({ name: "lwc", canSelfClose: false });
  Ll = { html: hs };
});

// ../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/standalone.mjs
function Ut2(e, t, u) {
  return ku.diff(e, t, u);
}
function Yu(e) {
  let t = e.indexOf(Wt2);
  return t !== -1 ? e.charAt(t + 1) === Je2 ? Lu : Ru : fo;
}
function Se2(e) {
  return e === Ru ? Wt2 : e === Lu ? Mu : lo2;
}
function $t(e, t) {
  let u = po.get(t);
  return e.match(u)?.length ?? 0;
}
function ju(e) {
  return oe2(0, e, Fo2, Je2);
}
function mo(e) {
  return this[e < 0 ? this.length + e : e];
}
function Uu(e) {
  let t = e.length;
  for (;t > 0 && (e[t - 1] === "\r" || e[t - 1] === `
`); )
    t--;
  return t < e.length ? e.slice(0, t) : e;
}
function Co(e) {
  if (typeof e == "string")
    return G2;
  if (Array.isArray(e))
    return j2;
  if (!e)
    return;
  let { type: t } = e;
  if (He.has(t))
    return t;
}
function go(e) {
  let t = e === null ? "null" : typeof e;
  if (t !== "string" && t !== "object")
    return `Unexpected doc '${t}', 
Expected it to be 'string' or 'object'.`;
  if (H2(e))
    throw new Error("doc is valid.");
  let u = Object.prototype.toString.call(e);
  if (u !== "[object Object]")
    return `Unexpected doc '${u}'.`;
  let r = ho([...He].map((o) => `'${o}'`));
  return `Unexpected doc.type '${e.type}'.
Expected it to be ${r}.`;
}
function yo(e, t, u, r) {
  let o = [e];
  for (;o.length > 0; ) {
    let n2 = o.pop();
    if (n2 === Wu) {
      u(o.pop());
      continue;
    }
    u && o.push(n2, Wu);
    let a = H2(n2);
    if (!a)
      throw new Z(n2);
    if (t?.(n2) !== false)
      switch (a) {
        case j2:
        case w2: {
          let s = a === j2 ? n2 : n2.parts;
          for (let i = s.length, D3 = i - 1;D3 >= 0; --D3)
            o.push(s[D3]);
          break;
        }
        case B:
          o.push(n2.flatContents, n2.breakContents);
          break;
        case x2:
          if (r && n2.expandedStates)
            for (let s = n2.expandedStates.length, i = s - 1;i >= 0; --i)
              o.push(n2.expandedStates[i]);
          else
            o.push(n2.contents);
          break;
        case k3:
        case I2:
        case R3:
        case O3:
        case L2:
          o.push(n2.contents);
          break;
        case G2:
        case U2:
        case v3:
        case M:
        case _3:
        case T2:
          break;
        default:
          throw new Z(n2);
      }
  }
}
function Pe2(e, t) {
  if (typeof e == "string")
    return t(e);
  let u = new Map;
  return r(e);
  function r(n2) {
    if (u.has(n2))
      return u.get(n2);
    let a = o(n2);
    return u.set(n2, a), a;
  }
  function o(n2) {
    switch (H2(n2)) {
      case j2:
        return t(n2.map(r));
      case w2:
        return t({ ...n2, parts: n2.parts.map(r) });
      case B:
        return t({ ...n2, breakContents: r(n2.breakContents), flatContents: r(n2.flatContents) });
      case x2: {
        let { expandedStates: a, contents: s } = n2;
        return a ? (a = a.map(r), s = a[0]) : s = r(s), t({ ...n2, contents: s, expandedStates: a });
      }
      case k3:
      case I2:
      case R3:
      case O3:
      case L2:
        return t({ ...n2, contents: r(n2.contents) });
      case G2:
      case U2:
      case v3:
      case M:
      case _3:
      case T2:
        return t(n2);
      default:
        throw new Z(n2);
    }
  }
}
function Xe2(e, t, u) {
  let r = u, o = false;
  function n2(a) {
    if (o)
      return false;
    let s = t(a);
    s !== undefined && (o = true, r = s);
  }
  return we2(e, n2), r;
}
function bo(e) {
  if (e.type === x2 && e.break || e.type === _3 && e.hard || e.type === T2)
    return true;
}
function Ku(e) {
  return Xe2(e, bo, false);
}
function $u(e) {
  if (e.length > 0) {
    let t = b3(0, e, -1);
    !t.expandedStates && !t.break && (t.break = "propagated");
  }
  return null;
}
function Gu(e) {
  let t = new Set, u = [];
  function r(n2) {
    if (n2.type === T2 && $u(u), n2.type === x2) {
      if (u.push(n2), t.has(n2))
        return false;
      t.add(n2);
    }
  }
  function o(n2) {
    n2.type === x2 && u.pop().break && $u(u);
  }
  we2(e, r, o, true);
}
function Ao(e) {
  return e.type === _3 && !e.hard ? e.soft ? "" : " " : e.type === B ? e.flatContents : e;
}
function zu(e) {
  return Pe2(e, Ao);
}
function Vu(e) {
  for (e = [...e];e.length >= 2 && b3(0, e, -2).type === _3 && b3(0, e, -1).type === T2; )
    e.length -= 2;
  if (e.length > 0) {
    let t = Oe2(b3(0, e, -1));
    e[e.length - 1] = t;
  }
  return e;
}
function Oe2(e) {
  switch (H2(e)) {
    case I2:
    case R3:
    case x2:
    case L2:
    case O3: {
      let t = Oe2(e.contents);
      return { ...e, contents: t };
    }
    case B:
      return { ...e, breakContents: Oe2(e.breakContents), flatContents: Oe2(e.flatContents) };
    case w2:
      return { ...e, parts: Vu(e.parts) };
    case j2:
      return Vu(e);
    case G2:
      return Uu(e);
    case k3:
    case U2:
    case v3:
    case M:
    case _3:
    case T2:
      break;
    default:
      throw new Z(e);
  }
  return e;
}
function qe2(e) {
  return Oe2(xo(e));
}
function _o(e) {
  switch (H2(e)) {
    case w2:
      if (e.parts.every((t) => t === ""))
        return "";
      break;
    case x2:
      if (!e.contents && !e.id && !e.break && !e.expandedStates)
        return "";
      if (e.contents.type === x2 && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates)
        return e.contents;
      break;
    case k3:
    case I2:
    case R3:
    case L2:
      if (!e.contents)
        return "";
      break;
    case B:
      if (!e.flatContents && !e.breakContents)
        return "";
      break;
    case j2: {
      let t = [];
      for (let u of e) {
        if (!u)
          continue;
        let [r, ...o] = Array.isArray(u) ? u : [u];
        typeof r == "string" && typeof b3(0, t, -1) == "string" ? t[t.length - 1] += r : t.push(r), t.push(...o);
      }
      return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
    }
    case G2:
    case U2:
    case v3:
    case M:
    case _3:
    case O3:
    case T2:
      break;
    default:
      throw new Z(e);
  }
  return e;
}
function xo(e) {
  return Pe2(e, (t) => _o(t));
}
function Ju(e, t = Qe2) {
  return Pe2(e, (u) => typeof u == "string" ? Ie2(t, u.split(`
`)) : u);
}
function Bo2(e) {
  if (e.type === _3)
    return true;
}
function Hu(e) {
  return Xe2(e, Bo2, false);
}
function Ee2(e, t) {
  return e.type === O3 ? { ...e, contents: t(e.contents) } : t(e);
}
function ae(e) {
  return N3(e), { type: I2, contents: e };
}
function De2(e, t) {
  return qu(e), N3(t), { type: k3, contents: t, n: e };
}
function Qu(e) {
  return De2(Number.NEGATIVE_INFINITY, e);
}
function et2(e) {
  return De2({ type: "root" }, e);
}
function Zu(e) {
  return De2(-1, e);
}
function tt2(e, t, u) {
  N3(e);
  let r = e;
  if (t > 0) {
    for (let o = 0;o < Math.floor(t / u); ++o)
      r = ae(r);
    r = De2(t % u, r), r = De2(Number.NEGATIVE_INFINITY, r);
  }
  return r;
}
function er2(e) {
  return Xu(e), { type: w2, parts: e };
}
function Kt(e, t = {}) {
  return N3(e), Ze2(t.expandedStates, true), { type: x2, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
}
function tr2(e, t) {
  return Kt(e[0], { ...t, expandedStates: e });
}
function ur2(e, t = "", u = {}) {
  return N3(e), t !== "" && N3(t), { type: B, breakContents: e, flatContents: t, groupId: u.groupId };
}
function rr2(e, t) {
  return N3(e), { type: R3, contents: e, groupId: t.groupId, negate: t.negate };
}
function Ie2(e, t) {
  N3(e), Ze2(t);
  let u = [];
  for (let r = 0;r < t.length; r++)
    r !== 0 && u.push(e), u.push(t[r]);
  return u;
}
function nr(e, t) {
  return N3(t), e ? { type: O3, label: e, contents: t } : t;
}
function ve2(e) {
  return N3(e), { type: L2, contents: e };
}
function te2(e) {
  if (!e)
    return "";
  if (Array.isArray(e)) {
    let t = [];
    for (let u of e)
      if (Array.isArray(u))
        t.push(...te2(u));
      else {
        let r = te2(u);
        r !== "" && t.push(r);
      }
    return t;
  }
  return e.type === B ? { ...e, breakContents: te2(e.breakContents), flatContents: te2(e.flatContents) } : e.type === x2 ? { ...e, contents: te2(e.contents), expandedStates: e.expandedStates?.map(te2) } : e.type === w2 ? { type: "fill", parts: e.parts.map(te2) } : e.contents ? { ...e, contents: te2(e.contents) } : e;
}
function sr2(e) {
  let t = Object.create(null), u = new Set;
  return r(te2(e));
  function r(n2, a, s) {
    if (typeof n2 == "string")
      return JSON.stringify(n2);
    if (Array.isArray(n2)) {
      let i = n2.map(r).filter(Boolean);
      return i.length === 1 ? i[0] : `[${i.join(", ")}]`;
    }
    if (n2.type === _3) {
      let i = s?.[a + 1]?.type === T2;
      return n2.literal ? i ? "literalline" : "literallineWithoutBreakParent" : n2.hard ? i ? "hardline" : "hardlineWithoutBreakParent" : n2.soft ? "softline" : "line";
    }
    if (n2.type === T2)
      return s?.[a - 1]?.type === _3 && s[a - 1].hard ? undefined : "breakParent";
    if (n2.type === v3)
      return "trim";
    if (n2.type === I2)
      return "indent(" + r(n2.contents) + ")";
    if (n2.type === k3)
      return n2.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + r(n2.contents) + ")" : n2.n < 0 ? "dedent(" + r(n2.contents) + ")" : n2.n.type === "root" ? "markAsRoot(" + r(n2.contents) + ")" : "align(" + JSON.stringify(n2.n) + ", " + r(n2.contents) + ")";
    if (n2.type === B)
      return "ifBreak(" + r(n2.breakContents) + (n2.flatContents ? ", " + r(n2.flatContents) : "") + (n2.groupId ? (n2.flatContents ? "" : ', ""') + `, { groupId: ${o(n2.groupId)} }` : "") + ")";
    if (n2.type === R3) {
      let i = [];
      n2.negate && i.push("negate: true"), n2.groupId && i.push(`groupId: ${o(n2.groupId)}`);
      let D3 = i.length > 0 ? `, { ${i.join(", ")} }` : "";
      return `indentIfBreak(${r(n2.contents)}${D3})`;
    }
    if (n2.type === x2) {
      let i = [];
      n2.break && n2.break !== "propagated" && i.push("shouldBreak: true"), n2.id && i.push(`id: ${o(n2.id)}`);
      let D3 = i.length > 0 ? `, { ${i.join(", ")} }` : "";
      return n2.expandedStates ? `conditionalGroup([${n2.expandedStates.map((f3) => r(f3)).join(",")}]${D3})` : `group(${r(n2.contents)}${D3})`;
    }
    if (n2.type === w2)
      return `fill([${n2.parts.map((i) => r(i)).join(", ")}])`;
    if (n2.type === L2)
      return "lineSuffix(" + r(n2.contents) + ")";
    if (n2.type === M)
      return "lineSuffixBoundary";
    if (n2.type === O3)
      return `label(${JSON.stringify(n2.label)}, ${r(n2.contents)})`;
    if (n2.type === U2)
      return "cursor";
    throw new Error("Unknown doc type " + n2.type);
  }
  function o(n2) {
    if (typeof n2 != "symbol")
      return JSON.stringify(String(n2));
    if (n2 in t)
      return t[n2];
    let a = n2.description || "symbol";
    for (let s = 0;; s++) {
      let i = a + (s > 0 ? ` #${s}` : "");
      if (!u.has(i))
        return u.add(i), t[n2] = `Symbol.for(${JSON.stringify(i)})`;
    }
  }
}
function zt2(e) {
  return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
}
function Jt2(e) {
  return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e >= 94192 && e <= 94198 || e >= 94208 && e <= 101589 || e >= 101631 && e <= 101662 || e >= 101760 && e <= 101874 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128728 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129674 || e >= 129678 && e <= 129734 || e === 129736 || e >= 129741 && e <= 129756 || e >= 129759 && e <= 129770 || e >= 129775 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
}
function So(e) {
  if (!e)
    return 0;
  if (!To.test(e))
    return e.length;
  e = e.replace(Dr(), (u) => No.has(u) ? " " : "  ");
  let t = 0;
  for (let u of e) {
    let r = u.codePointAt(0);
    r <= 31 || r >= 127 && r <= 159 || r >= 768 && r <= 879 || r >= 65024 && r <= 65039 || (t += zt2(r) || Jt2(r) ? 2 : 1);
  }
  return t;
}
function fr2(e, t, u) {
  let r = t.type === 1 ? e.queue.slice(0, -1) : [...e.queue, t], o = "", n2 = 0, a = 0, s = 0;
  for (let p2 of r)
    switch (p2.type) {
      case 0:
        f3(), u.useTabs ? i(1) : D3(u.tabWidth);
        break;
      case 3: {
        let { string: F2 } = p2;
        f3(), o += F2, n2 += F2.length;
        break;
      }
      case 2: {
        let { width: F2 } = p2;
        a += 1, s += F2;
        break;
      }
      default:
        throw new Error(`Unexpected indent comment '${p2.type}'.`);
    }
  return d2(), { ...e, value: o, length: n2, queue: r };
  function i(p2) {
    o += "\t".repeat(p2), n2 += u.tabWidth * p2;
  }
  function D3(p2) {
    o += " ".repeat(p2), n2 += p2;
  }
  function f3() {
    u.useTabs ? l2() : d2();
  }
  function l2() {
    a > 0 && i(a), c();
  }
  function d2() {
    s > 0 && D3(s), c();
  }
  function c() {
    a = 0, s = 0;
  }
}
function lr2(e, t, u) {
  if (!t)
    return e;
  if (t.type === "root")
    return { ...e, root: e };
  if (t === Number.NEGATIVE_INFINITY)
    return e.root;
  let r;
  return typeof t == "number" ? t < 0 ? r = Oo2 : r = { type: 2, width: t } : r = { type: 3, string: t }, fr2(e, r, u);
}
function dr2(e, t) {
  return fr2(e, wo, t);
}
function Po2(e) {
  let t = 0;
  for (let u = e.length - 1;u >= 0; u--) {
    let r = e[u];
    if (r === " " || r === "\t")
      t++;
    else
      break;
  }
  return t;
}
function Xt(e) {
  let t = Po2(e);
  return { text: t === 0 ? e : e.slice(0, e.length - t), count: t };
}
function rt2(e, t, u, r, o, n2) {
  if (u === Number.POSITIVE_INFINITY)
    return true;
  let a = t.length, s = false, i = [e], D3 = "";
  for (;u >= 0; ) {
    if (i.length === 0) {
      if (a === 0)
        return true;
      i.push(t[--a]);
      continue;
    }
    let { mode: f3, doc: l2 } = i.pop(), d2 = H2(l2);
    switch (d2) {
      case G2:
        l2 && (s && (D3 += " ", u -= 1, s = false), D3 += l2, u -= Re2(l2));
        break;
      case j2:
      case w2: {
        let c = d2 === j2 ? l2 : l2.parts, p2 = l2[qt2] ?? 0;
        for (let F2 = c.length - 1;F2 >= p2; F2--)
          i.push({ mode: f3, doc: c[F2] });
        break;
      }
      case I2:
      case k3:
      case R3:
      case O3:
        i.push({ mode: f3, doc: l2.contents });
        break;
      case v3: {
        let { text: c, count: p2 } = Xt(D3);
        D3 = c, u += p2;
        break;
      }
      case x2: {
        if (n2 && l2.break)
          return false;
        let c = l2.break ? W2 : f3, p2 = l2.expandedStates && c === W2 ? b3(0, l2.expandedStates, -1) : l2.contents;
        i.push({ mode: c, doc: p2 });
        break;
      }
      case B: {
        let p2 = (l2.groupId ? o[l2.groupId] || q2 : f3) === W2 ? l2.breakContents : l2.flatContents;
        p2 && i.push({ mode: f3, doc: p2 });
        break;
      }
      case _3:
        if (f3 === W2 || l2.hard)
          return true;
        l2.soft || (s = true);
        break;
      case L2:
        r = true;
        break;
      case M:
        if (r)
          return false;
        break;
    }
  }
  return false;
}
function Ce2(e, t) {
  let u = Object.create(null), r = t.printWidth, o = Se2(t.endOfLine), n2 = 0, a = [{ indent: Ht2, mode: W2, doc: e }], s = "", i = false, D3 = [], f3 = [], l2 = [], d2 = [], c = 0;
  for (Gu(e);a.length > 0; ) {
    let { indent: m2, mode: h8, doc: E } = a.pop();
    switch (H2(E)) {
      case G2: {
        let g2 = o !== `
` ? oe2(0, E, `
`, o) : E;
        g2 && (s += g2, a.length > 0 && (n2 += Re2(g2)));
        break;
      }
      case j2:
        for (let g2 = E.length - 1;g2 >= 0; g2--)
          a.push({ indent: m2, mode: h8, doc: E[g2] });
        break;
      case U2:
        if (f3.length >= 2)
          throw new Error("There are too many 'cursor' in doc.");
        f3.push(c + s.length);
        break;
      case I2:
        a.push({ indent: dr2(m2, t), mode: h8, doc: E.contents });
        break;
      case k3:
        a.push({ indent: lr2(m2, E.n, t), mode: h8, doc: E.contents });
        break;
      case v3:
        y3();
        break;
      case x2:
        switch (h8) {
          case q2:
            if (!i) {
              a.push({ indent: m2, mode: E.break ? W2 : q2, doc: E.contents });
              break;
            }
          case W2: {
            i = false;
            let g2 = { indent: m2, mode: q2, doc: E.contents }, A2 = r - n2, J2 = D3.length > 0;
            if (!E.break && rt2(g2, a, A2, J2, u))
              a.push(g2);
            else if (E.expandedStates) {
              let Q2 = b3(0, E.expandedStates, -1);
              if (E.break) {
                a.push({ indent: m2, mode: W2, doc: Q2 });
                break;
              } else
                for (let re2 = 1;re2 < E.expandedStates.length + 1; re2++)
                  if (re2 >= E.expandedStates.length) {
                    a.push({ indent: m2, mode: W2, doc: Q2 });
                    break;
                  } else {
                    let Te2 = E.expandedStates[re2], ne3 = { indent: m2, mode: q2, doc: Te2 };
                    if (rt2(ne3, a, A2, J2, u)) {
                      a.push(ne3);
                      break;
                    }
                  }
            } else
              a.push({ indent: m2, mode: W2, doc: E.contents });
            break;
          }
        }
        E.id && (u[E.id] = b3(0, a, -1).mode);
        break;
      case w2: {
        let g2 = r - n2, A2 = E[qt2] ?? 0, { parts: J2 } = E, Q2 = J2.length - A2;
        if (Q2 === 0)
          break;
        let re2 = J2[A2 + 0], Te2 = J2[A2 + 1], ne3 = { indent: m2, mode: q2, doc: re2 }, vt2 = { indent: m2, mode: W2, doc: re2 }, Rt2 = rt2(ne3, [], g2, D3.length > 0, u, true);
        if (Q2 === 1) {
          Rt2 ? a.push(ne3) : a.push(vt2);
          break;
        }
        let Iu = { indent: m2, mode: q2, doc: Te2 }, Lt2 = { indent: m2, mode: W2, doc: Te2 };
        if (Q2 === 2) {
          Rt2 ? a.push(Iu, ne3) : a.push(Lt2, vt2);
          break;
        }
        let Xn2 = J2[A2 + 2], qn2 = { indent: m2, mode: h8, doc: { ...E, [qt2]: A2 + 2 } }, Qn2 = rt2({ indent: m2, mode: q2, doc: [re2, Te2, Xn2] }, [], g2, D3.length > 0, u, true);
        a.push(qn2), Qn2 ? a.push(Iu, ne3) : Rt2 ? a.push(Lt2, ne3) : a.push(Lt2, vt2);
        break;
      }
      case B:
      case R3: {
        let g2 = E.groupId ? u[E.groupId] : h8;
        if (g2 === W2) {
          let A2 = E.type === B ? E.breakContents : E.negate ? E.contents : ae(E.contents);
          A2 && a.push({ indent: m2, mode: h8, doc: A2 });
        }
        if (g2 === q2) {
          let A2 = E.type === B ? E.flatContents : E.negate ? ae(E.contents) : E.contents;
          A2 && a.push({ indent: m2, mode: h8, doc: A2 });
        }
        break;
      }
      case L2:
        D3.push({ indent: m2, mode: h8, doc: E.contents });
        break;
      case M:
        D3.length > 0 && a.push({ indent: m2, mode: h8, doc: ke });
        break;
      case _3:
        switch (h8) {
          case q2:
            if (E.hard)
              i = true;
            else {
              E.soft || (s += " ", n2 += 1);
              break;
            }
          case W2:
            if (D3.length > 0) {
              a.push({ indent: m2, mode: h8, doc: E }, ...D3.reverse()), D3.length = 0;
              break;
            }
            E.literal ? (s += o, n2 = 0, m2.root && (m2.root.value && (s += m2.root.value), n2 = m2.root.length)) : (y3(), s += o + m2.value, n2 = m2.length);
            break;
        }
        break;
      case O3:
        a.push({ indent: m2, mode: h8, doc: E.contents });
        break;
      case T2:
        break;
      default:
        throw new Z(E);
    }
    a.length === 0 && D3.length > 0 && (a.push(...D3.reverse()), D3.length = 0);
  }
  let p2 = l2.join("") + s, F2 = [...d2, ...f3];
  if (F2.length !== 2)
    return { formatted: p2 };
  let C2 = F2[0];
  return { formatted: p2, cursorNodeStart: C2, cursorNodeText: p2.slice(C2, b3(0, F2, -1)) };
  function y3() {
    let { text: m2, count: h8 } = Xt(s);
    m2 && (l2.push(m2), c += m2.length), s = "", n2 -= h8, f3.length > 0 && (d2.push(...f3.map((E) => Math.min(E, c))), f3.length = 0);
  }
}
function Io2(e, t, u = 0) {
  let r = 0;
  for (let o = u;o < e.length; ++o)
    e[o] === "\t" ? r = r + t - r % t : r++;
  return r;
}
function ko(e) {
  return e !== null && typeof e == "object";
}
function ye2(e) {
  return (t, u, r) => {
    let o = !!r?.backwards;
    if (u === false)
      return false;
    let { length: n2 } = t, a = u;
    for (;a >= 0 && a < n2; ) {
      let s = t.charAt(a);
      if (e instanceof RegExp) {
        if (!e.test(s))
          return a;
      } else if (!e.includes(s))
        return a;
      o ? a-- : a++;
    }
    return a === -1 || a === n2 ? a : false;
  };
}
function vo(e, t, u) {
  let r = !!u?.backwards;
  if (t === false)
    return false;
  let o = e.charAt(t);
  if (r) {
    if (e.charAt(t - 1) === "\r" && o === `
`)
      return t - 2;
    if (mr2(o))
      return t - 1;
  } else {
    if (o === "\r" && e.charAt(t + 1) === `
`)
      return t + 2;
    if (mr2(o))
      return t + 1;
  }
  return t;
}
function Ro2(e, t, u = {}) {
  let r = Y2(e, u.backwards ? t - 1 : t, u), o = K2(e, r, u);
  return r !== o;
}
function Lo2(e) {
  return Array.isArray(e) && e.length > 0;
}
function* be2(e, t) {
  let { getVisitorKeys: u, filter: r = () => true } = t, o = (n2) => ge2(n2) && r(n2);
  for (let n2 of u(e)) {
    let a = e[n2];
    if (Array.isArray(a))
      for (let s of a)
        o(s) && (yield s);
    else
      o(a) && (yield a);
  }
}
function* Cr2(e, t) {
  let u = [e];
  for (let r = 0;r < u.length; r++) {
    let o = u[r];
    for (let n2 of be2(o, t))
      yield n2, u.push(n2);
  }
}
function hr3(e, t) {
  return be2(e, t).next().done;
}
function gr2(e, t, u) {
  let { cache: r } = u;
  if (r.has(e))
    return r.get(e);
  let { filter: o } = u;
  if (!o)
    return [];
  let n2, a = (u.getChildren?.(e, u) ?? [...be2(e, { getVisitorKeys: u.getVisitorKeys })]).flatMap((D3) => (n2 ?? (n2 = [e, ...t]), o(D3, n2) ? [D3] : gr2(D3, n2, u))), { locStart: s, locEnd: i } = u;
  return a.sort((D3, f3) => s(D3) - s(f3) || i(D3) - i(f3)), r.set(e, a), a;
}
function Mo2(e) {
  let t = e.type || e.kind || "(unknown type)", u = String(e.name || e.id && (typeof e.id == "object" ? e.id.name : e.id) || e.key && (typeof e.key == "object" ? e.key.name : e.key) || e.value && (typeof e.value == "object" ? "" : String(e.value)) || e.operator || "");
  return u.length > 20 && (u = u.slice(0, 19) + "…"), t + (u ? " " + u : "");
}
function Zt2(e, t) {
  (e.comments ?? (e.comments = [])).push(t), t.printed = false, t.nodeDescription = Mo2(e);
}
function fe2(e, t) {
  t.leading = true, t.trailing = false, Zt2(e, t);
}
function ue2(e, t, u) {
  t.leading = false, t.trailing = false, u && (t.marker = u), Zt2(e, t);
}
function le(e, t) {
  t.leading = false, t.trailing = true, Zt2(e, t);
}
function br3(e, t, u, r, o = []) {
  let { locStart: n2, locEnd: a } = u, s = n2(t), i = a(t), D3 = at2(e, o, { cache: uu, locStart: n2, locEnd: a, getVisitorKeys: u.getVisitorKeys, filter: u.printer.canAttachComment, getChildren: u.printer.getCommentChildNodes }), f3, l2, d2 = 0, c = D3.length;
  for (;d2 < c; ) {
    let p2 = d2 + c >> 1, F2 = D3[p2], C2 = n2(F2), y3 = a(F2);
    if (C2 <= s && i <= y3)
      return br3(F2, t, u, F2, [F2, ...o]);
    if (y3 <= s) {
      f3 = F2, d2 = p2 + 1;
      continue;
    }
    if (i <= C2) {
      l2 = F2, c = p2;
      continue;
    }
    throw new Error("Comment location overlaps with node location");
  }
  if (r?.type === "TemplateLiteral") {
    let { quasis: p2 } = r, F2 = tu(p2, t, u);
    f3 && tu(p2, f3, u) !== F2 && (f3 = null), l2 && tu(p2, l2, u) !== F2 && (l2 = null);
  }
  return { enclosingNode: r, precedingNode: f3, followingNode: l2 };
}
function Ar2(e, t) {
  let { comments: u } = e;
  if (delete e.comments, !Er2(u) || !t.printer.canAttachComment)
    return;
  let r = [], { printer: { features: { experimental_avoidAstMutation: o }, handleComments: n2 = {} }, originalText: a } = t, { ownLine: s = eu, endOfLine: i = eu, remaining: D3 = eu } = n2, f3 = u.map((l2, d2) => ({ ...br3(e, l2, t), comment: l2, text: a, options: t, ast: e, isLastComment: u.length - 1 === d2 }));
  for (let [l2, d2] of f3.entries()) {
    let { comment: c, precedingNode: p2, enclosingNode: F2, followingNode: C2, text: y3, options: m2, ast: h8, isLastComment: E } = d2, g2;
    if (o ? g2 = [d2] : (c.enclosingNode = F2, c.precedingNode = p2, c.followingNode = C2, g2 = [c, y3, m2, h8, E]), Yo2(y3, m2, f3, l2))
      c.placement = "ownLine", s(...g2) || (C2 ? fe2(C2, c) : p2 ? le(p2, c) : F2 ? ue2(F2, c) : ue2(h8, c));
    else if (jo2(y3, m2, f3, l2))
      c.placement = "endOfLine", i(...g2) || (p2 ? le(p2, c) : C2 ? fe2(C2, c) : F2 ? ue2(F2, c) : ue2(h8, c));
    else if (c.placement = "remaining", !D3(...g2))
      if (p2 && C2) {
        let A2 = r.length;
        A2 > 0 && r[A2 - 1].followingNode !== C2 && yr2(r, m2), r.push(d2);
      } else
        p2 ? le(p2, c) : C2 ? fe2(C2, c) : F2 ? ue2(F2, c) : ue2(h8, c);
  }
  if (yr2(r, t), !o)
    for (let l2 of u)
      delete l2.precedingNode, delete l2.enclosingNode, delete l2.followingNode;
}
function Yo2(e, t, u, r) {
  let { comment: o, precedingNode: n2 } = u[r], { locStart: a, locEnd: s } = t, i = a(o);
  if (n2)
    for (let D3 = r - 1;D3 >= 0; D3--) {
      let { comment: f3, precedingNode: l2 } = u[D3];
      if (l2 !== n2 || !_r2(e.slice(s(f3), i)))
        break;
      i = a(f3);
    }
  return z2(e, i, { backwards: true });
}
function jo2(e, t, u, r) {
  let { comment: o, followingNode: n2 } = u[r], { locStart: a, locEnd: s } = t, i = s(o);
  if (n2)
    for (let D3 = r + 1;D3 < u.length; D3++) {
      let { comment: f3, followingNode: l2 } = u[D3];
      if (l2 !== n2 || !_r2(e.slice(i, a(f3))))
        break;
      i = s(f3);
    }
  return z2(e, i);
}
function yr2(e, t) {
  let u = e.length;
  if (u === 0)
    return;
  let { precedingNode: r, followingNode: o } = e[0], n2 = t.locStart(o), a;
  for (a = u;a > 0; --a) {
    let { comment: s, precedingNode: i, followingNode: D3 } = e[a - 1];
    P2(i, r), P2(D3, o);
    let f3 = t.originalText.slice(t.locEnd(s), n2);
    if (t.printer.isGap?.(f3, t) ?? /^[\s(]*$/u.test(f3))
      n2 = t.locStart(s);
    else
      break;
  }
  for (let [s, { comment: i }] of e.entries())
    s < a ? le(r, i) : fe2(o, i);
  for (let s of [r, o])
    s.comments && s.comments.length > 1 && s.comments.sort((i, D3) => t.locStart(i) - t.locStart(D3));
  e.length = 0;
}
function tu(e, t, u) {
  let r = u.locStart(t) - 1;
  for (let o = 1;o < e.length; ++o)
    if (r < u.locStart(e[o]))
      return o - 1;
  return 0;
}
function Uo2(e, t) {
  let u = t - 1;
  u = Y2(e, u, { backwards: true }), u = K2(e, u, { backwards: true }), u = Y2(e, u, { backwards: true });
  let r = K2(e, u, { backwards: true });
  return u !== r;
}
function xr2(e, t) {
  let u = e.node;
  return u.printed = true, t.printer.printComment(e, t);
}
function Wo2(e, t) {
  let u = e.node, r = [xr2(e, t)], { printer: o, originalText: n2, locStart: a, locEnd: s } = t;
  if (o.isBlockComment?.(u)) {
    let f3 = z2(n2, s(u)) ? z2(n2, a(u), { backwards: true }) ? V2 : ut2 : " ";
    r.push(f3);
  } else
    r.push(V2);
  let D3 = K2(n2, Y2(n2, s(u)));
  return D3 !== false && z2(n2, D3) && r.push(V2), r;
}
function $o2(e, t, u) {
  let r = e.node, o = xr2(e, t), { printer: n2, originalText: a, locStart: s } = t, i = n2.isBlockComment?.(r);
  if (u?.hasLineSuffix && !u?.isBlock || z2(a, s(r), { backwards: true })) {
    let D3 = Le2(a, s(r));
    return { doc: ve2([V2, D3 ? V2 : "", o]), isBlock: i, hasLineSuffix: true };
  }
  return !i || u?.hasLineSuffix ? { doc: [ve2([" ", o]), ce2], isBlock: i, hasLineSuffix: true } : { doc: [" ", o], isBlock: i, hasLineSuffix: false };
}
function Vo2(e, t) {
  let u = e.node;
  if (!u)
    return {};
  let r = t[Symbol.for("printedComments")];
  if ((u.comments || []).filter((i) => !r.has(i)).length === 0)
    return { leading: "", trailing: "" };
  let n2 = [], a = [], s;
  return e.each(() => {
    let i = e.node;
    if (r?.has(i))
      return;
    let { leading: D3, trailing: f3 } = i;
    D3 ? n2.push(Wo2(e, t)) : f3 && (s = $o2(e, t, s), a.push(s.doc));
  }, "comments"), { leading: n2, trailing: a };
}
function Br2(e, t, u) {
  let { leading: r, trailing: o } = Vo2(e, u);
  return !r && !o ? t : Ee2(t, (n2) => [r, n2, o]);
}
function Tr2(e) {
  let { [Symbol.for("comments")]: t, [Symbol.for("printedComments")]: u } = e;
  for (let r of t) {
    if (!r.printed && !u.has(r))
      throw new Error('Comment "' + r.value.trim() + '" was not printed. Please report this error!');
    delete r.printed;
  }
}
function it2({ plugins: e = [], showDeprecated: t = false } = {}) {
  let u = e.flatMap((o) => o.languages ?? []), r = [];
  for (let o of Go2(Object.assign({}, ...e.map(({ options: n2 }) => n2), Sr2)))
    !t && o.deprecated || (Array.isArray(o.choices) && (t || (o.choices = o.choices.filter((n2) => !n2.deprecated)), o.name === "parser" && (o.choices = [...o.choices, ...Ko2(o.choices, u, e)])), o.pluginDefaults = Object.fromEntries(e.filter((n2) => n2.defaultOptions?.[o.name] !== undefined).map((n2) => [n2.name, n2.defaultOptions[o.name]])), r.push(o));
  return { languages: u, options: r };
}
function* Ko2(e, t, u) {
  let r = new Set(e.map((o) => o.value));
  for (let o of t)
    if (o.parsers) {
      for (let n2 of o.parsers)
        if (!r.has(n2)) {
          r.add(n2);
          let a = u.find((i) => i.parsers && Object.prototype.hasOwnProperty.call(i.parsers, n2)), s = o.name;
          a?.name && (s += ` (plugin: ${a.name})`), yield { value: n2, description: s };
        }
    }
}
function Go2(e) {
  let t = [];
  for (let [u, r] of Object.entries(e)) {
    let o = { name: u, ...r };
    Array.isArray(o.default) && (o.default = b3(0, o.default, -1).value), t.push(o);
  }
  return t;
}
function Ho2() {
  let e = globalThis, t = e.Deno?.build?.os;
  return typeof t == "string" ? t === "windows" : e.navigator?.platform?.startsWith("Win") ?? e.process?.platform?.startsWith("win") ?? false;
}
function Or(e) {
  if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:")
    throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
  return e;
}
function qo2(e) {
  return e = Or(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
}
function Qo2(e) {
  e = Or(e);
  let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
  return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t;
}
function ru(e) {
  return Xo2 ? Qo2(e) : qo2(e);
}
function kr2(e, t) {
  if (!t)
    return;
  let u = Pr2(t).toLowerCase();
  return e.find(({ filenames: r }) => r?.some((o) => o.toLowerCase() === u)) ?? e.find(({ extensions: r }) => r?.some((o) => u.endsWith(o)));
}
function Zo2(e, t) {
  if (t)
    return e.find(({ name: u }) => u.toLowerCase() === t) ?? e.find(({ aliases: u }) => u?.includes(t)) ?? e.find(({ extensions: u }) => u?.includes(`.${t}`));
}
function vr2(e, t) {
  if (t) {
    if (Ir(t))
      try {
        t = ru(t);
      } catch {
        return;
      }
    if (typeof t == "string")
      return e.find(({ isSupported: u }) => u?.({ filepath: t }));
  }
}
function ta2(e, t) {
  let u = wr2(0, e.plugins).flatMap((o) => o.languages ?? []);
  return (Zo2(u, t.language) ?? kr2(u, t.physicalFile) ?? kr2(u, t.file) ?? vr2(u, t.physicalFile) ?? vr2(u, t.file) ?? ea2?.(u, t.physicalFile))?.parsers[0];
}
function Mr2(e, t, u, r) {
  return [`Invalid ${$2.red(r.key(e))} value.`, `Expected ${$2.blue(u)},`, `but received ${t === Dt2 ? $2.gray("nothing") : $2.red(r.value(t))}.`].join(" ");
}
function jr2({ text: e, list: t }, u) {
  let r = [];
  return e && r.push(`- ${$2.blue(e)}`), t && r.push([`- ${$2.blue(t.title)}:`].concat(t.values.map((o) => jr2(o, u - Lr2.length).replace(/^|\n/g, `$&${Lr2}`))).join(`
`)), Ur2(r, u);
}
function Ur2(e, t) {
  if (e.length === 1)
    return e[0];
  let [u, r] = e, [o, n2] = e.map((a) => a.split(`
`, 1)[0].length);
  return o > t && o > n2 ? r : u;
}
function ct2(e, t, u) {
  if (e === t)
    return 0;
  let r = u?.maxDistance, o = e;
  e.length > t.length && (e = t, t = o);
  let n2 = e.length, a = t.length;
  for (;n2 > 0 && e.charCodeAt(~-n2) === t.charCodeAt(~-a); )
    n2--, a--;
  let s = 0;
  for (;s < n2 && e.charCodeAt(s) === t.charCodeAt(s); )
    s++;
  if (n2 -= s, a -= s, r !== undefined && a - n2 > r)
    return r;
  if (n2 === 0)
    return r !== undefined && a > r ? r : a;
  let i, D3, f3, l2, d2 = 0, c = 0;
  for (;d2 < n2; )
    au[d2] = e.charCodeAt(s + d2), _e2[d2] = ++d2;
  for (;c < a; ) {
    for (i = t.charCodeAt(s + c), f3 = c++, D3 = c, d2 = 0;d2 < n2; d2++)
      l2 = i === au[d2] ? f3 : f3 + 1, f3 = _e2[d2], D3 = _e2[d2] = f3 > D3 ? l2 > D3 ? D3 + 1 : l2 : l2 > f3 ? f3 + 1 : l2;
    if (r !== undefined) {
      let p2 = D3;
      for (d2 = 0;d2 < n2; d2++)
        _e2[d2] < p2 && (p2 = _e2[d2]);
      if (p2 > r)
        return r;
    }
  }
  return _e2.length = n2, au.length = n2, r !== undefined && D3 > r ? r : D3;
}
function Wr2(e, t, u) {
  if (!Array.isArray(t) || t.length === 0)
    return;
  let r = u?.maxDistance, o = e.length;
  for (let i of t)
    if (i === e)
      return i;
  if (r === 0)
    return;
  let n2, a = Number.POSITIVE_INFINITY, s = new Set;
  for (let i of t) {
    if (s.has(i))
      continue;
    s.add(i);
    let D3 = Math.abs(i.length - o);
    if (D3 >= a || r !== undefined && D3 > r)
      continue;
    let f3 = Number.isFinite(a) ? r === undefined ? a : Math.min(a, r) : r, l2 = f3 === undefined ? ct2(e, i) : ct2(e, i, { maxDistance: f3 });
    if (r !== undefined && l2 > r)
      continue;
    let d2 = l2;
    if (f3 !== undefined && l2 === f3 && f3 === r && (d2 = ct2(e, i)), d2 < a && (a = d2, n2 = i, a === 0))
      break;
  }
  if (!(r !== undefined && a > r))
    return n2;
}
function ra2(e, t) {
  let u = new e(t), r = Object.create(u);
  for (let o of ua2)
    o in t && (r[o] = na2(t[o], u, S2.prototype[o].length));
  return r;
}
function na2(e, t, u) {
  return typeof e == "function" ? (...r) => e(...r.slice(0, u - 1), t, ...r.slice(u - 1)) : () => e;
}
function $r2({ from: e, to: t }) {
  return { from: [e], to: t };
}
function Kr2(e, t) {
  let u = Object.create(null);
  for (let r of e) {
    let o = r[t];
    if (u[o])
      throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);
    u[o] = r;
  }
  return u;
}
function Gr2(e, t) {
  let u = new Map;
  for (let r of e) {
    let o = r[t];
    if (u.has(o))
      throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);
    u.set(o, r);
  }
  return u;
}
function zr2() {
  let e = Object.create(null);
  return (t) => {
    let u = JSON.stringify(t);
    return e[u] ? true : (e[u] = true, false);
  };
}
function Jr2(e, t) {
  let u = [], r = [];
  for (let o of e)
    t(o) ? u.push(o) : r.push(o);
  return [u, r];
}
function Hr2(e) {
  return e === Math.floor(e);
}
function Xr2(e, t) {
  if (e === t)
    return 0;
  let u = typeof e, r = typeof t, o = ["undefined", "object", "boolean", "number", "string"];
  return u !== r ? o.indexOf(u) - o.indexOf(r) : u !== "string" ? Number(e) - Number(t) : e.localeCompare(t);
}
function qr(e) {
  return (...t) => {
    let u = e(...t);
    return typeof u == "string" ? new Error(u) : u;
  };
}
function iu(e) {
  return e === undefined ? {} : e;
}
function su(e) {
  if (typeof e == "string")
    return { text: e };
  let { text: t, list: u } = e;
  return oa2((t || u) !== undefined, "Unexpected `expected` result, there should be at least one field."), u ? { text: t, list: { title: u.title, values: u.values.map(su) } } : { text: t };
}
function Du(e, t) {
  return e === true ? true : e === false ? { value: t } : e;
}
function cu(e, t, u = false) {
  return e === false ? false : e === true ? u ? true : [{ value: t }] : ("value" in e) ? [e] : e.length === 0 ? false : e;
}
function Vr2(e, t) {
  return typeof e == "string" || "key" in e ? { from: t, to: e } : ("from" in e) ? { from: e.from, to: e.to } : { from: t, to: e.to };
}
function mt2(e, t) {
  return e === undefined ? [] : Array.isArray(e) ? e.map((u) => Vr2(u, t)) : [Vr2(e, t)];
}
function fu(e, t) {
  let u = mt2(typeof e == "object" && "redirect" in e ? e.redirect : e, t);
  return u.length === 0 ? { remain: t, redirect: u } : typeof e == "object" && ("remain" in e) ? { remain: e.remain, redirect: u } : { redirect: u };
}
function oa2(e, t) {
  if (!e)
    throw new Error(t);
}
function ia2(e, t, { logger: u = false, isCLI: r = false, passThrough: o = false, FlagSchema: n2, descriptor: a } = {}) {
  if (r) {
    if (!n2)
      throw new Error("'FlagSchema' option is required.");
    if (!a)
      throw new Error("'descriptor' option is required.");
  } else
    a = ie2;
  let s = o ? Array.isArray(o) ? (d2, c) => o.includes(d2) ? { [d2]: c } : undefined : (d2, c) => ({ [d2]: c }) : (d2, c, p2) => {
    let { _: F2, ...C2 } = p2.schemas;
    return ft2(d2, c, { ...p2, schemas: C2 });
  }, i = sa2(t, { isCLI: r, FlagSchema: n2 }), D3 = new gt3(i, { logger: u, unknown: s, descriptor: a }), f3 = u !== false;
  f3 && lu && (D3._hasDeprecationWarned = lu);
  let l2 = D3.normalize(e);
  return f3 && (lu = D3._hasDeprecationWarned), l2;
}
function sa2(e, { isCLI: t, FlagSchema: u }) {
  let r = [];
  t && r.push(dt.create({ name: "_" }));
  for (let o of e)
    r.push(Da2(o, { isCLI: t, optionInfos: e, FlagSchema: u })), o.alias && t && r.push(lt3.create({ name: o.alias, sourceName: o.name }));
  return r;
}
function Da2(e, { isCLI: t, optionInfos: u, FlagSchema: r }) {
  let { name: o } = e, n2 = { name: o }, a, s = {};
  switch (e.type) {
    case "int":
      a = ht, t && (n2.preprocess = Number);
      break;
    case "string":
      a = je2;
      break;
    case "choice":
      a = Et2, n2.choices = e.choices.map((i) => i?.redirect ? { ...i, redirect: { to: { key: e.name, value: i.redirect } } } : i);
      break;
    case "boolean":
      a = Ft2;
      break;
    case "flag":
      a = r, n2.flags = u.flatMap((i) => [i.alias, i.description && i.name, i.oppositeDescription && `no-${i.name}`].filter(Boolean));
      break;
    case "path":
      a = je2;
      break;
    default:
      throw new Error(`Unexpected type ${e.type}`);
  }
  if (e.exception ? n2.validate = (i, D3, f3) => e.exception(i) || D3.validate(i, f3) : n2.validate = (i, D3, f3) => i === undefined || D3.validate(i, f3), e.redirect && (s.redirect = (i) => i ? { to: typeof e.redirect == "string" ? e.redirect : { key: e.redirect.option, value: e.redirect.value } } : undefined), e.deprecated && (s.deprecated = true), t && !e.array) {
    let i = n2.preprocess || ((D3) => D3);
    n2.preprocess = (D3, f3, l2) => f3.preprocess(i(Array.isArray(D3) ? b3(0, D3, -1) : D3), l2);
  }
  return e.array ? pt2.create({ ...t ? { preprocess: (i) => Array.isArray(i) ? i : [i] } : {}, ...s, valueSchema: a.create(n2) }) : a.create({ ...n2, ...s });
}
function la2(e) {
  return !!e?.[rn2];
}
async function Fu(e, t, u, r) {
  let { node: o } = u, { language: n2 } = o;
  if (!nn2.has(n2))
    return;
  let a = o.value.trim(), s;
  if (a) {
    let i = n2 === "yaml" ? n2 : st2(r, { language: n2 });
    if (!i)
      return;
    s = a ? await e(a, { parser: i }) : "";
  } else
    s = a;
  return et2([o.startDelimiter, o.explicitLanguage ?? "", V2, s, s ? V2 : "", o.endDelimiter]);
}
function da2(e, t) {
  return Ue({ node: e }) && (delete t.end, delete t.raw, delete t.value), t;
}
function pa2({ node: e }) {
  return e.raw;
}
function ma2(e, t) {
  let u = e ? (r) => e(r, on2) : Fa2;
  return t ? new Proxy(u, { apply: (r, o, n2) => de2(n2[0]) ? pu : Reflect.apply(r, o, n2) }) : u;
}
function gu(e, t) {
  if (!t)
    throw new Error("parserName is required.");
  let u = du(0, e, (o) => o.parsers && Object.prototype.hasOwnProperty.call(o.parsers, t));
  if (u)
    return u;
  let r = `Couldn't resolve parser "${t}".`;
  throw r += " Plugins must be explicitly added to the standalone bundle.", new Me2(r);
}
function an2(e, t) {
  if (!t)
    throw new Error("astFormat is required.");
  let u = du(0, e, (o) => o.printers && Object.prototype.hasOwnProperty.call(o.printers, t));
  if (u)
    return u;
  let r = `Couldn't find plugin for AST format "${t}".`;
  throw r += " Plugins must be explicitly added to the standalone bundle.", new Me2(r);
}
function We3({ plugins: e, parser: t }) {
  let u = gu(e, t);
  return yu(u, t);
}
function yu(e, t) {
  let u = e.parsers[t];
  return typeof u == "function" ? u() : u;
}
async function sn2(e, t) {
  let u = e.printers[t], r = typeof u == "function" ? await u() : u;
  return Ea2(r);
}
function Ea2(e) {
  if (hu.has(e))
    return hu.get(e);
  let { features: t, getVisitorKeys: u, embed: r, massageAstNode: o, print: n2, ...a } = e;
  t = ya2(t);
  let s = t.experimental_frontMatterSupport;
  u = Cu(u, s.massageAstNode || s.embed || s.print);
  let i = o;
  o && s.massageAstNode && (i = new Proxy(o, { apply(d2, c, p2) {
    return mu(...p2), Reflect.apply(d2, c, p2);
  } }));
  let D3 = r;
  if (r) {
    let d2;
    D3 = new Proxy(r, { get(c, p2, F2) {
      return p2 === "getVisitorKeys" ? (d2 ?? (d2 = r.getVisitorKeys ? Cu(r.getVisitorKeys, s.massageAstNode || s.embed) : u), d2) : Reflect.get(c, p2, F2);
    }, apply: (c, p2, F2) => s.embed && Ue(...F2) ? Fu : Reflect.apply(c, p2, F2) });
  }
  let f3 = n2;
  s.print && (f3 = new Proxy(n2, { apply(d2, c, p2) {
    let [F2] = p2;
    return de2(F2.node) ? Eu(F2) : Reflect.apply(d2, c, p2);
  } }));
  let l2 = { features: t, getVisitorKeys: u, embed: D3, massageAstNode: i, print: f3, ...a };
  return hu.set(e, l2), l2;
}
function ga2(e) {
  return { ...ha2, ...e };
}
function ya2(e) {
  return { experimental_avoidAstMutation: false, ...e, experimental_frontMatterSupport: ga2(e?.experimental_frontMatterSupport) };
}
async function ba(e, t = {}) {
  let u = { ...e };
  if (!u.parser)
    if (u.filepath) {
      if (u.parser = st2(u, { physicalFile: u.filepath }), !u.parser)
        throw new Ye2(`No parser could be inferred for file "${u.filepath}".`);
    } else
      throw new Ye2("No parser and no file path given, couldn't infer a parser.");
  let r = it2({ plugins: e.plugins, showDeprecated: true }).options, o = { ...Dn2, ...Object.fromEntries(r.filter((l2) => l2.default !== undefined).map((l2) => [l2.name, l2.default])) }, n2 = gu(u.plugins, u.parser), a = await yu(n2, u.parser);
  u.astFormat = a.astFormat, u.locEnd = a.locEnd, u.locStart = a.locStart;
  let s = n2.printers?.[a.astFormat] ? n2 : an2(u.plugins, a.astFormat), i = await sn2(s, a.astFormat);
  u.printer = i, u.getVisitorKeys = i.getVisitorKeys;
  let D3 = s.defaultOptions ? Object.fromEntries(Object.entries(s.defaultOptions).filter(([, l2]) => l2 !== undefined)) : {}, f3 = { ...o, ...D3 };
  for (let [l2, d2] of Object.entries(f3))
    (u[l2] === null || u[l2] === undefined) && (u[l2] = d2);
  return u.parser === "json" && (u.trailingComma = "none"), un2(u, r, { passThrough: Object.keys(Dn2), ...t });
}
function mn2(e) {
  return { keyword: e.cyan, capitalized: e.yellow, jsxIdentifier: e.yellow, punctuator: e.yellow, number: e.magenta, string: e.green, regex: e.magenta, comment: e.gray, invalid: It2(It2(e.white, e.bgRed), e.bold), gutter: e.gray, marker: It2(e.red, e.bold), message: It2(e.red, e.bold), reset: e.reset };
}
function _a3() {
  return new Proxy({}, { get: () => (e) => e });
}
function xa2(e, t, u) {
  let r = Object.assign({ column: 0, line: -1 }, e.start), o = Object.assign({}, r, e.end), { linesAbove: n2 = 2, linesBelow: a = 3 } = u || {}, s = r.line, i = r.column, D3 = o.line, f3 = o.column, l2 = Math.max(s - (n2 + 1), 0), d2 = Math.min(t.length, D3 + a);
  s === -1 && (l2 = 0), D3 === -1 && (d2 = t.length);
  let c = D3 - s, p2 = {};
  if (c)
    for (let F2 = 0;F2 <= c; F2++) {
      let C2 = F2 + s;
      if (!i)
        p2[C2] = true;
      else if (F2 === 0) {
        let y3 = t[C2 - 1].length;
        p2[C2] = [i, y3 - i + 1];
      } else if (F2 === c)
        p2[C2] = [0, f3];
      else {
        let y3 = t[C2 - F2].length;
        p2[C2] = [0, y3];
      }
    }
  else
    i === f3 ? i ? p2[s] = [i, 0] : p2[s] = true : p2[s] = [i, f3 - i];
  return { start: l2, end: d2, markerLines: p2 };
}
function En2(e, t, u = {}) {
  let o = _a3(false), n2 = e.split(Fn2), { start: a, end: s, markerLines: i } = xa2(t, n2, u), D3 = t.start && typeof t.start.column == "number", f3 = String(s).length, d2 = e.split(Fn2, s).slice(a, s).map((c, p2) => {
    let F2 = a + 1 + p2, y3 = ` ${` ${F2}`.slice(-f3)} |`, m2 = i[F2], h8 = !i[F2 + 1];
    if (m2) {
      let E = "";
      if (Array.isArray(m2)) {
        let g2 = c.slice(0, Math.max(m2[0] - 1, 0)).replace(/[^\t]/g, " "), A2 = m2[1] || 1;
        E = [`
 `, o.gutter(y3.replace(/\d/g, " ")), " ", g2, o.marker("^").repeat(A2)].join(""), h8 && u.message && (E += " " + o.message(u.message));
      }
      return [o.marker(">"), o.gutter(y3), c.length > 0 ? ` ${c}` : "", E].join("");
    } else
      return ` ${o.gutter(y3)}${c.length > 0 ? ` ${c}` : ""}`;
  }).join(`
`);
  return u.message && !D3 && (d2 = `${" ".repeat(f3 + 1)}${u.message}
${d2}`), d2;
}
async function Ba2(e, t) {
  let u = await We3(t), r = u.preprocess ? await u.preprocess(e, t) : e;
  t.originalText = r;
  let o;
  try {
    o = await u.parse(r, t, t);
  } catch (n2) {
    Ta2(n2, e);
  }
  return { text: r, ast: o };
}
function Ta2(e, t) {
  let { loc: u } = e;
  if (u) {
    let r = En2(t, u, { highlightCode: true });
    throw e.message += `
` + r, e.codeFrame = r, e;
  }
  throw e;
}
async function Cn2(e, t, u, r, o) {
  if (u.embeddedLanguageFormatting !== "auto")
    return;
  let { printer: n2 } = u, { embed: a } = n2;
  if (!a)
    return;
  if (a.length > 2)
    throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");
  let { hasPrettierIgnore: s } = n2, { getVisitorKeys: i } = a, D3 = [];
  d2();
  let f3 = e.stack;
  for (let { print: c, node: p2, pathStack: F2 } of D3)
    try {
      e.stack = F2;
      let C2 = await c(l2, t, e, u);
      C2 && o.set(p2, C2);
    } catch (C2) {
      if (globalThis.PRETTIER_DEBUG)
        throw C2;
    }
  e.stack = f3;
  function l2(c, p2) {
    return Na2(c, p2, u, r);
  }
  function d2() {
    let { node: c } = e;
    if (c === null || typeof c != "object" || s?.(e))
      return;
    for (let F2 of i(c))
      Array.isArray(c[F2]) ? e.each(d2, F2) : e.call(d2, F2);
    let p2 = a(e, u);
    if (p2) {
      if (typeof p2 == "function") {
        D3.push({ print: p2, node: c, pathStack: [...e.stack] });
        return;
      }
      o.set(c, p2);
    }
  }
}
async function Na2(e, t, u, r) {
  let o = await se({ ...u, ...t, parentParser: u.parser, originalText: e, cursorOffset: undefined, rangeStart: undefined, rangeEnd: undefined }, { passThrough: true }), { ast: n2 } = await Fe2(e, o), a = await r(n2, o);
  return qe2(a);
}
function Sa2(e, t, u, r) {
  let { originalText: o, [Symbol.for("comments")]: n2, locStart: a, locEnd: s, [Symbol.for("printedComments")]: i } = t, { node: D3 } = e, f3 = a(D3), l2 = s(D3);
  for (let c of n2)
    a(c) >= f3 && s(c) <= l2 && i.add(c);
  let { printPrettierIgnored: d2 } = t.printer;
  return d2 ? d2(e, t, u, r) : o.slice(f3, l2);
}
async function Ge(e, t) {
  ({ ast: e } = await xu(e, t));
  let u = new Map, r = new pr2(e), o = Nr2(t), n2 = new Map;
  await Cn2(r, s, t, Ge, n2);
  let a = await gn2(r, t, s, undefined, n2);
  if (Tr2(t), t.cursorOffset >= 0) {
    if (t.nodeAfterCursor && !t.nodeBeforeCursor)
      return [ee, a];
    if (t.nodeBeforeCursor && !t.nodeAfterCursor)
      return [a, ee];
  }
  return a;
  function s(D3, f3) {
    return D3 === undefined || D3 === r ? i(f3) : Array.isArray(D3) ? r.call(() => i(f3), ...D3) : r.call(() => i(f3), D3);
  }
  function i(D3) {
    o(r);
    let f3 = r.node;
    if (f3 == null)
      return "";
    let l2 = ge2(f3) && D3 === undefined;
    if (l2 && u.has(f3))
      return u.get(f3);
    let d2 = gn2(r, t, s, D3, n2);
    return l2 && u.set(f3, d2), d2;
  }
}
function gn2(e, t, u, r, o) {
  let { node: n2 } = e, { printer: a } = t, s;
  switch (a.hasPrettierIgnore?.(e) ? s = hn2(e, t, u, r) : o.has(n2) ? s = o.get(n2) : s = a.print(e, t, u, r), n2) {
    case t.cursorNode:
      s = Ee2(s, (i) => [ee, i, ee]);
      break;
    case t.nodeBeforeCursor:
      s = Ee2(s, (i) => [i, ee]);
      break;
    case t.nodeAfterCursor:
      s = Ee2(s, (i) => [ee, i]);
      break;
  }
  return a.printComment && !a.willPrintOwnComments?.(e, t) && (s = Br2(e, s, t)), s;
}
async function xu(e, t) {
  let u = e.comments ?? [];
  t[Symbol.for("comments")] = u, t[Symbol.for("printedComments")] = new Set, Ar2(e, t);
  let { printer: { preprocess: r } } = t;
  return e = r ? await r(e, t) : e, { ast: e, comments: u };
}
function wa2(e, t) {
  let { cursorOffset: u, locStart: r, locEnd: o, getVisitorKeys: n2 } = t, a = (c) => r(c) <= u && o(c) >= u, s = e, i = [e];
  for (let c of Cr2(e, { getVisitorKeys: n2, filter: a }))
    i.push(c), s = c;
  if (hr3(s, { getVisitorKeys: n2 }))
    return { cursorNode: s };
  let D3, f3, l2 = -1, d2 = Number.POSITIVE_INFINITY;
  for (;i.length > 0 && (D3 === undefined || f3 === undefined); ) {
    s = i.pop();
    let c = D3 !== undefined, p2 = f3 !== undefined;
    for (let F2 of be2(s, { getVisitorKeys: n2 })) {
      if (!c) {
        let C2 = o(F2);
        C2 <= u && C2 > l2 && (D3 = F2, l2 = C2);
      }
      if (!p2) {
        let C2 = r(F2);
        C2 >= u && C2 < d2 && (f3 = F2, d2 = C2);
      }
    }
  }
  return { nodeBeforeCursor: D3, nodeAfterCursor: f3 };
}
function Oa2(e, t) {
  let { printer: u } = t, r = u.massageAstNode;
  if (!r)
    return e;
  let { getVisitorKeys: o } = u, { ignoredProperties: n2 } = r;
  return a(e);
  function a(s, i) {
    if (!ge2(s))
      return s;
    if (Array.isArray(s))
      return s.map((d2) => a(d2, i)).filter(Boolean);
    let D3 = {}, f3 = new Set(o(s));
    for (let d2 in s)
      !Object.prototype.hasOwnProperty.call(s, d2) || n2?.has(d2) || (f3.has(d2) ? D3[d2] = a(s[d2], s) : D3[d2] = s[d2]);
    let l2 = r(s, D3, i);
    if (l2 !== null)
      return l2 ?? D3;
  }
}
function va2(e, t) {
  return t = new Set(t), e.find((u) => xn2.has(u.type) && t.has(u));
}
function An2(e) {
  let t = bn2(0, e, (u) => u.type !== "Program" && u.type !== "File");
  return t === -1 ? e : e.slice(0, t + 1);
}
function Ra2(e, t, { locStart: u, locEnd: r }) {
  let [o, ...n2] = e, [a, ...s] = t;
  if (o === a)
    return [o, a];
  let i = u(o);
  for (let f3 of An2(s))
    if (u(f3) >= i)
      a = f3;
    else
      break;
  let D3 = r(a);
  for (let f3 of An2(n2)) {
    if (r(f3) <= D3)
      o = f3;
    else
      break;
    if (o === a)
      break;
  }
  return [o, a];
}
function Tu(e, t, u, r, o = [], n2) {
  let { locStart: a, locEnd: s } = u, i = a(e), D3 = s(e);
  if (t > D3 || t < i || n2 === "rangeEnd" && t === i || n2 === "rangeStart" && t === D3)
    return;
  let f3 = [e, ...o], l2 = at2(e, f3, { cache: uu, locStart: a, locEnd: s, getVisitorKeys: u.getVisitorKeys, filter: u.printer.canAttachComment, getChildren: u.printer.getCommentChildNodes });
  for (let d2 of l2) {
    let c = Tu(d2, t, u, r, f3, n2);
    if (c)
      return c;
  }
  if (r(e, o[0]))
    return f3;
}
function La2(e, t) {
  return t !== "DeclareExportDeclaration" && e !== "TypeParameterDeclaration" && (e === "Directive" || e === "TypeAlias" || e === "TSExportAssignment" || e.startsWith("Declare") || e.startsWith("TSDeclare") || e.endsWith("Statement") || e.endsWith("Declaration"));
}
function _n2(e, t, u) {
  if (!t)
    return false;
  switch (e.parser) {
    case "flow":
    case "hermes":
    case "babel":
    case "babel-flow":
    case "babel-ts":
    case "typescript":
    case "acorn":
    case "espree":
    case "meriyah":
    case "oxc":
    case "oxc-ts":
    case "__babel_estree":
      return La2(t.type, u?.type);
    case "json":
    case "json5":
    case "jsonc":
    case "json-stringify":
      return xn2.has(t.type);
    case "graphql":
      return Ma2.has(t.kind);
    case "vue":
      return t.tag !== "root";
  }
  return false;
}
function Bn2(e, t, u) {
  let { rangeStart: r, rangeEnd: o, locStart: n2, locEnd: a } = t;
  P2(o > r);
  let s = e.slice(r, o).search(/\S/u), i = s === -1;
  if (!i)
    for (r += s;o > r && !/\S/u.test(e[o - 1]); --o)
      ;
  let D3 = Tu(u, r, t, (c, p2) => _n2(t, c, p2), [], "rangeStart");
  if (!D3)
    return;
  let f3 = i ? D3 : Tu(u, o, t, (c) => _n2(t, c), [], "rangeEnd");
  if (!f3)
    return;
  let l2, d2;
  if (ka2(t)) {
    let c = va2(D3, f3);
    l2 = c, d2 = c;
  } else
    [l2, d2] = Ra2(D3, f3, t);
  return [Math.min(n2(l2), n2(d2)), Math.max(a(l2), a(d2))];
}
async function On2(e, t, u = 0) {
  if (!e || e.trim().length === 0)
    return { formatted: "", cursorOffset: -1, comments: [] };
  let { ast: r, text: o } = await Fe2(e, t);
  t.cursorOffset >= 0 && (t = { ...t, ...Bu(r, t) });
  let n2 = await Ge(r, t, u);
  u > 0 && (n2 = tt2([V2, n2], u, t.tabWidth));
  let a = Ce2(n2, t);
  if (u > 0) {
    let i = a.formatted.trim();
    a.cursorNodeStart !== undefined && (a.cursorNodeStart -= a.formatted.indexOf(i), a.cursorNodeStart < 0 && (a.cursorNodeStart = 0, a.cursorNodeText = a.cursorNodeText.trimStart()), a.cursorNodeStart + a.cursorNodeText.length > i.length && (a.cursorNodeText = a.cursorNodeText.trimEnd())), a.formatted = i + Se2(t.endOfLine);
  }
  let s = t[Symbol.for("comments")];
  if (t.cursorOffset >= 0) {
    let i, D3, f3, l2;
    if ((t.cursorNode || t.nodeBeforeCursor || t.nodeAfterCursor) && a.cursorNodeText)
      if (f3 = a.cursorNodeStart, l2 = a.cursorNodeText, t.cursorNode)
        i = t.locStart(t.cursorNode), D3 = o.slice(i, t.locEnd(t.cursorNode));
      else {
        if (!t.nodeBeforeCursor && !t.nodeAfterCursor)
          throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");
        i = t.nodeBeforeCursor ? t.locEnd(t.nodeBeforeCursor) : 0;
        let y3 = t.nodeAfterCursor ? t.locStart(t.nodeAfterCursor) : o.length;
        D3 = o.slice(i, y3);
      }
    else
      i = 0, D3 = o, f3 = 0, l2 = a.formatted;
    let d2 = t.cursorOffset - i;
    if (D3 === l2)
      return { formatted: a.formatted, cursorOffset: f3 + d2, comments: s };
    let c = D3.split("");
    c.splice(d2, 0, Tn2);
    let p2 = l2.split(""), F2 = Ut2(c, p2), C2 = f3;
    for (let y3 of F2)
      if (y3.removed) {
        if (y3.value.includes(Tn2))
          break;
      } else
        C2 += y3.count;
    return { formatted: a.formatted, cursorOffset: C2, comments: s };
  }
  return { formatted: a.formatted, cursorOffset: -1, comments: s };
}
async function Ya2(e, t) {
  let { ast: u, text: r } = await Fe2(e, t), [o, n2] = Bn2(r, t, u) ?? [0, 0], a = r.slice(o, n2), s = Math.min(o, r.lastIndexOf(`
`, o) + 1), i = r.slice(s, o).match(/^\s*/u)[0], D3 = he2(i, t.tabWidth), f3 = await On2(a, { ...t, rangeStart: 0, rangeEnd: Number.POSITIVE_INFINITY, cursorOffset: t.cursorOffset > o && t.cursorOffset <= n2 ? t.cursorOffset - o : -1, endOfLine: "lf" }, D3), l2 = f3.formatted.trimEnd(), { cursorOffset: d2 } = t;
  d2 > n2 ? d2 += l2.length - a.length : f3.cursorOffset >= 0 && (d2 = f3.cursorOffset + o);
  let c = r.slice(0, o) + l2 + r.slice(n2);
  if (t.endOfLine !== "lf") {
    let p2 = Se2(t.endOfLine);
    d2 >= 0 && p2 === `\r
` && (d2 += $t(c.slice(0, d2), `
`)), c = oe2(0, c, `
`, p2);
  }
  return { formatted: c, cursorOffset: d2, comments: f3.comments };
}
function Nu(e, t, u) {
  return typeof t != "number" || Number.isNaN(t) || t < 0 || t > e.length ? u : t;
}
function Nn2(e, t) {
  let { cursorOffset: u, rangeStart: r, rangeEnd: o } = t;
  return u = Nu(e, u, -1), r = Nu(e, r, 0), o = Nu(e, o, e.length), { ...t, cursorOffset: u, rangeStart: r, rangeEnd: o };
}
function Pn2(e, t) {
  let { cursorOffset: u, rangeStart: r, rangeEnd: o, endOfLine: n2 } = Nn2(e, t), a = e.charAt(0) === wn2;
  if (a && (e = e.slice(1), u--, r--, o--), n2 === "auto" && (n2 = Yu(e)), e.includes("\r")) {
    let s = (i) => $t(e.slice(0, Math.max(i, 0)), `\r
`);
    u -= s(u), r -= s(r), o -= s(o), e = ju(e);
  }
  return { hasBOM: a, text: e, options: Nn2(e, { ...t, cursorOffset: u, rangeStart: r, rangeEnd: o, endOfLine: n2 }) };
}
async function Sn2(e, t) {
  let u = await We3(t);
  return !u.hasPragma || u.hasPragma(e);
}
async function ja2(e, t) {
  return (await We3(t)).hasIgnorePragma?.(e);
}
async function Su(e, t) {
  let { hasBOM: u, text: r, options: o } = Pn2(e, await se(t));
  if (o.rangeStart >= o.rangeEnd && r !== "" || o.requirePragma && !await Sn2(r, o) || o.checkIgnorePragma && await ja2(r, o))
    return { formatted: e, cursorOffset: t.cursorOffset, comments: [] };
  let n2;
  return o.rangeStart > 0 || o.rangeEnd < r.length ? n2 = await Ya2(r, o) : (!o.requirePragma && o.insertPragma && o.printer.insertPragma && !await Sn2(r, o) && (r = o.printer.insertPragma(r)), n2 = await On2(r, o)), u && (n2.formatted = wn2 + n2.formatted, n2.cursorOffset >= 0 && n2.cursorOffset++), n2;
}
async function In2(e, t, u) {
  let { text: r, options: o } = Pn2(e, await se(t)), n2 = await Fe2(r, o);
  return u && (u.preprocessForPrint && (n2.ast = await xu(n2.ast, o)), u.massage && (n2.ast = yn2(n2.ast, o))), n2;
}
async function kn2(e, t) {
  t = await se(t);
  let u = await Ge(e, t);
  return Ce2(u, t);
}
async function vn2(e, t) {
  let u = sr2(e), { formatted: r } = await Su(u, { ...t, parser: "__js_expression" });
  return r;
}
async function Rn2(e, t) {
  t = await se(t);
  let { ast: u } = await Fe2(e, t);
  return t.cursorOffset >= 0 && (t = { ...t, ...Bu(u, t) }), Ge(u, t);
}
async function Ln2(e, t) {
  return Ce2(e, await se(t));
}
function Ka2(e, t) {
  if (t === false)
    return false;
  if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
    for (let u = t + 2;u < e.length; ++u)
      if (e.charAt(u) === "*" && e.charAt(u + 1) === "/")
        return u + 2;
  }
  return t;
}
function Ga2(e, t) {
  return t === false ? false : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? ot2(e, t) : t;
}
function za2(e, t) {
  let u = null, r = t;
  for (;r !== u; )
    u = r, r = Y2(e, r), r = xe2(e, r), r = Be2(e, r), r = K2(e, r);
  return r;
}
function Ja2(e, t) {
  let u = null, r = t;
  for (;r !== u; )
    u = r, r = nt2(e, r), r = xe2(e, r), r = Y2(e, r);
  return r = Be2(e, r), r = K2(e, r), r !== false && z2(e, r);
}
function Ha2(e, t) {
  let u = e.lastIndexOf(`
`);
  return u === -1 ? 0 : he2(e.slice(u + 1).match(/^[\t ]*/u)[0], t);
}
function Ou(e) {
  if (typeof e != "string")
    throw new TypeError("Expected a string");
  return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
function Xa2(e, t) {
  let u = e.matchAll(new RegExp(`(?:${Ou(t)})+`, "gu"));
  return u.reduce || (u = [...u]), u.reduce((r, [o]) => Math.max(r, o.length), 0) / t.length;
}
function qa2(e, t) {
  let u = ze2(e, t);
  return u === false ? "" : e.charAt(u);
}
function ei2(e, t) {
  let { preferred: u, alternate: r } = t === true || t === "'" ? Qa2 : Za2, { length: o } = e, n2 = 0, a = 0;
  for (let s = 0;s < o; s++) {
    let i = e.charCodeAt(s);
    i === u.codePoint ? n2++ : i === r.codePoint && a++;
  }
  return (n2 > a ? r : u).character;
}
function ti2(e, t, u) {
  for (let r = t;r < u; ++r)
    if (e.charAt(r) === `
`)
      return true;
  return false;
}
function ui2(e, t, u = {}) {
  return Y2(e, u.backwards ? t - 1 : t, u) !== t;
}
function ri2(e, t, u) {
  return ze2(e, u(t));
}
function ni2(e, t) {
  return arguments.length === 2 || typeof t == "number" ? ze2(e, t) : ri2(...arguments);
}
function oi2(e, t, u) {
  return Le2(e, u(t));
}
function ai2(e, t) {
  return arguments.length === 2 || typeof t == "number" ? Le2(e, t) : oi2(...arguments);
}
function ii2(e, t, u) {
  return kt2(e, u(t));
}
function si2(e, t, u) {
  let r = t === '"' ? "'" : '"', n2 = oe2(0, e, /\\(.)|(["'])/gsu, (a, s, i) => s === r ? s : i === t ? "\\" + i : i || (u && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(s) ? s : "\\" + s));
  return t + n2 + t;
}
function Di2(e, t) {
  return arguments.length === 2 || typeof t == "number" ? kt2(e, t) : ii2(...arguments);
}
function me2(e, t = 1) {
  return async (...u) => {
    let r = u[t] ?? {}, o = r.plugins ?? [];
    return u[t] = { ...r, plugins: Array.isArray(o) ? o : Object.values(o) }, e(...u);
  };
}
async function Jn2(e, t) {
  let { formatted: u } = await zn2(e, { ...t, cursorOffset: -1 });
  return u;
}
async function ci2(e, t) {
  return await Jn2(e, t) === e;
}
var Zn2, Mt2, eo2, to2, uo, ro2, no2 = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Yt = (e, t) => {
  for (var u in t)
    Mt2(e, u, { get: t[u], enumerable: true });
}, oo2 = (e, t, u, r) => {
  if (t && typeof t == "object" || typeof t == "function")
    for (let o of to2(t))
      !ro2.call(e, o) && o !== u && Mt2(e, o, { get: () => t[o], enumerable: !(r = eo2(t, o)) || r.enumerable });
  return e;
}, ao2 = (e, t, u) => (u = e != null ? Zn2(uo(e)) : {}, oo2(t || !e || !e.__esModule ? Mt2(u, "default", { value: e, enumerable: true }) : u, e)), dn2, Hn2, X2 = (e, t) => (u, r, ...o) => u | 1 && r == null ? undefined : (t.call(r) ?? r[e]).apply(r, o), io2, so2, oe2, Ne2 = class {
  diff(t, u, r = {}) {
    let o;
    typeof r == "function" ? (o = r, r = {}) : ("callback" in r) && (o = r.callback);
    let n2 = this.castInput(t, r), a = this.castInput(u, r), s = this.removeEmpty(this.tokenize(n2, r)), i = this.removeEmpty(this.tokenize(a, r));
    return this.diffWithOptionsObj(s, i, r, o);
  }
  diffWithOptionsObj(t, u, r, o) {
    var n2;
    let a = (m2) => {
      if (m2 = this.postProcess(m2, r), o) {
        setTimeout(function() {
          o(m2);
        }, 0);
        return;
      } else
        return m2;
    }, s = u.length, i = t.length, D3 = 1, f3 = s + i;
    r.maxEditLength != null && (f3 = Math.min(f3, r.maxEditLength));
    let l2 = (n2 = r.timeout) !== null && n2 !== undefined ? n2 : 1 / 0, d2 = Date.now() + l2, c = [{ oldPos: -1, lastComponent: undefined }], p2 = this.extractCommon(c[0], u, t, 0, r);
    if (c[0].oldPos + 1 >= i && p2 + 1 >= s)
      return a(this.buildValues(c[0].lastComponent, u, t));
    let F2 = -1 / 0, C2 = 1 / 0, y3 = () => {
      for (let m2 = Math.max(F2, -D3);m2 <= Math.min(C2, D3); m2 += 2) {
        let h8, E = c[m2 - 1], g2 = c[m2 + 1];
        E && (c[m2 - 1] = undefined);
        let A2 = false;
        if (g2) {
          let Q2 = g2.oldPos - m2;
          A2 = g2 && 0 <= Q2 && Q2 < s;
        }
        let J2 = E && E.oldPos + 1 < i;
        if (!A2 && !J2) {
          c[m2] = undefined;
          continue;
        }
        if (!J2 || A2 && E.oldPos < g2.oldPos ? h8 = this.addToPath(g2, true, false, 0, r) : h8 = this.addToPath(E, false, true, 1, r), p2 = this.extractCommon(h8, u, t, m2, r), h8.oldPos + 1 >= i && p2 + 1 >= s)
          return a(this.buildValues(h8.lastComponent, u, t)) || true;
        c[m2] = h8, h8.oldPos + 1 >= i && (C2 = Math.min(C2, m2 - 1)), p2 + 1 >= s && (F2 = Math.max(F2, m2 + 1));
      }
      D3++;
    };
    if (o)
      (function m2() {
        setTimeout(function() {
          if (D3 > f3 || Date.now() > d2)
            return o(undefined);
          y3() || m2();
        }, 0);
      })();
    else
      for (;D3 <= f3 && Date.now() <= d2; ) {
        let m2 = y3();
        if (m2)
          return m2;
      }
  }
  addToPath(t, u, r, o, n2) {
    let a = t.lastComponent;
    return a && !n2.oneChangePerToken && a.added === u && a.removed === r ? { oldPos: t.oldPos + o, lastComponent: { count: a.count + 1, added: u, removed: r, previousComponent: a.previousComponent } } : { oldPos: t.oldPos + o, lastComponent: { count: 1, added: u, removed: r, previousComponent: a } };
  }
  extractCommon(t, u, r, o, n2) {
    let a = u.length, s = r.length, i = t.oldPos, D3 = i - o, f3 = 0;
    for (;D3 + 1 < a && i + 1 < s && this.equals(r[i + 1], u[D3 + 1], n2); )
      D3++, i++, f3++, n2.oneChangePerToken && (t.lastComponent = { count: 1, previousComponent: t.lastComponent, added: false, removed: false });
    return f3 && !n2.oneChangePerToken && (t.lastComponent = { count: f3, previousComponent: t.lastComponent, added: false, removed: false }), t.oldPos = i, D3;
  }
  equals(t, u, r) {
    return r.comparator ? r.comparator(t, u) : t === u || !!r.ignoreCase && t.toLowerCase() === u.toLowerCase();
  }
  removeEmpty(t) {
    let u = [];
    for (let r = 0;r < t.length; r++)
      t[r] && u.push(t[r]);
    return u;
  }
  castInput(t, u) {
    return t;
  }
  tokenize(t, u) {
    return Array.from(t);
  }
  join(t) {
    return t.join("");
  }
  postProcess(t, u) {
    return t;
  }
  get useLongestToken() {
    return false;
  }
  buildValues(t, u, r) {
    let o = [], n2;
    for (;t; )
      o.push(t), n2 = t.previousComponent, delete t.previousComponent, t = n2;
    o.reverse();
    let a = o.length, s = 0, i = 0, D3 = 0;
    for (;s < a; s++) {
      let f3 = o[s];
      if (f3.removed)
        f3.value = this.join(r.slice(D3, D3 + f3.count)), D3 += f3.count;
      else {
        if (!f3.added && this.useLongestToken) {
          let l2 = u.slice(i, i + f3.count);
          l2 = l2.map(function(d2, c) {
            let p2 = r[D3 + c];
            return p2.length > d2.length ? p2 : d2;
          }), f3.value = this.join(l2);
        } else
          f3.value = this.join(u.slice(i, i + f3.count));
        i += f3.count, f3.added || (D3 += f3.count);
      }
    }
    return o;
  }
}, jt, ku, Do2 = () => {}, P2, Ru = "cr", Lu = "crlf", co2 = "lf", fo, Wt2 = "\r", Mu = `\r
`, Je2 = `
`, lo2, po, Fo2, Eo, b3, G2 = "string", j2 = "array", U2 = "cursor", I2 = "indent", k3 = "align", v3 = "trim", x2 = "group", w2 = "fill", B = "if-break", R3 = "indent-if-break", L2 = "line-suffix", M = "line-suffix-boundary", _3 = "line", O3 = "label", T2 = "break-parent", He, H2, ho = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e), Vt2, Z, Wu, we2, N3, Ze2, Xu, qu, ce2, ee, ut2, or3, ke, V2, Gt, Qe2, ar2, ir2, Dr = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g, cr2 = "©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇", To, No, Re2, wo, Oo2, Ht2, W2, q2, qt2, he2, Qt2 = class {
  constructor(t) {
    this.stack = [t];
  }
  get key() {
    let { stack: t, siblings: u } = this;
    return b3(0, t, u === null ? -2 : -4) ?? null;
  }
  get index() {
    return this.siblings === null ? null : b3(0, this.stack, -2);
  }
  get node() {
    return b3(0, this.stack, -1);
  }
  get parent() {
    return this.getNode(1);
  }
  get grandparent() {
    return this.getNode(2);
  }
  get isInArray() {
    return this.siblings !== null;
  }
  get siblings() {
    let { stack: t } = this, u = b3(0, t, -3);
    return Array.isArray(u) ? u : null;
  }
  get next() {
    let { siblings: t } = this;
    return t === null ? null : t[this.index + 1];
  }
  get previous() {
    let { siblings: t } = this;
    return t === null ? null : t[this.index - 1];
  }
  get isFirst() {
    return this.index === 0;
  }
  get isLast() {
    let { siblings: t, index: u } = this;
    return t !== null && u === t.length - 1;
  }
  get isRoot() {
    return this.stack.length === 1;
  }
  get root() {
    return this.stack[0];
  }
  get ancestors() {
    return [...this.#e()];
  }
  getName() {
    let { stack: t } = this, { length: u } = t;
    return u > 1 ? b3(0, t, -2) : null;
  }
  getValue() {
    return b3(0, this.stack, -1);
  }
  getNode(t = 0) {
    let u = this.#t(t);
    return u === -1 ? null : this.stack[u];
  }
  getParentNode(t = 0) {
    return this.getNode(t + 1);
  }
  #t(t) {
    let { stack: u } = this;
    for (let r = u.length - 1;r >= 0; r -= 2)
      if (!Array.isArray(u[r]) && --t < 0)
        return r;
    return -1;
  }
  call(t, ...u) {
    let { stack: r } = this, { length: o } = r, n2 = b3(0, r, -1);
    for (let a of u)
      n2 = n2?.[a], r.push(a, n2);
    try {
      return t(this);
    } finally {
      r.length = o;
    }
  }
  callParent(t, u = 0) {
    let r = this.#t(u + 1), o = this.stack.splice(r + 1);
    try {
      return t(this);
    } finally {
      this.stack.push(...o);
    }
  }
  each(t, ...u) {
    let { stack: r } = this, { length: o } = r, n2 = b3(0, r, -1);
    for (let a of u)
      n2 = n2[a], r.push(a, n2);
    try {
      for (let a = 0;a < n2.length; ++a)
        r.push(a, n2[a]), t(this, a, n2), r.length -= 2;
    } finally {
      r.length = o;
    }
  }
  map(t, ...u) {
    let r = [];
    return this.each((o, n2, a) => {
      r[n2] = t(o, n2, a);
    }, ...u), r;
  }
  match(...t) {
    let u = this.stack.length - 1, r = null, o = this.stack[u--];
    for (let n2 of t) {
      if (o === undefined)
        return false;
      let a = null;
      if (typeof r == "number" && (a = r, r = this.stack[u--], o = this.stack[u--]), n2 && !n2(o, r, a))
        return false;
      r = this.stack[u--], o = this.stack[u--];
    }
    return true;
  }
  findAncestor(t) {
    for (let u of this.#e())
      if (t(u))
        return u;
  }
  hasAncestor(t) {
    for (let u of this.#e())
      if (t(u))
        return true;
    return false;
  }
  *#e() {
    let { stack: t } = this;
    for (let u = t.length - 3;u >= 0; u -= 2) {
      let r = t[u];
      Array.isArray(r) || (yield r);
    }
  }
}, pr2, ge2, Fr2, Y2, nt2, ot2, mr2 = (e) => e === `
` || e === "\r" || e === "\u2028" || e === "\u2029", K2, z2, Er2, at2, uu, eu = () => false, _r2 = (e) => !/[\S\n\u2028\u2029]/u.test(e), Le2, Nr2 = () => P2, Me2, Ye2, Sr2, zo2, Jo2, wr2, Xo2, Pr2 = (e) => String(e).split(/[/\\]/u).pop(), Ir = (e) => String(e).startsWith("file:"), ea2 = undefined, st2, ie2, nu, $2, ou = () => nu, Rr = (e, t, { descriptor: u }) => {
  let r = [`${$2.yellow(typeof e == "string" ? u.key(e) : u.pair(e))} is deprecated`];
  return t && r.push(`we now treat it as ${$2.blue(typeof t == "string" ? u.key(t) : u.pair(t))}`), r.join("; ") + ".";
}, Dt2, Ae2, Lr2, Yr2 = (e, t, u) => {
  let { text: r, list: o } = u.normalizeExpectedResult(u.schemas[e].expected(u)), n2 = [];
  return r && n2.push(Mr2(e, t, r, u.descriptor)), o && n2.push([Mr2(e, t, o.title, u.descriptor)].concat(o.values.map((a) => jr2(a, u.loggerPrintWidth))).join(`
`)), Ur2(n2, u.loggerPrintWidth);
}, _e2, au, ft2 = (e, t, { descriptor: u, logger: r, schemas: o }) => {
  let n2 = [`Ignored unknown option ${$2.yellow(u.pair({ key: e, value: t }))}.`], a = Wr2(e, Object.keys(o), { maxDistance: 3 });
  a && n2.push(`Did you mean ${$2.blue(u.key(a))}?`), r.warn(n2.join(" "));
}, ua2, S2 = class {
  static create(t) {
    return ra2(this, t);
  }
  constructor(t) {
    this.name = t.name;
  }
  default(t) {}
  expected(t) {
    return "nothing";
  }
  validate(t, u) {
    return false;
  }
  deprecated(t, u) {
    return false;
  }
  forward(t, u) {}
  redirect(t, u) {}
  overlap(t, u, r) {
    return t;
  }
  preprocess(t, u) {
    return t;
  }
  postprocess(t, u) {
    return Ae2;
  }
}, lt3, dt, pt2, Ft2, Et2, Ct2, ht, je2, Qr2, Zr2, en2, tn2, gt3 = class {
  constructor(t, u) {
    let { logger: r = console, loggerPrintWidth: o = 80, descriptor: n2 = Qr2, unknown: a = Zr2, invalid: s = en2, deprecated: i = tn2, missing: D3 = () => false, required: f3 = () => false, preprocess: l2 = (c) => c, postprocess: d2 = () => Ae2 } = u || {};
    this._utils = { descriptor: n2, logger: r || { warn: () => {} }, loggerPrintWidth: o, schemas: Kr2(t, "name"), normalizeDefaultResult: iu, normalizeExpectedResult: su, normalizeDeprecatedResult: cu, normalizeForwardResult: mt2, normalizeRedirectResult: fu, normalizeValidateResult: Du }, this._unknownHandler = a, this._invalidHandler = qr(s), this._deprecatedHandler = i, this._identifyMissing = (c, p2) => !(c in p2) || D3(c, p2), this._identifyRequired = f3, this._preprocess = l2, this._postprocess = d2, this.cleanHistory();
  }
  cleanHistory() {
    this._hasDeprecationWarned = zr2();
  }
  normalize(t) {
    let u = {}, o = [this._preprocess(t, this._utils)], n2 = () => {
      for (;o.length !== 0; ) {
        let a = o.shift(), s = this._applyNormalization(a, u);
        o.push(...s);
      }
    };
    n2();
    for (let a of Object.keys(this._utils.schemas)) {
      let s = this._utils.schemas[a];
      if (!(a in u)) {
        let i = iu(s.default(this._utils));
        "value" in i && o.push({ [a]: i.value });
      }
    }
    n2();
    for (let a of Object.keys(this._utils.schemas)) {
      if (!(a in u))
        continue;
      let s = this._utils.schemas[a], i = u[a], D3 = s.postprocess(i, this._utils);
      D3 !== Ae2 && (this._applyValidation(D3, a, s), u[a] = D3);
    }
    return this._applyPostprocess(u), this._applyRequiredCheck(u), u;
  }
  _applyNormalization(t, u) {
    let r = [], { knownKeys: o, unknownKeys: n2 } = this._partitionOptionKeys(t);
    for (let a of o) {
      let s = this._utils.schemas[a], i = s.preprocess(t[a], this._utils);
      this._applyValidation(i, a, s);
      let D3 = ({ from: c, to: p2 }) => {
        r.push(typeof p2 == "string" ? { [p2]: c } : { [p2.key]: p2.value });
      }, f3 = ({ value: c, redirectTo: p2 }) => {
        let F2 = cu(s.deprecated(c, this._utils), i, true);
        if (F2 !== false)
          if (F2 === true)
            this._hasDeprecationWarned(a) || this._utils.logger.warn(this._deprecatedHandler(a, p2, this._utils));
          else
            for (let { value: C2 } of F2) {
              let y3 = { key: a, value: C2 };
              if (!this._hasDeprecationWarned(y3)) {
                let m2 = typeof p2 == "string" ? { key: p2, value: C2 } : p2;
                this._utils.logger.warn(this._deprecatedHandler(y3, m2, this._utils));
              }
            }
      };
      mt2(s.forward(i, this._utils), i).forEach(D3);
      let d2 = fu(s.redirect(i, this._utils), i);
      if (d2.redirect.forEach(D3), "remain" in d2) {
        let c = d2.remain;
        u[a] = a in u ? s.overlap(u[a], c, this._utils) : c, f3({ value: c });
      }
      for (let { from: c, to: p2 } of d2.redirect)
        f3({ value: c, redirectTo: p2 });
    }
    for (let a of n2) {
      let s = t[a];
      this._applyUnknownHandler(a, s, u, (i, D3) => {
        r.push({ [i]: D3 });
      });
    }
    return r;
  }
  _applyRequiredCheck(t) {
    for (let u of Object.keys(this._utils.schemas))
      if (this._identifyMissing(u, t) && this._identifyRequired(u))
        throw this._invalidHandler(u, Dt2, this._utils);
  }
  _partitionOptionKeys(t) {
    let [u, r] = Jr2(Object.keys(t).filter((o) => !this._identifyMissing(o, t)), (o) => (o in this._utils.schemas));
    return { knownKeys: u, unknownKeys: r };
  }
  _applyValidation(t, u, r) {
    let o = Du(r.validate(t, this._utils), t);
    if (o !== true)
      throw this._invalidHandler(u, o.value, this._utils);
  }
  _applyUnknownHandler(t, u, r, o) {
    let n2 = this._unknownHandler(t, u, this._utils);
    if (n2)
      for (let a of Object.keys(n2)) {
        if (this._identifyMissing(a, n2))
          continue;
        let s = n2[a];
        a in this._utils.schemas ? o(a, s) : r[a] = s;
      }
  }
  _applyPostprocess(t) {
    let u = this._postprocess(t, this._utils);
    if (u !== Ae2) {
      if (u.delete)
        for (let r of u.delete)
          delete t[r];
      if (u.override) {
        let { knownKeys: r, unknownKeys: o } = this._partitionOptionKeys(u.override);
        for (let n2 of r) {
          let a = u.override[n2];
          this._applyValidation(a, n2, this._utils.schemas[n2]), t[n2] = a;
        }
        for (let n2 of o) {
          let a = u.override[n2];
          this._applyUnknownHandler(n2, a, t, (s, i) => {
            let D3 = this._utils.schemas[s];
            this._applyValidation(i, s, D3), t[s] = i;
          });
        }
      }
    }
  }
}, lu, un2, ca2, fa2, du, rn2, pu, de2, nn2, Ue = ({ node: e }) => de2(e) && nn2.has(e.language), mu, Eu, on2, Fa2 = (e) => Object.keys(e).filter((t) => !on2.has(t)), Cu, hu, q0, Ca2, ha2, Dn2, se, pf, Au = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ", pn2 = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏０-９＿･", af, sf, _u, Df, cf, ff, It2 = (e, t) => (u) => e(t(u)), hf, gf, Fn2, Fe2, hn2, Bu, yn2, Pa2, Ia2, bn2, ka2 = ({ parser: e }) => e === "json" || e === "json5" || e === "jsonc" || e === "json-stringify", xn2, Ma2, wn2 = "\uFEFF", Tn2, wu, Wa2, $a2, Va2, Mn2 = "3.8.1", Pu, xe2, Be2, ze2, kt2, Yn2, jn2, Un2, Wn2, $n2, Qa2, Za2, Vn2, Kn2, Gn2, zn2, fi2, li2;
var init_standalone = __esm(() => {
  Zn2 = Object.create;
  Mt2 = Object.defineProperty;
  eo2 = Object.getOwnPropertyDescriptor;
  to2 = Object.getOwnPropertyNames;
  uo = Object.getPrototypeOf;
  ro2 = Object.prototype.hasOwnProperty;
  dn2 = no2((of, ln2) => {
    var yt2, bt2, At2, _t, xt2, $e2, bu, Ke2, Bt2, cn2, Tt2, Ve, Nt2, St2, wt2, pe2, fn2, Ot2, Pt2, Aa2;
    Nt2 = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;
    Ve = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
    yt2 = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;
    wt2 = /(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;
    Tt2 = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;
    pe2 = /[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;
    Pt2 = /[\t\v\f\ufeff\p{Zs}]+/yu;
    Ke2 = /\r?\n|[\r\u2028\u2029]/y;
    Bt2 = /\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;
    St2 = /\/\/.*/y;
    At2 = /[<>.:={}]|\/(?![\/*])/y;
    bt2 = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;
    _t = /(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;
    xt2 = /[^<>{}]+/y;
    Ot2 = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;
    fn2 = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;
    $e2 = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;
    bu = /^(?:return|throw|yield)$/;
    cn2 = RegExp(Ke2.source);
    ln2.exports = Aa2 = function* (e, { jsx: t = false } = {}) {
      var u, r, o, n2, a, s, i, D3, f3, l2, d2, c, p2, F2;
      for ({ length: s } = e, n2 = 0, a = "", F2 = [{ tag: "JS" }], u = [], d2 = 0, c = false;n2 < s; ) {
        switch (D3 = F2[F2.length - 1], D3.tag) {
          case "JS":
          case "JSNonExpressionParen":
          case "InterpolationInTemplate":
          case "InterpolationInJSX":
            if (e[n2] === "/" && (Ot2.test(a) || $e2.test(a)) && (Nt2.lastIndex = n2, i = Nt2.exec(e))) {
              n2 = Nt2.lastIndex, a = i[0], c = true, yield { type: "RegularExpressionLiteral", value: i[0], closed: i[1] !== undefined && i[1] !== "\\" };
              continue;
            }
            if (Ve.lastIndex = n2, i = Ve.exec(e)) {
              switch (p2 = i[0], f3 = Ve.lastIndex, l2 = p2, p2) {
                case "(":
                  a === "?NonExpressionParenKeyword" && F2.push({ tag: "JSNonExpressionParen", nesting: d2 }), d2++, c = false;
                  break;
                case ")":
                  d2--, c = true, D3.tag === "JSNonExpressionParen" && d2 === D3.nesting && (F2.pop(), l2 = "?NonExpressionParenEnd", c = false);
                  break;
                case "{":
                  Ve.lastIndex = 0, o = !fn2.test(a) && (Ot2.test(a) || $e2.test(a)), u.push(o), c = false;
                  break;
                case "}":
                  switch (D3.tag) {
                    case "InterpolationInTemplate":
                      if (u.length === D3.nesting) {
                        pe2.lastIndex = n2, i = pe2.exec(e), n2 = pe2.lastIndex, a = i[0], i[1] === "${" ? (a = "?InterpolationInTemplate", c = false, yield { type: "TemplateMiddle", value: i[0] }) : (F2.pop(), c = true, yield { type: "TemplateTail", value: i[0], closed: i[1] === "`" });
                        continue;
                      }
                      break;
                    case "InterpolationInJSX":
                      if (u.length === D3.nesting) {
                        F2.pop(), n2 += 1, a = "}", yield { type: "JSXPunctuator", value: "}" };
                        continue;
                      }
                  }
                  c = u.pop(), l2 = c ? "?ExpressionBraceEnd" : "}";
                  break;
                case "]":
                  c = true;
                  break;
                case "++":
                case "--":
                  l2 = c ? "?PostfixIncDec" : "?UnaryIncDec";
                  break;
                case "<":
                  if (t && (Ot2.test(a) || $e2.test(a))) {
                    F2.push({ tag: "JSXTag" }), n2 += 1, a = "<", yield { type: "JSXPunctuator", value: p2 };
                    continue;
                  }
                  c = false;
                  break;
                default:
                  c = false;
              }
              n2 = f3, a = l2, yield { type: "Punctuator", value: p2 };
              continue;
            }
            if (yt2.lastIndex = n2, i = yt2.exec(e)) {
              switch (n2 = yt2.lastIndex, l2 = i[0], i[0]) {
                case "for":
                case "if":
                case "while":
                case "with":
                  a !== "." && a !== "?." && (l2 = "?NonExpressionParenKeyword");
              }
              a = l2, c = !$e2.test(i[0]), yield { type: i[1] === "#" ? "PrivateIdentifier" : "IdentifierName", value: i[0] };
              continue;
            }
            if (wt2.lastIndex = n2, i = wt2.exec(e)) {
              n2 = wt2.lastIndex, a = i[0], c = true, yield { type: "StringLiteral", value: i[0], closed: i[2] !== undefined };
              continue;
            }
            if (Tt2.lastIndex = n2, i = Tt2.exec(e)) {
              n2 = Tt2.lastIndex, a = i[0], c = true, yield { type: "NumericLiteral", value: i[0] };
              continue;
            }
            if (pe2.lastIndex = n2, i = pe2.exec(e)) {
              n2 = pe2.lastIndex, a = i[0], i[1] === "${" ? (a = "?InterpolationInTemplate", F2.push({ tag: "InterpolationInTemplate", nesting: u.length }), c = false, yield { type: "TemplateHead", value: i[0] }) : (c = true, yield { type: "NoSubstitutionTemplate", value: i[0], closed: i[1] === "`" });
              continue;
            }
            break;
          case "JSXTag":
          case "JSXTagEnd":
            if (At2.lastIndex = n2, i = At2.exec(e)) {
              switch (n2 = At2.lastIndex, l2 = i[0], i[0]) {
                case "<":
                  F2.push({ tag: "JSXTag" });
                  break;
                case ">":
                  F2.pop(), a === "/" || D3.tag === "JSXTagEnd" ? (l2 = "?JSX", c = true) : F2.push({ tag: "JSXChildren" });
                  break;
                case "{":
                  F2.push({ tag: "InterpolationInJSX", nesting: u.length }), l2 = "?InterpolationInJSX", c = false;
                  break;
                case "/":
                  a === "<" && (F2.pop(), F2[F2.length - 1].tag === "JSXChildren" && F2.pop(), F2.push({ tag: "JSXTagEnd" }));
              }
              a = l2, yield { type: "JSXPunctuator", value: i[0] };
              continue;
            }
            if (bt2.lastIndex = n2, i = bt2.exec(e)) {
              n2 = bt2.lastIndex, a = i[0], yield { type: "JSXIdentifier", value: i[0] };
              continue;
            }
            if (_t.lastIndex = n2, i = _t.exec(e)) {
              n2 = _t.lastIndex, a = i[0], yield { type: "JSXString", value: i[0], closed: i[2] !== undefined };
              continue;
            }
            break;
          case "JSXChildren":
            if (xt2.lastIndex = n2, i = xt2.exec(e)) {
              n2 = xt2.lastIndex, a = i[0], yield { type: "JSXText", value: i[0] };
              continue;
            }
            switch (e[n2]) {
              case "<":
                F2.push({ tag: "JSXTag" }), n2++, a = "<", yield { type: "JSXPunctuator", value: "<" };
                continue;
              case "{":
                F2.push({ tag: "InterpolationInJSX", nesting: u.length }), n2++, a = "?InterpolationInJSX", c = false, yield { type: "JSXPunctuator", value: "{" };
                continue;
            }
        }
        if (Pt2.lastIndex = n2, i = Pt2.exec(e)) {
          n2 = Pt2.lastIndex, yield { type: "WhiteSpace", value: i[0] };
          continue;
        }
        if (Ke2.lastIndex = n2, i = Ke2.exec(e)) {
          n2 = Ke2.lastIndex, c = false, bu.test(a) && (a = "?NoLineTerminatorHere"), yield { type: "LineTerminatorSequence", value: i[0] };
          continue;
        }
        if (Bt2.lastIndex = n2, i = Bt2.exec(e)) {
          n2 = Bt2.lastIndex, cn2.test(i[0]) && (c = false, bu.test(a) && (a = "?NoLineTerminatorHere")), yield { type: "MultiLineComment", value: i[0], closed: i[1] !== undefined };
          continue;
        }
        if (St2.lastIndex = n2, i = St2.exec(e)) {
          n2 = St2.lastIndex, c = false, yield { type: "SingleLineComment", value: i[0] };
          continue;
        }
        r = String.fromCodePoint(e.codePointAt(n2)), n2 += r.length, a = r, c = false, yield { type: D3.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid", value: r };
      }
    };
  });
  Hn2 = {};
  Yt(Hn2, { __debug: () => li2, check: () => ci2, doc: () => wu, format: () => Jn2, formatWithCursor: () => zn2, getSupportInfo: () => fi2, util: () => Pu, version: () => Mn2 });
  io2 = String.prototype.replaceAll ?? function(e, t) {
    return e.global ? this.replace(e, t) : this.split(e).join(t);
  };
  so2 = X2("replaceAll", function() {
    if (typeof this == "string")
      return io2;
  });
  oe2 = so2;
  jt = class extends Ne2 {
    tokenize(t) {
      return t.slice();
    }
    join(t) {
      return t;
    }
    removeEmpty(t) {
      return t;
    }
  };
  ku = new jt;
  P2 = Do2;
  fo = co2;
  lo2 = Je2;
  po = new Map([[Je2, /\n/gu], [Wt2, /\r/gu], [Mu, /\r\n/gu]]);
  Fo2 = /\r\n?/gu;
  Eo = X2("at", function() {
    if (Array.isArray(this) || typeof this == "string")
      return mo;
  });
  b3 = Eo;
  He = new Set([U2, I2, k3, v3, x2, w2, B, R3, L2, M, _3, O3, T2]);
  H2 = Co;
  Vt2 = class extends Error {
    name = "InvalidDocError";
    constructor(t) {
      super(go(t)), this.doc = t;
    }
  };
  Z = Vt2;
  Wu = {};
  we2 = yo;
  N3 = P2;
  Ze2 = P2;
  Xu = P2;
  qu = P2;
  ce2 = { type: T2 };
  ee = { type: U2 };
  ut2 = { type: _3 };
  or3 = { type: _3, soft: true };
  ke = { type: _3, hard: true };
  V2 = [ke, ce2];
  Gt = { type: _3, hard: true, literal: true };
  Qe2 = [Gt, ce2];
  ar2 = { type: M };
  ir2 = { type: v3 };
  To = /[^\x20-\x7F]/u;
  No = new Set(cr2);
  Re2 = So;
  wo = { type: 0 };
  Oo2 = { type: 1 };
  Ht2 = { value: "", length: 0, queue: [], get root() {
    return Ht2;
  } };
  W2 = Symbol("MODE_BREAK");
  q2 = Symbol("MODE_FLAT");
  qt2 = Symbol("DOC_FILL_PRINTED_LENGTH");
  he2 = Io2;
  pr2 = Qt2;
  ge2 = ko;
  Fr2 = ye2(/\s/u);
  Y2 = ye2(" \t");
  nt2 = ye2(",; \t");
  ot2 = ye2(/[^\n\r]/u);
  K2 = vo;
  z2 = Ro2;
  Er2 = Lo2;
  at2 = gr2;
  uu = new WeakMap;
  Le2 = Uo2;
  Me2 = class extends Error {
    name = "ConfigError";
  };
  Ye2 = class extends Error {
    name = "UndefinedParserError";
  };
  Sr2 = { checkIgnorePragma: { category: "Special", type: "boolean", default: false, description: "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.", cliCategory: "Other" }, cursorOffset: { category: "Special", type: "int", default: -1, range: { start: -1, end: 1 / 0, step: 1 }, description: "Print (to stderr) where a cursor at the given position would move to after formatting.", cliCategory: "Editor" }, endOfLine: { category: "Global", type: "choice", default: "lf", description: "Which end of line characters to apply.", choices: [{ value: "lf", description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { value: "crlf", description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { value: "cr", description: "Carriage Return character only (\\r), used very rarely" }, { value: "auto", description: `Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)` }] }, filepath: { category: "Special", type: "path", description: "Specify the input filepath. This will be used to do parser inference.", cliName: "stdin-filepath", cliCategory: "Other", cliDescription: "Path to the file to pretend that stdin comes from." }, insertPragma: { category: "Special", type: "boolean", default: false, description: "Insert @format pragma into file's first docblock comment.", cliCategory: "Other" }, parser: { category: "Global", type: "choice", default: undefined, description: "Which parser to use.", exception: (e) => typeof e == "string" || typeof e == "function", choices: [{ value: "flow", description: "Flow" }, { value: "babel", description: "JavaScript" }, { value: "babel-flow", description: "Flow" }, { value: "babel-ts", description: "TypeScript" }, { value: "typescript", description: "TypeScript" }, { value: "acorn", description: "JavaScript" }, { value: "espree", description: "JavaScript" }, { value: "meriyah", description: "JavaScript" }, { value: "css", description: "CSS" }, { value: "less", description: "Less" }, { value: "scss", description: "SCSS" }, { value: "json", description: "JSON" }, { value: "json5", description: "JSON5" }, { value: "jsonc", description: "JSON with Comments" }, { value: "json-stringify", description: "JSON.stringify" }, { value: "graphql", description: "GraphQL" }, { value: "markdown", description: "Markdown" }, { value: "mdx", description: "MDX" }, { value: "vue", description: "Vue" }, { value: "yaml", description: "YAML" }, { value: "glimmer", description: "Ember / Handlebars" }, { value: "html", description: "HTML" }, { value: "angular", description: "Angular" }, { value: "lwc", description: "Lightning Web Components" }, { value: "mjml", description: "MJML" }] }, plugins: { type: "path", array: true, default: [{ value: [] }], category: "Global", description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", exception: (e) => typeof e == "string" || typeof e == "object", cliName: "plugin", cliCategory: "Config" }, printWidth: { category: "Global", type: "int", default: 80, description: "The line length where Prettier will try wrap.", range: { start: 0, end: 1 / 0, step: 1 } }, rangeEnd: { category: "Special", type: "int", default: 1 / 0, range: { start: 0, end: 1 / 0, step: 1 }, description: `Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.`, cliCategory: "Editor" }, rangeStart: { category: "Special", type: "int", default: 0, range: { start: 0, end: 1 / 0, step: 1 }, description: `Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.`, cliCategory: "Editor" }, requirePragma: { category: "Special", type: "boolean", default: false, description: "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.", cliCategory: "Other" }, tabWidth: { type: "int", category: "Global", default: 2, description: "Number of spaces per indentation level.", range: { start: 0, end: 1 / 0, step: 1 } }, useTabs: { category: "Global", type: "boolean", default: false, description: "Indent with tabs instead of spaces." }, embeddedLanguageFormatting: { category: "Global", type: "choice", default: "auto", description: "Control how Prettier formats quoted code embedded in the file.", choices: [{ value: "auto", description: "Format embedded code if Prettier can automatically identify it." }, { value: "off", description: "Never automatically format embedded code." }] } };
  zo2 = Array.prototype.toReversed ?? function() {
    return [...this].reverse();
  };
  Jo2 = X2("toReversed", function() {
    if (Array.isArray(this))
      return zo2;
  });
  wr2 = Jo2;
  Xo2 = Ho2();
  st2 = ta2;
  ie2 = { key: (e) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e) ? e : JSON.stringify(e), value(e) {
    if (e === null || typeof e != "object")
      return JSON.stringify(e);
    if (Array.isArray(e))
      return `[${e.map((u) => ie2.value(u)).join(", ")}]`;
    let t = Object.keys(e);
    return t.length === 0 ? "{}" : `{ ${t.map((u) => `${ie2.key(u)}: ${ie2.value(e[u])}`).join(", ")} }`;
  }, pair: ({ key: e, value: t }) => ie2.value({ [e]: t }) };
  nu = new Proxy(String, { get: () => nu });
  $2 = nu;
  Dt2 = Symbol.for("vnopts.VALUE_NOT_EXIST");
  Ae2 = Symbol.for("vnopts.VALUE_UNCHANGED");
  Lr2 = " ".repeat(2);
  _e2 = [];
  au = [];
  ua2 = ["default", "expected", "validate", "deprecated", "forward", "redirect", "overlap", "preprocess", "postprocess"];
  lt3 = class extends S2 {
    constructor(t) {
      super(t), this._sourceName = t.sourceName;
    }
    expected(t) {
      return t.schemas[this._sourceName].expected(t);
    }
    validate(t, u) {
      return u.schemas[this._sourceName].validate(t, u);
    }
    redirect(t, u) {
      return this._sourceName;
    }
  };
  dt = class extends S2 {
    expected() {
      return "anything";
    }
    validate() {
      return true;
    }
  };
  pt2 = class extends S2 {
    constructor({ valueSchema: t, name: u = t.name, ...r }) {
      super({ ...r, name: u }), this._valueSchema = t;
    }
    expected(t) {
      let { text: u, list: r } = t.normalizeExpectedResult(this._valueSchema.expected(t));
      return { text: u && `an array of ${u}`, list: r && { title: "an array of the following values", values: [{ list: r }] } };
    }
    validate(t, u) {
      if (!Array.isArray(t))
        return false;
      let r = [];
      for (let o of t) {
        let n2 = u.normalizeValidateResult(this._valueSchema.validate(o, u), o);
        n2 !== true && r.push(n2.value);
      }
      return r.length === 0 ? true : { value: r };
    }
    deprecated(t, u) {
      let r = [];
      for (let o of t) {
        let n2 = u.normalizeDeprecatedResult(this._valueSchema.deprecated(o, u), o);
        n2 !== false && r.push(...n2.map(({ value: a }) => ({ value: [a] })));
      }
      return r;
    }
    forward(t, u) {
      let r = [];
      for (let o of t) {
        let n2 = u.normalizeForwardResult(this._valueSchema.forward(o, u), o);
        r.push(...n2.map($r2));
      }
      return r;
    }
    redirect(t, u) {
      let r = [], o = [];
      for (let n2 of t) {
        let a = u.normalizeRedirectResult(this._valueSchema.redirect(n2, u), n2);
        "remain" in a && r.push(a.remain), o.push(...a.redirect.map($r2));
      }
      return r.length === 0 ? { redirect: o } : { redirect: o, remain: r };
    }
    overlap(t, u) {
      return t.concat(u);
    }
  };
  Ft2 = class extends S2 {
    expected() {
      return "true or false";
    }
    validate(t) {
      return typeof t == "boolean";
    }
  };
  Et2 = class extends S2 {
    constructor(t) {
      super(t), this._choices = Gr2(t.choices.map((u) => u && typeof u == "object" ? u : { value: u }), "value");
    }
    expected({ descriptor: t }) {
      let u = Array.from(this._choices.keys()).map((a) => this._choices.get(a)).filter(({ hidden: a }) => !a).map((a) => a.value).sort(Xr2).map(t.value), r = u.slice(0, -2), o = u.slice(-2);
      return { text: r.concat(o.join(" or ")).join(", "), list: { title: "one of the following values", values: u } };
    }
    validate(t) {
      return this._choices.has(t);
    }
    deprecated(t) {
      let u = this._choices.get(t);
      return u && u.deprecated ? { value: t } : false;
    }
    forward(t) {
      let u = this._choices.get(t);
      return u ? u.forward : undefined;
    }
    redirect(t) {
      let u = this._choices.get(t);
      return u ? u.redirect : undefined;
    }
  };
  Ct2 = class extends S2 {
    expected() {
      return "a number";
    }
    validate(t, u) {
      return typeof t == "number";
    }
  };
  ht = class extends Ct2 {
    expected() {
      return "an integer";
    }
    validate(t, u) {
      return u.normalizeValidateResult(super.validate(t, u), t) === true && Hr2(t);
    }
  };
  je2 = class extends S2 {
    expected() {
      return "a string";
    }
    validate(t) {
      return typeof t == "string";
    }
  };
  Qr2 = ie2;
  Zr2 = ft2;
  en2 = Yr2;
  tn2 = Rr;
  un2 = ia2;
  ca2 = Array.prototype.findLast ?? function(e) {
    for (let t = this.length - 1;t >= 0; t--) {
      let u = this[t];
      if (e(u, t, this))
        return u;
    }
  };
  fa2 = X2("findLast", function() {
    if (Array.isArray(this))
      return ca2;
  });
  du = fa2;
  rn2 = Symbol.for("PRETTIER_IS_FRONT_MATTER");
  pu = [];
  de2 = la2;
  nn2 = new Set(["yaml", "toml"]);
  mu = da2;
  Eu = pa2;
  on2 = new Set(["tokens", "comments", "parent", "enclosingNode", "precedingNode", "followingNode"]);
  Cu = ma2;
  hu = new WeakMap;
  q0 = Symbol("PRINTER_NORMALIZED_MARK");
  Ca2 = ["clean", "embed", "print"];
  ha2 = Object.fromEntries(Ca2.map((e) => [e, false]));
  Dn2 = { astFormat: "estree", printer: {}, originalText: undefined, locStart: null, locEnd: null, getVisitorKeys: null };
  se = ba;
  pf = ao2(dn2(), 1);
  af = new RegExp("[" + Au + "]");
  sf = new RegExp("[" + Au + pn2 + "]");
  Au = pn2 = null;
  _u = { keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], strictBind: ["eval", "arguments"] };
  Df = new Set(_u.keyword);
  cf = new Set(_u.strict);
  ff = new Set(_u.strictBind);
  hf = mn2(ou(true));
  gf = mn2(ou(false));
  Fn2 = /\r\n|[\n\r\u2028\u2029]/;
  Fe2 = Ba2;
  hn2 = Sa2;
  Bu = wa2;
  yn2 = Oa2;
  Pa2 = Array.prototype.findLastIndex ?? function(e) {
    for (let t = this.length - 1;t >= 0; t--) {
      let u = this[t];
      if (e(u, t, this))
        return t;
    }
    return -1;
  };
  Ia2 = X2("findLastIndex", function() {
    if (Array.isArray(this))
      return Pa2;
  });
  bn2 = Ia2;
  xn2 = new Set(["JsonRoot", "ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral", "UnaryExpression", "TemplateLiteral"]);
  Ma2 = new Set(["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]);
  Tn2 = Symbol("cursor");
  wu = {};
  Yt(wu, { builders: () => Wa2, printer: () => $a2, utils: () => Va2 });
  Wa2 = { join: Ie2, line: ut2, softline: or3, hardline: V2, literalline: Qe2, group: Kt, conditionalGroup: tr2, fill: er2, lineSuffix: ve2, lineSuffixBoundary: ar2, cursor: ee, breakParent: ce2, ifBreak: ur2, trim: ir2, indent: ae, indentIfBreak: rr2, align: De2, addAlignmentToDoc: tt2, markAsRoot: et2, dedentToRoot: Qu, dedent: Zu, hardlineWithoutBreakParent: ke, literallineWithoutBreakParent: Gt, label: nr, concat: (e) => e };
  $a2 = { printDocToString: Ce2 };
  Va2 = { willBreak: Ku, traverseDoc: we2, findInDoc: Xe2, mapDoc: Pe2, removeLines: zu, stripTrailingHardline: qe2, replaceEndOfLine: Ju, canBreak: Hu };
  Pu = {};
  Yt(Pu, { addDanglingComment: () => ue2, addLeadingComment: () => fe2, addTrailingComment: () => le, getAlignmentSize: () => he2, getIndentSize: () => Yn2, getMaxContinuousCount: () => jn2, getNextNonSpaceNonCommentCharacter: () => Un2, getNextNonSpaceNonCommentCharacterIndex: () => ni2, getPreferredQuote: () => Vn2, getStringWidth: () => Re2, hasNewline: () => z2, hasNewlineInRange: () => Kn2, hasSpaces: () => Gn2, isNextLineEmpty: () => Di2, isNextLineEmptyAfterIndex: () => kt2, isPreviousLineEmpty: () => ai2, makeString: () => si2, skip: () => ye2, skipEverythingButNewLine: () => ot2, skipInlineComment: () => xe2, skipNewline: () => K2, skipSpaces: () => Y2, skipToLineEnd: () => nt2, skipTrailingComment: () => Be2, skipWhitespace: () => Fr2 });
  xe2 = Ka2;
  Be2 = Ga2;
  ze2 = za2;
  kt2 = Ja2;
  Yn2 = Ha2;
  jn2 = Xa2;
  Un2 = qa2;
  Wn2 = Object.freeze({ character: "'", codePoint: 39 });
  $n2 = Object.freeze({ character: '"', codePoint: 34 });
  Qa2 = Object.freeze({ preferred: Wn2, alternate: $n2 });
  Za2 = Object.freeze({ preferred: $n2, alternate: Wn2 });
  Vn2 = ei2;
  Kn2 = ti2;
  Gn2 = ui2;
  zn2 = me2(Su);
  fi2 = me2(it2, 0);
  li2 = { parse: me2(In2), formatAST: me2(kn2), formatDoc: me2(vn2), printToDoc: me2(Rn2), printDocToString: me2(Ln2) };
});

// ../../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/esm/index.js
function isTag(elem) {
  return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
}
var ElementType, Root, Text, Directive, Comment, Script, Style, Tag, CDATA, Doctype;
var init_esm = __esm(() => {
  (function(ElementType2) {
    ElementType2["Root"] = "root";
    ElementType2["Text"] = "text";
    ElementType2["Directive"] = "directive";
    ElementType2["Comment"] = "comment";
    ElementType2["Script"] = "script";
    ElementType2["Style"] = "style";
    ElementType2["Tag"] = "tag";
    ElementType2["CDATA"] = "cdata";
    ElementType2["Doctype"] = "doctype";
  })(ElementType || (ElementType = {}));
  Root = ElementType.Root;
  Text = ElementType.Text;
  Directive = ElementType.Directive;
  Comment = ElementType.Comment;
  Script = ElementType.Script;
  Style = ElementType.Style;
  Tag = ElementType.Tag;
  CDATA = ElementType.CDATA;
  Doctype = ElementType.Doctype;
});

// ../../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/node.js
class Node {
  constructor() {
    this.parent = null;
    this.prev = null;
    this.next = null;
    this.startIndex = null;
    this.endIndex = null;
  }
  get parentNode() {
    return this.parent;
  }
  set parentNode(parent) {
    this.parent = parent;
  }
  get previousSibling() {
    return this.prev;
  }
  set previousSibling(prev) {
    this.prev = prev;
  }
  get nextSibling() {
    return this.next;
  }
  set nextSibling(next) {
    this.next = next;
  }
  cloneNode(recursive = false) {
    return cloneNode(this, recursive);
  }
}
function isTag2(node2) {
  return isTag(node2);
}
function isCDATA(node2) {
  return node2.type === ElementType.CDATA;
}
function isText(node2) {
  return node2.type === ElementType.Text;
}
function isComment(node2) {
  return node2.type === ElementType.Comment;
}
function isDirective(node2) {
  return node2.type === ElementType.Directive;
}
function isDocument(node2) {
  return node2.type === ElementType.Root;
}
function cloneNode(node2, recursive = false) {
  let result;
  if (isText(node2)) {
    result = new Text2(node2.data);
  } else if (isComment(node2)) {
    result = new Comment2(node2.data);
  } else if (isTag2(node2)) {
    const children = recursive ? cloneChildren(node2.children) : [];
    const clone2 = new Element2(node2.name, { ...node2.attribs }, children);
    children.forEach((child) => child.parent = clone2);
    if (node2.namespace != null) {
      clone2.namespace = node2.namespace;
    }
    if (node2["x-attribsNamespace"]) {
      clone2["x-attribsNamespace"] = { ...node2["x-attribsNamespace"] };
    }
    if (node2["x-attribsPrefix"]) {
      clone2["x-attribsPrefix"] = { ...node2["x-attribsPrefix"] };
    }
    result = clone2;
  } else if (isCDATA(node2)) {
    const children = recursive ? cloneChildren(node2.children) : [];
    const clone2 = new CDATA2(children);
    children.forEach((child) => child.parent = clone2);
    result = clone2;
  } else if (isDocument(node2)) {
    const children = recursive ? cloneChildren(node2.children) : [];
    const clone2 = new Document(children);
    children.forEach((child) => child.parent = clone2);
    if (node2["x-mode"]) {
      clone2["x-mode"] = node2["x-mode"];
    }
    result = clone2;
  } else if (isDirective(node2)) {
    const instruction = new ProcessingInstruction(node2.name, node2.data);
    if (node2["x-name"] != null) {
      instruction["x-name"] = node2["x-name"];
      instruction["x-publicId"] = node2["x-publicId"];
      instruction["x-systemId"] = node2["x-systemId"];
    }
    result = instruction;
  } else {
    throw new Error(`Not implemented yet: ${node2.type}`);
  }
  result.startIndex = node2.startIndex;
  result.endIndex = node2.endIndex;
  if (node2.sourceCodeLocation != null) {
    result.sourceCodeLocation = node2.sourceCodeLocation;
  }
  return result;
}
function cloneChildren(childs) {
  const children = childs.map((child) => cloneNode(child, true));
  for (let i = 1;i < children.length; i++) {
    children[i].prev = children[i - 1];
    children[i - 1].next = children[i];
  }
  return children;
}
var DataNode, Text2, Comment2, ProcessingInstruction, NodeWithChildren, CDATA2, Document, Element2;
var init_node = __esm(() => {
  init_esm();
  DataNode = class DataNode extends Node {
    constructor(data) {
      super();
      this.data = data;
    }
    get nodeValue() {
      return this.data;
    }
    set nodeValue(data) {
      this.data = data;
    }
  };
  Text2 = class Text2 extends DataNode {
    constructor() {
      super(...arguments);
      this.type = ElementType.Text;
    }
    get nodeType() {
      return 3;
    }
  };
  Comment2 = class Comment2 extends DataNode {
    constructor() {
      super(...arguments);
      this.type = ElementType.Comment;
    }
    get nodeType() {
      return 8;
    }
  };
  ProcessingInstruction = class ProcessingInstruction extends DataNode {
    constructor(name, data) {
      super(data);
      this.name = name;
      this.type = ElementType.Directive;
    }
    get nodeType() {
      return 1;
    }
  };
  NodeWithChildren = class NodeWithChildren extends Node {
    constructor(children) {
      super();
      this.children = children;
    }
    get firstChild() {
      var _a4;
      return (_a4 = this.children[0]) !== null && _a4 !== undefined ? _a4 : null;
    }
    get lastChild() {
      return this.children.length > 0 ? this.children[this.children.length - 1] : null;
    }
    get childNodes() {
      return this.children;
    }
    set childNodes(children) {
      this.children = children;
    }
  };
  CDATA2 = class CDATA2 extends NodeWithChildren {
    constructor() {
      super(...arguments);
      this.type = ElementType.CDATA;
    }
    get nodeType() {
      return 4;
    }
  };
  Document = class Document extends NodeWithChildren {
    constructor() {
      super(...arguments);
      this.type = ElementType.Root;
    }
    get nodeType() {
      return 9;
    }
  };
  Element2 = class Element2 extends NodeWithChildren {
    constructor(name, attribs, children = [], type2 = name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag) {
      super(children);
      this.name = name;
      this.attribs = attribs;
      this.type = type2;
    }
    get nodeType() {
      return 1;
    }
    get tagName() {
      return this.name;
    }
    set tagName(name) {
      this.name = name;
    }
    get attributes() {
      return Object.keys(this.attribs).map((name) => {
        var _a4, _b;
        return {
          name,
          value: this.attribs[name],
          namespace: (_a4 = this["x-attribsNamespace"]) === null || _a4 === undefined ? undefined : _a4[name],
          prefix: (_b = this["x-attribsPrefix"]) === null || _b === undefined ? undefined : _b[name]
        };
      });
    }
  };
});

// ../../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/index.js
class DomHandler {
  constructor(callback, options2, elementCB) {
    this.dom = [];
    this.root = new Document(this.dom);
    this.done = false;
    this.tagStack = [this.root];
    this.lastNode = null;
    this.parser = null;
    if (typeof options2 === "function") {
      elementCB = options2;
      options2 = defaultOpts;
    }
    if (typeof callback === "object") {
      options2 = callback;
      callback = undefined;
    }
    this.callback = callback !== null && callback !== undefined ? callback : null;
    this.options = options2 !== null && options2 !== undefined ? options2 : defaultOpts;
    this.elementCB = elementCB !== null && elementCB !== undefined ? elementCB : null;
  }
  onparserinit(parser2) {
    this.parser = parser2;
  }
  onreset() {
    this.dom = [];
    this.root = new Document(this.dom);
    this.done = false;
    this.tagStack = [this.root];
    this.lastNode = null;
    this.parser = null;
  }
  onend() {
    if (this.done)
      return;
    this.done = true;
    this.parser = null;
    this.handleCallback(null);
  }
  onerror(error49) {
    this.handleCallback(error49);
  }
  onclosetag() {
    this.lastNode = null;
    const elem = this.tagStack.pop();
    if (this.options.withEndIndices) {
      elem.endIndex = this.parser.endIndex;
    }
    if (this.elementCB)
      this.elementCB(elem);
  }
  onopentag(name, attribs) {
    const type2 = this.options.xmlMode ? ElementType.Tag : undefined;
    const element = new Element2(name, attribs, undefined, type2);
    this.addNode(element);
    this.tagStack.push(element);
  }
  ontext(data) {
    const { lastNode } = this;
    if (lastNode && lastNode.type === ElementType.Text) {
      lastNode.data += data;
      if (this.options.withEndIndices) {
        lastNode.endIndex = this.parser.endIndex;
      }
    } else {
      const node3 = new Text2(data);
      this.addNode(node3);
      this.lastNode = node3;
    }
  }
  oncomment(data) {
    if (this.lastNode && this.lastNode.type === ElementType.Comment) {
      this.lastNode.data += data;
      return;
    }
    const node3 = new Comment2(data);
    this.addNode(node3);
    this.lastNode = node3;
  }
  oncommentend() {
    this.lastNode = null;
  }
  oncdatastart() {
    const text2 = new Text2("");
    const node3 = new CDATA2([text2]);
    this.addNode(node3);
    text2.parent = node3;
    this.lastNode = text2;
  }
  oncdataend() {
    this.lastNode = null;
  }
  onprocessinginstruction(name, data) {
    const node3 = new ProcessingInstruction(name, data);
    this.addNode(node3);
  }
  handleCallback(error49) {
    if (typeof this.callback === "function") {
      this.callback(error49, this.dom);
    } else if (error49) {
      throw error49;
    }
  }
  addNode(node3) {
    const parent = this.tagStack[this.tagStack.length - 1];
    const previousSibling = parent.children[parent.children.length - 1];
    if (this.options.withStartIndices) {
      node3.startIndex = this.parser.startIndex;
    }
    if (this.options.withEndIndices) {
      node3.endIndex = this.parser.endIndex;
    }
    parent.children.push(node3);
    if (previousSibling) {
      node3.prev = previousSibling;
      previousSibling.next = node3;
    }
    node3.parent = parent;
    this.lastNode = null;
  }
}
var defaultOpts;
var init_esm2 = __esm(() => {
  init_esm();
  init_node();
  init_node();
  defaultOpts = {
    withStartIndices: false,
    withEndIndices: false,
    xmlMode: false
  };
});

// ../../node_modules/.pnpm/leac@0.6.0/node_modules/leac/lib/leac.mjs
function n2(n3) {
  const o = [...n3.matchAll(e)].map((e2) => e2.index || 0);
  o.unshift(-1);
  const s = t(o, 0, o.length);
  return (e2) => r(s, e2);
}
function t(e2, n3, r) {
  if (r - n3 == 1)
    return { offset: e2[n3], index: n3 + 1 };
  const o = Math.ceil((n3 + r) / 2), s = t(e2, n3, o), l2 = t(e2, o, r);
  return { offset: s.offset, low: s, high: l2 };
}
function r(e2, n3) {
  return function(e3) {
    return Object.prototype.hasOwnProperty.call(e3, "index");
  }(e2) ? { line: e2.index, column: n3 - e2.offset } : r(e2.high.offset < n3 ? e2.high : e2.low, n3);
}
function o(e2, t2 = "", r2 = {}) {
  const o2 = typeof t2 != "string" ? t2 : r2, l2 = typeof t2 == "string" ? t2 : "", c = e2.map(s), f3 = !!o2.lineNumbers;
  return function(e3, t3 = 0) {
    const r3 = f3 ? n2(e3) : () => ({ line: 0, column: 0 });
    let o3 = t3;
    const s = [];
    e:
      for (;o3 < e3.length; ) {
        let n3 = false;
        for (const t4 of c) {
          t4.regex.lastIndex = o3;
          const c2 = t4.regex.exec(e3);
          if (c2 && c2[0].length > 0) {
            if (!t4.discard) {
              const e4 = r3(o3), n4 = typeof t4.replace == "string" ? c2[0].replace(new RegExp(t4.regex.source, t4.regex.flags), t4.replace) : c2[0];
              s.push({ state: l2, name: t4.name, text: n4, offset: o3, len: c2[0].length, line: e4.line, column: e4.column });
            }
            if (o3 = t4.regex.lastIndex, n3 = true, t4.push) {
              const n4 = t4.push(e3, o3);
              s.push(...n4.tokens), o3 = n4.offset;
            }
            if (t4.pop)
              break e;
            break;
          }
        }
        if (!n3)
          break;
      }
    return { tokens: s, offset: o3, complete: e3.length <= o3 };
  };
}
function s(e2, n3) {
  return { ...e2, regex: l2(e2, n3) };
}
function l2(e2, n3) {
  if (e2.name.length === 0)
    throw new Error(`Rule #${n3} has empty name, which is not allowed.`);
  if (function(e3) {
    return Object.prototype.hasOwnProperty.call(e3, "regex");
  }(e2))
    return function(e3) {
      if (e3.global)
        throw new Error(`Regular expression /${e3.source}/${e3.flags} contains the global flag, which is not allowed.`);
      return e3.sticky ? e3 : new RegExp(e3.source, e3.flags + "y");
    }(e2.regex);
  if (function(e3) {
    return Object.prototype.hasOwnProperty.call(e3, "str");
  }(e2)) {
    if (e2.str.length === 0)
      throw new Error(`Rule #${n3} ("${e2.name}") has empty "str" property, which is not allowed.`);
    return new RegExp(c(e2.str), "y");
  }
  return new RegExp(c(e2.name), "y");
}
function c(e2) {
  return e2.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g, "\\$&");
}
var e;
var init_leac = __esm(() => {
  e = /\n/g;
});

// ../../node_modules/.pnpm/peberminta@0.9.0/node_modules/peberminta/lib/core.mjs
function token(onToken, onEnd) {
  return (data, i) => {
    let position = i;
    let value = undefined;
    if (i < data.tokens.length) {
      value = onToken(data.tokens[i], data, i);
      if (value !== undefined) {
        position++;
      }
    } else {
      onEnd?.(data, i);
    }
    return value === undefined ? { matched: false } : {
      matched: true,
      position,
      value
    };
  };
}
function mapInner(r2, f3) {
  return r2.matched ? {
    matched: true,
    position: r2.position,
    value: f3(r2.value, r2.position)
  } : r2;
}
function mapOuter(r2, f3) {
  return r2.matched ? f3(r2) : r2;
}
function map2(p2, mapper) {
  return (data, i) => mapInner(p2(data, i), (v4, j3) => mapper(v4, data, i, j3));
}
function option(p2, def2) {
  return (data, i) => {
    const r2 = p2(data, i);
    return r2.matched ? r2 : {
      matched: true,
      position: i,
      value: def2
    };
  };
}
function choice(...ps2) {
  return (data, i) => {
    for (const p2 of ps2) {
      const result = p2(data, i);
      if (result.matched) {
        return result;
      }
    }
    return { matched: false };
  };
}
function otherwise(pa3, pb) {
  return (data, i) => {
    const r1 = pa3(data, i);
    return r1.matched ? r1 : pb(data, i);
  };
}
function takeWhile(p2, test) {
  return (data, i) => {
    const values = [];
    let success2 = true;
    do {
      const r2 = p2(data, i);
      if (r2.matched && test(r2.value, values.length + 1, data, i, r2.position)) {
        values.push(r2.value);
        i = r2.position;
      } else {
        success2 = false;
      }
    } while (success2);
    return {
      matched: true,
      position: i,
      value: values
    };
  };
}
function many(p2) {
  return takeWhile(p2, () => true);
}
function many1(p2) {
  return ab(p2, many(p2), (head, tail) => [head, ...tail]);
}
function ab(pa3, pb, join4) {
  return (data, i) => mapOuter(pa3(data, i), (ma3) => mapInner(pb(data, ma3.position), (vb, j3) => join4(ma3.value, vb, data, i, j3)));
}
function left(pa3, pb) {
  return ab(pa3, pb, (va3) => va3);
}
function right(pa3, pb) {
  return ab(pa3, pb, (va3, vb) => vb);
}
function abc(pa3, pb, pc, join4) {
  return (data, i) => mapOuter(pa3(data, i), (ma3) => mapOuter(pb(data, ma3.position), (mb) => mapInner(pc(data, mb.position), (vc, j3) => join4(ma3.value, mb.value, vc, data, i, j3))));
}
function middle(pa3, pb, pc) {
  return abc(pa3, pb, pc, (ra3, rb) => rb);
}
function all(...ps2) {
  return (data, i) => {
    const result = [];
    let position = i;
    for (const p2 of ps2) {
      const r1 = p2(data, position);
      if (r1.matched) {
        result.push(r1.value);
        position = r1.position;
      } else {
        return { matched: false };
      }
    }
    return {
      matched: true,
      position,
      value: result
    };
  };
}
function flatten(...ps2) {
  return flatten1(all(...ps2));
}
function flatten1(p2) {
  return map2(p2, (vs3) => vs3.flatMap((v4) => v4));
}
function chainReduce(acc, f3) {
  return (data, i) => {
    let loop = true;
    let acc1 = acc;
    let pos = i;
    do {
      const r2 = f3(acc1, data, pos)(data, pos);
      if (r2.matched) {
        acc1 = r2.value;
        pos = r2.position;
      } else {
        loop = false;
      }
    } while (loop);
    return {
      matched: true,
      position: pos,
      value: acc1
    };
  };
}
function reduceLeft(acc, p2, reducer) {
  return chainReduce(acc, (acc2) => map2(p2, (v4, data, i, j3) => reducer(acc2, v4, data, i, j3)));
}
function leftAssoc2(pLeft, pOper, pRight) {
  return chain(pLeft, (v0) => reduceLeft(v0, ab(pOper, pRight, (f3, y3) => [f3, y3]), (acc, [f3, y3]) => f3(acc, y3)));
}
function chain(p2, f3) {
  return (data, i) => mapOuter(p2(data, i), (m1) => f3(m1.value, data, i, m1.position)(data, m1.position));
}
var init_core = () => {};

// ../../node_modules/.pnpm/parseley@0.12.1/node_modules/parseley/lib/parseley.mjs
function sumSpec([a0, a1, a2], [b0, b1, b22]) {
  return [a0 + b0, a1 + b1, a2 + b22];
}
function sumAllSpec(ss2) {
  return ss2.reduce(sumSpec, [0, 0, 0]);
}
function unescape(escapedString) {
  const lexerResult = lexEscapedString(escapedString);
  const result = escapedString_({ tokens: lexerResult.tokens, options: undefined }, 0);
  return result.value;
}
function literal2(name2) {
  return token((t2) => t2.name === name2 ? true : undefined);
}
function optionallySpaced(parser2) {
  return middle(optionalWhitespace_, parser2, optionalWhitespace_);
}
function parse_(parser2, str) {
  if (!(typeof str === "string" || str instanceof String)) {
    throw new Error("Expected a selector string. Actual input is not a string!");
  }
  const lexerResult = lexSelector(str);
  if (!lexerResult.complete) {
    throw new Error(`The input "${str}" was only partially tokenized, stopped at offset ${lexerResult.offset}!
` + prettyPrintPosition(str, lexerResult.offset));
  }
  const result = optionallySpaced(parser2)({ tokens: lexerResult.tokens, options: undefined }, 0);
  if (!result.matched) {
    throw new Error(`No match for "${str}" input!`);
  }
  if (result.position < lexerResult.tokens.length) {
    const token2 = lexerResult.tokens[result.position];
    throw new Error(`The input "${str}" was only partially parsed, stopped at offset ${token2.offset}!
` + prettyPrintPosition(str, token2.offset, token2.len));
  }
  return result.value;
}
function prettyPrintPosition(str, offset, len = 1) {
  return `${str.replace(/(\t)|(\r)|(\n)/g, (m2, t2, r2) => t2 ? "␉" : r2 ? "␍" : "␊")}
${"".padEnd(offset)}${"^".repeat(len)}`;
}
function parse1(str) {
  return parse_(complexSelector_, str);
}
function serialize(selector) {
  if (!selector.type) {
    throw new Error("This is not an AST node.");
  }
  switch (selector.type) {
    case "universal":
      return _serNs(selector.namespace) + "*";
    case "tag":
      return _serNs(selector.namespace) + _serIdent(selector.name);
    case "class":
      return "." + _serIdent(selector.name);
    case "id":
      return "#" + _serIdent(selector.name);
    case "attrPresence":
      return `[${_serNs(selector.namespace)}${_serIdent(selector.name)}]`;
    case "attrValue":
      return `[${_serNs(selector.namespace)}${_serIdent(selector.name)}${selector.matcher}"${_serStr(selector.value)}"${selector.modifier ? selector.modifier : ""}]`;
    case "combinator":
      return serialize(selector.left) + selector.combinator;
    case "compound":
      return selector.list.reduce((acc, node3) => {
        if (node3.type === "combinator") {
          return serialize(node3) + acc;
        } else {
          return acc + serialize(node3);
        }
      }, "");
    case "list":
      return selector.list.map(serialize).join(",");
  }
}
function _serNs(ns2) {
  return ns2 || ns2 === "" ? _serIdent(ns2) + "|" : "";
}
function _codePoint(char2) {
  return `\\${char2.codePointAt(0).toString(16)} `;
}
function _serIdent(str) {
  return str.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g, (m2, d1, d2, hy, safe, nl3, ctrl, other2) => d1 ? _codePoint(d1) : d2 ? "-" + _codePoint(d2.slice(1)) : hy ? "\\-" : safe ? safe : nl3 ? "�" : ctrl ? _codePoint(ctrl) : "\\" + other2);
}
function _serStr(str) {
  return str.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g, (m2, dq, bs2, nl3, ctrl) => dq ? "\\\"" : bs2 ? "\\\\" : nl3 ? "�" : _codePoint(ctrl));
}
function normalize3(selector) {
  if (!selector.type) {
    throw new Error("This is not an AST node.");
  }
  switch (selector.type) {
    case "compound": {
      selector.list.forEach(normalize3);
      selector.list.sort((a, b4) => _compareArrays(_getSelectorPriority(a), _getSelectorPriority(b4)));
      break;
    }
    case "combinator": {
      normalize3(selector.left);
      break;
    }
    case "list": {
      selector.list.forEach(normalize3);
      selector.list.sort((a, b4) => serialize(a) < serialize(b4) ? -1 : 1);
      break;
    }
  }
  return selector;
}
function _getSelectorPriority(selector) {
  switch (selector.type) {
    case "universal":
      return [1];
    case "tag":
      return [1];
    case "id":
      return [2];
    case "class":
      return [3, selector.name];
    case "attrPresence":
      return [4, serialize(selector)];
    case "attrValue":
      return [5, serialize(selector)];
    case "combinator":
      return [15, serialize(selector)];
  }
}
function compareSpecificity(a, b4) {
  return _compareArrays(a, b4);
}
function _compareArrays(a, b4) {
  if (!Array.isArray(a) || !Array.isArray(b4)) {
    throw new Error("Arguments must be arrays.");
  }
  const shorter = a.length < b4.length ? a.length : b4.length;
  for (let i = 0;i < shorter; i++) {
    if (a[i] === b4[i]) {
      continue;
    }
    return a[i] < b4[i] ? -1 : 1;
  }
  return a.length - b4.length;
}
var ws2 = `(?:[ \\t\\r\\n\\f]*)`, nl2 = `(?:\\n|\\r\\n|\\r|\\f)`, nonascii = `[^\\x00-\\x7F]`, unicode = `(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)`, escape3 = `(?:\\\\[^\\n\\r\\f0-9a-f])`, nmstart, nmchar, name, ident, string1, string22, lexSelector, lexEscapedString, unicodeEscapedSequence_, escapedSequence_, anyChar_, escapedString_, whitespace_, optionalWhitespace_, identifier_, hashId_, string_, namespace_, qualifiedName_, uniSelector_, tagSelector_, classSelector_, idSelector_, attrModifier_, attrValue_, attrMatcher_, attrPresenceSelector_, attrValueSelector_, attrSelector_, typeSelector_, subclassSelector_, compoundSelector_, combinator_, combinatorSeparator_, complexSelector_, listSelector_;
var init_parseley = __esm(() => {
  init_leac();
  init_core();
  nmstart = `(?:[_a-z]|${nonascii}|${unicode}|${escape3})`;
  nmchar = `(?:[_a-z0-9-]|${nonascii}|${unicode}|${escape3})`;
  name = `(?:${nmchar}+)`;
  ident = `(?:[-]?${nmstart}${nmchar}*)`;
  string1 = `'([^\\n\\r\\f\\\\']|\\\\${nl2}|${nonascii}|${unicode}|${escape3})*'`;
  string22 = `"([^\\n\\r\\f\\\\"]|\\\\${nl2}|${nonascii}|${unicode}|${escape3})*"`;
  lexSelector = o([
    { name: "ws", regex: new RegExp(ws2) },
    { name: "hash", regex: new RegExp(`#${name}`, "i") },
    { name: "ident", regex: new RegExp(ident, "i") },
    { name: "str1", regex: new RegExp(string1, "i") },
    { name: "str2", regex: new RegExp(string22, "i") },
    { name: "*" },
    { name: "." },
    { name: "," },
    { name: "[" },
    { name: "]" },
    { name: "=" },
    { name: ">" },
    { name: "|" },
    { name: "+" },
    { name: "~" },
    { name: "^" },
    { name: "$" }
  ]);
  lexEscapedString = o([
    { name: "unicode", regex: new RegExp(unicode, "i") },
    { name: "escape", regex: new RegExp(escape3, "i") },
    { name: "any", regex: new RegExp("[\\s\\S]", "i") }
  ]);
  unicodeEscapedSequence_ = token((t2) => t2.name === "unicode" ? String.fromCodePoint(parseInt(t2.text.slice(1), 16)) : undefined);
  escapedSequence_ = token((t2) => t2.name === "escape" ? t2.text.slice(1) : undefined);
  anyChar_ = token((t2) => t2.name === "any" ? t2.text : undefined);
  escapedString_ = map2(many(choice(unicodeEscapedSequence_, escapedSequence_, anyChar_)), (cs2) => cs2.join(""));
  whitespace_ = token((t2) => t2.name === "ws" ? null : undefined);
  optionalWhitespace_ = option(whitespace_, null);
  identifier_ = token((t2) => t2.name === "ident" ? unescape(t2.text) : undefined);
  hashId_ = token((t2) => t2.name === "hash" ? unescape(t2.text.slice(1)) : undefined);
  string_ = token((t2) => t2.name.startsWith("str") ? unescape(t2.text.slice(1, -1)) : undefined);
  namespace_ = left(option(identifier_, ""), literal2("|"));
  qualifiedName_ = otherwise(ab(namespace_, identifier_, (ns2, name2) => ({ name: name2, namespace: ns2 })), map2(identifier_, (name2) => ({ name: name2, namespace: null })));
  uniSelector_ = otherwise(ab(namespace_, literal2("*"), (ns2) => ({ type: "universal", namespace: ns2, specificity: [0, 0, 0] })), map2(literal2("*"), () => ({ type: "universal", namespace: null, specificity: [0, 0, 0] })));
  tagSelector_ = map2(qualifiedName_, ({ name: name2, namespace }) => ({
    type: "tag",
    name: name2,
    namespace,
    specificity: [0, 0, 1]
  }));
  classSelector_ = ab(literal2("."), identifier_, (fullstop, name2) => ({
    type: "class",
    name: name2,
    specificity: [0, 1, 0]
  }));
  idSelector_ = map2(hashId_, (name2) => ({
    type: "id",
    name: name2,
    specificity: [1, 0, 0]
  }));
  attrModifier_ = token((t2) => {
    if (t2.name === "ident") {
      if (t2.text === "i" || t2.text === "I") {
        return "i";
      }
      if (t2.text === "s" || t2.text === "S") {
        return "s";
      }
    }
    return;
  });
  attrValue_ = otherwise(ab(string_, option(right(optionalWhitespace_, attrModifier_), null), (v4, mod) => ({ value: v4, modifier: mod })), ab(identifier_, option(right(whitespace_, attrModifier_), null), (v4, mod) => ({ value: v4, modifier: mod })));
  attrMatcher_ = choice(map2(literal2("="), () => "="), ab(literal2("~"), literal2("="), () => "~="), ab(literal2("|"), literal2("="), () => "|="), ab(literal2("^"), literal2("="), () => "^="), ab(literal2("$"), literal2("="), () => "$="), ab(literal2("*"), literal2("="), () => "*="));
  attrPresenceSelector_ = abc(literal2("["), optionallySpaced(qualifiedName_), literal2("]"), (lbr, { name: name2, namespace }) => ({
    type: "attrPresence",
    name: name2,
    namespace,
    specificity: [0, 1, 0]
  }));
  attrValueSelector_ = middle(literal2("["), abc(optionallySpaced(qualifiedName_), attrMatcher_, optionallySpaced(attrValue_), ({ name: name2, namespace }, matcher, { value, modifier }) => ({
    type: "attrValue",
    name: name2,
    namespace,
    matcher,
    value,
    modifier,
    specificity: [0, 1, 0]
  })), literal2("]"));
  attrSelector_ = otherwise(attrPresenceSelector_, attrValueSelector_);
  typeSelector_ = otherwise(uniSelector_, tagSelector_);
  subclassSelector_ = choice(idSelector_, classSelector_, attrSelector_);
  compoundSelector_ = map2(otherwise(flatten(typeSelector_, many(subclassSelector_)), many1(subclassSelector_)), (ss2) => {
    return {
      type: "compound",
      list: ss2,
      specificity: sumAllSpec(ss2.map((s2) => s2.specificity))
    };
  });
  combinator_ = choice(map2(literal2(">"), () => ">"), map2(literal2("+"), () => "+"), map2(literal2("~"), () => "~"), ab(literal2("|"), literal2("|"), () => "||"));
  combinatorSeparator_ = otherwise(optionallySpaced(combinator_), map2(whitespace_, () => " "));
  complexSelector_ = leftAssoc2(compoundSelector_, map2(combinatorSeparator_, (c2) => (left2, right2) => ({
    type: "compound",
    list: [...right2.list, { type: "combinator", combinator: c2, left: left2, specificity: left2.specificity }],
    specificity: sumSpec(left2.specificity, right2.specificity)
  })), compoundSelector_);
  listSelector_ = leftAssoc2(map2(complexSelector_, (s2) => ({ type: "list", list: [s2] })), map2(optionallySpaced(literal2(",")), () => (acc, next) => ({ type: "list", list: [...acc.list, next] })), complexSelector_);
});

// ../../node_modules/.pnpm/selderee@0.11.0/node_modules/selderee/lib/selderee.mjs
class DecisionTree {
  constructor(input) {
    this.branches = weave(toAstTerminalPairs(input));
  }
  build(builder) {
    return builder(this.branches);
  }
}
function toAstTerminalPairs(array2) {
  const len = array2.length;
  const results = new Array(len);
  for (let i = 0;i < len; i++) {
    const [selectorString, val] = array2[i];
    const ast = preprocess2(parse1(selectorString));
    results[i] = {
      ast,
      terminal: {
        type: "terminal",
        valueContainer: { index: i, value: val, specificity: ast.specificity }
      }
    };
  }
  return results;
}
function preprocess2(ast) {
  reduceSelectorVariants(ast);
  normalize3(ast);
  return ast;
}
function reduceSelectorVariants(ast) {
  const newList = [];
  ast.list.forEach((sel) => {
    switch (sel.type) {
      case "class":
        newList.push({
          matcher: "~=",
          modifier: null,
          name: "class",
          namespace: null,
          specificity: sel.specificity,
          type: "attrValue",
          value: sel.name
        });
        break;
      case "id":
        newList.push({
          matcher: "=",
          modifier: null,
          name: "id",
          namespace: null,
          specificity: sel.specificity,
          type: "attrValue",
          value: sel.name
        });
        break;
      case "combinator":
        reduceSelectorVariants(sel.left);
        newList.push(sel);
        break;
      case "universal":
        break;
      default:
        newList.push(sel);
        break;
    }
  });
  ast.list = newList;
}
function weave(items) {
  const branches = [];
  while (items.length) {
    const topKind = findTopKey(items, (sel) => true, getSelectorKind);
    const { matches, nonmatches, empty } = breakByKind(items, topKind);
    items = nonmatches;
    if (matches.length) {
      branches.push(branchOfKind(topKind, matches));
    }
    if (empty.length) {
      branches.push(...terminate(empty));
    }
  }
  return branches;
}
function terminate(items) {
  const results = [];
  for (const item of items) {
    const terminal = item.terminal;
    if (terminal.type === "terminal") {
      results.push(terminal);
    } else {
      const { matches, rest } = partition(terminal.cont, (node3) => node3.type === "terminal");
      matches.forEach((node3) => results.push(node3));
      if (rest.length) {
        terminal.cont = rest;
        results.push(terminal);
      }
    }
  }
  return results;
}
function breakByKind(items, selectedKind) {
  const matches = [];
  const nonmatches = [];
  const empty = [];
  for (const item of items) {
    const simpsels = item.ast.list;
    if (simpsels.length) {
      const isMatch = simpsels.some((node3) => getSelectorKind(node3) === selectedKind);
      (isMatch ? matches : nonmatches).push(item);
    } else {
      empty.push(item);
    }
  }
  return { matches, nonmatches, empty };
}
function getSelectorKind(sel) {
  switch (sel.type) {
    case "attrPresence":
      return `attrPresence ${sel.name}`;
    case "attrValue":
      return `attrValue ${sel.name}`;
    case "combinator":
      return `combinator ${sel.combinator}`;
    default:
      return sel.type;
  }
}
function branchOfKind(kind, items) {
  if (kind === "tag") {
    return tagNameBranch(items);
  }
  if (kind.startsWith("attrValue ")) {
    return attrValueBranch(kind.substring(10), items);
  }
  if (kind.startsWith("attrPresence ")) {
    return attrPresenceBranch(kind.substring(13), items);
  }
  if (kind === "combinator >") {
    return combinatorBranch(">", items);
  }
  if (kind === "combinator +") {
    return combinatorBranch("+", items);
  }
  throw new Error(`Unsupported selector kind: ${kind}`);
}
function tagNameBranch(items) {
  const groups = spliceAndGroup(items, (x3) => x3.type === "tag", (x3) => x3.name);
  const variants = Object.entries(groups).map(([name2, group]) => ({
    type: "variant",
    value: name2,
    cont: weave(group.items)
  }));
  return {
    type: "tagName",
    variants
  };
}
function attrPresenceBranch(name2, items) {
  for (const item of items) {
    spliceSimpleSelector(item, (x3) => x3.type === "attrPresence" && x3.name === name2);
  }
  return {
    type: "attrPresence",
    name: name2,
    cont: weave(items)
  };
}
function attrValueBranch(name2, items) {
  const groups = spliceAndGroup(items, (x3) => x3.type === "attrValue" && x3.name === name2, (x3) => `${x3.matcher} ${x3.modifier || ""} ${x3.value}`);
  const matchers = [];
  for (const group of Object.values(groups)) {
    const sel = group.oneSimpleSelector;
    const predicate = getAttrPredicate(sel);
    const continuation = weave(group.items);
    matchers.push({
      type: "matcher",
      matcher: sel.matcher,
      modifier: sel.modifier,
      value: sel.value,
      predicate,
      cont: continuation
    });
  }
  return {
    type: "attrValue",
    name: name2,
    matchers
  };
}
function getAttrPredicate(sel) {
  if (sel.modifier === "i") {
    const expected = sel.value.toLowerCase();
    switch (sel.matcher) {
      case "=":
        return (actual) => expected === actual.toLowerCase();
      case "~=":
        return (actual) => actual.toLowerCase().split(/[ \t]+/).includes(expected);
      case "^=":
        return (actual) => actual.toLowerCase().startsWith(expected);
      case "$=":
        return (actual) => actual.toLowerCase().endsWith(expected);
      case "*=":
        return (actual) => actual.toLowerCase().includes(expected);
      case "|=":
        return (actual) => {
          const lower = actual.toLowerCase();
          return expected === lower || lower.startsWith(expected) && lower[expected.length] === "-";
        };
    }
  } else {
    const expected = sel.value;
    switch (sel.matcher) {
      case "=":
        return (actual) => expected === actual;
      case "~=":
        return (actual) => actual.split(/[ \t]+/).includes(expected);
      case "^=":
        return (actual) => actual.startsWith(expected);
      case "$=":
        return (actual) => actual.endsWith(expected);
      case "*=":
        return (actual) => actual.includes(expected);
      case "|=":
        return (actual) => expected === actual || actual.startsWith(expected) && actual[expected.length] === "-";
    }
  }
}
function combinatorBranch(combinator, items) {
  const groups = spliceAndGroup(items, (x3) => x3.type === "combinator" && x3.combinator === combinator, (x3) => serialize(x3.left));
  const leftItems = [];
  for (const group of Object.values(groups)) {
    const rightCont = weave(group.items);
    const leftAst = group.oneSimpleSelector.left;
    leftItems.push({
      ast: leftAst,
      terminal: { type: "popElement", cont: rightCont }
    });
  }
  return {
    type: "pushElement",
    combinator,
    cont: weave(leftItems)
  };
}
function spliceAndGroup(items, predicate, keyCallback) {
  const groups = {};
  while (items.length) {
    const bestKey = findTopKey(items, predicate, keyCallback);
    const bestKeyPredicate = (sel) => predicate(sel) && keyCallback(sel) === bestKey;
    const hasBestKeyPredicate = (item) => item.ast.list.some(bestKeyPredicate);
    const { matches, rest } = partition1(items, hasBestKeyPredicate);
    let oneSimpleSelector = null;
    for (const item of matches) {
      const splicedNode = spliceSimpleSelector(item, bestKeyPredicate);
      if (!oneSimpleSelector) {
        oneSimpleSelector = splicedNode;
      }
    }
    if (oneSimpleSelector == null) {
      throw new Error("No simple selector is found.");
    }
    groups[bestKey] = { oneSimpleSelector, items: matches };
    items = rest;
  }
  return groups;
}
function spliceSimpleSelector(item, predicate) {
  const simpsels = item.ast.list;
  const matches = new Array(simpsels.length);
  let firstIndex = -1;
  for (let i = simpsels.length;i-- > 0; ) {
    if (predicate(simpsels[i])) {
      matches[i] = true;
      firstIndex = i;
    }
  }
  if (firstIndex == -1) {
    throw new Error(`Couldn't find the required simple selector.`);
  }
  const result = simpsels[firstIndex];
  item.ast.list = simpsels.filter((sel, i) => !matches[i]);
  return result;
}
function findTopKey(items, predicate, keyCallback) {
  const candidates = {};
  for (const item of items) {
    const candidates1 = {};
    for (const node3 of item.ast.list.filter(predicate)) {
      candidates1[keyCallback(node3)] = true;
    }
    for (const key of Object.keys(candidates1)) {
      if (candidates[key]) {
        candidates[key]++;
      } else {
        candidates[key] = 1;
      }
    }
  }
  let topKind = "";
  let topCounter = 0;
  for (const entry of Object.entries(candidates)) {
    if (entry[1] > topCounter) {
      topKind = entry[0];
      topCounter = entry[1];
    }
  }
  return topKind;
}
function partition(src, predicate) {
  const matches = [];
  const rest = [];
  for (const x3 of src) {
    if (predicate(x3)) {
      matches.push(x3);
    } else {
      rest.push(x3);
    }
  }
  return { matches, rest };
}
function partition1(src, predicate) {
  const matches = [];
  const rest = [];
  for (const x3 of src) {
    if (predicate(x3)) {
      matches.push(x3);
    } else {
      rest.push(x3);
    }
  }
  return { matches, rest };
}

class Picker {
  constructor(f3) {
    this.f = f3;
  }
  pickAll(el2) {
    return this.f(el2);
  }
  pick1(el2, preferFirst = false) {
    const results = this.f(el2);
    const len = results.length;
    if (len === 0) {
      return null;
    }
    if (len === 1) {
      return results[0].value;
    }
    const comparator = preferFirst ? comparatorPreferFirst : comparatorPreferLast;
    let result = results[0];
    for (let i = 1;i < len; i++) {
      const next = results[i];
      if (comparator(result, next)) {
        result = next;
      }
    }
    return result.value;
  }
}
function comparatorPreferFirst(acc, next) {
  const diff = compareSpecificity(next.specificity, acc.specificity);
  return diff > 0 || diff === 0 && next.index < acc.index;
}
function comparatorPreferLast(acc, next) {
  const diff = compareSpecificity(next.specificity, acc.specificity);
  return diff > 0 || diff === 0 && next.index > acc.index;
}
var init_selderee = __esm(() => {
  init_parseley();
  init_parseley();
});

// ../../node_modules/.pnpm/@selderee+plugin-htmlparser2@0.11.0/node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.mjs
function hp2Builder(nodes) {
  return new Picker(handleArray(nodes));
}
function handleArray(nodes) {
  const matchers = nodes.map(handleNode);
  return (el2, ...tail) => matchers.flatMap((m2) => m2(el2, ...tail));
}
function handleNode(node3) {
  switch (node3.type) {
    case "terminal": {
      const result = [node3.valueContainer];
      return (el2, ...tail) => result;
    }
    case "tagName":
      return handleTagName(node3);
    case "attrValue":
      return handleAttrValueName(node3);
    case "attrPresence":
      return handleAttrPresenceName(node3);
    case "pushElement":
      return handlePushElementNode(node3);
    case "popElement":
      return handlePopElementNode(node3);
  }
}
function handleTagName(node3) {
  const variants = {};
  for (const variant of node3.variants) {
    variants[variant.value] = handleArray(variant.cont);
  }
  return (el2, ...tail) => {
    const continuation = variants[el2.name];
    return continuation ? continuation(el2, ...tail) : [];
  };
}
function handleAttrPresenceName(node3) {
  const attrName = node3.name;
  const continuation = handleArray(node3.cont);
  return (el2, ...tail) => Object.prototype.hasOwnProperty.call(el2.attribs, attrName) ? continuation(el2, ...tail) : [];
}
function handleAttrValueName(node3) {
  const callbacks = [];
  for (const matcher of node3.matchers) {
    const predicate = matcher.predicate;
    const continuation = handleArray(matcher.cont);
    callbacks.push((attr, el2, ...tail) => predicate(attr) ? continuation(el2, ...tail) : []);
  }
  const attrName = node3.name;
  return (el2, ...tail) => {
    const attr = el2.attribs[attrName];
    return attr || attr === "" ? callbacks.flatMap((cb2) => cb2(attr, el2, ...tail)) : [];
  };
}
function handlePushElementNode(node3) {
  const continuation = handleArray(node3.cont);
  const leftElementGetter = node3.combinator === "+" ? getPrecedingElement : getParentElement;
  return (el2, ...tail) => {
    const next = leftElementGetter(el2);
    if (next === null) {
      return [];
    }
    return continuation(next, el2, ...tail);
  };
}
function handlePopElementNode(node3) {
  const continuation = handleArray(node3.cont);
  return (el2, next, ...tail) => continuation(next, ...tail);
}
var getPrecedingElement = (el2) => {
  const prev = el2.prev;
  if (prev === null) {
    return null;
  }
  return isTag2(prev) ? prev : getPrecedingElement(prev);
}, getParentElement = (el2) => {
  const parent = el2.parent;
  return parent && isTag2(parent) ? parent : null;
};
var init_hp2_builder = __esm(() => {
  init_esm2();
  init_selderee();
});

// ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js
var decode_data_html_default;
var init_decode_data_html = __esm(() => {
  decode_data_html_default = new Uint16Array("ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\x00\x00\x00\x00\x00\x00ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀\uD835\uDD04rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀\uD835\uDD38plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀\uD835\uDC9Cign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\uD835\uDD05pf;쀀\uD835\uDD39eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\uD835\uDC9EpĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\uD835\uDD07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\x00\x00\x00͔͂\x00Ѕf;쀀\uD835\uDD3Bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\x00\x00ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\x00\x00ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\x00ц\x00ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\x00ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\uD835\uDC9Frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀\uD835\uDD08rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\x00\x00ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\uD835\uDD3Csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀\uD835\uDD09lledɓ֗\x00\x00֣mallSquare;旼erySmallSquare;斪Ͱֺ\x00ֿ\x00\x00ׄf;쀀\uD835\uDD3DAll;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\uD835\uDD0A;拙pf;쀀\uD835\uDD3Eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\uD835\uDCA2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\x00ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\x00ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\uD835\uDD40a;䎙cr;愐ilde;䄨ǫޚ\x00ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀\uD835\uDD0Dpf;쀀\uD835\uDD41ǣ߇\x00ߌr;쀀\uD835\uDCA5rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀\uD835\uDD0Epf;쀀\uD835\uDD42cr;쀀\uD835\uDCA6րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\x00ࣃbleBracket;柦nǔࣈ\x00࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\uD835\uDD0FĀ;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀\uD835\uDD43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀\uD835\uDD10nusPlus;戓pf;쀀\uD835\uDD44cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀\uD835\uDD11ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\uD835\uDCA9ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀\uD835\uDD12rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀\uD835\uDD46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\uD835\uDCAAash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀\uD835\uDD13i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀\uD835\uDCAB;䎨ȀUfos༑༖༛༟OT耻\"䀢r;쀀\uD835\uDD14pf;愚cr;쀀\uD835\uDCAC؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\x00စbleBracket;柧nǔည\x00နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\uD835\uDD16ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀\uD835\uDD4Aɲᅭ\x00\x00ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\uD835\uDCAEar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\uD835\uDD17Āeiቻ኉ǲኀ\x00ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\uD835\uDD4BipleDot;惛Āctዖዛr;쀀\uD835\uDCAFrok;䅦ૡዷጎጚጦ\x00ጬጱ\x00\x00\x00\x00\x00ጸጽ፷ᎅ\x00᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\x00጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀\uD835\uDD18rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀\uD835\uDD4CЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\uD835\uDCB0ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\uD835\uDD19pf;쀀\uD835\uDD4Dcr;쀀\uD835\uDCB1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\uD835\uDD1Apf;쀀\uD835\uDD4Ecr;쀀\uD835\uDCB2Ȁfiosᓋᓐᓒᓘr;쀀\uD835\uDD1B;䎞pf;쀀\uD835\uDD4Fcr;쀀\uD835\uDCB3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀\uD835\uDD1Cpf;쀀\uD835\uDD50cr;쀀\uD835\uDCB4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\x00ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀\uD835\uDCB5௡ᖃᖊᖐ\x00ᖰᖶᖿ\x00\x00\x00\x00ᗆᗛᗫᙟ᙭\x00ᚕ᚛ᚲᚹ\x00ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀\uD835\uDD1Erave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\x00\x00ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀\uD835\uDD52΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀\uD835\uDCB6;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀\uD835\uDD1Fg΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\x00\x00ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\x00ᠳƲᠯ\x00ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\uD835\uDD53Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀\uD835\uDCB7mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\x00᧨ᨑᨕᨲ\x00ᨷᩐ\x00\x00᪴\x00\x00᫁\x00\x00ᬡᬮ᭍᭒\x00᯽\x00ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\x00᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀\uD835\uDD20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\x00\x00᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\x00ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\x00\x00᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\x00ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀\uD835\uDD54oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\uD835\uDCB8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\x00\x00᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\x00\x00ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\uD835\uDD21arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\x00\x00ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\uD835\uDD55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\x00\x00ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\uD835\uDCB9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\uD835\uDD22ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\uD835\uDD56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\x00\x00ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\x00ᾞ\x00ᾡᾧ\x00\x00ῆῌ\x00ΐ\x00ῦῪ \x00 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\x00\x00᾽g;耀ﬀig;耀ﬄ;쀀\uD835\uDD23lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\x00ῳf;쀀\uD835\uDD57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\x00⁐β•‥‧‪‬\x00‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\x00‶;慔;慖ʴ‾⁁\x00\x00⁃耻¾䂾;慗;慜5;慘ƶ⁌\x00⁎;慚;慝8;慞l;恄wn;挢cr;쀀\uD835\uDCBBࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\uD835\uDD24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\uD835\uDD58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\x00↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀\uD835\uDD25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\uD835\uDD59bar;怕ƀclt≯≴≸r;쀀\uD835\uDCBDasè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\x00⊪\x00⊸⋅⋎\x00⋕⋳\x00\x00⋸⌢⍧⍢⍿\x00⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀\uD835\uDD26rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\uD835\uDD5Aa;䎹uest耻¿䂿Āci⎊⎏r;쀀\uD835\uDCBEnʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\x00⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\uD835\uDD27ath;䈷pf;쀀\uD835\uDD5Bǣ⏬\x00⏱r;쀀\uD835\uDCBFrcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\uD835\uDD28reen;䄸cy;䑅cy;䑜pf;쀀\uD835\uDD5Ccr;쀀\uD835\uDCC0஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\x00⒪\x00⒱\x00\x00\x00\x00\x00⒵Ⓔ\x00ⓆⓈⓍ\x00⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀\uD835\uDD29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀\uD835\uDD5Dus;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\uD835\uDCC1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀\uD835\uDD2Ao;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀\uD835\uDD5EĀct⣸⣽r;쀀\uD835\uDCC2pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\x00⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\x00⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀\uD835\uDD2BȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀\uD835\uDD5F膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀\uD835\uDCC3ortɭ⬅\x00\x00⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ⴭ\x00ⴸⵈⵠⵥ⵲ⶄᬇ\x00\x00ⶍⶫ\x00ⷈⷎ\x00ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀\uD835\uDD2Cͯ⵹\x00\x00⵼\x00ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\uD835\uDD60ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\x00⹽\x00⺀⺝\x00⺢⺹\x00\x00⻋ຜ\x00⼓\x00\x00⼫⾼\x00⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\x00\x00⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\uD835\uDD2Dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\uD835\uDD61nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀\uD835\uDCC5;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀\uD835\uDD2Epf;쀀\uD835\uDD62rime;恗cr;쀀\uD835\uDCC6ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀\uD835\uDD2FĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀\uD835\uDD63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\uD835\uDCC7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\x00㍺㎤\x00\x00㏬㏰\x00㐨㑈㑚㒭㒱㓊㓱\x00㘖\x00\x00㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\x00㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀\uD835\uDD30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\x00\x00㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\uD835\uDD64aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀\uD835\uDCC8tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\x00㙾㛂\x00\x00\x00\x00\x00㛛㜃\x00㜉㝬\x00\x00\x00㞇ɲ㙖\x00\x00㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\uD835\uDD31Ȁeiko㚆㚝㚵㚼ǲ㚋\x00㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\uD835\uDD65rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\uD835\uDCC9;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\x00㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀\uD835\uDD32rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\x00\x00㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀\uD835\uDD66̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\x00\x00㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀\uD835\uDCCAƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀\uD835\uDD33tré㦮suĀbp㧯㧱»ജ»൙pf;쀀\uD835\uDD67roð໻tré㦴Ācu㨆㨋r;쀀\uD835\uDCCBĀbp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\uD835\uDD34pf;쀀\uD835\uDD68Ā;eᑹ㩦atèᑹcr;쀀\uD835\uDCCCૣណ㪇\x00㪋\x00㪐㪛\x00\x00㪝㪨㪫㪯\x00\x00㫃㫎\x00㫘ៜ៟tré៑r;쀀\uD835\uDD35ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\uD835\uDD69imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀\uD835\uDCCDĀpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀\uD835\uDD36cy;䑗pf;쀀\uD835\uDD6Acr;쀀\uD835\uDCCEĀcm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀\uD835\uDD37cy;䐶grarr;懝pf;쀀\uD835\uDD6Bcr;쀀\uD835\uDCCFĀjn㮅㮇;怍j;怌".split("").map((c2) => c2.charCodeAt(0)));
});

// ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js
var decode_data_xml_default;
var init_decode_data_xml = __esm(() => {
  decode_data_xml_default = new Uint16Array("Ȁaglq\t\x15\x18\x1Bɭ\x0F\x00\x00\x12p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((c2) => c2.charCodeAt(0)));
});

// ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js
function replaceCodePoint(codePoint) {
  var _a5;
  if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
    return 65533;
  }
  return (_a5 = decodeMap.get(codePoint)) !== null && _a5 !== undefined ? _a5 : codePoint;
}
var _a4, decodeMap, fromCodePoint;
var init_decode_codepoint = __esm(() => {
  decodeMap = new Map([
    [0, 65533],
    [128, 8364],
    [130, 8218],
    [131, 402],
    [132, 8222],
    [133, 8230],
    [134, 8224],
    [135, 8225],
    [136, 710],
    [137, 8240],
    [138, 352],
    [139, 8249],
    [140, 338],
    [142, 381],
    [145, 8216],
    [146, 8217],
    [147, 8220],
    [148, 8221],
    [149, 8226],
    [150, 8211],
    [151, 8212],
    [152, 732],
    [153, 8482],
    [154, 353],
    [155, 8250],
    [156, 339],
    [158, 382],
    [159, 376]
  ]);
  fromCodePoint = (_a4 = String.fromCodePoint) !== null && _a4 !== undefined ? _a4 : function(codePoint) {
    let output = "";
    if (codePoint > 65535) {
      codePoint -= 65536;
      output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
      codePoint = 56320 | codePoint & 1023;
    }
    output += String.fromCharCode(codePoint);
    return output;
  };
});

// ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js
function isNumber(code) {
  return code >= CharCodes.ZERO && code <= CharCodes.NINE;
}
function isHexadecimalCharacter(code) {
  return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
}
function isAsciiAlphaNumeric(code) {
  return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code);
}
function isEntityInAttributeInvalidEnd(code) {
  return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}

class EntityDecoder {
  constructor(decodeTree, emitCodePoint, errors3) {
    this.decodeTree = decodeTree;
    this.emitCodePoint = emitCodePoint;
    this.errors = errors3;
    this.state = EntityDecoderState.EntityStart;
    this.consumed = 1;
    this.result = 0;
    this.treeIndex = 0;
    this.excess = 1;
    this.decodeMode = DecodingMode.Strict;
  }
  startEntity(decodeMode) {
    this.decodeMode = decodeMode;
    this.state = EntityDecoderState.EntityStart;
    this.result = 0;
    this.treeIndex = 0;
    this.excess = 1;
    this.consumed = 1;
  }
  write(str, offset) {
    switch (this.state) {
      case EntityDecoderState.EntityStart: {
        if (str.charCodeAt(offset) === CharCodes.NUM) {
          this.state = EntityDecoderState.NumericStart;
          this.consumed += 1;
          return this.stateNumericStart(str, offset + 1);
        }
        this.state = EntityDecoderState.NamedEntity;
        return this.stateNamedEntity(str, offset);
      }
      case EntityDecoderState.NumericStart: {
        return this.stateNumericStart(str, offset);
      }
      case EntityDecoderState.NumericDecimal: {
        return this.stateNumericDecimal(str, offset);
      }
      case EntityDecoderState.NumericHex: {
        return this.stateNumericHex(str, offset);
      }
      case EntityDecoderState.NamedEntity: {
        return this.stateNamedEntity(str, offset);
      }
    }
  }
  stateNumericStart(str, offset) {
    if (offset >= str.length) {
      return -1;
    }
    if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
      this.state = EntityDecoderState.NumericHex;
      this.consumed += 1;
      return this.stateNumericHex(str, offset + 1);
    }
    this.state = EntityDecoderState.NumericDecimal;
    return this.stateNumericDecimal(str, offset);
  }
  addToNumericResult(str, start, end, base) {
    if (start !== end) {
      const digitCount = end - start;
      this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base);
      this.consumed += digitCount;
    }
  }
  stateNumericHex(str, offset) {
    const startIdx = offset;
    while (offset < str.length) {
      const char2 = str.charCodeAt(offset);
      if (isNumber(char2) || isHexadecimalCharacter(char2)) {
        offset += 1;
      } else {
        this.addToNumericResult(str, startIdx, offset, 16);
        return this.emitNumericEntity(char2, 3);
      }
    }
    this.addToNumericResult(str, startIdx, offset, 16);
    return -1;
  }
  stateNumericDecimal(str, offset) {
    const startIdx = offset;
    while (offset < str.length) {
      const char2 = str.charCodeAt(offset);
      if (isNumber(char2)) {
        offset += 1;
      } else {
        this.addToNumericResult(str, startIdx, offset, 10);
        return this.emitNumericEntity(char2, 2);
      }
    }
    this.addToNumericResult(str, startIdx, offset, 10);
    return -1;
  }
  emitNumericEntity(lastCp, expectedLength) {
    var _a5;
    if (this.consumed <= expectedLength) {
      (_a5 = this.errors) === null || _a5 === undefined || _a5.absenceOfDigitsInNumericCharacterReference(this.consumed);
      return 0;
    }
    if (lastCp === CharCodes.SEMI) {
      this.consumed += 1;
    } else if (this.decodeMode === DecodingMode.Strict) {
      return 0;
    }
    this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
    if (this.errors) {
      if (lastCp !== CharCodes.SEMI) {
        this.errors.missingSemicolonAfterCharacterReference();
      }
      this.errors.validateNumericCharacterReference(this.result);
    }
    return this.consumed;
  }
  stateNamedEntity(str, offset) {
    const { decodeTree } = this;
    let current = decodeTree[this.treeIndex];
    let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
    for (;offset < str.length; offset++, this.excess++) {
      const char2 = str.charCodeAt(offset);
      this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char2);
      if (this.treeIndex < 0) {
        return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char2)) ? 0 : this.emitNotTerminatedNamedEntity();
      }
      current = decodeTree[this.treeIndex];
      valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
      if (valueLength !== 0) {
        if (char2 === CharCodes.SEMI) {
          return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
        }
        if (this.decodeMode !== DecodingMode.Strict) {
          this.result = this.treeIndex;
          this.consumed += this.excess;
          this.excess = 0;
        }
      }
    }
    return -1;
  }
  emitNotTerminatedNamedEntity() {
    var _a5;
    const { result, decodeTree } = this;
    const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
    this.emitNamedEntityData(result, valueLength, this.consumed);
    (_a5 = this.errors) === null || _a5 === undefined || _a5.missingSemicolonAfterCharacterReference();
    return this.consumed;
  }
  emitNamedEntityData(result, valueLength, consumed) {
    const { decodeTree } = this;
    this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
    if (valueLength === 3) {
      this.emitCodePoint(decodeTree[result + 2], consumed);
    }
    return consumed;
  }
  end() {
    var _a5;
    switch (this.state) {
      case EntityDecoderState.NamedEntity: {
        return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
      }
      case EntityDecoderState.NumericDecimal: {
        return this.emitNumericEntity(0, 2);
      }
      case EntityDecoderState.NumericHex: {
        return this.emitNumericEntity(0, 3);
      }
      case EntityDecoderState.NumericStart: {
        (_a5 = this.errors) === null || _a5 === undefined || _a5.absenceOfDigitsInNumericCharacterReference(this.consumed);
        return 0;
      }
      case EntityDecoderState.EntityStart: {
        return 0;
      }
    }
  }
}
function getDecoder(decodeTree) {
  let ret = "";
  const decoder = new EntityDecoder(decodeTree, (str) => ret += fromCodePoint(str));
  return function decodeWithTrie(str, decodeMode) {
    let lastIndex = 0;
    let offset = 0;
    while ((offset = str.indexOf("&", offset)) >= 0) {
      ret += str.slice(lastIndex, offset);
      decoder.startEntity(decodeMode);
      const len = decoder.write(str, offset + 1);
      if (len < 0) {
        lastIndex = offset + decoder.end();
        break;
      }
      lastIndex = offset + len;
      offset = len === 0 ? lastIndex + 1 : lastIndex;
    }
    const result = ret + str.slice(lastIndex);
    ret = "";
    return result;
  };
}
function determineBranch(decodeTree, current, nodeIdx, char2) {
  const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
  const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
  if (branchCount === 0) {
    return jumpOffset !== 0 && char2 === jumpOffset ? nodeIdx : -1;
  }
  if (jumpOffset) {
    const value = char2 - jumpOffset;
    return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
  }
  let lo3 = nodeIdx;
  let hi2 = lo3 + branchCount - 1;
  while (lo3 <= hi2) {
    const mid = lo3 + hi2 >>> 1;
    const midVal = decodeTree[mid];
    if (midVal < char2) {
      lo3 = mid + 1;
    } else if (midVal > char2) {
      hi2 = mid - 1;
    } else {
      return decodeTree[mid + branchCount];
    }
  }
  return -1;
}
var CharCodes, TO_LOWER_BIT = 32, BinTrieFlags, EntityDecoderState, DecodingMode, htmlDecoder, xmlDecoder;
var init_decode = __esm(() => {
  init_decode_data_html();
  init_decode_data_xml();
  init_decode_codepoint();
  init_decode_codepoint();
  (function(CharCodes2) {
    CharCodes2[CharCodes2["NUM"] = 35] = "NUM";
    CharCodes2[CharCodes2["SEMI"] = 59] = "SEMI";
    CharCodes2[CharCodes2["EQUALS"] = 61] = "EQUALS";
    CharCodes2[CharCodes2["ZERO"] = 48] = "ZERO";
    CharCodes2[CharCodes2["NINE"] = 57] = "NINE";
    CharCodes2[CharCodes2["LOWER_A"] = 97] = "LOWER_A";
    CharCodes2[CharCodes2["LOWER_F"] = 102] = "LOWER_F";
    CharCodes2[CharCodes2["LOWER_X"] = 120] = "LOWER_X";
    CharCodes2[CharCodes2["LOWER_Z"] = 122] = "LOWER_Z";
    CharCodes2[CharCodes2["UPPER_A"] = 65] = "UPPER_A";
    CharCodes2[CharCodes2["UPPER_F"] = 70] = "UPPER_F";
    CharCodes2[CharCodes2["UPPER_Z"] = 90] = "UPPER_Z";
  })(CharCodes || (CharCodes = {}));
  (function(BinTrieFlags2) {
    BinTrieFlags2[BinTrieFlags2["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
    BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
    BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
  })(BinTrieFlags || (BinTrieFlags = {}));
  (function(EntityDecoderState2) {
    EntityDecoderState2[EntityDecoderState2["EntityStart"] = 0] = "EntityStart";
    EntityDecoderState2[EntityDecoderState2["NumericStart"] = 1] = "NumericStart";
    EntityDecoderState2[EntityDecoderState2["NumericDecimal"] = 2] = "NumericDecimal";
    EntityDecoderState2[EntityDecoderState2["NumericHex"] = 3] = "NumericHex";
    EntityDecoderState2[EntityDecoderState2["NamedEntity"] = 4] = "NamedEntity";
  })(EntityDecoderState || (EntityDecoderState = {}));
  (function(DecodingMode2) {
    DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy";
    DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict";
    DecodingMode2[DecodingMode2["Attribute"] = 2] = "Attribute";
  })(DecodingMode || (DecodingMode = {}));
  htmlDecoder = getDecoder(decode_data_html_default);
  xmlDecoder = getDecoder(decode_data_xml_default);
});

// ../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/esm/Tokenizer.js
function isWhitespace(c2) {
  return c2 === CharCodes2.Space || c2 === CharCodes2.NewLine || c2 === CharCodes2.Tab || c2 === CharCodes2.FormFeed || c2 === CharCodes2.CarriageReturn;
}
function isEndOfTagSection(c2) {
  return c2 === CharCodes2.Slash || c2 === CharCodes2.Gt || isWhitespace(c2);
}
function isNumber2(c2) {
  return c2 >= CharCodes2.Zero && c2 <= CharCodes2.Nine;
}
function isASCIIAlpha(c2) {
  return c2 >= CharCodes2.LowerA && c2 <= CharCodes2.LowerZ || c2 >= CharCodes2.UpperA && c2 <= CharCodes2.UpperZ;
}
function isHexDigit(c2) {
  return c2 >= CharCodes2.UpperA && c2 <= CharCodes2.UpperF || c2 >= CharCodes2.LowerA && c2 <= CharCodes2.LowerF;
}

class Tokenizer {
  constructor({ xmlMode = false, decodeEntities = true }, cbs) {
    this.cbs = cbs;
    this.state = State.Text;
    this.buffer = "";
    this.sectionStart = 0;
    this.index = 0;
    this.baseState = State.Text;
    this.isSpecial = false;
    this.running = true;
    this.offset = 0;
    this.currentSequence = undefined;
    this.sequenceIndex = 0;
    this.trieIndex = 0;
    this.trieCurrent = 0;
    this.entityResult = 0;
    this.entityExcess = 0;
    this.xmlMode = xmlMode;
    this.decodeEntities = decodeEntities;
    this.entityTrie = xmlMode ? decode_data_xml_default : decode_data_html_default;
  }
  reset() {
    this.state = State.Text;
    this.buffer = "";
    this.sectionStart = 0;
    this.index = 0;
    this.baseState = State.Text;
    this.currentSequence = undefined;
    this.running = true;
    this.offset = 0;
  }
  write(chunk) {
    this.offset += this.buffer.length;
    this.buffer = chunk;
    this.parse();
  }
  end() {
    if (this.running)
      this.finish();
  }
  pause() {
    this.running = false;
  }
  resume() {
    this.running = true;
    if (this.index < this.buffer.length + this.offset) {
      this.parse();
    }
  }
  getIndex() {
    return this.index;
  }
  getSectionStart() {
    return this.sectionStart;
  }
  stateText(c2) {
    if (c2 === CharCodes2.Lt || !this.decodeEntities && this.fastForwardTo(CharCodes2.Lt)) {
      if (this.index > this.sectionStart) {
        this.cbs.ontext(this.sectionStart, this.index);
      }
      this.state = State.BeforeTagName;
      this.sectionStart = this.index;
    } else if (this.decodeEntities && c2 === CharCodes2.Amp) {
      this.state = State.BeforeEntity;
    }
  }
  stateSpecialStartSequence(c2) {
    const isEnd = this.sequenceIndex === this.currentSequence.length;
    const isMatch = isEnd ? isEndOfTagSection(c2) : (c2 | 32) === this.currentSequence[this.sequenceIndex];
    if (!isMatch) {
      this.isSpecial = false;
    } else if (!isEnd) {
      this.sequenceIndex++;
      return;
    }
    this.sequenceIndex = 0;
    this.state = State.InTagName;
    this.stateInTagName(c2);
  }
  stateInSpecialTag(c2) {
    if (this.sequenceIndex === this.currentSequence.length) {
      if (c2 === CharCodes2.Gt || isWhitespace(c2)) {
        const endOfText = this.index - this.currentSequence.length;
        if (this.sectionStart < endOfText) {
          const actualIndex = this.index;
          this.index = endOfText;
          this.cbs.ontext(this.sectionStart, endOfText);
          this.index = actualIndex;
        }
        this.isSpecial = false;
        this.sectionStart = endOfText + 2;
        this.stateInClosingTagName(c2);
        return;
      }
      this.sequenceIndex = 0;
    }
    if ((c2 | 32) === this.currentSequence[this.sequenceIndex]) {
      this.sequenceIndex += 1;
    } else if (this.sequenceIndex === 0) {
      if (this.currentSequence === Sequences.TitleEnd) {
        if (this.decodeEntities && c2 === CharCodes2.Amp) {
          this.state = State.BeforeEntity;
        }
      } else if (this.fastForwardTo(CharCodes2.Lt)) {
        this.sequenceIndex = 1;
      }
    } else {
      this.sequenceIndex = Number(c2 === CharCodes2.Lt);
    }
  }
  stateCDATASequence(c2) {
    if (c2 === Sequences.Cdata[this.sequenceIndex]) {
      if (++this.sequenceIndex === Sequences.Cdata.length) {
        this.state = State.InCommentLike;
        this.currentSequence = Sequences.CdataEnd;
        this.sequenceIndex = 0;
        this.sectionStart = this.index + 1;
      }
    } else {
      this.sequenceIndex = 0;
      this.state = State.InDeclaration;
      this.stateInDeclaration(c2);
    }
  }
  fastForwardTo(c2) {
    while (++this.index < this.buffer.length + this.offset) {
      if (this.buffer.charCodeAt(this.index - this.offset) === c2) {
        return true;
      }
    }
    this.index = this.buffer.length + this.offset - 1;
    return false;
  }
  stateInCommentLike(c2) {
    if (c2 === this.currentSequence[this.sequenceIndex]) {
      if (++this.sequenceIndex === this.currentSequence.length) {
        if (this.currentSequence === Sequences.CdataEnd) {
          this.cbs.oncdata(this.sectionStart, this.index, 2);
        } else {
          this.cbs.oncomment(this.sectionStart, this.index, 2);
        }
        this.sequenceIndex = 0;
        this.sectionStart = this.index + 1;
        this.state = State.Text;
      }
    } else if (this.sequenceIndex === 0) {
      if (this.fastForwardTo(this.currentSequence[0])) {
        this.sequenceIndex = 1;
      }
    } else if (c2 !== this.currentSequence[this.sequenceIndex - 1]) {
      this.sequenceIndex = 0;
    }
  }
  isTagStartChar(c2) {
    return this.xmlMode ? !isEndOfTagSection(c2) : isASCIIAlpha(c2);
  }
  startSpecial(sequence, offset) {
    this.isSpecial = true;
    this.currentSequence = sequence;
    this.sequenceIndex = offset;
    this.state = State.SpecialStartSequence;
  }
  stateBeforeTagName(c2) {
    if (c2 === CharCodes2.ExclamationMark) {
      this.state = State.BeforeDeclaration;
      this.sectionStart = this.index + 1;
    } else if (c2 === CharCodes2.Questionmark) {
      this.state = State.InProcessingInstruction;
      this.sectionStart = this.index + 1;
    } else if (this.isTagStartChar(c2)) {
      const lower = c2 | 32;
      this.sectionStart = this.index;
      if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {
        this.startSpecial(Sequences.TitleEnd, 3);
      } else {
        this.state = !this.xmlMode && lower === Sequences.ScriptEnd[2] ? State.BeforeSpecialS : State.InTagName;
      }
    } else if (c2 === CharCodes2.Slash) {
      this.state = State.BeforeClosingTagName;
    } else {
      this.state = State.Text;
      this.stateText(c2);
    }
  }
  stateInTagName(c2) {
    if (isEndOfTagSection(c2)) {
      this.cbs.onopentagname(this.sectionStart, this.index);
      this.sectionStart = -1;
      this.state = State.BeforeAttributeName;
      this.stateBeforeAttributeName(c2);
    }
  }
  stateBeforeClosingTagName(c2) {
    if (isWhitespace(c2)) {} else if (c2 === CharCodes2.Gt) {
      this.state = State.Text;
    } else {
      this.state = this.isTagStartChar(c2) ? State.InClosingTagName : State.InSpecialComment;
      this.sectionStart = this.index;
    }
  }
  stateInClosingTagName(c2) {
    if (c2 === CharCodes2.Gt || isWhitespace(c2)) {
      this.cbs.onclosetag(this.sectionStart, this.index);
      this.sectionStart = -1;
      this.state = State.AfterClosingTagName;
      this.stateAfterClosingTagName(c2);
    }
  }
  stateAfterClosingTagName(c2) {
    if (c2 === CharCodes2.Gt || this.fastForwardTo(CharCodes2.Gt)) {
      this.state = State.Text;
      this.baseState = State.Text;
      this.sectionStart = this.index + 1;
    }
  }
  stateBeforeAttributeName(c2) {
    if (c2 === CharCodes2.Gt) {
      this.cbs.onopentagend(this.index);
      if (this.isSpecial) {
        this.state = State.InSpecialTag;
        this.sequenceIndex = 0;
      } else {
        this.state = State.Text;
      }
      this.baseState = this.state;
      this.sectionStart = this.index + 1;
    } else if (c2 === CharCodes2.Slash) {
      this.state = State.InSelfClosingTag;
    } else if (!isWhitespace(c2)) {
      this.state = State.InAttributeName;
      this.sectionStart = this.index;
    }
  }
  stateInSelfClosingTag(c2) {
    if (c2 === CharCodes2.Gt) {
      this.cbs.onselfclosingtag(this.index);
      this.state = State.Text;
      this.baseState = State.Text;
      this.sectionStart = this.index + 1;
      this.isSpecial = false;
    } else if (!isWhitespace(c2)) {
      this.state = State.BeforeAttributeName;
      this.stateBeforeAttributeName(c2);
    }
  }
  stateInAttributeName(c2) {
    if (c2 === CharCodes2.Eq || isEndOfTagSection(c2)) {
      this.cbs.onattribname(this.sectionStart, this.index);
      this.sectionStart = -1;
      this.state = State.AfterAttributeName;
      this.stateAfterAttributeName(c2);
    }
  }
  stateAfterAttributeName(c2) {
    if (c2 === CharCodes2.Eq) {
      this.state = State.BeforeAttributeValue;
    } else if (c2 === CharCodes2.Slash || c2 === CharCodes2.Gt) {
      this.cbs.onattribend(QuoteType.NoValue, this.index);
      this.state = State.BeforeAttributeName;
      this.stateBeforeAttributeName(c2);
    } else if (!isWhitespace(c2)) {
      this.cbs.onattribend(QuoteType.NoValue, this.index);
      this.state = State.InAttributeName;
      this.sectionStart = this.index;
    }
  }
  stateBeforeAttributeValue(c2) {
    if (c2 === CharCodes2.DoubleQuote) {
      this.state = State.InAttributeValueDq;
      this.sectionStart = this.index + 1;
    } else if (c2 === CharCodes2.SingleQuote) {
      this.state = State.InAttributeValueSq;
      this.sectionStart = this.index + 1;
    } else if (!isWhitespace(c2)) {
      this.sectionStart = this.index;
      this.state = State.InAttributeValueNq;
      this.stateInAttributeValueNoQuotes(c2);
    }
  }
  handleInAttributeValue(c2, quote) {
    if (c2 === quote || !this.decodeEntities && this.fastForwardTo(quote)) {
      this.cbs.onattribdata(this.sectionStart, this.index);
      this.sectionStart = -1;
      this.cbs.onattribend(quote === CharCodes2.DoubleQuote ? QuoteType.Double : QuoteType.Single, this.index);
      this.state = State.BeforeAttributeName;
    } else if (this.decodeEntities && c2 === CharCodes2.Amp) {
      this.baseState = this.state;
      this.state = State.BeforeEntity;
    }
  }
  stateInAttributeValueDoubleQuotes(c2) {
    this.handleInAttributeValue(c2, CharCodes2.DoubleQuote);
  }
  stateInAttributeValueSingleQuotes(c2) {
    this.handleInAttributeValue(c2, CharCodes2.SingleQuote);
  }
  stateInAttributeValueNoQuotes(c2) {
    if (isWhitespace(c2) || c2 === CharCodes2.Gt) {
      this.cbs.onattribdata(this.sectionStart, this.index);
      this.sectionStart = -1;
      this.cbs.onattribend(QuoteType.Unquoted, this.index);
      this.state = State.BeforeAttributeName;
      this.stateBeforeAttributeName(c2);
    } else if (this.decodeEntities && c2 === CharCodes2.Amp) {
      this.baseState = this.state;
      this.state = State.BeforeEntity;
    }
  }
  stateBeforeDeclaration(c2) {
    if (c2 === CharCodes2.OpeningSquareBracket) {
      this.state = State.CDATASequence;
      this.sequenceIndex = 0;
    } else {
      this.state = c2 === CharCodes2.Dash ? State.BeforeComment : State.InDeclaration;
    }
  }
  stateInDeclaration(c2) {
    if (c2 === CharCodes2.Gt || this.fastForwardTo(CharCodes2.Gt)) {
      this.cbs.ondeclaration(this.sectionStart, this.index);
      this.state = State.Text;
      this.sectionStart = this.index + 1;
    }
  }
  stateInProcessingInstruction(c2) {
    if (c2 === CharCodes2.Gt || this.fastForwardTo(CharCodes2.Gt)) {
      this.cbs.onprocessinginstruction(this.sectionStart, this.index);
      this.state = State.Text;
      this.sectionStart = this.index + 1;
    }
  }
  stateBeforeComment(c2) {
    if (c2 === CharCodes2.Dash) {
      this.state = State.InCommentLike;
      this.currentSequence = Sequences.CommentEnd;
      this.sequenceIndex = 2;
      this.sectionStart = this.index + 1;
    } else {
      this.state = State.InDeclaration;
    }
  }
  stateInSpecialComment(c2) {
    if (c2 === CharCodes2.Gt || this.fastForwardTo(CharCodes2.Gt)) {
      this.cbs.oncomment(this.sectionStart, this.index, 0);
      this.state = State.Text;
      this.sectionStart = this.index + 1;
    }
  }
  stateBeforeSpecialS(c2) {
    const lower = c2 | 32;
    if (lower === Sequences.ScriptEnd[3]) {
      this.startSpecial(Sequences.ScriptEnd, 4);
    } else if (lower === Sequences.StyleEnd[3]) {
      this.startSpecial(Sequences.StyleEnd, 4);
    } else {
      this.state = State.InTagName;
      this.stateInTagName(c2);
    }
  }
  stateBeforeEntity(c2) {
    this.entityExcess = 1;
    this.entityResult = 0;
    if (c2 === CharCodes2.Number) {
      this.state = State.BeforeNumericEntity;
    } else if (c2 === CharCodes2.Amp) {} else {
      this.trieIndex = 0;
      this.trieCurrent = this.entityTrie[0];
      this.state = State.InNamedEntity;
      this.stateInNamedEntity(c2);
    }
  }
  stateInNamedEntity(c2) {
    this.entityExcess += 1;
    this.trieIndex = determineBranch(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c2);
    if (this.trieIndex < 0) {
      this.emitNamedEntity();
      this.index--;
      return;
    }
    this.trieCurrent = this.entityTrie[this.trieIndex];
    const masked = this.trieCurrent & BinTrieFlags.VALUE_LENGTH;
    if (masked) {
      const valueLength = (masked >> 14) - 1;
      if (!this.allowLegacyEntity() && c2 !== CharCodes2.Semi) {
        this.trieIndex += valueLength;
      } else {
        const entityStart = this.index - this.entityExcess + 1;
        if (entityStart > this.sectionStart) {
          this.emitPartial(this.sectionStart, entityStart);
        }
        this.entityResult = this.trieIndex;
        this.trieIndex += valueLength;
        this.entityExcess = 0;
        this.sectionStart = this.index + 1;
        if (valueLength === 0) {
          this.emitNamedEntity();
        }
      }
    }
  }
  emitNamedEntity() {
    this.state = this.baseState;
    if (this.entityResult === 0) {
      return;
    }
    const valueLength = (this.entityTrie[this.entityResult] & BinTrieFlags.VALUE_LENGTH) >> 14;
    switch (valueLength) {
      case 1: {
        this.emitCodePoint(this.entityTrie[this.entityResult] & ~BinTrieFlags.VALUE_LENGTH);
        break;
      }
      case 2: {
        this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
        break;
      }
      case 3: {
        this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
        this.emitCodePoint(this.entityTrie[this.entityResult + 2]);
      }
    }
  }
  stateBeforeNumericEntity(c2) {
    if ((c2 | 32) === CharCodes2.LowerX) {
      this.entityExcess++;
      this.state = State.InHexEntity;
    } else {
      this.state = State.InNumericEntity;
      this.stateInNumericEntity(c2);
    }
  }
  emitNumericEntity(strict) {
    const entityStart = this.index - this.entityExcess - 1;
    const numberStart = entityStart + 2 + Number(this.state === State.InHexEntity);
    if (numberStart !== this.index) {
      if (entityStart > this.sectionStart) {
        this.emitPartial(this.sectionStart, entityStart);
      }
      this.sectionStart = this.index + Number(strict);
      this.emitCodePoint(replaceCodePoint(this.entityResult));
    }
    this.state = this.baseState;
  }
  stateInNumericEntity(c2) {
    if (c2 === CharCodes2.Semi) {
      this.emitNumericEntity(true);
    } else if (isNumber2(c2)) {
      this.entityResult = this.entityResult * 10 + (c2 - CharCodes2.Zero);
      this.entityExcess++;
    } else {
      if (this.allowLegacyEntity()) {
        this.emitNumericEntity(false);
      } else {
        this.state = this.baseState;
      }
      this.index--;
    }
  }
  stateInHexEntity(c2) {
    if (c2 === CharCodes2.Semi) {
      this.emitNumericEntity(true);
    } else if (isNumber2(c2)) {
      this.entityResult = this.entityResult * 16 + (c2 - CharCodes2.Zero);
      this.entityExcess++;
    } else if (isHexDigit(c2)) {
      this.entityResult = this.entityResult * 16 + ((c2 | 32) - CharCodes2.LowerA + 10);
      this.entityExcess++;
    } else {
      if (this.allowLegacyEntity()) {
        this.emitNumericEntity(false);
      } else {
        this.state = this.baseState;
      }
      this.index--;
    }
  }
  allowLegacyEntity() {
    return !this.xmlMode && (this.baseState === State.Text || this.baseState === State.InSpecialTag);
  }
  cleanup() {
    if (this.running && this.sectionStart !== this.index) {
      if (this.state === State.Text || this.state === State.InSpecialTag && this.sequenceIndex === 0) {
        this.cbs.ontext(this.sectionStart, this.index);
        this.sectionStart = this.index;
      } else if (this.state === State.InAttributeValueDq || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueNq) {
        this.cbs.onattribdata(this.sectionStart, this.index);
        this.sectionStart = this.index;
      }
    }
  }
  shouldContinue() {
    return this.index < this.buffer.length + this.offset && this.running;
  }
  parse() {
    while (this.shouldContinue()) {
      const c2 = this.buffer.charCodeAt(this.index - this.offset);
      switch (this.state) {
        case State.Text: {
          this.stateText(c2);
          break;
        }
        case State.SpecialStartSequence: {
          this.stateSpecialStartSequence(c2);
          break;
        }
        case State.InSpecialTag: {
          this.stateInSpecialTag(c2);
          break;
        }
        case State.CDATASequence: {
          this.stateCDATASequence(c2);
          break;
        }
        case State.InAttributeValueDq: {
          this.stateInAttributeValueDoubleQuotes(c2);
          break;
        }
        case State.InAttributeName: {
          this.stateInAttributeName(c2);
          break;
        }
        case State.InCommentLike: {
          this.stateInCommentLike(c2);
          break;
        }
        case State.InSpecialComment: {
          this.stateInSpecialComment(c2);
          break;
        }
        case State.BeforeAttributeName: {
          this.stateBeforeAttributeName(c2);
          break;
        }
        case State.InTagName: {
          this.stateInTagName(c2);
          break;
        }
        case State.InClosingTagName: {
          this.stateInClosingTagName(c2);
          break;
        }
        case State.BeforeTagName: {
          this.stateBeforeTagName(c2);
          break;
        }
        case State.AfterAttributeName: {
          this.stateAfterAttributeName(c2);
          break;
        }
        case State.InAttributeValueSq: {
          this.stateInAttributeValueSingleQuotes(c2);
          break;
        }
        case State.BeforeAttributeValue: {
          this.stateBeforeAttributeValue(c2);
          break;
        }
        case State.BeforeClosingTagName: {
          this.stateBeforeClosingTagName(c2);
          break;
        }
        case State.AfterClosingTagName: {
          this.stateAfterClosingTagName(c2);
          break;
        }
        case State.BeforeSpecialS: {
          this.stateBeforeSpecialS(c2);
          break;
        }
        case State.InAttributeValueNq: {
          this.stateInAttributeValueNoQuotes(c2);
          break;
        }
        case State.InSelfClosingTag: {
          this.stateInSelfClosingTag(c2);
          break;
        }
        case State.InDeclaration: {
          this.stateInDeclaration(c2);
          break;
        }
        case State.BeforeDeclaration: {
          this.stateBeforeDeclaration(c2);
          break;
        }
        case State.BeforeComment: {
          this.stateBeforeComment(c2);
          break;
        }
        case State.InProcessingInstruction: {
          this.stateInProcessingInstruction(c2);
          break;
        }
        case State.InNamedEntity: {
          this.stateInNamedEntity(c2);
          break;
        }
        case State.BeforeEntity: {
          this.stateBeforeEntity(c2);
          break;
        }
        case State.InHexEntity: {
          this.stateInHexEntity(c2);
          break;
        }
        case State.InNumericEntity: {
          this.stateInNumericEntity(c2);
          break;
        }
        default: {
          this.stateBeforeNumericEntity(c2);
        }
      }
      this.index++;
    }
    this.cleanup();
  }
  finish() {
    if (this.state === State.InNamedEntity) {
      this.emitNamedEntity();
    }
    if (this.sectionStart < this.index) {
      this.handleTrailingData();
    }
    this.cbs.onend();
  }
  handleTrailingData() {
    const endIndex = this.buffer.length + this.offset;
    if (this.state === State.InCommentLike) {
      if (this.currentSequence === Sequences.CdataEnd) {
        this.cbs.oncdata(this.sectionStart, endIndex, 0);
      } else {
        this.cbs.oncomment(this.sectionStart, endIndex, 0);
      }
    } else if (this.state === State.InNumericEntity && this.allowLegacyEntity()) {
      this.emitNumericEntity(false);
    } else if (this.state === State.InHexEntity && this.allowLegacyEntity()) {
      this.emitNumericEntity(false);
    } else if (this.state === State.InTagName || this.state === State.BeforeAttributeName || this.state === State.BeforeAttributeValue || this.state === State.AfterAttributeName || this.state === State.InAttributeName || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueDq || this.state === State.InAttributeValueNq || this.state === State.InClosingTagName) {} else {
      this.cbs.ontext(this.sectionStart, endIndex);
    }
  }
  emitPartial(start, endIndex) {
    if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) {
      this.cbs.onattribdata(start, endIndex);
    } else {
      this.cbs.ontext(start, endIndex);
    }
  }
  emitCodePoint(cp) {
    if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) {
      this.cbs.onattribentity(cp);
    } else {
      this.cbs.ontextentity(cp);
    }
  }
}
var CharCodes2, State, QuoteType, Sequences;
var init_Tokenizer = __esm(() => {
  init_decode();
  (function(CharCodes3) {
    CharCodes3[CharCodes3["Tab"] = 9] = "Tab";
    CharCodes3[CharCodes3["NewLine"] = 10] = "NewLine";
    CharCodes3[CharCodes3["FormFeed"] = 12] = "FormFeed";
    CharCodes3[CharCodes3["CarriageReturn"] = 13] = "CarriageReturn";
    CharCodes3[CharCodes3["Space"] = 32] = "Space";
    CharCodes3[CharCodes3["ExclamationMark"] = 33] = "ExclamationMark";
    CharCodes3[CharCodes3["Number"] = 35] = "Number";
    CharCodes3[CharCodes3["Amp"] = 38] = "Amp";
    CharCodes3[CharCodes3["SingleQuote"] = 39] = "SingleQuote";
    CharCodes3[CharCodes3["DoubleQuote"] = 34] = "DoubleQuote";
    CharCodes3[CharCodes3["Dash"] = 45] = "Dash";
    CharCodes3[CharCodes3["Slash"] = 47] = "Slash";
    CharCodes3[CharCodes3["Zero"] = 48] = "Zero";
    CharCodes3[CharCodes3["Nine"] = 57] = "Nine";
    CharCodes3[CharCodes3["Semi"] = 59] = "Semi";
    CharCodes3[CharCodes3["Lt"] = 60] = "Lt";
    CharCodes3[CharCodes3["Eq"] = 61] = "Eq";
    CharCodes3[CharCodes3["Gt"] = 62] = "Gt";
    CharCodes3[CharCodes3["Questionmark"] = 63] = "Questionmark";
    CharCodes3[CharCodes3["UpperA"] = 65] = "UpperA";
    CharCodes3[CharCodes3["LowerA"] = 97] = "LowerA";
    CharCodes3[CharCodes3["UpperF"] = 70] = "UpperF";
    CharCodes3[CharCodes3["LowerF"] = 102] = "LowerF";
    CharCodes3[CharCodes3["UpperZ"] = 90] = "UpperZ";
    CharCodes3[CharCodes3["LowerZ"] = 122] = "LowerZ";
    CharCodes3[CharCodes3["LowerX"] = 120] = "LowerX";
    CharCodes3[CharCodes3["OpeningSquareBracket"] = 91] = "OpeningSquareBracket";
  })(CharCodes2 || (CharCodes2 = {}));
  (function(State2) {
    State2[State2["Text"] = 1] = "Text";
    State2[State2["BeforeTagName"] = 2] = "BeforeTagName";
    State2[State2["InTagName"] = 3] = "InTagName";
    State2[State2["InSelfClosingTag"] = 4] = "InSelfClosingTag";
    State2[State2["BeforeClosingTagName"] = 5] = "BeforeClosingTagName";
    State2[State2["InClosingTagName"] = 6] = "InClosingTagName";
    State2[State2["AfterClosingTagName"] = 7] = "AfterClosingTagName";
    State2[State2["BeforeAttributeName"] = 8] = "BeforeAttributeName";
    State2[State2["InAttributeName"] = 9] = "InAttributeName";
    State2[State2["AfterAttributeName"] = 10] = "AfterAttributeName";
    State2[State2["BeforeAttributeValue"] = 11] = "BeforeAttributeValue";
    State2[State2["InAttributeValueDq"] = 12] = "InAttributeValueDq";
    State2[State2["InAttributeValueSq"] = 13] = "InAttributeValueSq";
    State2[State2["InAttributeValueNq"] = 14] = "InAttributeValueNq";
    State2[State2["BeforeDeclaration"] = 15] = "BeforeDeclaration";
    State2[State2["InDeclaration"] = 16] = "InDeclaration";
    State2[State2["InProcessingInstruction"] = 17] = "InProcessingInstruction";
    State2[State2["BeforeComment"] = 18] = "BeforeComment";
    State2[State2["CDATASequence"] = 19] = "CDATASequence";
    State2[State2["InSpecialComment"] = 20] = "InSpecialComment";
    State2[State2["InCommentLike"] = 21] = "InCommentLike";
    State2[State2["BeforeSpecialS"] = 22] = "BeforeSpecialS";
    State2[State2["SpecialStartSequence"] = 23] = "SpecialStartSequence";
    State2[State2["InSpecialTag"] = 24] = "InSpecialTag";
    State2[State2["BeforeEntity"] = 25] = "BeforeEntity";
    State2[State2["BeforeNumericEntity"] = 26] = "BeforeNumericEntity";
    State2[State2["InNamedEntity"] = 27] = "InNamedEntity";
    State2[State2["InNumericEntity"] = 28] = "InNumericEntity";
    State2[State2["InHexEntity"] = 29] = "InHexEntity";
  })(State || (State = {}));
  (function(QuoteType2) {
    QuoteType2[QuoteType2["NoValue"] = 0] = "NoValue";
    QuoteType2[QuoteType2["Unquoted"] = 1] = "Unquoted";
    QuoteType2[QuoteType2["Single"] = 2] = "Single";
    QuoteType2[QuoteType2["Double"] = 3] = "Double";
  })(QuoteType || (QuoteType = {}));
  Sequences = {
    Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
    CdataEnd: new Uint8Array([93, 93, 62]),
    CommentEnd: new Uint8Array([45, 45, 62]),
    ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
    StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
    TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101])
  };
});

// ../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/esm/Parser.js
class Parser {
  constructor(cbs, options2 = {}) {
    var _a5, _b, _c, _d, _e3;
    this.options = options2;
    this.startIndex = 0;
    this.endIndex = 0;
    this.openTagStart = 0;
    this.tagname = "";
    this.attribname = "";
    this.attribvalue = "";
    this.attribs = null;
    this.stack = [];
    this.foreignContext = [];
    this.buffers = [];
    this.bufferOffset = 0;
    this.writeIndex = 0;
    this.ended = false;
    this.cbs = cbs !== null && cbs !== undefined ? cbs : {};
    this.lowerCaseTagNames = (_a5 = options2.lowerCaseTags) !== null && _a5 !== undefined ? _a5 : !options2.xmlMode;
    this.lowerCaseAttributeNames = (_b = options2.lowerCaseAttributeNames) !== null && _b !== undefined ? _b : !options2.xmlMode;
    this.tokenizer = new ((_c = options2.Tokenizer) !== null && _c !== undefined ? _c : Tokenizer)(this.options, this);
    (_e3 = (_d = this.cbs).onparserinit) === null || _e3 === undefined || _e3.call(_d, this);
  }
  ontext(start, endIndex) {
    var _a5, _b;
    const data = this.getSlice(start, endIndex);
    this.endIndex = endIndex - 1;
    (_b = (_a5 = this.cbs).ontext) === null || _b === undefined || _b.call(_a5, data);
    this.startIndex = endIndex;
  }
  ontextentity(cp) {
    var _a5, _b;
    const index2 = this.tokenizer.getSectionStart();
    this.endIndex = index2 - 1;
    (_b = (_a5 = this.cbs).ontext) === null || _b === undefined || _b.call(_a5, fromCodePoint(cp));
    this.startIndex = index2;
  }
  isVoidElement(name2) {
    return !this.options.xmlMode && voidElements.has(name2);
  }
  onopentagname(start, endIndex) {
    this.endIndex = endIndex;
    let name2 = this.getSlice(start, endIndex);
    if (this.lowerCaseTagNames) {
      name2 = name2.toLowerCase();
    }
    this.emitOpenTag(name2);
  }
  emitOpenTag(name2) {
    var _a5, _b, _c, _d;
    this.openTagStart = this.startIndex;
    this.tagname = name2;
    const impliesClose = !this.options.xmlMode && openImpliesClose.get(name2);
    if (impliesClose) {
      while (this.stack.length > 0 && impliesClose.has(this.stack[this.stack.length - 1])) {
        const element = this.stack.pop();
        (_b = (_a5 = this.cbs).onclosetag) === null || _b === undefined || _b.call(_a5, element, true);
      }
    }
    if (!this.isVoidElement(name2)) {
      this.stack.push(name2);
      if (foreignContextElements.has(name2)) {
        this.foreignContext.push(true);
      } else if (htmlIntegrationElements.has(name2)) {
        this.foreignContext.push(false);
      }
    }
    (_d = (_c = this.cbs).onopentagname) === null || _d === undefined || _d.call(_c, name2);
    if (this.cbs.onopentag)
      this.attribs = {};
  }
  endOpenTag(isImplied) {
    var _a5, _b;
    this.startIndex = this.openTagStart;
    if (this.attribs) {
      (_b = (_a5 = this.cbs).onopentag) === null || _b === undefined || _b.call(_a5, this.tagname, this.attribs, isImplied);
      this.attribs = null;
    }
    if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {
      this.cbs.onclosetag(this.tagname, true);
    }
    this.tagname = "";
  }
  onopentagend(endIndex) {
    this.endIndex = endIndex;
    this.endOpenTag(false);
    this.startIndex = endIndex + 1;
  }
  onclosetag(start, endIndex) {
    var _a5, _b, _c, _d, _e3, _f;
    this.endIndex = endIndex;
    let name2 = this.getSlice(start, endIndex);
    if (this.lowerCaseTagNames) {
      name2 = name2.toLowerCase();
    }
    if (foreignContextElements.has(name2) || htmlIntegrationElements.has(name2)) {
      this.foreignContext.pop();
    }
    if (!this.isVoidElement(name2)) {
      const pos = this.stack.lastIndexOf(name2);
      if (pos !== -1) {
        if (this.cbs.onclosetag) {
          let count2 = this.stack.length - pos;
          while (count2--) {
            this.cbs.onclosetag(this.stack.pop(), count2 !== 0);
          }
        } else
          this.stack.length = pos;
      } else if (!this.options.xmlMode && name2 === "p") {
        this.emitOpenTag("p");
        this.closeCurrentTag(true);
      }
    } else if (!this.options.xmlMode && name2 === "br") {
      (_b = (_a5 = this.cbs).onopentagname) === null || _b === undefined || _b.call(_a5, "br");
      (_d = (_c = this.cbs).onopentag) === null || _d === undefined || _d.call(_c, "br", {}, true);
      (_f = (_e3 = this.cbs).onclosetag) === null || _f === undefined || _f.call(_e3, "br", false);
    }
    this.startIndex = endIndex + 1;
  }
  onselfclosingtag(endIndex) {
    this.endIndex = endIndex;
    if (this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1]) {
      this.closeCurrentTag(false);
      this.startIndex = endIndex + 1;
    } else {
      this.onopentagend(endIndex);
    }
  }
  closeCurrentTag(isOpenImplied) {
    var _a5, _b;
    const name2 = this.tagname;
    this.endOpenTag(isOpenImplied);
    if (this.stack[this.stack.length - 1] === name2) {
      (_b = (_a5 = this.cbs).onclosetag) === null || _b === undefined || _b.call(_a5, name2, !isOpenImplied);
      this.stack.pop();
    }
  }
  onattribname(start, endIndex) {
    this.startIndex = start;
    const name2 = this.getSlice(start, endIndex);
    this.attribname = this.lowerCaseAttributeNames ? name2.toLowerCase() : name2;
  }
  onattribdata(start, endIndex) {
    this.attribvalue += this.getSlice(start, endIndex);
  }
  onattribentity(cp) {
    this.attribvalue += fromCodePoint(cp);
  }
  onattribend(quote, endIndex) {
    var _a5, _b;
    this.endIndex = endIndex;
    (_b = (_a5 = this.cbs).onattribute) === null || _b === undefined || _b.call(_a5, this.attribname, this.attribvalue, quote === QuoteType.Double ? '"' : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? undefined : null);
    if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {
      this.attribs[this.attribname] = this.attribvalue;
    }
    this.attribvalue = "";
  }
  getInstructionName(value) {
    const index2 = value.search(reNameEnd);
    let name2 = index2 < 0 ? value : value.substr(0, index2);
    if (this.lowerCaseTagNames) {
      name2 = name2.toLowerCase();
    }
    return name2;
  }
  ondeclaration(start, endIndex) {
    this.endIndex = endIndex;
    const value = this.getSlice(start, endIndex);
    if (this.cbs.onprocessinginstruction) {
      const name2 = this.getInstructionName(value);
      this.cbs.onprocessinginstruction(`!${name2}`, `!${value}`);
    }
    this.startIndex = endIndex + 1;
  }
  onprocessinginstruction(start, endIndex) {
    this.endIndex = endIndex;
    const value = this.getSlice(start, endIndex);
    if (this.cbs.onprocessinginstruction) {
      const name2 = this.getInstructionName(value);
      this.cbs.onprocessinginstruction(`?${name2}`, `?${value}`);
    }
    this.startIndex = endIndex + 1;
  }
  oncomment(start, endIndex, offset) {
    var _a5, _b, _c, _d;
    this.endIndex = endIndex;
    (_b = (_a5 = this.cbs).oncomment) === null || _b === undefined || _b.call(_a5, this.getSlice(start, endIndex - offset));
    (_d = (_c = this.cbs).oncommentend) === null || _d === undefined || _d.call(_c);
    this.startIndex = endIndex + 1;
  }
  oncdata(start, endIndex, offset) {
    var _a5, _b, _c, _d, _e3, _f, _g, _h, _j, _k;
    this.endIndex = endIndex;
    const value = this.getSlice(start, endIndex - offset);
    if (this.options.xmlMode || this.options.recognizeCDATA) {
      (_b = (_a5 = this.cbs).oncdatastart) === null || _b === undefined || _b.call(_a5);
      (_d = (_c = this.cbs).ontext) === null || _d === undefined || _d.call(_c, value);
      (_f = (_e3 = this.cbs).oncdataend) === null || _f === undefined || _f.call(_e3);
    } else {
      (_h = (_g = this.cbs).oncomment) === null || _h === undefined || _h.call(_g, `[CDATA[${value}]]`);
      (_k = (_j = this.cbs).oncommentend) === null || _k === undefined || _k.call(_j);
    }
    this.startIndex = endIndex + 1;
  }
  onend() {
    var _a5, _b;
    if (this.cbs.onclosetag) {
      this.endIndex = this.startIndex;
      for (let index2 = this.stack.length;index2 > 0; this.cbs.onclosetag(this.stack[--index2], true))
        ;
    }
    (_b = (_a5 = this.cbs).onend) === null || _b === undefined || _b.call(_a5);
  }
  reset() {
    var _a5, _b, _c, _d;
    (_b = (_a5 = this.cbs).onreset) === null || _b === undefined || _b.call(_a5);
    this.tokenizer.reset();
    this.tagname = "";
    this.attribname = "";
    this.attribs = null;
    this.stack.length = 0;
    this.startIndex = 0;
    this.endIndex = 0;
    (_d = (_c = this.cbs).onparserinit) === null || _d === undefined || _d.call(_c, this);
    this.buffers.length = 0;
    this.bufferOffset = 0;
    this.writeIndex = 0;
    this.ended = false;
  }
  parseComplete(data) {
    this.reset();
    this.end(data);
  }
  getSlice(start, end) {
    while (start - this.bufferOffset >= this.buffers[0].length) {
      this.shiftBuffer();
    }
    let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);
    while (end - this.bufferOffset > this.buffers[0].length) {
      this.shiftBuffer();
      slice += this.buffers[0].slice(0, end - this.bufferOffset);
    }
    return slice;
  }
  shiftBuffer() {
    this.bufferOffset += this.buffers[0].length;
    this.writeIndex--;
    this.buffers.shift();
  }
  write(chunk) {
    var _a5, _b;
    if (this.ended) {
      (_b = (_a5 = this.cbs).onerror) === null || _b === undefined || _b.call(_a5, new Error(".write() after done!"));
      return;
    }
    this.buffers.push(chunk);
    if (this.tokenizer.running) {
      this.tokenizer.write(chunk);
      this.writeIndex++;
    }
  }
  end(chunk) {
    var _a5, _b;
    if (this.ended) {
      (_b = (_a5 = this.cbs).onerror) === null || _b === undefined || _b.call(_a5, new Error(".end() after done!"));
      return;
    }
    if (chunk)
      this.write(chunk);
    this.ended = true;
    this.tokenizer.end();
  }
  pause() {
    this.tokenizer.pause();
  }
  resume() {
    this.tokenizer.resume();
    while (this.tokenizer.running && this.writeIndex < this.buffers.length) {
      this.tokenizer.write(this.buffers[this.writeIndex++]);
    }
    if (this.ended)
      this.tokenizer.end();
  }
  parseChunk(chunk) {
    this.write(chunk);
  }
  done(chunk) {
    this.end(chunk);
  }
}
var formTags, pTag, tableSectionTags, ddtTags, rtpTags, openImpliesClose, voidElements, foreignContextElements, htmlIntegrationElements, reNameEnd;
var init_Parser = __esm(() => {
  init_Tokenizer();
  init_decode();
  formTags = new Set([
    "input",
    "option",
    "optgroup",
    "select",
    "button",
    "datalist",
    "textarea"
  ]);
  pTag = new Set(["p"]);
  tableSectionTags = new Set(["thead", "tbody"]);
  ddtTags = new Set(["dd", "dt"]);
  rtpTags = new Set(["rt", "rp"]);
  openImpliesClose = new Map([
    ["tr", new Set(["tr", "th", "td"])],
    ["th", new Set(["th"])],
    ["td", new Set(["thead", "th", "td"])],
    ["body", new Set(["head", "link", "script"])],
    ["li", new Set(["li"])],
    ["p", pTag],
    ["h1", pTag],
    ["h2", pTag],
    ["h3", pTag],
    ["h4", pTag],
    ["h5", pTag],
    ["h6", pTag],
    ["select", formTags],
    ["input", formTags],
    ["output", formTags],
    ["button", formTags],
    ["datalist", formTags],
    ["textarea", formTags],
    ["option", new Set(["option"])],
    ["optgroup", new Set(["optgroup", "option"])],
    ["dd", ddtTags],
    ["dt", ddtTags],
    ["address", pTag],
    ["article", pTag],
    ["aside", pTag],
    ["blockquote", pTag],
    ["details", pTag],
    ["div", pTag],
    ["dl", pTag],
    ["fieldset", pTag],
    ["figcaption", pTag],
    ["figure", pTag],
    ["footer", pTag],
    ["form", pTag],
    ["header", pTag],
    ["hr", pTag],
    ["main", pTag],
    ["nav", pTag],
    ["ol", pTag],
    ["pre", pTag],
    ["section", pTag],
    ["table", pTag],
    ["ul", pTag],
    ["rt", rtpTags],
    ["rp", rtpTags],
    ["tbody", tableSectionTags],
    ["tfoot", tableSectionTags]
  ]);
  voidElements = new Set([
    "area",
    "base",
    "basefont",
    "br",
    "col",
    "command",
    "embed",
    "frame",
    "hr",
    "img",
    "input",
    "isindex",
    "keygen",
    "link",
    "meta",
    "param",
    "source",
    "track",
    "wbr"
  ]);
  foreignContextElements = new Set(["math", "svg"]);
  htmlIntegrationElements = new Set([
    "mi",
    "mo",
    "mn",
    "ms",
    "mtext",
    "annotation-xml",
    "foreignobject",
    "desc",
    "title"
  ]);
  reNameEnd = /\s|\//;
});

// ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/escape.js
function encodeXML(str) {
  let ret = "";
  let lastIdx = 0;
  let match;
  while ((match = xmlReplacer.exec(str)) !== null) {
    const i = match.index;
    const char2 = str.charCodeAt(i);
    const next = xmlCodeMap.get(char2);
    if (next !== undefined) {
      ret += str.substring(lastIdx, i) + next;
      lastIdx = i + 1;
    } else {
      ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`;
      lastIdx = xmlReplacer.lastIndex += Number((char2 & 64512) === 55296);
    }
  }
  return ret + str.substr(lastIdx);
}
function getEscaper(regex, map3) {
  return function escape4(data) {
    let match;
    let lastIdx = 0;
    let result = "";
    while (match = regex.exec(data)) {
      if (lastIdx !== match.index) {
        result += data.substring(lastIdx, match.index);
      }
      result += map3.get(match[0].charCodeAt(0));
      lastIdx = match.index + 1;
    }
    return result + data.substring(lastIdx);
  };
}
var xmlReplacer, xmlCodeMap, getCodePoint, escapeUTF8, escapeAttribute, escapeText;
var init_escape = __esm(() => {
  xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
  xmlCodeMap = new Map([
    [34, "&quot;"],
    [38, "&amp;"],
    [39, "&apos;"],
    [60, "&lt;"],
    [62, "&gt;"]
  ]);
  getCodePoint = String.prototype.codePointAt != null ? (str, index2) => str.codePointAt(index2) : (c2, index2) => (c2.charCodeAt(index2) & 64512) === 55296 ? (c2.charCodeAt(index2) - 55296) * 1024 + c2.charCodeAt(index2 + 1) - 56320 + 65536 : c2.charCodeAt(index2);
  escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
  escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([
    [34, "&quot;"],
    [38, "&amp;"],
    [160, "&nbsp;"]
  ]));
  escapeText = getEscaper(/[&<>\u00A0]/g, new Map([
    [38, "&amp;"],
    [60, "&lt;"],
    [62, "&gt;"],
    [160, "&nbsp;"]
  ]));
});

// ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/index.js
var EntityLevel, EncodingMode;
var init_esm3 = __esm(() => {
  init_escape();
  (function(EntityLevel2) {
    EntityLevel2[EntityLevel2["XML"] = 0] = "XML";
    EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML";
  })(EntityLevel || (EntityLevel = {}));
  (function(EncodingMode2) {
    EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8";
    EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII";
    EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive";
    EncodingMode2[EncodingMode2["Attribute"] = 3] = "Attribute";
    EncodingMode2[EncodingMode2["Text"] = 4] = "Text";
  })(EncodingMode || (EncodingMode = {}));
});

// ../../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/foreignNames.js
var elementNames, attributeNames;
var init_foreignNames = __esm(() => {
  elementNames = new Map([
    "altGlyph",
    "altGlyphDef",
    "altGlyphItem",
    "animateColor",
    "animateMotion",
    "animateTransform",
    "clipPath",
    "feBlend",
    "feColorMatrix",
    "feComponentTransfer",
    "feComposite",
    "feConvolveMatrix",
    "feDiffuseLighting",
    "feDisplacementMap",
    "feDistantLight",
    "feDropShadow",
    "feFlood",
    "feFuncA",
    "feFuncB",
    "feFuncG",
    "feFuncR",
    "feGaussianBlur",
    "feImage",
    "feMerge",
    "feMergeNode",
    "feMorphology",
    "feOffset",
    "fePointLight",
    "feSpecularLighting",
    "feSpotLight",
    "feTile",
    "feTurbulence",
    "foreignObject",
    "glyphRef",
    "linearGradient",
    "radialGradient",
    "textPath"
  ].map((val) => [val.toLowerCase(), val]));
  attributeNames = new Map([
    "definitionURL",
    "attributeName",
    "attributeType",
    "baseFrequency",
    "baseProfile",
    "calcMode",
    "clipPathUnits",
    "diffuseConstant",
    "edgeMode",
    "filterUnits",
    "glyphRef",
    "gradientTransform",
    "gradientUnits",
    "kernelMatrix",
    "kernelUnitLength",
    "keyPoints",
    "keySplines",
    "keyTimes",
    "lengthAdjust",
    "limitingConeAngle",
    "markerHeight",
    "markerUnits",
    "markerWidth",
    "maskContentUnits",
    "maskUnits",
    "numOctaves",
    "pathLength",
    "patternContentUnits",
    "patternTransform",
    "patternUnits",
    "pointsAtX",
    "pointsAtY",
    "pointsAtZ",
    "preserveAlpha",
    "preserveAspectRatio",
    "primitiveUnits",
    "refX",
    "refY",
    "repeatCount",
    "repeatDur",
    "requiredExtensions",
    "requiredFeatures",
    "specularConstant",
    "specularExponent",
    "spreadMethod",
    "startOffset",
    "stdDeviation",
    "stitchTiles",
    "surfaceScale",
    "systemLanguage",
    "tableValues",
    "targetX",
    "targetY",
    "textLength",
    "viewBox",
    "viewTarget",
    "xChannelSelector",
    "yChannelSelector",
    "zoomAndPan"
  ].map((val) => [val.toLowerCase(), val]));
});

// ../../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/index.js
function replaceQuotes(value) {
  return value.replace(/"/g, "&quot;");
}
function formatAttributes(attributes, opts) {
  var _a5;
  if (!attributes)
    return;
  const encode3 = ((_a5 = opts.encodeEntities) !== null && _a5 !== undefined ? _a5 : opts.decodeEntities) === false ? replaceQuotes : opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML : escapeAttribute;
  return Object.keys(attributes).map((key) => {
    var _a6, _b;
    const value = (_a6 = attributes[key]) !== null && _a6 !== undefined ? _a6 : "";
    if (opts.xmlMode === "foreign") {
      key = (_b = attributeNames.get(key)) !== null && _b !== undefined ? _b : key;
    }
    if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
      return key;
    }
    return `${key}="${encode3(value)}"`;
  }).join(" ");
}
function render(node3, options2 = {}) {
  const nodes = "length" in node3 ? node3 : [node3];
  let output = "";
  for (let i = 0;i < nodes.length; i++) {
    output += renderNode(nodes[i], options2);
  }
  return output;
}
function renderNode(node3, options2) {
  switch (node3.type) {
    case Root:
      return render(node3.children, options2);
    case Doctype:
    case Directive:
      return renderDirective(node3);
    case Comment:
      return renderComment(node3);
    case CDATA:
      return renderCdata(node3);
    case Script:
    case Style:
    case Tag:
      return renderTag(node3, options2);
    case Text:
      return renderText(node3, options2);
  }
}
function renderTag(elem, opts) {
  var _a5;
  if (opts.xmlMode === "foreign") {
    elem.name = (_a5 = elementNames.get(elem.name)) !== null && _a5 !== undefined ? _a5 : elem.name;
    if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) {
      opts = { ...opts, xmlMode: false };
    }
  }
  if (!opts.xmlMode && foreignElements.has(elem.name)) {
    opts = { ...opts, xmlMode: "foreign" };
  }
  let tag2 = `<${elem.name}`;
  const attribs = formatAttributes(elem.attribs, opts);
  if (attribs) {
    tag2 += ` ${attribs}`;
  }
  if (elem.children.length === 0 && (opts.xmlMode ? opts.selfClosingTags !== false : opts.selfClosingTags && singleTag.has(elem.name))) {
    if (!opts.xmlMode)
      tag2 += " ";
    tag2 += "/>";
  } else {
    tag2 += ">";
    if (elem.children.length > 0) {
      tag2 += render(elem.children, opts);
    }
    if (opts.xmlMode || !singleTag.has(elem.name)) {
      tag2 += `</${elem.name}>`;
    }
  }
  return tag2;
}
function renderDirective(elem) {
  return `<${elem.data}>`;
}
function renderText(elem, opts) {
  var _a5;
  let data = elem.data || "";
  if (((_a5 = opts.encodeEntities) !== null && _a5 !== undefined ? _a5 : opts.decodeEntities) !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) {
    data = opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML(data) : escapeText(data);
  }
  return data;
}
function renderCdata(elem) {
  return `<![CDATA[${elem.children[0].data}]]>`;
}
function renderComment(elem) {
  return `<!--${elem.data}-->`;
}
var unencodedElements, singleTag, foreignModeIntegrationPoints, foreignElements;
var init_esm4 = __esm(() => {
  init_esm();
  init_esm3();
  init_foreignNames();
  unencodedElements = new Set([
    "style",
    "script",
    "xmp",
    "iframe",
    "noembed",
    "noframes",
    "plaintext",
    "noscript"
  ]);
  singleTag = new Set([
    "area",
    "base",
    "basefont",
    "br",
    "col",
    "command",
    "embed",
    "frame",
    "hr",
    "img",
    "input",
    "isindex",
    "keygen",
    "link",
    "meta",
    "param",
    "source",
    "track",
    "wbr"
  ]);
  foreignModeIntegrationPoints = new Set([
    "mi",
    "mo",
    "mn",
    "ms",
    "mtext",
    "annotation-xml",
    "foreignObject",
    "desc",
    "title"
  ]);
  foreignElements = new Set(["svg", "math"]);
});

// ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/stringify.js
var init_stringify = () => {};

// ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/traversal.js
var init_traversal = () => {};

// ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/querying.js
var init_querying = () => {};

// ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/legacy.js
var init_legacy = () => {};

// ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/helpers.js
var DocumentPosition;
var init_helpers = __esm(() => {
  (function(DocumentPosition2) {
    DocumentPosition2[DocumentPosition2["DISCONNECTED"] = 1] = "DISCONNECTED";
    DocumentPosition2[DocumentPosition2["PRECEDING"] = 2] = "PRECEDING";
    DocumentPosition2[DocumentPosition2["FOLLOWING"] = 4] = "FOLLOWING";
    DocumentPosition2[DocumentPosition2["CONTAINS"] = 8] = "CONTAINS";
    DocumentPosition2[DocumentPosition2["CONTAINED_BY"] = 16] = "CONTAINED_BY";
  })(DocumentPosition || (DocumentPosition = {}));
});

// ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/feeds.js
var init_feeds = () => {};

// ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/index.js
var init_esm5 = __esm(() => {
  init_stringify();
  init_traversal();
  init_querying();
  init_legacy();
  init_helpers();
  init_feeds();
});

// ../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/esm/index.js
function parseDocument(data, options2) {
  const handler = new DomHandler(undefined, options2);
  new Parser(handler, options2).end(data);
  return handler.root;
}
var init_esm6 = __esm(() => {
  init_Parser();
  init_esm2();
  init_esm();
  init_esm5();
});

// ../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js
var require_cjs = __commonJS((exports, module) => {
  var isMergeableObject = function isMergeableObject2(value) {
    return isNonNullObject(value) && !isSpecial(value);
  };
  function isNonNullObject(value) {
    return !!value && typeof value === "object";
  }
  function isSpecial(value) {
    var stringValue = Object.prototype.toString.call(value);
    return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
  }
  var canUseSymbol = typeof Symbol === "function" && Symbol.for;
  var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
  function isReactElement(value) {
    return value.$$typeof === REACT_ELEMENT_TYPE;
  }
  function emptyTarget(val) {
    return Array.isArray(val) ? [] : {};
  }
  function cloneUnlessOtherwiseSpecified(value, options2) {
    return options2.clone !== false && options2.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options2) : value;
  }
  function defaultArrayMerge(target, source, options2) {
    return target.concat(source).map(function(element) {
      return cloneUnlessOtherwiseSpecified(element, options2);
    });
  }
  function getMergeFunction(key, options2) {
    if (!options2.customMerge) {
      return deepmerge;
    }
    var customMerge = options2.customMerge(key);
    return typeof customMerge === "function" ? customMerge : deepmerge;
  }
  function getEnumerableOwnPropertySymbols(target) {
    return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol2) {
      return Object.propertyIsEnumerable.call(target, symbol2);
    }) : [];
  }
  function getKeys(target) {
    return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
  }
  function propertyIsOnObject(object2, property) {
    try {
      return property in object2;
    } catch (_4) {
      return false;
    }
  }
  function propertyIsUnsafe(target, key) {
    return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
  }
  function mergeObject(target, source, options2) {
    var destination = {};
    if (options2.isMergeableObject(target)) {
      getKeys(target).forEach(function(key) {
        destination[key] = cloneUnlessOtherwiseSpecified(target[key], options2);
      });
    }
    getKeys(source).forEach(function(key) {
      if (propertyIsUnsafe(target, key)) {
        return;
      }
      if (propertyIsOnObject(target, key) && options2.isMergeableObject(source[key])) {
        destination[key] = getMergeFunction(key, options2)(target[key], source[key], options2);
      } else {
        destination[key] = cloneUnlessOtherwiseSpecified(source[key], options2);
      }
    });
    return destination;
  }
  function deepmerge(target, source, options2) {
    options2 = options2 || {};
    options2.arrayMerge = options2.arrayMerge || defaultArrayMerge;
    options2.isMergeableObject = options2.isMergeableObject || isMergeableObject;
    options2.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
    var sourceIsArray = Array.isArray(source);
    var targetIsArray = Array.isArray(target);
    var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
    if (!sourceAndTargetTypesMatch) {
      return cloneUnlessOtherwiseSpecified(source, options2);
    } else if (sourceIsArray) {
      return options2.arrayMerge(target, source, options2);
    } else {
      return mergeObject(target, source, options2);
    }
  }
  deepmerge.all = function deepmergeAll(array2, options2) {
    if (!Array.isArray(array2)) {
      throw new Error("first argument should be an array");
    }
    return array2.reduce(function(prev, next) {
      return deepmerge(prev, next, options2);
    }, {});
  };
  var deepmerge_1 = deepmerge;
  module.exports = deepmerge_1;
});

// ../../node_modules/.pnpm/html-to-text@9.0.5/node_modules/html-to-text/lib/html-to-text.mjs
function limitedDepthRecursive(n3, f3, g2 = () => {
  return;
}) {
  if (n3 === undefined) {
    const f1 = function(...args) {
      return f3(f1, ...args);
    };
    return f1;
  }
  if (n3 >= 0) {
    return function(...args) {
      return f3(limitedDepthRecursive(n3 - 1, f3, g2), ...args);
    };
  }
  return g2;
}
function trimCharacter(str, char2) {
  let start = 0;
  let end = str.length;
  while (start < end && str[start] === char2) {
    ++start;
  }
  while (end > start && str[end - 1] === char2) {
    --end;
  }
  return start > 0 || end < str.length ? str.substring(start, end) : str;
}
function trimCharacterEnd(str, char2) {
  let end = str.length;
  while (end > 0 && str[end - 1] === char2) {
    --end;
  }
  return end < str.length ? str.substring(0, end) : str;
}
function unicodeEscape(str) {
  return str.replace(/[\s\S]/g, (c2) => "\\u" + c2.charCodeAt().toString(16).padStart(4, "0"));
}
function mergeDuplicatesPreferLast(items, getKey) {
  const map3 = new Map;
  for (let i = items.length;i-- > 0; ) {
    const item = items[i];
    const key = getKey(item);
    map3.set(key, map3.has(key) ? import_deepmerge.default(item, map3.get(key), { arrayMerge: overwriteMerge$1 }) : item);
  }
  return [...map3.values()].reverse();
}
function get(obj, path2) {
  for (const key of path2) {
    if (!obj) {
      return;
    }
    obj = obj[key];
  }
  return obj;
}
function numberToLetterSequence(num, baseChar = "a", base = 26) {
  const digits = [];
  do {
    num -= 1;
    digits.push(num % base);
    num = num / base >> 0;
  } while (num > 0);
  const baseCode = baseChar.charCodeAt(0);
  return digits.reverse().map((n3) => String.fromCharCode(baseCode + n3)).join("");
}
function numberToRoman(num) {
  return [...num + ""].map((n3) => +n3).reverse().map((v4, i) => v4 % 5 < 4 ? (v4 < 5 ? "" : V3[i]) + I3[i].repeat(v4 % 5) : I3[i] + (v4 < 5 ? V3[i] : I3[i + 1])).reverse().join("");
}

class InlineTextBuilder {
  constructor(options2, maxLineLength = undefined) {
    this.lines = [];
    this.nextLineWords = [];
    this.maxLineLength = maxLineLength || options2.wordwrap || Number.MAX_VALUE;
    this.nextLineAvailableChars = this.maxLineLength;
    this.wrapCharacters = get(options2, ["longWordSplit", "wrapCharacters"]) || [];
    this.forceWrapOnLimit = get(options2, ["longWordSplit", "forceWrapOnLimit"]) || false;
    this.stashedSpace = false;
    this.wordBreakOpportunity = false;
  }
  pushWord(word, noWrap = false) {
    if (this.nextLineAvailableChars <= 0 && !noWrap) {
      this.startNewLine();
    }
    const isLineStart = this.nextLineWords.length === 0;
    const cost = word.length + (isLineStart ? 0 : 1);
    if (cost <= this.nextLineAvailableChars || noWrap) {
      this.nextLineWords.push(word);
      this.nextLineAvailableChars -= cost;
    } else {
      const [first, ...rest] = this.splitLongWord(word);
      if (!isLineStart) {
        this.startNewLine();
      }
      this.nextLineWords.push(first);
      this.nextLineAvailableChars -= first.length;
      for (const part of rest) {
        this.startNewLine();
        this.nextLineWords.push(part);
        this.nextLineAvailableChars -= part.length;
      }
    }
  }
  popWord() {
    const lastWord = this.nextLineWords.pop();
    if (lastWord !== undefined) {
      const isLineStart = this.nextLineWords.length === 0;
      const cost = lastWord.length + (isLineStart ? 0 : 1);
      this.nextLineAvailableChars += cost;
    }
    return lastWord;
  }
  concatWord(word, noWrap = false) {
    if (this.wordBreakOpportunity && word.length > this.nextLineAvailableChars) {
      this.pushWord(word, noWrap);
      this.wordBreakOpportunity = false;
    } else {
      const lastWord = this.popWord();
      this.pushWord(lastWord ? lastWord.concat(word) : word, noWrap);
    }
  }
  startNewLine(n3 = 1) {
    this.lines.push(this.nextLineWords);
    if (n3 > 1) {
      this.lines.push(...Array.from({ length: n3 - 1 }, () => []));
    }
    this.nextLineWords = [];
    this.nextLineAvailableChars = this.maxLineLength;
  }
  isEmpty() {
    return this.lines.length === 0 && this.nextLineWords.length === 0;
  }
  clear() {
    this.lines.length = 0;
    this.nextLineWords.length = 0;
    this.nextLineAvailableChars = this.maxLineLength;
  }
  toString() {
    return [...this.lines, this.nextLineWords].map((words) => words.join(" ")).join(`
`);
  }
  splitLongWord(word) {
    const parts = [];
    let idx = 0;
    while (word.length > this.maxLineLength) {
      const firstLine = word.substring(0, this.maxLineLength);
      const remainingChars = word.substring(this.maxLineLength);
      const splitIndex = firstLine.lastIndexOf(this.wrapCharacters[idx]);
      if (splitIndex > -1) {
        word = firstLine.substring(splitIndex + 1) + remainingChars;
        parts.push(firstLine.substring(0, splitIndex + 1));
      } else {
        idx++;
        if (idx < this.wrapCharacters.length) {
          word = firstLine + remainingChars;
        } else {
          if (this.forceWrapOnLimit) {
            parts.push(firstLine);
            word = remainingChars;
            if (word.length > this.maxLineLength) {
              continue;
            }
          } else {
            word = firstLine + remainingChars;
          }
          break;
        }
      }
    }
    parts.push(word);
    return parts;
  }
}

class StackItem {
  constructor(next = null) {
    this.next = next;
  }
  getRoot() {
    return this.next ? this.next : this;
  }
}
function charactersToCodes(str) {
  return [...str].map((c2) => "\\u" + c2.charCodeAt(0).toString(16).padStart(4, "0")).join("");
}

class WhitespaceProcessor {
  constructor(options2) {
    this.whitespaceChars = options2.preserveNewlines ? options2.whitespaceCharacters.replace(/\n/g, "") : options2.whitespaceCharacters;
    const whitespaceCodes = charactersToCodes(this.whitespaceChars);
    this.leadingWhitespaceRe = new RegExp(`^[${whitespaceCodes}]`);
    this.trailingWhitespaceRe = new RegExp(`[${whitespaceCodes}]$`);
    this.allWhitespaceOrEmptyRe = new RegExp(`^[${whitespaceCodes}]*$`);
    this.newlineOrNonWhitespaceRe = new RegExp(`(\\n|[^\\n${whitespaceCodes}])`, "g");
    this.newlineOrNonNewlineStringRe = new RegExp(`(\\n|[^\\n]+)`, "g");
    if (options2.preserveNewlines) {
      const wordOrNewlineRe = new RegExp(`\\n|[^\\n${whitespaceCodes}]+`, "gm");
      this.shrinkWrapAdd = function(text2, inlineTextBuilder, transform2 = (str) => str, noWrap = false) {
        if (!text2) {
          return;
        }
        const previouslyStashedSpace = inlineTextBuilder.stashedSpace;
        let anyMatch = false;
        let m2 = wordOrNewlineRe.exec(text2);
        if (m2) {
          anyMatch = true;
          if (m2[0] === `
`) {
            inlineTextBuilder.startNewLine();
          } else if (previouslyStashedSpace || this.testLeadingWhitespace(text2)) {
            inlineTextBuilder.pushWord(transform2(m2[0]), noWrap);
          } else {
            inlineTextBuilder.concatWord(transform2(m2[0]), noWrap);
          }
          while ((m2 = wordOrNewlineRe.exec(text2)) !== null) {
            if (m2[0] === `
`) {
              inlineTextBuilder.startNewLine();
            } else {
              inlineTextBuilder.pushWord(transform2(m2[0]), noWrap);
            }
          }
        }
        inlineTextBuilder.stashedSpace = previouslyStashedSpace && !anyMatch || this.testTrailingWhitespace(text2);
      };
    } else {
      const wordRe = new RegExp(`[^${whitespaceCodes}]+`, "g");
      this.shrinkWrapAdd = function(text2, inlineTextBuilder, transform2 = (str) => str, noWrap = false) {
        if (!text2) {
          return;
        }
        const previouslyStashedSpace = inlineTextBuilder.stashedSpace;
        let anyMatch = false;
        let m2 = wordRe.exec(text2);
        if (m2) {
          anyMatch = true;
          if (previouslyStashedSpace || this.testLeadingWhitespace(text2)) {
            inlineTextBuilder.pushWord(transform2(m2[0]), noWrap);
          } else {
            inlineTextBuilder.concatWord(transform2(m2[0]), noWrap);
          }
          while ((m2 = wordRe.exec(text2)) !== null) {
            inlineTextBuilder.pushWord(transform2(m2[0]), noWrap);
          }
        }
        inlineTextBuilder.stashedSpace = previouslyStashedSpace && !anyMatch || this.testTrailingWhitespace(text2);
      };
    }
  }
  addLiteral(text2, inlineTextBuilder, noWrap = true) {
    if (!text2) {
      return;
    }
    const previouslyStashedSpace = inlineTextBuilder.stashedSpace;
    let anyMatch = false;
    let m2 = this.newlineOrNonNewlineStringRe.exec(text2);
    if (m2) {
      anyMatch = true;
      if (m2[0] === `
`) {
        inlineTextBuilder.startNewLine();
      } else if (previouslyStashedSpace) {
        inlineTextBuilder.pushWord(m2[0], noWrap);
      } else {
        inlineTextBuilder.concatWord(m2[0], noWrap);
      }
      while ((m2 = this.newlineOrNonNewlineStringRe.exec(text2)) !== null) {
        if (m2[0] === `
`) {
          inlineTextBuilder.startNewLine();
        } else {
          inlineTextBuilder.pushWord(m2[0], noWrap);
        }
      }
    }
    inlineTextBuilder.stashedSpace = previouslyStashedSpace && !anyMatch;
  }
  testLeadingWhitespace(text2) {
    return this.leadingWhitespaceRe.test(text2);
  }
  testTrailingWhitespace(text2) {
    return this.trailingWhitespaceRe.test(text2);
  }
  testContainsWords(text2) {
    return !this.allWhitespaceOrEmptyRe.test(text2);
  }
  countNewlinesNoWords(text2) {
    this.newlineOrNonWhitespaceRe.lastIndex = 0;
    let counter = 0;
    let match;
    while ((match = this.newlineOrNonWhitespaceRe.exec(text2)) !== null) {
      if (match[0] === `
`) {
        counter++;
      } else {
        return 0;
      }
    }
    return counter;
  }
}

class BlockTextBuilder {
  constructor(options2, picker, metadata = undefined) {
    this.options = options2;
    this.picker = picker;
    this.metadata = metadata;
    this.whitespaceProcessor = new WhitespaceProcessor(options2);
    this._stackItem = new BlockStackItem(options2);
    this._wordTransformer = undefined;
  }
  pushWordTransform(wordTransform) {
    this._wordTransformer = new TransformerStackItem(this._wordTransformer, wordTransform);
  }
  popWordTransform() {
    if (!this._wordTransformer) {
      return;
    }
    const transform2 = this._wordTransformer.transform;
    this._wordTransformer = this._wordTransformer.next;
    return transform2;
  }
  startNoWrap() {
    this._stackItem.isNoWrap = true;
  }
  stopNoWrap() {
    this._stackItem.isNoWrap = false;
  }
  _getCombinedWordTransformer() {
    const wt2 = this._wordTransformer ? (str) => applyTransformer(str, this._wordTransformer) : undefined;
    const ce3 = this.options.encodeCharacters;
    return wt2 ? ce3 ? (str) => ce3(wt2(str)) : wt2 : ce3;
  }
  _popStackItem() {
    const item = this._stackItem;
    this._stackItem = item.next;
    return item;
  }
  addLineBreak() {
    if (!(this._stackItem instanceof BlockStackItem || this._stackItem instanceof ListItemStackItem || this._stackItem instanceof TableCellStackItem)) {
      return;
    }
    if (this._stackItem.isPre) {
      this._stackItem.rawText += `
`;
    } else {
      this._stackItem.inlineTextBuilder.startNewLine();
    }
  }
  addWordBreakOpportunity() {
    if (this._stackItem instanceof BlockStackItem || this._stackItem instanceof ListItemStackItem || this._stackItem instanceof TableCellStackItem) {
      this._stackItem.inlineTextBuilder.wordBreakOpportunity = true;
    }
  }
  addInline(str, { noWordTransform = false } = {}) {
    if (!(this._stackItem instanceof BlockStackItem || this._stackItem instanceof ListItemStackItem || this._stackItem instanceof TableCellStackItem)) {
      return;
    }
    if (this._stackItem.isPre) {
      this._stackItem.rawText += str;
      return;
    }
    if (str.length === 0 || this._stackItem.stashedLineBreaks && !this.whitespaceProcessor.testContainsWords(str)) {
      return;
    }
    if (this.options.preserveNewlines) {
      const newlinesNumber = this.whitespaceProcessor.countNewlinesNoWords(str);
      if (newlinesNumber > 0) {
        this._stackItem.inlineTextBuilder.startNewLine(newlinesNumber);
        return;
      }
    }
    if (this._stackItem.stashedLineBreaks) {
      this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);
    }
    this.whitespaceProcessor.shrinkWrapAdd(str, this._stackItem.inlineTextBuilder, noWordTransform ? undefined : this._getCombinedWordTransformer(), this._stackItem.isNoWrap);
    this._stackItem.stashedLineBreaks = 0;
  }
  addLiteral(str) {
    if (!(this._stackItem instanceof BlockStackItem || this._stackItem instanceof ListItemStackItem || this._stackItem instanceof TableCellStackItem)) {
      return;
    }
    if (str.length === 0) {
      return;
    }
    if (this._stackItem.isPre) {
      this._stackItem.rawText += str;
      return;
    }
    if (this._stackItem.stashedLineBreaks) {
      this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);
    }
    this.whitespaceProcessor.addLiteral(str, this._stackItem.inlineTextBuilder, this._stackItem.isNoWrap);
    this._stackItem.stashedLineBreaks = 0;
  }
  openBlock({ leadingLineBreaks = 1, reservedLineLength = 0, isPre = false } = {}) {
    const maxLineLength = Math.max(20, this._stackItem.inlineTextBuilder.maxLineLength - reservedLineLength);
    this._stackItem = new BlockStackItem(this.options, this._stackItem, leadingLineBreaks, maxLineLength);
    if (isPre) {
      this._stackItem.isPre = true;
    }
  }
  closeBlock({ trailingLineBreaks = 1, blockTransform = undefined } = {}) {
    const block2 = this._popStackItem();
    const blockText2 = blockTransform ? blockTransform(getText(block2)) : getText(block2);
    addText(this._stackItem, blockText2, block2.leadingLineBreaks, Math.max(block2.stashedLineBreaks, trailingLineBreaks));
  }
  openList({ maxPrefixLength = 0, prefixAlign = "left", interRowLineBreaks = 1, leadingLineBreaks = 2 } = {}) {
    this._stackItem = new ListStackItem(this.options, this._stackItem, {
      interRowLineBreaks,
      leadingLineBreaks,
      maxLineLength: this._stackItem.inlineTextBuilder.maxLineLength,
      maxPrefixLength,
      prefixAlign
    });
  }
  openListItem({ prefix = "" } = {}) {
    if (!(this._stackItem instanceof ListStackItem)) {
      throw new Error("Can't add a list item to something that is not a list! Check the formatter.");
    }
    const list2 = this._stackItem;
    const prefixLength = Math.max(prefix.length, list2.maxPrefixLength);
    const maxLineLength = Math.max(20, list2.inlineTextBuilder.maxLineLength - prefixLength);
    this._stackItem = new ListItemStackItem(this.options, list2, {
      prefix,
      maxLineLength,
      leadingLineBreaks: list2.interRowLineBreaks
    });
  }
  closeListItem() {
    const listItem = this._popStackItem();
    const list2 = listItem.next;
    const prefixLength = Math.max(listItem.prefix.length, list2.maxPrefixLength);
    const spacing = `
` + " ".repeat(prefixLength);
    const prefix = list2.prefixAlign === "right" ? listItem.prefix.padStart(prefixLength) : listItem.prefix.padEnd(prefixLength);
    const text2 = prefix + getText(listItem).replace(/\n/g, spacing);
    addText(list2, text2, listItem.leadingLineBreaks, Math.max(listItem.stashedLineBreaks, list2.interRowLineBreaks));
  }
  closeList({ trailingLineBreaks = 2 } = {}) {
    const list2 = this._popStackItem();
    const text2 = getText(list2);
    if (text2) {
      addText(this._stackItem, text2, list2.leadingLineBreaks, trailingLineBreaks);
    }
  }
  openTable() {
    this._stackItem = new TableStackItem(this._stackItem);
  }
  openTableRow() {
    if (!(this._stackItem instanceof TableStackItem)) {
      throw new Error("Can't add a table row to something that is not a table! Check the formatter.");
    }
    this._stackItem = new TableRowStackItem(this._stackItem);
  }
  openTableCell({ maxColumnWidth = undefined } = {}) {
    if (!(this._stackItem instanceof TableRowStackItem)) {
      throw new Error("Can't add a table cell to something that is not a table row! Check the formatter.");
    }
    this._stackItem = new TableCellStackItem(this.options, this._stackItem, maxColumnWidth);
  }
  closeTableCell({ colspan = 1, rowspan = 1 } = {}) {
    const cell = this._popStackItem();
    const text2 = trimCharacter(getText(cell), `
`);
    cell.next.cells.push({ colspan, rowspan, text: text2 });
  }
  closeTableRow() {
    const row = this._popStackItem();
    row.next.rows.push(row.cells);
  }
  closeTable({ tableToString, leadingLineBreaks = 2, trailingLineBreaks = 2 }) {
    const table = this._popStackItem();
    const output = tableToString(table.rows);
    if (output) {
      addText(this._stackItem, output, leadingLineBreaks, trailingLineBreaks);
    }
  }
  toString() {
    return getText(this._stackItem.getRoot());
  }
}
function getText(stackItem) {
  if (!(stackItem instanceof BlockStackItem || stackItem instanceof ListItemStackItem || stackItem instanceof TableCellStackItem)) {
    throw new Error("Only blocks, list items and table cells can be requested for text contents.");
  }
  return stackItem.inlineTextBuilder.isEmpty() ? stackItem.rawText : stackItem.rawText + stackItem.inlineTextBuilder.toString();
}
function addText(stackItem, text2, leadingLineBreaks, trailingLineBreaks) {
  if (!(stackItem instanceof BlockStackItem || stackItem instanceof ListItemStackItem || stackItem instanceof TableCellStackItem)) {
    throw new Error("Only blocks, list items and table cells can contain text.");
  }
  const parentText = getText(stackItem);
  const lineBreaks = Math.max(stackItem.stashedLineBreaks, leadingLineBreaks);
  stackItem.inlineTextBuilder.clear();
  if (parentText) {
    stackItem.rawText = parentText + `
`.repeat(lineBreaks) + text2;
  } else {
    stackItem.rawText = text2;
    stackItem.leadingLineBreaks = lineBreaks;
  }
  stackItem.stashedLineBreaks = trailingLineBreaks;
}
function applyTransformer(str, transformer) {
  return transformer ? applyTransformer(transformer.transform(str), transformer.next) : str;
}
function compile$1(options2 = {}) {
  const selectorsWithoutFormat = options2.selectors.filter((s2) => !s2.format);
  if (selectorsWithoutFormat.length) {
    throw new Error("Following selectors have no specified format: " + selectorsWithoutFormat.map((s2) => `\`${s2.selector}\``).join(", "));
  }
  const picker = new DecisionTree(options2.selectors.map((s2) => [s2.selector, s2])).build(hp2Builder);
  if (typeof options2.encodeCharacters !== "function") {
    options2.encodeCharacters = makeReplacerFromDict(options2.encodeCharacters);
  }
  const baseSelectorsPicker = new DecisionTree(options2.baseElements.selectors.map((s2, i) => [s2, i + 1])).build(hp2Builder);
  function findBaseElements(dom) {
    return findBases(dom, options2, baseSelectorsPicker);
  }
  const limitedWalk = limitedDepthRecursive(options2.limits.maxDepth, recursiveWalk, function(dom, builder) {
    builder.addInline(options2.limits.ellipsis || "");
  });
  return function(html2, metadata = undefined) {
    return process3(html2, metadata, options2, picker, findBaseElements, limitedWalk);
  };
}
function process3(html2, metadata, options2, picker, findBaseElements, walk) {
  const maxInputLength = options2.limits.maxInputLength;
  if (maxInputLength && html2 && html2.length > maxInputLength) {
    console.warn(`Input length ${html2.length} is above allowed limit of ${maxInputLength}. Truncating without ellipsis.`);
    html2 = html2.substring(0, maxInputLength);
  }
  const document2 = parseDocument(html2, { decodeEntities: options2.decodeEntities });
  const bases = findBaseElements(document2.children);
  const builder = new BlockTextBuilder(options2, picker, metadata);
  walk(bases, builder);
  return builder.toString();
}
function findBases(dom, options2, baseSelectorsPicker) {
  const results = [];
  function recursiveWalk(walk, dom2) {
    dom2 = dom2.slice(0, options2.limits.maxChildNodes);
    for (const elem of dom2) {
      if (elem.type !== "tag") {
        continue;
      }
      const pickedSelectorIndex = baseSelectorsPicker.pick1(elem);
      if (pickedSelectorIndex > 0) {
        results.push({ selectorIndex: pickedSelectorIndex, element: elem });
      } else if (elem.children) {
        walk(elem.children);
      }
      if (results.length >= options2.limits.maxBaseElements) {
        return;
      }
    }
  }
  const limitedWalk = limitedDepthRecursive(options2.limits.maxDepth, recursiveWalk);
  limitedWalk(dom);
  if (options2.baseElements.orderBy !== "occurrence") {
    results.sort((a, b4) => a.selectorIndex - b4.selectorIndex);
  }
  return options2.baseElements.returnDomByDefault && results.length === 0 ? dom : results.map((x3) => x3.element);
}
function recursiveWalk(walk, dom, builder) {
  if (!dom) {
    return;
  }
  const options2 = builder.options;
  const tooManyChildNodes = dom.length > options2.limits.maxChildNodes;
  if (tooManyChildNodes) {
    dom = dom.slice(0, options2.limits.maxChildNodes);
    dom.push({
      data: options2.limits.ellipsis,
      type: "text"
    });
  }
  for (const elem of dom) {
    switch (elem.type) {
      case "text": {
        builder.addInline(elem.data);
        break;
      }
      case "tag": {
        const tagDefinition = builder.picker.pick1(elem);
        const format = options2.formatters[tagDefinition.format];
        format(elem, walk, builder, tagDefinition.options || {});
        break;
      }
    }
  }
  return;
}
function makeReplacerFromDict(dict) {
  if (!dict || Object.keys(dict).length === 0) {
    return;
  }
  const entries = Object.entries(dict).filter(([, v4]) => v4 !== false);
  const regex = new RegExp(entries.map(([c2]) => `(${unicodeEscape([...c2][0])})`).join("|"), "g");
  const values = entries.map(([, v4]) => v4);
  const replacer = (m2, ...cgs) => values[cgs.findIndex((cg) => cg)];
  return (str) => str.replace(regex, replacer);
}
function formatSkip(elem, walk, builder, formatOptions) {}
function formatInlineString(elem, walk, builder, formatOptions) {
  builder.addLiteral(formatOptions.string || "");
}
function formatBlockString(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
  builder.addLiteral(formatOptions.string || "");
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function formatInline(elem, walk, builder, formatOptions) {
  walk(elem.children, builder);
}
function formatBlock$1(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
  walk(elem.children, builder);
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function renderOpenTag(elem) {
  const attrs = elem.attribs && elem.attribs.length ? " " + Object.entries(elem.attribs).map(([k4, v4]) => v4 === "" ? k4 : `${k4}=${v4.replace(/"/g, "&quot;")}`).join(" ") : "";
  return `<${elem.name}${attrs}>`;
}
function renderCloseTag(elem) {
  return `</${elem.name}>`;
}
function formatInlineTag(elem, walk, builder, formatOptions) {
  builder.startNoWrap();
  builder.addLiteral(renderOpenTag(elem));
  builder.stopNoWrap();
  walk(elem.children, builder);
  builder.startNoWrap();
  builder.addLiteral(renderCloseTag(elem));
  builder.stopNoWrap();
}
function formatBlockTag(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
  builder.startNoWrap();
  builder.addLiteral(renderOpenTag(elem));
  builder.stopNoWrap();
  walk(elem.children, builder);
  builder.startNoWrap();
  builder.addLiteral(renderCloseTag(elem));
  builder.stopNoWrap();
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function formatInlineHtml(elem, walk, builder, formatOptions) {
  builder.startNoWrap();
  builder.addLiteral(render(elem, { decodeEntities: builder.options.decodeEntities }));
  builder.stopNoWrap();
}
function formatBlockHtml(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
  builder.startNoWrap();
  builder.addLiteral(render(elem, { decodeEntities: builder.options.decodeEntities }));
  builder.stopNoWrap();
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function formatInlineSurround(elem, walk, builder, formatOptions) {
  builder.addLiteral(formatOptions.prefix || "");
  walk(elem.children, builder);
  builder.addLiteral(formatOptions.suffix || "");
}
function getRow(matrix, j3) {
  if (!matrix[j3]) {
    matrix[j3] = [];
  }
  return matrix[j3];
}
function findFirstVacantIndex(row, x3 = 0) {
  while (row[x3]) {
    x3++;
  }
  return x3;
}
function transposeInPlace(matrix, maxSize) {
  for (let i = 0;i < maxSize; i++) {
    const rowI = getRow(matrix, i);
    for (let j3 = 0;j3 < i; j3++) {
      const rowJ = getRow(matrix, j3);
      if (rowI[j3] || rowJ[i]) {
        const temp = rowI[j3];
        rowI[j3] = rowJ[i];
        rowJ[i] = temp;
      }
    }
  }
}
function putCellIntoLayout(cell, layout, baseRow, baseCol) {
  for (let r2 = 0;r2 < cell.rowspan; r2++) {
    const layoutRow = getRow(layout, baseRow + r2);
    for (let c2 = 0;c2 < cell.colspan; c2++) {
      layoutRow[baseCol + c2] = cell;
    }
  }
}
function getOrInitOffset(offsets, index2) {
  if (offsets[index2] === undefined) {
    offsets[index2] = index2 === 0 ? 0 : 1 + getOrInitOffset(offsets, index2 - 1);
  }
  return offsets[index2];
}
function updateOffset(offsets, base, span, value) {
  offsets[base + span] = Math.max(getOrInitOffset(offsets, base + span), getOrInitOffset(offsets, base) + value);
}
function tableToString(tableRows, rowSpacing, colSpacing) {
  const layout = [];
  let colNumber = 0;
  const rowNumber = tableRows.length;
  const rowOffsets = [0];
  for (let j3 = 0;j3 < rowNumber; j3++) {
    const layoutRow = getRow(layout, j3);
    const cells = tableRows[j3];
    let x3 = 0;
    for (let i = 0;i < cells.length; i++) {
      const cell = cells[i];
      x3 = findFirstVacantIndex(layoutRow, x3);
      putCellIntoLayout(cell, layout, j3, x3);
      x3 += cell.colspan;
      cell.lines = cell.text.split(`
`);
      const cellHeight = cell.lines.length;
      updateOffset(rowOffsets, j3, cell.rowspan, cellHeight + rowSpacing);
    }
    colNumber = layoutRow.length > colNumber ? layoutRow.length : colNumber;
  }
  transposeInPlace(layout, rowNumber > colNumber ? rowNumber : colNumber);
  const outputLines = [];
  const colOffsets = [0];
  for (let x3 = 0;x3 < colNumber; x3++) {
    let y3 = 0;
    let cell;
    const rowsInThisColumn = Math.min(rowNumber, layout[x3].length);
    while (y3 < rowsInThisColumn) {
      cell = layout[x3][y3];
      if (cell) {
        if (!cell.rendered) {
          let cellWidth = 0;
          for (let j3 = 0;j3 < cell.lines.length; j3++) {
            const line2 = cell.lines[j3];
            const lineOffset = rowOffsets[y3] + j3;
            outputLines[lineOffset] = (outputLines[lineOffset] || "").padEnd(colOffsets[x3]) + line2;
            cellWidth = line2.length > cellWidth ? line2.length : cellWidth;
          }
          updateOffset(colOffsets, x3, cell.colspan, cellWidth + colSpacing);
          cell.rendered = true;
        }
        y3 += cell.rowspan;
      } else {
        const lineOffset = rowOffsets[y3];
        outputLines[lineOffset] = outputLines[lineOffset] || "";
        y3++;
      }
    }
  }
  return outputLines.join(`
`);
}
function formatLineBreak(elem, walk, builder, formatOptions) {
  builder.addLineBreak();
}
function formatWbr(elem, walk, builder, formatOptions) {
  builder.addWordBreakOpportunity();
}
function formatHorizontalLine(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
  builder.addInline("-".repeat(formatOptions.length || builder.options.wordwrap || 40));
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function formatParagraph(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
  walk(elem.children, builder);
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function formatPre(elem, walk, builder, formatOptions) {
  builder.openBlock({
    isPre: true,
    leadingLineBreaks: formatOptions.leadingLineBreaks || 2
  });
  walk(elem.children, builder);
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function formatHeading(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
  if (formatOptions.uppercase !== false) {
    builder.pushWordTransform((str) => str.toUpperCase());
    walk(elem.children, builder);
    builder.popWordTransform();
  } else {
    walk(elem.children, builder);
  }
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
}
function formatBlockquote(elem, walk, builder, formatOptions) {
  builder.openBlock({
    leadingLineBreaks: formatOptions.leadingLineBreaks || 2,
    reservedLineLength: 2
  });
  walk(elem.children, builder);
  builder.closeBlock({
    trailingLineBreaks: formatOptions.trailingLineBreaks || 2,
    blockTransform: (str) => (formatOptions.trimEmptyLines !== false ? trimCharacter(str, `
`) : str).split(`
`).map((line2) => "> " + line2).join(`
`)
  });
}
function withBrackets(str, brackets) {
  if (!brackets) {
    return str;
  }
  const lbr = typeof brackets[0] === "string" ? brackets[0] : "[";
  const rbr = typeof brackets[1] === "string" ? brackets[1] : "]";
  return lbr + str + rbr;
}
function pathRewrite(path2, rewriter, baseUrl, metadata, elem) {
  const modifiedPath = typeof rewriter === "function" ? rewriter(path2, metadata, elem) : path2;
  return modifiedPath[0] === "/" && baseUrl ? trimCharacterEnd(baseUrl, "/") + modifiedPath : modifiedPath;
}
function formatImage(elem, walk, builder, formatOptions) {
  const attribs = elem.attribs || {};
  const alt = attribs.alt ? attribs.alt : "";
  const src = !attribs.src ? "" : pathRewrite(attribs.src, formatOptions.pathRewrite, formatOptions.baseUrl, builder.metadata, elem);
  const text2 = !src ? alt : !alt ? withBrackets(src, formatOptions.linkBrackets) : alt + " " + withBrackets(src, formatOptions.linkBrackets);
  builder.addInline(text2, { noWordTransform: true });
}
function formatAnchor(elem, walk, builder, formatOptions) {
  function getHref() {
    if (formatOptions.ignoreHref) {
      return "";
    }
    if (!elem.attribs || !elem.attribs.href) {
      return "";
    }
    let href2 = elem.attribs.href.replace(/^mailto:/, "");
    if (formatOptions.noAnchorUrl && href2[0] === "#") {
      return "";
    }
    href2 = pathRewrite(href2, formatOptions.pathRewrite, formatOptions.baseUrl, builder.metadata, elem);
    return href2;
  }
  const href = getHref();
  if (!href) {
    walk(elem.children, builder);
  } else {
    let text2 = "";
    builder.pushWordTransform((str) => {
      if (str) {
        text2 += str;
      }
      return str;
    });
    walk(elem.children, builder);
    builder.popWordTransform();
    const hideSameLink = formatOptions.hideLinkHrefIfSameAsText && href === text2;
    if (!hideSameLink) {
      builder.addInline(!text2 ? href : " " + withBrackets(href, formatOptions.linkBrackets), { noWordTransform: true });
    }
  }
}
function formatList(elem, walk, builder, formatOptions, nextPrefixCallback) {
  const isNestedList = get(elem, ["parent", "name"]) === "li";
  let maxPrefixLength = 0;
  const listItems = (elem.children || []).filter((child) => child.type !== "text" || !/^\s*$/.test(child.data)).map(function(child) {
    if (child.name !== "li") {
      return { node: child, prefix: "" };
    }
    const prefix = isNestedList ? nextPrefixCallback().trimStart() : nextPrefixCallback();
    if (prefix.length > maxPrefixLength) {
      maxPrefixLength = prefix.length;
    }
    return { node: child, prefix };
  });
  if (!listItems.length) {
    return;
  }
  builder.openList({
    interRowLineBreaks: 1,
    leadingLineBreaks: isNestedList ? 1 : formatOptions.leadingLineBreaks || 2,
    maxPrefixLength,
    prefixAlign: "left"
  });
  for (const { node: node3, prefix } of listItems) {
    builder.openListItem({ prefix });
    walk([node3], builder);
    builder.closeListItem();
  }
  builder.closeList({ trailingLineBreaks: isNestedList ? 1 : formatOptions.trailingLineBreaks || 2 });
}
function formatUnorderedList(elem, walk, builder, formatOptions) {
  const prefix = formatOptions.itemPrefix || " * ";
  return formatList(elem, walk, builder, formatOptions, () => prefix);
}
function formatOrderedList(elem, walk, builder, formatOptions) {
  let nextIndex = Number(elem.attribs.start || "1");
  const indexFunction = getOrderedListIndexFunction(elem.attribs.type);
  const nextPrefixCallback = () => " " + indexFunction(nextIndex++) + ". ";
  return formatList(elem, walk, builder, formatOptions, nextPrefixCallback);
}
function getOrderedListIndexFunction(olType = "1") {
  switch (olType) {
    case "a":
      return (i) => numberToLetterSequence(i, "a");
    case "A":
      return (i) => numberToLetterSequence(i, "A");
    case "i":
      return (i) => numberToRoman(i).toLowerCase();
    case "I":
      return (i) => numberToRoman(i);
    case "1":
    default:
      return (i) => i.toString();
  }
}
function splitClassesAndIds(selectors) {
  const classes = [];
  const ids = [];
  for (const selector of selectors) {
    if (selector.startsWith(".")) {
      classes.push(selector.substring(1));
    } else if (selector.startsWith("#")) {
      ids.push(selector.substring(1));
    }
  }
  return { classes, ids };
}
function isDataTable(attr, tables) {
  if (tables === true) {
    return true;
  }
  if (!attr) {
    return false;
  }
  const { classes, ids } = splitClassesAndIds(tables);
  const attrClasses = (attr["class"] || "").split(" ");
  const attrIds = (attr["id"] || "").split(" ");
  return attrClasses.some((x3) => classes.includes(x3)) || attrIds.some((x3) => ids.includes(x3));
}
function formatTable(elem, walk, builder, formatOptions) {
  return isDataTable(elem.attribs, builder.options.tables) ? formatDataTable(elem, walk, builder, formatOptions) : formatBlock(elem, walk, builder, formatOptions);
}
function formatBlock(elem, walk, builder, formatOptions) {
  builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks });
  walk(elem.children, builder);
  builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks });
}
function formatDataTable(elem, walk, builder, formatOptions) {
  builder.openTable();
  elem.children.forEach(walkTable);
  builder.closeTable({
    tableToString: (rows) => tableToString(rows, formatOptions.rowSpacing ?? 0, formatOptions.colSpacing ?? 3),
    leadingLineBreaks: formatOptions.leadingLineBreaks,
    trailingLineBreaks: formatOptions.trailingLineBreaks
  });
  function formatCell(cellNode) {
    const colspan = +get(cellNode, ["attribs", "colspan"]) || 1;
    const rowspan = +get(cellNode, ["attribs", "rowspan"]) || 1;
    builder.openTableCell({ maxColumnWidth: formatOptions.maxColumnWidth });
    walk(cellNode.children, builder);
    builder.closeTableCell({ colspan, rowspan });
  }
  function walkTable(elem2) {
    if (elem2.type !== "tag") {
      return;
    }
    const formatHeaderCell = formatOptions.uppercaseHeaderCells !== false ? (cellNode) => {
      builder.pushWordTransform((str) => str.toUpperCase());
      formatCell(cellNode);
      builder.popWordTransform();
    } : formatCell;
    switch (elem2.name) {
      case "thead":
      case "tbody":
      case "tfoot":
      case "center":
        elem2.children.forEach(walkTable);
        return;
      case "tr": {
        builder.openTableRow();
        for (const childOfTr of elem2.children) {
          if (childOfTr.type !== "tag") {
            continue;
          }
          switch (childOfTr.name) {
            case "th": {
              formatHeaderCell(childOfTr);
              break;
            }
            case "td": {
              formatCell(childOfTr);
              break;
            }
          }
        }
        builder.closeTableRow();
        break;
      }
    }
  }
}
function compile(options2 = {}) {
  options2 = import_deepmerge.default(DEFAULT_OPTIONS, options2, {
    arrayMerge: overwriteMerge,
    customMerge: (key) => key === "selectors" ? selectorsMerge : undefined
  });
  options2.formatters = Object.assign({}, genericFormatters, textFormatters, options2.formatters);
  options2.selectors = mergeDuplicatesPreferLast(options2.selectors, (s2) => s2.selector);
  handleDeprecatedOptions(options2);
  return compile$1(options2);
}
function convert(html2, options2 = {}, metadata = undefined) {
  return compile(options2)(html2, metadata);
}
function handleDeprecatedOptions(options2) {
  if (options2.tags) {
    const tagDefinitions = Object.entries(options2.tags).map(([selector, definition]) => ({ ...definition, selector: selector || "*" }));
    options2.selectors.push(...tagDefinitions);
    options2.selectors = mergeDuplicatesPreferLast(options2.selectors, (s2) => s2.selector);
  }
  function set2(obj, path2, value) {
    const valueKey = path2.pop();
    for (const key of path2) {
      let nested = obj[key];
      if (!nested) {
        nested = {};
        obj[key] = nested;
      }
      obj = nested;
    }
    obj[valueKey] = value;
  }
  if (options2["baseElement"]) {
    const baseElement = options2["baseElement"];
    set2(options2, ["baseElements", "selectors"], Array.isArray(baseElement) ? baseElement : [baseElement]);
  }
  if (options2["returnDomByDefault"] !== undefined) {
    set2(options2, ["baseElements", "returnDomByDefault"], options2["returnDomByDefault"]);
  }
  for (const definition of options2.selectors) {
    if (definition.format === "anchor" && get(definition, ["options", "noLinkBrackets"])) {
      set2(definition, ["options", "linkBrackets"], false);
    }
  }
}
var import_deepmerge, overwriteMerge$1 = (acc, src, options2) => [...src], I3, V3, BlockStackItem, ListStackItem, ListItemStackItem, TableStackItem, TableRowStackItem, TableCellStackItem, TransformerStackItem, genericFormatters, textFormatters, DEFAULT_OPTIONS, concatMerge = (acc, src, options2) => [...acc, ...src], overwriteMerge = (acc, src, options2) => [...src], selectorsMerge = (acc, src, options2) => acc.some((s2) => typeof s2 === "object") ? concatMerge(acc, src) : overwriteMerge(acc, src);
var init_html_to_text = __esm(() => {
  init_hp2_builder();
  init_esm6();
  init_selderee();
  init_esm4();
  import_deepmerge = __toESM(require_cjs(), 1);
  I3 = ["I", "X", "C", "M"];
  V3 = ["V", "L", "D"];
  BlockStackItem = class BlockStackItem extends StackItem {
    constructor(options2, next = null, leadingLineBreaks = 1, maxLineLength = undefined) {
      super(next);
      this.leadingLineBreaks = leadingLineBreaks;
      this.inlineTextBuilder = new InlineTextBuilder(options2, maxLineLength);
      this.rawText = "";
      this.stashedLineBreaks = 0;
      this.isPre = next && next.isPre;
      this.isNoWrap = next && next.isNoWrap;
    }
  };
  ListStackItem = class ListStackItem extends BlockStackItem {
    constructor(options2, next = null, {
      interRowLineBreaks = 1,
      leadingLineBreaks = 2,
      maxLineLength = undefined,
      maxPrefixLength = 0,
      prefixAlign = "left"
    } = {}) {
      super(options2, next, leadingLineBreaks, maxLineLength);
      this.maxPrefixLength = maxPrefixLength;
      this.prefixAlign = prefixAlign;
      this.interRowLineBreaks = interRowLineBreaks;
    }
  };
  ListItemStackItem = class ListItemStackItem extends BlockStackItem {
    constructor(options2, next = null, {
      leadingLineBreaks = 1,
      maxLineLength = undefined,
      prefix = ""
    } = {}) {
      super(options2, next, leadingLineBreaks, maxLineLength);
      this.prefix = prefix;
    }
  };
  TableStackItem = class TableStackItem extends StackItem {
    constructor(next = null) {
      super(next);
      this.rows = [];
      this.isPre = next && next.isPre;
      this.isNoWrap = next && next.isNoWrap;
    }
  };
  TableRowStackItem = class TableRowStackItem extends StackItem {
    constructor(next = null) {
      super(next);
      this.cells = [];
      this.isPre = next && next.isPre;
      this.isNoWrap = next && next.isNoWrap;
    }
  };
  TableCellStackItem = class TableCellStackItem extends StackItem {
    constructor(options2, next = null, maxColumnWidth = undefined) {
      super(next);
      this.inlineTextBuilder = new InlineTextBuilder(options2, maxColumnWidth);
      this.rawText = "";
      this.stashedLineBreaks = 0;
      this.isPre = next && next.isPre;
      this.isNoWrap = next && next.isNoWrap;
    }
  };
  TransformerStackItem = class TransformerStackItem extends StackItem {
    constructor(next = null, transform2) {
      super(next);
      this.transform = transform2;
    }
  };
  genericFormatters = /* @__PURE__ */ Object.freeze({
    __proto__: null,
    block: formatBlock$1,
    blockHtml: formatBlockHtml,
    blockString: formatBlockString,
    blockTag: formatBlockTag,
    inline: formatInline,
    inlineHtml: formatInlineHtml,
    inlineString: formatInlineString,
    inlineSurround: formatInlineSurround,
    inlineTag: formatInlineTag,
    skip: formatSkip
  });
  textFormatters = /* @__PURE__ */ Object.freeze({
    __proto__: null,
    anchor: formatAnchor,
    blockquote: formatBlockquote,
    dataTable: formatDataTable,
    heading: formatHeading,
    horizontalLine: formatHorizontalLine,
    image: formatImage,
    lineBreak: formatLineBreak,
    orderedList: formatOrderedList,
    paragraph: formatParagraph,
    pre: formatPre,
    table: formatTable,
    unorderedList: formatUnorderedList,
    wbr: formatWbr
  });
  DEFAULT_OPTIONS = {
    baseElements: {
      selectors: ["body"],
      orderBy: "selectors",
      returnDomByDefault: true
    },
    decodeEntities: true,
    encodeCharacters: {},
    formatters: {},
    limits: {
      ellipsis: "...",
      maxBaseElements: undefined,
      maxChildNodes: undefined,
      maxDepth: undefined,
      maxInputLength: 1 << 24
    },
    longWordSplit: {
      forceWrapOnLimit: false,
      wrapCharacters: []
    },
    preserveNewlines: false,
    selectors: [
      { selector: "*", format: "inline" },
      {
        selector: "a",
        format: "anchor",
        options: {
          baseUrl: null,
          hideLinkHrefIfSameAsText: false,
          ignoreHref: false,
          linkBrackets: ["[", "]"],
          noAnchorUrl: true
        }
      },
      { selector: "article", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      { selector: "aside", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      {
        selector: "blockquote",
        format: "blockquote",
        options: { leadingLineBreaks: 2, trailingLineBreaks: 2, trimEmptyLines: true }
      },
      { selector: "br", format: "lineBreak" },
      { selector: "div", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      { selector: "footer", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      { selector: "form", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      { selector: "h1", format: "heading", options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: true } },
      { selector: "h2", format: "heading", options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: true } },
      { selector: "h3", format: "heading", options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: true } },
      { selector: "h4", format: "heading", options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: true } },
      { selector: "h5", format: "heading", options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: true } },
      { selector: "h6", format: "heading", options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: true } },
      { selector: "header", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      {
        selector: "hr",
        format: "horizontalLine",
        options: { leadingLineBreaks: 2, length: undefined, trailingLineBreaks: 2 }
      },
      {
        selector: "img",
        format: "image",
        options: { baseUrl: null, linkBrackets: ["[", "]"] }
      },
      { selector: "main", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      { selector: "nav", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      {
        selector: "ol",
        format: "orderedList",
        options: { leadingLineBreaks: 2, trailingLineBreaks: 2 }
      },
      { selector: "p", format: "paragraph", options: { leadingLineBreaks: 2, trailingLineBreaks: 2 } },
      { selector: "pre", format: "pre", options: { leadingLineBreaks: 2, trailingLineBreaks: 2 } },
      { selector: "section", format: "block", options: { leadingLineBreaks: 1, trailingLineBreaks: 1 } },
      {
        selector: "table",
        format: "table",
        options: {
          colSpacing: 3,
          leadingLineBreaks: 2,
          maxColumnWidth: 60,
          rowSpacing: 0,
          trailingLineBreaks: 2,
          uppercaseHeaderCells: true
        }
      },
      {
        selector: "ul",
        format: "unorderedList",
        options: { itemPrefix: " * ", leadingLineBreaks: 2, trailingLineBreaks: 2 }
      },
      { selector: "wbr", format: "wbr" }
    ],
    tables: [],
    whitespaceCharacters: ` 	\r
\f​`,
    wordwrap: 80
  };
});

// ../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/cjs/react-dom.development.js
var require_react_dom_development = __commonJS((exports) => {
  var React14 = __toESM(require_react());
  (function() {
    function noop() {}
    function testStringCoercion(value) {
      return "" + value;
    }
    function createPortal$1(children, containerInfo, implementation) {
      var key = 3 < arguments.length && arguments[3] !== undefined ? arguments[3] : null;
      try {
        testStringCoercion(key);
        var JSCompiler_inline_result = false;
      } catch (e2) {
        JSCompiler_inline_result = true;
      }
      JSCompiler_inline_result && (console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", typeof Symbol === "function" && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"), testStringCoercion(key));
      return {
        $$typeof: REACT_PORTAL_TYPE,
        key: key == null ? null : "" + key,
        children,
        containerInfo,
        implementation
      };
    }
    function getCrossOriginStringAs(as2, input) {
      if (as2 === "font")
        return "";
      if (typeof input === "string")
        return input === "use-credentials" ? input : "";
    }
    function getValueDescriptorExpectingObjectForWarning(thing) {
      return thing === null ? "`null`" : thing === undefined ? "`undefined`" : thing === "" ? "an empty string" : 'something with type "' + typeof thing + '"';
    }
    function getValueDescriptorExpectingEnumForWarning(thing) {
      return thing === null ? "`null`" : thing === undefined ? "`undefined`" : thing === "" ? "an empty string" : typeof thing === "string" ? JSON.stringify(thing) : typeof thing === "number" ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
    }
    function resolveDispatcher() {
      var dispatcher = ReactSharedInternals.H;
      dispatcher === null && console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);
      return dispatcher;
    }
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
    var Internals = {
      d: {
        f: noop,
        r: function() {
          throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.");
        },
        D: noop,
        C: noop,
        L: noop,
        m: noop,
        X: noop,
        S: noop,
        M: noop
      },
      p: 0,
      findDOMNode: null
    }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React14.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
    typeof Map === "function" && Map.prototype != null && typeof Map.prototype.forEach === "function" && typeof Set === "function" && Set.prototype != null && typeof Set.prototype.clear === "function" && typeof Set.prototype.forEach === "function" || console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");
    exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
    exports.createPortal = function(children, container) {
      var key = 2 < arguments.length && arguments[2] !== undefined ? arguments[2] : null;
      if (!container || container.nodeType !== 1 && container.nodeType !== 9 && container.nodeType !== 11)
        throw Error("Target container is not a DOM element.");
      return createPortal$1(children, container, null, key);
    };
    exports.flushSync = function(fn2) {
      var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
      try {
        if (ReactSharedInternals.T = null, Internals.p = 2, fn2)
          return fn2();
      } finally {
        ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");
      }
    };
    exports.preconnect = function(href, options2) {
      typeof href === "string" && href ? options2 != null && typeof options2 !== "object" ? console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", getValueDescriptorExpectingEnumForWarning(options2)) : options2 != null && typeof options2.crossOrigin !== "string" && console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", getValueDescriptorExpectingObjectForWarning(options2.crossOrigin)) : console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href));
      typeof href === "string" && (options2 ? (options2 = options2.crossOrigin, options2 = typeof options2 === "string" ? options2 === "use-credentials" ? options2 : "" : undefined) : options2 = null, Internals.d.C(href, options2));
    };
    exports.prefetchDNS = function(href) {
      if (typeof href !== "string" || !href)
        console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href));
      else if (1 < arguments.length) {
        var options2 = arguments[1];
        typeof options2 === "object" && options2.hasOwnProperty("crossOrigin") ? console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", getValueDescriptorExpectingEnumForWarning(options2)) : console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", getValueDescriptorExpectingEnumForWarning(options2));
      }
      typeof href === "string" && Internals.d.D(href);
    };
    exports.preinit = function(href, options2) {
      typeof href === "string" && href ? options2 == null || typeof options2 !== "object" ? console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", getValueDescriptorExpectingEnumForWarning(options2)) : options2.as !== "style" && options2.as !== "script" && console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', getValueDescriptorExpectingEnumForWarning(options2.as)) : console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href));
      if (typeof href === "string" && options2 && typeof options2.as === "string") {
        var as2 = options2.as, crossOrigin = getCrossOriginStringAs(as2, options2.crossOrigin), integrity = typeof options2.integrity === "string" ? options2.integrity : undefined, fetchPriority = typeof options2.fetchPriority === "string" ? options2.fetchPriority : undefined;
        as2 === "style" ? Internals.d.S(href, typeof options2.precedence === "string" ? options2.precedence : undefined, {
          crossOrigin,
          integrity,
          fetchPriority
        }) : as2 === "script" && Internals.d.X(href, {
          crossOrigin,
          integrity,
          fetchPriority,
          nonce: typeof options2.nonce === "string" ? options2.nonce : undefined
        });
      }
    };
    exports.preinitModule = function(href, options2) {
      var encountered = "";
      typeof href === "string" && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
      options2 !== undefined && typeof options2 !== "object" ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options2) + "." : options2 && ("as" in options2) && options2.as !== "script" && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options2.as) + ".");
      if (encountered)
        console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", encountered);
      else
        switch (encountered = options2 && typeof options2.as === "string" ? options2.as : "script", encountered) {
          case "script":
            break;
          default:
            encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)', encountered, href);
        }
      if (typeof href === "string")
        if (typeof options2 === "object" && options2 !== null) {
          if (options2.as == null || options2.as === "script")
            encountered = getCrossOriginStringAs(options2.as, options2.crossOrigin), Internals.d.M(href, {
              crossOrigin: encountered,
              integrity: typeof options2.integrity === "string" ? options2.integrity : undefined,
              nonce: typeof options2.nonce === "string" ? options2.nonce : undefined
            });
        } else
          options2 == null && Internals.d.M(href);
    };
    exports.preload = function(href, options2) {
      var encountered = "";
      typeof href === "string" && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
      options2 == null || typeof options2 !== "object" ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options2) + "." : typeof options2.as === "string" && options2.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options2.as) + ".");
      encountered && console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s', encountered);
      if (typeof href === "string" && typeof options2 === "object" && options2 !== null && typeof options2.as === "string") {
        encountered = options2.as;
        var crossOrigin = getCrossOriginStringAs(encountered, options2.crossOrigin);
        Internals.d.L(href, encountered, {
          crossOrigin,
          integrity: typeof options2.integrity === "string" ? options2.integrity : undefined,
          nonce: typeof options2.nonce === "string" ? options2.nonce : undefined,
          type: typeof options2.type === "string" ? options2.type : undefined,
          fetchPriority: typeof options2.fetchPriority === "string" ? options2.fetchPriority : undefined,
          referrerPolicy: typeof options2.referrerPolicy === "string" ? options2.referrerPolicy : undefined,
          imageSrcSet: typeof options2.imageSrcSet === "string" ? options2.imageSrcSet : undefined,
          imageSizes: typeof options2.imageSizes === "string" ? options2.imageSizes : undefined,
          media: typeof options2.media === "string" ? options2.media : undefined
        });
      }
    };
    exports.preloadModule = function(href, options2) {
      var encountered = "";
      typeof href === "string" && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
      options2 !== undefined && typeof options2 !== "object" ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options2) + "." : options2 && ("as" in options2) && typeof options2.as !== "string" && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options2.as) + ".");
      encountered && console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s', encountered);
      typeof href === "string" && (options2 ? (encountered = getCrossOriginStringAs(options2.as, options2.crossOrigin), Internals.d.m(href, {
        as: typeof options2.as === "string" && options2.as !== "script" ? options2.as : undefined,
        crossOrigin: encountered,
        integrity: typeof options2.integrity === "string" ? options2.integrity : undefined
      })) : Internals.d.m(href));
    };
    exports.requestFormReset = function(form) {
      Internals.d.r(form);
    };
    exports.unstable_batchedUpdates = function(fn2, a) {
      return fn2(a);
    };
    exports.useFormState = function(action, initialState, permalink) {
      return resolveDispatcher().useFormState(action, initialState, permalink);
    };
    exports.useFormStatus = function() {
      return resolveDispatcher().useHostTransitionStatus();
    };
    exports.version = "19.2.7";
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  })();
});

// ../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/index.js
var require_react_dom = __commonJS((exports, module) => {
  var react_dom_development = __toESM(require_react_dom_development());
  if (false) {} else {
    module.exports = react_dom_development;
  }
});

// ../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js
var require_react_dom_server_legacy_node_development = __commonJS((exports) => {
  var React14 = __toESM(require_react());
  var ReactDOM = __toESM(require_react_dom());
  (function() {
    function styleReplacer(match, prefix2, s2, suffix2) {
      return "" + prefix2 + (s2 === "s" ? "\\73 " : "\\53 ") + suffix2;
    }
    function scriptReplacer(match, prefix2, s2, suffix2) {
      return "" + prefix2 + (s2 === "s" ? "\\u0073" : "\\u0053") + suffix2;
    }
    function getIteratorFn(maybeIterable) {
      if (maybeIterable === null || typeof maybeIterable !== "object")
        return null;
      maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
      return typeof maybeIterable === "function" ? maybeIterable : null;
    }
    function objectName(object2) {
      object2 = Object.prototype.toString.call(object2);
      return object2.slice(8, object2.length - 1);
    }
    function describeKeyForErrorMessage(key) {
      var encodedKey = JSON.stringify(key);
      return '"' + key + '"' === encodedKey ? key : encodedKey;
    }
    function describeValueForErrorMessage(value) {
      switch (typeof value) {
        case "string":
          return JSON.stringify(10 >= value.length ? value : value.slice(0, 10) + "...");
        case "object":
          if (isArrayImpl(value))
            return "[...]";
          if (value !== null && value.$$typeof === CLIENT_REFERENCE_TAG)
            return "client";
          value = objectName(value);
          return value === "Object" ? "{...}" : value;
        case "function":
          return value.$$typeof === CLIENT_REFERENCE_TAG ? "client" : (value = value.displayName || value.name) ? "function " + value : "function";
        default:
          return String(value);
      }
    }
    function describeElementType(type2) {
      if (typeof type2 === "string")
        return type2;
      switch (type2) {
        case REACT_SUSPENSE_TYPE:
          return "Suspense";
        case REACT_SUSPENSE_LIST_TYPE:
          return "SuspenseList";
      }
      if (typeof type2 === "object")
        switch (type2.$$typeof) {
          case REACT_FORWARD_REF_TYPE:
            return describeElementType(type2.render);
          case REACT_MEMO_TYPE:
            return describeElementType(type2.type);
          case REACT_LAZY_TYPE:
            var payload = type2._payload;
            type2 = type2._init;
            try {
              return describeElementType(type2(payload));
            } catch (x3) {}
        }
      return "";
    }
    function describeObjectForErrorMessage(objectOrArray, expandedName) {
      var objKind = objectName(objectOrArray);
      if (objKind !== "Object" && objKind !== "Array")
        return objKind;
      var start = -1, length = 0;
      if (isArrayImpl(objectOrArray))
        if (jsxChildrenParents.has(objectOrArray)) {
          var type2 = jsxChildrenParents.get(objectOrArray);
          objKind = "<" + describeElementType(type2) + ">";
          for (var i = 0;i < objectOrArray.length; i++) {
            var value = objectOrArray[i];
            value = typeof value === "string" ? value : typeof value === "object" && value !== null ? "{" + describeObjectForErrorMessage(value) + "}" : "{" + describeValueForErrorMessage(value) + "}";
            "" + i === expandedName ? (start = objKind.length, length = value.length, objKind += value) : objKind = 15 > value.length && 40 > objKind.length + value.length ? objKind + value : objKind + "{...}";
          }
          objKind += "</" + describeElementType(type2) + ">";
        } else {
          objKind = "[";
          for (type2 = 0;type2 < objectOrArray.length; type2++)
            0 < type2 && (objKind += ", "), i = objectOrArray[type2], i = typeof i === "object" && i !== null ? describeObjectForErrorMessage(i) : describeValueForErrorMessage(i), "" + type2 === expandedName ? (start = objKind.length, length = i.length, objKind += i) : objKind = 10 > i.length && 40 > objKind.length + i.length ? objKind + i : objKind + "...";
          objKind += "]";
        }
      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)
        objKind = "<" + describeElementType(objectOrArray.type) + "/>";
      else {
        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG)
          return "client";
        if (jsxPropsParents.has(objectOrArray)) {
          objKind = jsxPropsParents.get(objectOrArray);
          objKind = "<" + (describeElementType(objKind) || "...");
          type2 = Object.keys(objectOrArray);
          for (i = 0;i < type2.length; i++) {
            objKind += " ";
            value = type2[i];
            objKind += describeKeyForErrorMessage(value) + "=";
            var _value2 = objectOrArray[value];
            var _substr2 = value === expandedName && typeof _value2 === "object" && _value2 !== null ? describeObjectForErrorMessage(_value2) : describeValueForErrorMessage(_value2);
            typeof _value2 !== "string" && (_substr2 = "{" + _substr2 + "}");
            value === expandedName ? (start = objKind.length, length = _substr2.length, objKind += _substr2) : objKind = 10 > _substr2.length && 40 > objKind.length + _substr2.length ? objKind + _substr2 : objKind + "...";
          }
          objKind += ">";
        } else {
          objKind = "{";
          type2 = Object.keys(objectOrArray);
          for (i = 0;i < type2.length; i++)
            0 < i && (objKind += ", "), value = type2[i], objKind += describeKeyForErrorMessage(value) + ": ", _value2 = objectOrArray[value], _value2 = typeof _value2 === "object" && _value2 !== null ? describeObjectForErrorMessage(_value2) : describeValueForErrorMessage(_value2), value === expandedName ? (start = objKind.length, length = _value2.length, objKind += _value2) : objKind = 10 > _value2.length && 40 > objKind.length + _value2.length ? objKind + _value2 : objKind + "...";
          objKind += "}";
        }
      }
      return expandedName === undefined ? objKind : -1 < start && 0 < length ? (objectOrArray = " ".repeat(start) + "^".repeat(length), `
  ` + objKind + `
  ` + objectOrArray) : `
  ` + objKind;
    }
    function murmurhash3_32_gc(key, seed) {
      var remainder = key.length & 3;
      var bytes = key.length - remainder;
      var h12 = seed;
      for (seed = 0;seed < bytes; ) {
        var k1 = key.charCodeAt(seed) & 255 | (key.charCodeAt(++seed) & 255) << 8 | (key.charCodeAt(++seed) & 255) << 16 | (key.charCodeAt(++seed) & 255) << 24;
        ++seed;
        k1 = 3432918353 * (k1 & 65535) + ((3432918353 * (k1 >>> 16) & 65535) << 16) & 4294967295;
        k1 = k1 << 15 | k1 >>> 17;
        k1 = 461845907 * (k1 & 65535) + ((461845907 * (k1 >>> 16) & 65535) << 16) & 4294967295;
        h12 ^= k1;
        h12 = h12 << 13 | h12 >>> 19;
        h12 = 5 * (h12 & 65535) + ((5 * (h12 >>> 16) & 65535) << 16) & 4294967295;
        h12 = (h12 & 65535) + 27492 + (((h12 >>> 16) + 58964 & 65535) << 16);
      }
      k1 = 0;
      switch (remainder) {
        case 3:
          k1 ^= (key.charCodeAt(seed + 2) & 255) << 16;
        case 2:
          k1 ^= (key.charCodeAt(seed + 1) & 255) << 8;
        case 1:
          k1 ^= key.charCodeAt(seed) & 255, k1 = 3432918353 * (k1 & 65535) + ((3432918353 * (k1 >>> 16) & 65535) << 16) & 4294967295, k1 = k1 << 15 | k1 >>> 17, h12 ^= 461845907 * (k1 & 65535) + ((461845907 * (k1 >>> 16) & 65535) << 16) & 4294967295;
      }
      h12 ^= key.length;
      h12 ^= h12 >>> 16;
      h12 = 2246822507 * (h12 & 65535) + ((2246822507 * (h12 >>> 16) & 65535) << 16) & 4294967295;
      h12 ^= h12 >>> 13;
      h12 = 3266489909 * (h12 & 65535) + ((3266489909 * (h12 >>> 16) & 65535) << 16) & 4294967295;
      return (h12 ^ h12 >>> 16) >>> 0;
    }
    function typeName(value) {
      return typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
    }
    function willCoercionThrow(value) {
      try {
        return testStringCoercion(value), false;
      } catch (e2) {
        return true;
      }
    }
    function testStringCoercion(value) {
      return "" + value;
    }
    function checkAttributeStringCoercion(value, attributeName) {
      if (willCoercionThrow(value))
        return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", attributeName, typeName(value)), testStringCoercion(value);
    }
    function checkCSSPropertyStringCoercion(value, propName) {
      if (willCoercionThrow(value))
        return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", propName, typeName(value)), testStringCoercion(value);
    }
    function checkHtmlStringCoercion(value) {
      if (willCoercionThrow(value))
        return console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.", typeName(value)), testStringCoercion(value);
    }
    function isAttributeNameSafe(attributeName) {
      if (hasOwnProperty2.call(validatedAttributeNameCache, attributeName))
        return true;
      if (hasOwnProperty2.call(illegalAttributeNameCache, attributeName))
        return false;
      if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
        return validatedAttributeNameCache[attributeName] = true;
      illegalAttributeNameCache[attributeName] = true;
      console.error("Invalid attribute name: `%s`", attributeName);
      return false;
    }
    function checkControlledValueProps(tagName, props) {
      hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null || (tagName === "select" ? console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.") : console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."));
      props.onChange || props.readOnly || props.disabled || props.checked == null || console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
    }
    function validateProperty$1(tagName, name2) {
      if (hasOwnProperty2.call(warnedProperties$1, name2) && warnedProperties$1[name2])
        return true;
      if (rARIACamel$1.test(name2)) {
        tagName = "aria-" + name2.slice(4).toLowerCase();
        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
        if (tagName == null)
          return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", name2), warnedProperties$1[name2] = true;
        if (name2 !== tagName)
          return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?", name2, tagName), warnedProperties$1[name2] = true;
      }
      if (rARIA$1.test(name2)) {
        tagName = name2.toLowerCase();
        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
        if (tagName == null)
          return warnedProperties$1[name2] = true, false;
        name2 !== tagName && (console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?", name2, tagName), warnedProperties$1[name2] = true);
      }
      return true;
    }
    function validateProperties$2(type2, props) {
      var invalidProps = [], key;
      for (key in props)
        validateProperty$1(type2, key) || invalidProps.push(key);
      props = invalidProps.map(function(prop) {
        return "`" + prop + "`";
      }).join(", ");
      invalidProps.length === 1 ? console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props", props, type2) : 1 < invalidProps.length && console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props", props, type2);
    }
    function validateProperty(tagName, name2, value, eventRegistry) {
      if (hasOwnProperty2.call(warnedProperties, name2) && warnedProperties[name2])
        return true;
      var lowerCasedName = name2.toLowerCase();
      if (lowerCasedName === "onfocusin" || lowerCasedName === "onfocusout")
        return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."), warnedProperties[name2] = true;
      if (typeof value === "function" && (tagName === "form" && name2 === "action" || tagName === "input" && name2 === "formAction" || tagName === "button" && name2 === "formAction"))
        return true;
      if (eventRegistry != null) {
        tagName = eventRegistry.possibleRegistrationNames;
        if (eventRegistry.registrationNameDependencies.hasOwnProperty(name2))
          return true;
        eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null;
        if (eventRegistry != null)
          return console.error("Invalid event handler property `%s`. Did you mean `%s`?", name2, eventRegistry), warnedProperties[name2] = true;
        if (EVENT_NAME_REGEX.test(name2))
          return console.error("Unknown event handler property `%s`. It will be ignored.", name2), warnedProperties[name2] = true;
      } else if (EVENT_NAME_REGEX.test(name2))
        return INVALID_EVENT_NAME_REGEX.test(name2) && console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.", name2), warnedProperties[name2] = true;
      if (rARIA.test(name2) || rARIACamel.test(name2))
        return true;
      if (lowerCasedName === "innerhtml")
        return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."), warnedProperties[name2] = true;
      if (lowerCasedName === "aria")
        return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."), warnedProperties[name2] = true;
      if (lowerCasedName === "is" && value !== null && value !== undefined && typeof value !== "string")
        return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.", typeof value), warnedProperties[name2] = true;
      if (typeof value === "number" && isNaN(value))
        return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.", name2), warnedProperties[name2] = true;
      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
        if (lowerCasedName = possibleStandardNames[lowerCasedName], lowerCasedName !== name2)
          return console.error("Invalid DOM property `%s`. Did you mean `%s`?", name2, lowerCasedName), warnedProperties[name2] = true;
      } else if (name2 !== lowerCasedName)
        return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.", name2, lowerCasedName), warnedProperties[name2] = true;
      switch (name2) {
        case "dangerouslySetInnerHTML":
        case "children":
        case "style":
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "defaultValue":
        case "defaultChecked":
        case "innerHTML":
        case "ref":
          return true;
        case "innerText":
        case "textContent":
          return true;
      }
      switch (typeof value) {
        case "boolean":
          switch (name2) {
            case "autoFocus":
            case "checked":
            case "multiple":
            case "muted":
            case "selected":
            case "contentEditable":
            case "spellCheck":
            case "draggable":
            case "value":
            case "autoReverse":
            case "externalResourcesRequired":
            case "focusable":
            case "preserveAlpha":
            case "allowFullScreen":
            case "async":
            case "autoPlay":
            case "controls":
            case "default":
            case "defer":
            case "disabled":
            case "disablePictureInPicture":
            case "disableRemotePlayback":
            case "formNoValidate":
            case "hidden":
            case "loop":
            case "noModule":
            case "noValidate":
            case "open":
            case "playsInline":
            case "readOnly":
            case "required":
            case "reversed":
            case "scoped":
            case "seamless":
            case "itemScope":
            case "capture":
            case "download":
            case "inert":
              return true;
            default:
              lowerCasedName = name2.toLowerCase().slice(0, 5);
              if (lowerCasedName === "data-" || lowerCasedName === "aria-")
                return true;
              value ? console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.', value, name2, name2, value, name2) : console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.', value, name2, name2, value, name2, name2, name2);
              return warnedProperties[name2] = true;
          }
        case "function":
        case "symbol":
          return warnedProperties[name2] = true, false;
        case "string":
          if (value === "false" || value === "true") {
            switch (name2) {
              case "checked":
              case "selected":
              case "multiple":
              case "muted":
              case "allowFullScreen":
              case "async":
              case "autoPlay":
              case "controls":
              case "default":
              case "defer":
              case "disabled":
              case "disablePictureInPicture":
              case "disableRemotePlayback":
              case "formNoValidate":
              case "hidden":
              case "loop":
              case "noModule":
              case "noValidate":
              case "open":
              case "playsInline":
              case "readOnly":
              case "required":
              case "reversed":
              case "scoped":
              case "seamless":
              case "itemScope":
              case "inert":
                break;
              default:
                return true;
            }
            console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?", value, name2, value === "false" ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".', name2, value);
            warnedProperties[name2] = true;
          }
      }
      return true;
    }
    function warnUnknownProperties(type2, props, eventRegistry) {
      var unknownProps = [], key;
      for (key in props)
        validateProperty(type2, key, props[key], eventRegistry) || unknownProps.push(key);
      props = unknownProps.map(function(prop) {
        return "`" + prop + "`";
      }).join(", ");
      unknownProps.length === 1 ? console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ", props, type2) : 1 < unknownProps.length && console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ", props, type2);
    }
    function camelize(string4) {
      return string4.replace(hyphenPattern, function(_4, character) {
        return character.toUpperCase();
      });
    }
    function escapeTextForBrowser(text2) {
      if (typeof text2 === "boolean" || typeof text2 === "number" || typeof text2 === "bigint")
        return "" + text2;
      checkHtmlStringCoercion(text2);
      text2 = "" + text2;
      var match = matchHtmlRegExp.exec(text2);
      if (match) {
        var html2 = "", index2, lastIndex = 0;
        for (index2 = match.index;index2 < text2.length; index2++) {
          switch (text2.charCodeAt(index2)) {
            case 34:
              match = "&quot;";
              break;
            case 38:
              match = "&amp;";
              break;
            case 39:
              match = "&#x27;";
              break;
            case 60:
              match = "&lt;";
              break;
            case 62:
              match = "&gt;";
              break;
            default:
              continue;
          }
          lastIndex !== index2 && (html2 += text2.slice(lastIndex, index2));
          lastIndex = index2 + 1;
          html2 += match;
        }
        text2 = lastIndex !== index2 ? html2 + text2.slice(lastIndex, index2) : html2;
      }
      return text2;
    }
    function sanitizeURL(url2) {
      return isJavaScriptProtocol.test("" + url2) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url2;
    }
    function escapeEntireInlineScriptContent(scriptText) {
      checkHtmlStringCoercion(scriptText);
      return ("" + scriptText).replace(scriptRegex, scriptReplacer);
    }
    function createResumableState(identifierPrefix, externalRuntimeConfig, bootstrapScriptContent, bootstrapScripts, bootstrapModules) {
      return {
        idPrefix: identifierPrefix === undefined ? "" : identifierPrefix,
        nextFormID: 0,
        streamingFormat: 0,
        bootstrapScriptContent,
        bootstrapScripts,
        bootstrapModules,
        instructions: NothingSent,
        hasBody: false,
        hasHtml: false,
        unknownResources: {},
        dnsResources: {},
        connectResources: { default: {}, anonymous: {}, credentials: {} },
        imageResources: {},
        styleResources: {},
        scriptResources: {},
        moduleUnknownResources: {},
        moduleScriptResources: {}
      };
    }
    function createFormatContext(insertionMode, selectedValue, tagScope, viewTransition) {
      return {
        insertionMode,
        selectedValue,
        tagScope,
        viewTransition
      };
    }
    function getChildFormatContext(parentContext, type2, props) {
      var subtreeScope = parentContext.tagScope & -25;
      switch (type2) {
        case "noscript":
          return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);
        case "select":
          return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, subtreeScope, null);
        case "svg":
          return createFormatContext(SVG_MODE, null, subtreeScope, null);
        case "picture":
          return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);
        case "math":
          return createFormatContext(MATHML_MODE, null, subtreeScope, null);
        case "foreignObject":
          return createFormatContext(HTML_MODE, null, subtreeScope, null);
        case "table":
          return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);
        case "thead":
        case "tbody":
        case "tfoot":
          return createFormatContext(HTML_TABLE_BODY_MODE, null, subtreeScope, null);
        case "colgroup":
          return createFormatContext(HTML_COLGROUP_MODE, null, subtreeScope, null);
        case "tr":
          return createFormatContext(HTML_TABLE_ROW_MODE, null, subtreeScope, null);
        case "head":
          if (parentContext.insertionMode < HTML_MODE)
            return createFormatContext(HTML_HEAD_MODE, null, subtreeScope, null);
          break;
        case "html":
          if (parentContext.insertionMode === ROOT_HTML_MODE)
            return createFormatContext(HTML_HTML_MODE, null, subtreeScope, null);
      }
      return parentContext.insertionMode >= HTML_TABLE_MODE || parentContext.insertionMode < HTML_MODE ? createFormatContext(HTML_MODE, null, subtreeScope, null) : parentContext.tagScope !== subtreeScope ? createFormatContext(parentContext.insertionMode, parentContext.selectedValue, subtreeScope, null) : parentContext;
    }
    function getSuspenseViewTransition(parentViewTransition) {
      return parentViewTransition === null ? null : {
        update: parentViewTransition.update,
        enter: "none",
        exit: "none",
        share: parentViewTransition.update,
        name: parentViewTransition.autoName,
        autoName: parentViewTransition.autoName,
        nameIdx: 0
      };
    }
    function getSuspenseFallbackFormatContext(resumableState, parentContext) {
      parentContext.tagScope & 32 && (resumableState.instructions |= 128);
      return createFormatContext(parentContext.insertionMode, parentContext.selectedValue, parentContext.tagScope | 12, getSuspenseViewTransition(parentContext.viewTransition));
    }
    function getSuspenseContentFormatContext(resumableState, parentContext) {
      resumableState = getSuspenseViewTransition(parentContext.viewTransition);
      var subtreeScope = parentContext.tagScope | 16;
      resumableState !== null && resumableState.share !== "none" && (subtreeScope |= 64);
      return createFormatContext(parentContext.insertionMode, parentContext.selectedValue, subtreeScope, resumableState);
    }
    function pushStyleAttribute(target, style) {
      if (typeof style !== "object")
        throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");
      var isFirst = true, styleName;
      for (styleName in style)
        if (hasOwnProperty2.call(style, styleName)) {
          var styleValue = style[styleName];
          if (styleValue != null && typeof styleValue !== "boolean" && styleValue !== "") {
            if (styleName.indexOf("--") === 0) {
              var nameChunk = escapeTextForBrowser(styleName);
              checkCSSPropertyStringCoercion(styleValue, styleName);
              styleValue = escapeTextForBrowser(("" + styleValue).trim());
            } else {
              nameChunk = styleName;
              var value = styleValue;
              if (-1 < nameChunk.indexOf("-")) {
                var name2 = nameChunk;
                warnedStyleNames.hasOwnProperty(name2) && warnedStyleNames[name2] || (warnedStyleNames[name2] = true, console.error("Unsupported style property %s. Did you mean %s?", name2, camelize(name2.replace(msPattern$1, "ms-"))));
              } else if (badVendoredStyleNamePattern.test(nameChunk))
                name2 = nameChunk, warnedStyleNames.hasOwnProperty(name2) && warnedStyleNames[name2] || (warnedStyleNames[name2] = true, console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?", name2, name2.charAt(0).toUpperCase() + name2.slice(1)));
              else if (badStyleValueWithSemicolonPattern.test(value)) {
                name2 = nameChunk;
                var value$jscomp$0 = value;
                warnedStyleValues.hasOwnProperty(value$jscomp$0) && warnedStyleValues[value$jscomp$0] || (warnedStyleValues[value$jscomp$0] = true, console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`, name2, value$jscomp$0.replace(badStyleValueWithSemicolonPattern, "")));
              }
              typeof value === "number" && (isNaN(value) ? warnedForNaNValue || (warnedForNaNValue = true, console.error("`NaN` is an invalid value for the `%s` css style property.", nameChunk)) : isFinite(value) || warnedForInfinityValue || (warnedForInfinityValue = true, console.error("`Infinity` is an invalid value for the `%s` css style property.", nameChunk)));
              nameChunk = styleName;
              value = styleNameCache.get(nameChunk);
              value !== undefined ? nameChunk = value : (value = escapeTextForBrowser(nameChunk.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern, "-ms-")), styleNameCache.set(nameChunk, value), nameChunk = value);
              typeof styleValue === "number" ? styleValue = styleValue === 0 || unitlessNumbers.has(styleName) ? "" + styleValue : styleValue + "px" : (checkCSSPropertyStringCoercion(styleValue, styleName), styleValue = escapeTextForBrowser(("" + styleValue).trim()));
            }
            isFirst ? (isFirst = false, target.push(styleAttributeStart, nameChunk, styleAssign, styleValue)) : target.push(styleSeparator, nameChunk, styleAssign, styleValue);
          }
        }
      isFirst || target.push(attributeEnd);
    }
    function pushBooleanAttribute(target, name2, value) {
      value && typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeEmptyString);
    }
    function pushStringAttribute(target, name2, value) {
      typeof value !== "function" && typeof value !== "symbol" && typeof value !== "boolean" && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
    }
    function pushAdditionalFormField(value, key) {
      this.push('<input type="hidden"');
      validateAdditionalFormField(value);
      pushStringAttribute(this, "name", key);
      pushStringAttribute(this, "value", value);
      this.push(endOfStartTagSelfClosing);
    }
    function validateAdditionalFormField(value) {
      if (typeof value !== "string")
        throw Error("File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.");
    }
    function getCustomFormFields(resumableState, formAction) {
      if (typeof formAction.$$FORM_ACTION === "function") {
        var id = resumableState.nextFormID++;
        resumableState = resumableState.idPrefix + id;
        try {
          var customFields = formAction.$$FORM_ACTION(resumableState);
          if (customFields) {
            var formData = customFields.data;
            formData != null && formData.forEach(validateAdditionalFormField);
          }
          return customFields;
        } catch (x3) {
          if (typeof x3 === "object" && x3 !== null && typeof x3.then === "function")
            throw x3;
          console.error(`Failed to serialize an action for progressive enhancement:
%s`, x3);
        }
      }
      return null;
    }
    function pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name2) {
      var formData = null;
      if (typeof formAction === "function") {
        name2 === null || didWarnFormActionName || (didWarnFormActionName = true, console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'));
        formEncType === null && formMethod === null || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."));
        formTarget === null || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."));
        var customFields = getCustomFormFields(resumableState, formAction);
        customFields !== null ? (name2 = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target, formData = customFields.data) : (target.push(attributeSeparator, "formAction", attributeAssign, actionJavaScriptURL, attributeEnd), formTarget = formMethod = formEncType = formAction = name2 = null, injectFormReplayingRuntime(resumableState, renderState));
      }
      name2 != null && pushAttribute(target, "name", name2);
      formAction != null && pushAttribute(target, "formAction", formAction);
      formEncType != null && pushAttribute(target, "formEncType", formEncType);
      formMethod != null && pushAttribute(target, "formMethod", formMethod);
      formTarget != null && pushAttribute(target, "formTarget", formTarget);
      return formData;
    }
    function pushAttribute(target, name2, value) {
      switch (name2) {
        case "className":
          pushStringAttribute(target, "class", value);
          break;
        case "tabIndex":
          pushStringAttribute(target, "tabindex", value);
          break;
        case "dir":
        case "role":
        case "viewBox":
        case "width":
        case "height":
          pushStringAttribute(target, name2, value);
          break;
        case "style":
          pushStyleAttribute(target, value);
          break;
        case "src":
        case "href":
          if (value === "") {
            name2 === "src" ? console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.', name2, name2) : console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.', name2, name2);
            break;
          }
        case "action":
        case "formAction":
          if (value == null || typeof value === "function" || typeof value === "symbol" || typeof value === "boolean")
            break;
          checkAttributeStringCoercion(value, name2);
          value = sanitizeURL("" + value);
          target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "defaultValue":
        case "defaultChecked":
        case "innerHTML":
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "ref":
          break;
        case "autoFocus":
        case "multiple":
        case "muted":
          pushBooleanAttribute(target, name2.toLowerCase(), value);
          break;
        case "xlinkHref":
          if (typeof value === "function" || typeof value === "symbol" || typeof value === "boolean")
            break;
          checkAttributeStringCoercion(value, name2);
          value = sanitizeURL("" + value);
          target.push(attributeSeparator, "xlink:href", attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "contentEditable":
        case "spellCheck":
        case "draggable":
        case "value":
        case "autoReverse":
        case "externalResourcesRequired":
        case "focusable":
        case "preserveAlpha":
          typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "inert":
          value !== "" || didWarnForNewBooleanPropsWithEmptyValue[name2] || (didWarnForNewBooleanPropsWithEmptyValue[name2] = true, console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.", name2));
        case "allowFullScreen":
        case "async":
        case "autoPlay":
        case "controls":
        case "default":
        case "defer":
        case "disabled":
        case "disablePictureInPicture":
        case "disableRemotePlayback":
        case "formNoValidate":
        case "hidden":
        case "loop":
        case "noModule":
        case "noValidate":
        case "open":
        case "playsInline":
        case "readOnly":
        case "required":
        case "reversed":
        case "scoped":
        case "seamless":
        case "itemScope":
          value && typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeEmptyString);
          break;
        case "capture":
        case "download":
          value === true ? target.push(attributeSeparator, name2, attributeEmptyString) : value !== false && typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "cols":
        case "rows":
        case "size":
        case "span":
          typeof value !== "function" && typeof value !== "symbol" && !isNaN(value) && 1 <= value && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "rowSpan":
        case "start":
          typeof value === "function" || typeof value === "symbol" || isNaN(value) || target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "xlinkActuate":
          pushStringAttribute(target, "xlink:actuate", value);
          break;
        case "xlinkArcrole":
          pushStringAttribute(target, "xlink:arcrole", value);
          break;
        case "xlinkRole":
          pushStringAttribute(target, "xlink:role", value);
          break;
        case "xlinkShow":
          pushStringAttribute(target, "xlink:show", value);
          break;
        case "xlinkTitle":
          pushStringAttribute(target, "xlink:title", value);
          break;
        case "xlinkType":
          pushStringAttribute(target, "xlink:type", value);
          break;
        case "xmlBase":
          pushStringAttribute(target, "xml:base", value);
          break;
        case "xmlLang":
          pushStringAttribute(target, "xml:lang", value);
          break;
        case "xmlSpace":
          pushStringAttribute(target, "xml:space", value);
          break;
        default:
          if (!(2 < name2.length) || name2[0] !== "o" && name2[0] !== "O" || name2[1] !== "n" && name2[1] !== "N") {
            if (name2 = aliases.get(name2) || name2, isAttributeNameSafe(name2)) {
              switch (typeof value) {
                case "function":
                case "symbol":
                  return;
                case "boolean":
                  var prefix2 = name2.toLowerCase().slice(0, 5);
                  if (prefix2 !== "data-" && prefix2 !== "aria-")
                    return;
              }
              target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
            }
          }
      }
    }
    function pushInnerHTML(target, innerHTML, children) {
      if (innerHTML != null) {
        if (children != null)
          throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
        if (typeof innerHTML !== "object" || !("__html" in innerHTML))
          throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");
        innerHTML = innerHTML.__html;
        innerHTML !== null && innerHTML !== undefined && (checkHtmlStringCoercion(innerHTML), target.push("" + innerHTML));
      }
    }
    function checkSelectProp(props, propName) {
      var value = props[propName];
      value != null && (value = isArrayImpl(value), props.multiple && !value ? console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.", propName) : !props.multiple && value && console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.", propName));
    }
    function flattenOptionChildren(children) {
      var content = "";
      React14.Children.forEach(children, function(child) {
        child != null && (content += child, didWarnInvalidOptionChildren || typeof child === "string" || typeof child === "number" || typeof child === "bigint" || (didWarnInvalidOptionChildren = true, console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")));
      });
      return content;
    }
    function injectFormReplayingRuntime(resumableState, renderState) {
      if ((resumableState.instructions & 16) === NothingSent) {
        resumableState.instructions |= 16;
        var { preamble, bootstrapChunks } = renderState;
        (preamble.htmlChunks || preamble.headChunks) && bootstrapChunks.length === 0 ? (bootstrapChunks.push(renderState.startInlineScript), pushCompletedShellIdAttribute(bootstrapChunks, resumableState), bootstrapChunks.push(endOfStartTag, formReplayingRuntimeScript, endInlineScript)) : bootstrapChunks.unshift(renderState.startInlineScript, endOfStartTag, formReplayingRuntimeScript, endInlineScript);
      }
    }
    function pushLinkImpl(target, props) {
      target.push(startChunkForTag("link"));
      for (var propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
              case "dangerouslySetInnerHTML":
                throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTagSelfClosing);
      return null;
    }
    function escapeStyleTextContent(styleText) {
      checkHtmlStringCoercion(styleText);
      return ("" + styleText).replace(styleRegex, styleReplacer);
    }
    function pushSelfClosing(target, props, tag2) {
      target.push(startChunkForTag(tag2));
      for (var propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
              case "dangerouslySetInnerHTML":
                throw Error(tag2 + " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTagSelfClosing);
      return null;
    }
    function pushTitleImpl(target, props) {
      target.push(startChunkForTag("title"));
      var children = null, innerHTML = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                children = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      props = Array.isArray(children) ? 2 > children.length ? children[0] : null : children;
      typeof props !== "function" && typeof props !== "symbol" && props !== null && props !== undefined && target.push(escapeTextForBrowser("" + props));
      pushInnerHTML(target, innerHTML, children);
      target.push(endChunkForTag("title"));
      return null;
    }
    function pushScriptImpl(target, props) {
      target.push(startChunkForTag("script"));
      var children = null, innerHTML = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                children = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      children != null && typeof children !== "string" && (props = typeof children === "number" ? "a number for children" : Array.isArray(children) ? "an array for children" : "something unexpected for children", console.error("A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.", props));
      pushInnerHTML(target, innerHTML, children);
      typeof children === "string" && target.push(escapeEntireInlineScriptContent(children));
      target.push(endChunkForTag("script"));
      return null;
    }
    function pushStartSingletonElement(target, props, tag2) {
      target.push(startChunkForTag(tag2));
      var innerHTML = tag2 = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                tag2 = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      pushInnerHTML(target, innerHTML, tag2);
      return tag2;
    }
    function pushStartGenericElement(target, props, tag2) {
      target.push(startChunkForTag(tag2));
      var innerHTML = tag2 = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                tag2 = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      pushInnerHTML(target, innerHTML, tag2);
      return typeof tag2 === "string" ? (target.push(escapeTextForBrowser(tag2)), null) : tag2;
    }
    function startChunkForTag(tag2) {
      var tagStartChunk = validatedTagCache.get(tag2);
      if (tagStartChunk === undefined) {
        if (!VALID_TAG_REGEX.test(tag2))
          throw Error("Invalid tag: " + tag2);
        tagStartChunk = "<" + tag2;
        validatedTagCache.set(tag2, tagStartChunk);
      }
      return tagStartChunk;
    }
    function pushStartInstance(target$jscomp$0, type2, props, resumableState, renderState, preambleState, hoistableState, formatContext, textEmbedded) {
      validateProperties$2(type2, props);
      type2 !== "input" && type2 !== "textarea" && type2 !== "select" || props == null || props.value !== null || didWarnValueNull || (didWarnValueNull = true, type2 === "select" && props.multiple ? console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.", type2) : console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.", type2));
      b:
        if (type2.indexOf("-") === -1)
          var JSCompiler_inline_result = false;
        else
          switch (type2) {
            case "annotation-xml":
            case "color-profile":
            case "font-face":
            case "font-face-src":
            case "font-face-uri":
            case "font-face-format":
            case "font-face-name":
            case "missing-glyph":
              JSCompiler_inline_result = false;
              break b;
            default:
              JSCompiler_inline_result = true;
          }
      JSCompiler_inline_result || typeof props.is === "string" || warnUnknownProperties(type2, props, null);
      !props.suppressContentEditableWarning && props.contentEditable && props.children != null && console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");
      formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE && type2.indexOf("-") === -1 && type2.toLowerCase() !== type2 && console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.", type2);
      switch (type2) {
        case "div":
        case "span":
        case "svg":
        case "path":
          break;
        case "a":
          target$jscomp$0.push(startChunkForTag("a"));
          var children = null, innerHTML = null, propKey;
          for (propKey in props)
            if (hasOwnProperty2.call(props, propKey)) {
              var propValue = props[propKey];
              if (propValue != null)
                switch (propKey) {
                  case "children":
                    children = propValue;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML = propValue;
                    break;
                  case "href":
                    propValue === "" ? pushStringAttribute(target$jscomp$0, "href", "") : pushAttribute(target$jscomp$0, propKey, propValue);
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey, propValue);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML, children);
          if (typeof children === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children));
            var JSCompiler_inline_result$jscomp$0 = null;
          } else
            JSCompiler_inline_result$jscomp$0 = children;
          return JSCompiler_inline_result$jscomp$0;
        case "g":
        case "p":
        case "li":
          break;
        case "select":
          checkControlledValueProps("select", props);
          checkSelectProp(props, "value");
          checkSelectProp(props, "defaultValue");
          props.value === undefined || props.defaultValue === undefined || didWarnDefaultSelectValue || (console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"), didWarnDefaultSelectValue = true);
          target$jscomp$0.push(startChunkForTag("select"));
          var children$jscomp$0 = null, innerHTML$jscomp$0 = null, propKey$jscomp$0;
          for (propKey$jscomp$0 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$0)) {
              var propValue$jscomp$0 = props[propKey$jscomp$0];
              if (propValue$jscomp$0 != null)
                switch (propKey$jscomp$0) {
                  case "children":
                    children$jscomp$0 = propValue$jscomp$0;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$0 = propValue$jscomp$0;
                    break;
                  case "defaultValue":
                  case "value":
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$0, propValue$jscomp$0);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
          return children$jscomp$0;
        case "option":
          var selectedValue = formatContext.selectedValue;
          target$jscomp$0.push(startChunkForTag("option"));
          var children$jscomp$1 = null, value = null, selected = null, innerHTML$jscomp$1 = null, propKey$jscomp$1;
          for (propKey$jscomp$1 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$1)) {
              var propValue$jscomp$1 = props[propKey$jscomp$1];
              if (propValue$jscomp$1 != null)
                switch (propKey$jscomp$1) {
                  case "children":
                    children$jscomp$1 = propValue$jscomp$1;
                    break;
                  case "selected":
                    selected = propValue$jscomp$1;
                    didWarnSelectedSetOnOption || (console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."), didWarnSelectedSetOnOption = true);
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$1 = propValue$jscomp$1;
                    break;
                  case "value":
                    value = propValue$jscomp$1;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$1, propValue$jscomp$1);
                }
            }
          if (selectedValue != null) {
            if (value !== null) {
              checkAttributeStringCoercion(value, "value");
              var stringValue = "" + value;
            } else
              innerHTML$jscomp$1 === null || didWarnInvalidOptionInnerHTML || (didWarnInvalidOptionInnerHTML = true, console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")), stringValue = flattenOptionChildren(children$jscomp$1);
            if (isArrayImpl(selectedValue))
              for (var i = 0;i < selectedValue.length; i++) {
                if (checkAttributeStringCoercion(selectedValue[i], "value"), "" + selectedValue[i] === stringValue) {
                  target$jscomp$0.push(' selected=""');
                  break;
                }
              }
            else
              checkAttributeStringCoercion(selectedValue, "select.value"), "" + selectedValue === stringValue && target$jscomp$0.push(' selected=""');
          } else
            selected && target$jscomp$0.push(' selected=""');
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);
          return children$jscomp$1;
        case "textarea":
          checkControlledValueProps("textarea", props);
          props.value === undefined || props.defaultValue === undefined || didWarnDefaultTextareaValue || (console.error("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components"), didWarnDefaultTextareaValue = true);
          target$jscomp$0.push(startChunkForTag("textarea"));
          var value$jscomp$0 = null, defaultValue = null, children$jscomp$2 = null, propKey$jscomp$2;
          for (propKey$jscomp$2 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$2)) {
              var propValue$jscomp$2 = props[propKey$jscomp$2];
              if (propValue$jscomp$2 != null)
                switch (propKey$jscomp$2) {
                  case "children":
                    children$jscomp$2 = propValue$jscomp$2;
                    break;
                  case "value":
                    value$jscomp$0 = propValue$jscomp$2;
                    break;
                  case "defaultValue":
                    defaultValue = propValue$jscomp$2;
                    break;
                  case "dangerouslySetInnerHTML":
                    throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$2, propValue$jscomp$2);
                }
            }
          value$jscomp$0 === null && defaultValue !== null && (value$jscomp$0 = defaultValue);
          target$jscomp$0.push(endOfStartTag);
          if (children$jscomp$2 != null) {
            console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");
            if (value$jscomp$0 != null)
              throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
            if (isArrayImpl(children$jscomp$2)) {
              if (1 < children$jscomp$2.length)
                throw Error("<textarea> can only have at most one child.");
              checkHtmlStringCoercion(children$jscomp$2[0]);
              value$jscomp$0 = "" + children$jscomp$2[0];
            }
            checkHtmlStringCoercion(children$jscomp$2);
            value$jscomp$0 = "" + children$jscomp$2;
          }
          typeof value$jscomp$0 === "string" && value$jscomp$0[0] === `
` && target$jscomp$0.push(leadingNewline);
          value$jscomp$0 !== null && (checkAttributeStringCoercion(value$jscomp$0, "value"), target$jscomp$0.push(escapeTextForBrowser("" + value$jscomp$0)));
          return null;
        case "input":
          checkControlledValueProps("input", props);
          target$jscomp$0.push(startChunkForTag("input"));
          var name2 = null, formAction = null, formEncType = null, formMethod = null, formTarget = null, value$jscomp$1 = null, defaultValue$jscomp$0 = null, checked = null, defaultChecked = null, propKey$jscomp$3;
          for (propKey$jscomp$3 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$3)) {
              var propValue$jscomp$3 = props[propKey$jscomp$3];
              if (propValue$jscomp$3 != null)
                switch (propKey$jscomp$3) {
                  case "children":
                  case "dangerouslySetInnerHTML":
                    throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
                  case "name":
                    name2 = propValue$jscomp$3;
                    break;
                  case "formAction":
                    formAction = propValue$jscomp$3;
                    break;
                  case "formEncType":
                    formEncType = propValue$jscomp$3;
                    break;
                  case "formMethod":
                    formMethod = propValue$jscomp$3;
                    break;
                  case "formTarget":
                    formTarget = propValue$jscomp$3;
                    break;
                  case "defaultChecked":
                    defaultChecked = propValue$jscomp$3;
                    break;
                  case "defaultValue":
                    defaultValue$jscomp$0 = propValue$jscomp$3;
                    break;
                  case "checked":
                    checked = propValue$jscomp$3;
                    break;
                  case "value":
                    value$jscomp$1 = propValue$jscomp$3;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$3, propValue$jscomp$3);
                }
            }
          formAction === null || props.type === "image" || props.type === "submit" || didWarnFormActionType || (didWarnFormActionType = true, console.error('An input can only specify a formAction along with type="submit" or type="image".'));
          var formData = pushFormActionAttribute(target$jscomp$0, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name2);
          checked === null || defaultChecked === null || didWarnDefaultChecked || (console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", "A component", props.type), didWarnDefaultChecked = true);
          value$jscomp$1 === null || defaultValue$jscomp$0 === null || didWarnDefaultInputValue || (console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", "A component", props.type), didWarnDefaultInputValue = true);
          checked !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked);
          value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
          target$jscomp$0.push(endOfStartTagSelfClosing);
          formData != null && formData.forEach(pushAdditionalFormField, target$jscomp$0);
          return null;
        case "button":
          target$jscomp$0.push(startChunkForTag("button"));
          var children$jscomp$3 = null, innerHTML$jscomp$2 = null, name$jscomp$0 = null, formAction$jscomp$0 = null, formEncType$jscomp$0 = null, formMethod$jscomp$0 = null, formTarget$jscomp$0 = null, propKey$jscomp$4;
          for (propKey$jscomp$4 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$4)) {
              var propValue$jscomp$4 = props[propKey$jscomp$4];
              if (propValue$jscomp$4 != null)
                switch (propKey$jscomp$4) {
                  case "children":
                    children$jscomp$3 = propValue$jscomp$4;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$2 = propValue$jscomp$4;
                    break;
                  case "name":
                    name$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formAction":
                    formAction$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formEncType":
                    formEncType$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formMethod":
                    formMethod$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formTarget":
                    formTarget$jscomp$0 = propValue$jscomp$4;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$4, propValue$jscomp$4);
                }
            }
          formAction$jscomp$0 === null || props.type == null || props.type === "submit" || didWarnFormActionType || (didWarnFormActionType = true, console.error('A button can only specify a formAction along with type="submit" or no type.'));
          var formData$jscomp$0 = pushFormActionAttribute(target$jscomp$0, resumableState, renderState, formAction$jscomp$0, formEncType$jscomp$0, formMethod$jscomp$0, formTarget$jscomp$0, name$jscomp$0);
          target$jscomp$0.push(endOfStartTag);
          formData$jscomp$0 != null && formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);
          if (typeof children$jscomp$3 === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));
            var JSCompiler_inline_result$jscomp$1 = null;
          } else
            JSCompiler_inline_result$jscomp$1 = children$jscomp$3;
          return JSCompiler_inline_result$jscomp$1;
        case "form":
          target$jscomp$0.push(startChunkForTag("form"));
          var children$jscomp$4 = null, innerHTML$jscomp$3 = null, formAction$jscomp$1 = null, formEncType$jscomp$1 = null, formMethod$jscomp$1 = null, formTarget$jscomp$1 = null, propKey$jscomp$5;
          for (propKey$jscomp$5 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$5)) {
              var propValue$jscomp$5 = props[propKey$jscomp$5];
              if (propValue$jscomp$5 != null)
                switch (propKey$jscomp$5) {
                  case "children":
                    children$jscomp$4 = propValue$jscomp$5;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$3 = propValue$jscomp$5;
                    break;
                  case "action":
                    formAction$jscomp$1 = propValue$jscomp$5;
                    break;
                  case "encType":
                    formEncType$jscomp$1 = propValue$jscomp$5;
                    break;
                  case "method":
                    formMethod$jscomp$1 = propValue$jscomp$5;
                    break;
                  case "target":
                    formTarget$jscomp$1 = propValue$jscomp$5;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$5, propValue$jscomp$5);
                }
            }
          var formData$jscomp$1 = null, formActionName = null;
          if (typeof formAction$jscomp$1 === "function") {
            formEncType$jscomp$1 === null && formMethod$jscomp$1 === null || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."));
            formTarget$jscomp$1 === null || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."));
            var customFields = getCustomFormFields(resumableState, formAction$jscomp$1);
            customFields !== null ? (formAction$jscomp$1 = customFields.action || "", formEncType$jscomp$1 = customFields.encType, formMethod$jscomp$1 = customFields.method, formTarget$jscomp$1 = customFields.target, formData$jscomp$1 = customFields.data, formActionName = customFields.name) : (target$jscomp$0.push(attributeSeparator, "action", attributeAssign, actionJavaScriptURL, attributeEnd), formTarget$jscomp$1 = formMethod$jscomp$1 = formEncType$jscomp$1 = formAction$jscomp$1 = null, injectFormReplayingRuntime(resumableState, renderState));
          }
          formAction$jscomp$1 != null && pushAttribute(target$jscomp$0, "action", formAction$jscomp$1);
          formEncType$jscomp$1 != null && pushAttribute(target$jscomp$0, "encType", formEncType$jscomp$1);
          formMethod$jscomp$1 != null && pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
          formTarget$jscomp$1 != null && pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
          target$jscomp$0.push(endOfStartTag);
          formActionName !== null && (target$jscomp$0.push('<input type="hidden"'), pushStringAttribute(target$jscomp$0, "name", formActionName), target$jscomp$0.push(endOfStartTagSelfClosing), formData$jscomp$1 != null && formData$jscomp$1.forEach(pushAdditionalFormField, target$jscomp$0));
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);
          if (typeof children$jscomp$4 === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));
            var JSCompiler_inline_result$jscomp$2 = null;
          } else
            JSCompiler_inline_result$jscomp$2 = children$jscomp$4;
          return JSCompiler_inline_result$jscomp$2;
        case "menuitem":
          target$jscomp$0.push(startChunkForTag("menuitem"));
          for (var propKey$jscomp$6 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$6)) {
              var propValue$jscomp$6 = props[propKey$jscomp$6];
              if (propValue$jscomp$6 != null)
                switch (propKey$jscomp$6) {
                  case "children":
                  case "dangerouslySetInnerHTML":
                    throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$6, propValue$jscomp$6);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          return null;
        case "object":
          target$jscomp$0.push(startChunkForTag("object"));
          var children$jscomp$5 = null, innerHTML$jscomp$4 = null, propKey$jscomp$7;
          for (propKey$jscomp$7 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$7)) {
              var propValue$jscomp$7 = props[propKey$jscomp$7];
              if (propValue$jscomp$7 != null)
                switch (propKey$jscomp$7) {
                  case "children":
                    children$jscomp$5 = propValue$jscomp$7;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$4 = propValue$jscomp$7;
                    break;
                  case "data":
                    checkAttributeStringCoercion(propValue$jscomp$7, "data");
                    var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
                    if (sanitizedValue === "") {
                      console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.', propKey$jscomp$7, propKey$jscomp$7);
                      break;
                    }
                    target$jscomp$0.push(attributeSeparator, "data", attributeAssign, escapeTextForBrowser(sanitizedValue), attributeEnd);
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$7, propValue$jscomp$7);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
          if (typeof children$jscomp$5 === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));
            var JSCompiler_inline_result$jscomp$3 = null;
          } else
            JSCompiler_inline_result$jscomp$3 = children$jscomp$5;
          return JSCompiler_inline_result$jscomp$3;
        case "title":
          var noscriptTagInScope = formatContext.tagScope & 1, isFallback = formatContext.tagScope & 4;
          if (hasOwnProperty2.call(props, "children")) {
            var children$jscomp$6 = props.children, child = Array.isArray(children$jscomp$6) ? 2 > children$jscomp$6.length ? children$jscomp$6[0] : null : children$jscomp$6;
            Array.isArray(children$jscomp$6) && 1 < children$jscomp$6.length ? console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.", children$jscomp$6.length) : typeof child === "function" || typeof child === "symbol" ? console.error("React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.", typeof child === "function" ? "a Function" : "a Sybmol") : child && child.toString === {}.toString && (child.$$typeof != null ? console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.") : console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>."));
          }
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null)
            var JSCompiler_inline_result$jscomp$4 = pushTitleImpl(target$jscomp$0, props);
          else
            isFallback ? JSCompiler_inline_result$jscomp$4 = null : (pushTitleImpl(renderState.hoistableChunks, props), JSCompiler_inline_result$jscomp$4 = undefined);
          return JSCompiler_inline_result$jscomp$4;
        case "link":
          var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1, isFallback$jscomp$0 = formatContext.tagScope & 4, rel = props.rel, href = props.href, precedence = props.precedence;
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$0 || props.itemProp != null || typeof rel !== "string" || typeof href !== "string" || href === "") {
            rel === "stylesheet" && typeof props.precedence === "string" && (typeof href === "string" && href || console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', href === null ? "`null`" : href === undefined ? "`undefined`" : href === "" ? "an empty string" : 'something with type "' + typeof href + '"'));
            pushLinkImpl(target$jscomp$0, props);
            var JSCompiler_inline_result$jscomp$5 = null;
          } else if (props.rel === "stylesheet")
            if (typeof precedence !== "string" || props.disabled != null || props.onLoad || props.onError) {
              if (typeof precedence === "string") {
                if (props.disabled != null)
                  console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.');
                else if (props.onLoad || props.onError) {
                  var propDescription = props.onLoad && props.onError ? "`onLoad` and `onError` props" : props.onLoad ? "`onLoad` prop" : "`onError` prop";
                  console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription);
                }
              }
              JSCompiler_inline_result$jscomp$5 = pushLinkImpl(target$jscomp$0, props);
            } else {
              var styleQueue = renderState.styles.get(precedence), resourceState = resumableState.styleResources.hasOwnProperty(href) ? resumableState.styleResources[href] : undefined;
              if (resourceState !== EXISTS) {
                resumableState.styleResources[href] = EXISTS;
                styleQueue || (styleQueue = {
                  precedence: escapeTextForBrowser(precedence),
                  rules: [],
                  hrefs: [],
                  sheets: new Map
                }, renderState.styles.set(precedence, styleQueue));
                var resource = {
                  state: PENDING$1,
                  props: assign({}, props, {
                    "data-precedence": props.precedence,
                    precedence: null
                  })
                };
                if (resourceState) {
                  resourceState.length === 2 && adoptPreloadCredentials(resource.props, resourceState);
                  var preloadResource = renderState.preloads.stylesheets.get(href);
                  preloadResource && 0 < preloadResource.length ? preloadResource.length = 0 : resource.state = PRELOADED;
                }
                styleQueue.sheets.set(href, resource);
                hoistableState && hoistableState.stylesheets.add(resource);
              } else if (styleQueue) {
                var _resource = styleQueue.sheets.get(href);
                _resource && hoistableState && hoistableState.stylesheets.add(_resource);
              }
              textEmbedded && target$jscomp$0.push("<!-- -->");
              JSCompiler_inline_result$jscomp$5 = null;
            }
          else
            props.onLoad || props.onError ? JSCompiler_inline_result$jscomp$5 = pushLinkImpl(target$jscomp$0, props) : (textEmbedded && target$jscomp$0.push("<!-- -->"), JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0 ? null : pushLinkImpl(renderState.hoistableChunks, props));
          return JSCompiler_inline_result$jscomp$5;
        case "script":
          var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1, asyncProp = props.async;
          if (typeof props.src !== "string" || !props.src || !asyncProp || typeof asyncProp === "function" || typeof asyncProp === "symbol" || props.onLoad || props.onError || formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$1 || props.itemProp != null)
            var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(target$jscomp$0, props);
          else {
            var key = props.src;
            if (props.type === "module") {
              var resources = resumableState.moduleScriptResources;
              var preloads = renderState.preloads.moduleScripts;
            } else
              resources = resumableState.scriptResources, preloads = renderState.preloads.scripts;
            var resourceState$jscomp$0 = resources.hasOwnProperty(key) ? resources[key] : undefined;
            if (resourceState$jscomp$0 !== EXISTS) {
              resources[key] = EXISTS;
              var scriptProps = props;
              if (resourceState$jscomp$0) {
                resourceState$jscomp$0.length === 2 && (scriptProps = assign({}, props), adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));
                var preloadResource$jscomp$0 = preloads.get(key);
                preloadResource$jscomp$0 && (preloadResource$jscomp$0.length = 0);
              }
              var resource$jscomp$0 = [];
              renderState.scripts.add(resource$jscomp$0);
              pushScriptImpl(resource$jscomp$0, scriptProps);
            }
            textEmbedded && target$jscomp$0.push("<!-- -->");
            JSCompiler_inline_result$jscomp$6 = null;
          }
          return JSCompiler_inline_result$jscomp$6;
        case "style":
          var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;
          if (hasOwnProperty2.call(props, "children")) {
            var children$jscomp$7 = props.children, child$jscomp$0 = Array.isArray(children$jscomp$7) ? 2 > children$jscomp$7.length ? children$jscomp$7[0] : null : children$jscomp$7;
            (typeof child$jscomp$0 === "function" || typeof child$jscomp$0 === "symbol" || Array.isArray(child$jscomp$0)) && console.error("React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.", typeof child$jscomp$0 === "function" ? "a Function" : typeof child$jscomp$0 === "symbol" ? "a Sybmol" : "an Array");
          }
          var { precedence: precedence$jscomp$0, href: href$jscomp$0, nonce } = props;
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$2 || props.itemProp != null || typeof precedence$jscomp$0 !== "string" || typeof href$jscomp$0 !== "string" || href$jscomp$0 === "") {
            target$jscomp$0.push(startChunkForTag("style"));
            var children$jscomp$8 = null, innerHTML$jscomp$5 = null, propKey$jscomp$8;
            for (propKey$jscomp$8 in props)
              if (hasOwnProperty2.call(props, propKey$jscomp$8)) {
                var propValue$jscomp$8 = props[propKey$jscomp$8];
                if (propValue$jscomp$8 != null)
                  switch (propKey$jscomp$8) {
                    case "children":
                      children$jscomp$8 = propValue$jscomp$8;
                      break;
                    case "dangerouslySetInnerHTML":
                      innerHTML$jscomp$5 = propValue$jscomp$8;
                      break;
                    default:
                      pushAttribute(target$jscomp$0, propKey$jscomp$8, propValue$jscomp$8);
                  }
              }
            target$jscomp$0.push(endOfStartTag);
            var child$jscomp$1 = Array.isArray(children$jscomp$8) ? 2 > children$jscomp$8.length ? children$jscomp$8[0] : null : children$jscomp$8;
            typeof child$jscomp$1 !== "function" && typeof child$jscomp$1 !== "symbol" && child$jscomp$1 !== null && child$jscomp$1 !== undefined && target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1));
            pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$8);
            target$jscomp$0.push(endChunkForTag("style"));
            var JSCompiler_inline_result$jscomp$7 = null;
          } else {
            href$jscomp$0.includes(" ") && console.error('React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is "%s".', href$jscomp$0);
            var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0), resourceState$jscomp$1 = resumableState.styleResources.hasOwnProperty(href$jscomp$0) ? resumableState.styleResources[href$jscomp$0] : undefined;
            if (resourceState$jscomp$1 !== EXISTS) {
              resumableState.styleResources[href$jscomp$0] = EXISTS;
              resourceState$jscomp$1 && console.error('React encountered a hoistable style tag for the same href as a preload: "%s". When using a style tag to inline styles you should not also preload it as a stylsheet.', href$jscomp$0);
              styleQueue$jscomp$0 || (styleQueue$jscomp$0 = {
                precedence: escapeTextForBrowser(precedence$jscomp$0),
                rules: [],
                hrefs: [],
                sheets: new Map
              }, renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
              var nonceStyle = renderState.nonce.style;
              if (nonceStyle && nonceStyle !== nonce)
                console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce "%s" that was included with this render.', precedence$jscomp$0, nonce, nonceStyle);
              else {
                !nonceStyle && nonce && console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.', precedence$jscomp$0, nonce);
                styleQueue$jscomp$0.hrefs.push(escapeTextForBrowser(href$jscomp$0));
                var target = styleQueue$jscomp$0.rules, children$jscomp$9 = null, innerHTML$jscomp$6 = null, propKey$jscomp$9;
                for (propKey$jscomp$9 in props)
                  if (hasOwnProperty2.call(props, propKey$jscomp$9)) {
                    var propValue$jscomp$9 = props[propKey$jscomp$9];
                    if (propValue$jscomp$9 != null)
                      switch (propKey$jscomp$9) {
                        case "children":
                          children$jscomp$9 = propValue$jscomp$9;
                          break;
                        case "dangerouslySetInnerHTML":
                          innerHTML$jscomp$6 = propValue$jscomp$9;
                      }
                  }
                var child$jscomp$2 = Array.isArray(children$jscomp$9) ? 2 > children$jscomp$9.length ? children$jscomp$9[0] : null : children$jscomp$9;
                typeof child$jscomp$2 !== "function" && typeof child$jscomp$2 !== "symbol" && child$jscomp$2 !== null && child$jscomp$2 !== undefined && target.push(escapeStyleTextContent(child$jscomp$2));
                pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);
              }
            }
            styleQueue$jscomp$0 && hoistableState && hoistableState.styles.add(styleQueue$jscomp$0);
            textEmbedded && target$jscomp$0.push("<!-- -->");
            JSCompiler_inline_result$jscomp$7 = undefined;
          }
          return JSCompiler_inline_result$jscomp$7;
        case "meta":
          var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1, isFallback$jscomp$1 = formatContext.tagScope & 4;
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$3 || props.itemProp != null)
            var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(target$jscomp$0, props, "meta");
          else
            textEmbedded && target$jscomp$0.push("<!-- -->"), JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1 ? null : typeof props.charSet === "string" ? pushSelfClosing(renderState.charsetChunks, props, "meta") : props.name === "viewport" ? pushSelfClosing(renderState.viewportChunks, props, "meta") : pushSelfClosing(renderState.hoistableChunks, props, "meta");
          return JSCompiler_inline_result$jscomp$8;
        case "listing":
        case "pre":
          target$jscomp$0.push(startChunkForTag(type2));
          var children$jscomp$10 = null, innerHTML$jscomp$7 = null, propKey$jscomp$10;
          for (propKey$jscomp$10 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$10)) {
              var propValue$jscomp$10 = props[propKey$jscomp$10];
              if (propValue$jscomp$10 != null)
                switch (propKey$jscomp$10) {
                  case "children":
                    children$jscomp$10 = propValue$jscomp$10;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$7 = propValue$jscomp$10;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$10, propValue$jscomp$10);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          if (innerHTML$jscomp$7 != null) {
            if (children$jscomp$10 != null)
              throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
            if (typeof innerHTML$jscomp$7 !== "object" || !("__html" in innerHTML$jscomp$7))
              throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");
            var html2 = innerHTML$jscomp$7.__html;
            html2 !== null && html2 !== undefined && (typeof html2 === "string" && 0 < html2.length && html2[0] === `
` ? target$jscomp$0.push(leadingNewline, html2) : (checkHtmlStringCoercion(html2), target$jscomp$0.push("" + html2)));
          }
          typeof children$jscomp$10 === "string" && children$jscomp$10[0] === `
` && target$jscomp$0.push(leadingNewline);
          return children$jscomp$10;
        case "img":
          var pictureOrNoScriptTagInScope = formatContext.tagScope & 3, src = props.src, srcSet = props.srcSet;
          if (!(props.loading === "lazy" || !src && !srcSet || typeof src !== "string" && src != null || typeof srcSet !== "string" && srcSet != null || props.fetchPriority === "low" || pictureOrNoScriptTagInScope) && (typeof src !== "string" || src[4] !== ":" || src[0] !== "d" && src[0] !== "D" || src[1] !== "a" && src[1] !== "A" || src[2] !== "t" && src[2] !== "T" || src[3] !== "a" && src[3] !== "A") && (typeof srcSet !== "string" || srcSet[4] !== ":" || srcSet[0] !== "d" && srcSet[0] !== "D" || srcSet[1] !== "a" && srcSet[1] !== "A" || srcSet[2] !== "t" && srcSet[2] !== "T" || srcSet[3] !== "a" && srcSet[3] !== "A")) {
            hoistableState !== null && formatContext.tagScope & 64 && (hoistableState.suspenseyImages = true);
            var sizes = typeof props.sizes === "string" ? props.sizes : undefined, key$jscomp$0 = srcSet ? srcSet + `
` + (sizes || "") : src, promotablePreloads = renderState.preloads.images, resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);
            if (resource$jscomp$1) {
              if (props.fetchPriority === "high" || 10 > renderState.highImagePreloads.size)
                promotablePreloads.delete(key$jscomp$0), renderState.highImagePreloads.add(resource$jscomp$1);
            } else if (!resumableState.imageResources.hasOwnProperty(key$jscomp$0)) {
              resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
              var input = props.crossOrigin;
              var crossOrigin = typeof input === "string" ? input === "use-credentials" ? input : "" : undefined;
              var headers = renderState.headers, header;
              headers && 0 < headers.remainingCapacity && typeof props.srcSet !== "string" && (props.fetchPriority === "high" || 500 > headers.highImagePreloads.length) && (header = getPreloadAsHeader(src, "image", {
                imageSrcSet: props.srcSet,
                imageSizes: props.sizes,
                crossOrigin,
                integrity: props.integrity,
                nonce: props.nonce,
                type: props.type,
                fetchPriority: props.fetchPriority,
                referrerPolicy: props.refererPolicy
              }), 0 <= (headers.remainingCapacity -= header.length + 2)) ? (renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS, headers.highImagePreloads && (headers.highImagePreloads += ", "), headers.highImagePreloads += header) : (resource$jscomp$1 = [], pushLinkImpl(resource$jscomp$1, {
                rel: "preload",
                as: "image",
                href: srcSet ? undefined : src,
                imageSrcSet: srcSet,
                imageSizes: sizes,
                crossOrigin,
                integrity: props.integrity,
                type: props.type,
                fetchPriority: props.fetchPriority,
                referrerPolicy: props.referrerPolicy
              }), props.fetchPriority === "high" || 10 > renderState.highImagePreloads.size ? renderState.highImagePreloads.add(resource$jscomp$1) : (renderState.bulkPreloads.add(resource$jscomp$1), promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
            }
          }
          return pushSelfClosing(target$jscomp$0, props, "img");
        case "base":
        case "area":
        case "br":
        case "col":
        case "embed":
        case "hr":
        case "keygen":
        case "param":
        case "source":
        case "track":
        case "wbr":
          return pushSelfClosing(target$jscomp$0, props, type2);
        case "annotation-xml":
        case "color-profile":
        case "font-face":
        case "font-face-src":
        case "font-face-uri":
        case "font-face-format":
        case "font-face-name":
        case "missing-glyph":
          break;
        case "head":
          if (formatContext.insertionMode < HTML_MODE) {
            var preamble = preambleState || renderState.preamble;
            if (preamble.headChunks)
              throw Error("The `<head>` tag may only be rendered once.");
            preambleState !== null && target$jscomp$0.push("<!--head-->");
            preamble.headChunks = [];
            var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(preamble.headChunks, props, "head");
          } else
            JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(target$jscomp$0, props, "head");
          return JSCompiler_inline_result$jscomp$9;
        case "body":
          if (formatContext.insertionMode < HTML_MODE) {
            var preamble$jscomp$0 = preambleState || renderState.preamble;
            if (preamble$jscomp$0.bodyChunks)
              throw Error("The `<body>` tag may only be rendered once.");
            preambleState !== null && target$jscomp$0.push("<!--body-->");
            preamble$jscomp$0.bodyChunks = [];
            var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(preamble$jscomp$0.bodyChunks, props, "body");
          } else
            JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(target$jscomp$0, props, "body");
          return JSCompiler_inline_result$jscomp$10;
        case "html":
          if (formatContext.insertionMode === ROOT_HTML_MODE) {
            var preamble$jscomp$1 = preambleState || renderState.preamble;
            if (preamble$jscomp$1.htmlChunks)
              throw Error("The `<html>` tag may only be rendered once.");
            preambleState !== null && target$jscomp$0.push("<!--html-->");
            preamble$jscomp$1.htmlChunks = [doctypeChunk];
            var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(preamble$jscomp$1.htmlChunks, props, "html");
          } else
            JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(target$jscomp$0, props, "html");
          return JSCompiler_inline_result$jscomp$11;
        default:
          if (type2.indexOf("-") !== -1) {
            target$jscomp$0.push(startChunkForTag(type2));
            var children$jscomp$11 = null, innerHTML$jscomp$8 = null, propKey$jscomp$11;
            for (propKey$jscomp$11 in props)
              if (hasOwnProperty2.call(props, propKey$jscomp$11)) {
                var propValue$jscomp$11 = props[propKey$jscomp$11];
                if (propValue$jscomp$11 != null) {
                  var attributeName = propKey$jscomp$11;
                  switch (propKey$jscomp$11) {
                    case "children":
                      children$jscomp$11 = propValue$jscomp$11;
                      break;
                    case "dangerouslySetInnerHTML":
                      innerHTML$jscomp$8 = propValue$jscomp$11;
                      break;
                    case "style":
                      pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
                      break;
                    case "suppressContentEditableWarning":
                    case "suppressHydrationWarning":
                    case "ref":
                      break;
                    case "className":
                      attributeName = "class";
                    default:
                      if (isAttributeNameSafe(propKey$jscomp$11) && typeof propValue$jscomp$11 !== "function" && typeof propValue$jscomp$11 !== "symbol" && propValue$jscomp$11 !== false) {
                        if (propValue$jscomp$11 === true)
                          propValue$jscomp$11 = "";
                        else if (typeof propValue$jscomp$11 === "object")
                          continue;
                        target$jscomp$0.push(attributeSeparator, attributeName, attributeAssign, escapeTextForBrowser(propValue$jscomp$11), attributeEnd);
                      }
                  }
                }
              }
            target$jscomp$0.push(endOfStartTag);
            pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$11);
            return children$jscomp$11;
          }
      }
      return pushStartGenericElement(target$jscomp$0, props, type2);
    }
    function endChunkForTag(tag2) {
      var chunk = endTagCache.get(tag2);
      chunk === undefined && (chunk = "</" + tag2 + ">", endTagCache.set(tag2, chunk));
      return chunk;
    }
    function hoistPreambleState(renderState, preambleState) {
      renderState = renderState.preamble;
      renderState.htmlChunks === null && preambleState.htmlChunks && (renderState.htmlChunks = preambleState.htmlChunks);
      renderState.headChunks === null && preambleState.headChunks && (renderState.headChunks = preambleState.headChunks);
      renderState.bodyChunks === null && preambleState.bodyChunks && (renderState.bodyChunks = preambleState.bodyChunks);
    }
    function writeBootstrap(destination, renderState) {
      renderState = renderState.bootstrapChunks;
      for (var i = 0;i < renderState.length - 1; i++)
        destination.push(renderState[i]);
      return i < renderState.length ? (i = renderState[i], renderState.length = 0, destination.push(i)) : true;
    }
    function writeStartPendingSuspenseBoundary(destination, renderState, id) {
      destination.push(startPendingSuspenseBoundary1);
      if (id === null)
        throw Error("An ID must have been assigned before we can complete the boundary.");
      destination.push(renderState.boundaryPrefix);
      renderState = id.toString(16);
      destination.push(renderState);
      return destination.push(startPendingSuspenseBoundary2);
    }
    function writeStartSegment(destination, renderState, formatContext, id) {
      switch (formatContext.insertionMode) {
        case ROOT_HTML_MODE:
        case HTML_HTML_MODE:
        case HTML_HEAD_MODE:
        case HTML_MODE:
          return destination.push(startSegmentHTML), destination.push(renderState.segmentPrefix), renderState = id.toString(16), destination.push(renderState), destination.push(startSegmentHTML2);
        case SVG_MODE:
          return destination.push(startSegmentSVG), destination.push(renderState.segmentPrefix), renderState = id.toString(16), destination.push(renderState), destination.push(startSegmentSVG2);
        case MATHML_MODE:
          return destination.push(startSegmentMathML), destination.push(renderState.segmentPrefix), renderState = id.toString(16), destination.push(renderState), destination.push(startSegmentMathML2);
        case HTML_TABLE_MODE:
          return destination.push(startSegmentTable), destination.push(renderState.segmentPrefix), renderState = id.toString(16), destination.push(renderState), destination.push(startSegmentTable2);
        case HTML_TABLE_BODY_MODE:
          return destination.push(startSegmentTableBody), destination.push(renderState.segmentPrefix), renderState = id.toString(16), destination.push(renderState), destination.push(startSegmentTableBody2);
        case HTML_TABLE_ROW_MODE:
          return destination.push(startSegmentTableRow), destination.push(renderState.segmentPrefix), renderState = id.toString(16), destination.push(renderState), destination.push(startSegmentTableRow2);
        case HTML_COLGROUP_MODE:
          return destination.push(startSegmentColGroup), destination.push(renderState.segmentPrefix), renderState = id.toString(16), destination.push(renderState), destination.push(startSegmentColGroup2);
        default:
          throw Error("Unknown insertion mode. This is a bug in React.");
      }
    }
    function writeEndSegment(destination, formatContext) {
      switch (formatContext.insertionMode) {
        case ROOT_HTML_MODE:
        case HTML_HTML_MODE:
        case HTML_HEAD_MODE:
        case HTML_MODE:
          return destination.push(endSegmentHTML);
        case SVG_MODE:
          return destination.push(endSegmentSVG);
        case MATHML_MODE:
          return destination.push(endSegmentMathML);
        case HTML_TABLE_MODE:
          return destination.push(endSegmentTable);
        case HTML_TABLE_BODY_MODE:
          return destination.push(endSegmentTableBody);
        case HTML_TABLE_ROW_MODE:
          return destination.push(endSegmentTableRow);
        case HTML_COLGROUP_MODE:
          return destination.push(endSegmentColGroup);
        default:
          throw Error("Unknown insertion mode. This is a bug in React.");
      }
    }
    function escapeJSStringsForInstructionScripts(input) {
      return JSON.stringify(input).replace(regexForJSStringsInInstructionScripts, function(match) {
        switch (match) {
          case "<":
            return "\\u003c";
          case "\u2028":
            return "\\u2028";
          case "\u2029":
            return "\\u2029";
          default:
            throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
        }
      });
    }
    function escapeJSObjectForInstructionScripts(input) {
      return JSON.stringify(input).replace(regexForJSStringsInScripts, function(match) {
        switch (match) {
          case "&":
            return "\\u0026";
          case ">":
            return "\\u003e";
          case "<":
            return "\\u003c";
          case "\u2028":
            return "\\u2028";
          case "\u2029":
            return "\\u2029";
          default:
            throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
        }
      });
    }
    function flushStyleTagsLateForBoundary(styleQueue) {
      var { rules, hrefs } = styleQueue;
      0 < rules.length && hrefs.length === 0 && console.error("React expected to have at least one href for an a hoistable style but found none. This is a bug in React.");
      var i = 0;
      if (hrefs.length) {
        this.push(currentlyFlushingRenderState.startInlineStyle);
        this.push(lateStyleTagResourceOpen1);
        this.push(styleQueue.precedence);
        for (this.push(lateStyleTagResourceOpen2);i < hrefs.length - 1; i++)
          this.push(hrefs[i]), this.push(spaceSeparator);
        this.push(hrefs[i]);
        this.push(lateStyleTagResourceOpen3);
        for (i = 0;i < rules.length; i++)
          this.push(rules[i]);
        destinationHasCapacity = this.push(lateStyleTagTemplateClose);
        currentlyRenderingBoundaryHasStylesToHoist = true;
        rules.length = 0;
        hrefs.length = 0;
      }
    }
    function hasStylesToHoist(stylesheet) {
      return stylesheet.state !== PREAMBLE ? currentlyRenderingBoundaryHasStylesToHoist = true : false;
    }
    function writeHoistablesForBoundary(destination, hoistableState, renderState) {
      currentlyRenderingBoundaryHasStylesToHoist = false;
      destinationHasCapacity = true;
      currentlyFlushingRenderState = renderState;
      hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
      currentlyFlushingRenderState = null;
      hoistableState.stylesheets.forEach(hasStylesToHoist);
      currentlyRenderingBoundaryHasStylesToHoist && (renderState.stylesToHoist = true);
      return destinationHasCapacity;
    }
    function flushResource(resource) {
      for (var i = 0;i < resource.length; i++)
        this.push(resource[i]);
      resource.length = 0;
    }
    function flushStyleInPreamble(stylesheet) {
      pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);
      for (var i = 0;i < stylesheetFlushingQueue.length; i++)
        this.push(stylesheetFlushingQueue[i]);
      stylesheetFlushingQueue.length = 0;
      stylesheet.state = PREAMBLE;
    }
    function flushStylesInPreamble(styleQueue) {
      var hasStylesheets = 0 < styleQueue.sheets.size;
      styleQueue.sheets.forEach(flushStyleInPreamble, this);
      styleQueue.sheets.clear();
      var { rules, hrefs } = styleQueue;
      if (!hasStylesheets || hrefs.length) {
        this.push(currentlyFlushingRenderState.startInlineStyle);
        this.push(styleTagResourceOpen1);
        this.push(styleQueue.precedence);
        styleQueue = 0;
        if (hrefs.length) {
          for (this.push(styleTagResourceOpen2);styleQueue < hrefs.length - 1; styleQueue++)
            this.push(hrefs[styleQueue]), this.push(spaceSeparator);
          this.push(hrefs[styleQueue]);
        }
        this.push(styleTagResourceOpen3);
        for (styleQueue = 0;styleQueue < rules.length; styleQueue++)
          this.push(rules[styleQueue]);
        this.push(styleTagResourceClose);
        rules.length = 0;
        hrefs.length = 0;
      }
    }
    function preloadLateStyle(stylesheet) {
      if (stylesheet.state === PENDING$1) {
        stylesheet.state = PRELOADED;
        var props = stylesheet.props;
        pushLinkImpl(stylesheetFlushingQueue, {
          rel: "preload",
          as: "style",
          href: stylesheet.props.href,
          crossOrigin: props.crossOrigin,
          fetchPriority: props.fetchPriority,
          integrity: props.integrity,
          media: props.media,
          hrefLang: props.hrefLang,
          referrerPolicy: props.referrerPolicy
        });
        for (stylesheet = 0;stylesheet < stylesheetFlushingQueue.length; stylesheet++)
          this.push(stylesheetFlushingQueue[stylesheet]);
        stylesheetFlushingQueue.length = 0;
      }
    }
    function preloadLateStyles(styleQueue) {
      styleQueue.sheets.forEach(preloadLateStyle, this);
      styleQueue.sheets.clear();
    }
    function pushCompletedShellIdAttribute(target, resumableState) {
      (resumableState.instructions & SentCompletedShellId) === NothingSent && (resumableState.instructions |= SentCompletedShellId, target.push(completedShellIdAttributeStart, escapeTextForBrowser("_" + resumableState.idPrefix + "R_"), attributeEnd));
    }
    function writeStyleResourceDependenciesInJS(destination, hoistableState) {
      destination.push(arrayFirstOpenBracket);
      var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
      hoistableState.stylesheets.forEach(function(resource) {
        if (resource.state !== PREAMBLE)
          if (resource.state === LATE)
            destination.push(nextArrayOpenBrackChunk), resource = resource.props.href, checkAttributeStringCoercion(resource, "href"), resource = escapeJSObjectForInstructionScripts("" + resource), destination.push(resource), destination.push(arrayCloseBracket), nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
          else {
            destination.push(nextArrayOpenBrackChunk);
            var precedence = resource.props["data-precedence"], props = resource.props, coercedHref = sanitizeURL("" + resource.props.href);
            coercedHref = escapeJSObjectForInstructionScripts(coercedHref);
            destination.push(coercedHref);
            checkAttributeStringCoercion(precedence, "precedence");
            precedence = "" + precedence;
            destination.push(arrayInterstitial);
            precedence = escapeJSObjectForInstructionScripts(precedence);
            destination.push(precedence);
            for (var propKey in props)
              if (hasOwnProperty2.call(props, propKey) && (precedence = props[propKey], precedence != null))
                switch (propKey) {
                  case "href":
                  case "rel":
                  case "precedence":
                  case "data-precedence":
                    break;
                  case "children":
                  case "dangerouslySetInnerHTML":
                    throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
                  default:
                    writeStyleResourceAttributeInJS(destination, propKey, precedence);
                }
            destination.push(arrayCloseBracket);
            nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
            resource.state = LATE;
          }
      });
      destination.push(arrayCloseBracket);
    }
    function writeStyleResourceAttributeInJS(destination, name2, value) {
      var attributeName = name2.toLowerCase();
      switch (typeof value) {
        case "function":
        case "symbol":
          return;
      }
      switch (name2) {
        case "innerHTML":
        case "dangerouslySetInnerHTML":
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "style":
        case "ref":
          return;
        case "className":
          attributeName = "class";
          checkAttributeStringCoercion(value, attributeName);
          name2 = "" + value;
          break;
        case "hidden":
          if (value === false)
            return;
          name2 = "";
          break;
        case "src":
        case "href":
          value = sanitizeURL(value);
          checkAttributeStringCoercion(value, attributeName);
          name2 = "" + value;
          break;
        default:
          if (2 < name2.length && (name2[0] === "o" || name2[0] === "O") && (name2[1] === "n" || name2[1] === "N") || !isAttributeNameSafe(name2))
            return;
          checkAttributeStringCoercion(value, attributeName);
          name2 = "" + value;
      }
      destination.push(arrayInterstitial);
      attributeName = escapeJSObjectForInstructionScripts(attributeName);
      destination.push(attributeName);
      destination.push(arrayInterstitial);
      attributeName = escapeJSObjectForInstructionScripts(name2);
      destination.push(attributeName);
    }
    function createHoistableState() {
      return { styles: new Set, stylesheets: new Set, suspenseyImages: false };
    }
    function preloadBootstrapScriptOrModule(resumableState, renderState, href, props) {
      (resumableState.scriptResources.hasOwnProperty(href) || resumableState.moduleScriptResources.hasOwnProperty(href)) && console.error('Internal React Error: React expected bootstrap script or module with src "%s" to not have been preloaded already. please file an issue', href);
      resumableState.scriptResources[href] = EXISTS;
      resumableState.moduleScriptResources[href] = EXISTS;
      resumableState = [];
      pushLinkImpl(resumableState, props);
      renderState.bootstrapScripts.add(resumableState);
    }
    function adoptPreloadCredentials(target, preloadState) {
      target.crossOrigin == null && (target.crossOrigin = preloadState[0]);
      target.integrity == null && (target.integrity = preloadState[1]);
    }
    function getPreloadAsHeader(href, as2, params) {
      href = escapeHrefForLinkHeaderURLContext(href);
      as2 = escapeStringForLinkHeaderQuotedParamValueContext(as2, "as");
      as2 = "<" + href + '>; rel=preload; as="' + as2 + '"';
      for (var paramName in params)
        hasOwnProperty2.call(params, paramName) && (href = params[paramName], typeof href === "string" && (as2 += "; " + paramName.toLowerCase() + '="' + escapeStringForLinkHeaderQuotedParamValueContext(href, paramName) + '"'));
      return as2;
    }
    function escapeHrefForLinkHeaderURLContext(hrefInput) {
      checkAttributeStringCoercion(hrefInput, "href");
      return ("" + hrefInput).replace(regexForHrefInLinkHeaderURLContext, escapeHrefForLinkHeaderURLContextReplacer);
    }
    function escapeHrefForLinkHeaderURLContextReplacer(match) {
      switch (match) {
        case "<":
          return "%3C";
        case ">":
          return "%3E";
        case `
`:
          return "%0A";
        case "\r":
          return "%0D";
        default:
          throw Error("escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
      }
    }
    function escapeStringForLinkHeaderQuotedParamValueContext(value, name2) {
      willCoercionThrow(value) && (console.error("The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.", name2, typeName(value)), testStringCoercion(value));
      return ("" + value).replace(regexForLinkHeaderQuotedParamValueContext, escapeStringForLinkHeaderQuotedParamValueContextReplacer);
    }
    function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {
      switch (match) {
        case '"':
          return "%22";
        case "'":
          return "%27";
        case ";":
          return "%3B";
        case ",":
          return "%2C";
        case `
`:
          return "%0A";
        case "\r":
          return "%0D";
        default:
          throw Error("escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
      }
    }
    function hoistStyleQueueDependency(styleQueue) {
      this.styles.add(styleQueue);
    }
    function hoistStylesheetDependency(stylesheet) {
      this.stylesheets.add(stylesheet);
    }
    function hoistHoistables(parentState, childState) {
      childState.styles.forEach(hoistStyleQueueDependency, parentState);
      childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
      childState.suspenseyImages && (parentState.suspenseyImages = true);
    }
    function createRenderState(resumableState, generateStaticMarkup) {
      var idPrefix = resumableState.idPrefix, bootstrapChunks = [], bootstrapScriptContent = resumableState.bootstrapScriptContent, bootstrapScripts = resumableState.bootstrapScripts, bootstrapModules = resumableState.bootstrapModules;
      bootstrapScriptContent !== undefined && (bootstrapChunks.push("<script"), pushCompletedShellIdAttribute(bootstrapChunks, resumableState), bootstrapChunks.push(endOfStartTag, escapeEntireInlineScriptContent(bootstrapScriptContent), endInlineScript));
      idPrefix = {
        placeholderPrefix: idPrefix + "P:",
        segmentPrefix: idPrefix + "S:",
        boundaryPrefix: idPrefix + "B:",
        startInlineScript: "<script",
        startInlineStyle: "<style",
        preamble: { htmlChunks: null, headChunks: null, bodyChunks: null },
        externalRuntimeScript: null,
        bootstrapChunks,
        importMapChunks: [],
        onHeaders: undefined,
        headers: null,
        resets: {
          font: {},
          dns: {},
          connect: { default: {}, anonymous: {}, credentials: {} },
          image: {},
          style: {}
        },
        charsetChunks: [],
        viewportChunks: [],
        hoistableChunks: [],
        preconnects: new Set,
        fontPreloads: new Set,
        highImagePreloads: new Set,
        styles: new Map,
        bootstrapScripts: new Set,
        scripts: new Set,
        bulkPreloads: new Set,
        preloads: {
          images: new Map,
          stylesheets: new Map,
          scripts: new Map,
          moduleScripts: new Map
        },
        nonce: { script: undefined, style: undefined },
        hoistableState: null,
        stylesToHoist: false
      };
      if (bootstrapScripts !== undefined)
        for (bootstrapScriptContent = 0;bootstrapScriptContent < bootstrapScripts.length; bootstrapScriptContent++) {
          var scriptConfig = bootstrapScripts[bootstrapScriptContent], src, crossOrigin = undefined, integrity = undefined, props = {
            rel: "preload",
            as: "script",
            fetchPriority: "low",
            nonce: undefined
          };
          typeof scriptConfig === "string" ? props.href = src = scriptConfig : (props.href = src = scriptConfig.src, props.integrity = integrity = typeof scriptConfig.integrity === "string" ? scriptConfig.integrity : undefined, props.crossOrigin = crossOrigin = typeof scriptConfig === "string" || scriptConfig.crossOrigin == null ? undefined : scriptConfig.crossOrigin === "use-credentials" ? "use-credentials" : "");
          preloadBootstrapScriptOrModule(resumableState, idPrefix, src, props);
          bootstrapChunks.push('<script src="', escapeTextForBrowser(src), attributeEnd);
          typeof integrity === "string" && bootstrapChunks.push(' integrity="', escapeTextForBrowser(integrity), attributeEnd);
          typeof crossOrigin === "string" && bootstrapChunks.push(' crossorigin="', escapeTextForBrowser(crossOrigin), attributeEnd);
          pushCompletedShellIdAttribute(bootstrapChunks, resumableState);
          bootstrapChunks.push(' async=""></script>');
        }
      if (bootstrapModules !== undefined)
        for (bootstrapScripts = 0;bootstrapScripts < bootstrapModules.length; bootstrapScripts++)
          bootstrapScriptContent = bootstrapModules[bootstrapScripts], crossOrigin = src = undefined, integrity = {
            rel: "modulepreload",
            fetchPriority: "low",
            nonce: undefined
          }, typeof bootstrapScriptContent === "string" ? integrity.href = scriptConfig = bootstrapScriptContent : (integrity.href = scriptConfig = bootstrapScriptContent.src, integrity.integrity = crossOrigin = typeof bootstrapScriptContent.integrity === "string" ? bootstrapScriptContent.integrity : undefined, integrity.crossOrigin = src = typeof bootstrapScriptContent === "string" || bootstrapScriptContent.crossOrigin == null ? undefined : bootstrapScriptContent.crossOrigin === "use-credentials" ? "use-credentials" : ""), preloadBootstrapScriptOrModule(resumableState, idPrefix, scriptConfig, integrity), bootstrapChunks.push('<script type="module" src="', escapeTextForBrowser(scriptConfig), attributeEnd), typeof crossOrigin === "string" && bootstrapChunks.push(' integrity="', escapeTextForBrowser(crossOrigin), attributeEnd), typeof src === "string" && bootstrapChunks.push(' crossorigin="', escapeTextForBrowser(src), attributeEnd), pushCompletedShellIdAttribute(bootstrapChunks, resumableState), bootstrapChunks.push(' async=""></script>');
      return {
        placeholderPrefix: idPrefix.placeholderPrefix,
        segmentPrefix: idPrefix.segmentPrefix,
        boundaryPrefix: idPrefix.boundaryPrefix,
        startInlineScript: idPrefix.startInlineScript,
        startInlineStyle: idPrefix.startInlineStyle,
        preamble: idPrefix.preamble,
        externalRuntimeScript: idPrefix.externalRuntimeScript,
        bootstrapChunks: idPrefix.bootstrapChunks,
        importMapChunks: idPrefix.importMapChunks,
        onHeaders: idPrefix.onHeaders,
        headers: idPrefix.headers,
        resets: idPrefix.resets,
        charsetChunks: idPrefix.charsetChunks,
        viewportChunks: idPrefix.viewportChunks,
        hoistableChunks: idPrefix.hoistableChunks,
        preconnects: idPrefix.preconnects,
        fontPreloads: idPrefix.fontPreloads,
        highImagePreloads: idPrefix.highImagePreloads,
        styles: idPrefix.styles,
        bootstrapScripts: idPrefix.bootstrapScripts,
        scripts: idPrefix.scripts,
        bulkPreloads: idPrefix.bulkPreloads,
        preloads: idPrefix.preloads,
        nonce: idPrefix.nonce,
        stylesToHoist: idPrefix.stylesToHoist,
        generateStaticMarkup
      };
    }
    function pushTextInstance(target, text2, renderState, textEmbedded) {
      if (renderState.generateStaticMarkup)
        return target.push(escapeTextForBrowser(text2)), false;
      text2 === "" ? target = textEmbedded : (textEmbedded && target.push("<!-- -->"), target.push(escapeTextForBrowser(text2)), target = true);
      return target;
    }
    function pushSegmentFinale(target, renderState, lastPushedText, textEmbedded) {
      renderState.generateStaticMarkup || lastPushedText && textEmbedded && target.push("<!-- -->");
    }
    function getComponentNameFromType(type2) {
      if (type2 == null)
        return null;
      if (typeof type2 === "function")
        return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
      if (typeof type2 === "string")
        return type2;
      switch (type2) {
        case REACT_FRAGMENT_TYPE:
          return "Fragment";
        case REACT_PROFILER_TYPE:
          return "Profiler";
        case REACT_STRICT_MODE_TYPE:
          return "StrictMode";
        case REACT_SUSPENSE_TYPE:
          return "Suspense";
        case REACT_SUSPENSE_LIST_TYPE:
          return "SuspenseList";
        case REACT_ACTIVITY_TYPE:
          return "Activity";
      }
      if (typeof type2 === "object")
        switch (typeof type2.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type2.$$typeof) {
          case REACT_PORTAL_TYPE:
            return "Portal";
          case REACT_CONTEXT_TYPE:
            return type2.displayName || "Context";
          case REACT_CONSUMER_TYPE:
            return (type2._context.displayName || "Context") + ".Consumer";
          case REACT_FORWARD_REF_TYPE:
            var innerType = type2.render;
            type2 = type2.displayName;
            type2 || (type2 = innerType.displayName || innerType.name || "", type2 = type2 !== "" ? "ForwardRef(" + type2 + ")" : "ForwardRef");
            return type2;
          case REACT_MEMO_TYPE:
            return innerType = type2.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type2.type) || "Memo";
          case REACT_LAZY_TYPE:
            innerType = type2._payload;
            type2 = type2._init;
            try {
              return getComponentNameFromType(type2(innerType));
            } catch (x3) {}
        }
      return null;
    }
    function popToNearestCommonAncestor(prev, next) {
      if (prev !== next) {
        prev.context._currentValue2 = prev.parentValue;
        prev = prev.parent;
        var parentNext = next.parent;
        if (prev === null) {
          if (parentNext !== null)
            throw Error("The stacks must reach the root at the same time. This is a bug in React.");
        } else {
          if (parentNext === null)
            throw Error("The stacks must reach the root at the same time. This is a bug in React.");
          popToNearestCommonAncestor(prev, parentNext);
        }
        next.context._currentValue2 = next.value;
      }
    }
    function popAllPrevious(prev) {
      prev.context._currentValue2 = prev.parentValue;
      prev = prev.parent;
      prev !== null && popAllPrevious(prev);
    }
    function pushAllNext(next) {
      var parentNext = next.parent;
      parentNext !== null && pushAllNext(parentNext);
      next.context._currentValue2 = next.value;
    }
    function popPreviousToCommonLevel(prev, next) {
      prev.context._currentValue2 = prev.parentValue;
      prev = prev.parent;
      if (prev === null)
        throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
      prev.depth === next.depth ? popToNearestCommonAncestor(prev, next) : popPreviousToCommonLevel(prev, next);
    }
    function popNextToCommonLevel(prev, next) {
      var parentNext = next.parent;
      if (parentNext === null)
        throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
      prev.depth === parentNext.depth ? popToNearestCommonAncestor(prev, parentNext) : popNextToCommonLevel(prev, parentNext);
      next.context._currentValue2 = next.value;
    }
    function switchContext(newSnapshot) {
      var prev = currentActiveSnapshot;
      prev !== newSnapshot && (prev === null ? pushAllNext(newSnapshot) : newSnapshot === null ? popAllPrevious(prev) : prev.depth === newSnapshot.depth ? popToNearestCommonAncestor(prev, newSnapshot) : prev.depth > newSnapshot.depth ? popPreviousToCommonLevel(prev, newSnapshot) : popNextToCommonLevel(prev, newSnapshot), currentActiveSnapshot = newSnapshot);
    }
    function warnOnInvalidCallback(callback) {
      if (callback !== null && typeof callback !== "function") {
        var key = String(callback);
        didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.", callback));
      }
    }
    function warnNoop(publicInstance, callerName) {
      publicInstance = (publicInstance = publicInstance.constructor) && getComponentNameFromType(publicInstance) || "ReactClass";
      var warningKey = publicInstance + "." + callerName;
      didWarnAboutNoopUpdateForComponent[warningKey] || (console.error(`Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.

Please check the code for the %s component.`, callerName, publicInstance), didWarnAboutNoopUpdateForComponent[warningKey] = true);
    }
    function pushTreeContext(baseContext, totalChildren, index2) {
      var baseIdWithLeadingBit = baseContext.id;
      baseContext = baseContext.overflow;
      var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
      baseIdWithLeadingBit &= ~(1 << baseLength);
      index2 += 1;
      var length = 32 - clz32(totalChildren) + baseLength;
      if (30 < length) {
        var numberOfOverflowBits = baseLength - baseLength % 5;
        length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
        baseIdWithLeadingBit >>= numberOfOverflowBits;
        baseLength -= numberOfOverflowBits;
        return {
          id: 1 << 32 - clz32(totalChildren) + baseLength | index2 << baseLength | baseIdWithLeadingBit,
          overflow: length + baseContext
        };
      }
      return {
        id: 1 << length | index2 << baseLength | baseIdWithLeadingBit,
        overflow: baseContext
      };
    }
    function clz32Fallback(x3) {
      x3 >>>= 0;
      return x3 === 0 ? 32 : 31 - (log4(x3) / LN2 | 0) | 0;
    }
    function noop() {}
    function trackUsedThenable(thenableState2, thenable, index2) {
      index2 = thenableState2[index2];
      index2 === undefined ? thenableState2.push(thenable) : index2 !== thenable && (thenable.then(noop, noop), thenable = index2);
      switch (thenable.status) {
        case "fulfilled":
          return thenable.value;
        case "rejected":
          throw thenable.reason;
        default:
          typeof thenable.status === "string" ? thenable.then(noop, noop) : (thenableState2 = thenable, thenableState2.status = "pending", thenableState2.then(function(fulfilledValue) {
            if (thenable.status === "pending") {
              var fulfilledThenable = thenable;
              fulfilledThenable.status = "fulfilled";
              fulfilledThenable.value = fulfilledValue;
            }
          }, function(error49) {
            if (thenable.status === "pending") {
              var rejectedThenable = thenable;
              rejectedThenable.status = "rejected";
              rejectedThenable.reason = error49;
            }
          }));
          switch (thenable.status) {
            case "fulfilled":
              return thenable.value;
            case "rejected":
              throw thenable.reason;
          }
          suspendedThenable = thenable;
          throw SuspenseException;
      }
    }
    function getSuspendedThenable() {
      if (suspendedThenable === null)
        throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");
      var thenable = suspendedThenable;
      suspendedThenable = null;
      return thenable;
    }
    function is3(x3, y3) {
      return x3 === y3 && (x3 !== 0 || 1 / x3 === 1 / y3) || x3 !== x3 && y3 !== y3;
    }
    function resolveCurrentlyRenderingComponent() {
      if (currentlyRenderingComponent === null)
        throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);
      isInHookUserCodeInDev && console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks");
      return currentlyRenderingComponent;
    }
    function createHook() {
      if (0 < numberOfReRenders)
        throw Error("Rendered more hooks than during the previous render");
      return { memoizedState: null, queue: null, next: null };
    }
    function createWorkInProgressHook() {
      workInProgressHook === null ? firstWorkInProgressHook === null ? (isReRender = false, firstWorkInProgressHook = workInProgressHook = createHook()) : (isReRender = true, workInProgressHook = firstWorkInProgressHook) : workInProgressHook.next === null ? (isReRender = false, workInProgressHook = workInProgressHook.next = createHook()) : (isReRender = true, workInProgressHook = workInProgressHook.next);
      return workInProgressHook;
    }
    function getThenableStateAfterSuspending() {
      var state = thenableState;
      thenableState = null;
      return state;
    }
    function resetHooksState() {
      isInHookUserCodeInDev = false;
      currentlyRenderingKeyPath = currentlyRenderingRequest = currentlyRenderingTask = currentlyRenderingComponent = null;
      didScheduleRenderPhaseUpdate = false;
      firstWorkInProgressHook = null;
      numberOfReRenders = 0;
      workInProgressHook = renderPhaseUpdates = null;
    }
    function readContext(context10) {
      isInHookUserCodeInDev && console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
      return context10._currentValue2;
    }
    function basicStateReducer(state, action) {
      return typeof action === "function" ? action(state) : action;
    }
    function useReducer(reducer, initialArg, init4) {
      reducer !== basicStateReducer && (currentHookNameInDev = "useReducer");
      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
      workInProgressHook = createWorkInProgressHook();
      if (isReRender) {
        init4 = workInProgressHook.queue;
        initialArg = init4.dispatch;
        if (renderPhaseUpdates !== null) {
          var firstRenderPhaseUpdate = renderPhaseUpdates.get(init4);
          if (firstRenderPhaseUpdate !== undefined) {
            renderPhaseUpdates.delete(init4);
            init4 = workInProgressHook.memoizedState;
            do {
              var action = firstRenderPhaseUpdate.action;
              isInHookUserCodeInDev = true;
              init4 = reducer(init4, action);
              isInHookUserCodeInDev = false;
              firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;
            } while (firstRenderPhaseUpdate !== null);
            workInProgressHook.memoizedState = init4;
            return [init4, initialArg];
          }
        }
        return [workInProgressHook.memoizedState, initialArg];
      }
      isInHookUserCodeInDev = true;
      reducer = reducer === basicStateReducer ? typeof initialArg === "function" ? initialArg() : initialArg : init4 !== undefined ? init4(initialArg) : initialArg;
      isInHookUserCodeInDev = false;
      workInProgressHook.memoizedState = reducer;
      reducer = workInProgressHook.queue = { last: null, dispatch: null };
      reducer = reducer.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, reducer);
      return [workInProgressHook.memoizedState, reducer];
    }
    function useMemo(nextCreate, deps) {
      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
      workInProgressHook = createWorkInProgressHook();
      deps = deps === undefined ? null : deps;
      if (workInProgressHook !== null) {
        var prevState = workInProgressHook.memoizedState;
        if (prevState !== null && deps !== null) {
          a: {
            var JSCompiler_inline_result = prevState[1];
            if (JSCompiler_inline_result === null)
              console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", currentHookNameInDev), JSCompiler_inline_result = false;
            else {
              deps.length !== JSCompiler_inline_result.length && console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.

Previous: %s
Incoming: %s`, currentHookNameInDev, "[" + deps.join(", ") + "]", "[" + JSCompiler_inline_result.join(", ") + "]");
              for (var i = 0;i < JSCompiler_inline_result.length && i < deps.length; i++)
                if (!objectIs(deps[i], JSCompiler_inline_result[i])) {
                  JSCompiler_inline_result = false;
                  break a;
                }
              JSCompiler_inline_result = true;
            }
          }
          if (JSCompiler_inline_result)
            return prevState[0];
        }
      }
      isInHookUserCodeInDev = true;
      nextCreate = nextCreate();
      isInHookUserCodeInDev = false;
      workInProgressHook.memoizedState = [nextCreate, deps];
      return nextCreate;
    }
    function dispatchAction(componentIdentity, queue, action) {
      if (25 <= numberOfReRenders)
        throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
      if (componentIdentity === currentlyRenderingComponent)
        if (didScheduleRenderPhaseUpdate = true, componentIdentity = { action, next: null }, renderPhaseUpdates === null && (renderPhaseUpdates = new Map), action = renderPhaseUpdates.get(queue), action === undefined)
          renderPhaseUpdates.set(queue, componentIdentity);
        else {
          for (queue = action;queue.next !== null; )
            queue = queue.next;
          queue.next = componentIdentity;
        }
    }
    function throwOnUseEffectEventCall() {
      throw Error("A function wrapped in useEffectEvent can't be called during rendering.");
    }
    function unsupportedStartTransition() {
      throw Error("startTransition cannot be called during server rendering.");
    }
    function unsupportedSetOptimisticState() {
      throw Error("Cannot update optimistic state while rendering.");
    }
    function useActionState(action, initialState, permalink) {
      resolveCurrentlyRenderingComponent();
      var actionStateHookIndex = actionStateCounter++, request2 = currentlyRenderingRequest;
      if (typeof action.$$FORM_ACTION === "function") {
        var nextPostbackStateKey = null, componentKeyPath = currentlyRenderingKeyPath;
        request2 = request2.formState;
        var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;
        if (request2 !== null && typeof isSignatureEqual === "function") {
          var postbackKey = request2[1];
          isSignatureEqual.call(action, request2[2], request2[3]) && (nextPostbackStateKey = permalink !== undefined ? "p" + permalink : "k" + murmurhash3_32_gc(JSON.stringify([
            componentKeyPath,
            null,
            actionStateHookIndex
          ]), 0), postbackKey === nextPostbackStateKey && (actionStateMatchingIndex = actionStateHookIndex, initialState = request2[0]));
        }
        var boundAction = action.bind(null, initialState);
        action = function(payload) {
          boundAction(payload);
        };
        typeof boundAction.$$FORM_ACTION === "function" && (action.$$FORM_ACTION = function(prefix2) {
          prefix2 = boundAction.$$FORM_ACTION(prefix2);
          permalink !== undefined && (checkAttributeStringCoercion(permalink, "target"), permalink += "", prefix2.action = permalink);
          var formData = prefix2.data;
          formData && (nextPostbackStateKey === null && (nextPostbackStateKey = permalink !== undefined ? "p" + permalink : "k" + murmurhash3_32_gc(JSON.stringify([
            componentKeyPath,
            null,
            actionStateHookIndex
          ]), 0)), formData.append("$ACTION_KEY", nextPostbackStateKey));
          return prefix2;
        });
        return [initialState, action, false];
      }
      var _boundAction = action.bind(null, initialState);
      return [
        initialState,
        function(payload) {
          _boundAction(payload);
        },
        false
      ];
    }
    function unwrapThenable(thenable) {
      var index2 = thenableIndexCounter;
      thenableIndexCounter += 1;
      thenableState === null && (thenableState = []);
      return trackUsedThenable(thenableState, thenable, index2);
    }
    function unsupportedRefresh() {
      throw Error("Cache cannot be refreshed during server rendering.");
    }
    function disabledLog() {}
    function disableLogs() {
      if (disabledDepth === 0) {
        prevLog = console.log;
        prevInfo = console.info;
        prevWarn = console.warn;
        prevError = console.error;
        prevGroup = console.group;
        prevGroupCollapsed = console.groupCollapsed;
        prevGroupEnd = console.groupEnd;
        var props = {
          configurable: true,
          enumerable: true,
          value: disabledLog,
          writable: true
        };
        Object.defineProperties(console, {
          info: props,
          log: props,
          warn: props,
          error: props,
          group: props,
          groupCollapsed: props,
          groupEnd: props
        });
      }
      disabledDepth++;
    }
    function reenableLogs() {
      disabledDepth--;
      if (disabledDepth === 0) {
        var props = { configurable: true, enumerable: true, writable: true };
        Object.defineProperties(console, {
          log: assign({}, props, { value: prevLog }),
          info: assign({}, props, { value: prevInfo }),
          warn: assign({}, props, { value: prevWarn }),
          error: assign({}, props, { value: prevError }),
          group: assign({}, props, { value: prevGroup }),
          groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
          groupEnd: assign({}, props, { value: prevGroupEnd })
        });
      }
      0 > disabledDepth && console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
    }
    function formatOwnerStack(error49) {
      var prevPrepareStackTrace = Error.prepareStackTrace;
      Error.prepareStackTrace = undefined;
      error49 = error49.stack;
      Error.prepareStackTrace = prevPrepareStackTrace;
      error49.startsWith(`Error: react-stack-top-frame
`) && (error49 = error49.slice(29));
      prevPrepareStackTrace = error49.indexOf(`
`);
      prevPrepareStackTrace !== -1 && (error49 = error49.slice(prevPrepareStackTrace + 1));
      prevPrepareStackTrace = error49.indexOf("react_stack_bottom_frame");
      prevPrepareStackTrace !== -1 && (prevPrepareStackTrace = error49.lastIndexOf(`
`, prevPrepareStackTrace));
      if (prevPrepareStackTrace !== -1)
        error49 = error49.slice(0, prevPrepareStackTrace);
      else
        return "";
      return error49;
    }
    function describeBuiltInComponentFrame(name2) {
      if (prefix === undefined)
        try {
          throw Error();
        } catch (x3) {
          var match = x3.stack.trim().match(/\n( *(at )?)/);
          prefix = match && match[1] || "";
          suffix = -1 < x3.stack.indexOf(`
    at`) ? " (<anonymous>)" : -1 < x3.stack.indexOf("@") ? "@unknown:0:0" : "";
        }
      return `
` + prefix + name2 + suffix;
    }
    function describeNativeComponentFrame(fn2, construct2) {
      if (!fn2 || reentry)
        return "";
      var frame = componentFrameCache.get(fn2);
      if (frame !== undefined)
        return frame;
      reentry = true;
      frame = Error.prepareStackTrace;
      Error.prepareStackTrace = undefined;
      var previousDispatcher2 = null;
      previousDispatcher2 = ReactSharedInternals.H;
      ReactSharedInternals.H = null;
      disableLogs();
      try {
        var RunInRootFrame = {
          DetermineComponentFrameRoot: function() {
            try {
              if (construct2) {
                var Fake = function() {
                  throw Error();
                };
                Object.defineProperty(Fake.prototype, "props", {
                  set: function() {
                    throw Error();
                  }
                });
                if (typeof Reflect === "object" && Reflect.construct) {
                  try {
                    Reflect.construct(Fake, []);
                  } catch (x3) {
                    var control = x3;
                  }
                  Reflect.construct(fn2, [], Fake);
                } else {
                  try {
                    Fake.call();
                  } catch (x$0) {
                    control = x$0;
                  }
                  fn2.call(Fake.prototype);
                }
              } else {
                try {
                  throw Error();
                } catch (x$1) {
                  control = x$1;
                }
                (Fake = fn2()) && typeof Fake.catch === "function" && Fake.catch(function() {});
              }
            } catch (sample) {
              if (sample && control && typeof sample.stack === "string")
                return [sample.stack, control.stack];
            }
            return [null, null];
          }
        };
        RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
        var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, "name");
        namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" });
        var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
        if (sampleStack && controlStack) {
          var sampleLines = sampleStack.split(`
`), controlLines = controlStack.split(`
`);
          for (_RunInRootFrame$Deter = namePropDescriptor = 0;namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes("DetermineComponentFrameRoot"); )
            namePropDescriptor++;
          for (;_RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes("DetermineComponentFrameRoot"); )
            _RunInRootFrame$Deter++;
          if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
            for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1;1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
              _RunInRootFrame$Deter--;
          for (;1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
            if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
              if (namePropDescriptor !== 1 || _RunInRootFrame$Deter !== 1) {
                do
                  if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
                    var _frame = `
` + sampleLines[namePropDescriptor].replace(" at new ", " at ");
                    fn2.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn2.displayName));
                    typeof fn2 === "function" && componentFrameCache.set(fn2, _frame);
                    return _frame;
                  }
                while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
              }
              break;
            }
        }
      } finally {
        reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame;
      }
      sampleLines = (sampleLines = fn2 ? fn2.displayName || fn2.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
      typeof fn2 === "function" && componentFrameCache.set(fn2, sampleLines);
      return sampleLines;
    }
    function describeComponentStackByType(type2) {
      if (typeof type2 === "string")
        return describeBuiltInComponentFrame(type2);
      if (typeof type2 === "function")
        return type2.prototype && type2.prototype.isReactComponent ? describeNativeComponentFrame(type2, true) : describeNativeComponentFrame(type2, false);
      if (typeof type2 === "object" && type2 !== null) {
        switch (type2.$$typeof) {
          case REACT_FORWARD_REF_TYPE:
            return describeNativeComponentFrame(type2.render, false);
          case REACT_MEMO_TYPE:
            return describeNativeComponentFrame(type2.type, false);
          case REACT_LAZY_TYPE:
            var lazyComponent = type2, payload = lazyComponent._payload;
            lazyComponent = lazyComponent._init;
            try {
              type2 = lazyComponent(payload);
            } catch (x3) {
              return describeBuiltInComponentFrame("Lazy");
            }
            return describeComponentStackByType(type2);
        }
        if (typeof type2.name === "string") {
          a: {
            payload = type2.name;
            lazyComponent = type2.env;
            type2 = type2.debugLocation;
            if (type2 != null) {
              type2 = formatOwnerStack(type2);
              var idx = type2.lastIndexOf(`
`);
              type2 = idx === -1 ? type2 : type2.slice(idx + 1);
              if (type2.indexOf(payload) !== -1) {
                payload = `
` + type2;
                break a;
              }
            }
            payload = describeBuiltInComponentFrame(payload + (lazyComponent ? " [" + lazyComponent + "]" : ""));
          }
          return payload;
        }
      }
      switch (type2) {
        case REACT_SUSPENSE_LIST_TYPE:
          return describeBuiltInComponentFrame("SuspenseList");
        case REACT_SUSPENSE_TYPE:
          return describeBuiltInComponentFrame("Suspense");
      }
      return "";
    }
    function isEligibleForOutlining(request2, boundary) {
      return (500 < boundary.byteSize || false) && boundary.contentPreamble === null;
    }
    function defaultErrorHandler(error49) {
      if (typeof error49 === "object" && error49 !== null && typeof error49.environmentName === "string") {
        var JSCompiler_inline_result = error49.environmentName;
        error49 = [error49].slice(0);
        typeof error49[0] === "string" ? error49.splice(0, 1, "[%s] " + error49[0], " " + JSCompiler_inline_result + " ") : error49.splice(0, 0, "[%s]", " " + JSCompiler_inline_result + " ");
        error49.unshift(console);
        JSCompiler_inline_result = bind.apply(console.error, error49);
        JSCompiler_inline_result();
      } else
        console.error(error49);
      return null;
    }
    function RequestInstance(resumableState, renderState, rootFormatContext, progressiveChunkSize, onError2, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState) {
      var abortSet = new Set;
      this.destination = null;
      this.flushScheduled = false;
      this.resumableState = resumableState;
      this.renderState = renderState;
      this.rootFormatContext = rootFormatContext;
      this.progressiveChunkSize = progressiveChunkSize === undefined ? 12800 : progressiveChunkSize;
      this.status = 10;
      this.fatalError = null;
      this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
      this.completedPreambleSegments = this.completedRootSegment = null;
      this.byteSize = 0;
      this.abortableTasks = abortSet;
      this.pingedTasks = [];
      this.clientRenderedBoundaries = [];
      this.completedBoundaries = [];
      this.partialBoundaries = [];
      this.trackedPostpones = null;
      this.onError = onError2 === undefined ? defaultErrorHandler : onError2;
      this.onPostpone = onPostpone === undefined ? noop : onPostpone;
      this.onAllReady = onAllReady === undefined ? noop : onAllReady;
      this.onShellReady = onShellReady === undefined ? noop : onShellReady;
      this.onShellError = onShellError === undefined ? noop : onShellError;
      this.onFatalError = onFatalError === undefined ? noop : onFatalError;
      this.formState = formState === undefined ? null : formState;
      this.didWarnForKey = null;
    }
    function createRequest(children, resumableState, renderState, rootFormatContext, progressiveChunkSize, onError2, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState) {
      var now = getCurrentTime();
      1000 < now - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = now);
      resumableState = new RequestInstance(resumableState, renderState, rootFormatContext, progressiveChunkSize, onError2, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState);
      renderState = createPendingSegment(resumableState, 0, null, rootFormatContext, false, false);
      renderState.parentFlushed = true;
      children = createRenderTask(resumableState, null, children, -1, null, renderState, null, null, resumableState.abortableTasks, null, rootFormatContext, null, emptyTreeContext, null, null, emptyContextObject, null);
      pushComponentStack(children);
      resumableState.pingedTasks.push(children);
      return resumableState;
    }
    function pingTask(request2, task) {
      request2.pingedTasks.push(task);
      request2.pingedTasks.length === 1 && (request2.flushScheduled = request2.destination !== null, performWork(request2));
    }
    function createSuspenseBoundary(request2, row, fallbackAbortableTasks, contentPreamble, fallbackPreamble) {
      fallbackAbortableTasks = {
        status: PENDING,
        rootSegmentID: -1,
        parentFlushed: false,
        pendingTasks: 0,
        row,
        completedSegments: [],
        byteSize: 0,
        fallbackAbortableTasks,
        errorDigest: null,
        contentState: createHoistableState(),
        fallbackState: createHoistableState(),
        contentPreamble,
        fallbackPreamble,
        trackedContentKeyPath: null,
        trackedFallbackNode: null,
        errorMessage: null,
        errorStack: null,
        errorComponentStack: null
      };
      row !== null && (row.pendingTasks++, contentPreamble = row.boundaries, contentPreamble !== null && (request2.allPendingTasks++, fallbackAbortableTasks.pendingTasks++, contentPreamble.push(fallbackAbortableTasks)), request2 = row.inheritedHoistables, request2 !== null && hoistHoistables(fallbackAbortableTasks.contentState, request2));
      return fallbackAbortableTasks;
    }
    function createRenderTask(request2, thenableState2, node3, childIndex, blockedBoundary, blockedSegment, blockedPreamble, hoistableState, abortSet, keyPath, formatContext, context10, treeContext, row, componentStack, legacyContext, debugTask) {
      request2.allPendingTasks++;
      blockedBoundary === null ? request2.pendingRootTasks++ : blockedBoundary.pendingTasks++;
      row !== null && row.pendingTasks++;
      var task = {
        replay: null,
        node: node3,
        childIndex,
        ping: function() {
          return pingTask(request2, task);
        },
        blockedBoundary,
        blockedSegment,
        blockedPreamble,
        hoistableState,
        abortSet,
        keyPath,
        formatContext,
        context: context10,
        treeContext,
        row,
        componentStack,
        thenableState: thenableState2
      };
      task.debugTask = debugTask;
      abortSet.add(task);
      return task;
    }
    function createReplayTask(request2, thenableState2, replay, node3, childIndex, blockedBoundary, hoistableState, abortSet, keyPath, formatContext, context10, treeContext, row, componentStack, legacyContext, debugTask) {
      request2.allPendingTasks++;
      blockedBoundary === null ? request2.pendingRootTasks++ : blockedBoundary.pendingTasks++;
      row !== null && row.pendingTasks++;
      replay.pendingTasks++;
      var task = {
        replay,
        node: node3,
        childIndex,
        ping: function() {
          return pingTask(request2, task);
        },
        blockedBoundary,
        blockedSegment: null,
        blockedPreamble: null,
        hoistableState,
        abortSet,
        keyPath,
        formatContext,
        context: context10,
        treeContext,
        row,
        componentStack,
        thenableState: thenableState2
      };
      task.debugTask = debugTask;
      abortSet.add(task);
      return task;
    }
    function createPendingSegment(request2, index2, boundary, parentFormatContext, lastPushedText, textEmbedded) {
      return {
        status: PENDING,
        parentFlushed: false,
        id: -1,
        index: index2,
        chunks: [],
        children: [],
        preambleChildren: [],
        parentFormatContext,
        boundary,
        lastPushedText,
        textEmbedded
      };
    }
    function getCurrentStackInDEV() {
      if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null)
        return "";
      var componentStack = currentTaskInDEV.componentStack;
      try {
        var info = "";
        if (typeof componentStack.type === "string")
          info += describeBuiltInComponentFrame(componentStack.type);
        else if (typeof componentStack.type === "function") {
          if (!componentStack.owner) {
            var JSCompiler_temp_const = info, fn2 = componentStack.type, name2 = fn2 ? fn2.displayName || fn2.name : "";
            var JSCompiler_inline_result = name2 ? describeBuiltInComponentFrame(name2) : "";
            info = JSCompiler_temp_const + JSCompiler_inline_result;
          }
        } else
          componentStack.owner || (info += describeComponentStackByType(componentStack.type));
        for (;componentStack; )
          JSCompiler_temp_const = null, componentStack.debugStack != null ? JSCompiler_temp_const = formatOwnerStack(componentStack.debugStack) : (JSCompiler_inline_result = componentStack, JSCompiler_inline_result.stack != null && (JSCompiler_temp_const = typeof JSCompiler_inline_result.stack !== "string" ? JSCompiler_inline_result.stack = formatOwnerStack(JSCompiler_inline_result.stack) : JSCompiler_inline_result.stack)), (componentStack = componentStack.owner) && JSCompiler_temp_const && (info += `
` + JSCompiler_temp_const);
        var JSCompiler_inline_result$jscomp$0 = info;
      } catch (x3) {
        JSCompiler_inline_result$jscomp$0 = `
Error generating stack: ` + x3.message + `
` + x3.stack;
      }
      return JSCompiler_inline_result$jscomp$0;
    }
    function pushHaltedAwaitOnComponentStack(task, debugInfo) {
      if (debugInfo != null)
        for (var i = debugInfo.length - 1;0 <= i; i--) {
          var info = debugInfo[i];
          if (typeof info.name === "string")
            break;
          if (typeof info.time === "number")
            break;
          if (info.awaited != null) {
            var bestStack = info.debugStack == null ? info.awaited : info;
            if (bestStack.debugStack !== undefined) {
              task.componentStack = {
                parent: task.componentStack,
                type: info,
                owner: bestStack.owner,
                stack: bestStack.debugStack
              };
              task.debugTask = bestStack.debugTask;
              break;
            }
          }
        }
    }
    function pushServerComponentStack(task, debugInfo) {
      if (debugInfo != null)
        for (var i = 0;i < debugInfo.length; i++) {
          var componentInfo = debugInfo[i];
          typeof componentInfo.name === "string" && componentInfo.debugStack !== undefined && (task.componentStack = {
            parent: task.componentStack,
            type: componentInfo,
            owner: componentInfo.owner,
            stack: componentInfo.debugStack
          }, task.debugTask = componentInfo.debugTask);
        }
    }
    function pushComponentStack(task) {
      var node3 = task.node;
      if (typeof node3 === "object" && node3 !== null)
        switch (node3.$$typeof) {
          case REACT_ELEMENT_TYPE:
            var { type: type2, _owner: owner, _debugStack: stack } = node3;
            pushServerComponentStack(task, node3._debugInfo);
            task.debugTask = node3._debugTask;
            task.componentStack = {
              parent: task.componentStack,
              type: type2,
              owner,
              stack
            };
            break;
          case REACT_LAZY_TYPE:
            pushServerComponentStack(task, node3._debugInfo);
            break;
          default:
            typeof node3.then === "function" && pushServerComponentStack(task, node3._debugInfo);
        }
    }
    function replaceSuspenseComponentStackWithSuspenseFallbackStack(componentStack) {
      return componentStack === null ? null : {
        parent: componentStack.parent,
        type: "Suspense Fallback",
        owner: componentStack.owner,
        stack: componentStack.stack
      };
    }
    function getThrownInfo(node$jscomp$0) {
      var errorInfo = {};
      node$jscomp$0 && Object.defineProperty(errorInfo, "componentStack", {
        configurable: true,
        enumerable: true,
        get: function() {
          try {
            var info = "", node3 = node$jscomp$0;
            do
              info += describeComponentStackByType(node3.type), node3 = node3.parent;
            while (node3);
            var stack = info;
          } catch (x3) {
            stack = `
Error generating stack: ` + x3.message + `
` + x3.stack;
          }
          Object.defineProperty(errorInfo, "componentStack", {
            value: stack
          });
          return stack;
        }
      });
      return errorInfo;
    }
    function encodeErrorForBoundary(boundary, digest, error49, thrownInfo, wasAborted) {
      boundary.errorDigest = digest;
      error49 instanceof Error ? (digest = String(error49.message), error49 = String(error49.stack)) : (digest = typeof error49 === "object" && error49 !== null ? describeObjectForErrorMessage(error49) : String(error49), error49 = null);
      wasAborted = wasAborted ? `Switched to client rendering because the server rendering aborted due to:

` : `Switched to client rendering because the server rendering errored:

`;
      boundary.errorMessage = wasAborted + digest;
      boundary.errorStack = error49 !== null ? wasAborted + error49 : null;
      boundary.errorComponentStack = thrownInfo.componentStack;
    }
    function logRecoverableError(request2, error49, errorInfo, debugTask) {
      request2 = request2.onError;
      error49 = debugTask ? debugTask.run(request2.bind(null, error49, errorInfo)) : request2(error49, errorInfo);
      if (error49 != null && typeof error49 !== "string")
        console.error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead', typeof error49);
      else
        return error49;
    }
    function fatalError(request2, error49, errorInfo, debugTask) {
      errorInfo = request2.onShellError;
      var onFatalError = request2.onFatalError;
      debugTask ? (debugTask.run(errorInfo.bind(null, error49)), debugTask.run(onFatalError.bind(null, error49))) : (errorInfo(error49), onFatalError(error49));
      request2.destination !== null ? (request2.status = CLOSED, request2.destination.destroy(error49)) : (request2.status = 13, request2.fatalError = error49);
    }
    function finishSuspenseListRow(request2, row) {
      unblockSuspenseListRow(request2, row.next, row.hoistables);
    }
    function unblockSuspenseListRow(request2, unblockedRow, inheritedHoistables) {
      for (;unblockedRow !== null; ) {
        inheritedHoistables !== null && (hoistHoistables(unblockedRow.hoistables, inheritedHoistables), unblockedRow.inheritedHoistables = inheritedHoistables);
        var unblockedBoundaries = unblockedRow.boundaries;
        if (unblockedBoundaries !== null) {
          unblockedRow.boundaries = null;
          for (var i = 0;i < unblockedBoundaries.length; i++) {
            var unblockedBoundary = unblockedBoundaries[i];
            inheritedHoistables !== null && hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
            finishedTask(request2, unblockedBoundary, null, null);
          }
        }
        unblockedRow.pendingTasks--;
        if (0 < unblockedRow.pendingTasks)
          break;
        inheritedHoistables = unblockedRow.hoistables;
        unblockedRow = unblockedRow.next;
      }
    }
    function tryToResolveTogetherRow(request2, togetherRow) {
      var boundaries = togetherRow.boundaries;
      if (boundaries !== null && togetherRow.pendingTasks === boundaries.length) {
        for (var allCompleteAndInlinable = true, i = 0;i < boundaries.length; i++) {
          var rowBoundary = boundaries[i];
          if (rowBoundary.pendingTasks !== 1 || rowBoundary.parentFlushed || isEligibleForOutlining(request2, rowBoundary)) {
            allCompleteAndInlinable = false;
            break;
          }
        }
        allCompleteAndInlinable && unblockSuspenseListRow(request2, togetherRow, togetherRow.hoistables);
      }
    }
    function createSuspenseListRow(previousRow) {
      var newRow = {
        pendingTasks: 1,
        boundaries: null,
        hoistables: createHoistableState(),
        inheritedHoistables: null,
        together: false,
        next: null
      };
      previousRow !== null && 0 < previousRow.pendingTasks && (newRow.pendingTasks++, newRow.boundaries = [], previousRow.next = newRow);
      return newRow;
    }
    function renderSuspenseListRows(request2, task, keyPath, rows, revealOrder) {
      var { keyPath: prevKeyPath, treeContext: prevTreeContext, row: prevRow, componentStack: previousComponentStack } = task;
      var previousDebugTask = task.debugTask;
      pushServerComponentStack(task, task.node.props.children._debugInfo);
      task.keyPath = keyPath;
      keyPath = rows.length;
      var previousSuspenseListRow = null;
      if (task.replay !== null) {
        var resumeSlots = task.replay.slots;
        if (resumeSlots !== null && typeof resumeSlots === "object")
          for (var n3 = 0;n3 < keyPath; n3++) {
            var i = revealOrder !== "backwards" && revealOrder !== "unstable_legacy-backwards" ? n3 : keyPath - 1 - n3, node3 = rows[i];
            task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow);
            task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
            var resumeSegmentID = resumeSlots[i];
            typeof resumeSegmentID === "number" ? (resumeNode(request2, task, resumeSegmentID, node3, i), delete resumeSlots[i]) : renderNode2(request2, task, node3, i);
            --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
          }
        else
          for (resumeSlots = 0;resumeSlots < keyPath; resumeSlots++)
            n3 = revealOrder !== "backwards" && revealOrder !== "unstable_legacy-backwards" ? resumeSlots : keyPath - 1 - resumeSlots, i = rows[n3], warnForMissingKey(request2, task, i), task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow), task.treeContext = pushTreeContext(prevTreeContext, keyPath, n3), renderNode2(request2, task, i, n3), --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
      } else if (revealOrder !== "backwards" && revealOrder !== "unstable_legacy-backwards")
        for (revealOrder = 0;revealOrder < keyPath; revealOrder++)
          resumeSlots = rows[revealOrder], warnForMissingKey(request2, task, resumeSlots), task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow), task.treeContext = pushTreeContext(prevTreeContext, keyPath, revealOrder), renderNode2(request2, task, resumeSlots, revealOrder), --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
      else {
        revealOrder = task.blockedSegment;
        resumeSlots = revealOrder.children.length;
        n3 = revealOrder.chunks.length;
        for (i = keyPath - 1;0 <= i; i--) {
          node3 = rows[i];
          task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow);
          task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
          resumeSegmentID = createPendingSegment(request2, n3, null, task.formatContext, i === 0 ? revealOrder.lastPushedText : true, true);
          revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
          task.blockedSegment = resumeSegmentID;
          warnForMissingKey(request2, task, node3);
          try {
            renderNode2(request2, task, node3, i), pushSegmentFinale(resumeSegmentID.chunks, request2.renderState, resumeSegmentID.lastPushedText, resumeSegmentID.textEmbedded), resumeSegmentID.status = COMPLETED, --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
          } catch (thrownValue) {
            throw resumeSegmentID.status = request2.status === 12 ? ABORTED : ERRORED, thrownValue;
          }
        }
        task.blockedSegment = revealOrder;
        revealOrder.lastPushedText = false;
      }
      prevRow !== null && previousSuspenseListRow !== null && 0 < previousSuspenseListRow.pendingTasks && (prevRow.pendingTasks++, previousSuspenseListRow.next = prevRow);
      task.treeContext = prevTreeContext;
      task.row = prevRow;
      task.keyPath = prevKeyPath;
      task.componentStack = previousComponentStack;
      task.debugTask = previousDebugTask;
    }
    function renderWithHooks(request2, task, keyPath, Component, props, secondArg) {
      var prevThenableState = task.thenableState;
      task.thenableState = null;
      currentlyRenderingComponent = {};
      currentlyRenderingTask = task;
      currentlyRenderingRequest = request2;
      currentlyRenderingKeyPath = keyPath;
      isInHookUserCodeInDev = false;
      actionStateCounter = localIdCounter = 0;
      actionStateMatchingIndex = -1;
      thenableIndexCounter = 0;
      thenableState = prevThenableState;
      for (request2 = callComponentInDEV(Component, props, secondArg);didScheduleRenderPhaseUpdate; )
        didScheduleRenderPhaseUpdate = false, actionStateCounter = localIdCounter = 0, actionStateMatchingIndex = -1, thenableIndexCounter = 0, numberOfReRenders += 1, workInProgressHook = null, request2 = Component(props, secondArg);
      resetHooksState();
      return request2;
    }
    function finishFunctionComponent(request2, task, keyPath, children, hasId, actionStateCount, actionStateMatchingIndex2) {
      var didEmitActionStateMarkers = false;
      if (actionStateCount !== 0 && request2.formState !== null) {
        var segment2 = task.blockedSegment;
        if (segment2 !== null) {
          didEmitActionStateMarkers = true;
          segment2 = segment2.chunks;
          for (var i = 0;i < actionStateCount; i++)
            i === actionStateMatchingIndex2 ? segment2.push("<!--F!-->") : segment2.push("<!--F-->");
        }
      }
      actionStateCount = task.keyPath;
      task.keyPath = keyPath;
      hasId ? (keyPath = task.treeContext, task.treeContext = pushTreeContext(keyPath, 1, 0), renderNode2(request2, task, children, -1), task.treeContext = keyPath) : didEmitActionStateMarkers ? renderNode2(request2, task, children, -1) : renderNodeDestructive(request2, task, children, -1);
      task.keyPath = actionStateCount;
    }
    function renderElement(request2, task, keyPath, type2, props, ref) {
      if (typeof type2 === "function")
        if (type2.prototype && type2.prototype.isReactComponent) {
          var newProps = props;
          if ("ref" in props) {
            newProps = {};
            for (var propName in props)
              propName !== "ref" && (newProps[propName] = props[propName]);
          }
          var defaultProps = type2.defaultProps;
          if (defaultProps) {
            newProps === props && (newProps = assign({}, newProps, props));
            for (var _propName in defaultProps)
              newProps[_propName] === undefined && (newProps[_propName] = defaultProps[_propName]);
          }
          var resolvedProps = newProps;
          var context10 = emptyContextObject, contextType = type2.contextType;
          if ("contextType" in type2 && contextType !== null && (contextType === undefined || contextType.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(type2)) {
            didWarnAboutInvalidateContextType.add(type2);
            var addendum = contextType === undefined ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : typeof contextType !== "object" ? " However, it is set to a " + typeof contextType + "." : contextType.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(contextType).join(", ") + "}.";
            console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(type2) || "Component", addendum);
          }
          typeof contextType === "object" && contextType !== null && (context10 = contextType._currentValue2);
          var instance = new type2(resolvedProps, context10);
          if (typeof type2.getDerivedStateFromProps === "function" && (instance.state === null || instance.state === undefined)) {
            var componentName = getComponentNameFromType(type2) || "Component";
            didWarnAboutUninitializedState.has(componentName) || (didWarnAboutUninitializedState.add(componentName), console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", componentName, instance.state === null ? "null" : "undefined", componentName));
          }
          if (typeof type2.getDerivedStateFromProps === "function" || typeof instance.getSnapshotBeforeUpdate === "function") {
            var foundWillMountName = null, foundWillReceivePropsName = null, foundWillUpdateName = null;
            typeof instance.componentWillMount === "function" && instance.componentWillMount.__suppressDeprecationWarning !== true ? foundWillMountName = "componentWillMount" : typeof instance.UNSAFE_componentWillMount === "function" && (foundWillMountName = "UNSAFE_componentWillMount");
            typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true ? foundWillReceivePropsName = "componentWillReceiveProps" : typeof instance.UNSAFE_componentWillReceiveProps === "function" && (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps");
            typeof instance.componentWillUpdate === "function" && instance.componentWillUpdate.__suppressDeprecationWarning !== true ? foundWillUpdateName = "componentWillUpdate" : typeof instance.UNSAFE_componentWillUpdate === "function" && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
            if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
              var _componentName = getComponentNameFromType(type2) || "Component", newApiName = typeof type2.getDerivedStateFromProps === "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
              didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName), console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://react.dev/link/unsafe-component-lifecycles`, _componentName, newApiName, foundWillMountName !== null ? `
  ` + foundWillMountName : "", foundWillReceivePropsName !== null ? `
  ` + foundWillReceivePropsName : "", foundWillUpdateName !== null ? `
  ` + foundWillUpdateName : ""));
            }
          }
          var name2 = getComponentNameFromType(type2) || "Component";
          instance.render || (type2.prototype && typeof type2.prototype.render === "function" ? console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?", name2) : console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.", name2));
          !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state || console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", name2);
          instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved && console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", name2);
          instance.contextType && console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.", name2);
          type2.childContextTypes && !didWarnAboutChildContextTypes.has(type2) && (didWarnAboutChildContextTypes.add(type2), console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)", name2));
          type2.contextTypes && !didWarnAboutContextTypes$1.has(type2) && (didWarnAboutContextTypes$1.add(type2), console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", name2));
          typeof instance.componentShouldUpdate === "function" && console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", name2);
          type2.prototype && type2.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== "undefined" && console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(type2) || "A pure component");
          typeof instance.componentDidUnmount === "function" && console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", name2);
          typeof instance.componentDidReceiveProps === "function" && console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", name2);
          typeof instance.componentWillRecieveProps === "function" && console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", name2);
          typeof instance.UNSAFE_componentWillRecieveProps === "function" && console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", name2);
          var hasMutatedProps = instance.props !== resolvedProps;
          instance.props !== undefined && hasMutatedProps && console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", name2);
          instance.defaultProps && console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", name2, name2);
          typeof instance.getSnapshotBeforeUpdate !== "function" || typeof instance.componentDidUpdate === "function" || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type2) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type2), console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(type2)));
          typeof instance.getDerivedStateFromProps === "function" && console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name2);
          typeof instance.getDerivedStateFromError === "function" && console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name2);
          typeof type2.getSnapshotBeforeUpdate === "function" && console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", name2);
          var state = instance.state;
          state && (typeof state !== "object" || isArrayImpl(state)) && console.error("%s.state: must be set to an object or null", name2);
          typeof instance.getChildContext === "function" && typeof type2.childContextTypes !== "object" && console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", name2);
          var initialState = instance.state !== undefined ? instance.state : null;
          instance.updater = classComponentUpdater;
          instance.props = resolvedProps;
          instance.state = initialState;
          var internalInstance = { queue: [], replace: false };
          instance._reactInternals = internalInstance;
          var contextType$jscomp$0 = type2.contextType;
          instance.context = typeof contextType$jscomp$0 === "object" && contextType$jscomp$0 !== null ? contextType$jscomp$0._currentValue2 : emptyContextObject;
          if (instance.state === resolvedProps) {
            var componentName$jscomp$0 = getComponentNameFromType(type2) || "Component";
            didWarnAboutDirectlyAssigningPropsToState.has(componentName$jscomp$0) || (didWarnAboutDirectlyAssigningPropsToState.add(componentName$jscomp$0), console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", componentName$jscomp$0));
          }
          var getDerivedStateFromProps = type2.getDerivedStateFromProps;
          if (typeof getDerivedStateFromProps === "function") {
            var partialState = getDerivedStateFromProps(resolvedProps, initialState);
            if (partialState === undefined) {
              var componentName$jscomp$1 = getComponentNameFromType(type2) || "Component";
              didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1) || (didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1), console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", componentName$jscomp$1));
            }
            var JSCompiler_inline_result = partialState === null || partialState === undefined ? initialState : assign({}, initialState, partialState);
            instance.state = JSCompiler_inline_result;
          }
          if (typeof type2.getDerivedStateFromProps !== "function" && typeof instance.getSnapshotBeforeUpdate !== "function" && (typeof instance.UNSAFE_componentWillMount === "function" || typeof instance.componentWillMount === "function")) {
            var oldState = instance.state;
            if (typeof instance.componentWillMount === "function") {
              if (instance.componentWillMount.__suppressDeprecationWarning !== true) {
                var componentName$jscomp$2 = getComponentNameFromType(type2) || "Unknown";
                didWarnAboutDeprecatedWillMount[componentName$jscomp$2] || (console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.

Please update the following components: %s`, componentName$jscomp$2), didWarnAboutDeprecatedWillMount[componentName$jscomp$2] = true);
              }
              instance.componentWillMount();
            }
            typeof instance.UNSAFE_componentWillMount === "function" && instance.UNSAFE_componentWillMount();
            oldState !== instance.state && (console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", getComponentNameFromType(type2) || "Component"), classComponentUpdater.enqueueReplaceState(instance, instance.state, null));
            if (internalInstance.queue !== null && 0 < internalInstance.queue.length) {
              var { queue: oldQueue, replace: oldReplace } = internalInstance;
              internalInstance.queue = null;
              internalInstance.replace = false;
              if (oldReplace && oldQueue.length === 1)
                instance.state = oldQueue[0];
              else {
                for (var nextState = oldReplace ? oldQueue[0] : instance.state, dontMutate = true, i = oldReplace ? 1 : 0;i < oldQueue.length; i++) {
                  var partial2 = oldQueue[i], partialState$jscomp$0 = typeof partial2 === "function" ? partial2.call(instance, nextState, resolvedProps, undefined) : partial2;
                  partialState$jscomp$0 != null && (dontMutate ? (dontMutate = false, nextState = assign({}, nextState, partialState$jscomp$0)) : assign(nextState, partialState$jscomp$0));
                }
                instance.state = nextState;
              }
            } else
              internalInstance.queue = null;
          }
          var nextChildren = callRenderInDEV(instance);
          if (request2.status === 12)
            throw null;
          instance.props !== resolvedProps && (didWarnAboutReassigningProps || console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", getComponentNameFromType(type2) || "a component"), didWarnAboutReassigningProps = true);
          var prevKeyPath = task.keyPath;
          task.keyPath = keyPath;
          renderNodeDestructive(request2, task, nextChildren, -1);
          task.keyPath = prevKeyPath;
        } else {
          if (type2.prototype && typeof type2.prototype.render === "function") {
            var componentName$jscomp$3 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutBadClass[componentName$jscomp$3] || (console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName$jscomp$3, componentName$jscomp$3), didWarnAboutBadClass[componentName$jscomp$3] = true);
          }
          var value = renderWithHooks(request2, task, keyPath, type2, props, undefined);
          if (request2.status === 12)
            throw null;
          var hasId = localIdCounter !== 0, actionStateCount = actionStateCounter, actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;
          if (type2.contextTypes) {
            var _componentName$jscomp$0 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutContextTypes[_componentName$jscomp$0] || (didWarnAboutContextTypes[_componentName$jscomp$0] = true, console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)", _componentName$jscomp$0));
          }
          type2 && type2.childContextTypes && console.error(`childContextTypes cannot be defined on a function component.
  %s.childContextTypes = ...`, type2.displayName || type2.name || "Component");
          if (typeof type2.getDerivedStateFromProps === "function") {
            var componentName$jscomp$4 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4] || (console.error("%s: Function components do not support getDerivedStateFromProps.", componentName$jscomp$4), didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4] = true);
          }
          if (typeof type2.contextType === "object" && type2.contextType !== null) {
            var _componentName2 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutContextTypeOnFunctionComponent[_componentName2] || (console.error("%s: Function components do not support contextType.", _componentName2), didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true);
          }
          finishFunctionComponent(request2, task, keyPath, value, hasId, actionStateCount, actionStateMatchingIndex$jscomp$0);
        }
      else if (typeof type2 === "string") {
        var segment2 = task.blockedSegment;
        if (segment2 === null) {
          var children = props.children, prevContext = task.formatContext, prevKeyPath$jscomp$0 = task.keyPath;
          task.formatContext = getChildFormatContext(prevContext, type2, props);
          task.keyPath = keyPath;
          renderNode2(request2, task, children, -1);
          task.formatContext = prevContext;
          task.keyPath = prevKeyPath$jscomp$0;
        } else {
          var _children = pushStartInstance(segment2.chunks, type2, props, request2.resumableState, request2.renderState, task.blockedPreamble, task.hoistableState, task.formatContext, segment2.lastPushedText);
          segment2.lastPushedText = false;
          var { formatContext: _prevContext2, keyPath: _prevKeyPath3 } = task;
          task.keyPath = keyPath;
          if ((task.formatContext = getChildFormatContext(_prevContext2, type2, props)).insertionMode === HTML_HEAD_MODE) {
            var preambleSegment = createPendingSegment(request2, 0, null, task.formatContext, false, false);
            segment2.preambleChildren.push(preambleSegment);
            task.blockedSegment = preambleSegment;
            try {
              preambleSegment.status = 6, renderNode2(request2, task, _children, -1), pushSegmentFinale(preambleSegment.chunks, request2.renderState, preambleSegment.lastPushedText, preambleSegment.textEmbedded), preambleSegment.status = COMPLETED;
            } finally {
              task.blockedSegment = segment2;
            }
          } else
            renderNode2(request2, task, _children, -1);
          task.formatContext = _prevContext2;
          task.keyPath = _prevKeyPath3;
          a: {
            var target = segment2.chunks, resumableState = request2.resumableState;
            switch (type2) {
              case "title":
              case "style":
              case "script":
              case "area":
              case "base":
              case "br":
              case "col":
              case "embed":
              case "hr":
              case "img":
              case "input":
              case "keygen":
              case "link":
              case "meta":
              case "param":
              case "source":
              case "track":
              case "wbr":
                break a;
              case "body":
                if (_prevContext2.insertionMode <= HTML_HTML_MODE) {
                  resumableState.hasBody = true;
                  break a;
                }
                break;
              case "html":
                if (_prevContext2.insertionMode === ROOT_HTML_MODE) {
                  resumableState.hasHtml = true;
                  break a;
                }
                break;
              case "head":
                if (_prevContext2.insertionMode <= HTML_HTML_MODE)
                  break a;
            }
            target.push(endChunkForTag(type2));
          }
          segment2.lastPushedText = false;
        }
      } else {
        switch (type2) {
          case REACT_LEGACY_HIDDEN_TYPE:
          case REACT_STRICT_MODE_TYPE:
          case REACT_PROFILER_TYPE:
          case REACT_FRAGMENT_TYPE:
            var prevKeyPath$jscomp$1 = task.keyPath;
            task.keyPath = keyPath;
            renderNodeDestructive(request2, task, props.children, -1);
            task.keyPath = prevKeyPath$jscomp$1;
            return;
          case REACT_ACTIVITY_TYPE:
            var segment$jscomp$0 = task.blockedSegment;
            if (segment$jscomp$0 === null) {
              if (props.mode !== "hidden") {
                var prevKeyPath$jscomp$2 = task.keyPath;
                task.keyPath = keyPath;
                renderNode2(request2, task, props.children, -1);
                task.keyPath = prevKeyPath$jscomp$2;
              }
            } else if (props.mode !== "hidden") {
              request2.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("<!--&-->");
              segment$jscomp$0.lastPushedText = false;
              var _prevKeyPath4 = task.keyPath;
              task.keyPath = keyPath;
              renderNode2(request2, task, props.children, -1);
              task.keyPath = _prevKeyPath4;
              request2.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("<!--/&-->");
              segment$jscomp$0.lastPushedText = false;
            }
            return;
          case REACT_SUSPENSE_LIST_TYPE:
            a: {
              var { children: children$jscomp$0, revealOrder } = props;
              if (revealOrder === "forwards" || revealOrder === "backwards" || revealOrder === "unstable_legacy-backwards") {
                if (isArrayImpl(children$jscomp$0)) {
                  renderSuspenseListRows(request2, task, keyPath, children$jscomp$0, revealOrder);
                  break a;
                }
                var iteratorFn = getIteratorFn(children$jscomp$0);
                if (iteratorFn) {
                  var iterator = iteratorFn.call(children$jscomp$0);
                  if (iterator) {
                    validateIterable(task, children$jscomp$0, -1, iterator, iteratorFn);
                    var step = iterator.next();
                    if (!step.done) {
                      var rows = [];
                      do
                        rows.push(step.value), step = iterator.next();
                      while (!step.done);
                      renderSuspenseListRows(request2, task, keyPath, children$jscomp$0, revealOrder);
                    }
                    break a;
                  }
                }
              }
              if (revealOrder === "together") {
                var { keyPath: _prevKeyPath2, row: prevRow } = task, newRow = task.row = createSuspenseListRow(null);
                newRow.boundaries = [];
                newRow.together = true;
                task.keyPath = keyPath;
                renderNodeDestructive(request2, task, children$jscomp$0, -1);
                --newRow.pendingTasks === 0 && finishSuspenseListRow(request2, newRow);
                task.keyPath = _prevKeyPath2;
                task.row = prevRow;
                prevRow !== null && 0 < newRow.pendingTasks && (prevRow.pendingTasks++, newRow.next = prevRow);
              } else {
                var prevKeyPath$jscomp$3 = task.keyPath;
                task.keyPath = keyPath;
                renderNodeDestructive(request2, task, children$jscomp$0, -1);
                task.keyPath = prevKeyPath$jscomp$3;
              }
            }
            return;
          case REACT_VIEW_TRANSITION_TYPE:
          case REACT_SCOPE_TYPE:
            throw Error("ReactDOMServer does not yet support scope components.");
          case REACT_SUSPENSE_TYPE:
            a:
              if (task.replay !== null) {
                var { keyPath: _prevKeyPath, formatContext: _prevContext, row: _prevRow } = task;
                task.keyPath = keyPath;
                task.formatContext = getSuspenseContentFormatContext(request2.resumableState, _prevContext);
                task.row = null;
                var _content = props.children;
                try {
                  renderNode2(request2, task, _content, -1);
                } finally {
                  task.keyPath = _prevKeyPath, task.formatContext = _prevContext, task.row = _prevRow;
                }
              } else {
                var { keyPath: prevKeyPath$jscomp$4, formatContext: prevContext$jscomp$0, row: prevRow$jscomp$0, blockedBoundary: parentBoundary, blockedPreamble: parentPreamble, hoistableState: parentHoistableState, blockedSegment: parentSegment } = task, fallback = props.fallback, content = props.children, fallbackAbortSet = new Set;
                var newBoundary = createSuspenseBoundary(request2, task.row, fallbackAbortSet, null, null);
                request2.trackedPostpones !== null && (newBoundary.trackedContentKeyPath = keyPath);
                var boundarySegment = createPendingSegment(request2, parentSegment.chunks.length, newBoundary, task.formatContext, false, false);
                parentSegment.children.push(boundarySegment);
                parentSegment.lastPushedText = false;
                var contentRootSegment = createPendingSegment(request2, 0, null, task.formatContext, false, false);
                contentRootSegment.parentFlushed = true;
                if (request2.trackedPostpones !== null) {
                  var suspenseComponentStack = task.componentStack, fallbackKeyPath = [
                    keyPath[0],
                    "Suspense Fallback",
                    keyPath[2]
                  ], fallbackReplayNode = [
                    fallbackKeyPath[1],
                    fallbackKeyPath[2],
                    [],
                    null
                  ];
                  request2.trackedPostpones.workingMap.set(fallbackKeyPath, fallbackReplayNode);
                  newBoundary.trackedFallbackNode = fallbackReplayNode;
                  task.blockedSegment = boundarySegment;
                  task.blockedPreamble = newBoundary.fallbackPreamble;
                  task.keyPath = fallbackKeyPath;
                  task.formatContext = getSuspenseFallbackFormatContext(request2.resumableState, prevContext$jscomp$0);
                  task.componentStack = replaceSuspenseComponentStackWithSuspenseFallbackStack(suspenseComponentStack);
                  boundarySegment.status = 6;
                  try {
                    renderNode2(request2, task, fallback, -1), pushSegmentFinale(boundarySegment.chunks, request2.renderState, boundarySegment.lastPushedText, boundarySegment.textEmbedded), boundarySegment.status = COMPLETED;
                  } catch (thrownValue) {
                    throw boundarySegment.status = request2.status === 12 ? ABORTED : ERRORED, thrownValue;
                  } finally {
                    task.blockedSegment = parentSegment, task.blockedPreamble = parentPreamble, task.keyPath = prevKeyPath$jscomp$4, task.formatContext = prevContext$jscomp$0;
                  }
                  var suspendedPrimaryTask = createRenderTask(request2, null, content, -1, newBoundary, contentRootSegment, newBoundary.contentPreamble, newBoundary.contentState, task.abortSet, keyPath, getSuspenseContentFormatContext(request2.resumableState, task.formatContext), task.context, task.treeContext, null, suspenseComponentStack, emptyContextObject, task.debugTask);
                  pushComponentStack(suspendedPrimaryTask);
                  request2.pingedTasks.push(suspendedPrimaryTask);
                } else {
                  task.blockedBoundary = newBoundary;
                  task.blockedPreamble = newBoundary.contentPreamble;
                  task.hoistableState = newBoundary.contentState;
                  task.blockedSegment = contentRootSegment;
                  task.keyPath = keyPath;
                  task.formatContext = getSuspenseContentFormatContext(request2.resumableState, prevContext$jscomp$0);
                  task.row = null;
                  contentRootSegment.status = 6;
                  try {
                    if (renderNode2(request2, task, content, -1), pushSegmentFinale(contentRootSegment.chunks, request2.renderState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded), contentRootSegment.status = COMPLETED, queueCompletedSegment(newBoundary, contentRootSegment), newBoundary.pendingTasks === 0 && newBoundary.status === PENDING) {
                      if (newBoundary.status = COMPLETED, !isEligibleForOutlining(request2, newBoundary)) {
                        prevRow$jscomp$0 !== null && --prevRow$jscomp$0.pendingTasks === 0 && finishSuspenseListRow(request2, prevRow$jscomp$0);
                        request2.pendingRootTasks === 0 && task.blockedPreamble && preparePreamble(request2);
                        break a;
                      }
                    } else
                      prevRow$jscomp$0 !== null && prevRow$jscomp$0.together && tryToResolveTogetherRow(request2, prevRow$jscomp$0);
                  } catch (thrownValue$2) {
                    newBoundary.status = CLIENT_RENDERED;
                    if (request2.status === 12) {
                      contentRootSegment.status = ABORTED;
                      var error49 = request2.fatalError;
                    } else
                      contentRootSegment.status = ERRORED, error49 = thrownValue$2;
                    var thrownInfo = getThrownInfo(task.componentStack);
                    var errorDigest = logRecoverableError(request2, error49, thrownInfo, task.debugTask);
                    encodeErrorForBoundary(newBoundary, errorDigest, error49, thrownInfo, false);
                    untrackBoundary(request2, newBoundary);
                  } finally {
                    task.blockedBoundary = parentBoundary, task.blockedPreamble = parentPreamble, task.hoistableState = parentHoistableState, task.blockedSegment = parentSegment, task.keyPath = prevKeyPath$jscomp$4, task.formatContext = prevContext$jscomp$0, task.row = prevRow$jscomp$0;
                  }
                  var suspendedFallbackTask = createRenderTask(request2, null, fallback, -1, parentBoundary, boundarySegment, newBoundary.fallbackPreamble, newBoundary.fallbackState, fallbackAbortSet, [keyPath[0], "Suspense Fallback", keyPath[2]], getSuspenseFallbackFormatContext(request2.resumableState, task.formatContext), task.context, task.treeContext, task.row, replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack), emptyContextObject, task.debugTask);
                  pushComponentStack(suspendedFallbackTask);
                  request2.pingedTasks.push(suspendedFallbackTask);
                }
              }
            return;
        }
        if (typeof type2 === "object" && type2 !== null)
          switch (type2.$$typeof) {
            case REACT_FORWARD_REF_TYPE:
              if ("ref" in props) {
                var propsWithoutRef = {};
                for (var key in props)
                  key !== "ref" && (propsWithoutRef[key] = props[key]);
              } else
                propsWithoutRef = props;
              var children$jscomp$1 = renderWithHooks(request2, task, keyPath, type2.render, propsWithoutRef, ref);
              finishFunctionComponent(request2, task, keyPath, children$jscomp$1, localIdCounter !== 0, actionStateCounter, actionStateMatchingIndex);
              return;
            case REACT_MEMO_TYPE:
              renderElement(request2, task, keyPath, type2.type, props, ref);
              return;
            case REACT_CONTEXT_TYPE:
              var { value: value$jscomp$0, children: children$jscomp$2 } = props;
              var prevSnapshot = task.context;
              var prevKeyPath$jscomp$5 = task.keyPath;
              var prevValue = type2._currentValue2;
              type2._currentValue2 = value$jscomp$0;
              type2._currentRenderer2 !== undefined && type2._currentRenderer2 !== null && type2._currentRenderer2 !== rendererSigil && console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");
              type2._currentRenderer2 = rendererSigil;
              var prevNode = currentActiveSnapshot, newNode = {
                parent: prevNode,
                depth: prevNode === null ? 0 : prevNode.depth + 1,
                context: type2,
                parentValue: prevValue,
                value: value$jscomp$0
              };
              currentActiveSnapshot = newNode;
              task.context = newNode;
              task.keyPath = keyPath;
              renderNodeDestructive(request2, task, children$jscomp$2, -1);
              var prevSnapshot$jscomp$0 = currentActiveSnapshot;
              if (prevSnapshot$jscomp$0 === null)
                throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");
              prevSnapshot$jscomp$0.context !== type2 && console.error("The parent context is not the expected context. This is probably a bug in React.");
              prevSnapshot$jscomp$0.context._currentValue2 = prevSnapshot$jscomp$0.parentValue;
              type2._currentRenderer2 !== undefined && type2._currentRenderer2 !== null && type2._currentRenderer2 !== rendererSigil && console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");
              type2._currentRenderer2 = rendererSigil;
              var JSCompiler_inline_result$jscomp$0 = currentActiveSnapshot = prevSnapshot$jscomp$0.parent;
              task.context = JSCompiler_inline_result$jscomp$0;
              task.keyPath = prevKeyPath$jscomp$5;
              prevSnapshot !== task.context && console.error("Popping the context provider did not return back to the original snapshot. This is a bug in React.");
              return;
            case REACT_CONSUMER_TYPE:
              var context$jscomp$0 = type2._context, render2 = props.children;
              typeof render2 !== "function" && console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");
              var newChildren = render2(context$jscomp$0._currentValue2), prevKeyPath$jscomp$6 = task.keyPath;
              task.keyPath = keyPath;
              renderNodeDestructive(request2, task, newChildren, -1);
              task.keyPath = prevKeyPath$jscomp$6;
              return;
            case REACT_LAZY_TYPE:
              var Component = callLazyInitInDEV(type2);
              if (request2.status === 12)
                throw null;
              renderElement(request2, task, keyPath, Component, props, ref);
              return;
          }
        var info = "";
        if (type2 === undefined || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0)
          info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
        throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + ((type2 == null ? type2 : typeof type2) + "." + info));
      }
    }
    function resumeNode(request2, task, segmentId, node3, childIndex) {
      var { replay: prevReplay, blockedBoundary } = task, resumedSegment = createPendingSegment(request2, 0, null, task.formatContext, false, false);
      resumedSegment.id = segmentId;
      resumedSegment.parentFlushed = true;
      try {
        task.replay = null, task.blockedSegment = resumedSegment, renderNode2(request2, task, node3, childIndex), resumedSegment.status = COMPLETED, blockedBoundary === null ? request2.completedRootSegment = resumedSegment : (queueCompletedSegment(blockedBoundary, resumedSegment), blockedBoundary.parentFlushed && request2.partialBoundaries.push(blockedBoundary));
      } finally {
        task.replay = prevReplay, task.blockedSegment = null;
      }
    }
    function replayElement(request2, task, keyPath, name2, keyOrIndex, childIndex, type2, props, ref, replay) {
      childIndex = replay.nodes;
      for (var i = 0;i < childIndex.length; i++) {
        var node3 = childIndex[i];
        if (keyOrIndex === node3[1]) {
          if (node3.length === 4) {
            if (name2 !== null && name2 !== node3[0])
              throw Error("Expected the resume to render <" + node3[0] + "> in this slot but instead it rendered <" + name2 + ">. The tree doesn't match so React will fallback to client rendering.");
            var childNodes = node3[2];
            name2 = node3[3];
            keyOrIndex = task.node;
            task.replay = { nodes: childNodes, slots: name2, pendingTasks: 1 };
            try {
              renderElement(request2, task, keyPath, type2, props, ref);
              if (task.replay.pendingTasks === 1 && 0 < task.replay.nodes.length)
                throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
              task.replay.pendingTasks--;
            } catch (x3) {
              if (typeof x3 === "object" && x3 !== null && (x3 === SuspenseException || typeof x3.then === "function"))
                throw task.node === keyOrIndex ? task.replay = replay : childIndex.splice(i, 1), x3;
              task.replay.pendingTasks--;
              type2 = getThrownInfo(task.componentStack);
              props = request2;
              request2 = task.blockedBoundary;
              keyPath = x3;
              ref = name2;
              name2 = logRecoverableError(props, keyPath, type2, task.debugTask);
              abortRemainingReplayNodes(props, request2, childNodes, ref, keyPath, name2, type2, false);
            }
            task.replay = replay;
          } else {
            if (type2 !== REACT_SUSPENSE_TYPE)
              throw Error("Expected the resume to render <Suspense> in this slot but instead it rendered <" + (getComponentNameFromType(type2) || "Unknown") + ">. The tree doesn't match so React will fallback to client rendering.");
            a: {
              replay = undefined;
              name2 = node3[5];
              type2 = node3[2];
              ref = node3[3];
              keyOrIndex = node3[4] === null ? [] : node3[4][2];
              node3 = node3[4] === null ? null : node3[4][3];
              var { keyPath: prevKeyPath, formatContext: prevContext, row: prevRow, replay: previousReplaySet, blockedBoundary: parentBoundary, hoistableState: parentHoistableState } = task, content = props.children, fallback = props.fallback, fallbackAbortSet = new Set;
              props = createSuspenseBoundary(request2, task.row, fallbackAbortSet, null, null);
              props.parentFlushed = true;
              props.rootSegmentID = name2;
              task.blockedBoundary = props;
              task.hoistableState = props.contentState;
              task.keyPath = keyPath;
              task.formatContext = getSuspenseContentFormatContext(request2.resumableState, prevContext);
              task.row = null;
              task.replay = { nodes: type2, slots: ref, pendingTasks: 1 };
              try {
                renderNode2(request2, task, content, -1);
                if (task.replay.pendingTasks === 1 && 0 < task.replay.nodes.length)
                  throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
                task.replay.pendingTasks--;
                if (props.pendingTasks === 0 && props.status === PENDING) {
                  props.status = COMPLETED;
                  request2.completedBoundaries.push(props);
                  break a;
                }
              } catch (error49) {
                props.status = CLIENT_RENDERED, childNodes = getThrownInfo(task.componentStack), replay = logRecoverableError(request2, error49, childNodes, task.debugTask), encodeErrorForBoundary(props, replay, error49, childNodes, false), task.replay.pendingTasks--, request2.clientRenderedBoundaries.push(props);
              } finally {
                task.blockedBoundary = parentBoundary, task.hoistableState = parentHoistableState, task.replay = previousReplaySet, task.keyPath = prevKeyPath, task.formatContext = prevContext, task.row = prevRow;
              }
              props = createReplayTask(request2, null, { nodes: keyOrIndex, slots: node3, pendingTasks: 0 }, fallback, -1, parentBoundary, props.fallbackState, fallbackAbortSet, [keyPath[0], "Suspense Fallback", keyPath[2]], getSuspenseFallbackFormatContext(request2.resumableState, task.formatContext), task.context, task.treeContext, task.row, replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack), emptyContextObject, task.debugTask);
              pushComponentStack(props);
              request2.pingedTasks.push(props);
            }
          }
          childIndex.splice(i, 1);
          break;
        }
      }
    }
    function validateIterable(task, iterable, childIndex, iterator, iteratorFn) {
      if (iterator === iterable) {
        if (childIndex !== -1 || task.componentStack === null || typeof task.componentStack.type !== "function" || Object.prototype.toString.call(task.componentStack.type) !== "[object GeneratorFunction]" || Object.prototype.toString.call(iterator) !== "[object Generator]")
          didWarnAboutGenerators || console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."), didWarnAboutGenerators = true;
      } else
        iterable.entries !== iteratorFn || didWarnAboutMaps || (console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = true);
    }
    function renderNodeDestructive(request2, task, node3, childIndex) {
      task.replay !== null && typeof task.replay.slots === "number" ? resumeNode(request2, task, task.replay.slots, node3, childIndex) : (task.node = node3, task.childIndex = childIndex, node3 = task.componentStack, childIndex = task.debugTask, pushComponentStack(task), retryNode(request2, task), task.componentStack = node3, task.debugTask = childIndex);
    }
    function retryNode(request2, task) {
      var { node: node3, childIndex } = task;
      if (node3 !== null) {
        if (typeof node3 === "object") {
          switch (node3.$$typeof) {
            case REACT_ELEMENT_TYPE:
              var { type: type2, key } = node3;
              node3 = node3.props;
              var refProp = node3.ref;
              refProp = refProp !== undefined ? refProp : null;
              var debugTask = task.debugTask, name2 = getComponentNameFromType(type2);
              key = key == null ? childIndex === -1 ? 0 : childIndex : key;
              var keyPath = [task.keyPath, name2, key];
              task.replay !== null ? debugTask ? debugTask.run(replayElement.bind(null, request2, task, keyPath, name2, key, childIndex, type2, node3, refProp, task.replay)) : replayElement(request2, task, keyPath, name2, key, childIndex, type2, node3, refProp, task.replay) : debugTask ? debugTask.run(renderElement.bind(null, request2, task, keyPath, type2, node3, refProp)) : renderElement(request2, task, keyPath, type2, node3, refProp);
              return;
            case REACT_PORTAL_TYPE:
              throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");
            case REACT_LAZY_TYPE:
              type2 = callLazyInitInDEV(node3);
              if (request2.status === 12)
                throw null;
              renderNodeDestructive(request2, task, type2, childIndex);
              return;
          }
          if (isArrayImpl(node3)) {
            renderChildrenArray(request2, task, node3, childIndex);
            return;
          }
          if (key = getIteratorFn(node3)) {
            if (type2 = key.call(node3)) {
              validateIterable(task, node3, childIndex, type2, key);
              node3 = type2.next();
              if (!node3.done) {
                key = [];
                do
                  key.push(node3.value), node3 = type2.next();
                while (!node3.done);
                renderChildrenArray(request2, task, key, childIndex);
              }
              return;
            }
          }
          if (typeof node3.then === "function")
            return task.thenableState = null, renderNodeDestructive(request2, task, unwrapThenable(node3), childIndex);
          if (node3.$$typeof === REACT_CONTEXT_TYPE)
            return renderNodeDestructive(request2, task, node3._currentValue2, childIndex);
          request2 = Object.prototype.toString.call(node3);
          throw Error("Objects are not valid as a React child (found: " + (request2 === "[object Object]" ? "object with keys {" + Object.keys(node3).join(", ") + "}" : request2) + "). If you meant to render a collection of children, use an array instead.");
        }
        typeof node3 === "string" ? (task = task.blockedSegment, task !== null && (task.lastPushedText = pushTextInstance(task.chunks, node3, request2.renderState, task.lastPushedText))) : typeof node3 === "number" || typeof node3 === "bigint" ? (task = task.blockedSegment, task !== null && (task.lastPushedText = pushTextInstance(task.chunks, "" + node3, request2.renderState, task.lastPushedText))) : (typeof node3 === "function" && (request2 = node3.displayName || node3.name || "Component", console.error("Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.", request2, request2)), typeof node3 === "symbol" && console.error(`Symbols are not valid as a React child.
  %s`, String(node3)));
      }
    }
    function warnForMissingKey(request2, task, child) {
      if (child !== null && typeof child === "object" && (child.$$typeof === REACT_ELEMENT_TYPE || child.$$typeof === REACT_PORTAL_TYPE) && child._store && (!child._store.validated && child.key == null || child._store.validated === 2)) {
        if (typeof child._store !== "object")
          throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");
        child._store.validated = 1;
        var didWarnForKey = request2.didWarnForKey;
        didWarnForKey == null && (didWarnForKey = request2.didWarnForKey = new WeakSet);
        request2 = task.componentStack;
        if (request2 !== null && !didWarnForKey.has(request2)) {
          didWarnForKey.add(request2);
          var componentName = getComponentNameFromType(child.type);
          didWarnForKey = child._owner;
          var parentOwner = request2.owner;
          request2 = "";
          if (parentOwner && typeof parentOwner.type !== "undefined") {
            var name2 = getComponentNameFromType(parentOwner.type);
            name2 && (request2 = `

Check the render method of \`` + name2 + "`.");
          }
          request2 || componentName && (request2 = `

Check the top-level render call using <` + componentName + ">.");
          componentName = "";
          didWarnForKey != null && parentOwner !== didWarnForKey && (parentOwner = null, typeof didWarnForKey.type !== "undefined" ? parentOwner = getComponentNameFromType(didWarnForKey.type) : typeof didWarnForKey.name === "string" && (parentOwner = didWarnForKey.name), parentOwner && (componentName = " It was passed a child from " + parentOwner + "."));
          didWarnForKey = task.componentStack;
          task.componentStack = {
            parent: task.componentStack,
            type: child.type,
            owner: child._owner,
            stack: child._debugStack
          };
          console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', request2, componentName);
          task.componentStack = didWarnForKey;
        }
      }
    }
    function renderChildrenArray(request2, task, children, childIndex) {
      var { keyPath: prevKeyPath, componentStack: previousComponentStack } = task;
      var previousDebugTask = task.debugTask;
      pushServerComponentStack(task, task.node._debugInfo);
      if (childIndex !== -1 && (task.keyPath = [task.keyPath, "Fragment", childIndex], task.replay !== null)) {
        for (var replay = task.replay, replayNodes = replay.nodes, j3 = 0;j3 < replayNodes.length; j3++) {
          var node3 = replayNodes[j3];
          if (node3[1] === childIndex) {
            childIndex = node3[2];
            node3 = node3[3];
            task.replay = { nodes: childIndex, slots: node3, pendingTasks: 1 };
            try {
              renderChildrenArray(request2, task, children, -1);
              if (task.replay.pendingTasks === 1 && 0 < task.replay.nodes.length)
                throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
              task.replay.pendingTasks--;
            } catch (x3) {
              if (typeof x3 === "object" && x3 !== null && (x3 === SuspenseException || typeof x3.then === "function"))
                throw x3;
              task.replay.pendingTasks--;
              var thrownInfo = getThrownInfo(task.componentStack);
              children = task.blockedBoundary;
              var error49 = x3, resumeSlots = node3;
              node3 = logRecoverableError(request2, error49, thrownInfo, task.debugTask);
              abortRemainingReplayNodes(request2, children, childIndex, resumeSlots, error49, node3, thrownInfo, false);
            }
            task.replay = replay;
            replayNodes.splice(j3, 1);
            break;
          }
        }
        task.keyPath = prevKeyPath;
        task.componentStack = previousComponentStack;
        task.debugTask = previousDebugTask;
        return;
      }
      replay = task.treeContext;
      replayNodes = children.length;
      if (task.replay !== null && (j3 = task.replay.slots, j3 !== null && typeof j3 === "object")) {
        for (childIndex = 0;childIndex < replayNodes; childIndex++)
          node3 = children[childIndex], task.treeContext = pushTreeContext(replay, replayNodes, childIndex), error49 = j3[childIndex], typeof error49 === "number" ? (resumeNode(request2, task, error49, node3, childIndex), delete j3[childIndex]) : renderNode2(request2, task, node3, childIndex);
        task.treeContext = replay;
        task.keyPath = prevKeyPath;
        task.componentStack = previousComponentStack;
        task.debugTask = previousDebugTask;
        return;
      }
      for (j3 = 0;j3 < replayNodes; j3++)
        childIndex = children[j3], warnForMissingKey(request2, task, childIndex), task.treeContext = pushTreeContext(replay, replayNodes, j3), renderNode2(request2, task, childIndex, j3);
      task.treeContext = replay;
      task.keyPath = prevKeyPath;
      task.componentStack = previousComponentStack;
      task.debugTask = previousDebugTask;
    }
    function trackPostponedBoundary(request2, trackedPostpones, boundary) {
      boundary.status = POSTPONED;
      boundary.rootSegmentID = request2.nextSegmentId++;
      request2 = boundary.trackedContentKeyPath;
      if (request2 === null)
        throw Error("It should not be possible to postpone at the root. This is a bug in React.");
      var fallbackReplayNode = boundary.trackedFallbackNode, children = [], boundaryNode = trackedPostpones.workingMap.get(request2);
      if (boundaryNode === undefined)
        return boundary = [
          request2[1],
          request2[2],
          children,
          null,
          fallbackReplayNode,
          boundary.rootSegmentID
        ], trackedPostpones.workingMap.set(request2, boundary), addToReplayParent(boundary, request2[0], trackedPostpones), boundary;
      boundaryNode[4] = fallbackReplayNode;
      boundaryNode[5] = boundary.rootSegmentID;
      return boundaryNode;
    }
    function trackPostpone(request2, trackedPostpones, task, segment2) {
      segment2.status = POSTPONED;
      var { keyPath, blockedBoundary: boundary } = task;
      if (boundary === null)
        segment2.id = request2.nextSegmentId++, trackedPostpones.rootSlots = segment2.id, request2.completedRootSegment !== null && (request2.completedRootSegment.status = POSTPONED);
      else {
        if (boundary !== null && boundary.status === PENDING) {
          var boundaryNode = trackPostponedBoundary(request2, trackedPostpones, boundary);
          if (boundary.trackedContentKeyPath === keyPath && task.childIndex === -1) {
            segment2.id === -1 && (segment2.id = segment2.parentFlushed ? boundary.rootSegmentID : request2.nextSegmentId++);
            boundaryNode[3] = segment2.id;
            return;
          }
        }
        segment2.id === -1 && (segment2.id = segment2.parentFlushed && boundary !== null ? boundary.rootSegmentID : request2.nextSegmentId++);
        if (task.childIndex === -1)
          keyPath === null ? trackedPostpones.rootSlots = segment2.id : (task = trackedPostpones.workingMap.get(keyPath), task === undefined ? (task = [keyPath[1], keyPath[2], [], segment2.id], addToReplayParent(task, keyPath[0], trackedPostpones)) : task[3] = segment2.id);
        else {
          if (keyPath === null)
            if (request2 = trackedPostpones.rootSlots, request2 === null)
              request2 = trackedPostpones.rootSlots = {};
            else {
              if (typeof request2 === "number")
                throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.");
            }
          else if (boundary = trackedPostpones.workingMap, boundaryNode = boundary.get(keyPath), boundaryNode === undefined)
            request2 = {}, boundaryNode = [keyPath[1], keyPath[2], [], request2], boundary.set(keyPath, boundaryNode), addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);
          else if (request2 = boundaryNode[3], request2 === null)
            request2 = boundaryNode[3] = {};
          else if (typeof request2 === "number")
            throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.");
          request2[task.childIndex] = segment2.id;
        }
      }
    }
    function untrackBoundary(request2, boundary) {
      request2 = request2.trackedPostpones;
      request2 !== null && (boundary = boundary.trackedContentKeyPath, boundary !== null && (boundary = request2.workingMap.get(boundary), boundary !== undefined && (boundary.length = 4, boundary[2] = [], boundary[3] = null)));
    }
    function spawnNewSuspendedReplayTask(request2, task, thenableState2) {
      return createReplayTask(request2, thenableState2, task.replay, task.node, task.childIndex, task.blockedBoundary, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.context, task.treeContext, task.row, task.componentStack, emptyContextObject, task.debugTask);
    }
    function spawnNewSuspendedRenderTask(request2, task, thenableState2) {
      var segment2 = task.blockedSegment, newSegment = createPendingSegment(request2, segment2.chunks.length, null, task.formatContext, segment2.lastPushedText, true);
      segment2.children.push(newSegment);
      segment2.lastPushedText = false;
      return createRenderTask(request2, thenableState2, task.node, task.childIndex, task.blockedBoundary, newSegment, task.blockedPreamble, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.context, task.treeContext, task.row, task.componentStack, emptyContextObject, task.debugTask);
    }
    function renderNode2(request2, task, node3, childIndex) {
      var { formatContext: previousFormatContext, context: previousContext, keyPath: previousKeyPath, treeContext: previousTreeContext, componentStack: previousComponentStack, debugTask: previousDebugTask, blockedSegment: segment2 } = task;
      if (segment2 === null) {
        segment2 = task.replay;
        try {
          return renderNodeDestructive(request2, task, node3, childIndex);
        } catch (thrownValue) {
          if (resetHooksState(), node3 = thrownValue === SuspenseException ? getSuspendedThenable() : thrownValue, request2.status !== 12 && typeof node3 === "object" && node3 !== null) {
            if (typeof node3.then === "function") {
              childIndex = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
              request2 = spawnNewSuspendedReplayTask(request2, task, childIndex).ping;
              node3.then(request2, request2);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.replay = segment2;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
            if (node3.message === "Maximum call stack size exceeded") {
              node3 = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
              node3 = spawnNewSuspendedReplayTask(request2, task, node3);
              request2.pingedTasks.push(node3);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.replay = segment2;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
          }
        }
      } else {
        var childrenLength = segment2.children.length, chunkLength = segment2.chunks.length;
        try {
          return renderNodeDestructive(request2, task, node3, childIndex);
        } catch (thrownValue$3) {
          if (resetHooksState(), segment2.children.length = childrenLength, segment2.chunks.length = chunkLength, node3 = thrownValue$3 === SuspenseException ? getSuspendedThenable() : thrownValue$3, request2.status !== 12 && typeof node3 === "object" && node3 !== null) {
            if (typeof node3.then === "function") {
              segment2 = node3;
              node3 = thrownValue$3 === SuspenseException ? getThenableStateAfterSuspending() : null;
              request2 = spawnNewSuspendedRenderTask(request2, task, node3).ping;
              segment2.then(request2, request2);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
            if (node3.message === "Maximum call stack size exceeded") {
              segment2 = thrownValue$3 === SuspenseException ? getThenableStateAfterSuspending() : null;
              segment2 = spawnNewSuspendedRenderTask(request2, task, segment2);
              request2.pingedTasks.push(segment2);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
          }
        }
      }
      task.formatContext = previousFormatContext;
      task.context = previousContext;
      task.keyPath = previousKeyPath;
      task.treeContext = previousTreeContext;
      switchContext(previousContext);
      throw node3;
    }
    function abortTaskSoft(task) {
      var { blockedBoundary: boundary, blockedSegment: segment2 } = task;
      segment2 !== null && (segment2.status = ABORTED, finishedTask(this, boundary, task.row, segment2));
    }
    function abortRemainingReplayNodes(request$jscomp$0, boundary, nodes, slots, error$jscomp$0, errorDigest$jscomp$0, errorInfo$jscomp$0, aborted2) {
      for (var i = 0;i < nodes.length; i++) {
        var node3 = nodes[i];
        if (node3.length === 4)
          abortRemainingReplayNodes(request$jscomp$0, boundary, node3[2], node3[3], error$jscomp$0, errorDigest$jscomp$0, errorInfo$jscomp$0, aborted2);
        else {
          var request2 = request$jscomp$0;
          node3 = node3[5];
          var error49 = error$jscomp$0, errorDigest = errorDigest$jscomp$0, errorInfo = errorInfo$jscomp$0, wasAborted = aborted2, resumedBoundary = createSuspenseBoundary(request2, null, new Set, null, null);
          resumedBoundary.parentFlushed = true;
          resumedBoundary.rootSegmentID = node3;
          resumedBoundary.status = CLIENT_RENDERED;
          encodeErrorForBoundary(resumedBoundary, errorDigest, error49, errorInfo, wasAborted);
          resumedBoundary.parentFlushed && request2.clientRenderedBoundaries.push(resumedBoundary);
        }
      }
      nodes.length = 0;
      if (slots !== null) {
        if (boundary === null)
          throw Error("We should not have any resumable nodes in the shell. This is a bug in React.");
        boundary.status !== CLIENT_RENDERED && (boundary.status = CLIENT_RENDERED, encodeErrorForBoundary(boundary, errorDigest$jscomp$0, error$jscomp$0, errorInfo$jscomp$0, aborted2), boundary.parentFlushed && request$jscomp$0.clientRenderedBoundaries.push(boundary));
        if (typeof slots === "object")
          for (var index2 in slots)
            delete slots[index2];
      }
    }
    function abortTask(task, request2, error49) {
      var { blockedBoundary: boundary, blockedSegment: segment2 } = task;
      if (segment2 !== null) {
        if (segment2.status === 6)
          return;
        segment2.status = ABORTED;
      }
      var errorInfo = getThrownInfo(task.componentStack), node3 = task.node;
      node3 !== null && typeof node3 === "object" && pushHaltedAwaitOnComponentStack(task, node3._debugInfo);
      if (boundary === null) {
        if (request2.status !== 13 && request2.status !== CLOSED) {
          boundary = task.replay;
          if (boundary === null) {
            request2.trackedPostpones !== null && segment2 !== null ? (boundary = request2.trackedPostpones, logRecoverableError(request2, error49, errorInfo, task.debugTask), trackPostpone(request2, boundary, task, segment2), finishedTask(request2, null, task.row, segment2)) : (logRecoverableError(request2, error49, errorInfo, task.debugTask), fatalError(request2, error49, errorInfo, task.debugTask));
            return;
          }
          boundary.pendingTasks--;
          boundary.pendingTasks === 0 && 0 < boundary.nodes.length && (segment2 = logRecoverableError(request2, error49, errorInfo, null), abortRemainingReplayNodes(request2, null, boundary.nodes, boundary.slots, error49, segment2, errorInfo, true));
          request2.pendingRootTasks--;
          request2.pendingRootTasks === 0 && completeShell(request2);
        }
      } else {
        node3 = request2.trackedPostpones;
        if (boundary.status !== CLIENT_RENDERED) {
          if (node3 !== null && segment2 !== null)
            return logRecoverableError(request2, error49, errorInfo, task.debugTask), trackPostpone(request2, node3, task, segment2), boundary.fallbackAbortableTasks.forEach(function(fallbackTask) {
              return abortTask(fallbackTask, request2, error49);
            }), boundary.fallbackAbortableTasks.clear(), finishedTask(request2, boundary, task.row, segment2);
          boundary.status = CLIENT_RENDERED;
          segment2 = logRecoverableError(request2, error49, errorInfo, task.debugTask);
          boundary.status = CLIENT_RENDERED;
          encodeErrorForBoundary(boundary, segment2, error49, errorInfo, true);
          untrackBoundary(request2, boundary);
          boundary.parentFlushed && request2.clientRenderedBoundaries.push(boundary);
        }
        boundary.pendingTasks--;
        errorInfo = boundary.row;
        errorInfo !== null && --errorInfo.pendingTasks === 0 && finishSuspenseListRow(request2, errorInfo);
        boundary.fallbackAbortableTasks.forEach(function(fallbackTask) {
          return abortTask(fallbackTask, request2, error49);
        });
        boundary.fallbackAbortableTasks.clear();
      }
      task = task.row;
      task !== null && --task.pendingTasks === 0 && finishSuspenseListRow(request2, task);
      request2.allPendingTasks--;
      request2.allPendingTasks === 0 && completeAll(request2);
    }
    function safelyEmitEarlyPreloads(request2, shellComplete) {
      try {
        var renderState = request2.renderState, onHeaders = renderState.onHeaders;
        if (onHeaders) {
          var headers = renderState.headers;
          if (headers) {
            renderState.headers = null;
            var linkHeader = headers.preconnects;
            headers.fontPreloads && (linkHeader && (linkHeader += ", "), linkHeader += headers.fontPreloads);
            headers.highImagePreloads && (linkHeader && (linkHeader += ", "), linkHeader += headers.highImagePreloads);
            if (!shellComplete) {
              var queueIter = renderState.styles.values(), queueStep = queueIter.next();
              b:
                for (;0 < headers.remainingCapacity && !queueStep.done; queueStep = queueIter.next())
                  for (var sheetIter = queueStep.value.sheets.values(), sheetStep = sheetIter.next();0 < headers.remainingCapacity && !sheetStep.done; sheetStep = sheetIter.next()) {
                    var sheet = sheetStep.value, props = sheet.props, key = props.href, props$jscomp$0 = sheet.props;
                    var header = getPreloadAsHeader(props$jscomp$0.href, "style", {
                      crossOrigin: props$jscomp$0.crossOrigin,
                      integrity: props$jscomp$0.integrity,
                      nonce: props$jscomp$0.nonce,
                      type: props$jscomp$0.type,
                      fetchPriority: props$jscomp$0.fetchPriority,
                      referrerPolicy: props$jscomp$0.referrerPolicy,
                      media: props$jscomp$0.media
                    });
                    if (0 <= (headers.remainingCapacity -= header.length + 2))
                      renderState.resets.style[key] = PRELOAD_NO_CREDS, linkHeader && (linkHeader += ", "), linkHeader += header, renderState.resets.style[key] = typeof props.crossOrigin === "string" || typeof props.integrity === "string" ? [props.crossOrigin, props.integrity] : PRELOAD_NO_CREDS;
                    else
                      break b;
                  }
            }
            linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});
          }
        }
      } catch (error49) {
        logRecoverableError(request2, error49, {}, null);
      }
    }
    function completeShell(request2) {
      request2.trackedPostpones === null && safelyEmitEarlyPreloads(request2, true);
      request2.trackedPostpones === null && preparePreamble(request2);
      request2.onShellError = noop;
      request2 = request2.onShellReady;
      request2();
    }
    function completeAll(request2) {
      safelyEmitEarlyPreloads(request2, request2.trackedPostpones === null ? true : request2.completedRootSegment === null || request2.completedRootSegment.status !== POSTPONED);
      preparePreamble(request2);
      request2 = request2.onAllReady;
      request2();
    }
    function queueCompletedSegment(boundary, segment2) {
      if (segment2.chunks.length === 0 && segment2.children.length === 1 && segment2.children[0].boundary === null && segment2.children[0].id === -1) {
        var childSegment = segment2.children[0];
        childSegment.id = segment2.id;
        childSegment.parentFlushed = true;
        childSegment.status !== COMPLETED && childSegment.status !== ABORTED && childSegment.status !== ERRORED || queueCompletedSegment(boundary, childSegment);
      } else
        boundary.completedSegments.push(segment2);
    }
    function finishedTask(request2, boundary, row, segment2) {
      row !== null && (--row.pendingTasks === 0 ? finishSuspenseListRow(request2, row) : row.together && tryToResolveTogetherRow(request2, row));
      request2.allPendingTasks--;
      if (boundary === null) {
        if (segment2 !== null && segment2.parentFlushed) {
          if (request2.completedRootSegment !== null)
            throw Error("There can only be one root segment. This is a bug in React.");
          request2.completedRootSegment = segment2;
        }
        request2.pendingRootTasks--;
        request2.pendingRootTasks === 0 && completeShell(request2);
      } else if (boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED)
        if (boundary.pendingTasks === 0)
          if (boundary.status === PENDING && (boundary.status = COMPLETED), segment2 !== null && segment2.parentFlushed && (segment2.status === COMPLETED || segment2.status === ABORTED) && queueCompletedSegment(boundary, segment2), boundary.parentFlushed && request2.completedBoundaries.push(boundary), boundary.status === COMPLETED)
            row = boundary.row, row !== null && hoistHoistables(row.hoistables, boundary.contentState), isEligibleForOutlining(request2, boundary) || (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request2), boundary.fallbackAbortableTasks.clear(), row !== null && --row.pendingTasks === 0 && finishSuspenseListRow(request2, row)), request2.pendingRootTasks === 0 && request2.trackedPostpones === null && boundary.contentPreamble !== null && preparePreamble(request2);
          else {
            if (boundary.status === POSTPONED && (boundary = boundary.row, boundary !== null)) {
              if (request2.trackedPostpones !== null) {
                row = request2.trackedPostpones;
                var postponedRow = boundary.next;
                if (postponedRow !== null && (segment2 = postponedRow.boundaries, segment2 !== null))
                  for (postponedRow.boundaries = null, postponedRow = 0;postponedRow < segment2.length; postponedRow++) {
                    var postponedBoundary = segment2[postponedRow];
                    trackPostponedBoundary(request2, row, postponedBoundary);
                    finishedTask(request2, postponedBoundary, null, null);
                  }
              }
              --boundary.pendingTasks === 0 && finishSuspenseListRow(request2, boundary);
            }
          }
        else
          segment2 === null || !segment2.parentFlushed || segment2.status !== COMPLETED && segment2.status !== ABORTED || (queueCompletedSegment(boundary, segment2), boundary.completedSegments.length === 1 && boundary.parentFlushed && request2.partialBoundaries.push(boundary)), boundary = boundary.row, boundary !== null && boundary.together && tryToResolveTogetherRow(request2, boundary);
      request2.allPendingTasks === 0 && completeAll(request2);
    }
    function performWork(request$jscomp$2) {
      if (request$jscomp$2.status !== CLOSED && request$jscomp$2.status !== 13) {
        var prevContext = currentActiveSnapshot, prevDispatcher = ReactSharedInternals.H;
        ReactSharedInternals.H = HooksDispatcher;
        var prevAsyncDispatcher = ReactSharedInternals.A;
        ReactSharedInternals.A = DefaultAsyncDispatcher;
        var prevRequest = currentRequest;
        currentRequest = request$jscomp$2;
        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
        var prevResumableState = currentResumableState;
        currentResumableState = request$jscomp$2.resumableState;
        try {
          var pingedTasks = request$jscomp$2.pingedTasks, i;
          for (i = 0;i < pingedTasks.length; i++) {
            var request2 = request$jscomp$2, task = pingedTasks[i], segment2 = task.blockedSegment;
            if (segment2 === null) {
              var prevTaskInDEV = undefined, request$jscomp$0 = request2;
              request2 = task;
              if (request2.replay.pendingTasks !== 0) {
                switchContext(request2.context);
                prevTaskInDEV = currentTaskInDEV;
                currentTaskInDEV = request2;
                try {
                  typeof request2.replay.slots === "number" ? resumeNode(request$jscomp$0, request2, request2.replay.slots, request2.node, request2.childIndex) : retryNode(request$jscomp$0, request2);
                  if (request2.replay.pendingTasks === 1 && 0 < request2.replay.nodes.length)
                    throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
                  request2.replay.pendingTasks--;
                  request2.abortSet.delete(request2);
                  finishedTask(request$jscomp$0, request2.blockedBoundary, request2.row, null);
                } catch (thrownValue) {
                  resetHooksState();
                  var x3 = thrownValue === SuspenseException ? getSuspendedThenable() : thrownValue;
                  if (typeof x3 === "object" && x3 !== null && typeof x3.then === "function") {
                    var ping = request2.ping;
                    x3.then(ping, ping);
                    request2.thenableState = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
                  } else {
                    request2.replay.pendingTasks--;
                    request2.abortSet.delete(request2);
                    var errorInfo = getThrownInfo(request2.componentStack), errorDigest = undefined, request$jscomp$1 = request$jscomp$0, boundary = request2.blockedBoundary, error$jscomp$0 = request$jscomp$0.status === 12 ? request$jscomp$0.fatalError : x3, errorInfo$jscomp$0 = errorInfo, replayNodes = request2.replay.nodes, resumeSlots = request2.replay.slots;
                    errorDigest = logRecoverableError(request$jscomp$1, error$jscomp$0, errorInfo$jscomp$0, request2.debugTask);
                    abortRemainingReplayNodes(request$jscomp$1, boundary, replayNodes, resumeSlots, error$jscomp$0, errorDigest, errorInfo$jscomp$0, false);
                    request$jscomp$0.pendingRootTasks--;
                    request$jscomp$0.pendingRootTasks === 0 && completeShell(request$jscomp$0);
                    request$jscomp$0.allPendingTasks--;
                    request$jscomp$0.allPendingTasks === 0 && completeAll(request$jscomp$0);
                  }
                } finally {
                  currentTaskInDEV = prevTaskInDEV;
                }
              }
            } else if (request$jscomp$0 = prevTaskInDEV = undefined, errorDigest = task, request$jscomp$1 = segment2, request$jscomp$1.status === PENDING) {
              request$jscomp$1.status = 6;
              switchContext(errorDigest.context);
              request$jscomp$0 = currentTaskInDEV;
              currentTaskInDEV = errorDigest;
              var childrenLength = request$jscomp$1.children.length, chunkLength = request$jscomp$1.chunks.length;
              try {
                retryNode(request2, errorDigest), pushSegmentFinale(request$jscomp$1.chunks, request2.renderState, request$jscomp$1.lastPushedText, request$jscomp$1.textEmbedded), errorDigest.abortSet.delete(errorDigest), request$jscomp$1.status = COMPLETED, finishedTask(request2, errorDigest.blockedBoundary, errorDigest.row, request$jscomp$1);
              } catch (thrownValue) {
                resetHooksState();
                request$jscomp$1.children.length = childrenLength;
                request$jscomp$1.chunks.length = chunkLength;
                var x$jscomp$0 = thrownValue === SuspenseException ? getSuspendedThenable() : request2.status === 12 ? request2.fatalError : thrownValue;
                if (request2.status === 12 && request2.trackedPostpones !== null) {
                  var trackedPostpones = request2.trackedPostpones, thrownInfo = getThrownInfo(errorDigest.componentStack);
                  errorDigest.abortSet.delete(errorDigest);
                  logRecoverableError(request2, x$jscomp$0, thrownInfo, errorDigest.debugTask);
                  trackPostpone(request2, trackedPostpones, errorDigest, request$jscomp$1);
                  finishedTask(request2, errorDigest.blockedBoundary, errorDigest.row, request$jscomp$1);
                } else if (typeof x$jscomp$0 === "object" && x$jscomp$0 !== null && typeof x$jscomp$0.then === "function") {
                  request$jscomp$1.status = PENDING;
                  errorDigest.thenableState = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
                  var ping$jscomp$0 = errorDigest.ping;
                  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
                } else {
                  var errorInfo$jscomp$1 = getThrownInfo(errorDigest.componentStack);
                  errorDigest.abortSet.delete(errorDigest);
                  request$jscomp$1.status = ERRORED;
                  var { blockedBoundary: boundary$jscomp$0, row, debugTask } = errorDigest;
                  row !== null && --row.pendingTasks === 0 && finishSuspenseListRow(request2, row);
                  request2.allPendingTasks--;
                  prevTaskInDEV = logRecoverableError(request2, x$jscomp$0, errorInfo$jscomp$1, debugTask);
                  if (boundary$jscomp$0 === null)
                    fatalError(request2, x$jscomp$0, errorInfo$jscomp$1, debugTask);
                  else if (boundary$jscomp$0.pendingTasks--, boundary$jscomp$0.status !== CLIENT_RENDERED) {
                    boundary$jscomp$0.status = CLIENT_RENDERED;
                    encodeErrorForBoundary(boundary$jscomp$0, prevTaskInDEV, x$jscomp$0, errorInfo$jscomp$1, false);
                    untrackBoundary(request2, boundary$jscomp$0);
                    var boundaryRow = boundary$jscomp$0.row;
                    boundaryRow !== null && --boundaryRow.pendingTasks === 0 && finishSuspenseListRow(request2, boundaryRow);
                    boundary$jscomp$0.parentFlushed && request2.clientRenderedBoundaries.push(boundary$jscomp$0);
                    request2.pendingRootTasks === 0 && request2.trackedPostpones === null && boundary$jscomp$0.contentPreamble !== null && preparePreamble(request2);
                  }
                  request2.allPendingTasks === 0 && completeAll(request2);
                }
              } finally {
                currentTaskInDEV = request$jscomp$0;
              }
            }
          }
          pingedTasks.splice(0, i);
          request$jscomp$2.destination !== null && flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
        } catch (error49) {
          pingedTasks = {}, logRecoverableError(request$jscomp$2, error49, pingedTasks, null), fatalError(request$jscomp$2, error49, pingedTasks, null);
        } finally {
          currentResumableState = prevResumableState, ReactSharedInternals.H = prevDispatcher, ReactSharedInternals.A = prevAsyncDispatcher, ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl, prevDispatcher === HooksDispatcher && switchContext(prevContext), currentRequest = prevRequest;
        }
      }
    }
    function preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments) {
      segment2.preambleChildren.length && collectedPreambleSegments.push(segment2.preambleChildren);
      for (var pendingPreambles = false, i = 0;i < segment2.children.length; i++)
        pendingPreambles = preparePreambleFromSegment(request2, segment2.children[i], collectedPreambleSegments) || pendingPreambles;
      return pendingPreambles;
    }
    function preparePreambleFromSegment(request2, segment2, collectedPreambleSegments) {
      var boundary = segment2.boundary;
      if (boundary === null)
        return preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments);
      var { contentPreamble: preamble, fallbackPreamble } = boundary;
      if (preamble === null || fallbackPreamble === null)
        return false;
      switch (boundary.status) {
        case COMPLETED:
          hoistPreambleState(request2.renderState, preamble);
          request2.byteSize += boundary.byteSize;
          segment2 = boundary.completedSegments[0];
          if (!segment2)
            throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
          return preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments);
        case POSTPONED:
          if (request2.trackedPostpones !== null)
            return true;
        case CLIENT_RENDERED:
          if (segment2.status === COMPLETED)
            return hoistPreambleState(request2.renderState, fallbackPreamble), preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments);
        default:
          return true;
      }
    }
    function preparePreamble(request2) {
      if (request2.completedRootSegment && request2.completedPreambleSegments === null) {
        var collectedPreambleSegments = [], originalRequestByteSize = request2.byteSize, hasPendingPreambles = preparePreambleFromSegment(request2, request2.completedRootSegment, collectedPreambleSegments), preamble = request2.renderState.preamble;
        hasPendingPreambles === false || preamble.headChunks && preamble.bodyChunks ? request2.completedPreambleSegments = collectedPreambleSegments : request2.byteSize = originalRequestByteSize;
      }
    }
    function flushSubtree(request2, destination, segment2, hoistableState) {
      segment2.parentFlushed = true;
      switch (segment2.status) {
        case PENDING:
          segment2.id = request2.nextSegmentId++;
        case POSTPONED:
          return hoistableState = segment2.id, segment2.lastPushedText = false, segment2.textEmbedded = false, request2 = request2.renderState, destination.push(placeholder1), destination.push(request2.placeholderPrefix), request2 = hoistableState.toString(16), destination.push(request2), destination.push(placeholder2);
        case COMPLETED:
          segment2.status = FLUSHED;
          var r2 = true, chunks = segment2.chunks, chunkIdx = 0;
          segment2 = segment2.children;
          for (var childIdx = 0;childIdx < segment2.length; childIdx++) {
            for (r2 = segment2[childIdx];chunkIdx < r2.index; chunkIdx++)
              destination.push(chunks[chunkIdx]);
            r2 = flushSegment(request2, destination, r2, hoistableState);
          }
          for (;chunkIdx < chunks.length - 1; chunkIdx++)
            destination.push(chunks[chunkIdx]);
          chunkIdx < chunks.length && (r2 = destination.push(chunks[chunkIdx]));
          return r2;
        case ABORTED:
          return true;
        default:
          throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.");
      }
    }
    function flushSegment(request2, destination, segment2, hoistableState) {
      var boundary = segment2.boundary;
      if (boundary === null)
        return flushSubtree(request2, destination, segment2, hoistableState);
      boundary.parentFlushed = true;
      if (boundary.status === CLIENT_RENDERED) {
        var row = boundary.row;
        row !== null && --row.pendingTasks === 0 && finishSuspenseListRow(request2, row);
        if (!request2.renderState.generateStaticMarkup) {
          var { errorDigest, errorMessage } = boundary;
          row = boundary.errorStack;
          boundary = boundary.errorComponentStack;
          destination.push(startClientRenderedSuspenseBoundary);
          destination.push(clientRenderedSuspenseBoundaryError1);
          errorDigest && (destination.push(clientRenderedSuspenseBoundaryError1A), errorDigest = escapeTextForBrowser(errorDigest), destination.push(errorDigest), destination.push(clientRenderedSuspenseBoundaryErrorAttrInterstitial));
          errorMessage && (destination.push(clientRenderedSuspenseBoundaryError1B), errorMessage = escapeTextForBrowser(errorMessage), destination.push(errorMessage), destination.push(clientRenderedSuspenseBoundaryErrorAttrInterstitial));
          row && (destination.push(clientRenderedSuspenseBoundaryError1C), row = escapeTextForBrowser(row), destination.push(row), destination.push(clientRenderedSuspenseBoundaryErrorAttrInterstitial));
          boundary && (destination.push(clientRenderedSuspenseBoundaryError1D), row = escapeTextForBrowser(boundary), destination.push(row), destination.push(clientRenderedSuspenseBoundaryErrorAttrInterstitial));
          destination.push(clientRenderedSuspenseBoundaryError2);
        }
        flushSubtree(request2, destination, segment2, hoistableState);
        request2 = request2.renderState.generateStaticMarkup ? true : destination.push(endSuspenseBoundary);
        return request2;
      }
      if (boundary.status !== COMPLETED)
        return boundary.status === PENDING && (boundary.rootSegmentID = request2.nextSegmentId++), 0 < boundary.completedSegments.length && request2.partialBoundaries.push(boundary), writeStartPendingSuspenseBoundary(destination, request2.renderState, boundary.rootSegmentID), hoistableState && hoistHoistables(hoistableState, boundary.fallbackState), flushSubtree(request2, destination, segment2, hoistableState), destination.push(endSuspenseBoundary);
      if (!flushingPartialBoundaries && isEligibleForOutlining(request2, boundary) && flushedByteSize + boundary.byteSize > request2.progressiveChunkSize)
        return boundary.rootSegmentID = request2.nextSegmentId++, request2.completedBoundaries.push(boundary), writeStartPendingSuspenseBoundary(destination, request2.renderState, boundary.rootSegmentID), flushSubtree(request2, destination, segment2, hoistableState), destination.push(endSuspenseBoundary);
      flushedByteSize += boundary.byteSize;
      hoistableState && hoistHoistables(hoistableState, boundary.contentState);
      segment2 = boundary.row;
      segment2 !== null && isEligibleForOutlining(request2, boundary) && --segment2.pendingTasks === 0 && finishSuspenseListRow(request2, segment2);
      request2.renderState.generateStaticMarkup || destination.push(startCompletedSuspenseBoundary);
      segment2 = boundary.completedSegments;
      if (segment2.length !== 1)
        throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
      flushSegment(request2, destination, segment2[0], hoistableState);
      request2 = request2.renderState.generateStaticMarkup ? true : destination.push(endSuspenseBoundary);
      return request2;
    }
    function flushSegmentContainer(request2, destination, segment2, hoistableState) {
      writeStartSegment(destination, request2.renderState, segment2.parentFormatContext, segment2.id);
      flushSegment(request2, destination, segment2, hoistableState);
      return writeEndSegment(destination, segment2.parentFormatContext);
    }
    function flushCompletedBoundary(request2, destination, boundary) {
      flushedByteSize = boundary.byteSize;
      for (var completedSegments = boundary.completedSegments, i = 0;i < completedSegments.length; i++)
        flushPartiallyCompletedSegment(request2, destination, boundary, completedSegments[i]);
      completedSegments.length = 0;
      completedSegments = boundary.row;
      completedSegments !== null && isEligibleForOutlining(request2, boundary) && --completedSegments.pendingTasks === 0 && finishSuspenseListRow(request2, completedSegments);
      writeHoistablesForBoundary(destination, boundary.contentState, request2.renderState);
      completedSegments = request2.resumableState;
      request2 = request2.renderState;
      i = boundary.rootSegmentID;
      boundary = boundary.contentState;
      var requiresStyleInsertion = request2.stylesToHoist;
      request2.stylesToHoist = false;
      destination.push(request2.startInlineScript);
      destination.push(endOfStartTag);
      requiresStyleInsertion ? ((completedSegments.instructions & SentClientRenderFunction) === NothingSent && (completedSegments.instructions |= SentClientRenderFunction, destination.push(clientRenderScriptFunctionOnly)), (completedSegments.instructions & SentCompleteBoundaryFunction) === NothingSent && (completedSegments.instructions |= SentCompleteBoundaryFunction, destination.push(completeBoundaryScriptFunctionOnly)), (completedSegments.instructions & SentStyleInsertionFunction) === NothingSent ? (completedSegments.instructions |= SentStyleInsertionFunction, destination.push(completeBoundaryWithStylesScript1FullPartial)) : destination.push(completeBoundaryWithStylesScript1Partial)) : ((completedSegments.instructions & SentCompleteBoundaryFunction) === NothingSent && (completedSegments.instructions |= SentCompleteBoundaryFunction, destination.push(completeBoundaryScriptFunctionOnly)), destination.push(completeBoundaryScript1Partial));
      completedSegments = i.toString(16);
      destination.push(request2.boundaryPrefix);
      destination.push(completedSegments);
      destination.push(completeBoundaryScript2);
      destination.push(request2.segmentPrefix);
      destination.push(completedSegments);
      requiresStyleInsertion ? (destination.push(completeBoundaryScript3a), writeStyleResourceDependenciesInJS(destination, boundary)) : destination.push(completeBoundaryScript3b);
      boundary = destination.push(completeBoundaryScriptEnd);
      return writeBootstrap(destination, request2) && boundary;
    }
    function flushPartiallyCompletedSegment(request2, destination, boundary, segment2) {
      if (segment2.status === FLUSHED)
        return true;
      var hoistableState = boundary.contentState, segmentID = segment2.id;
      if (segmentID === -1) {
        if ((segment2.id = boundary.rootSegmentID) === -1)
          throw Error("A root segment ID must have been assigned by now. This is a bug in React.");
        return flushSegmentContainer(request2, destination, segment2, hoistableState);
      }
      if (segmentID === boundary.rootSegmentID)
        return flushSegmentContainer(request2, destination, segment2, hoistableState);
      flushSegmentContainer(request2, destination, segment2, hoistableState);
      boundary = request2.resumableState;
      request2 = request2.renderState;
      destination.push(request2.startInlineScript);
      destination.push(endOfStartTag);
      (boundary.instructions & SentCompleteSegmentFunction) === NothingSent ? (boundary.instructions |= SentCompleteSegmentFunction, destination.push(completeSegmentScript1Full)) : destination.push(completeSegmentScript1Partial);
      destination.push(request2.segmentPrefix);
      segmentID = segmentID.toString(16);
      destination.push(segmentID);
      destination.push(completeSegmentScript2);
      destination.push(request2.placeholderPrefix);
      destination.push(segmentID);
      destination = destination.push(completeSegmentScriptEnd);
      return destination;
    }
    function flushCompletedQueues(request2, destination) {
      try {
        if (!(0 < request2.pendingRootTasks)) {
          var i, completedRootSegment = request2.completedRootSegment;
          if (completedRootSegment !== null) {
            if (completedRootSegment.status === POSTPONED)
              return;
            var completedPreambleSegments = request2.completedPreambleSegments;
            if (completedPreambleSegments === null)
              return;
            flushedByteSize = request2.byteSize;
            var { resumableState, renderState } = request2, preamble = renderState.preamble, htmlChunks = preamble.htmlChunks, headChunks = preamble.headChunks, i$jscomp$0;
            if (htmlChunks) {
              for (i$jscomp$0 = 0;i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
                destination.push(htmlChunks[i$jscomp$0]);
              if (headChunks)
                for (i$jscomp$0 = 0;i$jscomp$0 < headChunks.length; i$jscomp$0++)
                  destination.push(headChunks[i$jscomp$0]);
              else {
                var chunk = startChunkForTag("head");
                destination.push(chunk);
                destination.push(endOfStartTag);
              }
            } else if (headChunks)
              for (i$jscomp$0 = 0;i$jscomp$0 < headChunks.length; i$jscomp$0++)
                destination.push(headChunks[i$jscomp$0]);
            var charsetChunks = renderState.charsetChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < charsetChunks.length; i$jscomp$0++)
              destination.push(charsetChunks[i$jscomp$0]);
            charsetChunks.length = 0;
            renderState.preconnects.forEach(flushResource, destination);
            renderState.preconnects.clear();
            var viewportChunks = renderState.viewportChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < viewportChunks.length; i$jscomp$0++)
              destination.push(viewportChunks[i$jscomp$0]);
            viewportChunks.length = 0;
            renderState.fontPreloads.forEach(flushResource, destination);
            renderState.fontPreloads.clear();
            renderState.highImagePreloads.forEach(flushResource, destination);
            renderState.highImagePreloads.clear();
            currentlyFlushingRenderState = renderState;
            renderState.styles.forEach(flushStylesInPreamble, destination);
            currentlyFlushingRenderState = null;
            var importMapChunks = renderState.importMapChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
              destination.push(importMapChunks[i$jscomp$0]);
            importMapChunks.length = 0;
            renderState.bootstrapScripts.forEach(flushResource, destination);
            renderState.scripts.forEach(flushResource, destination);
            renderState.scripts.clear();
            renderState.bulkPreloads.forEach(flushResource, destination);
            renderState.bulkPreloads.clear();
            resumableState.instructions |= SentCompletedShellId;
            var hoistableChunks = renderState.hoistableChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
              destination.push(hoistableChunks[i$jscomp$0]);
            for (resumableState = hoistableChunks.length = 0;resumableState < completedPreambleSegments.length; resumableState++) {
              var segments = completedPreambleSegments[resumableState];
              for (renderState = 0;renderState < segments.length; renderState++)
                flushSegment(request2, destination, segments[renderState], null);
            }
            var preamble$jscomp$0 = request2.renderState.preamble, headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
            if (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) {
              var chunk$jscomp$0 = endChunkForTag("head");
              destination.push(chunk$jscomp$0);
            }
            var bodyChunks = preamble$jscomp$0.bodyChunks;
            if (bodyChunks)
              for (completedPreambleSegments = 0;completedPreambleSegments < bodyChunks.length; completedPreambleSegments++)
                destination.push(bodyChunks[completedPreambleSegments]);
            flushSegment(request2, destination, completedRootSegment, null);
            request2.completedRootSegment = null;
            var renderState$jscomp$0 = request2.renderState;
            if (request2.allPendingTasks !== 0 || request2.clientRenderedBoundaries.length !== 0 || request2.completedBoundaries.length !== 0 || request2.trackedPostpones !== null && (request2.trackedPostpones.rootNodes.length !== 0 || request2.trackedPostpones.rootSlots !== null)) {
              var resumableState$jscomp$0 = request2.resumableState;
              if ((resumableState$jscomp$0.instructions & SentMarkShellTime) === NothingSent) {
                resumableState$jscomp$0.instructions |= SentMarkShellTime;
                destination.push(renderState$jscomp$0.startInlineScript);
                if ((resumableState$jscomp$0.instructions & SentCompletedShellId) === NothingSent) {
                  resumableState$jscomp$0.instructions |= SentCompletedShellId;
                  var shellId = "_" + resumableState$jscomp$0.idPrefix + "R_";
                  destination.push(completedShellIdAttributeStart);
                  var chunk$jscomp$1 = escapeTextForBrowser(shellId);
                  destination.push(chunk$jscomp$1);
                  destination.push(attributeEnd);
                }
                destination.push(endOfStartTag);
                destination.push(shellTimeRuntimeScript);
                destination.push(endInlineScript);
              }
            }
            writeBootstrap(destination, renderState$jscomp$0);
          }
          var renderState$jscomp$1 = request2.renderState;
          completedRootSegment = 0;
          var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
          for (completedRootSegment = 0;completedRootSegment < viewportChunks$jscomp$0.length; completedRootSegment++)
            destination.push(viewportChunks$jscomp$0[completedRootSegment]);
          viewportChunks$jscomp$0.length = 0;
          renderState$jscomp$1.preconnects.forEach(flushResource, destination);
          renderState$jscomp$1.preconnects.clear();
          renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
          renderState$jscomp$1.fontPreloads.clear();
          renderState$jscomp$1.highImagePreloads.forEach(flushResource, destination);
          renderState$jscomp$1.highImagePreloads.clear();
          renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
          renderState$jscomp$1.scripts.forEach(flushResource, destination);
          renderState$jscomp$1.scripts.clear();
          renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
          renderState$jscomp$1.bulkPreloads.clear();
          var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
          for (completedRootSegment = 0;completedRootSegment < hoistableChunks$jscomp$0.length; completedRootSegment++)
            destination.push(hoistableChunks$jscomp$0[completedRootSegment]);
          hoistableChunks$jscomp$0.length = 0;
          var clientRenderedBoundaries = request2.clientRenderedBoundaries;
          for (i = 0;i < clientRenderedBoundaries.length; i++) {
            var boundary = clientRenderedBoundaries[i];
            renderState$jscomp$1 = destination;
            var { resumableState: resumableState$jscomp$1, renderState: renderState$jscomp$2 } = request2, id = boundary.rootSegmentID, errorDigest = boundary.errorDigest, errorMessage = boundary.errorMessage, errorStack = boundary.errorStack, errorComponentStack = boundary.errorComponentStack;
            renderState$jscomp$1.push(renderState$jscomp$2.startInlineScript);
            renderState$jscomp$1.push(endOfStartTag);
            (resumableState$jscomp$1.instructions & SentClientRenderFunction) === NothingSent ? (resumableState$jscomp$1.instructions |= SentClientRenderFunction, renderState$jscomp$1.push(clientRenderScript1Full)) : renderState$jscomp$1.push(clientRenderScript1Partial);
            renderState$jscomp$1.push(renderState$jscomp$2.boundaryPrefix);
            var chunk$jscomp$2 = id.toString(16);
            renderState$jscomp$1.push(chunk$jscomp$2);
            renderState$jscomp$1.push(clientRenderScript1A);
            if (errorDigest || errorMessage || errorStack || errorComponentStack) {
              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);
              var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(errorDigest || "");
              renderState$jscomp$1.push(chunk$jscomp$3);
            }
            if (errorMessage || errorStack || errorComponentStack) {
              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);
              var chunk$jscomp$4 = escapeJSStringsForInstructionScripts(errorMessage || "");
              renderState$jscomp$1.push(chunk$jscomp$4);
            }
            if (errorStack || errorComponentStack) {
              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);
              var chunk$jscomp$5 = escapeJSStringsForInstructionScripts(errorStack || "");
              renderState$jscomp$1.push(chunk$jscomp$5);
            }
            if (errorComponentStack) {
              renderState$jscomp$1.push(clientRenderErrorScriptArgInterstitial);
              var chunk$jscomp$6 = escapeJSStringsForInstructionScripts(errorComponentStack);
              renderState$jscomp$1.push(chunk$jscomp$6);
            }
            var JSCompiler_inline_result = renderState$jscomp$1.push(clientRenderScriptEnd);
            if (!JSCompiler_inline_result) {
              request2.destination = null;
              i++;
              clientRenderedBoundaries.splice(0, i);
              return;
            }
          }
          clientRenderedBoundaries.splice(0, i);
          var completedBoundaries = request2.completedBoundaries;
          for (i = 0;i < completedBoundaries.length; i++)
            if (!flushCompletedBoundary(request2, destination, completedBoundaries[i])) {
              request2.destination = null;
              i++;
              completedBoundaries.splice(0, i);
              return;
            }
          completedBoundaries.splice(0, i);
          flushingPartialBoundaries = true;
          var partialBoundaries = request2.partialBoundaries;
          for (i = 0;i < partialBoundaries.length; i++) {
            a: {
              clientRenderedBoundaries = request2;
              boundary = destination;
              var boundary$jscomp$0 = partialBoundaries[i];
              flushedByteSize = boundary$jscomp$0.byteSize;
              var completedSegments = boundary$jscomp$0.completedSegments;
              for (JSCompiler_inline_result = 0;JSCompiler_inline_result < completedSegments.length; JSCompiler_inline_result++)
                if (!flushPartiallyCompletedSegment(clientRenderedBoundaries, boundary, boundary$jscomp$0, completedSegments[JSCompiler_inline_result])) {
                  JSCompiler_inline_result++;
                  completedSegments.splice(0, JSCompiler_inline_result);
                  var JSCompiler_inline_result$jscomp$0 = false;
                  break a;
                }
              completedSegments.splice(0, JSCompiler_inline_result);
              var row = boundary$jscomp$0.row;
              row !== null && row.together && boundary$jscomp$0.pendingTasks === 1 && (row.pendingTasks === 1 ? unblockSuspenseListRow(clientRenderedBoundaries, row, row.hoistables) : row.pendingTasks--);
              JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(boundary, boundary$jscomp$0.contentState, clientRenderedBoundaries.renderState);
            }
            if (!JSCompiler_inline_result$jscomp$0) {
              request2.destination = null;
              i++;
              partialBoundaries.splice(0, i);
              return;
            }
          }
          partialBoundaries.splice(0, i);
          flushingPartialBoundaries = false;
          var largeBoundaries = request2.completedBoundaries;
          for (i = 0;i < largeBoundaries.length; i++)
            if (!flushCompletedBoundary(request2, destination, largeBoundaries[i])) {
              request2.destination = null;
              i++;
              largeBoundaries.splice(0, i);
              return;
            }
          largeBoundaries.splice(0, i);
        }
      } finally {
        flushingPartialBoundaries = false, request2.allPendingTasks === 0 && request2.clientRenderedBoundaries.length === 0 && request2.completedBoundaries.length === 0 && (request2.flushScheduled = false, i = request2.resumableState, i.hasBody && (partialBoundaries = endChunkForTag("body"), destination.push(partialBoundaries)), i.hasHtml && (i = endChunkForTag("html"), destination.push(i)), request2.abortableTasks.size !== 0 && console.error("There was still abortable task at the root when we closed. This is a bug in React."), request2.status = CLOSED, destination.push(null), request2.destination = null);
      }
    }
    function startWork(request2) {
      request2.flushScheduled = request2.destination !== null;
      performWork(request2);
      request2.status === 10 && (request2.status = 11);
      request2.trackedPostpones === null && safelyEmitEarlyPreloads(request2, request2.pendingRootTasks === 0);
    }
    function enqueueFlush(request2) {
      if (request2.flushScheduled === false && request2.pingedTasks.length === 0 && request2.destination !== null) {
        request2.flushScheduled = true;
        var destination = request2.destination;
        destination ? flushCompletedQueues(request2, destination) : request2.flushScheduled = false;
      }
    }
    function startFlowing(request2, destination) {
      if (request2.status === 13)
        request2.status = CLOSED, destination.destroy(request2.fatalError);
      else if (request2.status !== CLOSED && request2.destination === null) {
        request2.destination = destination;
        try {
          flushCompletedQueues(request2, destination);
        } catch (error49) {
          destination = {}, logRecoverableError(request2, error49, destination, null), fatalError(request2, error49, destination, null);
        }
      }
    }
    function abort(request2, reason) {
      if (request2.status === 11 || request2.status === 10)
        request2.status = 12;
      try {
        var abortableTasks = request2.abortableTasks;
        if (0 < abortableTasks.size) {
          var error49 = reason === undefined ? Error("The render was aborted by the server without a reason.") : typeof reason === "object" && reason !== null && typeof reason.then === "function" ? Error("The render was aborted by the server with a promise.") : reason;
          request2.fatalError = error49;
          abortableTasks.forEach(function(task) {
            var prevTaskInDEV = currentTaskInDEV, prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
            currentTaskInDEV = task;
            ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
            try {
              abortTask(task, request2, error49);
            } finally {
              currentTaskInDEV = prevTaskInDEV, ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl;
            }
          });
          abortableTasks.clear();
        }
        request2.destination !== null && flushCompletedQueues(request2, request2.destination);
      } catch (error$4) {
        reason = {}, logRecoverableError(request2, error$4, reason, null), fatalError(request2, error$4, reason, null);
      }
    }
    function addToReplayParent(node3, parentKeyPath, trackedPostpones) {
      if (parentKeyPath === null)
        trackedPostpones.rootNodes.push(node3);
      else {
        var workingMap = trackedPostpones.workingMap, parentNode = workingMap.get(parentKeyPath);
        parentNode === undefined && (parentNode = [parentKeyPath[1], parentKeyPath[2], [], null], workingMap.set(parentKeyPath, parentNode), addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));
        parentNode[2].push(node3);
      }
    }
    function onError() {}
    function renderToStringImpl(children, options2, generateStaticMarkup, abortReason) {
      var didFatal = false, fatalError2 = null, result = "", readyToStream = false;
      options2 = createResumableState(options2 ? options2.identifierPrefix : undefined);
      children = createRequest(children, options2, createRenderState(options2, generateStaticMarkup), createFormatContext(ROOT_HTML_MODE, null, 0, null), Infinity, onError, undefined, function() {
        readyToStream = true;
      }, undefined, undefined, undefined);
      startWork(children);
      abort(children, abortReason);
      startFlowing(children, {
        push: function(chunk) {
          chunk !== null && (result += chunk);
          return true;
        },
        destroy: function(error49) {
          didFatal = true;
          fatalError2 = error49;
        }
      });
      if (didFatal && fatalError2 !== abortReason)
        throw fatalError2;
      if (!readyToStream)
        throw Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");
      return result;
    }
    var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_SCOPE_TYPE = Symbol.for("react.scope"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, isArrayImpl = Array.isArray, jsxPropsParents = new WeakMap, jsxChildrenParents = new WeakMap, CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), assign = Object.assign, hasOwnProperty2 = Object.prototype.hasOwnProperty, VALID_ATTRIBUTE_NAME_REGEX = RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, unitlessNumbers = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")), aliases = new Map([
      ["acceptCharset", "accept-charset"],
      ["htmlFor", "for"],
      ["httpEquiv", "http-equiv"],
      ["crossOrigin", "crossorigin"],
      ["accentHeight", "accent-height"],
      ["alignmentBaseline", "alignment-baseline"],
      ["arabicForm", "arabic-form"],
      ["baselineShift", "baseline-shift"],
      ["capHeight", "cap-height"],
      ["clipPath", "clip-path"],
      ["clipRule", "clip-rule"],
      ["colorInterpolation", "color-interpolation"],
      ["colorInterpolationFilters", "color-interpolation-filters"],
      ["colorProfile", "color-profile"],
      ["colorRendering", "color-rendering"],
      ["dominantBaseline", "dominant-baseline"],
      ["enableBackground", "enable-background"],
      ["fillOpacity", "fill-opacity"],
      ["fillRule", "fill-rule"],
      ["floodColor", "flood-color"],
      ["floodOpacity", "flood-opacity"],
      ["fontFamily", "font-family"],
      ["fontSize", "font-size"],
      ["fontSizeAdjust", "font-size-adjust"],
      ["fontStretch", "font-stretch"],
      ["fontStyle", "font-style"],
      ["fontVariant", "font-variant"],
      ["fontWeight", "font-weight"],
      ["glyphName", "glyph-name"],
      ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
      ["glyphOrientationVertical", "glyph-orientation-vertical"],
      ["horizAdvX", "horiz-adv-x"],
      ["horizOriginX", "horiz-origin-x"],
      ["imageRendering", "image-rendering"],
      ["letterSpacing", "letter-spacing"],
      ["lightingColor", "lighting-color"],
      ["markerEnd", "marker-end"],
      ["markerMid", "marker-mid"],
      ["markerStart", "marker-start"],
      ["overlinePosition", "overline-position"],
      ["overlineThickness", "overline-thickness"],
      ["paintOrder", "paint-order"],
      ["panose-1", "panose-1"],
      ["pointerEvents", "pointer-events"],
      ["renderingIntent", "rendering-intent"],
      ["shapeRendering", "shape-rendering"],
      ["stopColor", "stop-color"],
      ["stopOpacity", "stop-opacity"],
      ["strikethroughPosition", "strikethrough-position"],
      ["strikethroughThickness", "strikethrough-thickness"],
      ["strokeDasharray", "stroke-dasharray"],
      ["strokeDashoffset", "stroke-dashoffset"],
      ["strokeLinecap", "stroke-linecap"],
      ["strokeLinejoin", "stroke-linejoin"],
      ["strokeMiterlimit", "stroke-miterlimit"],
      ["strokeOpacity", "stroke-opacity"],
      ["strokeWidth", "stroke-width"],
      ["textAnchor", "text-anchor"],
      ["textDecoration", "text-decoration"],
      ["textRendering", "text-rendering"],
      ["transformOrigin", "transform-origin"],
      ["underlinePosition", "underline-position"],
      ["underlineThickness", "underline-thickness"],
      ["unicodeBidi", "unicode-bidi"],
      ["unicodeRange", "unicode-range"],
      ["unitsPerEm", "units-per-em"],
      ["vAlphabetic", "v-alphabetic"],
      ["vHanging", "v-hanging"],
      ["vIdeographic", "v-ideographic"],
      ["vMathematical", "v-mathematical"],
      ["vectorEffect", "vector-effect"],
      ["vertAdvY", "vert-adv-y"],
      ["vertOriginX", "vert-origin-x"],
      ["vertOriginY", "vert-origin-y"],
      ["wordSpacing", "word-spacing"],
      ["writingMode", "writing-mode"],
      ["xmlnsXlink", "xmlns:xlink"],
      ["xHeight", "x-height"]
    ]), hasReadOnlyValue = {
      button: true,
      checkbox: true,
      image: true,
      hidden: true,
      radio: true,
      reset: true,
      submit: true
    }, ariaProperties = {
      "aria-current": 0,
      "aria-description": 0,
      "aria-details": 0,
      "aria-disabled": 0,
      "aria-hidden": 0,
      "aria-invalid": 0,
      "aria-keyshortcuts": 0,
      "aria-label": 0,
      "aria-roledescription": 0,
      "aria-autocomplete": 0,
      "aria-checked": 0,
      "aria-expanded": 0,
      "aria-haspopup": 0,
      "aria-level": 0,
      "aria-modal": 0,
      "aria-multiline": 0,
      "aria-multiselectable": 0,
      "aria-orientation": 0,
      "aria-placeholder": 0,
      "aria-pressed": 0,
      "aria-readonly": 0,
      "aria-required": 0,
      "aria-selected": 0,
      "aria-sort": 0,
      "aria-valuemax": 0,
      "aria-valuemin": 0,
      "aria-valuenow": 0,
      "aria-valuetext": 0,
      "aria-atomic": 0,
      "aria-busy": 0,
      "aria-live": 0,
      "aria-relevant": 0,
      "aria-dropeffect": 0,
      "aria-grabbed": 0,
      "aria-activedescendant": 0,
      "aria-colcount": 0,
      "aria-colindex": 0,
      "aria-colspan": 0,
      "aria-controls": 0,
      "aria-describedby": 0,
      "aria-errormessage": 0,
      "aria-flowto": 0,
      "aria-labelledby": 0,
      "aria-owns": 0,
      "aria-posinset": 0,
      "aria-rowcount": 0,
      "aria-rowindex": 0,
      "aria-rowspan": 0,
      "aria-setsize": 0,
      "aria-braillelabel": 0,
      "aria-brailleroledescription": 0,
      "aria-colindextext": 0,
      "aria-rowindextext": 0
    }, warnedProperties$1 = {}, rARIA$1 = RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), rARIACamel$1 = RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), didWarnValueNull = false, possibleStandardNames = {
      accept: "accept",
      acceptcharset: "acceptCharset",
      "accept-charset": "acceptCharset",
      accesskey: "accessKey",
      action: "action",
      allowfullscreen: "allowFullScreen",
      alt: "alt",
      as: "as",
      async: "async",
      autocapitalize: "autoCapitalize",
      autocomplete: "autoComplete",
      autocorrect: "autoCorrect",
      autofocus: "autoFocus",
      autoplay: "autoPlay",
      autosave: "autoSave",
      capture: "capture",
      cellpadding: "cellPadding",
      cellspacing: "cellSpacing",
      challenge: "challenge",
      charset: "charSet",
      checked: "checked",
      children: "children",
      cite: "cite",
      class: "className",
      classid: "classID",
      classname: "className",
      cols: "cols",
      colspan: "colSpan",
      content: "content",
      contenteditable: "contentEditable",
      contextmenu: "contextMenu",
      controls: "controls",
      controlslist: "controlsList",
      coords: "coords",
      crossorigin: "crossOrigin",
      dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
      data: "data",
      datetime: "dateTime",
      default: "default",
      defaultchecked: "defaultChecked",
      defaultvalue: "defaultValue",
      defer: "defer",
      dir: "dir",
      disabled: "disabled",
      disablepictureinpicture: "disablePictureInPicture",
      disableremoteplayback: "disableRemotePlayback",
      download: "download",
      draggable: "draggable",
      enctype: "encType",
      enterkeyhint: "enterKeyHint",
      fetchpriority: "fetchPriority",
      for: "htmlFor",
      form: "form",
      formmethod: "formMethod",
      formaction: "formAction",
      formenctype: "formEncType",
      formnovalidate: "formNoValidate",
      formtarget: "formTarget",
      frameborder: "frameBorder",
      headers: "headers",
      height: "height",
      hidden: "hidden",
      high: "high",
      href: "href",
      hreflang: "hrefLang",
      htmlfor: "htmlFor",
      httpequiv: "httpEquiv",
      "http-equiv": "httpEquiv",
      icon: "icon",
      id: "id",
      imagesizes: "imageSizes",
      imagesrcset: "imageSrcSet",
      inert: "inert",
      innerhtml: "innerHTML",
      inputmode: "inputMode",
      integrity: "integrity",
      is: "is",
      itemid: "itemID",
      itemprop: "itemProp",
      itemref: "itemRef",
      itemscope: "itemScope",
      itemtype: "itemType",
      keyparams: "keyParams",
      keytype: "keyType",
      kind: "kind",
      label: "label",
      lang: "lang",
      list: "list",
      loop: "loop",
      low: "low",
      manifest: "manifest",
      marginwidth: "marginWidth",
      marginheight: "marginHeight",
      max: "max",
      maxlength: "maxLength",
      media: "media",
      mediagroup: "mediaGroup",
      method: "method",
      min: "min",
      minlength: "minLength",
      multiple: "multiple",
      muted: "muted",
      name: "name",
      nomodule: "noModule",
      nonce: "nonce",
      novalidate: "noValidate",
      open: "open",
      optimum: "optimum",
      pattern: "pattern",
      placeholder: "placeholder",
      playsinline: "playsInline",
      poster: "poster",
      preload: "preload",
      profile: "profile",
      radiogroup: "radioGroup",
      readonly: "readOnly",
      referrerpolicy: "referrerPolicy",
      rel: "rel",
      required: "required",
      reversed: "reversed",
      role: "role",
      rows: "rows",
      rowspan: "rowSpan",
      sandbox: "sandbox",
      scope: "scope",
      scoped: "scoped",
      scrolling: "scrolling",
      seamless: "seamless",
      selected: "selected",
      shape: "shape",
      size: "size",
      sizes: "sizes",
      span: "span",
      spellcheck: "spellCheck",
      src: "src",
      srcdoc: "srcDoc",
      srclang: "srcLang",
      srcset: "srcSet",
      start: "start",
      step: "step",
      style: "style",
      summary: "summary",
      tabindex: "tabIndex",
      target: "target",
      title: "title",
      type: "type",
      usemap: "useMap",
      value: "value",
      width: "width",
      wmode: "wmode",
      wrap: "wrap",
      about: "about",
      accentheight: "accentHeight",
      "accent-height": "accentHeight",
      accumulate: "accumulate",
      additive: "additive",
      alignmentbaseline: "alignmentBaseline",
      "alignment-baseline": "alignmentBaseline",
      allowreorder: "allowReorder",
      alphabetic: "alphabetic",
      amplitude: "amplitude",
      arabicform: "arabicForm",
      "arabic-form": "arabicForm",
      ascent: "ascent",
      attributename: "attributeName",
      attributetype: "attributeType",
      autoreverse: "autoReverse",
      azimuth: "azimuth",
      basefrequency: "baseFrequency",
      baselineshift: "baselineShift",
      "baseline-shift": "baselineShift",
      baseprofile: "baseProfile",
      bbox: "bbox",
      begin: "begin",
      bias: "bias",
      by: "by",
      calcmode: "calcMode",
      capheight: "capHeight",
      "cap-height": "capHeight",
      clip: "clip",
      clippath: "clipPath",
      "clip-path": "clipPath",
      clippathunits: "clipPathUnits",
      cliprule: "clipRule",
      "clip-rule": "clipRule",
      color: "color",
      colorinterpolation: "colorInterpolation",
      "color-interpolation": "colorInterpolation",
      colorinterpolationfilters: "colorInterpolationFilters",
      "color-interpolation-filters": "colorInterpolationFilters",
      colorprofile: "colorProfile",
      "color-profile": "colorProfile",
      colorrendering: "colorRendering",
      "color-rendering": "colorRendering",
      contentscripttype: "contentScriptType",
      contentstyletype: "contentStyleType",
      cursor: "cursor",
      cx: "cx",
      cy: "cy",
      d: "d",
      datatype: "datatype",
      decelerate: "decelerate",
      descent: "descent",
      diffuseconstant: "diffuseConstant",
      direction: "direction",
      display: "display",
      divisor: "divisor",
      dominantbaseline: "dominantBaseline",
      "dominant-baseline": "dominantBaseline",
      dur: "dur",
      dx: "dx",
      dy: "dy",
      edgemode: "edgeMode",
      elevation: "elevation",
      enablebackground: "enableBackground",
      "enable-background": "enableBackground",
      end: "end",
      exponent: "exponent",
      externalresourcesrequired: "externalResourcesRequired",
      fill: "fill",
      fillopacity: "fillOpacity",
      "fill-opacity": "fillOpacity",
      fillrule: "fillRule",
      "fill-rule": "fillRule",
      filter: "filter",
      filterres: "filterRes",
      filterunits: "filterUnits",
      floodopacity: "floodOpacity",
      "flood-opacity": "floodOpacity",
      floodcolor: "floodColor",
      "flood-color": "floodColor",
      focusable: "focusable",
      fontfamily: "fontFamily",
      "font-family": "fontFamily",
      fontsize: "fontSize",
      "font-size": "fontSize",
      fontsizeadjust: "fontSizeAdjust",
      "font-size-adjust": "fontSizeAdjust",
      fontstretch: "fontStretch",
      "font-stretch": "fontStretch",
      fontstyle: "fontStyle",
      "font-style": "fontStyle",
      fontvariant: "fontVariant",
      "font-variant": "fontVariant",
      fontweight: "fontWeight",
      "font-weight": "fontWeight",
      format: "format",
      from: "from",
      fx: "fx",
      fy: "fy",
      g1: "g1",
      g2: "g2",
      glyphname: "glyphName",
      "glyph-name": "glyphName",
      glyphorientationhorizontal: "glyphOrientationHorizontal",
      "glyph-orientation-horizontal": "glyphOrientationHorizontal",
      glyphorientationvertical: "glyphOrientationVertical",
      "glyph-orientation-vertical": "glyphOrientationVertical",
      glyphref: "glyphRef",
      gradienttransform: "gradientTransform",
      gradientunits: "gradientUnits",
      hanging: "hanging",
      horizadvx: "horizAdvX",
      "horiz-adv-x": "horizAdvX",
      horizoriginx: "horizOriginX",
      "horiz-origin-x": "horizOriginX",
      ideographic: "ideographic",
      imagerendering: "imageRendering",
      "image-rendering": "imageRendering",
      in2: "in2",
      in: "in",
      inlist: "inlist",
      intercept: "intercept",
      k1: "k1",
      k2: "k2",
      k3: "k3",
      k4: "k4",
      k: "k",
      kernelmatrix: "kernelMatrix",
      kernelunitlength: "kernelUnitLength",
      kerning: "kerning",
      keypoints: "keyPoints",
      keysplines: "keySplines",
      keytimes: "keyTimes",
      lengthadjust: "lengthAdjust",
      letterspacing: "letterSpacing",
      "letter-spacing": "letterSpacing",
      lightingcolor: "lightingColor",
      "lighting-color": "lightingColor",
      limitingconeangle: "limitingConeAngle",
      local: "local",
      markerend: "markerEnd",
      "marker-end": "markerEnd",
      markerheight: "markerHeight",
      markermid: "markerMid",
      "marker-mid": "markerMid",
      markerstart: "markerStart",
      "marker-start": "markerStart",
      markerunits: "markerUnits",
      markerwidth: "markerWidth",
      mask: "mask",
      maskcontentunits: "maskContentUnits",
      maskunits: "maskUnits",
      mathematical: "mathematical",
      mode: "mode",
      numoctaves: "numOctaves",
      offset: "offset",
      opacity: "opacity",
      operator: "operator",
      order: "order",
      orient: "orient",
      orientation: "orientation",
      origin: "origin",
      overflow: "overflow",
      overlineposition: "overlinePosition",
      "overline-position": "overlinePosition",
      overlinethickness: "overlineThickness",
      "overline-thickness": "overlineThickness",
      paintorder: "paintOrder",
      "paint-order": "paintOrder",
      panose1: "panose1",
      "panose-1": "panose1",
      pathlength: "pathLength",
      patterncontentunits: "patternContentUnits",
      patterntransform: "patternTransform",
      patternunits: "patternUnits",
      pointerevents: "pointerEvents",
      "pointer-events": "pointerEvents",
      points: "points",
      pointsatx: "pointsAtX",
      pointsaty: "pointsAtY",
      pointsatz: "pointsAtZ",
      popover: "popover",
      popovertarget: "popoverTarget",
      popovertargetaction: "popoverTargetAction",
      prefix: "prefix",
      preservealpha: "preserveAlpha",
      preserveaspectratio: "preserveAspectRatio",
      primitiveunits: "primitiveUnits",
      property: "property",
      r: "r",
      radius: "radius",
      refx: "refX",
      refy: "refY",
      renderingintent: "renderingIntent",
      "rendering-intent": "renderingIntent",
      repeatcount: "repeatCount",
      repeatdur: "repeatDur",
      requiredextensions: "requiredExtensions",
      requiredfeatures: "requiredFeatures",
      resource: "resource",
      restart: "restart",
      result: "result",
      results: "results",
      rotate: "rotate",
      rx: "rx",
      ry: "ry",
      scale: "scale",
      security: "security",
      seed: "seed",
      shaperendering: "shapeRendering",
      "shape-rendering": "shapeRendering",
      slope: "slope",
      spacing: "spacing",
      specularconstant: "specularConstant",
      specularexponent: "specularExponent",
      speed: "speed",
      spreadmethod: "spreadMethod",
      startoffset: "startOffset",
      stddeviation: "stdDeviation",
      stemh: "stemh",
      stemv: "stemv",
      stitchtiles: "stitchTiles",
      stopcolor: "stopColor",
      "stop-color": "stopColor",
      stopopacity: "stopOpacity",
      "stop-opacity": "stopOpacity",
      strikethroughposition: "strikethroughPosition",
      "strikethrough-position": "strikethroughPosition",
      strikethroughthickness: "strikethroughThickness",
      "strikethrough-thickness": "strikethroughThickness",
      string: "string",
      stroke: "stroke",
      strokedasharray: "strokeDasharray",
      "stroke-dasharray": "strokeDasharray",
      strokedashoffset: "strokeDashoffset",
      "stroke-dashoffset": "strokeDashoffset",
      strokelinecap: "strokeLinecap",
      "stroke-linecap": "strokeLinecap",
      strokelinejoin: "strokeLinejoin",
      "stroke-linejoin": "strokeLinejoin",
      strokemiterlimit: "strokeMiterlimit",
      "stroke-miterlimit": "strokeMiterlimit",
      strokewidth: "strokeWidth",
      "stroke-width": "strokeWidth",
      strokeopacity: "strokeOpacity",
      "stroke-opacity": "strokeOpacity",
      suppresscontenteditablewarning: "suppressContentEditableWarning",
      suppresshydrationwarning: "suppressHydrationWarning",
      surfacescale: "surfaceScale",
      systemlanguage: "systemLanguage",
      tablevalues: "tableValues",
      targetx: "targetX",
      targety: "targetY",
      textanchor: "textAnchor",
      "text-anchor": "textAnchor",
      textdecoration: "textDecoration",
      "text-decoration": "textDecoration",
      textlength: "textLength",
      textrendering: "textRendering",
      "text-rendering": "textRendering",
      to: "to",
      transform: "transform",
      transformorigin: "transformOrigin",
      "transform-origin": "transformOrigin",
      typeof: "typeof",
      u1: "u1",
      u2: "u2",
      underlineposition: "underlinePosition",
      "underline-position": "underlinePosition",
      underlinethickness: "underlineThickness",
      "underline-thickness": "underlineThickness",
      unicode: "unicode",
      unicodebidi: "unicodeBidi",
      "unicode-bidi": "unicodeBidi",
      unicoderange: "unicodeRange",
      "unicode-range": "unicodeRange",
      unitsperem: "unitsPerEm",
      "units-per-em": "unitsPerEm",
      unselectable: "unselectable",
      valphabetic: "vAlphabetic",
      "v-alphabetic": "vAlphabetic",
      values: "values",
      vectoreffect: "vectorEffect",
      "vector-effect": "vectorEffect",
      version: "version",
      vertadvy: "vertAdvY",
      "vert-adv-y": "vertAdvY",
      vertoriginx: "vertOriginX",
      "vert-origin-x": "vertOriginX",
      vertoriginy: "vertOriginY",
      "vert-origin-y": "vertOriginY",
      vhanging: "vHanging",
      "v-hanging": "vHanging",
      videographic: "vIdeographic",
      "v-ideographic": "vIdeographic",
      viewbox: "viewBox",
      viewtarget: "viewTarget",
      visibility: "visibility",
      vmathematical: "vMathematical",
      "v-mathematical": "vMathematical",
      vocab: "vocab",
      widths: "widths",
      wordspacing: "wordSpacing",
      "word-spacing": "wordSpacing",
      writingmode: "writingMode",
      "writing-mode": "writingMode",
      x1: "x1",
      x2: "x2",
      x: "x",
      xchannelselector: "xChannelSelector",
      xheight: "xHeight",
      "x-height": "xHeight",
      xlinkactuate: "xlinkActuate",
      "xlink:actuate": "xlinkActuate",
      xlinkarcrole: "xlinkArcrole",
      "xlink:arcrole": "xlinkArcrole",
      xlinkhref: "xlinkHref",
      "xlink:href": "xlinkHref",
      xlinkrole: "xlinkRole",
      "xlink:role": "xlinkRole",
      xlinkshow: "xlinkShow",
      "xlink:show": "xlinkShow",
      xlinktitle: "xlinkTitle",
      "xlink:title": "xlinkTitle",
      xlinktype: "xlinkType",
      "xlink:type": "xlinkType",
      xmlbase: "xmlBase",
      "xml:base": "xmlBase",
      xmllang: "xmlLang",
      "xml:lang": "xmlLang",
      xmlns: "xmlns",
      "xml:space": "xmlSpace",
      xmlnsxlink: "xmlnsXlink",
      "xmlns:xlink": "xmlnsXlink",
      xmlspace: "xmlSpace",
      y1: "y1",
      y2: "y2",
      y: "y",
      ychannelselector: "yChannelSelector",
      z: "z",
      zoomandpan: "zoomAndPan"
    }, warnedProperties = {}, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA = RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), rARIACamel = RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/, msPattern$1 = /^-ms-/, hyphenPattern = /-(.)/g, badStyleValueWithSemicolonPattern = /;\s*$/, warnedStyleNames = {}, warnedStyleValues = {}, warnedForNaNValue = false, warnedForInfinityValue = false, matchHtmlRegExp = /["'&<>]/, uppercasePattern = /([A-Z])/g, msPattern = /^ms-/, isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i, ReactSharedInternals = React14.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
      pending: false,
      data: null,
      method: null,
      action: null
    }), previousDispatcher = ReactDOMSharedInternals.d;
    ReactDOMSharedInternals.d = {
      f: previousDispatcher.f,
      r: previousDispatcher.r,
      D: function(href) {
        var request2 = currentRequest ? currentRequest : null;
        if (request2) {
          var { resumableState, renderState } = request2;
          if (typeof href === "string" && href) {
            if (!resumableState.dnsResources.hasOwnProperty(href)) {
              resumableState.dnsResources[href] = EXISTS;
              resumableState = renderState.headers;
              var header, JSCompiler_temp;
              if (JSCompiler_temp = resumableState && 0 < resumableState.remainingCapacity)
                JSCompiler_temp = (header = "<" + escapeHrefForLinkHeaderURLContext(href) + ">; rel=dns-prefetch", 0 <= (resumableState.remainingCapacity -= header.length + 2));
              JSCompiler_temp ? (renderState.resets.dns[href] = EXISTS, resumableState.preconnects && (resumableState.preconnects += ", "), resumableState.preconnects += header) : (header = [], pushLinkImpl(header, { href, rel: "dns-prefetch" }), renderState.preconnects.add(header));
            }
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.D(href);
      },
      C: function(href, crossOrigin) {
        var request2 = currentRequest ? currentRequest : null;
        if (request2) {
          var { resumableState, renderState } = request2;
          if (typeof href === "string" && href) {
            var bucket = crossOrigin === "use-credentials" ? "credentials" : typeof crossOrigin === "string" ? "anonymous" : "default";
            if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
              resumableState.connectResources[bucket][href] = EXISTS;
              resumableState = renderState.headers;
              var header, JSCompiler_temp;
              if (JSCompiler_temp = resumableState && 0 < resumableState.remainingCapacity) {
                JSCompiler_temp = "<" + escapeHrefForLinkHeaderURLContext(href) + ">; rel=preconnect";
                if (typeof crossOrigin === "string") {
                  var escapedCrossOrigin = escapeStringForLinkHeaderQuotedParamValueContext(crossOrigin, "crossOrigin");
                  JSCompiler_temp += '; crossorigin="' + escapedCrossOrigin + '"';
                }
                JSCompiler_temp = (header = JSCompiler_temp, 0 <= (resumableState.remainingCapacity -= header.length + 2));
              }
              JSCompiler_temp ? (renderState.resets.connect[bucket][href] = EXISTS, resumableState.preconnects && (resumableState.preconnects += ", "), resumableState.preconnects += header) : (bucket = [], pushLinkImpl(bucket, {
                rel: "preconnect",
                href,
                crossOrigin
              }), renderState.preconnects.add(bucket));
            }
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.C(href, crossOrigin);
      },
      L: function(href, as2, options2) {
        var request2 = currentRequest ? currentRequest : null;
        if (request2) {
          var { resumableState, renderState } = request2;
          if (as2 && href) {
            switch (as2) {
              case "image":
                if (options2) {
                  var imageSrcSet = options2.imageSrcSet;
                  var imageSizes = options2.imageSizes;
                  var fetchPriority = options2.fetchPriority;
                }
                var key = imageSrcSet ? imageSrcSet + `
` + (imageSizes || "") : href;
                if (resumableState.imageResources.hasOwnProperty(key))
                  return;
                resumableState.imageResources[key] = PRELOAD_NO_CREDS;
                resumableState = renderState.headers;
                var header;
                resumableState && 0 < resumableState.remainingCapacity && typeof imageSrcSet !== "string" && fetchPriority === "high" && (header = getPreloadAsHeader(href, as2, options2), 0 <= (resumableState.remainingCapacity -= header.length + 2)) ? (renderState.resets.image[key] = PRELOAD_NO_CREDS, resumableState.highImagePreloads && (resumableState.highImagePreloads += ", "), resumableState.highImagePreloads += header) : (resumableState = [], pushLinkImpl(resumableState, assign({
                  rel: "preload",
                  href: imageSrcSet ? undefined : href,
                  as: as2
                }, options2)), fetchPriority === "high" ? renderState.highImagePreloads.add(resumableState) : (renderState.bulkPreloads.add(resumableState), renderState.preloads.images.set(key, resumableState)));
                break;
              case "style":
                if (resumableState.styleResources.hasOwnProperty(href))
                  return;
                imageSrcSet = [];
                pushLinkImpl(imageSrcSet, assign({ rel: "preload", href, as: as2 }, options2));
                resumableState.styleResources[href] = !options2 || typeof options2.crossOrigin !== "string" && typeof options2.integrity !== "string" ? PRELOAD_NO_CREDS : [options2.crossOrigin, options2.integrity];
                renderState.preloads.stylesheets.set(href, imageSrcSet);
                renderState.bulkPreloads.add(imageSrcSet);
                break;
              case "script":
                if (resumableState.scriptResources.hasOwnProperty(href))
                  return;
                imageSrcSet = [];
                renderState.preloads.scripts.set(href, imageSrcSet);
                renderState.bulkPreloads.add(imageSrcSet);
                pushLinkImpl(imageSrcSet, assign({ rel: "preload", href, as: as2 }, options2));
                resumableState.scriptResources[href] = !options2 || typeof options2.crossOrigin !== "string" && typeof options2.integrity !== "string" ? PRELOAD_NO_CREDS : [options2.crossOrigin, options2.integrity];
                break;
              default:
                if (resumableState.unknownResources.hasOwnProperty(as2)) {
                  if (imageSrcSet = resumableState.unknownResources[as2], imageSrcSet.hasOwnProperty(href))
                    return;
                } else
                  imageSrcSet = {}, resumableState.unknownResources[as2] = imageSrcSet;
                imageSrcSet[href] = PRELOAD_NO_CREDS;
                if ((resumableState = renderState.headers) && 0 < resumableState.remainingCapacity && as2 === "font" && (key = getPreloadAsHeader(href, as2, options2), 0 <= (resumableState.remainingCapacity -= key.length + 2)))
                  renderState.resets.font[href] = PRELOAD_NO_CREDS, resumableState.fontPreloads && (resumableState.fontPreloads += ", "), resumableState.fontPreloads += key;
                else
                  switch (resumableState = [], href = assign({ rel: "preload", href, as: as2 }, options2), pushLinkImpl(resumableState, href), as2) {
                    case "font":
                      renderState.fontPreloads.add(resumableState);
                      break;
                    default:
                      renderState.bulkPreloads.add(resumableState);
                  }
            }
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.L(href, as2, options2);
      },
      m: function(href, options2) {
        var request2 = currentRequest ? currentRequest : null;
        if (request2) {
          var { resumableState, renderState } = request2;
          if (href) {
            var as2 = options2 && typeof options2.as === "string" ? options2.as : "script";
            switch (as2) {
              case "script":
                if (resumableState.moduleScriptResources.hasOwnProperty(href))
                  return;
                as2 = [];
                resumableState.moduleScriptResources[href] = !options2 || typeof options2.crossOrigin !== "string" && typeof options2.integrity !== "string" ? PRELOAD_NO_CREDS : [options2.crossOrigin, options2.integrity];
                renderState.preloads.moduleScripts.set(href, as2);
                break;
              default:
                if (resumableState.moduleUnknownResources.hasOwnProperty(as2)) {
                  var resources = resumableState.unknownResources[as2];
                  if (resources.hasOwnProperty(href))
                    return;
                } else
                  resources = {}, resumableState.moduleUnknownResources[as2] = resources;
                as2 = [];
                resources[href] = PRELOAD_NO_CREDS;
            }
            pushLinkImpl(as2, assign({ rel: "modulepreload", href }, options2));
            renderState.bulkPreloads.add(as2);
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.m(href, options2);
      },
      X: function(src, options2) {
        var request2 = currentRequest ? currentRequest : null;
        if (request2) {
          var { resumableState, renderState } = request2;
          if (src) {
            var resourceState = resumableState.scriptResources.hasOwnProperty(src) ? resumableState.scriptResources[src] : undefined;
            resourceState !== EXISTS && (resumableState.scriptResources[src] = EXISTS, options2 = assign({ src, async: true }, options2), resourceState && (resourceState.length === 2 && adoptPreloadCredentials(options2, resourceState), src = renderState.preloads.scripts.get(src)) && (src.length = 0), src = [], renderState.scripts.add(src), pushScriptImpl(src, options2), enqueueFlush(request2));
          }
        } else
          previousDispatcher.X(src, options2);
      },
      S: function(href, precedence, options2) {
        var request2 = currentRequest ? currentRequest : null;
        if (request2) {
          var { resumableState, renderState } = request2;
          if (href) {
            precedence = precedence || "default";
            var styleQueue = renderState.styles.get(precedence), resourceState = resumableState.styleResources.hasOwnProperty(href) ? resumableState.styleResources[href] : undefined;
            resourceState !== EXISTS && (resumableState.styleResources[href] = EXISTS, styleQueue || (styleQueue = {
              precedence: escapeTextForBrowser(precedence),
              rules: [],
              hrefs: [],
              sheets: new Map
            }, renderState.styles.set(precedence, styleQueue)), precedence = {
              state: PENDING$1,
              props: assign({
                rel: "stylesheet",
                href,
                "data-precedence": precedence
              }, options2)
            }, resourceState && (resourceState.length === 2 && adoptPreloadCredentials(precedence.props, resourceState), (renderState = renderState.preloads.stylesheets.get(href)) && 0 < renderState.length ? renderState.length = 0 : precedence.state = PRELOADED), styleQueue.sheets.set(href, precedence), enqueueFlush(request2));
          }
        } else
          previousDispatcher.S(href, precedence, options2);
      },
      M: function(src, options2) {
        var request2 = currentRequest ? currentRequest : null;
        if (request2) {
          var { resumableState, renderState } = request2;
          if (src) {
            var resourceState = resumableState.moduleScriptResources.hasOwnProperty(src) ? resumableState.moduleScriptResources[src] : undefined;
            resourceState !== EXISTS && (resumableState.moduleScriptResources[src] = EXISTS, options2 = assign({ src, type: "module", async: true }, options2), resourceState && (resourceState.length === 2 && adoptPreloadCredentials(options2, resourceState), src = renderState.preloads.moduleScripts.get(src)) && (src.length = 0), src = [], renderState.scripts.add(src), pushScriptImpl(src, options2), enqueueFlush(request2));
          }
        } else
          previousDispatcher.M(src, options2);
      }
    };
    var NothingSent = 0, SentCompleteSegmentFunction = 1, SentCompleteBoundaryFunction = 2, SentClientRenderFunction = 4, SentStyleInsertionFunction = 8, SentCompletedShellId = 32, SentMarkShellTime = 64, EXISTS = null, PRELOAD_NO_CREDS = [];
    Object.freeze(PRELOAD_NO_CREDS);
    var currentlyFlushingRenderState = null, endInlineScript = "</script>", scriptRegex = /(<\/|<)(s)(cript)/gi;
    var didWarnForNewBooleanPropsWithEmptyValue = {};
    var ROOT_HTML_MODE = 0, HTML_HTML_MODE = 1, HTML_MODE = 2, HTML_HEAD_MODE = 3, SVG_MODE = 4, MATHML_MODE = 5, HTML_TABLE_MODE = 6, HTML_TABLE_BODY_MODE = 7, HTML_TABLE_ROW_MODE = 8, HTML_COLGROUP_MODE = 9, styleNameCache = new Map, styleAttributeStart = ' style="', styleAssign = ":", styleSeparator = ";", attributeSeparator = " ", attributeAssign = '="', attributeEnd = '"', attributeEmptyString = '=""', actionJavaScriptURL = escapeTextForBrowser("javascript:throw new Error('React form unexpectedly submitted.')"), endOfStartTag = ">", endOfStartTagSelfClosing = "/>", didWarnDefaultInputValue = false, didWarnDefaultChecked = false, didWarnDefaultSelectValue = false, didWarnDefaultTextareaValue = false, didWarnInvalidOptionChildren = false, didWarnInvalidOptionInnerHTML = false, didWarnSelectedSetOnOption = false, didWarnFormActionType = false, didWarnFormActionName = false, didWarnFormActionTarget = false, didWarnFormActionMethod = false, formReplayingRuntimeScript = `addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});`, styleRegex = /(<\/|<)(s)(tyle)/gi, leadingNewline = `
`, VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, validatedTagCache = new Map, endTagCache = new Map, shellTimeRuntimeScript = "requestAnimationFrame(function(){$RT=performance.now()});", placeholder1 = '<template id="', placeholder2 = '"></template>', startCompletedSuspenseBoundary = "<!--$-->", startPendingSuspenseBoundary1 = '<!--$?--><template id="', startPendingSuspenseBoundary2 = '"></template>', startClientRenderedSuspenseBoundary = "<!--$!-->", endSuspenseBoundary = "<!--/$-->", clientRenderedSuspenseBoundaryError1 = "<template", clientRenderedSuspenseBoundaryErrorAttrInterstitial = '"', clientRenderedSuspenseBoundaryError1A = ' data-dgst="', clientRenderedSuspenseBoundaryError1B = ' data-msg="', clientRenderedSuspenseBoundaryError1C = ' data-stck="', clientRenderedSuspenseBoundaryError1D = ' data-cstck="', clientRenderedSuspenseBoundaryError2 = "></template>", startSegmentHTML = '<div hidden id="', startSegmentHTML2 = '">', endSegmentHTML = "</div>", startSegmentSVG = '<svg aria-hidden="true" style="display:none" id="', startSegmentSVG2 = '">', endSegmentSVG = "</svg>", startSegmentMathML = '<math aria-hidden="true" style="display:none" id="', startSegmentMathML2 = '">', endSegmentMathML = "</math>", startSegmentTable = '<table hidden id="', startSegmentTable2 = '">', endSegmentTable = "</table>", startSegmentTableBody = '<table hidden><tbody id="', startSegmentTableBody2 = '">', endSegmentTableBody = "</tbody></table>", startSegmentTableRow = '<table hidden><tr id="', startSegmentTableRow2 = '">', endSegmentTableRow = "</tr></table>", startSegmentColGroup = '<table hidden><colgroup id="', startSegmentColGroup2 = '">', endSegmentColGroup = "</colgroup></table>", completeSegmentScript1Full = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("', completeSegmentScript1Partial = '$RS("', completeSegmentScript2 = '","', completeSegmentScriptEnd = '")</script>', completeBoundaryScriptFunctionOnly = `$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`, completeBoundaryScript1Partial = '$RC("', completeBoundaryWithStylesScript1FullPartial = `$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`, completeBoundaryWithStylesScript1Partial = '$RR("', completeBoundaryScript2 = '","', completeBoundaryScript3a = '",', completeBoundaryScript3b = '"', completeBoundaryScriptEnd = ")</script>", clientRenderScriptFunctionOnly = '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};', clientRenderScript1Full = '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("', clientRenderScript1Partial = '$RX("', clientRenderScript1A = '"', clientRenderErrorScriptArgInterstitial = ",", clientRenderScriptEnd = ")</script>", regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g, regexForJSStringsInScripts = /[&><\u2028\u2029]/g, lateStyleTagResourceOpen1 = ' media="not all" data-precedence="', lateStyleTagResourceOpen2 = '" data-href="', lateStyleTagResourceOpen3 = '">', lateStyleTagTemplateClose = "</style>", currentlyRenderingBoundaryHasStylesToHoist = false, destinationHasCapacity = true, stylesheetFlushingQueue = [], styleTagResourceOpen1 = ' data-precedence="', styleTagResourceOpen2 = '" data-href="', spaceSeparator = " ", styleTagResourceOpen3 = '">', styleTagResourceClose = "</style>", completedShellIdAttributeStart = ' id="', arrayFirstOpenBracket = "[", arraySubsequentOpenBracket = ",[", arrayInterstitial = ",", arrayCloseBracket = "]", PENDING$1 = 0, PRELOADED = 1, PREAMBLE = 2, LATE = 3, regexForHrefInLinkHeaderURLContext = /[<>\r\n]/g, regexForLinkHeaderQuotedParamValueContext = /["';,\r\n]/g, doctypeChunk = "", bind = Function.prototype.bind, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), emptyContextObject = {};
    Object.freeze(emptyContextObject);
    var rendererSigil = {};
    var currentActiveSnapshot = null, didWarnAboutNoopUpdateForComponent = {}, didWarnAboutDeprecatedWillMount = {};
    var didWarnAboutUninitializedState = new Set;
    var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set;
    var didWarnAboutLegacyLifecyclesAndDerivedState = new Set;
    var didWarnAboutDirectlyAssigningPropsToState = new Set;
    var didWarnAboutUndefinedDerivedState = new Set;
    var didWarnAboutContextTypes$1 = new Set;
    var didWarnAboutChildContextTypes = new Set;
    var didWarnAboutInvalidateContextType = new Set;
    var didWarnOnInvalidCallback = new Set;
    var classComponentUpdater = {
      enqueueSetState: function(inst, payload, callback) {
        var internals = inst._reactInternals;
        internals.queue === null ? warnNoop(inst, "setState") : (internals.queue.push(payload), callback !== undefined && callback !== null && warnOnInvalidCallback(callback));
      },
      enqueueReplaceState: function(inst, payload, callback) {
        inst = inst._reactInternals;
        inst.replace = true;
        inst.queue = [payload];
        callback !== undefined && callback !== null && warnOnInvalidCallback(callback);
      },
      enqueueForceUpdate: function(inst, callback) {
        inst._reactInternals.queue === null ? warnNoop(inst, "forceUpdate") : callback !== undefined && callback !== null && warnOnInvalidCallback(callback);
      }
    }, emptyTreeContext = { id: 1, overflow: "" }, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log4 = Math.log, LN2 = Math.LN2, SuspenseException = Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."), suspendedThenable = null, objectIs = typeof Object.is === "function" ? Object.is : is3, currentlyRenderingComponent = null, currentlyRenderingTask = null, currentlyRenderingRequest = null, currentlyRenderingKeyPath = null, firstWorkInProgressHook = null, workInProgressHook = null, isReRender = false, didScheduleRenderPhaseUpdate = false, localIdCounter = 0, actionStateCounter = 0, actionStateMatchingIndex = -1, thenableIndexCounter = 0, thenableState = null, renderPhaseUpdates = null, numberOfReRenders = 0, isInHookUserCodeInDev = false, currentHookNameInDev, HooksDispatcher = {
      readContext,
      use: function(usable) {
        if (usable !== null && typeof usable === "object") {
          if (typeof usable.then === "function")
            return unwrapThenable(usable);
          if (usable.$$typeof === REACT_CONTEXT_TYPE)
            return readContext(usable);
        }
        throw Error("An unsupported type was passed to use(): " + String(usable));
      },
      useContext: function(context10) {
        currentHookNameInDev = "useContext";
        resolveCurrentlyRenderingComponent();
        return context10._currentValue2;
      },
      useMemo,
      useReducer,
      useRef: function(initialValue) {
        currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
        workInProgressHook = createWorkInProgressHook();
        var previousRef = workInProgressHook.memoizedState;
        return previousRef === null ? (initialValue = { current: initialValue }, Object.seal(initialValue), workInProgressHook.memoizedState = initialValue) : previousRef;
      },
      useState: function(initialState) {
        currentHookNameInDev = "useState";
        return useReducer(basicStateReducer, initialState);
      },
      useInsertionEffect: noop,
      useLayoutEffect: noop,
      useCallback: function(callback, deps) {
        return useMemo(function() {
          return callback;
        }, deps);
      },
      useImperativeHandle: noop,
      useEffect: noop,
      useDebugValue: noop,
      useDeferredValue: function(value, initialValue) {
        resolveCurrentlyRenderingComponent();
        return initialValue !== undefined ? initialValue : value;
      },
      useTransition: function() {
        resolveCurrentlyRenderingComponent();
        return [false, unsupportedStartTransition];
      },
      useId: function() {
        var treeId = currentlyRenderingTask.treeContext;
        var overflow = treeId.overflow;
        treeId = treeId.id;
        treeId = (treeId & ~(1 << 32 - clz32(treeId) - 1)).toString(32) + overflow;
        var resumableState = currentResumableState;
        if (resumableState === null)
          throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");
        overflow = localIdCounter++;
        treeId = "_" + resumableState.idPrefix + "R_" + treeId;
        0 < overflow && (treeId += "H" + overflow.toString(32));
        return treeId + "_";
      },
      useSyncExternalStore: function(subscribe4, getSnapshot, getServerSnapshot) {
        if (getServerSnapshot === undefined)
          throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");
        return getServerSnapshot();
      },
      useOptimistic: function(passthrough) {
        resolveCurrentlyRenderingComponent();
        return [passthrough, unsupportedSetOptimisticState];
      },
      useActionState,
      useFormState: useActionState,
      useHostTransitionStatus: function() {
        resolveCurrentlyRenderingComponent();
        return NotPending;
      },
      useMemoCache: function(size) {
        for (var data = Array(size), i = 0;i < size; i++)
          data[i] = REACT_MEMO_CACHE_SENTINEL;
        return data;
      },
      useCacheRefresh: function() {
        return unsupportedRefresh;
      },
      useEffectEvent: function() {
        return throwOnUseEffectEventCall;
      }
    }, currentResumableState = null, currentTaskInDEV = null, DefaultAsyncDispatcher = {
      getCacheForType: function() {
        throw Error("Not implemented.");
      },
      cacheSignal: function() {
        throw Error("Not implemented.");
      },
      getOwner: function() {
        return currentTaskInDEV === null ? null : currentTaskInDEV.componentStack;
      }
    }, disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
    disabledLog.__reactDisabledLog = true;
    var prefix, suffix, reentry = false;
    var componentFrameCache = new (typeof WeakMap === "function" ? WeakMap : Map);
    var callComponent = {
      react_stack_bottom_frame: function(Component, props, secondArg) {
        return Component(props, secondArg);
      }
    }, callComponentInDEV = callComponent.react_stack_bottom_frame.bind(callComponent), callRender = {
      react_stack_bottom_frame: function(instance) {
        return instance.render();
      }
    }, callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender), callLazyInit = {
      react_stack_bottom_frame: function(lazy2) {
        var init4 = lazy2._init;
        return init4(lazy2._payload);
      }
    }, callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit), lastResetTime = 0;
    if (typeof performance === "object" && typeof performance.now === "function") {
      var localPerformance = performance;
      var getCurrentTime = function() {
        return localPerformance.now();
      };
    } else {
      var localDate = Date;
      getCurrentTime = function() {
        return localDate.now();
      };
    }
    var CLIENT_RENDERED = 4, PENDING = 0, COMPLETED = 1, FLUSHED = 2, ABORTED = 3, ERRORED = 4, POSTPONED = 5, CLOSED = 14, currentRequest = null, didWarnAboutBadClass = {}, didWarnAboutContextTypes = {}, didWarnAboutContextTypeOnFunctionComponent = {}, didWarnAboutGetDerivedStateOnFunctionComponent = {}, didWarnAboutReassigningProps = false, didWarnAboutGenerators = false, didWarnAboutMaps = false, flushedByteSize = 0, flushingPartialBoundaries = false;
    exports.renderToStaticMarkup = function(children, options2) {
      return renderToStringImpl(children, options2, true, 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server');
    };
    exports.renderToString = function(children, options2) {
      return renderToStringImpl(children, options2, false, 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server');
    };
    exports.version = "19.2.7";
  })();
});

// ../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/cjs/react-dom-server.node.development.js
import * as util2 from "util";
import * as crypto2 from "crypto";
import * as async_hooks from "async_hooks";
import * as stream from "stream";
var require_react_dom_server_node_development = __commonJS((exports) => {
  var React14 = __toESM(require_react());
  var ReactDOM = __toESM(require_react_dom());
  (function() {
    function styleReplacer(match, prefix2, s2, suffix2) {
      return "" + prefix2 + (s2 === "s" ? "\\73 " : "\\53 ") + suffix2;
    }
    function scriptReplacer(match, prefix2, s2, suffix2) {
      return "" + prefix2 + (s2 === "s" ? "\\u0073" : "\\u0053") + suffix2;
    }
    function getIteratorFn(maybeIterable) {
      if (maybeIterable === null || typeof maybeIterable !== "object")
        return null;
      maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
      return typeof maybeIterable === "function" ? maybeIterable : null;
    }
    function objectName(object2) {
      object2 = Object.prototype.toString.call(object2);
      return object2.slice(8, object2.length - 1);
    }
    function describeKeyForErrorMessage(key) {
      var encodedKey = JSON.stringify(key);
      return '"' + key + '"' === encodedKey ? key : encodedKey;
    }
    function describeValueForErrorMessage(value) {
      switch (typeof value) {
        case "string":
          return JSON.stringify(10 >= value.length ? value : value.slice(0, 10) + "...");
        case "object":
          if (isArrayImpl(value))
            return "[...]";
          if (value !== null && value.$$typeof === CLIENT_REFERENCE_TAG)
            return "client";
          value = objectName(value);
          return value === "Object" ? "{...}" : value;
        case "function":
          return value.$$typeof === CLIENT_REFERENCE_TAG ? "client" : (value = value.displayName || value.name) ? "function " + value : "function";
        default:
          return String(value);
      }
    }
    function describeElementType(type2) {
      if (typeof type2 === "string")
        return type2;
      switch (type2) {
        case REACT_SUSPENSE_TYPE:
          return "Suspense";
        case REACT_SUSPENSE_LIST_TYPE:
          return "SuspenseList";
      }
      if (typeof type2 === "object")
        switch (type2.$$typeof) {
          case REACT_FORWARD_REF_TYPE:
            return describeElementType(type2.render);
          case REACT_MEMO_TYPE:
            return describeElementType(type2.type);
          case REACT_LAZY_TYPE:
            var payload = type2._payload;
            type2 = type2._init;
            try {
              return describeElementType(type2(payload));
            } catch (x3) {}
        }
      return "";
    }
    function describeObjectForErrorMessage(objectOrArray, expandedName) {
      var objKind = objectName(objectOrArray);
      if (objKind !== "Object" && objKind !== "Array")
        return objKind;
      var start = -1, length = 0;
      if (isArrayImpl(objectOrArray))
        if (jsxChildrenParents.has(objectOrArray)) {
          var type2 = jsxChildrenParents.get(objectOrArray);
          objKind = "<" + describeElementType(type2) + ">";
          for (var i = 0;i < objectOrArray.length; i++) {
            var value = objectOrArray[i];
            value = typeof value === "string" ? value : typeof value === "object" && value !== null ? "{" + describeObjectForErrorMessage(value) + "}" : "{" + describeValueForErrorMessage(value) + "}";
            "" + i === expandedName ? (start = objKind.length, length = value.length, objKind += value) : objKind = 15 > value.length && 40 > objKind.length + value.length ? objKind + value : objKind + "{...}";
          }
          objKind += "</" + describeElementType(type2) + ">";
        } else {
          objKind = "[";
          for (type2 = 0;type2 < objectOrArray.length; type2++)
            0 < type2 && (objKind += ", "), i = objectOrArray[type2], i = typeof i === "object" && i !== null ? describeObjectForErrorMessage(i) : describeValueForErrorMessage(i), "" + type2 === expandedName ? (start = objKind.length, length = i.length, objKind += i) : objKind = 10 > i.length && 40 > objKind.length + i.length ? objKind + i : objKind + "...";
          objKind += "]";
        }
      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)
        objKind = "<" + describeElementType(objectOrArray.type) + "/>";
      else {
        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG)
          return "client";
        if (jsxPropsParents.has(objectOrArray)) {
          objKind = jsxPropsParents.get(objectOrArray);
          objKind = "<" + (describeElementType(objKind) || "...");
          type2 = Object.keys(objectOrArray);
          for (i = 0;i < type2.length; i++) {
            objKind += " ";
            value = type2[i];
            objKind += describeKeyForErrorMessage(value) + "=";
            var _value2 = objectOrArray[value];
            var _substr2 = value === expandedName && typeof _value2 === "object" && _value2 !== null ? describeObjectForErrorMessage(_value2) : describeValueForErrorMessage(_value2);
            typeof _value2 !== "string" && (_substr2 = "{" + _substr2 + "}");
            value === expandedName ? (start = objKind.length, length = _substr2.length, objKind += _substr2) : objKind = 10 > _substr2.length && 40 > objKind.length + _substr2.length ? objKind + _substr2 : objKind + "...";
          }
          objKind += ">";
        } else {
          objKind = "{";
          type2 = Object.keys(objectOrArray);
          for (i = 0;i < type2.length; i++)
            0 < i && (objKind += ", "), value = type2[i], objKind += describeKeyForErrorMessage(value) + ": ", _value2 = objectOrArray[value], _value2 = typeof _value2 === "object" && _value2 !== null ? describeObjectForErrorMessage(_value2) : describeValueForErrorMessage(_value2), value === expandedName ? (start = objKind.length, length = _value2.length, objKind += _value2) : objKind = 10 > _value2.length && 40 > objKind.length + _value2.length ? objKind + _value2 : objKind + "...";
          objKind += "}";
        }
      }
      return expandedName === undefined ? objKind : -1 < start && 0 < length ? (objectOrArray = " ".repeat(start) + "^".repeat(length), `
  ` + objKind + `
  ` + objectOrArray) : `
  ` + objKind;
    }
    function flushBuffered(destination) {
      typeof destination.flush === "function" && destination.flush();
    }
    function writeChunk(destination, chunk) {
      if (typeof chunk === "string") {
        if (chunk.length !== 0)
          if (2048 < 3 * chunk.length)
            0 < writtenBytes && (writeToDestination(destination, currentView.subarray(0, writtenBytes)), currentView = new Uint8Array(2048), writtenBytes = 0), writeToDestination(destination, chunk);
          else {
            var target = currentView;
            0 < writtenBytes && (target = currentView.subarray(writtenBytes));
            target = textEncoder.encodeInto(chunk, target);
            var read = target.read;
            writtenBytes += target.written;
            read < chunk.length && (writeToDestination(destination, currentView.subarray(0, writtenBytes)), currentView = new Uint8Array(2048), writtenBytes = textEncoder.encodeInto(chunk.slice(read), currentView).written);
            writtenBytes === 2048 && (writeToDestination(destination, currentView), currentView = new Uint8Array(2048), writtenBytes = 0);
          }
      } else
        chunk.byteLength !== 0 && (2048 < chunk.byteLength ? (0 < writtenBytes && (writeToDestination(destination, currentView.subarray(0, writtenBytes)), currentView = new Uint8Array(2048), writtenBytes = 0), writeToDestination(destination, chunk)) : (target = currentView.length - writtenBytes, target < chunk.byteLength && (target === 0 ? writeToDestination(destination, currentView) : (currentView.set(chunk.subarray(0, target), writtenBytes), writtenBytes += target, writeToDestination(destination, currentView), chunk = chunk.subarray(target)), currentView = new Uint8Array(2048), writtenBytes = 0), currentView.set(chunk, writtenBytes), writtenBytes += chunk.byteLength, writtenBytes === 2048 && (writeToDestination(destination, currentView), currentView = new Uint8Array(2048), writtenBytes = 0)));
    }
    function writeToDestination(destination, view) {
      destination = destination.write(view);
      destinationHasCapacity$1 = destinationHasCapacity$1 && destination;
    }
    function writeChunkAndReturn(destination, chunk) {
      writeChunk(destination, chunk);
      return destinationHasCapacity$1;
    }
    function completeWriting(destination) {
      currentView && 0 < writtenBytes && destination.write(currentView.subarray(0, writtenBytes));
      currentView = null;
      writtenBytes = 0;
      destinationHasCapacity$1 = true;
    }
    function stringToPrecomputedChunk(content) {
      content = textEncoder.encode(content);
      2048 < content.byteLength && console.error("precomputed chunks must be smaller than the view size configured for this host. This is a bug in React.");
      return content;
    }
    function byteLengthOfChunk(chunk) {
      return typeof chunk === "string" ? Buffer.byteLength(chunk, "utf8") : chunk.byteLength;
    }
    function typeName(value) {
      return typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
    }
    function willCoercionThrow(value) {
      try {
        return testStringCoercion(value), false;
      } catch (e2) {
        return true;
      }
    }
    function testStringCoercion(value) {
      return "" + value;
    }
    function checkAttributeStringCoercion(value, attributeName) {
      if (willCoercionThrow(value))
        return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", attributeName, typeName(value)), testStringCoercion(value);
    }
    function checkCSSPropertyStringCoercion(value, propName) {
      if (willCoercionThrow(value))
        return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", propName, typeName(value)), testStringCoercion(value);
    }
    function checkHtmlStringCoercion(value) {
      if (willCoercionThrow(value))
        return console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.", typeName(value)), testStringCoercion(value);
    }
    function isAttributeNameSafe(attributeName) {
      if (hasOwnProperty2.call(validatedAttributeNameCache, attributeName))
        return true;
      if (hasOwnProperty2.call(illegalAttributeNameCache, attributeName))
        return false;
      if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
        return validatedAttributeNameCache[attributeName] = true;
      illegalAttributeNameCache[attributeName] = true;
      console.error("Invalid attribute name: `%s`", attributeName);
      return false;
    }
    function checkControlledValueProps(tagName, props) {
      hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null || (tagName === "select" ? console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.") : console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."));
      props.onChange || props.readOnly || props.disabled || props.checked == null || console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
    }
    function validateProperty$1(tagName, name2) {
      if (hasOwnProperty2.call(warnedProperties$1, name2) && warnedProperties$1[name2])
        return true;
      if (rARIACamel$1.test(name2)) {
        tagName = "aria-" + name2.slice(4).toLowerCase();
        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
        if (tagName == null)
          return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", name2), warnedProperties$1[name2] = true;
        if (name2 !== tagName)
          return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?", name2, tagName), warnedProperties$1[name2] = true;
      }
      if (rARIA$1.test(name2)) {
        tagName = name2.toLowerCase();
        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
        if (tagName == null)
          return warnedProperties$1[name2] = true, false;
        name2 !== tagName && (console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?", name2, tagName), warnedProperties$1[name2] = true);
      }
      return true;
    }
    function validateProperties$2(type2, props) {
      var invalidProps = [], key;
      for (key in props)
        validateProperty$1(type2, key) || invalidProps.push(key);
      props = invalidProps.map(function(prop) {
        return "`" + prop + "`";
      }).join(", ");
      invalidProps.length === 1 ? console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props", props, type2) : 1 < invalidProps.length && console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props", props, type2);
    }
    function validateProperty(tagName, name2, value, eventRegistry) {
      if (hasOwnProperty2.call(warnedProperties, name2) && warnedProperties[name2])
        return true;
      var lowerCasedName = name2.toLowerCase();
      if (lowerCasedName === "onfocusin" || lowerCasedName === "onfocusout")
        return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."), warnedProperties[name2] = true;
      if (typeof value === "function" && (tagName === "form" && name2 === "action" || tagName === "input" && name2 === "formAction" || tagName === "button" && name2 === "formAction"))
        return true;
      if (eventRegistry != null) {
        tagName = eventRegistry.possibleRegistrationNames;
        if (eventRegistry.registrationNameDependencies.hasOwnProperty(name2))
          return true;
        eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null;
        if (eventRegistry != null)
          return console.error("Invalid event handler property `%s`. Did you mean `%s`?", name2, eventRegistry), warnedProperties[name2] = true;
        if (EVENT_NAME_REGEX.test(name2))
          return console.error("Unknown event handler property `%s`. It will be ignored.", name2), warnedProperties[name2] = true;
      } else if (EVENT_NAME_REGEX.test(name2))
        return INVALID_EVENT_NAME_REGEX.test(name2) && console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.", name2), warnedProperties[name2] = true;
      if (rARIA.test(name2) || rARIACamel.test(name2))
        return true;
      if (lowerCasedName === "innerhtml")
        return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."), warnedProperties[name2] = true;
      if (lowerCasedName === "aria")
        return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."), warnedProperties[name2] = true;
      if (lowerCasedName === "is" && value !== null && value !== undefined && typeof value !== "string")
        return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.", typeof value), warnedProperties[name2] = true;
      if (typeof value === "number" && isNaN(value))
        return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.", name2), warnedProperties[name2] = true;
      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
        if (lowerCasedName = possibleStandardNames[lowerCasedName], lowerCasedName !== name2)
          return console.error("Invalid DOM property `%s`. Did you mean `%s`?", name2, lowerCasedName), warnedProperties[name2] = true;
      } else if (name2 !== lowerCasedName)
        return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.", name2, lowerCasedName), warnedProperties[name2] = true;
      switch (name2) {
        case "dangerouslySetInnerHTML":
        case "children":
        case "style":
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "defaultValue":
        case "defaultChecked":
        case "innerHTML":
        case "ref":
          return true;
        case "innerText":
        case "textContent":
          return true;
      }
      switch (typeof value) {
        case "boolean":
          switch (name2) {
            case "autoFocus":
            case "checked":
            case "multiple":
            case "muted":
            case "selected":
            case "contentEditable":
            case "spellCheck":
            case "draggable":
            case "value":
            case "autoReverse":
            case "externalResourcesRequired":
            case "focusable":
            case "preserveAlpha":
            case "allowFullScreen":
            case "async":
            case "autoPlay":
            case "controls":
            case "default":
            case "defer":
            case "disabled":
            case "disablePictureInPicture":
            case "disableRemotePlayback":
            case "formNoValidate":
            case "hidden":
            case "loop":
            case "noModule":
            case "noValidate":
            case "open":
            case "playsInline":
            case "readOnly":
            case "required":
            case "reversed":
            case "scoped":
            case "seamless":
            case "itemScope":
            case "capture":
            case "download":
            case "inert":
              return true;
            default:
              lowerCasedName = name2.toLowerCase().slice(0, 5);
              if (lowerCasedName === "data-" || lowerCasedName === "aria-")
                return true;
              value ? console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.', value, name2, name2, value, name2) : console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.', value, name2, name2, value, name2, name2, name2);
              return warnedProperties[name2] = true;
          }
        case "function":
        case "symbol":
          return warnedProperties[name2] = true, false;
        case "string":
          if (value === "false" || value === "true") {
            switch (name2) {
              case "checked":
              case "selected":
              case "multiple":
              case "muted":
              case "allowFullScreen":
              case "async":
              case "autoPlay":
              case "controls":
              case "default":
              case "defer":
              case "disabled":
              case "disablePictureInPicture":
              case "disableRemotePlayback":
              case "formNoValidate":
              case "hidden":
              case "loop":
              case "noModule":
              case "noValidate":
              case "open":
              case "playsInline":
              case "readOnly":
              case "required":
              case "reversed":
              case "scoped":
              case "seamless":
              case "itemScope":
              case "inert":
                break;
              default:
                return true;
            }
            console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?", value, name2, value === "false" ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".', name2, value);
            warnedProperties[name2] = true;
          }
      }
      return true;
    }
    function warnUnknownProperties(type2, props, eventRegistry) {
      var unknownProps = [], key;
      for (key in props)
        validateProperty(type2, key, props[key], eventRegistry) || unknownProps.push(key);
      props = unknownProps.map(function(prop) {
        return "`" + prop + "`";
      }).join(", ");
      unknownProps.length === 1 ? console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ", props, type2) : 1 < unknownProps.length && console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ", props, type2);
    }
    function camelize(string4) {
      return string4.replace(hyphenPattern, function(_4, character) {
        return character.toUpperCase();
      });
    }
    function escapeTextForBrowser(text2) {
      if (typeof text2 === "boolean" || typeof text2 === "number" || typeof text2 === "bigint")
        return "" + text2;
      checkHtmlStringCoercion(text2);
      text2 = "" + text2;
      var match = matchHtmlRegExp.exec(text2);
      if (match) {
        var html2 = "", index2, lastIndex = 0;
        for (index2 = match.index;index2 < text2.length; index2++) {
          switch (text2.charCodeAt(index2)) {
            case 34:
              match = "&quot;";
              break;
            case 38:
              match = "&amp;";
              break;
            case 39:
              match = "&#x27;";
              break;
            case 60:
              match = "&lt;";
              break;
            case 62:
              match = "&gt;";
              break;
            default:
              continue;
          }
          lastIndex !== index2 && (html2 += text2.slice(lastIndex, index2));
          lastIndex = index2 + 1;
          html2 += match;
        }
        text2 = lastIndex !== index2 ? html2 + text2.slice(lastIndex, index2) : html2;
      }
      return text2;
    }
    function sanitizeURL(url2) {
      return isJavaScriptProtocol.test("" + url2) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url2;
    }
    function escapeEntireInlineScriptContent(scriptText) {
      checkHtmlStringCoercion(scriptText);
      return ("" + scriptText).replace(scriptRegex, scriptReplacer);
    }
    function createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) {
      externalRuntimeConfig = typeof nonce === "string" ? nonce : nonce && nonce.script;
      var inlineScriptWithNonce = externalRuntimeConfig === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(externalRuntimeConfig) + '"'), nonceStyle = typeof nonce === "string" ? undefined : nonce && nonce.style, inlineStyleWithNonce = nonceStyle === undefined ? startInlineStyle : stringToPrecomputedChunk('<style nonce="' + escapeTextForBrowser(nonceStyle) + '"'), idPrefix = resumableState.idPrefix, bootstrapChunks = [], bootstrapScriptContent = resumableState.bootstrapScriptContent, bootstrapScripts = resumableState.bootstrapScripts, bootstrapModules = resumableState.bootstrapModules;
      bootstrapScriptContent !== undefined && (bootstrapChunks.push(inlineScriptWithNonce), pushCompletedShellIdAttribute(bootstrapChunks, resumableState), bootstrapChunks.push(endOfStartTag, escapeEntireInlineScriptContent(bootstrapScriptContent), endInlineScript));
      bootstrapScriptContent = [];
      importMap !== undefined && (bootstrapScriptContent.push(importMapScriptStart), bootstrapScriptContent.push(escapeEntireInlineScriptContent(JSON.stringify(importMap))), bootstrapScriptContent.push(importMapScriptEnd));
      onHeaders && typeof maxHeadersLength === "number" && 0 >= maxHeadersLength && console.error("React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.", maxHeadersLength === 0 ? "zero" : maxHeadersLength);
      importMap = onHeaders ? {
        preconnects: "",
        fontPreloads: "",
        highImagePreloads: "",
        remainingCapacity: 2 + (typeof maxHeadersLength === "number" ? maxHeadersLength : 2000)
      } : null;
      onHeaders = {
        placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
        segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
        boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
        startInlineScript: inlineScriptWithNonce,
        startInlineStyle: inlineStyleWithNonce,
        preamble: createPreambleState(),
        externalRuntimeScript: null,
        bootstrapChunks,
        importMapChunks: bootstrapScriptContent,
        onHeaders,
        headers: importMap,
        resets: {
          font: {},
          dns: {},
          connect: { default: {}, anonymous: {}, credentials: {} },
          image: {},
          style: {}
        },
        charsetChunks: [],
        viewportChunks: [],
        hoistableChunks: [],
        preconnects: new Set,
        fontPreloads: new Set,
        highImagePreloads: new Set,
        styles: new Map,
        bootstrapScripts: new Set,
        scripts: new Set,
        bulkPreloads: new Set,
        preloads: {
          images: new Map,
          stylesheets: new Map,
          scripts: new Map,
          moduleScripts: new Map
        },
        nonce: { script: externalRuntimeConfig, style: nonceStyle },
        hoistableState: null,
        stylesToHoist: false
      };
      if (bootstrapScripts !== undefined)
        for (importMap = 0;importMap < bootstrapScripts.length; importMap++)
          maxHeadersLength = bootstrapScripts[importMap], inlineStyleWithNonce = nonceStyle = undefined, idPrefix = {
            rel: "preload",
            as: "script",
            fetchPriority: "low",
            nonce
          }, typeof maxHeadersLength === "string" ? idPrefix.href = inlineScriptWithNonce = maxHeadersLength : (idPrefix.href = inlineScriptWithNonce = maxHeadersLength.src, idPrefix.integrity = inlineStyleWithNonce = typeof maxHeadersLength.integrity === "string" ? maxHeadersLength.integrity : undefined, idPrefix.crossOrigin = nonceStyle = typeof maxHeadersLength === "string" || maxHeadersLength.crossOrigin == null ? undefined : maxHeadersLength.crossOrigin === "use-credentials" ? "use-credentials" : ""), preloadBootstrapScriptOrModule(resumableState, onHeaders, inlineScriptWithNonce, idPrefix), bootstrapChunks.push(startScriptSrc, escapeTextForBrowser(inlineScriptWithNonce), attributeEnd), externalRuntimeConfig && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(externalRuntimeConfig), attributeEnd), typeof inlineStyleWithNonce === "string" && bootstrapChunks.push(scriptIntegirty, escapeTextForBrowser(inlineStyleWithNonce), attributeEnd), typeof nonceStyle === "string" && bootstrapChunks.push(scriptCrossOrigin, escapeTextForBrowser(nonceStyle), attributeEnd), pushCompletedShellIdAttribute(bootstrapChunks, resumableState), bootstrapChunks.push(endAsyncScript);
      if (bootstrapModules !== undefined)
        for (nonce = 0;nonce < bootstrapModules.length; nonce++)
          bootstrapScripts = bootstrapModules[nonce], inlineScriptWithNonce = maxHeadersLength = undefined, nonceStyle = {
            rel: "modulepreload",
            fetchPriority: "low",
            nonce: externalRuntimeConfig
          }, typeof bootstrapScripts === "string" ? nonceStyle.href = importMap = bootstrapScripts : (nonceStyle.href = importMap = bootstrapScripts.src, nonceStyle.integrity = inlineScriptWithNonce = typeof bootstrapScripts.integrity === "string" ? bootstrapScripts.integrity : undefined, nonceStyle.crossOrigin = maxHeadersLength = typeof bootstrapScripts === "string" || bootstrapScripts.crossOrigin == null ? undefined : bootstrapScripts.crossOrigin === "use-credentials" ? "use-credentials" : ""), preloadBootstrapScriptOrModule(resumableState, onHeaders, importMap, nonceStyle), bootstrapChunks.push(startModuleSrc, escapeTextForBrowser(importMap), attributeEnd), externalRuntimeConfig && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(externalRuntimeConfig), attributeEnd), typeof inlineScriptWithNonce === "string" && bootstrapChunks.push(scriptIntegirty, escapeTextForBrowser(inlineScriptWithNonce), attributeEnd), typeof maxHeadersLength === "string" && bootstrapChunks.push(scriptCrossOrigin, escapeTextForBrowser(maxHeadersLength), attributeEnd), pushCompletedShellIdAttribute(bootstrapChunks, resumableState), bootstrapChunks.push(endAsyncScript);
      return onHeaders;
    }
    function createResumableState(identifierPrefix, externalRuntimeConfig, bootstrapScriptContent, bootstrapScripts, bootstrapModules) {
      return {
        idPrefix: identifierPrefix === undefined ? "" : identifierPrefix,
        nextFormID: 0,
        streamingFormat: 0,
        bootstrapScriptContent,
        bootstrapScripts,
        bootstrapModules,
        instructions: NothingSent,
        hasBody: false,
        hasHtml: false,
        unknownResources: {},
        dnsResources: {},
        connectResources: { default: {}, anonymous: {}, credentials: {} },
        imageResources: {},
        styleResources: {},
        scriptResources: {},
        moduleUnknownResources: {},
        moduleScriptResources: {}
      };
    }
    function createPreambleState() {
      return { htmlChunks: null, headChunks: null, bodyChunks: null };
    }
    function createFormatContext(insertionMode, selectedValue, tagScope, viewTransition) {
      return {
        insertionMode,
        selectedValue,
        tagScope,
        viewTransition
      };
    }
    function createRootFormatContext(namespaceURI) {
      return createFormatContext(namespaceURI === "http://www.w3.org/2000/svg" ? SVG_MODE : namespaceURI === "http://www.w3.org/1998/Math/MathML" ? MATHML_MODE : ROOT_HTML_MODE, null, 0, null);
    }
    function getChildFormatContext(parentContext, type2, props) {
      var subtreeScope = parentContext.tagScope & -25;
      switch (type2) {
        case "noscript":
          return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);
        case "select":
          return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, subtreeScope, null);
        case "svg":
          return createFormatContext(SVG_MODE, null, subtreeScope, null);
        case "picture":
          return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);
        case "math":
          return createFormatContext(MATHML_MODE, null, subtreeScope, null);
        case "foreignObject":
          return createFormatContext(HTML_MODE, null, subtreeScope, null);
        case "table":
          return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);
        case "thead":
        case "tbody":
        case "tfoot":
          return createFormatContext(HTML_TABLE_BODY_MODE, null, subtreeScope, null);
        case "colgroup":
          return createFormatContext(HTML_COLGROUP_MODE, null, subtreeScope, null);
        case "tr":
          return createFormatContext(HTML_TABLE_ROW_MODE, null, subtreeScope, null);
        case "head":
          if (parentContext.insertionMode < HTML_MODE)
            return createFormatContext(HTML_HEAD_MODE, null, subtreeScope, null);
          break;
        case "html":
          if (parentContext.insertionMode === ROOT_HTML_MODE)
            return createFormatContext(HTML_HTML_MODE, null, subtreeScope, null);
      }
      return parentContext.insertionMode >= HTML_TABLE_MODE || parentContext.insertionMode < HTML_MODE ? createFormatContext(HTML_MODE, null, subtreeScope, null) : parentContext.tagScope !== subtreeScope ? createFormatContext(parentContext.insertionMode, parentContext.selectedValue, subtreeScope, null) : parentContext;
    }
    function getSuspenseViewTransition(parentViewTransition) {
      return parentViewTransition === null ? null : {
        update: parentViewTransition.update,
        enter: "none",
        exit: "none",
        share: parentViewTransition.update,
        name: parentViewTransition.autoName,
        autoName: parentViewTransition.autoName,
        nameIdx: 0
      };
    }
    function getSuspenseFallbackFormatContext(resumableState, parentContext) {
      parentContext.tagScope & 32 && (resumableState.instructions |= 128);
      return createFormatContext(parentContext.insertionMode, parentContext.selectedValue, parentContext.tagScope | 12, getSuspenseViewTransition(parentContext.viewTransition));
    }
    function getSuspenseContentFormatContext(resumableState, parentContext) {
      resumableState = getSuspenseViewTransition(parentContext.viewTransition);
      var subtreeScope = parentContext.tagScope | 16;
      resumableState !== null && resumableState.share !== "none" && (subtreeScope |= 64);
      return createFormatContext(parentContext.insertionMode, parentContext.selectedValue, subtreeScope, resumableState);
    }
    function pushTextInstance(target, text2, renderState, textEmbedded) {
      if (text2 === "")
        return textEmbedded;
      textEmbedded && target.push(textSeparator);
      target.push(escapeTextForBrowser(text2));
      return true;
    }
    function pushStyleAttribute(target, style) {
      if (typeof style !== "object")
        throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");
      var isFirst = true, styleName;
      for (styleName in style)
        if (hasOwnProperty2.call(style, styleName)) {
          var styleValue = style[styleName];
          if (styleValue != null && typeof styleValue !== "boolean" && styleValue !== "") {
            if (styleName.indexOf("--") === 0) {
              var nameChunk = escapeTextForBrowser(styleName);
              checkCSSPropertyStringCoercion(styleValue, styleName);
              styleValue = escapeTextForBrowser(("" + styleValue).trim());
            } else {
              nameChunk = styleName;
              var value = styleValue;
              if (-1 < nameChunk.indexOf("-")) {
                var name2 = nameChunk;
                warnedStyleNames.hasOwnProperty(name2) && warnedStyleNames[name2] || (warnedStyleNames[name2] = true, console.error("Unsupported style property %s. Did you mean %s?", name2, camelize(name2.replace(msPattern$1, "ms-"))));
              } else if (badVendoredStyleNamePattern.test(nameChunk))
                name2 = nameChunk, warnedStyleNames.hasOwnProperty(name2) && warnedStyleNames[name2] || (warnedStyleNames[name2] = true, console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?", name2, name2.charAt(0).toUpperCase() + name2.slice(1)));
              else if (badStyleValueWithSemicolonPattern.test(value)) {
                name2 = nameChunk;
                var value$jscomp$0 = value;
                warnedStyleValues.hasOwnProperty(value$jscomp$0) && warnedStyleValues[value$jscomp$0] || (warnedStyleValues[value$jscomp$0] = true, console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`, name2, value$jscomp$0.replace(badStyleValueWithSemicolonPattern, "")));
              }
              typeof value === "number" && (isNaN(value) ? warnedForNaNValue || (warnedForNaNValue = true, console.error("`NaN` is an invalid value for the `%s` css style property.", nameChunk)) : isFinite(value) || warnedForInfinityValue || (warnedForInfinityValue = true, console.error("`Infinity` is an invalid value for the `%s` css style property.", nameChunk)));
              nameChunk = styleName;
              value = styleNameCache.get(nameChunk);
              value !== undefined ? nameChunk = value : (value = stringToPrecomputedChunk(escapeTextForBrowser(nameChunk.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern, "-ms-"))), styleNameCache.set(nameChunk, value), nameChunk = value);
              typeof styleValue === "number" ? styleValue = styleValue === 0 || unitlessNumbers.has(styleName) ? "" + styleValue : styleValue + "px" : (checkCSSPropertyStringCoercion(styleValue, styleName), styleValue = escapeTextForBrowser(("" + styleValue).trim()));
            }
            isFirst ? (isFirst = false, target.push(styleAttributeStart, nameChunk, styleAssign, styleValue)) : target.push(styleSeparator, nameChunk, styleAssign, styleValue);
          }
        }
      isFirst || target.push(attributeEnd);
    }
    function pushBooleanAttribute(target, name2, value) {
      value && typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeEmptyString);
    }
    function pushStringAttribute(target, name2, value) {
      typeof value !== "function" && typeof value !== "symbol" && typeof value !== "boolean" && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
    }
    function pushAdditionalFormField(value, key) {
      this.push(startHiddenInputChunk);
      validateAdditionalFormField(value);
      pushStringAttribute(this, "name", key);
      pushStringAttribute(this, "value", value);
      this.push(endOfStartTagSelfClosing);
    }
    function validateAdditionalFormField(value) {
      if (typeof value !== "string")
        throw Error("File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.");
    }
    function getCustomFormFields(resumableState, formAction) {
      if (typeof formAction.$$FORM_ACTION === "function") {
        var id = resumableState.nextFormID++;
        resumableState = resumableState.idPrefix + id;
        try {
          var customFields = formAction.$$FORM_ACTION(resumableState);
          if (customFields) {
            var formData = customFields.data;
            formData != null && formData.forEach(validateAdditionalFormField);
          }
          return customFields;
        } catch (x3) {
          if (typeof x3 === "object" && x3 !== null && typeof x3.then === "function")
            throw x3;
          console.error(`Failed to serialize an action for progressive enhancement:
%s`, x3);
        }
      }
      return null;
    }
    function pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name2) {
      var formData = null;
      if (typeof formAction === "function") {
        name2 === null || didWarnFormActionName || (didWarnFormActionName = true, console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'));
        formEncType === null && formMethod === null || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."));
        formTarget === null || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."));
        var customFields = getCustomFormFields(resumableState, formAction);
        customFields !== null ? (name2 = customFields.name, formAction = customFields.action || "", formEncType = customFields.encType, formMethod = customFields.method, formTarget = customFields.target, formData = customFields.data) : (target.push(attributeSeparator, "formAction", attributeAssign, actionJavaScriptURL, attributeEnd), formTarget = formMethod = formEncType = formAction = name2 = null, injectFormReplayingRuntime(resumableState, renderState));
      }
      name2 != null && pushAttribute(target, "name", name2);
      formAction != null && pushAttribute(target, "formAction", formAction);
      formEncType != null && pushAttribute(target, "formEncType", formEncType);
      formMethod != null && pushAttribute(target, "formMethod", formMethod);
      formTarget != null && pushAttribute(target, "formTarget", formTarget);
      return formData;
    }
    function pushAttribute(target, name2, value) {
      switch (name2) {
        case "className":
          pushStringAttribute(target, "class", value);
          break;
        case "tabIndex":
          pushStringAttribute(target, "tabindex", value);
          break;
        case "dir":
        case "role":
        case "viewBox":
        case "width":
        case "height":
          pushStringAttribute(target, name2, value);
          break;
        case "style":
          pushStyleAttribute(target, value);
          break;
        case "src":
        case "href":
          if (value === "") {
            name2 === "src" ? console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.', name2, name2) : console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.', name2, name2);
            break;
          }
        case "action":
        case "formAction":
          if (value == null || typeof value === "function" || typeof value === "symbol" || typeof value === "boolean")
            break;
          checkAttributeStringCoercion(value, name2);
          value = sanitizeURL("" + value);
          target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "defaultValue":
        case "defaultChecked":
        case "innerHTML":
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "ref":
          break;
        case "autoFocus":
        case "multiple":
        case "muted":
          pushBooleanAttribute(target, name2.toLowerCase(), value);
          break;
        case "xlinkHref":
          if (typeof value === "function" || typeof value === "symbol" || typeof value === "boolean")
            break;
          checkAttributeStringCoercion(value, name2);
          value = sanitizeURL("" + value);
          target.push(attributeSeparator, "xlink:href", attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "contentEditable":
        case "spellCheck":
        case "draggable":
        case "value":
        case "autoReverse":
        case "externalResourcesRequired":
        case "focusable":
        case "preserveAlpha":
          typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "inert":
          value !== "" || didWarnForNewBooleanPropsWithEmptyValue[name2] || (didWarnForNewBooleanPropsWithEmptyValue[name2] = true, console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.", name2));
        case "allowFullScreen":
        case "async":
        case "autoPlay":
        case "controls":
        case "default":
        case "defer":
        case "disabled":
        case "disablePictureInPicture":
        case "disableRemotePlayback":
        case "formNoValidate":
        case "hidden":
        case "loop":
        case "noModule":
        case "noValidate":
        case "open":
        case "playsInline":
        case "readOnly":
        case "required":
        case "reversed":
        case "scoped":
        case "seamless":
        case "itemScope":
          value && typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeEmptyString);
          break;
        case "capture":
        case "download":
          value === true ? target.push(attributeSeparator, name2, attributeEmptyString) : value !== false && typeof value !== "function" && typeof value !== "symbol" && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "cols":
        case "rows":
        case "size":
        case "span":
          typeof value !== "function" && typeof value !== "symbol" && !isNaN(value) && 1 <= value && target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "rowSpan":
        case "start":
          typeof value === "function" || typeof value === "symbol" || isNaN(value) || target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
          break;
        case "xlinkActuate":
          pushStringAttribute(target, "xlink:actuate", value);
          break;
        case "xlinkArcrole":
          pushStringAttribute(target, "xlink:arcrole", value);
          break;
        case "xlinkRole":
          pushStringAttribute(target, "xlink:role", value);
          break;
        case "xlinkShow":
          pushStringAttribute(target, "xlink:show", value);
          break;
        case "xlinkTitle":
          pushStringAttribute(target, "xlink:title", value);
          break;
        case "xlinkType":
          pushStringAttribute(target, "xlink:type", value);
          break;
        case "xmlBase":
          pushStringAttribute(target, "xml:base", value);
          break;
        case "xmlLang":
          pushStringAttribute(target, "xml:lang", value);
          break;
        case "xmlSpace":
          pushStringAttribute(target, "xml:space", value);
          break;
        default:
          if (!(2 < name2.length) || name2[0] !== "o" && name2[0] !== "O" || name2[1] !== "n" && name2[1] !== "N") {
            if (name2 = aliases.get(name2) || name2, isAttributeNameSafe(name2)) {
              switch (typeof value) {
                case "function":
                case "symbol":
                  return;
                case "boolean":
                  var prefix2 = name2.toLowerCase().slice(0, 5);
                  if (prefix2 !== "data-" && prefix2 !== "aria-")
                    return;
              }
              target.push(attributeSeparator, name2, attributeAssign, escapeTextForBrowser(value), attributeEnd);
            }
          }
      }
    }
    function pushInnerHTML(target, innerHTML, children) {
      if (innerHTML != null) {
        if (children != null)
          throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
        if (typeof innerHTML !== "object" || !("__html" in innerHTML))
          throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");
        innerHTML = innerHTML.__html;
        innerHTML !== null && innerHTML !== undefined && (checkHtmlStringCoercion(innerHTML), target.push("" + innerHTML));
      }
    }
    function checkSelectProp(props, propName) {
      var value = props[propName];
      value != null && (value = isArrayImpl(value), props.multiple && !value ? console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.", propName) : !props.multiple && value && console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.", propName));
    }
    function flattenOptionChildren(children) {
      var content = "";
      React14.Children.forEach(children, function(child) {
        child != null && (content += child, didWarnInvalidOptionChildren || typeof child === "string" || typeof child === "number" || typeof child === "bigint" || (didWarnInvalidOptionChildren = true, console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")));
      });
      return content;
    }
    function injectFormReplayingRuntime(resumableState, renderState) {
      if ((resumableState.instructions & 16) === NothingSent) {
        resumableState.instructions |= 16;
        var { preamble, bootstrapChunks } = renderState;
        (preamble.htmlChunks || preamble.headChunks) && bootstrapChunks.length === 0 ? (bootstrapChunks.push(renderState.startInlineScript), pushCompletedShellIdAttribute(bootstrapChunks, resumableState), bootstrapChunks.push(endOfStartTag, formReplayingRuntimeScript, endInlineScript)) : bootstrapChunks.unshift(renderState.startInlineScript, endOfStartTag, formReplayingRuntimeScript, endInlineScript);
      }
    }
    function pushLinkImpl(target, props) {
      target.push(startChunkForTag("link"));
      for (var propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
              case "dangerouslySetInnerHTML":
                throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTagSelfClosing);
      return null;
    }
    function escapeStyleTextContent(styleText) {
      checkHtmlStringCoercion(styleText);
      return ("" + styleText).replace(styleRegex, styleReplacer);
    }
    function pushSelfClosing(target, props, tag2) {
      target.push(startChunkForTag(tag2));
      for (var propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
              case "dangerouslySetInnerHTML":
                throw Error(tag2 + " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTagSelfClosing);
      return null;
    }
    function pushTitleImpl(target, props) {
      target.push(startChunkForTag("title"));
      var children = null, innerHTML = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                children = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      props = Array.isArray(children) ? 2 > children.length ? children[0] : null : children;
      typeof props !== "function" && typeof props !== "symbol" && props !== null && props !== undefined && target.push(escapeTextForBrowser("" + props));
      pushInnerHTML(target, innerHTML, children);
      target.push(endChunkForTag("title"));
      return null;
    }
    function pushScriptImpl(target, props) {
      target.push(startChunkForTag("script"));
      var children = null, innerHTML = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                children = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      children != null && typeof children !== "string" && (props = typeof children === "number" ? "a number for children" : Array.isArray(children) ? "an array for children" : "something unexpected for children", console.error("A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.", props));
      pushInnerHTML(target, innerHTML, children);
      typeof children === "string" && target.push(escapeEntireInlineScriptContent(children));
      target.push(endChunkForTag("script"));
      return null;
    }
    function pushStartSingletonElement(target, props, tag2) {
      target.push(startChunkForTag(tag2));
      var innerHTML = tag2 = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                tag2 = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      pushInnerHTML(target, innerHTML, tag2);
      return tag2;
    }
    function pushStartGenericElement(target, props, tag2) {
      target.push(startChunkForTag(tag2));
      var innerHTML = tag2 = null, propKey;
      for (propKey in props)
        if (hasOwnProperty2.call(props, propKey)) {
          var propValue = props[propKey];
          if (propValue != null)
            switch (propKey) {
              case "children":
                tag2 = propValue;
                break;
              case "dangerouslySetInnerHTML":
                innerHTML = propValue;
                break;
              default:
                pushAttribute(target, propKey, propValue);
            }
        }
      target.push(endOfStartTag);
      pushInnerHTML(target, innerHTML, tag2);
      return typeof tag2 === "string" ? (target.push(escapeTextForBrowser(tag2)), null) : tag2;
    }
    function startChunkForTag(tag2) {
      var tagStartChunk = validatedTagCache.get(tag2);
      if (tagStartChunk === undefined) {
        if (!VALID_TAG_REGEX.test(tag2))
          throw Error("Invalid tag: " + tag2);
        tagStartChunk = stringToPrecomputedChunk("<" + tag2);
        validatedTagCache.set(tag2, tagStartChunk);
      }
      return tagStartChunk;
    }
    function pushStartInstance(target$jscomp$0, type2, props, resumableState, renderState, preambleState, hoistableState, formatContext, textEmbedded) {
      validateProperties$2(type2, props);
      type2 !== "input" && type2 !== "textarea" && type2 !== "select" || props == null || props.value !== null || didWarnValueNull || (didWarnValueNull = true, type2 === "select" && props.multiple ? console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.", type2) : console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.", type2));
      b:
        if (type2.indexOf("-") === -1)
          var JSCompiler_inline_result = false;
        else
          switch (type2) {
            case "annotation-xml":
            case "color-profile":
            case "font-face":
            case "font-face-src":
            case "font-face-uri":
            case "font-face-format":
            case "font-face-name":
            case "missing-glyph":
              JSCompiler_inline_result = false;
              break b;
            default:
              JSCompiler_inline_result = true;
          }
      JSCompiler_inline_result || typeof props.is === "string" || warnUnknownProperties(type2, props, null);
      !props.suppressContentEditableWarning && props.contentEditable && props.children != null && console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");
      formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE && type2.indexOf("-") === -1 && type2.toLowerCase() !== type2 && console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.", type2);
      switch (type2) {
        case "div":
        case "span":
        case "svg":
        case "path":
          break;
        case "a":
          target$jscomp$0.push(startChunkForTag("a"));
          var children = null, innerHTML = null, propKey;
          for (propKey in props)
            if (hasOwnProperty2.call(props, propKey)) {
              var propValue = props[propKey];
              if (propValue != null)
                switch (propKey) {
                  case "children":
                    children = propValue;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML = propValue;
                    break;
                  case "href":
                    propValue === "" ? pushStringAttribute(target$jscomp$0, "href", "") : pushAttribute(target$jscomp$0, propKey, propValue);
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey, propValue);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML, children);
          if (typeof children === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children));
            var JSCompiler_inline_result$jscomp$0 = null;
          } else
            JSCompiler_inline_result$jscomp$0 = children;
          return JSCompiler_inline_result$jscomp$0;
        case "g":
        case "p":
        case "li":
          break;
        case "select":
          checkControlledValueProps("select", props);
          checkSelectProp(props, "value");
          checkSelectProp(props, "defaultValue");
          props.value === undefined || props.defaultValue === undefined || didWarnDefaultSelectValue || (console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"), didWarnDefaultSelectValue = true);
          target$jscomp$0.push(startChunkForTag("select"));
          var children$jscomp$0 = null, innerHTML$jscomp$0 = null, propKey$jscomp$0;
          for (propKey$jscomp$0 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$0)) {
              var propValue$jscomp$0 = props[propKey$jscomp$0];
              if (propValue$jscomp$0 != null)
                switch (propKey$jscomp$0) {
                  case "children":
                    children$jscomp$0 = propValue$jscomp$0;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$0 = propValue$jscomp$0;
                    break;
                  case "defaultValue":
                  case "value":
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$0, propValue$jscomp$0);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
          return children$jscomp$0;
        case "option":
          var selectedValue = formatContext.selectedValue;
          target$jscomp$0.push(startChunkForTag("option"));
          var children$jscomp$1 = null, value = null, selected = null, innerHTML$jscomp$1 = null, propKey$jscomp$1;
          for (propKey$jscomp$1 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$1)) {
              var propValue$jscomp$1 = props[propKey$jscomp$1];
              if (propValue$jscomp$1 != null)
                switch (propKey$jscomp$1) {
                  case "children":
                    children$jscomp$1 = propValue$jscomp$1;
                    break;
                  case "selected":
                    selected = propValue$jscomp$1;
                    didWarnSelectedSetOnOption || (console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."), didWarnSelectedSetOnOption = true);
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$1 = propValue$jscomp$1;
                    break;
                  case "value":
                    value = propValue$jscomp$1;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$1, propValue$jscomp$1);
                }
            }
          if (selectedValue != null) {
            if (value !== null) {
              checkAttributeStringCoercion(value, "value");
              var stringValue = "" + value;
            } else
              innerHTML$jscomp$1 === null || didWarnInvalidOptionInnerHTML || (didWarnInvalidOptionInnerHTML = true, console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")), stringValue = flattenOptionChildren(children$jscomp$1);
            if (isArrayImpl(selectedValue))
              for (var i = 0;i < selectedValue.length; i++) {
                if (checkAttributeStringCoercion(selectedValue[i], "value"), "" + selectedValue[i] === stringValue) {
                  target$jscomp$0.push(selectedMarkerAttribute);
                  break;
                }
              }
            else
              checkAttributeStringCoercion(selectedValue, "select.value"), "" + selectedValue === stringValue && target$jscomp$0.push(selectedMarkerAttribute);
          } else
            selected && target$jscomp$0.push(selectedMarkerAttribute);
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);
          return children$jscomp$1;
        case "textarea":
          checkControlledValueProps("textarea", props);
          props.value === undefined || props.defaultValue === undefined || didWarnDefaultTextareaValue || (console.error("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components"), didWarnDefaultTextareaValue = true);
          target$jscomp$0.push(startChunkForTag("textarea"));
          var value$jscomp$0 = null, defaultValue = null, children$jscomp$2 = null, propKey$jscomp$2;
          for (propKey$jscomp$2 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$2)) {
              var propValue$jscomp$2 = props[propKey$jscomp$2];
              if (propValue$jscomp$2 != null)
                switch (propKey$jscomp$2) {
                  case "children":
                    children$jscomp$2 = propValue$jscomp$2;
                    break;
                  case "value":
                    value$jscomp$0 = propValue$jscomp$2;
                    break;
                  case "defaultValue":
                    defaultValue = propValue$jscomp$2;
                    break;
                  case "dangerouslySetInnerHTML":
                    throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$2, propValue$jscomp$2);
                }
            }
          value$jscomp$0 === null && defaultValue !== null && (value$jscomp$0 = defaultValue);
          target$jscomp$0.push(endOfStartTag);
          if (children$jscomp$2 != null) {
            console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");
            if (value$jscomp$0 != null)
              throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
            if (isArrayImpl(children$jscomp$2)) {
              if (1 < children$jscomp$2.length)
                throw Error("<textarea> can only have at most one child.");
              checkHtmlStringCoercion(children$jscomp$2[0]);
              value$jscomp$0 = "" + children$jscomp$2[0];
            }
            checkHtmlStringCoercion(children$jscomp$2);
            value$jscomp$0 = "" + children$jscomp$2;
          }
          typeof value$jscomp$0 === "string" && value$jscomp$0[0] === `
` && target$jscomp$0.push(leadingNewline);
          value$jscomp$0 !== null && (checkAttributeStringCoercion(value$jscomp$0, "value"), target$jscomp$0.push(escapeTextForBrowser("" + value$jscomp$0)));
          return null;
        case "input":
          checkControlledValueProps("input", props);
          target$jscomp$0.push(startChunkForTag("input"));
          var name2 = null, formAction = null, formEncType = null, formMethod = null, formTarget = null, value$jscomp$1 = null, defaultValue$jscomp$0 = null, checked = null, defaultChecked = null, propKey$jscomp$3;
          for (propKey$jscomp$3 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$3)) {
              var propValue$jscomp$3 = props[propKey$jscomp$3];
              if (propValue$jscomp$3 != null)
                switch (propKey$jscomp$3) {
                  case "children":
                  case "dangerouslySetInnerHTML":
                    throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
                  case "name":
                    name2 = propValue$jscomp$3;
                    break;
                  case "formAction":
                    formAction = propValue$jscomp$3;
                    break;
                  case "formEncType":
                    formEncType = propValue$jscomp$3;
                    break;
                  case "formMethod":
                    formMethod = propValue$jscomp$3;
                    break;
                  case "formTarget":
                    formTarget = propValue$jscomp$3;
                    break;
                  case "defaultChecked":
                    defaultChecked = propValue$jscomp$3;
                    break;
                  case "defaultValue":
                    defaultValue$jscomp$0 = propValue$jscomp$3;
                    break;
                  case "checked":
                    checked = propValue$jscomp$3;
                    break;
                  case "value":
                    value$jscomp$1 = propValue$jscomp$3;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$3, propValue$jscomp$3);
                }
            }
          formAction === null || props.type === "image" || props.type === "submit" || didWarnFormActionType || (didWarnFormActionType = true, console.error('An input can only specify a formAction along with type="submit" or type="image".'));
          var formData = pushFormActionAttribute(target$jscomp$0, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name2);
          checked === null || defaultChecked === null || didWarnDefaultChecked || (console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", "A component", props.type), didWarnDefaultChecked = true);
          value$jscomp$1 === null || defaultValue$jscomp$0 === null || didWarnDefaultInputValue || (console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", "A component", props.type), didWarnDefaultInputValue = true);
          checked !== null ? pushBooleanAttribute(target$jscomp$0, "checked", checked) : defaultChecked !== null && pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked);
          value$jscomp$1 !== null ? pushAttribute(target$jscomp$0, "value", value$jscomp$1) : defaultValue$jscomp$0 !== null && pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
          target$jscomp$0.push(endOfStartTagSelfClosing);
          formData != null && formData.forEach(pushAdditionalFormField, target$jscomp$0);
          return null;
        case "button":
          target$jscomp$0.push(startChunkForTag("button"));
          var children$jscomp$3 = null, innerHTML$jscomp$2 = null, name$jscomp$0 = null, formAction$jscomp$0 = null, formEncType$jscomp$0 = null, formMethod$jscomp$0 = null, formTarget$jscomp$0 = null, propKey$jscomp$4;
          for (propKey$jscomp$4 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$4)) {
              var propValue$jscomp$4 = props[propKey$jscomp$4];
              if (propValue$jscomp$4 != null)
                switch (propKey$jscomp$4) {
                  case "children":
                    children$jscomp$3 = propValue$jscomp$4;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$2 = propValue$jscomp$4;
                    break;
                  case "name":
                    name$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formAction":
                    formAction$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formEncType":
                    formEncType$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formMethod":
                    formMethod$jscomp$0 = propValue$jscomp$4;
                    break;
                  case "formTarget":
                    formTarget$jscomp$0 = propValue$jscomp$4;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$4, propValue$jscomp$4);
                }
            }
          formAction$jscomp$0 === null || props.type == null || props.type === "submit" || didWarnFormActionType || (didWarnFormActionType = true, console.error('A button can only specify a formAction along with type="submit" or no type.'));
          var formData$jscomp$0 = pushFormActionAttribute(target$jscomp$0, resumableState, renderState, formAction$jscomp$0, formEncType$jscomp$0, formMethod$jscomp$0, formTarget$jscomp$0, name$jscomp$0);
          target$jscomp$0.push(endOfStartTag);
          formData$jscomp$0 != null && formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);
          if (typeof children$jscomp$3 === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));
            var JSCompiler_inline_result$jscomp$1 = null;
          } else
            JSCompiler_inline_result$jscomp$1 = children$jscomp$3;
          return JSCompiler_inline_result$jscomp$1;
        case "form":
          target$jscomp$0.push(startChunkForTag("form"));
          var children$jscomp$4 = null, innerHTML$jscomp$3 = null, formAction$jscomp$1 = null, formEncType$jscomp$1 = null, formMethod$jscomp$1 = null, formTarget$jscomp$1 = null, propKey$jscomp$5;
          for (propKey$jscomp$5 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$5)) {
              var propValue$jscomp$5 = props[propKey$jscomp$5];
              if (propValue$jscomp$5 != null)
                switch (propKey$jscomp$5) {
                  case "children":
                    children$jscomp$4 = propValue$jscomp$5;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$3 = propValue$jscomp$5;
                    break;
                  case "action":
                    formAction$jscomp$1 = propValue$jscomp$5;
                    break;
                  case "encType":
                    formEncType$jscomp$1 = propValue$jscomp$5;
                    break;
                  case "method":
                    formMethod$jscomp$1 = propValue$jscomp$5;
                    break;
                  case "target":
                    formTarget$jscomp$1 = propValue$jscomp$5;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$5, propValue$jscomp$5);
                }
            }
          var formData$jscomp$1 = null, formActionName = null;
          if (typeof formAction$jscomp$1 === "function") {
            formEncType$jscomp$1 === null && formMethod$jscomp$1 === null || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."));
            formTarget$jscomp$1 === null || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."));
            var customFields = getCustomFormFields(resumableState, formAction$jscomp$1);
            customFields !== null ? (formAction$jscomp$1 = customFields.action || "", formEncType$jscomp$1 = customFields.encType, formMethod$jscomp$1 = customFields.method, formTarget$jscomp$1 = customFields.target, formData$jscomp$1 = customFields.data, formActionName = customFields.name) : (target$jscomp$0.push(attributeSeparator, "action", attributeAssign, actionJavaScriptURL, attributeEnd), formTarget$jscomp$1 = formMethod$jscomp$1 = formEncType$jscomp$1 = formAction$jscomp$1 = null, injectFormReplayingRuntime(resumableState, renderState));
          }
          formAction$jscomp$1 != null && pushAttribute(target$jscomp$0, "action", formAction$jscomp$1);
          formEncType$jscomp$1 != null && pushAttribute(target$jscomp$0, "encType", formEncType$jscomp$1);
          formMethod$jscomp$1 != null && pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
          formTarget$jscomp$1 != null && pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
          target$jscomp$0.push(endOfStartTag);
          formActionName !== null && (target$jscomp$0.push(startHiddenInputChunk), pushStringAttribute(target$jscomp$0, "name", formActionName), target$jscomp$0.push(endOfStartTagSelfClosing), formData$jscomp$1 != null && formData$jscomp$1.forEach(pushAdditionalFormField, target$jscomp$0));
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);
          if (typeof children$jscomp$4 === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));
            var JSCompiler_inline_result$jscomp$2 = null;
          } else
            JSCompiler_inline_result$jscomp$2 = children$jscomp$4;
          return JSCompiler_inline_result$jscomp$2;
        case "menuitem":
          target$jscomp$0.push(startChunkForTag("menuitem"));
          for (var propKey$jscomp$6 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$6)) {
              var propValue$jscomp$6 = props[propKey$jscomp$6];
              if (propValue$jscomp$6 != null)
                switch (propKey$jscomp$6) {
                  case "children":
                  case "dangerouslySetInnerHTML":
                    throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$6, propValue$jscomp$6);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          return null;
        case "object":
          target$jscomp$0.push(startChunkForTag("object"));
          var children$jscomp$5 = null, innerHTML$jscomp$4 = null, propKey$jscomp$7;
          for (propKey$jscomp$7 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$7)) {
              var propValue$jscomp$7 = props[propKey$jscomp$7];
              if (propValue$jscomp$7 != null)
                switch (propKey$jscomp$7) {
                  case "children":
                    children$jscomp$5 = propValue$jscomp$7;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$4 = propValue$jscomp$7;
                    break;
                  case "data":
                    checkAttributeStringCoercion(propValue$jscomp$7, "data");
                    var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
                    if (sanitizedValue === "") {
                      console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.', propKey$jscomp$7, propKey$jscomp$7);
                      break;
                    }
                    target$jscomp$0.push(attributeSeparator, "data", attributeAssign, escapeTextForBrowser(sanitizedValue), attributeEnd);
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$7, propValue$jscomp$7);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
          if (typeof children$jscomp$5 === "string") {
            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));
            var JSCompiler_inline_result$jscomp$3 = null;
          } else
            JSCompiler_inline_result$jscomp$3 = children$jscomp$5;
          return JSCompiler_inline_result$jscomp$3;
        case "title":
          var noscriptTagInScope = formatContext.tagScope & 1, isFallback = formatContext.tagScope & 4;
          if (hasOwnProperty2.call(props, "children")) {
            var children$jscomp$6 = props.children, child = Array.isArray(children$jscomp$6) ? 2 > children$jscomp$6.length ? children$jscomp$6[0] : null : children$jscomp$6;
            Array.isArray(children$jscomp$6) && 1 < children$jscomp$6.length ? console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.", children$jscomp$6.length) : typeof child === "function" || typeof child === "symbol" ? console.error("React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.", typeof child === "function" ? "a Function" : "a Sybmol") : child && child.toString === {}.toString && (child.$$typeof != null ? console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.") : console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>."));
          }
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null)
            var JSCompiler_inline_result$jscomp$4 = pushTitleImpl(target$jscomp$0, props);
          else
            isFallback ? JSCompiler_inline_result$jscomp$4 = null : (pushTitleImpl(renderState.hoistableChunks, props), JSCompiler_inline_result$jscomp$4 = undefined);
          return JSCompiler_inline_result$jscomp$4;
        case "link":
          var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1, isFallback$jscomp$0 = formatContext.tagScope & 4, rel = props.rel, href = props.href, precedence = props.precedence;
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$0 || props.itemProp != null || typeof rel !== "string" || typeof href !== "string" || href === "") {
            rel === "stylesheet" && typeof props.precedence === "string" && (typeof href === "string" && href || console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', href === null ? "`null`" : href === undefined ? "`undefined`" : href === "" ? "an empty string" : 'something with type "' + typeof href + '"'));
            pushLinkImpl(target$jscomp$0, props);
            var JSCompiler_inline_result$jscomp$5 = null;
          } else if (props.rel === "stylesheet")
            if (typeof precedence !== "string" || props.disabled != null || props.onLoad || props.onError) {
              if (typeof precedence === "string") {
                if (props.disabled != null)
                  console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.');
                else if (props.onLoad || props.onError) {
                  var propDescription = props.onLoad && props.onError ? "`onLoad` and `onError` props" : props.onLoad ? "`onLoad` prop" : "`onError` prop";
                  console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription);
                }
              }
              JSCompiler_inline_result$jscomp$5 = pushLinkImpl(target$jscomp$0, props);
            } else {
              var styleQueue = renderState.styles.get(precedence), resourceState = resumableState.styleResources.hasOwnProperty(href) ? resumableState.styleResources[href] : undefined;
              if (resourceState !== EXISTS) {
                resumableState.styleResources[href] = EXISTS;
                styleQueue || (styleQueue = {
                  precedence: escapeTextForBrowser(precedence),
                  rules: [],
                  hrefs: [],
                  sheets: new Map
                }, renderState.styles.set(precedence, styleQueue));
                var resource = {
                  state: PENDING$1,
                  props: assign({}, props, {
                    "data-precedence": props.precedence,
                    precedence: null
                  })
                };
                if (resourceState) {
                  resourceState.length === 2 && adoptPreloadCredentials(resource.props, resourceState);
                  var preloadResource = renderState.preloads.stylesheets.get(href);
                  preloadResource && 0 < preloadResource.length ? preloadResource.length = 0 : resource.state = PRELOADED;
                }
                styleQueue.sheets.set(href, resource);
                hoistableState && hoistableState.stylesheets.add(resource);
              } else if (styleQueue) {
                var _resource = styleQueue.sheets.get(href);
                _resource && hoistableState && hoistableState.stylesheets.add(_resource);
              }
              textEmbedded && target$jscomp$0.push(textSeparator);
              JSCompiler_inline_result$jscomp$5 = null;
            }
          else
            props.onLoad || props.onError ? JSCompiler_inline_result$jscomp$5 = pushLinkImpl(target$jscomp$0, props) : (textEmbedded && target$jscomp$0.push(textSeparator), JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0 ? null : pushLinkImpl(renderState.hoistableChunks, props));
          return JSCompiler_inline_result$jscomp$5;
        case "script":
          var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1, asyncProp = props.async;
          if (typeof props.src !== "string" || !props.src || !asyncProp || typeof asyncProp === "function" || typeof asyncProp === "symbol" || props.onLoad || props.onError || formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$1 || props.itemProp != null)
            var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(target$jscomp$0, props);
          else {
            var key = props.src;
            if (props.type === "module") {
              var resources = resumableState.moduleScriptResources;
              var preloads = renderState.preloads.moduleScripts;
            } else
              resources = resumableState.scriptResources, preloads = renderState.preloads.scripts;
            var resourceState$jscomp$0 = resources.hasOwnProperty(key) ? resources[key] : undefined;
            if (resourceState$jscomp$0 !== EXISTS) {
              resources[key] = EXISTS;
              var scriptProps = props;
              if (resourceState$jscomp$0) {
                resourceState$jscomp$0.length === 2 && (scriptProps = assign({}, props), adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));
                var preloadResource$jscomp$0 = preloads.get(key);
                preloadResource$jscomp$0 && (preloadResource$jscomp$0.length = 0);
              }
              var resource$jscomp$0 = [];
              renderState.scripts.add(resource$jscomp$0);
              pushScriptImpl(resource$jscomp$0, scriptProps);
            }
            textEmbedded && target$jscomp$0.push(textSeparator);
            JSCompiler_inline_result$jscomp$6 = null;
          }
          return JSCompiler_inline_result$jscomp$6;
        case "style":
          var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;
          if (hasOwnProperty2.call(props, "children")) {
            var children$jscomp$7 = props.children, child$jscomp$0 = Array.isArray(children$jscomp$7) ? 2 > children$jscomp$7.length ? children$jscomp$7[0] : null : children$jscomp$7;
            (typeof child$jscomp$0 === "function" || typeof child$jscomp$0 === "symbol" || Array.isArray(child$jscomp$0)) && console.error("React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.", typeof child$jscomp$0 === "function" ? "a Function" : typeof child$jscomp$0 === "symbol" ? "a Sybmol" : "an Array");
          }
          var { precedence: precedence$jscomp$0, href: href$jscomp$0, nonce } = props;
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$2 || props.itemProp != null || typeof precedence$jscomp$0 !== "string" || typeof href$jscomp$0 !== "string" || href$jscomp$0 === "") {
            target$jscomp$0.push(startChunkForTag("style"));
            var children$jscomp$8 = null, innerHTML$jscomp$5 = null, propKey$jscomp$8;
            for (propKey$jscomp$8 in props)
              if (hasOwnProperty2.call(props, propKey$jscomp$8)) {
                var propValue$jscomp$8 = props[propKey$jscomp$8];
                if (propValue$jscomp$8 != null)
                  switch (propKey$jscomp$8) {
                    case "children":
                      children$jscomp$8 = propValue$jscomp$8;
                      break;
                    case "dangerouslySetInnerHTML":
                      innerHTML$jscomp$5 = propValue$jscomp$8;
                      break;
                    default:
                      pushAttribute(target$jscomp$0, propKey$jscomp$8, propValue$jscomp$8);
                  }
              }
            target$jscomp$0.push(endOfStartTag);
            var child$jscomp$1 = Array.isArray(children$jscomp$8) ? 2 > children$jscomp$8.length ? children$jscomp$8[0] : null : children$jscomp$8;
            typeof child$jscomp$1 !== "function" && typeof child$jscomp$1 !== "symbol" && child$jscomp$1 !== null && child$jscomp$1 !== undefined && target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1));
            pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$8);
            target$jscomp$0.push(endChunkForTag("style"));
            var JSCompiler_inline_result$jscomp$7 = null;
          } else {
            href$jscomp$0.includes(" ") && console.error('React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is "%s".', href$jscomp$0);
            var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0), resourceState$jscomp$1 = resumableState.styleResources.hasOwnProperty(href$jscomp$0) ? resumableState.styleResources[href$jscomp$0] : undefined;
            if (resourceState$jscomp$1 !== EXISTS) {
              resumableState.styleResources[href$jscomp$0] = EXISTS;
              resourceState$jscomp$1 && console.error('React encountered a hoistable style tag for the same href as a preload: "%s". When using a style tag to inline styles you should not also preload it as a stylsheet.', href$jscomp$0);
              styleQueue$jscomp$0 || (styleQueue$jscomp$0 = {
                precedence: escapeTextForBrowser(precedence$jscomp$0),
                rules: [],
                hrefs: [],
                sheets: new Map
              }, renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
              var nonceStyle = renderState.nonce.style;
              if (nonceStyle && nonceStyle !== nonce)
                console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce "%s" that was included with this render.', precedence$jscomp$0, nonce, nonceStyle);
              else {
                !nonceStyle && nonce && console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.', precedence$jscomp$0, nonce);
                styleQueue$jscomp$0.hrefs.push(escapeTextForBrowser(href$jscomp$0));
                var target = styleQueue$jscomp$0.rules, children$jscomp$9 = null, innerHTML$jscomp$6 = null, propKey$jscomp$9;
                for (propKey$jscomp$9 in props)
                  if (hasOwnProperty2.call(props, propKey$jscomp$9)) {
                    var propValue$jscomp$9 = props[propKey$jscomp$9];
                    if (propValue$jscomp$9 != null)
                      switch (propKey$jscomp$9) {
                        case "children":
                          children$jscomp$9 = propValue$jscomp$9;
                          break;
                        case "dangerouslySetInnerHTML":
                          innerHTML$jscomp$6 = propValue$jscomp$9;
                      }
                  }
                var child$jscomp$2 = Array.isArray(children$jscomp$9) ? 2 > children$jscomp$9.length ? children$jscomp$9[0] : null : children$jscomp$9;
                typeof child$jscomp$2 !== "function" && typeof child$jscomp$2 !== "symbol" && child$jscomp$2 !== null && child$jscomp$2 !== undefined && target.push(escapeStyleTextContent(child$jscomp$2));
                pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);
              }
            }
            styleQueue$jscomp$0 && hoistableState && hoistableState.styles.add(styleQueue$jscomp$0);
            textEmbedded && target$jscomp$0.push(textSeparator);
            JSCompiler_inline_result$jscomp$7 = undefined;
          }
          return JSCompiler_inline_result$jscomp$7;
        case "meta":
          var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1, isFallback$jscomp$1 = formatContext.tagScope & 4;
          if (formatContext.insertionMode === SVG_MODE || noscriptTagInScope$jscomp$3 || props.itemProp != null)
            var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(target$jscomp$0, props, "meta");
          else
            textEmbedded && target$jscomp$0.push(textSeparator), JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1 ? null : typeof props.charSet === "string" ? pushSelfClosing(renderState.charsetChunks, props, "meta") : props.name === "viewport" ? pushSelfClosing(renderState.viewportChunks, props, "meta") : pushSelfClosing(renderState.hoistableChunks, props, "meta");
          return JSCompiler_inline_result$jscomp$8;
        case "listing":
        case "pre":
          target$jscomp$0.push(startChunkForTag(type2));
          var children$jscomp$10 = null, innerHTML$jscomp$7 = null, propKey$jscomp$10;
          for (propKey$jscomp$10 in props)
            if (hasOwnProperty2.call(props, propKey$jscomp$10)) {
              var propValue$jscomp$10 = props[propKey$jscomp$10];
              if (propValue$jscomp$10 != null)
                switch (propKey$jscomp$10) {
                  case "children":
                    children$jscomp$10 = propValue$jscomp$10;
                    break;
                  case "dangerouslySetInnerHTML":
                    innerHTML$jscomp$7 = propValue$jscomp$10;
                    break;
                  default:
                    pushAttribute(target$jscomp$0, propKey$jscomp$10, propValue$jscomp$10);
                }
            }
          target$jscomp$0.push(endOfStartTag);
          if (innerHTML$jscomp$7 != null) {
            if (children$jscomp$10 != null)
              throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
            if (typeof innerHTML$jscomp$7 !== "object" || !("__html" in innerHTML$jscomp$7))
              throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");
            var html2 = innerHTML$jscomp$7.__html;
            html2 !== null && html2 !== undefined && (typeof html2 === "string" && 0 < html2.length && html2[0] === `
` ? target$jscomp$0.push(leadingNewline, html2) : (checkHtmlStringCoercion(html2), target$jscomp$0.push("" + html2)));
          }
          typeof children$jscomp$10 === "string" && children$jscomp$10[0] === `
` && target$jscomp$0.push(leadingNewline);
          return children$jscomp$10;
        case "img":
          var pictureOrNoScriptTagInScope = formatContext.tagScope & 3, src = props.src, srcSet = props.srcSet;
          if (!(props.loading === "lazy" || !src && !srcSet || typeof src !== "string" && src != null || typeof srcSet !== "string" && srcSet != null || props.fetchPriority === "low" || pictureOrNoScriptTagInScope) && (typeof src !== "string" || src[4] !== ":" || src[0] !== "d" && src[0] !== "D" || src[1] !== "a" && src[1] !== "A" || src[2] !== "t" && src[2] !== "T" || src[3] !== "a" && src[3] !== "A") && (typeof srcSet !== "string" || srcSet[4] !== ":" || srcSet[0] !== "d" && srcSet[0] !== "D" || srcSet[1] !== "a" && srcSet[1] !== "A" || srcSet[2] !== "t" && srcSet[2] !== "T" || srcSet[3] !== "a" && srcSet[3] !== "A")) {
            hoistableState !== null && formatContext.tagScope & 64 && (hoistableState.suspenseyImages = true);
            var sizes = typeof props.sizes === "string" ? props.sizes : undefined, key$jscomp$0 = srcSet ? srcSet + `
` + (sizes || "") : src, promotablePreloads = renderState.preloads.images, resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);
            if (resource$jscomp$1) {
              if (props.fetchPriority === "high" || 10 > renderState.highImagePreloads.size)
                promotablePreloads.delete(key$jscomp$0), renderState.highImagePreloads.add(resource$jscomp$1);
            } else if (!resumableState.imageResources.hasOwnProperty(key$jscomp$0)) {
              resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
              var input = props.crossOrigin;
              var crossOrigin = typeof input === "string" ? input === "use-credentials" ? input : "" : undefined;
              var headers = renderState.headers, header;
              headers && 0 < headers.remainingCapacity && typeof props.srcSet !== "string" && (props.fetchPriority === "high" || 500 > headers.highImagePreloads.length) && (header = getPreloadAsHeader(src, "image", {
                imageSrcSet: props.srcSet,
                imageSizes: props.sizes,
                crossOrigin,
                integrity: props.integrity,
                nonce: props.nonce,
                type: props.type,
                fetchPriority: props.fetchPriority,
                referrerPolicy: props.refererPolicy
              }), 0 <= (headers.remainingCapacity -= header.length + 2)) ? (renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS, headers.highImagePreloads && (headers.highImagePreloads += ", "), headers.highImagePreloads += header) : (resource$jscomp$1 = [], pushLinkImpl(resource$jscomp$1, {
                rel: "preload",
                as: "image",
                href: srcSet ? undefined : src,
                imageSrcSet: srcSet,
                imageSizes: sizes,
                crossOrigin,
                integrity: props.integrity,
                type: props.type,
                fetchPriority: props.fetchPriority,
                referrerPolicy: props.referrerPolicy
              }), props.fetchPriority === "high" || 10 > renderState.highImagePreloads.size ? renderState.highImagePreloads.add(resource$jscomp$1) : (renderState.bulkPreloads.add(resource$jscomp$1), promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
            }
          }
          return pushSelfClosing(target$jscomp$0, props, "img");
        case "base":
        case "area":
        case "br":
        case "col":
        case "embed":
        case "hr":
        case "keygen":
        case "param":
        case "source":
        case "track":
        case "wbr":
          return pushSelfClosing(target$jscomp$0, props, type2);
        case "annotation-xml":
        case "color-profile":
        case "font-face":
        case "font-face-src":
        case "font-face-uri":
        case "font-face-format":
        case "font-face-name":
        case "missing-glyph":
          break;
        case "head":
          if (formatContext.insertionMode < HTML_MODE) {
            var preamble = preambleState || renderState.preamble;
            if (preamble.headChunks)
              throw Error("The `<head>` tag may only be rendered once.");
            preambleState !== null && target$jscomp$0.push(headPreambleContributionChunk);
            preamble.headChunks = [];
            var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(preamble.headChunks, props, "head");
          } else
            JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(target$jscomp$0, props, "head");
          return JSCompiler_inline_result$jscomp$9;
        case "body":
          if (formatContext.insertionMode < HTML_MODE) {
            var preamble$jscomp$0 = preambleState || renderState.preamble;
            if (preamble$jscomp$0.bodyChunks)
              throw Error("The `<body>` tag may only be rendered once.");
            preambleState !== null && target$jscomp$0.push(bodyPreambleContributionChunk);
            preamble$jscomp$0.bodyChunks = [];
            var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(preamble$jscomp$0.bodyChunks, props, "body");
          } else
            JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(target$jscomp$0, props, "body");
          return JSCompiler_inline_result$jscomp$10;
        case "html":
          if (formatContext.insertionMode === ROOT_HTML_MODE) {
            var preamble$jscomp$1 = preambleState || renderState.preamble;
            if (preamble$jscomp$1.htmlChunks)
              throw Error("The `<html>` tag may only be rendered once.");
            preambleState !== null && target$jscomp$0.push(htmlPreambleContributionChunk);
            preamble$jscomp$1.htmlChunks = [doctypeChunk];
            var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(preamble$jscomp$1.htmlChunks, props, "html");
          } else
            JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(target$jscomp$0, props, "html");
          return JSCompiler_inline_result$jscomp$11;
        default:
          if (type2.indexOf("-") !== -1) {
            target$jscomp$0.push(startChunkForTag(type2));
            var children$jscomp$11 = null, innerHTML$jscomp$8 = null, propKey$jscomp$11;
            for (propKey$jscomp$11 in props)
              if (hasOwnProperty2.call(props, propKey$jscomp$11)) {
                var propValue$jscomp$11 = props[propKey$jscomp$11];
                if (propValue$jscomp$11 != null) {
                  var attributeName = propKey$jscomp$11;
                  switch (propKey$jscomp$11) {
                    case "children":
                      children$jscomp$11 = propValue$jscomp$11;
                      break;
                    case "dangerouslySetInnerHTML":
                      innerHTML$jscomp$8 = propValue$jscomp$11;
                      break;
                    case "style":
                      pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
                      break;
                    case "suppressContentEditableWarning":
                    case "suppressHydrationWarning":
                    case "ref":
                      break;
                    case "className":
                      attributeName = "class";
                    default:
                      if (isAttributeNameSafe(propKey$jscomp$11) && typeof propValue$jscomp$11 !== "function" && typeof propValue$jscomp$11 !== "symbol" && propValue$jscomp$11 !== false) {
                        if (propValue$jscomp$11 === true)
                          propValue$jscomp$11 = "";
                        else if (typeof propValue$jscomp$11 === "object")
                          continue;
                        target$jscomp$0.push(attributeSeparator, attributeName, attributeAssign, escapeTextForBrowser(propValue$jscomp$11), attributeEnd);
                      }
                  }
                }
              }
            target$jscomp$0.push(endOfStartTag);
            pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$11);
            return children$jscomp$11;
          }
      }
      return pushStartGenericElement(target$jscomp$0, props, type2);
    }
    function endChunkForTag(tag2) {
      var chunk = endTagCache.get(tag2);
      chunk === undefined && (chunk = stringToPrecomputedChunk("</" + tag2 + ">"), endTagCache.set(tag2, chunk));
      return chunk;
    }
    function hoistPreambleState(renderState, preambleState) {
      renderState = renderState.preamble;
      renderState.htmlChunks === null && preambleState.htmlChunks && (renderState.htmlChunks = preambleState.htmlChunks);
      renderState.headChunks === null && preambleState.headChunks && (renderState.headChunks = preambleState.headChunks);
      renderState.bodyChunks === null && preambleState.bodyChunks && (renderState.bodyChunks = preambleState.bodyChunks);
    }
    function writeBootstrap(destination, renderState) {
      renderState = renderState.bootstrapChunks;
      for (var i = 0;i < renderState.length - 1; i++)
        writeChunk(destination, renderState[i]);
      return i < renderState.length ? (i = renderState[i], renderState.length = 0, writeChunkAndReturn(destination, i)) : true;
    }
    function writeStartPendingSuspenseBoundary(destination, renderState, id) {
      writeChunk(destination, startPendingSuspenseBoundary1);
      if (id === null)
        throw Error("An ID must have been assigned before we can complete the boundary.");
      writeChunk(destination, renderState.boundaryPrefix);
      writeChunk(destination, id.toString(16));
      return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);
    }
    function writeStartSegment(destination, renderState, formatContext, id) {
      switch (formatContext.insertionMode) {
        case ROOT_HTML_MODE:
        case HTML_HTML_MODE:
        case HTML_HEAD_MODE:
        case HTML_MODE:
          return writeChunk(destination, startSegmentHTML), writeChunk(destination, renderState.segmentPrefix), writeChunk(destination, id.toString(16)), writeChunkAndReturn(destination, startSegmentHTML2);
        case SVG_MODE:
          return writeChunk(destination, startSegmentSVG), writeChunk(destination, renderState.segmentPrefix), writeChunk(destination, id.toString(16)), writeChunkAndReturn(destination, startSegmentSVG2);
        case MATHML_MODE:
          return writeChunk(destination, startSegmentMathML), writeChunk(destination, renderState.segmentPrefix), writeChunk(destination, id.toString(16)), writeChunkAndReturn(destination, startSegmentMathML2);
        case HTML_TABLE_MODE:
          return writeChunk(destination, startSegmentTable), writeChunk(destination, renderState.segmentPrefix), writeChunk(destination, id.toString(16)), writeChunkAndReturn(destination, startSegmentTable2);
        case HTML_TABLE_BODY_MODE:
          return writeChunk(destination, startSegmentTableBody), writeChunk(destination, renderState.segmentPrefix), writeChunk(destination, id.toString(16)), writeChunkAndReturn(destination, startSegmentTableBody2);
        case HTML_TABLE_ROW_MODE:
          return writeChunk(destination, startSegmentTableRow), writeChunk(destination, renderState.segmentPrefix), writeChunk(destination, id.toString(16)), writeChunkAndReturn(destination, startSegmentTableRow2);
        case HTML_COLGROUP_MODE:
          return writeChunk(destination, startSegmentColGroup), writeChunk(destination, renderState.segmentPrefix), writeChunk(destination, id.toString(16)), writeChunkAndReturn(destination, startSegmentColGroup2);
        default:
          throw Error("Unknown insertion mode. This is a bug in React.");
      }
    }
    function writeEndSegment(destination, formatContext) {
      switch (formatContext.insertionMode) {
        case ROOT_HTML_MODE:
        case HTML_HTML_MODE:
        case HTML_HEAD_MODE:
        case HTML_MODE:
          return writeChunkAndReturn(destination, endSegmentHTML);
        case SVG_MODE:
          return writeChunkAndReturn(destination, endSegmentSVG);
        case MATHML_MODE:
          return writeChunkAndReturn(destination, endSegmentMathML);
        case HTML_TABLE_MODE:
          return writeChunkAndReturn(destination, endSegmentTable);
        case HTML_TABLE_BODY_MODE:
          return writeChunkAndReturn(destination, endSegmentTableBody);
        case HTML_TABLE_ROW_MODE:
          return writeChunkAndReturn(destination, endSegmentTableRow);
        case HTML_COLGROUP_MODE:
          return writeChunkAndReturn(destination, endSegmentColGroup);
        default:
          throw Error("Unknown insertion mode. This is a bug in React.");
      }
    }
    function escapeJSStringsForInstructionScripts(input) {
      return JSON.stringify(input).replace(regexForJSStringsInInstructionScripts, function(match) {
        switch (match) {
          case "<":
            return "\\u003c";
          case "\u2028":
            return "\\u2028";
          case "\u2029":
            return "\\u2029";
          default:
            throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
        }
      });
    }
    function escapeJSObjectForInstructionScripts(input) {
      return JSON.stringify(input).replace(regexForJSStringsInScripts, function(match) {
        switch (match) {
          case "&":
            return "\\u0026";
          case ">":
            return "\\u003e";
          case "<":
            return "\\u003c";
          case "\u2028":
            return "\\u2028";
          case "\u2029":
            return "\\u2029";
          default:
            throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
        }
      });
    }
    function flushStyleTagsLateForBoundary(styleQueue) {
      var { rules, hrefs } = styleQueue;
      0 < rules.length && hrefs.length === 0 && console.error("React expected to have at least one href for an a hoistable style but found none. This is a bug in React.");
      var i = 0;
      if (hrefs.length) {
        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
        writeChunk(this, lateStyleTagResourceOpen1);
        writeChunk(this, styleQueue.precedence);
        for (writeChunk(this, lateStyleTagResourceOpen2);i < hrefs.length - 1; i++)
          writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);
        writeChunk(this, hrefs[i]);
        writeChunk(this, lateStyleTagResourceOpen3);
        for (i = 0;i < rules.length; i++)
          writeChunk(this, rules[i]);
        destinationHasCapacity = writeChunkAndReturn(this, lateStyleTagTemplateClose);
        currentlyRenderingBoundaryHasStylesToHoist = true;
        rules.length = 0;
        hrefs.length = 0;
      }
    }
    function hasStylesToHoist(stylesheet) {
      return stylesheet.state !== PREAMBLE ? currentlyRenderingBoundaryHasStylesToHoist = true : false;
    }
    function writeHoistablesForBoundary(destination, hoistableState, renderState) {
      currentlyRenderingBoundaryHasStylesToHoist = false;
      destinationHasCapacity = true;
      currentlyFlushingRenderState = renderState;
      hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
      currentlyFlushingRenderState = null;
      hoistableState.stylesheets.forEach(hasStylesToHoist);
      currentlyRenderingBoundaryHasStylesToHoist && (renderState.stylesToHoist = true);
      return destinationHasCapacity;
    }
    function flushResource(resource) {
      for (var i = 0;i < resource.length; i++)
        writeChunk(this, resource[i]);
      resource.length = 0;
    }
    function flushStyleInPreamble(stylesheet) {
      pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);
      for (var i = 0;i < stylesheetFlushingQueue.length; i++)
        writeChunk(this, stylesheetFlushingQueue[i]);
      stylesheetFlushingQueue.length = 0;
      stylesheet.state = PREAMBLE;
    }
    function flushStylesInPreamble(styleQueue) {
      var hasStylesheets = 0 < styleQueue.sheets.size;
      styleQueue.sheets.forEach(flushStyleInPreamble, this);
      styleQueue.sheets.clear();
      var { rules, hrefs } = styleQueue;
      if (!hasStylesheets || hrefs.length) {
        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
        writeChunk(this, styleTagResourceOpen1);
        writeChunk(this, styleQueue.precedence);
        styleQueue = 0;
        if (hrefs.length) {
          for (writeChunk(this, styleTagResourceOpen2);styleQueue < hrefs.length - 1; styleQueue++)
            writeChunk(this, hrefs[styleQueue]), writeChunk(this, spaceSeparator);
          writeChunk(this, hrefs[styleQueue]);
        }
        writeChunk(this, styleTagResourceOpen3);
        for (styleQueue = 0;styleQueue < rules.length; styleQueue++)
          writeChunk(this, rules[styleQueue]);
        writeChunk(this, styleTagResourceClose);
        rules.length = 0;
        hrefs.length = 0;
      }
    }
    function preloadLateStyle(stylesheet) {
      if (stylesheet.state === PENDING$1) {
        stylesheet.state = PRELOADED;
        var props = stylesheet.props;
        pushLinkImpl(stylesheetFlushingQueue, {
          rel: "preload",
          as: "style",
          href: stylesheet.props.href,
          crossOrigin: props.crossOrigin,
          fetchPriority: props.fetchPriority,
          integrity: props.integrity,
          media: props.media,
          hrefLang: props.hrefLang,
          referrerPolicy: props.referrerPolicy
        });
        for (stylesheet = 0;stylesheet < stylesheetFlushingQueue.length; stylesheet++)
          writeChunk(this, stylesheetFlushingQueue[stylesheet]);
        stylesheetFlushingQueue.length = 0;
      }
    }
    function preloadLateStyles(styleQueue) {
      styleQueue.sheets.forEach(preloadLateStyle, this);
      styleQueue.sheets.clear();
    }
    function pushCompletedShellIdAttribute(target, resumableState) {
      (resumableState.instructions & SentCompletedShellId) === NothingSent && (resumableState.instructions |= SentCompletedShellId, target.push(completedShellIdAttributeStart, escapeTextForBrowser("_" + resumableState.idPrefix + "R_"), attributeEnd));
    }
    function writeStyleResourceDependenciesInJS(destination, hoistableState) {
      writeChunk(destination, arrayFirstOpenBracket);
      var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
      hoistableState.stylesheets.forEach(function(resource) {
        if (resource.state !== PREAMBLE)
          if (resource.state === LATE)
            writeChunk(destination, nextArrayOpenBrackChunk), resource = resource.props.href, checkAttributeStringCoercion(resource, "href"), writeChunk(destination, escapeJSObjectForInstructionScripts("" + resource)), writeChunk(destination, arrayCloseBracket), nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
          else {
            writeChunk(destination, nextArrayOpenBrackChunk);
            var precedence = resource.props["data-precedence"], props = resource.props, coercedHref = sanitizeURL("" + resource.props.href);
            writeChunk(destination, escapeJSObjectForInstructionScripts(coercedHref));
            checkAttributeStringCoercion(precedence, "precedence");
            precedence = "" + precedence;
            writeChunk(destination, arrayInterstitial);
            writeChunk(destination, escapeJSObjectForInstructionScripts(precedence));
            for (var propKey in props)
              if (hasOwnProperty2.call(props, propKey) && (precedence = props[propKey], precedence != null))
                switch (propKey) {
                  case "href":
                  case "rel":
                  case "precedence":
                  case "data-precedence":
                    break;
                  case "children":
                  case "dangerouslySetInnerHTML":
                    throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
                  default:
                    writeStyleResourceAttributeInJS(destination, propKey, precedence);
                }
            writeChunk(destination, arrayCloseBracket);
            nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
            resource.state = LATE;
          }
      });
      writeChunk(destination, arrayCloseBracket);
    }
    function writeStyleResourceAttributeInJS(destination, name2, value) {
      var attributeName = name2.toLowerCase();
      switch (typeof value) {
        case "function":
        case "symbol":
          return;
      }
      switch (name2) {
        case "innerHTML":
        case "dangerouslySetInnerHTML":
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "style":
        case "ref":
          return;
        case "className":
          attributeName = "class";
          checkAttributeStringCoercion(value, attributeName);
          name2 = "" + value;
          break;
        case "hidden":
          if (value === false)
            return;
          name2 = "";
          break;
        case "src":
        case "href":
          value = sanitizeURL(value);
          checkAttributeStringCoercion(value, attributeName);
          name2 = "" + value;
          break;
        default:
          if (2 < name2.length && (name2[0] === "o" || name2[0] === "O") && (name2[1] === "n" || name2[1] === "N") || !isAttributeNameSafe(name2))
            return;
          checkAttributeStringCoercion(value, attributeName);
          name2 = "" + value;
      }
      writeChunk(destination, arrayInterstitial);
      writeChunk(destination, escapeJSObjectForInstructionScripts(attributeName));
      writeChunk(destination, arrayInterstitial);
      writeChunk(destination, escapeJSObjectForInstructionScripts(name2));
    }
    function createHoistableState() {
      return { styles: new Set, stylesheets: new Set, suspenseyImages: false };
    }
    function preloadBootstrapScriptOrModule(resumableState, renderState, href, props) {
      (resumableState.scriptResources.hasOwnProperty(href) || resumableState.moduleScriptResources.hasOwnProperty(href)) && console.error('Internal React Error: React expected bootstrap script or module with src "%s" to not have been preloaded already. please file an issue', href);
      resumableState.scriptResources[href] = EXISTS;
      resumableState.moduleScriptResources[href] = EXISTS;
      resumableState = [];
      pushLinkImpl(resumableState, props);
      renderState.bootstrapScripts.add(resumableState);
    }
    function adoptPreloadCredentials(target, preloadState) {
      target.crossOrigin == null && (target.crossOrigin = preloadState[0]);
      target.integrity == null && (target.integrity = preloadState[1]);
    }
    function getPreloadAsHeader(href, as2, params) {
      href = escapeHrefForLinkHeaderURLContext(href);
      as2 = escapeStringForLinkHeaderQuotedParamValueContext(as2, "as");
      as2 = "<" + href + '>; rel=preload; as="' + as2 + '"';
      for (var paramName in params)
        hasOwnProperty2.call(params, paramName) && (href = params[paramName], typeof href === "string" && (as2 += "; " + paramName.toLowerCase() + '="' + escapeStringForLinkHeaderQuotedParamValueContext(href, paramName) + '"'));
      return as2;
    }
    function escapeHrefForLinkHeaderURLContext(hrefInput) {
      checkAttributeStringCoercion(hrefInput, "href");
      return ("" + hrefInput).replace(regexForHrefInLinkHeaderURLContext, escapeHrefForLinkHeaderURLContextReplacer);
    }
    function escapeHrefForLinkHeaderURLContextReplacer(match) {
      switch (match) {
        case "<":
          return "%3C";
        case ">":
          return "%3E";
        case `
`:
          return "%0A";
        case "\r":
          return "%0D";
        default:
          throw Error("escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
      }
    }
    function escapeStringForLinkHeaderQuotedParamValueContext(value, name2) {
      willCoercionThrow(value) && (console.error("The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.", name2, typeName(value)), testStringCoercion(value));
      return ("" + value).replace(regexForLinkHeaderQuotedParamValueContext, escapeStringForLinkHeaderQuotedParamValueContextReplacer);
    }
    function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {
      switch (match) {
        case '"':
          return "%22";
        case "'":
          return "%27";
        case ";":
          return "%3B";
        case ",":
          return "%2C";
        case `
`:
          return "%0A";
        case "\r":
          return "%0D";
        default:
          throw Error("escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
      }
    }
    function hoistStyleQueueDependency(styleQueue) {
      this.styles.add(styleQueue);
    }
    function hoistStylesheetDependency(stylesheet) {
      this.stylesheets.add(stylesheet);
    }
    function hoistHoistables(parentState, childState) {
      childState.styles.forEach(hoistStyleQueueDependency, parentState);
      childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
      childState.suspenseyImages && (parentState.suspenseyImages = true);
    }
    function hasSuspenseyContent(hoistableState) {
      return 0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages;
    }
    function getComponentNameFromType(type2) {
      if (type2 == null)
        return null;
      if (typeof type2 === "function")
        return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
      if (typeof type2 === "string")
        return type2;
      switch (type2) {
        case REACT_FRAGMENT_TYPE:
          return "Fragment";
        case REACT_PROFILER_TYPE:
          return "Profiler";
        case REACT_STRICT_MODE_TYPE:
          return "StrictMode";
        case REACT_SUSPENSE_TYPE:
          return "Suspense";
        case REACT_SUSPENSE_LIST_TYPE:
          return "SuspenseList";
        case REACT_ACTIVITY_TYPE:
          return "Activity";
      }
      if (typeof type2 === "object")
        switch (typeof type2.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type2.$$typeof) {
          case REACT_PORTAL_TYPE:
            return "Portal";
          case REACT_CONTEXT_TYPE:
            return type2.displayName || "Context";
          case REACT_CONSUMER_TYPE:
            return (type2._context.displayName || "Context") + ".Consumer";
          case REACT_FORWARD_REF_TYPE:
            var innerType = type2.render;
            type2 = type2.displayName;
            type2 || (type2 = innerType.displayName || innerType.name || "", type2 = type2 !== "" ? "ForwardRef(" + type2 + ")" : "ForwardRef");
            return type2;
          case REACT_MEMO_TYPE:
            return innerType = type2.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type2.type) || "Memo";
          case REACT_LAZY_TYPE:
            innerType = type2._payload;
            type2 = type2._init;
            try {
              return getComponentNameFromType(type2(innerType));
            } catch (x3) {}
        }
      return null;
    }
    function popToNearestCommonAncestor(prev, next) {
      if (prev !== next) {
        prev.context._currentValue = prev.parentValue;
        prev = prev.parent;
        var parentNext = next.parent;
        if (prev === null) {
          if (parentNext !== null)
            throw Error("The stacks must reach the root at the same time. This is a bug in React.");
        } else {
          if (parentNext === null)
            throw Error("The stacks must reach the root at the same time. This is a bug in React.");
          popToNearestCommonAncestor(prev, parentNext);
        }
        next.context._currentValue = next.value;
      }
    }
    function popAllPrevious(prev) {
      prev.context._currentValue = prev.parentValue;
      prev = prev.parent;
      prev !== null && popAllPrevious(prev);
    }
    function pushAllNext(next) {
      var parentNext = next.parent;
      parentNext !== null && pushAllNext(parentNext);
      next.context._currentValue = next.value;
    }
    function popPreviousToCommonLevel(prev, next) {
      prev.context._currentValue = prev.parentValue;
      prev = prev.parent;
      if (prev === null)
        throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
      prev.depth === next.depth ? popToNearestCommonAncestor(prev, next) : popPreviousToCommonLevel(prev, next);
    }
    function popNextToCommonLevel(prev, next) {
      var parentNext = next.parent;
      if (parentNext === null)
        throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
      prev.depth === parentNext.depth ? popToNearestCommonAncestor(prev, parentNext) : popNextToCommonLevel(prev, parentNext);
      next.context._currentValue = next.value;
    }
    function switchContext(newSnapshot) {
      var prev = currentActiveSnapshot;
      prev !== newSnapshot && (prev === null ? pushAllNext(newSnapshot) : newSnapshot === null ? popAllPrevious(prev) : prev.depth === newSnapshot.depth ? popToNearestCommonAncestor(prev, newSnapshot) : prev.depth > newSnapshot.depth ? popPreviousToCommonLevel(prev, newSnapshot) : popNextToCommonLevel(prev, newSnapshot), currentActiveSnapshot = newSnapshot);
    }
    function warnOnInvalidCallback(callback) {
      if (callback !== null && typeof callback !== "function") {
        var key = String(callback);
        didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.", callback));
      }
    }
    function warnNoop(publicInstance, callerName) {
      publicInstance = (publicInstance = publicInstance.constructor) && getComponentNameFromType(publicInstance) || "ReactClass";
      var warningKey = publicInstance + "." + callerName;
      didWarnAboutNoopUpdateForComponent[warningKey] || (console.error(`Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.

Please check the code for the %s component.`, callerName, publicInstance), didWarnAboutNoopUpdateForComponent[warningKey] = true);
    }
    function pushTreeContext(baseContext, totalChildren, index2) {
      var baseIdWithLeadingBit = baseContext.id;
      baseContext = baseContext.overflow;
      var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
      baseIdWithLeadingBit &= ~(1 << baseLength);
      index2 += 1;
      var length = 32 - clz32(totalChildren) + baseLength;
      if (30 < length) {
        var numberOfOverflowBits = baseLength - baseLength % 5;
        length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
        baseIdWithLeadingBit >>= numberOfOverflowBits;
        baseLength -= numberOfOverflowBits;
        return {
          id: 1 << 32 - clz32(totalChildren) + baseLength | index2 << baseLength | baseIdWithLeadingBit,
          overflow: length + baseContext
        };
      }
      return {
        id: 1 << length | index2 << baseLength | baseIdWithLeadingBit,
        overflow: baseContext
      };
    }
    function clz32Fallback(x3) {
      x3 >>>= 0;
      return x3 === 0 ? 32 : 31 - (log4(x3) / LN2 | 0) | 0;
    }
    function noop() {}
    function trackUsedThenable(thenableState2, thenable, index2) {
      index2 = thenableState2[index2];
      index2 === undefined ? thenableState2.push(thenable) : index2 !== thenable && (thenable.then(noop, noop), thenable = index2);
      switch (thenable.status) {
        case "fulfilled":
          return thenable.value;
        case "rejected":
          throw thenable.reason;
        default:
          typeof thenable.status === "string" ? thenable.then(noop, noop) : (thenableState2 = thenable, thenableState2.status = "pending", thenableState2.then(function(fulfilledValue) {
            if (thenable.status === "pending") {
              var fulfilledThenable = thenable;
              fulfilledThenable.status = "fulfilled";
              fulfilledThenable.value = fulfilledValue;
            }
          }, function(error49) {
            if (thenable.status === "pending") {
              var rejectedThenable = thenable;
              rejectedThenable.status = "rejected";
              rejectedThenable.reason = error49;
            }
          }));
          switch (thenable.status) {
            case "fulfilled":
              return thenable.value;
            case "rejected":
              throw thenable.reason;
          }
          suspendedThenable = thenable;
          throw SuspenseException;
      }
    }
    function getSuspendedThenable() {
      if (suspendedThenable === null)
        throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");
      var thenable = suspendedThenable;
      suspendedThenable = null;
      return thenable;
    }
    function is3(x3, y3) {
      return x3 === y3 && (x3 !== 0 || 1 / x3 === 1 / y3) || x3 !== x3 && y3 !== y3;
    }
    function resolveCurrentlyRenderingComponent() {
      if (currentlyRenderingComponent === null)
        throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);
      isInHookUserCodeInDev && console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks");
      return currentlyRenderingComponent;
    }
    function createHook() {
      if (0 < numberOfReRenders)
        throw Error("Rendered more hooks than during the previous render");
      return { memoizedState: null, queue: null, next: null };
    }
    function createWorkInProgressHook() {
      workInProgressHook === null ? firstWorkInProgressHook === null ? (isReRender = false, firstWorkInProgressHook = workInProgressHook = createHook()) : (isReRender = true, workInProgressHook = firstWorkInProgressHook) : workInProgressHook.next === null ? (isReRender = false, workInProgressHook = workInProgressHook.next = createHook()) : (isReRender = true, workInProgressHook = workInProgressHook.next);
      return workInProgressHook;
    }
    function getThenableStateAfterSuspending() {
      var state = thenableState;
      thenableState = null;
      return state;
    }
    function resetHooksState() {
      isInHookUserCodeInDev = false;
      currentlyRenderingKeyPath = currentlyRenderingRequest = currentlyRenderingTask = currentlyRenderingComponent = null;
      didScheduleRenderPhaseUpdate = false;
      firstWorkInProgressHook = null;
      numberOfReRenders = 0;
      workInProgressHook = renderPhaseUpdates = null;
    }
    function readContext(context10) {
      isInHookUserCodeInDev && console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
      return context10._currentValue;
    }
    function basicStateReducer(state, action) {
      return typeof action === "function" ? action(state) : action;
    }
    function useReducer(reducer, initialArg, init4) {
      reducer !== basicStateReducer && (currentHookNameInDev = "useReducer");
      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
      workInProgressHook = createWorkInProgressHook();
      if (isReRender) {
        init4 = workInProgressHook.queue;
        initialArg = init4.dispatch;
        if (renderPhaseUpdates !== null) {
          var firstRenderPhaseUpdate = renderPhaseUpdates.get(init4);
          if (firstRenderPhaseUpdate !== undefined) {
            renderPhaseUpdates.delete(init4);
            init4 = workInProgressHook.memoizedState;
            do {
              var action = firstRenderPhaseUpdate.action;
              isInHookUserCodeInDev = true;
              init4 = reducer(init4, action);
              isInHookUserCodeInDev = false;
              firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;
            } while (firstRenderPhaseUpdate !== null);
            workInProgressHook.memoizedState = init4;
            return [init4, initialArg];
          }
        }
        return [workInProgressHook.memoizedState, initialArg];
      }
      isInHookUserCodeInDev = true;
      reducer = reducer === basicStateReducer ? typeof initialArg === "function" ? initialArg() : initialArg : init4 !== undefined ? init4(initialArg) : initialArg;
      isInHookUserCodeInDev = false;
      workInProgressHook.memoizedState = reducer;
      reducer = workInProgressHook.queue = { last: null, dispatch: null };
      reducer = reducer.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, reducer);
      return [workInProgressHook.memoizedState, reducer];
    }
    function useMemo(nextCreate, deps) {
      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
      workInProgressHook = createWorkInProgressHook();
      deps = deps === undefined ? null : deps;
      if (workInProgressHook !== null) {
        var prevState = workInProgressHook.memoizedState;
        if (prevState !== null && deps !== null) {
          a: {
            var JSCompiler_inline_result = prevState[1];
            if (JSCompiler_inline_result === null)
              console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", currentHookNameInDev), JSCompiler_inline_result = false;
            else {
              deps.length !== JSCompiler_inline_result.length && console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.

Previous: %s
Incoming: %s`, currentHookNameInDev, "[" + deps.join(", ") + "]", "[" + JSCompiler_inline_result.join(", ") + "]");
              for (var i = 0;i < JSCompiler_inline_result.length && i < deps.length; i++)
                if (!objectIs(deps[i], JSCompiler_inline_result[i])) {
                  JSCompiler_inline_result = false;
                  break a;
                }
              JSCompiler_inline_result = true;
            }
          }
          if (JSCompiler_inline_result)
            return prevState[0];
        }
      }
      isInHookUserCodeInDev = true;
      nextCreate = nextCreate();
      isInHookUserCodeInDev = false;
      workInProgressHook.memoizedState = [nextCreate, deps];
      return nextCreate;
    }
    function dispatchAction(componentIdentity, queue, action) {
      if (25 <= numberOfReRenders)
        throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
      if (componentIdentity === currentlyRenderingComponent)
        if (didScheduleRenderPhaseUpdate = true, componentIdentity = { action, next: null }, renderPhaseUpdates === null && (renderPhaseUpdates = new Map), action = renderPhaseUpdates.get(queue), action === undefined)
          renderPhaseUpdates.set(queue, componentIdentity);
        else {
          for (queue = action;queue.next !== null; )
            queue = queue.next;
          queue.next = componentIdentity;
        }
    }
    function throwOnUseEffectEventCall() {
      throw Error("A function wrapped in useEffectEvent can't be called during rendering.");
    }
    function unsupportedStartTransition() {
      throw Error("startTransition cannot be called during server rendering.");
    }
    function unsupportedSetOptimisticState() {
      throw Error("Cannot update optimistic state while rendering.");
    }
    function createPostbackActionStateKey(permalink, componentKeyPath, hookIndex) {
      if (permalink !== undefined)
        return "p" + permalink;
      permalink = JSON.stringify([componentKeyPath, null, hookIndex]);
      componentKeyPath = crypto2.createHash("md5");
      componentKeyPath.update(permalink);
      return "k" + componentKeyPath.digest("hex");
    }
    function useActionState(action, initialState, permalink) {
      resolveCurrentlyRenderingComponent();
      var actionStateHookIndex = actionStateCounter++, request2 = currentlyRenderingRequest;
      if (typeof action.$$FORM_ACTION === "function") {
        var nextPostbackStateKey = null, componentKeyPath = currentlyRenderingKeyPath;
        request2 = request2.formState;
        var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;
        if (request2 !== null && typeof isSignatureEqual === "function") {
          var postbackKey = request2[1];
          isSignatureEqual.call(action, request2[2], request2[3]) && (nextPostbackStateKey = createPostbackActionStateKey(permalink, componentKeyPath, actionStateHookIndex), postbackKey === nextPostbackStateKey && (actionStateMatchingIndex = actionStateHookIndex, initialState = request2[0]));
        }
        var boundAction = action.bind(null, initialState);
        action = function(payload) {
          boundAction(payload);
        };
        typeof boundAction.$$FORM_ACTION === "function" && (action.$$FORM_ACTION = function(prefix2) {
          prefix2 = boundAction.$$FORM_ACTION(prefix2);
          permalink !== undefined && (checkAttributeStringCoercion(permalink, "target"), permalink += "", prefix2.action = permalink);
          var formData = prefix2.data;
          formData && (nextPostbackStateKey === null && (nextPostbackStateKey = createPostbackActionStateKey(permalink, componentKeyPath, actionStateHookIndex)), formData.append("$ACTION_KEY", nextPostbackStateKey));
          return prefix2;
        });
        return [initialState, action, false];
      }
      var _boundAction = action.bind(null, initialState);
      return [
        initialState,
        function(payload) {
          _boundAction(payload);
        },
        false
      ];
    }
    function unwrapThenable(thenable) {
      var index2 = thenableIndexCounter;
      thenableIndexCounter += 1;
      thenableState === null && (thenableState = []);
      return trackUsedThenable(thenableState, thenable, index2);
    }
    function unsupportedRefresh() {
      throw Error("Cache cannot be refreshed during server rendering.");
    }
    function disabledLog() {}
    function disableLogs() {
      if (disabledDepth === 0) {
        prevLog = console.log;
        prevInfo = console.info;
        prevWarn = console.warn;
        prevError = console.error;
        prevGroup = console.group;
        prevGroupCollapsed = console.groupCollapsed;
        prevGroupEnd = console.groupEnd;
        var props = {
          configurable: true,
          enumerable: true,
          value: disabledLog,
          writable: true
        };
        Object.defineProperties(console, {
          info: props,
          log: props,
          warn: props,
          error: props,
          group: props,
          groupCollapsed: props,
          groupEnd: props
        });
      }
      disabledDepth++;
    }
    function reenableLogs() {
      disabledDepth--;
      if (disabledDepth === 0) {
        var props = { configurable: true, enumerable: true, writable: true };
        Object.defineProperties(console, {
          log: assign({}, props, { value: prevLog }),
          info: assign({}, props, { value: prevInfo }),
          warn: assign({}, props, { value: prevWarn }),
          error: assign({}, props, { value: prevError }),
          group: assign({}, props, { value: prevGroup }),
          groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
          groupEnd: assign({}, props, { value: prevGroupEnd })
        });
      }
      0 > disabledDepth && console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
    }
    function prepareStackTrace(error49, structuredStackTrace) {
      error49 = (error49.name || "Error") + ": " + (error49.message || "");
      for (var i = 0;i < structuredStackTrace.length; i++)
        error49 += `
    at ` + structuredStackTrace[i].toString();
      return error49;
    }
    function formatOwnerStack(error49) {
      var prevPrepareStackTrace = Error.prepareStackTrace;
      Error.prepareStackTrace = prepareStackTrace;
      error49 = error49.stack;
      Error.prepareStackTrace = prevPrepareStackTrace;
      error49.startsWith(`Error: react-stack-top-frame
`) && (error49 = error49.slice(29));
      prevPrepareStackTrace = error49.indexOf(`
`);
      prevPrepareStackTrace !== -1 && (error49 = error49.slice(prevPrepareStackTrace + 1));
      prevPrepareStackTrace = error49.indexOf("react_stack_bottom_frame");
      prevPrepareStackTrace !== -1 && (prevPrepareStackTrace = error49.lastIndexOf(`
`, prevPrepareStackTrace));
      if (prevPrepareStackTrace !== -1)
        error49 = error49.slice(0, prevPrepareStackTrace);
      else
        return "";
      return error49;
    }
    function describeBuiltInComponentFrame(name2) {
      if (prefix === undefined)
        try {
          throw Error();
        } catch (x3) {
          var match = x3.stack.trim().match(/\n( *(at )?)/);
          prefix = match && match[1] || "";
          suffix = -1 < x3.stack.indexOf(`
    at`) ? " (<anonymous>)" : -1 < x3.stack.indexOf("@") ? "@unknown:0:0" : "";
        }
      return `
` + prefix + name2 + suffix;
    }
    function describeNativeComponentFrame(fn2, construct2) {
      if (!fn2 || reentry)
        return "";
      var frame = componentFrameCache.get(fn2);
      if (frame !== undefined)
        return frame;
      reentry = true;
      frame = Error.prepareStackTrace;
      Error.prepareStackTrace = prepareStackTrace;
      var previousDispatcher2 = null;
      previousDispatcher2 = ReactSharedInternals.H;
      ReactSharedInternals.H = null;
      disableLogs();
      try {
        var RunInRootFrame = {
          DetermineComponentFrameRoot: function() {
            try {
              if (construct2) {
                var Fake = function() {
                  throw Error();
                };
                Object.defineProperty(Fake.prototype, "props", {
                  set: function() {
                    throw Error();
                  }
                });
                if (typeof Reflect === "object" && Reflect.construct) {
                  try {
                    Reflect.construct(Fake, []);
                  } catch (x3) {
                    var control = x3;
                  }
                  Reflect.construct(fn2, [], Fake);
                } else {
                  try {
                    Fake.call();
                  } catch (x$0) {
                    control = x$0;
                  }
                  fn2.call(Fake.prototype);
                }
              } else {
                try {
                  throw Error();
                } catch (x$1) {
                  control = x$1;
                }
                (Fake = fn2()) && typeof Fake.catch === "function" && Fake.catch(function() {});
              }
            } catch (sample) {
              if (sample && control && typeof sample.stack === "string")
                return [sample.stack, control.stack];
            }
            return [null, null];
          }
        };
        RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
        var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, "name");
        namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" });
        var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
        if (sampleStack && controlStack) {
          var sampleLines = sampleStack.split(`
`), controlLines = controlStack.split(`
`);
          for (_RunInRootFrame$Deter = namePropDescriptor = 0;namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes("DetermineComponentFrameRoot"); )
            namePropDescriptor++;
          for (;_RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes("DetermineComponentFrameRoot"); )
            _RunInRootFrame$Deter++;
          if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
            for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1;1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
              _RunInRootFrame$Deter--;
          for (;1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
            if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
              if (namePropDescriptor !== 1 || _RunInRootFrame$Deter !== 1) {
                do
                  if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
                    var _frame = `
` + sampleLines[namePropDescriptor].replace(" at new ", " at ");
                    fn2.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn2.displayName));
                    typeof fn2 === "function" && componentFrameCache.set(fn2, _frame);
                    return _frame;
                  }
                while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
              }
              break;
            }
        }
      } finally {
        reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame;
      }
      sampleLines = (sampleLines = fn2 ? fn2.displayName || fn2.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
      typeof fn2 === "function" && componentFrameCache.set(fn2, sampleLines);
      return sampleLines;
    }
    function describeComponentStackByType(type2) {
      if (typeof type2 === "string")
        return describeBuiltInComponentFrame(type2);
      if (typeof type2 === "function")
        return type2.prototype && type2.prototype.isReactComponent ? describeNativeComponentFrame(type2, true) : describeNativeComponentFrame(type2, false);
      if (typeof type2 === "object" && type2 !== null) {
        switch (type2.$$typeof) {
          case REACT_FORWARD_REF_TYPE:
            return describeNativeComponentFrame(type2.render, false);
          case REACT_MEMO_TYPE:
            return describeNativeComponentFrame(type2.type, false);
          case REACT_LAZY_TYPE:
            var lazyComponent = type2, payload = lazyComponent._payload;
            lazyComponent = lazyComponent._init;
            try {
              type2 = lazyComponent(payload);
            } catch (x3) {
              return describeBuiltInComponentFrame("Lazy");
            }
            return describeComponentStackByType(type2);
        }
        if (typeof type2.name === "string") {
          a: {
            payload = type2.name;
            lazyComponent = type2.env;
            type2 = type2.debugLocation;
            if (type2 != null) {
              type2 = formatOwnerStack(type2);
              var idx = type2.lastIndexOf(`
`);
              type2 = idx === -1 ? type2 : type2.slice(idx + 1);
              if (type2.indexOf(payload) !== -1) {
                payload = `
` + type2;
                break a;
              }
            }
            payload = describeBuiltInComponentFrame(payload + (lazyComponent ? " [" + lazyComponent + "]" : ""));
          }
          return payload;
        }
      }
      switch (type2) {
        case REACT_SUSPENSE_LIST_TYPE:
          return describeBuiltInComponentFrame("SuspenseList");
        case REACT_SUSPENSE_TYPE:
          return describeBuiltInComponentFrame("Suspense");
      }
      return "";
    }
    function resetOwnerStackLimit() {
      var now = getCurrentTime();
      1000 < now - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = now);
    }
    function isEligibleForOutlining(request2, boundary) {
      return (500 < boundary.byteSize || hasSuspenseyContent(boundary.contentState)) && boundary.contentPreamble === null;
    }
    function defaultErrorHandler(error49) {
      if (typeof error49 === "object" && error49 !== null && typeof error49.environmentName === "string") {
        var JSCompiler_inline_result = error49.environmentName;
        error49 = [error49].slice(0);
        typeof error49[0] === "string" ? error49.splice(0, 1, "\x1B[0m\x1B[7m%c%s\x1B[0m%c " + error49[0], "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", " " + JSCompiler_inline_result + " ", "") : error49.splice(0, 0, "\x1B[0m\x1B[7m%c%s\x1B[0m%c", "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", " " + JSCompiler_inline_result + " ", "");
        error49.unshift(console);
        JSCompiler_inline_result = bind.apply(console.error, error49);
        JSCompiler_inline_result();
      } else
        console.error(error49);
      return null;
    }
    function RequestInstance(resumableState, renderState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState) {
      var abortSet = new Set;
      this.destination = null;
      this.flushScheduled = false;
      this.resumableState = resumableState;
      this.renderState = renderState;
      this.rootFormatContext = rootFormatContext;
      this.progressiveChunkSize = progressiveChunkSize === undefined ? 12800 : progressiveChunkSize;
      this.status = 10;
      this.fatalError = null;
      this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
      this.completedPreambleSegments = this.completedRootSegment = null;
      this.byteSize = 0;
      this.abortableTasks = abortSet;
      this.pingedTasks = [];
      this.clientRenderedBoundaries = [];
      this.completedBoundaries = [];
      this.partialBoundaries = [];
      this.trackedPostpones = null;
      this.onError = onError === undefined ? defaultErrorHandler : onError;
      this.onPostpone = onPostpone === undefined ? noop : onPostpone;
      this.onAllReady = onAllReady === undefined ? noop : onAllReady;
      this.onShellReady = onShellReady === undefined ? noop : onShellReady;
      this.onShellError = onShellError === undefined ? noop : onShellError;
      this.onFatalError = onFatalError === undefined ? noop : onFatalError;
      this.formState = formState === undefined ? null : formState;
      this.didWarnForKey = null;
    }
    function createRequest(children, resumableState, renderState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState) {
      resetOwnerStackLimit();
      resumableState = new RequestInstance(resumableState, renderState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState);
      renderState = createPendingSegment(resumableState, 0, null, rootFormatContext, false, false);
      renderState.parentFlushed = true;
      children = createRenderTask(resumableState, null, children, -1, null, renderState, null, null, resumableState.abortableTasks, null, rootFormatContext, null, emptyTreeContext, null, null, emptyContextObject, null);
      pushComponentStack(children);
      resumableState.pingedTasks.push(children);
      return resumableState;
    }
    function createPrerenderRequest(children, resumableState, renderState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone) {
      children = createRequest(children, resumableState, renderState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, undefined);
      children.trackedPostpones = {
        workingMap: new Map,
        rootNodes: [],
        rootSlots: null
      };
      return children;
    }
    function resumeRequest(children, postponedState, renderState, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone) {
      resetOwnerStackLimit();
      renderState = new RequestInstance(postponedState.resumableState, renderState, postponedState.rootFormatContext, postponedState.progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, null);
      renderState.nextSegmentId = postponedState.nextSegmentId;
      if (typeof postponedState.replaySlots === "number")
        return onError = createPendingSegment(renderState, 0, null, postponedState.rootFormatContext, false, false), onError.parentFlushed = true, children = createRenderTask(renderState, null, children, -1, null, onError, null, null, renderState.abortableTasks, null, postponedState.rootFormatContext, null, emptyTreeContext, null, null, emptyContextObject, null), pushComponentStack(children), renderState.pingedTasks.push(children), renderState;
      children = createReplayTask(renderState, null, {
        nodes: postponedState.replayNodes,
        slots: postponedState.replaySlots,
        pendingTasks: 0
      }, children, -1, null, null, renderState.abortableTasks, null, postponedState.rootFormatContext, null, emptyTreeContext, null, null, emptyContextObject, null);
      pushComponentStack(children);
      renderState.pingedTasks.push(children);
      return renderState;
    }
    function resumeAndPrerenderRequest(children, postponedState, renderState, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone) {
      children = resumeRequest(children, postponedState, renderState, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone);
      children.trackedPostpones = {
        workingMap: new Map,
        rootNodes: [],
        rootSlots: null
      };
      return children;
    }
    function resolveRequest() {
      if (currentRequest)
        return currentRequest;
      var store = requestStorage.getStore();
      return store ? store : null;
    }
    function pingTask(request2, task) {
      request2.pingedTasks.push(task);
      request2.pingedTasks.length === 1 && (request2.flushScheduled = request2.destination !== null, request2.trackedPostpones !== null || request2.status === 10 ? scheduleMicrotask(function() {
        return performWork(request2);
      }) : setImmediate(function() {
        return performWork(request2);
      }));
    }
    function createSuspenseBoundary(request2, row, fallbackAbortableTasks, contentPreamble, fallbackPreamble) {
      fallbackAbortableTasks = {
        status: PENDING,
        rootSegmentID: -1,
        parentFlushed: false,
        pendingTasks: 0,
        row,
        completedSegments: [],
        byteSize: 0,
        fallbackAbortableTasks,
        errorDigest: null,
        contentState: createHoistableState(),
        fallbackState: createHoistableState(),
        contentPreamble,
        fallbackPreamble,
        trackedContentKeyPath: null,
        trackedFallbackNode: null,
        errorMessage: null,
        errorStack: null,
        errorComponentStack: null
      };
      row !== null && (row.pendingTasks++, contentPreamble = row.boundaries, contentPreamble !== null && (request2.allPendingTasks++, fallbackAbortableTasks.pendingTasks++, contentPreamble.push(fallbackAbortableTasks)), request2 = row.inheritedHoistables, request2 !== null && hoistHoistables(fallbackAbortableTasks.contentState, request2));
      return fallbackAbortableTasks;
    }
    function createRenderTask(request2, thenableState2, node3, childIndex, blockedBoundary, blockedSegment, blockedPreamble, hoistableState, abortSet, keyPath, formatContext, context10, treeContext, row, componentStack, legacyContext, debugTask) {
      request2.allPendingTasks++;
      blockedBoundary === null ? request2.pendingRootTasks++ : blockedBoundary.pendingTasks++;
      row !== null && row.pendingTasks++;
      var task = {
        replay: null,
        node: node3,
        childIndex,
        ping: function() {
          return pingTask(request2, task);
        },
        blockedBoundary,
        blockedSegment,
        blockedPreamble,
        hoistableState,
        abortSet,
        keyPath,
        formatContext,
        context: context10,
        treeContext,
        row,
        componentStack,
        thenableState: thenableState2
      };
      task.debugTask = debugTask;
      abortSet.add(task);
      return task;
    }
    function createReplayTask(request2, thenableState2, replay, node3, childIndex, blockedBoundary, hoistableState, abortSet, keyPath, formatContext, context10, treeContext, row, componentStack, legacyContext, debugTask) {
      request2.allPendingTasks++;
      blockedBoundary === null ? request2.pendingRootTasks++ : blockedBoundary.pendingTasks++;
      row !== null && row.pendingTasks++;
      replay.pendingTasks++;
      var task = {
        replay,
        node: node3,
        childIndex,
        ping: function() {
          return pingTask(request2, task);
        },
        blockedBoundary,
        blockedSegment: null,
        blockedPreamble: null,
        hoistableState,
        abortSet,
        keyPath,
        formatContext,
        context: context10,
        treeContext,
        row,
        componentStack,
        thenableState: thenableState2
      };
      task.debugTask = debugTask;
      abortSet.add(task);
      return task;
    }
    function createPendingSegment(request2, index2, boundary, parentFormatContext, lastPushedText, textEmbedded) {
      return {
        status: PENDING,
        parentFlushed: false,
        id: -1,
        index: index2,
        chunks: [],
        children: [],
        preambleChildren: [],
        parentFormatContext,
        boundary,
        lastPushedText,
        textEmbedded
      };
    }
    function getCurrentStackInDEV() {
      if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null)
        return "";
      var componentStack = currentTaskInDEV.componentStack;
      try {
        var info = "";
        if (typeof componentStack.type === "string")
          info += describeBuiltInComponentFrame(componentStack.type);
        else if (typeof componentStack.type === "function") {
          if (!componentStack.owner) {
            var JSCompiler_temp_const = info, fn2 = componentStack.type, name2 = fn2 ? fn2.displayName || fn2.name : "";
            var JSCompiler_inline_result = name2 ? describeBuiltInComponentFrame(name2) : "";
            info = JSCompiler_temp_const + JSCompiler_inline_result;
          }
        } else
          componentStack.owner || (info += describeComponentStackByType(componentStack.type));
        for (;componentStack; )
          JSCompiler_temp_const = null, componentStack.debugStack != null ? JSCompiler_temp_const = formatOwnerStack(componentStack.debugStack) : (JSCompiler_inline_result = componentStack, JSCompiler_inline_result.stack != null && (JSCompiler_temp_const = typeof JSCompiler_inline_result.stack !== "string" ? JSCompiler_inline_result.stack = formatOwnerStack(JSCompiler_inline_result.stack) : JSCompiler_inline_result.stack)), (componentStack = componentStack.owner) && JSCompiler_temp_const && (info += `
` + JSCompiler_temp_const);
        var JSCompiler_inline_result$jscomp$0 = info;
      } catch (x3) {
        JSCompiler_inline_result$jscomp$0 = `
Error generating stack: ` + x3.message + `
` + x3.stack;
      }
      return JSCompiler_inline_result$jscomp$0;
    }
    function pushHaltedAwaitOnComponentStack(task, debugInfo) {
      if (debugInfo != null)
        for (var i = debugInfo.length - 1;0 <= i; i--) {
          var info = debugInfo[i];
          if (typeof info.name === "string")
            break;
          if (typeof info.time === "number")
            break;
          if (info.awaited != null) {
            var bestStack = info.debugStack == null ? info.awaited : info;
            if (bestStack.debugStack !== undefined) {
              task.componentStack = {
                parent: task.componentStack,
                type: info,
                owner: bestStack.owner,
                stack: bestStack.debugStack
              };
              task.debugTask = bestStack.debugTask;
              break;
            }
          }
        }
    }
    function pushServerComponentStack(task, debugInfo) {
      if (debugInfo != null)
        for (var i = 0;i < debugInfo.length; i++) {
          var componentInfo = debugInfo[i];
          typeof componentInfo.name === "string" && componentInfo.debugStack !== undefined && (task.componentStack = {
            parent: task.componentStack,
            type: componentInfo,
            owner: componentInfo.owner,
            stack: componentInfo.debugStack
          }, task.debugTask = componentInfo.debugTask);
        }
    }
    function pushComponentStack(task) {
      var node3 = task.node;
      if (typeof node3 === "object" && node3 !== null)
        switch (node3.$$typeof) {
          case REACT_ELEMENT_TYPE:
            var { type: type2, _owner: owner, _debugStack: stack } = node3;
            pushServerComponentStack(task, node3._debugInfo);
            task.debugTask = node3._debugTask;
            task.componentStack = {
              parent: task.componentStack,
              type: type2,
              owner,
              stack
            };
            break;
          case REACT_LAZY_TYPE:
            pushServerComponentStack(task, node3._debugInfo);
            break;
          default:
            typeof node3.then === "function" && pushServerComponentStack(task, node3._debugInfo);
        }
    }
    function replaceSuspenseComponentStackWithSuspenseFallbackStack(componentStack) {
      return componentStack === null ? null : {
        parent: componentStack.parent,
        type: "Suspense Fallback",
        owner: componentStack.owner,
        stack: componentStack.stack
      };
    }
    function getThrownInfo(node$jscomp$0) {
      var errorInfo = {};
      node$jscomp$0 && Object.defineProperty(errorInfo, "componentStack", {
        configurable: true,
        enumerable: true,
        get: function() {
          try {
            var info = "", node3 = node$jscomp$0;
            do
              info += describeComponentStackByType(node3.type), node3 = node3.parent;
            while (node3);
            var stack = info;
          } catch (x3) {
            stack = `
Error generating stack: ` + x3.message + `
` + x3.stack;
          }
          Object.defineProperty(errorInfo, "componentStack", {
            value: stack
          });
          return stack;
        }
      });
      return errorInfo;
    }
    function encodeErrorForBoundary(boundary, digest, error49, thrownInfo, wasAborted) {
      boundary.errorDigest = digest;
      error49 instanceof Error ? (digest = String(error49.message), error49 = String(error49.stack)) : (digest = typeof error49 === "object" && error49 !== null ? describeObjectForErrorMessage(error49) : String(error49), error49 = null);
      wasAborted = wasAborted ? `Switched to client rendering because the server rendering aborted due to:

` : `Switched to client rendering because the server rendering errored:

`;
      boundary.errorMessage = wasAborted + digest;
      boundary.errorStack = error49 !== null ? wasAborted + error49 : null;
      boundary.errorComponentStack = thrownInfo.componentStack;
    }
    function logRecoverableError(request2, error49, errorInfo, debugTask) {
      request2 = request2.onError;
      error49 = debugTask ? debugTask.run(request2.bind(null, error49, errorInfo)) : request2(error49, errorInfo);
      if (error49 != null && typeof error49 !== "string")
        console.error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead', typeof error49);
      else
        return error49;
    }
    function fatalError(request2, error49, errorInfo, debugTask) {
      errorInfo = request2.onShellError;
      var onFatalError = request2.onFatalError;
      debugTask ? (debugTask.run(errorInfo.bind(null, error49)), debugTask.run(onFatalError.bind(null, error49))) : (errorInfo(error49), onFatalError(error49));
      request2.destination !== null ? (request2.status = CLOSED, request2.destination.destroy(error49)) : (request2.status = 13, request2.fatalError = error49);
    }
    function finishSuspenseListRow(request2, row) {
      unblockSuspenseListRow(request2, row.next, row.hoistables);
    }
    function unblockSuspenseListRow(request2, unblockedRow, inheritedHoistables) {
      for (;unblockedRow !== null; ) {
        inheritedHoistables !== null && (hoistHoistables(unblockedRow.hoistables, inheritedHoistables), unblockedRow.inheritedHoistables = inheritedHoistables);
        var unblockedBoundaries = unblockedRow.boundaries;
        if (unblockedBoundaries !== null) {
          unblockedRow.boundaries = null;
          for (var i = 0;i < unblockedBoundaries.length; i++) {
            var unblockedBoundary = unblockedBoundaries[i];
            inheritedHoistables !== null && hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
            finishedTask(request2, unblockedBoundary, null, null);
          }
        }
        unblockedRow.pendingTasks--;
        if (0 < unblockedRow.pendingTasks)
          break;
        inheritedHoistables = unblockedRow.hoistables;
        unblockedRow = unblockedRow.next;
      }
    }
    function tryToResolveTogetherRow(request2, togetherRow) {
      var boundaries = togetherRow.boundaries;
      if (boundaries !== null && togetherRow.pendingTasks === boundaries.length) {
        for (var allCompleteAndInlinable = true, i = 0;i < boundaries.length; i++) {
          var rowBoundary = boundaries[i];
          if (rowBoundary.pendingTasks !== 1 || rowBoundary.parentFlushed || isEligibleForOutlining(request2, rowBoundary)) {
            allCompleteAndInlinable = false;
            break;
          }
        }
        allCompleteAndInlinable && unblockSuspenseListRow(request2, togetherRow, togetherRow.hoistables);
      }
    }
    function createSuspenseListRow(previousRow) {
      var newRow = {
        pendingTasks: 1,
        boundaries: null,
        hoistables: createHoistableState(),
        inheritedHoistables: null,
        together: false,
        next: null
      };
      previousRow !== null && 0 < previousRow.pendingTasks && (newRow.pendingTasks++, newRow.boundaries = [], previousRow.next = newRow);
      return newRow;
    }
    function renderSuspenseListRows(request2, task, keyPath, rows, revealOrder) {
      var { keyPath: prevKeyPath, treeContext: prevTreeContext, row: prevRow, componentStack: previousComponentStack } = task;
      var previousDebugTask = task.debugTask;
      pushServerComponentStack(task, task.node.props.children._debugInfo);
      task.keyPath = keyPath;
      keyPath = rows.length;
      var previousSuspenseListRow = null;
      if (task.replay !== null) {
        var resumeSlots = task.replay.slots;
        if (resumeSlots !== null && typeof resumeSlots === "object")
          for (var n3 = 0;n3 < keyPath; n3++) {
            var i = revealOrder !== "backwards" && revealOrder !== "unstable_legacy-backwards" ? n3 : keyPath - 1 - n3, node3 = rows[i];
            task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow);
            task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
            var resumeSegmentID = resumeSlots[i];
            typeof resumeSegmentID === "number" ? (resumeNode(request2, task, resumeSegmentID, node3, i), delete resumeSlots[i]) : renderNode2(request2, task, node3, i);
            --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
          }
        else
          for (resumeSlots = 0;resumeSlots < keyPath; resumeSlots++)
            n3 = revealOrder !== "backwards" && revealOrder !== "unstable_legacy-backwards" ? resumeSlots : keyPath - 1 - resumeSlots, i = rows[n3], warnForMissingKey(request2, task, i), task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow), task.treeContext = pushTreeContext(prevTreeContext, keyPath, n3), renderNode2(request2, task, i, n3), --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
      } else if (revealOrder !== "backwards" && revealOrder !== "unstable_legacy-backwards")
        for (revealOrder = 0;revealOrder < keyPath; revealOrder++)
          resumeSlots = rows[revealOrder], warnForMissingKey(request2, task, resumeSlots), task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow), task.treeContext = pushTreeContext(prevTreeContext, keyPath, revealOrder), renderNode2(request2, task, resumeSlots, revealOrder), --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
      else {
        revealOrder = task.blockedSegment;
        resumeSlots = revealOrder.children.length;
        n3 = revealOrder.chunks.length;
        for (i = keyPath - 1;0 <= i; i--) {
          node3 = rows[i];
          task.row = previousSuspenseListRow = createSuspenseListRow(previousSuspenseListRow);
          task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
          resumeSegmentID = createPendingSegment(request2, n3, null, task.formatContext, i === 0 ? revealOrder.lastPushedText : true, true);
          revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
          task.blockedSegment = resumeSegmentID;
          warnForMissingKey(request2, task, node3);
          try {
            renderNode2(request2, task, node3, i), resumeSegmentID.lastPushedText && resumeSegmentID.textEmbedded && resumeSegmentID.chunks.push(textSeparator), resumeSegmentID.status = COMPLETED, finishedSegment(request2, task.blockedBoundary, resumeSegmentID), --previousSuspenseListRow.pendingTasks === 0 && finishSuspenseListRow(request2, previousSuspenseListRow);
          } catch (thrownValue) {
            throw resumeSegmentID.status = request2.status === 12 ? ABORTED : ERRORED, thrownValue;
          }
        }
        task.blockedSegment = revealOrder;
        revealOrder.lastPushedText = false;
      }
      prevRow !== null && previousSuspenseListRow !== null && 0 < previousSuspenseListRow.pendingTasks && (prevRow.pendingTasks++, previousSuspenseListRow.next = prevRow);
      task.treeContext = prevTreeContext;
      task.row = prevRow;
      task.keyPath = prevKeyPath;
      task.componentStack = previousComponentStack;
      task.debugTask = previousDebugTask;
    }
    function renderWithHooks(request2, task, keyPath, Component, props, secondArg) {
      var prevThenableState = task.thenableState;
      task.thenableState = null;
      currentlyRenderingComponent = {};
      currentlyRenderingTask = task;
      currentlyRenderingRequest = request2;
      currentlyRenderingKeyPath = keyPath;
      isInHookUserCodeInDev = false;
      actionStateCounter = localIdCounter = 0;
      actionStateMatchingIndex = -1;
      thenableIndexCounter = 0;
      thenableState = prevThenableState;
      for (request2 = callComponentInDEV(Component, props, secondArg);didScheduleRenderPhaseUpdate; )
        didScheduleRenderPhaseUpdate = false, actionStateCounter = localIdCounter = 0, actionStateMatchingIndex = -1, thenableIndexCounter = 0, numberOfReRenders += 1, workInProgressHook = null, request2 = Component(props, secondArg);
      resetHooksState();
      return request2;
    }
    function finishFunctionComponent(request2, task, keyPath, children, hasId, actionStateCount, actionStateMatchingIndex2) {
      var didEmitActionStateMarkers = false;
      if (actionStateCount !== 0 && request2.formState !== null) {
        var segment2 = task.blockedSegment;
        if (segment2 !== null) {
          didEmitActionStateMarkers = true;
          segment2 = segment2.chunks;
          for (var i = 0;i < actionStateCount; i++)
            i === actionStateMatchingIndex2 ? segment2.push(formStateMarkerIsMatching) : segment2.push(formStateMarkerIsNotMatching);
        }
      }
      actionStateCount = task.keyPath;
      task.keyPath = keyPath;
      hasId ? (keyPath = task.treeContext, task.treeContext = pushTreeContext(keyPath, 1, 0), renderNode2(request2, task, children, -1), task.treeContext = keyPath) : didEmitActionStateMarkers ? renderNode2(request2, task, children, -1) : renderNodeDestructive(request2, task, children, -1);
      task.keyPath = actionStateCount;
    }
    function renderElement(request2, task, keyPath, type2, props, ref) {
      if (typeof type2 === "function")
        if (type2.prototype && type2.prototype.isReactComponent) {
          var newProps = props;
          if ("ref" in props) {
            newProps = {};
            for (var propName in props)
              propName !== "ref" && (newProps[propName] = props[propName]);
          }
          var defaultProps = type2.defaultProps;
          if (defaultProps) {
            newProps === props && (newProps = assign({}, newProps, props));
            for (var _propName in defaultProps)
              newProps[_propName] === undefined && (newProps[_propName] = defaultProps[_propName]);
          }
          var resolvedProps = newProps;
          var context10 = emptyContextObject, contextType = type2.contextType;
          if ("contextType" in type2 && contextType !== null && (contextType === undefined || contextType.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(type2)) {
            didWarnAboutInvalidateContextType.add(type2);
            var addendum = contextType === undefined ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : typeof contextType !== "object" ? " However, it is set to a " + typeof contextType + "." : contextType.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(contextType).join(", ") + "}.";
            console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(type2) || "Component", addendum);
          }
          typeof contextType === "object" && contextType !== null && (context10 = contextType._currentValue);
          var instance = new type2(resolvedProps, context10);
          if (typeof type2.getDerivedStateFromProps === "function" && (instance.state === null || instance.state === undefined)) {
            var componentName = getComponentNameFromType(type2) || "Component";
            didWarnAboutUninitializedState.has(componentName) || (didWarnAboutUninitializedState.add(componentName), console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", componentName, instance.state === null ? "null" : "undefined", componentName));
          }
          if (typeof type2.getDerivedStateFromProps === "function" || typeof instance.getSnapshotBeforeUpdate === "function") {
            var foundWillMountName = null, foundWillReceivePropsName = null, foundWillUpdateName = null;
            typeof instance.componentWillMount === "function" && instance.componentWillMount.__suppressDeprecationWarning !== true ? foundWillMountName = "componentWillMount" : typeof instance.UNSAFE_componentWillMount === "function" && (foundWillMountName = "UNSAFE_componentWillMount");
            typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true ? foundWillReceivePropsName = "componentWillReceiveProps" : typeof instance.UNSAFE_componentWillReceiveProps === "function" && (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps");
            typeof instance.componentWillUpdate === "function" && instance.componentWillUpdate.__suppressDeprecationWarning !== true ? foundWillUpdateName = "componentWillUpdate" : typeof instance.UNSAFE_componentWillUpdate === "function" && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
            if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
              var _componentName = getComponentNameFromType(type2) || "Component", newApiName = typeof type2.getDerivedStateFromProps === "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
              didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName), console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://react.dev/link/unsafe-component-lifecycles`, _componentName, newApiName, foundWillMountName !== null ? `
  ` + foundWillMountName : "", foundWillReceivePropsName !== null ? `
  ` + foundWillReceivePropsName : "", foundWillUpdateName !== null ? `
  ` + foundWillUpdateName : ""));
            }
          }
          var name2 = getComponentNameFromType(type2) || "Component";
          instance.render || (type2.prototype && typeof type2.prototype.render === "function" ? console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?", name2) : console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.", name2));
          !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state || console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", name2);
          instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved && console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", name2);
          instance.contextType && console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.", name2);
          type2.childContextTypes && !didWarnAboutChildContextTypes.has(type2) && (didWarnAboutChildContextTypes.add(type2), console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)", name2));
          type2.contextTypes && !didWarnAboutContextTypes$1.has(type2) && (didWarnAboutContextTypes$1.add(type2), console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", name2));
          typeof instance.componentShouldUpdate === "function" && console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", name2);
          type2.prototype && type2.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== "undefined" && console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(type2) || "A pure component");
          typeof instance.componentDidUnmount === "function" && console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", name2);
          typeof instance.componentDidReceiveProps === "function" && console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", name2);
          typeof instance.componentWillRecieveProps === "function" && console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", name2);
          typeof instance.UNSAFE_componentWillRecieveProps === "function" && console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", name2);
          var hasMutatedProps = instance.props !== resolvedProps;
          instance.props !== undefined && hasMutatedProps && console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", name2);
          instance.defaultProps && console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", name2, name2);
          typeof instance.getSnapshotBeforeUpdate !== "function" || typeof instance.componentDidUpdate === "function" || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type2) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type2), console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(type2)));
          typeof instance.getDerivedStateFromProps === "function" && console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name2);
          typeof instance.getDerivedStateFromError === "function" && console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name2);
          typeof type2.getSnapshotBeforeUpdate === "function" && console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", name2);
          var state = instance.state;
          state && (typeof state !== "object" || isArrayImpl(state)) && console.error("%s.state: must be set to an object or null", name2);
          typeof instance.getChildContext === "function" && typeof type2.childContextTypes !== "object" && console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", name2);
          var initialState = instance.state !== undefined ? instance.state : null;
          instance.updater = classComponentUpdater;
          instance.props = resolvedProps;
          instance.state = initialState;
          var internalInstance = { queue: [], replace: false };
          instance._reactInternals = internalInstance;
          var contextType$jscomp$0 = type2.contextType;
          instance.context = typeof contextType$jscomp$0 === "object" && contextType$jscomp$0 !== null ? contextType$jscomp$0._currentValue : emptyContextObject;
          if (instance.state === resolvedProps) {
            var componentName$jscomp$0 = getComponentNameFromType(type2) || "Component";
            didWarnAboutDirectlyAssigningPropsToState.has(componentName$jscomp$0) || (didWarnAboutDirectlyAssigningPropsToState.add(componentName$jscomp$0), console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", componentName$jscomp$0));
          }
          var getDerivedStateFromProps = type2.getDerivedStateFromProps;
          if (typeof getDerivedStateFromProps === "function") {
            var partialState = getDerivedStateFromProps(resolvedProps, initialState);
            if (partialState === undefined) {
              var componentName$jscomp$1 = getComponentNameFromType(type2) || "Component";
              didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1) || (didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1), console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", componentName$jscomp$1));
            }
            var JSCompiler_inline_result = partialState === null || partialState === undefined ? initialState : assign({}, initialState, partialState);
            instance.state = JSCompiler_inline_result;
          }
          if (typeof type2.getDerivedStateFromProps !== "function" && typeof instance.getSnapshotBeforeUpdate !== "function" && (typeof instance.UNSAFE_componentWillMount === "function" || typeof instance.componentWillMount === "function")) {
            var oldState = instance.state;
            if (typeof instance.componentWillMount === "function") {
              if (instance.componentWillMount.__suppressDeprecationWarning !== true) {
                var componentName$jscomp$2 = getComponentNameFromType(type2) || "Unknown";
                didWarnAboutDeprecatedWillMount[componentName$jscomp$2] || (console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.

Please update the following components: %s`, componentName$jscomp$2), didWarnAboutDeprecatedWillMount[componentName$jscomp$2] = true);
              }
              instance.componentWillMount();
            }
            typeof instance.UNSAFE_componentWillMount === "function" && instance.UNSAFE_componentWillMount();
            oldState !== instance.state && (console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", getComponentNameFromType(type2) || "Component"), classComponentUpdater.enqueueReplaceState(instance, instance.state, null));
            if (internalInstance.queue !== null && 0 < internalInstance.queue.length) {
              var { queue: oldQueue, replace: oldReplace } = internalInstance;
              internalInstance.queue = null;
              internalInstance.replace = false;
              if (oldReplace && oldQueue.length === 1)
                instance.state = oldQueue[0];
              else {
                for (var nextState = oldReplace ? oldQueue[0] : instance.state, dontMutate = true, i = oldReplace ? 1 : 0;i < oldQueue.length; i++) {
                  var partial2 = oldQueue[i], partialState$jscomp$0 = typeof partial2 === "function" ? partial2.call(instance, nextState, resolvedProps, undefined) : partial2;
                  partialState$jscomp$0 != null && (dontMutate ? (dontMutate = false, nextState = assign({}, nextState, partialState$jscomp$0)) : assign(nextState, partialState$jscomp$0));
                }
                instance.state = nextState;
              }
            } else
              internalInstance.queue = null;
          }
          var nextChildren = callRenderInDEV(instance);
          if (request2.status === 12)
            throw null;
          instance.props !== resolvedProps && (didWarnAboutReassigningProps || console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", getComponentNameFromType(type2) || "a component"), didWarnAboutReassigningProps = true);
          var prevKeyPath = task.keyPath;
          task.keyPath = keyPath;
          renderNodeDestructive(request2, task, nextChildren, -1);
          task.keyPath = prevKeyPath;
        } else {
          if (type2.prototype && typeof type2.prototype.render === "function") {
            var componentName$jscomp$3 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutBadClass[componentName$jscomp$3] || (console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName$jscomp$3, componentName$jscomp$3), didWarnAboutBadClass[componentName$jscomp$3] = true);
          }
          var value = renderWithHooks(request2, task, keyPath, type2, props, undefined);
          if (request2.status === 12)
            throw null;
          var hasId = localIdCounter !== 0, actionStateCount = actionStateCounter, actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;
          if (type2.contextTypes) {
            var _componentName$jscomp$0 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutContextTypes[_componentName$jscomp$0] || (didWarnAboutContextTypes[_componentName$jscomp$0] = true, console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)", _componentName$jscomp$0));
          }
          type2 && type2.childContextTypes && console.error(`childContextTypes cannot be defined on a function component.
  %s.childContextTypes = ...`, type2.displayName || type2.name || "Component");
          if (typeof type2.getDerivedStateFromProps === "function") {
            var componentName$jscomp$4 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4] || (console.error("%s: Function components do not support getDerivedStateFromProps.", componentName$jscomp$4), didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4] = true);
          }
          if (typeof type2.contextType === "object" && type2.contextType !== null) {
            var _componentName2 = getComponentNameFromType(type2) || "Unknown";
            didWarnAboutContextTypeOnFunctionComponent[_componentName2] || (console.error("%s: Function components do not support contextType.", _componentName2), didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true);
          }
          finishFunctionComponent(request2, task, keyPath, value, hasId, actionStateCount, actionStateMatchingIndex$jscomp$0);
        }
      else if (typeof type2 === "string") {
        var segment2 = task.blockedSegment;
        if (segment2 === null) {
          var children = props.children, prevContext = task.formatContext, prevKeyPath$jscomp$0 = task.keyPath;
          task.formatContext = getChildFormatContext(prevContext, type2, props);
          task.keyPath = keyPath;
          renderNode2(request2, task, children, -1);
          task.formatContext = prevContext;
          task.keyPath = prevKeyPath$jscomp$0;
        } else {
          var _children = pushStartInstance(segment2.chunks, type2, props, request2.resumableState, request2.renderState, task.blockedPreamble, task.hoistableState, task.formatContext, segment2.lastPushedText);
          segment2.lastPushedText = false;
          var { formatContext: _prevContext2, keyPath: _prevKeyPath3 } = task;
          task.keyPath = keyPath;
          if ((task.formatContext = getChildFormatContext(_prevContext2, type2, props)).insertionMode === HTML_HEAD_MODE) {
            var preambleSegment = createPendingSegment(request2, 0, null, task.formatContext, false, false);
            segment2.preambleChildren.push(preambleSegment);
            task.blockedSegment = preambleSegment;
            try {
              preambleSegment.status = 6, renderNode2(request2, task, _children, -1), preambleSegment.lastPushedText && preambleSegment.textEmbedded && preambleSegment.chunks.push(textSeparator), preambleSegment.status = COMPLETED, finishedSegment(request2, task.blockedBoundary, preambleSegment);
            } finally {
              task.blockedSegment = segment2;
            }
          } else
            renderNode2(request2, task, _children, -1);
          task.formatContext = _prevContext2;
          task.keyPath = _prevKeyPath3;
          a: {
            var target = segment2.chunks, resumableState = request2.resumableState;
            switch (type2) {
              case "title":
              case "style":
              case "script":
              case "area":
              case "base":
              case "br":
              case "col":
              case "embed":
              case "hr":
              case "img":
              case "input":
              case "keygen":
              case "link":
              case "meta":
              case "param":
              case "source":
              case "track":
              case "wbr":
                break a;
              case "body":
                if (_prevContext2.insertionMode <= HTML_HTML_MODE) {
                  resumableState.hasBody = true;
                  break a;
                }
                break;
              case "html":
                if (_prevContext2.insertionMode === ROOT_HTML_MODE) {
                  resumableState.hasHtml = true;
                  break a;
                }
                break;
              case "head":
                if (_prevContext2.insertionMode <= HTML_HTML_MODE)
                  break a;
            }
            target.push(endChunkForTag(type2));
          }
          segment2.lastPushedText = false;
        }
      } else {
        switch (type2) {
          case REACT_LEGACY_HIDDEN_TYPE:
          case REACT_STRICT_MODE_TYPE:
          case REACT_PROFILER_TYPE:
          case REACT_FRAGMENT_TYPE:
            var prevKeyPath$jscomp$1 = task.keyPath;
            task.keyPath = keyPath;
            renderNodeDestructive(request2, task, props.children, -1);
            task.keyPath = prevKeyPath$jscomp$1;
            return;
          case REACT_ACTIVITY_TYPE:
            var segment$jscomp$0 = task.blockedSegment;
            if (segment$jscomp$0 === null) {
              if (props.mode !== "hidden") {
                var prevKeyPath$jscomp$2 = task.keyPath;
                task.keyPath = keyPath;
                renderNode2(request2, task, props.children, -1);
                task.keyPath = prevKeyPath$jscomp$2;
              }
            } else if (props.mode !== "hidden") {
              segment$jscomp$0.chunks.push(startActivityBoundary);
              segment$jscomp$0.lastPushedText = false;
              var _prevKeyPath4 = task.keyPath;
              task.keyPath = keyPath;
              renderNode2(request2, task, props.children, -1);
              task.keyPath = _prevKeyPath4;
              segment$jscomp$0.chunks.push(endActivityBoundary);
              segment$jscomp$0.lastPushedText = false;
            }
            return;
          case REACT_SUSPENSE_LIST_TYPE:
            a: {
              var { children: children$jscomp$0, revealOrder } = props;
              if (revealOrder === "forwards" || revealOrder === "backwards" || revealOrder === "unstable_legacy-backwards") {
                if (isArrayImpl(children$jscomp$0)) {
                  renderSuspenseListRows(request2, task, keyPath, children$jscomp$0, revealOrder);
                  break a;
                }
                var iteratorFn = getIteratorFn(children$jscomp$0);
                if (iteratorFn) {
                  var iterator = iteratorFn.call(children$jscomp$0);
                  if (iterator) {
                    validateIterable(task, children$jscomp$0, -1, iterator, iteratorFn);
                    var step = iterator.next();
                    if (!step.done) {
                      var rows = [];
                      do
                        rows.push(step.value), step = iterator.next();
                      while (!step.done);
                      renderSuspenseListRows(request2, task, keyPath, children$jscomp$0, revealOrder);
                    }
                    break a;
                  }
                }
              }
              if (revealOrder === "together") {
                var { keyPath: _prevKeyPath2, row: prevRow } = task, newRow = task.row = createSuspenseListRow(null);
                newRow.boundaries = [];
                newRow.together = true;
                task.keyPath = keyPath;
                renderNodeDestructive(request2, task, children$jscomp$0, -1);
                --newRow.pendingTasks === 0 && finishSuspenseListRow(request2, newRow);
                task.keyPath = _prevKeyPath2;
                task.row = prevRow;
                prevRow !== null && 0 < newRow.pendingTasks && (prevRow.pendingTasks++, newRow.next = prevRow);
              } else {
                var prevKeyPath$jscomp$3 = task.keyPath;
                task.keyPath = keyPath;
                renderNodeDestructive(request2, task, children$jscomp$0, -1);
                task.keyPath = prevKeyPath$jscomp$3;
              }
            }
            return;
          case REACT_VIEW_TRANSITION_TYPE:
          case REACT_SCOPE_TYPE:
            throw Error("ReactDOMServer does not yet support scope components.");
          case REACT_SUSPENSE_TYPE:
            a:
              if (task.replay !== null) {
                var { keyPath: _prevKeyPath, formatContext: _prevContext, row: _prevRow } = task;
                task.keyPath = keyPath;
                task.formatContext = getSuspenseContentFormatContext(request2.resumableState, _prevContext);
                task.row = null;
                var _content = props.children;
                try {
                  renderNode2(request2, task, _content, -1);
                } finally {
                  task.keyPath = _prevKeyPath, task.formatContext = _prevContext, task.row = _prevRow;
                }
              } else {
                var { keyPath: prevKeyPath$jscomp$4, formatContext: prevContext$jscomp$0, row: prevRow$jscomp$0, blockedBoundary: parentBoundary, blockedPreamble: parentPreamble, hoistableState: parentHoistableState, blockedSegment: parentSegment } = task, fallback = props.fallback, content = props.children, fallbackAbortSet = new Set;
                var newBoundary = task.formatContext.insertionMode < HTML_MODE ? createSuspenseBoundary(request2, task.row, fallbackAbortSet, createPreambleState(), createPreambleState()) : createSuspenseBoundary(request2, task.row, fallbackAbortSet, null, null);
                request2.trackedPostpones !== null && (newBoundary.trackedContentKeyPath = keyPath);
                var boundarySegment = createPendingSegment(request2, parentSegment.chunks.length, newBoundary, task.formatContext, false, false);
                parentSegment.children.push(boundarySegment);
                parentSegment.lastPushedText = false;
                var contentRootSegment = createPendingSegment(request2, 0, null, task.formatContext, false, false);
                contentRootSegment.parentFlushed = true;
                if (request2.trackedPostpones !== null) {
                  var suspenseComponentStack = task.componentStack, fallbackKeyPath = [
                    keyPath[0],
                    "Suspense Fallback",
                    keyPath[2]
                  ], fallbackReplayNode = [
                    fallbackKeyPath[1],
                    fallbackKeyPath[2],
                    [],
                    null
                  ];
                  request2.trackedPostpones.workingMap.set(fallbackKeyPath, fallbackReplayNode);
                  newBoundary.trackedFallbackNode = fallbackReplayNode;
                  task.blockedSegment = boundarySegment;
                  task.blockedPreamble = newBoundary.fallbackPreamble;
                  task.keyPath = fallbackKeyPath;
                  task.formatContext = getSuspenseFallbackFormatContext(request2.resumableState, prevContext$jscomp$0);
                  task.componentStack = replaceSuspenseComponentStackWithSuspenseFallbackStack(suspenseComponentStack);
                  boundarySegment.status = 6;
                  try {
                    renderNode2(request2, task, fallback, -1), boundarySegment.lastPushedText && boundarySegment.textEmbedded && boundarySegment.chunks.push(textSeparator), boundarySegment.status = COMPLETED, finishedSegment(request2, parentBoundary, boundarySegment);
                  } catch (thrownValue) {
                    throw boundarySegment.status = request2.status === 12 ? ABORTED : ERRORED, thrownValue;
                  } finally {
                    task.blockedSegment = parentSegment, task.blockedPreamble = parentPreamble, task.keyPath = prevKeyPath$jscomp$4, task.formatContext = prevContext$jscomp$0;
                  }
                  var suspendedPrimaryTask = createRenderTask(request2, null, content, -1, newBoundary, contentRootSegment, newBoundary.contentPreamble, newBoundary.contentState, task.abortSet, keyPath, getSuspenseContentFormatContext(request2.resumableState, task.formatContext), task.context, task.treeContext, null, suspenseComponentStack, emptyContextObject, task.debugTask);
                  pushComponentStack(suspendedPrimaryTask);
                  request2.pingedTasks.push(suspendedPrimaryTask);
                } else {
                  task.blockedBoundary = newBoundary;
                  task.blockedPreamble = newBoundary.contentPreamble;
                  task.hoistableState = newBoundary.contentState;
                  task.blockedSegment = contentRootSegment;
                  task.keyPath = keyPath;
                  task.formatContext = getSuspenseContentFormatContext(request2.resumableState, prevContext$jscomp$0);
                  task.row = null;
                  contentRootSegment.status = 6;
                  try {
                    if (renderNode2(request2, task, content, -1), contentRootSegment.lastPushedText && contentRootSegment.textEmbedded && contentRootSegment.chunks.push(textSeparator), contentRootSegment.status = COMPLETED, finishedSegment(request2, newBoundary, contentRootSegment), queueCompletedSegment(newBoundary, contentRootSegment), newBoundary.pendingTasks === 0 && newBoundary.status === PENDING) {
                      if (newBoundary.status = COMPLETED, !isEligibleForOutlining(request2, newBoundary)) {
                        prevRow$jscomp$0 !== null && --prevRow$jscomp$0.pendingTasks === 0 && finishSuspenseListRow(request2, prevRow$jscomp$0);
                        request2.pendingRootTasks === 0 && task.blockedPreamble && preparePreamble(request2);
                        break a;
                      }
                    } else
                      prevRow$jscomp$0 !== null && prevRow$jscomp$0.together && tryToResolveTogetherRow(request2, prevRow$jscomp$0);
                  } catch (thrownValue$2) {
                    newBoundary.status = CLIENT_RENDERED;
                    if (request2.status === 12) {
                      contentRootSegment.status = ABORTED;
                      var error49 = request2.fatalError;
                    } else
                      contentRootSegment.status = ERRORED, error49 = thrownValue$2;
                    var thrownInfo = getThrownInfo(task.componentStack);
                    var errorDigest = logRecoverableError(request2, error49, thrownInfo, task.debugTask);
                    encodeErrorForBoundary(newBoundary, errorDigest, error49, thrownInfo, false);
                    untrackBoundary(request2, newBoundary);
                  } finally {
                    task.blockedBoundary = parentBoundary, task.blockedPreamble = parentPreamble, task.hoistableState = parentHoistableState, task.blockedSegment = parentSegment, task.keyPath = prevKeyPath$jscomp$4, task.formatContext = prevContext$jscomp$0, task.row = prevRow$jscomp$0;
                  }
                  var suspendedFallbackTask = createRenderTask(request2, null, fallback, -1, parentBoundary, boundarySegment, newBoundary.fallbackPreamble, newBoundary.fallbackState, fallbackAbortSet, [keyPath[0], "Suspense Fallback", keyPath[2]], getSuspenseFallbackFormatContext(request2.resumableState, task.formatContext), task.context, task.treeContext, task.row, replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack), emptyContextObject, task.debugTask);
                  pushComponentStack(suspendedFallbackTask);
                  request2.pingedTasks.push(suspendedFallbackTask);
                }
              }
            return;
        }
        if (typeof type2 === "object" && type2 !== null)
          switch (type2.$$typeof) {
            case REACT_FORWARD_REF_TYPE:
              if ("ref" in props) {
                var propsWithoutRef = {};
                for (var key in props)
                  key !== "ref" && (propsWithoutRef[key] = props[key]);
              } else
                propsWithoutRef = props;
              var children$jscomp$1 = renderWithHooks(request2, task, keyPath, type2.render, propsWithoutRef, ref);
              finishFunctionComponent(request2, task, keyPath, children$jscomp$1, localIdCounter !== 0, actionStateCounter, actionStateMatchingIndex);
              return;
            case REACT_MEMO_TYPE:
              renderElement(request2, task, keyPath, type2.type, props, ref);
              return;
            case REACT_CONTEXT_TYPE:
              var { value: value$jscomp$0, children: children$jscomp$2 } = props;
              var prevSnapshot = task.context;
              var prevKeyPath$jscomp$5 = task.keyPath;
              var prevValue = type2._currentValue;
              type2._currentValue = value$jscomp$0;
              type2._currentRenderer !== undefined && type2._currentRenderer !== null && type2._currentRenderer !== rendererSigil && console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");
              type2._currentRenderer = rendererSigil;
              var prevNode = currentActiveSnapshot, newNode = {
                parent: prevNode,
                depth: prevNode === null ? 0 : prevNode.depth + 1,
                context: type2,
                parentValue: prevValue,
                value: value$jscomp$0
              };
              currentActiveSnapshot = newNode;
              task.context = newNode;
              task.keyPath = keyPath;
              renderNodeDestructive(request2, task, children$jscomp$2, -1);
              var prevSnapshot$jscomp$0 = currentActiveSnapshot;
              if (prevSnapshot$jscomp$0 === null)
                throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");
              prevSnapshot$jscomp$0.context !== type2 && console.error("The parent context is not the expected context. This is probably a bug in React.");
              prevSnapshot$jscomp$0.context._currentValue = prevSnapshot$jscomp$0.parentValue;
              type2._currentRenderer !== undefined && type2._currentRenderer !== null && type2._currentRenderer !== rendererSigil && console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");
              type2._currentRenderer = rendererSigil;
              var JSCompiler_inline_result$jscomp$0 = currentActiveSnapshot = prevSnapshot$jscomp$0.parent;
              task.context = JSCompiler_inline_result$jscomp$0;
              task.keyPath = prevKeyPath$jscomp$5;
              prevSnapshot !== task.context && console.error("Popping the context provider did not return back to the original snapshot. This is a bug in React.");
              return;
            case REACT_CONSUMER_TYPE:
              var context$jscomp$0 = type2._context, render2 = props.children;
              typeof render2 !== "function" && console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");
              var newChildren = render2(context$jscomp$0._currentValue), prevKeyPath$jscomp$6 = task.keyPath;
              task.keyPath = keyPath;
              renderNodeDestructive(request2, task, newChildren, -1);
              task.keyPath = prevKeyPath$jscomp$6;
              return;
            case REACT_LAZY_TYPE:
              var Component = callLazyInitInDEV(type2);
              if (request2.status === 12)
                throw null;
              renderElement(request2, task, keyPath, Component, props, ref);
              return;
          }
        var info = "";
        if (type2 === undefined || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0)
          info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
        throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + ((type2 == null ? type2 : typeof type2) + "." + info));
      }
    }
    function resumeNode(request2, task, segmentId, node3, childIndex) {
      var { replay: prevReplay, blockedBoundary } = task, resumedSegment = createPendingSegment(request2, 0, null, task.formatContext, false, false);
      resumedSegment.id = segmentId;
      resumedSegment.parentFlushed = true;
      try {
        task.replay = null, task.blockedSegment = resumedSegment, renderNode2(request2, task, node3, childIndex), resumedSegment.status = COMPLETED, finishedSegment(request2, blockedBoundary, resumedSegment), blockedBoundary === null ? request2.completedRootSegment = resumedSegment : (queueCompletedSegment(blockedBoundary, resumedSegment), blockedBoundary.parentFlushed && request2.partialBoundaries.push(blockedBoundary));
      } finally {
        task.replay = prevReplay, task.blockedSegment = null;
      }
    }
    function replayElement(request2, task, keyPath, name2, keyOrIndex, childIndex, type2, props, ref, replay) {
      childIndex = replay.nodes;
      for (var i = 0;i < childIndex.length; i++) {
        var node3 = childIndex[i];
        if (keyOrIndex === node3[1]) {
          if (node3.length === 4) {
            if (name2 !== null && name2 !== node3[0])
              throw Error("Expected the resume to render <" + node3[0] + "> in this slot but instead it rendered <" + name2 + ">. The tree doesn't match so React will fallback to client rendering.");
            var childNodes = node3[2];
            name2 = node3[3];
            keyOrIndex = task.node;
            task.replay = { nodes: childNodes, slots: name2, pendingTasks: 1 };
            try {
              renderElement(request2, task, keyPath, type2, props, ref);
              if (task.replay.pendingTasks === 1 && 0 < task.replay.nodes.length)
                throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
              task.replay.pendingTasks--;
            } catch (x3) {
              if (typeof x3 === "object" && x3 !== null && (x3 === SuspenseException || typeof x3.then === "function"))
                throw task.node === keyOrIndex ? task.replay = replay : childIndex.splice(i, 1), x3;
              task.replay.pendingTasks--;
              type2 = getThrownInfo(task.componentStack);
              props = request2;
              request2 = task.blockedBoundary;
              keyPath = x3;
              ref = name2;
              name2 = logRecoverableError(props, keyPath, type2, task.debugTask);
              abortRemainingReplayNodes(props, request2, childNodes, ref, keyPath, name2, type2, false);
            }
            task.replay = replay;
          } else {
            if (type2 !== REACT_SUSPENSE_TYPE)
              throw Error("Expected the resume to render <Suspense> in this slot but instead it rendered <" + (getComponentNameFromType(type2) || "Unknown") + ">. The tree doesn't match so React will fallback to client rendering.");
            a: {
              replay = undefined;
              name2 = node3[5];
              type2 = node3[2];
              ref = node3[3];
              keyOrIndex = node3[4] === null ? [] : node3[4][2];
              node3 = node3[4] === null ? null : node3[4][3];
              var { keyPath: prevKeyPath, formatContext: prevContext, row: prevRow, replay: previousReplaySet, blockedBoundary: parentBoundary, hoistableState: parentHoistableState } = task, content = props.children, fallback = props.fallback, fallbackAbortSet = new Set;
              props = task.formatContext.insertionMode < HTML_MODE ? createSuspenseBoundary(request2, task.row, fallbackAbortSet, createPreambleState(), createPreambleState()) : createSuspenseBoundary(request2, task.row, fallbackAbortSet, null, null);
              props.parentFlushed = true;
              props.rootSegmentID = name2;
              task.blockedBoundary = props;
              task.hoistableState = props.contentState;
              task.keyPath = keyPath;
              task.formatContext = getSuspenseContentFormatContext(request2.resumableState, prevContext);
              task.row = null;
              task.replay = { nodes: type2, slots: ref, pendingTasks: 1 };
              try {
                renderNode2(request2, task, content, -1);
                if (task.replay.pendingTasks === 1 && 0 < task.replay.nodes.length)
                  throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
                task.replay.pendingTasks--;
                if (props.pendingTasks === 0 && props.status === PENDING) {
                  props.status = COMPLETED;
                  request2.completedBoundaries.push(props);
                  break a;
                }
              } catch (error49) {
                props.status = CLIENT_RENDERED, childNodes = getThrownInfo(task.componentStack), replay = logRecoverableError(request2, error49, childNodes, task.debugTask), encodeErrorForBoundary(props, replay, error49, childNodes, false), task.replay.pendingTasks--, request2.clientRenderedBoundaries.push(props);
              } finally {
                task.blockedBoundary = parentBoundary, task.hoistableState = parentHoistableState, task.replay = previousReplaySet, task.keyPath = prevKeyPath, task.formatContext = prevContext, task.row = prevRow;
              }
              props = createReplayTask(request2, null, { nodes: keyOrIndex, slots: node3, pendingTasks: 0 }, fallback, -1, parentBoundary, props.fallbackState, fallbackAbortSet, [keyPath[0], "Suspense Fallback", keyPath[2]], getSuspenseFallbackFormatContext(request2.resumableState, task.formatContext), task.context, task.treeContext, task.row, replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack), emptyContextObject, task.debugTask);
              pushComponentStack(props);
              request2.pingedTasks.push(props);
            }
          }
          childIndex.splice(i, 1);
          break;
        }
      }
    }
    function validateIterable(task, iterable, childIndex, iterator, iteratorFn) {
      if (iterator === iterable) {
        if (childIndex !== -1 || task.componentStack === null || typeof task.componentStack.type !== "function" || Object.prototype.toString.call(task.componentStack.type) !== "[object GeneratorFunction]" || Object.prototype.toString.call(iterator) !== "[object Generator]")
          didWarnAboutGenerators || console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."), didWarnAboutGenerators = true;
      } else
        iterable.entries !== iteratorFn || didWarnAboutMaps || (console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = true);
    }
    function renderNodeDestructive(request2, task, node3, childIndex) {
      task.replay !== null && typeof task.replay.slots === "number" ? resumeNode(request2, task, task.replay.slots, node3, childIndex) : (task.node = node3, task.childIndex = childIndex, node3 = task.componentStack, childIndex = task.debugTask, pushComponentStack(task), retryNode(request2, task), task.componentStack = node3, task.debugTask = childIndex);
    }
    function retryNode(request2, task) {
      var { node: node3, childIndex } = task;
      if (node3 !== null) {
        if (typeof node3 === "object") {
          switch (node3.$$typeof) {
            case REACT_ELEMENT_TYPE:
              var { type: type2, key } = node3;
              node3 = node3.props;
              var refProp = node3.ref;
              refProp = refProp !== undefined ? refProp : null;
              var debugTask = task.debugTask, name2 = getComponentNameFromType(type2);
              key = key == null ? childIndex === -1 ? 0 : childIndex : key;
              var keyPath = [task.keyPath, name2, key];
              task.replay !== null ? debugTask ? debugTask.run(replayElement.bind(null, request2, task, keyPath, name2, key, childIndex, type2, node3, refProp, task.replay)) : replayElement(request2, task, keyPath, name2, key, childIndex, type2, node3, refProp, task.replay) : debugTask ? debugTask.run(renderElement.bind(null, request2, task, keyPath, type2, node3, refProp)) : renderElement(request2, task, keyPath, type2, node3, refProp);
              return;
            case REACT_PORTAL_TYPE:
              throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");
            case REACT_LAZY_TYPE:
              type2 = callLazyInitInDEV(node3);
              if (request2.status === 12)
                throw null;
              renderNodeDestructive(request2, task, type2, childIndex);
              return;
          }
          if (isArrayImpl(node3)) {
            renderChildrenArray(request2, task, node3, childIndex);
            return;
          }
          if (key = getIteratorFn(node3)) {
            if (type2 = key.call(node3)) {
              validateIterable(task, node3, childIndex, type2, key);
              node3 = type2.next();
              if (!node3.done) {
                key = [];
                do
                  key.push(node3.value), node3 = type2.next();
                while (!node3.done);
                renderChildrenArray(request2, task, key, childIndex);
              }
              return;
            }
          }
          if (typeof node3.then === "function")
            return task.thenableState = null, renderNodeDestructive(request2, task, unwrapThenable(node3), childIndex);
          if (node3.$$typeof === REACT_CONTEXT_TYPE)
            return renderNodeDestructive(request2, task, node3._currentValue, childIndex);
          request2 = Object.prototype.toString.call(node3);
          throw Error("Objects are not valid as a React child (found: " + (request2 === "[object Object]" ? "object with keys {" + Object.keys(node3).join(", ") + "}" : request2) + "). If you meant to render a collection of children, use an array instead.");
        }
        typeof node3 === "string" ? (task = task.blockedSegment, task !== null && (task.lastPushedText = pushTextInstance(task.chunks, node3, request2.renderState, task.lastPushedText))) : typeof node3 === "number" || typeof node3 === "bigint" ? (task = task.blockedSegment, task !== null && (task.lastPushedText = pushTextInstance(task.chunks, "" + node3, request2.renderState, task.lastPushedText))) : (typeof node3 === "function" && (request2 = node3.displayName || node3.name || "Component", console.error("Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.", request2, request2)), typeof node3 === "symbol" && console.error(`Symbols are not valid as a React child.
  %s`, String(node3)));
      }
    }
    function warnForMissingKey(request2, task, child) {
      if (child !== null && typeof child === "object" && (child.$$typeof === REACT_ELEMENT_TYPE || child.$$typeof === REACT_PORTAL_TYPE) && child._store && (!child._store.validated && child.key == null || child._store.validated === 2)) {
        if (typeof child._store !== "object")
          throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");
        child._store.validated = 1;
        var didWarnForKey = request2.didWarnForKey;
        didWarnForKey == null && (didWarnForKey = request2.didWarnForKey = new WeakSet);
        request2 = task.componentStack;
        if (request2 !== null && !didWarnForKey.has(request2)) {
          didWarnForKey.add(request2);
          var componentName = getComponentNameFromType(child.type);
          didWarnForKey = child._owner;
          var parentOwner = request2.owner;
          request2 = "";
          if (parentOwner && typeof parentOwner.type !== "undefined") {
            var name2 = getComponentNameFromType(parentOwner.type);
            name2 && (request2 = `

Check the render method of \`` + name2 + "`.");
          }
          request2 || componentName && (request2 = `

Check the top-level render call using <` + componentName + ">.");
          componentName = "";
          didWarnForKey != null && parentOwner !== didWarnForKey && (parentOwner = null, typeof didWarnForKey.type !== "undefined" ? parentOwner = getComponentNameFromType(didWarnForKey.type) : typeof didWarnForKey.name === "string" && (parentOwner = didWarnForKey.name), parentOwner && (componentName = " It was passed a child from " + parentOwner + "."));
          didWarnForKey = task.componentStack;
          task.componentStack = {
            parent: task.componentStack,
            type: child.type,
            owner: child._owner,
            stack: child._debugStack
          };
          console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', request2, componentName);
          task.componentStack = didWarnForKey;
        }
      }
    }
    function renderChildrenArray(request2, task, children, childIndex) {
      var { keyPath: prevKeyPath, componentStack: previousComponentStack } = task;
      var previousDebugTask = task.debugTask;
      pushServerComponentStack(task, task.node._debugInfo);
      if (childIndex !== -1 && (task.keyPath = [task.keyPath, "Fragment", childIndex], task.replay !== null)) {
        for (var replay = task.replay, replayNodes = replay.nodes, j3 = 0;j3 < replayNodes.length; j3++) {
          var node3 = replayNodes[j3];
          if (node3[1] === childIndex) {
            childIndex = node3[2];
            node3 = node3[3];
            task.replay = { nodes: childIndex, slots: node3, pendingTasks: 1 };
            try {
              renderChildrenArray(request2, task, children, -1);
              if (task.replay.pendingTasks === 1 && 0 < task.replay.nodes.length)
                throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
              task.replay.pendingTasks--;
            } catch (x3) {
              if (typeof x3 === "object" && x3 !== null && (x3 === SuspenseException || typeof x3.then === "function"))
                throw x3;
              task.replay.pendingTasks--;
              var thrownInfo = getThrownInfo(task.componentStack);
              children = task.blockedBoundary;
              var error49 = x3, resumeSlots = node3;
              node3 = logRecoverableError(request2, error49, thrownInfo, task.debugTask);
              abortRemainingReplayNodes(request2, children, childIndex, resumeSlots, error49, node3, thrownInfo, false);
            }
            task.replay = replay;
            replayNodes.splice(j3, 1);
            break;
          }
        }
        task.keyPath = prevKeyPath;
        task.componentStack = previousComponentStack;
        task.debugTask = previousDebugTask;
        return;
      }
      replay = task.treeContext;
      replayNodes = children.length;
      if (task.replay !== null && (j3 = task.replay.slots, j3 !== null && typeof j3 === "object")) {
        for (childIndex = 0;childIndex < replayNodes; childIndex++)
          node3 = children[childIndex], task.treeContext = pushTreeContext(replay, replayNodes, childIndex), error49 = j3[childIndex], typeof error49 === "number" ? (resumeNode(request2, task, error49, node3, childIndex), delete j3[childIndex]) : renderNode2(request2, task, node3, childIndex);
        task.treeContext = replay;
        task.keyPath = prevKeyPath;
        task.componentStack = previousComponentStack;
        task.debugTask = previousDebugTask;
        return;
      }
      for (j3 = 0;j3 < replayNodes; j3++)
        childIndex = children[j3], warnForMissingKey(request2, task, childIndex), task.treeContext = pushTreeContext(replay, replayNodes, j3), renderNode2(request2, task, childIndex, j3);
      task.treeContext = replay;
      task.keyPath = prevKeyPath;
      task.componentStack = previousComponentStack;
      task.debugTask = previousDebugTask;
    }
    function trackPostponedBoundary(request2, trackedPostpones, boundary) {
      boundary.status = POSTPONED;
      boundary.rootSegmentID = request2.nextSegmentId++;
      request2 = boundary.trackedContentKeyPath;
      if (request2 === null)
        throw Error("It should not be possible to postpone at the root. This is a bug in React.");
      var fallbackReplayNode = boundary.trackedFallbackNode, children = [], boundaryNode = trackedPostpones.workingMap.get(request2);
      if (boundaryNode === undefined)
        return boundary = [
          request2[1],
          request2[2],
          children,
          null,
          fallbackReplayNode,
          boundary.rootSegmentID
        ], trackedPostpones.workingMap.set(request2, boundary), addToReplayParent(boundary, request2[0], trackedPostpones), boundary;
      boundaryNode[4] = fallbackReplayNode;
      boundaryNode[5] = boundary.rootSegmentID;
      return boundaryNode;
    }
    function trackPostpone(request2, trackedPostpones, task, segment2) {
      segment2.status = POSTPONED;
      var { keyPath, blockedBoundary: boundary } = task;
      if (boundary === null)
        segment2.id = request2.nextSegmentId++, trackedPostpones.rootSlots = segment2.id, request2.completedRootSegment !== null && (request2.completedRootSegment.status = POSTPONED);
      else {
        if (boundary !== null && boundary.status === PENDING) {
          var boundaryNode = trackPostponedBoundary(request2, trackedPostpones, boundary);
          if (boundary.trackedContentKeyPath === keyPath && task.childIndex === -1) {
            segment2.id === -1 && (segment2.id = segment2.parentFlushed ? boundary.rootSegmentID : request2.nextSegmentId++);
            boundaryNode[3] = segment2.id;
            return;
          }
        }
        segment2.id === -1 && (segment2.id = segment2.parentFlushed && boundary !== null ? boundary.rootSegmentID : request2.nextSegmentId++);
        if (task.childIndex === -1)
          keyPath === null ? trackedPostpones.rootSlots = segment2.id : (task = trackedPostpones.workingMap.get(keyPath), task === undefined ? (task = [keyPath[1], keyPath[2], [], segment2.id], addToReplayParent(task, keyPath[0], trackedPostpones)) : task[3] = segment2.id);
        else {
          if (keyPath === null)
            if (request2 = trackedPostpones.rootSlots, request2 === null)
              request2 = trackedPostpones.rootSlots = {};
            else {
              if (typeof request2 === "number")
                throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.");
            }
          else if (boundary = trackedPostpones.workingMap, boundaryNode = boundary.get(keyPath), boundaryNode === undefined)
            request2 = {}, boundaryNode = [keyPath[1], keyPath[2], [], request2], boundary.set(keyPath, boundaryNode), addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);
          else if (request2 = boundaryNode[3], request2 === null)
            request2 = boundaryNode[3] = {};
          else if (typeof request2 === "number")
            throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.");
          request2[task.childIndex] = segment2.id;
        }
      }
    }
    function untrackBoundary(request2, boundary) {
      request2 = request2.trackedPostpones;
      request2 !== null && (boundary = boundary.trackedContentKeyPath, boundary !== null && (boundary = request2.workingMap.get(boundary), boundary !== undefined && (boundary.length = 4, boundary[2] = [], boundary[3] = null)));
    }
    function spawnNewSuspendedReplayTask(request2, task, thenableState2) {
      return createReplayTask(request2, thenableState2, task.replay, task.node, task.childIndex, task.blockedBoundary, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.context, task.treeContext, task.row, task.componentStack, emptyContextObject, task.debugTask);
    }
    function spawnNewSuspendedRenderTask(request2, task, thenableState2) {
      var segment2 = task.blockedSegment, newSegment = createPendingSegment(request2, segment2.chunks.length, null, task.formatContext, segment2.lastPushedText, true);
      segment2.children.push(newSegment);
      segment2.lastPushedText = false;
      return createRenderTask(request2, thenableState2, task.node, task.childIndex, task.blockedBoundary, newSegment, task.blockedPreamble, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.context, task.treeContext, task.row, task.componentStack, emptyContextObject, task.debugTask);
    }
    function renderNode2(request2, task, node3, childIndex) {
      var { formatContext: previousFormatContext, context: previousContext, keyPath: previousKeyPath, treeContext: previousTreeContext, componentStack: previousComponentStack, debugTask: previousDebugTask, blockedSegment: segment2 } = task;
      if (segment2 === null) {
        segment2 = task.replay;
        try {
          return renderNodeDestructive(request2, task, node3, childIndex);
        } catch (thrownValue) {
          if (resetHooksState(), node3 = thrownValue === SuspenseException ? getSuspendedThenable() : thrownValue, request2.status !== 12 && typeof node3 === "object" && node3 !== null) {
            if (typeof node3.then === "function") {
              childIndex = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
              request2 = spawnNewSuspendedReplayTask(request2, task, childIndex).ping;
              node3.then(request2, request2);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.replay = segment2;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
            if (node3.message === "Maximum call stack size exceeded") {
              node3 = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
              node3 = spawnNewSuspendedReplayTask(request2, task, node3);
              request2.pingedTasks.push(node3);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.replay = segment2;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
          }
        }
      } else {
        var childrenLength = segment2.children.length, chunkLength = segment2.chunks.length;
        try {
          return renderNodeDestructive(request2, task, node3, childIndex);
        } catch (thrownValue$3) {
          if (resetHooksState(), segment2.children.length = childrenLength, segment2.chunks.length = chunkLength, node3 = thrownValue$3 === SuspenseException ? getSuspendedThenable() : thrownValue$3, request2.status !== 12 && typeof node3 === "object" && node3 !== null) {
            if (typeof node3.then === "function") {
              segment2 = node3;
              node3 = thrownValue$3 === SuspenseException ? getThenableStateAfterSuspending() : null;
              request2 = spawnNewSuspendedRenderTask(request2, task, node3).ping;
              segment2.then(request2, request2);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
            if (node3.message === "Maximum call stack size exceeded") {
              segment2 = thrownValue$3 === SuspenseException ? getThenableStateAfterSuspending() : null;
              segment2 = spawnNewSuspendedRenderTask(request2, task, segment2);
              request2.pingedTasks.push(segment2);
              task.formatContext = previousFormatContext;
              task.context = previousContext;
              task.keyPath = previousKeyPath;
              task.treeContext = previousTreeContext;
              task.componentStack = previousComponentStack;
              task.debugTask = previousDebugTask;
              switchContext(previousContext);
              return;
            }
          }
        }
      }
      task.formatContext = previousFormatContext;
      task.context = previousContext;
      task.keyPath = previousKeyPath;
      task.treeContext = previousTreeContext;
      switchContext(previousContext);
      throw node3;
    }
    function abortTaskSoft(task) {
      var { blockedBoundary: boundary, blockedSegment: segment2 } = task;
      segment2 !== null && (segment2.status = ABORTED, finishedTask(this, boundary, task.row, segment2));
    }
    function abortRemainingReplayNodes(request$jscomp$0, boundary, nodes, slots, error$jscomp$0, errorDigest$jscomp$0, errorInfo$jscomp$0, aborted2) {
      for (var i = 0;i < nodes.length; i++) {
        var node3 = nodes[i];
        if (node3.length === 4)
          abortRemainingReplayNodes(request$jscomp$0, boundary, node3[2], node3[3], error$jscomp$0, errorDigest$jscomp$0, errorInfo$jscomp$0, aborted2);
        else {
          var request2 = request$jscomp$0;
          node3 = node3[5];
          var error49 = error$jscomp$0, errorDigest = errorDigest$jscomp$0, errorInfo = errorInfo$jscomp$0, wasAborted = aborted2, resumedBoundary = createSuspenseBoundary(request2, null, new Set, null, null);
          resumedBoundary.parentFlushed = true;
          resumedBoundary.rootSegmentID = node3;
          resumedBoundary.status = CLIENT_RENDERED;
          encodeErrorForBoundary(resumedBoundary, errorDigest, error49, errorInfo, wasAborted);
          resumedBoundary.parentFlushed && request2.clientRenderedBoundaries.push(resumedBoundary);
        }
      }
      nodes.length = 0;
      if (slots !== null) {
        if (boundary === null)
          throw Error("We should not have any resumable nodes in the shell. This is a bug in React.");
        boundary.status !== CLIENT_RENDERED && (boundary.status = CLIENT_RENDERED, encodeErrorForBoundary(boundary, errorDigest$jscomp$0, error$jscomp$0, errorInfo$jscomp$0, aborted2), boundary.parentFlushed && request$jscomp$0.clientRenderedBoundaries.push(boundary));
        if (typeof slots === "object")
          for (var index2 in slots)
            delete slots[index2];
      }
    }
    function abortTask(task, request2, error49) {
      var { blockedBoundary: boundary, blockedSegment: segment2 } = task;
      if (segment2 !== null) {
        if (segment2.status === 6)
          return;
        segment2.status = ABORTED;
      }
      var errorInfo = getThrownInfo(task.componentStack), node3 = task.node;
      node3 !== null && typeof node3 === "object" && pushHaltedAwaitOnComponentStack(task, node3._debugInfo);
      if (boundary === null) {
        if (request2.status !== 13 && request2.status !== CLOSED) {
          boundary = task.replay;
          if (boundary === null) {
            request2.trackedPostpones !== null && segment2 !== null ? (boundary = request2.trackedPostpones, logRecoverableError(request2, error49, errorInfo, task.debugTask), trackPostpone(request2, boundary, task, segment2), finishedTask(request2, null, task.row, segment2)) : (logRecoverableError(request2, error49, errorInfo, task.debugTask), fatalError(request2, error49, errorInfo, task.debugTask));
            return;
          }
          boundary.pendingTasks--;
          boundary.pendingTasks === 0 && 0 < boundary.nodes.length && (segment2 = logRecoverableError(request2, error49, errorInfo, null), abortRemainingReplayNodes(request2, null, boundary.nodes, boundary.slots, error49, segment2, errorInfo, true));
          request2.pendingRootTasks--;
          request2.pendingRootTasks === 0 && completeShell(request2);
        }
      } else {
        node3 = request2.trackedPostpones;
        if (boundary.status !== CLIENT_RENDERED) {
          if (node3 !== null && segment2 !== null)
            return logRecoverableError(request2, error49, errorInfo, task.debugTask), trackPostpone(request2, node3, task, segment2), boundary.fallbackAbortableTasks.forEach(function(fallbackTask) {
              return abortTask(fallbackTask, request2, error49);
            }), boundary.fallbackAbortableTasks.clear(), finishedTask(request2, boundary, task.row, segment2);
          boundary.status = CLIENT_RENDERED;
          segment2 = logRecoverableError(request2, error49, errorInfo, task.debugTask);
          boundary.status = CLIENT_RENDERED;
          encodeErrorForBoundary(boundary, segment2, error49, errorInfo, true);
          untrackBoundary(request2, boundary);
          boundary.parentFlushed && request2.clientRenderedBoundaries.push(boundary);
        }
        boundary.pendingTasks--;
        errorInfo = boundary.row;
        errorInfo !== null && --errorInfo.pendingTasks === 0 && finishSuspenseListRow(request2, errorInfo);
        boundary.fallbackAbortableTasks.forEach(function(fallbackTask) {
          return abortTask(fallbackTask, request2, error49);
        });
        boundary.fallbackAbortableTasks.clear();
      }
      task = task.row;
      task !== null && --task.pendingTasks === 0 && finishSuspenseListRow(request2, task);
      request2.allPendingTasks--;
      request2.allPendingTasks === 0 && completeAll(request2);
    }
    function safelyEmitEarlyPreloads(request2, shellComplete) {
      try {
        var renderState = request2.renderState, onHeaders = renderState.onHeaders;
        if (onHeaders) {
          var headers = renderState.headers;
          if (headers) {
            renderState.headers = null;
            var linkHeader = headers.preconnects;
            headers.fontPreloads && (linkHeader && (linkHeader += ", "), linkHeader += headers.fontPreloads);
            headers.highImagePreloads && (linkHeader && (linkHeader += ", "), linkHeader += headers.highImagePreloads);
            if (!shellComplete) {
              var queueIter = renderState.styles.values(), queueStep = queueIter.next();
              b:
                for (;0 < headers.remainingCapacity && !queueStep.done; queueStep = queueIter.next())
                  for (var sheetIter = queueStep.value.sheets.values(), sheetStep = sheetIter.next();0 < headers.remainingCapacity && !sheetStep.done; sheetStep = sheetIter.next()) {
                    var sheet = sheetStep.value, props = sheet.props, key = props.href, props$jscomp$0 = sheet.props;
                    var header = getPreloadAsHeader(props$jscomp$0.href, "style", {
                      crossOrigin: props$jscomp$0.crossOrigin,
                      integrity: props$jscomp$0.integrity,
                      nonce: props$jscomp$0.nonce,
                      type: props$jscomp$0.type,
                      fetchPriority: props$jscomp$0.fetchPriority,
                      referrerPolicy: props$jscomp$0.referrerPolicy,
                      media: props$jscomp$0.media
                    });
                    if (0 <= (headers.remainingCapacity -= header.length + 2))
                      renderState.resets.style[key] = PRELOAD_NO_CREDS, linkHeader && (linkHeader += ", "), linkHeader += header, renderState.resets.style[key] = typeof props.crossOrigin === "string" || typeof props.integrity === "string" ? [props.crossOrigin, props.integrity] : PRELOAD_NO_CREDS;
                    else
                      break b;
                  }
            }
            linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});
          }
        }
      } catch (error49) {
        logRecoverableError(request2, error49, {}, null);
      }
    }
    function completeShell(request2) {
      request2.trackedPostpones === null && safelyEmitEarlyPreloads(request2, true);
      request2.trackedPostpones === null && preparePreamble(request2);
      request2.onShellError = noop;
      request2 = request2.onShellReady;
      request2();
    }
    function completeAll(request2) {
      safelyEmitEarlyPreloads(request2, request2.trackedPostpones === null ? true : request2.completedRootSegment === null || request2.completedRootSegment.status !== POSTPONED);
      preparePreamble(request2);
      request2 = request2.onAllReady;
      request2();
    }
    function queueCompletedSegment(boundary, segment2) {
      if (segment2.chunks.length === 0 && segment2.children.length === 1 && segment2.children[0].boundary === null && segment2.children[0].id === -1) {
        var childSegment = segment2.children[0];
        childSegment.id = segment2.id;
        childSegment.parentFlushed = true;
        childSegment.status !== COMPLETED && childSegment.status !== ABORTED && childSegment.status !== ERRORED || queueCompletedSegment(boundary, childSegment);
      } else
        boundary.completedSegments.push(segment2);
    }
    function finishedSegment(request2, boundary, segment2) {
      if (byteLengthOfChunk !== null) {
        segment2 = segment2.chunks;
        for (var segmentByteSize = 0, i = 0;i < segment2.length; i++)
          segmentByteSize += byteLengthOfChunk(segment2[i]);
        boundary === null ? request2.byteSize += segmentByteSize : boundary.byteSize += segmentByteSize;
      }
    }
    function finishedTask(request2, boundary, row, segment2) {
      row !== null && (--row.pendingTasks === 0 ? finishSuspenseListRow(request2, row) : row.together && tryToResolveTogetherRow(request2, row));
      request2.allPendingTasks--;
      if (boundary === null) {
        if (segment2 !== null && segment2.parentFlushed) {
          if (request2.completedRootSegment !== null)
            throw Error("There can only be one root segment. This is a bug in React.");
          request2.completedRootSegment = segment2;
        }
        request2.pendingRootTasks--;
        request2.pendingRootTasks === 0 && completeShell(request2);
      } else if (boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED)
        if (boundary.pendingTasks === 0)
          if (boundary.status === PENDING && (boundary.status = COMPLETED), segment2 !== null && segment2.parentFlushed && (segment2.status === COMPLETED || segment2.status === ABORTED) && queueCompletedSegment(boundary, segment2), boundary.parentFlushed && request2.completedBoundaries.push(boundary), boundary.status === COMPLETED)
            row = boundary.row, row !== null && hoistHoistables(row.hoistables, boundary.contentState), isEligibleForOutlining(request2, boundary) || (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request2), boundary.fallbackAbortableTasks.clear(), row !== null && --row.pendingTasks === 0 && finishSuspenseListRow(request2, row)), request2.pendingRootTasks === 0 && request2.trackedPostpones === null && boundary.contentPreamble !== null && preparePreamble(request2);
          else {
            if (boundary.status === POSTPONED && (boundary = boundary.row, boundary !== null)) {
              if (request2.trackedPostpones !== null) {
                row = request2.trackedPostpones;
                var postponedRow = boundary.next;
                if (postponedRow !== null && (segment2 = postponedRow.boundaries, segment2 !== null))
                  for (postponedRow.boundaries = null, postponedRow = 0;postponedRow < segment2.length; postponedRow++) {
                    var postponedBoundary = segment2[postponedRow];
                    trackPostponedBoundary(request2, row, postponedBoundary);
                    finishedTask(request2, postponedBoundary, null, null);
                  }
              }
              --boundary.pendingTasks === 0 && finishSuspenseListRow(request2, boundary);
            }
          }
        else
          segment2 === null || !segment2.parentFlushed || segment2.status !== COMPLETED && segment2.status !== ABORTED || (queueCompletedSegment(boundary, segment2), boundary.completedSegments.length === 1 && boundary.parentFlushed && request2.partialBoundaries.push(boundary)), boundary = boundary.row, boundary !== null && boundary.together && tryToResolveTogetherRow(request2, boundary);
      request2.allPendingTasks === 0 && completeAll(request2);
    }
    function performWork(request$jscomp$2) {
      if (request$jscomp$2.status !== CLOSED && request$jscomp$2.status !== 13) {
        var prevContext = currentActiveSnapshot, prevDispatcher = ReactSharedInternals.H;
        ReactSharedInternals.H = HooksDispatcher;
        var prevAsyncDispatcher = ReactSharedInternals.A;
        ReactSharedInternals.A = DefaultAsyncDispatcher;
        var prevRequest = currentRequest;
        currentRequest = request$jscomp$2;
        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
        var prevResumableState = currentResumableState;
        currentResumableState = request$jscomp$2.resumableState;
        try {
          var pingedTasks = request$jscomp$2.pingedTasks, i;
          for (i = 0;i < pingedTasks.length; i++) {
            var request2 = request$jscomp$2, task = pingedTasks[i], segment2 = task.blockedSegment;
            if (segment2 === null) {
              var prevTaskInDEV = undefined, request$jscomp$0 = request2;
              request2 = task;
              if (request2.replay.pendingTasks !== 0) {
                switchContext(request2.context);
                prevTaskInDEV = currentTaskInDEV;
                currentTaskInDEV = request2;
                try {
                  typeof request2.replay.slots === "number" ? resumeNode(request$jscomp$0, request2, request2.replay.slots, request2.node, request2.childIndex) : retryNode(request$jscomp$0, request2);
                  if (request2.replay.pendingTasks === 1 && 0 < request2.replay.nodes.length)
                    throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");
                  request2.replay.pendingTasks--;
                  request2.abortSet.delete(request2);
                  finishedTask(request$jscomp$0, request2.blockedBoundary, request2.row, null);
                } catch (thrownValue) {
                  resetHooksState();
                  var x3 = thrownValue === SuspenseException ? getSuspendedThenable() : thrownValue;
                  if (typeof x3 === "object" && x3 !== null && typeof x3.then === "function") {
                    var ping = request2.ping;
                    x3.then(ping, ping);
                    request2.thenableState = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
                  } else {
                    request2.replay.pendingTasks--;
                    request2.abortSet.delete(request2);
                    var errorInfo = getThrownInfo(request2.componentStack), errorDigest = undefined, request$jscomp$1 = request$jscomp$0, boundary = request2.blockedBoundary, error$jscomp$0 = request$jscomp$0.status === 12 ? request$jscomp$0.fatalError : x3, errorInfo$jscomp$0 = errorInfo, replayNodes = request2.replay.nodes, resumeSlots = request2.replay.slots;
                    errorDigest = logRecoverableError(request$jscomp$1, error$jscomp$0, errorInfo$jscomp$0, request2.debugTask);
                    abortRemainingReplayNodes(request$jscomp$1, boundary, replayNodes, resumeSlots, error$jscomp$0, errorDigest, errorInfo$jscomp$0, false);
                    request$jscomp$0.pendingRootTasks--;
                    request$jscomp$0.pendingRootTasks === 0 && completeShell(request$jscomp$0);
                    request$jscomp$0.allPendingTasks--;
                    request$jscomp$0.allPendingTasks === 0 && completeAll(request$jscomp$0);
                  }
                } finally {
                  currentTaskInDEV = prevTaskInDEV;
                }
              }
            } else if (request$jscomp$0 = prevTaskInDEV = undefined, errorDigest = task, request$jscomp$1 = segment2, request$jscomp$1.status === PENDING) {
              request$jscomp$1.status = 6;
              switchContext(errorDigest.context);
              request$jscomp$0 = currentTaskInDEV;
              currentTaskInDEV = errorDigest;
              var childrenLength = request$jscomp$1.children.length, chunkLength = request$jscomp$1.chunks.length;
              try {
                retryNode(request2, errorDigest), request$jscomp$1.lastPushedText && request$jscomp$1.textEmbedded && request$jscomp$1.chunks.push(textSeparator), errorDigest.abortSet.delete(errorDigest), request$jscomp$1.status = COMPLETED, finishedSegment(request2, errorDigest.blockedBoundary, request$jscomp$1), finishedTask(request2, errorDigest.blockedBoundary, errorDigest.row, request$jscomp$1);
              } catch (thrownValue) {
                resetHooksState();
                request$jscomp$1.children.length = childrenLength;
                request$jscomp$1.chunks.length = chunkLength;
                var x$jscomp$0 = thrownValue === SuspenseException ? getSuspendedThenable() : request2.status === 12 ? request2.fatalError : thrownValue;
                if (request2.status === 12 && request2.trackedPostpones !== null) {
                  var trackedPostpones = request2.trackedPostpones, thrownInfo = getThrownInfo(errorDigest.componentStack);
                  errorDigest.abortSet.delete(errorDigest);
                  logRecoverableError(request2, x$jscomp$0, thrownInfo, errorDigest.debugTask);
                  trackPostpone(request2, trackedPostpones, errorDigest, request$jscomp$1);
                  finishedTask(request2, errorDigest.blockedBoundary, errorDigest.row, request$jscomp$1);
                } else if (typeof x$jscomp$0 === "object" && x$jscomp$0 !== null && typeof x$jscomp$0.then === "function") {
                  request$jscomp$1.status = PENDING;
                  errorDigest.thenableState = thrownValue === SuspenseException ? getThenableStateAfterSuspending() : null;
                  var ping$jscomp$0 = errorDigest.ping;
                  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
                } else {
                  var errorInfo$jscomp$1 = getThrownInfo(errorDigest.componentStack);
                  errorDigest.abortSet.delete(errorDigest);
                  request$jscomp$1.status = ERRORED;
                  var { blockedBoundary: boundary$jscomp$0, row, debugTask } = errorDigest;
                  row !== null && --row.pendingTasks === 0 && finishSuspenseListRow(request2, row);
                  request2.allPendingTasks--;
                  prevTaskInDEV = logRecoverableError(request2, x$jscomp$0, errorInfo$jscomp$1, debugTask);
                  if (boundary$jscomp$0 === null)
                    fatalError(request2, x$jscomp$0, errorInfo$jscomp$1, debugTask);
                  else if (boundary$jscomp$0.pendingTasks--, boundary$jscomp$0.status !== CLIENT_RENDERED) {
                    boundary$jscomp$0.status = CLIENT_RENDERED;
                    encodeErrorForBoundary(boundary$jscomp$0, prevTaskInDEV, x$jscomp$0, errorInfo$jscomp$1, false);
                    untrackBoundary(request2, boundary$jscomp$0);
                    var boundaryRow = boundary$jscomp$0.row;
                    boundaryRow !== null && --boundaryRow.pendingTasks === 0 && finishSuspenseListRow(request2, boundaryRow);
                    boundary$jscomp$0.parentFlushed && request2.clientRenderedBoundaries.push(boundary$jscomp$0);
                    request2.pendingRootTasks === 0 && request2.trackedPostpones === null && boundary$jscomp$0.contentPreamble !== null && preparePreamble(request2);
                  }
                  request2.allPendingTasks === 0 && completeAll(request2);
                }
              } finally {
                currentTaskInDEV = request$jscomp$0;
              }
            }
          }
          pingedTasks.splice(0, i);
          request$jscomp$2.destination !== null && flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
        } catch (error49) {
          pingedTasks = {}, logRecoverableError(request$jscomp$2, error49, pingedTasks, null), fatalError(request$jscomp$2, error49, pingedTasks, null);
        } finally {
          currentResumableState = prevResumableState, ReactSharedInternals.H = prevDispatcher, ReactSharedInternals.A = prevAsyncDispatcher, ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl, prevDispatcher === HooksDispatcher && switchContext(prevContext), currentRequest = prevRequest;
        }
      }
    }
    function preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments) {
      segment2.preambleChildren.length && collectedPreambleSegments.push(segment2.preambleChildren);
      for (var pendingPreambles = false, i = 0;i < segment2.children.length; i++)
        pendingPreambles = preparePreambleFromSegment(request2, segment2.children[i], collectedPreambleSegments) || pendingPreambles;
      return pendingPreambles;
    }
    function preparePreambleFromSegment(request2, segment2, collectedPreambleSegments) {
      var boundary = segment2.boundary;
      if (boundary === null)
        return preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments);
      var { contentPreamble: preamble, fallbackPreamble } = boundary;
      if (preamble === null || fallbackPreamble === null)
        return false;
      switch (boundary.status) {
        case COMPLETED:
          hoistPreambleState(request2.renderState, preamble);
          request2.byteSize += boundary.byteSize;
          segment2 = boundary.completedSegments[0];
          if (!segment2)
            throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
          return preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments);
        case POSTPONED:
          if (request2.trackedPostpones !== null)
            return true;
        case CLIENT_RENDERED:
          if (segment2.status === COMPLETED)
            return hoistPreambleState(request2.renderState, fallbackPreamble), preparePreambleFromSubtree(request2, segment2, collectedPreambleSegments);
        default:
          return true;
      }
    }
    function preparePreamble(request2) {
      if (request2.completedRootSegment && request2.completedPreambleSegments === null) {
        var collectedPreambleSegments = [], originalRequestByteSize = request2.byteSize, hasPendingPreambles = preparePreambleFromSegment(request2, request2.completedRootSegment, collectedPreambleSegments), preamble = request2.renderState.preamble;
        hasPendingPreambles === false || preamble.headChunks && preamble.bodyChunks ? request2.completedPreambleSegments = collectedPreambleSegments : request2.byteSize = originalRequestByteSize;
      }
    }
    function flushSubtree(request2, destination, segment2, hoistableState) {
      segment2.parentFlushed = true;
      switch (segment2.status) {
        case PENDING:
          segment2.id = request2.nextSegmentId++;
        case POSTPONED:
          return hoistableState = segment2.id, segment2.lastPushedText = false, segment2.textEmbedded = false, request2 = request2.renderState, writeChunk(destination, placeholder1), writeChunk(destination, request2.placeholderPrefix), request2 = hoistableState.toString(16), writeChunk(destination, request2), writeChunkAndReturn(destination, placeholder2);
        case COMPLETED:
          segment2.status = FLUSHED;
          var r2 = true, chunks = segment2.chunks, chunkIdx = 0;
          segment2 = segment2.children;
          for (var childIdx = 0;childIdx < segment2.length; childIdx++) {
            for (r2 = segment2[childIdx];chunkIdx < r2.index; chunkIdx++)
              writeChunk(destination, chunks[chunkIdx]);
            r2 = flushSegment(request2, destination, r2, hoistableState);
          }
          for (;chunkIdx < chunks.length - 1; chunkIdx++)
            writeChunk(destination, chunks[chunkIdx]);
          chunkIdx < chunks.length && (r2 = writeChunkAndReturn(destination, chunks[chunkIdx]));
          return r2;
        case ABORTED:
          return true;
        default:
          throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.");
      }
    }
    function flushSegment(request2, destination, segment2, hoistableState) {
      var boundary = segment2.boundary;
      if (boundary === null)
        return flushSubtree(request2, destination, segment2, hoistableState);
      boundary.parentFlushed = true;
      if (boundary.status === CLIENT_RENDERED) {
        var row = boundary.row;
        row !== null && --row.pendingTasks === 0 && finishSuspenseListRow(request2, row);
        row = boundary.errorDigest;
        var { errorMessage, errorStack } = boundary;
        boundary = boundary.errorComponentStack;
        writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
        writeChunk(destination, clientRenderedSuspenseBoundaryError1);
        row && (writeChunk(destination, clientRenderedSuspenseBoundaryError1A), writeChunk(destination, escapeTextForBrowser(row)), writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial));
        errorMessage && (writeChunk(destination, clientRenderedSuspenseBoundaryError1B), writeChunk(destination, escapeTextForBrowser(errorMessage)), writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial));
        errorStack && (writeChunk(destination, clientRenderedSuspenseBoundaryError1C), writeChunk(destination, escapeTextForBrowser(errorStack)), writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial));
        boundary && (writeChunk(destination, clientRenderedSuspenseBoundaryError1D), writeChunk(destination, escapeTextForBrowser(boundary)), writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial));
        writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);
        flushSubtree(request2, destination, segment2, hoistableState);
      } else if (boundary.status !== COMPLETED)
        boundary.status === PENDING && (boundary.rootSegmentID = request2.nextSegmentId++), 0 < boundary.completedSegments.length && request2.partialBoundaries.push(boundary), writeStartPendingSuspenseBoundary(destination, request2.renderState, boundary.rootSegmentID), hoistableState && hoistHoistables(hoistableState, boundary.fallbackState), flushSubtree(request2, destination, segment2, hoistableState);
      else if (!flushingPartialBoundaries && isEligibleForOutlining(request2, boundary) && (flushedByteSize + boundary.byteSize > request2.progressiveChunkSize || hasSuspenseyContent(boundary.contentState)))
        boundary.rootSegmentID = request2.nextSegmentId++, request2.completedBoundaries.push(boundary), writeStartPendingSuspenseBoundary(destination, request2.renderState, boundary.rootSegmentID), flushSubtree(request2, destination, segment2, hoistableState);
      else {
        flushedByteSize += boundary.byteSize;
        hoistableState && hoistHoistables(hoistableState, boundary.contentState);
        segment2 = boundary.row;
        segment2 !== null && isEligibleForOutlining(request2, boundary) && --segment2.pendingTasks === 0 && finishSuspenseListRow(request2, segment2);
        writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
        segment2 = boundary.completedSegments;
        if (segment2.length !== 1)
          throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");
        flushSegment(request2, destination, segment2[0], hoistableState);
      }
      return writeChunkAndReturn(destination, endSuspenseBoundary);
    }
    function flushSegmentContainer(request2, destination, segment2, hoistableState) {
      writeStartSegment(destination, request2.renderState, segment2.parentFormatContext, segment2.id);
      flushSegment(request2, destination, segment2, hoistableState);
      return writeEndSegment(destination, segment2.parentFormatContext);
    }
    function flushCompletedBoundary(request2, destination, boundary) {
      flushedByteSize = boundary.byteSize;
      for (var completedSegments = boundary.completedSegments, i = 0;i < completedSegments.length; i++)
        flushPartiallyCompletedSegment(request2, destination, boundary, completedSegments[i]);
      completedSegments.length = 0;
      completedSegments = boundary.row;
      completedSegments !== null && isEligibleForOutlining(request2, boundary) && --completedSegments.pendingTasks === 0 && finishSuspenseListRow(request2, completedSegments);
      writeHoistablesForBoundary(destination, boundary.contentState, request2.renderState);
      completedSegments = request2.resumableState;
      request2 = request2.renderState;
      i = boundary.rootSegmentID;
      boundary = boundary.contentState;
      var requiresStyleInsertion = request2.stylesToHoist;
      request2.stylesToHoist = false;
      writeChunk(destination, request2.startInlineScript);
      writeChunk(destination, endOfStartTag);
      requiresStyleInsertion ? ((completedSegments.instructions & SentClientRenderFunction) === NothingSent && (completedSegments.instructions |= SentClientRenderFunction, writeChunk(destination, clientRenderScriptFunctionOnly)), (completedSegments.instructions & SentCompleteBoundaryFunction) === NothingSent && (completedSegments.instructions |= SentCompleteBoundaryFunction, writeChunk(destination, completeBoundaryScriptFunctionOnly)), (completedSegments.instructions & SentStyleInsertionFunction) === NothingSent ? (completedSegments.instructions |= SentStyleInsertionFunction, writeChunk(destination, completeBoundaryWithStylesScript1FullPartial)) : writeChunk(destination, completeBoundaryWithStylesScript1Partial)) : ((completedSegments.instructions & SentCompleteBoundaryFunction) === NothingSent && (completedSegments.instructions |= SentCompleteBoundaryFunction, writeChunk(destination, completeBoundaryScriptFunctionOnly)), writeChunk(destination, completeBoundaryScript1Partial));
      completedSegments = i.toString(16);
      writeChunk(destination, request2.boundaryPrefix);
      writeChunk(destination, completedSegments);
      writeChunk(destination, completeBoundaryScript2);
      writeChunk(destination, request2.segmentPrefix);
      writeChunk(destination, completedSegments);
      requiresStyleInsertion ? (writeChunk(destination, completeBoundaryScript3a), writeStyleResourceDependenciesInJS(destination, boundary)) : writeChunk(destination, completeBoundaryScript3b);
      boundary = writeChunkAndReturn(destination, completeBoundaryScriptEnd);
      return writeBootstrap(destination, request2) && boundary;
    }
    function flushPartiallyCompletedSegment(request2, destination, boundary, segment2) {
      if (segment2.status === FLUSHED)
        return true;
      var hoistableState = boundary.contentState, segmentID = segment2.id;
      if (segmentID === -1) {
        if ((segment2.id = boundary.rootSegmentID) === -1)
          throw Error("A root segment ID must have been assigned by now. This is a bug in React.");
        return flushSegmentContainer(request2, destination, segment2, hoistableState);
      }
      if (segmentID === boundary.rootSegmentID)
        return flushSegmentContainer(request2, destination, segment2, hoistableState);
      flushSegmentContainer(request2, destination, segment2, hoistableState);
      boundary = request2.resumableState;
      request2 = request2.renderState;
      writeChunk(destination, request2.startInlineScript);
      writeChunk(destination, endOfStartTag);
      (boundary.instructions & SentCompleteSegmentFunction) === NothingSent ? (boundary.instructions |= SentCompleteSegmentFunction, writeChunk(destination, completeSegmentScript1Full)) : writeChunk(destination, completeSegmentScript1Partial);
      writeChunk(destination, request2.segmentPrefix);
      segmentID = segmentID.toString(16);
      writeChunk(destination, segmentID);
      writeChunk(destination, completeSegmentScript2);
      writeChunk(destination, request2.placeholderPrefix);
      writeChunk(destination, segmentID);
      destination = writeChunkAndReturn(destination, completeSegmentScriptEnd);
      return destination;
    }
    function flushCompletedQueues(request2, destination) {
      currentView = new Uint8Array(2048);
      writtenBytes = 0;
      destinationHasCapacity$1 = true;
      try {
        if (!(0 < request2.pendingRootTasks)) {
          var i, completedRootSegment = request2.completedRootSegment;
          if (completedRootSegment !== null) {
            if (completedRootSegment.status === POSTPONED)
              return;
            var completedPreambleSegments = request2.completedPreambleSegments;
            if (completedPreambleSegments === null)
              return;
            flushedByteSize = request2.byteSize;
            var { resumableState, renderState } = request2, preamble = renderState.preamble, htmlChunks = preamble.htmlChunks, headChunks = preamble.headChunks, i$jscomp$0;
            if (htmlChunks) {
              for (i$jscomp$0 = 0;i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
                writeChunk(destination, htmlChunks[i$jscomp$0]);
              if (headChunks)
                for (i$jscomp$0 = 0;i$jscomp$0 < headChunks.length; i$jscomp$0++)
                  writeChunk(destination, headChunks[i$jscomp$0]);
              else
                writeChunk(destination, startChunkForTag("head")), writeChunk(destination, endOfStartTag);
            } else if (headChunks)
              for (i$jscomp$0 = 0;i$jscomp$0 < headChunks.length; i$jscomp$0++)
                writeChunk(destination, headChunks[i$jscomp$0]);
            var charsetChunks = renderState.charsetChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < charsetChunks.length; i$jscomp$0++)
              writeChunk(destination, charsetChunks[i$jscomp$0]);
            charsetChunks.length = 0;
            renderState.preconnects.forEach(flushResource, destination);
            renderState.preconnects.clear();
            var viewportChunks = renderState.viewportChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < viewportChunks.length; i$jscomp$0++)
              writeChunk(destination, viewportChunks[i$jscomp$0]);
            viewportChunks.length = 0;
            renderState.fontPreloads.forEach(flushResource, destination);
            renderState.fontPreloads.clear();
            renderState.highImagePreloads.forEach(flushResource, destination);
            renderState.highImagePreloads.clear();
            currentlyFlushingRenderState = renderState;
            renderState.styles.forEach(flushStylesInPreamble, destination);
            currentlyFlushingRenderState = null;
            var importMapChunks = renderState.importMapChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
              writeChunk(destination, importMapChunks[i$jscomp$0]);
            importMapChunks.length = 0;
            renderState.bootstrapScripts.forEach(flushResource, destination);
            renderState.scripts.forEach(flushResource, destination);
            renderState.scripts.clear();
            renderState.bulkPreloads.forEach(flushResource, destination);
            renderState.bulkPreloads.clear();
            htmlChunks || headChunks || (resumableState.instructions |= SentCompletedShellId);
            var hoistableChunks = renderState.hoistableChunks;
            for (i$jscomp$0 = 0;i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
              writeChunk(destination, hoistableChunks[i$jscomp$0]);
            for (resumableState = hoistableChunks.length = 0;resumableState < completedPreambleSegments.length; resumableState++) {
              var segments = completedPreambleSegments[resumableState];
              for (renderState = 0;renderState < segments.length; renderState++)
                flushSegment(request2, destination, segments[renderState], null);
            }
            var preamble$jscomp$0 = request2.renderState.preamble, headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
            (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) && writeChunk(destination, endChunkForTag("head"));
            var bodyChunks = preamble$jscomp$0.bodyChunks;
            if (bodyChunks)
              for (completedPreambleSegments = 0;completedPreambleSegments < bodyChunks.length; completedPreambleSegments++)
                writeChunk(destination, bodyChunks[completedPreambleSegments]);
            flushSegment(request2, destination, completedRootSegment, null);
            request2.completedRootSegment = null;
            var renderState$jscomp$0 = request2.renderState;
            if (request2.allPendingTasks !== 0 || request2.clientRenderedBoundaries.length !== 0 || request2.completedBoundaries.length !== 0 || request2.trackedPostpones !== null && (request2.trackedPostpones.rootNodes.length !== 0 || request2.trackedPostpones.rootSlots !== null)) {
              var resumableState$jscomp$0 = request2.resumableState;
              if ((resumableState$jscomp$0.instructions & SentMarkShellTime) === NothingSent) {
                resumableState$jscomp$0.instructions |= SentMarkShellTime;
                writeChunk(destination, renderState$jscomp$0.startInlineScript);
                if ((resumableState$jscomp$0.instructions & SentCompletedShellId) === NothingSent) {
                  resumableState$jscomp$0.instructions |= SentCompletedShellId;
                  var shellId = "_" + resumableState$jscomp$0.idPrefix + "R_";
                  writeChunk(destination, completedShellIdAttributeStart);
                  writeChunk(destination, escapeTextForBrowser(shellId));
                  writeChunk(destination, attributeEnd);
                }
                writeChunk(destination, endOfStartTag);
                writeChunk(destination, shellTimeRuntimeScript);
                writeChunkAndReturn(destination, endInlineScript);
              }
            }
            writeBootstrap(destination, renderState$jscomp$0);
          }
          var renderState$jscomp$1 = request2.renderState;
          completedRootSegment = 0;
          var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
          for (completedRootSegment = 0;completedRootSegment < viewportChunks$jscomp$0.length; completedRootSegment++)
            writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
          viewportChunks$jscomp$0.length = 0;
          renderState$jscomp$1.preconnects.forEach(flushResource, destination);
          renderState$jscomp$1.preconnects.clear();
          renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
          renderState$jscomp$1.fontPreloads.clear();
          renderState$jscomp$1.highImagePreloads.forEach(flushResource, destination);
          renderState$jscomp$1.highImagePreloads.clear();
          renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
          renderState$jscomp$1.scripts.forEach(flushResource, destination);
          renderState$jscomp$1.scripts.clear();
          renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
          renderState$jscomp$1.bulkPreloads.clear();
          var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
          for (completedRootSegment = 0;completedRootSegment < hoistableChunks$jscomp$0.length; completedRootSegment++)
            writeChunk(destination, hoistableChunks$jscomp$0[completedRootSegment]);
          hoistableChunks$jscomp$0.length = 0;
          var clientRenderedBoundaries = request2.clientRenderedBoundaries;
          for (i = 0;i < clientRenderedBoundaries.length; i++) {
            var boundary = clientRenderedBoundaries[i];
            renderState$jscomp$1 = destination;
            var { resumableState: resumableState$jscomp$1, renderState: renderState$jscomp$2 } = request2, id = boundary.rootSegmentID, errorDigest = boundary.errorDigest, errorMessage = boundary.errorMessage, errorStack = boundary.errorStack, errorComponentStack = boundary.errorComponentStack;
            writeChunk(renderState$jscomp$1, renderState$jscomp$2.startInlineScript);
            writeChunk(renderState$jscomp$1, endOfStartTag);
            (resumableState$jscomp$1.instructions & SentClientRenderFunction) === NothingSent ? (resumableState$jscomp$1.instructions |= SentClientRenderFunction, writeChunk(renderState$jscomp$1, clientRenderScript1Full)) : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
            writeChunk(renderState$jscomp$1, renderState$jscomp$2.boundaryPrefix);
            writeChunk(renderState$jscomp$1, id.toString(16));
            writeChunk(renderState$jscomp$1, clientRenderScript1A);
            if (errorDigest || errorMessage || errorStack || errorComponentStack)
              writeChunk(renderState$jscomp$1, clientRenderErrorScriptArgInterstitial), writeChunk(renderState$jscomp$1, escapeJSStringsForInstructionScripts(errorDigest || ""));
            if (errorMessage || errorStack || errorComponentStack)
              writeChunk(renderState$jscomp$1, clientRenderErrorScriptArgInterstitial), writeChunk(renderState$jscomp$1, escapeJSStringsForInstructionScripts(errorMessage || ""));
            if (errorStack || errorComponentStack)
              writeChunk(renderState$jscomp$1, clientRenderErrorScriptArgInterstitial), writeChunk(renderState$jscomp$1, escapeJSStringsForInstructionScripts(errorStack || ""));
            errorComponentStack && (writeChunk(renderState$jscomp$1, clientRenderErrorScriptArgInterstitial), writeChunk(renderState$jscomp$1, escapeJSStringsForInstructionScripts(errorComponentStack)));
            var JSCompiler_inline_result = writeChunkAndReturn(renderState$jscomp$1, clientRenderScriptEnd);
            if (!JSCompiler_inline_result) {
              request2.destination = null;
              i++;
              clientRenderedBoundaries.splice(0, i);
              return;
            }
          }
          clientRenderedBoundaries.splice(0, i);
          var completedBoundaries = request2.completedBoundaries;
          for (i = 0;i < completedBoundaries.length; i++)
            if (!flushCompletedBoundary(request2, destination, completedBoundaries[i])) {
              request2.destination = null;
              i++;
              completedBoundaries.splice(0, i);
              return;
            }
          completedBoundaries.splice(0, i);
          completeWriting(destination);
          currentView = new Uint8Array(2048);
          writtenBytes = 0;
          flushingPartialBoundaries = destinationHasCapacity$1 = true;
          var partialBoundaries = request2.partialBoundaries;
          for (i = 0;i < partialBoundaries.length; i++) {
            a: {
              clientRenderedBoundaries = request2;
              boundary = destination;
              var boundary$jscomp$0 = partialBoundaries[i];
              flushedByteSize = boundary$jscomp$0.byteSize;
              var completedSegments = boundary$jscomp$0.completedSegments;
              for (JSCompiler_inline_result = 0;JSCompiler_inline_result < completedSegments.length; JSCompiler_inline_result++)
                if (!flushPartiallyCompletedSegment(clientRenderedBoundaries, boundary, boundary$jscomp$0, completedSegments[JSCompiler_inline_result])) {
                  JSCompiler_inline_result++;
                  completedSegments.splice(0, JSCompiler_inline_result);
                  var JSCompiler_inline_result$jscomp$0 = false;
                  break a;
                }
              completedSegments.splice(0, JSCompiler_inline_result);
              var row = boundary$jscomp$0.row;
              row !== null && row.together && boundary$jscomp$0.pendingTasks === 1 && (row.pendingTasks === 1 ? unblockSuspenseListRow(clientRenderedBoundaries, row, row.hoistables) : row.pendingTasks--);
              JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(boundary, boundary$jscomp$0.contentState, clientRenderedBoundaries.renderState);
            }
            if (!JSCompiler_inline_result$jscomp$0) {
              request2.destination = null;
              i++;
              partialBoundaries.splice(0, i);
              return;
            }
          }
          partialBoundaries.splice(0, i);
          flushingPartialBoundaries = false;
          var largeBoundaries = request2.completedBoundaries;
          for (i = 0;i < largeBoundaries.length; i++)
            if (!flushCompletedBoundary(request2, destination, largeBoundaries[i])) {
              request2.destination = null;
              i++;
              largeBoundaries.splice(0, i);
              return;
            }
          largeBoundaries.splice(0, i);
        }
      } finally {
        flushingPartialBoundaries = false, request2.allPendingTasks === 0 && request2.clientRenderedBoundaries.length === 0 && request2.completedBoundaries.length === 0 ? (request2.flushScheduled = false, i = request2.resumableState, i.hasBody && writeChunk(destination, endChunkForTag("body")), i.hasHtml && writeChunk(destination, endChunkForTag("html")), completeWriting(destination), flushBuffered(destination), request2.abortableTasks.size !== 0 && console.error("There was still abortable task at the root when we closed. This is a bug in React."), request2.status = CLOSED, destination.end(), request2.destination = null) : (completeWriting(destination), flushBuffered(destination));
      }
    }
    function startWork(request2) {
      request2.flushScheduled = request2.destination !== null;
      scheduleMicrotask(function() {
        return requestStorage.run(request2, performWork, request2);
      });
      setImmediate(function() {
        request2.status === 10 && (request2.status = 11);
        request2.trackedPostpones === null && requestStorage.run(request2, enqueueEarlyPreloadsAfterInitialWork, request2);
      });
    }
    function enqueueEarlyPreloadsAfterInitialWork(request2) {
      safelyEmitEarlyPreloads(request2, request2.pendingRootTasks === 0);
    }
    function enqueueFlush(request2) {
      request2.flushScheduled === false && request2.pingedTasks.length === 0 && request2.destination !== null && (request2.flushScheduled = true, setImmediate(function() {
        var destination = request2.destination;
        destination ? flushCompletedQueues(request2, destination) : request2.flushScheduled = false;
      }));
    }
    function startFlowing(request2, destination) {
      if (request2.status === 13)
        request2.status = CLOSED, destination.destroy(request2.fatalError);
      else if (request2.status !== CLOSED && request2.destination === null) {
        request2.destination = destination;
        try {
          flushCompletedQueues(request2, destination);
        } catch (error49) {
          destination = {}, logRecoverableError(request2, error49, destination, null), fatalError(request2, error49, destination, null);
        }
      }
    }
    function abort(request2, reason) {
      if (request2.status === 11 || request2.status === 10)
        request2.status = 12;
      try {
        var abortableTasks = request2.abortableTasks;
        if (0 < abortableTasks.size) {
          var error49 = reason === undefined ? Error("The render was aborted by the server without a reason.") : typeof reason === "object" && reason !== null && typeof reason.then === "function" ? Error("The render was aborted by the server with a promise.") : reason;
          request2.fatalError = error49;
          abortableTasks.forEach(function(task) {
            var prevTaskInDEV = currentTaskInDEV, prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
            currentTaskInDEV = task;
            ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
            try {
              abortTask(task, request2, error49);
            } finally {
              currentTaskInDEV = prevTaskInDEV, ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl;
            }
          });
          abortableTasks.clear();
        }
        request2.destination !== null && flushCompletedQueues(request2, request2.destination);
      } catch (error$4) {
        reason = {}, logRecoverableError(request2, error$4, reason, null), fatalError(request2, error$4, reason, null);
      }
    }
    function addToReplayParent(node3, parentKeyPath, trackedPostpones) {
      if (parentKeyPath === null)
        trackedPostpones.rootNodes.push(node3);
      else {
        var workingMap = trackedPostpones.workingMap, parentNode = workingMap.get(parentKeyPath);
        parentNode === undefined && (parentNode = [parentKeyPath[1], parentKeyPath[2], [], null], workingMap.set(parentKeyPath, parentNode), addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));
        parentNode[2].push(node3);
      }
    }
    function getPostponedState(request2) {
      var trackedPostpones = request2.trackedPostpones;
      if (trackedPostpones === null || trackedPostpones.rootNodes.length === 0 && trackedPostpones.rootSlots === null)
        return request2.trackedPostpones = null;
      if (request2.completedRootSegment === null || request2.completedRootSegment.status !== POSTPONED && request2.completedPreambleSegments !== null) {
        var nextSegmentId = request2.nextSegmentId;
        var replaySlots = trackedPostpones.rootSlots;
        var resumableState = request2.resumableState;
        resumableState.bootstrapScriptContent = undefined;
        resumableState.bootstrapScripts = undefined;
        resumableState.bootstrapModules = undefined;
      } else {
        nextSegmentId = 0;
        replaySlots = -1;
        resumableState = request2.resumableState;
        var renderState = request2.renderState;
        resumableState.nextFormID = 0;
        resumableState.hasBody = false;
        resumableState.hasHtml = false;
        resumableState.unknownResources = { font: renderState.resets.font };
        resumableState.dnsResources = renderState.resets.dns;
        resumableState.connectResources = renderState.resets.connect;
        resumableState.imageResources = renderState.resets.image;
        resumableState.styleResources = renderState.resets.style;
        resumableState.scriptResources = {};
        resumableState.moduleUnknownResources = {};
        resumableState.moduleScriptResources = {};
        resumableState.instructions = NothingSent;
      }
      return {
        nextSegmentId,
        rootFormatContext: request2.rootFormatContext,
        progressiveChunkSize: request2.progressiveChunkSize,
        resumableState: request2.resumableState,
        replayNodes: trackedPostpones.rootNodes,
        replaySlots
      };
    }
    function ensureCorrectIsomorphicReactVersion() {
      var isomorphicReactPackageVersion = React14.version;
      if (isomorphicReactPackageVersion !== "19.2.7")
        throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
  - react:      ` + (isomorphicReactPackageVersion + `
  - react-dom:  19.2.7
Learn more: https://react.dev/warnings/version-mismatch`));
    }
    function createDrainHandler(destination, request2) {
      return function() {
        return startFlowing(request2, destination);
      };
    }
    function createCancelHandler(request2, reason) {
      return function() {
        request2.destination = null;
        abort(request2, Error(reason));
      };
    }
    function createRequestImpl(children, options2) {
      var resumableState = createResumableState(options2 ? options2.identifierPrefix : undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.bootstrapScriptContent : undefined, options2 ? options2.bootstrapScripts : undefined, options2 ? options2.bootstrapModules : undefined);
      return createRequest(children, resumableState, createRenderState(resumableState, options2 ? options2.nonce : undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.importMap : undefined, options2 ? options2.onHeaders : undefined, options2 ? options2.maxHeadersLength : undefined), createRootFormatContext(options2 ? options2.namespaceURI : undefined), options2 ? options2.progressiveChunkSize : undefined, options2 ? options2.onError : undefined, options2 ? options2.onAllReady : undefined, options2 ? options2.onShellReady : undefined, options2 ? options2.onShellError : undefined, undefined, options2 ? options2.onPostpone : undefined, options2 ? options2.formState : undefined);
    }
    function createFakeWritableFromReadableStreamController$1(controller) {
      return {
        write: function(chunk) {
          typeof chunk === "string" && (chunk = textEncoder.encode(chunk));
          controller.enqueue(chunk);
          return true;
        },
        end: function() {
          controller.close();
        },
        destroy: function(error49) {
          typeof controller.error === "function" ? controller.error(error49) : controller.close();
        }
      };
    }
    function resumeRequestImpl(children, postponedState, options2) {
      return resumeRequest(children, postponedState, createRenderState(postponedState.resumableState, options2 ? options2.nonce : undefined, undefined, undefined, undefined, undefined), options2 ? options2.onError : undefined, options2 ? options2.onAllReady : undefined, options2 ? options2.onShellReady : undefined, options2 ? options2.onShellError : undefined, undefined, options2 ? options2.onPostpone : undefined);
    }
    function createFakeWritableFromReadableStreamController(controller) {
      return {
        write: function(chunk) {
          typeof chunk === "string" && (chunk = textEncoder.encode(chunk));
          controller.enqueue(chunk);
          return true;
        },
        end: function() {
          controller.close();
        },
        destroy: function(error49) {
          typeof controller.error === "function" ? controller.error(error49) : controller.close();
        }
      };
    }
    function createFakeWritableFromReadable(readable) {
      return {
        write: function(chunk) {
          return readable.push(chunk);
        },
        end: function() {
          readable.push(null);
        },
        destroy: function(error49) {
          readable.destroy(error49);
        }
      };
    }
    var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_SCOPE_TYPE = Symbol.for("react.scope"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, isArrayImpl = Array.isArray, jsxPropsParents = new WeakMap, jsxChildrenParents = new WeakMap, CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"), scheduleMicrotask = queueMicrotask, currentView = null, writtenBytes = 0, destinationHasCapacity$1 = true, textEncoder = new util2.TextEncoder, assign = Object.assign, hasOwnProperty2 = Object.prototype.hasOwnProperty, VALID_ATTRIBUTE_NAME_REGEX = RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, unitlessNumbers = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")), aliases = new Map([
      ["acceptCharset", "accept-charset"],
      ["htmlFor", "for"],
      ["httpEquiv", "http-equiv"],
      ["crossOrigin", "crossorigin"],
      ["accentHeight", "accent-height"],
      ["alignmentBaseline", "alignment-baseline"],
      ["arabicForm", "arabic-form"],
      ["baselineShift", "baseline-shift"],
      ["capHeight", "cap-height"],
      ["clipPath", "clip-path"],
      ["clipRule", "clip-rule"],
      ["colorInterpolation", "color-interpolation"],
      ["colorInterpolationFilters", "color-interpolation-filters"],
      ["colorProfile", "color-profile"],
      ["colorRendering", "color-rendering"],
      ["dominantBaseline", "dominant-baseline"],
      ["enableBackground", "enable-background"],
      ["fillOpacity", "fill-opacity"],
      ["fillRule", "fill-rule"],
      ["floodColor", "flood-color"],
      ["floodOpacity", "flood-opacity"],
      ["fontFamily", "font-family"],
      ["fontSize", "font-size"],
      ["fontSizeAdjust", "font-size-adjust"],
      ["fontStretch", "font-stretch"],
      ["fontStyle", "font-style"],
      ["fontVariant", "font-variant"],
      ["fontWeight", "font-weight"],
      ["glyphName", "glyph-name"],
      ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
      ["glyphOrientationVertical", "glyph-orientation-vertical"],
      ["horizAdvX", "horiz-adv-x"],
      ["horizOriginX", "horiz-origin-x"],
      ["imageRendering", "image-rendering"],
      ["letterSpacing", "letter-spacing"],
      ["lightingColor", "lighting-color"],
      ["markerEnd", "marker-end"],
      ["markerMid", "marker-mid"],
      ["markerStart", "marker-start"],
      ["overlinePosition", "overline-position"],
      ["overlineThickness", "overline-thickness"],
      ["paintOrder", "paint-order"],
      ["panose-1", "panose-1"],
      ["pointerEvents", "pointer-events"],
      ["renderingIntent", "rendering-intent"],
      ["shapeRendering", "shape-rendering"],
      ["stopColor", "stop-color"],
      ["stopOpacity", "stop-opacity"],
      ["strikethroughPosition", "strikethrough-position"],
      ["strikethroughThickness", "strikethrough-thickness"],
      ["strokeDasharray", "stroke-dasharray"],
      ["strokeDashoffset", "stroke-dashoffset"],
      ["strokeLinecap", "stroke-linecap"],
      ["strokeLinejoin", "stroke-linejoin"],
      ["strokeMiterlimit", "stroke-miterlimit"],
      ["strokeOpacity", "stroke-opacity"],
      ["strokeWidth", "stroke-width"],
      ["textAnchor", "text-anchor"],
      ["textDecoration", "text-decoration"],
      ["textRendering", "text-rendering"],
      ["transformOrigin", "transform-origin"],
      ["underlinePosition", "underline-position"],
      ["underlineThickness", "underline-thickness"],
      ["unicodeBidi", "unicode-bidi"],
      ["unicodeRange", "unicode-range"],
      ["unitsPerEm", "units-per-em"],
      ["vAlphabetic", "v-alphabetic"],
      ["vHanging", "v-hanging"],
      ["vIdeographic", "v-ideographic"],
      ["vMathematical", "v-mathematical"],
      ["vectorEffect", "vector-effect"],
      ["vertAdvY", "vert-adv-y"],
      ["vertOriginX", "vert-origin-x"],
      ["vertOriginY", "vert-origin-y"],
      ["wordSpacing", "word-spacing"],
      ["writingMode", "writing-mode"],
      ["xmlnsXlink", "xmlns:xlink"],
      ["xHeight", "x-height"]
    ]), hasReadOnlyValue = {
      button: true,
      checkbox: true,
      image: true,
      hidden: true,
      radio: true,
      reset: true,
      submit: true
    }, ariaProperties = {
      "aria-current": 0,
      "aria-description": 0,
      "aria-details": 0,
      "aria-disabled": 0,
      "aria-hidden": 0,
      "aria-invalid": 0,
      "aria-keyshortcuts": 0,
      "aria-label": 0,
      "aria-roledescription": 0,
      "aria-autocomplete": 0,
      "aria-checked": 0,
      "aria-expanded": 0,
      "aria-haspopup": 0,
      "aria-level": 0,
      "aria-modal": 0,
      "aria-multiline": 0,
      "aria-multiselectable": 0,
      "aria-orientation": 0,
      "aria-placeholder": 0,
      "aria-pressed": 0,
      "aria-readonly": 0,
      "aria-required": 0,
      "aria-selected": 0,
      "aria-sort": 0,
      "aria-valuemax": 0,
      "aria-valuemin": 0,
      "aria-valuenow": 0,
      "aria-valuetext": 0,
      "aria-atomic": 0,
      "aria-busy": 0,
      "aria-live": 0,
      "aria-relevant": 0,
      "aria-dropeffect": 0,
      "aria-grabbed": 0,
      "aria-activedescendant": 0,
      "aria-colcount": 0,
      "aria-colindex": 0,
      "aria-colspan": 0,
      "aria-controls": 0,
      "aria-describedby": 0,
      "aria-errormessage": 0,
      "aria-flowto": 0,
      "aria-labelledby": 0,
      "aria-owns": 0,
      "aria-posinset": 0,
      "aria-rowcount": 0,
      "aria-rowindex": 0,
      "aria-rowspan": 0,
      "aria-setsize": 0,
      "aria-braillelabel": 0,
      "aria-brailleroledescription": 0,
      "aria-colindextext": 0,
      "aria-rowindextext": 0
    }, warnedProperties$1 = {}, rARIA$1 = RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), rARIACamel$1 = RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), didWarnValueNull = false, possibleStandardNames = {
      accept: "accept",
      acceptcharset: "acceptCharset",
      "accept-charset": "acceptCharset",
      accesskey: "accessKey",
      action: "action",
      allowfullscreen: "allowFullScreen",
      alt: "alt",
      as: "as",
      async: "async",
      autocapitalize: "autoCapitalize",
      autocomplete: "autoComplete",
      autocorrect: "autoCorrect",
      autofocus: "autoFocus",
      autoplay: "autoPlay",
      autosave: "autoSave",
      capture: "capture",
      cellpadding: "cellPadding",
      cellspacing: "cellSpacing",
      challenge: "challenge",
      charset: "charSet",
      checked: "checked",
      children: "children",
      cite: "cite",
      class: "className",
      classid: "classID",
      classname: "className",
      cols: "cols",
      colspan: "colSpan",
      content: "content",
      contenteditable: "contentEditable",
      contextmenu: "contextMenu",
      controls: "controls",
      controlslist: "controlsList",
      coords: "coords",
      crossorigin: "crossOrigin",
      dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
      data: "data",
      datetime: "dateTime",
      default: "default",
      defaultchecked: "defaultChecked",
      defaultvalue: "defaultValue",
      defer: "defer",
      dir: "dir",
      disabled: "disabled",
      disablepictureinpicture: "disablePictureInPicture",
      disableremoteplayback: "disableRemotePlayback",
      download: "download",
      draggable: "draggable",
      enctype: "encType",
      enterkeyhint: "enterKeyHint",
      fetchpriority: "fetchPriority",
      for: "htmlFor",
      form: "form",
      formmethod: "formMethod",
      formaction: "formAction",
      formenctype: "formEncType",
      formnovalidate: "formNoValidate",
      formtarget: "formTarget",
      frameborder: "frameBorder",
      headers: "headers",
      height: "height",
      hidden: "hidden",
      high: "high",
      href: "href",
      hreflang: "hrefLang",
      htmlfor: "htmlFor",
      httpequiv: "httpEquiv",
      "http-equiv": "httpEquiv",
      icon: "icon",
      id: "id",
      imagesizes: "imageSizes",
      imagesrcset: "imageSrcSet",
      inert: "inert",
      innerhtml: "innerHTML",
      inputmode: "inputMode",
      integrity: "integrity",
      is: "is",
      itemid: "itemID",
      itemprop: "itemProp",
      itemref: "itemRef",
      itemscope: "itemScope",
      itemtype: "itemType",
      keyparams: "keyParams",
      keytype: "keyType",
      kind: "kind",
      label: "label",
      lang: "lang",
      list: "list",
      loop: "loop",
      low: "low",
      manifest: "manifest",
      marginwidth: "marginWidth",
      marginheight: "marginHeight",
      max: "max",
      maxlength: "maxLength",
      media: "media",
      mediagroup: "mediaGroup",
      method: "method",
      min: "min",
      minlength: "minLength",
      multiple: "multiple",
      muted: "muted",
      name: "name",
      nomodule: "noModule",
      nonce: "nonce",
      novalidate: "noValidate",
      open: "open",
      optimum: "optimum",
      pattern: "pattern",
      placeholder: "placeholder",
      playsinline: "playsInline",
      poster: "poster",
      preload: "preload",
      profile: "profile",
      radiogroup: "radioGroup",
      readonly: "readOnly",
      referrerpolicy: "referrerPolicy",
      rel: "rel",
      required: "required",
      reversed: "reversed",
      role: "role",
      rows: "rows",
      rowspan: "rowSpan",
      sandbox: "sandbox",
      scope: "scope",
      scoped: "scoped",
      scrolling: "scrolling",
      seamless: "seamless",
      selected: "selected",
      shape: "shape",
      size: "size",
      sizes: "sizes",
      span: "span",
      spellcheck: "spellCheck",
      src: "src",
      srcdoc: "srcDoc",
      srclang: "srcLang",
      srcset: "srcSet",
      start: "start",
      step: "step",
      style: "style",
      summary: "summary",
      tabindex: "tabIndex",
      target: "target",
      title: "title",
      type: "type",
      usemap: "useMap",
      value: "value",
      width: "width",
      wmode: "wmode",
      wrap: "wrap",
      about: "about",
      accentheight: "accentHeight",
      "accent-height": "accentHeight",
      accumulate: "accumulate",
      additive: "additive",
      alignmentbaseline: "alignmentBaseline",
      "alignment-baseline": "alignmentBaseline",
      allowreorder: "allowReorder",
      alphabetic: "alphabetic",
      amplitude: "amplitude",
      arabicform: "arabicForm",
      "arabic-form": "arabicForm",
      ascent: "ascent",
      attributename: "attributeName",
      attributetype: "attributeType",
      autoreverse: "autoReverse",
      azimuth: "azimuth",
      basefrequency: "baseFrequency",
      baselineshift: "baselineShift",
      "baseline-shift": "baselineShift",
      baseprofile: "baseProfile",
      bbox: "bbox",
      begin: "begin",
      bias: "bias",
      by: "by",
      calcmode: "calcMode",
      capheight: "capHeight",
      "cap-height": "capHeight",
      clip: "clip",
      clippath: "clipPath",
      "clip-path": "clipPath",
      clippathunits: "clipPathUnits",
      cliprule: "clipRule",
      "clip-rule": "clipRule",
      color: "color",
      colorinterpolation: "colorInterpolation",
      "color-interpolation": "colorInterpolation",
      colorinterpolationfilters: "colorInterpolationFilters",
      "color-interpolation-filters": "colorInterpolationFilters",
      colorprofile: "colorProfile",
      "color-profile": "colorProfile",
      colorrendering: "colorRendering",
      "color-rendering": "colorRendering",
      contentscripttype: "contentScriptType",
      contentstyletype: "contentStyleType",
      cursor: "cursor",
      cx: "cx",
      cy: "cy",
      d: "d",
      datatype: "datatype",
      decelerate: "decelerate",
      descent: "descent",
      diffuseconstant: "diffuseConstant",
      direction: "direction",
      display: "display",
      divisor: "divisor",
      dominantbaseline: "dominantBaseline",
      "dominant-baseline": "dominantBaseline",
      dur: "dur",
      dx: "dx",
      dy: "dy",
      edgemode: "edgeMode",
      elevation: "elevation",
      enablebackground: "enableBackground",
      "enable-background": "enableBackground",
      end: "end",
      exponent: "exponent",
      externalresourcesrequired: "externalResourcesRequired",
      fill: "fill",
      fillopacity: "fillOpacity",
      "fill-opacity": "fillOpacity",
      fillrule: "fillRule",
      "fill-rule": "fillRule",
      filter: "filter",
      filterres: "filterRes",
      filterunits: "filterUnits",
      floodopacity: "floodOpacity",
      "flood-opacity": "floodOpacity",
      floodcolor: "floodColor",
      "flood-color": "floodColor",
      focusable: "focusable",
      fontfamily: "fontFamily",
      "font-family": "fontFamily",
      fontsize: "fontSize",
      "font-size": "fontSize",
      fontsizeadjust: "fontSizeAdjust",
      "font-size-adjust": "fontSizeAdjust",
      fontstretch: "fontStretch",
      "font-stretch": "fontStretch",
      fontstyle: "fontStyle",
      "font-style": "fontStyle",
      fontvariant: "fontVariant",
      "font-variant": "fontVariant",
      fontweight: "fontWeight",
      "font-weight": "fontWeight",
      format: "format",
      from: "from",
      fx: "fx",
      fy: "fy",
      g1: "g1",
      g2: "g2",
      glyphname: "glyphName",
      "glyph-name": "glyphName",
      glyphorientationhorizontal: "glyphOrientationHorizontal",
      "glyph-orientation-horizontal": "glyphOrientationHorizontal",
      glyphorientationvertical: "glyphOrientationVertical",
      "glyph-orientation-vertical": "glyphOrientationVertical",
      glyphref: "glyphRef",
      gradienttransform: "gradientTransform",
      gradientunits: "gradientUnits",
      hanging: "hanging",
      horizadvx: "horizAdvX",
      "horiz-adv-x": "horizAdvX",
      horizoriginx: "horizOriginX",
      "horiz-origin-x": "horizOriginX",
      ideographic: "ideographic",
      imagerendering: "imageRendering",
      "image-rendering": "imageRendering",
      in2: "in2",
      in: "in",
      inlist: "inlist",
      intercept: "intercept",
      k1: "k1",
      k2: "k2",
      k3: "k3",
      k4: "k4",
      k: "k",
      kernelmatrix: "kernelMatrix",
      kernelunitlength: "kernelUnitLength",
      kerning: "kerning",
      keypoints: "keyPoints",
      keysplines: "keySplines",
      keytimes: "keyTimes",
      lengthadjust: "lengthAdjust",
      letterspacing: "letterSpacing",
      "letter-spacing": "letterSpacing",
      lightingcolor: "lightingColor",
      "lighting-color": "lightingColor",
      limitingconeangle: "limitingConeAngle",
      local: "local",
      markerend: "markerEnd",
      "marker-end": "markerEnd",
      markerheight: "markerHeight",
      markermid: "markerMid",
      "marker-mid": "markerMid",
      markerstart: "markerStart",
      "marker-start": "markerStart",
      markerunits: "markerUnits",
      markerwidth: "markerWidth",
      mask: "mask",
      maskcontentunits: "maskContentUnits",
      maskunits: "maskUnits",
      mathematical: "mathematical",
      mode: "mode",
      numoctaves: "numOctaves",
      offset: "offset",
      opacity: "opacity",
      operator: "operator",
      order: "order",
      orient: "orient",
      orientation: "orientation",
      origin: "origin",
      overflow: "overflow",
      overlineposition: "overlinePosition",
      "overline-position": "overlinePosition",
      overlinethickness: "overlineThickness",
      "overline-thickness": "overlineThickness",
      paintorder: "paintOrder",
      "paint-order": "paintOrder",
      panose1: "panose1",
      "panose-1": "panose1",
      pathlength: "pathLength",
      patterncontentunits: "patternContentUnits",
      patterntransform: "patternTransform",
      patternunits: "patternUnits",
      pointerevents: "pointerEvents",
      "pointer-events": "pointerEvents",
      points: "points",
      pointsatx: "pointsAtX",
      pointsaty: "pointsAtY",
      pointsatz: "pointsAtZ",
      popover: "popover",
      popovertarget: "popoverTarget",
      popovertargetaction: "popoverTargetAction",
      prefix: "prefix",
      preservealpha: "preserveAlpha",
      preserveaspectratio: "preserveAspectRatio",
      primitiveunits: "primitiveUnits",
      property: "property",
      r: "r",
      radius: "radius",
      refx: "refX",
      refy: "refY",
      renderingintent: "renderingIntent",
      "rendering-intent": "renderingIntent",
      repeatcount: "repeatCount",
      repeatdur: "repeatDur",
      requiredextensions: "requiredExtensions",
      requiredfeatures: "requiredFeatures",
      resource: "resource",
      restart: "restart",
      result: "result",
      results: "results",
      rotate: "rotate",
      rx: "rx",
      ry: "ry",
      scale: "scale",
      security: "security",
      seed: "seed",
      shaperendering: "shapeRendering",
      "shape-rendering": "shapeRendering",
      slope: "slope",
      spacing: "spacing",
      specularconstant: "specularConstant",
      specularexponent: "specularExponent",
      speed: "speed",
      spreadmethod: "spreadMethod",
      startoffset: "startOffset",
      stddeviation: "stdDeviation",
      stemh: "stemh",
      stemv: "stemv",
      stitchtiles: "stitchTiles",
      stopcolor: "stopColor",
      "stop-color": "stopColor",
      stopopacity: "stopOpacity",
      "stop-opacity": "stopOpacity",
      strikethroughposition: "strikethroughPosition",
      "strikethrough-position": "strikethroughPosition",
      strikethroughthickness: "strikethroughThickness",
      "strikethrough-thickness": "strikethroughThickness",
      string: "string",
      stroke: "stroke",
      strokedasharray: "strokeDasharray",
      "stroke-dasharray": "strokeDasharray",
      strokedashoffset: "strokeDashoffset",
      "stroke-dashoffset": "strokeDashoffset",
      strokelinecap: "strokeLinecap",
      "stroke-linecap": "strokeLinecap",
      strokelinejoin: "strokeLinejoin",
      "stroke-linejoin": "strokeLinejoin",
      strokemiterlimit: "strokeMiterlimit",
      "stroke-miterlimit": "strokeMiterlimit",
      strokewidth: "strokeWidth",
      "stroke-width": "strokeWidth",
      strokeopacity: "strokeOpacity",
      "stroke-opacity": "strokeOpacity",
      suppresscontenteditablewarning: "suppressContentEditableWarning",
      suppresshydrationwarning: "suppressHydrationWarning",
      surfacescale: "surfaceScale",
      systemlanguage: "systemLanguage",
      tablevalues: "tableValues",
      targetx: "targetX",
      targety: "targetY",
      textanchor: "textAnchor",
      "text-anchor": "textAnchor",
      textdecoration: "textDecoration",
      "text-decoration": "textDecoration",
      textlength: "textLength",
      textrendering: "textRendering",
      "text-rendering": "textRendering",
      to: "to",
      transform: "transform",
      transformorigin: "transformOrigin",
      "transform-origin": "transformOrigin",
      typeof: "typeof",
      u1: "u1",
      u2: "u2",
      underlineposition: "underlinePosition",
      "underline-position": "underlinePosition",
      underlinethickness: "underlineThickness",
      "underline-thickness": "underlineThickness",
      unicode: "unicode",
      unicodebidi: "unicodeBidi",
      "unicode-bidi": "unicodeBidi",
      unicoderange: "unicodeRange",
      "unicode-range": "unicodeRange",
      unitsperem: "unitsPerEm",
      "units-per-em": "unitsPerEm",
      unselectable: "unselectable",
      valphabetic: "vAlphabetic",
      "v-alphabetic": "vAlphabetic",
      values: "values",
      vectoreffect: "vectorEffect",
      "vector-effect": "vectorEffect",
      version: "version",
      vertadvy: "vertAdvY",
      "vert-adv-y": "vertAdvY",
      vertoriginx: "vertOriginX",
      "vert-origin-x": "vertOriginX",
      vertoriginy: "vertOriginY",
      "vert-origin-y": "vertOriginY",
      vhanging: "vHanging",
      "v-hanging": "vHanging",
      videographic: "vIdeographic",
      "v-ideographic": "vIdeographic",
      viewbox: "viewBox",
      viewtarget: "viewTarget",
      visibility: "visibility",
      vmathematical: "vMathematical",
      "v-mathematical": "vMathematical",
      vocab: "vocab",
      widths: "widths",
      wordspacing: "wordSpacing",
      "word-spacing": "wordSpacing",
      writingmode: "writingMode",
      "writing-mode": "writingMode",
      x1: "x1",
      x2: "x2",
      x: "x",
      xchannelselector: "xChannelSelector",
      xheight: "xHeight",
      "x-height": "xHeight",
      xlinkactuate: "xlinkActuate",
      "xlink:actuate": "xlinkActuate",
      xlinkarcrole: "xlinkArcrole",
      "xlink:arcrole": "xlinkArcrole",
      xlinkhref: "xlinkHref",
      "xlink:href": "xlinkHref",
      xlinkrole: "xlinkRole",
      "xlink:role": "xlinkRole",
      xlinkshow: "xlinkShow",
      "xlink:show": "xlinkShow",
      xlinktitle: "xlinkTitle",
      "xlink:title": "xlinkTitle",
      xlinktype: "xlinkType",
      "xlink:type": "xlinkType",
      xmlbase: "xmlBase",
      "xml:base": "xmlBase",
      xmllang: "xmlLang",
      "xml:lang": "xmlLang",
      xmlns: "xmlns",
      "xml:space": "xmlSpace",
      xmlnsxlink: "xmlnsXlink",
      "xmlns:xlink": "xmlnsXlink",
      xmlspace: "xmlSpace",
      y1: "y1",
      y2: "y2",
      y: "y",
      ychannelselector: "yChannelSelector",
      z: "z",
      zoomandpan: "zoomAndPan"
    }, warnedProperties = {}, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA = RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), rARIACamel = RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/, msPattern$1 = /^-ms-/, hyphenPattern = /-(.)/g, badStyleValueWithSemicolonPattern = /;\s*$/, warnedStyleNames = {}, warnedStyleValues = {}, warnedForNaNValue = false, warnedForInfinityValue = false, matchHtmlRegExp = /["'&<>]/, uppercasePattern = /([A-Z])/g, msPattern = /^ms-/, isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i, ReactSharedInternals = React14.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
      pending: false,
      data: null,
      method: null,
      action: null
    }), previousDispatcher = ReactDOMSharedInternals.d;
    ReactDOMSharedInternals.d = {
      f: previousDispatcher.f,
      r: previousDispatcher.r,
      D: function(href) {
        var request2 = resolveRequest();
        if (request2) {
          var { resumableState, renderState } = request2;
          if (typeof href === "string" && href) {
            if (!resumableState.dnsResources.hasOwnProperty(href)) {
              resumableState.dnsResources[href] = EXISTS;
              resumableState = renderState.headers;
              var header, JSCompiler_temp;
              if (JSCompiler_temp = resumableState && 0 < resumableState.remainingCapacity)
                JSCompiler_temp = (header = "<" + escapeHrefForLinkHeaderURLContext(href) + ">; rel=dns-prefetch", 0 <= (resumableState.remainingCapacity -= header.length + 2));
              JSCompiler_temp ? (renderState.resets.dns[href] = EXISTS, resumableState.preconnects && (resumableState.preconnects += ", "), resumableState.preconnects += header) : (header = [], pushLinkImpl(header, { href, rel: "dns-prefetch" }), renderState.preconnects.add(header));
            }
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.D(href);
      },
      C: function(href, crossOrigin) {
        var request2 = resolveRequest();
        if (request2) {
          var { resumableState, renderState } = request2;
          if (typeof href === "string" && href) {
            var bucket = crossOrigin === "use-credentials" ? "credentials" : typeof crossOrigin === "string" ? "anonymous" : "default";
            if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
              resumableState.connectResources[bucket][href] = EXISTS;
              resumableState = renderState.headers;
              var header, JSCompiler_temp;
              if (JSCompiler_temp = resumableState && 0 < resumableState.remainingCapacity) {
                JSCompiler_temp = "<" + escapeHrefForLinkHeaderURLContext(href) + ">; rel=preconnect";
                if (typeof crossOrigin === "string") {
                  var escapedCrossOrigin = escapeStringForLinkHeaderQuotedParamValueContext(crossOrigin, "crossOrigin");
                  JSCompiler_temp += '; crossorigin="' + escapedCrossOrigin + '"';
                }
                JSCompiler_temp = (header = JSCompiler_temp, 0 <= (resumableState.remainingCapacity -= header.length + 2));
              }
              JSCompiler_temp ? (renderState.resets.connect[bucket][href] = EXISTS, resumableState.preconnects && (resumableState.preconnects += ", "), resumableState.preconnects += header) : (bucket = [], pushLinkImpl(bucket, {
                rel: "preconnect",
                href,
                crossOrigin
              }), renderState.preconnects.add(bucket));
            }
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.C(href, crossOrigin);
      },
      L: function(href, as2, options2) {
        var request2 = resolveRequest();
        if (request2) {
          var { resumableState, renderState } = request2;
          if (as2 && href) {
            switch (as2) {
              case "image":
                if (options2) {
                  var imageSrcSet = options2.imageSrcSet;
                  var imageSizes = options2.imageSizes;
                  var fetchPriority = options2.fetchPriority;
                }
                var key = imageSrcSet ? imageSrcSet + `
` + (imageSizes || "") : href;
                if (resumableState.imageResources.hasOwnProperty(key))
                  return;
                resumableState.imageResources[key] = PRELOAD_NO_CREDS;
                resumableState = renderState.headers;
                var header;
                resumableState && 0 < resumableState.remainingCapacity && typeof imageSrcSet !== "string" && fetchPriority === "high" && (header = getPreloadAsHeader(href, as2, options2), 0 <= (resumableState.remainingCapacity -= header.length + 2)) ? (renderState.resets.image[key] = PRELOAD_NO_CREDS, resumableState.highImagePreloads && (resumableState.highImagePreloads += ", "), resumableState.highImagePreloads += header) : (resumableState = [], pushLinkImpl(resumableState, assign({
                  rel: "preload",
                  href: imageSrcSet ? undefined : href,
                  as: as2
                }, options2)), fetchPriority === "high" ? renderState.highImagePreloads.add(resumableState) : (renderState.bulkPreloads.add(resumableState), renderState.preloads.images.set(key, resumableState)));
                break;
              case "style":
                if (resumableState.styleResources.hasOwnProperty(href))
                  return;
                imageSrcSet = [];
                pushLinkImpl(imageSrcSet, assign({ rel: "preload", href, as: as2 }, options2));
                resumableState.styleResources[href] = !options2 || typeof options2.crossOrigin !== "string" && typeof options2.integrity !== "string" ? PRELOAD_NO_CREDS : [options2.crossOrigin, options2.integrity];
                renderState.preloads.stylesheets.set(href, imageSrcSet);
                renderState.bulkPreloads.add(imageSrcSet);
                break;
              case "script":
                if (resumableState.scriptResources.hasOwnProperty(href))
                  return;
                imageSrcSet = [];
                renderState.preloads.scripts.set(href, imageSrcSet);
                renderState.bulkPreloads.add(imageSrcSet);
                pushLinkImpl(imageSrcSet, assign({ rel: "preload", href, as: as2 }, options2));
                resumableState.scriptResources[href] = !options2 || typeof options2.crossOrigin !== "string" && typeof options2.integrity !== "string" ? PRELOAD_NO_CREDS : [options2.crossOrigin, options2.integrity];
                break;
              default:
                if (resumableState.unknownResources.hasOwnProperty(as2)) {
                  if (imageSrcSet = resumableState.unknownResources[as2], imageSrcSet.hasOwnProperty(href))
                    return;
                } else
                  imageSrcSet = {}, resumableState.unknownResources[as2] = imageSrcSet;
                imageSrcSet[href] = PRELOAD_NO_CREDS;
                if ((resumableState = renderState.headers) && 0 < resumableState.remainingCapacity && as2 === "font" && (key = getPreloadAsHeader(href, as2, options2), 0 <= (resumableState.remainingCapacity -= key.length + 2)))
                  renderState.resets.font[href] = PRELOAD_NO_CREDS, resumableState.fontPreloads && (resumableState.fontPreloads += ", "), resumableState.fontPreloads += key;
                else
                  switch (resumableState = [], href = assign({ rel: "preload", href, as: as2 }, options2), pushLinkImpl(resumableState, href), as2) {
                    case "font":
                      renderState.fontPreloads.add(resumableState);
                      break;
                    default:
                      renderState.bulkPreloads.add(resumableState);
                  }
            }
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.L(href, as2, options2);
      },
      m: function(href, options2) {
        var request2 = resolveRequest();
        if (request2) {
          var { resumableState, renderState } = request2;
          if (href) {
            var as2 = options2 && typeof options2.as === "string" ? options2.as : "script";
            switch (as2) {
              case "script":
                if (resumableState.moduleScriptResources.hasOwnProperty(href))
                  return;
                as2 = [];
                resumableState.moduleScriptResources[href] = !options2 || typeof options2.crossOrigin !== "string" && typeof options2.integrity !== "string" ? PRELOAD_NO_CREDS : [options2.crossOrigin, options2.integrity];
                renderState.preloads.moduleScripts.set(href, as2);
                break;
              default:
                if (resumableState.moduleUnknownResources.hasOwnProperty(as2)) {
                  var resources = resumableState.unknownResources[as2];
                  if (resources.hasOwnProperty(href))
                    return;
                } else
                  resources = {}, resumableState.moduleUnknownResources[as2] = resources;
                as2 = [];
                resources[href] = PRELOAD_NO_CREDS;
            }
            pushLinkImpl(as2, assign({ rel: "modulepreload", href }, options2));
            renderState.bulkPreloads.add(as2);
            enqueueFlush(request2);
          }
        } else
          previousDispatcher.m(href, options2);
      },
      X: function(src, options2) {
        var request2 = resolveRequest();
        if (request2) {
          var { resumableState, renderState } = request2;
          if (src) {
            var resourceState = resumableState.scriptResources.hasOwnProperty(src) ? resumableState.scriptResources[src] : undefined;
            resourceState !== EXISTS && (resumableState.scriptResources[src] = EXISTS, options2 = assign({ src, async: true }, options2), resourceState && (resourceState.length === 2 && adoptPreloadCredentials(options2, resourceState), src = renderState.preloads.scripts.get(src)) && (src.length = 0), src = [], renderState.scripts.add(src), pushScriptImpl(src, options2), enqueueFlush(request2));
          }
        } else
          previousDispatcher.X(src, options2);
      },
      S: function(href, precedence, options2) {
        var request2 = resolveRequest();
        if (request2) {
          var { resumableState, renderState } = request2;
          if (href) {
            precedence = precedence || "default";
            var styleQueue = renderState.styles.get(precedence), resourceState = resumableState.styleResources.hasOwnProperty(href) ? resumableState.styleResources[href] : undefined;
            resourceState !== EXISTS && (resumableState.styleResources[href] = EXISTS, styleQueue || (styleQueue = {
              precedence: escapeTextForBrowser(precedence),
              rules: [],
              hrefs: [],
              sheets: new Map
            }, renderState.styles.set(precedence, styleQueue)), precedence = {
              state: PENDING$1,
              props: assign({
                rel: "stylesheet",
                href,
                "data-precedence": precedence
              }, options2)
            }, resourceState && (resourceState.length === 2 && adoptPreloadCredentials(precedence.props, resourceState), (renderState = renderState.preloads.stylesheets.get(href)) && 0 < renderState.length ? renderState.length = 0 : precedence.state = PRELOADED), styleQueue.sheets.set(href, precedence), enqueueFlush(request2));
          }
        } else
          previousDispatcher.S(href, precedence, options2);
      },
      M: function(src, options2) {
        var request2 = resolveRequest();
        if (request2) {
          var { resumableState, renderState } = request2;
          if (src) {
            var resourceState = resumableState.moduleScriptResources.hasOwnProperty(src) ? resumableState.moduleScriptResources[src] : undefined;
            resourceState !== EXISTS && (resumableState.moduleScriptResources[src] = EXISTS, options2 = assign({ src, type: "module", async: true }, options2), resourceState && (resourceState.length === 2 && adoptPreloadCredentials(options2, resourceState), src = renderState.preloads.moduleScripts.get(src)) && (src.length = 0), src = [], renderState.scripts.add(src), pushScriptImpl(src, options2), enqueueFlush(request2));
          }
        } else
          previousDispatcher.M(src, options2);
      }
    };
    var NothingSent = 0, SentCompleteSegmentFunction = 1, SentCompleteBoundaryFunction = 2, SentClientRenderFunction = 4, SentStyleInsertionFunction = 8, SentCompletedShellId = 32, SentMarkShellTime = 64, EXISTS = null, PRELOAD_NO_CREDS = [];
    Object.freeze(PRELOAD_NO_CREDS);
    var currentlyFlushingRenderState = null;
    stringToPrecomputedChunk('"></template>');
    var startInlineScript = stringToPrecomputedChunk("<script"), endInlineScript = stringToPrecomputedChunk("</script>"), startScriptSrc = stringToPrecomputedChunk('<script src="'), startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'), scriptNonce = stringToPrecomputedChunk(' nonce="'), scriptIntegirty = stringToPrecomputedChunk(' integrity="'), scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin="'), endAsyncScript = stringToPrecomputedChunk(' async=""></script>'), startInlineStyle = stringToPrecomputedChunk("<style"), scriptRegex = /(<\/|<)(s)(cript)/gi, importMapScriptStart = stringToPrecomputedChunk('<script type="importmap">'), importMapScriptEnd = stringToPrecomputedChunk("</script>");
    var didWarnForNewBooleanPropsWithEmptyValue = {};
    var ROOT_HTML_MODE = 0, HTML_HTML_MODE = 1, HTML_MODE = 2, HTML_HEAD_MODE = 3, SVG_MODE = 4, MATHML_MODE = 5, HTML_TABLE_MODE = 6, HTML_TABLE_BODY_MODE = 7, HTML_TABLE_ROW_MODE = 8, HTML_COLGROUP_MODE = 9, textSeparator = stringToPrecomputedChunk("<!-- -->"), styleNameCache = new Map, styleAttributeStart = stringToPrecomputedChunk(' style="'), styleAssign = stringToPrecomputedChunk(":"), styleSeparator = stringToPrecomputedChunk(";"), attributeSeparator = stringToPrecomputedChunk(" "), attributeAssign = stringToPrecomputedChunk('="'), attributeEnd = stringToPrecomputedChunk('"'), attributeEmptyString = stringToPrecomputedChunk('=""'), actionJavaScriptURL = stringToPrecomputedChunk(escapeTextForBrowser("javascript:throw new Error('React form unexpectedly submitted.')")), startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"'), endOfStartTag = stringToPrecomputedChunk(">"), endOfStartTagSelfClosing = stringToPrecomputedChunk("/>"), didWarnDefaultInputValue = false, didWarnDefaultChecked = false, didWarnDefaultSelectValue = false, didWarnDefaultTextareaValue = false, didWarnInvalidOptionChildren = false, didWarnInvalidOptionInnerHTML = false, didWarnSelectedSetOnOption = false, didWarnFormActionType = false, didWarnFormActionName = false, didWarnFormActionTarget = false, didWarnFormActionMethod = false, selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'), formReplayingRuntimeScript = stringToPrecomputedChunk(`addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});`), formStateMarkerIsMatching = stringToPrecomputedChunk("<!--F!-->"), formStateMarkerIsNotMatching = stringToPrecomputedChunk("<!--F-->"), styleRegex = /(<\/|<)(s)(tyle)/gi, headPreambleContributionChunk = stringToPrecomputedChunk("<!--head-->"), bodyPreambleContributionChunk = stringToPrecomputedChunk("<!--body-->"), htmlPreambleContributionChunk = stringToPrecomputedChunk("<!--html-->"), leadingNewline = stringToPrecomputedChunk(`
`), VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, validatedTagCache = new Map, doctypeChunk = stringToPrecomputedChunk("<!DOCTYPE html>"), endTagCache = new Map, shellTimeRuntimeScript = stringToPrecomputedChunk("requestAnimationFrame(function(){$RT=performance.now()});"), placeholder1 = stringToPrecomputedChunk('<template id="'), placeholder2 = stringToPrecomputedChunk('"></template>'), startActivityBoundary = stringToPrecomputedChunk("<!--&-->"), endActivityBoundary = stringToPrecomputedChunk("<!--/&-->"), startCompletedSuspenseBoundary = stringToPrecomputedChunk("<!--$-->"), startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'), startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'), startClientRenderedSuspenseBoundary = stringToPrecomputedChunk("<!--$!-->"), endSuspenseBoundary = stringToPrecomputedChunk("<!--/$-->"), clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk("<template"), clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'), clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'), clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'), clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'), clientRenderedSuspenseBoundaryError1D = stringToPrecomputedChunk(' data-cstck="'), clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk("></template>"), startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'), startSegmentHTML2 = stringToPrecomputedChunk('">'), endSegmentHTML = stringToPrecomputedChunk("</div>"), startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'), startSegmentSVG2 = stringToPrecomputedChunk('">'), endSegmentSVG = stringToPrecomputedChunk("</svg>"), startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'), startSegmentMathML2 = stringToPrecomputedChunk('">'), endSegmentMathML = stringToPrecomputedChunk("</math>"), startSegmentTable = stringToPrecomputedChunk('<table hidden id="'), startSegmentTable2 = stringToPrecomputedChunk('">'), endSegmentTable = stringToPrecomputedChunk("</table>"), startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'), startSegmentTableBody2 = stringToPrecomputedChunk('">'), endSegmentTableBody = stringToPrecomputedChunk("</tbody></table>"), startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'), startSegmentTableRow2 = stringToPrecomputedChunk('">'), endSegmentTableRow = stringToPrecomputedChunk("</tr></table>"), startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'), startSegmentColGroup2 = stringToPrecomputedChunk('">'), endSegmentColGroup = stringToPrecomputedChunk("</colgroup></table>"), completeSegmentScript1Full = stringToPrecomputedChunk('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'), completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'), completeSegmentScript2 = stringToPrecomputedChunk('","'), completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>');
    stringToPrecomputedChunk('<template data-rsi="" data-sid="');
    stringToPrecomputedChunk('" data-pid="');
    var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(`$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`), completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'), completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(`$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`), completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'), completeBoundaryScript2 = stringToPrecomputedChunk('","'), completeBoundaryScript3a = stringToPrecomputedChunk('",'), completeBoundaryScript3b = stringToPrecomputedChunk('"'), completeBoundaryScriptEnd = stringToPrecomputedChunk(")</script>");
    stringToPrecomputedChunk('<template data-rci="" data-bid="');
    stringToPrecomputedChunk('<template data-rri="" data-bid="');
    stringToPrecomputedChunk('" data-sid="');
    stringToPrecomputedChunk('" data-sty="');
    var clientRenderScriptFunctionOnly = stringToPrecomputedChunk('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'), clientRenderScript1Full = stringToPrecomputedChunk('$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'), clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'), clientRenderScript1A = stringToPrecomputedChunk('"'), clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(","), clientRenderScriptEnd = stringToPrecomputedChunk(")</script>");
    stringToPrecomputedChunk('<template data-rxi="" data-bid="');
    stringToPrecomputedChunk('" data-dgst="');
    stringToPrecomputedChunk('" data-msg="');
    stringToPrecomputedChunk('" data-stck="');
    stringToPrecomputedChunk('" data-cstck="');
    var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g, regexForJSStringsInScripts = /[&><\u2028\u2029]/g, lateStyleTagResourceOpen1 = stringToPrecomputedChunk(' media="not all" data-precedence="'), lateStyleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'), lateStyleTagResourceOpen3 = stringToPrecomputedChunk('">'), lateStyleTagTemplateClose = stringToPrecomputedChunk("</style>"), currentlyRenderingBoundaryHasStylesToHoist = false, destinationHasCapacity = true, stylesheetFlushingQueue = [], styleTagResourceOpen1 = stringToPrecomputedChunk(' data-precedence="'), styleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'), spaceSeparator = stringToPrecomputedChunk(" "), styleTagResourceOpen3 = stringToPrecomputedChunk('">'), styleTagResourceClose = stringToPrecomputedChunk("</style>");
    stringToPrecomputedChunk('<link rel="expect" href="#');
    stringToPrecomputedChunk('" blocking="render"/>');
    var completedShellIdAttributeStart = stringToPrecomputedChunk(' id="'), arrayFirstOpenBracket = stringToPrecomputedChunk("["), arraySubsequentOpenBracket = stringToPrecomputedChunk(",["), arrayInterstitial = stringToPrecomputedChunk(","), arrayCloseBracket = stringToPrecomputedChunk("]"), PENDING$1 = 0, PRELOADED = 1, PREAMBLE = 2, LATE = 3, regexForHrefInLinkHeaderURLContext = /[<>\r\n]/g, regexForLinkHeaderQuotedParamValueContext = /["';,\r\n]/g, bind = Function.prototype.bind, requestStorage = new async_hooks.AsyncLocalStorage, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), emptyContextObject = {};
    Object.freeze(emptyContextObject);
    var rendererSigil = {};
    var currentActiveSnapshot = null, didWarnAboutNoopUpdateForComponent = {}, didWarnAboutDeprecatedWillMount = {};
    var didWarnAboutUninitializedState = new Set;
    var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set;
    var didWarnAboutLegacyLifecyclesAndDerivedState = new Set;
    var didWarnAboutDirectlyAssigningPropsToState = new Set;
    var didWarnAboutUndefinedDerivedState = new Set;
    var didWarnAboutContextTypes$1 = new Set;
    var didWarnAboutChildContextTypes = new Set;
    var didWarnAboutInvalidateContextType = new Set;
    var didWarnOnInvalidCallback = new Set;
    var classComponentUpdater = {
      enqueueSetState: function(inst, payload, callback) {
        var internals = inst._reactInternals;
        internals.queue === null ? warnNoop(inst, "setState") : (internals.queue.push(payload), callback !== undefined && callback !== null && warnOnInvalidCallback(callback));
      },
      enqueueReplaceState: function(inst, payload, callback) {
        inst = inst._reactInternals;
        inst.replace = true;
        inst.queue = [payload];
        callback !== undefined && callback !== null && warnOnInvalidCallback(callback);
      },
      enqueueForceUpdate: function(inst, callback) {
        inst._reactInternals.queue === null ? warnNoop(inst, "forceUpdate") : callback !== undefined && callback !== null && warnOnInvalidCallback(callback);
      }
    }, emptyTreeContext = { id: 1, overflow: "" }, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log4 = Math.log, LN2 = Math.LN2, SuspenseException = Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."), suspendedThenable = null, objectIs = typeof Object.is === "function" ? Object.is : is3, currentlyRenderingComponent = null, currentlyRenderingTask = null, currentlyRenderingRequest = null, currentlyRenderingKeyPath = null, firstWorkInProgressHook = null, workInProgressHook = null, isReRender = false, didScheduleRenderPhaseUpdate = false, localIdCounter = 0, actionStateCounter = 0, actionStateMatchingIndex = -1, thenableIndexCounter = 0, thenableState = null, renderPhaseUpdates = null, numberOfReRenders = 0, isInHookUserCodeInDev = false, currentHookNameInDev, HooksDispatcher = {
      readContext,
      use: function(usable) {
        if (usable !== null && typeof usable === "object") {
          if (typeof usable.then === "function")
            return unwrapThenable(usable);
          if (usable.$$typeof === REACT_CONTEXT_TYPE)
            return readContext(usable);
        }
        throw Error("An unsupported type was passed to use(): " + String(usable));
      },
      useContext: function(context10) {
        currentHookNameInDev = "useContext";
        resolveCurrentlyRenderingComponent();
        return context10._currentValue;
      },
      useMemo,
      useReducer,
      useRef: function(initialValue) {
        currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
        workInProgressHook = createWorkInProgressHook();
        var previousRef = workInProgressHook.memoizedState;
        return previousRef === null ? (initialValue = { current: initialValue }, Object.seal(initialValue), workInProgressHook.memoizedState = initialValue) : previousRef;
      },
      useState: function(initialState) {
        currentHookNameInDev = "useState";
        return useReducer(basicStateReducer, initialState);
      },
      useInsertionEffect: noop,
      useLayoutEffect: noop,
      useCallback: function(callback, deps) {
        return useMemo(function() {
          return callback;
        }, deps);
      },
      useImperativeHandle: noop,
      useEffect: noop,
      useDebugValue: noop,
      useDeferredValue: function(value, initialValue) {
        resolveCurrentlyRenderingComponent();
        return initialValue !== undefined ? initialValue : value;
      },
      useTransition: function() {
        resolveCurrentlyRenderingComponent();
        return [false, unsupportedStartTransition];
      },
      useId: function() {
        var treeId = currentlyRenderingTask.treeContext;
        var overflow = treeId.overflow;
        treeId = treeId.id;
        treeId = (treeId & ~(1 << 32 - clz32(treeId) - 1)).toString(32) + overflow;
        var resumableState = currentResumableState;
        if (resumableState === null)
          throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");
        overflow = localIdCounter++;
        treeId = "_" + resumableState.idPrefix + "R_" + treeId;
        0 < overflow && (treeId += "H" + overflow.toString(32));
        return treeId + "_";
      },
      useSyncExternalStore: function(subscribe4, getSnapshot, getServerSnapshot) {
        if (getServerSnapshot === undefined)
          throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");
        return getServerSnapshot();
      },
      useOptimistic: function(passthrough) {
        resolveCurrentlyRenderingComponent();
        return [passthrough, unsupportedSetOptimisticState];
      },
      useActionState,
      useFormState: useActionState,
      useHostTransitionStatus: function() {
        resolveCurrentlyRenderingComponent();
        return NotPending;
      },
      useMemoCache: function(size) {
        for (var data = Array(size), i = 0;i < size; i++)
          data[i] = REACT_MEMO_CACHE_SENTINEL;
        return data;
      },
      useCacheRefresh: function() {
        return unsupportedRefresh;
      },
      useEffectEvent: function() {
        return throwOnUseEffectEventCall;
      }
    }, currentResumableState = null, currentTaskInDEV = null, DefaultAsyncDispatcher = {
      getCacheForType: function() {
        throw Error("Not implemented.");
      },
      cacheSignal: function() {
        throw Error("Not implemented.");
      },
      getOwner: function() {
        return currentTaskInDEV === null ? null : currentTaskInDEV.componentStack;
      }
    }, disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
    disabledLog.__reactDisabledLog = true;
    var prefix, suffix, reentry = false;
    var componentFrameCache = new (typeof WeakMap === "function" ? WeakMap : Map);
    var callComponent = {
      react_stack_bottom_frame: function(Component, props, secondArg) {
        return Component(props, secondArg);
      }
    }, callComponentInDEV = callComponent.react_stack_bottom_frame.bind(callComponent), callRender = {
      react_stack_bottom_frame: function(instance) {
        return instance.render();
      }
    }, callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender), callLazyInit = {
      react_stack_bottom_frame: function(lazy2) {
        var init4 = lazy2._init;
        return init4(lazy2._payload);
      }
    }, callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit), lastResetTime = 0;
    if (typeof performance === "object" && typeof performance.now === "function") {
      var localPerformance = performance;
      var getCurrentTime = function() {
        return localPerformance.now();
      };
    } else {
      var localDate = Date;
      getCurrentTime = function() {
        return localDate.now();
      };
    }
    var CLIENT_RENDERED = 4, PENDING = 0, COMPLETED = 1, FLUSHED = 2, ABORTED = 3, ERRORED = 4, POSTPONED = 5, CLOSED = 14, currentRequest = null, didWarnAboutBadClass = {}, didWarnAboutContextTypes = {}, didWarnAboutContextTypeOnFunctionComponent = {}, didWarnAboutGetDerivedStateOnFunctionComponent = {}, didWarnAboutReassigningProps = false, didWarnAboutGenerators = false, didWarnAboutMaps = false, flushedByteSize = 0, flushingPartialBoundaries = false;
    ensureCorrectIsomorphicReactVersion();
    ensureCorrectIsomorphicReactVersion();
    exports.prerender = function(children, options2) {
      return new Promise(function(resolve3, reject) {
        var onHeaders = options2 ? options2.onHeaders : undefined, onHeadersImpl;
        onHeaders && (onHeadersImpl = function(headersDescriptor) {
          onHeaders(new Headers(headersDescriptor));
        });
        var resources = createResumableState(options2 ? options2.identifierPrefix : undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.bootstrapScriptContent : undefined, options2 ? options2.bootstrapScripts : undefined, options2 ? options2.bootstrapModules : undefined), request2 = createPrerenderRequest(children, resources, createRenderState(resources, undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.importMap : undefined, onHeadersImpl, options2 ? options2.maxHeadersLength : undefined), createRootFormatContext(options2 ? options2.namespaceURI : undefined), options2 ? options2.progressiveChunkSize : undefined, options2 ? options2.onError : undefined, function() {
          var writable, stream2 = new ReadableStream({
            type: "bytes",
            start: function(controller) {
              writable = createFakeWritableFromReadableStreamController(controller);
            },
            pull: function() {
              startFlowing(request2, writable);
            },
            cancel: function(reason) {
              request2.destination = null;
              abort(request2, reason);
            }
          }, { highWaterMark: 0 });
          stream2 = {
            postponed: getPostponedState(request2),
            prelude: stream2
          };
          resolve3(stream2);
        }, undefined, undefined, reject, options2 ? options2.onPostpone : undefined);
        if (options2 && options2.signal) {
          var signal = options2.signal;
          if (signal.aborted)
            abort(request2, signal.reason);
          else {
            var listener = function() {
              abort(request2, signal.reason);
              signal.removeEventListener("abort", listener);
            };
            signal.addEventListener("abort", listener);
          }
        }
        startWork(request2);
      });
    };
    exports.prerenderToNodeStream = function(children, options2) {
      return new Promise(function(resolve3, reject) {
        var resumableState = createResumableState(options2 ? options2.identifierPrefix : undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.bootstrapScriptContent : undefined, options2 ? options2.bootstrapScripts : undefined, options2 ? options2.bootstrapModules : undefined), request2 = createPrerenderRequest(children, resumableState, createRenderState(resumableState, undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.importMap : undefined, options2 ? options2.onHeaders : undefined, options2 ? options2.maxHeadersLength : undefined), createRootFormatContext(options2 ? options2.namespaceURI : undefined), options2 ? options2.progressiveChunkSize : undefined, options2 ? options2.onError : undefined, function() {
          var readable = new stream.Readable({
            read: function() {
              startFlowing(request2, writable);
            }
          }), writable = createFakeWritableFromReadable(readable);
          readable = {
            postponed: getPostponedState(request2),
            prelude: readable
          };
          resolve3(readable);
        }, undefined, undefined, reject, options2 ? options2.onPostpone : undefined);
        if (options2 && options2.signal) {
          var signal = options2.signal;
          if (signal.aborted)
            abort(request2, signal.reason);
          else {
            var listener = function() {
              abort(request2, signal.reason);
              signal.removeEventListener("abort", listener);
            };
            signal.addEventListener("abort", listener);
          }
        }
        startWork(request2);
      });
    };
    exports.renderToPipeableStream = function(children, options2) {
      var request2 = createRequestImpl(children, options2), hasStartedFlowing = false;
      startWork(request2);
      return {
        pipe: function(destination) {
          if (hasStartedFlowing)
            throw Error("React currently only supports piping to one writable stream.");
          hasStartedFlowing = true;
          safelyEmitEarlyPreloads(request2, request2.trackedPostpones === null ? request2.pendingRootTasks === 0 : request2.completedRootSegment === null ? request2.pendingRootTasks === 0 : request2.completedRootSegment.status !== POSTPONED);
          startFlowing(request2, destination);
          destination.on("drain", createDrainHandler(destination, request2));
          destination.on("error", createCancelHandler(request2, "The destination stream errored while writing data."));
          destination.on("close", createCancelHandler(request2, "The destination stream closed early."));
          return destination;
        },
        abort: function(reason) {
          abort(request2, reason);
        }
      };
    };
    exports.renderToReadableStream = function(children, options2) {
      return new Promise(function(resolve3, reject) {
        var onFatalError, onAllReady, allReady = new Promise(function(res, rej) {
          onAllReady = res;
          onFatalError = rej;
        }), onHeaders = options2 ? options2.onHeaders : undefined, onHeadersImpl;
        onHeaders && (onHeadersImpl = function(headersDescriptor) {
          onHeaders(new Headers(headersDescriptor));
        });
        var resumableState = createResumableState(options2 ? options2.identifierPrefix : undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.bootstrapScriptContent : undefined, options2 ? options2.bootstrapScripts : undefined, options2 ? options2.bootstrapModules : undefined), request2 = createRequest(children, resumableState, createRenderState(resumableState, options2 ? options2.nonce : undefined, options2 ? options2.unstable_externalRuntimeSrc : undefined, options2 ? options2.importMap : undefined, onHeadersImpl, options2 ? options2.maxHeadersLength : undefined), createRootFormatContext(options2 ? options2.namespaceURI : undefined), options2 ? options2.progressiveChunkSize : undefined, options2 ? options2.onError : undefined, onAllReady, function() {
          var writable, stream2 = new ReadableStream({
            type: "bytes",
            start: function(controller) {
              writable = createFakeWritableFromReadableStreamController$1(controller);
            },
            pull: function() {
              startFlowing(request2, writable);
            },
            cancel: function(reason) {
              request2.destination = null;
              abort(request2, reason);
            }
          }, { highWaterMark: 0 });
          stream2.allReady = allReady;
          resolve3(stream2);
        }, function(error49) {
          allReady.catch(function() {});
          reject(error49);
        }, onFatalError, options2 ? options2.onPostpone : undefined, options2 ? options2.formState : undefined);
        if (options2 && options2.signal) {
          var signal = options2.signal;
          if (signal.aborted)
            abort(request2, signal.reason);
          else {
            var listener = function() {
              abort(request2, signal.reason);
              signal.removeEventListener("abort", listener);
            };
            signal.addEventListener("abort", listener);
          }
        }
        startWork(request2);
      });
    };
    exports.resume = function(children, postponedState, options2) {
      return new Promise(function(resolve3, reject) {
        var onFatalError, onAllReady, allReady = new Promise(function(res, rej) {
          onAllReady = res;
          onFatalError = rej;
        }), request2 = resumeRequest(children, postponedState, createRenderState(postponedState.resumableState, options2 ? options2.nonce : undefined, undefined, undefined, undefined, undefined), options2 ? options2.onError : undefined, onAllReady, function() {
          var writable, stream2 = new ReadableStream({
            type: "bytes",
            start: function(controller) {
              writable = createFakeWritableFromReadableStreamController$1(controller);
            },
            pull: function() {
              startFlowing(request2, writable);
            },
            cancel: function(reason) {
              request2.destination = null;
              abort(request2, reason);
            }
          }, { highWaterMark: 0 });
          stream2.allReady = allReady;
          resolve3(stream2);
        }, function(error49) {
          allReady.catch(function() {});
          reject(error49);
        }, onFatalError, options2 ? options2.onPostpone : undefined);
        if (options2 && options2.signal) {
          var signal = options2.signal;
          if (signal.aborted)
            abort(request2, signal.reason);
          else {
            var listener = function() {
              abort(request2, signal.reason);
              signal.removeEventListener("abort", listener);
            };
            signal.addEventListener("abort", listener);
          }
        }
        startWork(request2);
      });
    };
    exports.resumeAndPrerender = function(children, postponedState, options2) {
      return new Promise(function(resolve3, reject) {
        var request2 = resumeAndPrerenderRequest(children, postponedState, createRenderState(postponedState.resumableState, undefined, undefined, undefined, undefined, undefined), options2 ? options2.onError : undefined, function() {
          var writable, stream2 = new ReadableStream({
            type: "bytes",
            start: function(controller) {
              writable = createFakeWritableFromReadableStreamController(controller);
            },
            pull: function() {
              startFlowing(request2, writable);
            },
            cancel: function(reason) {
              request2.destination = null;
              abort(request2, reason);
            }
          }, { highWaterMark: 0 });
          stream2 = { postponed: getPostponedState(request2), prelude: stream2 };
          resolve3(stream2);
        }, undefined, undefined, reject, options2 ? options2.onPostpone : undefined);
        if (options2 && options2.signal) {
          var signal = options2.signal;
          if (signal.aborted)
            abort(request2, signal.reason);
          else {
            var listener = function() {
              abort(request2, signal.reason);
              signal.removeEventListener("abort", listener);
            };
            signal.addEventListener("abort", listener);
          }
        }
        startWork(request2);
      });
    };
    exports.resumeAndPrerenderToNodeStream = function(children, postponedState, options2) {
      return new Promise(function(resolve3, reject) {
        var request2 = resumeAndPrerenderRequest(children, postponedState, createRenderState(postponedState.resumableState, undefined, undefined, undefined, undefined, undefined), options2 ? options2.onError : undefined, function() {
          var readable = new stream.Readable({
            read: function() {
              startFlowing(request2, writable);
            }
          }), writable = createFakeWritableFromReadable(readable);
          readable = {
            postponed: getPostponedState(request2),
            prelude: readable
          };
          resolve3(readable);
        }, undefined, undefined, reject, options2 ? options2.onPostpone : undefined);
        if (options2 && options2.signal) {
          var signal = options2.signal;
          if (signal.aborted)
            abort(request2, signal.reason);
          else {
            var listener = function() {
              abort(request2, signal.reason);
              signal.removeEventListener("abort", listener);
            };
            signal.addEventListener("abort", listener);
          }
        }
        startWork(request2);
      });
    };
    exports.resumeToPipeableStream = function(children, postponedState, options2) {
      var request2 = resumeRequestImpl(children, postponedState, options2), hasStartedFlowing = false;
      startWork(request2);
      return {
        pipe: function(destination) {
          if (hasStartedFlowing)
            throw Error("React currently only supports piping to one writable stream.");
          hasStartedFlowing = true;
          startFlowing(request2, destination);
          destination.on("drain", createDrainHandler(destination, request2));
          destination.on("error", createCancelHandler(request2, "The destination stream errored while writing data."));
          destination.on("close", createCancelHandler(request2, "The destination stream closed early."));
          return destination;
        },
        abort: function(reason) {
          abort(request2, reason);
        }
      };
    };
    exports.version = "19.2.7";
  })();
});

// ../../node_modules/.pnpm/react-dom@19.2.7_react@19.2.7/node_modules/react-dom/server.node.js
var exports_server_node = {};
__export(exports_server_node, {
  version: () => $version,
  resumeToPipeableStream: () => $resumeToPipeableStream,
  resume: () => $resume,
  renderToString: () => $renderToString,
  renderToStaticMarkup: () => $renderToStaticMarkup,
  renderToReadableStream: () => $renderToReadableStream,
  renderToPipeableStream: () => $renderToPipeableStream
});
var react_dom_server_legacy_node_development, react_dom_server_node_development, l3, s2, $version, $renderToString, $renderToStaticMarkup, $renderToPipeableStream, $renderToReadableStream, $resumeToPipeableStream, $resume;
var init_server_node = __esm(() => {
  react_dom_server_legacy_node_development = __toESM(require_react_dom_server_legacy_node_development(), 1);
  react_dom_server_node_development = __toESM(require_react_dom_server_node_development(), 1);
  if (false) {} else {
    l3 = react_dom_server_legacy_node_development;
    s2 = react_dom_server_node_development;
  }
  $version = l3.version;
  $renderToString = l3.renderToString;
  $renderToStaticMarkup = l3.renderToStaticMarkup;
  $renderToPipeableStream = s2.renderToPipeableStream;
  $renderToReadableStream = s2.renderToReadableStream;
  $resumeToPipeableStream = s2.resumeToPipeableStream;
  $resume = s2.resume;
});

// ../../node_modules/.pnpm/@react-email+render@2.0.6_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-email/render/dist/node/index.mjs
import { Writable as Writable2 } from "node:stream";
function getHtmlNode(path2) {
  const topNode = path2.node;
  if (topNode)
    return topNode;
  return path2.stack?.[path2.stack.length - 1];
}
function recursivelyMapDoc(doc2, callback) {
  if (Array.isArray(doc2))
    return doc2.map((innerDoc) => recursivelyMapDoc(innerDoc, callback));
  if (typeof doc2 === "object") {
    if (doc2.type === "line")
      return callback(doc2.soft ? "" : " ");
    if (doc2.type === "group")
      return {
        ...doc2,
        contents: recursivelyMapDoc(doc2.contents, callback),
        expandedStates: recursivelyMapDoc(doc2.expandedStates, callback)
      };
    if ("contents" in doc2)
      return {
        ...doc2,
        contents: recursivelyMapDoc(doc2.contents, callback)
      };
    if ("parts" in doc2)
      return {
        ...doc2,
        parts: recursivelyMapDoc(doc2.parts, callback)
      };
    if (doc2.type === "if-break")
      return {
        ...doc2,
        breakContents: recursivelyMapDoc(doc2.breakContents, callback),
        flatContents: recursivelyMapDoc(doc2.flatContents, callback)
      };
    const nextDoc = { ...doc2 };
    for (const [key, value] of Object.entries(nextDoc))
      if (value && typeof value === "object")
        nextDoc[key] = recursivelyMapDoc(value, callback);
    return nextDoc;
  }
  return callback(doc2);
}
function toPlainText(html$1, options2) {
  return convert(html$1, {
    wordwrap: false,
    ...options2,
    selectors: [...plainTextSelectors, ...options2?.selectors ?? []]
  });
}
function createErrorBoundary(reject) {
  if (!import_react.default.Component)
    return (props) => /* @__PURE__ */ import_jsx_runtime16.jsx(import_jsx_runtime16.Fragment, { children: props.children });
  return class ErrorBoundary extends import_react.default.Component {
    componentDidCatch(error49) {
      reject(error49);
    }
    render() {
      return this.props.children;
    }
  };
}
var import_react, import_jsx_runtime16, modifiedHtml, defaults2, pretty = (str, options2 = {}) => {
  return Jn2(str.replaceAll("\x00", ""), {
    ...defaults2,
    ...options2
  });
}, plainTextSelectors, readStream = async (stream2) => {
  let result = "";
  const decoder = new TextDecoder("utf-8");
  if ("pipeTo" in stream2) {
    const writableStream = new WritableStream({
      write(chunk) {
        result += decoder.decode(chunk, { stream: true });
      },
      close() {
        result += decoder.decode();
      }
    });
    await stream2.pipeTo(writableStream);
  } else {
    const writable = new Writable2({
      write(chunk, _encoding, callback) {
        result += decoder.decode(chunk, { stream: true });
        callback();
      },
      final(callback) {
        result += decoder.decode();
        callback();
      }
    });
    await new Promise((resolve3, reject) => {
      writable.on("pipe", (source) => {
        source.on("error", (err) => {
          writable.destroy(err);
        });
      });
      writable.on("error", reject);
      writable.on("close", () => {
        resolve3();
      });
      stream2.pipe(writable);
    });
  }
  return result;
}, render2 = async (node3, options2) => {
  const reactDOMServer = await Promise.resolve().then(() => (init_server_node(), exports_server_node)).then((m2) => {
    if ("default" in m2)
      return m2.default;
    return m2;
  });
  let html$1;
  await new Promise((resolve3, reject) => {
    if (Object.hasOwn(reactDOMServer, "renderToReadableStream") && typeof WritableStream !== "undefined") {
      const ErrorBoundary = createErrorBoundary(reject);
      reactDOMServer.renderToReadableStream(/* @__PURE__ */ import_jsx_runtime16.jsx(ErrorBoundary, { children: /* @__PURE__ */ import_jsx_runtime16.jsx(import_react.Suspense, { children: node3 }) }), {
        progressiveChunkSize: Number.POSITIVE_INFINITY,
        onError(error49) {
          reject(error49);
        }
      }).then(async (stream2) => {
        await stream2.allReady;
        return readStream(stream2);
      }).then((result) => {
        html$1 = result;
        resolve3();
      }).catch(reject);
    } else {
      const ErrorBoundary = createErrorBoundary(reject);
      const stream2 = reactDOMServer.renderToPipeableStream(/* @__PURE__ */ import_jsx_runtime16.jsx(ErrorBoundary, { children: /* @__PURE__ */ import_jsx_runtime16.jsx(import_react.Suspense, { children: node3 }) }), {
        async onAllReady() {
          html$1 = await readStream(stream2);
          resolve3();
        },
        onError(error49) {
          reject(error49);
        },
        progressiveChunkSize: Number.POSITIVE_INFINITY
      });
    }
  });
  if (options2?.plainText)
    return toPlainText(html$1, options2.htmlToTextOptions);
  const document2 = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">${html$1.replace(/<!DOCTYPE.*?>/, "")}`;
  if (options2?.pretty)
    return pretty(document2);
  return document2;
};
var init_node2 = __esm(() => {
  init_html();
  init_standalone();
  init_html_to_text();
  import_react = __toESM(require_react(), 1);
  import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  modifiedHtml = { ...exports_html };
  if (modifiedHtml.printers) {
    const previousPrint = modifiedHtml.printers.html.print;
    modifiedHtml.printers.html.print = (path2, options2, print, args) => {
      const node3 = getHtmlNode(path2);
      const rawPrintingResult = previousPrint(path2, options2, print, args);
      if (node3?.type === "ieConditionalComment" || node3?.kind === "ieConditionalComment")
        return recursivelyMapDoc(rawPrintingResult, (doc2) => {
          if (typeof doc2 === "object" && doc2.type === "line")
            return doc2.soft ? "" : " ";
          return doc2;
        });
      return rawPrintingResult;
    };
  }
  defaults2 = {
    endOfLine: "lf",
    tabWidth: 2,
    plugins: [modifiedHtml],
    bracketSameLine: true,
    parser: "html"
  };
  plainTextSelectors = [
    {
      selector: "img",
      format: "skip"
    },
    {
      selector: "[data-skip-in-text=true]",
      format: "skip"
    },
    {
      selector: "a",
      options: {
        linkBrackets: false,
        hideLinkHrefIfSameAsText: true
      }
    }
  ];
});

// ../../node_modules/.pnpm/@react-email+row@0.0.13_react@19.2.7/node_modules/@react-email/row/dist/index.mjs
var React15, import_jsx_runtime17, Row;
var init_dist16 = __esm(() => {
  React15 = __toESM(require_react(), 1);
  import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  Row = React15.forwardRef(({ children, style, ...props }, ref) => {
    return /* @__PURE__ */ import_jsx_runtime17.jsx("table", {
      align: "center",
      width: "100%",
      border: 0,
      cellPadding: "0",
      cellSpacing: "0",
      role: "presentation",
      ...props,
      ref,
      style,
      children: /* @__PURE__ */ import_jsx_runtime17.jsx("tbody", {
        style: { width: "100%" },
        children: /* @__PURE__ */ import_jsx_runtime17.jsx("tr", {
          style: { width: "100%" },
          children
        })
      })
    });
  });
  Row.displayName = "Row";
});

// ../../node_modules/.pnpm/@react-email+section@0.0.17_react@19.2.7/node_modules/@react-email/section/dist/index.mjs
var React16, import_jsx_runtime18, Section;
var init_dist17 = __esm(() => {
  React16 = __toESM(require_react(), 1);
  import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  Section = React16.forwardRef(({ children, style, ...props }, ref) => {
    return /* @__PURE__ */ import_jsx_runtime18.jsx("table", {
      align: "center",
      width: "100%",
      border: 0,
      cellPadding: "0",
      cellSpacing: "0",
      role: "presentation",
      ...props,
      ref,
      style,
      children: /* @__PURE__ */ import_jsx_runtime18.jsx("tbody", { children: /* @__PURE__ */ import_jsx_runtime18.jsx("tr", { children: /* @__PURE__ */ import_jsx_runtime18.jsx("td", { children }) }) })
    });
  });
  Section.displayName = "Section";
});

// ../../node_modules/.pnpm/@react-email+text@0.1.6_react@19.2.7/node_modules/@react-email/text/dist/index.mjs
function parseMarginValue(value) {
  if (typeof value === "number")
    return {
      marginTop: value,
      marginBottom: value,
      marginLeft: value,
      marginRight: value
    };
  if (typeof value === "string") {
    const values = value.toString().trim().split(/\s+/);
    if (values.length === 1)
      return {
        marginTop: values[0],
        marginBottom: values[0],
        marginLeft: values[0],
        marginRight: values[0]
      };
    if (values.length === 2)
      return {
        marginTop: values[0],
        marginRight: values[1],
        marginBottom: values[0],
        marginLeft: values[1]
      };
    if (values.length === 3)
      return {
        marginTop: values[0],
        marginRight: values[1],
        marginBottom: values[2],
        marginLeft: values[1]
      };
    if (values.length === 4)
      return {
        marginTop: values[0],
        marginRight: values[1],
        marginBottom: values[2],
        marginLeft: values[3]
      };
  }
  return {
    marginTop: undefined,
    marginBottom: undefined,
    marginLeft: undefined,
    marginRight: undefined
  };
}
function computeMargins(properties) {
  let result = {
    marginTop: undefined,
    marginRight: undefined,
    marginBottom: undefined,
    marginLeft: undefined
  };
  for (const [key, value] of Object.entries(properties))
    if (key === "margin")
      result = parseMarginValue(value);
    else if (key === "marginTop")
      result.marginTop = value;
    else if (key === "marginRight")
      result.marginRight = value;
    else if (key === "marginBottom")
      result.marginBottom = value;
    else if (key === "marginLeft")
      result.marginLeft = value;
  return result;
}
var React17, import_jsx_runtime19, Text3;
var init_dist18 = __esm(() => {
  React17 = __toESM(require_react(), 1);
  import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  Text3 = React17.forwardRef(({ style, ...props }, ref) => {
    const defaultMargins = {};
    if (style?.marginTop === undefined)
      defaultMargins.marginTop = "16px";
    if (style?.marginBottom === undefined)
      defaultMargins.marginBottom = "16px";
    const margins = computeMargins({
      ...defaultMargins,
      ...style
    });
    return /* @__PURE__ */ import_jsx_runtime19.jsx("p", {
      ...props,
      ref,
      style: {
        fontSize: "14px",
        lineHeight: "24px",
        ...style,
        ...margins
      }
    });
  });
  Text3.displayName = "Text";
});

// ../../node_modules/.pnpm/tailwindcss@4.3.1/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs
var l4;
var init_chunk_X4GG3EDV = __esm(() => {
  l4 = { inherit: "inherit", current: "currentcolor", transparent: "transparent", black: "#000", white: "#fff", slate: { 50: "oklch(98.4% 0.003 247.858)", 100: "oklch(96.8% 0.007 247.896)", 200: "oklch(92.9% 0.013 255.508)", 300: "oklch(86.9% 0.022 252.894)", 400: "oklch(70.4% 0.04 256.788)", 500: "oklch(55.4% 0.046 257.417)", 600: "oklch(44.6% 0.043 257.281)", 700: "oklch(37.2% 0.044 257.287)", 800: "oklch(27.9% 0.041 260.031)", 900: "oklch(20.8% 0.042 265.755)", 950: "oklch(12.9% 0.042 264.695)" }, gray: { 50: "oklch(98.5% 0.002 247.839)", 100: "oklch(96.7% 0.003 264.542)", 200: "oklch(92.8% 0.006 264.531)", 300: "oklch(87.2% 0.01 258.338)", 400: "oklch(70.7% 0.022 261.325)", 500: "oklch(55.1% 0.027 264.364)", 600: "oklch(44.6% 0.03 256.802)", 700: "oklch(37.3% 0.034 259.733)", 800: "oklch(27.8% 0.033 256.848)", 900: "oklch(21% 0.034 264.665)", 950: "oklch(13% 0.028 261.692)" }, zinc: { 50: "oklch(98.5% 0 0)", 100: "oklch(96.7% 0.001 286.375)", 200: "oklch(92% 0.004 286.32)", 300: "oklch(87.1% 0.006 286.286)", 400: "oklch(70.5% 0.015 286.067)", 500: "oklch(55.2% 0.016 285.938)", 600: "oklch(44.2% 0.017 285.786)", 700: "oklch(37% 0.013 285.805)", 800: "oklch(27.4% 0.006 286.033)", 900: "oklch(21% 0.006 285.885)", 950: "oklch(14.1% 0.005 285.823)" }, neutral: { 50: "oklch(98.5% 0 0)", 100: "oklch(97% 0 0)", 200: "oklch(92.2% 0 0)", 300: "oklch(87% 0 0)", 400: "oklch(70.8% 0 0)", 500: "oklch(55.6% 0 0)", 600: "oklch(43.9% 0 0)", 700: "oklch(37.1% 0 0)", 800: "oklch(26.9% 0 0)", 900: "oklch(20.5% 0 0)", 950: "oklch(14.5% 0 0)" }, stone: { 50: "oklch(98.5% 0.001 106.423)", 100: "oklch(97% 0.001 106.424)", 200: "oklch(92.3% 0.003 48.717)", 300: "oklch(86.9% 0.005 56.366)", 400: "oklch(70.9% 0.01 56.259)", 500: "oklch(55.3% 0.013 58.071)", 600: "oklch(44.4% 0.011 73.639)", 700: "oklch(37.4% 0.01 67.558)", 800: "oklch(26.8% 0.007 34.298)", 900: "oklch(21.6% 0.006 56.043)", 950: "oklch(14.7% 0.004 49.25)" }, mauve: { 50: "oklch(98.5% 0 0)", 100: "oklch(96% 0.003 325.6)", 200: "oklch(92.2% 0.005 325.62)", 300: "oklch(86.5% 0.012 325.68)", 400: "oklch(71.1% 0.019 323.02)", 500: "oklch(54.2% 0.034 322.5)", 600: "oklch(43.5% 0.029 321.78)", 700: "oklch(36.4% 0.029 323.89)", 800: "oklch(26.3% 0.024 320.12)", 900: "oklch(21.2% 0.019 322.12)", 950: "oklch(14.5% 0.008 326)" }, olive: { 50: "oklch(98.8% 0.003 106.5)", 100: "oklch(96.6% 0.005 106.5)", 200: "oklch(93% 0.007 106.5)", 300: "oklch(88% 0.011 106.6)", 400: "oklch(73.7% 0.021 106.9)", 500: "oklch(58% 0.031 107.3)", 600: "oklch(46.6% 0.025 107.3)", 700: "oklch(39.4% 0.023 107.4)", 800: "oklch(28.6% 0.016 107.4)", 900: "oklch(22.8% 0.013 107.4)", 950: "oklch(15.3% 0.006 107.1)" }, mist: { 50: "oklch(98.7% 0.002 197.1)", 100: "oklch(96.3% 0.002 197.1)", 200: "oklch(92.5% 0.005 214.3)", 300: "oklch(87.2% 0.007 219.6)", 400: "oklch(72.3% 0.014 214.4)", 500: "oklch(56% 0.021 213.5)", 600: "oklch(45% 0.017 213.2)", 700: "oklch(37.8% 0.015 216)", 800: "oklch(27.5% 0.011 216.9)", 900: "oklch(21.8% 0.008 223.9)", 950: "oklch(14.8% 0.004 228.8)" }, taupe: { 50: "oklch(98.6% 0.002 67.8)", 100: "oklch(96% 0.002 17.2)", 200: "oklch(92.2% 0.005 34.3)", 300: "oklch(86.8% 0.007 39.5)", 400: "oklch(71.4% 0.014 41.2)", 500: "oklch(54.7% 0.021 43.1)", 600: "oklch(43.8% 0.017 39.3)", 700: "oklch(36.7% 0.016 35.7)", 800: "oklch(26.8% 0.011 36.5)", 900: "oklch(21.4% 0.009 43.1)", 950: "oklch(14.7% 0.004 49.3)" }, red: { 50: "oklch(97.1% 0.013 17.38)", 100: "oklch(93.6% 0.032 17.717)", 200: "oklch(88.5% 0.062 18.334)", 300: "oklch(80.8% 0.114 19.571)", 400: "oklch(70.4% 0.191 22.216)", 500: "oklch(63.7% 0.237 25.331)", 600: "oklch(57.7% 0.245 27.325)", 700: "oklch(50.5% 0.213 27.518)", 800: "oklch(44.4% 0.177 26.899)", 900: "oklch(39.6% 0.141 25.723)", 950: "oklch(25.8% 0.092 26.042)" }, orange: { 50: "oklch(98% 0.016 73.684)", 100: "oklch(95.4% 0.038 75.164)", 200: "oklch(90.1% 0.076 70.697)", 300: "oklch(83.7% 0.128 66.29)", 400: "oklch(75% 0.183 55.934)", 500: "oklch(70.5% 0.213 47.604)", 600: "oklch(64.6% 0.222 41.116)", 700: "oklch(55.3% 0.195 38.402)", 800: "oklch(47% 0.157 37.304)", 900: "oklch(40.8% 0.123 38.172)", 950: "oklch(26.6% 0.079 36.259)" }, amber: { 50: "oklch(98.7% 0.022 95.277)", 100: "oklch(96.2% 0.059 95.617)", 200: "oklch(92.4% 0.12 95.746)", 300: "oklch(87.9% 0.169 91.605)", 400: "oklch(82.8% 0.189 84.429)", 500: "oklch(76.9% 0.188 70.08)", 600: "oklch(66.6% 0.179 58.318)", 700: "oklch(55.5% 0.163 48.998)", 800: "oklch(47.3% 0.137 46.201)", 900: "oklch(41.4% 0.112 45.904)", 950: "oklch(27.9% 0.077 45.635)" }, yellow: { 50: "oklch(98.7% 0.026 102.212)", 100: "oklch(97.3% 0.071 103.193)", 200: "oklch(94.5% 0.129 101.54)", 300: "oklch(90.5% 0.182 98.111)", 400: "oklch(85.2% 0.199 91.936)", 500: "oklch(79.5% 0.184 86.047)", 600: "oklch(68.1% 0.162 75.834)", 700: "oklch(55.4% 0.135 66.442)", 800: "oklch(47.6% 0.114 61.907)", 900: "oklch(42.1% 0.095 57.708)", 950: "oklch(28.6% 0.066 53.813)" }, lime: { 50: "oklch(98.6% 0.031 120.757)", 100: "oklch(96.7% 0.067 122.328)", 200: "oklch(93.8% 0.127 124.321)", 300: "oklch(89.7% 0.196 126.665)", 400: "oklch(84.1% 0.238 128.85)", 500: "oklch(76.8% 0.233 130.85)", 600: "oklch(64.8% 0.2 131.684)", 700: "oklch(53.2% 0.157 131.589)", 800: "oklch(45.3% 0.124 130.933)", 900: "oklch(40.5% 0.101 131.063)", 950: "oklch(27.4% 0.072 132.109)" }, green: { 50: "oklch(98.2% 0.018 155.826)", 100: "oklch(96.2% 0.044 156.743)", 200: "oklch(92.5% 0.084 155.995)", 300: "oklch(87.1% 0.15 154.449)", 400: "oklch(79.2% 0.209 151.711)", 500: "oklch(72.3% 0.219 149.579)", 600: "oklch(62.7% 0.194 149.214)", 700: "oklch(52.7% 0.154 150.069)", 800: "oklch(44.8% 0.119 151.328)", 900: "oklch(39.3% 0.095 152.535)", 950: "oklch(26.6% 0.065 152.934)" }, emerald: { 50: "oklch(97.9% 0.021 166.113)", 100: "oklch(95% 0.052 163.051)", 200: "oklch(90.5% 0.093 164.15)", 300: "oklch(84.5% 0.143 164.978)", 400: "oklch(76.5% 0.177 163.223)", 500: "oklch(69.6% 0.17 162.48)", 600: "oklch(59.6% 0.145 163.225)", 700: "oklch(50.8% 0.118 165.612)", 800: "oklch(43.2% 0.095 166.913)", 900: "oklch(37.8% 0.077 168.94)", 950: "oklch(26.2% 0.051 172.552)" }, teal: { 50: "oklch(98.4% 0.014 180.72)", 100: "oklch(95.3% 0.051 180.801)", 200: "oklch(91% 0.096 180.426)", 300: "oklch(85.5% 0.138 181.071)", 400: "oklch(77.7% 0.152 181.912)", 500: "oklch(70.4% 0.14 182.503)", 600: "oklch(60% 0.118 184.704)", 700: "oklch(51.1% 0.096 186.391)", 800: "oklch(43.7% 0.078 188.216)", 900: "oklch(38.6% 0.063 188.416)", 950: "oklch(27.7% 0.046 192.524)" }, cyan: { 50: "oklch(98.4% 0.019 200.873)", 100: "oklch(95.6% 0.045 203.388)", 200: "oklch(91.7% 0.08 205.041)", 300: "oklch(86.5% 0.127 207.078)", 400: "oklch(78.9% 0.154 211.53)", 500: "oklch(71.5% 0.143 215.221)", 600: "oklch(60.9% 0.126 221.723)", 700: "oklch(52% 0.105 223.128)", 800: "oklch(45% 0.085 224.283)", 900: "oklch(39.8% 0.07 227.392)", 950: "oklch(30.2% 0.056 229.695)" }, sky: { 50: "oklch(97.7% 0.013 236.62)", 100: "oklch(95.1% 0.026 236.824)", 200: "oklch(90.1% 0.058 230.902)", 300: "oklch(82.8% 0.111 230.318)", 400: "oklch(74.6% 0.16 232.661)", 500: "oklch(68.5% 0.169 237.323)", 600: "oklch(58.8% 0.158 241.966)", 700: "oklch(50% 0.134 242.749)", 800: "oklch(44.3% 0.11 240.79)", 900: "oklch(39.1% 0.09 240.876)", 950: "oklch(29.3% 0.066 243.157)" }, blue: { 50: "oklch(97% 0.014 254.604)", 100: "oklch(93.2% 0.032 255.585)", 200: "oklch(88.2% 0.059 254.128)", 300: "oklch(80.9% 0.105 251.813)", 400: "oklch(70.7% 0.165 254.624)", 500: "oklch(62.3% 0.214 259.815)", 600: "oklch(54.6% 0.245 262.881)", 700: "oklch(48.8% 0.243 264.376)", 800: "oklch(42.4% 0.199 265.638)", 900: "oklch(37.9% 0.146 265.522)", 950: "oklch(28.2% 0.091 267.935)" }, indigo: { 50: "oklch(96.2% 0.018 272.314)", 100: "oklch(93% 0.034 272.788)", 200: "oklch(87% 0.065 274.039)", 300: "oklch(78.5% 0.115 274.713)", 400: "oklch(67.3% 0.182 276.935)", 500: "oklch(58.5% 0.233 277.117)", 600: "oklch(51.1% 0.262 276.966)", 700: "oklch(45.7% 0.24 277.023)", 800: "oklch(39.8% 0.195 277.366)", 900: "oklch(35.9% 0.144 278.697)", 950: "oklch(25.7% 0.09 281.288)" }, violet: { 50: "oklch(96.9% 0.016 293.756)", 100: "oklch(94.3% 0.029 294.588)", 200: "oklch(89.4% 0.057 293.283)", 300: "oklch(81.1% 0.111 293.571)", 400: "oklch(70.2% 0.183 293.541)", 500: "oklch(60.6% 0.25 292.717)", 600: "oklch(54.1% 0.281 293.009)", 700: "oklch(49.1% 0.27 292.581)", 800: "oklch(43.2% 0.232 292.759)", 900: "oklch(38% 0.189 293.745)", 950: "oklch(28.3% 0.141 291.089)" }, purple: { 50: "oklch(97.7% 0.014 308.299)", 100: "oklch(94.6% 0.033 307.174)", 200: "oklch(90.2% 0.063 306.703)", 300: "oklch(82.7% 0.119 306.383)", 400: "oklch(71.4% 0.203 305.504)", 500: "oklch(62.7% 0.265 303.9)", 600: "oklch(55.8% 0.288 302.321)", 700: "oklch(49.6% 0.265 301.924)", 800: "oklch(43.8% 0.218 303.724)", 900: "oklch(38.1% 0.176 304.987)", 950: "oklch(29.1% 0.149 302.717)" }, fuchsia: { 50: "oklch(97.7% 0.017 320.058)", 100: "oklch(95.2% 0.037 318.852)", 200: "oklch(90.3% 0.076 319.62)", 300: "oklch(83.3% 0.145 321.434)", 400: "oklch(74% 0.238 322.16)", 500: "oklch(66.7% 0.295 322.15)", 600: "oklch(59.1% 0.293 322.896)", 700: "oklch(51.8% 0.253 323.949)", 800: "oklch(45.2% 0.211 324.591)", 900: "oklch(40.1% 0.17 325.612)", 950: "oklch(29.3% 0.136 325.661)" }, pink: { 50: "oklch(97.1% 0.014 343.198)", 100: "oklch(94.8% 0.028 342.258)", 200: "oklch(89.9% 0.061 343.231)", 300: "oklch(82.3% 0.12 346.018)", 400: "oklch(71.8% 0.202 349.761)", 500: "oklch(65.6% 0.241 354.308)", 600: "oklch(59.2% 0.249 0.584)", 700: "oklch(52.5% 0.223 3.958)", 800: "oklch(45.9% 0.187 3.815)", 900: "oklch(40.8% 0.153 2.432)", 950: "oklch(28.4% 0.109 3.907)" }, rose: { 50: "oklch(96.9% 0.015 12.422)", 100: "oklch(94.1% 0.03 12.58)", 200: "oklch(89.2% 0.058 10.001)", 300: "oklch(81% 0.117 11.638)", 400: "oklch(71.2% 0.194 13.428)", 500: "oklch(64.5% 0.246 16.439)", 600: "oklch(58.6% 0.253 17.585)", 700: "oklch(51.4% 0.222 16.935)", 800: "oklch(45.5% 0.188 13.697)", 900: "oklch(41% 0.159 10.272)", 950: "oklch(27.1% 0.105 12.094)" } };
});

// ../../node_modules/.pnpm/tailwindcss@4.3.1/node_modules/tailwindcss/dist/chunk-XVOTX5KS.mjs
function R4(e2) {
  return e2.charCodeAt(0) === 35 || U3.test(e2) || S3.has(e2.toLowerCase());
}
function ne3(e2) {
  return S3.has(e2.toLowerCase());
}
function b4(e2) {
  return e2.indexOf("(") !== -1 && A2.some((t2) => e2.includes(`${t2}(`));
}
function ie3(e2) {
  if (!A2.some((n3) => e2.includes(n3)))
    return e2;
  let t2 = "", r2 = [], s3 = null, m2 = null;
  for (let n3 = 0;n3 < e2.length; n3++) {
    let a = e2.charCodeAt(n3);
    if (a >= 48 && a <= 57 || s3 !== null && (a === 37 || a >= 97 && a <= 122 || a >= 65 && a <= 90) ? s3 = n3 : (m2 = s3, s3 = null), a === 40) {
      t2 += e2[n3];
      let i = n3;
      for (let p2 = n3 - 1;p2 >= 0; p2--) {
        let c2 = e2.charCodeAt(p2);
        if (c2 >= 48 && c2 <= 57)
          i = p2;
        else if (c2 >= 97 && c2 <= 122)
          i = p2;
        else
          break;
      }
      let o2 = e2.slice(i, n3);
      if (A2.includes(o2)) {
        r2.unshift(true);
        continue;
      } else if (r2[0] && o2 === "") {
        r2.unshift(true);
        continue;
      }
      r2.unshift(false);
      continue;
    } else if (a === 41)
      t2 += e2[n3], r2.shift();
    else if (a === 44 && r2[0]) {
      t2 += ", ";
      continue;
    } else {
      if (a === 32 && r2[0] && t2.charCodeAt(t2.length - 1) === 32)
        continue;
      if ((a === 43 || a === 42 || a === 47 || a === 45) && r2[0]) {
        let i = t2.trimEnd(), o2 = i.charCodeAt(i.length - 1), p2 = i.charCodeAt(i.length - 2), c2 = e2.charCodeAt(n3 + 1);
        if ((o2 === 101 || o2 === 69) && p2 >= 48 && p2 <= 57) {
          t2 += e2[n3];
          continue;
        } else if (o2 === 43 || o2 === 42 || o2 === 47 || o2 === 45) {
          t2 += e2[n3];
          continue;
        } else if (o2 === 40 || o2 === 44) {
          t2 += e2[n3];
          continue;
        } else
          e2.charCodeAt(n3 - 1) === 32 ? t2 += `${e2[n3]} ` : o2 >= 48 && o2 <= 57 || c2 >= 48 && c2 <= 57 || o2 === 41 || c2 === 40 || c2 === 43 || c2 === 42 || c2 === 47 || c2 === 45 || m2 !== null && m2 === n3 - 1 ? t2 += ` ${e2[n3]} ` : t2 += e2[n3];
      } else
        t2 += e2[n3];
    }
  }
  return t2;
}
function d2(e2, t2) {
  let r2 = 0, s3 = [], m2 = 0, n3 = e2.length, a = t2.charCodeAt(0);
  for (let i = 0;i < n3; i++) {
    let o2 = e2.charCodeAt(i);
    if (r2 === 0 && o2 === a) {
      s3.push(e2.slice(m2, i)), m2 = i + 1;
      continue;
    }
    switch (o2) {
      case 92:
        i += 1;
        break;
      case 39:
      case 34:
        for (;++i < n3; ) {
          let p2 = e2.charCodeAt(i);
          if (p2 === 92) {
            i += 1;
            continue;
          }
          if (p2 === o2)
            break;
        }
        break;
      case 40:
        E[r2] = 41, r2++;
        break;
      case 91:
        E[r2] = 93, r2++;
        break;
      case 123:
        E[r2] = 125, r2++;
        break;
      case 93:
      case 125:
      case 41:
        r2 > 0 && o2 === E[r2 - 1] && r2--;
        break;
    }
  }
  return s3.push(e2.slice(m2)), s3;
}
function pe2(e2, t2) {
  if (e2.startsWith("var("))
    return null;
  for (let r2 of t2)
    if (P3[r2]?.(e2))
      return r2;
  return null;
}
function N4(e2) {
  return z3.test(e2);
}
function T3(e2) {
  return d2(e2, " ").every((t2) => y3(t2) || v4(t2) || t2 === "thin" || t2 === "medium" || t2 === "thick");
}
function F2(e2) {
  let t2 = 0;
  for (let r2 of d2(e2, ","))
    if (!r2.startsWith("var(")) {
      if (N4(r2)) {
        t2 += 1;
        continue;
      }
      if (I4.test(r2)) {
        t2 += 1;
        continue;
      }
      if (D3.test(r2)) {
        t2 += 1;
        continue;
      }
      return false;
    }
  return t2 > 0;
}
function H3(e2) {
  return e2 === "serif" || e2 === "sans-serif" || e2 === "monospace" || e2 === "cursive" || e2 === "fantasy" || e2 === "system-ui" || e2 === "ui-serif" || e2 === "ui-sans-serif" || e2 === "ui-monospace" || e2 === "ui-rounded" || e2 === "math" || e2 === "emoji" || e2 === "fangsong";
}
function M2(e2) {
  let t2 = 0;
  for (let r2 of d2(e2, ",")) {
    let s3 = r2.charCodeAt(0);
    if (s3 >= 48 && s3 <= 57)
      return false;
    r2.startsWith("var(") || (t2 += 1);
  }
  return t2 > 0;
}
function $3(e2) {
  return e2 === "xx-small" || e2 === "x-small" || e2 === "small" || e2 === "medium" || e2 === "large" || e2 === "x-large" || e2 === "xx-large" || e2 === "xxx-large";
}
function W3(e2) {
  return e2 === "larger" || e2 === "smaller";
}
function v4(e2) {
  return B2.test(e2) || b4(e2);
}
function C2(e2) {
  return q3.test(e2) || b4(e2);
}
function G3(e2) {
  return V4.test(e2) || b4(e2);
}
function y3(e2) {
  return j3.test(e2) || b4(e2);
}
function K3(e2) {
  let t2 = 0;
  for (let r2 of d2(e2, " ")) {
    if (r2 === "center" || r2 === "top" || r2 === "right" || r2 === "bottom" || r2 === "left") {
      t2 += 1;
      continue;
    }
    if (!r2.startsWith("var(")) {
      if (y3(r2) || C2(r2)) {
        t2 += 1;
        continue;
      }
      return false;
    }
  }
  return t2 > 0;
}
function Y3(e2) {
  let t2 = 0;
  for (let r2 of d2(e2, ",")) {
    if (r2 === "cover" || r2 === "contain") {
      t2 += 1;
      continue;
    }
    let s3 = d2(r2, " ");
    if (s3.length !== 1 && s3.length !== 2)
      return false;
    if (s3.every((m2) => m2 === "auto" || y3(m2) || C2(m2))) {
      t2 += 1;
      continue;
    }
  }
  return t2 > 0;
}
function X3(e2) {
  return J2.test(e2);
}
function te3(e2) {
  return ee2.test(e2);
}
function u(e2) {
  let t2 = Number(e2);
  return Number.isInteger(t2) && t2 >= 0 && String(t2) === String(e2);
}
function ge3(e2) {
  let t2 = Number(e2);
  return Number.isInteger(t2) && t2 > 0 && String(t2) === String(e2);
}
function ue3(e2) {
  return O4(e2, 0.25);
}
function de3(e2) {
  return O4(e2, 0.25);
}
function O4(e2, t2) {
  let r2 = Number(e2);
  return r2 >= 0 && r2 % t2 === 0 && String(r2) === String(e2);
}
function h9(e2) {
  return { __BARE_VALUE__: e2 };
}
var S3, U3, A2, E, P3, z3, D3, I4, x3, B2, q3, V4, Z2, j3, Q2, J2, ee2, g2, l5, f3, L3, w3, re2, _4, Ee3;
var init_chunk_XVOTX5KS = __esm(() => {
  init_chunk_X4GG3EDV();
  S3 = new Set(["black", "silver", "gray", "white", "maroon", "red", "purple", "fuchsia", "green", "lime", "olive", "yellow", "navy", "blue", "teal", "aqua", "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen", "transparent", "currentcolor", "canvas", "canvastext", "linktext", "visitedtext", "activetext", "buttonface", "buttontext", "buttonborder", "field", "fieldtext", "highlight", "highlighttext", "selecteditem", "selecteditemtext", "mark", "marktext", "graytext", "accentcolor", "accentcolortext"]);
  U3 = /^(rgba?|hsla?|hwb|color|(ok)?(lab|lch)|light-dark|color-mix)\(/i;
  A2 = ["calc", "min", "max", "clamp", "mod", "rem", "sin", "cos", "tan", "asin", "acos", "atan", "atan2", "pow", "sqrt", "hypot", "log", "exp", "round"];
  E = new Uint8Array(256);
  P3 = { color: R4, length: y3, percentage: C2, ratio: G3, number: v4, integer: u, url: N4, position: K3, "bg-size": Y3, "line-width": T3, image: F2, "family-name": M2, "generic-name": H3, "absolute-size": $3, "relative-size": W3, angle: X3, vector: te3 };
  z3 = /^url\(.*\)$/;
  D3 = /^(?:element|image|cross-fade|image-set)\(/;
  I4 = /^(repeating-)?(conic|linear|radial)-gradient\(/;
  x3 = /[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/;
  B2 = new RegExp(`^${x3.source}$`);
  q3 = new RegExp(`^${x3.source}%$`);
  V4 = new RegExp(`^${x3.source}\\s*/\\s*${x3.source}$`);
  Z2 = ["cm", "mm", "Q", "in", "pc", "pt", "px", "em", "ex", "ch", "rem", "lh", "rlh", "vw", "vh", "vmin", "vmax", "vb", "vi", "svw", "svh", "lvw", "lvh", "dvw", "dvh", "cqw", "cqh", "cqi", "cqb", "cqmin", "cqmax"];
  j3 = new RegExp(`^${x3.source}(${Z2.join("|")})$`);
  Q2 = ["deg", "rad", "grad", "turn"];
  J2 = new RegExp(`^${x3.source}(${Q2.join("|")})$`);
  ee2 = new RegExp(`^${x3.source} +${x3.source} +${x3.source}$`);
  g2 = h9((e2) => {
    if (u(e2.value))
      return e2.value;
  });
  l5 = h9((e2) => {
    if (u(e2.value))
      return `${e2.value}%`;
  });
  f3 = h9((e2) => {
    if (u(e2.value))
      return `${e2.value}px`;
  });
  L3 = h9((e2) => {
    if (u(e2.value))
      return `${e2.value}ms`;
  });
  w3 = h9((e2) => {
    if (u(e2.value))
      return `${e2.value}deg`;
  });
  re2 = h9((e2) => {
    if (e2.fraction === null)
      return;
    let [t2, r2] = d2(e2.fraction, "/");
    if (!(!u(t2) || !u(r2)))
      return e2.fraction;
  });
  _4 = h9((e2) => {
    if (u(Number(e2.value)))
      return `repeat(${e2.value}, minmax(0, 1fr))`;
  });
  Ee3 = { accentColor: ({ theme: e2 }) => e2("colors"), animation: { none: "none", spin: "spin 1s linear infinite", ping: "ping 1s cubic-bezier(0, 0, 0.2, 1) infinite", pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite", bounce: "bounce 1s infinite" }, aria: { busy: 'busy="true"', checked: 'checked="true"', disabled: 'disabled="true"', expanded: 'expanded="true"', hidden: 'hidden="true"', pressed: 'pressed="true"', readonly: 'readonly="true"', required: 'required="true"', selected: 'selected="true"' }, aspectRatio: { auto: "auto", square: "1 / 1", video: "16 / 9", ...re2 }, backdropBlur: ({ theme: e2 }) => e2("blur"), backdropBrightness: ({ theme: e2 }) => ({ ...e2("brightness"), ...l5 }), backdropContrast: ({ theme: e2 }) => ({ ...e2("contrast"), ...l5 }), backdropGrayscale: ({ theme: e2 }) => ({ ...e2("grayscale"), ...l5 }), backdropHueRotate: ({ theme: e2 }) => ({ ...e2("hueRotate"), ...w3 }), backdropInvert: ({ theme: e2 }) => ({ ...e2("invert"), ...l5 }), backdropOpacity: ({ theme: e2 }) => ({ ...e2("opacity"), ...l5 }), backdropSaturate: ({ theme: e2 }) => ({ ...e2("saturate"), ...l5 }), backdropSepia: ({ theme: e2 }) => ({ ...e2("sepia"), ...l5 }), backgroundColor: ({ theme: e2 }) => e2("colors"), backgroundImage: { none: "none", "gradient-to-t": "linear-gradient(to top, var(--tw-gradient-stops))", "gradient-to-tr": "linear-gradient(to top right, var(--tw-gradient-stops))", "gradient-to-r": "linear-gradient(to right, var(--tw-gradient-stops))", "gradient-to-br": "linear-gradient(to bottom right, var(--tw-gradient-stops))", "gradient-to-b": "linear-gradient(to bottom, var(--tw-gradient-stops))", "gradient-to-bl": "linear-gradient(to bottom left, var(--tw-gradient-stops))", "gradient-to-l": "linear-gradient(to left, var(--tw-gradient-stops))", "gradient-to-tl": "linear-gradient(to top left, var(--tw-gradient-stops))" }, backgroundOpacity: ({ theme: e2 }) => e2("opacity"), backgroundPosition: { bottom: "bottom", center: "center", left: "left", "left-bottom": "left bottom", "left-top": "left top", right: "right", "right-bottom": "right bottom", "right-top": "right top", top: "top" }, backgroundSize: { auto: "auto", cover: "cover", contain: "contain" }, blur: { 0: "0", none: "", sm: "4px", DEFAULT: "8px", md: "12px", lg: "16px", xl: "24px", "2xl": "40px", "3xl": "64px" }, borderColor: ({ theme: e2 }) => ({ DEFAULT: "currentcolor", ...e2("colors") }), borderOpacity: ({ theme: e2 }) => e2("opacity"), borderRadius: { none: "0px", sm: "0.125rem", DEFAULT: "0.25rem", md: "0.375rem", lg: "0.5rem", xl: "0.75rem", "2xl": "1rem", "3xl": "1.5rem", full: "9999px" }, borderSpacing: ({ theme: e2 }) => e2("spacing"), borderWidth: { DEFAULT: "1px", 0: "0px", 2: "2px", 4: "4px", 8: "8px", ...f3 }, boxShadow: { sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)", DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)", md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)", lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)", xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)", "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)", inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)", none: "none" }, boxShadowColor: ({ theme: e2 }) => e2("colors"), brightness: { 0: "0", 50: ".5", 75: ".75", 90: ".9", 95: ".95", 100: "1", 105: "1.05", 110: "1.1", 125: "1.25", 150: "1.5", 200: "2", ...l5 }, caretColor: ({ theme: e2 }) => e2("colors"), colors: () => ({ ...l4 }), columns: { auto: "auto", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", "3xs": "16rem", "2xs": "18rem", xs: "20rem", sm: "24rem", md: "28rem", lg: "32rem", xl: "36rem", "2xl": "42rem", "3xl": "48rem", "4xl": "56rem", "5xl": "64rem", "6xl": "72rem", "7xl": "80rem", ...g2 }, container: {}, content: { none: "none" }, contrast: { 0: "0", 50: ".5", 75: ".75", 100: "1", 125: "1.25", 150: "1.5", 200: "2", ...l5 }, cursor: { auto: "auto", default: "default", pointer: "pointer", wait: "wait", text: "text", move: "move", help: "help", "not-allowed": "not-allowed", none: "none", "context-menu": "context-menu", progress: "progress", cell: "cell", crosshair: "crosshair", "vertical-text": "vertical-text", alias: "alias", copy: "copy", "no-drop": "no-drop", grab: "grab", grabbing: "grabbing", "all-scroll": "all-scroll", "col-resize": "col-resize", "row-resize": "row-resize", "n-resize": "n-resize", "e-resize": "e-resize", "s-resize": "s-resize", "w-resize": "w-resize", "ne-resize": "ne-resize", "nw-resize": "nw-resize", "se-resize": "se-resize", "sw-resize": "sw-resize", "ew-resize": "ew-resize", "ns-resize": "ns-resize", "nesw-resize": "nesw-resize", "nwse-resize": "nwse-resize", "zoom-in": "zoom-in", "zoom-out": "zoom-out" }, divideColor: ({ theme: e2 }) => e2("borderColor"), divideOpacity: ({ theme: e2 }) => e2("borderOpacity"), divideWidth: ({ theme: e2 }) => ({ ...e2("borderWidth"), ...f3 }), dropShadow: { sm: "0 1px 1px rgb(0 0 0 / 0.05)", DEFAULT: ["0 1px 2px rgb(0 0 0 / 0.1)", "0 1px 1px rgb(0 0 0 / 0.06)"], md: ["0 4px 3px rgb(0 0 0 / 0.07)", "0 2px 2px rgb(0 0 0 / 0.06)"], lg: ["0 10px 8px rgb(0 0 0 / 0.04)", "0 4px 3px rgb(0 0 0 / 0.1)"], xl: ["0 20px 13px rgb(0 0 0 / 0.03)", "0 8px 5px rgb(0 0 0 / 0.08)"], "2xl": "0 25px 25px rgb(0 0 0 / 0.15)", none: "0 0 #0000" }, fill: ({ theme: e2 }) => e2("colors"), flex: { 1: "1 1 0%", auto: "1 1 auto", initial: "0 1 auto", none: "none" }, flexBasis: ({ theme: e2 }) => ({ auto: "auto", "1/2": "50%", "1/3": "33.333333%", "2/3": "66.666667%", "1/4": "25%", "2/4": "50%", "3/4": "75%", "1/5": "20%", "2/5": "40%", "3/5": "60%", "4/5": "80%", "1/6": "16.666667%", "2/6": "33.333333%", "3/6": "50%", "4/6": "66.666667%", "5/6": "83.333333%", "1/12": "8.333333%", "2/12": "16.666667%", "3/12": "25%", "4/12": "33.333333%", "5/12": "41.666667%", "6/12": "50%", "7/12": "58.333333%", "8/12": "66.666667%", "9/12": "75%", "10/12": "83.333333%", "11/12": "91.666667%", full: "100%", ...e2("spacing") }), flexGrow: { 0: "0", DEFAULT: "1", ...g2 }, flexShrink: { 0: "0", DEFAULT: "1", ...g2 }, fontFamily: { sans: ["ui-sans-serif", "system-ui", "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"', '"Noto Color Emoji"'], serif: ["ui-serif", "Georgia", "Cambria", '"Times New Roman"', "Times", "serif"], mono: ["ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", '"Liberation Mono"', '"Courier New"', "monospace"] }, fontSize: { xs: ["0.75rem", { lineHeight: "1rem" }], sm: ["0.875rem", { lineHeight: "1.25rem" }], base: ["1rem", { lineHeight: "1.5rem" }], lg: ["1.125rem", { lineHeight: "1.75rem" }], xl: ["1.25rem", { lineHeight: "1.75rem" }], "2xl": ["1.5rem", { lineHeight: "2rem" }], "3xl": ["1.875rem", { lineHeight: "2.25rem" }], "4xl": ["2.25rem", { lineHeight: "2.5rem" }], "5xl": ["3rem", { lineHeight: "1" }], "6xl": ["3.75rem", { lineHeight: "1" }], "7xl": ["4.5rem", { lineHeight: "1" }], "8xl": ["6rem", { lineHeight: "1" }], "9xl": ["8rem", { lineHeight: "1" }] }, fontWeight: { thin: "100", extralight: "200", light: "300", normal: "400", medium: "500", semibold: "600", bold: "700", extrabold: "800", black: "900" }, gap: ({ theme: e2 }) => e2("spacing"), gradientColorStops: ({ theme: e2 }) => e2("colors"), gradientColorStopPositions: { "0%": "0%", "5%": "5%", "10%": "10%", "15%": "15%", "20%": "20%", "25%": "25%", "30%": "30%", "35%": "35%", "40%": "40%", "45%": "45%", "50%": "50%", "55%": "55%", "60%": "60%", "65%": "65%", "70%": "70%", "75%": "75%", "80%": "80%", "85%": "85%", "90%": "90%", "95%": "95%", "100%": "100%", ...l5 }, grayscale: { 0: "0", DEFAULT: "100%", ...l5 }, gridAutoColumns: { auto: "auto", min: "min-content", max: "max-content", fr: "minmax(0, 1fr)" }, gridAutoRows: { auto: "auto", min: "min-content", max: "max-content", fr: "minmax(0, 1fr)" }, gridColumn: { auto: "auto", "span-1": "span 1 / span 1", "span-2": "span 2 / span 2", "span-3": "span 3 / span 3", "span-4": "span 4 / span 4", "span-5": "span 5 / span 5", "span-6": "span 6 / span 6", "span-7": "span 7 / span 7", "span-8": "span 8 / span 8", "span-9": "span 9 / span 9", "span-10": "span 10 / span 10", "span-11": "span 11 / span 11", "span-12": "span 12 / span 12", "span-full": "1 / -1" }, gridColumnEnd: { auto: "auto", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", 13: "13", ...g2 }, gridColumnStart: { auto: "auto", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", 13: "13", ...g2 }, gridRow: { auto: "auto", "span-1": "span 1 / span 1", "span-2": "span 2 / span 2", "span-3": "span 3 / span 3", "span-4": "span 4 / span 4", "span-5": "span 5 / span 5", "span-6": "span 6 / span 6", "span-7": "span 7 / span 7", "span-8": "span 8 / span 8", "span-9": "span 9 / span 9", "span-10": "span 10 / span 10", "span-11": "span 11 / span 11", "span-12": "span 12 / span 12", "span-full": "1 / -1" }, gridRowEnd: { auto: "auto", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", 13: "13", ...g2 }, gridRowStart: { auto: "auto", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", 13: "13", ...g2 }, gridTemplateColumns: { none: "none", subgrid: "subgrid", 1: "repeat(1, minmax(0, 1fr))", 2: "repeat(2, minmax(0, 1fr))", 3: "repeat(3, minmax(0, 1fr))", 4: "repeat(4, minmax(0, 1fr))", 5: "repeat(5, minmax(0, 1fr))", 6: "repeat(6, minmax(0, 1fr))", 7: "repeat(7, minmax(0, 1fr))", 8: "repeat(8, minmax(0, 1fr))", 9: "repeat(9, minmax(0, 1fr))", 10: "repeat(10, minmax(0, 1fr))", 11: "repeat(11, minmax(0, 1fr))", 12: "repeat(12, minmax(0, 1fr))", ..._4 }, gridTemplateRows: { none: "none", subgrid: "subgrid", 1: "repeat(1, minmax(0, 1fr))", 2: "repeat(2, minmax(0, 1fr))", 3: "repeat(3, minmax(0, 1fr))", 4: "repeat(4, minmax(0, 1fr))", 5: "repeat(5, minmax(0, 1fr))", 6: "repeat(6, minmax(0, 1fr))", 7: "repeat(7, minmax(0, 1fr))", 8: "repeat(8, minmax(0, 1fr))", 9: "repeat(9, minmax(0, 1fr))", 10: "repeat(10, minmax(0, 1fr))", 11: "repeat(11, minmax(0, 1fr))", 12: "repeat(12, minmax(0, 1fr))", ..._4 }, height: ({ theme: e2 }) => ({ auto: "auto", "1/2": "50%", "1/3": "33.333333%", "2/3": "66.666667%", "1/4": "25%", "2/4": "50%", "3/4": "75%", "1/5": "20%", "2/5": "40%", "3/5": "60%", "4/5": "80%", "1/6": "16.666667%", "2/6": "33.333333%", "3/6": "50%", "4/6": "66.666667%", "5/6": "83.333333%", full: "100%", screen: "100vh", svh: "100svh", lvh: "100lvh", dvh: "100dvh", min: "min-content", max: "max-content", fit: "fit-content", ...e2("spacing") }), hueRotate: { 0: "0deg", 15: "15deg", 30: "30deg", 60: "60deg", 90: "90deg", 180: "180deg", ...w3 }, inset: ({ theme: e2 }) => ({ auto: "auto", "1/2": "50%", "1/3": "33.333333%", "2/3": "66.666667%", "1/4": "25%", "2/4": "50%", "3/4": "75%", full: "100%", ...e2("spacing") }), invert: { 0: "0", DEFAULT: "100%", ...l5 }, keyframes: { spin: { to: { transform: "rotate(360deg)" } }, ping: { "75%, 100%": { transform: "scale(2)", opacity: "0" } }, pulse: { "50%": { opacity: ".5" } }, bounce: { "0%, 100%": { transform: "translateY(-25%)", animationTimingFunction: "cubic-bezier(0.8,0,1,1)" }, "50%": { transform: "none", animationTimingFunction: "cubic-bezier(0,0,0.2,1)" } } }, letterSpacing: { tighter: "-0.05em", tight: "-0.025em", normal: "0em", wide: "0.025em", wider: "0.05em", widest: "0.1em" }, lineHeight: { none: "1", tight: "1.25", snug: "1.375", normal: "1.5", relaxed: "1.625", loose: "2", 3: ".75rem", 4: "1rem", 5: "1.25rem", 6: "1.5rem", 7: "1.75rem", 8: "2rem", 9: "2.25rem", 10: "2.5rem" }, listStyleType: { none: "none", disc: "disc", decimal: "decimal" }, listStyleImage: { none: "none" }, margin: ({ theme: e2 }) => ({ auto: "auto", ...e2("spacing") }), lineClamp: { 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", ...g2 }, maxHeight: ({ theme: e2 }) => ({ none: "none", full: "100%", screen: "100vh", svh: "100svh", lvh: "100lvh", dvh: "100dvh", min: "min-content", max: "max-content", fit: "fit-content", ...e2("spacing") }), maxWidth: ({ theme: e2 }) => ({ none: "none", xs: "20rem", sm: "24rem", md: "28rem", lg: "32rem", xl: "36rem", "2xl": "42rem", "3xl": "48rem", "4xl": "56rem", "5xl": "64rem", "6xl": "72rem", "7xl": "80rem", full: "100%", min: "min-content", max: "max-content", fit: "fit-content", prose: "65ch", ...e2("spacing") }), minHeight: ({ theme: e2 }) => ({ full: "100%", screen: "100vh", svh: "100svh", lvh: "100lvh", dvh: "100dvh", min: "min-content", max: "max-content", fit: "fit-content", ...e2("spacing") }), minWidth: ({ theme: e2 }) => ({ full: "100%", min: "min-content", max: "max-content", fit: "fit-content", ...e2("spacing") }), objectPosition: { bottom: "bottom", center: "center", left: "left", "left-bottom": "left bottom", "left-top": "left top", right: "right", "right-bottom": "right bottom", "right-top": "right top", top: "top" }, opacity: { 0: "0", 5: "0.05", 10: "0.1", 15: "0.15", 20: "0.2", 25: "0.25", 30: "0.3", 35: "0.35", 40: "0.4", 45: "0.45", 50: "0.5", 55: "0.55", 60: "0.6", 65: "0.65", 70: "0.7", 75: "0.75", 80: "0.8", 85: "0.85", 90: "0.9", 95: "0.95", 100: "1", ...l5 }, order: { first: "-9999", last: "9999", none: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", ...g2 }, outlineColor: ({ theme: e2 }) => e2("colors"), outlineOffset: { 0: "0px", 1: "1px", 2: "2px", 4: "4px", 8: "8px", ...f3 }, outlineWidth: { 0: "0px", 1: "1px", 2: "2px", 4: "4px", 8: "8px", ...f3 }, padding: ({ theme: e2 }) => e2("spacing"), placeholderColor: ({ theme: e2 }) => e2("colors"), placeholderOpacity: ({ theme: e2 }) => e2("opacity"), ringColor: ({ theme: e2 }) => ({ DEFAULT: "currentcolor", ...e2("colors") }), ringOffsetColor: ({ theme: e2 }) => e2("colors"), ringOffsetWidth: { 0: "0px", 1: "1px", 2: "2px", 4: "4px", 8: "8px", ...f3 }, ringOpacity: ({ theme: e2 }) => ({ DEFAULT: "0.5", ...e2("opacity") }), ringWidth: { DEFAULT: "3px", 0: "0px", 1: "1px", 2: "2px", 4: "4px", 8: "8px", ...f3 }, rotate: { 0: "0deg", 1: "1deg", 2: "2deg", 3: "3deg", 6: "6deg", 12: "12deg", 45: "45deg", 90: "90deg", 180: "180deg", ...w3 }, saturate: { 0: "0", 50: ".5", 100: "1", 150: "1.5", 200: "2", ...l5 }, scale: { 0: "0", 50: ".5", 75: ".75", 90: ".9", 95: ".95", 100: "1", 105: "1.05", 110: "1.1", 125: "1.25", 150: "1.5", ...l5 }, screens: { sm: "40rem", md: "48rem", lg: "64rem", xl: "80rem", "2xl": "96rem" }, scrollMargin: ({ theme: e2 }) => e2("spacing"), scrollPadding: ({ theme: e2 }) => e2("spacing"), sepia: { 0: "0", DEFAULT: "100%", ...l5 }, skew: { 0: "0deg", 1: "1deg", 2: "2deg", 3: "3deg", 6: "6deg", 12: "12deg", ...w3 }, space: ({ theme: e2 }) => e2("spacing"), spacing: { px: "1px", 0: "0px", 0.5: "0.125rem", 1: "0.25rem", 1.5: "0.375rem", 2: "0.5rem", 2.5: "0.625rem", 3: "0.75rem", 3.5: "0.875rem", 4: "1rem", 5: "1.25rem", 6: "1.5rem", 7: "1.75rem", 8: "2rem", 9: "2.25rem", 10: "2.5rem", 11: "2.75rem", 12: "3rem", 14: "3.5rem", 16: "4rem", 20: "5rem", 24: "6rem", 28: "7rem", 32: "8rem", 36: "9rem", 40: "10rem", 44: "11rem", 48: "12rem", 52: "13rem", 56: "14rem", 60: "15rem", 64: "16rem", 72: "18rem", 80: "20rem", 96: "24rem" }, stroke: ({ theme: e2 }) => ({ none: "none", ...e2("colors") }), strokeWidth: { 0: "0", 1: "1", 2: "2", ...g2 }, supports: {}, data: {}, textColor: ({ theme: e2 }) => e2("colors"), textDecorationColor: ({ theme: e2 }) => e2("colors"), textDecorationThickness: { auto: "auto", "from-font": "from-font", 0: "0px", 1: "1px", 2: "2px", 4: "4px", 8: "8px", ...f3 }, textIndent: ({ theme: e2 }) => e2("spacing"), textOpacity: ({ theme: e2 }) => e2("opacity"), textUnderlineOffset: { auto: "auto", 0: "0px", 1: "1px", 2: "2px", 4: "4px", 8: "8px", ...f3 }, transformOrigin: { center: "center", top: "top", "top-right": "top right", right: "right", "bottom-right": "bottom right", bottom: "bottom", "bottom-left": "bottom left", left: "left", "top-left": "top left" }, transitionDelay: { 0: "0s", 75: "75ms", 100: "100ms", 150: "150ms", 200: "200ms", 300: "300ms", 500: "500ms", 700: "700ms", 1000: "1000ms", ...L3 }, transitionDuration: { DEFAULT: "150ms", 0: "0s", 75: "75ms", 100: "100ms", 150: "150ms", 200: "200ms", 300: "300ms", 500: "500ms", 700: "700ms", 1000: "1000ms", ...L3 }, transitionProperty: { none: "none", all: "all", DEFAULT: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter", colors: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke", opacity: "opacity", shadow: "box-shadow", transform: "transform" }, transitionTimingFunction: { DEFAULT: "cubic-bezier(0.4, 0, 0.2, 1)", linear: "linear", in: "cubic-bezier(0.4, 0, 1, 1)", out: "cubic-bezier(0, 0, 0.2, 1)", "in-out": "cubic-bezier(0.4, 0, 0.2, 1)" }, translate: ({ theme: e2 }) => ({ "1/2": "50%", "1/3": "33.333333%", "2/3": "66.666667%", "1/4": "25%", "2/4": "50%", "3/4": "75%", full: "100%", ...e2("spacing") }), size: ({ theme: e2 }) => ({ auto: "auto", "1/2": "50%", "1/3": "33.333333%", "2/3": "66.666667%", "1/4": "25%", "2/4": "50%", "3/4": "75%", "1/5": "20%", "2/5": "40%", "3/5": "60%", "4/5": "80%", "1/6": "16.666667%", "2/6": "33.333333%", "3/6": "50%", "4/6": "66.666667%", "5/6": "83.333333%", "1/12": "8.333333%", "2/12": "16.666667%", "3/12": "25%", "4/12": "33.333333%", "5/12": "41.666667%", "6/12": "50%", "7/12": "58.333333%", "8/12": "66.666667%", "9/12": "75%", "10/12": "83.333333%", "11/12": "91.666667%", full: "100%", min: "min-content", max: "max-content", fit: "fit-content", ...e2("spacing") }), width: ({ theme: e2 }) => ({ auto: "auto", "1/2": "50%", "1/3": "33.333333%", "2/3": "66.666667%", "1/4": "25%", "2/4": "50%", "3/4": "75%", "1/5": "20%", "2/5": "40%", "3/5": "60%", "4/5": "80%", "1/6": "16.666667%", "2/6": "33.333333%", "3/6": "50%", "4/6": "66.666667%", "5/6": "83.333333%", "1/12": "8.333333%", "2/12": "16.666667%", "3/12": "25%", "4/12": "33.333333%", "5/12": "41.666667%", "6/12": "50%", "7/12": "58.333333%", "8/12": "66.666667%", "9/12": "75%", "10/12": "83.333333%", "11/12": "91.666667%", full: "100%", screen: "100vw", svw: "100svw", lvw: "100lvw", dvw: "100dvw", min: "min-content", max: "max-content", fit: "fit-content", ...e2("spacing") }), willChange: { auto: "auto", scroll: "scroll-position", contents: "contents", transform: "transform" }, zIndex: { auto: "auto", 0: "0", 10: "10", 20: "20", 30: "30", 40: "40", 50: "50", ...g2 } };
});

// ../../node_modules/.pnpm/tailwindcss@4.3.1/node_modules/tailwindcss/dist/chunk-5JIJA4QV.mjs
function h10(n3) {
  if (arguments.length === 0)
    throw new TypeError("`CSS.escape` requires an argument.");
  let e2 = String(n3), i = e2.length, r2 = -1, t2, s3 = "", l6 = e2.charCodeAt(0);
  if (i === 1 && l6 === 45)
    return "\\" + e2;
  for (;++r2 < i; ) {
    if (t2 = e2.charCodeAt(r2), t2 === 0) {
      s3 += "�";
      continue;
    }
    if (t2 >= 1 && t2 <= 31 || t2 === 127 || r2 === 0 && t2 >= 48 && t2 <= 57 || r2 === 1 && t2 >= 48 && t2 <= 57 && l6 === 45) {
      s3 += "\\" + t2.toString(16) + " ";
      continue;
    }
    if (t2 >= 128 || t2 === 45 || t2 === 95 || t2 >= 48 && t2 <= 57 || t2 >= 65 && t2 <= 90 || t2 >= 97 && t2 <= 122) {
      s3 += e2.charAt(r2);
      continue;
    }
    s3 += "\\" + e2.charAt(r2);
  }
  return s3;
}
function a(n3) {
  return n3.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g, (e2) => {
    if (e2.length <= 2)
      return e2[1];
    let i = Number.parseInt(e2.slice(1).trim(), 16);
    return i === 0 || i > 1114111 || i >= 55296 && i <= 57343 ? "�" : String.fromCodePoint(i);
  });
}
function g3(n3, e2) {
  return (c2.get(e2) ?? []).some((i) => n3 === i || n3.startsWith(`${i}-`));
}
var c2, p2 = class {
  constructor(e2 = new Map, i = new Set([])) {
    this.values = e2;
    this.keyframes = i;
  }
  values;
  keyframes;
  prefix = null;
  get size() {
    return this.values.size;
  }
  add(e2, i, r2 = 0, t2) {
    if (e2.endsWith("-*")) {
      if (i !== "initial")
        throw new Error(`Invalid theme value \`${i}\` for namespace \`${e2}\``);
      e2 === "--*" ? this.values.clear() : this.clearNamespace(e2.slice(0, -2), 0);
    }
    if (r2 & 4) {
      let s3 = this.values.get(e2);
      if (s3 && !(s3.options & 4))
        return;
    }
    i === "initial" ? this.values.delete(e2) : this.values.set(e2, { value: i, options: r2, src: t2 });
  }
  keysInNamespaces(e2) {
    let i = [];
    for (let r2 of e2) {
      let t2 = `${r2}-`;
      for (let s3 of this.values.keys())
        s3.startsWith(t2) && s3.indexOf("--", 2) === -1 && (g3(s3, r2) || i.push(s3.slice(t2.length)));
    }
    return i;
  }
  get(e2) {
    for (let i of e2) {
      let r2 = this.values.get(i);
      if (r2)
        return r2.value;
    }
    return null;
  }
  hasDefault(e2) {
    return (this.getOptions(e2) & 4) === 4;
  }
  getOptions(e2) {
    return e2 = a(this.#i(e2)), this.values.get(e2)?.options ?? 0;
  }
  entries() {
    return this.prefix ? Array.from(this.values, (e2) => (e2[0] = this.prefixKey(e2[0]), e2)) : this.values.entries();
  }
  prefixKey(e2) {
    return this.prefix ? `--${this.prefix}-${e2.slice(2)}` : e2;
  }
  #i(e2) {
    return this.prefix ? `--${e2.slice(3 + this.prefix.length)}` : e2;
  }
  clearNamespace(e2, i) {
    let r2 = c2.get(e2) ?? [];
    e:
      for (let t2 of this.values.keys())
        if (t2.startsWith(e2)) {
          if (i !== 0 && (this.getOptions(t2) & i) !== i)
            continue;
          for (let s3 of r2)
            if (t2.startsWith(s3))
              continue e;
          this.values.delete(t2);
        }
  }
  #e(e2, i) {
    for (let r2 of i) {
      let t2 = e2 !== null ? `${r2}-${e2}` : r2;
      if (!this.values.has(t2))
        if (e2 !== null && e2.includes(".")) {
          if (t2 = `${r2}-${e2.replaceAll(".", "_")}`, !this.values.has(t2))
            continue;
        } else
          continue;
      if (!g3(t2, r2))
        return t2;
    }
    return null;
  }
  #t(e2) {
    let i = this.values.get(e2);
    if (!i)
      return null;
    let r2 = null;
    return i.options & 2 && (r2 = i.value), `var(${h10(this.prefixKey(e2))}${r2 ? `, ${r2}` : ""})`;
  }
  markUsedVariable(e2) {
    let i = a(this.#i(e2)), r2 = this.values.get(i);
    if (!r2)
      return false;
    let t2 = r2.options & 16;
    return r2.options |= 16, !t2;
  }
  resolve(e2, i, r2 = 0) {
    let t2 = this.#e(e2, i);
    if (!t2)
      return null;
    let s3 = this.values.get(t2);
    return (r2 | s3.options) & 1 ? s3.value : this.#t(t2);
  }
  resolveValue(e2, i) {
    let r2 = this.#e(e2, i);
    return r2 ? this.values.get(r2).value : null;
  }
  resolveWith(e2, i, r2 = []) {
    let t2 = this.#e(e2, i);
    if (!t2)
      return null;
    let s3 = {};
    for (let u2 of r2) {
      let f4 = `${t2}${u2}`, o2 = this.values.get(f4);
      o2 && (o2.options & 1 ? s3[u2] = o2.value : s3[u2] = this.#t(f4));
    }
    let l6 = this.values.get(t2);
    return l6.options & 1 ? [l6.value, s3] : [this.#t(t2), s3];
  }
  namespace(e2) {
    let i = new Map, r2 = `${e2}-`;
    for (let [t2, s3] of this.values)
      t2 === e2 ? i.set(null, s3.value) : t2.startsWith(`${r2}-`) ? i.set(t2.slice(e2.length), s3.value) : t2.startsWith(r2) && i.set(t2.slice(r2.length), s3.value);
    return i;
  }
  addKeyframes(e2) {
    this.keyframes.add(e2);
  }
  getKeyframes() {
    return Array.from(this.keyframes);
  }
};
var init_chunk_5JIJA4QV = __esm(() => {
  c2 = new Map([["--font", ["--font-weight", "--font-size"]], ["--inset", ["--inset-shadow", "--inset-ring"]], ["--text", ["--text-color", "--text-decoration-color", "--text-decoration-thickness", "--text-indent", "--text-shadow", "--text-underline-offset"]], ["--grid-column", ["--grid-column-start", "--grid-column-end"]], ["--grid-row", ["--grid-row-start", "--grid-row-end"]]]);
});

// ../../node_modules/.pnpm/tailwindcss@4.3.1/node_modules/tailwindcss/dist/lib.mjs
function at3(e2) {
  let i = [0];
  for (let n3 = 0;n3 < e2.length; n3++)
    e2.charCodeAt(n3) === 10 && i.push(n3 + 1);
  function r2(n3) {
    let s3 = 0, l6 = i.length;
    for (;l6 > 0; ) {
      let f4 = (l6 | 0) >> 1, c3 = s3 + f4;
      i[c3] <= n3 ? (s3 = c3 + 1, l6 = l6 - f4 - 1) : l6 = f4;
    }
    s3 -= 1;
    let p3 = n3 - i[s3];
    return { line: s3 + 1, column: p3 };
  }
  function t2({ line: n3, column: s3 }) {
    n3 -= 1, n3 = Math.min(Math.max(n3, 0), i.length - 1);
    let l6 = i[n3], p3 = i[n3 + 1] ?? l6;
    return Math.min(Math.max(l6 + s3, 0), p3);
  }
  return { find: r2, findOffset: t2 };
}
function Se3(e3, i) {
  let r2 = i?.from ? { file: i.from, code: e3 } : null;
  e3[0] === "\uFEFF" && (e3 = " " + e3.slice(1));
  let t2 = [], n3 = [], s3 = [], l6 = null, p3 = null, f4 = "", c3 = "", m2 = 0, d3;
  for (let u2 = 0;u2 < e3.length; u2++) {
    let h8 = e3.charCodeAt(u2);
    if (!(h8 === ct3 && (d3 = e3.charCodeAt(u2 + 1), d3 === de4)))
      if (h8 === Ge2)
        f4 === "" && (m2 = u2), f4 += e3.slice(u2, u2 + 2), u2 += 1;
      else if (h8 === st3 && e3.charCodeAt(u2 + 1) === ut3) {
        let v5 = u2;
        for (let y4 = u2 + 2;y4 < e3.length; y4++)
          if (d3 = e3.charCodeAt(y4), d3 === Ge2)
            y4 += 1;
          else if (d3 === ut3 && e3.charCodeAt(y4 + 1) === st3) {
            u2 = y4 + 1;
            break;
          }
        let k4 = e3.slice(v5, u2 + 1);
        if (k4.charCodeAt(2) === sn3) {
          let y4 = pt3(k4.slice(2, -2));
          n3.push(y4), r2 && (y4.src = [r2, v5, u2 + 1], y4.dst = [r2, v5, u2 + 1]);
        }
      } else if (h8 === hr4 || h8 === gr3) {
        let v5 = br4(e3, u2, h8, r2);
        f4 += e3.slice(u2, v5 + 1), u2 = v5;
      } else {
        if ((h8 === qe3 || h8 === de4 || h8 === He2) && (d3 = e3.charCodeAt(u2 + 1)) && (d3 === qe3 || d3 === de4 || d3 === He2 || d3 === ct3 && (d3 = e3.charCodeAt(u2 + 2)) && d3 == de4))
          continue;
        if (h8 === de4) {
          if (f4.length === 0)
            continue;
          d3 = f4.charCodeAt(f4.length - 1), d3 !== qe3 && d3 !== de4 && d3 !== He2 && (f4 += " ");
        } else if (h8 === kr3 && e3.charCodeAt(u2 + 1) === kr3 && f4.length === 0) {
          let v5 = "", k4 = u2, y4 = -1;
          for (let A3 = u2 + 2;A3 < e3.length; A3++)
            if (d3 = e3.charCodeAt(A3), d3 === Ge2)
              A3 += 1;
            else if (d3 === hr4 || d3 === gr3)
              A3 = br4(e3, A3, d3, r2);
            else if (d3 === st3 && e3.charCodeAt(A3 + 1) === ut3) {
              for (let b5 = A3 + 2;b5 < e3.length; b5++)
                if (d3 = e3.charCodeAt(b5), d3 === Ge2)
                  b5 += 1;
                else if (d3 === ut3 && e3.charCodeAt(b5 + 1) === st3) {
                  A3 = b5 + 1;
                  break;
                }
            } else if (y4 === -1 && d3 === ln2)
              y4 = f4.length + A3 - k4;
            else if (d3 === ft3 && v5.length === 0) {
              f4 += e3.slice(k4, A3), u2 = A3;
              break;
            } else if (d3 === It3)
              v5 += ")";
            else if (d3 === on3)
              v5 += "]";
            else if (d3 === vr3)
              v5 += "}";
            else if ((d3 === Pt2 || e3.length - 1 === A3) && v5.length === 0) {
              u2 = A3 - 1, f4 += e3.slice(k4, A3);
              break;
            } else
              (d3 === wr3 || d3 === an3 || d3 === Pt2) && v5.length > 0 && e3[A3] === v5[v5.length - 1] && (v5 = v5.slice(0, -1));
          let N5 = _t(f4, y4);
          if (!N5)
            throw new me3("Invalid custom property, expected a value", r2 ? [r2, k4, u2] : null);
          r2 && (N5.src = [r2, k4, u2], N5.dst = [r2, k4, u2]), l6 ? l6.nodes.push(N5) : t2.push(N5), f4 = "";
        } else if (h8 === ft3 && f4.charCodeAt(0) === Ot2)
          p3 = Ze3(f4), r2 && (p3.src = [r2, m2, u2], p3.dst = [r2, m2, u2]), l6 ? l6.nodes.push(p3) : t2.push(p3), f4 = "", p3 = null;
        else if (h8 === ft3 && c3[c3.length - 1] !== ")") {
          let v5 = _t(f4);
          if (!v5) {
            if (f4.length === 0)
              continue;
            throw new me3(`Invalid declaration: \`${f4.trim()}\``, r2 ? [r2, m2, u2] : null);
          }
          r2 && (v5.src = [r2, m2, u2], v5.dst = [r2, m2, u2]), l6 ? l6.nodes.push(v5) : t2.push(v5), f4 = "";
        } else if (h8 === vr3 && c3[c3.length - 1] !== ")")
          c3 += "}", p3 = J3(f4.trim()), r2 && (p3.src = [r2, m2, u2], p3.dst = [r2, m2, u2]), l6 && l6.nodes.push(p3), s3.push(l6), l6 = p3, f4 = "", p3 = null;
        else if (h8 === Pt2 && c3[c3.length - 1] !== ")") {
          if (c3 === "")
            throw new me3("Missing opening {", r2 ? [r2, u2, u2] : null);
          if (c3 = c3.slice(0, -1), f4.length > 0)
            if (f4.charCodeAt(0) === Ot2)
              p3 = Ze3(f4), r2 && (p3.src = [r2, m2, u2], p3.dst = [r2, m2, u2]), l6 ? l6.nodes.push(p3) : t2.push(p3), f4 = "", p3 = null;
            else {
              let k4 = f4.indexOf(":");
              if (l6) {
                let y4 = _t(f4, k4);
                if (!y4)
                  throw new me3(`Invalid declaration: \`${f4.trim()}\``, r2 ? [r2, m2, u2] : null);
                r2 && (y4.src = [r2, m2, u2], y4.dst = [r2, m2, u2]), l6.nodes.push(y4);
              }
            }
          let v5 = s3.pop() ?? null;
          v5 === null && l6 && t2.push(l6), l6 = v5, f4 = "", p3 = null;
        } else if (h8 === It3)
          c3 += ")", f4 += "(";
        else if (h8 === wr3) {
          if (c3[c3.length - 1] !== ")")
            throw new me3("Missing opening (", r2 ? [r2, u2, u2] : null);
          c3 = c3.slice(0, -1), f4 += ")";
        } else {
          if (f4.length === 0 && (h8 === qe3 || h8 === de4 || h8 === He2))
            continue;
          f4 === "" && (m2 = u2), f4 += String.fromCharCode(h8);
        }
      }
  }
  if (f4.charCodeAt(0) === Ot2) {
    let u2 = Ze3(f4);
    r2 && (u2.src = [r2, m2, e3.length], u2.dst = [r2, m2, e3.length]), t2.push(u2);
  }
  if (c3.length > 0 && l6) {
    if (l6.kind === "rule")
      throw new me3(`Missing closing } at ${l6.selector}`, l6.src ? [l6.src[0], l6.src[1], l6.src[1]] : null);
    if (l6.kind === "at-rule")
      throw new me3(`Missing closing } at ${l6.name} ${l6.params}`, l6.src ? [l6.src[0], l6.src[1], l6.src[1]] : null);
  }
  return n3.length > 0 ? n3.concat(t2) : t2;
}
function Ze3(e3, i = []) {
  let r2 = e3, t2 = "";
  for (let n3 = 5;n3 < e3.length; n3++) {
    let s3 = e3.charCodeAt(n3);
    if (s3 === qe3 || s3 === He2 || s3 === It3) {
      r2 = e3.slice(0, n3), t2 = e3.slice(n3);
      break;
    }
  }
  return B3(r2.trim(), t2.trim(), i);
}
function _t(e3, i = e3.indexOf(":")) {
  if (i === -1)
    return null;
  let r2 = e3.indexOf("!important", i + 1);
  return o2(e3.slice(0, i).trim(), e3.slice(i + 1, r2 === -1 ? e3.length : r2).trim(), r2 !== -1);
}
function br4(e3, i, r2, t2 = null) {
  let n3;
  for (let s3 = i + 1;s3 < e3.length; s3++)
    if (n3 = e3.charCodeAt(s3), n3 === Ge2)
      s3 += 1;
    else {
      if (n3 === r2)
        return s3;
      if (n3 === ft3 && (e3.charCodeAt(s3 + 1) === de4 || e3.charCodeAt(s3 + 1) === ct3 && e3.charCodeAt(s3 + 2) === de4))
        throw new me3(`Unterminated string: ${e3.slice(i, s3 + 1) + String.fromCharCode(r2)}`, t2 ? [t2, i, s3 + 1] : null);
      if (n3 === de4 || n3 === ct3 && e3.charCodeAt(s3 + 1) === de4)
        throw new me3(`Unterminated string: ${e3.slice(i, s3) + String.fromCharCode(r2)}`, t2 ? [t2, i, s3 + 1] : null);
    }
  return i;
}
function ne4(e3) {
  return { kind: "word", value: e3 };
}
function un3(e3, i) {
  return { kind: "function", value: e3, nodes: i };
}
function fn2(e3) {
  return { kind: "separator", value: e3 };
}
function F3(e3) {
  let i = "";
  for (let r2 of e3)
    switch (r2.kind) {
      case "word":
      case "separator": {
        i += r2.value;
        break;
      }
      case "function":
        i += r2.value + "(" + F3(r2.nodes) + ")";
    }
  return i;
}
function M3(e3) {
  e3 = e3.replaceAll(`\r
`, `
`);
  let i = [], r2 = [], t2 = null, n3 = "", s3;
  for (let l6 = 0;l6 < e3.length; l6++) {
    let p3 = e3.charCodeAt(l6);
    switch (p3) {
      case yr3: {
        n3 += e3[l6] + e3[l6 + 1], l6++;
        break;
      }
      case gn3: {
        if (n3.length > 0) {
          let c3 = ne4(n3);
          t2 ? t2.nodes.push(c3) : i.push(c3), n3 = "";
        }
        let f4 = ne4(e3[l6]);
        t2 ? t2.nodes.push(f4) : i.push(f4);
        break;
      }
      case xr3:
      case Ar3:
      case Cr3:
      case Vr3:
      case Sr3:
      case $r3:
      case Tr3:
      case Nr3: {
        if (n3.length > 0) {
          let d3 = ne4(n3);
          t2 ? t2.nodes.push(d3) : i.push(d3), n3 = "";
        }
        let f4 = l6, c3 = l6 + 1;
        for (;c3 < e3.length && (s3 = e3.charCodeAt(c3), !(s3 !== xr3 && s3 !== Ar3 && s3 !== Cr3 && s3 !== Vr3 && s3 !== Sr3 && s3 !== $r3 && s3 !== Tr3 && s3 !== Nr3)); c3++)
          ;
        l6 = c3 - 1;
        let m2 = fn2(e3.slice(f4, c3));
        t2 ? t2.nodes.push(m2) : i.push(m2);
        break;
      }
      case mn3:
      case pn3: {
        let f4 = l6;
        for (let c3 = l6 + 1;c3 < e3.length; c3++)
          if (s3 = e3.charCodeAt(c3), s3 === yr3)
            c3 += 1;
          else if (s3 === p3) {
            l6 = c3;
            break;
          }
        n3 += e3.slice(f4, l6 + 1);
        break;
      }
      case dn3: {
        let f4 = un3(n3, []);
        n3 = "", t2 ? t2.nodes.push(f4) : i.push(f4), r2.push(f4), t2 = f4;
        break;
      }
      case cn2: {
        let f4 = r2.pop();
        if (n3.length > 0) {
          let c3 = ne4(n3);
          f4?.nodes.push(c3), n3 = "";
        }
        r2.length > 0 ? t2 = r2[r2.length - 1] : t2 = null;
        break;
      }
      default:
        n3 += String.fromCharCode(p3);
    }
  }
  return n3.length > 0 && i.push(ne4(n3)), i;
}
function _5(e3, i) {
  typeof i == "function" ? Er3(e3, i) : Er3(e3, i.enter, i.exit);
}
function Er3(e3, i = () => V5.Continue, r2 = () => V5.Continue) {
  let t2 = { value: [e3, 0, null], prev: null }, n3 = { parent: null, depth: 0, index: 0, siblings: e3, path() {
    let s3 = [], l6 = t2;
    for (;l6; ) {
      let p3 = l6.value[2];
      p3 && s3.push(p3), l6 = l6.prev;
    }
    return s3.reverse(), s3;
  } };
  for (;t2 !== null; ) {
    let s3 = t2.value, l6 = s3[0], p3 = s3[1], f4 = s3[2];
    if (p3 >= l6.length) {
      t2 = t2.prev, n3.depth -= 1;
      continue;
    }
    if (n3.parent = f4, n3.siblings = l6, p3 >= 0) {
      n3.index = p3;
      let u2 = l6[p3], h8 = i(u2, n3) ?? V5.Continue;
      switch (h8.kind) {
        case 0: {
          u2.nodes && u2.nodes.length > 0 && (n3.depth += 1, t2 = { value: [u2.nodes, 0, u2], prev: t2 }), s3[1] = ~p3;
          continue;
        }
        case 2:
          return;
        case 1: {
          s3[1] = ~p3;
          continue;
        }
        case 3: {
          l6.splice(p3, 1, ...h8.nodes);
          continue;
        }
        case 5: {
          l6.splice(p3, 1, ...h8.nodes);
          return;
        }
        case 4: {
          l6.splice(p3, 1, ...h8.nodes), s3[1] += h8.nodes.length;
          continue;
        }
        default:
          throw new Error(`Invalid \`WalkAction.${Kt2[h8.kind] ?? `Unknown(${h8.kind})`}\` in enter.`);
      }
    }
    let c3 = ~p3;
    n3.index = c3;
    let m2 = l6[c3], d3 = r2(m2, n3) ?? V5.Continue;
    switch (d3.kind) {
      case 0:
        s3[1] = c3 + 1;
        continue;
      case 2:
        return;
      case 3: {
        l6.splice(c3, 1, ...d3.nodes), s3[1] = c3 + d3.nodes.length;
        continue;
      }
      case 5: {
        l6.splice(c3, 1, ...d3.nodes);
        return;
      }
      case 4: {
        l6.splice(c3, 1, ...d3.nodes), s3[1] = c3 + d3.nodes.length;
        continue;
      }
      default:
        throw new Error(`Invalid \`WalkAction.${Kt2[d3.kind] ?? `Unknown(${d3.kind})`}\` in exit.`);
    }
  }
}
function dt2(e3) {
  let i = [];
  return _5(M3(e3), (r2) => {
    if (!(r2.kind !== "function" || r2.value !== "var"))
      return _5(r2.nodes, (t2) => {
        t2.kind !== "word" || t2.value[0] !== "-" || t2.value[1] !== "-" || i.push(t2.value);
      }), V5.Skip;
  }), i;
}
function H4(e3, i = []) {
  return { kind: "rule", selector: e3, nodes: i };
}
function B3(e3, i = "", r2 = []) {
  return { kind: "at-rule", name: e3, params: i, nodes: r2 };
}
function J3(e3, i = []) {
  return e3.charCodeAt(0) === hn3 ? Ze3(e3, i) : H4(e3, i);
}
function o2(e3, i, r2 = false) {
  return { kind: "declaration", property: e3, value: i, important: r2 };
}
function pt3(e3) {
  return { kind: "comment", value: e3 };
}
function he3(e3, i) {
  return { kind: "context", context: e3, nodes: i };
}
function Y4(e3) {
  return { kind: "at-root", nodes: e3 };
}
function re3(e3) {
  switch (e3.kind) {
    case "rule":
      return { kind: e3.kind, selector: e3.selector, nodes: e3.nodes.map(re3), src: e3.src, dst: e3.dst };
    case "at-rule":
      return { kind: e3.kind, name: e3.name, params: e3.params, nodes: e3.nodes.map(re3), src: e3.src, dst: e3.dst };
    case "at-root":
      return { kind: e3.kind, nodes: e3.nodes.map(re3), src: e3.src, dst: e3.dst };
    case "context":
      return { kind: e3.kind, context: { ...e3.context }, nodes: e3.nodes.map(re3), src: e3.src, dst: e3.dst };
    case "declaration":
      return { kind: e3.kind, property: e3.property, value: e3.value, important: e3.important, src: e3.src, dst: e3.dst };
    case "comment":
      return { kind: e3.kind, value: e3.value, src: e3.src, dst: e3.dst };
    default:
      throw new Error(`Unknown node kind: ${e3.kind}`);
  }
}
function Qe3(e3) {
  return { depth: e3.depth, index: e3.index, siblings: e3.siblings, get context() {
    let i = {};
    for (let r2 of e3.path())
      r2.kind === "context" && Object.assign(i, r2.context);
    return Object.defineProperty(this, "context", { value: i }), i;
  }, get parent() {
    let i = this.path().pop() ?? null;
    return Object.defineProperty(this, "parent", { value: i }), i;
  }, path() {
    return e3.path().filter((i) => i.kind !== "context");
  } };
}
function $e2(e3, i, r2 = 3) {
  let t2 = [], n3 = new Set, s3 = new U4(() => new Set), l6 = new U4(() => new Set), p3 = new Set, f4 = new Set, c3 = [], m2 = [], d3 = new U4(() => new Set);
  function u2(v5, k4, y4 = {}, N5 = 0) {
    if (v5.kind === "declaration") {
      if (v5.property === "--tw-sort" || v5.value === undefined || v5.value === null)
        return;
      if (y4.theme && v5.property[0] === "-" && v5.property[1] === "-") {
        if (v5.value === "initial") {
          v5.value = undefined;
          return;
        }
        y4.keyframes || s3.get(k4).add(v5);
      }
      if (v5.value.includes("var("))
        if (y4.theme && v5.property[0] === "-" && v5.property[1] === "-")
          for (let A3 of dt2(v5.value))
            d3.get(A3).add(v5.property);
        else
          i.trackUsedVariables(v5.value);
      if (v5.property === "animation")
        for (let A3 of Rr2(v5.value))
          f4.add(A3);
      r2 & 2 && v5.value.includes("color-mix(") && !y4.supportsColorMix && !y4.keyframes && l6.get(k4).add(v5), k4.push(v5);
    } else if (v5.kind === "rule") {
      let A3 = [];
      for (let O5 of v5.nodes)
        u2(O5, A3, y4, N5 + 1);
      let b5 = {}, D4 = new Set;
      for (let O5 of A3) {
        if (O5.kind !== "declaration")
          continue;
        let P4 = `${O5.property}:${O5.value}:${O5.important}`;
        b5[P4] ??= [], b5[P4].push(O5);
      }
      for (let O5 in b5)
        for (let P4 = 0;P4 < b5[O5].length - 1; ++P4)
          D4.add(b5[O5][P4]);
      if (D4.size > 0 && (A3 = A3.filter((O5) => !D4.has(O5))), A3.length === 0)
        return;
      v5.selector === "&" ? k4.push(...A3) : k4.push({ ...v5, nodes: A3 });
    } else if (v5.kind === "at-rule" && v5.name === "@property" && N5 === 0) {
      if (n3.has(v5.params))
        return;
      if (r2 & 1) {
        let b5 = v5.params, D4 = null, O5 = false;
        for (let z4 of v5.nodes)
          z4.kind === "declaration" && (z4.property === "initial-value" ? D4 = z4.value : z4.property === "inherits" && (O5 = z4.value === "true"));
        let P4 = o2(b5, D4 ?? "initial");
        P4.src = v5.src, O5 ? c3.push(P4) : m2.push(P4);
      }
      n3.add(v5.params);
      let A3 = { ...v5, nodes: [] };
      for (let b5 of v5.nodes)
        u2(b5, A3.nodes, y4, N5 + 1);
      k4.push(A3);
    } else if (v5.kind === "at-rule") {
      v5.name === "@keyframes" ? y4 = { ...y4, keyframes: true } : v5.name === "@supports" && v5.params.includes("color-mix(") && (y4 = { ...y4, supportsColorMix: true });
      let A3 = { ...v5, nodes: [] };
      for (let b5 of v5.nodes)
        u2(b5, A3.nodes, y4, N5 + 1);
      v5.name === "@keyframes" && y4.theme && p3.add(A3), (A3.nodes.length > 0 || A3.name === "@layer" || A3.name === "@charset" || A3.name === "@custom-media" || A3.name === "@namespace" || A3.name === "@import" || A3.name === "@apply") && k4.push(A3);
    } else if (v5.kind === "at-root")
      for (let A3 of v5.nodes) {
        let b5 = [];
        u2(A3, b5, y4, 0);
        for (let D4 of b5)
          t2.push(D4);
      }
    else if (v5.kind === "context") {
      if (v5.context.reference)
        return;
      for (let A3 of v5.nodes)
        u2(A3, k4, { ...y4, ...v5.context }, N5);
    } else
      v5.kind === "comment" && k4.push(v5);
  }
  let h8 = [];
  for (let v5 of e3)
    u2(v5, h8, {}, 0);
  e:
    for (let [v5, k4] of s3)
      for (let y4 of k4) {
        if (Pr3(y4.property, i.theme, d3)) {
          if (y4.property.startsWith(i.theme.prefixKey("--animate-")))
            for (let b5 of Rr2(y4.value))
              f4.add(b5);
          continue;
        }
        let A3 = v5.indexOf(y4);
        if (v5.splice(A3, 1), v5.length === 0) {
          let b5 = vn3(h8, (D4) => D4.kind === "rule" && D4.nodes === v5);
          if (!b5 || b5.length === 0)
            continue e;
          b5.unshift({ kind: "at-root", nodes: h8 });
          do {
            let D4 = b5.pop();
            if (!D4)
              break;
            let O5 = b5[b5.length - 1];
            if (!O5 || O5.kind !== "at-root" && O5.kind !== "at-rule")
              break;
            let P4 = O5.nodes.indexOf(D4);
            if (P4 === -1)
              break;
            O5.nodes.splice(P4, 1);
          } while (true);
          continue e;
        }
      }
  for (let v5 of p3)
    if (!f4.has(v5.params)) {
      let k4 = t2.indexOf(v5);
      t2.splice(k4, 1);
    }
  if (h8 = h8.concat(t2), r2 & 2)
    for (let [v5, k4] of l6)
      for (let y4 of k4) {
        let N5 = v5.indexOf(y4);
        if (N5 === -1 || y4.value == null)
          continue;
        let A3 = M3(y4.value), b5 = false;
        if (_5(A3, (P4) => {
          if (P4.kind !== "function" || P4.value !== "color-mix")
            return;
          let z4 = false, E2 = false;
          if (_5(P4.nodes, (j4) => {
            if (j4.kind == "word" && j4.value.toLowerCase() === "currentcolor") {
              E2 = true, b5 = true;
              return;
            }
            let q4 = j4, G4 = null, X4 = new Set;
            do {
              if (q4.kind !== "function" || q4.value !== "var")
                return;
              let ie4 = q4.nodes[0];
              if (!ie4 || ie4.kind !== "word")
                return;
              let a2 = ie4.value;
              if (X4.has(a2)) {
                z4 = true;
                return;
              }
              if (X4.add(a2), b5 = true, G4 = i.theme.resolveValue(null, [ie4.value]), !G4) {
                z4 = true;
                return;
              }
              if (G4.toLowerCase() === "currentcolor") {
                E2 = true;
                return;
              }
              G4.startsWith("var(") ? q4 = M3(G4)[0] : q4 = null;
            } while (q4);
            return V5.Replace({ kind: "word", value: G4 });
          }), z4 || E2) {
            let j4 = P4.nodes.findIndex((G4) => G4.kind === "separator" && G4.value.trim().includes(","));
            if (j4 === -1)
              return;
            let q4 = P4.nodes.length > j4 ? P4.nodes[j4 + 1] : null;
            return q4 ? V5.Replace(q4) : undefined;
          } else if (b5) {
            let j4 = P4.nodes[2];
            j4.kind === "word" && (j4.value === "oklab" || j4.value === "oklch" || j4.value === "lab" || j4.value === "lch") && (j4.value = "srgb");
          }
        }), !b5)
          continue;
        let D4 = { ...y4, value: F3(A3) }, O5 = J3("@supports (color: color-mix(in lab, red, red))", [y4]);
        O5.src = y4.src, v5.splice(N5, 1, D4, O5);
      }
  if (r2 & 1) {
    let v5 = [];
    if (c3.length > 0) {
      let k4 = J3(":root, :host", c3);
      k4.src = c3[0].src, v5.push(k4);
    }
    if (m2.length > 0) {
      let k4 = J3("*, ::before, ::after, ::backdrop", m2);
      k4.src = m2[0].src, v5.push(k4);
    }
    if (v5.length > 0) {
      let k4 = h8.findIndex((A3) => !(A3.kind === "comment" || A3.kind === "at-rule" && (A3.name === "@charset" || A3.name === "@import"))), y4 = B3("@layer", "properties", []);
      y4.src = v5[0].src, h8.splice(k4 < 0 ? h8.length : k4, 0, y4);
      let N5 = J3("@layer properties", [B3("@supports", "((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))", v5)]);
      N5.src = v5[0].src, N5.nodes[0].src = v5[0].src, h8.push(N5);
    }
  }
  return h8;
}
function ae2(e3, i) {
  let r2 = 0, t2 = { file: null, code: "" };
  function n3(l6, p3 = 0) {
    let f4 = "", c3 = "  ".repeat(p3);
    if (l6.kind === "declaration") {
      if (f4 += `${c3}${l6.property}: ${l6.value}${l6.important ? " !important" : ""};
`, i) {
        r2 += c3.length;
        let m2 = r2;
        r2 += l6.property.length, r2 += 2, r2 += l6.value?.length ?? 0, l6.important && (r2 += 11);
        let d3 = r2;
        r2 += 2, l6.dst = [t2, m2, d3];
      }
    } else if (l6.kind === "rule") {
      if (f4 += `${c3}${l6.selector} {
`, i) {
        r2 += c3.length;
        let m2 = r2;
        r2 += l6.selector.length, r2 += 1;
        let d3 = r2;
        l6.dst = [t2, m2, d3], r2 += 2;
      }
      for (let m2 of l6.nodes)
        f4 += n3(m2, p3 + 1);
      f4 += `${c3}}
`, i && (r2 += c3.length, r2 += 2);
    } else if (l6.kind === "at-rule") {
      if (l6.nodes.length === 0) {
        let m2 = `${c3}${l6.name} ${l6.params};
`;
        if (i) {
          r2 += c3.length;
          let d3 = r2;
          r2 += l6.name.length, r2 += 1, r2 += l6.params.length;
          let u2 = r2;
          r2 += 2, l6.dst = [t2, d3, u2];
        }
        return m2;
      }
      if (f4 += `${c3}${l6.name}${l6.params ? ` ${l6.params} ` : " "}{
`, i) {
        r2 += c3.length;
        let m2 = r2;
        r2 += l6.name.length, l6.params && (r2 += 1, r2 += l6.params.length), r2 += 1;
        let d3 = r2;
        l6.dst = [t2, m2, d3], r2 += 2;
      }
      for (let m2 of l6.nodes)
        f4 += n3(m2, p3 + 1);
      f4 += `${c3}}
`, i && (r2 += c3.length, r2 += 2);
    } else if (l6.kind === "comment") {
      if (f4 += `${c3}/*${l6.value}*/
`, i) {
        r2 += c3.length;
        let m2 = r2;
        r2 += 2 + l6.value.length + 2;
        let d3 = r2;
        l6.dst = [t2, m2, d3], r2 += 1;
      }
    } else if (l6.kind === "context" || l6.kind === "at-root")
      return "";
    return f4;
  }
  let s3 = "";
  for (let l6 of e3)
    s3 += n3(l6, 0);
  return t2.code = s3, s3;
}
function vn3(e3, i) {
  let r2 = [];
  return _5(e3, (t2, n3) => {
    if (i(t2))
      return r2 = n3.path(), r2.push(t2), V5.Stop;
  }), r2;
}
function Pr3(e3, i, r2, t2 = new Set) {
  if (t2.has(e3) || (t2.add(e3), i.getOptions(e3) & 24))
    return true;
  {
    let s3 = r2.get(e3) ?? [];
    for (let l6 of s3)
      if (Pr3(l6, i, r2, t2))
        return true;
  }
  return false;
}
function Rr2(e3) {
  return e3.split(/[\s,]+/);
}
function ye3(e3) {
  if (e3.indexOf("(") === -1)
    return De3(e3);
  let i = M3(e3);
  return zt3(i), e3 = F3(i), e3 = ie3(e3), e3;
}
function De3(e3, i = false) {
  let r2 = "";
  for (let t2 = 0;t2 < e3.length; t2++) {
    let n3 = e3[t2];
    n3 === "\\" && e3[t2 + 1] === "_" ? (r2 += "_", t2 += 1) : n3 === "_" && !i ? r2 += " " : r2 += n3;
  }
  return r2;
}
function zt3(e3) {
  for (let i of e3)
    switch (i.kind) {
      case "function": {
        if (i.value === "url" || i.value.endsWith("_url")) {
          i.value = De3(i.value);
          break;
        }
        if (i.value === "var" || i.value.endsWith("_var") || i.value === "theme" || i.value.endsWith("_theme")) {
          i.value = De3(i.value);
          for (let r2 = 0;r2 < i.nodes.length; r2++) {
            if (r2 == 0 && i.nodes[r2].kind === "word") {
              i.nodes[r2].value = De3(i.nodes[r2].value, true);
              continue;
            }
            zt3([i.nodes[r2]]);
          }
          break;
        }
        i.value = De3(i.value), zt3(i.nodes);
        break;
      }
      case "separator":
      case "word": {
        i.value = De3(i.value);
        break;
      }
      default:
        wn3(i);
    }
}
function wn3(e3) {
  throw new Error(`Unexpected value: ${e3}`);
}
function ke2(e3) {
  let i = 0, r2 = e3.length;
  for (let t2 = 0;t2 < r2; t2++) {
    let n3 = e3.charCodeAt(t2);
    switch (n3) {
      case 92:
        t2 += 1;
        break;
      case 39:
      case 34:
        for (;++t2 < r2; ) {
          let s3 = e3.charCodeAt(t2);
          if (s3 === 92) {
            t2 += 1;
            continue;
          }
          if (s3 === n3)
            break;
        }
        break;
      case 40:
        Lt2[i] = 41, i++;
        break;
      case 91:
        Lt2[i] = 93, i++;
        break;
      case 123:
        break;
      case 93:
      case 125:
      case 41:
        if (i === 0)
          return false;
        i > 0 && n3 === Lt2[i - 1] && i--;
        break;
      case 59:
        if (i === 0)
          return false;
        break;
    }
  }
  return true;
}
function Ue2(e3) {
  switch (e3.kind) {
    case "arbitrary":
      return { kind: e3.kind, property: e3.property, value: e3.value, modifier: e3.modifier ? { kind: e3.modifier.kind, value: e3.modifier.value } : null, variants: e3.variants.map(Ke2), important: e3.important, raw: e3.raw };
    case "static":
      return { kind: e3.kind, root: e3.root, variants: e3.variants.map(Ke2), important: e3.important, raw: e3.raw };
    case "functional":
      return { kind: e3.kind, root: e3.root, value: e3.value ? e3.value.kind === "arbitrary" ? { kind: e3.value.kind, dataType: e3.value.dataType, value: e3.value.value } : { kind: e3.value.kind, value: e3.value.value, fraction: e3.value.fraction } : null, modifier: e3.modifier ? { kind: e3.modifier.kind, value: e3.modifier.value } : null, variants: e3.variants.map(Ke2), important: e3.important, raw: e3.raw };
    default:
      throw new Error("Unknown candidate kind");
  }
}
function Ke2(e3) {
  switch (e3.kind) {
    case "arbitrary":
      return { kind: e3.kind, selector: e3.selector, relative: e3.relative };
    case "static":
      return { kind: e3.kind, root: e3.root };
    case "functional":
      return { kind: e3.kind, root: e3.root, value: e3.value ? { kind: e3.value.kind, value: e3.value.value } : null, modifier: e3.modifier ? { kind: e3.modifier.kind, value: e3.modifier.value } : null };
    case "compound":
      return { kind: e3.kind, root: e3.root, variant: Ke2(e3.variant), modifier: e3.modifier ? { kind: e3.modifier.kind, value: e3.modifier.value } : null };
    default:
      throw new Error("Unknown variant kind");
  }
}
function* Dr2(e3, i) {
  let r2 = d2(e3, ":");
  if (i.theme.prefix) {
    if (r2.length === 1 || r2[0] !== i.theme.prefix)
      return null;
    r2.shift();
  }
  let t2 = r2.pop(), n3 = [];
  for (let d3 = r2.length - 1;d3 >= 0; --d3) {
    let u2 = i.parseVariant(r2[d3]);
    if (u2 === null)
      return;
    n3.push(u2);
  }
  let s3 = false;
  t2[t2.length - 1] === "!" ? (s3 = true, t2 = t2.slice(0, -1)) : t2[0] === "!" && (s3 = true, t2 = t2.slice(1)), i.utilities.has(t2, "static") && !t2.includes("[") && (yield { kind: "static", root: t2, variants: n3, important: s3, raw: e3 });
  let [l6, p3 = null, f4] = d2(t2, "/");
  if (f4)
    return;
  let c3 = p3 === null ? null : jt2(p3);
  if (p3 !== null && c3 === null)
    return;
  if (l6[0] === "[") {
    if (l6[l6.length - 1] !== "]")
      return;
    let d3 = l6.charCodeAt(1);
    if (d3 !== Or2 && !(d3 >= _r3 && d3 <= Ir2))
      return;
    l6 = l6.slice(1, -1);
    let u2 = l6.indexOf(":");
    if (u2 === -1 || u2 === 0 || u2 === l6.length - 1)
      return;
    let h8 = l6.slice(0, u2), v5 = ye3(l6.slice(u2 + 1));
    if (!ke2(v5))
      return;
    yield { kind: "arbitrary", property: h8, value: v5, modifier: c3, variants: n3, important: s3, raw: e3 };
    return;
  }
  let m2;
  if (l6[l6.length - 1] === "]") {
    let d3 = l6.indexOf("-[");
    if (d3 === -1)
      return;
    let u2 = l6.slice(0, d3);
    if (!i.utilities.has(u2, "functional"))
      return;
    let h8 = l6.slice(d3 + 1);
    m2 = [[u2, h8]];
  } else if (l6[l6.length - 1] === ")") {
    let d3 = l6.indexOf("-(");
    if (d3 === -1)
      return;
    let u2 = l6.slice(0, d3);
    if (!i.utilities.has(u2, "functional"))
      return;
    let h8 = l6.slice(d3 + 2, -1), v5 = d2(h8, ":"), k4 = null;
    if (v5.length === 2 && (k4 = v5[0], h8 = v5[1]), h8[0] !== "-" || h8[1] !== "-" || !ke2(h8))
      return;
    m2 = [[u2, k4 === null ? `[var(${h8})]` : `[${k4}:var(${h8})]`]];
  } else
    m2 = Ur3(l6, (d3) => i.utilities.has(d3, "functional"));
  for (let [d3, u2] of m2) {
    let h8 = { kind: "functional", root: d3, modifier: c3, value: null, variants: n3, important: s3, raw: e3 };
    if (u2 === null) {
      yield h8;
      continue;
    }
    {
      let v5 = u2.indexOf("[");
      if (v5 !== -1) {
        if (u2[u2.length - 1] !== "]")
          return;
        let y4 = ye3(u2.slice(v5 + 1, -1));
        if (!ke2(y4))
          continue;
        let N5 = null;
        for (let A3 = 0;A3 < y4.length; A3++) {
          let b5 = y4.charCodeAt(A3);
          if (b5 === kn3) {
            N5 = y4.slice(0, A3), y4 = y4.slice(A3 + 1);
            break;
          }
          if (!(b5 === Or2 || b5 >= _r3 && b5 <= Ir2))
            break;
        }
        if (y4.length === 0 || y4.trim().length === 0 || N5 === "")
          continue;
        h8.value = { kind: "arbitrary", dataType: N5 || null, value: y4 };
      } else {
        let y4 = p3 === null || h8.modifier?.kind === "arbitrary" ? null : `${u2}/${p3}`;
        if (!Ft3.test(u2))
          continue;
        h8.value = { kind: "named", value: u2, fraction: y4 };
      }
    }
    yield h8;
  }
}
function jt2(e3) {
  if (e3[0] === "[" && e3[e3.length - 1] === "]") {
    let i = ye3(e3.slice(1, -1));
    return !ke2(i) || i.length === 0 || i.trim().length === 0 ? null : { kind: "arbitrary", value: i };
  }
  return e3[0] === "(" && e3[e3.length - 1] === ")" ? (e3 = e3.slice(1, -1), e3[0] !== "-" || e3[1] !== "-" || !ke2(e3) ? null : (e3 = `var(${e3})`, { kind: "arbitrary", value: ye3(e3) })) : Ft3.test(e3) ? { kind: "named", value: e3 } : null;
}
function Kr3(e3, i) {
  if (e3[0] === "[" && e3[e3.length - 1] === "]") {
    if (e3[1] === "@" && e3.includes("&"))
      return null;
    let r2 = ye3(e3.slice(1, -1));
    if (!ke2(r2) || r2.length === 0 || r2.trim().length === 0)
      return null;
    let t2 = r2[0] === ">" || r2[0] === "+" || r2[0] === "~";
    return !t2 && r2[0] !== "@" && !r2.includes("&") && (r2 = `&:is(${r2})`), { kind: "arbitrary", selector: r2, relative: t2 };
  }
  {
    let [r2, t2 = null, n3] = d2(e3, "/");
    if (n3)
      return null;
    let s3 = Ur3(r2, (l6) => i.variants.has(l6));
    for (let [l6, p3] of s3)
      switch (i.variants.kind(l6)) {
        case "static":
          return p3 !== null || t2 !== null ? null : { kind: "static", root: l6 };
        case "functional": {
          let f4 = t2 === null ? null : jt2(t2);
          if (t2 !== null && f4 === null)
            return null;
          if (p3 === null)
            return { kind: "functional", root: l6, modifier: f4, value: null };
          if (p3[p3.length - 1] === "]") {
            if (p3[0] !== "[")
              continue;
            let c3 = ye3(p3.slice(1, -1));
            return !ke2(c3) || c3.length === 0 || c3.trim().length === 0 ? null : { kind: "functional", root: l6, modifier: f4, value: { kind: "arbitrary", value: c3 } };
          }
          if (p3[p3.length - 1] === ")") {
            if (p3[0] !== "(")
              continue;
            let c3 = ye3(p3.slice(1, -1));
            return !ke2(c3) || c3.length === 0 || c3.trim().length === 0 || c3[0] !== "-" || c3[1] !== "-" ? null : { kind: "functional", root: l6, modifier: f4, value: { kind: "arbitrary", value: `var(${c3})` } };
          }
          if (!Ft3.test(p3))
            continue;
          return { kind: "functional", root: l6, modifier: f4, value: { kind: "named", value: p3 } };
        }
        case "compound": {
          if (p3 === null)
            return null;
          t2 && (l6 === "not" || l6 === "has" || l6 === "in") && (p3 = `${p3}/${t2}`, t2 = null);
          let f4 = i.parseVariant(p3);
          if (f4 === null || !i.variants.compoundsWith(l6, f4))
            return null;
          let c3 = t2 === null ? null : jt2(t2);
          return t2 !== null && c3 === null ? null : { kind: "compound", root: l6, modifier: c3, variant: f4 };
        }
      }
  }
  return null;
}
function* Ur3(e3, i) {
  i(e3) && (yield [e3, null]);
  let r2 = e3.lastIndexOf("-");
  for (;r2 > 0; ) {
    let t2 = e3.slice(0, r2);
    if (i(t2)) {
      let n3 = [t2, e3.slice(r2 + 1)];
      if (n3[1] === "" || n3[0] === "@" && i("@") && e3[r2] === "-")
        break;
      yield n3;
    }
    r2 = e3.lastIndexOf("-", r2 - 1);
  }
  e3[0] === "@" && i("@") && (yield ["@", e3.slice(1)]);
}
function zr3(e3, i) {
  let r2 = [];
  for (let n3 of i.variants)
    r2.unshift(mt3(n3));
  e3.theme.prefix && r2.unshift(e3.theme.prefix);
  let t2 = "";
  if (i.kind === "static" && (t2 += i.root), i.kind === "functional" && (t2 += i.root, i.value))
    if (i.value.kind === "arbitrary") {
      if (i.value !== null) {
        let n3 = Wt3(i.value.value), s3 = n3 ? i.value.value.slice(4, -1) : i.value.value, [l6, p3] = n3 ? ["(", ")"] : ["[", "]"];
        i.value.dataType ? t2 += `-${l6}${i.value.dataType}:${xe3(s3)}${p3}` : t2 += `-${l6}${xe3(s3)}${p3}`;
      }
    } else
      i.value.kind === "named" && (t2 += `-${i.value.value}`);
  return i.kind === "arbitrary" && (t2 += `[${i.property}:${xe3(i.value)}]`), (i.kind === "arbitrary" || i.kind === "functional") && (t2 += et3(i.modifier)), i.important && (t2 += "!"), r2.push(t2), r2.join(":");
}
function et3(e3) {
  if (e3 === null)
    return "";
  let i = Wt3(e3.value), r2 = i ? e3.value.slice(4, -1) : e3.value, [t2, n3] = i ? ["(", ")"] : ["[", "]"];
  return e3.kind === "arbitrary" ? `/${t2}${xe3(r2)}${n3}` : e3.kind === "named" ? `/${e3.value}` : "";
}
function mt3(e3) {
  if (e3.kind === "static")
    return e3.root;
  if (e3.kind === "arbitrary")
    return `[${xe3(xn3(e3.selector))}]`;
  let i = "";
  if (e3.kind === "functional") {
    i += e3.root;
    let r2 = e3.root !== "@";
    if (e3.value)
      if (e3.value.kind === "arbitrary") {
        let t2 = Wt3(e3.value.value), n3 = t2 ? e3.value.value.slice(4, -1) : e3.value.value, [s3, l6] = t2 ? ["(", ")"] : ["[", "]"];
        i += `${r2 ? "-" : ""}${s3}${xe3(n3)}${l6}`;
      } else
        e3.value.kind === "named" && (i += `${r2 ? "-" : ""}${e3.value.value}`);
  }
  return e3.kind === "compound" && (i += e3.root, i += "-", i += mt3(e3.variant)), (e3.kind === "functional" || e3.kind === "compound") && (i += et3(e3.modifier)), i;
}
function xe3(e3) {
  return bn3.get(e3);
}
function xn3(e3) {
  return yn3.get(e3);
}
function Mt3(e3) {
  for (let i of e3)
    switch (i.kind) {
      case "function": {
        if (i.value === "url" || i.value.endsWith("_url")) {
          i.value = Xe3(i.value);
          break;
        }
        if (i.value === "var" || i.value.endsWith("_var") || i.value === "theme" || i.value.endsWith("_theme")) {
          i.value = Xe3(i.value);
          for (let r2 = 0;r2 < i.nodes.length; r2++)
            Mt3([i.nodes[r2]]);
          break;
        }
        i.value = Xe3(i.value), Mt3(i.nodes);
        break;
      }
      case "separator":
        i.value = Xe3(i.value);
        break;
      case "word": {
        (i.value[0] !== "-" || i.value[1] !== "-") && (i.value = Xe3(i.value));
        break;
      }
      default:
        Cn3(i);
    }
}
function Wt3(e3) {
  return An3.get(e3);
}
function Cn3(e3) {
  throw new Error(`Unexpected value: ${e3}`);
}
function Xe3(e3) {
  return e3.replaceAll("_", String.raw`\_`).replaceAll(" ", "_");
}
function Te2(e3, i, r2) {
  if (e3 === i)
    return 0;
  let t2 = e3.indexOf("("), n3 = i.indexOf("("), s3 = t2 === -1 ? e3.replace(/[\d.]+/g, "") : e3.slice(0, t2), l6 = n3 === -1 ? i.replace(/[\d.]+/g, "") : i.slice(0, n3), p3 = (s3 === l6 ? 0 : s3 < l6 ? -1 : 1) || (r2 === "asc" ? parseInt(e3) - parseInt(i) : parseInt(i) - parseInt(e3));
  return Number.isNaN(p3) ? e3 < i ? -1 : 1 : p3;
}
function tt3(e3, i) {
  function r2(n3) {
    let s3 = F3([n3]), l6 = i(s3);
    return M3(l6);
  }
  return d2(e3, ",").map((n3) => {
    n3 = n3.trim();
    let s3 = M3(n3), l6 = null, p3 = 0, f4 = 0, c3 = false;
    return _5(s3, (m2) => {
      switch (m2.kind) {
        case "word": {
          if (Sn3.has(m2.value.toLowerCase()))
            return V5.Continue;
          if (Nn3.test(m2.value.toLowerCase()))
            return f4++, V5.Continue;
          if (m2.value[0] === "#" || ne3(m2.value))
            return c3 = true, V5.ReplaceStop(r2(m2));
          l6 = m2, p3++;
          break;
        }
        case "function":
          return Tn3.has(m2.value.toLowerCase()) ? (c3 = true, V5.ReplaceStop(r2(m2))) : $n3.has(m2.value.toLowerCase()) ? (f4++, V5.Skip) : (l6 = m2, p3++, V5.Skip);
        case "separator":
          return V5.Continue;
        default:
      }
    }), c3 ? F3(s3) : f4 < 2 ? n3 : p3 === 0 ? `${n3} ${i("currentcolor")}` : (p3 === 1 && _5(s3, (m2) => m2 === l6 ? (c3 = true, V5.ReplaceStop(r2(m2))) : V5.Skip), c3 ? F3(s3) : n3);
  }).join(", ");
}
function S4(e3, i, r2) {
  return B3("@property", e3, [o2("syntax", r2 ? `"${r2}"` : '"*"'), o2("inherits", "false"), ...i ? [o2("initial-value", i)] : []]);
}
function Q3(e3, i) {
  if (i === null)
    return e3;
  let r2 = Number(i);
  return Number.isNaN(r2) || (i = `${r2 * 100}%`), i === "100%" ? e3 : `color-mix(in oklab, ${e3} ${i}, transparent)`;
}
function jr3(e3, i) {
  let r2 = Number(i);
  return Number.isNaN(r2) || (i = `${r2 * 100}%`), `oklab(from ${e3} l a b / ${i})`;
}
function te4(e3, i, r2) {
  if (!i)
    return e3;
  if (i.kind === "arbitrary")
    return Q3(e3, i.value);
  let t2 = r2.resolve(i.value, ["--opacity"]);
  return t2 ? Q3(e3, t2) : de3(i.value) ? Q3(e3, `${i.value}%`) : null;
}
function oe3(e3, i, r2) {
  let t2 = null;
  switch (e3.value.value) {
    case "inherit": {
      t2 = "inherit";
      break;
    }
    case "transparent": {
      t2 = "transparent";
      break;
    }
    case "current": {
      t2 = "currentcolor";
      break;
    }
    default: {
      t2 = i.resolve(e3.value.value, r2);
      break;
    }
  }
  return t2 ? te4(t2, e3.modifier, i) : null;
}
function Fr3(e3) {
  let i = new Bt2;
  function r2(a2, g4) {
    function* w4(x4) {
      for (let $4 of e3.keysInNamespaces(x4))
        yield $4.replace(Mr3, (K4, T4, R5) => `${T4}.${R5}`);
    }
    let C3 = ["1/2", "1/3", "2/3", "1/4", "2/4", "3/4", "1/5", "2/5", "3/5", "4/5", "1/6", "2/6", "3/6", "4/6", "5/6", "1/12", "2/12", "3/12", "4/12", "5/12", "6/12", "7/12", "8/12", "9/12", "10/12", "11/12"];
    i.suggest(a2, () => {
      let x4 = [];
      for (let $4 of g4()) {
        if (typeof $4 == "string") {
          x4.push({ values: [$4], modifiers: [] });
          continue;
        }
        let K4 = [...$4.values ?? [], ...w4($4.valueThemeKeys ?? [])], T4 = [...$4.modifiers ?? [], ...w4($4.modifierThemeKeys ?? [])];
        $4.supportsFractions && K4.push(...C3), $4.hasDefaultValue && K4.unshift(null), x4.push({ supportsNegative: $4.supportsNegative, values: K4, modifiers: T4 });
      }
      return x4;
    });
  }
  function t2(a2, g4) {
    i.static(a2, () => g4.map((w4) => typeof w4 == "function" ? w4() : o2(w4[0], w4[1])));
  }
  function n3(a2, g4) {
    g4.staticValues && (g4.staticValues = Object.assign(Object.create(null), g4.staticValues));
    function w4({ negative: C3 }) {
      return (x4) => {
        let $4 = null, K4 = null;
        if (x4.value)
          if (x4.value.kind === "arbitrary") {
            if (x4.modifier)
              return;
            $4 = x4.value.value, K4 = x4.value.dataType;
          } else {
            if ($4 = e3.resolve(x4.value.fraction ?? x4.value.value, g4.themeKeys ?? []), $4 === null && g4.supportsFractions && x4.value.fraction) {
              let [T4, R5] = d2(x4.value.fraction, "/");
              if (!u(T4) || !u(R5))
                return;
              $4 = `calc(${T4} / ${R5} * 100%)`;
            }
            if ($4 === null && C3 && g4.handleNegativeBareValue) {
              if ($4 = g4.handleNegativeBareValue(x4.value), !$4?.includes("/") && x4.modifier)
                return;
              if ($4 !== null)
                return g4.handle($4, null);
            }
            if ($4 === null && g4.handleBareValue && ($4 = g4.handleBareValue(x4.value), !$4?.includes("/") && x4.modifier))
              return;
            if ($4 === null && !C3 && g4.staticValues && !x4.modifier) {
              let T4 = g4.staticValues[x4.value.value];
              if (T4)
                return T4.map(re3);
            }
          }
        else {
          if (x4.modifier)
            return;
          $4 = g4.defaultValue !== undefined ? g4.defaultValue : e3.resolve(null, g4.themeKeys ?? []);
        }
        if ($4 !== null)
          return g4.handle(C3 ? ie3(`calc(${$4} * -1)`) : $4, K4);
      };
    }
    if (g4.supportsNegative && i.functional(`-${a2}`, w4({ negative: true })), i.functional(a2, w4({ negative: false })), r2(a2, () => [{ supportsNegative: g4.supportsNegative, valueThemeKeys: g4.themeKeys ?? [], hasDefaultValue: g4.defaultValue !== undefined && g4.defaultValue !== null, supportsFractions: g4.supportsFractions }]), g4.staticValues && Object.keys(g4.staticValues).length > 0) {
      let C3 = Object.keys(g4.staticValues);
      r2(a2, () => [{ values: C3 }]);
    }
  }
  function s3(a2, g4) {
    i.functional(a2, (w4) => {
      if (!w4.value)
        return;
      let C3 = null;
      if (w4.value.kind === "arbitrary" ? (C3 = w4.value.value, C3 = te4(C3, w4.modifier, e3)) : C3 = oe3(w4, e3, g4.themeKeys), C3 !== null)
        return g4.handle(C3);
    }), r2(a2, () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: g4.themeKeys, modifiers: Array.from({ length: 21 }, (w4, C3) => `${C3 * 5}`) }]);
  }
  function l6(a2, g4, w4, { supportsNegative: C3 = false, supportsFractions: x4 = false, staticValues: $4 } = {}) {
    C3 && i.static(`-${a2}-px`, () => w4("-1px")), i.static(`${a2}-px`, () => w4("1px")), n3(a2, { themeKeys: g4, supportsFractions: x4, supportsNegative: C3, defaultValue: null, handleBareValue: ({ value: K4 }) => !e3.resolve(null, ["--spacing"]) || !ue3(K4) ? null : `--spacing(${K4})`, handleNegativeBareValue: ({ value: K4 }) => !e3.resolve(null, ["--spacing"]) || !ue3(K4) ? null : `--spacing(-${K4})`, handle: w4, staticValues: $4 }), r2(a2, () => [{ values: e3.get(["--spacing"]) ? wt2 : [], supportsNegative: C3, supportsFractions: x4, valueThemeKeys: g4 }]);
  }
  t2("sr-only", [["position", "absolute"], ["width", "1px"], ["height", "1px"], ["padding", "0"], ["margin", "-1px"], ["overflow", "hidden"], ["clip-path", "inset(50%)"], ["white-space", "nowrap"], ["border-width", "0"]]), t2("not-sr-only", [["position", "static"], ["width", "auto"], ["height", "auto"], ["padding", "0"], ["margin", "0"], ["overflow", "visible"], ["clip-path", "none"], ["white-space", "normal"]]), t2("pointer-events-none", [["pointer-events", "none"]]), t2("pointer-events-auto", [["pointer-events", "auto"]]), t2("visible", [["visibility", "visible"]]), t2("invisible", [["visibility", "hidden"]]), t2("collapse", [["visibility", "collapse"]]), t2("static", [["position", "static"]]), t2("fixed", [["position", "fixed"]]), t2("absolute", [["position", "absolute"]]), t2("relative", [["position", "relative"]]), t2("sticky", [["position", "sticky"]]);
  for (let [a2, g4] of [["inset", "inset"], ["inset-x", "inset-inline"], ["inset-y", "inset-block"], ["inset-s", "inset-inline-start"], ["inset-e", "inset-inline-end"], ["inset-bs", "inset-block-start"], ["inset-be", "inset-block-end"], ["top", "top"], ["right", "right"], ["bottom", "bottom"], ["left", "left"]])
    t2(`${a2}-auto`, [[g4, "auto"]]), t2(`${a2}-full`, [[g4, "100%"]]), t2(`-${a2}-full`, [[g4, "-100%"]]), l6(a2, ["--inset", "--spacing"], (w4) => [o2(g4, w4)], { supportsNegative: true, supportsFractions: true });
  t2("isolate", [["isolation", "isolate"]]), t2("isolation-auto", [["isolation", "auto"]]), n3("z", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--z-index"], handle: (a2) => [o2("z-index", a2)], staticValues: { auto: [o2("z-index", "auto")] } }), r2("z", () => [{ supportsNegative: true, values: ["0", "10", "20", "30", "40", "50"], valueThemeKeys: ["--z-index"] }]), n3("order", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--order"], handle: (a2) => [o2("order", a2)], staticValues: { first: [o2("order", "-9999")], last: [o2("order", "9999")] } }), r2("order", () => [{ supportsNegative: true, values: Array.from({ length: 12 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--order"] }]), n3("col", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--grid-column"], handle: (a2) => [o2("grid-column", a2)], staticValues: { auto: [o2("grid-column", "auto")] } }), n3("col-span", { handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, handle: (a2) => [o2("grid-column", `span ${a2} / span ${a2}`)], staticValues: { full: [o2("grid-column", "1 / -1")] } }), n3("col-start", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--grid-column-start"], handle: (a2) => [o2("grid-column-start", a2)], staticValues: { auto: [o2("grid-column-start", "auto")] } }), n3("col-end", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--grid-column-end"], handle: (a2) => [o2("grid-column-end", a2)], staticValues: { auto: [o2("grid-column-end", "auto")] } }), r2("col-span", () => [{ values: Array.from({ length: 12 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: [] }]), r2("col-start", () => [{ supportsNegative: true, values: Array.from({ length: 13 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--grid-column-start"] }]), r2("col-end", () => [{ supportsNegative: true, values: Array.from({ length: 13 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--grid-column-end"] }]), n3("row", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--grid-row"], handle: (a2) => [o2("grid-row", a2)], staticValues: { auto: [o2("grid-row", "auto")] } }), n3("row-span", { themeKeys: [], handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, handle: (a2) => [o2("grid-row", `span ${a2} / span ${a2}`)], staticValues: { full: [o2("grid-row", "1 / -1")] } }), n3("row-start", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--grid-row-start"], handle: (a2) => [o2("grid-row-start", a2)], staticValues: { auto: [o2("grid-row-start", "auto")] } }), n3("row-end", { supportsNegative: true, handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, themeKeys: ["--grid-row-end"], handle: (a2) => [o2("grid-row-end", a2)], staticValues: { auto: [o2("grid-row-end", "auto")] } }), r2("row-span", () => [{ values: Array.from({ length: 12 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: [] }]), r2("row-start", () => [{ supportsNegative: true, values: Array.from({ length: 13 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--grid-row-start"] }]), r2("row-end", () => [{ supportsNegative: true, values: Array.from({ length: 13 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--grid-row-end"] }]), t2("float-start", [["float", "inline-start"]]), t2("float-end", [["float", "inline-end"]]), t2("float-right", [["float", "right"]]), t2("float-left", [["float", "left"]]), t2("float-none", [["float", "none"]]), t2("clear-start", [["clear", "inline-start"]]), t2("clear-end", [["clear", "inline-end"]]), t2("clear-right", [["clear", "right"]]), t2("clear-left", [["clear", "left"]]), t2("clear-both", [["clear", "both"]]), t2("clear-none", [["clear", "none"]]);
  for (let [a2, g4] of [["m", "margin"], ["mx", "margin-inline"], ["my", "margin-block"], ["ms", "margin-inline-start"], ["me", "margin-inline-end"], ["mbs", "margin-block-start"], ["mbe", "margin-block-end"], ["mt", "margin-top"], ["mr", "margin-right"], ["mb", "margin-bottom"], ["ml", "margin-left"]])
    t2(`${a2}-auto`, [[g4, "auto"]]), l6(a2, ["--margin", "--spacing"], (w4) => [o2(g4, w4)], { supportsNegative: true });
  t2("box-border", [["box-sizing", "border-box"]]), t2("box-content", [["box-sizing", "content-box"]]), n3("line-clamp", { themeKeys: ["--line-clamp"], handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, handle: (a2) => [o2("overflow", "hidden"), o2("display", "-webkit-box"), o2("-webkit-box-orient", "vertical"), o2("-webkit-line-clamp", a2)], staticValues: { none: [o2("overflow", "visible"), o2("display", "block"), o2("-webkit-box-orient", "horizontal"), o2("-webkit-line-clamp", "unset")] } }), r2("line-clamp", () => [{ values: ["1", "2", "3", "4", "5", "6"], valueThemeKeys: ["--line-clamp"] }]), t2("block", [["display", "block"]]), t2("inline-block", [["display", "inline-block"]]), t2("inline", [["display", "inline"]]), t2("hidden", [["display", "none"]]), t2("inline-flex", [["display", "inline-flex"]]), t2("table", [["display", "table"]]), t2("inline-table", [["display", "inline-table"]]), t2("table-caption", [["display", "table-caption"]]), t2("table-cell", [["display", "table-cell"]]), t2("table-column", [["display", "table-column"]]), t2("table-column-group", [["display", "table-column-group"]]), t2("table-footer-group", [["display", "table-footer-group"]]), t2("table-header-group", [["display", "table-header-group"]]), t2("table-row-group", [["display", "table-row-group"]]), t2("table-row", [["display", "table-row"]]), t2("flow-root", [["display", "flow-root"]]), t2("flex", [["display", "flex"]]), t2("grid", [["display", "grid"]]), t2("inline-grid", [["display", "inline-grid"]]), t2("contents", [["display", "contents"]]), t2("list-item", [["display", "list-item"]]), t2("field-sizing-content", [["field-sizing", "content"]]), t2("field-sizing-fixed", [["field-sizing", "fixed"]]), n3("aspect", { themeKeys: ["--aspect"], handleBareValue: ({ fraction: a2 }) => {
    if (a2 === null)
      return null;
    let [g4, w4] = d2(a2, "/");
    return !ue3(g4) || !ue3(w4) ? null : a2;
  }, handle: (a2) => [o2("aspect-ratio", a2)], staticValues: { auto: [o2("aspect-ratio", "auto")], square: [o2("aspect-ratio", "1 / 1")] } });
  for (let [a2, g4] of [["full", "100%"], ["svw", "100svw"], ["lvw", "100lvw"], ["dvw", "100dvw"], ["svh", "100svh"], ["lvh", "100lvh"], ["dvh", "100dvh"], ["min", "min-content"], ["max", "max-content"], ["fit", "fit-content"]])
    t2(`size-${a2}`, [["--tw-sort", "size"], ["width", g4], ["height", g4]]), t2(`w-${a2}`, [["width", g4]]), t2(`h-${a2}`, [["height", g4]]), t2(`min-w-${a2}`, [["min-width", g4]]), t2(`min-h-${a2}`, [["min-height", g4]]), t2(`max-w-${a2}`, [["max-width", g4]]), t2(`max-h-${a2}`, [["max-height", g4]]);
  t2("size-auto", [["--tw-sort", "size"], ["width", "auto"], ["height", "auto"]]), t2("w-auto", [["width", "auto"]]), t2("h-auto", [["height", "auto"]]), t2("min-w-auto", [["min-width", "auto"]]), t2("min-h-auto", [["min-height", "auto"]]), t2("h-lh", [["height", "1lh"]]), t2("min-h-lh", [["min-height", "1lh"]]), t2("max-h-lh", [["max-height", "1lh"]]), t2("w-screen", [["width", "100vw"]]), t2("min-w-screen", [["min-width", "100vw"]]), t2("max-w-screen", [["max-width", "100vw"]]), t2("h-screen", [["height", "100vh"]]), t2("min-h-screen", [["min-height", "100vh"]]), t2("max-h-screen", [["max-height", "100vh"]]), t2("max-w-none", [["max-width", "none"]]), t2("max-h-none", [["max-height", "none"]]), l6("size", ["--size", "--spacing"], (a2) => [o2("--tw-sort", "size"), o2("width", a2), o2("height", a2)], { supportsFractions: true });
  for (let [a2, g4, w4] of [["w", ["--width", "--spacing", "--container"], "width"], ["min-w", ["--min-width", "--spacing", "--container"], "min-width"], ["max-w", ["--max-width", "--spacing", "--container"], "max-width"], ["h", ["--height", "--spacing"], "height"], ["min-h", ["--min-height", "--height", "--spacing"], "min-height"], ["max-h", ["--max-height", "--height", "--spacing"], "max-height"]])
    l6(a2, g4, (C3) => [o2(w4, C3)], { supportsFractions: true });
  for (let [a2, g4] of [["full", "100%"], ["min", "min-content"], ["max", "max-content"], ["fit", "fit-content"]])
    t2(`inline-${a2}`, [["inline-size", g4]]), t2(`block-${a2}`, [["block-size", g4]]), t2(`min-inline-${a2}`, [["min-inline-size", g4]]), t2(`min-block-${a2}`, [["min-block-size", g4]]), t2(`max-inline-${a2}`, [["max-inline-size", g4]]), t2(`max-block-${a2}`, [["max-block-size", g4]]);
  for (let [a2, g4] of [["svw", "100svw"], ["lvw", "100lvw"], ["dvw", "100dvw"]])
    t2(`inline-${a2}`, [["inline-size", g4]]), t2(`min-inline-${a2}`, [["min-inline-size", g4]]), t2(`max-inline-${a2}`, [["max-inline-size", g4]]);
  for (let [a2, g4] of [["svh", "100svh"], ["lvh", "100lvh"], ["dvh", "100dvh"]])
    t2(`block-${a2}`, [["block-size", g4]]), t2(`min-block-${a2}`, [["min-block-size", g4]]), t2(`max-block-${a2}`, [["max-block-size", g4]]);
  t2("inline-auto", [["inline-size", "auto"]]), t2("block-auto", [["block-size", "auto"]]), t2("min-inline-auto", [["min-inline-size", "auto"]]), t2("min-block-auto", [["min-block-size", "auto"]]), t2("block-lh", [["block-size", "1lh"]]), t2("min-block-lh", [["min-block-size", "1lh"]]), t2("max-block-lh", [["max-block-size", "1lh"]]), t2("inline-screen", [["inline-size", "100vw"]]), t2("min-inline-screen", [["min-inline-size", "100vw"]]), t2("max-inline-screen", [["max-inline-size", "100vw"]]), t2("block-screen", [["block-size", "100vh"]]), t2("min-block-screen", [["min-block-size", "100vh"]]), t2("max-block-screen", [["max-block-size", "100vh"]]), t2("max-inline-none", [["max-inline-size", "none"]]), t2("max-block-none", [["max-block-size", "none"]]);
  for (let [a2, g4, w4] of [["inline", ["--spacing", "--container"], "inline-size"], ["min-inline", ["--spacing", "--container"], "min-inline-size"], ["max-inline", ["--spacing", "--container"], "max-inline-size"], ["block", ["--spacing"], "block-size"], ["min-block", ["--spacing"], "min-block-size"], ["max-block", ["--spacing"], "max-block-size"]])
    l6(a2, g4, (C3) => [o2(w4, C3)], { supportsFractions: true });
  i.static("container", () => {
    let a2 = [...e3.namespace("--breakpoint").values()];
    a2.sort((w4, C3) => Te2(w4, C3, "asc"));
    let g4 = [o2("--tw-sort", "--tw-container-component"), o2("width", "100%")];
    for (let w4 of a2)
      g4.push(B3("@media", `(width >= ${w4})`, [o2("max-width", w4)]));
    return g4;
  }), t2("flex-auto", [["flex", "auto"]]), t2("flex-initial", [["flex", "0 auto"]]), t2("flex-none", [["flex", "none"]]), i.functional("flex", (a2) => {
    if (a2.value) {
      if (a2.value.kind === "arbitrary")
        return a2.modifier ? undefined : [o2("flex", a2.value.value)];
      if (a2.value.fraction) {
        let [g4, w4] = d2(a2.value.fraction, "/");
        return !u(g4) || !u(w4) ? undefined : [o2("flex", `calc(${a2.value.fraction} * 100%)`)];
      }
      if (u(a2.value.value))
        return a2.modifier ? undefined : [o2("flex", a2.value.value)];
    }
  }), r2("flex", () => [{ supportsFractions: true }, { values: Array.from({ length: 12 }, (a2, g4) => `${g4 + 1}`) }]), n3("shrink", { defaultValue: "1", handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, handle: (a2) => [o2("flex-shrink", a2)] }), n3("grow", { defaultValue: "1", handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, handle: (a2) => [o2("flex-grow", a2)] }), r2("shrink", () => [{ values: ["0"], valueThemeKeys: [], hasDefaultValue: true }]), r2("grow", () => [{ values: ["0"], valueThemeKeys: [], hasDefaultValue: true }]), t2("basis-auto", [["flex-basis", "auto"]]), t2("basis-full", [["flex-basis", "100%"]]), l6("basis", ["--flex-basis", "--spacing", "--container"], (a2) => [o2("flex-basis", a2)], { supportsFractions: true }), t2("table-auto", [["table-layout", "auto"]]), t2("table-fixed", [["table-layout", "fixed"]]), t2("caption-top", [["caption-side", "top"]]), t2("caption-bottom", [["caption-side", "bottom"]]), t2("border-collapse", [["border-collapse", "collapse"]]), t2("border-separate", [["border-collapse", "separate"]]);
  let p3 = () => Y4([S4("--tw-border-spacing-x", "0", "<length>"), S4("--tw-border-spacing-y", "0", "<length>")]);
  l6("border-spacing", ["--border-spacing", "--spacing"], (a2) => [p3(), o2("--tw-border-spacing-x", a2), o2("--tw-border-spacing-y", a2), o2("border-spacing", "var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]), l6("border-spacing-x", ["--border-spacing", "--spacing"], (a2) => [p3(), o2("--tw-border-spacing-x", a2), o2("border-spacing", "var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]), l6("border-spacing-y", ["--border-spacing", "--spacing"], (a2) => [p3(), o2("--tw-border-spacing-y", a2), o2("border-spacing", "var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]), n3("origin", { themeKeys: ["--transform-origin"], handle: (a2) => [o2("transform-origin", a2)], staticValues: { center: [o2("transform-origin", "center")], top: [o2("transform-origin", "top")], "top-right": [o2("transform-origin", "100% 0")], right: [o2("transform-origin", "100%")], "bottom-right": [o2("transform-origin", "100% 100%")], bottom: [o2("transform-origin", "bottom")], "bottom-left": [o2("transform-origin", "0 100%")], left: [o2("transform-origin", "0")], "top-left": [o2("transform-origin", "0 0")] } }), n3("perspective-origin", { themeKeys: ["--perspective-origin"], handle: (a2) => [o2("perspective-origin", a2)], staticValues: { center: [o2("perspective-origin", "center")], top: [o2("perspective-origin", "top")], "top-right": [o2("perspective-origin", "100% 0")], right: [o2("perspective-origin", "100%")], "bottom-right": [o2("perspective-origin", "100% 100%")], bottom: [o2("perspective-origin", "bottom")], "bottom-left": [o2("perspective-origin", "0 100%")], left: [o2("perspective-origin", "0")], "top-left": [o2("perspective-origin", "0 0")] } }), n3("perspective", { themeKeys: ["--perspective"], handle: (a2) => [o2("perspective", a2)], staticValues: { none: [o2("perspective", "none")] } });
  let f4 = () => Y4([S4("--tw-translate-x", "0"), S4("--tw-translate-y", "0"), S4("--tw-translate-z", "0")]);
  t2("translate-none", [["translate", "none"]]), t2("-translate-full", [f4, ["--tw-translate-x", "-100%"], ["--tw-translate-y", "-100%"], ["translate", "var(--tw-translate-x) var(--tw-translate-y)"]]), t2("translate-full", [f4, ["--tw-translate-x", "100%"], ["--tw-translate-y", "100%"], ["translate", "var(--tw-translate-x) var(--tw-translate-y)"]]), l6("translate", ["--translate", "--spacing"], (a2) => [f4(), o2("--tw-translate-x", a2), o2("--tw-translate-y", a2), o2("translate", "var(--tw-translate-x) var(--tw-translate-y)")], { supportsNegative: true, supportsFractions: true });
  for (let a2 of ["x", "y"])
    t2(`-translate-${a2}-full`, [f4, [`--tw-translate-${a2}`, "-100%"], ["translate", "var(--tw-translate-x) var(--tw-translate-y)"]]), t2(`translate-${a2}-full`, [f4, [`--tw-translate-${a2}`, "100%"], ["translate", "var(--tw-translate-x) var(--tw-translate-y)"]]), l6(`translate-${a2}`, ["--translate", "--spacing"], (g4) => [f4(), o2(`--tw-translate-${a2}`, g4), o2("translate", "var(--tw-translate-x) var(--tw-translate-y)")], { supportsNegative: true, supportsFractions: true });
  l6("translate-z", ["--translate", "--spacing"], (a2) => [f4(), o2("--tw-translate-z", a2), o2("translate", "var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)")], { supportsNegative: true }), t2("translate-3d", [f4, ["translate", "var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)"]]);
  let c3 = () => Y4([S4("--tw-scale-x", "1"), S4("--tw-scale-y", "1"), S4("--tw-scale-z", "1")]);
  t2("scale-none", [["scale", "none"]]);
  function m2({ negative: a2 }) {
    return (g4) => {
      if (!g4.value || g4.modifier)
        return;
      let w4;
      return g4.value.kind === "arbitrary" ? (w4 = g4.value.value, w4 = a2 ? `calc(${w4} * -1)` : w4, [o2("scale", w4)]) : (w4 = e3.resolve(g4.value.value, ["--scale"]), !w4 && u(g4.value.value) && (w4 = `${g4.value.value}%`), w4 ? (w4 = a2 ? `calc(${w4} * -1)` : w4, [c3(), o2("--tw-scale-x", w4), o2("--tw-scale-y", w4), o2("--tw-scale-z", w4), o2("scale", "var(--tw-scale-x) var(--tw-scale-y)")]) : undefined);
    };
  }
  i.functional("-scale", m2({ negative: true })), i.functional("scale", m2({ negative: false })), r2("scale", () => [{ supportsNegative: true, values: ["0", "50", "75", "90", "95", "100", "105", "110", "125", "150", "200"], valueThemeKeys: ["--scale"] }]);
  for (let a2 of ["x", "y", "z"])
    n3(`scale-${a2}`, { supportsNegative: true, themeKeys: ["--scale"], handleBareValue: ({ value: g4 }) => u(g4) ? `${g4}%` : null, handle: (g4) => [c3(), o2(`--tw-scale-${a2}`, g4), o2("scale", `var(--tw-scale-x) var(--tw-scale-y)${a2 === "z" ? " var(--tw-scale-z)" : ""}`)] }), r2(`scale-${a2}`, () => [{ supportsNegative: true, values: ["0", "50", "75", "90", "95", "100", "105", "110", "125", "150", "200"], valueThemeKeys: ["--scale"] }]);
  t2("scale-3d", [c3, ["scale", "var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)"]]), t2("rotate-none", [["rotate", "none"]]);
  function d3({ negative: a2 }) {
    return (g4) => {
      if (!g4.value || g4.modifier)
        return;
      let w4;
      if (g4.value.kind === "arbitrary") {
        w4 = g4.value.value;
        let C3 = g4.value.dataType ?? pe2(w4, ["angle", "vector"]);
        if (C3 === "vector")
          return [o2("rotate", `${w4} var(--tw-rotate)`)];
        if (C3 !== "angle")
          return [o2("rotate", a2 ? `calc(${w4} * -1)` : w4)];
      } else if (w4 = e3.resolve(g4.value.value, ["--rotate"]), !w4 && u(g4.value.value) && (w4 = `${g4.value.value}deg`), !w4)
        return;
      return [o2("rotate", a2 ? `calc(${w4} * -1)` : w4)];
    };
  }
  i.functional("-rotate", d3({ negative: true })), i.functional("rotate", d3({ negative: false })), r2("rotate", () => [{ supportsNegative: true, values: ["0", "1", "2", "3", "6", "12", "45", "90", "180"], valueThemeKeys: ["--rotate"] }]);
  {
    let a2 = ["var(--tw-rotate-x,)", "var(--tw-rotate-y,)", "var(--tw-rotate-z,)", "var(--tw-skew-x,)", "var(--tw-skew-y,)"].join(" "), g4 = () => Y4([S4("--tw-rotate-x"), S4("--tw-rotate-y"), S4("--tw-rotate-z"), S4("--tw-skew-x"), S4("--tw-skew-y")]);
    for (let w4 of ["x", "y", "z"])
      n3(`rotate-${w4}`, { supportsNegative: true, themeKeys: ["--rotate"], handleBareValue: ({ value: C3 }) => u(C3) ? `${C3}deg` : null, handle: (C3) => [g4(), o2(`--tw-rotate-${w4}`, `rotate${w4.toUpperCase()}(${C3})`), o2("transform", a2)] }), r2(`rotate-${w4}`, () => [{ supportsNegative: true, values: ["0", "1", "2", "3", "6", "12", "45", "90", "180"], valueThemeKeys: ["--rotate"] }]);
    n3("skew", { supportsNegative: true, themeKeys: ["--skew"], handleBareValue: ({ value: w4 }) => u(w4) ? `${w4}deg` : null, handle: (w4) => [g4(), o2("--tw-skew-x", `skewX(${w4})`), o2("--tw-skew-y", `skewY(${w4})`), o2("transform", a2)] }), n3("skew-x", { supportsNegative: true, themeKeys: ["--skew"], handleBareValue: ({ value: w4 }) => u(w4) ? `${w4}deg` : null, handle: (w4) => [g4(), o2("--tw-skew-x", `skewX(${w4})`), o2("transform", a2)] }), n3("skew-y", { supportsNegative: true, themeKeys: ["--skew"], handleBareValue: ({ value: w4 }) => u(w4) ? `${w4}deg` : null, handle: (w4) => [g4(), o2("--tw-skew-y", `skewY(${w4})`), o2("transform", a2)] }), r2("skew", () => [{ supportsNegative: true, values: ["0", "1", "2", "3", "6", "12"], valueThemeKeys: ["--skew"] }]), r2("skew-x", () => [{ supportsNegative: true, values: ["0", "1", "2", "3", "6", "12"], valueThemeKeys: ["--skew"] }]), r2("skew-y", () => [{ supportsNegative: true, values: ["0", "1", "2", "3", "6", "12"], valueThemeKeys: ["--skew"] }]), i.functional("transform", (w4) => {
      if (w4.modifier)
        return;
      let C3 = null;
      if (w4.value ? w4.value.kind === "arbitrary" && (C3 = w4.value.value) : C3 = a2, C3 !== null)
        return [g4(), o2("transform", C3)];
    }), r2("transform", () => [{ hasDefaultValue: true }]), t2("transform-cpu", [["transform", a2]]), t2("transform-gpu", [["transform", `translateZ(0) ${a2}`]]), t2("transform-none", [["transform", "none"]]);
  }
  n3("zoom", { handleBareValue: ({ value: a2 }) => u(a2) ? `${a2}%` : null, handle: (a2) => [o2("zoom", a2)] }), r2("zoom", () => [{ values: ["50", "75", "90", "95", "100", "105", "110", "125", "150", "200"] }]), t2("transform-flat", [["transform-style", "flat"]]), t2("transform-3d", [["transform-style", "preserve-3d"]]), t2("transform-content", [["transform-box", "content-box"]]), t2("transform-border", [["transform-box", "border-box"]]), t2("transform-fill", [["transform-box", "fill-box"]]), t2("transform-stroke", [["transform-box", "stroke-box"]]), t2("transform-view", [["transform-box", "view-box"]]), t2("backface-visible", [["backface-visibility", "visible"]]), t2("backface-hidden", [["backface-visibility", "hidden"]]);
  for (let a2 of ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"])
    t2(`cursor-${a2}`, [["cursor", a2]]);
  n3("cursor", { themeKeys: ["--cursor"], handle: (a2) => [o2("cursor", a2)] });
  for (let a2 of ["auto", "none", "manipulation"])
    t2(`touch-${a2}`, [["touch-action", a2]]);
  let u2 = () => Y4([S4("--tw-pan-x"), S4("--tw-pan-y"), S4("--tw-pinch-zoom")]);
  for (let a2 of ["x", "left", "right"])
    t2(`touch-pan-${a2}`, [u2, ["--tw-pan-x", `pan-${a2}`], ["touch-action", "var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);
  for (let a2 of ["y", "up", "down"])
    t2(`touch-pan-${a2}`, [u2, ["--tw-pan-y", `pan-${a2}`], ["touch-action", "var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);
  t2("touch-pinch-zoom", [u2, ["--tw-pinch-zoom", "pinch-zoom"], ["touch-action", "var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);
  for (let a2 of ["none", "text", "all", "auto"])
    t2(`select-${a2}`, [["-webkit-user-select", a2], ["user-select", a2]]);
  t2("resize-none", [["resize", "none"]]), t2("resize-x", [["resize", "horizontal"]]), t2("resize-y", [["resize", "vertical"]]), t2("resize", [["resize", "both"]]), t2("snap-none", [["scroll-snap-type", "none"]]);
  let h8 = () => Y4([S4("--tw-scroll-snap-strictness", "proximity", "*")]);
  for (let a2 of ["x", "y", "both"])
    t2(`snap-${a2}`, [h8, ["scroll-snap-type", `${a2} var(--tw-scroll-snap-strictness)`]]);
  t2("snap-mandatory", [h8, ["--tw-scroll-snap-strictness", "mandatory"]]), t2("snap-proximity", [h8, ["--tw-scroll-snap-strictness", "proximity"]]), t2("snap-align-none", [["scroll-snap-align", "none"]]), t2("snap-start", [["scroll-snap-align", "start"]]), t2("snap-end", [["scroll-snap-align", "end"]]), t2("snap-center", [["scroll-snap-align", "center"]]), t2("snap-normal", [["scroll-snap-stop", "normal"]]), t2("snap-always", [["scroll-snap-stop", "always"]]);
  for (let [a2, g4] of [["scroll-m", "scroll-margin"], ["scroll-mx", "scroll-margin-inline"], ["scroll-my", "scroll-margin-block"], ["scroll-ms", "scroll-margin-inline-start"], ["scroll-me", "scroll-margin-inline-end"], ["scroll-mbs", "scroll-margin-block-start"], ["scroll-mbe", "scroll-margin-block-end"], ["scroll-mt", "scroll-margin-top"], ["scroll-mr", "scroll-margin-right"], ["scroll-mb", "scroll-margin-bottom"], ["scroll-ml", "scroll-margin-left"]])
    l6(a2, ["--scroll-margin", "--spacing"], (w4) => [o2(g4, w4)], { supportsNegative: true });
  for (let [a2, g4] of [["scroll-p", "scroll-padding"], ["scroll-px", "scroll-padding-inline"], ["scroll-py", "scroll-padding-block"], ["scroll-ps", "scroll-padding-inline-start"], ["scroll-pe", "scroll-padding-inline-end"], ["scroll-pbs", "scroll-padding-block-start"], ["scroll-pbe", "scroll-padding-block-end"], ["scroll-pt", "scroll-padding-top"], ["scroll-pr", "scroll-padding-right"], ["scroll-pb", "scroll-padding-bottom"], ["scroll-pl", "scroll-padding-left"]])
    l6(a2, ["--scroll-padding", "--spacing"], (w4) => [o2(g4, w4)]);
  t2("list-inside", [["list-style-position", "inside"]]), t2("list-outside", [["list-style-position", "outside"]]), n3("list", { themeKeys: ["--list-style-type"], handle: (a2) => [o2("list-style-type", a2)], staticValues: { none: [o2("list-style-type", "none")], disc: [o2("list-style-type", "disc")], decimal: [o2("list-style-type", "decimal")] } }), n3("list-image", { themeKeys: ["--list-style-image"], handle: (a2) => [o2("list-style-image", a2)], staticValues: { none: [o2("list-style-image", "none")] } }), t2("appearance-none", [["appearance", "none"]]), t2("appearance-auto", [["appearance", "auto"]]), t2("scheme-normal", [["color-scheme", "normal"]]), t2("scheme-dark", [["color-scheme", "dark"]]), t2("scheme-light", [["color-scheme", "light"]]), t2("scheme-light-dark", [["color-scheme", "light dark"]]), t2("scheme-only-dark", [["color-scheme", "only dark"]]), t2("scheme-only-light", [["color-scheme", "only light"]]), n3("columns", { themeKeys: ["--columns", "--container"], handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, handle: (a2) => [o2("columns", a2)], staticValues: { auto: [o2("columns", "auto")] } }), r2("columns", () => [{ values: Array.from({ length: 12 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--columns", "--container"] }]);
  for (let a2 of ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"])
    t2(`break-before-${a2}`, [["break-before", a2]]);
  for (let a2 of ["auto", "avoid", "avoid-page", "avoid-column"])
    t2(`break-inside-${a2}`, [["break-inside", a2]]);
  for (let a2 of ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"])
    t2(`break-after-${a2}`, [["break-after", a2]]);
  t2("grid-flow-row", [["grid-auto-flow", "row"]]), t2("grid-flow-col", [["grid-auto-flow", "column"]]), t2("grid-flow-dense", [["grid-auto-flow", "dense"]]), t2("grid-flow-row-dense", [["grid-auto-flow", "row dense"]]), t2("grid-flow-col-dense", [["grid-auto-flow", "column dense"]]), n3("auto-cols", { themeKeys: ["--grid-auto-columns"], handle: (a2) => [o2("grid-auto-columns", a2)], staticValues: { auto: [o2("grid-auto-columns", "auto")], min: [o2("grid-auto-columns", "min-content")], max: [o2("grid-auto-columns", "max-content")], fr: [o2("grid-auto-columns", "minmax(0, 1fr)")] } }), n3("auto-rows", { themeKeys: ["--grid-auto-rows"], handle: (a2) => [o2("grid-auto-rows", a2)], staticValues: { auto: [o2("grid-auto-rows", "auto")], min: [o2("grid-auto-rows", "min-content")], max: [o2("grid-auto-rows", "max-content")], fr: [o2("grid-auto-rows", "minmax(0, 1fr)")] } }), n3("grid-cols", { themeKeys: ["--grid-template-columns"], handleBareValue: ({ value: a2 }) => ge3(a2) ? `repeat(${a2}, minmax(0, 1fr))` : null, handle: (a2) => [o2("grid-template-columns", a2)], staticValues: { none: [o2("grid-template-columns", "none")], subgrid: [o2("grid-template-columns", "subgrid")] } }), n3("grid-rows", { themeKeys: ["--grid-template-rows"], handleBareValue: ({ value: a2 }) => ge3(a2) ? `repeat(${a2}, minmax(0, 1fr))` : null, handle: (a2) => [o2("grid-template-rows", a2)], staticValues: { none: [o2("grid-template-rows", "none")], subgrid: [o2("grid-template-rows", "subgrid")] } }), r2("grid-cols", () => [{ values: Array.from({ length: 12 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--grid-template-columns"] }]), r2("grid-rows", () => [{ values: Array.from({ length: 12 }, (a2, g4) => `${g4 + 1}`), valueThemeKeys: ["--grid-template-rows"] }]), t2("flex-row", [["flex-direction", "row"]]), t2("flex-row-reverse", [["flex-direction", "row-reverse"]]), t2("flex-col", [["flex-direction", "column"]]), t2("flex-col-reverse", [["flex-direction", "column-reverse"]]), t2("flex-wrap", [["flex-wrap", "wrap"]]), t2("flex-nowrap", [["flex-wrap", "nowrap"]]), t2("flex-wrap-reverse", [["flex-wrap", "wrap-reverse"]]), t2("place-content-center", [["place-content", "center"]]), t2("place-content-start", [["place-content", "start"]]), t2("place-content-end", [["place-content", "end"]]), t2("place-content-center-safe", [["place-content", "safe center"]]), t2("place-content-end-safe", [["place-content", "safe end"]]), t2("place-content-between", [["place-content", "space-between"]]), t2("place-content-around", [["place-content", "space-around"]]), t2("place-content-evenly", [["place-content", "space-evenly"]]), t2("place-content-baseline", [["place-content", "baseline"]]), t2("place-content-stretch", [["place-content", "stretch"]]), t2("place-items-center", [["place-items", "center"]]), t2("place-items-start", [["place-items", "start"]]), t2("place-items-end", [["place-items", "end"]]), t2("place-items-center-safe", [["place-items", "safe center"]]), t2("place-items-end-safe", [["place-items", "safe end"]]), t2("place-items-baseline", [["place-items", "baseline"]]), t2("place-items-stretch", [["place-items", "stretch"]]), t2("content-normal", [["align-content", "normal"]]), t2("content-center", [["align-content", "center"]]), t2("content-start", [["align-content", "flex-start"]]), t2("content-end", [["align-content", "flex-end"]]), t2("content-center-safe", [["align-content", "safe center"]]), t2("content-end-safe", [["align-content", "safe flex-end"]]), t2("content-between", [["align-content", "space-between"]]), t2("content-around", [["align-content", "space-around"]]), t2("content-evenly", [["align-content", "space-evenly"]]), t2("content-baseline", [["align-content", "baseline"]]), t2("content-stretch", [["align-content", "stretch"]]), t2("items-center", [["align-items", "center"]]), t2("items-start", [["align-items", "flex-start"]]), t2("items-end", [["align-items", "flex-end"]]), t2("items-center-safe", [["align-items", "safe center"]]), t2("items-end-safe", [["align-items", "safe flex-end"]]), t2("items-baseline", [["align-items", "baseline"]]), t2("items-baseline-last", [["align-items", "last baseline"]]), t2("items-stretch", [["align-items", "stretch"]]), t2("justify-normal", [["justify-content", "normal"]]), t2("justify-center", [["justify-content", "center"]]), t2("justify-start", [["justify-content", "flex-start"]]), t2("justify-end", [["justify-content", "flex-end"]]), t2("justify-center-safe", [["justify-content", "safe center"]]), t2("justify-end-safe", [["justify-content", "safe flex-end"]]), t2("justify-between", [["justify-content", "space-between"]]), t2("justify-around", [["justify-content", "space-around"]]), t2("justify-evenly", [["justify-content", "space-evenly"]]), t2("justify-baseline", [["justify-content", "baseline"]]), t2("justify-stretch", [["justify-content", "stretch"]]), t2("justify-items-normal", [["justify-items", "normal"]]), t2("justify-items-center", [["justify-items", "center"]]), t2("justify-items-start", [["justify-items", "start"]]), t2("justify-items-end", [["justify-items", "end"]]), t2("justify-items-center-safe", [["justify-items", "safe center"]]), t2("justify-items-end-safe", [["justify-items", "safe end"]]), t2("justify-items-stretch", [["justify-items", "stretch"]]), l6("gap", ["--gap", "--spacing"], (a2) => [o2("gap", a2)]), l6("gap-x", ["--gap", "--spacing"], (a2) => [o2("column-gap", a2)]), l6("gap-y", ["--gap", "--spacing"], (a2) => [o2("row-gap", a2)]), l6("space-x", ["--space", "--spacing"], (a2) => {
    let g4 = (() => {
      if (a2 === "--spacing(0)" || a2 === "--spacing(-0)")
        return true;
      let w4 = le2.get(a2);
      return !!(w4 && w4[0] === 0 && (w4[1] === null || y3(a2)));
    })();
    return [Y4([S4("--tw-space-x-reverse", "0")]), H4(":where(& > :not(:last-child))", [o2("--tw-sort", "row-gap"), o2("--tw-space-x-reverse", "0"), o2("margin-inline-start", g4 ? "0" : `calc(${a2} * var(--tw-space-x-reverse))`), o2("margin-inline-end", g4 ? "0" : `calc(${a2} * calc(1 - var(--tw-space-x-reverse)))`)])];
  }, { supportsNegative: true }), l6("space-y", ["--space", "--spacing"], (a2) => {
    let g4 = (() => {
      if (a2 === "--spacing(0)" || a2 === "--spacing(-0)")
        return true;
      let w4 = le2.get(a2);
      return !!(w4 && w4[0] === 0 && (w4[1] === null || y3(a2)));
    })();
    return [Y4([S4("--tw-space-y-reverse", "0")]), H4(":where(& > :not(:last-child))", [o2("--tw-sort", "column-gap"), o2("--tw-space-y-reverse", "0"), o2("margin-block-start", g4 ? "0" : `calc(${a2} * var(--tw-space-y-reverse))`), o2("margin-block-end", g4 ? "0" : `calc(${a2} * calc(1 - var(--tw-space-y-reverse)))`)])];
  }, { supportsNegative: true }), t2("space-x-reverse", [() => Y4([S4("--tw-space-x-reverse", "0")]), () => H4(":where(& > :not(:last-child))", [o2("--tw-sort", "row-gap"), o2("--tw-space-x-reverse", "1")])]), t2("space-y-reverse", [() => Y4([S4("--tw-space-y-reverse", "0")]), () => H4(":where(& > :not(:last-child))", [o2("--tw-sort", "column-gap"), o2("--tw-space-y-reverse", "1")])]), t2("accent-auto", [["accent-color", "auto"]]), s3("accent", { themeKeys: ["--accent-color", "--color"], handle: (a2) => [o2("accent-color", a2)] }), s3("caret", { themeKeys: ["--caret-color", "--color"], handle: (a2) => [o2("caret-color", a2)] }), s3("divide", { themeKeys: ["--divide-color", "--border-color", "--color"], handle: (a2) => [H4(":where(& > :not(:last-child))", [o2("--tw-sort", "divide-color"), o2("border-color", a2)])] }), t2("place-self-auto", [["place-self", "auto"]]), t2("place-self-start", [["place-self", "start"]]), t2("place-self-end", [["place-self", "end"]]), t2("place-self-center", [["place-self", "center"]]), t2("place-self-end-safe", [["place-self", "safe end"]]), t2("place-self-center-safe", [["place-self", "safe center"]]), t2("place-self-stretch", [["place-self", "stretch"]]), t2("self-auto", [["align-self", "auto"]]), t2("self-start", [["align-self", "flex-start"]]), t2("self-end", [["align-self", "flex-end"]]), t2("self-center", [["align-self", "center"]]), t2("self-end-safe", [["align-self", "safe flex-end"]]), t2("self-center-safe", [["align-self", "safe center"]]), t2("self-stretch", [["align-self", "stretch"]]), t2("self-baseline", [["align-self", "baseline"]]), t2("self-baseline-last", [["align-self", "last baseline"]]), t2("justify-self-auto", [["justify-self", "auto"]]), t2("justify-self-start", [["justify-self", "flex-start"]]), t2("justify-self-end", [["justify-self", "flex-end"]]), t2("justify-self-center", [["justify-self", "center"]]), t2("justify-self-end-safe", [["justify-self", "safe flex-end"]]), t2("justify-self-center-safe", [["justify-self", "safe center"]]), t2("justify-self-stretch", [["justify-self", "stretch"]]);
  for (let a2 of ["auto", "hidden", "clip", "visible", "scroll"])
    t2(`overflow-${a2}`, [["overflow", a2]]), t2(`overflow-x-${a2}`, [["overflow-x", a2]]), t2(`overflow-y-${a2}`, [["overflow-y", a2]]);
  for (let a2 of ["auto", "contain", "none"])
    t2(`overscroll-${a2}`, [["overscroll-behavior", a2]]), t2(`overscroll-x-${a2}`, [["overscroll-behavior-x", a2]]), t2(`overscroll-y-${a2}`, [["overscroll-behavior-y", a2]]);
  t2("scroll-auto", [["scroll-behavior", "auto"]]), t2("scroll-smooth", [["scroll-behavior", "smooth"]]), t2("scrollbar-auto", [["scrollbar-width", "auto"]]), t2("scrollbar-thin", [["scrollbar-width", "thin"]]), t2("scrollbar-none", [["scrollbar-width", "none"]]);
  {
    let a2 = () => Y4([S4("--tw-scrollbar-thumb", "#0000", "<color>"), S4("--tw-scrollbar-track", "#0000", "<color>")]);
    s3("scrollbar-thumb", { themeKeys: ["--color"], handle: (g4) => [a2(), o2("--tw-scrollbar-thumb", g4), o2("scrollbar-color", "var(--tw-scrollbar-thumb) var(--tw-scrollbar-track)")] }), s3("scrollbar-track", { themeKeys: ["--color"], handle: (g4) => [a2(), o2("--tw-scrollbar-track", g4), o2("scrollbar-color", "var(--tw-scrollbar-thumb) var(--tw-scrollbar-track)")] });
  }
  t2("scrollbar-gutter-auto", [["scrollbar-gutter", "auto"]]), t2("scrollbar-gutter-stable", [["scrollbar-gutter", "stable"]]), t2("scrollbar-gutter-both", [["scrollbar-gutter", "stable both-edges"]]), t2("truncate", [["overflow", "hidden"], ["text-overflow", "ellipsis"], ["white-space", "nowrap"]]), t2("text-ellipsis", [["text-overflow", "ellipsis"]]), t2("text-clip", [["text-overflow", "clip"]]), t2("hyphens-none", [["-webkit-hyphens", "none"], ["hyphens", "none"]]), t2("hyphens-manual", [["-webkit-hyphens", "manual"], ["hyphens", "manual"]]), t2("hyphens-auto", [["-webkit-hyphens", "auto"], ["hyphens", "auto"]]), t2("whitespace-normal", [["white-space", "normal"]]), t2("whitespace-nowrap", [["white-space", "nowrap"]]), t2("whitespace-pre", [["white-space", "pre"]]), t2("whitespace-pre-line", [["white-space", "pre-line"]]), t2("whitespace-pre-wrap", [["white-space", "pre-wrap"]]), t2("whitespace-break-spaces", [["white-space", "break-spaces"]]), n3("tab", { handleBareValue: ({ value: a2 }) => u(a2) ? a2 : null, handle: (a2) => [o2("tab-size", a2)] }), r2("tab", () => [{ values: ["2", "4", "8"] }]), t2("text-wrap", [["text-wrap", "wrap"]]), t2("text-nowrap", [["text-wrap", "nowrap"]]), t2("text-balance", [["text-wrap", "balance"]]), t2("text-pretty", [["text-wrap", "pretty"]]), t2("break-normal", [["overflow-wrap", "normal"], ["word-break", "normal"]]), t2("break-all", [["word-break", "break-all"]]), t2("break-keep", [["word-break", "keep-all"]]), t2("wrap-anywhere", [["overflow-wrap", "anywhere"]]), t2("wrap-break-word", [["overflow-wrap", "break-word"]]), t2("wrap-normal", [["overflow-wrap", "normal"]]);
  for (let [a2, g4] of [["rounded", ["border-radius"]], ["rounded-s", ["border-start-start-radius", "border-end-start-radius"]], ["rounded-e", ["border-start-end-radius", "border-end-end-radius"]], ["rounded-t", ["border-top-left-radius", "border-top-right-radius"]], ["rounded-r", ["border-top-right-radius", "border-bottom-right-radius"]], ["rounded-b", ["border-bottom-right-radius", "border-bottom-left-radius"]], ["rounded-l", ["border-top-left-radius", "border-bottom-left-radius"]], ["rounded-ss", ["border-start-start-radius"]], ["rounded-se", ["border-start-end-radius"]], ["rounded-ee", ["border-end-end-radius"]], ["rounded-es", ["border-end-start-radius"]], ["rounded-tl", ["border-top-left-radius"]], ["rounded-tr", ["border-top-right-radius"]], ["rounded-br", ["border-bottom-right-radius"]], ["rounded-bl", ["border-bottom-left-radius"]]])
    n3(a2, { themeKeys: ["--radius"], handle: (w4) => g4.map((C3) => o2(C3, w4)), staticValues: { none: g4.map((w4) => o2(w4, "0")), full: g4.map((w4) => o2(w4, "calc(infinity * 1px)")) } });
  t2("border-solid", [["--tw-border-style", "solid"], ["border-style", "solid"]]), t2("border-dashed", [["--tw-border-style", "dashed"], ["border-style", "dashed"]]), t2("border-dotted", [["--tw-border-style", "dotted"], ["border-style", "dotted"]]), t2("border-double", [["--tw-border-style", "double"], ["border-style", "double"]]), t2("border-hidden", [["--tw-border-style", "hidden"], ["border-style", "hidden"]]), t2("border-none", [["--tw-border-style", "none"], ["border-style", "none"]]);
  {
    let g4 = function(w4, C3) {
      i.functional(w4, (x4) => {
        if (!x4.value) {
          if (x4.modifier)
            return;
          let $4 = e3.get(["--default-border-width"]) ?? "1px", K4 = C3.width($4);
          return K4 ? [a2(), ...K4] : undefined;
        }
        if (x4.value.kind === "arbitrary") {
          let $4 = x4.value.value;
          switch (x4.value.dataType ?? pe2($4, ["color", "line-width", "length"])) {
            case "line-width":
            case "length": {
              if (x4.modifier)
                return;
              let T4 = C3.width($4);
              return T4 ? [a2(), ...T4] : undefined;
            }
            default:
              return $4 = te4($4, x4.modifier, e3), $4 === null ? undefined : C3.color($4);
          }
        }
        {
          let $4 = oe3(x4, e3, ["--border-color", "--color"]);
          if ($4)
            return C3.color($4);
        }
        {
          if (x4.modifier)
            return;
          let $4 = e3.resolve(x4.value.value, ["--border-width"]);
          if ($4) {
            let K4 = C3.width($4);
            return K4 ? [a2(), ...K4] : undefined;
          }
          if (u(x4.value.value)) {
            let K4 = C3.width(`${x4.value.value}px`);
            return K4 ? [a2(), ...K4] : undefined;
          }
        }
      }), r2(w4, () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--border-color", "--color"], modifiers: Array.from({ length: 21 }, (x4, $4) => `${$4 * 5}`), hasDefaultValue: true }, { values: ["0", "2", "4", "8"], valueThemeKeys: ["--border-width"] }]);
    };
    var E2 = g4;
    let a2 = () => Y4([S4("--tw-border-style", "solid")]);
    g4("border", { width: (w4) => [o2("border-style", "var(--tw-border-style)"), o2("border-width", w4)], color: (w4) => [o2("border-color", w4)] }), g4("border-x", { width: (w4) => [o2("border-inline-style", "var(--tw-border-style)"), o2("border-inline-width", w4)], color: (w4) => [o2("border-inline-color", w4)] }), g4("border-y", { width: (w4) => [o2("border-block-style", "var(--tw-border-style)"), o2("border-block-width", w4)], color: (w4) => [o2("border-block-color", w4)] }), g4("border-s", { width: (w4) => [o2("border-inline-start-style", "var(--tw-border-style)"), o2("border-inline-start-width", w4)], color: (w4) => [o2("border-inline-start-color", w4)] }), g4("border-e", { width: (w4) => [o2("border-inline-end-style", "var(--tw-border-style)"), o2("border-inline-end-width", w4)], color: (w4) => [o2("border-inline-end-color", w4)] }), g4("border-bs", { width: (w4) => [o2("border-block-start-style", "var(--tw-border-style)"), o2("border-block-start-width", w4)], color: (w4) => [o2("border-block-start-color", w4)] }), g4("border-be", { width: (w4) => [o2("border-block-end-style", "var(--tw-border-style)"), o2("border-block-end-width", w4)], color: (w4) => [o2("border-block-end-color", w4)] }), g4("border-t", { width: (w4) => [o2("border-top-style", "var(--tw-border-style)"), o2("border-top-width", w4)], color: (w4) => [o2("border-top-color", w4)] }), g4("border-r", { width: (w4) => [o2("border-right-style", "var(--tw-border-style)"), o2("border-right-width", w4)], color: (w4) => [o2("border-right-color", w4)] }), g4("border-b", { width: (w4) => [o2("border-bottom-style", "var(--tw-border-style)"), o2("border-bottom-width", w4)], color: (w4) => [o2("border-bottom-color", w4)] }), g4("border-l", { width: (w4) => [o2("border-left-style", "var(--tw-border-style)"), o2("border-left-width", w4)], color: (w4) => [o2("border-left-color", w4)] }), n3("divide-x", { defaultValue: e3.get(["--default-border-width"]) ?? "1px", themeKeys: ["--divide-width", "--border-width"], handleBareValue: ({ value: w4 }) => u(w4) ? `${w4}px` : null, handle: (w4) => [Y4([S4("--tw-divide-x-reverse", "0")]), H4(":where(& > :not(:last-child))", [o2("--tw-sort", "divide-x-width"), a2(), o2("--tw-divide-x-reverse", "0"), o2("border-inline-style", "var(--tw-border-style)"), o2("border-inline-start-width", `calc(${w4} * var(--tw-divide-x-reverse))`), o2("border-inline-end-width", `calc(${w4} * calc(1 - var(--tw-divide-x-reverse)))`)])] }), n3("divide-y", { defaultValue: e3.get(["--default-border-width"]) ?? "1px", themeKeys: ["--divide-width", "--border-width"], handleBareValue: ({ value: w4 }) => u(w4) ? `${w4}px` : null, handle: (w4) => [Y4([S4("--tw-divide-y-reverse", "0")]), H4(":where(& > :not(:last-child))", [o2("--tw-sort", "divide-y-width"), a2(), o2("--tw-divide-y-reverse", "0"), o2("border-bottom-style", "var(--tw-border-style)"), o2("border-top-style", "var(--tw-border-style)"), o2("border-top-width", `calc(${w4} * var(--tw-divide-y-reverse))`), o2("border-bottom-width", `calc(${w4} * calc(1 - var(--tw-divide-y-reverse)))`)])] }), r2("divide-x", () => [{ values: ["0", "2", "4", "8"], valueThemeKeys: ["--divide-width", "--border-width"], hasDefaultValue: true }]), r2("divide-y", () => [{ values: ["0", "2", "4", "8"], valueThemeKeys: ["--divide-width", "--border-width"], hasDefaultValue: true }]), t2("divide-x-reverse", [() => Y4([S4("--tw-divide-x-reverse", "0")]), () => H4(":where(& > :not(:last-child))", [o2("--tw-divide-x-reverse", "1")])]), t2("divide-y-reverse", [() => Y4([S4("--tw-divide-y-reverse", "0")]), () => H4(":where(& > :not(:last-child))", [o2("--tw-divide-y-reverse", "1")])]);
    for (let w4 of ["solid", "dashed", "dotted", "double", "none"])
      t2(`divide-${w4}`, [() => H4(":where(& > :not(:last-child))", [o2("--tw-sort", "divide-style"), o2("--tw-border-style", w4), o2("border-style", w4)])]);
  }
  t2("bg-auto", [["background-size", "auto"]]), t2("bg-cover", [["background-size", "cover"]]), t2("bg-contain", [["background-size", "contain"]]), n3("bg-size", { handle(a2) {
    if (a2)
      return [o2("background-size", a2)];
  } }), t2("bg-fixed", [["background-attachment", "fixed"]]), t2("bg-local", [["background-attachment", "local"]]), t2("bg-scroll", [["background-attachment", "scroll"]]), t2("bg-top", [["background-position", "top"]]), t2("bg-top-left", [["background-position", "left top"]]), t2("bg-top-right", [["background-position", "right top"]]), t2("bg-bottom", [["background-position", "bottom"]]), t2("bg-bottom-left", [["background-position", "left bottom"]]), t2("bg-bottom-right", [["background-position", "right bottom"]]), t2("bg-left", [["background-position", "left"]]), t2("bg-right", [["background-position", "right"]]), t2("bg-center", [["background-position", "center"]]), n3("bg-position", { handle(a2) {
    if (a2)
      return [o2("background-position", a2)];
  } }), t2("bg-repeat", [["background-repeat", "repeat"]]), t2("bg-no-repeat", [["background-repeat", "no-repeat"]]), t2("bg-repeat-x", [["background-repeat", "repeat-x"]]), t2("bg-repeat-y", [["background-repeat", "repeat-y"]]), t2("bg-repeat-round", [["background-repeat", "round"]]), t2("bg-repeat-space", [["background-repeat", "space"]]), t2("bg-none", [["background-image", "none"]]);
  {
    let w4 = function($4) {
      let K4 = "in oklab";
      if ($4?.kind === "named")
        switch ($4.value) {
          case "longer":
          case "shorter":
          case "increasing":
          case "decreasing":
            K4 = `in oklch ${$4.value} hue`;
            break;
          default:
            K4 = `in ${$4.value}`;
        }
      else
        $4?.kind === "arbitrary" && (K4 = $4.value);
      return K4;
    }, C3 = function({ negative: $4 }) {
      return (K4) => {
        if (!K4.value)
          return;
        if (K4.value.kind === "arbitrary") {
          if (K4.modifier)
            return;
          let W4 = K4.value.value;
          return (K4.value.dataType ?? pe2(W4, ["angle"])) === "angle" ? (W4 = $4 ? `calc(${W4} * -1)` : `${W4}`, [o2("--tw-gradient-position", W4), o2("background-image", `linear-gradient(var(--tw-gradient-stops,${W4}))`)]) : $4 ? undefined : [o2("--tw-gradient-position", W4), o2("background-image", `linear-gradient(var(--tw-gradient-stops,${W4}))`)];
        }
        let T4 = K4.value.value;
        if (!$4 && g4.has(T4))
          T4 = g4.get(T4);
        else if (u(T4))
          T4 = $4 ? `calc(${T4}deg * -1)` : `${T4}deg`;
        else
          return;
        let R5 = w4(K4.modifier);
        return [o2("--tw-gradient-position", `${T4}`), J3("@supports (background-image: linear-gradient(in lab, red, red))", [o2("--tw-gradient-position", `${T4} ${R5}`)]), o2("background-image", "linear-gradient(var(--tw-gradient-stops))")];
      };
    }, x4 = function({ negative: $4 }) {
      return (K4) => {
        if (K4.value?.kind === "arbitrary") {
          if (K4.modifier)
            return;
          let W4 = K4.value.value;
          return [o2("--tw-gradient-position", W4), o2("background-image", `conic-gradient(var(--tw-gradient-stops,${W4}))`)];
        }
        let T4 = w4(K4.modifier);
        if (!K4.value)
          return [o2("--tw-gradient-position", T4), o2("background-image", "conic-gradient(var(--tw-gradient-stops))")];
        let R5 = K4.value.value;
        if (u(R5))
          return R5 = $4 ? `calc(${R5}deg * -1)` : `${R5}deg`, [o2("--tw-gradient-position", `from ${R5} ${T4}`), o2("background-image", "conic-gradient(var(--tw-gradient-stops))")];
      };
    };
    var j4 = w4, q4 = C3, G4 = x4;
    let a2 = ["oklab", "oklch", "srgb", "hsl", "longer", "shorter", "increasing", "decreasing"], g4 = new Map([["to-t", "to top"], ["to-tr", "to top right"], ["to-r", "to right"], ["to-br", "to bottom right"], ["to-b", "to bottom"], ["to-bl", "to bottom left"], ["to-l", "to left"], ["to-tl", "to top left"]]);
    i.functional("-bg-linear", C3({ negative: true })), i.functional("bg-linear", C3({ negative: false })), r2("bg-linear", () => [{ values: [...g4.keys()], modifiers: a2 }, { values: ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"], supportsNegative: true, modifiers: a2 }]), i.functional("-bg-conic", x4({ negative: true })), i.functional("bg-conic", x4({ negative: false })), r2("bg-conic", () => [{ hasDefaultValue: true, modifiers: a2 }, { values: ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"], supportsNegative: true, modifiers: a2 }]), i.functional("bg-radial", ($4) => {
      if (!$4.value) {
        let K4 = w4($4.modifier);
        return [o2("--tw-gradient-position", K4), o2("background-image", "radial-gradient(var(--tw-gradient-stops))")];
      }
      if ($4.value.kind === "arbitrary") {
        if ($4.modifier)
          return;
        let K4 = $4.value.value;
        return [o2("--tw-gradient-position", K4), o2("background-image", `radial-gradient(var(--tw-gradient-stops,${K4}))`)];
      }
    }), r2("bg-radial", () => [{ hasDefaultValue: true, modifiers: a2 }]);
  }
  i.functional("bg", (a2) => {
    if (a2.value) {
      if (a2.value.kind === "arbitrary") {
        let g4 = a2.value.value;
        switch (a2.value.dataType ?? pe2(g4, ["image", "color", "percentage", "position", "bg-size", "length", "url"])) {
          case "percentage":
          case "position":
            return a2.modifier ? undefined : [o2("background-position", g4)];
          case "bg-size":
          case "length":
          case "size":
            return a2.modifier ? undefined : [o2("background-size", g4)];
          case "image":
          case "url":
            return a2.modifier ? undefined : [o2("background-image", g4)];
          default:
            return g4 = te4(g4, a2.modifier, e3), g4 === null ? undefined : [o2("background-color", g4)];
        }
      }
      {
        let g4 = oe3(a2, e3, ["--background-color", "--color"]);
        if (g4)
          return [o2("background-color", g4)];
      }
      {
        if (a2.modifier)
          return;
        let g4 = e3.resolve(a2.value.value, ["--background-image"]);
        if (g4)
          return [o2("background-image", g4)];
      }
    }
  }), r2("bg", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--background-color", "--color"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`) }, { values: [], valueThemeKeys: ["--background-image"] }]);
  let v5 = () => Y4([S4("--tw-gradient-position"), S4("--tw-gradient-from", "#0000", "<color>"), S4("--tw-gradient-via", "#0000", "<color>"), S4("--tw-gradient-to", "#0000", "<color>"), S4("--tw-gradient-stops"), S4("--tw-gradient-via-stops"), S4("--tw-gradient-from-position", "0%", "<length-percentage>"), S4("--tw-gradient-via-position", "50%", "<length-percentage>"), S4("--tw-gradient-to-position", "100%", "<length-percentage>")]);
  function k4(a2, g4) {
    i.functional(a2, (w4) => {
      if (w4.value) {
        if (w4.value.kind === "arbitrary") {
          let C3 = w4.value.value;
          switch (w4.value.dataType ?? pe2(C3, ["color", "length", "percentage"])) {
            case "length":
            case "percentage":
              return w4.modifier ? undefined : g4.position(C3);
            default:
              return C3 = te4(C3, w4.modifier, e3), C3 === null ? undefined : g4.color(C3);
          }
        }
        {
          let C3 = oe3(w4, e3, ["--background-color", "--color"]);
          if (C3)
            return g4.color(C3);
        }
        {
          if (w4.modifier)
            return;
          let C3 = e3.resolve(w4.value.value, ["--gradient-color-stop-positions"]);
          if (C3)
            return g4.position(C3);
          if (w4.value.value[w4.value.value.length - 1] === "%" && u(w4.value.value.slice(0, -1)))
            return g4.position(w4.value.value);
        }
      }
    }), r2(a2, () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--background-color", "--color"], modifiers: Array.from({ length: 21 }, (w4, C3) => `${C3 * 5}`) }, { values: Array.from({ length: 21 }, (w4, C3) => `${C3 * 5}%`), valueThemeKeys: ["--gradient-color-stop-positions"] }]);
  }
  k4("from", { color: (a2) => [v5(), o2("--tw-sort", "--tw-gradient-from"), o2("--tw-gradient-from", a2), o2("--tw-gradient-stops", "var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")], position: (a2) => [v5(), o2("--tw-gradient-from-position", a2)] }), t2("via-none", [["--tw-gradient-via-stops", "initial"]]), k4("via", { color: (a2) => [v5(), o2("--tw-sort", "--tw-gradient-via"), o2("--tw-gradient-via", a2), o2("--tw-gradient-via-stops", "var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position)"), o2("--tw-gradient-stops", "var(--tw-gradient-via-stops)")], position: (a2) => [v5(), o2("--tw-gradient-via-position", a2)] }), k4("to", { color: (a2) => [v5(), o2("--tw-sort", "--tw-gradient-to"), o2("--tw-gradient-to", a2), o2("--tw-gradient-stops", "var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")], position: (a2) => [v5(), o2("--tw-gradient-to-position", a2)] }), t2("mask-none", [["mask-image", "none"]]), i.functional("mask", (a2) => {
    if (!a2.value || a2.modifier || a2.value.kind !== "arbitrary")
      return;
    let g4 = a2.value.value;
    switch (a2.value.dataType ?? pe2(g4, ["image", "percentage", "position", "bg-size", "length", "url"])) {
      case "percentage":
      case "position":
        return a2.modifier ? undefined : [o2("mask-position", g4)];
      case "bg-size":
      case "length":
      case "size":
        return [o2("mask-size", g4)];
      default:
        return [o2("mask-image", g4)];
    }
  }), t2("mask-add", [["mask-composite", "add"]]), t2("mask-subtract", [["mask-composite", "subtract"]]), t2("mask-intersect", [["mask-composite", "intersect"]]), t2("mask-exclude", [["mask-composite", "exclude"]]), t2("mask-alpha", [["mask-mode", "alpha"]]), t2("mask-luminance", [["mask-mode", "luminance"]]), t2("mask-match", [["mask-mode", "match-source"]]), t2("mask-type-alpha", [["mask-type", "alpha"]]), t2("mask-type-luminance", [["mask-type", "luminance"]]), t2("mask-auto", [["mask-size", "auto"]]), t2("mask-cover", [["mask-size", "cover"]]), t2("mask-contain", [["mask-size", "contain"]]), n3("mask-size", { handle(a2) {
    if (a2)
      return [o2("mask-size", a2)];
  } }), t2("mask-top", [["mask-position", "top"]]), t2("mask-top-left", [["mask-position", "left top"]]), t2("mask-top-right", [["mask-position", "right top"]]), t2("mask-bottom", [["mask-position", "bottom"]]), t2("mask-bottom-left", [["mask-position", "left bottom"]]), t2("mask-bottom-right", [["mask-position", "right bottom"]]), t2("mask-left", [["mask-position", "left"]]), t2("mask-right", [["mask-position", "right"]]), t2("mask-center", [["mask-position", "center"]]), n3("mask-position", { handle(a2) {
    if (a2)
      return [o2("mask-position", a2)];
  } }), t2("mask-repeat", [["mask-repeat", "repeat"]]), t2("mask-no-repeat", [["mask-repeat", "no-repeat"]]), t2("mask-repeat-x", [["mask-repeat", "repeat-x"]]), t2("mask-repeat-y", [["mask-repeat", "repeat-y"]]), t2("mask-repeat-round", [["mask-repeat", "round"]]), t2("mask-repeat-space", [["mask-repeat", "space"]]), t2("mask-clip-border", [["mask-clip", "border-box"]]), t2("mask-clip-padding", [["mask-clip", "padding-box"]]), t2("mask-clip-content", [["mask-clip", "content-box"]]), t2("mask-clip-fill", [["mask-clip", "fill-box"]]), t2("mask-clip-stroke", [["mask-clip", "stroke-box"]]), t2("mask-clip-view", [["mask-clip", "view-box"]]), t2("mask-no-clip", [["mask-clip", "no-clip"]]), t2("mask-origin-border", [["mask-origin", "border-box"]]), t2("mask-origin-padding", [["mask-origin", "padding-box"]]), t2("mask-origin-content", [["mask-origin", "content-box"]]), t2("mask-origin-fill", [["mask-origin", "fill-box"]]), t2("mask-origin-stroke", [["mask-origin", "stroke-box"]]), t2("mask-origin-view", [["mask-origin", "view-box"]]);
  let y4 = () => Y4([S4("--tw-mask-linear", "linear-gradient(#fff, #fff)"), S4("--tw-mask-radial", "linear-gradient(#fff, #fff)"), S4("--tw-mask-conic", "linear-gradient(#fff, #fff)")]);
  function N5(a2, g4) {
    i.functional(a2, (w4) => {
      if (w4.value) {
        if (w4.value.kind === "arbitrary") {
          let C3 = w4.value.value;
          switch (w4.value.dataType ?? pe2(C3, ["length", "percentage", "color"])) {
            case "color":
              return C3 = te4(C3, w4.modifier, e3), C3 === null ? undefined : g4.color(C3);
            case "percentage":
              return w4.modifier || !u(C3.slice(0, -1)) ? undefined : g4.position(C3);
            default:
              return w4.modifier ? undefined : g4.position(C3);
          }
        }
        {
          let C3 = oe3(w4, e3, ["--background-color", "--color"]);
          if (C3)
            return g4.color(C3);
        }
        {
          if (w4.modifier)
            return;
          let C3 = pe2(w4.value.value, ["number", "percentage"]);
          if (!C3)
            return;
          switch (C3) {
            case "number":
              return !e3.resolve(null, ["--spacing"]) || !ue3(w4.value.value) ? undefined : g4.position(`--spacing(${w4.value.value})`);
            case "percentage":
              return u(w4.value.value.slice(0, -1)) ? g4.position(w4.value.value) : undefined;
            default:
              return;
          }
        }
      }
    }), r2(a2, () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--background-color", "--color"], modifiers: Array.from({ length: 21 }, (w4, C3) => `${C3 * 5}`) }, { values: Array.from({ length: 21 }, (w4, C3) => `${C3 * 5}%`), valueThemeKeys: ["--gradient-color-stop-positions"] }]), r2(a2, () => [{ values: Array.from({ length: 21 }, (w4, C3) => `${C3 * 5}%`) }, { values: e3.get(["--spacing"]) ? wt2 : [] }, { values: ["current", "inherit", "transparent"], valueThemeKeys: ["--background-color", "--color"], modifiers: Array.from({ length: 21 }, (w4, C3) => `${C3 * 5}`) }]);
  }
  let A3 = () => Y4([S4("--tw-mask-left", "linear-gradient(#fff, #fff)"), S4("--tw-mask-right", "linear-gradient(#fff, #fff)"), S4("--tw-mask-bottom", "linear-gradient(#fff, #fff)"), S4("--tw-mask-top", "linear-gradient(#fff, #fff)")]);
  function b5(a2, g4, w4) {
    N5(a2, { color(C3) {
      let x4 = [y4(), A3(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-linear", "var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];
      for (let $4 of ["top", "right", "bottom", "left"])
        w4[$4] && (x4.push(o2(`--tw-mask-${$4}`, `linear-gradient(to ${$4}, var(--tw-mask-${$4}-from-color) var(--tw-mask-${$4}-from-position), var(--tw-mask-${$4}-to-color) var(--tw-mask-${$4}-to-position))`)), x4.push(Y4([S4(`--tw-mask-${$4}-from-position`, "0%"), S4(`--tw-mask-${$4}-to-position`, "100%"), S4(`--tw-mask-${$4}-from-color`, "black"), S4(`--tw-mask-${$4}-to-color`, "transparent")])), x4.push(o2(`--tw-mask-${$4}-${g4}-color`, C3)));
      return x4;
    }, position(C3) {
      let x4 = [y4(), A3(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-linear", "var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];
      for (let $4 of ["top", "right", "bottom", "left"])
        w4[$4] && (x4.push(o2(`--tw-mask-${$4}`, `linear-gradient(to ${$4}, var(--tw-mask-${$4}-from-color) var(--tw-mask-${$4}-from-position), var(--tw-mask-${$4}-to-color) var(--tw-mask-${$4}-to-position))`)), x4.push(Y4([S4(`--tw-mask-${$4}-from-position`, "0%"), S4(`--tw-mask-${$4}-to-position`, "100%"), S4(`--tw-mask-${$4}-from-color`, "black"), S4(`--tw-mask-${$4}-to-color`, "transparent")])), x4.push(o2(`--tw-mask-${$4}-${g4}-position`, C3)));
      return x4;
    } });
  }
  b5("mask-x-from", "from", { top: false, right: true, bottom: false, left: true }), b5("mask-x-to", "to", { top: false, right: true, bottom: false, left: true }), b5("mask-y-from", "from", { top: true, right: false, bottom: true, left: false }), b5("mask-y-to", "to", { top: true, right: false, bottom: true, left: false }), b5("mask-t-from", "from", { top: true, right: false, bottom: false, left: false }), b5("mask-t-to", "to", { top: true, right: false, bottom: false, left: false }), b5("mask-r-from", "from", { top: false, right: true, bottom: false, left: false }), b5("mask-r-to", "to", { top: false, right: true, bottom: false, left: false }), b5("mask-b-from", "from", { top: false, right: false, bottom: true, left: false }), b5("mask-b-to", "to", { top: false, right: false, bottom: true, left: false }), b5("mask-l-from", "from", { top: false, right: false, bottom: false, left: true }), b5("mask-l-to", "to", { top: false, right: false, bottom: false, left: true });
  let D4 = () => Y4([S4("--tw-mask-linear-position", "0deg"), S4("--tw-mask-linear-from-position", "0%"), S4("--tw-mask-linear-to-position", "100%"), S4("--tw-mask-linear-from-color", "black"), S4("--tw-mask-linear-to-color", "transparent")]);
  n3("mask-linear", { defaultValue: null, supportsNegative: true, supportsFractions: false, handleBareValue({ value: a2 }) {
    if (!u(a2))
      return null;
    let g4 = Number(a2);
    return g4 === 0 ? "0deg" : g4 === 1 ? "1deg" : `calc(1deg * ${a2})`;
  }, handleNegativeBareValue({ value: a2 }) {
    if (!u(a2))
      return null;
    let g4 = Number(a2);
    return g4 === 0 ? "0deg" : g4 === 1 ? "-1deg" : `calc(1deg * -${a2})`;
  }, handle: (a2) => [y4(), D4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-linear", "linear-gradient(var(--tw-mask-linear-stops, var(--tw-mask-linear-position)))"), o2("--tw-mask-linear-position", a2)] }), r2("mask-linear", () => [{ supportsNegative: true, values: ["0", "1", "2", "3", "6", "12", "45", "90", "180"] }]), N5("mask-linear-from", { color: (a2) => [y4(), D4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-linear-stops", "var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"), o2("--tw-mask-linear", "linear-gradient(var(--tw-mask-linear-stops))"), o2("--tw-mask-linear-from-color", a2)], position: (a2) => [y4(), D4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-linear-stops", "var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"), o2("--tw-mask-linear", "linear-gradient(var(--tw-mask-linear-stops))"), o2("--tw-mask-linear-from-position", a2)] }), N5("mask-linear-to", { color: (a2) => [y4(), D4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-linear-stops", "var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"), o2("--tw-mask-linear", "linear-gradient(var(--tw-mask-linear-stops))"), o2("--tw-mask-linear-to-color", a2)], position: (a2) => [y4(), D4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-linear-stops", "var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"), o2("--tw-mask-linear", "linear-gradient(var(--tw-mask-linear-stops))"), o2("--tw-mask-linear-to-position", a2)] });
  let O5 = () => Y4([S4("--tw-mask-radial-from-position", "0%"), S4("--tw-mask-radial-to-position", "100%"), S4("--tw-mask-radial-from-color", "black"), S4("--tw-mask-radial-to-color", "transparent"), S4("--tw-mask-radial-shape", "ellipse"), S4("--tw-mask-radial-size", "farthest-corner"), S4("--tw-mask-radial-position", "center")]);
  t2("mask-circle", [["--tw-mask-radial-shape", "circle"]]), t2("mask-ellipse", [["--tw-mask-radial-shape", "ellipse"]]), t2("mask-radial-closest-side", [["--tw-mask-radial-size", "closest-side"]]), t2("mask-radial-farthest-side", [["--tw-mask-radial-size", "farthest-side"]]), t2("mask-radial-closest-corner", [["--tw-mask-radial-size", "closest-corner"]]), t2("mask-radial-farthest-corner", [["--tw-mask-radial-size", "farthest-corner"]]), t2("mask-radial-at-top", [["--tw-mask-radial-position", "top"]]), t2("mask-radial-at-top-left", [["--tw-mask-radial-position", "top left"]]), t2("mask-radial-at-top-right", [["--tw-mask-radial-position", "top right"]]), t2("mask-radial-at-bottom", [["--tw-mask-radial-position", "bottom"]]), t2("mask-radial-at-bottom-left", [["--tw-mask-radial-position", "bottom left"]]), t2("mask-radial-at-bottom-right", [["--tw-mask-radial-position", "bottom right"]]), t2("mask-radial-at-left", [["--tw-mask-radial-position", "left"]]), t2("mask-radial-at-right", [["--tw-mask-radial-position", "right"]]), t2("mask-radial-at-center", [["--tw-mask-radial-position", "center"]]), n3("mask-radial-at", { defaultValue: null, supportsNegative: false, supportsFractions: false, handle: (a2) => [o2("--tw-mask-radial-position", a2)] }), n3("mask-radial", { defaultValue: null, supportsNegative: false, supportsFractions: false, handle: (a2) => [y4(), O5(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-radial", "radial-gradient(var(--tw-mask-radial-stops, var(--tw-mask-radial-size)))"), o2("--tw-mask-radial-size", a2)] }), N5("mask-radial-from", { color: (a2) => [y4(), O5(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-radial-stops", "var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"), o2("--tw-mask-radial", "radial-gradient(var(--tw-mask-radial-stops))"), o2("--tw-mask-radial-from-color", a2)], position: (a2) => [y4(), O5(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-radial-stops", "var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"), o2("--tw-mask-radial", "radial-gradient(var(--tw-mask-radial-stops))"), o2("--tw-mask-radial-from-position", a2)] }), N5("mask-radial-to", { color: (a2) => [y4(), O5(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-radial-stops", "var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"), o2("--tw-mask-radial", "radial-gradient(var(--tw-mask-radial-stops))"), o2("--tw-mask-radial-to-color", a2)], position: (a2) => [y4(), O5(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-radial-stops", "var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"), o2("--tw-mask-radial", "radial-gradient(var(--tw-mask-radial-stops))"), o2("--tw-mask-radial-to-position", a2)] });
  let P4 = () => Y4([S4("--tw-mask-conic-position", "0deg"), S4("--tw-mask-conic-from-position", "0%"), S4("--tw-mask-conic-to-position", "100%"), S4("--tw-mask-conic-from-color", "black"), S4("--tw-mask-conic-to-color", "transparent")]);
  n3("mask-conic", { defaultValue: null, supportsNegative: true, supportsFractions: false, handleBareValue({ value: a2 }) {
    if (!u(a2))
      return null;
    let g4 = Number(a2);
    return g4 === 0 ? "0deg" : g4 === 1 ? "1deg" : `calc(1deg * ${a2})`;
  }, handleNegativeBareValue({ value: a2 }) {
    if (!u(a2))
      return null;
    let g4 = Number(a2);
    return g4 === 0 ? "0deg" : g4 === 1 ? "-1deg" : `calc(1deg * -${a2})`;
  }, handle: (a2) => [y4(), P4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-conic", "conic-gradient(var(--tw-mask-conic-stops, var(--tw-mask-conic-position)))"), o2("--tw-mask-conic-position", a2)] }), r2("mask-conic", () => [{ supportsNegative: true, values: ["0", "1", "2", "3", "6", "12", "45", "90", "180"] }]), N5("mask-conic-from", { color: (a2) => [y4(), P4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-conic-stops", "from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"), o2("--tw-mask-conic", "conic-gradient(var(--tw-mask-conic-stops))"), o2("--tw-mask-conic-from-color", a2)], position: (a2) => [y4(), P4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-conic-stops", "from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"), o2("--tw-mask-conic", "conic-gradient(var(--tw-mask-conic-stops))"), o2("--tw-mask-conic-from-position", a2)] }), N5("mask-conic-to", { color: (a2) => [y4(), P4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-conic-stops", "from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"), o2("--tw-mask-conic", "conic-gradient(var(--tw-mask-conic-stops))"), o2("--tw-mask-conic-to-color", a2)], position: (a2) => [y4(), P4(), o2("mask-image", "var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"), o2("mask-composite", "intersect"), o2("--tw-mask-conic-stops", "from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"), o2("--tw-mask-conic", "conic-gradient(var(--tw-mask-conic-stops))"), o2("--tw-mask-conic-to-position", a2)] }), t2("box-decoration-slice", [["-webkit-box-decoration-break", "slice"], ["box-decoration-break", "slice"]]), t2("box-decoration-clone", [["-webkit-box-decoration-break", "clone"], ["box-decoration-break", "clone"]]), t2("bg-clip-text", [["background-clip", "text"]]), t2("bg-clip-border", [["background-clip", "border-box"]]), t2("bg-clip-padding", [["background-clip", "padding-box"]]), t2("bg-clip-content", [["background-clip", "content-box"]]), t2("bg-origin-border", [["background-origin", "border-box"]]), t2("bg-origin-padding", [["background-origin", "padding-box"]]), t2("bg-origin-content", [["background-origin", "content-box"]]);
  for (let a2 of ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"])
    t2(`bg-blend-${a2}`, [["background-blend-mode", a2]]), t2(`mix-blend-${a2}`, [["mix-blend-mode", a2]]);
  t2("mix-blend-plus-darker", [["mix-blend-mode", "plus-darker"]]), t2("mix-blend-plus-lighter", [["mix-blend-mode", "plus-lighter"]]), t2("fill-none", [["fill", "none"]]), i.functional("fill", (a2) => {
    if (!a2.value)
      return;
    if (a2.value.kind === "arbitrary") {
      let w4 = te4(a2.value.value, a2.modifier, e3);
      return w4 === null ? undefined : [o2("fill", w4)];
    }
    let g4 = oe3(a2, e3, ["--fill", "--color"]);
    if (g4)
      return [o2("fill", g4)];
  }), r2("fill", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--fill", "--color"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`) }]), t2("stroke-none", [["stroke", "none"]]), i.functional("stroke", (a2) => {
    if (a2.value) {
      if (a2.value.kind === "arbitrary") {
        let g4 = a2.value.value;
        switch (a2.value.dataType ?? pe2(g4, ["color", "number", "length", "percentage"])) {
          case "number":
          case "length":
          case "percentage":
            return a2.modifier ? undefined : [o2("stroke-width", g4)];
          default:
            return g4 = te4(a2.value.value, a2.modifier, e3), g4 === null ? undefined : [o2("stroke", g4)];
        }
      }
      {
        let g4 = oe3(a2, e3, ["--stroke", "--color"]);
        if (g4)
          return [o2("stroke", g4)];
      }
      {
        let g4 = e3.resolve(a2.value.value, ["--stroke-width"]);
        if (g4)
          return [o2("stroke-width", g4)];
        if (u(a2.value.value))
          return [o2("stroke-width", a2.value.value)];
      }
    }
  }), r2("stroke", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--stroke", "--color"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`) }, { values: ["0", "1", "2", "3"], valueThemeKeys: ["--stroke-width"] }]), t2("object-contain", [["object-fit", "contain"]]), t2("object-cover", [["object-fit", "cover"]]), t2("object-fill", [["object-fit", "fill"]]), t2("object-none", [["object-fit", "none"]]), t2("object-scale-down", [["object-fit", "scale-down"]]), n3("object", { themeKeys: ["--object-position"], handle: (a2) => [o2("object-position", a2)], staticValues: { top: [o2("object-position", "top")], "top-left": [o2("object-position", "left top")], "top-right": [o2("object-position", "right top")], bottom: [o2("object-position", "bottom")], "bottom-left": [o2("object-position", "left bottom")], "bottom-right": [o2("object-position", "right bottom")], left: [o2("object-position", "left")], right: [o2("object-position", "right")], center: [o2("object-position", "center")] } });
  for (let [a2, g4] of [["p", "padding"], ["px", "padding-inline"], ["py", "padding-block"], ["ps", "padding-inline-start"], ["pe", "padding-inline-end"], ["pbs", "padding-block-start"], ["pbe", "padding-block-end"], ["pt", "padding-top"], ["pr", "padding-right"], ["pb", "padding-bottom"], ["pl", "padding-left"]])
    l6(a2, ["--padding", "--spacing"], (w4) => [o2(g4, w4)]);
  t2("text-left", [["text-align", "left"]]), t2("text-center", [["text-align", "center"]]), t2("text-right", [["text-align", "right"]]), t2("text-justify", [["text-align", "justify"]]), t2("text-start", [["text-align", "start"]]), t2("text-end", [["text-align", "end"]]), l6("indent", ["--text-indent", "--spacing"], (a2) => [o2("text-indent", a2)], { supportsNegative: true }), t2("align-baseline", [["vertical-align", "baseline"]]), t2("align-top", [["vertical-align", "top"]]), t2("align-middle", [["vertical-align", "middle"]]), t2("align-bottom", [["vertical-align", "bottom"]]), t2("align-text-top", [["vertical-align", "text-top"]]), t2("align-text-bottom", [["vertical-align", "text-bottom"]]), t2("align-sub", [["vertical-align", "sub"]]), t2("align-super", [["vertical-align", "super"]]), n3("align", { themeKeys: [], handle: (a2) => [o2("vertical-align", a2)] }), i.functional("font", (a2) => {
    if (!(!a2.value || a2.modifier)) {
      if (a2.value.kind === "arbitrary") {
        let g4 = a2.value.value;
        switch (a2.value.dataType ?? pe2(g4, ["number", "generic-name", "family-name"])) {
          case "generic-name":
          case "family-name":
            return [o2("font-family", g4)];
          default:
            return [Y4([S4("--tw-font-weight")]), o2("--tw-font-weight", g4), o2("font-weight", g4)];
        }
      }
      {
        let g4 = e3.resolveWith(a2.value.value, ["--font"], ["--font-feature-settings", "--font-variation-settings"]);
        if (g4) {
          let [w4, C3 = {}] = g4;
          return [o2("font-family", w4), o2("font-feature-settings", C3["--font-feature-settings"]), o2("font-variation-settings", C3["--font-variation-settings"])];
        }
      }
      {
        let g4 = e3.resolve(a2.value.value, ["--font-weight"]);
        if (g4)
          return [Y4([S4("--tw-font-weight")]), o2("--tw-font-weight", g4), o2("font-weight", g4)];
      }
    }
  }), r2("font", () => [{ values: [], valueThemeKeys: ["--font"] }, { values: [], valueThemeKeys: ["--font-weight"] }]), n3("font-features", { themeKeys: [], handle: (a2) => [o2("font-feature-settings", a2)] }), t2("uppercase", [["text-transform", "uppercase"]]), t2("lowercase", [["text-transform", "lowercase"]]), t2("capitalize", [["text-transform", "capitalize"]]), t2("normal-case", [["text-transform", "none"]]), t2("italic", [["font-style", "italic"]]), t2("not-italic", [["font-style", "normal"]]), t2("underline", [["text-decoration-line", "underline"]]), t2("overline", [["text-decoration-line", "overline"]]), t2("line-through", [["text-decoration-line", "line-through"]]), t2("no-underline", [["text-decoration-line", "none"]]), t2("font-stretch-normal", [["font-stretch", "normal"]]), t2("font-stretch-ultra-condensed", [["font-stretch", "ultra-condensed"]]), t2("font-stretch-extra-condensed", [["font-stretch", "extra-condensed"]]), t2("font-stretch-condensed", [["font-stretch", "condensed"]]), t2("font-stretch-semi-condensed", [["font-stretch", "semi-condensed"]]), t2("font-stretch-semi-expanded", [["font-stretch", "semi-expanded"]]), t2("font-stretch-expanded", [["font-stretch", "expanded"]]), t2("font-stretch-extra-expanded", [["font-stretch", "extra-expanded"]]), t2("font-stretch-ultra-expanded", [["font-stretch", "ultra-expanded"]]), n3("font-stretch", { handleBareValue: ({ value: a2 }) => {
    if (!a2.endsWith("%"))
      return null;
    let g4 = Number(a2.slice(0, -1));
    return !u(g4) || Number.isNaN(g4) || g4 < 50 || g4 > 200 ? null : a2;
  }, handle: (a2) => [o2("font-stretch", a2)] }), r2("font-stretch", () => [{ values: ["50%", "75%", "90%", "95%", "100%", "105%", "110%", "125%", "150%", "200%"] }]), s3("placeholder", { themeKeys: ["--placeholder-color", "--color"], handle: (a2) => [H4("&::placeholder", [o2("--tw-sort", "placeholder-color"), o2("color", a2)])] }), t2("decoration-solid", [["text-decoration-style", "solid"]]), t2("decoration-double", [["text-decoration-style", "double"]]), t2("decoration-dotted", [["text-decoration-style", "dotted"]]), t2("decoration-dashed", [["text-decoration-style", "dashed"]]), t2("decoration-wavy", [["text-decoration-style", "wavy"]]), t2("decoration-auto", [["text-decoration-thickness", "auto"]]), t2("decoration-from-font", [["text-decoration-thickness", "from-font"]]), i.functional("decoration", (a2) => {
    if (a2.value) {
      if (a2.value.kind === "arbitrary") {
        let g4 = a2.value.value;
        switch (a2.value.dataType ?? pe2(g4, ["color", "length", "percentage"])) {
          case "length":
          case "percentage":
            return a2.modifier ? undefined : [o2("text-decoration-thickness", g4)];
          default:
            return g4 = te4(g4, a2.modifier, e3), g4 === null ? undefined : [o2("text-decoration-color", g4)];
        }
      }
      {
        let g4 = e3.resolve(a2.value.value, ["--text-decoration-thickness"]);
        if (g4)
          return a2.modifier ? undefined : [o2("text-decoration-thickness", g4)];
        if (u(a2.value.value))
          return a2.modifier ? undefined : [o2("text-decoration-thickness", `${a2.value.value}px`)];
      }
      {
        let g4 = oe3(a2, e3, ["--text-decoration-color", "--color"]);
        if (g4)
          return [o2("text-decoration-color", g4)];
      }
    }
  }), r2("decoration", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--text-decoration-color", "--color"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`) }, { values: ["0", "1", "2"], valueThemeKeys: ["--text-decoration-thickness"] }]), n3("animate", { themeKeys: ["--animate"], handle: (a2) => [o2("animation", a2)], staticValues: { none: [o2("animation", "none")] } });
  {
    let a2 = ["var(--tw-blur,)", "var(--tw-brightness,)", "var(--tw-contrast,)", "var(--tw-grayscale,)", "var(--tw-hue-rotate,)", "var(--tw-invert,)", "var(--tw-saturate,)", "var(--tw-sepia,)", "var(--tw-drop-shadow,)"].join(" "), g4 = ["var(--tw-backdrop-blur,)", "var(--tw-backdrop-brightness,)", "var(--tw-backdrop-contrast,)", "var(--tw-backdrop-grayscale,)", "var(--tw-backdrop-hue-rotate,)", "var(--tw-backdrop-invert,)", "var(--tw-backdrop-opacity,)", "var(--tw-backdrop-saturate,)", "var(--tw-backdrop-sepia,)"].join(" "), w4 = () => Y4([S4("--tw-blur"), S4("--tw-brightness"), S4("--tw-contrast"), S4("--tw-grayscale"), S4("--tw-hue-rotate"), S4("--tw-invert"), S4("--tw-opacity"), S4("--tw-saturate"), S4("--tw-sepia"), S4("--tw-drop-shadow"), S4("--tw-drop-shadow-color"), S4("--tw-drop-shadow-alpha", "100%", "<percentage>"), S4("--tw-drop-shadow-size")]), C3 = () => Y4([S4("--tw-backdrop-blur"), S4("--tw-backdrop-brightness"), S4("--tw-backdrop-contrast"), S4("--tw-backdrop-grayscale"), S4("--tw-backdrop-hue-rotate"), S4("--tw-backdrop-invert"), S4("--tw-backdrop-opacity"), S4("--tw-backdrop-saturate"), S4("--tw-backdrop-sepia")]);
    i.functional("filter", (x4) => {
      if (!x4.modifier) {
        if (x4.value === null)
          return [w4(), o2("filter", a2)];
        if (x4.value.kind === "arbitrary")
          return [o2("filter", x4.value.value)];
        if (x4.value.value === "none")
          return [o2("filter", "none")];
      }
    }), i.functional("backdrop-filter", (x4) => {
      if (!x4.modifier) {
        if (x4.value === null)
          return [C3(), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)];
        if (x4.value.kind === "arbitrary")
          return [o2("-webkit-backdrop-filter", x4.value.value), o2("backdrop-filter", x4.value.value)];
        if (x4.value.value === "none")
          return [o2("-webkit-backdrop-filter", "none"), o2("backdrop-filter", "none")];
      }
    }), n3("blur", { themeKeys: ["--blur"], handle: (x4) => [w4(), o2("--tw-blur", `blur(${x4})`), o2("filter", a2)], staticValues: { none: [w4(), o2("--tw-blur", " "), o2("filter", a2)] } }), n3("backdrop-blur", { themeKeys: ["--backdrop-blur", "--blur"], handle: (x4) => [C3(), o2("--tw-backdrop-blur", `blur(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)], staticValues: { none: [C3(), o2("--tw-backdrop-blur", " "), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] } }), n3("brightness", { themeKeys: ["--brightness"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, handle: (x4) => [w4(), o2("--tw-brightness", `brightness(${x4})`), o2("filter", a2)] }), n3("backdrop-brightness", { themeKeys: ["--backdrop-brightness", "--brightness"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, handle: (x4) => [C3(), o2("--tw-backdrop-brightness", `brightness(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("brightness", () => [{ values: ["0", "50", "75", "90", "95", "100", "105", "110", "125", "150", "200"], valueThemeKeys: ["--brightness"] }]), r2("backdrop-brightness", () => [{ values: ["0", "50", "75", "90", "95", "100", "105", "110", "125", "150", "200"], valueThemeKeys: ["--backdrop-brightness", "--brightness"] }]), n3("contrast", { themeKeys: ["--contrast"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, handle: (x4) => [w4(), o2("--tw-contrast", `contrast(${x4})`), o2("filter", a2)] }), n3("backdrop-contrast", { themeKeys: ["--backdrop-contrast", "--contrast"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, handle: (x4) => [C3(), o2("--tw-backdrop-contrast", `contrast(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("contrast", () => [{ values: ["0", "50", "75", "100", "125", "150", "200"], valueThemeKeys: ["--contrast"] }]), r2("backdrop-contrast", () => [{ values: ["0", "50", "75", "100", "125", "150", "200"], valueThemeKeys: ["--backdrop-contrast", "--contrast"] }]), n3("grayscale", { themeKeys: ["--grayscale"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, defaultValue: "100%", handle: (x4) => [w4(), o2("--tw-grayscale", `grayscale(${x4})`), o2("filter", a2)] }), n3("backdrop-grayscale", { themeKeys: ["--backdrop-grayscale", "--grayscale"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, defaultValue: "100%", handle: (x4) => [C3(), o2("--tw-backdrop-grayscale", `grayscale(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("grayscale", () => [{ values: ["0", "25", "50", "75", "100"], valueThemeKeys: ["--grayscale"], hasDefaultValue: true }]), r2("backdrop-grayscale", () => [{ values: ["0", "25", "50", "75", "100"], valueThemeKeys: ["--backdrop-grayscale", "--grayscale"], hasDefaultValue: true }]), n3("hue-rotate", { supportsNegative: true, themeKeys: ["--hue-rotate"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}deg` : null, handle: (x4) => [w4(), o2("--tw-hue-rotate", `hue-rotate(${x4})`), o2("filter", a2)] }), n3("backdrop-hue-rotate", { supportsNegative: true, themeKeys: ["--backdrop-hue-rotate", "--hue-rotate"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}deg` : null, handle: (x4) => [C3(), o2("--tw-backdrop-hue-rotate", `hue-rotate(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("hue-rotate", () => [{ values: ["0", "15", "30", "60", "90", "180"], valueThemeKeys: ["--hue-rotate"] }]), r2("backdrop-hue-rotate", () => [{ values: ["0", "15", "30", "60", "90", "180"], valueThemeKeys: ["--backdrop-hue-rotate", "--hue-rotate"] }]), n3("invert", { themeKeys: ["--invert"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, defaultValue: "100%", handle: (x4) => [w4(), o2("--tw-invert", `invert(${x4})`), o2("filter", a2)] }), n3("backdrop-invert", { themeKeys: ["--backdrop-invert", "--invert"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, defaultValue: "100%", handle: (x4) => [C3(), o2("--tw-backdrop-invert", `invert(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("invert", () => [{ values: ["0", "25", "50", "75", "100"], valueThemeKeys: ["--invert"], hasDefaultValue: true }]), r2("backdrop-invert", () => [{ values: ["0", "25", "50", "75", "100"], valueThemeKeys: ["--backdrop-invert", "--invert"], hasDefaultValue: true }]), n3("saturate", { themeKeys: ["--saturate"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, handle: (x4) => [w4(), o2("--tw-saturate", `saturate(${x4})`), o2("filter", a2)] }), n3("backdrop-saturate", { themeKeys: ["--backdrop-saturate", "--saturate"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, handle: (x4) => [C3(), o2("--tw-backdrop-saturate", `saturate(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("saturate", () => [{ values: ["0", "50", "100", "150", "200"], valueThemeKeys: ["--saturate"] }]), r2("backdrop-saturate", () => [{ values: ["0", "50", "100", "150", "200"], valueThemeKeys: ["--backdrop-saturate", "--saturate"] }]), n3("sepia", { themeKeys: ["--sepia"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, defaultValue: "100%", handle: (x4) => [w4(), o2("--tw-sepia", `sepia(${x4})`), o2("filter", a2)] }), n3("backdrop-sepia", { themeKeys: ["--backdrop-sepia", "--sepia"], handleBareValue: ({ value: x4 }) => u(x4) ? `${x4}%` : null, defaultValue: "100%", handle: (x4) => [C3(), o2("--tw-backdrop-sepia", `sepia(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("sepia", () => [{ values: ["0", "50", "100"], valueThemeKeys: ["--sepia"], hasDefaultValue: true }]), r2("backdrop-sepia", () => [{ values: ["0", "50", "100"], valueThemeKeys: ["--backdrop-sepia", "--sepia"], hasDefaultValue: true }]), t2("drop-shadow-none", [w4, ["--tw-drop-shadow", " "], ["filter", a2]]), i.functional("drop-shadow", (x4) => {
      let $4;
      if (x4.modifier && (x4.modifier.kind === "arbitrary" ? $4 = x4.modifier.value : u(x4.modifier.value) && ($4 = `${x4.modifier.value}%`)), !x4.value) {
        let K4 = e3.get(["--drop-shadow"]), T4 = e3.resolve(null, ["--drop-shadow"]);
        return K4 === null || T4 === null ? undefined : [w4(), o2("--tw-drop-shadow-alpha", $4), ...gt4("--tw-drop-shadow-size", K4, $4, (R5) => `var(--tw-drop-shadow-color, ${R5})`), o2("--tw-drop-shadow", d2(T4, ",").map((R5) => `drop-shadow(${R5})`).join(" ")), o2("filter", a2)];
      }
      if (x4.value.kind === "arbitrary") {
        let K4 = x4.value.value;
        return (x4.value.dataType ?? pe2(K4, ["color"])) === "color" ? (K4 = te4(K4, x4.modifier, e3), K4 === null ? undefined : [w4(), o2("--tw-drop-shadow-color", Q3(K4, "var(--tw-drop-shadow-alpha)")), o2("--tw-drop-shadow", "var(--tw-drop-shadow-size)")]) : x4.modifier && !$4 ? undefined : [w4(), o2("--tw-drop-shadow-alpha", $4), ...gt4("--tw-drop-shadow-size", K4, $4, (R5) => `var(--tw-drop-shadow-color, ${R5})`), o2("--tw-drop-shadow", "var(--tw-drop-shadow-size)"), o2("filter", a2)];
      }
      {
        let K4 = e3.get([`--drop-shadow-${x4.value.value}`]), T4 = e3.resolve(x4.value.value, ["--drop-shadow"]);
        if (K4 && T4)
          return x4.modifier && !$4 ? undefined : $4 ? [w4(), o2("--tw-drop-shadow-alpha", $4), ...gt4("--tw-drop-shadow-size", K4, $4, (R5) => `var(--tw-drop-shadow-color, ${R5})`), o2("--tw-drop-shadow", "var(--tw-drop-shadow-size)"), o2("filter", a2)] : [w4(), o2("--tw-drop-shadow-alpha", $4), ...gt4("--tw-drop-shadow-size", K4, $4, (R5) => `var(--tw-drop-shadow-color, ${R5})`), o2("--tw-drop-shadow", d2(T4, ",").map((R5) => `drop-shadow(${R5})`).join(" ")), o2("filter", a2)];
      }
      {
        let K4 = oe3(x4, e3, ["--drop-shadow-color", "--color"]);
        if (K4)
          return K4 === "inherit" ? [w4(), o2("--tw-drop-shadow-color", "inherit"), o2("--tw-drop-shadow", "var(--tw-drop-shadow-size)")] : [w4(), o2("--tw-drop-shadow-color", Q3(K4, "var(--tw-drop-shadow-alpha)")), o2("--tw-drop-shadow", "var(--tw-drop-shadow-size)")];
      }
    }), r2("drop-shadow", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--drop-shadow-color", "--color"], modifiers: Array.from({ length: 21 }, (x4, $4) => `${$4 * 5}`) }, { valueThemeKeys: ["--drop-shadow"] }]), n3("backdrop-opacity", { themeKeys: ["--backdrop-opacity", "--opacity"], handleBareValue: ({ value: x4 }) => de3(x4) ? `${x4}%` : null, handle: (x4) => [C3(), o2("--tw-backdrop-opacity", `opacity(${x4})`), o2("-webkit-backdrop-filter", g4), o2("backdrop-filter", g4)] }), r2("backdrop-opacity", () => [{ values: Array.from({ length: 21 }, (x4, $4) => `${$4 * 5}`), valueThemeKeys: ["--backdrop-opacity", "--opacity"] }]);
  }
  {
    let a2 = `var(--tw-ease, ${e3.resolve(null, ["--default-transition-timing-function"]) ?? "ease"})`, g4 = `var(--tw-duration, ${e3.resolve(null, ["--default-transition-duration"]) ?? "0s"})`;
    n3("transition", { defaultValue: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events", themeKeys: ["--transition-property"], handle: (w4) => [o2("transition-property", w4), o2("transition-timing-function", a2), o2("transition-duration", g4)], staticValues: { none: [o2("transition-property", "none")], all: [o2("transition-property", "all"), o2("transition-timing-function", a2), o2("transition-duration", g4)], colors: [o2("transition-property", "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to"), o2("transition-timing-function", a2), o2("transition-duration", g4)], opacity: [o2("transition-property", "opacity"), o2("transition-timing-function", a2), o2("transition-duration", g4)], shadow: [o2("transition-property", "box-shadow"), o2("transition-timing-function", a2), o2("transition-duration", g4)], transform: [o2("transition-property", "transform, translate, scale, rotate"), o2("transition-timing-function", a2), o2("transition-duration", g4)] } }), t2("transition-discrete", [["transition-behavior", "allow-discrete"]]), t2("transition-normal", [["transition-behavior", "normal"]]), n3("delay", { handleBareValue: ({ value: w4 }) => u(w4) ? `${w4}ms` : null, themeKeys: ["--transition-delay"], handle: (w4) => [o2("transition-delay", w4)] });
    {
      let w4 = () => Y4([S4("--tw-duration")]);
      t2("duration-initial", [w4, ["--tw-duration", "initial"]]), i.functional("duration", (C3) => {
        if (C3.modifier || !C3.value)
          return;
        let x4 = null;
        if (C3.value.kind === "arbitrary" ? x4 = C3.value.value : (x4 = e3.resolve(C3.value.fraction ?? C3.value.value, ["--transition-duration"]), x4 === null && u(C3.value.value) && (x4 = `${C3.value.value}ms`)), x4 !== null)
          return [w4(), o2("--tw-duration", x4), o2("transition-duration", x4)];
      });
    }
    r2("delay", () => [{ values: ["75", "100", "150", "200", "300", "500", "700", "1000"], valueThemeKeys: ["--transition-delay"] }]), r2("duration", () => [{ values: ["75", "100", "150", "200", "300", "500", "700", "1000"], valueThemeKeys: ["--transition-duration"] }]);
  }
  {
    let a2 = () => Y4([S4("--tw-ease")]);
    n3("ease", { themeKeys: ["--ease"], handle: (g4) => [a2(), o2("--tw-ease", g4), o2("transition-timing-function", g4)], staticValues: { initial: [a2(), o2("--tw-ease", "initial")], linear: [a2(), o2("--tw-ease", "linear"), o2("transition-timing-function", "linear")] } });
  }
  t2("will-change-auto", [["will-change", "auto"]]), t2("will-change-scroll", [["will-change", "scroll-position"]]), t2("will-change-contents", [["will-change", "contents"]]), t2("will-change-transform", [["will-change", "transform"]]), n3("will-change", { themeKeys: [], handle: (a2) => [o2("will-change", a2)] }), t2("content-none", [["--tw-content", "none"], ["content", "none"]]), n3("content", { themeKeys: ["--content"], handle: (a2) => [Y4([S4("--tw-content", '""')]), o2("--tw-content", a2), o2("content", "var(--tw-content)")] });
  {
    let a2 = "var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)", g4 = () => Y4([S4("--tw-contain-size"), S4("--tw-contain-layout"), S4("--tw-contain-paint"), S4("--tw-contain-style")]);
    t2("contain-none", [["contain", "none"]]), t2("contain-content", [["contain", "content"]]), t2("contain-strict", [["contain", "strict"]]), t2("contain-size", [g4, ["--tw-contain-size", "size"], ["contain", a2]]), t2("contain-inline-size", [g4, ["--tw-contain-size", "inline-size"], ["contain", a2]]), t2("contain-layout", [g4, ["--tw-contain-layout", "layout"], ["contain", a2]]), t2("contain-paint", [g4, ["--tw-contain-paint", "paint"], ["contain", a2]]), t2("contain-style", [g4, ["--tw-contain-style", "style"], ["contain", a2]]), n3("contain", { themeKeys: [], handle: (w4) => [o2("contain", w4)] });
  }
  t2("forced-color-adjust-none", [["forced-color-adjust", "none"]]), t2("forced-color-adjust-auto", [["forced-color-adjust", "auto"]]), l6("leading", ["--leading", "--spacing"], (a2) => [Y4([S4("--tw-leading")]), o2("--tw-leading", a2), o2("line-height", a2)], { staticValues: { none: [Y4([S4("--tw-leading")]), o2("--tw-leading", "1"), o2("line-height", "1")] } }), n3("tracking", { supportsNegative: true, themeKeys: ["--tracking"], handle: (a2) => [Y4([S4("--tw-tracking")]), o2("--tw-tracking", a2), o2("letter-spacing", a2)] }), t2("antialiased", [["-webkit-font-smoothing", "antialiased"], ["-moz-osx-font-smoothing", "grayscale"]]), t2("subpixel-antialiased", [["-webkit-font-smoothing", "auto"], ["-moz-osx-font-smoothing", "auto"]]);
  {
    let a2 = "var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)", g4 = () => Y4([S4("--tw-ordinal"), S4("--tw-slashed-zero"), S4("--tw-numeric-figure"), S4("--tw-numeric-spacing"), S4("--tw-numeric-fraction")]);
    t2("normal-nums", [["font-variant-numeric", "normal"]]), t2("ordinal", [g4, ["--tw-ordinal", "ordinal"], ["font-variant-numeric", a2]]), t2("slashed-zero", [g4, ["--tw-slashed-zero", "slashed-zero"], ["font-variant-numeric", a2]]), t2("lining-nums", [g4, ["--tw-numeric-figure", "lining-nums"], ["font-variant-numeric", a2]]), t2("oldstyle-nums", [g4, ["--tw-numeric-figure", "oldstyle-nums"], ["font-variant-numeric", a2]]), t2("proportional-nums", [g4, ["--tw-numeric-spacing", "proportional-nums"], ["font-variant-numeric", a2]]), t2("tabular-nums", [g4, ["--tw-numeric-spacing", "tabular-nums"], ["font-variant-numeric", a2]]), t2("diagonal-fractions", [g4, ["--tw-numeric-fraction", "diagonal-fractions"], ["font-variant-numeric", a2]]), t2("stacked-fractions", [g4, ["--tw-numeric-fraction", "stacked-fractions"], ["font-variant-numeric", a2]]);
  }
  {
    let a2 = () => Y4([S4("--tw-outline-style", "solid")]);
    i.static("outline-hidden", () => [o2("--tw-outline-style", "none"), o2("outline-style", "none"), B3("@media", "(forced-colors: active)", [o2("outline", "2px solid transparent"), o2("outline-offset", "2px")])]), t2("outline-none", [["--tw-outline-style", "none"], ["outline-style", "none"]]), t2("outline-solid", [["--tw-outline-style", "solid"], ["outline-style", "solid"]]), t2("outline-dashed", [["--tw-outline-style", "dashed"], ["outline-style", "dashed"]]), t2("outline-dotted", [["--tw-outline-style", "dotted"], ["outline-style", "dotted"]]), t2("outline-double", [["--tw-outline-style", "double"], ["outline-style", "double"]]), i.functional("outline", (g4) => {
      if (g4.value === null) {
        if (g4.modifier)
          return;
        let w4 = e3.get(["--default-outline-width"]) ?? "1px";
        return [a2(), o2("outline-style", "var(--tw-outline-style)"), o2("outline-width", w4)];
      }
      if (g4.value.kind === "arbitrary") {
        let w4 = g4.value.value;
        switch (g4.value.dataType ?? pe2(w4, ["color", "length", "number", "percentage"])) {
          case "length":
          case "number":
          case "percentage":
            return g4.modifier ? undefined : [a2(), o2("outline-style", "var(--tw-outline-style)"), o2("outline-width", w4)];
          default:
            return w4 = te4(w4, g4.modifier, e3), w4 === null ? undefined : [o2("outline-color", w4)];
        }
      }
      {
        let w4 = oe3(g4, e3, ["--outline-color", "--color"]);
        if (w4)
          return [o2("outline-color", w4)];
      }
      {
        if (g4.modifier)
          return;
        let w4 = e3.resolve(g4.value.value, ["--outline-width"]);
        if (w4)
          return [a2(), o2("outline-style", "var(--tw-outline-style)"), o2("outline-width", w4)];
        if (u(g4.value.value))
          return [a2(), o2("outline-style", "var(--tw-outline-style)"), o2("outline-width", `${g4.value.value}px`)];
      }
    }), r2("outline", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--outline-color", "--color"], modifiers: Array.from({ length: 21 }, (g4, w4) => `${w4 * 5}`), hasDefaultValue: true }, { values: ["0", "1", "2", "4", "8"], valueThemeKeys: ["--outline-width"] }]), n3("outline-offset", { supportsNegative: true, themeKeys: ["--outline-offset"], handleBareValue: ({ value: g4 }) => u(g4) ? `${g4}px` : null, handle: (g4) => [o2("outline-offset", g4)] }), r2("outline-offset", () => [{ supportsNegative: true, values: ["0", "1", "2", "4", "8"], valueThemeKeys: ["--outline-offset"] }]);
  }
  n3("opacity", { themeKeys: ["--opacity"], handleBareValue: ({ value: a2 }) => de3(a2) ? `${a2}%` : null, handle: (a2) => [o2("opacity", a2)] }), r2("opacity", () => [{ values: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`), valueThemeKeys: ["--opacity"] }]), n3("underline-offset", { supportsNegative: true, themeKeys: ["--text-underline-offset"], handleBareValue: ({ value: a2 }) => u(a2) ? `${a2}px` : null, handle: (a2) => [o2("text-underline-offset", a2)], staticValues: { auto: [o2("text-underline-offset", "auto")] } }), r2("underline-offset", () => [{ supportsNegative: true, values: ["0", "1", "2", "4", "8"], valueThemeKeys: ["--text-underline-offset"] }]), i.functional("text", (a2) => {
    if (a2.value) {
      if (a2.value.kind === "arbitrary") {
        let g4 = a2.value.value;
        switch (a2.value.dataType ?? pe2(g4, ["color", "length", "percentage", "absolute-size", "relative-size"])) {
          case "size":
          case "length":
          case "percentage":
          case "absolute-size":
          case "relative-size": {
            if (a2.modifier) {
              let C3 = a2.modifier.kind === "arbitrary" ? a2.modifier.value : e3.resolve(a2.modifier.value, ["--leading"]);
              if (!C3 && ue3(a2.modifier.value)) {
                if (!e3.resolve(null, ["--spacing"]))
                  return null;
                C3 = `--spacing(${a2.modifier.value})`;
              }
              return !C3 && a2.modifier.value === "none" && (C3 = "1"), C3 ? [o2("font-size", g4), o2("line-height", C3)] : null;
            }
            return [o2("font-size", g4)];
          }
          default:
            return g4 = te4(g4, a2.modifier, e3), g4 === null ? undefined : [o2("color", g4)];
        }
      }
      {
        let g4 = oe3(a2, e3, ["--text-color", "--color"]);
        if (g4)
          return [o2("color", g4)];
      }
      {
        let g4 = e3.resolveWith(a2.value.value, ["--text"], ["--line-height", "--letter-spacing", "--font-weight"]);
        if (g4) {
          let [w4, C3 = {}] = Array.isArray(g4) ? g4 : [g4];
          if (a2.modifier) {
            let x4 = a2.modifier.kind === "arbitrary" ? a2.modifier.value : e3.resolve(a2.modifier.value, ["--leading"]);
            if (!x4 && ue3(a2.modifier.value)) {
              if (!e3.resolve(null, ["--spacing"]))
                return null;
              x4 = `--spacing(${a2.modifier.value})`;
            }
            if (!x4 && a2.modifier.value === "none" && (x4 = "1"), !x4)
              return null;
            let $4 = [o2("font-size", w4)];
            return x4 && $4.push(o2("line-height", x4)), $4;
          }
          return typeof C3 == "string" ? [o2("font-size", w4), o2("line-height", C3)] : [o2("font-size", w4), o2("line-height", C3["--line-height"] ? `var(--tw-leading, ${C3["--line-height"]})` : undefined), o2("letter-spacing", C3["--letter-spacing"] ? `var(--tw-tracking, ${C3["--letter-spacing"]})` : undefined), o2("font-weight", C3["--font-weight"] ? `var(--tw-font-weight, ${C3["--font-weight"]})` : undefined)];
        }
      }
    }
  }), r2("text", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--text-color", "--color"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`) }, { values: [], valueThemeKeys: ["--text"], modifiers: [], modifierThemeKeys: ["--leading"] }]);
  let z4 = () => Y4([S4("--tw-text-shadow-color"), S4("--tw-text-shadow-alpha", "100%", "<percentage>")]);
  t2("text-shadow-initial", [z4, ["--tw-text-shadow-color", "initial"]]), i.functional("text-shadow", (a2) => {
    let g4;
    if (a2.modifier && (a2.modifier.kind === "arbitrary" ? g4 = a2.modifier.value : u(a2.modifier.value) && (g4 = `${a2.modifier.value}%`)), !a2.value) {
      let w4 = e3.get(["--text-shadow"]);
      return w4 === null ? undefined : [z4(), o2("--tw-text-shadow-alpha", g4), ...be3("text-shadow", w4, g4, (C3) => `var(--tw-text-shadow-color, ${C3})`)];
    }
    if (a2.value.kind === "arbitrary") {
      let w4 = a2.value.value;
      return (a2.value.dataType ?? pe2(w4, ["color"])) === "color" ? (w4 = te4(w4, a2.modifier, e3), w4 === null ? undefined : [z4(), o2("--tw-text-shadow-color", Q3(w4, "var(--tw-text-shadow-alpha)"))]) : [z4(), o2("--tw-text-shadow-alpha", g4), ...be3("text-shadow", w4, g4, (x4) => `var(--tw-text-shadow-color, ${x4})`)];
    }
    switch (a2.value.value) {
      case "none":
        return a2.modifier ? undefined : [z4(), o2("text-shadow", "none")];
      case "inherit":
        return a2.modifier ? undefined : [z4(), o2("--tw-text-shadow-color", "inherit")];
    }
    {
      let w4 = e3.get([`--text-shadow-${a2.value.value}`]);
      if (w4)
        return [z4(), o2("--tw-text-shadow-alpha", g4), ...be3("text-shadow", w4, g4, (C3) => `var(--tw-text-shadow-color, ${C3})`)];
    }
    {
      let w4 = oe3(a2, e3, ["--text-shadow-color", "--color"]);
      if (w4)
        return [z4(), o2("--tw-text-shadow-color", Q3(w4, "var(--tw-text-shadow-alpha)"))];
    }
  }), r2("text-shadow", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--text-shadow-color", "--color"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`) }, { values: ["none"] }, { valueThemeKeys: ["--text-shadow"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`), hasDefaultValue: e3.get(["--text-shadow"]) !== null }]);
  {
    let x4 = function(T4) {
      return `var(--tw-ring-inset,) 0 0 0 calc(${T4} + var(--tw-ring-offset-width)) var(--tw-ring-color, ${C3})`;
    }, $4 = function(T4) {
      return `inset 0 0 0 ${T4} var(--tw-inset-ring-color, currentcolor)`;
    };
    var X4 = x4, ie4 = $4;
    let a2 = ["var(--tw-inset-shadow)", "var(--tw-inset-ring-shadow)", "var(--tw-ring-offset-shadow)", "var(--tw-ring-shadow)", "var(--tw-shadow)"].join(", "), g4 = "0 0 #0000", w4 = () => Y4([S4("--tw-shadow", g4), S4("--tw-shadow-color"), S4("--tw-shadow-alpha", "100%", "<percentage>"), S4("--tw-inset-shadow", g4), S4("--tw-inset-shadow-color"), S4("--tw-inset-shadow-alpha", "100%", "<percentage>"), S4("--tw-ring-color"), S4("--tw-ring-shadow", g4), S4("--tw-inset-ring-color"), S4("--tw-inset-ring-shadow", g4), S4("--tw-ring-inset"), S4("--tw-ring-offset-width", "0px", "<length>"), S4("--tw-ring-offset-color", "#fff"), S4("--tw-ring-offset-shadow", g4)]);
    t2("shadow-initial", [w4, ["--tw-shadow-color", "initial"]]), i.functional("shadow", (T4) => {
      let R5;
      if (T4.modifier && (T4.modifier.kind === "arbitrary" ? R5 = T4.modifier.value : u(T4.modifier.value) && (R5 = `${T4.modifier.value}%`)), !T4.value) {
        let W4 = e3.get(["--shadow"]);
        return W4 === null ? undefined : [w4(), o2("--tw-shadow-alpha", R5), ...be3("--tw-shadow", W4, R5, (ge4) => `var(--tw-shadow-color, ${ge4})`), o2("box-shadow", a2)];
      }
      if (T4.value.kind === "arbitrary") {
        let W4 = T4.value.value;
        return (T4.value.dataType ?? pe2(W4, ["color"])) === "color" ? (W4 = te4(W4, T4.modifier, e3), W4 === null ? undefined : [w4(), o2("--tw-shadow-color", Q3(W4, "var(--tw-shadow-alpha)"))]) : [w4(), o2("--tw-shadow-alpha", R5), ...be3("--tw-shadow", W4, R5, (Et3) => `var(--tw-shadow-color, ${Et3})`), o2("box-shadow", a2)];
      }
      switch (T4.value.value) {
        case "none":
          return T4.modifier ? undefined : [w4(), o2("--tw-shadow", g4), o2("box-shadow", a2)];
        case "inherit":
          return T4.modifier ? undefined : [w4(), o2("--tw-shadow-color", "inherit")];
      }
      {
        let W4 = e3.get([`--shadow-${T4.value.value}`]);
        if (W4)
          return [w4(), o2("--tw-shadow-alpha", R5), ...be3("--tw-shadow", W4, R5, (ge4) => `var(--tw-shadow-color, ${ge4})`), o2("box-shadow", a2)];
      }
      {
        let W4 = oe3(T4, e3, ["--box-shadow-color", "--color"]);
        if (W4)
          return [w4(), o2("--tw-shadow-color", Q3(W4, "var(--tw-shadow-alpha)"))];
      }
    }), r2("shadow", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--box-shadow-color", "--color"], modifiers: Array.from({ length: 21 }, (T4, R5) => `${R5 * 5}`) }, { values: ["none"] }, { valueThemeKeys: ["--shadow"], modifiers: Array.from({ length: 21 }, (T4, R5) => `${R5 * 5}`), hasDefaultValue: e3.get(["--shadow"]) !== null }]), t2("inset-shadow-initial", [w4, ["--tw-inset-shadow-color", "initial"]]), i.functional("inset-shadow", (T4) => {
      let R5;
      if (T4.modifier && (T4.modifier.kind === "arbitrary" ? R5 = T4.modifier.value : u(T4.modifier.value) && (R5 = `${T4.modifier.value}%`)), !T4.value) {
        let W4 = e3.get(["--inset-shadow"]);
        return W4 === null ? undefined : [w4(), o2("--tw-inset-shadow-alpha", R5), ...be3("--tw-inset-shadow", W4, R5, (ge4) => `var(--tw-inset-shadow-color, ${ge4})`), o2("box-shadow", a2)];
      }
      if (T4.value.kind === "arbitrary") {
        let W4 = T4.value.value;
        return (T4.value.dataType ?? pe2(W4, ["color"])) === "color" ? (W4 = te4(W4, T4.modifier, e3), W4 === null ? undefined : [w4(), o2("--tw-inset-shadow-color", Q3(W4, "var(--tw-inset-shadow-alpha)"))]) : [w4(), o2("--tw-inset-shadow-alpha", R5), ...be3("--tw-inset-shadow", W4, R5, (Et3) => `var(--tw-inset-shadow-color, ${Et3})`, "inset"), o2("box-shadow", a2)];
      }
      switch (T4.value.value) {
        case "none":
          return T4.modifier ? undefined : [w4(), o2("--tw-inset-shadow", `inset ${g4}`), o2("box-shadow", a2)];
        case "inherit":
          return T4.modifier ? undefined : [w4(), o2("--tw-inset-shadow-color", "inherit")];
      }
      {
        let W4 = e3.get([`--inset-shadow-${T4.value.value}`]);
        if (W4)
          return [w4(), o2("--tw-inset-shadow-alpha", R5), ...be3("--tw-inset-shadow", W4, R5, (ge4) => `var(--tw-inset-shadow-color, ${ge4})`), o2("box-shadow", a2)];
      }
      {
        let W4 = oe3(T4, e3, ["--box-shadow-color", "--color"]);
        if (W4)
          return [w4(), o2("--tw-inset-shadow-color", Q3(W4, "var(--tw-inset-shadow-alpha)"))];
      }
    }), r2("inset-shadow", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--box-shadow-color", "--color"], modifiers: Array.from({ length: 21 }, (T4, R5) => `${R5 * 5}`) }, { values: ["none"] }, { valueThemeKeys: ["--inset-shadow"], modifiers: Array.from({ length: 21 }, (T4, R5) => `${R5 * 5}`), hasDefaultValue: e3.get(["--inset-shadow"]) !== null }]), t2("ring-inset", [w4, ["--tw-ring-inset", "inset"]]);
    let C3 = e3.get(["--default-ring-color"]) ?? "currentcolor";
    i.functional("ring", (T4) => {
      if (!T4.value) {
        if (T4.modifier)
          return;
        let R5 = e3.get(["--default-ring-width"]) ?? "1px";
        return [w4(), o2("--tw-ring-shadow", x4(R5)), o2("box-shadow", a2)];
      }
      if (T4.value.kind === "arbitrary") {
        let R5 = T4.value.value;
        return (T4.value.dataType ?? pe2(R5, ["color", "length"])) === "length" ? T4.modifier ? undefined : [w4(), o2("--tw-ring-shadow", x4(R5)), o2("box-shadow", a2)] : (R5 = te4(R5, T4.modifier, e3), R5 === null ? undefined : [o2("--tw-ring-color", R5)]);
      }
      {
        let R5 = oe3(T4, e3, ["--ring-color", "--color"]);
        if (R5)
          return [o2("--tw-ring-color", R5)];
      }
      {
        if (T4.modifier)
          return;
        let R5 = e3.resolve(T4.value.value, ["--ring-width"]);
        if (R5 === null && u(T4.value.value) && (R5 = `${T4.value.value}px`), R5)
          return [w4(), o2("--tw-ring-shadow", x4(R5)), o2("box-shadow", a2)];
      }
    }), r2("ring", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--ring-color", "--color"], modifiers: Array.from({ length: 21 }, (T4, R5) => `${R5 * 5}`) }, { values: ["0", "1", "2", "4", "8"], valueThemeKeys: ["--ring-width"], hasDefaultValue: true }]), i.functional("inset-ring", (T4) => {
      if (!T4.value)
        return T4.modifier ? undefined : [w4(), o2("--tw-inset-ring-shadow", $4("1px")), o2("box-shadow", a2)];
      if (T4.value.kind === "arbitrary") {
        let R5 = T4.value.value;
        return (T4.value.dataType ?? pe2(R5, ["color", "length"])) === "length" ? T4.modifier ? undefined : [w4(), o2("--tw-inset-ring-shadow", $4(R5)), o2("box-shadow", a2)] : (R5 = te4(R5, T4.modifier, e3), R5 === null ? undefined : [o2("--tw-inset-ring-color", R5)]);
      }
      {
        let R5 = oe3(T4, e3, ["--ring-color", "--color"]);
        if (R5)
          return [o2("--tw-inset-ring-color", R5)];
      }
      {
        if (T4.modifier)
          return;
        let R5 = e3.resolve(T4.value.value, ["--ring-width"]);
        if (R5 === null && u(T4.value.value) && (R5 = `${T4.value.value}px`), R5)
          return [w4(), o2("--tw-inset-ring-shadow", $4(R5)), o2("box-shadow", a2)];
      }
    }), r2("inset-ring", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--ring-color", "--color"], modifiers: Array.from({ length: 21 }, (T4, R5) => `${R5 * 5}`) }, { values: ["0", "1", "2", "4", "8"], valueThemeKeys: ["--ring-width"], hasDefaultValue: true }]);
    let K4 = "var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)";
    i.functional("ring-offset", (T4) => {
      if (T4.value) {
        if (T4.value.kind === "arbitrary") {
          let R5 = T4.value.value;
          return (T4.value.dataType ?? pe2(R5, ["color", "length"])) === "length" ? T4.modifier ? undefined : [o2("--tw-ring-offset-width", R5), o2("--tw-ring-offset-shadow", K4)] : (R5 = te4(R5, T4.modifier, e3), R5 === null ? undefined : [o2("--tw-ring-offset-color", R5)]);
        }
        {
          let R5 = e3.resolve(T4.value.value, ["--ring-offset-width"]);
          if (R5)
            return T4.modifier ? undefined : [o2("--tw-ring-offset-width", R5), o2("--tw-ring-offset-shadow", K4)];
          if (u(T4.value.value))
            return T4.modifier ? undefined : [o2("--tw-ring-offset-width", `${T4.value.value}px`), o2("--tw-ring-offset-shadow", K4)];
        }
        {
          let R5 = oe3(T4, e3, ["--ring-offset-color", "--color"]);
          if (R5)
            return [o2("--tw-ring-offset-color", R5)];
        }
      }
    });
  }
  return r2("ring-offset", () => [{ values: ["current", "inherit", "transparent"], valueThemeKeys: ["--ring-offset-color", "--color"], modifiers: Array.from({ length: 21 }, (a2, g4) => `${g4 * 5}`) }, { values: ["0", "1", "2", "4", "8"], valueThemeKeys: ["--ring-offset-width"] }]), i.functional("@container", (a2) => {
    let g4 = null;
    if (a2.value === null ? g4 = "inline-size" : a2.value.kind === "arbitrary" ? g4 = a2.value.value : a2.value.kind === "named" && a2.value.value === "normal" ? g4 = "normal" : a2.value.kind === "named" && a2.value.value === "size" && (g4 = "size"), g4 !== null)
      return a2.modifier ? [o2("container-type", g4), o2("container-name", a2.modifier.value)] : [o2("container-type", g4)];
  }), r2("@container", () => [{ values: ["normal"], valueThemeKeys: [], hasDefaultValue: true }]), i;
}
function Wr3(e3) {
  let i = a(e3.params);
  return Ln3(i) ? (r2) => {
    let t2 = { "--value": { usedSpacingInteger: false, usedSpacingNumber: false, themeKeys: new Set, literals: new Set }, "--modifier": { usedSpacingInteger: false, usedSpacingNumber: false, themeKeys: new Set, literals: new Set } };
    _5(e3.nodes, (n3) => {
      if (n3.kind !== "declaration" || !n3.value || !n3.value.includes("--value(") && !n3.value.includes("--modifier("))
        return;
      let s3 = M3(n3.value);
      _5(s3, (l6) => {
        if (l6.kind !== "function")
          return;
        if (l6.value === "--spacing" && !(t2["--modifier"].usedSpacingNumber && t2["--value"].usedSpacingNumber))
          return _5(l6.nodes, (f4) => {
            if (f4.kind !== "function" || f4.value !== "--value" && f4.value !== "--modifier")
              return;
            let c3 = f4.value;
            for (let m2 of f4.nodes)
              if (m2.kind === "word") {
                if (m2.value === "integer")
                  t2[c3].usedSpacingInteger ||= true;
                else if (m2.value === "number" && (t2[c3].usedSpacingNumber ||= true, t2["--modifier"].usedSpacingNumber && t2["--value"].usedSpacingNumber))
                  return V5.Stop;
              }
          }), V5.Continue;
        if (l6.value !== "--value" && l6.value !== "--modifier")
          return;
        let p3 = d2(F3(l6.nodes), ",");
        for (let [f4, c3] of p3.entries())
          c3 = c3.replace(/\\\*/g, "*"), c3 = c3.replace(/--(.*?)\s--(.*?)/g, "--$1-*--$2"), c3 = c3.replace(/\s+/g, ""), c3 = c3.replace(/(-\*){2,}/g, "-*"), c3[0] === "-" && c3[1] === "-" && !c3.includes("(") && !c3.includes("-*") && (c3 += "-*"), p3[f4] = c3;
        l6.nodes = M3(p3.join(","));
        for (let f4 of l6.nodes)
          if (f4.kind === "word" && (f4.value[0] === '"' || f4.value[0] === "'") && f4.value[0] === f4.value[f4.value.length - 1]) {
            let c3 = f4.value.slice(1, -1);
            t2[l6.value].literals.add(c3);
          } else if (f4.kind === "word" && f4.value[0] === "-" && f4.value[1] === "-") {
            let c3 = f4.value.replace(/-\*.*$/g, "");
            t2[l6.value].themeKeys.add(c3);
          } else if (f4.kind === "word" && !(f4.value[0] === "[" && f4.value[f4.value.length - 1] === "]") && !Yt2.includes(f4.value)) {
            console.warn(`Unsupported bare value data type: "${f4.value}".
Only valid data types are: ${Yt2.map((k4) => `"${k4}"`).join(", ")}.
`);
            let c3 = f4.value, m2 = structuredClone(l6), d3 = "¶";
            _5(m2.nodes, (k4) => {
              if (k4.kind === "word" && k4.value === c3)
                return V5.ReplaceSkip({ kind: "word", value: d3 });
            });
            let u2 = "^".repeat(F3([f4]).length), h8 = F3([m2]).indexOf(d3), v5 = ["```css", F3([l6]), " ".repeat(h8) + u2, "```"].join(`
`);
            console.warn(v5);
          }
      }), n3.value = F3(s3);
    }), r2.utilities.functional(i.slice(0, -2), (n3) => {
      let s3 = re3(e3), l6 = n3.value, p3 = n3.modifier, f4 = false, c3 = false, m2 = false, d3 = false, u2 = new Map, h8 = false;
      if (_5([s3], (v5, k4) => {
        let y4 = k4.parent;
        if (y4?.kind !== "rule" && y4?.kind !== "at-rule" || v5.kind !== "declaration" || !v5.value)
          return;
        let N5 = false, A3 = M3(v5.value);
        if (_5(A3, (b5) => {
          if (b5.kind === "function") {
            if (b5.value === "--value") {
              f4 = true;
              let D4 = Lr3(l6, b5, r2);
              return D4 ? (c3 = true, D4.ratio ? h8 = true : u2.set(v5, y4), V5.ReplaceSkip(D4.nodes)) : (N5 = true, V5.Stop);
            } else if (b5.value === "--modifier") {
              m2 = true;
              let D4 = Lr3(p3, b5, r2);
              return D4 ? (d3 = true, V5.ReplaceSkip(D4.nodes)) : (N5 = true, V5.Stop);
            }
          }
        }), N5)
          return V5.ReplaceSkip([]);
        v5.value = F3(A3);
      }), !f4 || !c3 || m2 && !d3 && p3 !== null || h8 && d3 || p3 && !h8 && !d3)
        return null;
      if (h8)
        for (let [v5, k4] of u2) {
          let y4 = k4.nodes.indexOf(v5);
          y4 !== -1 && k4.nodes.splice(y4, 1);
        }
      return s3.nodes;
    }), r2.utilities.suggest(i.slice(0, -2), () => {
      let n3 = [], s3 = [];
      for (let [l6, { literals: p3, usedSpacingNumber: f4, usedSpacingInteger: c3, themeKeys: m2 }] of [[n3, t2["--value"]], [s3, t2["--modifier"]]]) {
        for (let d3 of p3)
          l6.push(d3);
        if (f4)
          l6.push(...wt2);
        else if (c3)
          for (let d3 of wt2)
            u(d3) && l6.push(d3);
        for (let d3 of r2.theme.keysInNamespaces(m2))
          l6.push(d3.replace(Mr3, (u2, h8, v5) => `${h8}.${v5}`));
      }
      return [{ values: n3, modifiers: s3 }];
    });
  } : zn3(i) ? (r2) => {
    r2.utilities.static(i, () => e3.nodes.map(re3));
  } : null;
}
function Lr3(e3, i, r2) {
  if (e3 === null) {
    for (let t2 of i.nodes)
      if (t2.kind === "function" && t2.value === "--default")
        return { nodes: t2.nodes };
    return;
  }
  for (let t2 of i.nodes) {
    if (e3.kind === "named" && t2.kind === "word" && (t2.value[0] === "'" || t2.value[0] === '"') && t2.value[t2.value.length - 1] === t2.value[0] && t2.value.slice(1, -1) === e3.value)
      return { nodes: M3(e3.value) };
    if (e3.kind === "named" && t2.kind === "word" && t2.value[0] === "-" && t2.value[1] === "-") {
      let n3 = t2.value;
      if (n3.endsWith("-*")) {
        n3 = n3.slice(0, -2);
        let s3 = r2.theme.resolve(e3.value, [n3]);
        if (s3)
          return { nodes: M3(s3) };
      } else {
        let s3 = n3.split("-*");
        if (s3.length <= 1)
          continue;
        let l6 = [s3.shift()], p3 = r2.theme.resolveWith(e3.value, l6, s3);
        if (p3) {
          let [, f4 = {}] = p3;
          {
            let c3 = f4[s3.pop()];
            if (c3)
              return { nodes: M3(c3) };
          }
        }
      }
    } else if (e3.kind === "named" && t2.kind === "word") {
      if (!Yt2.includes(t2.value))
        continue;
      let n3 = t2.value === "ratio" && "fraction" in e3 ? e3.fraction : e3.value;
      if (!n3)
        continue;
      let s3 = pe2(n3, [t2.value]);
      if (s3 === null)
        continue;
      if (s3 === "ratio") {
        let [l6, p3] = d2(n3, "/").map(Number);
        if (!u(l6) || !u(p3))
          continue;
      } else {
        if (s3 === "number" && !ue3(n3))
          continue;
        if (s3 === "percentage" && !u(n3.slice(0, -1)))
          continue;
      }
      if (s3 === "ratio") {
        let [l6, p3] = d2(n3, "/");
        return { nodes: M3(`${l6.trim()} / ${p3.trim()}`), ratio: true };
      }
      return { nodes: M3(n3), ratio: false };
    } else if (e3.kind === "arbitrary" && t2.kind === "word" && t2.value[0] === "[" && t2.value[t2.value.length - 1] === "]") {
      let n3 = t2.value.slice(1, -1);
      if (n3 === "*")
        return { nodes: M3(e3.value) };
      if ("dataType" in e3 && e3.dataType && e3.dataType !== n3)
        continue;
      if ("dataType" in e3 && e3.dataType)
        return { nodes: M3(e3.value) };
      if (pe2(e3.value, [n3]) !== null)
        return { nodes: M3(e3.value) };
    }
  }
}
function be3(e3, i, r2, t2, n3 = "") {
  let s3 = false, l6 = tt3(i, (f4) => r2 == null ? t2(f4) : f4.startsWith("current") ? t2(Q3(f4, r2)) : ((f4.startsWith("var(") || r2.startsWith("var(")) && (s3 = true), t2(jr3(f4, r2))));
  function p3(f4) {
    return n3 ? d2(f4, ",").map((c3) => n3.trim() + " " + c3.trim()).join(", ") : f4;
  }
  return s3 ? [o2(e3, p3(tt3(i, t2))), J3("@supports (color: lab(from red l a b))", [o2(e3, p3(l6))])] : [o2(e3, p3(l6))];
}
function gt4(e3, i, r2, t2, n3 = "") {
  let s3 = false, l6 = d2(i, ",").map((p3) => tt3(p3, (f4) => r2 == null ? t2(f4) : f4.startsWith("current") ? t2(Q3(f4, r2)) : ((f4.startsWith("var(") || r2.startsWith("var(")) && (s3 = true), t2(jr3(f4, r2))))).map((p3) => `drop-shadow(${p3})`).join(" ");
  return s3 ? [o2(e3, n3 + d2(i, ",").map((p3) => `drop-shadow(${tt3(p3, t2)})`).join(" ")), J3("@supports (color: lab(from red l a b))", [o2(e3, n3 + l6)])] : [o2(e3, n3 + l6)];
}
function zn3(e3) {
  let i = Br3.exec(e3);
  if (i === null)
    return false;
  let r2 = i[0], t2 = e3.slice(r2.length);
  if (t2.length === 0 && r2.endsWith("-"))
    return false;
  if (t2.length === 0)
    return true;
  let n3 = false;
  for (let s3 = 0;s3 < t2.length; s3++) {
    let l6 = t2.charCodeAt(s3);
    switch (l6) {
      case En3: {
        if (s3 !== t2.length - 1)
          return false;
        let f4 = (t2[s3 - 1] || r2[r2.length - 1] || "").charCodeAt(0);
        if (f4 < ht2 || f4 > vt2)
          return false;
        break;
      }
      case Rn3: {
        if (s3 === t2.length - 1 || n3)
          return false;
        n3 = true;
        break;
      }
      case Pn3: {
        let f4 = (t2[s3 - 1] || r2[r2.length - 1] || "").charCodeAt(0);
        if (f4 < ht2 || f4 > vt2)
          return false;
        let m2 = (t2[s3 + 1] || "").charCodeAt(0);
        if (m2 < ht2 || m2 > vt2)
          return false;
        break;
      }
      case Kn3:
      case Un3:
        continue;
      default: {
        if (l6 >= On3 && l6 <= _n3 || l6 >= In3 && l6 <= Dn3 || l6 >= ht2 && l6 <= vt2)
          continue;
        return false;
      }
    }
  }
  return true;
}
function Ln3(e3) {
  if (!e3.endsWith("-*"))
    return false;
  e3 = e3.slice(0, -2);
  let i = Br3.exec(e3);
  if (i === null)
    return false;
  let r2 = i[0];
  return e3.slice(r2.length).length === 0;
}
function jn3(e3, i, r2, ...t2) {
  let [n3, s3] = d2(r2, "/").map((l6) => l6.trim());
  if (!n3 || !s3)
    throw new Error(`The --alpha(…) function requires a color and an alpha value, e.g.: \`--alpha(${n3 || "var(--my-color)"} / ${s3 || "50%"})\``);
  if (t2.length > 0)
    throw new Error(`The --alpha(…) function only accepts one argument, e.g.: \`--alpha(${n3 || "var(--my-color)"} / ${s3 || "50%"})\``);
  return Q3(n3, s3);
}
function Mn3(e3, i, r2, ...t2) {
  if (!r2)
    throw new Error("The --spacing(…) function requires an argument, but received none.");
  if (t2.length > 0)
    throw new Error(`The --spacing(…) function only accepts a single argument, but received ${t2.length + 1}.`);
  let n3 = e3.theme.resolve(null, ["--spacing"]);
  if (!n3)
    throw new Error("The --spacing(…) function requires that the `--spacing` theme variable exists, but it was not found.");
  let s3 = le2.get(r2);
  if (s3) {
    if (s3[0] === 0)
      return "0";
    if (s3[0] === 1)
      return n3;
  }
  return `calc(${n3} * ${r2})`;
}
function Fn3(e3, i, r2, ...t2) {
  if (!r2.startsWith("--"))
    throw new Error("The --theme(…) function can only be used with CSS variables from your theme.");
  let n3 = false;
  r2.endsWith(" inline") && (n3 = true, r2 = r2.slice(0, -7)), i.kind === "at-rule" && (n3 = true);
  let s3 = e3.resolveThemeValue(r2, n3);
  if (!s3) {
    if (t2.length > 0)
      return t2.join(", ");
    throw new Error(`Could not resolve value for theme function: \`theme(${r2})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`);
  }
  if (t2.length === 0)
    return s3;
  let l6 = t2.join(", ");
  if (l6 === "initial")
    return s3;
  if (s3 === "initial")
    return l6;
  if (s3.startsWith("var(") || s3.startsWith("theme(") || s3.startsWith("--theme(")) {
    let p3 = M3(s3);
    return Yn3(p3, l6), F3(p3);
  }
  return s3;
}
function Wn3(e3, i, r2, ...t2) {
  r2 = Bn3(r2);
  let n3 = e3.resolveThemeValue(r2);
  if (!n3 && t2.length > 0)
    return t2.join(", ");
  if (!n3)
    throw new Error(`Could not resolve value for theme function: \`theme(${r2})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);
  return n3;
}
function ze3(e3, i) {
  let r2 = 0;
  return _5(e3, (t2) => {
    if (t2.kind === "declaration" && t2.value && Yr3.test(t2.value)) {
      r2 |= 8, t2.value = Gr3(t2.value, t2, i);
      return;
    }
    t2.kind === "at-rule" && (t2.name === "@media" || t2.name === "@custom-media" || t2.name === "@container" || t2.name === "@supports") && Yr3.test(t2.params) && (r2 |= 8, t2.params = Gr3(t2.params, t2, i));
  }), r2;
}
function Gr3(e3, i, r2) {
  let t2 = M3(e3);
  return _5(t2, (n3) => {
    if (n3.kind === "function" && n3.value in Gt2) {
      let s3 = d2(F3(n3.nodes).trim(), ",").map((p3) => p3.trim()), l6 = Gt2[n3.value](r2, i, ...s3);
      return V5.Replace(M3(l6));
    }
  }), F3(t2);
}
function Bn3(e3) {
  if (e3[0] !== "'" && e3[0] !== '"')
    return e3;
  let i = "", r2 = e3[0];
  for (let t2 = 1;t2 < e3.length - 1; t2++) {
    let n3 = e3[t2], s3 = e3[t2 + 1];
    n3 === "\\" && (s3 === r2 || s3 === "\\") ? (i += s3, t2++) : i += n3;
  }
  return i;
}
function Yn3(e3, i) {
  _5(e3, (r2) => {
    if (r2.kind === "function" && !(r2.value !== "var" && r2.value !== "theme" && r2.value !== "--theme"))
      if (r2.nodes.length === 1)
        r2.nodes.push({ kind: "word", value: `, ${i}` });
      else {
        let t2 = r2.nodes[r2.nodes.length - 1];
        t2.kind === "word" && t2.value === "initial" && (t2.value = i);
      }
  });
}
function kt3(e3, i) {
  let r2 = e3.length, t2 = i.length, n3 = r2 < t2 ? r2 : t2;
  for (let s3 = 0;s3 < n3; s3++) {
    let l6 = e3.charCodeAt(s3), p3 = i.charCodeAt(s3);
    if (l6 >= 48 && l6 <= 57 && p3 >= 48 && p3 <= 57) {
      let f4 = s3, c3 = s3 + 1, m2 = s3, d3 = s3 + 1;
      for (l6 = e3.charCodeAt(c3);l6 >= 48 && l6 <= 57; )
        l6 = e3.charCodeAt(++c3);
      for (p3 = i.charCodeAt(d3);p3 >= 48 && p3 <= 57; )
        p3 = i.charCodeAt(++d3);
      let u2 = e3.slice(f4, c3), h8 = i.slice(m2, d3), v5 = Number(u2) - Number(h8);
      if (v5)
        return v5;
      if (u2 < h8)
        return -1;
      if (u2 > h8)
        return 1;
      continue;
    }
    if (l6 !== p3)
      return l6 - p3;
  }
  return e3.length - i.length;
}
function qr2(e3) {
  if (e3[0] !== "[" || e3[e3.length - 1] !== "]")
    return null;
  let i = 1, r2 = i, t2 = e3.length - 1;
  for (;je3(e3.charCodeAt(i)); )
    i++;
  {
    for (r2 = i;i < t2; i++) {
      let m2 = e3.charCodeAt(i);
      if (m2 === 92) {
        i++;
        continue;
      }
      if (!(m2 >= 65 && m2 <= 90) && !(m2 >= 97 && m2 <= 122) && !(m2 >= 48 && m2 <= 57) && !(m2 === 45 || m2 === 95))
        break;
    }
    if (r2 === i)
      return null;
  }
  let n3 = e3.slice(r2, i);
  for (;je3(e3.charCodeAt(i)); )
    i++;
  if (i === t2)
    return { attribute: n3, operator: null, quote: null, value: null, sensitivity: null };
  let s3 = null, l6 = e3.charCodeAt(i);
  if (l6 === 61)
    s3 = "=", i++;
  else if ((l6 === 126 || l6 === 124 || l6 === 94 || l6 === 36 || l6 === 42) && e3.charCodeAt(i + 1) === 61)
    s3 = e3[i] + "=", i += 2;
  else
    return null;
  for (;je3(e3.charCodeAt(i)); )
    i++;
  if (i === t2)
    return null;
  let p3 = "", f4 = null;
  if (l6 = e3.charCodeAt(i), l6 === 39 || l6 === 34) {
    f4 = e3[i], i++, r2 = i;
    for (let m2 = i;m2 < t2; m2++) {
      let d3 = e3.charCodeAt(m2);
      d3 === l6 ? i = m2 + 1 : d3 === 92 && m2++;
    }
    p3 = e3.slice(r2, i - 1);
  } else {
    for (r2 = i;i < t2 && !je3(e3.charCodeAt(i)); )
      i++;
    p3 = e3.slice(r2, i);
  }
  for (;je3(e3.charCodeAt(i)); )
    i++;
  if (i === t2)
    return { attribute: n3, operator: s3, quote: f4, value: p3, sensitivity: null };
  let c3 = null;
  switch (e3.charCodeAt(i)) {
    case 105:
    case 73: {
      c3 = "i", i++;
      break;
    }
    case 115:
    case 83: {
      c3 = "s", i++;
      break;
    }
    default:
      return null;
  }
  for (;je3(e3.charCodeAt(i)); )
    i++;
  return i !== t2 ? null : { attribute: n3, operator: s3, quote: f4, value: p3, sensitivity: c3 };
}
function je3(e3) {
  switch (e3) {
    case 32:
    case 9:
    case 10:
    case 13:
      return true;
    default:
      return false;
  }
}
function Hr3(e3) {
  let i = false;
  return _5(e3, { exit(r2) {
    if (r2.kind !== "function" || r2.value !== "calc" && r2.value !== "" || r2.nodes.length !== 5 || r2.nodes[2].kind !== "word" || r2.nodes[2].value !== "*" && r2.nodes[2].value !== "+")
      return;
    let t2 = r2.nodes[0], n3 = r2.nodes[4];
    if (qn2(t2, n3)) {
      i = true;
      let s3 = { kind: "function", value: r2.value, nodes: [n3, r2.nodes[1], r2.nodes[2], r2.nodes[3], t2] };
      return V5.ReplaceSkip(s3);
    }
  } }), [i, e3];
}
function qn2(e3, i) {
  let r2 = e3.kind === "word" ? le2.get(e3.value) : null, t2 = i.kind === "word" ? le2.get(i.value) : null;
  if (r2 !== null && t2 === null)
    return true;
  if (r2 === null && t2 !== null)
    return false;
  if (r2 !== null && t2 !== null) {
    let [n3, s3] = r2, [l6, p3] = t2;
    if (s3 === null && p3 !== null)
      return true;
    if (s3 !== null && p3 === null)
      return false;
    if (n3 !== l6)
      return n3 - l6 > 0;
    if (s3 !== p3)
      return (s3 ?? "").localeCompare(p3 ?? "") > 0;
  }
  return F3([e3]).localeCompare(F3([i])) > 0;
}
function Me3(e3, i = null) {
  return Array.isArray(e3) && e3.length === 2 && typeof e3[1] == "object" && typeof e3[1] !== null ? i ? e3[1][i] ?? null : e3[0] : Array.isArray(e3) && i === null ? e3.join(", ") : typeof e3 == "string" && i === null ? e3 : null;
}
function Zr3(e3, { theme: i }, r2) {
  for (let t2 of r2) {
    let n3 = Fe3([t2]);
    n3 && e3.theme.clearNamespace(`--${n3}`, 4);
  }
  for (let [t2, n3] of Hn3(i)) {
    if (typeof n3 != "string" && typeof n3 != "number")
      continue;
    if (typeof n3 == "string" && (n3 = n3.replace(/<alpha-value>/g, "1")), t2[0] === "opacity" && (typeof n3 == "number" || typeof n3 == "string")) {
      let l6 = typeof n3 == "string" ? parseFloat(n3) : n3;
      l6 >= 0 && l6 <= 1 && (n3 = l6 * 100 + "%");
    }
    let s3 = Fe3(t2);
    s3 && e3.theme.add(`--${s3}`, "" + n3, 7);
  }
  if (Object.hasOwn(i, "fontFamily")) {
    let t2 = 5;
    {
      let n3 = Me3(i.fontFamily.sans);
      n3 && e3.theme.hasDefault("--font-sans") && (e3.theme.add("--default-font-family", n3, t2), e3.theme.add("--default-font-feature-settings", Me3(i.fontFamily.sans, "fontFeatureSettings") ?? "normal", t2), e3.theme.add("--default-font-variation-settings", Me3(i.fontFamily.sans, "fontVariationSettings") ?? "normal", t2));
    }
    {
      let n3 = Me3(i.fontFamily.mono);
      n3 && e3.theme.hasDefault("--font-mono") && (e3.theme.add("--default-mono-font-family", n3, t2), e3.theme.add("--default-mono-font-feature-settings", Me3(i.fontFamily.mono, "fontFeatureSettings") ?? "normal", t2), e3.theme.add("--default-mono-font-variation-settings", Me3(i.fontFamily.mono, "fontVariationSettings") ?? "normal", t2));
    }
  }
  return i;
}
function Hn3(e3) {
  let i = [];
  return Jr3(e3, [], (r2, t2) => {
    if (Xn2(r2))
      return i.push([t2, r2]), 1;
    if (el2(r2)) {
      i.push([t2, r2[0]]);
      for (let n3 of Reflect.ownKeys(r2[1]))
        i.push([[...t2, `-${n3}`], r2[1][n3]]);
      return 1;
    }
    if (Array.isArray(r2) && r2.every((n3) => typeof n3 == "string"))
      return t2[0] === "fontSize" ? (i.push([t2, r2[0]]), r2.length >= 2 && i.push([[...t2, "-line-height"], r2[1]])) : i.push([t2, r2.join(", ")]), 1;
  }), i;
}
function Fe3(e3) {
  let i = Zn3[e3[0]];
  if (i && e3[1] === "DEFAULT")
    return `default-${i}`;
  if (e3[0] === "container")
    return null;
  for (let t2 of e3)
    if (!Qn2.test(t2))
      return null;
  let r2 = Jn3[e3[0]];
  return r2 && (e3 = e3.slice(), e3[0] = r2), e3.map((t2, n3, s3) => t2 === "1" && n3 !== s3.length - 1 ? "" : t2).map((t2, n3) => (t2 = t2.replaceAll(".", "_"), (n3 === 0 || t2.startsWith("-") || t2 === "lineHeight") && (t2 = t2.replace(/([a-z])([A-Z])/g, (l6, p3, f4) => `${p3}-${f4.toLowerCase()}`)), t2)).filter((t2, n3) => t2 !== "DEFAULT" || n3 !== e3.length - 1).join("-");
}
function Xn2(e3) {
  return typeof e3 == "number" || typeof e3 == "string";
}
function el2(e3) {
  if (!Array.isArray(e3) || e3.length !== 2 || typeof e3[0] != "string" && typeof e3[0] != "number" || e3[1] === undefined || e3[1] === null || typeof e3[1] != "object")
    return false;
  for (let i of Reflect.ownKeys(e3[1]))
    if (typeof i != "string" || typeof e3[1][i] != "string" && typeof e3[1][i] != "number")
      return false;
  return true;
}
function Jr3(e3, i = [], r2) {
  for (let t2 of Reflect.ownKeys(e3)) {
    let n3 = e3[t2];
    if (n3 == null)
      continue;
    let s3 = [...i, t2], l6 = r2(n3, s3) ?? 0;
    if (l6 !== 1) {
      if (l6 === 2)
        return 2;
      if (!(!Array.isArray(n3) && typeof n3 != "object") && Jr3(n3, s3, r2) === 2)
        return 2;
    }
  }
}
function bt2(e3, i = null, r2 = true) {
  let [t2, n3] = rt3(M3(e3), i, r2);
  return t2 ? F3(n3) : e3;
}
function rt3(e3, i = null, r2 = true) {
  let t2 = false;
  return _5(e3, { exit(n3, s3) {
    if (n3.kind === "word" && n3.value !== "0") {
      let l6 = Qr3(n3.value, i, r2);
      if (l6 === null || l6 === n3.value)
        return;
      if (l6 === "0" && s3.parent?.kind === "function") {
        let p3 = Qr3(n3.value, i, false);
        return p3 === null ? undefined : (t2 = true, V5.ReplaceSkip(ne4(p3)));
      }
      return t2 = true, V5.ReplaceSkip(ne4(l6));
    } else if (n3.kind === "function" && (n3.value === "calc" || n3.value === "")) {
      if (n3.nodes.length !== 5 || n3.nodes[2].kind !== "word")
        return;
      let l6 = n3.nodes[0], p3 = n3.nodes[2].value, f4 = n3.nodes[4], c3 = l6.kind === "word" ? le2.get(l6.value) : null, m2 = f4.kind === "word" ? le2.get(f4.value) : null;
      if (p3 === "*" && (c3?.[0] === 0 && c3?.[1] === null || m2?.[0] === 0 && m2?.[1] === null))
        return t2 = true, V5.ReplaceSkip(ne4("0"));
      if (p3 === "*" && c3?.[0] === 0 && c3?.[1] !== null && m2?.[1] === null)
        return t2 = true, s3.parent?.kind === "function" ? V5.ReplaceSkip(ne4(`0${c3[1]}`)) : V5.ReplaceSkip(ne4("0"));
      if (p3 === "*" && m2?.[0] === 0 && m2?.[1] !== null && c3?.[1] === null)
        return t2 = true, s3.parent?.kind === "function" ? V5.ReplaceSkip(ne4(`0${m2[1]}`)) : V5.ReplaceSkip(ne4("0"));
      if (p3 === "*") {
        if (c3?.[0] === 1 && c3?.[1] === null)
          return t2 = true, V5.ReplaceSkip(f4);
        if (m2?.[0] === 1 && m2?.[1] === null)
          return t2 = true, V5.ReplaceSkip(l6);
      }
      if (p3 === "*" || p3 === "+") {
        let d3 = c3 ?? m2, u2 = c3 === null ? l6 : m2 === null ? f4 : null;
        if (d3 !== null && u2 !== null && u2.kind === "function" && (u2.value === "calc" || u2.value === "") && u2.nodes.length === 5 && u2.nodes[2].kind === "word" && u2.nodes[2].value === p3) {
          let h8 = u2.nodes[0], v5 = u2.nodes[4], k4 = h8.kind === "word" ? le2.get(h8.value) : null, y4 = v5.kind === "word" ? le2.get(v5.value) : null, N5 = k4 ?? y4, A3 = k4 === null ? h8 : y4 === null ? v5 : null;
          if (N5 !== null && A3 !== null) {
            if (p3 === "*" && !(d3[1] === null && N5[1] === null || d3[1] === null && N5[1] !== null || d3[1] !== null && N5[1] === null) || p3 === "+" && d3[1] !== N5[1])
              return;
            let b5;
            switch (p3) {
              case "*": {
                b5 = `${d3[0] * N5[0]}${d3[1] ?? N5[1] ?? ""}`;
                break;
              }
              case "+": {
                b5 = `${d3[0] + N5[0]}${d3[1] ?? N5[1] ?? ""}`;
                break;
              }
              default:
                return;
            }
            if (t2 = true, p3 === "*" && b5 === "1")
              return V5.ReplaceSkip(A3);
            let D4 = { kind: "function", value: n3.value, nodes: [ne4(b5), n3.nodes[1], n3.nodes[2], n3.nodes[3], A3] };
            return V5.ReplaceSkip(D4);
          }
        }
      }
      if (c3 === null || m2 === null)
        return;
      switch (p3) {
        case "*": {
          if (c3[1] === m2[1] || c3[1] === null && m2[1] !== null || c3[1] !== null && m2[1] === null)
            return t2 = true, V5.ReplaceSkip(ne4(`${c3[0] * m2[0]}${c3[1] ?? m2[1] ?? ""}`));
          break;
        }
        case "+": {
          if (c3[1] === m2[1])
            return t2 = true, V5.ReplaceSkip(ne4(`${c3[0] + m2[0]}${c3[1] ?? ""}`));
          break;
        }
        case "-": {
          if (c3[1] === m2[1])
            return t2 = true, V5.ReplaceSkip(ne4(`${c3[0] - m2[0]}${c3[1] ?? ""}`));
          break;
        }
        case "/": {
          if (m2[0] !== 0 && (c3[1] === null && m2[1] === null || c3[1] !== null && m2[1] === null)) {
            let d3 = c3[0] / m2[0];
            if (Math.round(d3 * 100) / 100 !== d3)
              break;
            return t2 = true, V5.ReplaceSkip(ne4(`${d3}${c3[1] ?? ""}`));
          }
          break;
        }
      }
    }
  } }), [t2, e3];
}
function Qr3(e3, i = null, r2 = true) {
  let t2 = le2.get(e3);
  if (t2 === null)
    return null;
  let [n3, s3] = t2;
  if (s3 === null)
    return `${n3}`;
  if (n3 === 0 && y3(e3))
    return r2 ? "0" : `0${s3}`;
  if (!r2)
    return `${e3}`;
  switch (s3.toLowerCase()) {
    case "in":
      return `${n3 * 96}px`;
    case "cm":
      return `${n3 * 96 / 2.54}px`;
    case "mm":
      return `${n3 * 96 / 2.54 / 10}px`;
    case "q":
      return `${n3 * 96 / 2.54 / 10 / 4}px`;
    case "pc":
      return `${n3 * 96 / 6}px`;
    case "pt":
      return `${n3 * 96 / 72}px`;
    case "rem":
      return i !== null ? `${n3 * i}px` : null;
    case "grad":
      return `${n3 * 0.9}deg`;
    case "rad":
      return `${n3 * 180 / Math.PI}deg`;
    case "turn":
      return `${n3 * 360}deg`;
    case "ms":
      return `${n3 / 1000}s`;
    case "khz":
      return `${n3 * 1000}hz`;
    default:
      return `${n3}${s3}`;
  }
}
function Ne3(e3, i = "top", r2 = "right", t2 = "bottom", n3 = "left") {
  return ri3(`${e3}-${i}`, `${e3}-${r2}`, `${e3}-${t2}`, `${e3}-${n3}`);
}
function ri3(e3 = "top", i = "right", r2 = "bottom", t2 = "left") {
  return { 1: [[e3, 0], [i, 0], [r2, 0], [t2, 0]], 2: [[e3, 0], [i, 1], [r2, 0], [t2, 1]], 3: [[e3, 0], [i, 1], [r2, 2], [t2, 1]], 4: [[e3, 0], [i, 1], [r2, 2], [t2, 3]] };
}
function se2(e3, i) {
  return { 1: [[e3, 0], [i, 0]], 2: [[e3, 0], [i, 1]] };
}
function ii3(e3, i) {
  if (i & 2) {
    if (e3.property in ei3) {
      let r2 = d2(e3.value, " ");
      return ei3[e3.property][r2.length]?.map(([t2, n3]) => o2(t2, r2[n3], e3.important));
    }
    if (e3.property in ti3)
      return ti3[e3.property]?.map((r2) => o2(r2, e3.value, e3.important));
  }
  if (e3.property in Xr3) {
    let r2 = d2(e3.value, " ");
    return Xr3[e3.property][r2.length]?.map(([t2, n3]) => o2(t2, r2[n3], e3.important));
  }
  return null;
}
function tl2(e3) {
  return { kind: "combinator", value: e3 };
}
function qt3(e3) {
  return { kind: "complex", nodes: e3 };
}
function ni3(e3) {
  return { kind: "compound", nodes: e3 };
}
function rl2(e3, i) {
  return { kind: "function", value: e3, nodes: i };
}
function il2(e3) {
  return { kind: "list", nodes: e3 };
}
function Ae3(e3) {
  return { kind: "selector", value: e3 };
}
function nl3(e3) {
  return { kind: "value", value: e3 };
}
function ue4(e3, i = false) {
  let r2 = "";
  for (let t2 of e3)
    switch (t2.kind) {
      case "selector":
      case "value": {
        r2 += t2.value;
        break;
      }
      case "combinator": {
        i || t2.value === " " ? r2 += t2.value : r2 += ` ${t2.value} `;
        break;
      }
      case "function": {
        r2 += `${t2.value}(${ue4(t2.nodes, i)})`;
        break;
      }
      case "complex":
      case "compound": {
        r2 += ue4(t2.nodes, i);
        break;
      }
      case "list": {
        r2 += t2.nodes.map((n3) => ue4([n3], i)).join(i ? "," : ", ");
        break;
      }
    }
  return r2;
}
function Ee4(e3) {
  e3 = e3.replaceAll(`\r
`, `
`);
  let i = [], r2 = i, t2 = false, n3 = [], s3 = null, l6 = "", p3;
  function f4(m2 = r2) {
    return m2.length === 1 ? m2[0] : t2 ? qt3(m2) : ni3(m2);
  }
  function c3(m2) {
    let d3 = r2[r2.length - 1];
    d3?.kind === "compound" ? d3.nodes.push(m2) : d3 && d3.kind !== "list" && d3.kind !== "combinator" ? r2[r2.length - 1] = ni3([d3, m2]) : r2.push(m2);
  }
  for (let m2 = 0;m2 < e3.length; m2++) {
    let d3 = e3.charCodeAt(m2);
    switch (d3) {
      case si3: {
        for (l6.length > 0 && (c3(Ae3(l6)), l6 = "");m2 + 1 < e3.length && (p3 = e3.charCodeAt(m2 + 1), !(p3 !== Ht3 && p3 !== Zt3 && p3 !== Jt3)); m2++)
          ;
        if (s3)
          s3.nodes.push(f4()), r2 = [], t2 = false;
        else {
          let u2 = r2.splice(0), h8 = f4(u2), v5 = il2([h8]);
          r2.push(v5), s3 = v5, r2 = [], t2 = false;
        }
        break;
      }
      case ui3:
      case Ht3:
      case Zt3:
      case pi2:
      case Jt3:
      case di2: {
        l6.length > 0 && (c3(Ae3(l6)), l6 = "");
        let u2 = m2, h8 = m2 + 1;
        for (;h8 < e3.length && (p3 = e3.charCodeAt(h8), !(p3 !== ui3 && p3 !== Ht3 && p3 !== Zt3 && p3 !== pi2 && p3 !== Jt3 && p3 !== di2)); h8++)
          ;
        m2 = h8 - 1;
        let v5 = e3.slice(u2, h8).trim();
        if (v5 === "" && (r2.length === 0 || h8 >= e3.length || e3.charCodeAt(h8) === si3))
          break;
        r2.push(tl2(v5 === "" ? " " : v5)), t2 = true;
        break;
      }
      case ci3: {
        let u2 = rl2(l6, []);
        if (l6 = "", u2.value !== ":not" && u2.value !== ":where" && u2.value !== ":has" && u2.value !== ":is") {
          let h8 = m2 + 1, v5 = 0;
          for (let y4 = m2 + 1;y4 < e3.length; y4++) {
            if (p3 = e3.charCodeAt(y4), p3 === ci3) {
              v5++;
              continue;
            }
            if (p3 === oi3) {
              if (v5 === 0) {
                m2 = y4;
                break;
              }
              v5--;
            }
          }
          let k4 = m2;
          u2.nodes.push(nl3(e3.slice(h8, k4))), l6 = "", m2 = k4, c3(u2);
          break;
        }
        c3(u2), n3.push({ target: r2, currentList: s3, containsCombinator: t2 }), r2 = u2.nodes, t2 = false, s3 = null;
        break;
      }
      case oi3: {
        l6.length > 0 && (c3(Ae3(l6)), l6 = ""), s3 ? s3.nodes.push(f4()) : t2 && r2.splice(0, r2.length, qt3(r2.splice(0)));
        let u2 = n3.pop();
        r2 = u2?.target ?? i, s3 = u2?.currentList ?? null, t2 = u2?.containsCombinator ?? false;
        break;
      }
      case al2:
      case ai3:
      case sl2: {
        if (d3 === ai3 && l6 === ":") {
          l6 += e3[m2];
          break;
        }
        l6.length > 0 && c3(Ae3(l6)), l6 = e3[m2];
        break;
      }
      case fi3: {
        l6.length > 0 && c3(Ae3(l6)), l6 = "";
        let u2 = m2, h8 = 0;
        for (let v5 = m2 + 1;v5 < e3.length; v5++) {
          if (p3 = e3.charCodeAt(v5), p3 === fi3) {
            h8++;
            continue;
          }
          if (p3 === ll2) {
            if (h8 === 0) {
              m2 = v5;
              break;
            }
            h8--;
          }
        }
        l6 += e3.slice(u2, m2 + 1);
        break;
      }
      case ul2:
      case ol2: {
        let u2 = m2;
        for (let h8 = m2 + 1;h8 < e3.length; h8++)
          if (p3 = e3.charCodeAt(h8), p3 === li3)
            h8 += 1;
          else if (p3 === d3) {
            m2 = h8;
            break;
          }
        l6 += e3.slice(u2, m2 + 1);
        break;
      }
      case fl2:
      case cl2: {
        l6.length > 0 && (c3(Ae3(l6)), l6 = ""), c3(Ae3(e3[m2]));
        break;
      }
      case li3: {
        l6 += e3[m2] + e3[m2 + 1], m2 += 1;
        break;
      }
      default:
        l6 += e3[m2];
    }
  }
  return l6.length > 0 && c3(Ae3(l6)), s3 ? s3.nodes.push(f4()) : t2 && r2.splice(0, r2.length, qt3(r2.splice(0))), i;
}
function ce3(e3, i) {
  for (let r2 in e3)
    delete e3[r2];
  return Object.assign(e3, i);
}
function Re3(e3) {
  let i = [];
  for (let r2 of d2(e3, ".")) {
    if (!r2.includes("[")) {
      i.push(r2);
      continue;
    }
    let t2 = 0;
    for (;; ) {
      let n3 = r2.indexOf("[", t2), s3 = r2.indexOf("]", n3);
      if (n3 === -1 || s3 === -1)
        break;
      n3 > t2 && i.push(r2.slice(t2, n3)), i.push(r2.slice(n3 + 1, s3)), t2 = s3 + 1;
    }
    t2 <= r2.length - 1 && i.push(r2.slice(t2));
  }
  return i;
}
function Qt3(e3, i) {
  let r2 = e3;
  return r2.storage[ki2] ??= pl2(), r2.storage[bi2] ??= gl2(r2), r2.storage[yi2] ??= wl2(), r2.storage[xi2] ??= bl2(), r2.storage[Ai2] ??= xl2(), r2.storage[er3] ??= Tl2(r2), r2.storage[At2] ??= Rl(r2, i), r2.storage[ve3] ??= Yl(r2), r2.storage[tr3] ??= ql(), r2.storage[Ct3] ??= Hl(r2), r2.storage[rr3] ??= Zl(r2), r2.storage[St2] ??= Jl(r2), r2.storage[Ti2] ??= Ql(r2), r2.storage[it3] ??= dl2(r2), r2;
}
function pl2() {
  return new U4((e3) => new U4((i) => ({ rem: e3, features: i })));
}
function dl2(e3) {
  return new U4((i) => {
    let r2 = e3.storage[ve3].get(i);
    return function(n3, s3) {
      let l6 = typeof n3 == "string" ? n3 : e3.printCandidate(n3), p3 = r2.get(l6);
      if (typeof p3 != "string")
        return false;
      let f4 = typeof s3 == "string" ? s3 : e3.printCandidate(s3), c3 = r2.get(f4);
      return typeof c3 != "string" ? false : p3 === c3;
    };
  });
}
function ml2(e3, i) {
  let r2 = 0;
  return i?.collapse && (r2 |= 1), i?.logicalToPhysical && (r2 |= 2), Qt3(e3, i).storage[ki2].get(i?.rem ?? null).get(r2);
}
function gl2(e3) {
  return new U4((i) => new U4((r2) => ({ features: r2, designSystem: e3, signatureOptions: i })));
}
function hl2(e3, i, r2) {
  let t2 = 0;
  return r2?.collapse && (t2 |= 1), Qt3(e3).storage[bi2].get(i).get(t2);
}
function Xt2(e3, i, r2) {
  let t2 = ml2(e3, r2), n3 = hl2(e3, t2, r2), s3 = Qt3(e3), l6 = new Set, p3 = s3.storage[yi2].get(n3);
  for (let f4 of i)
    l6.add(p3.get(f4));
  return l6.size <= 1 || !(n3.features & 1) ? Array.from(l6) : vl2(n3, Array.from(l6));
}
function vl2(e3, i) {
  let r2 = e3.designSystem, t2 = new U4((p3) => new U4((f4) => new Set)), n3 = e3.designSystem.theme.prefix ? `${e3.designSystem.theme.prefix}:` : "";
  for (let p3 of i) {
    let f4 = d2(p3, ":"), c3 = f4.pop(), m2 = c3.endsWith("!");
    m2 && (c3 = c3.slice(0, -1));
    let d3 = f4.length > 0 ? `${f4.join(":")}:` : "", u2 = m2 ? "!" : "";
    t2.get(d3).get(u2).add(`${n3}${c3}`);
  }
  let s3 = new Set;
  for (let [p3, f4] of t2.entries())
    for (let [c3, m2] of f4.entries())
      for (let d3 of l6(Array.from(m2)))
        n3 && d3.startsWith(n3) && (d3 = d3.slice(n3.length)), s3.add(`${p3}${d3}${c3}`);
  return Array.from(s3);
  function l6(p3) {
    let f4 = e3.signatureOptions, c3 = r2.storage[Ct3].get(f4), m2 = r2.storage[tr3].get(f4), d3 = p3.map((A3) => c3.get(A3));
    if (d3.some((A3) => A3.has("line-height"))) {
      let A3 = r2.theme.keysInNamespaces(["--text"]);
      if (A3.length > 0) {
        let b5 = new Set, D4 = new Set;
        for (let P4 of d3)
          if (P4.has("line-height"))
            for (let z4 of P4.get("line-height")) {
              if (D4.has(z4))
                continue;
              D4.add(z4);
              let E2 = r2.storage[At2]?.get(z4) ?? null;
              if (E2 !== null)
                if (ue3(E2)) {
                  b5.add(E2);
                  for (let j4 of A3)
                    c3.get(`text-${j4}/${E2}`);
                } else {
                  b5.add(z4);
                  for (let j4 of A3)
                    c3.get(`text-${j4}/[${z4}]`);
                }
            }
        let O5 = new Set;
        for (let P4 of d3)
          if (P4.has("font-size")) {
            for (let z4 of P4.get("font-size"))
              if (!O5.has(z4)) {
                O5.add(z4);
                for (let E2 of b5)
                  ue3(E2) ? c3.get(`text-[${z4}]/${E2}`) : c3.get(`text-[${z4}]/[${E2}]`);
              }
          }
      }
    }
    let u2 = new U4((A3) => {
      let b5 = new U4((O5) => new U4((P4) => new Set)), D4 = new Set(c3.get(A3).keys());
      if (D4.size === 0)
        return b5;
      for (let O5 of pe3(r2, A3))
        if (!(O5.kind !== "functional" || O5.value === null)) {
          for (let P4 of r2.utilities.keys("functional")) {
            if (P4 === O5.root)
              continue;
            let z4 = Ci2(r2, { ...Ue2(O5), root: P4 }), E2 = c3.get(z4);
            for (let [j4, q4] of E2)
              if (D4.has(j4))
                for (let G4 of q4)
                  b5.get(j4).get(G4).add(z4);
          }
          return b5;
        }
      return b5;
    }), h8 = d3.map((A3, b5) => {
      let D4 = null;
      for (let O5 of A3.keys()) {
        let P4 = new Set;
        for (let z4 of m2.get(O5).values())
          for (let E2 of z4)
            P4.add(E2);
        for (let z4 of A3.get(O5))
          for (let E2 of u2.get(p3[b5]).get(O5).get(z4))
            P4.add(E2);
        if (D4 === null ? D4 = P4 : D4 = wi2(D4, P4), D4.size === 0)
          return D4;
      }
      return D4 ?? new Set;
    }), v5 = new U4((A3) => new Set([A3]));
    for (let A3 = 0;A3 < h8.length; A3++) {
      let b5 = h8[A3];
      for (let D4 = A3 + 1;D4 < h8.length; D4++) {
        let O5 = h8[D4];
        for (let P4 of b5)
          if (O5.has(P4)) {
            v5.get(A3).add(D4), v5.get(D4).add(A3);
            break;
          }
      }
    }
    if (v5.size === 0)
      return p3;
    let k4 = new U4((A3) => A3.split(",").map(Number));
    for (let A3 of v5.values()) {
      let b5 = Array.from(A3).sort((D4, O5) => D4 - O5);
      k4.get(b5.join(","));
    }
    let y4 = new Set(p3), N5 = new Set;
    for (let A3 of k4.values())
      for (let b5 of eo3(A3)) {
        if (b5.some((P4) => N5.has(p3[P4])))
          continue;
        let D4 = b5.flatMap((P4) => h8[P4]).reduce(wi2), O5 = r2.storage[ve3].get(f4).get(b5.map((P4) => p3[P4]).sort((P4, z4) => P4.localeCompare(z4)).join(" "));
        for (let P4 of D4)
          if (r2.storage[ve3].get(f4).get(P4) === O5) {
            y4.add(P4);
            for (let E2 of b5)
              p3[E2] !== P4 && N5.add(p3[E2]);
            break;
          }
      }
    for (let A3 of N5)
      y4.delete(A3);
    return Array.from(y4);
  }
}
function wl2() {
  return new U4((e3) => {
    let i = e3.designSystem, r2 = i.theme.prefix ? `${i.theme.prefix}:` : "", t2 = i.storage[xi2].get(e3), n3 = i.storage[Ai2].get(e3);
    return new U4((s3, l6) => {
      for (let p3 of i.parseCandidate(s3)) {
        let f4 = p3.variants.slice().reverse().flatMap((d3) => t2.get(d3)), c3 = p3.important;
        if (c3 || f4.length > 0) {
          let u2 = l6.get(i.printCandidate({ ...p3, variants: [], important: false }));
          return i.theme.prefix !== null && f4.length > 0 && (u2 = u2.slice(r2.length)), f4.length > 0 && (u2 = `${f4.map((h8) => i.printVariant(h8)).join(":")}:${u2}`), c3 && (u2 += "!"), i.theme.prefix !== null && f4.length > 0 && (u2 = `${r2}${u2}`), u2;
        }
        let m2 = n3.get(s3);
        if (m2 !== s3)
          return m2;
      }
      return s3;
    });
  });
}
function bl2() {
  return new U4((e3) => new U4((i) => {
    let r2 = [i];
    for (let t2 of kl2)
      for (let n3 of r2.splice(0)) {
        let s3 = t2(Ke2(n3), e3);
        if (Array.isArray(s3)) {
          r2.push(...s3);
          continue;
        } else
          r2.push(s3);
      }
    return r2;
  }));
}
function xl2() {
  return new U4((e3) => {
    let i = e3.designSystem;
    return new U4((r2) => {
      for (let t2 of i.parseCandidate(r2)) {
        let n3 = Ue2(t2);
        for (let l6 of yl2)
          n3 = l6(n3, e3);
        let s3 = i.printCandidate(n3);
        if (r2 !== s3)
          return s3;
      }
      return r2;
    });
  });
}
function Cl2(e3) {
  if (e3.kind === "static" && e3.root.startsWith("bg-gradient-to-")) {
    let i = e3.root.slice(15);
    return Al2.includes(i) && (e3.root = `bg-linear-to-${i}`), e3;
  }
  return e3;
}
function Vl(e3, i) {
  let r2 = i.designSystem.storage[er3];
  if (e3.kind === "arbitrary") {
    let [t2, n3] = r2(e3.value, e3.modifier === null ? 1 : 0);
    t2 !== e3.value && (e3.value = t2, n3 !== null && (e3.modifier = n3));
  } else if (e3.kind === "functional" && e3.value?.kind === "arbitrary") {
    let [t2, n3] = r2(e3.value.value, e3.modifier === null ? 1 : 0);
    t2 !== e3.value.value && (e3.value.value = t2, n3 !== null && (e3.modifier = n3));
  }
  return e3;
}
function Sl2(e3, i) {
  let r2 = i.designSystem.storage[er3], t2 = Vt3(e3);
  for (let [n3] of t2)
    if (n3.kind === "arbitrary") {
      let [s3] = r2(n3.selector, 2);
      s3 !== n3.selector && (n3.selector = s3);
    } else if (n3.kind === "functional" && n3.value?.kind === "arbitrary") {
      let [s3] = r2(n3.value.value, 2);
      s3 !== n3.value.value && (n3.value.value = s3);
    }
  return e3;
}
function $l(e3, i) {
  return e3.kind === "arbitrary" ? e3.value = gi2(e3.value, i.designSystem) : e3.kind === "functional" && e3.value?.kind === "arbitrary" && (e3.value.value = gi2(e3.value.value, i.designSystem)), e3;
}
function gi2(e3, i) {
  let r2 = i.theme.prefix ? `--${i.theme.prefix}-spacing` : "--spacing", t2 = M3(e3);
  return _5(t2, (n3) => {
    if (!(n3.kind !== "function" || n3.value !== "calc") && n3.nodes.length === 5 && !(n3.nodes[2].kind !== "word" || n3.nodes[2].value !== "*") && !(n3.nodes[0].kind !== "function" || n3.nodes[0].value !== "var" || n3.nodes[0].nodes.length !== 1 || n3.nodes[0].nodes[0].kind !== "word" || n3.nodes[0].nodes[0].value !== r2))
      return V5.Replace(M3(`--spacing(${F3([n3.nodes[4]])})`));
  }), F3(t2);
}
function Tl2(e3) {
  return i(e3);
  function i(r2) {
    function t2(p3, f4 = 0) {
      let c3 = M3(p3);
      if (f4 & 2)
        return [yt2(c3, l6), null];
      let m2 = 0, d3 = 0;
      if (_5(c3, (v5) => {
        v5.kind === "function" && v5.value === "theme" && (m2 += 1, _5(v5.nodes, (k4) => k4.kind === "separator" && k4.value.includes(",") ? V5.Stop : k4.kind === "word" && k4.value === "/" ? (d3 += 1, V5.Stop) : V5.Skip));
      }), m2 === 0)
        return [p3, null];
      if (d3 === 0)
        return [yt2(c3, s3), null];
      if (d3 > 1)
        return [yt2(c3, l6), null];
      let u2 = null;
      return [yt2(c3, (v5, k4) => {
        let y4 = d2(v5, "/").map((N5) => N5.trim());
        if (y4.length > 2)
          return null;
        if (c3.length === 1 && y4.length === 2 && f4 & 1) {
          let [N5, A3] = y4;
          if (/^\d+%$/.test(A3))
            u2 = { kind: "named", value: A3.slice(0, -1) };
          else if (/^0?\.\d+$/.test(A3)) {
            let b5 = Number(A3) * 100;
            u2 = { kind: Number.isInteger(b5) ? "named" : "arbitrary", value: b5.toString() };
          } else
            u2 = { kind: "arbitrary", value: A3 };
          v5 = N5;
        }
        return s3(v5, k4) || l6(v5, k4);
      }), u2];
    }
    function n3(p3, f4 = true) {
      let c3 = `--${Fe3(Re3(p3))}`;
      return r2.theme.get([c3]) ? f4 && r2.theme.prefix ? `--${r2.theme.prefix}-${c3.slice(2)}` : c3 : null;
    }
    function s3(p3, f4) {
      let c3 = n3(p3);
      if (c3)
        return f4 ? `var(${c3}, ${f4})` : `var(${c3})`;
      let m2 = Re3(p3);
      if (m2[0] === "spacing" && r2.theme.get(["--spacing"])) {
        let d3 = m2[1];
        return ue3(d3) ? `--spacing(${d3})` : null;
      }
      return null;
    }
    function l6(p3, f4) {
      let c3 = d2(p3, "/").map((u2) => u2.trim());
      p3 = c3.shift();
      let m2 = n3(p3, false);
      if (!m2)
        return null;
      let d3 = c3.length > 0 ? `/${c3.join("/")}` : "";
      return f4 ? `--theme(${m2}${d3}, ${f4})` : `--theme(${m2}${d3})`;
    }
    return t2;
  }
}
function yt2(e3, i) {
  return _5(e3, (r2, t2) => {
    if (r2.kind === "function" && r2.value === "theme") {
      if (r2.nodes.length < 1)
        return;
      r2.nodes[0].kind === "separator" && r2.nodes[0].value.trim() === "" && r2.nodes.shift();
      let n3 = r2.nodes[0];
      if (n3.kind !== "word")
        return;
      let s3 = n3.value, l6 = 1;
      for (let c3 = l6;c3 < r2.nodes.length && !r2.nodes[c3].value.includes(","); c3++)
        s3 += F3([r2.nodes[c3]]), l6 = c3 + 1;
      s3 = Nl2(s3);
      let p3 = r2.nodes.slice(l6 + 1), f4 = p3.length > 0 ? i(s3, F3(p3)) : i(s3);
      if (f4 === null)
        return;
      {
        let c3 = t2.index - 1;
        for (;c3 !== -1; ) {
          let m2 = t2.siblings[c3];
          if (m2.kind === "separator" && m2.value.trim() === "") {
            c3 -= 1;
            continue;
          }
          /^[-+*/]$/.test(m2.value.trim()) && (f4 = `(${f4})`);
          break;
        }
      }
      return V5.Replace(M3(f4));
    }
  }), F3(e3);
}
function Nl2(e3) {
  if (e3[0] !== "'" && e3[0] !== '"')
    return e3;
  let i = "", r2 = e3[0];
  for (let t2 = 1;t2 < e3.length - 1; t2++) {
    let n3 = e3[t2], s3 = e3[t2 + 1];
    n3 === "\\" && (s3 === r2 || s3 === "\\") ? (i += s3, t2++) : i += n3;
  }
  return i;
}
function* Vt3(e3) {
  function* i(r2, t2 = null) {
    yield [r2, t2], r2.kind === "compound" && (yield* i(r2.variant, r2));
  }
  yield* i(e3, null);
}
function pe3(e3, i) {
  return e3.parseCandidate(e3.theme.prefix && !i.startsWith(`${e3.theme.prefix}:`) ? `${e3.theme.prefix}:${i}` : i);
}
function Ci2(e3, i) {
  let r2 = e3.printCandidate(i);
  return e3.theme.prefix && r2.startsWith(`${e3.theme.prefix}:`) ? r2.slice(e3.theme.prefix.length + 1) : r2;
}
function hi2(e3, i, r2) {
  let t2 = i.resolveThemeValue("--spacing");
  if (t2 === undefined)
    return false;
  let n3 = le2.get(bt2(t2, r2));
  if (n3 === null)
    return false;
  let [s3, l6] = n3, p3 = e3 * s3;
  return l6 === "px" ? p3 <= Vi2 : l6 === "rem" ? p3 <= El2 : false;
}
function Rl(e3, i) {
  let r2 = e3.resolveThemeValue("--spacing");
  if (r2 === undefined)
    return null;
  r2 = bt2(r2, i?.rem ?? null);
  let t2 = le2.get(r2);
  if (!t2)
    return null;
  let [n3, s3] = t2;
  return new U4((l6) => {
    if (n3 === 0)
      return null;
    let p3 = le2.get(bt2(l6, i?.rem ?? null));
    if (!p3)
      return null;
    let [f4, c3] = p3;
    return c3 !== s3 ? null : f4 / n3;
  });
}
function Pl(e3, i) {
  if (e3.kind !== "arbitrary" && !(e3.kind === "functional" && e3.value?.kind === "arbitrary"))
    return e3;
  let r2 = i.designSystem, t2 = r2.storage[rr3].get(i.signatureOptions), n3 = r2.storage[ve3].get(i.signatureOptions), s3 = r2.storage[it3].get(i.signatureOptions), l6 = r2.printCandidate(e3), p3 = n3.get(l6);
  if (typeof p3 != "string")
    return e3;
  for (let c3 of f4(p3, e3))
    if (s3(e3, c3) && Ol(r2, e3, c3))
      return c3;
  return e3;
  function* f4(c3, m2) {
    let d3 = t2.get(c3);
    if (d3.length > 1) {
      let u2;
      for (let h8 of d3)
        if (h8[0] !== "-") {
          if (u2)
            return;
          u2 = h8;
        }
      if (u2)
        for (let h8 of pe3(r2, u2))
          yield h8;
      return;
    }
    if (d3.length === 0 && m2.modifier) {
      let u2 = { ...m2, modifier: null }, h8 = n3.get(r2.printCandidate(u2));
      if (typeof h8 == "string")
        for (let v5 of f4(h8, u2))
          yield Object.assign({}, v5, { modifier: m2.modifier });
    }
    if (d3.length === 1)
      for (let u2 of pe3(r2, d3[0]))
        yield u2;
    else if (d3.length === 0) {
      let u2 = m2.kind === "arbitrary" ? m2.value : m2.value?.value ?? null;
      if (u2 === null)
        return;
      if (i.signatureOptions.rem !== null && m2.kind === "functional" && m2.value?.kind === "arbitrary") {
        let k4 = r2.storage[At2]?.get(u2) ?? null;
        k4 !== null && ue3(k4) && hi2(k4, r2, i.signatureOptions.rem) && (yield Object.assign({}, m2, { value: { kind: "named", value: k4, fraction: null } }));
      }
      let h8 = r2.storage[At2]?.get(u2) ?? null, v5 = "";
      h8 !== null && h8 < 0 && (v5 = "-", h8 = Math.abs(h8));
      for (let k4 of Array.from(r2.utilities.keys("functional")).sort((y4, N5) => +(y4[0] === "-") - +(N5[0] === "-"))) {
        v5 && (k4 = `${v5}${k4}`);
        for (let y4 of pe3(r2, `${k4}-${u2}`))
          yield y4;
        if (m2.modifier)
          for (let y4 of pe3(r2, `${k4}-${u2}${m2.modifier}`))
            yield y4;
        if (h8 !== null && ue3(h8) && hi2(h8, r2, i.signatureOptions.rem)) {
          for (let y4 of pe3(r2, `${k4}-${h8}`))
            yield y4;
          if (m2.modifier)
            for (let y4 of pe3(r2, `${k4}-${h8}${et3(m2.modifier)}`))
              yield y4;
        }
        for (let y4 of pe3(r2, `${k4}-[${u2}]`))
          yield y4;
        if (m2.modifier)
          for (let y4 of pe3(r2, `${k4}-[${u2}]${et3(m2.modifier)}`))
            yield y4;
      }
    }
  }
}
function Ol(e3, i, r2) {
  let t2 = null;
  if (i.kind === "functional" && i.value?.kind === "arbitrary" && i.value.value.includes("var(--") ? t2 = i.value.value : i.kind === "arbitrary" && i.value.includes("var(--") && (t2 = i.value), t2 === null)
    return true;
  let n3 = e3.candidatesToCss([e3.printCandidate(r2)]).join(`
`), s3 = true;
  return _5(M3(t2), (l6) => {
    if (l6.kind === "function" && l6.value === "var") {
      let p3 = l6.nodes[0].value;
      if (!new RegExp(`var\\(${p3}[,)]\\s*`, "g").test(n3) || n3.includes(`${p3}:`))
        return s3 = false, V5.Stop;
    }
  }), s3;
}
function _l2(e3, i) {
  if (e3.kind !== "functional" || e3.value?.kind !== "named")
    return e3;
  let r2 = i.designSystem, t2 = r2.storage[rr3].get(i.signatureOptions), n3 = r2.storage[ve3].get(i.signatureOptions), s3 = r2.storage[it3].get(i.signatureOptions), l6 = r2.printCandidate(e3), p3 = n3.get(l6);
  if (typeof p3 != "string")
    return e3;
  for (let c3 of f4(p3, e3))
    if (s3(e3, c3))
      return c3;
  return e3;
  function* f4(c3, m2) {
    let d3 = t2.get(c3);
    if (d3.length > 1) {
      let u2;
      for (let h8 of d3)
        if (h8[0] !== "-") {
          if (u2)
            return;
          u2 = h8;
        }
      if (u2)
        for (let h8 of pe3(r2, u2))
          yield h8;
      return;
    }
    if (d3.length === 0 && m2.modifier) {
      let u2 = { ...m2, modifier: null }, h8 = n3.get(r2.printCandidate(u2));
      if (typeof h8 == "string")
        for (let v5 of f4(h8, u2))
          yield Object.assign({}, v5, { modifier: m2.modifier });
    }
    if (d3.length === 1)
      for (let u2 of pe3(r2, d3[0]))
        yield u2;
  }
}
function* Kl(e3) {
  let i = Il.get(e3);
  i && (yield i);
  for (let [r2, t2] of Dl) {
    let n3 = e3.replace(r2, t2);
    n3 !== e3 && (yield n3);
  }
}
function Ul(e3, i) {
  let r2 = i.designSystem, t2 = r2.storage[it3].get(i.signatureOptions), n3 = Ci2(r2, e3);
  for (let s3 of Kl(n3)) {
    if (!t2(e3, s3))
      continue;
    let [l6] = pe3(r2, s3);
    return l6;
  }
  return e3;
}
function zl(e3, i) {
  let r2 = i.designSystem, t2 = r2.storage[St2], n3 = r2.storage[Ti2], s3 = Vt3(e3);
  for (let [l6] of s3) {
    if (l6.kind === "compound")
      continue;
    let p3 = r2.printVariant(l6), f4 = t2.get(p3);
    if (typeof f4 != "string")
      continue;
    let c3 = n3.get(f4);
    if (c3.length !== 1)
      continue;
    let m2 = c3[0], d3 = r2.parseVariant(m2);
    d3 !== null && ce3(l6, d3);
  }
  return e3;
}
function Ll2(e3, i) {
  let r2 = i.designSystem, t2 = r2.storage[ve3].get(i.signatureOptions);
  if (e3.kind === "functional" && e3.value?.kind === "arbitrary" && e3.value.dataType !== null) {
    let n3 = r2.printCandidate({ ...e3, value: { ...e3.value, dataType: null } });
    t2.get(r2.printCandidate(e3)) === t2.get(n3) && (e3.value.dataType = null);
  }
  return e3;
}
function jl(e3, i) {
  if (e3.kind !== "functional" || e3.value?.kind !== "arbitrary")
    return e3;
  let r2 = i.designSystem, t2 = r2.storage[ve3].get(i.signatureOptions), n3 = t2.get(r2.printCandidate(e3));
  if (n3 === null)
    return e3;
  for (let s3 of Si2(e3))
    if (t2.get(r2.printCandidate({ ...e3, value: s3 })) === n3)
      return e3.value = s3, e3;
  return e3;
}
function Ml(e3) {
  let i = Vt3(e3);
  for (let [r2] of i)
    if (r2.kind === "functional" && r2.root === "data" && r2.value?.kind === "arbitrary" && !r2.value.value.includes("="))
      r2.value = { kind: "named", value: r2.value.value };
    else if (r2.kind === "functional" && r2.root === "aria" && r2.value?.kind === "arbitrary" && (r2.value.value.endsWith("=true") || r2.value.value.endsWith('="true"') || r2.value.value.endsWith("='true'"))) {
      let [t2, n3] = d2(r2.value.value, "=");
      if (t2[t2.length - 1] === "~" || t2[t2.length - 1] === "|" || t2[t2.length - 1] === "^" || t2[t2.length - 1] === "$" || t2[t2.length - 1] === "*")
        continue;
      r2.value = { kind: "named", value: r2.value.value.slice(0, r2.value.value.indexOf("=")) };
    } else
      r2.kind === "functional" && r2.root === "supports" && r2.value?.kind === "arbitrary" && /^[a-z-][a-z0-9-]*$/i.test(r2.value.value) && (r2.value = { kind: "named", value: r2.value.value });
  return e3;
}
function* Si2(e3, i = e3.value?.value ?? "", r2 = new Set) {
  if (r2.has(i))
    return;
  if (r2.add(i), yield { kind: "named", value: i, fraction: null }, i.endsWith("%") && ue3(i.slice(0, -1)) && (yield { kind: "named", value: i.slice(0, -1), fraction: null }), i.includes("/")) {
    let [s3, l6] = i.split("/");
    u(s3) && u(l6) && (yield { kind: "named", value: s3, fraction: `${s3}/${l6}` });
  }
  let t2 = new Set;
  for (let s3 of i.matchAll(/(\d+\/\d+)|(\d+\.?\d+)/g))
    t2.add(s3[0].trim());
  let n3 = Array.from(t2).sort((s3, l6) => s3.length - l6.length);
  for (let s3 of n3)
    yield* Si2(e3, s3, r2);
}
function vi2(e3) {
  return !(e3.length === 1 && e3[0].kind === "list");
}
function xt2(e3) {
  return e3.value[0] === "[" && e3.value[e3.value.length - 1] === "]";
}
function Fl(e3, i) {
  let r2 = [e3], t2 = i.designSystem, n3 = t2.storage[St2], s3 = Vt3(e3);
  for (let [l6, p3] of s3)
    if (l6.kind === "compound" && (l6.root === "has" || l6.root === "not" || l6.root === "in") && l6.modifier !== null && "modifier" in l6.variant && (l6.variant.modifier = l6.modifier, l6.modifier = null), l6.kind === "arbitrary") {
      if (l6.relative)
        continue;
      let f4 = Ee4(l6.selector);
      if (!vi2(f4))
        continue;
      if (f4.length === 1 && f4[0].kind === "complex" && (f4 = f4[0].nodes), p3 === null && f4.length === 3 && f4[0].kind === "selector" && f4[0].value === "&" && f4[1].kind === "combinator" && f4[1].value === ">" && f4[2].kind === "selector" && f4[2].value === "*") {
        ce3(l6, t2.parseVariant("*"));
        continue;
      }
      if (p3 === null && f4.length === 3 && f4[0].kind === "selector" && f4[0].value === "&" && f4[1].kind === "combinator" && f4[1].value === " " && f4[2].kind === "selector" && f4[2].value === "*") {
        ce3(l6, t2.parseVariant("**"));
        continue;
      }
      if (p3 === null && f4.length === 1 && f4[0].kind === "compound" && f4[0].nodes.length === 2 && f4[0].nodes[0].kind === "selector" && f4[0].nodes[0].value === "&" && f4[0].nodes[1].kind === "function" && f4[0].nodes[1].value === ":has" && f4[0].nodes[1].nodes.length === 1 && f4[0].nodes[1].nodes[0].kind === "selector") {
        ce3(l6, t2.parseVariant(`has-[${ue4(f4[0].nodes[1].nodes, true)}]`));
        continue;
      }
      if (p3 === null && f4.length === 3 && f4[0].kind === "selector" && f4[1].kind === "combinator" && f4[1].value === " " && f4[2].kind === "selector" && f4[2].value === "&") {
        f4.pop(), f4.pop(), ce3(l6, t2.parseVariant(`in-[${ue4(f4, true)}]`));
        continue;
      }
      if (p3 === null && f4[0].kind === "selector" && (f4[0].value === "@media" || f4[0].value === "@supports")) {
        let u2 = n3.get(t2.printVariant(l6)), h8 = M3(ue4(f4, true)), v5 = false;
        if (_5(h8, (k4) => {
          if (k4.kind === "word" && k4.value === "not")
            return v5 = true, V5.Replace([]);
        }), h8 = M3(F3(h8)), _5(h8, (k4) => {
          k4.kind === "separator" && k4.value !== " " && k4.value.trim() === "" && (k4.value = " ");
        }), v5) {
          let k4 = t2.parseVariant(`not-[${F3(h8)}]`);
          if (k4 === null)
            continue;
          let y4 = n3.get(t2.printVariant(k4));
          if (u2 === y4) {
            ce3(l6, k4);
            continue;
          }
        }
      }
      let c3 = null;
      p3 === null && f4.length === 3 && f4[0].kind === "selector" && f4[0].value === "&" && f4[1].kind === "combinator" && f4[1].value === ">" && f4[2].kind === "selector" && (f4[2].value[0] === ":" || xt2(f4[2])) && (f4 = [f4[2]], c3 = t2.parseVariant("*")), p3 === null && f4.length === 3 && f4[0].kind === "selector" && f4[0].value === "&" && f4[1].kind === "combinator" && f4[1].value === " " && f4[2].kind === "selector" && (f4[2].value[0] === ":" || xt2(f4[2])) && (f4 = [f4[2]], c3 = t2.parseVariant("**"));
      let m2 = f4;
      if (_5(m2, { enter(u2) {
        if (u2.kind === "selector" && u2.value === "&")
          return V5.Replace([]);
        if (u2.kind === "function")
          return V5.Skip;
      }, exit(u2) {
        if (u2.kind === "compound" && u2.nodes.length === 1)
          return V5.ReplaceSkip(u2.nodes);
      } }), m2.length !== 1)
        continue;
      let d3 = m2[0];
      if (d3.kind === "function" && d3.value === ":is") {
        if (!vi2(d3.nodes) || d3.nodes.length !== 1 || d3.nodes[0].kind === "selector" && !xt2(d3.nodes[0]))
          continue;
        d3 = d3.nodes[0];
      }
      if (d3.kind === "function" && d3.value[0] === ":" || d3.kind === "selector" && d3.value[0] === ":") {
        let u2 = d3, h8 = false;
        if (u2.kind === "function" && u2.value === ":not") {
          if (h8 = true, u2.nodes.length !== 1 || u2.nodes[0].kind !== "selector" && u2.nodes[0].kind !== "function" || u2.nodes[0].value[0] !== ":")
            continue;
          u2 = u2.nodes[0];
        }
        let v5 = ((y4) => {
          if (y4 === ":nth-child" && u2.kind === "function" && u2.nodes.length === 1 && u2.nodes[0].kind === "value" && u2.nodes[0].value === "odd")
            return h8 ? (h8 = false, "even") : "odd";
          if (y4 === ":nth-child" && u2.kind === "function" && u2.nodes.length === 1 && u2.nodes[0].kind === "value" && u2.nodes[0].value === "even")
            return h8 ? (h8 = false, "odd") : "even";
          for (let [N5, A3] of [[":nth-child", "nth"], [":nth-last-child", "nth-last"], [":nth-of-type", "nth-of-type"], [":nth-last-of-type", "nth-of-last-type"]])
            if (y4 === N5 && u2.kind === "function" && u2.nodes.length === 1)
              return u2.nodes.length === 1 && u2.nodes[0].kind === "value" && u(u2.nodes[0].value) ? `${A3}-${u2.nodes[0].value}` : `${A3}-[${ue4(u2.nodes, true)}]`;
          if (h8) {
            let N5 = n3.get(t2.printVariant(l6)), A3 = n3.get(`not-[${y4}]`);
            if (N5 === A3)
              return `[&${y4}]`;
          }
          return null;
        })(u2.value);
        if (v5 === null) {
          if (c3)
            return ce3(l6, { kind: "arbitrary", selector: d3.value, relative: false }), [c3, l6];
          continue;
        }
        h8 && (v5 = `not-${v5}`);
        let k4 = t2.parseVariant(v5);
        if (k4 === null)
          continue;
        ce3(l6, k4);
      } else if (d3.kind === "selector" && xt2(d3)) {
        let u2 = qr2(d3.value);
        if (u2 === null)
          continue;
        if (u2.attribute.startsWith("data-")) {
          let h8 = u2.attribute.slice(5);
          ce3(l6, { kind: "functional", root: "data", modifier: null, value: u2.value === null ? { kind: "named", value: h8 } : { kind: "arbitrary", value: `${h8}${u2.operator}${u2.quote ?? ""}${u2.value}${u2.quote ?? ""}${u2.sensitivity ? ` ${u2.sensitivity}` : ""}` } });
        } else if (u2.attribute.startsWith("aria-")) {
          let h8 = u2.attribute.slice(5);
          ce3(l6, { kind: "functional", root: "aria", modifier: null, value: u2.value === null ? { kind: "arbitrary", value: h8 } : u2.operator === "=" && u2.value === "true" && u2.sensitivity === null ? { kind: "named", value: h8 } : { kind: "arbitrary", value: `${u2.attribute}${u2.operator}${u2.quote ?? ""}${u2.value}${u2.quote ?? ""}${u2.sensitivity ? ` ${u2.sensitivity}` : ""}` } });
        } else
          ce3(l6, { kind: "arbitrary", selector: d3.value, relative: false });
      }
      if (c3)
        return [c3, l6];
    }
  return r2;
}
function Wl(e3, i) {
  if (e3.kind !== "functional" || e3.value?.kind !== "arbitrary")
    return e3;
  let t2 = i.designSystem.storage[it3].get(i.signatureOptions), n3 = M3(e3.value.value);
  if (n3.length === 1 && n3[0].kind === "function" && n3[0].value === "calc") {
    let [s3, l6] = rt3(n3, null, false);
    if (s3) {
      let p3 = Ue2(e3);
      p3.value.value = F3(l6), t2(e3, p3) && (e3 = p3, n3 = l6);
    }
  }
  if (e3.root[0] === "-") {
    if (n3.length === 1 && n3[0].kind === "function" && n3[0].value === "var")
      return e3;
    let s3 = M3(`calc(${e3.value.value} * -1)`), [l6, p3] = rt3(s3, null, false);
    if (l6) {
      let f4 = Ue2(e3);
      f4.root = f4.root.slice(1), f4.value.value = F3(p3), t2(e3, f4) && (e3 = f4, n3 = p3);
    }
  }
  if (n3.length === 1 && n3[0].kind === "function" && n3[0].value === "calc") {
    let s3 = n3[0].nodes;
    if (s3.length === 5 && s3[1].kind === "separator" && s3[1].value === " " && s3[2].kind === "word" && s3[2].value === "*" && s3[3].kind === "separator" && s3[3].value === " ") {
      let l6 = s3[4].kind === "word" && s3[4].value === "-1" ? s3[0] : s3[0].kind === "word" && s3[0].value === "-1" ? s3[4] : null;
      if (l6) {
        let p3 = Ue2(e3);
        p3.root = `-${e3.root}`, p3.value.value = F3([l6]), t2(e3, p3) && (e3 = p3);
      }
    }
  }
  return e3;
}
function Bl(e3, i) {
  if (e3.kind !== "functional" && e3.kind !== "arbitrary" || e3.modifier === null)
    return e3;
  let r2 = i.designSystem, t2 = r2.storage[ve3].get(i.signatureOptions), n3 = t2.get(r2.printCandidate(e3)), s3 = e3.modifier;
  if (n3 === t2.get(r2.printCandidate({ ...e3, modifier: null })))
    return e3.modifier = null, e3;
  {
    let l6 = { kind: "named", value: s3.value.endsWith("%") ? s3.value.includes(".") ? `${Number(s3.value.slice(0, -1))}` : s3.value.slice(0, -1) : s3.value, fraction: null };
    if (n3 === t2.get(r2.printCandidate({ ...e3, modifier: l6 })))
      return e3.modifier = l6, e3;
  }
  {
    let l6 = { kind: "named", value: `${parseFloat(s3.value) * 100}`, fraction: null };
    if (n3 === t2.get(r2.printCandidate({ ...e3, modifier: l6 })))
      return e3.modifier = l6, e3;
  }
  return e3;
}
function Yl(e3) {
  return new U4((i) => new U4((r2) => {
    try {
      r2 = e3.theme.prefix && !r2.startsWith(e3.theme.prefix) ? `${e3.theme.prefix}:${r2}` : r2;
      let t2 = [H4(".x", [B3("@apply", r2)])];
      return Xl(e3, () => {
        for (let s3 of e3.parseCandidate(r2))
          e3.compileAstNodes(s3, 1);
        Ce3(t2, e3);
      }), $i2(e3, t2, i), ae2(t2);
    } catch {
      return Symbol();
    }
  }));
}
function $i2(e3, i, r2) {
  let { rem: t2 } = r2;
  return _5(i, { enter(n3, s3) {
    if (n3.kind === "declaration") {
      if (n3.value === undefined || n3.property === "--tw-sort")
        return V5.Replace([]);
      if (n3.property.startsWith("--tw-") && s3.siblings.some((d3) => d3.kind === "declaration" && n3.value === d3.value && n3.important === d3.important && !d3.property.startsWith("--tw-")))
        return V5.Replace([]);
      if (r2.features & 1) {
        let d3 = ii3(n3, r2.features);
        if (d3)
          return V5.Replace(d3);
      }
      n3.value.includes("var(") && (n3.value = Gl(n3.value, e3));
      let l6 = M3(n3.value), [p3, f4] = rt3(l6, t2), [c3, m2] = Hr3(f4);
      (p3 || c3) && (n3.value = F3(m2)), n3.value = xe3(n3.value);
    } else {
      if (n3.kind === "context" || n3.kind === "at-root")
        return V5.Replace(n3.nodes);
      if (n3.kind === "comment")
        return V5.Replace([]);
      if (n3.kind === "at-rule" && n3.name === "@property")
        return V5.Replace([]);
    }
  }, exit(n3) {
    if (n3.kind === "rule" || n3.kind === "at-rule") {
      if (n3.nodes.length > 1) {
        let s3 = new Set;
        for (let l6 = n3.nodes.length - 1;l6 >= 0; l6--) {
          let p3 = n3.nodes[l6];
          p3.kind === "declaration" && p3.value !== undefined && (s3.has(p3.property) && n3.nodes.splice(l6, 1), s3.add(p3.property));
        }
      }
      n3.nodes.sort((s3, l6) => s3.kind !== "declaration" || l6.kind !== "declaration" ? 0 : s3.property.localeCompare(l6.property));
    }
  } }), i;
}
function Gl(e3, i) {
  let r2 = false, t2 = M3(e3), n3 = new Set;
  return _5(t2, (s3) => {
    if (s3.kind !== "function" || s3.value !== "var" || s3.nodes.length !== 1 && s3.nodes.length < 3)
      return;
    let l6 = s3.nodes[0].value;
    i.theme.prefix && l6.startsWith(`--${i.theme.prefix}-`) && (l6 = l6.slice(`--${i.theme.prefix}-`.length));
    let p3 = i.resolveThemeValue(l6);
    if (!n3.has(l6) && (n3.add(l6), p3 !== undefined && (s3.nodes.length === 1 && (r2 = true, s3.nodes.push(...M3(`,${p3}`))), s3.nodes.length >= 3))) {
      let f4 = F3(s3.nodes), c3 = `${s3.nodes[0].value},${p3}`;
      if (f4 === c3)
        return r2 = true, V5.Replace(M3(p3));
    }
  }), r2 ? F3(t2) : e3;
}
function ql() {
  return new U4((e3) => new U4((i) => new U4((r2) => new Set)));
}
function Hl(e3) {
  return new U4((i) => new U4((r2) => {
    let t2 = new U4((s3) => new Set);
    e3.theme.prefix && !r2.startsWith(e3.theme.prefix) && (r2 = `${e3.theme.prefix}:${r2}`);
    let n3 = e3.parseCandidate(r2);
    if (n3.length === 0)
      return t2;
    try {
      let s3 = e3.compileAstNodes(n3[0]).map((l6) => re3(l6.node));
      _5($i2(e3, s3, i), (l6) => {
        l6.kind === "declaration" && (t2.get(l6.property).add(l6.value), e3.storage[tr3].get(i).get(l6.property).get(l6.value).add(r2));
      });
    } catch {}
    return t2;
  }));
}
function Zl(e3) {
  return new U4((i) => {
    let r2 = e3.storage[ve3].get(i), t2 = new U4(() => []);
    for (let [n3, s3] of e3.getClassList()) {
      let l6 = r2.get(n3);
      if (typeof l6 == "string") {
        if (n3[0] === "-" && n3.endsWith("-0")) {
          let p3 = r2.get(n3.slice(1));
          if (typeof p3 == "string" && l6 === p3)
            continue;
        }
        t2.get(l6).push(n3), e3.storage[Ct3].get(i).get(n3);
        for (let p3 of s3.modifiers) {
          if (ue3(p3))
            continue;
          let f4 = `${n3}/${p3}`, c3 = r2.get(f4);
          typeof c3 == "string" && (t2.get(c3).push(f4), e3.storage[Ct3].get(i).get(f4));
        }
      }
    }
    return t2;
  });
}
function Jl(e3) {
  return new U4((i) => {
    try {
      i = e3.theme.prefix && !i.startsWith(e3.theme.prefix) ? `${e3.theme.prefix}:${i}` : i;
      let r2 = [H4(".x", [B3("@apply", `${i}:flex`)])];
      return Ce3(r2, e3), _5(r2, (n3) => {
        if (n3.kind === "at-rule" && n3.params.includes(" "))
          n3.params = n3.params.replaceAll(" ", "");
        else if (n3.kind === "rule") {
          let s3 = Ee4(n3.selector), l6 = false;
          _5(s3, (p3) => {
            if (p3.kind === "list" || p3.kind === "combinator")
              l6 = true;
            else if (p3.kind === "function" && p3.value === ":is") {
              if (p3.nodes.length === 1)
                return l6 = true, V5.Replace(p3.nodes);
              if (p3.nodes.length === 2 && p3.nodes[0].kind === "selector" && p3.nodes[0].value === "*" && p3.nodes[1].kind === "selector" && p3.nodes[1].value[0] === ":")
                return l6 = true, V5.Replace(p3.nodes[1]);
            } else
              p3.kind === "function" && p3.value[0] === ":" && p3.nodes[0]?.kind === "selector" && p3.nodes[0]?.value[0] === ":" && (l6 = true, p3.nodes.unshift({ kind: "selector", value: "*" }));
          }), l6 && (n3.selector = ue4(s3, true));
        }
      }), ae2(r2);
    } catch {
      return Symbol();
    }
  });
}
function Ql(e3) {
  let i = e3.storage[St2], r2 = new U4(() => []);
  for (let [t2, n3] of e3.variants.entries())
    if (n3.kind === "static") {
      let s3 = i.get(t2);
      if (typeof s3 != "string")
        continue;
      r2.get(s3).push(t2);
    }
  return r2;
}
function Xl(e3, i) {
  let r2 = e3.theme.values.get, t2 = new Set;
  e3.theme.values.get = (n3) => {
    let s3 = r2.call(e3.theme.values, n3);
    return s3 === undefined || s3.options & 1 && (t2.add(s3), s3.options &= -2), s3;
  };
  try {
    return i();
  } finally {
    e3.theme.values.get = r2;
    for (let n3 of t2)
      n3.options |= 1;
  }
}
function* eo3(e3) {
  let i = e3.length, r2 = 1n << BigInt(i);
  for (let t2 = i;t2 >= 2; t2--) {
    let n3 = (1n << BigInt(t2)) - 1n;
    for (;n3 < r2; ) {
      let s3 = [];
      for (let f4 = 0;f4 < i; f4++)
        n3 >> BigInt(f4) & 1n && s3.push(e3[f4]);
      yield s3;
      let l6 = n3 & -n3, p3 = n3 + l6;
      n3 = ((p3 ^ n3) >> 2n) / l6 | p3;
    }
  }
}
function wi2(e3, i) {
  if (typeof e3.intersection == "function")
    return e3.intersection(i);
  if (e3.size === 0 || i.size === 0)
    return new Set;
  let r2 = new Set(e3);
  for (let t2 of i)
    r2.has(t2) || r2.delete(t2);
  return r2;
}
function Ni2(e3) {
  let i = new U4((n3) => ({ name: n3, utility: n3, fraction: false, modifiers: [] }));
  for (let n3 of e3.utilities.keys("static")) {
    if (e3.utilities.getCompletions(n3).length === 0)
      continue;
    let l6 = i.get(n3);
    l6.fraction = false, l6.modifiers = [];
  }
  for (let n3 of e3.utilities.keys("functional")) {
    let s3 = e3.utilities.getCompletions(n3);
    for (let l6 of s3)
      for (let p3 of l6.values) {
        let f4 = p3 !== null && ro3.test(p3), c3 = p3 === null ? n3 : `${n3}-${p3}`, m2 = i.get(c3);
        if (m2.utility = n3, m2.fraction ||= f4, m2.modifiers.push(...l6.modifiers), l6.supportsNegative) {
          let d3 = i.get(`-${c3}`);
          d3.utility = `-${n3}`, d3.fraction ||= f4, d3.modifiers.push(...l6.modifiers);
        }
        m2.modifiers = Array.from(new Set(m2.modifiers));
      }
  }
  if (i.size === 0)
    return [];
  let r2 = Array.from(i.values());
  return r2.sort((n3, s3) => kt3(n3.name, s3.name)), io3(r2);
}
function io3(e3) {
  let i = [], r2 = null, t2 = new Map, n3 = new U4(() => []);
  for (let l6 of e3) {
    let { utility: p3, fraction: f4 } = l6;
    r2 || (r2 = { utility: p3, items: [] }, t2.set(p3, r2)), p3 !== r2.utility && (i.push(r2), r2 = { utility: p3, items: [] }, t2.set(p3, r2)), f4 ? n3.get(p3).push(l6) : r2.items.push(l6);
  }
  r2 && i[i.length - 1] !== r2 && i.push(r2);
  for (let [l6, p3] of n3) {
    let f4 = t2.get(l6);
    f4 && f4.items.push(...p3);
  }
  let s3 = [];
  for (let l6 of i)
    for (let p3 of l6.items)
      s3.push([p3.name, { modifiers: p3.modifiers }]);
  return s3;
}
function Ei2(e3) {
  let i = [];
  for (let [t2, n3] of e3.variants.entries()) {
    let p3 = function({ value: f4, modifier: c3 } = {}) {
      let m2 = t2;
      f4 && (m2 += s3 ? `-${f4}` : f4), c3 && (m2 += `/${c3}`);
      let d3 = e3.parseVariant(m2);
      if (!d3)
        return [];
      let u2 = H4(".__placeholder__", []);
      if (We4(u2, d3, e3.variants) === null)
        return [];
      let h8 = [];
      return _5(u2.nodes, { exit(v5, k4) {
        if (v5.kind !== "rule" && v5.kind !== "at-rule" || v5.nodes.length > 0)
          return;
        let y4 = k4.path();
        y4.push(v5), y4.sort((b5, D4) => {
          let O5 = b5.kind === "at-rule", P4 = D4.kind === "at-rule";
          return O5 && !P4 ? -1 : !O5 && P4 ? 1 : 0;
        });
        let N5 = y4.flatMap((b5) => b5.kind === "rule" ? b5.selector === "&" ? [] : [b5.selector] : b5.kind === "at-rule" ? [`${b5.name} ${b5.params}`] : []), A3 = "";
        for (let b5 = N5.length - 1;b5 >= 0; b5--)
          A3 = A3 === "" ? N5[b5] : `${N5[b5]} { ${A3} }`;
        h8.push(A3);
      } }), h8;
    };
    var r2 = p3;
    if (n3.kind === "arbitrary")
      continue;
    let s3 = t2 !== "@", l6 = e3.variants.getCompletions(t2);
    switch (n3.kind) {
      case "static": {
        i.push({ name: t2, values: l6, isArbitrary: false, hasDash: s3, selectors: p3 });
        break;
      }
      case "functional": {
        i.push({ name: t2, values: l6, isArbitrary: true, hasDash: s3, selectors: p3 });
        break;
      }
      case "compound": {
        i.push({ name: t2, values: l6, isArbitrary: true, hasDash: s3, selectors: p3 });
        break;
      }
    }
  }
  return i;
}
function Ri2(e3, i) {
  let { astNodes: r2, nodeSorting: t2 } = Ve(Array.from(i), e3), n3 = new Map(i.map((l6) => [l6, null])), s3 = 0n;
  for (let l6 of r2) {
    let p3 = t2.get(l6)?.candidate;
    p3 && n3.set(p3, n3.get(p3) ?? s3++);
  }
  return i.map((l6) => [l6, n3.get(l6) ?? null]);
}
function Pe3(e3) {
  let i = 0;
  for (let r2 of e3) {
    if (r2[0] === "@") {
      if (!r2.startsWith("@media") && !r2.startsWith("@supports") && !r2.startsWith("@container"))
        return 0;
      i |= 1;
      continue;
    }
    if (r2.includes("::"))
      return 0;
    i |= 2;
  }
  return i;
}
function Oi2(e3) {
  let i = new ir3;
  function r2(c3, m2, { compounds: d3 } = {}) {
    d3 = d3 ?? Pe3(m2), i.static(c3, (u2) => {
      u2.nodes = m2.map((h8) => J3(h8, u2.nodes));
    }, { compounds: d3 });
  }
  r2("*", [":is(& > *)"], { compounds: 0 }), r2("**", [":is(& *)"], { compounds: 0 });
  function t2(c3, m2) {
    return m2.map((d3) => {
      if (c3 === "@container") {
        let u2 = M3(d3.trim());
        return u2.length >= 1 && u2[0].kind === "function" ? `not ${d3}` : u2.length >= 3 && u2[0].kind === "word" && u2[0].value === "not" && u2[2].kind === "function" ? (u2.splice(0, 2), F3(u2)) : u2.length >= 5 && u2[0].kind === "word" && u2[2].kind === "word" && u2[2].value === "not" && u2[4].kind === "function" ? (u2.splice(2, 2), F3(u2)) : u2.length >= 3 && u2[0].kind === "word" && u2[0].value !== "not" && u2[2].kind === "function" ? (u2.splice(1, 0, { kind: "separator", value: " " }, { kind: "word", value: "not" }), F3(u2)) : `not ${d3}`;
      } else {
        d3 = d3.trim();
        let u2 = d2(d3, " ");
        return u2[0] === "not" ? u2.slice(1).join(" ") : `not ${d3}`;
      }
    });
  }
  let n3 = ["@media", "@supports", "@container"];
  function s3(c3) {
    for (let m2 of n3) {
      if (m2 !== c3.name)
        continue;
      let d3 = d2(c3.params, ",");
      return d3.length > 1 ? null : (d3 = t2(c3.name, d3), B3(c3.name, d3.join(", ")));
    }
    return null;
  }
  function l6(c3) {
    return c3.includes("::") ? null : `&:not(${d2(c3, ",").map((d3) => (d3 = d3.replaceAll("&", "*"), d3)).join(", ")})`;
  }
  i.compound("not", 3, (c3, m2) => {
    if (m2.variant.kind === "arbitrary" && m2.variant.relative || m2.modifier)
      return null;
    let d3 = false;
    if (_5([c3], (u2, h8) => {
      if (u2.kind !== "rule" && u2.kind !== "at-rule")
        return V5.Continue;
      if (u2.nodes.length > 0)
        return V5.Continue;
      let v5 = [], k4 = [], y4 = h8.path();
      y4.push(u2);
      for (let A3 of y4)
        A3.kind === "at-rule" ? v5.push(A3) : A3.kind === "rule" && k4.push(A3);
      if (v5.length > 1)
        return V5.Stop;
      if (k4.length > 1)
        return V5.Stop;
      let N5 = [];
      for (let A3 of k4) {
        let b5 = l6(A3.selector);
        if (!b5)
          return d3 = false, V5.Stop;
        N5.push(H4(b5, []));
      }
      for (let A3 of v5) {
        let b5 = s3(A3);
        if (!b5)
          return d3 = false, V5.Stop;
        N5.push(b5);
      }
      return Object.assign(c3, H4("&", N5)), d3 = true, V5.Skip;
    }), c3.kind === "rule" && c3.selector === "&" && c3.nodes.length === 1 && Object.assign(c3, c3.nodes[0]), !d3)
      return null;
  }), i.suggest("not", () => Array.from(i.keys()).filter((c3) => i.compoundsWith("not", c3))), i.compound("group", 2, (c3, m2) => {
    if (m2.variant.kind === "arbitrary" && m2.variant.relative)
      return null;
    let d3 = m2.modifier ? `:where(.${e3.prefix ? `${e3.prefix}\\:` : ""}group\\/${m2.modifier.value})` : `:where(.${e3.prefix ? `${e3.prefix}\\:` : ""}group)`, u2 = false;
    if (_5([c3], (h8, v5) => {
      if (h8.kind !== "rule")
        return V5.Continue;
      for (let y4 of v5.path())
        if (y4.kind === "rule")
          return u2 = false, V5.Stop;
      let k4 = h8.selector.replaceAll("&", d3);
      d2(k4, ",").length > 1 && (k4 = `:is(${k4})`), h8.selector = `&:is(${k4} *)`, u2 = true;
    }), !u2)
      return null;
  }), i.suggest("group", () => Array.from(i.keys()).filter((c3) => i.compoundsWith("group", c3))), i.compound("peer", 2, (c3, m2) => {
    if (m2.variant.kind === "arbitrary" && m2.variant.relative)
      return null;
    let d3 = m2.modifier ? `:where(.${e3.prefix ? `${e3.prefix}\\:` : ""}peer\\/${m2.modifier.value})` : `:where(.${e3.prefix ? `${e3.prefix}\\:` : ""}peer)`, u2 = false;
    if (_5([c3], (h8, v5) => {
      if (h8.kind !== "rule")
        return V5.Continue;
      for (let y4 of v5.path())
        if (y4.kind === "rule")
          return u2 = false, V5.Stop;
      let k4 = h8.selector.replaceAll("&", d3);
      d2(k4, ",").length > 1 && (k4 = `:is(${k4})`), h8.selector = `&:is(${k4} ~ *)`, u2 = true;
    }), !u2)
      return null;
  }), i.suggest("peer", () => Array.from(i.keys()).filter((c3) => i.compoundsWith("peer", c3))), r2("first-letter", ["&::first-letter"]), r2("first-line", ["&::first-line"]), r2("marker", ["& *::marker", "&::marker", "& *::-webkit-details-marker", "&::-webkit-details-marker"]), r2("selection", ["& *::selection", "&::selection"]), r2("file", ["&::file-selector-button"]), r2("placeholder", ["&::placeholder"]), r2("backdrop", ["&::backdrop"]), r2("details-content", ["&::details-content"]);
  {
    let c3 = function() {
      return Y4([B3("@property", "--tw-content", [o2("syntax", '"*"'), o2("initial-value", '""'), o2("inherits", "false")])]);
    };
    var p3 = c3;
    i.static("before", (m2) => {
      m2.nodes = [H4("&::before", [c3(), o2("content", "var(--tw-content)"), ...m2.nodes])];
    }, { compounds: 0 }), i.static("after", (m2) => {
      m2.nodes = [H4("&::after", [c3(), o2("content", "var(--tw-content)"), ...m2.nodes])];
    }, { compounds: 0 });
  }
  r2("first", ["&:first-child"]), r2("last", ["&:last-child"]), r2("only", ["&:only-child"]), r2("odd", ["&:nth-child(odd)"]), r2("even", ["&:nth-child(even)"]), r2("first-of-type", ["&:first-of-type"]), r2("last-of-type", ["&:last-of-type"]), r2("only-of-type", ["&:only-of-type"]), r2("visited", ["&:visited"]), r2("target", ["&:target"]), r2("open", ["&:is([open], :popover-open, :open)"]), r2("default", ["&:default"]), r2("checked", ["&:checked"]), r2("indeterminate", ["&:indeterminate"]), r2("placeholder-shown", ["&:placeholder-shown"]), r2("autofill", ["&:autofill"]), r2("optional", ["&:optional"]), r2("required", ["&:required"]), r2("valid", ["&:valid"]), r2("invalid", ["&:invalid"]), r2("user-valid", ["&:user-valid"]), r2("user-invalid", ["&:user-invalid"]), r2("in-range", ["&:in-range"]), r2("out-of-range", ["&:out-of-range"]), r2("read-only", ["&:read-only"]), r2("empty", ["&:empty"]), r2("focus-within", ["&:focus-within"]), i.static("hover", (c3) => {
    c3.nodes = [H4("&:hover", [B3("@media", "(hover: hover)", c3.nodes)])];
  }), r2("focus", ["&:focus"]), r2("focus-visible", ["&:focus-visible"]), r2("active", ["&:active"]), r2("enabled", ["&:enabled"]), r2("disabled", ["&:disabled"]), r2("inert", ["&:is([inert], [inert] *)"]), i.compound("in", 2, (c3, m2) => {
    if (m2.modifier)
      return null;
    let d3 = false;
    if (_5([c3], (u2, h8) => {
      if (u2.kind !== "rule")
        return V5.Continue;
      for (let v5 of h8.path())
        if (v5.kind === "rule")
          return d3 = false, V5.Stop;
      u2.selector = `:where(${u2.selector.replaceAll("&", "*")}) &`, d3 = true;
    }), !d3)
      return null;
  }), i.suggest("in", () => Array.from(i.keys()).filter((c3) => i.compoundsWith("in", c3))), i.compound("has", 2, (c3, m2) => {
    if (m2.modifier)
      return null;
    let d3 = false;
    if (_5([c3], (u2, h8) => {
      if (u2.kind !== "rule")
        return V5.Continue;
      for (let v5 of h8.path())
        if (v5.kind === "rule")
          return d3 = false, V5.Stop;
      u2.selector = `&:has(${u2.selector.replaceAll("&", "*")})`, d3 = true;
    }), !d3)
      return null;
  }), i.suggest("has", () => Array.from(i.keys()).filter((c3) => i.compoundsWith("has", c3))), i.functional("aria", (c3, m2) => {
    if (!m2.value || m2.modifier)
      return null;
    m2.value.kind === "arbitrary" ? c3.nodes = [H4(`&[aria-${Pi2(m2.value.value)}]`, c3.nodes)] : c3.nodes = [H4(`&[aria-${m2.value.value}="true"]`, c3.nodes)];
  }), i.suggest("aria", () => ["busy", "checked", "disabled", "expanded", "hidden", "pressed", "readonly", "required", "selected"]), i.functional("data", (c3, m2) => {
    if (!m2.value || m2.modifier)
      return null;
    c3.nodes = [H4(`&[data-${Pi2(m2.value.value)}]`, c3.nodes)];
  }), i.functional("nth", (c3, m2) => {
    if (!m2.value || m2.modifier || m2.value.kind === "named" && !u(m2.value.value))
      return null;
    c3.nodes = [H4(`&:nth-child(${m2.value.value})`, c3.nodes)];
  }), i.functional("nth-last", (c3, m2) => {
    if (!m2.value || m2.modifier || m2.value.kind === "named" && !u(m2.value.value))
      return null;
    c3.nodes = [H4(`&:nth-last-child(${m2.value.value})`, c3.nodes)];
  }), i.functional("nth-of-type", (c3, m2) => {
    if (!m2.value || m2.modifier || m2.value.kind === "named" && !u(m2.value.value))
      return null;
    c3.nodes = [H4(`&:nth-of-type(${m2.value.value})`, c3.nodes)];
  }), i.functional("nth-last-of-type", (c3, m2) => {
    if (!m2.value || m2.modifier || m2.value.kind === "named" && !u(m2.value.value))
      return null;
    c3.nodes = [H4(`&:nth-last-of-type(${m2.value.value})`, c3.nodes)];
  }), i.functional("supports", (c3, m2) => {
    if (!m2.value || m2.modifier)
      return null;
    let d3 = m2.value.value;
    if (d3 === null)
      return null;
    if (/^[\w-]*\s*\(/.test(d3)) {
      let u2 = d3.replace(/\b(and|or|not)\b/g, " $1 ");
      c3.nodes = [B3("@supports", u2, c3.nodes)];
      return;
    }
    d3.includes(":") || (d3 = `${d3}: var(--tw)`), (d3[0] !== "(" || d3[d3.length - 1] !== ")") && (d3 = `(${d3})`), c3.nodes = [B3("@supports", d3, c3.nodes)];
  }, { compounds: 1 }), r2("motion-safe", ["@media (prefers-reduced-motion: no-preference)"]), r2("motion-reduce", ["@media (prefers-reduced-motion: reduce)"]), r2("contrast-more", ["@media (prefers-contrast: more)"]), r2("contrast-less", ["@media (prefers-contrast: less)"]);
  {
    let c3 = function(m2, d3, u2, h8) {
      if (m2 === d3)
        return 0;
      let v5 = h8.get(m2);
      if (v5 === null)
        return u2 === "asc" ? -1 : 1;
      let k4 = h8.get(d3);
      return k4 === null ? u2 === "asc" ? 1 : -1 : Te2(v5, k4, u2);
    };
    var f4 = c3;
    {
      let m2 = e3.namespace("--breakpoint"), d3 = new U4((u2) => {
        switch (u2.kind) {
          case "static":
            return e3.resolveValue(u2.root, ["--breakpoint"]) ?? null;
          case "functional": {
            if (!u2.value || u2.modifier)
              return null;
            let h8 = null;
            return u2.value.kind === "arbitrary" ? h8 = u2.value.value : u2.value.kind === "named" && (h8 = e3.resolveValue(u2.value.value, ["--breakpoint"])), !h8 || h8.includes("var(") ? null : h8;
          }
          case "arbitrary":
          case "compound":
            return null;
        }
      });
      i.group(() => {
        i.functional("max", (u2, h8) => {
          if (h8.modifier)
            return null;
          let v5 = d3.get(h8);
          if (v5 === null)
            return null;
          u2.nodes = [B3("@media", `(width < ${v5})`, u2.nodes)];
        }, { compounds: 1 });
      }, (u2, h8) => c3(u2, h8, "desc", d3)), i.suggest("max", () => Array.from(m2.keys()).filter((u2) => u2 !== null)), i.group(() => {
        for (let [u2, h8] of e3.namespace("--breakpoint"))
          u2 !== null && i.static(u2, (v5) => {
            v5.nodes = [B3("@media", `(width >= ${h8})`, v5.nodes)];
          }, { compounds: 1 });
        i.functional("min", (u2, h8) => {
          if (h8.modifier)
            return null;
          let v5 = d3.get(h8);
          if (v5 === null)
            return null;
          u2.nodes = [B3("@media", `(width >= ${v5})`, u2.nodes)];
        }, { compounds: 1 });
      }, (u2, h8) => c3(u2, h8, "asc", d3)), i.suggest("min", () => Array.from(m2.keys()).filter((u2) => u2 !== null));
    }
    {
      let m2 = e3.namespace("--container"), d3 = new U4((u2) => {
        switch (u2.kind) {
          case "functional": {
            if (u2.value === null)
              return null;
            let h8 = null;
            return u2.value.kind === "arbitrary" ? h8 = u2.value.value : u2.value.kind === "named" && (h8 = e3.resolveValue(u2.value.value, ["--container"])), !h8 || h8.includes("var(") ? null : h8;
          }
          case "static":
          case "arbitrary":
          case "compound":
            return null;
        }
      });
      i.group(() => {
        i.functional("@max", (u2, h8) => {
          let v5 = d3.get(h8);
          if (v5 === null)
            return null;
          u2.nodes = [B3("@container", h8.modifier ? `${h8.modifier.value} (width < ${v5})` : `(width < ${v5})`, u2.nodes)];
        }, { compounds: 1 });
      }, (u2, h8) => c3(u2, h8, "desc", d3)), i.suggest("@max", () => Array.from(m2.keys()).filter((u2) => u2 !== null)), i.group(() => {
        i.functional("@", (u2, h8) => {
          let v5 = d3.get(h8);
          if (v5 === null)
            return null;
          u2.nodes = [B3("@container", h8.modifier ? `${h8.modifier.value} (width >= ${v5})` : `(width >= ${v5})`, u2.nodes)];
        }, { compounds: 1 }), i.functional("@min", (u2, h8) => {
          let v5 = d3.get(h8);
          if (v5 === null)
            return null;
          u2.nodes = [B3("@container", h8.modifier ? `${h8.modifier.value} (width >= ${v5})` : `(width >= ${v5})`, u2.nodes)];
        }, { compounds: 1 });
      }, (u2, h8) => c3(u2, h8, "asc", d3)), i.suggest("@min", () => Array.from(m2.keys()).filter((u2) => u2 !== null)), i.suggest("@", () => Array.from(m2.keys()).filter((u2) => u2 !== null));
    }
  }
  return r2("portrait", ["@media (orientation: portrait)"]), r2("landscape", ["@media (orientation: landscape)"]), r2("ltr", ['&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *)']), r2("rtl", ['&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *)']), r2("dark", ["@media (prefers-color-scheme: dark)"]), r2("starting", ["@starting-style"]), r2("print", ["@media print"]), r2("forced-colors", ["@media (forced-colors: active)"]), r2("inverted-colors", ["@media (inverted-colors: inverted)"]), r2("pointer-none", ["@media (pointer: none)"]), r2("pointer-coarse", ["@media (pointer: coarse)"]), r2("pointer-fine", ["@media (pointer: fine)"]), r2("any-pointer-none", ["@media (any-pointer: none)"]), r2("any-pointer-coarse", ["@media (any-pointer: coarse)"]), r2("any-pointer-fine", ["@media (any-pointer: fine)"]), r2("noscript", ["@media (scripting: none)"]), i;
}
function Pi2(e3) {
  if (e3.includes("=")) {
    let [i, ...r2] = d2(e3, "="), t2 = r2.join("=").trim();
    if (t2[0] === "'" || t2[0] === '"')
      return e3;
    if (t2.length > 1) {
      let n3 = t2[t2.length - 1];
      if (t2[t2.length - 2] === " " && (n3 === "i" || n3 === "I" || n3 === "s" || n3 === "S"))
        return `${i}="${t2.slice(0, -2)}" ${n3}`;
    }
    return `${i}="${t2}"`;
  }
  return e3;
}
function nr2(e3, i) {
  _5(e3, (r2) => {
    if (r2.kind === "at-rule" && r2.name === "@slot")
      return V5.ReplaceSkip(i);
    if (r2.kind === "at-rule" && (r2.name === "@keyframes" || r2.name === "@property"))
      return Object.assign(r2, Y4([B3(r2.name, r2.params, r2.nodes)])), V5.Skip;
  });
}
function Oe3(e3, i) {
  let r2 = 0;
  return _5(e3, (t2) => {
    if (t2.kind !== "at-rule" || t2.name !== "@variant")
      return;
    let n3 = [], s3 = d2(t2.params, ",");
    for (let [l6, p3] of s3.entries()) {
      let f4 = H4("&", l6 === s3.length - 1 ? t2.nodes : t2.nodes.map(re3)), c3 = d2(p3, ":");
      for (let m2 = c3.length - 1;m2 >= 0; --m2) {
        let d3 = c3[m2].trim();
        if (!d3)
          throw new Error("Cannot use `@variant` with empty variant");
        let u2 = i.parseVariant(d3);
        if (u2 === null)
          throw new Error(`Cannot use \`@variant\` with unknown variant: ${d3}`);
        if (We4(f4, u2, i.variants) === null)
          throw new Error(`Cannot use \`@variant\` with variant: ${d3}`);
      }
      n3.push(f4);
    }
    return r2 |= 32, V5.Replace(n3);
  }), r2;
}
function _i2(e3, i) {
  let r2 = Fr3(e3), t2 = Oi2(e3), n3 = new U4((d3) => Kr3(d3, m2)), s3 = new U4((d3) => Array.from(Dr2(d3, m2))), l6 = new U4((d3) => new U4((u2) => {
    let h8 = Ii2(u2, m2, d3);
    try {
      ze3(h8.map(({ node: v5 }) => v5), m2), Oe3(h8.map(({ node: v5 }) => v5), m2);
    } catch {
      return [];
    }
    return h8;
  })), p3 = new U4((d3) => {
    for (let u2 of dt2(d3))
      e3.markUsedVariable(u2);
  });
  function f4(d3) {
    let u2 = [];
    for (let h8 of d3) {
      let v5 = true, { astNodes: k4 } = Ve([h8], m2, { onInvalidCandidate() {
        v5 = false;
      } });
      i && _5(k4, (y4) => (y4.src ??= i, V5.Continue)), k4 = $e2(k4, m2, 0), u2.push(v5 ? k4 : []);
    }
    return u2;
  }
  function c3(d3) {
    return f4(d3).map((u2) => u2.length > 0 ? ae2(u2) : null);
  }
  let m2 = { theme: e3, utilities: r2, variants: t2, invalidCandidates: new Set, important: false, candidatesToCss: c3, candidatesToAst: f4, getClassOrder(d3) {
    return Ri2(this, d3);
  }, getClassList() {
    return Ni2(this);
  }, getVariants() {
    return Ei2(this);
  }, parseCandidate(d3) {
    return s3.get(d3);
  }, parseVariant(d3) {
    return n3.get(d3);
  }, compileAstNodes(d3, u2 = 1) {
    return l6.get(u2).get(d3);
  }, printCandidate(d3) {
    return zr3(m2, d3);
  }, printVariant(d3) {
    return mt3(d3);
  }, getVariantOrder() {
    let d3 = Array.from(n3.values());
    d3.sort((k4, y4) => this.variants.compare(k4, y4));
    let u2 = new Map, h8, v5 = 0;
    for (let k4 of d3)
      k4 !== null && (h8 !== undefined && this.variants.compare(h8, k4) !== 0 && v5++, u2.set(k4, v5), h8 = k4);
    return u2;
  }, resolveThemeValue(d3, u2 = true) {
    let h8 = d3.lastIndexOf("/"), v5 = null;
    h8 !== -1 && (v5 = d3.slice(h8 + 1).trim(), d3 = d3.slice(0, h8).trim());
    let k4 = e3.resolve(null, [d3], u2 ? 1 : 0) ?? undefined;
    return v5 && k4 ? Q3(k4, v5) : k4;
  }, trackUsedVariables(d3) {
    p3.get(d3);
  }, canonicalizeCandidates(d3, u2) {
    return Xt2(this, d3, u2);
  }, storage: {} };
  return m2;
}
function Ve(e3, i, { onInvalidCandidate: r2, respectImportant: t2 } = {}) {
  let n3 = new Map, s3 = [], l6 = new Map;
  for (let c3 of e3) {
    if (i.invalidCandidates.has(c3)) {
      r2?.(c3);
      continue;
    }
    let m2 = i.parseCandidate(c3);
    if (m2.length === 0) {
      r2?.(c3);
      continue;
    }
    l6.set(c3, m2);
  }
  let p3 = 0;
  (t2 ?? true) && (p3 |= 1);
  let f4 = i.getVariantOrder();
  for (let [c3, m2] of l6) {
    let d3 = false;
    for (let u2 of m2) {
      let h8 = i.compileAstNodes(u2, p3);
      if (h8.length !== 0) {
        d3 = true;
        for (let { node: v5, propertySort: k4 } of h8) {
          let y4 = 0n;
          for (let N5 of u2.variants)
            y4 |= 1n << BigInt(f4.get(N5));
          n3.set(v5, { properties: k4, variants: y4, candidate: c3 }), s3.push(v5);
        }
      }
    }
    d3 || r2?.(c3);
  }
  return s3.sort((c3, m2) => {
    let d3 = n3.get(c3), u2 = n3.get(m2);
    if (d3.variants - u2.variants !== 0n)
      return Number(d3.variants - u2.variants);
    let h8 = 0;
    for (;h8 < d3.properties.order.length && h8 < u2.properties.order.length && d3.properties.order[h8] === u2.properties.order[h8]; )
      h8 += 1;
    return (d3.properties.order[h8] ?? 1 / 0) - (u2.properties.order[h8] ?? 1 / 0) || u2.properties.count - d3.properties.count || kt3(d3.candidate, u2.candidate);
  }), { astNodes: s3, nodeSorting: n3 };
}
function Ii2(e3, i, r2) {
  let t2 = no3(e3, i);
  if (t2.length === 0)
    return [];
  let n3 = i.important && !!(r2 & 1), s3 = [], l6 = `.${h10(e3.raw)}`;
  for (let p3 of t2) {
    let f4 = lo3(p3);
    (e3.important || n3) && Ki(p3);
    let c3 = { kind: "rule", selector: l6, nodes: p3 };
    for (let m2 of e3.variants)
      if (We4(c3, m2, i.variants) === null)
        return [];
    s3.push({ node: c3, propertySort: f4 });
  }
  return s3;
}
function We4(e3, i, r2, t2 = 0) {
  if (i.kind === "arbitrary") {
    if (i.relative && t2 === 0)
      return null;
    e3.nodes = [J3(i.selector, e3.nodes)];
    return;
  }
  let { applyFn: n3 } = r2.get(i.root);
  if (i.kind === "compound") {
    let l6 = B3("@slot");
    if (We4(l6, i.variant, r2, t2 + 1) === null || i.root === "not" && l6.nodes.length > 1)
      return null;
    for (let f4 of l6.nodes)
      if (f4.kind !== "rule" && f4.kind !== "at-rule" || n3(f4, i) === null)
        return null;
    _5(l6.nodes, (f4) => {
      if ((f4.kind === "rule" || f4.kind === "at-rule") && f4.nodes.length <= 0)
        return f4.nodes = e3.nodes, V5.Skip;
    }), e3.nodes = l6.nodes;
    return;
  }
  if (n3(e3, i) === null)
    return null;
}
function Di3(e3) {
  let i = e3.options?.types ?? [];
  return i.length > 1 && i.includes("any");
}
function no3(e3, i) {
  if (e3.kind === "arbitrary") {
    let l6 = e3.value;
    return e3.modifier && (l6 = te4(l6, e3.modifier, i.theme)), l6 === null ? [] : [[o2(e3.property, l6)]];
  }
  let r2 = i.utilities.get(e3.root) ?? [], t2 = [], n3 = r2.filter((l6) => !Di3(l6));
  for (let l6 of n3) {
    if (l6.kind !== e3.kind)
      continue;
    let p3 = l6.compileFn(e3);
    if (p3 !== undefined) {
      if (p3 === null) {
        if (l6.options?.types?.length)
          return t2;
        continue;
      }
      t2.push(p3);
    }
  }
  if (t2.length > 0)
    return t2;
  let s3 = r2.filter((l6) => Di3(l6));
  for (let l6 of s3) {
    if (l6.kind !== e3.kind)
      continue;
    let p3 = l6.compileFn(e3);
    if (p3 !== undefined) {
      if (p3 === null) {
        if (l6.options?.types?.length)
          return t2;
        continue;
      }
      t2.push(p3);
    }
  }
  return t2;
}
function Ki(e3) {
  for (let i of e3)
    i.kind !== "at-root" && (i.kind === "declaration" ? i.important = true : (i.kind === "rule" || i.kind === "at-rule") && Ki(i.nodes));
}
function lo3(e3) {
  let i = new Set, r2 = 0, t2 = e3.slice(), n3 = false;
  for (;t2.length > 0; ) {
    let s3 = t2.shift();
    if (s3.kind === "declaration") {
      if (s3.value === undefined || (r2++, n3))
        continue;
      if (s3.property === "--tw-sort") {
        let p3 = lr3.indexOf(s3.value ?? "");
        if (p3 !== -1) {
          i.add(p3), n3 = true;
          continue;
        }
      }
      let l6 = lr3.indexOf(s3.property);
      l6 !== -1 && i.add(l6);
    } else if (s3.kind === "rule" || s3.kind === "at-rule")
      for (let l6 of s3.nodes)
        t2.push(l6);
  }
  return { order: Array.from(i).sort((s3, l6) => s3 - l6), count: r2 };
}
function Ce3(e3, i) {
  let r2 = 0, t2 = J3("&", e3), n3 = new Set, s3 = new U4(() => new Set), l6 = new U4(() => new Set);
  _5([t2], (d3, u2) => {
    if (d3.kind === "at-rule") {
      if (d3.name === "@keyframes")
        return _5(d3.nodes, (h8) => {
          if (h8.kind === "at-rule" && h8.name === "@apply")
            throw new Error("You cannot use `@apply` inside `@keyframes`.");
        }), V5.Skip;
      if (d3.name === "@utility") {
        let h8 = d3.params.replace(/-\*$/, "");
        l6.get(h8).add(d3), _5(d3.nodes, (v5) => {
          if (!(v5.kind !== "at-rule" || v5.name !== "@apply")) {
            n3.add(d3);
            for (let k4 of Ui2(v5, i))
              s3.get(d3).add(k4);
          }
        });
        return;
      }
      if (d3.name === "@apply") {
        if (u2.parent === null)
          return;
        r2 |= 1, n3.add(u2.parent);
        for (let h8 of Ui2(d3, i))
          for (let v5 of u2.path())
            n3.has(v5) && s3.get(v5).add(h8);
      }
    }
  });
  let p3 = new Set, f4 = [], c3 = new Set;
  function m2(d3, u2 = []) {
    if (!p3.has(d3)) {
      if (c3.has(d3)) {
        let h8 = u2[(u2.indexOf(d3) + 1) % u2.length];
        throw d3.kind === "at-rule" && d3.name === "@utility" && h8.kind === "at-rule" && h8.name === "@utility" && _5(d3.nodes, (v5) => {
          if (v5.kind !== "at-rule" || v5.name !== "@apply")
            return;
          let k4 = v5.params.split(/\s+/g);
          for (let y4 of k4)
            for (let N5 of i.parseCandidate(y4))
              switch (N5.kind) {
                case "arbitrary":
                  break;
                case "static":
                case "functional":
                  if (h8.params.replace(/-\*$/, "") === N5.root)
                    throw new Error(`You cannot \`@apply\` the \`${y4}\` utility here because it creates a circular dependency.`);
                  break;
                default:
              }
        }), new Error(`Circular dependency detected:

${ae2([d3])}
Relies on:

${ae2([h8])}`);
      }
      c3.add(d3);
      for (let h8 of s3.get(d3))
        for (let v5 of l6.get(h8))
          u2.push(d3), m2(v5, u2), u2.pop();
      p3.add(d3), c3.delete(d3), f4.push(d3);
    }
  }
  for (let d3 of n3)
    m2(d3);
  for (let d3 of f4)
    "nodes" in d3 && _5(d3.nodes, (u2) => {
      if (u2.kind !== "at-rule" || u2.name !== "@apply")
        return;
      let h8 = u2.params.split(/(\s+)/g), v5 = {}, k4 = [], y4 = [], N5 = 0;
      for (let [b5, D4] of h8.entries())
        b5 % 2 === 0 && (D4[0] === "-" && D4[1] === "-" ? y4.push(D4) : k4.push(D4), v5[D4] = N5), N5 += D4.length;
      if (y4.length) {
        if (k4.length === 0)
          return V5.Skip;
        let b5 = y4.join(" ");
        throw new Error(`You cannot use \`@apply\` with both mixins and utilities. Please move \`@apply ${b5}\` into a separate rule.`);
      }
      if (u2.nodes.length > 0 && k4.length) {
        let b5 = k4.join(" ");
        throw new Error(`The rule \`@apply ${b5}\` must not have a body.`);
      }
      {
        let b5 = Object.keys(v5), D4 = Ve(b5, i, { respectImportant: false, onInvalidCandidate: (E2) => {
          if (i.theme.prefix && !E2.startsWith(i.theme.prefix))
            throw new Error(`Cannot apply unprefixed utility class \`${E2}\`. Did you mean \`${i.theme.prefix}:${E2}\`?`);
          if (i.invalidCandidates.has(E2))
            throw new Error(`Cannot apply utility class \`${E2}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);
          let j4 = d2(E2, ":");
          if (j4.length > 1) {
            let q4 = j4.pop();
            if (i.candidatesToCss([q4])[0]) {
              let G4 = i.candidatesToCss(j4.map((ie4) => `${ie4}:[--tw-variant-check:1]`)), X4 = j4.filter((ie4, a2) => G4[a2] === null);
              if (X4.length > 0) {
                if (X4.length === 1)
                  throw new Error(`Cannot apply utility class \`${E2}\` because the ${X4.map((ie4) => `\`${ie4}\``)} variant does not exist.`);
                {
                  let ie4 = new Intl.ListFormat("en", { style: "long", type: "conjunction" });
                  throw new Error(`Cannot apply utility class \`${E2}\` because the ${ie4.format(X4.map((a2) => `\`${a2}\``))} variants do not exist.`);
                }
              }
            }
          }
          throw i.theme.size === 0 ? new Error(`Cannot apply unknown utility class \`${E2}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`) : new Error(`Cannot apply unknown utility class \`${E2}\``);
        } }), O5 = u2.src, P4 = D4.astNodes.map((E2) => {
          let j4 = D4.nodeSorting.get(E2)?.candidate, q4 = j4 ? v5[j4] : undefined;
          if (E2 = re3(E2), !O5 || !j4 || q4 === undefined)
            return _5([E2], (X4) => {
              X4.src = O5;
            }), E2;
          let G4 = [O5[0], O5[1], O5[2]];
          return G4[1] += 7 + q4, G4[2] = G4[1] + j4.length, _5([E2], (X4) => {
            X4.src = G4;
          }), E2;
        }), z4 = [];
        for (let E2 of P4)
          if (E2.kind === "rule")
            for (let j4 of E2.nodes)
              z4.push(j4);
          else
            z4.push(E2);
        return V5.Replace(z4);
      }
    });
  return r2;
}
function* Ui2(e3, i) {
  for (let r2 of e3.params.split(/\s+/g))
    for (let t2 of i.parseCandidate(r2))
      switch (t2.kind) {
        case "arbitrary":
          break;
        case "static":
        case "functional":
          yield t2.root;
          break;
        default:
      }
}
async function or4(e3, i, r2, t2 = 0, n3 = false) {
  let s3 = 0, l6 = [];
  return _5(e3, (p3) => {
    if (p3.kind === "at-rule" && (p3.name === "@import" || p3.name === "@reference")) {
      let f4 = oo3(M3(p3.params));
      if (f4 === null)
        return;
      p3.name === "@reference" && (f4.media = "reference"), s3 |= 2;
      let { uri: c3, layer: m2, media: d3, supports: u2 } = f4;
      if (c3.startsWith("data:") || c3.startsWith("http://") || c3.startsWith("https://"))
        return;
      let h8 = he3({}, []);
      return l6.push((async () => {
        if (t2 > 100)
          throw new Error(`Exceeded maximum recursion depth while resolving \`${c3}\` in \`${i}\`)`);
        let v5 = await r2(c3, i), k4 = Se3(v5.content, { from: n3 ? v5.path : undefined });
        await or4(k4, v5.base, r2, t2 + 1, n3), h8.nodes = ao3(p3, [he3({ base: v5.base }, k4)], m2, d3, u2);
      })()), V5.ReplaceSkip(h8);
    }
  }), l6.length > 0 && await Promise.all(l6), s3;
}
function oo3(e3) {
  let i, r2 = null, t2 = null, n3 = null;
  for (let s3 = 0;s3 < e3.length; s3++) {
    let l6 = e3[s3];
    if (l6.kind !== "separator") {
      if (l6.kind === "word" && !i) {
        if (!l6.value || l6.value[0] !== '"' && l6.value[0] !== "'")
          return null;
        i = l6.value.slice(1, -1);
        continue;
      }
      if (l6.kind === "function" && l6.value.toLowerCase() === "url" || !i)
        return null;
      if ((l6.kind === "word" || l6.kind === "function") && l6.value.toLowerCase() === "layer") {
        if (r2)
          return null;
        if (n3)
          throw new Error("`layer(…)` in an `@import` should come before any other functions or conditions");
        "nodes" in l6 ? r2 = F3(l6.nodes) : r2 = "";
        continue;
      }
      if (l6.kind === "function" && l6.value.toLowerCase() === "supports") {
        if (n3)
          return null;
        n3 = F3(l6.nodes);
        continue;
      }
      t2 = F3(e3.slice(s3));
      break;
    }
  }
  return i ? { uri: i, layer: r2, media: t2, supports: n3 } : null;
}
function ao3(e3, i, r2, t2, n3) {
  let s3 = i;
  if (r2 !== null) {
    let l6 = B3("@layer", r2, s3);
    l6.src = e3.src, s3 = [l6];
  }
  if (t2 !== null) {
    let l6 = B3("@media", t2, s3);
    l6.src = e3.src, s3 = [l6];
  }
  if (n3 !== null) {
    let l6 = B3("@supports", n3[0] === "(" ? n3 : `(${n3})`, s3);
    l6.src = e3.src, s3 = [l6];
  }
  return s3;
}
function Be3(e3) {
  if (Object.prototype.toString.call(e3) !== "[object Object]")
    return false;
  let i = Object.getPrototypeOf(e3);
  return i === null || Object.getPrototypeOf(i) === null;
}
function nt3(e3, i, r2, t2 = []) {
  for (let n3 of i)
    if (n3 != null)
      for (let s3 of Reflect.ownKeys(n3)) {
        t2.push(s3);
        let l6 = r2(e3[s3], n3[s3], t2);
        l6 !== undefined ? e3[s3] = l6 : !Be3(e3[s3]) || !Be3(n3[s3]) ? e3[s3] = n3[s3] : e3[s3] = nt3({}, [e3[s3], n3[s3]], r2, t2), t2.pop();
      }
  return e3;
}
function Tt2(e3, i, r2) {
  return function(n3, s3) {
    let l6 = n3.lastIndexOf("/"), p3 = null;
    l6 !== -1 && (p3 = n3.slice(l6 + 1).trim(), n3 = n3.slice(0, l6).trim());
    let f4 = (() => {
      let c3 = Re3(n3), [m2, d3] = so3(e3.theme, c3), u2 = r2(zi2(i() ?? {}, c3) ?? null);
      if (typeof u2 == "string" && (u2 = u2.replace("<alpha-value>", "1")), typeof m2 != "object")
        return typeof d3 != "object" && d3 & 4 ? u2 ?? m2 : m2;
      if (u2 !== null && typeof u2 == "object" && !Array.isArray(u2)) {
        let h8 = nt3({}, [u2], (v5, k4) => k4);
        if (m2 === null && Object.hasOwn(u2, "__CSS_VALUES__")) {
          let v5 = {};
          for (let k4 in u2.__CSS_VALUES__)
            v5[k4] = u2[k4], delete h8[k4];
          m2 = v5;
        }
        for (let v5 in m2)
          v5 !== "__CSS_VALUES__" && (u2?.__CSS_VALUES__?.[v5] & 4 && zi2(h8, v5.split("-")) !== undefined || (h8[a(v5)] = m2[v5]));
        return h8;
      }
      if (Array.isArray(m2) && Array.isArray(d3) && Array.isArray(u2)) {
        let h8 = m2[0], v5 = m2[1];
        d3[0] & 4 && (h8 = u2[0] ?? h8);
        for (let k4 of Object.keys(v5))
          d3[1][k4] & 4 && (v5[k4] = u2[1][k4] ?? v5[k4]);
        return [h8, v5];
      }
      return m2 ?? u2;
    })();
    return p3 && typeof f4 == "string" && (f4 = Q3(f4, p3)), f4 ?? s3;
  };
}
function so3(e3, i) {
  if (i.length === 1 && i[0].startsWith("--"))
    return [e3.get([i[0]]), e3.getOptions(i[0])];
  let r2 = Fe3(i), t2 = new Map, n3 = new U4(() => new Map), s3 = e3.namespace(`--${r2}`);
  if (s3.size === 0)
    return [null, 0];
  let l6 = new Map;
  for (let [m2, d3] of s3) {
    if (!m2 || !m2.includes("--")) {
      t2.set(m2, d3), l6.set(m2, e3.getOptions(m2 ? `--${r2}-${m2}` : `--${r2}`));
      continue;
    }
    let u2 = m2.indexOf("--"), h8 = m2.slice(0, u2), v5 = m2.slice(u2 + 2);
    v5 = v5.replace(/-([a-z])/g, (k4, y4) => y4.toUpperCase()), n3.get(h8 === "" ? null : h8).set(v5, [d3, e3.getOptions(`--${r2}${m2}`)]);
  }
  let p3 = e3.getOptions(`--${r2}`);
  for (let [m2, d3] of n3) {
    let u2 = t2.get(m2);
    if (typeof u2 != "string")
      continue;
    let h8 = {}, v5 = {};
    for (let [k4, [y4, N5]] of d3)
      h8[k4] = y4, v5[k4] = N5;
    t2.set(m2, [u2, h8]), l6.set(m2, [p3, v5]);
  }
  let f4 = {}, c3 = {};
  for (let [m2, d3] of t2)
    Li2(f4, [m2 ?? "DEFAULT"], d3);
  for (let [m2, d3] of l6)
    Li2(c3, [m2 ?? "DEFAULT"], d3);
  return i[i.length - 1] === "DEFAULT" ? [f4?.DEFAULT ?? null, c3.DEFAULT ?? 0] : ("DEFAULT" in f4) && Object.keys(f4).length === 1 ? [f4.DEFAULT, c3.DEFAULT ?? 0] : (f4.__CSS_VALUES__ = c3, [f4, c3]);
}
function zi2(e3, i) {
  for (let r2 = 0;r2 < i.length; ++r2) {
    let t2 = i[r2];
    if (e3 == null || typeof e3 != "object" || !Object.hasOwn(e3, t2)) {
      if (i[r2 + 1] === undefined)
        return;
      i[r2 + 1] = `${t2}-${i[r2 + 1]}`;
      continue;
    }
    e3 = e3[t2];
  }
  return e3;
}
function Li2(e3, i, r2) {
  for (let t2 of i.slice(0, -1))
    e3[t2] === undefined && (e3[t2] = {}), e3 = e3[t2];
  e3[i[i.length - 1]] = r2;
}
function ar3({ designSystem: e3, ast: i, resolvedConfig: r2, featuresRef: t2, referenceMode: n3, src: s3 }) {
  let l6 = { addBase(p3) {
    if (n3)
      return;
    let f4 = we3(p3);
    t2.current |= ze3(f4, e3), t2.current |= Oe3(f4, e3);
    let c3 = B3("@layer", "base", f4);
    _5([c3], (m2) => {
      m2.src = s3;
    }), i.push(c3);
  }, addVariant(p3, f4) {
    if (!$t2.test(p3))
      throw new Error(`\`addVariant('${p3}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes, or underscore characters and start with a lowercase letter or number.`);
    if (typeof f4 == "string") {
      if (f4.includes(":merge("))
        return;
    } else if (Array.isArray(f4)) {
      if (f4.some((m2) => m2.includes(":merge(")))
        return;
    } else if (typeof f4 == "object") {
      let m2 = function(d3, u2) {
        return Object.entries(d3).some(([h8, v5]) => h8.includes(u2) || typeof v5 == "object" && m2(v5, u2));
      };
      var c3 = m2;
      if (m2(f4, ":merge("))
        return;
    }
    typeof f4 == "string" || Array.isArray(f4) ? e3.variants.static(p3, (m2) => {
      m2.nodes = Mi2(f4, m2.nodes);
    }, { compounds: Pe3(typeof f4 == "string" ? [f4] : f4) }) : typeof f4 == "object" && e3.variants.fromAst(p3, we3(f4), e3);
  }, matchVariant(p3, f4, c3) {
    function m2(u2, h8, v5) {
      let k4 = f4(u2, { modifier: h8?.value ?? null });
      return Mi2(k4, v5);
    }
    try {
      let u2 = f4("a", { modifier: null });
      if (typeof u2 == "string" && u2.includes(":merge("))
        return;
      if (Array.isArray(u2) && u2.some((h8) => h8.includes(":merge(")))
        return;
    } catch {}
    let d3 = Object.keys(c3?.values ?? {});
    e3.variants.group(() => {
      e3.variants.functional(p3, (u2, h8) => {
        if (!h8.value) {
          if (c3?.values && "DEFAULT" in c3.values) {
            u2.nodes = m2(c3.values.DEFAULT, h8.modifier, u2.nodes);
            return;
          }
          return null;
        }
        if (h8.value.kind === "arbitrary")
          u2.nodes = m2(h8.value.value, h8.modifier, u2.nodes);
        else if (h8.value.kind === "named" && c3?.values) {
          if (!Object.hasOwn(c3.values, h8.value.value))
            return null;
          let v5 = c3.values[h8.value.value];
          if (typeof v5 != "string")
            return null;
          u2.nodes = m2(v5, h8.modifier, u2.nodes);
        } else
          return null;
      });
    }, (u2, h8) => {
      if (u2.kind !== "functional" || h8.kind !== "functional")
        return 0;
      let v5 = u2.value ? u2.value.value : "DEFAULT", k4 = h8.value ? h8.value.value : "DEFAULT", y4 = (c3?.values && Object.hasOwn(c3.values, v5) ? c3.values[v5] : undefined) ?? v5, N5 = (c3?.values && Object.hasOwn(c3.values, k4) ? c3.values[k4] : undefined) ?? k4;
      if (c3 && typeof c3.sort == "function")
        return c3.sort({ value: y4, modifier: u2.modifier?.value ?? null }, { value: N5, modifier: h8.modifier?.value ?? null });
      let A3 = d3.indexOf(v5), b5 = d3.indexOf(k4);
      return A3 = A3 === -1 ? d3.length : A3, b5 = b5 === -1 ? d3.length : b5, A3 !== b5 ? A3 - b5 : y4 < N5 ? -1 : 1;
    }), e3.variants.suggest(p3, () => Object.keys(c3?.values ?? {}).filter((u2) => u2 !== "DEFAULT"));
  }, addUtilities(p3) {
    p3 = Array.isArray(p3) ? p3 : [p3];
    let f4 = p3.flatMap((m2) => Object.entries(m2));
    f4 = f4.flatMap(([m2, d3]) => d2(m2, ",").map((u2) => [u2.trim(), d3]));
    let c3 = new U4(() => []);
    for (let [m2, d3] of f4) {
      if (m2.startsWith("@keyframes ")) {
        if (!n3) {
          let v5 = J3(m2, we3(d3));
          _5([v5], (k4) => {
            k4.src = s3;
          }), i.push(v5);
        }
        continue;
      }
      let u2 = Ee4(m2), h8 = false;
      if (_5(u2, (v5) => {
        if (v5.kind === "selector" && v5.value[0] === "." && ji.test(v5.value.slice(1))) {
          let k4 = v5.value;
          v5.value = "&";
          let y4 = ue4(u2), N5 = k4.slice(1), A3 = y4 === "&" ? we3(d3) : [J3(y4, we3(d3))];
          c3.get(N5).push(...A3), h8 = true, v5.value = k4;
          return;
        }
        if (v5.kind === "function" && v5.value === ":not")
          return V5.Skip;
      }), !h8)
        throw new Error(`\`addUtilities({ '${m2}' : … })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`);
    }
    for (let [m2, d3] of c3)
      e3.theme.prefix && _5(d3, (u2) => {
        if (u2.kind === "rule") {
          let h8 = Ee4(u2.selector);
          _5(h8, (v5) => {
            v5.kind === "selector" && v5.value[0] === "." && (v5.value = `.${e3.theme.prefix}\\:${v5.value.slice(1)}`);
          }), u2.selector = ue4(h8);
        }
      }), e3.utilities.static(m2, (u2) => {
        let h8 = d3.map(re3);
        return Fi2(h8, m2, u2.raw), t2.current |= Ce3(h8, e3), h8;
      });
  }, matchUtilities(p3, f4) {
    let c3 = f4?.type ? Array.isArray(f4?.type) ? f4.type : [f4.type] : ["any"];
    for (let [d3, u2] of Object.entries(p3)) {
      let h8 = function({ negative: v5 }) {
        return (k4) => {
          if (k4.value?.kind === "arbitrary" && c3.length > 0 && !c3.includes("any") && (k4.value.dataType && !c3.includes(k4.value.dataType) || !k4.value.dataType && !pe2(k4.value.value, c3)))
            return;
          let y4 = c3.includes("color"), N5 = null, A3 = false;
          {
            let O5 = f4?.values ?? {};
            y4 && (O5 = Object.assign({ inherit: "inherit", transparent: "transparent", current: "currentcolor" }, O5)), k4.value ? k4.value.kind === "arbitrary" ? N5 = k4.value.value : k4.value.fraction && Object.hasOwn(O5, k4.value.fraction) ? (N5 = O5[k4.value.fraction], A3 = true) : Object.hasOwn(O5, k4.value.value) ? N5 = O5[k4.value.value] : O5.__BARE_VALUE__ && (N5 = O5.__BARE_VALUE__(k4.value) ?? null, A3 = (k4.value.fraction !== null && N5?.includes("/")) ?? false) : N5 = O5.DEFAULT ?? null;
          }
          if (N5 === null)
            return;
          let b5;
          {
            let O5 = f4?.modifiers ?? null;
            k4.modifier ? O5 === "any" || k4.modifier.kind === "arbitrary" ? b5 = k4.modifier.value : O5 && Object.hasOwn(O5, k4.modifier.value) ? b5 = O5[k4.modifier.value] : y4 && !Number.isNaN(Number(k4.modifier.value)) ? b5 = `${k4.modifier.value}%` : b5 = null : b5 = null;
          }
          if (k4.modifier && b5 === null && !A3)
            return k4.value?.kind === "arbitrary" ? null : undefined;
          y4 && b5 !== null && (N5 = Q3(N5, b5)), v5 && (N5 = `calc(${N5} * -1)`);
          let D4 = we3(u2(N5, { modifier: b5 }));
          return Fi2(D4, d3, k4.raw), t2.current |= Ce3(D4, e3), D4;
        };
      };
      var m2 = h8;
      if (!ji.test(d3))
        throw new Error(`\`matchUtilities({ '${d3}' : … })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);
      f4?.supportsNegativeValues && e3.utilities.functional(`-${d3}`, h8({ negative: true }), { types: c3 }), e3.utilities.functional(d3, h8({ negative: false }), { types: c3 }), e3.utilities.suggest(d3, () => {
        let v5 = f4?.values ?? {}, k4 = new Set(Object.keys(v5));
        k4.delete("__BARE_VALUE__"), k4.delete("__CSS_VALUES__"), k4.has("DEFAULT") && (k4.delete("DEFAULT"), k4.add(null));
        let y4 = f4?.modifiers ?? {}, N5 = y4 === "any" ? [] : Object.keys(y4);
        return [{ supportsNegative: f4?.supportsNegativeValues ?? false, values: Array.from(k4), modifiers: N5 }];
      });
    }
  }, addComponents(p3, f4) {
    this.addUtilities(p3, f4);
  }, matchComponents(p3, f4) {
    this.matchUtilities(p3, f4);
  }, theme: Tt2(e3, () => r2.theme ?? {}, (p3) => p3), prefix(p3) {
    return p3;
  }, config(p3, f4) {
    let c3 = r2;
    if (!p3)
      return c3;
    let m2 = Re3(p3);
    for (let d3 = 0;d3 < m2.length; ++d3) {
      let u2 = m2[d3];
      if (c3[u2] === undefined)
        return f4;
      c3 = c3[u2];
    }
    return c3 ?? f4;
  } };
  return l6.addComponents = l6.addComponents.bind(l6), l6.matchComponents = l6.matchComponents.bind(l6), l6;
}
function we3(e3) {
  let i = [];
  e3 = Array.isArray(e3) ? e3 : [e3];
  let r2 = e3.flatMap((t2) => Object.entries(t2));
  for (let [t2, n3] of r2)
    if (n3 != null && n3 !== false)
      if (typeof n3 != "object") {
        if (!t2.startsWith("--")) {
          if (n3 === "@slot") {
            i.push(J3(t2, [B3("@slot")]));
            continue;
          }
          t2 = t2.replace(/([A-Z])/g, "-$1").toLowerCase();
        }
        i.push(o2(t2, String(n3)));
      } else if (Array.isArray(n3))
        for (let s3 of n3)
          typeof s3 == "string" ? i.push(o2(t2, s3)) : i.push(J3(t2, we3(s3)));
      else
        i.push(J3(t2, we3(n3)));
  return i;
}
function Mi2(e3, i) {
  return (typeof e3 == "string" ? [e3] : e3).flatMap((t2) => {
    if (t2.trim().endsWith("}")) {
      let n3 = t2.replace("}", "{@slot}}"), s3 = Se3(n3);
      return nr2(s3, i), s3;
    } else
      return J3(t2, i);
  });
}
function Fi2(e3, i, r2) {
  _5(e3, (t2) => {
    if (t2.kind === "rule") {
      let n3 = Ee4(t2.selector);
      _5(n3, (s3) => {
        s3.kind === "selector" && s3.value === `.${i}` && (s3.value = `.${h10(r2)}`);
      }), t2.selector = ue4(n3);
    }
  });
}
function Wi2(e3, i) {
  for (let r2 of uo2(i))
    e3.theme.addKeyframes(r2);
}
function uo2(e3) {
  let i = [];
  if ("keyframes" in e3.theme)
    for (let [r2, t2] of Object.entries(e3.theme.keyframes))
      i.push(B3("@keyframes", r2, we3(t2)));
  return i;
}
function Bi2(e3) {
  return { theme: { ...Ee3, colors: ({ theme: i }) => i("color", {}), extend: { fontSize: ({ theme: i }) => ({ ...i("text", {}) }), boxShadow: ({ theme: i }) => ({ ...i("shadow", {}) }), animation: ({ theme: i }) => ({ ...i("animate", {}) }), aspectRatio: ({ theme: i }) => ({ ...i("aspect", {}) }), borderRadius: ({ theme: i }) => ({ ...i("radius", {}) }), screens: ({ theme: i }) => ({ ...i("breakpoint", {}) }), letterSpacing: ({ theme: i }) => ({ ...i("tracking", {}) }), lineHeight: ({ theme: i }) => ({ ...i("leading", {}) }), transitionDuration: { DEFAULT: e3.get(["--default-transition-duration"]) ?? null }, transitionTimingFunction: { DEFAULT: e3.get(["--default-transition-timing-function"]) ?? null }, maxWidth: ({ theme: i }) => ({ ...i("container", {}) }) } } };
}
function ur3(e3, i) {
  let r2 = { design: e3, configs: [], plugins: [], content: { files: [] }, theme: {}, extend: {}, result: structuredClone(fo2) };
  for (let n3 of i)
    sr3(r2, n3);
  for (let n3 of r2.configs)
    "darkMode" in n3 && n3.darkMode !== undefined && (r2.result.darkMode = n3.darkMode ?? null), "prefix" in n3 && n3.prefix !== undefined && (r2.result.prefix = n3.prefix ?? ""), "blocklist" in n3 && n3.blocklist !== undefined && (r2.result.blocklist = n3.blocklist ?? []), "important" in n3 && n3.important !== undefined && (r2.result.important = n3.important ?? false);
  let t2 = po2(r2);
  return { resolvedConfig: { ...r2.result, content: r2.content, theme: r2.theme, plugins: r2.plugins }, replacedThemeKeys: t2 };
}
function co3(e3, i) {
  if (Array.isArray(e3) && Be3(e3[0]))
    return e3.concat(i);
  if (Array.isArray(i) && Be3(i[0]) && Be3(e3))
    return [e3, ...i];
  if (Array.isArray(i))
    return i;
}
function sr3(e3, { config: i, base: r2, path: t2, reference: n3, src: s3 }) {
  let l6 = [];
  for (let c3 of i.plugins ?? [])
    "__isOptionsFunction" in c3 ? l6.push({ ...c3(), reference: n3, src: s3 }) : ("handler" in c3) ? l6.push({ ...c3, reference: n3, src: s3 }) : l6.push({ handler: c3, reference: n3, src: s3 });
  if (Array.isArray(i.presets) && i.presets.length === 0)
    throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");
  for (let c3 of i.presets ?? [])
    sr3(e3, { path: t2, base: r2, config: c3, reference: n3, src: s3 });
  for (let c3 of l6)
    e3.plugins.push(c3), c3.config && sr3(e3, { path: t2, base: r2, config: c3.config, reference: !!c3.reference, src: c3.src ?? s3 });
  let p3 = i.content ?? [], f4 = Array.isArray(p3) ? p3 : p3.files;
  for (let c3 of f4)
    e3.content.files.push(typeof c3 == "object" ? c3 : { base: r2, pattern: c3 });
  e3.configs.push(i);
}
function po2(e3) {
  let i = new Set, r2 = Tt2(e3.design, () => e3.theme, n3), t2 = Object.assign(r2, { theme: r2, colors: l4 });
  function n3(s3) {
    return typeof s3 == "function" ? s3(t2) ?? null : s3 ?? null;
  }
  for (let s3 of e3.configs) {
    let l6 = s3.theme ?? {}, p3 = l6.extend ?? {};
    for (let f4 in l6)
      f4 !== "extend" && i.add(f4);
    Object.assign(e3.theme, l6);
    for (let f4 in p3)
      e3.extend[f4] ??= [], e3.extend[f4].push(p3[f4]);
  }
  delete e3.theme.extend;
  for (let s3 in e3.extend) {
    let l6 = [e3.theme[s3], ...e3.extend[s3]];
    e3.theme[s3] = () => {
      let p3 = l6.map(n3);
      return nt3({}, p3, co3);
    };
  }
  for (let s3 in e3.theme)
    e3.theme[s3] = n3(e3.theme[s3]);
  if (e3.theme.screens && typeof e3.theme.screens == "object")
    for (let s3 of Object.keys(e3.theme.screens)) {
      let l6 = e3.theme.screens[s3];
      l6 && typeof l6 == "object" && (("raw" in l6) || ("max" in l6) || ("min" in l6) && (e3.theme.screens[s3] = l6.min));
    }
  return i;
}
function Yi2(e3, i) {
  let r2 = e3.theme.container || {};
  if (typeof r2 != "object" || r2 === null)
    return;
  let t2 = mo2(r2, i);
  t2.length !== 0 && i.utilities.static("container", () => t2.map(re3));
}
function mo2({ center: e3, padding: i, screens: r2 }, t2) {
  let n3 = [], s3 = null;
  if (e3 && n3.push(o2("margin-inline", "auto")), (typeof i == "string" || typeof i == "object" && i !== null && ("DEFAULT" in i)) && n3.push(o2("padding-inline", typeof i == "string" ? i : i.DEFAULT)), typeof r2 == "object" && r2 !== null) {
    s3 = new Map;
    let l6 = Array.from(t2.theme.namespace("--breakpoint").entries());
    if (l6.sort((p3, f4) => Te2(p3[1], f4[1], "asc")), l6.length > 0) {
      let [p3] = l6[0];
      n3.push(B3("@media", `(width >= --theme(--breakpoint-${p3}))`, [o2("max-width", "none")]));
    }
    for (let [p3, f4] of Object.entries(r2)) {
      if (typeof f4 == "object")
        if ("min" in f4)
          f4 = f4.min;
        else
          continue;
      s3.set(p3, B3("@media", `(width >= ${f4})`, [o2("max-width", f4)]));
    }
  }
  if (typeof i == "object" && i !== null) {
    let l6 = Object.entries(i).filter(([p3]) => p3 !== "DEFAULT").map(([p3, f4]) => [p3, t2.theme.resolveValue(p3, ["--breakpoint"]), f4]).filter(Boolean);
    l6.sort((p3, f4) => Te2(p3[1], f4[1], "asc"));
    for (let [p3, , f4] of l6)
      if (s3 && s3.has(p3))
        s3.get(p3).nodes.push(o2("padding-inline", f4));
      else {
        if (s3)
          continue;
        n3.push(B3("@media", `(width >= theme(--breakpoint-${p3}))`, [o2("padding-inline", f4)]));
      }
  }
  if (s3)
    for (let [, l6] of s3)
      n3.push(l6);
  return n3;
}
function Gi2({ addVariant: e3, config: i }) {
  let r2 = i("darkMode", null), [t2, n3 = ".dark"] = Array.isArray(r2) ? r2 : [r2];
  if (t2 === "variant") {
    let s3;
    if (Array.isArray(n3) || typeof n3 == "function" ? s3 = n3 : typeof n3 == "string" && (s3 = [n3]), Array.isArray(s3))
      for (let l6 of s3)
        l6 === ".dark" ? (t2 = false, console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')) : l6.includes("&") || (t2 = false, console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));
    n3 = s3;
  }
  t2 === null || (t2 === "selector" ? e3("dark", `&:where(${n3}, ${n3} *)`) : t2 === "media" ? e3("dark", "@media (prefers-color-scheme: dark)") : t2 === "variant" ? e3("dark", n3) : t2 === "class" && e3("dark", `&:is(${n3} *)`));
}
function qi2(e3) {
  for (let [r2, t2] of [["t", "top"], ["tr", "top right"], ["r", "right"], ["br", "bottom right"], ["b", "bottom"], ["bl", "bottom left"], ["l", "left"], ["tl", "top left"]])
    e3.utilities.suggest(`bg-gradient-to-${r2}`, () => []), e3.utilities.static(`bg-gradient-to-${r2}`, () => [o2("--tw-gradient-position", `to ${t2} in oklab`), o2("background-image", "linear-gradient(var(--tw-gradient-stops))")]);
  e3.utilities.suggest("bg-left-top", () => []), e3.utilities.static("bg-left-top", () => [o2("background-position", "left top")]), e3.utilities.suggest("bg-right-top", () => []), e3.utilities.static("bg-right-top", () => [o2("background-position", "right top")]), e3.utilities.suggest("bg-left-bottom", () => []), e3.utilities.static("bg-left-bottom", () => [o2("background-position", "left bottom")]), e3.utilities.suggest("bg-right-bottom", () => []), e3.utilities.static("bg-right-bottom", () => [o2("background-position", "right bottom")]), e3.utilities.suggest("object-left-top", () => []), e3.utilities.static("object-left-top", () => [o2("object-position", "left top")]), e3.utilities.suggest("object-right-top", () => []), e3.utilities.static("object-right-top", () => [o2("object-position", "right top")]), e3.utilities.suggest("object-left-bottom", () => []), e3.utilities.static("object-left-bottom", () => [o2("object-position", "left bottom")]), e3.utilities.suggest("object-right-bottom", () => []), e3.utilities.static("object-right-bottom", () => [o2("object-position", "right bottom")]), e3.utilities.suggest("max-w-screen", () => []), e3.utilities.functional("max-w-screen", (r2) => {
    if (!r2.value || r2.value.kind === "arbitrary")
      return;
    let t2 = e3.theme.resolve(r2.value.value, ["--breakpoint"]);
    if (t2)
      return [o2("max-width", t2)];
  }), e3.utilities.suggest("overflow-ellipsis", () => []), e3.utilities.static("overflow-ellipsis", () => [o2("text-overflow", "ellipsis")]), e3.utilities.suggest("decoration-slice", () => []), e3.utilities.static("decoration-slice", () => [o2("-webkit-box-decoration-break", "slice"), o2("box-decoration-break", "slice")]), e3.utilities.suggest("decoration-clone", () => []), e3.utilities.static("decoration-clone", () => [o2("-webkit-box-decoration-break", "clone"), o2("box-decoration-break", "clone")]), e3.utilities.suggest("flex-shrink", () => []), e3.utilities.functional("flex-shrink", (r2) => {
    if (!r2.modifier) {
      if (!r2.value)
        return [o2("flex-shrink", "1")];
      if (r2.value.kind === "arbitrary")
        return [o2("flex-shrink", r2.value.value)];
      if (u(r2.value.value))
        return [o2("flex-shrink", r2.value.value)];
    }
  }), e3.utilities.suggest("flex-grow", () => []), e3.utilities.functional("flex-grow", (r2) => {
    if (!r2.modifier) {
      if (!r2.value)
        return [o2("flex-grow", "1")];
      if (r2.value.kind === "arbitrary")
        return [o2("flex-grow", r2.value.value)];
      if (u(r2.value.value))
        return [o2("flex-grow", r2.value.value)];
    }
  }), e3.utilities.suggest("order-none", () => []), e3.utilities.static("order-none", () => [o2("order", "0")]), e3.utilities.suggest("break-words", () => []), e3.utilities.static("break-words", () => [o2("overflow-wrap", "break-word")]);
  for (let [r2, t2] of [["start", "inset-inline-start"], ["end", "inset-inline-end"]]) {
    let n3 = function({ negative: s3 }) {
      return (l6) => {
        if (l6.value === null)
          return;
        if (l6.value.kind === "arbitrary") {
          if (l6.modifier)
            return;
          let f4 = l6.value.value;
          return [o2(t2, s3 ? `calc(${f4} * -1)` : f4)];
        }
        let p3 = e3.theme.resolve(l6.value.fraction ?? l6.value.value, ["--inset", "--spacing"]);
        if (p3 === null && l6.value.fraction) {
          let [f4, c3] = d2(l6.value.fraction, "/");
          if (!u(f4) || !u(c3))
            return;
          p3 = `calc(${l6.value.fraction} * 100%)`;
        }
        if (p3 === null && s3) {
          let f4 = e3.theme.resolve(null, ["--spacing"]);
          if (f4 && ue3(l6.value.value) && (p3 = `calc(${f4} * -${l6.value.value})`, p3 !== null))
            return [o2(t2, p3)];
        }
        if (p3 === null) {
          let f4 = e3.theme.resolve(null, ["--spacing"]);
          f4 && ue3(l6.value.value) && (p3 = `calc(${f4} * ${l6.value.value})`);
        }
        if (p3 !== null)
          return [o2(t2, s3 ? `calc(${p3} * -1)` : p3)];
      };
    };
    var i = n3;
    e3.utilities.static(`${r2}-auto`, () => [o2(t2, "auto")]), e3.utilities.static(`${r2}-full`, () => [o2(t2, "100%")]), e3.utilities.static(`-${r2}-full`, () => [o2(t2, "-100%")]), e3.utilities.static(`${r2}-px`, () => [o2(t2, "1px")]), e3.utilities.static(`-${r2}-px`, () => [o2(t2, "-1px")]), e3.utilities.functional(`-${r2}`, n3({ negative: true })), e3.utilities.functional(r2, n3({ negative: false }));
  }
}
function Hi2(e3, i) {
  let r2 = e3.theme.screens || {}, t2 = i.variants.get("min")?.order ?? 0, n3 = [];
  for (let [l6, p3] of Object.entries(r2)) {
    let u2 = function(h8) {
      i.variants.static(l6, (v5) => {
        v5.nodes = [B3("@media", d3, v5.nodes)];
      }, { order: h8 });
    };
    var s3 = u2;
    let f4 = i.variants.get(l6), c3 = i.theme.resolveValue(l6, ["--breakpoint"]);
    if (f4 && c3 && !i.theme.hasDefault(`--breakpoint-${l6}`))
      continue;
    let m2 = true;
    typeof p3 == "string" && (m2 = false);
    let d3 = go2(p3);
    m2 ? n3.push(u2) : u2(t2);
  }
  if (n3.length !== 0) {
    for (let [, l6] of i.variants.variants)
      l6.order > t2 && (l6.order += n3.length);
    i.variants.compareFns = new Map(Array.from(i.variants.compareFns).map(([l6, p3]) => (l6 > t2 && (l6 += n3.length), [l6, p3])));
    for (let [l6, p3] of n3.entries())
      p3(t2 + l6 + 1);
  }
}
function go2(e3) {
  return (Array.isArray(e3) ? e3 : [e3]).map((r2) => typeof r2 == "string" ? { min: r2 } : r2 && typeof r2 == "object" ? r2 : null).map((r2) => {
    if (r2 === null)
      return null;
    if ("raw" in r2)
      return r2.raw;
    let t2 = "";
    return r2.max !== undefined && (t2 += `${r2.max} >= `), t2 += "width", r2.min !== undefined && (t2 += ` >= ${r2.min}`), `(${t2})`;
  }).filter(Boolean).join(", ");
}
function Zi2(e3, i) {
  let r2 = e3.theme.aria || {}, t2 = e3.theme.supports || {}, n3 = e3.theme.data || {};
  if (Object.keys(r2).length > 0) {
    let s3 = i.variants.get("aria"), l6 = s3?.applyFn, p3 = s3?.compounds;
    i.variants.functional("aria", (f4, c3) => {
      let m2 = c3.value;
      return m2 && m2.kind === "named" && m2.value in r2 ? l6?.(f4, { ...c3, value: { kind: "arbitrary", value: r2[m2.value] } }) : l6?.(f4, c3);
    }, { compounds: p3 });
  }
  if (Object.keys(t2).length > 0) {
    let s3 = i.variants.get("supports"), l6 = s3?.applyFn, p3 = s3?.compounds;
    i.variants.functional("supports", (f4, c3) => {
      let m2 = c3.value;
      return m2 && m2.kind === "named" && m2.value in t2 ? l6?.(f4, { ...c3, value: { kind: "arbitrary", value: t2[m2.value] } }) : l6?.(f4, c3);
    }, { compounds: p3 });
  }
  if (Object.keys(n3).length > 0) {
    let s3 = i.variants.get("data"), l6 = s3?.applyFn, p3 = s3?.compounds;
    i.variants.functional("data", (f4, c3) => {
      let m2 = c3.value;
      return m2 && m2.kind === "named" && m2.value in n3 ? l6?.(f4, { ...c3, value: { kind: "arbitrary", value: n3[m2.value] } }) : l6?.(f4, c3);
    }, { compounds: p3 });
  }
}
async function Qi2({ designSystem: e3, base: i, ast: r2, loadModule: t2, sources: n3 }) {
  let s3 = 0, l6 = [], p3 = [];
  _5(r2, (d3, u2) => {
    if (d3.kind !== "at-rule")
      return;
    let h8 = Qe3(u2);
    if (d3.name === "@plugin") {
      if (h8.parent !== null)
        throw new Error("`@plugin` cannot be nested.");
      let v5 = d3.params.slice(1, -1);
      if (v5.length === 0)
        throw new Error("`@plugin` must have a path.");
      let k4 = {};
      for (let y4 of d3.nodes ?? []) {
        if (y4.kind !== "declaration")
          throw new Error(`Unexpected \`@plugin\` option:

${ae2([y4])}

\`@plugin\` options must be a flat list of declarations.`);
        if (y4.value === undefined)
          continue;
        let N5 = y4.value, A3 = d2(N5, ",").map((b5) => {
          if (b5 = b5.trim(), b5 === "null")
            return null;
          if (b5 === "true")
            return true;
          if (b5 === "false")
            return false;
          if (Number.isNaN(Number(b5))) {
            if (b5[0] === '"' && b5[b5.length - 1] === '"' || b5[0] === "'" && b5[b5.length - 1] === "'")
              return b5.slice(1, -1);
            if (b5[0] === "{" && b5[b5.length - 1] === "}")
              throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ae2([y4]).trim()}\` is not supported.

Using an object as a plugin option is currently only supported in JavaScript configuration files.`);
          } else
            return Number(b5);
          return b5;
        });
        k4[y4.property] = A3.length === 1 ? A3[0] : A3;
      }
      return l6.push([{ id: v5, base: h8.context.base, reference: !!h8.context.reference, src: d3.src }, Object.keys(k4).length > 0 ? k4 : null]), s3 |= 4, V5.Replace([]);
    }
    if (d3.name === "@config") {
      if (d3.nodes.length > 0)
        throw new Error("`@config` cannot have a body.");
      if (h8.parent !== null)
        throw new Error("`@config` cannot be nested.");
      return p3.push({ id: d3.params.slice(1, -1), base: h8.context.base, reference: !!h8.context.reference, src: d3.src }), s3 |= 4, V5.Replace([]);
    }
  }), qi2(e3);
  let f4 = e3.resolveThemeValue;
  if (e3.resolveThemeValue = function(u2, h8) {
    return u2.startsWith("--") ? f4(u2, h8) : (s3 |= Ji2({ designSystem: e3, base: i, ast: r2, sources: n3, configs: [], pluginDetails: [] }), e3.resolveThemeValue(u2, h8));
  }, !l6.length && !p3.length)
    return 0;
  let [c3, m2] = await Promise.all([Promise.all(p3.map(async ({ id: d3, base: u2, reference: h8, src: v5 }) => {
    let k4 = await t2(d3, u2, "config");
    return { path: d3, base: k4.base, config: k4.module, reference: h8, src: v5 };
  })), Promise.all(l6.map(async ([{ id: d3, base: u2, reference: h8, src: v5 }, k4]) => {
    let y4 = await t2(d3, u2, "plugin");
    return { path: d3, base: y4.base, plugin: y4.module, options: k4, reference: h8, src: v5 };
  }))]);
  return s3 |= Ji2({ designSystem: e3, base: i, ast: r2, sources: n3, configs: c3, pluginDetails: m2 }), s3;
}
function Ji2({ designSystem: e3, base: i, ast: r2, sources: t2, configs: n3, pluginDetails: s3 }) {
  let l6 = 0, f4 = [...s3.map((k4) => {
    if (!k4.options)
      return { config: { plugins: [k4.plugin] }, base: k4.base, reference: k4.reference, src: k4.src };
    if ("__isOptionsFunction" in k4.plugin)
      return { config: { plugins: [k4.plugin(k4.options)] }, base: k4.base, reference: k4.reference, src: k4.src };
    throw new Error(`The plugin "${k4.path}" does not accept options`);
  }), ...n3], { resolvedConfig: c3 } = ur3(e3, [{ config: Bi2(e3.theme), base: i, reference: true, src: undefined }, ...f4, { config: { plugins: [Gi2] }, base: i, reference: true, src: undefined }]), { resolvedConfig: m2, replacedThemeKeys: d3 } = ur3(e3, f4), u2 = { designSystem: e3, ast: r2, resolvedConfig: c3, featuresRef: { set current(k4) {
    l6 |= k4;
  } } }, h8 = ar3({ ...u2, referenceMode: false, src: undefined }), v5 = e3.resolveThemeValue;
  e3.resolveThemeValue = function(y4, N5) {
    if (y4[0] === "-" && y4[1] === "-")
      return v5(y4, N5);
    let A3 = h8.theme(y4, undefined);
    if (Array.isArray(A3) && A3.length === 2)
      return A3[0];
    if (Array.isArray(A3))
      return A3.join(", ");
    if (typeof A3 == "object" && A3 !== null && "DEFAULT" in A3)
      return A3.DEFAULT;
    if (typeof A3 == "string")
      return A3;
  };
  for (let { handler: k4, reference: y4, src: N5 } of c3.plugins) {
    let A3 = ar3({ ...u2, referenceMode: y4 ?? false, src: N5 });
    k4(A3);
  }
  if (Zr3(e3, m2, d3), Wi2(e3, m2), Zi2(m2, e3), Hi2(m2, e3), Yi2(m2, e3), !e3.theme.prefix && c3.prefix) {
    if (c3.prefix.endsWith("-") && (c3.prefix = c3.prefix.slice(0, -1), console.warn(`The prefix "${c3.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)), !ho2.test(c3.prefix))
      throw new Error(`The prefix "${c3.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);
    e3.theme.prefix = c3.prefix;
  }
  if (!e3.important && c3.important === true && (e3.important = true), typeof c3.important == "string") {
    let k4 = c3.important;
    _5(r2, (y4, N5) => {
      if (y4.kind !== "at-rule" || y4.name !== "@tailwind" || y4.params !== "utilities")
        return;
      let A3 = Qe3(N5);
      return A3.parent?.kind === "rule" && A3.parent.selector === k4 ? V5.Stop : V5.ReplaceStop(H4(k4, [y4]));
    });
  }
  for (let k4 of c3.blocklist)
    e3.invalidCandidates.add(k4);
  for (let k4 of c3.content.files) {
    if ("raw" in k4)
      throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:

${JSON.stringify(k4, null, 2)}

This feature is not currently supported.`);
    let y4 = false;
    k4.pattern[0] == "!" && (y4 = true, k4.pattern = k4.pattern.slice(1)), t2.push({ ...k4, negated: y4 });
  }
  return l6;
}
function Xi({ ast: e3 }) {
  let i = new U4((n3) => at3(n3.code)), r2 = new U4((n3) => ({ url: n3.file, content: n3.code, ignore: false })), t2 = { file: null, sources: [], mappings: [] };
  _5(e3, (n3) => {
    if (!n3.src || !n3.dst)
      return;
    let s3 = r2.get(n3.src[0]);
    if (!s3.content)
      return;
    let l6 = i.get(n3.src[0]), p3 = i.get(n3.dst[0]), f4 = s3.content.slice(n3.src[1], n3.src[2]), c3 = 0;
    for (let u2 of f4.split(`
`)) {
      if (u2.trim() !== "") {
        let h8 = l6.find(n3.src[1] + c3), v5 = p3.find(n3.dst[1]);
        t2.mappings.push({ name: null, originalPosition: { source: s3, ...h8 }, generatedPosition: v5 });
      }
      c3 += u2.length, c3 += 1;
    }
    let m2 = l6.find(n3.src[2]), d3 = p3.find(n3.dst[2]);
    t2.mappings.push({ name: null, originalPosition: { source: s3, ...m2 }, generatedPosition: d3 });
  });
  for (let n3 of i.keys())
    t2.sources.push(r2.get(n3));
  return t2.mappings.sort((n3, s3) => n3.generatedPosition.line - s3.generatedPosition.line || n3.generatedPosition.column - s3.generatedPosition.column || (n3.originalPosition?.line ?? 0) - (s3.originalPosition?.line ?? 0) || (n3.originalPosition?.column ?? 0) - (s3.originalPosition?.column ?? 0)), t2;
}
function Nt2(e3) {
  let i = e3.indexOf("{");
  if (i === -1)
    return [e3];
  let r2 = [], t2 = e3.slice(0, i), n3 = e3.slice(i), s3 = 0, l6 = n3.lastIndexOf("}");
  for (let d3 = 0;d3 < n3.length; d3++) {
    let u2 = n3[d3];
    if (u2 === "{")
      s3++;
    else if (u2 === "}" && (s3--, s3 === 0)) {
      l6 = d3;
      break;
    }
  }
  if (l6 === -1)
    throw new Error(`The pattern \`${e3}\` is not balanced.`);
  let p3 = n3.slice(1, l6), f4 = n3.slice(l6 + 1), c3;
  vo2(p3) ? c3 = wo2(p3) : c3 = d2(p3, ","), c3 = c3.flatMap((d3) => Nt2(d3));
  let m2 = Nt2(f4);
  for (let d3 of m2)
    for (let u2 of c3)
      r2.push(t2 + u2 + d3);
  return r2;
}
function vo2(e3) {
  return en3.test(e3);
}
function wo2(e3) {
  let i = e3.match(en3);
  if (!i)
    return [e3];
  let [, r2, t2, n3] = i, s3 = n3 ? parseInt(n3, 10) : undefined, l6 = [];
  if (/^-?\d+$/.test(r2) && /^-?\d+$/.test(t2)) {
    let p3 = parseInt(r2, 10), f4 = parseInt(t2, 10);
    if (s3 === undefined && (s3 = p3 <= f4 ? 1 : -1), s3 === 0)
      throw new Error("Step cannot be zero in sequence expansion.");
    let c3 = p3 < f4;
    c3 && s3 < 0 && (s3 = -s3), !c3 && s3 > 0 && (s3 = -s3);
    for (let m2 = p3;c3 ? m2 <= f4 : m2 >= f4; m2 += s3)
      l6.push(m2.toString());
  }
  return l6;
}
function tn3(e3, i) {
  let r2 = new Set, t2 = new Set, n3 = [];
  function s3(l6, p3 = []) {
    if (e3.has(l6) && !r2.has(l6)) {
      t2.has(l6) && i.onCircularDependency?.(p3, l6), t2.add(l6);
      for (let f4 of e3.get(l6) ?? [])
        p3.push(l6), s3(f4, p3), p3.pop();
      r2.add(l6), t2.delete(l6), n3.push(l6);
    }
  }
  for (let l6 of e3.keys())
    s3(l6);
  return n3;
}
function bo2() {
  throw new Error("No `loadModule` function provided to `compile`");
}
function yo2() {
  throw new Error("No `loadStylesheet` function provided to `compile`");
}
function xo2(e3) {
  let i = 0, r2 = null;
  for (let t2 of d2(e3, " "))
    t2 === "reference" ? i |= 2 : t2 === "inline" ? i |= 1 : t2 === "default" ? i |= 4 : t2 === "static" ? i |= 8 : t2.startsWith("prefix(") && t2.endsWith(")") && (r2 = t2.slice(7, -1));
  return [i, r2];
}
async function rn3(e3, { base: i = "", from: r2, loadModule: t2 = bo2, loadStylesheet: n3 = yo2 } = {}) {
  let s3 = 0;
  e3 = [he3({ base: i }, e3)], s3 |= await or4(e3, i, n3, 0, r2 !== undefined);
  let l6 = null, p3 = new p2, f4 = new Map, c3 = new Map, m2 = [], d3 = null, u2 = null, h8 = [], v5 = [], k4 = [], y4 = [], N5 = null;
  _5(e3, (b5, D4) => {
    if (b5.kind !== "at-rule")
      return;
    let O5 = Qe3(D4);
    if (b5.name === "@tailwind" && (b5.params === "utilities" || b5.params.startsWith("utilities"))) {
      if (u2 !== null)
        return V5.Replace([]);
      if (O5.context.reference)
        return V5.Replace([]);
      let P4 = d2(b5.params, " ");
      for (let z4 of P4)
        if (z4.startsWith("source(")) {
          let E2 = z4.slice(7, -1);
          if (E2 === "none") {
            N5 = E2;
            continue;
          }
          if (E2[0] === '"' && E2[E2.length - 1] !== '"' || E2[0] === "'" && E2[E2.length - 1] !== "'" || E2[0] !== "'" && E2[0] !== '"')
            throw new Error("`source(…)` paths must be quoted.");
          N5 = { base: O5.context.sourceBase ?? O5.context.base, pattern: E2.slice(1, -1) };
        }
      u2 = b5, s3 |= 16;
    }
    if (b5.name === "@utility") {
      if (O5.parent !== null)
        throw new Error("`@utility` cannot be nested.");
      if (b5.nodes.length === 0)
        throw new Error(`\`@utility ${b5.params}\` is empty. Utilities should include at least one property.`);
      let P4 = Wr3(b5);
      if (P4 === null) {
        if (!b5.params.endsWith("-*")) {
          if (b5.params.endsWith("*"))
            throw new Error(`\`@utility ${b5.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);
          if (b5.params.includes("*"))
            throw new Error(`\`@utility ${b5.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`);
        }
        throw new Error(`\`@utility ${b5.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`);
      }
      m2.push(P4);
    }
    if (b5.name === "@source") {
      if (b5.nodes.length > 0)
        throw new Error("`@source` cannot have a body.");
      if (O5.parent !== null)
        throw new Error("`@source` cannot be nested.");
      let P4 = false, z4 = false, E2 = b5.params;
      if (E2[0] === "n" && E2.startsWith("not ") && (P4 = true, E2 = E2.slice(4)), E2[0] === "i" && E2.startsWith("inline(") && (z4 = true, E2 = E2.slice(7, -1).trim()), E2[0] === '"' && E2[E2.length - 1] !== '"' || E2[0] === "'" && E2[E2.length - 1] !== "'" || E2[0] !== "'" && E2[0] !== '"')
        throw new Error("`@source` paths must be quoted.");
      let j4 = E2.slice(1, -1);
      if (z4) {
        let q4 = P4 ? y4 : k4, G4 = d2(j4, " ");
        for (let X4 of G4)
          for (let ie4 of Nt2(X4))
            q4.push(ie4);
      } else
        v5.push({ base: O5.context.base, pattern: j4, negated: P4 });
      return V5.ReplaceSkip([]);
    }
    if (b5.name === "@variant" && (O5.parent === null ? b5.nodes.length === 0 ? b5.name = "@custom-variant" : (_5(b5.nodes, (P4) => {
      if (P4.kind === "at-rule" && P4.name === "@slot")
        return b5.name = "@custom-variant", V5.Stop;
    }), b5.name === "@variant" && h8.push(b5)) : h8.push(b5)), b5.name === "@custom-variant") {
      if (O5.parent !== null)
        throw new Error("`@custom-variant` cannot be nested.");
      let [P4, z4] = d2(b5.params, " ");
      if (!$t2.test(P4))
        throw new Error(`\`@custom-variant ${P4}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes, or underscore characters and start with a lowercase letter or number.`);
      if (b5.nodes.length > 0 && z4)
        throw new Error(`\`@custom-variant ${P4}\` cannot have both a selector and a body.`);
      if (b5.nodes.length === 0) {
        if (!z4)
          throw new Error(`\`@custom-variant ${P4}\` has no selector or body.`);
        let E2 = d2(z4.slice(1, -1), ",");
        if (E2.length === 0 || E2.some((G4) => G4.trim() === ""))
          throw new Error(`\`@custom-variant ${P4} (${E2.join(",")})\` selector is invalid.`);
        let j4 = [], q4 = [];
        for (let G4 of E2)
          G4 = G4.trim(), G4[0] === "@" ? j4.push(G4) : q4.push(G4);
        f4.set(P4, (G4) => {
          G4.variants.static(P4, (X4) => {
            let ie4 = [];
            q4.length > 0 && ie4.push(H4(q4.join(", "), X4.nodes));
            for (let a2 of j4)
              ie4.push(J3(a2, X4.nodes));
            X4.nodes = ie4;
          }, { compounds: Pe3([...q4, ...j4]) });
        }), c3.set(P4, new Set);
      } else {
        let E2 = new Set;
        _5(b5.nodes, (j4) => {
          j4.kind === "at-rule" && j4.name === "@variant" && E2.add(j4.params);
        }), f4.set(P4, (j4) => {
          j4.variants.fromAst(P4, b5.nodes, j4);
        }), c3.set(P4, E2);
      }
      return V5.ReplaceSkip([]);
    }
    if (b5.name === "@media") {
      let P4 = d2(b5.params, " "), z4 = [];
      for (let E2 of P4)
        if (E2.startsWith("source(")) {
          let j4 = E2.slice(7, -1);
          _5(b5.nodes, (q4) => {
            if (q4.kind === "at-rule" && q4.name === "@tailwind" && q4.params === "utilities")
              return q4.params += ` source(${j4})`, V5.ReplaceStop([he3({ sourceBase: O5.context.base }, [q4])]);
          });
        } else if (E2.startsWith("theme(")) {
          let j4 = E2.slice(6, -1), q4 = j4.includes("reference");
          _5(b5.nodes, (G4) => {
            if (G4.kind !== "context") {
              if (G4.kind !== "at-rule") {
                if (q4)
                  throw new Error('Files imported with `@import "…" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "…";` instead.');
                return V5.Continue;
              }
              if (G4.name === "@theme")
                return G4.params += " " + j4, V5.Skip;
            }
          });
        } else if (E2.startsWith("prefix(")) {
          let j4 = E2.slice(7, -1);
          _5(b5.nodes, (q4) => {
            if (q4.kind === "at-rule" && q4.name === "@theme")
              return q4.params += ` prefix(${j4})`, V5.Skip;
          });
        } else
          E2 === "important" ? l6 = true : E2 === "reference" ? b5.nodes = [he3({ reference: true }, b5.nodes)] : z4.push(E2);
      if (z4.length > 0)
        b5.params = z4.join(" ");
      else if (P4.length > 0)
        return V5.Replace(b5.nodes);
      return V5.Continue;
    }
    if (b5.name === "@theme") {
      let [P4, z4] = xo2(b5.params);
      if (s3 |= 64, O5.context.reference && (P4 |= 2), z4) {
        if (!ko2.test(z4))
          throw new Error(`The prefix "${z4}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);
        p3.prefix = z4;
      }
      return _5(b5.nodes, (E2) => {
        if (E2.kind === "at-rule" && E2.name === "@keyframes")
          return p3.addKeyframes(E2), V5.Skip;
        if (E2.kind === "comment")
          return;
        if (E2.kind === "declaration" && E2.property.startsWith("--")) {
          p3.add(a(E2.property), E2.value ?? "", P4, E2.src);
          return;
        }
        let j4 = ae2([B3(b5.name, b5.params, [E2])]).split(`
`).map((q4, G4, X4) => `${G4 === 0 || G4 >= X4.length - 2 ? " " : ">"} ${q4}`).join(`
`);
        throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`.

${j4}`);
      }), d3 ? V5.ReplaceSkip([]) : (d3 = H4(":root, :host", []), d3.src = b5.src, V5.ReplaceSkip(d3));
    }
  });
  let A3 = _i2(p3, u2?.src);
  if (l6 && (A3.important = l6), y4.length > 0)
    for (let b5 of y4)
      A3.invalidCandidates.add(b5);
  s3 |= await Qi2({ designSystem: A3, base: i, ast: e3, loadModule: t2, sources: v5 });
  for (let b5 of f4.keys())
    A3.variants.static(b5, () => {});
  for (let b5 of tn3(c3, { onCircularDependency(D4, O5) {
    let P4 = ae2(D4.map((z4, E2) => B3("@custom-variant", z4, [B3("@variant", D4[E2 + 1] ?? O5, [])]))).replaceAll(";", " { … }").replace(`@custom-variant ${O5} {`, `@custom-variant ${O5} { /* ← */`);
    throw new Error(`Circular dependency detected in custom variants:

${P4}`);
  } }))
    f4.get(b5)?.(A3);
  for (let b5 of m2)
    b5(A3);
  if (d3) {
    let b5 = [];
    for (let [O5, P4] of A3.theme.entries()) {
      if (P4.options & 2)
        continue;
      let z4 = o2(h10(O5), P4.value);
      z4.src = P4.src, b5.push(z4);
    }
    let D4 = A3.theme.getKeyframes();
    for (let O5 of D4)
      e3.push(he3({ theme: true }, [Y4([O5])]));
    d3.nodes = [he3({ theme: true }, b5)];
  }
  if (s3 |= Oe3(e3, A3), s3 |= ze3(e3, A3), s3 |= Ce3(e3, A3), u2) {
    let b5 = u2;
    b5.kind = "context", b5.context = {};
  }
  return _5(e3, (b5) => {
    if (b5.kind === "at-rule")
      return b5.name === "@utility" ? V5.Replace([]) : V5.Skip;
  }), { designSystem: A3, ast: e3, sources: v5, root: N5, utilitiesNode: u2, features: s3, inlineCandidates: k4 };
}
async function Ao2(e3, i = {}) {
  let { designSystem: r2, ast: t2, sources: n3, root: s3, utilitiesNode: l6, features: p3, inlineCandidates: f4 } = await rn3(e3, i);
  t2.unshift(pt3(`! tailwindcss v${mr3} | MIT License | https://tailwindcss.com `));
  function c3(v5) {
    r2.invalidCandidates.add(v5);
  }
  let m2 = new Set, d3 = null, u2 = 0, h8 = false;
  for (let v5 of f4)
    r2.invalidCandidates.has(v5) || (m2.add(v5), h8 = true);
  return { sources: n3, root: s3, features: p3, build(v5) {
    if (p3 === 0)
      return e3;
    if (!l6)
      return d3 ??= $e2(t2, r2, i.polyfills), d3;
    let k4 = h8, y4 = false;
    h8 = false;
    let N5 = m2.size;
    for (let b5 of v5)
      if (!r2.invalidCandidates.has(b5))
        if (b5[0] === "-" && b5[1] === "-") {
          let D4 = r2.theme.markUsedVariable(b5);
          k4 ||= D4, y4 ||= D4;
        } else
          m2.add(b5), k4 ||= m2.size !== N5;
    if (!k4)
      return d3 ??= $e2(t2, r2, i.polyfills), d3;
    let A3 = Ve(m2, r2, { onInvalidCandidate: c3 }).astNodes;
    return i.from && _5(A3, (b5) => {
      b5.src ??= l6.src;
    }), !y4 && u2 === A3.length ? (d3 ??= $e2(t2, r2, i.polyfills), d3) : (u2 = A3.length, l6.nodes = A3, d3 = $e2(t2, r2, i.polyfills), d3);
  } };
}
async function Ef(e3, i = {}) {
  let r2 = Se3(e3, { from: i.from }), t2 = await Ao2(r2, i), n3 = r2, s3 = e3;
  return { ...t2, build(l6) {
    let p3 = t2.build(l6);
    return p3 === n3 || (s3 = ae2(p3, !!i.from), n3 = p3), s3;
  }, buildSourceMap() {
    return Xi({ ast: n3 });
  } };
}
var mr3 = "4.3.1", Ge2 = 92, st3 = 47, ut3 = 42, gr3 = 34, hr4 = 39, ln2 = 58, ft3 = 59, de4 = 10, ct3 = 13, qe3 = 32, He2 = 9, vr3 = 123, Pt2 = 125, It3 = 40, wr3 = 41, on3 = 91, an3 = 93, kr3 = 45, Ot2 = 64, sn3 = 33, me3, U4, yr3 = 92, cn2 = 41, xr3 = 58, Ar3 = 44, pn3 = 34, Cr3 = 61, Vr3 = 62, Sr3 = 60, $r3 = 10, dn3 = 40, mn3 = 39, gn3 = 47, Tr3 = 32, Nr3 = 9, Kt2, V5, hn3 = 64, Lt2, kn3 = 58, Or2 = 45, _r3 = 97, Ir2 = 122, Ft3, bn3, yn3, An3, Vn3, le2, Sn3, $n3, Tn3, Nn3, wt2, Bt2 = class {
  utilities = new U4(() => []);
  completions = new Map;
  static(i, r2) {
    this.utilities.get(i).push({ kind: "static", compileFn: r2 });
  }
  functional(i, r2, t2) {
    this.utilities.get(i).push({ kind: "functional", compileFn: r2, options: t2 });
  }
  has(i, r2) {
    return this.utilities.has(i) && this.utilities.get(i).some((t2) => t2.kind === r2);
  }
  get(i) {
    return this.utilities.has(i) ? this.utilities.get(i) : [];
  }
  getCompletions(i) {
    return this.has(i, "static") ? this.completions.get(i)?.() ?? [{ supportsNegative: false, values: [], modifiers: [] }] : this.completions.get(i)?.() ?? [];
  }
  suggest(i, r2) {
    let t2 = this.completions.get(i);
    t2 ? this.completions.set(i, () => [...t2?.(), ...r2?.()]) : this.completions.set(i, r2);
  }
  keys(i) {
    let r2 = [];
    for (let [t2, n3] of this.utilities.entries())
      for (let s3 of n3)
        if (s3.kind === i) {
          r2.push(t2);
          break;
        }
    return r2;
  }
}, Mr3, Yt2, Br3, En3 = 37, Rn3 = 47, Pn3 = 46, On3 = 97, _n3 = 122, In3 = 65, Dn3 = 90, ht2 = 48, vt2 = 57, Kn3 = 95, Un3 = 45, Gt2, Yr3, Zn3, Jn3, Qn2, Xr3, ei3, ti3, li3 = 92, ll2 = 93, oi3 = 41, ai3 = 58, si3 = 44, ol2 = 34, al2 = 46, ui3 = 62, Ht3 = 10, sl2 = 35, fi3 = 91, ci3 = 40, pi2 = 43, ul2 = 39, Zt3 = 32, Jt3 = 9, di2 = 126, fl2 = 38, cl2 = 42, ki2, it3, bi2, yi2, kl2, xi2, yl2, Ai2, Al2, er3, At2, Vi2 = 1536, El2, Il, Dl, ve3, tr3, Ct3, rr3, St2, Ti2, ro3, $t2, ir3 = class {
  compareFns = new Map;
  variants = new Map;
  completions = new Map;
  groupOrder = null;
  lastOrder = 0;
  static(i, r2, { compounds: t2, order: n3 } = {}) {
    this.set(i, { kind: "static", applyFn: r2, compoundsWith: 0, compounds: t2 ?? 2, order: n3 });
  }
  fromAst(i, r2, t2) {
    let n3 = [], s3 = false;
    _5(r2, (l6) => {
      l6.kind === "rule" ? n3.push(l6.selector) : l6.kind === "at-rule" && l6.name === "@variant" ? s3 = true : l6.kind === "at-rule" && l6.name !== "@slot" && n3.push(`${l6.name} ${l6.params}`);
    }), this.static(i, (l6) => {
      let p3 = r2.map(re3);
      s3 && Oe3(p3, t2), nr2(p3, l6.nodes), l6.nodes = p3;
    }, { compounds: Pe3(n3) });
  }
  functional(i, r2, { compounds: t2, order: n3 } = {}) {
    this.set(i, { kind: "functional", applyFn: r2, compoundsWith: 0, compounds: t2 ?? 2, order: n3 });
  }
  compound(i, r2, t2, { compounds: n3, order: s3 } = {}) {
    this.set(i, { kind: "compound", applyFn: t2, compoundsWith: r2, compounds: n3 ?? 2, order: s3 });
  }
  group(i, r2) {
    this.groupOrder = this.nextOrder(), r2 && this.compareFns.set(this.groupOrder, r2), i(), this.groupOrder = null;
  }
  has(i) {
    return this.variants.has(i);
  }
  get(i) {
    return this.variants.get(i);
  }
  kind(i) {
    return this.variants.get(i)?.kind;
  }
  compoundsWith(i, r2) {
    let t2 = this.variants.get(i), n3 = typeof r2 == "string" ? this.variants.get(r2) : r2.kind === "arbitrary" ? { compounds: Pe3([r2.selector]) } : this.variants.get(r2.root);
    return !(!t2 || !n3 || t2.kind !== "compound" || n3.compounds === 0 || t2.compoundsWith === 0 || (t2.compoundsWith & n3.compounds) === 0);
  }
  suggest(i, r2) {
    this.completions.set(i, r2);
  }
  getCompletions(i) {
    return this.completions.get(i)?.() ?? [];
  }
  compare(i, r2) {
    if (i === r2)
      return 0;
    if (i === null)
      return -1;
    if (r2 === null)
      return 1;
    if (i.kind === "arbitrary" && r2.kind === "arbitrary")
      return i.selector < r2.selector ? -1 : 1;
    if (i.kind === "arbitrary")
      return 1;
    if (r2.kind === "arbitrary")
      return -1;
    let t2 = this.variants.get(i.root).order, n3 = this.variants.get(r2.root).order, s3 = t2 - n3;
    if (s3 !== 0)
      return s3;
    if (i.kind === "compound" && r2.kind === "compound") {
      let c3 = this.compare(i.variant, r2.variant);
      return c3 !== 0 ? c3 : i.modifier && r2.modifier ? i.modifier.value < r2.modifier.value ? -1 : 1 : i.modifier ? 1 : r2.modifier ? -1 : 0;
    }
    let l6 = this.compareFns.get(t2);
    if (l6 !== undefined)
      return l6(i, r2);
    if (i.root !== r2.root)
      return i.root < r2.root ? -1 : 1;
    let p3 = i.value, f4 = r2.value;
    return p3 === null ? -1 : f4 === null || p3.kind === "arbitrary" && f4.kind !== "arbitrary" ? 1 : p3.kind !== "arbitrary" && f4.kind === "arbitrary" || p3.value < f4.value ? -1 : 1;
  }
  keys() {
    return this.variants.keys();
  }
  entries() {
    return this.variants.entries();
  }
  set(i, { kind: r2, applyFn: t2, compounds: n3, compoundsWith: s3, order: l6 }) {
    let p3 = this.variants.get(i);
    p3 ? Object.assign(p3, { kind: r2, applyFn: t2, compounds: n3 }) : (l6 === undefined && (this.lastOrder = this.nextOrder(), l6 = this.lastOrder), this.variants.set(i, { kind: r2, applyFn: t2, order: l6, compoundsWith: s3, compounds: n3 }));
  }
  nextOrder() {
    return this.groupOrder ?? this.lastOrder + 1;
  }
}, lr3, ji, fo2, ho2, en3, ko2, Ut3, Le3;
var init_lib = __esm(() => {
  init_chunk_XVOTX5KS();
  init_chunk_X4GG3EDV();
  init_chunk_5JIJA4QV();
  me3 = class e2 extends Error {
    loc;
    constructor(i, r2) {
      if (r2) {
        let t2 = r2[0], n3 = at3(t2.code).find(r2[1]);
        i = `${t2.file}:${n3.line}:${n3.column + 1}: ${i}`;
      }
      super(i), this.name = "CssSyntaxError", this.loc = r2, Error.captureStackTrace && Error.captureStackTrace(this, e2);
    }
  };
  U4 = class extends Map {
    constructor(r2) {
      super();
      this.factory = r2;
    }
    factory;
    get(r2) {
      let t2 = super.get(r2);
      return t2 === undefined && (t2 = this.factory(r2, this), this.set(r2, t2)), t2;
    }
  };
  Kt2 = ((l6) => (l6[l6.Continue = 0] = "Continue", l6[l6.Skip = 1] = "Skip", l6[l6.Stop = 2] = "Stop", l6[l6.Replace = 3] = "Replace", l6[l6.ReplaceSkip = 4] = "ReplaceSkip", l6[l6.ReplaceStop = 5] = "ReplaceStop", l6))(Kt2 || {});
  V5 = { Continue: { kind: 0 }, Skip: { kind: 1 }, Stop: { kind: 2 }, Replace: (e3) => ({ kind: 3, nodes: Array.isArray(e3) ? e3 : [e3] }), ReplaceSkip: (e3) => ({ kind: 4, nodes: Array.isArray(e3) ? e3 : [e3] }), ReplaceStop: (e3) => ({ kind: 5, nodes: Array.isArray(e3) ? e3 : [e3] }) };
  Lt2 = new Uint8Array(256);
  Ft3 = /^[a-zA-Z0-9_.%-]+$/;
  bn3 = new U4((e3) => {
    let i = M3(e3), r2 = new Set, t2 = new Set(["~", ">", "+", "-", "*", "/"]);
    return _5(i, (n3, s3) => {
      if (n3.kind === "word" && t2.has(n3.value)) {
        let l6 = s3.index;
        if (l6 === -1)
          return;
        let p3 = s3.siblings[l6 - 1];
        if (p3?.kind !== "separator" || p3.value !== " ")
          return;
        let f4 = s3.siblings[l6 + 1];
        if (f4?.kind !== "separator" || f4.value !== " ")
          return;
        let c3 = s3.siblings[l6 - 2];
        if (c3 && t2.has(c3.value))
          return;
        let m2 = s3.siblings[l6 + 2];
        if (m2 && t2.has(m2.value))
          return;
        r2.add(p3), r2.add(f4);
      } else if (n3.kind === "separator" && n3.value.length > 0 && n3.value.trim() === "")
        (s3.siblings[0] === n3 || s3.siblings[s3.siblings.length - 1] === n3) && r2.add(n3);
      else if (n3.kind === "separator" && n3.value.trim() === ",")
        n3.value = ",";
      else if (n3.kind === "function" && n3.value.startsWith("--")) {
        let l6 = s3.index;
        if (l6 <= 0)
          return;
        let p3 = s3.siblings[l6 - 1];
        if (p3?.kind === "separator" && p3.value === ",")
          return;
        let f4 = s3.siblings[l6 - 2];
        return f4 && !t2.has(f4.value) ? undefined : V5.ReplaceSkip({ kind: "function", value: "", nodes: [n3] });
      }
    }), r2.size > 0 && _5(i, (n3) => {
      if (r2.has(n3))
        return r2.delete(n3), V5.ReplaceSkip([]);
    }), Mt3(i), F3(i);
  });
  yn3 = new U4((e3) => {
    let i = M3(e3);
    return i.length === 3 && i[0].kind === "word" && i[0].value === "&" && i[1].kind === "separator" && i[1].value === ":" && i[2].kind === "function" && i[2].value === "is" ? F3(i[2].nodes) : e3;
  });
  An3 = new U4((e3) => {
    let i = M3(e3);
    return i.length === 1 && i[0].kind === "function" && i[0].value === "var";
  });
  Vn3 = /^(?<value>[-+]?(?:\d*\.)?\d+)(?<unit>[a-z]+|%)?$/i;
  le2 = new U4((e3) => {
    let i = Vn3.exec(e3);
    if (!i)
      return null;
    let r2 = i.groups?.value;
    if (r2 === undefined)
      return null;
    let t2 = Number(r2);
    if (Number.isNaN(t2))
      return null;
    let n3 = i.groups?.unit;
    return n3 === undefined ? [t2, null] : [t2, n3];
  });
  Sn3 = new Set(["inset", "inherit", "initial", "revert", "unset"]);
  $n3 = new Set(["calc", "clamp", "max", "min", "--spacing"]);
  Tn3 = new Set(["color", "color-mix", "contrast-color", "device-cmyk", "hsl", "hsla", "hwb", "lab", "lch", "light-dark", "oklab", "oklch", "rgb", "rgba", "--alpha"]);
  Nn3 = /^-?(\d+|\.\d+)(.*?)$/;
  wt2 = ["0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "6", "7", "8", "9", "10", "11", "12", "14", "16", "20", "24", "28", "32", "36", "40", "44", "48", "52", "56", "60", "64", "72", "80", "96"];
  Mr3 = /(\d+)_(\d+)/g;
  Yt2 = ["number", "integer", "ratio", "percentage"];
  Br3 = /^-?[a-z][a-zA-Z0-9_-]*/;
  Gt2 = { "--alpha": jn3, "--spacing": Mn3, "--theme": Fn3, theme: Wn3 };
  Yr3 = new RegExp(Object.keys(Gt2).map((e3) => `${e3}\\(`).join("|"));
  Zn3 = { borderWidth: "border-width", outlineWidth: "outline-width", ringColor: "ring-color", ringWidth: "ring-width", transitionDuration: "transition-duration", transitionTimingFunction: "transition-timing-function" };
  Jn3 = { animation: "animate", aspectRatio: "aspect", borderRadius: "radius", boxShadow: "shadow", colors: "color", containers: "container", fontFamily: "font", fontSize: "text", letterSpacing: "tracking", lineHeight: "leading", maxWidth: "container", screens: "breakpoint", transitionTimingFunction: "ease" };
  Qn2 = /^[a-zA-Z0-9-_%/.]+$/;
  Xr3 = { inset: ri3(), margin: Ne3("margin"), padding: Ne3("padding"), "scroll-margin": Ne3("scroll-margin"), "scroll-padding": Ne3("scroll-padding"), "border-width": Ne3("border", "top-width", "right-width", "bottom-width", "left-width"), "border-style": Ne3("border", "top-style", "right-style", "bottom-style", "left-style"), "border-color": Ne3("border", "top-color", "right-color", "bottom-color", "left-color"), gap: se2("row-gap", "column-gap"), overflow: se2("overflow-x", "overflow-y"), "overscroll-behavior": se2("overscroll-behavior-x", "overscroll-behavior-y") };
  ei3 = { "inset-block": se2("top", "bottom"), "inset-inline": se2("left", "right"), "margin-block": se2("margin-top", "margin-bottom"), "margin-inline": se2("margin-left", "margin-right"), "padding-block": se2("padding-top", "padding-bottom"), "padding-inline": se2("padding-left", "padding-right"), "scroll-margin-block": se2("scroll-margin-top", "scroll-margin-bottom"), "scroll-margin-inline": se2("scroll-margin-left", "scroll-margin-right"), "scroll-padding-block": se2("scroll-padding-top", "scroll-padding-bottom"), "scroll-padding-inline": se2("scroll-padding-left", "scroll-padding-right") };
  ti3 = { "border-block": ["border-bottom", "border-top"], "border-block-color": ["border-bottom-color", "border-top-color"], "border-block-style": ["border-bottom-style", "border-top-style"], "border-block-width": ["border-bottom-width", "border-top-width"], "border-inline": ["border-left", "border-right"], "border-inline-color": ["border-left-color", "border-right-color"], "border-inline-style": ["border-left-style", "border-right-style"], "border-inline-width": ["border-left-width", "border-right-width"] };
  ki2 = Symbol();
  it3 = Symbol();
  bi2 = Symbol();
  yi2 = Symbol();
  kl2 = [Sl2, Ml, Fl, zl];
  xi2 = Symbol();
  yl2 = [Cl2, Vl, $l, Wl, Pl, _l2, Ul, Ll2, jl, Bl];
  Ai2 = Symbol();
  Al2 = ["t", "tr", "r", "br", "b", "bl", "l", "tl"];
  er3 = Symbol();
  At2 = Symbol();
  El2 = Vi2 / 16;
  Il = new Map([["order-none", "order-0"], ["break-words", "wrap-break-word"], ["overflow-ellipsis", "text-ellipsis"]]);
  Dl = new Map([[/^(-)?start-(.*?)$/, "$1inset-s-$2"], [/^(-)?end-(.*?)$/, "$1inset-e-$2"]]);
  ve3 = Symbol();
  tr3 = Symbol();
  Ct3 = Symbol();
  rr3 = Symbol();
  St2 = Symbol();
  Ti2 = Symbol();
  ro3 = /^\d+\/\d+$/;
  $t2 = /^@?[a-z0-9][a-zA-Z0-9_-]*(?<![_-])$/;
  lr3 = ["container-type", "pointer-events", "visibility", "position", "inset", "inset-inline", "inset-block", "inset-inline-start", "inset-inline-end", "inset-block-start", "inset-block-end", "top", "right", "bottom", "left", "isolation", "z-index", "order", "grid-column", "grid-column-start", "grid-column-end", "grid-row", "grid-row-start", "grid-row-end", "float", "clear", "--tw-container-component", "margin", "margin-inline", "margin-block", "margin-inline-start", "margin-inline-end", "margin-block-start", "margin-block-end", "margin-top", "margin-right", "margin-bottom", "margin-left", "box-sizing", "display", "field-sizing", "aspect-ratio", "height", "max-height", "min-height", "width", "max-width", "min-width", "flex", "flex-shrink", "flex-grow", "flex-basis", "table-layout", "caption-side", "border-collapse", "border-spacing", "transform-origin", "translate", "--tw-translate-x", "--tw-translate-y", "--tw-translate-z", "scale", "--tw-scale-x", "--tw-scale-y", "--tw-scale-z", "rotate", "--tw-rotate-x", "--tw-rotate-y", "--tw-rotate-z", "--tw-skew-x", "--tw-skew-y", "transform", "zoom", "animation", "cursor", "touch-action", "--tw-pan-x", "--tw-pan-y", "--tw-pinch-zoom", "resize", "scroll-snap-type", "--tw-scroll-snap-strictness", "scroll-snap-align", "scroll-snap-stop", "scroll-margin", "scroll-margin-inline", "scroll-margin-block", "scroll-margin-inline-start", "scroll-margin-inline-end", "scroll-margin-block-start", "scroll-margin-block-end", "scroll-margin-top", "scroll-margin-right", "scroll-margin-bottom", "scroll-margin-left", "scroll-padding", "scroll-padding-inline", "scroll-padding-block", "scroll-padding-inline-start", "scroll-padding-inline-end", "scroll-padding-block-start", "scroll-padding-block-end", "scroll-padding-top", "scroll-padding-right", "scroll-padding-bottom", "scroll-padding-left", "scrollbar-width", "scrollbar-color", "scrollbar-gutter", "list-style-position", "list-style-type", "list-style-image", "appearance", "columns", "break-before", "break-inside", "break-after", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows", "grid-template-columns", "grid-template-rows", "flex-direction", "flex-wrap", "place-content", "place-items", "align-content", "align-items", "justify-content", "justify-items", "gap", "column-gap", "row-gap", "--tw-space-x-reverse", "--tw-space-y-reverse", "divide-x-width", "divide-y-width", "--tw-divide-y-reverse", "divide-style", "divide-color", "place-self", "align-self", "justify-self", "overflow", "overflow-x", "overflow-y", "overscroll-behavior", "overscroll-behavior-x", "overscroll-behavior-y", "scroll-behavior", "border-radius", "border-start-radius", "border-end-radius", "border-top-radius", "border-right-radius", "border-bottom-radius", "border-left-radius", "border-start-start-radius", "border-start-end-radius", "border-end-end-radius", "border-end-start-radius", "border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius", "border-bottom-left-radius", "border-width", "border-inline-width", "border-block-width", "border-inline-start-width", "border-inline-end-width", "border-block-start-width", "border-block-end-width", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-style", "border-inline-style", "border-block-style", "border-inline-start-style", "border-inline-end-style", "border-block-start-style", "border-block-end-style", "border-top-style", "border-right-style", "border-bottom-style", "border-left-style", "border-color", "border-inline-color", "border-block-color", "border-inline-start-color", "border-inline-end-color", "border-block-start-color", "border-block-end-color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "background-color", "background-image", "--tw-gradient-position", "--tw-gradient-stops", "--tw-gradient-via-stops", "--tw-gradient-from", "--tw-gradient-from-position", "--tw-gradient-via", "--tw-gradient-via-position", "--tw-gradient-to", "--tw-gradient-to-position", "mask-image", "--tw-mask-top", "--tw-mask-top-from-color", "--tw-mask-top-from-position", "--tw-mask-top-to-color", "--tw-mask-top-to-position", "--tw-mask-right", "--tw-mask-right-from-color", "--tw-mask-right-from-position", "--tw-mask-right-to-color", "--tw-mask-right-to-position", "--tw-mask-bottom", "--tw-mask-bottom-from-color", "--tw-mask-bottom-from-position", "--tw-mask-bottom-to-color", "--tw-mask-bottom-to-position", "--tw-mask-left", "--tw-mask-left-from-color", "--tw-mask-left-from-position", "--tw-mask-left-to-color", "--tw-mask-left-to-position", "--tw-mask-linear", "--tw-mask-linear-position", "--tw-mask-linear-from-color", "--tw-mask-linear-from-position", "--tw-mask-linear-to-color", "--tw-mask-linear-to-position", "--tw-mask-radial", "--tw-mask-radial-shape", "--tw-mask-radial-size", "--tw-mask-radial-position", "--tw-mask-radial-from-color", "--tw-mask-radial-from-position", "--tw-mask-radial-to-color", "--tw-mask-radial-to-position", "--tw-mask-conic", "--tw-mask-conic-position", "--tw-mask-conic-from-color", "--tw-mask-conic-from-position", "--tw-mask-conic-to-color", "--tw-mask-conic-to-position", "box-decoration-break", "background-size", "background-attachment", "background-clip", "background-position", "background-repeat", "background-origin", "mask-composite", "mask-mode", "mask-type", "mask-size", "mask-clip", "mask-position", "mask-repeat", "mask-origin", "fill", "stroke", "stroke-width", "object-fit", "object-position", "padding", "padding-inline", "padding-block", "padding-inline-start", "padding-inline-end", "padding-block-start", "padding-block-end", "padding-top", "padding-right", "padding-bottom", "padding-left", "text-align", "text-indent", "vertical-align", "font-family", "font-feature-settings", "font-size", "line-height", "font-weight", "letter-spacing", "text-wrap", "overflow-wrap", "word-break", "text-overflow", "hyphens", "white-space", "tab-size", "color", "text-transform", "font-style", "font-stretch", "font-variant-numeric", "text-decoration-line", "text-decoration-color", "text-decoration-style", "text-decoration-thickness", "text-underline-offset", "-webkit-font-smoothing", "placeholder-color", "caret-color", "accent-color", "color-scheme", "opacity", "background-blend-mode", "mix-blend-mode", "box-shadow", "--tw-shadow", "--tw-shadow-color", "--tw-ring-shadow", "--tw-ring-color", "--tw-inset-shadow", "--tw-inset-shadow-color", "--tw-inset-ring-shadow", "--tw-inset-ring-color", "--tw-ring-offset-width", "--tw-ring-offset-color", "outline", "outline-width", "outline-offset", "outline-color", "--tw-blur", "--tw-brightness", "--tw-contrast", "--tw-drop-shadow", "--tw-grayscale", "--tw-hue-rotate", "--tw-invert", "--tw-saturate", "--tw-sepia", "filter", "--tw-backdrop-blur", "--tw-backdrop-brightness", "--tw-backdrop-contrast", "--tw-backdrop-grayscale", "--tw-backdrop-hue-rotate", "--tw-backdrop-invert", "--tw-backdrop-opacity", "--tw-backdrop-saturate", "--tw-backdrop-sepia", "backdrop-filter", "transition-property", "transition-behavior", "transition-delay", "transition-duration", "transition-timing-function", "will-change", "contain", "content", "forced-color-adjust"];
  ji = /^[a-z@][a-zA-Z0-9/%._-]*$/;
  fo2 = { blocklist: [], future: {}, experimental: {}, prefix: "", important: false, darkMode: null, theme: {}, plugins: [], content: { files: [] } };
  ho2 = /^[a-z]+$/;
  en3 = /^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;
  ko2 = /^[a-z]+$/;
  Ut3 = ((n3) => (n3[n3.None = 0] = "None", n3[n3.AtProperty = 1] = "AtProperty", n3[n3.ColorMix = 2] = "ColorMix", n3[n3.All = 3] = "All", n3))(Ut3 || {});
  Le3 = ((f4) => (f4[f4.None = 0] = "None", f4[f4.AtApply = 1] = "AtApply", f4[f4.AtImport = 2] = "AtImport", f4[f4.JsPluginCompat = 4] = "JsPluginCompat", f4[f4.ThemeFunction = 8] = "ThemeFunction", f4[f4.Utilities = 16] = "Utilities", f4[f4.Variants = 32] = "Variants", f4[f4.AtTheme = 64] = "AtTheme", f4))(Le3 || {});
});

// ../../node_modules/.pnpm/@react-email+tailwind@2.0.7_@react-email+body@0.3.0_react@19.2.7__@react-email+button@0_dd5c0be6a61d36676859156551a3ba91/node_modules/@react-email/tailwind/dist/index.mjs
function isDigit(code$1) {
  return code$1 >= 48 && code$1 <= 57;
}
function isHexDigit2(code$1) {
  return isDigit(code$1) || code$1 >= 65 && code$1 <= 70 || code$1 >= 97 && code$1 <= 102;
}
function isUppercaseLetter(code$1) {
  return code$1 >= 65 && code$1 <= 90;
}
function isLowercaseLetter(code$1) {
  return code$1 >= 97 && code$1 <= 122;
}
function isLetter(code$1) {
  return isUppercaseLetter(code$1) || isLowercaseLetter(code$1);
}
function isNonAscii(code$1) {
  return code$1 >= 128;
}
function isNameStart(code$1) {
  return isLetter(code$1) || isNonAscii(code$1) || code$1 === 95;
}
function isName(code$1) {
  return isNameStart(code$1) || isDigit(code$1) || code$1 === 45;
}
function isNonPrintable(code$1) {
  return code$1 >= 0 && code$1 <= 8 || code$1 === 11 || code$1 >= 14 && code$1 <= 31 || code$1 === 127;
}
function isNewline(code$1) {
  return code$1 === 10 || code$1 === 13 || code$1 === 12;
}
function isWhiteSpace(code$1) {
  return isNewline(code$1) || code$1 === 32 || code$1 === 9;
}
function isValidEscape(first, second) {
  if (first !== 92)
    return false;
  if (isNewline(second) || second === EOF)
    return false;
  return true;
}
function isIdentifierStart(first, second, third) {
  if (first === 45)
    return isNameStart(second) || second === 45 || isValidEscape(second, third);
  if (isNameStart(first))
    return true;
  if (first === 92)
    return isValidEscape(first, second);
  return false;
}
function isNumberStart(first, second, third) {
  if (first === 43 || first === 45) {
    if (isDigit(second))
      return 2;
    return second === 46 && isDigit(third) ? 3 : 0;
  }
  if (first === 46)
    return isDigit(second) ? 2 : 0;
  if (isDigit(first))
    return 1;
  return 0;
}
function isBOM(code$1) {
  if (code$1 === 65279)
    return 1;
  if (code$1 === 65534)
    return 1;
  return 0;
}
function charCodeCategory(code$1) {
  return code$1 < 128 ? CATEGORY[code$1] : NameStartCategory;
}
function getCharCode(source, offset) {
  return offset < source.length ? source.charCodeAt(offset) : 0;
}
function getNewlineLength(source, offset, code$1) {
  if (code$1 === 13 && getCharCode(source, offset + 1) === 10)
    return 2;
  return 1;
}
function cmpChar(testStr, offset, referenceCode) {
  let code$1 = testStr.charCodeAt(offset);
  if (isUppercaseLetter(code$1))
    code$1 = code$1 | 32;
  return code$1 === referenceCode;
}
function cmpStr(testStr, start, end, referenceStr) {
  if (end - start !== referenceStr.length)
    return false;
  if (start < 0 || end > testStr.length)
    return false;
  for (let i = start;i < end; i++) {
    const referenceCode = referenceStr.charCodeAt(i - start);
    let testCode = testStr.charCodeAt(i);
    if (isUppercaseLetter(testCode))
      testCode = testCode | 32;
    if (testCode !== referenceCode)
      return false;
  }
  return true;
}
function findWhiteSpaceStart(source, offset) {
  for (;offset >= 0; offset--)
    if (!isWhiteSpace(source.charCodeAt(offset)))
      break;
  return offset + 1;
}
function findWhiteSpaceEnd(source, offset) {
  for (;offset < source.length; offset++)
    if (!isWhiteSpace(source.charCodeAt(offset)))
      break;
  return offset;
}
function findDecimalNumberEnd(source, offset) {
  for (;offset < source.length; offset++)
    if (!isDigit(source.charCodeAt(offset)))
      break;
  return offset;
}
function consumeEscaped(source, offset) {
  offset += 2;
  if (isHexDigit2(getCharCode(source, offset - 1))) {
    for (const maxOffset = Math.min(source.length, offset + 5);offset < maxOffset; offset++)
      if (!isHexDigit2(getCharCode(source, offset)))
        break;
    const code$1 = getCharCode(source, offset);
    if (isWhiteSpace(code$1))
      offset += getNewlineLength(source, offset, code$1);
  }
  return offset;
}
function consumeName(source, offset) {
  for (;offset < source.length; offset++) {
    const code$1 = source.charCodeAt(offset);
    if (isName(code$1))
      continue;
    if (isValidEscape(code$1, getCharCode(source, offset + 1))) {
      offset = consumeEscaped(source, offset) - 1;
      continue;
    }
    break;
  }
  return offset;
}
function consumeNumber(source, offset) {
  let code$1 = source.charCodeAt(offset);
  if (code$1 === 43 || code$1 === 45)
    code$1 = source.charCodeAt(offset += 1);
  if (isDigit(code$1)) {
    offset = findDecimalNumberEnd(source, offset + 1);
    code$1 = source.charCodeAt(offset);
  }
  if (code$1 === 46 && isDigit(source.charCodeAt(offset + 1))) {
    offset += 2;
    offset = findDecimalNumberEnd(source, offset);
  }
  if (cmpChar(source, offset, 101)) {
    let sign = 0;
    code$1 = source.charCodeAt(offset + 1);
    if (code$1 === 45 || code$1 === 43) {
      sign = 1;
      code$1 = source.charCodeAt(offset + 2);
    }
    if (isDigit(code$1))
      offset = findDecimalNumberEnd(source, offset + 1 + sign + 1);
  }
  return offset;
}
function consumeBadUrlRemnants(source, offset) {
  for (;offset < source.length; offset++) {
    const code$1 = source.charCodeAt(offset);
    if (code$1 === 41) {
      offset++;
      break;
    }
    if (isValidEscape(code$1, getCharCode(source, offset + 1)))
      offset = consumeEscaped(source, offset);
  }
  return offset;
}
function decodeEscaped(escaped) {
  if (escaped.length === 1 && !isHexDigit2(escaped.charCodeAt(0)))
    return escaped[0];
  let code$1 = parseInt(escaped, 16);
  if (code$1 === 0 || code$1 >= 55296 && code$1 <= 57343 || code$1 > 1114111)
    code$1 = 65533;
  return String.fromCodePoint(code$1);
}
function adoptBuffer(buffer = null, size) {
  if (buffer === null || buffer.length < size)
    return new Uint32Array(Math.max(size + 1024, MIN_SIZE));
  return buffer;
}
function computeLinesAndColumns(host) {
  const source = host.source;
  const sourceLength = source.length;
  const startOffset = source.length > 0 ? isBOM(source.charCodeAt(0)) : 0;
  const lines = adoptBuffer(host.lines, sourceLength);
  const columns = adoptBuffer(host.columns, sourceLength);
  let line2 = host.startLine;
  let column = host.startColumn;
  for (let i = startOffset;i < sourceLength; i++) {
    const code$1 = source.charCodeAt(i);
    lines[i] = line2;
    columns[i] = column++;
    if (code$1 === N$4 || code$1 === R$2 || code$1 === F$2) {
      if (code$1 === R$2 && i + 1 < sourceLength && source.charCodeAt(i + 1) === N$4) {
        i++;
        lines[i] = line2;
        columns[i] = column;
      }
      line2++;
      column = 1;
    }
  }
  lines[sourceLength] = line2;
  columns[sourceLength] = column;
  host.lines = lines;
  host.columns = columns;
  host.computed = true;
}
function isBlockOpenerToken(tokenType$1) {
  return balancePair$1[tokenType$1] !== 0;
}
function tokenize$1(source, onToken) {
  function getCharCode$1(offset$1) {
    return offset$1 < sourceLength ? source.charCodeAt(offset$1) : 0;
  }
  function consumeNumericToken() {
    offset = consumeNumber(source, offset);
    if (isIdentifierStart(getCharCode$1(offset), getCharCode$1(offset + 1), getCharCode$1(offset + 2))) {
      type2 = Dimension;
      offset = consumeName(source, offset);
      return;
    }
    if (getCharCode$1(offset) === 37) {
      type2 = Percentage;
      offset++;
      return;
    }
    type2 = Number$1;
  }
  function consumeIdentLikeToken() {
    const nameStartOffset = offset;
    offset = consumeName(source, offset);
    if (cmpStr(source, nameStartOffset, offset, "url") && getCharCode$1(offset) === 40) {
      offset = findWhiteSpaceEnd(source, offset + 1);
      if (getCharCode$1(offset) === 34 || getCharCode$1(offset) === 39) {
        type2 = Function2;
        offset = nameStartOffset + 4;
        return;
      }
      consumeUrlToken();
      return;
    }
    if (getCharCode$1(offset) === 40) {
      type2 = Function2;
      offset++;
      return;
    }
    type2 = Ident;
  }
  function consumeStringToken(endingCodePoint) {
    if (!endingCodePoint)
      endingCodePoint = getCharCode$1(offset++);
    type2 = String$1;
    for (;offset < source.length; offset++) {
      const code$1 = source.charCodeAt(offset);
      switch (charCodeCategory(code$1)) {
        case endingCodePoint:
          offset++;
          return;
        case WhiteSpaceCategory:
          if (isNewline(code$1)) {
            offset += getNewlineLength(source, offset, code$1);
            type2 = BadString;
            return;
          }
          break;
        case 92:
          if (offset === source.length - 1)
            break;
          const nextCode = getCharCode$1(offset + 1);
          if (isNewline(nextCode))
            offset += getNewlineLength(source, offset + 1, nextCode);
          else if (isValidEscape(code$1, nextCode))
            offset = consumeEscaped(source, offset) - 1;
          break;
      }
    }
  }
  function consumeUrlToken() {
    type2 = Url;
    offset = findWhiteSpaceEnd(source, offset);
    for (;offset < source.length; offset++) {
      const code$1 = source.charCodeAt(offset);
      switch (charCodeCategory(code$1)) {
        case 41:
          offset++;
          return;
        case WhiteSpaceCategory:
          offset = findWhiteSpaceEnd(source, offset);
          if (getCharCode$1(offset) === 41 || offset >= source.length) {
            if (offset < source.length)
              offset++;
            return;
          }
          offset = consumeBadUrlRemnants(source, offset);
          type2 = BadUrl;
          return;
        case 34:
        case 39:
        case 40:
        case NonPrintableCategory:
          offset = consumeBadUrlRemnants(source, offset);
          type2 = BadUrl;
          return;
        case 92:
          if (isValidEscape(code$1, getCharCode$1(offset + 1))) {
            offset = consumeEscaped(source, offset) - 1;
            break;
          }
          offset = consumeBadUrlRemnants(source, offset);
          type2 = BadUrl;
          return;
      }
    }
  }
  source = String(source || "");
  const sourceLength = source.length;
  let start = isBOM(getCharCode$1(0));
  let offset = start;
  let type2;
  while (offset < sourceLength) {
    const code$1 = source.charCodeAt(offset);
    switch (charCodeCategory(code$1)) {
      case WhiteSpaceCategory:
        type2 = WhiteSpace;
        offset = findWhiteSpaceEnd(source, offset + 1);
        break;
      case 34:
        consumeStringToken();
        break;
      case 35:
        if (isName(getCharCode$1(offset + 1)) || isValidEscape(getCharCode$1(offset + 1), getCharCode$1(offset + 2))) {
          type2 = Hash;
          offset = consumeName(source, offset + 1);
        } else {
          type2 = Delim;
          offset++;
        }
        break;
      case 39:
        consumeStringToken();
        break;
      case 40:
        type2 = LeftParenthesis;
        offset++;
        break;
      case 41:
        type2 = RightParenthesis;
        offset++;
        break;
      case 43:
        if (isNumberStart(code$1, getCharCode$1(offset + 1), getCharCode$1(offset + 2)))
          consumeNumericToken();
        else {
          type2 = Delim;
          offset++;
        }
        break;
      case 44:
        type2 = Comma;
        offset++;
        break;
      case 45:
        if (isNumberStart(code$1, getCharCode$1(offset + 1), getCharCode$1(offset + 2)))
          consumeNumericToken();
        else if (getCharCode$1(offset + 1) === 45 && getCharCode$1(offset + 2) === 62) {
          type2 = CDC;
          offset = offset + 3;
        } else if (isIdentifierStart(code$1, getCharCode$1(offset + 1), getCharCode$1(offset + 2)))
          consumeIdentLikeToken();
        else {
          type2 = Delim;
          offset++;
        }
        break;
      case 46:
        if (isNumberStart(code$1, getCharCode$1(offset + 1), getCharCode$1(offset + 2)))
          consumeNumericToken();
        else {
          type2 = Delim;
          offset++;
        }
        break;
      case 47:
        if (getCharCode$1(offset + 1) === 42) {
          type2 = Comment3;
          offset = source.indexOf("*/", offset + 2);
          offset = offset === -1 ? source.length : offset + 2;
        } else {
          type2 = Delim;
          offset++;
        }
        break;
      case 58:
        type2 = Colon;
        offset++;
        break;
      case 59:
        type2 = Semicolon;
        offset++;
        break;
      case 60:
        if (getCharCode$1(offset + 1) === 33 && getCharCode$1(offset + 2) === 45 && getCharCode$1(offset + 3) === 45) {
          type2 = CDO;
          offset = offset + 4;
        } else {
          type2 = Delim;
          offset++;
        }
        break;
      case 64:
        if (isIdentifierStart(getCharCode$1(offset + 1), getCharCode$1(offset + 2), getCharCode$1(offset + 3))) {
          type2 = AtKeyword;
          offset = consumeName(source, offset + 1);
        } else {
          type2 = Delim;
          offset++;
        }
        break;
      case 91:
        type2 = LeftSquareBracket;
        offset++;
        break;
      case 92:
        if (isValidEscape(code$1, getCharCode$1(offset + 1)))
          consumeIdentLikeToken();
        else {
          type2 = Delim;
          offset++;
        }
        break;
      case 93:
        type2 = RightSquareBracket;
        offset++;
        break;
      case 123:
        type2 = LeftCurlyBracket;
        offset++;
        break;
      case 125:
        type2 = RightCurlyBracket;
        offset++;
        break;
      case DigitCategory:
        consumeNumericToken();
        break;
      case NameStartCategory:
        consumeIdentLikeToken();
        break;
      default:
        type2 = Delim;
        offset++;
    }
    onToken(type2, start, start = offset);
  }
}
function createCustomError(name$49, message) {
  const error49 = Object.create(SyntaxError.prototype);
  const errorStack = /* @__PURE__ */ new Error;
  return Object.assign(error49, {
    name: name$49,
    message,
    get stack() {
      return (errorStack.stack || "").replace(/^(.+\n){1,3}/, `${name$49}: ${message}
`);
    }
  });
}
function sourceFragment({ source, line: line2, column, baseLine, baseColumn }, extraLines) {
  function processLines(start, end) {
    return lines.slice(start, end).map((line$1, idx) => String(start + idx + 1).padStart(maxNumLength) + " |" + line$1).join(`
`);
  }
  const lines = (`
`.repeat(Math.max(baseLine - 1, 0)) + " ".repeat(Math.max(baseColumn - 1, 0)) + source).split(/\r\n?|\n|\f/);
  const startLine = Math.max(1, line2 - extraLines) - 1;
  const endLine = Math.min(line2 + extraLines, lines.length + 1);
  const maxNumLength = Math.max(4, String(endLine).length) + 1;
  let cutLeft = 0;
  column += 3 * (lines[line2 - 1].substr(0, column - 1).match(/\t/g) || []).length;
  if (column > MAX_LINE_LENGTH) {
    cutLeft = column - OFFSET_CORRECTION + 3;
    column = OFFSET_CORRECTION - 2;
  }
  for (let i = startLine;i <= endLine; i++)
    if (i >= 0 && i < lines.length) {
      lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT);
      lines[i] = (cutLeft > 0 && lines[i].length > cutLeft ? "…" : "") + lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) + (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? "…" : "");
    }
  return [
    processLines(startLine, line2),
    new Array(column + maxNumLength + 2).join("-") + "^",
    processLines(line2, endLine)
  ].filter(Boolean).join(`
`).replace(/^(\s+\d+\s+\|\n)+/, "").replace(/\n(\s+\d+\s+\|)+$/, "");
}
function SyntaxError$2(message, source, offset, line2, column, baseLine = 1, baseColumn = 1) {
  return Object.assign(createCustomError("SyntaxError", message), {
    source,
    offset,
    line: line2,
    column,
    sourceFragment(extraLines) {
      return sourceFragment({
        source,
        line: line2,
        column,
        baseLine,
        baseColumn
      }, isNaN(extraLines) ? 0 : extraLines);
    },
    get formattedMessage() {
      return `Parse error: ${message}
` + sourceFragment({
        source,
        line: line2,
        column,
        baseLine,
        baseColumn
      }, 2);
    }
  });
}
function readSequence(recognizer) {
  const children = this.createList();
  let space = false;
  const context10 = { recognizer };
  while (!this.eof) {
    switch (this.tokenType) {
      case Comment3:
        this.next();
        continue;
      case WhiteSpace:
        space = true;
        this.next();
        continue;
    }
    let child = recognizer.getNode.call(this, context10);
    if (child === undefined)
      break;
    if (space) {
      if (recognizer.onWhiteSpace)
        recognizer.onWhiteSpace.call(this, child, children, context10);
      space = false;
    }
    children.push(child);
  }
  if (space && recognizer.onWhiteSpace)
    recognizer.onWhiteSpace.call(this, null, children, context10);
  return children;
}
function createParseContext(name$49) {
  return function() {
    return this[name$49]();
  };
}
function fetchParseValues(dict) {
  const result = Object.create(null);
  for (const name$49 of Object.keys(dict)) {
    const item = dict[name$49];
    const fn3 = item.parse || item;
    if (fn3)
      result[name$49] = fn3;
  }
  return result;
}
function processConfig(config2) {
  const parseConfig = {
    context: Object.create(null),
    features: Object.assign(Object.create(null), config2.features),
    scope: Object.assign(Object.create(null), config2.scope),
    atrule: fetchParseValues(config2.atrule),
    pseudo: fetchParseValues(config2.pseudo),
    node: fetchParseValues(config2.node)
  };
  for (const [name$49, context10] of Object.entries(config2.parseContext))
    switch (typeof context10) {
      case "function":
        parseConfig.context[name$49] = context10;
        break;
      case "string":
        parseConfig.context[name$49] = createParseContext(context10);
        break;
    }
  return {
    config: parseConfig,
    ...parseConfig,
    ...parseConfig.node
  };
}
function createParser(config2) {
  let source = "";
  let filename = "<unknown>";
  let needPositions = false;
  let onParseError = NOOP;
  let onParseErrorThrow = false;
  const locationMap = new OffsetToLocation;
  const parser2 = Object.assign(new TokenStream, processConfig(config2 || {}), {
    parseAtrulePrelude: true,
    parseRulePrelude: true,
    parseValue: true,
    parseCustomProperty: false,
    readSequence,
    consumeUntilBalanceEnd: () => 0,
    consumeUntilLeftCurlyBracket(code$1) {
      return code$1 === LEFTCURLYBRACKET$1 ? 1 : 0;
    },
    consumeUntilLeftCurlyBracketOrSemicolon(code$1) {
      return code$1 === LEFTCURLYBRACKET$1 || code$1 === SEMICOLON ? 1 : 0;
    },
    consumeUntilExclamationMarkOrSemicolon(code$1) {
      return code$1 === EXCLAMATIONMARK$3 || code$1 === SEMICOLON ? 1 : 0;
    },
    consumeUntilSemicolonIncluded(code$1) {
      return code$1 === SEMICOLON ? 2 : 0;
    },
    createList() {
      return new List;
    },
    createSingleNodeList(node3) {
      return new List().appendData(node3);
    },
    getFirstListNode(list2) {
      return list2 && list2.first;
    },
    getLastListNode(list2) {
      return list2 && list2.last;
    },
    parseWithFallback(consumer, fallback) {
      const startIndex = this.tokenIndex;
      try {
        return consumer.call(this);
      } catch (e3) {
        if (onParseErrorThrow)
          throw e3;
        this.skip(startIndex - this.tokenIndex);
        const fallbackNode = fallback.call(this);
        onParseErrorThrow = true;
        onParseError(e3, fallbackNode);
        onParseErrorThrow = false;
        return fallbackNode;
      }
    },
    lookupNonWSType(offset) {
      let type2;
      do {
        type2 = this.lookupType(offset++);
        if (type2 !== WhiteSpace && type2 !== Comment3)
          return type2;
      } while (type2 !== NULL);
      return NULL;
    },
    charCodeAt(offset) {
      return offset >= 0 && offset < source.length ? source.charCodeAt(offset) : 0;
    },
    substring(offsetStart, offsetEnd) {
      return source.substring(offsetStart, offsetEnd);
    },
    substrToCursor(start) {
      return this.source.substring(start, this.tokenStart);
    },
    cmpChar(offset, charCode) {
      return cmpChar(source, offset, charCode);
    },
    cmpStr(offsetStart, offsetEnd, str) {
      return cmpStr(source, offsetStart, offsetEnd, str);
    },
    consume(tokenType$1) {
      const start = this.tokenStart;
      this.eat(tokenType$1);
      return this.substrToCursor(start);
    },
    consumeFunctionName() {
      const name$49 = source.substring(this.tokenStart, this.tokenEnd - 1);
      this.eat(Function2);
      return name$49;
    },
    consumeNumber(type2) {
      const number$1 = source.substring(this.tokenStart, consumeNumber(source, this.tokenStart));
      this.eat(type2);
      return number$1;
    },
    eat(tokenType$1) {
      if (this.tokenType !== tokenType$1) {
        const tokenName = names_default[tokenType$1].slice(0, -6).replace(/-/g, " ").replace(/^./, (m2) => m2.toUpperCase());
        let message = `${/[[\](){}]/.test(tokenName) ? `"${tokenName}"` : tokenName} is expected`;
        let offset = this.tokenStart;
        switch (tokenType$1) {
          case Ident:
            if (this.tokenType === Function2 || this.tokenType === Url) {
              offset = this.tokenEnd - 1;
              message = "Identifier is expected but function found";
            } else
              message = "Identifier is expected";
            break;
          case Hash:
            if (this.isDelim(NUMBERSIGN$4)) {
              this.next();
              offset++;
              message = "Name is expected";
            }
            break;
          case Percentage:
            if (this.tokenType === Number$1) {
              offset = this.tokenEnd;
              message = "Percent sign is expected";
            }
            break;
        }
        this.error(message, offset);
      }
      this.next();
    },
    eatIdent(name$49) {
      if (this.tokenType !== Ident || this.lookupValue(0, name$49) === false)
        this.error(`Identifier "${name$49}" is expected`);
      this.next();
    },
    eatDelim(code$1) {
      if (!this.isDelim(code$1))
        this.error(`Delim "${String.fromCharCode(code$1)}" is expected`);
      this.next();
    },
    getLocation(start, end) {
      if (needPositions)
        return locationMap.getLocationRange(start, end, filename);
      return null;
    },
    getLocationFromList(list2) {
      if (needPositions) {
        const head = this.getFirstListNode(list2);
        const tail = this.getLastListNode(list2);
        return locationMap.getLocationRange(head !== null ? head.loc.start.offset - locationMap.startOffset : this.tokenStart, tail !== null ? tail.loc.end.offset - locationMap.startOffset : this.tokenStart, filename);
      }
      return null;
    },
    error(message, offset) {
      const location = typeof offset !== "undefined" && offset < source.length ? locationMap.getLocation(offset) : this.eof ? locationMap.getLocation(findWhiteSpaceStart(source, source.length - 1)) : locationMap.getLocation(this.tokenStart);
      throw new SyntaxError$2(message || "Unexpected input", source, location.offset, location.line, location.column, locationMap.startLine, locationMap.startColumn);
    }
  });
  const parse$51 = function(source_, options2) {
    source = source_;
    options2 = options2 || {};
    parser2.setSource(source, tokenize$1);
    locationMap.setSource(source, options2.offset, options2.line, options2.column);
    filename = options2.filename || "<unknown>";
    needPositions = Boolean(options2.positions);
    onParseError = typeof options2.onParseError === "function" ? options2.onParseError : NOOP;
    onParseErrorThrow = false;
    parser2.parseAtrulePrelude = "parseAtrulePrelude" in options2 ? Boolean(options2.parseAtrulePrelude) : true;
    parser2.parseRulePrelude = "parseRulePrelude" in options2 ? Boolean(options2.parseRulePrelude) : true;
    parser2.parseValue = "parseValue" in options2 ? Boolean(options2.parseValue) : true;
    parser2.parseCustomProperty = "parseCustomProperty" in options2 ? Boolean(options2.parseCustomProperty) : false;
    const { context: context10 = "default", onComment } = options2;
    if (context10 in parser2.context === false)
      throw new Error("Unknown context `" + context10 + "`");
    if (typeof onComment === "function")
      parser2.forEachToken((type2, start, end) => {
        if (type2 === Comment3) {
          const loc = parser2.getLocation(start, end);
          onComment(cmpStr(source, end - 2, end, "*/") ? source.slice(start + 2, end - 2) : source.slice(start + 2, end), loc);
        }
      });
    const ast = parser2.context[context10].call(parser2, options2);
    if (!parser2.eof)
      parser2.error();
    return ast;
  };
  return Object.assign(parse$51, {
    SyntaxError: SyntaxError$2,
    config: parser2.config
  });
}
function generateSourceMap(handlers2) {
  const map3 = new import_source_map_generator.SourceMapGenerator;
  const generated = {
    line: 1,
    column: 0
  };
  const original = {
    line: 0,
    column: 0
  };
  const activatedGenerated = {
    line: 1,
    column: 0
  };
  const activatedMapping = { generated: activatedGenerated };
  let line2 = 1;
  let column = 0;
  let sourceMappingActive = false;
  const origHandlersNode = handlers2.node;
  handlers2.node = function(node3) {
    if (node3.loc && node3.loc.start && trackNodes.has(node3.type)) {
      const nodeLine = node3.loc.start.line;
      const nodeColumn = node3.loc.start.column - 1;
      if (original.line !== nodeLine || original.column !== nodeColumn) {
        original.line = nodeLine;
        original.column = nodeColumn;
        generated.line = line2;
        generated.column = column;
        if (sourceMappingActive) {
          sourceMappingActive = false;
          if (generated.line !== activatedGenerated.line || generated.column !== activatedGenerated.column)
            map3.addMapping(activatedMapping);
        }
        sourceMappingActive = true;
        map3.addMapping({
          source: node3.loc.source,
          original,
          generated
        });
      }
    }
    origHandlersNode.call(this, node3);
    if (sourceMappingActive && trackNodes.has(node3.type)) {
      activatedGenerated.line = line2;
      activatedGenerated.column = column;
    }
  };
  const origHandlersEmit = handlers2.emit;
  handlers2.emit = function(value, type2, auto) {
    for (let i = 0;i < value.length; i++)
      if (value.charCodeAt(i) === 10) {
        line2++;
        column = 0;
      } else
        column++;
    origHandlersEmit(value, type2, auto);
  };
  const origHandlersResult = handlers2.result;
  handlers2.result = function() {
    if (sourceMappingActive)
      map3.addMapping(activatedMapping);
    return {
      css: origHandlersResult(),
      map: map3
    };
  };
  return handlers2;
}
function createMap(pairs) {
  const isWhiteSpaceRequired = new Set(pairs.map(([prev, next]) => code(prev) << 16 | code(next)));
  return function(prevCode, type2, value) {
    const nextCode = code(type2, value);
    const nextCharCode = value.charCodeAt(0);
    if (nextCharCode === HYPHENMINUS$6 && type2 !== Ident && type2 !== Function2 && type2 !== CDC || nextCharCode === PLUSSIGN$9 ? isWhiteSpaceRequired.has(prevCode << 16 | nextCharCode << 8) : isWhiteSpaceRequired.has(prevCode << 16 | nextCode))
      this.emit(" ", WhiteSpace, true);
    return nextCode;
  };
}
function processChildren(node3, delimeter) {
  if (typeof delimeter === "function") {
    let prev = null;
    node3.children.forEach((node$1) => {
      if (prev !== null)
        delimeter.call(this, prev);
      this.node(node$1);
      prev = node$1;
    });
    return;
  }
  node3.children.forEach(this.node, this);
}
function processChunk(chunk) {
  tokenize$1(chunk, (type2, start, end) => {
    this.token(type2, chunk.slice(start, end));
  });
}
function createGenerator(config2) {
  const types4 = /* @__PURE__ */ new Map;
  for (let [name$49, item] of Object.entries(config2.node))
    if (typeof (item.generate || item) === "function")
      types4.set(name$49, item.generate || item);
  return function(node3, options2) {
    let buffer = "";
    let prevCode = 0;
    let handlers2 = {
      node(node$1) {
        if (types4.has(node$1.type))
          types4.get(node$1.type).call(publicApi2, node$1);
        else
          throw new Error("Unknown node type: " + node$1.type);
      },
      tokenBefore: safe,
      token(type2, value) {
        prevCode = this.tokenBefore(prevCode, type2, value);
        this.emit(value, type2, false);
        if (type2 === Delim && value.charCodeAt(0) === REVERSESOLIDUS)
          this.emit(`
`, WhiteSpace, true);
      },
      emit(value) {
        buffer += value;
      },
      result() {
        return buffer;
      }
    };
    if (options2) {
      if (typeof options2.decorator === "function")
        handlers2 = options2.decorator(handlers2);
      if (options2.sourceMap)
        handlers2 = generateSourceMap(handlers2);
      if (options2.mode in token_before_exports)
        handlers2.tokenBefore = token_before_exports[options2.mode];
    }
    const publicApi2 = {
      node: (node$1) => handlers2.node(node$1),
      children: processChildren,
      token: (type2, value) => handlers2.token(type2, value),
      tokenize: processChunk
    };
    handlers2.node(node3);
    return handlers2.result();
  };
}
function createConvertor(walk$2) {
  return {
    fromPlainObject(ast) {
      walk$2(ast, { enter(node3) {
        if (node3.children && node3.children instanceof List === false)
          node3.children = new List().fromArray(node3.children);
      } });
      return ast;
    },
    toPlainObject(ast) {
      walk$2(ast, { leave(node3) {
        if (node3.children && node3.children instanceof List)
          node3.children = node3.children.toArray();
      } });
      return ast;
    }
  };
}
function ensureFunction$1(value) {
  return typeof value === "function" ? value : noop$2;
}
function invokeForType(fn3, type2) {
  return function(node3, item, list2) {
    if (node3.type === type2)
      fn3.call(this, node3, item, list2);
  };
}
function getWalkersFromStructure(name$49, nodeType) {
  const structure$49 = nodeType.structure;
  const walkers = [];
  for (const key in structure$49) {
    if (hasOwnProperty$3.call(structure$49, key) === false)
      continue;
    let fieldTypes = structure$49[key];
    const walker = {
      name: key,
      type: false,
      nullable: false
    };
    if (!Array.isArray(fieldTypes))
      fieldTypes = [fieldTypes];
    for (const fieldType of fieldTypes)
      if (fieldType === null)
        walker.nullable = true;
      else if (typeof fieldType === "string")
        walker.type = "node";
      else if (Array.isArray(fieldType))
        walker.type = "list";
    if (walker.type)
      walkers.push(walker);
  }
  if (walkers.length)
    return {
      context: nodeType.walkContext,
      fields: walkers
    };
  return null;
}
function getTypesFromConfig(config2) {
  const types4 = {};
  for (const name$49 in config2.node)
    if (hasOwnProperty$3.call(config2.node, name$49)) {
      const nodeType = config2.node[name$49];
      if (!nodeType.structure)
        throw new Error("Missed `structure` field in `" + name$49 + "` node type definition");
      types4[name$49] = getWalkersFromStructure(name$49, nodeType);
    }
  return types4;
}
function createTypeIterator(config2, reverse) {
  const fields = config2.fields.slice();
  const contextName = config2.context;
  const useContext = typeof contextName === "string";
  if (reverse)
    fields.reverse();
  return function(node3, context10, walk$2, walkReducer) {
    let prevContextValue;
    if (useContext) {
      prevContextValue = context10[contextName];
      context10[contextName] = node3;
    }
    for (const field of fields) {
      const ref = node3[field.name];
      if (!field.nullable || ref) {
        if (field.type === "list") {
          if (reverse ? ref.reduceRight(walkReducer, false) : ref.reduce(walkReducer, false))
            return true;
        } else if (walk$2(ref))
          return true;
      }
    }
    if (useContext)
      context10[contextName] = prevContextValue;
  };
}
function createFastTraveralMap({ StyleSheet, Atrule, Rule, Block, DeclarationList }) {
  return {
    Atrule: {
      StyleSheet,
      Atrule,
      Rule,
      Block
    },
    Rule: {
      StyleSheet,
      Atrule,
      Rule,
      Block
    },
    Declaration: {
      StyleSheet,
      Atrule,
      Rule,
      Block,
      DeclarationList
    }
  };
}
function createWalker(config2) {
  const types4 = getTypesFromConfig(config2);
  const iteratorsNatural = {};
  const iteratorsReverse = {};
  const breakWalk = Symbol("break-walk");
  const skipNode = Symbol("skip-node");
  for (const name$49 in types4)
    if (hasOwnProperty$3.call(types4, name$49) && types4[name$49] !== null) {
      iteratorsNatural[name$49] = createTypeIterator(types4[name$49], false);
      iteratorsReverse[name$49] = createTypeIterator(types4[name$49], true);
    }
  const fastTraversalIteratorsNatural = createFastTraveralMap(iteratorsNatural);
  const fastTraversalIteratorsReverse = createFastTraveralMap(iteratorsReverse);
  const walk$2 = function(root, options2) {
    function walkNode(node3, item, list2) {
      const enterRet = enter.call(context10, node3, item, list2);
      if (enterRet === breakWalk)
        return true;
      if (enterRet === skipNode)
        return false;
      if (iterators.hasOwnProperty(node3.type)) {
        if (iterators[node3.type](node3, context10, walkNode, walkReducer))
          return true;
      }
      if (leave.call(context10, node3, item, list2) === breakWalk)
        return true;
      return false;
    }
    let enter = noop$2;
    let leave = noop$2;
    let iterators = iteratorsNatural;
    let walkReducer = (ret, data, item, list2) => ret || walkNode(data, item, list2);
    const context10 = {
      break: breakWalk,
      skip: skipNode,
      root,
      stylesheet: null,
      atrule: null,
      atrulePrelude: null,
      rule: null,
      selector: null,
      block: null,
      declaration: null,
      function: null
    };
    if (typeof options2 === "function")
      enter = options2;
    else if (options2) {
      enter = ensureFunction$1(options2.enter);
      leave = ensureFunction$1(options2.leave);
      if (options2.reverse)
        iterators = iteratorsReverse;
      if (options2.visit) {
        if (fastTraversalIteratorsNatural.hasOwnProperty(options2.visit))
          iterators = options2.reverse ? fastTraversalIteratorsReverse[options2.visit] : fastTraversalIteratorsNatural[options2.visit];
        else if (!types4.hasOwnProperty(options2.visit))
          throw new Error("Bad value `" + options2.visit + "` for `visit` option (should be: " + Object.keys(types4).sort().join(", ") + ")");
        enter = invokeForType(enter, options2.visit);
        leave = invokeForType(leave, options2.visit);
      }
    }
    if (enter === noop$2 && leave === noop$2)
      throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");
    walkNode(root);
  };
  walk$2.break = breakWalk;
  walk$2.skip = skipNode;
  walk$2.find = function(ast, fn3) {
    let found = null;
    walk$2(ast, function(node3, item, list2) {
      if (fn3.call(this, node3, item, list2)) {
        found = node3;
        return breakWalk;
      }
    });
    return found;
  };
  walk$2.findLast = function(ast, fn3) {
    let found = null;
    walk$2(ast, {
      reverse: true,
      enter(node3, item, list2) {
        if (fn3.call(this, node3, item, list2)) {
          found = node3;
          return breakWalk;
        }
      }
    });
    return found;
  };
  walk$2.findAll = function(ast, fn3) {
    const found = [];
    walk$2(ast, function(node3, item, list2) {
      if (fn3.call(this, node3, item, list2))
        found.push(node3);
    });
    return found;
  };
  return walk$2;
}
function noop$1(value) {
  return value;
}
function generateMultiplier(multiplier) {
  const { min, max, comma } = multiplier;
  if (min === 0 && max === 0)
    return comma ? "#?" : "*";
  if (min === 0 && max === 1)
    return "?";
  if (min === 1 && max === 0)
    return comma ? "#" : "+";
  if (min === 1 && max === 1)
    return "";
  return (comma ? "#" : "") + (min === max ? "{" + min + "}" : "{" + min + "," + (max !== 0 ? max : "") + "}");
}
function generateTypeOpts(node3) {
  switch (node3.type) {
    case "Range":
      return " [" + (node3.min === null ? "-∞" : node3.min) + "," + (node3.max === null ? "∞" : node3.max) + "]";
    default:
      throw new Error("Unknown node type `" + node3.type + "`");
  }
}
function generateSequence(node3, decorate, forceBraces, compact) {
  const combinator = node3.combinator === " " || compact ? node3.combinator : " " + node3.combinator + " ";
  const result = node3.terms.map((term) => internalGenerate(term, decorate, forceBraces, compact)).join(combinator);
  if (node3.explicit || forceBraces)
    return (compact || result[0] === "," ? "[" : "[ ") + result + (compact ? "]" : " ]");
  return result;
}
function internalGenerate(node3, decorate, forceBraces, compact) {
  let result;
  switch (node3.type) {
    case "Group":
      result = generateSequence(node3, decorate, forceBraces, compact) + (node3.disallowEmpty ? "!" : "");
      break;
    case "Multiplier":
      return internalGenerate(node3.term, decorate, forceBraces, compact) + decorate(generateMultiplier(node3), node3);
    case "Boolean":
      result = "<boolean-expr[" + internalGenerate(node3.term, decorate, forceBraces, compact) + "]>";
      break;
    case "Type":
      result = "<" + node3.name + (node3.opts ? decorate(generateTypeOpts(node3.opts), node3.opts) : "") + ">";
      break;
    case "Property":
      result = "<'" + node3.name + "'>";
      break;
    case "Keyword":
      result = node3.name;
      break;
    case "AtKeyword":
      result = "@" + node3.name;
      break;
    case "Function":
      result = node3.name + "(";
      break;
    case "String":
    case "Token":
      result = node3.value;
      break;
    case "Comma":
      result = ",";
      break;
    default:
      throw new Error("Unknown node type `" + node3.type + "`");
  }
  return decorate(result, node3);
}
function generate$50(node3, options2) {
  let decorate = noop$1;
  let forceBraces = false;
  let compact = false;
  if (typeof options2 === "function")
    decorate = options2;
  else if (options2) {
    forceBraces = Boolean(options2.forceBraces);
    compact = Boolean(options2.compact);
    if (typeof options2.decorate === "function")
      decorate = options2.decorate;
  }
  return internalGenerate(node3, decorate, forceBraces, compact);
}
function locateMismatch(matchResult, node3) {
  const tokens = matchResult.tokens;
  const longestMatch = matchResult.longestMatch;
  const mismatchNode = longestMatch < tokens.length ? tokens[longestMatch].node || null : null;
  const badNode = mismatchNode !== node3 ? mismatchNode : null;
  let mismatchOffset = 0;
  let mismatchLength = 0;
  let entries = 0;
  let css$4 = "";
  let start;
  let end;
  for (let i = 0;i < tokens.length; i++) {
    const token2 = tokens[i].value;
    if (i === longestMatch) {
      mismatchLength = token2.length;
      mismatchOffset = css$4.length;
    }
    if (badNode !== null && tokens[i].node === badNode)
      if (i <= longestMatch)
        entries++;
      else
        entries = 0;
    css$4 += token2;
  }
  if (longestMatch === tokens.length || entries > 1) {
    start = fromLoc(badNode || node3, "end") || buildLoc(defaultLoc, css$4);
    end = buildLoc(start);
  } else {
    start = fromLoc(badNode, "start") || buildLoc(fromLoc(node3, "start") || defaultLoc, css$4.slice(0, mismatchOffset));
    end = fromLoc(badNode, "end") || buildLoc(start, css$4.substr(mismatchOffset, mismatchLength));
  }
  return {
    css: css$4,
    mismatchOffset,
    mismatchLength,
    start,
    end
  };
}
function fromLoc(node3, point2) {
  const value = node3 && node3.loc && node3.loc[point2];
  if (value)
    return "line" in value ? buildLoc(value) : value;
  return null;
}
function buildLoc({ offset, line: line2, column }, extra) {
  const loc = {
    offset,
    line: line2,
    column
  };
  if (extra) {
    const lines = extra.split(/\n|\r\n?|\f/);
    loc.offset += extra.length;
    loc.line += lines.length - 1;
    loc.column = lines.length === 1 ? loc.column + extra.length : lines.pop().length + 1;
  }
  return loc;
}
function isCustomProperty(str, offset) {
  offset = offset || 0;
  return str.length - offset >= 2 && str.charCodeAt(offset) === HYPHENMINUS$5 && str.charCodeAt(offset + 1) === HYPHENMINUS$5;
}
function getVendorPrefix(str, offset) {
  offset = offset || 0;
  if (str.length - offset >= 3) {
    if (str.charCodeAt(offset) === HYPHENMINUS$5 && str.charCodeAt(offset + 1) !== HYPHENMINUS$5) {
      const secondDashIndex = str.indexOf("-", offset + 2);
      if (secondDashIndex !== -1)
        return str.substring(offset, secondDashIndex + 1);
    }
  }
  return "";
}
function getKeywordDescriptor(keyword$1) {
  if (keywords.has(keyword$1))
    return keywords.get(keyword$1);
  const name$49 = keyword$1.toLowerCase();
  let descriptor = keywords.get(name$49);
  if (descriptor === undefined) {
    const custom2 = isCustomProperty(name$49, 0);
    const vendor = !custom2 ? getVendorPrefix(name$49, 0) : "";
    descriptor = Object.freeze({
      basename: name$49.substr(vendor.length),
      name: name$49,
      prefix: vendor,
      vendor,
      custom: custom2
    });
  }
  keywords.set(keyword$1, descriptor);
  return descriptor;
}
function getPropertyDescriptor(property$1) {
  if (properties.has(property$1))
    return properties.get(property$1);
  let name$49 = property$1;
  let hack = property$1[0];
  if (hack === "/")
    hack = property$1[1] === "/" ? "//" : "/";
  else if (hack !== "_" && hack !== "*" && hack !== "$" && hack !== "#" && hack !== "+" && hack !== "&")
    hack = "";
  const custom2 = isCustomProperty(name$49, hack.length);
  if (!custom2) {
    name$49 = name$49.toLowerCase();
    if (properties.has(name$49)) {
      const descriptor$1 = properties.get(name$49);
      properties.set(property$1, descriptor$1);
      return descriptor$1;
    }
  }
  const vendor = !custom2 ? getVendorPrefix(name$49, hack.length) : "";
  const prefix = name$49.substr(0, hack.length + vendor.length);
  const descriptor = Object.freeze({
    basename: name$49.substr(prefix.length),
    name: name$49.substr(hack.length),
    hack,
    vendor,
    prefix,
    custom: custom2
  });
  properties.set(property$1, descriptor);
  return descriptor;
}
function isDelim$1(token2, code$1) {
  return token2 !== null && token2.type === Delim && token2.value.charCodeAt(0) === code$1;
}
function skipSC(token2, offset, getNextToken) {
  while (token2 !== null && (token2.type === WhiteSpace || token2.type === Comment3))
    token2 = getNextToken(++offset);
  return offset;
}
function checkInteger$1(token2, valueOffset, disallowSign, offset) {
  if (!token2)
    return 0;
  const code$1 = token2.value.charCodeAt(valueOffset);
  if (code$1 === PLUSSIGN$8 || code$1 === HYPHENMINUS$4) {
    if (disallowSign)
      return 0;
    valueOffset++;
  }
  for (;valueOffset < token2.value.length; valueOffset++)
    if (!isDigit(token2.value.charCodeAt(valueOffset)))
      return 0;
  return offset + 1;
}
function consumeB$1(token2, offset_, getNextToken) {
  let sign = false;
  let offset = skipSC(token2, offset_, getNextToken);
  token2 = getNextToken(offset);
  if (token2 === null)
    return offset_;
  if (token2.type !== Number$1)
    if (isDelim$1(token2, PLUSSIGN$8) || isDelim$1(token2, HYPHENMINUS$4)) {
      sign = true;
      offset = skipSC(getNextToken(++offset), offset, getNextToken);
      token2 = getNextToken(offset);
      if (token2 === null || token2.type !== Number$1)
        return 0;
    } else
      return offset_;
  if (!sign) {
    const code$1 = token2.value.charCodeAt(0);
    if (code$1 !== PLUSSIGN$8 && code$1 !== HYPHENMINUS$4)
      return 0;
  }
  return checkInteger$1(token2, sign ? 0 : 1, sign, offset);
}
function anPlusB(token2, getNextToken) {
  let offset = 0;
  if (!token2)
    return 0;
  if (token2.type === Number$1)
    return checkInteger$1(token2, 0, ALLOW_SIGN$1, offset);
  else if (token2.type === Ident && token2.value.charCodeAt(0) === HYPHENMINUS$4) {
    if (!cmpChar(token2.value, 1, N$3))
      return 0;
    switch (token2.value.length) {
      case 2:
        return consumeB$1(getNextToken(++offset), offset, getNextToken);
      case 3:
        if (token2.value.charCodeAt(2) !== HYPHENMINUS$4)
          return 0;
        offset = skipSC(getNextToken(++offset), offset, getNextToken);
        token2 = getNextToken(offset);
        return checkInteger$1(token2, 0, DISALLOW_SIGN$1, offset);
      default:
        if (token2.value.charCodeAt(2) !== HYPHENMINUS$4)
          return 0;
        return checkInteger$1(token2, 3, DISALLOW_SIGN$1, offset);
    }
  } else if (token2.type === Ident || isDelim$1(token2, PLUSSIGN$8) && getNextToken(offset + 1).type === Ident) {
    if (token2.type !== Ident)
      token2 = getNextToken(++offset);
    if (token2 === null || !cmpChar(token2.value, 0, N$3))
      return 0;
    switch (token2.value.length) {
      case 1:
        return consumeB$1(getNextToken(++offset), offset, getNextToken);
      case 2:
        if (token2.value.charCodeAt(1) !== HYPHENMINUS$4)
          return 0;
        offset = skipSC(getNextToken(++offset), offset, getNextToken);
        token2 = getNextToken(offset);
        return checkInteger$1(token2, 0, DISALLOW_SIGN$1, offset);
      default:
        if (token2.value.charCodeAt(1) !== HYPHENMINUS$4)
          return 0;
        return checkInteger$1(token2, 2, DISALLOW_SIGN$1, offset);
    }
  } else if (token2.type === Dimension) {
    let code$1 = token2.value.charCodeAt(0);
    let sign = code$1 === PLUSSIGN$8 || code$1 === HYPHENMINUS$4 ? 1 : 0;
    let i = sign;
    for (;i < token2.value.length; i++)
      if (!isDigit(token2.value.charCodeAt(i)))
        break;
    if (i === sign)
      return 0;
    if (!cmpChar(token2.value, i, N$3))
      return 0;
    if (i + 1 === token2.value.length)
      return consumeB$1(getNextToken(++offset), offset, getNextToken);
    else {
      if (token2.value.charCodeAt(i + 1) !== HYPHENMINUS$4)
        return 0;
      if (i + 2 === token2.value.length) {
        offset = skipSC(getNextToken(++offset), offset, getNextToken);
        token2 = getNextToken(offset);
        return checkInteger$1(token2, 0, DISALLOW_SIGN$1, offset);
      } else
        return checkInteger$1(token2, i + 2, DISALLOW_SIGN$1, offset);
    }
  }
  return 0;
}
function isDelim(token2, code$1) {
  return token2 !== null && token2.type === Delim && token2.value.charCodeAt(0) === code$1;
}
function startsWith$1(token2, code$1) {
  return token2.value.charCodeAt(0) === code$1;
}
function hexSequence(token2, offset, allowDash) {
  let hexlen = 0;
  for (let pos = offset;pos < token2.value.length; pos++) {
    const code$1 = token2.value.charCodeAt(pos);
    if (code$1 === HYPHENMINUS$3 && allowDash && hexlen !== 0) {
      hexSequence(token2, offset + hexlen + 1, false);
      return 6;
    }
    if (!isHexDigit2(code$1))
      return 0;
    if (++hexlen > 6)
      return 0;
  }
  return hexlen;
}
function withQuestionMarkSequence(consumed, length$1, getNextToken) {
  if (!consumed)
    return 0;
  while (isDelim(getNextToken(length$1), QUESTIONMARK$2)) {
    if (++consumed > 6)
      return 0;
    length$1++;
  }
  return length$1;
}
function urange(token2, getNextToken) {
  let length$1 = 0;
  if (token2 === null || token2.type !== Ident || !cmpChar(token2.value, 0, U$1))
    return 0;
  token2 = getNextToken(++length$1);
  if (token2 === null)
    return 0;
  if (isDelim(token2, PLUSSIGN$7)) {
    token2 = getNextToken(++length$1);
    if (token2 === null)
      return 0;
    if (token2.type === Ident)
      return withQuestionMarkSequence(hexSequence(token2, 0, true), ++length$1, getNextToken);
    if (isDelim(token2, QUESTIONMARK$2))
      return withQuestionMarkSequence(1, ++length$1, getNextToken);
    return 0;
  }
  if (token2.type === Number$1) {
    const consumedHexLength = hexSequence(token2, 1, true);
    if (consumedHexLength === 0)
      return 0;
    token2 = getNextToken(++length$1);
    if (token2 === null)
      return length$1;
    if (token2.type === Dimension || token2.type === Number$1) {
      if (!startsWith$1(token2, HYPHENMINUS$3) || !hexSequence(token2, 1, false))
        return 0;
      return length$1 + 1;
    }
    return withQuestionMarkSequence(consumedHexLength, length$1, getNextToken);
  }
  if (token2.type === Dimension)
    return withQuestionMarkSequence(hexSequence(token2, 1, true), ++length$1, getNextToken);
  return 0;
}
function charCodeAt(str, index2) {
  return index2 < str.length ? str.charCodeAt(index2) : 0;
}
function eqStr(actual, expected) {
  return cmpStr(actual, 0, actual.length, expected);
}
function eqStrAny(actual, expected) {
  for (let i = 0;i < expected.length; i++)
    if (eqStr(actual, expected[i]))
      return true;
  return false;
}
function isPostfixIeHack(str, offset) {
  if (offset !== str.length - 2)
    return false;
  return charCodeAt(str, offset) === 92 && isDigit(charCodeAt(str, offset + 1));
}
function outOfRange(opts, value, numEnd) {
  if (opts && opts.type === "Range") {
    const num = Number(numEnd !== undefined && numEnd !== value.length ? value.substr(0, numEnd) : value);
    if (isNaN(num))
      return true;
    if (opts.min !== null && num < opts.min && typeof opts.min !== "string")
      return true;
    if (opts.max !== null && num > opts.max && typeof opts.max !== "string")
      return true;
  }
  return false;
}
function consumeFunction(token2, getNextToken) {
  let balanceCloseType = 0;
  let balanceStash = [];
  let length$1 = 0;
  scan:
    do {
      switch (token2.type) {
        case RightCurlyBracket:
        case RightParenthesis:
        case RightSquareBracket:
          if (token2.type !== balanceCloseType)
            break scan;
          balanceCloseType = balanceStash.pop();
          if (balanceStash.length === 0) {
            length$1++;
            break scan;
          }
          break;
        case Function2:
        case LeftParenthesis:
        case LeftSquareBracket:
        case LeftCurlyBracket:
          balanceStash.push(balanceCloseType);
          balanceCloseType = balancePair.get(token2.type);
          break;
      }
      length$1++;
    } while (token2 = getNextToken(length$1));
  return length$1;
}
function calc(next) {
  return function(token2, getNextToken, opts) {
    if (token2 === null)
      return 0;
    if (token2.type === Function2 && eqStrAny(token2.value, calcFunctionNames))
      return consumeFunction(token2, getNextToken);
    return next(token2, getNextToken, opts);
  };
}
function tokenType(expectedTokenType) {
  return function(token2) {
    if (token2 === null || token2.type !== expectedTokenType)
      return 0;
    return 1;
  };
}
function customIdent(token2) {
  if (token2 === null || token2.type !== Ident)
    return 0;
  const name$49 = token2.value.toLowerCase();
  if (eqStrAny(name$49, cssWideKeywords))
    return 0;
  if (eqStr(name$49, "default"))
    return 0;
  return 1;
}
function dashedIdent(token2) {
  if (token2 === null || token2.type !== Ident)
    return 0;
  if (charCodeAt(token2.value, 0) !== 45 || charCodeAt(token2.value, 1) !== 45)
    return 0;
  return 1;
}
function customPropertyName(token2) {
  if (!dashedIdent(token2))
    return 0;
  if (token2.value === "--")
    return 0;
  return 1;
}
function hexColor(token2) {
  if (token2 === null || token2.type !== Hash)
    return 0;
  const length$1 = token2.value.length;
  if (length$1 !== 4 && length$1 !== 5 && length$1 !== 7 && length$1 !== 9)
    return 0;
  for (let i = 1;i < length$1; i++)
    if (!isHexDigit2(charCodeAt(token2.value, i)))
      return 0;
  return 1;
}
function idSelector(token2) {
  if (token2 === null || token2.type !== Hash)
    return 0;
  if (!isIdentifierStart(charCodeAt(token2.value, 1), charCodeAt(token2.value, 2), charCodeAt(token2.value, 3)))
    return 0;
  return 1;
}
function declarationValue(token2, getNextToken) {
  if (!token2)
    return 0;
  let balanceCloseType = 0;
  let balanceStash = [];
  let length$1 = 0;
  scan:
    do {
      switch (token2.type) {
        case BadString:
        case BadUrl:
          break scan;
        case RightCurlyBracket:
        case RightParenthesis:
        case RightSquareBracket:
          if (token2.type !== balanceCloseType)
            break scan;
          balanceCloseType = balanceStash.pop();
          break;
        case Semicolon:
          if (balanceCloseType === 0)
            break scan;
          break;
        case Delim:
          if (balanceCloseType === 0 && token2.value === "!")
            break scan;
          break;
        case Function2:
        case LeftParenthesis:
        case LeftSquareBracket:
        case LeftCurlyBracket:
          balanceStash.push(balanceCloseType);
          balanceCloseType = balancePair.get(token2.type);
          break;
      }
      length$1++;
    } while (token2 = getNextToken(length$1));
  return length$1;
}
function anyValue(token2, getNextToken) {
  if (!token2)
    return 0;
  let balanceCloseType = 0;
  let balanceStash = [];
  let length$1 = 0;
  scan:
    do {
      switch (token2.type) {
        case BadString:
        case BadUrl:
          break scan;
        case RightCurlyBracket:
        case RightParenthesis:
        case RightSquareBracket:
          if (token2.type !== balanceCloseType)
            break scan;
          balanceCloseType = balanceStash.pop();
          break;
        case Function2:
        case LeftParenthesis:
        case LeftSquareBracket:
        case LeftCurlyBracket:
          balanceStash.push(balanceCloseType);
          balanceCloseType = balancePair.get(token2.type);
          break;
      }
      length$1++;
    } while (token2 = getNextToken(length$1));
  return length$1;
}
function dimension(type2) {
  if (type2)
    type2 = new Set(type2);
  return function(token2, getNextToken, opts) {
    if (token2 === null || token2.type !== Dimension)
      return 0;
    const numberEnd = consumeNumber(token2.value, 0);
    if (type2 !== null) {
      const reverseSolidusOffset = token2.value.indexOf("\\", numberEnd);
      const unit = reverseSolidusOffset === -1 || !isPostfixIeHack(token2.value, reverseSolidusOffset) ? token2.value.substr(numberEnd) : token2.value.substring(numberEnd, reverseSolidusOffset);
      if (type2.has(unit.toLowerCase()) === false)
        return 0;
    }
    if (outOfRange(opts, token2.value, numberEnd))
      return 0;
    return 1;
  };
}
function percentage(token2, getNextToken, opts) {
  if (token2 === null || token2.type !== Percentage)
    return 0;
  if (outOfRange(opts, token2.value, token2.value.length - 1))
    return 0;
  return 1;
}
function zero(next) {
  if (typeof next !== "function")
    next = function() {
      return 0;
    };
  return function(token2, getNextToken, opts) {
    if (token2 !== null && token2.type === Number$1) {
      if (Number(token2.value) === 0)
        return 1;
    }
    return next(token2, getNextToken, opts);
  };
}
function number4(token2, getNextToken, opts) {
  if (token2 === null)
    return 0;
  const numberEnd = consumeNumber(token2.value, 0);
  if (!(numberEnd === token2.value.length) && !isPostfixIeHack(token2.value, numberEnd))
    return 0;
  if (outOfRange(opts, token2.value, numberEnd))
    return 0;
  return 1;
}
function integer3(token2, getNextToken, opts) {
  if (token2 === null || token2.type !== Number$1)
    return 0;
  let i = charCodeAt(token2.value, 0) === 43 || charCodeAt(token2.value, 0) === 45 ? 1 : 0;
  for (;i < token2.value.length; i++)
    if (!isDigit(charCodeAt(token2.value, i)))
      return 0;
  if (outOfRange(opts, token2.value, i))
    return 0;
  return 1;
}
function createDemensionTypes(units) {
  const { angle: angle$1, decibel: decibel$1, frequency: frequency$1, flex: flex$1, length: length$1, resolution: resolution$1, semitones: semitones$1, time: time$1 } = units || {};
  return {
    dimension: calc(dimension(null)),
    angle: calc(dimension(angle$1)),
    decibel: calc(dimension(decibel$1)),
    frequency: calc(dimension(frequency$1)),
    flex: calc(dimension(flex$1)),
    length: calc(zero(dimension(length$1))),
    resolution: calc(dimension(resolution$1)),
    semitones: calc(dimension(semitones$1)),
    time: calc(dimension(time$1))
  };
}
function createGenericTypes(units) {
  return {
    ...tokenTypes,
    ...productionTypes,
    ...createDemensionTypes(units)
  };
}
function SyntaxError$1(message, input, offset) {
  return Object.assign(createCustomError("SyntaxError", message), {
    input,
    offset,
    rawMessage: message,
    message: message + `
  ` + input + `
--` + new Array((offset || input.length) + 1).join("-") + "^"
  });
}
function readMultiplierRange(scanner) {
  let min = null;
  let max = null;
  scanner.eat(LEFTCURLYBRACKET);
  scanner.skipWs();
  min = scanner.scanNumber(scanner);
  scanner.skipWs();
  if (scanner.charCode() === COMMA) {
    scanner.pos++;
    scanner.skipWs();
    if (scanner.charCode() !== RIGHTCURLYBRACKET) {
      max = scanner.scanNumber(scanner);
      scanner.skipWs();
    }
  } else
    max = min;
  scanner.eat(RIGHTCURLYBRACKET);
  return {
    min: Number(min),
    max: max ? Number(max) : 0
  };
}
function readMultiplier(scanner) {
  let range = null;
  let comma = false;
  switch (scanner.charCode()) {
    case ASTERISK$6:
      scanner.pos++;
      range = {
        min: 0,
        max: 0
      };
      break;
    case PLUSSIGN$6:
      scanner.pos++;
      range = {
        min: 1,
        max: 0
      };
      break;
    case QUESTIONMARK$1:
      scanner.pos++;
      range = {
        min: 0,
        max: 1
      };
      break;
    case NUMBERSIGN$3:
      scanner.pos++;
      comma = true;
      if (scanner.charCode() === LEFTCURLYBRACKET)
        range = readMultiplierRange(scanner);
      else if (scanner.charCode() === QUESTIONMARK$1) {
        scanner.pos++;
        range = {
          min: 0,
          max: 0
        };
      } else
        range = {
          min: 1,
          max: 0
        };
      break;
    case LEFTCURLYBRACKET:
      range = readMultiplierRange(scanner);
      break;
    default:
      return null;
  }
  return {
    type: "Multiplier",
    comma,
    min: range.min,
    max: range.max,
    term: null
  };
}
function maybeMultiplied(scanner, node3) {
  const multiplier = readMultiplier(scanner);
  if (multiplier !== null) {
    multiplier.term = node3;
    if (scanner.charCode() === NUMBERSIGN$3 && scanner.charCodeAt(scanner.pos - 1) === PLUSSIGN$6)
      return maybeMultiplied(scanner, multiplier);
    return multiplier;
  }
  return node3;
}
function maybeToken(scanner) {
  const ch = scanner.peek();
  if (ch === "")
    return null;
  return maybeMultiplied(scanner, {
    type: "Token",
    value: ch
  });
}
function readProperty$1(scanner) {
  let name$49;
  scanner.eat(LESSTHANSIGN$1);
  scanner.eat(APOSTROPHE$2);
  name$49 = scanner.scanWord();
  scanner.eat(APOSTROPHE$2);
  scanner.eat(GREATERTHANSIGN$3);
  return maybeMultiplied(scanner, {
    type: "Property",
    name: name$49
  });
}
function readTypeRange(scanner) {
  let min = null;
  let max = null;
  let sign = 1;
  scanner.eat(LEFTSQUAREBRACKET);
  if (scanner.charCode() === HYPERMINUS) {
    scanner.peek();
    sign = -1;
  }
  if (sign == -1 && scanner.charCode() === INFINITY)
    scanner.peek();
  else {
    min = sign * Number(scanner.scanNumber(scanner));
    if (scanner.isNameCharCode())
      min += scanner.scanWord();
  }
  scanner.skipWs();
  scanner.eat(COMMA);
  scanner.skipWs();
  if (scanner.charCode() === INFINITY)
    scanner.peek();
  else {
    sign = 1;
    if (scanner.charCode() === HYPERMINUS) {
      scanner.peek();
      sign = -1;
    }
    max = sign * Number(scanner.scanNumber(scanner));
    if (scanner.isNameCharCode())
      max += scanner.scanWord();
  }
  scanner.eat(RIGHTSQUAREBRACKET);
  return {
    type: "Range",
    min,
    max
  };
}
function readType(scanner) {
  let name$49;
  let opts = null;
  scanner.eat(LESSTHANSIGN$1);
  name$49 = scanner.scanWord();
  if (name$49 === "boolean-expr") {
    scanner.eat(LEFTSQUAREBRACKET);
    const implicitGroup = readImplicitGroup(scanner, RIGHTSQUAREBRACKET);
    scanner.eat(RIGHTSQUAREBRACKET);
    scanner.eat(GREATERTHANSIGN$3);
    return maybeMultiplied(scanner, {
      type: "Boolean",
      term: implicitGroup.terms.length === 1 ? implicitGroup.terms[0] : implicitGroup
    });
  }
  if (scanner.charCode() === LEFTPARENTHESIS$2 && scanner.nextCharCode() === RIGHTPARENTHESIS$2) {
    scanner.pos += 2;
    name$49 += "()";
  }
  if (scanner.charCodeAt(scanner.findWsEnd(scanner.pos)) === LEFTSQUAREBRACKET) {
    scanner.skipWs();
    opts = readTypeRange(scanner);
  }
  scanner.eat(GREATERTHANSIGN$3);
  return maybeMultiplied(scanner, {
    type: "Type",
    name: name$49,
    opts
  });
}
function readKeywordOrFunction(scanner) {
  const name$49 = scanner.scanWord();
  if (scanner.charCode() === LEFTPARENTHESIS$2) {
    scanner.pos++;
    return {
      type: "Function",
      name: name$49
    };
  }
  return maybeMultiplied(scanner, {
    type: "Keyword",
    name: name$49
  });
}
function regroupTerms(terms, combinators) {
  function createGroup(terms$1, combinator$1) {
    return {
      type: "Group",
      terms: terms$1,
      combinator: combinator$1,
      disallowEmpty: false,
      explicit: false
    };
  }
  let combinator;
  combinators = Object.keys(combinators).sort((a2, b5) => COMBINATOR_PRECEDENCE[a2] - COMBINATOR_PRECEDENCE[b5]);
  while (combinators.length > 0) {
    combinator = combinators.shift();
    let i = 0;
    let subgroupStart = 0;
    for (;i < terms.length; i++) {
      const term = terms[i];
      if (term.type === "Combinator")
        if (term.value === combinator) {
          if (subgroupStart === -1)
            subgroupStart = i - 1;
          terms.splice(i, 1);
          i--;
        } else {
          if (subgroupStart !== -1 && i - subgroupStart > 1) {
            terms.splice(subgroupStart, i - subgroupStart, createGroup(terms.slice(subgroupStart, i), combinator));
            i = subgroupStart + 1;
          }
          subgroupStart = -1;
        }
    }
    if (subgroupStart !== -1 && combinators.length)
      terms.splice(subgroupStart, i - subgroupStart, createGroup(terms.slice(subgroupStart, i), combinator));
  }
  return combinator;
}
function readImplicitGroup(scanner, stopCharCode) {
  const combinators = Object.create(null);
  const terms = [];
  let token2;
  let prevToken = null;
  let prevTokenPos = scanner.pos;
  while (scanner.charCode() !== stopCharCode && (token2 = peek(scanner, stopCharCode)))
    if (token2.type !== "Spaces") {
      if (token2.type === "Combinator") {
        if (prevToken === null || prevToken.type === "Combinator") {
          scanner.pos = prevTokenPos;
          scanner.error("Unexpected combinator");
        }
        combinators[token2.value] = true;
      } else if (prevToken !== null && prevToken.type !== "Combinator") {
        combinators[" "] = true;
        terms.push({
          type: "Combinator",
          value: " "
        });
      }
      terms.push(token2);
      prevToken = token2;
      prevTokenPos = scanner.pos;
    }
  if (prevToken !== null && prevToken.type === "Combinator") {
    scanner.pos -= prevTokenPos;
    scanner.error("Unexpected combinator");
  }
  return {
    type: "Group",
    terms,
    combinator: regroupTerms(terms, combinators) || " ",
    disallowEmpty: false,
    explicit: false
  };
}
function readGroup(scanner, stopCharCode) {
  let result;
  scanner.eat(LEFTSQUAREBRACKET);
  result = readImplicitGroup(scanner, stopCharCode);
  scanner.eat(RIGHTSQUAREBRACKET);
  result.explicit = true;
  if (scanner.charCode() === EXCLAMATIONMARK$2) {
    scanner.pos++;
    result.disallowEmpty = true;
  }
  return result;
}
function peek(scanner, stopCharCode) {
  let code$1 = scanner.charCode();
  switch (code$1) {
    case RIGHTSQUAREBRACKET:
      break;
    case LEFTSQUAREBRACKET:
      return maybeMultiplied(scanner, readGroup(scanner, stopCharCode));
    case LESSTHANSIGN$1:
      return scanner.nextCharCode() === APOSTROPHE$2 ? readProperty$1(scanner) : readType(scanner);
    case VERTICALLINE$3:
      return {
        type: "Combinator",
        value: scanner.substringToPos(scanner.pos + (scanner.nextCharCode() === VERTICALLINE$3 ? 2 : 1))
      };
    case AMPERSAND$5:
      scanner.pos++;
      scanner.eat(AMPERSAND$5);
      return {
        type: "Combinator",
        value: "&&"
      };
    case COMMA:
      scanner.pos++;
      return { type: "Comma" };
    case APOSTROPHE$2:
      return maybeMultiplied(scanner, {
        type: "String",
        value: scanner.scanString()
      });
    case SPACE$2:
    case TAB:
    case N$1:
    case R5:
    case F4:
      return {
        type: "Spaces",
        value: scanner.scanSpaces()
      };
    case COMMERCIALAT:
      code$1 = scanner.nextCharCode();
      if (scanner.isNameCharCode(code$1)) {
        scanner.pos++;
        return {
          type: "AtKeyword",
          name: scanner.scanWord()
        };
      }
      return maybeToken(scanner);
    case ASTERISK$6:
    case PLUSSIGN$6:
    case QUESTIONMARK$1:
    case NUMBERSIGN$3:
    case EXCLAMATIONMARK$2:
      break;
    case LEFTCURLYBRACKET:
      code$1 = scanner.nextCharCode();
      if (code$1 < 48 || code$1 > 57)
        return maybeToken(scanner);
      break;
    default:
      if (scanner.isNameCharCode(code$1))
        return readKeywordOrFunction(scanner);
      return maybeToken(scanner);
  }
}
function parse$50(source) {
  const scanner = new Scanner(source);
  const result = readImplicitGroup(scanner);
  if (scanner.pos !== source.length)
    scanner.error("Unexpected input");
  if (result.terms.length === 1 && result.terms[0].type === "Group")
    return result.terms[0];
  return result;
}
function ensureFunction(value) {
  return typeof value === "function" ? value : noop;
}
function walk$1(node3, options2, context10) {
  function walk$2(node$1) {
    enter.call(context10, node$1);
    switch (node$1.type) {
      case "Group":
        node$1.terms.forEach(walk$2);
        break;
      case "Multiplier":
      case "Boolean":
        walk$2(node$1.term);
        break;
      case "Type":
      case "Property":
      case "Keyword":
      case "AtKeyword":
      case "Function":
      case "String":
      case "Token":
      case "Comma":
        break;
      default:
        throw new Error("Unknown type: " + node$1.type);
    }
    leave.call(context10, node$1);
  }
  let enter = noop;
  let leave = noop;
  if (typeof options2 === "function")
    enter = options2;
  else if (options2) {
    enter = ensureFunction(options2.enter);
    leave = ensureFunction(options2.leave);
  }
  if (enter === noop && leave === noop)
    throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");
  walk$2(node3, context10);
}
function stringToTokens(str) {
  const tokens = [];
  tokenize$1(str, (type2, start, end) => tokens.push({
    type: type2,
    value: str.slice(start, end),
    node: null
  }));
  return tokens;
}
function prepare_tokens_default(value, syntax) {
  if (typeof value === "string")
    return stringToTokens(value);
  return syntax.generate(value, astToTokens);
}
function createCondition(match, thenBranch, elseBranch) {
  if (thenBranch === MATCH && elseBranch === MISMATCH)
    return match;
  if (match === MATCH && thenBranch === MATCH && elseBranch === MATCH)
    return match;
  if (match.type === "If" && match.else === MISMATCH && thenBranch === MATCH) {
    thenBranch = match.then;
    match = match.match;
  }
  return {
    type: "If",
    match,
    then: thenBranch,
    else: elseBranch
  };
}
function isFunctionType(name$49) {
  return name$49.length > 2 && name$49.charCodeAt(name$49.length - 2) === LEFTPARENTHESIS$1 && name$49.charCodeAt(name$49.length - 1) === RIGHTPARENTHESIS$1;
}
function isEnumCapatible(term) {
  return term.type === "Keyword" || term.type === "AtKeyword" || term.type === "Function" || term.type === "Type" && isFunctionType(term.name);
}
function groupNode(terms, combinator = " ", explicit = false) {
  return {
    type: "Group",
    terms,
    combinator,
    disallowEmpty: false,
    explicit
  };
}
function replaceTypeInGraph(node3, replacements, visited = /* @__PURE__ */ new Set) {
  if (!visited.has(node3)) {
    visited.add(node3);
    switch (node3.type) {
      case "If":
        node3.match = replaceTypeInGraph(node3.match, replacements, visited);
        node3.then = replaceTypeInGraph(node3.then, replacements, visited);
        node3.else = replaceTypeInGraph(node3.else, replacements, visited);
        break;
      case "Type":
        return replacements[node3.name] || node3;
    }
  }
  return node3;
}
function buildGroupMatchGraph(combinator, terms, atLeastOneTermMatched) {
  switch (combinator) {
    case " ": {
      let result = MATCH;
      for (let i = terms.length - 1;i >= 0; i--) {
        const term = terms[i];
        result = createCondition(term, result, MISMATCH);
      }
      return result;
    }
    case "|": {
      let result = MISMATCH;
      let map3 = null;
      for (let i = terms.length - 1;i >= 0; i--) {
        let term = terms[i];
        if (isEnumCapatible(term)) {
          if (map3 === null && i > 0 && isEnumCapatible(terms[i - 1])) {
            map3 = Object.create(null);
            result = createCondition({
              type: "Enum",
              map: map3
            }, MATCH, result);
          }
          if (map3 !== null) {
            const key = (isFunctionType(term.name) ? term.name.slice(0, -1) : term.name).toLowerCase();
            if (key in map3 === false) {
              map3[key] = term;
              continue;
            }
          }
        }
        map3 = null;
        result = createCondition(term, MATCH, result);
      }
      return result;
    }
    case "&&": {
      if (terms.length > 5)
        return {
          type: "MatchOnce",
          terms,
          all: true
        };
      let result = MISMATCH;
      for (let i = terms.length - 1;i >= 0; i--) {
        const term = terms[i];
        let thenClause;
        if (terms.length > 1)
          thenClause = buildGroupMatchGraph(combinator, terms.filter(function(newGroupTerm) {
            return newGroupTerm !== term;
          }), false);
        else
          thenClause = MATCH;
        result = createCondition(term, thenClause, result);
      }
      return result;
    }
    case "||": {
      if (terms.length > 5)
        return {
          type: "MatchOnce",
          terms,
          all: false
        };
      let result = atLeastOneTermMatched ? MATCH : MISMATCH;
      for (let i = terms.length - 1;i >= 0; i--) {
        const term = terms[i];
        let thenClause;
        if (terms.length > 1)
          thenClause = buildGroupMatchGraph(combinator, terms.filter(function(newGroupTerm) {
            return newGroupTerm !== term;
          }), true);
        else
          thenClause = MATCH;
        result = createCondition(term, thenClause, result);
      }
      return result;
    }
  }
}
function buildMultiplierMatchGraph(node3) {
  let result = MATCH;
  let matchTerm = buildMatchGraphInternal(node3.term);
  if (node3.max === 0) {
    matchTerm = createCondition(matchTerm, DISALLOW_EMPTY, MISMATCH);
    result = createCondition(matchTerm, null, MISMATCH);
    result.then = createCondition(MATCH, MATCH, result);
    if (node3.comma)
      result.then.else = createCondition({
        type: "Comma",
        syntax: node3
      }, result, MISMATCH);
  } else
    for (let i = node3.min || 1;i <= node3.max; i++) {
      if (node3.comma && result !== MATCH)
        result = createCondition({
          type: "Comma",
          syntax: node3
        }, result, MISMATCH);
      result = createCondition(matchTerm, createCondition(MATCH, MATCH, result), MISMATCH);
    }
  if (node3.min === 0)
    result = createCondition(MATCH, MATCH, result);
  else
    for (let i = 0;i < node3.min - 1; i++) {
      if (node3.comma && result !== MATCH)
        result = createCondition({
          type: "Comma",
          syntax: node3
        }, result, MISMATCH);
      result = createCondition(matchTerm, result, MISMATCH);
    }
  return result;
}
function buildMatchGraphInternal(node3) {
  if (typeof node3 === "function")
    return {
      type: "Generic",
      fn: node3
    };
  switch (node3.type) {
    case "Group": {
      let result = buildGroupMatchGraph(node3.combinator, node3.terms.map(buildMatchGraphInternal), false);
      if (node3.disallowEmpty)
        result = createCondition(result, DISALLOW_EMPTY, MISMATCH);
      return result;
    }
    case "Multiplier":
      return buildMultiplierMatchGraph(node3);
    case "Boolean": {
      const term = buildMatchGraphInternal(node3.term);
      const matchNode = buildMatchGraphInternal(groupNode([groupNode([{
        type: "Keyword",
        name: "not"
      }, {
        type: "Type",
        name: "!boolean-group"
      }]), groupNode([{
        type: "Type",
        name: "!boolean-group"
      }, groupNode([{
        type: "Multiplier",
        comma: false,
        min: 0,
        max: 0,
        term: groupNode([{
          type: "Keyword",
          name: "and"
        }, {
          type: "Type",
          name: "!boolean-group"
        }])
      }, {
        type: "Multiplier",
        comma: false,
        min: 0,
        max: 0,
        term: groupNode([{
          type: "Keyword",
          name: "or"
        }, {
          type: "Type",
          name: "!boolean-group"
        }])
      }], "|")])], "|"));
      const booleanGroup = buildMatchGraphInternal(groupNode([
        {
          type: "Type",
          name: "!term"
        },
        groupNode([
          {
            type: "Token",
            value: "("
          },
          {
            type: "Type",
            name: "!self"
          },
          {
            type: "Token",
            value: ")"
          }
        ]),
        {
          type: "Type",
          name: "general-enclosed"
        }
      ], "|"));
      replaceTypeInGraph(booleanGroup, {
        "!term": term,
        "!self": matchNode
      });
      replaceTypeInGraph(matchNode, { "!boolean-group": booleanGroup });
      return matchNode;
    }
    case "Type":
    case "Property":
      return {
        type: node3.type,
        name: node3.name,
        syntax: node3
      };
    case "Keyword":
      return {
        type: node3.type,
        name: node3.name.toLowerCase(),
        syntax: node3
      };
    case "AtKeyword":
      return {
        type: node3.type,
        name: "@" + node3.name.toLowerCase(),
        syntax: node3
      };
    case "Function":
      return {
        type: node3.type,
        name: node3.name.toLowerCase() + "(",
        syntax: node3
      };
    case "String":
      if (node3.value.length === 3)
        return {
          type: "Token",
          value: node3.value.charAt(1),
          syntax: node3
        };
      return {
        type: node3.type,
        value: node3.value.substr(1, node3.value.length - 2).replace(/\\'/g, "'"),
        syntax: node3
      };
    case "Token":
      return {
        type: node3.type,
        value: node3.value,
        syntax: node3
      };
    case "Comma":
      return {
        type: node3.type,
        syntax: node3
      };
    default:
      throw new Error("Unknown node type:", node3.type);
  }
}
function buildMatchGraph(syntaxTree, ref) {
  if (typeof syntaxTree === "string")
    syntaxTree = parse$50(syntaxTree);
  return {
    type: "MatchGraph",
    match: buildMatchGraphInternal(syntaxTree),
    syntax: ref || null,
    source: syntaxTree
  };
}
function reverseList(list2) {
  let prev = null;
  let next = null;
  let item = list2;
  while (item !== null) {
    next = item.prev;
    item.prev = prev;
    prev = item;
    item = next;
  }
  return prev;
}
function areStringsEqualCaseInsensitive(testStr, referenceStr) {
  if (testStr.length !== referenceStr.length)
    return false;
  for (let i = 0;i < testStr.length; i++) {
    const referenceCode = referenceStr.charCodeAt(i);
    let testCode = testStr.charCodeAt(i);
    if (testCode >= 65 && testCode <= 90)
      testCode = testCode | 32;
    if (testCode !== referenceCode)
      return false;
  }
  return true;
}
function isContextEdgeDelim(token2) {
  if (token2.type !== Delim)
    return false;
  return token2.value !== "?";
}
function isCommaContextStart(token2) {
  if (token2 === null)
    return true;
  return token2.type === Comma || token2.type === Function2 || token2.type === LeftParenthesis || token2.type === LeftSquareBracket || token2.type === LeftCurlyBracket || isContextEdgeDelim(token2);
}
function isCommaContextEnd(token2) {
  if (token2 === null)
    return true;
  return token2.type === RightParenthesis || token2.type === RightSquareBracket || token2.type === RightCurlyBracket || token2.type === Delim && token2.value === "/";
}
function internalMatch(tokens, state, syntaxes) {
  function moveToNextToken() {
    do {
      tokenIndex++;
      token2 = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
    } while (token2 !== null && (token2.type === WhiteSpace || token2.type === Comment3));
  }
  function getNextToken(offset) {
    const nextIndex = tokenIndex + offset;
    return nextIndex < tokens.length ? tokens[nextIndex] : null;
  }
  function stateSnapshotFromSyntax(nextState, prev) {
    return {
      nextState,
      matchStack,
      syntaxStack,
      thenStack,
      tokenIndex,
      prev
    };
  }
  function pushThenStack(nextState) {
    thenStack = {
      nextState,
      matchStack,
      syntaxStack,
      prev: thenStack
    };
  }
  function pushElseStack(nextState) {
    elseStack = stateSnapshotFromSyntax(nextState, elseStack);
  }
  function addTokenToMatch() {
    matchStack = {
      type: TOKEN,
      syntax: state.syntax,
      token: token2,
      prev: matchStack
    };
    moveToNextToken();
    syntaxStash = null;
    if (tokenIndex > longestMatch)
      longestMatch = tokenIndex;
  }
  function openSyntax() {
    syntaxStack = {
      syntax: state.syntax,
      opts: state.syntax.opts || syntaxStack !== null && syntaxStack.opts || null,
      prev: syntaxStack
    };
    matchStack = {
      type: OPEN_SYNTAX,
      syntax: state.syntax,
      token: matchStack.token,
      prev: matchStack
    };
  }
  function closeSyntax() {
    if (matchStack.type === OPEN_SYNTAX)
      matchStack = matchStack.prev;
    else
      matchStack = {
        type: CLOSE_SYNTAX,
        syntax: syntaxStack.syntax,
        token: matchStack.token,
        prev: matchStack
      };
    syntaxStack = syntaxStack.prev;
  }
  let syntaxStack = null;
  let thenStack = null;
  let elseStack = null;
  let syntaxStash = null;
  let iterationCount = 0;
  let exitReason = null;
  let token2 = null;
  let tokenIndex = -1;
  let longestMatch = 0;
  let matchStack = {
    type: STUB,
    syntax: null,
    token: null,
    prev: null
  };
  moveToNextToken();
  while (exitReason === null && ++iterationCount < ITERATION_LIMIT)
    switch (state.type) {
      case "Match":
        if (thenStack === null) {
          if (token2 !== null) {
            if (tokenIndex !== tokens.length - 1 || token2.value !== "\\0" && token2.value !== "\\9") {
              state = MISMATCH;
              break;
            }
          }
          exitReason = EXIT_REASON_MATCH;
          break;
        }
        state = thenStack.nextState;
        if (state === DISALLOW_EMPTY)
          if (thenStack.matchStack === matchStack) {
            state = MISMATCH;
            break;
          } else
            state = MATCH;
        while (thenStack.syntaxStack !== syntaxStack)
          closeSyntax();
        thenStack = thenStack.prev;
        break;
      case "Mismatch":
        if (syntaxStash !== null && syntaxStash !== false) {
          if (elseStack === null || tokenIndex > elseStack.tokenIndex) {
            elseStack = syntaxStash;
            syntaxStash = false;
          }
        } else if (elseStack === null) {
          exitReason = EXIT_REASON_MISMATCH;
          break;
        }
        state = elseStack.nextState;
        thenStack = elseStack.thenStack;
        syntaxStack = elseStack.syntaxStack;
        matchStack = elseStack.matchStack;
        tokenIndex = elseStack.tokenIndex;
        token2 = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
        elseStack = elseStack.prev;
        break;
      case "MatchGraph":
        state = state.match;
        break;
      case "If":
        if (state.else !== MISMATCH)
          pushElseStack(state.else);
        if (state.then !== MATCH)
          pushThenStack(state.then);
        state = state.match;
        break;
      case "MatchOnce":
        state = {
          type: "MatchOnceBuffer",
          syntax: state,
          index: 0,
          mask: 0
        };
        break;
      case "MatchOnceBuffer": {
        const terms = state.syntax.terms;
        if (state.index === terms.length) {
          if (state.mask === 0 || state.syntax.all) {
            state = MISMATCH;
            break;
          }
          state = MATCH;
          break;
        }
        if (state.mask === (1 << terms.length) - 1) {
          state = MATCH;
          break;
        }
        for (;state.index < terms.length; state.index++) {
          const matchFlag = 1 << state.index;
          if ((state.mask & matchFlag) === 0) {
            pushElseStack(state);
            pushThenStack({
              type: "AddMatchOnce",
              syntax: state.syntax,
              mask: state.mask | matchFlag
            });
            state = terms[state.index++];
            break;
          }
        }
        break;
      }
      case "AddMatchOnce":
        state = {
          type: "MatchOnceBuffer",
          syntax: state.syntax,
          index: 0,
          mask: state.mask
        };
        break;
      case "Enum":
        if (token2 !== null) {
          let name$49 = token2.value.toLowerCase();
          if (name$49.indexOf("\\") !== -1)
            name$49 = name$49.replace(/\\[09].*$/, "");
          if (hasOwnProperty$2.call(state.map, name$49)) {
            state = state.map[name$49];
            break;
          }
        }
        state = MISMATCH;
        break;
      case "Generic": {
        const opts = syntaxStack !== null ? syntaxStack.opts : null;
        const lastTokenIndex$1 = tokenIndex + Math.floor(state.fn(token2, getNextToken, opts));
        if (!isNaN(lastTokenIndex$1) && lastTokenIndex$1 > tokenIndex) {
          while (tokenIndex < lastTokenIndex$1)
            addTokenToMatch();
          state = MATCH;
        } else
          state = MISMATCH;
        break;
      }
      case "Type":
      case "Property": {
        const syntaxDict = state.type === "Type" ? "types" : "properties";
        const dictSyntax = hasOwnProperty$2.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null;
        if (!dictSyntax || !dictSyntax.match)
          throw new Error("Bad syntax reference: " + (state.type === "Type" ? "<" + state.name + ">" : "<'" + state.name + "'>"));
        if (syntaxStash !== false && token2 !== null && state.type === "Type") {
          if (state.name === "custom-ident" && token2.type === Ident || state.name === "length" && token2.value === "0") {
            if (syntaxStash === null)
              syntaxStash = stateSnapshotFromSyntax(state, elseStack);
            state = MISMATCH;
            break;
          }
        }
        openSyntax();
        state = dictSyntax.matchRef || dictSyntax.match;
        break;
      }
      case "Keyword": {
        const name$49 = state.name;
        if (token2 !== null) {
          let keywordName = token2.value;
          if (keywordName.indexOf("\\") !== -1)
            keywordName = keywordName.replace(/\\[09].*$/, "");
          if (areStringsEqualCaseInsensitive(keywordName, name$49)) {
            addTokenToMatch();
            state = MATCH;
            break;
          }
        }
        state = MISMATCH;
        break;
      }
      case "AtKeyword":
      case "Function":
        if (token2 !== null && areStringsEqualCaseInsensitive(token2.value, state.name)) {
          addTokenToMatch();
          state = MATCH;
          break;
        }
        state = MISMATCH;
        break;
      case "Token":
        if (token2 !== null && token2.value === state.value) {
          addTokenToMatch();
          state = MATCH;
          break;
        }
        state = MISMATCH;
        break;
      case "Comma":
        if (token2 !== null && token2.type === Comma)
          if (isCommaContextStart(matchStack.token))
            state = MISMATCH;
          else {
            addTokenToMatch();
            state = isCommaContextEnd(token2) ? MISMATCH : MATCH;
          }
        else
          state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token2) ? MATCH : MISMATCH;
        break;
      case "String":
        let string4 = "";
        let lastTokenIndex = tokenIndex;
        for (;lastTokenIndex < tokens.length && string4.length < state.value.length; lastTokenIndex++)
          string4 += tokens[lastTokenIndex].value;
        if (areStringsEqualCaseInsensitive(string4, state.value)) {
          while (tokenIndex < lastTokenIndex)
            addTokenToMatch();
          state = MATCH;
        } else
          state = MISMATCH;
        break;
      default:
        throw new Error("Unknown node type: " + state.type);
    }
  totalIterationCount += iterationCount;
  switch (exitReason) {
    case null:
      console.warn("[csstree-match] BREAK after " + ITERATION_LIMIT + " iterations");
      exitReason = EXIT_REASON_ITERATION_LIMIT;
      matchStack = null;
      break;
    case EXIT_REASON_MATCH:
      while (syntaxStack !== null)
        closeSyntax();
      break;
    default:
      matchStack = null;
  }
  return {
    tokens,
    reason: exitReason,
    iterations: iterationCount,
    match: matchStack,
    longestMatch
  };
}
function matchAsTree(tokens, matchGraph, syntaxes) {
  const matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
  if (matchResult.match === null)
    return matchResult;
  let item = matchResult.match;
  let host = matchResult.match = {
    syntax: matchGraph.syntax || null,
    match: []
  };
  const hostStack = [host];
  item = reverseList(item).prev;
  while (item !== null) {
    switch (item.type) {
      case OPEN_SYNTAX:
        host.match.push(host = {
          syntax: item.syntax,
          match: []
        });
        hostStack.push(host);
        break;
      case CLOSE_SYNTAX:
        hostStack.pop();
        host = hostStack[hostStack.length - 1];
        break;
      default:
        host.match.push({
          syntax: item.syntax || null,
          token: item.token.value,
          node: item.token.node
        });
    }
    item = item.prev;
  }
  return matchResult;
}
function getTrace(node3) {
  function shouldPutToTrace(syntax) {
    if (syntax === null)
      return false;
    return syntax.type === "Type" || syntax.type === "Property" || syntax.type === "Keyword";
  }
  function hasMatch(matchNode) {
    if (Array.isArray(matchNode.match)) {
      for (let i = 0;i < matchNode.match.length; i++)
        if (hasMatch(matchNode.match[i])) {
          if (shouldPutToTrace(matchNode.syntax))
            result.unshift(matchNode.syntax);
          return true;
        }
    } else if (matchNode.node === node3) {
      result = shouldPutToTrace(matchNode.syntax) ? [matchNode.syntax] : [];
      return true;
    }
    return false;
  }
  let result = null;
  if (this.matched !== null)
    hasMatch(this.matched);
  return result;
}
function isType(node3, type2) {
  return testNode(this, node3, (match) => match.type === "Type" && match.name === type2);
}
function isProperty(node3, property$1) {
  return testNode(this, node3, (match) => match.type === "Property" && match.name === property$1);
}
function isKeyword(node3) {
  return testNode(this, node3, (match) => match.type === "Keyword");
}
function testNode(match, node3, fn3) {
  const trace8 = getTrace.call(match, node3);
  if (trace8 === null)
    return false;
  return trace8.some(fn3);
}
function getFirstMatchNode(matchNode) {
  if ("node" in matchNode)
    return matchNode.node;
  return getFirstMatchNode(matchNode.match[0]);
}
function getLastMatchNode(matchNode) {
  if ("node" in matchNode)
    return matchNode.node;
  return getLastMatchNode(matchNode.match[matchNode.match.length - 1]);
}
function matchFragments(lexer$1, ast, match, type2, name$49) {
  function findFragments(matchNode) {
    if (matchNode.syntax !== null && matchNode.syntax.type === type2 && matchNode.syntax.name === name$49) {
      const start = getFirstMatchNode(matchNode);
      const end = getLastMatchNode(matchNode);
      lexer$1.syntax.walk(ast, function(node3, item, list2) {
        if (node3 === start) {
          const nodes = new List;
          do {
            nodes.appendData(item.data);
            if (item.data === end)
              break;
            item = item.next;
          } while (item !== null);
          fragments.push({
            parent: list2,
            nodes
          });
        }
      });
    }
    if (Array.isArray(matchNode.match))
      matchNode.match.forEach(findFragments);
  }
  const fragments = [];
  if (match.matched !== null)
    findFragments(match.matched);
  return fragments;
}
function isValidNumber(value) {
  return typeof value === "number" && isFinite(value) && Math.floor(value) === value && value >= 0;
}
function isValidLocation(loc) {
  return Boolean(loc) && isValidNumber(loc.offset) && isValidNumber(loc.line) && isValidNumber(loc.column);
}
function createNodeStructureChecker(type2, fields) {
  return function checkNode(node3, warn2) {
    if (!node3 || node3.constructor !== Object)
      return warn2(node3, "Type of node should be an Object");
    for (let key in node3) {
      let valid = true;
      if (hasOwnProperty$1.call(node3, key) === false)
        continue;
      if (key === "type") {
        if (node3.type !== type2)
          warn2(node3, "Wrong node type `" + node3.type + "`, expected `" + type2 + "`");
      } else if (key === "loc") {
        if (node3.loc === null)
          continue;
        else if (node3.loc && node3.loc.constructor === Object)
          if (typeof node3.loc.source !== "string")
            key += ".source";
          else if (!isValidLocation(node3.loc.start))
            key += ".start";
          else if (!isValidLocation(node3.loc.end))
            key += ".end";
          else
            continue;
        valid = false;
      } else if (fields.hasOwnProperty(key)) {
        valid = false;
        for (let i = 0;!valid && i < fields[key].length; i++) {
          const fieldType = fields[key][i];
          switch (fieldType) {
            case String:
              valid = typeof node3[key] === "string";
              break;
            case Boolean:
              valid = typeof node3[key] === "boolean";
              break;
            case null:
              valid = node3[key] === null;
              break;
            default:
              if (typeof fieldType === "string")
                valid = node3[key] && node3[key].type === fieldType;
              else if (Array.isArray(fieldType))
                valid = node3[key] instanceof List;
          }
        }
      } else
        warn2(node3, "Unknown field `" + key + "` for " + type2 + " node type");
      if (!valid)
        warn2(node3, "Bad value for `" + type2 + "." + key + "`");
    }
    for (const key in fields)
      if (hasOwnProperty$1.call(fields, key) && hasOwnProperty$1.call(node3, key) === false)
        warn2(node3, "Field `" + type2 + "." + key + "` is missed");
  };
}
function genTypesList(fieldTypes, path2) {
  const docsTypes = [];
  for (let i = 0;i < fieldTypes.length; i++) {
    const fieldType = fieldTypes[i];
    if (fieldType === String || fieldType === Boolean)
      docsTypes.push(fieldType.name.toLowerCase());
    else if (fieldType === null)
      docsTypes.push("null");
    else if (typeof fieldType === "string")
      docsTypes.push(fieldType);
    else if (Array.isArray(fieldType))
      docsTypes.push("List<" + (genTypesList(fieldType, path2) || "any") + ">");
    else
      throw new Error("Wrong value `" + fieldType + "` in `" + path2 + "` structure definition");
  }
  return docsTypes.join(" | ");
}
function processStructure(name$49, nodeType) {
  const structure$49 = nodeType.structure;
  const fields = {
    type: String,
    loc: true
  };
  const docs = { type: '"' + name$49 + '"' };
  for (const key in structure$49) {
    if (hasOwnProperty$1.call(structure$49, key) === false)
      continue;
    docs[key] = genTypesList(fields[key] = Array.isArray(structure$49[key]) ? structure$49[key].slice() : [structure$49[key]], name$49 + "." + key);
  }
  return {
    docs,
    check: createNodeStructureChecker(name$49, fields)
  };
}
function getStructureFromConfig(config2) {
  const structure$49 = {};
  if (config2.node) {
    for (const name$49 in config2.node)
      if (hasOwnProperty$1.call(config2.node, name$49)) {
        const nodeType = config2.node[name$49];
        if (nodeType.structure)
          structure$49[name$49] = processStructure(name$49, nodeType);
        else
          throw new Error("Missed `structure` field in `" + name$49 + "` node type definition");
      }
  }
  return structure$49;
}
function dumpMapSyntax(map3, compact, syntaxAsAst) {
  const result = {};
  for (const name$49 in map3)
    if (map3[name$49].syntax)
      result[name$49] = syntaxAsAst ? map3[name$49].syntax : generate$50(map3[name$49].syntax, { compact });
  return result;
}
function dumpAtruleMapSyntax(map3, compact, syntaxAsAst) {
  const result = {};
  for (const [name$49, atrule] of Object.entries(map3))
    result[name$49] = {
      prelude: atrule.prelude && (syntaxAsAst ? atrule.prelude.syntax : generate$50(atrule.prelude.syntax, { compact })),
      descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst)
    };
  return result;
}
function valueHasVar(tokens) {
  for (let i = 0;i < tokens.length; i++)
    if (tokens[i].value.toLowerCase() === "var(")
      return true;
  return false;
}
function syntaxHasTopLevelCommaMultiplier(syntax) {
  const singleTerm = syntax.terms[0];
  return syntax.explicit === false && syntax.terms.length === 1 && singleTerm.type === "Multiplier" && singleTerm.comma === true;
}
function buildMatchResult(matched, error49, iterations) {
  return {
    matched,
    iterations,
    error: error49,
    ...trace_exports
  };
}
function matchSyntax(lexer$1, syntax, value, useCssWideKeywords) {
  const tokens = prepare_tokens_default(value, lexer$1.syntax);
  let result;
  if (valueHasVar(tokens))
    return buildMatchResult(null, /* @__PURE__ */ new Error("Matching for a tree with var() is not supported"));
  if (useCssWideKeywords)
    result = matchAsTree(tokens, lexer$1.cssWideKeywordsSyntax, lexer$1);
  if (!useCssWideKeywords || !result.match) {
    result = matchAsTree(tokens, syntax.match, lexer$1);
    if (!result.match)
      return buildMatchResult(null, new SyntaxMatchError(result.reason, syntax.syntax, value, result), result.iterations);
  }
  return buildMatchResult(result.match, null, result.iterations);
}
function appendOrSet(a2, b5) {
  if (typeof b5 === "string" && /^\s*\|/.test(b5))
    return typeof a2 === "string" ? a2 + b5 : b5.replace(/^\s*\|\s*/, "");
  return b5 || null;
}
function sliceProps(obj, props) {
  const result = Object.create(null);
  for (const [key, value] of Object.entries(obj))
    if (value) {
      result[key] = {};
      for (const prop of Object.keys(value))
        if (props.includes(prop))
          result[key][prop] = value[prop];
    }
  return result;
}
function mix(dest, src) {
  const result = { ...dest };
  for (const [prop, value] of Object.entries(src))
    switch (prop) {
      case "generic":
        result[prop] = Boolean(value);
        break;
      case "cssWideKeywords":
        result[prop] = dest[prop] ? [...dest[prop], ...value] : value || [];
        break;
      case "units":
        result[prop] = { ...dest[prop] };
        for (const [name$49, patch$1] of Object.entries(value))
          result[prop][name$49] = Array.isArray(patch$1) ? patch$1 : [];
        break;
      case "atrules":
        result[prop] = { ...dest[prop] };
        for (const [name$49, atrule] of Object.entries(value)) {
          const exists2 = result[prop][name$49] || {};
          const current = result[prop][name$49] = {
            prelude: exists2.prelude || null,
            descriptors: { ...exists2.descriptors }
          };
          if (!atrule)
            continue;
          current.prelude = atrule.prelude ? appendOrSet(current.prelude, atrule.prelude) : current.prelude || null;
          for (const [descriptorName, descriptorValue] of Object.entries(atrule.descriptors || {}))
            current.descriptors[descriptorName] = descriptorValue ? appendOrSet(current.descriptors[descriptorName], descriptorValue) : null;
          if (!Object.keys(current.descriptors).length)
            current.descriptors = null;
        }
        break;
      case "types":
      case "properties":
        result[prop] = { ...dest[prop] };
        for (const [name$49, syntax] of Object.entries(value))
          result[prop][name$49] = appendOrSet(result[prop][name$49], syntax);
        break;
      case "scope":
      case "features":
        result[prop] = { ...dest[prop] };
        for (const [name$49, props] of Object.entries(value))
          result[prop][name$49] = {
            ...result[prop][name$49],
            ...props
          };
        break;
      case "parseContext":
        result[prop] = {
          ...dest[prop],
          ...value
        };
        break;
      case "atrule":
      case "pseudo":
        result[prop] = {
          ...dest[prop],
          ...sliceProps(value, ["parse"])
        };
        break;
      case "node":
        result[prop] = {
          ...dest[prop],
          ...sliceProps(value, [
            "name",
            "structure",
            "parse",
            "generate",
            "walkContext"
          ])
        };
        break;
    }
  return result;
}
function createSyntax(config2) {
  const parse$51 = createParser(config2);
  const walk$2 = createWalker(config2);
  const generate$51 = createGenerator(config2);
  const { fromPlainObject: fromPlainObject$1, toPlainObject: toPlainObject$1 } = createConvertor(walk$2);
  const syntax = {
    lexer: null,
    createLexer: (config$1) => new Lexer(config$1, syntax, syntax.lexer.structure),
    tokenize: tokenize$1,
    parse: parse$51,
    generate: generate$51,
    walk: walk$2,
    find: walk$2.find,
    findLast: walk$2.findLast,
    findAll: walk$2.findAll,
    fromPlainObject: fromPlainObject$1,
    toPlainObject: toPlainObject$1,
    fork(extension) {
      const base = mix({}, config2);
      return createSyntax(typeof extension === "function" ? extension(base) : mix(base, extension));
    }
  };
  syntax.lexer = new Lexer({
    generic: config2.generic,
    cssWideKeywords: config2.cssWideKeywords,
    units: config2.units,
    types: config2.types,
    atrules: config2.atrules,
    properties: config2.properties,
    node: config2.node
  }, syntax);
  return syntax;
}
function preprocessAtrules(dict) {
  const result = Object.create(null);
  for (const [atruleName, atrule] of Object.entries(dict)) {
    let descriptors = null;
    if (atrule.descriptors) {
      descriptors = Object.create(null);
      for (const [name$49, descriptor] of Object.entries(atrule.descriptors))
        descriptors[name$49] = descriptor.syntax;
    }
    result[atruleName.substr(1)] = {
      prelude: atrule.syntax.trim().replace(/\{(.|\s)+\}/, "").match(/^@\S+\s+([^;\{]*)/)[1].trim() || null,
      descriptors
    };
  }
  return result;
}
function patchDictionary(dict, patchDict) {
  const result = Object.create(null);
  for (const [key, value] of Object.entries(dict))
    if (value)
      result[key] = value.syntax || value;
  for (const key of Object.keys(patchDict))
    if (hasOwn(dict, key))
      if (patchDict[key].syntax)
        result[key] = extendSyntax.test(patchDict[key].syntax) ? result[key] + " " + patchDict[key].syntax.trim() : patchDict[key].syntax;
      else
        delete result[key];
    else if (patchDict[key].syntax)
      result[key] = patchDict[key].syntax.replace(extendSyntax, "");
  return result;
}
function preprocessPatchAtrulesDescritors(declarations) {
  const result = {};
  for (const [key, value] of Object.entries(declarations || {}))
    result[key] = typeof value === "string" ? { syntax: value } : value;
  return result;
}
function patchAtrules(dict, patchDict) {
  const result = {};
  for (const key in dict) {
    if (patchDict[key] === null)
      continue;
    const atrulePatch = patchDict[key] || {};
    result[key] = {
      prelude: key in patchDict && "prelude" in atrulePatch ? atrulePatch.prelude : dict[key].prelude || null,
      descriptors: patchDictionary(dict[key].descriptors || {}, preprocessPatchAtrulesDescritors(atrulePatch.descriptors))
    };
  }
  for (const [key, atrulePatch] of Object.entries(patchDict))
    if (atrulePatch && !hasOwn(dict, key))
      result[key] = {
        prelude: atrulePatch.prelude || null,
        descriptors: atrulePatch.descriptors ? patchDictionary({}, preprocessPatchAtrulesDescritors(atrulePatch.descriptors)) : null
      };
  return result;
}
function checkInteger(offset, disallowSign) {
  let pos = this.tokenStart + offset;
  const code$1 = this.charCodeAt(pos);
  if (code$1 === PLUSSIGN$5 || code$1 === HYPHENMINUS$2) {
    if (disallowSign)
      this.error("Number sign is not allowed");
    pos++;
  }
  for (;pos < this.tokenEnd; pos++)
    if (!isDigit(this.charCodeAt(pos)))
      this.error("Integer is expected", pos);
}
function checkTokenIsInteger(disallowSign) {
  return checkInteger.call(this, 0, disallowSign);
}
function expectCharCode(offset, code$1) {
  if (!this.cmpChar(this.tokenStart + offset, code$1)) {
    let msg = "";
    switch (code$1) {
      case N5:
        msg = "N is expected";
        break;
      case HYPHENMINUS$2:
        msg = "HyphenMinus is expected";
        break;
    }
    this.error(msg, this.tokenStart + offset);
  }
}
function consumeB() {
  let offset = 0;
  let sign = 0;
  let type2 = this.tokenType;
  while (type2 === WhiteSpace || type2 === Comment3)
    type2 = this.lookupType(++offset);
  if (type2 !== Number$1)
    if (this.isDelim(PLUSSIGN$5, offset) || this.isDelim(HYPHENMINUS$2, offset)) {
      sign = this.isDelim(PLUSSIGN$5, offset) ? PLUSSIGN$5 : HYPHENMINUS$2;
      do
        type2 = this.lookupType(++offset);
      while (type2 === WhiteSpace || type2 === Comment3);
      if (type2 !== Number$1) {
        this.skip(offset);
        checkTokenIsInteger.call(this, DISALLOW_SIGN);
      }
    } else
      return null;
  if (offset > 0)
    this.skip(offset);
  if (sign === 0) {
    type2 = this.charCodeAt(this.tokenStart);
    if (type2 !== PLUSSIGN$5 && type2 !== HYPHENMINUS$2)
      this.error("Number sign is expected");
  }
  checkTokenIsInteger.call(this, sign !== 0);
  return sign === HYPHENMINUS$2 ? "-" + this.consume(Number$1) : this.consume(Number$1);
}
function parse$49() {
  const start = this.tokenStart;
  let a2 = null;
  let b5 = null;
  if (this.tokenType === Number$1) {
    checkTokenIsInteger.call(this, ALLOW_SIGN);
    b5 = this.consume(Number$1);
  } else if (this.tokenType === Ident && this.cmpChar(this.tokenStart, HYPHENMINUS$2)) {
    a2 = "-1";
    expectCharCode.call(this, 1, N5);
    switch (this.tokenEnd - this.tokenStart) {
      case 2:
        this.next();
        b5 = consumeB.call(this);
        break;
      case 3:
        expectCharCode.call(this, 2, HYPHENMINUS$2);
        this.next();
        this.skipSC();
        checkTokenIsInteger.call(this, DISALLOW_SIGN);
        b5 = "-" + this.consume(Number$1);
        break;
      default:
        expectCharCode.call(this, 2, HYPHENMINUS$2);
        checkInteger.call(this, 3, DISALLOW_SIGN);
        this.next();
        b5 = this.substrToCursor(start + 2);
    }
  } else if (this.tokenType === Ident || this.isDelim(PLUSSIGN$5) && this.lookupType(1) === Ident) {
    let sign = 0;
    a2 = "1";
    if (this.isDelim(PLUSSIGN$5)) {
      sign = 1;
      this.next();
    }
    expectCharCode.call(this, 0, N5);
    switch (this.tokenEnd - this.tokenStart) {
      case 1:
        this.next();
        b5 = consumeB.call(this);
        break;
      case 2:
        expectCharCode.call(this, 1, HYPHENMINUS$2);
        this.next();
        this.skipSC();
        checkTokenIsInteger.call(this, DISALLOW_SIGN);
        b5 = "-" + this.consume(Number$1);
        break;
      default:
        expectCharCode.call(this, 1, HYPHENMINUS$2);
        checkInteger.call(this, 2, DISALLOW_SIGN);
        this.next();
        b5 = this.substrToCursor(start + sign + 1);
    }
  } else if (this.tokenType === Dimension) {
    const code$1 = this.charCodeAt(this.tokenStart);
    const sign = code$1 === PLUSSIGN$5 || code$1 === HYPHENMINUS$2;
    let i = this.tokenStart + sign;
    for (;i < this.tokenEnd; i++)
      if (!isDigit(this.charCodeAt(i)))
        break;
    if (i === this.tokenStart + sign)
      this.error("Integer is expected", this.tokenStart + sign);
    expectCharCode.call(this, i - this.tokenStart, N5);
    a2 = this.substring(start, i);
    if (i + 1 === this.tokenEnd) {
      this.next();
      b5 = consumeB.call(this);
    } else {
      expectCharCode.call(this, i - this.tokenStart + 1, HYPHENMINUS$2);
      if (i + 2 === this.tokenEnd) {
        this.next();
        this.skipSC();
        checkTokenIsInteger.call(this, DISALLOW_SIGN);
        b5 = "-" + this.consume(Number$1);
      } else {
        checkInteger.call(this, i - this.tokenStart + 2, DISALLOW_SIGN);
        this.next();
        b5 = this.substrToCursor(i + 1);
      }
    }
  } else
    this.error();
  if (a2 !== null && a2.charCodeAt(0) === PLUSSIGN$5)
    a2 = a2.substr(1);
  if (b5 !== null && b5.charCodeAt(0) === PLUSSIGN$5)
    b5 = b5.substr(1);
  return {
    type: "AnPlusB",
    loc: this.getLocation(start, this.tokenStart),
    a: a2,
    b: b5
  };
}
function generate$49(node3) {
  if (node3.a) {
    const a2 = node3.a === "+1" && "n" || node3.a === "1" && "n" || node3.a === "-1" && "-n" || node3.a + "n";
    if (node3.b) {
      const b5 = node3.b[0] === "-" || node3.b[0] === "+" ? node3.b : "+" + node3.b;
      this.tokenize(a2 + b5);
    } else
      this.tokenize(a2);
  } else
    this.tokenize(node3.b);
}
function consumeRaw$4() {
  return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon, true);
}
function isDeclarationBlockAtrule() {
  for (let offset = 1, type2;type2 = this.lookupType(offset); offset++) {
    if (type2 === RightCurlyBracket)
      return true;
    if (type2 === LeftCurlyBracket || type2 === AtKeyword)
      return false;
  }
  return false;
}
function parse$48(isDeclaration = false) {
  const start = this.tokenStart;
  let name$49;
  let nameLowerCase;
  let prelude = null;
  let block2 = null;
  this.eat(AtKeyword);
  name$49 = this.substrToCursor(start + 1);
  nameLowerCase = name$49.toLowerCase();
  this.skipSC();
  if (this.eof === false && this.tokenType !== LeftCurlyBracket && this.tokenType !== Semicolon) {
    if (this.parseAtrulePrelude)
      prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name$49, isDeclaration), consumeRaw$4);
    else
      prelude = consumeRaw$4.call(this, this.tokenIndex);
    this.skipSC();
  }
  switch (this.tokenType) {
    case Semicolon:
      this.next();
      break;
    case LeftCurlyBracket:
      if (hasOwnProperty.call(this.atrule, nameLowerCase) && typeof this.atrule[nameLowerCase].block === "function")
        block2 = this.atrule[nameLowerCase].block.call(this, isDeclaration);
      else
        block2 = this.Block(isDeclarationBlockAtrule.call(this));
      break;
  }
  return {
    type: "Atrule",
    loc: this.getLocation(start, this.tokenStart),
    name: name$49,
    prelude,
    block: block2
  };
}
function generate$48(node3) {
  this.token(AtKeyword, "@" + node3.name);
  if (node3.prelude !== null)
    this.node(node3.prelude);
  if (node3.block)
    this.node(node3.block);
  else
    this.token(Semicolon, ";");
}
function parse$47(name$49) {
  let children = null;
  if (name$49 !== null)
    name$49 = name$49.toLowerCase();
  this.skipSC();
  if (hasOwnProperty.call(this.atrule, name$49) && typeof this.atrule[name$49].prelude === "function")
    children = this.atrule[name$49].prelude.call(this);
  else
    children = this.readSequence(this.scope.AtrulePrelude);
  this.skipSC();
  if (this.eof !== true && this.tokenType !== LeftCurlyBracket && this.tokenType !== Semicolon)
    this.error("Semicolon or block is expected");
  return {
    type: "AtrulePrelude",
    loc: this.getLocationFromList(children),
    children
  };
}
function generate$47(node3) {
  this.children(node3);
}
function getAttributeName() {
  if (this.eof)
    this.error("Unexpected end of input");
  const start = this.tokenStart;
  let expectIdent = false;
  if (this.isDelim(ASTERISK$5)) {
    expectIdent = true;
    this.next();
  } else if (!this.isDelim(VERTICALLINE$2))
    this.eat(Ident);
  if (this.isDelim(VERTICALLINE$2)) {
    if (this.charCodeAt(this.tokenStart + 1) !== EQUALSSIGN$1) {
      this.next();
      this.eat(Ident);
    } else if (expectIdent)
      this.error("Identifier is expected", this.tokenEnd);
  } else if (expectIdent)
    this.error("Vertical line is expected");
  return {
    type: "Identifier",
    loc: this.getLocation(start, this.tokenStart),
    name: this.substrToCursor(start)
  };
}
function getOperator() {
  const start = this.tokenStart;
  const code$1 = this.charCodeAt(start);
  if (code$1 !== EQUALSSIGN$1 && code$1 !== TILDE$2 && code$1 !== CIRCUMFLEXACCENT && code$1 !== DOLLARSIGN$1 && code$1 !== ASTERISK$5 && code$1 !== VERTICALLINE$2)
    this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected");
  this.next();
  if (code$1 !== EQUALSSIGN$1) {
    if (!this.isDelim(EQUALSSIGN$1))
      this.error("Equal sign is expected");
    this.next();
  }
  return this.substrToCursor(start);
}
function parse$46() {
  const start = this.tokenStart;
  let name$49;
  let matcher = null;
  let value = null;
  let flags = null;
  this.eat(LeftSquareBracket);
  this.skipSC();
  name$49 = getAttributeName.call(this);
  this.skipSC();
  if (this.tokenType !== RightSquareBracket) {
    if (this.tokenType !== Ident) {
      matcher = getOperator.call(this);
      this.skipSC();
      value = this.tokenType === String$1 ? this.String() : this.Identifier();
      this.skipSC();
    }
    if (this.tokenType === Ident) {
      flags = this.consume(Ident);
      this.skipSC();
    }
  }
  this.eat(RightSquareBracket);
  return {
    type: "AttributeSelector",
    loc: this.getLocation(start, this.tokenStart),
    name: name$49,
    matcher,
    value,
    flags
  };
}
function generate$46(node3) {
  this.token(Delim, "[");
  this.node(node3.name);
  if (node3.matcher !== null) {
    this.tokenize(node3.matcher);
    this.node(node3.value);
  }
  if (node3.flags !== null)
    this.token(Ident, node3.flags);
  this.token(Delim, "]");
}
function consumeRaw$3() {
  return this.Raw(null, true);
}
function consumeRule() {
  return this.parseWithFallback(this.Rule, consumeRaw$3);
}
function consumeRawDeclaration() {
  return this.Raw(this.consumeUntilSemicolonIncluded, true);
}
function consumeDeclaration() {
  if (this.tokenType === Semicolon)
    return consumeRawDeclaration.call(this, this.tokenIndex);
  const node3 = this.parseWithFallback(this.Declaration, consumeRawDeclaration);
  if (this.tokenType === Semicolon)
    this.next();
  return node3;
}
function parse$45(isStyleBlock) {
  const consumer = isStyleBlock ? consumeDeclaration : consumeRule;
  const start = this.tokenStart;
  let children = this.createList();
  this.eat(LeftCurlyBracket);
  scan:
    while (!this.eof)
      switch (this.tokenType) {
        case RightCurlyBracket:
          break scan;
        case WhiteSpace:
        case Comment3:
          this.next();
          break;
        case AtKeyword:
          children.push(this.parseWithFallback(this.Atrule.bind(this, isStyleBlock), consumeRaw$3));
          break;
        default:
          if (isStyleBlock && this.isDelim(AMPERSAND$4))
            children.push(consumeRule.call(this));
          else
            children.push(consumer.call(this));
      }
  if (!this.eof)
    this.eat(RightCurlyBracket);
  return {
    type: "Block",
    loc: this.getLocation(start, this.tokenStart),
    children
  };
}
function generate$45(node3) {
  this.token(LeftCurlyBracket, "{");
  this.children(node3, (prev) => {
    if (prev.type === "Declaration")
      this.token(Semicolon, ";");
  });
  this.token(RightCurlyBracket, "}");
}
function parse$44(readSequence$1, recognizer) {
  const start = this.tokenStart;
  let children = null;
  this.eat(LeftSquareBracket);
  children = readSequence$1.call(this, recognizer);
  if (!this.eof)
    this.eat(RightSquareBracket);
  return {
    type: "Brackets",
    loc: this.getLocation(start, this.tokenStart),
    children
  };
}
function generate$44(node3) {
  this.token(Delim, "[");
  this.children(node3);
  this.token(Delim, "]");
}
function parse$43() {
  const start = this.tokenStart;
  this.eat(CDC);
  return {
    type: "CDC",
    loc: this.getLocation(start, this.tokenStart)
  };
}
function generate$43() {
  this.token(CDC, "-->");
}
function parse$42() {
  const start = this.tokenStart;
  this.eat(CDO);
  return {
    type: "CDO",
    loc: this.getLocation(start, this.tokenStart)
  };
}
function generate$42() {
  this.token(CDO, "<!--");
}
function parse$41() {
  this.eatDelim(FULLSTOP$2);
  return {
    type: "ClassSelector",
    loc: this.getLocation(this.tokenStart - 1, this.tokenEnd),
    name: this.consume(Ident)
  };
}
function generate$41(node3) {
  this.token(Delim, ".");
  this.token(Ident, node3.name);
}
function parse$40() {
  const start = this.tokenStart;
  let name$49;
  switch (this.tokenType) {
    case WhiteSpace:
      name$49 = " ";
      break;
    case Delim:
      switch (this.charCodeAt(this.tokenStart)) {
        case GREATERTHANSIGN$2:
        case PLUSSIGN$4:
        case TILDE$1:
          this.next();
          break;
        case SOLIDUS$7:
          this.next();
          this.eatIdent("deep");
          this.eatDelim(SOLIDUS$7);
          break;
        default:
          this.error("Combinator is expected");
      }
      name$49 = this.substrToCursor(start);
      break;
  }
  return {
    type: "Combinator",
    loc: this.getLocation(start, this.tokenStart),
    name: name$49
  };
}
function generate$40(node3) {
  this.tokenize(node3.name);
}
function parse$39() {
  const start = this.tokenStart;
  let end = this.tokenEnd;
  this.eat(Comment3);
  if (end - start + 2 >= 2 && this.charCodeAt(end - 2) === ASTERISK$4 && this.charCodeAt(end - 1) === SOLIDUS$6)
    end -= 2;
  return {
    type: "Comment",
    loc: this.getLocation(start, this.tokenStart),
    value: this.substring(start + 2, end)
  };
}
function generate$39(node3) {
  this.token(Comment3, "/*" + node3.value + "*/");
}
function featureOrRange(kind) {
  if (this.lookupTypeNonSC(1) === Ident && likelyFeatureToken.has(this.lookupTypeNonSC(2)))
    return this.Feature(kind);
  return this.FeatureRange(kind);
}
function parse$38(kind = "media") {
  const children = this.createList();
  scan:
    while (!this.eof)
      switch (this.tokenType) {
        case Comment3:
        case WhiteSpace:
          this.next();
          continue;
        case Ident:
          children.push(this.Identifier());
          break;
        case LeftParenthesis: {
          let term = this.parseWithFallback(() => parentheses[kind].call(this, kind), () => null);
          if (!term)
            term = this.parseWithFallback(() => {
              this.eat(LeftParenthesis);
              const res = this.Condition(kind);
              this.eat(RightParenthesis);
              return res;
            }, () => {
              return this.GeneralEnclosed(kind);
            });
          children.push(term);
          break;
        }
        case Function2: {
          let term = this.parseWithFallback(() => this.FeatureFunction(kind), () => null);
          if (!term)
            term = this.GeneralEnclosed(kind);
          children.push(term);
          break;
        }
        default:
          break scan;
      }
  if (children.isEmpty)
    this.error("Condition is expected");
  return {
    type: "Condition",
    loc: this.getLocationFromList(children),
    kind,
    children
  };
}
function generate$38(node3) {
  node3.children.forEach((child) => {
    if (child.type === "Condition") {
      this.token(LeftParenthesis, "(");
      this.node(child);
      this.token(RightParenthesis, ")");
    } else
      this.node(child);
  });
}
function consumeValueRaw() {
  return this.Raw(this.consumeUntilExclamationMarkOrSemicolon, true);
}
function consumeCustomPropertyRaw() {
  return this.Raw(this.consumeUntilExclamationMarkOrSemicolon, false);
}
function consumeValue() {
  const startValueToken = this.tokenIndex;
  const value = this.Value();
  if (value.type !== "Raw" && this.eof === false && this.tokenType !== Semicolon && this.isDelim(EXCLAMATIONMARK$1) === false && this.isBalanceEdge(startValueToken) === false)
    this.error();
  return value;
}
function parse$37() {
  const start = this.tokenStart;
  const startToken = this.tokenIndex;
  const property$1 = readProperty.call(this);
  const customProperty = isCustomProperty(property$1);
  const parseValue = customProperty ? this.parseCustomProperty : this.parseValue;
  const consumeRaw$5 = customProperty ? consumeCustomPropertyRaw : consumeValueRaw;
  let important = false;
  let value;
  this.skipSC();
  this.eat(Colon);
  const valueStart = this.tokenIndex;
  if (!customProperty)
    this.skipSC();
  if (parseValue)
    value = this.parseWithFallback(consumeValue, consumeRaw$5);
  else
    value = consumeRaw$5.call(this, this.tokenIndex);
  if (customProperty && value.type === "Value" && value.children.isEmpty) {
    for (let offset = valueStart - this.tokenIndex;offset <= 0; offset++)
      if (this.lookupType(offset) === WhiteSpace) {
        value.children.appendData({
          type: "WhiteSpace",
          loc: null,
          value: " "
        });
        break;
      }
  }
  if (this.isDelim(EXCLAMATIONMARK$1)) {
    important = getImportant.call(this);
    this.skipSC();
  }
  if (this.eof === false && this.tokenType !== Semicolon && this.isBalanceEdge(startToken) === false)
    this.error();
  return {
    type: "Declaration",
    loc: this.getLocation(start, this.tokenStart),
    important,
    property: property$1,
    value
  };
}
function generate$37(node3) {
  this.token(Ident, node3.property);
  this.token(Colon, ":");
  this.node(node3.value);
  if (node3.important) {
    this.token(Delim, "!");
    this.token(Ident, node3.important === true ? "important" : node3.important);
  }
}
function readProperty() {
  const start = this.tokenStart;
  if (this.tokenType === Delim)
    switch (this.charCodeAt(this.tokenStart)) {
      case ASTERISK$3:
      case DOLLARSIGN:
      case PLUSSIGN$3:
      case NUMBERSIGN$2:
      case AMPERSAND$3:
        this.next();
        break;
      case SOLIDUS$5:
        this.next();
        if (this.isDelim(SOLIDUS$5))
          this.next();
        break;
    }
  if (this.tokenType === Hash)
    this.eat(Hash);
  else
    this.eat(Ident);
  return this.substrToCursor(start);
}
function getImportant() {
  this.eat(Delim);
  this.skipSC();
  const important = this.consume(Ident);
  return important === "important" ? true : important;
}
function consumeRaw$2() {
  return this.Raw(this.consumeUntilSemicolonIncluded, true);
}
function parse$36() {
  const children = this.createList();
  scan:
    while (!this.eof)
      switch (this.tokenType) {
        case WhiteSpace:
        case Comment3:
        case Semicolon:
          this.next();
          break;
        case AtKeyword:
          children.push(this.parseWithFallback(this.Atrule.bind(this, true), consumeRaw$2));
          break;
        default:
          if (this.isDelim(AMPERSAND$2))
            children.push(this.parseWithFallback(this.Rule, consumeRaw$2));
          else
            children.push(this.parseWithFallback(this.Declaration, consumeRaw$2));
      }
  return {
    type: "DeclarationList",
    loc: this.getLocationFromList(children),
    children
  };
}
function generate$36(node3) {
  this.children(node3, (prev) => {
    if (prev.type === "Declaration")
      this.token(Semicolon, ";");
  });
}
function parse$35() {
  const start = this.tokenStart;
  const value = this.consumeNumber(Dimension);
  return {
    type: "Dimension",
    loc: this.getLocation(start, this.tokenStart),
    value,
    unit: this.substring(start + value.length, this.tokenStart)
  };
}
function generate$35(node3) {
  this.token(Dimension, node3.value + node3.unit);
}
function parse$34(kind) {
  const start = this.tokenStart;
  let name$49;
  let value = null;
  this.eat(LeftParenthesis);
  this.skipSC();
  name$49 = this.consume(Ident);
  this.skipSC();
  if (this.tokenType !== RightParenthesis) {
    this.eat(Colon);
    this.skipSC();
    switch (this.tokenType) {
      case Number$1:
        if (this.lookupNonWSType(1) === Delim)
          value = this.Ratio();
        else
          value = this.Number();
        break;
      case Dimension:
        value = this.Dimension();
        break;
      case Ident:
        value = this.Identifier();
        break;
      case Function2:
        value = this.parseWithFallback(() => {
          const res = this.Function(this.readSequence, this.scope.Value);
          this.skipSC();
          if (this.isDelim(SOLIDUS$4))
            this.error();
          return res;
        }, () => {
          return this.Ratio();
        });
        break;
      default:
        this.error("Number, dimension, ratio or identifier is expected");
    }
    this.skipSC();
  }
  if (!this.eof)
    this.eat(RightParenthesis);
  return {
    type: "Feature",
    loc: this.getLocation(start, this.tokenStart),
    kind,
    name: name$49,
    value
  };
}
function generate$34(node3) {
  this.token(LeftParenthesis, "(");
  this.token(Ident, node3.name);
  if (node3.value !== null) {
    this.token(Colon, ":");
    this.node(node3.value);
  }
  this.token(RightParenthesis, ")");
}
function getFeatureParser(kind, name$49) {
  const parser2 = (this.features[kind] || {})[name$49];
  if (typeof parser2 !== "function")
    this.error(`Unknown feature ${name$49}()`);
  return parser2;
}
function parse$33(kind = "unknown") {
  const start = this.tokenStart;
  const functionName = this.consumeFunctionName();
  const valueParser = getFeatureParser.call(this, kind, functionName.toLowerCase());
  this.skipSC();
  const value = this.parseWithFallback(() => {
    const startValueToken = this.tokenIndex;
    const value$1 = valueParser.call(this);
    if (this.eof === false && this.isBalanceEdge(startValueToken) === false)
      this.error();
    return value$1;
  }, () => this.Raw(null, false));
  if (!this.eof)
    this.eat(RightParenthesis);
  return {
    type: "FeatureFunction",
    loc: this.getLocation(start, this.tokenStart),
    kind,
    feature: functionName,
    value
  };
}
function generate$33(node3) {
  this.token(Function2, node3.feature + "(");
  this.node(node3.value);
  this.token(RightParenthesis, ")");
}
function readTerm() {
  this.skipSC();
  switch (this.tokenType) {
    case Number$1:
      if (this.isDelim(SOLIDUS$3, this.lookupOffsetNonSC(1)))
        return this.Ratio();
      else
        return this.Number();
    case Dimension:
      return this.Dimension();
    case Ident:
      return this.Identifier();
    case Function2:
      return this.parseWithFallback(() => {
        const res = this.Function(this.readSequence, this.scope.Value);
        this.skipSC();
        if (this.isDelim(SOLIDUS$3))
          this.error();
        return res;
      }, () => {
        return this.Ratio();
      });
    default:
      this.error("Number, dimension, ratio or identifier is expected");
  }
}
function readComparison(expectColon) {
  this.skipSC();
  if (this.isDelim(LESSTHANSIGN) || this.isDelim(GREATERTHANSIGN$1)) {
    const value = this.source[this.tokenStart];
    this.next();
    if (this.isDelim(EQUALSSIGN)) {
      this.next();
      return value + "=";
    }
    return value;
  }
  if (this.isDelim(EQUALSSIGN))
    return "=";
  this.error(`Expected ${expectColon ? '":", ' : ""}"<", ">", "=" or ")"`);
}
function parse$32(kind = "unknown") {
  const start = this.tokenStart;
  this.skipSC();
  this.eat(LeftParenthesis);
  const left2 = readTerm.call(this);
  const leftComparison = readComparison.call(this, left2.type === "Identifier");
  const middle2 = readTerm.call(this);
  let rightComparison = null;
  let right2 = null;
  if (this.lookupNonWSType(0) !== RightParenthesis) {
    rightComparison = readComparison.call(this);
    right2 = readTerm.call(this);
  }
  this.skipSC();
  this.eat(RightParenthesis);
  return {
    type: "FeatureRange",
    loc: this.getLocation(start, this.tokenStart),
    kind,
    left: left2,
    leftComparison,
    middle: middle2,
    rightComparison,
    right: right2
  };
}
function generate$32(node3) {
  this.token(LeftParenthesis, "(");
  this.node(node3.left);
  this.tokenize(node3.leftComparison);
  this.node(node3.middle);
  if (node3.right) {
    this.tokenize(node3.rightComparison);
    this.node(node3.right);
  }
  this.token(RightParenthesis, ")");
}
function parse$31(readSequence$1, recognizer) {
  const start = this.tokenStart;
  const name$49 = this.consumeFunctionName();
  const nameLowerCase = name$49.toLowerCase();
  let children;
  children = recognizer.hasOwnProperty(nameLowerCase) ? recognizer[nameLowerCase].call(this, recognizer) : readSequence$1.call(this, recognizer);
  if (!this.eof)
    this.eat(RightParenthesis);
  return {
    type: "Function",
    loc: this.getLocation(start, this.tokenStart),
    name: name$49,
    children
  };
}
function generate$31(node3) {
  this.token(Function2, node3.name + "(");
  this.children(node3);
  this.token(RightParenthesis, ")");
}
function parse$30(kind) {
  const start = this.tokenStart;
  let functionName = null;
  if (this.tokenType === Function2)
    functionName = this.consumeFunctionName();
  else
    this.eat(LeftParenthesis);
  const children = this.parseWithFallback(() => {
    const startValueToken = this.tokenIndex;
    const children$1 = this.readSequence(this.scope.Value);
    if (this.eof === false && this.isBalanceEdge(startValueToken) === false)
      this.error();
    return children$1;
  }, () => this.createSingleNodeList(this.Raw(null, false)));
  if (!this.eof)
    this.eat(RightParenthesis);
  return {
    type: "GeneralEnclosed",
    loc: this.getLocation(start, this.tokenStart),
    kind,
    function: functionName,
    children
  };
}
function generate$30(node3) {
  if (node3.function)
    this.token(Function2, node3.function + "(");
  else
    this.token(LeftParenthesis, "(");
  this.children(node3);
  this.token(RightParenthesis, ")");
}
function parse$29() {
  const start = this.tokenStart;
  this.eat(Hash);
  return {
    type: "Hash",
    loc: this.getLocation(start, this.tokenStart),
    value: this.substrToCursor(start + 1)
  };
}
function generate$29(node3) {
  this.token(Hash, "#" + node3.value);
}
function parse$28() {
  return {
    type: "Identifier",
    loc: this.getLocation(this.tokenStart, this.tokenEnd),
    name: this.consume(Ident)
  };
}
function generate$28(node3) {
  this.token(Ident, node3.name);
}
function parse$27() {
  const start = this.tokenStart;
  this.eat(Hash);
  return {
    type: "IdSelector",
    loc: this.getLocation(start, this.tokenStart),
    name: this.substrToCursor(start + 1)
  };
}
function generate$27(node3) {
  this.token(Delim, "#" + node3.name);
}
function parse$26() {
  let tokenStart = this.tokenStart;
  let name$49 = this.consume(Ident);
  while (this.isDelim(FULLSTOP$1)) {
    this.eat(Delim);
    name$49 += "." + this.consume(Ident);
  }
  return {
    type: "Layer",
    loc: this.getLocation(tokenStart, this.tokenStart),
    name: name$49
  };
}
function generate$26(node3) {
  this.tokenize(node3.name);
}
function parse$25() {
  const children = this.createList();
  this.skipSC();
  while (!this.eof) {
    children.push(this.Layer());
    if (this.lookupTypeNonSC(0) !== Comma)
      break;
    this.skipSC();
    this.next();
    this.skipSC();
  }
  return {
    type: "LayerList",
    loc: this.getLocationFromList(children),
    children
  };
}
function generate$25(node3) {
  this.children(node3, () => this.token(Comma, ","));
}
function parse$24() {
  const start = this.tokenStart;
  let modifier = null;
  let mediaType = null;
  let condition = null;
  this.skipSC();
  if (this.tokenType === Ident && this.lookupTypeNonSC(1) !== LeftParenthesis) {
    const ident2 = this.consume(Ident);
    const identLowerCase = ident2.toLowerCase();
    if (identLowerCase === "not" || identLowerCase === "only") {
      this.skipSC();
      modifier = identLowerCase;
      mediaType = this.consume(Ident);
    } else
      mediaType = ident2;
    switch (this.lookupTypeNonSC(0)) {
      case Ident:
        this.skipSC();
        this.eatIdent("and");
        condition = this.Condition("media");
        break;
      case LeftCurlyBracket:
      case Semicolon:
      case Comma:
      case EOF$1:
        break;
      default:
        this.error("Identifier or parenthesis is expected");
    }
  } else
    switch (this.tokenType) {
      case Ident:
      case LeftParenthesis:
      case Function2:
        condition = this.Condition("media");
        break;
      case LeftCurlyBracket:
      case Semicolon:
      case EOF$1:
        break;
      default:
        this.error("Identifier or parenthesis is expected");
    }
  return {
    type: "MediaQuery",
    loc: this.getLocation(start, this.tokenStart),
    modifier,
    mediaType,
    condition
  };
}
function generate$24(node3) {
  if (node3.mediaType) {
    if (node3.modifier)
      this.token(Ident, node3.modifier);
    this.token(Ident, node3.mediaType);
    if (node3.condition) {
      this.token(Ident, "and");
      this.node(node3.condition);
    }
  } else if (node3.condition)
    this.node(node3.condition);
}
function parse$23() {
  const children = this.createList();
  this.skipSC();
  while (!this.eof) {
    children.push(this.MediaQuery());
    if (this.tokenType !== Comma)
      break;
    this.next();
  }
  return {
    type: "MediaQueryList",
    loc: this.getLocationFromList(children),
    children
  };
}
function generate$23(node3) {
  this.children(node3, () => this.token(Comma, ","));
}
function parse$22() {
  const start = this.tokenStart;
  this.eatDelim(AMPERSAND$1);
  return {
    type: "NestingSelector",
    loc: this.getLocation(start, this.tokenStart)
  };
}
function generate$22() {
  this.token(Delim, "&");
}
function parse$21() {
  this.skipSC();
  const start = this.tokenStart;
  let end = start;
  let selector$1 = null;
  let nth$1;
  if (this.lookupValue(0, "odd") || this.lookupValue(0, "even"))
    nth$1 = this.Identifier();
  else
    nth$1 = this.AnPlusB();
  end = this.tokenStart;
  this.skipSC();
  if (this.lookupValue(0, "of")) {
    this.next();
    selector$1 = this.SelectorList();
    end = this.tokenStart;
  }
  return {
    type: "Nth",
    loc: this.getLocation(start, end),
    nth: nth$1,
    selector: selector$1
  };
}
function generate$21(node3) {
  this.node(node3.nth);
  if (node3.selector !== null) {
    this.token(Ident, "of");
    this.node(node3.selector);
  }
}
function parse$20() {
  return {
    type: "Number",
    loc: this.getLocation(this.tokenStart, this.tokenEnd),
    value: this.consume(Number$1)
  };
}
function generate$20(node3) {
  this.token(Number$1, node3.value);
}
function parse$19() {
  const start = this.tokenStart;
  this.next();
  return {
    type: "Operator",
    loc: this.getLocation(start, this.tokenStart),
    value: this.substrToCursor(start)
  };
}
function generate$19(node3) {
  this.tokenize(node3.value);
}
function parse$18(readSequence$1, recognizer) {
  const start = this.tokenStart;
  let children = null;
  this.eat(LeftParenthesis);
  children = readSequence$1.call(this, recognizer);
  if (!this.eof)
    this.eat(RightParenthesis);
  return {
    type: "Parentheses",
    loc: this.getLocation(start, this.tokenStart),
    children
  };
}
function generate$18(node3) {
  this.token(LeftParenthesis, "(");
  this.children(node3);
  this.token(RightParenthesis, ")");
}
function parse$17() {
  return {
    type: "Percentage",
    loc: this.getLocation(this.tokenStart, this.tokenEnd),
    value: this.consumeNumber(Percentage)
  };
}
function generate$17(node3) {
  this.token(Percentage, node3.value + "%");
}
function parse$16() {
  const start = this.tokenStart;
  let children = null;
  let name$49;
  let nameLowerCase;
  this.eat(Colon);
  if (this.tokenType === Function2) {
    name$49 = this.consumeFunctionName();
    nameLowerCase = name$49.toLowerCase();
    if (this.lookupNonWSType(0) == RightParenthesis)
      children = this.createList();
    else if (hasOwnProperty.call(this.pseudo, nameLowerCase)) {
      this.skipSC();
      children = this.pseudo[nameLowerCase].call(this);
      this.skipSC();
    } else {
      children = this.createList();
      children.push(this.Raw(null, false));
    }
    this.eat(RightParenthesis);
  } else
    name$49 = this.consume(Ident);
  return {
    type: "PseudoClassSelector",
    loc: this.getLocation(start, this.tokenStart),
    name: name$49,
    children
  };
}
function generate$16(node3) {
  this.token(Colon, ":");
  if (node3.children === null)
    this.token(Ident, node3.name);
  else {
    this.token(Function2, node3.name + "(");
    this.children(node3);
    this.token(RightParenthesis, ")");
  }
}
function parse$15() {
  const start = this.tokenStart;
  let children = null;
  let name$49;
  let nameLowerCase;
  this.eat(Colon);
  this.eat(Colon);
  if (this.tokenType === Function2) {
    name$49 = this.consumeFunctionName();
    nameLowerCase = name$49.toLowerCase();
    if (this.lookupNonWSType(0) == RightParenthesis)
      children = this.createList();
    else if (hasOwnProperty.call(this.pseudo, nameLowerCase)) {
      this.skipSC();
      children = this.pseudo[nameLowerCase].call(this);
      this.skipSC();
    } else {
      children = this.createList();
      children.push(this.Raw(null, false));
    }
    this.eat(RightParenthesis);
  } else
    name$49 = this.consume(Ident);
  return {
    type: "PseudoElementSelector",
    loc: this.getLocation(start, this.tokenStart),
    name: name$49,
    children
  };
}
function generate$15(node3) {
  this.token(Colon, ":");
  this.token(Colon, ":");
  if (node3.children === null)
    this.token(Ident, node3.name);
  else {
    this.token(Function2, node3.name + "(");
    this.children(node3);
    this.token(RightParenthesis, ")");
  }
}
function consumeTerm() {
  this.skipSC();
  switch (this.tokenType) {
    case Number$1:
      return this.Number();
    case Function2:
      return this.Function(this.readSequence, this.scope.Value);
    default:
      this.error("Number of function is expected");
  }
}
function parse$14() {
  const start = this.tokenStart;
  const left2 = consumeTerm.call(this);
  let right2 = null;
  this.skipSC();
  if (this.isDelim(SOLIDUS$2)) {
    this.eatDelim(SOLIDUS$2);
    right2 = consumeTerm.call(this);
  }
  return {
    type: "Ratio",
    loc: this.getLocation(start, this.tokenStart),
    left: left2,
    right: right2
  };
}
function generate$14(node3) {
  this.node(node3.left);
  this.token(Delim, "/");
  if (node3.right)
    this.node(node3.right);
  else
    this.node(Number$1, 1);
}
function getOffsetExcludeWS() {
  if (this.tokenIndex > 0) {
    if (this.lookupType(-1) === WhiteSpace)
      return this.tokenIndex > 1 ? this.getTokenStart(this.tokenIndex - 1) : this.firstCharOffset;
  }
  return this.tokenStart;
}
function parse$13(consumeUntil, excludeWhiteSpace) {
  const startOffset = this.getTokenStart(this.tokenIndex);
  let endOffset;
  this.skipUntilBalanced(this.tokenIndex, consumeUntil || this.consumeUntilBalanceEnd);
  if (excludeWhiteSpace && this.tokenStart > startOffset)
    endOffset = getOffsetExcludeWS.call(this);
  else
    endOffset = this.tokenStart;
  return {
    type: "Raw",
    loc: this.getLocation(startOffset, endOffset),
    value: this.substring(startOffset, endOffset)
  };
}
function generate$13(node3) {
  this.tokenize(node3.value);
}
function consumeRaw$1() {
  return this.Raw(this.consumeUntilLeftCurlyBracket, true);
}
function consumePrelude() {
  const prelude = this.SelectorList();
  if (prelude.type !== "Raw" && this.eof === false && this.tokenType !== LeftCurlyBracket)
    this.error();
  return prelude;
}
function parse$12() {
  const startToken = this.tokenIndex;
  const startOffset = this.tokenStart;
  let prelude;
  let block2;
  if (this.parseRulePrelude)
    prelude = this.parseWithFallback(consumePrelude, consumeRaw$1);
  else
    prelude = consumeRaw$1.call(this, startToken);
  block2 = this.Block(true);
  return {
    type: "Rule",
    loc: this.getLocation(startOffset, this.tokenStart),
    prelude,
    block: block2
  };
}
function generate$12(node3) {
  this.node(node3.prelude);
  this.node(node3.block);
}
function parse$11() {
  let root = null;
  let limit = null;
  this.skipSC();
  const startOffset = this.tokenStart;
  if (this.tokenType === LeftParenthesis) {
    this.next();
    this.skipSC();
    root = this.parseWithFallback(this.SelectorList, () => this.Raw(false, true));
    this.skipSC();
    this.eat(RightParenthesis);
  }
  if (this.lookupNonWSType(0) === Ident) {
    this.skipSC();
    this.eatIdent("to");
    this.skipSC();
    this.eat(LeftParenthesis);
    this.skipSC();
    limit = this.parseWithFallback(this.SelectorList, () => this.Raw(false, true));
    this.skipSC();
    this.eat(RightParenthesis);
  }
  return {
    type: "Scope",
    loc: this.getLocation(startOffset, this.tokenStart),
    root,
    limit
  };
}
function generate$11(node3) {
  if (node3.root) {
    this.token(LeftParenthesis, "(");
    this.node(node3.root);
    this.token(RightParenthesis, ")");
  }
  if (node3.limit) {
    this.token(Ident, "to");
    this.token(LeftParenthesis, "(");
    this.node(node3.limit);
    this.token(RightParenthesis, ")");
  }
}
function parse$10() {
  const children = this.readSequence(this.scope.Selector);
  if (this.getFirstListNode(children) === null)
    this.error("Selector is expected");
  return {
    type: "Selector",
    loc: this.getLocationFromList(children),
    children
  };
}
function generate$10(node3) {
  this.children(node3);
}
function parse$9() {
  const children = this.createList();
  while (!this.eof) {
    children.push(this.Selector());
    if (this.tokenType === Comma) {
      this.next();
      continue;
    }
    break;
  }
  return {
    type: "SelectorList",
    loc: this.getLocationFromList(children),
    children
  };
}
function generate$9(node3) {
  this.children(node3, () => this.token(Comma, ","));
}
function decode$1(str) {
  const len = str.length;
  const firstChar = str.charCodeAt(0);
  const start = firstChar === QUOTATION_MARK$1 || firstChar === APOSTROPHE$1 ? 1 : 0;
  const end = start === 1 && len > 1 && str.charCodeAt(len - 1) === firstChar ? len - 2 : len - 1;
  let decoded = "";
  for (let i = start;i <= end; i++) {
    let code$1 = str.charCodeAt(i);
    if (code$1 === REVERSE_SOLIDUS$1) {
      if (i === end) {
        if (i !== len - 1)
          decoded = str.substr(i + 1);
        break;
      }
      code$1 = str.charCodeAt(++i);
      if (isValidEscape(REVERSE_SOLIDUS$1, code$1)) {
        const escapeStart = i - 1;
        const escapeEnd = consumeEscaped(str, escapeStart);
        i = escapeEnd - 1;
        decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
      } else if (code$1 === 13 && str.charCodeAt(i + 1) === 10)
        i++;
    } else
      decoded += str[i];
  }
  return decoded;
}
function encode$1(str, apostrophe) {
  const quote = apostrophe ? "'" : '"';
  const quoteCode = apostrophe ? APOSTROPHE$1 : QUOTATION_MARK$1;
  let encoded = "";
  let wsBeforeHexIsNeeded = false;
  for (let i = 0;i < str.length; i++) {
    const code$1 = str.charCodeAt(i);
    if (code$1 === 0) {
      encoded += "�";
      continue;
    }
    if (code$1 <= 31 || code$1 === 127) {
      encoded += "\\" + code$1.toString(16);
      wsBeforeHexIsNeeded = true;
      continue;
    }
    if (code$1 === quoteCode || code$1 === REVERSE_SOLIDUS$1) {
      encoded += "\\" + str.charAt(i);
      wsBeforeHexIsNeeded = false;
    } else {
      if (wsBeforeHexIsNeeded && (isHexDigit2(code$1) || isWhiteSpace(code$1)))
        encoded += " ";
      encoded += str.charAt(i);
      wsBeforeHexIsNeeded = false;
    }
  }
  return quote + encoded + quote;
}
function parse$8() {
  return {
    type: "String",
    loc: this.getLocation(this.tokenStart, this.tokenEnd),
    value: decode$1(this.consume(String$1))
  };
}
function generate$8(node3) {
  this.token(String$1, encode$1(node3.value));
}
function consumeRaw() {
  return this.Raw(null, false);
}
function parse$7() {
  const start = this.tokenStart;
  const children = this.createList();
  let child;
  scan:
    while (!this.eof) {
      switch (this.tokenType) {
        case WhiteSpace:
          this.next();
          continue;
        case Comment3:
          if (this.charCodeAt(this.tokenStart + 2) !== EXCLAMATIONMARK) {
            this.next();
            continue;
          }
          child = this.Comment();
          break;
        case CDO:
          child = this.CDO();
          break;
        case CDC:
          child = this.CDC();
          break;
        case AtKeyword:
          child = this.parseWithFallback(this.Atrule, consumeRaw);
          break;
        default:
          child = this.parseWithFallback(this.Rule, consumeRaw);
      }
      children.push(child);
    }
  return {
    type: "StyleSheet",
    loc: this.getLocation(start, this.tokenStart),
    children
  };
}
function generate$7(node3) {
  this.children(node3);
}
function parse$6() {
  const start = this.tokenStart;
  this.eat(LeftParenthesis);
  this.skipSC();
  const declaration = this.Declaration();
  if (!this.eof)
    this.eat(RightParenthesis);
  return {
    type: "SupportsDeclaration",
    loc: this.getLocation(start, this.tokenStart),
    declaration
  };
}
function generate$6(node3) {
  this.token(LeftParenthesis, "(");
  this.node(node3.declaration);
  this.token(RightParenthesis, ")");
}
function eatIdentifierOrAsterisk() {
  if (this.tokenType !== Ident && this.isDelim(ASTERISK$2) === false)
    this.error("Identifier or asterisk is expected");
  this.next();
}
function parse$5() {
  const start = this.tokenStart;
  if (this.isDelim(VERTICALLINE$1)) {
    this.next();
    eatIdentifierOrAsterisk.call(this);
  } else {
    eatIdentifierOrAsterisk.call(this);
    if (this.isDelim(VERTICALLINE$1)) {
      this.next();
      eatIdentifierOrAsterisk.call(this);
    }
  }
  return {
    type: "TypeSelector",
    loc: this.getLocation(start, this.tokenStart),
    name: this.substrToCursor(start)
  };
}
function generate$5(node3) {
  this.tokenize(node3.name);
}
function eatHexSequence(offset, allowDash) {
  let len = 0;
  for (let pos = this.tokenStart + offset;pos < this.tokenEnd; pos++) {
    const code$1 = this.charCodeAt(pos);
    if (code$1 === HYPHENMINUS$1 && allowDash && len !== 0) {
      eatHexSequence.call(this, offset + len + 1, false);
      return -1;
    }
    if (!isHexDigit2(code$1))
      this.error(allowDash && len !== 0 ? "Hyphen minus" + (len < 6 ? " or hex digit" : "") + " is expected" : len < 6 ? "Hex digit is expected" : "Unexpected input", pos);
    if (++len > 6)
      this.error("Too many hex digits", pos);
  }
  this.next();
  return len;
}
function eatQuestionMarkSequence(max) {
  let count2 = 0;
  while (this.isDelim(QUESTIONMARK)) {
    if (++count2 > max)
      this.error("Too many question marks");
    this.next();
  }
}
function startsWith(code$1) {
  if (this.charCodeAt(this.tokenStart) !== code$1)
    this.error((code$1 === PLUSSIGN$2 ? "Plus sign" : "Hyphen minus") + " is expected");
}
function scanUnicodeRange() {
  let hexLength = 0;
  switch (this.tokenType) {
    case Number$1:
      hexLength = eatHexSequence.call(this, 1, true);
      if (this.isDelim(QUESTIONMARK)) {
        eatQuestionMarkSequence.call(this, 6 - hexLength);
        break;
      }
      if (this.tokenType === Dimension || this.tokenType === Number$1) {
        startsWith.call(this, HYPHENMINUS$1);
        eatHexSequence.call(this, 1, false);
        break;
      }
      break;
    case Dimension:
      hexLength = eatHexSequence.call(this, 1, true);
      if (hexLength > 0)
        eatQuestionMarkSequence.call(this, 6 - hexLength);
      break;
    default:
      this.eatDelim(PLUSSIGN$2);
      if (this.tokenType === Ident) {
        hexLength = eatHexSequence.call(this, 0, true);
        if (hexLength > 0)
          eatQuestionMarkSequence.call(this, 6 - hexLength);
        break;
      }
      if (this.isDelim(QUESTIONMARK)) {
        this.next();
        eatQuestionMarkSequence.call(this, 5);
        break;
      }
      this.error("Hex digit or question mark is expected");
  }
}
function parse$4() {
  const start = this.tokenStart;
  this.eatIdent("u");
  scanUnicodeRange.call(this);
  return {
    type: "UnicodeRange",
    loc: this.getLocation(start, this.tokenStart),
    value: this.substrToCursor(start)
  };
}
function generate$4(node3) {
  this.tokenize(node3.value);
}
function decode3(str) {
  const len = str.length;
  let start = 4;
  let end = str.charCodeAt(len - 1) === RIGHTPARENTHESIS ? len - 2 : len - 1;
  let decoded = "";
  while (start < end && isWhiteSpace(str.charCodeAt(start)))
    start++;
  while (start < end && isWhiteSpace(str.charCodeAt(end)))
    end--;
  for (let i = start;i <= end; i++) {
    let code$1 = str.charCodeAt(i);
    if (code$1 === REVERSE_SOLIDUS) {
      if (i === end) {
        if (i !== len - 1)
          decoded = str.substr(i + 1);
        break;
      }
      code$1 = str.charCodeAt(++i);
      if (isValidEscape(REVERSE_SOLIDUS, code$1)) {
        const escapeStart = i - 1;
        const escapeEnd = consumeEscaped(str, escapeStart);
        i = escapeEnd - 1;
        decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
      } else if (code$1 === 13 && str.charCodeAt(i + 1) === 10)
        i++;
    } else
      decoded += str[i];
  }
  return decoded;
}
function encode3(str) {
  let encoded = "";
  let wsBeforeHexIsNeeded = false;
  for (let i = 0;i < str.length; i++) {
    const code$1 = str.charCodeAt(i);
    if (code$1 === 0) {
      encoded += "�";
      continue;
    }
    if (code$1 <= 31 || code$1 === 127) {
      encoded += "\\" + code$1.toString(16);
      wsBeforeHexIsNeeded = true;
      continue;
    }
    if (code$1 === SPACE$1 || code$1 === REVERSE_SOLIDUS || code$1 === QUOTATION_MARK || code$1 === APOSTROPHE || code$1 === LEFTPARENTHESIS || code$1 === RIGHTPARENTHESIS) {
      encoded += "\\" + str.charAt(i);
      wsBeforeHexIsNeeded = false;
    } else {
      if (wsBeforeHexIsNeeded && isHexDigit2(code$1))
        encoded += " ";
      encoded += str.charAt(i);
      wsBeforeHexIsNeeded = false;
    }
  }
  return "url(" + encoded + ")";
}
function parse$3() {
  const start = this.tokenStart;
  let value;
  switch (this.tokenType) {
    case Url:
      value = decode3(this.consume(Url));
      break;
    case Function2:
      if (!this.cmpStr(this.tokenStart, this.tokenEnd, "url("))
        this.error("Function name must be `url`");
      this.eat(Function2);
      this.skipSC();
      value = decode$1(this.consume(String$1));
      this.skipSC();
      if (!this.eof)
        this.eat(RightParenthesis);
      break;
    default:
      this.error("Url or Function is expected");
  }
  return {
    type: "Url",
    loc: this.getLocation(start, this.tokenStart),
    value
  };
}
function generate$3(node3) {
  this.token(Url, encode3(node3.value));
}
function parse$2() {
  const start = this.tokenStart;
  const children = this.readSequence(this.scope.Value);
  return {
    type: "Value",
    loc: this.getLocation(start, this.tokenStart),
    children
  };
}
function generate$2(node3) {
  this.children(node3);
}
function parse$1() {
  this.eat(WhiteSpace);
  return SPACE;
}
function generate$1(node3) {
  this.token(WhiteSpace, node3.value);
}
function defaultRecognizer(context10) {
  switch (this.tokenType) {
    case Hash:
      return this.Hash();
    case Comma:
      return this.Operator();
    case LeftParenthesis:
      return this.Parentheses(this.readSequence, context10.recognizer);
    case LeftSquareBracket:
      return this.Brackets(this.readSequence, context10.recognizer);
    case String$1:
      return this.String();
    case Dimension:
      return this.Dimension();
    case Percentage:
      return this.Percentage();
    case Number$1:
      return this.Number();
    case Function2:
      return this.cmpStr(this.tokenStart, this.tokenEnd, "url(") ? this.Url() : this.Function(this.readSequence, context10.recognizer);
    case Url:
      return this.Url();
    case Ident:
      if (this.cmpChar(this.tokenStart, U5) && this.cmpChar(this.tokenStart + 1, PLUSSIGN$1))
        return this.UnicodeRange();
      else
        return this.Identifier();
    case Delim: {
      const code$1 = this.charCodeAt(this.tokenStart);
      if (code$1 === SOLIDUS$1 || code$1 === ASTERISK$1 || code$1 === PLUSSIGN$1 || code$1 === HYPHENMINUS)
        return this.Operator();
      if (code$1 === NUMBERSIGN$1)
        this.error("Hex or identifier is expected", this.tokenStart + 1);
      break;
    }
  }
}
function onWhiteSpace(next, children) {
  if (children.last !== null && children.last.type !== "Combinator" && next !== null && next.type !== "Combinator")
    children.push({
      type: "Combinator",
      loc: null,
      name: " "
    });
}
function getNode() {
  switch (this.tokenType) {
    case LeftSquareBracket:
      return this.AttributeSelector();
    case Hash:
      return this.IdSelector();
    case Colon:
      if (this.lookupType(1) === Colon)
        return this.PseudoElementSelector();
      else
        return this.PseudoClassSelector();
    case Ident:
      return this.TypeSelector();
    case Number$1:
    case Percentage:
      return this.Percentage();
    case Dimension:
      if (this.charCodeAt(this.tokenStart) === FULLSTOP)
        this.error("Identifier is expected", this.tokenStart + 1);
      break;
    case Delim:
      switch (this.charCodeAt(this.tokenStart)) {
        case PLUSSIGN:
        case GREATERTHANSIGN:
        case TILDE:
        case SOLIDUS:
          return this.Combinator();
        case FULLSTOP:
          return this.ClassSelector();
        case ASTERISK:
        case VERTICALLINE:
          return this.TypeSelector();
        case NUMBERSIGN:
          return this.IdSelector();
        case AMPERSAND:
          return this.NestingSelector();
      }
      break;
  }
}
function expression_default() {
  return this.createSingleNodeList(this.Raw(null, false));
}
function var_default() {
  const children = this.createList();
  this.skipSC();
  children.push(this.Identifier());
  this.skipSC();
  if (this.tokenType === Comma) {
    children.push(this.Operator());
    const startIndex = this.tokenIndex;
    const value = this.parseCustomProperty ? this.Value(null) : this.Raw(this.consumeUntilExclamationMarkOrSemicolon, false);
    if (value.type === "Value" && value.children.isEmpty) {
      for (let offset = startIndex - this.tokenIndex;offset <= 0; offset++)
        if (this.lookupType(offset) === WhiteSpace) {
          value.children.appendData({
            type: "WhiteSpace",
            loc: null,
            value: " "
          });
          break;
        }
    }
    children.push(value);
  }
  return children;
}
function isPlusMinusOperator(node3) {
  return node3 !== null && node3.type === "Operator" && (node3.value[node3.value.length - 1] === "-" || node3.value[node3.value.length - 1] === "+");
}
function parseWithFallback(parse$51, fallback) {
  return this.parseWithFallback(() => {
    try {
      return parse$51.call(this);
    } finally {
      this.skipSC();
      if (this.lookupNonWSType(0) !== RightParenthesis)
        this.error();
    }
  }, fallback || (() => this.Raw(null, true)));
}
function parseLanguageRangeList() {
  const children = this.createList();
  this.skipSC();
  loop:
    while (!this.eof) {
      switch (this.tokenType) {
        case Ident:
          children.push(this.Identifier());
          break;
        case String$1:
          children.push(this.String());
          break;
        case Comma:
          children.push(this.Operator());
          break;
        case RightParenthesis:
          break loop;
        default:
          this.error("Identifier, string or comma is expected");
      }
      this.skipSC();
    }
  return children;
}
function clone2(node3) {
  const result = {};
  for (const key of Object.keys(node3)) {
    let value = node3[key];
    if (value) {
      if (Array.isArray(value) || value instanceof List)
        value = value.map(clone2);
      else if (value.constructor === Object)
        value = clone2(value);
    }
    result[key] = value;
  }
  return result;
}
function isRuleInlinable(rule) {
  const hasAtRuleInside = find(rule, (node3) => node3.type === "Atrule") !== null;
  const hasPseudoSelector = find(rule, (node3) => node3.type === "PseudoClassSelector" || node3.type === "PseudoElementSelector") !== null;
  return !hasAtRuleInside && !hasPseudoSelector;
}
function isPartInlinable(part) {
  const hasAtRuleInside = find(part, (node3) => node3.type === "Atrule") !== null;
  const hasPseudoSelector = find(part, (node3) => node3.type === "PseudoClassSelector" || node3.type === "PseudoElementSelector") !== null;
  return !hasAtRuleInside && !hasPseudoSelector;
}
function splitMixedRule(rule) {
  if (rule.prelude !== null && find(rule.prelude, (node3) => node3.type === "PseudoClassSelector" || node3.type === "PseudoElementSelector") !== null)
    return {
      inlinablePart: null,
      nonInlinablePart: clone2(rule)
    };
  const ruleCloneInlinable = clone2(rule);
  const ruleCloneNonInlinable = clone2(rule);
  const inlinableParts = [];
  const nonInlinableParts = [];
  for (const part of ruleCloneInlinable.block.children.toArray())
    if (isPartInlinable(part))
      inlinableParts.push(part);
    else
      nonInlinableParts.push(part);
  return {
    inlinablePart: inlinableParts.length > 0 ? {
      ...ruleCloneInlinable,
      block: {
        type: "Block",
        children: new List().fromArray(inlinableParts)
      }
    } : null,
    nonInlinablePart: nonInlinableParts.length > 0 ? {
      ...ruleCloneNonInlinable,
      block: {
        type: "Block",
        children: new List().fromArray(nonInlinableParts)
      }
    } : null
  };
}
function extractRulesPerClass(root, classes) {
  const classSet = new Set(classes);
  const inlinableRules = /* @__PURE__ */ new Map;
  const nonInlinableRules = /* @__PURE__ */ new Map;
  walk(root, {
    visit: "Rule",
    enter(rule) {
      const selectorClasses = [];
      walk(rule, {
        visit: "ClassSelector",
        enter(classSelector) {
          selectorClasses.push(decode$1(classSelector.name));
        }
      });
      if (isRuleInlinable(rule)) {
        for (const className of selectorClasses)
          if (classSet.has(className))
            inlinableRules.set(className, rule);
      } else {
        const { inlinablePart, nonInlinablePart } = splitMixedRule(rule);
        for (const className of selectorClasses) {
          if (!classSet.has(className))
            continue;
          if (inlinablePart)
            inlinableRules.set(className, inlinablePart);
          if (nonInlinablePart)
            nonInlinableRules.set(className, nonInlinablePart);
        }
      }
    }
  });
  return {
    inlinable: inlinableRules,
    nonInlinable: nonInlinableRules
  };
}
function getCustomProperties(node3) {
  const customProperties = /* @__PURE__ */ new Map;
  walk(node3, {
    visit: "Atrule",
    enter(atrule) {
      if (atrule.name === "property" && atrule.prelude) {
        const prelude = generate(atrule.prelude);
        if (prelude.startsWith("--")) {
          let syntax;
          let inherits;
          let initialValue;
          walk(atrule, {
            visit: "Declaration",
            enter(declaration) {
              if (declaration.property === "syntax")
                syntax = declaration;
              if (declaration.property === "inherits")
                inherits = declaration;
              if (declaration.property === "initial-value")
                initialValue = declaration;
            }
          });
          customProperties.set(prelude, {
            syntax,
            inherits,
            initialValue
          });
        }
      }
    }
  });
  return customProperties;
}
function getReactProperty(prop) {
  const modifiedProp = prop.toLowerCase();
  if (modifiedProp.startsWith("--"))
    return modifiedProp;
  if (modifiedProp.startsWith("-ms-"))
    return fromDashCaseToCamelCase(modifiedProp.slice(1));
  return fromDashCaseToCamelCase(modifiedProp);
}
function unwrapValue(value) {
  if (value.type === "Value" && value.children.size === 1)
    return value.children.first ?? value;
  return value;
}
function makeInlineStylesFor(inlinableRules, customProperties) {
  const styles2 = {};
  const localVariableDeclarations = /* @__PURE__ */ new Map;
  for (const rule of inlinableRules)
    walk(rule, {
      visit: "Declaration",
      enter(declaration) {
        if (declaration.property.startsWith("--"))
          localVariableDeclarations.set(declaration.property, declaration);
      }
    });
  for (const rule of inlinableRules) {
    walk(rule, {
      visit: "Function",
      enter(func, funcParentListItem) {
        if (func.name === "var") {
          let variableName;
          walk(func, {
            visit: "Identifier",
            enter(identifier) {
              variableName = identifier.name;
              return this.break;
            }
          });
          if (variableName) {
            const definition = localVariableDeclarations.get(variableName);
            if (definition)
              funcParentListItem.data = unwrapValue(definition.value);
            else {
              const customProperty = customProperties.get(variableName);
              if (customProperty?.initialValue)
                funcParentListItem.data = unwrapValue(customProperty.initialValue.value);
            }
          }
        }
      }
    });
    walk(rule, {
      visit: "Declaration",
      enter(declaration) {
        if (declaration.property.startsWith("--"))
          return;
        styles2[getReactProperty(declaration.property)] = generate(declaration.value) + (declaration.important ? "!important" : "");
      }
    });
  }
  return styles2;
}
function inlineStyles(styleSheet, classes) {
  const { inlinable: inlinableRules } = extractRulesPerClass(styleSheet, classes);
  const customProperties = getCustomProperties(styleSheet);
  return makeInlineStylesFor(Array.from(inlinableRules.values()), customProperties);
}
function doSelectorsIntersect(first, second) {
  if (generate(first) === generate(second))
    return true;
  let hasSomeUniversal = false;
  const walker = (node3, _parentListItem, parentList) => {
    if (hasSomeUniversal)
      return;
    if (node3.type === "PseudoClassSelector" && node3.name === "root")
      hasSomeUniversal = true;
    if (node3.type === "TypeSelector" && node3.name === "*" && parentList.size === 1)
      hasSomeUniversal = true;
  };
  walk(first, walker);
  walk(second, walker);
  if (hasSomeUniversal)
    return true;
  return false;
}
function resolveAllCssVariables(node3) {
  const variableDefinitions = /* @__PURE__ */ new Set;
  const variableUses = /* @__PURE__ */ new Set;
  const path2 = [];
  walk(node3, {
    leave() {
      path2.shift();
    },
    enter(node$1) {
      if (node$1.type === "Declaration") {
        const declaration = node$1;
        if (path2.some((ancestor) => ancestor.type === "Atrule" && ancestor.name === "layer" && ancestor.prelude !== null && generate(ancestor.prelude).includes("properties"))) {
          path2.unshift(node$1);
          return;
        }
        if (/--[\S]+/.test(declaration.property))
          variableDefinitions.add({
            declaration,
            path: [...path2],
            variableName: declaration.property,
            definition: generate(declaration.value)
          });
        else {
          let parseVariableUsesFrom = function(node$2) {
            walk(node$2, {
              visit: "Function",
              enter(funcNode) {
                if (funcNode.name === "var") {
                  const children = funcNode.children.toArray();
                  const name$49 = generate(children[0]);
                  const fallback = children[2] ? generate(children[2]) : undefined;
                  variableUses.add({
                    declaration,
                    path: [...path2],
                    fallback,
                    variableName: name$49,
                    raw: generate(funcNode)
                  });
                  if (fallback?.includes("var("))
                    parseVariableUsesFrom(parse5(fallback, { context: "value" }));
                }
              }
            });
          };
          parseVariableUsesFrom(declaration.value);
        }
      }
      path2.unshift(node$1);
    }
  });
  for (const use2 of variableUses) {
    let hasReplaced = false;
    for (const definition of variableDefinitions) {
      if (use2.variableName !== definition.variableName)
        continue;
      if (use2.path[0]?.type === "Block" && use2.path[1]?.type === "Atrule" && use2.path[2]?.type === "Block" && use2.path[3]?.type === "Rule" && definition.path[0].type === "Block" && definition.path[1].type === "Rule" && doSelectorsIntersect(use2.path[3].prelude, definition.path[1].prelude)) {
        use2.declaration.value = parse5(generate(use2.declaration.value).replaceAll(use2.raw, definition.definition), { context: "value" });
        hasReplaced = true;
        break;
      }
      if (use2.path[0]?.type === "Block" && use2.path[1]?.type === "Rule" && definition.path[0]?.type === "Block" && definition.path[1]?.type === "Rule" && doSelectorsIntersect(use2.path[1].prelude, definition.path[1].prelude)) {
        use2.declaration.value = parse5(generate(use2.declaration.value).replaceAll(use2.raw, definition.definition), { context: "value" });
        hasReplaced = true;
        break;
      }
    }
    if (!hasReplaced && use2.fallback)
      use2.declaration.value = parse5(generate(use2.declaration.value).replaceAll(use2.raw, use2.fallback), { context: "value" });
  }
}
function resolveCalcExpressions(node3) {
  walk(node3, {
    visit: "Function",
    enter(func, funcListItem) {
      if (func.name === "calc") {
        func.children.forEach((child, item) => {
          const left2 = item.prev;
          const right2 = item.next;
          if (left2 && right2 && child.type === "Operator" && (left2.data.type === "Dimension" || left2.data.type === "Number" || left2.data.type === "Percentage") && (right2.data.type === "Dimension" || right2.data.type === "Number" || right2.data.type === "Percentage")) {
            if (child.value === "*" || child.value === "/") {
              const value = (() => {
                if (child.value === "*")
                  return String(Number.parseFloat(left2.data.value) * Number.parseFloat(right2.data.value));
                if (right2.data.value === "0")
                  return "0";
                return String(Number.parseFloat(left2.data.value) / Number.parseFloat(right2.data.value));
              })();
              if (left2.data.type === "Dimension" && right2.data.type === "Number") {
                item.data = {
                  type: "Dimension",
                  unit: left2.data.unit,
                  value
                };
                func.children.remove(left2);
                func.children.remove(right2);
              } else if (left2.data.type === "Number" && right2.data.type === "Dimension") {
                item.data = {
                  type: "Dimension",
                  unit: right2.data.unit,
                  value
                };
                func.children.remove(left2);
                func.children.remove(right2);
              } else if (left2.data.type === "Number" && right2.data.type === "Number") {
                item.data = {
                  type: "Number",
                  value
                };
                func.children.remove(left2);
                func.children.remove(right2);
              } else if (left2.data.type === "Dimension" && right2.data.type === "Dimension" && left2.data.unit === right2.data.unit) {
                if (child.value === "/")
                  item.data = {
                    type: "Number",
                    value
                  };
                else
                  item.data = {
                    type: "Dimension",
                    unit: left2.data.unit,
                    value
                  };
                func.children.remove(left2);
                func.children.remove(right2);
              } else if (left2.data.type === "Percentage" && right2.data.type === "Number") {
                item.data = {
                  type: "Percentage",
                  value
                };
                func.children.remove(left2);
                func.children.remove(right2);
              } else if (left2.data.type === "Number" && right2.data.type === "Percentage") {
                item.data = {
                  type: "Percentage",
                  value
                };
                func.children.remove(left2);
                func.children.remove(right2);
              } else if (left2.data.type === "Percentage" && right2.data.type === "Percentage") {
                if (child.value === "/")
                  item.data = {
                    type: "Number",
                    value
                  };
                else
                  item.data = {
                    type: "Percentage",
                    value
                  };
                func.children.remove(left2);
                func.children.remove(right2);
              }
            }
          }
        });
        if (func.children.size === 1 && func.children.first)
          funcListItem.data = func.children.first;
      }
    }
  });
}
function rgbNode(r2, g4, b5, alpha) {
  const children = new List;
  children.appendData({
    type: "Number",
    value: r2.toFixed(0)
  });
  children.appendData({
    type: "Operator",
    value: ","
  });
  children.appendData({
    type: "Number",
    value: g4.toFixed(0)
  });
  children.appendData({
    type: "Operator",
    value: ","
  });
  children.appendData({
    type: "Number",
    value: b5.toFixed(0)
  });
  if (alpha !== 1 && alpha !== undefined) {
    children.appendData({
      type: "Operator",
      value: ","
    });
    children.appendData({
      type: "Number",
      value: alpha.toString()
    });
  }
  return {
    type: "Function",
    name: "rgb",
    children
  };
}
function lrgbToRgb(input) {
  const absoluteNumber = Math.abs(input);
  const sign = input < 0 ? -1 : 1;
  if (absoluteNumber > 0.0031308)
    return sign * (absoluteNumber ** (1 / 2.4) * 1.055 - 0.055);
  return input * 12.92;
}
function clamp(value, min, max) {
  return Math.min(Math.max(value, min), max);
}
function oklchToOklab(oklch) {
  return {
    l: oklch.l,
    a: oklch.c * Math.cos(oklch.h / 180 * Math.PI),
    b: oklch.c * Math.sin(oklch.h / 180 * Math.PI)
  };
}
function oklchToRgb(oklch) {
  const oklab = oklchToOklab(oklch);
  const l6 = (oklab.l + LAB_TO_LMS.l[0] * oklab.a + LAB_TO_LMS.l[1] * oklab.b) ** 3;
  const m2 = (oklab.l + LAB_TO_LMS.m[0] * oklab.a + LAB_TO_LMS.m[1] * oklab.b) ** 3;
  const s3 = (oklab.l + LAB_TO_LMS.s[0] * oklab.a + LAB_TO_LMS.s[1] * oklab.b) ** 3;
  const r2 = 255 * lrgbToRgb(LSM_TO_RGB.r[0] * l6 + LSM_TO_RGB.r[1] * m2 + LSM_TO_RGB.r[2] * s3);
  const g4 = 255 * lrgbToRgb(LSM_TO_RGB.g[0] * l6 + LSM_TO_RGB.g[1] * m2 + LSM_TO_RGB.g[2] * s3);
  const b5 = 255 * lrgbToRgb(LSM_TO_RGB.b[0] * l6 + LSM_TO_RGB.b[1] * m2 + LSM_TO_RGB.b[2] * s3);
  return {
    r: clamp(r2, 0, 255),
    g: clamp(g4, 0, 255),
    b: clamp(b5, 0, 255)
  };
}
function separteShorthandDeclaration(shorthandToReplace, [start, end]) {
  shorthandToReplace.property = start;
  const values = shorthandToReplace.value.type === "Value" ? shorthandToReplace.value.children.toArray().filter((child) => child.type === "Dimension" || child.type === "Number" || child.type === "Percentage") : [shorthandToReplace.value];
  let endValue = shorthandToReplace.value;
  if (values.length === 2) {
    endValue = {
      type: "Value",
      children: new List().fromArray([values[1]])
    };
    shorthandToReplace.value = {
      type: "Value",
      children: new List().fromArray([values[0]])
    };
  }
  return {
    type: "Declaration",
    property: end,
    value: endValue,
    important: shorthandToReplace.important
  };
}
function sanitizeDeclarations(nodeContainingDeclarations) {
  walk(nodeContainingDeclarations, {
    visit: "Declaration",
    enter(declaration, item, list2) {
      if (declaration.value.type === "Raw")
        declaration.value = parse5(declaration.value.value, { context: "value" });
      if (/border-radius\s*:\s*calc\s*\(\s*infinity\s*\*\s*1px\s*\)/i.test(generate(declaration)))
        declaration.value = parse5("9999px", { context: "value" });
      walk(declaration, {
        visit: "Function",
        enter(func, funcParentListItem) {
          const children = func.children.toArray();
          if (func.name === "oklch") {
            let l6;
            let c3;
            let h8;
            let a2;
            for (const child of children) {
              if (child.type === "Number") {
                if (l6 === undefined) {
                  l6 = Number.parseFloat(child.value);
                  continue;
                }
                if (c3 === undefined) {
                  c3 = Number.parseFloat(child.value);
                  continue;
                }
                if (h8 === undefined) {
                  h8 = Number.parseFloat(child.value);
                  continue;
                }
                if (a2 === undefined) {
                  a2 = Number.parseFloat(child.value);
                  continue;
                }
              }
              if (child.type === "Dimension" && child.unit === "deg") {
                if (h8 === undefined) {
                  h8 = Number.parseFloat(child.value);
                  continue;
                }
              }
              if (child.type === "Percentage") {
                if (l6 === undefined) {
                  l6 = Number.parseFloat(child.value) / 100;
                  continue;
                }
                if (a2 === undefined)
                  a2 = Number.parseFloat(child.value) / 100;
              }
            }
            if (l6 === undefined || c3 === undefined || h8 === undefined)
              throw new Error("Could not determine the parameters of an oklch() function.", { cause: declaration });
            const rgb = oklchToRgb({
              l: l6,
              c: c3,
              h: h8
            });
            funcParentListItem.data = rgbNode(rgb.r, rgb.g, rgb.b, a2);
          }
          if (func.name === "rgb") {
            let r2;
            let g4;
            let b5;
            let a2;
            for (const child of children) {
              if (child.type === "Number") {
                if (r2 === undefined) {
                  r2 = Number.parseFloat(child.value);
                  continue;
                }
                if (g4 === undefined) {
                  g4 = Number.parseFloat(child.value);
                  continue;
                }
                if (b5 === undefined) {
                  b5 = Number.parseFloat(child.value);
                  continue;
                }
                if (a2 === undefined) {
                  a2 = Number.parseFloat(child.value);
                  continue;
                }
              }
              if (child.type === "Percentage") {
                if (r2 === undefined) {
                  r2 = Number.parseFloat(child.value) * 255 / 100;
                  continue;
                }
                if (g4 === undefined) {
                  g4 = Number.parseFloat(child.value) * 255 / 100;
                  continue;
                }
                if (b5 === undefined) {
                  b5 = Number.parseFloat(child.value) * 255 / 100;
                  continue;
                }
                if (a2 === undefined)
                  a2 = Number.parseFloat(child.value) / 100;
              }
            }
            if (r2 === undefined || g4 === undefined || b5 === undefined)
              throw new Error("Could not determine the parameters of an rgb() function.", { cause: declaration });
            if (a2 === undefined || a2 === 1)
              funcParentListItem.data = rgbNode(r2, g4, b5);
            else
              funcParentListItem.data = rgbNode(r2, g4, b5, a2);
          }
        }
      });
      walk(declaration, {
        visit: "Hash",
        enter(hash2, hashParentListItem) {
          const hex3 = hash2.value.trim();
          if (hex3.length === 3) {
            hashParentListItem.data = rgbNode(Number.parseInt(hex3.charAt(0) + hex3.charAt(0), 16), Number.parseInt(hex3.charAt(1) + hex3.charAt(1), 16), Number.parseInt(hex3.charAt(2) + hex3.charAt(2), 16));
            return;
          }
          if (hex3.length === 4) {
            hashParentListItem.data = rgbNode(Number.parseInt(hex3.charAt(0) + hex3.charAt(0), 16), Number.parseInt(hex3.charAt(1) + hex3.charAt(1), 16), Number.parseInt(hex3.charAt(2) + hex3.charAt(2), 16), Number.parseInt(hex3.charAt(3) + hex3.charAt(3), 16) / 255);
            return;
          }
          if (hex3.length === 5) {
            hashParentListItem.data = rgbNode(Number.parseInt(hex3.slice(0, 2), 16), Number.parseInt(hex3.charAt(2) + hex3.charAt(2), 16), Number.parseInt(hex3.charAt(3) + hex3.charAt(3), 16), Number.parseInt(hex3.charAt(4) + hex3.charAt(4), 16) / 255);
            return;
          }
          if (hex3.length === 6) {
            hashParentListItem.data = rgbNode(Number.parseInt(hex3.slice(0, 2), 16), Number.parseInt(hex3.slice(2, 4), 16), Number.parseInt(hex3.slice(4, 6), 16));
            return;
          }
          if (hex3.length === 7) {
            hashParentListItem.data = rgbNode(Number.parseInt(hex3.slice(0, 2), 16), Number.parseInt(hex3.slice(2, 4), 16), Number.parseInt(hex3.slice(4, 6), 16), Number.parseInt(hex3.charAt(6) + hex3.charAt(6), 16) / 255);
            return;
          }
          hashParentListItem.data = rgbNode(Number.parseInt(hex3.slice(0, 2), 16), Number.parseInt(hex3.slice(2, 4), 16), Number.parseInt(hex3.slice(4, 6), 16), Number.parseInt(hex3.slice(6, 8), 16) / 255);
        }
      });
      walk(declaration, {
        visit: "Function",
        enter(func, parentListItem) {
          if (func.name === "color-mix") {
            const children = func.children.toArray();
            const color = children[3];
            const opacity = children[4];
            if (func.children.last?.type === "Identifier" && func.children.last.name === "transparent" && color?.type === "Function" && color?.name === "rgb" && opacity) {
              color.children.appendData({
                type: "Operator",
                value: ","
              });
              color.children.appendData(opacity);
              parentListItem.data = color;
            }
          }
        }
      });
      if (declaration.property === "padding-inline") {
        const paddingRight = separteShorthandDeclaration(declaration, ["padding-left", "padding-right"]);
        list2.insertData(paddingRight, item);
      }
      if (declaration.property === "padding-block") {
        const paddingBottom = separteShorthandDeclaration(declaration, ["padding-top", "padding-bottom"]);
        list2.insertData(paddingBottom, item);
      }
      if (declaration.property === "margin-inline") {
        const marginRight = separteShorthandDeclaration(declaration, ["margin-left", "margin-right"]);
        list2.insertData(marginRight, item);
      }
      if (declaration.property === "margin-block") {
        const paddingBottom = separteShorthandDeclaration(declaration, ["margin-top", "margin-bottom"]);
        list2.insertData(paddingBottom, item);
      }
    }
  });
}
function sanitizeStyleSheet(styleSheet) {
  resolveAllCssVariables(styleSheet);
  resolveCalcExpressions(styleSheet);
  sanitizeDeclarations(styleSheet);
}
function useSuspensedPromise(promiseFn, key) {
  const previousState = promiseStates.get(key);
  if (previousState) {
    if ("error" in previousState)
      throw previousState.error;
    if ("result" in previousState)
      return previousState.result;
    throw previousState.promise;
  }
  const state = { promise: promiseFn().then((result) => state.result = result).catch((error49) => state.error = error49) };
  promiseStates.set(key, state);
  throw state.promise;
}
function sanitizeClassName(className) {
  return className.replaceAll("+", "plus").replaceAll("[", "").replaceAll("%", "pc").replaceAll("]", "").replaceAll("(", "").replaceAll(")", "").replaceAll("!", "imprtnt").replaceAll(">", "gt").replaceAll("<", "lt").replaceAll("=", "eq").replace(/^[0-9]/, (digit) => {
    return digitToNameMap[digit];
  }).replace(/[^a-zA-Z0-9\-_]/g, "_");
}
function sanitizeNonInlinableRules(node3) {
  walk(node3, {
    visit: "Rule",
    enter(rule) {
      if (!isRuleInlinable(rule)) {
        walk(rule.prelude, (node$1) => {
          if (node$1.type === "ClassSelector")
            node$1.name = sanitizeClassName(decode$1(node$1.name));
        });
        walk(rule, {
          visit: "Declaration",
          enter(declaration) {
            declaration.important = true;
          }
        });
      }
    }
  });
}
function mapReactTree(value, process4) {
  const mapped = import_react2.default.Children.map(value, (node3) => {
    if (import_react2.default.isValidElement(node3)) {
      const newProps = { ...node3.props };
      if (node3.props.children && !isComponent(node3))
        newProps.children = mapReactTree(node3.props.children, process4);
      const processed = process4(import_react2.default.cloneElement(node3, newProps, newProps.children));
      if (import_react2.default.isValidElement(processed) && isComponent(processed))
        return mapReactTree((typeof processed.type === "object" ? processed.type.render : processed.type)(processed.props), process4);
      return processed;
    }
    return process4(node3);
  });
  return mapped && mapped.length === 1 ? mapped[0] : mapped;
}
function cloneElementWithInlinedStyles(element, inlinableRules, nonInlinableRules, customProperties) {
  const propsToOverwrite = {};
  if (element.props.className && !isComponent(element)) {
    const classes = element.props.className.trim().split(/\s+/);
    const residualClasses = [];
    const rules = [];
    for (const className of classes) {
      const rule = inlinableRules.get(className);
      if (rule)
        rules.push(rule);
      if (nonInlinableRules.has(className))
        residualClasses.push(className);
      else if (!rule)
        residualClasses.push(className);
    }
    propsToOverwrite.style = {
      ...makeInlineStylesFor(rules, customProperties),
      ...element.props.style
    };
    if (residualClasses.length > 0)
      propsToOverwrite.className = residualClasses.map((className) => {
        if (nonInlinableRules.has(className))
          return sanitizeClassName(className);
        return className;
      }).join(" ");
    else
      propsToOverwrite.className = undefined;
  }
  const newProps = {
    ...element.props,
    ...propsToOverwrite
  };
  return import_react2.default.cloneElement(element, newProps, newProps.children);
}
async function setupTailwind(config2) {
  const baseCss = `
@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);
@config;
`;
  const compiler = await Ef(baseCss, {
    async loadModule(id, base, resourceHint) {
      if (resourceHint === "config")
        return {
          path: id,
          base,
          module: config2
        };
      throw new Error(`NO-OP: should we implement support for ${resourceHint}?`);
    },
    polyfills: 0,
    async loadStylesheet(id, base) {
      if (id === "tailwindcss")
        return {
          base,
          path: "tailwindcss/index.css",
          content: tailwind_stylesheets_default
        };
      if (id === "tailwindcss/preflight.css")
        return {
          base,
          path: id,
          content: preflight_default
        };
      if (id === "tailwindcss/theme.css")
        return {
          base,
          path: id,
          content: theme_default
        };
      if (id === "tailwindcss/utilities.css")
        return {
          base,
          path: id,
          content: utilities_default
        };
      throw new Error("stylesheet not supported, you can only import the ones from tailwindcss");
    }
  });
  let css$4 = baseCss;
  return {
    addUtilities: function addUtilities(candidates) {
      css$4 = compiler.build(candidates);
    },
    getStyleSheet: function getCss() {
      return parse5(css$4);
    }
  };
}
function Tailwind({ children, config: config2 }) {
  const tailwindSetup = useSuspensedPromise(() => setupTailwind(config2 ?? {}), JSON.stringify(config2, (_key, value) => typeof value === "function" ? value.toString() : value));
  let classesUsed = [];
  let mappedChildren = mapReactTree(children, (node3) => {
    if (React$12.isValidElement(node3)) {
      if (node3.props.className) {
        const classes = node3.props.className?.split(/\s+/);
        classesUsed = [...classesUsed, ...classes];
        tailwindSetup.addUtilities(classes);
      }
    }
    return node3;
  });
  const styleSheet = tailwindSetup.getStyleSheet();
  sanitizeStyleSheet(styleSheet);
  const { inlinable: inlinableRules, nonInlinable: nonInlinableRules } = extractRulesPerClass(styleSheet, classesUsed);
  const customProperties = getCustomProperties(styleSheet);
  const nonInlineStyles = {
    type: "StyleSheet",
    children: new List().fromArray(Array.from(nonInlinableRules.values()))
  };
  sanitizeNonInlinableRules(nonInlineStyles);
  const hasNonInlineStylesToApply = nonInlinableRules.size > 0;
  let appliedNonInlineStyles = false;
  mappedChildren = mapReactTree(mappedChildren, (node3) => {
    if (React$12.isValidElement(node3)) {
      const elementWithInlinedStyles = cloneElementWithInlinedStyles(node3, inlinableRules, nonInlinableRules, customProperties);
      if (elementWithInlinedStyles.type === "head") {
        appliedNonInlineStyles = true;
        const styleElement = /* @__PURE__ */ import_jsx_runtime20.jsx("style", { dangerouslySetInnerHTML: { __html: generate(nonInlineStyles) } });
        return React$12.cloneElement(elementWithInlinedStyles, elementWithInlinedStyles.props, styleElement, elementWithInlinedStyles.props.children);
      }
      return elementWithInlinedStyles;
    }
    return node3;
  });
  if (hasNonInlineStylesToApply && !appliedNonInlineStyles)
    throw new Error(`You are trying to use the following Tailwind classes that cannot be inlined: ${Array.from(nonInlinableRules.keys()).join(" ")}.
For the media queries to work properly on rendering, they need to be added into a <style> tag inside of a <head> tag,
the Tailwind component tried finding a <head> element but just wasn't able to find it.

Make sure that you have a <head> element at some point inside of the <Tailwind> component at any depth. 
This can also be our <Head> component.

If you do already have a <head> element at some depth, 
please file a bug https://github.com/resend/react-email/issues/new?assignees=&labels=Type%3A+Bug&projects=&template=1.bug_report.yml.`);
  return mappedChildren;
}
var React$12, import_react2, import_jsx_runtime20, __defProp3, __commonJSMin = (cb2, mod) => () => (mod || cb2((mod = { exports: {} }).exports, mod), mod.exports), __exportAll = (all2, symbols) => {
  let target = {};
  for (var name$49 in all2) {
    __defProp3(target, name$49, {
      get: all2[name$49],
      enumerable: true
    });
  }
  if (symbols) {
    __defProp3(target, Symbol.toStringTag, { value: "Module" });
  }
  return target;
}, EOF$1 = 0, Ident = 1, Function2 = 2, AtKeyword = 3, Hash = 4, String$1 = 5, BadString = 6, Url = 7, BadUrl = 8, Delim = 9, Number$1 = 10, Percentage = 11, Dimension = 12, WhiteSpace = 13, CDO = 14, CDC = 15, Colon = 16, Semicolon = 17, Comma = 18, LeftSquareBracket = 19, RightSquareBracket = 20, LeftParenthesis = 21, RightParenthesis = 22, LeftCurlyBracket = 23, RightCurlyBracket = 24, Comment3 = 25, EOF = 0, CATEGORY, EofCategory = 128, WhiteSpaceCategory = 130, DigitCategory = 131, NameStartCategory = 132, NonPrintableCategory = 133, names_default, MIN_SIZE, N$4 = 10, F$2 = 12, R$2 = 13, OffsetToLocation = class {
  constructor(source, startOffset, startLine, startColumn) {
    this.setSource(source, startOffset, startLine, startColumn);
    this.lines = null;
    this.columns = null;
  }
  setSource(source = "", startOffset = 0, startLine = 1, startColumn = 1) {
    this.source = source;
    this.startOffset = startOffset;
    this.startLine = startLine;
    this.startColumn = startColumn;
    this.computed = false;
  }
  getLocation(offset, filename) {
    if (!this.computed)
      computeLinesAndColumns(this);
    return {
      source: filename,
      offset: this.startOffset + offset,
      line: this.lines[offset],
      column: this.columns[offset]
    };
  }
  getLocationRange(start, end, filename) {
    if (!this.computed)
      computeLinesAndColumns(this);
    return {
      source: filename,
      start: {
        offset: this.startOffset + start,
        line: this.lines[start],
        column: this.columns[start]
      },
      end: {
        offset: this.startOffset + end,
        line: this.lines[end],
        column: this.columns[end]
      }
    };
  }
}, OFFSET_MASK = 16777215, TYPE_SHIFT = 24, balancePair$1, TokenStream = class {
  constructor(source, tokenize$2) {
    this.setSource(source, tokenize$2);
  }
  reset() {
    this.eof = false;
    this.tokenIndex = -1;
    this.tokenType = 0;
    this.tokenStart = this.firstCharOffset;
    this.tokenEnd = this.firstCharOffset;
  }
  setSource(source = "", tokenize$2 = () => {}) {
    source = String(source || "");
    const sourceLength = source.length;
    const offsetAndType = adoptBuffer(this.offsetAndType, source.length + 1);
    const balance = adoptBuffer(this.balance, source.length + 1);
    let tokenCount = 0;
    let firstCharOffset = -1;
    let balanceCloseType = 0;
    let balanceStart = source.length;
    this.offsetAndType = null;
    this.balance = null;
    balance.fill(0);
    tokenize$2(source, (type2, start, end) => {
      const index2 = tokenCount++;
      offsetAndType[index2] = type2 << TYPE_SHIFT | end;
      if (firstCharOffset === -1)
        firstCharOffset = start;
      balance[index2] = balanceStart;
      if (type2 === balanceCloseType) {
        const prevBalanceStart = balance[balanceStart];
        balance[balanceStart] = index2;
        balanceStart = prevBalanceStart;
        balanceCloseType = balancePair$1[offsetAndType[prevBalanceStart] >> TYPE_SHIFT];
      } else if (isBlockOpenerToken(type2)) {
        balanceStart = index2;
        balanceCloseType = balancePair$1[type2];
      }
    });
    offsetAndType[tokenCount] = EOF$1 << TYPE_SHIFT | sourceLength;
    balance[tokenCount] = tokenCount;
    for (let i = 0;i < tokenCount; i++) {
      const balanceStart$1 = balance[i];
      if (balanceStart$1 <= i) {
        const balanceEnd = balance[balanceStart$1];
        if (balanceEnd !== i)
          balance[i] = balanceEnd;
      } else if (balanceStart$1 > tokenCount)
        balance[i] = tokenCount;
    }
    this.source = source;
    this.firstCharOffset = firstCharOffset === -1 ? 0 : firstCharOffset;
    this.tokenCount = tokenCount;
    this.offsetAndType = offsetAndType;
    this.balance = balance;
    this.reset();
    this.next();
  }
  lookupType(offset) {
    offset += this.tokenIndex;
    if (offset < this.tokenCount)
      return this.offsetAndType[offset] >> TYPE_SHIFT;
    return EOF$1;
  }
  lookupTypeNonSC(idx) {
    for (let offset = this.tokenIndex;offset < this.tokenCount; offset++) {
      const tokenType$1 = this.offsetAndType[offset] >> TYPE_SHIFT;
      if (tokenType$1 !== WhiteSpace && tokenType$1 !== Comment3) {
        if (idx-- === 0)
          return tokenType$1;
      }
    }
    return EOF$1;
  }
  lookupOffset(offset) {
    offset += this.tokenIndex;
    if (offset < this.tokenCount)
      return this.offsetAndType[offset - 1] & OFFSET_MASK;
    return this.source.length;
  }
  lookupOffsetNonSC(idx) {
    for (let offset = this.tokenIndex;offset < this.tokenCount; offset++) {
      const tokenType$1 = this.offsetAndType[offset] >> TYPE_SHIFT;
      if (tokenType$1 !== WhiteSpace && tokenType$1 !== Comment3) {
        if (idx-- === 0)
          return offset - this.tokenIndex;
      }
    }
    return EOF$1;
  }
  lookupValue(offset, referenceStr) {
    offset += this.tokenIndex;
    if (offset < this.tokenCount)
      return cmpStr(this.source, this.offsetAndType[offset - 1] & OFFSET_MASK, this.offsetAndType[offset] & OFFSET_MASK, referenceStr);
    return false;
  }
  getTokenStart(tokenIndex) {
    if (tokenIndex === this.tokenIndex)
      return this.tokenStart;
    if (tokenIndex > 0)
      return tokenIndex < this.tokenCount ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK : this.offsetAndType[this.tokenCount] & OFFSET_MASK;
    return this.firstCharOffset;
  }
  substrToCursor(start) {
    return this.source.substring(start, this.tokenStart);
  }
  isBalanceEdge(pos) {
    return this.balance[this.tokenIndex] < pos;
  }
  isDelim(code$1, offset) {
    if (offset)
      return this.lookupType(offset) === Delim && this.source.charCodeAt(this.lookupOffset(offset)) === code$1;
    return this.tokenType === Delim && this.source.charCodeAt(this.tokenStart) === code$1;
  }
  skip(tokenCount) {
    let next = this.tokenIndex + tokenCount;
    if (next < this.tokenCount) {
      this.tokenIndex = next;
      this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK;
      next = this.offsetAndType[next];
      this.tokenType = next >> TYPE_SHIFT;
      this.tokenEnd = next & OFFSET_MASK;
    } else {
      this.tokenIndex = this.tokenCount;
      this.next();
    }
  }
  next() {
    let next = this.tokenIndex + 1;
    if (next < this.tokenCount) {
      this.tokenIndex = next;
      this.tokenStart = this.tokenEnd;
      next = this.offsetAndType[next];
      this.tokenType = next >> TYPE_SHIFT;
      this.tokenEnd = next & OFFSET_MASK;
    } else {
      this.eof = true;
      this.tokenIndex = this.tokenCount;
      this.tokenType = EOF$1;
      this.tokenStart = this.tokenEnd = this.source.length;
    }
  }
  skipSC() {
    while (this.tokenType === WhiteSpace || this.tokenType === Comment3)
      this.next();
  }
  skipUntilBalanced(startToken, stopConsume) {
    let cursor = startToken;
    let balanceEnd = 0;
    let offset = 0;
    loop:
      for (;cursor < this.tokenCount; cursor++) {
        balanceEnd = this.balance[cursor];
        if (balanceEnd < startToken)
          break loop;
        offset = cursor > 0 ? this.offsetAndType[cursor - 1] & OFFSET_MASK : this.firstCharOffset;
        switch (stopConsume(this.source.charCodeAt(offset))) {
          case 1:
            break loop;
          case 2:
            cursor++;
            break loop;
          default:
            if (isBlockOpenerToken(this.offsetAndType[cursor] >> TYPE_SHIFT))
              cursor = balanceEnd;
        }
      }
    this.skip(cursor - this.tokenIndex);
  }
  forEachToken(fn3) {
    for (let i = 0, offset = this.firstCharOffset;i < this.tokenCount; i++) {
      const start = offset;
      const item = this.offsetAndType[i];
      const end = item & OFFSET_MASK;
      const type2 = item >> TYPE_SHIFT;
      offset = end;
      fn3(type2, start, end, i);
    }
  }
  dump() {
    const tokens = new Array(this.tokenCount);
    this.forEachToken((type2, start, end, index2) => {
      tokens[index2] = {
        idx: index2,
        type: names_default[type2],
        chunk: this.source.substring(start, end),
        balance: this.balance[index2]
      };
    });
    return tokens;
  }
}, releasedCursors = null, List, MAX_LINE_LENGTH = 100, OFFSET_CORRECTION = 60, TAB_REPLACEMENT = "    ", NOOP = () => {}, EXCLAMATIONMARK$3 = 33, NUMBERSIGN$4 = 35, SEMICOLON = 59, LEFTCURLYBRACKET$1 = 123, NULL = 0, require_base64, require_base64_vlq, require_util, require_array_set, require_mapping_list, require_source_map_generator, import_source_map_generator, trackNodes, token_before_exports, PLUSSIGN$9 = 43, HYPHENMINUS$6 = 45, code = (type2, value) => {
  if (type2 === Delim)
    type2 = value;
  if (typeof type2 === "string") {
    const charCode = type2.charCodeAt(0);
    return charCode > 127 ? 32768 : charCode << 8;
  }
  return type2;
}, specPairs, safePairs, spec, safe, REVERSESOLIDUS = 92, hasOwnProperty$3, noop$2 = function() {}, defaultLoc, SyntaxReferenceError = function(type2, referenceName) {
  const error49 = createCustomError("SyntaxReferenceError", type2 + (referenceName ? " `" + referenceName + "`" : ""));
  error49.reference = referenceName;
  return error49;
}, SyntaxMatchError = function(message, syntax, node3, matchResult) {
  const error49 = createCustomError("SyntaxMatchError", message);
  const { css: css$4, mismatchOffset, mismatchLength, start, end } = locateMismatch(matchResult, node3);
  error49.rawMessage = message;
  error49.syntax = syntax ? generate$50(syntax) : "<generic>";
  error49.css = css$4;
  error49.mismatchOffset = mismatchOffset;
  error49.mismatchLength = mismatchLength;
  error49.message = message + `
  syntax: ` + error49.syntax + `
   value: ` + (css$4 || "<empty string>") + `
  --------` + new Array(error49.mismatchOffset + 1).join("-") + "^";
  Object.assign(error49, start);
  error49.loc = {
    source: node3 && node3.loc && node3.loc.source || "<unknown>",
    start,
    end
  };
  return error49;
}, keywords, properties, HYPHENMINUS$5 = 45, keyword, property, cssWideKeywords, PLUSSIGN$8 = 43, HYPHENMINUS$4 = 45, N$3 = 110, DISALLOW_SIGN$1 = true, ALLOW_SIGN$1 = false, PLUSSIGN$7 = 43, HYPHENMINUS$3 = 45, QUESTIONMARK$2 = 63, U$1 = 117, calcFunctionNames, balancePair, tokenTypes, productionTypes, units_exports, length, angle, time4, frequency, resolution, flex, decibel, semitones, TAB$1 = 9, N$2 = 10, F$1 = 12, R$1 = 13, SPACE$3 = 32, NAME_CHAR, Scanner = class {
  constructor(str) {
    this.str = str;
    this.pos = 0;
  }
  charCodeAt(pos) {
    return pos < this.str.length ? this.str.charCodeAt(pos) : 0;
  }
  charCode() {
    return this.charCodeAt(this.pos);
  }
  isNameCharCode(code$1 = this.charCode()) {
    return code$1 < 128 && NAME_CHAR[code$1] === 1;
  }
  nextCharCode() {
    return this.charCodeAt(this.pos + 1);
  }
  nextNonWsCode(pos) {
    return this.charCodeAt(this.findWsEnd(pos));
  }
  skipWs() {
    this.pos = this.findWsEnd(this.pos);
  }
  findWsEnd(pos) {
    for (;pos < this.str.length; pos++) {
      const code$1 = this.str.charCodeAt(pos);
      if (code$1 !== R$1 && code$1 !== N$2 && code$1 !== F$1 && code$1 !== SPACE$3 && code$1 !== TAB$1)
        break;
    }
    return pos;
  }
  substringToPos(end) {
    return this.str.substring(this.pos, this.pos = end);
  }
  eat(code$1) {
    if (this.charCode() !== code$1)
      this.error("Expect `" + String.fromCharCode(code$1) + "`");
    this.pos++;
  }
  peek() {
    return this.pos < this.str.length ? this.str.charAt(this.pos++) : "";
  }
  error(message) {
    throw new SyntaxError$1(message, this.str, this.pos);
  }
  scanSpaces() {
    return this.substringToPos(this.findWsEnd(this.pos));
  }
  scanWord() {
    let end = this.pos;
    for (;end < this.str.length; end++) {
      const code$1 = this.str.charCodeAt(end);
      if (code$1 >= 128 || NAME_CHAR[code$1] === 0)
        break;
    }
    if (this.pos === end)
      this.error("Expect a keyword");
    return this.substringToPos(end);
  }
  scanNumber() {
    let end = this.pos;
    for (;end < this.str.length; end++) {
      const code$1 = this.str.charCodeAt(end);
      if (code$1 < 48 || code$1 > 57)
        break;
    }
    if (this.pos === end)
      this.error("Expect a number");
    return this.substringToPos(end);
  }
  scanString() {
    const end = this.str.indexOf("'", this.pos + 1);
    if (end === -1) {
      this.pos = this.str.length;
      this.error("Expect an apostrophe");
    }
    return this.substringToPos(end + 1);
  }
}, TAB = 9, N$1 = 10, F4 = 12, R5 = 13, SPACE$2 = 32, EXCLAMATIONMARK$2 = 33, NUMBERSIGN$3 = 35, AMPERSAND$5 = 38, APOSTROPHE$2 = 39, LEFTPARENTHESIS$2 = 40, RIGHTPARENTHESIS$2 = 41, ASTERISK$6 = 42, PLUSSIGN$6 = 43, COMMA = 44, HYPERMINUS = 45, LESSTHANSIGN$1 = 60, GREATERTHANSIGN$3 = 62, QUESTIONMARK$1 = 63, COMMERCIALAT = 64, LEFTSQUAREBRACKET = 91, RIGHTSQUAREBRACKET = 93, LEFTCURLYBRACKET = 123, VERTICALLINE$3 = 124, RIGHTCURLYBRACKET = 125, INFINITY = 8734, COMBINATOR_PRECEDENCE, noop = function() {}, astToTokens, MATCH, MISMATCH, DISALLOW_EMPTY, LEFTPARENTHESIS$1 = 40, RIGHTPARENTHESIS$1 = 41, hasOwnProperty$2, STUB = 0, TOKEN = 1, OPEN_SYNTAX = 2, CLOSE_SYNTAX = 3, EXIT_REASON_MATCH = "Match", EXIT_REASON_MISMATCH = "Mismatch", EXIT_REASON_ITERATION_LIMIT = "Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)", ITERATION_LIMIT = 15000, totalIterationCount = 0, trace_exports, hasOwnProperty$1, Lexer = class {
  constructor(config2, syntax, structure$49) {
    this.cssWideKeywords = cssWideKeywords;
    this.syntax = syntax;
    this.generic = false;
    this.units = { ...units_exports };
    this.atrules = Object.create(null);
    this.properties = Object.create(null);
    this.types = Object.create(null);
    this.structure = structure$49 || getStructureFromConfig(config2);
    if (config2) {
      if (config2.cssWideKeywords)
        this.cssWideKeywords = config2.cssWideKeywords;
      if (config2.units) {
        for (const group of Object.keys(units_exports))
          if (Array.isArray(config2.units[group]))
            this.units[group] = config2.units[group];
      }
      if (config2.types)
        for (const [name$49, type2] of Object.entries(config2.types))
          this.addType_(name$49, type2);
      if (config2.generic) {
        this.generic = true;
        for (const [name$49, value] of Object.entries(createGenericTypes(this.units)))
          this.addType_(name$49, value);
      }
      if (config2.atrules)
        for (const [name$49, atrule] of Object.entries(config2.atrules))
          this.addAtrule_(name$49, atrule);
      if (config2.properties)
        for (const [name$49, property$1] of Object.entries(config2.properties))
          this.addProperty_(name$49, property$1);
    }
    this.cssWideKeywordsSyntax = buildMatchGraph(this.cssWideKeywords.join(" |  "));
  }
  checkStructure(ast) {
    function collectWarning(node3, message) {
      warns.push({
        node: node3,
        message
      });
    }
    const structure$49 = this.structure;
    const warns = [];
    this.syntax.walk(ast, function(node3) {
      if (structure$49.hasOwnProperty(node3.type))
        structure$49[node3.type].check(node3, collectWarning);
      else
        collectWarning(node3, "Unknown node type `" + node3.type + "`");
    });
    return warns.length ? warns : false;
  }
  createDescriptor(syntax, type2, name$49, parent = null) {
    const ref = {
      type: type2,
      name: name$49
    };
    const descriptor = {
      type: type2,
      name: name$49,
      parent,
      serializable: typeof syntax === "string" || syntax && typeof syntax.type === "string",
      syntax: null,
      match: null,
      matchRef: null
    };
    if (typeof syntax === "function")
      descriptor.match = buildMatchGraph(syntax, ref);
    else {
      if (typeof syntax === "string")
        Object.defineProperty(descriptor, "syntax", { get() {
          Object.defineProperty(descriptor, "syntax", { value: parse$50(syntax) });
          return descriptor.syntax;
        } });
      else
        descriptor.syntax = syntax;
      Object.defineProperty(descriptor, "match", { get() {
        Object.defineProperty(descriptor, "match", { value: buildMatchGraph(descriptor.syntax, ref) });
        return descriptor.match;
      } });
      if (type2 === "Property")
        Object.defineProperty(descriptor, "matchRef", { get() {
          const syntax$1 = descriptor.syntax;
          const value = syntaxHasTopLevelCommaMultiplier(syntax$1) ? buildMatchGraph({
            ...syntax$1,
            terms: [syntax$1.terms[0].term]
          }, ref) : null;
          Object.defineProperty(descriptor, "matchRef", { value });
          return value;
        } });
    }
    return descriptor;
  }
  addAtrule_(name$49, syntax) {
    if (!syntax)
      return;
    this.atrules[name$49] = {
      type: "Atrule",
      name: name$49,
      prelude: syntax.prelude ? this.createDescriptor(syntax.prelude, "AtrulePrelude", name$49) : null,
      descriptors: syntax.descriptors ? Object.keys(syntax.descriptors).reduce((map3, descName) => {
        map3[descName] = this.createDescriptor(syntax.descriptors[descName], "AtruleDescriptor", descName, name$49);
        return map3;
      }, Object.create(null)) : null
    };
  }
  addProperty_(name$49, syntax) {
    if (!syntax)
      return;
    this.properties[name$49] = this.createDescriptor(syntax, "Property", name$49);
  }
  addType_(name$49, syntax) {
    if (!syntax)
      return;
    this.types[name$49] = this.createDescriptor(syntax, "Type", name$49);
  }
  checkAtruleName(atruleName) {
    if (!this.getAtrule(atruleName))
      return new SyntaxReferenceError("Unknown at-rule", "@" + atruleName);
  }
  checkAtrulePrelude(atruleName, prelude) {
    const error49 = this.checkAtruleName(atruleName);
    if (error49)
      return error49;
    const atrule = this.getAtrule(atruleName);
    if (!atrule.prelude && prelude)
      return /* @__PURE__ */ new SyntaxError("At-rule `@" + atruleName + "` should not contain a prelude");
    if (atrule.prelude && !prelude) {
      if (!matchSyntax(this, atrule.prelude, "", false).matched)
        return /* @__PURE__ */ new SyntaxError("At-rule `@" + atruleName + "` should contain a prelude");
    }
  }
  checkAtruleDescriptorName(atruleName, descriptorName) {
    const error49 = this.checkAtruleName(atruleName);
    if (error49)
      return error49;
    const atrule = this.getAtrule(atruleName);
    const descriptor = keyword(descriptorName);
    if (!atrule.descriptors)
      return /* @__PURE__ */ new SyntaxError("At-rule `@" + atruleName + "` has no known descriptors");
    if (!atrule.descriptors[descriptor.name] && !atrule.descriptors[descriptor.basename])
      return new SyntaxReferenceError("Unknown at-rule descriptor", descriptorName);
  }
  checkPropertyName(propertyName) {
    if (!this.getProperty(propertyName))
      return new SyntaxReferenceError("Unknown property", propertyName);
  }
  matchAtrulePrelude(atruleName, prelude) {
    const error49 = this.checkAtrulePrelude(atruleName, prelude);
    if (error49)
      return buildMatchResult(null, error49);
    const atrule = this.getAtrule(atruleName);
    if (!atrule.prelude)
      return buildMatchResult(null, null);
    return matchSyntax(this, atrule.prelude, prelude || "", false);
  }
  matchAtruleDescriptor(atruleName, descriptorName, value) {
    const error49 = this.checkAtruleDescriptorName(atruleName, descriptorName);
    if (error49)
      return buildMatchResult(null, error49);
    const atrule = this.getAtrule(atruleName);
    const descriptor = keyword(descriptorName);
    return matchSyntax(this, atrule.descriptors[descriptor.name] || atrule.descriptors[descriptor.basename], value, false);
  }
  matchDeclaration(node3) {
    if (node3.type !== "Declaration")
      return buildMatchResult(null, /* @__PURE__ */ new Error("Not a Declaration node"));
    return this.matchProperty(node3.property, node3.value);
  }
  matchProperty(propertyName, value) {
    if (property(propertyName).custom)
      return buildMatchResult(null, /* @__PURE__ */ new Error("Lexer matching doesn't applicable for custom properties"));
    const error49 = this.checkPropertyName(propertyName);
    if (error49)
      return buildMatchResult(null, error49);
    return matchSyntax(this, this.getProperty(propertyName), value, true);
  }
  matchType(typeName, value) {
    const typeSyntax = this.getType(typeName);
    if (!typeSyntax)
      return buildMatchResult(null, new SyntaxReferenceError("Unknown type", typeName));
    return matchSyntax(this, typeSyntax, value, false);
  }
  match(syntax, value) {
    if (typeof syntax !== "string" && (!syntax || !syntax.type))
      return buildMatchResult(null, new SyntaxReferenceError("Bad syntax"));
    if (typeof syntax === "string" || !syntax.match)
      syntax = this.createDescriptor(syntax, "Type", "anonymous");
    return matchSyntax(this, syntax, value, false);
  }
  findValueFragments(propertyName, value, type2, name$49) {
    return matchFragments(this, value, this.matchProperty(propertyName, value), type2, name$49);
  }
  findDeclarationValueFragments(declaration, type2, name$49) {
    return matchFragments(this, declaration.value, this.matchDeclaration(declaration), type2, name$49);
  }
  findAllFragments(ast, type2, name$49) {
    const result = [];
    this.syntax.walk(ast, {
      visit: "Declaration",
      enter: (declaration) => {
        result.push.apply(result, this.findDeclarationValueFragments(declaration, type2, name$49));
      }
    });
    return result;
  }
  getAtrule(atruleName, fallbackBasename = true) {
    const atrule = keyword(atruleName);
    return (atrule.vendor && fallbackBasename ? this.atrules[atrule.name] || this.atrules[atrule.basename] : this.atrules[atrule.name]) || null;
  }
  getAtrulePrelude(atruleName, fallbackBasename = true) {
    const atrule = this.getAtrule(atruleName, fallbackBasename);
    return atrule && atrule.prelude || null;
  }
  getAtruleDescriptor(atruleName, name$49) {
    return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators ? this.atrules[atruleName].declarators[name$49] || null : null;
  }
  getProperty(propertyName, fallbackBasename = true) {
    const property$1 = property(propertyName);
    return (property$1.vendor && fallbackBasename ? this.properties[property$1.name] || this.properties[property$1.basename] : this.properties[property$1.name]) || null;
  }
  getType(name$49) {
    return hasOwnProperty.call(this.types, name$49) ? this.types[name$49] : null;
  }
  validate() {
    function syntaxRef(name$49, isType$1) {
      return isType$1 ? `<${name$49}>` : `<'${name$49}'>`;
    }
    function validate(syntax, name$49, broken, descriptor) {
      if (broken.has(name$49))
        return broken.get(name$49);
      broken.set(name$49, false);
      if (descriptor.syntax !== null)
        walk$1(descriptor.syntax, function(node3) {
          if (node3.type !== "Type" && node3.type !== "Property")
            return;
          const map3 = node3.type === "Type" ? syntax.types : syntax.properties;
          const brokenMap = node3.type === "Type" ? brokenTypes : brokenProperties;
          if (!hasOwnProperty.call(map3, node3.name)) {
            errors3.push(`${syntaxRef(name$49, broken === brokenTypes)} used missed syntax definition ${syntaxRef(node3.name, node3.type === "Type")}`);
            broken.set(name$49, true);
          } else if (validate(syntax, node3.name, brokenMap, map3[node3.name])) {
            errors3.push(`${syntaxRef(name$49, broken === brokenTypes)} used broken syntax definition ${syntaxRef(node3.name, node3.type === "Type")}`);
            broken.set(name$49, true);
          }
        }, this);
    }
    const errors3 = [];
    let brokenTypes = /* @__PURE__ */ new Map;
    let brokenProperties = /* @__PURE__ */ new Map;
    for (const key in this.types)
      validate(this, key, brokenTypes, this.types[key]);
    for (const key in this.properties)
      validate(this, key, brokenProperties, this.properties[key]);
    const brokenTypesArray = [...brokenTypes.keys()].filter((name$49) => brokenTypes.get(name$49));
    const brokenPropertiesArray = [...brokenProperties.keys()].filter((name$49) => brokenProperties.get(name$49));
    if (brokenTypesArray.length || brokenPropertiesArray.length)
      return {
        errors: errors3,
        types: brokenTypesArray,
        properties: brokenPropertiesArray
      };
    return null;
  }
  dump(syntaxAsAst, pretty2) {
    return {
      generic: this.generic,
      cssWideKeywords: this.cssWideKeywords,
      units: this.units,
      types: dumpMapSyntax(this.types, !pretty2, syntaxAsAst),
      properties: dumpMapSyntax(this.properties, !pretty2, syntaxAsAst),
      atrules: dumpAtruleMapSyntax(this.atrules, !pretty2, syntaxAsAst)
    };
  }
  toString() {
    return JSON.stringify(this.dump());
  }
}, create_default = (config2) => createSyntax(mix({}, config2)), patch, data_patch_default, mdnAtrules, mdnProperties, mdnSyntaxes, hasOwn, extendSyntax, data_default, AnPlusB_exports, PLUSSIGN$5 = 43, HYPHENMINUS$2 = 45, N5 = 110, DISALLOW_SIGN = true, ALLOW_SIGN = false, name$48 = "AnPlusB", structure$48, Atrule_exports, name$47 = "Atrule", walkContext$9 = "atrule", structure$47, AtrulePrelude_exports, name$46 = "AtrulePrelude", walkContext$8 = "atrulePrelude", structure$46, AttributeSelector_exports, DOLLARSIGN$1 = 36, ASTERISK$5 = 42, EQUALSSIGN$1 = 61, CIRCUMFLEXACCENT = 94, VERTICALLINE$2 = 124, TILDE$2 = 126, name$45 = "AttributeSelector", structure$45, Block_exports, AMPERSAND$4 = 38, name$44 = "Block", walkContext$7 = "block", structure$44, Brackets_exports, name$43 = "Brackets", structure$43, CDC_exports, name$42 = "CDC", structure$42, CDO_exports, name$41 = "CDO", structure$41, ClassSelector_exports, FULLSTOP$2 = 46, name$40 = "ClassSelector", structure$40, Combinator_exports, PLUSSIGN$4 = 43, SOLIDUS$7 = 47, GREATERTHANSIGN$2 = 62, TILDE$1 = 126, name$39 = "Combinator", structure$39, Comment_exports, ASTERISK$4 = 42, SOLIDUS$6 = 47, name$38 = "Comment", structure$38, Condition_exports, likelyFeatureToken, name$37 = "Condition", structure$37, parentheses, Declaration_exports, EXCLAMATIONMARK$1 = 33, NUMBERSIGN$2 = 35, DOLLARSIGN = 36, AMPERSAND$3 = 38, ASTERISK$3 = 42, PLUSSIGN$3 = 43, SOLIDUS$5 = 47, name$36 = "Declaration", walkContext$6 = "declaration", structure$36, DeclarationList_exports, AMPERSAND$2 = 38, name$35 = "DeclarationList", structure$35, Dimension_exports, name$34 = "Dimension", structure$34, Feature_exports, SOLIDUS$4 = 47, name$33 = "Feature", structure$33, FeatureFunction_exports, name$32 = "FeatureFunction", structure$32, FeatureRange_exports, SOLIDUS$3 = 47, LESSTHANSIGN = 60, EQUALSSIGN = 61, GREATERTHANSIGN$1 = 62, name$31 = "FeatureRange", structure$31, Function_exports, name$30 = "Function", walkContext$5 = "function", structure$30, GeneralEnclosed_exports, name$29 = "GeneralEnclosed", structure$29, Hash_exports, xxx = "XXX", name$28 = "Hash", structure$28, Identifier_exports, name$27 = "Identifier", structure$27, IdSelector_exports, name$26 = "IdSelector", structure$26, Layer_exports, FULLSTOP$1 = 46, name$25 = "Layer", structure$25, LayerList_exports, name$24 = "LayerList", structure$24, MediaQuery_exports, name$23 = "MediaQuery", structure$23, MediaQueryList_exports, name$22 = "MediaQueryList", structure$22, NestingSelector_exports, AMPERSAND$1 = 38, name$21 = "NestingSelector", structure$21, Nth_exports, name$20 = "Nth", structure$20, Number_exports, name$19 = "Number", structure$19, Operator_exports, name$18 = "Operator", structure$18, Parentheses_exports, name$17 = "Parentheses", structure$17, Percentage_exports, name$16 = "Percentage", structure$16, PseudoClassSelector_exports, name$15 = "PseudoClassSelector", walkContext$4 = "function", structure$15, PseudoElementSelector_exports, name$14 = "PseudoElementSelector", walkContext$3 = "function", structure$14, Ratio_exports, SOLIDUS$2 = 47, name$13 = "Ratio", structure$13, Raw_exports, name$12 = "Raw", structure$12, Rule_exports, name$11 = "Rule", walkContext$2 = "rule", structure$11, Scope_exports, name$10 = "Scope", structure$10, Selector_exports, name$9 = "Selector", structure$9, SelectorList_exports, name$8 = "SelectorList", walkContext$1 = "selector", structure$8, REVERSE_SOLIDUS$1 = 92, QUOTATION_MARK$1 = 34, APOSTROPHE$1 = 39, String_exports, name$7 = "String", structure$7, StyleSheet_exports, EXCLAMATIONMARK = 33, name$6 = "StyleSheet", walkContext = "stylesheet", structure$6, SupportsDeclaration_exports, name$5 = "SupportsDeclaration", structure$5, TypeSelector_exports, ASTERISK$2 = 42, VERTICALLINE$1 = 124, name$4 = "TypeSelector", structure$4, UnicodeRange_exports, PLUSSIGN$2 = 43, HYPHENMINUS$1 = 45, QUESTIONMARK = 63, name$3 = "UnicodeRange", structure$3, SPACE$1 = 32, REVERSE_SOLIDUS = 92, QUOTATION_MARK = 34, APOSTROPHE = 39, LEFTPARENTHESIS = 40, RIGHTPARENTHESIS = 41, Url_exports, name$2 = "Url", structure$2, Value_exports, name$1 = "Value", structure$1, WhiteSpace_exports, SPACE, name2 = "WhiteSpace", structure, node_exports, lexer_default, NUMBERSIGN$1 = 35, ASTERISK$1 = 42, PLUSSIGN$1 = 43, HYPHENMINUS = 45, SOLIDUS$1 = 47, U5 = 117, atrulePrelude_default, NUMBERSIGN = 35, AMPERSAND = 38, ASTERISK = 42, PLUSSIGN = 43, SOLIDUS = 47, FULLSTOP = 46, GREATERTHANSIGN = 62, VERTICALLINE = 124, TILDE = 126, selector_default, value_default, scope_exports, nonContainerNameKeywords, container_default, font_face_default, parseFunctions, import_default, layer_default, media_default, nest_default, page_default, scope_default, starting_style_default, supports_default, atrule_default, selectorList, selector, identList, langList, nth, pseudo_default, index_parse_exports, parser_default, walker_default, syntax_default, tokenize, parse5, generate, lexer2, createLexer, walk, find, findLast, findAll, toPlainObject, fromPlainObject, fork, fromDashCaseToCamelCase = (text2) => {
  return text2.replace(/-(\w|$)/g, (_6, p1) => p1.toUpperCase());
}, LAB_TO_LMS, LSM_TO_RGB, promiseStates, digitToNameMap, componentsToTreatAsElements, isComponent = (element) => {
  return (typeof element.type === "function" || element.type.render !== undefined) && !componentsToTreatAsElements.includes(element.type);
}, css$3 = `
@layer theme, base, components, utilities;

@layer theme {
  @theme default {
    --font-sans:
      ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono:
      ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;

    --color-red-50: oklch(97.1% 0.013 17.38);
    --color-red-100: oklch(93.6% 0.032 17.717);
    --color-red-200: oklch(88.5% 0.062 18.334);
    --color-red-300: oklch(80.8% 0.114 19.571);
    --color-red-400: oklch(70.4% 0.191 22.216);
    --color-red-500: oklch(63.7% 0.237 25.331);
    --color-red-600: oklch(57.7% 0.245 27.325);
    --color-red-700: oklch(50.5% 0.213 27.518);
    --color-red-800: oklch(44.4% 0.177 26.899);
    --color-red-900: oklch(39.6% 0.141 25.723);
    --color-red-950: oklch(25.8% 0.092 26.042);

    --color-orange-50: oklch(98% 0.016 73.684);
    --color-orange-100: oklch(95.4% 0.038 75.164);
    --color-orange-200: oklch(90.1% 0.076 70.697);
    --color-orange-300: oklch(83.7% 0.128 66.29);
    --color-orange-400: oklch(75% 0.183 55.934);
    --color-orange-500: oklch(70.5% 0.213 47.604);
    --color-orange-600: oklch(64.6% 0.222 41.116);
    --color-orange-700: oklch(55.3% 0.195 38.402);
    --color-orange-800: oklch(47% 0.157 37.304);
    --color-orange-900: oklch(40.8% 0.123 38.172);
    --color-orange-950: oklch(26.6% 0.079 36.259);

    --color-amber-50: oklch(98.7% 0.022 95.277);
    --color-amber-100: oklch(96.2% 0.059 95.617);
    --color-amber-200: oklch(92.4% 0.12 95.746);
    --color-amber-300: oklch(87.9% 0.169 91.605);
    --color-amber-400: oklch(82.8% 0.189 84.429);
    --color-amber-500: oklch(76.9% 0.188 70.08);
    --color-amber-600: oklch(66.6% 0.179 58.318);
    --color-amber-700: oklch(55.5% 0.163 48.998);
    --color-amber-800: oklch(47.3% 0.137 46.201);
    --color-amber-900: oklch(41.4% 0.112 45.904);
    --color-amber-950: oklch(27.9% 0.077 45.635);

    --color-yellow-50: oklch(98.7% 0.026 102.212);
    --color-yellow-100: oklch(97.3% 0.071 103.193);
    --color-yellow-200: oklch(94.5% 0.129 101.54);
    --color-yellow-300: oklch(90.5% 0.182 98.111);
    --color-yellow-400: oklch(85.2% 0.199 91.936);
    --color-yellow-500: oklch(79.5% 0.184 86.047);
    --color-yellow-600: oklch(68.1% 0.162 75.834);
    --color-yellow-700: oklch(55.4% 0.135 66.442);
    --color-yellow-800: oklch(47.6% 0.114 61.907);
    --color-yellow-900: oklch(42.1% 0.095 57.708);
    --color-yellow-950: oklch(28.6% 0.066 53.813);

    --color-lime-50: oklch(98.6% 0.031 120.757);
    --color-lime-100: oklch(96.7% 0.067 122.328);
    --color-lime-200: oklch(93.8% 0.127 124.321);
    --color-lime-300: oklch(89.7% 0.196 126.665);
    --color-lime-400: oklch(84.1% 0.238 128.85);
    --color-lime-500: oklch(76.8% 0.233 130.85);
    --color-lime-600: oklch(64.8% 0.2 131.684);
    --color-lime-700: oklch(53.2% 0.157 131.589);
    --color-lime-800: oklch(45.3% 0.124 130.933);
    --color-lime-900: oklch(40.5% 0.101 131.063);
    --color-lime-950: oklch(27.4% 0.072 132.109);

    --color-green-50: oklch(98.2% 0.018 155.826);
    --color-green-100: oklch(96.2% 0.044 156.743);
    --color-green-200: oklch(92.5% 0.084 155.995);
    --color-green-300: oklch(87.1% 0.15 154.449);
    --color-green-400: oklch(79.2% 0.209 151.711);
    --color-green-500: oklch(72.3% 0.219 149.579);
    --color-green-600: oklch(62.7% 0.194 149.214);
    --color-green-700: oklch(52.7% 0.154 150.069);
    --color-green-800: oklch(44.8% 0.119 151.328);
    --color-green-900: oklch(39.3% 0.095 152.535);
    --color-green-950: oklch(26.6% 0.065 152.934);

    --color-emerald-50: oklch(97.9% 0.021 166.113);
    --color-emerald-100: oklch(95% 0.052 163.051);
    --color-emerald-200: oklch(90.5% 0.093 164.15);
    --color-emerald-300: oklch(84.5% 0.143 164.978);
    --color-emerald-400: oklch(76.5% 0.177 163.223);
    --color-emerald-500: oklch(69.6% 0.17 162.48);
    --color-emerald-600: oklch(59.6% 0.145 163.225);
    --color-emerald-700: oklch(50.8% 0.118 165.612);
    --color-emerald-800: oklch(43.2% 0.095 166.913);
    --color-emerald-900: oklch(37.8% 0.077 168.94);
    --color-emerald-950: oklch(26.2% 0.051 172.552);

    --color-teal-50: oklch(98.4% 0.014 180.72);
    --color-teal-100: oklch(95.3% 0.051 180.801);
    --color-teal-200: oklch(91% 0.096 180.426);
    --color-teal-300: oklch(85.5% 0.138 181.071);
    --color-teal-400: oklch(77.7% 0.152 181.912);
    --color-teal-500: oklch(70.4% 0.14 182.503);
    --color-teal-600: oklch(60% 0.118 184.704);
    --color-teal-700: oklch(51.1% 0.096 186.391);
    --color-teal-800: oklch(43.7% 0.078 188.216);
    --color-teal-900: oklch(38.6% 0.063 188.416);
    --color-teal-950: oklch(27.7% 0.046 192.524);

    --color-cyan-50: oklch(98.4% 0.019 200.873);
    --color-cyan-100: oklch(95.6% 0.045 203.388);
    --color-cyan-200: oklch(91.7% 0.08 205.041);
    --color-cyan-300: oklch(86.5% 0.127 207.078);
    --color-cyan-400: oklch(78.9% 0.154 211.53);
    --color-cyan-500: oklch(71.5% 0.143 215.221);
    --color-cyan-600: oklch(60.9% 0.126 221.723);
    --color-cyan-700: oklch(52% 0.105 223.128);
    --color-cyan-800: oklch(45% 0.085 224.283);
    --color-cyan-900: oklch(39.8% 0.07 227.392);
    --color-cyan-950: oklch(30.2% 0.056 229.695);

    --color-sky-50: oklch(97.7% 0.013 236.62);
    --color-sky-100: oklch(95.1% 0.026 236.824);
    --color-sky-200: oklch(90.1% 0.058 230.902);
    --color-sky-300: oklch(82.8% 0.111 230.318);
    --color-sky-400: oklch(74.6% 0.16 232.661);
    --color-sky-500: oklch(68.5% 0.169 237.323);
    --color-sky-600: oklch(58.8% 0.158 241.966);
    --color-sky-700: oklch(50% 0.134 242.749);
    --color-sky-800: oklch(44.3% 0.11 240.79);
    --color-sky-900: oklch(39.1% 0.09 240.876);
    --color-sky-950: oklch(29.3% 0.066 243.157);

    --color-blue-50: oklch(97% 0.014 254.604);
    --color-blue-100: oklch(93.2% 0.032 255.585);
    --color-blue-200: oklch(88.2% 0.059 254.128);
    --color-blue-300: oklch(80.9% 0.105 251.813);
    --color-blue-400: oklch(70.7% 0.165 254.624);
    --color-blue-500: oklch(62.3% 0.214 259.815);
    --color-blue-600: oklch(54.6% 0.245 262.881);
    --color-blue-700: oklch(48.8% 0.243 264.376);
    --color-blue-800: oklch(42.4% 0.199 265.638);
    --color-blue-900: oklch(37.9% 0.146 265.522);
    --color-blue-950: oklch(28.2% 0.091 267.935);

    --color-indigo-50: oklch(96.2% 0.018 272.314);
    --color-indigo-100: oklch(93% 0.034 272.788);
    --color-indigo-200: oklch(87% 0.065 274.039);
    --color-indigo-300: oklch(78.5% 0.115 274.713);
    --color-indigo-400: oklch(67.3% 0.182 276.935);
    --color-indigo-500: oklch(58.5% 0.233 277.117);
    --color-indigo-600: oklch(51.1% 0.262 276.966);
    --color-indigo-700: oklch(45.7% 0.24 277.023);
    --color-indigo-800: oklch(39.8% 0.195 277.366);
    --color-indigo-900: oklch(35.9% 0.144 278.697);
    --color-indigo-950: oklch(25.7% 0.09 281.288);

    --color-violet-50: oklch(96.9% 0.016 293.756);
    --color-violet-100: oklch(94.3% 0.029 294.588);
    --color-violet-200: oklch(89.4% 0.057 293.283);
    --color-violet-300: oklch(81.1% 0.111 293.571);
    --color-violet-400: oklch(70.2% 0.183 293.541);
    --color-violet-500: oklch(60.6% 0.25 292.717);
    --color-violet-600: oklch(54.1% 0.281 293.009);
    --color-violet-700: oklch(49.1% 0.27 292.581);
    --color-violet-800: oklch(43.2% 0.232 292.759);
    --color-violet-900: oklch(38% 0.189 293.745);
    --color-violet-950: oklch(28.3% 0.141 291.089);

    --color-purple-50: oklch(97.7% 0.014 308.299);
    --color-purple-100: oklch(94.6% 0.033 307.174);
    --color-purple-200: oklch(90.2% 0.063 306.703);
    --color-purple-300: oklch(82.7% 0.119 306.383);
    --color-purple-400: oklch(71.4% 0.203 305.504);
    --color-purple-500: oklch(62.7% 0.265 303.9);
    --color-purple-600: oklch(55.8% 0.288 302.321);
    --color-purple-700: oklch(49.6% 0.265 301.924);
    --color-purple-800: oklch(43.8% 0.218 303.724);
    --color-purple-900: oklch(38.1% 0.176 304.987);
    --color-purple-950: oklch(29.1% 0.149 302.717);

    --color-fuchsia-50: oklch(97.7% 0.017 320.058);
    --color-fuchsia-100: oklch(95.2% 0.037 318.852);
    --color-fuchsia-200: oklch(90.3% 0.076 319.62);
    --color-fuchsia-300: oklch(83.3% 0.145 321.434);
    --color-fuchsia-400: oklch(74% 0.238 322.16);
    --color-fuchsia-500: oklch(66.7% 0.295 322.15);
    --color-fuchsia-600: oklch(59.1% 0.293 322.896);
    --color-fuchsia-700: oklch(51.8% 0.253 323.949);
    --color-fuchsia-800: oklch(45.2% 0.211 324.591);
    --color-fuchsia-900: oklch(40.1% 0.17 325.612);
    --color-fuchsia-950: oklch(29.3% 0.136 325.661);

    --color-pink-50: oklch(97.1% 0.014 343.198);
    --color-pink-100: oklch(94.8% 0.028 342.258);
    --color-pink-200: oklch(89.9% 0.061 343.231);
    --color-pink-300: oklch(82.3% 0.12 346.018);
    --color-pink-400: oklch(71.8% 0.202 349.761);
    --color-pink-500: oklch(65.6% 0.241 354.308);
    --color-pink-600: oklch(59.2% 0.249 0.584);
    --color-pink-700: oklch(52.5% 0.223 3.958);
    --color-pink-800: oklch(45.9% 0.187 3.815);
    --color-pink-900: oklch(40.8% 0.153 2.432);
    --color-pink-950: oklch(28.4% 0.109 3.907);

    --color-rose-50: oklch(96.9% 0.015 12.422);
    --color-rose-100: oklch(94.1% 0.03 12.58);
    --color-rose-200: oklch(89.2% 0.058 10.001);
    --color-rose-300: oklch(81% 0.117 11.638);
    --color-rose-400: oklch(71.2% 0.194 13.428);
    --color-rose-500: oklch(64.5% 0.246 16.439);
    --color-rose-600: oklch(58.6% 0.253 17.585);
    --color-rose-700: oklch(51.4% 0.222 16.935);
    --color-rose-800: oklch(45.5% 0.188 13.697);
    --color-rose-900: oklch(41% 0.159 10.272);
    --color-rose-950: oklch(27.1% 0.105 12.094);

    --color-slate-50: oklch(98.4% 0.003 247.858);
    --color-slate-100: oklch(96.8% 0.007 247.896);
    --color-slate-200: oklch(92.9% 0.013 255.508);
    --color-slate-300: oklch(86.9% 0.022 252.894);
    --color-slate-400: oklch(70.4% 0.04 256.788);
    --color-slate-500: oklch(55.4% 0.046 257.417);
    --color-slate-600: oklch(44.6% 0.043 257.281);
    --color-slate-700: oklch(37.2% 0.044 257.287);
    --color-slate-800: oklch(27.9% 0.041 260.031);
    --color-slate-900: oklch(20.8% 0.042 265.755);
    --color-slate-950: oklch(12.9% 0.042 264.695);

    --color-gray-50: oklch(98.5% 0.002 247.839);
    --color-gray-100: oklch(96.7% 0.003 264.542);
    --color-gray-200: oklch(92.8% 0.006 264.531);
    --color-gray-300: oklch(87.2% 0.01 258.338);
    --color-gray-400: oklch(70.7% 0.022 261.325);
    --color-gray-500: oklch(55.1% 0.027 264.364);
    --color-gray-600: oklch(44.6% 0.03 256.802);
    --color-gray-700: oklch(37.3% 0.034 259.733);
    --color-gray-800: oklch(27.8% 0.033 256.848);
    --color-gray-900: oklch(21% 0.034 264.665);
    --color-gray-950: oklch(13% 0.028 261.692);

    --color-zinc-50: oklch(98.5% 0 0);
    --color-zinc-100: oklch(96.7% 0.001 286.375);
    --color-zinc-200: oklch(92% 0.004 286.32);
    --color-zinc-300: oklch(87.1% 0.006 286.286);
    --color-zinc-400: oklch(70.5% 0.015 286.067);
    --color-zinc-500: oklch(55.2% 0.016 285.938);
    --color-zinc-600: oklch(44.2% 0.017 285.786);
    --color-zinc-700: oklch(37% 0.013 285.805);
    --color-zinc-800: oklch(27.4% 0.006 286.033);
    --color-zinc-900: oklch(21% 0.006 285.885);
    --color-zinc-950: oklch(14.1% 0.005 285.823);

    --color-neutral-50: oklch(98.5% 0 0);
    --color-neutral-100: oklch(97% 0 0);
    --color-neutral-200: oklch(92.2% 0 0);
    --color-neutral-300: oklch(87% 0 0);
    --color-neutral-400: oklch(70.8% 0 0);
    --color-neutral-500: oklch(55.6% 0 0);
    --color-neutral-600: oklch(43.9% 0 0);
    --color-neutral-700: oklch(37.1% 0 0);
    --color-neutral-800: oklch(26.9% 0 0);
    --color-neutral-900: oklch(20.5% 0 0);
    --color-neutral-950: oklch(14.5% 0 0);

    --color-stone-50: oklch(98.5% 0.001 106.423);
    --color-stone-100: oklch(97% 0.001 106.424);
    --color-stone-200: oklch(92.3% 0.003 48.717);
    --color-stone-300: oklch(86.9% 0.005 56.366);
    --color-stone-400: oklch(70.9% 0.01 56.259);
    --color-stone-500: oklch(55.3% 0.013 58.071);
    --color-stone-600: oklch(44.4% 0.011 73.639);
    --color-stone-700: oklch(37.4% 0.01 67.558);
    --color-stone-800: oklch(26.8% 0.007 34.298);
    --color-stone-900: oklch(21.6% 0.006 56.043);
    --color-stone-950: oklch(14.7% 0.004 49.25);

    --color-black: #000;
    --color-white: #fff;

    --spacing: 0.25rem;

    --breakpoint-sm: 40rem;
    --breakpoint-md: 48rem;
    --breakpoint-lg: 64rem;
    --breakpoint-xl: 80rem;
    --breakpoint-2xl: 96rem;

    --container-3xs: 16rem;
    --container-2xs: 18rem;
    --container-xs: 20rem;
    --container-sm: 24rem;
    --container-md: 28rem;
    --container-lg: 32rem;
    --container-xl: 36rem;
    --container-2xl: 42rem;
    --container-3xl: 48rem;
    --container-4xl: 56rem;
    --container-5xl: 64rem;
    --container-6xl: 72rem;
    --container-7xl: 80rem;

    --text-xs: 0.75rem;
    --text-xs--line-height: calc(1 / 0.75);
    --text-sm: 0.875rem;
    --text-sm--line-height: calc(1.25 / 0.875);
    --text-base: 1rem;
    --text-base--line-height: calc(1.5 / 1);
    --text-lg: 1.125rem;
    --text-lg--line-height: calc(1.75 / 1.125);
    --text-xl: 1.25rem;
    --text-xl--line-height: calc(1.75 / 1.25);
    --text-2xl: 1.5rem;
    --text-2xl--line-height: calc(2 / 1.5);
    --text-3xl: 1.875rem;
    --text-3xl--line-height: calc(2.25 / 1.875);
    --text-4xl: 2.25rem;
    --text-4xl--line-height: calc(2.5 / 2.25);
    --text-5xl: 3rem;
    --text-5xl--line-height: 1;
    --text-6xl: 3.75rem;
    --text-6xl--line-height: 1;
    --text-7xl: 4.5rem;
    --text-7xl--line-height: 1;
    --text-8xl: 6rem;
    --text-8xl--line-height: 1;
    --text-9xl: 8rem;
    --text-9xl--line-height: 1;

    --font-weight-thin: 100;
    --font-weight-extralight: 200;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;

    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0em;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    --radius-xs: 0.125rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-4xl: 2rem;

    --shadow-2xs: 0 1px rgb(0 0 0 / 0.05);
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md:
      0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg:
      0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl:
      0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05);
    --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05);
    --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05);

    --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05);
    --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15);
    --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12);
    --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15);
    --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1);
    --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15);

    --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15);
    --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2);
    --text-shadow-sm:
      0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075),
      0px 2px 2px rgb(0 0 0 / 0.075);
    --text-shadow-md:
      0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1),
      0px 2px 4px rgb(0 0 0 / 0.1);
    --text-shadow-lg:
      0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1),
      0px 4px 8px rgb(0 0 0 / 0.1);

    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    --animate-spin: spin 1s linear infinite;
    --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
    --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    --animate-bounce: bounce 1s infinite;

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    @keyframes ping {
      75%,
      100% {
        transform: scale(2);
        opacity: 0;
      }
    }

    @keyframes pulse {
      50% {
        opacity: 0.5;
      }
    }

    @keyframes bounce {
      0%,
      100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
      }

      50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
      }
    }

    --blur-xs: 4px;
    --blur-sm: 8px;
    --blur-md: 12px;
    --blur-lg: 16px;
    --blur-xl: 24px;
    --blur-2xl: 40px;
    --blur-3xl: 64px;

    --perspective-dramatic: 100px;
    --perspective-near: 300px;
    --perspective-normal: 500px;
    --perspective-midrange: 800px;
    --perspective-distant: 1200px;

    --aspect-video: 16 / 9;

    --default-transition-duration: 150ms;
    --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    --default-font-family: --theme(--font-sans, initial);
    --default-font-feature-settings: --theme(
      --font-sans--font-feature-settings,
      initial
    );
    --default-font-variation-settings: --theme(
      --font-sans--font-variation-settings,
      initial
    );
    --default-mono-font-family: --theme(--font-mono, initial);
    --default-mono-font-feature-settings: --theme(
      --font-mono--font-feature-settings,
      initial
    );
    --default-mono-font-variation-settings: --theme(
      --font-mono--font-variation-settings,
      initial
    );
  }

  /* Deprecated */
  @theme default inline reference {
    --blur: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06);
    --radius: 0.25rem;
    --max-width-prose: 65ch;
  }
}

@layer base {
  /*
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
  2. Remove default margins and padding
  3. Reset all borders.
*/

  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    box-sizing: border-box; /* 1 */
    margin: 0; /* 2 */
    padding: 0; /* 2 */
    border: 0 solid; /* 3 */
  }

  /*
  1. Use a consistent sensible line-height in all browsers.
  2. Prevent adjustments of font size after orientation changes in iOS.
  3. Use a more readable tab size.
  4. Use the user's configured \`sans\` font-family by default.
  5. Use the user's configured \`sans\` font-feature-settings by default.
  6. Use the user's configured \`sans\` font-variation-settings by default.
  7. Disable tap highlights on iOS.
*/

  html,
  :host {
    line-height: 1.5; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
    tab-size: 4; /* 3 */
    font-family: --theme(
      --default-font-family,
      ui-sans-serif,
      system-ui,
      sans-serif,
      "Apple Color Emoji",
      "Segoe UI Emoji",
      "Segoe UI Symbol",
      "Noto Color Emoji"
    ); /* 4 */
    font-feature-settings: --theme(
      --default-font-feature-settings,
      normal
    ); /* 5 */
    font-variation-settings: --theme(
      --default-font-variation-settings,
      normal
    ); /* 6 */
    -webkit-tap-highlight-color: transparent; /* 7 */
  }

  /*
  1. Add the correct height in Firefox.
  2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
  3. Reset the default border style to a 1px solid border.
*/

  hr {
    height: 0; /* 1 */
    color: inherit; /* 2 */
    border-top-width: 1px; /* 3 */
  }

  /*
  Add the correct text decoration in Chrome, Edge, and Safari.
*/

  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }

  /*
  Remove the default font size and weight for headings.
*/

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: inherit;
    font-weight: inherit;
  }

  /*
  Reset links to optimize for opt-in styling instead of opt-out.
*/

  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }

  /*
  Add the correct font weight in Edge and Safari.
*/

  b,
  strong {
    font-weight: bolder;
  }

  /*
  1. Use the user's configured \`mono\` font-family by default.
  2. Use the user's configured \`mono\` font-feature-settings by default.
  3. Use the user's configured \`mono\` font-variation-settings by default.
  4. Correct the odd \`em\` font sizing in all browsers.
*/

  code,
  kbd,
  samp,
  pre {
    font-family: --theme(
      --default-mono-font-family,
      ui-monospace,
      SFMono-Regular,
      Menlo,
      Monaco,
      Consolas,
      "Liberation Mono",
      "Courier New",
      monospace
    ); /* 1 */
    font-feature-settings: --theme(
      --default-mono-font-feature-settings,
      normal
    ); /* 2 */
    font-variation-settings: --theme(
      --default-mono-font-variation-settings,
      normal
    ); /* 3 */
    font-size: 1em; /* 4 */
  }

  /*
  Add the correct font size in all browsers.
*/

  small {
    font-size: 80%;
  }

  /*
  Prevent \`sub\` and \`sup\` elements from affecting the line height in all browsers.
*/

  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }

  sub {
    bottom: -0.25em;
  }

  sup {
    top: -0.5em;
  }

  /*
  1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
  2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
  3. Remove gaps between table borders by default.
*/

  table {
    text-indent: 0; /* 1 */
    border-color: inherit; /* 2 */
    border-collapse: collapse; /* 3 */
  }

  /*
  Use the modern Firefox focus style for all focusable elements.
*/

  :-moz-focusring {
    outline: auto;
  }

  /*
  Add the correct vertical alignment in Chrome and Firefox.
*/

  progress {
    vertical-align: baseline;
  }

  /*
  Add the correct display in Chrome and Safari.
*/

  summary {
    display: list-item;
  }

  /*
  Make lists unstyled by default.
*/

  ol,
  ul,
  menu {
    list-style: none;
  }

  /*
  1. Make replaced elements \`display: block\` by default. (https://github.com/mozdevs/cssremedy/issues/14)
  2. Add \`vertical - align: middle\` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
      This can trigger a poorly considered lint error in some tools but is included by design.
*/

  img,
  svg,
  video,
  canvas,
  audio,
  iframe,
  embed,
  object {
    display: block; /* 1 */
    vertical-align: middle; /* 2 */
  }

  /*
  Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

  img,
  video {
    max-width: 100%;
    height: auto;
  }

  /*
  1. Inherit font styles in all browsers.
  2. Remove border radius in all browsers.
  3. Remove background color in all browsers.
  4. Ensure consistent opacity for disabled states in all browsers.
*/

  button,
  input,
  select,
  optgroup,
  textarea,
  ::file-selector-button {
    font: inherit; /* 1 */
    font-feature-settings: inherit; /* 1 */
    font-variation-settings: inherit; /* 1 */
    letter-spacing: inherit; /* 1 */
    color: inherit; /* 1 */
    border-radius: 0; /* 2 */
    background-color: transparent; /* 3 */
    opacity: 1; /* 4 */
  }

  /*
  Restore default font weight.
*/

  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  /*
  Restore indentation.
*/

  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  /*
  Restore space after button.
*/

  ::file-selector-button {
    margin-inline-end: 4px;
  }

  /*
  Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
*/

  ::placeholder {
    opacity: 1;
  }

  /*
  Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not
  crash when using \`color - mix(…)\` with \`currentcolor\`. (https://github.com/tailwindlabs/tailwindcss/issues/17194)
*/

  @supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or
    (contain-intrinsic-size: 1px) /* Safari 17+ */ {
    ::placeholder {
      color: color-mix(in oklab, currentcolor 50%, transparent);
    }
  }

  /*
  Prevent resizing textareas horizontally by default.
*/

  textarea {
    resize: vertical;
  }

  /*
  Remove the inner padding in Chrome and Safari on macOS.
*/

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  /*
  1. Ensure date/time inputs have the same height when empty in iOS Safari.
  2. Ensure text alignment can be changed on date/time inputs in iOS Safari.
*/

  ::-webkit-date-and-time-value {
    min-height: 1lh; /* 1 */
    text-align: inherit; /* 2 */
  }

  /*
  Prevent height from changing on date/time inputs in macOS Safari when the input is set to \`display: block\`.
*/

  ::-webkit-datetime-edit {
    display: inline-flex;
  }

  /*
  Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers.
*/

  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }

  ::-webkit-datetime-edit,
  ::-webkit-datetime-edit-year-field,
  ::-webkit-datetime-edit-month-field,
  ::-webkit-datetime-edit-day-field,
  ::-webkit-datetime-edit-hour-field,
  ::-webkit-datetime-edit-minute-field,
  ::-webkit-datetime-edit-second-field,
  ::-webkit-datetime-edit-millisecond-field,
  ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }

  /*
  Center dropdown marker shown on inputs with paired \`<datalist>\`s in Chrome. (https://github.com/tailwindlabs/tailwindcss/issues/18499)
*/

  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }

  /*
  Remove the additional \`: invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

  :-moz-ui-invalid {
    box-shadow: none;
  }

  /*
  Correct the inability to style the border radius in iOS Safari.
*/

  button,
  input:where([type="button"], [type="reset"], [type="submit"]),
  ::file-selector-button {
    appearance: button;
  }

  /*
  Correct the cursor style of increment and decrement buttons in Safari.
*/

  ::-webkit-inner-spin-button,
  ::-webkit-outer-spin-button {
    height: auto;
  }

  /*
  Make elements with the HTML hidden attribute stay hidden by default.
*/

  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}

@layer utilities {
  @tailwind utilities;
}
`, tailwind_stylesheets_default, css$2 = `
/*
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
  2. Remove default margins and padding
  3. Reset all borders.
*/

*,
::after,
::before,
::backdrop,
::file-selector-button {
  box-sizing: border-box; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 2 */
  border: 0 solid; /* 3 */
}

/*
  1. Use a consistent sensible line-height in all browsers.
  2. Prevent adjustments of font size after orientation changes in iOS.
  3. Use a more readable tab size.
  4. Use the user's configured \`sans\` font-family by default.
  5. Use the user's configured \`sans\` font-feature-settings by default.
  6. Use the user's configured \`sans\` font-variation-settings by default.
  7. Disable tap highlights on iOS.
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  tab-size: 4; /* 3 */
  font-family: --theme(
    --default-font-family,
    ui-sans-serif,
    system-ui,
    sans-serif,
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol',
    'Noto Color Emoji'
  ); /* 4 */
  font-feature-settings: --theme(--default-font-feature-settings, normal); /* 5 */
  font-variation-settings: --theme(--default-font-variation-settings, normal); /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
  1. Add the correct height in Firefox.
  2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
  3. Reset the default border style to a 1px solid border.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
  Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}

/*
  Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
  Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  -webkit-text-decoration: inherit;
  text-decoration: inherit;
}

/*
  Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
  1. Use the user's configured \`mono\` font-family by default.
  2. Use the user's configured \`mono\` font-feature-settings by default.
  3. Use the user's configured \`mono\` font-variation-settings by default.
  4. Correct the odd \`em\` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: --theme(
    --default-mono-font-family,
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    'Liberation Mono',
    'Courier New',
    monospace
  ); /* 1 */
  font-feature-settings: --theme(--default-mono-font-feature-settings, normal); /* 2 */
  font-variation-settings: --theme(--default-mono-font-variation-settings, normal); /* 3 */
  font-size: 1em; /* 4 */
}

/*
  Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
  Prevent \`sub\` and \`sup\` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
  1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
  2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
  3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
  Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
  Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
  Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
  Make lists unstyled by default.
*/

ol,
ul,
menu {
  list-style: none;
}

/*
  1. Make replaced elements \`display: block\` by default. (https://github.com/mozdevs/cssremedy/issues/14)
  2. Add \`vertical-align: middle\` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
      This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
  Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/*
  1. Inherit font styles in all browsers.
  2. Remove border radius in all browsers.
  3. Remove background color in all browsers.
  4. Ensure consistent opacity for disabled states in all browsers.
*/

button,
input,
select,
optgroup,
textarea,
::file-selector-button {
  font: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  border-radius: 0; /* 2 */
  background-color: transparent; /* 3 */
  opacity: 1; /* 4 */
}

/*
  Restore default font weight.
*/

:where(select:is([multiple], [size])) optgroup {
  font-weight: bolder;
}

/*
  Restore indentation.
*/

:where(select:is([multiple], [size])) optgroup option {
  padding-inline-start: 20px;
}

/*
  Restore space after button.
*/

::file-selector-button {
  margin-inline-end: 4px;
}

/*
  Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
*/

::placeholder {
  opacity: 1;
}

/*
  Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not
  crash when using \`color-mix(…)\` with \`currentcolor\`. (https://github.com/tailwindlabs/tailwindcss/issues/17194)
*/

@supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or
  (contain-intrinsic-size: 1px) /* Safari 17+ */ {
  ::placeholder {
    color: color-mix(in oklab, currentcolor 50%, transparent);
  }
}

/*
  Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
  Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
  1. Ensure date/time inputs have the same height when empty in iOS Safari.
  2. Ensure text alignment can be changed on date/time inputs in iOS Safari.
*/

::-webkit-date-and-time-value {
  min-height: 1lh; /* 1 */
  text-align: inherit; /* 2 */
}

/*
  Prevent height from changing on date/time inputs in macOS Safari when the input is set to \`display: block\`.
*/

::-webkit-datetime-edit {
  display: inline-flex;
}

/*
  Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers.
*/

::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

::-webkit-datetime-edit,
::-webkit-datetime-edit-year-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-minute-field,
::-webkit-datetime-edit-second-field,
::-webkit-datetime-edit-millisecond-field,
::-webkit-datetime-edit-meridiem-field {
  padding-block: 0;
}

/*
  Center dropdown marker shown on inputs with paired \`<datalist>\`s in Chrome. (https://github.com/tailwindlabs/tailwindcss/issues/18499)
*/

::-webkit-calendar-picker-indicator {
  line-height: 1;
}

/*
  Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
  Correct the inability to style the border radius in iOS Safari.
*/

button,
input:where([type='button'], [type='reset'], [type='submit']),
::file-selector-button {
  appearance: button;
}

/*
  Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
  Make elements with the HTML hidden attribute stay hidden by default.
*/

[hidden]:where(:not([hidden='until-found'])) {
  display: none !important;
}
`, preflight_default, css$1 = `
@theme default {
  --font-sans:
    ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
  --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;

  --color-red-50: oklch(97.1% 0.013 17.38);
  --color-red-100: oklch(93.6% 0.032 17.717);
  --color-red-200: oklch(88.5% 0.062 18.334);
  --color-red-300: oklch(80.8% 0.114 19.571);
  --color-red-400: oklch(70.4% 0.191 22.216);
  --color-red-500: oklch(63.7% 0.237 25.331);
  --color-red-600: oklch(57.7% 0.245 27.325);
  --color-red-700: oklch(50.5% 0.213 27.518);
  --color-red-800: oklch(44.4% 0.177 26.899);
  --color-red-900: oklch(39.6% 0.141 25.723);
  --color-red-950: oklch(25.8% 0.092 26.042);

  --color-orange-50: oklch(98% 0.016 73.684);
  --color-orange-100: oklch(95.4% 0.038 75.164);
  --color-orange-200: oklch(90.1% 0.076 70.697);
  --color-orange-300: oklch(83.7% 0.128 66.29);
  --color-orange-400: oklch(75% 0.183 55.934);
  --color-orange-500: oklch(70.5% 0.213 47.604);
  --color-orange-600: oklch(64.6% 0.222 41.116);
  --color-orange-700: oklch(55.3% 0.195 38.402);
  --color-orange-800: oklch(47% 0.157 37.304);
  --color-orange-900: oklch(40.8% 0.123 38.172);
  --color-orange-950: oklch(26.6% 0.079 36.259);

  --color-amber-50: oklch(98.7% 0.022 95.277);
  --color-amber-100: oklch(96.2% 0.059 95.617);
  --color-amber-200: oklch(92.4% 0.12 95.746);
  --color-amber-300: oklch(87.9% 0.169 91.605);
  --color-amber-400: oklch(82.8% 0.189 84.429);
  --color-amber-500: oklch(76.9% 0.188 70.08);
  --color-amber-600: oklch(66.6% 0.179 58.318);
  --color-amber-700: oklch(55.5% 0.163 48.998);
  --color-amber-800: oklch(47.3% 0.137 46.201);
  --color-amber-900: oklch(41.4% 0.112 45.904);
  --color-amber-950: oklch(27.9% 0.077 45.635);

  --color-yellow-50: oklch(98.7% 0.026 102.212);
  --color-yellow-100: oklch(97.3% 0.071 103.193);
  --color-yellow-200: oklch(94.5% 0.129 101.54);
  --color-yellow-300: oklch(90.5% 0.182 98.111);
  --color-yellow-400: oklch(85.2% 0.199 91.936);
  --color-yellow-500: oklch(79.5% 0.184 86.047);
  --color-yellow-600: oklch(68.1% 0.162 75.834);
  --color-yellow-700: oklch(55.4% 0.135 66.442);
  --color-yellow-800: oklch(47.6% 0.114 61.907);
  --color-yellow-900: oklch(42.1% 0.095 57.708);
  --color-yellow-950: oklch(28.6% 0.066 53.813);

  --color-lime-50: oklch(98.6% 0.031 120.757);
  --color-lime-100: oklch(96.7% 0.067 122.328);
  --color-lime-200: oklch(93.8% 0.127 124.321);
  --color-lime-300: oklch(89.7% 0.196 126.665);
  --color-lime-400: oklch(84.1% 0.238 128.85);
  --color-lime-500: oklch(76.8% 0.233 130.85);
  --color-lime-600: oklch(64.8% 0.2 131.684);
  --color-lime-700: oklch(53.2% 0.157 131.589);
  --color-lime-800: oklch(45.3% 0.124 130.933);
  --color-lime-900: oklch(40.5% 0.101 131.063);
  --color-lime-950: oklch(27.4% 0.072 132.109);

  --color-green-50: oklch(98.2% 0.018 155.826);
  --color-green-100: oklch(96.2% 0.044 156.743);
  --color-green-200: oklch(92.5% 0.084 155.995);
  --color-green-300: oklch(87.1% 0.15 154.449);
  --color-green-400: oklch(79.2% 0.209 151.711);
  --color-green-500: oklch(72.3% 0.219 149.579);
  --color-green-600: oklch(62.7% 0.194 149.214);
  --color-green-700: oklch(52.7% 0.154 150.069);
  --color-green-800: oklch(44.8% 0.119 151.328);
  --color-green-900: oklch(39.3% 0.095 152.535);
  --color-green-950: oklch(26.6% 0.065 152.934);

  --color-emerald-50: oklch(97.9% 0.021 166.113);
  --color-emerald-100: oklch(95% 0.052 163.051);
  --color-emerald-200: oklch(90.5% 0.093 164.15);
  --color-emerald-300: oklch(84.5% 0.143 164.978);
  --color-emerald-400: oklch(76.5% 0.177 163.223);
  --color-emerald-500: oklch(69.6% 0.17 162.48);
  --color-emerald-600: oklch(59.6% 0.145 163.225);
  --color-emerald-700: oklch(50.8% 0.118 165.612);
  --color-emerald-800: oklch(43.2% 0.095 166.913);
  --color-emerald-900: oklch(37.8% 0.077 168.94);
  --color-emerald-950: oklch(26.2% 0.051 172.552);

  --color-teal-50: oklch(98.4% 0.014 180.72);
  --color-teal-100: oklch(95.3% 0.051 180.801);
  --color-teal-200: oklch(91% 0.096 180.426);
  --color-teal-300: oklch(85.5% 0.138 181.071);
  --color-teal-400: oklch(77.7% 0.152 181.912);
  --color-teal-500: oklch(70.4% 0.14 182.503);
  --color-teal-600: oklch(60% 0.118 184.704);
  --color-teal-700: oklch(51.1% 0.096 186.391);
  --color-teal-800: oklch(43.7% 0.078 188.216);
  --color-teal-900: oklch(38.6% 0.063 188.416);
  --color-teal-950: oklch(27.7% 0.046 192.524);

  --color-cyan-50: oklch(98.4% 0.019 200.873);
  --color-cyan-100: oklch(95.6% 0.045 203.388);
  --color-cyan-200: oklch(91.7% 0.08 205.041);
  --color-cyan-300: oklch(86.5% 0.127 207.078);
  --color-cyan-400: oklch(78.9% 0.154 211.53);
  --color-cyan-500: oklch(71.5% 0.143 215.221);
  --color-cyan-600: oklch(60.9% 0.126 221.723);
  --color-cyan-700: oklch(52% 0.105 223.128);
  --color-cyan-800: oklch(45% 0.085 224.283);
  --color-cyan-900: oklch(39.8% 0.07 227.392);
  --color-cyan-950: oklch(30.2% 0.056 229.695);

  --color-sky-50: oklch(97.7% 0.013 236.62);
  --color-sky-100: oklch(95.1% 0.026 236.824);
  --color-sky-200: oklch(90.1% 0.058 230.902);
  --color-sky-300: oklch(82.8% 0.111 230.318);
  --color-sky-400: oklch(74.6% 0.16 232.661);
  --color-sky-500: oklch(68.5% 0.169 237.323);
  --color-sky-600: oklch(58.8% 0.158 241.966);
  --color-sky-700: oklch(50% 0.134 242.749);
  --color-sky-800: oklch(44.3% 0.11 240.79);
  --color-sky-900: oklch(39.1% 0.09 240.876);
  --color-sky-950: oklch(29.3% 0.066 243.157);

  --color-blue-50: oklch(97% 0.014 254.604);
  --color-blue-100: oklch(93.2% 0.032 255.585);
  --color-blue-200: oklch(88.2% 0.059 254.128);
  --color-blue-300: oklch(80.9% 0.105 251.813);
  --color-blue-400: oklch(70.7% 0.165 254.624);
  --color-blue-500: oklch(62.3% 0.214 259.815);
  --color-blue-600: oklch(54.6% 0.245 262.881);
  --color-blue-700: oklch(48.8% 0.243 264.376);
  --color-blue-800: oklch(42.4% 0.199 265.638);
  --color-blue-900: oklch(37.9% 0.146 265.522);
  --color-blue-950: oklch(28.2% 0.091 267.935);

  --color-indigo-50: oklch(96.2% 0.018 272.314);
  --color-indigo-100: oklch(93% 0.034 272.788);
  --color-indigo-200: oklch(87% 0.065 274.039);
  --color-indigo-300: oklch(78.5% 0.115 274.713);
  --color-indigo-400: oklch(67.3% 0.182 276.935);
  --color-indigo-500: oklch(58.5% 0.233 277.117);
  --color-indigo-600: oklch(51.1% 0.262 276.966);
  --color-indigo-700: oklch(45.7% 0.24 277.023);
  --color-indigo-800: oklch(39.8% 0.195 277.366);
  --color-indigo-900: oklch(35.9% 0.144 278.697);
  --color-indigo-950: oklch(25.7% 0.09 281.288);

  --color-violet-50: oklch(96.9% 0.016 293.756);
  --color-violet-100: oklch(94.3% 0.029 294.588);
  --color-violet-200: oklch(89.4% 0.057 293.283);
  --color-violet-300: oklch(81.1% 0.111 293.571);
  --color-violet-400: oklch(70.2% 0.183 293.541);
  --color-violet-500: oklch(60.6% 0.25 292.717);
  --color-violet-600: oklch(54.1% 0.281 293.009);
  --color-violet-700: oklch(49.1% 0.27 292.581);
  --color-violet-800: oklch(43.2% 0.232 292.759);
  --color-violet-900: oklch(38% 0.189 293.745);
  --color-violet-950: oklch(28.3% 0.141 291.089);

  --color-purple-50: oklch(97.7% 0.014 308.299);
  --color-purple-100: oklch(94.6% 0.033 307.174);
  --color-purple-200: oklch(90.2% 0.063 306.703);
  --color-purple-300: oklch(82.7% 0.119 306.383);
  --color-purple-400: oklch(71.4% 0.203 305.504);
  --color-purple-500: oklch(62.7% 0.265 303.9);
  --color-purple-600: oklch(55.8% 0.288 302.321);
  --color-purple-700: oklch(49.6% 0.265 301.924);
  --color-purple-800: oklch(43.8% 0.218 303.724);
  --color-purple-900: oklch(38.1% 0.176 304.987);
  --color-purple-950: oklch(29.1% 0.149 302.717);

  --color-fuchsia-50: oklch(97.7% 0.017 320.058);
  --color-fuchsia-100: oklch(95.2% 0.037 318.852);
  --color-fuchsia-200: oklch(90.3% 0.076 319.62);
  --color-fuchsia-300: oklch(83.3% 0.145 321.434);
  --color-fuchsia-400: oklch(74% 0.238 322.16);
  --color-fuchsia-500: oklch(66.7% 0.295 322.15);
  --color-fuchsia-600: oklch(59.1% 0.293 322.896);
  --color-fuchsia-700: oklch(51.8% 0.253 323.949);
  --color-fuchsia-800: oklch(45.2% 0.211 324.591);
  --color-fuchsia-900: oklch(40.1% 0.17 325.612);
  --color-fuchsia-950: oklch(29.3% 0.136 325.661);

  --color-pink-50: oklch(97.1% 0.014 343.198);
  --color-pink-100: oklch(94.8% 0.028 342.258);
  --color-pink-200: oklch(89.9% 0.061 343.231);
  --color-pink-300: oklch(82.3% 0.12 346.018);
  --color-pink-400: oklch(71.8% 0.202 349.761);
  --color-pink-500: oklch(65.6% 0.241 354.308);
  --color-pink-600: oklch(59.2% 0.249 0.584);
  --color-pink-700: oklch(52.5% 0.223 3.958);
  --color-pink-800: oklch(45.9% 0.187 3.815);
  --color-pink-900: oklch(40.8% 0.153 2.432);
  --color-pink-950: oklch(28.4% 0.109 3.907);

  --color-rose-50: oklch(96.9% 0.015 12.422);
  --color-rose-100: oklch(94.1% 0.03 12.58);
  --color-rose-200: oklch(89.2% 0.058 10.001);
  --color-rose-300: oklch(81% 0.117 11.638);
  --color-rose-400: oklch(71.2% 0.194 13.428);
  --color-rose-500: oklch(64.5% 0.246 16.439);
  --color-rose-600: oklch(58.6% 0.253 17.585);
  --color-rose-700: oklch(51.4% 0.222 16.935);
  --color-rose-800: oklch(45.5% 0.188 13.697);
  --color-rose-900: oklch(41% 0.159 10.272);
  --color-rose-950: oklch(27.1% 0.105 12.094);

  --color-slate-50: oklch(98.4% 0.003 247.858);
  --color-slate-100: oklch(96.8% 0.007 247.896);
  --color-slate-200: oklch(92.9% 0.013 255.508);
  --color-slate-300: oklch(86.9% 0.022 252.894);
  --color-slate-400: oklch(70.4% 0.04 256.788);
  --color-slate-500: oklch(55.4% 0.046 257.417);
  --color-slate-600: oklch(44.6% 0.043 257.281);
  --color-slate-700: oklch(37.2% 0.044 257.287);
  --color-slate-800: oklch(27.9% 0.041 260.031);
  --color-slate-900: oklch(20.8% 0.042 265.755);
  --color-slate-950: oklch(12.9% 0.042 264.695);

  --color-gray-50: oklch(98.5% 0.002 247.839);
  --color-gray-100: oklch(96.7% 0.003 264.542);
  --color-gray-200: oklch(92.8% 0.006 264.531);
  --color-gray-300: oklch(87.2% 0.01 258.338);
  --color-gray-400: oklch(70.7% 0.022 261.325);
  --color-gray-500: oklch(55.1% 0.027 264.364);
  --color-gray-600: oklch(44.6% 0.03 256.802);
  --color-gray-700: oklch(37.3% 0.034 259.733);
  --color-gray-800: oklch(27.8% 0.033 256.848);
  --color-gray-900: oklch(21% 0.034 264.665);
  --color-gray-950: oklch(13% 0.028 261.692);

  --color-zinc-50: oklch(98.5% 0 0);
  --color-zinc-100: oklch(96.7% 0.001 286.375);
  --color-zinc-200: oklch(92% 0.004 286.32);
  --color-zinc-300: oklch(87.1% 0.006 286.286);
  --color-zinc-400: oklch(70.5% 0.015 286.067);
  --color-zinc-500: oklch(55.2% 0.016 285.938);
  --color-zinc-600: oklch(44.2% 0.017 285.786);
  --color-zinc-700: oklch(37% 0.013 285.805);
  --color-zinc-800: oklch(27.4% 0.006 286.033);
  --color-zinc-900: oklch(21% 0.006 285.885);
  --color-zinc-950: oklch(14.1% 0.005 285.823);

  --color-neutral-50: oklch(98.5% 0 0);
  --color-neutral-100: oklch(97% 0 0);
  --color-neutral-200: oklch(92.2% 0 0);
  --color-neutral-300: oklch(87% 0 0);
  --color-neutral-400: oklch(70.8% 0 0);
  --color-neutral-500: oklch(55.6% 0 0);
  --color-neutral-600: oklch(43.9% 0 0);
  --color-neutral-700: oklch(37.1% 0 0);
  --color-neutral-800: oklch(26.9% 0 0);
  --color-neutral-900: oklch(20.5% 0 0);
  --color-neutral-950: oklch(14.5% 0 0);

  --color-stone-50: oklch(98.5% 0.001 106.423);
  --color-stone-100: oklch(97% 0.001 106.424);
  --color-stone-200: oklch(92.3% 0.003 48.717);
  --color-stone-300: oklch(86.9% 0.005 56.366);
  --color-stone-400: oklch(70.9% 0.01 56.259);
  --color-stone-500: oklch(55.3% 0.013 58.071);
  --color-stone-600: oklch(44.4% 0.011 73.639);
  --color-stone-700: oklch(37.4% 0.01 67.558);
  --color-stone-800: oklch(26.8% 0.007 34.298);
  --color-stone-900: oklch(21.6% 0.006 56.043);
  --color-stone-950: oklch(14.7% 0.004 49.25);

  --color-black: #000;
  --color-white: #fff;

  --spacing: 0.25rem;

  --breakpoint-sm: 40rem;
  --breakpoint-md: 48rem;
  --breakpoint-lg: 64rem;
  --breakpoint-xl: 80rem;
  --breakpoint-2xl: 96rem;

  --container-3xs: 16rem;
  --container-2xs: 18rem;
  --container-xs: 20rem;
  --container-sm: 24rem;
  --container-md: 28rem;
  --container-lg: 32rem;
  --container-xl: 36rem;
  --container-2xl: 42rem;
  --container-3xl: 48rem;
  --container-4xl: 56rem;
  --container-5xl: 64rem;
  --container-6xl: 72rem;
  --container-7xl: 80rem;

  --text-xs: 0.75rem;
  --text-xs--line-height: calc(1 / 0.75);
  --text-sm: 0.875rem;
  --text-sm--line-height: calc(1.25 / 0.875);
  --text-base: 1rem;
  --text-base--line-height: calc(1.5 / 1);
  --text-lg: 1.125rem;
  --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem;
  --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem;
  --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem;
  --text-3xl--line-height: calc(2.25 / 1.875);
  --text-4xl: 2.25rem;
  --text-4xl--line-height: calc(2.5 / 2.25);
  --text-5xl: 3rem;
  --text-5xl--line-height: 1;
  --text-6xl: 3.75rem;
  --text-6xl--line-height: 1;
  --text-7xl: 4.5rem;
  --text-7xl--line-height: 1;
  --text-8xl: 6rem;
  --text-8xl--line-height: 1;
  --text-9xl: 8rem;
  --text-9xl--line-height: 1;

  --font-weight-thin: 100;
  --font-weight-extralight: 200;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-4xl: 2rem;

  --shadow-2xs: 0 1px rgb(0 0 0 / 0.05);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05);
  --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05);
  --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05);

  --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05);
  --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15);
  --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12);
  --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15);
  --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1);
  --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15);

  --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15);
  --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2);
  --text-shadow-sm:
    0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), 0px 2px 2px rgb(0 0 0 / 0.075);
  --text-shadow-md:
    0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), 0px 2px 4px rgb(0 0 0 / 0.1);
  --text-shadow-lg:
    0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), 0px 4px 8px rgb(0 0 0 / 0.1);

  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --animate-spin: spin 1s linear infinite;
  --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
  --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  --animate-bounce: bounce 1s infinite;

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes ping {
    75%,
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }

  @keyframes pulse {
    50% {
      opacity: 0.5;
    }
  }

  @keyframes bounce {
    0%,
    100% {
      transform: translateY(-25%);
      animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
      transform: none;
      animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
  }

  --blur-xs: 4px;
  --blur-sm: 8px;
  --blur-md: 12px;
  --blur-lg: 16px;
  --blur-xl: 24px;
  --blur-2xl: 40px;
  --blur-3xl: 64px;

  --perspective-dramatic: 100px;
  --perspective-near: 300px;
  --perspective-normal: 500px;
  --perspective-midrange: 800px;
  --perspective-distant: 1200px;

  --aspect-video: 16 / 9;

  --default-transition-duration: 150ms;
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  --default-font-family: --theme(--font-sans, initial);
  --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial);
  --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial);
  --default-mono-font-family: --theme(--font-mono, initial);
  --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial);
  --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial);
}

/* Deprecated */
@theme default inline reference {
  --blur: 8px;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06);
  --radius: 0.25rem;
  --max-width-prose: 65ch;
}
`, theme_default, css = `
@tailwind utilities;
`, utilities_default, pixelBasedPreset;
var init_dist19 = __esm(() => {
  init_dist();
  init_dist2();
  init_dist3();
  init_dist4();
  init_dist6();
  init_dist9();
  init_dist10();
  init_dist12();
  init_dist13();
  init_dist15();
  init_dist18();
  init_lib();
  React$12 = __toESM(require_react(), 1);
  import_react2 = __toESM(require_react(), 1);
  import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  __defProp3 = Object.defineProperty;
  CATEGORY = new Array(128);
  for (let i = 0;i < CATEGORY.length; i++)
    CATEGORY[i] = isWhiteSpace(i) && WhiteSpaceCategory || isDigit(i) && DigitCategory || isNameStart(i) && NameStartCategory || isNonPrintable(i) && NonPrintableCategory || i || EofCategory;
  names_default = [
    "EOF-token",
    "ident-token",
    "function-token",
    "at-keyword-token",
    "hash-token",
    "string-token",
    "bad-string-token",
    "url-token",
    "bad-url-token",
    "delim-token",
    "number-token",
    "percentage-token",
    "dimension-token",
    "whitespace-token",
    "CDO-token",
    "CDC-token",
    "colon-token",
    "semicolon-token",
    "comma-token",
    "[-token",
    "]-token",
    "(-token",
    ")-token",
    "{-token",
    "}-token",
    "comment-token"
  ];
  MIN_SIZE = 16 * 1024;
  balancePair$1 = new Uint8Array(32);
  balancePair$1[Function2] = RightParenthesis;
  balancePair$1[LeftParenthesis] = RightParenthesis;
  balancePair$1[LeftSquareBracket] = RightSquareBracket;
  balancePair$1[LeftCurlyBracket] = RightCurlyBracket;
  List = class List2 {
    static createItem(data) {
      return {
        prev: null,
        next: null,
        data
      };
    }
    constructor() {
      this.head = null;
      this.tail = null;
      this.cursor = null;
    }
    createItem(data) {
      return List2.createItem(data);
    }
    allocateCursor(prev, next) {
      let cursor;
      if (releasedCursors !== null) {
        cursor = releasedCursors;
        releasedCursors = releasedCursors.cursor;
        cursor.prev = prev;
        cursor.next = next;
        cursor.cursor = this.cursor;
      } else
        cursor = {
          prev,
          next,
          cursor: this.cursor
        };
      this.cursor = cursor;
      return cursor;
    }
    releaseCursor() {
      const { cursor } = this;
      this.cursor = cursor.cursor;
      cursor.prev = null;
      cursor.next = null;
      cursor.cursor = releasedCursors;
      releasedCursors = cursor;
    }
    updateCursors(prevOld, prevNew, nextOld, nextNew) {
      let { cursor } = this;
      while (cursor !== null) {
        if (cursor.prev === prevOld)
          cursor.prev = prevNew;
        if (cursor.next === nextOld)
          cursor.next = nextNew;
        cursor = cursor.cursor;
      }
    }
    *[Symbol.iterator]() {
      for (let cursor = this.head;cursor !== null; cursor = cursor.next)
        yield cursor.data;
    }
    get size() {
      let size = 0;
      for (let cursor = this.head;cursor !== null; cursor = cursor.next)
        size++;
      return size;
    }
    get isEmpty() {
      return this.head === null;
    }
    get first() {
      return this.head && this.head.data;
    }
    get last() {
      return this.tail && this.tail.data;
    }
    fromArray(array2) {
      let cursor = null;
      this.head = null;
      for (let data of array2) {
        const item = List2.createItem(data);
        if (cursor !== null)
          cursor.next = item;
        else
          this.head = item;
        item.prev = cursor;
        cursor = item;
      }
      this.tail = cursor;
      return this;
    }
    toArray() {
      return [...this];
    }
    toJSON() {
      return [...this];
    }
    forEach(fn3, thisArg = this) {
      const cursor = this.allocateCursor(null, this.head);
      while (cursor.next !== null) {
        const item = cursor.next;
        cursor.next = item.next;
        fn3.call(thisArg, item.data, item, this);
      }
      this.releaseCursor();
    }
    forEachRight(fn3, thisArg = this) {
      const cursor = this.allocateCursor(this.tail, null);
      while (cursor.prev !== null) {
        const item = cursor.prev;
        cursor.prev = item.prev;
        fn3.call(thisArg, item.data, item, this);
      }
      this.releaseCursor();
    }
    reduce(fn3, initialValue, thisArg = this) {
      let cursor = this.allocateCursor(null, this.head);
      let acc = initialValue;
      let item;
      while (cursor.next !== null) {
        item = cursor.next;
        cursor.next = item.next;
        acc = fn3.call(thisArg, acc, item.data, item, this);
      }
      this.releaseCursor();
      return acc;
    }
    reduceRight(fn3, initialValue, thisArg = this) {
      let cursor = this.allocateCursor(this.tail, null);
      let acc = initialValue;
      let item;
      while (cursor.prev !== null) {
        item = cursor.prev;
        cursor.prev = item.prev;
        acc = fn3.call(thisArg, acc, item.data, item, this);
      }
      this.releaseCursor();
      return acc;
    }
    some(fn3, thisArg = this) {
      for (let cursor = this.head;cursor !== null; cursor = cursor.next)
        if (fn3.call(thisArg, cursor.data, cursor, this))
          return true;
      return false;
    }
    map(fn3, thisArg = this) {
      const result = new List2;
      for (let cursor = this.head;cursor !== null; cursor = cursor.next)
        result.appendData(fn3.call(thisArg, cursor.data, cursor, this));
      return result;
    }
    filter(fn3, thisArg = this) {
      const result = new List2;
      for (let cursor = this.head;cursor !== null; cursor = cursor.next)
        if (fn3.call(thisArg, cursor.data, cursor, this))
          result.appendData(cursor.data);
      return result;
    }
    nextUntil(start, fn3, thisArg = this) {
      if (start === null)
        return;
      const cursor = this.allocateCursor(null, start);
      while (cursor.next !== null) {
        const item = cursor.next;
        cursor.next = item.next;
        if (fn3.call(thisArg, item.data, item, this))
          break;
      }
      this.releaseCursor();
    }
    prevUntil(start, fn3, thisArg = this) {
      if (start === null)
        return;
      const cursor = this.allocateCursor(start, null);
      while (cursor.prev !== null) {
        const item = cursor.prev;
        cursor.prev = item.prev;
        if (fn3.call(thisArg, item.data, item, this))
          break;
      }
      this.releaseCursor();
    }
    clear() {
      this.head = null;
      this.tail = null;
    }
    copy() {
      const result = new List2;
      for (let data of this)
        result.appendData(data);
      return result;
    }
    prepend(item) {
      this.updateCursors(null, item, this.head, item);
      if (this.head !== null) {
        this.head.prev = item;
        item.next = this.head;
      } else
        this.tail = item;
      this.head = item;
      return this;
    }
    prependData(data) {
      return this.prepend(List2.createItem(data));
    }
    append(item) {
      return this.insert(item);
    }
    appendData(data) {
      return this.insert(List2.createItem(data));
    }
    insert(item, before = null) {
      if (before !== null) {
        this.updateCursors(before.prev, item, before, item);
        if (before.prev === null) {
          if (this.head !== before)
            throw new Error("before doesn't belong to list");
          this.head = item;
          before.prev = item;
          item.next = before;
          this.updateCursors(null, item);
        } else {
          before.prev.next = item;
          item.prev = before.prev;
          before.prev = item;
          item.next = before;
        }
      } else {
        this.updateCursors(this.tail, item, null, item);
        if (this.tail !== null) {
          this.tail.next = item;
          item.prev = this.tail;
        } else
          this.head = item;
        this.tail = item;
      }
      return this;
    }
    insertData(data, before) {
      return this.insert(List2.createItem(data), before);
    }
    remove(item) {
      this.updateCursors(item, item.prev, item, item.next);
      if (item.prev !== null)
        item.prev.next = item.next;
      else {
        if (this.head !== item)
          throw new Error("item doesn't belong to list");
        this.head = item.next;
      }
      if (item.next !== null)
        item.next.prev = item.prev;
      else {
        if (this.tail !== item)
          throw new Error("item doesn't belong to list");
        this.tail = item.prev;
      }
      item.prev = null;
      item.next = null;
      return item;
    }
    push(data) {
      this.insert(List2.createItem(data));
    }
    pop() {
      return this.tail !== null ? this.remove(this.tail) : null;
    }
    unshift(data) {
      this.prepend(List2.createItem(data));
    }
    shift() {
      return this.head !== null ? this.remove(this.head) : null;
    }
    prependList(list2) {
      return this.insertList(list2, this.head);
    }
    appendList(list2) {
      return this.insertList(list2);
    }
    insertList(list2, before) {
      if (list2.head === null)
        return this;
      if (before !== undefined && before !== null) {
        this.updateCursors(before.prev, list2.tail, before, list2.head);
        if (before.prev !== null) {
          before.prev.next = list2.head;
          list2.head.prev = before.prev;
        } else
          this.head = list2.head;
        before.prev = list2.tail;
        list2.tail.next = before;
      } else {
        this.updateCursors(this.tail, list2.tail, null, list2.head);
        if (this.tail !== null) {
          this.tail.next = list2.head;
          list2.head.prev = this.tail;
        } else
          this.head = list2.head;
        this.tail = list2.tail;
      }
      list2.head = null;
      list2.tail = null;
      return this;
    }
    replace(oldItem, newItemOrList) {
      if ("head" in newItemOrList)
        this.insertList(newItemOrList, oldItem);
      else
        this.insert(newItemOrList, oldItem);
      this.remove(oldItem);
    }
  };
  require_base64 = /* @__PURE__ */ __commonJSMin((exports) => {
    var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
    exports.encode = function(number$1) {
      if (0 <= number$1 && number$1 < intToCharMap.length)
        return intToCharMap[number$1];
      throw new TypeError("Must be between 0 and 63: " + number$1);
    };
    exports.decode = function(charCode) {
      var bigA = 65;
      var bigZ = 90;
      var littleA = 97;
      var littleZ = 122;
      var zero$1 = 48;
      var nine = 57;
      var plus = 43;
      var slash = 47;
      var littleOffset = 26;
      var numberOffset = 52;
      if (bigA <= charCode && charCode <= bigZ)
        return charCode - bigA;
      if (littleA <= charCode && charCode <= littleZ)
        return charCode - littleA + littleOffset;
      if (zero$1 <= charCode && charCode <= nine)
        return charCode - zero$1 + numberOffset;
      if (charCode == plus)
        return 62;
      if (charCode == slash)
        return 63;
      return -1;
    };
  });
  require_base64_vlq = /* @__PURE__ */ __commonJSMin((exports) => {
    var base643 = require_base64();
    var VLQ_BASE_SHIFT = 5;
    var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
    var VLQ_BASE_MASK = VLQ_BASE - 1;
    var VLQ_CONTINUATION_BIT = VLQ_BASE;
    function toVLQSigned(aValue) {
      return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
    }
    function fromVLQSigned(aValue) {
      var isNegative = (aValue & 1) === 1;
      var shifted = aValue >> 1;
      return isNegative ? -shifted : shifted;
    }
    exports.encode = function base64VLQ_encode(aValue) {
      var encoded = "";
      var digit;
      var vlq = toVLQSigned(aValue);
      do {
        digit = vlq & VLQ_BASE_MASK;
        vlq >>>= VLQ_BASE_SHIFT;
        if (vlq > 0)
          digit |= VLQ_CONTINUATION_BIT;
        encoded += base643.encode(digit);
      } while (vlq > 0);
      return encoded;
    };
    exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
      var strLen = aStr.length;
      var result = 0;
      var shift = 0;
      var continuation, digit;
      do {
        if (aIndex >= strLen)
          throw new Error("Expected more digits in base 64 VLQ value.");
        digit = base643.decode(aStr.charCodeAt(aIndex++));
        if (digit === -1)
          throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
        continuation = !!(digit & VLQ_CONTINUATION_BIT);
        digit &= VLQ_BASE_MASK;
        result = result + (digit << shift);
        shift += VLQ_BASE_SHIFT;
      } while (continuation);
      aOutParam.value = fromVLQSigned(result);
      aOutParam.rest = aIndex;
    };
  });
  require_util = /* @__PURE__ */ __commonJSMin((exports) => {
    function getArg(aArgs, aName, aDefaultValue) {
      if (aName in aArgs)
        return aArgs[aName];
      else if (arguments.length === 3)
        return aDefaultValue;
      else
        throw new Error('"' + aName + '" is a required argument.');
    }
    exports.getArg = getArg;
    var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
    var dataUrlRegexp = /^data:.+\,.+$/;
    function urlParse(aUrl) {
      var match = aUrl.match(urlRegexp);
      if (!match)
        return null;
      return {
        scheme: match[1],
        auth: match[2],
        host: match[3],
        port: match[4],
        path: match[5]
      };
    }
    exports.urlParse = urlParse;
    function urlGenerate(aParsedUrl) {
      var url2 = "";
      if (aParsedUrl.scheme)
        url2 += aParsedUrl.scheme + ":";
      url2 += "//";
      if (aParsedUrl.auth)
        url2 += aParsedUrl.auth + "@";
      if (aParsedUrl.host)
        url2 += aParsedUrl.host;
      if (aParsedUrl.port)
        url2 += ":" + aParsedUrl.port;
      if (aParsedUrl.path)
        url2 += aParsedUrl.path;
      return url2;
    }
    exports.urlGenerate = urlGenerate;
    var MAX_CACHED_INPUTS = 32;
    function lruMemoize(f4) {
      var cache = [];
      return function(input) {
        for (var i = 0;i < cache.length; i++)
          if (cache[i].input === input) {
            var temp = cache[0];
            cache[0] = cache[i];
            cache[i] = temp;
            return cache[0].result;
          }
        var result = f4(input);
        cache.unshift({
          input,
          result
        });
        if (cache.length > MAX_CACHED_INPUTS)
          cache.pop();
        return result;
      };
    }
    var normalize4 = lruMemoize(function normalize5(aPath) {
      var path2 = aPath;
      var url2 = urlParse(aPath);
      if (url2) {
        if (!url2.path)
          return aPath;
        path2 = url2.path;
      }
      var isAbsolute2 = exports.isAbsolute(path2);
      var parts = [];
      var start = 0;
      var i = 0;
      while (true) {
        start = i;
        i = path2.indexOf("/", start);
        if (i === -1) {
          parts.push(path2.slice(start));
          break;
        } else {
          parts.push(path2.slice(start, i));
          while (i < path2.length && path2[i] === "/")
            i++;
        }
      }
      for (var part, up = 0, i = parts.length - 1;i >= 0; i--) {
        part = parts[i];
        if (part === ".")
          parts.splice(i, 1);
        else if (part === "..")
          up++;
        else if (up > 0)
          if (part === "") {
            parts.splice(i + 1, up);
            up = 0;
          } else {
            parts.splice(i, 2);
            up--;
          }
      }
      path2 = parts.join("/");
      if (path2 === "")
        path2 = isAbsolute2 ? "/" : ".";
      if (url2) {
        url2.path = path2;
        return urlGenerate(url2);
      }
      return path2;
    });
    exports.normalize = normalize4;
    function join4(aRoot, aPath) {
      if (aRoot === "")
        aRoot = ".";
      if (aPath === "")
        aPath = ".";
      var aPathUrl = urlParse(aPath);
      var aRootUrl = urlParse(aRoot);
      if (aRootUrl)
        aRoot = aRootUrl.path || "/";
      if (aPathUrl && !aPathUrl.scheme) {
        if (aRootUrl)
          aPathUrl.scheme = aRootUrl.scheme;
        return urlGenerate(aPathUrl);
      }
      if (aPathUrl || aPath.match(dataUrlRegexp))
        return aPath;
      if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
        aRootUrl.host = aPath;
        return urlGenerate(aRootUrl);
      }
      var joined = aPath.charAt(0) === "/" ? aPath : normalize4(aRoot.replace(/\/+$/, "") + "/" + aPath);
      if (aRootUrl) {
        aRootUrl.path = joined;
        return urlGenerate(aRootUrl);
      }
      return joined;
    }
    exports.join = join4;
    exports.isAbsolute = function(aPath) {
      return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
    };
    function relative2(aRoot, aPath) {
      if (aRoot === "")
        aRoot = ".";
      aRoot = aRoot.replace(/\/$/, "");
      var level = 0;
      while (aPath.indexOf(aRoot + "/") !== 0) {
        var index2 = aRoot.lastIndexOf("/");
        if (index2 < 0)
          return aPath;
        aRoot = aRoot.slice(0, index2);
        if (aRoot.match(/^([^\/]+:\/)?\/*$/))
          return aPath;
        ++level;
      }
      return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
    }
    exports.relative = relative2;
    var supportsNullProto = function() {
      return !("__proto__" in Object.create(null));
    }();
    function identity(s3) {
      return s3;
    }
    function toSetString(aStr) {
      if (isProtoString(aStr))
        return "$" + aStr;
      return aStr;
    }
    exports.toSetString = supportsNullProto ? identity : toSetString;
    function fromSetString(aStr) {
      if (isProtoString(aStr))
        return aStr.slice(1);
      return aStr;
    }
    exports.fromSetString = supportsNullProto ? identity : fromSetString;
    function isProtoString(s3) {
      if (!s3)
        return false;
      var length$1 = s3.length;
      if (length$1 < 9)
        return false;
      if (s3.charCodeAt(length$1 - 1) !== 95 || s3.charCodeAt(length$1 - 2) !== 95 || s3.charCodeAt(length$1 - 3) !== 111 || s3.charCodeAt(length$1 - 4) !== 116 || s3.charCodeAt(length$1 - 5) !== 111 || s3.charCodeAt(length$1 - 6) !== 114 || s3.charCodeAt(length$1 - 7) !== 112 || s3.charCodeAt(length$1 - 8) !== 95 || s3.charCodeAt(length$1 - 9) !== 95)
        return false;
      for (var i = length$1 - 10;i >= 0; i--)
        if (s3.charCodeAt(i) !== 36)
          return false;
      return true;
    }
    function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
      var cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0 || onlyCompareOriginal)
        return cmp;
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0)
        return cmp;
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByOriginalPositions = compareByOriginalPositions;
    function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
      var cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0 || onlyCompareOriginal)
        return cmp;
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0)
        return cmp;
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
    function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
      var cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0 || onlyCompareGenerated)
        return cmp;
      cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0)
        return cmp;
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
    function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
      var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0 || onlyCompareGenerated)
        return cmp;
      cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0)
        return cmp;
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
    function strcmp(aStr1, aStr2) {
      if (aStr1 === aStr2)
        return 0;
      if (aStr1 === null)
        return 1;
      if (aStr2 === null)
        return -1;
      if (aStr1 > aStr2)
        return 1;
      return -1;
    }
    function compareByGeneratedPositionsInflated(mappingA, mappingB) {
      var cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0)
        return cmp;
      cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0)
        return cmp;
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0)
        return cmp;
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
    function parseSourceMapInput(str) {
      return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
    }
    exports.parseSourceMapInput = parseSourceMapInput;
    function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
      sourceURL = sourceURL || "";
      if (sourceRoot) {
        if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/")
          sourceRoot += "/";
        sourceURL = sourceRoot + sourceURL;
      }
      if (sourceMapURL) {
        var parsed = urlParse(sourceMapURL);
        if (!parsed)
          throw new Error("sourceMapURL could not be parsed");
        if (parsed.path) {
          var index2 = parsed.path.lastIndexOf("/");
          if (index2 >= 0)
            parsed.path = parsed.path.substring(0, index2 + 1);
        }
        sourceURL = join4(urlGenerate(parsed), sourceURL);
      }
      return normalize4(sourceURL);
    }
    exports.computeSourceURL = computeSourceURL;
  });
  require_array_set = /* @__PURE__ */ __commonJSMin((exports) => {
    var util3 = require_util();
    var has = Object.prototype.hasOwnProperty;
    var hasNativeMap = typeof Map !== "undefined";
    function ArraySet() {
      this._array = [];
      this._set = hasNativeMap ? /* @__PURE__ */ new Map : Object.create(null);
    }
    ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
      var set2 = new ArraySet;
      for (var i = 0, len = aArray.length;i < len; i++)
        set2.add(aArray[i], aAllowDuplicates);
      return set2;
    };
    ArraySet.prototype.size = function ArraySet_size() {
      return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
    };
    ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
      var sStr = hasNativeMap ? aStr : util3.toSetString(aStr);
      var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
      var idx = this._array.length;
      if (!isDuplicate || aAllowDuplicates)
        this._array.push(aStr);
      if (!isDuplicate)
        if (hasNativeMap)
          this._set.set(aStr, idx);
        else
          this._set[sStr] = idx;
    };
    ArraySet.prototype.has = function ArraySet_has(aStr) {
      if (hasNativeMap)
        return this._set.has(aStr);
      else {
        var sStr = util3.toSetString(aStr);
        return has.call(this._set, sStr);
      }
    };
    ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
      if (hasNativeMap) {
        var idx = this._set.get(aStr);
        if (idx >= 0)
          return idx;
      } else {
        var sStr = util3.toSetString(aStr);
        if (has.call(this._set, sStr))
          return this._set[sStr];
      }
      throw new Error('"' + aStr + '" is not in the set.');
    };
    ArraySet.prototype.at = function ArraySet_at(aIdx) {
      if (aIdx >= 0 && aIdx < this._array.length)
        return this._array[aIdx];
      throw new Error("No element indexed by " + aIdx);
    };
    ArraySet.prototype.toArray = function ArraySet_toArray() {
      return this._array.slice();
    };
    exports.ArraySet = ArraySet;
  });
  require_mapping_list = /* @__PURE__ */ __commonJSMin((exports) => {
    var util3 = require_util();
    function generatedPositionAfter(mappingA, mappingB) {
      var lineA = mappingA.generatedLine;
      var lineB = mappingB.generatedLine;
      var columnA = mappingA.generatedColumn;
      var columnB = mappingB.generatedColumn;
      return lineB > lineA || lineB == lineA && columnB >= columnA || util3.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
    }
    function MappingList() {
      this._array = [];
      this._sorted = true;
      this._last = {
        generatedLine: -1,
        generatedColumn: 0
      };
    }
    MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
      this._array.forEach(aCallback, aThisArg);
    };
    MappingList.prototype.add = function MappingList_add(aMapping) {
      if (generatedPositionAfter(this._last, aMapping)) {
        this._last = aMapping;
        this._array.push(aMapping);
      } else {
        this._sorted = false;
        this._array.push(aMapping);
      }
    };
    MappingList.prototype.toArray = function MappingList_toArray() {
      if (!this._sorted) {
        this._array.sort(util3.compareByGeneratedPositionsInflated);
        this._sorted = true;
      }
      return this._array;
    };
    exports.MappingList = MappingList;
  });
  require_source_map_generator = /* @__PURE__ */ __commonJSMin((exports) => {
    var base64VLQ = require_base64_vlq();
    var util3 = require_util();
    var ArraySet = require_array_set().ArraySet;
    var MappingList = require_mapping_list().MappingList;
    function SourceMapGenerator(aArgs) {
      if (!aArgs)
        aArgs = {};
      this._file = util3.getArg(aArgs, "file", null);
      this._sourceRoot = util3.getArg(aArgs, "sourceRoot", null);
      this._skipValidation = util3.getArg(aArgs, "skipValidation", false);
      this._ignoreInvalidMapping = util3.getArg(aArgs, "ignoreInvalidMapping", false);
      this._sources = new ArraySet;
      this._names = new ArraySet;
      this._mappings = new MappingList;
      this._sourcesContents = null;
    }
    SourceMapGenerator.prototype._version = 3;
    SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {
      var sourceRoot = aSourceMapConsumer.sourceRoot;
      var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {
        file: aSourceMapConsumer.file,
        sourceRoot
      }));
      aSourceMapConsumer.eachMapping(function(mapping) {
        var newMapping = { generated: {
          line: mapping.generatedLine,
          column: mapping.generatedColumn
        } };
        if (mapping.source != null) {
          newMapping.source = mapping.source;
          if (sourceRoot != null)
            newMapping.source = util3.relative(sourceRoot, newMapping.source);
          newMapping.original = {
            line: mapping.originalLine,
            column: mapping.originalColumn
          };
          if (mapping.name != null)
            newMapping.name = mapping.name;
        }
        generator.addMapping(newMapping);
      });
      aSourceMapConsumer.sources.forEach(function(sourceFile) {
        var sourceRelative = sourceFile;
        if (sourceRoot !== null)
          sourceRelative = util3.relative(sourceRoot, sourceFile);
        if (!generator._sources.has(sourceRelative))
          generator._sources.add(sourceRelative);
        var content = aSourceMapConsumer.sourceContentFor(sourceFile);
        if (content != null)
          generator.setSourceContent(sourceFile, content);
      });
      return generator;
    };
    SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
      var generated = util3.getArg(aArgs, "generated");
      var original = util3.getArg(aArgs, "original", null);
      var source = util3.getArg(aArgs, "source", null);
      var name$49 = util3.getArg(aArgs, "name", null);
      if (!this._skipValidation) {
        if (this._validateMapping(generated, original, source, name$49) === false)
          return;
      }
      if (source != null) {
        source = String(source);
        if (!this._sources.has(source))
          this._sources.add(source);
      }
      if (name$49 != null) {
        name$49 = String(name$49);
        if (!this._names.has(name$49))
          this._names.add(name$49);
      }
      this._mappings.add({
        generatedLine: generated.line,
        generatedColumn: generated.column,
        originalLine: original != null && original.line,
        originalColumn: original != null && original.column,
        source,
        name: name$49
      });
    };
    SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
      var source = aSourceFile;
      if (this._sourceRoot != null)
        source = util3.relative(this._sourceRoot, source);
      if (aSourceContent != null) {
        if (!this._sourcesContents)
          this._sourcesContents = Object.create(null);
        this._sourcesContents[util3.toSetString(source)] = aSourceContent;
      } else if (this._sourcesContents) {
        delete this._sourcesContents[util3.toSetString(source)];
        if (Object.keys(this._sourcesContents).length === 0)
          this._sourcesContents = null;
      }
    };
    SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
      var sourceFile = aSourceFile;
      if (aSourceFile == null) {
        if (aSourceMapConsumer.file == null)
          throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);
        sourceFile = aSourceMapConsumer.file;
      }
      var sourceRoot = this._sourceRoot;
      if (sourceRoot != null)
        sourceFile = util3.relative(sourceRoot, sourceFile);
      var newSources = new ArraySet;
      var newNames = new ArraySet;
      this._mappings.unsortedForEach(function(mapping) {
        if (mapping.source === sourceFile && mapping.originalLine != null) {
          var original = aSourceMapConsumer.originalPositionFor({
            line: mapping.originalLine,
            column: mapping.originalColumn
          });
          if (original.source != null) {
            mapping.source = original.source;
            if (aSourceMapPath != null)
              mapping.source = util3.join(aSourceMapPath, mapping.source);
            if (sourceRoot != null)
              mapping.source = util3.relative(sourceRoot, mapping.source);
            mapping.originalLine = original.line;
            mapping.originalColumn = original.column;
            if (original.name != null)
              mapping.name = original.name;
          }
        }
        var source = mapping.source;
        if (source != null && !newSources.has(source))
          newSources.add(source);
        var name$49 = mapping.name;
        if (name$49 != null && !newNames.has(name$49))
          newNames.add(name$49);
      }, this);
      this._sources = newSources;
      this._names = newNames;
      aSourceMapConsumer.sources.forEach(function(sourceFile$1) {
        var content = aSourceMapConsumer.sourceContentFor(sourceFile$1);
        if (content != null) {
          if (aSourceMapPath != null)
            sourceFile$1 = util3.join(aSourceMapPath, sourceFile$1);
          if (sourceRoot != null)
            sourceFile$1 = util3.relative(sourceRoot, sourceFile$1);
          this.setSourceContent(sourceFile$1, content);
        }
      }, this);
    };
    SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
      if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
        var message = "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";
        if (this._ignoreInvalidMapping) {
          if (typeof console !== "undefined" && console.warn)
            console.warn(message);
          return false;
        } else
          throw new Error(message);
      }
      if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName)
        return;
      else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource)
        return;
      else {
        var message = "Invalid mapping: " + JSON.stringify({
          generated: aGenerated,
          source: aSource,
          original: aOriginal,
          name: aName
        });
        if (this._ignoreInvalidMapping) {
          if (typeof console !== "undefined" && console.warn)
            console.warn(message);
          return false;
        } else
          throw new Error(message);
      }
    };
    SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
      var previousGeneratedColumn = 0;
      var previousGeneratedLine = 1;
      var previousOriginalColumn = 0;
      var previousOriginalLine = 0;
      var previousName = 0;
      var previousSource = 0;
      var result = "";
      var next;
      var mapping;
      var nameIdx;
      var sourceIdx;
      var mappings = this._mappings.toArray();
      for (var i = 0, len = mappings.length;i < len; i++) {
        mapping = mappings[i];
        next = "";
        if (mapping.generatedLine !== previousGeneratedLine) {
          previousGeneratedColumn = 0;
          while (mapping.generatedLine !== previousGeneratedLine) {
            next += ";";
            previousGeneratedLine++;
          }
        } else if (i > 0) {
          if (!util3.compareByGeneratedPositionsInflated(mapping, mappings[i - 1]))
            continue;
          next += ",";
        }
        next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
        previousGeneratedColumn = mapping.generatedColumn;
        if (mapping.source != null) {
          sourceIdx = this._sources.indexOf(mapping.source);
          next += base64VLQ.encode(sourceIdx - previousSource);
          previousSource = sourceIdx;
          next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
          previousOriginalLine = mapping.originalLine - 1;
          next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
          previousOriginalColumn = mapping.originalColumn;
          if (mapping.name != null) {
            nameIdx = this._names.indexOf(mapping.name);
            next += base64VLQ.encode(nameIdx - previousName);
            previousName = nameIdx;
          }
        }
        result += next;
      }
      return result;
    };
    SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
      return aSources.map(function(source) {
        if (!this._sourcesContents)
          return null;
        if (aSourceRoot != null)
          source = util3.relative(aSourceRoot, source);
        var key = util3.toSetString(source);
        return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
      }, this);
    };
    SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
      var map3 = {
        version: this._version,
        sources: this._sources.toArray(),
        names: this._names.toArray(),
        mappings: this._serializeMappings()
      };
      if (this._file != null)
        map3.file = this._file;
      if (this._sourceRoot != null)
        map3.sourceRoot = this._sourceRoot;
      if (this._sourcesContents)
        map3.sourcesContent = this._generateSourcesContent(map3.sources, map3.sourceRoot);
      return map3;
    };
    SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
      return JSON.stringify(this.toJSON());
    };
    exports.SourceMapGenerator = SourceMapGenerator;
  });
  import_source_map_generator = require_source_map_generator();
  trackNodes = new Set([
    "Atrule",
    "Selector",
    "Declaration"
  ]);
  token_before_exports = /* @__PURE__ */ __exportAll({
    safe: () => safe,
    spec: () => spec
  });
  specPairs = [
    [Ident, Ident],
    [Ident, Function2],
    [Ident, Url],
    [Ident, BadUrl],
    [Ident, "-"],
    [Ident, Number$1],
    [Ident, Percentage],
    [Ident, Dimension],
    [Ident, CDC],
    [Ident, LeftParenthesis],
    [AtKeyword, Ident],
    [AtKeyword, Function2],
    [AtKeyword, Url],
    [AtKeyword, BadUrl],
    [AtKeyword, "-"],
    [AtKeyword, Number$1],
    [AtKeyword, Percentage],
    [AtKeyword, Dimension],
    [AtKeyword, CDC],
    [Hash, Ident],
    [Hash, Function2],
    [Hash, Url],
    [Hash, BadUrl],
    [Hash, "-"],
    [Hash, Number$1],
    [Hash, Percentage],
    [Hash, Dimension],
    [Hash, CDC],
    [Dimension, Ident],
    [Dimension, Function2],
    [Dimension, Url],
    [Dimension, BadUrl],
    [Dimension, "-"],
    [Dimension, Number$1],
    [Dimension, Percentage],
    [Dimension, Dimension],
    [Dimension, CDC],
    ["#", Ident],
    ["#", Function2],
    ["#", Url],
    ["#", BadUrl],
    ["#", "-"],
    ["#", Number$1],
    ["#", Percentage],
    ["#", Dimension],
    ["#", CDC],
    ["-", Ident],
    ["-", Function2],
    ["-", Url],
    ["-", BadUrl],
    ["-", "-"],
    ["-", Number$1],
    ["-", Percentage],
    ["-", Dimension],
    ["-", CDC],
    [Number$1, Ident],
    [Number$1, Function2],
    [Number$1, Url],
    [Number$1, BadUrl],
    [Number$1, Number$1],
    [Number$1, Percentage],
    [Number$1, Dimension],
    [Number$1, "%"],
    [Number$1, CDC],
    ["@", Ident],
    ["@", Function2],
    ["@", Url],
    ["@", BadUrl],
    ["@", "-"],
    ["@", CDC],
    [".", Number$1],
    [".", Percentage],
    [".", Dimension],
    ["+", Number$1],
    ["+", Percentage],
    ["+", Dimension],
    ["/", "*"]
  ];
  safePairs = specPairs.concat([
    [Ident, Hash],
    [Dimension, Hash],
    [Hash, Hash],
    [AtKeyword, LeftParenthesis],
    [AtKeyword, String$1],
    [AtKeyword, Colon],
    [Percentage, Percentage],
    [Percentage, Dimension],
    [Percentage, Function2],
    [Percentage, "-"],
    [RightParenthesis, Ident],
    [RightParenthesis, Function2],
    [RightParenthesis, Percentage],
    [RightParenthesis, Dimension],
    [RightParenthesis, Hash],
    [RightParenthesis, "-"]
  ]);
  spec = createMap(specPairs);
  safe = createMap(safePairs);
  ({ hasOwnProperty: hasOwnProperty$3 } = Object.prototype);
  defaultLoc = {
    offset: 0,
    line: 1,
    column: 1
  };
  keywords = /* @__PURE__ */ new Map;
  properties = /* @__PURE__ */ new Map;
  keyword = getKeywordDescriptor;
  property = getPropertyDescriptor;
  cssWideKeywords = [
    "initial",
    "inherit",
    "unset",
    "revert",
    "revert-layer"
  ];
  calcFunctionNames = [
    "calc(",
    "-moz-calc(",
    "-webkit-calc("
  ];
  balancePair = new Map([
    [Function2, RightParenthesis],
    [LeftParenthesis, RightParenthesis],
    [LeftSquareBracket, RightSquareBracket],
    [LeftCurlyBracket, RightCurlyBracket]
  ]);
  tokenTypes = {
    "ident-token": tokenType(Ident),
    "function-token": tokenType(Function2),
    "at-keyword-token": tokenType(AtKeyword),
    "hash-token": tokenType(Hash),
    "string-token": tokenType(String$1),
    "bad-string-token": tokenType(BadString),
    "url-token": tokenType(Url),
    "bad-url-token": tokenType(BadUrl),
    "delim-token": tokenType(Delim),
    "number-token": tokenType(Number$1),
    "percentage-token": tokenType(Percentage),
    "dimension-token": tokenType(Dimension),
    "whitespace-token": tokenType(WhiteSpace),
    "CDO-token": tokenType(CDO),
    "CDC-token": tokenType(CDC),
    "colon-token": tokenType(Colon),
    "semicolon-token": tokenType(Semicolon),
    "comma-token": tokenType(Comma),
    "[-token": tokenType(LeftSquareBracket),
    "]-token": tokenType(RightSquareBracket),
    "(-token": tokenType(LeftParenthesis),
    ")-token": tokenType(RightParenthesis),
    "{-token": tokenType(LeftCurlyBracket),
    "}-token": tokenType(RightCurlyBracket)
  };
  productionTypes = {
    string: tokenType(String$1),
    ident: tokenType(Ident),
    percentage: calc(percentage),
    zero: zero(),
    number: calc(number4),
    integer: calc(integer3),
    "custom-ident": customIdent,
    "dashed-ident": dashedIdent,
    "custom-property-name": customPropertyName,
    "hex-color": hexColor,
    "id-selector": idSelector,
    "an-plus-b": anPlusB,
    urange,
    "declaration-value": declarationValue,
    "any-value": anyValue
  };
  units_exports = /* @__PURE__ */ __exportAll({
    angle: () => angle,
    decibel: () => decibel,
    flex: () => flex,
    frequency: () => frequency,
    length: () => length,
    resolution: () => resolution,
    semitones: () => semitones,
    time: () => time4
  });
  length = [
    "cm",
    "mm",
    "q",
    "in",
    "pt",
    "pc",
    "px",
    "em",
    "rem",
    "ex",
    "rex",
    "cap",
    "rcap",
    "ch",
    "rch",
    "ic",
    "ric",
    "lh",
    "rlh",
    "vw",
    "svw",
    "lvw",
    "dvw",
    "vh",
    "svh",
    "lvh",
    "dvh",
    "vi",
    "svi",
    "lvi",
    "dvi",
    "vb",
    "svb",
    "lvb",
    "dvb",
    "vmin",
    "svmin",
    "lvmin",
    "dvmin",
    "vmax",
    "svmax",
    "lvmax",
    "dvmax",
    "cqw",
    "cqh",
    "cqi",
    "cqb",
    "cqmin",
    "cqmax"
  ];
  angle = [
    "deg",
    "grad",
    "rad",
    "turn"
  ];
  time4 = ["s", "ms"];
  frequency = ["hz", "khz"];
  resolution = [
    "dpi",
    "dpcm",
    "dppx",
    "x"
  ];
  flex = ["fr"];
  decibel = ["db"];
  semitones = ["st"];
  NAME_CHAR = new Uint8Array(128).map((_6, idx) => /[a-zA-Z0-9\-]/.test(String.fromCharCode(idx)) ? 1 : 0);
  COMBINATOR_PRECEDENCE = {
    " ": 1,
    "&&": 2,
    "||": 3,
    "|": 4
  };
  astToTokens = { decorator(handlers2) {
    const tokens = [];
    let curNode = null;
    return {
      ...handlers2,
      node(node3) {
        const tmp = curNode;
        curNode = node3;
        handlers2.node.call(this, node3);
        curNode = tmp;
      },
      emit(value, type2, auto) {
        tokens.push({
          type: type2,
          value,
          node: auto ? null : curNode
        });
      },
      result() {
        return tokens;
      }
    };
  } };
  MATCH = { type: "Match" };
  MISMATCH = { type: "Mismatch" };
  DISALLOW_EMPTY = { type: "DisallowEmpty" };
  ({ hasOwnProperty: hasOwnProperty$2 } = Object.prototype);
  trace_exports = /* @__PURE__ */ __exportAll({
    getTrace: () => getTrace,
    isKeyword: () => isKeyword,
    isProperty: () => isProperty,
    isType: () => isType
  });
  ({ hasOwnProperty: hasOwnProperty$1 } = Object.prototype);
  patch = {
    atrules: {
      charset: { prelude: "<string>" },
      container: { prelude: "[ <container-name> ]? <container-condition>" },
      "font-face": { descriptors: { "unicode-range": {
        comment: "replaces <unicode-range>, an old production name",
        syntax: "<urange>#"
      } } },
      nest: { prelude: "<complex-selector-list>" },
      scope: { prelude: "[ ( <scope-start> ) ]? [ to ( <scope-end> ) ]?" },
      "position-try": {
        comment: "The list of descriptors: https://developer.mozilla.org/en-US/docs/Web/CSS/@position-try",
        descriptors: {
          top: "<'top'>",
          left: "<'left'>",
          bottom: "<'bottom'>",
          right: "<'right'>",
          "inset-block-start": "<'inset-block-start'>",
          "inset-block-end": "<'inset-block-end'>",
          "inset-inline-start": "<'inset-inline-start'>",
          "inset-inline-end": "<'inset-inline-end'>",
          "inset-block": "<'inset-block'>",
          "inset-inline": "<'inset-inline'>",
          inset: "<'inset'>",
          "margin-top": "<'margin-top'>",
          "margin-left": "<'margin-left'>",
          "margin-bottom": "<'margin-bottom'>",
          "margin-right": "<'margin-right'>",
          "margin-block-start": "<'margin-block-start'>",
          "margin-block-end": "<'margin-block-end'>",
          "margin-inline-start": "<'margin-inline-start'>",
          "margin-inline-end": "<'margin-inline-end'>",
          margin: "<'margin'>",
          "margin-block": "<'margin-block'>",
          "margin-inline": "<'margin-inline'>",
          width: "<'width'>",
          height: "<'height'>",
          "min-width": "<'min-width'>",
          "min-height": "<'min-height'>",
          "max-width": "<'max-width'>",
          "max-height": "<'max-height'>",
          "block-size": "<'block-size'>",
          "inline-size": "<'inline-size'>",
          "min-block-size": "<'min-block-size'>",
          "min-inline-size": "<'min-inline-size'>",
          "max-block-size": "<'max-block-size'>",
          "max-inline-size": "<'max-inline-size'>",
          "align-self": "<'align-self'> | anchor-center",
          "justify-self": "<'justify-self'> | anchor-center"
        }
      }
    },
    properties: {
      "-moz-background-clip": {
        comment: "deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
        syntax: "padding | border"
      },
      "-moz-border-radius-bottomleft": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius",
        syntax: "<'border-bottom-left-radius'>"
      },
      "-moz-border-radius-bottomright": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
        syntax: "<'border-bottom-right-radius'>"
      },
      "-moz-border-radius-topleft": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius",
        syntax: "<'border-top-left-radius'>"
      },
      "-moz-border-radius-topright": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
        syntax: "<'border-bottom-right-radius'>"
      },
      "-moz-control-character-visibility": {
        comment: "firefox specific keywords, https://bugzilla.mozilla.org/show_bug.cgi?id=947588",
        syntax: "visible | hidden"
      },
      "-moz-osx-font-smoothing": {
        comment: "misssed old syntax https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
        syntax: "auto | grayscale"
      },
      "-moz-user-select": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
        syntax: "none | text | all | -moz-none"
      },
      "-ms-flex-align": {
        comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
        syntax: "start | end | center | baseline | stretch"
      },
      "-ms-flex-item-align": {
        comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
        syntax: "auto | start | end | center | baseline | stretch"
      },
      "-ms-flex-line-pack": {
        comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-line-pack",
        syntax: "start | end | center | justify | distribute | stretch"
      },
      "-ms-flex-negative": {
        comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
        syntax: "<'flex-shrink'>"
      },
      "-ms-flex-pack": {
        comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-pack",
        syntax: "start | end | center | justify | distribute"
      },
      "-ms-flex-order": {
        comment: "misssed old syntax implemented in IE; https://msdn.microsoft.com/en-us/library/jj127303(v=vs.85).aspx",
        syntax: "<integer>"
      },
      "-ms-flex-positive": {
        comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
        syntax: "<'flex-grow'>"
      },
      "-ms-flex-preferred-size": {
        comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
        syntax: "<'flex-basis'>"
      },
      "-ms-interpolation-mode": {
        comment: "https://msdn.microsoft.com/en-us/library/ff521095(v=vs.85).aspx",
        syntax: "nearest-neighbor | bicubic"
      },
      "-ms-grid-column-align": {
        comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx",
        syntax: "start | end | center | stretch"
      },
      "-ms-grid-row-align": {
        comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx",
        syntax: "start | end | center | stretch"
      },
      "-ms-hyphenate-limit-last": {
        comment: "misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits",
        syntax: "none | always | column | page | spread"
      },
      "-webkit-appearance": {
        comment: "webkit specific keywords",
        references: ["http://css-infos.net/property/-webkit-appearance"],
        syntax: "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button"
      },
      "-webkit-background-clip": {
        comment: "https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
        syntax: "[ <box> | border | padding | content | text ]#"
      },
      "-webkit-column-break-after": {
        comment: "added, http://help.dottoro.com/lcrthhhv.php",
        syntax: "always | auto | avoid"
      },
      "-webkit-column-break-before": {
        comment: "added, http://help.dottoro.com/lcxquvkf.php",
        syntax: "always | auto | avoid"
      },
      "-webkit-column-break-inside": {
        comment: "added, http://help.dottoro.com/lclhnthl.php",
        syntax: "always | auto | avoid"
      },
      "-webkit-font-smoothing": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
        syntax: "auto | none | antialiased | subpixel-antialiased"
      },
      "-webkit-mask-box-image": {
        comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
        syntax: "[ <url> | <gradient> | none ] [ <length-percentage>{4} <-webkit-mask-box-repeat>{2} ]?"
      },
      "-webkit-print-color-adjust": {
        comment: "missed",
        references: ["https://developer.mozilla.org/en/docs/Web/CSS/-webkit-print-color-adjust"],
        syntax: "economy | exact"
      },
      "-webkit-text-security": {
        comment: "missed; http://help.dottoro.com/lcbkewgt.php",
        syntax: "none | circle | disc | square"
      },
      "-webkit-user-drag": {
        comment: "missed; http://help.dottoro.com/lcbixvwm.php",
        syntax: "none | element | auto"
      },
      "-webkit-user-select": {
        comment: "auto is supported by old webkit, https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
        syntax: "auto | none | text | all"
      },
      "alignment-baseline": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty"],
        syntax: "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"
      },
      "background-clip": {
        comment: "used <bg-clip> from CSS Backgrounds and Borders 4 since it adds new values",
        references: ["https://github.com/csstree/csstree/issues/190"],
        syntax: "<bg-clip>#"
      },
      "baseline-shift": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty"],
        syntax: "baseline | sub | super | <svg-length>"
      },
      behavior: {
        comment: "added old IE property https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx",
        syntax: "<url>+"
      },
      "container-type": {
        comment: "https://www.w3.org/TR/css-contain-3/#propdef-container-type",
        syntax: "normal || [ size | inline-size ]"
      },
      cue: {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<'cue-before'> <'cue-after'>?"
      },
      "cue-after": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<url> <decibel>? | none"
      },
      "cue-before": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<url> <decibel>? | none"
      },
      cursor: {
        comment: "added legacy keywords: hand, -webkit-grab. -webkit-grabbing, -webkit-zoom-in, -webkit-zoom-out, -moz-grab, -moz-grabbing, -moz-zoom-in, -moz-zoom-out",
        references: ["https://www.sitepoint.com/css3-cursor-styles/"],
        syntax: "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]"
      },
      display: {
        comment: "extended with -ms-flexbox",
        syntax: "| <-non-standard-display>"
      },
      position: {
        comment: "extended with -webkit-sticky",
        syntax: "| -webkit-sticky"
      },
      "dominant-baseline": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/text.html#DominantBaselineProperty"],
        syntax: "auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge"
      },
      "image-rendering": {
        comment: "extended with <-non-standard-image-rendering>, added SVG keywords optimizeSpeed and optimizeQuality",
        references: ["https://developer.mozilla.org/en/docs/Web/CSS/image-rendering", "https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty"],
        syntax: "| optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>"
      },
      fill: {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/painting.html#FillProperty"],
        syntax: "<paint>"
      },
      "fill-opacity": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/painting.html#FillProperty"],
        syntax: "<number-zero-one>"
      },
      filter: {
        comment: "extend with IE legacy syntaxes",
        syntax: "| <-ms-filter-function-list>"
      },
      font: {
        comment: "align with font-4, fix <'font-family'>#, add non standard fonts",
        references: [
          "https://drafts.csswg.org/css-fonts-4/#font-prop",
          "https://github.com/w3c/csswg-drafts/pull/10832",
          "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"
        ],
        syntax: "[ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-width-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'># ] | <system-family-name> | <-non-standard-font>"
      },
      "glyph-orientation-horizontal": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/text.html#GlyphOrientationHorizontalProperty"],
        syntax: "<angle>"
      },
      "glyph-orientation-vertical": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/text.html#GlyphOrientationVerticalProperty"],
        syntax: "<angle>"
      },
      kerning: {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/text.html#KerningProperty"],
        syntax: "auto | <svg-length>"
      },
      "letter-spacing": {
        comment: "fix syntax <length> -> <length-percentage>",
        references: ["https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing"],
        syntax: "normal | <length-percentage>"
      },
      "max-width": {
        comment: "extend by non-standard size keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
        syntax: "| stretch | <-non-standard-size>"
      },
      "max-height": {
        comment: "extend by non-standard size keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
        syntax: "| stretch | <-non-standard-size>"
      },
      width: {
        references: ["https://developer.mozilla.org/en-US/docs/Web/CSS/width", "https://github.com/csstree/stylelint-validator/issues/29"],
        syntax: "| stretch | <-non-standard-size>"
      },
      height: { syntax: "| stretch | <-non-standard-size>" },
      "min-width": {
        comment: "extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
        syntax: "| stretch | <-non-standard-size>"
      },
      "min-height": { syntax: "| stretch | <-non-standard-size>" },
      overflow: {
        comment: "extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
        syntax: "| <-non-standard-overflow>"
      },
      pause: {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<'pause-before'> <'pause-after'>?"
      },
      "pause-after": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
      },
      "pause-before": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
      },
      rest: {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<'rest-before'> <'rest-after'>?"
      },
      "rest-after": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
      },
      "rest-before": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
      },
      "scroll-timeline": {
        comment: "fix according to spec",
        references: ["https://www.w3.org/TR/scroll-animations-1/#scroll-timeline-shorthand"],
        syntax: "[ <'scroll-timeline-name'> || <'scroll-timeline-axis'> ]#"
      },
      "scroll-timeline-name": {
        comment: "fix according to spec",
        references: ["https://w3c.github.io/csswg-drafts/scroll-animations/#propdef-scroll-timeline-name"],
        syntax: "[ none | <dashed-ident> ]#"
      },
      src: {
        comment: "added @font-face's src property https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src",
        syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"
      },
      speak: {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "auto | never | always"
      },
      "speak-as": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"
      },
      stroke: {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],
        syntax: "<paint>"
      },
      "stroke-dasharray": {
        comment: "added SVG property; a list of comma and/or white space separated <length>s and <percentage>s",
        references: ["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],
        syntax: "none | [ <svg-length>+ ]#"
      },
      "stroke-dashoffset": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],
        syntax: "<svg-length>"
      },
      "stroke-linejoin": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],
        syntax: "miter | round | bevel"
      },
      "stroke-miterlimit": {
        comment: "added SVG property (<miterlimit> = <number-one-or-greater>) ",
        references: ["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],
        syntax: "<number-one-or-greater>"
      },
      "stroke-width": {
        comment: "added SVG property",
        references: ["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],
        syntax: "<svg-length>"
      },
      "text-wrap": {
        comment: "broken in mdn/data",
        syntax: "<'text-wrap-mode'> || <'text-wrap-style'>"
      },
      "unicode-bidi": {
        comment: "added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi",
        syntax: "| -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate | -webkit-isolate-override | -webkit-plaintext"
      },
      "unicode-range": {
        comment: "added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range",
        syntax: "<urange>#"
      },
      "voice-balance": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<number> | left | center | right | leftwards | rightwards"
      },
      "voice-duration": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "auto | <time>"
      },
      "voice-family": {
        comment: "<name> -> <family-name>, https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "[ [ <family-name> | <generic-voice> ] , ]* [ <family-name> | <generic-voice> ] | preserve"
      },
      "voice-pitch": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
      },
      "voice-range": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
      },
      "voice-rate": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "[ normal | x-slow | slow | medium | fast | x-fast ] || <percentage>"
      },
      "voice-stress": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "normal | strong | moderate | none | reduced"
      },
      "voice-volume": {
        comment: "https://www.w3.org/TR/css3-speech/#property-index",
        syntax: "silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]"
      },
      "writing-mode": {
        comment: "extend with SVG keywords",
        syntax: "| <svg-writing-mode>"
      },
      "white-space-trim": {
        syntax: "none | discard-before || discard-after || discard-inner",
        comment: "missed, https://www.w3.org/TR/css-text-4/#white-space-trim"
      },
      "word-break": {
        syntax: "normal | break-all | keep-all | break-word | auto-phrase",
        comment: "added in Chrome/Edge 119, not covered by a spec currently (2024-09-02)",
        references: ["https://developer.mozilla.org/en-US/docs/Web/CSS/word-break"]
      }
    },
    types: {
      "-legacy-gradient": {
        comment: "added collection of legacy gradient syntaxes",
        syntax: "<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>"
      },
      "-legacy-linear-gradient": {
        comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
        syntax: "-moz-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-linear-gradient( <-legacy-linear-gradient-arguments> )"
      },
      "-legacy-repeating-linear-gradient": {
        comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
        syntax: "-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )"
      },
      "-legacy-linear-gradient-arguments": {
        comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
        syntax: "[ <angle> | <side-or-corner> ]? , <color-stop-list>"
      },
      "-legacy-radial-gradient": {
        comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
        syntax: "-moz-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-radial-gradient( <-legacy-radial-gradient-arguments> )"
      },
      "-legacy-repeating-radial-gradient": {
        comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
        syntax: "-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )"
      },
      "-legacy-radial-gradient-arguments": {
        comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
        syntax: "[ <position> , ]? [ [ [ <-legacy-radial-gradient-shape> || <-legacy-radial-gradient-size> ] | [ <length> | <percentage> ]{2} ] , ]? <color-stop-list>"
      },
      "-legacy-radial-gradient-size": {
        comment: "before a standard it contains 2 extra keywords (`contain` and `cover`) https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltsize",
        syntax: "closest-side | closest-corner | farthest-side | farthest-corner | contain | cover"
      },
      "-legacy-radial-gradient-shape": {
        comment: "define to double sure it doesn't extends in future https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltshape",
        syntax: "circle | ellipse"
      },
      "-non-standard-font": {
        comment: "non standard fonts",
        references: ["https://webkit.org/blog/3709/using-the-system-font-in-web-content/"],
        syntax: "-apple-system-body | -apple-system-headline | -apple-system-subheadline | -apple-system-caption1 | -apple-system-caption2 | -apple-system-footnote | -apple-system-short-body | -apple-system-short-headline | -apple-system-short-subheadline | -apple-system-short-caption1 | -apple-system-short-footnote | -apple-system-tall-body"
      },
      "-non-standard-color": {
        comment: "non standard colors",
        references: ["http://cssdot.ru/%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_CSS/color-i305.html", "https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Mozilla_Color_Preference_Extensions"],
        syntax: "-moz-ButtonDefault | -moz-ButtonHoverFace | -moz-ButtonHoverText | -moz-CellHighlight | -moz-CellHighlightText | -moz-Combobox | -moz-ComboboxText | -moz-Dialog | -moz-DialogText | -moz-dragtargetzone | -moz-EvenTreeRow | -moz-Field | -moz-FieldText | -moz-html-CellHighlight | -moz-html-CellHighlightText | -moz-mac-accentdarkestshadow | -moz-mac-accentdarkshadow | -moz-mac-accentface | -moz-mac-accentlightesthighlight | -moz-mac-accentlightshadow | -moz-mac-accentregularhighlight | -moz-mac-accentregularshadow | -moz-mac-chrome-active | -moz-mac-chrome-inactive | -moz-mac-focusring | -moz-mac-menuselect | -moz-mac-menushadow | -moz-mac-menutextselect | -moz-MenuHover | -moz-MenuHoverText | -moz-MenuBarText | -moz-MenuBarHoverText | -moz-nativehyperlinktext | -moz-OddTreeRow | -moz-win-communicationstext | -moz-win-mediatext | -moz-activehyperlinktext | -moz-default-background-color | -moz-default-color | -moz-hyperlinktext | -moz-visitedhyperlinktext | -webkit-activelink | -webkit-focus-ring-color | -webkit-link | -webkit-text"
      },
      "-non-standard-image-rendering": {
        comment: "non-standard keywords http://phrogz.net/tmp/canvas_image_zoom.html",
        syntax: "optimize-contrast | -moz-crisp-edges | -o-crisp-edges | -webkit-optimize-contrast"
      },
      "-non-standard-overflow": {
        comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
        syntax: "overlay | -moz-scrollbars-none | -moz-scrollbars-horizontal | -moz-scrollbars-vertical | -moz-hidden-unscrollable"
      },
      "-non-standard-size": {
        comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
        syntax: "intrinsic | min-intrinsic | -webkit-fill-available | -webkit-fit-content | -webkit-min-content | -webkit-max-content  | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content"
      },
      "-webkit-gradient()": {
        comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/ - TODO: simplify when after match algorithm improvement ( [, point, radius | , point] -> [, radius]? , point )",
        syntax: "-webkit-gradient( <-webkit-gradient-type>, <-webkit-gradient-point> [, <-webkit-gradient-point> | , <-webkit-gradient-radius>, <-webkit-gradient-point> ] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )"
      },
      "-webkit-gradient-color-stop": {
        comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
        syntax: "from( <color> ) | color-stop( [ <number-zero-one> | <percentage> ] , <color> ) | to( <color> )"
      },
      "-webkit-gradient-point": {
        comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
        syntax: "[ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]"
      },
      "-webkit-gradient-radius": {
        comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
        syntax: "<length> | <percentage>"
      },
      "-webkit-gradient-type": {
        comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
        syntax: "linear | radial"
      },
      "-webkit-mask-box-repeat": {
        comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
        syntax: "repeat | stretch | round"
      },
      "-ms-filter-function-list": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
        syntax: "<-ms-filter-function>+"
      },
      "-ms-filter-function": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
        syntax: "<-ms-filter-function-progid> | <-ms-filter-function-legacy>"
      },
      "-ms-filter-function-progid": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
        syntax: "'progid:' [ <ident-token> '.' ]* [ <ident-token> | <function-token> <any-value>? ) ]"
      },
      "-ms-filter-function-legacy": {
        comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
        syntax: "<ident-token> | <function-token> <any-value>? )"
      },
      "absolute-color-base": {
        comment: "https://www.w3.org/TR/css-color-4/#color-syntax",
        syntax: "<hex-color> | <absolute-color-function> | <named-color> | transparent"
      },
      "absolute-color-function": {
        comment: "https://www.w3.org/TR/css-color-4/#color-syntax",
        syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()>"
      },
      age: {
        comment: "https://www.w3.org/TR/css3-speech/#voice-family",
        syntax: "child | young | old"
      },
      "anchor-name": {
        comment: "missed in mdn/data",
        syntax: "<dashed-ident>"
      },
      "attr-name": { syntax: "<wq-name>" },
      "attr-fallback": { syntax: "<any-value>" },
      "bg-clip": {
        comment: "missed, https://drafts.csswg.org/css-backgrounds-4/#typedef-bg-clip",
        syntax: "<box> | border | text"
      },
      bottom: {
        comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
        syntax: "<length> | auto"
      },
      "content-list": {
        comment: "added attr(), see https://github.com/csstree/csstree/issues/201",
        syntax: "[ <string> | contents | <image> | <counter> | <quote> | <target> | <leader()> | <attr()> ]+"
      },
      "container-name": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#container-rule",
        syntax: "<custom-ident>"
      },
      "container-condition": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#container-rule",
        syntax: "not <query-in-parens> | <query-in-parens> [ [ and <query-in-parens> ]* | [ or <query-in-parens> ]* ]"
      },
      "coord-box": { syntax: "content-box | padding-box | border-box | fill-box | stroke-box | view-box" },
      "element()": {
        comment: "https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation",
        syntax: "element( <custom-ident> , [ first | start | last | first-except ]? ) | element( <id-selector> )"
      },
      "generic-voice": {
        comment: "https://www.w3.org/TR/css3-speech/#voice-family",
        syntax: "[ <age>? <gender> <integer>? ]"
      },
      gender: {
        comment: "https://www.w3.org/TR/css3-speech/#voice-family",
        syntax: "male | female | neutral"
      },
      "general-enclosed": {
        comment: "remove ident-token, optional any-value, brackets (see https://drafts.csswg.org/mediaqueries-5/#typedef-general-enclosed)",
        syntax: "[ <function-token> <any-value>? ) ] | [ ( <any-value>? ) ]"
      },
      "generic-family": {
        comment: "new definition on font-4, https://drafts.csswg.org/css-fonts-4/#typedef-generic-family",
        syntax: "<generic-script-specific>| <generic-complete> | <generic-incomplete> | <-non-standard-generic-family>"
      },
      "generic-script-specific": { syntax: "generic(kai) | generic(fangsong) | generic(nastaliq)" },
      "generic-complete": { syntax: "serif | sans-serif | system-ui | cursive | fantasy | math | monospace" },
      "generic-incomplete": { syntax: "ui-serif | ui-sans-serif | ui-monospace | ui-rounded" },
      "-non-standard-generic-family": {
        syntax: "-apple-system | BlinkMacSystemFont",
        references: ["https://css-tricks.com/snippets/css/system-font-stack/", "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"]
      },
      gradient: {
        comment: "added legacy syntaxes support",
        syntax: "| <-legacy-gradient>"
      },
      left: {
        comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
        syntax: "<length> | auto"
      },
      color: {
        comment: "css-color-5, added non standard color names",
        syntax: "<color-base> | currentColor | <system-color> | <device-cmyk()>  | <light-dark()> | <-non-standard-color>"
      },
      "color-base": { syntax: "<hex-color> | <color-function> | <named-color> | <color-mix()> | transparent" },
      "color-function": { syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()>" },
      "device-cmyk()": { syntax: "<legacy-device-cmyk-syntax> | <modern-device-cmyk-syntax>" },
      "legacy-device-cmyk-syntax": { syntax: "device-cmyk( <number>#{4} )" },
      "modern-device-cmyk-syntax": { syntax: "device-cmyk( <cmyk-component>{4} [ / [ <alpha-value> | none ] ]? )" },
      "cmyk-component": { syntax: "<number> | <percentage> | none" },
      "color-mix()": { syntax: "color-mix( <color-interpolation-method> , [ <color> && <percentage [0,100]>? ]#{2} )" },
      "color-interpolation-method": { syntax: "in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? | <custom-color-space> ]" },
      "color-space": { syntax: "<rectangular-color-space> | <polar-color-space> | <custom-color-space>" },
      "custom-color-space": { syntax: "<dashed-ident>" },
      paint: {
        comment: "used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint",
        syntax: "none | <color> | <url> [ none | <color> ]? | context-fill | context-stroke"
      },
      "palette-identifier": {
        comment: "<palette-identifier> is parsed as a <dashed-ident> (https://drafts.csswg.org/css-fonts/#typedef-font-palette-palette-identifier)",
        syntax: "<dashed-ident>"
      },
      right: {
        comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
        syntax: "<length> | auto"
      },
      shape: {
        comment: "missed spaces in function body and add backwards compatible syntax",
        syntax: "rect( <top>, <right>, <bottom>, <left> ) | rect( <top> <right> <bottom> <left> )"
      },
      "scope-start": { syntax: "<forgiving-selector-list>" },
      "scope-end": { syntax: "<forgiving-selector-list>" },
      "forgiving-selector-list": { syntax: "<complex-real-selector-list>" },
      "forgiving-relative-selector-list": { syntax: "<relative-real-selector-list>" },
      "selector-list": { syntax: "<complex-selector-list>" },
      "complex-real-selector-list": { syntax: "<complex-real-selector>#" },
      "simple-selector-list": { syntax: "<simple-selector>#" },
      "relative-real-selector-list": { syntax: "<relative-real-selector>#" },
      "complex-selector": { syntax: "<complex-selector-unit> [ <combinator>? <complex-selector-unit> ]*" },
      "complex-selector-unit": { syntax: "[ <compound-selector>? <pseudo-compound-selector>* ]!" },
      "complex-real-selector": { syntax: "<compound-selector> [ <combinator>? <compound-selector> ]*" },
      "relative-real-selector": { syntax: "<combinator>? <complex-real-selector>" },
      "compound-selector": { syntax: "[ <type-selector>? <subclass-selector>* ]!" },
      "pseudo-compound-selector": { syntax: " <pseudo-element-selector> <pseudo-class-selector>*" },
      "simple-selector": { syntax: "<type-selector> | <subclass-selector>" },
      combinator: { syntax: "'>' | '+' | '~' | [ '|' '|' ]" },
      "pseudo-element-selector": { syntax: "':' <pseudo-class-selector> | <legacy-pseudo-element-selector>" },
      "legacy-pseudo-element-selector": { syntax: " ':' [before | after | first-line | first-letter]" },
      "single-animation-composition": {
        comment: "missed definition",
        references: ["https://w3c.github.io/csswg-drafts/css-animations-2/#typedef-single-animation-composition"],
        syntax: "replace | add | accumulate"
      },
      "svg-length": {
        comment: "All coordinates and lengths in SVG can be specified with or without a unit identifier",
        references: ["https://www.w3.org/TR/SVG11/coords.html#Units"],
        syntax: "<percentage> | <length> | <number>"
      },
      "svg-writing-mode": {
        comment: "SVG specific keywords (deprecated for CSS)",
        references: ["https://developer.mozilla.org/en/docs/Web/CSS/writing-mode", "https://www.w3.org/TR/SVG/text.html#WritingModeProperty"],
        syntax: "lr-tb | rl-tb | tb-rl | lr | rl | tb"
      },
      top: {
        comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
        syntax: "<length> | auto"
      },
      x: {
        comment: "missed; not sure we should add it, but no others except `cursor` is using it so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",
        syntax: "<number>"
      },
      y: {
        comment: "missed; not sure we should add it, but no others except `cursor` is using so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",
        syntax: "<number>"
      },
      declaration: {
        comment: "missed, restored by https://drafts.csswg.org/css-syntax",
        syntax: "<ident-token> : <declaration-value>? [ '!' important ]?"
      },
      "declaration-list": {
        comment: "missed, restored by https://drafts.csswg.org/css-syntax",
        syntax: "[ <declaration>? ';' ]* <declaration>?"
      },
      url: {
        comment: "https://drafts.csswg.org/css-values-4/#urls",
        syntax: "url( <string> <url-modifier>* ) | <url-token>"
      },
      "url-modifier": {
        comment: "https://drafts.csswg.org/css-values-4/#typedef-url-modifier",
        syntax: "<ident> | <function-token> <any-value> )"
      },
      "number-zero-one": { syntax: "<number [0,1]>" },
      "number-one-or-greater": { syntax: "<number [1,∞]>" },
      "color()": { syntax: "color( <colorspace-params> [ / [ <alpha-value> | none ] ]? )" },
      "colorspace-params": { syntax: "[ <predefined-rgb-params> | <xyz-params>]" },
      "predefined-rgb-params": { syntax: "<predefined-rgb> [ <number> | <percentage> | none ]{3}" },
      "predefined-rgb": { syntax: "srgb | srgb-linear | display-p3 | a98-rgb | prophoto-rgb | rec2020" },
      "xyz-params": { syntax: "<xyz-space> [ <number> | <percentage> | none ]{3}" },
      "xyz-space": { syntax: "xyz | xyz-d50 | xyz-d65" },
      "oklab()": {
        comment: "https://www.w3.org/TR/css-color-4/#specifying-oklab-oklch",
        syntax: "oklab( [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ / [<alpha-value> | none] ]? )"
      },
      "oklch()": {
        comment: "https://www.w3.org/TR/css-color-4/#specifying-oklab-oklch",
        syntax: "oklch( [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ <hue> | none] [ / [<alpha-value> | none] ]? )"
      },
      "offset-path": { syntax: "<ray()> | <url> | <basic-shape>" },
      "basic-shape": { syntax: "<inset()> | <xywh()> | <rect()> | <circle()> | <ellipse()> | <polygon()> | <path()>" },
      "rect()": {
        comment: "missed, https://drafts.csswg.org/css-shapes/#supported-basic-shapes",
        syntax: "rect( [ <length-percentage> | auto ]{4} [ round <'border-radius'> ]? )"
      },
      "xywh()": {
        comment: "missed, https://drafts.csswg.org/css-shapes/#supported-basic-shapes",
        syntax: "xywh( <length-percentage>{2} <length-percentage [0,∞]>{2} [ round <'border-radius'> ]? )"
      },
      "query-in-parens": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#container-rule",
        syntax: "( <container-condition> ) | ( <size-feature> ) | style( <style-query> ) | <general-enclosed>"
      },
      "size-feature": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#typedef-size-feature",
        syntax: "<mf-plain> | <mf-boolean> | <mf-range>"
      },
      "style-feature": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#typedef-style-feature",
        syntax: "<declaration>"
      },
      "style-query": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#container-rule",
        syntax: "<style-condition> | <style-feature>"
      },
      "style-condition": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#container-rule",
        syntax: "not <style-in-parens> | <style-in-parens> [ [ and <style-in-parens> ]* | [ or <style-in-parens> ]* ]"
      },
      "style-in-parens": {
        comment: "missed, https://drafts.csswg.org/css-contain-3/#container-rule",
        syntax: "( <style-condition> ) | ( <style-feature> ) | <general-enclosed>"
      },
      "-non-standard-display": { syntax: "-ms-inline-flexbox | -ms-grid | -ms-inline-grid | -webkit-flex | -webkit-inline-flex | -webkit-box | -webkit-inline-box | -moz-inline-stack | -moz-box | -moz-inline-box" },
      "inset-area": {
        syntax: "[ [ left | center | right | span-left | span-right | x-start | x-end | span-x-start | span-x-end | x-self-start | x-self-end | span-x-self-start | span-x-self-end | span-all ] || [ top | center | bottom | span-top | span-bottom | y-start | y-end | span-y-start | span-y-end | y-self-start | y-self-end | span-y-self-start | span-y-self-end | span-all ] | [ block-start | center | block-end | span-block-start | span-block-end | span-all ] || [ inline-start | center | inline-end | span-inline-start | span-inline-end | span-all ] | [ self-block-start | self-block-end | span-self-block-start | span-self-block-end | span-all ] || [ self-inline-start | self-inline-end | span-self-inline-start | span-self-inline-end | span-all ] | [ start | center | end | span-start | span-end | span-all ]{1,2} | [ self-start | center | self-end | span-self-start | span-self-end | span-all ]{1,2} ]",
        comment: "initial name for <position-area> before renamed",
        references: ["https://www.w3.org/TR/css-anchor-position-1/#inset-area"]
      },
      "position-area": {
        syntax: "[ [ left | center | right | span-left | span-right | x-start | x-end | span-x-start | span-x-end | x-self-start | x-self-end | span-x-self-start | span-x-self-end | span-all ] || [ top | center | bottom | span-top | span-bottom | y-start | y-end | span-y-start | span-y-end | y-self-start | y-self-end | span-y-self-start | span-y-self-end | span-all ] | [ block-start | center | block-end | span-block-start | span-block-end | span-all ] || [ inline-start | center | inline-end | span-inline-start | span-inline-end | span-all ] | [ self-block-start | center | self-block-end | span-self-block-start | span-self-block-end | span-all ] || [ self-inline-start | center | self-inline-end | span-self-inline-start | span-self-inline-end | span-all ] | [ start | center | end | span-start | span-end | span-all ]{1,2} | [ self-start | center | self-end | span-self-start | span-self-end | span-all ]{1,2} ]",
        comment: "replaced <inset-area>",
        references: ["https://drafts.csswg.org/css-anchor-position-1/#typedef-position-area"]
      },
      "anchor()": {
        syntax: "anchor( <anchor-element>? && <anchor-side>, <length-percentage>? )",
        comment: "missed",
        references: ["https://drafts.csswg.org/css-anchor-position-1/#anchor-pos"]
      },
      "anchor-side": { syntax: "inside | outside | top | left | right | bottom | start | end | self-start | self-end | <percentage> | center" },
      "anchor-size()": {
        syntax: "anchor-size( [ <anchor-element> || <anchor-size> ]? , <length-percentage>? )",
        comment: "missed",
        references: ["https://drafts.csswg.org/css-anchor-position-1/#funcdef-anchor-size"]
      },
      "anchor-size": { syntax: "width | height | block | inline | self-block | self-inline" },
      "anchor-element": {
        syntax: "<dashed-ident>",
        comment: "missed, https://drafts.csswg.org/css-anchor-position-1/#typedef-anchor-element"
      },
      "try-size": {
        syntax: "most-width | most-height | most-block-size | most-inline-size",
        comment: "missed, https://drafts.csswg.org/css-anchor-position-1/#typedef-try-size"
      },
      "try-tactic": {
        syntax: "flip-block || flip-inline || flip-start",
        comment: "missed, https://drafts.csswg.org/css-anchor-position-1/#typedef-position-try-fallbacks-try-tactic"
      },
      "font-variant-css2": {
        syntax: "normal | small-caps",
        comment: "new definition on font-4, https://drafts.csswg.org/css-fonts-4/#font-variant-css21-values"
      },
      "font-width-css3": {
        syntax: "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded",
        comment: "new definition on font-4, https://drafts.csswg.org/css-fonts-4/#font-width-css3-values"
      },
      "system-family-name": {
        syntax: "caption | icon | menu | message-box | small-caption | status-bar",
        comment: "new definition on font-4, https://drafts.csswg.org/css-fonts-4/#system-family-name-value"
      }
    }
  };
  data_patch_default = patch;
  mdnAtrules = {
    "@charset": {
      syntax: '@charset "<charset>";',
      groups: ["CSS Charsets"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@charset"
    },
    "@counter-style": {
      syntax: `@counter-style <counter-style-name> {
  [ system: <counter-system>; ] ||
  [ symbols: <counter-symbols>; ] ||
  [ additive-symbols: <additive-symbols>; ] ||
  [ negative: <negative-symbol>; ] ||
  [ prefix: <prefix>; ] ||
  [ suffix: <suffix>; ] ||
  [ range: <range>; ] ||
  [ pad: <padding>; ] ||
  [ speak-as: <speak-as>; ] ||
  [ fallback: <counter-style-name>; ]
}`,
      interfaces: ["CSSCounterStyleRule"],
      groups: ["CSS Counter Styles"],
      descriptors: {
        "additive-symbols": {
          syntax: "[ <integer> && <symbol> ]#",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        fallback: {
          syntax: "<counter-style-name>",
          media: "all",
          initial: "decimal",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        negative: {
          syntax: "<symbol> <symbol>?",
          media: "all",
          initial: '"-" hyphen-minus',
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        pad: {
          syntax: "<integer> && <symbol>",
          media: "all",
          initial: '0 ""',
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        prefix: {
          syntax: "<symbol>",
          media: "all",
          initial: '""',
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        range: {
          syntax: "[ [ <integer> | infinite ]{2} ]# | auto",
          media: "all",
          initial: "auto",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        "speak-as": {
          syntax: "auto | bullets | numbers | words | spell-out | <counter-style-name>",
          media: "all",
          initial: "auto",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        suffix: {
          syntax: "<symbol>",
          media: "all",
          initial: '". "',
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        symbols: {
          syntax: "<symbol>+",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        system: {
          syntax: "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
          media: "all",
          initial: "symbolic",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        }
      },
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
    },
    "@document": {
      syntax: `@document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# {
  <group-rule-body>
}`,
      interfaces: ["CSSGroupingRule", "CSSConditionRule"],
      groups: ["CSS Conditional Rules"],
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@document"
    },
    "@font-palette-values": {
      syntax: "@font-palette-values <dashed-ident> {  <declaration-list> }",
      groups: ["CSS Fonts"],
      descriptors: {
        "base-palette": {
          syntax: "light | dark | <integer [0,∞]>",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        "font-family": {
          syntax: "<family-name>#",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        "override-colors": {
          syntax: "[ <integer [0,∞]> <absolute-color-base> ]#",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        }
      },
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-palette-values"
    },
    "@font-face": {
      syntax: `@font-face {
  [ font-family: <family-name>; ] ||
  [ src: <src>; ] ||
  [ unicode-range: <unicode-range>; ] ||
  [ font-variant: <font-variant>; ] ||
  [ font-feature-settings: <font-feature-settings>; ] ||
  [ font-variation-settings: <font-variation-settings>; ] ||
  [ font-stretch: <font-stretch>; ] ||
  [ font-weight: <font-weight>; ] ||
  [ font-style: <font-style>; ] ||
  [ size-adjust: <size-adjust>; ] ||
  [ ascent-override: <ascent-override>; ] ||
  [ descent-override: <descent-override>; ] ||
  [ line-gap-override: <line-gap-override>; ]
}`,
      interfaces: ["CSSFontFaceRule"],
      groups: ["CSS Fonts"],
      descriptors: {
        "ascent-override": {
          syntax: "normal | <percentage>",
          media: "all",
          initial: "normal",
          percentages: "asSpecified",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "experimental"
        },
        "descent-override": {
          syntax: "normal | <percentage>",
          media: "all",
          initial: "normal",
          percentages: "asSpecified",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "experimental"
        },
        "font-display": {
          syntax: "[ auto | block | swap | fallback | optional ]",
          media: "visual",
          percentages: "no",
          initial: "auto",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "experimental"
        },
        "font-family": {
          syntax: "<family-name>",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        "font-feature-settings": {
          syntax: "normal | <feature-tag-value>#",
          media: "all",
          initial: "normal",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        "font-variation-settings": {
          syntax: "normal | [ <string> <number> ]#",
          media: "all",
          initial: "normal",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        "font-stretch": {
          syntax: "<font-stretch-absolute>{1,2}",
          media: "all",
          initial: "normal",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        "font-style": {
          syntax: "normal | italic | oblique <angle>{0,2}",
          media: "all",
          initial: "normal",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        "font-weight": {
          syntax: "<font-weight-absolute>{1,2}",
          media: "all",
          initial: "normal",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        "line-gap-override": {
          syntax: "normal | <percentage>",
          media: "all",
          initial: "normal",
          percentages: "asSpecified",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "experimental"
        },
        "size-adjust": {
          syntax: "<percentage>",
          media: "all",
          initial: "100%",
          percentages: "asSpecified",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "experimental"
        },
        src: {
          syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        "unicode-range": {
          syntax: "<unicode-range>#",
          media: "all",
          initial: "U+0-10FFFF",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        }
      },
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-face"
    },
    "@font-feature-values": {
      syntax: `@font-feature-values <family-name># {
  <feature-value-block-list>
}`,
      interfaces: ["CSSFontFeatureValuesRule"],
      groups: ["CSS Fonts"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
    },
    "@import": {
      syntax: `@import [ <string> | <url> ]
        [ layer | layer(<layer-name>) ]?
        [ supports( [ <supports-condition> | <declaration> ] ) ]?
        <media-query-list>? ;`,
      groups: ["CSS Conditional Rules", "Media Queries"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@import"
    },
    "@keyframes": {
      syntax: `@keyframes <keyframes-name> {
  <keyframe-block-list>
}`,
      interfaces: ["CSSKeyframeRule", "CSSKeyframesRule"],
      groups: ["CSS Animations"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
    },
    "@layer": {
      syntax: `@layer [ <layer-name># | <layer-name>?  {
  <stylesheet>
} ]`,
      interfaces: ["CSSLayerBlockRule", "CSSLayerStatementRule"],
      groups: ["CSS Cascading and Inheritance"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@layer"
    },
    "@media": {
      syntax: `@media <media-query-list> {
  <group-rule-body>
}`,
      interfaces: [
        "CSSGroupingRule",
        "CSSConditionRule",
        "CSSMediaRule",
        "CSSCustomMediaRule"
      ],
      groups: ["CSS Conditional Rules", "Media Queries"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@media"
    },
    "@namespace": {
      syntax: "@namespace <namespace-prefix>? [ <string> | <url> ];",
      groups: ["CSS Namespaces"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@namespace"
    },
    "@page": {
      syntax: `@page <page-selector-list> {
  <page-body>
}`,
      interfaces: ["CSSPageRule"],
      groups: ["CSS Pages"],
      descriptors: {
        bleed: {
          syntax: "auto | <length>",
          media: ["visual", "paged"],
          initial: "auto",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "standard"
        },
        marks: {
          syntax: "none | [ crop || cross ]",
          media: ["visual", "paged"],
          initial: "none",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        "page-orientation": {
          syntax: "upright | rotate-left | rotate-right ",
          media: ["visual", "paged"],
          initial: "upright",
          percentages: "no",
          computed: "asSpecified",
          order: "orderOfAppearance",
          status: "standard"
        },
        size: {
          syntax: "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
          media: ["visual", "paged"],
          initial: "auto",
          percentages: "no",
          computed: "asSpecifiedRelativeToAbsoluteLengths",
          order: "orderOfAppearance",
          status: "standard"
        }
      },
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@page"
    },
    "@position-try": {
      syntax: `@position-try <dashed-ident> {
  <declaration-list>
}`,
      interfaces: ["CSSPositionTryRule"],
      groups: ["CSS Positioning"],
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@position-try"
    },
    "@property": {
      syntax: `@property <custom-property-name> {
  <declaration-list>
}`,
      interfaces: ["CSS", "CSSPropertyRule"],
      groups: ["CSS Houdini"],
      descriptors: {
        syntax: {
          syntax: "<string>",
          media: "all",
          percentages: "no",
          initial: "n/a (required)",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "experimental"
        },
        inherits: {
          syntax: "true | false",
          media: "all",
          percentages: "no",
          initial: "auto",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "experimental"
        },
        "initial-value": {
          syntax: "<declaration-value>?",
          media: "all",
          initial: "n/a (required)",
          percentages: "no",
          computed: "asSpecified",
          order: "uniqueOrder",
          status: "experimental"
        }
      },
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@property"
    },
    "@scope": {
      syntax: `@scope [(<scope-start>)]? [to (<scope-end>)]? {
  <rule-list>
}`,
      groups: ["CSS Conditional Rules"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@scope"
    },
    "@starting-style": {
      syntax: `@starting-style {
  <declaration-list> | <group-rule-body>
}`,
      interfaces: ["CSSStartingStyleRule"],
      groups: ["CSS Animations"],
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@starting-style"
    },
    "@supports": {
      syntax: `@supports <supports-condition> {
  <group-rule-body>
}`,
      interfaces: [
        "CSSGroupingRule",
        "CSSConditionRule",
        "CSSSupportsRule"
      ],
      groups: ["CSS Conditional Rules"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@supports"
    }
  };
  mdnProperties = {
    "--*": {
      syntax: "<declaration-value>",
      media: "all",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Variables"],
      initial: "seeProse",
      appliesto: "allElements",
      computed: "asSpecifiedWithVarsSubstituted",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/--*"
    },
    "-ms-accelerator": {
      syntax: "false | true",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "false",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-accelerator"
    },
    "-ms-block-progression": {
      syntax: "tb | rl | bt | lr",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "tb",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-block-progression"
    },
    "-ms-content-zoom-chaining": {
      syntax: "none | chained",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "none",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-chaining"
    },
    "-ms-content-zooming": {
      syntax: "none | zoom",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "zoomForTheTopLevelNoneForTheRest",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zooming"
    },
    "-ms-content-zoom-limit": {
      syntax: "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: ["-ms-content-zoom-limit-max", "-ms-content-zoom-limit-min"],
      groups: ["Microsoft Extensions"],
      initial: ["-ms-content-zoom-limit-max", "-ms-content-zoom-limit-min"],
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: ["-ms-content-zoom-limit-max", "-ms-content-zoom-limit-min"],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit"
    },
    "-ms-content-zoom-limit-max": {
      syntax: "<percentage>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "maxZoomFactor",
      groups: ["Microsoft Extensions"],
      initial: "400%",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-max"
    },
    "-ms-content-zoom-limit-min": {
      syntax: "<percentage>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "minZoomFactor",
      groups: ["Microsoft Extensions"],
      initial: "100%",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-min"
    },
    "-ms-content-zoom-snap": {
      syntax: "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: ["-ms-content-zoom-snap-type", "-ms-content-zoom-snap-points"],
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: ["-ms-content-zoom-snap-type", "-ms-content-zoom-snap-points"],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap"
    },
    "-ms-content-zoom-snap-points": {
      syntax: "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "snapInterval(0%, 100%)",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-points"
    },
    "-ms-content-zoom-snap-type": {
      syntax: "none | proximity | mandatory",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "none",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-type"
    },
    "-ms-filter": {
      syntax: "<string>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: '""',
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-filter"
    },
    "-ms-flow-from": {
      syntax: "[ none | <custom-ident> ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "none",
      appliesto: "nonReplacedElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-from"
    },
    "-ms-flow-into": {
      syntax: "[ none | <custom-ident> ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "none",
      appliesto: "iframeElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into"
    },
    "-ms-grid-columns": {
      syntax: "none | <track-list> | <auto-track-list>",
      media: "visual",
      inherited: false,
      animationType: "simpleListOfLpcDifferenceLpc",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "none",
      appliesto: "gridContainers",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns"
    },
    "-ms-grid-rows": {
      syntax: "none | <track-list> | <auto-track-list>",
      media: "visual",
      inherited: false,
      animationType: "simpleListOfLpcDifferenceLpc",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "none",
      appliesto: "gridContainers",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows"
    },
    "-ms-high-contrast-adjust": {
      syntax: "auto | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-high-contrast-adjust"
    },
    "-ms-hyphenate-limit-chars": {
      syntax: "auto | <integer>{1,3}",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-chars"
    },
    "-ms-hyphenate-limit-lines": {
      syntax: "no-limit | <integer>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "no-limit",
      appliesto: "blockContainerElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-lines"
    },
    "-ms-hyphenate-limit-zone": {
      syntax: "<percentage> | <length>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "referToLineBoxWidth",
      groups: ["Microsoft Extensions"],
      initial: "0",
      appliesto: "blockContainerElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-zone"
    },
    "-ms-ime-align": {
      syntax: "auto | after",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-ime-align"
    },
    "-ms-overflow-style": {
      syntax: "auto | none | scrollbar | -ms-autohiding-scrollbar",
      media: "interactive",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-overflow-style"
    },
    "-ms-scrollbar-3dlight-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "dependsOnUserAgent",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-3dlight-color"
    },
    "-ms-scrollbar-arrow-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "ButtonText",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-arrow-color"
    },
    "-ms-scrollbar-base-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "dependsOnUserAgent",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-base-color"
    },
    "-ms-scrollbar-darkshadow-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "ThreeDDarkShadow",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-darkshadow-color"
    },
    "-ms-scrollbar-face-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "ThreeDFace",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-face-color"
    },
    "-ms-scrollbar-highlight-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "ThreeDHighlight",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-highlight-color"
    },
    "-ms-scrollbar-shadow-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "ThreeDDarkShadow",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-shadow-color"
    },
    "-ms-scrollbar-track-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "Scrollbar",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"
    },
    "-ms-scroll-chaining": {
      syntax: "chained | none",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "chained",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-chaining"
    },
    "-ms-scroll-limit": {
      syntax: "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: [
        "-ms-scroll-limit-x-min",
        "-ms-scroll-limit-y-min",
        "-ms-scroll-limit-x-max",
        "-ms-scroll-limit-y-max"
      ],
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: [
        "-ms-scroll-limit-x-min",
        "-ms-scroll-limit-y-min",
        "-ms-scroll-limit-x-max",
        "-ms-scroll-limit-y-max"
      ],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit"
    },
    "-ms-scroll-limit-x-max": {
      syntax: "auto | <length>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-max"
    },
    "-ms-scroll-limit-x-min": {
      syntax: "<length>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "0",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-min"
    },
    "-ms-scroll-limit-y-max": {
      syntax: "auto | <length>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-max"
    },
    "-ms-scroll-limit-y-min": {
      syntax: "<length>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "0",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-min"
    },
    "-ms-scroll-rails": {
      syntax: "none | railed",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "railed",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-rails"
    },
    "-ms-scroll-snap-points-x": {
      syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "snapInterval(0px, 100%)",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-x"
    },
    "-ms-scroll-snap-points-y": {
      syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "snapInterval(0px, 100%)",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-y"
    },
    "-ms-scroll-snap-type": {
      syntax: "none | proximity | mandatory",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "none",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-type"
    },
    "-ms-scroll-snap-x": {
      syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: ["-ms-scroll-snap-type", "-ms-scroll-snap-points-x"],
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: ["-ms-scroll-snap-type", "-ms-scroll-snap-points-x"],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-x"
    },
    "-ms-scroll-snap-y": {
      syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: ["-ms-scroll-snap-type", "-ms-scroll-snap-points-y"],
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: ["-ms-scroll-snap-type", "-ms-scroll-snap-points-y"],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-y"
    },
    "-ms-scroll-translation": {
      syntax: "none | vertical-to-horizontal",
      media: "interactive",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-translation"
    },
    "-ms-text-autospace": {
      syntax: "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-text-autospace"
    },
    "-ms-touch-select": {
      syntax: "grippers | none",
      media: "interactive",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "grippers",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-touch-select"
    },
    "-ms-user-select": {
      syntax: "none | element | text",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "text",
      appliesto: "nonReplacedElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-user-select"
    },
    "-ms-wrap-flow": {
      syntax: "auto | both | start | end | maximum | clear",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "auto",
      appliesto: "blockLevelElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-flow"
    },
    "-ms-wrap-margin": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "0",
      appliesto: "exclusionElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-margin"
    },
    "-ms-wrap-through": {
      syntax: "wrap | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "wrap",
      appliesto: "blockLevelElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-through"
    },
    "-moz-appearance": {
      syntax: "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "noneButOverriddenInUserAgentCSS",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
    },
    "-moz-binding": {
      syntax: "<url> | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElementsExceptGeneratedContentOrPseudoElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
    },
    "-moz-border-bottom-colors": {
      syntax: "<color>+ | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"
    },
    "-moz-border-left-colors": {
      syntax: "<color>+ | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"
    },
    "-moz-border-right-colors": {
      syntax: "<color>+ | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"
    },
    "-moz-border-top-colors": {
      syntax: "<color>+ | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"
    },
    "-moz-context-properties": {
      syntax: "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElementsThatCanReferenceImages",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
    },
    "-moz-float-edge": {
      syntax: "border-box | content-box | margin-box | padding-box",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "content-box",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
    },
    "-moz-force-broken-image-icon": {
      syntax: "0 | 1",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "0",
      appliesto: "images",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"
    },
    "-moz-image-region": {
      syntax: "<shape> | auto",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "auto",
      appliesto: "xulImageElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
    },
    "-moz-orient": {
      syntax: "inline | block | horizontal | vertical",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "inline",
      appliesto: "anyElementEffectOnProgressAndMeter",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
    },
    "-moz-outline-radius": {
      syntax: "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
      media: "visual",
      inherited: false,
      animationType: [
        "-moz-outline-radius-topleft",
        "-moz-outline-radius-topright",
        "-moz-outline-radius-bottomright",
        "-moz-outline-radius-bottomleft"
      ],
      percentages: [
        "-moz-outline-radius-topleft",
        "-moz-outline-radius-topright",
        "-moz-outline-radius-bottomright",
        "-moz-outline-radius-bottomleft"
      ],
      groups: ["Mozilla Extensions"],
      initial: [
        "-moz-outline-radius-topleft",
        "-moz-outline-radius-topright",
        "-moz-outline-radius-bottomright",
        "-moz-outline-radius-bottomleft"
      ],
      appliesto: "allElements",
      computed: [
        "-moz-outline-radius-topleft",
        "-moz-outline-radius-topright",
        "-moz-outline-radius-bottomright",
        "-moz-outline-radius-bottomleft"
      ],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
    },
    "-moz-outline-radius-bottomleft": {
      syntax: "<outline-radius>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["Mozilla Extensions"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"
    },
    "-moz-outline-radius-bottomright": {
      syntax: "<outline-radius>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["Mozilla Extensions"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"
    },
    "-moz-outline-radius-topleft": {
      syntax: "<outline-radius>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["Mozilla Extensions"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"
    },
    "-moz-outline-radius-topright": {
      syntax: "<outline-radius>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["Mozilla Extensions"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"
    },
    "-moz-stack-sizing": {
      syntax: "ignore | stretch-to-fit",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "stretch-to-fit",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-stack-sizing"
    },
    "-moz-text-blink": {
      syntax: "none | blink",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"
    },
    "-moz-user-focus": {
      syntax: "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
    },
    "-moz-user-input": {
      syntax: "auto | none | enabled | disabled",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
    },
    "-moz-user-modify": {
      syntax: "read-only | read-write | write-only",
      media: "interactive",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "read-only",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-modify"
    },
    "-moz-window-dragging": {
      syntax: "drag | no-drag",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "drag",
      appliesto: "allElementsCreatingNativeWindows",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-dragging"
    },
    "-moz-window-shadow": {
      syntax: "default | menu | tooltip | sheet | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "default",
      appliesto: "allElementsCreatingNativeWindows",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"
    },
    "-webkit-appearance": {
      syntax: "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "noneButOverriddenInUserAgentCSS",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
    },
    "-webkit-border-before": {
      syntax: "<'border-width'> || <'border-style'> || <color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: ["-webkit-border-before-width"],
      groups: ["WebKit Extensions"],
      initial: [
        "border-width",
        "border-style",
        "color"
      ],
      appliesto: "allElements",
      computed: [
        "border-width",
        "border-style",
        "color"
      ],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
    },
    "-webkit-border-before-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "nonstandard"
    },
    "-webkit-border-before-style": {
      syntax: "<'border-style'>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard"
    },
    "-webkit-border-before-width": {
      syntax: "<'border-width'>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["WebKit Extensions"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
      order: "uniqueOrder",
      status: "nonstandard"
    },
    "-webkit-box-reflect": {
      syntax: "[ above | below | right | left ]? <length>? <image>?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
    },
    "-webkit-line-clamp": {
      syntax: "none | <integer>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["WebKit Extensions", "CSS Overflow"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
    },
    "-webkit-mask": {
      syntax: "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: [
        "-webkit-mask-image",
        "-webkit-mask-repeat",
        "-webkit-mask-attachment",
        "-webkit-mask-position",
        "-webkit-mask-origin",
        "-webkit-mask-clip"
      ],
      appliesto: "allElements",
      computed: [
        "-webkit-mask-image",
        "-webkit-mask-repeat",
        "-webkit-mask-attachment",
        "-webkit-mask-position",
        "-webkit-mask-origin",
        "-webkit-mask-clip"
      ],
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
    },
    "-webkit-mask-attachment": {
      syntax: "<attachment>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "scroll",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
    },
    "-webkit-mask-clip": {
      syntax: "[ <box> | border | padding | content | text ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "border",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
    },
    "-webkit-mask-composite": {
      syntax: "<composite-style>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "source-over",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
    },
    "-webkit-mask-image": {
      syntax: "<mask-reference>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "none",
      appliesto: "allElements",
      computed: "absoluteURIOrNone",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
    },
    "-webkit-mask-origin": {
      syntax: "[ <box> | border | padding | content ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "padding",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
    },
    "-webkit-mask-position": {
      syntax: "<position>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "referToSizeOfElement",
      groups: ["WebKit Extensions"],
      initial: "0% 0%",
      appliesto: "allElements",
      computed: "absoluteLengthOrPercentage",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
    },
    "-webkit-mask-position-x": {
      syntax: "[ <length-percentage> | left | center | right ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "referToSizeOfElement",
      groups: ["WebKit Extensions"],
      initial: "0%",
      appliesto: "allElements",
      computed: "absoluteLengthOrPercentage",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
    },
    "-webkit-mask-position-y": {
      syntax: "[ <length-percentage> | top | center | bottom ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "referToSizeOfElement",
      groups: ["WebKit Extensions"],
      initial: "0%",
      appliesto: "allElements",
      computed: "absoluteLengthOrPercentage",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
    },
    "-webkit-mask-repeat": {
      syntax: "<repeat-style>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "repeat",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
    },
    "-webkit-mask-repeat-x": {
      syntax: "repeat | no-repeat | space | round",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "repeat",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
    },
    "-webkit-mask-repeat-y": {
      syntax: "repeat | no-repeat | space | round",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "repeat",
      appliesto: "allElements",
      computed: "absoluteLengthOrPercentage",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
    },
    "-webkit-mask-size": {
      syntax: "<bg-size>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "relativeToBackgroundPositioningArea",
      groups: ["WebKit Extensions"],
      initial: "auto auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
    },
    "-webkit-overflow-scrolling": {
      syntax: "auto | touch",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "auto",
      appliesto: "scrollingBoxes",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
    },
    "-webkit-tap-highlight-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "black",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"
    },
    "-webkit-text-fill-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "color",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
    },
    "-webkit-text-stroke": {
      syntax: "<length> || <color>",
      media: "visual",
      inherited: true,
      animationType: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
      appliesto: "allElements",
      computed: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
      order: "canonicalOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
    },
    "-webkit-text-stroke-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "color",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
    },
    "-webkit-text-stroke-width": {
      syntax: "<length>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "0",
      appliesto: "allElements",
      computed: "absoluteLength",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
    },
    "-webkit-touch-callout": {
      syntax: "default | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "default",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
    },
    "-webkit-user-modify": {
      syntax: "read-only | read-write | read-write-plaintext-only",
      media: "interactive",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["WebKit Extensions"],
      initial: "read-only",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard"
    },
    "accent-color": {
      syntax: "auto | <color>",
      media: "interactive",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asAutoOrColor",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/accent-color"
    },
    "align-content": {
      syntax: "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: "normal",
      appliesto: "blockContainersMultiColumnContainersFlexContainersGridContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-content"
    },
    "align-items": {
      syntax: "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-items"
    },
    "align-self": {
      syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: "auto",
      appliesto: "flexItemsGridItemsAndAbsolutelyPositionedBoxes",
      computed: "autoOnAbsolutelyPositionedElementsValueOfAlignItemsOnParent",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-self"
    },
    "align-tracks": {
      syntax: "[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "normal",
      appliesto: "gridContainersWithMasonryLayoutInTheirBlockAxis",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-tracks"
    },
    all: {
      syntax: "initial | inherit | unset | revert | revert-layer",
      media: "noPracticalMedia",
      inherited: false,
      animationType: "eachOfShorthandPropertiesExceptUnicodeBiDiAndDirection",
      percentages: "no",
      groups: ["CSS Miscellaneous"],
      initial: "noPracticalInitialValue",
      appliesto: "allElements",
      computed: "asSpecifiedAppliesToEachProperty",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/all"
    },
    "anchor-name": {
      syntax: "none | <dashed-ident>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "none",
      appliesto: "allElementsThatGenerateAPrincipalBox",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/anchor-name"
    },
    "anchor-scope": {
      syntax: "none | all | <dashed-ident>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/anchor-scope"
    },
    animation: {
      syntax: "<single-animation>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: [
        "animation-name",
        "animation-duration",
        "animation-timing-function",
        "animation-delay",
        "animation-iteration-count",
        "animation-direction",
        "animation-fill-mode",
        "animation-play-state",
        "animation-timeline"
      ],
      appliesto: "allElements",
      computed: [
        "animation-name",
        "animation-duration",
        "animation-timing-function",
        "animation-delay",
        "animation-direction",
        "animation-iteration-count",
        "animation-fill-mode",
        "animation-play-state",
        "animation-timeline"
      ],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation"
    },
    "animation-composition": {
      syntax: "<single-animation-composition>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "replace",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-composition"
    },
    "animation-delay": {
      syntax: "<time>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "0s",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
    },
    "animation-direction": {
      syntax: "<single-animation-direction>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "normal",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
    },
    "animation-duration": {
      syntax: "<time>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "0s",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
    },
    "animation-fill-mode": {
      syntax: "<single-animation-fill-mode>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "none",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
    },
    "animation-iteration-count": {
      syntax: "<single-animation-iteration-count>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "1",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
    },
    "animation-name": {
      syntax: "[ none | <keyframes-name> ]#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "none",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-name"
    },
    "animation-play-state": {
      syntax: "<single-animation-play-state>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "running",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
    },
    "animation-range": {
      syntax: "[ <'animation-range-start'> <'animation-range-end'>? ]#",
      media: "visual",
      inherited: false,
      animationType: ["animation-range-start", "animation-range-end"],
      percentages: "relativeToTimelineRangeIfSpecifiedOtherwiseEntireTimeline",
      groups: ["CSS Animations"],
      initial: ["animation-range-start", "animation-range-end"],
      appliesto: "allElements",
      computed: ["animation-range-start", "animation-range-end"],
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-range"
    },
    "animation-range-end": {
      syntax: "[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "relativeToTimelineRangeIfSpecifiedOtherwiseEntireTimeline",
      groups: ["CSS Animations"],
      initial: "normal",
      appliesto: "allElements",
      computed: "listEachItemConsistingOfNormalLengthPercentageOrNameLengthPercentage",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-range-end"
    },
    "animation-range-start": {
      syntax: "[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "relativeToTimelineRangeIfSpecifiedOtherwiseEntireTimeline",
      groups: ["CSS Animations"],
      initial: "normal",
      appliesto: "allElements",
      computed: "listEachItemConsistingOfNormalLengthPercentageOrNameLengthPercentage",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-range-start"
    },
    "animation-timing-function": {
      syntax: "<easing-function>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "ease",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
    },
    "animation-timeline": {
      syntax: "<single-animation-timeline>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "auto",
      appliesto: "allElements",
      computed: "listEachItemIdentifierOrNoneAuto",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-timeline"
    },
    appearance: {
      syntax: "none | auto | textfield | menulist-button | <compat-auto>",
      media: "all",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
    },
    "aspect-ratio": {
      syntax: "auto || <ratio>",
      media: "all",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "allElementsExceptInlineBoxesAndInternalRubyOrTableBoxes",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
    },
    azimuth: {
      syntax: "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
      media: "aural",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Speech"],
      initial: "center",
      appliesto: "allElements",
      computed: "normalizedAngle",
      order: "orderOfAppearance",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/azimuth"
    },
    "backdrop-filter": {
      syntax: "none | <filter-function-list>",
      media: "visual",
      inherited: false,
      animationType: "filterList",
      percentages: "no",
      groups: ["Filter Effects"],
      initial: "none",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
    },
    "backface-visibility": {
      syntax: "visible | hidden",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Transforms"],
      initial: "visible",
      appliesto: "transformableElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
    },
    background: {
      syntax: "[ <bg-layer> , ]* <final-bg-layer>",
      media: "visual",
      inherited: false,
      animationType: [
        "background-color",
        "background-image",
        "background-clip",
        "background-position",
        "background-size",
        "background-repeat",
        "background-attachment"
      ],
      percentages: ["background-position", "background-size"],
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "background-image",
        "background-position",
        "background-size",
        "background-repeat",
        "background-origin",
        "background-clip",
        "background-attachment",
        "background-color"
      ],
      appliesto: "allElements",
      computed: [
        "background-image",
        "background-position",
        "background-size",
        "background-repeat",
        "background-origin",
        "background-clip",
        "background-attachment",
        "background-color"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background"
    },
    "background-attachment": {
      syntax: "<attachment>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "scroll",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
    },
    "background-blend-mode": {
      syntax: "<blend-mode>#",
      media: "none",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["Compositing and Blending"],
      initial: "normal",
      appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
    },
    "background-clip": {
      syntax: "<box>#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "border-box",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-clip"
    },
    "background-color": {
      syntax: "<color>",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "transparent",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-color"
    },
    "background-image": {
      syntax: "<bg-image>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecifiedURLsAbsolute",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-image"
    },
    "background-origin": {
      syntax: "<box>#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "padding-box",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-origin"
    },
    "background-position": {
      syntax: "<bg-position>#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "referToSizeOfBackgroundPositioningAreaMinusBackgroundImageSize",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0% 0%",
      appliesto: "allElements",
      computed: ["background-position-x", "background-position-y"],
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position"
    },
    "background-position-x": {
      syntax: "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "referToWidthOfBackgroundPositioningAreaMinusBackgroundImageWidth",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0%",
      appliesto: "allElements",
      computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
    },
    "background-position-y": {
      syntax: "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "referToHeightOfBackgroundPositioningAreaMinusBackgroundImageHeight",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0%",
      appliesto: "allElements",
      computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
    },
    "background-repeat": {
      syntax: "<repeat-style>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "repeat",
      appliesto: "allElements",
      computed: "listEachItemHasTwoKeywordsOnePerDimension",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
    },
    "background-size": {
      syntax: "<bg-size>#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "relativeToBackgroundPositioningArea",
      groups: ["CSS Backgrounds and Borders"],
      initial: "auto auto",
      appliesto: "allElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-size"
    },
    "block-size": {
      syntax: "<'width'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "blockSizeOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "auto",
      appliesto: "sameAsWidthAndHeight",
      computed: "sameAsWidthAndHeight",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/block-size"
    },
    border: {
      syntax: "<line-width> || <line-style> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-width",
        "border-style",
        "border-color"
      ],
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-width",
        "border-style",
        "border-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-width",
        "border-style",
        "border-color"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border"
    },
    "border-block": {
      syntax: "<'border-top-width'> || <'border-top-style'> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-block-width",
        "border-block-style",
        "border-block-color"
      ],
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: [
        "border-block-width",
        "border-block-style",
        "border-block-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-block-width",
        "border-block-style",
        "border-block-color"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block"
    },
    "border-block-color": {
      syntax: "<'border-top-color'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
    },
    "border-block-style": {
      syntax: "<'border-top-style'>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
    },
    "border-block-width": {
      syntax: "<'border-top-width'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
    },
    "border-block-end": {
      syntax: "<'border-top-width'> || <'border-top-style'> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-block-end-color",
        "border-block-end-style",
        "border-block-end-width"
      ],
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: [
        "border-top-width",
        "border-top-style",
        "border-top-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-top-width",
        "border-top-style",
        "border-top-color"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
    },
    "border-block-end-color": {
      syntax: "<'border-top-color'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
    },
    "border-block-end-style": {
      syntax: "<'border-top-style'>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
    },
    "border-block-end-width": {
      syntax: "<'border-top-width'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
    },
    "border-block-start": {
      syntax: "<'border-top-width'> || <'border-top-style'> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-block-start-color",
        "border-block-start-style",
        "border-block-start-width"
      ],
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: [
        "border-width",
        "border-style",
        "color"
      ],
      appliesto: "allElements",
      computed: [
        "border-width",
        "border-style",
        "border-block-start-color"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
    },
    "border-block-start-color": {
      syntax: "<'border-top-color'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
    },
    "border-block-start-style": {
      syntax: "<'border-top-style'>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
    },
    "border-block-start-width": {
      syntax: "<'border-top-width'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
    },
    "border-bottom": {
      syntax: "<line-width> || <line-style> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-bottom-color",
        "border-bottom-style",
        "border-bottom-width"
      ],
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-bottom-width",
        "border-bottom-style",
        "border-bottom-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-bottom-width",
        "border-bottom-style",
        "border-bottom-color"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
    },
    "border-bottom-color": {
      syntax: "<'border-top-color'>",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
    },
    "border-bottom-left-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
    },
    "border-bottom-right-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
    },
    "border-bottom-style": {
      syntax: "<line-style>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
    },
    "border-bottom-width": {
      syntax: "<line-width>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthOr0IfBorderBottomStyleNoneOrHidden",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
    },
    "border-collapse": {
      syntax: "collapse | separate",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Table"],
      initial: "separate",
      appliesto: "tableElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
    },
    "border-color": {
      syntax: "<color>{1,4}",
      media: "visual",
      inherited: false,
      animationType: [
        "border-bottom-color",
        "border-left-color",
        "border-right-color",
        "border-top-color"
      ],
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-top-color",
        "border-right-color",
        "border-bottom-color",
        "border-left-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-bottom-color",
        "border-left-color",
        "border-right-color",
        "border-top-color"
      ],
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-color"
    },
    "border-end-end-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
    },
    "border-end-start-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
    },
    "border-image": {
      syntax: "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-image-outset",
        "border-image-repeat",
        "border-image-slice",
        "border-image-source",
        "border-image-width"
      ],
      percentages: ["border-image-slice", "border-image-width"],
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-image-source",
        "border-image-slice",
        "border-image-width",
        "border-image-outset",
        "border-image-repeat"
      ],
      appliesto: "allElementsExceptTableElementsWhenCollapse",
      computed: [
        "border-image-outset",
        "border-image-repeat",
        "border-image-slice",
        "border-image-source",
        "border-image-width"
      ],
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image"
    },
    "border-image-outset": {
      syntax: "[ <length> | <number> ]{1,4}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0",
      appliesto: "allElementsExceptTableElementsWhenCollapse",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
    },
    "border-image-repeat": {
      syntax: "[ stretch | repeat | round | space ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "stretch",
      appliesto: "allElementsExceptTableElementsWhenCollapse",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
    },
    "border-image-slice": {
      syntax: "<number-percentage>{1,4} && fill?",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSizeOfBorderImage",
      groups: ["CSS Backgrounds and Borders"],
      initial: "100%",
      appliesto: "allElementsExceptTableElementsWhenCollapse",
      computed: "oneToFourPercentagesOrAbsoluteLengthsPlusFill",
      order: "percentagesOrLengthsFollowedByFill",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
    },
    "border-image-source": {
      syntax: "none | <image>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "none",
      appliesto: "allElementsExceptTableElementsWhenCollapse",
      computed: "noneOrImageWithAbsoluteURI",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
    },
    "border-image-width": {
      syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToWidthOrHeightOfBorderImageArea",
      groups: ["CSS Backgrounds and Borders"],
      initial: "1",
      appliesto: "allElementsExceptTableElementsWhenCollapse",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
    },
    "border-inline": {
      syntax: "<'border-top-width'> || <'border-top-style'> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-inline-color",
        "border-inline-style",
        "border-inline-width"
      ],
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: [
        "border-inline-width",
        "border-inline-style",
        "border-inline-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-inline-width",
        "border-inline-style",
        "border-inline-color"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline"
    },
    "border-inline-end": {
      syntax: "<'border-top-width'> || <'border-top-style'> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-inline-end-color",
        "border-inline-end-style",
        "border-inline-end-width"
      ],
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: [
        "border-width",
        "border-style",
        "color"
      ],
      appliesto: "allElements",
      computed: [
        "border-width",
        "border-style",
        "border-inline-end-color"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
    },
    "border-inline-color": {
      syntax: "<'border-top-color'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
    },
    "border-inline-style": {
      syntax: "<'border-top-style'>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
    },
    "border-inline-width": {
      syntax: "<'border-top-width'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
    },
    "border-inline-end-color": {
      syntax: "<'border-top-color'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
    },
    "border-inline-end-style": {
      syntax: "<'border-top-style'>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
    },
    "border-inline-end-width": {
      syntax: "<'border-top-width'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
    },
    "border-inline-start": {
      syntax: "<'border-top-width'> || <'border-top-style'> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-inline-start-color",
        "border-inline-start-style",
        "border-inline-start-width"
      ],
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: [
        "border-width",
        "border-style",
        "color"
      ],
      appliesto: "allElements",
      computed: [
        "border-width",
        "border-style",
        "border-inline-start-color"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
    },
    "border-inline-start-color": {
      syntax: "<'border-top-color'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
    },
    "border-inline-start-style": {
      syntax: "<'border-top-style'>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
    },
    "border-inline-start-width": {
      syntax: "<'border-top-width'>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
    },
    "border-left": {
      syntax: "<line-width> || <line-style> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-left-color",
        "border-left-style",
        "border-left-width"
      ],
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-left-width",
        "border-left-style",
        "border-left-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-left-width",
        "border-left-style",
        "border-left-color"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left"
    },
    "border-left-color": {
      syntax: "<color>",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
    },
    "border-left-style": {
      syntax: "<line-style>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
    },
    "border-left-width": {
      syntax: "<line-width>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthOr0IfBorderLeftStyleNoneOrHidden",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
    },
    "border-radius": {
      syntax: "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
      media: "visual",
      inherited: false,
      animationType: [
        "border-top-left-radius",
        "border-top-right-radius",
        "border-bottom-right-radius",
        "border-bottom-left-radius"
      ],
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-top-left-radius",
        "border-top-right-radius",
        "border-bottom-right-radius",
        "border-bottom-left-radius"
      ],
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: [
        "border-bottom-left-radius",
        "border-bottom-right-radius",
        "border-top-left-radius",
        "border-top-right-radius"
      ],
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-radius"
    },
    "border-right": {
      syntax: "<line-width> || <line-style> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-right-color",
        "border-right-style",
        "border-right-width"
      ],
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-right-width",
        "border-right-style",
        "border-right-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-right-width",
        "border-right-style",
        "border-right-color"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right"
    },
    "border-right-color": {
      syntax: "<color>",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
    },
    "border-right-style": {
      syntax: "<line-style>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
    },
    "border-right-width": {
      syntax: "<line-width>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthOr0IfBorderRightStyleNoneOrHidden",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
    },
    "border-spacing": {
      syntax: "<length> <length>?",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Table"],
      initial: "0",
      appliesto: "tableElements",
      computed: "twoAbsoluteLengths",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
    },
    "border-start-end-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
    },
    "border-start-start-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
    },
    "border-style": {
      syntax: "<line-style>{1,4}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-top-style",
        "border-right-style",
        "border-bottom-style",
        "border-left-style"
      ],
      appliesto: "allElements",
      computed: [
        "border-bottom-style",
        "border-left-style",
        "border-right-style",
        "border-top-style"
      ],
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-style"
    },
    "border-top": {
      syntax: "<line-width> || <line-style> || <color>",
      media: "visual",
      inherited: false,
      animationType: [
        "border-top-color",
        "border-top-style",
        "border-top-width"
      ],
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-top-width",
        "border-top-style",
        "border-top-color"
      ],
      appliesto: "allElements",
      computed: [
        "border-top-width",
        "border-top-style",
        "border-top-color"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top"
    },
    "border-top-color": {
      syntax: "<color>",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
    },
    "border-top-left-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
    },
    "border-top-right-radius": {
      syntax: "<length-percentage>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfBorderBox",
      groups: ["CSS Backgrounds and Borders"],
      initial: "0",
      appliesto: "allElementsUAsNotRequiredWhenCollapse",
      computed: "twoAbsoluteLengthOrPercentages",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
    },
    "border-top-style": {
      syntax: "<line-style>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
    },
    "border-top-width": {
      syntax: "<line-width>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLengthOr0IfBorderTopStyleNoneOrHidden",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
    },
    "border-width": {
      syntax: "<line-width>{1,4}",
      media: "visual",
      inherited: false,
      animationType: [
        "border-bottom-width",
        "border-left-width",
        "border-right-width",
        "border-top-width"
      ],
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: [
        "border-top-width",
        "border-right-width",
        "border-bottom-width",
        "border-left-width"
      ],
      appliesto: "allElements",
      computed: [
        "border-bottom-width",
        "border-left-width",
        "border-right-width",
        "border-top-width"
      ],
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-width"
    },
    bottom: {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToContainingBlockHeight",
      groups: ["CSS Positioning"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/bottom"
    },
    "box-align": {
      syntax: "start | center | end | baseline | stretch",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "stretch",
      appliesto: "elementsWithDisplayBoxOrInlineBox",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-align"
    },
    "box-decoration-break": {
      syntax: "slice | clone",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fragmentation"],
      initial: "slice",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
    },
    "box-direction": {
      syntax: "normal | reverse | inherit",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "normal",
      appliesto: "elementsWithDisplayBoxOrInlineBox",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-direction"
    },
    "box-flex": {
      syntax: "<number>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "0",
      appliesto: "directChildrenOfElementsWithDisplayMozBoxMozInlineBox",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex"
    },
    "box-flex-group": {
      syntax: "<integer>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "1",
      appliesto: "inFlowChildrenOfBoxElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
    },
    "box-lines": {
      syntax: "single | multiple",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "single",
      appliesto: "boxElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-lines"
    },
    "box-ordinal-group": {
      syntax: "<integer>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "1",
      appliesto: "childrenOfBoxElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
    },
    "box-orient": {
      syntax: "horizontal | vertical | inline-axis | block-axis | inherit",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "inlineAxisHorizontalInXUL",
      appliesto: "elementsWithDisplayBoxOrInlineBox",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-orient"
    },
    "box-pack": {
      syntax: "start | center | end | justify",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions", "WebKit Extensions"],
      initial: "start",
      appliesto: "elementsWithDisplayMozBoxMozInlineBox",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-pack"
    },
    "box-shadow": {
      syntax: "none | <shadow>#",
      media: "visual",
      inherited: false,
      animationType: "shadowList",
      percentages: "no",
      groups: ["CSS Backgrounds and Borders"],
      initial: "none",
      appliesto: "allElements",
      computed: "absoluteLengthsSpecifiedColorAsSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
    },
    "box-sizing": {
      syntax: "content-box | border-box",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "content-box",
      appliesto: "allElementsAcceptingWidthOrHeight",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
    },
    "break-after": {
      syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fragmentation"],
      initial: "auto",
      appliesto: "blockLevelElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-after"
    },
    "break-before": {
      syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fragmentation"],
      initial: "auto",
      appliesto: "blockLevelElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-before"
    },
    "break-inside": {
      syntax: "auto | avoid | avoid-page | avoid-column | avoid-region",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fragmentation"],
      initial: "auto",
      appliesto: "blockLevelElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-inside"
    },
    "caption-side": {
      syntax: "top | bottom | block-start | block-end | inline-start | inline-end",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Table"],
      initial: "top",
      appliesto: "tableCaptionElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caption-side"
    },
    caret: {
      syntax: "<'caret-color'> || <'caret-shape'>",
      media: "interactive",
      inherited: true,
      animationType: ["caret-color", "caret-shape"],
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: ["caret-color", "caret-shape"],
      appliesto: "elementsThatAcceptInput",
      computed: ["caret-color", "caret-shape"],
      order: "perGrammar",
      status: "standard"
    },
    "caret-color": {
      syntax: "auto | <color>",
      media: "interactive",
      inherited: true,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asAutoOrColor",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caret-color"
    },
    "caret-shape": {
      syntax: "auto | bar | block | underscore",
      media: "interactive",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "elementsThatAcceptInput",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard"
    },
    clear: {
      syntax: "none | left | right | both | inline-start | inline-end",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "none",
      appliesto: "blockLevelElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clear"
    },
    clip: {
      syntax: "<shape> | auto",
      media: "visual",
      inherited: false,
      animationType: "rectangle",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "auto",
      appliesto: "absolutelyPositionedElements",
      computed: "autoOrRectangle",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip"
    },
    "clip-path": {
      syntax: "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
      media: "visual",
      inherited: false,
      animationType: "basicShapeOtherwiseNo",
      percentages: "referToReferenceBoxWhenSpecifiedOtherwiseBorderBox",
      groups: ["CSS Masking"],
      initial: "none",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecifiedURLsAbsolute",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip-path"
    },
    "clip-rule": {
      syntax: "nonzero | evenodd",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "nonzero",
      appliesto: "limitedSVGElementsGraphics",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip-rule"
    },
    color: {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Color"],
      initial: "canvastext",
      appliesto: "allElementsAndText",
      computed: "computedColor",
      order: "perGrammar",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color"
    },
    "color-interpolation-filters": {
      syntax: "auto | sRGB | linearRGB",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "linearRGB",
      appliesto: "limitedSVGElementsFilterPrimitives",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip-rule"
    },
    "color-scheme": {
      syntax: "normal | [ light | dark | <custom-ident> ]+ && only?",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Color"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color-scheme"
    },
    "column-count": {
      syntax: "<integer> | auto",
      media: "visual",
      inherited: false,
      animationType: "integer",
      percentages: "no",
      groups: ["CSS Columns"],
      initial: "auto",
      appliesto: "blockContainersExceptTableWrappers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-count"
    },
    "column-fill": {
      syntax: "auto | balance",
      media: "visualInContinuousMediaNoEffectInOverflowColumns",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Columns"],
      initial: "balance",
      appliesto: "multicolElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-fill"
    },
    "column-gap": {
      syntax: "normal | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Box Alignment"],
      initial: "normal",
      appliesto: "multiColumnElementsFlexContainersGridContainers",
      computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
    },
    "column-rule": {
      syntax: "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
      media: "visual",
      inherited: false,
      animationType: [
        "column-rule-color",
        "column-rule-style",
        "column-rule-width"
      ],
      percentages: "no",
      groups: ["CSS Columns"],
      initial: [
        "column-rule-width",
        "column-rule-style",
        "column-rule-color"
      ],
      appliesto: "multicolElements",
      computed: [
        "column-rule-color",
        "column-rule-style",
        "column-rule-width"
      ],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule"
    },
    "column-rule-color": {
      syntax: "<color>",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Columns"],
      initial: "currentcolor",
      appliesto: "multicolElements",
      computed: "computedColor",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
    },
    "column-rule-style": {
      syntax: "<'border-style'>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Columns"],
      initial: "none",
      appliesto: "multicolElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
    },
    "column-rule-width": {
      syntax: "<'border-width'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Columns"],
      initial: "medium",
      appliesto: "multicolElements",
      computed: "absoluteLength0IfColumnRuleStyleNoneOrHidden",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
    },
    "column-span": {
      syntax: "none | all",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Columns"],
      initial: "none",
      appliesto: "inFlowBlockLevelElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-span"
    },
    "column-width": {
      syntax: "<length> | auto",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Columns"],
      initial: "auto",
      appliesto: "blockContainersExceptTableWrappers",
      computed: "absoluteLengthZeroOrLarger",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-width"
    },
    columns: {
      syntax: "<'column-width'> || <'column-count'>",
      media: "visual",
      inherited: false,
      animationType: ["column-width", "column-count"],
      percentages: "no",
      groups: ["CSS Columns"],
      initial: ["column-width", "column-count"],
      appliesto: "blockContainersExceptTableWrappers",
      computed: ["column-width", "column-count"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/columns"
    },
    contain: {
      syntax: "none | strict | content | [ [ size || inline-size ] || layout || style || paint ]",
      media: "all",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain"
    },
    "contain-intrinsic-size": {
      syntax: "[ auto? [ none | <length> ] ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: ["contain-intrinsic-width", "contain-intrinsic-height"],
      percentages: ["contain-intrinsic-width", "contain-intrinsic-height"],
      groups: ["CSS Containment"],
      initial: ["contain-intrinsic-width", "contain-intrinsic-height"],
      appliesto: "elementsForWhichSizeContainmentCanApply",
      computed: ["contain-intrinsic-width", "contain-intrinsic-height"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size"
    },
    "contain-intrinsic-block-size": {
      syntax: "auto? [ none | <length> ]",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "none",
      appliesto: "elementsForWhichSizeContainmentCanApply",
      computed: "asSpecifiedWithLengthValuesComputed",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size"
    },
    "contain-intrinsic-height": {
      syntax: "auto? [ none | <length> ]",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "none",
      appliesto: "elementsForWhichSizeContainmentCanApply",
      computed: "asSpecifiedWithLengthValuesComputed",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height"
    },
    "contain-intrinsic-inline-size": {
      syntax: "auto? [ none | <length> ]",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "none",
      appliesto: "elementsForWhichSizeContainmentCanApply",
      computed: "asSpecifiedWithLengthValuesComputed",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size"
    },
    "contain-intrinsic-width": {
      syntax: "auto? [ none | <length> ]",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "none",
      appliesto: "elementsForWhichSizeContainmentCanApply",
      computed: "asSpecifiedWithLengthValuesComputed",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width"
    },
    container: {
      syntax: "<'container-name'> [ / <'container-type'> ]?",
      media: "visual",
      inherited: false,
      animationType: ["container-name", "container-type"],
      percentages: ["container-name", "container-type"],
      groups: ["CSS Containment"],
      initial: ["container-name", "container-type"],
      appliesto: "allElements",
      computed: ["container-name", "container-type"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/container"
    },
    "container-name": {
      syntax: "none | <custom-ident>+",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "none",
      appliesto: "allElements",
      computed: "noneOrOrderedListOfIdentifiers",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/container-name"
    },
    "container-type": {
      syntax: "normal | size | inline-size",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/container-type"
    },
    content: {
      syntax: "normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?",
      media: "all",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Generated Content"],
      initial: "normal",
      appliesto: "allElementsTreeAbidingPseudoElementsPageMarginBoxes",
      computed: "normalOnElementsForPseudosNoneAbsoluteURIStringOrAsSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/content"
    },
    "content-visibility": {
      syntax: "visible | auto | hidden",
      media: "all",
      inherited: false,
      animationType: "discreteButVisibleForDurationWhenAnimatedHidden",
      percentages: "no",
      groups: ["CSS Containment"],
      initial: "visible",
      appliesto: "elementsForWhichSizeContainmentCanApply",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/content-visibility"
    },
    "counter-increment": {
      syntax: "[ <counter-name> <integer>? ]+ | none",
      media: "all",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Counter Styles"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
    },
    "counter-reset": {
      syntax: "[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none",
      media: "all",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Counter Styles"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
    },
    "counter-set": {
      syntax: "[ <counter-name> <integer>? ]+ | none",
      media: "all",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Counter Styles"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-set"
    },
    cursor: {
      syntax: "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]",
      media: ["visual", "interactive"],
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecifiedURLsAbsolute",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/cursor"
    },
    d: {
      syntax: "none | path(<string>)",
      media: "visual",
      inherited: false,
      animationType: "basicShapeOtherwiseNo",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "none",
      appliesto: "limitedSVGElementsPath",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/d"
    },
    cx: {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportWidth",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsEllipse",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/cx"
    },
    cy: {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportHeight",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsEllipse",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/cy"
    },
    direction: {
      syntax: "ltr | rtl",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Writing Modes"],
      initial: "ltr",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/direction"
    },
    display: {
      syntax: "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
      media: "all",
      inherited: false,
      animationType: "discreteButVisibleForDurationWhenAnimatedNone",
      percentages: "no",
      groups: ["CSS Display"],
      initial: "inline",
      appliesto: "allElements",
      computed: "asSpecifiedExceptPositionedFloatingAndRootElementsKeywordMaybeDifferent",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/display"
    },
    "dominant-baseline": {
      syntax: "auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top",
      media: "all",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "auto",
      appliesto: "blockContainersFlexContainersGridContainersInlineBoxesTableRowsSVGTextContentElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/dominant-baseline"
    },
    "empty-cells": {
      syntax: "show | hide",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Table"],
      initial: "show",
      appliesto: "tableCellElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
    },
    "field-sizing": {
      syntax: "content | fixed",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "fixed",
      appliesto: "elementsWithDefaultPreferredSize",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/field-sizing"
    },
    fill: {
      syntax: "none | <color> | <url> [none | <color>]? | context-fill | context-stroke",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "black",
      appliesto: "limitedSVGElementsShapeText",
      computed: "asColorOrAbsoluteURL",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/fill"
    },
    "fill-opacity": {
      syntax: "<alpha-value>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "mapToRange0To1",
      groups: ["Scalable Vector Graphics"],
      initial: "1",
      appliesto: "limitedSVGElementsShapeText",
      computed: "specifiedValueNumberClipped0To1",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/fill-opacity"
    },
    "fill-rule": {
      syntax: "nonzero | evenodd",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "nonzero",
      appliesto: "limitedSVGElementsShapeText",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/fill-rule"
    },
    filter: {
      syntax: "none | <filter-function-list>",
      media: "visual",
      inherited: false,
      animationType: "filterList",
      percentages: "no",
      groups: ["Filter Effects"],
      initial: "none",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/filter"
    },
    flex: {
      syntax: "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
      media: "visual",
      inherited: false,
      animationType: [
        "flex-grow",
        "flex-shrink",
        "flex-basis"
      ],
      percentages: "no",
      groups: ["CSS Flexible Box Layout"],
      initial: [
        "flex-grow",
        "flex-shrink",
        "flex-basis"
      ],
      appliesto: "flexItemsAndInFlowPseudos",
      computed: [
        "flex-grow",
        "flex-shrink",
        "flex-basis"
      ],
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex"
    },
    "flex-basis": {
      syntax: "content | <'width'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToFlexContainersInnerMainSize",
      groups: ["CSS Flexible Box Layout"],
      initial: "auto",
      appliesto: "flexItemsAndInFlowPseudos",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "lengthOrPercentageBeforeKeywordIfBothPresent",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
    },
    "flex-direction": {
      syntax: "row | row-reverse | column | column-reverse",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Flexible Box Layout"],
      initial: "row",
      appliesto: "flexContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
    },
    "flex-flow": {
      syntax: "<'flex-direction'> || <'flex-wrap'>",
      media: "visual",
      inherited: false,
      animationType: ["flex-direction", "flex-wrap"],
      percentages: "no",
      groups: ["CSS Flexible Box Layout"],
      initial: ["flex-direction", "flex-wrap"],
      appliesto: "flexContainers",
      computed: ["flex-direction", "flex-wrap"],
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
    },
    "flex-grow": {
      syntax: "<number>",
      media: "visual",
      inherited: false,
      animationType: "number",
      percentages: "no",
      groups: ["CSS Flexible Box Layout"],
      initial: "0",
      appliesto: "flexItemsAndInFlowPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
    },
    "flex-shrink": {
      syntax: "<number>",
      media: "visual",
      inherited: false,
      animationType: "number",
      percentages: "no",
      groups: ["CSS Flexible Box Layout"],
      initial: "1",
      appliesto: "flexItemsAndInFlowPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
    },
    "flex-wrap": {
      syntax: "nowrap | wrap | wrap-reverse",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Flexible Box Layout"],
      initial: "nowrap",
      appliesto: "flexContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
    },
    float: {
      syntax: "left | right | none | inline-start | inline-end",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "none",
      appliesto: "allElementsNoEffectIfDisplayNone",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/float"
    },
    font: {
      syntax: "[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar",
      media: "visual",
      inherited: true,
      animationType: [
        "font-style",
        "font-variant",
        "font-weight",
        "font-stretch",
        "font-size",
        "line-height",
        "font-family"
      ],
      percentages: ["font-size", "line-height"],
      groups: ["CSS Fonts"],
      initial: [
        "font-style",
        "font-variant",
        "font-weight",
        "font-stretch",
        "font-size",
        "line-height",
        "font-family"
      ],
      appliesto: "allElementsAndText",
      computed: [
        "font-style",
        "font-variant",
        "font-weight",
        "font-stretch",
        "font-size",
        "line-height",
        "font-family"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font"
    },
    "font-family": {
      syntax: "[ <family-name> | <generic-family> ]#",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "dependsOnUserAgent",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-family"
    },
    "font-feature-settings": {
      syntax: "normal | <feature-tag-value>#",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
    },
    "font-kerning": {
      syntax: "auto | normal | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "auto",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
    },
    "font-language-override": {
      syntax: "normal | <string>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
    },
    "font-optical-sizing": {
      syntax: "auto | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "auto",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "perGrammar",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
    },
    "font-palette": {
      syntax: "normal | light | dark | <palette-identifier>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "perGrammar",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard"
    },
    "font-variation-settings": {
      syntax: "normal | [ <string> <number> ]#",
      media: "visual",
      inherited: true,
      animationType: "transform",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
    },
    "font-size": {
      syntax: "<absolute-size> | <relative-size> | <length-percentage>",
      media: "visual",
      inherited: true,
      animationType: "length",
      percentages: "referToParentElementsFontSize",
      groups: ["CSS Fonts"],
      initial: "medium",
      appliesto: "allElementsAndText",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size"
    },
    "font-size-adjust": {
      syntax: "none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]",
      media: "visual",
      inherited: true,
      animationType: "number",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "none",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
    },
    "font-smooth": {
      syntax: "auto | never | always | <absolute-size> | <length>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
    },
    "font-stretch": {
      syntax: "<font-stretch-absolute>",
      media: "visual",
      inherited: true,
      animationType: "fontStretch",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
    },
    "font-style": {
      syntax: "normal | italic | oblique <angle>?",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueTypeNormalAnimatesAsObliqueZeroDeg",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-style"
    },
    "font-synthesis": {
      syntax: "none | [ weight || style || small-caps || position]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "weight style small-caps position ",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
    },
    "font-synthesis-position": {
      syntax: "auto | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "none",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position"
    },
    "font-synthesis-small-caps": {
      syntax: "auto | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "auto",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps"
    },
    "font-synthesis-style": {
      syntax: "auto | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "auto",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style"
    },
    "font-synthesis-weight": {
      syntax: "auto | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "auto",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight"
    },
    "font-variant": {
      syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant"
    },
    "font-variant-alternates": {
      syntax: "normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
    },
    "font-variant-caps": {
      syntax: "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
    },
    "font-variant-east-asian": {
      syntax: "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
    },
    "font-variant-emoji": {
      syntax: "normal | text | emoji | unicode",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "perGrammar",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard"
    },
    "font-variant-ligatures": {
      syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
    },
    "font-variant-numeric": {
      syntax: "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
    },
    "font-variant-position": {
      syntax: "normal | sub | super",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
    },
    "font-weight": {
      syntax: "<font-weight-absolute> | bolder | lighter",
      media: "visual",
      inherited: true,
      animationType: "fontWeight",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElementsAndText",
      computed: "keywordOrNumericalValueBolderLighterTransformedToRealValue",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-weight"
    },
    "forced-color-adjust": {
      syntax: "auto | none | preserve-parent-color",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Color"],
      initial: "auto",
      appliesto: "allElementsAndText",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust"
    },
    gap: {
      syntax: "<'row-gap'> <'column-gap'>?",
      media: "visual",
      inherited: false,
      animationType: ["row-gap", "column-gap"],
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: ["row-gap", "column-gap"],
      appliesto: "multiColumnElementsFlexContainersGridContainers",
      computed: ["row-gap", "column-gap"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
    },
    grid: {
      syntax: "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
      media: "visual",
      inherited: false,
      animationType: [
        "grid-template-rows",
        "grid-template-columns",
        "grid-template-areas",
        "grid-auto-rows",
        "grid-auto-columns",
        "grid-auto-flow",
        "grid-column-gap",
        "grid-row-gap",
        "column-gap",
        "row-gap"
      ],
      percentages: [
        "grid-template-rows",
        "grid-template-columns",
        "grid-auto-rows",
        "grid-auto-columns"
      ],
      groups: ["CSS Grid Layout"],
      initial: [
        "grid-template-rows",
        "grid-template-columns",
        "grid-template-areas",
        "grid-auto-rows",
        "grid-auto-columns",
        "grid-auto-flow",
        "grid-column-gap",
        "grid-row-gap",
        "column-gap",
        "row-gap"
      ],
      appliesto: "gridContainers",
      computed: [
        "grid-template-rows",
        "grid-template-columns",
        "grid-template-areas",
        "grid-auto-rows",
        "grid-auto-columns",
        "grid-auto-flow",
        "grid-column-gap",
        "grid-row-gap",
        "column-gap",
        "row-gap"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid"
    },
    "grid-area": {
      syntax: "<grid-line> [ / <grid-line> ]{0,3}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: [
        "grid-row-start",
        "grid-column-start",
        "grid-row-end",
        "grid-column-end"
      ],
      appliesto: "gridItemsAndBoxesWithinGridContainer",
      computed: [
        "grid-row-start",
        "grid-column-start",
        "grid-row-end",
        "grid-column-end"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-area"
    },
    "grid-auto-columns": {
      syntax: "<track-size>+",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "auto",
      appliesto: "gridContainers",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
    },
    "grid-auto-flow": {
      syntax: "[ row | column ] || dense",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "row",
      appliesto: "gridContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
    },
    "grid-auto-rows": {
      syntax: "<track-size>+",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "auto",
      appliesto: "gridContainers",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
    },
    "grid-column": {
      syntax: "<grid-line> [ / <grid-line> ]?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: ["grid-column-start", "grid-column-end"],
      appliesto: "gridItemsAndBoxesWithinGridContainer",
      computed: ["grid-column-start", "grid-column-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column"
    },
    "grid-column-end": {
      syntax: "<grid-line>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "auto",
      appliesto: "gridItemsAndBoxesWithinGridContainer",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
    },
    "grid-column-gap": {
      syntax: "<length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "0",
      appliesto: "gridContainers",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
    },
    "grid-column-start": {
      syntax: "<grid-line>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "auto",
      appliesto: "gridItemsAndBoxesWithinGridContainer",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
    },
    "grid-gap": {
      syntax: "<'grid-row-gap'> <'grid-column-gap'>?",
      media: "visual",
      inherited: false,
      animationType: ["grid-row-gap", "grid-column-gap"],
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: ["grid-row-gap", "grid-column-gap"],
      appliesto: "gridContainers",
      computed: ["grid-row-gap", "grid-column-gap"],
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
    },
    "grid-row": {
      syntax: "<grid-line> [ / <grid-line> ]?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: ["grid-row-start", "grid-row-end"],
      appliesto: "gridItemsAndBoxesWithinGridContainer",
      computed: ["grid-row-start", "grid-row-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row"
    },
    "grid-row-end": {
      syntax: "<grid-line>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "auto",
      appliesto: "gridItemsAndBoxesWithinGridContainer",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
    },
    "grid-row-gap": {
      syntax: "<length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "0",
      appliesto: "gridContainers",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
    },
    "grid-row-start": {
      syntax: "<grid-line>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "auto",
      appliesto: "gridItemsAndBoxesWithinGridContainer",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
    },
    "grid-template": {
      syntax: "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
      media: "visual",
      inherited: false,
      animationType: [
        "grid-template-columns",
        "grid-template-rows",
        "grid-template-areas"
      ],
      percentages: ["grid-template-columns", "grid-template-rows"],
      groups: ["CSS Grid Layout"],
      initial: [
        "grid-template-columns",
        "grid-template-rows",
        "grid-template-areas"
      ],
      appliesto: "gridContainers",
      computed: [
        "grid-template-columns",
        "grid-template-rows",
        "grid-template-areas"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template"
    },
    "grid-template-areas": {
      syntax: "none | <string>+",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "none",
      appliesto: "gridContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
    },
    "grid-template-columns": {
      syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
      media: "visual",
      inherited: false,
      animationType: "simpleListOfLpcDifferenceLpc",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "none",
      appliesto: "gridContainers",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
    },
    "grid-template-rows": {
      syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
      media: "visual",
      inherited: false,
      animationType: "simpleListOfLpcDifferenceLpc",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Grid Layout"],
      initial: "none",
      appliesto: "gridContainers",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
    },
    "hanging-punctuation": {
      syntax: "none | [ first || [ force-end | allow-end ] || last ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
    },
    height: {
      syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesRelativeToContainingBlock",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "allElementsButNonReplacedAndTableColumns",
      computed: "percentageAutoOrAbsoluteLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/height"
    },
    "hyphenate-character": {
      syntax: "auto | <string>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hyphenate-character"
    },
    "hyphenate-limit-chars": {
      syntax: "[ auto | <integer> ]{1,3}",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hyphenate-limit-chars"
    },
    hyphens: {
      syntax: "none | manual | auto",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "manual",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hyphens"
    },
    "image-orientation": {
      syntax: "from-image | <angle> | [ <angle>? flip ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Images"],
      initial: "from-image",
      appliesto: "allElements",
      computed: "angleRoundedToNextQuarter",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
    },
    "image-rendering": {
      syntax: "auto | crisp-edges | pixelated",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Images"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
    },
    "image-resolution": {
      syntax: "[ from-image || <resolution> ] && snap?",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Images"],
      initial: "1dppx",
      appliesto: "allElements",
      computed: "asSpecifiedWithExceptionOfResolution",
      order: "uniqueOrder",
      status: "experimental"
    },
    "ime-mode": {
      syntax: "auto | normal | active | inactive | disabled",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "textFields",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
    },
    "initial-letter": {
      syntax: "normal | [ <number> <integer>? ]",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Inline"],
      initial: "normal",
      appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
    },
    "initial-letter-align": {
      syntax: "[ auto | alphabetic | hanging | ideographic ]",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Inline"],
      initial: "auto",
      appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
    },
    "inline-size": {
      syntax: "<'width'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "inlineSizeOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "auto",
      appliesto: "sameAsWidthAndHeight",
      computed: "sameAsWidthAndHeight",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inline-size"
    },
    "input-security": {
      syntax: "auto | none",
      media: "interactive",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "sensitiveTextInputs",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard"
    },
    inset: {
      syntax: "<'top'>{1,4}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "logicalHeightOrWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: [
        "top",
        "bottom",
        "left",
        "right"
      ],
      appliesto: "positionedElements",
      computed: [
        "top",
        "bottom",
        "left",
        "right"
      ],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset"
    },
    "inset-block": {
      syntax: "<'top'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "logicalHeightOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: ["inset-block-start", "inset-block-end"],
      appliesto: "positionedElements",
      computed: ["inset-block-start", "inset-block-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block"
    },
    "inset-block-end": {
      syntax: "<'top'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "logicalHeightOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "sameAsBoxOffsets",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
    },
    "inset-block-start": {
      syntax: "<'top'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "logicalHeightOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "sameAsBoxOffsets",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
    },
    "inset-inline": {
      syntax: "<'top'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: ["inset-inline-start", "inset-inline-end"],
      appliesto: "positionedElements",
      computed: ["inset-inline-start", "inset-inline-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
    },
    "inset-inline-end": {
      syntax: "<'top'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "sameAsBoxOffsets",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
    },
    "inset-inline-start": {
      syntax: "<'top'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "sameAsBoxOffsets",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
    },
    "interpolate-size": {
      syntax: "numeric-only | allow-keywords",
      media: "none",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Units"],
      initial: "numeric-only",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/interpolate-size"
    },
    isolation: {
      syntax: "auto | isolate",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["Compositing and Blending"],
      initial: "auto",
      appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/isolation"
    },
    "justify-content": {
      syntax: "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: "normal",
      appliesto: "flexContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-content"
    },
    "justify-items": {
      syntax: "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: "legacy",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-items"
    },
    "justify-self": {
      syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: "auto",
      appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-self"
    },
    "justify-tracks": {
      syntax: "[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "normal",
      appliesto: "gridContainersWithMasonryLayoutInTheirInlineAxis",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-tracks"
    },
    left: {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Positioning"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/left"
    },
    "letter-spacing": {
      syntax: "normal | <length>",
      media: "visual",
      inherited: true,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "allElements",
      computed: "optimumValueOfAbsoluteLengthOrNormal",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter", "::first-line"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
    },
    "line-break": {
      syntax: "auto | loose | normal | strict | anywhere",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-break"
    },
    "line-clamp": {
      syntax: "none | <integer>",
      media: "visual",
      inherited: false,
      animationType: "integer",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "none",
      appliesto: "blockContainersExceptMultiColumnContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental"
    },
    "line-height": {
      syntax: "normal | <number> | <length> | <percentage>",
      media: "visual",
      inherited: true,
      animationType: "numberOrLength",
      percentages: "referToElementFontSize",
      groups: ["CSS Fonts"],
      initial: "normal",
      appliesto: "allElements",
      computed: "absoluteLengthOrAsSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height"
    },
    "line-height-step": {
      syntax: "<length>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Fonts"],
      initial: "0",
      appliesto: "blockContainers",
      computed: "absoluteLength",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
    },
    "list-style": {
      syntax: "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
      media: "visual",
      inherited: true,
      animationType: [
        "list-style-image",
        "list-style-position",
        "list-style-type"
      ],
      percentages: "no",
      groups: ["CSS Lists and Counters"],
      initial: [
        "list-style-type",
        "list-style-position",
        "list-style-image"
      ],
      appliesto: "listItems",
      computed: [
        "list-style-image",
        "list-style-position",
        "list-style-type"
      ],
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style"
    },
    "list-style-image": {
      syntax: "<image> | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Lists and Counters"],
      initial: "none",
      appliesto: "listItems",
      computed: "theKeywordListStyleImageNoneOrComputedValue",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
    },
    "list-style-position": {
      syntax: "inside | outside",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Lists and Counters"],
      initial: "outside",
      appliesto: "listItems",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
    },
    "list-style-type": {
      syntax: "<counter-style> | <string> | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Lists and Counters"],
      initial: "disc",
      appliesto: "listItems",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
    },
    margin: {
      syntax: "[ <length> | <percentage> | auto ]{1,4}",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: [
        "margin-bottom",
        "margin-left",
        "margin-right",
        "margin-top"
      ],
      appliesto: "allElementsExceptTableDisplayTypes",
      computed: [
        "margin-bottom",
        "margin-left",
        "margin-right",
        "margin-top"
      ],
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin"
    },
    "margin-block": {
      syntax: "<'margin-left'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "dependsOnLayoutModel",
      groups: ["CSS Logical Properties"],
      initial: ["margin-block-start", "margin-block-end"],
      appliesto: "sameAsMargin",
      computed: ["margin-block-start", "margin-block-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block"
    },
    "margin-block-end": {
      syntax: "<'margin-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "dependsOnLayoutModel",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "sameAsMargin",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
    },
    "margin-block-start": {
      syntax: "<'margin-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "dependsOnLayoutModel",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "sameAsMargin",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
    },
    "margin-bottom": {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
    },
    "margin-inline": {
      syntax: "<'margin-left'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "dependsOnLayoutModel",
      groups: ["CSS Logical Properties"],
      initial: ["margin-inline-start", "margin-inline-end"],
      appliesto: "sameAsMargin",
      computed: ["margin-inline-start", "margin-inline-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
    },
    "margin-inline-end": {
      syntax: "<'margin-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "dependsOnLayoutModel",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "sameAsMargin",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
    },
    "margin-inline-start": {
      syntax: "<'margin-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "dependsOnLayoutModel",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "sameAsMargin",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
    },
    "margin-left": {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-left"
    },
    "margin-right": {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-right"
    },
    "margin-top": {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-top"
    },
    "margin-trim": {
      syntax: "none | in-flow | all",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "none",
      appliesto: "blockContainersAndMultiColumnContainers",
      computed: "asSpecified",
      order: "perGrammar",
      alsoAppliesTo: ["::first-letter"],
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
    },
    marker: {
      syntax: "none | <url>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: [
        "marker-start",
        "marker-mid",
        "marker-end"
      ],
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/marker"
    },
    "marker-end": {
      syntax: "none | <url>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "none",
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecifiedURLsAbsolute",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/marker-end"
    },
    "marker-mid": {
      syntax: "none | <url>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "none",
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecifiedURLsAbsolute",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/marker-mid"
    },
    "marker-start": {
      syntax: "none | <url>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "none",
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecifiedURLsAbsolute",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/marker-start"
    },
    mask: {
      syntax: "<mask-layer>#",
      media: "visual",
      inherited: false,
      animationType: [
        "mask-image",
        "mask-mode",
        "mask-repeat",
        "mask-position",
        "mask-clip",
        "mask-origin",
        "mask-size",
        "mask-composite"
      ],
      percentages: ["mask-position"],
      groups: ["CSS Masking"],
      initial: [
        "mask-image",
        "mask-mode",
        "mask-repeat",
        "mask-position",
        "mask-clip",
        "mask-origin",
        "mask-size",
        "mask-composite"
      ],
      appliesto: "allElementsSVGContainerElements",
      computed: [
        "mask-image",
        "mask-mode",
        "mask-repeat",
        "mask-position",
        "mask-clip",
        "mask-origin",
        "mask-size",
        "mask-composite"
      ],
      order: "perGrammar",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
    },
    "mask-border": {
      syntax: "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
      media: "visual",
      inherited: false,
      animationType: [
        "mask-border-mode",
        "mask-border-outset",
        "mask-border-repeat",
        "mask-border-slice",
        "mask-border-source",
        "mask-border-width"
      ],
      percentages: ["mask-border-slice", "mask-border-width"],
      groups: ["CSS Masking"],
      initial: [
        "mask-border-mode",
        "mask-border-outset",
        "mask-border-repeat",
        "mask-border-slice",
        "mask-border-source",
        "mask-border-width"
      ],
      appliesto: "allElementsSVGContainerElements",
      computed: [
        "mask-border-mode",
        "mask-border-outset",
        "mask-border-repeat",
        "mask-border-slice",
        "mask-border-source",
        "mask-border-width"
      ],
      order: "perGrammar",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border"
    },
    "mask-border-mode": {
      syntax: "luminance | alpha",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "alpha",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-mode"
    },
    "mask-border-outset": {
      syntax: "[ <length> | <number> ]{1,4}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "0",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"
    },
    "mask-border-repeat": {
      syntax: "[ stretch | repeat | round | space ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "stretch",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"
    },
    "mask-border-slice": {
      syntax: "<number-percentage>{1,4} fill?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "referToSizeOfMaskBorderImage",
      groups: ["CSS Masking"],
      initial: "0",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"
    },
    "mask-border-source": {
      syntax: "none | <image>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "none",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecifiedURLsAbsolute",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-source"
    },
    "mask-border-width": {
      syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "relativeToMaskBorderImageArea",
      groups: ["CSS Masking"],
      initial: "auto",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-width"
    },
    "mask-clip": {
      syntax: "[ <geometry-box> | no-clip ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "border-box",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
    },
    "mask-composite": {
      syntax: "<compositing-operator>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "add",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
    },
    "mask-image": {
      syntax: "<mask-reference>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "none",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecifiedURLsAbsolute",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
    },
    "mask-mode": {
      syntax: "<masking-mode>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "match-source",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
    },
    "mask-origin": {
      syntax: "<geometry-box>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "border-box",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
    },
    "mask-position": {
      syntax: "<position>#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "referToSizeOfMaskPaintingArea",
      groups: ["CSS Masking"],
      initial: "0% 0%",
      appliesto: "allElementsSVGContainerElements",
      computed: "consistsOfTwoKeywordsForOriginAndOffsets",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
    },
    "mask-repeat": {
      syntax: "<repeat-style>#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "repeat",
      appliesto: "allElementsSVGContainerElements",
      computed: "consistsOfTwoDimensionKeywords",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
    },
    "mask-size": {
      syntax: "<bg-size>#",
      media: "visual",
      inherited: false,
      animationType: "repeatableList",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "auto",
      appliesto: "allElementsSVGContainerElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
    },
    "mask-type": {
      syntax: "luminance | alpha",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Masking"],
      initial: "luminance",
      appliesto: "maskElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-type"
    },
    "masonry-auto-flow": {
      syntax: "[ pack | next ] || [ definite-first | ordered ]",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Grid Layout"],
      initial: "pack",
      appliesto: "gridContainersWithMasonryLayout",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow"
    },
    "math-depth": {
      syntax: "auto-add | add(<integer>) | <integer>",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["MathML"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/math-depth"
    },
    "math-shift": {
      syntax: "normal | compact",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["MathML"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/math-shift"
    },
    "math-style": {
      syntax: "normal | compact",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["MathML"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/math-style"
    },
    "max-block-size": {
      syntax: "<'max-width'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "blockSizeOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "sameAsWidthAndHeight",
      computed: "sameAsMaxWidthAndMaxHeight",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
    },
    "max-height": {
      syntax: "none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesNone",
      groups: ["CSS Box Model"],
      initial: "none",
      appliesto: "allElementsButNonReplacedAndTableColumns",
      computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-height"
    },
    "max-inline-size": {
      syntax: "<'max-width'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "inlineSizeOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "none",
      appliesto: "sameAsWidthAndHeight",
      computed: "sameAsMaxWidthAndMaxHeight",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
    },
    "max-lines": {
      syntax: "none | <integer>",
      media: "visual",
      inherited: false,
      animationType: "integer",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "none",
      appliesto: "blockContainersExceptMultiColumnContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental"
    },
    "max-width": {
      syntax: "none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "none",
      appliesto: "allElementsButNonReplacedAndTableRows",
      computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-width"
    },
    "min-block-size": {
      syntax: "<'min-width'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "blockSizeOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "sameAsWidthAndHeight",
      computed: "sameAsMinWidthAndMinHeight",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
    },
    "min-height": {
      syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentages0",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "allElementsButNonReplacedAndTableColumns",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-height"
    },
    "min-inline-size": {
      syntax: "<'min-width'>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "inlineSizeOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "sameAsWidthAndHeight",
      computed: "sameAsMinWidthAndMinHeight",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
    },
    "min-width": {
      syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "allElementsButNonReplacedAndTableRows",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-width"
    },
    "mix-blend-mode": {
      syntax: "<blend-mode> | plus-lighter",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["Compositing and Blending"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
    },
    "object-fit": {
      syntax: "fill | contain | cover | none | scale-down",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Images"],
      initial: "fill",
      appliesto: "replacedElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-fit"
    },
    "object-position": {
      syntax: "<position>",
      media: "visual",
      inherited: true,
      animationType: "repeatableList",
      percentages: "referToWidthAndHeightOfElement",
      groups: ["CSS Images"],
      initial: "50% 50%",
      appliesto: "replacedElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-position"
    },
    offset: {
      syntax: "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
      media: "visual",
      inherited: false,
      animationType: [
        "offset-position",
        "offset-path",
        "offset-distance",
        "offset-anchor",
        "offset-rotate"
      ],
      percentages: [
        "offset-position",
        "offset-distance",
        "offset-anchor"
      ],
      groups: ["CSS Motion Path"],
      initial: [
        "offset-position",
        "offset-path",
        "offset-distance",
        "offset-anchor",
        "offset-rotate"
      ],
      appliesto: "transformableElements",
      computed: [
        "offset-position",
        "offset-path",
        "offset-distance",
        "offset-anchor",
        "offset-rotate"
      ],
      order: "perGrammar",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset"
    },
    "offset-anchor": {
      syntax: "auto | <position>",
      media: "visual",
      inherited: false,
      animationType: "position",
      percentages: "relativeToWidthAndHeight",
      groups: ["CSS Motion Path"],
      initial: "auto",
      appliesto: "transformableElements",
      computed: "forLengthAbsoluteValueOtherwisePercentage",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-anchor"
    },
    "offset-distance": {
      syntax: "<length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToTotalPathLength",
      groups: ["CSS Motion Path"],
      initial: "0",
      appliesto: "transformableElements",
      computed: "forLengthAbsoluteValueOtherwisePercentage",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
    },
    "offset-path": {
      syntax: "none | <offset-path> || <coord-box>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Motion Path"],
      initial: "none",
      appliesto: "transformableElements",
      computed: "asSpecified",
      order: "perGrammar",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-path"
    },
    "offset-position": {
      syntax: "normal | auto | <position>",
      media: "visual",
      inherited: false,
      animationType: "position",
      percentages: "referToSizeOfContainingBlock",
      groups: ["CSS Motion Path"],
      initial: "normal",
      appliesto: "transformableElements",
      computed: "forLengthAbsoluteValueOtherwisePercentage",
      order: "perGrammar",
      status: "experimental"
    },
    "offset-rotate": {
      syntax: "[ auto | reverse ] || <angle>",
      media: "visual",
      inherited: false,
      animationType: "angleOrBasicShapeOrPath",
      percentages: "no",
      groups: ["CSS Motion Path"],
      initial: "auto",
      appliesto: "transformableElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
    },
    opacity: {
      syntax: "<alpha-value>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "mapToRange0To1",
      groups: ["CSS Color"],
      initial: "1",
      appliesto: "allElements",
      computed: "specifiedValueNumberClipped0To1",
      order: "perGrammar",
      alsoAppliesTo: ["::placeholder"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/opacity"
    },
    order: {
      syntax: "<integer>",
      media: "visual",
      inherited: false,
      animationType: "integer",
      percentages: "no",
      groups: ["CSS Flexible Box Layout"],
      initial: "0",
      appliesto: "flexItemsGridItemsAbsolutelyPositionedContainerChildren",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/order"
    },
    orphans: {
      syntax: "<integer>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Fragmentation"],
      initial: "2",
      appliesto: "blockContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/orphans"
    },
    outline: {
      syntax: "[ <'outline-width'> || <'outline-style'> || <'outline-color'> ]",
      media: ["visual", "interactive"],
      inherited: false,
      animationType: [
        "outline-width",
        "outline-style",
        "outline-color"
      ],
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: [
        "outline-width",
        "outline-style",
        "outline-color"
      ],
      appliesto: "allElements",
      computed: [
        "outline-width",
        "outline-style",
        "outline-color"
      ],
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline"
    },
    "outline-color": {
      syntax: "auto | <color>",
      media: ["visual", "interactive"],
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "allElements",
      computed: "autoForTranslucentColorRGBAOtherwiseRGB",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-color"
    },
    "outline-offset": {
      syntax: "<length>",
      media: ["visual", "interactive"],
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
    },
    "outline-style": {
      syntax: "auto | <'border-style'>",
      media: ["visual", "interactive"],
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-style"
    },
    "outline-width": {
      syntax: "<line-width>",
      media: ["visual", "interactive"],
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "medium",
      appliesto: "allElements",
      computed: "absoluteLength0ForNone",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-width"
    },
    overflow: {
      syntax: "[ visible | hidden | clip | scroll | auto ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "visible",
      appliesto: "blockContainersFlexContainersGridContainers",
      computed: ["overflow-x", "overflow-y"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow"
    },
    "overflow-anchor": {
      syntax: "auto | none",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Scroll Anchoring"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard"
    },
    "overflow-block": {
      syntax: "visible | hidden | clip | scroll | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "auto",
      appliesto: "blockContainersFlexContainersGridContainers",
      computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
      order: "perGrammar",
      status: "standard"
    },
    "overflow-clip-box": {
      syntax: "padding-box | content-box",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Mozilla Extensions"],
      initial: "padding-box",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "nonstandard",
      mdn_url: "https://developer.mozilla.org/docs/Mozilla/CSS/overflow-clip-box"
    },
    "overflow-clip-margin": {
      syntax: "<visual-box> || <length [0,∞]>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "0px",
      appliesto: "allElements",
      computed: "theComputedLengthAndVisualBox",
      order: "perGrammar",
      status: "standard"
    },
    "overflow-inline": {
      syntax: "visible | hidden | clip | scroll | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "auto",
      appliesto: "blockContainersFlexContainersGridContainers",
      computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
      order: "perGrammar",
      status: "standard"
    },
    "overflow-wrap": {
      syntax: "normal | break-word | anywhere",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "textElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
    },
    "overflow-x": {
      syntax: "visible | hidden | clip | scroll | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "visible",
      appliesto: "blockContainersFlexContainersGridContainers",
      computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
    },
    "overflow-y": {
      syntax: "visible | hidden | clip | scroll | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "visible",
      appliesto: "blockContainersFlexContainersGridContainers",
      computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
    },
    overlay: {
      syntax: "none | auto",
      media: "visual",
      inherited: false,
      animationType: "discreteButVisibleForDurationWhenAnimatedNone",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overlay"
    },
    "overscroll-behavior": {
      syntax: "[ contain | none | auto ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: ["overscroll-behavior-x", "overscroll-behavior-y"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
    },
    "overscroll-behavior-block": {
      syntax: "contain | none | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
    },
    "overscroll-behavior-inline": {
      syntax: "contain | none | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
    },
    "overscroll-behavior-x": {
      syntax: "contain | none | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
    },
    "overscroll-behavior-y": {
      syntax: "contain | none | auto",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "nonReplacedBlockAndInlineBlockElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
    },
    padding: {
      syntax: "[ <length> | <percentage> ]{1,4}",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: [
        "padding-bottom",
        "padding-left",
        "padding-right",
        "padding-top"
      ],
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: [
        "padding-bottom",
        "padding-left",
        "padding-right",
        "padding-top"
      ],
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter", "::first-line"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding"
    },
    "padding-block": {
      syntax: "<'padding-left'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: ["padding-block-start", "padding-block-end"],
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: ["padding-block-start", "padding-block-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block"
    },
    "padding-block-end": {
      syntax: "<'padding-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "asLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
    },
    "padding-block-start": {
      syntax: "<'padding-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "asLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
    },
    "padding-bottom": {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter", "::first-line"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
    },
    "padding-inline": {
      syntax: "<'padding-left'>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: ["padding-inline-start", "padding-inline-end"],
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: ["padding-inline-start", "padding-inline-end"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
    },
    "padding-inline-end": {
      syntax: "<'padding-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "asLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
    },
    "padding-inline-start": {
      syntax: "<'padding-left'>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "logicalWidthOfContainingBlock",
      groups: ["CSS Logical Properties"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "asLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
    },
    "padding-left": {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter", "::first-line"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-left"
    },
    "padding-right": {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter", "::first-line"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-right"
    },
    "padding-top": {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "0",
      appliesto: "allElementsExceptInternalTableDisplayTypes",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: ["::first-letter", "::first-line"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-top"
    },
    page: {
      syntax: "auto | <custom-ident>",
      media: "paged",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Pages"],
      initial: "auto",
      appliesto: "blockElementsInNormalFlow",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page"
    },
    "page-break-after": {
      syntax: "auto | always | avoid | left | right | recto | verso",
      media: ["visual", "paged"],
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Pages"],
      initial: "auto",
      appliesto: "blockElementsInNormalFlow",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
    },
    "page-break-before": {
      syntax: "auto | always | avoid | left | right | recto | verso",
      media: ["visual", "paged"],
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Pages"],
      initial: "auto",
      appliesto: "blockElementsInNormalFlow",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
    },
    "page-break-inside": {
      syntax: "auto | avoid",
      media: ["visual", "paged"],
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Pages"],
      initial: "auto",
      appliesto: "blockElementsInNormalFlow",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
    },
    "paint-order": {
      syntax: "normal | [ fill || stroke || markers ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "textElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/paint-order"
    },
    perspective: {
      syntax: "none | <length>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Transforms"],
      initial: "none",
      appliesto: "transformableElements",
      computed: "absoluteLengthOrNone",
      order: "uniqueOrder",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective"
    },
    "perspective-origin": {
      syntax: "<position>",
      media: "visual",
      inherited: false,
      animationType: "simpleListOfLpc",
      percentages: "referToSizeOfBoundingBox",
      groups: ["CSS Transforms"],
      initial: "50% 50%",
      appliesto: "transformableElements",
      computed: "forLengthAbsoluteValueOtherwisePercentage",
      order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
    },
    "place-content": {
      syntax: "<'align-content'> <'justify-content'>?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: ["align-content", "justify-content"],
      appliesto: "multilineFlexContainers",
      computed: ["align-content", "justify-content"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-content"
    },
    "place-items": {
      syntax: "<'align-items'> <'justify-items'>?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: ["align-items", "justify-items"],
      appliesto: "allElements",
      computed: ["align-items", "justify-items"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-items"
    },
    "place-self": {
      syntax: "<'align-self'> <'justify-self'>?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Box Alignment"],
      initial: ["align-self", "justify-self"],
      appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
      computed: ["align-self", "justify-self"],
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-self"
    },
    "pointer-events": {
      syntax: "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
    },
    position: {
      syntax: "static | relative | absolute | sticky | fixed",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "static",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position"
    },
    "position-anchor": {
      syntax: "auto | <anchor-name>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "auto",
      appliesto: "absolutelyPositionedElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position-anchor"
    },
    "position-area": {
      syntax: "none | <position-area>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "none",
      appliesto: "positionedElementsWithADefaultAnchorElement",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position-area"
    },
    "position-try": {
      syntax: "<'position-try-order'>? <'position-try-fallbacks'>",
      media: "visual",
      inherited: false,
      animationType: ["position-try-fallbacks", "position-try-order"],
      percentages: ["position-try-fallbacks", "position-try-order"],
      groups: ["CSS Positioning"],
      initial: ["position-try-fallbacks", "position-try-order"],
      appliesto: "absolutelyPositionedElements",
      computed: ["position-try-fallbacks", "position-try-order"],
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position-try"
    },
    "position-try-fallbacks": {
      syntax: "none | [ [<dashed-ident> || <try-tactic>] | <'position-area'> ]#",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "none",
      appliesto: "absolutelyPositionedElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position-try-fallbacks"
    },
    "position-try-order": {
      syntax: "normal | <try-size>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "normal",
      appliesto: "absolutelyPositionedElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position-try-order"
    },
    "position-visibility": {
      syntax: "always | [ anchors-valid || anchors-visible || no-overflow ]",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "anchors-visible",
      appliesto: "absolutelyPositionedElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position-visibility"
    },
    "print-color-adjust": {
      syntax: "economy | exact",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Color"],
      initial: "economy",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/print-color-adjust"
    },
    quotes: {
      syntax: "none | auto | [ <string> <string> ]+",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Generated Content"],
      initial: "dependsOnUserAgent",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/quotes"
    },
    r: {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportSize",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsCircle",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/r"
    },
    resize: {
      syntax: "none | both | horizontal | vertical | block | inline",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "none",
      appliesto: "elementsWithOverflowNotVisibleAndReplacedElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/resize"
    },
    right: {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Positioning"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/right"
    },
    rotate: {
      syntax: "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
      media: "visual",
      inherited: false,
      animationType: "transform",
      percentages: "no",
      groups: ["CSS Transforms"],
      initial: "none",
      appliesto: "transformableElements",
      computed: "asSpecified",
      order: "perGrammar",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/rotate"
    },
    "row-gap": {
      syntax: "normal | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToDimensionOfContentArea",
      groups: ["CSS Box Alignment"],
      initial: "normal",
      appliesto: "multiColumnElementsFlexContainersGridContainers",
      computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
    },
    "ruby-align": {
      syntax: "start | center | space-between | space-around",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Ruby"],
      initial: "space-around",
      appliesto: "rubyBasesAnnotationsBaseAnnotationContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
    },
    "ruby-merge": {
      syntax: "separate | collapse | auto",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Ruby"],
      initial: "separate",
      appliesto: "rubyAnnotationsContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental"
    },
    "ruby-position": {
      syntax: "[ alternate || [ over | under ] ] | inter-character",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Ruby"],
      initial: "alternate",
      appliesto: "rubyAnnotationsContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
    },
    rx: {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportWidth",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsEllipseRect",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/rx"
    },
    ry: {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportHeight",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsEllipseRect",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ry"
    },
    scale: {
      syntax: "none | [ <number> | <percentage> ]{1,3}",
      media: "visual",
      inherited: false,
      animationType: "transform",
      percentages: "no",
      groups: ["CSS Transforms"],
      initial: "none",
      appliesto: "transformableElements",
      computed: "asSpecified",
      order: "perGrammar",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scale"
    },
    "scrollbar-color": {
      syntax: "auto | <color>{2}",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scrollbars"],
      initial: "auto",
      appliesto: "scrollingBoxes",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
    },
    "scrollbar-gutter": {
      syntax: "auto | stable && both-edges?",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "auto",
      appliesto: "scrollingBoxes",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter"
    },
    "scrollbar-width": {
      syntax: "auto | thin | none",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scrollbars"],
      initial: "auto",
      appliesto: "scrollingBoxes",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
    },
    "scroll-behavior": {
      syntax: "auto | smooth",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Overflow"],
      initial: "auto",
      appliesto: "scrollingBoxes",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
    },
    "scroll-margin": {
      syntax: "<length>{1,4}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: [
        "scroll-margin-bottom",
        "scroll-margin-left",
        "scroll-margin-right",
        "scroll-margin-top"
      ],
      appliesto: "allElements",
      computed: [
        "scroll-margin-bottom",
        "scroll-margin-left",
        "scroll-margin-right",
        "scroll-margin-top"
      ],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
    },
    "scroll-margin-block": {
      syntax: "<length>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: ["scroll-margin-block-start", "scroll-margin-block-end"],
      appliesto: "allElements",
      computed: ["scroll-margin-block-start", "scroll-margin-block-end"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
    },
    "scroll-margin-block-start": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
    },
    "scroll-margin-block-end": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
    },
    "scroll-margin-bottom": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
    },
    "scroll-margin-inline": {
      syntax: "<length>{1,2}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
      appliesto: "allElements",
      computed: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
    },
    "scroll-margin-inline-start": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
    },
    "scroll-margin-inline-end": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
    },
    "scroll-margin-left": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
    },
    "scroll-margin-right": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
    },
    "scroll-margin-top": {
      syntax: "<length>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "0",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
    },
    "scroll-padding": {
      syntax: "[ auto | <length-percentage> ]{1,4}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: [
        "scroll-padding-bottom",
        "scroll-padding-left",
        "scroll-padding-right",
        "scroll-padding-top"
      ],
      appliesto: "scrollContainers",
      computed: [
        "scroll-padding-bottom",
        "scroll-padding-left",
        "scroll-padding-right",
        "scroll-padding-top"
      ],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
    },
    "scroll-padding-block": {
      syntax: "[ auto | <length-percentage> ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: ["scroll-padding-block-start", "scroll-padding-block-end"],
      appliesto: "scrollContainers",
      computed: ["scroll-padding-block-start", "scroll-padding-block-end"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
    },
    "scroll-padding-block-start": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
    },
    "scroll-padding-block-end": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
    },
    "scroll-padding-bottom": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
    },
    "scroll-padding-inline": {
      syntax: "[ auto | <length-percentage> ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
      appliesto: "scrollContainers",
      computed: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
    },
    "scroll-padding-inline-start": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
    },
    "scroll-padding-inline-end": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
    },
    "scroll-padding-left": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
    },
    "scroll-padding-right": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
    },
    "scroll-padding-top": {
      syntax: "auto | <length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToTheScrollContainersScrollport",
      groups: ["CSS Scroll Snap"],
      initial: "auto",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
    },
    "scroll-snap-align": {
      syntax: "[ none | start | end | center ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
    },
    "scroll-snap-coordinate": {
      syntax: "none | <position>#",
      media: "interactive",
      inherited: false,
      animationType: "position",
      percentages: "referToBorderBox",
      groups: ["CSS Scroll Snap"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
    },
    "scroll-snap-destination": {
      syntax: "<position>",
      media: "interactive",
      inherited: false,
      animationType: "position",
      percentages: "relativeToScrollContainerPaddingBoxAxis",
      groups: ["CSS Scroll Snap"],
      initial: "0px 0px",
      appliesto: "scrollContainers",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
    },
    "scroll-snap-points-x": {
      syntax: "none | repeat( <length-percentage> )",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "relativeToScrollContainerPaddingBoxAxis",
      groups: ["CSS Scroll Snap"],
      initial: "none",
      appliesto: "scrollContainers",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
    },
    "scroll-snap-points-y": {
      syntax: "none | repeat( <length-percentage> )",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "relativeToScrollContainerPaddingBoxAxis",
      groups: ["CSS Scroll Snap"],
      initial: "none",
      appliesto: "scrollContainers",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
    },
    "scroll-snap-stop": {
      syntax: "normal | always",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
    },
    "scroll-snap-type": {
      syntax: "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
    },
    "scroll-snap-type-x": {
      syntax: "none | mandatory | proximity",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "none",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
    },
    "scroll-snap-type-y": {
      syntax: "none | mandatory | proximity",
      media: "interactive",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Scroll Snap"],
      initial: "none",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "obsolete",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
    },
    "scroll-timeline": {
      syntax: "[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#",
      media: "visual",
      inherited: false,
      animationType: ["scroll-timeline-name", "scroll-timeline-axis"],
      percentages: "no",
      groups: ["CSS Animations"],
      initial: ["scroll-timeline-name", "scroll-timeline-axis"],
      appliesto: "scrollContainers",
      computed: ["scroll-timeline-name", "scroll-timeline-axis"],
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-timeline"
    },
    "scroll-timeline-axis": {
      syntax: "[ block | inline | x | y ]#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "block",
      appliesto: "scrollContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis"
    },
    "scroll-timeline-name": {
      syntax: "none | <dashed-ident>#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "none",
      appliesto: "scrollContainers",
      computed: "noneOrOrderedListOfIdentifiers",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name"
    },
    "shape-image-threshold": {
      syntax: "<alpha-value>",
      media: "visual",
      inherited: false,
      animationType: "number",
      percentages: "no",
      groups: ["CSS Shapes"],
      initial: "0.0",
      appliesto: "floats",
      computed: "specifiedValueNumberClipped0To1",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
    },
    "shape-margin": {
      syntax: "<length-percentage>",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Shapes"],
      initial: "0",
      appliesto: "floats",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
    },
    "shape-outside": {
      syntax: "none | [ <shape-box> || <basic-shape> ] | <image>",
      media: "visual",
      inherited: false,
      animationType: "basicShapeOtherwiseNo",
      percentages: "no",
      groups: ["CSS Shapes"],
      initial: "none",
      appliesto: "floats",
      computed: "asDefinedForBasicShapeWithAbsoluteURIOtherwiseAsSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
    },
    "shape-rendering": {
      syntax: "auto | optimizeSpeed | crispEdges | geometricPrecision",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Shapes"],
      initial: "auto",
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-rendering"
    },
    stroke: {
      syntax: "",
      media: "visual",
      inherited: true,
      animationType: [
        "stroke-dasharray",
        "stroke-dashoffset",
        "stroke-linecap",
        "stroke-linejoin",
        "stroke-miterlimit",
        "stroke-opacity",
        "stroke-width"
      ],
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: [
        "stroke-dasharray",
        "stroke-dashoffset",
        "stroke-linecap",
        "stroke-linejoin",
        "stroke-miterlimit",
        "stroke-opacity",
        "stroke-width"
      ],
      appliesto: "asLonghands",
      computed: "asLonghands",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke"
    },
    "stroke-dasharray": {
      syntax: "none | <dasharray>",
      media: "visual",
      inherited: true,
      animationType: "repeatableList",
      percentages: "referToSVGViewportDiagonal",
      groups: ["Scalable Vector Graphics"],
      initial: "none",
      appliesto: "limitedSVGElementsShapes",
      computed: "listEachItemConsistingOfAbsoluteLengthPercentageOrKeyword",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray"
    },
    "stroke-dashoffset": {
      syntax: "<length-percentage> | <number>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportDiagonal",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsShapes",
      computed: "absoluteLengthOrPercentageNumbersConverted",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset"
    },
    "stroke-linecap": {
      syntax: "butt | round | square",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "butt",
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke-linecap"
    },
    "stroke-linejoin": {
      syntax: "miter | miter-clip | round | bevel | arcs",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "miter",
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin"
    },
    "stroke-miterlimit": {
      syntax: "<number>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "4",
      appliesto: "limitedSVGElementsShapes",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit"
    },
    "stroke-opacity": {
      syntax: "<'opacity'>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "1",
      appliesto: "limitedSVGElementsShapes",
      computed: "specifiedValueClipped0To1",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke-opacity"
    },
    "stroke-width": {
      syntax: "<length-percentage> | <number>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportDiagonal",
      groups: ["Scalable Vector Graphics"],
      initial: "1px",
      appliesto: "limitedSVGElementsShapes",
      computed: "absoluteLengthOrPercentageNumbersConverted",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/stroke-width"
    },
    "tab-size": {
      syntax: "<integer> | <length>",
      media: "visual",
      inherited: true,
      animationType: "length",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "8",
      appliesto: "blockContainers",
      computed: "specifiedIntegerOrAbsoluteLength",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/tab-size"
    },
    "table-layout": {
      syntax: "auto | fixed",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Table"],
      initial: "auto",
      appliesto: "tableElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/table-layout"
    },
    "text-align": {
      syntax: "start | end | left | right | center | justify | match-parent",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "startOrNamelessValueIfLTRRightIfRTL",
      appliesto: "blockContainers",
      computed: "asSpecifiedExceptMatchParent",
      order: "orderOfAppearance",
      alsoAppliesTo: ["::placeholder"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align"
    },
    "text-align-last": {
      syntax: "auto | start | end | left | right | center | justify",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "auto",
      appliesto: "blockContainers",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
    },
    "text-anchor": {
      syntax: "start | middle | end",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "start",
      appliesto: "limitedSVGElementsTextContent",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-anchor"
    },
    "text-combine-upright": {
      syntax: "none | all | [ digits <integer>? ]",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Writing Modes"],
      initial: "none",
      appliesto: "nonReplacedInlineElements",
      computed: "keywordPlusIntegerIfDigits",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
    },
    "text-decoration": {
      syntax: "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
      media: "visual",
      inherited: false,
      animationType: [
        "text-decoration-color",
        "text-decoration-style",
        "text-decoration-line",
        "text-decoration-thickness"
      ],
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: [
        "text-decoration-color",
        "text-decoration-style",
        "text-decoration-line"
      ],
      appliesto: "allElements",
      computed: [
        "text-decoration-line",
        "text-decoration-style",
        "text-decoration-color",
        "text-decoration-thickness"
      ],
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
    },
    "text-decoration-color": {
      syntax: "<color>",
      media: "visual",
      inherited: false,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
    },
    "text-decoration-line": {
      syntax: "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
    },
    "text-decoration-skip": {
      syntax: "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "objects",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
    },
    "text-decoration-skip-ink": {
      syntax: "auto | all | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
    },
    "text-decoration-style": {
      syntax: "solid | double | dotted | dashed | wavy",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "solid",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
    },
    "text-decoration-thickness": {
      syntax: "auto | from-font | <length> | <percentage> ",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToElementFontSize",
      groups: ["CSS Text Decoration"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
    },
    "text-emphasis": {
      syntax: "<'text-emphasis-style'> || <'text-emphasis-color'>",
      media: "visual",
      inherited: true,
      animationType: ["text-emphasis-color", "text-emphasis-style"],
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: ["text-emphasis-style", "text-emphasis-color"],
      appliesto: "allElements",
      computed: ["text-emphasis-style", "text-emphasis-color"],
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
    },
    "text-emphasis-color": {
      syntax: "<color>",
      media: "visual",
      inherited: true,
      animationType: "color",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "currentcolor",
      appliesto: "allElements",
      computed: "computedColor",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
    },
    "text-emphasis-position": {
      syntax: "auto | [ over | under ] && [ right | left ]?",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
    },
    "text-emphasis-style": {
      syntax: "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
    },
    "text-indent": {
      syntax: "<length-percentage> && hanging? && each-line?",
      media: "visual",
      inherited: true,
      animationType: "lpc",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Text"],
      initial: "0",
      appliesto: "blockContainers",
      computed: "percentageOrAbsoluteLengthPlusKeywords",
      order: "lengthOrPercentageBeforeKeywords",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-indent"
    },
    "text-justify": {
      syntax: "auto | inter-character | inter-word | none",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "auto",
      appliesto: "inlineLevelAndTableCellElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-justify"
    },
    "text-orientation": {
      syntax: "mixed | upright | sideways",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Writing Modes"],
      initial: "mixed",
      appliesto: "allElementsExceptTableRowGroupsRowsColumnGroupsAndColumns",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
    },
    "text-overflow": {
      syntax: "[ clip | ellipsis | <string> ]{1,2}",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "clip",
      appliesto: "blockContainerElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: ["::placeholder"],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
    },
    "text-rendering": {
      syntax: "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Miscellaneous"],
      initial: "auto",
      appliesto: "textElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
    },
    "text-shadow": {
      syntax: "none | <shadow-t>#",
      media: "visual",
      inherited: true,
      animationType: "shadowList",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "none",
      appliesto: "allElements",
      computed: "colorPlusThreeAbsoluteLengths",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
    },
    "text-size-adjust": {
      syntax: "none | auto | <percentage>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "referToSizeOfFont",
      groups: ["CSS Text"],
      initial: "autoForSmartphoneBrowsersSupportingInflation",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
    },
    "text-spacing-trim": {
      syntax: "space-all | normal | space-first | trim-start | trim-both | trim-all | auto",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "textElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-spacing-trim"
    },
    "text-transform": {
      syntax: "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-transform"
    },
    "text-underline-offset": {
      syntax: "auto | <length> | <percentage> ",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "referToElementFontSize",
      groups: ["CSS Text Decoration"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
    },
    "text-underline-position": {
      syntax: "auto | from-font | [ under || [ left | right ] ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text Decoration"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
    },
    "text-wrap": {
      syntax: "<'text-wrap-mode> || <'text-wrap-style'>",
      media: "visual",
      inherited: true,
      animationType: ["text-wrap-mode", "text-wrap-style"],
      percentages: "no",
      groups: ["CSS Text"],
      initial: "wrap",
      appliesto: "textAndBlockContainers",
      computed: ["text-wrap-mode", "text-wrap-style"],
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-wrap"
    },
    "text-wrap-mode": {
      syntax: "auto | wrap | nowrap",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "wrap",
      appliesto: "textAndBlockContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-wrap-mode"
    },
    "text-wrap-style": {
      syntax: "auto | balance | stable | pretty",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "auto",
      appliesto: "textAndBlockContainers",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-wrap-style"
    },
    "timeline-scope": {
      syntax: "none | <dashed-ident>#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "none",
      appliesto: "allElements",
      computed: "noneOrOrderedListOfIdentifiers",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/timeline-scope"
    },
    top: {
      syntax: "<length> | <percentage> | auto",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToContainingBlockHeight",
      groups: ["CSS Positioning"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/top"
    },
    "touch-action": {
      syntax: "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["Pointer Events"],
      initial: "auto",
      appliesto: "allElementsExceptNonReplacedInlineElementsTableRowsColumnsRowColumnGroups",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/touch-action"
    },
    transform: {
      syntax: "none | <transform-list>",
      media: "visual",
      inherited: false,
      animationType: "transform",
      percentages: "referToSizeOfBoundingBox",
      groups: ["CSS Transforms"],
      initial: "none",
      appliesto: "transformableElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "uniqueOrder",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform"
    },
    "transform-box": {
      syntax: "content-box | border-box | fill-box | stroke-box | view-box",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Transforms"],
      initial: "view-box",
      appliesto: "transformableElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-box"
    },
    "transform-origin": {
      syntax: "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
      media: "visual",
      inherited: false,
      animationType: "simpleListOfLpc",
      percentages: "referToSizeOfBoundingBox",
      groups: ["CSS Transforms"],
      initial: "50% 50% 0",
      appliesto: "transformableElements",
      computed: "forLengthAbsoluteValueOtherwisePercentage",
      order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
    },
    "transform-style": {
      syntax: "flat | preserve-3d",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Transforms"],
      initial: "flat",
      appliesto: "transformableElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-style"
    },
    transition: {
      syntax: "<single-transition>#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Transitions"],
      initial: [
        "transition-delay",
        "transition-duration",
        "transition-property",
        "transition-timing-function",
        "transition-behavior"
      ],
      appliesto: "allElementsAndPseudos",
      computed: [
        "transition-delay",
        "transition-duration",
        "transition-property",
        "transition-timing-function",
        "transition-behavior"
      ],
      order: "orderOfAppearance",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition"
    },
    "transition-behavior": {
      syntax: "<transition-behavior-value>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Transitions"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-behavior"
    },
    "transition-delay": {
      syntax: "<time>#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Transitions"],
      initial: "0s",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
    },
    "transition-duration": {
      syntax: "<time>#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Transitions"],
      initial: "0s",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
    },
    "transition-property": {
      syntax: "none | <single-transition-property>#",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Transitions"],
      initial: "all",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-property"
    },
    "transition-timing-function": {
      syntax: "<easing-function>#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Transitions"],
      initial: "ease",
      appliesto: "allElementsAndPseudos",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
    },
    translate: {
      syntax: "none | <length-percentage> [ <length-percentage> <length>? ]?",
      media: "visual",
      inherited: false,
      animationType: "transform",
      percentages: "referToSizeOfBoundingBox",
      groups: ["CSS Transforms"],
      initial: "none",
      appliesto: "transformableElements",
      computed: "asSpecifiedRelativeToAbsoluteLengths",
      order: "perGrammar",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/translate"
    },
    "unicode-bidi": {
      syntax: "normal | embed | isolate | bidi-override | isolate-override | plaintext",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Writing Modes"],
      initial: "normal",
      appliesto: "allElementsSomeValuesNoEffectOnNonInlineElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
    },
    "user-select": {
      syntax: "auto | text | none | contain | all",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Basic User Interface"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/user-select"
    },
    "vector-effect": {
      syntax: "none | non-scaling-stroke | non-scaling-size | non-rotation | fixed-position",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["Scalable Vector Graphics"],
      initial: "none",
      appliesto: "limitedSVGElementsGraphicsAndUse",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/vector-effect"
    },
    "vertical-align": {
      syntax: "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
      media: "visual",
      inherited: false,
      animationType: "length",
      percentages: "referToLineHeight",
      groups: ["CSS Table"],
      initial: "baseline",
      appliesto: "inlineLevelAndTableCellElements",
      computed: "absoluteLengthOrKeyword",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
    },
    "view-timeline": {
      syntax: "[ <'view-timeline-name'> <'view-timeline-axis'>? ]#",
      media: "visual",
      inherited: false,
      animationType: ["view-timeline-name", "view-timeline-axis"],
      percentages: "no",
      groups: ["CSS Animations"],
      initial: ["view-timeline-name", "view-timeline-axis"],
      appliesto: "allElements",
      computed: ["view-timeline-name", "view-timeline-axis"],
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/view-timeline"
    },
    "view-timeline-axis": {
      syntax: "[ block | inline | x | y ]#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "block",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis"
    },
    "view-timeline-inset": {
      syntax: "[ [ auto | <length-percentage> ]{1,2} ]#",
      media: "interactive",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "relativeToCorrespondingDimensionOfRelevantScrollport",
      groups: ["CSS Animations"],
      initial: "auto",
      appliesto: "allElements",
      computed: "listEachItemConsistingOfPairsOfAutoOrLengthPercentage",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset"
    },
    "view-timeline-name": {
      syntax: "none | <dashed-ident>#",
      media: "interactive",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Animations"],
      initial: "none",
      appliesto: "allElements",
      computed: "noneOrOrderedListOfIdentifiers",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/view-timeline-name"
    },
    "view-transition-name": {
      syntax: "none | <custom-ident>",
      media: "visual",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS View Transitions"],
      initial: "none",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "experimental",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/view-transition-name"
    },
    visibility: {
      syntax: "visible | hidden | collapse",
      media: "visual",
      inherited: true,
      animationType: "visibility",
      percentages: "no",
      groups: ["CSS Box Model"],
      initial: "visible",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/visibility"
    },
    "white-space": {
      syntax: "normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> || <'white-space-trim'> ]",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/white-space"
    },
    "white-space-collapse": {
      syntax: "collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "collapse",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/white-space-collapse"
    },
    widows: {
      syntax: "<integer>",
      media: "visual",
      inherited: true,
      animationType: "byComputedValueType",
      percentages: "no",
      groups: ["CSS Fragmentation"],
      initial: "2",
      appliesto: "blockContainerElements",
      computed: "asSpecified",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/widows"
    },
    width: {
      syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)",
      media: "visual",
      inherited: false,
      animationType: "lpc",
      percentages: "referToWidthOfContainingBlock",
      groups: ["CSS Box Model"],
      initial: "auto",
      appliesto: "allElementsButNonReplacedAndTableRows",
      computed: "percentageAutoOrAbsoluteLength",
      order: "lengthOrPercentageBeforeKeywordIfBothPresent",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/width"
    },
    "will-change": {
      syntax: "auto | <animateable-feature>#",
      media: "all",
      inherited: false,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Will Change"],
      initial: "auto",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/will-change"
    },
    "word-break": {
      syntax: "normal | break-all | keep-all | break-word",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-break"
    },
    "word-spacing": {
      syntax: "normal | <length>",
      media: "visual",
      inherited: true,
      animationType: "length",
      percentages: "referToWidthOfAffectedGlyph",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "allElements",
      computed: "absoluteLength",
      order: "uniqueOrder",
      alsoAppliesTo: [
        "::first-letter",
        "::first-line",
        "::placeholder"
      ],
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
    },
    "word-wrap": {
      syntax: "normal | break-word",
      media: "visual",
      inherited: true,
      animationType: "discrete",
      percentages: "no",
      groups: ["CSS Text"],
      initial: "normal",
      appliesto: "nonReplacedInlineElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
    },
    "writing-mode": {
      syntax: "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
      media: "visual",
      inherited: true,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["CSS Writing Modes"],
      initial: "horizontal-tb",
      appliesto: "allElementsExceptTableRowColumnGroupsTableRowsColumns",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
    },
    x: {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportWidth",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsGeometry",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/x"
    },
    y: {
      syntax: "<length> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "byComputedValueType",
      percentages: "referToSVGViewportHeight",
      groups: ["Scalable Vector Graphics"],
      initial: "0",
      appliesto: "limitedSVGElementsGeometry",
      computed: "percentageAsSpecifiedOrAbsoluteLength",
      order: "perGrammar",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/y"
    },
    "z-index": {
      syntax: "auto | <integer>",
      media: "visual",
      inherited: false,
      animationType: "integer",
      percentages: "no",
      groups: ["CSS Positioning"],
      initial: "auto",
      appliesto: "positionedElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      stacking: true,
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/z-index"
    },
    zoom: {
      syntax: "normal | reset | <number> | <percentage>",
      media: "visual",
      inherited: false,
      animationType: "notAnimatable",
      percentages: "no",
      groups: ["Microsoft Extensions"],
      initial: "normal",
      appliesto: "allElements",
      computed: "asSpecified",
      order: "uniqueOrder",
      status: "standard",
      mdn_url: "https://developer.mozilla.org/docs/Web/CSS/zoom"
    }
  };
  mdnSyntaxes = {
    "abs()": { syntax: "abs( <calc-sum> )" },
    "absolute-size": { syntax: "xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large" },
    "acos()": { syntax: "acos( <calc-sum> )" },
    "alpha-value": { syntax: "<number> | <percentage>" },
    "angle-percentage": { syntax: "<angle> | <percentage>" },
    "angular-color-hint": { syntax: "<angle-percentage>" },
    "angular-color-stop": { syntax: "<color> && <color-stop-angle>?" },
    "angular-color-stop-list": { syntax: "[ <angular-color-stop> [, <angular-color-hint>]? ]# , <angular-color-stop>" },
    "animateable-feature": { syntax: "scroll-position | contents | <custom-ident>" },
    "asin()": { syntax: "asin( <calc-sum> )" },
    "atan()": { syntax: "atan( <calc-sum> )" },
    "atan2()": { syntax: "atan2( <calc-sum>, <calc-sum> )" },
    attachment: { syntax: "scroll | fixed | local" },
    "attr()": { syntax: "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )" },
    "attr-matcher": { syntax: "[ '~' | '|' | '^' | '$' | '*' ]? '='" },
    "attr-modifier": { syntax: "i | s" },
    "attribute-selector": { syntax: "'[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'" },
    "auto-repeat": { syntax: "repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )" },
    "auto-track-list": { syntax: `[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>? <auto-repeat>
[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?` },
    axis: { syntax: "block | inline | x | y" },
    "baseline-position": { syntax: "[ first | last ]? baseline" },
    "basic-shape": { syntax: "<inset()> | <circle()> | <ellipse()> | <polygon()> | <path()>" },
    "bg-image": { syntax: "none | <image>" },
    "bg-layer": { syntax: "<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>" },
    "bg-position": { syntax: "[ [ left | center | right | top | bottom | <length-percentage> ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ] | [ center | [ left | right ] <length-percentage>? ] && [ center | [ top | bottom ] <length-percentage>? ] ]" },
    "bg-size": { syntax: "[ <length-percentage> | auto ]{1,2} | cover | contain" },
    "blur()": { syntax: "blur( <length> )" },
    "blend-mode": { syntax: "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity" },
    box: { syntax: "border-box | padding-box | content-box" },
    "brightness()": { syntax: "brightness( <number-percentage> )" },
    "calc()": { syntax: "calc( <calc-sum> )" },
    "calc-sum": { syntax: "<calc-product> [ [ '+' | '-' ] <calc-product> ]*" },
    "calc-product": { syntax: "<calc-value> [ '*' <calc-value> | '/' <number> ]*" },
    "calc-value": { syntax: "<number> | <dimension> | <percentage> | <calc-constant> | ( <calc-sum> )" },
    "calc-constant": { syntax: "e | pi | infinity | -infinity | NaN" },
    "cf-final-image": { syntax: "<image> | <color>" },
    "cf-mixing-image": { syntax: "<percentage>? && <image>" },
    "circle()": { syntax: "circle( [ <shape-radius> ]? [ at <position> ]? )" },
    "clamp()": { syntax: "clamp( <calc-sum>#{3} )" },
    "class-selector": { syntax: "'.' <ident-token>" },
    "clip-source": { syntax: "<url>" },
    color: { syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()> | <hex-color> | <named-color> | <system-color> | <deprecated-system-color> | currentcolor | transparent" },
    "color-stop": { syntax: "<color-stop-length> | <color-stop-angle>" },
    "color-stop-angle": { syntax: "<angle-percentage>{1,2}" },
    "color-stop-length": { syntax: "<length-percentage>{1,2}" },
    "color-stop-list": { syntax: "[ <linear-color-stop> [, <linear-color-hint>]? ]# , <linear-color-stop>" },
    "color-interpolation-method": { syntax: "in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? ]" },
    combinator: { syntax: "'>' | '+' | '~' | [ '||' ]" },
    "common-lig-values": { syntax: "[ common-ligatures | no-common-ligatures ]" },
    "compat-auto": { syntax: "searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar | button" },
    "composite-style": { syntax: "clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor" },
    "compositing-operator": { syntax: "add | subtract | intersect | exclude" },
    "compound-selector": { syntax: "[ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]!" },
    "compound-selector-list": { syntax: "<compound-selector>#" },
    "complex-selector": { syntax: "<compound-selector> [ <combinator>? <compound-selector> ]*" },
    "complex-selector-list": { syntax: "<complex-selector>#" },
    "conic-gradient()": { syntax: "conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )" },
    "contextual-alt-values": { syntax: "[ contextual | no-contextual ]" },
    "content-distribution": { syntax: "space-between | space-around | space-evenly | stretch" },
    "content-list": { syntax: "[ <string> | contents | <image> | <counter> | <quote> | <target> | <leader()> ]+" },
    "content-position": { syntax: "center | start | end | flex-start | flex-end" },
    "content-replacement": { syntax: "<image>" },
    "contrast()": { syntax: "contrast( [ <number-percentage> ] )" },
    "cos()": { syntax: "cos( <calc-sum> )" },
    counter: { syntax: "<counter()> | <counters()>" },
    "counter()": { syntax: "counter( <counter-name>, <counter-style>? )" },
    "counter-name": { syntax: "<custom-ident>" },
    "counter-style": { syntax: "<counter-style-name> | symbols()" },
    "counter-style-name": { syntax: "<custom-ident>" },
    "counters()": { syntax: "counters( <counter-name>, <string>, <counter-style>? )" },
    "cross-fade()": { syntax: "cross-fade( <cf-mixing-image> , <cf-final-image>? )" },
    "cubic-bezier-timing-function": { syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)" },
    "deprecated-system-color": { syntax: "ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText" },
    "discretionary-lig-values": { syntax: "[ discretionary-ligatures | no-discretionary-ligatures ]" },
    "display-box": { syntax: "contents | none" },
    "display-inside": { syntax: "flow | flow-root | table | flex | grid | ruby" },
    "display-internal": { syntax: "table-row-group | table-header-group | table-footer-group | table-row | table-cell | table-column-group | table-column | table-caption | ruby-base | ruby-text | ruby-base-container | ruby-text-container" },
    "display-legacy": { syntax: "inline-block | inline-list-item | inline-table | inline-flex | inline-grid" },
    "display-listitem": { syntax: "<display-outside>? && [ flow | flow-root ]? && list-item" },
    "display-outside": { syntax: "block | inline | run-in" },
    "drop-shadow()": { syntax: "drop-shadow( <length>{2,3} <color>? )" },
    "east-asian-variant-values": { syntax: "[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]" },
    "east-asian-width-values": { syntax: "[ full-width | proportional-width ]" },
    "element()": { syntax: "element( <id-selector> )" },
    "ellipse()": { syntax: "ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )" },
    "ending-shape": { syntax: "circle | ellipse" },
    "env()": { syntax: "env( <custom-ident> , <declaration-value>? )" },
    "exp()": { syntax: "exp( <calc-sum> )" },
    "explicit-track-list": { syntax: "[ <line-names>? <track-size> ]+ <line-names>?" },
    "family-name": { syntax: "<string> | <custom-ident>+" },
    "feature-tag-value": { syntax: "<string> [ <integer> | on | off ]?" },
    "feature-type": { syntax: "@stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation" },
    "feature-value-block": { syntax: "<feature-type> '{' <feature-value-declaration-list> '}'" },
    "feature-value-block-list": { syntax: "<feature-value-block>+" },
    "feature-value-declaration": { syntax: "<custom-ident>: <integer>+;" },
    "feature-value-declaration-list": { syntax: "<feature-value-declaration>" },
    "feature-value-name": { syntax: "<custom-ident>" },
    "fill-rule": { syntax: "nonzero | evenodd" },
    "filter-function": { syntax: "<blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>" },
    "filter-function-list": { syntax: "[ <filter-function> | <url> ]+" },
    "final-bg-layer": { syntax: "<'background-color'> || <bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>" },
    "fixed-breadth": { syntax: "<length-percentage>" },
    "fixed-repeat": { syntax: "repeat( [ <integer [1,∞]> ] , [ <line-names>? <fixed-size> ]+ <line-names>? )" },
    "fixed-size": { syntax: "<fixed-breadth> | minmax( <fixed-breadth> , <track-breadth> ) | minmax( <inflexible-breadth> , <fixed-breadth> )" },
    "font-stretch-absolute": { syntax: "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage>" },
    "font-variant-css21": { syntax: "[ normal | small-caps ]" },
    "font-weight-absolute": { syntax: "normal | bold | <number [1,1000]>" },
    "frequency-percentage": { syntax: "<frequency> | <percentage>" },
    "general-enclosed": { syntax: "[ <function-token> <any-value> ) ] | ( <ident> <any-value> )" },
    "generic-family": { syntax: "serif | sans-serif | cursive | fantasy | monospace" },
    "generic-name": { syntax: "serif | sans-serif | cursive | fantasy | monospace" },
    "geometry-box": { syntax: "<shape-box> | fill-box | stroke-box | view-box" },
    gradient: { syntax: "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()> | <repeating-conic-gradient()>" },
    "grayscale()": { syntax: "grayscale( <number-percentage> )" },
    "grid-line": { syntax: "auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]" },
    "historical-lig-values": { syntax: "[ historical-ligatures | no-historical-ligatures ]" },
    "hsl()": { syntax: "hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )" },
    "hsla()": { syntax: "hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )" },
    hue: { syntax: "<number> | <angle>" },
    "hue-rotate()": { syntax: "hue-rotate( <angle> )" },
    "hue-interpolation-method": { syntax: "[ shorter | longer | increasing | decreasing ] hue" },
    "hwb()": { syntax: "hwb( [<hue> | none] [<percentage> | none] [<percentage> | none] [ / [<alpha-value> | none] ]? )" },
    "hypot()": { syntax: "hypot( <calc-sum># )" },
    "id-selector": { syntax: "<hash-token>" },
    image: { syntax: "<url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>" },
    "image()": { syntax: "image( <image-tags>? [ <image-src>? , <color>? ]! )" },
    "image-set()": { syntax: "image-set( <image-set-option># )" },
    "image-set-option": { syntax: "[ <image> | <string> ] [ <resolution> || type(<string>) ]" },
    "image-src": { syntax: "<url> | <string>" },
    "image-tags": { syntax: "ltr | rtl" },
    "inflexible-breadth": { syntax: "<length-percentage> | min-content | max-content | auto" },
    "inset()": { syntax: "inset( <length-percentage>{1,4} [ round <'border-radius'> ]? )" },
    "invert()": { syntax: "invert( <number-percentage> )" },
    "keyframes-name": { syntax: "<custom-ident> | <string>" },
    "keyframe-block": { syntax: `<keyframe-selector># {
  <declaration-list>
}` },
    "keyframe-block-list": { syntax: "<keyframe-block>+" },
    "keyframe-selector": { syntax: "from | to | <percentage> | <timeline-range-name> <percentage>" },
    "lab()": { syntax: "lab( [<percentage> | <number> | none] [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ / [<alpha-value> | none] ]? )" },
    "layer()": { syntax: "layer( <layer-name> )" },
    "layer-name": { syntax: "<ident> [ '.' <ident> ]*" },
    "lch()": { syntax: "lch( [<percentage> | <number> | none] [ <percentage> | <number> | none] [ <hue> | none] [ / [<alpha-value> | none] ]? )" },
    "leader()": { syntax: "leader( <leader-type> )" },
    "leader-type": { syntax: "dotted | solid | space | <string>" },
    "length-percentage": { syntax: "<length> | <percentage>" },
    "light-dark()": { syntax: "light-dark( <color>, <color> )" },
    "line-names": { syntax: "'[' <custom-ident>* ']'" },
    "line-name-list": { syntax: "[ <line-names> | <name-repeat> ]+" },
    "line-style": { syntax: "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset" },
    "line-width": { syntax: "<length> | thin | medium | thick" },
    "linear-color-hint": { syntax: "<length-percentage>" },
    "linear-color-stop": { syntax: "<color> <color-stop-length>?" },
    "linear-gradient()": { syntax: "linear-gradient( [ [ <angle> | to <side-or-corner> ] || <color-interpolation-method> ]? , <color-stop-list> )" },
    "log()": { syntax: "log( <calc-sum>, <calc-sum>? )" },
    "mask-layer": { syntax: "<mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator> || <masking-mode>" },
    "mask-position": { syntax: "[ <length-percentage> | left | center | right ] [ <length-percentage> | top | center | bottom ]?" },
    "mask-reference": { syntax: "none | <image> | <mask-source>" },
    "mask-source": { syntax: "<url>" },
    "masking-mode": { syntax: "alpha | luminance | match-source" },
    "matrix()": { syntax: "matrix( <number>#{6} )" },
    "matrix3d()": { syntax: "matrix3d( <number>#{16} )" },
    "max()": { syntax: "max( <calc-sum># )" },
    "media-and": { syntax: "<media-in-parens> [ and <media-in-parens> ]+" },
    "media-condition": { syntax: "<media-not> | <media-and> | <media-or> | <media-in-parens>" },
    "media-condition-without-or": { syntax: "<media-not> | <media-and> | <media-in-parens>" },
    "media-feature": { syntax: "( [ <mf-plain> | <mf-boolean> | <mf-range> ] )" },
    "media-in-parens": { syntax: "( <media-condition> ) | <media-feature> | <general-enclosed>" },
    "media-not": { syntax: "not <media-in-parens>" },
    "media-or": { syntax: "<media-in-parens> [ or <media-in-parens> ]+" },
    "media-query": { syntax: "<media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]?" },
    "media-query-list": { syntax: "<media-query>#" },
    "media-type": { syntax: "<ident>" },
    "mf-boolean": { syntax: "<mf-name>" },
    "mf-name": { syntax: "<ident>" },
    "mf-plain": { syntax: "<mf-name> : <mf-value>" },
    "mf-range": { syntax: `<mf-name> [ '<' | '>' ]? '='? <mf-value>
| <mf-value> [ '<' | '>' ]? '='? <mf-name>
| <mf-value> '<' '='? <mf-name> '<' '='? <mf-value>
| <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>` },
    "mf-value": { syntax: "<number> | <dimension> | <ident> | <ratio>" },
    "min()": { syntax: "min( <calc-sum># )" },
    "minmax()": { syntax: "minmax( [ <length-percentage> | min-content | max-content | auto ] , [ <length-percentage> | <flex> | min-content | max-content | auto ] )" },
    "mod()": { syntax: "mod( <calc-sum>, <calc-sum> )" },
    "name-repeat": { syntax: "repeat( [ <integer [1,∞]> | auto-fill ], <line-names>+ )" },
    "named-color": { syntax: "transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen" },
    "namespace-prefix": { syntax: "<ident>" },
    "ns-prefix": { syntax: "[ <ident-token> | '*' ]? '|'" },
    "number-percentage": { syntax: "<number> | <percentage>" },
    "numeric-figure-values": { syntax: "[ lining-nums | oldstyle-nums ]" },
    "numeric-fraction-values": { syntax: "[ diagonal-fractions | stacked-fractions ]" },
    "numeric-spacing-values": { syntax: "[ proportional-nums | tabular-nums ]" },
    nth: { syntax: "<an-plus-b> | even | odd" },
    "opacity()": { syntax: "opacity( [ <number-percentage> ] )" },
    "overflow-position": { syntax: "unsafe | safe" },
    "outline-radius": { syntax: "<length> | <percentage>" },
    "page-body": { syntax: "<declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>" },
    "page-margin-box": { syntax: "<page-margin-box-type> '{' <declaration-list> '}'" },
    "page-margin-box-type": { syntax: "@top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom" },
    "page-selector-list": { syntax: "[ <page-selector># ]?" },
    "page-selector": { syntax: "<pseudo-page>+ | <ident> <pseudo-page>*" },
    "page-size": { syntax: "A5 | A4 | A3 | B5 | B4 | JIS-B5 | JIS-B4 | letter | legal | ledger" },
    "path()": { syntax: "path( [ <fill-rule>, ]? <string> )" },
    "paint()": { syntax: "paint( <ident>, <declaration-value>? )" },
    "perspective()": { syntax: "perspective( [ <length [0,∞]> | none ] )" },
    "polygon()": { syntax: "polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )" },
    "polar-color-space": { syntax: "hsl | hwb | lch | oklch" },
    position: { syntax: "[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]" },
    "pow()": { syntax: "pow( <calc-sum>, <calc-sum> )" },
    "pseudo-class-selector": { syntax: "':' <ident-token> | ':' <function-token> <any-value> ')'" },
    "pseudo-element-selector": { syntax: "':' <pseudo-class-selector>" },
    "pseudo-page": { syntax: ": [ left | right | first | blank ]" },
    quote: { syntax: "open-quote | close-quote | no-open-quote | no-close-quote" },
    "radial-gradient()": { syntax: "radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )" },
    ratio: { syntax: "<number [0,∞]> [ / <number [0,∞]> ]?" },
    "ray()": { syntax: "ray( <angle> && <ray-size>? && contain? && [at <position>]? )" },
    "ray-size": { syntax: "closest-side | closest-corner | farthest-side | farthest-corner | sides" },
    "rectangular-color-space": { syntax: "srgb | srgb-linear | display-p3 | a98-rgb | prophoto-rgb | rec2020 | lab | oklab | xyz | xyz-d50 | xyz-d65" },
    "relative-selector": { syntax: "<combinator>? <complex-selector>" },
    "relative-selector-list": { syntax: "<relative-selector>#" },
    "relative-size": { syntax: "larger | smaller" },
    "rem()": { syntax: "rem( <calc-sum>, <calc-sum> )" },
    "repeat-style": { syntax: "repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}" },
    "repeating-conic-gradient()": { syntax: "repeating-conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )" },
    "repeating-linear-gradient()": { syntax: "repeating-linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )" },
    "repeating-radial-gradient()": { syntax: "repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )" },
    "reversed-counter-name": { syntax: "reversed( <counter-name> )" },
    "rgb()": { syntax: "rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )" },
    "rgba()": { syntax: "rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )" },
    "rotate()": { syntax: "rotate( [ <angle> | <zero> ] )" },
    "rotate3d()": { syntax: "rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )" },
    "rotateX()": { syntax: "rotateX( [ <angle> | <zero> ] )" },
    "rotateY()": { syntax: "rotateY( [ <angle> | <zero> ] )" },
    "rotateZ()": { syntax: "rotateZ( [ <angle> | <zero> ] )" },
    "round()": { syntax: "round( <rounding-strategy>?, <calc-sum>, <calc-sum> )" },
    "rounding-strategy": { syntax: "nearest | up | down | to-zero" },
    "saturate()": { syntax: "saturate( <number-percentage> )" },
    "scale()": { syntax: "scale( [ <number> | <percentage> ]#{1,2} )" },
    "scale3d()": { syntax: "scale3d( [ <number> | <percentage> ]#{3} )" },
    "scaleX()": { syntax: "scaleX( [ <number> | <percentage> ] )" },
    "scaleY()": { syntax: "scaleY( [ <number> | <percentage> ] )" },
    "scaleZ()": { syntax: "scaleZ( [ <number> | <percentage> ] )" },
    "scroll()": { syntax: "scroll( [ <axis> || <scroller> ]? )" },
    scroller: { syntax: "root | nearest | self" },
    "self-position": { syntax: "center | start | end | self-start | self-end | flex-start | flex-end" },
    "shape-radius": { syntax: "<length-percentage> | closest-side | farthest-side" },
    "sign()": { syntax: "sign( <calc-sum> )" },
    "skew()": { syntax: "skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]? )" },
    "skewX()": { syntax: "skewX( [ <angle> | <zero> ] )" },
    "skewY()": { syntax: "skewY( [ <angle> | <zero> ] )" },
    "sepia()": { syntax: "sepia( <number-percentage> )" },
    shadow: { syntax: "inset? && <length>{2,4} && <color>?" },
    "shadow-t": { syntax: "[ <length>{2,3} && <color>? ]" },
    shape: { syntax: "rect(<top>, <right>, <bottom>, <left>)" },
    "shape-box": { syntax: "<box> | margin-box" },
    "side-or-corner": { syntax: "[ left | right ] || [ top | bottom ]" },
    "sin()": { syntax: "sin( <calc-sum> )" },
    "single-animation": { syntax: "<'animation-duration'> || <easing-function> || <'animation-delay'> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ] || <single-animation-timeline>" },
    "single-animation-direction": { syntax: "normal | reverse | alternate | alternate-reverse" },
    "single-animation-fill-mode": { syntax: "none | forwards | backwards | both" },
    "single-animation-iteration-count": { syntax: "infinite | <number>" },
    "single-animation-play-state": { syntax: "running | paused" },
    "single-animation-timeline": { syntax: "auto | none | <dashed-ident> | <scroll()> | <view()>" },
    "single-transition": { syntax: "[ none | <single-transition-property> ] || <time> || <easing-function> || <time> || <transition-behavior-value>" },
    "single-transition-property": { syntax: "all | <custom-ident>" },
    size: { syntax: "closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}" },
    "sqrt()": { syntax: "sqrt( <calc-sum> )" },
    "step-position": { syntax: "jump-start | jump-end | jump-none | jump-both | start | end" },
    "step-timing-function": { syntax: "step-start | step-end | steps(<integer>[, <step-position>]?)" },
    "subclass-selector": { syntax: "<id-selector> | <class-selector> | <attribute-selector> | <pseudo-class-selector>" },
    "supports-condition": { syntax: "not <supports-in-parens> | <supports-in-parens> [ and <supports-in-parens> ]* | <supports-in-parens> [ or <supports-in-parens> ]*" },
    "supports-in-parens": { syntax: "( <supports-condition> ) | <supports-feature> | <general-enclosed>" },
    "supports-feature": { syntax: "<supports-decl> | <supports-selector-fn>" },
    "supports-decl": { syntax: "( <declaration> )" },
    "supports-selector-fn": { syntax: "selector( <complex-selector> )" },
    symbol: { syntax: "<string> | <image> | <custom-ident>" },
    "system-color": { syntax: "AccentColor | AccentColorText | ActiveText | ButtonBorder | ButtonFace | ButtonText | Canvas | CanvasText | Field | FieldText | GrayText | Highlight | HighlightText | LinkText | Mark | MarkText | SelectedItem | SelectedItemText | VisitedText" },
    "tan()": { syntax: "tan( <calc-sum> )" },
    target: { syntax: "<target-counter()> | <target-counters()> | <target-text()>" },
    "target-counter()": { syntax: "target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )" },
    "target-counters()": { syntax: "target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )" },
    "target-text()": { syntax: "target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )" },
    "time-percentage": { syntax: "<time> | <percentage>" },
    "timeline-range-name": { syntax: "cover | contain | entry | exit | entry-crossing | exit-crossing" },
    "easing-function": { syntax: "linear | <cubic-bezier-timing-function> | <step-timing-function>" },
    "track-breadth": { syntax: "<length-percentage> | <flex> | min-content | max-content | auto" },
    "track-list": { syntax: "[ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?" },
    "track-repeat": { syntax: "repeat( [ <integer [1,∞]> ] , [ <line-names>? <track-size> ]+ <line-names>? )" },
    "track-size": { syntax: "<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( <length-percentage> )" },
    "transform-function": { syntax: "<matrix()> | <translate()> | <translateX()> | <translateY()> | <scale()> | <scaleX()> | <scaleY()> | <rotate()> | <skew()> | <skewX()> | <skewY()> | <matrix3d()> | <translate3d()> | <translateZ()> | <scale3d()> | <scaleZ()> | <rotate3d()> | <rotateX()> | <rotateY()> | <rotateZ()> | <perspective()>" },
    "transform-list": { syntax: "<transform-function>+" },
    "transition-behavior-value": { syntax: "normal | allow-discrete" },
    "translate()": { syntax: "translate( <length-percentage> , <length-percentage>? )" },
    "translate3d()": { syntax: "translate3d( <length-percentage> , <length-percentage> , <length> )" },
    "translateX()": { syntax: "translateX( <length-percentage> )" },
    "translateY()": { syntax: "translateY( <length-percentage> )" },
    "translateZ()": { syntax: "translateZ( <length> )" },
    "type-or-unit": { syntax: "string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | Q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | Hz | kHz | %" },
    "type-selector": { syntax: "<wq-name> | <ns-prefix>? '*'" },
    "var()": { syntax: "var( <custom-property-name> , <declaration-value>? )" },
    "view()": { syntax: "view([<axis> || <'view-timeline-inset'>]?)" },
    "viewport-length": { syntax: "auto | <length-percentage>" },
    "visual-box": { syntax: "content-box | padding-box | border-box" },
    "wq-name": { syntax: "<ns-prefix>? <ident-token>" }
  };
  hasOwn = Object.hasOwn || ((object2, property$1) => Object.prototype.hasOwnProperty.call(object2, property$1));
  extendSyntax = /^\s*\|\s*/;
  data_default = {
    types: patchDictionary(mdnSyntaxes, data_patch_default.types),
    atrules: patchAtrules(preprocessAtrules(mdnAtrules), data_patch_default.atrules),
    properties: patchDictionary(mdnProperties, data_patch_default.properties)
  };
  AnPlusB_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$49,
    name: () => name$48,
    parse: () => parse$49,
    structure: () => structure$48
  });
  structure$48 = {
    a: [String, null],
    b: [String, null]
  };
  Atrule_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$48,
    name: () => name$47,
    parse: () => parse$48,
    structure: () => structure$47,
    walkContext: () => walkContext$9
  });
  structure$47 = {
    name: String,
    prelude: [
      "AtrulePrelude",
      "Raw",
      null
    ],
    block: ["Block", null]
  };
  AtrulePrelude_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$47,
    name: () => name$46,
    parse: () => parse$47,
    structure: () => structure$46,
    walkContext: () => walkContext$8
  });
  structure$46 = { children: [[]] };
  AttributeSelector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$46,
    name: () => name$45,
    parse: () => parse$46,
    structure: () => structure$45
  });
  structure$45 = {
    name: "Identifier",
    matcher: [String, null],
    value: [
      "String",
      "Identifier",
      null
    ],
    flags: [String, null]
  };
  Block_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$45,
    name: () => name$44,
    parse: () => parse$45,
    structure: () => structure$44,
    walkContext: () => walkContext$7
  });
  structure$44 = { children: [[
    "Atrule",
    "Rule",
    "Declaration"
  ]] };
  Brackets_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$44,
    name: () => name$43,
    parse: () => parse$44,
    structure: () => structure$43
  });
  structure$43 = { children: [[]] };
  CDC_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$43,
    name: () => name$42,
    parse: () => parse$43,
    structure: () => structure$42
  });
  structure$42 = [];
  CDO_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$42,
    name: () => name$41,
    parse: () => parse$42,
    structure: () => structure$41
  });
  structure$41 = [];
  ClassSelector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$41,
    name: () => name$40,
    parse: () => parse$41,
    structure: () => structure$40
  });
  structure$40 = { name: String };
  Combinator_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$40,
    name: () => name$39,
    parse: () => parse$40,
    structure: () => structure$39
  });
  structure$39 = { name: String };
  Comment_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$39,
    name: () => name$38,
    parse: () => parse$39,
    structure: () => structure$38
  });
  structure$38 = { value: String };
  Condition_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$38,
    name: () => name$37,
    parse: () => parse$38,
    structure: () => structure$37
  });
  likelyFeatureToken = new Set([
    Colon,
    RightParenthesis,
    EOF$1
  ]);
  structure$37 = {
    kind: String,
    children: [[
      "Identifier",
      "Feature",
      "FeatureFunction",
      "FeatureRange",
      "SupportsDeclaration"
    ]]
  };
  parentheses = {
    media: featureOrRange,
    container: featureOrRange,
    supports() {
      return this.SupportsDeclaration();
    }
  };
  Declaration_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$37,
    name: () => name$36,
    parse: () => parse$37,
    structure: () => structure$36,
    walkContext: () => walkContext$6
  });
  structure$36 = {
    important: [Boolean, String],
    property: String,
    value: ["Value", "Raw"]
  };
  DeclarationList_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$36,
    name: () => name$35,
    parse: () => parse$36,
    structure: () => structure$35
  });
  structure$35 = { children: [[
    "Declaration",
    "Atrule",
    "Rule"
  ]] };
  Dimension_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$35,
    name: () => name$34,
    parse: () => parse$35,
    structure: () => structure$34
  });
  structure$34 = {
    value: String,
    unit: String
  };
  Feature_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$34,
    name: () => name$33,
    parse: () => parse$34,
    structure: () => structure$33
  });
  structure$33 = {
    kind: String,
    name: String,
    value: [
      "Identifier",
      "Number",
      "Dimension",
      "Ratio",
      "Function",
      null
    ]
  };
  FeatureFunction_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$33,
    name: () => name$32,
    parse: () => parse$33,
    structure: () => structure$32
  });
  structure$32 = {
    kind: String,
    feature: String,
    value: ["Declaration", "Selector"]
  };
  FeatureRange_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$32,
    name: () => name$31,
    parse: () => parse$32,
    structure: () => structure$31
  });
  structure$31 = {
    kind: String,
    left: [
      "Identifier",
      "Number",
      "Dimension",
      "Ratio",
      "Function"
    ],
    leftComparison: String,
    middle: [
      "Identifier",
      "Number",
      "Dimension",
      "Ratio",
      "Function"
    ],
    rightComparison: [String, null],
    right: [
      "Identifier",
      "Number",
      "Dimension",
      "Ratio",
      "Function",
      null
    ]
  };
  Function_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$31,
    name: () => name$30,
    parse: () => parse$31,
    structure: () => structure$30,
    walkContext: () => walkContext$5
  });
  structure$30 = {
    name: String,
    children: [[]]
  };
  GeneralEnclosed_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$30,
    name: () => name$29,
    parse: () => parse$30,
    structure: () => structure$29
  });
  structure$29 = {
    kind: String,
    function: [String, null],
    children: [[]]
  };
  Hash_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$29,
    name: () => name$28,
    parse: () => parse$29,
    structure: () => structure$28,
    xxx: () => xxx
  });
  structure$28 = { value: String };
  Identifier_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$28,
    name: () => name$27,
    parse: () => parse$28,
    structure: () => structure$27
  });
  structure$27 = { name: String };
  IdSelector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$27,
    name: () => name$26,
    parse: () => parse$27,
    structure: () => structure$26
  });
  structure$26 = { name: String };
  Layer_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$26,
    name: () => name$25,
    parse: () => parse$26,
    structure: () => structure$25
  });
  structure$25 = { name: String };
  LayerList_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$25,
    name: () => name$24,
    parse: () => parse$25,
    structure: () => structure$24
  });
  structure$24 = { children: [["Layer"]] };
  MediaQuery_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$24,
    name: () => name$23,
    parse: () => parse$24,
    structure: () => structure$23
  });
  structure$23 = {
    modifier: [String, null],
    mediaType: [String, null],
    condition: ["Condition", null]
  };
  MediaQueryList_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$23,
    name: () => name$22,
    parse: () => parse$23,
    structure: () => structure$22
  });
  structure$22 = { children: [["MediaQuery"]] };
  NestingSelector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$22,
    name: () => name$21,
    parse: () => parse$22,
    structure: () => structure$21
  });
  structure$21 = {};
  Nth_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$21,
    name: () => name$20,
    parse: () => parse$21,
    structure: () => structure$20
  });
  structure$20 = {
    nth: ["AnPlusB", "Identifier"],
    selector: ["SelectorList", null]
  };
  Number_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$20,
    name: () => name$19,
    parse: () => parse$20,
    structure: () => structure$19
  });
  structure$19 = { value: String };
  Operator_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$19,
    name: () => name$18,
    parse: () => parse$19,
    structure: () => structure$18
  });
  structure$18 = { value: String };
  Parentheses_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$18,
    name: () => name$17,
    parse: () => parse$18,
    structure: () => structure$17
  });
  structure$17 = { children: [[]] };
  Percentage_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$17,
    name: () => name$16,
    parse: () => parse$17,
    structure: () => structure$16
  });
  structure$16 = { value: String };
  PseudoClassSelector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$16,
    name: () => name$15,
    parse: () => parse$16,
    structure: () => structure$15,
    walkContext: () => walkContext$4
  });
  structure$15 = {
    name: String,
    children: [["Raw"], null]
  };
  PseudoElementSelector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$15,
    name: () => name$14,
    parse: () => parse$15,
    structure: () => structure$14,
    walkContext: () => walkContext$3
  });
  structure$14 = {
    name: String,
    children: [["Raw"], null]
  };
  Ratio_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$14,
    name: () => name$13,
    parse: () => parse$14,
    structure: () => structure$13
  });
  structure$13 = {
    left: ["Number", "Function"],
    right: [
      "Number",
      "Function",
      null
    ]
  };
  Raw_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$13,
    name: () => name$12,
    parse: () => parse$13,
    structure: () => structure$12
  });
  structure$12 = { value: String };
  Rule_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$12,
    name: () => name$11,
    parse: () => parse$12,
    structure: () => structure$11,
    walkContext: () => walkContext$2
  });
  structure$11 = {
    prelude: ["SelectorList", "Raw"],
    block: ["Block"]
  };
  Scope_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$11,
    name: () => name$10,
    parse: () => parse$11,
    structure: () => structure$10
  });
  structure$10 = {
    root: [
      "SelectorList",
      "Raw",
      null
    ],
    limit: [
      "SelectorList",
      "Raw",
      null
    ]
  };
  Selector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$10,
    name: () => name$9,
    parse: () => parse$10,
    structure: () => structure$9
  });
  structure$9 = { children: [[
    "TypeSelector",
    "IdSelector",
    "ClassSelector",
    "AttributeSelector",
    "PseudoClassSelector",
    "PseudoElementSelector",
    "Combinator"
  ]] };
  SelectorList_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$9,
    name: () => name$8,
    parse: () => parse$9,
    structure: () => structure$8,
    walkContext: () => walkContext$1
  });
  structure$8 = { children: [["Selector", "Raw"]] };
  String_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$8,
    name: () => name$7,
    parse: () => parse$8,
    structure: () => structure$7
  });
  structure$7 = { value: String };
  StyleSheet_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$7,
    name: () => name$6,
    parse: () => parse$7,
    structure: () => structure$6,
    walkContext: () => walkContext
  });
  structure$6 = { children: [[
    "Comment",
    "CDO",
    "CDC",
    "Atrule",
    "Rule",
    "Raw"
  ]] };
  SupportsDeclaration_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$6,
    name: () => name$5,
    parse: () => parse$6,
    structure: () => structure$5
  });
  structure$5 = { declaration: "Declaration" };
  TypeSelector_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$5,
    name: () => name$4,
    parse: () => parse$5,
    structure: () => structure$4
  });
  structure$4 = { name: String };
  UnicodeRange_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$4,
    name: () => name$3,
    parse: () => parse$4,
    structure: () => structure$3
  });
  structure$3 = { value: String };
  Url_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$3,
    name: () => name$2,
    parse: () => parse$3,
    structure: () => structure$2
  });
  structure$2 = { value: String };
  Value_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$2,
    name: () => name$1,
    parse: () => parse$2,
    structure: () => structure$1
  });
  structure$1 = { children: [[]] };
  WhiteSpace_exports = /* @__PURE__ */ __exportAll({
    generate: () => generate$1,
    name: () => name2,
    parse: () => parse$1,
    structure: () => structure
  });
  SPACE = Object.freeze({
    type: "WhiteSpace",
    loc: null,
    value: " "
  });
  structure = { value: String };
  node_exports = /* @__PURE__ */ __exportAll({
    AnPlusB: () => AnPlusB_exports,
    Atrule: () => Atrule_exports,
    AtrulePrelude: () => AtrulePrelude_exports,
    AttributeSelector: () => AttributeSelector_exports,
    Block: () => Block_exports,
    Brackets: () => Brackets_exports,
    CDC: () => CDC_exports,
    CDO: () => CDO_exports,
    ClassSelector: () => ClassSelector_exports,
    Combinator: () => Combinator_exports,
    Comment: () => Comment_exports,
    Condition: () => Condition_exports,
    Declaration: () => Declaration_exports,
    DeclarationList: () => DeclarationList_exports,
    Dimension: () => Dimension_exports,
    Feature: () => Feature_exports,
    FeatureFunction: () => FeatureFunction_exports,
    FeatureRange: () => FeatureRange_exports,
    Function: () => Function_exports,
    GeneralEnclosed: () => GeneralEnclosed_exports,
    Hash: () => Hash_exports,
    IdSelector: () => IdSelector_exports,
    Identifier: () => Identifier_exports,
    Layer: () => Layer_exports,
    LayerList: () => LayerList_exports,
    MediaQuery: () => MediaQuery_exports,
    MediaQueryList: () => MediaQueryList_exports,
    NestingSelector: () => NestingSelector_exports,
    Nth: () => Nth_exports,
    Number: () => Number_exports,
    Operator: () => Operator_exports,
    Parentheses: () => Parentheses_exports,
    Percentage: () => Percentage_exports,
    PseudoClassSelector: () => PseudoClassSelector_exports,
    PseudoElementSelector: () => PseudoElementSelector_exports,
    Ratio: () => Ratio_exports,
    Raw: () => Raw_exports,
    Rule: () => Rule_exports,
    Scope: () => Scope_exports,
    Selector: () => Selector_exports,
    SelectorList: () => SelectorList_exports,
    String: () => String_exports,
    StyleSheet: () => StyleSheet_exports,
    SupportsDeclaration: () => SupportsDeclaration_exports,
    TypeSelector: () => TypeSelector_exports,
    UnicodeRange: () => UnicodeRange_exports,
    Url: () => Url_exports,
    Value: () => Value_exports,
    WhiteSpace: () => WhiteSpace_exports
  });
  lexer_default = {
    generic: true,
    cssWideKeywords,
    ...data_default,
    node: node_exports
  };
  atrulePrelude_default = { getNode: defaultRecognizer };
  selector_default = {
    onWhiteSpace,
    getNode
  };
  value_default = {
    getNode: defaultRecognizer,
    onWhiteSpace(next, children) {
      if (isPlusMinusOperator(next))
        next.value = " " + next.value;
      if (isPlusMinusOperator(children.last))
        children.last.value += " ";
    },
    expression: expression_default,
    var: var_default
  };
  scope_exports = /* @__PURE__ */ __exportAll({
    AtrulePrelude: () => atrulePrelude_default,
    Selector: () => selector_default,
    Value: () => value_default
  });
  nonContainerNameKeywords = new Set([
    "none",
    "and",
    "not",
    "or"
  ]);
  container_default = { parse: {
    prelude() {
      const children = this.createList();
      if (this.tokenType === Ident) {
        const name$49 = this.substring(this.tokenStart, this.tokenEnd);
        if (!nonContainerNameKeywords.has(name$49.toLowerCase()))
          children.push(this.Identifier());
      }
      children.push(this.Condition("container"));
      return children;
    },
    block(nested = false) {
      return this.Block(nested);
    }
  } };
  font_face_default = { parse: {
    prelude: null,
    block() {
      return this.Block(true);
    }
  } };
  parseFunctions = {
    layer() {
      this.skipSC();
      const children = this.createList();
      const node3 = parseWithFallback.call(this, this.Layer);
      if (node3.type !== "Raw" || node3.value !== "")
        children.push(node3);
      return children;
    },
    supports() {
      this.skipSC();
      const children = this.createList();
      const node3 = parseWithFallback.call(this, this.Declaration, () => parseWithFallback.call(this, () => this.Condition("supports")));
      if (node3.type !== "Raw" || node3.value !== "")
        children.push(node3);
      return children;
    }
  };
  import_default = { parse: {
    prelude() {
      const children = this.createList();
      switch (this.tokenType) {
        case String$1:
          children.push(this.String());
          break;
        case Url:
        case Function2:
          children.push(this.Url());
          break;
        default:
          this.error("String or url() is expected");
      }
      this.skipSC();
      if (this.tokenType === Ident && this.cmpStr(this.tokenStart, this.tokenEnd, "layer"))
        children.push(this.Identifier());
      else if (this.tokenType === Function2 && this.cmpStr(this.tokenStart, this.tokenEnd, "layer("))
        children.push(this.Function(null, parseFunctions));
      this.skipSC();
      if (this.tokenType === Function2 && this.cmpStr(this.tokenStart, this.tokenEnd, "supports("))
        children.push(this.Function(null, parseFunctions));
      if (this.lookupNonWSType(0) === Ident || this.lookupNonWSType(0) === LeftParenthesis)
        children.push(this.MediaQueryList());
      return children;
    },
    block: null
  } };
  layer_default = { parse: {
    prelude() {
      return this.createSingleNodeList(this.LayerList());
    },
    block() {
      return this.Block(false);
    }
  } };
  media_default = { parse: {
    prelude() {
      return this.createSingleNodeList(this.MediaQueryList());
    },
    block(nested = false) {
      return this.Block(nested);
    }
  } };
  nest_default = { parse: {
    prelude() {
      return this.createSingleNodeList(this.SelectorList());
    },
    block() {
      return this.Block(true);
    }
  } };
  page_default = { parse: {
    prelude() {
      return this.createSingleNodeList(this.SelectorList());
    },
    block() {
      return this.Block(true);
    }
  } };
  scope_default = { parse: {
    prelude() {
      return this.createSingleNodeList(this.Scope());
    },
    block(nested = false) {
      return this.Block(nested);
    }
  } };
  starting_style_default = { parse: {
    prelude: null,
    block(nested = false) {
      return this.Block(nested);
    }
  } };
  supports_default = { parse: {
    prelude() {
      return this.createSingleNodeList(this.Condition("supports"));
    },
    block(nested = false) {
      return this.Block(nested);
    }
  } };
  atrule_default = {
    container: container_default,
    "font-face": font_face_default,
    import: import_default,
    layer: layer_default,
    media: media_default,
    nest: nest_default,
    page: page_default,
    scope: scope_default,
    "starting-style": starting_style_default,
    supports: supports_default
  };
  selectorList = { parse() {
    return this.createSingleNodeList(this.SelectorList());
  } };
  selector = { parse() {
    return this.createSingleNodeList(this.Selector());
  } };
  identList = { parse() {
    return this.createSingleNodeList(this.Identifier());
  } };
  langList = { parse: parseLanguageRangeList };
  nth = { parse() {
    return this.createSingleNodeList(this.Nth());
  } };
  pseudo_default = {
    dir: identList,
    has: selectorList,
    lang: langList,
    matches: selectorList,
    is: selectorList,
    "-moz-any": selectorList,
    "-webkit-any": selectorList,
    where: selectorList,
    not: selectorList,
    "nth-child": nth,
    "nth-last-child": nth,
    "nth-last-of-type": nth,
    "nth-of-type": nth,
    slotted: selector,
    host: selector,
    "host-context": selector
  };
  index_parse_exports = /* @__PURE__ */ __exportAll({
    AnPlusB: () => parse$49,
    Atrule: () => parse$48,
    AtrulePrelude: () => parse$47,
    AttributeSelector: () => parse$46,
    Block: () => parse$45,
    Brackets: () => parse$44,
    CDC: () => parse$43,
    CDO: () => parse$42,
    ClassSelector: () => parse$41,
    Combinator: () => parse$40,
    Comment: () => parse$39,
    Condition: () => parse$38,
    Declaration: () => parse$37,
    DeclarationList: () => parse$36,
    Dimension: () => parse$35,
    Feature: () => parse$34,
    FeatureFunction: () => parse$33,
    FeatureRange: () => parse$32,
    Function: () => parse$31,
    GeneralEnclosed: () => parse$30,
    Hash: () => parse$29,
    IdSelector: () => parse$27,
    Identifier: () => parse$28,
    Layer: () => parse$26,
    LayerList: () => parse$25,
    MediaQuery: () => parse$24,
    MediaQueryList: () => parse$23,
    NestingSelector: () => parse$22,
    Nth: () => parse$21,
    Number: () => parse$20,
    Operator: () => parse$19,
    Parentheses: () => parse$18,
    Percentage: () => parse$17,
    PseudoClassSelector: () => parse$16,
    PseudoElementSelector: () => parse$15,
    Ratio: () => parse$14,
    Raw: () => parse$13,
    Rule: () => parse$12,
    Scope: () => parse$11,
    Selector: () => parse$10,
    SelectorList: () => parse$9,
    String: () => parse$8,
    StyleSheet: () => parse$7,
    SupportsDeclaration: () => parse$6,
    TypeSelector: () => parse$5,
    UnicodeRange: () => parse$4,
    Url: () => parse$3,
    Value: () => parse$2,
    WhiteSpace: () => parse$1
  });
  parser_default = {
    parseContext: {
      default: "StyleSheet",
      stylesheet: "StyleSheet",
      atrule: "Atrule",
      atrulePrelude(options2) {
        return this.AtrulePrelude(options2.atrule ? String(options2.atrule) : null);
      },
      mediaQueryList: "MediaQueryList",
      mediaQuery: "MediaQuery",
      condition(options2) {
        return this.Condition(options2.kind);
      },
      rule: "Rule",
      selectorList: "SelectorList",
      selector: "Selector",
      block() {
        return this.Block(true);
      },
      declarationList: "DeclarationList",
      declaration: "Declaration",
      value: "Value"
    },
    features: {
      supports: { selector() {
        return this.Selector();
      } },
      container: { style() {
        return this.Declaration();
      } }
    },
    scope: scope_exports,
    atrule: atrule_default,
    pseudo: pseudo_default,
    node: index_parse_exports
  };
  walker_default = { node: node_exports };
  syntax_default = create_default({
    ...lexer_default,
    ...parser_default,
    ...walker_default
  });
  ({ tokenize, parse: parse5, generate, lexer: lexer2, createLexer, walk, find, findLast, findAll, toPlainObject, fromPlainObject, fork } = syntax_default);
  LAB_TO_LMS = {
    l: [0.3963377773761749, 0.2158037573099136],
    m: [-0.1055613458156586, -0.0638541728258133],
    s: [-0.0894841775298119, -1.2914855480194092]
  };
  LSM_TO_RGB = {
    r: [
      4.076741636075958,
      -3.307711539258063,
      0.2309699031821043
    ],
    g: [
      -1.2684379732850315,
      2.609757349287688,
      -0.341319376002657
    ],
    b: [
      -0.0041960761386756,
      -0.7034186179359362,
      1.7076146940746117
    ]
  };
  promiseStates = /* @__PURE__ */ new Map;
  digitToNameMap = {
    "0": "zero",
    "1": "one",
    "2": "two",
    "3": "three",
    "4": "four",
    "5": "five",
    "6": "six",
    "7": "seven",
    "8": "eight",
    "9": "nine"
  };
  componentsToTreatAsElements = [
    Body,
    Button,
    CodeBlock,
    CodeInline,
    Container,
    Heading,
    Hr,
    Img,
    Link,
    Preview,
    Text3
  ];
  tailwind_stylesheets_default = css$3;
  preflight_default = css$2;
  theme_default = css$1;
  utilities_default = css;
  pixelBasedPreset = { theme: { extend: {
    fontSize: {
      xs: ["12px", { lineHeight: "16px" }],
      sm: ["14px", { lineHeight: "20px" }],
      base: ["16px", { lineHeight: "24px" }],
      lg: ["18px", { lineHeight: "28px" }],
      xl: ["20px", { lineHeight: "28px" }],
      "2xl": ["24px", { lineHeight: "32px" }],
      "3xl": ["30px", { lineHeight: "36px" }],
      "4xl": ["36px", { lineHeight: "36px" }],
      "5xl": ["48px", { lineHeight: "1" }],
      "6xl": ["60px", { lineHeight: "1" }],
      "7xl": ["72px", { lineHeight: "1" }],
      "8xl": ["96px", { lineHeight: "1" }],
      "9xl": ["144px", { lineHeight: "1" }]
    },
    spacing: {
      px: "1px",
      0: "0",
      0.5: "2px",
      1: "4px",
      1.5: "6px",
      2: "8px",
      2.5: "10px",
      3: "12px",
      3.5: "14px",
      4: "16px",
      5: "20px",
      6: "24px",
      7: "28px",
      8: "32px",
      9: "36px",
      10: "40px",
      11: "44px",
      12: "48px",
      14: "56px",
      16: "64px",
      20: "80px",
      24: "96px",
      28: "112px",
      32: "128px",
      36: "144px",
      40: "160px",
      44: "176px",
      48: "192px",
      52: "208px",
      56: "224px",
      60: "240px",
      64: "256px",
      72: "288px",
      80: "320px",
      96: "384px"
    }
  } } };
});

// ../../node_modules/.pnpm/@react-email+components@1.0.12_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-email/components/dist/index.mjs
var exports_dist = {};
__export(exports_dist, {
  zTouch: () => zTouch,
  xonokai: () => xonokai,
  vscDarkPlus: () => vscDarkPlus,
  vs: () => vs,
  vesper: () => vesper,
  toPlainText: () => toPlainText,
  synthwave84: () => synthwave84,
  solarizedDarkAtom: () => solarizedDarkAtom,
  shadesOfPurple: () => shadesOfPurple,
  setupTailwind: () => setupTailwind,
  sanitizeStyleSheet: () => sanitizeStyleSheet,
  renderWhiteSpace: () => renderWhiteSpace,
  render: () => render2,
  pretty: () => pretty,
  pojoaque: () => pojoaque,
  plainTextSelectors: () => plainTextSelectors,
  pixelBasedPreset: () => pixelBasedPreset,
  oneLight: () => oneLight,
  oneDark: () => oneDark,
  nord: () => nord,
  nightOwl: () => nightOwl,
  materialOceanic: () => materialOceanic,
  materialLight: () => materialLight,
  materialDark: () => materialDark,
  lucario: () => lucario,
  laserwave: () => laserwave,
  inlineStyles: () => inlineStyles,
  hopscotch: () => hopscotch,
  holiTheme: () => holiTheme,
  gruvboxLight: () => gruvboxLight,
  gruvboxDark: () => gruvboxDark,
  ghcolors: () => ghcolors,
  duotoneSpace: () => duotoneSpace,
  duotoneSea: () => duotoneSea,
  duotoneLight: () => duotoneLight,
  duotoneForest: () => duotoneForest,
  duotoneEarth: () => duotoneEarth,
  duotoneDark: () => duotoneDark,
  dracula: () => dracula,
  darcula: () => darcula,
  coyWithoutShadows: () => coyWithoutShadows,
  coldarkDark: () => coldarkDark,
  coldarkCold: () => coldarkCold,
  cb: () => cb,
  baseAteliersulphurpoolLight: () => baseAteliersulphurpoolLight,
  atomDark: () => atomDark,
  a11yDark: () => a11yDark,
  Text: () => Text3,
  Tailwind: () => Tailwind,
  Section: () => Section,
  Row: () => Row,
  Preview: () => Preview,
  Markdown: () => Markdown,
  Link: () => Link,
  Img: () => Img,
  Html: () => Html,
  Hr: () => Hr,
  Heading: () => Heading,
  Head: () => Head,
  Font: () => Font,
  Container: () => Container,
  Column: () => Column2,
  CodeInline: () => CodeInline,
  CodeBlock: () => CodeBlock,
  Button: () => Button,
  Body: () => Body
});
var init_dist20 = __esm(() => {
  init_dist();
  init_dist2();
  init_dist3();
  init_dist4();
  init_dist5();
  init_dist6();
  init_dist7();
  init_dist8();
  init_dist9();
  init_dist10();
  init_dist11();
  init_dist12();
  init_dist13();
  init_dist14();
  init_dist15();
  init_node2();
  init_dist16();
  init_dist17();
  init_dist19();
  init_dist18();
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/bdd.js
var require_bdd6 = __commonJS((exports) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var q4 = "ref";
  var a2 = -1;
  var b5 = true;
  var c3 = "isSet";
  var d3 = "PartitionResult";
  var e3 = "booleanEquals";
  var f4 = "stringEquals";
  var g4 = "getAttr";
  var h8 = "us-east-1";
  var i = "sigv4";
  var j4 = "sts";
  var k4 = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
  var l6 = { [q4]: "Endpoint" };
  var m2 = { [q4]: "Region" };
  var n3 = { [q4]: d3 };
  var o3 = {};
  var p3 = [m2];
  var _data = {
    conditions: [
      [c3, [l6]],
      [c3, p3],
      ["aws.partition", p3, d3],
      [e3, [{ [q4]: "UseFIPS" }, b5]],
      [e3, [{ [q4]: "UseDualStack" }, b5]],
      [f4, [m2, "aws-global"]],
      [e3, [{ [q4]: "UseGlobalEndpoint" }, b5]],
      [f4, [m2, "eu-central-1"]],
      [e3, [{ fn: g4, argv: [n3, "supportsDualStack"] }, b5]],
      [e3, [{ fn: g4, argv: [n3, "supportsFIPS"] }, b5]],
      [f4, [m2, "ap-south-1"]],
      [f4, [m2, "eu-north-1"]],
      [f4, [m2, "eu-west-1"]],
      [f4, [m2, "eu-west-2"]],
      [f4, [m2, "eu-west-3"]],
      [f4, [m2, "sa-east-1"]],
      [f4, [m2, h8]],
      [f4, [m2, "us-east-2"]],
      [f4, [m2, "us-west-2"]],
      [f4, [m2, "us-west-1"]],
      [f4, [m2, "ca-central-1"]],
      [f4, [m2, "ap-southeast-1"]],
      [f4, [m2, "ap-northeast-1"]],
      [f4, [m2, "ap-southeast-2"]],
      [f4, [{ fn: g4, argv: [n3, "name"] }, "aws-us-gov"]]
    ],
    results: [
      [a2],
      ["https://sts.amazonaws.com", { authSchemes: [{ name: i, signingName: j4, signingRegion: h8 }] }],
      [k4, { authSchemes: [{ name: i, signingName: j4, signingRegion: "{Region}" }] }],
      [a2, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a2, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [l6, o3],
      ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o3],
      [a2, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://sts.{Region}.amazonaws.com", o3],
      ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o3],
      [a2, "FIPS is enabled but this partition does not support FIPS"],
      ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o3],
      [a2, "DualStack is enabled but this partition does not support DualStack"],
      [k4, o3],
      [a2, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r2 = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    30,
    3,
    1,
    4,
    r2 + 14,
    2,
    5,
    r2 + 14,
    3,
    25,
    6,
    4,
    24,
    7,
    5,
    r2 + 1,
    8,
    6,
    9,
    r2 + 13,
    7,
    r2 + 1,
    10,
    10,
    r2 + 1,
    11,
    11,
    r2 + 1,
    12,
    12,
    r2 + 1,
    13,
    13,
    r2 + 1,
    14,
    14,
    r2 + 1,
    15,
    15,
    r2 + 1,
    16,
    16,
    r2 + 1,
    17,
    17,
    r2 + 1,
    18,
    18,
    r2 + 1,
    19,
    19,
    r2 + 1,
    20,
    20,
    r2 + 1,
    21,
    21,
    r2 + 1,
    22,
    22,
    r2 + 1,
    23,
    23,
    r2 + 1,
    r2 + 2,
    8,
    r2 + 11,
    r2 + 12,
    4,
    28,
    26,
    9,
    27,
    r2 + 10,
    24,
    r2 + 8,
    r2 + 9,
    8,
    29,
    r2 + 7,
    9,
    r2 + 6,
    r2 + 7,
    3,
    r2 + 3,
    31,
    4,
    r2 + 4,
    r2 + 5
  ]);
  exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver7 = __commonJS((exports) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd6();
  var cache2 = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
  });
  exports.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache2.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider7 = __commonJS((exports) => {
  var { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { SignatureV4MultiRegion } = require_dist_cjs15();
  var { getSmithyContext, normalizeProvider } = require_client3();
  var { resolveParams } = require_endpoints();
  var { defaultEndpointResolver } = require_endpointResolver7();
  var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config2, context10, input) => {
    if (!input) {
      throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
    }
    const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config2, context10, input);
    const instructionsFn = getSmithyContext(context10)?.commandInstance?.constructor?.getEndpointParameterInstructions;
    if (!instructionsFn) {
      throw new Error(`getEndpointParameterInstructions() is not defined on '${context10.commandName}'`);
    }
    const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config2);
    return Object.assign(defaultParameters, endpointParameters);
  };
  var _defaultSTSHttpAuthSchemeParametersProvider = async (config2, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config2.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  exports.defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "sts",
        region: authParameters.region
      },
      propertiesExtractor: (config2, context10) => ({
        signingProperties: {
          config: config2,
          context: context10
        }
      })
    };
  }
  function createAwsAuthSigv4aHttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4a",
      signingProperties: {
        name: "sts",
        region: authParameters.region
      },
      propertiesExtractor: (config2, context10) => ({
        signingProperties: {
          config: config2,
          context: context10
        }
      })
    };
  }
  function createSmithyApiNoAuthHttpAuthOption(authParameters) {
    return {
      schemeId: "smithy.api#noAuth"
    };
  }
  var createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver2, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
    const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
      const endpoint = defaultEndpointResolver2(authParameters);
      const authSchemes = endpoint.properties?.authSchemes;
      if (!authSchemes) {
        return defaultHttpAuthSchemeResolver(authParameters);
      }
      const options2 = [];
      for (const scheme of authSchemes) {
        const { name: resolvedName, properties: properties2 = {}, ...rest } = scheme;
        const name3 = resolvedName.toLowerCase();
        if (resolvedName !== name3) {
          console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name3}'`);
        }
        let schemeId;
        if (name3 === "sigv4a") {
          schemeId = "aws.auth#sigv4a";
          const sigv4Present = authSchemes.find((s3) => {
            const name4 = s3.name.toLowerCase();
            return name4 !== "sigv4a" && name4.startsWith("sigv4");
          });
          if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
            continue;
          }
        } else if (name3.startsWith("sigv4")) {
          schemeId = "aws.auth#sigv4";
        } else {
          throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name3}'`);
        }
        const createOption = createHttpAuthOptionFunctions[schemeId];
        if (!createOption) {
          throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
        }
        const option2 = createOption(authParameters);
        option2.schemeId = schemeId;
        option2.signingProperties = { ...option2.signingProperties || {}, ...rest, ...properties2 };
        options2.push(option2);
      }
      return options2;
    };
    return endpointRuleSetHttpAuthSchemeProvider;
  };
  var _defaultSTSHttpAuthSchemeProvider = (authParameters) => {
    const options2 = [];
    switch (authParameters.operation) {
      case "AssumeRoleWithSAML": {
        options2.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
        options2.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
        break;
      }
      case "AssumeRoleWithWebIdentity": {
        options2.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
        options2.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
        break;
      }
      default: {
        options2.push(createAwsAuthSigv4HttpAuthOption(authParameters));
        options2.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
      }
    }
    return options2;
  };
  exports.defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {
    "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
    "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
    "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption
  });
  exports.resolveHttpAuthSchemeConfig = (config2) => {
    const config_0 = resolveAwsSdkSigV4Config(config2);
    const config_1 = resolveAwsSdkSigV4AConfig(config_0);
    return Object.assign(config_1, {
      authSchemePreference: normalizeProvider(config2.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/package.json
var require_package8 = __commonJS((exports, module) => {
  module.exports = {
    name: "@aws-sdk/client-sts",
    description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      test: "yarn g:vitest run --passWithNoTests",
      "test:watch": "yarn g:vitest watch --passWithNoTests",
      "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
      "test:integration:watch": "yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts",
      "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
      "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/signature-v4-multi-region": "^3.996.35",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@smithy/snapshot-testing": "^2.1.7",
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3",
      vitest: "^4.0.17"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-sts"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/models/STSServiceException.js
var require_STSServiceException2 = __commonJS((exports) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports.__ServiceException = __ServiceException;
  exports.STSServiceException = class STSServiceException extends __ServiceException {
    constructor(options2) {
      super(options2);
      Object.setPrototypeOf(this, STSServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/models/errors.js
var require_errors7 = __commonJS((exports) => {
  var { STSServiceException: __BaseException } = require_STSServiceException2();
  exports.ExpiredTokenException = class ExpiredTokenException extends __BaseException {
    name = "ExpiredTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ExpiredTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExpiredTokenException.prototype);
    }
  };
  exports.MalformedPolicyDocumentException = class MalformedPolicyDocumentException extends __BaseException {
    name = "MalformedPolicyDocumentException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "MalformedPolicyDocumentException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
    }
  };
  exports.PackedPolicyTooLargeException = class PackedPolicyTooLargeException extends __BaseException {
    name = "PackedPolicyTooLargeException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "PackedPolicyTooLargeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
    }
  };
  exports.RegionDisabledException = class RegionDisabledException extends __BaseException {
    name = "RegionDisabledException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "RegionDisabledException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RegionDisabledException.prototype);
    }
  };
  exports.IDPRejectedClaimException = class IDPRejectedClaimException extends __BaseException {
    name = "IDPRejectedClaimException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "IDPRejectedClaimException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
    }
  };
  exports.InvalidIdentityTokenException = class InvalidIdentityTokenException extends __BaseException {
    name = "InvalidIdentityTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidIdentityTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
    }
  };
  exports.IDPCommunicationErrorException = class IDPCommunicationErrorException extends __BaseException {
    name = "IDPCommunicationErrorException";
    $fault = "client";
    $retryable = {};
    constructor(opts) {
      super({
        name: "IDPCommunicationErrorException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
    }
  };
  exports.InvalidAuthorizationMessageException = class InvalidAuthorizationMessageException extends __BaseException {
    name = "InvalidAuthorizationMessageException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidAuthorizationMessageException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype);
    }
  };
  exports.ExpiredTradeInTokenException = class ExpiredTradeInTokenException extends __BaseException {
    name = "ExpiredTradeInTokenException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ExpiredTradeInTokenException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExpiredTradeInTokenException.prototype);
    }
  };
  exports.JWTPayloadSizeExceededException = class JWTPayloadSizeExceededException extends __BaseException {
    name = "JWTPayloadSizeExceededException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "JWTPayloadSizeExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, JWTPayloadSizeExceededException.prototype);
    }
  };
  exports.OutboundWebIdentityFederationDisabledException = class OutboundWebIdentityFederationDisabledException extends __BaseException {
    name = "OutboundWebIdentityFederationDisabledException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "OutboundWebIdentityFederationDisabledException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, OutboundWebIdentityFederationDisabledException.prototype);
    }
  };
  exports.SessionDurationEscalationException = class SessionDurationEscalationException extends __BaseException {
    name = "SessionDurationEscalationException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "SessionDurationEscalationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SessionDurationEscalationException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/schemas/schemas_0.js
var require_schemas_07 = __commonJS((exports) => {
  var _A = "Arn";
  var _AKI = "AccessKeyId";
  var _AP = "AssumedPrincipal";
  var _AR = "AssumeRole";
  var _ARI = "AssumedRoleId";
  var _ARR = "AssumeRoleRequest";
  var _ARRs = "AssumeRoleResponse";
  var _ARRss = "AssumeRootRequest";
  var _ARRssu = "AssumeRootResponse";
  var _ARU = "AssumedRoleUser";
  var _ARWSAML = "AssumeRoleWithSAML";
  var _ARWSAMLR = "AssumeRoleWithSAMLRequest";
  var _ARWSAMLRs = "AssumeRoleWithSAMLResponse";
  var _ARWWI = "AssumeRoleWithWebIdentity";
  var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
  var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
  var _ARs = "AssumeRoot";
  var _Ac = "Account";
  var _Au = "Audience";
  var _C = "Credentials";
  var _CA = "ContextAssertion";
  var _DAM = "DecodeAuthorizationMessage";
  var _DAMR = "DecodeAuthorizationMessageRequest";
  var _DAMRe = "DecodeAuthorizationMessageResponse";
  var _DM = "DecodedMessage";
  var _DS = "DurationSeconds";
  var _E = "Expiration";
  var _EI = "ExternalId";
  var _EM = "EncodedMessage";
  var _ETE = "ExpiredTokenException";
  var _ETITE = "ExpiredTradeInTokenException";
  var _FU = "FederatedUser";
  var _FUI = "FederatedUserId";
  var _GAKI = "GetAccessKeyInfo";
  var _GAKIR = "GetAccessKeyInfoRequest";
  var _GAKIRe = "GetAccessKeyInfoResponse";
  var _GCI = "GetCallerIdentity";
  var _GCIR = "GetCallerIdentityRequest";
  var _GCIRe = "GetCallerIdentityResponse";
  var _GDAT = "GetDelegatedAccessToken";
  var _GDATR = "GetDelegatedAccessTokenRequest";
  var _GDATRe = "GetDelegatedAccessTokenResponse";
  var _GFT = "GetFederationToken";
  var _GFTR = "GetFederationTokenRequest";
  var _GFTRe = "GetFederationTokenResponse";
  var _GST = "GetSessionToken";
  var _GSTR = "GetSessionTokenRequest";
  var _GSTRe = "GetSessionTokenResponse";
  var _GWIT = "GetWebIdentityToken";
  var _GWITR = "GetWebIdentityTokenRequest";
  var _GWITRe = "GetWebIdentityTokenResponse";
  var _I = "Issuer";
  var _IAME = "InvalidAuthorizationMessageException";
  var _IDPCEE = "IDPCommunicationErrorException";
  var _IDPRCE = "IDPRejectedClaimException";
  var _IITE = "InvalidIdentityTokenException";
  var _JWTPSEE = "JWTPayloadSizeExceededException";
  var _K = "Key";
  var _MPDE = "MalformedPolicyDocumentException";
  var _N = "Name";
  var _NQ = "NameQualifier";
  var _OWIFDE = "OutboundWebIdentityFederationDisabledException";
  var _P = "Policy";
  var _PA = "PolicyArns";
  var _PAr = "PrincipalArn";
  var _PAro = "ProviderArn";
  var _PC = "ProvidedContexts";
  var _PCLT = "ProvidedContextsListType";
  var _PCr = "ProvidedContext";
  var _PDT = "PolicyDescriptorType";
  var _PI = "ProviderId";
  var _PPS = "PackedPolicySize";
  var _PPTLE = "PackedPolicyTooLargeException";
  var _Pr = "Provider";
  var _RA = "RoleArn";
  var _RDE = "RegionDisabledException";
  var _RSN = "RoleSessionName";
  var _S = "Subject";
  var _SA = "SigningAlgorithm";
  var _SAK = "SecretAccessKey";
  var _SAMLA = "SAMLAssertion";
  var _SAMLAT = "SAMLAssertionType";
  var _SDEE = "SessionDurationEscalationException";
  var _SFWIT = "SubjectFromWebIdentityToken";
  var _SI = "SourceIdentity";
  var _SN = "SerialNumber";
  var _ST = "SubjectType";
  var _STe = "SessionToken";
  var _T = "Tags";
  var _TC = "TokenCode";
  var _TIT = "TradeInToken";
  var _TP = "TargetPrincipal";
  var _TPA = "TaskPolicyArn";
  var _TTK = "TransitiveTagKeys";
  var _Ta = "Tag";
  var _UI = "UserId";
  var _V = "Value";
  var _WIT = "WebIdentityToken";
  var _a5 = "arn";
  var _aKST = "accessKeySecretType";
  var _aQE = "awsQueryError";
  var _c = "client";
  var _cTT = "clientTokenType";
  var _e3 = "error";
  var _hE = "httpError";
  var _m = "message";
  var _pDLT = "policyDescriptorListType";
  var _s2 = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
  var _tITT = "tradeInTokenType";
  var _tLT = "tagListType";
  var _wITT = "webIdentityTokenType";
  var n0 = "com.amazonaws.sts";
  var { TypeRegistry } = require_schema();
  var { ExpiredTokenException, ExpiredTradeInTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, JWTPayloadSizeExceededException, MalformedPolicyDocumentException, OutboundWebIdentityFederationDisabledException, PackedPolicyTooLargeException, RegionDisabledException, SessionDurationEscalationException } = require_errors7();
  var { STSServiceException } = require_STSServiceException2();
  var _s_registry = TypeRegistry.for(_s2);
  var STSServiceException$ = [-3, _s2, "STSServiceException", 0, [], []];
  exports.STSServiceException$ = STSServiceException$;
  _s_registry.registerError(STSServiceException$, STSServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var ExpiredTokenException$ = [
    -3,
    n0,
    _ETE,
    { [_aQE]: [`ExpiredTokenException`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.ExpiredTokenException$ = ExpiredTokenException$;
  n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
  var ExpiredTradeInTokenException$ = [
    -3,
    n0,
    _ETITE,
    { [_aQE]: [`ExpiredTradeInTokenException`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.ExpiredTradeInTokenException$ = ExpiredTradeInTokenException$;
  n0_registry.registerError(ExpiredTradeInTokenException$, ExpiredTradeInTokenException);
  var IDPCommunicationErrorException$ = [
    -3,
    n0,
    _IDPCEE,
    { [_aQE]: [`IDPCommunicationError`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
  n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
  var IDPRejectedClaimException$ = [
    -3,
    n0,
    _IDPRCE,
    { [_aQE]: [`IDPRejectedClaim`, 403], [_e3]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
  n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
  var InvalidAuthorizationMessageException$ = [
    -3,
    n0,
    _IAME,
    { [_aQE]: [`InvalidAuthorizationMessageException`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidAuthorizationMessageException$ = InvalidAuthorizationMessageException$;
  n0_registry.registerError(InvalidAuthorizationMessageException$, InvalidAuthorizationMessageException);
  var InvalidIdentityTokenException$ = [
    -3,
    n0,
    _IITE,
    { [_aQE]: [`InvalidIdentityToken`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
  n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
  var JWTPayloadSizeExceededException$ = [
    -3,
    n0,
    _JWTPSEE,
    { [_aQE]: [`JWTPayloadSizeExceededException`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.JWTPayloadSizeExceededException$ = JWTPayloadSizeExceededException$;
  n0_registry.registerError(JWTPayloadSizeExceededException$, JWTPayloadSizeExceededException);
  var MalformedPolicyDocumentException$ = [
    -3,
    n0,
    _MPDE,
    { [_aQE]: [`MalformedPolicyDocument`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
  n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
  var OutboundWebIdentityFederationDisabledException$ = [
    -3,
    n0,
    _OWIFDE,
    { [_aQE]: [`OutboundWebIdentityFederationDisabledException`, 403], [_e3]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.OutboundWebIdentityFederationDisabledException$ = OutboundWebIdentityFederationDisabledException$;
  n0_registry.registerError(OutboundWebIdentityFederationDisabledException$, OutboundWebIdentityFederationDisabledException);
  var PackedPolicyTooLargeException$ = [
    -3,
    n0,
    _PPTLE,
    { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e3]: _c, [_hE]: 400 },
    [_m],
    [0]
  ];
  exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
  n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
  var RegionDisabledException$ = [
    -3,
    n0,
    _RDE,
    { [_aQE]: [`RegionDisabledException`, 403], [_e3]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.RegionDisabledException$ = RegionDisabledException$;
  n0_registry.registerError(RegionDisabledException$, RegionDisabledException);
  var SessionDurationEscalationException$ = [
    -3,
    n0,
    _SDEE,
    { [_aQE]: [`SessionDurationEscalationException`, 403], [_e3]: _c, [_hE]: 403 },
    [_m],
    [0]
  ];
  exports.SessionDurationEscalationException$ = SessionDurationEscalationException$;
  n0_registry.registerError(SessionDurationEscalationException$, SessionDurationEscalationException);
  exports.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var accessKeySecretType = [0, n0, _aKST, 8, 0];
  var clientTokenType = [0, n0, _cTT, 8, 0];
  var SAMLAssertionType = [0, n0, _SAMLAT, 8, 0];
  var tradeInTokenType = [0, n0, _tITT, 8, 0];
  var webIdentityTokenType = [0, n0, _wITT, 8, 0];
  var AssumedRoleUser$ = [
    3,
    n0,
    _ARU,
    0,
    [_ARI, _A],
    [0, 0],
    2
  ];
  exports.AssumedRoleUser$ = AssumedRoleUser$;
  var AssumeRoleRequest$ = [
    3,
    n0,
    _ARR,
    0,
    [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
    [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
    2
  ];
  exports.AssumeRoleRequest$ = AssumeRoleRequest$;
  var AssumeRoleResponse$ = [
    3,
    n0,
    _ARRs,
    0,
    [_C, _ARU, _PPS, _SI],
    [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
  ];
  exports.AssumeRoleResponse$ = AssumeRoleResponse$;
  var AssumeRoleWithSAMLRequest$ = [
    3,
    n0,
    _ARWSAMLR,
    0,
    [_RA, _PAr, _SAMLA, _PA, _P, _DS],
    [0, 0, [() => SAMLAssertionType, 0], () => policyDescriptorListType, 0, 1],
    3
  ];
  exports.AssumeRoleWithSAMLRequest$ = AssumeRoleWithSAMLRequest$;
  var AssumeRoleWithSAMLResponse$ = [
    3,
    n0,
    _ARWSAMLRs,
    0,
    [_C, _ARU, _PPS, _S, _ST, _I, _Au, _NQ, _SI],
    [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0, 0, 0, 0, 0, 0]
  ];
  exports.AssumeRoleWithSAMLResponse$ = AssumeRoleWithSAMLResponse$;
  var AssumeRoleWithWebIdentityRequest$ = [
    3,
    n0,
    _ARWWIR,
    0,
    [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
    [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
    3
  ];
  exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
  var AssumeRoleWithWebIdentityResponse$ = [
    3,
    n0,
    _ARWWIRs,
    0,
    [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
    [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
  ];
  exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
  var AssumeRootRequest$ = [
    3,
    n0,
    _ARRss,
    0,
    [_TP, _TPA, _DS],
    [0, () => PolicyDescriptorType$, 1],
    2
  ];
  exports.AssumeRootRequest$ = AssumeRootRequest$;
  var AssumeRootResponse$ = [
    3,
    n0,
    _ARRssu,
    0,
    [_C, _SI],
    [[() => Credentials$, 0], 0]
  ];
  exports.AssumeRootResponse$ = AssumeRootResponse$;
  var Credentials$ = [
    3,
    n0,
    _C,
    0,
    [_AKI, _SAK, _STe, _E],
    [0, [() => accessKeySecretType, 0], 0, 4],
    4
  ];
  exports.Credentials$ = Credentials$;
  var DecodeAuthorizationMessageRequest$ = [
    3,
    n0,
    _DAMR,
    0,
    [_EM],
    [0],
    1
  ];
  exports.DecodeAuthorizationMessageRequest$ = DecodeAuthorizationMessageRequest$;
  var DecodeAuthorizationMessageResponse$ = [
    3,
    n0,
    _DAMRe,
    0,
    [_DM],
    [0]
  ];
  exports.DecodeAuthorizationMessageResponse$ = DecodeAuthorizationMessageResponse$;
  var FederatedUser$ = [
    3,
    n0,
    _FU,
    0,
    [_FUI, _A],
    [0, 0],
    2
  ];
  exports.FederatedUser$ = FederatedUser$;
  var GetAccessKeyInfoRequest$ = [
    3,
    n0,
    _GAKIR,
    0,
    [_AKI],
    [0],
    1
  ];
  exports.GetAccessKeyInfoRequest$ = GetAccessKeyInfoRequest$;
  var GetAccessKeyInfoResponse$ = [
    3,
    n0,
    _GAKIRe,
    0,
    [_Ac],
    [0]
  ];
  exports.GetAccessKeyInfoResponse$ = GetAccessKeyInfoResponse$;
  var GetCallerIdentityRequest$ = [
    3,
    n0,
    _GCIR,
    0,
    [],
    []
  ];
  exports.GetCallerIdentityRequest$ = GetCallerIdentityRequest$;
  var GetCallerIdentityResponse$ = [
    3,
    n0,
    _GCIRe,
    0,
    [_UI, _Ac, _A],
    [0, 0, 0]
  ];
  exports.GetCallerIdentityResponse$ = GetCallerIdentityResponse$;
  var GetDelegatedAccessTokenRequest$ = [
    3,
    n0,
    _GDATR,
    0,
    [_TIT],
    [[() => tradeInTokenType, 0]],
    1
  ];
  exports.GetDelegatedAccessTokenRequest$ = GetDelegatedAccessTokenRequest$;
  var GetDelegatedAccessTokenResponse$ = [
    3,
    n0,
    _GDATRe,
    0,
    [_C, _PPS, _AP],
    [[() => Credentials$, 0], 1, 0]
  ];
  exports.GetDelegatedAccessTokenResponse$ = GetDelegatedAccessTokenResponse$;
  var GetFederationTokenRequest$ = [
    3,
    n0,
    _GFTR,
    0,
    [_N, _P, _PA, _DS, _T],
    [0, 0, () => policyDescriptorListType, 1, () => tagListType],
    1
  ];
  exports.GetFederationTokenRequest$ = GetFederationTokenRequest$;
  var GetFederationTokenResponse$ = [
    3,
    n0,
    _GFTRe,
    0,
    [_C, _FU, _PPS],
    [[() => Credentials$, 0], () => FederatedUser$, 1]
  ];
  exports.GetFederationTokenResponse$ = GetFederationTokenResponse$;
  var GetSessionTokenRequest$ = [
    3,
    n0,
    _GSTR,
    0,
    [_DS, _SN, _TC],
    [1, 0, 0]
  ];
  exports.GetSessionTokenRequest$ = GetSessionTokenRequest$;
  var GetSessionTokenResponse$ = [
    3,
    n0,
    _GSTRe,
    0,
    [_C],
    [[() => Credentials$, 0]]
  ];
  exports.GetSessionTokenResponse$ = GetSessionTokenResponse$;
  var GetWebIdentityTokenRequest$ = [
    3,
    n0,
    _GWITR,
    0,
    [_Au, _SA, _DS, _T],
    [64 | 0, 0, 1, () => tagListType],
    2
  ];
  exports.GetWebIdentityTokenRequest$ = GetWebIdentityTokenRequest$;
  var GetWebIdentityTokenResponse$ = [
    3,
    n0,
    _GWITRe,
    0,
    [_WIT, _E],
    [[() => webIdentityTokenType, 0], 4]
  ];
  exports.GetWebIdentityTokenResponse$ = GetWebIdentityTokenResponse$;
  var PolicyDescriptorType$ = [
    3,
    n0,
    _PDT,
    0,
    [_a5],
    [0]
  ];
  exports.PolicyDescriptorType$ = PolicyDescriptorType$;
  var ProvidedContext$ = [
    3,
    n0,
    _PCr,
    0,
    [_PAro, _CA],
    [0, 0]
  ];
  exports.ProvidedContext$ = ProvidedContext$;
  var Tag$ = [
    3,
    n0,
    _Ta,
    0,
    [_K, _V],
    [0, 0],
    2
  ];
  exports.Tag$ = Tag$;
  var policyDescriptorListType = [
    1,
    n0,
    _pDLT,
    0,
    () => PolicyDescriptorType$
  ];
  var ProvidedContextsListType = [
    1,
    n0,
    _PCLT,
    0,
    () => ProvidedContext$
  ];
  var tagKeyListType = 64 | 0;
  var tagListType = [
    1,
    n0,
    _tLT,
    0,
    () => Tag$
  ];
  var webIdentityTokenAudienceListType = 64 | 0;
  exports.AssumeRole$ = [
    9,
    n0,
    _AR,
    0,
    () => AssumeRoleRequest$,
    () => AssumeRoleResponse$
  ];
  exports.AssumeRoleWithSAML$ = [
    9,
    n0,
    _ARWSAML,
    0,
    () => AssumeRoleWithSAMLRequest$,
    () => AssumeRoleWithSAMLResponse$
  ];
  exports.AssumeRoleWithWebIdentity$ = [
    9,
    n0,
    _ARWWI,
    0,
    () => AssumeRoleWithWebIdentityRequest$,
    () => AssumeRoleWithWebIdentityResponse$
  ];
  exports.AssumeRoot$ = [
    9,
    n0,
    _ARs,
    0,
    () => AssumeRootRequest$,
    () => AssumeRootResponse$
  ];
  exports.DecodeAuthorizationMessage$ = [
    9,
    n0,
    _DAM,
    0,
    () => DecodeAuthorizationMessageRequest$,
    () => DecodeAuthorizationMessageResponse$
  ];
  exports.GetAccessKeyInfo$ = [
    9,
    n0,
    _GAKI,
    0,
    () => GetAccessKeyInfoRequest$,
    () => GetAccessKeyInfoResponse$
  ];
  exports.GetCallerIdentity$ = [
    9,
    n0,
    _GCI,
    0,
    () => GetCallerIdentityRequest$,
    () => GetCallerIdentityResponse$
  ];
  exports.GetDelegatedAccessToken$ = [
    9,
    n0,
    _GDAT,
    0,
    () => GetDelegatedAccessTokenRequest$,
    () => GetDelegatedAccessTokenResponse$
  ];
  exports.GetFederationToken$ = [
    9,
    n0,
    _GFT,
    0,
    () => GetFederationTokenRequest$,
    () => GetFederationTokenResponse$
  ];
  exports.GetSessionToken$ = [
    9,
    n0,
    _GST,
    0,
    () => GetSessionTokenRequest$,
    () => GetSessionTokenResponse$
  ];
  exports.GetWebIdentityToken$ = [
    9,
    n0,
    _GWIT,
    0,
    () => GetWebIdentityTokenRequest$,
    () => GetWebIdentityTokenResponse$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared7 = __commonJS((exports) => {
  var { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsQueryProtocol } = require_protocols2();
  var { SignatureV4MultiRegion } = require_dist_cjs15();
  var { NoAuthSigner } = require_dist_cjs5();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultSTSHttpAuthSchemeProvider } = require_httpAuthSchemeProvider7();
  var { defaultEndpointResolver } = require_endpointResolver7();
  var { errorTypeRegistries } = require_schemas_07();
  exports.getRuntimeConfig = (config2) => {
    return {
      apiVersion: "2011-06-15",
      base64Decoder: config2?.base64Decoder ?? fromBase64,
      base64Encoder: config2?.base64Encoder ?? toBase64,
      disableHostPrefix: config2?.disableHostPrefix ?? false,
      endpointProvider: config2?.endpointProvider ?? defaultEndpointResolver,
      extensions: config2?.extensions ?? [],
      httpAuthSchemeProvider: config2?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
      httpAuthSchemes: config2?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "aws.auth#sigv4a",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
          signer: new AwsSdkSigV4ASigner
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      logger: config2?.logger ?? new NoOpLogger,
      protocol: config2?.protocol ?? AwsQueryProtocol,
      protocolSettings: config2?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.sts",
        errorTypeRegistries,
        xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
        version: "2011-06-15",
        serviceTarget: "AWSSecurityTokenServiceV20110615"
      },
      serviceId: config2?.serviceId ?? "STS",
      signerConstructor: config2?.signerConstructor ?? SignatureV4MultiRegion,
      urlParser: config2?.urlParser ?? parseUrl2,
      utf8Decoder: config2?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config2?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
var require_runtimeConfig7 = __commonJS((exports) => {
  var packageInfo = require_package8();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { AwsSdkSigV4ASigner, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { NoAuthSigner } = require_dist_cjs5();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require_retry();
  var { calculateBodyLength, Hash: Hash2 } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared7();
  var getRuntimeConfig = (config2) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config2);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config2);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config2?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config2,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config2?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config2?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config2?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config2?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      httpAuthSchemes: config2?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await credentialDefaultProvider(idProps?.__config || {})()),
          signer: new AwsSdkSigV4Signer
        },
        {
          schemeId: "aws.auth#sigv4a",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
          signer: new AwsSdkSigV4ASigner
        },
        {
          schemeId: "smithy.api#noAuth",
          identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
          signer: new NoAuthSigner
        }
      ],
      maxAttempts: config2?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config2),
      region: config2?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config2?.requestHandler ?? defaultConfigProvider),
      retryMode: config2?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config2),
      sha256: config2?.sha256 ?? Hash2.bind(null, "sha256"),
      sigv4aSigningRegionSet: config2?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
      streamCollector: config2?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config2?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config2?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config2?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-sts@3.1074.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
var require_dist_cjs62 = __commonJS((exports) => {
  var __exportStar = (m2, e3) => {
    Object.assign(e3, m2);
  };
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, setCredentialFeature, stsRegionDefaultResolver } = require_client4();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs5();
  var { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client4, Command, createAggregatedClient } = require_client3();
  exports.$Command = Command;
  exports.__Client = Client4;
  var { resolveRegionConfig } = require_config2();
  var { resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultSTSHttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider7();
  var { getRuntimeConfig } = require_runtimeConfig7();
  var { AssumeRole$, AssumeRoleWithSAML$, AssumeRoleWithWebIdentity$, AssumeRoot$, DecodeAuthorizationMessage$, GetAccessKeyInfo$, GetCallerIdentity$, GetDelegatedAccessToken$, GetFederationToken$, GetSessionToken$, GetWebIdentityToken$ } = require_schemas_07();
  __exportStar(require_schemas_07(), exports);
  __exportStar(require_errors7(), exports);
  var { STSServiceException } = require_STSServiceException2();
  exports.STSServiceException = STSServiceException;
  var resolveClientEndpointParameters = (options2) => {
    return Object.assign(options2, {
      useDualstackEndpoint: options2.useDualstackEndpoint ?? false,
      useFipsEndpoint: options2.useFipsEndpoint ?? false,
      useGlobalEndpoint: options2.useGlobalEndpoint ?? false,
      defaultSigningName: "sts"
    });
  };
  var commonParams = {
    UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config2) => {
    return {
      httpAuthSchemes: config2.httpAuthSchemes(),
      httpAuthSchemeProvider: config2.httpAuthSchemeProvider(),
      credentials: config2.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class STSClient extends Client4 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
      const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
      this.config = _config_8;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config2) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config2.credentials,
          "aws.auth#sigv4a": config2.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class AssumeRoleCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {
  }

  class AssumeRoleWithSAMLCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").sc(AssumeRoleWithSAML$).build() {
  }

  class AssumeRoleWithWebIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {
  }

  class AssumeRootCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {}).n("STSClient", "AssumeRootCommand").sc(AssumeRoot$).build() {
  }

  class DecodeAuthorizationMessageCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").sc(DecodeAuthorizationMessage$).build() {
  }

  class GetAccessKeyInfoCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").sc(GetAccessKeyInfo$).build() {
  }

  class GetCallerIdentityCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").sc(GetCallerIdentity$).build() {
  }

  class GetDelegatedAccessTokenCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {}).n("STSClient", "GetDelegatedAccessTokenCommand").sc(GetDelegatedAccessToken$).build() {
  }

  class GetFederationTokenCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").sc(GetFederationToken$).build() {
  }

  class GetSessionTokenCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").sc(GetSessionToken$).build() {
  }

  class GetWebIdentityTokenCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {}).n("STSClient", "GetWebIdentityTokenCommand").sc(GetWebIdentityToken$).build() {
  }
  var commands = {
    AssumeRoleCommand,
    AssumeRoleWithSAMLCommand,
    AssumeRoleWithWebIdentityCommand,
    AssumeRootCommand,
    DecodeAuthorizationMessageCommand,
    GetAccessKeyInfoCommand,
    GetCallerIdentityCommand,
    GetDelegatedAccessTokenCommand,
    GetFederationTokenCommand,
    GetSessionTokenCommand,
    GetWebIdentityTokenCommand
  };

  class STS extends STSClient {
  }
  createAggregatedClient(commands, STS);
  var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
    if (typeof assumedRoleUser?.Arn === "string") {
      const arnComponents = assumedRoleUser.Arn.split(":");
      if (arnComponents.length > 4 && arnComponents[4] !== "") {
        return arnComponents[4];
      }
    }
    return;
  };
  var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
    const region = typeof _region === "function" ? await _region() : _region;
    const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
    let stsDefaultRegion = "";
    const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
    credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
    return resolvedRegion;
  };
  var getDefaultRoleAssumer$1 = (stsOptions, STSClient2) => {
    let stsClient;
    let closureSourceCreds;
    return async (sourceCreds, params) => {
      closureSourceCreds = sourceCreds;
      if (!stsClient) {
        const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
        const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
          logger,
          profile
        });
        const isCompatibleRequestHandler = !isH2(requestHandler);
        stsClient = new STSClient2({
          ...stsOptions,
          userAgentAppId,
          profile,
          credentialDefaultProvider: () => async () => closureSourceCreds,
          region: resolvedRegion,
          requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
          logger
        });
      }
      const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
      if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
        throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
      }
      const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
      const credentials = {
        accessKeyId: Credentials.AccessKeyId,
        secretAccessKey: Credentials.SecretAccessKey,
        sessionToken: Credentials.SessionToken,
        expiration: Credentials.Expiration,
        ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
        ...accountId && { accountId }
      };
      setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
      return credentials;
    };
  };
  var getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient2) => {
    let stsClient;
    return async (params) => {
      if (!stsClient) {
        const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
        const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
          logger,
          profile
        });
        const isCompatibleRequestHandler = !isH2(requestHandler);
        stsClient = new STSClient2({
          ...stsOptions,
          userAgentAppId,
          profile,
          region: resolvedRegion,
          requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
          logger
        });
      }
      const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
      if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
        throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
      }
      const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
      const credentials = {
        accessKeyId: Credentials.AccessKeyId,
        secretAccessKey: Credentials.SecretAccessKey,
        sessionToken: Credentials.SessionToken,
        expiration: Credentials.Expiration,
        ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
        ...accountId && { accountId }
      };
      if (accountId) {
        setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
      }
      setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
      return credentials;
    };
  };
  var isH2 = (requestHandler) => {
    return requestHandler?.metadata?.handlerProtocol === "h2";
  };
  var getCustomizableStsClientCtor = (baseCtor, customizations) => {
    if (!customizations)
      return baseCtor;
    else
      return class CustomizableSTSClient extends baseCtor {
        constructor(config2) {
          super(config2);
          for (const customization of customizations) {
            this.middlewareStack.use(customization);
          }
        }
      };
  };
  var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
  var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
  var decorateDefaultCredentialProvider = (provider) => (input) => provider({
    roleAssumer: getDefaultRoleAssumer(input),
    roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
    ...input
  });
  exports.AssumeRoleCommand = AssumeRoleCommand;
  exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;
  exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
  exports.AssumeRootCommand = AssumeRootCommand;
  exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand;
  exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand;
  exports.GetCallerIdentityCommand = GetCallerIdentityCommand;
  exports.GetDelegatedAccessTokenCommand = GetDelegatedAccessTokenCommand;
  exports.GetFederationTokenCommand = GetFederationTokenCommand;
  exports.GetSessionTokenCommand = GetSessionTokenCommand;
  exports.GetWebIdentityTokenCommand = GetWebIdentityTokenCommand;
  exports.STS = STS;
  exports.STSClient = STSClient;
  exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
  exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
  exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/utils.js
var require_utils13 = __commonJS((exports) => {
  exports.__esModule = true;
  exports.extend = extend2;
  exports.indexOf = indexOf;
  exports.escapeExpression = escapeExpression;
  exports.isEmpty = isEmpty;
  exports.createFrame = createFrame;
  exports.blockParams = blockParams;
  exports.appendContextPath = appendContextPath;
  var escape4 = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;",
    "'": "&#x27;",
    "`": "&#x60;",
    "=": "&#x3D;"
  };
  var badChars = /[&<>"'`=]/g;
  var possible = /[&<>"'`=]/;
  function escapeChar(chr) {
    return escape4[chr];
  }
  function extend2(obj) {
    for (var i = 1;i < arguments.length; i++) {
      for (var key in arguments[i]) {
        if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
          obj[key] = arguments[i][key];
        }
      }
    }
    return obj;
  }
  var toString = Object.prototype.toString;
  exports.toString = toString;
  var isFunction = function isFunction2(value) {
    return typeof value === "function";
  };
  if (isFunction(/x/)) {
    exports.isFunction = isFunction = function(value) {
      return typeof value === "function" && toString.call(value) === "[object Function]";
    };
  }
  exports.isFunction = isFunction;
  var isArray = Array.isArray || function(value) {
    return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false;
  };
  exports.isArray = isArray;
  function indexOf(array2, value) {
    for (var i = 0, len = array2.length;i < len; i++) {
      if (array2[i] === value) {
        return i;
      }
    }
    return -1;
  }
  function escapeExpression(string4) {
    if (typeof string4 !== "string") {
      if (string4 && string4.toHTML) {
        return string4.toHTML();
      } else if (string4 == null) {
        return "";
      } else if (!string4) {
        return string4 + "";
      }
      string4 = "" + string4;
    }
    if (!possible.test(string4)) {
      return string4;
    }
    return string4.replace(badChars, escapeChar);
  }
  function isEmpty(value) {
    if (!value && value !== 0) {
      return true;
    } else if (isArray(value) && value.length === 0) {
      return true;
    } else {
      return false;
    }
  }
  function createFrame(object2) {
    var frame = extend2({}, object2);
    frame._parent = object2;
    return frame;
  }
  function blockParams(params, ids) {
    params.path = ids;
    return params;
  }
  function appendContextPath(contextPath, id) {
    return (contextPath ? contextPath + "." : "") + id;
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/exception.js
var require_exception = __commonJS((exports, module) => {
  exports.__esModule = true;
  var errorProps = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"];
  function Exception(message2, node3) {
    var loc = node3 && node3.loc, line2 = undefined, endLineNumber = undefined, column2 = undefined, endColumn = undefined;
    if (loc) {
      line2 = loc.start.line;
      endLineNumber = loc.end.line;
      column2 = loc.start.column;
      endColumn = loc.end.column;
      message2 += " - " + line2 + ":" + column2;
    }
    var tmp = Error.prototype.constructor.call(this, message2);
    for (var idx = 0;idx < errorProps.length; idx++) {
      this[errorProps[idx]] = tmp[errorProps[idx]];
    }
    if (Error.captureStackTrace) {
      Error.captureStackTrace(this, Exception);
    }
    try {
      if (loc) {
        this.lineNumber = line2;
        this.endLineNumber = endLineNumber;
        if (Object.defineProperty) {
          Object.defineProperty(this, "column", {
            value: column2,
            enumerable: true
          });
          Object.defineProperty(this, "endColumn", {
            value: endColumn,
            enumerable: true
          });
        } else {
          this.column = column2;
          this.endColumn = endColumn;
        }
      }
    } catch (nop) {}
  }
  Exception.prototype = new Error;
  exports.default = Exception;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js
var require_block_helper_missing = __commonJS((exports, module) => {
  exports.__esModule = true;
  var _utils = require_utils13();
  exports.default = function(instance) {
    instance.registerHelper("blockHelperMissing", function(context10, options2) {
      var { inverse, fn: fn3 } = options2;
      if (context10 === true) {
        return fn3(this);
      } else if (context10 === false || context10 == null) {
        return inverse(this);
      } else if (_utils.isArray(context10)) {
        if (context10.length > 0) {
          if (options2.ids) {
            options2.ids = [options2.name];
          }
          return instance.helpers.each(context10, options2);
        } else {
          return inverse(this);
        }
      } else {
        if (options2.data && options2.ids) {
          var data = _utils.createFrame(options2.data);
          data.contextPath = _utils.appendContextPath(options2.data.contextPath, options2.name);
          options2 = { data };
        }
        return fn3(context10, options2);
      }
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js
var require_each = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _utils = require_utils13();
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  exports.default = function(instance) {
    instance.registerHelper("each", function(context10, options2) {
      if (!options2) {
        throw new _exception2["default"]("Must pass iterator to #each");
      }
      var { fn: fn3, inverse } = options2, i = 0, ret = "", data = undefined, contextPath = undefined;
      if (options2.data && options2.ids) {
        contextPath = _utils.appendContextPath(options2.data.contextPath, options2.ids[0]) + ".";
      }
      if (_utils.isFunction(context10)) {
        context10 = context10.call(this);
      }
      if (options2.data) {
        data = _utils.createFrame(options2.data);
      }
      function execIteration(field, index2, last) {
        if (data) {
          data.key = field;
          data.index = index2;
          data.first = index2 === 0;
          data.last = !!last;
          if (contextPath) {
            data.contextPath = contextPath + field;
          }
        }
        ret = ret + fn3(context10[field], {
          data,
          blockParams: _utils.blockParams([context10[field], field], [contextPath + field, null])
        });
      }
      if (context10 && typeof context10 === "object") {
        if (_utils.isArray(context10)) {
          for (var j4 = context10.length;i < j4; i++) {
            if (i in context10) {
              execIteration(i, i, i === context10.length - 1);
            }
          }
        } else if (typeof Symbol === "function" && context10[Symbol.iterator]) {
          var newContext = [];
          var iterator = context10[Symbol.iterator]();
          for (var it4 = iterator.next();!it4.done; it4 = iterator.next()) {
            newContext.push(it4.value);
          }
          context10 = newContext;
          for (var j4 = context10.length;i < j4; i++) {
            execIteration(i, i, i === context10.length - 1);
          }
        } else {
          (function() {
            var priorKey = undefined;
            Object.keys(context10).forEach(function(key) {
              if (priorKey !== undefined) {
                execIteration(priorKey, i - 1);
              }
              priorKey = key;
              i++;
            });
            if (priorKey !== undefined) {
              execIteration(priorKey, i - 1, true);
            }
          })();
        }
      }
      if (i === 0) {
        ret = inverse(this);
      }
      return ret;
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js
var require_helper_missing = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  exports.default = function(instance) {
    instance.registerHelper("helperMissing", function() {
      if (arguments.length === 1) {
        return;
      } else {
        throw new _exception2["default"]('Missing helper: "' + arguments[arguments.length - 1].name + '"');
      }
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js
var require_if = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _utils = require_utils13();
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  exports.default = function(instance) {
    instance.registerHelper("if", function(conditional, options2) {
      if (arguments.length != 2) {
        throw new _exception2["default"]("#if requires exactly one argument");
      }
      if (_utils.isFunction(conditional)) {
        conditional = conditional.call(this);
      }
      if (!options2.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
        return options2.inverse(this);
      } else {
        return options2.fn(this);
      }
    });
    instance.registerHelper("unless", function(conditional, options2) {
      if (arguments.length != 2) {
        throw new _exception2["default"]("#unless requires exactly one argument");
      }
      return instance.helpers["if"].call(this, conditional, {
        fn: options2.inverse,
        inverse: options2.fn,
        hash: options2.hash
      });
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js
var require_log = __commonJS((exports, module) => {
  exports.__esModule = true;
  exports.default = function(instance) {
    instance.registerHelper("log", function() {
      var args = [undefined], options2 = arguments[arguments.length - 1];
      for (var i = 0;i < arguments.length - 1; i++) {
        args.push(arguments[i]);
      }
      var level = 1;
      if (options2.hash.level != null) {
        level = options2.hash.level;
      } else if (options2.data && options2.data.level != null) {
        level = options2.data.level;
      }
      args[0] = level;
      instance.log.apply(instance, args);
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js
var require_lookup = __commonJS((exports, module) => {
  exports.__esModule = true;
  exports.default = function(instance) {
    instance.registerHelper("lookup", function(obj, field, options2) {
      if (!obj) {
        return obj;
      }
      return options2.lookupProperty(obj, field);
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js
var require_with = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _utils = require_utils13();
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  exports.default = function(instance) {
    instance.registerHelper("with", function(context10, options2) {
      if (arguments.length != 2) {
        throw new _exception2["default"]("#with requires exactly one argument");
      }
      if (_utils.isFunction(context10)) {
        context10 = context10.call(this);
      }
      var fn3 = options2.fn;
      if (!_utils.isEmpty(context10)) {
        var data = options2.data;
        if (options2.data && options2.ids) {
          data = _utils.createFrame(options2.data);
          data.contextPath = _utils.appendContextPath(options2.data.contextPath, options2.ids[0]);
        }
        return fn3(context10, {
          data,
          blockParams: _utils.blockParams([context10], [data && data.contextPath])
        });
      } else {
        return options2.inverse(this);
      }
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/helpers.js
var require_helpers = __commonJS((exports) => {
  exports.__esModule = true;
  exports.registerDefaultHelpers = registerDefaultHelpers;
  exports.moveHelperToHooks = moveHelperToHooks;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _helpersBlockHelperMissing = require_block_helper_missing();
  var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
  var _helpersEach = require_each();
  var _helpersEach2 = _interopRequireDefault(_helpersEach);
  var _helpersHelperMissing = require_helper_missing();
  var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
  var _helpersIf = require_if();
  var _helpersIf2 = _interopRequireDefault(_helpersIf);
  var _helpersLog = require_log();
  var _helpersLog2 = _interopRequireDefault(_helpersLog);
  var _helpersLookup = require_lookup();
  var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
  var _helpersWith = require_with();
  var _helpersWith2 = _interopRequireDefault(_helpersWith);
  function registerDefaultHelpers(instance) {
    _helpersBlockHelperMissing2["default"](instance);
    _helpersEach2["default"](instance);
    _helpersHelperMissing2["default"](instance);
    _helpersIf2["default"](instance);
    _helpersLog2["default"](instance);
    _helpersLookup2["default"](instance);
    _helpersWith2["default"](instance);
  }
  function moveHelperToHooks(instance, helperName, keepHelper) {
    if (instance.helpers[helperName]) {
      instance.hooks[helperName] = instance.helpers[helperName];
      if (!keepHelper) {
        instance.helpers[helperName] = undefined;
      }
    }
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js
var require_inline = __commonJS((exports, module) => {
  exports.__esModule = true;
  var _utils = require_utils13();
  exports.default = function(instance) {
    instance.registerDecorator("inline", function(fn3, props, container2, options2) {
      var ret = fn3;
      if (!props.partials) {
        props.partials = {};
        ret = function(context10, options3) {
          var original = container2.partials;
          container2.partials = _utils.extend({}, original, props.partials);
          var ret2 = fn3(context10, options3);
          container2.partials = original;
          return ret2;
        };
      }
      props.partials[options2.args[0]] = options2.fn;
      return ret;
    });
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/decorators.js
var require_decorators = __commonJS((exports) => {
  exports.__esModule = true;
  exports.registerDefaultDecorators = registerDefaultDecorators;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _decoratorsInline = require_inline();
  var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
  function registerDefaultDecorators(instance) {
    _decoratorsInline2["default"](instance);
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/logger.js
var require_logger = __commonJS((exports, module) => {
  exports.__esModule = true;
  var _utils = require_utils13();
  var logger = {
    methodMap: ["debug", "info", "warn", "error"],
    level: "info",
    lookupLevel: function lookupLevel(level) {
      if (typeof level === "string") {
        var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
        if (levelMap >= 0) {
          level = levelMap;
        } else {
          level = parseInt(level, 10);
        }
      }
      return level;
    },
    log: function log4(level) {
      level = logger.lookupLevel(level);
      if (typeof console !== "undefined" && logger.lookupLevel(logger.level) <= level) {
        var method = logger.methodMap[level];
        if (!console[method]) {
          method = "log";
        }
        for (var _len = arguments.length, message2 = Array(_len > 1 ? _len - 1 : 0), _key = 1;_key < _len; _key++) {
          message2[_key - 1] = arguments[_key];
        }
        console[method].apply(console, message2);
      }
    }
  };
  exports.default = logger;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
var require_proto_access = __commonJS((exports) => {
  exports.__esModule = true;
  exports.createProtoAccessControl = createProtoAccessControl;
  exports.resultIsAllowed = resultIsAllowed;
  exports.resetLoggedProperties = resetLoggedProperties;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _utils = require_utils13();
  var _logger = require_logger();
  var _logger2 = _interopRequireDefault(_logger);
  var loggedProperties = Object.create(null);
  function createProtoAccessControl(runtimeOptions) {
    var propertyWhiteList = Object.create(null);
    propertyWhiteList["__proto__"] = false;
    _utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
    var methodWhiteList = Object.create(null);
    methodWhiteList["constructor"] = false;
    methodWhiteList["__defineGetter__"] = false;
    methodWhiteList["__defineSetter__"] = false;
    methodWhiteList["__lookupGetter__"] = false;
    methodWhiteList["__lookupSetter__"] = false;
    _utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
    return {
      properties: {
        whitelist: propertyWhiteList,
        defaultValue: runtimeOptions.allowProtoPropertiesByDefault
      },
      methods: {
        whitelist: methodWhiteList,
        defaultValue: runtimeOptions.allowProtoMethodsByDefault
      }
    };
  }
  function resultIsAllowed(result, protoAccessControl, propertyName) {
    if (typeof result === "function") {
      return checkWhiteList(protoAccessControl.methods, propertyName);
    } else {
      return checkWhiteList(protoAccessControl.properties, propertyName);
    }
  }
  function checkWhiteList(protoAccessControlForType, propertyName) {
    if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
      return protoAccessControlForType.whitelist[propertyName] === true;
    }
    if (protoAccessControlForType.defaultValue !== undefined) {
      return protoAccessControlForType.defaultValue;
    }
    logUnexpecedPropertyAccessOnce(propertyName);
    return false;
  }
  function logUnexpecedPropertyAccessOnce(propertyName) {
    if (loggedProperties[propertyName] !== true) {
      loggedProperties[propertyName] = true;
      _logger2["default"].log("error", 'Handlebars: Access has been denied to resolve the property "' + propertyName + `" because it is not an "own property" of its parent.
` + `You can add a runtime option to disable the check or this warning:
` + "See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details");
    }
  }
  function resetLoggedProperties() {
    Object.keys(loggedProperties).forEach(function(propertyName) {
      delete loggedProperties[propertyName];
    });
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/base.js
var require_base = __commonJS((exports) => {
  exports.__esModule = true;
  exports.HandlebarsEnvironment = HandlebarsEnvironment;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _utils = require_utils13();
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  var _helpers = require_helpers();
  var _decorators = require_decorators();
  var _logger = require_logger();
  var _logger2 = _interopRequireDefault(_logger);
  var _internalProtoAccess = require_proto_access();
  var VERSION2 = "4.7.9";
  exports.VERSION = VERSION2;
  var COMPILER_REVISION = 8;
  exports.COMPILER_REVISION = COMPILER_REVISION;
  var LAST_COMPATIBLE_COMPILER_REVISION = 7;
  exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
  var REVISION_CHANGES = {
    1: "<= 1.0.rc.2",
    2: "== 1.0.0-rc.3",
    3: "== 1.0.0-rc.4",
    4: "== 1.x.x",
    5: "== 2.0.0-alpha.x",
    6: ">= 2.0.0-beta.1",
    7: ">= 4.0.0 <4.3.0",
    8: ">= 4.3.0"
  };
  exports.REVISION_CHANGES = REVISION_CHANGES;
  var objectType = "[object Object]";
  function HandlebarsEnvironment(helpers2, partials, decorators) {
    this.helpers = helpers2 || {};
    this.partials = partials || {};
    this.decorators = decorators || {};
    _helpers.registerDefaultHelpers(this);
    _decorators.registerDefaultDecorators(this);
  }
  HandlebarsEnvironment.prototype = {
    constructor: HandlebarsEnvironment,
    logger: _logger2["default"],
    log: _logger2["default"].log,
    registerHelper: function registerHelper(name3, fn3) {
      if (_utils.toString.call(name3) === objectType) {
        if (fn3) {
          throw new _exception2["default"]("Arg not supported with multiple helpers");
        }
        _utils.extend(this.helpers, name3);
      } else {
        this.helpers[name3] = fn3;
      }
    },
    unregisterHelper: function unregisterHelper(name3) {
      delete this.helpers[name3];
    },
    registerPartial: function registerPartial(name3, partial2) {
      if (_utils.toString.call(name3) === objectType) {
        _utils.extend(this.partials, name3);
      } else {
        if (typeof partial2 === "undefined") {
          throw new _exception2["default"]('Attempting to register a partial called "' + name3 + '" as undefined');
        }
        this.partials[name3] = partial2;
      }
    },
    unregisterPartial: function unregisterPartial(name3) {
      delete this.partials[name3];
    },
    registerDecorator: function registerDecorator(name3, fn3) {
      if (_utils.toString.call(name3) === objectType) {
        if (fn3) {
          throw new _exception2["default"]("Arg not supported with multiple decorators");
        }
        _utils.extend(this.decorators, name3);
      } else {
        this.decorators[name3] = fn3;
      }
    },
    unregisterDecorator: function unregisterDecorator(name3) {
      delete this.decorators[name3];
    },
    resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
      _internalProtoAccess.resetLoggedProperties();
    }
  };
  var log4 = _logger2["default"].log;
  exports.log = log4;
  exports.createFrame = _utils.createFrame;
  exports.logger = _logger2["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/safe-string.js
var require_safe_string = __commonJS((exports, module) => {
  exports.__esModule = true;
  function SafeString(string4) {
    this.string = string4;
  }
  SafeString.prototype.toString = SafeString.prototype.toHTML = function() {
    return "" + this.string;
  };
  exports.default = SafeString;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js
var require_wrapHelper = __commonJS((exports) => {
  exports.__esModule = true;
  exports.wrapHelper = wrapHelper;
  function wrapHelper(helper, transformOptionsFn) {
    if (typeof helper !== "function") {
      return helper;
    }
    var wrapper = function wrapper2() {
      var options2 = arguments[arguments.length - 1];
      arguments[arguments.length - 1] = transformOptionsFn(options2);
      return helper.apply(this, arguments);
    };
    return wrapper;
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/runtime.js
var require_runtime = __commonJS((exports) => {
  exports.__esModule = true;
  exports.checkRevision = checkRevision;
  exports.template = template2;
  exports.wrapProgram = wrapProgram;
  exports.resolvePartial = resolvePartial;
  exports.invokePartial = invokePartial;
  exports.noop = noop2;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  function _interopRequireWildcard(obj) {
    if (obj && obj.__esModule) {
      return obj;
    } else {
      var newObj = {};
      if (obj != null) {
        for (var key in obj) {
          if (Object.prototype.hasOwnProperty.call(obj, key))
            newObj[key] = obj[key];
        }
      }
      newObj["default"] = obj;
      return newObj;
    }
  }
  var _utils = require_utils13();
  var Utils = _interopRequireWildcard(_utils);
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  var _base = require_base();
  var _helpers = require_helpers();
  var _internalWrapHelper = require_wrapHelper();
  var _internalProtoAccess = require_proto_access();
  function checkRevision(compilerInfo) {
    var compilerRevision = compilerInfo && compilerInfo[0] || 1, currentRevision = _base.COMPILER_REVISION;
    if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
      return;
    }
    if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
      var runtimeVersions = _base.REVISION_CHANGES[currentRevision], compilerVersions = _base.REVISION_CHANGES[compilerRevision];
      throw new _exception2["default"]("Template was precompiled with an older version of Handlebars than the current runtime. " + "Please update your precompiler to a newer version (" + runtimeVersions + ") or downgrade your runtime to an older version (" + compilerVersions + ").");
    } else {
      throw new _exception2["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. " + "Please update your runtime to a newer version (" + compilerInfo[1] + ").");
    }
  }
  function template2(templateSpec, env2) {
    if (!env2) {
      throw new _exception2["default"]("No environment passed to template");
    }
    if (!templateSpec || !templateSpec.main) {
      throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
    }
    templateSpec.main.decorator = templateSpec.main_d;
    env2.VM.checkRevision(templateSpec.compiler);
    var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
    function invokePartialWrapper(partial2, context10, options2) {
      if (options2.hash) {
        context10 = Utils.extend({}, context10, options2.hash);
        if (options2.ids) {
          options2.ids[0] = true;
        }
      }
      partial2 = env2.VM.resolvePartial.call(this, partial2, context10, options2);
      options2.hooks = this.hooks;
      options2.protoAccessControl = this.protoAccessControl;
      var result = env2.VM.invokePartial.call(this, partial2, context10, options2);
      if (result == null && env2.compile) {
        options2.partials[options2.name] = env2.compile(partial2, templateSpec.compilerOptions, env2);
        result = options2.partials[options2.name](context10, options2);
      }
      if (result != null) {
        if (options2.indent) {
          var lines = result.split(`
`);
          for (var i = 0, l6 = lines.length;i < l6; i++) {
            if (!lines[i] && i + 1 === l6) {
              break;
            }
            lines[i] = options2.indent + lines[i];
          }
          result = lines.join(`
`);
        }
        return result;
      } else {
        throw new _exception2["default"]("The partial " + options2.name + " could not be compiled when running in runtime-only mode");
      }
    }
    var container2 = {
      strict: function strict(obj, name3, loc) {
        if (!obj || !(name3 in obj)) {
          throw new _exception2["default"]('"' + name3 + '" not defined in ' + obj, {
            loc
          });
        }
        return container2.lookupProperty(obj, name3);
      },
      lookupProperty: function lookupProperty(parent, propertyName) {
        var result = parent[propertyName];
        if (result == null) {
          return result;
        }
        if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
          return result;
        }
        if (_internalProtoAccess.resultIsAllowed(result, container2.protoAccessControl, propertyName)) {
          return result;
        }
        return;
      },
      lookup: function lookup(depths, name3) {
        var len = depths.length;
        for (var i = 0;i < len; i++) {
          var result = depths[i] && container2.lookupProperty(depths[i], name3);
          if (result != null) {
            return result;
          }
        }
      },
      lambda: function lambda(current, context10) {
        return typeof current === "function" ? current.call(context10) : current;
      },
      escapeExpression: Utils.escapeExpression,
      invokePartial: invokePartialWrapper,
      fn: function fn3(i) {
        var ret2 = templateSpec[i];
        ret2.decorator = templateSpec[i + "_d"];
        return ret2;
      },
      programs: [],
      program: function program(i, data, declaredBlockParams, blockParams, depths) {
        var programWrapper = this.programs[i], fn3 = this.fn(i);
        if (data || depths || blockParams || declaredBlockParams) {
          programWrapper = wrapProgram(this, i, fn3, data, declaredBlockParams, blockParams, depths);
        } else if (!programWrapper) {
          programWrapper = this.programs[i] = wrapProgram(this, i, fn3);
        }
        return programWrapper;
      },
      data: function data(value, depth) {
        while (value && depth--) {
          value = value._parent;
        }
        return value;
      },
      mergeIfNeeded: function mergeIfNeeded(param, common) {
        var obj = param || common;
        if (param && common && param !== common) {
          obj = Utils.extend({}, common, param);
        }
        return obj;
      },
      nullContext: Object.seal({}),
      noop: env2.VM.noop,
      compilerInfo: templateSpec.compiler
    };
    function ret(context10) {
      var options2 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
      var data = options2.data;
      ret._setup(options2);
      if (!options2.partial && templateSpec.useData) {
        data = initData(context10, data);
      }
      var depths = undefined, blockParams = templateSpec.useBlockParams ? [] : undefined;
      if (templateSpec.useDepths) {
        if (options2.depths) {
          depths = context10 != options2.depths[0] ? [context10].concat(options2.depths) : options2.depths;
        } else {
          depths = [context10];
        }
      }
      function main(context11) {
        return "" + templateSpec.main(container2, context11, container2.helpers, container2.partials, data, blockParams, depths);
      }
      main = executeDecorators(templateSpec.main, main, container2, options2.depths || [], data, blockParams);
      return main(context10, options2);
    }
    ret.isTop = true;
    ret._setup = function(options2) {
      if (!options2.partial) {
        var mergedHelpers = {};
        addHelpers(mergedHelpers, env2.helpers, container2);
        addHelpers(mergedHelpers, options2.helpers, container2);
        container2.helpers = mergedHelpers;
        if (templateSpec.usePartial) {
          container2.partials = container2.mergeIfNeeded(options2.partials, env2.partials);
        }
        if (templateSpec.usePartial || templateSpec.useDecorators) {
          container2.decorators = Utils.extend({}, env2.decorators, options2.decorators);
        }
        container2.hooks = {};
        container2.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options2);
        var keepHelperInHelpers = options2.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
        _helpers.moveHelperToHooks(container2, "helperMissing", keepHelperInHelpers);
        _helpers.moveHelperToHooks(container2, "blockHelperMissing", keepHelperInHelpers);
      } else {
        container2.protoAccessControl = options2.protoAccessControl;
        container2.helpers = options2.helpers;
        container2.partials = options2.partials;
        container2.decorators = options2.decorators;
        container2.hooks = options2.hooks;
      }
    };
    ret._child = function(i, data, blockParams, depths) {
      if (templateSpec.useBlockParams && !blockParams) {
        throw new _exception2["default"]("must pass block params");
      }
      if (templateSpec.useDepths && !depths) {
        throw new _exception2["default"]("must pass parent depths");
      }
      return wrapProgram(container2, i, templateSpec[i], data, 0, blockParams, depths);
    };
    return ret;
  }
  function wrapProgram(container2, i, fn3, data, declaredBlockParams, blockParams, depths) {
    function prog(context10) {
      var options2 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
      var currentDepths = depths;
      if (depths && context10 != depths[0] && !(context10 === container2.nullContext && depths[0] === null)) {
        currentDepths = [context10].concat(depths);
      }
      return fn3(container2, context10, container2.helpers, container2.partials, options2.data || data, blockParams && [options2.blockParams].concat(blockParams), currentDepths);
    }
    prog = executeDecorators(fn3, prog, container2, depths, data, blockParams);
    prog.program = i;
    prog.depth = depths ? depths.length : 0;
    prog.blockParams = declaredBlockParams || 0;
    return prog;
  }
  function resolvePartial(partial2, context10, options2) {
    if (!partial2) {
      if (options2.name === "@partial-block") {
        partial2 = lookupOwnProperty(options2.data, "partial-block");
      } else {
        partial2 = lookupOwnProperty(options2.partials, options2.name);
      }
    } else if (!partial2.call && !options2.name) {
      options2.name = partial2;
      partial2 = lookupOwnProperty(options2.partials, partial2);
    }
    return partial2;
  }
  function invokePartial(partial2, context10, options2) {
    var currentPartialBlock = lookupOwnProperty(options2.data, "partial-block");
    options2.partial = true;
    if (options2.ids) {
      options2.data.contextPath = options2.ids[0] || options2.data.contextPath;
    }
    var partialBlock = undefined;
    if (options2.fn && options2.fn !== noop2) {
      (function() {
        options2.data = _base.createFrame(options2.data);
        var fn3 = options2.fn;
        partialBlock = options2.data["partial-block"] = function partialBlockWrapper(context11) {
          var options3 = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
          options3.data = _base.createFrame(options3.data);
          options3.data["partial-block"] = currentPartialBlock;
          return fn3(context11, options3);
        };
        if (fn3.partials) {
          options2.partials = Utils.extend({}, options2.partials, fn3.partials);
        }
      })();
    }
    if (partial2 === undefined && partialBlock) {
      partial2 = partialBlock;
    }
    if (partial2 === undefined) {
      throw new _exception2["default"]("The partial " + options2.name + " could not be found");
    } else if (partial2 instanceof Function) {
      return partial2(context10, options2);
    }
  }
  function noop2() {
    return "";
  }
  function lookupOwnProperty(obj, name3) {
    if (obj && Object.prototype.hasOwnProperty.call(obj, name3)) {
      return obj[name3];
    }
  }
  function initData(context10, data) {
    if (!data || !("root" in data)) {
      data = data ? _base.createFrame(data) : {};
      data.root = context10;
    }
    return data;
  }
  function executeDecorators(fn3, prog, container2, depths, data, blockParams) {
    if (fn3.decorator) {
      var props = {};
      prog = fn3.decorator(prog, props, container2, depths && depths[0], data, blockParams, depths);
      Utils.extend(prog, props);
    }
    return prog;
  }
  function addHelpers(mergedHelpers, helpers2, container2) {
    if (!helpers2)
      return;
    Object.keys(helpers2).forEach(function(helperName) {
      var helper = helpers2[helperName];
      mergedHelpers[helperName] = passLookupPropertyOption(helper, container2);
    });
  }
  function passLookupPropertyOption(helper, container2) {
    var lookupProperty = container2.lookupProperty;
    return _internalWrapHelper.wrapHelper(helper, function(options2) {
      options2.lookupProperty = lookupProperty;
      return options2;
    });
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js
var require_no_conflict = __commonJS((exports, module) => {
  exports.__esModule = true;
  exports.default = function(Handlebars) {
    (function() {
      if (typeof globalThis === "object")
        return;
      Object.prototype.__defineGetter__("__magic__", function() {
        return this;
      });
      __magic__.globalThis = __magic__;
      delete Object.prototype.__magic__;
    })();
    var $Handlebars = globalThis.Handlebars;
    Handlebars.noConflict = function() {
      if (globalThis.Handlebars === Handlebars) {
        globalThis.Handlebars = $Handlebars;
      }
      return Handlebars;
    };
  };
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars.runtime.js
var require_handlebars_runtime = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  function _interopRequireWildcard(obj) {
    if (obj && obj.__esModule) {
      return obj;
    } else {
      var newObj = {};
      if (obj != null) {
        for (var key in obj) {
          if (Object.prototype.hasOwnProperty.call(obj, key))
            newObj[key] = obj[key];
        }
      }
      newObj["default"] = obj;
      return newObj;
    }
  }
  var _handlebarsBase = require_base();
  var base = _interopRequireWildcard(_handlebarsBase);
  var _handlebarsSafeString = require_safe_string();
  var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
  var _handlebarsException = require_exception();
  var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
  var _handlebarsUtils = require_utils13();
  var Utils = _interopRequireWildcard(_handlebarsUtils);
  var _handlebarsRuntime = require_runtime();
  var runtime = _interopRequireWildcard(_handlebarsRuntime);
  var _handlebarsNoConflict = require_no_conflict();
  var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
  function create() {
    var hb = new base.HandlebarsEnvironment;
    Utils.extend(hb, base);
    hb.SafeString = _handlebarsSafeString2["default"];
    hb.Exception = _handlebarsException2["default"];
    hb.Utils = Utils;
    hb.escapeExpression = Utils.escapeExpression;
    hb.VM = runtime;
    hb.template = function(spec2) {
      return runtime.template(spec2, hb);
    };
    return hb;
  }
  var inst = create();
  inst.create = create;
  _handlebarsNoConflict2["default"](inst);
  inst["default"] = inst;
  exports.default = inst;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js
var require_ast = __commonJS((exports, module) => {
  exports.__esModule = true;
  var AST = {
    helpers: {
      helperExpression: function helperExpression(node3) {
        return node3.type === "SubExpression" || (node3.type === "MustacheStatement" || node3.type === "BlockStatement") && !!(node3.params && node3.params.length || node3.hash);
      },
      scopedId: function scopedId(path2) {
        return /^\.|this\b/.test(path2.original);
      },
      simpleId: function simpleId(path2) {
        return path2.parts.length === 1 && !AST.helpers.scopedId(path2) && !path2.depth;
      }
    }
  };
  exports.default = AST;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js
var require_parser2 = __commonJS((exports, module) => {
  exports.__esModule = true;
  var handlebars = function() {
    var parser2 = {
      trace: function trace8() {},
      yy: {},
      symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, partialBlock: 12, content: 13, COMMENT: 14, CONTENT: 15, openRawBlock: 16, rawBlock_repetition0: 17, END_RAW_BLOCK: 18, OPEN_RAW_BLOCK: 19, helperName: 20, openRawBlock_repetition0: 21, openRawBlock_option0: 22, CLOSE_RAW_BLOCK: 23, openBlock: 24, block_option0: 25, closeBlock: 26, openInverse: 27, block_option1: 28, OPEN_BLOCK: 29, openBlock_repetition0: 30, openBlock_option0: 31, openBlock_option1: 32, CLOSE: 33, OPEN_INVERSE: 34, openInverse_repetition0: 35, openInverse_option0: 36, openInverse_option1: 37, openInverseChain: 38, OPEN_INVERSE_CHAIN: 39, openInverseChain_repetition0: 40, openInverseChain_option0: 41, openInverseChain_option1: 42, inverseAndProgram: 43, INVERSE: 44, inverseChain: 45, inverseChain_option0: 46, OPEN_ENDBLOCK: 47, OPEN: 48, mustache_repetition0: 49, mustache_option0: 50, OPEN_UNESCAPED: 51, mustache_repetition1: 52, mustache_option1: 53, CLOSE_UNESCAPED: 54, OPEN_PARTIAL: 55, partialName: 56, partial_repetition0: 57, partial_option0: 58, openPartialBlock: 59, OPEN_PARTIAL_BLOCK: 60, openPartialBlock_repetition0: 61, openPartialBlock_option0: 62, param: 63, sexpr: 64, OPEN_SEXPR: 65, sexpr_repetition0: 66, sexpr_option0: 67, CLOSE_SEXPR: 68, hash: 69, hash_repetition_plus0: 70, hashSegment: 71, ID: 72, EQUALS: 73, blockParams: 74, OPEN_BLOCK_PARAMS: 75, blockParams_repetition_plus0: 76, CLOSE_BLOCK_PARAMS: 77, path: 78, dataName: 79, STRING: 80, NUMBER: 81, BOOLEAN: 82, UNDEFINED: 83, NULL: 84, DATA: 85, pathSegments: 86, SEP: 87, $accept: 0, $end: 1 },
      terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
      productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
      performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
        var $0 = $$.length - 1;
        switch (yystate) {
          case 1:
            return $$[$0 - 1];
            break;
          case 2:
            this.$ = yy.prepareProgram($$[$0]);
            break;
          case 3:
            this.$ = $$[$0];
            break;
          case 4:
            this.$ = $$[$0];
            break;
          case 5:
            this.$ = $$[$0];
            break;
          case 6:
            this.$ = $$[$0];
            break;
          case 7:
            this.$ = $$[$0];
            break;
          case 8:
            this.$ = $$[$0];
            break;
          case 9:
            this.$ = {
              type: "CommentStatement",
              value: yy.stripComment($$[$0]),
              strip: yy.stripFlags($$[$0], $$[$0]),
              loc: yy.locInfo(this._$)
            };
            break;
          case 10:
            this.$ = {
              type: "ContentStatement",
              original: $$[$0],
              value: $$[$0],
              loc: yy.locInfo(this._$)
            };
            break;
          case 11:
            this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
            break;
          case 12:
            this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
            break;
          case 13:
            this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
            break;
          case 14:
            this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
            break;
          case 15:
            this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
            break;
          case 16:
            this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
            break;
          case 17:
            this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
            break;
          case 18:
            this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
            break;
          case 19:
            var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
            program.chained = true;
            this.$ = { strip: $$[$0 - 2].strip, program, chain: true };
            break;
          case 20:
            this.$ = $$[$0];
            break;
          case 21:
            this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
            break;
          case 22:
            this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
            break;
          case 23:
            this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
            break;
          case 24:
            this.$ = {
              type: "PartialStatement",
              name: $$[$0 - 3],
              params: $$[$0 - 2],
              hash: $$[$0 - 1],
              indent: "",
              strip: yy.stripFlags($$[$0 - 4], $$[$0]),
              loc: yy.locInfo(this._$)
            };
            break;
          case 25:
            this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
            break;
          case 26:
            this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
            break;
          case 27:
            this.$ = $$[$0];
            break;
          case 28:
            this.$ = $$[$0];
            break;
          case 29:
            this.$ = {
              type: "SubExpression",
              path: $$[$0 - 3],
              params: $$[$0 - 2],
              hash: $$[$0 - 1],
              loc: yy.locInfo(this._$)
            };
            break;
          case 30:
            this.$ = { type: "Hash", pairs: $$[$0], loc: yy.locInfo(this._$) };
            break;
          case 31:
            this.$ = { type: "HashPair", key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
            break;
          case 32:
            this.$ = yy.id($$[$0 - 1]);
            break;
          case 33:
            this.$ = $$[$0];
            break;
          case 34:
            this.$ = $$[$0];
            break;
          case 35:
            this.$ = { type: "StringLiteral", value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
            break;
          case 36:
            this.$ = { type: "NumberLiteral", value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
            break;
          case 37:
            this.$ = { type: "BooleanLiteral", value: $$[$0] === "true", original: $$[$0] === "true", loc: yy.locInfo(this._$) };
            break;
          case 38:
            this.$ = { type: "UndefinedLiteral", original: undefined, value: undefined, loc: yy.locInfo(this._$) };
            break;
          case 39:
            this.$ = { type: "NullLiteral", original: null, value: null, loc: yy.locInfo(this._$) };
            break;
          case 40:
            this.$ = $$[$0];
            break;
          case 41:
            this.$ = $$[$0];
            break;
          case 42:
            this.$ = yy.preparePath(true, $$[$0], this._$);
            break;
          case 43:
            this.$ = yy.preparePath(false, $$[$0], this._$);
            break;
          case 44:
            $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });
            this.$ = $$[$0 - 2];
            break;
          case 45:
            this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
            break;
          case 46:
            this.$ = [];
            break;
          case 47:
            $$[$0 - 1].push($$[$0]);
            break;
          case 48:
            this.$ = [];
            break;
          case 49:
            $$[$0 - 1].push($$[$0]);
            break;
          case 50:
            this.$ = [];
            break;
          case 51:
            $$[$0 - 1].push($$[$0]);
            break;
          case 58:
            this.$ = [];
            break;
          case 59:
            $$[$0 - 1].push($$[$0]);
            break;
          case 64:
            this.$ = [];
            break;
          case 65:
            $$[$0 - 1].push($$[$0]);
            break;
          case 70:
            this.$ = [];
            break;
          case 71:
            $$[$0 - 1].push($$[$0]);
            break;
          case 78:
            this.$ = [];
            break;
          case 79:
            $$[$0 - 1].push($$[$0]);
            break;
          case 82:
            this.$ = [];
            break;
          case 83:
            $$[$0 - 1].push($$[$0]);
            break;
          case 86:
            this.$ = [];
            break;
          case 87:
            $$[$0 - 1].push($$[$0]);
            break;
          case 90:
            this.$ = [];
            break;
          case 91:
            $$[$0 - 1].push($$[$0]);
            break;
          case 94:
            this.$ = [];
            break;
          case 95:
            $$[$0 - 1].push($$[$0]);
            break;
          case 98:
            this.$ = [$$[$0]];
            break;
          case 99:
            $$[$0 - 1].push($$[$0]);
            break;
          case 100:
            this.$ = [$$[$0]];
            break;
          case 101:
            $$[$0 - 1].push($$[$0]);
            break;
        }
      },
      table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
      defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] },
      parseError: function parseError(str, hash2) {
        throw new Error(str);
      },
      parse: function parse6(input) {
        var self2 = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF2 = 1;
        this.lexer.setInput(input);
        this.lexer.yy = this.yy;
        this.yy.lexer = this.lexer;
        this.yy.parser = this;
        if (typeof this.lexer.yylloc == "undefined")
          this.lexer.yylloc = {};
        var yyloc = this.lexer.yylloc;
        lstack.push(yyloc);
        var ranges = this.lexer.options && this.lexer.options.ranges;
        if (typeof this.yy.parseError === "function")
          this.parseError = this.yy.parseError;
        function popStack(n3) {
          stack.length = stack.length - 2 * n3;
          vstack.length = vstack.length - n3;
          lstack.length = lstack.length - n3;
        }
        function lex() {
          var token2;
          token2 = self2.lexer.lex() || 1;
          if (typeof token2 !== "number") {
            token2 = self2.symbols_[token2] || token2;
          }
          return token2;
        }
        var symbol2, preErrorSymbol, state, action, a2, r2, yyval = {}, p3, len, newState, expected;
        while (true) {
          state = stack[stack.length - 1];
          if (this.defaultActions[state]) {
            action = this.defaultActions[state];
          } else {
            if (symbol2 === null || typeof symbol2 == "undefined") {
              symbol2 = lex();
            }
            action = table[state] && table[state][symbol2];
          }
          if (typeof action === "undefined" || !action.length || !action[0]) {
            var errStr = "";
            if (!recovering) {
              expected = [];
              for (p3 in table[state])
                if (this.terminals_[p3] && p3 > 2) {
                  expected.push("'" + this.terminals_[p3] + "'");
                }
              if (this.lexer.showPosition) {
                errStr = "Parse error on line " + (yylineno + 1) + `:
` + this.lexer.showPosition() + `
Expecting ` + expected.join(", ") + ", got '" + (this.terminals_[symbol2] || symbol2) + "'";
              } else {
                errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol2 == 1 ? "end of input" : "'" + (this.terminals_[symbol2] || symbol2) + "'");
              }
              this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol2] || symbol2, line: this.lexer.yylineno, loc: yyloc, expected });
            }
          }
          if (action[0] instanceof Array && action.length > 1) {
            throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol2);
          }
          switch (action[0]) {
            case 1:
              stack.push(symbol2);
              vstack.push(this.lexer.yytext);
              lstack.push(this.lexer.yylloc);
              stack.push(action[1]);
              symbol2 = null;
              if (!preErrorSymbol) {
                yyleng = this.lexer.yyleng;
                yytext = this.lexer.yytext;
                yylineno = this.lexer.yylineno;
                yyloc = this.lexer.yylloc;
                if (recovering > 0)
                  recovering--;
              } else {
                symbol2 = preErrorSymbol;
                preErrorSymbol = null;
              }
              break;
            case 2:
              len = this.productions_[action[1]][1];
              yyval.$ = vstack[vstack.length - len];
              yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
              if (ranges) {
                yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
              }
              r2 = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
              if (typeof r2 !== "undefined") {
                return r2;
              }
              if (len) {
                stack = stack.slice(0, -1 * len * 2);
                vstack = vstack.slice(0, -1 * len);
                lstack = lstack.slice(0, -1 * len);
              }
              stack.push(this.productions_[action[1]][0]);
              vstack.push(yyval.$);
              lstack.push(yyval._$);
              newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
              stack.push(newState);
              break;
            case 3:
              return true;
          }
        }
        return true;
      }
    };
    var lexer3 = function() {
      var lexer4 = {
        EOF: 1,
        parseError: function parseError(str, hash2) {
          if (this.yy.parser) {
            this.yy.parser.parseError(str, hash2);
          } else {
            throw new Error(str);
          }
        },
        setInput: function setInput(input) {
          this._input = input;
          this._more = this._less = this.done = false;
          this.yylineno = this.yyleng = 0;
          this.yytext = this.matched = this.match = "";
          this.conditionStack = ["INITIAL"];
          this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
          if (this.options.ranges)
            this.yylloc.range = [0, 0];
          this.offset = 0;
          return this;
        },
        input: function input() {
          var ch = this._input[0];
          this.yytext += ch;
          this.yyleng++;
          this.offset++;
          this.match += ch;
          this.matched += ch;
          var lines = ch.match(/(?:\r\n?|\n).*/g);
          if (lines) {
            this.yylineno++;
            this.yylloc.last_line++;
          } else {
            this.yylloc.last_column++;
          }
          if (this.options.ranges)
            this.yylloc.range[1]++;
          this._input = this._input.slice(1);
          return ch;
        },
        unput: function unput(ch) {
          var len = ch.length;
          var lines = ch.split(/(?:\r\n?|\n)/g);
          this._input = ch + this._input;
          this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
          this.offset -= len;
          var oldLines = this.match.split(/(?:\r\n?|\n)/g);
          this.match = this.match.substr(0, this.match.length - 1);
          this.matched = this.matched.substr(0, this.matched.length - 1);
          if (lines.length - 1)
            this.yylineno -= lines.length - 1;
          var r2 = this.yylloc.range;
          this.yylloc = {
            first_line: this.yylloc.first_line,
            last_line: this.yylineno + 1,
            first_column: this.yylloc.first_column,
            last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
          };
          if (this.options.ranges) {
            this.yylloc.range = [r2[0], r2[0] + this.yyleng - len];
          }
          return this;
        },
        more: function more() {
          this._more = true;
          return this;
        },
        less: function less(n3) {
          this.unput(this.match.slice(n3));
        },
        pastInput: function pastInput() {
          var past = this.matched.substr(0, this.matched.length - this.match.length);
          return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
        },
        upcomingInput: function upcomingInput() {
          var next = this.match;
          if (next.length < 20) {
            next += this._input.substr(0, 20 - next.length);
          }
          return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
        },
        showPosition: function showPosition() {
          var pre = this.pastInput();
          var c3 = new Array(pre.length + 1).join("-");
          return pre + this.upcomingInput() + `
` + c3 + "^";
        },
        next: function next() {
          if (this.done) {
            return this.EOF;
          }
          if (!this._input)
            this.done = true;
          var token2, match, tempMatch, index2, col, lines;
          if (!this._more) {
            this.yytext = "";
            this.match = "";
          }
          var rules = this._currentRules();
          for (var i = 0;i < rules.length; i++) {
            tempMatch = this._input.match(this.rules[rules[i]]);
            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
              match = tempMatch;
              index2 = i;
              if (!this.options.flex)
                break;
            }
          }
          if (match) {
            lines = match[0].match(/(?:\r\n?|\n).*/g);
            if (lines)
              this.yylineno += lines.length;
            this.yylloc = {
              first_line: this.yylloc.last_line,
              last_line: this.yylineno + 1,
              first_column: this.yylloc.last_column,
              last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
            };
            this.yytext += match[0];
            this.match += match[0];
            this.matches = match;
            this.yyleng = this.yytext.length;
            if (this.options.ranges) {
              this.yylloc.range = [this.offset, this.offset += this.yyleng];
            }
            this._more = false;
            this._input = this._input.slice(match[0].length);
            this.matched += match[0];
            token2 = this.performAction.call(this, this.yy, this, rules[index2], this.conditionStack[this.conditionStack.length - 1]);
            if (this.done && this._input)
              this.done = false;
            if (token2)
              return token2;
            else
              return;
          }
          if (this._input === "") {
            return this.EOF;
          } else {
            return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), { text: "", token: null, line: this.yylineno });
          }
        },
        lex: function lex() {
          var r2 = this.next();
          if (typeof r2 !== "undefined") {
            return r2;
          } else {
            return this.lex();
          }
        },
        begin: function begin(condition) {
          this.conditionStack.push(condition);
        },
        popState: function popState() {
          return this.conditionStack.pop();
        },
        _currentRules: function _currentRules() {
          return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
        },
        topState: function topState() {
          return this.conditionStack[this.conditionStack.length - 2];
        },
        pushState: function begin(condition) {
          this.begin(condition);
        }
      };
      lexer4.options = {};
      lexer4.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
        function strip(start, end) {
          return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);
        }
        var YYSTATE = YY_START;
        switch ($avoiding_name_collisions) {
          case 0:
            if (yy_.yytext.slice(-2) === "\\\\") {
              strip(0, 1);
              this.begin("mu");
            } else if (yy_.yytext.slice(-1) === "\\") {
              strip(0, 1);
              this.begin("emu");
            } else {
              this.begin("mu");
            }
            if (yy_.yytext)
              return 15;
            break;
          case 1:
            return 15;
            break;
          case 2:
            this.popState();
            return 15;
            break;
          case 3:
            this.begin("raw");
            return 15;
            break;
          case 4:
            this.popState();
            if (this.conditionStack[this.conditionStack.length - 1] === "raw") {
              return 15;
            } else {
              strip(5, 9);
              return "END_RAW_BLOCK";
            }
            break;
          case 5:
            return 15;
            break;
          case 6:
            this.popState();
            return 14;
            break;
          case 7:
            return 65;
            break;
          case 8:
            return 68;
            break;
          case 9:
            return 19;
            break;
          case 10:
            this.popState();
            this.begin("raw");
            return 23;
            break;
          case 11:
            return 55;
            break;
          case 12:
            return 60;
            break;
          case 13:
            return 29;
            break;
          case 14:
            return 47;
            break;
          case 15:
            this.popState();
            return 44;
            break;
          case 16:
            this.popState();
            return 44;
            break;
          case 17:
            return 34;
            break;
          case 18:
            return 39;
            break;
          case 19:
            return 51;
            break;
          case 20:
            return 48;
            break;
          case 21:
            this.unput(yy_.yytext);
            this.popState();
            this.begin("com");
            break;
          case 22:
            this.popState();
            return 14;
            break;
          case 23:
            return 48;
            break;
          case 24:
            return 73;
            break;
          case 25:
            return 72;
            break;
          case 26:
            return 72;
            break;
          case 27:
            return 87;
            break;
          case 28:
            break;
          case 29:
            this.popState();
            return 54;
            break;
          case 30:
            this.popState();
            return 33;
            break;
          case 31:
            yy_.yytext = strip(1, 2).replace(/\\"/g, '"');
            return 80;
            break;
          case 32:
            yy_.yytext = strip(1, 2).replace(/\\'/g, "'");
            return 80;
            break;
          case 33:
            return 85;
            break;
          case 34:
            return 82;
            break;
          case 35:
            return 82;
            break;
          case 36:
            return 83;
            break;
          case 37:
            return 84;
            break;
          case 38:
            return 81;
            break;
          case 39:
            return 75;
            break;
          case 40:
            return 77;
            break;
          case 41:
            return 72;
            break;
          case 42:
            yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, "$1");
            return 72;
            break;
          case 43:
            return "INVALID";
            break;
          case 44:
            return 5;
            break;
        }
      };
      lexer4.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
      lexer4.conditions = { mu: { rules: [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [6], inclusive: false }, raw: { rules: [3, 4, 5], inclusive: false }, INITIAL: { rules: [0, 1, 44], inclusive: true } };
      return lexer4;
    }();
    parser2.lexer = lexer3;
    function Parser2() {
      this.yy = {};
    }
    Parser2.prototype = parser2;
    parser2.Parser = Parser2;
    return new Parser2;
  }();
  exports.default = handlebars;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js
var require_visitor = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  function Visitor() {
    this.parents = [];
  }
  Visitor.prototype = {
    constructor: Visitor,
    mutating: false,
    acceptKey: function acceptKey(node3, name3) {
      var value = this.accept(node3[name3]);
      if (this.mutating) {
        if (value && !Visitor.prototype[value.type]) {
          throw new _exception2["default"]('Unexpected node type "' + value.type + '" found when accepting ' + name3 + " on " + node3.type);
        }
        node3[name3] = value;
      }
    },
    acceptRequired: function acceptRequired(node3, name3) {
      this.acceptKey(node3, name3);
      if (!node3[name3]) {
        throw new _exception2["default"](node3.type + " requires " + name3);
      }
    },
    acceptArray: function acceptArray(array2) {
      for (var i = 0, l6 = array2.length;i < l6; i++) {
        this.acceptKey(array2, i);
        if (!array2[i]) {
          array2.splice(i, 1);
          i--;
          l6--;
        }
      }
    },
    accept: function accept(object2) {
      if (!object2) {
        return;
      }
      if (!this[object2.type]) {
        throw new _exception2["default"]("Unknown type: " + object2.type, object2);
      }
      if (this.current) {
        this.parents.unshift(this.current);
      }
      this.current = object2;
      var ret = this[object2.type](object2);
      this.current = this.parents.shift();
      if (!this.mutating || ret) {
        return ret;
      } else if (ret !== false) {
        return object2;
      }
    },
    Program: function Program(program) {
      this.acceptArray(program.body);
    },
    MustacheStatement: visitSubExpression,
    Decorator: visitSubExpression,
    BlockStatement: visitBlock,
    DecoratorBlock: visitBlock,
    PartialStatement: visitPartial,
    PartialBlockStatement: function PartialBlockStatement(partial2) {
      visitPartial.call(this, partial2);
      this.acceptKey(partial2, "program");
    },
    ContentStatement: function ContentStatement() {},
    CommentStatement: function CommentStatement() {},
    SubExpression: visitSubExpression,
    PathExpression: function PathExpression() {},
    StringLiteral: function StringLiteral() {},
    NumberLiteral: function NumberLiteral() {},
    BooleanLiteral: function BooleanLiteral() {},
    UndefinedLiteral: function UndefinedLiteral() {},
    NullLiteral: function NullLiteral() {},
    Hash: function Hash2(hash2) {
      this.acceptArray(hash2.pairs);
    },
    HashPair: function HashPair(pair) {
      this.acceptRequired(pair, "value");
    }
  };
  function visitSubExpression(mustache) {
    this.acceptRequired(mustache, "path");
    this.acceptArray(mustache.params);
    this.acceptKey(mustache, "hash");
  }
  function visitBlock(block2) {
    visitSubExpression.call(this, block2);
    this.acceptKey(block2, "program");
    this.acceptKey(block2, "inverse");
  }
  function visitPartial(partial2) {
    this.acceptRequired(partial2, "name");
    this.acceptArray(partial2.params);
    this.acceptKey(partial2, "hash");
  }
  exports.default = Visitor;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js
var require_whitespace_control = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _visitor = require_visitor();
  var _visitor2 = _interopRequireDefault(_visitor);
  function WhitespaceControl() {
    var options2 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
    this.options = options2;
  }
  WhitespaceControl.prototype = new _visitor2["default"];
  WhitespaceControl.prototype.Program = function(program) {
    var doStandalone = !this.options.ignoreStandalone;
    var isRoot = !this.isRootSeen;
    this.isRootSeen = true;
    var body2 = program.body;
    for (var i = 0, l6 = body2.length;i < l6; i++) {
      var current = body2[i], strip = this.accept(current);
      if (!strip) {
        continue;
      }
      var _isPrevWhitespace = isPrevWhitespace(body2, i, isRoot), _isNextWhitespace = isNextWhitespace(body2, i, isRoot), openStandalone = strip.openStandalone && _isPrevWhitespace, closeStandalone = strip.closeStandalone && _isNextWhitespace, inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
      if (strip.close) {
        omitRight(body2, i, true);
      }
      if (strip.open) {
        omitLeft(body2, i, true);
      }
      if (doStandalone && inlineStandalone) {
        omitRight(body2, i);
        if (omitLeft(body2, i)) {
          if (current.type === "PartialStatement") {
            current.indent = /([ \t]+$)/.exec(body2[i - 1].original)[1];
          }
        }
      }
      if (doStandalone && openStandalone) {
        omitRight((current.program || current.inverse).body);
        omitLeft(body2, i);
      }
      if (doStandalone && closeStandalone) {
        omitRight(body2, i);
        omitLeft((current.inverse || current.program).body);
      }
    }
    return program;
  };
  WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function(block2) {
    this.accept(block2.program);
    this.accept(block2.inverse);
    var program = block2.program || block2.inverse, inverse = block2.program && block2.inverse, firstInverse = inverse, lastInverse = inverse;
    if (inverse && inverse.chained) {
      firstInverse = inverse.body[0].program;
      while (lastInverse.chained) {
        lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
      }
    }
    var strip = {
      open: block2.openStrip.open,
      close: block2.closeStrip.close,
      openStandalone: isNextWhitespace(program.body),
      closeStandalone: isPrevWhitespace((firstInverse || program).body)
    };
    if (block2.openStrip.close) {
      omitRight(program.body, null, true);
    }
    if (inverse) {
      var inverseStrip = block2.inverseStrip;
      if (inverseStrip.open) {
        omitLeft(program.body, null, true);
      }
      if (inverseStrip.close) {
        omitRight(firstInverse.body, null, true);
      }
      if (block2.closeStrip.open) {
        omitLeft(lastInverse.body, null, true);
      }
      if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
        omitLeft(program.body);
        omitRight(firstInverse.body);
      }
    } else if (block2.closeStrip.open) {
      omitLeft(program.body, null, true);
    }
    return strip;
  };
  WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function(mustache) {
    return mustache.strip;
  };
  WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function(node3) {
    var strip = node3.strip || {};
    return {
      inlineStandalone: true,
      open: strip.open,
      close: strip.close
    };
  };
  function isPrevWhitespace(body2, i, isRoot) {
    if (i === undefined) {
      i = body2.length;
    }
    var prev = body2[i - 1], sibling = body2[i - 2];
    if (!prev) {
      return isRoot;
    }
    if (prev.type === "ContentStatement") {
      return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
    }
  }
  function isNextWhitespace(body2, i, isRoot) {
    if (i === undefined) {
      i = -1;
    }
    var next = body2[i + 1], sibling = body2[i + 2];
    if (!next) {
      return isRoot;
    }
    if (next.type === "ContentStatement") {
      return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
    }
  }
  function omitRight(body2, i, multiple) {
    var current = body2[i == null ? 0 : i + 1];
    if (!current || current.type !== "ContentStatement" || !multiple && current.rightStripped) {
      return;
    }
    var original = current.value;
    current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, "");
    current.rightStripped = current.value !== original;
  }
  function omitLeft(body2, i, multiple) {
    var current = body2[i == null ? body2.length - 1 : i - 1];
    if (!current || current.type !== "ContentStatement" || !multiple && current.leftStripped) {
      return;
    }
    var original = current.value;
    current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, "");
    current.leftStripped = current.value !== original;
    return current.leftStripped;
  }
  exports.default = WhitespaceControl;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js
var require_helpers2 = __commonJS((exports) => {
  exports.__esModule = true;
  exports.SourceLocation = SourceLocation;
  exports.id = id;
  exports.stripFlags = stripFlags;
  exports.stripComment = stripComment;
  exports.preparePath = preparePath;
  exports.prepareMustache = prepareMustache;
  exports.prepareRawBlock = prepareRawBlock;
  exports.prepareBlock = prepareBlock;
  exports.prepareProgram = prepareProgram;
  exports.preparePartialBlock = preparePartialBlock;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  function validateClose(open, close2) {
    close2 = close2.path ? close2.path.original : close2;
    if (open.path.original !== close2) {
      var errorNode = { loc: open.path.loc };
      throw new _exception2["default"](open.path.original + " doesn't match " + close2, errorNode);
    }
  }
  function SourceLocation(source, locInfo) {
    this.source = source;
    this.start = {
      line: locInfo.first_line,
      column: locInfo.first_column
    };
    this.end = {
      line: locInfo.last_line,
      column: locInfo.last_column
    };
  }
  function id(token2) {
    if (/^\[.*\]$/.test(token2)) {
      return token2.substring(1, token2.length - 1);
    } else {
      return token2;
    }
  }
  function stripFlags(open, close2) {
    return {
      open: open.charAt(2) === "~",
      close: close2.charAt(close2.length - 3) === "~"
    };
  }
  function stripComment(comment) {
    return comment.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, "");
  }
  function preparePath(data, parts, loc) {
    loc = this.locInfo(loc);
    var original = data ? "@" : "", dig = [], depth = 0;
    for (var i = 0, l6 = parts.length;i < l6; i++) {
      var part = parts[i].part, isLiteral = parts[i].original !== part;
      original += (parts[i].separator || "") + part;
      if (!isLiteral && (part === ".." || part === "." || part === "this")) {
        if (dig.length > 0) {
          throw new _exception2["default"]("Invalid path: " + original, { loc });
        } else if (part === "..") {
          depth++;
        }
      } else {
        dig.push(part);
      }
    }
    return {
      type: "PathExpression",
      data,
      depth,
      parts: dig,
      original,
      loc
    };
  }
  function prepareMustache(path2, params, hash2, open, strip, locInfo) {
    var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
    var decorator = /\*/.test(open);
    return {
      type: decorator ? "Decorator" : "MustacheStatement",
      path: path2,
      params,
      hash: hash2,
      escaped,
      strip,
      loc: this.locInfo(locInfo)
    };
  }
  function prepareRawBlock(openRawBlock, contents, close2, locInfo) {
    validateClose(openRawBlock, close2);
    locInfo = this.locInfo(locInfo);
    var program = {
      type: "Program",
      body: contents,
      strip: {},
      loc: locInfo
    };
    return {
      type: "BlockStatement",
      path: openRawBlock.path,
      params: openRawBlock.params,
      hash: openRawBlock.hash,
      program,
      openStrip: {},
      inverseStrip: {},
      closeStrip: {},
      loc: locInfo
    };
  }
  function prepareBlock(openBlock, program, inverseAndProgram, close2, inverted, locInfo) {
    if (close2 && close2.path) {
      validateClose(openBlock, close2);
    }
    var decorator = /\*/.test(openBlock.open);
    program.blockParams = openBlock.blockParams;
    var inverse = undefined, inverseStrip = undefined;
    if (inverseAndProgram) {
      if (decorator) {
        throw new _exception2["default"]("Unexpected inverse block on decorator", inverseAndProgram);
      }
      if (inverseAndProgram.chain) {
        inverseAndProgram.program.body[0].closeStrip = close2.strip;
      }
      inverseStrip = inverseAndProgram.strip;
      inverse = inverseAndProgram.program;
    }
    if (inverted) {
      inverted = inverse;
      inverse = program;
      program = inverted;
    }
    return {
      type: decorator ? "DecoratorBlock" : "BlockStatement",
      path: openBlock.path,
      params: openBlock.params,
      hash: openBlock.hash,
      program,
      inverse,
      openStrip: openBlock.strip,
      inverseStrip,
      closeStrip: close2 && close2.strip,
      loc: this.locInfo(locInfo)
    };
  }
  function prepareProgram(statements, loc) {
    if (!loc && statements.length) {
      var firstLoc = statements[0].loc, lastLoc = statements[statements.length - 1].loc;
      if (firstLoc && lastLoc) {
        loc = {
          source: firstLoc.source,
          start: {
            line: firstLoc.start.line,
            column: firstLoc.start.column
          },
          end: {
            line: lastLoc.end.line,
            column: lastLoc.end.column
          }
        };
      }
    }
    return {
      type: "Program",
      body: statements,
      strip: {},
      loc
    };
  }
  function preparePartialBlock(open, program, close2, locInfo) {
    validateClose(open, close2);
    return {
      type: "PartialBlockStatement",
      name: open.path,
      params: open.params,
      hash: open.hash,
      program,
      openStrip: open.strip,
      closeStrip: close2 && close2.strip,
      loc: this.locInfo(locInfo)
    };
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js
var require_base2 = __commonJS((exports) => {
  exports.__esModule = true;
  exports.parseWithoutProcessing = parseWithoutProcessing;
  exports.parse = parse6;
  function _interopRequireWildcard(obj) {
    if (obj && obj.__esModule) {
      return obj;
    } else {
      var newObj = {};
      if (obj != null) {
        for (var key in obj) {
          if (Object.prototype.hasOwnProperty.call(obj, key))
            newObj[key] = obj[key];
        }
      }
      newObj["default"] = obj;
      return newObj;
    }
  }
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _parser = require_parser2();
  var _parser2 = _interopRequireDefault(_parser);
  var _whitespaceControl = require_whitespace_control();
  var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
  var _helpers = require_helpers2();
  var Helpers = _interopRequireWildcard(_helpers);
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  var _utils = require_utils13();
  exports.parser = _parser2["default"];
  var yy = {};
  _utils.extend(yy, Helpers);
  function parseWithoutProcessing(input, options2) {
    if (input.type === "Program") {
      validateInputAst(input);
      return input;
    }
    _parser2["default"].yy = yy;
    yy.locInfo = function(locInfo) {
      return new yy.SourceLocation(options2 && options2.srcName, locInfo);
    };
    var ast = _parser2["default"].parse(input);
    return ast;
  }
  function parse6(input, options2) {
    var ast = parseWithoutProcessing(input, options2);
    var strip = new _whitespaceControl2["default"](options2);
    return strip.accept(ast);
  }
  function validateInputAst(ast) {
    validateAstNode(ast);
  }
  function validateAstNode(node3) {
    if (node3 == null) {
      return;
    }
    if (Array.isArray(node3)) {
      node3.forEach(validateAstNode);
      return;
    }
    if (typeof node3 !== "object") {
      return;
    }
    if (node3.type === "PathExpression") {
      if (!isValidDepth(node3.depth)) {
        throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
      }
      if (!Array.isArray(node3.parts)) {
        throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
      }
      for (var i = 0;i < node3.parts.length; i++) {
        if (typeof node3.parts[i] !== "string") {
          throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
        }
      }
    } else if (node3.type === "NumberLiteral") {
      if (typeof node3.value !== "number" || !isFinite(node3.value)) {
        throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
      }
    } else if (node3.type === "BooleanLiteral") {
      if (typeof node3.value !== "boolean") {
        throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
      }
    }
    Object.keys(node3).forEach(function(propertyName) {
      if (propertyName === "loc") {
        return;
      }
      validateAstNode(node3[propertyName]);
    });
  }
  function isValidDepth(depth) {
    return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
  }
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js
var require_compiler = __commonJS((exports) => {
  exports.__esModule = true;
  exports.Compiler = Compiler;
  exports.precompile = precompile;
  exports.compile = compile2;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  var _utils = require_utils13();
  var _ast = require_ast();
  var _ast2 = _interopRequireDefault(_ast);
  var slice = [].slice;
  function Compiler() {}
  Compiler.prototype = {
    compiler: Compiler,
    equals: function equals(other2) {
      var len = this.opcodes.length;
      if (other2.opcodes.length !== len) {
        return false;
      }
      for (var i = 0;i < len; i++) {
        var opcode = this.opcodes[i], otherOpcode = other2.opcodes[i];
        if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
          return false;
        }
      }
      len = this.children.length;
      for (var i = 0;i < len; i++) {
        if (!this.children[i].equals(other2.children[i])) {
          return false;
        }
      }
      return true;
    },
    guid: 0,
    compile: function compile3(program, options2) {
      this.sourceNode = [];
      this.opcodes = [];
      this.children = [];
      this.options = options2;
      this.stringParams = options2.stringParams;
      this.trackIds = options2.trackIds;
      options2.blockParams = options2.blockParams || [];
      options2.knownHelpers = _utils.extend(Object.create(null), {
        helperMissing: true,
        blockHelperMissing: true,
        each: true,
        if: true,
        unless: true,
        with: true,
        log: true,
        lookup: true
      }, options2.knownHelpers);
      return this.accept(program);
    },
    compileProgram: function compileProgram(program) {
      var childCompiler = new this.compiler, result = childCompiler.compile(program, this.options), guid3 = this.guid++;
      this.usePartial = this.usePartial || result.usePartial;
      this.children[guid3] = result;
      this.useDepths = this.useDepths || result.useDepths;
      return guid3;
    },
    accept: function accept(node3) {
      if (!this[node3.type]) {
        throw new _exception2["default"]("Unknown type: " + node3.type, node3);
      }
      this.sourceNode.unshift(node3);
      var ret = this[node3.type](node3);
      this.sourceNode.shift();
      return ret;
    },
    Program: function Program(program) {
      this.options.blockParams.unshift(program.blockParams);
      var body2 = program.body, bodyLength = body2.length;
      for (var i = 0;i < bodyLength; i++) {
        this.accept(body2[i]);
      }
      this.options.blockParams.shift();
      this.isSimple = bodyLength === 1;
      this.blockParams = program.blockParams ? program.blockParams.length : 0;
      return this;
    },
    BlockStatement: function BlockStatement(block2) {
      transformLiteralToPath(block2);
      var { program, inverse } = block2;
      program = program && this.compileProgram(program);
      inverse = inverse && this.compileProgram(inverse);
      var type2 = this.classifySexpr(block2);
      if (type2 === "helper") {
        this.helperSexpr(block2, program, inverse);
      } else if (type2 === "simple") {
        this.simpleSexpr(block2);
        this.opcode("pushProgram", program);
        this.opcode("pushProgram", inverse);
        this.opcode("emptyHash");
        this.opcode("blockValue", block2.path.original);
      } else {
        this.ambiguousSexpr(block2, program, inverse);
        this.opcode("pushProgram", program);
        this.opcode("pushProgram", inverse);
        this.opcode("emptyHash");
        this.opcode("ambiguousBlockValue");
      }
      this.opcode("append");
    },
    DecoratorBlock: function DecoratorBlock(decorator) {
      var program = decorator.program && this.compileProgram(decorator.program);
      var params = this.setupFullMustacheParams(decorator, program, undefined), path2 = decorator.path;
      this.useDecorators = true;
      this.opcode("registerDecorator", params.length, path2.original);
    },
    PartialStatement: function PartialStatement(partial2) {
      this.usePartial = true;
      var program = partial2.program;
      if (program) {
        program = this.compileProgram(partial2.program);
      }
      var params = partial2.params;
      if (params.length > 1) {
        throw new _exception2["default"]("Unsupported number of partial arguments: " + params.length, partial2);
      } else if (!params.length) {
        if (this.options.explicitPartialContext) {
          this.opcode("pushLiteral", "undefined");
        } else {
          params.push({ type: "PathExpression", parts: [], depth: 0 });
        }
      }
      var partialName = partial2.name.original, isDynamic = partial2.name.type === "SubExpression";
      if (isDynamic) {
        this.accept(partial2.name);
      }
      this.setupFullMustacheParams(partial2, program, undefined, true);
      var indent = partial2.indent || "";
      if (this.options.preventIndent && indent) {
        this.opcode("appendContent", indent);
        indent = "";
      }
      this.opcode("invokePartial", isDynamic, partialName, indent);
      this.opcode("append");
    },
    PartialBlockStatement: function PartialBlockStatement(partialBlock) {
      this.PartialStatement(partialBlock);
    },
    MustacheStatement: function MustacheStatement(mustache) {
      this.SubExpression(mustache);
      if (mustache.escaped && !this.options.noEscape) {
        this.opcode("appendEscaped");
      } else {
        this.opcode("append");
      }
    },
    Decorator: function Decorator(decorator) {
      this.DecoratorBlock(decorator);
    },
    ContentStatement: function ContentStatement(content) {
      if (content.value) {
        this.opcode("appendContent", content.value);
      }
    },
    CommentStatement: function CommentStatement() {},
    SubExpression: function SubExpression(sexpr) {
      transformLiteralToPath(sexpr);
      var type2 = this.classifySexpr(sexpr);
      if (type2 === "simple") {
        this.simpleSexpr(sexpr);
      } else if (type2 === "helper") {
        this.helperSexpr(sexpr);
      } else {
        this.ambiguousSexpr(sexpr);
      }
    },
    ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
      var path2 = sexpr.path, name3 = path2.parts[0], isBlock = program != null || inverse != null;
      this.opcode("getContext", path2.depth);
      this.opcode("pushProgram", program);
      this.opcode("pushProgram", inverse);
      path2.strict = true;
      this.accept(path2);
      this.opcode("invokeAmbiguous", name3, isBlock);
    },
    simpleSexpr: function simpleSexpr(sexpr) {
      var path2 = sexpr.path;
      path2.strict = true;
      this.accept(path2);
      this.opcode("resolvePossibleLambda");
    },
    helperSexpr: function helperSexpr(sexpr, program, inverse) {
      var params = this.setupFullMustacheParams(sexpr, program, inverse), path2 = sexpr.path, name3 = path2.parts[0];
      if (this.options.knownHelpers[name3]) {
        this.opcode("invokeKnownHelper", params.length, name3);
      } else if (this.options.knownHelpersOnly) {
        throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name3, sexpr);
      } else {
        path2.strict = true;
        path2.falsy = true;
        this.accept(path2);
        this.opcode("invokeHelper", params.length, path2.original, _ast2["default"].helpers.simpleId(path2));
      }
    },
    PathExpression: function PathExpression(path2) {
      this.addDepth(path2.depth);
      this.opcode("getContext", path2.depth);
      var name3 = path2.parts[0], scoped = _ast2["default"].helpers.scopedId(path2), blockParamId = !path2.depth && !scoped && this.blockParamIndex(name3);
      if (blockParamId) {
        this.opcode("lookupBlockParam", blockParamId, path2.parts);
      } else if (!name3) {
        this.opcode("pushContext");
      } else if (path2.data) {
        this.options.data = true;
        this.opcode("lookupData", path2.depth, path2.parts, path2.strict);
      } else {
        this.opcode("lookupOnContext", path2.parts, path2.falsy, path2.strict, scoped);
      }
    },
    StringLiteral: function StringLiteral(string4) {
      this.opcode("pushString", string4.value);
    },
    NumberLiteral: function NumberLiteral(number5) {
      this.opcode("pushLiteral", number5.value);
    },
    BooleanLiteral: function BooleanLiteral(bool) {
      this.opcode("pushLiteral", bool.value);
    },
    UndefinedLiteral: function UndefinedLiteral() {
      this.opcode("pushLiteral", "undefined");
    },
    NullLiteral: function NullLiteral() {
      this.opcode("pushLiteral", "null");
    },
    Hash: function Hash2(hash2) {
      var pairs = hash2.pairs, i = 0, l6 = pairs.length;
      this.opcode("pushHash");
      for (;i < l6; i++) {
        this.pushParam(pairs[i].value);
      }
      while (i--) {
        this.opcode("assignToHash", pairs[i].key);
      }
      this.opcode("popHash");
    },
    opcode: function opcode(name3) {
      this.opcodes.push({
        opcode: name3,
        args: slice.call(arguments, 1),
        loc: this.sourceNode[0].loc
      });
    },
    addDepth: function addDepth(depth) {
      if (!depth) {
        return;
      }
      this.useDepths = true;
    },
    classifySexpr: function classifySexpr(sexpr) {
      var isSimple = _ast2["default"].helpers.simpleId(sexpr.path);
      var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
      var isHelper = !isBlockParam && _ast2["default"].helpers.helperExpression(sexpr);
      var isEligible = !isBlockParam && (isHelper || isSimple);
      if (isEligible && !isHelper) {
        var _name = sexpr.path.parts[0], options2 = this.options;
        if (options2.knownHelpers[_name]) {
          isHelper = true;
        } else if (options2.knownHelpersOnly) {
          isEligible = false;
        }
      }
      if (isHelper) {
        return "helper";
      } else if (isEligible) {
        return "ambiguous";
      } else {
        return "simple";
      }
    },
    pushParams: function pushParams(params) {
      for (var i = 0, l6 = params.length;i < l6; i++) {
        this.pushParam(params[i]);
      }
    },
    pushParam: function pushParam(val) {
      var value = val.value != null ? val.value : val.original || "";
      if (this.stringParams) {
        if (value.replace) {
          value = value.replace(/^(\.?\.\/)*/g, "").replace(/\//g, ".");
        }
        if (val.depth) {
          this.addDepth(val.depth);
        }
        this.opcode("getContext", val.depth || 0);
        this.opcode("pushStringParam", value, val.type);
        if (val.type === "SubExpression") {
          this.accept(val);
        }
      } else {
        if (this.trackIds) {
          var blockParamIndex = undefined;
          if (val.parts && !_ast2["default"].helpers.scopedId(val) && !val.depth) {
            blockParamIndex = this.blockParamIndex(val.parts[0]);
          }
          if (blockParamIndex) {
            var blockParamChild = val.parts.slice(1).join(".");
            this.opcode("pushId", "BlockParam", blockParamIndex, blockParamChild);
          } else {
            value = val.original || value;
            if (value.replace) {
              value = value.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, "");
            }
            this.opcode("pushId", val.type, value);
          }
        }
        this.accept(val);
      }
    },
    setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
      var params = sexpr.params;
      this.pushParams(params);
      this.opcode("pushProgram", program);
      this.opcode("pushProgram", inverse);
      if (sexpr.hash) {
        this.accept(sexpr.hash);
      } else {
        this.opcode("emptyHash", omitEmpty);
      }
      return params;
    },
    blockParamIndex: function blockParamIndex(name3) {
      for (var depth = 0, len = this.options.blockParams.length;depth < len; depth++) {
        var blockParams = this.options.blockParams[depth], param = blockParams && _utils.indexOf(blockParams, name3);
        if (blockParams && param >= 0) {
          return [depth, param];
        }
      }
    }
  };
  function precompile(input, options2, env2) {
    if (input == null || typeof input !== "string" && input.type !== "Program") {
      throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
    }
    options2 = options2 || {};
    if (!("data" in options2)) {
      options2.data = true;
    }
    if (options2.compat) {
      options2.useDepths = true;
    }
    var ast = env2.parse(input, options2), environment = new env2.Compiler().compile(ast, options2);
    return new env2.JavaScriptCompiler().compile(environment, options2);
  }
  function compile2(input, options2, env2) {
    if (options2 === undefined)
      options2 = {};
    if (input == null || typeof input !== "string" && input.type !== "Program") {
      throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
    }
    options2 = _utils.extend({}, options2);
    if (!("data" in options2)) {
      options2.data = true;
    }
    if (options2.compat) {
      options2.useDepths = true;
    }
    var compiled = undefined;
    function compileInput() {
      var ast = env2.parse(input, options2), environment = new env2.Compiler().compile(ast, options2), templateSpec = new env2.JavaScriptCompiler().compile(environment, options2, undefined, true);
      return env2.template(templateSpec);
    }
    function ret(context10, execOptions) {
      if (!compiled) {
        compiled = compileInput();
      }
      return compiled.call(this, context10, execOptions);
    }
    ret._setup = function(setupOptions) {
      if (!compiled) {
        compiled = compileInput();
      }
      return compiled._setup(setupOptions);
    };
    ret._child = function(i, data, blockParams, depths) {
      if (!compiled) {
        compiled = compileInput();
      }
      return compiled._child(i, data, blockParams, depths);
    };
    return ret;
  }
  function argEquals(a2, b5) {
    if (a2 === b5) {
      return true;
    }
    if (_utils.isArray(a2) && _utils.isArray(b5) && a2.length === b5.length) {
      for (var i = 0;i < a2.length; i++) {
        if (!argEquals(a2[i], b5[i])) {
          return false;
        }
      }
      return true;
    }
  }
  function transformLiteralToPath(sexpr) {
    if (!sexpr.path.parts) {
      var literal3 = sexpr.path;
      sexpr.path = {
        type: "PathExpression",
        data: false,
        depth: 0,
        parts: [literal3.original + ""],
        original: literal3.original + "",
        loc: literal3.loc
      };
    }
  }
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js
var require_base642 = __commonJS((exports) => {
  var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
  exports.encode = function(number5) {
    if (0 <= number5 && number5 < intToCharMap.length) {
      return intToCharMap[number5];
    }
    throw new TypeError("Must be between 0 and 63: " + number5);
  };
  exports.decode = function(charCode) {
    var bigA = 65;
    var bigZ = 90;
    var littleA = 97;
    var littleZ = 122;
    var zero2 = 48;
    var nine = 57;
    var plus = 43;
    var slash = 47;
    var littleOffset = 26;
    var numberOffset = 52;
    if (bigA <= charCode && charCode <= bigZ) {
      return charCode - bigA;
    }
    if (littleA <= charCode && charCode <= littleZ) {
      return charCode - littleA + littleOffset;
    }
    if (zero2 <= charCode && charCode <= nine) {
      return charCode - zero2 + numberOffset;
    }
    if (charCode == plus) {
      return 62;
    }
    if (charCode == slash) {
      return 63;
    }
    return -1;
  };
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js
var require_base64_vlq2 = __commonJS((exports) => {
  var base643 = require_base642();
  var VLQ_BASE_SHIFT = 5;
  var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  var VLQ_BASE_MASK = VLQ_BASE - 1;
  var VLQ_CONTINUATION_BIT = VLQ_BASE;
  function toVLQSigned(aValue) {
    return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  }
  function fromVLQSigned(aValue) {
    var isNegative = (aValue & 1) === 1;
    var shifted = aValue >> 1;
    return isNegative ? -shifted : shifted;
  }
  exports.encode = function base64VLQ_encode(aValue) {
    var encoded = "";
    var digit;
    var vlq = toVLQSigned(aValue);
    do {
      digit = vlq & VLQ_BASE_MASK;
      vlq >>>= VLQ_BASE_SHIFT;
      if (vlq > 0) {
        digit |= VLQ_CONTINUATION_BIT;
      }
      encoded += base643.encode(digit);
    } while (vlq > 0);
    return encoded;
  };
  exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
    var strLen = aStr.length;
    var result = 0;
    var shift = 0;
    var continuation, digit;
    do {
      if (aIndex >= strLen) {
        throw new Error("Expected more digits in base 64 VLQ value.");
      }
      digit = base643.decode(aStr.charCodeAt(aIndex++));
      if (digit === -1) {
        throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
      }
      continuation = !!(digit & VLQ_CONTINUATION_BIT);
      digit &= VLQ_BASE_MASK;
      result = result + (digit << shift);
      shift += VLQ_BASE_SHIFT;
    } while (continuation);
    aOutParam.value = fromVLQSigned(result);
    aOutParam.rest = aIndex;
  };
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js
var require_util2 = __commonJS((exports) => {
  function getArg(aArgs, aName, aDefaultValue) {
    if (aName in aArgs) {
      return aArgs[aName];
    } else if (arguments.length === 3) {
      return aDefaultValue;
    } else {
      throw new Error('"' + aName + '" is a required argument.');
    }
  }
  exports.getArg = getArg;
  var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
  var dataUrlRegexp = /^data:.+\,.+$/;
  function urlParse(aUrl) {
    var match = aUrl.match(urlRegexp);
    if (!match) {
      return null;
    }
    return {
      scheme: match[1],
      auth: match[2],
      host: match[3],
      port: match[4],
      path: match[5]
    };
  }
  exports.urlParse = urlParse;
  function urlGenerate(aParsedUrl) {
    var url2 = "";
    if (aParsedUrl.scheme) {
      url2 += aParsedUrl.scheme + ":";
    }
    url2 += "//";
    if (aParsedUrl.auth) {
      url2 += aParsedUrl.auth + "@";
    }
    if (aParsedUrl.host) {
      url2 += aParsedUrl.host;
    }
    if (aParsedUrl.port) {
      url2 += ":" + aParsedUrl.port;
    }
    if (aParsedUrl.path) {
      url2 += aParsedUrl.path;
    }
    return url2;
  }
  exports.urlGenerate = urlGenerate;
  function normalize4(aPath) {
    var path2 = aPath;
    var url2 = urlParse(aPath);
    if (url2) {
      if (!url2.path) {
        return aPath;
      }
      path2 = url2.path;
    }
    var isAbsolute2 = exports.isAbsolute(path2);
    var parts = path2.split(/\/+/);
    for (var part, up = 0, i = parts.length - 1;i >= 0; i--) {
      part = parts[i];
      if (part === ".") {
        parts.splice(i, 1);
      } else if (part === "..") {
        up++;
      } else if (up > 0) {
        if (part === "") {
          parts.splice(i + 1, up);
          up = 0;
        } else {
          parts.splice(i, 2);
          up--;
        }
      }
    }
    path2 = parts.join("/");
    if (path2 === "") {
      path2 = isAbsolute2 ? "/" : ".";
    }
    if (url2) {
      url2.path = path2;
      return urlGenerate(url2);
    }
    return path2;
  }
  exports.normalize = normalize4;
  function join4(aRoot, aPath) {
    if (aRoot === "") {
      aRoot = ".";
    }
    if (aPath === "") {
      aPath = ".";
    }
    var aPathUrl = urlParse(aPath);
    var aRootUrl = urlParse(aRoot);
    if (aRootUrl) {
      aRoot = aRootUrl.path || "/";
    }
    if (aPathUrl && !aPathUrl.scheme) {
      if (aRootUrl) {
        aPathUrl.scheme = aRootUrl.scheme;
      }
      return urlGenerate(aPathUrl);
    }
    if (aPathUrl || aPath.match(dataUrlRegexp)) {
      return aPath;
    }
    if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
      aRootUrl.host = aPath;
      return urlGenerate(aRootUrl);
    }
    var joined = aPath.charAt(0) === "/" ? aPath : normalize4(aRoot.replace(/\/+$/, "") + "/" + aPath);
    if (aRootUrl) {
      aRootUrl.path = joined;
      return urlGenerate(aRootUrl);
    }
    return joined;
  }
  exports.join = join4;
  exports.isAbsolute = function(aPath) {
    return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
  };
  function relative2(aRoot, aPath) {
    if (aRoot === "") {
      aRoot = ".";
    }
    aRoot = aRoot.replace(/\/$/, "");
    var level = 0;
    while (aPath.indexOf(aRoot + "/") !== 0) {
      var index2 = aRoot.lastIndexOf("/");
      if (index2 < 0) {
        return aPath;
      }
      aRoot = aRoot.slice(0, index2);
      if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
        return aPath;
      }
      ++level;
    }
    return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  }
  exports.relative = relative2;
  var supportsNullProto = function() {
    var obj = Object.create(null);
    return !("__proto__" in obj);
  }();
  function identity(s3) {
    return s3;
  }
  function toSetString(aStr) {
    if (isProtoString(aStr)) {
      return "$" + aStr;
    }
    return aStr;
  }
  exports.toSetString = supportsNullProto ? identity : toSetString;
  function fromSetString(aStr) {
    if (isProtoString(aStr)) {
      return aStr.slice(1);
    }
    return aStr;
  }
  exports.fromSetString = supportsNullProto ? identity : fromSetString;
  function isProtoString(s3) {
    if (!s3) {
      return false;
    }
    var length2 = s3.length;
    if (length2 < 9) {
      return false;
    }
    if (s3.charCodeAt(length2 - 1) !== 95 || s3.charCodeAt(length2 - 2) !== 95 || s3.charCodeAt(length2 - 3) !== 111 || s3.charCodeAt(length2 - 4) !== 116 || s3.charCodeAt(length2 - 5) !== 111 || s3.charCodeAt(length2 - 6) !== 114 || s3.charCodeAt(length2 - 7) !== 112 || s3.charCodeAt(length2 - 8) !== 95 || s3.charCodeAt(length2 - 9) !== 95) {
      return false;
    }
    for (var i = length2 - 10;i >= 0; i--) {
      if (s3.charCodeAt(i) !== 36) {
        return false;
      }
    }
    return true;
  }
  function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
    var cmp = strcmp(mappingA.source, mappingB.source);
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.originalLine - mappingB.originalLine;
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.originalColumn - mappingB.originalColumn;
    if (cmp !== 0 || onlyCompareOriginal) {
      return cmp;
    }
    cmp = mappingA.generatedColumn - mappingB.generatedColumn;
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.generatedLine - mappingB.generatedLine;
    if (cmp !== 0) {
      return cmp;
    }
    return strcmp(mappingA.name, mappingB.name);
  }
  exports.compareByOriginalPositions = compareByOriginalPositions;
  function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
    var cmp = mappingA.generatedLine - mappingB.generatedLine;
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.generatedColumn - mappingB.generatedColumn;
    if (cmp !== 0 || onlyCompareGenerated) {
      return cmp;
    }
    cmp = strcmp(mappingA.source, mappingB.source);
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.originalLine - mappingB.originalLine;
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.originalColumn - mappingB.originalColumn;
    if (cmp !== 0) {
      return cmp;
    }
    return strcmp(mappingA.name, mappingB.name);
  }
  exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  function strcmp(aStr1, aStr2) {
    if (aStr1 === aStr2) {
      return 0;
    }
    if (aStr1 === null) {
      return 1;
    }
    if (aStr2 === null) {
      return -1;
    }
    if (aStr1 > aStr2) {
      return 1;
    }
    return -1;
  }
  function compareByGeneratedPositionsInflated(mappingA, mappingB) {
    var cmp = mappingA.generatedLine - mappingB.generatedLine;
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.generatedColumn - mappingB.generatedColumn;
    if (cmp !== 0) {
      return cmp;
    }
    cmp = strcmp(mappingA.source, mappingB.source);
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.originalLine - mappingB.originalLine;
    if (cmp !== 0) {
      return cmp;
    }
    cmp = mappingA.originalColumn - mappingB.originalColumn;
    if (cmp !== 0) {
      return cmp;
    }
    return strcmp(mappingA.name, mappingB.name);
  }
  exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  function parseSourceMapInput(str) {
    return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
  }
  exports.parseSourceMapInput = parseSourceMapInput;
  function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
    sourceURL = sourceURL || "";
    if (sourceRoot) {
      if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
        sourceRoot += "/";
      }
      sourceURL = sourceRoot + sourceURL;
    }
    if (sourceMapURL) {
      var parsed = urlParse(sourceMapURL);
      if (!parsed) {
        throw new Error("sourceMapURL could not be parsed");
      }
      if (parsed.path) {
        var index2 = parsed.path.lastIndexOf("/");
        if (index2 >= 0) {
          parsed.path = parsed.path.substring(0, index2 + 1);
        }
      }
      sourceURL = join4(urlGenerate(parsed), sourceURL);
    }
    return normalize4(sourceURL);
  }
  exports.computeSourceURL = computeSourceURL;
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js
var require_array_set2 = __commonJS((exports) => {
  var util3 = require_util2();
  var has = Object.prototype.hasOwnProperty;
  var hasNativeMap = typeof Map !== "undefined";
  function ArraySet() {
    this._array = [];
    this._set = hasNativeMap ? new Map : Object.create(null);
  }
  ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
    var set2 = new ArraySet;
    for (var i = 0, len = aArray.length;i < len; i++) {
      set2.add(aArray[i], aAllowDuplicates);
    }
    return set2;
  };
  ArraySet.prototype.size = function ArraySet_size() {
    return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  };
  ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
    var sStr = hasNativeMap ? aStr : util3.toSetString(aStr);
    var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
    var idx = this._array.length;
    if (!isDuplicate || aAllowDuplicates) {
      this._array.push(aStr);
    }
    if (!isDuplicate) {
      if (hasNativeMap) {
        this._set.set(aStr, idx);
      } else {
        this._set[sStr] = idx;
      }
    }
  };
  ArraySet.prototype.has = function ArraySet_has(aStr) {
    if (hasNativeMap) {
      return this._set.has(aStr);
    } else {
      var sStr = util3.toSetString(aStr);
      return has.call(this._set, sStr);
    }
  };
  ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
    if (hasNativeMap) {
      var idx = this._set.get(aStr);
      if (idx >= 0) {
        return idx;
      }
    } else {
      var sStr = util3.toSetString(aStr);
      if (has.call(this._set, sStr)) {
        return this._set[sStr];
      }
    }
    throw new Error('"' + aStr + '" is not in the set.');
  };
  ArraySet.prototype.at = function ArraySet_at(aIdx) {
    if (aIdx >= 0 && aIdx < this._array.length) {
      return this._array[aIdx];
    }
    throw new Error("No element indexed by " + aIdx);
  };
  ArraySet.prototype.toArray = function ArraySet_toArray() {
    return this._array.slice();
  };
  exports.ArraySet = ArraySet;
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js
var require_mapping_list2 = __commonJS((exports) => {
  var util3 = require_util2();
  function generatedPositionAfter(mappingA, mappingB) {
    var lineA = mappingA.generatedLine;
    var lineB = mappingB.generatedLine;
    var columnA = mappingA.generatedColumn;
    var columnB = mappingB.generatedColumn;
    return lineB > lineA || lineB == lineA && columnB >= columnA || util3.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  }
  function MappingList() {
    this._array = [];
    this._sorted = true;
    this._last = { generatedLine: -1, generatedColumn: 0 };
  }
  MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
    this._array.forEach(aCallback, aThisArg);
  };
  MappingList.prototype.add = function MappingList_add(aMapping) {
    if (generatedPositionAfter(this._last, aMapping)) {
      this._last = aMapping;
      this._array.push(aMapping);
    } else {
      this._sorted = false;
      this._array.push(aMapping);
    }
  };
  MappingList.prototype.toArray = function MappingList_toArray() {
    if (!this._sorted) {
      this._array.sort(util3.compareByGeneratedPositionsInflated);
      this._sorted = true;
    }
    return this._array;
  };
  exports.MappingList = MappingList;
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js
var require_source_map_generator2 = __commonJS((exports) => {
  var base64VLQ = require_base64_vlq2();
  var util3 = require_util2();
  var ArraySet = require_array_set2().ArraySet;
  var MappingList = require_mapping_list2().MappingList;
  function SourceMapGenerator(aArgs) {
    if (!aArgs) {
      aArgs = {};
    }
    this._file = util3.getArg(aArgs, "file", null);
    this._sourceRoot = util3.getArg(aArgs, "sourceRoot", null);
    this._skipValidation = util3.getArg(aArgs, "skipValidation", false);
    this._sources = new ArraySet;
    this._names = new ArraySet;
    this._mappings = new MappingList;
    this._sourcesContents = null;
  }
  SourceMapGenerator.prototype._version = 3;
  SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
    var sourceRoot = aSourceMapConsumer.sourceRoot;
    var generator = new SourceMapGenerator({
      file: aSourceMapConsumer.file,
      sourceRoot
    });
    aSourceMapConsumer.eachMapping(function(mapping) {
      var newMapping = {
        generated: {
          line: mapping.generatedLine,
          column: mapping.generatedColumn
        }
      };
      if (mapping.source != null) {
        newMapping.source = mapping.source;
        if (sourceRoot != null) {
          newMapping.source = util3.relative(sourceRoot, newMapping.source);
        }
        newMapping.original = {
          line: mapping.originalLine,
          column: mapping.originalColumn
        };
        if (mapping.name != null) {
          newMapping.name = mapping.name;
        }
      }
      generator.addMapping(newMapping);
    });
    aSourceMapConsumer.sources.forEach(function(sourceFile) {
      var sourceRelative = sourceFile;
      if (sourceRoot !== null) {
        sourceRelative = util3.relative(sourceRoot, sourceFile);
      }
      if (!generator._sources.has(sourceRelative)) {
        generator._sources.add(sourceRelative);
      }
      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
      if (content != null) {
        generator.setSourceContent(sourceFile, content);
      }
    });
    return generator;
  };
  SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
    var generated = util3.getArg(aArgs, "generated");
    var original = util3.getArg(aArgs, "original", null);
    var source = util3.getArg(aArgs, "source", null);
    var name3 = util3.getArg(aArgs, "name", null);
    if (!this._skipValidation) {
      this._validateMapping(generated, original, source, name3);
    }
    if (source != null) {
      source = String(source);
      if (!this._sources.has(source)) {
        this._sources.add(source);
      }
    }
    if (name3 != null) {
      name3 = String(name3);
      if (!this._names.has(name3)) {
        this._names.add(name3);
      }
    }
    this._mappings.add({
      generatedLine: generated.line,
      generatedColumn: generated.column,
      originalLine: original != null && original.line,
      originalColumn: original != null && original.column,
      source,
      name: name3
    });
  };
  SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
    var source = aSourceFile;
    if (this._sourceRoot != null) {
      source = util3.relative(this._sourceRoot, source);
    }
    if (aSourceContent != null) {
      if (!this._sourcesContents) {
        this._sourcesContents = Object.create(null);
      }
      this._sourcesContents[util3.toSetString(source)] = aSourceContent;
    } else if (this._sourcesContents) {
      delete this._sourcesContents[util3.toSetString(source)];
      if (Object.keys(this._sourcesContents).length === 0) {
        this._sourcesContents = null;
      }
    }
  };
  SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
    var sourceFile = aSourceFile;
    if (aSourceFile == null) {
      if (aSourceMapConsumer.file == null) {
        throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, " + `or the source map's "file" property. Both were omitted.`);
      }
      sourceFile = aSourceMapConsumer.file;
    }
    var sourceRoot = this._sourceRoot;
    if (sourceRoot != null) {
      sourceFile = util3.relative(sourceRoot, sourceFile);
    }
    var newSources = new ArraySet;
    var newNames = new ArraySet;
    this._mappings.unsortedForEach(function(mapping) {
      if (mapping.source === sourceFile && mapping.originalLine != null) {
        var original = aSourceMapConsumer.originalPositionFor({
          line: mapping.originalLine,
          column: mapping.originalColumn
        });
        if (original.source != null) {
          mapping.source = original.source;
          if (aSourceMapPath != null) {
            mapping.source = util3.join(aSourceMapPath, mapping.source);
          }
          if (sourceRoot != null) {
            mapping.source = util3.relative(sourceRoot, mapping.source);
          }
          mapping.originalLine = original.line;
          mapping.originalColumn = original.column;
          if (original.name != null) {
            mapping.name = original.name;
          }
        }
      }
      var source = mapping.source;
      if (source != null && !newSources.has(source)) {
        newSources.add(source);
      }
      var name3 = mapping.name;
      if (name3 != null && !newNames.has(name3)) {
        newNames.add(name3);
      }
    }, this);
    this._sources = newSources;
    this._names = newNames;
    aSourceMapConsumer.sources.forEach(function(sourceFile2) {
      var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
      if (content != null) {
        if (aSourceMapPath != null) {
          sourceFile2 = util3.join(aSourceMapPath, sourceFile2);
        }
        if (sourceRoot != null) {
          sourceFile2 = util3.relative(sourceRoot, sourceFile2);
        }
        this.setSourceContent(sourceFile2, content);
      }
    }, this);
  };
  SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
    if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
      throw new Error("original.line and original.column are not numbers -- you probably meant to omit " + "the original mapping entirely and only map the generated position. If so, pass " + "null for the original mapping instead of an object with empty or null values.");
    }
    if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
      return;
    } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
      return;
    } else {
      throw new Error("Invalid mapping: " + JSON.stringify({
        generated: aGenerated,
        source: aSource,
        original: aOriginal,
        name: aName
      }));
    }
  };
  SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
    var previousGeneratedColumn = 0;
    var previousGeneratedLine = 1;
    var previousOriginalColumn = 0;
    var previousOriginalLine = 0;
    var previousName = 0;
    var previousSource = 0;
    var result = "";
    var next;
    var mapping;
    var nameIdx;
    var sourceIdx;
    var mappings = this._mappings.toArray();
    for (var i = 0, len = mappings.length;i < len; i++) {
      mapping = mappings[i];
      next = "";
      if (mapping.generatedLine !== previousGeneratedLine) {
        previousGeneratedColumn = 0;
        while (mapping.generatedLine !== previousGeneratedLine) {
          next += ";";
          previousGeneratedLine++;
        }
      } else {
        if (i > 0) {
          if (!util3.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
            continue;
          }
          next += ",";
        }
      }
      next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
      previousGeneratedColumn = mapping.generatedColumn;
      if (mapping.source != null) {
        sourceIdx = this._sources.indexOf(mapping.source);
        next += base64VLQ.encode(sourceIdx - previousSource);
        previousSource = sourceIdx;
        next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
        previousOriginalLine = mapping.originalLine - 1;
        next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
        previousOriginalColumn = mapping.originalColumn;
        if (mapping.name != null) {
          nameIdx = this._names.indexOf(mapping.name);
          next += base64VLQ.encode(nameIdx - previousName);
          previousName = nameIdx;
        }
      }
      result += next;
    }
    return result;
  };
  SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
    return aSources.map(function(source) {
      if (!this._sourcesContents) {
        return null;
      }
      if (aSourceRoot != null) {
        source = util3.relative(aSourceRoot, source);
      }
      var key = util3.toSetString(source);
      return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
    }, this);
  };
  SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
    var map3 = {
      version: this._version,
      sources: this._sources.toArray(),
      names: this._names.toArray(),
      mappings: this._serializeMappings()
    };
    if (this._file != null) {
      map3.file = this._file;
    }
    if (this._sourceRoot != null) {
      map3.sourceRoot = this._sourceRoot;
    }
    if (this._sourcesContents) {
      map3.sourcesContent = this._generateSourcesContent(map3.sources, map3.sourceRoot);
    }
    return map3;
  };
  SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
    return JSON.stringify(this.toJSON());
  };
  exports.SourceMapGenerator = SourceMapGenerator;
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js
var require_binary_search = __commonJS((exports) => {
  exports.GREATEST_LOWER_BOUND = 1;
  exports.LEAST_UPPER_BOUND = 2;
  function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
    var mid = Math.floor((aHigh - aLow) / 2) + aLow;
    var cmp = aCompare(aNeedle, aHaystack[mid], true);
    if (cmp === 0) {
      return mid;
    } else if (cmp > 0) {
      if (aHigh - mid > 1) {
        return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
      }
      if (aBias == exports.LEAST_UPPER_BOUND) {
        return aHigh < aHaystack.length ? aHigh : -1;
      } else {
        return mid;
      }
    } else {
      if (mid - aLow > 1) {
        return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
      }
      if (aBias == exports.LEAST_UPPER_BOUND) {
        return mid;
      } else {
        return aLow < 0 ? -1 : aLow;
      }
    }
  }
  exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
    if (aHaystack.length === 0) {
      return -1;
    }
    var index2 = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
    if (index2 < 0) {
      return -1;
    }
    while (index2 - 1 >= 0) {
      if (aCompare(aHaystack[index2], aHaystack[index2 - 1], true) !== 0) {
        break;
      }
      --index2;
    }
    return index2;
  };
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js
var require_quick_sort = __commonJS((exports) => {
  function swap(ary, x4, y4) {
    var temp = ary[x4];
    ary[x4] = ary[y4];
    ary[y4] = temp;
  }
  function randomIntInRange(low, high) {
    return Math.round(low + Math.random() * (high - low));
  }
  function doQuickSort(ary, comparator, p3, r2) {
    if (p3 < r2) {
      var pivotIndex = randomIntInRange(p3, r2);
      var i = p3 - 1;
      swap(ary, pivotIndex, r2);
      var pivot = ary[r2];
      for (var j4 = p3;j4 < r2; j4++) {
        if (comparator(ary[j4], pivot) <= 0) {
          i += 1;
          swap(ary, i, j4);
        }
      }
      swap(ary, i + 1, j4);
      var q4 = i + 1;
      doQuickSort(ary, comparator, p3, q4 - 1);
      doQuickSort(ary, comparator, q4 + 1, r2);
    }
  }
  exports.quickSort = function(ary, comparator) {
    doQuickSort(ary, comparator, 0, ary.length - 1);
  };
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js
var require_source_map_consumer = __commonJS((exports) => {
  var util3 = require_util2();
  var binarySearch = require_binary_search();
  var ArraySet = require_array_set2().ArraySet;
  var base64VLQ = require_base64_vlq2();
  var quickSort = require_quick_sort().quickSort;
  function SourceMapConsumer(aSourceMap, aSourceMapURL) {
    var sourceMap = aSourceMap;
    if (typeof aSourceMap === "string") {
      sourceMap = util3.parseSourceMapInput(aSourceMap);
    }
    return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
  }
  SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
    return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
  };
  SourceMapConsumer.prototype._version = 3;
  SourceMapConsumer.prototype.__generatedMappings = null;
  Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
    configurable: true,
    enumerable: true,
    get: function() {
      if (!this.__generatedMappings) {
        this._parseMappings(this._mappings, this.sourceRoot);
      }
      return this.__generatedMappings;
    }
  });
  SourceMapConsumer.prototype.__originalMappings = null;
  Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
    configurable: true,
    enumerable: true,
    get: function() {
      if (!this.__originalMappings) {
        this._parseMappings(this._mappings, this.sourceRoot);
      }
      return this.__originalMappings;
    }
  });
  SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index2) {
    var c3 = aStr.charAt(index2);
    return c3 === ";" || c3 === ",";
  };
  SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    throw new Error("Subclasses must implement _parseMappings");
  };
  SourceMapConsumer.GENERATED_ORDER = 1;
  SourceMapConsumer.ORIGINAL_ORDER = 2;
  SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
    var context10 = aContext || null;
    var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
    var mappings;
    switch (order) {
      case SourceMapConsumer.GENERATED_ORDER:
        mappings = this._generatedMappings;
        break;
      case SourceMapConsumer.ORIGINAL_ORDER:
        mappings = this._originalMappings;
        break;
      default:
        throw new Error("Unknown order of iteration.");
    }
    var sourceRoot = this.sourceRoot;
    mappings.map(function(mapping) {
      var source = mapping.source === null ? null : this._sources.at(mapping.source);
      source = util3.computeSourceURL(sourceRoot, source, this._sourceMapURL);
      return {
        source,
        generatedLine: mapping.generatedLine,
        generatedColumn: mapping.generatedColumn,
        originalLine: mapping.originalLine,
        originalColumn: mapping.originalColumn,
        name: mapping.name === null ? null : this._names.at(mapping.name)
      };
    }, this).forEach(aCallback, context10);
  };
  SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
    var line2 = util3.getArg(aArgs, "line");
    var needle = {
      source: util3.getArg(aArgs, "source"),
      originalLine: line2,
      originalColumn: util3.getArg(aArgs, "column", 0)
    };
    needle.source = this._findSourceIndex(needle.source);
    if (needle.source < 0) {
      return [];
    }
    var mappings = [];
    var index2 = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util3.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
    if (index2 >= 0) {
      var mapping = this._originalMappings[index2];
      if (aArgs.column === undefined) {
        var originalLine = mapping.originalLine;
        while (mapping && mapping.originalLine === originalLine) {
          mappings.push({
            line: util3.getArg(mapping, "generatedLine", null),
            column: util3.getArg(mapping, "generatedColumn", null),
            lastColumn: util3.getArg(mapping, "lastGeneratedColumn", null)
          });
          mapping = this._originalMappings[++index2];
        }
      } else {
        var originalColumn = mapping.originalColumn;
        while (mapping && mapping.originalLine === line2 && mapping.originalColumn == originalColumn) {
          mappings.push({
            line: util3.getArg(mapping, "generatedLine", null),
            column: util3.getArg(mapping, "generatedColumn", null),
            lastColumn: util3.getArg(mapping, "lastGeneratedColumn", null)
          });
          mapping = this._originalMappings[++index2];
        }
      }
    }
    return mappings;
  };
  exports.SourceMapConsumer = SourceMapConsumer;
  function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
    var sourceMap = aSourceMap;
    if (typeof aSourceMap === "string") {
      sourceMap = util3.parseSourceMapInput(aSourceMap);
    }
    var version4 = util3.getArg(sourceMap, "version");
    var sources = util3.getArg(sourceMap, "sources");
    var names = util3.getArg(sourceMap, "names", []);
    var sourceRoot = util3.getArg(sourceMap, "sourceRoot", null);
    var sourcesContent = util3.getArg(sourceMap, "sourcesContent", null);
    var mappings = util3.getArg(sourceMap, "mappings");
    var file2 = util3.getArg(sourceMap, "file", null);
    if (version4 != this._version) {
      throw new Error("Unsupported version: " + version4);
    }
    if (sourceRoot) {
      sourceRoot = util3.normalize(sourceRoot);
    }
    sources = sources.map(String).map(util3.normalize).map(function(source) {
      return sourceRoot && util3.isAbsolute(sourceRoot) && util3.isAbsolute(source) ? util3.relative(sourceRoot, source) : source;
    });
    this._names = ArraySet.fromArray(names.map(String), true);
    this._sources = ArraySet.fromArray(sources, true);
    this._absoluteSources = this._sources.toArray().map(function(s3) {
      return util3.computeSourceURL(sourceRoot, s3, aSourceMapURL);
    });
    this.sourceRoot = sourceRoot;
    this.sourcesContent = sourcesContent;
    this._mappings = mappings;
    this._sourceMapURL = aSourceMapURL;
    this.file = file2;
  }
  BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
    var relativeSource = aSource;
    if (this.sourceRoot != null) {
      relativeSource = util3.relative(this.sourceRoot, relativeSource);
    }
    if (this._sources.has(relativeSource)) {
      return this._sources.indexOf(relativeSource);
    }
    var i;
    for (i = 0;i < this._absoluteSources.length; ++i) {
      if (this._absoluteSources[i] == aSource) {
        return i;
      }
    }
    return -1;
  };
  BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
    var smc = Object.create(BasicSourceMapConsumer.prototype);
    var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
    var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
    smc.sourceRoot = aSourceMap._sourceRoot;
    smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
    smc.file = aSourceMap._file;
    smc._sourceMapURL = aSourceMapURL;
    smc._absoluteSources = smc._sources.toArray().map(function(s3) {
      return util3.computeSourceURL(smc.sourceRoot, s3, aSourceMapURL);
    });
    var generatedMappings = aSourceMap._mappings.toArray().slice();
    var destGeneratedMappings = smc.__generatedMappings = [];
    var destOriginalMappings = smc.__originalMappings = [];
    for (var i = 0, length2 = generatedMappings.length;i < length2; i++) {
      var srcMapping = generatedMappings[i];
      var destMapping = new Mapping;
      destMapping.generatedLine = srcMapping.generatedLine;
      destMapping.generatedColumn = srcMapping.generatedColumn;
      if (srcMapping.source) {
        destMapping.source = sources.indexOf(srcMapping.source);
        destMapping.originalLine = srcMapping.originalLine;
        destMapping.originalColumn = srcMapping.originalColumn;
        if (srcMapping.name) {
          destMapping.name = names.indexOf(srcMapping.name);
        }
        destOriginalMappings.push(destMapping);
      }
      destGeneratedMappings.push(destMapping);
    }
    quickSort(smc.__originalMappings, util3.compareByOriginalPositions);
    return smc;
  };
  BasicSourceMapConsumer.prototype._version = 3;
  Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
    get: function() {
      return this._absoluteSources.slice();
    }
  });
  function Mapping() {
    this.generatedLine = 0;
    this.generatedColumn = 0;
    this.source = null;
    this.originalLine = null;
    this.originalColumn = null;
    this.name = null;
  }
  BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    var generatedLine = 1;
    var previousGeneratedColumn = 0;
    var previousOriginalLine = 0;
    var previousOriginalColumn = 0;
    var previousSource = 0;
    var previousName = 0;
    var length2 = aStr.length;
    var index2 = 0;
    var cachedSegments = {};
    var temp = {};
    var originalMappings = [];
    var generatedMappings = [];
    var mapping, str, segment2, end, value;
    while (index2 < length2) {
      if (aStr.charAt(index2) === ";") {
        generatedLine++;
        index2++;
        previousGeneratedColumn = 0;
      } else if (aStr.charAt(index2) === ",") {
        index2++;
      } else {
        mapping = new Mapping;
        mapping.generatedLine = generatedLine;
        for (end = index2;end < length2; end++) {
          if (this._charIsMappingSeparator(aStr, end)) {
            break;
          }
        }
        str = aStr.slice(index2, end);
        segment2 = cachedSegments[str];
        if (segment2) {
          index2 += str.length;
        } else {
          segment2 = [];
          while (index2 < end) {
            base64VLQ.decode(aStr, index2, temp);
            value = temp.value;
            index2 = temp.rest;
            segment2.push(value);
          }
          if (segment2.length === 2) {
            throw new Error("Found a source, but no line and column");
          }
          if (segment2.length === 3) {
            throw new Error("Found a source and line, but no column");
          }
          cachedSegments[str] = segment2;
        }
        mapping.generatedColumn = previousGeneratedColumn + segment2[0];
        previousGeneratedColumn = mapping.generatedColumn;
        if (segment2.length > 1) {
          mapping.source = previousSource + segment2[1];
          previousSource += segment2[1];
          mapping.originalLine = previousOriginalLine + segment2[2];
          previousOriginalLine = mapping.originalLine;
          mapping.originalLine += 1;
          mapping.originalColumn = previousOriginalColumn + segment2[3];
          previousOriginalColumn = mapping.originalColumn;
          if (segment2.length > 4) {
            mapping.name = previousName + segment2[4];
            previousName += segment2[4];
          }
        }
        generatedMappings.push(mapping);
        if (typeof mapping.originalLine === "number") {
          originalMappings.push(mapping);
        }
      }
    }
    quickSort(generatedMappings, util3.compareByGeneratedPositionsDeflated);
    this.__generatedMappings = generatedMappings;
    quickSort(originalMappings, util3.compareByOriginalPositions);
    this.__originalMappings = originalMappings;
  };
  BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
    if (aNeedle[aLineName] <= 0) {
      throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
    }
    if (aNeedle[aColumnName] < 0) {
      throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
    }
    return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  };
  BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
    for (var index2 = 0;index2 < this._generatedMappings.length; ++index2) {
      var mapping = this._generatedMappings[index2];
      if (index2 + 1 < this._generatedMappings.length) {
        var nextMapping = this._generatedMappings[index2 + 1];
        if (mapping.generatedLine === nextMapping.generatedLine) {
          mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
          continue;
        }
      }
      mapping.lastGeneratedColumn = Infinity;
    }
  };
  BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
    var needle = {
      generatedLine: util3.getArg(aArgs, "line"),
      generatedColumn: util3.getArg(aArgs, "column")
    };
    var index2 = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util3.compareByGeneratedPositionsDeflated, util3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
    if (index2 >= 0) {
      var mapping = this._generatedMappings[index2];
      if (mapping.generatedLine === needle.generatedLine) {
        var source = util3.getArg(mapping, "source", null);
        if (source !== null) {
          source = this._sources.at(source);
          source = util3.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
        }
        var name3 = util3.getArg(mapping, "name", null);
        if (name3 !== null) {
          name3 = this._names.at(name3);
        }
        return {
          source,
          line: util3.getArg(mapping, "originalLine", null),
          column: util3.getArg(mapping, "originalColumn", null),
          name: name3
        };
      }
    }
    return {
      source: null,
      line: null,
      column: null,
      name: null
    };
  };
  BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
    if (!this.sourcesContent) {
      return false;
    }
    return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
      return sc == null;
    });
  };
  BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
    if (!this.sourcesContent) {
      return null;
    }
    var index2 = this._findSourceIndex(aSource);
    if (index2 >= 0) {
      return this.sourcesContent[index2];
    }
    var relativeSource = aSource;
    if (this.sourceRoot != null) {
      relativeSource = util3.relative(this.sourceRoot, relativeSource);
    }
    var url2;
    if (this.sourceRoot != null && (url2 = util3.urlParse(this.sourceRoot))) {
      var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
      if (url2.scheme == "file" && this._sources.has(fileUriAbsPath)) {
        return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
      }
      if ((!url2.path || url2.path == "/") && this._sources.has("/" + relativeSource)) {
        return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
      }
    }
    if (nullOnMissing) {
      return null;
    } else {
      throw new Error('"' + relativeSource + '" is not in the SourceMap.');
    }
  };
  BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
    var source = util3.getArg(aArgs, "source");
    source = this._findSourceIndex(source);
    if (source < 0) {
      return {
        line: null,
        column: null,
        lastColumn: null
      };
    }
    var needle = {
      source,
      originalLine: util3.getArg(aArgs, "line"),
      originalColumn: util3.getArg(aArgs, "column")
    };
    var index2 = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util3.compareByOriginalPositions, util3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
    if (index2 >= 0) {
      var mapping = this._originalMappings[index2];
      if (mapping.source === needle.source) {
        return {
          line: util3.getArg(mapping, "generatedLine", null),
          column: util3.getArg(mapping, "generatedColumn", null),
          lastColumn: util3.getArg(mapping, "lastGeneratedColumn", null)
        };
      }
    }
    return {
      line: null,
      column: null,
      lastColumn: null
    };
  };
  exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
  function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
    var sourceMap = aSourceMap;
    if (typeof aSourceMap === "string") {
      sourceMap = util3.parseSourceMapInput(aSourceMap);
    }
    var version4 = util3.getArg(sourceMap, "version");
    var sections = util3.getArg(sourceMap, "sections");
    if (version4 != this._version) {
      throw new Error("Unsupported version: " + version4);
    }
    this._sources = new ArraySet;
    this._names = new ArraySet;
    var lastOffset = {
      line: -1,
      column: 0
    };
    this._sections = sections.map(function(s3) {
      if (s3.url) {
        throw new Error("Support for url field in sections not implemented.");
      }
      var offset = util3.getArg(s3, "offset");
      var offsetLine = util3.getArg(offset, "line");
      var offsetColumn = util3.getArg(offset, "column");
      if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
        throw new Error("Section offsets must be ordered and non-overlapping.");
      }
      lastOffset = offset;
      return {
        generatedOffset: {
          generatedLine: offsetLine + 1,
          generatedColumn: offsetColumn + 1
        },
        consumer: new SourceMapConsumer(util3.getArg(s3, "map"), aSourceMapURL)
      };
    });
  }
  IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  IndexedSourceMapConsumer.prototype._version = 3;
  Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
    get: function() {
      var sources = [];
      for (var i = 0;i < this._sections.length; i++) {
        for (var j4 = 0;j4 < this._sections[i].consumer.sources.length; j4++) {
          sources.push(this._sections[i].consumer.sources[j4]);
        }
      }
      return sources;
    }
  });
  IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
    var needle = {
      generatedLine: util3.getArg(aArgs, "line"),
      generatedColumn: util3.getArg(aArgs, "column")
    };
    var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section3) {
      var cmp = needle2.generatedLine - section3.generatedOffset.generatedLine;
      if (cmp) {
        return cmp;
      }
      return needle2.generatedColumn - section3.generatedOffset.generatedColumn;
    });
    var section2 = this._sections[sectionIndex];
    if (!section2) {
      return {
        source: null,
        line: null,
        column: null,
        name: null
      };
    }
    return section2.consumer.originalPositionFor({
      line: needle.generatedLine - (section2.generatedOffset.generatedLine - 1),
      column: needle.generatedColumn - (section2.generatedOffset.generatedLine === needle.generatedLine ? section2.generatedOffset.generatedColumn - 1 : 0),
      bias: aArgs.bias
    });
  };
  IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
    return this._sections.every(function(s3) {
      return s3.consumer.hasContentsOfAllSources();
    });
  };
  IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
    for (var i = 0;i < this._sections.length; i++) {
      var section2 = this._sections[i];
      var content = section2.consumer.sourceContentFor(aSource, true);
      if (content) {
        return content;
      }
    }
    if (nullOnMissing) {
      return null;
    } else {
      throw new Error('"' + aSource + '" is not in the SourceMap.');
    }
  };
  IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
    for (var i = 0;i < this._sections.length; i++) {
      var section2 = this._sections[i];
      if (section2.consumer._findSourceIndex(util3.getArg(aArgs, "source")) === -1) {
        continue;
      }
      var generatedPosition = section2.consumer.generatedPositionFor(aArgs);
      if (generatedPosition) {
        var ret = {
          line: generatedPosition.line + (section2.generatedOffset.generatedLine - 1),
          column: generatedPosition.column + (section2.generatedOffset.generatedLine === generatedPosition.line ? section2.generatedOffset.generatedColumn - 1 : 0)
        };
        return ret;
      }
    }
    return {
      line: null,
      column: null
    };
  };
  IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    this.__generatedMappings = [];
    this.__originalMappings = [];
    for (var i = 0;i < this._sections.length; i++) {
      var section2 = this._sections[i];
      var sectionMappings = section2.consumer._generatedMappings;
      for (var j4 = 0;j4 < sectionMappings.length; j4++) {
        var mapping = sectionMappings[j4];
        var source = section2.consumer._sources.at(mapping.source);
        source = util3.computeSourceURL(section2.consumer.sourceRoot, source, this._sourceMapURL);
        this._sources.add(source);
        source = this._sources.indexOf(source);
        var name3 = null;
        if (mapping.name) {
          name3 = section2.consumer._names.at(mapping.name);
          this._names.add(name3);
          name3 = this._names.indexOf(name3);
        }
        var adjustedMapping = {
          source,
          generatedLine: mapping.generatedLine + (section2.generatedOffset.generatedLine - 1),
          generatedColumn: mapping.generatedColumn + (section2.generatedOffset.generatedLine === mapping.generatedLine ? section2.generatedOffset.generatedColumn - 1 : 0),
          originalLine: mapping.originalLine,
          originalColumn: mapping.originalColumn,
          name: name3
        };
        this.__generatedMappings.push(adjustedMapping);
        if (typeof adjustedMapping.originalLine === "number") {
          this.__originalMappings.push(adjustedMapping);
        }
      }
    }
    quickSort(this.__generatedMappings, util3.compareByGeneratedPositionsDeflated);
    quickSort(this.__originalMappings, util3.compareByOriginalPositions);
  };
  exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js
var require_source_node = __commonJS((exports) => {
  var SourceMapGenerator = require_source_map_generator2().SourceMapGenerator;
  var util3 = require_util2();
  var REGEX_NEWLINE = /(\r?\n)/;
  var NEWLINE_CODE = 10;
  var isSourceNode = "$$$isSourceNode$$$";
  function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
    this.children = [];
    this.sourceContents = {};
    this.line = aLine == null ? null : aLine;
    this.column = aColumn == null ? null : aColumn;
    this.source = aSource == null ? null : aSource;
    this.name = aName == null ? null : aName;
    this[isSourceNode] = true;
    if (aChunks != null)
      this.add(aChunks);
  }
  SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
    var node3 = new SourceNode;
    var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
    var remainingLinesIndex = 0;
    var shiftNextLine = function() {
      var lineContents = getNextLine();
      var newLine = getNextLine() || "";
      return lineContents + newLine;
      function getNextLine() {
        return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;
      }
    };
    var lastGeneratedLine = 1, lastGeneratedColumn = 0;
    var lastMapping = null;
    aSourceMapConsumer.eachMapping(function(mapping) {
      if (lastMapping !== null) {
        if (lastGeneratedLine < mapping.generatedLine) {
          addMappingWithCode(lastMapping, shiftNextLine());
          lastGeneratedLine++;
          lastGeneratedColumn = 0;
        } else {
          var nextLine = remainingLines[remainingLinesIndex] || "";
          var code2 = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
          remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
          lastGeneratedColumn = mapping.generatedColumn;
          addMappingWithCode(lastMapping, code2);
          lastMapping = mapping;
          return;
        }
      }
      while (lastGeneratedLine < mapping.generatedLine) {
        node3.add(shiftNextLine());
        lastGeneratedLine++;
      }
      if (lastGeneratedColumn < mapping.generatedColumn) {
        var nextLine = remainingLines[remainingLinesIndex] || "";
        node3.add(nextLine.substr(0, mapping.generatedColumn));
        remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
        lastGeneratedColumn = mapping.generatedColumn;
      }
      lastMapping = mapping;
    }, this);
    if (remainingLinesIndex < remainingLines.length) {
      if (lastMapping) {
        addMappingWithCode(lastMapping, shiftNextLine());
      }
      node3.add(remainingLines.splice(remainingLinesIndex).join(""));
    }
    aSourceMapConsumer.sources.forEach(function(sourceFile) {
      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
      if (content != null) {
        if (aRelativePath != null) {
          sourceFile = util3.join(aRelativePath, sourceFile);
        }
        node3.setSourceContent(sourceFile, content);
      }
    });
    return node3;
    function addMappingWithCode(mapping, code2) {
      if (mapping === null || mapping.source === undefined) {
        node3.add(code2);
      } else {
        var source = aRelativePath ? util3.join(aRelativePath, mapping.source) : mapping.source;
        node3.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code2, mapping.name));
      }
    }
  };
  SourceNode.prototype.add = function SourceNode_add(aChunk) {
    if (Array.isArray(aChunk)) {
      aChunk.forEach(function(chunk) {
        this.add(chunk);
      }, this);
    } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
      if (aChunk) {
        this.children.push(aChunk);
      }
    } else {
      throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
    }
    return this;
  };
  SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
    if (Array.isArray(aChunk)) {
      for (var i = aChunk.length - 1;i >= 0; i--) {
        this.prepend(aChunk[i]);
      }
    } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
      this.children.unshift(aChunk);
    } else {
      throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
    }
    return this;
  };
  SourceNode.prototype.walk = function SourceNode_walk(aFn) {
    var chunk;
    for (var i = 0, len = this.children.length;i < len; i++) {
      chunk = this.children[i];
      if (chunk[isSourceNode]) {
        chunk.walk(aFn);
      } else {
        if (chunk !== "") {
          aFn(chunk, {
            source: this.source,
            line: this.line,
            column: this.column,
            name: this.name
          });
        }
      }
    }
  };
  SourceNode.prototype.join = function SourceNode_join(aSep) {
    var newChildren;
    var i;
    var len = this.children.length;
    if (len > 0) {
      newChildren = [];
      for (i = 0;i < len - 1; i++) {
        newChildren.push(this.children[i]);
        newChildren.push(aSep);
      }
      newChildren.push(this.children[i]);
      this.children = newChildren;
    }
    return this;
  };
  SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
    var lastChild = this.children[this.children.length - 1];
    if (lastChild[isSourceNode]) {
      lastChild.replaceRight(aPattern, aReplacement);
    } else if (typeof lastChild === "string") {
      this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
    } else {
      this.children.push("".replace(aPattern, aReplacement));
    }
    return this;
  };
  SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
    this.sourceContents[util3.toSetString(aSourceFile)] = aSourceContent;
  };
  SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
    for (var i = 0, len = this.children.length;i < len; i++) {
      if (this.children[i][isSourceNode]) {
        this.children[i].walkSourceContents(aFn);
      }
    }
    var sources = Object.keys(this.sourceContents);
    for (var i = 0, len = sources.length;i < len; i++) {
      aFn(util3.fromSetString(sources[i]), this.sourceContents[sources[i]]);
    }
  };
  SourceNode.prototype.toString = function SourceNode_toString() {
    var str = "";
    this.walk(function(chunk) {
      str += chunk;
    });
    return str;
  };
  SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
    var generated = {
      code: "",
      line: 1,
      column: 0
    };
    var map3 = new SourceMapGenerator(aArgs);
    var sourceMappingActive = false;
    var lastOriginalSource = null;
    var lastOriginalLine = null;
    var lastOriginalColumn = null;
    var lastOriginalName = null;
    this.walk(function(chunk, original) {
      generated.code += chunk;
      if (original.source !== null && original.line !== null && original.column !== null) {
        if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
          map3.addMapping({
            source: original.source,
            original: {
              line: original.line,
              column: original.column
            },
            generated: {
              line: generated.line,
              column: generated.column
            },
            name: original.name
          });
        }
        lastOriginalSource = original.source;
        lastOriginalLine = original.line;
        lastOriginalColumn = original.column;
        lastOriginalName = original.name;
        sourceMappingActive = true;
      } else if (sourceMappingActive) {
        map3.addMapping({
          generated: {
            line: generated.line,
            column: generated.column
          }
        });
        lastOriginalSource = null;
        sourceMappingActive = false;
      }
      for (var idx = 0, length2 = chunk.length;idx < length2; idx++) {
        if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
          generated.line++;
          generated.column = 0;
          if (idx + 1 === length2) {
            lastOriginalSource = null;
            sourceMappingActive = false;
          } else if (sourceMappingActive) {
            map3.addMapping({
              source: original.source,
              original: {
                line: original.line,
                column: original.column
              },
              generated: {
                line: generated.line,
                column: generated.column
              },
              name: original.name
            });
          }
        } else {
          generated.column++;
        }
      }
    });
    this.walkSourceContents(function(sourceFile, sourceContent) {
      map3.setSourceContent(sourceFile, sourceContent);
    });
    return { code: generated.code, map: map3 };
  };
  exports.SourceNode = SourceNode;
});

// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js
var require_source_map = __commonJS((exports) => {
  exports.SourceMapGenerator = require_source_map_generator2().SourceMapGenerator;
  exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
  exports.SourceNode = require_source_node().SourceNode;
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js
var require_code_gen = __commonJS((exports, module) => {
  exports.__esModule = true;
  var _utils = require_utils13();
  var SourceNode = undefined;
  try {
    if (typeof define !== "function" || !define.amd) {
      SourceMap = require_source_map();
      SourceNode = SourceMap.SourceNode;
    }
  } catch (err) {}
  var SourceMap;
  if (!SourceNode) {
    SourceNode = function(line2, column2, srcFile, chunks) {
      this.src = "";
      if (chunks) {
        this.add(chunks);
      }
    };
    SourceNode.prototype = {
      add: function add(chunks) {
        if (_utils.isArray(chunks)) {
          chunks = chunks.join("");
        }
        this.src += chunks;
      },
      prepend: function prepend(chunks) {
        if (_utils.isArray(chunks)) {
          chunks = chunks.join("");
        }
        this.src = chunks + this.src;
      },
      toStringWithSourceMap: function toStringWithSourceMap() {
        return { code: this.toString() };
      },
      toString: function toString() {
        return this.src;
      }
    };
  }
  function castChunk(chunk, codeGen, loc) {
    if (_utils.isArray(chunk)) {
      var ret = [];
      for (var i = 0, len = chunk.length;i < len; i++) {
        ret.push(codeGen.wrap(chunk[i], loc));
      }
      return ret;
    } else if (typeof chunk === "boolean" || typeof chunk === "number") {
      return chunk + "";
    }
    return chunk;
  }
  function CodeGen(srcFile) {
    this.srcFile = srcFile;
    this.source = [];
  }
  CodeGen.prototype = {
    isEmpty: function isEmpty() {
      return !this.source.length;
    },
    prepend: function prepend(source, loc) {
      this.source.unshift(this.wrap(source, loc));
    },
    push: function push(source, loc) {
      this.source.push(this.wrap(source, loc));
    },
    merge: function merge4() {
      var source = this.empty();
      this.each(function(line2) {
        source.add(["  ", line2, `
`]);
      });
      return source;
    },
    each: function each(iter) {
      for (var i = 0, len = this.source.length;i < len; i++) {
        iter(this.source[i]);
      }
    },
    empty: function empty() {
      var loc = this.currentLocation || { start: {} };
      return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
    },
    wrap: function wrap(chunk) {
      var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
      if (chunk instanceof SourceNode) {
        return chunk;
      }
      chunk = castChunk(chunk, this, loc);
      return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
    },
    functionCall: function functionCall(fn3, type2, params) {
      params = this.generateList(params);
      return this.wrap([fn3, type2 ? "." + type2 + "(" : "(", params, ")"]);
    },
    quotedString: function quotedString(str) {
      return '"' + (str + "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"';
    },
    objectLiteral: function objectLiteral(obj) {
      var _this = this;
      var pairs = [];
      Object.keys(obj).forEach(function(key) {
        var value = castChunk(obj[key], _this);
        if (value !== "undefined") {
          pairs.push([_this.quotedString(key), ":", value]);
        }
      });
      var ret = this.generateList(pairs);
      ret.prepend("{");
      ret.add("}");
      return ret;
    },
    generateList: function generateList(entries) {
      var ret = this.empty();
      for (var i = 0, len = entries.length;i < len; i++) {
        if (i) {
          ret.add(",");
        }
        ret.add(castChunk(entries[i], this));
      }
      return ret;
    },
    generateArray: function generateArray(entries) {
      var ret = this.generateList(entries);
      ret.prepend("[");
      ret.add("]");
      return ret;
    }
  };
  exports.default = CodeGen;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js
var require_javascript_compiler = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _base = require_base();
  var _exception = require_exception();
  var _exception2 = _interopRequireDefault(_exception);
  var _utils = require_utils13();
  var _codeGen = require_code_gen();
  var _codeGen2 = _interopRequireDefault(_codeGen);
  function Literal(value) {
    this.value = value;
  }
  function JavaScriptCompiler() {}
  JavaScriptCompiler.prototype = {
    nameLookup: function nameLookup(parent, name3) {
      return this.internalNameLookup(parent, name3);
    },
    depthedLookup: function depthedLookup(name3) {
      return [this.aliasable("container.lookup"), "(depths, ", JSON.stringify(name3), ")"];
    },
    compilerInfo: function compilerInfo() {
      var revision = _base.COMPILER_REVISION, versions3 = _base.REVISION_CHANGES[revision];
      return [revision, versions3];
    },
    appendToBuffer: function appendToBuffer(source, location, explicit) {
      if (!_utils.isArray(source)) {
        source = [source];
      }
      source = this.source.wrap(source, location);
      if (this.environment.isSimple) {
        return ["return ", source, ";"];
      } else if (explicit) {
        return ["buffer += ", source, ";"];
      } else {
        source.appendToBuffer = true;
        return source;
      }
    },
    initializeBuffer: function initializeBuffer() {
      return this.quotedString("");
    },
    internalNameLookup: function internalNameLookup(parent, name3) {
      this.lookupPropertyFunctionIsUsed = true;
      return ["lookupProperty(", parent, ",", JSON.stringify(name3), ")"];
    },
    lookupPropertyFunctionIsUsed: false,
    compile: function compile2(environment, options2, context10, asObject) {
      this.environment = environment;
      this.options = options2;
      this.stringParams = this.options.stringParams;
      this.trackIds = this.options.trackIds;
      this.precompile = !asObject;
      this.name = this.environment.name;
      this.isChild = !!context10;
      this.context = context10 || {
        decorators: [],
        programs: [],
        environments: []
      };
      this.preamble();
      this.stackSlot = 0;
      this.stackVars = [];
      this.aliases = {};
      this.registers = { list: [] };
      this.hashes = [];
      this.compileStack = [];
      this.inlineStack = [];
      this.blockParams = [];
      this.compileChildren(environment, options2);
      this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
      this.useBlockParams = this.useBlockParams || environment.useBlockParams;
      var opcodes = environment.opcodes, opcode = undefined, firstLoc = undefined, i = undefined, l6 = undefined;
      for (i = 0, l6 = opcodes.length;i < l6; i++) {
        opcode = opcodes[i];
        this.source.currentLocation = opcode.loc;
        firstLoc = firstLoc || opcode.loc;
        this[opcode.opcode].apply(this, opcode.args);
      }
      this.source.currentLocation = firstLoc;
      this.pushSource("");
      if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
        throw new _exception2["default"]("Compile completed with content left on stack");
      }
      if (!this.decorators.isEmpty()) {
        this.useDecorators = true;
        this.decorators.prepend(["var decorators = container.decorators, ", this.lookupPropertyFunctionVarDeclaration(), `;
`]);
        this.decorators.push("return fn;");
        if (asObject) {
          this.decorators = Function.apply(this, ["fn", "props", "container", "depth0", "data", "blockParams", "depths", this.decorators.merge()]);
        } else {
          this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
`);
          this.decorators.push(`}
`);
          this.decorators = this.decorators.merge();
        }
      } else {
        this.decorators = undefined;
      }
      var fn3 = this.createFunctionContext(asObject);
      if (!this.isChild) {
        var ret = {
          compiler: this.compilerInfo(),
          main: fn3
        };
        if (this.decorators) {
          ret.main_d = this.decorators;
          ret.useDecorators = true;
        }
        var _context = this.context;
        var programs = _context.programs;
        var decorators = _context.decorators;
        for (i = 0, l6 = programs.length;i < l6; i++) {
          ret[i] = programs[i];
          if (decorators[i]) {
            ret[i + "_d"] = decorators[i];
            ret.useDecorators = true;
          }
        }
        if (this.environment.usePartial) {
          ret.usePartial = true;
        }
        if (this.options.data) {
          ret.useData = true;
        }
        if (this.useDepths) {
          ret.useDepths = true;
        }
        if (this.useBlockParams) {
          ret.useBlockParams = true;
        }
        if (this.options.compat) {
          ret.compat = true;
        }
        if (!asObject) {
          ret.compiler = JSON.stringify(ret.compiler);
          this.source.currentLocation = { start: { line: 1, column: 0 } };
          ret = this.objectLiteral(ret);
          if (options2.srcName) {
            ret = ret.toStringWithSourceMap({ file: options2.destName });
            ret.map = ret.map && ret.map.toString();
          } else {
            ret = ret.toString();
          }
        } else {
          ret.compilerOptions = this.options;
        }
        return ret;
      } else {
        return fn3;
      }
    },
    preamble: function preamble() {
      this.lastContext = 0;
      this.source = new _codeGen2["default"](this.options.srcName);
      this.decorators = new _codeGen2["default"](this.options.srcName);
    },
    createFunctionContext: function createFunctionContext(asObject) {
      var _this = this;
      var varDeclarations = "";
      var locals = this.stackVars.concat(this.registers.list);
      if (locals.length > 0) {
        varDeclarations += ", " + locals.join(", ");
      }
      var aliasCount = 0;
      Object.keys(this.aliases).forEach(function(alias) {
        var node3 = _this.aliases[alias];
        if (node3.children && node3.referenceCount > 1) {
          varDeclarations += ", alias" + ++aliasCount + "=" + alias;
          node3.children[0] = "alias" + aliasCount;
        }
      });
      if (this.lookupPropertyFunctionIsUsed) {
        varDeclarations += ", " + this.lookupPropertyFunctionVarDeclaration();
      }
      var params = ["container", "depth0", "helpers", "partials", "data"];
      if (this.useBlockParams || this.useDepths) {
        params.push("blockParams");
      }
      if (this.useDepths) {
        params.push("depths");
      }
      var source = this.mergeSource(varDeclarations);
      if (asObject) {
        params.push(source);
        return Function.apply(this, params);
      } else {
        return this.source.wrap(["function(", params.join(","), `) {
  `, source, "}"]);
      }
    },
    mergeSource: function mergeSource(varDeclarations) {
      var isSimple = this.environment.isSimple, appendOnly = !this.forceBuffer, appendFirst = undefined, sourceSeen = undefined, bufferStart = undefined, bufferEnd = undefined;
      this.source.each(function(line2) {
        if (line2.appendToBuffer) {
          if (bufferStart) {
            line2.prepend("  + ");
          } else {
            bufferStart = line2;
          }
          bufferEnd = line2;
        } else {
          if (bufferStart) {
            if (!sourceSeen) {
              appendFirst = true;
            } else {
              bufferStart.prepend("buffer += ");
            }
            bufferEnd.add(";");
            bufferStart = bufferEnd = undefined;
          }
          sourceSeen = true;
          if (!isSimple) {
            appendOnly = false;
          }
        }
      });
      if (appendOnly) {
        if (bufferStart) {
          bufferStart.prepend("return ");
          bufferEnd.add(";");
        } else if (!sourceSeen) {
          this.source.push('return "";');
        }
      } else {
        varDeclarations += ", buffer = " + (appendFirst ? "" : this.initializeBuffer());
        if (bufferStart) {
          bufferStart.prepend("return buffer + ");
          bufferEnd.add(";");
        } else {
          this.source.push("return buffer;");
        }
      }
      if (varDeclarations) {
        this.source.prepend("var " + varDeclarations.substring(2) + (appendFirst ? "" : `;
`));
      }
      return this.source.merge();
    },
    lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() {
      return `
      lookupProperty = container.lookupProperty || function(parent, propertyName) {
        if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
          return parent[propertyName];
        }
        return undefined
    }
    `.trim();
    },
    blockValue: function blockValue(name3) {
      var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)];
      this.setupHelperArgs(name3, 0, params);
      var blockName = this.popStack();
      params.splice(1, 0, blockName);
      this.push(this.source.functionCall(blockHelperMissing, "call", params));
    },
    ambiguousBlockValue: function ambiguousBlockValue() {
      var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)];
      this.setupHelperArgs("", 0, params, true);
      this.flushInline();
      var current = this.topStack();
      params.splice(1, 0, current);
      this.pushSource(["if (!", this.lastHelper, ") { ", current, " = ", this.source.functionCall(blockHelperMissing, "call", params), "}"]);
    },
    appendContent: function appendContent(content) {
      if (this.pendingContent) {
        content = this.pendingContent + content;
      } else {
        this.pendingLocation = this.source.currentLocation;
      }
      this.pendingContent = content;
    },
    append: function append() {
      if (this.isInline()) {
        this.replaceStack(function(current) {
          return [" != null ? ", current, ' : ""'];
        });
        this.pushSource(this.appendToBuffer(this.popStack()));
      } else {
        var local = this.popStack();
        this.pushSource(["if (", local, " != null) { ", this.appendToBuffer(local, undefined, true), " }"]);
        if (this.environment.isSimple) {
          this.pushSource(["else { ", this.appendToBuffer("''", undefined, true), " }"]);
        }
      }
    },
    appendEscaped: function appendEscaped() {
      this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"), "(", this.popStack(), ")"]));
    },
    getContext: function getContext3(depth) {
      this.lastContext = depth;
    },
    pushContext: function pushContext() {
      this.pushStackLiteral(this.contextName(this.lastContext));
    },
    lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
      var i = 0;
      if (!scoped && this.options.compat && !this.lastContext) {
        this.push(this.depthedLookup(parts[i++]));
      } else {
        this.pushContext();
      }
      this.resolvePath("context", parts, i, falsy, strict);
    },
    lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
      this.useBlockParams = true;
      this.push(["blockParams[", blockParamId[0], "][", blockParamId[1], "]"]);
      this.resolvePath("context", parts, 1);
    },
    lookupData: function lookupData(depth, parts, strict) {
      if (!depth) {
        this.pushStackLiteral("data");
      } else {
        this.pushStackLiteral("container.data(data, " + depth + ")");
      }
      this.resolvePath("data", parts, 0, true, strict);
    },
    resolvePath: function resolvePath(type2, parts, startPartIndex, falsy, strict) {
      var _this2 = this;
      if (this.options.strict || this.options.assumeObjects) {
        this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type2));
        return;
      }
      var len = parts.length;
      var _loop = function(i2) {
        _this2.replaceStack(function(current) {
          var lookup = _this2.nameLookup(current, parts[i2], type2);
          if (!falsy) {
            return [" != null ? ", lookup, " : ", current];
          } else {
            return [" && ", lookup];
          }
        });
      };
      for (var i = startPartIndex;i < len; i++) {
        _loop(i);
      }
    },
    resolvePossibleLambda: function resolvePossibleLambda() {
      this.push([this.aliasable("container.lambda"), "(", this.popStack(), ", ", this.contextName(0), ")"]);
    },
    pushStringParam: function pushStringParam(string4, type2) {
      this.pushContext();
      this.pushString(type2);
      if (type2 !== "SubExpression") {
        if (typeof string4 === "string") {
          this.pushString(string4);
        } else {
          this.pushStackLiteral(string4);
        }
      }
    },
    emptyHash: function emptyHash(omitEmpty) {
      if (this.trackIds) {
        this.push("{}");
      }
      if (this.stringParams) {
        this.push("{}");
        this.push("{}");
      }
      this.pushStackLiteral(omitEmpty ? "undefined" : "{}");
    },
    pushHash: function pushHash() {
      if (this.hash) {
        this.hashes.push(this.hash);
      }
      this.hash = { values: {}, types: [], contexts: [], ids: [] };
    },
    popHash: function popHash() {
      var hash2 = this.hash;
      this.hash = this.hashes.pop();
      if (this.trackIds) {
        this.push(this.objectLiteral(hash2.ids));
      }
      if (this.stringParams) {
        this.push(this.objectLiteral(hash2.contexts));
        this.push(this.objectLiteral(hash2.types));
      }
      this.push(this.objectLiteral(hash2.values));
    },
    pushString: function pushString(string4) {
      this.pushStackLiteral(this.quotedString(string4));
    },
    pushLiteral: function pushLiteral(value) {
      this.pushStackLiteral(value);
    },
    pushProgram: function pushProgram(guid3) {
      if (guid3 != null) {
        this.pushStackLiteral(this.programExpression(guid3));
      } else {
        this.pushStackLiteral(null);
      }
    },
    registerDecorator: function registerDecorator(paramSize, name3) {
      var foundDecorator = this.nameLookup("decorators", name3, "decorator"), options2 = this.setupHelperArgs(name3, paramSize);
      this.decorators.push(["var decorator = ", foundDecorator, ";"]);
      this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name3 + '"'), "); }"]);
      this.decorators.push(["fn = ", this.decorators.functionCall("decorator", "", ["fn", "props", "container", options2]), " || fn;"]);
    },
    invokeHelper: function invokeHelper(paramSize, name3, isSimple) {
      var nonHelper = this.popStack(), helper = this.setupHelper(paramSize, name3);
      var possibleFunctionCalls = [];
      if (isSimple) {
        possibleFunctionCalls.push(helper.name);
      }
      possibleFunctionCalls.push(nonHelper);
      if (!this.options.strict) {
        possibleFunctionCalls.push(this.aliasable("container.hooks.helperMissing"));
      }
      var functionLookupCode = ["(", this.itemsSeparatedBy(possibleFunctionCalls, "||"), ")"];
      var functionCall = this.source.functionCall(functionLookupCode, "call", helper.callParams);
      this.push(functionCall);
    },
    itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
      var result = [];
      result.push(items[0]);
      for (var i = 1;i < items.length; i++) {
        result.push(separator, items[i]);
      }
      return result;
    },
    invokeKnownHelper: function invokeKnownHelper(paramSize, name3) {
      var helper = this.setupHelper(paramSize, name3);
      this.push(this.source.functionCall(helper.name, "call", helper.callParams));
    },
    invokeAmbiguous: function invokeAmbiguous(name3, helperCall) {
      this.useRegister("helper");
      var nonHelper = this.popStack();
      this.emptyHash();
      var helper = this.setupHelper(0, name3, helperCall);
      var helperName = this.lastHelper = this.nameLookup("helpers", name3, "helper");
      var lookup = ["(", "(helper = ", helperName, " || ", nonHelper, ")"];
      if (!this.options.strict) {
        lookup[0] = "(helper = ";
        lookup.push(" != null ? helper : ", this.aliasable("container.hooks.helperMissing"));
      }
      this.push(["(", lookup, helper.paramsInit ? ["),(", helper.paramsInit] : [], "),", "(typeof helper === ", this.aliasable('"function"'), " ? ", this.source.functionCall("helper", "call", helper.callParams), " : helper))"]);
    },
    invokePartial: function invokePartial(isDynamic, name3, indent) {
      var params = [], options2 = this.setupParams(name3, 1, params);
      if (isDynamic) {
        name3 = this.popStack();
        delete options2.name;
      }
      if (indent) {
        options2.indent = JSON.stringify(indent);
      }
      options2.helpers = "helpers";
      options2.partials = "partials";
      options2.decorators = "container.decorators";
      if (!isDynamic) {
        params.unshift(this.nameLookup("partials", name3, "partial"));
      } else {
        params.unshift(name3);
      }
      if (this.options.compat) {
        options2.depths = "depths";
      }
      options2 = this.objectLiteral(options2);
      params.push(options2);
      this.push(this.source.functionCall("container.invokePartial", "", params));
    },
    assignToHash: function assignToHash(key) {
      var value = this.popStack(), context10 = undefined, type2 = undefined, id = undefined;
      if (this.trackIds) {
        id = this.popStack();
      }
      if (this.stringParams) {
        type2 = this.popStack();
        context10 = this.popStack();
      }
      var hash2 = this.hash;
      if (context10) {
        hash2.contexts[key] = context10;
      }
      if (type2) {
        hash2.types[key] = type2;
      }
      if (id) {
        hash2.ids[key] = id;
      }
      hash2.values[key] = value;
    },
    pushId: function pushId(type2, name3, child) {
      if (type2 === "BlockParam") {
        this.pushStackLiteral("blockParams[" + name3[0] + "].path[" + name3[1] + "]" + (child ? " + " + JSON.stringify("." + child) : ""));
      } else if (type2 === "PathExpression") {
        this.pushString(name3);
      } else if (type2 === "SubExpression") {
        this.pushStackLiteral("true");
      } else {
        this.pushStackLiteral("null");
      }
    },
    compiler: JavaScriptCompiler,
    compileChildren: function compileChildren(environment, options2) {
      var children = environment.children, child = undefined, compiler = undefined;
      for (var i = 0, l6 = children.length;i < l6; i++) {
        child = children[i];
        compiler = new this.compiler;
        var existing = this.matchExistingProgram(child);
        if (existing == null) {
          var index2 = this.context.programs.push("") - 1;
          child.index = index2;
          child.name = "program" + index2;
          this.context.programs[index2] = compiler.compile(child, options2, this.context, !this.precompile);
          this.context.decorators[index2] = compiler.decorators;
          this.context.environments[index2] = child;
          this.useDepths = this.useDepths || compiler.useDepths;
          this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
          child.useDepths = this.useDepths;
          child.useBlockParams = this.useBlockParams;
        } else {
          child.index = existing.index;
          child.name = "program" + existing.index;
          this.useDepths = this.useDepths || existing.useDepths;
          this.useBlockParams = this.useBlockParams || existing.useBlockParams;
        }
      }
    },
    matchExistingProgram: function matchExistingProgram(child) {
      for (var i = 0, len = this.context.environments.length;i < len; i++) {
        var environment = this.context.environments[i];
        if (environment && environment.equals(child)) {
          return environment;
        }
      }
    },
    programExpression: function programExpression(guid3) {
      var child = this.environment.children[guid3], programParams = [child.index, "data", child.blockParams];
      if (this.useBlockParams || this.useDepths) {
        programParams.push("blockParams");
      }
      if (this.useDepths) {
        programParams.push("depths");
      }
      return "container.program(" + programParams.join(", ") + ")";
    },
    useRegister: function useRegister(name3) {
      if (!this.registers[name3]) {
        this.registers[name3] = true;
        this.registers.list.push(name3);
      }
    },
    push: function push(expr) {
      if (!(expr instanceof Literal)) {
        expr = this.source.wrap(expr);
      }
      this.inlineStack.push(expr);
      return expr;
    },
    pushStackLiteral: function pushStackLiteral(item) {
      this.push(new Literal(item));
    },
    pushSource: function pushSource(source) {
      if (this.pendingContent) {
        this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
        this.pendingContent = undefined;
      }
      if (source) {
        this.source.push(source);
      }
    },
    replaceStack: function replaceStack(callback) {
      var prefix = ["("], stack = undefined, createdStack = undefined, usedLiteral = undefined;
      if (!this.isInline()) {
        throw new _exception2["default"]("replaceStack on non-inline");
      }
      var top = this.popStack(true);
      if (top instanceof Literal) {
        stack = [top.value];
        prefix = ["(", stack];
        usedLiteral = true;
      } else {
        createdStack = true;
        var _name = this.incrStack();
        prefix = ["((", this.push(_name), " = ", top, ")"];
        stack = this.topStack();
      }
      var item = callback.call(this, stack);
      if (!usedLiteral) {
        this.popStack();
      }
      if (createdStack) {
        this.stackSlot--;
      }
      this.push(prefix.concat(item, ")"));
    },
    incrStack: function incrStack() {
      this.stackSlot++;
      if (this.stackSlot > this.stackVars.length) {
        this.stackVars.push("stack" + this.stackSlot);
      }
      return this.topStackName();
    },
    topStackName: function topStackName() {
      return "stack" + this.stackSlot;
    },
    flushInline: function flushInline() {
      var inlineStack = this.inlineStack;
      this.inlineStack = [];
      for (var i = 0, len = inlineStack.length;i < len; i++) {
        var entry = inlineStack[i];
        if (entry instanceof Literal) {
          this.compileStack.push(entry);
        } else {
          var stack = this.incrStack();
          this.pushSource([stack, " = ", entry, ";"]);
          this.compileStack.push(stack);
        }
      }
    },
    isInline: function isInline() {
      return this.inlineStack.length;
    },
    popStack: function popStack(wrapped) {
      var inline2 = this.isInline(), item = (inline2 ? this.inlineStack : this.compileStack).pop();
      if (!wrapped && item instanceof Literal) {
        return item.value;
      } else {
        if (!inline2) {
          if (!this.stackSlot) {
            throw new _exception2["default"]("Invalid stack pop");
          }
          this.stackSlot--;
        }
        return item;
      }
    },
    topStack: function topStack() {
      var stack = this.isInline() ? this.inlineStack : this.compileStack, item = stack[stack.length - 1];
      if (item instanceof Literal) {
        return item.value;
      } else {
        return item;
      }
    },
    contextName: function contextName(context10) {
      if (this.useDepths && context10) {
        return "depths[" + context10 + "]";
      } else {
        return "depth" + context10;
      }
    },
    quotedString: function quotedString(str) {
      return this.source.quotedString(str);
    },
    objectLiteral: function objectLiteral(obj) {
      return this.source.objectLiteral(obj);
    },
    aliasable: function aliasable(name3) {
      var ret = this.aliases[name3];
      if (ret) {
        ret.referenceCount++;
        return ret;
      }
      ret = this.aliases[name3] = this.source.wrap(name3);
      ret.aliasable = true;
      ret.referenceCount = 1;
      return ret;
    },
    setupHelper: function setupHelper(paramSize, name3, blockHelper) {
      var params = [], paramsInit = this.setupHelperArgs(name3, paramSize, params, blockHelper);
      var foundHelper = this.nameLookup("helpers", name3, "helper"), callContext = this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})");
      return {
        params,
        paramsInit,
        name: foundHelper,
        callParams: [callContext].concat(params)
      };
    },
    setupParams: function setupParams(helper, paramSize, params) {
      var options2 = {}, contexts = [], types4 = [], ids = [], objectArgs = !params, param = undefined;
      if (objectArgs) {
        params = [];
      }
      options2.name = this.quotedString(helper);
      options2.hash = this.popStack();
      if (this.trackIds) {
        options2.hashIds = this.popStack();
      }
      if (this.stringParams) {
        options2.hashTypes = this.popStack();
        options2.hashContexts = this.popStack();
      }
      var inverse = this.popStack(), program = this.popStack();
      if (program || inverse) {
        options2.fn = program || "container.noop";
        options2.inverse = inverse || "container.noop";
      }
      var i = paramSize;
      while (i--) {
        param = this.popStack();
        params[i] = param;
        if (this.trackIds) {
          ids[i] = this.popStack();
        }
        if (this.stringParams) {
          types4[i] = this.popStack();
          contexts[i] = this.popStack();
        }
      }
      if (objectArgs) {
        options2.args = this.source.generateArray(params);
      }
      if (this.trackIds) {
        options2.ids = this.source.generateArray(ids);
      }
      if (this.stringParams) {
        options2.types = this.source.generateArray(types4);
        options2.contexts = this.source.generateArray(contexts);
      }
      if (this.options.data) {
        options2.data = "data";
      }
      if (this.useBlockParams) {
        options2.blockParams = "blockParams";
      }
      return options2;
    },
    setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
      var options2 = this.setupParams(helper, paramSize, params);
      options2.loc = JSON.stringify(this.source.currentLocation);
      options2 = this.objectLiteral(options2);
      if (useRegister) {
        this.useRegister("options");
        params.push("options");
        return ["options=", options2];
      } else if (params) {
        params.push(options2);
        return "";
      } else {
        return options2;
      }
    }
  };
  (function() {
    var reservedWords = ("break else new var" + " case finally return void" + " catch for switch while" + " continue function this with" + " default if throw" + " delete in try" + " do instanceof typeof" + " abstract enum int short" + " boolean export interface static" + " byte extends long super" + " char final native synchronized" + " class float package throws" + " const goto private transient" + " debugger implements protected volatile" + " double import public let yield await" + " null true false").split(" ");
    var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
    for (var i = 0, l6 = reservedWords.length;i < l6; i++) {
      compilerWords[reservedWords[i]] = true;
    }
  })();
  JavaScriptCompiler.isValidJavaScriptVariableName = function(name3) {
    return !JavaScriptCompiler.RESERVED_WORDS[name3] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name3);
  };
  function strictLookup(requireTerminal, compiler, parts, startPartIndex, type2) {
    var stack = compiler.popStack(), len = parts.length;
    if (requireTerminal) {
      len--;
    }
    for (var i = startPartIndex;i < len; i++) {
      stack = compiler.nameLookup(stack, parts[i], type2);
    }
    if (requireTerminal) {
      return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
    } else {
      return stack;
    }
  }
  exports.default = JavaScriptCompiler;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars.js
var require_handlebars = __commonJS((exports, module) => {
  exports.__esModule = true;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _handlebarsRuntime = require_handlebars_runtime();
  var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
  var _handlebarsCompilerAst = require_ast();
  var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
  var _handlebarsCompilerBase = require_base2();
  var _handlebarsCompilerCompiler = require_compiler();
  var _handlebarsCompilerJavascriptCompiler = require_javascript_compiler();
  var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
  var _handlebarsCompilerVisitor = require_visitor();
  var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
  var _handlebarsNoConflict = require_no_conflict();
  var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
  var _create = _handlebarsRuntime2["default"].create;
  function create() {
    var hb = _create();
    hb.compile = function(input, options2) {
      return _handlebarsCompilerCompiler.compile(input, options2, hb);
    };
    hb.precompile = function(input, options2) {
      return _handlebarsCompilerCompiler.precompile(input, options2, hb);
    };
    hb.AST = _handlebarsCompilerAst2["default"];
    hb.Compiler = _handlebarsCompilerCompiler.Compiler;
    hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2["default"];
    hb.Parser = _handlebarsCompilerBase.parser;
    hb.parse = _handlebarsCompilerBase.parse;
    hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
    return hb;
  }
  var inst = create();
  inst.create = create;
  _handlebarsNoConflict2["default"](inst);
  inst.Visitor = _handlebarsCompilerVisitor2["default"];
  inst["default"] = inst;
  exports.default = inst;
  module.exports = exports["default"];
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js
var require_printer = __commonJS((exports) => {
  exports.__esModule = true;
  exports.print = print;
  exports.PrintVisitor = PrintVisitor;
  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : { default: obj };
  }
  var _visitor = require_visitor();
  var _visitor2 = _interopRequireDefault(_visitor);
  function print(ast) {
    return new PrintVisitor().accept(ast);
  }
  function PrintVisitor() {
    this.padding = 0;
  }
  PrintVisitor.prototype = new _visitor2["default"];
  PrintVisitor.prototype.pad = function(string4) {
    var out = "";
    for (var i = 0, l6 = this.padding;i < l6; i++) {
      out += "  ";
    }
    out += string4 + `
`;
    return out;
  };
  PrintVisitor.prototype.Program = function(program) {
    var out = "", body2 = program.body, i = undefined, l6 = undefined;
    if (program.blockParams) {
      var blockParams = "BLOCK PARAMS: [";
      for (i = 0, l6 = program.blockParams.length;i < l6; i++) {
        blockParams += " " + program.blockParams[i];
      }
      blockParams += " ]";
      out += this.pad(blockParams);
    }
    for (i = 0, l6 = body2.length;i < l6; i++) {
      out += this.accept(body2[i]);
    }
    this.padding--;
    return out;
  };
  PrintVisitor.prototype.MustacheStatement = function(mustache) {
    return this.pad("{{ " + this.SubExpression(mustache) + " }}");
  };
  PrintVisitor.prototype.Decorator = function(mustache) {
    return this.pad("{{ DIRECTIVE " + this.SubExpression(mustache) + " }}");
  };
  PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function(block2) {
    var out = "";
    out += this.pad((block2.type === "DecoratorBlock" ? "DIRECTIVE " : "") + "BLOCK:");
    this.padding++;
    out += this.pad(this.SubExpression(block2));
    if (block2.program) {
      out += this.pad("PROGRAM:");
      this.padding++;
      out += this.accept(block2.program);
      this.padding--;
    }
    if (block2.inverse) {
      if (block2.program) {
        this.padding++;
      }
      out += this.pad("{{^}}");
      this.padding++;
      out += this.accept(block2.inverse);
      this.padding--;
      if (block2.program) {
        this.padding--;
      }
    }
    this.padding--;
    return out;
  };
  PrintVisitor.prototype.PartialStatement = function(partial2) {
    var content = "PARTIAL:" + partial2.name.original;
    if (partial2.params[0]) {
      content += " " + this.accept(partial2.params[0]);
    }
    if (partial2.hash) {
      content += " " + this.accept(partial2.hash);
    }
    return this.pad("{{> " + content + " }}");
  };
  PrintVisitor.prototype.PartialBlockStatement = function(partial2) {
    var content = "PARTIAL BLOCK:" + partial2.name.original;
    if (partial2.params[0]) {
      content += " " + this.accept(partial2.params[0]);
    }
    if (partial2.hash) {
      content += " " + this.accept(partial2.hash);
    }
    content += " " + this.pad("PROGRAM:");
    this.padding++;
    content += this.accept(partial2.program);
    this.padding--;
    return this.pad("{{> " + content + " }}");
  };
  PrintVisitor.prototype.ContentStatement = function(content) {
    return this.pad("CONTENT[ '" + content.value + "' ]");
  };
  PrintVisitor.prototype.CommentStatement = function(comment) {
    return this.pad("{{! '" + comment.value + "' }}");
  };
  PrintVisitor.prototype.SubExpression = function(sexpr) {
    var params = sexpr.params, paramStrings = [], hash2 = undefined;
    for (var i = 0, l6 = params.length;i < l6; i++) {
      paramStrings.push(this.accept(params[i]));
    }
    params = "[" + paramStrings.join(", ") + "]";
    hash2 = sexpr.hash ? " " + this.accept(sexpr.hash) : "";
    return this.accept(sexpr.path) + " " + params + hash2;
  };
  PrintVisitor.prototype.PathExpression = function(id) {
    var path2 = id.parts.join("/");
    return (id.data ? "@" : "") + "PATH:" + path2;
  };
  PrintVisitor.prototype.StringLiteral = function(string4) {
    return '"' + string4.value + '"';
  };
  PrintVisitor.prototype.NumberLiteral = function(number5) {
    return "NUMBER{" + number5.value + "}";
  };
  PrintVisitor.prototype.BooleanLiteral = function(bool) {
    return "BOOLEAN{" + bool.value + "}";
  };
  PrintVisitor.prototype.UndefinedLiteral = function() {
    return "UNDEFINED";
  };
  PrintVisitor.prototype.NullLiteral = function() {
    return "NULL";
  };
  PrintVisitor.prototype.Hash = function(hash2) {
    var pairs = hash2.pairs, joinedPairs = [];
    for (var i = 0, l6 = pairs.length;i < l6; i++) {
      joinedPairs.push(this.accept(pairs[i]));
    }
    return "HASH{" + joinedPairs.join(", ") + "}";
  };
  PrintVisitor.prototype.HashPair = function(pair) {
    return pair.key + "=" + this.accept(pair.value);
  };
});

// ../../node_modules/.pnpm/handlebars@4.7.9/node_modules/handlebars/lib/index.js
var require_lib4 = __commonJS((exports, module) => {
  var handlebars = require_handlebars()["default"];
  var printer = require_printer();
  handlebars.PrintVisitor = printer.PrintVisitor;
  handlebars.print = printer.print;
  module.exports = handlebars;
  function extension(module2, filename) {
    var fs3 = __require("fs");
    var templateString = fs3.readFileSync(filename, "utf8");
    module2.exports = handlebars.compile(templateString);
  }
  if (__require.extensions) {
    __require.extensions[".handlebars"] = extension;
    __require.extensions[".hbs"] = extension;
  }
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/symbols.js
var require_symbols2 = __commonJS((exports2, module) => {
  module.exports = {
    kClose: Symbol("close"),
    kDestroy: Symbol("destroy"),
    kDispatch: Symbol("dispatch"),
    kUrl: Symbol("url"),
    kWriting: Symbol("writing"),
    kResuming: Symbol("resuming"),
    kQueue: Symbol("queue"),
    kConnect: Symbol("connect"),
    kConnecting: Symbol("connecting"),
    kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"),
    kKeepAliveMaxTimeout: Symbol("max keep alive timeout"),
    kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"),
    kKeepAliveTimeoutValue: Symbol("keep alive timeout"),
    kKeepAlive: Symbol("keep alive"),
    kHeadersTimeout: Symbol("headers timeout"),
    kBodyTimeout: Symbol("body timeout"),
    kServerName: Symbol("server name"),
    kLocalAddress: Symbol("local address"),
    kHost: Symbol("host"),
    kNoRef: Symbol("no ref"),
    kBodyUsed: Symbol("used"),
    kBody: Symbol("abstracted request body"),
    kRunning: Symbol("running"),
    kBlocking: Symbol("blocking"),
    kPending: Symbol("pending"),
    kSize: Symbol("size"),
    kBusy: Symbol("busy"),
    kQueued: Symbol("queued"),
    kFree: Symbol("free"),
    kConnected: Symbol("connected"),
    kClosed: Symbol("closed"),
    kNeedDrain: Symbol("need drain"),
    kReset: Symbol("reset"),
    kDestroyed: Symbol.for("nodejs.stream.destroyed"),
    kResume: Symbol("resume"),
    kOnError: Symbol("on error"),
    kMaxHeadersSize: Symbol("max headers size"),
    kRunningIdx: Symbol("running index"),
    kPendingIdx: Symbol("pending index"),
    kError: Symbol("error"),
    kClients: Symbol("clients"),
    kClient: Symbol("client"),
    kParser: Symbol("parser"),
    kOnDestroyed: Symbol("destroy callbacks"),
    kPipelining: Symbol("pipelining"),
    kSocket: Symbol("socket"),
    kHostHeader: Symbol("host header"),
    kConnector: Symbol("connector"),
    kStrictContentLength: Symbol("strict content length"),
    kMaxRedirections: Symbol("maxRedirections"),
    kMaxRequests: Symbol("maxRequestsPerClient"),
    kProxy: Symbol("proxy agent options"),
    kCounter: Symbol("socket request counter"),
    kMaxResponseSize: Symbol("max response size"),
    kHTTP2Session: Symbol("http2Session"),
    kHTTP2SessionState: Symbol("http2Session state"),
    kRetryHandlerDefaultRetry: Symbol("retry agent default retry"),
    kConstruct: Symbol("constructable"),
    kListeners: Symbol("listeners"),
    kHTTPContext: Symbol("http context"),
    kMaxConcurrentStreams: Symbol("max concurrent streams"),
    kHTTP2InitialWindowSize: Symbol("http2 initial window size"),
    kHTTP2ConnectionWindowSize: Symbol("http2 connection window size"),
    kEnableConnectProtocol: Symbol("http2session connect protocol"),
    kRemoteSettings: Symbol("http2session remote settings"),
    kHTTP2Stream: Symbol("http2session client stream"),
    kPingInterval: Symbol("ping interval"),
    kNoProxyAgent: Symbol("no proxy agent"),
    kHttpProxyAgent: Symbol("http proxy agent"),
    kHttpsProxyAgent: Symbol("https proxy agent"),
    kSocks5ProxyAgent: Symbol("socks5 proxy agent")
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/util/timers.js
var require_timers = __commonJS((exports2, module) => {
  var fastNow = 0;
  var RESOLUTION_MS = 1000;
  var TICK_MS = (RESOLUTION_MS >> 1) - 1;
  var fastNowTimeout;
  var kFastTimer = Symbol("kFastTimer");
  var fastTimers = [];
  var NOT_IN_LIST = -2;
  var TO_BE_CLEARED = -1;
  var PENDING = 0;
  var ACTIVE = 1;
  function onTick() {
    fastNow += TICK_MS;
    let idx = 0;
    let len = fastTimers.length;
    while (idx < len) {
      const timer = fastTimers[idx];
      if (timer._state === PENDING) {
        timer._idleStart = fastNow - TICK_MS;
        timer._state = ACTIVE;
      } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) {
        timer._state = TO_BE_CLEARED;
        timer._idleStart = -1;
        timer._onTimeout(timer._timerArg);
      }
      if (timer._state === TO_BE_CLEARED) {
        timer._state = NOT_IN_LIST;
        if (--len !== 0) {
          fastTimers[idx] = fastTimers[len];
        }
      } else {
        ++idx;
      }
    }
    fastTimers.length = len;
    if (fastTimers.length !== 0) {
      refreshTimeout();
    }
  }
  function refreshTimeout() {
    if (fastNowTimeout?.refresh) {
      fastNowTimeout.refresh();
    } else {
      clearTimeout(fastNowTimeout);
      fastNowTimeout = setTimeout(onTick, TICK_MS);
      fastNowTimeout?.unref();
    }
  }

  class FastTimer {
    [kFastTimer] = true;
    _state = NOT_IN_LIST;
    _idleTimeout = -1;
    _idleStart = -1;
    _onTimeout;
    _timerArg;
    constructor(callback, delay, arg) {
      this._onTimeout = callback;
      this._idleTimeout = delay;
      this._timerArg = arg;
      this.refresh();
    }
    refresh() {
      if (this._state === NOT_IN_LIST) {
        fastTimers.push(this);
      }
      if (!fastNowTimeout || fastTimers.length === 1) {
        refreshTimeout();
      }
      this._state = PENDING;
    }
    clear() {
      this._state = TO_BE_CLEARED;
      this._idleStart = -1;
    }
  }
  module.exports = {
    setTimeout(callback, delay, arg) {
      return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg);
    },
    clearTimeout(timeout) {
      if (timeout[kFastTimer]) {
        timeout.clear();
      } else {
        clearTimeout(timeout);
      }
    },
    setFastTimeout(callback, delay, arg) {
      return new FastTimer(callback, delay, arg);
    },
    clearFastTimeout(timeout) {
      timeout.clear();
    },
    now() {
      return fastNow;
    },
    tick(delay = 0) {
      fastNow += delay - RESOLUTION_MS + 1;
      onTick();
      onTick();
    },
    reset() {
      fastNow = 0;
      fastTimers.length = 0;
      clearTimeout(fastNowTimeout);
      fastNowTimeout = null;
    },
    kFastTimer
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/errors.js
var require_errors8 = __commonJS((exports2, module) => {
  var kUndiciError = Symbol.for("undici.error.UND_ERR");

  class UndiciError extends Error {
    constructor(message2, options2) {
      super(message2, options2);
      this.name = "UndiciError";
      this.code = "UND_ERR";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kUndiciError] === true;
    }
    get [kUndiciError]() {
      return true;
    }
  }
  var kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT");

  class ConnectTimeoutError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "ConnectTimeoutError";
      this.message = message2 || "Connect Timeout Error";
      this.code = "UND_ERR_CONNECT_TIMEOUT";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kConnectTimeoutError] === true;
    }
    get [kConnectTimeoutError]() {
      return true;
    }
  }
  var kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT");

  class HeadersTimeoutError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "HeadersTimeoutError";
      this.message = message2 || "Headers Timeout Error";
      this.code = "UND_ERR_HEADERS_TIMEOUT";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kHeadersTimeoutError] === true;
    }
    get [kHeadersTimeoutError]() {
      return true;
    }
  }
  var kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW");

  class HeadersOverflowError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "HeadersOverflowError";
      this.message = message2 || "Headers Overflow Error";
      this.code = "UND_ERR_HEADERS_OVERFLOW";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kHeadersOverflowError] === true;
    }
    get [kHeadersOverflowError]() {
      return true;
    }
  }
  var kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT");

  class BodyTimeoutError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "BodyTimeoutError";
      this.message = message2 || "Body Timeout Error";
      this.code = "UND_ERR_BODY_TIMEOUT";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kBodyTimeoutError] === true;
    }
    get [kBodyTimeoutError]() {
      return true;
    }
  }
  var kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG");

  class InvalidArgumentError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "InvalidArgumentError";
      this.message = message2 || "Invalid Argument Error";
      this.code = "UND_ERR_INVALID_ARG";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kInvalidArgumentError] === true;
    }
    get [kInvalidArgumentError]() {
      return true;
    }
  }
  var kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE");

  class InvalidReturnValueError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "InvalidReturnValueError";
      this.message = message2 || "Invalid Return Value Error";
      this.code = "UND_ERR_INVALID_RETURN_VALUE";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kInvalidReturnValueError] === true;
    }
    get [kInvalidReturnValueError]() {
      return true;
    }
  }
  var kAbortError = Symbol.for("undici.error.UND_ERR_ABORT");

  class AbortError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "AbortError";
      this.message = message2 || "The operation was aborted";
      this.code = "UND_ERR_ABORT";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kAbortError] === true;
    }
    get [kAbortError]() {
      return true;
    }
  }
  var kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED");

  class RequestAbortedError extends AbortError {
    constructor(message2) {
      super(message2);
      this.name = "AbortError";
      this.message = message2 || "Request aborted";
      this.code = "UND_ERR_ABORTED";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kRequestAbortedError] === true;
    }
    get [kRequestAbortedError]() {
      return true;
    }
  }
  var kInformationalError = Symbol.for("undici.error.UND_ERR_INFO");

  class InformationalError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "InformationalError";
      this.message = message2 || "Request information";
      this.code = "UND_ERR_INFO";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kInformationalError] === true;
    }
    get [kInformationalError]() {
      return true;
    }
  }
  var kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH");

  class RequestContentLengthMismatchError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "RequestContentLengthMismatchError";
      this.message = message2 || "Request body length does not match content-length header";
      this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kRequestContentLengthMismatchError] === true;
    }
    get [kRequestContentLengthMismatchError]() {
      return true;
    }
  }
  var kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH");

  class ResponseContentLengthMismatchError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "ResponseContentLengthMismatchError";
      this.message = message2 || "Response body length does not match content-length header";
      this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kResponseContentLengthMismatchError] === true;
    }
    get [kResponseContentLengthMismatchError]() {
      return true;
    }
  }
  var kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED");

  class ClientDestroyedError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "ClientDestroyedError";
      this.message = message2 || "The client is destroyed";
      this.code = "UND_ERR_DESTROYED";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kClientDestroyedError] === true;
    }
    get [kClientDestroyedError]() {
      return true;
    }
  }
  var kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED");

  class ClientClosedError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "ClientClosedError";
      this.message = message2 || "The client is closed";
      this.code = "UND_ERR_CLOSED";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kClientClosedError] === true;
    }
    get [kClientClosedError]() {
      return true;
    }
  }
  var kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET");

  class SocketError extends UndiciError {
    constructor(message2, socket) {
      super(message2);
      this.name = "SocketError";
      this.message = message2 || "Socket error";
      this.code = "UND_ERR_SOCKET";
      this.socket = socket;
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kSocketError] === true;
    }
    get [kSocketError]() {
      return true;
    }
  }
  var kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED");

  class NotSupportedError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "NotSupportedError";
      this.message = message2 || "Not supported error";
      this.code = "UND_ERR_NOT_SUPPORTED";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kNotSupportedError] === true;
    }
    get [kNotSupportedError]() {
      return true;
    }
  }
  var kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM");

  class BalancedPoolMissingUpstreamError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "MissingUpstreamError";
      this.message = message2 || "No upstream has been added to the BalancedPool";
      this.code = "UND_ERR_BPL_MISSING_UPSTREAM";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kBalancedPoolMissingUpstreamError] === true;
    }
    get [kBalancedPoolMissingUpstreamError]() {
      return true;
    }
  }
  var kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER");

  class HTTPParserError extends Error {
    constructor(message2, code2, data) {
      super(message2);
      this.name = "HTTPParserError";
      this.code = code2 ? `HPE_${code2}` : undefined;
      this.data = data ? data.toString() : undefined;
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kHTTPParserError] === true;
    }
    get [kHTTPParserError]() {
      return true;
    }
  }
  var kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE");

  class ResponseExceededMaxSizeError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "ResponseExceededMaxSizeError";
      this.message = message2 || "Response content exceeded max size";
      this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kResponseExceededMaxSizeError] === true;
    }
    get [kResponseExceededMaxSizeError]() {
      return true;
    }
  }
  var kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY");

  class RequestRetryError extends UndiciError {
    constructor(message2, code2, { headers, data }) {
      super(message2);
      this.name = "RequestRetryError";
      this.message = message2 || "Request retry error";
      this.code = "UND_ERR_REQ_RETRY";
      this.statusCode = code2;
      this.data = data;
      this.headers = headers;
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kRequestRetryError] === true;
    }
    get [kRequestRetryError]() {
      return true;
    }
  }
  var kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE");

  class ResponseError extends UndiciError {
    constructor(message2, code2, { headers, body: body2 }) {
      super(message2);
      this.name = "ResponseError";
      this.message = message2 || "Response error";
      this.code = "UND_ERR_RESPONSE";
      this.statusCode = code2;
      this.body = body2;
      this.headers = headers;
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kResponseError] === true;
    }
    get [kResponseError]() {
      return true;
    }
  }
  var kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS");

  class SecureProxyConnectionError extends UndiciError {
    constructor(cause, message2, options2 = {}) {
      super(message2, { cause, ...options2 });
      this.name = "SecureProxyConnectionError";
      this.message = message2 || "Secure Proxy Connection failed";
      this.code = "UND_ERR_PRX_TLS";
      this.cause = cause;
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kSecureProxyConnectionError] === true;
    }
    get [kSecureProxyConnectionError]() {
      return true;
    }
  }
  var kMaxOriginsReachedError = Symbol.for("undici.error.UND_ERR_MAX_ORIGINS_REACHED");

  class MaxOriginsReachedError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "MaxOriginsReachedError";
      this.message = message2 || "Maximum allowed origins reached";
      this.code = "UND_ERR_MAX_ORIGINS_REACHED";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kMaxOriginsReachedError] === true;
    }
    get [kMaxOriginsReachedError]() {
      return true;
    }
  }

  class Socks5ProxyError extends UndiciError {
    constructor(message2, code2) {
      super(message2);
      this.name = "Socks5ProxyError";
      this.message = message2 || "SOCKS5 proxy error";
      this.code = code2 || "UND_ERR_SOCKS5";
    }
  }
  var kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED");

  class MessageSizeExceededError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "MessageSizeExceededError";
      this.message = message2 || "Max decompressed message size exceeded";
      this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kMessageSizeExceededError] === true;
    }
    get [kMessageSizeExceededError]() {
      return true;
    }
  }
  module.exports = {
    AbortError,
    HTTPParserError,
    UndiciError,
    HeadersTimeoutError,
    HeadersOverflowError,
    BodyTimeoutError,
    RequestContentLengthMismatchError,
    ConnectTimeoutError,
    InvalidArgumentError,
    InvalidReturnValueError,
    RequestAbortedError,
    ClientDestroyedError,
    ClientClosedError,
    InformationalError,
    SocketError,
    NotSupportedError,
    ResponseContentLengthMismatchError,
    BalancedPoolMissingUpstreamError,
    ResponseExceededMaxSizeError,
    RequestRetryError,
    ResponseError,
    SecureProxyConnectionError,
    MaxOriginsReachedError,
    Socks5ProxyError,
    MessageSizeExceededError
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/constants.js
var require_constants5 = __commonJS((exports2, module) => {
  var wellknownHeaderNames = [
    "Accept",
    "Accept-Encoding",
    "Accept-Language",
    "Accept-Ranges",
    "Access-Control-Allow-Credentials",
    "Access-Control-Allow-Headers",
    "Access-Control-Allow-Methods",
    "Access-Control-Allow-Origin",
    "Access-Control-Expose-Headers",
    "Access-Control-Max-Age",
    "Access-Control-Request-Headers",
    "Access-Control-Request-Method",
    "Age",
    "Allow",
    "Alt-Svc",
    "Alt-Used",
    "Authorization",
    "Cache-Control",
    "Clear-Site-Data",
    "Connection",
    "Content-Disposition",
    "Content-Encoding",
    "Content-Language",
    "Content-Length",
    "Content-Location",
    "Content-Range",
    "Content-Security-Policy",
    "Content-Security-Policy-Report-Only",
    "Content-Type",
    "Cookie",
    "Cross-Origin-Embedder-Policy",
    "Cross-Origin-Opener-Policy",
    "Cross-Origin-Resource-Policy",
    "Date",
    "Device-Memory",
    "Downlink",
    "ECT",
    "ETag",
    "Expect",
    "Expect-CT",
    "Expires",
    "Forwarded",
    "From",
    "Host",
    "If-Match",
    "If-Modified-Since",
    "If-None-Match",
    "If-Range",
    "If-Unmodified-Since",
    "Keep-Alive",
    "Last-Modified",
    "Link",
    "Location",
    "Max-Forwards",
    "Origin",
    "Permissions-Policy",
    "Pragma",
    "Proxy-Authenticate",
    "Proxy-Authorization",
    "RTT",
    "Range",
    "Referer",
    "Referrer-Policy",
    "Refresh",
    "Retry-After",
    "Sec-WebSocket-Accept",
    "Sec-WebSocket-Extensions",
    "Sec-WebSocket-Key",
    "Sec-WebSocket-Protocol",
    "Sec-WebSocket-Version",
    "Server",
    "Server-Timing",
    "Service-Worker-Allowed",
    "Service-Worker-Navigation-Preload",
    "Set-Cookie",
    "SourceMap",
    "Strict-Transport-Security",
    "Supports-Loading-Mode",
    "TE",
    "Timing-Allow-Origin",
    "Trailer",
    "Transfer-Encoding",
    "Upgrade",
    "Upgrade-Insecure-Requests",
    "User-Agent",
    "Vary",
    "Via",
    "WWW-Authenticate",
    "X-Content-Type-Options",
    "X-DNS-Prefetch-Control",
    "X-Frame-Options",
    "X-Permitted-Cross-Domain-Policies",
    "X-Powered-By",
    "X-Requested-With",
    "X-XSS-Protection"
  ];
  var headerNameLowerCasedRecord = {};
  Object.setPrototypeOf(headerNameLowerCasedRecord, null);
  var wellknownHeaderNameBuffers = {};
  Object.setPrototypeOf(wellknownHeaderNameBuffers, null);
  function getHeaderNameAsBuffer(header) {
    let buffer = wellknownHeaderNameBuffers[header];
    if (buffer === undefined) {
      buffer = Buffer.from(header);
    }
    return buffer;
  }
  for (let i = 0;i < wellknownHeaderNames.length; ++i) {
    const key = wellknownHeaderNames[i];
    const lowerCasedKey = key.toLowerCase();
    headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey;
  }
  module.exports = {
    wellknownHeaderNames,
    headerNameLowerCasedRecord,
    getHeaderNameAsBuffer
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/tree.js
var require_tree = __commonJS((exports2, module) => {
  var {
    wellknownHeaderNames,
    headerNameLowerCasedRecord
  } = require_constants5();

  class TstNode {
    value = null;
    left = null;
    middle = null;
    right = null;
    code;
    constructor(key, value, index2) {
      if (index2 === undefined || index2 >= key.length) {
        throw new TypeError("Unreachable");
      }
      const code2 = this.code = key.charCodeAt(index2);
      if (code2 > 127) {
        throw new TypeError("key must be ascii string");
      }
      if (key.length !== ++index2) {
        this.middle = new TstNode(key, value, index2);
      } else {
        this.value = value;
      }
    }
    add(key, value) {
      const length2 = key.length;
      if (length2 === 0) {
        throw new TypeError("Unreachable");
      }
      let index2 = 0;
      let node3 = this;
      while (true) {
        const code2 = key.charCodeAt(index2);
        if (code2 > 127) {
          throw new TypeError("key must be ascii string");
        }
        if (node3.code === code2) {
          if (length2 === ++index2) {
            node3.value = value;
            break;
          } else if (node3.middle !== null) {
            node3 = node3.middle;
          } else {
            node3.middle = new TstNode(key, value, index2);
            break;
          }
        } else if (node3.code < code2) {
          if (node3.left !== null) {
            node3 = node3.left;
          } else {
            node3.left = new TstNode(key, value, index2);
            break;
          }
        } else if (node3.right !== null) {
          node3 = node3.right;
        } else {
          node3.right = new TstNode(key, value, index2);
          break;
        }
      }
    }
    search(key) {
      const keylength = key.length;
      let index2 = 0;
      let node3 = this;
      while (node3 !== null && index2 < keylength) {
        let code2 = key[index2];
        if (code2 <= 90 && code2 >= 65) {
          code2 |= 32;
        }
        while (node3 !== null) {
          if (code2 === node3.code) {
            if (keylength === ++index2) {
              return node3;
            }
            node3 = node3.middle;
            break;
          }
          node3 = node3.code < code2 ? node3.left : node3.right;
        }
      }
      return null;
    }
  }

  class TernarySearchTree {
    node = null;
    insert(key, value) {
      if (this.node === null) {
        this.node = new TstNode(key, value, 0);
      } else {
        this.node.add(key, value);
      }
    }
    lookup(key) {
      return this.node?.search(key)?.value ?? null;
    }
  }
  var tree = new TernarySearchTree;
  for (let i = 0;i < wellknownHeaderNames.length; ++i) {
    const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]];
    tree.insert(key, key);
  }
  module.exports = {
    TernarySearchTree,
    tree
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/util.js
var require_util3 = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols2();
  var { IncomingMessage } = __require("node:http");
  var stream2 = __require("node:stream");
  var net2 = __require("node:net");
  var { stringify: stringify2 } = __require("node:querystring");
  var { EventEmitter: EE } = __require("node:events");
  var timers = require_timers();
  var { InvalidArgumentError, ConnectTimeoutError } = require_errors8();
  var { headerNameLowerCasedRecord } = require_constants5();
  var { tree } = require_tree();
  var [nodeMajor, nodeMinor] = process.versions.node.split(".", 2).map((v5) => Number(v5));

  class BodyAsyncIterable {
    constructor(body2) {
      this[kBody] = body2;
      this[kBodyUsed] = false;
    }
    async* [Symbol.asyncIterator]() {
      assert2(!this[kBodyUsed], "disturbed");
      this[kBodyUsed] = true;
      yield* this[kBody];
    }
  }
  function noop2() {}
  function wrapRequestBody(body2) {
    if (isStream(body2)) {
      if (bodyLength(body2) === 0) {
        body2.on("data", function() {
          assert2(false);
        });
      }
      if (typeof body2.readableDidRead !== "boolean") {
        body2[kBodyUsed] = false;
        EE.prototype.on.call(body2, "data", function() {
          this[kBodyUsed] = true;
        });
      }
      return body2;
    } else if (body2 && typeof body2.pipeTo === "function") {
      return new BodyAsyncIterable(body2);
    } else if (body2 && isFormDataLike(body2)) {
      return body2;
    } else if (body2 && typeof body2 !== "string" && !ArrayBuffer.isView(body2) && isIterable(body2)) {
      return new BodyAsyncIterable(body2);
    } else {
      return body2;
    }
  }
  function isStream(obj) {
    return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function";
  }
  function isBlobLike(object2) {
    if (object2 === null) {
      return false;
    } else if (object2 instanceof Blob) {
      return true;
    } else if (typeof object2 !== "object") {
      return false;
    } else {
      const sTag = object2[Symbol.toStringTag];
      return (sTag === "Blob" || sTag === "File") && (("stream" in object2) && typeof object2.stream === "function" || ("arrayBuffer" in object2) && typeof object2.arrayBuffer === "function");
    }
  }
  function pathHasQueryOrFragment(url2) {
    return url2.includes("?") || url2.includes("#");
  }
  function serializePathWithQuery(url2, queryParams) {
    if (pathHasQueryOrFragment(url2)) {
      throw new Error('Query params cannot be passed when url already contains "?" or "#".');
    }
    const stringified = stringify2(queryParams);
    if (stringified) {
      url2 += "?" + stringified;
    }
    return url2;
  }
  function isValidPort(port) {
    const value = parseInt(port, 10);
    return value === Number(port) && value >= 0 && value <= 65535;
  }
  function isHttpOrHttpsPrefixed(value) {
    return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":");
  }
  function parseURL(url2) {
    if (typeof url2 === "string") {
      url2 = new URL(url2);
      if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
        throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
      }
      return url2;
    }
    if (!url2 || typeof url2 !== "object") {
      throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object.");
    }
    if (!(url2 instanceof URL)) {
      if (url2.port != null && url2.port !== "" && isValidPort(url2.port) === false) {
        throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer.");
      }
      if (url2.path != null && typeof url2.path !== "string") {
        throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined.");
      }
      if (url2.pathname != null && typeof url2.pathname !== "string") {
        throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined.");
      }
      if (url2.hostname != null && typeof url2.hostname !== "string") {
        throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined.");
      }
      if (url2.origin != null && typeof url2.origin !== "string") {
        throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined.");
      }
      if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
        throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
      }
      const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80;
      let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`;
      let path2 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
      if (origin[origin.length - 1] === "/") {
        origin = origin.slice(0, origin.length - 1);
      }
      if (path2 && path2[0] !== "/") {
        path2 = `/${path2}`;
      }
      return new URL(`${origin}${path2}`);
    }
    if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
      throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
    }
    return url2;
  }
  function parseOrigin(url2) {
    url2 = parseURL(url2);
    if (url2.pathname !== "/" || url2.search || url2.hash) {
      throw new InvalidArgumentError("invalid url");
    }
    return url2;
  }
  function getHostname(host) {
    if (host[0] === "[") {
      const idx2 = host.indexOf("]");
      assert2(idx2 !== -1);
      return host.substring(1, idx2);
    }
    const idx = host.indexOf(":");
    if (idx === -1)
      return host;
    return host.substring(0, idx);
  }
  function getServerName(host) {
    if (!host) {
      return null;
    }
    assert2(typeof host === "string");
    const servername = getHostname(host);
    if (net2.isIP(servername)) {
      return "";
    }
    return servername;
  }
  function deepClone(obj) {
    return JSON.parse(JSON.stringify(obj));
  }
  function isAsyncIterable(obj) {
    return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function");
  }
  function isIterable(obj) {
    return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function"));
  }
  function hasSafeIterator(obj) {
    const prototype = Object.getPrototypeOf(obj);
    const ownIterator = Object.prototype.hasOwnProperty.call(obj, Symbol.iterator);
    return ownIterator || prototype != null && prototype !== Object.prototype && typeof obj[Symbol.iterator] === "function";
  }
  function bodyLength(body2) {
    if (body2 == null) {
      return 0;
    } else if (isStream(body2)) {
      const state = body2._readableState;
      return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null;
    } else if (isBlobLike(body2)) {
      return body2.size != null ? body2.size : null;
    } else if (isBuffer(body2)) {
      return body2.byteLength;
    }
    return null;
  }
  function isDestroyed(body2) {
    return body2 && !!(body2.destroyed || body2[kDestroyed] || stream2.isDestroyed?.(body2));
  }
  function destroy(stream3, err) {
    if (stream3 == null || !isStream(stream3) || isDestroyed(stream3)) {
      return;
    }
    if (typeof stream3.destroy === "function") {
      if (Object.getPrototypeOf(stream3).constructor === IncomingMessage) {
        stream3.socket = null;
      }
      stream3.destroy(err);
    } else if (err) {
      queueMicrotask(() => {
        stream3.emit("error", err);
      });
    }
    if (stream3.destroyed !== true) {
      stream3[kDestroyed] = true;
    }
  }
  var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/;
  function parseKeepAliveTimeout(val) {
    const m2 = val.match(KEEPALIVE_TIMEOUT_EXPR);
    return m2 ? parseInt(m2[1], 10) * 1000 : null;
  }
  function headerNameToString(value) {
    return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase();
  }
  function bufferToLowerCasedHeaderName(value) {
    return tree.lookup(value) ?? value.toString("latin1").toLowerCase();
  }
  function parseHeaders(headers, obj) {
    if (obj === undefined)
      obj = {};
    for (let i = 0;i < headers.length; i += 2) {
      const key = headerNameToString(headers[i]);
      let val = obj[key];
      if (val !== undefined) {
        if (!Object.hasOwn(obj, key)) {
          const headersValue = typeof headers[i + 1] === "string" ? headers[i + 1] : Array.isArray(headers[i + 1]) ? headers[i + 1].map((x4) => x4.toString("latin1")) : headers[i + 1].toString("latin1");
          if (key === "__proto__") {
            Object.defineProperty(obj, key, {
              value: headersValue,
              enumerable: true,
              configurable: true,
              writable: true
            });
          } else {
            obj[key] = headersValue;
          }
        } else {
          if (typeof val === "string") {
            val = [val];
            obj[key] = val;
          }
          val.push(headers[i + 1].toString("latin1"));
        }
      } else {
        const headersValue = typeof headers[i + 1] === "string" ? headers[i + 1] : Array.isArray(headers[i + 1]) ? headers[i + 1].map((x4) => x4.toString("latin1")) : headers[i + 1].toString("latin1");
        obj[key] = headersValue;
      }
    }
    return obj;
  }
  function parseRawHeaders(headers) {
    const headersLength = headers.length;
    const ret = new Array(headersLength);
    let key;
    let val;
    for (let n3 = 0;n3 < headersLength; n3 += 2) {
      key = headers[n3];
      val = headers[n3 + 1];
      typeof key !== "string" && (key = key.toString());
      typeof val !== "string" && (val = val.toString("latin1"));
      ret[n3] = key;
      ret[n3 + 1] = val;
    }
    return ret;
  }
  function encodeRawHeaders(headers) {
    if (!Array.isArray(headers)) {
      throw new TypeError("expected headers to be an array");
    }
    return headers.map((x4) => Buffer.from(x4));
  }
  function isBuffer(buffer) {
    return buffer instanceof Uint8Array || Buffer.isBuffer(buffer);
  }
  function assertRequestHandler(handler, method, upgrade) {
    if (!handler || typeof handler !== "object") {
      throw new InvalidArgumentError("handler must be an object");
    }
    if (typeof handler.onRequestStart === "function") {
      return;
    }
    if (typeof handler.onConnect !== "function") {
      throw new InvalidArgumentError("invalid onConnect method");
    }
    if (typeof handler.onError !== "function") {
      throw new InvalidArgumentError("invalid onError method");
    }
    if (typeof handler.onBodySent !== "function" && handler.onBodySent !== undefined) {
      throw new InvalidArgumentError("invalid onBodySent method");
    }
    if (upgrade || method === "CONNECT") {
      if (typeof handler.onUpgrade !== "function") {
        throw new InvalidArgumentError("invalid onUpgrade method");
      }
    } else {
      if (typeof handler.onHeaders !== "function") {
        throw new InvalidArgumentError("invalid onHeaders method");
      }
      if (typeof handler.onData !== "function") {
        throw new InvalidArgumentError("invalid onData method");
      }
      if (typeof handler.onComplete !== "function") {
        throw new InvalidArgumentError("invalid onComplete method");
      }
    }
  }
  function isDisturbed(body2) {
    return !!(body2 && (stream2.isDisturbed(body2) || body2[kBodyUsed]));
  }
  function getSocketInfo(socket) {
    return {
      localAddress: socket.localAddress,
      localPort: socket.localPort,
      remoteAddress: socket.remoteAddress,
      remotePort: socket.remotePort,
      remoteFamily: socket.remoteFamily,
      timeout: socket.timeout,
      bytesWritten: socket.bytesWritten,
      bytesRead: socket.bytesRead
    };
  }
  function ReadableStreamFrom(iterable) {
    let iterator;
    return new ReadableStream({
      start() {
        iterator = iterable[Symbol.asyncIterator]();
      },
      pull(controller) {
        return iterator.next().then(({ done, value }) => {
          if (done) {
            return queueMicrotask(() => {
              controller.close();
              controller.byobRequest?.respond(0);
            });
          } else {
            const buf = Buffer.isBuffer(value) ? value : Buffer.from(value);
            if (buf.byteLength) {
              return controller.enqueue(new Uint8Array(buf));
            } else {
              return this.pull(controller);
            }
          }
        });
      },
      cancel() {
        return iterator.return();
      },
      type: "bytes"
    });
  }
  function isFormDataLike(object2) {
    return object2 && typeof object2 === "object" && typeof object2.append === "function" && typeof object2.delete === "function" && typeof object2.get === "function" && typeof object2.getAll === "function" && typeof object2.has === "function" && typeof object2.set === "function" && object2[Symbol.toStringTag] === "FormData";
  }
  function addAbortListener(signal, listener) {
    if ("addEventListener" in signal) {
      signal.addEventListener("abort", listener, { once: true });
      return () => signal.removeEventListener("abort", listener);
    }
    signal.once("abort", listener);
    return () => signal.removeListener("abort", listener);
  }
  var validTokenChars = new Uint8Array([
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    1,
    1,
    0,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    1,
    0,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
  ]);
  function isTokenCharCode(c3) {
    return validTokenChars[c3] === 1;
  }
  var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;
  function isValidHTTPToken(characters) {
    if (characters.length >= 12)
      return tokenRegExp.test(characters);
    if (characters.length === 0)
      return false;
    for (let i = 0;i < characters.length; i++) {
      if (validTokenChars[characters.charCodeAt(i)] !== 1) {
        return false;
      }
    }
    return true;
  }
  var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
  function isValidHeaderValue(characters) {
    return !headerCharRegex.test(characters);
  }
  var rangeHeaderRegex = /^bytes (\d+)-(\d+)\/(\d+)?$/;
  function parseRangeHeader(range) {
    if (range == null || range === "")
      return { start: 0, end: null, size: null };
    const m2 = range ? range.match(rangeHeaderRegex) : null;
    return m2 ? {
      start: parseInt(m2[1]),
      end: m2[2] ? parseInt(m2[2]) : null,
      size: m2[3] ? parseInt(m2[3]) : null
    } : null;
  }
  function addListener(obj, name3, listener) {
    const listeners = obj[kListeners] ??= [];
    listeners.push([name3, listener]);
    obj.on(name3, listener);
    return obj;
  }
  function removeAllListeners(obj) {
    if (obj[kListeners] != null) {
      for (const [name3, listener] of obj[kListeners]) {
        obj.removeListener(name3, listener);
      }
      obj[kListeners] = null;
    }
    return obj;
  }
  function errorRequest(client, request2, err) {
    try {
      request2.onError(err);
      assert2(request2.aborted);
    } catch (err2) {
      client.emit("error", err2);
    }
  }
  var setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => {
    if (!opts.timeout) {
      return noop2;
    }
    let s1 = null;
    let s22 = null;
    const fastTimer = timers.setFastTimeout(() => {
      s1 = setImmediate(() => {
        s22 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts));
      });
    }, opts.timeout);
    return () => {
      timers.clearFastTimeout(fastTimer);
      clearImmediate(s1);
      clearImmediate(s22);
    };
  } : (socketWeakRef, opts) => {
    if (!opts.timeout) {
      return noop2;
    }
    let s1 = null;
    const fastTimer = timers.setFastTimeout(() => {
      s1 = setImmediate(() => {
        onConnectTimeout(socketWeakRef.deref(), opts);
      });
    }, opts.timeout);
    return () => {
      timers.clearFastTimeout(fastTimer);
      clearImmediate(s1);
    };
  };
  function onConnectTimeout(socket, opts) {
    if (socket == null) {
      return;
    }
    let message2 = "Connect Timeout Error";
    if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) {
      message2 += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`;
    } else {
      message2 += ` (attempted address: ${opts.hostname}:${opts.port},`;
    }
    message2 += ` timeout: ${opts.timeout}ms)`;
    destroy(socket, new ConnectTimeoutError(message2));
  }
  function getProtocolFromUrlString(urlString) {
    if (urlString[0] === "h" && urlString[1] === "t" && urlString[2] === "t" && urlString[3] === "p") {
      switch (urlString[4]) {
        case ":":
          return "http:";
        case "s":
          if (urlString[5] === ":") {
            return "https:";
          }
      }
    }
    return urlString.slice(0, urlString.indexOf(":") + 1);
  }
  var kEnumerableProperty = Object.create(null);
  kEnumerableProperty.enumerable = true;
  var normalizedMethodRecordsBase = {
    delete: "DELETE",
    DELETE: "DELETE",
    get: "GET",
    GET: "GET",
    head: "HEAD",
    HEAD: "HEAD",
    options: "OPTIONS",
    OPTIONS: "OPTIONS",
    post: "POST",
    POST: "POST",
    put: "PUT",
    PUT: "PUT"
  };
  var normalizedMethodRecords = {
    ...normalizedMethodRecordsBase,
    patch: "patch",
    PATCH: "PATCH"
  };
  Object.setPrototypeOf(normalizedMethodRecordsBase, null);
  Object.setPrototypeOf(normalizedMethodRecords, null);
  module.exports = {
    kEnumerableProperty,
    isDisturbed,
    isBlobLike,
    parseOrigin,
    parseURL,
    getServerName,
    isStream,
    isIterable,
    hasSafeIterator,
    isAsyncIterable,
    isDestroyed,
    headerNameToString,
    bufferToLowerCasedHeaderName,
    addListener,
    removeAllListeners,
    errorRequest,
    parseRawHeaders,
    encodeRawHeaders,
    parseHeaders,
    parseKeepAliveTimeout,
    destroy,
    bodyLength,
    deepClone,
    ReadableStreamFrom,
    isBuffer,
    assertRequestHandler,
    getSocketInfo,
    isFormDataLike,
    pathHasQueryOrFragment,
    serializePathWithQuery,
    addAbortListener,
    isValidHTTPToken,
    isValidHeaderValue,
    isTokenCharCode,
    parseRangeHeader,
    normalizedMethodRecordsBase,
    normalizedMethodRecords,
    isValidPort,
    isHttpOrHttpsPrefixed,
    nodeMajor,
    nodeMinor,
    safeHTTPMethods: Object.freeze(["GET", "HEAD", "OPTIONS", "TRACE"]),
    wrapRequestBody,
    setupConnectTimeout,
    getProtocolFromUrlString
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/util/stats.js
var require_stats = __commonJS((exports2, module) => {
  var {
    kConnected,
    kPending,
    kRunning,
    kSize,
    kFree,
    kQueued
  } = require_symbols2();

  class ClientStats {
    constructor(client) {
      this.connected = client[kConnected];
      this.pending = client[kPending];
      this.running = client[kRunning];
      this.size = client[kSize];
    }
  }

  class PoolStats {
    constructor(pool2) {
      this.connected = pool2[kConnected];
      this.free = pool2[kFree];
      this.pending = pool2[kPending];
      this.queued = pool2[kQueued];
      this.running = pool2[kRunning];
      this.size = pool2[kSize];
    }
  }
  module.exports = { ClientStats, PoolStats };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/diagnostics.js
var require_diagnostics = __commonJS((exports2, module) => {
  var diagnosticsChannel2 = __require("node:diagnostics_channel");
  var util3 = __require("node:util");
  var undiciDebugLog = util3.debuglog("undici");
  var fetchDebuglog = util3.debuglog("fetch");
  var websocketDebuglog = util3.debuglog("websocket");
  var channels = {
    beforeConnect: diagnosticsChannel2.channel("undici:client:beforeConnect"),
    connected: diagnosticsChannel2.channel("undici:client:connected"),
    connectError: diagnosticsChannel2.channel("undici:client:connectError"),
    sendHeaders: diagnosticsChannel2.channel("undici:client:sendHeaders"),
    create: diagnosticsChannel2.channel("undici:request:create"),
    bodySent: diagnosticsChannel2.channel("undici:request:bodySent"),
    bodyChunkSent: diagnosticsChannel2.channel("undici:request:bodyChunkSent"),
    bodyChunkReceived: diagnosticsChannel2.channel("undici:request:bodyChunkReceived"),
    headers: diagnosticsChannel2.channel("undici:request:headers"),
    trailers: diagnosticsChannel2.channel("undici:request:trailers"),
    error: diagnosticsChannel2.channel("undici:request:error"),
    open: diagnosticsChannel2.channel("undici:websocket:open"),
    close: diagnosticsChannel2.channel("undici:websocket:close"),
    socketError: diagnosticsChannel2.channel("undici:websocket:socket_error"),
    ping: diagnosticsChannel2.channel("undici:websocket:ping"),
    pong: diagnosticsChannel2.channel("undici:websocket:pong"),
    proxyConnected: diagnosticsChannel2.channel("undici:proxy:connected")
  };
  var isTrackingClientEvents = false;
  function trackClientEvents(debugLog3 = undiciDebugLog) {
    if (isTrackingClientEvents) {
      return;
    }
    if (channels.beforeConnect.hasSubscribers || channels.connected.hasSubscribers || channels.connectError.hasSubscribers || channels.sendHeaders.hasSubscribers) {
      isTrackingClientEvents = true;
      return;
    }
    isTrackingClientEvents = true;
    diagnosticsChannel2.subscribe("undici:client:beforeConnect", (evt) => {
      const {
        connectParams: { version: version5, protocol, port, host }
      } = evt;
      debugLog3("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version5);
    });
    diagnosticsChannel2.subscribe("undici:client:connected", (evt) => {
      const {
        connectParams: { version: version5, protocol, port, host }
      } = evt;
      debugLog3("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version5);
    });
    diagnosticsChannel2.subscribe("undici:client:connectError", (evt) => {
      const {
        connectParams: { version: version5, protocol, port, host },
        error: error49
      } = evt;
      debugLog3("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version5, error49.message);
    });
    diagnosticsChannel2.subscribe("undici:client:sendHeaders", (evt) => {
      const {
        request: { method, path: path2, origin }
      } = evt;
      debugLog3("sending request to %s %s%s", method, origin, path2);
    });
  }
  var isTrackingRequestEvents = false;
  function trackRequestEvents(debugLog3 = undiciDebugLog) {
    if (isTrackingRequestEvents) {
      return;
    }
    if (channels.headers.hasSubscribers || channels.trailers.hasSubscribers || channels.error.hasSubscribers) {
      isTrackingRequestEvents = true;
      return;
    }
    isTrackingRequestEvents = true;
    diagnosticsChannel2.subscribe("undici:request:headers", (evt) => {
      const {
        request: { method, path: path2, origin },
        response: { statusCode }
      } = evt;
      debugLog3("received response to %s %s%s - HTTP %d", method, origin, path2, statusCode);
    });
    diagnosticsChannel2.subscribe("undici:request:trailers", (evt) => {
      const {
        request: { method, path: path2, origin }
      } = evt;
      debugLog3("trailers received from %s %s%s", method, origin, path2);
    });
    diagnosticsChannel2.subscribe("undici:request:error", (evt) => {
      const {
        request: { method, path: path2, origin },
        error: error49
      } = evt;
      debugLog3("request to %s %s%s errored - %s", method, origin, path2, error49.message);
    });
  }
  var isTrackingWebSocketEvents = false;
  function trackWebSocketEvents(debugLog3 = websocketDebuglog) {
    if (isTrackingWebSocketEvents) {
      return;
    }
    if (channels.open.hasSubscribers || channels.close.hasSubscribers || channels.socketError.hasSubscribers || channels.ping.hasSubscribers || channels.pong.hasSubscribers) {
      isTrackingWebSocketEvents = true;
      return;
    }
    isTrackingWebSocketEvents = true;
    diagnosticsChannel2.subscribe("undici:websocket:open", (evt) => {
      if (evt.address != null) {
        const { address, port } = evt.address;
        debugLog3("connection opened %s%s", address, port ? `:${port}` : "");
      } else {
        debugLog3("connection opened");
      }
    });
    diagnosticsChannel2.subscribe("undici:websocket:close", (evt) => {
      const { websocket, code: code2, reason } = evt;
      debugLog3("closed connection to %s - %s %s", websocket.url, code2, reason);
    });
    diagnosticsChannel2.subscribe("undici:websocket:socket_error", (err) => {
      debugLog3("connection errored - %s", err.message);
    });
    diagnosticsChannel2.subscribe("undici:websocket:ping", (evt) => {
      debugLog3("ping received");
    });
    diagnosticsChannel2.subscribe("undici:websocket:pong", (evt) => {
      debugLog3("pong received");
    });
  }
  if (undiciDebugLog.enabled || fetchDebuglog.enabled) {
    trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog);
    trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog);
  }
  if (websocketDebuglog.enabled) {
    trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog);
    trackWebSocketEvents(websocketDebuglog);
  }
  module.exports = {
    channels
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/request.js
var require_request = __commonJS((exports2, module) => {
  var {
    InvalidArgumentError,
    NotSupportedError
  } = require_errors8();
  var assert2 = __require("node:assert");
  var {
    isValidHTTPToken,
    isValidHeaderValue,
    isStream,
    destroy,
    isBuffer,
    isFormDataLike,
    isIterable,
    hasSafeIterator,
    isBlobLike,
    serializePathWithQuery,
    assertRequestHandler,
    getServerName,
    normalizedMethodRecords,
    getProtocolFromUrlString
  } = require_util3();
  var { channels } = require_diagnostics();
  var { headerNameLowerCasedRecord } = require_constants5();
  var invalidPathRegex = /[^\u0021-\u00ff]/;
  function isValidContentLengthHeaderValue(val) {
    if (typeof val !== "string" || val.length === 0) {
      return false;
    }
    for (let i = 0;i < val.length; i++) {
      const charCode = val.charCodeAt(i);
      if (charCode < 48 || charCode > 57) {
        return false;
      }
    }
    return true;
  }
  var kHandler = Symbol("handler");

  class Request2 {
    constructor(origin, {
      path: path2,
      method,
      body: body2,
      headers,
      query,
      idempotent,
      blocking,
      upgrade,
      headersTimeout,
      bodyTimeout,
      reset,
      expectContinue,
      servername,
      throwOnError,
      maxRedirections,
      typeOfService
    }, handler) {
      if (typeof path2 !== "string") {
        throw new InvalidArgumentError("path must be a string");
      } else if (path2[0] !== "/" && !(path2.startsWith("http://") || path2.startsWith("https://")) && method !== "CONNECT") {
        throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
      } else if (invalidPathRegex.test(path2)) {
        throw new InvalidArgumentError("invalid request path");
      }
      if (typeof method !== "string") {
        throw new InvalidArgumentError("method must be a string");
      } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) {
        throw new InvalidArgumentError("invalid request method");
      }
      if (upgrade && typeof upgrade !== "string") {
        throw new InvalidArgumentError("upgrade must be a string");
      }
      if (upgrade && !isValidHeaderValue(upgrade)) {
        throw new InvalidArgumentError("invalid upgrade header");
      }
      if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {
        throw new InvalidArgumentError("invalid headersTimeout");
      }
      if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {
        throw new InvalidArgumentError("invalid bodyTimeout");
      }
      if (reset != null && typeof reset !== "boolean") {
        throw new InvalidArgumentError("invalid reset");
      }
      if (expectContinue != null && typeof expectContinue !== "boolean") {
        throw new InvalidArgumentError("invalid expectContinue");
      }
      if (throwOnError != null) {
        throw new InvalidArgumentError("invalid throwOnError");
      }
      if (maxRedirections != null && maxRedirections !== 0) {
        throw new InvalidArgumentError("maxRedirections is not supported, use the redirect interceptor");
      }
      if (typeOfService != null && (!Number.isInteger(typeOfService) || typeOfService < 0 || typeOfService > 255)) {
        throw new InvalidArgumentError("typeOfService must be an integer between 0 and 255");
      }
      this.headersTimeout = headersTimeout;
      this.bodyTimeout = bodyTimeout;
      this.method = method;
      this.typeOfService = typeOfService ?? 0;
      this.abort = null;
      if (body2 == null) {
        this.body = null;
      } else if (isStream(body2)) {
        this.body = body2;
        const rState = this.body._readableState;
        if (!rState || !rState.autoDestroy) {
          this.endHandler = function autoDestroy() {
            destroy(this);
          };
          this.body.on("end", this.endHandler);
        }
        this.errorHandler = (err) => {
          if (this.abort) {
            this.abort(err);
          } else {
            this.error = err;
          }
        };
        this.body.on("error", this.errorHandler);
      } else if (isBuffer(body2)) {
        this.body = body2.byteLength ? body2 : null;
      } else if (ArrayBuffer.isView(body2)) {
        this.body = body2.buffer.byteLength ? Buffer.from(body2.buffer, body2.byteOffset, body2.byteLength) : null;
      } else if (body2 instanceof ArrayBuffer) {
        this.body = body2.byteLength ? Buffer.from(body2) : null;
      } else if (typeof body2 === "string") {
        this.body = body2.length ? Buffer.from(body2) : null;
      } else if (isFormDataLike(body2) || isIterable(body2) || isBlobLike(body2)) {
        this.body = body2;
      } else {
        throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");
      }
      this.completed = false;
      this.aborted = false;
      this.upgrade = upgrade || null;
      this.path = query ? serializePathWithQuery(path2, query) : path2;
      this.origin = origin;
      this.protocol = getProtocolFromUrlString(origin);
      this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
      this.blocking = blocking ?? this.method !== "HEAD";
      this.reset = reset == null ? null : reset;
      this.host = null;
      this.contentLength = null;
      this.contentType = null;
      this.headers = [];
      this.expectContinue = expectContinue != null ? expectContinue : false;
      if (Array.isArray(headers)) {
        if (headers.length % 2 !== 0) {
          throw new InvalidArgumentError("headers array must be even");
        }
        for (let i = 0;i < headers.length; i += 2) {
          processHeader(this, headers[i], headers[i + 1]);
        }
      } else if (headers && typeof headers === "object") {
        if (hasSafeIterator(headers)) {
          for (const header of headers) {
            if (!Array.isArray(header) || header.length !== 2) {
              throw new InvalidArgumentError("headers must be in key-value pair format");
            }
            processHeader(this, header[0], header[1]);
          }
        } else {
          const keys = Object.keys(headers);
          for (let i = 0;i < keys.length; ++i) {
            processHeader(this, keys[i], headers[keys[i]]);
          }
        }
      } else if (headers != null) {
        throw new InvalidArgumentError("headers must be an object or an array");
      }
      assertRequestHandler(handler, method, upgrade);
      this.servername = servername || getServerName(this.host) || null;
      this[kHandler] = handler;
      if (channels.create.hasSubscribers) {
        channels.create.publish({ request: this });
      }
    }
    onBodySent(chunk) {
      if (channels.bodyChunkSent.hasSubscribers) {
        channels.bodyChunkSent.publish({ request: this, chunk });
      }
      if (this[kHandler].onBodySent) {
        try {
          return this[kHandler].onBodySent(chunk);
        } catch (err) {
          this.abort(err);
        }
      }
    }
    onRequestSent() {
      if (channels.bodySent.hasSubscribers) {
        channels.bodySent.publish({ request: this });
      }
      if (this[kHandler].onRequestSent) {
        try {
          return this[kHandler].onRequestSent();
        } catch (err) {
          this.abort(err);
        }
      }
    }
    onConnect(abort) {
      assert2(!this.aborted);
      assert2(!this.completed);
      if (this.error) {
        abort(this.error);
      } else {
        this.abort = abort;
        return this[kHandler].onConnect(abort);
      }
    }
    onResponseStarted() {
      return this[kHandler].onResponseStarted?.();
    }
    onHeaders(statusCode, headers, resume2, statusText) {
      assert2(!this.aborted);
      assert2(!this.completed);
      if (channels.headers.hasSubscribers) {
        channels.headers.publish({ request: this, response: { statusCode, headers, statusText } });
      }
      try {
        return this[kHandler].onHeaders(statusCode, headers, resume2, statusText);
      } catch (err) {
        this.abort(err);
      }
    }
    onData(chunk) {
      assert2(!this.aborted);
      assert2(!this.completed);
      if (channels.bodyChunkReceived.hasSubscribers) {
        channels.bodyChunkReceived.publish({ request: this, chunk });
      }
      try {
        return this[kHandler].onData(chunk);
      } catch (err) {
        this.abort(err);
        return false;
      }
    }
    onUpgrade(statusCode, headers, socket) {
      assert2(!this.aborted);
      assert2(!this.completed);
      return this[kHandler].onUpgrade(statusCode, headers, socket);
    }
    onComplete(trailers) {
      this.onFinally();
      assert2(!this.aborted);
      assert2(!this.completed);
      this.completed = true;
      if (channels.trailers.hasSubscribers) {
        channels.trailers.publish({ request: this, trailers });
      }
      try {
        return this[kHandler].onComplete(trailers);
      } catch (err) {
        this.onError(err);
      }
    }
    onError(error49) {
      this.onFinally();
      if (channels.error.hasSubscribers) {
        channels.error.publish({ request: this, error: error49 });
      }
      if (this.aborted) {
        return;
      }
      this.aborted = true;
      return this[kHandler].onError(error49);
    }
    onFinally() {
      if (this.errorHandler) {
        this.body.off("error", this.errorHandler);
        this.errorHandler = null;
      }
      if (this.endHandler) {
        this.body.off("end", this.endHandler);
        this.endHandler = null;
      }
    }
    addHeader(key, value) {
      processHeader(this, key, value);
      return this;
    }
  }
  function processHeader(request2, key, val) {
    if (val && (typeof val === "object" && !Array.isArray(val))) {
      throw new InvalidArgumentError(`invalid ${key} header`);
    } else if (val === undefined) {
      return;
    }
    let headerName = headerNameLowerCasedRecord[key];
    if (headerName === undefined) {
      headerName = key.toLowerCase();
      if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) {
        throw new InvalidArgumentError("invalid header key");
      }
    }
    if (Array.isArray(val)) {
      const arr = [];
      for (let i = 0;i < val.length; i++) {
        if (typeof val[i] === "string") {
          if (!isValidHeaderValue(val[i])) {
            throw new InvalidArgumentError(`invalid ${key} header`);
          }
          arr.push(val[i]);
        } else if (val[i] === null) {
          arr.push("");
        } else if (typeof val[i] === "object") {
          throw new InvalidArgumentError(`invalid ${key} header`);
        } else {
          arr.push(`${val[i]}`);
        }
      }
      val = arr;
    } else if (typeof val === "string") {
      if (!isValidHeaderValue(val)) {
        throw new InvalidArgumentError(`invalid ${key} header`);
      }
    } else if (val === null) {
      val = "";
    } else {
      val = `${val}`;
    }
    if (headerName === "host") {
      if (request2.host !== null) {
        throw new InvalidArgumentError("duplicate host header");
      }
      if (typeof val !== "string") {
        throw new InvalidArgumentError("invalid host header");
      }
      request2.host = val;
    } else if (headerName === "content-length") {
      if (request2.contentLength !== null) {
        throw new InvalidArgumentError("duplicate content-length header");
      }
      if (!isValidContentLengthHeaderValue(val)) {
        throw new InvalidArgumentError("invalid content-length header");
      }
      request2.contentLength = parseInt(val, 10);
    } else if (request2.contentType === null && headerName === "content-type") {
      request2.contentType = val;
      request2.headers.push(key, val);
    } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") {
      throw new InvalidArgumentError(`invalid ${headerName} header`);
    } else if (headerName === "connection") {
      const value = typeof val === "string" ? val : null;
      if (value === null) {
        throw new InvalidArgumentError("invalid connection header");
      }
      for (const token2 of value.toLowerCase().split(",")) {
        const trimmed = token2.trim();
        if (!isValidHTTPToken(trimmed)) {
          throw new InvalidArgumentError("invalid connection header");
        }
        if (trimmed === "close") {
          request2.reset = true;
        }
      }
    } else if (headerName === "expect") {
      throw new NotSupportedError("expect header not supported");
    } else {
      request2.headers.push(key, val);
    }
  }
  module.exports = Request2;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/wrap-handler.js
var require_wrap_handler = __commonJS((exports2, module) => {
  var { InvalidArgumentError } = require_errors8();
  module.exports = class WrapHandler {
    #handler;
    constructor(handler) {
      this.#handler = handler;
    }
    static wrap(handler) {
      return handler.onRequestStart ? handler : new WrapHandler(handler);
    }
    onConnect(abort, context10) {
      return this.#handler.onConnect?.(abort, context10);
    }
    onResponseStarted() {
      return this.#handler.onResponseStarted?.();
    }
    onHeaders(statusCode, rawHeaders, resume2, statusMessage) {
      return this.#handler.onHeaders?.(statusCode, rawHeaders, resume2, statusMessage);
    }
    onUpgrade(statusCode, rawHeaders, socket) {
      return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket);
    }
    onData(data) {
      return this.#handler.onData?.(data);
    }
    onComplete(trailers) {
      return this.#handler.onComplete?.(trailers);
    }
    onError(err) {
      if (!this.#handler.onError) {
        throw err;
      }
      return this.#handler.onError?.(err);
    }
    onRequestStart(controller, context10) {
      this.#handler.onConnect?.((reason) => controller.abort(reason), context10);
    }
    onRequestUpgrade(controller, statusCode, headers, socket) {
      const rawHeaders = [];
      for (const [key, val] of Object.entries(headers)) {
        rawHeaders.push(Buffer.from(key, "latin1"), toRawHeaderValue(val));
      }
      this.#handler.onUpgrade?.(statusCode, rawHeaders, socket);
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      const rawHeaders = [];
      for (const [key, val] of Object.entries(headers)) {
        rawHeaders.push(Buffer.from(key, "latin1"), toRawHeaderValue(val));
      }
      if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) {
        controller.pause();
      }
    }
    onResponseData(controller, data) {
      if (this.#handler.onData?.(data) === false) {
        controller.pause();
      }
    }
    onResponseEnd(controller, trailers) {
      const rawTrailers = [];
      for (const [key, val] of Object.entries(trailers)) {
        rawTrailers.push(Buffer.from(key, "latin1"), toRawHeaderValue(val));
      }
      this.#handler.onComplete?.(rawTrailers);
    }
    onResponseError(controller, err) {
      if (!this.#handler.onError) {
        throw new InvalidArgumentError("invalid onError method");
      }
      this.#handler.onError?.(err);
    }
  };
  function toRawHeaderValue(value) {
    return Array.isArray(value) ? value.map((item) => Buffer.from(item, "latin1")) : Buffer.from(value, "latin1");
  }
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/dispatcher.js
var require_dispatcher = __commonJS((exports2, module) => {
  var EventEmitter = __require("node:events");
  var WrapHandler = require_wrap_handler();
  var wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler));

  class Dispatcher extends EventEmitter {
    dispatch() {
      throw new Error("not implemented");
    }
    close() {
      throw new Error("not implemented");
    }
    destroy() {
      throw new Error("not implemented");
    }
    compose(...args) {
      const interceptors = Array.isArray(args[0]) ? args[0] : args;
      let dispatch = this.dispatch.bind(this);
      for (const interceptor of interceptors) {
        if (interceptor == null) {
          continue;
        }
        if (typeof interceptor !== "function") {
          throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`);
        }
        dispatch = interceptor(dispatch);
        dispatch = wrapInterceptor(dispatch);
        if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) {
          throw new TypeError("invalid interceptor");
        }
      }
      return new Proxy(this, {
        get: (target, key) => key === "dispatch" ? dispatch : target[key]
      });
    }
  }
  module.exports = Dispatcher;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/unwrap-handler.js
var require_unwrap_handler = __commonJS((exports2, module) => {
  var { parseHeaders } = require_util3();
  var { InvalidArgumentError } = require_errors8();
  var kResume = Symbol("resume");

  class UnwrapController {
    #paused = false;
    #reason = null;
    #aborted = false;
    #abort;
    [kResume] = null;
    rawHeaders = null;
    rawTrailers = null;
    constructor(abort) {
      this.#abort = abort;
    }
    pause() {
      this.#paused = true;
    }
    resume() {
      if (this.#paused) {
        this.#paused = false;
        this[kResume]?.();
      }
    }
    abort(reason) {
      if (!this.#aborted) {
        this.#aborted = true;
        this.#reason = reason;
        this.#abort(reason);
      }
    }
    get aborted() {
      return this.#aborted;
    }
    get reason() {
      return this.#reason;
    }
    get paused() {
      return this.#paused;
    }
  }
  module.exports = class UnwrapHandler {
    #handler;
    #controller;
    constructor(handler) {
      this.#handler = handler;
    }
    static unwrap(handler) {
      return !handler.onRequestStart ? handler : new UnwrapHandler(handler);
    }
    onConnect(abort, context10) {
      this.#controller = new UnwrapController(abort);
      this.#handler.onRequestStart?.(this.#controller, context10);
    }
    onResponseStarted() {
      return this.#handler.onResponseStarted?.();
    }
    onUpgrade(statusCode, rawHeaders, socket) {
      this.#controller.rawHeaders = rawHeaders;
      this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket);
    }
    onHeaders(statusCode, rawHeaders, resume2, statusMessage) {
      this.#controller[kResume] = resume2;
      this.#controller.rawHeaders = rawHeaders;
      this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage);
      return !this.#controller.paused;
    }
    onData(data) {
      this.#handler.onResponseData?.(this.#controller, data);
      return !this.#controller.paused;
    }
    onComplete(rawTrailers) {
      this.#controller.rawTrailers = rawTrailers;
      this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers));
    }
    onError(err) {
      if (!this.#handler.onResponseError) {
        throw new InvalidArgumentError("invalid onError method");
      }
      this.#handler.onResponseError?.(this.#controller, err);
    }
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/dispatcher-base.js
var require_dispatcher_base = __commonJS((exports2, module) => {
  var Dispatcher = require_dispatcher();
  var UnwrapHandler = require_unwrap_handler();
  var {
    ClientDestroyedError,
    ClientClosedError,
    InvalidArgumentError
  } = require_errors8();
  var { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require_symbols2();
  var kOnDestroyed = Symbol("onDestroyed");
  var kOnClosed = Symbol("onClosed");
  var kWebSocketOptions = Symbol("webSocketOptions");

  class DispatcherBase extends Dispatcher {
    [kDestroyed] = false;
    [kOnDestroyed] = null;
    [kClosed] = false;
    [kOnClosed] = null;
    constructor(opts) {
      super();
      this[kWebSocketOptions] = opts?.webSocket ?? {};
    }
    get webSocketOptions() {
      return {
        maxFragments: this[kWebSocketOptions].maxFragments ?? 131072,
        maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
      };
    }
    get destroyed() {
      return this[kDestroyed];
    }
    get closed() {
      return this[kClosed];
    }
    close(callback) {
      if (callback === undefined) {
        return new Promise((resolve3, reject) => {
          this.close((err, data) => {
            return err ? reject(err) : resolve3(data);
          });
        });
      }
      if (typeof callback !== "function") {
        throw new InvalidArgumentError("invalid callback");
      }
      if (this[kDestroyed]) {
        const err = new ClientDestroyedError;
        queueMicrotask(() => callback(err, null));
        return;
      }
      if (this[kClosed]) {
        if (this[kOnClosed]) {
          this[kOnClosed].push(callback);
        } else {
          queueMicrotask(() => callback(null, null));
        }
        return;
      }
      this[kClosed] = true;
      this[kOnClosed] ??= [];
      this[kOnClosed].push(callback);
      const onClosed = () => {
        const callbacks = this[kOnClosed];
        this[kOnClosed] = null;
        for (let i = 0;i < callbacks.length; i++) {
          callbacks[i](null, null);
        }
      };
      this[kClose]().then(() => this.destroy()).then(() => queueMicrotask(onClosed));
    }
    destroy(err, callback) {
      if (typeof err === "function") {
        callback = err;
        err = null;
      }
      if (callback === undefined) {
        return new Promise((resolve3, reject) => {
          this.destroy(err, (err2, data) => {
            return err2 ? reject(err2) : resolve3(data);
          });
        });
      }
      if (typeof callback !== "function") {
        throw new InvalidArgumentError("invalid callback");
      }
      if (this[kDestroyed]) {
        if (this[kOnDestroyed]) {
          this[kOnDestroyed].push(callback);
        } else {
          queueMicrotask(() => callback(null, null));
        }
        return;
      }
      if (!err) {
        err = new ClientDestroyedError;
      }
      this[kDestroyed] = true;
      this[kOnDestroyed] ??= [];
      this[kOnDestroyed].push(callback);
      const onDestroyed = () => {
        const callbacks = this[kOnDestroyed];
        this[kOnDestroyed] = null;
        for (let i = 0;i < callbacks.length; i++) {
          callbacks[i](null, null);
        }
      };
      this[kDestroy](err).then(() => queueMicrotask(onDestroyed));
    }
    dispatch(opts, handler) {
      if (!handler || typeof handler !== "object") {
        throw new InvalidArgumentError("handler must be an object");
      }
      handler = UnwrapHandler.unwrap(handler);
      try {
        if (!opts || typeof opts !== "object") {
          throw new InvalidArgumentError("opts must be an object.");
        }
        if (this[kDestroyed] || this[kOnDestroyed]) {
          throw new ClientDestroyedError;
        }
        if (this[kClosed]) {
          throw new ClientClosedError;
        }
        return this[kDispatch](opts, handler);
      } catch (err) {
        if (typeof handler.onError !== "function") {
          throw err;
        }
        handler.onError(err);
        return false;
      }
    }
  }
  module.exports = DispatcherBase;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/connect.js
var require_connect = __commonJS((exports2, module) => {
  var net2 = __require("node:net");
  var assert2 = __require("node:assert");
  var util3 = require_util3();
  var { InvalidArgumentError } = require_errors8();
  var tls2;
  var SessionCache = class WeakSessionCache {
    constructor(maxCachedSessions) {
      this._maxCachedSessions = maxCachedSessions;
      this._sessionCache = new Map;
      this._sessionRegistry = new FinalizationRegistry((key) => {
        if (this._sessionCache.size < this._maxCachedSessions) {
          return;
        }
        const ref = this._sessionCache.get(key);
        if (ref !== undefined && ref.deref() === undefined) {
          this._sessionCache.delete(key);
        }
      });
    }
    get(sessionKey) {
      const ref = this._sessionCache.get(sessionKey);
      return ref ? ref.deref() : null;
    }
    set(sessionKey, session2) {
      if (this._maxCachedSessions === 0) {
        return;
      }
      if (this._sessionCache.has(sessionKey)) {
        this._sessionCache.delete(sessionKey);
      } else if (this._sessionCache.size >= this._maxCachedSessions) {
        for (const [key, ref] of this._sessionCache) {
          if (ref.deref() === undefined) {
            this._sessionCache.delete(key);
            return;
          }
        }
        const oldest = this._sessionCache.keys().next();
        if (!oldest.done) {
          this._sessionCache.delete(oldest.value);
        }
      }
      this._sessionCache.set(sessionKey, new WeakRef(session2));
      this._sessionRegistry.register(session2, sessionKey);
    }
  };
  function buildConnector({ allowH2, useH2c, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
    if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
      throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
    }
    const options2 = { path: socketPath, ...opts };
    const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions);
    timeout = timeout == null ? 1e4 : timeout;
    allowH2 = allowH2 != null ? allowH2 : false;
    return function connect3({ hostname: hostname4, host, protocol, port, servername, localAddress, httpSocket }, callback) {
      let socket;
      if (protocol === "https:") {
        if (!tls2) {
          tls2 = __require("node:tls");
        }
        servername = servername || options2.servername || util3.getServerName(host) || null;
        const sessionKey = servername || hostname4;
        assert2(sessionKey);
        const session2 = customSession || sessionCache.get(sessionKey) || null;
        port = port || 443;
        socket = tls2.connect({
          highWaterMark: 16384,
          ...options2,
          servername,
          session: session2,
          localAddress,
          ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"],
          socket: httpSocket,
          port,
          host: hostname4
        });
        socket.on("session", function(session3) {
          sessionCache.set(sessionKey, session3);
        });
      } else {
        assert2(!httpSocket, "httpSocket can only be sent on TLS update");
        port = port || 80;
        socket = net2.connect({
          highWaterMark: 64 * 1024,
          ...options2,
          localAddress,
          port,
          host: hostname4
        });
        if (useH2c === true) {
          socket.alpnProtocol = "h2";
        }
      }
      if (options2.keepAlive == null || options2.keepAlive) {
        const keepAliveInitialDelay = options2.keepAliveInitialDelay === undefined ? 60000 : options2.keepAliveInitialDelay;
        socket.setKeepAlive(true, keepAliveInitialDelay);
      }
      const clearConnectTimeout = util3.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname4, port });
      socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() {
        queueMicrotask(clearConnectTimeout);
        if (callback) {
          const cb2 = callback;
          callback = null;
          cb2(null, this);
        }
      }).on("error", function(err) {
        queueMicrotask(clearConnectTimeout);
        if (callback) {
          const cb2 = callback;
          callback = null;
          cb2(err);
        }
      });
      return socket;
    };
  }
  module.exports = buildConnector;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/llhttp/utils.js
var require_utils14 = __commonJS((exports2) => {
  Object.defineProperty(exports2, "__esModule", { value: true });
  exports2.enumToMap = enumToMap;
  function enumToMap(obj, filter = [], exceptions = []) {
    const emptyFilter = (filter?.length ?? 0) === 0;
    const emptyExceptions = (exceptions?.length ?? 0) === 0;
    return Object.fromEntries(Object.entries(obj).filter(([, value]) => {
      return typeof value === "number" && (emptyFilter || filter.includes(value)) && (emptyExceptions || !exceptions.includes(value));
    }));
  }
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/llhttp/constants.js
var require_constants6 = __commonJS((exports2) => {
  Object.defineProperty(exports2, "__esModule", { value: true });
  exports2.SPECIAL_HEADERS = exports2.MINOR = exports2.MAJOR = exports2.HTAB_SP_VCHAR_OBS_TEXT = exports2.QUOTED_STRING = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.STATUSES_HTTP = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.HEADER_STATE = exports2.FINISH = exports2.STATUSES = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = undefined;
  var utils_1 = require_utils14();
  exports2.ERROR = {
    OK: 0,
    INTERNAL: 1,
    STRICT: 2,
    CR_EXPECTED: 25,
    LF_EXPECTED: 3,
    UNEXPECTED_CONTENT_LENGTH: 4,
    UNEXPECTED_SPACE: 30,
    CLOSED_CONNECTION: 5,
    INVALID_METHOD: 6,
    INVALID_URL: 7,
    INVALID_CONSTANT: 8,
    INVALID_VERSION: 9,
    INVALID_HEADER_TOKEN: 10,
    INVALID_CONTENT_LENGTH: 11,
    INVALID_CHUNK_SIZE: 12,
    INVALID_STATUS: 13,
    INVALID_EOF_STATE: 14,
    INVALID_TRANSFER_ENCODING: 15,
    CB_MESSAGE_BEGIN: 16,
    CB_HEADERS_COMPLETE: 17,
    CB_MESSAGE_COMPLETE: 18,
    CB_CHUNK_HEADER: 19,
    CB_CHUNK_COMPLETE: 20,
    PAUSED: 21,
    PAUSED_UPGRADE: 22,
    PAUSED_H2_UPGRADE: 23,
    USER: 24,
    CB_URL_COMPLETE: 26,
    CB_STATUS_COMPLETE: 27,
    CB_METHOD_COMPLETE: 32,
    CB_VERSION_COMPLETE: 33,
    CB_HEADER_FIELD_COMPLETE: 28,
    CB_HEADER_VALUE_COMPLETE: 29,
    CB_CHUNK_EXTENSION_NAME_COMPLETE: 34,
    CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35,
    CB_RESET: 31,
    CB_PROTOCOL_COMPLETE: 38
  };
  exports2.TYPE = {
    BOTH: 0,
    REQUEST: 1,
    RESPONSE: 2
  };
  exports2.FLAGS = {
    CONNECTION_KEEP_ALIVE: 1 << 0,
    CONNECTION_CLOSE: 1 << 1,
    CONNECTION_UPGRADE: 1 << 2,
    CHUNKED: 1 << 3,
    UPGRADE: 1 << 4,
    CONTENT_LENGTH: 1 << 5,
    SKIPBODY: 1 << 6,
    TRAILING: 1 << 7,
    TRANSFER_ENCODING: 1 << 9
  };
  exports2.LENIENT_FLAGS = {
    HEADERS: 1 << 0,
    CHUNKED_LENGTH: 1 << 1,
    KEEP_ALIVE: 1 << 2,
    TRANSFER_ENCODING: 1 << 3,
    VERSION: 1 << 4,
    DATA_AFTER_CLOSE: 1 << 5,
    OPTIONAL_LF_AFTER_CR: 1 << 6,
    OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7,
    OPTIONAL_CR_BEFORE_LF: 1 << 8,
    SPACES_AFTER_CHUNK_SIZE: 1 << 9
  };
  exports2.METHODS = {
    DELETE: 0,
    GET: 1,
    HEAD: 2,
    POST: 3,
    PUT: 4,
    CONNECT: 5,
    OPTIONS: 6,
    TRACE: 7,
    COPY: 8,
    LOCK: 9,
    MKCOL: 10,
    MOVE: 11,
    PROPFIND: 12,
    PROPPATCH: 13,
    SEARCH: 14,
    UNLOCK: 15,
    BIND: 16,
    REBIND: 17,
    UNBIND: 18,
    ACL: 19,
    REPORT: 20,
    MKACTIVITY: 21,
    CHECKOUT: 22,
    MERGE: 23,
    "M-SEARCH": 24,
    NOTIFY: 25,
    SUBSCRIBE: 26,
    UNSUBSCRIBE: 27,
    PATCH: 28,
    PURGE: 29,
    MKCALENDAR: 30,
    LINK: 31,
    UNLINK: 32,
    SOURCE: 33,
    PRI: 34,
    DESCRIBE: 35,
    ANNOUNCE: 36,
    SETUP: 37,
    PLAY: 38,
    PAUSE: 39,
    TEARDOWN: 40,
    GET_PARAMETER: 41,
    SET_PARAMETER: 42,
    REDIRECT: 43,
    RECORD: 44,
    FLUSH: 45,
    QUERY: 46
  };
  exports2.STATUSES = {
    CONTINUE: 100,
    SWITCHING_PROTOCOLS: 101,
    PROCESSING: 102,
    EARLY_HINTS: 103,
    RESPONSE_IS_STALE: 110,
    REVALIDATION_FAILED: 111,
    DISCONNECTED_OPERATION: 112,
    HEURISTIC_EXPIRATION: 113,
    MISCELLANEOUS_WARNING: 199,
    OK: 200,
    CREATED: 201,
    ACCEPTED: 202,
    NON_AUTHORITATIVE_INFORMATION: 203,
    NO_CONTENT: 204,
    RESET_CONTENT: 205,
    PARTIAL_CONTENT: 206,
    MULTI_STATUS: 207,
    ALREADY_REPORTED: 208,
    TRANSFORMATION_APPLIED: 214,
    IM_USED: 226,
    MISCELLANEOUS_PERSISTENT_WARNING: 299,
    MULTIPLE_CHOICES: 300,
    MOVED_PERMANENTLY: 301,
    FOUND: 302,
    SEE_OTHER: 303,
    NOT_MODIFIED: 304,
    USE_PROXY: 305,
    SWITCH_PROXY: 306,
    TEMPORARY_REDIRECT: 307,
    PERMANENT_REDIRECT: 308,
    BAD_REQUEST: 400,
    UNAUTHORIZED: 401,
    PAYMENT_REQUIRED: 402,
    FORBIDDEN: 403,
    NOT_FOUND: 404,
    METHOD_NOT_ALLOWED: 405,
    NOT_ACCEPTABLE: 406,
    PROXY_AUTHENTICATION_REQUIRED: 407,
    REQUEST_TIMEOUT: 408,
    CONFLICT: 409,
    GONE: 410,
    LENGTH_REQUIRED: 411,
    PRECONDITION_FAILED: 412,
    PAYLOAD_TOO_LARGE: 413,
    URI_TOO_LONG: 414,
    UNSUPPORTED_MEDIA_TYPE: 415,
    RANGE_NOT_SATISFIABLE: 416,
    EXPECTATION_FAILED: 417,
    IM_A_TEAPOT: 418,
    PAGE_EXPIRED: 419,
    ENHANCE_YOUR_CALM: 420,
    MISDIRECTED_REQUEST: 421,
    UNPROCESSABLE_ENTITY: 422,
    LOCKED: 423,
    FAILED_DEPENDENCY: 424,
    TOO_EARLY: 425,
    UPGRADE_REQUIRED: 426,
    PRECONDITION_REQUIRED: 428,
    TOO_MANY_REQUESTS: 429,
    REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430,
    REQUEST_HEADER_FIELDS_TOO_LARGE: 431,
    LOGIN_TIMEOUT: 440,
    NO_RESPONSE: 444,
    RETRY_WITH: 449,
    BLOCKED_BY_PARENTAL_CONTROL: 450,
    UNAVAILABLE_FOR_LEGAL_REASONS: 451,
    CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460,
    INVALID_X_FORWARDED_FOR: 463,
    REQUEST_HEADER_TOO_LARGE: 494,
    SSL_CERTIFICATE_ERROR: 495,
    SSL_CERTIFICATE_REQUIRED: 496,
    HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497,
    INVALID_TOKEN: 498,
    CLIENT_CLOSED_REQUEST: 499,
    INTERNAL_SERVER_ERROR: 500,
    NOT_IMPLEMENTED: 501,
    BAD_GATEWAY: 502,
    SERVICE_UNAVAILABLE: 503,
    GATEWAY_TIMEOUT: 504,
    HTTP_VERSION_NOT_SUPPORTED: 505,
    VARIANT_ALSO_NEGOTIATES: 506,
    INSUFFICIENT_STORAGE: 507,
    LOOP_DETECTED: 508,
    BANDWIDTH_LIMIT_EXCEEDED: 509,
    NOT_EXTENDED: 510,
    NETWORK_AUTHENTICATION_REQUIRED: 511,
    WEB_SERVER_UNKNOWN_ERROR: 520,
    WEB_SERVER_IS_DOWN: 521,
    CONNECTION_TIMEOUT: 522,
    ORIGIN_IS_UNREACHABLE: 523,
    TIMEOUT_OCCURED: 524,
    SSL_HANDSHAKE_FAILED: 525,
    INVALID_SSL_CERTIFICATE: 526,
    RAILGUN_ERROR: 527,
    SITE_IS_OVERLOADED: 529,
    SITE_IS_FROZEN: 530,
    IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561,
    NETWORK_READ_TIMEOUT: 598,
    NETWORK_CONNECT_TIMEOUT: 599
  };
  exports2.FINISH = {
    SAFE: 0,
    SAFE_WITH_CB: 1,
    UNSAFE: 2
  };
  exports2.HEADER_STATE = {
    GENERAL: 0,
    CONNECTION: 1,
    CONTENT_LENGTH: 2,
    TRANSFER_ENCODING: 3,
    UPGRADE: 4,
    CONNECTION_KEEP_ALIVE: 5,
    CONNECTION_CLOSE: 6,
    CONNECTION_UPGRADE: 7,
    TRANSFER_ENCODING_CHUNKED: 8
  };
  exports2.METHODS_HTTP = [
    exports2.METHODS.DELETE,
    exports2.METHODS.GET,
    exports2.METHODS.HEAD,
    exports2.METHODS.POST,
    exports2.METHODS.PUT,
    exports2.METHODS.CONNECT,
    exports2.METHODS.OPTIONS,
    exports2.METHODS.TRACE,
    exports2.METHODS.COPY,
    exports2.METHODS.LOCK,
    exports2.METHODS.MKCOL,
    exports2.METHODS.MOVE,
    exports2.METHODS.PROPFIND,
    exports2.METHODS.PROPPATCH,
    exports2.METHODS.SEARCH,
    exports2.METHODS.UNLOCK,
    exports2.METHODS.BIND,
    exports2.METHODS.REBIND,
    exports2.METHODS.UNBIND,
    exports2.METHODS.ACL,
    exports2.METHODS.REPORT,
    exports2.METHODS.MKACTIVITY,
    exports2.METHODS.CHECKOUT,
    exports2.METHODS.MERGE,
    exports2.METHODS["M-SEARCH"],
    exports2.METHODS.NOTIFY,
    exports2.METHODS.SUBSCRIBE,
    exports2.METHODS.UNSUBSCRIBE,
    exports2.METHODS.PATCH,
    exports2.METHODS.PURGE,
    exports2.METHODS.MKCALENDAR,
    exports2.METHODS.LINK,
    exports2.METHODS.UNLINK,
    exports2.METHODS.PRI,
    exports2.METHODS.SOURCE,
    exports2.METHODS.QUERY
  ];
  exports2.METHODS_ICE = [
    exports2.METHODS.SOURCE
  ];
  exports2.METHODS_RTSP = [
    exports2.METHODS.OPTIONS,
    exports2.METHODS.DESCRIBE,
    exports2.METHODS.ANNOUNCE,
    exports2.METHODS.SETUP,
    exports2.METHODS.PLAY,
    exports2.METHODS.PAUSE,
    exports2.METHODS.TEARDOWN,
    exports2.METHODS.GET_PARAMETER,
    exports2.METHODS.SET_PARAMETER,
    exports2.METHODS.REDIRECT,
    exports2.METHODS.RECORD,
    exports2.METHODS.FLUSH,
    exports2.METHODS.GET,
    exports2.METHODS.POST
  ];
  exports2.METHOD_MAP = (0, utils_1.enumToMap)(exports2.METHODS);
  exports2.H_METHOD_MAP = Object.fromEntries(Object.entries(exports2.METHODS).filter(([k4]) => k4.startsWith("H")));
  exports2.STATUSES_HTTP = [
    exports2.STATUSES.CONTINUE,
    exports2.STATUSES.SWITCHING_PROTOCOLS,
    exports2.STATUSES.PROCESSING,
    exports2.STATUSES.EARLY_HINTS,
    exports2.STATUSES.RESPONSE_IS_STALE,
    exports2.STATUSES.REVALIDATION_FAILED,
    exports2.STATUSES.DISCONNECTED_OPERATION,
    exports2.STATUSES.HEURISTIC_EXPIRATION,
    exports2.STATUSES.MISCELLANEOUS_WARNING,
    exports2.STATUSES.OK,
    exports2.STATUSES.CREATED,
    exports2.STATUSES.ACCEPTED,
    exports2.STATUSES.NON_AUTHORITATIVE_INFORMATION,
    exports2.STATUSES.NO_CONTENT,
    exports2.STATUSES.RESET_CONTENT,
    exports2.STATUSES.PARTIAL_CONTENT,
    exports2.STATUSES.MULTI_STATUS,
    exports2.STATUSES.ALREADY_REPORTED,
    exports2.STATUSES.TRANSFORMATION_APPLIED,
    exports2.STATUSES.IM_USED,
    exports2.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,
    exports2.STATUSES.MULTIPLE_CHOICES,
    exports2.STATUSES.MOVED_PERMANENTLY,
    exports2.STATUSES.FOUND,
    exports2.STATUSES.SEE_OTHER,
    exports2.STATUSES.NOT_MODIFIED,
    exports2.STATUSES.USE_PROXY,
    exports2.STATUSES.SWITCH_PROXY,
    exports2.STATUSES.TEMPORARY_REDIRECT,
    exports2.STATUSES.PERMANENT_REDIRECT,
    exports2.STATUSES.BAD_REQUEST,
    exports2.STATUSES.UNAUTHORIZED,
    exports2.STATUSES.PAYMENT_REQUIRED,
    exports2.STATUSES.FORBIDDEN,
    exports2.STATUSES.NOT_FOUND,
    exports2.STATUSES.METHOD_NOT_ALLOWED,
    exports2.STATUSES.NOT_ACCEPTABLE,
    exports2.STATUSES.PROXY_AUTHENTICATION_REQUIRED,
    exports2.STATUSES.REQUEST_TIMEOUT,
    exports2.STATUSES.CONFLICT,
    exports2.STATUSES.GONE,
    exports2.STATUSES.LENGTH_REQUIRED,
    exports2.STATUSES.PRECONDITION_FAILED,
    exports2.STATUSES.PAYLOAD_TOO_LARGE,
    exports2.STATUSES.URI_TOO_LONG,
    exports2.STATUSES.UNSUPPORTED_MEDIA_TYPE,
    exports2.STATUSES.RANGE_NOT_SATISFIABLE,
    exports2.STATUSES.EXPECTATION_FAILED,
    exports2.STATUSES.IM_A_TEAPOT,
    exports2.STATUSES.PAGE_EXPIRED,
    exports2.STATUSES.ENHANCE_YOUR_CALM,
    exports2.STATUSES.MISDIRECTED_REQUEST,
    exports2.STATUSES.UNPROCESSABLE_ENTITY,
    exports2.STATUSES.LOCKED,
    exports2.STATUSES.FAILED_DEPENDENCY,
    exports2.STATUSES.TOO_EARLY,
    exports2.STATUSES.UPGRADE_REQUIRED,
    exports2.STATUSES.PRECONDITION_REQUIRED,
    exports2.STATUSES.TOO_MANY_REQUESTS,
    exports2.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,
    exports2.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,
    exports2.STATUSES.LOGIN_TIMEOUT,
    exports2.STATUSES.NO_RESPONSE,
    exports2.STATUSES.RETRY_WITH,
    exports2.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,
    exports2.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,
    exports2.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,
    exports2.STATUSES.INVALID_X_FORWARDED_FOR,
    exports2.STATUSES.REQUEST_HEADER_TOO_LARGE,
    exports2.STATUSES.SSL_CERTIFICATE_ERROR,
    exports2.STATUSES.SSL_CERTIFICATE_REQUIRED,
    exports2.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,
    exports2.STATUSES.INVALID_TOKEN,
    exports2.STATUSES.CLIENT_CLOSED_REQUEST,
    exports2.STATUSES.INTERNAL_SERVER_ERROR,
    exports2.STATUSES.NOT_IMPLEMENTED,
    exports2.STATUSES.BAD_GATEWAY,
    exports2.STATUSES.SERVICE_UNAVAILABLE,
    exports2.STATUSES.GATEWAY_TIMEOUT,
    exports2.STATUSES.HTTP_VERSION_NOT_SUPPORTED,
    exports2.STATUSES.VARIANT_ALSO_NEGOTIATES,
    exports2.STATUSES.INSUFFICIENT_STORAGE,
    exports2.STATUSES.LOOP_DETECTED,
    exports2.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,
    exports2.STATUSES.NOT_EXTENDED,
    exports2.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,
    exports2.STATUSES.WEB_SERVER_UNKNOWN_ERROR,
    exports2.STATUSES.WEB_SERVER_IS_DOWN,
    exports2.STATUSES.CONNECTION_TIMEOUT,
    exports2.STATUSES.ORIGIN_IS_UNREACHABLE,
    exports2.STATUSES.TIMEOUT_OCCURED,
    exports2.STATUSES.SSL_HANDSHAKE_FAILED,
    exports2.STATUSES.INVALID_SSL_CERTIFICATE,
    exports2.STATUSES.RAILGUN_ERROR,
    exports2.STATUSES.SITE_IS_OVERLOADED,
    exports2.STATUSES.SITE_IS_FROZEN,
    exports2.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,
    exports2.STATUSES.NETWORK_READ_TIMEOUT,
    exports2.STATUSES.NETWORK_CONNECT_TIMEOUT
  ];
  exports2.ALPHA = [];
  for (let i = 65;i <= 90; i++) {
    exports2.ALPHA.push(String.fromCharCode(i));
    exports2.ALPHA.push(String.fromCharCode(i + 32));
  }
  exports2.NUM_MAP = {
    0: 0,
    1: 1,
    2: 2,
    3: 3,
    4: 4,
    5: 5,
    6: 6,
    7: 7,
    8: 8,
    9: 9
  };
  exports2.HEX_MAP = {
    0: 0,
    1: 1,
    2: 2,
    3: 3,
    4: 4,
    5: 5,
    6: 6,
    7: 7,
    8: 8,
    9: 9,
    A: 10,
    B: 11,
    C: 12,
    D: 13,
    E: 14,
    F: 15,
    a: 10,
    b: 11,
    c: 12,
    d: 13,
    e: 14,
    f: 15
  };
  exports2.NUM = [
    "0",
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9"
  ];
  exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM);
  exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"];
  exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]);
  exports2.URL_CHAR = [
    "!",
    '"',
    "$",
    "%",
    "&",
    "'",
    "(",
    ")",
    "*",
    "+",
    ",",
    "-",
    ".",
    "/",
    ":",
    ";",
    "<",
    "=",
    ">",
    "@",
    "[",
    "\\",
    "]",
    "^",
    "_",
    "`",
    "{",
    "|",
    "}",
    "~"
  ].concat(exports2.ALPHANUM);
  exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]);
  exports2.TOKEN = [
    "!",
    "#",
    "$",
    "%",
    "&",
    "'",
    "*",
    "+",
    "-",
    ".",
    "^",
    "_",
    "`",
    "|",
    "~"
  ].concat(exports2.ALPHANUM);
  exports2.HEADER_CHARS = ["\t"];
  for (let i = 32;i <= 255; i++) {
    if (i !== 127) {
      exports2.HEADER_CHARS.push(i);
    }
  }
  exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c3) => c3 !== 44);
  exports2.QUOTED_STRING = ["\t", " "];
  for (let i = 33;i <= 255; i++) {
    if (i !== 34 && i !== 92) {
      exports2.QUOTED_STRING.push(i);
    }
  }
  exports2.HTAB_SP_VCHAR_OBS_TEXT = ["\t", " "];
  for (let i = 33;i <= 126; i++) {
    exports2.HTAB_SP_VCHAR_OBS_TEXT.push(i);
  }
  for (let i = 128;i <= 255; i++) {
    exports2.HTAB_SP_VCHAR_OBS_TEXT.push(i);
  }
  exports2.MAJOR = exports2.NUM_MAP;
  exports2.MINOR = exports2.MAJOR;
  exports2.SPECIAL_HEADERS = {
    connection: exports2.HEADER_STATE.CONNECTION,
    "content-length": exports2.HEADER_STATE.CONTENT_LENGTH,
    "proxy-connection": exports2.HEADER_STATE.CONNECTION,
    "transfer-encoding": exports2.HEADER_STATE.TRANSFER_ENCODING,
    upgrade: exports2.HEADER_STATE.UPGRADE
  };
  exports2.default = {
    ERROR: exports2.ERROR,
    TYPE: exports2.TYPE,
    FLAGS: exports2.FLAGS,
    LENIENT_FLAGS: exports2.LENIENT_FLAGS,
    METHODS: exports2.METHODS,
    STATUSES: exports2.STATUSES,
    FINISH: exports2.FINISH,
    HEADER_STATE: exports2.HEADER_STATE,
    ALPHA: exports2.ALPHA,
    NUM_MAP: exports2.NUM_MAP,
    HEX_MAP: exports2.HEX_MAP,
    NUM: exports2.NUM,
    ALPHANUM: exports2.ALPHANUM,
    MARK: exports2.MARK,
    USERINFO_CHARS: exports2.USERINFO_CHARS,
    URL_CHAR: exports2.URL_CHAR,
    HEX: exports2.HEX,
    TOKEN: exports2.TOKEN,
    HEADER_CHARS: exports2.HEADER_CHARS,
    CONNECTION_TOKEN_CHARS: exports2.CONNECTION_TOKEN_CHARS,
    QUOTED_STRING: exports2.QUOTED_STRING,
    HTAB_SP_VCHAR_OBS_TEXT: exports2.HTAB_SP_VCHAR_OBS_TEXT,
    MAJOR: exports2.MAJOR,
    MINOR: exports2.MINOR,
    SPECIAL_HEADERS: exports2.SPECIAL_HEADERS,
    METHODS_HTTP: exports2.METHODS_HTTP,
    METHODS_ICE: exports2.METHODS_ICE,
    METHODS_RTSP: exports2.METHODS_RTSP,
    METHOD_MAP: exports2.METHOD_MAP,
    H_METHOD_MAP: exports2.H_METHOD_MAP,
    STATUSES_HTTP: exports2.STATUSES_HTTP
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/llhttp/llhttp-wasm.js
var require_llhttp_wasm = __commonJS((exports2, module) => {
  var { Buffer: Buffer2 } = __require("node:buffer");
  var wasmBase64 = " ";
  var wasmBuffer;
  Object.defineProperty(module, "exports", {
    get: () => {
      return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer2.from(wasmBase64, "base64");
    }
  });
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js
var require_llhttp_simd_wasm = __commonJS((exports2, module) => {
  var { Buffer: Buffer2 } = __require("node:buffer");
  var wasmBase64 = " ";
  var wasmBuffer;
  Object.defineProperty(module, "exports", {
    get: () => {
      return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer2.from(wasmBase64, "base64");
    }
  });
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/constants.js
var require_constants7 = __commonJS((exports2, module) => {
  var corsSafeListedMethods = ["GET", "HEAD", "POST"];
  var corsSafeListedMethodsSet = new Set(corsSafeListedMethods);
  var nullBodyStatus = [101, 204, 205, 304];
  var redirectStatus = [301, 302, 303, 307, 308];
  var redirectStatusSet = new Set(redirectStatus);
  var badPorts = [
    "1",
    "7",
    "9",
    "11",
    "13",
    "15",
    "17",
    "19",
    "20",
    "21",
    "22",
    "23",
    "25",
    "37",
    "42",
    "43",
    "53",
    "69",
    "77",
    "79",
    "87",
    "95",
    "101",
    "102",
    "103",
    "104",
    "109",
    "110",
    "111",
    "113",
    "115",
    "117",
    "119",
    "123",
    "135",
    "137",
    "139",
    "143",
    "161",
    "179",
    "389",
    "427",
    "465",
    "512",
    "513",
    "514",
    "515",
    "526",
    "530",
    "531",
    "532",
    "540",
    "548",
    "554",
    "556",
    "563",
    "587",
    "601",
    "636",
    "989",
    "990",
    "993",
    "995",
    "1719",
    "1720",
    "1723",
    "2049",
    "3659",
    "4045",
    "4190",
    "5060",
    "5061",
    "6000",
    "6566",
    "6665",
    "6666",
    "6667",
    "6668",
    "6669",
    "6679",
    "6697",
    "10080"
  ];
  var badPortsSet = new Set(badPorts);
  var referrerPolicyTokens = [
    "no-referrer",
    "no-referrer-when-downgrade",
    "same-origin",
    "origin",
    "strict-origin",
    "origin-when-cross-origin",
    "strict-origin-when-cross-origin",
    "unsafe-url"
  ];
  var referrerPolicy = [
    "",
    ...referrerPolicyTokens
  ];
  var referrerPolicyTokensSet = new Set(referrerPolicyTokens);
  var requestRedirect = ["follow", "manual", "error"];
  var safeMethods = ["GET", "HEAD", "OPTIONS", "TRACE"];
  var safeMethodsSet = new Set(safeMethods);
  var requestMode = ["navigate", "same-origin", "no-cors", "cors"];
  var requestCredentials = ["omit", "same-origin", "include"];
  var requestCache = [
    "default",
    "no-store",
    "reload",
    "no-cache",
    "force-cache",
    "only-if-cached"
  ];
  var requestBodyHeader = [
    "content-encoding",
    "content-language",
    "content-location",
    "content-type",
    "content-length"
  ];
  var requestDuplex = [
    "half"
  ];
  var forbiddenMethods = ["CONNECT", "TRACE", "TRACK"];
  var forbiddenMethodsSet = new Set(forbiddenMethods);
  var subresource = [
    "audio",
    "audioworklet",
    "font",
    "image",
    "manifest",
    "paintworklet",
    "script",
    "style",
    "track",
    "video",
    "xslt",
    ""
  ];
  var subresourceSet = new Set(subresource);
  module.exports = {
    subresource,
    forbiddenMethods,
    requestBodyHeader,
    referrerPolicy,
    requestRedirect,
    requestMode,
    requestCredentials,
    requestCache,
    redirectStatus,
    corsSafeListedMethods,
    nullBodyStatus,
    safeMethods,
    badPorts,
    requestDuplex,
    subresourceSet,
    badPortsSet,
    redirectStatusSet,
    corsSafeListedMethodsSet,
    safeMethodsSet,
    forbiddenMethodsSet,
    referrerPolicyTokens: referrerPolicyTokensSet
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/global.js
var require_global = __commonJS((exports2, module) => {
  var globalOrigin = Symbol.for("undici.globalOrigin.1");
  function getGlobalOrigin() {
    return globalThis[globalOrigin];
  }
  function setGlobalOrigin(newOrigin) {
    if (newOrigin === undefined) {
      Object.defineProperty(globalThis, globalOrigin, {
        value: undefined,
        writable: true,
        enumerable: false,
        configurable: false
      });
      return;
    }
    const parsedURL = new URL(newOrigin);
    if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") {
      throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`);
    }
    Object.defineProperty(globalThis, globalOrigin, {
      value: parsedURL,
      writable: true,
      enumerable: false,
      configurable: false
    });
  }
  module.exports = {
    getGlobalOrigin,
    setGlobalOrigin
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/encoding/index.js
var require_encoding = __commonJS((exports2, module) => {
  var textDecoder2 = new TextDecoder;
  function utf8DecodeBytes(buffer) {
    if (buffer.length === 0) {
      return "";
    }
    if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) {
      buffer = buffer.subarray(3);
    }
    const output = textDecoder2.decode(buffer);
    return output;
  }
  module.exports = {
    utf8DecodeBytes
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/infra/index.js
var require_infra = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { utf8DecodeBytes } = require_encoding();
  function collectASequenceOfCodePoints(condition, input, position) {
    let result = "";
    while (position.position < input.length && condition(input[position.position])) {
      result += input[position.position];
      position.position++;
    }
    return result;
  }
  function collectASequenceOfCodePointsFast(char2, input, position) {
    const idx = input.indexOf(char2, position.position);
    const start = position.position;
    if (idx === -1) {
      position.position = input.length;
      return input.slice(start);
    }
    position.position = idx;
    return input.slice(start, position.position);
  }
  var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g;
  function forgivingBase64(data) {
    data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, "");
    let dataLength = data.length;
    if (dataLength % 4 === 0) {
      if (data.charCodeAt(dataLength - 1) === 61) {
        --dataLength;
        if (data.charCodeAt(dataLength - 1) === 61) {
          --dataLength;
        }
      }
    }
    if (dataLength % 4 === 1) {
      return "failure";
    }
    if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) {
      return "failure";
    }
    const buffer = Buffer.from(data, "base64");
    return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
  }
  function isASCIIWhitespace(char2) {
    return char2 === 9 || char2 === 10 || char2 === 12 || char2 === 13 || char2 === 32;
  }
  function isomorphicDecode(input) {
    const length2 = input.length;
    if ((2 << 15) - 1 > length2) {
      return String.fromCharCode.apply(null, input);
    }
    let result = "";
    let i = 0;
    let addition = (2 << 15) - 1;
    while (i < length2) {
      if (i + addition > length2) {
        addition = length2 - i;
      }
      result += String.fromCharCode.apply(null, input.subarray(i, i += addition));
    }
    return result;
  }
  var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/;
  function isomorphicEncode(input) {
    assert2(!invalidIsomorphicEncodeValueRegex.test(input));
    return input;
  }
  function parseJSONFromBytes(bytes) {
    return JSON.parse(utf8DecodeBytes(bytes));
  }
  function removeASCIIWhitespace(str, leading = true, trailing = true) {
    return removeChars(str, leading, trailing, isASCIIWhitespace);
  }
  function removeChars(str, leading, trailing, predicate) {
    let lead = 0;
    let trail = str.length - 1;
    if (leading) {
      while (lead < str.length && predicate(str.charCodeAt(lead)))
        lead++;
    }
    if (trailing) {
      while (trail > 0 && predicate(str.charCodeAt(trail)))
        trail--;
    }
    return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1);
  }
  function serializeJavascriptValueToJSONString(value) {
    const result = JSON.stringify(value);
    if (result === undefined) {
      throw new TypeError("Value is not JSON serializable");
    }
    assert2(typeof result === "string");
    return result;
  }
  module.exports = {
    collectASequenceOfCodePoints,
    collectASequenceOfCodePointsFast,
    forgivingBase64,
    isASCIIWhitespace,
    isomorphicDecode,
    isomorphicEncode,
    parseJSONFromBytes,
    removeASCIIWhitespace,
    removeChars,
    serializeJavascriptValueToJSONString
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/data-url.js
var require_data_url = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { forgivingBase64, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, isomorphicDecode, removeASCIIWhitespace, removeChars } = require_infra();
  var encoder2 = new TextEncoder;
  var HTTP_TOKEN_CODEPOINTS = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u;
  var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/u;
  var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u;
  function dataURLProcessor(dataURL) {
    assert2(dataURL.protocol === "data:");
    let input = URLSerializer(dataURL, true);
    input = input.slice(5);
    const position = { position: 0 };
    let mimeType = collectASequenceOfCodePointsFast(",", input, position);
    const mimeTypeLength = mimeType.length;
    mimeType = removeASCIIWhitespace(mimeType, true, true);
    if (position.position >= input.length) {
      return "failure";
    }
    position.position++;
    const encodedBody = input.slice(mimeTypeLength + 1);
    let body2 = stringPercentDecode(encodedBody);
    if (/;(?:\u0020*)base64$/ui.test(mimeType)) {
      const stringBody = isomorphicDecode(body2);
      body2 = forgivingBase64(stringBody);
      if (body2 === "failure") {
        return "failure";
      }
      mimeType = mimeType.slice(0, -6);
      mimeType = mimeType.replace(/(\u0020+)$/u, "");
      mimeType = mimeType.slice(0, -1);
    }
    if (mimeType.startsWith(";")) {
      mimeType = "text/plain" + mimeType;
    }
    let mimeTypeRecord = parseMIMEType(mimeType);
    if (mimeTypeRecord === "failure") {
      mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII");
    }
    return { mimeType: mimeTypeRecord, body: body2 };
  }
  function URLSerializer(url2, excludeFragment = false) {
    if (!excludeFragment) {
      return url2.href;
    }
    const href = url2.href;
    const hashLength = url2.hash.length;
    const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength);
    if (!hashLength && href.endsWith("#")) {
      return serialized.slice(0, -1);
    }
    return serialized;
  }
  function stringPercentDecode(input) {
    const bytes = encoder2.encode(input);
    return percentDecode(bytes);
  }
  function isHexCharByte(byte) {
    return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102;
  }
  function hexByteToNumber(byte) {
    return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55;
  }
  function percentDecode(input) {
    const length2 = input.length;
    const output = new Uint8Array(length2);
    let j4 = 0;
    let i = 0;
    while (i < length2) {
      const byte = input[i];
      if (byte !== 37) {
        output[j4++] = byte;
      } else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) {
        output[j4++] = 37;
      } else {
        output[j4++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]);
        i += 2;
      }
      ++i;
    }
    return length2 === j4 ? output : output.subarray(0, j4);
  }
  function parseMIMEType(input) {
    input = removeHTTPWhitespace(input, true, true);
    const position = { position: 0 };
    const type2 = collectASequenceOfCodePointsFast("/", input, position);
    if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) {
      return "failure";
    }
    if (position.position >= input.length) {
      return "failure";
    }
    position.position++;
    let subtype = collectASequenceOfCodePointsFast(";", input, position);
    subtype = removeHTTPWhitespace(subtype, false, true);
    if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {
      return "failure";
    }
    const typeLowercase = type2.toLowerCase();
    const subtypeLowercase = subtype.toLowerCase();
    const mimeType = {
      type: typeLowercase,
      subtype: subtypeLowercase,
      parameters: new Map,
      essence: `${typeLowercase}/${subtypeLowercase}`
    };
    while (position.position < input.length) {
      position.position++;
      collectASequenceOfCodePoints((char2) => HTTP_WHITESPACE_REGEX.test(char2), input, position);
      let parameterName = collectASequenceOfCodePoints((char2) => char2 !== ";" && char2 !== "=", input, position);
      parameterName = parameterName.toLowerCase();
      if (position.position < input.length) {
        if (input[position.position] === ";") {
          continue;
        }
        position.position++;
      }
      if (position.position >= input.length) {
        break;
      }
      let parameterValue = null;
      if (input[position.position] === '"') {
        parameterValue = collectAnHTTPQuotedString(input, position, true);
        collectASequenceOfCodePointsFast(";", input, position);
      } else {
        parameterValue = collectASequenceOfCodePointsFast(";", input, position);
        parameterValue = removeHTTPWhitespace(parameterValue, false, true);
        if (parameterValue.length === 0) {
          continue;
        }
      }
      if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) {
        mimeType.parameters.set(parameterName, parameterValue);
      }
    }
    return mimeType;
  }
  function collectAnHTTPQuotedString(input, position, extractValue = false) {
    const positionStart = position.position;
    let value = "";
    assert2(input[position.position] === '"');
    position.position++;
    while (true) {
      value += collectASequenceOfCodePoints((char2) => char2 !== '"' && char2 !== "\\", input, position);
      if (position.position >= input.length) {
        break;
      }
      const quoteOrBackslash = input[position.position];
      position.position++;
      if (quoteOrBackslash === "\\") {
        if (position.position >= input.length) {
          value += "\\";
          break;
        }
        value += input[position.position];
        position.position++;
      } else {
        assert2(quoteOrBackslash === '"');
        break;
      }
    }
    if (extractValue) {
      return value;
    }
    return input.slice(positionStart, position.position);
  }
  function serializeAMimeType(mimeType) {
    assert2(mimeType !== "failure");
    const { parameters, essence } = mimeType;
    let serialization = essence;
    for (let [name3, value] of parameters.entries()) {
      serialization += ";";
      serialization += name3;
      serialization += "=";
      if (!HTTP_TOKEN_CODEPOINTS.test(value)) {
        value = value.replace(/[\\"]/ug, "\\$&");
        value = '"' + value;
        value += '"';
      }
      serialization += value;
    }
    return serialization;
  }
  function isHTTPWhiteSpace(char2) {
    return char2 === 13 || char2 === 10 || char2 === 9 || char2 === 32;
  }
  function removeHTTPWhitespace(str, leading = true, trailing = true) {
    return removeChars(str, leading, trailing, isHTTPWhiteSpace);
  }
  function minimizeSupportedMimeType(mimeType) {
    switch (mimeType.essence) {
      case "application/ecmascript":
      case "application/javascript":
      case "application/x-ecmascript":
      case "application/x-javascript":
      case "text/ecmascript":
      case "text/javascript":
      case "text/javascript1.0":
      case "text/javascript1.1":
      case "text/javascript1.2":
      case "text/javascript1.3":
      case "text/javascript1.4":
      case "text/javascript1.5":
      case "text/jscript":
      case "text/livescript":
      case "text/x-ecmascript":
      case "text/x-javascript":
        return "text/javascript";
      case "application/json":
      case "text/json":
        return "application/json";
      case "image/svg+xml":
        return "image/svg+xml";
      case "text/xml":
      case "application/xml":
        return "application/xml";
    }
    if (mimeType.subtype.endsWith("+json")) {
      return "application/json";
    }
    if (mimeType.subtype.endsWith("+xml")) {
      return "application/xml";
    }
    return "";
  }
  module.exports = {
    dataURLProcessor,
    URLSerializer,
    stringPercentDecode,
    parseMIMEType,
    collectAnHTTPQuotedString,
    serializeAMimeType,
    removeHTTPWhitespace,
    minimizeSupportedMimeType,
    HTTP_TOKEN_CODEPOINTS
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/util/runtime-features.js
var require_runtime_features = __commonJS((exports2, module) => {
  var lazyLoaders = {
    __proto__: null,
    "node:crypto": () => __require("node:crypto"),
    "node:sqlite": () => __require("node:sqlite"),
    "node:worker_threads": () => __require("node:worker_threads"),
    "node:zlib": () => __require("node:zlib")
  };
  function detectRuntimeFeatureByNodeModule(moduleName) {
    try {
      lazyLoaders[moduleName]();
      return true;
    } catch (err) {
      if (err.code !== "ERR_UNKNOWN_BUILTIN_MODULE" && err.code !== "ERR_NO_CRYPTO") {
        throw err;
      }
      return false;
    }
  }
  function detectRuntimeFeatureByExportedProperty(moduleName, property2) {
    const module2 = lazyLoaders[moduleName]();
    return typeof module2[property2] !== "undefined";
  }
  var runtimeFeaturesByExportedProperty = ["markAsUncloneable", "zstd"];
  var exportedPropertyLookup = {
    markAsUncloneable: ["node:worker_threads", "markAsUncloneable"],
    zstd: ["node:zlib", "createZstdDecompress"]
  };
  var runtimeFeaturesAsNodeModule = ["crypto", "sqlite"];
  var features = [
    ...runtimeFeaturesAsNodeModule,
    ...runtimeFeaturesByExportedProperty
  ];
  function detectRuntimeFeature(feature) {
    if (runtimeFeaturesAsNodeModule.includes(feature)) {
      return detectRuntimeFeatureByNodeModule(`node:${feature}`);
    } else if (runtimeFeaturesByExportedProperty.includes(feature)) {
      const [moduleName, property2] = exportedPropertyLookup[feature];
      return detectRuntimeFeatureByExportedProperty(moduleName, property2);
    }
    throw new TypeError(`unknown feature: ${feature}`);
  }

  class RuntimeFeatures {
    #map = new Map;
    clear() {
      this.#map.clear();
    }
    has(feature) {
      return this.#map.get(feature) ?? this.#detectRuntimeFeature(feature);
    }
    set(feature, value) {
      if (features.includes(feature) === false) {
        throw new TypeError(`unknown feature: ${feature}`);
      }
      this.#map.set(feature, value);
    }
    #detectRuntimeFeature(feature) {
      const result = detectRuntimeFeature(feature);
      this.#map.set(feature, result);
      return result;
    }
  }
  var instance = new RuntimeFeatures;
  exports2.runtimeFeatures = instance;
  exports2.default = instance;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/webidl/index.js
var require_webidl = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { types: types6, inspect } = __require("node:util");
  var { runtimeFeatures } = require_runtime_features();
  var UNDEFINED = 1;
  var BOOLEAN = 2;
  var STRING = 3;
  var SYMBOL = 4;
  var NUMBER = 5;
  var BIGINT = 6;
  var NULL2 = 7;
  var OBJECT = 8;
  var FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance]);
  var webidl = {
    converters: {},
    util: {},
    errors: {},
    is: {}
  };
  webidl.errors.exception = function(message2) {
    return new TypeError(`${message2.header}: ${message2.message}`);
  };
  webidl.errors.conversionFailed = function(opts) {
    const plural = opts.types.length === 1 ? "" : " one of";
    const message2 = `${opts.argument} could not be converted to` + `${plural}: ${opts.types.join(", ")}.`;
    return webidl.errors.exception({
      header: opts.prefix,
      message: message2
    });
  };
  webidl.errors.invalidArgument = function(context10) {
    return webidl.errors.exception({
      header: context10.prefix,
      message: `"${context10.value}" is an invalid ${context10.type}.`
    });
  };
  webidl.brandCheck = function(V6, I5) {
    if (!FunctionPrototypeSymbolHasInstance(I5, V6)) {
      const err = new TypeError("Illegal invocation");
      err.code = "ERR_INVALID_THIS";
      throw err;
    }
  };
  webidl.brandCheckMultiple = function(List3) {
    const prototypes = List3.map((c3) => webidl.util.MakeTypeAssertion(c3));
    return (V6) => {
      if (prototypes.every((typeCheck) => !typeCheck(V6))) {
        const err = new TypeError("Illegal invocation");
        err.code = "ERR_INVALID_THIS";
        throw err;
      }
    };
  };
  webidl.argumentLengthCheck = function({ length: length2 }, min, ctx) {
    if (length2 < min) {
      throw webidl.errors.exception({
        message: `${min} argument${min !== 1 ? "s" : ""} required, ` + `but${length2 ? " only" : ""} ${length2} found.`,
        header: ctx
      });
    }
  };
  webidl.illegalConstructor = function() {
    throw webidl.errors.exception({
      header: "TypeError",
      message: "Illegal constructor"
    });
  };
  webidl.util.MakeTypeAssertion = function(I5) {
    return (O5) => FunctionPrototypeSymbolHasInstance(I5, O5);
  };
  webidl.util.Type = function(V6) {
    switch (typeof V6) {
      case "undefined":
        return UNDEFINED;
      case "boolean":
        return BOOLEAN;
      case "string":
        return STRING;
      case "symbol":
        return SYMBOL;
      case "number":
        return NUMBER;
      case "bigint":
        return BIGINT;
      case "function":
      case "object": {
        if (V6 === null) {
          return NULL2;
        }
        return OBJECT;
      }
    }
  };
  webidl.util.Types = {
    UNDEFINED,
    BOOLEAN,
    STRING,
    SYMBOL,
    NUMBER,
    BIGINT,
    NULL: NULL2,
    OBJECT
  };
  webidl.util.TypeValueToString = function(o3) {
    switch (webidl.util.Type(o3)) {
      case UNDEFINED:
        return "Undefined";
      case BOOLEAN:
        return "Boolean";
      case STRING:
        return "String";
      case SYMBOL:
        return "Symbol";
      case NUMBER:
        return "Number";
      case BIGINT:
        return "BigInt";
      case NULL2:
        return "Null";
      case OBJECT:
        return "Object";
    }
  };
  webidl.util.markAsUncloneable = runtimeFeatures.has("markAsUncloneable") ? __require("node:worker_threads").markAsUncloneable : () => {};
  webidl.util.ConvertToInt = function(V6, bitLength, signedness, flags) {
    let upperBound;
    let lowerBound;
    if (bitLength === 64) {
      upperBound = Math.pow(2, 53) - 1;
      if (signedness === "unsigned") {
        lowerBound = 0;
      } else {
        lowerBound = Math.pow(-2, 53) + 1;
      }
    } else if (signedness === "unsigned") {
      lowerBound = 0;
      upperBound = Math.pow(2, bitLength) - 1;
    } else {
      lowerBound = -Math.pow(2, bitLength - 1);
      upperBound = Math.pow(2, bitLength - 1) - 1;
    }
    let x4 = Number(V6);
    if (x4 === 0) {
      x4 = 0;
    }
    if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) {
      if (Number.isNaN(x4) || x4 === Number.POSITIVE_INFINITY || x4 === Number.NEGATIVE_INFINITY) {
        throw webidl.errors.exception({
          header: "Integer conversion",
          message: `Could not convert ${webidl.util.Stringify(V6)} to an integer.`
        });
      }
      x4 = webidl.util.IntegerPart(x4);
      if (x4 < lowerBound || x4 > upperBound) {
        throw webidl.errors.exception({
          header: "Integer conversion",
          message: `Value must be between ${lowerBound}-${upperBound}, got ${x4}.`
        });
      }
      return x4;
    }
    if (!Number.isNaN(x4) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) {
      x4 = Math.min(Math.max(x4, lowerBound), upperBound);
      if (Math.floor(x4) % 2 === 0) {
        x4 = Math.floor(x4);
      } else {
        x4 = Math.ceil(x4);
      }
      return x4;
    }
    if (Number.isNaN(x4) || x4 === 0 && Object.is(0, x4) || x4 === Number.POSITIVE_INFINITY || x4 === Number.NEGATIVE_INFINITY) {
      return 0;
    }
    x4 = webidl.util.IntegerPart(x4);
    x4 = x4 % Math.pow(2, bitLength);
    if (signedness === "signed" && x4 >= Math.pow(2, bitLength - 1)) {
      return x4 - Math.pow(2, bitLength);
    }
    return x4;
  };
  webidl.util.IntegerPart = function(n3) {
    const r2 = Math.floor(Math.abs(n3));
    if (n3 < 0) {
      return -1 * r2;
    }
    return r2;
  };
  webidl.util.Stringify = function(V6) {
    const type2 = webidl.util.Type(V6);
    switch (type2) {
      case SYMBOL:
        return `Symbol(${V6.description})`;
      case OBJECT:
        return inspect(V6);
      case STRING:
        return `"${V6}"`;
      case BIGINT:
        return `${V6}n`;
      default:
        return `${V6}`;
    }
  };
  webidl.util.IsResizableArrayBuffer = function(V6) {
    if (types6.isArrayBuffer(V6)) {
      return V6.resizable;
    }
    if (types6.isSharedArrayBuffer(V6)) {
      return V6.growable;
    }
    throw webidl.errors.exception({
      header: "IsResizableArrayBuffer",
      message: `"${webidl.util.Stringify(V6)}" is not an array buffer.`
    });
  };
  webidl.util.HasFlag = function(flags, attributes) {
    return typeof flags === "number" && (flags & attributes) === attributes;
  };
  webidl.sequenceConverter = function(converter) {
    return (V6, prefix, argument, Iterable) => {
      if (webidl.util.Type(V6) !== OBJECT) {
        throw webidl.errors.exception({
          header: prefix,
          message: `${argument} (${webidl.util.Stringify(V6)}) is not iterable.`
        });
      }
      const method = typeof Iterable === "function" ? Iterable() : V6?.[Symbol.iterator]?.();
      const seq = [];
      let index2 = 0;
      if (method === undefined || typeof method.next !== "function") {
        throw webidl.errors.exception({
          header: prefix,
          message: `${argument} is not iterable.`
        });
      }
      while (true) {
        const { done, value } = method.next();
        if (done) {
          break;
        }
        seq.push(converter(value, prefix, `${argument}[${index2++}]`));
      }
      return seq;
    };
  };
  webidl.recordConverter = function(keyConverter, valueConverter) {
    return (O5, prefix, argument) => {
      if (webidl.util.Type(O5) !== OBJECT) {
        throw webidl.errors.exception({
          header: prefix,
          message: `${argument} ("${webidl.util.TypeValueToString(O5)}") is not an Object.`
        });
      }
      const result = {};
      if (!types6.isProxy(O5)) {
        const keys2 = [...Object.getOwnPropertyNames(O5), ...Object.getOwnPropertySymbols(O5)];
        for (const key of keys2) {
          const keyName = webidl.util.Stringify(key);
          const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`);
          const typedValue = valueConverter(O5[key], prefix, `${argument}[${keyName}]`);
          result[typedKey] = typedValue;
        }
        return result;
      }
      const keys = Reflect.ownKeys(O5);
      for (const key of keys) {
        const desc2 = Reflect.getOwnPropertyDescriptor(O5, key);
        if (desc2?.enumerable) {
          const typedKey = keyConverter(key, prefix, argument);
          const typedValue = valueConverter(O5[key], prefix, argument);
          result[typedKey] = typedValue;
        }
      }
      return result;
    };
  };
  webidl.interfaceConverter = function(TypeCheck, name3) {
    return (V6, prefix, argument) => {
      if (!TypeCheck(V6)) {
        throw webidl.errors.exception({
          header: prefix,
          message: `Expected ${argument} ("${webidl.util.Stringify(V6)}") to be an instance of ${name3}.`
        });
      }
      return V6;
    };
  };
  webidl.dictionaryConverter = function(converters) {
    converters.sort((a2, b5) => (a2.key > b5.key) - (a2.key < b5.key));
    return (dictionary, prefix, argument) => {
      const dict = {};
      if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) {
        throw webidl.errors.exception({
          header: prefix,
          message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`
        });
      }
      for (const options2 of converters) {
        const { key, defaultValue, required: required2, converter } = options2;
        if (required2 === true) {
          if (dictionary == null || !Object.hasOwn(dictionary, key)) {
            throw webidl.errors.exception({
              header: prefix,
              message: `Missing required key "${key}".`
            });
          }
        }
        let value = dictionary?.[key];
        const hasDefault = defaultValue !== undefined;
        if (hasDefault && value === undefined) {
          value = defaultValue();
        }
        if (required2 || hasDefault || value !== undefined) {
          value = converter(value, prefix, `${argument}.${key}`);
          if (options2.allowedValues && !options2.allowedValues.includes(value)) {
            throw webidl.errors.exception({
              header: prefix,
              message: `${value} is not an accepted type. Expected one of ${options2.allowedValues.join(", ")}.`
            });
          }
          dict[key] = value;
        }
      }
      return dict;
    };
  };
  webidl.nullableConverter = function(converter) {
    return (V6, prefix, argument) => {
      if (V6 === null) {
        return V6;
      }
      return converter(V6, prefix, argument);
    };
  };
  webidl.is.USVString = function(value) {
    return typeof value === "string" && value.isWellFormed();
  };
  webidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream);
  webidl.is.Blob = webidl.util.MakeTypeAssertion(Blob);
  webidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams);
  webidl.is.File = webidl.util.MakeTypeAssertion(File);
  webidl.is.URL = webidl.util.MakeTypeAssertion(URL);
  webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal);
  webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort);
  webidl.is.BufferSource = function(V6) {
    return types6.isArrayBuffer(V6) || ArrayBuffer.isView(V6) && types6.isArrayBuffer(V6.buffer);
  };
  webidl.util.getCopyOfBytesHeldByBufferSource = function(bufferSource) {
    const jsBufferSource = bufferSource;
    let jsArrayBuffer = jsBufferSource;
    let offset = 0;
    let length2 = 0;
    if (types6.isTypedArray(jsBufferSource) || types6.isDataView(jsBufferSource)) {
      jsArrayBuffer = jsBufferSource.buffer;
      offset = jsBufferSource.byteOffset;
      length2 = jsBufferSource.byteLength;
    } else {
      assert2(types6.isAnyArrayBuffer(jsBufferSource));
      length2 = jsBufferSource.byteLength;
    }
    if (jsArrayBuffer.detached) {
      return new Uint8Array(0);
    }
    const bytes = new Uint8Array(length2);
    const view = new Uint8Array(jsArrayBuffer, offset, length2);
    bytes.set(view);
    return bytes;
  };
  webidl.converters.DOMString = function(V6, prefix, argument, flags) {
    if (V6 === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) {
      return "";
    }
    if (typeof V6 === "symbol") {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} is a symbol, which cannot be converted to a DOMString.`
      });
    }
    return String(V6);
  };
  webidl.converters.ByteString = function(V6, prefix, argument) {
    if (typeof V6 === "symbol") {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} is a symbol, which cannot be converted to a ByteString.`
      });
    }
    const x4 = String(V6);
    for (let index2 = 0;index2 < x4.length; index2++) {
      if (x4.charCodeAt(index2) > 255) {
        throw new TypeError("Cannot convert argument to a ByteString because the character at " + `index ${index2} has a value of ${x4.charCodeAt(index2)} which is greater than 255.`);
      }
    }
    return x4;
  };
  webidl.converters.USVString = function(value) {
    if (typeof value === "string") {
      return value.toWellFormed();
    }
    return `${value}`.toWellFormed();
  };
  webidl.converters.boolean = function(V6) {
    const x4 = Boolean(V6);
    return x4;
  };
  webidl.converters.any = function(V6) {
    return V6;
  };
  webidl.converters["long long"] = function(V6, prefix, argument) {
    const x4 = webidl.util.ConvertToInt(V6, 64, "signed", 0, prefix, argument);
    return x4;
  };
  webidl.converters["unsigned long long"] = function(V6, prefix, argument) {
    const x4 = webidl.util.ConvertToInt(V6, 64, "unsigned", 0, prefix, argument);
    return x4;
  };
  webidl.converters["unsigned long"] = function(V6, prefix, argument) {
    const x4 = webidl.util.ConvertToInt(V6, 32, "unsigned", 0, prefix, argument);
    return x4;
  };
  webidl.converters["unsigned short"] = function(V6, prefix, argument, flags) {
    const x4 = webidl.util.ConvertToInt(V6, 16, "unsigned", flags, prefix, argument);
    return x4;
  };
  webidl.converters.ArrayBuffer = function(V6, prefix, argument, flags) {
    if (webidl.util.Type(V6) !== OBJECT || !types6.isArrayBuffer(V6)) {
      throw webidl.errors.conversionFailed({
        prefix,
        argument: `${argument} ("${webidl.util.Stringify(V6)}")`,
        types: ["ArrayBuffer"]
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V6)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a resizable ArrayBuffer.`
      });
    }
    return V6;
  };
  webidl.converters.SharedArrayBuffer = function(V6, prefix, argument, flags) {
    if (webidl.util.Type(V6) !== OBJECT || !types6.isSharedArrayBuffer(V6)) {
      throw webidl.errors.conversionFailed({
        prefix,
        argument: `${argument} ("${webidl.util.Stringify(V6)}")`,
        types: ["SharedArrayBuffer"]
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V6)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a resizable SharedArrayBuffer.`
      });
    }
    return V6;
  };
  webidl.converters.TypedArray = function(V6, T4, prefix, argument, flags) {
    if (webidl.util.Type(V6) !== OBJECT || !types6.isTypedArray(V6) || V6.constructor.name !== T4.name) {
      throw webidl.errors.conversionFailed({
        prefix,
        argument: `${argument} ("${webidl.util.Stringify(V6)}")`,
        types: [T4.name]
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types6.isSharedArrayBuffer(V6.buffer)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a view on a shared array buffer.`
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V6.buffer)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a view on a resizable array buffer.`
      });
    }
    return V6;
  };
  webidl.converters.DataView = function(V6, prefix, argument, flags) {
    if (webidl.util.Type(V6) !== OBJECT || !types6.isDataView(V6)) {
      throw webidl.errors.conversionFailed({
        prefix,
        argument: `${argument} ("${webidl.util.Stringify(V6)}")`,
        types: ["DataView"]
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types6.isSharedArrayBuffer(V6.buffer)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a view on a shared array buffer.`
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V6.buffer)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a view on a resizable array buffer.`
      });
    }
    return V6;
  };
  webidl.converters.ArrayBufferView = function(V6, prefix, argument, flags) {
    if (webidl.util.Type(V6) !== OBJECT || !types6.isArrayBufferView(V6)) {
      throw webidl.errors.conversionFailed({
        prefix,
        argument: `${argument} ("${webidl.util.Stringify(V6)}")`,
        types: ["ArrayBufferView"]
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types6.isSharedArrayBuffer(V6.buffer)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a view on a shared array buffer.`
      });
    }
    if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V6.buffer)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a view on a resizable array buffer.`
      });
    }
    return V6;
  };
  webidl.converters.BufferSource = function(V6, prefix, argument, flags) {
    if (types6.isArrayBuffer(V6)) {
      return webidl.converters.ArrayBuffer(V6, prefix, argument, flags);
    }
    if (types6.isArrayBufferView(V6)) {
      flags &= ~webidl.attributes.AllowShared;
      return webidl.converters.ArrayBufferView(V6, prefix, argument, flags);
    }
    if (types6.isSharedArrayBuffer(V6)) {
      throw webidl.errors.exception({
        header: prefix,
        message: `${argument} cannot be a SharedArrayBuffer.`
      });
    }
    throw webidl.errors.conversionFailed({
      prefix,
      argument: `${argument} ("${webidl.util.Stringify(V6)}")`,
      types: ["ArrayBuffer", "ArrayBufferView"]
    });
  };
  webidl.converters.AllowSharedBufferSource = function(V6, prefix, argument, flags) {
    if (types6.isArrayBuffer(V6)) {
      return webidl.converters.ArrayBuffer(V6, prefix, argument, flags);
    }
    if (types6.isSharedArrayBuffer(V6)) {
      return webidl.converters.SharedArrayBuffer(V6, prefix, argument, flags);
    }
    if (types6.isArrayBufferView(V6)) {
      flags |= webidl.attributes.AllowShared;
      return webidl.converters.ArrayBufferView(V6, prefix, argument, flags);
    }
    throw webidl.errors.conversionFailed({
      prefix,
      argument: `${argument} ("${webidl.util.Stringify(V6)}")`,
      types: ["ArrayBuffer", "SharedArrayBuffer", "ArrayBufferView"]
    });
  };
  webidl.converters["sequence<ByteString>"] = webidl.sequenceConverter(webidl.converters.ByteString);
  webidl.converters["sequence<sequence<ByteString>>"] = webidl.sequenceConverter(webidl.converters["sequence<ByteString>"]);
  webidl.converters["record<ByteString, ByteString>"] = webidl.recordConverter(webidl.converters.ByteString, webidl.converters.ByteString);
  webidl.converters.Blob = webidl.interfaceConverter(webidl.is.Blob, "Blob");
  webidl.converters.AbortSignal = webidl.interfaceConverter(webidl.is.AbortSignal, "AbortSignal");
  webidl.converters.EventHandlerNonNull = function(V6) {
    if (webidl.util.Type(V6) !== OBJECT) {
      return null;
    }
    if (typeof V6 === "function") {
      return V6;
    }
    return () => {};
  };
  webidl.attributes = {
    Clamp: 1 << 0,
    EnforceRange: 1 << 1,
    AllowShared: 1 << 2,
    AllowResizable: 1 << 3,
    LegacyNullToEmptyString: 1 << 4
  };
  module.exports = {
    webidl
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/util.js
var require_util4 = __commonJS((exports2, module) => {
  var { Transform } = __require("node:stream");
  var zlib = __require("node:zlib");
  var { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require_constants7();
  var { getGlobalOrigin } = require_global();
  var { collectAnHTTPQuotedString, parseMIMEType } = require_data_url();
  var { performance: performance3 } = __require("node:perf_hooks");
  var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util3();
  var assert2 = __require("node:assert");
  var { isUint8Array } = __require("node:util/types");
  var { webidl } = require_webidl();
  var { isomorphicEncode, collectASequenceOfCodePoints, removeChars } = require_infra();
  function responseURL(response) {
    const urlList = response.urlList;
    const length2 = urlList.length;
    return length2 === 0 ? null : urlList[length2 - 1].toString();
  }
  function responseLocationURL(response, requestFragment) {
    if (!redirectStatusSet.has(response.status)) {
      return null;
    }
    let location = response.headersList.get("location", true);
    if (location !== null && isValidHeaderValue(location)) {
      if (!isValidEncodedURL(location)) {
        location = normalizeBinaryStringToUtf8(location);
      }
      location = new URL(location, responseURL(response));
    }
    if (location && !location.hash) {
      location.hash = requestFragment;
    }
    return location;
  }
  function isValidEncodedURL(url2) {
    for (let i = 0;i < url2.length; ++i) {
      const code2 = url2.charCodeAt(i);
      if (code2 > 126 || code2 < 32) {
        return false;
      }
    }
    return true;
  }
  function normalizeBinaryStringToUtf8(value) {
    return Buffer.from(value, "binary").toString("utf8");
  }
  function requestCurrentURL(request2) {
    return request2.urlList[request2.urlList.length - 1];
  }
  function requestBadPort(request2) {
    const url2 = requestCurrentURL(request2);
    if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) {
      return "blocked";
    }
    return "allowed";
  }
  function isErrorLike(object2) {
    return object2 instanceof Error || (object2?.constructor?.name === "Error" || object2?.constructor?.name === "DOMException");
  }
  function isValidReasonPhrase(statusText) {
    for (let i = 0;i < statusText.length; ++i) {
      const c3 = statusText.charCodeAt(i);
      if (!(c3 === 9 || c3 >= 32 && c3 <= 126 || c3 >= 128 && c3 <= 255)) {
        return false;
      }
    }
    return true;
  }
  var isValidHeaderName = isValidHTTPToken;
  function isValidHeaderValue(potentialValue) {
    return (potentialValue[0] === "\t" || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === "\t" || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes(`
`) || potentialValue.includes("\r") || potentialValue.includes("\x00")) === false;
  }
  function parseReferrerPolicy(actualResponse) {
    const policyHeader = (actualResponse.headersList.get("referrer-policy", true) ?? "").split(",");
    let policy = "";
    if (policyHeader.length) {
      for (let i = policyHeader.length;i !== 0; i--) {
        const token2 = policyHeader[i - 1].trim();
        if (referrerPolicyTokens.has(token2)) {
          policy = token2;
          break;
        }
      }
    }
    return policy;
  }
  function setRequestReferrerPolicyOnRedirect(request2, actualResponse) {
    const policy = parseReferrerPolicy(actualResponse);
    if (policy !== "") {
      request2.referrerPolicy = policy;
    }
  }
  function crossOriginResourcePolicyCheck() {
    return "allowed";
  }
  function corsCheck() {
    return "success";
  }
  function TAOCheck() {
    return "success";
  }
  function appendFetchMetadata(httpRequest) {
    let header = null;
    header = httpRequest.mode;
    httpRequest.headersList.set("sec-fetch-mode", header, true);
  }
  function appendRequestOriginHeader(request2) {
    let serializedOrigin = request2.origin;
    if (serializedOrigin === "client" || serializedOrigin === undefined) {
      return;
    }
    if (request2.responseTainting === "cors" || request2.mode === "websocket") {
      request2.headersList.append("origin", serializedOrigin, true);
    } else if (request2.method !== "GET" && request2.method !== "HEAD") {
      switch (request2.referrerPolicy) {
        case "no-referrer":
          serializedOrigin = null;
          break;
        case "no-referrer-when-downgrade":
        case "strict-origin":
        case "strict-origin-when-cross-origin":
          if (request2.origin && urlHasHttpsScheme(request2.origin) && !urlHasHttpsScheme(requestCurrentURL(request2))) {
            serializedOrigin = null;
          }
          break;
        case "same-origin":
          if (!sameOrigin(request2, requestCurrentURL(request2))) {
            serializedOrigin = null;
          }
          break;
        default:
      }
      request2.headersList.append("origin", serializedOrigin, true);
    }
  }
  function coarsenTime(timestamp2, crossOriginIsolatedCapability) {
    return timestamp2;
  }
  function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) {
    if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) {
      return {
        domainLookupStartTime: defaultStartTime,
        domainLookupEndTime: defaultStartTime,
        connectionStartTime: defaultStartTime,
        connectionEndTime: defaultStartTime,
        secureConnectionStartTime: defaultStartTime,
        ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol
      };
    }
    return {
      domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability),
      domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability),
      connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability),
      connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability),
      secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability),
      ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol
    };
  }
  function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) {
    return coarsenTime(performance3.now(), crossOriginIsolatedCapability);
  }
  function createOpaqueTimingInfo(timingInfo) {
    return {
      startTime: timingInfo.startTime ?? 0,
      redirectStartTime: 0,
      redirectEndTime: 0,
      postRedirectStartTime: timingInfo.startTime ?? 0,
      finalServiceWorkerStartTime: 0,
      finalNetworkResponseStartTime: 0,
      finalNetworkRequestStartTime: 0,
      endTime: 0,
      encodedBodySize: 0,
      decodedBodySize: 0,
      finalConnectionTimingInfo: null
    };
  }
  function makePolicyContainer() {
    return {
      referrerPolicy: "strict-origin-when-cross-origin"
    };
  }
  function clonePolicyContainer(policyContainer) {
    return {
      referrerPolicy: policyContainer.referrerPolicy
    };
  }
  function determineRequestsReferrer(request2) {
    const policy = request2.referrerPolicy;
    assert2(policy);
    let referrerSource = null;
    if (request2.referrer === "client") {
      const globalOrigin = getGlobalOrigin();
      if (!globalOrigin || globalOrigin.origin === "null") {
        return "no-referrer";
      }
      referrerSource = new URL(globalOrigin);
    } else if (webidl.is.URL(request2.referrer)) {
      referrerSource = request2.referrer;
    }
    let referrerURL = stripURLForReferrer(referrerSource);
    const referrerOrigin = stripURLForReferrer(referrerSource, true);
    if (referrerURL.toString().length > 4096) {
      referrerURL = referrerOrigin;
    }
    switch (policy) {
      case "no-referrer":
        return "no-referrer";
      case "origin":
        if (referrerOrigin != null) {
          return referrerOrigin;
        }
        return stripURLForReferrer(referrerSource, true);
      case "unsafe-url":
        return referrerURL;
      case "strict-origin": {
        const currentURL = requestCurrentURL(request2);
        if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
          return "no-referrer";
        }
        return referrerOrigin;
      }
      case "strict-origin-when-cross-origin": {
        const currentURL = requestCurrentURL(request2);
        if (sameOrigin(referrerURL, currentURL)) {
          return referrerURL;
        }
        if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
          return "no-referrer";
        }
        return referrerOrigin;
      }
      case "same-origin":
        if (sameOrigin(request2, referrerURL)) {
          return referrerURL;
        }
        return "no-referrer";
      case "origin-when-cross-origin":
        if (sameOrigin(request2, referrerURL)) {
          return referrerURL;
        }
        return referrerOrigin;
      case "no-referrer-when-downgrade": {
        const currentURL = requestCurrentURL(request2);
        if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
          return "no-referrer";
        }
        return referrerURL;
      }
    }
  }
  function stripURLForReferrer(url2, originOnly = false) {
    assert2(webidl.is.URL(url2));
    url2 = new URL(url2);
    if (urlIsLocal(url2)) {
      return "no-referrer";
    }
    url2.username = "";
    url2.password = "";
    url2.hash = "";
    if (originOnly === true) {
      url2.pathname = "";
      url2.search = "";
    }
    return url2;
  }
  var isPotentialleTrustworthyIPv4 = RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/);
  var isPotentiallyTrustworthyIPv6 = RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);
  function isOriginIPPotentiallyTrustworthy(origin) {
    if (origin.includes(":")) {
      if (origin[0] === "[" && origin[origin.length - 1] === "]") {
        origin = origin.slice(1, -1);
      }
      return isPotentiallyTrustworthyIPv6(origin);
    }
    return isPotentialleTrustworthyIPv4(origin);
  }
  function isOriginPotentiallyTrustworthy(origin) {
    if (origin == null || origin === "null") {
      return false;
    }
    origin = new URL(origin);
    if (origin.protocol === "https:" || origin.protocol === "wss:") {
      return true;
    }
    if (isOriginIPPotentiallyTrustworthy(origin.hostname)) {
      return true;
    }
    if (origin.hostname === "localhost" || origin.hostname === "localhost.") {
      return true;
    }
    if (origin.hostname.endsWith(".localhost") || origin.hostname.endsWith(".localhost.")) {
      return true;
    }
    if (origin.protocol === "file:") {
      return true;
    }
    return false;
  }
  function isURLPotentiallyTrustworthy(url2) {
    if (!webidl.is.URL(url2)) {
      return false;
    }
    if (url2.href === "about:blank" || url2.href === "about:srcdoc") {
      return true;
    }
    if (url2.protocol === "data:")
      return true;
    if (url2.protocol === "blob:")
      return true;
    return isOriginPotentiallyTrustworthy(url2.origin);
  }
  function tryUpgradeRequestToAPotentiallyTrustworthyURL(request2) {}
  function sameOrigin(A3, B4) {
    if (A3.origin === B4.origin && A3.origin === "null") {
      return true;
    }
    if (A3.protocol === B4.protocol && A3.hostname === B4.hostname && A3.port === B4.port) {
      return true;
    }
    return false;
  }
  function isAborted(fetchParams) {
    return fetchParams.controller.state === "aborted";
  }
  function isCancelled(fetchParams) {
    return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated";
  }
  function normalizeMethod(method) {
    return normalizedMethodRecordsBase[method.toLowerCase()] ?? method;
  }
  var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));
  function createIterator(name3, kInternalIterator, keyIndex = 0, valueIndex = 1) {

    class FastIterableIterator {
      #target;
      #kind;
      #index;
      constructor(target, kind) {
        this.#target = target;
        this.#kind = kind;
        this.#index = 0;
      }
      next() {
        if (typeof this !== "object" || this === null || !(#target in this)) {
          throw new TypeError(`'next' called on an object that does not implement interface ${name3} Iterator.`);
        }
        const index2 = this.#index;
        const values = kInternalIterator(this.#target);
        const len = values.length;
        if (index2 >= len) {
          return {
            value: undefined,
            done: true
          };
        }
        const { [keyIndex]: key, [valueIndex]: value } = values[index2];
        this.#index = index2 + 1;
        let result;
        switch (this.#kind) {
          case "key":
            result = key;
            break;
          case "value":
            result = value;
            break;
          case "key+value":
            result = [key, value];
            break;
        }
        return {
          value: result,
          done: false
        };
      }
    }
    delete FastIterableIterator.prototype.constructor;
    Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype);
    Object.defineProperties(FastIterableIterator.prototype, {
      [Symbol.toStringTag]: {
        writable: false,
        enumerable: false,
        configurable: true,
        value: `${name3} Iterator`
      },
      next: { writable: true, enumerable: true, configurable: true }
    });
    return function(target, kind) {
      return new FastIterableIterator(target, kind);
    };
  }
  function iteratorMixin(name3, object2, kInternalIterator, keyIndex = 0, valueIndex = 1) {
    const makeIterator = createIterator(name3, kInternalIterator, keyIndex, valueIndex);
    const properties2 = {
      keys: {
        writable: true,
        enumerable: true,
        configurable: true,
        value: function keys() {
          webidl.brandCheck(this, object2);
          return makeIterator(this, "key");
        }
      },
      values: {
        writable: true,
        enumerable: true,
        configurable: true,
        value: function values() {
          webidl.brandCheck(this, object2);
          return makeIterator(this, "value");
        }
      },
      entries: {
        writable: true,
        enumerable: true,
        configurable: true,
        value: function entries() {
          webidl.brandCheck(this, object2);
          return makeIterator(this, "key+value");
        }
      },
      forEach: {
        writable: true,
        enumerable: true,
        configurable: true,
        value: function forEach(callbackfn, thisArg = globalThis) {
          webidl.brandCheck(this, object2);
          webidl.argumentLengthCheck(arguments, 1, `${name3}.forEach`);
          if (typeof callbackfn !== "function") {
            throw new TypeError(`Failed to execute 'forEach' on '${name3}': parameter 1 is not of type 'Function'.`);
          }
          for (const { 0: key, 1: value } of makeIterator(this, "key+value")) {
            callbackfn.call(thisArg, value, key, this);
          }
        }
      }
    };
    return Object.defineProperties(object2.prototype, {
      ...properties2,
      [Symbol.iterator]: {
        writable: true,
        enumerable: false,
        configurable: true,
        value: properties2.entries.value
      }
    });
  }
  function fullyReadBody(body2, processBody, processBodyError) {
    const successSteps = processBody;
    const errorSteps = processBodyError;
    try {
      const reader = body2.stream.getReader();
      readAllBytes(reader, successSteps, errorSteps);
    } catch (e3) {
      errorSteps(e3);
    }
  }
  function readableStreamClose(controller) {
    try {
      controller.close();
      controller.byobRequest?.respond(0);
    } catch (err) {
      if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) {
        throw err;
      }
    }
  }
  async function readAllBytes(reader, successSteps, failureSteps) {
    try {
      const bytes = [];
      let byteLength = 0;
      do {
        const { done, value: chunk } = await reader.read();
        if (done) {
          successSteps(Buffer.concat(bytes, byteLength));
          return;
        }
        if (!isUint8Array(chunk)) {
          failureSteps(new TypeError("Received non-Uint8Array chunk"));
          return;
        }
        bytes.push(chunk);
        byteLength += chunk.length;
      } while (true);
    } catch (e3) {
      failureSteps(e3);
    }
  }
  function urlIsLocal(url2) {
    assert2("protocol" in url2);
    const protocol = url2.protocol;
    return protocol === "about:" || protocol === "blob:" || protocol === "data:";
  }
  function urlHasHttpsScheme(url2) {
    return typeof url2 === "string" && url2[5] === ":" && url2[0] === "h" && url2[1] === "t" && url2[2] === "t" && url2[3] === "p" && url2[4] === "s" || url2.protocol === "https:";
  }
  function urlIsHttpHttpsScheme(url2) {
    assert2("protocol" in url2);
    const protocol = url2.protocol;
    return protocol === "http:" || protocol === "https:";
  }
  function simpleRangeHeaderValue(value, allowWhitespace) {
    const data = value;
    if (!data.startsWith("bytes")) {
      return "failure";
    }
    const position = { position: 5 };
    if (allowWhitespace) {
      collectASequenceOfCodePoints((char2) => char2 === "\t" || char2 === " ", data, position);
    }
    if (data.charCodeAt(position.position) !== 61) {
      return "failure";
    }
    position.position++;
    if (allowWhitespace) {
      collectASequenceOfCodePoints((char2) => char2 === "\t" || char2 === " ", data, position);
    }
    const rangeStart = collectASequenceOfCodePoints((char2) => {
      const code2 = char2.charCodeAt(0);
      return code2 >= 48 && code2 <= 57;
    }, data, position);
    const rangeStartValue = rangeStart.length ? Number(rangeStart) : null;
    if (allowWhitespace) {
      collectASequenceOfCodePoints((char2) => char2 === "\t" || char2 === " ", data, position);
    }
    if (data.charCodeAt(position.position) !== 45) {
      return "failure";
    }
    position.position++;
    if (allowWhitespace) {
      collectASequenceOfCodePoints((char2) => char2 === "\t" || char2 === " ", data, position);
    }
    const rangeEnd = collectASequenceOfCodePoints((char2) => {
      const code2 = char2.charCodeAt(0);
      return code2 >= 48 && code2 <= 57;
    }, data, position);
    const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null;
    if (position.position < data.length) {
      return "failure";
    }
    if (rangeEndValue === null && rangeStartValue === null) {
      return "failure";
    }
    if (rangeStartValue > rangeEndValue) {
      return "failure";
    }
    return { rangeStartValue, rangeEndValue };
  }
  function buildContentRange(rangeStart, rangeEnd, fullLength) {
    let contentRange = "bytes ";
    contentRange += isomorphicEncode(`${rangeStart}`);
    contentRange += "-";
    contentRange += isomorphicEncode(`${rangeEnd}`);
    contentRange += "/";
    contentRange += isomorphicEncode(`${fullLength}`);
    return contentRange;
  }

  class InflateStream extends Transform {
    #zlibOptions;
    constructor(zlibOptions) {
      super();
      this.#zlibOptions = zlibOptions;
    }
    _transform(chunk, encoding, callback) {
      if (!this._inflateStream) {
        if (chunk.length === 0) {
          callback();
          return;
        }
        this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate(this.#zlibOptions) : zlib.createInflateRaw(this.#zlibOptions);
        this._inflateStream.on("data", this.push.bind(this));
        this._inflateStream.on("end", () => this.push(null));
        this._inflateStream.on("error", (err) => this.destroy(err));
      }
      this._inflateStream.write(chunk, encoding, callback);
    }
    _final(callback) {
      if (this._inflateStream) {
        this._inflateStream.end();
        this._inflateStream = null;
      }
      callback();
    }
  }
  function createInflate(zlibOptions) {
    return new InflateStream(zlibOptions);
  }
  function extractMimeType(headers) {
    let charset = null;
    let essence = null;
    let mimeType = null;
    const values = getDecodeSplit("content-type", headers);
    if (values === null) {
      return "failure";
    }
    for (const value of values) {
      const temporaryMimeType = parseMIMEType(value);
      if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") {
        continue;
      }
      mimeType = temporaryMimeType;
      if (mimeType.essence !== essence) {
        charset = null;
        if (mimeType.parameters.has("charset")) {
          charset = mimeType.parameters.get("charset");
        }
        essence = mimeType.essence;
      } else if (!mimeType.parameters.has("charset") && charset !== null) {
        mimeType.parameters.set("charset", charset);
      }
    }
    if (mimeType == null) {
      return "failure";
    }
    return mimeType;
  }
  function gettingDecodingSplitting(value) {
    const input = value;
    const position = { position: 0 };
    const values = [];
    let temporaryValue = "";
    while (position.position < input.length) {
      temporaryValue += collectASequenceOfCodePoints((char2) => char2 !== '"' && char2 !== ",", input, position);
      if (position.position < input.length) {
        if (input.charCodeAt(position.position) === 34) {
          temporaryValue += collectAnHTTPQuotedString(input, position);
          if (position.position < input.length) {
            continue;
          }
        } else {
          assert2(input.charCodeAt(position.position) === 44);
          position.position++;
        }
      }
      temporaryValue = removeChars(temporaryValue, true, true, (char2) => char2 === 9 || char2 === 32);
      values.push(temporaryValue);
      temporaryValue = "";
    }
    return values;
  }
  function getDecodeSplit(name3, list2) {
    const value = list2.get(name3, true);
    if (value === null) {
      return null;
    }
    return gettingDecodingSplitting(value);
  }
  function hasAuthenticationEntry(request2) {
    return false;
  }
  function includesCredentials(url2) {
    return !!(url2.username || url2.password);
  }
  function isTraversableNavigable(navigable) {
    return navigable != null && navigable !== "client" && navigable !== "no-traversable";
  }

  class EnvironmentSettingsObjectBase {
    get baseUrl() {
      return getGlobalOrigin();
    }
    get origin() {
      return this.baseUrl?.origin;
    }
    policyContainer = makePolicyContainer();
  }

  class EnvironmentSettingsObject {
    settingsObject = new EnvironmentSettingsObjectBase;
  }
  var environmentSettingsObject = new EnvironmentSettingsObject;
  module.exports = {
    isAborted,
    isCancelled,
    isValidEncodedURL,
    ReadableStreamFrom,
    tryUpgradeRequestToAPotentiallyTrustworthyURL,
    clampAndCoarsenConnectionTimingInfo,
    coarsenedSharedCurrentTime,
    determineRequestsReferrer,
    makePolicyContainer,
    clonePolicyContainer,
    appendFetchMetadata,
    appendRequestOriginHeader,
    TAOCheck,
    corsCheck,
    crossOriginResourcePolicyCheck,
    createOpaqueTimingInfo,
    setRequestReferrerPolicyOnRedirect,
    isValidHTTPToken,
    requestBadPort,
    requestCurrentURL,
    responseURL,
    responseLocationURL,
    isURLPotentiallyTrustworthy,
    isValidReasonPhrase,
    sameOrigin,
    normalizeMethod,
    iteratorMixin,
    createIterator,
    isValidHeaderName,
    isValidHeaderValue,
    isErrorLike,
    fullyReadBody,
    readableStreamClose,
    urlIsLocal,
    urlHasHttpsScheme,
    urlIsHttpHttpsScheme,
    readAllBytes,
    simpleRangeHeaderValue,
    buildContentRange,
    createInflate,
    extractMimeType,
    getDecodeSplit,
    environmentSettingsObject,
    isOriginIPPotentiallyTrustworthy,
    hasAuthenticationEntry,
    includesCredentials,
    isTraversableNavigable
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/formdata.js
var require_formdata = __commonJS((exports2, module) => {
  var { iteratorMixin } = require_util4();
  var { kEnumerableProperty } = require_util3();
  var { webidl } = require_webidl();
  var nodeUtil = __require("node:util");

  class FormData2 {
    #state = [];
    constructor(form = undefined) {
      webidl.util.markAsUncloneable(this);
      if (form !== undefined) {
        throw webidl.errors.conversionFailed({
          prefix: "FormData constructor",
          argument: "Argument 1",
          types: ["undefined"]
        });
      }
    }
    append(name3, value, filename = undefined) {
      webidl.brandCheck(this, FormData2);
      const prefix = "FormData.append";
      webidl.argumentLengthCheck(arguments, 2, prefix);
      name3 = webidl.converters.USVString(name3);
      if (arguments.length === 3 || webidl.is.Blob(value)) {
        value = webidl.converters.Blob(value, prefix, "value");
        if (filename !== undefined) {
          filename = webidl.converters.USVString(filename);
        }
      } else {
        value = webidl.converters.USVString(value);
      }
      const entry = makeEntry(name3, value, filename);
      this.#state.push(entry);
    }
    delete(name3) {
      webidl.brandCheck(this, FormData2);
      const prefix = "FormData.delete";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      name3 = webidl.converters.USVString(name3);
      this.#state = this.#state.filter((entry) => entry.name !== name3);
    }
    get(name3) {
      webidl.brandCheck(this, FormData2);
      const prefix = "FormData.get";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      name3 = webidl.converters.USVString(name3);
      const idx = this.#state.findIndex((entry) => entry.name === name3);
      if (idx === -1) {
        return null;
      }
      return this.#state[idx].value;
    }
    getAll(name3) {
      webidl.brandCheck(this, FormData2);
      const prefix = "FormData.getAll";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      name3 = webidl.converters.USVString(name3);
      return this.#state.filter((entry) => entry.name === name3).map((entry) => entry.value);
    }
    has(name3) {
      webidl.brandCheck(this, FormData2);
      const prefix = "FormData.has";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      name3 = webidl.converters.USVString(name3);
      return this.#state.findIndex((entry) => entry.name === name3) !== -1;
    }
    set(name3, value, filename = undefined) {
      webidl.brandCheck(this, FormData2);
      const prefix = "FormData.set";
      webidl.argumentLengthCheck(arguments, 2, prefix);
      name3 = webidl.converters.USVString(name3);
      if (arguments.length === 3 || webidl.is.Blob(value)) {
        value = webidl.converters.Blob(value, prefix, "value");
        if (filename !== undefined) {
          filename = webidl.converters.USVString(filename);
        }
      } else {
        value = webidl.converters.USVString(value);
      }
      const entry = makeEntry(name3, value, filename);
      const idx = this.#state.findIndex((entry2) => entry2.name === name3);
      if (idx !== -1) {
        this.#state = [
          ...this.#state.slice(0, idx),
          entry,
          ...this.#state.slice(idx + 1).filter((entry2) => entry2.name !== name3)
        ];
      } else {
        this.#state.push(entry);
      }
    }
    [nodeUtil.inspect.custom](depth, options2) {
      const state = this.#state.reduce((a2, b5) => {
        if (a2[b5.name]) {
          if (Array.isArray(a2[b5.name])) {
            a2[b5.name].push(b5.value);
          } else {
            a2[b5.name] = [a2[b5.name], b5.value];
          }
        } else {
          a2[b5.name] = b5.value;
        }
        return a2;
      }, { __proto__: null });
      options2.depth ??= depth;
      options2.colors ??= true;
      const output = nodeUtil.formatWithOptions(options2, state);
      return `FormData ${output.slice(output.indexOf("]") + 2)}`;
    }
    static getFormDataState(formData) {
      return formData.#state;
    }
    static setFormDataState(formData, newState) {
      formData.#state = newState;
    }
  }
  var { getFormDataState, setFormDataState } = FormData2;
  Reflect.deleteProperty(FormData2, "getFormDataState");
  Reflect.deleteProperty(FormData2, "setFormDataState");
  iteratorMixin("FormData", FormData2, getFormDataState, "name", "value");
  Object.defineProperties(FormData2.prototype, {
    append: kEnumerableProperty,
    delete: kEnumerableProperty,
    get: kEnumerableProperty,
    getAll: kEnumerableProperty,
    has: kEnumerableProperty,
    set: kEnumerableProperty,
    [Symbol.toStringTag]: {
      value: "FormData",
      configurable: true
    }
  });
  function makeEntry(name3, value, filename) {
    if (typeof value === "string") {} else {
      if (!webidl.is.File(value)) {
        value = new File([value], "blob", { type: value.type });
      }
      if (filename !== undefined) {
        const options2 = {
          type: value.type,
          lastModified: value.lastModified
        };
        value = new File([value], filename, options2);
      }
    }
    return { name: name3, value };
  }
  webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData2);
  module.exports = { FormData: FormData2, makeEntry, setFormDataState };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/formdata-parser.js
var require_formdata_parser = __commonJS((exports2, module) => {
  var { bufferToLowerCasedHeaderName } = require_util3();
  var { HTTP_TOKEN_CODEPOINTS } = require_data_url();
  var { makeEntry } = require_formdata();
  var { webidl } = require_webidl();
  var assert2 = __require("node:assert");
  var { isomorphicDecode } = require_infra();
  var dd = Buffer.from("--");
  var decoder2 = new TextDecoder;
  var decoderIgnoreBOM = new TextDecoder("utf-8", { ignoreBOM: true });
  function isAsciiString(chars) {
    for (let i = 0;i < chars.length; ++i) {
      if ((chars.charCodeAt(i) & ~127) !== 0) {
        return false;
      }
    }
    return true;
  }
  function validateBoundary(boundary) {
    const length2 = boundary.length;
    if (length2 < 27 || length2 > 70) {
      return false;
    }
    for (let i = 0;i < length2; ++i) {
      const cp = boundary.charCodeAt(i);
      if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) {
        return false;
      }
    }
    return true;
  }
  function multipartFormDataParser(input, mimeType) {
    assert2(mimeType !== "failure" && mimeType.essence === "multipart/form-data");
    const boundaryString = mimeType.parameters.get("boundary");
    if (boundaryString === undefined) {
      throw parsingError("missing boundary in content-type header");
    }
    const boundary = Buffer.from(`--${boundaryString}`, "utf8");
    const entryList = [];
    const position = { position: 0 };
    const firstBoundaryIndex = input.indexOf(boundary);
    if (firstBoundaryIndex === -1) {
      throw parsingError("no boundary found in multipart body");
    }
    position.position = firstBoundaryIndex;
    while (true) {
      if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) {
        position.position += boundary.length;
      } else {
        throw parsingError("expected a value starting with -- and the boundary");
      }
      if (bufferStartsWith(input, dd, position)) {
        return entryList;
      }
      if (input[position.position] !== 13 || input[position.position + 1] !== 10) {
        throw parsingError("expected CRLF");
      }
      position.position += 2;
      const result = parseMultipartFormDataHeaders(input, position);
      let { name: name3, filename, contentType, encoding } = result;
      position.position += 2;
      let body2;
      {
        const boundaryIndex = input.indexOf(boundary.subarray(2), position.position);
        if (boundaryIndex === -1) {
          throw parsingError("expected boundary after body");
        }
        body2 = input.subarray(position.position, boundaryIndex - 4);
        position.position += body2.length;
        if (encoding === "base64") {
          body2 = Buffer.from(body2.toString(), "base64");
        }
      }
      if (input[position.position] !== 13 || input[position.position + 1] !== 10) {
        throw parsingError("expected CRLF");
      } else {
        position.position += 2;
      }
      let value;
      if (filename !== null) {
        contentType ??= "text/plain";
        if (!isAsciiString(contentType)) {
          contentType = "";
        }
        value = new File([body2], filename, { type: contentType });
      } else {
        value = decoderIgnoreBOM.decode(Buffer.from(body2));
      }
      assert2(webidl.is.USVString(name3));
      assert2(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value));
      entryList.push(makeEntry(name3, value, filename));
    }
  }
  function parseContentDispositionAttribute(input, position) {
    if (input[position.position] === 59) {
      position.position++;
    }
    collectASequenceOfBytes((char2) => char2 === 32 || char2 === 9, input, position);
    const attributeName = collectASequenceOfBytes((char2) => isToken(char2) && char2 !== 61 && char2 !== 42, input, position);
    if (attributeName.length === 0) {
      return null;
    }
    const attrNameStr = attributeName.toString("ascii").toLowerCase();
    const isExtended = input[position.position] === 42;
    if (isExtended) {
      position.position++;
    }
    if (input[position.position] !== 61) {
      return null;
    }
    position.position++;
    collectASequenceOfBytes((char2) => char2 === 32 || char2 === 9, input, position);
    let value;
    if (isExtended) {
      const headerValue = collectASequenceOfBytes((char2) => char2 !== 32 && char2 !== 13 && char2 !== 10 && char2 !== 59, input, position);
      if (headerValue[0] !== 117 && headerValue[0] !== 85 || headerValue[1] !== 116 && headerValue[1] !== 84 || headerValue[2] !== 102 && headerValue[2] !== 70 || headerValue[3] !== 45 || headerValue[4] !== 56) {
        throw parsingError("unknown encoding, expected utf-8''");
      }
      value = decodeURIComponent(decoder2.decode(headerValue.subarray(7)));
    } else if (input[position.position] === 34) {
      position.position++;
      const quotedValue = collectASequenceOfBytes((char2) => char2 !== 10 && char2 !== 13 && char2 !== 34, input, position);
      if (input[position.position] !== 34) {
        throw parsingError("Closing quote not found");
      }
      position.position++;
      value = decoder2.decode(quotedValue).replace(/%0A/ig, `
`).replace(/%0D/ig, "\r").replace(/%22/g, '"');
    } else {
      const tokenValue = collectASequenceOfBytes((char2) => isToken(char2) && char2 !== 59, input, position);
      value = decoder2.decode(tokenValue);
    }
    return { name: attrNameStr, value, extended: isExtended };
  }
  function parseMultipartFormDataHeaders(input, position) {
    let name3 = null;
    let filename = null;
    let contentType = null;
    let encoding = null;
    while (true) {
      if (input[position.position] === 13 && input[position.position + 1] === 10) {
        if (name3 === null) {
          throw parsingError("header name is null");
        }
        return { name: name3, filename, contentType, encoding };
      }
      let headerName = collectASequenceOfBytes((char2) => char2 !== 10 && char2 !== 13 && char2 !== 58, input, position);
      headerName = removeChars(headerName, true, true, (char2) => char2 === 9 || char2 === 32);
      if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) {
        throw parsingError("header name does not match the field-name token production");
      }
      if (input[position.position] !== 58) {
        throw parsingError("expected :");
      }
      position.position++;
      collectASequenceOfBytes((char2) => char2 === 32 || char2 === 9, input, position);
      switch (bufferToLowerCasedHeaderName(headerName)) {
        case "content-disposition": {
          name3 = filename = null;
          let filenameIsExtended = false;
          const dispositionType = collectASequenceOfBytes((char2) => isToken(char2), input, position);
          if (dispositionType.toString("ascii").toLowerCase() !== "form-data") {
            throw parsingError("expected form-data for content-disposition header");
          }
          while (position.position < input.length && (input[position.position] !== 13 || input[position.position + 1] !== 10)) {
            const attribute = parseContentDispositionAttribute(input, position);
            if (!attribute) {
              break;
            }
            if (attribute.name === "name") {
              name3 = attribute.value;
            } else if (attribute.name === "filename") {
              if (attribute.extended) {
                filename = attribute.value;
                filenameIsExtended = true;
              } else if (!filenameIsExtended) {
                filename = attribute.value;
              }
            }
          }
          if (name3 === null) {
            throw parsingError("name attribute is required in content-disposition header");
          }
          break;
        }
        case "content-type": {
          let headerValue = collectASequenceOfBytes((char2) => char2 !== 10 && char2 !== 13, input, position);
          headerValue = removeChars(headerValue, false, true, (char2) => char2 === 9 || char2 === 32);
          contentType = isomorphicDecode(headerValue);
          break;
        }
        case "content-transfer-encoding": {
          let headerValue = collectASequenceOfBytes((char2) => char2 !== 10 && char2 !== 13, input, position);
          headerValue = removeChars(headerValue, false, true, (char2) => char2 === 9 || char2 === 32);
          encoding = isomorphicDecode(headerValue);
          break;
        }
        default: {
          collectASequenceOfBytes((char2) => char2 !== 10 && char2 !== 13, input, position);
        }
      }
      if (input[position.position] !== 13 || input[position.position + 1] !== 10) {
        throw parsingError("expected CRLF");
      } else {
        position.position += 2;
      }
    }
  }
  function collectASequenceOfBytes(condition, input, position) {
    let start = position.position;
    while (start < input.length && condition(input[start])) {
      ++start;
    }
    return input.subarray(position.position, position.position = start);
  }
  function removeChars(buf, leading, trailing, predicate) {
    let lead = 0;
    let trail = buf.length - 1;
    if (leading) {
      while (lead < buf.length && predicate(buf[lead]))
        lead++;
    }
    if (trailing) {
      while (trail > 0 && predicate(buf[trail]))
        trail--;
    }
    return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1);
  }
  function bufferStartsWith(buffer, start, position) {
    if (buffer.length < start.length) {
      return false;
    }
    for (let i = 0;i < start.length; i++) {
      if (start[i] !== buffer[position.position + i]) {
        return false;
      }
    }
    return true;
  }
  function parsingError(cause) {
    return new TypeError("Failed to parse body as FormData.", { cause: new TypeError(cause) });
  }
  function isCTL(char2) {
    return char2 <= 31 || char2 === 127;
  }
  function isTSpecial(char2) {
    return char2 === 40 || char2 === 41 || char2 === 60 || char2 === 62 || char2 === 64 || char2 === 44 || char2 === 59 || char2 === 58 || char2 === 92 || char2 === 34 || char2 === 47 || char2 === 91 || char2 === 93 || char2 === 63 || char2 === 61;
  }
  function isToken(char2) {
    return char2 <= 127 && char2 !== 32 && char2 !== 9 && !isCTL(char2) && !isTSpecial(char2);
  }
  module.exports = {
    multipartFormDataParser,
    validateBoundary
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/util/promise.js
var require_promise3 = __commonJS((exports2, module) => {
  function createDeferredPromise() {
    let res;
    let rej;
    const promise2 = new Promise((resolve3, reject) => {
      res = resolve3;
      rej = reject;
    });
    return { promise: promise2, resolve: res, reject: rej };
  }
  module.exports = {
    createDeferredPromise
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/body.js
var require_body = __commonJS((exports2, module) => {
  var util3 = require_util3();
  var {
    ReadableStreamFrom,
    readableStreamClose,
    fullyReadBody,
    extractMimeType
  } = require_util4();
  var { FormData: FormData2, setFormDataState } = require_formdata();
  var { webidl } = require_webidl();
  var assert2 = __require("node:assert");
  var { isErrored, isDisturbed } = __require("node:stream");
  var { isUint8Array } = __require("node:util/types");
  var { serializeAMimeType } = require_data_url();
  var { multipartFormDataParser } = require_formdata_parser();
  var { createDeferredPromise } = require_promise3();
  var { parseJSONFromBytes } = require_infra();
  var { utf8DecodeBytes } = require_encoding();
  var { runtimeFeatures } = require_runtime_features();
  var random = runtimeFeatures.has("crypto") ? __require("node:crypto").randomInt : (max) => Math.floor(Math.random() * max);
  var textEncoder = new TextEncoder;
  function noop2() {}
  var streamRegistry = new FinalizationRegistry((weakRef) => {
    const stream2 = weakRef.deref();
    if (stream2 && !stream2.locked && !isDisturbed(stream2) && !isErrored(stream2)) {
      stream2.cancel("Response object has been garbage collected").catch(noop2);
    }
  });
  function extractBody(object2, keepalive = false) {
    let stream2 = null;
    let controller = null;
    if (webidl.is.ReadableStream(object2)) {
      stream2 = object2;
    } else if (webidl.is.Blob(object2)) {
      stream2 = object2.stream();
    } else {
      stream2 = new ReadableStream({
        pull() {},
        start(c3) {
          controller = c3;
        },
        cancel() {},
        type: "bytes"
      });
    }
    assert2(webidl.is.ReadableStream(stream2));
    let action = null;
    let source = null;
    let length2 = null;
    let type2 = null;
    if (typeof object2 === "string") {
      source = object2;
      type2 = "text/plain;charset=UTF-8";
    } else if (webidl.is.URLSearchParams(object2)) {
      source = object2.toString();
      type2 = "application/x-www-form-urlencoded;charset=UTF-8";
    } else if (webidl.is.BufferSource(object2)) {
      source = webidl.util.getCopyOfBytesHeldByBufferSource(object2);
    } else if (webidl.is.FormData(object2)) {
      const boundary = `----formdata-undici-0${`${random(100000000000)}`.padStart(11, "0")}`;
      const prefix = `--${boundary}\r
Content-Disposition: form-data`;
      /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
      const formdataEscape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
      const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, `\r
`);
      const blobParts = [];
      const rn4 = new Uint8Array([13, 10]);
      length2 = 0;
      let hasUnknownSizeValue = false;
      for (const [name3, value] of object2) {
        if (typeof value === "string") {
          const chunk2 = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name3))}"` + `\r
\r
${normalizeLinefeeds(value)}\r
`);
          blobParts.push(chunk2);
          length2 += chunk2.byteLength;
        } else {
          const chunk2 = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name3))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + `\r
` + `Content-Type: ${value.type || "application/octet-stream"}\r
\r
`);
          blobParts.push(chunk2, value, rn4);
          if (typeof value.size === "number") {
            length2 += chunk2.byteLength + value.size + rn4.byteLength;
          } else {
            hasUnknownSizeValue = true;
          }
        }
      }
      const chunk = textEncoder.encode(`--${boundary}--\r
`);
      blobParts.push(chunk);
      length2 += chunk.byteLength;
      if (hasUnknownSizeValue) {
        length2 = null;
      }
      source = object2;
      action = async function* () {
        for (const part of blobParts) {
          if (part.stream) {
            yield* part.stream();
          } else {
            yield part;
          }
        }
      };
      type2 = `multipart/form-data; boundary=${boundary}`;
    } else if (webidl.is.Blob(object2)) {
      source = object2;
      length2 = object2.size;
      if (object2.type) {
        type2 = object2.type;
      }
    } else if (typeof object2[Symbol.asyncIterator] === "function") {
      if (keepalive) {
        throw new TypeError("keepalive");
      }
      if (util3.isDisturbed(object2) || object2.locked) {
        throw new TypeError("Response body object should not be disturbed or locked");
      }
      stream2 = webidl.is.ReadableStream(object2) ? object2 : ReadableStreamFrom(object2);
    }
    if (typeof source === "string" || isUint8Array(source)) {
      action = () => {
        length2 = typeof source === "string" ? Buffer.byteLength(source) : source.length;
        return source;
      };
    }
    if (action != null) {
      (async () => {
        const result = action();
        const iterator = result?.[Symbol.asyncIterator]?.();
        if (iterator) {
          for await (const bytes of iterator) {
            if (isErrored(stream2))
              break;
            if (bytes.length) {
              controller.enqueue(new Uint8Array(bytes));
            }
          }
        } else if (result?.length && !isErrored(stream2)) {
          controller.enqueue(typeof result === "string" ? textEncoder.encode(result) : new Uint8Array(result));
        }
        queueMicrotask(() => readableStreamClose(controller));
      })();
    }
    const body2 = { stream: stream2, source, length: length2 };
    return [body2, type2];
  }
  function safelyExtractBody(object2, keepalive = false) {
    if (webidl.is.ReadableStream(object2)) {
      assert2(!util3.isDisturbed(object2), "The body has already been consumed.");
      assert2(!object2.locked, "The stream is locked.");
    }
    return extractBody(object2, keepalive);
  }
  function cloneBody(body2) {
    const { 0: out1, 1: out2 } = body2.stream.tee();
    body2.stream = out1;
    return {
      stream: out2,
      length: body2.length,
      source: body2.source
    };
  }
  function bodyMixinMethods(instance, getInternalState) {
    const methods = {
      blob() {
        return consumeBody(this, (bytes) => {
          let mimeType = bodyMimeType(getInternalState(this));
          if (mimeType === null) {
            mimeType = "";
          } else if (mimeType) {
            mimeType = serializeAMimeType(mimeType);
          }
          return new Blob([bytes], { type: mimeType });
        }, instance, getInternalState);
      },
      arrayBuffer() {
        return consumeBody(this, (bytes) => {
          return new Uint8Array(bytes).buffer;
        }, instance, getInternalState);
      },
      text() {
        return consumeBody(this, utf8DecodeBytes, instance, getInternalState);
      },
      json() {
        return consumeBody(this, parseJSONFromBytes, instance, getInternalState);
      },
      formData() {
        return consumeBody(this, (value) => {
          const mimeType = bodyMimeType(getInternalState(this));
          if (mimeType !== null) {
            switch (mimeType.essence) {
              case "multipart/form-data": {
                const parsed = multipartFormDataParser(value, mimeType);
                const fd = new FormData2;
                setFormDataState(fd, parsed);
                return fd;
              }
              case "application/x-www-form-urlencoded": {
                const entries = new URLSearchParams(value.toString());
                const fd = new FormData2;
                for (const [name3, value2] of entries) {
                  fd.append(name3, value2);
                }
                return fd;
              }
            }
          }
          throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".');
        }, instance, getInternalState);
      },
      bytes() {
        return consumeBody(this, (bytes) => {
          return new Uint8Array(bytes);
        }, instance, getInternalState);
      }
    };
    return methods;
  }
  function mixinBody(prototype, getInternalState) {
    Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState));
  }
  function consumeBody(object2, convertBytesToJSValue, instance, getInternalState) {
    try {
      webidl.brandCheck(object2, instance);
    } catch (e3) {
      return Promise.reject(e3);
    }
    object2 = getInternalState(object2);
    if (bodyUnusable(object2)) {
      return Promise.reject(new TypeError("Body is unusable: Body has already been read"));
    }
    const promise2 = createDeferredPromise();
    const errorSteps = promise2.reject;
    const successSteps = (data) => {
      try {
        promise2.resolve(convertBytesToJSValue(data));
      } catch (e3) {
        errorSteps(e3);
      }
    };
    if (object2.body == null) {
      successSteps(Buffer.allocUnsafe(0));
      return promise2.promise;
    }
    fullyReadBody(object2.body, successSteps, errorSteps);
    return promise2.promise;
  }
  function bodyUnusable(object2) {
    const body2 = object2.body;
    return body2 != null && (body2.stream.locked || util3.isDisturbed(body2.stream));
  }
  function bodyMimeType(requestOrResponse) {
    const headers = requestOrResponse.headersList;
    const mimeType = extractMimeType(headers);
    if (mimeType === "failure") {
      return null;
    }
    return mimeType;
  }
  module.exports = {
    extractBody,
    safelyExtractBody,
    cloneBody,
    mixinBody,
    streamRegistry,
    bodyUnusable
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/client-h1.js
var require_client_h1 = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var util3 = require_util3();
  var { channels } = require_diagnostics();
  var timers = require_timers();
  var {
    RequestContentLengthMismatchError,
    ResponseContentLengthMismatchError,
    RequestAbortedError,
    HeadersTimeoutError,
    HeadersOverflowError,
    SocketError,
    InformationalError,
    BodyTimeoutError,
    HTTPParserError,
    ResponseExceededMaxSizeError
  } = require_errors8();
  var {
    kUrl,
    kReset,
    kClient,
    kParser,
    kBlocking,
    kRunning,
    kPending,
    kSize,
    kWriting,
    kQueue,
    kNoRef,
    kKeepAliveDefaultTimeout,
    kHostHeader,
    kPendingIdx,
    kRunningIdx,
    kError,
    kPipelining,
    kSocket,
    kKeepAliveTimeoutValue,
    kMaxHeadersSize,
    kKeepAliveMaxTimeout,
    kKeepAliveTimeoutThreshold,
    kHeadersTimeout,
    kBodyTimeout,
    kStrictContentLength,
    kMaxRequests,
    kCounter,
    kMaxResponseSize,
    kOnError,
    kResume,
    kHTTPContext,
    kClosed
  } = require_symbols2();
  var constants = require_constants6();
  var EMPTY_BUF = Buffer.alloc(0);
  var FastBuffer = Buffer[Symbol.species];
  var removeAllListeners = util3.removeAllListeners;
  var kIdleSocketValidation = Symbol("kIdleSocketValidation");
  var kIdleSocketValidationTimeout = Symbol("kIdleSocketValidationTimeout");
  var kSocketUsed = Symbol("kSocketUsed");
  var extractBody;
  function lazyllhttp() {
    const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : undefined;
    let mod;
    let useWasmSIMD = process.arch !== "ppc64";
    if (process.env.UNDICI_NO_WASM_SIMD === "1") {
      useWasmSIMD = false;
    } else if (process.env.UNDICI_NO_WASM_SIMD === "0") {
      useWasmSIMD = true;
    }
    if (useWasmSIMD) {
      try {
        mod = new WebAssembly.Module(require_llhttp_simd_wasm());
      } catch {}
    }
    if (!mod) {
      mod = new WebAssembly.Module(llhttpWasmData || require_llhttp_wasm());
    }
    return new WebAssembly.Instance(mod, {
      env: {
        wasm_on_url: (p3, at4, len) => {
          return 0;
        },
        wasm_on_status: (p3, at4, len) => {
          assert2(currentParser.ptr === p3);
          const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
          return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len));
        },
        wasm_on_message_begin: (p3) => {
          assert2(currentParser.ptr === p3);
          return currentParser.onMessageBegin();
        },
        wasm_on_header_field: (p3, at4, len) => {
          assert2(currentParser.ptr === p3);
          const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
          return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len));
        },
        wasm_on_header_value: (p3, at4, len) => {
          assert2(currentParser.ptr === p3);
          const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
          return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len));
        },
        wasm_on_headers_complete: (p3, statusCode, upgrade, shouldKeepAlive) => {
          assert2(currentParser.ptr === p3);
          return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1);
        },
        wasm_on_body: (p3, at4, len) => {
          assert2(currentParser.ptr === p3);
          const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
          return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len));
        },
        wasm_on_message_complete: (p3) => {
          assert2(currentParser.ptr === p3);
          return currentParser.onMessageComplete();
        }
      }
    });
  }
  var llhttpInstance = null;
  var currentParser = null;
  var currentBufferRef = null;
  var currentBufferSize = 0;
  var currentBufferPtr = null;
  var USE_NATIVE_TIMER = 0;
  var USE_FAST_TIMER = 1;
  var TIMEOUT_HEADERS = 2 | USE_FAST_TIMER;
  var TIMEOUT_BODY = 4 | USE_FAST_TIMER;
  var TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER;

  class Parser2 {
    constructor(client, socket, { exports: exports3 }) {
      this.llhttp = exports3;
      this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE);
      this.client = client;
      this.socket = socket;
      this.timeout = null;
      this.timeoutWeakRef = new WeakRef(this);
      this.timeoutValue = null;
      this.timeoutType = null;
      this.statusCode = 0;
      this.statusText = "";
      this.upgrade = false;
      this.headers = [];
      this.headersSize = 0;
      this.headersMaxSize = client[kMaxHeadersSize];
      this.shouldKeepAlive = false;
      this.paused = false;
      this.resume = this.resume.bind(this);
      this.bytesRead = 0;
      this.keepAlive = "";
      this.contentLength = "";
      this.connection = "";
      this.maxResponseSize = client[kMaxResponseSize];
    }
    setTimeout(delay, type2) {
      if (delay !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) {
        if (this.timeout) {
          timers.clearTimeout(this.timeout);
          this.timeout = null;
        }
        if (delay) {
          if (type2 & USE_FAST_TIMER) {
            this.timeout = timers.setFastTimeout(onParserTimeout, delay, this.timeoutWeakRef);
          } else {
            this.timeout = setTimeout(onParserTimeout, delay, this.timeoutWeakRef);
            this.timeout?.unref();
          }
        }
        this.timeoutValue = delay;
      } else if (this.timeout) {
        if (this.timeout.refresh) {
          this.timeout.refresh();
        }
      }
      this.timeoutType = type2;
    }
    resume() {
      if (this.socket.destroyed || !this.paused) {
        return;
      }
      assert2(this.ptr != null);
      assert2(currentParser === null);
      this.llhttp.llhttp_resume(this.ptr);
      assert2(this.timeoutType === TIMEOUT_BODY);
      if (this.timeout) {
        if (this.timeout.refresh) {
          this.timeout.refresh();
        }
      }
      this.paused = false;
      this.execute(this.socket.read() || EMPTY_BUF);
      this.readMore();
    }
    readMore() {
      while (!this.paused && this.ptr) {
        const chunk = this.socket.read();
        if (chunk === null) {
          break;
        }
        this.execute(chunk);
      }
    }
    execute(chunk) {
      assert2(currentParser === null);
      assert2(this.ptr != null);
      assert2(!this.paused);
      const { socket, llhttp } = this;
      if (chunk.length > currentBufferSize) {
        if (currentBufferPtr) {
          llhttp.free(currentBufferPtr);
        }
        currentBufferSize = Math.ceil(chunk.length / 4096) * 4096;
        currentBufferPtr = llhttp.malloc(currentBufferSize);
      }
      new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk);
      try {
        let ret;
        try {
          currentBufferRef = chunk;
          currentParser = this;
          ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length);
        } finally {
          currentParser = null;
          currentBufferRef = null;
        }
        if (ret !== constants.ERROR.OK) {
          const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr);
          if (ret === constants.ERROR.PAUSED_UPGRADE) {
            this.onUpgrade(data);
          } else if (ret === constants.ERROR.PAUSED) {
            this.paused = true;
            socket.unshift(data);
          } else {
            throw this.createError(ret, data);
          }
        }
      } catch (err) {
        util3.destroy(socket, err);
      }
    }
    finish() {
      assert2(currentParser === null);
      assert2(this.ptr != null);
      assert2(!this.paused);
      const { llhttp } = this;
      let ret;
      try {
        currentParser = this;
        ret = llhttp.llhttp_finish(this.ptr);
      } finally {
        currentParser = null;
      }
      if (ret === constants.ERROR.OK) {
        return null;
      }
      if (ret === constants.ERROR.PAUSED || ret === constants.ERROR.PAUSED_UPGRADE) {
        this.paused = true;
        return null;
      }
      return this.createError(ret, EMPTY_BUF);
    }
    createError(ret, data) {
      const { llhttp, contentLength, bytesRead } = this;
      if (contentLength && bytesRead !== parseInt(contentLength, 10)) {
        return new ResponseContentLengthMismatchError;
      }
      const ptr = llhttp.llhttp_get_error_reason(this.ptr);
      let message2 = "";
      if (ptr) {
        const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0);
        message2 = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")";
      }
      return new HTTPParserError(message2, constants.ERROR[ret], data);
    }
    destroy() {
      assert2(currentParser === null);
      assert2(this.ptr != null);
      this.llhttp.llhttp_free(this.ptr);
      this.ptr = null;
      this.timeout && timers.clearTimeout(this.timeout);
      this.timeout = null;
      this.timeoutValue = null;
      this.timeoutType = null;
      this.paused = false;
    }
    onStatus(buf) {
      this.statusText = buf.toString();
      return 0;
    }
    onMessageBegin() {
      const { socket, client } = this;
      if (socket.destroyed) {
        return -1;
      }
      if (client[kRunning] === 0) {
        util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket)));
        return -1;
      }
      const request2 = client[kQueue][client[kRunningIdx]];
      if (!request2) {
        return -1;
      }
      request2.onResponseStarted();
      return 0;
    }
    onHeaderField(buf) {
      const len = this.headers.length;
      if ((len & 1) === 0) {
        this.headers.push(buf);
      } else {
        this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]);
      }
      this.trackHeader(buf.length);
      return 0;
    }
    onHeaderValue(buf) {
      let len = this.headers.length;
      if ((len & 1) === 1) {
        this.headers.push(buf);
        len += 1;
      } else {
        this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]);
      }
      const key = this.headers[len - 2];
      if (key.length === 10) {
        const headerName = util3.bufferToLowerCasedHeaderName(key);
        if (headerName === "keep-alive") {
          this.keepAlive += buf.toString();
        } else if (headerName === "connection") {
          this.connection += buf.toString();
        }
      } else if (key.length === 14 && util3.bufferToLowerCasedHeaderName(key) === "content-length") {
        this.contentLength += buf.toString();
      }
      this.trackHeader(buf.length);
      return 0;
    }
    trackHeader(len) {
      this.headersSize += len;
      if (this.headersSize >= this.headersMaxSize) {
        util3.destroy(this.socket, new HeadersOverflowError);
      }
    }
    onUpgrade(head2) {
      const { upgrade, client, socket, headers, statusCode } = this;
      assert2(upgrade);
      assert2(client[kSocket] === socket);
      assert2(!socket.destroyed);
      assert2(!this.paused);
      assert2((headers.length & 1) === 0);
      const request2 = client[kQueue][client[kRunningIdx]];
      assert2(request2);
      assert2(request2.upgrade || request2.method === "CONNECT");
      this.statusCode = 0;
      this.statusText = "";
      this.shouldKeepAlive = false;
      this.headers = [];
      this.headersSize = 0;
      socket.unshift(head2);
      socket[kParser].destroy();
      socket[kParser] = null;
      socket[kClient] = null;
      socket[kError] = null;
      removeAllListeners(socket);
      client[kSocket] = null;
      client[kHTTPContext] = null;
      client[kQueue][client[kRunningIdx]++] = null;
      client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade"));
      try {
        request2.onUpgrade(statusCode, headers, socket);
      } catch (err) {
        util3.destroy(socket, err);
      }
      client[kResume]();
    }
    onHeadersComplete(statusCode, upgrade, shouldKeepAlive) {
      const { client, socket, headers, statusText } = this;
      if (socket.destroyed) {
        return -1;
      }
      if (client[kRunning] === 0) {
        util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket)));
        return -1;
      }
      const request2 = client[kQueue][client[kRunningIdx]];
      if (!request2) {
        return -1;
      }
      assert2(!this.upgrade);
      assert2(this.statusCode < 200);
      if (statusCode === 100) {
        util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket)));
        return -1;
      }
      if (upgrade && !request2.upgrade) {
        util3.destroy(socket, new SocketError("bad upgrade", util3.getSocketInfo(socket)));
        return -1;
      }
      assert2(this.timeoutType === TIMEOUT_HEADERS);
      this.statusCode = statusCode;
      this.shouldKeepAlive = shouldKeepAlive || request2.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive";
      if (this.statusCode >= 200) {
        const bodyTimeout = request2.bodyTimeout != null ? request2.bodyTimeout : client[kBodyTimeout];
        this.setTimeout(bodyTimeout, TIMEOUT_BODY);
      } else if (this.timeout) {
        if (this.timeout.refresh) {
          this.timeout.refresh();
        }
      }
      if (request2.method === "CONNECT") {
        assert2(client[kRunning] === 1);
        this.upgrade = true;
        return 2;
      }
      if (upgrade) {
        assert2(client[kRunning] === 1);
        this.upgrade = true;
        return 2;
      }
      assert2((this.headers.length & 1) === 0);
      this.headers = [];
      this.headersSize = 0;
      if (this.shouldKeepAlive && client[kPipelining]) {
        const keepAliveTimeout = this.keepAlive ? util3.parseKeepAliveTimeout(this.keepAlive) : null;
        if (keepAliveTimeout != null) {
          const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]);
          if (timeout <= 0) {
            socket[kReset] = true;
          } else {
            client[kKeepAliveTimeoutValue] = timeout;
          }
        } else {
          client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout];
        }
      } else {
        socket[kReset] = true;
      }
      const pause = request2.onHeaders(statusCode, headers, this.resume, statusText) === false;
      if (request2.aborted) {
        return -1;
      }
      if (request2.method === "HEAD") {
        return 1;
      }
      if (statusCode < 200) {
        return 1;
      }
      if (socket[kBlocking]) {
        socket[kBlocking] = false;
        client[kResume]();
      }
      return pause ? constants.ERROR.PAUSED : 0;
    }
    onBody(buf) {
      const { client, socket, statusCode, maxResponseSize } = this;
      if (socket.destroyed) {
        return -1;
      }
      const request2 = client[kQueue][client[kRunningIdx]];
      assert2(request2);
      assert2(this.timeoutType === TIMEOUT_BODY);
      if (this.timeout) {
        if (this.timeout.refresh) {
          this.timeout.refresh();
        }
      }
      assert2(statusCode >= 200);
      if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
        util3.destroy(socket, new ResponseExceededMaxSizeError);
        return -1;
      }
      this.bytesRead += buf.length;
      if (request2.onData(buf) === false) {
        return constants.ERROR.PAUSED;
      }
      return 0;
    }
    onMessageComplete() {
      const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this;
      if (socket.destroyed && (!statusCode || shouldKeepAlive)) {
        return -1;
      }
      if (upgrade) {
        return 0;
      }
      assert2(statusCode >= 100);
      assert2((this.headers.length & 1) === 0);
      const request2 = client[kQueue][client[kRunningIdx]];
      assert2(request2);
      this.statusCode = 0;
      this.statusText = "";
      this.bytesRead = 0;
      this.contentLength = "";
      this.keepAlive = "";
      this.connection = "";
      this.headers = [];
      this.headersSize = 0;
      if (statusCode < 200) {
        return 0;
      }
      if (request2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) {
        util3.destroy(socket, new ResponseContentLengthMismatchError);
        return -1;
      }
      request2.onComplete(headers);
      client[kQueue][client[kRunningIdx]++] = null;
      socket[kSocketUsed] = client[kPending] === 0;
      if (socket[kWriting]) {
        assert2(client[kRunning] === 0);
        util3.destroy(socket, new InformationalError("reset"));
        return constants.ERROR.PAUSED;
      } else if (!shouldKeepAlive) {
        util3.destroy(socket, new InformationalError("reset"));
        return constants.ERROR.PAUSED;
      } else if (socket[kReset] && client[kRunning] === 0) {
        util3.destroy(socket, new InformationalError("reset"));
        return constants.ERROR.PAUSED;
      } else if (client[kPipelining] == null || client[kPipelining] === 1) {
        setImmediate(client[kResume]);
      } else {
        client[kResume]();
      }
      return 0;
    }
  }
  function onParserTimeout(parserWeakRef) {
    const parser2 = parserWeakRef.deref();
    if (!parser2) {
      return;
    }
    const { socket, timeoutType, client, paused } = parser2;
    if (timeoutType === TIMEOUT_HEADERS) {
      if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
        assert2(!paused, "cannot be paused while waiting for headers");
        util3.destroy(socket, new HeadersTimeoutError);
      }
    } else if (timeoutType === TIMEOUT_BODY) {
      if (!paused) {
        util3.destroy(socket, new BodyTimeoutError);
      }
    } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
      assert2(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
      util3.destroy(socket, new InformationalError("socket idle timeout"));
    }
  }
  function connectH1(client, socket) {
    client[kSocket] = socket;
    if (!llhttpInstance) {
      llhttpInstance = lazyllhttp();
    }
    if (socket.errored) {
      throw socket.errored;
    }
    if (socket.destroyed) {
      throw new SocketError("destroyed");
    }
    socket[kNoRef] = false;
    socket[kWriting] = false;
    socket[kReset] = false;
    socket[kBlocking] = false;
    socket[kIdleSocketValidation] = 0;
    socket[kIdleSocketValidationTimeout] = null;
    socket[kSocketUsed] = false;
    socket[kParser] = new Parser2(client, socket, llhttpInstance);
    util3.addListener(socket, "error", onHttpSocketError);
    util3.addListener(socket, "readable", onHttpSocketReadable);
    util3.addListener(socket, "end", onHttpSocketEnd);
    util3.addListener(socket, "close", onHttpSocketClose);
    socket[kClosed] = false;
    socket.on("close", onSocketClose);
    return {
      version: "h1",
      defaultPipelining: 1,
      write(request2) {
        return writeH1(client, request2);
      },
      resume() {
        resumeH1(client);
      },
      destroy(err, callback) {
        if (socket[kClosed]) {
          queueMicrotask(callback);
        } else {
          socket.on("close", callback);
          socket.destroy(err);
        }
      },
      get destroyed() {
        return socket.destroyed;
      },
      busy(request2) {
        if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) {
          return true;
        }
        if (request2) {
          if (client[kRunning] > 0 && !request2.idempotent) {
            return true;
          }
          if (client[kRunning] > 0 && (request2.upgrade || request2.method === "CONNECT")) {
            return true;
          }
          if (client[kRunning] > 0 && util3.bodyLength(request2.body) !== 0 && (util3.isStream(request2.body) || util3.isAsyncIterable(request2.body) || util3.isFormDataLike(request2.body))) {
            return true;
          }
        }
        return false;
      }
    };
  }
  function onHttpSocketError(err) {
    assert2(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
    const parser2 = this[kParser];
    if (err.code === "ECONNRESET" && parser2.statusCode && !parser2.shouldKeepAlive) {
      const parserErr = parser2.finish();
      if (parserErr) {
        this[kError] = parserErr;
        this[kClient][kOnError](parserErr);
      }
      return;
    }
    this[kError] = err;
    this[kClient][kOnError](err);
  }
  function onHttpSocketReadable() {
    this[kParser]?.readMore();
  }
  function onHttpSocketEnd() {
    const parser2 = this[kParser];
    if (parser2.statusCode && !parser2.shouldKeepAlive) {
      const parserErr = parser2.finish();
      if (parserErr) {
        util3.destroy(this, parserErr);
      }
      return;
    }
    util3.destroy(this, new SocketError("other side closed", util3.getSocketInfo(this)));
  }
  function onHttpSocketClose() {
    const parser2 = this[kParser];
    clearIdleSocketValidation(this);
    if (parser2) {
      if (!this[kError] && parser2.statusCode && !parser2.shouldKeepAlive) {
        this[kError] = parser2.finish() || this[kError];
      }
      this[kParser].destroy();
      this[kParser] = null;
    }
    const err = this[kError] || new SocketError("closed", util3.getSocketInfo(this));
    const client = this[kClient];
    client[kSocket] = null;
    client[kHTTPContext] = null;
    if (client.destroyed) {
      assert2(client[kPending] === 0);
      const requests = client[kQueue].splice(client[kRunningIdx]);
      for (let i = 0;i < requests.length; i++) {
        const request2 = requests[i];
        util3.errorRequest(client, request2, err);
      }
    } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") {
      const request2 = client[kQueue][client[kRunningIdx]];
      client[kQueue][client[kRunningIdx]++] = null;
      util3.errorRequest(client, request2, err);
    }
    client[kPendingIdx] = client[kRunningIdx];
    assert2(client[kRunning] === 0);
    client.emit("disconnect", client[kUrl], [client], err);
    client[kResume]();
  }
  function onSocketClose() {
    this[kClosed] = true;
  }
  function clearIdleSocketValidation(socket) {
    if (socket[kIdleSocketValidationTimeout]) {
      clearTimeout(socket[kIdleSocketValidationTimeout]);
      socket[kIdleSocketValidationTimeout] = null;
    }
    socket[kIdleSocketValidation] = 0;
  }
  function scheduleIdleSocketValidation(client, socket) {
    socket[kIdleSocketValidation] = 1;
    socket[kIdleSocketValidationTimeout] = setTimeout(() => {
      socket[kIdleSocketValidationTimeout] = null;
      socket[kIdleSocketValidation] = 2;
      if (client[kSocket] === socket && !socket.destroyed) {
        client[kResume]();
      }
    }, 0);
    socket[kIdleSocketValidationTimeout].unref?.();
  }
  function resumeH1(client) {
    const socket = client[kSocket];
    if (socket && !socket.destroyed) {
      if (client[kSize] === 0) {
        if (!socket[kNoRef] && socket.unref) {
          socket.unref();
          socket[kNoRef] = true;
        }
      } else if (socket[kNoRef] && socket.ref) {
        socket.ref();
        socket[kNoRef] = false;
      }
      if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {
        if (socket[kIdleSocketValidation] === 0) {
          scheduleIdleSocketValidation(client, socket);
          socket[kParser].readMore();
          if (socket.destroyed) {
            return;
          }
          return;
        }
        if (socket[kIdleSocketValidation] === 1) {
          socket[kParser].readMore();
          if (socket.destroyed) {
            return;
          }
          return;
        }
      }
      if (client[kRunning] === 0) {
        socket[kParser].readMore();
        if (socket.destroyed) {
          return;
        }
      }
      if (client[kSize] === 0) {
        if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
          socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE);
        }
      } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {
        if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {
          const request2 = client[kQueue][client[kRunningIdx]];
          const headersTimeout = request2.headersTimeout != null ? request2.headersTimeout : client[kHeadersTimeout];
          socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS);
        }
      }
    }
  }
  function shouldSendContentLength(method) {
    return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
  }
  function writeH1(client, request2) {
    const { method, path: path2, host, upgrade, blocking, reset } = request2;
    let { body: body2, headers, contentLength } = request2;
    const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
    if (util3.isFormDataLike(body2)) {
      if (!extractBody) {
        extractBody = require_body().extractBody;
      }
      const [bodyStream, contentType] = extractBody(body2);
      if (request2.contentType == null) {
        headers.push("content-type", contentType);
      }
      body2 = bodyStream.stream;
      contentLength = bodyStream.length;
    } else if (util3.isBlobLike(body2) && request2.contentType == null && body2.type) {
      headers.push("content-type", body2.type);
    }
    if (body2 && typeof body2.read === "function") {
      body2.read(0);
    }
    const bodyLength = util3.bodyLength(body2);
    contentLength = bodyLength ?? contentLength;
    if (contentLength === null) {
      contentLength = request2.contentLength;
    }
    if (contentLength === 0 && !expectsPayload) {
      contentLength = null;
    }
    if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength !== null && request2.contentLength !== contentLength) {
      if (client[kStrictContentLength]) {
        util3.errorRequest(client, request2, new RequestContentLengthMismatchError);
        return false;
      }
      process.emitWarning(new RequestContentLengthMismatchError);
    }
    const socket = client[kSocket];
    clearIdleSocketValidation(socket);
    const abort = (err) => {
      if (request2.aborted || request2.completed) {
        return;
      }
      util3.errorRequest(client, request2, err || new RequestAbortedError);
      util3.destroy(body2);
      util3.destroy(socket, new InformationalError("aborted"));
    };
    try {
      request2.onConnect(abort);
    } catch (err) {
      util3.errorRequest(client, request2, err);
    }
    if (request2.aborted) {
      return false;
    }
    if (method === "HEAD") {
      socket[kReset] = true;
    }
    if (upgrade || method === "CONNECT") {
      socket[kReset] = true;
    }
    if (reset != null) {
      socket[kReset] = reset;
    }
    if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {
      socket[kReset] = true;
    }
    if (blocking) {
      socket[kBlocking] = true;
    }
    if (socket.setTypeOfService) {
      socket.setTypeOfService(request2.typeOfService);
    }
    let header = `${method} ${path2} HTTP/1.1\r
`;
    if (typeof host === "string") {
      header += `host: ${host}\r
`;
    } else {
      header += client[kHostHeader];
    }
    if (upgrade) {
      header += `connection: upgrade\r
upgrade: ${upgrade}\r
`;
    } else if (client[kPipelining] && !socket[kReset]) {
      header += `connection: keep-alive\r
`;
    } else {
      header += `connection: close\r
`;
    }
    if (Array.isArray(headers)) {
      for (let n3 = 0;n3 < headers.length; n3 += 2) {
        const key = headers[n3 + 0];
        const val = headers[n3 + 1];
        if (Array.isArray(val)) {
          for (let i = 0;i < val.length; i++) {
            header += `${key}: ${val[i]}\r
`;
          }
        } else {
          header += `${key}: ${val}\r
`;
        }
      }
    }
    if (channels.sendHeaders.hasSubscribers) {
      channels.sendHeaders.publish({ request: request2, headers: header, socket });
    }
    if (!body2 || bodyLength === 0) {
      writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload);
    } else if (util3.isBuffer(body2)) {
      writeBuffer(abort, body2, client, request2, socket, contentLength, header, expectsPayload);
    } else if (util3.isBlobLike(body2)) {
      if (typeof body2.stream === "function") {
        writeIterable(abort, body2.stream(), client, request2, socket, contentLength, header, expectsPayload);
      } else {
        writeBlob(abort, body2, client, request2, socket, contentLength, header, expectsPayload);
      }
    } else if (util3.isStream(body2)) {
      writeStream(abort, body2, client, request2, socket, contentLength, header, expectsPayload);
    } else if (util3.isIterable(body2)) {
      writeIterable(abort, body2, client, request2, socket, contentLength, header, expectsPayload);
    } else {
      assert2(false);
    }
    return true;
  }
  function writeStream(abort, body2, client, request2, socket, contentLength, header, expectsPayload) {
    assert2(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
    let finished = false;
    const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
    const onData = function(chunk) {
      if (finished) {
        return;
      }
      try {
        if (!writer.write(chunk) && this.pause) {
          this.pause();
        }
      } catch (err) {
        util3.destroy(this, err);
      }
    };
    const onDrain = function() {
      if (finished) {
        return;
      }
      if (body2.resume) {
        body2.resume();
      }
    };
    const onClose = function() {
      queueMicrotask(() => {
        body2.removeListener("error", onFinished);
      });
      if (!finished) {
        const err = new RequestAbortedError;
        queueMicrotask(() => onFinished(err));
      }
    };
    const onFinished = function(err) {
      if (finished) {
        return;
      }
      finished = true;
      assert2(socket.destroyed || socket[kWriting] && client[kRunning] <= 1);
      socket.off("drain", onDrain).off("error", onFinished);
      body2.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose);
      if (!err) {
        try {
          writer.end();
        } catch (er4) {
          err = er4;
        }
      }
      writer.destroy(err);
      if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) {
        util3.destroy(body2, err);
      } else {
        util3.destroy(body2);
      }
    };
    body2.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose);
    if (body2.resume) {
      body2.resume();
    }
    socket.on("drain", onDrain).on("error", onFinished);
    if (body2.errorEmitted ?? body2.errored) {
      setImmediate(onFinished, body2.errored);
    } else if (body2.endEmitted ?? body2.readableEnded) {
      setImmediate(onFinished, null);
    }
    if (body2.closeEmitted ?? body2.closed) {
      setImmediate(onClose);
    }
  }
  function writeBuffer(abort, body2, client, request2, socket, contentLength, header, expectsPayload) {
    try {
      if (!body2) {
        if (contentLength === 0) {
          socket.write(`${header}content-length: 0\r
\r
`, "latin1");
        } else {
          assert2(contentLength === null, "no body must not have content length");
          socket.write(`${header}\r
`, "latin1");
        }
      } else if (util3.isBuffer(body2)) {
        assert2(contentLength === body2.byteLength, "buffer body must have content length");
        socket.cork();
        socket.write(`${header}content-length: ${contentLength}\r
\r
`, "latin1");
        socket.write(body2);
        socket.uncork();
        request2.onBodySent(body2);
        if (!expectsPayload && request2.reset !== false) {
          socket[kReset] = true;
        }
      }
      request2.onRequestSent();
      client[kResume]();
    } catch (err) {
      abort(err);
    }
  }
  async function writeBlob(abort, body2, client, request2, socket, contentLength, header, expectsPayload) {
    assert2(contentLength === body2.size, "blob body must have content length");
    try {
      if (contentLength != null && contentLength !== body2.size) {
        throw new RequestContentLengthMismatchError;
      }
      const buffer = Buffer.from(await body2.arrayBuffer());
      socket.cork();
      socket.write(`${header}content-length: ${contentLength}\r
\r
`, "latin1");
      socket.write(buffer);
      socket.uncork();
      request2.onBodySent(buffer);
      request2.onRequestSent();
      if (!expectsPayload && request2.reset !== false) {
        socket[kReset] = true;
      }
      client[kResume]();
    } catch (err) {
      abort(err);
    }
  }
  async function writeIterable(abort, body2, client, request2, socket, contentLength, header, expectsPayload) {
    assert2(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
    let callback = null;
    function onDrain() {
      if (callback) {
        const cb2 = callback;
        callback = null;
        cb2();
      }
    }
    const waitForDrain = () => new Promise((resolve3, reject) => {
      assert2(callback === null);
      if (socket[kError]) {
        reject(socket[kError]);
      } else {
        callback = resolve3;
      }
    });
    socket.on("close", onDrain).on("drain", onDrain);
    const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
    try {
      for await (const chunk of body2) {
        if (socket[kError]) {
          throw socket[kError];
        }
        if (!writer.write(chunk)) {
          await waitForDrain();
        }
      }
      writer.end();
    } catch (err) {
      writer.destroy(err);
    } finally {
      socket.off("close", onDrain).off("drain", onDrain);
    }
  }

  class AsyncWriter {
    constructor({ abort, socket, request: request2, contentLength, client, expectsPayload, header }) {
      this.socket = socket;
      this.request = request2;
      this.contentLength = contentLength;
      this.client = client;
      this.bytesWritten = 0;
      this.expectsPayload = expectsPayload;
      this.header = header;
      this.abort = abort;
      socket[kWriting] = true;
    }
    write(chunk) {
      const { socket, request: request2, contentLength, client, bytesWritten, expectsPayload, header } = this;
      if (socket[kError]) {
        throw socket[kError];
      }
      if (socket.destroyed) {
        return false;
      }
      const len = Buffer.byteLength(chunk);
      if (!len) {
        return true;
      }
      if (contentLength !== null && bytesWritten + len > contentLength) {
        if (client[kStrictContentLength]) {
          throw new RequestContentLengthMismatchError;
        }
        process.emitWarning(new RequestContentLengthMismatchError);
      }
      socket.cork();
      if (bytesWritten === 0) {
        if (!expectsPayload && request2.reset !== false) {
          socket[kReset] = true;
        }
        if (contentLength === null) {
          socket.write(`${header}transfer-encoding: chunked\r
`, "latin1");
        } else {
          socket.write(`${header}content-length: ${contentLength}\r
\r
`, "latin1");
        }
      }
      if (contentLength === null) {
        socket.write(`\r
${len.toString(16)}\r
`, "latin1");
      }
      this.bytesWritten += len;
      const ret = socket.write(chunk);
      socket.uncork();
      request2.onBodySent(chunk);
      if (!ret) {
        if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
          if (socket[kParser].timeout.refresh) {
            socket[kParser].timeout.refresh();
          }
        }
      }
      return ret;
    }
    end() {
      const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request2 } = this;
      request2.onRequestSent();
      socket[kWriting] = false;
      if (socket[kError]) {
        throw socket[kError];
      }
      if (socket.destroyed) {
        return;
      }
      if (bytesWritten === 0) {
        if (expectsPayload) {
          socket.write(`${header}content-length: 0\r
\r
`, "latin1");
        } else {
          socket.write(`${header}\r
`, "latin1");
        }
      } else if (contentLength === null) {
        socket.write(`\r
0\r
\r
`, "latin1");
      }
      if (contentLength !== null && bytesWritten !== contentLength) {
        if (client[kStrictContentLength]) {
          throw new RequestContentLengthMismatchError;
        } else {
          process.emitWarning(new RequestContentLengthMismatchError);
        }
      }
      if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
        if (socket[kParser].timeout.refresh) {
          socket[kParser].timeout.refresh();
        }
      }
      client[kResume]();
    }
    destroy(err) {
      const { socket, client, abort } = this;
      socket[kWriting] = false;
      if (err) {
        assert2(client[kRunning] <= 1, "pipeline should only contain this request");
        abort(err);
      }
    }
  }
  module.exports = connectH1;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/client-h2.js
var require_client_h2 = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { pipeline } = __require("node:stream");
  var util3 = require_util3();
  var {
    RequestContentLengthMismatchError,
    RequestAbortedError,
    SocketError,
    InformationalError,
    InvalidArgumentError
  } = require_errors8();
  var {
    kUrl,
    kReset,
    kClient,
    kRunning,
    kPending,
    kQueue,
    kPendingIdx,
    kRunningIdx,
    kError,
    kSocket,
    kStrictContentLength,
    kOnError,
    kMaxConcurrentStreams,
    kPingInterval,
    kHTTP2Session,
    kHTTP2InitialWindowSize,
    kHTTP2ConnectionWindowSize,
    kResume,
    kSize,
    kHTTPContext,
    kClosed,
    kBodyTimeout,
    kEnableConnectProtocol,
    kRemoteSettings,
    kHTTP2Stream,
    kHTTP2SessionState
  } = require_symbols2();
  var { channels } = require_diagnostics();
  var kOpenStreams = Symbol("open streams");
  var extractBody;
  var http22;
  try {
    http22 = __require("node:http2");
  } catch {
    http22 = { constants: {} };
  }
  var {
    constants: {
      HTTP2_HEADER_AUTHORITY,
      HTTP2_HEADER_METHOD,
      HTTP2_HEADER_PATH,
      HTTP2_HEADER_SCHEME,
      HTTP2_HEADER_CONTENT_LENGTH,
      HTTP2_HEADER_EXPECT,
      HTTP2_HEADER_STATUS,
      HTTP2_HEADER_PROTOCOL,
      NGHTTP2_REFUSED_STREAM,
      NGHTTP2_CANCEL
    }
  } = http22;
  function parseH2Headers(headers) {
    const result = [];
    for (const [name3, value] of Object.entries(headers)) {
      if (Array.isArray(value)) {
        for (const subvalue of value) {
          result.push(Buffer.from(name3), Buffer.from(subvalue));
        }
      } else {
        result.push(Buffer.from(name3), Buffer.from(value));
      }
    }
    return result;
  }
  function connectH2(client, socket) {
    client[kSocket] = socket;
    const http2InitialWindowSize = client[kHTTP2InitialWindowSize];
    const http2ConnectionWindowSize = client[kHTTP2ConnectionWindowSize];
    const session2 = http22.connect(client[kUrl], {
      createConnection: () => socket,
      peerMaxConcurrentStreams: client[kMaxConcurrentStreams],
      settings: {
        enablePush: false,
        ...http2InitialWindowSize != null ? { initialWindowSize: http2InitialWindowSize } : null
      }
    });
    client[kSocket] = socket;
    session2[kOpenStreams] = 0;
    session2[kClient] = client;
    session2[kSocket] = socket;
    session2[kHTTP2SessionState] = {
      ping: {
        interval: client[kPingInterval] === 0 ? null : setInterval(onHttp2SendPing, client[kPingInterval], session2).unref()
      }
    };
    session2[kEnableConnectProtocol] = false;
    session2[kRemoteSettings] = false;
    if (http2ConnectionWindowSize) {
      util3.addListener(session2, "connect", applyConnectionWindowSize.bind(session2, http2ConnectionWindowSize));
    }
    util3.addListener(session2, "error", onHttp2SessionError);
    util3.addListener(session2, "frameError", onHttp2FrameError);
    util3.addListener(session2, "end", onHttp2SessionEnd);
    util3.addListener(session2, "goaway", onHttp2SessionGoAway);
    util3.addListener(session2, "close", onHttp2SessionClose);
    util3.addListener(session2, "remoteSettings", onHttp2RemoteSettings);
    session2.unref();
    client[kHTTP2Session] = session2;
    socket[kHTTP2Session] = session2;
    util3.addListener(socket, "error", onHttp2SocketError);
    util3.addListener(socket, "end", onHttp2SocketEnd);
    util3.addListener(socket, "close", onHttp2SocketClose);
    socket[kClosed] = false;
    socket.on("close", onSocketClose);
    return {
      version: "h2",
      defaultPipelining: Infinity,
      write(request2) {
        return writeH2(client, request2);
      },
      resume() {
        resumeH2(client);
      },
      destroy(err, callback) {
        if (socket[kClosed]) {
          queueMicrotask(callback);
        } else {
          socket.destroy(err).on("close", callback);
        }
      },
      get destroyed() {
        return socket.destroyed;
      },
      busy(request2) {
        if (request2 != null) {
          if (client[kRunning] > 0) {
            if (request2.idempotent === false)
              return true;
            if ((request2.upgrade === "websocket" || request2.method === "CONNECT") && session2[kRemoteSettings] === false)
              return true;
            if (util3.bodyLength(request2.body) !== 0 && (util3.isStream(request2.body) || util3.isAsyncIterable(request2.body) || util3.isFormDataLike(request2.body)))
              return true;
          } else {
            return (request2.upgrade === "websocket" || request2.method === "CONNECT") && session2[kRemoteSettings] === false;
          }
        }
        return false;
      }
    };
  }
  function resumeH2(client) {
    const socket = client[kSocket];
    if (socket?.destroyed === false) {
      if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) {
        socket.unref();
        client[kHTTP2Session].unref();
      } else {
        socket.ref();
        client[kHTTP2Session].ref();
      }
    }
  }
  function applyConnectionWindowSize(connectionWindowSize) {
    try {
      if (typeof this.setLocalWindowSize === "function") {
        this.setLocalWindowSize(connectionWindowSize);
      }
    } catch {}
  }
  function onHttp2RemoteSettings(settings) {
    this[kClient][kMaxConcurrentStreams] = settings.maxConcurrentStreams ?? this[kClient][kMaxConcurrentStreams];
    if (this[kRemoteSettings] === true && this[kEnableConnectProtocol] === true && settings.enableConnectProtocol === false) {
      const err = new InformationalError("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");
      this[kSocket][kError] = err;
      this[kClient][kOnError](err);
      return;
    }
    this[kEnableConnectProtocol] = settings.enableConnectProtocol ?? this[kEnableConnectProtocol];
    this[kRemoteSettings] = true;
    this[kClient][kResume]();
  }
  function onHttp2SendPing(session2) {
    const state = session2[kHTTP2SessionState];
    if ((session2.closed || session2.destroyed) && state.ping.interval != null) {
      clearInterval(state.ping.interval);
      state.ping.interval = null;
      return;
    }
    session2.ping(onPing.bind(session2));
    function onPing(err, duration3) {
      const client = this[kClient];
      const socket = this[kClient];
      if (err != null) {
        const error49 = new InformationalError(`HTTP/2: "PING" errored - type ${err.message}`);
        socket[kError] = error49;
        client[kOnError](error49);
      } else {
        client.emit("ping", duration3);
      }
    }
  }
  function onHttp2SessionError(err) {
    assert2(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
    this[kSocket][kError] = err;
    this[kClient][kOnError](err);
  }
  function onHttp2FrameError(type2, code2, id) {
    if (id === 0) {
      const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code2}`);
      this[kSocket][kError] = err;
      this[kClient][kOnError](err);
    }
  }
  function onHttp2SessionEnd() {
    const err = new SocketError("other side closed", util3.getSocketInfo(this[kSocket]));
    this.destroy(err);
    util3.destroy(this[kSocket], err);
  }
  function onHttp2SessionGoAway(errorCode) {
    const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util3.getSocketInfo(this[kSocket]));
    const client = this[kClient];
    client[kSocket] = null;
    client[kHTTPContext] = null;
    this.close();
    this[kHTTP2Session] = null;
    util3.destroy(this[kSocket], err);
    if (client[kRunningIdx] < client[kQueue].length) {
      const request2 = client[kQueue][client[kRunningIdx]];
      client[kQueue][client[kRunningIdx]++] = null;
      util3.errorRequest(client, request2, err);
      client[kPendingIdx] = client[kRunningIdx];
    }
    assert2(client[kRunning] === 0);
    client.emit("disconnect", client[kUrl], [client], err);
    client.emit("connectionError", client[kUrl], [client], err);
    client[kResume]();
  }
  function onHttp2SessionClose() {
    const { [kClient]: client, [kHTTP2SessionState]: state } = this;
    const { [kSocket]: socket } = client;
    const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util3.getSocketInfo(socket));
    client[kSocket] = null;
    client[kHTTPContext] = null;
    if (state.ping.interval != null) {
      clearInterval(state.ping.interval);
      state.ping.interval = null;
    }
    if (client.destroyed) {
      assert2(client[kPending] === 0);
      const requests = client[kQueue].splice(client[kRunningIdx]);
      for (let i = 0;i < requests.length; i++) {
        const request2 = requests[i];
        util3.errorRequest(client, request2, err);
      }
    }
  }
  function onHttp2SocketClose() {
    const err = this[kError] || new SocketError("closed", util3.getSocketInfo(this));
    const client = this[kHTTP2Session][kClient];
    client[kSocket] = null;
    client[kHTTPContext] = null;
    if (this[kHTTP2Session] !== null) {
      this[kHTTP2Session].destroy(err);
    }
    client[kPendingIdx] = client[kRunningIdx];
    assert2(client[kRunning] === 0);
    client.emit("disconnect", client[kUrl], [client], err);
    client[kResume]();
  }
  function onHttp2SocketError(err) {
    assert2(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
    this[kError] = err;
    this[kClient][kOnError](err);
  }
  function onHttp2SocketEnd() {
    util3.destroy(this, new SocketError("other side closed", util3.getSocketInfo(this)));
  }
  function onSocketClose() {
    this[kClosed] = true;
  }
  function shouldSendContentLength(method) {
    return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
  }
  function writeH2(client, request2) {
    const requestTimeout = request2.bodyTimeout ?? client[kBodyTimeout];
    const session2 = client[kHTTP2Session];
    const { method, path: path2, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request2;
    let { body: body2 } = request2;
    if (upgrade != null && upgrade !== "websocket") {
      util3.errorRequest(client, request2, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`));
      return false;
    }
    const headers = {};
    for (let n3 = 0;n3 < reqHeaders.length; n3 += 2) {
      const key = reqHeaders[n3 + 0];
      const val = reqHeaders[n3 + 1];
      if (key === "cookie") {
        if (headers[key] != null) {
          headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val];
        } else {
          headers[key] = val;
        }
        continue;
      }
      if (Array.isArray(val)) {
        for (let i = 0;i < val.length; i++) {
          if (headers[key]) {
            headers[key] += `, ${val[i]}`;
          } else {
            headers[key] = val[i];
          }
        }
      } else if (headers[key]) {
        headers[key] += `, ${val}`;
      } else {
        headers[key] = val;
      }
    }
    let stream2 = null;
    const { hostname: hostname4, port } = client[kUrl];
    headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname4}${port ? `:${port}` : ""}`;
    headers[HTTP2_HEADER_METHOD] = method;
    const abort = (err) => {
      if (request2.aborted || request2.completed) {
        return;
      }
      err = err || new RequestAbortedError;
      util3.errorRequest(client, request2, err);
      if (stream2 != null) {
        stream2.removeAllListeners("data");
        stream2.close();
        client[kOnError](err);
        client[kResume]();
      }
      util3.destroy(body2, err);
    };
    try {
      request2.onConnect(abort);
    } catch (err) {
      util3.errorRequest(client, request2, err);
    }
    if (request2.aborted) {
      return false;
    }
    if (upgrade || method === "CONNECT") {
      session2.ref();
      if (upgrade === "websocket") {
        if (session2[kEnableConnectProtocol] === false) {
          util3.errorRequest(client, request2, new InformationalError("HTTP/2: Extended CONNECT protocol not supported by server"));
          session2.unref();
          return false;
        }
        headers[HTTP2_HEADER_METHOD] = "CONNECT";
        headers[HTTP2_HEADER_PROTOCOL] = "websocket";
        headers[HTTP2_HEADER_PATH] = path2;
        if (protocol === "ws:" || protocol === "wss:") {
          headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
        } else {
          headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
        }
        stream2 = session2.request(headers, { endStream: false, signal });
        stream2[kHTTP2Stream] = true;
        stream2.once("response", (headers2, _flags) => {
          const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2;
          request2.onUpgrade(statusCode, parseH2Headers(realHeaders), stream2);
          ++session2[kOpenStreams];
          client[kQueue][client[kRunningIdx]++] = null;
        });
        stream2.on("error", () => {
          if (stream2.rstCode === NGHTTP2_REFUSED_STREAM || stream2.rstCode === NGHTTP2_CANCEL) {
            abort(new InformationalError(`HTTP/2: "stream error" received - code ${stream2.rstCode}`));
          }
        });
        stream2.once("close", () => {
          session2[kOpenStreams] -= 1;
          if (session2[kOpenStreams] === 0)
            session2.unref();
        });
        stream2.setTimeout(requestTimeout);
        return true;
      }
      stream2 = session2.request(headers, { endStream: false, signal });
      stream2[kHTTP2Stream] = true;
      stream2.on("response", (headers2) => {
        const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2;
        request2.onUpgrade(statusCode, parseH2Headers(realHeaders), stream2);
        ++session2[kOpenStreams];
        client[kQueue][client[kRunningIdx]++] = null;
      });
      stream2.once("close", () => {
        session2[kOpenStreams] -= 1;
        if (session2[kOpenStreams] === 0)
          session2.unref();
      });
      stream2.setTimeout(requestTimeout);
      return true;
    }
    headers[HTTP2_HEADER_PATH] = path2;
    headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
    const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
    if (body2 && typeof body2.read === "function") {
      body2.read(0);
    }
    let contentLength = util3.bodyLength(body2);
    if (util3.isFormDataLike(body2)) {
      extractBody ??= require_body().extractBody;
      const [bodyStream, contentType] = extractBody(body2);
      headers["content-type"] = contentType;
      body2 = bodyStream.stream;
      contentLength = bodyStream.length;
    }
    if (contentLength == null) {
      contentLength = request2.contentLength;
    }
    if (!expectsPayload) {
      contentLength = null;
    }
    if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength != null && request2.contentLength !== contentLength) {
      if (client[kStrictContentLength]) {
        util3.errorRequest(client, request2, new RequestContentLengthMismatchError);
        return false;
      }
      process.emitWarning(new RequestContentLengthMismatchError);
    }
    if (contentLength != null) {
      assert2(body2 || contentLength === 0, "no body must not have content length");
      headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`;
    }
    session2.ref();
    if (channels.sendHeaders.hasSubscribers) {
      let header = "";
      for (const key in headers) {
        header += `${key}: ${headers[key]}\r
`;
      }
      channels.sendHeaders.publish({ request: request2, headers: header, socket: session2[kSocket] });
    }
    const shouldEndStream = method === "GET" || method === "HEAD" || body2 === null;
    if (expectContinue) {
      headers[HTTP2_HEADER_EXPECT] = "100-continue";
      stream2 = session2.request(headers, { endStream: shouldEndStream, signal });
      stream2[kHTTP2Stream] = true;
      stream2.once("continue", writeBodyH2);
    } else {
      stream2 = session2.request(headers, {
        endStream: shouldEndStream,
        signal
      });
      stream2[kHTTP2Stream] = true;
      writeBodyH2();
    }
    ++session2[kOpenStreams];
    stream2.setTimeout(requestTimeout);
    let responseReceived = false;
    stream2.once("response", (headers2) => {
      const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2;
      request2.onResponseStarted();
      responseReceived = true;
      if (request2.aborted) {
        stream2.removeAllListeners("data");
        return;
      }
      if (request2.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream2.resume.bind(stream2), "") === false) {
        stream2.pause();
      }
      stream2.on("data", (chunk) => {
        if (request2.aborted || request2.completed) {
          return;
        }
        if (request2.onData(chunk) === false) {
          stream2.pause();
        }
      });
    });
    stream2.once("end", () => {
      stream2.removeAllListeners("data");
      if (responseReceived) {
        if (!request2.aborted && !request2.completed) {
          request2.onComplete({});
        }
        client[kQueue][client[kRunningIdx]++] = null;
        client[kResume]();
      } else {
        abort(new InformationalError("HTTP/2: stream half-closed (remote)"));
        client[kQueue][client[kRunningIdx]++] = null;
        client[kPendingIdx] = client[kRunningIdx];
        client[kResume]();
      }
    });
    stream2.once("close", () => {
      stream2.removeAllListeners("data");
      session2[kOpenStreams] -= 1;
      if (session2[kOpenStreams] === 0) {
        session2.unref();
      }
    });
    stream2.once("error", function(err) {
      stream2.removeAllListeners("data");
      abort(err);
    });
    stream2.once("frameError", (type2, code2) => {
      stream2.removeAllListeners("data");
      abort(new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code2}`));
    });
    stream2.on("aborted", () => {
      stream2.removeAllListeners("data");
    });
    stream2.on("timeout", () => {
      const err = new InformationalError(`HTTP/2: "stream timeout after ${requestTimeout}"`);
      stream2.removeAllListeners("data");
      session2[kOpenStreams] -= 1;
      if (session2[kOpenStreams] === 0) {
        session2.unref();
      }
      abort(err);
    });
    stream2.once("trailers", (trailers) => {
      if (request2.aborted || request2.completed) {
        return;
      }
      stream2.removeAllListeners("data");
      request2.onComplete(trailers);
    });
    return true;
    function writeBodyH2() {
      if (!body2 || contentLength === 0) {
        writeBuffer(abort, stream2, null, client, request2, client[kSocket], contentLength, expectsPayload);
      } else if (util3.isBuffer(body2)) {
        writeBuffer(abort, stream2, body2, client, request2, client[kSocket], contentLength, expectsPayload);
      } else if (util3.isBlobLike(body2)) {
        if (typeof body2.stream === "function") {
          writeIterable(abort, stream2, body2.stream(), client, request2, client[kSocket], contentLength, expectsPayload);
        } else {
          writeBlob(abort, stream2, body2, client, request2, client[kSocket], contentLength, expectsPayload);
        }
      } else if (util3.isStream(body2)) {
        writeStream(abort, client[kSocket], expectsPayload, stream2, body2, client, request2, contentLength);
      } else if (util3.isIterable(body2)) {
        writeIterable(abort, stream2, body2, client, request2, client[kSocket], contentLength, expectsPayload);
      } else {
        assert2(false);
      }
    }
  }
  function writeBuffer(abort, h2stream, body2, client, request2, socket, contentLength, expectsPayload) {
    try {
      if (body2 != null && util3.isBuffer(body2)) {
        assert2(contentLength === body2.byteLength, "buffer body must have content length");
        h2stream.cork();
        h2stream.write(body2);
        h2stream.uncork();
        h2stream.end();
        request2.onBodySent(body2);
      }
      if (!expectsPayload) {
        socket[kReset] = true;
      }
      request2.onRequestSent();
      client[kResume]();
    } catch (error49) {
      abort(error49);
    }
  }
  function writeStream(abort, socket, expectsPayload, h2stream, body2, client, request2, contentLength) {
    assert2(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
    const pipe2 = pipeline(body2, h2stream, (err) => {
      if (err) {
        util3.destroy(pipe2, err);
        abort(err);
      } else {
        util3.removeAllListeners(pipe2);
        request2.onRequestSent();
        if (!expectsPayload) {
          socket[kReset] = true;
        }
        client[kResume]();
      }
    });
    util3.addListener(pipe2, "data", onPipeData);
    function onPipeData(chunk) {
      request2.onBodySent(chunk);
    }
  }
  async function writeBlob(abort, h2stream, body2, client, request2, socket, contentLength, expectsPayload) {
    assert2(contentLength === body2.size, "blob body must have content length");
    try {
      if (contentLength != null && contentLength !== body2.size) {
        throw new RequestContentLengthMismatchError;
      }
      const buffer = Buffer.from(await body2.arrayBuffer());
      h2stream.cork();
      h2stream.write(buffer);
      h2stream.uncork();
      h2stream.end();
      request2.onBodySent(buffer);
      request2.onRequestSent();
      if (!expectsPayload) {
        socket[kReset] = true;
      }
      client[kResume]();
    } catch (err) {
      abort(err);
    }
  }
  async function writeIterable(abort, h2stream, body2, client, request2, socket, contentLength, expectsPayload) {
    assert2(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
    let callback = null;
    function onDrain() {
      if (callback) {
        const cb2 = callback;
        callback = null;
        cb2();
      }
    }
    const waitForDrain = () => new Promise((resolve3, reject) => {
      assert2(callback === null);
      if (socket[kError]) {
        reject(socket[kError]);
      } else {
        callback = resolve3;
      }
    });
    h2stream.on("close", onDrain).on("drain", onDrain);
    try {
      for await (const chunk of body2) {
        if (socket[kError]) {
          throw socket[kError];
        }
        const res = h2stream.write(chunk);
        request2.onBodySent(chunk);
        if (!res) {
          await waitForDrain();
        }
      }
      h2stream.end();
      request2.onRequestSent();
      if (!expectsPayload) {
        socket[kReset] = true;
      }
      client[kResume]();
    } catch (err) {
      abort(err);
    } finally {
      h2stream.off("close", onDrain).off("drain", onDrain);
    }
  }
  module.exports = connectH2;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/client.js
var require_client5 = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var net2 = __require("node:net");
  var http4 = __require("node:http");
  var util3 = require_util3();
  var { ClientStats } = require_stats();
  var { channels } = require_diagnostics();
  var Request2 = require_request();
  var DispatcherBase = require_dispatcher_base();
  var {
    InvalidArgumentError,
    InformationalError,
    ClientDestroyedError
  } = require_errors8();
  var buildConnector = require_connect();
  var {
    kUrl,
    kServerName,
    kClient,
    kBusy,
    kConnect,
    kResuming,
    kRunning,
    kPending,
    kSize,
    kQueue,
    kConnected,
    kConnecting,
    kNeedDrain,
    kKeepAliveDefaultTimeout,
    kHostHeader,
    kPendingIdx,
    kRunningIdx,
    kError,
    kPipelining,
    kKeepAliveTimeoutValue,
    kMaxHeadersSize,
    kKeepAliveMaxTimeout,
    kKeepAliveTimeoutThreshold,
    kHeadersTimeout,
    kBodyTimeout,
    kStrictContentLength,
    kConnector,
    kMaxRequests,
    kCounter,
    kClose,
    kDestroy,
    kDispatch,
    kLocalAddress,
    kMaxResponseSize,
    kOnError,
    kHTTPContext,
    kMaxConcurrentStreams,
    kHTTP2InitialWindowSize,
    kHTTP2ConnectionWindowSize,
    kResume,
    kPingInterval
  } = require_symbols2();
  var connectH1 = require_client_h1();
  var connectH2 = require_client_h2();
  var kClosedResolve = Symbol("kClosedResolve");
  var getDefaultNodeMaxHeaderSize = http4 && http4.maxHeaderSize && Number.isInteger(http4.maxHeaderSize) && http4.maxHeaderSize > 0 ? () => http4.maxHeaderSize : () => {
    throw new InvalidArgumentError("http module not available or http.maxHeaderSize invalid");
  };
  var noop2 = () => {};
  function getPipelining(client) {
    return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1;
  }

  class Client4 extends DispatcherBase {
    constructor(url2, {
      maxHeaderSize,
      headersTimeout,
      socketTimeout,
      requestTimeout,
      connectTimeout,
      bodyTimeout,
      idleTimeout,
      keepAlive,
      keepAliveTimeout,
      maxKeepAliveTimeout,
      keepAliveMaxTimeout,
      keepAliveTimeoutThreshold,
      socketPath,
      pipelining,
      tls: tls2,
      strictContentLength,
      maxCachedSessions,
      connect: connect4,
      maxRequestsPerClient,
      localAddress,
      maxResponseSize,
      autoSelectFamily,
      autoSelectFamilyAttemptTimeout,
      maxConcurrentStreams,
      allowH2,
      useH2c,
      initialWindowSize,
      connectionWindowSize,
      pingInterval,
      webSocket
    } = {}) {
      if (keepAlive !== undefined) {
        throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead");
      }
      if (socketTimeout !== undefined) {
        throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");
      }
      if (requestTimeout !== undefined) {
        throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");
      }
      if (idleTimeout !== undefined) {
        throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead");
      }
      if (maxKeepAliveTimeout !== undefined) {
        throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");
      }
      if (maxHeaderSize != null) {
        if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) {
          throw new InvalidArgumentError("invalid maxHeaderSize");
        }
      } else {
        maxHeaderSize = getDefaultNodeMaxHeaderSize();
      }
      if (socketPath != null && typeof socketPath !== "string") {
        throw new InvalidArgumentError("invalid socketPath");
      }
      if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {
        throw new InvalidArgumentError("invalid connectTimeout");
      }
      if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {
        throw new InvalidArgumentError("invalid keepAliveTimeout");
      }
      if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {
        throw new InvalidArgumentError("invalid keepAliveMaxTimeout");
      }
      if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {
        throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold");
      }
      if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {
        throw new InvalidArgumentError("headersTimeout must be a positive integer or zero");
      }
      if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {
        throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero");
      }
      if (connect4 != null && typeof connect4 !== "function" && typeof connect4 !== "object") {
        throw new InvalidArgumentError("connect must be a function or an object");
      }
      if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {
        throw new InvalidArgumentError("maxRequestsPerClient must be a positive number");
      }
      if (localAddress != null && (typeof localAddress !== "string" || net2.isIP(localAddress) === 0)) {
        throw new InvalidArgumentError("localAddress must be valid string IP address");
      }
      if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {
        throw new InvalidArgumentError("maxResponseSize must be a positive number");
      }
      if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) {
        throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number");
      }
      if (allowH2 != null && typeof allowH2 !== "boolean") {
        throw new InvalidArgumentError("allowH2 must be a valid boolean value");
      }
      if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) {
        throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0");
      }
      if (useH2c != null && typeof useH2c !== "boolean") {
        throw new InvalidArgumentError("useH2c must be a valid boolean value");
      }
      if (initialWindowSize != null && (!Number.isInteger(initialWindowSize) || initialWindowSize < 1)) {
        throw new InvalidArgumentError("initialWindowSize must be a positive integer, greater than 0");
      }
      if (connectionWindowSize != null && (!Number.isInteger(connectionWindowSize) || connectionWindowSize < 1)) {
        throw new InvalidArgumentError("connectionWindowSize must be a positive integer, greater than 0");
      }
      if (pingInterval != null && (typeof pingInterval !== "number" || !Number.isInteger(pingInterval) || pingInterval < 0)) {
        throw new InvalidArgumentError("pingInterval must be a positive integer, greater or equal to 0");
      }
      super({ webSocket });
      if (typeof connect4 !== "function") {
        connect4 = buildConnector({
          ...tls2,
          maxCachedSessions,
          allowH2,
          useH2c,
          socketPath,
          timeout: connectTimeout,
          ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined,
          ...connect4
        });
      } else {
        const customConnect = connect4;
        connect4 = (opts, callback) => customConnect({
          ...opts,
          ...socketPath != null ? { socketPath } : null,
          ...allowH2 != null ? { allowH2 } : null
        }, callback);
      }
      this[kUrl] = util3.parseOrigin(url2);
      this[kConnector] = connect4;
      this[kPipelining] = pipelining != null ? pipelining : 1;
      this[kMaxHeadersSize] = maxHeaderSize;
      this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4000 : keepAliveTimeout;
      this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600000 : keepAliveMaxTimeout;
      this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2000 : keepAliveTimeoutThreshold;
      this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout];
      this[kServerName] = null;
      this[kLocalAddress] = localAddress != null ? localAddress : null;
      this[kResuming] = 0;
      this[kNeedDrain] = 0;
      this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r
`;
      this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300000;
      this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300000;
      this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength;
      this[kMaxRequests] = maxRequestsPerClient;
      this[kClosedResolve] = null;
      this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1;
      this[kHTTPContext] = null;
      this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100;
      this[kHTTP2InitialWindowSize] = initialWindowSize != null ? initialWindowSize : 262144;
      this[kHTTP2ConnectionWindowSize] = connectionWindowSize != null ? connectionWindowSize : 524288;
      this[kPingInterval] = pingInterval != null ? pingInterval : 60000;
      this[kQueue] = [];
      this[kRunningIdx] = 0;
      this[kPendingIdx] = 0;
      this[kResume] = (sync) => resume2(this, sync);
      this[kOnError] = (err) => onError(this, err);
    }
    get pipelining() {
      return this[kPipelining];
    }
    set pipelining(value) {
      this[kPipelining] = value;
      this[kResume](true);
    }
    get stats() {
      return new ClientStats(this);
    }
    get [kPending]() {
      return this[kQueue].length - this[kPendingIdx];
    }
    get [kRunning]() {
      return this[kPendingIdx] - this[kRunningIdx];
    }
    get [kSize]() {
      return this[kQueue].length - this[kRunningIdx];
    }
    get [kConnected]() {
      return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed;
    }
    get [kBusy]() {
      return Boolean(this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0);
    }
    [kConnect](cb2) {
      connect3(this);
      this.once("connect", cb2);
    }
    [kDispatch](opts, handler) {
      const request2 = new Request2(this[kUrl].origin, opts, handler);
      this[kQueue].push(request2);
      if (this[kResuming]) {} else if (util3.bodyLength(request2.body) == null && util3.isIterable(request2.body)) {
        this[kResuming] = 1;
        queueMicrotask(() => resume2(this));
      } else {
        this[kResume](true);
      }
      if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {
        this[kNeedDrain] = 2;
      }
      return this[kNeedDrain] < 2;
    }
    [kClose]() {
      return new Promise((resolve3) => {
        if (this[kSize]) {
          this[kClosedResolve] = resolve3;
        } else {
          resolve3(null);
        }
      });
    }
    [kDestroy](err) {
      return new Promise((resolve3) => {
        const requests = this[kQueue].splice(this[kPendingIdx]);
        for (let i = 0;i < requests.length; i++) {
          const request2 = requests[i];
          util3.errorRequest(this, request2, err);
        }
        const callback = () => {
          if (this[kClosedResolve]) {
            this[kClosedResolve]();
            this[kClosedResolve] = null;
          }
          resolve3(null);
        };
        if (this[kHTTPContext]) {
          this[kHTTPContext].destroy(err, callback);
          this[kHTTPContext] = null;
        } else {
          queueMicrotask(callback);
        }
        this[kResume]();
      });
    }
  }
  function onError(client, err) {
    if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") {
      assert2(client[kPendingIdx] === client[kRunningIdx]);
      const requests = client[kQueue].splice(client[kRunningIdx]);
      for (let i = 0;i < requests.length; i++) {
        const request2 = requests[i];
        util3.errorRequest(client, request2, err);
      }
      assert2(client[kSize] === 0);
    }
  }
  function connect3(client) {
    assert2(!client[kConnecting]);
    assert2(!client[kHTTPContext]);
    let { host, hostname: hostname4, protocol, port } = client[kUrl];
    if (hostname4[0] === "[") {
      const idx = hostname4.indexOf("]");
      assert2(idx !== -1);
      const ip = hostname4.substring(1, idx);
      assert2(net2.isIPv6(ip));
      hostname4 = ip;
    }
    client[kConnecting] = true;
    if (channels.beforeConnect.hasSubscribers) {
      channels.beforeConnect.publish({
        connectParams: {
          host,
          hostname: hostname4,
          protocol,
          port,
          version: client[kHTTPContext]?.version,
          servername: client[kServerName],
          localAddress: client[kLocalAddress]
        },
        connector: client[kConnector]
      });
    }
    try {
      client[kConnector]({
        host,
        hostname: hostname4,
        protocol,
        port,
        servername: client[kServerName],
        localAddress: client[kLocalAddress]
      }, (err, socket) => {
        if (err) {
          handleConnectError(client, err, { host, hostname: hostname4, protocol, port });
          client[kResume]();
          return;
        }
        if (client.destroyed) {
          util3.destroy(socket.on("error", noop2), new ClientDestroyedError);
          client[kResume]();
          return;
        }
        assert2(socket);
        try {
          client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket);
        } catch (err2) {
          socket.destroy().on("error", noop2);
          handleConnectError(client, err2, { host, hostname: hostname4, protocol, port });
          client[kResume]();
          return;
        }
        client[kConnecting] = false;
        socket[kCounter] = 0;
        socket[kMaxRequests] = client[kMaxRequests];
        socket[kClient] = client;
        socket[kError] = null;
        if (channels.connected.hasSubscribers) {
          channels.connected.publish({
            connectParams: {
              host,
              hostname: hostname4,
              protocol,
              port,
              version: client[kHTTPContext]?.version,
              servername: client[kServerName],
              localAddress: client[kLocalAddress]
            },
            connector: client[kConnector],
            socket
          });
        }
        client.emit("connect", client[kUrl], [client]);
        client[kResume]();
      });
    } catch (err) {
      handleConnectError(client, err, { host, hostname: hostname4, protocol, port });
      client[kResume]();
    }
  }
  function handleConnectError(client, err, { host, hostname: hostname4, protocol, port }) {
    if (client.destroyed) {
      return;
    }
    client[kConnecting] = false;
    if (channels.connectError.hasSubscribers) {
      channels.connectError.publish({
        connectParams: {
          host,
          hostname: hostname4,
          protocol,
          port,
          version: client[kHTTPContext]?.version,
          servername: client[kServerName],
          localAddress: client[kLocalAddress]
        },
        connector: client[kConnector],
        error: err
      });
    }
    if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") {
      assert2(client[kRunning] === 0);
      while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
        const request2 = client[kQueue][client[kPendingIdx]++];
        util3.errorRequest(client, request2, err);
      }
    } else {
      onError(client, err);
    }
    client.emit("connectionError", client[kUrl], [client], err);
  }
  function emitDrain(client) {
    client[kNeedDrain] = 0;
    client.emit("drain", client[kUrl], [client]);
  }
  function resume2(client, sync) {
    if (client[kResuming] === 2) {
      return;
    }
    client[kResuming] = 2;
    _resume(client, sync);
    client[kResuming] = 0;
    if (client[kRunningIdx] > 256) {
      client[kQueue].splice(0, client[kRunningIdx]);
      client[kPendingIdx] -= client[kRunningIdx];
      client[kRunningIdx] = 0;
    }
  }
  function _resume(client, sync) {
    while (true) {
      if (client.destroyed) {
        assert2(client[kPending] === 0);
        return;
      }
      if (client[kClosedResolve] && !client[kSize]) {
        client[kClosedResolve]();
        client[kClosedResolve] = null;
        return;
      }
      if (client[kHTTPContext]) {
        client[kHTTPContext].resume();
      }
      if (client[kBusy]) {
        client[kNeedDrain] = 2;
      } else if (client[kNeedDrain] === 2) {
        if (sync) {
          client[kNeedDrain] = 1;
          queueMicrotask(() => emitDrain(client));
        } else {
          emitDrain(client);
        }
        continue;
      }
      if (client[kPending] === 0) {
        return;
      }
      if (client[kRunning] >= (getPipelining(client) || 1)) {
        return;
      }
      const request2 = client[kQueue][client[kPendingIdx]];
      if (request2 === null) {
        return;
      }
      if (client[kUrl].protocol === "https:" && client[kServerName] !== request2.servername) {
        if (client[kRunning] > 0) {
          return;
        }
        client[kServerName] = request2.servername;
        client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => {
          client[kHTTPContext] = null;
          resume2(client);
        });
      }
      if (client[kConnecting]) {
        return;
      }
      if (!client[kHTTPContext]) {
        connect3(client);
        return;
      }
      if (client[kHTTPContext].destroyed) {
        return;
      }
      if (client[kHTTPContext].busy(request2)) {
        return;
      }
      if (!request2.aborted && client[kHTTPContext].write(request2)) {
        client[kPendingIdx]++;
      } else {
        client[kQueue].splice(client[kPendingIdx], 1);
      }
    }
  }
  module.exports = Client4;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/fixed-queue.js
var require_fixed_queue = __commonJS((exports2, module) => {
  var kSize = 2048;
  var kMask = kSize - 1;

  class FixedCircularBuffer {
    bottom = 0;
    top = 0;
    list = new Array(kSize).fill(undefined);
    next = null;
    isEmpty() {
      return this.top === this.bottom;
    }
    isFull() {
      return (this.top + 1 & kMask) === this.bottom;
    }
    push(data) {
      this.list[this.top] = data;
      this.top = this.top + 1 & kMask;
    }
    shift() {
      const nextItem = this.list[this.bottom];
      if (nextItem === undefined) {
        return null;
      }
      this.list[this.bottom] = undefined;
      this.bottom = this.bottom + 1 & kMask;
      return nextItem;
    }
  }
  module.exports = class FixedQueue {
    constructor() {
      this.head = this.tail = new FixedCircularBuffer;
    }
    isEmpty() {
      return this.head.isEmpty();
    }
    push(data) {
      if (this.head.isFull()) {
        this.head = this.head.next = new FixedCircularBuffer;
      }
      this.head.push(data);
    }
    shift() {
      const tail = this.tail;
      const next = tail.shift();
      if (tail.isEmpty() && tail.next !== null) {
        this.tail = tail.next;
        tail.next = null;
      }
      return next;
    }
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/pool-base.js
var require_pool_base = __commonJS((exports2, module) => {
  var { PoolStats } = require_stats();
  var DispatcherBase = require_dispatcher_base();
  var FixedQueue = require_fixed_queue();
  var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols2();
  var kClients = Symbol("clients");
  var kNeedDrain = Symbol("needDrain");
  var kQueue = Symbol("queue");
  var kClosedResolve = Symbol("closed resolve");
  var kOnDrain = Symbol("onDrain");
  var kOnConnect = Symbol("onConnect");
  var kOnDisconnect = Symbol("onDisconnect");
  var kOnConnectionError = Symbol("onConnectionError");
  var kGetDispatcher = Symbol("get dispatcher");
  var kAddClient = Symbol("add client");
  var kRemoveClient = Symbol("remove client");

  class PoolBase extends DispatcherBase {
    [kQueue] = new FixedQueue;
    [kQueued] = 0;
    [kClients] = [];
    [kNeedDrain] = false;
    [kOnDrain](client, origin, targets) {
      const queue = this[kQueue];
      let needDrain = false;
      while (!needDrain) {
        const item = queue.shift();
        if (!item) {
          break;
        }
        this[kQueued]--;
        needDrain = !client.dispatch(item.opts, item.handler);
      }
      client[kNeedDrain] = needDrain;
      if (!needDrain && this[kNeedDrain]) {
        this[kNeedDrain] = false;
        this.emit("drain", origin, [this, ...targets]);
      }
      if (this[kClosedResolve] && queue.isEmpty()) {
        const closeAll = [];
        for (let i = 0;i < this[kClients].length; i++) {
          const client2 = this[kClients][i];
          if (!client2.destroyed) {
            closeAll.push(client2.close());
          }
        }
        return Promise.all(closeAll).then(this[kClosedResolve]);
      }
    }
    [kOnConnect] = (origin, targets) => {
      this.emit("connect", origin, [this, ...targets]);
    };
    [kOnDisconnect] = (origin, targets, err) => {
      this.emit("disconnect", origin, [this, ...targets], err);
    };
    [kOnConnectionError] = (origin, targets, err) => {
      this.emit("connectionError", origin, [this, ...targets], err);
    };
    get [kBusy]() {
      return this[kNeedDrain];
    }
    get [kConnected]() {
      let ret = 0;
      for (const { [kConnected]: connected } of this[kClients]) {
        ret += connected;
      }
      return ret;
    }
    get [kFree]() {
      let ret = 0;
      for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) {
        ret += connected && !needDrain;
      }
      return ret;
    }
    get [kPending]() {
      let ret = this[kQueued];
      for (const { [kPending]: pending } of this[kClients]) {
        ret += pending;
      }
      return ret;
    }
    get [kRunning]() {
      let ret = 0;
      for (const { [kRunning]: running } of this[kClients]) {
        ret += running;
      }
      return ret;
    }
    get [kSize]() {
      let ret = this[kQueued];
      for (const { [kSize]: size } of this[kClients]) {
        ret += size;
      }
      return ret;
    }
    get stats() {
      return new PoolStats(this);
    }
    [kClose]() {
      if (this[kQueue].isEmpty()) {
        const closeAll = [];
        for (let i = 0;i < this[kClients].length; i++) {
          const client = this[kClients][i];
          if (!client.destroyed) {
            closeAll.push(client.close());
          }
        }
        return Promise.all(closeAll);
      } else {
        return new Promise((resolve3) => {
          this[kClosedResolve] = resolve3;
        });
      }
    }
    [kDestroy](err) {
      while (true) {
        const item = this[kQueue].shift();
        if (!item) {
          break;
        }
        item.handler.onError(err);
      }
      const destroyAll = new Array(this[kClients].length);
      for (let i = 0;i < this[kClients].length; i++) {
        destroyAll[i] = this[kClients][i].destroy(err);
      }
      return Promise.all(destroyAll);
    }
    [kDispatch](opts, handler) {
      const dispatcher = this[kGetDispatcher]();
      if (!dispatcher) {
        this[kNeedDrain] = true;
        this[kQueue].push({ opts, handler });
        this[kQueued]++;
      } else if (!dispatcher.dispatch(opts, handler)) {
        dispatcher[kNeedDrain] = true;
        this[kNeedDrain] = !this[kGetDispatcher]();
      }
      return !this[kNeedDrain];
    }
    [kAddClient](client) {
      client.on("drain", this[kOnDrain].bind(this, client)).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]);
      this[kClients].push(client);
      if (this[kNeedDrain]) {
        queueMicrotask(() => {
          if (this[kNeedDrain]) {
            this[kOnDrain](client, client[kUrl], [client, this]);
          }
        });
      }
      return this;
    }
    [kRemoveClient](client) {
      client.close(() => {
        const idx = this[kClients].indexOf(client);
        if (idx !== -1) {
          this[kClients].splice(idx, 1);
        }
      });
      this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true);
    }
  }
  module.exports = {
    PoolBase,
    kClients,
    kNeedDrain,
    kAddClient,
    kRemoveClient,
    kGetDispatcher
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/pool.js
var require_pool = __commonJS((exports2, module) => {
  var {
    PoolBase,
    kClients,
    kNeedDrain,
    kAddClient,
    kGetDispatcher,
    kRemoveClient
  } = require_pool_base();
  var Client4 = require_client5();
  var {
    InvalidArgumentError
  } = require_errors8();
  var util3 = require_util3();
  var { kUrl } = require_symbols2();
  var buildConnector = require_connect();
  var kOptions = Symbol("options");
  var kConnections = Symbol("connections");
  var kFactory = Symbol("factory");
  function defaultFactory(origin, opts) {
    return new Client4(origin, opts);
  }

  class Pool3 extends PoolBase {
    constructor(origin, {
      connections,
      factory = defaultFactory,
      connect: connect3,
      connectTimeout,
      tls: tls2,
      maxCachedSessions,
      socketPath,
      autoSelectFamily,
      autoSelectFamilyAttemptTimeout,
      allowH2,
      clientTtl,
      ...options2
    } = {}) {
      if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
        throw new InvalidArgumentError("invalid connections");
      }
      if (typeof factory !== "function") {
        throw new InvalidArgumentError("factory must be a function.");
      }
      if (connect3 != null && typeof connect3 !== "function" && typeof connect3 !== "object") {
        throw new InvalidArgumentError("connect must be a function or an object");
      }
      if (typeof connect3 !== "function") {
        connect3 = buildConnector({
          ...tls2,
          maxCachedSessions,
          allowH2,
          socketPath,
          timeout: connectTimeout,
          ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined,
          ...connect3
        });
      }
      super(options2);
      this[kConnections] = connections || null;
      this[kUrl] = util3.parseOrigin(origin);
      this[kOptions] = { ...util3.deepClone(options2), connect: connect3, allowH2, clientTtl, socketPath };
      this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : undefined;
      this[kFactory] = factory;
      this.on("connect", (origin2, targets) => {
        if (clientTtl != null && clientTtl > 0) {
          for (const target of targets) {
            Object.assign(target, { ttl: Date.now() });
          }
        }
      });
      this.on("connectionError", (origin2, targets, error49) => {
        for (const target of targets) {
          const idx = this[kClients].indexOf(target);
          if (idx !== -1) {
            this[kClients].splice(idx, 1);
          }
        }
      });
    }
    [kGetDispatcher]() {
      const clientTtlOption = this[kOptions].clientTtl;
      for (const client of this[kClients]) {
        if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && Date.now() - client.ttl > clientTtlOption) {
          this[kRemoveClient](client);
        } else if (!client[kNeedDrain]) {
          return client;
        }
      }
      if (!this[kConnections] || this[kClients].length < this[kConnections]) {
        const dispatcher = this[kFactory](this[kUrl], this[kOptions]);
        this[kAddClient](dispatcher);
        return dispatcher;
      }
    }
  }
  module.exports = Pool3;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/balanced-pool.js
var require_balanced_pool = __commonJS((exports2, module) => {
  var {
    BalancedPoolMissingUpstreamError,
    InvalidArgumentError
  } = require_errors8();
  var {
    PoolBase,
    kClients,
    kNeedDrain,
    kAddClient,
    kRemoveClient,
    kGetDispatcher
  } = require_pool_base();
  var Pool3 = require_pool();
  var { kUrl } = require_symbols2();
  var util3 = require_util3();
  var kFactory = Symbol("factory");
  var kOptions = Symbol("options");
  var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor");
  var kCurrentWeight = Symbol("kCurrentWeight");
  var kIndex = Symbol("kIndex");
  var kWeight = Symbol("kWeight");
  var kMaxWeightPerServer = Symbol("kMaxWeightPerServer");
  var kErrorPenalty = Symbol("kErrorPenalty");
  function getGreatestCommonDivisor(a2, b5) {
    if (a2 === 0)
      return b5;
    while (b5 !== 0) {
      const t2 = b5;
      b5 = a2 % b5;
      a2 = t2;
    }
    return a2;
  }
  function defaultFactory(origin, opts) {
    return new Pool3(origin, opts);
  }

  class BalancedPool extends PoolBase {
    constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) {
      if (typeof factory !== "function") {
        throw new InvalidArgumentError("factory must be a function.");
      }
      super(opts);
      this[kOptions] = { ...util3.deepClone(opts) };
      this[kOptions].interceptors = opts.interceptors ? { ...opts.interceptors } : undefined;
      this[kIndex] = -1;
      this[kCurrentWeight] = 0;
      this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100;
      this[kErrorPenalty] = this[kOptions].errorPenalty || 15;
      if (!Array.isArray(upstreams)) {
        upstreams = [upstreams];
      }
      this[kFactory] = factory;
      for (const upstream of upstreams) {
        this.addUpstream(upstream);
      }
      this._updateBalancedPoolStats();
    }
    addUpstream(upstream) {
      const upstreamOrigin = util3.parseOrigin(upstream).origin;
      if (this[kClients].find((pool3) => pool3[kUrl].origin === upstreamOrigin && pool3.closed !== true && pool3.destroyed !== true)) {
        return this;
      }
      const pool2 = this[kFactory](upstreamOrigin, this[kOptions]);
      this[kAddClient](pool2);
      pool2.on("connect", () => {
        pool2[kWeight] = Math.min(this[kMaxWeightPerServer], pool2[kWeight] + this[kErrorPenalty]);
      });
      pool2.on("connectionError", () => {
        pool2[kWeight] = Math.max(1, pool2[kWeight] - this[kErrorPenalty]);
        this._updateBalancedPoolStats();
      });
      pool2.on("disconnect", (...args) => {
        const err = args[2];
        if (err && err.code === "UND_ERR_SOCKET") {
          pool2[kWeight] = Math.max(1, pool2[kWeight] - this[kErrorPenalty]);
          this._updateBalancedPoolStats();
        }
      });
      for (const client of this[kClients]) {
        client[kWeight] = this[kMaxWeightPerServer];
      }
      this._updateBalancedPoolStats();
      return this;
    }
    _updateBalancedPoolStats() {
      let result = 0;
      for (let i = 0;i < this[kClients].length; i++) {
        result = getGreatestCommonDivisor(this[kClients][i][kWeight], result);
      }
      this[kGreatestCommonDivisor] = result;
    }
    removeUpstream(upstream) {
      const upstreamOrigin = util3.parseOrigin(upstream).origin;
      const pool2 = this[kClients].find((pool3) => pool3[kUrl].origin === upstreamOrigin && pool3.closed !== true && pool3.destroyed !== true);
      if (pool2) {
        this[kRemoveClient](pool2);
      }
      return this;
    }
    getUpstream(upstream) {
      const upstreamOrigin = util3.parseOrigin(upstream).origin;
      return this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true);
    }
    get upstreams() {
      return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p3) => p3[kUrl].origin);
    }
    [kGetDispatcher]() {
      if (this[kClients].length === 0) {
        throw new BalancedPoolMissingUpstreamError;
      }
      const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true);
      if (!dispatcher) {
        return;
      }
      const allClientsBusy = this[kClients].map((pool2) => pool2[kNeedDrain]).reduce((a2, b5) => a2 && b5, true);
      if (allClientsBusy) {
        return;
      }
      let counter = 0;
      let maxWeightIndex = this[kClients].findIndex((pool2) => !pool2[kNeedDrain]);
      while (counter++ < this[kClients].length) {
        this[kIndex] = (this[kIndex] + 1) % this[kClients].length;
        const pool2 = this[kClients][this[kIndex]];
        if (pool2[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool2[kNeedDrain]) {
          maxWeightIndex = this[kIndex];
        }
        if (this[kIndex] === 0) {
          this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor];
          if (this[kCurrentWeight] <= 0) {
            this[kCurrentWeight] = this[kMaxWeightPerServer];
          }
        }
        if (pool2[kWeight] >= this[kCurrentWeight] && !pool2[kNeedDrain]) {
          return pool2;
        }
      }
      this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight];
      this[kIndex] = maxWeightIndex;
      return this[kClients][maxWeightIndex];
    }
  }
  module.exports = BalancedPool;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/round-robin-pool.js
var require_round_robin_pool = __commonJS((exports2, module) => {
  var {
    PoolBase,
    kClients,
    kNeedDrain,
    kAddClient,
    kGetDispatcher,
    kRemoveClient
  } = require_pool_base();
  var Client4 = require_client5();
  var {
    InvalidArgumentError
  } = require_errors8();
  var util3 = require_util3();
  var { kUrl } = require_symbols2();
  var buildConnector = require_connect();
  var kOptions = Symbol("options");
  var kConnections = Symbol("connections");
  var kFactory = Symbol("factory");
  var kIndex = Symbol("index");
  function defaultFactory(origin, opts) {
    return new Client4(origin, opts);
  }

  class RoundRobinPool extends PoolBase {
    constructor(origin, {
      connections,
      factory = defaultFactory,
      connect: connect3,
      connectTimeout,
      tls: tls2,
      maxCachedSessions,
      socketPath,
      autoSelectFamily,
      autoSelectFamilyAttemptTimeout,
      allowH2,
      clientTtl,
      ...options2
    } = {}) {
      if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
        throw new InvalidArgumentError("invalid connections");
      }
      if (typeof factory !== "function") {
        throw new InvalidArgumentError("factory must be a function.");
      }
      if (connect3 != null && typeof connect3 !== "function" && typeof connect3 !== "object") {
        throw new InvalidArgumentError("connect must be a function or an object");
      }
      if (typeof connect3 !== "function") {
        connect3 = buildConnector({
          ...tls2,
          maxCachedSessions,
          allowH2,
          socketPath,
          timeout: connectTimeout,
          ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined,
          ...connect3
        });
      }
      super();
      this[kConnections] = connections || null;
      this[kUrl] = util3.parseOrigin(origin);
      this[kOptions] = { ...util3.deepClone(options2), connect: connect3, allowH2, clientTtl, socketPath };
      this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : undefined;
      this[kFactory] = factory;
      this[kIndex] = -1;
      this.on("connect", (origin2, targets) => {
        if (clientTtl != null && clientTtl > 0) {
          for (const target of targets) {
            Object.assign(target, { ttl: Date.now() });
          }
        }
      });
      this.on("connectionError", (origin2, targets, error49) => {
        for (const target of targets) {
          const idx = this[kClients].indexOf(target);
          if (idx !== -1) {
            this[kClients].splice(idx, 1);
          }
        }
      });
    }
    [kGetDispatcher]() {
      const clientTtlOption = this[kOptions].clientTtl;
      const clientsLength = this[kClients].length;
      if (clientsLength === 0) {
        const dispatcher = this[kFactory](this[kUrl], this[kOptions]);
        this[kAddClient](dispatcher);
        return dispatcher;
      }
      let checked = 0;
      while (checked < clientsLength) {
        this[kIndex] = (this[kIndex] + 1) % clientsLength;
        const client = this[kClients][this[kIndex]];
        if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && Date.now() - client.ttl > clientTtlOption) {
          this[kRemoveClient](client);
          checked++;
          continue;
        }
        if (!client[kNeedDrain]) {
          return client;
        }
        checked++;
      }
      if (!this[kConnections] || clientsLength < this[kConnections]) {
        const dispatcher = this[kFactory](this[kUrl], this[kOptions]);
        this[kAddClient](dispatcher);
        return dispatcher;
      }
    }
  }
  module.exports = RoundRobinPool;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/agent.js
var require_agent = __commonJS((exports2, module) => {
  var { InvalidArgumentError, MaxOriginsReachedError } = require_errors8();
  var { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = require_symbols2();
  var DispatcherBase = require_dispatcher_base();
  var Pool3 = require_pool();
  var Client4 = require_client5();
  var util3 = require_util3();
  var kOnConnect = Symbol("onConnect");
  var kOnDisconnect = Symbol("onDisconnect");
  var kOnConnectionError = Symbol("onConnectionError");
  var kOnDrain = Symbol("onDrain");
  var kFactory = Symbol("factory");
  var kOptions = Symbol("options");
  var kOrigins = Symbol("origins");
  function defaultFactory(origin, opts) {
    return opts && opts.connections === 1 ? new Client4(origin, opts) : new Pool3(origin, opts);
  }

  class Agent3 extends DispatcherBase {
    constructor({ factory = defaultFactory, maxOrigins = Infinity, connect: connect3, ...options2 } = {}) {
      if (typeof factory !== "function") {
        throw new InvalidArgumentError("factory must be a function.");
      }
      if (connect3 != null && typeof connect3 !== "function" && typeof connect3 !== "object") {
        throw new InvalidArgumentError("connect must be a function or an object");
      }
      if (typeof maxOrigins !== "number" || Number.isNaN(maxOrigins) || maxOrigins <= 0) {
        throw new InvalidArgumentError("maxOrigins must be a number greater than 0");
      }
      super(options2);
      if (connect3 && typeof connect3 !== "function") {
        connect3 = { ...connect3 };
      }
      this[kOptions] = { ...util3.deepClone(options2), maxOrigins, connect: connect3 };
      this[kFactory] = factory;
      this[kClients] = new Map;
      this[kOrigins] = new Set;
      this[kOnDrain] = (origin, targets) => {
        this.emit("drain", origin, [this, ...targets]);
      };
      this[kOnConnect] = (origin, targets) => {
        this.emit("connect", origin, [this, ...targets]);
      };
      this[kOnDisconnect] = (origin, targets, err) => {
        this.emit("disconnect", origin, [this, ...targets], err);
      };
      this[kOnConnectionError] = (origin, targets, err) => {
        this.emit("connectionError", origin, [this, ...targets], err);
      };
    }
    get [kRunning]() {
      let ret = 0;
      for (const { dispatcher } of this[kClients].values()) {
        ret += dispatcher[kRunning];
      }
      return ret;
    }
    [kDispatch](opts, handler) {
      let key;
      if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) {
        key = String(opts.origin);
      } else {
        throw new InvalidArgumentError("opts.origin must be a non-empty string or URL.");
      }
      if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) {
        throw new MaxOriginsReachedError;
      }
      const result = this[kClients].get(key);
      let dispatcher = result && result.dispatcher;
      if (!dispatcher) {
        const closeClientIfUnused = (connected) => {
          const result2 = this[kClients].get(key);
          if (result2) {
            if (connected)
              result2.count -= 1;
            if (result2.count <= 0) {
              this[kClients].delete(key);
              if (!result2.dispatcher.destroyed) {
                result2.dispatcher.close();
              }
            }
            this[kOrigins].delete(key);
          }
        };
        dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", (origin, targets) => {
          const result2 = this[kClients].get(key);
          if (result2) {
            result2.count += 1;
          }
          this[kOnConnect](origin, targets);
        }).on("disconnect", (origin, targets, err) => {
          closeClientIfUnused(true);
          this[kOnDisconnect](origin, targets, err);
        }).on("connectionError", (origin, targets, err) => {
          closeClientIfUnused(false);
          this[kOnConnectionError](origin, targets, err);
        });
        this[kClients].set(key, { count: 0, dispatcher });
        this[kOrigins].add(key);
      }
      return dispatcher.dispatch(opts, handler);
    }
    [kClose]() {
      const closePromises = [];
      for (const { dispatcher } of this[kClients].values()) {
        closePromises.push(dispatcher.close());
      }
      this[kClients].clear();
      return Promise.all(closePromises);
    }
    [kDestroy](err) {
      const destroyPromises = [];
      for (const { dispatcher } of this[kClients].values()) {
        destroyPromises.push(dispatcher.destroy(err));
      }
      this[kClients].clear();
      return Promise.all(destroyPromises);
    }
    get stats() {
      const allClientStats = {};
      for (const { dispatcher } of this[kClients].values()) {
        if (dispatcher.stats) {
          allClientStats[dispatcher[kUrl].origin] = dispatcher.stats;
        }
      }
      return allClientStats;
    }
  }
  module.exports = Agent3;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/socks5-utils.js
var require_socks5_utils = __commonJS((exports2, module) => {
  var { Buffer: Buffer2 } = __require("node:buffer");
  var net2 = __require("node:net");
  var { InvalidArgumentError } = require_errors8();
  function parseAddress(address) {
    if (net2.isIPv4(address)) {
      const parts = address.split(".").map(Number);
      return {
        type: 1,
        buffer: Buffer2.from(parts)
      };
    }
    if (net2.isIPv6(address)) {
      return {
        type: 4,
        buffer: parseIPv6(address)
      };
    }
    const domainBuffer = Buffer2.from(address, "utf8");
    if (domainBuffer.length > 255) {
      throw new InvalidArgumentError("Domain name too long (max 255 bytes)");
    }
    return {
      type: 3,
      buffer: Buffer2.concat([Buffer2.from([domainBuffer.length]), domainBuffer])
    };
  }
  function parseIPv6(address) {
    const buffer = Buffer2.alloc(16);
    let normalizedAddress = address;
    if (address.includes(".")) {
      const lastColonIndex = address.lastIndexOf(":");
      const ipv4Part = address.slice(lastColonIndex + 1);
      if (net2.isIPv4(ipv4Part)) {
        const octets = ipv4Part.split(".").map(Number);
        const high = (octets[0] << 8 | octets[1]).toString(16);
        const low = (octets[2] << 8 | octets[3]).toString(16);
        normalizedAddress = `${address.slice(0, lastColonIndex)}:${high}:${low}`;
      }
    }
    const doubleColonIndex = normalizedAddress.indexOf("::");
    if (doubleColonIndex !== -1) {
      const before = normalizedAddress.slice(0, doubleColonIndex);
      const after = normalizedAddress.slice(doubleColonIndex + 2);
      const beforeParts = before === "" ? [] : before.split(":");
      const afterParts = after === "" ? [] : after.split(":");
      let bufferIndex = 0;
      for (const part of beforeParts) {
        buffer.writeUInt16BE(parseInt(part, 16), bufferIndex);
        bufferIndex += 2;
      }
      bufferIndex = 16 - afterParts.length * 2;
      for (const part of afterParts) {
        buffer.writeUInt16BE(parseInt(part, 16), bufferIndex);
        bufferIndex += 2;
      }
    } else {
      const parts = normalizedAddress.split(":");
      for (let i = 0;i < parts.length; i++) {
        buffer.writeUInt16BE(parseInt(parts[i], 16), i * 2);
      }
    }
    return buffer;
  }
  function buildAddressBuffer(type2, addressBuffer, port) {
    const portBuffer = Buffer2.allocUnsafe(2);
    portBuffer.writeUInt16BE(port, 0);
    return Buffer2.concat([
      Buffer2.from([type2]),
      addressBuffer,
      portBuffer
    ]);
  }
  function parseResponseAddress(buffer, offset = 0) {
    if (buffer.length < offset + 1) {
      throw new InvalidArgumentError("Buffer too small to contain address type");
    }
    const addressType = buffer[offset];
    let address;
    let currentOffset = offset + 1;
    switch (addressType) {
      case 1: {
        if (buffer.length < currentOffset + 6) {
          throw new InvalidArgumentError("Buffer too small for IPv4 address");
        }
        address = Array.from(buffer.subarray(currentOffset, currentOffset + 4)).join(".");
        currentOffset += 4;
        break;
      }
      case 3: {
        if (buffer.length < currentOffset + 1) {
          throw new InvalidArgumentError("Buffer too small for domain length");
        }
        const domainLength = buffer[currentOffset];
        currentOffset += 1;
        if (buffer.length < currentOffset + domainLength + 2) {
          throw new InvalidArgumentError("Buffer too small for domain address");
        }
        address = buffer.subarray(currentOffset, currentOffset + domainLength).toString("utf8");
        currentOffset += domainLength;
        break;
      }
      case 4: {
        if (buffer.length < currentOffset + 18) {
          throw new InvalidArgumentError("Buffer too small for IPv6 address");
        }
        const parts = [];
        for (let i = 0;i < 8; i++) {
          const value = buffer.readUInt16BE(currentOffset + i * 2);
          parts.push(value.toString(16));
        }
        address = parts.join(":");
        currentOffset += 16;
        break;
      }
      default:
        throw new InvalidArgumentError(`Invalid address type: ${addressType}`);
    }
    if (buffer.length < currentOffset + 2) {
      throw new InvalidArgumentError("Buffer too small for port");
    }
    const port = buffer.readUInt16BE(currentOffset);
    currentOffset += 2;
    return {
      address,
      port,
      bytesRead: currentOffset - offset
    };
  }
  function createReplyError(replyCode) {
    const messages = {
      1: "General SOCKS server failure",
      2: "Connection not allowed by ruleset",
      3: "Network unreachable",
      4: "Host unreachable",
      5: "Connection refused",
      6: "TTL expired",
      7: "Command not supported",
      8: "Address type not supported"
    };
    const message2 = messages[replyCode] || `Unknown SOCKS5 error code: ${replyCode}`;
    const error49 = new Error(message2);
    error49.code = `SOCKS5_${replyCode}`;
    return error49;
  }
  module.exports = {
    parseAddress,
    parseIPv6,
    buildAddressBuffer,
    parseResponseAddress,
    createReplyError
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/socks5-client.js
var require_socks5_client = __commonJS((exports2, module) => {
  var { EventEmitter } = __require("node:events");
  var { Buffer: Buffer2 } = __require("node:buffer");
  var { InvalidArgumentError, Socks5ProxyError } = require_errors8();
  var { debuglog } = __require("node:util");
  var { parseAddress } = require_socks5_utils();
  var debug2 = debuglog("undici:socks5");
  var EMPTY_BUFFER = Buffer2.alloc(0);
  var SOCKS_VERSION = 5;
  var AUTH_METHODS = {
    NO_AUTH: 0,
    GSSAPI: 1,
    USERNAME_PASSWORD: 2,
    NO_ACCEPTABLE: 255
  };
  var COMMANDS = {
    CONNECT: 1,
    BIND: 2,
    UDP_ASSOCIATE: 3
  };
  var ADDRESS_TYPES = {
    IPV4: 1,
    DOMAIN: 3,
    IPV6: 4
  };
  var REPLY_CODES = {
    SUCCEEDED: 0,
    GENERAL_FAILURE: 1,
    CONNECTION_NOT_ALLOWED: 2,
    NETWORK_UNREACHABLE: 3,
    HOST_UNREACHABLE: 4,
    CONNECTION_REFUSED: 5,
    TTL_EXPIRED: 6,
    COMMAND_NOT_SUPPORTED: 7,
    ADDRESS_TYPE_NOT_SUPPORTED: 8
  };
  var STATES = {
    INITIAL: "initial",
    HANDSHAKING: "handshaking",
    AUTHENTICATING: "authenticating",
    AUTHENTICATED: "authenticated",
    CONNECTING: "connecting",
    CONNECTED: "connected",
    ERROR: "error",
    CLOSED: "closed"
  };

  class Socks5Client extends EventEmitter {
    constructor(socket, options2 = {}) {
      super();
      if (!socket) {
        throw new InvalidArgumentError("socket is required");
      }
      this.socket = socket;
      this.options = options2;
      this.state = STATES.INITIAL;
      this.buffer = EMPTY_BUFFER;
      this.onSocketData = this.onData.bind(this);
      this.onSocketError = this.onError.bind(this);
      this.onSocketClose = this.onClose.bind(this);
      this.authMethods = [];
      if (options2.username && options2.password) {
        this.authMethods.push(AUTH_METHODS.USERNAME_PASSWORD);
      }
      this.authMethods.push(AUTH_METHODS.NO_AUTH);
      this.socket.on("data", this.onSocketData);
      this.socket.on("error", this.onSocketError);
      this.socket.on("close", this.onSocketClose);
    }
    onData(data) {
      debug2("received data", data.length, "bytes in state", this.state);
      this.buffer = Buffer2.concat([this.buffer, data]);
      try {
        switch (this.state) {
          case STATES.HANDSHAKING:
            this.handleHandshakeResponse();
            break;
          case STATES.AUTHENTICATING:
            this.handleAuthResponse();
            break;
          case STATES.CONNECTING:
            this.handleConnectResponse();
            break;
        }
      } catch (err) {
        this.onError(err);
      }
    }
    onError(err) {
      debug2("socket error", err);
      this.state = STATES.ERROR;
      this.emit("error", err);
      this.destroy();
    }
    onClose() {
      debug2("socket closed");
      this.state = STATES.CLOSED;
      this.emit("close");
    }
    destroy() {
      if (this.socket && !this.socket.destroyed) {
        this.socket.destroy();
      }
    }
    markAuthenticated() {
      this.state = STATES.AUTHENTICATED;
      this.emit("authenticated");
    }
    handshake() {
      if (this.state !== STATES.INITIAL) {
        throw new InvalidArgumentError("Handshake already started");
      }
      debug2("starting handshake with", this.authMethods.length, "auth methods");
      this.state = STATES.HANDSHAKING;
      const request2 = Buffer2.alloc(2 + this.authMethods.length);
      request2[0] = SOCKS_VERSION;
      request2[1] = this.authMethods.length;
      this.authMethods.forEach((method, i) => {
        request2[2 + i] = method;
      });
      this.socket.write(request2);
    }
    handleHandshakeResponse() {
      if (this.buffer.length < 2) {
        return;
      }
      const version5 = this.buffer[0];
      const method = this.buffer[1];
      if (version5 !== SOCKS_VERSION) {
        throw new Socks5ProxyError(`Invalid SOCKS version: ${version5}`, "UND_ERR_SOCKS5_VERSION");
      }
      if (method === AUTH_METHODS.NO_ACCEPTABLE) {
        throw new Socks5ProxyError("No acceptable authentication method", "UND_ERR_SOCKS5_AUTH_REJECTED");
      }
      this.buffer = this.buffer.subarray(2);
      debug2("server selected auth method", method);
      if (method === AUTH_METHODS.NO_AUTH) {
        this.markAuthenticated();
      } else if (method === AUTH_METHODS.USERNAME_PASSWORD) {
        this.state = STATES.AUTHENTICATING;
        this.sendAuthRequest();
      } else {
        throw new Socks5ProxyError(`Unsupported authentication method: ${method}`, "UND_ERR_SOCKS5_AUTH_METHOD");
      }
    }
    sendAuthRequest() {
      const { username, password } = this.options;
      if (!username || !password) {
        throw new InvalidArgumentError("Username and password required for authentication");
      }
      debug2("sending username/password auth");
      const usernameBuffer = Buffer2.from(username);
      const passwordBuffer = Buffer2.from(password);
      if (usernameBuffer.length > 255 || passwordBuffer.length > 255) {
        throw new InvalidArgumentError("Username or password too long");
      }
      const request2 = Buffer2.alloc(3 + usernameBuffer.length + passwordBuffer.length);
      request2[0] = 1;
      request2[1] = usernameBuffer.length;
      usernameBuffer.copy(request2, 2);
      request2[2 + usernameBuffer.length] = passwordBuffer.length;
      passwordBuffer.copy(request2, 3 + usernameBuffer.length);
      this.socket.write(request2);
    }
    handleAuthResponse() {
      if (this.buffer.length < 2) {
        return;
      }
      const version5 = this.buffer[0];
      const status = this.buffer[1];
      if (version5 !== 1) {
        throw new Socks5ProxyError(`Invalid auth sub-negotiation version: ${version5}`, "UND_ERR_SOCKS5_AUTH_VERSION");
      }
      if (status !== 0) {
        throw new Socks5ProxyError("Authentication failed", "UND_ERR_SOCKS5_AUTH_FAILED");
      }
      this.buffer = this.buffer.subarray(2);
      debug2("authentication successful");
      this.markAuthenticated();
    }
    connect(address, port) {
      if (this.state === STATES.CONNECTING || this.state === STATES.CONNECTED) {
        throw new InvalidArgumentError("Connection already in progress");
      }
      if (this.state !== STATES.AUTHENTICATED) {
        throw new InvalidArgumentError("Client must be authenticated before CONNECT");
      }
      debug2("connecting to", address, port);
      this.state = STATES.CONNECTING;
      const request2 = this.buildConnectRequest(COMMANDS.CONNECT, address, port);
      this.socket.write(request2);
    }
    buildConnectRequest(command, address, port) {
      const { type: addressType, buffer: addressBuffer } = parseAddress(address);
      const request2 = Buffer2.alloc(4 + addressBuffer.length + 2);
      request2[0] = SOCKS_VERSION;
      request2[1] = command;
      request2[2] = 0;
      request2[3] = addressType;
      addressBuffer.copy(request2, 4);
      request2.writeUInt16BE(port, 4 + addressBuffer.length);
      return request2;
    }
    handleConnectResponse() {
      if (this.buffer.length < 4) {
        return;
      }
      const version5 = this.buffer[0];
      const reply = this.buffer[1];
      const addressType = this.buffer[3];
      if (version5 !== SOCKS_VERSION) {
        throw new Socks5ProxyError(`Invalid SOCKS version in reply: ${version5}`, "UND_ERR_SOCKS5_REPLY_VERSION");
      }
      let responseLength = 4;
      if (addressType === ADDRESS_TYPES.IPV4) {
        responseLength += 4 + 2;
      } else if (addressType === ADDRESS_TYPES.DOMAIN) {
        if (this.buffer.length < 5) {
          return;
        }
        responseLength += 1 + this.buffer[4] + 2;
      } else if (addressType === ADDRESS_TYPES.IPV6) {
        responseLength += 16 + 2;
      } else {
        throw new Socks5ProxyError(`Invalid address type in reply: ${addressType}`, "UND_ERR_SOCKS5_ADDR_TYPE");
      }
      if (this.buffer.length < responseLength) {
        return;
      }
      if (reply !== REPLY_CODES.SUCCEEDED) {
        const errorMessage = this.getReplyErrorMessage(reply);
        throw new Socks5ProxyError(`SOCKS5 connection failed: ${errorMessage}`, `UND_ERR_SOCKS5_REPLY_${reply}`);
      }
      let boundAddress;
      let offset = 4;
      if (addressType === ADDRESS_TYPES.IPV4) {
        boundAddress = Array.from(this.buffer.subarray(offset, offset + 4)).join(".");
        offset += 4;
      } else if (addressType === ADDRESS_TYPES.DOMAIN) {
        const domainLength = this.buffer[offset];
        offset += 1;
        boundAddress = this.buffer.subarray(offset, offset + domainLength).toString();
        offset += domainLength;
      } else if (addressType === ADDRESS_TYPES.IPV6) {
        const parts = [];
        for (let i = 0;i < 8; i++) {
          const value = this.buffer.readUInt16BE(offset + i * 2);
          parts.push(value.toString(16));
        }
        boundAddress = parts.join(":");
        offset += 16;
      }
      const boundPort = this.buffer.readUInt16BE(offset);
      this.buffer = EMPTY_BUFFER;
      this.state = STATES.CONNECTED;
      this.socket.removeListener("data", this.onSocketData);
      debug2("connected, bound address:", boundAddress, "port:", boundPort);
      this.emit("connected", { address: boundAddress, port: boundPort });
    }
    getReplyErrorMessage(reply) {
      switch (reply) {
        case REPLY_CODES.GENERAL_FAILURE:
          return "General SOCKS server failure";
        case REPLY_CODES.CONNECTION_NOT_ALLOWED:
          return "Connection not allowed by ruleset";
        case REPLY_CODES.NETWORK_UNREACHABLE:
          return "Network unreachable";
        case REPLY_CODES.HOST_UNREACHABLE:
          return "Host unreachable";
        case REPLY_CODES.CONNECTION_REFUSED:
          return "Connection refused";
        case REPLY_CODES.TTL_EXPIRED:
          return "TTL expired";
        case REPLY_CODES.COMMAND_NOT_SUPPORTED:
          return "Command not supported";
        case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED:
          return "Address type not supported";
        default:
          return `Unknown error code: ${reply}`;
      }
    }
  }
  module.exports = {
    Socks5Client,
    AUTH_METHODS,
    COMMANDS,
    ADDRESS_TYPES,
    REPLY_CODES,
    STATES
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js
var require_socks5_proxy_agent = __commonJS((exports2, module) => {
  var { URL: URL2 } = __require("node:url");
  var tls2;
  var DispatcherBase = require_dispatcher_base();
  var { InvalidArgumentError } = require_errors8();
  var { Socks5Client, STATES } = require_socks5_client();
  var { kDispatch, kClose, kDestroy } = require_symbols2();
  var Pool3 = require_pool();
  var buildConnector = require_connect();
  var { debuglog } = __require("node:util");
  var debug2 = debuglog("undici:socks5-proxy");
  var kProxyUrl = Symbol("proxy url");
  var kProxyHeaders = Symbol("proxy headers");
  var kProxyAuth = Symbol("proxy auth");
  var kProxyProtocol = Symbol("proxy protocol");
  var kPools = Symbol("pools");
  var kConnector = Symbol("connector");
  var kRequestTls = Symbol("request tls settings");
  var experimentalWarningEmitted = false;

  class Socks5ProxyAgent extends DispatcherBase {
    constructor(proxyUrl, options2 = {}) {
      super();
      if (!experimentalWarningEmitted) {
        process.emitWarning("SOCKS5 proxy support is experimental and subject to change", "ExperimentalWarning");
        experimentalWarningEmitted = true;
      }
      if (!proxyUrl) {
        throw new InvalidArgumentError("Proxy URL is mandatory");
      }
      const url2 = typeof proxyUrl === "string" ? new URL2(proxyUrl) : proxyUrl;
      if (url2.protocol !== "socks5:" && url2.protocol !== "socks:") {
        throw new InvalidArgumentError("Proxy URL must use socks5:// or socks:// protocol");
      }
      this[kProxyUrl] = url2;
      this[kProxyHeaders] = options2.headers || {};
      this[kProxyProtocol] = options2.proxyTls ? "https:" : "http:";
      this[kRequestTls] = options2.requestTls;
      this[kProxyAuth] = {
        username: options2.username || (url2.username ? decodeURIComponent(url2.username) : null),
        password: options2.password || (url2.password ? decodeURIComponent(url2.password) : null)
      };
      this[kConnector] = options2.connect || buildConnector({
        ...options2.proxyTls,
        servername: options2.proxyTls?.servername || url2.hostname
      });
      this[kPools] = new Map;
    }
    async createSocks5Connection(targetHost, targetPort) {
      const proxyHost = this[kProxyUrl].hostname;
      const proxyPort = parseInt(this[kProxyUrl].port) || 1080;
      debug2("creating SOCKS5 connection to", proxyHost, proxyPort);
      const socket = await new Promise((resolve3, reject) => {
        this[kConnector]({
          hostname: proxyHost,
          host: proxyHost,
          port: proxyPort,
          protocol: this[kProxyProtocol]
        }, (err, socket2) => {
          if (err) {
            reject(err);
          } else {
            resolve3(socket2);
          }
        });
      });
      const socks5Client = new Socks5Client(socket, this[kProxyAuth]);
      socks5Client.on("error", (err) => {
        debug2("SOCKS5 error:", err);
        socket.destroy();
      });
      await socks5Client.handshake();
      await new Promise((resolve3, reject) => {
        const timeout = setTimeout(() => {
          reject(new Error("SOCKS5 authentication timeout"));
        }, 5000);
        const onAuthenticated = () => {
          clearTimeout(timeout);
          socks5Client.removeListener("error", onError);
          resolve3();
        };
        const onError = (err) => {
          clearTimeout(timeout);
          socks5Client.removeListener("authenticated", onAuthenticated);
          reject(err);
        };
        if (socks5Client.state === STATES.AUTHENTICATED) {
          clearTimeout(timeout);
          resolve3();
        } else {
          socks5Client.once("authenticated", onAuthenticated);
          socks5Client.once("error", onError);
        }
      });
      await socks5Client.connect(targetHost, targetPort);
      await new Promise((resolve3, reject) => {
        const timeout = setTimeout(() => {
          reject(new Error("SOCKS5 connection timeout"));
        }, 5000);
        const onConnected = (info) => {
          debug2("SOCKS5 tunnel established to", targetHost, targetPort, "via", info);
          clearTimeout(timeout);
          socks5Client.removeListener("error", onError);
          resolve3();
        };
        const onError = (err) => {
          clearTimeout(timeout);
          socks5Client.removeListener("connected", onConnected);
          reject(err);
        };
        socks5Client.once("connected", onConnected);
        socks5Client.once("error", onError);
      });
      return socket;
    }
    [kDispatch](opts, handler) {
      const { origin } = opts;
      debug2("dispatching request to", origin, "via SOCKS5");
      try {
        const originKey = String(origin);
        let pool2 = this[kPools].get(originKey);
        if (!pool2 || pool2.destroyed || pool2.closed) {
          pool2 = new Pool3(origin, {
            pipelining: opts.pipelining,
            connections: opts.connections,
            connect: async (connectOpts, callback) => {
              try {
                const url2 = new URL2(origin);
                const targetHost = url2.hostname;
                const targetPort = parseInt(url2.port) || (url2.protocol === "https:" ? 443 : 80);
                debug2("establishing SOCKS5 connection to", targetHost, targetPort);
                const socket = await this.createSocks5Connection(targetHost, targetPort);
                let finalSocket = socket;
                if (url2.protocol === "https:") {
                  if (!tls2) {
                    tls2 = __require("node:tls");
                  }
                  debug2("upgrading to TLS");
                  finalSocket = tls2.connect({
                    ...this[kRequestTls],
                    socket,
                    servername: this[kRequestTls]?.servername || targetHost
                  });
                  await new Promise((resolve3, reject) => {
                    finalSocket.once("secureConnect", resolve3);
                    finalSocket.once("error", reject);
                  });
                }
                callback(null, finalSocket);
              } catch (err) {
                debug2("SOCKS5 connection error:", err);
                callback(err);
              }
            }
          });
          this[kPools].set(originKey, pool2);
        }
        return pool2[kDispatch](opts, handler);
      } catch (err) {
        debug2("dispatch error:", err);
        if (typeof handler.onResponseError === "function") {
          handler.onResponseError(null, err);
          return false;
        } else if (typeof handler.onError === "function") {
          handler.onError(err);
          return false;
        } else {
          throw err;
        }
      }
    }
    async[kClose]() {
      const closePromises = [];
      for (const pool2 of this[kPools].values()) {
        closePromises.push(pool2.close());
      }
      this[kPools].clear();
      await Promise.all(closePromises);
    }
    async[kDestroy](err) {
      const destroyPromises = [];
      for (const pool2 of this[kPools].values()) {
        destroyPromises.push(pool2.destroy(err));
      }
      this[kPools].clear();
      await Promise.all(destroyPromises);
    }
  }
  module.exports = Socks5ProxyAgent;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/proxy-agent.js
var require_proxy_agent = __commonJS((exports2, module) => {
  var { kProxy, kClose, kDestroy, kDispatch } = require_symbols2();
  var Agent3 = require_agent();
  var Pool3 = require_pool();
  var DispatcherBase = require_dispatcher_base();
  var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors8();
  var buildConnector = require_connect();
  var Client4 = require_client5();
  var { channels } = require_diagnostics();
  var Socks5ProxyAgent = require_socks5_proxy_agent();
  var kAgent = Symbol("proxy agent");
  var kClient = Symbol("proxy client");
  var kProxyHeaders = Symbol("proxy headers");
  var kRequestTls = Symbol("request tls settings");
  var kProxyTls = Symbol("proxy tls settings");
  var kConnectEndpoint = Symbol("connect endpoint function");
  var kTunnelProxy = Symbol("tunnel proxy");
  function defaultProtocolPort(protocol) {
    return protocol === "https:" ? 443 : 80;
  }
  function defaultFactory(origin, opts) {
    return new Pool3(origin, opts);
  }
  var noop2 = () => {};
  function defaultAgentFactory(origin, opts) {
    if (opts.connections === 1) {
      return new Client4(origin, opts);
    }
    return new Pool3(origin, opts);
  }

  class Http1ProxyWrapper extends DispatcherBase {
    #client;
    constructor(proxyUrl, { headers = {}, connect: connect3, factory }) {
      if (!proxyUrl) {
        throw new InvalidArgumentError("Proxy URL is mandatory");
      }
      super();
      this[kProxyHeaders] = headers;
      if (factory) {
        this.#client = factory(proxyUrl, { connect: connect3 });
      } else {
        this.#client = new Client4(proxyUrl, { connect: connect3 });
      }
    }
    [kDispatch](opts, handler) {
      const onHeaders = handler.onHeaders;
      handler.onHeaders = function(statusCode, data, resume2) {
        if (statusCode === 407) {
          if (typeof handler.onError === "function") {
            handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)"));
          }
          return;
        }
        if (onHeaders)
          onHeaders.call(this, statusCode, data, resume2);
      };
      const {
        origin,
        path: path2 = "/",
        headers = {}
      } = opts;
      opts.path = origin + path2;
      if (!("host" in headers) && !("Host" in headers)) {
        const { host } = new URL(origin);
        headers.host = host;
      }
      opts.headers = { ...this[kProxyHeaders], ...headers };
      return this.#client[kDispatch](opts, handler);
    }
    [kClose]() {
      return this.#client.close();
    }
    [kDestroy](err) {
      return this.#client.destroy(err);
    }
  }

  class ProxyAgent extends DispatcherBase {
    constructor(opts) {
      if (!opts || typeof opts === "object" && !(opts instanceof URL) && !opts.uri) {
        throw new InvalidArgumentError("Proxy uri is mandatory");
      }
      const { clientFactory = defaultFactory } = opts;
      if (typeof clientFactory !== "function") {
        throw new InvalidArgumentError("Proxy opts.clientFactory must be a function.");
      }
      const { proxyTunnel = true } = opts;
      super();
      const url2 = this.#getUrl(opts);
      const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url2;
      this[kProxy] = { uri: href, protocol };
      this[kRequestTls] = opts.requestTls;
      this[kProxyTls] = opts.proxyTls;
      this[kProxyHeaders] = opts.headers || {};
      this[kTunnelProxy] = proxyTunnel;
      if (opts.auth && opts.token) {
        throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token");
      } else if (opts.auth) {
        this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`;
      } else if (opts.token) {
        this[kProxyHeaders]["proxy-authorization"] = opts.token;
      } else if (username && password) {
        this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`;
      }
      const connect3 = buildConnector({ ...opts.proxyTls });
      this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
      const agentFactory = opts.factory || defaultAgentFactory;
      const factory = (origin2, options2) => {
        const { protocol: protocol2 } = new URL(origin2);
        if (this[kProxy].protocol === "socks5:" || this[kProxy].protocol === "socks:") {
          return new Socks5ProxyAgent(this[kProxy].uri, {
            headers: this[kProxyHeaders],
            connect: connect3,
            factory: agentFactory,
            username: opts.username || username,
            password: opts.password || password,
            proxyTls: opts.proxyTls,
            requestTls: opts.requestTls
          });
        }
        if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") {
          return new Http1ProxyWrapper(this[kProxy].uri, {
            headers: this[kProxyHeaders],
            connect: connect3,
            factory: agentFactory
          });
        }
        return agentFactory(origin2, options2);
      };
      if (protocol === "socks5:" || protocol === "socks:") {
        this[kClient] = null;
      } else {
        this[kClient] = clientFactory(url2, { connect: connect3 });
      }
      this[kAgent] = new Agent3({
        ...opts,
        factory,
        connect: async (opts2, callback) => {
          if (!this[kClient]) {
            callback(new InvalidArgumentError("Cannot establish tunnel connection without a proxy client"));
            return;
          }
          let requestedPath = opts2.host;
          if (!opts2.port) {
            requestedPath += `:${defaultProtocolPort(opts2.protocol)}`;
          }
          try {
            const connectParams = {
              origin,
              port,
              path: requestedPath,
              signal: opts2.signal,
              headers: {
                ...this[kProxyHeaders],
                host: opts2.host,
                ...opts2.connections == null || opts2.connections > 0 ? { "proxy-connection": "keep-alive" } : {}
              },
              servername: this[kProxyTls]?.servername || proxyHostname
            };
            const { socket, statusCode } = await this[kClient].connect(connectParams);
            if (statusCode !== 200) {
              socket.on("error", noop2).destroy();
              callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`));
              return;
            }
            if (channels.proxyConnected.hasSubscribers) {
              channels.proxyConnected.publish({
                socket,
                connectParams
              });
            }
            if (opts2.protocol !== "https:") {
              callback(null, socket);
              return;
            }
            let servername;
            if (this[kRequestTls]) {
              servername = this[kRequestTls].servername;
            } else {
              servername = opts2.servername;
            }
            this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback);
          } catch (err) {
            if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") {
              callback(new SecureProxyConnectionError(err));
            } else {
              callback(err);
            }
          }
        }
      });
    }
    dispatch(opts, handler) {
      const headers = buildHeaders(opts.headers);
      throwIfProxyAuthIsSent(headers);
      if (headers && !("host" in headers) && !("Host" in headers)) {
        const { host } = new URL(opts.origin);
        headers.host = host;
      }
      return this[kAgent].dispatch({
        ...opts,
        headers
      }, handler);
    }
    #getUrl(opts) {
      if (typeof opts === "string") {
        return new URL(opts);
      } else if (opts instanceof URL) {
        return opts;
      } else {
        return new URL(opts.uri);
      }
    }
    [kClose]() {
      const promises = [this[kAgent].close()];
      if (this[kClient]) {
        promises.push(this[kClient].close());
      }
      return Promise.all(promises);
    }
    [kDestroy]() {
      const promises = [this[kAgent].destroy()];
      if (this[kClient]) {
        promises.push(this[kClient].destroy());
      }
      return Promise.all(promises);
    }
  }
  function buildHeaders(headers) {
    if (Array.isArray(headers)) {
      const headersPair = {};
      for (let i = 0;i < headers.length; i += 2) {
        headersPair[headers[i]] = headers[i + 1];
      }
      return headersPair;
    }
    return headers;
  }
  function throwIfProxyAuthIsSent(headers) {
    const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization");
    if (existProxyAuth) {
      throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor");
    }
  }
  module.exports = ProxyAgent;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js
var require_env_http_proxy_agent = __commonJS((exports2, module) => {
  var DispatcherBase = require_dispatcher_base();
  var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols2();
  var ProxyAgent = require_proxy_agent();
  var Agent3 = require_agent();
  var DEFAULT_PORTS = {
    "http:": 80,
    "https:": 443
  };

  class EnvHttpProxyAgent extends DispatcherBase {
    #noProxyValue = null;
    #noProxyEntries = null;
    #opts = null;
    constructor(opts = {}) {
      super();
      this.#opts = opts;
      const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts;
      this[kNoProxyAgent] = new Agent3(agentOpts);
      const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY;
      if (HTTP_PROXY) {
        this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY });
      } else {
        this[kHttpProxyAgent] = this[kNoProxyAgent];
      }
      const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY;
      if (HTTPS_PROXY) {
        this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY });
      } else {
        this[kHttpsProxyAgent] = this[kHttpProxyAgent];
      }
      this.#parseNoProxy();
    }
    [kDispatch](opts, handler) {
      const url2 = new URL(opts.origin);
      const agent2 = this.#getProxyAgentForUrl(url2);
      return agent2.dispatch(opts, handler);
    }
    [kClose]() {
      return Promise.all([
        this[kNoProxyAgent].close(),
        !this[kHttpProxyAgent][kClosed] && this[kHttpProxyAgent].close(),
        !this[kHttpsProxyAgent][kClosed] && this[kHttpsProxyAgent].close()
      ]);
    }
    [kDestroy](err) {
      return Promise.all([
        this[kNoProxyAgent].destroy(err),
        !this[kHttpProxyAgent][kDestroyed] && this[kHttpProxyAgent].destroy(err),
        !this[kHttpsProxyAgent][kDestroyed] && this[kHttpsProxyAgent].destroy(err)
      ]);
    }
    #getProxyAgentForUrl(url2) {
      let { protocol, host: hostname4, port } = url2;
      hostname4 = hostname4.replace(/:\d*$/, "").toLowerCase();
      port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0;
      if (!this.#shouldProxy(hostname4, port)) {
        return this[kNoProxyAgent];
      }
      if (protocol === "https:") {
        return this[kHttpsProxyAgent];
      }
      return this[kHttpProxyAgent];
    }
    #shouldProxy(hostname4, port) {
      if (this.#noProxyChanged) {
        this.#parseNoProxy();
      }
      if (this.#noProxyEntries.length === 0) {
        return true;
      }
      if (this.#noProxyValue === "*") {
        return false;
      }
      for (let i = 0;i < this.#noProxyEntries.length; i++) {
        const entry = this.#noProxyEntries[i];
        if (entry.port && entry.port !== port) {
          continue;
        }
        if (hostname4 === entry.hostname) {
          return false;
        }
        if (hostname4.slice(-(entry.hostname.length + 1)) === `.${entry.hostname}`) {
          return false;
        }
      }
      return true;
    }
    #parseNoProxy() {
      const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv;
      const noProxySplit = noProxyValue.split(/[,\s]/);
      const noProxyEntries = [];
      for (let i = 0;i < noProxySplit.length; i++) {
        const entry = noProxySplit[i];
        if (!entry) {
          continue;
        }
        const parsed = entry.match(/^(.+):(\d+)$/);
        noProxyEntries.push({
          hostname: (parsed ? parsed[1] : entry).replace(/^\*?\./, "").toLowerCase(),
          port: parsed ? Number.parseInt(parsed[2], 10) : 0
        });
      }
      this.#noProxyValue = noProxyValue;
      this.#noProxyEntries = noProxyEntries;
    }
    get #noProxyChanged() {
      if (this.#opts.noProxy !== undefined) {
        return false;
      }
      return this.#noProxyValue !== this.#noProxyEnv;
    }
    get #noProxyEnv() {
      return process.env.no_proxy ?? process.env.NO_PROXY ?? "";
    }
  }
  module.exports = EnvHttpProxyAgent;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/retry-handler.js
var require_retry_handler = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { kRetryHandlerDefaultRetry } = require_symbols2();
  var { RequestRetryError } = require_errors8();
  var WrapHandler = require_wrap_handler();
  var {
    isDisturbed,
    parseRangeHeader,
    wrapRequestBody
  } = require_util3();
  function calculateRetryAfterHeader(retryAfter) {
    const retryTime = new Date(retryAfter).getTime();
    return isNaN(retryTime) ? 0 : retryTime - Date.now();
  }

  class RetryHandler {
    constructor(opts, { dispatch, handler }) {
      const { retryOptions, ...dispatchOpts } = opts;
      const {
        retry: retryFn,
        maxRetries,
        maxTimeout,
        minTimeout,
        timeoutFactor,
        methods,
        errorCodes,
        retryAfter,
        statusCodes,
        throwOnError
      } = retryOptions ?? {};
      this.error = null;
      this.dispatch = dispatch;
      this.handler = WrapHandler.wrap(handler);
      this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) };
      this.retryOpts = {
        throwOnError: throwOnError ?? true,
        retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry],
        retryAfter: retryAfter ?? true,
        maxTimeout: maxTimeout ?? 30 * 1000,
        minTimeout: minTimeout ?? 500,
        timeoutFactor: timeoutFactor ?? 2,
        maxRetries: maxRetries ?? 5,
        methods: methods ?? ["GET", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"],
        statusCodes: statusCodes ?? [500, 502, 503, 504, 429],
        errorCodes: errorCodes ?? [
          "ECONNRESET",
          "ECONNREFUSED",
          "ENOTFOUND",
          "ENETDOWN",
          "ENETUNREACH",
          "EHOSTDOWN",
          "EHOSTUNREACH",
          "EPIPE",
          "UND_ERR_SOCKET"
        ]
      };
      this.retryCount = 0;
      this.retryCountCheckpoint = 0;
      this.headersSent = false;
      this.start = 0;
      this.end = null;
      this.etag = null;
    }
    onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err) {
      if (this.retryOpts.throwOnError) {
        if (this.retryOpts.statusCodes.includes(statusCode) === false) {
          this.headersSent = true;
          this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
        } else {
          this.error = err;
        }
        return;
      }
      if (isDisturbed(this.opts.body)) {
        this.headersSent = true;
        this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
        return;
      }
      function shouldRetry(passedErr) {
        if (passedErr) {
          this.headersSent = true;
          this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
          controller.resume();
          return;
        }
        this.error = err;
        controller.resume();
      }
      controller.pause();
      this.retryOpts.retry(err, {
        state: { counter: this.retryCount },
        opts: { retryOptions: this.retryOpts, ...this.opts }
      }, shouldRetry.bind(this));
    }
    onRequestStart(controller, context10) {
      if (!this.headersSent) {
        this.handler.onRequestStart?.(controller, context10);
      }
    }
    onRequestUpgrade(controller, statusCode, headers, socket) {
      this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
    }
    static [kRetryHandlerDefaultRetry](err, { state, opts }, cb2) {
      const { statusCode, code: code2, headers } = err;
      const { method, retryOptions } = opts;
      const {
        maxRetries,
        minTimeout,
        maxTimeout,
        timeoutFactor,
        statusCodes,
        errorCodes,
        methods
      } = retryOptions;
      const { counter } = state;
      if (code2 && code2 !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code2)) {
        cb2(err);
        return;
      }
      if (Array.isArray(methods) && !methods.includes(method)) {
        cb2(err);
        return;
      }
      if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) {
        cb2(err);
        return;
      }
      if (counter > maxRetries) {
        cb2(err);
        return;
      }
      let retryAfterHeader = headers?.["retry-after"];
      if (retryAfterHeader) {
        retryAfterHeader = Number(retryAfterHeader);
        retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(headers["retry-after"]) : retryAfterHeader * 1000;
      }
      const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout);
      setTimeout(() => cb2(null), retryTimeout);
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      this.error = null;
      this.retryCount += 1;
      if (statusCode >= 300) {
        const err = new RequestRetryError("Request failed", statusCode, {
          headers,
          data: {
            count: this.retryCount
          }
        });
        this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err);
        return;
      }
      if (this.headersSent) {
        if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) {
          throw new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, {
            headers,
            data: { count: this.retryCount }
          });
        }
        const contentRange = parseRangeHeader(headers["content-range"]);
        if (!contentRange) {
          throw new RequestRetryError("Content-Range mismatch", statusCode, {
            headers,
            data: { count: this.retryCount }
          });
        }
        if (this.etag != null && this.etag !== headers.etag) {
          throw new RequestRetryError("ETag mismatch", statusCode, {
            headers,
            data: { count: this.retryCount }
          });
        }
        const { start, size, end = size ? size - 1 : null } = contentRange;
        assert2(this.start === start, "content-range mismatch");
        assert2(this.end == null || this.end === end, "content-range mismatch");
        return;
      }
      if (this.end == null) {
        if (statusCode === 206) {
          const range = parseRangeHeader(headers["content-range"]);
          if (range == null) {
            this.headersSent = true;
            this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
            return;
          }
          const { start, size, end = size ? size - 1 : null } = range;
          assert2(start != null && Number.isFinite(start), "content-range mismatch");
          assert2(end != null && Number.isFinite(end), "invalid content-length");
          this.start = start;
          this.end = end;
        }
        if (this.end == null) {
          const contentLength = headers["content-length"];
          this.end = contentLength != null ? Number(contentLength) - 1 : null;
        }
        assert2(Number.isFinite(this.start));
        assert2(this.end == null || Number.isFinite(this.end), "invalid content-length");
        this.resume = true;
        this.etag = headers.etag != null ? headers.etag : null;
        if (this.etag != null && this.etag[0] === "W" && this.etag[1] === "/") {
          this.etag = null;
        }
        this.headersSent = true;
        this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
      } else {
        throw new RequestRetryError("Request failed", statusCode, {
          headers,
          data: { count: this.retryCount }
        });
      }
    }
    onResponseData(controller, chunk) {
      if (this.error) {
        return;
      }
      this.start += chunk.length;
      this.handler.onResponseData?.(controller, chunk);
    }
    onResponseEnd(controller, trailers) {
      if (this.error && this.retryOpts.throwOnError) {
        throw this.error;
      }
      if (!this.error) {
        this.retryCount = 0;
        return this.handler.onResponseEnd?.(controller, trailers);
      }
      this.retry(controller);
    }
    retry(controller) {
      if (this.start !== 0) {
        const headers = { range: `bytes=${this.start}-${this.end ?? ""}` };
        if (this.etag != null) {
          headers["if-match"] = this.etag;
        }
        this.opts = {
          ...this.opts,
          headers: {
            ...this.opts.headers,
            ...headers
          }
        };
      }
      try {
        this.retryCountCheckpoint = this.retryCount;
        this.dispatch(this.opts, this);
      } catch (err) {
        this.handler.onResponseError?.(controller, err);
      }
    }
    onResponseError(controller, err) {
      if (controller?.aborted || isDisturbed(this.opts.body)) {
        this.handler.onResponseError?.(controller, err);
        return;
      }
      function shouldRetry(returnedErr) {
        if (!returnedErr) {
          this.retry(controller);
          return;
        }
        this.handler?.onResponseError?.(controller, returnedErr);
      }
      if (this.retryCount - this.retryCountCheckpoint > 0) {
        this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint);
      } else {
        this.retryCount += 1;
      }
      this.retryOpts.retry(err, {
        state: { counter: this.retryCount },
        opts: { retryOptions: this.retryOpts, ...this.opts }
      }, shouldRetry.bind(this));
    }
  }
  module.exports = RetryHandler;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/retry-agent.js
var require_retry_agent = __commonJS((exports2, module) => {
  var Dispatcher = require_dispatcher();
  var RetryHandler = require_retry_handler();

  class RetryAgent extends Dispatcher {
    #agent = null;
    #options = null;
    constructor(agent2, options2 = {}) {
      super(options2);
      this.#agent = agent2;
      this.#options = options2;
    }
    dispatch(opts, handler) {
      const retry = new RetryHandler({
        ...opts,
        retryOptions: this.#options
      }, {
        dispatch: this.#agent.dispatch.bind(this.#agent),
        handler
      });
      return this.#agent.dispatch(opts, retry);
    }
    close() {
      return this.#agent.close();
    }
    destroy() {
      return this.#agent.destroy();
    }
  }
  module.exports = RetryAgent;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/h2c-client.js
var require_h2c_client = __commonJS((exports2, module) => {
  var { InvalidArgumentError } = require_errors8();
  var Client4 = require_client5();

  class H2CClient extends Client4 {
    constructor(origin, clientOpts) {
      if (typeof origin === "string") {
        origin = new URL(origin);
      }
      if (origin.protocol !== "http:") {
        throw new InvalidArgumentError("h2c-client: Only h2c protocol is supported");
      }
      const { maxConcurrentStreams, pipelining, ...opts } = clientOpts ?? {};
      let defaultMaxConcurrentStreams = 100;
      let defaultPipelining = 100;
      if (maxConcurrentStreams != null && Number.isInteger(maxConcurrentStreams) && maxConcurrentStreams > 0) {
        defaultMaxConcurrentStreams = maxConcurrentStreams;
      }
      if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) {
        defaultPipelining = pipelining;
      }
      if (defaultPipelining > defaultMaxConcurrentStreams) {
        throw new InvalidArgumentError("h2c-client: pipelining cannot be greater than maxConcurrentStreams");
      }
      super(origin, {
        ...opts,
        maxConcurrentStreams: defaultMaxConcurrentStreams,
        pipelining: defaultPipelining,
        allowH2: true,
        useH2c: true
      });
    }
  }
  module.exports = H2CClient;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/readable.js
var require_readable = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { Readable: Readable2 } = __require("node:stream");
  var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors8();
  var util3 = require_util3();
  var { ReadableStreamFrom } = require_util3();
  var kConsume = Symbol("kConsume");
  var kReading = Symbol("kReading");
  var kBody = Symbol("kBody");
  var kAbort = Symbol("kAbort");
  var kContentType = Symbol("kContentType");
  var kContentLength = Symbol("kContentLength");
  var kUsed = Symbol("kUsed");
  var kBytesRead = Symbol("kBytesRead");
  var noop2 = () => {};

  class BodyReadable extends Readable2 {
    constructor({
      resume: resume2,
      abort,
      contentType = "",
      contentLength,
      highWaterMark = 64 * 1024
    }) {
      super({
        autoDestroy: true,
        read: resume2,
        highWaterMark
      });
      this._readableState.dataEmitted = false;
      this[kAbort] = abort;
      this[kConsume] = null;
      this[kBytesRead] = 0;
      this[kBody] = null;
      this[kUsed] = false;
      this[kContentType] = contentType;
      this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null;
      this[kReading] = false;
    }
    _destroy(err, callback) {
      if (!err && !this._readableState.endEmitted) {
        err = new RequestAbortedError;
      }
      if (err) {
        this[kAbort]();
      }
      if (!this[kUsed]) {
        setImmediate(callback, err);
      } else {
        callback(err);
      }
    }
    on(event, listener) {
      if (event === "data" || event === "readable") {
        this[kReading] = true;
        this[kUsed] = true;
      }
      return super.on(event, listener);
    }
    addListener(event, listener) {
      return this.on(event, listener);
    }
    off(event, listener) {
      const ret = super.off(event, listener);
      if (event === "data" || event === "readable") {
        this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0;
      }
      return ret;
    }
    removeListener(event, listener) {
      return this.off(event, listener);
    }
    push(chunk) {
      if (chunk) {
        this[kBytesRead] += chunk.length;
        if (this[kConsume]) {
          consumePush(this[kConsume], chunk);
          return this[kReading] ? super.push(chunk) : true;
        }
      }
      return super.push(chunk);
    }
    text() {
      return consume(this, "text");
    }
    json() {
      return consume(this, "json");
    }
    blob() {
      return consume(this, "blob");
    }
    bytes() {
      return consume(this, "bytes");
    }
    arrayBuffer() {
      return consume(this, "arrayBuffer");
    }
    async formData() {
      throw new NotSupportedError;
    }
    get bodyUsed() {
      return util3.isDisturbed(this);
    }
    get body() {
      if (!this[kBody]) {
        this[kBody] = ReadableStreamFrom(this);
        if (this[kConsume]) {
          this[kBody].getReader();
          assert2(this[kBody].locked);
        }
      }
      return this[kBody];
    }
    dump(opts) {
      const signal = opts?.signal;
      if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) {
        return Promise.reject(new InvalidArgumentError("signal must be an AbortSignal"));
      }
      const limit = opts?.limit && Number.isFinite(opts.limit) ? opts.limit : 128 * 1024;
      if (signal?.aborted) {
        return Promise.reject(signal.reason ?? new AbortError);
      }
      if (this._readableState.closeEmitted) {
        return Promise.resolve(null);
      }
      return new Promise((resolve3, reject) => {
        if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) {
          this.destroy(new AbortError);
        }
        if (signal) {
          const onAbort = () => {
            this.destroy(signal.reason ?? new AbortError);
          };
          signal.addEventListener("abort", onAbort);
          this.on("close", function() {
            signal.removeEventListener("abort", onAbort);
            if (signal.aborted) {
              reject(signal.reason ?? new AbortError);
            } else {
              resolve3(null);
            }
          });
        } else {
          this.on("close", resolve3);
        }
        this.on("error", noop2).on("data", () => {
          if (this[kBytesRead] > limit) {
            this.destroy();
          }
        }).resume();
      });
    }
    setEncoding(encoding) {
      if (Buffer.isEncoding(encoding)) {
        this._readableState.encoding = encoding;
      }
      return this;
    }
  }
  function isLocked(bodyReadable) {
    return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null;
  }
  function isUnusable(bodyReadable) {
    return util3.isDisturbed(bodyReadable) || isLocked(bodyReadable);
  }
  function consume(stream2, type2) {
    assert2(!stream2[kConsume]);
    return new Promise((resolve3, reject) => {
      if (isUnusable(stream2)) {
        const rState = stream2._readableState;
        if (rState.destroyed && rState.closeEmitted === false) {
          stream2.on("error", reject).on("close", () => {
            reject(new TypeError("unusable"));
          });
        } else {
          reject(rState.errored ?? new TypeError("unusable"));
        }
      } else {
        queueMicrotask(() => {
          stream2[kConsume] = {
            type: type2,
            stream: stream2,
            resolve: resolve3,
            reject,
            length: 0,
            body: []
          };
          stream2.on("error", function(err) {
            consumeFinish(this[kConsume], err);
          }).on("close", function() {
            if (this[kConsume].body !== null) {
              consumeFinish(this[kConsume], new RequestAbortedError);
            }
          });
          consumeStart(stream2[kConsume]);
        });
      }
    });
  }
  function consumeStart(consume2) {
    if (consume2.body === null) {
      return;
    }
    const { _readableState: state } = consume2.stream;
    if (state.bufferIndex) {
      const start = state.bufferIndex;
      const end = state.buffer.length;
      for (let n3 = start;n3 < end; n3++) {
        consumePush(consume2, state.buffer[n3]);
      }
    } else {
      for (const chunk of state.buffer) {
        consumePush(consume2, chunk);
      }
    }
    if (state.endEmitted) {
      consumeEnd(this[kConsume], this._readableState.encoding);
    } else {
      consume2.stream.on("end", function() {
        consumeEnd(this[kConsume], this._readableState.encoding);
      });
    }
    consume2.stream.resume();
    while (consume2.stream.read() != null) {}
  }
  function chunksDecode(chunks, length2, encoding) {
    if (chunks.length === 0 || length2 === 0) {
      return "";
    }
    const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length2);
    const bufferLength = buffer.length;
    const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0;
    if (!encoding || encoding === "utf8" || encoding === "utf-8") {
      return buffer.utf8Slice(start, bufferLength);
    } else {
      return buffer.subarray(start, bufferLength).toString(encoding);
    }
  }
  function chunksConcat(chunks, length2) {
    if (chunks.length === 0 || length2 === 0) {
      return new Uint8Array(0);
    }
    if (chunks.length === 1) {
      return new Uint8Array(chunks[0]);
    }
    const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length2).buffer);
    let offset = 0;
    for (let i = 0;i < chunks.length; ++i) {
      const chunk = chunks[i];
      buffer.set(chunk, offset);
      offset += chunk.length;
    }
    return buffer;
  }
  function consumeEnd(consume2, encoding) {
    const { type: type2, body: body2, resolve: resolve3, stream: stream2, length: length2 } = consume2;
    try {
      if (type2 === "text") {
        resolve3(chunksDecode(body2, length2, encoding));
      } else if (type2 === "json") {
        resolve3(JSON.parse(chunksDecode(body2, length2, encoding)));
      } else if (type2 === "arrayBuffer") {
        resolve3(chunksConcat(body2, length2).buffer);
      } else if (type2 === "blob") {
        resolve3(new Blob(body2, { type: stream2[kContentType] }));
      } else if (type2 === "bytes") {
        resolve3(chunksConcat(body2, length2));
      }
      consumeFinish(consume2);
    } catch (err) {
      stream2.destroy(err);
    }
  }
  function consumePush(consume2, chunk) {
    consume2.length += chunk.length;
    consume2.body.push(chunk);
  }
  function consumeFinish(consume2, err) {
    if (consume2.body === null) {
      return;
    }
    if (err) {
      consume2.reject(err);
    } else {
      consume2.resolve();
    }
    consume2.type = null;
    consume2.stream = null;
    consume2.resolve = null;
    consume2.reject = null;
    consume2.length = 0;
    consume2.body = null;
  }
  module.exports = {
    Readable: BodyReadable,
    chunksDecode
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/api-request.js
var require_api_request = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { AsyncResource } = __require("node:async_hooks");
  var { Readable: Readable2 } = require_readable();
  var { InvalidArgumentError, RequestAbortedError } = require_errors8();
  var util3 = require_util3();
  function noop2() {}

  class RequestHandler extends AsyncResource {
    constructor(opts, callback) {
      if (!opts || typeof opts !== "object") {
        throw new InvalidArgumentError("invalid opts");
      }
      const { signal, method, opaque, body: body2, onInfo, responseHeaders, highWaterMark } = opts;
      try {
        if (typeof callback !== "function") {
          throw new InvalidArgumentError("invalid callback");
        }
        if (highWaterMark != null && (!Number.isFinite(highWaterMark) || highWaterMark < 0)) {
          throw new InvalidArgumentError("invalid highWaterMark");
        }
        if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
          throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget");
        }
        if (method === "CONNECT") {
          throw new InvalidArgumentError("invalid method");
        }
        if (onInfo && typeof onInfo !== "function") {
          throw new InvalidArgumentError("invalid onInfo callback");
        }
        super("UNDICI_REQUEST");
      } catch (err) {
        if (util3.isStream(body2)) {
          util3.destroy(body2.on("error", noop2), err);
        }
        throw err;
      }
      this.method = method;
      this.responseHeaders = responseHeaders || null;
      this.opaque = opaque || null;
      this.callback = callback;
      this.res = null;
      this.abort = null;
      this.body = body2;
      this.trailers = {};
      this.context = null;
      this.onInfo = onInfo || null;
      this.highWaterMark = highWaterMark;
      this.reason = null;
      this.removeAbortListener = null;
      if (signal?.aborted) {
        this.reason = signal.reason ?? new RequestAbortedError;
      } else if (signal) {
        this.removeAbortListener = util3.addAbortListener(signal, () => {
          this.reason = signal.reason ?? new RequestAbortedError;
          if (this.res) {
            util3.destroy(this.res.on("error", noop2), this.reason);
          } else if (this.abort) {
            this.abort(this.reason);
          }
        });
      }
    }
    onConnect(abort, context10) {
      if (this.reason) {
        abort(this.reason);
        return;
      }
      assert2(this.callback);
      this.abort = abort;
      this.context = context10;
    }
    onHeaders(statusCode, rawHeaders, resume2, statusMessage) {
      const { callback, opaque, abort, context: context10, responseHeaders, highWaterMark } = this;
      const headers = responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders);
      if (statusCode < 200) {
        if (this.onInfo) {
          this.onInfo({ statusCode, headers });
        }
        return;
      }
      const parsedHeaders = responseHeaders === "raw" ? util3.parseHeaders(rawHeaders) : headers;
      const contentType = parsedHeaders["content-type"];
      const contentLength = parsedHeaders["content-length"];
      const res = new Readable2({
        resume: resume2,
        abort,
        contentType,
        contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null,
        highWaterMark
      });
      if (this.removeAbortListener) {
        res.on("close", this.removeAbortListener);
        this.removeAbortListener = null;
      }
      this.callback = null;
      this.res = res;
      if (callback !== null) {
        try {
          this.runInAsyncScope(callback, null, null, {
            statusCode,
            statusText: statusMessage,
            headers,
            trailers: this.trailers,
            opaque,
            body: res,
            context: context10
          });
        } catch (err) {
          this.res = null;
          util3.destroy(res.on("error", noop2), err);
          queueMicrotask(() => {
            throw err;
          });
        }
      }
    }
    onData(chunk) {
      return this.res.push(chunk);
    }
    onComplete(trailers) {
      util3.parseHeaders(trailers, this.trailers);
      this.res.push(null);
    }
    onError(err) {
      const { res, callback, body: body2, opaque } = this;
      if (callback) {
        this.callback = null;
        queueMicrotask(() => {
          this.runInAsyncScope(callback, null, err, { opaque });
        });
      }
      if (res) {
        this.res = null;
        queueMicrotask(() => {
          util3.destroy(res.on("error", noop2), err);
        });
      }
      if (body2) {
        this.body = null;
        if (util3.isStream(body2)) {
          body2.on("error", noop2);
          util3.destroy(body2, err);
        }
      }
      if (this.removeAbortListener) {
        this.removeAbortListener();
        this.removeAbortListener = null;
      }
    }
  }
  function request2(opts, callback) {
    if (callback === undefined) {
      return new Promise((resolve3, reject) => {
        request2.call(this, opts, (err, data) => {
          return err ? reject(err) : resolve3(data);
        });
      });
    }
    try {
      const handler = new RequestHandler(opts, callback);
      this.dispatch(opts, handler);
    } catch (err) {
      if (typeof callback !== "function") {
        throw err;
      }
      const opaque = opts?.opaque;
      queueMicrotask(() => callback(err, { opaque }));
    }
  }
  module.exports = request2;
  module.exports.RequestHandler = RequestHandler;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/abort-signal.js
var require_abort_signal = __commonJS((exports2, module) => {
  var { addAbortListener } = require_util3();
  var { RequestAbortedError } = require_errors8();
  var kListener = Symbol("kListener");
  var kSignal = Symbol("kSignal");
  function abort(self2) {
    if (self2.abort) {
      self2.abort(self2[kSignal]?.reason);
    } else {
      self2.reason = self2[kSignal]?.reason ?? new RequestAbortedError;
    }
    removeSignal(self2);
  }
  function addSignal(self2, signal) {
    self2.reason = null;
    self2[kSignal] = null;
    self2[kListener] = null;
    if (!signal) {
      return;
    }
    if (signal.aborted) {
      abort(self2);
      return;
    }
    self2[kSignal] = signal;
    self2[kListener] = () => {
      abort(self2);
    };
    addAbortListener(self2[kSignal], self2[kListener]);
  }
  function removeSignal(self2) {
    if (!self2[kSignal]) {
      return;
    }
    if ("removeEventListener" in self2[kSignal]) {
      self2[kSignal].removeEventListener("abort", self2[kListener]);
    } else {
      self2[kSignal].removeListener("abort", self2[kListener]);
    }
    self2[kSignal] = null;
    self2[kListener] = null;
  }
  module.exports = {
    addSignal,
    removeSignal
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/api-stream.js
var require_api_stream = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { finished } = __require("node:stream");
  var { AsyncResource } = __require("node:async_hooks");
  var { InvalidArgumentError, InvalidReturnValueError } = require_errors8();
  var util3 = require_util3();
  var { addSignal, removeSignal } = require_abort_signal();
  function noop2() {}

  class StreamHandler extends AsyncResource {
    constructor(opts, factory, callback) {
      if (!opts || typeof opts !== "object") {
        throw new InvalidArgumentError("invalid opts");
      }
      const { signal, method, opaque, body: body2, onInfo, responseHeaders } = opts;
      try {
        if (typeof callback !== "function") {
          throw new InvalidArgumentError("invalid callback");
        }
        if (typeof factory !== "function") {
          throw new InvalidArgumentError("invalid factory");
        }
        if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
          throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget");
        }
        if (method === "CONNECT") {
          throw new InvalidArgumentError("invalid method");
        }
        if (onInfo && typeof onInfo !== "function") {
          throw new InvalidArgumentError("invalid onInfo callback");
        }
        super("UNDICI_STREAM");
      } catch (err) {
        if (util3.isStream(body2)) {
          util3.destroy(body2.on("error", noop2), err);
        }
        throw err;
      }
      this.responseHeaders = responseHeaders || null;
      this.opaque = opaque || null;
      this.factory = factory;
      this.callback = callback;
      this.res = null;
      this.abort = null;
      this.context = null;
      this.trailers = null;
      this.body = body2;
      this.onInfo = onInfo || null;
      if (util3.isStream(body2)) {
        body2.on("error", (err) => {
          this.onError(err);
        });
      }
      addSignal(this, signal);
    }
    onConnect(abort, context10) {
      if (this.reason) {
        abort(this.reason);
        return;
      }
      assert2(this.callback);
      this.abort = abort;
      this.context = context10;
    }
    onHeaders(statusCode, rawHeaders, resume2, statusMessage) {
      const { factory, opaque, context: context10, responseHeaders } = this;
      const headers = responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders);
      if (statusCode < 200) {
        if (this.onInfo) {
          this.onInfo({ statusCode, headers });
        }
        return;
      }
      this.factory = null;
      if (factory === null) {
        return;
      }
      const res = this.runInAsyncScope(factory, null, {
        statusCode,
        headers,
        opaque,
        context: context10
      });
      if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") {
        throw new InvalidReturnValueError("expected Writable");
      }
      finished(res, { readable: false }, (err) => {
        const { callback, res: res2, opaque: opaque2, trailers, abort } = this;
        this.res = null;
        if (err || !res2?.readable) {
          util3.destroy(res2, err);
        }
        this.callback = null;
        this.runInAsyncScope(callback, null, err || null, { opaque: opaque2, trailers });
        if (err) {
          abort();
        }
      });
      res.on("drain", resume2);
      this.res = res;
      const needDrain = res.writableNeedDrain !== undefined ? res.writableNeedDrain : res._writableState?.needDrain;
      return needDrain !== true;
    }
    onData(chunk) {
      const { res } = this;
      return res ? res.write(chunk) : true;
    }
    onComplete(trailers) {
      const { res } = this;
      removeSignal(this);
      if (!res) {
        return;
      }
      this.trailers = util3.parseHeaders(trailers);
      res.end();
    }
    onError(err) {
      const { res, callback, opaque, body: body2 } = this;
      removeSignal(this);
      this.factory = null;
      if (res) {
        this.res = null;
        util3.destroy(res, err);
      } else if (callback) {
        this.callback = null;
        queueMicrotask(() => {
          this.runInAsyncScope(callback, null, err, { opaque });
        });
      }
      if (body2) {
        this.body = null;
        util3.destroy(body2, err);
      }
    }
  }
  function stream2(opts, factory, callback) {
    if (callback === undefined) {
      return new Promise((resolve3, reject) => {
        stream2.call(this, opts, factory, (err, data) => {
          return err ? reject(err) : resolve3(data);
        });
      });
    }
    try {
      const handler = new StreamHandler(opts, factory, callback);
      this.dispatch(opts, handler);
    } catch (err) {
      if (typeof callback !== "function") {
        throw err;
      }
      const opaque = opts?.opaque;
      queueMicrotask(() => callback(err, { opaque }));
    }
  }
  module.exports = stream2;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/api-pipeline.js
var require_api_pipeline = __commonJS((exports2, module) => {
  var {
    Readable: Readable2,
    Duplex,
    PassThrough
  } = __require("node:stream");
  var assert2 = __require("node:assert");
  var { AsyncResource } = __require("node:async_hooks");
  var {
    InvalidArgumentError,
    InvalidReturnValueError,
    RequestAbortedError
  } = require_errors8();
  var util3 = require_util3();
  var { addSignal, removeSignal } = require_abort_signal();
  function noop2() {}
  var kResume = Symbol("resume");

  class PipelineRequest extends Readable2 {
    constructor() {
      super({ autoDestroy: true });
      this[kResume] = null;
    }
    _read() {
      const { [kResume]: resume2 } = this;
      if (resume2) {
        this[kResume] = null;
        resume2();
      }
    }
    _destroy(err, callback) {
      this._read();
      callback(err);
    }
  }

  class PipelineResponse extends Readable2 {
    constructor(resume2) {
      super({ autoDestroy: true });
      this[kResume] = resume2;
    }
    _read() {
      this[kResume]();
    }
    _destroy(err, callback) {
      if (!err && !this._readableState.endEmitted) {
        err = new RequestAbortedError;
      }
      callback(err);
    }
  }

  class PipelineHandler extends AsyncResource {
    constructor(opts, handler) {
      if (!opts || typeof opts !== "object") {
        throw new InvalidArgumentError("invalid opts");
      }
      if (typeof handler !== "function") {
        throw new InvalidArgumentError("invalid handler");
      }
      const { signal, method, opaque, onInfo, responseHeaders } = opts;
      if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
        throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget");
      }
      if (method === "CONNECT") {
        throw new InvalidArgumentError("invalid method");
      }
      if (onInfo && typeof onInfo !== "function") {
        throw new InvalidArgumentError("invalid onInfo callback");
      }
      super("UNDICI_PIPELINE");
      this.opaque = opaque || null;
      this.responseHeaders = responseHeaders || null;
      this.handler = handler;
      this.abort = null;
      this.context = null;
      this.onInfo = onInfo || null;
      this.req = new PipelineRequest().on("error", noop2);
      this.ret = new Duplex({
        readableObjectMode: opts.objectMode,
        autoDestroy: true,
        read: () => {
          const { body: body2 } = this;
          if (body2?.resume) {
            body2.resume();
          }
        },
        write: (chunk, encoding, callback) => {
          const { req } = this;
          if (req.push(chunk, encoding) || req._readableState.destroyed) {
            callback();
          } else {
            req[kResume] = callback;
          }
        },
        destroy: (err, callback) => {
          const { body: body2, req, res, ret, abort } = this;
          if (!err && !ret._readableState.endEmitted) {
            err = new RequestAbortedError;
          }
          if (abort && err) {
            abort();
          }
          util3.destroy(body2, err);
          util3.destroy(req, err);
          util3.destroy(res, err);
          removeSignal(this);
          callback(err);
        }
      }).on("prefinish", () => {
        const { req } = this;
        req.push(null);
      });
      this.res = null;
      addSignal(this, signal);
    }
    onConnect(abort, context10) {
      const { res } = this;
      if (this.reason) {
        abort(this.reason);
        return;
      }
      assert2(!res, "pipeline cannot be retried");
      this.abort = abort;
      this.context = context10;
    }
    onHeaders(statusCode, rawHeaders, resume2) {
      const { opaque, handler, context: context10 } = this;
      if (statusCode < 200) {
        if (this.onInfo) {
          const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders);
          this.onInfo({ statusCode, headers });
        }
        return;
      }
      this.res = new PipelineResponse(resume2);
      let body2;
      try {
        this.handler = null;
        const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders);
        body2 = this.runInAsyncScope(handler, null, {
          statusCode,
          headers,
          opaque,
          body: this.res,
          context: context10
        });
      } catch (err) {
        this.res.on("error", noop2);
        throw err;
      }
      if (!body2 || typeof body2.on !== "function") {
        throw new InvalidReturnValueError("expected Readable");
      }
      body2.on("data", (chunk) => {
        const { ret, body: body3 } = this;
        if (!ret.push(chunk) && body3.pause) {
          body3.pause();
        }
      }).on("error", (err) => {
        const { ret } = this;
        util3.destroy(ret, err);
      }).on("end", () => {
        const { ret } = this;
        ret.push(null);
      }).on("close", () => {
        const { ret } = this;
        if (!ret._readableState.ended) {
          util3.destroy(ret, new RequestAbortedError);
        }
      });
      this.body = body2;
    }
    onData(chunk) {
      const { res } = this;
      return res.push(chunk);
    }
    onComplete(trailers) {
      const { res } = this;
      res.push(null);
    }
    onError(err) {
      const { ret } = this;
      this.handler = null;
      util3.destroy(ret, err);
    }
  }
  function pipeline(opts, handler) {
    try {
      const pipelineHandler = new PipelineHandler(opts, handler);
      this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler);
      return pipelineHandler.ret;
    } catch (err) {
      return new PassThrough().destroy(err);
    }
  }
  module.exports = pipeline;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/api-upgrade.js
var require_api_upgrade = __commonJS((exports2, module) => {
  var { InvalidArgumentError, SocketError } = require_errors8();
  var { AsyncResource } = __require("node:async_hooks");
  var assert2 = __require("node:assert");
  var util3 = require_util3();
  var { kHTTP2Stream } = require_symbols2();
  var { addSignal, removeSignal } = require_abort_signal();

  class UpgradeHandler extends AsyncResource {
    constructor(opts, callback) {
      if (!opts || typeof opts !== "object") {
        throw new InvalidArgumentError("invalid opts");
      }
      if (typeof callback !== "function") {
        throw new InvalidArgumentError("invalid callback");
      }
      const { signal, opaque, responseHeaders } = opts;
      if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
        throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget");
      }
      super("UNDICI_UPGRADE");
      this.responseHeaders = responseHeaders || null;
      this.opaque = opaque || null;
      this.callback = callback;
      this.abort = null;
      this.context = null;
      addSignal(this, signal);
    }
    onConnect(abort, context10) {
      if (this.reason) {
        abort(this.reason);
        return;
      }
      assert2(this.callback);
      this.abort = abort;
      this.context = null;
    }
    onHeaders() {
      throw new SocketError("bad upgrade", null);
    }
    onUpgrade(statusCode, rawHeaders, socket) {
      assert2(socket[kHTTP2Stream] === true ? statusCode === 200 : statusCode === 101);
      const { callback, opaque, context: context10 } = this;
      removeSignal(this);
      this.callback = null;
      const headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders);
      this.runInAsyncScope(callback, null, null, {
        headers,
        socket,
        opaque,
        context: context10
      });
    }
    onError(err) {
      const { callback, opaque } = this;
      removeSignal(this);
      if (callback) {
        this.callback = null;
        queueMicrotask(() => {
          this.runInAsyncScope(callback, null, err, { opaque });
        });
      }
    }
  }
  function upgrade(opts, callback) {
    if (callback === undefined) {
      return new Promise((resolve3, reject) => {
        upgrade.call(this, opts, (err, data) => {
          return err ? reject(err) : resolve3(data);
        });
      });
    }
    try {
      const upgradeHandler = new UpgradeHandler(opts, callback);
      const upgradeOpts = {
        ...opts,
        method: opts.method || "GET",
        upgrade: opts.protocol || "Websocket"
      };
      this.dispatch(upgradeOpts, upgradeHandler);
    } catch (err) {
      if (typeof callback !== "function") {
        throw err;
      }
      const opaque = opts?.opaque;
      queueMicrotask(() => callback(err, { opaque }));
    }
  }
  module.exports = upgrade;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/api-connect.js
var require_api_connect = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { AsyncResource } = __require("node:async_hooks");
  var { InvalidArgumentError, SocketError } = require_errors8();
  var util3 = require_util3();
  var { addSignal, removeSignal } = require_abort_signal();

  class ConnectHandler extends AsyncResource {
    constructor(opts, callback) {
      if (!opts || typeof opts !== "object") {
        throw new InvalidArgumentError("invalid opts");
      }
      if (typeof callback !== "function") {
        throw new InvalidArgumentError("invalid callback");
      }
      const { signal, opaque, responseHeaders } = opts;
      if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
        throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget");
      }
      super("UNDICI_CONNECT");
      this.opaque = opaque || null;
      this.responseHeaders = responseHeaders || null;
      this.callback = callback;
      this.abort = null;
      addSignal(this, signal);
    }
    onConnect(abort, context10) {
      if (this.reason) {
        abort(this.reason);
        return;
      }
      assert2(this.callback);
      this.abort = abort;
      this.context = context10;
    }
    onHeaders() {
      throw new SocketError("bad connect", null);
    }
    onUpgrade(statusCode, rawHeaders, socket) {
      const { callback, opaque, context: context10 } = this;
      removeSignal(this);
      this.callback = null;
      let headers = rawHeaders;
      if (headers != null) {
        headers = this.responseHeaders === "raw" ? util3.parseRawHeaders(rawHeaders) : util3.parseHeaders(rawHeaders);
      }
      this.runInAsyncScope(callback, null, null, {
        statusCode,
        headers,
        socket,
        opaque,
        context: context10
      });
    }
    onError(err) {
      const { callback, opaque } = this;
      removeSignal(this);
      if (callback) {
        this.callback = null;
        queueMicrotask(() => {
          this.runInAsyncScope(callback, null, err, { opaque });
        });
      }
    }
  }
  function connect3(opts, callback) {
    if (callback === undefined) {
      return new Promise((resolve3, reject) => {
        connect3.call(this, opts, (err, data) => {
          return err ? reject(err) : resolve3(data);
        });
      });
    }
    try {
      const connectHandler = new ConnectHandler(opts, callback);
      const connectOptions = { ...opts, method: "CONNECT" };
      this.dispatch(connectOptions, connectHandler);
    } catch (err) {
      if (typeof callback !== "function") {
        throw err;
      }
      const opaque = opts?.opaque;
      queueMicrotask(() => callback(err, { opaque }));
    }
  }
  module.exports = connect3;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/api/index.js
var require_api = __commonJS((exports2, module) => {
  exports2.request = require_api_request();
  exports2.stream = require_api_stream();
  exports2.pipeline = require_api_pipeline();
  exports2.upgrade = require_api_upgrade();
  exports2.connect = require_api_connect();
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-errors.js
var require_mock_errors = __commonJS((exports2, module) => {
  var { UndiciError } = require_errors8();
  var kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED");

  class MockNotMatchedError extends UndiciError {
    constructor(message2) {
      super(message2);
      this.name = "MockNotMatchedError";
      this.message = message2 || "The request does not match any registered mock dispatches";
      this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED";
    }
    static [Symbol.hasInstance](instance) {
      return instance && instance[kMockNotMatchedError] === true;
    }
    get [kMockNotMatchedError]() {
      return true;
    }
  }
  module.exports = {
    MockNotMatchedError
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-symbols.js
var require_mock_symbols = __commonJS((exports2, module) => {
  module.exports = {
    kAgent: Symbol("agent"),
    kOptions: Symbol("options"),
    kFactory: Symbol("factory"),
    kDispatches: Symbol("dispatches"),
    kDispatchKey: Symbol("dispatch key"),
    kDefaultHeaders: Symbol("default headers"),
    kDefaultTrailers: Symbol("default trailers"),
    kContentLength: Symbol("content length"),
    kMockAgent: Symbol("mock agent"),
    kMockAgentSet: Symbol("mock agent set"),
    kMockAgentGet: Symbol("mock agent get"),
    kMockDispatch: Symbol("mock dispatch"),
    kClose: Symbol("close"),
    kOriginalClose: Symbol("original agent close"),
    kOriginalDispatch: Symbol("original dispatch"),
    kOrigin: Symbol("origin"),
    kIsMockActive: Symbol("is mock active"),
    kNetConnect: Symbol("net connect"),
    kGetNetConnect: Symbol("get net connect"),
    kConnected: Symbol("connected"),
    kIgnoreTrailingSlash: Symbol("ignore trailing slash"),
    kMockAgentMockCallHistoryInstance: Symbol("mock agent mock call history name"),
    kMockAgentRegisterCallHistory: Symbol("mock agent register mock call history"),
    kMockAgentAddCallHistoryLog: Symbol("mock agent add call history log"),
    kMockAgentIsCallHistoryEnabled: Symbol("mock agent is call history enabled"),
    kMockAgentAcceptsNonStandardSearchParameters: Symbol("mock agent accepts non standard search parameters"),
    kMockCallHistoryAddLog: Symbol("mock call history add log"),
    kTotalDispatchCount: Symbol("total dispatch count")
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-utils.js
var require_mock_utils = __commonJS((exports2, module) => {
  var { MockNotMatchedError } = require_mock_errors();
  var {
    kDispatches,
    kMockAgent,
    kOriginalDispatch,
    kOrigin,
    kGetNetConnect,
    kTotalDispatchCount
  } = require_mock_symbols();
  var { serializePathWithQuery } = require_util3();
  var { STATUS_CODES } = __require("node:http");
  var {
    types: {
      isPromise: isPromise2
    }
  } = __require("node:util");
  var { InvalidArgumentError } = require_errors8();
  function matchValue(match, value) {
    if (typeof match === "string") {
      return match === value;
    }
    if (match instanceof RegExp) {
      return match.test(value);
    }
    if (typeof match === "function") {
      return match(value) === true;
    }
    return false;
  }
  function lowerCaseEntries(headers) {
    return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => {
      return [headerName.toLocaleLowerCase(), headerValue];
    }));
  }
  function getHeaderByName(headers, key) {
    if (Array.isArray(headers)) {
      for (let i = 0;i < headers.length; i += 2) {
        if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {
          return headers[i + 1];
        }
      }
      return;
    } else if (typeof headers.get === "function") {
      return headers.get(key);
    } else {
      return lowerCaseEntries(headers)[key.toLocaleLowerCase()];
    }
  }
  function buildHeadersFromArray(headers) {
    const clone3 = headers.slice();
    const entries = [];
    for (let index2 = 0;index2 < clone3.length; index2 += 2) {
      entries.push([clone3[index2], clone3[index2 + 1]]);
    }
    return Object.fromEntries(entries);
  }
  function matchHeaders(mockDispatch2, headers) {
    if (typeof mockDispatch2.headers === "function") {
      if (Array.isArray(headers)) {
        headers = buildHeadersFromArray(headers);
      }
      return mockDispatch2.headers(headers ? lowerCaseEntries(headers) : {});
    }
    if (typeof mockDispatch2.headers === "undefined") {
      return true;
    }
    if (typeof headers !== "object" || typeof mockDispatch2.headers !== "object") {
      return false;
    }
    for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch2.headers)) {
      const headerValue = getHeaderByName(headers, matchHeaderName);
      if (!matchValue(matchHeaderValue, headerValue)) {
        return false;
      }
    }
    return true;
  }
  function normalizeSearchParams(query) {
    if (typeof query !== "string") {
      return query;
    }
    const originalQp = new URLSearchParams(query);
    const normalizedQp = new URLSearchParams;
    for (let [key, value] of originalQp.entries()) {
      key = key.replace("[]", "");
      const valueRepresentsString = /^(['"]).*\1$/.test(value);
      if (valueRepresentsString) {
        normalizedQp.append(key, value);
        continue;
      }
      if (value.includes(",")) {
        const values = value.split(",");
        for (const v5 of values) {
          normalizedQp.append(key, v5);
        }
        continue;
      }
      normalizedQp.append(key, value);
    }
    return normalizedQp;
  }
  function safeUrl(path2) {
    if (typeof path2 !== "string") {
      return path2;
    }
    const pathSegments = path2.split("?", 3);
    if (pathSegments.length !== 2) {
      return path2;
    }
    const qp = new URLSearchParams(pathSegments.pop());
    qp.sort();
    return [...pathSegments, qp.toString()].join("?");
  }
  function matchKey(mockDispatch2, { path: path2, method, body: body2, headers }) {
    const pathMatch = matchValue(mockDispatch2.path, path2);
    const methodMatch = matchValue(mockDispatch2.method, method);
    const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body2) : true;
    const headersMatch = matchHeaders(mockDispatch2, headers);
    return pathMatch && methodMatch && bodyMatch && headersMatch;
  }
  function getResponseData(data) {
    if (Buffer.isBuffer(data)) {
      return data;
    } else if (data instanceof Uint8Array) {
      return data;
    } else if (data instanceof ArrayBuffer) {
      return data;
    } else if (typeof data === "object") {
      return JSON.stringify(data);
    } else if (data) {
      return data.toString();
    } else {
      return "";
    }
  }
  function getMockDispatch(mockDispatches, key) {
    const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
    const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
    const resolvedPathWithoutTrailingSlash = removeTrailingSlash3(resolvedPath);
    let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path2, ignoreTrailingSlash }) => {
      return ignoreTrailingSlash ? matchValue(removeTrailingSlash3(safeUrl(path2)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path2), resolvedPath);
    });
    if (matchedMockDispatches.length === 0) {
      throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
    }
    matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method));
    if (matchedMockDispatches.length === 0) {
      throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`);
    }
    matchedMockDispatches = matchedMockDispatches.filter(({ body: body2 }) => typeof body2 !== "undefined" ? matchValue(body2, key.body) : true);
    if (matchedMockDispatches.length === 0) {
      throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`);
    }
    matchedMockDispatches = matchedMockDispatches.filter((mockDispatch2) => matchHeaders(mockDispatch2, key.headers));
    if (matchedMockDispatches.length === 0) {
      const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers;
      throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`);
    }
    return matchedMockDispatches[0];
  }
  function addMockDispatch(mockDispatches, key, data, opts) {
    const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts };
    const replyData = typeof data === "function" ? { callback: data } : { ...data };
    const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } };
    mockDispatches.push(newMockDispatch);
    mockDispatches[kTotalDispatchCount] = (mockDispatches[kTotalDispatchCount] || 0) + 1;
    return newMockDispatch;
  }
  function deleteMockDispatch(mockDispatches, key) {
    const index2 = mockDispatches.findIndex((dispatch) => {
      if (!dispatch.consumed) {
        return false;
      }
      return matchKey(dispatch, key);
    });
    if (index2 !== -1) {
      mockDispatches.splice(index2, 1);
    }
  }
  function removeTrailingSlash3(path2) {
    while (path2.endsWith("/")) {
      path2 = path2.slice(0, -1);
    }
    if (path2.length === 0) {
      path2 = "/";
    }
    return path2;
  }
  function buildKey(opts) {
    const { path: path2, method, body: body2, headers, query } = opts;
    return {
      path: path2,
      method,
      body: body2,
      headers,
      query
    };
  }
  function generateKeyValues(data) {
    const keys = Object.keys(data);
    const result = [];
    for (let i = 0;i < keys.length; ++i) {
      const key = keys[i];
      const value = data[key];
      const name3 = Buffer.from(`${key}`);
      if (Array.isArray(value)) {
        for (let j4 = 0;j4 < value.length; ++j4) {
          result.push(name3, Buffer.from(`${value[j4]}`));
        }
      } else {
        result.push(name3, Buffer.from(`${value}`));
      }
    }
    return result;
  }
  function getStatusText(statusCode) {
    return STATUS_CODES[statusCode] || "unknown";
  }
  async function getResponse(body2) {
    const buffers = [];
    for await (const data of body2) {
      buffers.push(data);
    }
    return Buffer.concat(buffers).toString("utf8");
  }
  function mockDispatch(opts, handler) {
    const key = buildKey(opts);
    const mockDispatch2 = getMockDispatch(this[kDispatches], key);
    mockDispatch2.timesInvoked++;
    if (mockDispatch2.data.callback) {
      mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) };
    }
    const { data: { statusCode, data, headers, trailers, error: error49 }, delay, persist } = mockDispatch2;
    const { timesInvoked, times } = mockDispatch2;
    mockDispatch2.consumed = !persist && timesInvoked >= times;
    mockDispatch2.pending = timesInvoked < times;
    if (error49 !== null) {
      deleteMockDispatch(this[kDispatches], key);
      handler.onError(error49);
      return true;
    }
    let aborted2 = false;
    let timer = null;
    function abort(err) {
      if (aborted2) {
        return;
      }
      aborted2 = true;
      if (timer !== null) {
        clearTimeout(timer);
        timer = null;
      }
      handler.onError(err);
    }
    handler.onConnect?.(abort, null);
    if (typeof delay === "number" && delay > 0) {
      timer = setTimeout(() => {
        timer = null;
        handleReply(this[kDispatches]);
      }, delay);
    } else {
      handleReply(this[kDispatches]);
    }
    function handleReply(mockDispatches, _data = data) {
      if (aborted2) {
        return;
      }
      const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers;
      const body2 = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data;
      if (isPromise2(body2)) {
        return body2.then((newData) => handleReply(mockDispatches, newData));
      }
      if (aborted2) {
        return;
      }
      const responseData = getResponseData(body2);
      const responseHeaders = generateKeyValues(headers);
      const responseTrailers = generateKeyValues(trailers);
      handler.onHeaders?.(statusCode, responseHeaders, resume2, getStatusText(statusCode));
      handler.onData?.(Buffer.from(responseData));
      handler.onComplete?.(responseTrailers);
      deleteMockDispatch(mockDispatches, key);
    }
    function resume2() {}
    return true;
  }
  function buildMockDispatch() {
    const agent2 = this[kMockAgent];
    const origin = this[kOrigin];
    const originalDispatch = this[kOriginalDispatch];
    return function dispatch(opts, handler) {
      if (agent2.isMockActive) {
        try {
          mockDispatch.call(this, opts, handler);
        } catch (error49) {
          if (error49.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") {
            const netConnect = agent2[kGetNetConnect]();
            const totalInterceptsCount = this[kDispatches][kTotalDispatchCount] || this[kDispatches].length;
            const pendingInterceptsCount = this[kDispatches].filter(({ consumed }) => !consumed).length;
            const interceptsMessage = `, ${pendingInterceptsCount} interceptor(s) remaining out of ${totalInterceptsCount} defined`;
            if (netConnect === false) {
              throw new MockNotMatchedError(`${error49.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)${interceptsMessage}`);
            }
            if (checkNetConnect(netConnect, origin)) {
              originalDispatch.call(this, opts, handler);
            } else {
              throw new MockNotMatchedError(`${error49.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)${interceptsMessage}`);
            }
          } else {
            throw error49;
          }
        }
      } else {
        originalDispatch.call(this, opts, handler);
      }
    };
  }
  function checkNetConnect(netConnect, origin) {
    const url2 = new URL(origin);
    if (netConnect === true) {
      return true;
    } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) {
      return true;
    }
    return false;
  }
  function normalizeOrigin(origin) {
    if (typeof origin !== "string" && !(origin instanceof URL)) {
      return origin;
    }
    if (origin instanceof URL) {
      return origin.origin;
    }
    return origin.toLowerCase();
  }
  function buildAndValidateMockOptions(opts) {
    const { agent: agent2, ...mockOptions } = opts;
    if ("enableCallHistory" in mockOptions && typeof mockOptions.enableCallHistory !== "boolean") {
      throw new InvalidArgumentError("options.enableCallHistory must to be a boolean");
    }
    if ("acceptNonStandardSearchParameters" in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== "boolean") {
      throw new InvalidArgumentError("options.acceptNonStandardSearchParameters must to be a boolean");
    }
    if ("ignoreTrailingSlash" in mockOptions && typeof mockOptions.ignoreTrailingSlash !== "boolean") {
      throw new InvalidArgumentError("options.ignoreTrailingSlash must to be a boolean");
    }
    return mockOptions;
  }
  module.exports = {
    getResponseData,
    getMockDispatch,
    addMockDispatch,
    deleteMockDispatch,
    buildKey,
    generateKeyValues,
    matchValue,
    getResponse,
    getStatusText,
    mockDispatch,
    buildMockDispatch,
    checkNetConnect,
    buildAndValidateMockOptions,
    getHeaderByName,
    buildHeadersFromArray,
    normalizeSearchParams,
    normalizeOrigin
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-interceptor.js
var require_mock_interceptor = __commonJS((exports2, module) => {
  var { getResponseData, buildKey, addMockDispatch } = require_mock_utils();
  var {
    kDispatches,
    kDispatchKey,
    kDefaultHeaders,
    kDefaultTrailers,
    kContentLength,
    kMockDispatch,
    kIgnoreTrailingSlash
  } = require_mock_symbols();
  var { InvalidArgumentError } = require_errors8();
  var { serializePathWithQuery } = require_util3();

  class MockScope {
    constructor(mockDispatch) {
      this[kMockDispatch] = mockDispatch;
    }
    delay(waitInMs) {
      if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) {
        throw new InvalidArgumentError("waitInMs must be a valid integer > 0");
      }
      this[kMockDispatch].delay = waitInMs;
      return this;
    }
    persist() {
      this[kMockDispatch].persist = true;
      return this;
    }
    times(repeatTimes) {
      if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {
        throw new InvalidArgumentError("repeatTimes must be a valid integer > 0");
      }
      this[kMockDispatch].times = repeatTimes;
      return this;
    }
  }

  class MockInterceptor {
    constructor(opts, mockDispatches) {
      if (typeof opts !== "object") {
        throw new InvalidArgumentError("opts must be an object");
      }
      if (typeof opts.path === "undefined") {
        throw new InvalidArgumentError("opts.path must be defined");
      }
      if (typeof opts.method === "undefined") {
        opts.method = "GET";
      }
      if (typeof opts.path === "string") {
        if (opts.query) {
          opts.path = serializePathWithQuery(opts.path, opts.query);
        } else {
          const parsedURL = new URL(opts.path, "data://");
          opts.path = parsedURL.pathname + parsedURL.search;
        }
      }
      if (typeof opts.method === "string") {
        opts.method = opts.method.toUpperCase();
      }
      this[kDispatchKey] = buildKey(opts);
      this[kDispatches] = mockDispatches;
      this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false;
      this[kDefaultHeaders] = {};
      this[kDefaultTrailers] = {};
      this[kContentLength] = false;
    }
    createMockScopeDispatchData({ statusCode, data, responseOptions }) {
      const responseData = getResponseData(data);
      const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {};
      const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers };
      const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers };
      return { statusCode, data, headers, trailers };
    }
    validateReplyParameters(replyParameters) {
      if (typeof replyParameters.statusCode === "undefined") {
        throw new InvalidArgumentError("statusCode must be defined");
      }
      if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) {
        throw new InvalidArgumentError("responseOptions must be an object");
      }
    }
    reply(replyOptionsCallbackOrStatusCode) {
      if (typeof replyOptionsCallbackOrStatusCode === "function") {
        const wrappedDefaultsCallback = (opts) => {
          const resolvedData = replyOptionsCallbackOrStatusCode(opts);
          if (typeof resolvedData !== "object" || resolvedData === null) {
            throw new InvalidArgumentError("reply options callback must return an object");
          }
          const replyParameters2 = { data: "", responseOptions: {}, ...resolvedData };
          this.validateReplyParameters(replyParameters2);
          return {
            ...this.createMockScopeDispatchData(replyParameters2)
          };
        };
        const newMockDispatch2 = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] });
        return new MockScope(newMockDispatch2);
      }
      const replyParameters = {
        statusCode: replyOptionsCallbackOrStatusCode,
        data: arguments[1] === undefined ? "" : arguments[1],
        responseOptions: arguments[2] === undefined ? {} : arguments[2]
      };
      this.validateReplyParameters(replyParameters);
      const dispatchData = this.createMockScopeDispatchData(replyParameters);
      const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] });
      return new MockScope(newMockDispatch);
    }
    replyWithError(error49) {
      if (typeof error49 === "undefined") {
        throw new InvalidArgumentError("error must be defined");
      }
      const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error49 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] });
      return new MockScope(newMockDispatch);
    }
    defaultReplyHeaders(headers) {
      if (typeof headers === "undefined") {
        throw new InvalidArgumentError("headers must be defined");
      }
      this[kDefaultHeaders] = headers;
      return this;
    }
    defaultReplyTrailers(trailers) {
      if (typeof trailers === "undefined") {
        throw new InvalidArgumentError("trailers must be defined");
      }
      this[kDefaultTrailers] = trailers;
      return this;
    }
    replyContentLength() {
      this[kContentLength] = true;
      return this;
    }
  }
  exports2.MockInterceptor = MockInterceptor;
  exports2.MockScope = MockScope;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-client.js
var require_mock_client = __commonJS((exports2, module) => {
  var { promisify: promisify2 } = __require("node:util");
  var Client4 = require_client5();
  var { buildMockDispatch } = require_mock_utils();
  var {
    kDispatches,
    kMockAgent,
    kClose,
    kOriginalClose,
    kOrigin,
    kOriginalDispatch,
    kConnected,
    kIgnoreTrailingSlash
  } = require_mock_symbols();
  var { MockInterceptor } = require_mock_interceptor();
  var Symbols = require_symbols2();
  var { InvalidArgumentError } = require_errors8();

  class MockClient extends Client4 {
    constructor(origin, opts) {
      if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") {
        throw new InvalidArgumentError("Argument opts.agent must implement Agent");
      }
      super(origin, opts);
      this[kMockAgent] = opts.agent;
      this[kOrigin] = origin;
      this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false;
      this[kDispatches] = [];
      this[kConnected] = 1;
      this[kOriginalDispatch] = this.dispatch;
      this[kOriginalClose] = this.close.bind(this);
      this.dispatch = buildMockDispatch.call(this);
      this.close = this[kClose];
    }
    get [Symbols.kConnected]() {
      return this[kConnected];
    }
    intercept(opts) {
      return new MockInterceptor(opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, this[kDispatches]);
    }
    cleanMocks() {
      this[kDispatches] = [];
    }
    async[kClose]() {
      await promisify2(this[kOriginalClose])();
      this[kConnected] = 0;
      this[kMockAgent][Symbols.kClients].delete(this[kOrigin]);
    }
  }
  module.exports = MockClient;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-call-history.js
var require_mock_call_history = __commonJS((exports2, module) => {
  var { kMockCallHistoryAddLog } = require_mock_symbols();
  var { InvalidArgumentError } = require_errors8();
  function handleFilterCallsWithOptions(criteria, options2, handler, store, allLogs) {
    switch (options2.operator) {
      case "OR":
        store.push(...handler(criteria, allLogs));
        return store;
      case "AND":
        return handler(criteria, store);
      default:
        throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'");
    }
  }
  function buildAndValidateFilterCallsOptions(options2 = {}) {
    const finalOptions = {};
    if ("operator" in options2) {
      if (typeof options2.operator !== "string" || options2.operator.toUpperCase() !== "OR" && options2.operator.toUpperCase() !== "AND") {
        throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'");
      }
      return {
        ...finalOptions,
        operator: options2.operator.toUpperCase()
      };
    }
    return finalOptions;
  }
  function makeFilterCalls(parameterName) {
    return (parameterValue, logs) => {
      if (typeof parameterValue === "string" || parameterValue == null) {
        return logs.filter((log4) => {
          return log4[parameterName] === parameterValue;
        });
      }
      if (parameterValue instanceof RegExp) {
        return logs.filter((log4) => {
          return parameterValue.test(log4[parameterName]);
        });
      }
      throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`);
    };
  }
  function computeUrlWithMaybeSearchParameters(requestInit) {
    try {
      const url2 = new URL(requestInit.path, requestInit.origin);
      if (url2.search.length !== 0) {
        return url2;
      }
      url2.search = new URLSearchParams(requestInit.query).toString();
      return url2;
    } catch (error49) {
      throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error49 });
    }
  }

  class MockCallHistoryLog {
    constructor(requestInit = {}) {
      this.body = requestInit.body;
      this.headers = requestInit.headers;
      this.method = requestInit.method;
      const url2 = computeUrlWithMaybeSearchParameters(requestInit);
      this.fullUrl = url2.toString();
      this.origin = url2.origin;
      this.path = url2.pathname;
      this.searchParams = Object.fromEntries(url2.searchParams);
      this.protocol = url2.protocol;
      this.host = url2.host;
      this.port = url2.port;
      this.hash = url2.hash;
    }
    toMap() {
      return new Map([
        ["protocol", this.protocol],
        ["host", this.host],
        ["port", this.port],
        ["origin", this.origin],
        ["path", this.path],
        ["hash", this.hash],
        ["searchParams", this.searchParams],
        ["fullUrl", this.fullUrl],
        ["method", this.method],
        ["body", this.body],
        ["headers", this.headers]
      ]);
    }
    toString() {
      const options2 = { betweenKeyValueSeparator: "->", betweenPairSeparator: "|" };
      let result = "";
      this.toMap().forEach((value, key) => {
        if (typeof value === "string" || value === undefined || value === null) {
          result = `${result}${key}${options2.betweenKeyValueSeparator}${value}${options2.betweenPairSeparator}`;
        }
        if (typeof value === "object" && value !== null || Array.isArray(value)) {
          result = `${result}${key}${options2.betweenKeyValueSeparator}${JSON.stringify(value)}${options2.betweenPairSeparator}`;
        }
      });
      return result.slice(0, -1);
    }
  }

  class MockCallHistory {
    logs = [];
    calls() {
      return this.logs;
    }
    firstCall() {
      return this.logs.at(0);
    }
    lastCall() {
      return this.logs.at(-1);
    }
    nthCall(number5) {
      if (typeof number5 !== "number") {
        throw new InvalidArgumentError("nthCall must be called with a number");
      }
      if (!Number.isInteger(number5)) {
        throw new InvalidArgumentError("nthCall must be called with an integer");
      }
      if (Math.sign(number5) !== 1) {
        throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead");
      }
      return this.logs.at(number5 - 1);
    }
    filterCalls(criteria, options2) {
      if (this.logs.length === 0) {
        return this.logs;
      }
      if (typeof criteria === "function") {
        return this.logs.filter(criteria);
      }
      if (criteria instanceof RegExp) {
        return this.logs.filter((log4) => {
          return criteria.test(log4.toString());
        });
      }
      if (typeof criteria === "object" && criteria !== null) {
        if (Object.keys(criteria).length === 0) {
          return this.logs;
        }
        const finalOptions = { operator: "OR", ...buildAndValidateFilterCallsOptions(options2) };
        let maybeDuplicatedLogsFiltered = finalOptions.operator === "AND" ? this.logs : [];
        if ("protocol" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered, this.logs);
        }
        if ("host" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered, this.logs);
        }
        if ("port" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered, this.logs);
        }
        if ("origin" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered, this.logs);
        }
        if ("path" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered, this.logs);
        }
        if ("hash" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered, this.logs);
        }
        if ("fullUrl" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered, this.logs);
        }
        if ("method" in criteria) {
          maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered, this.logs);
        }
        const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)];
        return uniqLogsFiltered;
      }
      throw new InvalidArgumentError("criteria parameter should be one of function, regexp, or object");
    }
    filterCallsByProtocol = makeFilterCalls.call(this, "protocol");
    filterCallsByHost = makeFilterCalls.call(this, "host");
    filterCallsByPort = makeFilterCalls.call(this, "port");
    filterCallsByOrigin = makeFilterCalls.call(this, "origin");
    filterCallsByPath = makeFilterCalls.call(this, "path");
    filterCallsByHash = makeFilterCalls.call(this, "hash");
    filterCallsByFullUrl = makeFilterCalls.call(this, "fullUrl");
    filterCallsByMethod = makeFilterCalls.call(this, "method");
    clear() {
      this.logs = [];
    }
    [kMockCallHistoryAddLog](requestInit) {
      const log4 = new MockCallHistoryLog(requestInit);
      this.logs.push(log4);
      return log4;
    }
    *[Symbol.iterator]() {
      for (const log4 of this.calls()) {
        yield log4;
      }
    }
  }
  exports2.MockCallHistory = MockCallHistory;
  exports2.MockCallHistoryLog = MockCallHistoryLog;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-pool.js
var require_mock_pool = __commonJS((exports2, module) => {
  var { promisify: promisify2 } = __require("node:util");
  var Pool3 = require_pool();
  var { buildMockDispatch } = require_mock_utils();
  var {
    kDispatches,
    kMockAgent,
    kClose,
    kOriginalClose,
    kOrigin,
    kOriginalDispatch,
    kConnected,
    kIgnoreTrailingSlash
  } = require_mock_symbols();
  var { MockInterceptor } = require_mock_interceptor();
  var Symbols = require_symbols2();
  var { InvalidArgumentError } = require_errors8();

  class MockPool extends Pool3 {
    constructor(origin, opts) {
      if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") {
        throw new InvalidArgumentError("Argument opts.agent must implement Agent");
      }
      super(origin, opts);
      this[kMockAgent] = opts.agent;
      this[kOrigin] = origin;
      this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false;
      this[kDispatches] = [];
      this[kConnected] = 1;
      this[kOriginalDispatch] = this.dispatch;
      this[kOriginalClose] = this.close.bind(this);
      this.dispatch = buildMockDispatch.call(this);
      this.close = this[kClose];
    }
    get [Symbols.kConnected]() {
      return this[kConnected];
    }
    intercept(opts) {
      return new MockInterceptor(opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, this[kDispatches]);
    }
    cleanMocks() {
      this[kDispatches] = [];
    }
    async[kClose]() {
      await promisify2(this[kOriginalClose])();
      this[kConnected] = 0;
      this[kMockAgent][Symbols.kClients].delete(this[kOrigin]);
    }
  }
  module.exports = MockPool;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js
var require_pending_interceptors_formatter = __commonJS((exports2, module) => {
  var { Transform } = __require("node:stream");
  var { Console } = __require("node:console");
  var PERSISTENT = process.versions.icu ? "✅" : "Y ";
  var NOT_PERSISTENT = process.versions.icu ? "❌" : "N ";
  module.exports = class PendingInterceptorsFormatter {
    constructor({ disableColors } = {}) {
      this.transform = new Transform({
        transform(chunk, _enc, cb2) {
          cb2(null, chunk);
        }
      });
      this.logger = new Console({
        stdout: this.transform,
        inspectOptions: {
          colors: !disableColors && !process.env.CI
        }
      });
    }
    format(pendingInterceptors) {
      const withPrettyHeaders = pendingInterceptors.map(({ method, path: path2, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
        Method: method,
        Origin: origin,
        Path: path2,
        "Status code": statusCode,
        Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
        Invocations: timesInvoked,
        Remaining: persist ? Infinity : times - timesInvoked
      }));
      this.logger.table(withPrettyHeaders);
      return this.transform.read().toString();
    }
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/mock-agent.js
var require_mock_agent = __commonJS((exports2, module) => {
  var { kClients } = require_symbols2();
  var Agent3 = require_agent();
  var {
    kAgent,
    kMockAgentSet,
    kMockAgentGet,
    kDispatches,
    kIsMockActive,
    kNetConnect,
    kGetNetConnect,
    kOptions,
    kFactory,
    kMockAgentRegisterCallHistory,
    kMockAgentIsCallHistoryEnabled,
    kMockAgentAddCallHistoryLog,
    kMockAgentMockCallHistoryInstance,
    kMockAgentAcceptsNonStandardSearchParameters,
    kMockCallHistoryAddLog,
    kIgnoreTrailingSlash
  } = require_mock_symbols();
  var MockClient = require_mock_client();
  var MockPool = require_mock_pool();
  var { matchValue, normalizeSearchParams, buildAndValidateMockOptions, normalizeOrigin } = require_mock_utils();
  var { InvalidArgumentError, UndiciError } = require_errors8();
  var Dispatcher = require_dispatcher();
  var PendingInterceptorsFormatter = require_pending_interceptors_formatter();
  var { MockCallHistory } = require_mock_call_history();

  class MockAgent extends Dispatcher {
    constructor(opts = {}) {
      super(opts);
      const mockOptions = buildAndValidateMockOptions(opts);
      this[kNetConnect] = true;
      this[kIsMockActive] = true;
      this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false;
      this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false;
      this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false;
      if (opts?.agent && typeof opts.agent.dispatch !== "function") {
        throw new InvalidArgumentError("Argument opts.agent must implement Agent");
      }
      const agent2 = opts?.agent ? opts.agent : new Agent3(opts);
      this[kAgent] = agent2;
      this[kClients] = agent2[kClients];
      this[kOptions] = mockOptions;
      if (this[kMockAgentIsCallHistoryEnabled]) {
        this[kMockAgentRegisterCallHistory]();
      }
    }
    get(origin) {
      const normalizedOrigin = normalizeOrigin(origin);
      const originKey = this[kIgnoreTrailingSlash] ? normalizedOrigin.replace(/\/$/, "") : normalizedOrigin;
      let dispatcher = this[kMockAgentGet](originKey);
      if (!dispatcher) {
        dispatcher = this[kFactory](originKey);
        this[kMockAgentSet](originKey, dispatcher);
      }
      return dispatcher;
    }
    dispatch(opts, handler) {
      opts.origin = normalizeOrigin(opts.origin);
      this.get(opts.origin);
      this[kMockAgentAddCallHistoryLog](opts);
      const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
      const dispatchOpts = { ...opts };
      if (acceptNonStandardSearchParameters && dispatchOpts.path) {
        const [path2, searchParams] = dispatchOpts.path.split("?");
        const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
        dispatchOpts.path = `${path2}?${normalizedSearchParams}`;
      }
      return this[kAgent].dispatch(dispatchOpts, handler);
    }
    async close() {
      this.clearCallHistory();
      await this[kAgent].close();
      this[kClients].clear();
    }
    deactivate() {
      this[kIsMockActive] = false;
    }
    activate() {
      this[kIsMockActive] = true;
    }
    enableNetConnect(matcher) {
      if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) {
        if (Array.isArray(this[kNetConnect])) {
          this[kNetConnect].push(matcher);
        } else {
          this[kNetConnect] = [matcher];
        }
      } else if (typeof matcher === "undefined") {
        this[kNetConnect] = true;
      } else {
        throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp.");
      }
    }
    disableNetConnect() {
      this[kNetConnect] = false;
    }
    enableCallHistory() {
      this[kMockAgentIsCallHistoryEnabled] = true;
      return this;
    }
    disableCallHistory() {
      this[kMockAgentIsCallHistoryEnabled] = false;
      return this;
    }
    getCallHistory() {
      return this[kMockAgentMockCallHistoryInstance];
    }
    clearCallHistory() {
      if (this[kMockAgentMockCallHistoryInstance] !== undefined) {
        this[kMockAgentMockCallHistoryInstance].clear();
      }
    }
    get isMockActive() {
      return this[kIsMockActive];
    }
    [kMockAgentRegisterCallHistory]() {
      if (this[kMockAgentMockCallHistoryInstance] === undefined) {
        this[kMockAgentMockCallHistoryInstance] = new MockCallHistory;
      }
    }
    [kMockAgentAddCallHistoryLog](opts) {
      if (this[kMockAgentIsCallHistoryEnabled]) {
        this[kMockAgentRegisterCallHistory]();
        this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts);
      }
    }
    [kMockAgentSet](origin, dispatcher) {
      this[kClients].set(origin, { count: 0, dispatcher });
    }
    [kFactory](origin) {
      const mockOptions = Object.assign({ agent: this }, this[kOptions]);
      return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions);
    }
    [kMockAgentGet](origin) {
      const result = this[kClients].get(origin);
      if (result?.dispatcher) {
        return result.dispatcher;
      }
      if (typeof origin !== "string") {
        const dispatcher = this[kFactory]("http://localhost:9999");
        this[kMockAgentSet](origin, dispatcher);
        return dispatcher;
      }
      for (const [keyMatcher, result2] of Array.from(this[kClients])) {
        if (result2 && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) {
          const dispatcher = this[kFactory](origin);
          this[kMockAgentSet](origin, dispatcher);
          dispatcher[kDispatches] = result2.dispatcher[kDispatches];
          return dispatcher;
        }
      }
    }
    [kGetNetConnect]() {
      return this[kNetConnect];
    }
    pendingInterceptors() {
      const mockAgentClients = this[kClients];
      return Array.from(mockAgentClients.entries()).flatMap(([origin, result]) => result.dispatcher[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending }) => pending);
    }
    assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter } = {}) {
      const pending = this.pendingInterceptors();
      if (pending.length === 0) {
        return;
      }
      throw new UndiciError(pending.length === 1 ? `1 interceptor is pending:

${pendingInterceptorsFormatter.format(pending)}`.trim() : `${pending.length} interceptors are pending:

${pendingInterceptorsFormatter.format(pending)}`.trim());
    }
  }
  module.exports = MockAgent;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/snapshot-utils.js
var require_snapshot_utils = __commonJS((exports2, module) => {
  var { InvalidArgumentError } = require_errors8();
  var { runtimeFeatures } = require_runtime_features();
  function createHeaderFilters(matchOptions = {}) {
    const { ignoreHeaders = [], excludeHeaders = [], matchHeaders = [], caseSensitive = false } = matchOptions;
    return {
      ignore: new Set(ignoreHeaders.map((header) => caseSensitive ? header : header.toLowerCase())),
      exclude: new Set(excludeHeaders.map((header) => caseSensitive ? header : header.toLowerCase())),
      match: new Set(matchHeaders.map((header) => caseSensitive ? header : header.toLowerCase()))
    };
  }
  var crypto3 = runtimeFeatures.has("crypto") ? __require("node:crypto") : null;
  var hashId = crypto3?.hash ? (value) => crypto3.hash("sha256", value, "base64url") : (value) => Buffer.from(value).toString("base64url");
  function isUndiciHeaders(headers) {
    return Array.isArray(headers) && (headers.length & 1) === 0;
  }
  function isUrlExcludedFactory(excludePatterns = []) {
    if (excludePatterns.length === 0) {
      return () => false;
    }
    return function isUrlExcluded(url2) {
      let urlLowerCased;
      for (const pattern of excludePatterns) {
        if (typeof pattern === "string") {
          if (!urlLowerCased) {
            urlLowerCased = url2.toLowerCase();
          }
          if (urlLowerCased.includes(pattern.toLowerCase())) {
            return true;
          }
        } else if (pattern instanceof RegExp) {
          if (pattern.test(url2)) {
            return true;
          }
        }
      }
      return false;
    };
  }
  function normalizeHeaders(headers) {
    const normalizedHeaders = {};
    if (!headers)
      return normalizedHeaders;
    if (isUndiciHeaders(headers)) {
      for (let i = 0;i < headers.length; i += 2) {
        const key = headers[i];
        const value = headers[i + 1];
        if (key && value !== undefined) {
          const keyStr = Buffer.isBuffer(key) ? key.toString() : key;
          const valueStr = Buffer.isBuffer(value) ? value.toString() : value;
          normalizedHeaders[keyStr.toLowerCase()] = valueStr;
        }
      }
      return normalizedHeaders;
    }
    if (headers && typeof headers === "object") {
      for (const [key, value] of Object.entries(headers)) {
        if (key && typeof key === "string") {
          normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(", ") : String(value);
        }
      }
    }
    return normalizedHeaders;
  }
  var validSnapshotModes = ["record", "playback", "update"];
  function validateSnapshotMode(mode) {
    if (!validSnapshotModes.includes(mode)) {
      throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(", ")}`);
    }
  }
  module.exports = {
    createHeaderFilters,
    hashId,
    isUndiciHeaders,
    normalizeHeaders,
    isUrlExcludedFactory,
    validateSnapshotMode
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/snapshot-recorder.js
var require_snapshot_recorder = __commonJS((exports2, module) => {
  var { writeFile, readFile: readFile2, mkdir } = __require("node:fs/promises");
  var { dirname: dirname4, resolve: resolve3 } = __require("node:path");
  var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("node:timers");
  var { InvalidArgumentError, UndiciError } = require_errors8();
  var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
  function formatRequestKey(opts, headerFilters, matchOptions = {}) {
    const url2 = new URL(opts.path, opts.origin);
    const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers);
    if (!opts._normalizedHeaders) {
      opts._normalizedHeaders = normalized;
    }
    return {
      method: opts.method || "GET",
      url: matchOptions.matchQuery !== false ? url2.toString() : `${url2.origin}${url2.pathname}`,
      headers: filterHeadersForMatching(normalized, headerFilters, matchOptions),
      body: matchOptions.matchBody !== false && opts.body ? String(opts.body) : ""
    };
  }
  function filterHeadersForMatching(headers, headerFilters, matchOptions = {}) {
    if (!headers || typeof headers !== "object")
      return {};
    const {
      caseSensitive = false
    } = matchOptions;
    const filtered = {};
    const { ignore, exclude, match } = headerFilters;
    for (const [key, value] of Object.entries(headers)) {
      const headerKey = caseSensitive ? key : key.toLowerCase();
      if (exclude.has(headerKey))
        continue;
      if (ignore.has(headerKey))
        continue;
      if (match.size !== 0) {
        if (!match.has(headerKey))
          continue;
      }
      filtered[headerKey] = value;
    }
    return filtered;
  }
  function filterHeadersForStorage(headers, headerFilters, matchOptions = {}) {
    if (!headers || typeof headers !== "object")
      return {};
    const {
      caseSensitive = false
    } = matchOptions;
    const filtered = {};
    const { exclude: excludeSet } = headerFilters;
    for (const [key, value] of Object.entries(headers)) {
      const headerKey = caseSensitive ? key : key.toLowerCase();
      if (excludeSet.has(headerKey))
        continue;
      filtered[headerKey] = value;
    }
    return filtered;
  }
  function createRequestHash(formattedRequest) {
    const parts = [
      formattedRequest.method,
      formattedRequest.url
    ];
    if (formattedRequest.headers && typeof formattedRequest.headers === "object") {
      const headerKeys = Object.keys(formattedRequest.headers).sort();
      for (const key of headerKeys) {
        const values = Array.isArray(formattedRequest.headers[key]) ? formattedRequest.headers[key] : [formattedRequest.headers[key]];
        parts.push(key);
        for (const value of values.sort()) {
          parts.push(String(value));
        }
      }
    }
    parts.push(formattedRequest.body);
    const content = parts.join("|");
    return hashId(content);
  }

  class SnapshotRecorder {
    #flushTimeout;
    #isUrlExcluded;
    #snapshots = new Map;
    #snapshotPath;
    #maxSnapshots = Infinity;
    #autoFlush = false;
    #headerFilters;
    constructor(options2 = {}) {
      this.#snapshotPath = options2.snapshotPath;
      this.#maxSnapshots = options2.maxSnapshots || Infinity;
      this.#autoFlush = options2.autoFlush || false;
      this.flushInterval = options2.flushInterval || 30000;
      this._flushTimer = null;
      this.matchOptions = {
        matchHeaders: options2.matchHeaders || [],
        ignoreHeaders: options2.ignoreHeaders || [],
        excludeHeaders: options2.excludeHeaders || [],
        matchBody: options2.matchBody !== false,
        matchQuery: options2.matchQuery !== false,
        caseSensitive: options2.caseSensitive || false
      };
      this.#headerFilters = createHeaderFilters(this.matchOptions);
      this.shouldRecord = options2.shouldRecord || (() => true);
      this.shouldPlayback = options2.shouldPlayback || (() => true);
      this.#isUrlExcluded = isUrlExcludedFactory(options2.excludeUrls);
      if (this.#autoFlush && this.#snapshotPath) {
        this.#startAutoFlush();
      }
    }
    async record(requestOpts, response) {
      if (!this.shouldRecord(requestOpts)) {
        return;
      }
      if (this.isUrlExcluded(requestOpts)) {
        return;
      }
      const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions);
      const hash2 = createRequestHash(request2);
      const normalizedHeaders = normalizeHeaders(response.headers);
      const responseData = {
        statusCode: response.statusCode,
        headers: filterHeadersForStorage(normalizedHeaders, this.#headerFilters, this.matchOptions),
        body: Buffer.isBuffer(response.body) ? response.body.toString("base64") : Buffer.from(String(response.body || "")).toString("base64"),
        trailers: response.trailers
      };
      if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash2)) {
        const oldestKey = this.#snapshots.keys().next().value;
        this.#snapshots.delete(oldestKey);
      }
      const existingSnapshot = this.#snapshots.get(hash2);
      if (existingSnapshot && existingSnapshot.responses) {
        existingSnapshot.responses.push(responseData);
        existingSnapshot.timestamp = new Date().toISOString();
      } else {
        this.#snapshots.set(hash2, {
          request: request2,
          responses: [responseData],
          callCount: 0,
          timestamp: new Date().toISOString()
        });
      }
      if (this.#autoFlush && this.#snapshotPath) {
        this.#scheduleFlush();
      }
    }
    isUrlExcluded(requestOpts) {
      const url2 = new URL(requestOpts.path, requestOpts.origin).toString();
      return this.#isUrlExcluded(url2);
    }
    findSnapshot(requestOpts) {
      if (!this.shouldPlayback(requestOpts)) {
        return;
      }
      if (this.isUrlExcluded(requestOpts)) {
        return;
      }
      const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions);
      const hash2 = createRequestHash(request2);
      const snapshot = this.#snapshots.get(hash2);
      if (!snapshot)
        return;
      const currentCallCount = snapshot.callCount || 0;
      const responseIndex = Math.min(currentCallCount, snapshot.responses.length - 1);
      snapshot.callCount = currentCallCount + 1;
      return {
        ...snapshot,
        response: snapshot.responses[responseIndex]
      };
    }
    async loadSnapshots(filePath) {
      const path2 = filePath || this.#snapshotPath;
      if (!path2) {
        throw new InvalidArgumentError("Snapshot path is required");
      }
      try {
        const data = await readFile2(resolve3(path2), "utf8");
        const parsed = JSON.parse(data);
        if (Array.isArray(parsed)) {
          this.#snapshots.clear();
          for (const { hash: hash2, snapshot } of parsed) {
            this.#snapshots.set(hash2, snapshot);
          }
        } else {
          this.#snapshots = new Map(Object.entries(parsed));
        }
      } catch (error49) {
        if (error49.code === "ENOENT") {
          this.#snapshots.clear();
        } else {
          throw new UndiciError(`Failed to load snapshots from ${path2}`, { cause: error49 });
        }
      }
    }
    async saveSnapshots(filePath) {
      const path2 = filePath || this.#snapshotPath;
      if (!path2) {
        throw new InvalidArgumentError("Snapshot path is required");
      }
      const resolvedPath = resolve3(path2);
      await mkdir(dirname4(resolvedPath), { recursive: true });
      const data = Array.from(this.#snapshots.entries()).map(([hash2, snapshot]) => ({
        hash: hash2,
        snapshot
      }));
      await writeFile(resolvedPath, JSON.stringify(data, null, 2), { flush: true });
    }
    clear() {
      this.#snapshots.clear();
    }
    getSnapshots() {
      return Array.from(this.#snapshots.values());
    }
    size() {
      return this.#snapshots.size;
    }
    resetCallCounts() {
      for (const snapshot of this.#snapshots.values()) {
        snapshot.callCount = 0;
      }
    }
    deleteSnapshot(requestOpts) {
      const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions);
      const hash2 = createRequestHash(request2);
      return this.#snapshots.delete(hash2);
    }
    getSnapshotInfo(requestOpts) {
      const request2 = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions);
      const hash2 = createRequestHash(request2);
      const snapshot = this.#snapshots.get(hash2);
      if (!snapshot)
        return null;
      return {
        hash: hash2,
        request: snapshot.request,
        responseCount: snapshot.responses ? snapshot.responses.length : snapshot.response ? 1 : 0,
        callCount: snapshot.callCount || 0,
        timestamp: snapshot.timestamp
      };
    }
    replaceSnapshots(snapshotData) {
      this.#snapshots.clear();
      if (Array.isArray(snapshotData)) {
        for (const { hash: hash2, snapshot } of snapshotData) {
          this.#snapshots.set(hash2, snapshot);
        }
      } else if (snapshotData && typeof snapshotData === "object") {
        this.#snapshots = new Map(Object.entries(snapshotData));
      }
    }
    #startAutoFlush() {
      return this.#scheduleFlush();
    }
    #stopAutoFlush() {
      if (this.#flushTimeout) {
        clearTimeout2(this.#flushTimeout);
        this.saveSnapshots().catch(() => {});
        this.#flushTimeout = null;
      }
    }
    #scheduleFlush() {
      this.#flushTimeout = setTimeout2(() => {
        this.saveSnapshots().catch(() => {});
        if (this.#autoFlush) {
          this.#flushTimeout?.refresh();
        } else {
          this.#flushTimeout = null;
        }
      }, 1000);
    }
    destroy() {
      this.#stopAutoFlush();
      if (this.#flushTimeout) {
        clearTimeout2(this.#flushTimeout);
        this.#flushTimeout = null;
      }
    }
    async close() {
      if (this.#snapshotPath && this.#snapshots.size !== 0) {
        await this.saveSnapshots();
      }
      this.destroy();
    }
  }
  module.exports = { SnapshotRecorder, formatRequestKey, createRequestHash, filterHeadersForMatching, filterHeadersForStorage, createHeaderFilters };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/snapshot-agent.js
var require_snapshot_agent = __commonJS((exports2, module) => {
  var Agent3 = require_agent();
  var MockAgent = require_mock_agent();
  var { SnapshotRecorder } = require_snapshot_recorder();
  var WrapHandler = require_wrap_handler();
  var { InvalidArgumentError, UndiciError } = require_errors8();
  var { validateSnapshotMode } = require_snapshot_utils();
  var kSnapshotRecorder = Symbol("kSnapshotRecorder");
  var kSnapshotMode = Symbol("kSnapshotMode");
  var kSnapshotPath = Symbol("kSnapshotPath");
  var kSnapshotLoaded = Symbol("kSnapshotLoaded");
  var kRealAgent = Symbol("kRealAgent");
  var warningEmitted = false;

  class SnapshotAgent extends MockAgent {
    constructor(opts = {}) {
      if (!warningEmitted) {
        process.emitWarning("SnapshotAgent is experimental and subject to change", "ExperimentalWarning");
        warningEmitted = true;
      }
      const {
        mode = "record",
        snapshotPath = null,
        ...mockAgentOpts
      } = opts;
      super(mockAgentOpts);
      validateSnapshotMode(mode);
      if ((mode === "playback" || mode === "update") && !snapshotPath) {
        throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`);
      }
      this[kSnapshotMode] = mode;
      this[kSnapshotPath] = snapshotPath;
      this[kSnapshotRecorder] = new SnapshotRecorder({
        snapshotPath: this[kSnapshotPath],
        mode: this[kSnapshotMode],
        maxSnapshots: opts.maxSnapshots,
        autoFlush: opts.autoFlush,
        flushInterval: opts.flushInterval,
        matchHeaders: opts.matchHeaders,
        ignoreHeaders: opts.ignoreHeaders,
        excludeHeaders: opts.excludeHeaders,
        matchBody: opts.matchBody,
        matchQuery: opts.matchQuery,
        caseSensitive: opts.caseSensitive,
        shouldRecord: opts.shouldRecord,
        shouldPlayback: opts.shouldPlayback,
        excludeUrls: opts.excludeUrls
      });
      this[kSnapshotLoaded] = false;
      if (this[kSnapshotMode] === "record" || this[kSnapshotMode] === "update" || this[kSnapshotMode] === "playback" && opts.excludeUrls && opts.excludeUrls.length > 0) {
        this[kRealAgent] = new Agent3(opts);
      }
      if ((this[kSnapshotMode] === "playback" || this[kSnapshotMode] === "update") && this[kSnapshotPath]) {
        this.loadSnapshots().catch(() => {});
      }
    }
    dispatch(opts, handler) {
      handler = WrapHandler.wrap(handler);
      const mode = this[kSnapshotMode];
      if (this[kSnapshotRecorder].isUrlExcluded(opts)) {
        return this[kRealAgent].dispatch(opts, handler);
      }
      if (mode === "playback" || mode === "update") {
        if (!this[kSnapshotLoaded]) {
          return this.#asyncDispatch(opts, handler);
        }
        const snapshot = this[kSnapshotRecorder].findSnapshot(opts);
        if (snapshot) {
          return this.#replaySnapshot(snapshot, handler);
        } else if (mode === "update") {
          return this.#recordAndReplay(opts, handler);
        } else {
          const error49 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`);
          if (handler.onError) {
            handler.onError(error49);
            return;
          }
          throw error49;
        }
      } else if (mode === "record") {
        return this.#recordAndReplay(opts, handler);
      }
    }
    async#asyncDispatch(opts, handler) {
      await this.loadSnapshots();
      return this.dispatch(opts, handler);
    }
    #recordAndReplay(opts, handler) {
      const responseData = {
        statusCode: null,
        headers: {},
        trailers: {},
        body: []
      };
      const self2 = this;
      const recordingHandler = {
        onRequestStart(controller, context10) {
          return handler.onRequestStart(controller, { ...context10, history: this.history });
        },
        onRequestUpgrade(controller, statusCode, headers, socket) {
          return handler.onRequestUpgrade(controller, statusCode, headers, socket);
        },
        onResponseStart(controller, statusCode, headers, statusMessage) {
          responseData.statusCode = statusCode;
          responseData.headers = headers;
          return handler.onResponseStart(controller, statusCode, headers, statusMessage);
        },
        onResponseData(controller, chunk) {
          responseData.body.push(chunk);
          return handler.onResponseData(controller, chunk);
        },
        onResponseEnd(controller, trailers) {
          responseData.trailers = trailers;
          const responseBody = Buffer.concat(responseData.body);
          self2[kSnapshotRecorder].record(opts, {
            statusCode: responseData.statusCode,
            headers: responseData.headers,
            body: responseBody,
            trailers: responseData.trailers
          }).then(() => handler.onResponseEnd(controller, trailers)).catch((error49) => handler.onResponseError(controller, error49));
        }
      };
      const agent2 = this[kRealAgent];
      return agent2.dispatch(opts, recordingHandler);
    }
    #replaySnapshot(snapshot, handler) {
      try {
        const { response } = snapshot;
        const controller = {
          pause() {},
          resume() {},
          abort(reason) {
            this.aborted = true;
            this.reason = reason;
          },
          aborted: false,
          paused: false
        };
        handler.onRequestStart(controller);
        handler.onResponseStart(controller, response.statusCode, response.headers);
        const body2 = Buffer.from(response.body, "base64");
        handler.onResponseData(controller, body2);
        handler.onResponseEnd(controller, response.trailers);
      } catch (error49) {
        handler.onError?.(error49);
      }
    }
    async loadSnapshots(filePath) {
      await this[kSnapshotRecorder].loadSnapshots(filePath || this[kSnapshotPath]);
      this[kSnapshotLoaded] = true;
      if (this[kSnapshotMode] === "playback") {
        this.#setupMockInterceptors();
      }
    }
    async saveSnapshots(filePath) {
      return this[kSnapshotRecorder].saveSnapshots(filePath || this[kSnapshotPath]);
    }
    #setupMockInterceptors() {
      for (const snapshot of this[kSnapshotRecorder].getSnapshots()) {
        const { request: request2, responses, response } = snapshot;
        const url2 = new URL(request2.url);
        const mockPool = this.get(url2.origin);
        const responseData = responses ? responses[0] : response;
        if (!responseData)
          continue;
        mockPool.intercept({
          path: url2.pathname + url2.search,
          method: request2.method,
          headers: request2.headers,
          body: request2.body
        }).reply(responseData.statusCode, responseData.body, {
          headers: responseData.headers,
          trailers: responseData.trailers
        }).persist();
      }
    }
    getRecorder() {
      return this[kSnapshotRecorder];
    }
    getMode() {
      return this[kSnapshotMode];
    }
    clearSnapshots() {
      this[kSnapshotRecorder].clear();
    }
    resetCallCounts() {
      this[kSnapshotRecorder].resetCallCounts();
    }
    deleteSnapshot(requestOpts) {
      return this[kSnapshotRecorder].deleteSnapshot(requestOpts);
    }
    getSnapshotInfo(requestOpts) {
      return this[kSnapshotRecorder].getSnapshotInfo(requestOpts);
    }
    replaceSnapshots(snapshotData) {
      this[kSnapshotRecorder].replaceSnapshots(snapshotData);
    }
    async close() {
      await this[kSnapshotRecorder].close();
      await this[kRealAgent]?.close();
      await super.close();
    }
  }
  module.exports = SnapshotAgent;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/global.js
var require_global2 = __commonJS((exports2, module) => {
  var globalDispatcher = Symbol.for("undici.globalDispatcher.2");
  var legacyGlobalDispatcher = Symbol.for("undici.globalDispatcher.1");
  var { InvalidArgumentError } = require_errors8();
  var Agent3 = require_agent();
  if (getGlobalDispatcher() === undefined) {
    setGlobalDispatcher(new Agent3);
  }
  function setGlobalDispatcher(agent2) {
    if (!agent2 || typeof agent2.dispatch !== "function") {
      throw new InvalidArgumentError("Argument agent must implement Agent");
    }
    Object.defineProperty(globalThis, globalDispatcher, {
      value: agent2,
      writable: true,
      enumerable: false,
      configurable: false
    });
    Object.defineProperty(globalThis, legacyGlobalDispatcher, {
      value: agent2,
      writable: true,
      enumerable: false,
      configurable: false
    });
  }
  function getGlobalDispatcher() {
    return globalThis[legacyGlobalDispatcher];
  }
  var installedExports = [
    "fetch",
    "Headers",
    "Response",
    "Request",
    "FormData",
    "WebSocket",
    "CloseEvent",
    "ErrorEvent",
    "MessageEvent",
    "EventSource"
  ];
  module.exports = {
    setGlobalDispatcher,
    getGlobalDispatcher,
    installedExports
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/decorator-handler.js
var require_decorator_handler = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var WrapHandler = require_wrap_handler();
  module.exports = class DecoratorHandler {
    #handler;
    #onCompleteCalled = false;
    #onErrorCalled = false;
    #onResponseStartCalled = false;
    constructor(handler) {
      if (typeof handler !== "object" || handler === null) {
        throw new TypeError("handler must be an object");
      }
      this.#handler = WrapHandler.wrap(handler);
    }
    onRequestStart(...args) {
      this.#handler.onRequestStart?.(...args);
    }
    onRequestUpgrade(...args) {
      assert2(!this.#onCompleteCalled);
      assert2(!this.#onErrorCalled);
      return this.#handler.onRequestUpgrade?.(...args);
    }
    onResponseStart(...args) {
      assert2(!this.#onCompleteCalled);
      assert2(!this.#onErrorCalled);
      assert2(!this.#onResponseStartCalled);
      this.#onResponseStartCalled = true;
      return this.#handler.onResponseStart?.(...args);
    }
    onResponseData(...args) {
      assert2(!this.#onCompleteCalled);
      assert2(!this.#onErrorCalled);
      return this.#handler.onResponseData?.(...args);
    }
    onResponseEnd(...args) {
      assert2(!this.#onCompleteCalled);
      assert2(!this.#onErrorCalled);
      this.#onCompleteCalled = true;
      return this.#handler.onResponseEnd?.(...args);
    }
    onResponseError(...args) {
      this.#onErrorCalled = true;
      return this.#handler.onResponseError?.(...args);
    }
    onBodySent() {}
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/redirect-handler.js
var require_redirect_handler = __commonJS((exports2, module) => {
  var util3 = require_util3();
  var { kBodyUsed } = require_symbols2();
  var assert2 = __require("node:assert");
  var { InvalidArgumentError } = require_errors8();
  var EE = __require("node:events");
  var redirectableStatusCodes = [300, 301, 302, 303, 307, 308];
  var kBody = Symbol("body");
  var noop2 = () => {};

  class BodyAsyncIterable {
    constructor(body2) {
      this[kBody] = body2;
      this[kBodyUsed] = false;
    }
    async* [Symbol.asyncIterator]() {
      assert2(!this[kBodyUsed], "disturbed");
      this[kBodyUsed] = true;
      yield* this[kBody];
    }
  }

  class RedirectHandler {
    static buildDispatch(dispatcher, maxRedirections) {
      if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {
        throw new InvalidArgumentError("maxRedirections must be a positive number");
      }
      const dispatch = dispatcher.dispatch.bind(dispatcher);
      return (opts, originalHandler) => dispatch(opts, new RedirectHandler(dispatch, maxRedirections, opts, originalHandler));
    }
    constructor(dispatch, maxRedirections, opts, handler) {
      if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {
        throw new InvalidArgumentError("maxRedirections must be a positive number");
      }
      this.dispatch = dispatch;
      this.location = null;
      const { maxRedirections: _6, ...cleanOpts } = opts;
      this.opts = cleanOpts;
      this.maxRedirections = maxRedirections;
      this.handler = handler;
      this.history = [];
      if (util3.isStream(this.opts.body)) {
        if (util3.bodyLength(this.opts.body) === 0) {
          this.opts.body.on("data", function() {
            assert2(false);
          });
        }
        if (typeof this.opts.body.readableDidRead !== "boolean") {
          this.opts.body[kBodyUsed] = false;
          EE.prototype.on.call(this.opts.body, "data", function() {
            this[kBodyUsed] = true;
          });
        }
      } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") {
        this.opts.body = new BodyAsyncIterable(this.opts.body);
      } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util3.isIterable(this.opts.body) && !util3.isFormDataLike(this.opts.body)) {
        this.opts.body = new BodyAsyncIterable(this.opts.body);
      }
    }
    onRequestStart(controller, context10) {
      this.handler.onRequestStart?.(controller, { ...context10, history: this.history });
    }
    onRequestUpgrade(controller, statusCode, headers, socket) {
      this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) {
        throw new Error("max redirects");
      }
      if ((statusCode === 301 || statusCode === 302) && this.opts.method === "POST") {
        this.opts.method = "GET";
        if (util3.isStream(this.opts.body)) {
          util3.destroy(this.opts.body.on("error", noop2));
        }
        this.opts.body = null;
      }
      if (statusCode === 303 && this.opts.method !== "HEAD") {
        this.opts.method = "GET";
        if (util3.isStream(this.opts.body)) {
          util3.destroy(this.opts.body.on("error", noop2));
        }
        this.opts.body = null;
      }
      this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 ? null : headers.location;
      if (this.opts.origin) {
        this.history.push(new URL(this.opts.path, this.opts.origin));
      }
      if (!this.location) {
        this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
        return;
      }
      const { origin, pathname, search } = util3.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
      const path2 = search ? `${pathname}${search}` : pathname;
      const redirectUrlString = `${origin}${path2}`;
      for (const historyUrl of this.history) {
        if (historyUrl.toString() === redirectUrlString) {
          throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
        }
      }
      this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
      this.opts.path = path2;
      this.opts.origin = origin;
      this.opts.query = null;
    }
    onResponseData(controller, chunk) {
      if (this.location) {} else {
        this.handler.onResponseData?.(controller, chunk);
      }
    }
    onResponseEnd(controller, trailers) {
      if (this.location) {
        this.dispatch(this.opts, this);
      } else {
        this.handler.onResponseEnd(controller, trailers);
      }
    }
    onResponseError(controller, error49) {
      this.handler.onResponseError?.(controller, error49);
    }
  }
  function shouldRemoveHeader(header, removeContent, unknownOrigin) {
    if (header.length === 4) {
      return util3.headerNameToString(header) === "host";
    }
    if (removeContent && util3.headerNameToString(header).startsWith("content-")) {
      return true;
    }
    if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {
      const name3 = util3.headerNameToString(header);
      return name3 === "authorization" || name3 === "cookie" || name3 === "proxy-authorization";
    }
    return false;
  }
  function cleanRequestHeaders(headers, removeContent, unknownOrigin) {
    const ret = [];
    if (Array.isArray(headers)) {
      for (let i = 0;i < headers.length; i += 2) {
        if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {
          ret.push(headers[i], headers[i + 1]);
        }
      }
    } else if (headers && typeof headers === "object") {
      const entries = util3.hasSafeIterator(headers) ? headers : Object.entries(headers);
      for (const [key, value] of entries) {
        if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {
          ret.push(key, value);
        }
      }
    } else {
      assert2(headers == null, "headers must be an object or an array");
    }
    return ret;
  }
  module.exports = RedirectHandler;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/redirect.js
var require_redirect = __commonJS((exports2, module) => {
  var RedirectHandler = require_redirect_handler();
  function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections } = {}) {
    return (dispatch) => {
      return function Intercept(opts, handler) {
        const { maxRedirections = defaultMaxRedirections, ...rest } = opts;
        if (maxRedirections == null || maxRedirections === 0) {
          return dispatch(opts, handler);
        }
        const dispatchOpts = { ...rest };
        const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler);
        return dispatch(dispatchOpts, redirectHandler);
      };
    };
  }
  module.exports = createRedirectInterceptor;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/response-error.js
var require_response_error = __commonJS((exports2, module) => {
  var DecoratorHandler = require_decorator_handler();
  var { ResponseError } = require_errors8();

  class ResponseErrorHandler extends DecoratorHandler {
    #statusCode;
    #contentType;
    #decoder;
    #headers;
    #body;
    constructor(_opts, { handler }) {
      super(handler);
    }
    #checkContentType(contentType) {
      return (this.#contentType ?? "").indexOf(contentType) === 0;
    }
    onRequestStart(controller, context10) {
      this.#statusCode = 0;
      this.#contentType = null;
      this.#decoder = null;
      this.#headers = null;
      this.#body = "";
      return super.onRequestStart(controller, context10);
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      this.#statusCode = statusCode;
      this.#headers = headers;
      this.#contentType = headers["content-type"];
      if (this.#statusCode < 400) {
        return super.onResponseStart(controller, statusCode, headers, statusMessage);
      }
      if (this.#checkContentType("application/json") || this.#checkContentType("text/plain")) {
        this.#decoder = new TextDecoder("utf-8");
      }
    }
    onResponseData(controller, chunk) {
      if (this.#statusCode < 400) {
        return super.onResponseData(controller, chunk);
      }
      this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? "";
    }
    onResponseEnd(controller, trailers) {
      if (this.#statusCode >= 400) {
        this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? "";
        if (this.#checkContentType("application/json")) {
          try {
            this.#body = JSON.parse(this.#body);
          } catch {}
        }
        let err;
        const stackTraceLimit = Error.stackTraceLimit;
        Error.stackTraceLimit = 0;
        try {
          err = new ResponseError("Response Error", this.#statusCode, {
            body: this.#body,
            headers: this.#headers
          });
        } finally {
          Error.stackTraceLimit = stackTraceLimit;
        }
        super.onResponseError(controller, err);
      } else {
        super.onResponseEnd(controller, trailers);
      }
    }
    onResponseError(controller, err) {
      super.onResponseError(controller, err);
    }
  }
  module.exports = () => {
    return (dispatch) => {
      return function Intercept(opts, handler) {
        return dispatch(opts, new ResponseErrorHandler(opts, { handler }));
      };
    };
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/retry.js
var require_retry2 = __commonJS((exports2, module) => {
  var RetryHandler = require_retry_handler();
  module.exports = (globalOpts) => {
    return (dispatch) => {
      return function retryInterceptor(opts, handler) {
        return dispatch(opts, new RetryHandler({ ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, {
          handler,
          dispatch
        }));
      };
    };
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/dump.js
var require_dump = __commonJS((exports2, module) => {
  var { InvalidArgumentError, RequestAbortedError } = require_errors8();
  var DecoratorHandler = require_decorator_handler();

  class DumpHandler extends DecoratorHandler {
    #maxSize = 1024 * 1024;
    #dumped = false;
    #size = 0;
    #controller = null;
    aborted = false;
    reason = false;
    constructor({ maxSize, signal }, handler) {
      if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) {
        throw new InvalidArgumentError("maxSize must be a number greater than 0");
      }
      super(handler);
      this.#maxSize = maxSize ?? this.#maxSize;
    }
    #abort(reason) {
      this.aborted = true;
      this.reason = reason;
    }
    onRequestStart(controller, context10) {
      controller.abort = this.#abort.bind(this);
      this.#controller = controller;
      return super.onRequestStart(controller, context10);
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      const contentLength = headers["content-length"];
      if (contentLength != null && contentLength > this.#maxSize) {
        throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`);
      }
      if (this.aborted === true) {
        return true;
      }
      return super.onResponseStart(controller, statusCode, headers, statusMessage);
    }
    onResponseError(controller, err) {
      if (this.#dumped) {
        return;
      }
      err = this.#controller?.reason ?? err;
      super.onResponseError(controller, err);
    }
    onResponseData(controller, chunk) {
      this.#size = this.#size + chunk.length;
      if (this.#size >= this.#maxSize) {
        this.#dumped = true;
        if (this.aborted === true) {
          super.onResponseError(controller, this.reason);
        } else {
          super.onResponseEnd(controller, {});
        }
      }
      return true;
    }
    onResponseEnd(controller, trailers) {
      if (this.#dumped) {
        return;
      }
      if (this.#controller.aborted === true) {
        super.onResponseError(controller, this.reason);
        return;
      }
      super.onResponseEnd(controller, trailers);
    }
  }
  function createDumpInterceptor({ maxSize: defaultMaxSize } = {
    maxSize: 1024 * 1024
  }) {
    return (dispatch) => {
      return function Intercept(opts, handler) {
        const { dumpMaxSize = defaultMaxSize } = opts;
        const dumpHandler = new DumpHandler({ maxSize: dumpMaxSize, signal: opts.signal }, handler);
        return dispatch(opts, dumpHandler);
      };
    };
  }
  module.exports = createDumpInterceptor;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/dns.js
var require_dns = __commonJS((exports2, module) => {
  var { isIP: isIP3 } = __require("node:net");
  var { lookup } = __require("node:dns");
  var DecoratorHandler = require_decorator_handler();
  var { InvalidArgumentError, InformationalError } = require_errors8();
  var maxInt = Math.pow(2, 31) - 1;
  function hasSafeIterator(headers) {
    const prototype = Object.getPrototypeOf(headers);
    const ownIterator = Object.prototype.hasOwnProperty.call(headers, Symbol.iterator);
    return ownIterator || prototype != null && prototype !== Object.prototype && typeof headers[Symbol.iterator] === "function";
  }
  function isHostHeader(key) {
    return typeof key === "string" && key.toLowerCase() === "host";
  }
  function normalizeHeaders(headers) {
    if (headers == null) {
      return null;
    }
    if (Array.isArray(headers)) {
      if (headers.length === 0 || !Array.isArray(headers[0])) {
        return headers;
      }
      const normalized = [];
      for (const header of headers) {
        if (Array.isArray(header) && header.length === 2) {
          normalized.push(header[0], header[1]);
        } else {
          normalized.push(header);
        }
      }
      return normalized;
    }
    if (typeof headers === "object" && hasSafeIterator(headers)) {
      const normalized = [];
      for (const header of headers) {
        if (Array.isArray(header) && header.length === 2) {
          normalized.push(header[0], header[1]);
        } else {
          normalized.push(header);
        }
      }
      return normalized;
    }
    return headers;
  }
  function hasHostHeader(headers) {
    if (headers == null) {
      return false;
    }
    if (Array.isArray(headers)) {
      if (headers.length === 0) {
        return false;
      }
      for (let i = 0;i < headers.length; i += 2) {
        if (isHostHeader(headers[i])) {
          return true;
        }
      }
      return false;
    }
    if (typeof headers === "object") {
      for (const key in headers) {
        if (isHostHeader(key)) {
          return true;
        }
      }
    }
    return false;
  }
  function withHostHeader(host, headers) {
    const normalizedHeaders = normalizeHeaders(headers);
    if (hasHostHeader(normalizedHeaders)) {
      return normalizedHeaders;
    }
    if (Array.isArray(normalizedHeaders)) {
      return ["host", host, ...normalizedHeaders];
    }
    if (normalizedHeaders && typeof normalizedHeaders === "object") {
      return {
        host,
        ...normalizedHeaders
      };
    }
    return { host };
  }

  class DNSStorage {
    #maxItems = 0;
    #records = new Map;
    constructor(opts) {
      this.#maxItems = opts.maxItems;
    }
    get size() {
      return this.#records.size;
    }
    get(hostname4) {
      return this.#records.get(hostname4) ?? null;
    }
    set(hostname4, records) {
      this.#records.set(hostname4, records);
    }
    delete(hostname4) {
      this.#records.delete(hostname4);
    }
    full() {
      return this.size >= this.#maxItems;
    }
  }

  class DNSInstance {
    #maxTTL = 0;
    #maxItems = 0;
    dualStack = true;
    affinity = null;
    lookup = null;
    pick = null;
    storage = null;
    constructor(opts) {
      this.#maxTTL = opts.maxTTL;
      this.#maxItems = opts.maxItems;
      this.dualStack = opts.dualStack;
      this.affinity = opts.affinity;
      this.lookup = opts.lookup ?? this.#defaultLookup;
      this.pick = opts.pick ?? this.#defaultPick;
      this.storage = opts.storage ?? new DNSStorage(opts);
    }
    runLookup(origin, opts, cb2) {
      const ips = this.storage.get(origin.hostname);
      if (ips == null && this.storage.full()) {
        cb2(null, origin);
        return;
      }
      const newOpts = {
        affinity: this.affinity,
        dualStack: this.dualStack,
        lookup: this.lookup,
        pick: this.pick,
        ...opts.dns,
        maxTTL: this.#maxTTL,
        maxItems: this.#maxItems
      };
      if (ips == null) {
        this.lookup(origin, newOpts, (err, addresses) => {
          if (err || addresses == null || addresses.length === 0) {
            cb2(err ?? new InformationalError("No DNS entries found"));
            return;
          }
          this.setRecords(origin, addresses);
          const records = this.storage.get(origin.hostname);
          const ip = this.pick(origin, records, newOpts.affinity);
          let port;
          if (typeof ip.port === "number") {
            port = `:${ip.port}`;
          } else if (origin.port !== "") {
            port = `:${origin.port}`;
          } else {
            port = "";
          }
          cb2(null, new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`));
        });
      } else {
        const ip = this.pick(origin, ips, newOpts.affinity);
        if (ip == null) {
          this.storage.delete(origin.hostname);
          this.runLookup(origin, opts, cb2);
          return;
        }
        let port;
        if (typeof ip.port === "number") {
          port = `:${ip.port}`;
        } else if (origin.port !== "") {
          port = `:${origin.port}`;
        } else {
          port = "";
        }
        cb2(null, new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`));
      }
    }
    #defaultLookup(origin, opts, cb2) {
      lookup(origin.hostname, {
        all: true,
        family: this.dualStack === false ? this.affinity : 0,
        order: "ipv4first"
      }, (err, addresses) => {
        if (err) {
          return cb2(err);
        }
        const results = new Map;
        for (const addr of addresses) {
          results.set(`${addr.address}:${addr.family}`, addr);
        }
        cb2(null, results.values());
      });
    }
    #defaultPick(origin, hostnameRecords, affinity) {
      let ip = null;
      const { records, offset } = hostnameRecords;
      let family;
      if (this.dualStack) {
        if (affinity == null) {
          if (offset == null || offset === maxInt) {
            hostnameRecords.offset = 0;
            affinity = 4;
          } else {
            hostnameRecords.offset++;
            affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4;
          }
        }
        if (records[affinity] != null && records[affinity].ips.length > 0) {
          family = records[affinity];
        } else {
          family = records[affinity === 4 ? 6 : 4];
        }
      } else {
        family = records[affinity];
      }
      if (family == null || family.ips.length === 0) {
        return ip;
      }
      if (family.offset == null || family.offset === maxInt) {
        family.offset = 0;
      } else {
        family.offset++;
      }
      const position = family.offset % family.ips.length;
      ip = family.ips[position] ?? null;
      if (ip == null) {
        return ip;
      }
      if (Date.now() - ip.timestamp > ip.ttl) {
        family.ips.splice(position, 1);
        return this.pick(origin, hostnameRecords, affinity);
      }
      return ip;
    }
    pickFamily(origin, ipFamily) {
      const records = this.storage.get(origin.hostname)?.records;
      if (!records) {
        return null;
      }
      const family = records[ipFamily];
      if (!family) {
        return null;
      }
      if (family.offset == null || family.offset === maxInt) {
        family.offset = 0;
      } else {
        family.offset++;
      }
      const position = family.offset % family.ips.length;
      const ip = family.ips[position] ?? null;
      if (ip == null) {
        return ip;
      }
      if (Date.now() - ip.timestamp > ip.ttl) {
        family.ips.splice(position, 1);
      }
      return ip;
    }
    setRecords(origin, addresses) {
      const timestamp2 = Date.now();
      const records = { records: { 4: null, 6: null } };
      let minTTL = this.#maxTTL;
      for (const record2 of addresses) {
        record2.timestamp = timestamp2;
        if (typeof record2.ttl === "number") {
          record2.ttl = Math.min(record2.ttl, this.#maxTTL);
          minTTL = Math.min(minTTL, record2.ttl);
        } else {
          record2.ttl = this.#maxTTL;
        }
        const familyRecords = records.records[record2.family] ?? { ips: [] };
        familyRecords.ips.push(record2);
        records.records[record2.family] = familyRecords;
      }
      this.storage.set(origin.hostname, records, { ttl: minTTL });
    }
    deleteRecords(origin) {
      this.storage.delete(origin.hostname);
    }
    getHandler(meta3, opts) {
      return new DNSDispatchHandler(this, meta3, opts);
    }
  }

  class DNSDispatchHandler extends DecoratorHandler {
    #state = null;
    #opts = null;
    #dispatch = null;
    #origin = null;
    #controller = null;
    #newOrigin = null;
    #firstTry = true;
    constructor(state, { origin, handler, dispatch, newOrigin }, opts) {
      super(handler);
      this.#origin = origin;
      this.#newOrigin = newOrigin;
      this.#opts = { ...opts };
      this.#state = state;
      this.#dispatch = dispatch;
    }
    onResponseError(controller, err) {
      switch (err.code) {
        case "ETIMEDOUT":
        case "ECONNREFUSED": {
          if (this.#state.dualStack) {
            if (!this.#firstTry) {
              super.onResponseError(controller, err);
              return;
            }
            this.#firstTry = false;
            const otherFamily = this.#newOrigin.hostname[0] === "[" ? 4 : 6;
            const ip = this.#state.pickFamily(this.#origin, otherFamily);
            if (ip == null) {
              super.onResponseError(controller, err);
              return;
            }
            let port;
            if (typeof ip.port === "number") {
              port = `:${ip.port}`;
            } else if (this.#origin.port !== "") {
              port = `:${this.#origin.port}`;
            } else {
              port = "";
            }
            const dispatchOpts = {
              ...this.#opts,
              origin: `${this.#origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`,
              headers: withHostHeader(this.#origin.host, this.#opts.headers)
            };
            this.#dispatch(dispatchOpts, this);
            return;
          }
          super.onResponseError(controller, err);
          break;
        }
        case "ENOTFOUND":
          this.#state.deleteRecords(this.#origin);
          super.onResponseError(controller, err);
          break;
        default:
          super.onResponseError(controller, err);
          break;
      }
    }
  }
  module.exports = (interceptorOpts) => {
    if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) {
      throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number");
    }
    if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) {
      throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero");
    }
    if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) {
      throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6");
    }
    if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") {
      throw new InvalidArgumentError("Invalid dualStack. Must be a boolean");
    }
    if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") {
      throw new InvalidArgumentError("Invalid lookup. Must be a function");
    }
    if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") {
      throw new InvalidArgumentError("Invalid pick. Must be a function");
    }
    if (interceptorOpts?.storage != null && (typeof interceptorOpts?.storage?.get !== "function" || typeof interceptorOpts?.storage?.set !== "function" || typeof interceptorOpts?.storage?.full !== "function" || typeof interceptorOpts?.storage?.delete !== "function")) {
      throw new InvalidArgumentError("Invalid storage. Must be a object with methods: { get, set, full, delete }");
    }
    const dualStack = interceptorOpts?.dualStack ?? true;
    let affinity;
    if (dualStack) {
      affinity = interceptorOpts?.affinity ?? null;
    } else {
      affinity = interceptorOpts?.affinity ?? 4;
    }
    const opts = {
      maxTTL: interceptorOpts?.maxTTL ?? 1e4,
      lookup: interceptorOpts?.lookup ?? null,
      pick: interceptorOpts?.pick ?? null,
      dualStack,
      affinity,
      maxItems: interceptorOpts?.maxItems ?? Infinity,
      storage: interceptorOpts?.storage
    };
    const instance = new DNSInstance(opts);
    return (dispatch) => {
      return function dnsInterceptor(origDispatchOpts, handler) {
        const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin);
        if (isIP3(origin.hostname) !== 0) {
          return dispatch(origDispatchOpts, handler);
        }
        instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {
          if (err) {
            return handler.onResponseError(null, err);
          }
          const dispatchOpts = {
            ...origDispatchOpts,
            servername: origin.hostname,
            origin: newOrigin.origin,
            headers: withHostHeader(origin.host, origDispatchOpts.headers)
          };
          dispatch(dispatchOpts, instance.getHandler({ origin, dispatch, handler, newOrigin }, origDispatchOpts));
        });
        return true;
      };
    };
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/util/cache.js
var require_cache = __commonJS((exports2, module) => {
  var {
    safeHTTPMethods,
    pathHasQueryOrFragment,
    hasSafeIterator
  } = require_util3();
  var { serializePathWithQuery } = require_util3();
  function makeCacheKey(opts) {
    if (!opts.origin) {
      throw new Error("opts.origin is undefined");
    }
    let fullPath = opts.path || "/";
    if (opts.query && !pathHasQueryOrFragment(fullPath)) {
      fullPath = serializePathWithQuery(fullPath, opts.query);
    }
    return {
      origin: opts.origin.toString(),
      method: opts.method,
      path: fullPath,
      headers: opts.headers
    };
  }
  function normalizeHeaders(opts) {
    let headers;
    if (opts.headers == null) {
      headers = {};
    } else if (typeof opts.headers === "object") {
      headers = {};
      if (hasSafeIterator(opts.headers)) {
        for (const x4 of opts.headers) {
          if (!Array.isArray(x4)) {
            throw new Error("opts.headers is not a valid header map");
          }
          const [key, val] = x4;
          if (typeof key !== "string" || typeof val !== "string") {
            throw new Error("opts.headers is not a valid header map");
          }
          headers[key.toLowerCase()] = val;
        }
      } else {
        for (const key of Object.keys(opts.headers)) {
          headers[key.toLowerCase()] = opts.headers[key];
        }
      }
    } else {
      throw new Error("opts.headers is not an object");
    }
    return headers;
  }
  function assertCacheKey(key) {
    if (typeof key !== "object") {
      throw new TypeError(`expected key to be object, got ${typeof key}`);
    }
    for (const property2 of ["origin", "method", "path"]) {
      if (typeof key[property2] !== "string") {
        throw new TypeError(`expected key.${property2} to be string, got ${typeof key[property2]}`);
      }
    }
    if (key.headers !== undefined && typeof key.headers !== "object") {
      throw new TypeError(`expected headers to be object, got ${typeof key}`);
    }
  }
  function assertCacheValue(value) {
    if (typeof value !== "object") {
      throw new TypeError(`expected value to be object, got ${typeof value}`);
    }
    for (const property2 of ["statusCode", "cachedAt", "staleAt", "deleteAt"]) {
      if (typeof value[property2] !== "number") {
        throw new TypeError(`expected value.${property2} to be number, got ${typeof value[property2]}`);
      }
    }
    if (typeof value.statusMessage !== "string") {
      throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`);
    }
    if (value.headers != null && typeof value.headers !== "object") {
      throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`);
    }
    if (value.vary !== undefined && typeof value.vary !== "object") {
      throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`);
    }
    if (value.etag !== undefined && typeof value.etag !== "string") {
      throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`);
    }
  }
  function parseCacheControlHeader(header) {
    const output = {};
    let directives;
    if (Array.isArray(header)) {
      directives = [];
      for (const directive of header) {
        directives.push(...directive.split(","));
      }
    } else {
      directives = header.split(",");
    }
    for (let i = 0;i < directives.length; i++) {
      const directive = directives[i].toLowerCase();
      const keyValueDelimiter = directive.indexOf("=");
      let key;
      let value;
      if (keyValueDelimiter !== -1) {
        key = directive.substring(0, keyValueDelimiter).trimStart();
        value = directive.substring(keyValueDelimiter + 1);
      } else {
        key = directive.trim();
      }
      switch (key) {
        case "min-fresh":
        case "max-stale":
        case "max-age":
        case "s-maxage":
        case "stale-while-revalidate":
        case "stale-if-error": {
          if (value === undefined || value[0] === " ") {
            continue;
          }
          if (value.length >= 2 && value[0] === '"' && value[value.length - 1] === '"') {
            value = value.substring(1, value.length - 1);
          }
          const parsedValue = parseInt(value, 10);
          if (parsedValue !== parsedValue) {
            continue;
          }
          if (key === "max-age" && key in output && output[key] >= parsedValue) {
            continue;
          }
          output[key] = parsedValue;
          break;
        }
        case "private":
        case "no-cache": {
          if (value) {
            if (value[0] === '"') {
              const headers = [value.substring(1)];
              let foundEndingQuote = value[value.length - 1] === '"';
              if (!foundEndingQuote) {
                for (let j4 = i + 1;j4 < directives.length; j4++) {
                  const nextPart = directives[j4];
                  const nextPartLength = nextPart.length;
                  headers.push(nextPart.trim());
                  if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '"') {
                    foundEndingQuote = true;
                    break;
                  }
                }
              }
              if (foundEndingQuote) {
                let lastHeader = headers[headers.length - 1];
                if (lastHeader[lastHeader.length - 1] === '"') {
                  lastHeader = lastHeader.substring(0, lastHeader.length - 1);
                  headers[headers.length - 1] = lastHeader;
                }
                for (let j4 = 0;j4 < headers.length; j4++) {
                  headers[j4] = headers[j4].trim();
                }
                if (key in output) {
                  output[key] = output[key].concat(headers);
                } else {
                  output[key] = headers;
                }
              }
            } else {
              const fieldName = value.trim();
              if (key in output) {
                output[key] = output[key].concat(fieldName);
              } else {
                output[key] = [fieldName];
              }
            }
            break;
          }
        }
        case "public":
        case "no-store":
        case "must-revalidate":
        case "proxy-revalidate":
        case "immutable":
        case "no-transform":
        case "must-understand":
        case "only-if-cached":
          if (value) {
            continue;
          }
          output[key] = true;
          break;
        default:
          continue;
      }
    }
    return output;
  }
  function parseVaryHeader(varyHeader, headers) {
    if (typeof varyHeader === "string" && varyHeader.includes("*")) {
      return headers;
    }
    const output = {};
    const varyingHeaders = typeof varyHeader === "string" ? varyHeader.split(",") : varyHeader;
    for (const header of varyingHeaders) {
      const trimmedHeader = header.trim().toLowerCase();
      output[trimmedHeader] = headers[trimmedHeader] ?? null;
    }
    return output;
  }
  function isEtagUsable(etag) {
    if (etag.length <= 2) {
      return false;
    }
    if (etag[0] === '"' && etag[etag.length - 1] === '"') {
      return !(etag[1] === '"' || etag.startsWith('"W/'));
    }
    if (etag.startsWith('W/"') && etag[etag.length - 1] === '"') {
      return etag.length !== 4;
    }
    return false;
  }
  function assertCacheStore(store, name3 = "CacheStore") {
    if (typeof store !== "object" || store === null) {
      throw new TypeError(`expected type of ${name3} to be a CacheStore, got ${store === null ? "null" : typeof store}`);
    }
    for (const fn3 of ["get", "createWriteStream", "delete"]) {
      if (typeof store[fn3] !== "function") {
        throw new TypeError(`${name3} needs to have a \`${fn3}()\` function`);
      }
    }
  }
  function assertCacheMethods(methods, name3 = "CacheMethods") {
    if (!Array.isArray(methods)) {
      throw new TypeError(`expected type of ${name3} needs to be an array, got ${methods === null ? "null" : typeof methods}`);
    }
    if (methods.length === 0) {
      throw new TypeError(`${name3} needs to have at least one method`);
    }
    for (const method of methods) {
      if (!safeHTTPMethods.includes(method)) {
        throw new TypeError(`element of ${name3}-array needs to be one of following values: ${safeHTTPMethods.join(", ")}, got ${method}`);
      }
    }
  }
  function makeDeduplicationKey(cacheKey, excludeHeaders) {
    const headers = {};
    if (cacheKey.headers) {
      const sortedHeaders = Object.keys(cacheKey.headers).sort();
      for (const header of sortedHeaders) {
        if (excludeHeaders?.has(header.toLowerCase())) {
          continue;
        }
        headers[header] = cacheKey.headers[header];
      }
    }
    return JSON.stringify([cacheKey.origin, cacheKey.method, cacheKey.path, headers]);
  }
  module.exports = {
    makeCacheKey,
    normalizeHeaders,
    assertCacheKey,
    assertCacheValue,
    parseCacheControlHeader,
    parseVaryHeader,
    isEtagUsable,
    assertCacheMethods,
    assertCacheStore,
    makeDeduplicationKey
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/util/date.js
var require_date = __commonJS((exports2, module) => {
  function parseHttpDate(date6) {
    switch (date6[3]) {
      case ",":
        return parseImfDate(date6);
      case " ":
        return parseAscTimeDate(date6);
      default:
        return parseRfc850Date(date6);
    }
  }
  function parseImfDate(date6) {
    if (date6.length !== 29 || date6[4] !== " " || date6[7] !== " " || date6[11] !== " " || date6[16] !== " " || date6[19] !== ":" || date6[22] !== ":" || date6[25] !== " " || date6[26] !== "G" || date6[27] !== "M" || date6[28] !== "T") {
      return;
    }
    let weekday = -1;
    if (date6[0] === "S" && date6[1] === "u" && date6[2] === "n") {
      weekday = 0;
    } else if (date6[0] === "M" && date6[1] === "o" && date6[2] === "n") {
      weekday = 1;
    } else if (date6[0] === "T" && date6[1] === "u" && date6[2] === "e") {
      weekday = 2;
    } else if (date6[0] === "W" && date6[1] === "e" && date6[2] === "d") {
      weekday = 3;
    } else if (date6[0] === "T" && date6[1] === "h" && date6[2] === "u") {
      weekday = 4;
    } else if (date6[0] === "F" && date6[1] === "r" && date6[2] === "i") {
      weekday = 5;
    } else if (date6[0] === "S" && date6[1] === "a" && date6[2] === "t") {
      weekday = 6;
    } else {
      return;
    }
    let day2 = 0;
    if (date6[5] === "0") {
      const code2 = date6.charCodeAt(6);
      if (code2 < 49 || code2 > 57) {
        return;
      }
      day2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(5);
      if (code1 < 49 || code1 > 51) {
        return;
      }
      const code2 = date6.charCodeAt(6);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      day2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let monthIdx = -1;
    if (date6[8] === "J" && date6[9] === "a" && date6[10] === "n") {
      monthIdx = 0;
    } else if (date6[8] === "F" && date6[9] === "e" && date6[10] === "b") {
      monthIdx = 1;
    } else if (date6[8] === "M" && date6[9] === "a") {
      if (date6[10] === "r") {
        monthIdx = 2;
      } else if (date6[10] === "y") {
        monthIdx = 4;
      } else {
        return;
      }
    } else if (date6[8] === "J") {
      if (date6[9] === "a" && date6[10] === "n") {
        monthIdx = 0;
      } else if (date6[9] === "u") {
        if (date6[10] === "n") {
          monthIdx = 5;
        } else if (date6[10] === "l") {
          monthIdx = 6;
        } else {
          return;
        }
      } else {
        return;
      }
    } else if (date6[8] === "A") {
      if (date6[9] === "p" && date6[10] === "r") {
        monthIdx = 3;
      } else if (date6[9] === "u" && date6[10] === "g") {
        monthIdx = 7;
      } else {
        return;
      }
    } else if (date6[8] === "S" && date6[9] === "e" && date6[10] === "p") {
      monthIdx = 8;
    } else if (date6[8] === "O" && date6[9] === "c" && date6[10] === "t") {
      monthIdx = 9;
    } else if (date6[8] === "N" && date6[9] === "o" && date6[10] === "v") {
      monthIdx = 10;
    } else if (date6[8] === "D" && date6[9] === "e" && date6[10] === "c") {
      monthIdx = 11;
    } else {
      return;
    }
    const yearDigit1 = date6.charCodeAt(12);
    if (yearDigit1 < 48 || yearDigit1 > 57) {
      return;
    }
    const yearDigit2 = date6.charCodeAt(13);
    if (yearDigit2 < 48 || yearDigit2 > 57) {
      return;
    }
    const yearDigit3 = date6.charCodeAt(14);
    if (yearDigit3 < 48 || yearDigit3 > 57) {
      return;
    }
    const yearDigit4 = date6.charCodeAt(15);
    if (yearDigit4 < 48 || yearDigit4 > 57) {
      return;
    }
    const year2 = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48);
    let hour2 = 0;
    if (date6[17] === "0") {
      const code2 = date6.charCodeAt(18);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      hour2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(17);
      if (code1 < 48 || code1 > 50) {
        return;
      }
      const code2 = date6.charCodeAt(18);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      if (code1 === 50 && code2 > 51) {
        return;
      }
      hour2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let minute2 = 0;
    if (date6[20] === "0") {
      const code2 = date6.charCodeAt(21);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      minute2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(20);
      if (code1 < 48 || code1 > 53) {
        return;
      }
      const code2 = date6.charCodeAt(21);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      minute2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let second = 0;
    if (date6[23] === "0") {
      const code2 = date6.charCodeAt(24);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      second = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(23);
      if (code1 < 48 || code1 > 53) {
        return;
      }
      const code2 = date6.charCodeAt(24);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      second = (code1 - 48) * 10 + (code2 - 48);
    }
    const result = new Date(Date.UTC(year2, monthIdx, day2, hour2, minute2, second));
    return result.getUTCDay() === weekday ? result : undefined;
  }
  function parseAscTimeDate(date6) {
    if (date6.length !== 24 || date6[7] !== " " || date6[10] !== " " || date6[19] !== " ") {
      return;
    }
    let weekday = -1;
    if (date6[0] === "S" && date6[1] === "u" && date6[2] === "n") {
      weekday = 0;
    } else if (date6[0] === "M" && date6[1] === "o" && date6[2] === "n") {
      weekday = 1;
    } else if (date6[0] === "T" && date6[1] === "u" && date6[2] === "e") {
      weekday = 2;
    } else if (date6[0] === "W" && date6[1] === "e" && date6[2] === "d") {
      weekday = 3;
    } else if (date6[0] === "T" && date6[1] === "h" && date6[2] === "u") {
      weekday = 4;
    } else if (date6[0] === "F" && date6[1] === "r" && date6[2] === "i") {
      weekday = 5;
    } else if (date6[0] === "S" && date6[1] === "a" && date6[2] === "t") {
      weekday = 6;
    } else {
      return;
    }
    let monthIdx = -1;
    if (date6[4] === "J" && date6[5] === "a" && date6[6] === "n") {
      monthIdx = 0;
    } else if (date6[4] === "F" && date6[5] === "e" && date6[6] === "b") {
      monthIdx = 1;
    } else if (date6[4] === "M" && date6[5] === "a") {
      if (date6[6] === "r") {
        monthIdx = 2;
      } else if (date6[6] === "y") {
        monthIdx = 4;
      } else {
        return;
      }
    } else if (date6[4] === "J") {
      if (date6[5] === "a" && date6[6] === "n") {
        monthIdx = 0;
      } else if (date6[5] === "u") {
        if (date6[6] === "n") {
          monthIdx = 5;
        } else if (date6[6] === "l") {
          monthIdx = 6;
        } else {
          return;
        }
      } else {
        return;
      }
    } else if (date6[4] === "A") {
      if (date6[5] === "p" && date6[6] === "r") {
        monthIdx = 3;
      } else if (date6[5] === "u" && date6[6] === "g") {
        monthIdx = 7;
      } else {
        return;
      }
    } else if (date6[4] === "S" && date6[5] === "e" && date6[6] === "p") {
      monthIdx = 8;
    } else if (date6[4] === "O" && date6[5] === "c" && date6[6] === "t") {
      monthIdx = 9;
    } else if (date6[4] === "N" && date6[5] === "o" && date6[6] === "v") {
      monthIdx = 10;
    } else if (date6[4] === "D" && date6[5] === "e" && date6[6] === "c") {
      monthIdx = 11;
    } else {
      return;
    }
    let day2 = 0;
    if (date6[8] === " ") {
      const code2 = date6.charCodeAt(9);
      if (code2 < 49 || code2 > 57) {
        return;
      }
      day2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(8);
      if (code1 < 49 || code1 > 51) {
        return;
      }
      const code2 = date6.charCodeAt(9);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      day2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let hour2 = 0;
    if (date6[11] === "0") {
      const code2 = date6.charCodeAt(12);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      hour2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(11);
      if (code1 < 48 || code1 > 50) {
        return;
      }
      const code2 = date6.charCodeAt(12);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      if (code1 === 50 && code2 > 51) {
        return;
      }
      hour2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let minute2 = 0;
    if (date6[14] === "0") {
      const code2 = date6.charCodeAt(15);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      minute2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(14);
      if (code1 < 48 || code1 > 53) {
        return;
      }
      const code2 = date6.charCodeAt(15);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      minute2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let second = 0;
    if (date6[17] === "0") {
      const code2 = date6.charCodeAt(18);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      second = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(17);
      if (code1 < 48 || code1 > 53) {
        return;
      }
      const code2 = date6.charCodeAt(18);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      second = (code1 - 48) * 10 + (code2 - 48);
    }
    const yearDigit1 = date6.charCodeAt(20);
    if (yearDigit1 < 48 || yearDigit1 > 57) {
      return;
    }
    const yearDigit2 = date6.charCodeAt(21);
    if (yearDigit2 < 48 || yearDigit2 > 57) {
      return;
    }
    const yearDigit3 = date6.charCodeAt(22);
    if (yearDigit3 < 48 || yearDigit3 > 57) {
      return;
    }
    const yearDigit4 = date6.charCodeAt(23);
    if (yearDigit4 < 48 || yearDigit4 > 57) {
      return;
    }
    const year2 = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48);
    const result = new Date(Date.UTC(year2, monthIdx, day2, hour2, minute2, second));
    return result.getUTCDay() === weekday ? result : undefined;
  }
  function parseRfc850Date(date6) {
    let commaIndex = -1;
    let weekday = -1;
    if (date6[0] === "S") {
      if (date6[1] === "u" && date6[2] === "n" && date6[3] === "d" && date6[4] === "a" && date6[5] === "y") {
        weekday = 0;
        commaIndex = 6;
      } else if (date6[1] === "a" && date6[2] === "t" && date6[3] === "u" && date6[4] === "r" && date6[5] === "d" && date6[6] === "a" && date6[7] === "y") {
        weekday = 6;
        commaIndex = 8;
      }
    } else if (date6[0] === "M" && date6[1] === "o" && date6[2] === "n" && date6[3] === "d" && date6[4] === "a" && date6[5] === "y") {
      weekday = 1;
      commaIndex = 6;
    } else if (date6[0] === "T") {
      if (date6[1] === "u" && date6[2] === "e" && date6[3] === "s" && date6[4] === "d" && date6[5] === "a" && date6[6] === "y") {
        weekday = 2;
        commaIndex = 7;
      } else if (date6[1] === "h" && date6[2] === "u" && date6[3] === "r" && date6[4] === "s" && date6[5] === "d" && date6[6] === "a" && date6[7] === "y") {
        weekday = 4;
        commaIndex = 8;
      }
    } else if (date6[0] === "W" && date6[1] === "e" && date6[2] === "d" && date6[3] === "n" && date6[4] === "e" && date6[5] === "s" && date6[6] === "d" && date6[7] === "a" && date6[8] === "y") {
      weekday = 3;
      commaIndex = 9;
    } else if (date6[0] === "F" && date6[1] === "r" && date6[2] === "i" && date6[3] === "d" && date6[4] === "a" && date6[5] === "y") {
      weekday = 5;
      commaIndex = 6;
    } else {
      return;
    }
    if (date6[commaIndex] !== "," || date6.length - commaIndex - 1 !== 23 || date6[commaIndex + 1] !== " " || date6[commaIndex + 4] !== "-" || date6[commaIndex + 8] !== "-" || date6[commaIndex + 11] !== " " || date6[commaIndex + 14] !== ":" || date6[commaIndex + 17] !== ":" || date6[commaIndex + 20] !== " " || date6[commaIndex + 21] !== "G" || date6[commaIndex + 22] !== "M" || date6[commaIndex + 23] !== "T") {
      return;
    }
    let day2 = 0;
    if (date6[commaIndex + 2] === "0") {
      const code2 = date6.charCodeAt(commaIndex + 3);
      if (code2 < 49 || code2 > 57) {
        return;
      }
      day2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(commaIndex + 2);
      if (code1 < 49 || code1 > 51) {
        return;
      }
      const code2 = date6.charCodeAt(commaIndex + 3);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      day2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let monthIdx = -1;
    if (date6[commaIndex + 5] === "J" && date6[commaIndex + 6] === "a" && date6[commaIndex + 7] === "n") {
      monthIdx = 0;
    } else if (date6[commaIndex + 5] === "F" && date6[commaIndex + 6] === "e" && date6[commaIndex + 7] === "b") {
      monthIdx = 1;
    } else if (date6[commaIndex + 5] === "M" && date6[commaIndex + 6] === "a" && date6[commaIndex + 7] === "r") {
      monthIdx = 2;
    } else if (date6[commaIndex + 5] === "A" && date6[commaIndex + 6] === "p" && date6[commaIndex + 7] === "r") {
      monthIdx = 3;
    } else if (date6[commaIndex + 5] === "M" && date6[commaIndex + 6] === "a" && date6[commaIndex + 7] === "y") {
      monthIdx = 4;
    } else if (date6[commaIndex + 5] === "J" && date6[commaIndex + 6] === "u" && date6[commaIndex + 7] === "n") {
      monthIdx = 5;
    } else if (date6[commaIndex + 5] === "J" && date6[commaIndex + 6] === "u" && date6[commaIndex + 7] === "l") {
      monthIdx = 6;
    } else if (date6[commaIndex + 5] === "A" && date6[commaIndex + 6] === "u" && date6[commaIndex + 7] === "g") {
      monthIdx = 7;
    } else if (date6[commaIndex + 5] === "S" && date6[commaIndex + 6] === "e" && date6[commaIndex + 7] === "p") {
      monthIdx = 8;
    } else if (date6[commaIndex + 5] === "O" && date6[commaIndex + 6] === "c" && date6[commaIndex + 7] === "t") {
      monthIdx = 9;
    } else if (date6[commaIndex + 5] === "N" && date6[commaIndex + 6] === "o" && date6[commaIndex + 7] === "v") {
      monthIdx = 10;
    } else if (date6[commaIndex + 5] === "D" && date6[commaIndex + 6] === "e" && date6[commaIndex + 7] === "c") {
      monthIdx = 11;
    } else {
      return;
    }
    const yearDigit1 = date6.charCodeAt(commaIndex + 9);
    if (yearDigit1 < 48 || yearDigit1 > 57) {
      return;
    }
    const yearDigit2 = date6.charCodeAt(commaIndex + 10);
    if (yearDigit2 < 48 || yearDigit2 > 57) {
      return;
    }
    let year2 = (yearDigit1 - 48) * 10 + (yearDigit2 - 48);
    year2 += year2 < 70 ? 2000 : 1900;
    let hour2 = 0;
    if (date6[commaIndex + 12] === "0") {
      const code2 = date6.charCodeAt(commaIndex + 13);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      hour2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(commaIndex + 12);
      if (code1 < 48 || code1 > 50) {
        return;
      }
      const code2 = date6.charCodeAt(commaIndex + 13);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      if (code1 === 50 && code2 > 51) {
        return;
      }
      hour2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let minute2 = 0;
    if (date6[commaIndex + 15] === "0") {
      const code2 = date6.charCodeAt(commaIndex + 16);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      minute2 = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(commaIndex + 15);
      if (code1 < 48 || code1 > 53) {
        return;
      }
      const code2 = date6.charCodeAt(commaIndex + 16);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      minute2 = (code1 - 48) * 10 + (code2 - 48);
    }
    let second = 0;
    if (date6[commaIndex + 18] === "0") {
      const code2 = date6.charCodeAt(commaIndex + 19);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      second = code2 - 48;
    } else {
      const code1 = date6.charCodeAt(commaIndex + 18);
      if (code1 < 48 || code1 > 53) {
        return;
      }
      const code2 = date6.charCodeAt(commaIndex + 19);
      if (code2 < 48 || code2 > 57) {
        return;
      }
      second = (code1 - 48) * 10 + (code2 - 48);
    }
    const result = new Date(Date.UTC(year2, monthIdx, day2, hour2, minute2, second));
    return result.getUTCDay() === weekday ? result : undefined;
  }
  module.exports = {
    parseHttpDate
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/cache-handler.js
var require_cache_handler = __commonJS((exports2, module) => {
  var util3 = require_util3();
  var {
    parseCacheControlHeader,
    parseVaryHeader,
    isEtagUsable
  } = require_cache();
  var { parseHttpDate } = require_date();
  function noop2() {}
  var HEURISTICALLY_CACHEABLE_STATUS_CODES = [
    200,
    203,
    204,
    206,
    300,
    301,
    308,
    404,
    405,
    410,
    414,
    501
  ];
  var NOT_UNDERSTOOD_STATUS_CODES = [
    206
  ];
  var MAX_RESPONSE_AGE = 2147483647000;

  class CacheHandler {
    #cacheKey;
    #cacheType;
    #cacheByDefault;
    #store;
    #handler;
    #writeStream;
    constructor({ store, type: type2, cacheByDefault }, cacheKey, handler) {
      this.#store = store;
      this.#cacheType = type2;
      this.#cacheByDefault = cacheByDefault;
      this.#cacheKey = cacheKey;
      this.#handler = handler;
    }
    onRequestStart(controller, context10) {
      this.#writeStream?.destroy();
      this.#writeStream = undefined;
      this.#handler.onRequestStart?.(controller, context10);
    }
    onRequestUpgrade(controller, statusCode, headers, socket) {
      this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
    }
    onResponseStart(controller, statusCode, resHeaders, statusMessage) {
      const downstreamOnHeaders = () => this.#handler.onResponseStart?.(controller, statusCode, resHeaders, statusMessage);
      const handler = this;
      if (!util3.safeHTTPMethods.includes(this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) {
        try {
          this.#store.delete(this.#cacheKey)?.catch?.(noop2);
        } catch {}
        return downstreamOnHeaders();
      }
      const cacheControlHeader = resHeaders["cache-control"];
      const heuristicallyCacheable = resHeaders["last-modified"] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode);
      if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) {
        return downstreamOnHeaders();
      }
      const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {};
      if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) {
        return downstreamOnHeaders();
      }
      const now = Date.now();
      const resAge = resHeaders.age ? getAge(resHeaders.age) : undefined;
      if (resAge && resAge >= MAX_RESPONSE_AGE) {
        return downstreamOnHeaders();
      }
      const resDate = typeof resHeaders.date === "string" ? parseHttpDate(resHeaders.date) : undefined;
      const staleAt = determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? this.#cacheByDefault;
      if (staleAt === undefined || resAge && resAge > staleAt) {
        return downstreamOnHeaders();
      }
      const baseTime = resDate ? resDate.getTime() : now;
      const absoluteStaleAt = staleAt + baseTime;
      if (now >= absoluteStaleAt) {
        return downstreamOnHeaders();
      }
      let varyDirectives;
      if (this.#cacheKey.headers && resHeaders.vary) {
        varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers);
        if (!varyDirectives) {
          return downstreamOnHeaders();
        }
      }
      const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt);
      const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives);
      const value = {
        statusCode,
        statusMessage,
        headers: strippedHeaders,
        vary: varyDirectives,
        cacheControlDirectives,
        cachedAt: resAge ? now - resAge : now,
        staleAt: absoluteStaleAt,
        deleteAt
      };
      if (statusCode === 304) {
        const handle304 = (cachedValue) => {
          if (!cachedValue) {
            return downstreamOnHeaders();
          }
          value.statusCode = cachedValue.statusCode;
          value.statusMessage = cachedValue.statusMessage;
          value.etag = cachedValue.etag;
          value.headers = { ...cachedValue.headers, ...strippedHeaders };
          downstreamOnHeaders();
          this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value);
          if (!this.#writeStream || !cachedValue?.body) {
            return;
          }
          if (typeof cachedValue.body.values === "function") {
            const bodyIterator = cachedValue.body.values();
            const streamCachedBody = () => {
              for (const chunk of bodyIterator) {
                const full = this.#writeStream.write(chunk) === false;
                this.#handler.onResponseData?.(controller, chunk);
                if (full) {
                  break;
                }
              }
            };
            this.#writeStream.on("error", function() {
              handler.#writeStream = undefined;
              handler.#store.delete(handler.#cacheKey);
            }).on("drain", () => {
              streamCachedBody();
            }).on("close", function() {
              if (handler.#writeStream === this) {
                handler.#writeStream = undefined;
              }
            });
            streamCachedBody();
          } else if (typeof cachedValue.body.on === "function") {
            cachedValue.body.on("data", (chunk) => {
              this.#writeStream.write(chunk);
              this.#handler.onResponseData?.(controller, chunk);
            }).on("end", () => {
              this.#writeStream.end();
            }).on("error", () => {
              this.#writeStream = undefined;
              this.#store.delete(this.#cacheKey);
            });
            this.#writeStream.on("error", function() {
              handler.#writeStream = undefined;
              handler.#store.delete(handler.#cacheKey);
            }).on("close", function() {
              if (handler.#writeStream === this) {
                handler.#writeStream = undefined;
              }
            });
          }
        };
        const result = this.#store.get(this.#cacheKey);
        if (result && typeof result.then === "function") {
          result.then(handle304);
        } else {
          handle304(result);
        }
      } else {
        if (typeof resHeaders.etag === "string" && isEtagUsable(resHeaders.etag)) {
          value.etag = resHeaders.etag;
        }
        this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value);
        if (!this.#writeStream) {
          return downstreamOnHeaders();
        }
        this.#writeStream.on("drain", () => controller.resume()).on("error", function() {
          handler.#writeStream = undefined;
          handler.#store.delete(handler.#cacheKey);
        }).on("close", function() {
          if (handler.#writeStream === this) {
            handler.#writeStream = undefined;
          }
          controller.resume();
        });
        downstreamOnHeaders();
      }
    }
    onResponseData(controller, chunk) {
      if (this.#writeStream?.write(chunk) === false) {
        controller.pause();
      }
      this.#handler.onResponseData?.(controller, chunk);
    }
    onResponseEnd(controller, trailers) {
      this.#writeStream?.end();
      this.#handler.onResponseEnd?.(controller, trailers);
    }
    onResponseError(controller, err) {
      this.#writeStream?.destroy(err);
      this.#writeStream = undefined;
      this.#handler.onResponseError?.(controller, err);
    }
  }
  function canCacheResponse(cacheType, statusCode, resHeaders, cacheControlDirectives, reqHeaders) {
    if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) {
      return false;
    }
    if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders["expires"] && !cacheControlDirectives.public && cacheControlDirectives["max-age"] === undefined && !(cacheControlDirectives.private && cacheType === "private") && !(cacheControlDirectives["s-maxage"] !== undefined && cacheType === "shared")) {
      return false;
    }
    if (cacheControlDirectives["no-store"]) {
      return false;
    }
    if (cacheType === "shared" && cacheControlDirectives.private === true) {
      return false;
    }
    if (resHeaders.vary?.includes("*")) {
      return false;
    }
    if (reqHeaders?.authorization) {
      if (!cacheControlDirectives.public && !cacheControlDirectives["s-maxage"] && !cacheControlDirectives["must-revalidate"]) {
        return false;
      }
      if (typeof reqHeaders.authorization !== "string") {
        return false;
      }
      if (Array.isArray(cacheControlDirectives["no-cache"]) && cacheControlDirectives["no-cache"].includes("authorization")) {
        return false;
      }
      if (Array.isArray(cacheControlDirectives["private"]) && cacheControlDirectives["private"].includes("authorization")) {
        return false;
      }
    }
    return true;
  }
  function getAge(ageHeader) {
    const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader);
    return isNaN(age) ? undefined : age * 1000;
  }
  function determineStaleAt(cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) {
    if (cacheType === "shared") {
      const sMaxAge = cacheControlDirectives["s-maxage"];
      if (sMaxAge !== undefined) {
        return sMaxAge > 0 ? sMaxAge * 1000 : undefined;
      }
    }
    const maxAge = cacheControlDirectives["max-age"];
    if (maxAge !== undefined) {
      return maxAge > 0 ? maxAge * 1000 : undefined;
    }
    if (typeof resHeaders.expires === "string") {
      const expiresDate = parseHttpDate(resHeaders.expires);
      if (expiresDate) {
        if (now >= expiresDate.getTime()) {
          return;
        }
        if (responseDate) {
          if (responseDate >= expiresDate) {
            return;
          }
          if (age !== undefined && age > expiresDate - responseDate) {
            return;
          }
        }
        return expiresDate.getTime() - now;
      }
    }
    if (typeof resHeaders["last-modified"] === "string") {
      const lastModified = new Date(resHeaders["last-modified"]);
      if (isValidDate(lastModified)) {
        if (lastModified.getTime() >= now) {
          return;
        }
        const responseAge = now - lastModified.getTime();
        return responseAge * 0.1;
      }
    }
    if (cacheControlDirectives.immutable) {
      return 31536000;
    }
    return;
  }
  function determineDeleteAt(now, cacheControlDirectives, staleAt) {
    let staleWhileRevalidate = -Infinity;
    let staleIfError = -Infinity;
    let immutable = -Infinity;
    if (cacheControlDirectives["stale-while-revalidate"]) {
      staleWhileRevalidate = staleAt + cacheControlDirectives["stale-while-revalidate"] * 1000;
    }
    if (cacheControlDirectives["stale-if-error"]) {
      staleIfError = staleAt + cacheControlDirectives["stale-if-error"] * 1000;
    }
    if (cacheControlDirectives.immutable && staleWhileRevalidate === -Infinity && staleIfError === -Infinity) {
      immutable = now + 31536000000;
    }
    if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity && immutable === -Infinity) {
      const freshnessLifetime = staleAt - now;
      return staleAt + freshnessLifetime;
    }
    return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable);
  }
  function stripNecessaryHeaders(resHeaders, cacheControlDirectives) {
    const headersToRemove = [
      "connection",
      "proxy-authenticate",
      "proxy-authentication-info",
      "proxy-authorization",
      "proxy-connection",
      "te",
      "transfer-encoding",
      "upgrade",
      "age"
    ];
    if (resHeaders["connection"]) {
      if (Array.isArray(resHeaders["connection"])) {
        headersToRemove.push(...resHeaders["connection"].map((header) => header.trim()));
      } else {
        headersToRemove.push(...resHeaders["connection"].split(",").map((header) => header.trim()));
      }
    }
    if (Array.isArray(cacheControlDirectives["no-cache"])) {
      headersToRemove.push(...cacheControlDirectives["no-cache"]);
    }
    if (Array.isArray(cacheControlDirectives["private"])) {
      headersToRemove.push(...cacheControlDirectives["private"]);
    }
    let strippedHeaders;
    for (const headerName of headersToRemove) {
      if (resHeaders[headerName]) {
        strippedHeaders ??= { ...resHeaders };
        delete strippedHeaders[headerName];
      }
    }
    return strippedHeaders ?? resHeaders;
  }
  function isValidDate(date6) {
    return date6 instanceof Date && Number.isFinite(date6.valueOf());
  }
  module.exports = CacheHandler;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/cache/memory-cache-store.js
var require_memory_cache_store = __commonJS((exports2, module) => {
  var { Writable: Writable3 } = __require("node:stream");
  var { EventEmitter } = __require("node:events");
  var { assertCacheKey, assertCacheValue } = require_cache();

  class MemoryCacheStore extends EventEmitter {
    #maxCount = 1024;
    #maxSize = 104857600;
    #maxEntrySize = 5242880;
    #size = 0;
    #count = 0;
    #entries = new Map;
    #hasEmittedMaxSizeEvent = false;
    constructor(opts) {
      super();
      if (opts) {
        if (typeof opts !== "object") {
          throw new TypeError("MemoryCacheStore options must be an object");
        }
        if (opts.maxCount !== undefined) {
          if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) {
            throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer");
          }
          this.#maxCount = opts.maxCount;
        }
        if (opts.maxSize !== undefined) {
          if (typeof opts.maxSize !== "number" || !Number.isInteger(opts.maxSize) || opts.maxSize < 0) {
            throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer");
          }
          this.#maxSize = opts.maxSize;
        }
        if (opts.maxEntrySize !== undefined) {
          if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) {
            throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer");
          }
          this.#maxEntrySize = opts.maxEntrySize;
        }
      }
    }
    get size() {
      return this.#size;
    }
    isFull() {
      return this.#size >= this.#maxSize || this.#count >= this.#maxCount;
    }
    get(key) {
      assertCacheKey(key);
      const topLevelKey = `${key.origin}:${key.path}`;
      const now = Date.now();
      const entries = this.#entries.get(topLevelKey);
      const entry = entries ? findEntry(key, entries, now) : null;
      return entry == null ? undefined : {
        statusMessage: entry.statusMessage,
        statusCode: entry.statusCode,
        headers: entry.headers,
        body: entry.body,
        vary: entry.vary ? entry.vary : undefined,
        etag: entry.etag,
        cacheControlDirectives: entry.cacheControlDirectives,
        cachedAt: entry.cachedAt,
        staleAt: entry.staleAt,
        deleteAt: entry.deleteAt
      };
    }
    createWriteStream(key, val) {
      assertCacheKey(key);
      assertCacheValue(val);
      const topLevelKey = `${key.origin}:${key.path}`;
      const store = this;
      const entry = { ...key, ...val, body: [], size: 0 };
      return new Writable3({
        write(chunk, encoding, callback) {
          if (typeof chunk === "string") {
            chunk = Buffer.from(chunk, encoding);
          }
          entry.size += chunk.byteLength;
          if (entry.size >= store.#maxEntrySize) {
            this.destroy();
          } else {
            entry.body.push(chunk);
          }
          callback(null);
        },
        final(callback) {
          let entries = store.#entries.get(topLevelKey);
          if (!entries) {
            entries = [];
            store.#entries.set(topLevelKey, entries);
          }
          const previousEntry = findEntry(key, entries, Date.now());
          if (previousEntry) {
            const index2 = entries.indexOf(previousEntry);
            entries.splice(index2, 1, entry);
            store.#size -= previousEntry.size;
          } else {
            entries.push(entry);
            store.#count += 1;
          }
          store.#size += entry.size;
          if (store.#size > store.#maxSize || store.#count > store.#maxCount) {
            if (!store.#hasEmittedMaxSizeEvent) {
              store.emit("maxSizeExceeded", {
                size: store.#size,
                maxSize: store.#maxSize,
                count: store.#count,
                maxCount: store.#maxCount
              });
              store.#hasEmittedMaxSizeEvent = true;
            }
            for (const [key2, entries2] of store.#entries) {
              for (const entry2 of entries2.splice(0, entries2.length / 2)) {
                store.#size -= entry2.size;
                store.#count -= 1;
              }
              if (entries2.length === 0) {
                store.#entries.delete(key2);
              }
            }
            if (store.#size < store.#maxSize && store.#count < store.#maxCount) {
              store.#hasEmittedMaxSizeEvent = false;
            }
          }
          callback(null);
        }
      });
    }
    delete(key) {
      if (typeof key !== "object") {
        throw new TypeError(`expected key to be object, got ${typeof key}`);
      }
      const topLevelKey = `${key.origin}:${key.path}`;
      for (const entry of this.#entries.get(topLevelKey) ?? []) {
        this.#size -= entry.size;
        this.#count -= 1;
      }
      this.#entries.delete(topLevelKey);
    }
  }
  function findEntry(key, entries, now) {
    return entries.find((entry) => entry.deleteAt > now && entry.method === key.method && (entry.vary == null || Object.keys(entry.vary).every((headerName) => {
      if (entry.vary[headerName] === null) {
        return key.headers[headerName] === undefined;
      }
      return entry.vary[headerName] === key.headers[headerName];
    })));
  }
  module.exports = MemoryCacheStore;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/cache-revalidation-handler.js
var require_cache_revalidation_handler = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");

  class CacheRevalidationHandler {
    #successful = false;
    #callback;
    #handler;
    #context;
    #allowErrorStatusCodes;
    constructor(callback, handler, allowErrorStatusCodes) {
      if (typeof callback !== "function") {
        throw new TypeError("callback must be a function");
      }
      this.#callback = callback;
      this.#handler = handler;
      this.#allowErrorStatusCodes = allowErrorStatusCodes;
    }
    onRequestStart(_6, context10) {
      this.#successful = false;
      this.#context = context10;
    }
    onRequestUpgrade(controller, statusCode, headers, socket) {
      this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      assert2(this.#callback != null);
      this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504;
      this.#callback(this.#successful, this.#context);
      this.#callback = null;
      if (this.#successful) {
        return true;
      }
      this.#handler.onRequestStart?.(controller, this.#context);
      this.#handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
    }
    onResponseData(controller, chunk) {
      if (this.#successful) {
        return;
      }
      return this.#handler.onResponseData?.(controller, chunk);
    }
    onResponseEnd(controller, trailers) {
      if (this.#successful) {
        return;
      }
      this.#handler.onResponseEnd?.(controller, trailers);
    }
    onResponseError(controller, err) {
      if (this.#successful) {
        return;
      }
      if (this.#callback) {
        this.#callback(false);
        this.#callback = null;
      }
      if (typeof this.#handler.onResponseError === "function") {
        this.#handler.onResponseError(controller, err);
      } else {
        throw err;
      }
    }
  }
  module.exports = CacheRevalidationHandler;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/cache.js
var require_cache2 = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { Readable: Readable2 } = __require("node:stream");
  var util3 = require_util3();
  var CacheHandler = require_cache_handler();
  var MemoryCacheStore = require_memory_cache_store();
  var CacheRevalidationHandler = require_cache_revalidation_handler();
  var { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require_cache();
  var { AbortError } = require_errors8();
  function assertCacheOrigins(origins, name3) {
    if (origins === undefined)
      return;
    if (!Array.isArray(origins)) {
      throw new TypeError(`expected ${name3} to be an array or undefined, got ${typeof origins}`);
    }
    for (let i = 0;i < origins.length; i++) {
      const origin = origins[i];
      if (typeof origin !== "string" && !(origin instanceof RegExp)) {
        throw new TypeError(`expected ${name3}[${i}] to be a string or RegExp, got ${typeof origin}`);
      }
    }
  }
  var nop = () => {};
  function needsRevalidation(result, cacheControlDirectives, { headers = {} }) {
    if (cacheControlDirectives?.["no-cache"]) {
      return true;
    }
    if (result.cacheControlDirectives?.["no-cache"] && !Array.isArray(result.cacheControlDirectives["no-cache"])) {
      return true;
    }
    if (headers["if-modified-since"] || headers["if-none-match"]) {
      return true;
    }
    return false;
  }
  function isStale(result, cacheControlDirectives) {
    const now = Date.now();
    if (now > result.staleAt) {
      if (cacheControlDirectives?.["max-stale"]) {
        const gracePeriod = result.staleAt + cacheControlDirectives["max-stale"] * 1000;
        return now > gracePeriod;
      }
      return true;
    }
    if (cacheControlDirectives?.["min-fresh"]) {
      const timeLeftTillStale = result.staleAt - now;
      const threshold = cacheControlDirectives["min-fresh"] * 1000;
      return timeLeftTillStale <= threshold;
    }
    return false;
  }
  function withinStaleWhileRevalidateWindow(result) {
    const staleWhileRevalidate = result.cacheControlDirectives?.["stale-while-revalidate"];
    if (!staleWhileRevalidate) {
      return false;
    }
    const now = Date.now();
    const staleWhileRevalidateExpiry = result.staleAt + staleWhileRevalidate * 1000;
    return now <= staleWhileRevalidateExpiry;
  }
  function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl) {
    if (reqCacheControl?.["only-if-cached"]) {
      let aborted2 = false;
      try {
        if (typeof handler.onConnect === "function") {
          handler.onConnect(() => {
            aborted2 = true;
          });
          if (aborted2) {
            return;
          }
        }
        if (typeof handler.onHeaders === "function") {
          handler.onHeaders(504, [], nop, "Gateway Timeout");
          if (aborted2) {
            return;
          }
        }
        if (typeof handler.onComplete === "function") {
          handler.onComplete([]);
        }
      } catch (err) {
        if (typeof handler.onError === "function") {
          handler.onError(err);
        }
      }
      return true;
    }
    return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
  }
  function sendCachedValue(handler, opts, result, age, context10, isStale2) {
    const stream2 = util3.isStream(result.body) ? result.body : Readable2.from(result.body ?? []);
    assert2(!stream2.destroyed, "stream should not be destroyed");
    assert2(!stream2.readableDidRead, "stream should not be readableDidRead");
    const controller = {
      resume() {
        stream2.resume();
      },
      pause() {
        stream2.pause();
      },
      get paused() {
        return stream2.isPaused();
      },
      get aborted() {
        return stream2.destroyed;
      },
      get reason() {
        return stream2.errored;
      },
      abort(reason) {
        stream2.destroy(reason ?? new AbortError);
      }
    };
    stream2.on("error", function(err) {
      if (!this.readableEnded) {
        if (typeof handler.onResponseError === "function") {
          handler.onResponseError(controller, err);
        } else {
          throw err;
        }
      }
    }).on("close", function() {
      if (!this.errored) {
        handler.onResponseEnd?.(controller, {});
      }
    });
    handler.onRequestStart?.(controller, context10);
    if (stream2.destroyed) {
      return;
    }
    const headers = { ...result.headers, age: String(age) };
    if (isStale2) {
      headers.warning = '110 - "response is stale"';
    }
    handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage);
    if (opts.method === "HEAD") {
      stream2.destroy();
    } else {
      stream2.on("data", function(chunk) {
        handler.onResponseData?.(controller, chunk);
      });
    }
  }
  function handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result) {
    if (!result) {
      return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl);
    }
    const now = Date.now();
    if (now > result.deleteAt) {
      return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
    }
    const age = Math.round((now - result.cachedAt) / 1000);
    if (reqCacheControl?.["max-age"] && age >= reqCacheControl["max-age"]) {
      return dispatch(opts, handler);
    }
    const stale = isStale(result, reqCacheControl);
    const revalidate = needsRevalidation(result, reqCacheControl, opts);
    if (stale || revalidate) {
      if (util3.isStream(opts.body) && util3.bodyLength(opts.body) !== 0) {
        return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
      }
      if (!revalidate && withinStaleWhileRevalidateWindow(result)) {
        sendCachedValue(handler, opts, result, age, null, true);
        queueMicrotask(() => {
          const headers2 = {
            ...opts.headers,
            "if-modified-since": new Date(result.cachedAt).toUTCString()
          };
          if (result.etag) {
            headers2["if-none-match"] = result.etag;
          }
          if (result.vary) {
            for (const key in result.vary) {
              if (result.vary[key] != null) {
                headers2[key] = result.vary[key];
              }
            }
          }
          dispatch({
            ...opts,
            headers: headers2
          }, new CacheHandler(globalOpts, cacheKey, {
            onRequestStart() {},
            onRequestUpgrade() {},
            onResponseStart() {},
            onResponseData() {},
            onResponseEnd() {},
            onResponseError() {}
          }));
        });
        return true;
      }
      let withinStaleIfErrorThreshold = false;
      const staleIfErrorExpiry = result.cacheControlDirectives["stale-if-error"] ?? reqCacheControl?.["stale-if-error"];
      if (staleIfErrorExpiry) {
        withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1000;
      }
      const headers = {
        ...opts.headers,
        "if-modified-since": new Date(result.cachedAt).toUTCString()
      };
      if (result.etag) {
        headers["if-none-match"] = result.etag;
      }
      if (result.vary) {
        for (const key in result.vary) {
          if (result.vary[key] != null) {
            headers[key] = result.vary[key];
          }
        }
      }
      return dispatch({
        ...opts,
        headers
      }, new CacheRevalidationHandler((success2, context10) => {
        if (success2) {
          sendCachedValue(handler, opts, result, age, context10, stale);
        } else if (util3.isStream(result.body)) {
          result.body.on("error", nop).destroy();
        }
      }, new CacheHandler(globalOpts, cacheKey, handler), withinStaleIfErrorThreshold));
    }
    if (util3.isStream(opts.body)) {
      opts.body.on("error", nop).destroy();
    }
    sendCachedValue(handler, opts, result, age, null, false);
  }
  module.exports = (opts = {}) => {
    const {
      store = new MemoryCacheStore,
      methods = ["GET"],
      cacheByDefault = undefined,
      type: type2 = "shared",
      origins = undefined
    } = opts;
    if (typeof opts !== "object" || opts === null) {
      throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`);
    }
    assertCacheStore(store, "opts.store");
    assertCacheMethods(methods, "opts.methods");
    assertCacheOrigins(origins, "opts.origins");
    if (typeof cacheByDefault !== "undefined" && typeof cacheByDefault !== "number") {
      throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`);
    }
    if (typeof type2 !== "undefined" && type2 !== "shared" && type2 !== "private") {
      throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type2}`);
    }
    const globalOpts = {
      store,
      methods,
      cacheByDefault,
      type: type2
    };
    const safeMethodsToNotCache = util3.safeHTTPMethods.filter((method) => methods.includes(method) === false);
    return (dispatch) => {
      return (opts2, handler) => {
        if (!opts2.origin || safeMethodsToNotCache.includes(opts2.method)) {
          return dispatch(opts2, handler);
        }
        if (origins !== undefined) {
          const requestOrigin = opts2.origin.toString().toLowerCase();
          let isAllowed = false;
          for (let i = 0;i < origins.length; i++) {
            const allowed = origins[i];
            if (typeof allowed === "string") {
              if (allowed.toLowerCase() === requestOrigin) {
                isAllowed = true;
                break;
              }
            } else if (allowed.test(requestOrigin)) {
              isAllowed = true;
              break;
            }
          }
          if (!isAllowed) {
            return dispatch(opts2, handler);
          }
        }
        opts2 = {
          ...opts2,
          headers: normalizeHeaders(opts2)
        };
        const reqCacheControl = opts2.headers?.["cache-control"] ? parseCacheControlHeader(opts2.headers["cache-control"]) : undefined;
        if (reqCacheControl?.["no-store"]) {
          return dispatch(opts2, handler);
        }
        const cacheKey = makeCacheKey(opts2);
        const result = store.get(cacheKey);
        if (result && typeof result.then === "function") {
          return result.then((result2) => handleResult(dispatch, globalOpts, cacheKey, handler, opts2, reqCacheControl, result2));
        } else {
          return handleResult(dispatch, globalOpts, cacheKey, handler, opts2, reqCacheControl, result);
        }
      };
    };
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/decompress.js
var require_decompress = __commonJS((exports2, module) => {
  var { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = __require("node:zlib");
  var { pipeline } = __require("node:stream");
  var DecoratorHandler = require_decorator_handler();
  var { runtimeFeatures } = require_runtime_features();
  var supportedEncodings = {
    gzip: createGunzip,
    "x-gzip": createGunzip,
    br: createBrotliDecompress,
    deflate: createInflate,
    compress: createInflate,
    "x-compress": createInflate,
    ...runtimeFeatures.has("zstd") ? { zstd: createZstdDecompress } : {}
  };
  var defaultSkipStatusCodes = [204, 304];
  var warningEmitted = false;

  class DecompressHandler extends DecoratorHandler {
    #decompressors = [];
    #skipStatusCodes;
    #skipErrorResponses;
    constructor(handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true } = {}) {
      super(handler);
      this.#skipStatusCodes = skipStatusCodes;
      this.#skipErrorResponses = skipErrorResponses;
    }
    #shouldSkipDecompression(contentEncoding, statusCode) {
      if (!contentEncoding || statusCode < 200)
        return true;
      if (this.#skipStatusCodes.includes(statusCode))
        return true;
      if (this.#skipErrorResponses && statusCode >= 400)
        return true;
      return false;
    }
    #createDecompressionChain(encodings) {
      const parts = encodings.split(",");
      const maxContentEncodings = 5;
      if (parts.length > maxContentEncodings) {
        throw new Error(`too many content-encodings in response: ${parts.length}, maximum allowed is ${maxContentEncodings}`);
      }
      const decompressors = [];
      for (let i = parts.length - 1;i >= 0; i--) {
        const encoding = parts[i].trim();
        if (!encoding)
          continue;
        if (!supportedEncodings[encoding]) {
          decompressors.length = 0;
          return decompressors;
        }
        decompressors.push(supportedEncodings[encoding]());
      }
      return decompressors;
    }
    #setupDecompressorEvents(decompressor, controller) {
      decompressor.on("readable", () => {
        let chunk;
        while ((chunk = decompressor.read()) !== null) {
          const result = super.onResponseData(controller, chunk);
          if (result === false) {
            break;
          }
        }
      });
      decompressor.on("error", (error49) => {
        super.onResponseError(controller, error49);
      });
    }
    #setupSingleDecompressor(controller) {
      const decompressor = this.#decompressors[0];
      this.#setupDecompressorEvents(decompressor, controller);
      decompressor.on("end", () => {
        super.onResponseEnd(controller, {});
      });
    }
    #setupMultipleDecompressors(controller) {
      const lastDecompressor = this.#decompressors[this.#decompressors.length - 1];
      this.#setupDecompressorEvents(lastDecompressor, controller);
      pipeline(this.#decompressors, (err) => {
        if (err) {
          super.onResponseError(controller, err);
          return;
        }
        super.onResponseEnd(controller, {});
      });
    }
    #cleanupDecompressors() {
      this.#decompressors.length = 0;
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      const contentEncoding = headers["content-encoding"];
      if (this.#shouldSkipDecompression(contentEncoding, statusCode)) {
        return super.onResponseStart(controller, statusCode, headers, statusMessage);
      }
      const decompressors = this.#createDecompressionChain(contentEncoding.toLowerCase());
      if (decompressors.length === 0) {
        this.#cleanupDecompressors();
        return super.onResponseStart(controller, statusCode, headers, statusMessage);
      }
      this.#decompressors = decompressors;
      const { "content-encoding": _6, "content-length": __, ...newHeaders } = headers;
      if (this.#decompressors.length === 1) {
        this.#setupSingleDecompressor(controller);
      } else {
        this.#setupMultipleDecompressors(controller);
      }
      return super.onResponseStart(controller, statusCode, newHeaders, statusMessage);
    }
    onResponseData(controller, chunk) {
      if (this.#decompressors.length > 0) {
        this.#decompressors[0].write(chunk);
        return;
      }
      super.onResponseData(controller, chunk);
    }
    onResponseEnd(controller, trailers) {
      if (this.#decompressors.length > 0) {
        this.#decompressors[0].end();
        this.#cleanupDecompressors();
        return;
      }
      super.onResponseEnd(controller, trailers);
    }
    onResponseError(controller, err) {
      if (this.#decompressors.length > 0) {
        for (const decompressor of this.#decompressors) {
          decompressor.destroy(err);
        }
        this.#cleanupDecompressors();
      }
      super.onResponseError(controller, err);
    }
  }
  function createDecompressInterceptor(options2 = {}) {
    if (!warningEmitted) {
      process.emitWarning("DecompressInterceptor is experimental and subject to change", "ExperimentalWarning");
      warningEmitted = true;
    }
    return (dispatch) => {
      return (opts, handler) => {
        const decompressHandler = new DecompressHandler(handler, options2);
        return dispatch(opts, decompressHandler);
      };
    };
  }
  module.exports = createDecompressInterceptor;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/handler/deduplication-handler.js
var require_deduplication_handler = __commonJS((exports2, module) => {
  var { RequestAbortedError } = require_errors8();
  var DEFAULT_MAX_BUFFER_SIZE = 5 * 1024 * 1024;

  class DeduplicationHandler {
    #primaryHandler;
    #waitingHandlers = [];
    #maxBufferSize = DEFAULT_MAX_BUFFER_SIZE;
    #statusCode = 0;
    #headers = {};
    #statusMessage = "";
    #aborted = false;
    #responseStarted = false;
    #responseDataStarted = false;
    #completed = false;
    #controller = null;
    #onComplete = null;
    constructor(primaryHandler, onComplete, maxBufferSize = DEFAULT_MAX_BUFFER_SIZE) {
      this.#primaryHandler = primaryHandler;
      this.#onComplete = onComplete;
      this.#maxBufferSize = maxBufferSize;
    }
    addWaitingHandler(handler) {
      if (this.#completed || this.#responseDataStarted) {
        return false;
      }
      const waitingHandler = this.#createWaitingHandler(handler);
      const waitingController = waitingHandler.controller;
      try {
        handler.onRequestStart?.(waitingController, null);
        if (waitingController.aborted) {
          waitingHandler.done = true;
          return true;
        }
        if (this.#responseStarted) {
          handler.onResponseStart?.(waitingController, this.#statusCode, this.#headers, this.#statusMessage);
        }
      } catch {
        waitingHandler.done = true;
        return true;
      }
      if (!waitingController.aborted) {
        this.#waitingHandlers.push(waitingHandler);
      }
      return true;
    }
    onRequestStart(controller, context10) {
      this.#controller = controller;
      this.#primaryHandler.onRequestStart?.(controller, context10);
    }
    onRequestUpgrade(controller, statusCode, headers, socket) {
      this.#primaryHandler.onRequestUpgrade?.(controller, statusCode, headers, socket);
    }
    onResponseStart(controller, statusCode, headers, statusMessage) {
      this.#responseStarted = true;
      this.#statusCode = statusCode;
      this.#headers = headers;
      this.#statusMessage = statusMessage;
      this.#primaryHandler.onResponseStart?.(controller, statusCode, headers, statusMessage);
      for (const waitingHandler of this.#waitingHandlers) {
        const { handler, controller: waitingController } = waitingHandler;
        if (waitingHandler.done || waitingController.aborted) {
          waitingHandler.done = true;
          continue;
        }
        try {
          handler.onResponseStart?.(waitingController, statusCode, headers, statusMessage);
        } catch {}
        if (waitingController.aborted) {
          waitingHandler.done = true;
        }
      }
      this.#pruneDoneWaitingHandlers();
    }
    onResponseData(controller, chunk) {
      if (this.#aborted || this.#completed) {
        return;
      }
      this.#responseDataStarted = true;
      this.#primaryHandler.onResponseData?.(controller, chunk);
      for (const waitingHandler of this.#waitingHandlers) {
        const { handler, controller: waitingController } = waitingHandler;
        if (waitingHandler.done || waitingController.aborted) {
          waitingHandler.done = true;
          continue;
        }
        if (waitingController.paused) {
          this.#bufferWaitingChunk(waitingHandler, chunk);
          continue;
        }
        try {
          handler.onResponseData?.(waitingController, chunk);
        } catch {}
        if (waitingController.aborted) {
          waitingHandler.done = true;
          waitingHandler.bufferedChunks = [];
          waitingHandler.bufferedBytes = 0;
        }
      }
      this.#pruneDoneWaitingHandlers();
    }
    onResponseEnd(controller, trailers) {
      if (this.#aborted || this.#completed) {
        return;
      }
      this.#completed = true;
      this.#primaryHandler.onResponseEnd?.(controller, trailers);
      for (const waitingHandler of this.#waitingHandlers) {
        if (waitingHandler.done || waitingHandler.controller.aborted) {
          waitingHandler.done = true;
          continue;
        }
        this.#flushWaitingHandler(waitingHandler);
        if (waitingHandler.done || waitingHandler.controller.aborted) {
          waitingHandler.done = true;
          continue;
        }
        if (waitingHandler.controller.paused && waitingHandler.bufferedChunks.length > 0) {
          waitingHandler.pendingTrailers = trailers;
          continue;
        }
        try {
          waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, trailers);
        } catch {}
        waitingHandler.done = true;
      }
      this.#pruneDoneWaitingHandlers();
      this.#onComplete?.();
    }
    onResponseError(controller, err) {
      if (this.#completed) {
        return;
      }
      this.#aborted = true;
      this.#completed = true;
      this.#primaryHandler.onResponseError?.(controller, err);
      for (const waitingHandler of this.#waitingHandlers) {
        this.#errorWaitingHandler(waitingHandler, err);
      }
      this.#waitingHandlers = [];
      this.#onComplete?.();
    }
    #createWaitingHandler(handler) {
      const waitingHandler = {
        handler,
        controller: null,
        bufferedChunks: [],
        bufferedBytes: 0,
        pendingTrailers: null,
        done: false
      };
      const state = {
        aborted: false,
        paused: false,
        reason: null
      };
      waitingHandler.controller = {
        resume: () => {
          if (state.aborted) {
            return;
          }
          state.paused = false;
          this.#flushWaitingHandler(waitingHandler);
          if (this.#completed && waitingHandler.pendingTrailers && waitingHandler.bufferedChunks.length === 0 && !state.paused && !state.aborted) {
            try {
              waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, waitingHandler.pendingTrailers);
            } catch {}
            waitingHandler.pendingTrailers = null;
            waitingHandler.done = true;
          }
          this.#pruneDoneWaitingHandlers();
        },
        pause: () => {
          if (!state.aborted) {
            state.paused = true;
          }
        },
        get paused() {
          return state.paused;
        },
        get aborted() {
          return state.aborted;
        },
        get reason() {
          return state.reason;
        },
        abort: (reason) => {
          state.aborted = true;
          state.reason = reason ?? null;
          waitingHandler.done = true;
          waitingHandler.pendingTrailers = null;
          waitingHandler.bufferedChunks = [];
          waitingHandler.bufferedBytes = 0;
        }
      };
      return waitingHandler;
    }
    #bufferWaitingChunk(waitingHandler, chunk) {
      if (waitingHandler.done || waitingHandler.controller.aborted) {
        waitingHandler.done = true;
        waitingHandler.bufferedChunks = [];
        waitingHandler.bufferedBytes = 0;
        return;
      }
      const bufferedChunk = Buffer.from(chunk);
      waitingHandler.bufferedChunks.push(bufferedChunk);
      waitingHandler.bufferedBytes += bufferedChunk.length;
      if (waitingHandler.bufferedBytes > this.#maxBufferSize) {
        const err = new RequestAbortedError(`Deduplicated waiting handler exceeded maxBufferSize (${this.#maxBufferSize} bytes) while paused`);
        this.#errorWaitingHandler(waitingHandler, err);
      }
    }
    #flushWaitingHandler(waitingHandler) {
      const { handler, controller } = waitingHandler;
      while (!waitingHandler.done && !controller.aborted && !controller.paused && waitingHandler.bufferedChunks.length > 0) {
        const bufferedChunk = waitingHandler.bufferedChunks.shift();
        waitingHandler.bufferedBytes -= bufferedChunk.length;
        try {
          handler.onResponseData?.(controller, bufferedChunk);
        } catch {}
        if (controller.aborted) {
          waitingHandler.done = true;
          waitingHandler.pendingTrailers = null;
          waitingHandler.bufferedChunks = [];
          waitingHandler.bufferedBytes = 0;
          break;
        }
      }
    }
    #errorWaitingHandler(waitingHandler, err) {
      if (waitingHandler.done) {
        return;
      }
      waitingHandler.done = true;
      waitingHandler.pendingTrailers = null;
      waitingHandler.bufferedChunks = [];
      waitingHandler.bufferedBytes = 0;
      try {
        waitingHandler.controller.abort(err);
        waitingHandler.handler.onResponseError?.(waitingHandler.controller, err);
      } catch {}
    }
    #pruneDoneWaitingHandlers() {
      this.#waitingHandlers = this.#waitingHandlers.filter((waitingHandler) => waitingHandler.done === false);
    }
  }
  module.exports = DeduplicationHandler;
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/interceptor/deduplicate.js
var require_deduplicate = __commonJS((exports2, module) => {
  var diagnosticsChannel2 = __require("node:diagnostics_channel");
  var util3 = require_util3();
  var DeduplicationHandler = require_deduplication_handler();
  var { normalizeHeaders, makeCacheKey, makeDeduplicationKey } = require_cache();
  var pendingRequestsChannel = diagnosticsChannel2.channel("undici:request:pending-requests");
  module.exports = (opts = {}) => {
    const {
      methods = ["GET"],
      skipHeaderNames = [],
      excludeHeaderNames = [],
      maxBufferSize = 5 * 1024 * 1024
    } = opts;
    if (typeof opts !== "object" || opts === null) {
      throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`);
    }
    if (!Array.isArray(methods)) {
      throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`);
    }
    for (const method of methods) {
      if (!util3.safeHTTPMethods.includes(method)) {
        throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`);
      }
    }
    if (!Array.isArray(skipHeaderNames)) {
      throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof skipHeaderNames}`);
    }
    if (!Array.isArray(excludeHeaderNames)) {
      throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof excludeHeaderNames}`);
    }
    if (!Number.isFinite(maxBufferSize) || maxBufferSize <= 0) {
      throw new TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${maxBufferSize}`);
    }
    const skipHeaderNamesSet = new Set(skipHeaderNames.map((name3) => name3.toLowerCase()));
    const excludeHeaderNamesSet = new Set(excludeHeaderNames.map((name3) => name3.toLowerCase()));
    const pendingRequests = new Map;
    return (dispatch) => {
      return (opts2, handler) => {
        if (!opts2.origin || methods.includes(opts2.method) === false) {
          return dispatch(opts2, handler);
        }
        opts2 = {
          ...opts2,
          headers: normalizeHeaders(opts2)
        };
        if (skipHeaderNamesSet.size > 0) {
          for (const headerName of Object.keys(opts2.headers)) {
            if (skipHeaderNamesSet.has(headerName.toLowerCase())) {
              return dispatch(opts2, handler);
            }
          }
        }
        const cacheKey = makeCacheKey(opts2);
        const dedupeKey = makeDeduplicationKey(cacheKey, excludeHeaderNamesSet);
        const pendingHandler = pendingRequests.get(dedupeKey);
        if (pendingHandler) {
          if (pendingHandler.addWaitingHandler(handler)) {
            return true;
          }
          return dispatch(opts2, handler);
        }
        const deduplicationHandler = new DeduplicationHandler(handler, () => {
          pendingRequests.delete(dedupeKey);
          if (pendingRequestsChannel.hasSubscribers) {
            pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: "removed" });
          }
        }, maxBufferSize);
        pendingRequests.set(dedupeKey, deduplicationHandler);
        if (pendingRequestsChannel.hasSubscribers) {
          pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: "added" });
        }
        return dispatch(opts2, deduplicationHandler);
      };
    };
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/cache/sqlite-cache-store.js
var require_sqlite_cache_store = __commonJS((exports2, module) => {
  var { Writable: Writable3 } = __require("node:stream");
  var { assertCacheKey, assertCacheValue } = require_cache();
  var DatabaseSync;
  var VERSION2 = 3;
  var MAX_ENTRY_SIZE = 2 * 1000 * 1000 * 1000;
  module.exports = class SqliteCacheStore {
    #maxEntrySize = MAX_ENTRY_SIZE;
    #maxCount = Infinity;
    #db;
    #getValuesQuery;
    #updateValueQuery;
    #insertValueQuery;
    #deleteExpiredValuesQuery;
    #deleteByUrlQuery;
    #countEntriesQuery;
    #deleteOldValuesQuery;
    constructor(opts) {
      if (opts) {
        if (typeof opts !== "object") {
          throw new TypeError("SqliteCacheStore options must be an object");
        }
        if (opts.maxEntrySize !== undefined) {
          if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) {
            throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer");
          }
          if (opts.maxEntrySize > MAX_ENTRY_SIZE) {
            throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb");
          }
          this.#maxEntrySize = opts.maxEntrySize;
        }
        if (opts.maxCount !== undefined) {
          if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) {
            throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer");
          }
          this.#maxCount = opts.maxCount;
        }
      }
      if (!DatabaseSync) {
        DatabaseSync = __require("node:sqlite").DatabaseSync;
      }
      this.#db = new DatabaseSync(opts?.location ?? ":memory:");
      this.#db.exec(`
      PRAGMA journal_mode = WAL;
      PRAGMA synchronous = NORMAL;
      PRAGMA temp_store = memory;
      PRAGMA optimize;

      CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION2} (
        -- Data specific to us
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        url TEXT NOT NULL,
        method TEXT NOT NULL,

        -- Data returned to the interceptor
        body BUF NULL,
        deleteAt INTEGER NOT NULL,
        statusCode INTEGER NOT NULL,
        statusMessage TEXT NOT NULL,
        headers TEXT NULL,
        cacheControlDirectives TEXT NULL,
        etag TEXT NULL,
        vary TEXT NULL,
        cachedAt INTEGER NOT NULL,
        staleAt INTEGER NOT NULL
      );

      CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION2}_getValuesQuery ON cacheInterceptorV${VERSION2}(url, method, deleteAt);
      CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION2}_deleteByUrlQuery ON cacheInterceptorV${VERSION2}(deleteAt);
    `);
      this.#getValuesQuery = this.#db.prepare(`
      SELECT
        id,
        body,
        deleteAt,
        statusCode,
        statusMessage,
        headers,
        etag,
        cacheControlDirectives,
        vary,
        cachedAt,
        staleAt
      FROM cacheInterceptorV${VERSION2}
      WHERE
        url = ?
        AND method = ?
      ORDER BY
        deleteAt ASC
    `);
      this.#updateValueQuery = this.#db.prepare(`
      UPDATE cacheInterceptorV${VERSION2} SET
        body = ?,
        deleteAt = ?,
        statusCode = ?,
        statusMessage = ?,
        headers = ?,
        etag = ?,
        cacheControlDirectives = ?,
        cachedAt = ?,
        staleAt = ?
      WHERE
        id = ?
    `);
      this.#insertValueQuery = this.#db.prepare(`
      INSERT INTO cacheInterceptorV${VERSION2} (
        url,
        method,
        body,
        deleteAt,
        statusCode,
        statusMessage,
        headers,
        etag,
        cacheControlDirectives,
        vary,
        cachedAt,
        staleAt
      ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    `);
      this.#deleteByUrlQuery = this.#db.prepare(`DELETE FROM cacheInterceptorV${VERSION2} WHERE url = ?`);
      this.#countEntriesQuery = this.#db.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION2}`);
      this.#deleteExpiredValuesQuery = this.#db.prepare(`DELETE FROM cacheInterceptorV${VERSION2} WHERE deleteAt <= ?`);
      this.#deleteOldValuesQuery = this.#maxCount === Infinity ? null : this.#db.prepare(`
        DELETE FROM cacheInterceptorV${VERSION2}
        WHERE id IN (
          SELECT
            id
          FROM cacheInterceptorV${VERSION2}
          ORDER BY cachedAt ASC
          LIMIT ?
        )
      `);
    }
    close() {
      this.#db.close();
    }
    get(key) {
      assertCacheKey(key);
      const value = this.#findValue(key);
      return value ? {
        body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : undefined,
        statusCode: value.statusCode,
        statusMessage: value.statusMessage,
        headers: value.headers ? JSON.parse(value.headers) : undefined,
        etag: value.etag ? value.etag : undefined,
        vary: value.vary ? JSON.parse(value.vary) : undefined,
        cacheControlDirectives: value.cacheControlDirectives ? JSON.parse(value.cacheControlDirectives) : undefined,
        cachedAt: value.cachedAt,
        staleAt: value.staleAt,
        deleteAt: value.deleteAt
      } : undefined;
    }
    set(key, value) {
      assertCacheKey(key);
      const url2 = this.#makeValueUrl(key);
      const body2 = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body;
      const size = body2?.byteLength;
      if (size && size > this.#maxEntrySize) {
        return;
      }
      const existingValue = this.#findValue(key, true);
      if (existingValue) {
        this.#updateValueQuery.run(body2, value.deleteAt, value.statusCode, value.statusMessage, value.headers ? JSON.stringify(value.headers) : null, value.etag ? value.etag : null, value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, value.cachedAt, value.staleAt, existingValue.id);
      } else {
        this.#insertValueQuery.run(url2, key.method, body2, value.deleteAt, value.statusCode, value.statusMessage, value.headers ? JSON.stringify(value.headers) : null, value.etag ? value.etag : null, value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, value.vary ? JSON.stringify(value.vary) : null, value.cachedAt, value.staleAt);
        this.#prune();
      }
    }
    createWriteStream(key, value) {
      assertCacheKey(key);
      assertCacheValue(value);
      let size = 0;
      const body2 = [];
      const store = this;
      return new Writable3({
        decodeStrings: true,
        write(chunk, encoding, callback) {
          size += chunk.byteLength;
          if (size < store.#maxEntrySize) {
            body2.push(chunk);
          } else {
            this.destroy();
          }
          callback();
        },
        final(callback) {
          store.set(key, { ...value, body: body2 });
          callback();
        }
      });
    }
    delete(key) {
      if (typeof key !== "object") {
        throw new TypeError(`expected key to be object, got ${typeof key}`);
      }
      this.#deleteByUrlQuery.run(this.#makeValueUrl(key));
    }
    #prune() {
      if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) {
        return 0;
      }
      {
        const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes;
        if (removed) {
          return removed;
        }
      }
      {
        const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * 0.1), 1)).changes;
        if (removed) {
          return removed;
        }
      }
      return 0;
    }
    get size() {
      const { total } = this.#countEntriesQuery.get();
      return total;
    }
    #makeValueUrl(key) {
      return `${key.origin}/${key.path}`;
    }
    #findValue(key, canBeExpired = false) {
      const url2 = this.#makeValueUrl(key);
      const { headers, method } = key;
      const values = this.#getValuesQuery.all(url2, method);
      if (values.length === 0) {
        return;
      }
      const now = Date.now();
      for (const value of values) {
        if (now >= value.deleteAt && !canBeExpired) {
          continue;
        }
        let matches = true;
        if (value.vary) {
          const vary = JSON.parse(value.vary);
          for (const header in vary) {
            if (!headerValueEquals(headers[header], vary[header])) {
              matches = false;
              break;
            }
          }
        }
        if (matches) {
          return value;
        }
      }
      return;
    }
  };
  function headerValueEquals(lhs, rhs) {
    if (lhs == null && rhs == null) {
      return true;
    }
    if (lhs == null && rhs != null || lhs != null && rhs == null) {
      return false;
    }
    if (Array.isArray(lhs) && Array.isArray(rhs)) {
      if (lhs.length !== rhs.length) {
        return false;
      }
      return lhs.every((x4, i) => x4 === rhs[i]);
    }
    return lhs === rhs;
  }
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/headers.js
var require_headers = __commonJS((exports2, module) => {
  var { kConstruct } = require_symbols2();
  var { kEnumerableProperty } = require_util3();
  var {
    iteratorMixin,
    isValidHeaderName,
    isValidHeaderValue
  } = require_util4();
  var { webidl } = require_webidl();
  var assert2 = __require("node:assert");
  var util3 = __require("node:util");
  function isHTTPWhiteSpaceCharCode(code2) {
    return code2 === 10 || code2 === 13 || code2 === 9 || code2 === 32;
  }
  function headerValueNormalize(potentialValue) {
    let i = 0;
    let j4 = potentialValue.length;
    while (j4 > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j4 - 1)))
      --j4;
    while (j4 > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i)))
      ++i;
    return i === 0 && j4 === potentialValue.length ? potentialValue : potentialValue.substring(i, j4);
  }
  function fill2(headers, object2) {
    if (Array.isArray(object2)) {
      for (let i = 0;i < object2.length; ++i) {
        const header = object2[i];
        if (header.length !== 2) {
          throw webidl.errors.exception({
            header: "Headers constructor",
            message: `expected name/value pair to be length 2, found ${header.length}.`
          });
        }
        appendHeader(headers, header[0], header[1]);
      }
    } else if (typeof object2 === "object" && object2 !== null) {
      const keys = Object.keys(object2);
      for (let i = 0;i < keys.length; ++i) {
        appendHeader(headers, keys[i], object2[keys[i]]);
      }
    } else {
      throw webidl.errors.conversionFailed({
        prefix: "Headers constructor",
        argument: "Argument 1",
        types: ["sequence<sequence<ByteString>>", "record<ByteString, ByteString>"]
      });
    }
  }
  function appendHeader(headers, name3, value) {
    value = headerValueNormalize(value);
    if (!isValidHeaderName(name3)) {
      throw webidl.errors.invalidArgument({
        prefix: "Headers.append",
        value: name3,
        type: "header name"
      });
    } else if (!isValidHeaderValue(value)) {
      throw webidl.errors.invalidArgument({
        prefix: "Headers.append",
        value,
        type: "header value"
      });
    }
    if (getHeadersGuard(headers) === "immutable") {
      throw new TypeError("immutable");
    }
    return getHeadersList(headers).append(name3, value, false);
  }
  function headersListSortAndCombine(target) {
    const headersList = getHeadersList(target);
    if (!headersList) {
      return [];
    }
    if (headersList.sortedMap) {
      return headersList.sortedMap;
    }
    const headers = [];
    const names = headersList.toSortedArray();
    const cookies = headersList.cookies;
    if (cookies === null || cookies.length === 1) {
      return headersList.sortedMap = names;
    }
    for (let i = 0;i < names.length; ++i) {
      const { 0: name3, 1: value } = names[i];
      if (name3 === "set-cookie") {
        for (let j4 = 0;j4 < cookies.length; ++j4) {
          headers.push([name3, cookies[j4]]);
        }
      } else {
        headers.push([name3, value]);
      }
    }
    return headersList.sortedMap = headers;
  }
  function compareHeaderName(a2, b5) {
    return a2[0] < b5[0] ? -1 : 1;
  }

  class HeadersList {
    cookies = null;
    sortedMap;
    headersMap;
    constructor(init4) {
      if (init4 instanceof HeadersList) {
        this.headersMap = new Map(init4.headersMap);
        this.sortedMap = init4.sortedMap;
        this.cookies = init4.cookies === null ? null : [...init4.cookies];
      } else {
        this.headersMap = new Map(init4);
        this.sortedMap = null;
      }
    }
    contains(name3, isLowerCase) {
      return this.headersMap.has(isLowerCase ? name3 : name3.toLowerCase());
    }
    clear() {
      this.headersMap.clear();
      this.sortedMap = null;
      this.cookies = null;
    }
    append(name3, value, isLowerCase) {
      this.sortedMap = null;
      const lowercaseName = isLowerCase ? name3 : name3.toLowerCase();
      const exists2 = this.headersMap.get(lowercaseName);
      if (exists2) {
        const delimiter = lowercaseName === "cookie" ? "; " : ", ";
        this.headersMap.set(lowercaseName, {
          name: exists2.name,
          value: `${exists2.value}${delimiter}${value}`
        });
      } else {
        this.headersMap.set(lowercaseName, { name: name3, value });
      }
      if (lowercaseName === "set-cookie") {
        (this.cookies ??= []).push(value);
      }
    }
    set(name3, value, isLowerCase) {
      this.sortedMap = null;
      const lowercaseName = isLowerCase ? name3 : name3.toLowerCase();
      if (lowercaseName === "set-cookie") {
        this.cookies = [value];
      }
      this.headersMap.set(lowercaseName, { name: name3, value });
    }
    delete(name3, isLowerCase) {
      this.sortedMap = null;
      if (!isLowerCase)
        name3 = name3.toLowerCase();
      if (name3 === "set-cookie") {
        this.cookies = null;
      }
      this.headersMap.delete(name3);
    }
    get(name3, isLowerCase) {
      return this.headersMap.get(isLowerCase ? name3 : name3.toLowerCase())?.value ?? null;
    }
    *[Symbol.iterator]() {
      for (const { 0: name3, 1: { value } } of this.headersMap) {
        yield [name3, value];
      }
    }
    get entries() {
      const headers = {};
      if (this.headersMap.size !== 0) {
        for (const { name: name3, value } of this.headersMap.values()) {
          headers[name3] = value;
        }
      }
      return headers;
    }
    rawValues() {
      return this.headersMap.values();
    }
    get entriesList() {
      const headers = [];
      if (this.headersMap.size !== 0) {
        for (const { 0: lowerName, 1: { name: name3, value } } of this.headersMap) {
          if (lowerName === "set-cookie") {
            for (const cookie2 of this.cookies) {
              headers.push([name3, cookie2]);
            }
          } else {
            headers.push([name3, value]);
          }
        }
      }
      return headers;
    }
    toSortedArray() {
      const size = this.headersMap.size;
      const array2 = new Array(size);
      if (size <= 32) {
        if (size === 0) {
          return array2;
        }
        const iterator = this.headersMap[Symbol.iterator]();
        const firstValue = iterator.next().value;
        array2[0] = [firstValue[0], firstValue[1].value];
        assert2(firstValue[1].value !== null);
        for (let i = 1, j4 = 0, right2 = 0, left2 = 0, pivot = 0, x4, value;i < size; ++i) {
          value = iterator.next().value;
          x4 = array2[i] = [value[0], value[1].value];
          assert2(x4[1] !== null);
          left2 = 0;
          right2 = i;
          while (left2 < right2) {
            pivot = left2 + (right2 - left2 >> 1);
            if (array2[pivot][0] <= x4[0]) {
              left2 = pivot + 1;
            } else {
              right2 = pivot;
            }
          }
          if (i !== pivot) {
            j4 = i;
            while (j4 > left2) {
              array2[j4] = array2[--j4];
            }
            array2[left2] = x4;
          }
        }
        if (!iterator.next().done) {
          throw new TypeError("Unreachable");
        }
        return array2;
      } else {
        let i = 0;
        for (const { 0: name3, 1: { value } } of this.headersMap) {
          array2[i++] = [name3, value];
          assert2(value !== null);
        }
        return array2.sort(compareHeaderName);
      }
    }
  }

  class Headers2 {
    #guard;
    #headersList;
    constructor(init4 = undefined) {
      webidl.util.markAsUncloneable(this);
      if (init4 === kConstruct) {
        return;
      }
      this.#headersList = new HeadersList;
      this.#guard = "none";
      if (init4 !== undefined) {
        init4 = webidl.converters.HeadersInit(init4, "Headers constructor", "init");
        fill2(this, init4);
      }
    }
    append(name3, value) {
      webidl.brandCheck(this, Headers2);
      webidl.argumentLengthCheck(arguments, 2, "Headers.append");
      const prefix = "Headers.append";
      name3 = webidl.converters.ByteString(name3, prefix, "name");
      value = webidl.converters.ByteString(value, prefix, "value");
      return appendHeader(this, name3, value);
    }
    delete(name3) {
      webidl.brandCheck(this, Headers2);
      webidl.argumentLengthCheck(arguments, 1, "Headers.delete");
      const prefix = "Headers.delete";
      name3 = webidl.converters.ByteString(name3, prefix, "name");
      if (!isValidHeaderName(name3)) {
        throw webidl.errors.invalidArgument({
          prefix: "Headers.delete",
          value: name3,
          type: "header name"
        });
      }
      if (this.#guard === "immutable") {
        throw new TypeError("immutable");
      }
      if (!this.#headersList.contains(name3, false)) {
        return;
      }
      this.#headersList.delete(name3, false);
    }
    get(name3) {
      webidl.brandCheck(this, Headers2);
      webidl.argumentLengthCheck(arguments, 1, "Headers.get");
      const prefix = "Headers.get";
      name3 = webidl.converters.ByteString(name3, prefix, "name");
      if (!isValidHeaderName(name3)) {
        throw webidl.errors.invalidArgument({
          prefix,
          value: name3,
          type: "header name"
        });
      }
      return this.#headersList.get(name3, false);
    }
    has(name3) {
      webidl.brandCheck(this, Headers2);
      webidl.argumentLengthCheck(arguments, 1, "Headers.has");
      const prefix = "Headers.has";
      name3 = webidl.converters.ByteString(name3, prefix, "name");
      if (!isValidHeaderName(name3)) {
        throw webidl.errors.invalidArgument({
          prefix,
          value: name3,
          type: "header name"
        });
      }
      return this.#headersList.contains(name3, false);
    }
    set(name3, value) {
      webidl.brandCheck(this, Headers2);
      webidl.argumentLengthCheck(arguments, 2, "Headers.set");
      const prefix = "Headers.set";
      name3 = webidl.converters.ByteString(name3, prefix, "name");
      value = webidl.converters.ByteString(value, prefix, "value");
      value = headerValueNormalize(value);
      if (!isValidHeaderName(name3)) {
        throw webidl.errors.invalidArgument({
          prefix,
          value: name3,
          type: "header name"
        });
      } else if (!isValidHeaderValue(value)) {
        throw webidl.errors.invalidArgument({
          prefix,
          value,
          type: "header value"
        });
      }
      if (this.#guard === "immutable") {
        throw new TypeError("immutable");
      }
      this.#headersList.set(name3, value, false);
    }
    getSetCookie() {
      webidl.brandCheck(this, Headers2);
      const list2 = this.#headersList.cookies;
      if (list2) {
        return [...list2];
      }
      return [];
    }
    [util3.inspect.custom](depth, options2) {
      options2.depth ??= depth;
      return `Headers ${util3.formatWithOptions(options2, this.#headersList.entries)}`;
    }
    static getHeadersGuard(o3) {
      return o3.#guard;
    }
    static setHeadersGuard(o3, guard) {
      o3.#guard = guard;
    }
    static getHeadersList(o3) {
      return o3.#headersList;
    }
    static setHeadersList(target, list2) {
      target.#headersList = list2;
    }
  }
  var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers2;
  Reflect.deleteProperty(Headers2, "getHeadersGuard");
  Reflect.deleteProperty(Headers2, "setHeadersGuard");
  Reflect.deleteProperty(Headers2, "getHeadersList");
  Reflect.deleteProperty(Headers2, "setHeadersList");
  iteratorMixin("Headers", Headers2, headersListSortAndCombine, 0, 1);
  Object.defineProperties(Headers2.prototype, {
    append: kEnumerableProperty,
    delete: kEnumerableProperty,
    get: kEnumerableProperty,
    has: kEnumerableProperty,
    set: kEnumerableProperty,
    getSetCookie: kEnumerableProperty,
    [Symbol.toStringTag]: {
      value: "Headers",
      configurable: true
    },
    [util3.inspect.custom]: {
      enumerable: false
    }
  });
  webidl.converters.HeadersInit = function(V6, prefix, argument) {
    if (webidl.util.Type(V6) === webidl.util.Types.OBJECT) {
      const iterator = Reflect.get(V6, Symbol.iterator);
      if (!util3.types.isProxy(V6) && iterator === Headers2.prototype.entries) {
        try {
          return getHeadersList(V6).entriesList;
        } catch {}
      }
      if (typeof iterator === "function") {
        return webidl.converters["sequence<sequence<ByteString>>"](V6, prefix, argument, iterator.bind(V6));
      }
      return webidl.converters["record<ByteString, ByteString>"](V6, prefix, argument);
    }
    throw webidl.errors.conversionFailed({
      prefix: "Headers constructor",
      argument: "Argument 1",
      types: ["sequence<sequence<ByteString>>", "record<ByteString, ByteString>"]
    });
  };
  module.exports = {
    fill: fill2,
    compareHeaderName,
    Headers: Headers2,
    HeadersList,
    getHeadersGuard,
    setHeadersGuard,
    setHeadersList,
    getHeadersList
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/response.js
var require_response = __commonJS((exports2, module) => {
  var { Headers: Headers2, HeadersList, fill: fill2, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
  var { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require_body();
  var util3 = require_util3();
  var nodeUtil = __require("node:util");
  var { kEnumerableProperty } = util3;
  var {
    isValidReasonPhrase,
    isCancelled,
    isAborted,
    isErrorLike,
    environmentSettingsObject: relevantRealm
  } = require_util4();
  var {
    redirectStatusSet,
    nullBodyStatus
  } = require_constants7();
  var { webidl } = require_webidl();
  var { URLSerializer } = require_data_url();
  var { kConstruct } = require_symbols2();
  var assert2 = __require("node:assert");
  var { isomorphicEncode, serializeJavascriptValueToJSONString } = require_infra();
  var textEncoder = new TextEncoder("utf-8");

  class Response2 {
    #headers;
    #state;
    static error() {
      const responseObject = fromInnerResponse(makeNetworkError(), "immutable");
      return responseObject;
    }
    static json(data, init4 = undefined) {
      webidl.argumentLengthCheck(arguments, 1, "Response.json");
      if (init4 !== null) {
        init4 = webidl.converters.ResponseInit(init4);
      }
      const bytes = textEncoder.encode(serializeJavascriptValueToJSONString(data));
      const body2 = extractBody(bytes);
      const responseObject = fromInnerResponse(makeResponse({}), "response");
      initializeResponse(responseObject, init4, { body: body2[0], type: "application/json" });
      return responseObject;
    }
    static redirect(url2, status = 302) {
      webidl.argumentLengthCheck(arguments, 1, "Response.redirect");
      url2 = webidl.converters.USVString(url2);
      status = webidl.converters["unsigned short"](status);
      let parsedURL;
      try {
        parsedURL = new URL(url2, relevantRealm.settingsObject.baseUrl);
      } catch (err) {
        throw new TypeError(`Failed to parse URL from ${url2}`, { cause: err });
      }
      if (!redirectStatusSet.has(status)) {
        throw new RangeError(`Invalid status code ${status}`);
      }
      const responseObject = fromInnerResponse(makeResponse({}), "immutable");
      responseObject.#state.status = status;
      const value = isomorphicEncode(URLSerializer(parsedURL));
      responseObject.#state.headersList.append("location", value, true);
      return responseObject;
    }
    constructor(body2 = null, init4 = undefined) {
      webidl.util.markAsUncloneable(this);
      if (body2 === kConstruct) {
        return;
      }
      if (body2 !== null) {
        body2 = webidl.converters.BodyInit(body2, "Response", "body");
      }
      init4 = webidl.converters.ResponseInit(init4);
      this.#state = makeResponse({});
      this.#headers = new Headers2(kConstruct);
      setHeadersGuard(this.#headers, "response");
      setHeadersList(this.#headers, this.#state.headersList);
      let bodyWithType = null;
      if (body2 != null) {
        const [extractedBody, type2] = extractBody(body2);
        bodyWithType = { body: extractedBody, type: type2 };
      }
      initializeResponse(this, init4, bodyWithType);
    }
    get type() {
      webidl.brandCheck(this, Response2);
      return this.#state.type;
    }
    get url() {
      webidl.brandCheck(this, Response2);
      const urlList = this.#state.urlList;
      const url2 = urlList[urlList.length - 1] ?? null;
      if (url2 === null) {
        return "";
      }
      return URLSerializer(url2, true);
    }
    get redirected() {
      webidl.brandCheck(this, Response2);
      return this.#state.urlList.length > 1;
    }
    get status() {
      webidl.brandCheck(this, Response2);
      return this.#state.status;
    }
    get ok() {
      webidl.brandCheck(this, Response2);
      return this.#state.status >= 200 && this.#state.status <= 299;
    }
    get statusText() {
      webidl.brandCheck(this, Response2);
      return this.#state.statusText;
    }
    get headers() {
      webidl.brandCheck(this, Response2);
      return this.#headers;
    }
    get body() {
      webidl.brandCheck(this, Response2);
      return this.#state.body ? this.#state.body.stream : null;
    }
    get bodyUsed() {
      webidl.brandCheck(this, Response2);
      return !!this.#state.body && util3.isDisturbed(this.#state.body.stream);
    }
    clone() {
      webidl.brandCheck(this, Response2);
      if (bodyUnusable(this.#state)) {
        throw webidl.errors.exception({
          header: "Response.clone",
          message: "Body has already been consumed."
        });
      }
      const clonedResponse = cloneResponse(this.#state);
      if (this.#state.urlList.length !== 0 && this.#state.body?.stream) {
        streamRegistry.register(this, new WeakRef(this.#state.body.stream));
      }
      return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers));
    }
    [nodeUtil.inspect.custom](depth, options2) {
      if (options2.depth === null) {
        options2.depth = 2;
      }
      options2.colors ??= true;
      const properties2 = {
        status: this.status,
        statusText: this.statusText,
        headers: this.headers,
        body: this.body,
        bodyUsed: this.bodyUsed,
        ok: this.ok,
        redirected: this.redirected,
        type: this.type,
        url: this.url
      };
      return `Response ${nodeUtil.formatWithOptions(options2, properties2)}`;
    }
    static getResponseHeaders(response) {
      return response.#headers;
    }
    static setResponseHeaders(response, newHeaders) {
      response.#headers = newHeaders;
    }
    static getResponseState(response) {
      return response.#state;
    }
    static setResponseState(response, newState) {
      response.#state = newState;
    }
  }
  var { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response2;
  Reflect.deleteProperty(Response2, "getResponseHeaders");
  Reflect.deleteProperty(Response2, "setResponseHeaders");
  Reflect.deleteProperty(Response2, "getResponseState");
  Reflect.deleteProperty(Response2, "setResponseState");
  mixinBody(Response2, getResponseState);
  Object.defineProperties(Response2.prototype, {
    type: kEnumerableProperty,
    url: kEnumerableProperty,
    status: kEnumerableProperty,
    ok: kEnumerableProperty,
    redirected: kEnumerableProperty,
    statusText: kEnumerableProperty,
    headers: kEnumerableProperty,
    clone: kEnumerableProperty,
    body: kEnumerableProperty,
    bodyUsed: kEnumerableProperty,
    [Symbol.toStringTag]: {
      value: "Response",
      configurable: true
    }
  });
  Object.defineProperties(Response2, {
    json: kEnumerableProperty,
    redirect: kEnumerableProperty,
    error: kEnumerableProperty
  });
  function cloneResponse(response) {
    if (response.internalResponse) {
      return filterResponse(cloneResponse(response.internalResponse), response.type);
    }
    const newResponse = makeResponse({ ...response, body: null });
    if (response.body != null) {
      newResponse.body = cloneBody(response.body);
    }
    return newResponse;
  }
  function makeResponse(init4) {
    return {
      aborted: false,
      rangeRequested: false,
      timingAllowPassed: false,
      requestIncludesCredentials: false,
      type: "default",
      status: 200,
      timingInfo: null,
      cacheState: "",
      statusText: "",
      ...init4,
      headersList: init4?.headersList ? new HeadersList(init4?.headersList) : new HeadersList,
      urlList: init4?.urlList ? [...init4.urlList] : []
    };
  }
  function makeNetworkError(reason) {
    const isError3 = isErrorLike(reason);
    return makeResponse({
      type: "error",
      status: 0,
      error: isError3 ? reason : new Error(reason ? String(reason) : reason),
      aborted: reason && reason.name === "AbortError"
    });
  }
  function isNetworkError(response) {
    return response.type === "error" && response.status === 0;
  }
  function makeFilteredResponse(response, state) {
    state = {
      internalResponse: response,
      ...state
    };
    return new Proxy(response, {
      get(target, p3) {
        return p3 in state ? state[p3] : target[p3];
      },
      set(target, p3, value) {
        assert2(!(p3 in state));
        target[p3] = value;
        return true;
      }
    });
  }
  function filterResponse(response, type2) {
    if (type2 === "basic") {
      return makeFilteredResponse(response, {
        type: "basic",
        headersList: response.headersList
      });
    } else if (type2 === "cors") {
      return makeFilteredResponse(response, {
        type: "cors",
        headersList: response.headersList
      });
    } else if (type2 === "opaque") {
      return makeFilteredResponse(response, {
        type: "opaque",
        urlList: [],
        status: 0,
        statusText: "",
        body: null
      });
    } else if (type2 === "opaqueredirect") {
      return makeFilteredResponse(response, {
        type: "opaqueredirect",
        status: 0,
        statusText: "",
        headersList: [],
        body: null
      });
    } else {
      assert2(false);
    }
  }
  function makeAppropriateNetworkError(fetchParams, err = null) {
    assert2(isCancelled(fetchParams));
    return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err }));
  }
  function initializeResponse(response, init4, body2) {
    if (init4.status !== null && (init4.status < 200 || init4.status > 599)) {
      throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');
    }
    if ("statusText" in init4 && init4.statusText != null) {
      if (!isValidReasonPhrase(String(init4.statusText))) {
        throw new TypeError("Invalid statusText");
      }
    }
    if ("status" in init4 && init4.status != null) {
      getResponseState(response).status = init4.status;
    }
    if ("statusText" in init4 && init4.statusText != null) {
      getResponseState(response).statusText = init4.statusText;
    }
    if ("headers" in init4 && init4.headers != null) {
      fill2(getResponseHeaders(response), init4.headers);
    }
    if (body2) {
      if (nullBodyStatus.includes(response.status)) {
        throw webidl.errors.exception({
          header: "Response constructor",
          message: `Invalid response status code ${response.status}`
        });
      }
      getResponseState(response).body = body2.body;
      if (body2.type != null && !getResponseState(response).headersList.contains("content-type", true)) {
        getResponseState(response).headersList.append("content-type", body2.type, true);
      }
    }
  }
  function fromInnerResponse(innerResponse, guard) {
    const response = new Response2(kConstruct);
    setResponseState(response, innerResponse);
    const headers = new Headers2(kConstruct);
    setResponseHeaders(response, headers);
    setHeadersList(headers, innerResponse.headersList);
    setHeadersGuard(headers, guard);
    if (innerResponse.urlList.length !== 0 && innerResponse.body?.stream) {
      streamRegistry.register(response, new WeakRef(innerResponse.body.stream));
    }
    return response;
  }
  webidl.converters.XMLHttpRequestBodyInit = function(V6, prefix, name3) {
    if (typeof V6 === "string") {
      return webidl.converters.USVString(V6, prefix, name3);
    }
    if (webidl.is.Blob(V6)) {
      return V6;
    }
    if (webidl.is.BufferSource(V6)) {
      return V6;
    }
    if (webidl.is.FormData(V6)) {
      return V6;
    }
    if (webidl.is.URLSearchParams(V6)) {
      return V6;
    }
    return webidl.converters.DOMString(V6, prefix, name3);
  };
  webidl.converters.BodyInit = function(V6, prefix, argument) {
    if (webidl.is.ReadableStream(V6)) {
      return V6;
    }
    if (V6?.[Symbol.asyncIterator]) {
      return V6;
    }
    return webidl.converters.XMLHttpRequestBodyInit(V6, prefix, argument);
  };
  webidl.converters.ResponseInit = webidl.dictionaryConverter([
    {
      key: "status",
      converter: webidl.converters["unsigned short"],
      defaultValue: () => 200
    },
    {
      key: "statusText",
      converter: webidl.converters.ByteString,
      defaultValue: () => ""
    },
    {
      key: "headers",
      converter: webidl.converters.HeadersInit
    }
  ]);
  webidl.is.Response = webidl.util.MakeTypeAssertion(Response2);
  module.exports = {
    isNetworkError,
    makeNetworkError,
    makeResponse,
    makeAppropriateNetworkError,
    filterResponse,
    Response: Response2,
    cloneResponse,
    fromInnerResponse,
    getResponseState
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/request.js
var require_request2 = __commonJS((exports2, module) => {
  var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body();
  var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers();
  var util3 = require_util3();
  var nodeUtil = __require("node:util");
  var {
    isValidHTTPToken,
    sameOrigin,
    environmentSettingsObject
  } = require_util4();
  var {
    forbiddenMethodsSet,
    corsSafeListedMethodsSet,
    referrerPolicy,
    requestRedirect,
    requestMode,
    requestCredentials,
    requestCache,
    requestDuplex
  } = require_constants7();
  var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util3;
  var { webidl } = require_webidl();
  var { URLSerializer } = require_data_url();
  var { kConstruct } = require_symbols2();
  var assert2 = __require("node:assert");
  var { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("node:events");
  var kAbortController = Symbol("abortController");
  var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
    signal.removeEventListener("abort", abort);
  });
  var dependentControllerMap = new WeakMap;
  var abortSignalHasEventHandlerLeakWarning;
  try {
    abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0;
  } catch {
    abortSignalHasEventHandlerLeakWarning = false;
  }
  function buildAbort(acRef) {
    return abort;
    function abort() {
      const ac = acRef.deref();
      if (ac !== undefined) {
        requestFinalizer.unregister(abort);
        this.removeEventListener("abort", abort);
        ac.abort(this.reason);
        const controllerList = dependentControllerMap.get(ac.signal);
        if (controllerList !== undefined) {
          if (controllerList.size !== 0) {
            for (const ref of controllerList) {
              const ctrl = ref.deref();
              if (ctrl !== undefined) {
                ctrl.abort(this.reason);
              }
            }
            controllerList.clear();
          }
          dependentControllerMap.delete(ac.signal);
        }
      }
    }
  }
  var patchMethodWarning = false;

  class Request2 {
    #signal;
    #dispatcher;
    #headers;
    #state;
    constructor(input, init4 = undefined) {
      webidl.util.markAsUncloneable(this);
      if (input === kConstruct) {
        return;
      }
      const prefix = "Request constructor";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      input = webidl.converters.RequestInfo(input);
      init4 = webidl.converters.RequestInit(init4);
      let request2 = null;
      let fallbackMode = null;
      const baseUrl = environmentSettingsObject.settingsObject.baseUrl;
      let signal = null;
      if (typeof input === "string") {
        this.#dispatcher = init4.dispatcher;
        let parsedURL;
        try {
          parsedURL = new URL(input, baseUrl);
        } catch (err) {
          throw new TypeError("Failed to parse URL from " + input, { cause: err });
        }
        if (parsedURL.username || parsedURL.password) {
          throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input);
        }
        request2 = makeRequest({ urlList: [parsedURL] });
        fallbackMode = "cors";
      } else {
        assert2(webidl.is.Request(input));
        request2 = input.#state;
        signal = input.#signal;
        this.#dispatcher = init4.dispatcher || input.#dispatcher;
      }
      const origin = environmentSettingsObject.settingsObject.origin;
      let window2 = "client";
      if (request2.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request2.window, origin)) {
        window2 = request2.window;
      }
      if (init4.window != null) {
        throw new TypeError(`'window' option '${window2}' must be null`);
      }
      if ("window" in init4) {
        window2 = "no-window";
      }
      request2 = makeRequest({
        method: request2.method,
        headersList: request2.headersList,
        unsafeRequest: request2.unsafeRequest,
        client: environmentSettingsObject.settingsObject,
        window: window2,
        priority: request2.priority,
        origin: request2.origin,
        referrer: request2.referrer,
        referrerPolicy: request2.referrerPolicy,
        mode: request2.mode,
        credentials: request2.credentials,
        cache: request2.cache,
        redirect: request2.redirect,
        integrity: request2.integrity,
        keepalive: request2.keepalive,
        reloadNavigation: request2.reloadNavigation,
        historyNavigation: request2.historyNavigation,
        urlList: [...request2.urlList]
      });
      const initHasKey = Object.keys(init4).length !== 0;
      if (initHasKey) {
        if (request2.mode === "navigate") {
          request2.mode = "same-origin";
        }
        request2.reloadNavigation = false;
        request2.historyNavigation = false;
        request2.origin = "client";
        request2.referrer = "client";
        request2.referrerPolicy = "";
        request2.url = request2.urlList[request2.urlList.length - 1];
        request2.urlList = [request2.url];
      }
      if (init4.referrer !== undefined) {
        const referrer = init4.referrer;
        if (referrer === "") {
          request2.referrer = "no-referrer";
        } else {
          let parsedReferrer;
          try {
            parsedReferrer = new URL(referrer, baseUrl);
          } catch (err) {
            throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err });
          }
          if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) {
            request2.referrer = "client";
          } else {
            request2.referrer = parsedReferrer;
          }
        }
      }
      if (init4.referrerPolicy !== undefined) {
        request2.referrerPolicy = init4.referrerPolicy;
      }
      let mode;
      if (init4.mode !== undefined) {
        mode = init4.mode;
      } else {
        mode = fallbackMode;
      }
      if (mode === "navigate") {
        throw webidl.errors.exception({
          header: "Request constructor",
          message: "invalid request mode navigate."
        });
      }
      if (mode != null) {
        request2.mode = mode;
      }
      if (init4.credentials !== undefined) {
        request2.credentials = init4.credentials;
      }
      if (init4.cache !== undefined) {
        request2.cache = init4.cache;
      }
      if (request2.cache === "only-if-cached" && request2.mode !== "same-origin") {
        throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");
      }
      if (init4.redirect !== undefined) {
        request2.redirect = init4.redirect;
      }
      if (init4.integrity != null) {
        request2.integrity = String(init4.integrity);
      }
      if (init4.keepalive !== undefined) {
        request2.keepalive = Boolean(init4.keepalive);
      }
      if (init4.method !== undefined) {
        let method = init4.method;
        const mayBeNormalized = normalizedMethodRecords[method];
        if (mayBeNormalized !== undefined) {
          request2.method = mayBeNormalized;
        } else {
          if (!isValidHTTPToken(method)) {
            throw new TypeError(`'${method}' is not a valid HTTP method.`);
          }
          const upperCase = method.toUpperCase();
          if (forbiddenMethodsSet.has(upperCase)) {
            throw new TypeError(`'${method}' HTTP method is unsupported.`);
          }
          method = normalizedMethodRecordsBase[upperCase] ?? method;
          request2.method = method;
        }
        if (!patchMethodWarning && request2.method === "patch") {
          process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", {
            code: "UNDICI-FETCH-patch"
          });
          patchMethodWarning = true;
        }
      }
      if (init4.signal !== undefined) {
        signal = init4.signal;
      }
      this.#state = request2;
      const ac = new AbortController;
      this.#signal = ac.signal;
      if (signal != null) {
        if (signal.aborted) {
          ac.abort(signal.reason);
        } else {
          this[kAbortController] = ac;
          const acRef = new WeakRef(ac);
          const abort = buildAbort(acRef);
          if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) {
            setMaxListeners(1500, signal);
          }
          util3.addAbortListener(signal, abort);
          requestFinalizer.register(ac, { signal, abort }, abort);
        }
      }
      this.#headers = new Headers2(kConstruct);
      setHeadersList(this.#headers, request2.headersList);
      setHeadersGuard(this.#headers, "request");
      if (mode === "no-cors") {
        if (!corsSafeListedMethodsSet.has(request2.method)) {
          throw new TypeError(`'${request2.method} is unsupported in no-cors mode.`);
        }
        setHeadersGuard(this.#headers, "request-no-cors");
      }
      if (initHasKey) {
        const headersList = getHeadersList(this.#headers);
        const headers = init4.headers !== undefined ? init4.headers : new HeadersList(headersList);
        headersList.clear();
        if (headers instanceof HeadersList) {
          for (const { name: name3, value } of headers.rawValues()) {
            headersList.append(name3, value, false);
          }
          headersList.cookies = headers.cookies;
        } else {
          fillHeaders(this.#headers, headers);
        }
      }
      const inputBody = webidl.is.Request(input) ? input.#state.body : null;
      if ((init4.body != null || inputBody != null) && (request2.method === "GET" || request2.method === "HEAD")) {
        throw new TypeError("Request with GET/HEAD method cannot have body.");
      }
      let initBody = null;
      if (init4.body != null) {
        const [extractedBody, contentType] = extractBody(init4.body, request2.keepalive);
        initBody = extractedBody;
        if (contentType && !getHeadersList(this.#headers).contains("content-type", true)) {
          this.#headers.append("content-type", contentType, true);
        }
      }
      const inputOrInitBody = initBody ?? inputBody;
      if (inputOrInitBody != null && inputOrInitBody.source == null) {
        if (initBody != null && init4.duplex == null) {
          throw new TypeError("RequestInit: duplex option is required when sending a body.");
        }
        if (request2.mode !== "same-origin" && request2.mode !== "cors") {
          throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');
        }
        request2.useCORSPreflightFlag = true;
      }
      let finalBody = inputOrInitBody;
      if (initBody == null && inputBody != null) {
        if (bodyUnusable(input.#state)) {
          throw new TypeError("Cannot construct a Request with a Request object that has already been used.");
        }
        const identityTransform = new TransformStream;
        inputBody.stream.pipeThrough(identityTransform);
        finalBody = {
          source: inputBody.source,
          length: inputBody.length,
          stream: identityTransform.readable
        };
      }
      this.#state.body = finalBody;
    }
    get method() {
      webidl.brandCheck(this, Request2);
      return this.#state.method;
    }
    get url() {
      webidl.brandCheck(this, Request2);
      return URLSerializer(this.#state.url);
    }
    get headers() {
      webidl.brandCheck(this, Request2);
      return this.#headers;
    }
    get destination() {
      webidl.brandCheck(this, Request2);
      return this.#state.destination;
    }
    get referrer() {
      webidl.brandCheck(this, Request2);
      if (this.#state.referrer === "no-referrer") {
        return "";
      }
      if (this.#state.referrer === "client") {
        return "about:client";
      }
      return this.#state.referrer.toString();
    }
    get referrerPolicy() {
      webidl.brandCheck(this, Request2);
      return this.#state.referrerPolicy;
    }
    get mode() {
      webidl.brandCheck(this, Request2);
      return this.#state.mode;
    }
    get credentials() {
      webidl.brandCheck(this, Request2);
      return this.#state.credentials;
    }
    get cache() {
      webidl.brandCheck(this, Request2);
      return this.#state.cache;
    }
    get redirect() {
      webidl.brandCheck(this, Request2);
      return this.#state.redirect;
    }
    get integrity() {
      webidl.brandCheck(this, Request2);
      return this.#state.integrity;
    }
    get keepalive() {
      webidl.brandCheck(this, Request2);
      return this.#state.keepalive;
    }
    get isReloadNavigation() {
      webidl.brandCheck(this, Request2);
      return this.#state.reloadNavigation;
    }
    get isHistoryNavigation() {
      webidl.brandCheck(this, Request2);
      return this.#state.historyNavigation;
    }
    get signal() {
      webidl.brandCheck(this, Request2);
      return this.#signal;
    }
    get body() {
      webidl.brandCheck(this, Request2);
      return this.#state.body ? this.#state.body.stream : null;
    }
    get bodyUsed() {
      webidl.brandCheck(this, Request2);
      return !!this.#state.body && util3.isDisturbed(this.#state.body.stream);
    }
    get duplex() {
      webidl.brandCheck(this, Request2);
      return "half";
    }
    clone() {
      webidl.brandCheck(this, Request2);
      if (bodyUnusable(this.#state)) {
        throw new TypeError("unusable");
      }
      const clonedRequest = cloneRequest(this.#state);
      const ac = new AbortController;
      if (this.signal.aborted) {
        ac.abort(this.signal.reason);
      } else {
        let list2 = dependentControllerMap.get(this.signal);
        if (list2 === undefined) {
          list2 = new Set;
          dependentControllerMap.set(this.signal, list2);
        }
        const acRef = new WeakRef(ac);
        list2.add(acRef);
        util3.addAbortListener(ac.signal, buildAbort(acRef));
      }
      return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers));
    }
    [nodeUtil.inspect.custom](depth, options2) {
      if (options2.depth === null) {
        options2.depth = 2;
      }
      options2.colors ??= true;
      const properties2 = {
        method: this.method,
        url: this.url,
        headers: this.headers,
        destination: this.destination,
        referrer: this.referrer,
        referrerPolicy: this.referrerPolicy,
        mode: this.mode,
        credentials: this.credentials,
        cache: this.cache,
        redirect: this.redirect,
        integrity: this.integrity,
        keepalive: this.keepalive,
        isReloadNavigation: this.isReloadNavigation,
        isHistoryNavigation: this.isHistoryNavigation,
        signal: this.signal
      };
      return `Request ${nodeUtil.formatWithOptions(options2, properties2)}`;
    }
    static setRequestSignal(request2, newSignal) {
      request2.#signal = newSignal;
      return request2;
    }
    static getRequestDispatcher(request2) {
      return request2.#dispatcher;
    }
    static setRequestDispatcher(request2, newDispatcher) {
      request2.#dispatcher = newDispatcher;
    }
    static setRequestHeaders(request2, newHeaders) {
      request2.#headers = newHeaders;
    }
    static getRequestState(request2) {
      return request2.#state;
    }
    static setRequestState(request2, newState) {
      request2.#state = newState;
    }
  }
  var { setRequestSignal, getRequestDispatcher, setRequestDispatcher, setRequestHeaders, getRequestState, setRequestState } = Request2;
  Reflect.deleteProperty(Request2, "setRequestSignal");
  Reflect.deleteProperty(Request2, "getRequestDispatcher");
  Reflect.deleteProperty(Request2, "setRequestDispatcher");
  Reflect.deleteProperty(Request2, "setRequestHeaders");
  Reflect.deleteProperty(Request2, "getRequestState");
  Reflect.deleteProperty(Request2, "setRequestState");
  mixinBody(Request2, getRequestState);
  function makeRequest(init4) {
    return {
      method: init4.method ?? "GET",
      localURLsOnly: init4.localURLsOnly ?? false,
      unsafeRequest: init4.unsafeRequest ?? false,
      body: init4.body ?? null,
      client: init4.client ?? null,
      reservedClient: init4.reservedClient ?? null,
      replacesClientId: init4.replacesClientId ?? "",
      window: init4.window ?? "client",
      keepalive: init4.keepalive ?? false,
      serviceWorkers: init4.serviceWorkers ?? "all",
      initiator: init4.initiator ?? "",
      destination: init4.destination ?? "",
      priority: init4.priority ?? null,
      origin: init4.origin ?? "client",
      policyContainer: init4.policyContainer ?? "client",
      referrer: init4.referrer ?? "client",
      referrerPolicy: init4.referrerPolicy ?? "",
      mode: init4.mode ?? "no-cors",
      useCORSPreflightFlag: init4.useCORSPreflightFlag ?? false,
      credentials: init4.credentials ?? "same-origin",
      useCredentials: init4.useCredentials ?? false,
      cache: init4.cache ?? "default",
      redirect: init4.redirect ?? "follow",
      integrity: init4.integrity ?? "",
      cryptoGraphicsNonceMetadata: init4.cryptoGraphicsNonceMetadata ?? "",
      parserMetadata: init4.parserMetadata ?? "",
      reloadNavigation: init4.reloadNavigation ?? false,
      historyNavigation: init4.historyNavigation ?? false,
      userActivation: init4.userActivation ?? false,
      taintedOrigin: init4.taintedOrigin ?? false,
      redirectCount: init4.redirectCount ?? 0,
      responseTainting: init4.responseTainting ?? "basic",
      preventNoCacheCacheControlHeaderModification: init4.preventNoCacheCacheControlHeaderModification ?? false,
      done: init4.done ?? false,
      timingAllowFailed: init4.timingAllowFailed ?? false,
      useURLCredentials: init4.useURLCredentials ?? undefined,
      traversableForUserPrompts: init4.traversableForUserPrompts ?? "client",
      urlList: init4.urlList,
      url: init4.urlList[0],
      headersList: init4.headersList ? new HeadersList(init4.headersList) : new HeadersList
    };
  }
  function cloneRequest(request2) {
    const newRequest = makeRequest({ ...request2, body: null });
    if (request2.body != null) {
      newRequest.body = cloneBody(request2.body);
    }
    return newRequest;
  }
  function fromInnerRequest(innerRequest, dispatcher, signal, guard) {
    const request2 = new Request2(kConstruct);
    setRequestState(request2, innerRequest);
    setRequestDispatcher(request2, dispatcher);
    setRequestSignal(request2, signal);
    const headers = new Headers2(kConstruct);
    setRequestHeaders(request2, headers);
    setHeadersList(headers, innerRequest.headersList);
    setHeadersGuard(headers, guard);
    return request2;
  }
  Object.defineProperties(Request2.prototype, {
    method: kEnumerableProperty,
    url: kEnumerableProperty,
    headers: kEnumerableProperty,
    redirect: kEnumerableProperty,
    clone: kEnumerableProperty,
    signal: kEnumerableProperty,
    duplex: kEnumerableProperty,
    destination: kEnumerableProperty,
    body: kEnumerableProperty,
    bodyUsed: kEnumerableProperty,
    isHistoryNavigation: kEnumerableProperty,
    isReloadNavigation: kEnumerableProperty,
    keepalive: kEnumerableProperty,
    integrity: kEnumerableProperty,
    cache: kEnumerableProperty,
    credentials: kEnumerableProperty,
    attribute: kEnumerableProperty,
    referrerPolicy: kEnumerableProperty,
    referrer: kEnumerableProperty,
    mode: kEnumerableProperty,
    [Symbol.toStringTag]: {
      value: "Request",
      configurable: true
    }
  });
  webidl.is.Request = webidl.util.MakeTypeAssertion(Request2);
  webidl.converters.RequestInfo = function(V6) {
    if (typeof V6 === "string") {
      return webidl.converters.USVString(V6);
    }
    if (webidl.is.Request(V6)) {
      return V6;
    }
    return webidl.converters.USVString(V6);
  };
  webidl.converters.RequestInit = webidl.dictionaryConverter([
    {
      key: "method",
      converter: webidl.converters.ByteString
    },
    {
      key: "headers",
      converter: webidl.converters.HeadersInit
    },
    {
      key: "body",
      converter: webidl.nullableConverter(webidl.converters.BodyInit)
    },
    {
      key: "referrer",
      converter: webidl.converters.USVString
    },
    {
      key: "referrerPolicy",
      converter: webidl.converters.DOMString,
      allowedValues: referrerPolicy
    },
    {
      key: "mode",
      converter: webidl.converters.DOMString,
      allowedValues: requestMode
    },
    {
      key: "credentials",
      converter: webidl.converters.DOMString,
      allowedValues: requestCredentials
    },
    {
      key: "cache",
      converter: webidl.converters.DOMString,
      allowedValues: requestCache
    },
    {
      key: "redirect",
      converter: webidl.converters.DOMString,
      allowedValues: requestRedirect
    },
    {
      key: "integrity",
      converter: webidl.converters.DOMString
    },
    {
      key: "keepalive",
      converter: webidl.converters.boolean
    },
    {
      key: "signal",
      converter: webidl.nullableConverter((signal) => webidl.converters.AbortSignal(signal, "RequestInit", "signal"))
    },
    {
      key: "window",
      converter: webidl.converters.any
    },
    {
      key: "duplex",
      converter: webidl.converters.DOMString,
      allowedValues: requestDuplex
    },
    {
      key: "dispatcher",
      converter: webidl.converters.any
    },
    {
      key: "priority",
      converter: webidl.converters.DOMString,
      allowedValues: ["high", "low", "auto"],
      defaultValue: () => "auto"
    }
  ]);
  module.exports = {
    Request: Request2,
    makeRequest,
    fromInnerRequest,
    cloneRequest,
    getRequestDispatcher,
    getRequestState
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js
var require_subresource_integrity = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { runtimeFeatures } = require_runtime_features();
  var validSRIHashAlgorithmTokenSet = new Map([["sha256", 0], ["sha384", 1], ["sha512", 2]]);
  var crypto3;
  if (runtimeFeatures.has("crypto")) {
    crypto3 = __require("node:crypto");
    const cryptoHashes = crypto3.getHashes();
    if (cryptoHashes.length === 0) {
      validSRIHashAlgorithmTokenSet.clear();
    }
    for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) {
      if (cryptoHashes.includes(algorithm) === false) {
        validSRIHashAlgorithmTokenSet.delete(algorithm);
      }
    }
  } else {
    validSRIHashAlgorithmTokenSet.clear();
  }
  var getSRIHashAlgorithmIndex = Map.prototype.get.bind(validSRIHashAlgorithmTokenSet);
  var isValidSRIHashAlgorithm = Map.prototype.has.bind(validSRIHashAlgorithmTokenSet);
  var bytesMatch = runtimeFeatures.has("crypto") === false || validSRIHashAlgorithmTokenSet.size === 0 ? () => true : (bytes, metadataList) => {
    const parsedMetadata = parseMetadata(metadataList);
    if (parsedMetadata.length === 0) {
      return true;
    }
    const metadata = getStrongestMetadata(parsedMetadata);
    for (const item of metadata) {
      const algorithm = item.alg;
      const expectedValue = item.val;
      const actualValue = applyAlgorithmToBytes(algorithm, bytes);
      if (caseSensitiveMatch(actualValue, expectedValue)) {
        return true;
      }
    }
    return false;
  };
  function getStrongestMetadata(metadataList) {
    const result = [];
    let strongest = null;
    for (const item of metadataList) {
      assert2(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token");
      if (result.length === 0) {
        result.push(item);
        strongest = item;
        continue;
      }
      const currentAlgorithm = strongest.alg;
      const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm);
      const newAlgorithm = item.alg;
      const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm);
      if (newAlgorithmIndex < currentAlgorithmIndex) {
        continue;
      } else if (newAlgorithmIndex > currentAlgorithmIndex) {
        strongest = item;
        result[0] = item;
        result.length = 1;
      } else {
        result.push(item);
      }
    }
    return result;
  }
  function parseMetadata(metadata) {
    const result = [];
    for (const item of metadata.split(" ")) {
      const expressionAndOptions = item.split("?", 1);
      const algorithmExpression = expressionAndOptions[0];
      let base64Value = "";
      const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)];
      const algorithm = algorithmAndValue[0];
      if (!isValidSRIHashAlgorithm(algorithm)) {
        continue;
      }
      if (algorithmAndValue[1]) {
        base64Value = algorithmAndValue[1];
      }
      const metadata2 = {
        alg: algorithm,
        val: base64Value
      };
      result.push(metadata2);
    }
    return result;
  }
  var applyAlgorithmToBytes = (algorithm, bytes) => {
    return crypto3.hash(algorithm, bytes, "base64");
  };
  function caseSensitiveMatch(actualValue, expectedValue) {
    let actualValueLength = actualValue.length;
    if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") {
      actualValueLength -= 1;
    }
    if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") {
      actualValueLength -= 1;
    }
    let expectedValueLength = expectedValue.length;
    if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") {
      expectedValueLength -= 1;
    }
    if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") {
      expectedValueLength -= 1;
    }
    if (actualValueLength !== expectedValueLength) {
      return false;
    }
    for (let i = 0;i < actualValueLength; ++i) {
      if (actualValue[i] === expectedValue[i] || actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") {
        continue;
      }
      return false;
    }
    return true;
  }
  module.exports = {
    applyAlgorithmToBytes,
    bytesMatch,
    caseSensitiveMatch,
    isValidSRIHashAlgorithm,
    getStrongestMetadata,
    parseMetadata
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/fetch/index.js
var require_fetch = __commonJS((exports2, module) => {
  var {
    makeNetworkError,
    makeAppropriateNetworkError,
    filterResponse,
    makeResponse,
    fromInnerResponse,
    getResponseState
  } = require_response();
  var { HeadersList } = require_headers();
  var { Request: Request2, cloneRequest, getRequestDispatcher, getRequestState } = require_request2();
  var zlib = __require("node:zlib");
  var {
    makePolicyContainer,
    clonePolicyContainer,
    requestBadPort,
    TAOCheck,
    appendRequestOriginHeader,
    responseLocationURL,
    requestCurrentURL,
    setRequestReferrerPolicyOnRedirect,
    tryUpgradeRequestToAPotentiallyTrustworthyURL,
    createOpaqueTimingInfo,
    appendFetchMetadata,
    corsCheck,
    crossOriginResourcePolicyCheck,
    determineRequestsReferrer,
    coarsenedSharedCurrentTime,
    sameOrigin,
    isCancelled,
    isAborted,
    isErrorLike,
    fullyReadBody,
    readableStreamClose,
    urlIsLocal,
    urlIsHttpHttpsScheme,
    urlHasHttpsScheme,
    clampAndCoarsenConnectionTimingInfo,
    simpleRangeHeaderValue,
    buildContentRange,
    createInflate,
    extractMimeType,
    hasAuthenticationEntry,
    includesCredentials,
    isTraversableNavigable
  } = require_util4();
  var assert2 = __require("node:assert");
  var { safelyExtractBody, extractBody } = require_body();
  var {
    redirectStatusSet,
    nullBodyStatus,
    safeMethodsSet,
    requestBodyHeader,
    subresourceSet
  } = require_constants7();
  var EE = __require("node:events");
  var { Readable: Readable2, pipeline, finished, isErrored, isReadable } = __require("node:stream");
  var { addAbortListener, bufferToLowerCasedHeaderName } = require_util3();
  var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url();
  var { getGlobalDispatcher } = require_global2();
  var { webidl } = require_webidl();
  var { STATUS_CODES } = __require("node:http");
  var { bytesMatch } = require_subresource_integrity();
  var { createDeferredPromise } = require_promise3();
  var { isomorphicEncode } = require_infra();
  var { runtimeFeatures } = require_runtime_features();
  var hasZstd = runtimeFeatures.has("zstd");
  var GET_OR_HEAD = ["GET", "HEAD"];
  var defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici";
  var resolveObjectURL;

  class Fetch extends EE {
    constructor(dispatcher) {
      super();
      this.dispatcher = dispatcher;
      this.connection = null;
      this.dump = false;
      this.state = "ongoing";
    }
    terminate(reason) {
      if (this.state !== "ongoing") {
        return;
      }
      this.state = "terminated";
      this.connection?.destroy(reason);
      this.emit("terminated", reason);
    }
    abort(error49) {
      if (this.state !== "ongoing") {
        return;
      }
      this.state = "aborted";
      if (!error49) {
        error49 = new DOMException("The operation was aborted.", "AbortError");
      }
      this.serializedAbortReason = error49;
      this.connection?.destroy(error49);
      this.emit("terminated", error49);
    }
  }
  function handleFetchDone(response) {
    finalizeAndReportTiming(response, "fetch");
  }
  function fetch2(input, init4 = undefined) {
    webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch");
    let p3 = createDeferredPromise();
    let requestObject;
    try {
      requestObject = new Request2(input, init4);
    } catch (e3) {
      p3.reject(e3);
      return p3.promise;
    }
    const request2 = getRequestState(requestObject);
    if (requestObject.signal.aborted) {
      abortFetch(p3, request2, null, requestObject.signal.reason, null);
      return p3.promise;
    }
    const globalObject = request2.client.globalObject;
    if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") {
      request2.serviceWorkers = "none";
    }
    let responseObject = null;
    let locallyAborted = false;
    let controller = null;
    addAbortListener(requestObject.signal, () => {
      locallyAborted = true;
      assert2(controller != null);
      controller.abort(requestObject.signal.reason);
      const realResponse = responseObject?.deref();
      abortFetch(p3, request2, realResponse, requestObject.signal.reason, controller.controller);
    });
    const processResponse = (response) => {
      if (locallyAborted) {
        return;
      }
      if (response.aborted) {
        abortFetch(p3, request2, responseObject, controller.serializedAbortReason, controller.controller);
        return;
      }
      if (response.type === "error") {
        p3.reject(new TypeError("fetch failed", { cause: response.error }));
        return;
      }
      responseObject = new WeakRef(fromInnerResponse(response, "immutable"));
      p3.resolve(responseObject.deref());
      p3 = null;
    };
    controller = fetching({
      request: request2,
      processResponseEndOfBody: handleFetchDone,
      processResponse,
      dispatcher: getRequestDispatcher(requestObject),
      requestObject
    });
    return p3.promise;
  }
  function finalizeAndReportTiming(response, initiatorType = "other") {
    if (response.type === "error" && response.aborted) {
      return;
    }
    if (!response.urlList?.length) {
      return;
    }
    const originalURL = response.urlList[0];
    let timingInfo = response.timingInfo;
    let cacheState = response.cacheState;
    if (!urlIsHttpHttpsScheme(originalURL)) {
      return;
    }
    if (timingInfo === null) {
      return;
    }
    if (!response.timingAllowPassed) {
      timingInfo = createOpaqueTimingInfo({
        startTime: timingInfo.startTime
      });
      cacheState = "";
    }
    timingInfo.endTime = coarsenedSharedCurrentTime();
    response.timingInfo = timingInfo;
    markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState, "", response.status);
  }
  var markResourceTiming = performance.markResourceTiming;
  function abortFetch(p3, request2, responseObject, error49, controller) {
    if (p3) {
      p3.reject(error49);
    }
    if (request2.body?.stream != null && isReadable(request2.body.stream)) {
      request2.body.stream.cancel(error49).catch((err) => {
        if (err.code === "ERR_INVALID_STATE") {
          return;
        }
        throw err;
      });
    }
    if (responseObject == null) {
      return;
    }
    const response = getResponseState(responseObject);
    if (response.body?.stream != null && isReadable(response.body.stream)) {
      controller.error(error49);
    }
  }
  function fetching({
    request: request2,
    processRequestBodyChunkLength,
    processRequestEndOfBody,
    processResponse,
    processResponseEndOfBody,
    processResponseConsumeBody,
    useParallelQueue = false,
    dispatcher = getGlobalDispatcher(),
    requestObject = null
  }) {
    assert2(dispatcher);
    let taskDestination = null;
    let crossOriginIsolatedCapability = false;
    if (request2.client != null) {
      taskDestination = request2.client.globalObject;
      crossOriginIsolatedCapability = request2.client.crossOriginIsolatedCapability;
    }
    const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability);
    const timingInfo = createOpaqueTimingInfo({
      startTime: currentTime
    });
    const fetchParams = {
      controller: new Fetch(dispatcher),
      request: request2,
      timingInfo,
      processRequestBodyChunkLength,
      processRequestEndOfBody,
      processResponse,
      processResponseConsumeBody,
      processResponseEndOfBody,
      taskDestination,
      crossOriginIsolatedCapability,
      requestObject
    };
    assert2(!request2.body || request2.body.stream);
    if (request2.window === "client") {
      request2.window = request2.client?.globalObject?.constructor?.name === "Window" ? request2.client : "no-window";
    }
    if (request2.origin === "client") {
      request2.origin = request2.client.origin;
    }
    if (request2.policyContainer === "client") {
      if (request2.client != null) {
        request2.policyContainer = clonePolicyContainer(request2.client.policyContainer);
      } else {
        request2.policyContainer = makePolicyContainer();
      }
    }
    if (!request2.headersList.contains("accept", true)) {
      const value = "*/*";
      request2.headersList.append("accept", value, true);
    }
    if (!request2.headersList.contains("accept-language", true)) {
      request2.headersList.append("accept-language", "*", true);
    }
    if (request2.priority === null) {}
    if (subresourceSet.has(request2.destination)) {}
    mainFetch(fetchParams, false);
    return fetchParams.controller;
  }
  async function mainFetch(fetchParams, recursive) {
    try {
      const request2 = fetchParams.request;
      let response = null;
      if (request2.localURLsOnly && !urlIsLocal(requestCurrentURL(request2))) {
        response = makeNetworkError("local URLs only");
      }
      tryUpgradeRequestToAPotentiallyTrustworthyURL(request2);
      if (requestBadPort(request2) === "blocked") {
        response = makeNetworkError("bad port");
      }
      if (request2.referrerPolicy === "") {
        request2.referrerPolicy = request2.policyContainer.referrerPolicy;
      }
      if (request2.referrer !== "no-referrer") {
        request2.referrer = determineRequestsReferrer(request2);
      }
      if (response === null) {
        const currentURL = requestCurrentURL(request2);
        if (sameOrigin(currentURL, request2.url) && request2.responseTainting === "basic" || currentURL.protocol === "data:" || (request2.mode === "navigate" || request2.mode === "websocket")) {
          request2.responseTainting = "basic";
          response = await schemeFetch(fetchParams);
        } else if (request2.mode === "same-origin") {
          response = makeNetworkError('request mode cannot be "same-origin"');
        } else if (request2.mode === "no-cors") {
          if (request2.redirect !== "follow") {
            response = makeNetworkError('redirect mode cannot be "follow" for "no-cors" request');
          } else {
            request2.responseTainting = "opaque";
            response = await schemeFetch(fetchParams);
          }
        } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request2))) {
          response = makeNetworkError("URL scheme must be a HTTP(S) scheme");
        } else {
          request2.responseTainting = "cors";
          response = await httpFetch(fetchParams);
        }
      }
      if (recursive) {
        return response;
      }
      if (response.status !== 0 && !response.internalResponse) {
        if (request2.responseTainting === "cors") {}
        if (request2.responseTainting === "basic") {
          response = filterResponse(response, "basic");
        } else if (request2.responseTainting === "cors") {
          response = filterResponse(response, "cors");
        } else if (request2.responseTainting === "opaque") {
          response = filterResponse(response, "opaque");
        } else {
          assert2(false);
        }
      }
      let internalResponse = response.status === 0 ? response : response.internalResponse;
      if (internalResponse.urlList.length === 0) {
        internalResponse.urlList.push(...request2.urlList);
      }
      if (!request2.timingAllowFailed) {
        response.timingAllowPassed = true;
      }
      if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request2.headers.contains("range", true)) {
        response = internalResponse = makeNetworkError();
      }
      if (response.status !== 0 && (request2.method === "HEAD" || request2.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) {
        internalResponse.body = null;
        fetchParams.controller.dump = true;
      }
      if (request2.integrity) {
        const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason));
        if (request2.responseTainting === "opaque" || response.body == null) {
          processBodyError(response.error);
          return;
        }
        const processBody = (bytes) => {
          if (!bytesMatch(bytes, request2.integrity)) {
            processBodyError("integrity mismatch");
            return;
          }
          response.body = safelyExtractBody(bytes)[0];
          fetchFinale(fetchParams, response);
        };
        fullyReadBody(response.body, processBody, processBodyError);
      } else {
        fetchFinale(fetchParams, response);
      }
    } catch (err) {
      fetchParams.controller.terminate(err);
    }
  }
  function schemeFetch(fetchParams) {
    if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {
      return Promise.resolve(makeAppropriateNetworkError(fetchParams));
    }
    const { request: request2 } = fetchParams;
    const { protocol: scheme } = requestCurrentURL(request2);
    switch (scheme) {
      case "about:": {
        return Promise.resolve(makeNetworkError("about scheme is not supported"));
      }
      case "blob:": {
        if (!resolveObjectURL) {
          resolveObjectURL = __require("node:buffer").resolveObjectURL;
        }
        const blobURLEntry = requestCurrentURL(request2);
        if (blobURLEntry.search.length !== 0) {
          return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource."));
        }
        const blob = resolveObjectURL(blobURLEntry.toString());
        if (request2.method !== "GET" || !webidl.is.Blob(blob)) {
          return Promise.resolve(makeNetworkError("invalid method"));
        }
        const response = makeResponse();
        const fullLength = blob.size;
        const serializedFullLength = isomorphicEncode(`${fullLength}`);
        const type2 = blob.type;
        if (!request2.headersList.contains("range", true)) {
          const bodyWithType = extractBody(blob);
          response.statusText = "OK";
          response.body = bodyWithType[0];
          response.headersList.set("content-length", serializedFullLength, true);
          response.headersList.set("content-type", type2, true);
        } else {
          response.rangeRequested = true;
          const rangeHeader = request2.headersList.get("range", true);
          const rangeValue = simpleRangeHeaderValue(rangeHeader, true);
          if (rangeValue === "failure") {
            return Promise.resolve(makeNetworkError("failed to fetch the data URL"));
          }
          let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue;
          if (rangeStart === null) {
            rangeStart = fullLength - rangeEnd;
            rangeEnd = rangeStart + rangeEnd - 1;
          } else {
            if (rangeStart >= fullLength) {
              return Promise.resolve(makeNetworkError("Range start is greater than the blob's size."));
            }
            if (rangeEnd === null || rangeEnd >= fullLength) {
              rangeEnd = fullLength - 1;
            }
          }
          const slicedBlob = blob.slice(rangeStart, rangeEnd + 1, type2);
          const slicedBodyWithType = extractBody(slicedBlob);
          response.body = slicedBodyWithType[0];
          const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`);
          const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength);
          response.status = 206;
          response.statusText = "Partial Content";
          response.headersList.set("content-length", serializedSlicedLength, true);
          response.headersList.set("content-type", type2, true);
          response.headersList.set("content-range", contentRange, true);
        }
        return Promise.resolve(response);
      }
      case "data:": {
        const currentURL = requestCurrentURL(request2);
        const dataURLStruct = dataURLProcessor(currentURL);
        if (dataURLStruct === "failure") {
          return Promise.resolve(makeNetworkError("failed to fetch the data URL"));
        }
        const mimeType = serializeAMimeType(dataURLStruct.mimeType);
        return Promise.resolve(makeResponse({
          statusText: "OK",
          headersList: [
            ["content-type", { name: "Content-Type", value: mimeType }]
          ],
          body: safelyExtractBody(dataURLStruct.body)[0]
        }));
      }
      case "file:": {
        return Promise.resolve(makeNetworkError("not implemented... yet..."));
      }
      case "http:":
      case "https:": {
        return httpFetch(fetchParams).catch((err) => makeNetworkError(err));
      }
      default: {
        return Promise.resolve(makeNetworkError("unknown scheme"));
      }
    }
  }
  function finalizeResponse(fetchParams, response) {
    fetchParams.request.done = true;
    if (fetchParams.processResponseDone != null) {
      queueMicrotask(() => fetchParams.processResponseDone(response));
    }
  }
  function fetchFinale(fetchParams, response) {
    let timingInfo = fetchParams.timingInfo;
    const processResponseEndOfBody = () => {
      const unsafeEndTime = Date.now();
      if (fetchParams.request.destination === "document") {
        fetchParams.controller.fullTimingInfo = timingInfo;
      }
      fetchParams.controller.reportTimingSteps = () => {
        if (!urlIsHttpHttpsScheme(fetchParams.request.url)) {
          return;
        }
        timingInfo.endTime = unsafeEndTime;
        let cacheState = response.cacheState;
        const bodyInfo = response.bodyInfo;
        if (!response.timingAllowPassed) {
          timingInfo = createOpaqueTimingInfo(timingInfo);
          cacheState = "";
        }
        let responseStatus = 0;
        if (fetchParams.request.mode !== "navigate" || !response.hasCrossOriginRedirects) {
          responseStatus = response.status;
          const mimeType = extractMimeType(response.headersList);
          if (mimeType !== "failure") {
            bodyInfo.contentType = minimizeSupportedMimeType(mimeType);
          }
        }
        if (fetchParams.request.initiatorType != null) {
          markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus);
        }
      };
      const processResponseEndOfBodyTask = () => {
        fetchParams.request.done = true;
        if (fetchParams.processResponseEndOfBody != null) {
          queueMicrotask(() => fetchParams.processResponseEndOfBody(response));
        }
        if (fetchParams.request.initiatorType != null) {
          fetchParams.controller.reportTimingSteps();
        }
      };
      queueMicrotask(() => processResponseEndOfBodyTask());
    };
    if (fetchParams.processResponse != null) {
      queueMicrotask(() => {
        fetchParams.processResponse(response);
        fetchParams.processResponse = null;
      });
    }
    const internalResponse = response.type === "error" ? response : response.internalResponse ?? response;
    if (internalResponse.body == null) {
      processResponseEndOfBody();
    } else {
      finished(internalResponse.body.stream, () => {
        processResponseEndOfBody();
      });
    }
  }
  async function httpFetch(fetchParams) {
    const request2 = fetchParams.request;
    let response = null;
    let actualResponse = null;
    const timingInfo = fetchParams.timingInfo;
    if (request2.serviceWorkers === "all") {}
    if (response === null) {
      if (request2.redirect === "follow") {
        request2.serviceWorkers = "none";
      }
      actualResponse = response = await httpNetworkOrCacheFetch(fetchParams);
      if (request2.responseTainting === "cors" && corsCheck(request2, response) === "failure") {
        return makeNetworkError("cors failure");
      }
      if (TAOCheck(request2, response) === "failure") {
        request2.timingAllowFailed = true;
      }
    }
    if ((request2.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request2.origin, request2.client, request2.destination, actualResponse) === "blocked") {
      return makeNetworkError("blocked");
    }
    if (redirectStatusSet.has(actualResponse.status)) {
      if (request2.redirect !== "manual") {
        fetchParams.controller.connection.destroy(undefined, false);
      }
      if (request2.redirect === "error") {
        response = makeNetworkError("unexpected redirect");
      } else if (request2.redirect === "manual") {
        response = actualResponse;
      } else if (request2.redirect === "follow") {
        response = await httpRedirectFetch(fetchParams, response);
      } else {
        assert2(false);
      }
    }
    response.timingInfo = timingInfo;
    return response;
  }
  function httpRedirectFetch(fetchParams, response) {
    const request2 = fetchParams.request;
    const actualResponse = response.internalResponse ? response.internalResponse : response;
    let locationURL;
    try {
      locationURL = responseLocationURL(actualResponse, requestCurrentURL(request2).hash);
      if (locationURL == null) {
        return response;
      }
    } catch (err) {
      return Promise.resolve(makeNetworkError(err));
    }
    if (!urlIsHttpHttpsScheme(locationURL)) {
      return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme"));
    }
    if (request2.redirectCount === 20) {
      return Promise.resolve(makeNetworkError("redirect count exceeded"));
    }
    request2.redirectCount += 1;
    if (request2.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request2, locationURL)) {
      return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"'));
    }
    if (request2.responseTainting === "cors" && (locationURL.username || locationURL.password)) {
      return Promise.resolve(makeNetworkError('URL cannot contain credentials for request mode "cors"'));
    }
    if (actualResponse.status !== 303 && request2.body != null && request2.body.source == null) {
      return Promise.resolve(makeNetworkError());
    }
    if ([301, 302].includes(actualResponse.status) && request2.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request2.method)) {
      request2.method = "GET";
      request2.body = null;
      for (const headerName of requestBodyHeader) {
        request2.headersList.delete(headerName);
      }
    }
    if (!sameOrigin(requestCurrentURL(request2), locationURL)) {
      request2.headersList.delete("authorization", true);
      request2.headersList.delete("proxy-authorization", true);
      request2.headersList.delete("cookie", true);
      request2.headersList.delete("host", true);
    }
    if (request2.body != null) {
      assert2(request2.body.source != null);
      request2.body = safelyExtractBody(request2.body.source)[0];
    }
    const timingInfo = fetchParams.timingInfo;
    timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability);
    if (timingInfo.redirectStartTime === 0) {
      timingInfo.redirectStartTime = timingInfo.startTime;
    }
    request2.urlList.push(locationURL);
    setRequestReferrerPolicyOnRedirect(request2, actualResponse);
    return mainFetch(fetchParams, true);
  }
  async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) {
    const request2 = fetchParams.request;
    let httpFetchParams = null;
    let httpRequest = null;
    let response = null;
    const httpCache = null;
    const revalidatingFlag = false;
    if (request2.window === "no-window" && request2.redirect === "error") {
      httpFetchParams = fetchParams;
      httpRequest = request2;
    } else {
      httpRequest = cloneRequest(request2);
      httpFetchParams = { ...fetchParams };
      httpFetchParams.request = httpRequest;
    }
    const includeCredentials = request2.credentials === "include" || request2.credentials === "same-origin" && request2.responseTainting === "basic";
    const contentLength = httpRequest.body ? httpRequest.body.length : null;
    let contentLengthHeaderValue = null;
    if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) {
      contentLengthHeaderValue = "0";
    }
    if (contentLength != null) {
      contentLengthHeaderValue = isomorphicEncode(`${contentLength}`);
    }
    if (contentLengthHeaderValue != null && !httpRequest.headersList.contains("content-length", true)) {
      httpRequest.headersList.append("content-length", contentLengthHeaderValue, true);
    }
    if (contentLength != null && httpRequest.keepalive) {}
    if (webidl.is.URL(httpRequest.referrer)) {
      httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true);
    }
    appendRequestOriginHeader(httpRequest);
    appendFetchMetadata(httpRequest);
    if (!httpRequest.headersList.contains("user-agent", true)) {
      httpRequest.headersList.append("user-agent", defaultUserAgent, true);
    }
    if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) {
      httpRequest.cache = "no-store";
    }
    if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) {
      httpRequest.headersList.append("cache-control", "max-age=0", true);
    }
    if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") {
      if (!httpRequest.headersList.contains("pragma", true)) {
        httpRequest.headersList.append("pragma", "no-cache", true);
      }
      if (!httpRequest.headersList.contains("cache-control", true)) {
        httpRequest.headersList.append("cache-control", "no-cache", true);
      }
    }
    if (httpRequest.headersList.contains("range", true)) {
      httpRequest.headersList.append("accept-encoding", "identity", true);
    }
    if (!httpRequest.headersList.contains("accept-encoding", true)) {
      if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {
        httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true);
      } else {
        httpRequest.headersList.append("accept-encoding", "gzip, deflate", true);
      }
    }
    httpRequest.headersList.delete("host", true);
    if (includeCredentials) {
      if (!httpRequest.headersList.contains("authorization", true)) {
        let authorizationValue = null;
        if (hasAuthenticationEntry(httpRequest) && (httpRequest.useURLCredentials === undefined || !includesCredentials(requestCurrentURL(httpRequest)))) {} else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) {
          const { username, password } = requestCurrentURL(httpRequest);
          authorizationValue = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`;
        }
        if (authorizationValue !== null) {
          httpRequest.headersList.append("Authorization", authorizationValue, false);
        }
      }
    }
    if (httpCache == null) {
      httpRequest.cache = "no-store";
    }
    if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {}
    if (response == null) {
      if (httpRequest.cache === "only-if-cached") {
        return makeNetworkError("only if cached");
      }
      const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch);
      if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {}
      if (revalidatingFlag && forwardResponse.status === 304) {}
      if (response == null) {
        response = forwardResponse;
      }
    }
    response.urlList = [...httpRequest.urlList];
    if (httpRequest.headersList.contains("range", true)) {
      response.rangeRequested = true;
    }
    response.requestIncludesCredentials = includeCredentials;
    if (response.status === 401 && httpRequest.responseTainting !== "cors" && includeCredentials && (request2.useURLCredentials !== undefined || isTraversableNavigable(request2.traversableForUserPrompts))) {
      if (request2.body != null) {
        if (request2.body.source == null) {
          return response;
        }
        request2.body = safelyExtractBody(request2.body.source)[0];
      }
      if (request2.useURLCredentials === undefined || isAuthenticationFetch) {
        if (isCancelled(fetchParams)) {
          return makeAppropriateNetworkError(fetchParams);
        }
        return response;
      }
      fetchParams.controller.connection.destroy();
      response = await httpNetworkOrCacheFetch(fetchParams, true);
    }
    if (response.status === 407) {
      if (request2.window === "no-window") {
        return makeNetworkError();
      }
      if (isCancelled(fetchParams)) {
        return makeAppropriateNetworkError(fetchParams);
      }
      return makeNetworkError("proxy authentication required");
    }
    if (response.status === 421 && !isNewConnectionFetch && (request2.body == null || request2.body.source != null)) {
      if (isCancelled(fetchParams)) {
        return makeAppropriateNetworkError(fetchParams);
      }
      fetchParams.controller.connection.destroy();
      response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true);
    }
    if (isAuthenticationFetch) {}
    return response;
  }
  async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) {
    assert2(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed);
    fetchParams.controller.connection = {
      abort: null,
      destroyed: false,
      destroy(err, abort = true) {
        if (!this.destroyed) {
          this.destroyed = true;
          if (abort) {
            this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError"));
          }
        }
      }
    };
    const request2 = fetchParams.request;
    let response = null;
    const timingInfo = fetchParams.timingInfo;
    const httpCache = null;
    if (httpCache == null) {
      request2.cache = "no-store";
    }
    const newConnection = forceNewConnection ? "yes" : "no";
    if (request2.mode === "websocket") {}
    let requestBody = null;
    if (request2.body == null && fetchParams.processRequestEndOfBody) {
      queueMicrotask(() => fetchParams.processRequestEndOfBody());
    } else if (request2.body != null) {
      const processBodyChunk = async function* (bytes) {
        if (isCancelled(fetchParams)) {
          return;
        }
        yield bytes;
        fetchParams.processRequestBodyChunkLength?.(bytes.byteLength);
      };
      const processEndOfBody = () => {
        if (isCancelled(fetchParams)) {
          return;
        }
        if (fetchParams.processRequestEndOfBody) {
          fetchParams.processRequestEndOfBody();
        }
      };
      const processBodyError = (e3) => {
        if (isCancelled(fetchParams)) {
          return;
        }
        if (e3.name === "AbortError") {
          fetchParams.controller.abort();
        } else {
          fetchParams.controller.terminate(e3);
        }
      };
      requestBody = async function* () {
        try {
          for await (const bytes of request2.body.stream) {
            yield* processBodyChunk(bytes);
          }
          processEndOfBody();
        } catch (err) {
          processBodyError(err);
        }
      }();
    }
    try {
      const { body: body2, status, statusText, headersList, socket } = await dispatch({ body: requestBody });
      if (socket) {
        response = makeResponse({ status, statusText, headersList, socket });
      } else {
        const iterator = body2[Symbol.asyncIterator]();
        fetchParams.controller.next = () => iterator.next();
        response = makeResponse({ status, statusText, headersList });
      }
    } catch (err) {
      if (err.name === "AbortError") {
        fetchParams.controller.connection.destroy();
        return makeAppropriateNetworkError(fetchParams, err);
      }
      return makeNetworkError(err);
    }
    const pullAlgorithm = () => {
      return fetchParams.controller.resume();
    };
    const cancelAlgorithm = (reason) => {
      if (!isCancelled(fetchParams)) {
        fetchParams.controller.abort(reason);
      }
    };
    const stream2 = new ReadableStream({
      start(controller) {
        fetchParams.controller.controller = controller;
      },
      pull: pullAlgorithm,
      cancel: cancelAlgorithm,
      type: "bytes"
    });
    response.body = { stream: stream2, source: null, length: null };
    if (!fetchParams.controller.resume) {
      fetchParams.controller.on("terminated", onAborted);
    }
    fetchParams.controller.resume = async () => {
      while (true) {
        let bytes;
        let isFailure;
        try {
          const { done, value } = await fetchParams.controller.next();
          if (isAborted(fetchParams)) {
            break;
          }
          bytes = done ? undefined : value;
        } catch (err) {
          if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {
            bytes = undefined;
          } else {
            bytes = err;
            isFailure = true;
          }
        }
        if (bytes === undefined) {
          readableStreamClose(fetchParams.controller.controller);
          finalizeResponse(fetchParams, response);
          return;
        }
        timingInfo.decodedBodySize += bytes?.byteLength ?? 0;
        if (isFailure) {
          fetchParams.controller.terminate(bytes);
          return;
        }
        const buffer = new Uint8Array(bytes);
        if (buffer.byteLength) {
          fetchParams.controller.controller.enqueue(buffer);
        }
        if (isErrored(stream2)) {
          fetchParams.controller.terminate();
          return;
        }
        if (fetchParams.controller.controller.desiredSize <= 0) {
          return;
        }
      }
    };
    function onAborted(reason) {
      if (isAborted(fetchParams)) {
        response.aborted = true;
        if (isReadable(stream2)) {
          fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason);
        }
      } else {
        if (isReadable(stream2)) {
          fetchParams.controller.controller.error(new TypeError("terminated", {
            cause: isErrorLike(reason) ? reason : undefined
          }));
        }
      }
      fetchParams.controller.connection.destroy();
    }
    return response;
    function dispatch({ body: body2 }) {
      const url2 = requestCurrentURL(request2);
      const agent2 = fetchParams.controller.dispatcher;
      const path2 = url2.pathname + url2.search;
      const hasTrailingQuestionMark = url2.search.length === 0 && url2.href[url2.href.length - url2.hash.length - 1] === "?";
      return new Promise((resolve3, reject) => agent2.dispatch({
        path: hasTrailingQuestionMark ? `${path2}?` : path2,
        origin: url2.origin,
        method: request2.method,
        body: agent2.isMockActive ? request2.body && (request2.body.source || request2.body.stream) : body2,
        headers: request2.headersList.entries,
        maxRedirections: 0,
        upgrade: request2.mode === "websocket" ? "websocket" : undefined
      }, {
        body: null,
        abort: null,
        onConnect(abort) {
          const { connection } = fetchParams.controller;
          timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability);
          if (connection.destroyed) {
            abort(new DOMException("The operation was aborted.", "AbortError"));
          } else {
            fetchParams.controller.on("terminated", abort);
            this.abort = connection.abort = abort;
          }
          timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability);
        },
        onResponseStarted() {
          timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability);
        },
        onHeaders(status, rawHeaders, resume2, statusText) {
          if (status < 200) {
            return false;
          }
          const headersList = new HeadersList;
          for (let i = 0;i < rawHeaders.length; i += 2) {
            const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i]);
            const value = rawHeaders[i + 1];
            if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) {
              for (const val of value) {
                headersList.append(nameStr, val.toString("latin1"), true);
              }
            } else {
              headersList.append(nameStr, value.toString("latin1"), true);
            }
          }
          const location = headersList.get("location", true);
          this.body = new Readable2({ read: resume2 });
          const willFollow = location && request2.redirect === "follow" && redirectStatusSet.has(status);
          const decoders = [];
          if (request2.method !== "HEAD" && request2.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
            const contentEncoding = headersList.get("content-encoding", true);
            const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : [];
            const maxContentEncodings = 5;
            if (codings.length > maxContentEncodings) {
              reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`));
              return true;
            }
            for (let i = codings.length - 1;i >= 0; --i) {
              const coding = codings[i].trim();
              if (coding === "x-gzip" || coding === "gzip") {
                decoders.push(zlib.createGunzip({
                  flush: zlib.constants.Z_SYNC_FLUSH,
                  finishFlush: zlib.constants.Z_SYNC_FLUSH
                }));
              } else if (coding === "deflate") {
                decoders.push(createInflate({
                  flush: zlib.constants.Z_SYNC_FLUSH,
                  finishFlush: zlib.constants.Z_SYNC_FLUSH
                }));
              } else if (coding === "br") {
                decoders.push(zlib.createBrotliDecompress({
                  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
                  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
                }));
              } else if (coding === "zstd" && hasZstd) {
                decoders.push(zlib.createZstdDecompress({
                  flush: zlib.constants.ZSTD_e_continue,
                  finishFlush: zlib.constants.ZSTD_e_end
                }));
              } else {
                decoders.length = 0;
                break;
              }
            }
          }
          const onError = this.onError.bind(this);
          resolve3({
            status,
            statusText,
            headersList,
            body: decoders.length ? pipeline(this.body, ...decoders, (err) => {
              if (err) {
                this.onError(err);
              }
            }).on("error", onError) : this.body.on("error", onError)
          });
          return true;
        },
        onData(chunk) {
          if (fetchParams.controller.dump) {
            return;
          }
          const bytes = chunk;
          timingInfo.encodedBodySize += bytes.byteLength;
          return this.body.push(bytes);
        },
        onComplete() {
          if (this.abort) {
            fetchParams.controller.off("terminated", this.abort);
          }
          fetchParams.controller.ended = true;
          this.body.push(null);
        },
        onError(error49) {
          if (this.abort) {
            fetchParams.controller.off("terminated", this.abort);
          }
          this.body?.destroy(error49);
          fetchParams.controller.terminate(error49);
          reject(error49);
        },
        onRequestUpgrade(_controller, status, headers, socket) {
          if (socket.session != null && status !== 200 || socket.session == null && status !== 101) {
            return false;
          }
          const headersList = new HeadersList;
          for (const [name3, value] of Object.entries(headers)) {
            if (value == null) {
              continue;
            }
            const headerName = name3.toLowerCase();
            if (Array.isArray(value)) {
              for (const entry of value) {
                headersList.append(headerName, String(entry), true);
              }
            } else {
              headersList.append(headerName, String(value), true);
            }
          }
          resolve3({
            status,
            statusText: STATUS_CODES[status],
            headersList,
            socket
          });
          return true;
        },
        onUpgrade(status, rawHeaders, socket) {
          if (socket.session != null && status !== 200 || socket.session == null && status !== 101) {
            return false;
          }
          const headersList = new HeadersList;
          for (let i = 0;i < rawHeaders.length; i += 2) {
            const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i]);
            const value = rawHeaders[i + 1];
            if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) {
              for (const val of value) {
                headersList.append(nameStr, val.toString("latin1"), true);
              }
            } else {
              headersList.append(nameStr, value.toString("latin1"), true);
            }
          }
          resolve3({
            status,
            statusText: STATUS_CODES[status],
            headersList,
            socket
          });
          return true;
        }
      }));
    }
  }
  module.exports = {
    fetch: fetch2,
    Fetch,
    fetching,
    finalizeAndReportTiming
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/cache/util.js
var require_util5 = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { URLSerializer } = require_data_url();
  var { isValidHeaderName } = require_util4();
  function urlEquals(A3, B4, excludeFragment = false) {
    const serializedA = URLSerializer(A3, excludeFragment);
    const serializedB = URLSerializer(B4, excludeFragment);
    return serializedA === serializedB;
  }
  function getFieldValues(header) {
    assert2(header !== null);
    const values = [];
    for (let value of header.split(",")) {
      value = value.trim();
      if (isValidHeaderName(value)) {
        values.push(value);
      }
    }
    return values;
  }
  module.exports = {
    urlEquals,
    getFieldValues
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/cache/cache.js
var require_cache3 = __commonJS((exports2, module) => {
  var assert2 = __require("node:assert");
  var { kConstruct } = require_symbols2();
  var { urlEquals, getFieldValues } = require_util5();
  var { kEnumerableProperty, isDisturbed } = require_util3();
  var { webidl } = require_webidl();
  var { cloneResponse, fromInnerResponse, getResponseState } = require_response();
  var { Request: Request2, fromInnerRequest, getRequestState } = require_request2();
  var { fetching } = require_fetch();
  var { urlIsHttpHttpsScheme, readAllBytes } = require_util4();
  var { createDeferredPromise } = require_promise3();

  class Cache2 {
    #relevantRequestResponseList;
    constructor() {
      if (arguments[0] !== kConstruct) {
        webidl.illegalConstructor();
      }
      webidl.util.markAsUncloneable(this);
      this.#relevantRequestResponseList = arguments[1];
    }
    async match(request2, options2 = {}) {
      webidl.brandCheck(this, Cache2);
      const prefix = "Cache.match";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      request2 = webidl.converters.RequestInfo(request2);
      options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options");
      const p3 = this.#internalMatchAll(request2, options2, 1);
      if (p3.length === 0) {
        return;
      }
      return p3[0];
    }
    async matchAll(request2 = undefined, options2 = {}) {
      webidl.brandCheck(this, Cache2);
      const prefix = "Cache.matchAll";
      if (request2 !== undefined)
        request2 = webidl.converters.RequestInfo(request2);
      options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options");
      return this.#internalMatchAll(request2, options2);
    }
    async add(request2) {
      webidl.brandCheck(this, Cache2);
      const prefix = "Cache.add";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      request2 = webidl.converters.RequestInfo(request2);
      const requests = [request2];
      const responseArrayPromise = this.addAll(requests);
      return await responseArrayPromise;
    }
    async addAll(requests) {
      webidl.brandCheck(this, Cache2);
      const prefix = "Cache.addAll";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      const responsePromises = [];
      const requestList = [];
      for (let request2 of requests) {
        if (request2 === undefined) {
          throw webidl.errors.conversionFailed({
            prefix,
            argument: "Argument 1",
            types: ["undefined is not allowed"]
          });
        }
        request2 = webidl.converters.RequestInfo(request2);
        if (typeof request2 === "string") {
          continue;
        }
        const r2 = getRequestState(request2);
        if (!urlIsHttpHttpsScheme(r2.url) || r2.method !== "GET") {
          throw webidl.errors.exception({
            header: prefix,
            message: "Expected http/s scheme when method is not GET."
          });
        }
      }
      const fetchControllers = [];
      for (const request2 of requests) {
        const r2 = getRequestState(new Request2(request2));
        if (!urlIsHttpHttpsScheme(r2.url)) {
          throw webidl.errors.exception({
            header: prefix,
            message: "Expected http/s scheme."
          });
        }
        r2.initiator = "fetch";
        r2.destination = "subresource";
        requestList.push(r2);
        const responsePromise = createDeferredPromise();
        fetchControllers.push(fetching({
          request: r2,
          processResponse(response) {
            if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) {
              responsePromise.reject(webidl.errors.exception({
                header: "Cache.addAll",
                message: "Received an invalid status code or the request failed."
              }));
            } else if (response.headersList.contains("vary")) {
              const fieldValues = getFieldValues(response.headersList.get("vary"));
              for (const fieldValue of fieldValues) {
                if (fieldValue === "*") {
                  responsePromise.reject(webidl.errors.exception({
                    header: "Cache.addAll",
                    message: "invalid vary field value"
                  }));
                  for (const controller of fetchControllers) {
                    controller.abort();
                  }
                  return;
                }
              }
            }
          },
          processResponseEndOfBody(response) {
            if (response.aborted) {
              responsePromise.reject(new DOMException("aborted", "AbortError"));
              return;
            }
            responsePromise.resolve(response);
          }
        }));
        responsePromises.push(responsePromise.promise);
      }
      const p3 = Promise.all(responsePromises);
      const responses = await p3;
      const operations = [];
      let index2 = 0;
      for (const response of responses) {
        const operation = {
          type: "put",
          request: requestList[index2],
          response
        };
        operations.push(operation);
        index2++;
      }
      const cacheJobPromise = createDeferredPromise();
      let errorData = null;
      try {
        this.#batchCacheOperations(operations);
      } catch (e3) {
        errorData = e3;
      }
      queueMicrotask(() => {
        if (errorData === null) {
          cacheJobPromise.resolve(undefined);
        } else {
          cacheJobPromise.reject(errorData);
        }
      });
      return cacheJobPromise.promise;
    }
    async put(request2, response) {
      webidl.brandCheck(this, Cache2);
      const prefix = "Cache.put";
      webidl.argumentLengthCheck(arguments, 2, prefix);
      request2 = webidl.converters.RequestInfo(request2);
      response = webidl.converters.Response(response, prefix, "response");
      let innerRequest = null;
      if (webidl.is.Request(request2)) {
        innerRequest = getRequestState(request2);
      } else {
        innerRequest = getRequestState(new Request2(request2));
      }
      if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") {
        throw webidl.errors.exception({
          header: prefix,
          message: "Expected an http/s scheme when method is not GET"
        });
      }
      const innerResponse = getResponseState(response);
      if (innerResponse.status === 206) {
        throw webidl.errors.exception({
          header: prefix,
          message: "Got 206 status"
        });
      }
      if (innerResponse.headersList.contains("vary")) {
        const fieldValues = getFieldValues(innerResponse.headersList.get("vary"));
        for (const fieldValue of fieldValues) {
          if (fieldValue === "*") {
            throw webidl.errors.exception({
              header: prefix,
              message: "Got * vary field value"
            });
          }
        }
      }
      if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {
        throw webidl.errors.exception({
          header: prefix,
          message: "Response body is locked or disturbed"
        });
      }
      const clonedResponse = cloneResponse(innerResponse);
      const bodyReadPromise = createDeferredPromise();
      if (innerResponse.body != null) {
        const stream2 = innerResponse.body.stream;
        const reader = stream2.getReader();
        readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject);
      } else {
        bodyReadPromise.resolve(undefined);
      }
      const operations = [];
      const operation = {
        type: "put",
        request: innerRequest,
        response: clonedResponse
      };
      operations.push(operation);
      const bytes = await bodyReadPromise.promise;
      if (clonedResponse.body != null) {
        clonedResponse.body.source = bytes;
      }
      const cacheJobPromise = createDeferredPromise();
      let errorData = null;
      try {
        this.#batchCacheOperations(operations);
      } catch (e3) {
        errorData = e3;
      }
      queueMicrotask(() => {
        if (errorData === null) {
          cacheJobPromise.resolve();
        } else {
          cacheJobPromise.reject(errorData);
        }
      });
      return cacheJobPromise.promise;
    }
    async delete(request2, options2 = {}) {
      webidl.brandCheck(this, Cache2);
      const prefix = "Cache.delete";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      request2 = webidl.converters.RequestInfo(request2);
      options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options");
      let r2 = null;
      if (webidl.is.Request(request2)) {
        r2 = getRequestState(request2);
        if (r2.method !== "GET" && !options2.ignoreMethod) {
          return false;
        }
      } else {
        assert2(typeof request2 === "string");
        r2 = getRequestState(new Request2(request2));
      }
      const operations = [];
      const operation = {
        type: "delete",
        request: r2,
        options: options2
      };
      operations.push(operation);
      const cacheJobPromise = createDeferredPromise();
      let errorData = null;
      let requestResponses;
      try {
        requestResponses = this.#batchCacheOperations(operations);
      } catch (e3) {
        errorData = e3;
      }
      queueMicrotask(() => {
        if (errorData === null) {
          cacheJobPromise.resolve(!!requestResponses?.length);
        } else {
          cacheJobPromise.reject(errorData);
        }
      });
      return cacheJobPromise.promise;
    }
    async keys(request2 = undefined, options2 = {}) {
      webidl.brandCheck(this, Cache2);
      const prefix = "Cache.keys";
      if (request2 !== undefined)
        request2 = webidl.converters.RequestInfo(request2);
      options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options");
      let r2 = null;
      if (request2 !== undefined) {
        if (webidl.is.Request(request2)) {
          r2 = getRequestState(request2);
          if (r2.method !== "GET" && !options2.ignoreMethod) {
            return [];
          }
        } else if (typeof request2 === "string") {
          r2 = getRequestState(new Request2(request2));
        }
      }
      const promise2 = createDeferredPromise();
      const requests = [];
      if (request2 === undefined) {
        for (const requestResponse of this.#relevantRequestResponseList) {
          requests.push(requestResponse[0]);
        }
      } else {
        const requestResponses = this.#queryCache(r2, options2);
        for (const requestResponse of requestResponses) {
          requests.push(requestResponse[0]);
        }
      }
      queueMicrotask(() => {
        const requestList = [];
        for (const request3 of requests) {
          const requestObject = fromInnerRequest(request3, undefined, new AbortController().signal, "immutable");
          requestList.push(requestObject);
        }
        promise2.resolve(Object.freeze(requestList));
      });
      return promise2.promise;
    }
    #batchCacheOperations(operations) {
      const cache2 = this.#relevantRequestResponseList;
      const backupCache = [...cache2];
      const addedItems = [];
      const resultList = [];
      try {
        for (const operation of operations) {
          if (operation.type !== "delete" && operation.type !== "put") {
            throw webidl.errors.exception({
              header: "Cache.#batchCacheOperations",
              message: 'operation type does not match "delete" or "put"'
            });
          }
          if (operation.type === "delete" && operation.response != null) {
            throw webidl.errors.exception({
              header: "Cache.#batchCacheOperations",
              message: "delete operation should not have an associated response"
            });
          }
          if (this.#queryCache(operation.request, operation.options, addedItems).length) {
            throw new DOMException("???", "InvalidStateError");
          }
          let requestResponses;
          if (operation.type === "delete") {
            requestResponses = this.#queryCache(operation.request, operation.options);
            if (requestResponses.length === 0) {
              return [];
            }
            for (const requestResponse of requestResponses) {
              const idx = cache2.indexOf(requestResponse);
              assert2(idx !== -1);
              cache2.splice(idx, 1);
            }
          } else if (operation.type === "put") {
            if (operation.response == null) {
              throw webidl.errors.exception({
                header: "Cache.#batchCacheOperations",
                message: "put operation should have an associated response"
              });
            }
            const r2 = operation.request;
            if (!urlIsHttpHttpsScheme(r2.url)) {
              throw webidl.errors.exception({
                header: "Cache.#batchCacheOperations",
                message: "expected http or https scheme"
              });
            }
            if (r2.method !== "GET") {
              throw webidl.errors.exception({
                header: "Cache.#batchCacheOperations",
                message: "not get method"
              });
            }
            if (operation.options != null) {
              throw webidl.errors.exception({
                header: "Cache.#batchCacheOperations",
                message: "options must not be defined"
              });
            }
            requestResponses = this.#queryCache(operation.request);
            for (const requestResponse of requestResponses) {
              const idx = cache2.indexOf(requestResponse);
              assert2(idx !== -1);
              cache2.splice(idx, 1);
            }
            cache2.push([operation.request, operation.response]);
            addedItems.push([operation.request, operation.response]);
          }
          resultList.push([operation.request, operation.response]);
        }
        return resultList;
      } catch (e3) {
        this.#relevantRequestResponseList.length = 0;
        this.#relevantRequestResponseList = backupCache;
        throw e3;
      }
    }
    #queryCache(requestQuery, options2, targetStorage) {
      const resultList = [];
      const storage = targetStorage ?? this.#relevantRequestResponseList;
      for (const requestResponse of storage) {
        const [cachedRequest, cachedResponse] = requestResponse;
        if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options2)) {
          resultList.push(requestResponse);
        }
      }
      return resultList;
    }
    #requestMatchesCachedItem(requestQuery, request2, response = null, options2) {
      const queryURL = new URL(requestQuery.url);
      const cachedURL = new URL(request2.url);
      if (options2?.ignoreSearch) {
        cachedURL.search = "";
        queryURL.search = "";
      }
      if (!urlEquals(queryURL, cachedURL, true)) {
        return false;
      }
      if (response == null || options2?.ignoreVary || !response.headersList.contains("vary")) {
        return true;
      }
      const fieldValues = getFieldValues(response.headersList.get("vary"));
      for (const fieldValue of fieldValues) {
        if (fieldValue === "*") {
          return false;
        }
        const requestValue = request2.headersList.get(fieldValue);
        const queryValue = requestQuery.headersList.get(fieldValue);
        if (requestValue !== queryValue) {
          return false;
        }
      }
      return true;
    }
    #internalMatchAll(request2, options2, maxResponses = Infinity) {
      let r2 = null;
      if (request2 !== undefined) {
        if (webidl.is.Request(request2)) {
          r2 = getRequestState(request2);
          if (r2.method !== "GET" && !options2.ignoreMethod) {
            return [];
          }
        } else if (typeof request2 === "string") {
          r2 = getRequestState(new Request2(request2));
        }
      }
      const responses = [];
      if (request2 === undefined) {
        for (const requestResponse of this.#relevantRequestResponseList) {
          responses.push(requestResponse[1]);
        }
      } else {
        const requestResponses = this.#queryCache(r2, options2);
        for (const requestResponse of requestResponses) {
          responses.push(requestResponse[1]);
        }
      }
      const responseList = [];
      for (const response of responses) {
        const responseObject = fromInnerResponse(cloneResponse(response), "immutable");
        responseList.push(responseObject);
        if (responseList.length >= maxResponses) {
          break;
        }
      }
      return Object.freeze(responseList);
    }
  }
  Object.defineProperties(Cache2.prototype, {
    [Symbol.toStringTag]: {
      value: "Cache",
      configurable: true
    },
    match: kEnumerableProperty,
    matchAll: kEnumerableProperty,
    add: kEnumerableProperty,
    addAll: kEnumerableProperty,
    put: kEnumerableProperty,
    delete: kEnumerableProperty,
    keys: kEnumerableProperty
  });
  var cacheQueryOptionConverters = [
    {
      key: "ignoreSearch",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    },
    {
      key: "ignoreMethod",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    },
    {
      key: "ignoreVary",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    }
  ];
  webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters);
  webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([
    ...cacheQueryOptionConverters,
    {
      key: "cacheName",
      converter: webidl.converters.DOMString
    }
  ]);
  webidl.converters.Response = webidl.interfaceConverter(webidl.is.Response, "Response");
  webidl.converters["sequence<RequestInfo>"] = webidl.sequenceConverter(webidl.converters.RequestInfo);
  module.exports = {
    Cache: Cache2
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/cache/cachestorage.js
var require_cachestorage = __commonJS((exports2, module) => {
  var { Cache: Cache2 } = require_cache3();
  var { webidl } = require_webidl();
  var { kEnumerableProperty } = require_util3();
  var { kConstruct } = require_symbols2();

  class CacheStorage {
    #caches = new Map;
    constructor() {
      if (arguments[0] !== kConstruct) {
        webidl.illegalConstructor();
      }
      webidl.util.markAsUncloneable(this);
    }
    async match(request2, options2 = {}) {
      webidl.brandCheck(this, CacheStorage);
      webidl.argumentLengthCheck(arguments, 1, "CacheStorage.match");
      request2 = webidl.converters.RequestInfo(request2);
      options2 = webidl.converters.MultiCacheQueryOptions(options2);
      if (options2.cacheName != null) {
        if (this.#caches.has(options2.cacheName)) {
          const cacheList = this.#caches.get(options2.cacheName);
          const cache2 = new Cache2(kConstruct, cacheList);
          return await cache2.match(request2, options2);
        }
      } else {
        for (const cacheList of this.#caches.values()) {
          const cache2 = new Cache2(kConstruct, cacheList);
          const response = await cache2.match(request2, options2);
          if (response !== undefined) {
            return response;
          }
        }
      }
    }
    async has(cacheName) {
      webidl.brandCheck(this, CacheStorage);
      const prefix = "CacheStorage.has";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName");
      return this.#caches.has(cacheName);
    }
    async open(cacheName) {
      webidl.brandCheck(this, CacheStorage);
      const prefix = "CacheStorage.open";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName");
      if (this.#caches.has(cacheName)) {
        const cache3 = this.#caches.get(cacheName);
        return new Cache2(kConstruct, cache3);
      }
      const cache2 = [];
      this.#caches.set(cacheName, cache2);
      return new Cache2(kConstruct, cache2);
    }
    async delete(cacheName) {
      webidl.brandCheck(this, CacheStorage);
      const prefix = "CacheStorage.delete";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName");
      return this.#caches.delete(cacheName);
    }
    async keys() {
      webidl.brandCheck(this, CacheStorage);
      const keys = this.#caches.keys();
      return [...keys];
    }
  }
  Object.defineProperties(CacheStorage.prototype, {
    [Symbol.toStringTag]: {
      value: "CacheStorage",
      configurable: true
    },
    match: kEnumerableProperty,
    has: kEnumerableProperty,
    open: kEnumerableProperty,
    delete: kEnumerableProperty,
    keys: kEnumerableProperty
  });
  module.exports = {
    CacheStorage
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/cookies/constants.js
var require_constants8 = __commonJS((exports2, module) => {
  var maxAttributeValueSize = 1024;
  var maxNameValuePairSize = 4096;
  module.exports = {
    maxAttributeValueSize,
    maxNameValuePairSize
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/cookies/util.js
var require_util6 = __commonJS((exports2, module) => {
  function isCTLExcludingHtab(value) {
    for (let i = 0;i < value.length; ++i) {
      const code2 = value.charCodeAt(i);
      if (code2 >= 0 && code2 <= 8 || code2 >= 10 && code2 <= 31 || code2 === 127) {
        return true;
      }
    }
    return false;
  }
  function validateCookieName(name3) {
    for (let i = 0;i < name3.length; ++i) {
      const code2 = name3.charCodeAt(i);
      if (code2 < 33 || code2 > 126 || code2 === 34 || code2 === 40 || code2 === 41 || code2 === 60 || code2 === 62 || code2 === 64 || code2 === 44 || code2 === 59 || code2 === 58 || code2 === 92 || code2 === 47 || code2 === 91 || code2 === 93 || code2 === 63 || code2 === 61 || code2 === 123 || code2 === 125) {
        throw new Error("Invalid cookie name");
      }
    }
  }
  function validateCookieValue(value) {
    let len = value.length;
    let i = 0;
    if (value[0] === '"') {
      if (len === 1 || value[len - 1] !== '"') {
        throw new Error("Invalid cookie value");
      }
      --len;
      ++i;
    }
    while (i < len) {
      const code2 = value.charCodeAt(i++);
      if (code2 < 33 || code2 > 126 || code2 === 34 || code2 === 44 || code2 === 59 || code2 === 92) {
        throw new Error("Invalid cookie value");
      }
    }
  }
  function validateCookiePath(path2) {
    for (let i = 0;i < path2.length; ++i) {
      const code2 = path2.charCodeAt(i);
      if (code2 < 32 || code2 === 127 || code2 === 59) {
        throw new Error("Invalid cookie path");
      }
    }
  }
  function validateCookieDomain(domain2) {
    if (domain2.startsWith("-") || domain2.endsWith(".") || domain2.endsWith("-")) {
      throw new Error("Invalid cookie domain");
    }
  }
  var IMFDays = [
    "Sun",
    "Mon",
    "Tue",
    "Wed",
    "Thu",
    "Fri",
    "Sat"
  ];
  var IMFMonths = [
    "Jan",
    "Feb",
    "Mar",
    "Apr",
    "May",
    "Jun",
    "Jul",
    "Aug",
    "Sep",
    "Oct",
    "Nov",
    "Dec"
  ];
  var IMFPaddedNumbers = Array(61).fill(0).map((_6, i) => i.toString().padStart(2, "0"));
  function toIMFDate(date6) {
    if (typeof date6 === "number") {
      date6 = new Date(date6);
    }
    return `${IMFDays[date6.getUTCDay()]}, ${IMFPaddedNumbers[date6.getUTCDate()]} ${IMFMonths[date6.getUTCMonth()]} ${date6.getUTCFullYear()} ${IMFPaddedNumbers[date6.getUTCHours()]}:${IMFPaddedNumbers[date6.getUTCMinutes()]}:${IMFPaddedNumbers[date6.getUTCSeconds()]} GMT`;
  }
  function validateCookieMaxAge(maxAge) {
    if (maxAge < 0) {
      throw new Error("Invalid cookie max-age");
    }
  }
  function stringify2(cookie2) {
    if (cookie2.name.length === 0) {
      return null;
    }
    validateCookieName(cookie2.name);
    validateCookieValue(cookie2.value);
    const out = [`${cookie2.name}=${cookie2.value}`];
    if (cookie2.name.startsWith("__Secure-")) {
      cookie2.secure = true;
    }
    if (cookie2.name.startsWith("__Host-")) {
      cookie2.secure = true;
      cookie2.domain = null;
      cookie2.path = "/";
    }
    if (cookie2.secure) {
      out.push("Secure");
    }
    if (cookie2.httpOnly) {
      out.push("HttpOnly");
    }
    if (typeof cookie2.maxAge === "number") {
      validateCookieMaxAge(cookie2.maxAge);
      out.push(`Max-Age=${cookie2.maxAge}`);
    }
    if (cookie2.domain) {
      validateCookieDomain(cookie2.domain);
      out.push(`Domain=${cookie2.domain}`);
    }
    if (cookie2.path) {
      validateCookiePath(cookie2.path);
      out.push(`Path=${cookie2.path}`);
    }
    if (cookie2.expires && cookie2.expires.toString() !== "Invalid Date") {
      out.push(`Expires=${toIMFDate(cookie2.expires)}`);
    }
    if (cookie2.sameSite) {
      out.push(`SameSite=${cookie2.sameSite}`);
    }
    for (const part of cookie2.unparsed) {
      if (!part.includes("=")) {
        throw new Error("Invalid unparsed");
      }
      const [key, ...value] = part.split("=");
      out.push(`${key.trim()}=${value.join("=")}`);
    }
    return out.join("; ");
  }
  module.exports = {
    isCTLExcludingHtab,
    validateCookieName,
    validateCookiePath,
    validateCookieValue,
    toIMFDate,
    stringify: stringify2
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/cookies/parse.js
var require_parse2 = __commonJS((exports2, module) => {
  var { collectASequenceOfCodePointsFast } = require_infra();
  var { maxNameValuePairSize, maxAttributeValueSize } = require_constants8();
  var { isCTLExcludingHtab } = require_util6();
  var assert2 = __require("node:assert");
  function parseSetCookie(header) {
    if (isCTLExcludingHtab(header)) {
      return null;
    }
    let nameValuePair = "";
    let unparsedAttributes = "";
    let name3 = "";
    let value = "";
    if (header.includes(";")) {
      const position = { position: 0 };
      nameValuePair = collectASequenceOfCodePointsFast(";", header, position);
      unparsedAttributes = header.slice(position.position);
    } else {
      nameValuePair = header;
    }
    if (!nameValuePair.includes("=")) {
      value = nameValuePair;
    } else {
      const position = { position: 0 };
      name3 = collectASequenceOfCodePointsFast("=", nameValuePair, position);
      value = nameValuePair.slice(position.position + 1);
    }
    name3 = name3.trim();
    value = value.trim();
    if (name3.length + value.length > maxNameValuePairSize) {
      return null;
    }
    return {
      name: name3,
      value,
      ...parseUnparsedAttributes(unparsedAttributes)
    };
  }
  function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) {
    if (unparsedAttributes.length === 0) {
      return cookieAttributeList;
    }
    assert2(unparsedAttributes[0] === ";");
    unparsedAttributes = unparsedAttributes.slice(1);
    let cookieAv = "";
    if (unparsedAttributes.includes(";")) {
      cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 });
      unparsedAttributes = unparsedAttributes.slice(cookieAv.length);
    } else {
      cookieAv = unparsedAttributes;
      unparsedAttributes = "";
    }
    let attributeName = "";
    let attributeValue = "";
    if (cookieAv.includes("=")) {
      const position = { position: 0 };
      attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position);
      attributeValue = cookieAv.slice(position.position + 1);
    } else {
      attributeName = cookieAv;
    }
    attributeName = attributeName.trim();
    attributeValue = attributeValue.trim();
    if (attributeValue.length > maxAttributeValueSize) {
      return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList);
    }
    const attributeNameLowercase = attributeName.toLowerCase();
    if (attributeNameLowercase === "expires") {
      const expiryTime = new Date(attributeValue);
      cookieAttributeList.expires = expiryTime;
    } else if (attributeNameLowercase === "max-age") {
      const charCode = attributeValue.charCodeAt(0);
      if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") {
        return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList);
      }
      if (!/^\d+$/.test(attributeValue)) {
        return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList);
      }
      const deltaSeconds = Number(attributeValue);
      cookieAttributeList.maxAge = deltaSeconds;
    } else if (attributeNameLowercase === "domain") {
      let cookieDomain = attributeValue;
      if (cookieDomain[0] === ".") {
        cookieDomain = cookieDomain.slice(1);
      }
      cookieDomain = cookieDomain.toLowerCase();
      cookieAttributeList.domain = cookieDomain;
    } else if (attributeNameLowercase === "path") {
      let cookiePath = "";
      if (attributeValue.length === 0 || attributeValue[0] !== "/") {
        cookiePath = "/";
      } else {
        cookiePath = attributeValue;
      }
      cookieAttributeList.path = cookiePath;
    } else if (attributeNameLowercase === "secure") {
      cookieAttributeList.secure = true;
    } else if (attributeNameLowercase === "httponly") {
      cookieAttributeList.httpOnly = true;
    } else if (attributeNameLowercase === "samesite") {
      const attributeValueLowercase = attributeValue.toLowerCase();
      if (attributeValueLowercase === "none") {
        cookieAttributeList.sameSite = "None";
      } else if (attributeValueLowercase === "strict") {
        cookieAttributeList.sameSite = "Strict";
      } else if (attributeValueLowercase === "lax") {
        cookieAttributeList.sameSite = "Lax";
      }
    } else {
      cookieAttributeList.unparsed ??= [];
      cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`);
    }
    return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList);
  }
  module.exports = {
    parseSetCookie,
    parseUnparsedAttributes
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/cookies/index.js
var require_cookies = __commonJS((exports2, module) => {
  var { parseSetCookie } = require_parse2();
  var { stringify: stringify2 } = require_util6();
  var { webidl } = require_webidl();
  var { Headers: Headers2 } = require_headers();
  var brandChecks = webidl.brandCheckMultiple([Headers2, globalThis.Headers].filter(Boolean));
  function getCookies(headers) {
    webidl.argumentLengthCheck(arguments, 1, "getCookies");
    brandChecks(headers);
    const cookie2 = headers.get("cookie");
    const out = {};
    if (!cookie2) {
      return out;
    }
    for (const piece of cookie2.split(";")) {
      const [name3, ...value] = piece.split("=");
      out[name3.trim()] = value.join("=");
    }
    return out;
  }
  function deleteCookie(headers, name3, attributes) {
    brandChecks(headers);
    const prefix = "deleteCookie";
    webidl.argumentLengthCheck(arguments, 2, prefix);
    name3 = webidl.converters.DOMString(name3, prefix, "name");
    attributes = webidl.converters.DeleteCookieAttributes(attributes);
    setCookie(headers, {
      name: name3,
      value: "",
      expires: new Date(0),
      ...attributes
    });
  }
  function getSetCookies(headers) {
    webidl.argumentLengthCheck(arguments, 1, "getSetCookies");
    brandChecks(headers);
    const cookies = headers.getSetCookie();
    if (!cookies) {
      return [];
    }
    return cookies.map((pair) => parseSetCookie(pair));
  }
  function parseCookie2(cookie2) {
    cookie2 = webidl.converters.DOMString(cookie2);
    return parseSetCookie(cookie2);
  }
  function setCookie(headers, cookie2) {
    webidl.argumentLengthCheck(arguments, 2, "setCookie");
    brandChecks(headers);
    cookie2 = webidl.converters.Cookie(cookie2);
    const str = stringify2(cookie2);
    if (str) {
      headers.append("set-cookie", str, true);
    }
  }
  webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([
    {
      converter: webidl.nullableConverter(webidl.converters.DOMString),
      key: "path",
      defaultValue: () => null
    },
    {
      converter: webidl.nullableConverter(webidl.converters.DOMString),
      key: "domain",
      defaultValue: () => null
    }
  ]);
  webidl.converters.Cookie = webidl.dictionaryConverter([
    {
      converter: webidl.converters.DOMString,
      key: "name"
    },
    {
      converter: webidl.converters.DOMString,
      key: "value"
    },
    {
      converter: webidl.nullableConverter((value) => {
        if (typeof value === "number") {
          return webidl.converters["unsigned long long"](value);
        }
        return new Date(value);
      }),
      key: "expires",
      defaultValue: () => null
    },
    {
      converter: webidl.nullableConverter(webidl.converters["long long"]),
      key: "maxAge",
      defaultValue: () => null
    },
    {
      converter: webidl.nullableConverter(webidl.converters.DOMString),
      key: "domain",
      defaultValue: () => null
    },
    {
      converter: webidl.nullableConverter(webidl.converters.DOMString),
      key: "path",
      defaultValue: () => null
    },
    {
      converter: webidl.nullableConverter(webidl.converters.boolean),
      key: "secure",
      defaultValue: () => null
    },
    {
      converter: webidl.nullableConverter(webidl.converters.boolean),
      key: "httpOnly",
      defaultValue: () => null
    },
    {
      converter: webidl.converters.USVString,
      key: "sameSite",
      allowedValues: ["Strict", "Lax", "None"]
    },
    {
      converter: webidl.sequenceConverter(webidl.converters.DOMString),
      key: "unparsed",
      defaultValue: () => []
    }
  ]);
  module.exports = {
    getCookies,
    deleteCookie,
    getSetCookies,
    setCookie,
    parseCookie: parseCookie2
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/events.js
var require_events = __commonJS((exports2, module) => {
  var { webidl } = require_webidl();
  var { kEnumerableProperty } = require_util3();
  var { kConstruct } = require_symbols2();

  class MessageEvent extends Event {
    #eventInit;
    constructor(type2, eventInitDict = {}) {
      if (type2 === kConstruct) {
        super(arguments[1], arguments[2]);
        webidl.util.markAsUncloneable(this);
        return;
      }
      const prefix = "MessageEvent constructor";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      type2 = webidl.converters.DOMString(type2, prefix, "type");
      eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict");
      super(type2, eventInitDict);
      this.#eventInit = eventInitDict;
      webidl.util.markAsUncloneable(this);
    }
    get data() {
      webidl.brandCheck(this, MessageEvent);
      return this.#eventInit.data;
    }
    get origin() {
      webidl.brandCheck(this, MessageEvent);
      return this.#eventInit.origin;
    }
    get lastEventId() {
      webidl.brandCheck(this, MessageEvent);
      return this.#eventInit.lastEventId;
    }
    get source() {
      webidl.brandCheck(this, MessageEvent);
      return this.#eventInit.source;
    }
    get ports() {
      webidl.brandCheck(this, MessageEvent);
      if (!Object.isFrozen(this.#eventInit.ports)) {
        Object.freeze(this.#eventInit.ports);
      }
      return this.#eventInit.ports;
    }
    initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin = "", lastEventId2 = "", source = null, ports = []) {
      webidl.brandCheck(this, MessageEvent);
      webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent");
      return new MessageEvent(type2, {
        bubbles,
        cancelable,
        data,
        origin,
        lastEventId: lastEventId2,
        source,
        ports
      });
    }
    static createFastMessageEvent(type2, init4) {
      const messageEvent = new MessageEvent(kConstruct, type2, init4);
      messageEvent.#eventInit = init4;
      messageEvent.#eventInit.data ??= null;
      messageEvent.#eventInit.origin ??= "";
      messageEvent.#eventInit.lastEventId ??= "";
      messageEvent.#eventInit.source ??= null;
      messageEvent.#eventInit.ports ??= [];
      return messageEvent;
    }
  }
  var { createFastMessageEvent } = MessageEvent;
  delete MessageEvent.createFastMessageEvent;

  class CloseEvent extends Event {
    #eventInit;
    constructor(type2, eventInitDict = {}) {
      const prefix = "CloseEvent constructor";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      type2 = webidl.converters.DOMString(type2, prefix, "type");
      eventInitDict = webidl.converters.CloseEventInit(eventInitDict);
      super(type2, eventInitDict);
      this.#eventInit = eventInitDict;
      webidl.util.markAsUncloneable(this);
    }
    get wasClean() {
      webidl.brandCheck(this, CloseEvent);
      return this.#eventInit.wasClean;
    }
    get code() {
      webidl.brandCheck(this, CloseEvent);
      return this.#eventInit.code;
    }
    get reason() {
      webidl.brandCheck(this, CloseEvent);
      return this.#eventInit.reason;
    }
  }

  class ErrorEvent extends Event {
    #eventInit;
    constructor(type2, eventInitDict) {
      const prefix = "ErrorEvent constructor";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      super(type2, eventInitDict);
      webidl.util.markAsUncloneable(this);
      type2 = webidl.converters.DOMString(type2, prefix, "type");
      eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {});
      this.#eventInit = eventInitDict;
    }
    get message() {
      webidl.brandCheck(this, ErrorEvent);
      return this.#eventInit.message;
    }
    get filename() {
      webidl.brandCheck(this, ErrorEvent);
      return this.#eventInit.filename;
    }
    get lineno() {
      webidl.brandCheck(this, ErrorEvent);
      return this.#eventInit.lineno;
    }
    get colno() {
      webidl.brandCheck(this, ErrorEvent);
      return this.#eventInit.colno;
    }
    get error() {
      webidl.brandCheck(this, ErrorEvent);
      return this.#eventInit.error;
    }
  }
  Object.defineProperties(MessageEvent.prototype, {
    [Symbol.toStringTag]: {
      value: "MessageEvent",
      configurable: true
    },
    data: kEnumerableProperty,
    origin: kEnumerableProperty,
    lastEventId: kEnumerableProperty,
    source: kEnumerableProperty,
    ports: kEnumerableProperty,
    initMessageEvent: kEnumerableProperty
  });
  Object.defineProperties(CloseEvent.prototype, {
    [Symbol.toStringTag]: {
      value: "CloseEvent",
      configurable: true
    },
    reason: kEnumerableProperty,
    code: kEnumerableProperty,
    wasClean: kEnumerableProperty
  });
  Object.defineProperties(ErrorEvent.prototype, {
    [Symbol.toStringTag]: {
      value: "ErrorEvent",
      configurable: true
    },
    message: kEnumerableProperty,
    filename: kEnumerableProperty,
    lineno: kEnumerableProperty,
    colno: kEnumerableProperty,
    error: kEnumerableProperty
  });
  webidl.converters.MessagePort = webidl.interfaceConverter(webidl.is.MessagePort, "MessagePort");
  webidl.converters["sequence<MessagePort>"] = webidl.sequenceConverter(webidl.converters.MessagePort);
  var eventInit = [
    {
      key: "bubbles",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    },
    {
      key: "cancelable",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    },
    {
      key: "composed",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    }
  ];
  webidl.converters.MessageEventInit = webidl.dictionaryConverter([
    ...eventInit,
    {
      key: "data",
      converter: webidl.converters.any,
      defaultValue: () => null
    },
    {
      key: "origin",
      converter: webidl.converters.USVString,
      defaultValue: () => ""
    },
    {
      key: "lastEventId",
      converter: webidl.converters.DOMString,
      defaultValue: () => ""
    },
    {
      key: "source",
      converter: webidl.nullableConverter(webidl.converters.MessagePort),
      defaultValue: () => null
    },
    {
      key: "ports",
      converter: webidl.converters["sequence<MessagePort>"],
      defaultValue: () => []
    }
  ]);
  webidl.converters.CloseEventInit = webidl.dictionaryConverter([
    ...eventInit,
    {
      key: "wasClean",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    },
    {
      key: "code",
      converter: webidl.converters["unsigned short"],
      defaultValue: () => 0
    },
    {
      key: "reason",
      converter: webidl.converters.USVString,
      defaultValue: () => ""
    }
  ]);
  webidl.converters.ErrorEventInit = webidl.dictionaryConverter([
    ...eventInit,
    {
      key: "message",
      converter: webidl.converters.DOMString,
      defaultValue: () => ""
    },
    {
      key: "filename",
      converter: webidl.converters.USVString,
      defaultValue: () => ""
    },
    {
      key: "lineno",
      converter: webidl.converters["unsigned long"],
      defaultValue: () => 0
    },
    {
      key: "colno",
      converter: webidl.converters["unsigned long"],
      defaultValue: () => 0
    },
    {
      key: "error",
      converter: webidl.converters.any
    }
  ]);
  module.exports = {
    MessageEvent,
    CloseEvent,
    ErrorEvent,
    createFastMessageEvent
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/constants.js
var require_constants9 = __commonJS((exports2, module) => {
  var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
  var staticPropertyDescriptors = {
    enumerable: true,
    writable: false,
    configurable: false
  };
  var states = {
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3
  };
  var sentCloseFrameState = {
    SENT: 1,
    RECEIVED: 2
  };
  var opcodes = {
    CONTINUATION: 0,
    TEXT: 1,
    BINARY: 2,
    CLOSE: 8,
    PING: 9,
    PONG: 10
  };
  var maxUnsigned16Bit = 65535;
  var parserStates = {
    INFO: 0,
    PAYLOADLENGTH_16: 2,
    PAYLOADLENGTH_64: 3,
    READ_DATA: 4
  };
  var emptyBuffer = Buffer.allocUnsafe(0);
  var sendHints = {
    text: 1,
    typedArray: 2,
    arrayBuffer: 3,
    blob: 4
  };
  module.exports = {
    uid,
    sentCloseFrameState,
    staticPropertyDescriptors,
    states,
    opcodes,
    maxUnsigned16Bit,
    parserStates,
    emptyBuffer,
    sendHints
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/util.js
var require_util7 = __commonJS((exports2, module) => {
  var { states, opcodes } = require_constants9();
  var { isUtf8 } = __require("node:buffer");
  var { removeHTTPWhitespace } = require_data_url();
  var { collectASequenceOfCodePointsFast } = require_infra();
  function isConnecting(readyState) {
    return readyState === states.CONNECTING;
  }
  function isEstablished(readyState) {
    return readyState === states.OPEN;
  }
  function isClosing(readyState) {
    return readyState === states.CLOSING;
  }
  function isClosed(readyState) {
    return readyState === states.CLOSED;
  }
  function fireEvent(e3, target, eventFactory = (type2, init4) => new Event(type2, init4), eventInitDict = {}) {
    const event = eventFactory(e3, eventInitDict);
    target.dispatchEvent(event);
  }
  function websocketMessageReceived(handler, type2, data) {
    handler.onMessage(type2, data);
  }
  function toArrayBuffer(buffer) {
    if (buffer.byteLength === buffer.buffer.byteLength) {
      return buffer.buffer;
    }
    return new Uint8Array(buffer).buffer;
  }
  function isValidSubprotocol(protocol) {
    if (protocol.length === 0) {
      return false;
    }
    for (let i = 0;i < protocol.length; ++i) {
      const code2 = protocol.charCodeAt(i);
      if (code2 < 33 || code2 > 126 || code2 === 34 || code2 === 40 || code2 === 41 || code2 === 44 || code2 === 47 || code2 === 58 || code2 === 59 || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 63 || code2 === 64 || code2 === 91 || code2 === 92 || code2 === 93 || code2 === 123 || code2 === 125) {
        return false;
      }
    }
    return true;
  }
  function isValidStatusCode(code2) {
    if (code2 >= 1000 && code2 < 1015) {
      return code2 !== 1004 && code2 !== 1005 && code2 !== 1006;
    }
    return code2 >= 3000 && code2 <= 4999;
  }
  function isControlFrame(opcode) {
    return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG;
  }
  function isContinuationFrame(opcode) {
    return opcode === opcodes.CONTINUATION;
  }
  function isTextBinaryFrame(opcode) {
    return opcode === opcodes.TEXT || opcode === opcodes.BINARY;
  }
  function isValidOpcode(opcode) {
    return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode);
  }
  function parseExtensions(extensions) {
    const position = { position: 0 };
    const extensionList = new Map;
    while (position.position < extensions.length) {
      const pair = collectASequenceOfCodePointsFast(";", extensions, position);
      const [name3, value = ""] = pair.split("=", 2);
      extensionList.set(removeHTTPWhitespace(name3, true, false), removeHTTPWhitespace(value, false, true));
      position.position++;
    }
    return extensionList;
  }
  function isValidClientWindowBits(value) {
    if (value.length === 0) {
      return false;
    }
    for (let i = 0;i < value.length; i++) {
      const byte = value.charCodeAt(i);
      if (byte < 48 || byte > 57) {
        return false;
      }
    }
    const num = Number.parseInt(value, 10);
    return num >= 8 && num <= 15;
  }
  function getURLRecord(url2, baseURL) {
    let urlRecord;
    try {
      urlRecord = new URL(url2, baseURL);
    } catch (e3) {
      throw new DOMException(e3, "SyntaxError");
    }
    if (urlRecord.protocol === "http:") {
      urlRecord.protocol = "ws:";
    } else if (urlRecord.protocol === "https:") {
      urlRecord.protocol = "wss:";
    }
    if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") {
      throw new DOMException("expected a ws: or wss: url", "SyntaxError");
    }
    if (urlRecord.hash.length || urlRecord.href.endsWith("#")) {
      throw new DOMException("hash", "SyntaxError");
    }
    return urlRecord;
  }
  function validateCloseCodeAndReason(code2, reason) {
    if (code2 !== null) {
      if (code2 !== 1000 && (code2 < 3000 || code2 > 4999)) {
        throw new DOMException("invalid code", "InvalidAccessError");
      }
    }
    if (reason !== null) {
      const reasonBytesLength = Buffer.byteLength(reason);
      if (reasonBytesLength > 123) {
        throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, "SyntaxError");
      }
    }
  }
  var utf8Decode = (() => {
    if (typeof process.versions.icu === "string") {
      const fatalDecoder = new TextDecoder("utf-8", { fatal: true });
      return fatalDecoder.decode.bind(fatalDecoder);
    }
    return function(buffer) {
      if (isUtf8(buffer)) {
        return buffer.toString("utf-8");
      }
      throw new TypeError("Invalid utf-8 received.");
    };
  })();
  module.exports = {
    isConnecting,
    isEstablished,
    isClosing,
    isClosed,
    fireEvent,
    isValidSubprotocol,
    isValidStatusCode,
    websocketMessageReceived,
    utf8Decode,
    isControlFrame,
    isContinuationFrame,
    isTextBinaryFrame,
    isValidOpcode,
    parseExtensions,
    isValidClientWindowBits,
    toArrayBuffer,
    getURLRecord,
    validateCloseCodeAndReason
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/frame.js
var require_frame = __commonJS((exports2, module) => {
  var { runtimeFeatures } = require_runtime_features();
  var { maxUnsigned16Bit, opcodes } = require_constants9();
  var BUFFER_SIZE = 8 * 1024;
  var buffer = null;
  var bufIdx = BUFFER_SIZE;
  var randomFillSync = runtimeFeatures.has("crypto") ? __require("node:crypto").randomFillSync : function randomFillSync2(buffer2, _offset, _size2) {
    for (let i = 0;i < buffer2.length; ++i) {
      buffer2[i] = Math.random() * 255 | 0;
    }
    return buffer2;
  };
  function generateMask() {
    if (bufIdx === BUFFER_SIZE) {
      bufIdx = 0;
      randomFillSync(buffer ??= Buffer.allocUnsafeSlow(BUFFER_SIZE), 0, BUFFER_SIZE);
    }
    return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]];
  }

  class WebsocketFrameSend {
    constructor(data) {
      this.frameData = data;
    }
    createFrame(opcode) {
      const frameData = this.frameData;
      const maskKey = generateMask();
      const bodyLength = frameData?.byteLength ?? 0;
      let payloadLength = bodyLength;
      let offset = 6;
      if (bodyLength > maxUnsigned16Bit) {
        offset += 8;
        payloadLength = 127;
      } else if (bodyLength > 125) {
        offset += 2;
        payloadLength = 126;
      }
      const buffer2 = Buffer.allocUnsafe(bodyLength + offset);
      buffer2[0] = buffer2[1] = 0;
      buffer2[0] |= 128;
      buffer2[0] = (buffer2[0] & 240) + opcode;
      /*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
      buffer2[offset - 4] = maskKey[0];
      buffer2[offset - 3] = maskKey[1];
      buffer2[offset - 2] = maskKey[2];
      buffer2[offset - 1] = maskKey[3];
      buffer2[1] = payloadLength;
      if (payloadLength === 126) {
        buffer2.writeUInt16BE(bodyLength, 2);
      } else if (payloadLength === 127) {
        buffer2[2] = buffer2[3] = 0;
        buffer2.writeUIntBE(bodyLength, 4, 6);
      }
      buffer2[1] |= 128;
      for (let i = 0;i < bodyLength; ++i) {
        buffer2[offset + i] = frameData[i] ^ maskKey[i & 3];
      }
      return buffer2;
    }
    static createFastTextFrame(buffer2) {
      const maskKey = generateMask();
      const bodyLength = buffer2.length;
      for (let i = 0;i < bodyLength; ++i) {
        buffer2[i] ^= maskKey[i & 3];
      }
      let payloadLength = bodyLength;
      let offset = 6;
      if (bodyLength > maxUnsigned16Bit) {
        offset += 8;
        payloadLength = 127;
      } else if (bodyLength > 125) {
        offset += 2;
        payloadLength = 126;
      }
      const head2 = Buffer.allocUnsafeSlow(offset);
      head2[0] = 128 | opcodes.TEXT;
      head2[1] = payloadLength | 128;
      head2[offset - 4] = maskKey[0];
      head2[offset - 3] = maskKey[1];
      head2[offset - 2] = maskKey[2];
      head2[offset - 1] = maskKey[3];
      if (payloadLength === 126) {
        head2.writeUInt16BE(bodyLength, 2);
      } else if (payloadLength === 127) {
        head2[2] = head2[3] = 0;
        head2.writeUIntBE(bodyLength, 4, 6);
      }
      return [head2, buffer2];
    }
  }
  module.exports = {
    WebsocketFrameSend,
    generateMask
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/connection.js
var require_connection2 = __commonJS((exports2, module) => {
  var { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants9();
  var { parseExtensions, isClosed, isClosing, isEstablished, isConnecting, validateCloseCodeAndReason } = require_util7();
  var { makeRequest } = require_request2();
  var { fetching } = require_fetch();
  var { Headers: Headers2, getHeadersList } = require_headers();
  var { getDecodeSplit } = require_util4();
  var { WebsocketFrameSend } = require_frame();
  var assert2 = __require("node:assert");
  var { runtimeFeatures } = require_runtime_features();
  var crypto3 = runtimeFeatures.has("crypto") ? __require("node:crypto") : null;
  var warningEmitted = false;
  function establishWebSocketConnection(url2, protocols, client, handler, options2) {
    const requestURL = url2;
    requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:";
    const request2 = makeRequest({
      urlList: [requestURL],
      client,
      serviceWorkers: "none",
      referrer: "no-referrer",
      mode: "websocket",
      credentials: "include",
      cache: "no-store",
      redirect: "error",
      useURLCredentials: true
    });
    if (options2.headers) {
      const headersList = getHeadersList(new Headers2(options2.headers));
      request2.headersList = headersList;
    }
    const keyValue = crypto3.randomBytes(16).toString("base64");
    request2.headersList.append("sec-websocket-key", keyValue, true);
    request2.headersList.append("sec-websocket-version", "13", true);
    for (const protocol of protocols) {
      request2.headersList.append("sec-websocket-protocol", protocol, true);
    }
    const permessageDeflate = "permessage-deflate; client_max_window_bits";
    request2.headersList.append("sec-websocket-extensions", permessageDeflate, true);
    const controller = fetching({
      request: request2,
      useParallelQueue: true,
      dispatcher: options2.dispatcher,
      processResponse(response) {
        if (response.type === "error" || response.status !== 101) {
          if (response.socket?.session == null) {
            failWebsocketConnection(handler, 1002, "Received network error or non-101 status code.", response.error);
            return;
          }
          if (response.status !== 200) {
            failWebsocketConnection(handler, 1002, "Received network error or non-200 status code.", response.error);
            return;
          }
        }
        if (warningEmitted === false && response.socket?.session != null) {
          process.emitWarning("WebSocket over HTTP2 is experimental, and subject to change.", "ExperimentalWarning");
          warningEmitted = true;
        }
        if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) {
          failWebsocketConnection(handler, 1002, "Server did not respond with sent protocols.");
          return;
        }
        if (response.socket.session == null && response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") {
          failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to "websocket".');
          return;
        }
        if (response.socket.session == null && response.headersList.get("Connection")?.toLowerCase() !== "upgrade") {
          failWebsocketConnection(handler, 1002, 'Server did not set Connection header to "upgrade".');
          return;
        }
        const secWSAccept = response.headersList.get("Sec-WebSocket-Accept");
        const digest = crypto3.hash("sha1", keyValue + uid, "base64");
        if (secWSAccept !== digest) {
          failWebsocketConnection(handler, 1002, "Incorrect hash received in Sec-WebSocket-Accept header.");
          return;
        }
        const secExtension = response.headersList.get("Sec-WebSocket-Extensions");
        let extensions;
        if (secExtension !== null) {
          extensions = parseExtensions(secExtension);
          if (!extensions.has("permessage-deflate")) {
            failWebsocketConnection(handler, 1002, "Sec-WebSocket-Extensions header does not match.");
            return;
          }
        }
        const secProtocol = response.headersList.get("Sec-WebSocket-Protocol");
        if (secProtocol !== null) {
          const requestProtocols = getDecodeSplit("sec-websocket-protocol", request2.headersList);
          if (!requestProtocols.includes(secProtocol)) {
            failWebsocketConnection(handler, 1002, "Protocol was not set in the opening handshake.");
            return;
          }
        }
        response.socket.on("data", handler.onSocketData);
        response.socket.on("close", handler.onSocketClose);
        response.socket.on("error", handler.onSocketError);
        handler.wasEverConnected = true;
        handler.onConnectionEstablished(response, extensions);
      }
    });
    return controller;
  }
  function closeWebSocketConnection(object2, code2, reason, validate = false) {
    code2 ??= null;
    reason ??= "";
    if (validate)
      validateCloseCodeAndReason(code2, reason);
    if (isClosed(object2.readyState) || isClosing(object2.readyState)) {} else if (!isEstablished(object2.readyState)) {
      failWebsocketConnection(object2);
      object2.readyState = states.CLOSING;
    } else if (!object2.closeState.has(sentCloseFrameState.SENT) && !object2.closeState.has(sentCloseFrameState.RECEIVED)) {
      const frame = new WebsocketFrameSend;
      if (reason.length !== 0 && code2 === null) {
        code2 = 1000;
      }
      assert2(code2 === null || Number.isInteger(code2));
      if (code2 === null && reason.length === 0) {
        frame.frameData = emptyBuffer;
      } else if (code2 !== null && reason === null) {
        frame.frameData = Buffer.allocUnsafe(2);
        frame.frameData.writeUInt16BE(code2, 0);
      } else if (code2 !== null && reason !== null) {
        frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason));
        frame.frameData.writeUInt16BE(code2, 0);
        frame.frameData.write(reason, 2, "utf-8");
      } else {
        frame.frameData = emptyBuffer;
      }
      object2.socket.write(frame.createFrame(opcodes.CLOSE));
      object2.closeState.add(sentCloseFrameState.SENT);
      object2.readyState = states.CLOSING;
    } else {
      object2.readyState = states.CLOSING;
    }
  }
  function failWebsocketConnection(handler, code2, reason, cause) {
    if (isEstablished(handler.readyState)) {
      closeWebSocketConnection(handler, code2, reason, false);
    }
    handler.controller.abort();
    if (isConnecting(handler.readyState)) {
      handler.onSocketClose();
    } else if (handler.socket?.destroyed === false) {
      handler.socket.destroy();
    }
  }
  module.exports = {
    establishWebSocketConnection,
    failWebsocketConnection,
    closeWebSocketConnection
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/permessage-deflate.js
var require_permessage_deflate = __commonJS((exports2, module) => {
  var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib");
  var { isValidClientWindowBits } = require_util7();
  var { MessageSizeExceededError } = require_errors8();
  var tail = Buffer.from([0, 0, 255, 255]);
  var kBuffer = Symbol("kBuffer");
  var kLength = Symbol("kLength");

  class PerMessageDeflate {
    #inflate;
    #options = {};
    #maxPayloadSize = 0;
    constructor(extensions, options2) {
      this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover");
      this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits");
      this.#maxPayloadSize = options2.maxPayloadSize;
    }
    decompress(chunk, fin, callback) {
      if (!this.#inflate) {
        let windowBits = Z_DEFAULT_WINDOWBITS;
        if (this.#options.serverMaxWindowBits) {
          if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) {
            callback(new Error("Invalid server_max_window_bits"));
            return;
          }
          windowBits = Number.parseInt(this.#options.serverMaxWindowBits);
        }
        try {
          this.#inflate = createInflateRaw({ windowBits });
        } catch (err) {
          callback(err);
          return;
        }
        this.#inflate[kBuffer] = [];
        this.#inflate[kLength] = 0;
        this.#inflate.on("data", (data) => {
          this.#inflate[kLength] += data.length;
          if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) {
            callback(new MessageSizeExceededError);
            this.#inflate.removeAllListeners();
            this.#inflate = null;
            return;
          }
          this.#inflate[kBuffer].push(data);
        });
        this.#inflate.on("error", (err) => {
          this.#inflate = null;
          callback(err);
        });
      }
      this.#inflate.write(chunk);
      if (fin) {
        this.#inflate.write(tail);
      }
      this.#inflate.flush(() => {
        if (!this.#inflate) {
          return;
        }
        const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]);
        this.#inflate[kBuffer].length = 0;
        this.#inflate[kLength] = 0;
        callback(null, full);
      });
    }
  }
  module.exports = { PerMessageDeflate };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/receiver.js
var require_receiver = __commonJS((exports2, module) => {
  var { Writable: Writable3 } = __require("node:stream");
  var assert2 = __require("node:assert");
  var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants9();
  var {
    isValidStatusCode,
    isValidOpcode,
    websocketMessageReceived,
    utf8Decode,
    isControlFrame,
    isTextBinaryFrame,
    isContinuationFrame
  } = require_util7();
  var { failWebsocketConnection } = require_connection2();
  var { WebsocketFrameSend } = require_frame();
  var { PerMessageDeflate } = require_permessage_deflate();
  var { MessageSizeExceededError } = require_errors8();

  class ByteParser extends Writable3 {
    #buffers = [];
    #fragmentsBytes = 0;
    #byteOffset = 0;
    #loop = false;
    #state = parserStates.INFO;
    #info = {};
    #fragments = [];
    #extensions;
    #handler;
    #maxFragments;
    #maxPayloadSize;
    constructor(handler, extensions, options2 = {}) {
      super();
      this.#handler = handler;
      this.#extensions = extensions == null ? new Map : extensions;
      this.#maxFragments = options2.maxFragments ?? 0;
      this.#maxPayloadSize = options2.maxPayloadSize ?? 0;
      if (this.#extensions.has("permessage-deflate")) {
        this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options2));
      }
    }
    _write(chunk, _6, callback) {
      this.#buffers.push(chunk);
      this.#byteOffset += chunk.length;
      this.#loop = true;
      this.run(callback);
    }
    #validatePayloadLength() {
      if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize) {
        failWebsocketConnection(this.#handler, 1009, "Payload size exceeds maximum allowed size");
        return false;
      }
      return true;
    }
    run(callback) {
      while (this.#loop) {
        if (this.#state === parserStates.INFO) {
          if (this.#byteOffset < 2) {
            return callback();
          }
          const buffer = this.consume(2);
          const fin = (buffer[0] & 128) !== 0;
          const opcode = buffer[0] & 15;
          const masked = (buffer[1] & 128) === 128;
          const fragmented = !fin && opcode !== opcodes.CONTINUATION;
          const payloadLength = buffer[1] & 127;
          const rsv1 = buffer[0] & 64;
          const rsv2 = buffer[0] & 32;
          const rsv3 = buffer[0] & 16;
          if (!isValidOpcode(opcode)) {
            failWebsocketConnection(this.#handler, 1002, "Invalid opcode received");
            return callback();
          }
          if (masked) {
            failWebsocketConnection(this.#handler, 1002, "Frame cannot be masked");
            return callback();
          }
          if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) {
            failWebsocketConnection(this.#handler, 1002, "Expected RSV1 to be clear.");
            return;
          }
          if (rsv2 !== 0 || rsv3 !== 0) {
            failWebsocketConnection(this.#handler, 1002, "RSV1, RSV2, RSV3 must be clear");
            return;
          }
          if (fragmented && !isTextBinaryFrame(opcode)) {
            failWebsocketConnection(this.#handler, 1002, "Invalid frame type was fragmented.");
            return;
          }
          if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) {
            failWebsocketConnection(this.#handler, 1002, "Expected continuation frame");
            return;
          }
          if (this.#info.fragmented && fragmented) {
            failWebsocketConnection(this.#handler, 1002, "Fragmented frame exceeded 125 bytes.");
            return;
          }
          if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) {
            failWebsocketConnection(this.#handler, 1002, "Control frame either too large or fragmented");
            return;
          }
          if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) {
            failWebsocketConnection(this.#handler, 1002, "Unexpected continuation frame");
            return;
          }
          if (payloadLength <= 125) {
            this.#info.payloadLength = payloadLength;
            this.#state = parserStates.READ_DATA;
            if (!this.#validatePayloadLength()) {
              return;
            }
          } else if (payloadLength === 126) {
            this.#state = parserStates.PAYLOADLENGTH_16;
          } else if (payloadLength === 127) {
            this.#state = parserStates.PAYLOADLENGTH_64;
          }
          if (isTextBinaryFrame(opcode)) {
            this.#info.binaryType = opcode;
            this.#info.compressed = rsv1 !== 0;
          }
          this.#info.opcode = opcode;
          this.#info.masked = masked;
          this.#info.fin = fin;
          this.#info.fragmented = fragmented;
        } else if (this.#state === parserStates.PAYLOADLENGTH_16) {
          if (this.#byteOffset < 2) {
            return callback();
          }
          const buffer = this.consume(2);
          this.#info.payloadLength = buffer.readUInt16BE(0);
          this.#state = parserStates.READ_DATA;
          if (!this.#validatePayloadLength()) {
            return;
          }
        } else if (this.#state === parserStates.PAYLOADLENGTH_64) {
          if (this.#byteOffset < 8) {
            return callback();
          }
          const buffer = this.consume(8);
          const upper = buffer.readUInt32BE(0);
          const lower = buffer.readUInt32BE(4);
          if (upper !== 0 || lower > 2 ** 31 - 1) {
            failWebsocketConnection(this.#handler, 1009, "Received payload length > 2^31 bytes.");
            return;
          }
          this.#info.payloadLength = lower;
          this.#state = parserStates.READ_DATA;
          if (!this.#validatePayloadLength()) {
            return;
          }
        } else if (this.#state === parserStates.READ_DATA) {
          if (this.#byteOffset < this.#info.payloadLength) {
            return callback();
          }
          const body2 = this.consume(this.#info.payloadLength);
          if (isControlFrame(this.#info.opcode)) {
            this.#loop = this.parseControlFrame(body2);
            this.#state = parserStates.INFO;
          } else {
            if (!this.#info.compressed) {
              if (!this.writeFragments(body2)) {
                return;
              }
              if (!this.#info.fragmented && this.#info.fin) {
                websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments());
              }
              this.#state = parserStates.INFO;
            } else {
              this.#extensions.get("permessage-deflate").decompress(body2, this.#info.fin, (error49, data) => {
                if (error49) {
                  const code2 = error49 instanceof MessageSizeExceededError ? 1009 : 1007;
                  failWebsocketConnection(this.#handler, code2, error49.message);
                  return;
                }
                if (!this.writeFragments(data)) {
                  return;
                }
                if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
                  failWebsocketConnection(this.#handler, 1009, new MessageSizeExceededError().message);
                  return;
                }
                if (!this.#info.fin) {
                  this.#state = parserStates.INFO;
                  this.#loop = true;
                  this.run(callback);
                  return;
                }
                websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments());
                this.#loop = true;
                this.#state = parserStates.INFO;
                this.run(callback);
              }, this.#fragmentsBytes);
              this.#loop = false;
              break;
            }
          }
        }
      }
    }
    consume(n3) {
      if (n3 > this.#byteOffset) {
        throw new Error("Called consume() before buffers satiated.");
      } else if (n3 === 0) {
        return emptyBuffer;
      }
      this.#byteOffset -= n3;
      const first = this.#buffers[0];
      if (first.length > n3) {
        this.#buffers[0] = first.subarray(n3, first.length);
        return first.subarray(0, n3);
      } else if (first.length === n3) {
        return this.#buffers.shift();
      } else {
        let offset = 0;
        const buffer = Buffer.allocUnsafeSlow(n3);
        while (offset !== n3) {
          const next = this.#buffers[0];
          const length2 = next.length;
          if (length2 + offset === n3) {
            buffer.set(this.#buffers.shift(), offset);
            break;
          } else if (length2 + offset > n3) {
            buffer.set(next.subarray(0, n3 - offset), offset);
            this.#buffers[0] = next.subarray(n3 - offset);
            break;
          } else {
            buffer.set(this.#buffers.shift(), offset);
            offset += length2;
          }
        }
        return buffer;
      }
    }
    writeFragments(fragment) {
      if (this.#maxFragments > 0 && this.#fragments.length === this.#maxFragments) {
        failWebsocketConnection(this.#handler, 1008, "Too many message fragments");
        return false;
      }
      this.#fragmentsBytes += fragment.length;
      this.#fragments.push(fragment);
      return true;
    }
    consumeFragments() {
      const fragments = this.#fragments;
      if (fragments.length === 1) {
        this.#fragmentsBytes = 0;
        return fragments.shift();
      }
      let offset = 0;
      const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes);
      for (let i = 0;i < fragments.length; ++i) {
        const buffer = fragments[i];
        output.set(buffer, offset);
        offset += buffer.length;
      }
      this.#fragments = [];
      this.#fragmentsBytes = 0;
      return output;
    }
    parseCloseBody(data) {
      assert2(data.length !== 1);
      let code2;
      if (data.length >= 2) {
        code2 = data.readUInt16BE(0);
      }
      if (code2 !== undefined && !isValidStatusCode(code2)) {
        return { code: 1002, reason: "Invalid status code", error: true };
      }
      let reason = data.subarray(2);
      if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) {
        reason = reason.subarray(3);
      }
      try {
        reason = utf8Decode(reason);
      } catch {
        return { code: 1007, reason: "Invalid UTF-8", error: true };
      }
      return { code: code2, reason, error: false };
    }
    parseControlFrame(body2) {
      const { opcode, payloadLength } = this.#info;
      if (opcode === opcodes.CLOSE) {
        if (payloadLength === 1) {
          failWebsocketConnection(this.#handler, 1002, "Received close frame with a 1-byte body.");
          return false;
        }
        this.#info.closeInfo = this.parseCloseBody(body2);
        if (this.#info.closeInfo.error) {
          const { code: code2, reason } = this.#info.closeInfo;
          failWebsocketConnection(this.#handler, code2, reason);
          return false;
        }
        if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
          let body3 = emptyBuffer;
          if (this.#info.closeInfo.code) {
            body3 = Buffer.allocUnsafe(2);
            body3.writeUInt16BE(this.#info.closeInfo.code, 0);
          }
          const closeFrame = new WebsocketFrameSend(body3);
          this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE));
          this.#handler.closeState.add(sentCloseFrameState.SENT);
        }
        this.#handler.readyState = states.CLOSING;
        this.#handler.closeState.add(sentCloseFrameState.RECEIVED);
        return false;
      } else if (opcode === opcodes.PING) {
        if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
          const frame = new WebsocketFrameSend(body2);
          this.#handler.socket.write(frame.createFrame(opcodes.PONG));
          this.#handler.onPing(body2);
        }
      } else if (opcode === opcodes.PONG) {
        this.#handler.onPong(body2);
      }
      return true;
    }
    get closingInfo() {
      return this.#info.closeInfo;
    }
  }
  module.exports = {
    ByteParser
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/sender.js
var require_sender = __commonJS((exports2, module) => {
  var { WebsocketFrameSend } = require_frame();
  var { opcodes, sendHints } = require_constants9();
  var FixedQueue = require_fixed_queue();

  class SendQueue {
    #queue = new FixedQueue;
    #running = false;
    #socket;
    constructor(socket) {
      this.#socket = socket;
    }
    add(item, cb2, hint) {
      if (hint !== sendHints.blob) {
        if (!this.#running) {
          if (hint === sendHints.text) {
            const { 0: head2, 1: body2 } = WebsocketFrameSend.createFastTextFrame(item);
            this.#socket.cork();
            this.#socket.write(head2);
            this.#socket.write(body2, cb2);
            this.#socket.uncork();
          } else {
            this.#socket.write(createFrame2(item, hint), cb2);
          }
        } else {
          const node4 = {
            promise: null,
            callback: cb2,
            frame: createFrame2(item, hint)
          };
          this.#queue.push(node4);
        }
        return;
      }
      const node3 = {
        promise: item.arrayBuffer().then((ab2) => {
          node3.promise = null;
          node3.frame = createFrame2(ab2, hint);
        }),
        callback: cb2,
        frame: null
      };
      this.#queue.push(node3);
      if (!this.#running) {
        this.#run();
      }
    }
    async#run() {
      this.#running = true;
      const queue = this.#queue;
      while (!queue.isEmpty()) {
        const node3 = queue.shift();
        if (node3.promise !== null) {
          await node3.promise;
        }
        this.#socket.write(node3.frame, node3.callback);
        node3.callback = node3.frame = null;
      }
      this.#running = false;
    }
  }
  function createFrame2(data, hint) {
    return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.text ? opcodes.TEXT : opcodes.BINARY);
  }
  function toBuffer(data, hint) {
    switch (hint) {
      case sendHints.text:
      case sendHints.typedArray:
        return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
      case sendHints.arrayBuffer:
      case sendHints.blob:
        return new Uint8Array(data);
    }
  }
  module.exports = { SendQueue };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/websocket.js
var require_websocket = __commonJS((exports2, module) => {
  var { isArrayBuffer } = __require("node:util/types");
  var { webidl } = require_webidl();
  var { URLSerializer } = require_data_url();
  var { environmentSettingsObject } = require_util4();
  var { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = require_constants9();
  var {
    isConnecting,
    isEstablished,
    isClosing,
    isClosed,
    isValidSubprotocol,
    fireEvent,
    utf8Decode,
    toArrayBuffer,
    getURLRecord
  } = require_util7();
  var { establishWebSocketConnection, closeWebSocketConnection, failWebsocketConnection } = require_connection2();
  var { ByteParser } = require_receiver();
  var { kEnumerableProperty } = require_util3();
  var { getGlobalDispatcher } = require_global2();
  var { ErrorEvent, CloseEvent, createFastMessageEvent } = require_events();
  var { SendQueue } = require_sender();
  var { WebsocketFrameSend } = require_frame();
  var { channels } = require_diagnostics();
  function getSocketAddress(socket) {
    if (typeof socket?.address === "function") {
      return socket.address();
    }
    if (typeof socket?.session?.socket?.address === "function") {
      return socket.session.socket.address();
    }
    return null;
  }

  class WebSocket extends EventTarget {
    #events = {
      open: null,
      error: null,
      close: null,
      message: null
    };
    #bufferedAmount = 0;
    #protocol = "";
    #extensions = "";
    #sendQueue;
    #handler = {
      onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
      onMessage: (opcode, data) => this.#onMessage(opcode, data),
      onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
      onParserDrain: () => this.#onParserDrain(),
      onSocketData: (chunk) => {
        if (!this.#parser.write(chunk)) {
          this.#handler.socket.pause();
        }
      },
      onSocketError: (err) => {
        this.#handler.readyState = states.CLOSING;
        if (channels.socketError.hasSubscribers) {
          channels.socketError.publish(err);
        }
        this.#handler.socket.destroy();
      },
      onSocketClose: () => this.#onSocketClose(),
      onPing: (body2) => {
        if (channels.ping.hasSubscribers) {
          channels.ping.publish({
            payload: body2,
            websocket: this
          });
        }
      },
      onPong: (body2) => {
        if (channels.pong.hasSubscribers) {
          channels.pong.publish({
            payload: body2,
            websocket: this
          });
        }
      },
      readyState: states.CONNECTING,
      socket: null,
      closeState: new Set,
      controller: null,
      wasEverConnected: false
    };
    #url;
    #binaryType;
    #parser;
    constructor(url2, protocols = []) {
      super();
      webidl.util.markAsUncloneable(this);
      const prefix = "WebSocket constructor";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      const options2 = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options");
      url2 = webidl.converters.USVString(url2);
      protocols = options2.protocols;
      const baseURL = environmentSettingsObject.settingsObject.baseUrl;
      const urlRecord = getURLRecord(url2, baseURL);
      if (typeof protocols === "string") {
        protocols = [protocols];
      }
      if (protocols.length !== new Set(protocols.map((p3) => p3.toLowerCase())).size) {
        throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError");
      }
      if (protocols.length > 0 && !protocols.every((p3) => isValidSubprotocol(p3))) {
        throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError");
      }
      this.#url = new URL(urlRecord.href);
      const client = environmentSettingsObject.settingsObject;
      this.#handler.controller = establishWebSocketConnection(urlRecord, protocols, client, this.#handler, options2);
      this.#handler.readyState = WebSocket.CONNECTING;
      this.#binaryType = "blob";
    }
    close(code2 = undefined, reason = undefined) {
      webidl.brandCheck(this, WebSocket);
      const prefix = "WebSocket.close";
      if (code2 !== undefined) {
        code2 = webidl.converters["unsigned short"](code2, prefix, "code", webidl.attributes.Clamp);
      }
      if (reason !== undefined) {
        reason = webidl.converters.USVString(reason);
      }
      code2 ??= null;
      reason ??= "";
      closeWebSocketConnection(this.#handler, code2, reason, true);
    }
    send(data) {
      webidl.brandCheck(this, WebSocket);
      const prefix = "WebSocket.send";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      data = webidl.converters.WebSocketSendData(data, prefix, "data");
      if (isConnecting(this.#handler.readyState)) {
        throw new DOMException("Sent before connected.", "InvalidStateError");
      }
      if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) {
        return;
      }
      if (typeof data === "string") {
        const buffer = Buffer.from(data);
        this.#bufferedAmount += buffer.byteLength;
        this.#sendQueue.add(buffer, () => {
          this.#bufferedAmount -= buffer.byteLength;
        }, sendHints.text);
      } else if (isArrayBuffer(data)) {
        this.#bufferedAmount += data.byteLength;
        this.#sendQueue.add(data, () => {
          this.#bufferedAmount -= data.byteLength;
        }, sendHints.arrayBuffer);
      } else if (ArrayBuffer.isView(data)) {
        this.#bufferedAmount += data.byteLength;
        this.#sendQueue.add(data, () => {
          this.#bufferedAmount -= data.byteLength;
        }, sendHints.typedArray);
      } else if (webidl.is.Blob(data)) {
        this.#bufferedAmount += data.size;
        this.#sendQueue.add(data, () => {
          this.#bufferedAmount -= data.size;
        }, sendHints.blob);
      }
    }
    get readyState() {
      webidl.brandCheck(this, WebSocket);
      return this.#handler.readyState;
    }
    get bufferedAmount() {
      webidl.brandCheck(this, WebSocket);
      return this.#bufferedAmount;
    }
    get url() {
      webidl.brandCheck(this, WebSocket);
      return URLSerializer(this.#url);
    }
    get extensions() {
      webidl.brandCheck(this, WebSocket);
      return this.#extensions;
    }
    get protocol() {
      webidl.brandCheck(this, WebSocket);
      return this.#protocol;
    }
    get onopen() {
      webidl.brandCheck(this, WebSocket);
      return this.#events.open;
    }
    set onopen(fn3) {
      webidl.brandCheck(this, WebSocket);
      if (this.#events.open) {
        this.removeEventListener("open", this.#events.open);
      }
      const listener = webidl.converters.EventHandlerNonNull(fn3);
      if (listener !== null) {
        this.addEventListener("open", listener);
        this.#events.open = fn3;
      } else {
        this.#events.open = null;
      }
    }
    get onerror() {
      webidl.brandCheck(this, WebSocket);
      return this.#events.error;
    }
    set onerror(fn3) {
      webidl.brandCheck(this, WebSocket);
      if (this.#events.error) {
        this.removeEventListener("error", this.#events.error);
      }
      const listener = webidl.converters.EventHandlerNonNull(fn3);
      if (listener !== null) {
        this.addEventListener("error", listener);
        this.#events.error = fn3;
      } else {
        this.#events.error = null;
      }
    }
    get onclose() {
      webidl.brandCheck(this, WebSocket);
      return this.#events.close;
    }
    set onclose(fn3) {
      webidl.brandCheck(this, WebSocket);
      if (this.#events.close) {
        this.removeEventListener("close", this.#events.close);
      }
      const listener = webidl.converters.EventHandlerNonNull(fn3);
      if (listener !== null) {
        this.addEventListener("close", listener);
        this.#events.close = fn3;
      } else {
        this.#events.close = null;
      }
    }
    get onmessage() {
      webidl.brandCheck(this, WebSocket);
      return this.#events.message;
    }
    set onmessage(fn3) {
      webidl.brandCheck(this, WebSocket);
      if (this.#events.message) {
        this.removeEventListener("message", this.#events.message);
      }
      const listener = webidl.converters.EventHandlerNonNull(fn3);
      if (listener !== null) {
        this.addEventListener("message", listener);
        this.#events.message = fn3;
      } else {
        this.#events.message = null;
      }
    }
    get binaryType() {
      webidl.brandCheck(this, WebSocket);
      return this.#binaryType;
    }
    set binaryType(type2) {
      webidl.brandCheck(this, WebSocket);
      if (type2 !== "blob" && type2 !== "arraybuffer") {
        this.#binaryType = "blob";
      } else {
        this.#binaryType = type2;
      }
    }
    #onConnectionEstablished(response, parsedExtensions) {
      this.#handler.socket = response.socket;
      const webSocketOptions = this.#handler.controller.dispatcher?.webSocketOptions;
      const maxFragments = webSocketOptions?.maxFragments;
      const maxPayloadSize = webSocketOptions?.maxPayloadSize;
      const parser2 = new ByteParser(this.#handler, parsedExtensions, {
        maxFragments,
        maxPayloadSize
      });
      parser2.on("drain", () => this.#handler.onParserDrain());
      parser2.on("error", (err) => this.#handler.onParserError(err));
      this.#parser = parser2;
      this.#sendQueue = new SendQueue(response.socket);
      this.#handler.readyState = states.OPEN;
      const extensions = response.headersList.get("sec-websocket-extensions");
      if (extensions !== null) {
        this.#extensions = extensions;
      }
      const protocol = response.headersList.get("sec-websocket-protocol");
      if (protocol !== null) {
        this.#protocol = protocol;
      }
      fireEvent("open", this);
      if (channels.open.hasSubscribers) {
        const headers = response.headersList.entries;
        channels.open.publish({
          address: getSocketAddress(response.socket),
          protocol: this.#protocol,
          extensions: this.#extensions,
          websocket: this,
          handshakeResponse: {
            status: response.status,
            statusText: response.statusText,
            headers
          }
        });
      }
    }
    #onMessage(type2, data) {
      if (this.#handler.readyState !== states.OPEN) {
        return;
      }
      let dataForEvent;
      if (type2 === opcodes.TEXT) {
        try {
          dataForEvent = utf8Decode(data);
        } catch {
          failWebsocketConnection(this.#handler, 1007, "Received invalid UTF-8 in text frame.");
          return;
        }
      } else if (type2 === opcodes.BINARY) {
        if (this.#binaryType === "blob") {
          dataForEvent = new Blob([data]);
        } else {
          dataForEvent = toArrayBuffer(data);
        }
      }
      fireEvent("message", this, createFastMessageEvent, {
        origin: this.#url.origin,
        data: dataForEvent
      });
    }
    #onParserDrain() {
      this.#handler.socket.resume();
    }
    #onSocketClose() {
      const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED);
      let code2 = 1005;
      let reason = "";
      const result = this.#parser?.closingInfo;
      if (result && !result.error) {
        code2 = result.code ?? 1005;
        reason = result.reason;
      }
      this.#handler.readyState = states.CLOSED;
      if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
        code2 = 1006;
        fireEvent("error", this, (type2, init4) => new ErrorEvent(type2, init4), {
          error: new TypeError(reason)
        });
      }
      fireEvent("close", this, (type2, init4) => new CloseEvent(type2, init4), {
        wasClean,
        code: code2,
        reason
      });
      if (channels.close.hasSubscribers) {
        channels.close.publish({
          websocket: this,
          code: code2,
          reason
        });
      }
    }
    static ping(ws3, buffer) {
      if (Buffer.isBuffer(buffer)) {
        if (buffer.length > 125) {
          throw new TypeError("A PING frame cannot have a body larger than 125 bytes.");
        }
      } else if (buffer !== undefined) {
        throw new TypeError("Expected buffer payload");
      }
      const readyState = ws3.#handler.readyState;
      if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {
        const frame = new WebsocketFrameSend(buffer);
        ws3.#handler.socket.write(frame.createFrame(opcodes.PING));
      }
    }
  }
  var { ping } = WebSocket;
  Reflect.deleteProperty(WebSocket, "ping");
  WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING;
  WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN;
  WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING;
  WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED;
  Object.defineProperties(WebSocket.prototype, {
    CONNECTING: staticPropertyDescriptors,
    OPEN: staticPropertyDescriptors,
    CLOSING: staticPropertyDescriptors,
    CLOSED: staticPropertyDescriptors,
    url: kEnumerableProperty,
    readyState: kEnumerableProperty,
    bufferedAmount: kEnumerableProperty,
    onopen: kEnumerableProperty,
    onerror: kEnumerableProperty,
    onclose: kEnumerableProperty,
    close: kEnumerableProperty,
    onmessage: kEnumerableProperty,
    binaryType: kEnumerableProperty,
    send: kEnumerableProperty,
    extensions: kEnumerableProperty,
    protocol: kEnumerableProperty,
    [Symbol.toStringTag]: {
      value: "WebSocket",
      writable: false,
      enumerable: false,
      configurable: true
    }
  });
  Object.defineProperties(WebSocket, {
    CONNECTING: staticPropertyDescriptors,
    OPEN: staticPropertyDescriptors,
    CLOSING: staticPropertyDescriptors,
    CLOSED: staticPropertyDescriptors
  });
  webidl.converters["sequence<DOMString>"] = webidl.sequenceConverter(webidl.converters.DOMString);
  webidl.converters["DOMString or sequence<DOMString>"] = function(V6, prefix, argument) {
    if (webidl.util.Type(V6) === webidl.util.Types.OBJECT && Symbol.iterator in V6) {
      return webidl.converters["sequence<DOMString>"](V6);
    }
    return webidl.converters.DOMString(V6, prefix, argument);
  };
  webidl.converters.WebSocketInit = webidl.dictionaryConverter([
    {
      key: "protocols",
      converter: webidl.converters["DOMString or sequence<DOMString>"],
      defaultValue: () => []
    },
    {
      key: "dispatcher",
      converter: webidl.converters.any,
      defaultValue: () => getGlobalDispatcher()
    },
    {
      key: "headers",
      converter: webidl.nullableConverter(webidl.converters.HeadersInit)
    }
  ]);
  webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"] = function(V6) {
    if (webidl.util.Type(V6) === webidl.util.Types.OBJECT && !(Symbol.iterator in V6)) {
      return webidl.converters.WebSocketInit(V6);
    }
    return { protocols: webidl.converters["DOMString or sequence<DOMString>"](V6) };
  };
  webidl.converters.WebSocketSendData = function(V6) {
    if (webidl.util.Type(V6) === webidl.util.Types.OBJECT) {
      if (webidl.is.Blob(V6)) {
        return V6;
      }
      if (webidl.is.BufferSource(V6)) {
        return V6;
      }
    }
    return webidl.converters.USVString(V6);
  };
  module.exports = {
    WebSocket,
    ping
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/stream/websocketerror.js
var require_websocketerror = __commonJS((exports2, module) => {
  var { webidl } = require_webidl();
  var { validateCloseCodeAndReason } = require_util7();
  var { kConstruct } = require_symbols2();
  var { kEnumerableProperty } = require_util3();
  function createInheritableDOMException() {

    class Test extends DOMException {
      get reason() {
        return "";
      }
    }
    if (new Test().reason !== undefined) {
      return DOMException;
    }
    return new Proxy(DOMException, {
      construct(target, args, newTarget) {
        const instance = Reflect.construct(target, args, target);
        Object.setPrototypeOf(instance, newTarget.prototype);
        return instance;
      }
    });
  }

  class WebSocketError extends createInheritableDOMException() {
    #closeCode;
    #reason;
    constructor(message2 = "", init4 = undefined) {
      message2 = webidl.converters.DOMString(message2, "WebSocketError", "message");
      super(message2, "WebSocketError");
      if (init4 === kConstruct) {
        return;
      } else if (init4 !== null) {
        init4 = webidl.converters.WebSocketCloseInfo(init4);
      }
      let code2 = init4.closeCode ?? null;
      const reason = init4.reason ?? "";
      validateCloseCodeAndReason(code2, reason);
      if (reason.length !== 0 && code2 === null) {
        code2 = 1000;
      }
      this.#closeCode = code2;
      this.#reason = reason;
    }
    get closeCode() {
      return this.#closeCode;
    }
    get reason() {
      return this.#reason;
    }
    static createUnvalidatedWebSocketError(message2, code2, reason) {
      const error49 = new WebSocketError(message2, kConstruct);
      error49.#closeCode = code2;
      error49.#reason = reason;
      return error49;
    }
  }
  var { createUnvalidatedWebSocketError } = WebSocketError;
  delete WebSocketError.createUnvalidatedWebSocketError;
  Object.defineProperties(WebSocketError.prototype, {
    closeCode: kEnumerableProperty,
    reason: kEnumerableProperty,
    [Symbol.toStringTag]: {
      value: "WebSocketError",
      writable: false,
      enumerable: false,
      configurable: true
    }
  });
  webidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError);
  module.exports = { WebSocketError, createUnvalidatedWebSocketError };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/websocket/stream/websocketstream.js
var require_websocketstream = __commonJS((exports2, module) => {
  var { createDeferredPromise } = require_promise3();
  var { environmentSettingsObject } = require_util4();
  var { states, opcodes, sentCloseFrameState } = require_constants9();
  var { webidl } = require_webidl();
  var { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require_util7();
  var { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require_connection2();
  var { channels } = require_diagnostics();
  var { WebsocketFrameSend } = require_frame();
  var { ByteParser } = require_receiver();
  var { WebSocketError, createUnvalidatedWebSocketError } = require_websocketerror();
  var { kEnumerableProperty } = require_util3();
  var { utf8DecodeBytes } = require_encoding();
  var emittedExperimentalWarning = false;

  class WebSocketStream {
    #url;
    #openedPromise;
    #closedPromise;
    #readableStream;
    #readableStreamController;
    #writableStream;
    #handshakeAborted = false;
    #handler = {
      onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),
      onMessage: (opcode, data) => this.#onMessage(opcode, data),
      onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),
      onParserDrain: () => this.#handler.socket.resume(),
      onSocketData: (chunk) => {
        if (!this.#parser.write(chunk)) {
          this.#handler.socket.pause();
        }
      },
      onSocketError: (err) => {
        this.#handler.readyState = states.CLOSING;
        if (channels.socketError.hasSubscribers) {
          channels.socketError.publish(err);
        }
        this.#handler.socket.destroy();
      },
      onSocketClose: () => this.#onSocketClose(),
      onPing: () => {},
      onPong: () => {},
      readyState: states.CONNECTING,
      socket: null,
      closeState: new Set,
      controller: null,
      wasEverConnected: false
    };
    #parser;
    constructor(url2, options2 = undefined) {
      if (!emittedExperimentalWarning) {
        process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.", {
          code: "UNDICI-WSS"
        });
        emittedExperimentalWarning = true;
      }
      webidl.argumentLengthCheck(arguments, 1, "WebSocket");
      url2 = webidl.converters.USVString(url2);
      if (options2 !== null) {
        options2 = webidl.converters.WebSocketStreamOptions(options2);
      }
      const baseURL = environmentSettingsObject.settingsObject.baseUrl;
      const urlRecord = getURLRecord(url2, baseURL);
      const protocols = options2.protocols;
      if (protocols.length !== new Set(protocols.map((p3) => p3.toLowerCase())).size) {
        throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError");
      }
      if (protocols.length > 0 && !protocols.every((p3) => isValidSubprotocol(p3))) {
        throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError");
      }
      this.#url = urlRecord.toString();
      this.#openedPromise = createDeferredPromise();
      this.#closedPromise = createDeferredPromise();
      if (options2.signal != null) {
        const signal = options2.signal;
        if (signal.aborted) {
          this.#openedPromise.reject(signal.reason);
          this.#closedPromise.reject(signal.reason);
          return;
        }
        signal.addEventListener("abort", () => {
          if (!isEstablished(this.#handler.readyState)) {
            failWebsocketConnection(this.#handler);
            this.#handler.readyState = states.CLOSING;
            this.#openedPromise.reject(signal.reason);
            this.#closedPromise.reject(signal.reason);
            this.#handshakeAborted = true;
          }
        }, { once: true });
      }
      const client = environmentSettingsObject.settingsObject;
      this.#handler.controller = establishWebSocketConnection(urlRecord, protocols, client, this.#handler, options2);
    }
    get url() {
      return this.#url.toString();
    }
    get opened() {
      return this.#openedPromise.promise;
    }
    get closed() {
      return this.#closedPromise.promise;
    }
    close(closeInfo = undefined) {
      if (closeInfo !== null) {
        closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo);
      }
      const code2 = closeInfo.closeCode ?? null;
      const reason = closeInfo.reason;
      closeWebSocketConnection(this.#handler, code2, reason, true);
    }
    #write(chunk) {
      chunk = webidl.converters.WebSocketStreamWrite(chunk);
      const promise2 = createDeferredPromise();
      let data = null;
      let opcode = null;
      if (webidl.is.BufferSource(chunk)) {
        data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice());
        opcode = opcodes.BINARY;
      } else {
        let string4;
        try {
          string4 = webidl.converters.DOMString(chunk);
        } catch (e3) {
          promise2.reject(e3);
          return promise2.promise;
        }
        data = new TextEncoder().encode(string4);
        opcode = opcodes.TEXT;
      }
      if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
        const frame = new WebsocketFrameSend(data);
        this.#handler.socket.write(frame.createFrame(opcode), () => {
          promise2.resolve(undefined);
        });
      }
      return promise2.promise;
    }
    #onConnectionEstablished(response, parsedExtensions) {
      this.#handler.socket = response.socket;
      const maxFragments = this.#handler.controller.dispatcher?.webSocketOptions?.maxFragments;
      const maxPayloadSize = this.#handler.controller.dispatcher?.webSocketOptions?.maxPayloadSize;
      const parser2 = new ByteParser(this.#handler, parsedExtensions, {
        maxFragments,
        maxPayloadSize
      });
      parser2.on("drain", () => this.#handler.onParserDrain());
      parser2.on("error", (err) => this.#handler.onParserError(err));
      this.#parser = parser2;
      this.#handler.readyState = states.OPEN;
      const extensions = parsedExtensions ?? "";
      const protocol = response.headersList.get("sec-websocket-protocol") ?? "";
      const readable = new ReadableStream({
        start: (controller) => {
          this.#readableStreamController = controller;
        },
        cancel: (reason) => this.#cancel(reason)
      });
      const writable = new WritableStream({
        write: (chunk) => this.#write(chunk),
        close: () => closeWebSocketConnection(this.#handler, null, null),
        abort: (reason) => this.#closeUsingReason(reason)
      });
      this.#readableStream = readable;
      this.#writableStream = writable;
      this.#openedPromise.resolve({
        extensions,
        protocol,
        readable,
        writable
      });
    }
    #onMessage(type2, data) {
      if (this.#handler.readyState !== states.OPEN) {
        return;
      }
      let chunk;
      if (type2 === opcodes.TEXT) {
        try {
          chunk = utf8Decode(data);
        } catch {
          failWebsocketConnection(this.#handler, 1007, "Received invalid UTF-8 in text frame.");
          return;
        }
      } else if (type2 === opcodes.BINARY) {
        chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
      }
      this.#readableStreamController.enqueue(chunk);
    }
    #onSocketClose() {
      const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED);
      this.#handler.readyState = states.CLOSED;
      if (this.#handshakeAborted) {
        return;
      }
      if (!this.#handler.wasEverConnected) {
        this.#openedPromise.reject(new WebSocketError("Socket never opened"));
      }
      const result = this.#parser?.closingInfo;
      let code2 = result?.code ?? 1005;
      if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
        code2 = 1006;
      }
      const reason = result?.reason == null ? "" : utf8DecodeBytes(Buffer.from(result.reason));
      if (wasClean) {
        this.#readableStreamController.close();
        if (!this.#writableStream.locked) {
          this.#writableStream.abort(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError"));
        }
        this.#closedPromise.resolve({
          closeCode: code2,
          reason
        });
      } else {
        const error49 = createUnvalidatedWebSocketError("unclean close", code2, reason);
        this.#readableStreamController?.error(error49);
        this.#writableStream?.abort(error49);
        this.#closedPromise.reject(error49);
      }
    }
    #closeUsingReason(reason) {
      let code2 = null;
      let reasonString = "";
      if (webidl.is.WebSocketError(reason)) {
        code2 = reason.closeCode;
        reasonString = reason.reason;
      }
      closeWebSocketConnection(this.#handler, code2, reasonString);
    }
    #cancel(reason) {
      this.#closeUsingReason(reason);
    }
  }
  Object.defineProperties(WebSocketStream.prototype, {
    url: kEnumerableProperty,
    opened: kEnumerableProperty,
    closed: kEnumerableProperty,
    close: kEnumerableProperty,
    [Symbol.toStringTag]: {
      value: "WebSocketStream",
      writable: false,
      enumerable: false,
      configurable: true
    }
  });
  webidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([
    {
      key: "protocols",
      converter: webidl.sequenceConverter(webidl.converters.USVString),
      defaultValue: () => []
    },
    {
      key: "signal",
      converter: webidl.nullableConverter(webidl.converters.AbortSignal),
      defaultValue: () => null
    }
  ]);
  webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([
    {
      key: "closeCode",
      converter: (V6) => webidl.converters["unsigned short"](V6, webidl.attributes.EnforceRange)
    },
    {
      key: "reason",
      converter: webidl.converters.USVString,
      defaultValue: () => ""
    }
  ]);
  webidl.converters.WebSocketStreamWrite = function(V6) {
    if (typeof V6 === "string") {
      return webidl.converters.USVString(V6);
    }
    return webidl.converters.BufferSource(V6);
  };
  module.exports = { WebSocketStream };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/eventsource/util.js
var require_util8 = __commonJS((exports2, module) => {
  function isValidLastEventId(value) {
    return value.indexOf("\x00") === -1;
  }
  function isASCIINumber(value) {
    if (value.length === 0)
      return false;
    for (let i = 0;i < value.length; i++) {
      if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57)
        return false;
    }
    return true;
  }
  module.exports = {
    isValidLastEventId,
    isASCIINumber
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js
var require_eventsource_stream = __commonJS((exports2, module) => {
  var { Transform } = __require("node:stream");
  var { isASCIINumber, isValidLastEventId } = require_util8();
  var BOM = [239, 187, 191];
  var LF = 10;
  var CR = 13;
  var COLON = 58;
  var SPACE2 = 32;

  class EventSourceStream extends Transform {
    state;
    checkBOM = true;
    crlfCheck = false;
    eventEndCheck = false;
    buffer = null;
    pos = 0;
    event = {
      data: undefined,
      event: undefined,
      id: undefined,
      retry: undefined
    };
    constructor(options2 = {}) {
      options2.readableObjectMode = true;
      super(options2);
      this.state = options2.eventSourceSettings || {};
      if (options2.push) {
        this.push = options2.push;
      }
    }
    _transform(chunk, _encoding, callback) {
      if (chunk.length === 0) {
        callback();
        return;
      }
      if (this.buffer) {
        this.buffer = Buffer.concat([this.buffer, chunk]);
      } else {
        this.buffer = chunk;
      }
      if (this.checkBOM) {
        switch (this.buffer.length) {
          case 1:
            if (this.buffer[0] === BOM[0]) {
              callback();
              return;
            }
            this.checkBOM = false;
            callback();
            return;
          case 2:
            if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) {
              callback();
              return;
            }
            this.checkBOM = false;
            break;
          case 3:
            if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) {
              this.buffer = Buffer.alloc(0);
              this.checkBOM = false;
              callback();
              return;
            }
            this.checkBOM = false;
            break;
          default:
            if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) {
              this.buffer = this.buffer.subarray(3);
            }
            this.checkBOM = false;
            break;
        }
      }
      while (this.pos < this.buffer.length) {
        if (this.eventEndCheck) {
          if (this.crlfCheck) {
            if (this.buffer[this.pos] === LF) {
              this.buffer = this.buffer.subarray(this.pos + 1);
              this.pos = 0;
              this.crlfCheck = false;
              continue;
            }
            this.crlfCheck = false;
          }
          if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {
            if (this.buffer[this.pos] === CR) {
              this.crlfCheck = true;
            }
            this.buffer = this.buffer.subarray(this.pos + 1);
            this.pos = 0;
            if (this.event.data !== undefined || this.event.event || this.event.id !== undefined || this.event.retry) {
              this.processEvent(this.event);
            }
            this.clearEvent();
            continue;
          }
          this.eventEndCheck = false;
          continue;
        }
        if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {
          if (this.buffer[this.pos] === CR) {
            this.crlfCheck = true;
          }
          this.parseLine(this.buffer.subarray(0, this.pos), this.event);
          this.buffer = this.buffer.subarray(this.pos + 1);
          this.pos = 0;
          this.eventEndCheck = true;
          continue;
        }
        this.pos++;
      }
      callback();
    }
    parseLine(line2, event) {
      if (line2.length === 0) {
        return;
      }
      const colonPosition = line2.indexOf(COLON);
      if (colonPosition === 0) {
        return;
      }
      let field = "";
      let value = "";
      if (colonPosition !== -1) {
        field = line2.subarray(0, colonPosition).toString("utf8");
        let valueStart = colonPosition + 1;
        if (line2[valueStart] === SPACE2) {
          ++valueStart;
        }
        value = line2.subarray(valueStart).toString("utf8");
      } else {
        field = line2.toString("utf8");
        value = "";
      }
      switch (field) {
        case "data":
          if (event[field] === undefined) {
            event[field] = value;
          } else {
            event[field] += `
${value}`;
          }
          break;
        case "retry":
          if (isASCIINumber(value)) {
            event[field] = value;
          }
          break;
        case "id":
          if (isValidLastEventId(value)) {
            event[field] = value;
          }
          break;
        case "event":
          if (value.length > 0) {
            event[field] = value;
          }
          break;
      }
    }
    processEvent(event) {
      if (event.retry && isASCIINumber(event.retry)) {
        this.state.reconnectionTime = parseInt(event.retry, 10);
      }
      if (event.id !== undefined && isValidLastEventId(event.id)) {
        this.state.lastEventId = event.id;
      }
      if (event.data !== undefined) {
        this.push({
          type: event.event || "message",
          options: {
            data: event.data,
            lastEventId: this.state.lastEventId,
            origin: this.state.origin
          }
        });
      }
    }
    clearEvent() {
      this.event = {
        data: undefined,
        event: undefined,
        id: undefined,
        retry: undefined
      };
    }
  }
  module.exports = {
    EventSourceStream
  };
});

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/web/eventsource/eventsource.js
var require_eventsource = __commonJS((exports2, module) => {
  var { pipeline } = __require("node:stream");
  var { fetching } = require_fetch();
  var { makeRequest } = require_request2();
  var { webidl } = require_webidl();
  var { EventSourceStream } = require_eventsource_stream();
  var { parseMIMEType } = require_data_url();
  var { createFastMessageEvent } = require_events();
  var { isNetworkError } = require_response();
  var { kEnumerableProperty } = require_util3();
  var { environmentSettingsObject } = require_util4();
  var experimentalWarned = false;
  var defaultReconnectionTime = 3000;
  var CONNECTING = 0;
  var OPEN = 1;
  var CLOSED = 2;
  var ANONYMOUS = "anonymous";
  var USE_CREDENTIALS = "use-credentials";

  class EventSource extends EventTarget {
    #events = {
      open: null,
      error: null,
      message: null
    };
    #url;
    #withCredentials = false;
    #readyState = CONNECTING;
    #request = null;
    #controller = null;
    #dispatcher;
    #state;
    constructor(url2, eventSourceInitDict = {}) {
      super();
      webidl.util.markAsUncloneable(this);
      const prefix = "EventSource constructor";
      webidl.argumentLengthCheck(arguments, 1, prefix);
      if (!experimentalWarned) {
        experimentalWarned = true;
        process.emitWarning("EventSource is experimental, expect them to change at any time.", {
          code: "UNDICI-ES"
        });
      }
      url2 = webidl.converters.USVString(url2);
      eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict");
      this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher;
      this.#state = {
        lastEventId: "",
        reconnectionTime: eventSourceInitDict.node.reconnectionTime
      };
      const settings = environmentSettingsObject;
      let urlRecord;
      try {
        urlRecord = new URL(url2, settings.settingsObject.baseUrl);
        this.#state.origin = urlRecord.origin;
      } catch (e3) {
        throw new DOMException(e3, "SyntaxError");
      }
      this.#url = urlRecord.href;
      let corsAttributeState = ANONYMOUS;
      if (eventSourceInitDict.withCredentials === true) {
        corsAttributeState = USE_CREDENTIALS;
        this.#withCredentials = true;
      }
      const initRequest = {
        redirect: "follow",
        keepalive: true,
        mode: "cors",
        credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit",
        referrer: "no-referrer"
      };
      initRequest.client = environmentSettingsObject.settingsObject;
      initRequest.headersList = [["accept", { name: "accept", value: "text/event-stream" }]];
      initRequest.cache = "no-store";
      initRequest.initiator = "other";
      initRequest.urlList = [new URL(this.#url)];
      this.#request = makeRequest(initRequest);
      this.#connect();
    }
    get readyState() {
      return this.#readyState;
    }
    get url() {
      return this.#url;
    }
    get withCredentials() {
      return this.#withCredentials;
    }
    #connect() {
      if (this.#readyState === CLOSED)
        return;
      this.#readyState = CONNECTING;
      const fetchParams = {
        request: this.#request,
        dispatcher: this.#dispatcher
      };
      const processEventSourceEndOfBody = (response) => {
        if (!isNetworkError(response)) {
          return this.#reconnect();
        }
      };
      fetchParams.processResponseEndOfBody = processEventSourceEndOfBody;
      fetchParams.processResponse = (response) => {
        if (isNetworkError(response)) {
          if (response.aborted) {
            this.close();
            this.dispatchEvent(new Event("error"));
            return;
          } else {
            this.#reconnect();
            return;
          }
        }
        const contentType = response.headersList.get("content-type", true);
        const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure";
        const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream";
        if (response.status !== 200 || contentTypeValid === false) {
          this.close();
          this.dispatchEvent(new Event("error"));
          return;
        }
        this.#readyState = OPEN;
        this.dispatchEvent(new Event("open"));
        this.#state.origin = response.urlList[response.urlList.length - 1].origin;
        const eventSourceStream = new EventSourceStream({
          eventSourceSettings: this.#state,
          push: (event) => {
            this.dispatchEvent(createFastMessageEvent(event.type, event.options));
          }
        });
        pipeline(response.body.stream, eventSourceStream, (error49) => {
          if (error49?.aborted === false) {
            this.close();
            this.dispatchEvent(new Event("error"));
          }
        });
      };
      this.#controller = fetching(fetchParams);
    }
    #reconnect() {
      if (this.#readyState === CLOSED)
        return;
      this.#readyState = CONNECTING;
      this.dispatchEvent(new Event("error"));
      setTimeout(() => {
        if (this.#readyState !== CONNECTING)
          return;
        if (this.#state.lastEventId.length) {
          this.#request.headersList.set("last-event-id", this.#state.lastEventId, true);
        }
        this.#connect();
      }, this.#state.reconnectionTime)?.unref();
    }
    close() {
      webidl.brandCheck(this, EventSource);
      if (this.#readyState === CLOSED)
        return;
      this.#readyState = CLOSED;
      this.#controller.abort();
      this.#request = null;
    }
    get onopen() {
      return this.#events.open;
    }
    set onopen(fn3) {
      if (this.#events.open) {
        this.removeEventListener("open", this.#events.open);
      }
      const listener = webidl.converters.EventHandlerNonNull(fn3);
      if (listener !== null) {
        this.addEventListener("open", listener);
        this.#events.open = fn3;
      } else {
        this.#events.open = null;
      }
    }
    get onmessage() {
      return this.#events.message;
    }
    set onmessage(fn3) {
      if (this.#events.message) {
        this.removeEventListener("message", this.#events.message);
      }
      const listener = webidl.converters.EventHandlerNonNull(fn3);
      if (listener !== null) {
        this.addEventListener("message", listener);
        this.#events.message = fn3;
      } else {
        this.#events.message = null;
      }
    }
    get onerror() {
      return this.#events.error;
    }
    set onerror(fn3) {
      if (this.#events.error) {
        this.removeEventListener("error", this.#events.error);
      }
      const listener = webidl.converters.EventHandlerNonNull(fn3);
      if (listener !== null) {
        this.addEventListener("error", listener);
        this.#events.error = fn3;
      } else {
        this.#events.error = null;
      }
    }
  }
  var constantsPropertyDescriptors = {
    CONNECTING: {
      __proto__: null,
      configurable: false,
      enumerable: true,
      value: CONNECTING,
      writable: false
    },
    OPEN: {
      __proto__: null,
      configurable: false,
      enumerable: true,
      value: OPEN,
      writable: false
    },
    CLOSED: {
      __proto__: null,
      configurable: false,
      enumerable: true,
      value: CLOSED,
      writable: false
    }
  };
  Object.defineProperties(EventSource, constantsPropertyDescriptors);
  Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors);
  Object.defineProperties(EventSource.prototype, {
    close: kEnumerableProperty,
    onerror: kEnumerableProperty,
    onmessage: kEnumerableProperty,
    onopen: kEnumerableProperty,
    readyState: kEnumerableProperty,
    url: kEnumerableProperty,
    withCredentials: kEnumerableProperty
  });
  webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([
    {
      key: "withCredentials",
      converter: webidl.converters.boolean,
      defaultValue: () => false
    },
    {
      key: "dispatcher",
      converter: webidl.converters.any
    },
    {
      key: "node",
      converter: webidl.dictionaryConverter([
        {
          key: "reconnectionTime",
          converter: webidl.converters["unsigned long"],
          defaultValue: () => defaultReconnectionTime
        },
        {
          key: "dispatcher",
          converter: webidl.converters.any
        }
      ]),
      defaultValue: () => ({})
    }
  ]);
  module.exports = {
    EventSource,
    defaultReconnectionTime
  };
});

// ../../node_modules/.pnpm/fast-decode-uri-component@1.0.1/node_modules/fast-decode-uri-component/index.js
var require_fast_decode_uri_component = __commonJS((exports2, module) => {
  var UTF8_ACCEPT = 12;
  var UTF8_REJECT = 0;
  var UTF8_DATA = [
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    2,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    3,
    4,
    4,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    6,
    7,
    7,
    7,
    7,
    7,
    7,
    7,
    7,
    7,
    7,
    7,
    7,
    8,
    7,
    7,
    10,
    9,
    9,
    9,
    11,
    4,
    4,
    4,
    4,
    4,
    4,
    4,
    4,
    4,
    4,
    4,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    12,
    0,
    0,
    0,
    0,
    24,
    36,
    48,
    60,
    72,
    84,
    96,
    0,
    12,
    12,
    12,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    24,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    24,
    24,
    24,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    24,
    24,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    48,
    48,
    48,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    48,
    48,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    48,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    127,
    63,
    63,
    63,
    0,
    31,
    15,
    15,
    15,
    7,
    7,
    7
  ];
  function decodeURIComponent2(uri) {
    var percentPosition = uri.indexOf("%");
    if (percentPosition === -1)
      return uri;
    var length2 = uri.length;
    var decoded = "";
    var last = 0;
    var codepoint = 0;
    var startOfOctets = percentPosition;
    var state = UTF8_ACCEPT;
    while (percentPosition > -1 && percentPosition < length2) {
      var high = hexCodeToInt(uri[percentPosition + 1], 4);
      var low = hexCodeToInt(uri[percentPosition + 2], 0);
      var byte = high | low;
      var type2 = UTF8_DATA[byte];
      state = UTF8_DATA[256 + state + type2];
      codepoint = codepoint << 6 | byte & UTF8_DATA[364 + type2];
      if (state === UTF8_ACCEPT) {
        decoded += uri.slice(last, startOfOctets);
        decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode(55232 + (codepoint >> 10), 56320 + (codepoint & 1023));
        codepoint = 0;
        last = percentPosition + 3;
        percentPosition = startOfOctets = uri.indexOf("%", last);
      } else if (state === UTF8_REJECT) {
        return null;
      } else {
        percentPosition += 3;
        if (percentPosition < length2 && uri.charCodeAt(percentPosition) === 37)
          continue;
        return null;
      }
    }
    return decoded + uri.slice(last);
  }
  var HEX = {
    "0": 0,
    "1": 1,
    "2": 2,
    "3": 3,
    "4": 4,
    "5": 5,
    "6": 6,
    "7": 7,
    "8": 8,
    "9": 9,
    a: 10,
    A: 10,
    b: 11,
    B: 11,
    c: 12,
    C: 12,
    d: 13,
    D: 13,
    e: 14,
    E: 14,
    f: 15,
    F: 15
  };
  function hexCodeToInt(c3, shift) {
    var i = HEX[c3];
    return i === undefined ? 255 : i << shift;
  }
  module.exports = decodeURIComponent2;
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/Errors.js
var defaultMessages = "End-Of-Stream", EndOfStreamError, AbortError;
var init_Errors = __esm(() => {
  EndOfStreamError = class EndOfStreamError extends Error {
    constructor() {
      super(defaultMessages);
      this.name = "EndOfStreamError";
    }
  };
  AbortError = class AbortError extends Error {
    constructor(message2 = "The operation was aborted") {
      super(message2);
      this.name = "AbortError";
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/Deferred.js
class Deferred {
  constructor() {
    this.resolve = () => null;
    this.reject = () => null;
    this.promise = new Promise((resolve3, reject) => {
      this.reject = reject;
      this.resolve = resolve3;
    });
  }
}

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/AbstractStreamReader.js
class AbstractStreamReader {
  constructor() {
    this.endOfStream = false;
    this.interrupted = false;
    this.peekQueue = [];
  }
  async peek(uint8Array, mayBeLess = false) {
    const bytesRead = await this.read(uint8Array, mayBeLess);
    this.peekQueue.push(uint8Array.subarray(0, bytesRead));
    return bytesRead;
  }
  async read(buffer, mayBeLess = false) {
    if (buffer.length === 0) {
      return 0;
    }
    let bytesRead = this.readFromPeekBuffer(buffer);
    if (!this.endOfStream) {
      bytesRead += await this.readRemainderFromStream(buffer.subarray(bytesRead), mayBeLess);
    }
    if (bytesRead === 0 && !mayBeLess) {
      throw new EndOfStreamError;
    }
    return bytesRead;
  }
  readFromPeekBuffer(buffer) {
    let remaining = buffer.length;
    let bytesRead = 0;
    while (this.peekQueue.length > 0 && remaining > 0) {
      const peekData = this.peekQueue.pop();
      if (!peekData)
        throw new Error("peekData should be defined");
      const lenCopy = Math.min(peekData.length, remaining);
      buffer.set(peekData.subarray(0, lenCopy), bytesRead);
      bytesRead += lenCopy;
      remaining -= lenCopy;
      if (lenCopy < peekData.length) {
        this.peekQueue.push(peekData.subarray(lenCopy));
      }
    }
    return bytesRead;
  }
  async readRemainderFromStream(buffer, mayBeLess) {
    let bytesRead = 0;
    while (bytesRead < buffer.length && !this.endOfStream) {
      if (this.interrupted) {
        throw new AbortError;
      }
      const chunkLen = await this.readFromStream(buffer.subarray(bytesRead), mayBeLess);
      if (chunkLen === 0)
        break;
      bytesRead += chunkLen;
    }
    if (!mayBeLess && bytesRead < buffer.length) {
      throw new EndOfStreamError;
    }
    return bytesRead;
  }
}
var init_AbstractStreamReader = __esm(() => {
  init_Errors();
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/StreamReader.js
var StreamReader;
var init_StreamReader = __esm(() => {
  init_Errors();
  init_AbstractStreamReader();
  StreamReader = class StreamReader extends AbstractStreamReader {
    constructor(s3) {
      super();
      this.s = s3;
      this.deferred = null;
      if (!s3.read || !s3.once) {
        throw new Error("Expected an instance of stream.Readable");
      }
      this.s.once("end", () => {
        this.endOfStream = true;
        if (this.deferred) {
          this.deferred.resolve(0);
        }
      });
      this.s.once("error", (err) => this.reject(err));
      this.s.once("close", () => this.abort());
    }
    async readFromStream(buffer, mayBeLess) {
      if (buffer.length === 0)
        return 0;
      const readBuffer = this.s.read(buffer.length);
      if (readBuffer) {
        buffer.set(readBuffer);
        return readBuffer.length;
      }
      const request2 = {
        buffer,
        mayBeLess,
        deferred: new Deferred
      };
      this.deferred = request2.deferred;
      this.s.once("readable", () => {
        this.readDeferred(request2);
      });
      return request2.deferred.promise;
    }
    readDeferred(request2) {
      const readBuffer = this.s.read(request2.buffer.length);
      if (readBuffer) {
        request2.buffer.set(readBuffer);
        request2.deferred.resolve(readBuffer.length);
        this.deferred = null;
      } else {
        this.s.once("readable", () => {
          this.readDeferred(request2);
        });
      }
    }
    reject(err) {
      this.interrupted = true;
      if (this.deferred) {
        this.deferred.reject(err);
        this.deferred = null;
      }
    }
    async abort() {
      this.reject(new AbortError);
    }
    async close() {
      return this.abort();
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/WebStreamReader.js
var WebStreamReader;
var init_WebStreamReader = __esm(() => {
  init_AbstractStreamReader();
  WebStreamReader = class WebStreamReader extends AbstractStreamReader {
    constructor(reader) {
      super();
      this.reader = reader;
    }
    async abort() {
      return this.close();
    }
    async close() {
      this.reader.releaseLock();
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/WebStreamByobReader.js
var WebStreamByobReader;
var init_WebStreamByobReader = __esm(() => {
  init_WebStreamReader();
  WebStreamByobReader = class WebStreamByobReader extends WebStreamReader {
    async readFromStream(buffer, mayBeLess) {
      if (buffer.length === 0)
        return 0;
      const result = await this.reader.read(new Uint8Array(buffer.length), { min: mayBeLess ? undefined : buffer.length });
      if (result.done) {
        this.endOfStream = result.done;
      }
      if (result.value) {
        buffer.set(result.value);
        return result.value.length;
      }
      return 0;
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js
var WebStreamDefaultReader;
var init_WebStreamDefaultReader = __esm(() => {
  init_Errors();
  init_AbstractStreamReader();
  WebStreamDefaultReader = class WebStreamDefaultReader extends AbstractStreamReader {
    constructor(reader) {
      super();
      this.reader = reader;
      this.buffer = null;
    }
    writeChunk(target, chunk) {
      const written = Math.min(chunk.length, target.length);
      target.set(chunk.subarray(0, written));
      if (written < chunk.length) {
        this.buffer = chunk.subarray(written);
      } else {
        this.buffer = null;
      }
      return written;
    }
    async readFromStream(buffer, mayBeLess) {
      if (buffer.length === 0)
        return 0;
      let totalBytesRead = 0;
      if (this.buffer) {
        totalBytesRead += this.writeChunk(buffer, this.buffer);
      }
      while (totalBytesRead < buffer.length && !this.endOfStream) {
        const result = await this.reader.read();
        if (result.done) {
          this.endOfStream = true;
          break;
        }
        if (result.value) {
          totalBytesRead += this.writeChunk(buffer.subarray(totalBytesRead), result.value);
        }
      }
      if (!mayBeLess && totalBytesRead === 0 && this.endOfStream) {
        throw new EndOfStreamError;
      }
      return totalBytesRead;
    }
    abort() {
      this.interrupted = true;
      return this.reader.cancel();
    }
    async close() {
      await this.abort();
      this.reader.releaseLock();
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js
function makeWebStreamReader(stream2) {
  try {
    const reader = stream2.getReader({ mode: "byob" });
    if (reader instanceof ReadableStreamDefaultReader) {
      return new WebStreamDefaultReader(reader);
    }
    return new WebStreamByobReader(reader);
  } catch (error49) {
    if (error49 instanceof TypeError) {
      return new WebStreamDefaultReader(stream2.getReader());
    }
    throw error49;
  }
}
var init_WebStreamReaderFactory = __esm(() => {
  init_WebStreamByobReader();
  init_WebStreamDefaultReader();
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/index.js
var init_stream = __esm(() => {
  init_Errors();
  init_StreamReader();
  init_WebStreamByobReader();
  init_WebStreamDefaultReader();
  init_WebStreamReaderFactory();
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/AbstractTokenizer.js
class AbstractTokenizer {
  constructor(options2) {
    this.numBuffer = new Uint8Array(8);
    this.position = 0;
    this.onClose = options2?.onClose;
    if (options2?.abortSignal) {
      options2.abortSignal.addEventListener("abort", () => {
        this.abort();
      });
    }
  }
  async readToken(token2, position = this.position) {
    const uint8Array = new Uint8Array(token2.len);
    const len = await this.readBuffer(uint8Array, { position });
    if (len < token2.len)
      throw new EndOfStreamError;
    return token2.get(uint8Array, 0);
  }
  async peekToken(token2, position = this.position) {
    const uint8Array = new Uint8Array(token2.len);
    const len = await this.peekBuffer(uint8Array, { position });
    if (len < token2.len)
      throw new EndOfStreamError;
    return token2.get(uint8Array, 0);
  }
  async readNumber(token2) {
    const len = await this.readBuffer(this.numBuffer, { length: token2.len });
    if (len < token2.len)
      throw new EndOfStreamError;
    return token2.get(this.numBuffer, 0);
  }
  async peekNumber(token2) {
    const len = await this.peekBuffer(this.numBuffer, { length: token2.len });
    if (len < token2.len)
      throw new EndOfStreamError;
    return token2.get(this.numBuffer, 0);
  }
  async ignore(length2) {
    if (length2 < 0) {
      throw new RangeError("ignore length must be ≥ 0 bytes");
    }
    if (this.fileInfo.size !== undefined) {
      const bytesLeft = this.fileInfo.size - this.position;
      if (length2 > bytesLeft) {
        this.position += bytesLeft;
        return bytesLeft;
      }
    }
    this.position += length2;
    return length2;
  }
  async close() {
    await this.abort();
    await this.onClose?.();
  }
  normalizeOptions(uint8Array, options2) {
    if (!this.supportsRandomAccess() && options2 && options2.position !== undefined && options2.position < this.position) {
      throw new Error("`options.position` must be equal or greater than `tokenizer.position`");
    }
    return {
      ...{
        mayBeLess: false,
        offset: 0,
        length: uint8Array.length,
        position: this.position
      },
      ...options2
    };
  }
  abort() {
    return Promise.resolve();
  }
}
var init_AbstractTokenizer = __esm(() => {
  init_stream();
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/ReadStreamTokenizer.js
var maxBufferSize = 256000, ReadStreamTokenizer;
var init_ReadStreamTokenizer = __esm(() => {
  init_AbstractTokenizer();
  init_stream();
  ReadStreamTokenizer = class ReadStreamTokenizer extends AbstractTokenizer {
    constructor(streamReader, options2) {
      super(options2);
      this.streamReader = streamReader;
      this.fileInfo = options2?.fileInfo ?? {};
    }
    async readBuffer(uint8Array, options2) {
      const normOptions = this.normalizeOptions(uint8Array, options2);
      const skipBytes = normOptions.position - this.position;
      if (skipBytes > 0) {
        await this.ignore(skipBytes);
        return this.readBuffer(uint8Array, options2);
      }
      if (skipBytes < 0) {
        throw new Error("`options.position` must be equal or greater than `tokenizer.position`");
      }
      if (normOptions.length === 0) {
        return 0;
      }
      const bytesRead = await this.streamReader.read(uint8Array.subarray(0, normOptions.length), normOptions.mayBeLess);
      this.position += bytesRead;
      if ((!options2 || !options2.mayBeLess) && bytesRead < normOptions.length) {
        throw new EndOfStreamError;
      }
      return bytesRead;
    }
    async peekBuffer(uint8Array, options2) {
      const normOptions = this.normalizeOptions(uint8Array, options2);
      let bytesRead = 0;
      if (normOptions.position) {
        const skipBytes = normOptions.position - this.position;
        if (skipBytes > 0) {
          const skipBuffer = new Uint8Array(normOptions.length + skipBytes);
          bytesRead = await this.peekBuffer(skipBuffer, { mayBeLess: normOptions.mayBeLess });
          uint8Array.set(skipBuffer.subarray(skipBytes));
          return bytesRead - skipBytes;
        }
        if (skipBytes < 0) {
          throw new Error("Cannot peek from a negative offset in a stream");
        }
      }
      if (normOptions.length > 0) {
        try {
          bytesRead = await this.streamReader.peek(uint8Array.subarray(0, normOptions.length), normOptions.mayBeLess);
        } catch (err) {
          if (options2?.mayBeLess && err instanceof EndOfStreamError) {
            return 0;
          }
          throw err;
        }
        if (!normOptions.mayBeLess && bytesRead < normOptions.length) {
          throw new EndOfStreamError;
        }
      }
      return bytesRead;
    }
    async ignore(length2) {
      if (length2 < 0) {
        throw new RangeError("ignore length must be ≥ 0 bytes");
      }
      const bufSize = Math.min(maxBufferSize, length2);
      const buf = new Uint8Array(bufSize);
      let totBytesRead = 0;
      while (totBytesRead < length2) {
        const remaining = length2 - totBytesRead;
        const bytesRead = await this.readBuffer(buf, { length: Math.min(bufSize, remaining) });
        if (bytesRead < 0) {
          return bytesRead;
        }
        totBytesRead += bytesRead;
      }
      return totBytesRead;
    }
    abort() {
      return this.streamReader.abort();
    }
    async close() {
      return this.streamReader.close();
    }
    supportsRandomAccess() {
      return false;
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/BufferTokenizer.js
var BufferTokenizer;
var init_BufferTokenizer = __esm(() => {
  init_stream();
  init_AbstractTokenizer();
  BufferTokenizer = class BufferTokenizer extends AbstractTokenizer {
    constructor(uint8Array, options2) {
      super(options2);
      this.uint8Array = uint8Array;
      this.fileInfo = { ...options2?.fileInfo ?? {}, ...{ size: uint8Array.length } };
    }
    async readBuffer(uint8Array, options2) {
      if (options2?.position) {
        this.position = options2.position;
      }
      const bytesRead = await this.peekBuffer(uint8Array, options2);
      this.position += bytesRead;
      return bytesRead;
    }
    async peekBuffer(uint8Array, options2) {
      const normOptions = this.normalizeOptions(uint8Array, options2);
      const bytes2read = Math.min(this.uint8Array.length - normOptions.position, normOptions.length);
      if (!normOptions.mayBeLess && bytes2read < normOptions.length) {
        throw new EndOfStreamError;
      }
      uint8Array.set(this.uint8Array.subarray(normOptions.position, normOptions.position + bytes2read));
      return bytes2read;
    }
    close() {
      return super.close();
    }
    supportsRandomAccess() {
      return true;
    }
    setPosition(position) {
      this.position = position;
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/BlobTokenizer.js
var BlobTokenizer;
var init_BlobTokenizer = __esm(() => {
  init_stream();
  init_AbstractTokenizer();
  BlobTokenizer = class BlobTokenizer extends AbstractTokenizer {
    constructor(blob, options2) {
      super(options2);
      this.blob = blob;
      this.fileInfo = { ...options2?.fileInfo ?? {}, ...{ size: blob.size, mimeType: blob.type } };
    }
    async readBuffer(uint8Array, options2) {
      if (options2?.position) {
        this.position = options2.position;
      }
      const bytesRead = await this.peekBuffer(uint8Array, options2);
      this.position += bytesRead;
      return bytesRead;
    }
    async peekBuffer(buffer, options2) {
      const normOptions = this.normalizeOptions(buffer, options2);
      const bytes2read = Math.min(this.blob.size - normOptions.position, normOptions.length);
      if (!normOptions.mayBeLess && bytes2read < normOptions.length) {
        throw new EndOfStreamError;
      }
      const arrayBuffer = await this.blob.slice(normOptions.position, normOptions.position + bytes2read).arrayBuffer();
      buffer.set(new Uint8Array(arrayBuffer));
      return bytes2read;
    }
    close() {
      return super.close();
    }
    supportsRandomAccess() {
      return true;
    }
    setPosition(position) {
      this.position = position;
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/core.js
function fromStream(stream2, options2) {
  const streamReader = new StreamReader(stream2);
  const _options = options2 ?? {};
  const chainedClose = _options.onClose;
  _options.onClose = async () => {
    await streamReader.close();
    if (chainedClose) {
      return chainedClose();
    }
  };
  return new ReadStreamTokenizer(streamReader, _options);
}
function fromWebStream(webStream, options2) {
  const webStreamReader = makeWebStreamReader(webStream);
  const _options = options2 ?? {};
  const chainedClose = _options.onClose;
  _options.onClose = async () => {
    await webStreamReader.close();
    if (chainedClose) {
      return chainedClose();
    }
  };
  return new ReadStreamTokenizer(webStreamReader, _options);
}
function fromBuffer(uint8Array, options2) {
  return new BufferTokenizer(uint8Array, options2);
}
function fromBlob(blob, options2) {
  return new BlobTokenizer(blob, options2);
}
var init_core2 = __esm(() => {
  init_stream();
  init_ReadStreamTokenizer();
  init_BufferTokenizer();
  init_BlobTokenizer();
  init_stream();
  init_AbstractTokenizer();
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/FileTokenizer.js
import { open as fsOpen } from "node:fs/promises";
var FileTokenizer;
var init_FileTokenizer = __esm(() => {
  init_AbstractTokenizer();
  init_stream();
  FileTokenizer = class FileTokenizer extends AbstractTokenizer {
    static async fromFile(sourceFilePath) {
      const fileHandle = await fsOpen(sourceFilePath, "r");
      const stat2 = await fileHandle.stat();
      return new FileTokenizer(fileHandle, { fileInfo: { path: sourceFilePath, size: stat2.size } });
    }
    constructor(fileHandle, options2) {
      super(options2);
      this.fileHandle = fileHandle;
      this.fileInfo = options2.fileInfo;
    }
    async readBuffer(uint8Array, options2) {
      const normOptions = this.normalizeOptions(uint8Array, options2);
      this.position = normOptions.position;
      if (normOptions.length === 0)
        return 0;
      const res = await this.fileHandle.read(uint8Array, 0, normOptions.length, normOptions.position);
      this.position += res.bytesRead;
      if (res.bytesRead < normOptions.length && (!options2 || !options2.mayBeLess)) {
        throw new EndOfStreamError;
      }
      return res.bytesRead;
    }
    async peekBuffer(uint8Array, options2) {
      const normOptions = this.normalizeOptions(uint8Array, options2);
      const res = await this.fileHandle.read(uint8Array, 0, normOptions.length, normOptions.position);
      if (!normOptions.mayBeLess && res.bytesRead < normOptions.length) {
        throw new EndOfStreamError;
      }
      return res.bytesRead;
    }
    async close() {
      await this.fileHandle.close();
      return super.close();
    }
    setPosition(position) {
      this.position = position;
    }
    supportsRandomAccess() {
      return true;
    }
  };
});

// ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/index.js
import { stat as fsStat } from "node:fs/promises";
async function fromStream2(stream2, options2) {
  const rst = fromStream(stream2, options2);
  if (stream2.path) {
    const stat2 = await fsStat(stream2.path);
    rst.fileInfo.path = stream2.path;
    rst.fileInfo.size = stat2.size;
  }
  return rst;
}
var fromFile;
var init_lib2 = __esm(() => {
  init_core2();
  init_FileTokenizer();
  init_FileTokenizer();
  init_core2();
  fromFile = FileTokenizer.fromFile;
});

// ../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
var init_ieee754 = __esm(() => {
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
});

// ../../node_modules/.pnpm/@borewit+text-codec@0.2.2/node_modules/@borewit/text-codec/lib/index.js
function utf8Decoder() {
  if (typeof globalThis.TextDecoder === "undefined")
    return;
  return _utf8Decoder !== null && _utf8Decoder !== undefined ? _utf8Decoder : _utf8Decoder = new globalThis.TextDecoder("utf-8");
}
function textDecode(bytes, encoding = "utf-8") {
  switch (encoding.toLowerCase()) {
    case "utf-8":
    case "utf8": {
      const dec = utf8Decoder();
      return dec ? dec.decode(bytes) : decodeUTF8(bytes);
    }
    case "utf-16le":
      return decodeUTF16LE(bytes);
    case "us-ascii":
    case "ascii":
      return decodeASCII(bytes);
    case "latin1":
    case "iso-8859-1":
      return decodeLatin1(bytes);
    case "windows-1252":
      return decodeWindows1252(bytes);
    default:
      throw new RangeError(`Encoding '${encoding}' not supported`);
  }
}
function flushChunk(parts, chunk) {
  if (chunk.length === 0)
    return;
  parts.push(String.fromCharCode.apply(null, chunk));
  chunk.length = 0;
}
function pushCodeUnit(parts, chunk, codeUnit) {
  chunk.push(codeUnit);
  if (chunk.length >= CHUNK)
    flushChunk(parts, chunk);
}
function pushCodePoint(parts, chunk, cp) {
  if (cp <= 65535) {
    pushCodeUnit(parts, chunk, cp);
    return;
  }
  cp -= 65536;
  pushCodeUnit(parts, chunk, 55296 + (cp >> 10));
  pushCodeUnit(parts, chunk, 56320 + (cp & 1023));
}
function decodeUTF8(bytes) {
  const parts = [];
  const chunk = [];
  let i = 0;
  if (bytes.length >= 3 && bytes[0] === 239 && bytes[1] === 187 && bytes[2] === 191) {
    i = 3;
  }
  while (i < bytes.length) {
    const b1 = bytes[i];
    if (b1 <= 127) {
      pushCodeUnit(parts, chunk, b1);
      i++;
      continue;
    }
    if (b1 < 194 || b1 > 244) {
      pushCodeUnit(parts, chunk, REPLACEMENT);
      i++;
      continue;
    }
    if (b1 <= 223) {
      if (i + 1 >= bytes.length) {
        pushCodeUnit(parts, chunk, REPLACEMENT);
        i++;
        continue;
      }
      const b23 = bytes[i + 1];
      if ((b23 & 192) !== 128) {
        pushCodeUnit(parts, chunk, REPLACEMENT);
        i++;
        continue;
      }
      const cp2 = (b1 & 31) << 6 | b23 & 63;
      pushCodeUnit(parts, chunk, cp2);
      i += 2;
      continue;
    }
    if (b1 <= 239) {
      if (i + 2 >= bytes.length) {
        pushCodeUnit(parts, chunk, REPLACEMENT);
        i++;
        continue;
      }
      const b23 = bytes[i + 1];
      const b33 = bytes[i + 2];
      const valid2 = (b23 & 192) === 128 && (b33 & 192) === 128 && !(b1 === 224 && b23 < 160) && !(b1 === 237 && b23 >= 160);
      if (!valid2) {
        pushCodeUnit(parts, chunk, REPLACEMENT);
        i++;
        continue;
      }
      const cp2 = (b1 & 15) << 12 | (b23 & 63) << 6 | b33 & 63;
      pushCodeUnit(parts, chunk, cp2);
      i += 3;
      continue;
    }
    if (i + 3 >= bytes.length) {
      pushCodeUnit(parts, chunk, REPLACEMENT);
      i++;
      continue;
    }
    const b22 = bytes[i + 1];
    const b32 = bytes[i + 2];
    const b42 = bytes[i + 3];
    const valid = (b22 & 192) === 128 && (b32 & 192) === 128 && (b42 & 192) === 128 && !(b1 === 240 && b22 < 144) && !(b1 === 244 && b22 > 143);
    if (!valid) {
      pushCodeUnit(parts, chunk, REPLACEMENT);
      i++;
      continue;
    }
    const cp = (b1 & 7) << 18 | (b22 & 63) << 12 | (b32 & 63) << 6 | b42 & 63;
    pushCodePoint(parts, chunk, cp);
    i += 4;
  }
  flushChunk(parts, chunk);
  return parts.join("");
}
function decodeUTF16LE(bytes) {
  const parts = [];
  const chunk = [];
  const len = bytes.length;
  let i = 0;
  while (i + 1 < len) {
    const u1 = bytes[i] | bytes[i + 1] << 8;
    i += 2;
    if (u1 >= 55296 && u1 <= 56319) {
      if (i + 1 < len) {
        const u2 = bytes[i] | bytes[i + 1] << 8;
        if (u2 >= 56320 && u2 <= 57343) {
          pushCodeUnit(parts, chunk, u1);
          pushCodeUnit(parts, chunk, u2);
          i += 2;
        } else {
          pushCodeUnit(parts, chunk, REPLACEMENT);
        }
      } else {
        pushCodeUnit(parts, chunk, REPLACEMENT);
      }
      continue;
    }
    if (u1 >= 56320 && u1 <= 57343) {
      pushCodeUnit(parts, chunk, REPLACEMENT);
      continue;
    }
    pushCodeUnit(parts, chunk, u1);
  }
  if (i < len) {
    pushCodeUnit(parts, chunk, REPLACEMENT);
  }
  flushChunk(parts, chunk);
  return parts.join("");
}
function decodeASCII(bytes) {
  const parts = [];
  for (let i = 0;i < bytes.length; i += CHUNK) {
    const end = Math.min(bytes.length, i + CHUNK);
    const codes = new Array(end - i);
    for (let j4 = i, k4 = 0;j4 < end; j4++, k4++) {
      codes[k4] = bytes[j4] & 127;
    }
    parts.push(String.fromCharCode.apply(null, codes));
  }
  return parts.join("");
}
function decodeLatin1(bytes) {
  const parts = [];
  for (let i = 0;i < bytes.length; i += CHUNK) {
    const end = Math.min(bytes.length, i + CHUNK);
    const codes = new Array(end - i);
    for (let j4 = i, k4 = 0;j4 < end; j4++, k4++) {
      codes[k4] = bytes[j4];
    }
    parts.push(String.fromCharCode.apply(null, codes));
  }
  return parts.join("");
}
function decodeWindows1252(bytes) {
  const parts = [];
  let out = "";
  for (let i = 0;i < bytes.length; i++) {
    const b5 = bytes[i];
    const extra = b5 >= 128 && b5 <= 159 ? WINDOWS_1252_EXTRA[b5] : undefined;
    out += extra !== null && extra !== undefined ? extra : String.fromCharCode(b5);
    if (out.length >= CHUNK) {
      parts.push(out);
      out = "";
    }
  }
  if (out)
    parts.push(out);
  return parts.join("");
}
var WINDOWS_1252_EXTRA, WINDOWS_1252_REVERSE, _utf8Decoder, CHUNK, REPLACEMENT = 65533;
var init_lib3 = __esm(() => {
  WINDOWS_1252_EXTRA = {
    128: "€",
    130: "‚",
    131: "ƒ",
    132: "„",
    133: "…",
    134: "†",
    135: "‡",
    136: "ˆ",
    137: "‰",
    138: "Š",
    139: "‹",
    140: "Œ",
    142: "Ž",
    145: "‘",
    146: "’",
    147: "“",
    148: "”",
    149: "•",
    150: "–",
    151: "—",
    152: "˜",
    153: "™",
    154: "š",
    155: "›",
    156: "œ",
    158: "ž",
    159: "Ÿ"
  };
  WINDOWS_1252_REVERSE = {};
  for (const [code2, char2] of Object.entries(WINDOWS_1252_EXTRA)) {
    WINDOWS_1252_REVERSE[char2] = Number.parseInt(code2, 10);
  }
  CHUNK = 32 * 1024;
});

// ../../node_modules/.pnpm/token-types@6.1.2/node_modules/token-types/lib/index.js
function dv(array2) {
  return new DataView(array2.buffer, array2.byteOffset);
}

class StringType2 {
  constructor(len, encoding) {
    this.len = len;
    this.encoding = encoding;
  }
  get(data, offset = 0) {
    const bytes = data.subarray(offset, offset + this.len);
    return textDecode(bytes, this.encoding);
  }
}
var UINT8, UINT16_LE, UINT16_BE, UINT32_LE, UINT32_BE, INT32_BE, UINT64_LE;
var init_lib4 = __esm(() => {
  init_ieee754();
  init_lib3();
  UINT8 = {
    len: 1,
    get(array2, offset) {
      return dv(array2).getUint8(offset);
    },
    put(array2, offset, value) {
      dv(array2).setUint8(offset, value);
      return offset + 1;
    }
  };
  UINT16_LE = {
    len: 2,
    get(array2, offset) {
      return dv(array2).getUint16(offset, true);
    },
    put(array2, offset, value) {
      dv(array2).setUint16(offset, value, true);
      return offset + 2;
    }
  };
  UINT16_BE = {
    len: 2,
    get(array2, offset) {
      return dv(array2).getUint16(offset);
    },
    put(array2, offset, value) {
      dv(array2).setUint16(offset, value);
      return offset + 2;
    }
  };
  UINT32_LE = {
    len: 4,
    get(array2, offset) {
      return dv(array2).getUint32(offset, true);
    },
    put(array2, offset, value) {
      dv(array2).setUint32(offset, value, true);
      return offset + 4;
    }
  };
  UINT32_BE = {
    len: 4,
    get(array2, offset) {
      return dv(array2).getUint32(offset);
    },
    put(array2, offset, value) {
      dv(array2).setUint32(offset, value);
      return offset + 4;
    }
  };
  INT32_BE = {
    len: 4,
    get(array2, offset) {
      return dv(array2).getInt32(offset);
    },
    put(array2, offset, value) {
      dv(array2).setInt32(offset, value);
      return offset + 4;
    }
  };
  UINT64_LE = {
    len: 8,
    get(array2, offset) {
      return dv(array2).getBigUint64(offset, true);
    },
    put(array2, offset, value) {
      dv(array2).setBigUint64(offset, value, true);
      return offset + 8;
    }
  };
});

// ../../node_modules/.pnpm/@tokenizer+inflate@0.4.1/node_modules/@tokenizer/inflate/lib/ZipToken.js
var Signature, DataDescriptor, LocalFileHeaderToken, EndOfCentralDirectoryRecordToken, FileHeader;
var init_ZipToken = __esm(() => {
  init_lib4();
  Signature = {
    LocalFileHeader: 67324752,
    DataDescriptor: 134695760,
    CentralFileHeader: 33639248,
    EndOfCentralDirectory: 101010256
  };
  DataDescriptor = {
    get(array2) {
      return {
        signature: UINT32_LE.get(array2, 0),
        compressedSize: UINT32_LE.get(array2, 8),
        uncompressedSize: UINT32_LE.get(array2, 12)
      };
    },
    len: 16
  };
  LocalFileHeaderToken = {
    get(array2) {
      const flags = UINT16_LE.get(array2, 6);
      return {
        signature: UINT32_LE.get(array2, 0),
        minVersion: UINT16_LE.get(array2, 4),
        dataDescriptor: !!(flags & 8),
        compressedMethod: UINT16_LE.get(array2, 8),
        compressedSize: UINT32_LE.get(array2, 18),
        uncompressedSize: UINT32_LE.get(array2, 22),
        filenameLength: UINT16_LE.get(array2, 26),
        extraFieldLength: UINT16_LE.get(array2, 28),
        filename: null
      };
    },
    len: 30
  };
  EndOfCentralDirectoryRecordToken = {
    get(array2) {
      return {
        signature: UINT32_LE.get(array2, 0),
        nrOfThisDisk: UINT16_LE.get(array2, 4),
        nrOfThisDiskWithTheStart: UINT16_LE.get(array2, 6),
        nrOfEntriesOnThisDisk: UINT16_LE.get(array2, 8),
        nrOfEntriesOfSize: UINT16_LE.get(array2, 10),
        sizeOfCd: UINT32_LE.get(array2, 12),
        offsetOfStartOfCd: UINT32_LE.get(array2, 16),
        zipFileCommentLength: UINT16_LE.get(array2, 20)
      };
    },
    len: 22
  };
  FileHeader = {
    get(array2) {
      const flags = UINT16_LE.get(array2, 8);
      return {
        signature: UINT32_LE.get(array2, 0),
        minVersion: UINT16_LE.get(array2, 6),
        dataDescriptor: !!(flags & 8),
        compressedMethod: UINT16_LE.get(array2, 10),
        compressedSize: UINT32_LE.get(array2, 20),
        uncompressedSize: UINT32_LE.get(array2, 24),
        filenameLength: UINT16_LE.get(array2, 28),
        extraFieldLength: UINT16_LE.get(array2, 30),
        fileCommentLength: UINT16_LE.get(array2, 32),
        relativeOffsetOfLocalHeader: UINT32_LE.get(array2, 42),
        filename: null
      };
    },
    len: 46
  };
});

// ../../node_modules/.pnpm/@tokenizer+inflate@0.4.1/node_modules/@tokenizer/inflate/lib/ZipHandler.js
function signatureToArray(signature) {
  const signatureBytes = new Uint8Array(UINT32_LE.len);
  UINT32_LE.put(signatureBytes, 0, signature);
  return signatureBytes;
}

class ZipHandler {
  constructor(tokenizer) {
    this.tokenizer = tokenizer;
    this.syncBuffer = new Uint8Array(syncBufferSize);
  }
  async isZip() {
    return await this.peekSignature() === Signature.LocalFileHeader;
  }
  peekSignature() {
    return this.tokenizer.peekToken(UINT32_LE);
  }
  async findEndOfCentralDirectoryLocator() {
    const randomReadTokenizer = this.tokenizer;
    const chunkLength = Math.min(16 * 1024, randomReadTokenizer.fileInfo.size);
    const buffer = this.syncBuffer.subarray(0, chunkLength);
    await this.tokenizer.readBuffer(buffer, { position: randomReadTokenizer.fileInfo.size - chunkLength });
    for (let i = buffer.length - 4;i >= 0; i--) {
      if (buffer[i] === eocdSignatureBytes[0] && buffer[i + 1] === eocdSignatureBytes[1] && buffer[i + 2] === eocdSignatureBytes[2] && buffer[i + 3] === eocdSignatureBytes[3]) {
        return randomReadTokenizer.fileInfo.size - chunkLength + i;
      }
    }
    return -1;
  }
  async readCentralDirectory() {
    if (!this.tokenizer.supportsRandomAccess()) {
      debug2("Cannot reading central-directory without random-read support");
      return;
    }
    debug2("Reading central-directory...");
    const pos = this.tokenizer.position;
    const offset = await this.findEndOfCentralDirectoryLocator();
    if (offset > 0) {
      debug2("Central-directory 32-bit signature found");
      const eocdHeader = await this.tokenizer.readToken(EndOfCentralDirectoryRecordToken, offset);
      const files = [];
      this.tokenizer.setPosition(eocdHeader.offsetOfStartOfCd);
      for (let n3 = 0;n3 < eocdHeader.nrOfEntriesOfSize; ++n3) {
        const entry = await this.tokenizer.readToken(FileHeader);
        if (entry.signature !== Signature.CentralFileHeader) {
          throw new Error("Expected Central-File-Header signature");
        }
        entry.filename = await this.tokenizer.readToken(new StringType2(entry.filenameLength, "utf-8"));
        await this.tokenizer.ignore(entry.extraFieldLength);
        await this.tokenizer.ignore(entry.fileCommentLength);
        files.push(entry);
        debug2(`Add central-directory file-entry: n=${n3 + 1}/${files.length}: filename=${files[n3].filename}`);
      }
      this.tokenizer.setPosition(pos);
      return files;
    }
    this.tokenizer.setPosition(pos);
  }
  async unzip(fileCb) {
    const entries = await this.readCentralDirectory();
    if (entries) {
      return this.iterateOverCentralDirectory(entries, fileCb);
    }
    let stop = false;
    do {
      const zipHeader = await this.readLocalFileHeader();
      if (!zipHeader)
        break;
      const next = fileCb(zipHeader);
      stop = !!next.stop;
      let fileData;
      await this.tokenizer.ignore(zipHeader.extraFieldLength);
      if (zipHeader.dataDescriptor && zipHeader.compressedSize === 0) {
        const chunks = [];
        let len = syncBufferSize;
        debug2("Compressed-file-size unknown, scanning for next data-descriptor-signature....");
        let nextHeaderIndex = -1;
        while (nextHeaderIndex < 0 && len === syncBufferSize) {
          len = await this.tokenizer.peekBuffer(this.syncBuffer, { mayBeLess: true });
          nextHeaderIndex = indexOf(this.syncBuffer.subarray(0, len), ddSignatureArray);
          const size = nextHeaderIndex >= 0 ? nextHeaderIndex : len;
          if (next.handler) {
            const data = new Uint8Array(size);
            await this.tokenizer.readBuffer(data);
            chunks.push(data);
          } else {
            await this.tokenizer.ignore(size);
          }
        }
        debug2(`Found data-descriptor-signature at pos=${this.tokenizer.position}`);
        if (next.handler) {
          await this.inflate(zipHeader, mergeArrays(chunks), next.handler);
        }
      } else {
        if (next.handler) {
          debug2(`Reading compressed-file-data: ${zipHeader.compressedSize} bytes`);
          fileData = new Uint8Array(zipHeader.compressedSize);
          await this.tokenizer.readBuffer(fileData);
          await this.inflate(zipHeader, fileData, next.handler);
        } else {
          debug2(`Ignoring compressed-file-data: ${zipHeader.compressedSize} bytes`);
          await this.tokenizer.ignore(zipHeader.compressedSize);
        }
      }
      debug2(`Reading data-descriptor at pos=${this.tokenizer.position}`);
      if (zipHeader.dataDescriptor) {
        const dataDescriptor = await this.tokenizer.readToken(DataDescriptor);
        if (dataDescriptor.signature !== 134695760) {
          throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position - DataDescriptor.len}`);
        }
      }
    } while (!stop);
  }
  async iterateOverCentralDirectory(entries, fileCb) {
    for (const fileHeader of entries) {
      const next = fileCb(fileHeader);
      if (next.handler) {
        this.tokenizer.setPosition(fileHeader.relativeOffsetOfLocalHeader);
        const zipHeader = await this.readLocalFileHeader();
        if (zipHeader) {
          await this.tokenizer.ignore(zipHeader.extraFieldLength);
          const fileData = new Uint8Array(fileHeader.compressedSize);
          await this.tokenizer.readBuffer(fileData);
          await this.inflate(zipHeader, fileData, next.handler);
        }
      }
      if (next.stop)
        break;
    }
  }
  async inflate(zipHeader, fileData, cb2) {
    if (zipHeader.compressedMethod === 0) {
      return cb2(fileData);
    }
    if (zipHeader.compressedMethod !== 8) {
      throw new Error(`Unsupported ZIP compression method: ${zipHeader.compressedMethod}`);
    }
    debug2(`Decompress filename=${zipHeader.filename}, compressed-size=${fileData.length}`);
    const uncompressedData = await ZipHandler.decompressDeflateRaw(fileData);
    return cb2(uncompressedData);
  }
  static async decompressDeflateRaw(data) {
    const input = new ReadableStream({
      start(controller) {
        controller.enqueue(data);
        controller.close();
      }
    });
    const ds2 = new DecompressionStream("deflate-raw");
    const output = input.pipeThrough(ds2);
    try {
      const response = new Response(output);
      const buffer = await response.arrayBuffer();
      return new Uint8Array(buffer);
    } catch (err) {
      const message2 = err instanceof Error ? `Failed to deflate ZIP entry: ${err.message}` : "Unknown decompression error in ZIP entry";
      throw new TypeError(message2);
    }
  }
  async readLocalFileHeader() {
    const signature = await this.tokenizer.peekToken(UINT32_LE);
    if (signature === Signature.LocalFileHeader) {
      const header = await this.tokenizer.readToken(LocalFileHeaderToken);
      header.filename = await this.tokenizer.readToken(new StringType2(header.filenameLength, "utf-8"));
      return header;
    }
    if (signature === Signature.CentralFileHeader) {
      return false;
    }
    if (signature === 3759263696) {
      throw new Error("Encrypted ZIP");
    }
    throw new Error("Unexpected signature");
  }
}
function indexOf(buffer, portion) {
  const bufferLength = buffer.length;
  const portionLength = portion.length;
  if (portionLength > bufferLength)
    return -1;
  for (let i = 0;i <= bufferLength - portionLength; i++) {
    let found = true;
    for (let j4 = 0;j4 < portionLength; j4++) {
      if (buffer[i + j4] !== portion[j4]) {
        found = false;
        break;
      }
    }
    if (found) {
      return i;
    }
  }
  return -1;
}
function mergeArrays(chunks) {
  const totalLength = chunks.reduce((acc, curr) => acc + curr.length, 0);
  const mergedArray = new Uint8Array(totalLength);
  let offset = 0;
  for (const chunk of chunks) {
    mergedArray.set(chunk, offset);
    offset += chunk.length;
  }
  return mergedArray;
}
var import_debug3, debug2, syncBufferSize, ddSignatureArray, eocdSignatureBytes;
var init_ZipHandler = __esm(() => {
  init_lib4();
  init_ZipToken();
  import_debug3 = __toESM(require_src5(), 1);
  debug2 = import_debug3.default("tokenizer:inflate");
  syncBufferSize = 256 * 1024;
  ddSignatureArray = signatureToArray(Signature.DataDescriptor);
  eocdSignatureBytes = signatureToArray(Signature.EndOfCentralDirectory);
});

// ../../node_modules/.pnpm/@tokenizer+inflate@0.4.1/node_modules/@tokenizer/inflate/lib/GzipHandler.js
class GzipHandler {
  constructor(tokenizer) {
    this.tokenizer = tokenizer;
  }
  inflate() {
    const tokenizer = this.tokenizer;
    return new ReadableStream({
      async pull(controller) {
        const buffer = new Uint8Array(1024);
        const size = await tokenizer.readBuffer(buffer, { mayBeLess: true });
        if (size === 0) {
          controller.close();
          return;
        }
        controller.enqueue(buffer.subarray(0, size));
      }
    }).pipeThrough(new DecompressionStream("gzip"));
  }
}

// ../../node_modules/.pnpm/@tokenizer+inflate@0.4.1/node_modules/@tokenizer/inflate/lib/index.js
var init_lib5 = __esm(() => {
  init_ZipHandler();
});

// ../../node_modules/.pnpm/uint8array-extras@1.5.0/node_modules/uint8array-extras/index.js
function getUintBE(view) {
  const { byteLength } = view;
  if (byteLength === 6) {
    return view.getUint16(0) * 2 ** 32 + view.getUint32(2);
  }
  if (byteLength === 5) {
    return view.getUint8(0) * 2 ** 32 + view.getUint32(1);
  }
  if (byteLength === 4) {
    return view.getUint32(0);
  }
  if (byteLength === 3) {
    return view.getUint8(0) * 2 ** 16 + view.getUint16(1);
  }
  if (byteLength === 2) {
    return view.getUint16(0);
  }
  if (byteLength === 1) {
    return view.getUint8(0);
  }
}
var cachedDecoders, cachedEncoder, byteToHexLookupTable;
var init_uint8array_extras = __esm(() => {
  cachedDecoders = {
    utf8: new globalThis.TextDecoder("utf8")
  };
  cachedEncoder = new globalThis.TextEncoder;
  byteToHexLookupTable = Array.from({ length: 256 }, (_6, index2) => index2.toString(16).padStart(2, "0"));
});

// ../../node_modules/.pnpm/file-type@21.2.0/node_modules/file-type/util.js
function stringToBytes(string4, encoding) {
  if (encoding === "utf-16le") {
    const bytes = [];
    for (let index2 = 0;index2 < string4.length; index2++) {
      const code2 = string4.charCodeAt(index2);
      bytes.push(code2 & 255, code2 >> 8 & 255);
    }
    return bytes;
  }
  if (encoding === "utf-16be") {
    const bytes = [];
    for (let index2 = 0;index2 < string4.length; index2++) {
      const code2 = string4.charCodeAt(index2);
      bytes.push(code2 >> 8 & 255, code2 & 255);
    }
    return bytes;
  }
  return [...string4].map((character) => character.charCodeAt(0));
}
function tarHeaderChecksumMatches(arrayBuffer, offset = 0) {
  const readSum = Number.parseInt(new StringType2(6).get(arrayBuffer, 148).replace(/\0.*$/, "").trim(), 8);
  if (Number.isNaN(readSum)) {
    return false;
  }
  let sum = 8 * 32;
  for (let index2 = offset;index2 < offset + 148; index2++) {
    sum += arrayBuffer[index2];
  }
  for (let index2 = offset + 156;index2 < offset + 512; index2++) {
    sum += arrayBuffer[index2];
  }
  return readSum === sum;
}
var uint32SyncSafeToken;
var init_util = __esm(() => {
  init_lib4();
  uint32SyncSafeToken = {
    get: (buffer, offset) => buffer[offset + 3] & 127 | buffer[offset + 2] << 7 | buffer[offset + 1] << 14 | buffer[offset] << 21,
    len: 4
  };
});

// ../../node_modules/.pnpm/file-type@21.2.0/node_modules/file-type/supported.js
var extensions, mimeTypes;
var init_supported = __esm(() => {
  extensions = [
    "jpg",
    "png",
    "apng",
    "gif",
    "webp",
    "flif",
    "xcf",
    "cr2",
    "cr3",
    "orf",
    "arw",
    "dng",
    "nef",
    "rw2",
    "raf",
    "tif",
    "bmp",
    "icns",
    "jxr",
    "psd",
    "indd",
    "zip",
    "tar",
    "rar",
    "gz",
    "bz2",
    "7z",
    "dmg",
    "mp4",
    "mid",
    "mkv",
    "webm",
    "mov",
    "avi",
    "mpg",
    "mp2",
    "mp3",
    "m4a",
    "oga",
    "ogg",
    "ogv",
    "opus",
    "flac",
    "wav",
    "spx",
    "amr",
    "pdf",
    "epub",
    "elf",
    "macho",
    "exe",
    "swf",
    "rtf",
    "wasm",
    "woff",
    "woff2",
    "eot",
    "ttf",
    "otf",
    "ttc",
    "ico",
    "flv",
    "ps",
    "xz",
    "sqlite",
    "nes",
    "crx",
    "xpi",
    "cab",
    "deb",
    "ar",
    "rpm",
    "Z",
    "lz",
    "cfb",
    "mxf",
    "mts",
    "blend",
    "bpg",
    "docx",
    "pptx",
    "xlsx",
    "3gp",
    "3g2",
    "j2c",
    "jp2",
    "jpm",
    "jpx",
    "mj2",
    "aif",
    "qcp",
    "odt",
    "ods",
    "odp",
    "xml",
    "mobi",
    "heic",
    "cur",
    "ktx",
    "ape",
    "wv",
    "dcm",
    "ics",
    "glb",
    "pcap",
    "dsf",
    "lnk",
    "alias",
    "voc",
    "ac3",
    "m4v",
    "m4p",
    "m4b",
    "f4v",
    "f4p",
    "f4b",
    "f4a",
    "mie",
    "asf",
    "ogm",
    "ogx",
    "mpc",
    "arrow",
    "shp",
    "aac",
    "mp1",
    "it",
    "s3m",
    "xm",
    "skp",
    "avif",
    "eps",
    "lzh",
    "pgp",
    "asar",
    "stl",
    "chm",
    "3mf",
    "zst",
    "jxl",
    "vcf",
    "jls",
    "pst",
    "dwg",
    "parquet",
    "class",
    "arj",
    "cpio",
    "ace",
    "avro",
    "icc",
    "fbx",
    "vsdx",
    "vtt",
    "apk",
    "drc",
    "lz4",
    "potx",
    "xltx",
    "dotx",
    "xltm",
    "ott",
    "ots",
    "otp",
    "odg",
    "otg",
    "xlsm",
    "docm",
    "dotm",
    "potm",
    "pptm",
    "jar",
    "jmp",
    "rm",
    "sav",
    "ppsm",
    "ppsx",
    "tar.gz",
    "reg",
    "dat"
  ];
  mimeTypes = [
    "image/jpeg",
    "image/png",
    "image/gif",
    "image/webp",
    "image/flif",
    "image/x-xcf",
    "image/x-canon-cr2",
    "image/x-canon-cr3",
    "image/tiff",
    "image/bmp",
    "image/vnd.ms-photo",
    "image/vnd.adobe.photoshop",
    "application/x-indesign",
    "application/epub+zip",
    "application/x-xpinstall",
    "application/vnd.ms-powerpoint.slideshow.macroenabled.12",
    "application/vnd.oasis.opendocument.text",
    "application/vnd.oasis.opendocument.spreadsheet",
    "application/vnd.oasis.opendocument.presentation",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    "application/vnd.openxmlformats-officedocument.presentationml.presentation",
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
    "application/zip",
    "application/x-tar",
    "application/x-rar-compressed",
    "application/gzip",
    "application/x-bzip2",
    "application/x-7z-compressed",
    "application/x-apple-diskimage",
    "application/vnd.apache.arrow.file",
    "video/mp4",
    "audio/midi",
    "video/matroska",
    "video/webm",
    "video/quicktime",
    "video/vnd.avi",
    "audio/wav",
    "audio/qcelp",
    "audio/x-ms-asf",
    "video/x-ms-asf",
    "application/vnd.ms-asf",
    "video/mpeg",
    "video/3gpp",
    "audio/mpeg",
    "audio/mp4",
    "video/ogg",
    "audio/ogg",
    "audio/ogg; codecs=opus",
    "application/ogg",
    "audio/flac",
    "audio/ape",
    "audio/wavpack",
    "audio/amr",
    "application/pdf",
    "application/x-elf",
    "application/x-mach-binary",
    "application/x-msdownload",
    "application/x-shockwave-flash",
    "application/rtf",
    "application/wasm",
    "font/woff",
    "font/woff2",
    "application/vnd.ms-fontobject",
    "font/ttf",
    "font/otf",
    "font/collection",
    "image/x-icon",
    "video/x-flv",
    "application/postscript",
    "application/eps",
    "application/x-xz",
    "application/x-sqlite3",
    "application/x-nintendo-nes-rom",
    "application/x-google-chrome-extension",
    "application/vnd.ms-cab-compressed",
    "application/x-deb",
    "application/x-unix-archive",
    "application/x-rpm",
    "application/x-compress",
    "application/x-lzip",
    "application/x-cfb",
    "application/x-mie",
    "application/mxf",
    "video/mp2t",
    "application/x-blender",
    "image/bpg",
    "image/j2c",
    "image/jp2",
    "image/jpx",
    "image/jpm",
    "image/mj2",
    "audio/aiff",
    "application/xml",
    "application/x-mobipocket-ebook",
    "image/heif",
    "image/heif-sequence",
    "image/heic",
    "image/heic-sequence",
    "image/icns",
    "image/ktx",
    "application/dicom",
    "audio/x-musepack",
    "text/calendar",
    "text/vcard",
    "text/vtt",
    "model/gltf-binary",
    "application/vnd.tcpdump.pcap",
    "audio/x-dsf",
    "application/x.ms.shortcut",
    "application/x.apple.alias",
    "audio/x-voc",
    "audio/vnd.dolby.dd-raw",
    "audio/x-m4a",
    "image/apng",
    "image/x-olympus-orf",
    "image/x-sony-arw",
    "image/x-adobe-dng",
    "image/x-nikon-nef",
    "image/x-panasonic-rw2",
    "image/x-fujifilm-raf",
    "video/x-m4v",
    "video/3gpp2",
    "application/x-esri-shape",
    "audio/aac",
    "audio/x-it",
    "audio/x-s3m",
    "audio/x-xm",
    "video/MP1S",
    "video/MP2P",
    "application/vnd.sketchup.skp",
    "image/avif",
    "application/x-lzh-compressed",
    "application/pgp-encrypted",
    "application/x-asar",
    "model/stl",
    "application/vnd.ms-htmlhelp",
    "model/3mf",
    "image/jxl",
    "application/zstd",
    "image/jls",
    "application/vnd.ms-outlook",
    "image/vnd.dwg",
    "application/vnd.apache.parquet",
    "application/java-vm",
    "application/x-arj",
    "application/x-cpio",
    "application/x-ace-compressed",
    "application/avro",
    "application/vnd.iccprofile",
    "application/x.autodesk.fbx",
    "application/vnd.visio",
    "application/vnd.android.package-archive",
    "application/vnd.google.draco",
    "application/x-lz4",
    "application/vnd.openxmlformats-officedocument.presentationml.template",
    "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
    "application/vnd.ms-excel.template.macroenabled.12",
    "application/vnd.oasis.opendocument.text-template",
    "application/vnd.oasis.opendocument.spreadsheet-template",
    "application/vnd.oasis.opendocument.presentation-template",
    "application/vnd.oasis.opendocument.graphics",
    "application/vnd.oasis.opendocument.graphics-template",
    "application/vnd.ms-excel.sheet.macroenabled.12",
    "application/vnd.ms-word.document.macroenabled.12",
    "application/vnd.ms-word.template.macroenabled.12",
    "application/vnd.ms-powerpoint.template.macroenabled.12",
    "application/vnd.ms-powerpoint.presentation.macroenabled.12",
    "application/java-archive",
    "application/vnd.rn-realmedia",
    "application/x-spss-sav",
    "application/x-ms-regedit",
    "application/x-ft-windows-registry-hive",
    "application/x-jmp-data"
  ];
});

// ../../node_modules/.pnpm/file-type@21.2.0/node_modules/file-type/core.js
async function fileTypeFromBuffer(input, options2) {
  return new FileTypeParser(options2).fromBuffer(input);
}
async function fileTypeFromBlob(blob, options2) {
  return new FileTypeParser(options2).fromBlob(blob);
}
function getFileTypeFromMimeType(mimeType) {
  mimeType = mimeType.toLowerCase();
  switch (mimeType) {
    case "application/epub+zip":
      return {
        ext: "epub",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.text":
      return {
        ext: "odt",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.text-template":
      return {
        ext: "ott",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.spreadsheet":
      return {
        ext: "ods",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.spreadsheet-template":
      return {
        ext: "ots",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.presentation":
      return {
        ext: "odp",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.presentation-template":
      return {
        ext: "otp",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.graphics":
      return {
        ext: "odg",
        mime: mimeType
      };
    case "application/vnd.oasis.opendocument.graphics-template":
      return {
        ext: "otg",
        mime: mimeType
      };
    case "application/vnd.openxmlformats-officedocument.presentationml.slideshow":
      return {
        ext: "ppsx",
        mime: mimeType
      };
    case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
      return {
        ext: "xlsx",
        mime: mimeType
      };
    case "application/vnd.ms-excel.sheet.macroenabled":
      return {
        ext: "xlsm",
        mime: "application/vnd.ms-excel.sheet.macroenabled.12"
      };
    case "application/vnd.openxmlformats-officedocument.spreadsheetml.template":
      return {
        ext: "xltx",
        mime: mimeType
      };
    case "application/vnd.ms-excel.template.macroenabled":
      return {
        ext: "xltm",
        mime: "application/vnd.ms-excel.template.macroenabled.12"
      };
    case "application/vnd.ms-powerpoint.slideshow.macroenabled":
      return {
        ext: "ppsm",
        mime: "application/vnd.ms-powerpoint.slideshow.macroenabled.12"
      };
    case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
      return {
        ext: "docx",
        mime: mimeType
      };
    case "application/vnd.ms-word.document.macroenabled":
      return {
        ext: "docm",
        mime: "application/vnd.ms-word.document.macroenabled.12"
      };
    case "application/vnd.openxmlformats-officedocument.wordprocessingml.template":
      return {
        ext: "dotx",
        mime: mimeType
      };
    case "application/vnd.ms-word.template.macroenabledtemplate":
      return {
        ext: "dotm",
        mime: "application/vnd.ms-word.template.macroenabled.12"
      };
    case "application/vnd.openxmlformats-officedocument.presentationml.template":
      return {
        ext: "potx",
        mime: mimeType
      };
    case "application/vnd.ms-powerpoint.template.macroenabled":
      return {
        ext: "potm",
        mime: "application/vnd.ms-powerpoint.template.macroenabled.12"
      };
    case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
      return {
        ext: "pptx",
        mime: mimeType
      };
    case "application/vnd.ms-powerpoint.presentation.macroenabled":
      return {
        ext: "pptm",
        mime: "application/vnd.ms-powerpoint.presentation.macroenabled.12"
      };
    case "application/vnd.ms-visio.drawing":
      return {
        ext: "vsdx",
        mime: "application/vnd.visio"
      };
    case "application/vnd.ms-package.3dmanufacturing-3dmodel+xml":
      return {
        ext: "3mf",
        mime: "model/3mf"
      };
    default:
  }
}
function _check2(buffer, headers, options2) {
  options2 = {
    offset: 0,
    ...options2
  };
  for (const [index2, header] of headers.entries()) {
    if (options2.mask) {
      if (header !== (options2.mask[index2] & buffer[index2 + options2.offset])) {
        return false;
      }
    } else if (header !== buffer[index2 + options2.offset]) {
      return false;
    }
  }
  return true;
}
async function fileTypeFromTokenizer(tokenizer, options2) {
  return new FileTypeParser(options2).fromTokenizer(tokenizer);
}

class FileTypeParser {
  constructor(options2) {
    this.options = {
      mpegOffsetTolerance: 0,
      ...options2
    };
    this.detectors = [
      ...options2?.customDetectors ?? [],
      { id: "core", detect: this.detectConfident },
      { id: "core.imprecise", detect: this.detectImprecise }
    ];
    this.tokenizerOptions = {
      abortSignal: options2?.signal
    };
  }
  async fromTokenizer(tokenizer) {
    const initialPosition = tokenizer.position;
    for (const detector of this.detectors) {
      const fileType = await detector.detect(tokenizer);
      if (fileType) {
        return fileType;
      }
      if (initialPosition !== tokenizer.position) {
        return;
      }
    }
  }
  async fromBuffer(input) {
    if (!(input instanceof Uint8Array || input instanceof ArrayBuffer)) {
      throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof input}\``);
    }
    const buffer = input instanceof Uint8Array ? input : new Uint8Array(input);
    if (!(buffer?.length > 1)) {
      return;
    }
    return this.fromTokenizer(fromBuffer(buffer, this.tokenizerOptions));
  }
  async fromBlob(blob) {
    const tokenizer = fromBlob(blob, this.tokenizerOptions);
    try {
      return await this.fromTokenizer(tokenizer);
    } finally {
      await tokenizer.close();
    }
  }
  async fromStream(stream2) {
    const tokenizer = fromWebStream(stream2, this.tokenizerOptions);
    try {
      return await this.fromTokenizer(tokenizer);
    } finally {
      await tokenizer.close();
    }
  }
  async toDetectionStream(stream2, options2) {
    const { sampleSize = reasonableDetectionSizeInBytes } = options2;
    let detectedFileType;
    let firstChunk;
    const reader = stream2.getReader({ mode: "byob" });
    try {
      const { value: chunk, done } = await reader.read(new Uint8Array(sampleSize));
      firstChunk = chunk;
      if (!done && chunk) {
        try {
          detectedFileType = await this.fromBuffer(chunk.subarray(0, sampleSize));
        } catch (error49) {
          if (!(error49 instanceof EndOfStreamError)) {
            throw error49;
          }
          detectedFileType = undefined;
        }
      }
      firstChunk = chunk;
    } finally {
      reader.releaseLock();
    }
    const transformStream = new TransformStream({
      async start(controller) {
        controller.enqueue(firstChunk);
      },
      transform(chunk, controller) {
        controller.enqueue(chunk);
      }
    });
    const newStream = stream2.pipeThrough(transformStream);
    newStream.fileType = detectedFileType;
    return newStream;
  }
  check(header, options2) {
    return _check2(this.buffer, header, options2);
  }
  checkString(header, options2) {
    return this.check(stringToBytes(header, options2?.encoding), options2);
  }
  detectConfident = async (tokenizer) => {
    this.buffer = new Uint8Array(reasonableDetectionSizeInBytes);
    if (tokenizer.fileInfo.size === undefined) {
      tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER;
    }
    this.tokenizer = tokenizer;
    await tokenizer.peekBuffer(this.buffer, { length: 32, mayBeLess: true });
    if (this.check([66, 77])) {
      return {
        ext: "bmp",
        mime: "image/bmp"
      };
    }
    if (this.check([11, 119])) {
      return {
        ext: "ac3",
        mime: "audio/vnd.dolby.dd-raw"
      };
    }
    if (this.check([120, 1])) {
      return {
        ext: "dmg",
        mime: "application/x-apple-diskimage"
      };
    }
    if (this.check([77, 90])) {
      return {
        ext: "exe",
        mime: "application/x-msdownload"
      };
    }
    if (this.check([37, 33])) {
      await tokenizer.peekBuffer(this.buffer, { length: 24, mayBeLess: true });
      if (this.checkString("PS-Adobe-", { offset: 2 }) && this.checkString(" EPSF-", { offset: 14 })) {
        return {
          ext: "eps",
          mime: "application/eps"
        };
      }
      return {
        ext: "ps",
        mime: "application/postscript"
      };
    }
    if (this.check([31, 160]) || this.check([31, 157])) {
      return {
        ext: "Z",
        mime: "application/x-compress"
      };
    }
    if (this.check([199, 113])) {
      return {
        ext: "cpio",
        mime: "application/x-cpio"
      };
    }
    if (this.check([96, 234])) {
      return {
        ext: "arj",
        mime: "application/x-arj"
      };
    }
    if (this.check([239, 187, 191])) {
      this.tokenizer.ignore(3);
      return this.detectConfident(tokenizer);
    }
    if (this.check([71, 73, 70])) {
      return {
        ext: "gif",
        mime: "image/gif"
      };
    }
    if (this.check([73, 73, 188])) {
      return {
        ext: "jxr",
        mime: "image/vnd.ms-photo"
      };
    }
    if (this.check([31, 139, 8])) {
      const gzipHandler = new GzipHandler(tokenizer);
      const stream2 = gzipHandler.inflate();
      let shouldCancelStream = true;
      try {
        let compressedFileType;
        try {
          compressedFileType = await this.fromStream(stream2);
        } catch {
          shouldCancelStream = false;
        }
        if (compressedFileType && compressedFileType.ext === "tar") {
          return {
            ext: "tar.gz",
            mime: "application/gzip"
          };
        }
      } finally {
        if (shouldCancelStream) {
          await stream2.cancel();
        }
      }
      return {
        ext: "gz",
        mime: "application/gzip"
      };
    }
    if (this.check([66, 90, 104])) {
      return {
        ext: "bz2",
        mime: "application/x-bzip2"
      };
    }
    if (this.checkString("ID3")) {
      await tokenizer.ignore(6);
      const id3HeaderLength = await tokenizer.readToken(uint32SyncSafeToken);
      if (tokenizer.position + id3HeaderLength > tokenizer.fileInfo.size) {
        return {
          ext: "mp3",
          mime: "audio/mpeg"
        };
      }
      await tokenizer.ignore(id3HeaderLength);
      return this.fromTokenizer(tokenizer);
    }
    if (this.checkString("MP+")) {
      return {
        ext: "mpc",
        mime: "audio/x-musepack"
      };
    }
    if ((this.buffer[0] === 67 || this.buffer[0] === 70) && this.check([87, 83], { offset: 1 })) {
      return {
        ext: "swf",
        mime: "application/x-shockwave-flash"
      };
    }
    if (this.check([255, 216, 255])) {
      if (this.check([247], { offset: 3 })) {
        return {
          ext: "jls",
          mime: "image/jls"
        };
      }
      return {
        ext: "jpg",
        mime: "image/jpeg"
      };
    }
    if (this.check([79, 98, 106, 1])) {
      return {
        ext: "avro",
        mime: "application/avro"
      };
    }
    if (this.checkString("FLIF")) {
      return {
        ext: "flif",
        mime: "image/flif"
      };
    }
    if (this.checkString("8BPS")) {
      return {
        ext: "psd",
        mime: "image/vnd.adobe.photoshop"
      };
    }
    if (this.checkString("MPCK")) {
      return {
        ext: "mpc",
        mime: "audio/x-musepack"
      };
    }
    if (this.checkString("FORM")) {
      return {
        ext: "aif",
        mime: "audio/aiff"
      };
    }
    if (this.checkString("icns", { offset: 0 })) {
      return {
        ext: "icns",
        mime: "image/icns"
      };
    }
    if (this.check([80, 75, 3, 4])) {
      let fileType;
      await new ZipHandler(tokenizer).unzip((zipHeader) => {
        switch (zipHeader.filename) {
          case "META-INF/mozilla.rsa":
            fileType = {
              ext: "xpi",
              mime: "application/x-xpinstall"
            };
            return {
              stop: true
            };
          case "META-INF/MANIFEST.MF":
            fileType = {
              ext: "jar",
              mime: "application/java-archive"
            };
            return {
              stop: true
            };
          case "mimetype":
            return {
              async handler(fileData) {
                const mimeType = new TextDecoder("utf-8").decode(fileData).trim();
                fileType = getFileTypeFromMimeType(mimeType);
              },
              stop: true
            };
          case "[Content_Types].xml":
            return {
              async handler(fileData) {
                let xmlContent = new TextDecoder("utf-8").decode(fileData);
                const endPos = xmlContent.indexOf('.main+xml"');
                if (endPos === -1) {
                  const mimeType = "application/vnd.ms-package.3dmanufacturing-3dmodel+xml";
                  if (xmlContent.includes(`ContentType="${mimeType}"`)) {
                    fileType = getFileTypeFromMimeType(mimeType);
                  }
                } else {
                  xmlContent = xmlContent.slice(0, Math.max(0, endPos));
                  const firstPos = xmlContent.lastIndexOf('"');
                  const mimeType = xmlContent.slice(Math.max(0, firstPos + 1));
                  fileType = getFileTypeFromMimeType(mimeType);
                }
              },
              stop: true
            };
          default:
            if (/classes\d*\.dex/.test(zipHeader.filename)) {
              fileType = {
                ext: "apk",
                mime: "application/vnd.android.package-archive"
              };
              return { stop: true };
            }
            return {};
        }
      }).catch((error49) => {
        if (!(error49 instanceof EndOfStreamError)) {
          throw error49;
        }
      });
      return fileType ?? {
        ext: "zip",
        mime: "application/zip"
      };
    }
    if (this.checkString("OggS")) {
      await tokenizer.ignore(28);
      const type2 = new Uint8Array(8);
      await tokenizer.readBuffer(type2);
      if (_check2(type2, [79, 112, 117, 115, 72, 101, 97, 100])) {
        return {
          ext: "opus",
          mime: "audio/ogg; codecs=opus"
        };
      }
      if (_check2(type2, [128, 116, 104, 101, 111, 114, 97])) {
        return {
          ext: "ogv",
          mime: "video/ogg"
        };
      }
      if (_check2(type2, [1, 118, 105, 100, 101, 111, 0])) {
        return {
          ext: "ogm",
          mime: "video/ogg"
        };
      }
      if (_check2(type2, [127, 70, 76, 65, 67])) {
        return {
          ext: "oga",
          mime: "audio/ogg"
        };
      }
      if (_check2(type2, [83, 112, 101, 101, 120, 32, 32])) {
        return {
          ext: "spx",
          mime: "audio/ogg"
        };
      }
      if (_check2(type2, [1, 118, 111, 114, 98, 105, 115])) {
        return {
          ext: "ogg",
          mime: "audio/ogg"
        };
      }
      return {
        ext: "ogx",
        mime: "application/ogg"
      };
    }
    if (this.check([80, 75]) && (this.buffer[2] === 3 || this.buffer[2] === 5 || this.buffer[2] === 7) && (this.buffer[3] === 4 || this.buffer[3] === 6 || this.buffer[3] === 8)) {
      return {
        ext: "zip",
        mime: "application/zip"
      };
    }
    if (this.checkString("MThd")) {
      return {
        ext: "mid",
        mime: "audio/midi"
      };
    }
    if (this.checkString("wOFF") && (this.check([0, 1, 0, 0], { offset: 4 }) || this.checkString("OTTO", { offset: 4 }))) {
      return {
        ext: "woff",
        mime: "font/woff"
      };
    }
    if (this.checkString("wOF2") && (this.check([0, 1, 0, 0], { offset: 4 }) || this.checkString("OTTO", { offset: 4 }))) {
      return {
        ext: "woff2",
        mime: "font/woff2"
      };
    }
    if (this.check([212, 195, 178, 161]) || this.check([161, 178, 195, 212])) {
      return {
        ext: "pcap",
        mime: "application/vnd.tcpdump.pcap"
      };
    }
    if (this.checkString("DSD ")) {
      return {
        ext: "dsf",
        mime: "audio/x-dsf"
      };
    }
    if (this.checkString("LZIP")) {
      return {
        ext: "lz",
        mime: "application/x-lzip"
      };
    }
    if (this.checkString("fLaC")) {
      return {
        ext: "flac",
        mime: "audio/flac"
      };
    }
    if (this.check([66, 80, 71, 251])) {
      return {
        ext: "bpg",
        mime: "image/bpg"
      };
    }
    if (this.checkString("wvpk")) {
      return {
        ext: "wv",
        mime: "audio/wavpack"
      };
    }
    if (this.checkString("%PDF")) {
      return {
        ext: "pdf",
        mime: "application/pdf"
      };
    }
    if (this.check([0, 97, 115, 109])) {
      return {
        ext: "wasm",
        mime: "application/wasm"
      };
    }
    if (this.check([73, 73])) {
      const fileType = await this.readTiffHeader(false);
      if (fileType) {
        return fileType;
      }
    }
    if (this.check([77, 77])) {
      const fileType = await this.readTiffHeader(true);
      if (fileType) {
        return fileType;
      }
    }
    if (this.checkString("MAC ")) {
      return {
        ext: "ape",
        mime: "audio/ape"
      };
    }
    if (this.check([26, 69, 223, 163])) {
      async function readField() {
        const msb = await tokenizer.peekNumber(UINT8);
        let mask = 128;
        let ic = 0;
        while ((msb & mask) === 0 && mask !== 0) {
          ++ic;
          mask >>= 1;
        }
        const id = new Uint8Array(ic + 1);
        await tokenizer.readBuffer(id);
        return id;
      }
      async function readElement() {
        const idField = await readField();
        const lengthField = await readField();
        lengthField[0] ^= 128 >> lengthField.length - 1;
        const nrLength = Math.min(6, lengthField.length);
        const idView = new DataView(idField.buffer);
        const lengthView = new DataView(lengthField.buffer, lengthField.length - nrLength, nrLength);
        return {
          id: getUintBE(idView),
          len: getUintBE(lengthView)
        };
      }
      async function readChildren(children) {
        while (children > 0) {
          const element = await readElement();
          if (element.id === 17026) {
            const rawValue = await tokenizer.readToken(new StringType2(element.len));
            return rawValue.replaceAll(/\00.*$/g, "");
          }
          await tokenizer.ignore(element.len);
          --children;
        }
      }
      const re4 = await readElement();
      const documentType = await readChildren(re4.len);
      switch (documentType) {
        case "webm":
          return {
            ext: "webm",
            mime: "video/webm"
          };
        case "matroska":
          return {
            ext: "mkv",
            mime: "video/matroska"
          };
        default:
          return;
      }
    }
    if (this.checkString("SQLi")) {
      return {
        ext: "sqlite",
        mime: "application/x-sqlite3"
      };
    }
    if (this.check([78, 69, 83, 26])) {
      return {
        ext: "nes",
        mime: "application/x-nintendo-nes-rom"
      };
    }
    if (this.checkString("Cr24")) {
      return {
        ext: "crx",
        mime: "application/x-google-chrome-extension"
      };
    }
    if (this.checkString("MSCF") || this.checkString("ISc(")) {
      return {
        ext: "cab",
        mime: "application/vnd.ms-cab-compressed"
      };
    }
    if (this.check([237, 171, 238, 219])) {
      return {
        ext: "rpm",
        mime: "application/x-rpm"
      };
    }
    if (this.check([197, 208, 211, 198])) {
      return {
        ext: "eps",
        mime: "application/eps"
      };
    }
    if (this.check([40, 181, 47, 253])) {
      return {
        ext: "zst",
        mime: "application/zstd"
      };
    }
    if (this.check([127, 69, 76, 70])) {
      return {
        ext: "elf",
        mime: "application/x-elf"
      };
    }
    if (this.check([33, 66, 68, 78])) {
      return {
        ext: "pst",
        mime: "application/vnd.ms-outlook"
      };
    }
    if (this.checkString("PAR1") || this.checkString("PARE")) {
      return {
        ext: "parquet",
        mime: "application/vnd.apache.parquet"
      };
    }
    if (this.checkString("ttcf")) {
      return {
        ext: "ttc",
        mime: "font/collection"
      };
    }
    if (this.check([207, 250, 237, 254])) {
      return {
        ext: "macho",
        mime: "application/x-mach-binary"
      };
    }
    if (this.check([4, 34, 77, 24])) {
      return {
        ext: "lz4",
        mime: "application/x-lz4"
      };
    }
    if (this.checkString("regf")) {
      return {
        ext: "dat",
        mime: "application/x-ft-windows-registry-hive"
      };
    }
    if (this.checkString("$FL2") || this.checkString("$FL3")) {
      return {
        ext: "sav",
        mime: "application/x-spss-sav"
      };
    }
    if (this.check([79, 84, 84, 79, 0])) {
      return {
        ext: "otf",
        mime: "font/otf"
      };
    }
    if (this.checkString("#!AMR")) {
      return {
        ext: "amr",
        mime: "audio/amr"
      };
    }
    if (this.checkString("{\\rtf")) {
      return {
        ext: "rtf",
        mime: "application/rtf"
      };
    }
    if (this.check([70, 76, 86, 1])) {
      return {
        ext: "flv",
        mime: "video/x-flv"
      };
    }
    if (this.checkString("IMPM")) {
      return {
        ext: "it",
        mime: "audio/x-it"
      };
    }
    if (this.checkString("-lh0-", { offset: 2 }) || this.checkString("-lh1-", { offset: 2 }) || this.checkString("-lh2-", { offset: 2 }) || this.checkString("-lh3-", { offset: 2 }) || this.checkString("-lh4-", { offset: 2 }) || this.checkString("-lh5-", { offset: 2 }) || this.checkString("-lh6-", { offset: 2 }) || this.checkString("-lh7-", { offset: 2 }) || this.checkString("-lzs-", { offset: 2 }) || this.checkString("-lz4-", { offset: 2 }) || this.checkString("-lz5-", { offset: 2 }) || this.checkString("-lhd-", { offset: 2 })) {
      return {
        ext: "lzh",
        mime: "application/x-lzh-compressed"
      };
    }
    if (this.check([0, 0, 1, 186])) {
      if (this.check([33], { offset: 4, mask: [241] })) {
        return {
          ext: "mpg",
          mime: "video/MP1S"
        };
      }
      if (this.check([68], { offset: 4, mask: [196] })) {
        return {
          ext: "mpg",
          mime: "video/MP2P"
        };
      }
    }
    if (this.checkString("ITSF")) {
      return {
        ext: "chm",
        mime: "application/vnd.ms-htmlhelp"
      };
    }
    if (this.check([202, 254, 186, 190])) {
      return {
        ext: "class",
        mime: "application/java-vm"
      };
    }
    if (this.checkString(".RMF")) {
      return {
        ext: "rm",
        mime: "application/vnd.rn-realmedia"
      };
    }
    if (this.checkString("DRACO")) {
      return {
        ext: "drc",
        mime: "application/vnd.google.draco"
      };
    }
    if (this.check([253, 55, 122, 88, 90, 0])) {
      return {
        ext: "xz",
        mime: "application/x-xz"
      };
    }
    if (this.checkString("<?xml ")) {
      return {
        ext: "xml",
        mime: "application/xml"
      };
    }
    if (this.check([55, 122, 188, 175, 39, 28])) {
      return {
        ext: "7z",
        mime: "application/x-7z-compressed"
      };
    }
    if (this.check([82, 97, 114, 33, 26, 7]) && (this.buffer[6] === 0 || this.buffer[6] === 1)) {
      return {
        ext: "rar",
        mime: "application/x-rar-compressed"
      };
    }
    if (this.checkString("solid ")) {
      return {
        ext: "stl",
        mime: "model/stl"
      };
    }
    if (this.checkString("AC")) {
      const version5 = new StringType2(4, "latin1").get(this.buffer, 2);
      if (version5.match("^d*") && version5 >= 1000 && version5 <= 1050) {
        return {
          ext: "dwg",
          mime: "image/vnd.dwg"
        };
      }
    }
    if (this.checkString("070707")) {
      return {
        ext: "cpio",
        mime: "application/x-cpio"
      };
    }
    if (this.checkString("BLENDER")) {
      return {
        ext: "blend",
        mime: "application/x-blender"
      };
    }
    if (this.checkString("!<arch>")) {
      await tokenizer.ignore(8);
      const string4 = await tokenizer.readToken(new StringType2(13, "ascii"));
      if (string4 === "debian-binary") {
        return {
          ext: "deb",
          mime: "application/x-deb"
        };
      }
      return {
        ext: "ar",
        mime: "application/x-unix-archive"
      };
    }
    if (this.checkString("WEBVTT") && [`
`, "\r", "\t", " ", "\x00"].some((char7) => this.checkString(char7, { offset: 6 }))) {
      return {
        ext: "vtt",
        mime: "text/vtt"
      };
    }
    if (this.check([137, 80, 78, 71, 13, 10, 26, 10])) {
      await tokenizer.ignore(8);
      async function readChunkHeader() {
        return {
          length: await tokenizer.readToken(INT32_BE),
          type: await tokenizer.readToken(new StringType2(4, "latin1"))
        };
      }
      do {
        const chunk = await readChunkHeader();
        if (chunk.length < 0) {
          return;
        }
        switch (chunk.type) {
          case "IDAT":
            return {
              ext: "png",
              mime: "image/png"
            };
          case "acTL":
            return {
              ext: "apng",
              mime: "image/apng"
            };
          default:
            await tokenizer.ignore(chunk.length + 4);
        }
      } while (tokenizer.position + 8 < tokenizer.fileInfo.size);
      return {
        ext: "png",
        mime: "image/png"
      };
    }
    if (this.check([65, 82, 82, 79, 87, 49, 0, 0])) {
      return {
        ext: "arrow",
        mime: "application/vnd.apache.arrow.file"
      };
    }
    if (this.check([103, 108, 84, 70, 2, 0, 0, 0])) {
      return {
        ext: "glb",
        mime: "model/gltf-binary"
      };
    }
    if (this.check([102, 114, 101, 101], { offset: 4 }) || this.check([109, 100, 97, 116], { offset: 4 }) || this.check([109, 111, 111, 118], { offset: 4 }) || this.check([119, 105, 100, 101], { offset: 4 })) {
      return {
        ext: "mov",
        mime: "video/quicktime"
      };
    }
    if (this.check([73, 73, 82, 79, 8, 0, 0, 0, 24])) {
      return {
        ext: "orf",
        mime: "image/x-olympus-orf"
      };
    }
    if (this.checkString("gimp xcf ")) {
      return {
        ext: "xcf",
        mime: "image/x-xcf"
      };
    }
    if (this.checkString("ftyp", { offset: 4 }) && (this.buffer[8] & 96) !== 0) {
      const brandMajor = new StringType2(4, "latin1").get(this.buffer, 8).replace("\x00", " ").trim();
      switch (brandMajor) {
        case "avif":
        case "avis":
          return { ext: "avif", mime: "image/avif" };
        case "mif1":
          return { ext: "heic", mime: "image/heif" };
        case "msf1":
          return { ext: "heic", mime: "image/heif-sequence" };
        case "heic":
        case "heix":
          return { ext: "heic", mime: "image/heic" };
        case "hevc":
        case "hevx":
          return { ext: "heic", mime: "image/heic-sequence" };
        case "qt":
          return { ext: "mov", mime: "video/quicktime" };
        case "M4V":
        case "M4VH":
        case "M4VP":
          return { ext: "m4v", mime: "video/x-m4v" };
        case "M4P":
          return { ext: "m4p", mime: "video/mp4" };
        case "M4B":
          return { ext: "m4b", mime: "audio/mp4" };
        case "M4A":
          return { ext: "m4a", mime: "audio/x-m4a" };
        case "F4V":
          return { ext: "f4v", mime: "video/mp4" };
        case "F4P":
          return { ext: "f4p", mime: "video/mp4" };
        case "F4A":
          return { ext: "f4a", mime: "audio/mp4" };
        case "F4B":
          return { ext: "f4b", mime: "audio/mp4" };
        case "crx":
          return { ext: "cr3", mime: "image/x-canon-cr3" };
        default:
          if (brandMajor.startsWith("3g")) {
            if (brandMajor.startsWith("3g2")) {
              return { ext: "3g2", mime: "video/3gpp2" };
            }
            return { ext: "3gp", mime: "video/3gpp" };
          }
          return { ext: "mp4", mime: "video/mp4" };
      }
    }
    if (this.checkString(`REGEDIT4\r
`)) {
      return {
        ext: "reg",
        mime: "application/x-ms-regedit"
      };
    }
    if (this.check([82, 73, 70, 70])) {
      if (this.checkString("WEBP", { offset: 8 })) {
        return {
          ext: "webp",
          mime: "image/webp"
        };
      }
      if (this.check([65, 86, 73], { offset: 8 })) {
        return {
          ext: "avi",
          mime: "video/vnd.avi"
        };
      }
      if (this.check([87, 65, 86, 69], { offset: 8 })) {
        return {
          ext: "wav",
          mime: "audio/wav"
        };
      }
      if (this.check([81, 76, 67, 77], { offset: 8 })) {
        return {
          ext: "qcp",
          mime: "audio/qcelp"
        };
      }
    }
    if (this.check([73, 73, 85, 0, 24, 0, 0, 0, 136, 231, 116, 216])) {
      return {
        ext: "rw2",
        mime: "image/x-panasonic-rw2"
      };
    }
    if (this.check([48, 38, 178, 117, 142, 102, 207, 17, 166, 217])) {
      async function readHeader() {
        const guid3 = new Uint8Array(16);
        await tokenizer.readBuffer(guid3);
        return {
          id: guid3,
          size: Number(await tokenizer.readToken(UINT64_LE))
        };
      }
      await tokenizer.ignore(30);
      while (tokenizer.position + 24 < tokenizer.fileInfo.size) {
        const header = await readHeader();
        let payload = header.size - 24;
        if (_check2(header.id, [145, 7, 220, 183, 183, 169, 207, 17, 142, 230, 0, 192, 12, 32, 83, 101])) {
          const typeId = new Uint8Array(16);
          payload -= await tokenizer.readBuffer(typeId);
          if (_check2(typeId, [64, 158, 105, 248, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43])) {
            return {
              ext: "asf",
              mime: "audio/x-ms-asf"
            };
          }
          if (_check2(typeId, [192, 239, 25, 188, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43])) {
            return {
              ext: "asf",
              mime: "video/x-ms-asf"
            };
          }
          break;
        }
        await tokenizer.ignore(payload);
      }
      return {
        ext: "asf",
        mime: "application/vnd.ms-asf"
      };
    }
    if (this.check([171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10])) {
      return {
        ext: "ktx",
        mime: "image/ktx"
      };
    }
    if ((this.check([126, 16, 4]) || this.check([126, 24, 4])) && this.check([48, 77, 73, 69], { offset: 4 })) {
      return {
        ext: "mie",
        mime: "application/x-mie"
      };
    }
    if (this.check([39, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { offset: 2 })) {
      return {
        ext: "shp",
        mime: "application/x-esri-shape"
      };
    }
    if (this.check([255, 79, 255, 81])) {
      return {
        ext: "j2c",
        mime: "image/j2c"
      };
    }
    if (this.check([0, 0, 0, 12, 106, 80, 32, 32, 13, 10, 135, 10])) {
      await tokenizer.ignore(20);
      const type2 = await tokenizer.readToken(new StringType2(4, "ascii"));
      switch (type2) {
        case "jp2 ":
          return {
            ext: "jp2",
            mime: "image/jp2"
          };
        case "jpx ":
          return {
            ext: "jpx",
            mime: "image/jpx"
          };
        case "jpm ":
          return {
            ext: "jpm",
            mime: "image/jpm"
          };
        case "mjp2":
          return {
            ext: "mj2",
            mime: "image/mj2"
          };
        default:
          return;
      }
    }
    if (this.check([255, 10]) || this.check([0, 0, 0, 12, 74, 88, 76, 32, 13, 10, 135, 10])) {
      return {
        ext: "jxl",
        mime: "image/jxl"
      };
    }
    if (this.check([254, 255])) {
      if (this.checkString("<?xml ", { offset: 2, encoding: "utf-16be" })) {
        return {
          ext: "xml",
          mime: "application/xml"
        };
      }
      return;
    }
    if (this.check([208, 207, 17, 224, 161, 177, 26, 225])) {
      return {
        ext: "cfb",
        mime: "application/x-cfb"
      };
    }
    await tokenizer.peekBuffer(this.buffer, { length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true });
    if (this.check([97, 99, 115, 112], { offset: 36 })) {
      return {
        ext: "icc",
        mime: "application/vnd.iccprofile"
      };
    }
    if (this.checkString("**ACE", { offset: 7 }) && this.checkString("**", { offset: 12 })) {
      return {
        ext: "ace",
        mime: "application/x-ace-compressed"
      };
    }
    if (this.checkString("BEGIN:")) {
      if (this.checkString("VCARD", { offset: 6 })) {
        return {
          ext: "vcf",
          mime: "text/vcard"
        };
      }
      if (this.checkString("VCALENDAR", { offset: 6 })) {
        return {
          ext: "ics",
          mime: "text/calendar"
        };
      }
    }
    if (this.checkString("FUJIFILMCCD-RAW")) {
      return {
        ext: "raf",
        mime: "image/x-fujifilm-raf"
      };
    }
    if (this.checkString("Extended Module:")) {
      return {
        ext: "xm",
        mime: "audio/x-xm"
      };
    }
    if (this.checkString("Creative Voice File")) {
      return {
        ext: "voc",
        mime: "audio/x-voc"
      };
    }
    if (this.check([4, 0, 0, 0]) && this.buffer.length >= 16) {
      const jsonSize2 = new DataView(this.buffer.buffer).getUint32(12, true);
      if (jsonSize2 > 12 && this.buffer.length >= jsonSize2 + 16) {
        try {
          const header = new TextDecoder().decode(this.buffer.subarray(16, jsonSize2 + 16));
          const json3 = JSON.parse(header);
          if (json3.files) {
            return {
              ext: "asar",
              mime: "application/x-asar"
            };
          }
        } catch {}
      }
    }
    if (this.check([6, 14, 43, 52, 2, 5, 1, 1, 13, 1, 2, 1, 1, 2])) {
      return {
        ext: "mxf",
        mime: "application/mxf"
      };
    }
    if (this.checkString("SCRM", { offset: 44 })) {
      return {
        ext: "s3m",
        mime: "audio/x-s3m"
      };
    }
    if (this.check([71]) && this.check([71], { offset: 188 })) {
      return {
        ext: "mts",
        mime: "video/mp2t"
      };
    }
    if (this.check([71], { offset: 4 }) && this.check([71], { offset: 196 })) {
      return {
        ext: "mts",
        mime: "video/mp2t"
      };
    }
    if (this.check([66, 79, 79, 75, 77, 79, 66, 73], { offset: 60 })) {
      return {
        ext: "mobi",
        mime: "application/x-mobipocket-ebook"
      };
    }
    if (this.check([68, 73, 67, 77], { offset: 128 })) {
      return {
        ext: "dcm",
        mime: "application/dicom"
      };
    }
    if (this.check([76, 0, 0, 0, 1, 20, 2, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70])) {
      return {
        ext: "lnk",
        mime: "application/x.ms.shortcut"
      };
    }
    if (this.check([98, 111, 111, 107, 0, 0, 0, 0, 109, 97, 114, 107, 0, 0, 0, 0])) {
      return {
        ext: "alias",
        mime: "application/x.apple.alias"
      };
    }
    if (this.checkString("Kaydara FBX Binary  \x00")) {
      return {
        ext: "fbx",
        mime: "application/x.autodesk.fbx"
      };
    }
    if (this.check([76, 80], { offset: 34 }) && (this.check([0, 0, 1], { offset: 8 }) || this.check([1, 0, 2], { offset: 8 }) || this.check([2, 0, 2], { offset: 8 }))) {
      return {
        ext: "eot",
        mime: "application/vnd.ms-fontobject"
      };
    }
    if (this.check([6, 6, 237, 245, 216, 29, 70, 229, 189, 49, 239, 231, 254, 116, 183, 29])) {
      return {
        ext: "indd",
        mime: "application/x-indesign"
      };
    }
    if (this.check([255, 255, 0, 0, 7, 0, 0, 0, 4, 0, 0, 0, 1, 0, 1, 0]) || this.check([0, 0, 255, 255, 0, 0, 0, 7, 0, 0, 0, 4, 0, 1, 0, 1])) {
      return {
        ext: "jmp",
        mime: "application/x-jmp-data"
      };
    }
    await tokenizer.peekBuffer(this.buffer, { length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true });
    if (this.checkString("ustar", { offset: 257 }) && (this.checkString("\x00", { offset: 262 }) || this.checkString(" ", { offset: 262 })) || this.check([0, 0, 0, 0, 0, 0], { offset: 257 }) && tarHeaderChecksumMatches(this.buffer)) {
      return {
        ext: "tar",
        mime: "application/x-tar"
      };
    }
    if (this.check([255, 254])) {
      const encoding = "utf-16le";
      if (this.checkString("<?xml ", { offset: 2, encoding })) {
        return {
          ext: "xml",
          mime: "application/xml"
        };
      }
      if (this.check([255, 14], { offset: 2 }) && this.checkString("SketchUp Model", { offset: 4, encoding })) {
        return {
          ext: "skp",
          mime: "application/vnd.sketchup.skp"
        };
      }
      if (this.checkString(`Windows Registry Editor Version 5.00\r
`, { offset: 2, encoding })) {
        return {
          ext: "reg",
          mime: "application/x-ms-regedit"
        };
      }
      return;
    }
    if (this.checkString("-----BEGIN PGP MESSAGE-----")) {
      return {
        ext: "pgp",
        mime: "application/pgp-encrypted"
      };
    }
  };
  detectImprecise = async (tokenizer) => {
    this.buffer = new Uint8Array(reasonableDetectionSizeInBytes);
    await tokenizer.peekBuffer(this.buffer, { length: Math.min(8, tokenizer.fileInfo.size), mayBeLess: true });
    if (this.check([0, 0, 1, 186]) || this.check([0, 0, 1, 179])) {
      return {
        ext: "mpg",
        mime: "video/mpeg"
      };
    }
    if (this.check([0, 1, 0, 0, 0])) {
      return {
        ext: "ttf",
        mime: "font/ttf"
      };
    }
    if (this.check([0, 0, 1, 0])) {
      return {
        ext: "ico",
        mime: "image/x-icon"
      };
    }
    if (this.check([0, 0, 2, 0])) {
      return {
        ext: "cur",
        mime: "image/x-icon"
      };
    }
    await tokenizer.peekBuffer(this.buffer, { length: Math.min(2 + this.options.mpegOffsetTolerance, tokenizer.fileInfo.size), mayBeLess: true });
    if (this.buffer.length >= 2 + this.options.mpegOffsetTolerance) {
      for (let depth = 0;depth <= this.options.mpegOffsetTolerance; ++depth) {
        const type2 = this.scanMpeg(depth);
        if (type2) {
          return type2;
        }
      }
    }
  };
  async readTiffTag(bigEndian) {
    const tagId = await this.tokenizer.readToken(bigEndian ? UINT16_BE : UINT16_LE);
    this.tokenizer.ignore(10);
    switch (tagId) {
      case 50341:
        return {
          ext: "arw",
          mime: "image/x-sony-arw"
        };
      case 50706:
        return {
          ext: "dng",
          mime: "image/x-adobe-dng"
        };
      default:
    }
  }
  async readTiffIFD(bigEndian) {
    const numberOfTags = await this.tokenizer.readToken(bigEndian ? UINT16_BE : UINT16_LE);
    for (let n3 = 0;n3 < numberOfTags; ++n3) {
      const fileType = await this.readTiffTag(bigEndian);
      if (fileType) {
        return fileType;
      }
    }
  }
  async readTiffHeader(bigEndian) {
    const version5 = (bigEndian ? UINT16_BE : UINT16_LE).get(this.buffer, 2);
    const ifdOffset = (bigEndian ? UINT32_BE : UINT32_LE).get(this.buffer, 4);
    if (version5 === 42) {
      if (ifdOffset >= 6) {
        if (this.checkString("CR", { offset: 8 })) {
          return {
            ext: "cr2",
            mime: "image/x-canon-cr2"
          };
        }
        if (ifdOffset >= 8) {
          const someId1 = (bigEndian ? UINT16_BE : UINT16_LE).get(this.buffer, 8);
          const someId2 = (bigEndian ? UINT16_BE : UINT16_LE).get(this.buffer, 10);
          if (someId1 === 28 && someId2 === 254 || someId1 === 31 && someId2 === 11) {
            return {
              ext: "nef",
              mime: "image/x-nikon-nef"
            };
          }
        }
      }
      await this.tokenizer.ignore(ifdOffset);
      const fileType = await this.readTiffIFD(bigEndian);
      return fileType ?? {
        ext: "tif",
        mime: "image/tiff"
      };
    }
    if (version5 === 43) {
      return {
        ext: "tif",
        mime: "image/tiff"
      };
    }
  }
  scanMpeg(offset) {
    if (this.check([255, 224], { offset, mask: [255, 224] })) {
      if (this.check([16], { offset: offset + 1, mask: [22] })) {
        if (this.check([8], { offset: offset + 1, mask: [8] })) {
          return {
            ext: "aac",
            mime: "audio/aac"
          };
        }
        return {
          ext: "aac",
          mime: "audio/aac"
        };
      }
      if (this.check([2], { offset: offset + 1, mask: [6] })) {
        return {
          ext: "mp3",
          mime: "audio/mpeg"
        };
      }
      if (this.check([4], { offset: offset + 1, mask: [6] })) {
        return {
          ext: "mp2",
          mime: "audio/mpeg"
        };
      }
      if (this.check([6], { offset: offset + 1, mask: [6] })) {
        return {
          ext: "mp1",
          mime: "audio/mpeg"
        };
      }
    }
  }
}
var reasonableDetectionSizeInBytes = 4100, supportedExtensions, supportedMimeTypes;
var init_core3 = __esm(() => {
  init_lib4();
  init_core2();
  init_lib5();
  init_uint8array_extras();
  init_util();
  init_supported();
  supportedExtensions = new Set(extensions);
  supportedMimeTypes = new Set(mimeTypes);
});

// ../../node_modules/.pnpm/file-type@21.2.0/node_modules/file-type/index.js
var exports_file_type = {};
__export(exports_file_type, {
  supportedMimeTypes: () => supportedMimeTypes,
  supportedExtensions: () => supportedExtensions,
  fileTypeStream: () => fileTypeStream,
  fileTypeFromTokenizer: () => fileTypeFromTokenizer,
  fileTypeFromStream: () => fileTypeFromStream,
  fileTypeFromFile: () => fileTypeFromFile,
  fileTypeFromBuffer: () => fileTypeFromBuffer,
  fileTypeFromBlob: () => fileTypeFromBlob,
  FileTypeParser: () => FileTypeParser2
});
import { ReadableStream as WebReadableStream } from "node:stream/web";
import { pipeline, PassThrough, Readable as Readable2 } from "node:stream";
async function fileTypeFromFile(path2, options2) {
  return new FileTypeParser2(options2).fromFile(path2, options2);
}
async function fileTypeFromStream(stream2, options2) {
  return new FileTypeParser2(options2).fromStream(stream2);
}
async function fileTypeStream(readableStream, options2 = {}) {
  return new FileTypeParser2(options2).toDetectionStream(readableStream, options2);
}
var FileTypeParser2;
var init_file_type = __esm(() => {
  init_lib2();
  init_core3();
  init_core3();
  FileTypeParser2 = class FileTypeParser2 extends FileTypeParser {
    async fromStream(stream2) {
      const tokenizer = await (stream2 instanceof WebReadableStream ? fromWebStream(stream2, this.tokenizerOptions) : fromStream2(stream2, this.tokenizerOptions));
      try {
        return await super.fromTokenizer(tokenizer);
      } finally {
        await tokenizer.close();
      }
    }
    async fromFile(path2) {
      const tokenizer = await fromFile(path2);
      try {
        return await super.fromTokenizer(tokenizer);
      } finally {
        await tokenizer.close();
      }
    }
    async toDetectionStream(readableStream, options2 = {}) {
      if (!(readableStream instanceof Readable2)) {
        return super.toDetectionStream(readableStream, options2);
      }
      const { sampleSize = reasonableDetectionSizeInBytes } = options2;
      return new Promise((resolve3, reject) => {
        readableStream.on("error", reject);
        readableStream.once("readable", () => {
          (async () => {
            try {
              const pass = new PassThrough;
              const outputStream = pipeline ? pipeline(readableStream, pass, () => {}) : readableStream.pipe(pass);
              const chunk = readableStream.read(sampleSize) ?? readableStream.read() ?? new Uint8Array(0);
              try {
                pass.fileType = await this.fromBuffer(chunk);
              } catch (error49) {
                if (error49 instanceof EndOfStreamError) {
                  pass.fileType = undefined;
                } else {
                  reject(error49);
                }
              }
              resolve3(outputStream);
            } catch (error49) {
              reject(error49);
            }
          })();
        });
      });
    }
  };
});

// ../../node_modules/.pnpm/cookie@1.1.1/node_modules/cookie/dist/index.js
var require_dist4 = __commonJS((exports2) => {
  Object.defineProperty(exports2, "__esModule", { value: true });
  exports2.parseCookie = parseCookie3;
  exports2.parse = parseCookie3;
  exports2.stringifyCookie = stringifyCookie;
  exports2.stringifySetCookie = stringifySetCookie;
  exports2.serialize = stringifySetCookie;
  exports2.parseSetCookie = parseSetCookie;
  exports2.stringifySetCookie = stringifySetCookie;
  exports2.serialize = stringifySetCookie;
  var cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
  var cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
  var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
  var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
  var maxAgeRegExp = /^-?\d+$/;
  var __toString = Object.prototype.toString;
  var NullObject = /* @__PURE__ */ (() => {
    const C3 = function() {};
    C3.prototype = Object.create(null);
    return C3;
  })();
  function parseCookie3(str, options2) {
    const obj = new NullObject;
    const len = str.length;
    if (len < 2)
      return obj;
    const dec = options2?.decode || decode6;
    let index2 = 0;
    do {
      const eqIdx = eqIndex(str, index2, len);
      if (eqIdx === -1)
        break;
      const endIdx = endIndex(str, index2, len);
      if (eqIdx > endIdx) {
        index2 = str.lastIndexOf(";", eqIdx - 1) + 1;
        continue;
      }
      const key = valueSlice(str, index2, eqIdx);
      if (obj[key] === undefined) {
        obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));
      }
      index2 = endIdx + 1;
    } while (index2 < len);
    return obj;
  }
  function stringifyCookie(cookie2, options2) {
    const enc = options2?.encode || encodeURIComponent;
    const cookieStrings = [];
    for (const name3 of Object.keys(cookie2)) {
      const val = cookie2[name3];
      if (val === undefined)
        continue;
      if (!cookieNameRegExp.test(name3)) {
        throw new TypeError(`cookie name is invalid: ${name3}`);
      }
      const value = enc(val);
      if (!cookieValueRegExp.test(value)) {
        throw new TypeError(`cookie val is invalid: ${val}`);
      }
      cookieStrings.push(`${name3}=${value}`);
    }
    return cookieStrings.join("; ");
  }
  function stringifySetCookie(_name, _val, _opts) {
    const cookie2 = typeof _name === "object" ? _name : { ..._opts, name: _name, value: String(_val) };
    const options2 = typeof _val === "object" ? _val : _opts;
    const enc = options2?.encode || encodeURIComponent;
    if (!cookieNameRegExp.test(cookie2.name)) {
      throw new TypeError(`argument name is invalid: ${cookie2.name}`);
    }
    const value = cookie2.value ? enc(cookie2.value) : "";
    if (!cookieValueRegExp.test(value)) {
      throw new TypeError(`argument val is invalid: ${cookie2.value}`);
    }
    let str = cookie2.name + "=" + value;
    if (cookie2.maxAge !== undefined) {
      if (!Number.isInteger(cookie2.maxAge)) {
        throw new TypeError(`option maxAge is invalid: ${cookie2.maxAge}`);
      }
      str += "; Max-Age=" + cookie2.maxAge;
    }
    if (cookie2.domain) {
      if (!domainValueRegExp.test(cookie2.domain)) {
        throw new TypeError(`option domain is invalid: ${cookie2.domain}`);
      }
      str += "; Domain=" + cookie2.domain;
    }
    if (cookie2.path) {
      if (!pathValueRegExp.test(cookie2.path)) {
        throw new TypeError(`option path is invalid: ${cookie2.path}`);
      }
      str += "; Path=" + cookie2.path;
    }
    if (cookie2.expires) {
      if (!isDate(cookie2.expires) || !Number.isFinite(cookie2.expires.valueOf())) {
        throw new TypeError(`option expires is invalid: ${cookie2.expires}`);
      }
      str += "; Expires=" + cookie2.expires.toUTCString();
    }
    if (cookie2.httpOnly) {
      str += "; HttpOnly";
    }
    if (cookie2.secure) {
      str += "; Secure";
    }
    if (cookie2.partitioned) {
      str += "; Partitioned";
    }
    if (cookie2.priority) {
      const priority = typeof cookie2.priority === "string" ? cookie2.priority.toLowerCase() : undefined;
      switch (priority) {
        case "low":
          str += "; Priority=Low";
          break;
        case "medium":
          str += "; Priority=Medium";
          break;
        case "high":
          str += "; Priority=High";
          break;
        default:
          throw new TypeError(`option priority is invalid: ${cookie2.priority}`);
      }
    }
    if (cookie2.sameSite) {
      const sameSite = typeof cookie2.sameSite === "string" ? cookie2.sameSite.toLowerCase() : cookie2.sameSite;
      switch (sameSite) {
        case true:
        case "strict":
          str += "; SameSite=Strict";
          break;
        case "lax":
          str += "; SameSite=Lax";
          break;
        case "none":
          str += "; SameSite=None";
          break;
        default:
          throw new TypeError(`option sameSite is invalid: ${cookie2.sameSite}`);
      }
    }
    return str;
  }
  function parseSetCookie(str, options2) {
    const dec = options2?.decode || decode6;
    const len = str.length;
    const endIdx = endIndex(str, 0, len);
    const eqIdx = eqIndex(str, 0, endIdx);
    const setCookie2 = eqIdx === -1 ? { name: "", value: dec(valueSlice(str, 0, endIdx)) } : {
      name: valueSlice(str, 0, eqIdx),
      value: dec(valueSlice(str, eqIdx + 1, endIdx))
    };
    let index2 = endIdx + 1;
    while (index2 < len) {
      const endIdx2 = endIndex(str, index2, len);
      const eqIdx2 = eqIndex(str, index2, endIdx2);
      const attr = eqIdx2 === -1 ? valueSlice(str, index2, endIdx2) : valueSlice(str, index2, eqIdx2);
      const val = eqIdx2 === -1 ? undefined : valueSlice(str, eqIdx2 + 1, endIdx2);
      switch (attr.toLowerCase()) {
        case "httponly":
          setCookie2.httpOnly = true;
          break;
        case "secure":
          setCookie2.secure = true;
          break;
        case "partitioned":
          setCookie2.partitioned = true;
          break;
        case "domain":
          setCookie2.domain = val;
          break;
        case "path":
          setCookie2.path = val;
          break;
        case "max-age":
          if (val && maxAgeRegExp.test(val))
            setCookie2.maxAge = Number(val);
          break;
        case "expires":
          if (!val)
            break;
          const date7 = new Date(val);
          if (Number.isFinite(date7.valueOf()))
            setCookie2.expires = date7;
          break;
        case "priority":
          if (!val)
            break;
          const priority = val.toLowerCase();
          if (priority === "low" || priority === "medium" || priority === "high") {
            setCookie2.priority = priority;
          }
          break;
        case "samesite":
          if (!val)
            break;
          const sameSite = val.toLowerCase();
          if (sameSite === "lax" || sameSite === "strict" || sameSite === "none") {
            setCookie2.sameSite = sameSite;
          }
          break;
      }
      index2 = endIdx2 + 1;
    }
    return setCookie2;
  }
  function endIndex(str, min, len) {
    const index2 = str.indexOf(";", min);
    return index2 === -1 ? len : index2;
  }
  function eqIndex(str, min, max) {
    const index2 = str.indexOf("=", min);
    return index2 < max ? index2 : -1;
  }
  function valueSlice(str, min, max) {
    let start = min;
    let end = max;
    do {
      const code2 = str.charCodeAt(start);
      if (code2 !== 32 && code2 !== 9)
        break;
    } while (++start < end);
    while (end > start) {
      const code2 = str.charCodeAt(end - 1);
      if (code2 !== 32 && code2 !== 9)
        break;
      end--;
    }
    return str.slice(start, end);
  }
  function decode6(str) {
    if (str.indexOf("%") === -1)
      return str;
    try {
      return decodeURIComponent(str);
    } catch (e3) {
      return str;
    }
  }
  function isDate(val) {
    return __toString.call(val) === "[object Date]";
  }
});

// ../../node_modules/.pnpm/@aws-sdk+core@3.974.23/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js
var require_account_id_endpoint = __commonJS((exports2) => {
  var { normalizeProvider } = require_client3();
  var DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
  var ACCOUNT_ID_ENDPOINT_MODE_VALUES = ["disabled", "preferred", "required"];
  function validateAccountIdEndpointMode(value) {
    return ACCOUNT_ID_ENDPOINT_MODE_VALUES.includes(value);
  }
  var resolveAccountIdEndpointModeConfig = (input) => {
    const { accountIdEndpointMode } = input;
    const accountIdEndpointModeProvider = normalizeProvider(accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE);
    return Object.assign(input, {
      accountIdEndpointMode: async () => {
        const accIdMode = await accountIdEndpointModeProvider();
        if (!validateAccountIdEndpointMode(accIdMode)) {
          throw new Error(`Invalid value for accountIdEndpointMode: ${accIdMode}. Valid values are: "required", "preferred", "disabled".`);
        }
        return accIdMode;
      }
    });
  };
  var err = "Invalid AccountIdEndpointMode value";
  var _throw = (message2) => {
    throw new Error(message2);
  };
  var ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
  var CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
  var NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS = {
    environmentVariableSelector: (env4) => {
      const value = env4[ENV_ACCOUNT_ID_ENDPOINT_MODE];
      if (value && !validateAccountIdEndpointMode(value)) {
        _throw(err);
      }
      return value;
    },
    configFileSelector: (profile) => {
      const value = profile[CONFIG_ACCOUNT_ID_ENDPOINT_MODE];
      if (value && !validateAccountIdEndpointMode(value)) {
        _throw(err);
      }
      return value;
    },
    default: DEFAULT_ACCOUNT_ID_ENDPOINT_MODE
  };
  exports2.ACCOUNT_ID_ENDPOINT_MODE_VALUES = ACCOUNT_ID_ENDPOINT_MODE_VALUES;
  exports2.CONFIG_ACCOUNT_ID_ENDPOINT_MODE = CONFIG_ACCOUNT_ID_ENDPOINT_MODE;
  exports2.DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = DEFAULT_ACCOUNT_ID_ENDPOINT_MODE;
  exports2.ENV_ACCOUNT_ID_ENDPOINT_MODE = ENV_ACCOUNT_ID_ENDPOINT_MODE;
  exports2.NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS = NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS;
  exports2.resolveAccountIdEndpointModeConfig = resolveAccountIdEndpointModeConfig;
  exports2.validateAccountIdEndpointMode = validateAccountIdEndpointMode;
});

// ../../node_modules/.pnpm/obliterator@1.6.1/node_modules/obliterator/iterator.js
var require_iterator = __commonJS((exports2, module) => {
  function Iterator3(next) {
    Object.defineProperty(this, "_next", {
      writable: false,
      enumerable: false,
      value: next
    });
    this.done = false;
  }
  Iterator3.prototype.next = function() {
    if (this.done)
      return { done: true };
    var step = this._next();
    if (step.done)
      this.done = true;
    return step;
  };
  if (typeof Symbol !== "undefined")
    Iterator3.prototype[Symbol.iterator] = function() {
      return this;
    };
  Iterator3.of = function() {
    var args = arguments, l7 = args.length, i = 0;
    return new Iterator3(function() {
      if (i >= l7)
        return { done: true };
      return { done: false, value: args[i++] };
    });
  };
  Iterator3.empty = function() {
    var iterator = new Iterator3(null);
    iterator.done = true;
    return iterator;
  };
  Iterator3.is = function(value) {
    if (value instanceof Iterator3)
      return true;
    return typeof value === "object" && value !== null && typeof value.next === "function";
  };
  module.exports = Iterator3;
});

// ../../node_modules/.pnpm/obliterator@1.6.1/node_modules/obliterator/foreach.js
var require_foreach = __commonJS((exports2, module) => {
  var ARRAY_BUFFER_SUPPORT = typeof ArrayBuffer !== "undefined";
  var SYMBOL_SUPPORT = typeof Symbol !== "undefined";
  function forEach(iterable, callback) {
    var iterator, k4, i, l7, s3;
    if (!iterable)
      throw new Error("obliterator/forEach: invalid iterable.");
    if (typeof callback !== "function")
      throw new Error("obliterator/forEach: expecting a callback.");
    if (Array.isArray(iterable) || ARRAY_BUFFER_SUPPORT && ArrayBuffer.isView(iterable) || typeof iterable === "string" || iterable.toString() === "[object Arguments]") {
      for (i = 0, l7 = iterable.length;i < l7; i++)
        callback(iterable[i], i);
      return;
    }
    if (typeof iterable.forEach === "function") {
      iterable.forEach(callback);
      return;
    }
    if (SYMBOL_SUPPORT && Symbol.iterator in iterable && typeof iterable.next !== "function") {
      iterable = iterable[Symbol.iterator]();
    }
    if (typeof iterable.next === "function") {
      iterator = iterable;
      i = 0;
      while (s3 = iterator.next(), s3.done !== true) {
        callback(s3.value, i);
        i++;
      }
      return;
    }
    for (k4 in iterable) {
      if (iterable.hasOwnProperty(k4)) {
        callback(iterable[k4], k4);
      }
    }
    return;
  }
  forEach.forEachWithNullKeys = function(iterable, callback) {
    var iterator, k4, i, l7, s3;
    if (!iterable)
      throw new Error("obliterator/forEachWithNullKeys: invalid iterable.");
    if (typeof callback !== "function")
      throw new Error("obliterator/forEachWithNullKeys: expecting a callback.");
    if (Array.isArray(iterable) || ARRAY_BUFFER_SUPPORT && ArrayBuffer.isView(iterable) || typeof iterable === "string" || iterable.toString() === "[object Arguments]") {
      for (i = 0, l7 = iterable.length;i < l7; i++)
        callback(iterable[i], null);
      return;
    }
    if (iterable instanceof Set) {
      iterable.forEach(function(value) {
        callback(value, null);
      });
      return;
    }
    if (typeof iterable.forEach === "function") {
      iterable.forEach(callback);
      return;
    }
    if (SYMBOL_SUPPORT && Symbol.iterator in iterable && typeof iterable.next !== "function") {
      iterable = iterable[Symbol.iterator]();
    }
    if (typeof iterable.next === "function") {
      iterator = iterable;
      i = 0;
      while (s3 = iterator.next(), s3.done !== true) {
        callback(s3.value, null);
        i++;
      }
      return;
    }
    for (k4 in iterable) {
      if (iterable.hasOwnProperty(k4)) {
        callback(iterable[k4], k4);
      }
    }
    return;
  };
  module.exports = forEach;
});

// ../../node_modules/.pnpm/mnemonist@0.38.3/node_modules/mnemonist/utils/typed-arrays.js
var require_typed_arrays = __commonJS((exports2) => {
  var MAX_8BIT_INTEGER = Math.pow(2, 8) - 1;
  var MAX_16BIT_INTEGER = Math.pow(2, 16) - 1;
  var MAX_32BIT_INTEGER = Math.pow(2, 32) - 1;
  var MAX_SIGNED_8BIT_INTEGER = Math.pow(2, 7) - 1;
  var MAX_SIGNED_16BIT_INTEGER = Math.pow(2, 15) - 1;
  var MAX_SIGNED_32BIT_INTEGER = Math.pow(2, 31) - 1;
  exports2.getPointerArray = function(size) {
    var maxIndex = size - 1;
    if (maxIndex <= MAX_8BIT_INTEGER)
      return Uint8Array;
    if (maxIndex <= MAX_16BIT_INTEGER)
      return Uint16Array;
    if (maxIndex <= MAX_32BIT_INTEGER)
      return Uint32Array;
    return Float64Array;
  };
  exports2.getSignedPointerArray = function(size) {
    var maxIndex = size - 1;
    if (maxIndex <= MAX_SIGNED_8BIT_INTEGER)
      return Int8Array;
    if (maxIndex <= MAX_SIGNED_16BIT_INTEGER)
      return Int16Array;
    if (maxIndex <= MAX_SIGNED_32BIT_INTEGER)
      return Int32Array;
    return Float64Array;
  };
  exports2.getNumberType = function(value) {
    if (value === (value | 0)) {
      if (Math.sign(value) === -1) {
        if (value <= 127 && value >= -128)
          return Int8Array;
        if (value <= 32767 && value >= -32768)
          return Int16Array;
        return Int32Array;
      } else {
        if (value <= 255)
          return Uint8Array;
        if (value <= 65535)
          return Uint16Array;
        return Uint32Array;
      }
    }
    return Float64Array;
  };
  var TYPE_PRIORITY = {
    Uint8Array: 1,
    Int8Array: 2,
    Uint16Array: 3,
    Int16Array: 4,
    Uint32Array: 5,
    Int32Array: 6,
    Float32Array: 7,
    Float64Array: 8
  };
  exports2.getMinimalRepresentation = function(array2, getter) {
    var maxType = null, maxPriority = 0, p3, t3, v5, i, l7;
    for (i = 0, l7 = array2.length;i < l7; i++) {
      v5 = getter ? getter(array2[i]) : array2[i];
      t3 = exports2.getNumberType(v5);
      p3 = TYPE_PRIORITY[t3.name];
      if (p3 > maxPriority) {
        maxPriority = p3;
        maxType = t3;
      }
    }
    return maxType;
  };
  exports2.isTypedArray = function(value) {
    return typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView(value);
  };
  exports2.concat = function() {
    var length2 = 0, i, o3, l7;
    for (i = 0, l7 = arguments.length;i < l7; i++)
      length2 += arguments[i].length;
    var array2 = new arguments[0].constructor(length2);
    for (i = 0, o3 = 0;i < l7; i++) {
      array2.set(arguments[i], o3);
      o3 += arguments[i].length;
    }
    return array2;
  };
  exports2.indices = function(length2) {
    var PointerArray = exports2.getPointerArray(length2);
    var array2 = new PointerArray(length2);
    for (var i = 0;i < length2; i++)
      array2[i] = i;
    return array2;
  };
});

// ../../node_modules/.pnpm/mnemonist@0.38.3/node_modules/mnemonist/utils/iterables.js
var require_iterables = __commonJS((exports2) => {
  var forEach = require_foreach();
  var typed = require_typed_arrays();
  function isArrayLike(target) {
    return Array.isArray(target) || typed.isTypedArray(target);
  }
  function guessLength(target) {
    if (typeof target.length === "number")
      return target.length;
    if (typeof target.size === "number")
      return target.size;
    return;
  }
  function toArray(target) {
    var l7 = guessLength(target);
    var array2 = typeof l7 === "number" ? new Array(l7) : [];
    var i = 0;
    forEach(target, function(value) {
      array2[i++] = value;
    });
    return array2;
  }
  function toArrayWithIndices(target) {
    var l7 = guessLength(target);
    var IndexArray = typeof l7 === "number" ? typed.getPointerArray(l7) : Array;
    var array2 = typeof l7 === "number" ? new Array(l7) : [];
    var indices = typeof l7 === "number" ? new IndexArray(l7) : [];
    var i = 0;
    forEach(target, function(value) {
      array2[i] = value;
      indices[i] = i++;
    });
    return [array2, indices];
  }
  exports2.isArrayLike = isArrayLike;
  exports2.guessLength = guessLength;
  exports2.toArray = toArray;
  exports2.toArrayWithIndices = toArrayWithIndices;
});

// ../../node_modules/.pnpm/mnemonist@0.38.3/node_modules/mnemonist/lru-cache.js
var require_lru_cache = __commonJS((exports2, module) => {
  var Iterator3 = require_iterator();
  var forEach = require_foreach();
  var typed = require_typed_arrays();
  var iterables = require_iterables();
  function LRUCache(Keys, Values, capacity) {
    if (arguments.length < 2) {
      capacity = Keys;
      Keys = null;
      Values = null;
    }
    this.capacity = capacity;
    if (typeof this.capacity !== "number" || this.capacity <= 0)
      throw new Error("mnemonist/lru-cache: capacity should be positive number.");
    var PointerArray = typed.getPointerArray(capacity);
    this.forward = new PointerArray(capacity);
    this.backward = new PointerArray(capacity);
    this.K = typeof Keys === "function" ? new Keys(capacity) : new Array(capacity);
    this.V = typeof Values === "function" ? new Values(capacity) : new Array(capacity);
    this.size = 0;
    this.head = 0;
    this.tail = 0;
    this.items = {};
  }
  LRUCache.prototype.clear = function() {
    this.size = 0;
    this.head = 0;
    this.tail = 0;
    this.items = {};
  };
  LRUCache.prototype.splayOnTop = function(pointer2) {
    var oldHead = this.head;
    if (this.head === pointer2)
      return this;
    var previous = this.backward[pointer2], next = this.forward[pointer2];
    if (this.tail === pointer2) {
      this.tail = previous;
    } else {
      this.backward[next] = previous;
    }
    this.forward[previous] = next;
    this.backward[oldHead] = pointer2;
    this.head = pointer2;
    this.forward[pointer2] = oldHead;
    return this;
  };
  LRUCache.prototype.set = function(key, value) {
    var pointer2 = this.items[key];
    if (typeof pointer2 !== "undefined") {
      this.splayOnTop(pointer2);
      this.V[pointer2] = value;
      return;
    }
    if (this.size < this.capacity) {
      pointer2 = this.size++;
    } else {
      pointer2 = this.tail;
      this.tail = this.backward[pointer2];
      delete this.items[this.K[pointer2]];
    }
    this.items[key] = pointer2;
    this.K[pointer2] = key;
    this.V[pointer2] = value;
    this.forward[pointer2] = this.head;
    this.backward[this.head] = pointer2;
    this.head = pointer2;
  };
  LRUCache.prototype.setpop = function(key, value) {
    var oldValue = null;
    var oldKey = null;
    var pointer2 = this.items[key];
    if (typeof pointer2 !== "undefined") {
      this.splayOnTop(pointer2);
      oldValue = this.V[pointer2];
      this.V[pointer2] = value;
      return { evicted: false, key, value: oldValue };
    }
    if (this.size < this.capacity) {
      pointer2 = this.size++;
    } else {
      pointer2 = this.tail;
      this.tail = this.backward[pointer2];
      oldValue = this.V[pointer2];
      oldKey = this.K[pointer2];
      delete this.items[this.K[pointer2]];
    }
    this.items[key] = pointer2;
    this.K[pointer2] = key;
    this.V[pointer2] = value;
    this.forward[pointer2] = this.head;
    this.backward[this.head] = pointer2;
    this.head = pointer2;
    if (oldKey) {
      return { evicted: true, key: oldKey, value: oldValue };
    } else {
      return null;
    }
  };
  LRUCache.prototype.has = function(key) {
    return key in this.items;
  };
  LRUCache.prototype.get = function(key) {
    var pointer2 = this.items[key];
    if (typeof pointer2 === "undefined")
      return;
    this.splayOnTop(pointer2);
    return this.V[pointer2];
  };
  LRUCache.prototype.peek = function(key) {
    var pointer2 = this.items[key];
    if (typeof pointer2 === "undefined")
      return;
    return this.V[pointer2];
  };
  LRUCache.prototype.forEach = function(callback, scope) {
    scope = arguments.length > 1 ? scope : this;
    var i = 0, l7 = this.size;
    var pointer2 = this.head, keys = this.K, values = this.V, forward = this.forward;
    while (i < l7) {
      callback.call(scope, values[pointer2], keys[pointer2], this);
      pointer2 = forward[pointer2];
      i++;
    }
  };
  LRUCache.prototype.keys = function() {
    var i = 0, l7 = this.size;
    var pointer2 = this.head, keys = this.K, forward = this.forward;
    return new Iterator3(function() {
      if (i >= l7)
        return { done: true };
      var key = keys[pointer2];
      i++;
      if (i < l7)
        pointer2 = forward[pointer2];
      return {
        done: false,
        value: key
      };
    });
  };
  LRUCache.prototype.values = function() {
    var i = 0, l7 = this.size;
    var pointer2 = this.head, values = this.V, forward = this.forward;
    return new Iterator3(function() {
      if (i >= l7)
        return { done: true };
      var value = values[pointer2];
      i++;
      if (i < l7)
        pointer2 = forward[pointer2];
      return {
        done: false,
        value
      };
    });
  };
  LRUCache.prototype.entries = function() {
    var i = 0, l7 = this.size;
    var pointer2 = this.head, keys = this.K, values = this.V, forward = this.forward;
    return new Iterator3(function() {
      if (i >= l7)
        return { done: true };
      var key = keys[pointer2], value = values[pointer2];
      i++;
      if (i < l7)
        pointer2 = forward[pointer2];
      return {
        done: false,
        value: [key, value]
      };
    });
  };
  if (typeof Symbol !== "undefined")
    LRUCache.prototype[Symbol.iterator] = LRUCache.prototype.entries;
  LRUCache.prototype.inspect = function() {
    var proxy = new Map;
    var iterator = this.entries(), step;
    while (step = iterator.next(), !step.done)
      proxy.set(step.value[0], step.value[1]);
    Object.defineProperty(proxy, "constructor", {
      value: LRUCache,
      enumerable: false
    });
    return proxy;
  };
  if (typeof Symbol !== "undefined")
    LRUCache.prototype[Symbol.for("nodejs.util.inspect.custom")] = LRUCache.prototype.inspect;
  LRUCache.from = function(iterable, Keys, Values, capacity) {
    if (arguments.length < 2) {
      capacity = iterables.guessLength(iterable);
      if (typeof capacity !== "number")
        throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.");
    } else if (arguments.length === 2) {
      capacity = Keys;
      Keys = null;
      Values = null;
    }
    var cache2 = new LRUCache(Keys, Values, capacity);
    forEach(iterable, function(value, key) {
      cache2.set(key, value);
    });
    return cache2;
  };
  module.exports = LRUCache;
});

// ../../node_modules/.pnpm/@aws-sdk+endpoint-cache@3.972.8/node_modules/@aws-sdk/endpoint-cache/dist-cjs/index.js
var require_dist_cjs63 = __commonJS((exports2) => {
  var LRUCache = require_lru_cache();

  class EndpointCache {
    cache;
    constructor(capacity) {
      this.cache = new LRUCache(capacity);
    }
    getEndpoint(key) {
      const endpointsWithExpiry = this.get(key);
      if (!endpointsWithExpiry || endpointsWithExpiry.length === 0) {
        return;
      }
      const endpoints = endpointsWithExpiry.map((endpoint) => endpoint.Address);
      return endpoints[Math.floor(Math.random() * endpoints.length)];
    }
    get(key) {
      if (!this.has(key)) {
        return;
      }
      const value = this.cache.get(key);
      if (!value) {
        return;
      }
      const now = Date.now();
      const endpointsWithExpiry = value.filter((endpoint) => now < endpoint.Expires);
      if (endpointsWithExpiry.length === 0) {
        this.delete(key);
        return;
      }
      return endpointsWithExpiry;
    }
    set(key, endpoints) {
      const now = Date.now();
      this.cache.set(key, endpoints.map(({ Address, CachePeriodInMinutes }) => ({
        Address,
        Expires: now + CachePeriodInMinutes * 60 * 1000
      })));
    }
    delete(key) {
      this.cache.set(key, []);
    }
    has(key) {
      if (!this.cache.has(key)) {
        return false;
      }
      const endpoints = this.cache.peek(key);
      if (!endpoints) {
        return false;
      }
      return endpoints.length > 0;
    }
    clear() {
      this.cache.clear();
    }
  }
  exports2.EndpointCache = EndpointCache;
});

// ../../node_modules/.pnpm/@aws-sdk+middleware-endpoint-discovery@3.972.19/node_modules/@aws-sdk/middleware-endpoint-discovery/dist-cjs/index.js
var require_dist_cjs64 = __commonJS((exports2) => {
  var { HttpRequest } = require_protocols();
  var { EndpointCache } = require_dist_cjs63();
  var ENV_ENDPOINT_DISCOVERY = ["AWS_ENABLE_ENDPOINT_DISCOVERY", "AWS_ENDPOINT_DISCOVERY_ENABLED"];
  var CONFIG_ENDPOINT_DISCOVERY = "endpoint_discovery_enabled";
  var isFalsy = (value) => ["false", "0"].indexOf(value) >= 0;
  var NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS = {
    environmentVariableSelector: (env4) => {
      for (let i = 0;i < ENV_ENDPOINT_DISCOVERY.length; i++) {
        const envKey = ENV_ENDPOINT_DISCOVERY[i];
        if (envKey in env4) {
          const value = env4[envKey];
          if (value === "") {
            throw Error(`Environment variable ${envKey} can't be empty of undefined, got "${value}"`);
          }
          return !isFalsy(value);
        }
      }
    },
    configFileSelector: (profile) => {
      if (CONFIG_ENDPOINT_DISCOVERY in profile) {
        const value = profile[CONFIG_ENDPOINT_DISCOVERY];
        if (value === undefined) {
          throw Error(`Shared config entry ${CONFIG_ENDPOINT_DISCOVERY} can't be undefined, got "${value}"`);
        }
        return !isFalsy(value);
      }
    },
    default: undefined
  };
  var getCacheKey = async (commandName, config2, options2) => {
    const { accessKeyId } = await config2.credentials();
    const { identifiers } = options2;
    return JSON.stringify({
      ...accessKeyId && { accessKeyId },
      ...identifiers && {
        commandName,
        identifiers: Object.entries(identifiers).sort().reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {})
      }
    });
  };
  var requestQueue = {};
  var updateDiscoveredEndpointInCache = async (config2, options2) => new Promise((resolve3, reject) => {
    const { endpointCache } = config2;
    const { cacheKey, commandName, identifiers } = options2;
    const endpoints = endpointCache.get(cacheKey);
    if (endpoints && endpoints.length === 1 && endpoints[0].Address === "") {
      if (options2.isDiscoveredEndpointRequired) {
        if (!requestQueue[cacheKey])
          requestQueue[cacheKey] = [];
        requestQueue[cacheKey].push({ resolve: resolve3, reject });
      } else {
        resolve3();
      }
    } else if (endpoints && endpoints.length > 0) {
      resolve3();
    } else {
      const placeholderEndpoints = [{ Address: "", CachePeriodInMinutes: 1 }];
      endpointCache.set(cacheKey, placeholderEndpoints);
      const command = new options2.endpointDiscoveryCommandCtor({
        Operation: commandName.slice(0, -7),
        Identifiers: identifiers
      });
      const handler2 = command.resolveMiddleware(options2.clientStack, config2, options2.options);
      handler2(command).then((result) => {
        endpointCache.set(cacheKey, result.output.Endpoints);
        if (requestQueue[cacheKey]) {
          requestQueue[cacheKey].forEach(({ resolve: resolve4 }) => {
            resolve4();
          });
          delete requestQueue[cacheKey];
        }
        resolve3();
      }).catch((error49) => {
        endpointCache.delete(cacheKey);
        const errorToThrow = Object.assign(new Error(`The operation to discover endpoint failed.` + ` Please retry, or provide a custom endpoint and disable endpoint discovery to proceed.`), { reason: error49 });
        if (requestQueue[cacheKey]) {
          requestQueue[cacheKey].forEach(({ reject: reject2 }) => {
            reject2(errorToThrow);
          });
          delete requestQueue[cacheKey];
        }
        if (options2.isDiscoveredEndpointRequired) {
          reject(errorToThrow);
        } else {
          endpointCache.set(cacheKey, placeholderEndpoints);
          resolve3();
        }
      });
    }
  });
  var endpointDiscoveryMiddleware = (config2, middlewareConfig) => (next, context10) => async (args) => {
    if (config2.isCustomEndpoint) {
      if (config2.isClientEndpointDiscoveryEnabled) {
        throw new Error(`Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.`);
      }
      return next(args);
    }
    const { endpointDiscoveryCommandCtor } = config2;
    const { isDiscoveredEndpointRequired, identifiers } = middlewareConfig;
    const clientName = context10.clientName;
    const commandName = context10.commandName;
    const isEndpointDiscoveryEnabled = await config2.endpointDiscoveryEnabled();
    const cacheKey = await getCacheKey(commandName, config2, { identifiers });
    if (isDiscoveredEndpointRequired) {
      if (isEndpointDiscoveryEnabled === false) {
        throw new Error(`Endpoint Discovery is disabled but ${commandName} on ${clientName} requires it.` + ` Please check your configurations.`);
      }
      await updateDiscoveredEndpointInCache(config2, {
        ...middlewareConfig,
        commandName,
        cacheKey,
        endpointDiscoveryCommandCtor
      });
    } else if (isEndpointDiscoveryEnabled) {
      updateDiscoveredEndpointInCache(config2, {
        ...middlewareConfig,
        commandName,
        cacheKey,
        endpointDiscoveryCommandCtor
      });
    }
    const { request: request2 } = args;
    if (cacheKey && HttpRequest.isInstance(request2)) {
      const endpoint = config2.endpointCache.getEndpoint(cacheKey);
      if (endpoint) {
        request2.hostname = endpoint;
      }
    }
    return next(args);
  };
  var endpointDiscoveryMiddlewareOptions = {
    name: "endpointDiscoveryMiddleware",
    step: "build",
    tags: ["ENDPOINT_DISCOVERY"],
    override: true
  };
  var getEndpointDiscoveryPlugin = (pluginConfig, middlewareConfig) => ({
    applyToStack: (commandStack) => {
      commandStack.add(endpointDiscoveryMiddleware(pluginConfig, middlewareConfig), endpointDiscoveryMiddlewareOptions);
    }
  });
  var getEndpointDiscoveryRequiredPlugin = (pluginConfig, middlewareConfig) => ({
    applyToStack: (commandStack) => {
      commandStack.add(endpointDiscoveryMiddleware(pluginConfig, { ...middlewareConfig, isDiscoveredEndpointRequired: true }), endpointDiscoveryMiddlewareOptions);
    }
  });
  var getEndpointDiscoveryOptionalPlugin = (pluginConfig, middlewareConfig) => ({
    applyToStack: (commandStack) => {
      commandStack.add(endpointDiscoveryMiddleware(pluginConfig, { ...middlewareConfig, isDiscoveredEndpointRequired: false }), endpointDiscoveryMiddlewareOptions);
    }
  });
  var resolveEndpointDiscoveryConfig = (input, { endpointDiscoveryCommandCtor }) => {
    const { endpointCacheSize, endpointDiscoveryEnabled, endpointDiscoveryEnabledProvider } = input;
    return Object.assign(input, {
      endpointDiscoveryCommandCtor,
      endpointCache: new EndpointCache(endpointCacheSize ?? 1000),
      endpointDiscoveryEnabled: endpointDiscoveryEnabled !== undefined ? () => Promise.resolve(endpointDiscoveryEnabled) : endpointDiscoveryEnabledProvider,
      isClientEndpointDiscoveryEnabled: endpointDiscoveryEnabled !== undefined
    });
  };
  exports2.NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS = NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS;
  exports2.endpointDiscoveryMiddlewareOptions = endpointDiscoveryMiddlewareOptions;
  exports2.getEndpointDiscoveryOptionalPlugin = getEndpointDiscoveryOptionalPlugin;
  exports2.getEndpointDiscoveryPlugin = getEndpointDiscoveryPlugin;
  exports2.getEndpointDiscoveryRequiredPlugin = getEndpointDiscoveryRequiredPlugin;
  exports2.resolveEndpointDiscoveryConfig = resolveEndpointDiscoveryConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider8 = __commonJS((exports2) => {
  var { resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { getSmithyContext, normalizeProvider } = require_client3();
  exports2.defaultDynamoDBHttpAuthSchemeParametersProvider = async (config2, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config2.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "dynamodb",
        region: authParameters.region
      },
      propertiesExtractor: (config2, context10) => ({
        signingProperties: {
          config: config2,
          context: context10
        }
      })
    };
  }
  exports2.defaultDynamoDBHttpAuthSchemeProvider = (authParameters) => {
    const options2 = [];
    switch (authParameters.operation) {
      default: {
        options2.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options2;
  };
  exports2.resolveHttpAuthSchemeConfig = (config2) => {
    const config_0 = resolveAwsSdkSigV4Config(config2);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config2.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/models/DynamoDBServiceException.js
var require_DynamoDBServiceException = __commonJS((exports2) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports2.__ServiceException = __ServiceException;
  exports2.DynamoDBServiceException = class DynamoDBServiceException extends __ServiceException {
    constructor(options2) {
      super(options2);
      Object.setPrototypeOf(this, DynamoDBServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/models/errors.js
var require_errors9 = __commonJS((exports2) => {
  var { DynamoDBServiceException: __BaseException } = require_DynamoDBServiceException();
  exports2.BackupInUseException = class BackupInUseException extends __BaseException {
    name = "BackupInUseException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "BackupInUseException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, BackupInUseException.prototype);
    }
  };
  exports2.BackupNotFoundException = class BackupNotFoundException extends __BaseException {
    name = "BackupNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "BackupNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, BackupNotFoundException.prototype);
    }
  };
  exports2.InternalServerError = class InternalServerError2 extends __BaseException {
    name = "InternalServerError";
    $fault = "server";
    constructor(opts) {
      super({
        name: "InternalServerError",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InternalServerError2.prototype);
    }
  };
  exports2.RequestLimitExceeded = class RequestLimitExceeded extends __BaseException {
    name = "RequestLimitExceeded";
    $fault = "client";
    ThrottlingReasons;
    constructor(opts) {
      super({
        name: "RequestLimitExceeded",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RequestLimitExceeded.prototype);
      this.ThrottlingReasons = opts.ThrottlingReasons;
    }
  };
  exports2.ThrottlingException = class ThrottlingException extends __BaseException {
    name = "ThrottlingException";
    $fault = "client";
    throttlingReasons;
    constructor(opts) {
      super({
        name: "ThrottlingException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ThrottlingException.prototype);
      this.throttlingReasons = opts.throttlingReasons;
    }
  };
  exports2.InvalidEndpointException = class InvalidEndpointException extends __BaseException {
    name = "InvalidEndpointException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "InvalidEndpointException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidEndpointException.prototype);
      this.Message = opts.Message;
    }
  };
  exports2.ProvisionedThroughputExceededException = class ProvisionedThroughputExceededException extends __BaseException {
    name = "ProvisionedThroughputExceededException";
    $fault = "client";
    ThrottlingReasons;
    constructor(opts) {
      super({
        name: "ProvisionedThroughputExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ProvisionedThroughputExceededException.prototype);
      this.ThrottlingReasons = opts.ThrottlingReasons;
    }
  };
  exports2.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
    name = "ResourceNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ResourceNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
    }
  };
  exports2.ItemCollectionSizeLimitExceededException = class ItemCollectionSizeLimitExceededException extends __BaseException {
    name = "ItemCollectionSizeLimitExceededException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ItemCollectionSizeLimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ItemCollectionSizeLimitExceededException.prototype);
    }
  };
  exports2.ReplicatedWriteConflictException = class ReplicatedWriteConflictException extends __BaseException {
    name = "ReplicatedWriteConflictException";
    $fault = "client";
    $retryable = {};
    constructor(opts) {
      super({
        name: "ReplicatedWriteConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ReplicatedWriteConflictException.prototype);
    }
  };
  exports2.ContinuousBackupsUnavailableException = class ContinuousBackupsUnavailableException extends __BaseException {
    name = "ContinuousBackupsUnavailableException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ContinuousBackupsUnavailableException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ContinuousBackupsUnavailableException.prototype);
    }
  };
  exports2.LimitExceededException = class LimitExceededException extends __BaseException {
    name = "LimitExceededException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "LimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, LimitExceededException.prototype);
    }
  };
  exports2.TableInUseException = class TableInUseException extends __BaseException {
    name = "TableInUseException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TableInUseException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TableInUseException.prototype);
    }
  };
  exports2.TableNotFoundException = class TableNotFoundException extends __BaseException {
    name = "TableNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TableNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TableNotFoundException.prototype);
    }
  };
  exports2.GlobalTableAlreadyExistsException = class GlobalTableAlreadyExistsException extends __BaseException {
    name = "GlobalTableAlreadyExistsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "GlobalTableAlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, GlobalTableAlreadyExistsException.prototype);
    }
  };
  exports2.ResourceInUseException = class ResourceInUseException extends __BaseException {
    name = "ResourceInUseException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ResourceInUseException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceInUseException.prototype);
    }
  };
  exports2.TransactionConflictException = class TransactionConflictException extends __BaseException {
    name = "TransactionConflictException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TransactionConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TransactionConflictException.prototype);
    }
  };
  exports2.PolicyNotFoundException = class PolicyNotFoundException extends __BaseException {
    name = "PolicyNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "PolicyNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PolicyNotFoundException.prototype);
    }
  };
  exports2.ExportNotFoundException = class ExportNotFoundException extends __BaseException {
    name = "ExportNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ExportNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExportNotFoundException.prototype);
    }
  };
  exports2.GlobalTableNotFoundException = class GlobalTableNotFoundException extends __BaseException {
    name = "GlobalTableNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "GlobalTableNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, GlobalTableNotFoundException.prototype);
    }
  };
  exports2.ImportNotFoundException = class ImportNotFoundException extends __BaseException {
    name = "ImportNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ImportNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ImportNotFoundException.prototype);
    }
  };
  exports2.DuplicateItemException = class DuplicateItemException extends __BaseException {
    name = "DuplicateItemException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "DuplicateItemException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, DuplicateItemException.prototype);
    }
  };
  exports2.IdempotentParameterMismatchException = class IdempotentParameterMismatchException extends __BaseException {
    name = "IdempotentParameterMismatchException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "IdempotentParameterMismatchException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype);
      this.Message = opts.Message;
    }
  };
  exports2.TransactionInProgressException = class TransactionInProgressException extends __BaseException {
    name = "TransactionInProgressException";
    $fault = "client";
    Message;
    constructor(opts) {
      super({
        name: "TransactionInProgressException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TransactionInProgressException.prototype);
      this.Message = opts.Message;
    }
  };
  exports2.ExportConflictException = class ExportConflictException extends __BaseException {
    name = "ExportConflictException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ExportConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ExportConflictException.prototype);
    }
  };
  exports2.InvalidExportTimeException = class InvalidExportTimeException extends __BaseException {
    name = "InvalidExportTimeException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidExportTimeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidExportTimeException.prototype);
    }
  };
  exports2.PointInTimeRecoveryUnavailableException = class PointInTimeRecoveryUnavailableException extends __BaseException {
    name = "PointInTimeRecoveryUnavailableException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "PointInTimeRecoveryUnavailableException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PointInTimeRecoveryUnavailableException.prototype);
    }
  };
  exports2.ImportConflictException = class ImportConflictException extends __BaseException {
    name = "ImportConflictException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ImportConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ImportConflictException.prototype);
    }
  };
  exports2.TableAlreadyExistsException = class TableAlreadyExistsException extends __BaseException {
    name = "TableAlreadyExistsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "TableAlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TableAlreadyExistsException.prototype);
    }
  };
  exports2.InvalidRestoreTimeException = class InvalidRestoreTimeException extends __BaseException {
    name = "InvalidRestoreTimeException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "InvalidRestoreTimeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidRestoreTimeException.prototype);
    }
  };
  exports2.ReplicaAlreadyExistsException = class ReplicaAlreadyExistsException extends __BaseException {
    name = "ReplicaAlreadyExistsException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ReplicaAlreadyExistsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ReplicaAlreadyExistsException.prototype);
    }
  };
  exports2.ReplicaNotFoundException = class ReplicaNotFoundException extends __BaseException {
    name = "ReplicaNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "ReplicaNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ReplicaNotFoundException.prototype);
    }
  };
  exports2.IndexNotFoundException = class IndexNotFoundException extends __BaseException {
    name = "IndexNotFoundException";
    $fault = "client";
    constructor(opts) {
      super({
        name: "IndexNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, IndexNotFoundException.prototype);
    }
  };
  exports2.ConditionalCheckFailedException = class ConditionalCheckFailedException extends __BaseException {
    name = "ConditionalCheckFailedException";
    $fault = "client";
    Item;
    constructor(opts) {
      super({
        name: "ConditionalCheckFailedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ConditionalCheckFailedException.prototype);
      this.Item = opts.Item;
    }
  };
  exports2.TransactionCanceledException = class TransactionCanceledException extends __BaseException {
    name = "TransactionCanceledException";
    $fault = "client";
    Message;
    CancellationReasons;
    constructor(opts) {
      super({
        name: "TransactionCanceledException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TransactionCanceledException.prototype);
      this.Message = opts.Message;
      this.CancellationReasons = opts.CancellationReasons;
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/schemas/schemas_0.js
var require_schemas_08 = __commonJS((exports2) => {
  var _A = "Action";
  var _ABA = "ArchivalBackupArn";
  var _ACDTP = "ApproximateCreationDateTimePrecision";
  var _AD = "AttributeDefinition";
  var _ADT = "ArchivalDateTime";
  var _ADt = "AttributeDefinitions";
  var _AM = "AttributeMap";
  var _AMRCU = "AccountMaxReadCapacityUnits";
  var _AMWCU = "AccountMaxWriteCapacityUnits";
  var _AN = "AttributeName";
  var _AR = "ArchivalReason";
  var _AS = "ArchivalSummary";
  var _ASD = "AutoScalingDisabled";
  var _ASPD = "AutoScalingPolicyDescription";
  var _ASPDL = "AutoScalingPolicyDescriptionList";
  var _ASPU = "AutoScalingPolicyUpdate";
  var _ASRA = "AutoScalingRoleArn";
  var _ASSD = "AutoScalingSettingsDescription";
  var _ASSU = "AutoScalingSettingsUpdate";
  var _ASTTSPCD = "AutoScalingTargetTrackingScalingPolicyConfigurationDescription";
  var _ASTTSPCU = "AutoScalingTargetTrackingScalingPolicyConfigurationUpdate";
  var _AT = "AttributeType";
  var _ATG = "AttributesToGet";
  var _AU = "AttributeUpdates";
  var _AV = "AttributeValue";
  var _AVL = "AttributeValueList";
  var _AVU = "AttributeValueUpdate";
  var _Ad = "Address";
  var _At = "Attributes";
  var _B = "Backfilling";
  var _BA = "BackupArn";
  var _BCDT = "BackupCreationDateTime";
  var _BD = "BackupDescription";
  var _BDa = "BackupDetails";
  var _BEDT = "BackupExpiryDateTime";
  var _BES = "BatchExecuteStatement";
  var _BESI = "BatchExecuteStatementInput";
  var _BESO = "BatchExecuteStatementOutput";
  var _BGI = "BatchGetItem";
  var _BGII = "BatchGetItemInput";
  var _BGIO = "BatchGetItemOutput";
  var _BGRM = "BatchGetResponseMap";
  var _BGRMa = "BatchGetRequestMap";
  var _BIUE = "BackupInUseException";
  var _BM = "BillingMode";
  var _BMO = "BillingModeOverride";
  var _BMS = "BillingModeSummary";
  var _BN = "BackupName";
  var _BNFE = "BackupNotFoundException";
  var _BOOL = "BOOL";
  var _BS = "BackupStatus";
  var _BSB = "BackupSizeBytes";
  var _BSBi = "BilledSizeBytes";
  var _BSE = "BatchStatementError";
  var _BSR = "BatchStatementRequest";
  var _BSRa = "BatchStatementResponse";
  var _BS_ = "BS";
  var _BSa = "BackupSummary";
  var _BSac = "BackupSummaries";
  var _BT = "BackupType";
  var _BWI = "BatchWriteItem";
  var _BWII = "BatchWriteItemInput";
  var _BWIO = "BatchWriteItemOutput";
  var _BWIRM = "BatchWriteItemRequestMap";
  var _B_ = "B";
  var _C = "Code";
  var _CB = "CreateBackup";
  var _CBD = "ContinuousBackupsDescription";
  var _CBI = "CreateBackupInput";
  var _CBO = "CreateBackupOutput";
  var _CBS = "ContinuousBackupsStatus";
  var _CBUE = "ContinuousBackupsUnavailableException";
  var _CC = "ConsumedCapacity";
  var _CCFE = "ConditionalCheckFailedException";
  var _CCM = "ConsumedCapacityMultiple";
  var _CCo = "ConditionCheck";
  var _CDT = "CreationDateTime";
  var _CE = "ConditionExpression";
  var _CGSIA = "CreateGlobalSecondaryIndexAction";
  var _CGT = "CreateGlobalTable";
  var _CGTI = "CreateGlobalTableInput";
  var _CGTO = "CreateGlobalTableOutput";
  var _CGTWGMA = "CreateGlobalTableWitnessGroupMemberAction";
  var _CIA = "ContributorInsightsAction";
  var _CIM = "ContributorInsightsMode";
  var _CIRL = "ContributorInsightsRuleList";
  var _CIS = "ContributorInsightsSummary";
  var _CISo = "ContributorInsightsStatus";
  var _CISon = "ContributorInsightsSummaries";
  var _CO = "ComparisonOperator";
  var _COo = "ConditionalOperator";
  var _COs = "CsvOptions";
  var _CPIM = "CachePeriodInMinutes";
  var _CR = "CancellationReasons";
  var _CRA = "CreateReplicaAction";
  var _CRGMA = "CreateReplicationGroupMemberAction";
  var _CRL = "CancellationReasonList";
  var _CRSRA = "ConfirmRemoveSelfResourceAccess";
  var _CRT = "ClientRequestToken";
  var _CRa = "CancellationReason";
  var _CRo = "ConsistentRead";
  var _CT = "ClientToken";
  var _CTI = "CreateTableInput";
  var _CTO = "CreateTableOutput";
  var _CTr = "CreateTable";
  var _CU = "CapacityUnits";
  var _CWLGA = "CloudWatchLogGroupArn";
  var _Ca = "Capacity";
  var _Co = "Condition";
  var _Cou = "Count";
  var _Cr = "Create";
  var _Cs = "Csv";
  var _D = "Delimiter";
  var _DB = "DeleteBackup";
  var _DBI = "DeleteBackupInput";
  var _DBIe = "DescribeBackupInput";
  var _DBO = "DeleteBackupOutput";
  var _DBOe = "DescribeBackupOutput";
  var _DBe = "DescribeBackup";
  var _DCB = "DescribeContinuousBackups";
  var _DCBI = "DescribeContinuousBackupsInput";
  var _DCBO = "DescribeContinuousBackupsOutput";
  var _DCI = "DescribeContributorInsights";
  var _DCII = "DescribeContributorInsightsInput";
  var _DCIO = "DescribeContributorInsightsOutput";
  var _DE = "DescribeEndpoints";
  var _DEI = "DescribeExportInput";
  var _DEO = "DescribeExportOutput";
  var _DER = "DescribeEndpointsRequest";
  var _DERe = "DescribeEndpointsResponse";
  var _DEe = "DescribeExport";
  var _DGSIA = "DeleteGlobalSecondaryIndexAction";
  var _DGT = "DescribeGlobalTable";
  var _DGTI = "DescribeGlobalTableInput";
  var _DGTO = "DescribeGlobalTableOutput";
  var _DGTS = "DescribeGlobalTableSettings";
  var _DGTSI = "DescribeGlobalTableSettingsInput";
  var _DGTSO = "DescribeGlobalTableSettingsOutput";
  var _DGTWGMA = "DeleteGlobalTableWitnessGroupMemberAction";
  var _DI = "DeleteItem";
  var _DIE = "DuplicateItemException";
  var _DII = "DeleteItemInput";
  var _DIIe = "DescribeImportInput";
  var _DIO = "DeleteItemOutput";
  var _DIOe = "DescribeImportOutput";
  var _DIe = "DescribeImport";
  var _DKSD = "DescribeKinesisStreamingDestination";
  var _DKSDI = "DescribeKinesisStreamingDestinationInput";
  var _DKSDO = "DescribeKinesisStreamingDestinationOutput";
  var _DKSDi = "DisableKinesisStreamingDestination";
  var _DL = "DescribeLimits";
  var _DLI = "DescribeLimitsInput";
  var _DLO = "DescribeLimitsOutput";
  var _DPE = "DeletionProtectionEnabled";
  var _DR = "DeleteRequest";
  var _DRA = "DeleteReplicaAction";
  var _DRGMA = "DeleteReplicationGroupMemberAction";
  var _DRP = "DeleteResourcePolicy";
  var _DRPI = "DeleteResourcePolicyInput";
  var _DRPO = "DeleteResourcePolicyOutput";
  var _DS = "DestinationStatus";
  var _DSD = "DestinationStatusDescription";
  var _DSI = "DisableScaleIn";
  var _DT = "DeleteTable";
  var _DTI = "DeleteTableInput";
  var _DTIe = "DescribeTableInput";
  var _DTO = "DeleteTableOutput";
  var _DTOe = "DescribeTableOutput";
  var _DTRAS = "DescribeTableReplicaAutoScaling";
  var _DTRASI = "DescribeTableReplicaAutoScalingInput";
  var _DTRASO = "DescribeTableReplicaAutoScalingOutput";
  var _DTTL = "DescribeTimeToLive";
  var _DTTLI = "DescribeTimeToLiveInput";
  var _DTTLO = "DescribeTimeToLiveOutput";
  var _DTe = "DescribeTable";
  var _De = "Delete";
  var _E = "Error";
  var _EA = "ExportArn";
  var _EAM = "ExpectedAttributeMap";
  var _EAN = "ExpressionAttributeNames";
  var _EAV = "ExpressionAttributeValues";
  var _EAVM = "ExpressionAttributeValueMap";
  var _EAVx = "ExpectedAttributeValue";
  var _EC = "ErrorCount";
  var _ECE = "ExportConflictException";
  var _ED = "ExportDescription";
  var _EDx = "ExceptionDescription";
  var _EF = "ExportFormat";
  var _EFT = "ExportFromTime";
  var _EKSC = "EnableKinesisStreamingConfiguration";
  var _EKSD = "EnableKinesisStreamingDestination";
  var _EM = "ExportManifest";
  var _EN = "ExceptionName";
  var _ENFE = "ExportNotFoundException";
  var _ERDT = "EarliestRestorableDateTime";
  var _ERI = "ExpectedRevisionId";
  var _ES = "ExportStatus";
  var _ESBA = "ExclusiveStartBackupArn";
  var _ESGTN = "ExclusiveStartGlobalTableName";
  var _ESI = "ExecuteStatementInput";
  var _ESK = "ExclusiveStartKey";
  var _ESO = "ExecuteStatementOutput";
  var _ESTN = "ExclusiveStartTableName";
  var _ESx = "ExportSummary";
  var _ESxe = "ExecuteStatement";
  var _ESxp = "ExportSummaries";
  var _ET = "EndTime";
  var _ETI = "ExecuteTransactionInput";
  var _ETO = "ExecuteTransactionOutput";
  var _ETT = "ExportToTime";
  var _ETTPIT = "ExportTableToPointInTime";
  var _ETTPITI = "ExportTableToPointInTimeInput";
  var _ETTPITO = "ExportTableToPointInTimeOutput";
  var _ETx = "ExportTime";
  var _ETxe = "ExecuteTransaction";
  var _ETxp = "ExportType";
  var _EVT = "ExportViewType";
  var _En = "Endpoints";
  var _Ena = "Enabled";
  var _End = "Endpoint";
  var _Ex = "Expected";
  var _Exi = "Exists";
  var _FC = "FailureCode";
  var _FCM = "FilterConditionMap";
  var _FE = "FailureException";
  var _FEi = "FilterExpression";
  var _FM = "FailureMessage";
  var _G = "Get";
  var _GI = "GetItem";
  var _GII = "GetItemInput";
  var _GIO = "GetItemOutput";
  var _GRP = "GetResourcePolicy";
  var _GRPI = "GetResourcePolicyInput";
  var _GRPO = "GetResourcePolicyOutput";
  var _GSI = "GlobalSecondaryIndexes";
  var _GSIASU = "GlobalSecondaryIndexAutoScalingUpdate";
  var _GSIASUL = "GlobalSecondaryIndexAutoScalingUpdateList";
  var _GSID = "GlobalSecondaryIndexDescription";
  var _GSIDL = "GlobalSecondaryIndexDescriptionList";
  var _GSII = "GlobalSecondaryIndexInfo";
  var _GSIL = "GlobalSecondaryIndexList";
  var _GSIO = "GlobalSecondaryIndexOverride";
  var _GSIU = "GlobalSecondaryIndexUpdate";
  var _GSIUL = "GlobalSecondaryIndexUpdateList";
  var _GSIUl = "GlobalSecondaryIndexUpdates";
  var _GSIWTD = "GlobalSecondaryIndexWarmThroughputDescription";
  var _GSIl = "GlobalSecondaryIndex";
  var _GT = "GlobalTable";
  var _GTA = "GlobalTableArn";
  var _GTAEE = "GlobalTableAlreadyExistsException";
  var _GTBM = "GlobalTableBillingMode";
  var _GTD = "GlobalTableDescription";
  var _GTGSISU = "GlobalTableGlobalSecondaryIndexSettingsUpdate";
  var _GTGSISUL = "GlobalTableGlobalSecondaryIndexSettingsUpdateList";
  var _GTL = "GlobalTableList";
  var _GTN = "GlobalTableName";
  var _GTNFE = "GlobalTableNotFoundException";
  var _GTPWCASSU = "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate";
  var _GTPWCU = "GlobalTableProvisionedWriteCapacityUnits";
  var _GTS = "GlobalTableStatus";
  var _GTSA = "GlobalTableSourceArn";
  var _GTSRM = "GlobalTableSettingsReplicationMode";
  var _GTV = "GlobalTableVersion";
  var _GTW = "GlobalTableWitnesses";
  var _GTWD = "GlobalTableWitnessDescription";
  var _GTWDL = "GlobalTableWitnessDescriptionList";
  var _GTWGU = "GlobalTableWitnessGroupUpdate";
  var _GTWGUL = "GlobalTableWitnessGroupUpdateList";
  var _GTWU = "GlobalTableWitnessUpdates";
  var _GTl = "GlobalTables";
  var _HL = "HeaderList";
  var _I = "Item";
  var _IA = "ImportArn";
  var _IAn = "IndexArn";
  var _IC = "ItemCount";
  var _ICE = "ImportConflictException";
  var _ICK = "ItemCollectionKey";
  var _ICKAM = "ItemCollectionKeyAttributeMap";
  var _ICM = "ItemCollectionMetrics";
  var _ICMM = "ItemCollectionMetricsMultiple";
  var _ICMPT = "ItemCollectionMetricsPerTable";
  var _ICSLEE = "ItemCollectionSizeLimitExceededException";
  var _ICT = "InputCompressionType";
  var _IEDT = "InaccessibleEncryptionDateTime";
  var _IEE = "InvalidEndpointException";
  var _IES = "IncrementalExportSpecification";
  var _IETE = "InvalidExportTimeException";
  var _IF = "InputFormat";
  var _IFO = "InputFormatOptions";
  var _IIC = "ImportedItemCount";
  var _IL = "ItemList";
  var _IN = "IndexName";
  var _INFE = "ImportNotFoundException";
  var _INFEn = "IndexNotFoundException";
  var _IPME = "IdempotentParameterMismatchException";
  var _IR = "ItemResponse";
  var _IRL = "ItemResponseList";
  var _IRTE = "InvalidRestoreTimeException";
  var _IS = "IndexStatus";
  var _ISB = "IndexSizeBytes";
  var _ISE = "InternalServerError";
  var _ISL = "ImportSummaryList";
  var _ISm = "ImportSummary";
  var _ISmp = "ImportStatus";
  var _IT = "ImportTable";
  var _ITD = "ImportTableDescription";
  var _ITI = "ImportTableInput";
  var _ITO = "ImportTableOutput";
  var _It = "Items";
  var _K = "Key";
  var _KAA = "KeysAndAttributes";
  var _KC = "KeyConditions";
  var _KCE = "KeyConditionExpression";
  var _KDSD = "KinesisDataStreamDestinations";
  var _KDSDi = "KinesisDataStreamDestination";
  var _KL = "KeyList";
  var _KMSMKA = "KMSMasterKeyArn";
  var _KMSMKI = "KMSMasterKeyId";
  var _KS = "KeySchema";
  var _KSDI = "KinesisStreamingDestinationInput";
  var _KSDO = "KinesisStreamingDestinationOutput";
  var _KSE = "KeySchemaElement";
  var _KT = "KeyType";
  var _Ke = "Keys";
  var _L = "Limit";
  var _LAV = "ListAttributeValue";
  var _LB = "ListBackups";
  var _LBI = "ListBackupsInput";
  var _LBO = "ListBackupsOutput";
  var _LCI = "ListContributorInsights";
  var _LCII = "ListContributorInsightsInput";
  var _LCIO = "ListContributorInsightsOutput";
  var _LDDT = "LastDecreaseDateTime";
  var _LE = "ListExports";
  var _LEBA = "LastEvaluatedBackupArn";
  var _LEE = "LimitExceededException";
  var _LEGTN = "LastEvaluatedGlobalTableName";
  var _LEI = "ListExportsInput";
  var _LEK = "LastEvaluatedKey";
  var _LEO = "ListExportsOutput";
  var _LETN = "LastEvaluatedTableName";
  var _LGT = "ListGlobalTables";
  var _LGTI = "ListGlobalTablesInput";
  var _LGTO = "ListGlobalTablesOutput";
  var _LI = "ListImports";
  var _LIDT = "LastIncreaseDateTime";
  var _LII = "ListImportsInput";
  var _LIO = "ListImportsOutput";
  var _LRDT = "LatestRestorableDateTime";
  var _LSA = "LatestStreamArn";
  var _LSI = "LocalSecondaryIndexes";
  var _LSID = "LocalSecondaryIndexDescription";
  var _LSIDL = "LocalSecondaryIndexDescriptionList";
  var _LSII = "LocalSecondaryIndexInfo";
  var _LSIL = "LocalSecondaryIndexList";
  var _LSIO = "LocalSecondaryIndexOverride";
  var _LSIo = "LocalSecondaryIndex";
  var _LSL = "LatestStreamLabel";
  var _LT = "ListTables";
  var _LTI = "ListTablesInput";
  var _LTO = "ListTablesOutput";
  var _LTOR = "ListTagsOfResource";
  var _LTORI = "ListTagsOfResourceInput";
  var _LTORO = "ListTagsOfResourceOutput";
  var _LUDT = "LastUpdateDateTime";
  var _LUTPPRDT = "LastUpdateToPayPerRequestDateTime";
  var _L_ = "L";
  var _M = "Message";
  var _MAV = "MapAttributeValue";
  var _MR = "MaxResults";
  var _MRC = "MultiRegionConsistency";
  var _MRRU = "MaxReadRequestUnits";
  var _MU = "MinimumUnits";
  var _MUa = "MaximumUnits";
  var _MWRU = "MaxWriteRequestUnits";
  var _M_ = "M";
  var _N = "N";
  var _NKA = "NonKeyAttributes";
  var _NODT = "NumberOfDecreasesToday";
  var _NS = "NS";
  var _NT = "NextToken";
  var _NULL = "NULL";
  var _ODT = "OnDemandThroughput";
  var _ODTO = "OnDemandThroughputOverride";
  var _P = "Parameters";
  var _PE = "ProjectionExpression";
  var _PI = "PutItem";
  var _PIC = "ProcessedItemCount";
  var _PII = "PutItemInput";
  var _PIIAM = "PutItemInputAttributeMap";
  var _PIO = "PutItemOutput";
  var _PITRD = "PointInTimeRecoveryDescription";
  var _PITRE = "PointInTimeRecoveryEnabled";
  var _PITRS = "PointInTimeRecoveryStatus";
  var _PITRSo = "PointInTimeRecoverySpecification";
  var _PITRUE = "PointInTimeRecoveryUnavailableException";
  var _PN = "PolicyName";
  var _PNFE = "PolicyNotFoundException";
  var _PQLBR = "PartiQLBatchRequest";
  var _PQLBRa = "PartiQLBatchResponse";
  var _PR = "PutRequest";
  var _PRCASS = "ProvisionedReadCapacityAutoScalingSettings";
  var _PRCASSU = "ProvisionedReadCapacityAutoScalingSettingsUpdate";
  var _PRCASU = "ProvisionedReadCapacityAutoScalingUpdate";
  var _PRCU = "ProvisionedReadCapacityUnits";
  var _PRP = "PutResourcePolicy";
  var _PRPI = "PutResourcePolicyInput";
  var _PRPO = "PutResourcePolicyOutput";
  var _PS = "PageSize";
  var _PSB = "ProcessedSizeBytes";
  var _PSP = "PreparedStatementParameters";
  var _PSa = "ParameterizedStatement";
  var _PSar = "ParameterizedStatements";
  var _PT = "ProvisionedThroughput";
  var _PTD = "ProvisionedThroughputDescription";
  var _PTEE = "ProvisionedThroughputExceededException";
  var _PTO = "ProvisionedThroughputOverride";
  var _PTr = "ProjectionType";
  var _PWCASS = "ProvisionedWriteCapacityAutoScalingSettings";
  var _PWCASSU = "ProvisionedWriteCapacityAutoScalingSettingsUpdate";
  var _PWCASU = "ProvisionedWriteCapacityAutoScalingUpdate";
  var _PWCU = "ProvisionedWriteCapacityUnits";
  var _Po = "Policy";
  var _Pr = "Projection";
  var _Pu = "Put";
  var _Q = "Query";
  var _QF = "QueryFilter";
  var _QI = "QueryInput";
  var _QO = "QueryOutput";
  var _R = "Responses";
  var _RA = "ResourceArn";
  var _RAEE = "ReplicaAlreadyExistsException";
  var _RASD = "ReplicaAutoScalingDescription";
  var _RASDL = "ReplicaAutoScalingDescriptionList";
  var _RASU = "ReplicaAutoScalingUpdate";
  var _RASUL = "ReplicaAutoScalingUpdateList";
  var _RAe = "ReplicaArn";
  var _RBMS = "ReplicaBillingModeSummary";
  var _RCC = "ReturnConsumedCapacity";
  var _RCU = "ReadCapacityUnits";
  var _RD = "ReplicaDescription";
  var _RDL = "ReplicaDescriptionList";
  var _RDT = "RestoreDateTime";
  var _RG = "ReplicationGroup";
  var _RGSI = "ReplicaGlobalSecondaryIndex";
  var _RGSIASD = "ReplicaGlobalSecondaryIndexAutoScalingDescription";
  var _RGSIASDL = "ReplicaGlobalSecondaryIndexAutoScalingDescriptionList";
  var _RGSIASU = "ReplicaGlobalSecondaryIndexAutoScalingUpdate";
  var _RGSIASUL = "ReplicaGlobalSecondaryIndexAutoScalingUpdateList";
  var _RGSID = "ReplicaGlobalSecondaryIndexDescription";
  var _RGSIDL = "ReplicaGlobalSecondaryIndexDescriptionList";
  var _RGSIL = "ReplicaGlobalSecondaryIndexList";
  var _RGSIS = "ReplicaGlobalSecondaryIndexSettings";
  var _RGSISD = "ReplicaGlobalSecondaryIndexSettingsDescription";
  var _RGSISDL = "ReplicaGlobalSecondaryIndexSettingsDescriptionList";
  var _RGSISU = "ReplicaGlobalSecondaryIndexSettingsUpdate";
  var _RGSISUL = "ReplicaGlobalSecondaryIndexSettingsUpdateList";
  var _RGSIU = "ReplicaGlobalSecondaryIndexUpdates";
  var _RGU = "ReplicationGroupUpdate";
  var _RGUL = "ReplicationGroupUpdateList";
  var _RI = "RequestItems";
  var _RICM = "ReturnItemCollectionMetrics";
  var _RIDT = "ReplicaInaccessibleDateTime";
  var _RIP = "RestoreInProgress";
  var _RIUE = "ResourceInUseException";
  var _RIe = "RevisionId";
  var _RL = "ReplicaList";
  var _RLE = "RequestLimitExceeded";
  var _RN = "RegionName";
  var _RNFE = "ReplicaNotFoundException";
  var _RNFEe = "ResourceNotFoundException";
  var _RP = "ResourcePolicy";
  var _RPID = "RecoveryPeriodInDays";
  var _RPRCASS = "ReplicaProvisionedReadCapacityAutoScalingSettings";
  var _RPRCASSU = "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate";
  var _RPRCASU = "ReplicaProvisionedReadCapacityAutoScalingUpdate";
  var _RPRCU = "ReplicaProvisionedReadCapacityUnits";
  var _RPWCASS = "ReplicaProvisionedWriteCapacityAutoScalingSettings";
  var _RPWCU = "ReplicaProvisionedWriteCapacityUnits";
  var _RS = "ReplicaSettings";
  var _RSD = "ReplicaStatusDescription";
  var _RSDL = "ReplicaSettingsDescriptionList";
  var _RSDe = "ReplicaSettingsDescription";
  var _RSPP = "ReplicaStatusPercentProgress";
  var _RSU = "ReplicaSettingsUpdate";
  var _RSUL = "ReplicaSettingsUpdateList";
  var _RSe = "ReplicaStatus";
  var _RSes = "RestoreSummary";
  var _RTC = "ReplicaTableClass";
  var _RTCS = "ReplicaTableClassSummary";
  var _RTFB = "RestoreTableFromBackup";
  var _RTFBI = "RestoreTableFromBackupInput";
  var _RTFBO = "RestoreTableFromBackupOutput";
  var _RTTPIT = "RestoreTableToPointInTime";
  var _RTTPITI = "RestoreTableToPointInTimeInput";
  var _RTTPITO = "RestoreTableToPointInTimeOutput";
  var _RU = "ReplicaUpdate";
  var _RUL = "ReplicaUpdateList";
  var _RUPS = "ReadUnitsPerSecond";
  var _RUe = "ReplicaUpdates";
  var _RV = "ReturnValues";
  var _RVOCCF = "ReturnValuesOnConditionCheckFailure";
  var _RWCE = "ReplicatedWriteConflictException";
  var _Re = "Replica";
  var _Rep = "Replicas";
  var _S = "Statements";
  var _SA = "StreamArn";
  var _SB = "S3Bucket";
  var _SBA = "SourceBackupArn";
  var _SBO = "S3BucketOwner";
  var _SBS = "S3BucketSource";
  var _SC = "ScannedCount";
  var _SD = "StreamDescription";
  var _SE = "StreamEnabled";
  var _SERGB = "SizeEstimateRangeGB";
  var _SF = "ScanFilter";
  var _SI = "ScanInput";
  var _SIC = "ScaleInCooldown";
  var _SICM = "SecondaryIndexesCapacityMap";
  var _SIF = "ScanIndexForward";
  var _SKP = "S3KeyPrefix";
  var _SO = "ScanOutput";
  var _SOC = "ScaleOutCooldown";
  var _SP = "ScalingPolicies";
  var _SPU = "ScalingPolicyUpdate";
  var _SPr = "S3Prefix";
  var _SS = "StreamSpecification";
  var _SSA = "S3SseAlgorithm";
  var _SSED = "SSEDescription";
  var _SSES = "SSESpecification";
  var _SSESO = "SSESpecificationOverride";
  var _SSET = "SSEType";
  var _SSKKI = "S3SseKmsKeyId";
  var _SS_ = "SS";
  var _ST = "StartTime";
  var _STA = "SourceTableArn";
  var _STD = "SourceTableDetails";
  var _STFD = "SourceTableFeatureDetails";
  var _STN = "SourceTableName";
  var _SVT = "StreamViewType";
  var _S_ = "S";
  var _Sc = "Scan";
  var _Se = "Select";
  var _Seg = "Segment";
  var _St = "Statement";
  var _Sta = "Status";
  var _T = "Table";
  var _TA = "TableArn";
  var _TAEE = "TableAlreadyExistsException";
  var _TASD = "TableAutoScalingDescription";
  var _TC = "TableClass";
  var _TCDT = "TableCreationDateTime";
  var _TCE = "TransactionCanceledException";
  var _TCEr = "TransactionConflictException";
  var _TCO = "TableClassOverride";
  var _TCP = "TableCreationParameters";
  var _TCS = "TableClassSummary";
  var _TD = "TableDescription";
  var _TE = "ThrottlingException";
  var _TGI = "TransactGetItem";
  var _TGII = "TransactGetItemsInput";
  var _TGIL = "TransactGetItemList";
  var _TGIO = "TransactGetItemsOutput";
  var _TGIr = "TransactGetItems";
  var _TI = "TableId";
  var _TIPE = "TransactionInProgressException";
  var _TIUE = "TableInUseException";
  var _TIr = "TransactItems";
  var _TK = "TagKeys";
  var _TL = "TagList";
  var _TMRCU = "TableMaxReadCapacityUnits";
  var _TMWCU = "TableMaxWriteCapacityUnits";
  var _TN = "TableName";
  var _TNFE = "TableNotFoundException";
  var _TNa = "TableNames";
  var _TR = "ThrottlingReasons";
  var _TRI = "TagResourceInput";
  var _TRL = "ThrottlingReasonList";
  var _TRLB = "TimeRangeLowerBound";
  var _TRUB = "TimeRangeUpperBound";
  var _TRa = "TagResource";
  var _TRh = "ThrottlingReason";
  var _TS = "TransactStatements";
  var _TSB = "TableSizeBytes";
  var _TSa = "TableStatus";
  var _TSo = "TotalSegments";
  var _TTLD = "TimeToLiveDescription";
  var _TTLS = "TimeToLiveStatus";
  var _TTLSi = "TimeToLiveSpecification";
  var _TTN = "TargetTableName";
  var _TTSPC = "TargetTrackingScalingPolicyConfiguration";
  var _TV = "TargetValue";
  var _TWI = "TransactWriteItem";
  var _TWII = "TransactWriteItemsInput";
  var _TWIL = "TransactWriteItemList";
  var _TWIO = "TransactWriteItemsOutput";
  var _TWIr = "TransactWriteItems";
  var _TWTD = "TableWarmThroughputDescription";
  var _Ta = "Tags";
  var _Tag = "Tag";
  var _U = "Update";
  var _UCB = "UpdateContinuousBackups";
  var _UCBI = "UpdateContinuousBackupsInput";
  var _UCBO = "UpdateContinuousBackupsOutput";
  var _UCI = "UpdateContributorInsights";
  var _UCII = "UpdateContributorInsightsInput";
  var _UCIO = "UpdateContributorInsightsOutput";
  var _UE = "UpdateExpression";
  var _UGSIA = "UpdateGlobalSecondaryIndexAction";
  var _UGT = "UpdateGlobalTable";
  var _UGTI = "UpdateGlobalTableInput";
  var _UGTO = "UpdateGlobalTableOutput";
  var _UGTS = "UpdateGlobalTableSettings";
  var _UGTSI = "UpdateGlobalTableSettingsInput";
  var _UGTSO = "UpdateGlobalTableSettingsOutput";
  var _UI = "UnprocessedItems";
  var _UII = "UpdateItemInput";
  var _UIO = "UpdateItemOutput";
  var _UIp = "UpdateItem";
  var _UK = "UnprocessedKeys";
  var _UKSC = "UpdateKinesisStreamingConfiguration";
  var _UKSD = "UpdateKinesisStreamingDestination";
  var _UKSDI = "UpdateKinesisStreamingDestinationInput";
  var _UKSDO = "UpdateKinesisStreamingDestinationOutput";
  var _ULRT = "UseLatestRestorableTime";
  var _UR = "UntagResource";
  var _URGMA = "UpdateReplicationGroupMemberAction";
  var _URI = "UntagResourceInput";
  var _UT = "UpdateTable";
  var _UTI = "UpdateTableInput";
  var _UTO = "UpdateTableOutput";
  var _UTRAS = "UpdateTableReplicaAutoScaling";
  var _UTRASI = "UpdateTableReplicaAutoScalingInput";
  var _UTRASO = "UpdateTableReplicaAutoScalingOutput";
  var _UTTL = "UpdateTimeToLive";
  var _UTTLI = "UpdateTimeToLiveInput";
  var _UTTLO = "UpdateTimeToLiveOutput";
  var _V = "Value";
  var _WCU = "WriteCapacityUnits";
  var _WR = "WriteRequest";
  var _WRr = "WriteRequests";
  var _WS = "WitnessStatus";
  var _WT = "WarmThroughput";
  var _WUPS = "WriteUnitsPerSecond";
  var _aQE = "awsQueryError";
  var _c = "client";
  var _e3 = "error";
  var _hE = "httpError";
  var _hH = "httpHeader";
  var _m = "message";
  var _r4 = "reason";
  var _re = "resource";
  var _s2 = "smithy.ts.sdk.synthetic.com.amazonaws.dynamodb";
  var _se = "server";
  var _tR = "throttlingReasons";
  var _xacrsra = "x-amz-confirm-remove-self-resource-access";
  var n0 = "com.amazonaws.dynamodb";
  var { TypeRegistry } = require_schema();
  var { DynamoDBServiceException } = require_DynamoDBServiceException();
  var { BackupInUseException, BackupNotFoundException, ConditionalCheckFailedException, ContinuousBackupsUnavailableException, DuplicateItemException, ExportConflictException, ExportNotFoundException, GlobalTableAlreadyExistsException, GlobalTableNotFoundException, IdempotentParameterMismatchException, ImportConflictException, ImportNotFoundException, IndexNotFoundException, InternalServerError: InternalServerError2, InvalidEndpointException, InvalidExportTimeException, InvalidRestoreTimeException, ItemCollectionSizeLimitExceededException, LimitExceededException, PointInTimeRecoveryUnavailableException, PolicyNotFoundException, ProvisionedThroughputExceededException, ReplicaAlreadyExistsException, ReplicaNotFoundException, ReplicatedWriteConflictException, RequestLimitExceeded, ResourceInUseException, ResourceNotFoundException, TableAlreadyExistsException, TableInUseException, TableNotFoundException, ThrottlingException, TransactionCanceledException, TransactionConflictException, TransactionInProgressException } = require_errors9();
  var _s_registry = TypeRegistry.for(_s2);
  var DynamoDBServiceException$ = [-3, _s2, "DynamoDBServiceException", 0, [], []];
  exports2.DynamoDBServiceException$ = DynamoDBServiceException$;
  _s_registry.registerError(DynamoDBServiceException$, DynamoDBServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var BackupInUseException$ = [
    -3,
    n0,
    _BIUE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.BackupInUseException$ = BackupInUseException$;
  n0_registry.registerError(BackupInUseException$, BackupInUseException);
  var BackupNotFoundException$ = [
    -3,
    n0,
    _BNFE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.BackupNotFoundException$ = BackupNotFoundException$;
  n0_registry.registerError(BackupNotFoundException$, BackupNotFoundException);
  var ConditionalCheckFailedException$ = [
    -3,
    n0,
    _CCFE,
    { [_e3]: _c },
    [_m, _I],
    [0, () => AttributeMap]
  ];
  exports2.ConditionalCheckFailedException$ = ConditionalCheckFailedException$;
  n0_registry.registerError(ConditionalCheckFailedException$, ConditionalCheckFailedException);
  var ContinuousBackupsUnavailableException$ = [
    -3,
    n0,
    _CBUE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ContinuousBackupsUnavailableException$ = ContinuousBackupsUnavailableException$;
  n0_registry.registerError(ContinuousBackupsUnavailableException$, ContinuousBackupsUnavailableException);
  var DuplicateItemException$ = [
    -3,
    n0,
    _DIE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.DuplicateItemException$ = DuplicateItemException$;
  n0_registry.registerError(DuplicateItemException$, DuplicateItemException);
  var ExportConflictException$ = [
    -3,
    n0,
    _ECE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ExportConflictException$ = ExportConflictException$;
  n0_registry.registerError(ExportConflictException$, ExportConflictException);
  var ExportNotFoundException$ = [
    -3,
    n0,
    _ENFE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ExportNotFoundException$ = ExportNotFoundException$;
  n0_registry.registerError(ExportNotFoundException$, ExportNotFoundException);
  var GlobalTableAlreadyExistsException$ = [
    -3,
    n0,
    _GTAEE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.GlobalTableAlreadyExistsException$ = GlobalTableAlreadyExistsException$;
  n0_registry.registerError(GlobalTableAlreadyExistsException$, GlobalTableAlreadyExistsException);
  var GlobalTableNotFoundException$ = [
    -3,
    n0,
    _GTNFE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.GlobalTableNotFoundException$ = GlobalTableNotFoundException$;
  n0_registry.registerError(GlobalTableNotFoundException$, GlobalTableNotFoundException);
  var IdempotentParameterMismatchException$ = [
    -3,
    n0,
    _IPME,
    { [_e3]: _c },
    [_M],
    [0]
  ];
  exports2.IdempotentParameterMismatchException$ = IdempotentParameterMismatchException$;
  n0_registry.registerError(IdempotentParameterMismatchException$, IdempotentParameterMismatchException);
  var ImportConflictException$ = [
    -3,
    n0,
    _ICE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ImportConflictException$ = ImportConflictException$;
  n0_registry.registerError(ImportConflictException$, ImportConflictException);
  var ImportNotFoundException$ = [
    -3,
    n0,
    _INFE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ImportNotFoundException$ = ImportNotFoundException$;
  n0_registry.registerError(ImportNotFoundException$, ImportNotFoundException);
  var IndexNotFoundException$ = [
    -3,
    n0,
    _INFEn,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.IndexNotFoundException$ = IndexNotFoundException$;
  n0_registry.registerError(IndexNotFoundException$, IndexNotFoundException);
  var InternalServerError$ = [
    -3,
    n0,
    _ISE,
    { [_e3]: _se },
    [_m],
    [0]
  ];
  exports2.InternalServerError$ = InternalServerError$;
  n0_registry.registerError(InternalServerError$, InternalServerError2);
  var InvalidEndpointException$ = [
    -3,
    n0,
    _IEE,
    { [_e3]: _c, [_hE]: 421 },
    [_M],
    [0]
  ];
  exports2.InvalidEndpointException$ = InvalidEndpointException$;
  n0_registry.registerError(InvalidEndpointException$, InvalidEndpointException);
  var InvalidExportTimeException$ = [
    -3,
    n0,
    _IETE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.InvalidExportTimeException$ = InvalidExportTimeException$;
  n0_registry.registerError(InvalidExportTimeException$, InvalidExportTimeException);
  var InvalidRestoreTimeException$ = [
    -3,
    n0,
    _IRTE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.InvalidRestoreTimeException$ = InvalidRestoreTimeException$;
  n0_registry.registerError(InvalidRestoreTimeException$, InvalidRestoreTimeException);
  var ItemCollectionSizeLimitExceededException$ = [
    -3,
    n0,
    _ICSLEE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ItemCollectionSizeLimitExceededException$ = ItemCollectionSizeLimitExceededException$;
  n0_registry.registerError(ItemCollectionSizeLimitExceededException$, ItemCollectionSizeLimitExceededException);
  var LimitExceededException$ = [
    -3,
    n0,
    _LEE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.LimitExceededException$ = LimitExceededException$;
  n0_registry.registerError(LimitExceededException$, LimitExceededException);
  var PointInTimeRecoveryUnavailableException$ = [
    -3,
    n0,
    _PITRUE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.PointInTimeRecoveryUnavailableException$ = PointInTimeRecoveryUnavailableException$;
  n0_registry.registerError(PointInTimeRecoveryUnavailableException$, PointInTimeRecoveryUnavailableException);
  var PolicyNotFoundException$ = [
    -3,
    n0,
    _PNFE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.PolicyNotFoundException$ = PolicyNotFoundException$;
  n0_registry.registerError(PolicyNotFoundException$, PolicyNotFoundException);
  var ProvisionedThroughputExceededException$ = [
    -3,
    n0,
    _PTEE,
    { [_e3]: _c },
    [_m, _TR],
    [0, () => ThrottlingReasonList]
  ];
  exports2.ProvisionedThroughputExceededException$ = ProvisionedThroughputExceededException$;
  n0_registry.registerError(ProvisionedThroughputExceededException$, ProvisionedThroughputExceededException);
  var ReplicaAlreadyExistsException$ = [
    -3,
    n0,
    _RAEE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ReplicaAlreadyExistsException$ = ReplicaAlreadyExistsException$;
  n0_registry.registerError(ReplicaAlreadyExistsException$, ReplicaAlreadyExistsException);
  var ReplicaNotFoundException$ = [
    -3,
    n0,
    _RNFE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ReplicaNotFoundException$ = ReplicaNotFoundException$;
  n0_registry.registerError(ReplicaNotFoundException$, ReplicaNotFoundException);
  var ReplicatedWriteConflictException$ = [
    -3,
    n0,
    _RWCE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ReplicatedWriteConflictException$ = ReplicatedWriteConflictException$;
  n0_registry.registerError(ReplicatedWriteConflictException$, ReplicatedWriteConflictException);
  var RequestLimitExceeded$ = [
    -3,
    n0,
    _RLE,
    { [_e3]: _c },
    [_m, _TR],
    [0, () => ThrottlingReasonList]
  ];
  exports2.RequestLimitExceeded$ = RequestLimitExceeded$;
  n0_registry.registerError(RequestLimitExceeded$, RequestLimitExceeded);
  var ResourceInUseException$ = [
    -3,
    n0,
    _RIUE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ResourceInUseException$ = ResourceInUseException$;
  n0_registry.registerError(ResourceInUseException$, ResourceInUseException);
  var ResourceNotFoundException$ = [
    -3,
    n0,
    _RNFEe,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.ResourceNotFoundException$ = ResourceNotFoundException$;
  n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
  var TableAlreadyExistsException$ = [
    -3,
    n0,
    _TAEE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.TableAlreadyExistsException$ = TableAlreadyExistsException$;
  n0_registry.registerError(TableAlreadyExistsException$, TableAlreadyExistsException);
  var TableInUseException$ = [
    -3,
    n0,
    _TIUE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.TableInUseException$ = TableInUseException$;
  n0_registry.registerError(TableInUseException$, TableInUseException);
  var TableNotFoundException$ = [
    -3,
    n0,
    _TNFE,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.TableNotFoundException$ = TableNotFoundException$;
  n0_registry.registerError(TableNotFoundException$, TableNotFoundException);
  var ThrottlingException$ = [
    -3,
    n0,
    _TE,
    { [_aQE]: [`Throttling`, 400], [_e3]: _c, [_hE]: 400 },
    [_m, _tR],
    [0, () => ThrottlingReasonList]
  ];
  exports2.ThrottlingException$ = ThrottlingException$;
  n0_registry.registerError(ThrottlingException$, ThrottlingException);
  var TransactionCanceledException$ = [
    -3,
    n0,
    _TCE,
    { [_e3]: _c },
    [_M, _CR],
    [0, () => CancellationReasonList]
  ];
  exports2.TransactionCanceledException$ = TransactionCanceledException$;
  n0_registry.registerError(TransactionCanceledException$, TransactionCanceledException);
  var TransactionConflictException$ = [
    -3,
    n0,
    _TCEr,
    { [_e3]: _c },
    [_m],
    [0]
  ];
  exports2.TransactionConflictException$ = TransactionConflictException$;
  n0_registry.registerError(TransactionConflictException$, TransactionConflictException);
  var TransactionInProgressException$ = [
    -3,
    n0,
    _TIPE,
    { [_e3]: _c },
    [_M],
    [0]
  ];
  exports2.TransactionInProgressException$ = TransactionInProgressException$;
  n0_registry.registerError(TransactionInProgressException$, TransactionInProgressException);
  exports2.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var ArchivalSummary$ = [
    3,
    n0,
    _AS,
    0,
    [_ADT, _AR, _ABA],
    [4, 0, 0]
  ];
  exports2.ArchivalSummary$ = ArchivalSummary$;
  var AttributeDefinition$ = [
    3,
    n0,
    _AD,
    0,
    [_AN, _AT],
    [0, 0],
    2
  ];
  exports2.AttributeDefinition$ = AttributeDefinition$;
  var AttributeValueUpdate$ = [
    3,
    n0,
    _AVU,
    0,
    [_V, _A],
    [() => AttributeValue$, 0]
  ];
  exports2.AttributeValueUpdate$ = AttributeValueUpdate$;
  var AutoScalingPolicyDescription$ = [
    3,
    n0,
    _ASPD,
    0,
    [_PN, _TTSPC],
    [0, () => AutoScalingTargetTrackingScalingPolicyConfigurationDescription$]
  ];
  exports2.AutoScalingPolicyDescription$ = AutoScalingPolicyDescription$;
  var AutoScalingPolicyUpdate$ = [
    3,
    n0,
    _ASPU,
    0,
    [_TTSPC, _PN],
    [() => AutoScalingTargetTrackingScalingPolicyConfigurationUpdate$, 0],
    1
  ];
  exports2.AutoScalingPolicyUpdate$ = AutoScalingPolicyUpdate$;
  var AutoScalingSettingsDescription$ = [
    3,
    n0,
    _ASSD,
    0,
    [_MU, _MUa, _ASD, _ASRA, _SP],
    [1, 1, 2, 0, () => AutoScalingPolicyDescriptionList]
  ];
  exports2.AutoScalingSettingsDescription$ = AutoScalingSettingsDescription$;
  var AutoScalingSettingsUpdate$ = [
    3,
    n0,
    _ASSU,
    0,
    [_MU, _MUa, _ASD, _ASRA, _SPU],
    [1, 1, 2, 0, () => AutoScalingPolicyUpdate$]
  ];
  exports2.AutoScalingSettingsUpdate$ = AutoScalingSettingsUpdate$;
  var AutoScalingTargetTrackingScalingPolicyConfigurationDescription$ = [
    3,
    n0,
    _ASTTSPCD,
    0,
    [_TV, _DSI, _SIC, _SOC],
    [1, 2, 1, 1],
    1
  ];
  exports2.AutoScalingTargetTrackingScalingPolicyConfigurationDescription$ = AutoScalingTargetTrackingScalingPolicyConfigurationDescription$;
  var AutoScalingTargetTrackingScalingPolicyConfigurationUpdate$ = [
    3,
    n0,
    _ASTTSPCU,
    0,
    [_TV, _DSI, _SIC, _SOC],
    [1, 2, 1, 1],
    1
  ];
  exports2.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate$ = AutoScalingTargetTrackingScalingPolicyConfigurationUpdate$;
  var BackupDescription$ = [
    3,
    n0,
    _BD,
    0,
    [_BDa, _STD, _STFD],
    [() => BackupDetails$, () => SourceTableDetails$, () => SourceTableFeatureDetails$]
  ];
  exports2.BackupDescription$ = BackupDescription$;
  var BackupDetails$ = [
    3,
    n0,
    _BDa,
    0,
    [_BA, _BN, _BS, _BT, _BCDT, _BSB, _BEDT],
    [0, 0, 0, 0, 4, 1, 4],
    5
  ];
  exports2.BackupDetails$ = BackupDetails$;
  var BackupSummary$ = [
    3,
    n0,
    _BSa,
    0,
    [_TN, _TI, _TA, _BA, _BN, _BCDT, _BEDT, _BS, _BT, _BSB],
    [0, 0, 0, 0, 0, 4, 4, 0, 0, 1]
  ];
  exports2.BackupSummary$ = BackupSummary$;
  var BatchExecuteStatementInput$ = [
    3,
    n0,
    _BESI,
    0,
    [_S, _RCC],
    [() => PartiQLBatchRequest, 0],
    1
  ];
  exports2.BatchExecuteStatementInput$ = BatchExecuteStatementInput$;
  var BatchExecuteStatementOutput$ = [
    3,
    n0,
    _BESO,
    0,
    [_R, _CC],
    [() => PartiQLBatchResponse, () => ConsumedCapacityMultiple]
  ];
  exports2.BatchExecuteStatementOutput$ = BatchExecuteStatementOutput$;
  var BatchGetItemInput$ = [
    3,
    n0,
    _BGII,
    0,
    [_RI, _RCC],
    [() => BatchGetRequestMap, 0],
    1
  ];
  exports2.BatchGetItemInput$ = BatchGetItemInput$;
  var BatchGetItemOutput$ = [
    3,
    n0,
    _BGIO,
    0,
    [_R, _UK, _CC],
    [() => BatchGetResponseMap, () => BatchGetRequestMap, () => ConsumedCapacityMultiple]
  ];
  exports2.BatchGetItemOutput$ = BatchGetItemOutput$;
  var BatchStatementError$ = [
    3,
    n0,
    _BSE,
    0,
    [_C, _M, _I],
    [0, 0, () => AttributeMap]
  ];
  exports2.BatchStatementError$ = BatchStatementError$;
  var BatchStatementRequest$ = [
    3,
    n0,
    _BSR,
    0,
    [_St, _P, _CRo, _RVOCCF],
    [0, () => PreparedStatementParameters, 2, 0],
    1
  ];
  exports2.BatchStatementRequest$ = BatchStatementRequest$;
  var BatchStatementResponse$ = [
    3,
    n0,
    _BSRa,
    0,
    [_E, _TN, _I],
    [() => BatchStatementError$, 0, () => AttributeMap]
  ];
  exports2.BatchStatementResponse$ = BatchStatementResponse$;
  var BatchWriteItemInput$ = [
    3,
    n0,
    _BWII,
    0,
    [_RI, _RCC, _RICM],
    [() => BatchWriteItemRequestMap, 0, 0],
    1
  ];
  exports2.BatchWriteItemInput$ = BatchWriteItemInput$;
  var BatchWriteItemOutput$ = [
    3,
    n0,
    _BWIO,
    0,
    [_UI, _ICM, _CC],
    [() => BatchWriteItemRequestMap, () => ItemCollectionMetricsPerTable, () => ConsumedCapacityMultiple]
  ];
  exports2.BatchWriteItemOutput$ = BatchWriteItemOutput$;
  var BillingModeSummary$ = [
    3,
    n0,
    _BMS,
    0,
    [_BM, _LUTPPRDT],
    [0, 4]
  ];
  exports2.BillingModeSummary$ = BillingModeSummary$;
  var CancellationReason$ = [
    3,
    n0,
    _CRa,
    0,
    [_I, _C, _M],
    [() => AttributeMap, 0, 0]
  ];
  exports2.CancellationReason$ = CancellationReason$;
  var Capacity$ = [
    3,
    n0,
    _Ca,
    0,
    [_RCU, _WCU, _CU],
    [1, 1, 1]
  ];
  exports2.Capacity$ = Capacity$;
  var Condition$ = [
    3,
    n0,
    _Co,
    0,
    [_CO, _AVL],
    [0, () => AttributeValueList],
    1
  ];
  exports2.Condition$ = Condition$;
  var ConditionCheck$ = [
    3,
    n0,
    _CCo,
    0,
    [_K, _TN, _CE, _EAN, _EAV, _RVOCCF],
    [() => Key, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 0],
    3
  ];
  exports2.ConditionCheck$ = ConditionCheck$;
  var ConsumedCapacity$ = [
    3,
    n0,
    _CC,
    0,
    [_TN, _CU, _RCU, _WCU, _T, _LSI, _GSI],
    [0, 1, 1, 1, () => Capacity$, () => SecondaryIndexesCapacityMap, () => SecondaryIndexesCapacityMap]
  ];
  exports2.ConsumedCapacity$ = ConsumedCapacity$;
  var ContinuousBackupsDescription$ = [
    3,
    n0,
    _CBD,
    0,
    [_CBS, _PITRD],
    [0, () => PointInTimeRecoveryDescription$],
    1
  ];
  exports2.ContinuousBackupsDescription$ = ContinuousBackupsDescription$;
  var ContributorInsightsSummary$ = [
    3,
    n0,
    _CIS,
    0,
    [_TN, _IN, _CISo, _CIM],
    [0, 0, 0, 0]
  ];
  exports2.ContributorInsightsSummary$ = ContributorInsightsSummary$;
  var CreateBackupInput$ = [
    3,
    n0,
    _CBI,
    0,
    [_TN, _BN],
    [0, 0],
    2
  ];
  exports2.CreateBackupInput$ = CreateBackupInput$;
  var CreateBackupOutput$ = [
    3,
    n0,
    _CBO,
    0,
    [_BDa],
    [() => BackupDetails$]
  ];
  exports2.CreateBackupOutput$ = CreateBackupOutput$;
  var CreateGlobalSecondaryIndexAction$ = [
    3,
    n0,
    _CGSIA,
    0,
    [_IN, _KS, _Pr, _PT, _ODT, _WT],
    [0, () => KeySchema, () => Projection$, () => ProvisionedThroughput$, () => OnDemandThroughput$, () => WarmThroughput$],
    3
  ];
  exports2.CreateGlobalSecondaryIndexAction$ = CreateGlobalSecondaryIndexAction$;
  var CreateGlobalTableInput$ = [
    3,
    n0,
    _CGTI,
    0,
    [_GTN, _RG],
    [0, () => ReplicaList],
    2
  ];
  exports2.CreateGlobalTableInput$ = CreateGlobalTableInput$;
  var CreateGlobalTableOutput$ = [
    3,
    n0,
    _CGTO,
    0,
    [_GTD],
    [() => GlobalTableDescription$]
  ];
  exports2.CreateGlobalTableOutput$ = CreateGlobalTableOutput$;
  var CreateGlobalTableWitnessGroupMemberAction$ = [
    3,
    n0,
    _CGTWGMA,
    0,
    [_RN],
    [0],
    1
  ];
  exports2.CreateGlobalTableWitnessGroupMemberAction$ = CreateGlobalTableWitnessGroupMemberAction$;
  var CreateReplicaAction$ = [
    3,
    n0,
    _CRA,
    0,
    [_RN],
    [0],
    1
  ];
  exports2.CreateReplicaAction$ = CreateReplicaAction$;
  var CreateReplicationGroupMemberAction$ = [
    3,
    n0,
    _CRGMA,
    0,
    [_RN, _KMSMKI, _PTO, _ODTO, _GSI, _TCO],
    [0, 0, () => ProvisionedThroughputOverride$, () => OnDemandThroughputOverride$, () => ReplicaGlobalSecondaryIndexList, 0],
    1
  ];
  exports2.CreateReplicationGroupMemberAction$ = CreateReplicationGroupMemberAction$;
  var CreateTableInput$ = [
    3,
    n0,
    _CTI,
    0,
    [_TN, _ADt, _KS, _LSI, _GSI, _BM, _PT, _SS, _SSES, _Ta, _TC, _DPE, _WT, _RP, _ODT, _GTSA, _GTSRM],
    [0, () => AttributeDefinitions, () => KeySchema, () => LocalSecondaryIndexList, () => GlobalSecondaryIndexList, 0, () => ProvisionedThroughput$, () => StreamSpecification$, () => SSESpecification$, () => TagList, 0, 2, () => WarmThroughput$, 0, () => OnDemandThroughput$, 0, 0],
    1
  ];
  exports2.CreateTableInput$ = CreateTableInput$;
  var CreateTableOutput$ = [
    3,
    n0,
    _CTO,
    0,
    [_TD],
    [() => TableDescription$]
  ];
  exports2.CreateTableOutput$ = CreateTableOutput$;
  var CsvOptions$ = [
    3,
    n0,
    _COs,
    0,
    [_D, _HL],
    [0, 64 | 0]
  ];
  exports2.CsvOptions$ = CsvOptions$;
  var Delete$ = [
    3,
    n0,
    _De,
    0,
    [_K, _TN, _CE, _EAN, _EAV, _RVOCCF],
    [() => Key, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 0],
    2
  ];
  exports2.Delete$ = Delete$;
  var DeleteBackupInput$ = [
    3,
    n0,
    _DBI,
    0,
    [_BA],
    [0],
    1
  ];
  exports2.DeleteBackupInput$ = DeleteBackupInput$;
  var DeleteBackupOutput$ = [
    3,
    n0,
    _DBO,
    0,
    [_BD],
    [() => BackupDescription$]
  ];
  exports2.DeleteBackupOutput$ = DeleteBackupOutput$;
  var DeleteGlobalSecondaryIndexAction$ = [
    3,
    n0,
    _DGSIA,
    0,
    [_IN],
    [0],
    1
  ];
  exports2.DeleteGlobalSecondaryIndexAction$ = DeleteGlobalSecondaryIndexAction$;
  var DeleteGlobalTableWitnessGroupMemberAction$ = [
    3,
    n0,
    _DGTWGMA,
    0,
    [_RN],
    [0],
    1
  ];
  exports2.DeleteGlobalTableWitnessGroupMemberAction$ = DeleteGlobalTableWitnessGroupMemberAction$;
  var DeleteItemInput$ = [
    3,
    n0,
    _DII,
    0,
    [_TN, _K, _Ex, _COo, _RV, _RCC, _RICM, _CE, _EAN, _EAV, _RVOCCF],
    [0, () => Key, () => ExpectedAttributeMap, 0, 0, 0, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 0],
    2
  ];
  exports2.DeleteItemInput$ = DeleteItemInput$;
  var DeleteItemOutput$ = [
    3,
    n0,
    _DIO,
    0,
    [_At, _CC, _ICM],
    [() => AttributeMap, () => ConsumedCapacity$, () => ItemCollectionMetrics$]
  ];
  exports2.DeleteItemOutput$ = DeleteItemOutput$;
  var DeleteReplicaAction$ = [
    3,
    n0,
    _DRA,
    0,
    [_RN],
    [0],
    1
  ];
  exports2.DeleteReplicaAction$ = DeleteReplicaAction$;
  var DeleteReplicationGroupMemberAction$ = [
    3,
    n0,
    _DRGMA,
    0,
    [_RN],
    [0],
    1
  ];
  exports2.DeleteReplicationGroupMemberAction$ = DeleteReplicationGroupMemberAction$;
  var DeleteRequest$ = [
    3,
    n0,
    _DR,
    0,
    [_K],
    [() => Key],
    1
  ];
  exports2.DeleteRequest$ = DeleteRequest$;
  var DeleteResourcePolicyInput$ = [
    3,
    n0,
    _DRPI,
    0,
    [_RA, _ERI],
    [0, 0],
    1
  ];
  exports2.DeleteResourcePolicyInput$ = DeleteResourcePolicyInput$;
  var DeleteResourcePolicyOutput$ = [
    3,
    n0,
    _DRPO,
    0,
    [_RIe],
    [0]
  ];
  exports2.DeleteResourcePolicyOutput$ = DeleteResourcePolicyOutput$;
  var DeleteTableInput$ = [
    3,
    n0,
    _DTI,
    0,
    [_TN],
    [0],
    1
  ];
  exports2.DeleteTableInput$ = DeleteTableInput$;
  var DeleteTableOutput$ = [
    3,
    n0,
    _DTO,
    0,
    [_TD],
    [() => TableDescription$]
  ];
  exports2.DeleteTableOutput$ = DeleteTableOutput$;
  var DescribeBackupInput$ = [
    3,
    n0,
    _DBIe,
    0,
    [_BA],
    [0],
    1
  ];
  exports2.DescribeBackupInput$ = DescribeBackupInput$;
  var DescribeBackupOutput$ = [
    3,
    n0,
    _DBOe,
    0,
    [_BD],
    [() => BackupDescription$]
  ];
  exports2.DescribeBackupOutput$ = DescribeBackupOutput$;
  var DescribeContinuousBackupsInput$ = [
    3,
    n0,
    _DCBI,
    0,
    [_TN],
    [0],
    1
  ];
  exports2.DescribeContinuousBackupsInput$ = DescribeContinuousBackupsInput$;
  var DescribeContinuousBackupsOutput$ = [
    3,
    n0,
    _DCBO,
    0,
    [_CBD],
    [() => ContinuousBackupsDescription$]
  ];
  exports2.DescribeContinuousBackupsOutput$ = DescribeContinuousBackupsOutput$;
  var DescribeContributorInsightsInput$ = [
    3,
    n0,
    _DCII,
    0,
    [_TN, _IN],
    [0, 0],
    1
  ];
  exports2.DescribeContributorInsightsInput$ = DescribeContributorInsightsInput$;
  var DescribeContributorInsightsOutput$ = [
    3,
    n0,
    _DCIO,
    0,
    [_TN, _IN, _CIRL, _CISo, _LUDT, _FE, _CIM],
    [0, 0, 64 | 0, 0, 4, () => FailureException$, 0]
  ];
  exports2.DescribeContributorInsightsOutput$ = DescribeContributorInsightsOutput$;
  var DescribeEndpointsRequest$ = [
    3,
    n0,
    _DER,
    0,
    [],
    []
  ];
  exports2.DescribeEndpointsRequest$ = DescribeEndpointsRequest$;
  var DescribeEndpointsResponse$ = [
    3,
    n0,
    _DERe,
    0,
    [_En],
    [() => Endpoints],
    1
  ];
  exports2.DescribeEndpointsResponse$ = DescribeEndpointsResponse$;
  var DescribeExportInput$ = [
    3,
    n0,
    _DEI,
    0,
    [_EA],
    [0],
    1
  ];
  exports2.DescribeExportInput$ = DescribeExportInput$;
  var DescribeExportOutput$ = [
    3,
    n0,
    _DEO,
    0,
    [_ED],
    [() => ExportDescription$]
  ];
  exports2.DescribeExportOutput$ = DescribeExportOutput$;
  var DescribeGlobalTableInput$ = [
    3,
    n0,
    _DGTI,
    0,
    [_GTN],
    [0],
    1
  ];
  exports2.DescribeGlobalTableInput$ = DescribeGlobalTableInput$;
  var DescribeGlobalTableOutput$ = [
    3,
    n0,
    _DGTO,
    0,
    [_GTD],
    [() => GlobalTableDescription$]
  ];
  exports2.DescribeGlobalTableOutput$ = DescribeGlobalTableOutput$;
  var DescribeGlobalTableSettingsInput$ = [
    3,
    n0,
    _DGTSI,
    0,
    [_GTN],
    [0],
    1
  ];
  exports2.DescribeGlobalTableSettingsInput$ = DescribeGlobalTableSettingsInput$;
  var DescribeGlobalTableSettingsOutput$ = [
    3,
    n0,
    _DGTSO,
    0,
    [_GTN, _RS],
    [0, () => ReplicaSettingsDescriptionList]
  ];
  exports2.DescribeGlobalTableSettingsOutput$ = DescribeGlobalTableSettingsOutput$;
  var DescribeImportInput$ = [
    3,
    n0,
    _DIIe,
    0,
    [_IA],
    [0],
    1
  ];
  exports2.DescribeImportInput$ = DescribeImportInput$;
  var DescribeImportOutput$ = [
    3,
    n0,
    _DIOe,
    0,
    [_ITD],
    [() => ImportTableDescription$],
    1
  ];
  exports2.DescribeImportOutput$ = DescribeImportOutput$;
  var DescribeKinesisStreamingDestinationInput$ = [
    3,
    n0,
    _DKSDI,
    0,
    [_TN],
    [0],
    1
  ];
  exports2.DescribeKinesisStreamingDestinationInput$ = DescribeKinesisStreamingDestinationInput$;
  var DescribeKinesisStreamingDestinationOutput$ = [
    3,
    n0,
    _DKSDO,
    0,
    [_TN, _KDSD],
    [0, () => KinesisDataStreamDestinations]
  ];
  exports2.DescribeKinesisStreamingDestinationOutput$ = DescribeKinesisStreamingDestinationOutput$;
  var DescribeLimitsInput$ = [
    3,
    n0,
    _DLI,
    0,
    [],
    []
  ];
  exports2.DescribeLimitsInput$ = DescribeLimitsInput$;
  var DescribeLimitsOutput$ = [
    3,
    n0,
    _DLO,
    0,
    [_AMRCU, _AMWCU, _TMRCU, _TMWCU],
    [1, 1, 1, 1]
  ];
  exports2.DescribeLimitsOutput$ = DescribeLimitsOutput$;
  var DescribeTableInput$ = [
    3,
    n0,
    _DTIe,
    0,
    [_TN],
    [0],
    1
  ];
  exports2.DescribeTableInput$ = DescribeTableInput$;
  var DescribeTableOutput$ = [
    3,
    n0,
    _DTOe,
    0,
    [_T],
    [() => TableDescription$]
  ];
  exports2.DescribeTableOutput$ = DescribeTableOutput$;
  var DescribeTableReplicaAutoScalingInput$ = [
    3,
    n0,
    _DTRASI,
    0,
    [_TN],
    [0],
    1
  ];
  exports2.DescribeTableReplicaAutoScalingInput$ = DescribeTableReplicaAutoScalingInput$;
  var DescribeTableReplicaAutoScalingOutput$ = [
    3,
    n0,
    _DTRASO,
    0,
    [_TASD],
    [() => TableAutoScalingDescription$]
  ];
  exports2.DescribeTableReplicaAutoScalingOutput$ = DescribeTableReplicaAutoScalingOutput$;
  var DescribeTimeToLiveInput$ = [
    3,
    n0,
    _DTTLI,
    0,
    [_TN],
    [0],
    1
  ];
  exports2.DescribeTimeToLiveInput$ = DescribeTimeToLiveInput$;
  var DescribeTimeToLiveOutput$ = [
    3,
    n0,
    _DTTLO,
    0,
    [_TTLD],
    [() => TimeToLiveDescription$]
  ];
  exports2.DescribeTimeToLiveOutput$ = DescribeTimeToLiveOutput$;
  var EnableKinesisStreamingConfiguration$ = [
    3,
    n0,
    _EKSC,
    0,
    [_ACDTP],
    [0]
  ];
  exports2.EnableKinesisStreamingConfiguration$ = EnableKinesisStreamingConfiguration$;
  var Endpoint$ = [
    3,
    n0,
    _End,
    0,
    [_Ad, _CPIM],
    [0, 1],
    2
  ];
  exports2.Endpoint$ = Endpoint$;
  var ExecuteStatementInput$ = [
    3,
    n0,
    _ESI,
    0,
    [_St, _P, _CRo, _NT, _RCC, _L, _RVOCCF],
    [0, () => PreparedStatementParameters, 2, 0, 0, 1, 0],
    1
  ];
  exports2.ExecuteStatementInput$ = ExecuteStatementInput$;
  var ExecuteStatementOutput$ = [
    3,
    n0,
    _ESO,
    0,
    [_It, _NT, _CC, _LEK],
    [() => ItemList, 0, () => ConsumedCapacity$, () => Key]
  ];
  exports2.ExecuteStatementOutput$ = ExecuteStatementOutput$;
  var ExecuteTransactionInput$ = [
    3,
    n0,
    _ETI,
    0,
    [_TS, _CRT, _RCC],
    [() => ParameterizedStatements, [0, 4], 0],
    1
  ];
  exports2.ExecuteTransactionInput$ = ExecuteTransactionInput$;
  var ExecuteTransactionOutput$ = [
    3,
    n0,
    _ETO,
    0,
    [_R, _CC],
    [() => ItemResponseList, () => ConsumedCapacityMultiple]
  ];
  exports2.ExecuteTransactionOutput$ = ExecuteTransactionOutput$;
  var ExpectedAttributeValue$ = [
    3,
    n0,
    _EAVx,
    0,
    [_V, _Exi, _CO, _AVL],
    [() => AttributeValue$, 2, 0, () => AttributeValueList]
  ];
  exports2.ExpectedAttributeValue$ = ExpectedAttributeValue$;
  var ExportDescription$ = [
    3,
    n0,
    _ED,
    0,
    [_EA, _ES, _ST, _ET, _EM, _TA, _TI, _ETx, _CT, _SB, _SBO, _SPr, _SSA, _SSKKI, _FC, _FM, _EF, _BSBi, _IC, _ETxp, _IES],
    [0, 0, 4, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, () => IncrementalExportSpecification$]
  ];
  exports2.ExportDescription$ = ExportDescription$;
  var ExportSummary$ = [
    3,
    n0,
    _ESx,
    0,
    [_EA, _ES, _ETxp],
    [0, 0, 0]
  ];
  exports2.ExportSummary$ = ExportSummary$;
  var ExportTableToPointInTimeInput$ = [
    3,
    n0,
    _ETTPITI,
    0,
    [_TA, _SB, _ETx, _CT, _SBO, _SPr, _SSA, _SSKKI, _EF, _ETxp, _IES],
    [0, 0, 4, [0, 4], 0, 0, 0, 0, 0, 0, () => IncrementalExportSpecification$],
    2
  ];
  exports2.ExportTableToPointInTimeInput$ = ExportTableToPointInTimeInput$;
  var ExportTableToPointInTimeOutput$ = [
    3,
    n0,
    _ETTPITO,
    0,
    [_ED],
    [() => ExportDescription$]
  ];
  exports2.ExportTableToPointInTimeOutput$ = ExportTableToPointInTimeOutput$;
  var FailureException$ = [
    3,
    n0,
    _FE,
    0,
    [_EN, _EDx],
    [0, 0]
  ];
  exports2.FailureException$ = FailureException$;
  var Get$ = [
    3,
    n0,
    _G,
    0,
    [_K, _TN, _PE, _EAN],
    [() => Key, 0, 0, 128 | 0],
    2
  ];
  exports2.Get$ = Get$;
  var GetItemInput$ = [
    3,
    n0,
    _GII,
    0,
    [_TN, _K, _ATG, _CRo, _RCC, _PE, _EAN],
    [0, () => Key, 64 | 0, 2, 0, 0, 128 | 0],
    2
  ];
  exports2.GetItemInput$ = GetItemInput$;
  var GetItemOutput$ = [
    3,
    n0,
    _GIO,
    0,
    [_I, _CC],
    [() => AttributeMap, () => ConsumedCapacity$]
  ];
  exports2.GetItemOutput$ = GetItemOutput$;
  var GetResourcePolicyInput$ = [
    3,
    n0,
    _GRPI,
    0,
    [_RA],
    [0],
    1
  ];
  exports2.GetResourcePolicyInput$ = GetResourcePolicyInput$;
  var GetResourcePolicyOutput$ = [
    3,
    n0,
    _GRPO,
    0,
    [_Po, _RIe],
    [0, 0]
  ];
  exports2.GetResourcePolicyOutput$ = GetResourcePolicyOutput$;
  var GlobalSecondaryIndex$ = [
    3,
    n0,
    _GSIl,
    0,
    [_IN, _KS, _Pr, _PT, _ODT, _WT],
    [0, () => KeySchema, () => Projection$, () => ProvisionedThroughput$, () => OnDemandThroughput$, () => WarmThroughput$],
    3
  ];
  exports2.GlobalSecondaryIndex$ = GlobalSecondaryIndex$;
  var GlobalSecondaryIndexAutoScalingUpdate$ = [
    3,
    n0,
    _GSIASU,
    0,
    [_IN, _PWCASU],
    [0, () => AutoScalingSettingsUpdate$]
  ];
  exports2.GlobalSecondaryIndexAutoScalingUpdate$ = GlobalSecondaryIndexAutoScalingUpdate$;
  var GlobalSecondaryIndexDescription$ = [
    3,
    n0,
    _GSID,
    0,
    [_IN, _KS, _Pr, _IS, _B, _PT, _ISB, _IC, _IAn, _ODT, _WT],
    [0, () => KeySchema, () => Projection$, 0, 2, () => ProvisionedThroughputDescription$, 1, 1, 0, () => OnDemandThroughput$, () => GlobalSecondaryIndexWarmThroughputDescription$]
  ];
  exports2.GlobalSecondaryIndexDescription$ = GlobalSecondaryIndexDescription$;
  var GlobalSecondaryIndexInfo$ = [
    3,
    n0,
    _GSII,
    0,
    [_IN, _KS, _Pr, _PT, _ODT],
    [0, () => KeySchema, () => Projection$, () => ProvisionedThroughput$, () => OnDemandThroughput$]
  ];
  exports2.GlobalSecondaryIndexInfo$ = GlobalSecondaryIndexInfo$;
  var GlobalSecondaryIndexUpdate$ = [
    3,
    n0,
    _GSIU,
    0,
    [_U, _Cr, _De],
    [() => UpdateGlobalSecondaryIndexAction$, () => CreateGlobalSecondaryIndexAction$, () => DeleteGlobalSecondaryIndexAction$]
  ];
  exports2.GlobalSecondaryIndexUpdate$ = GlobalSecondaryIndexUpdate$;
  var GlobalSecondaryIndexWarmThroughputDescription$ = [
    3,
    n0,
    _GSIWTD,
    0,
    [_RUPS, _WUPS, _Sta],
    [1, 1, 0]
  ];
  exports2.GlobalSecondaryIndexWarmThroughputDescription$ = GlobalSecondaryIndexWarmThroughputDescription$;
  var GlobalTable$ = [
    3,
    n0,
    _GT,
    0,
    [_GTN, _RG],
    [0, () => ReplicaList]
  ];
  exports2.GlobalTable$ = GlobalTable$;
  var GlobalTableDescription$ = [
    3,
    n0,
    _GTD,
    0,
    [_RG, _GTA, _CDT, _GTS, _GTN],
    [() => ReplicaDescriptionList, 0, 4, 0, 0]
  ];
  exports2.GlobalTableDescription$ = GlobalTableDescription$;
  var GlobalTableGlobalSecondaryIndexSettingsUpdate$ = [
    3,
    n0,
    _GTGSISU,
    0,
    [_IN, _PWCU, _PWCASSU],
    [0, 1, () => AutoScalingSettingsUpdate$],
    1
  ];
  exports2.GlobalTableGlobalSecondaryIndexSettingsUpdate$ = GlobalTableGlobalSecondaryIndexSettingsUpdate$;
  var GlobalTableWitnessDescription$ = [
    3,
    n0,
    _GTWD,
    0,
    [_RN, _WS],
    [0, 0]
  ];
  exports2.GlobalTableWitnessDescription$ = GlobalTableWitnessDescription$;
  var GlobalTableWitnessGroupUpdate$ = [
    3,
    n0,
    _GTWGU,
    0,
    [_Cr, _De],
    [() => CreateGlobalTableWitnessGroupMemberAction$, () => DeleteGlobalTableWitnessGroupMemberAction$]
  ];
  exports2.GlobalTableWitnessGroupUpdate$ = GlobalTableWitnessGroupUpdate$;
  var ImportSummary$ = [
    3,
    n0,
    _ISm,
    0,
    [_IA, _ISmp, _TA, _SBS, _CWLGA, _IF, _ST, _ET],
    [0, 0, 0, () => S3BucketSource$, 0, 0, 4, 4]
  ];
  exports2.ImportSummary$ = ImportSummary$;
  var ImportTableDescription$ = [
    3,
    n0,
    _ITD,
    0,
    [_IA, _ISmp, _TA, _TI, _CT, _SBS, _EC, _CWLGA, _IF, _IFO, _ICT, _TCP, _ST, _ET, _PSB, _PIC, _IIC, _FC, _FM],
    [0, 0, 0, 0, 0, () => S3BucketSource$, 1, 0, 0, () => InputFormatOptions$, 0, () => TableCreationParameters$, 4, 4, 1, 1, 1, 0, 0]
  ];
  exports2.ImportTableDescription$ = ImportTableDescription$;
  var ImportTableInput$ = [
    3,
    n0,
    _ITI,
    0,
    [_SBS, _IF, _TCP, _CT, _IFO, _ICT],
    [() => S3BucketSource$, 0, () => TableCreationParameters$, [0, 4], () => InputFormatOptions$, 0],
    3
  ];
  exports2.ImportTableInput$ = ImportTableInput$;
  var ImportTableOutput$ = [
    3,
    n0,
    _ITO,
    0,
    [_ITD],
    [() => ImportTableDescription$],
    1
  ];
  exports2.ImportTableOutput$ = ImportTableOutput$;
  var IncrementalExportSpecification$ = [
    3,
    n0,
    _IES,
    0,
    [_EFT, _ETT, _EVT],
    [4, 4, 0]
  ];
  exports2.IncrementalExportSpecification$ = IncrementalExportSpecification$;
  var InputFormatOptions$ = [
    3,
    n0,
    _IFO,
    0,
    [_Cs],
    [() => CsvOptions$]
  ];
  exports2.InputFormatOptions$ = InputFormatOptions$;
  var ItemCollectionMetrics$ = [
    3,
    n0,
    _ICM,
    0,
    [_ICK, _SERGB],
    [() => ItemCollectionKeyAttributeMap, 64 | 1]
  ];
  exports2.ItemCollectionMetrics$ = ItemCollectionMetrics$;
  var ItemResponse$ = [
    3,
    n0,
    _IR,
    0,
    [_I],
    [() => AttributeMap]
  ];
  exports2.ItemResponse$ = ItemResponse$;
  var KeysAndAttributes$ = [
    3,
    n0,
    _KAA,
    0,
    [_Ke, _ATG, _CRo, _PE, _EAN],
    [() => KeyList, 64 | 0, 2, 0, 128 | 0],
    1
  ];
  exports2.KeysAndAttributes$ = KeysAndAttributes$;
  var KeySchemaElement$ = [
    3,
    n0,
    _KSE,
    0,
    [_AN, _KT],
    [0, 0],
    2
  ];
  exports2.KeySchemaElement$ = KeySchemaElement$;
  var KinesisDataStreamDestination$ = [
    3,
    n0,
    _KDSDi,
    0,
    [_SA, _DS, _DSD, _ACDTP],
    [0, 0, 0, 0]
  ];
  exports2.KinesisDataStreamDestination$ = KinesisDataStreamDestination$;
  var KinesisStreamingDestinationInput$ = [
    3,
    n0,
    _KSDI,
    0,
    [_TN, _SA, _EKSC],
    [0, 0, () => EnableKinesisStreamingConfiguration$],
    2
  ];
  exports2.KinesisStreamingDestinationInput$ = KinesisStreamingDestinationInput$;
  var KinesisStreamingDestinationOutput$ = [
    3,
    n0,
    _KSDO,
    0,
    [_TN, _SA, _DS, _EKSC],
    [0, 0, 0, () => EnableKinesisStreamingConfiguration$]
  ];
  exports2.KinesisStreamingDestinationOutput$ = KinesisStreamingDestinationOutput$;
  var ListBackupsInput$ = [
    3,
    n0,
    _LBI,
    0,
    [_TN, _L, _TRLB, _TRUB, _ESBA, _BT],
    [0, 1, 4, 4, 0, 0]
  ];
  exports2.ListBackupsInput$ = ListBackupsInput$;
  var ListBackupsOutput$ = [
    3,
    n0,
    _LBO,
    0,
    [_BSac, _LEBA],
    [() => BackupSummaries, 0]
  ];
  exports2.ListBackupsOutput$ = ListBackupsOutput$;
  var ListContributorInsightsInput$ = [
    3,
    n0,
    _LCII,
    0,
    [_TN, _NT, _MR],
    [0, 0, 1]
  ];
  exports2.ListContributorInsightsInput$ = ListContributorInsightsInput$;
  var ListContributorInsightsOutput$ = [
    3,
    n0,
    _LCIO,
    0,
    [_CISon, _NT],
    [() => ContributorInsightsSummaries, 0]
  ];
  exports2.ListContributorInsightsOutput$ = ListContributorInsightsOutput$;
  var ListExportsInput$ = [
    3,
    n0,
    _LEI,
    0,
    [_TA, _MR, _NT],
    [0, 1, 0]
  ];
  exports2.ListExportsInput$ = ListExportsInput$;
  var ListExportsOutput$ = [
    3,
    n0,
    _LEO,
    0,
    [_ESxp, _NT],
    [() => ExportSummaries, 0]
  ];
  exports2.ListExportsOutput$ = ListExportsOutput$;
  var ListGlobalTablesInput$ = [
    3,
    n0,
    _LGTI,
    0,
    [_ESGTN, _L, _RN],
    [0, 1, 0]
  ];
  exports2.ListGlobalTablesInput$ = ListGlobalTablesInput$;
  var ListGlobalTablesOutput$ = [
    3,
    n0,
    _LGTO,
    0,
    [_GTl, _LEGTN],
    [() => GlobalTableList, 0]
  ];
  exports2.ListGlobalTablesOutput$ = ListGlobalTablesOutput$;
  var ListImportsInput$ = [
    3,
    n0,
    _LII,
    0,
    [_TA, _PS, _NT],
    [0, 1, 0]
  ];
  exports2.ListImportsInput$ = ListImportsInput$;
  var ListImportsOutput$ = [
    3,
    n0,
    _LIO,
    0,
    [_ISL, _NT],
    [() => ImportSummaryList, 0]
  ];
  exports2.ListImportsOutput$ = ListImportsOutput$;
  var ListTablesInput$ = [
    3,
    n0,
    _LTI,
    0,
    [_ESTN, _L],
    [0, 1]
  ];
  exports2.ListTablesInput$ = ListTablesInput$;
  var ListTablesOutput$ = [
    3,
    n0,
    _LTO,
    0,
    [_TNa, _LETN],
    [64 | 0, 0]
  ];
  exports2.ListTablesOutput$ = ListTablesOutput$;
  var ListTagsOfResourceInput$ = [
    3,
    n0,
    _LTORI,
    0,
    [_RA, _NT],
    [0, 0],
    1
  ];
  exports2.ListTagsOfResourceInput$ = ListTagsOfResourceInput$;
  var ListTagsOfResourceOutput$ = [
    3,
    n0,
    _LTORO,
    0,
    [_Ta, _NT],
    [() => TagList, 0]
  ];
  exports2.ListTagsOfResourceOutput$ = ListTagsOfResourceOutput$;
  var LocalSecondaryIndex$ = [
    3,
    n0,
    _LSIo,
    0,
    [_IN, _KS, _Pr],
    [0, () => KeySchema, () => Projection$],
    3
  ];
  exports2.LocalSecondaryIndex$ = LocalSecondaryIndex$;
  var LocalSecondaryIndexDescription$ = [
    3,
    n0,
    _LSID,
    0,
    [_IN, _KS, _Pr, _ISB, _IC, _IAn],
    [0, () => KeySchema, () => Projection$, 1, 1, 0]
  ];
  exports2.LocalSecondaryIndexDescription$ = LocalSecondaryIndexDescription$;
  var LocalSecondaryIndexInfo$ = [
    3,
    n0,
    _LSII,
    0,
    [_IN, _KS, _Pr],
    [0, () => KeySchema, () => Projection$]
  ];
  exports2.LocalSecondaryIndexInfo$ = LocalSecondaryIndexInfo$;
  var OnDemandThroughput$ = [
    3,
    n0,
    _ODT,
    0,
    [_MRRU, _MWRU],
    [1, 1]
  ];
  exports2.OnDemandThroughput$ = OnDemandThroughput$;
  var OnDemandThroughputOverride$ = [
    3,
    n0,
    _ODTO,
    0,
    [_MRRU],
    [1]
  ];
  exports2.OnDemandThroughputOverride$ = OnDemandThroughputOverride$;
  var ParameterizedStatement$ = [
    3,
    n0,
    _PSa,
    0,
    [_St, _P, _RVOCCF],
    [0, () => PreparedStatementParameters, 0],
    1
  ];
  exports2.ParameterizedStatement$ = ParameterizedStatement$;
  var PointInTimeRecoveryDescription$ = [
    3,
    n0,
    _PITRD,
    0,
    [_PITRS, _RPID, _ERDT, _LRDT],
    [0, 1, 4, 4]
  ];
  exports2.PointInTimeRecoveryDescription$ = PointInTimeRecoveryDescription$;
  var PointInTimeRecoverySpecification$ = [
    3,
    n0,
    _PITRSo,
    0,
    [_PITRE, _RPID],
    [2, 1],
    1
  ];
  exports2.PointInTimeRecoverySpecification$ = PointInTimeRecoverySpecification$;
  var Projection$ = [
    3,
    n0,
    _Pr,
    0,
    [_PTr, _NKA],
    [0, 64 | 0]
  ];
  exports2.Projection$ = Projection$;
  var ProvisionedThroughput$ = [
    3,
    n0,
    _PT,
    0,
    [_RCU, _WCU],
    [1, 1],
    2
  ];
  exports2.ProvisionedThroughput$ = ProvisionedThroughput$;
  var ProvisionedThroughputDescription$ = [
    3,
    n0,
    _PTD,
    0,
    [_LIDT, _LDDT, _NODT, _RCU, _WCU],
    [4, 4, 1, 1, 1]
  ];
  exports2.ProvisionedThroughputDescription$ = ProvisionedThroughputDescription$;
  var ProvisionedThroughputOverride$ = [
    3,
    n0,
    _PTO,
    0,
    [_RCU],
    [1]
  ];
  exports2.ProvisionedThroughputOverride$ = ProvisionedThroughputOverride$;
  var Put$ = [
    3,
    n0,
    _Pu,
    0,
    [_I, _TN, _CE, _EAN, _EAV, _RVOCCF],
    [() => PutItemInputAttributeMap, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 0],
    2
  ];
  exports2.Put$ = Put$;
  var PutItemInput$ = [
    3,
    n0,
    _PII,
    0,
    [_TN, _I, _Ex, _RV, _RCC, _RICM, _COo, _CE, _EAN, _EAV, _RVOCCF],
    [0, () => PutItemInputAttributeMap, () => ExpectedAttributeMap, 0, 0, 0, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 0],
    2
  ];
  exports2.PutItemInput$ = PutItemInput$;
  var PutItemOutput$ = [
    3,
    n0,
    _PIO,
    0,
    [_At, _CC, _ICM],
    [() => AttributeMap, () => ConsumedCapacity$, () => ItemCollectionMetrics$]
  ];
  exports2.PutItemOutput$ = PutItemOutput$;
  var PutRequest$ = [
    3,
    n0,
    _PR,
    0,
    [_I],
    [() => PutItemInputAttributeMap],
    1
  ];
  exports2.PutRequest$ = PutRequest$;
  var PutResourcePolicyInput$ = [
    3,
    n0,
    _PRPI,
    0,
    [_RA, _Po, _ERI, _CRSRA],
    [0, 0, 0, [2, { [_hH]: _xacrsra }]],
    2
  ];
  exports2.PutResourcePolicyInput$ = PutResourcePolicyInput$;
  var PutResourcePolicyOutput$ = [
    3,
    n0,
    _PRPO,
    0,
    [_RIe],
    [0]
  ];
  exports2.PutResourcePolicyOutput$ = PutResourcePolicyOutput$;
  var QueryInput$ = [
    3,
    n0,
    _QI,
    0,
    [_TN, _IN, _Se, _ATG, _L, _CRo, _KC, _QF, _COo, _SIF, _ESK, _RCC, _PE, _FEi, _KCE, _EAN, _EAV],
    [0, 0, 0, 64 | 0, 1, 2, () => KeyConditions, () => FilterConditionMap, 0, 2, () => Key, 0, 0, 0, 0, 128 | 0, () => ExpressionAttributeValueMap],
    1
  ];
  exports2.QueryInput$ = QueryInput$;
  var QueryOutput$ = [
    3,
    n0,
    _QO,
    0,
    [_It, _Cou, _SC, _LEK, _CC],
    [() => ItemList, 1, 1, () => Key, () => ConsumedCapacity$]
  ];
  exports2.QueryOutput$ = QueryOutput$;
  var Replica$ = [
    3,
    n0,
    _Re,
    0,
    [_RN],
    [0]
  ];
  exports2.Replica$ = Replica$;
  var ReplicaAutoScalingDescription$ = [
    3,
    n0,
    _RASD,
    0,
    [_RN, _GSI, _RPRCASS, _RPWCASS, _RSe],
    [0, () => ReplicaGlobalSecondaryIndexAutoScalingDescriptionList, () => AutoScalingSettingsDescription$, () => AutoScalingSettingsDescription$, 0]
  ];
  exports2.ReplicaAutoScalingDescription$ = ReplicaAutoScalingDescription$;
  var ReplicaAutoScalingUpdate$ = [
    3,
    n0,
    _RASU,
    0,
    [_RN, _RGSIU, _RPRCASU],
    [0, () => ReplicaGlobalSecondaryIndexAutoScalingUpdateList, () => AutoScalingSettingsUpdate$],
    1
  ];
  exports2.ReplicaAutoScalingUpdate$ = ReplicaAutoScalingUpdate$;
  var ReplicaDescription$ = [
    3,
    n0,
    _RD,
    0,
    [_RN, _RSe, _RAe, _RSD, _RSPP, _KMSMKI, _PTO, _ODTO, _WT, _GSI, _RIDT, _RTCS, _GTSRM],
    [0, 0, 0, 0, 0, 0, () => ProvisionedThroughputOverride$, () => OnDemandThroughputOverride$, () => TableWarmThroughputDescription$, () => ReplicaGlobalSecondaryIndexDescriptionList, 4, () => TableClassSummary$, 0]
  ];
  exports2.ReplicaDescription$ = ReplicaDescription$;
  var ReplicaGlobalSecondaryIndex$ = [
    3,
    n0,
    _RGSI,
    0,
    [_IN, _PTO, _ODTO],
    [0, () => ProvisionedThroughputOverride$, () => OnDemandThroughputOverride$],
    1
  ];
  exports2.ReplicaGlobalSecondaryIndex$ = ReplicaGlobalSecondaryIndex$;
  var ReplicaGlobalSecondaryIndexAutoScalingDescription$ = [
    3,
    n0,
    _RGSIASD,
    0,
    [_IN, _IS, _PRCASS, _PWCASS],
    [0, 0, () => AutoScalingSettingsDescription$, () => AutoScalingSettingsDescription$]
  ];
  exports2.ReplicaGlobalSecondaryIndexAutoScalingDescription$ = ReplicaGlobalSecondaryIndexAutoScalingDescription$;
  var ReplicaGlobalSecondaryIndexAutoScalingUpdate$ = [
    3,
    n0,
    _RGSIASU,
    0,
    [_IN, _PRCASU],
    [0, () => AutoScalingSettingsUpdate$]
  ];
  exports2.ReplicaGlobalSecondaryIndexAutoScalingUpdate$ = ReplicaGlobalSecondaryIndexAutoScalingUpdate$;
  var ReplicaGlobalSecondaryIndexDescription$ = [
    3,
    n0,
    _RGSID,
    0,
    [_IN, _PTO, _ODTO, _WT],
    [0, () => ProvisionedThroughputOverride$, () => OnDemandThroughputOverride$, () => GlobalSecondaryIndexWarmThroughputDescription$]
  ];
  exports2.ReplicaGlobalSecondaryIndexDescription$ = ReplicaGlobalSecondaryIndexDescription$;
  var ReplicaGlobalSecondaryIndexSettingsDescription$ = [
    3,
    n0,
    _RGSISD,
    0,
    [_IN, _IS, _PRCU, _PRCASS, _PWCU, _PWCASS],
    [0, 0, 1, () => AutoScalingSettingsDescription$, 1, () => AutoScalingSettingsDescription$],
    1
  ];
  exports2.ReplicaGlobalSecondaryIndexSettingsDescription$ = ReplicaGlobalSecondaryIndexSettingsDescription$;
  var ReplicaGlobalSecondaryIndexSettingsUpdate$ = [
    3,
    n0,
    _RGSISU,
    0,
    [_IN, _PRCU, _PRCASSU],
    [0, 1, () => AutoScalingSettingsUpdate$],
    1
  ];
  exports2.ReplicaGlobalSecondaryIndexSettingsUpdate$ = ReplicaGlobalSecondaryIndexSettingsUpdate$;
  var ReplicaSettingsDescription$ = [
    3,
    n0,
    _RSDe,
    0,
    [_RN, _RSe, _RBMS, _RPRCU, _RPRCASS, _RPWCU, _RPWCASS, _RGSIS, _RTCS],
    [0, 0, () => BillingModeSummary$, 1, () => AutoScalingSettingsDescription$, 1, () => AutoScalingSettingsDescription$, () => ReplicaGlobalSecondaryIndexSettingsDescriptionList, () => TableClassSummary$],
    1
  ];
  exports2.ReplicaSettingsDescription$ = ReplicaSettingsDescription$;
  var ReplicaSettingsUpdate$ = [
    3,
    n0,
    _RSU,
    0,
    [_RN, _RPRCU, _RPRCASSU, _RGSISU, _RTC],
    [0, 1, () => AutoScalingSettingsUpdate$, () => ReplicaGlobalSecondaryIndexSettingsUpdateList, 0],
    1
  ];
  exports2.ReplicaSettingsUpdate$ = ReplicaSettingsUpdate$;
  var ReplicationGroupUpdate$ = [
    3,
    n0,
    _RGU,
    0,
    [_Cr, _U, _De],
    [() => CreateReplicationGroupMemberAction$, () => UpdateReplicationGroupMemberAction$, () => DeleteReplicationGroupMemberAction$]
  ];
  exports2.ReplicationGroupUpdate$ = ReplicationGroupUpdate$;
  var ReplicaUpdate$ = [
    3,
    n0,
    _RU,
    0,
    [_Cr, _De],
    [() => CreateReplicaAction$, () => DeleteReplicaAction$]
  ];
  exports2.ReplicaUpdate$ = ReplicaUpdate$;
  var RestoreSummary$ = [
    3,
    n0,
    _RSes,
    0,
    [_RDT, _RIP, _SBA, _STA],
    [4, 2, 0, 0],
    2
  ];
  exports2.RestoreSummary$ = RestoreSummary$;
  var RestoreTableFromBackupInput$ = [
    3,
    n0,
    _RTFBI,
    0,
    [_TTN, _BA, _BMO, _GSIO, _LSIO, _PTO, _ODTO, _SSESO],
    [0, 0, 0, () => GlobalSecondaryIndexList, () => LocalSecondaryIndexList, () => ProvisionedThroughput$, () => OnDemandThroughput$, () => SSESpecification$],
    2
  ];
  exports2.RestoreTableFromBackupInput$ = RestoreTableFromBackupInput$;
  var RestoreTableFromBackupOutput$ = [
    3,
    n0,
    _RTFBO,
    0,
    [_TD],
    [() => TableDescription$]
  ];
  exports2.RestoreTableFromBackupOutput$ = RestoreTableFromBackupOutput$;
  var RestoreTableToPointInTimeInput$ = [
    3,
    n0,
    _RTTPITI,
    0,
    [_TTN, _STA, _STN, _ULRT, _RDT, _BMO, _GSIO, _LSIO, _PTO, _ODTO, _SSESO],
    [0, 0, 0, 2, 4, 0, () => GlobalSecondaryIndexList, () => LocalSecondaryIndexList, () => ProvisionedThroughput$, () => OnDemandThroughput$, () => SSESpecification$],
    1
  ];
  exports2.RestoreTableToPointInTimeInput$ = RestoreTableToPointInTimeInput$;
  var RestoreTableToPointInTimeOutput$ = [
    3,
    n0,
    _RTTPITO,
    0,
    [_TD],
    [() => TableDescription$]
  ];
  exports2.RestoreTableToPointInTimeOutput$ = RestoreTableToPointInTimeOutput$;
  var S3BucketSource$ = [
    3,
    n0,
    _SBS,
    0,
    [_SB, _SBO, _SKP],
    [0, 0, 0],
    1
  ];
  exports2.S3BucketSource$ = S3BucketSource$;
  var ScanInput$ = [
    3,
    n0,
    _SI,
    0,
    [_TN, _IN, _ATG, _L, _Se, _SF, _COo, _ESK, _RCC, _TSo, _Seg, _PE, _FEi, _EAN, _EAV, _CRo],
    [0, 0, 64 | 0, 1, 0, () => FilterConditionMap, 0, () => Key, 0, 1, 1, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 2],
    1
  ];
  exports2.ScanInput$ = ScanInput$;
  var ScanOutput$ = [
    3,
    n0,
    _SO,
    0,
    [_It, _Cou, _SC, _LEK, _CC],
    [() => ItemList, 1, 1, () => Key, () => ConsumedCapacity$]
  ];
  exports2.ScanOutput$ = ScanOutput$;
  var SourceTableDetails$ = [
    3,
    n0,
    _STD,
    0,
    [_TN, _TI, _KS, _TCDT, _PT, _TA, _TSB, _ODT, _IC, _BM],
    [0, 0, () => KeySchema, 4, () => ProvisionedThroughput$, 0, 1, () => OnDemandThroughput$, 1, 0],
    5
  ];
  exports2.SourceTableDetails$ = SourceTableDetails$;
  var SourceTableFeatureDetails$ = [
    3,
    n0,
    _STFD,
    0,
    [_LSI, _GSI, _SD, _TTLD, _SSED],
    [() => LocalSecondaryIndexes, () => GlobalSecondaryIndexes, () => StreamSpecification$, () => TimeToLiveDescription$, () => SSEDescription$]
  ];
  exports2.SourceTableFeatureDetails$ = SourceTableFeatureDetails$;
  var SSEDescription$ = [
    3,
    n0,
    _SSED,
    0,
    [_Sta, _SSET, _KMSMKA, _IEDT],
    [0, 0, 0, 4]
  ];
  exports2.SSEDescription$ = SSEDescription$;
  var SSESpecification$ = [
    3,
    n0,
    _SSES,
    0,
    [_Ena, _SSET, _KMSMKI],
    [2, 0, 0]
  ];
  exports2.SSESpecification$ = SSESpecification$;
  var StreamSpecification$ = [
    3,
    n0,
    _SS,
    0,
    [_SE, _SVT],
    [2, 0],
    1
  ];
  exports2.StreamSpecification$ = StreamSpecification$;
  var TableAutoScalingDescription$ = [
    3,
    n0,
    _TASD,
    0,
    [_TN, _TSa, _Rep],
    [0, 0, () => ReplicaAutoScalingDescriptionList]
  ];
  exports2.TableAutoScalingDescription$ = TableAutoScalingDescription$;
  var TableClassSummary$ = [
    3,
    n0,
    _TCS,
    0,
    [_TC, _LUDT],
    [0, 4]
  ];
  exports2.TableClassSummary$ = TableClassSummary$;
  var TableCreationParameters$ = [
    3,
    n0,
    _TCP,
    0,
    [_TN, _ADt, _KS, _BM, _PT, _ODT, _SSES, _GSI],
    [0, () => AttributeDefinitions, () => KeySchema, 0, () => ProvisionedThroughput$, () => OnDemandThroughput$, () => SSESpecification$, () => GlobalSecondaryIndexList],
    3
  ];
  exports2.TableCreationParameters$ = TableCreationParameters$;
  var TableDescription$ = [
    3,
    n0,
    _TD,
    0,
    [_ADt, _TN, _KS, _TSa, _CDT, _PT, _TSB, _IC, _TA, _TI, _BMS, _LSI, _GSI, _SS, _LSL, _LSA, _GTV, _Rep, _GTW, _GTSRM, _RSes, _SSED, _AS, _TCS, _DPE, _ODT, _WT, _MRC],
    [() => AttributeDefinitions, 0, () => KeySchema, 0, 4, () => ProvisionedThroughputDescription$, 1, 1, 0, 0, () => BillingModeSummary$, () => LocalSecondaryIndexDescriptionList, () => GlobalSecondaryIndexDescriptionList, () => StreamSpecification$, 0, 0, 0, () => ReplicaDescriptionList, () => GlobalTableWitnessDescriptionList, 0, () => RestoreSummary$, () => SSEDescription$, () => ArchivalSummary$, () => TableClassSummary$, 2, () => OnDemandThroughput$, () => TableWarmThroughputDescription$, 0]
  ];
  exports2.TableDescription$ = TableDescription$;
  var TableWarmThroughputDescription$ = [
    3,
    n0,
    _TWTD,
    0,
    [_RUPS, _WUPS, _Sta],
    [1, 1, 0]
  ];
  exports2.TableWarmThroughputDescription$ = TableWarmThroughputDescription$;
  var Tag$ = [
    3,
    n0,
    _Tag,
    0,
    [_K, _V],
    [0, 0],
    2
  ];
  exports2.Tag$ = Tag$;
  var TagResourceInput$ = [
    3,
    n0,
    _TRI,
    0,
    [_RA, _Ta],
    [0, () => TagList],
    2
  ];
  exports2.TagResourceInput$ = TagResourceInput$;
  var ThrottlingReason$ = [
    3,
    n0,
    _TRh,
    0,
    [_r4, _re],
    [0, 0]
  ];
  exports2.ThrottlingReason$ = ThrottlingReason$;
  var TimeToLiveDescription$ = [
    3,
    n0,
    _TTLD,
    0,
    [_TTLS, _AN],
    [0, 0]
  ];
  exports2.TimeToLiveDescription$ = TimeToLiveDescription$;
  var TimeToLiveSpecification$ = [
    3,
    n0,
    _TTLSi,
    0,
    [_Ena, _AN],
    [2, 0],
    2
  ];
  exports2.TimeToLiveSpecification$ = TimeToLiveSpecification$;
  var TransactGetItem$ = [
    3,
    n0,
    _TGI,
    0,
    [_G],
    [() => Get$],
    1
  ];
  exports2.TransactGetItem$ = TransactGetItem$;
  var TransactGetItemsInput$ = [
    3,
    n0,
    _TGII,
    0,
    [_TIr, _RCC],
    [() => TransactGetItemList, 0],
    1
  ];
  exports2.TransactGetItemsInput$ = TransactGetItemsInput$;
  var TransactGetItemsOutput$ = [
    3,
    n0,
    _TGIO,
    0,
    [_CC, _R],
    [() => ConsumedCapacityMultiple, () => ItemResponseList]
  ];
  exports2.TransactGetItemsOutput$ = TransactGetItemsOutput$;
  var TransactWriteItem$ = [
    3,
    n0,
    _TWI,
    0,
    [_CCo, _Pu, _De, _U],
    [() => ConditionCheck$, () => Put$, () => Delete$, () => Update$]
  ];
  exports2.TransactWriteItem$ = TransactWriteItem$;
  var TransactWriteItemsInput$ = [
    3,
    n0,
    _TWII,
    0,
    [_TIr, _RCC, _RICM, _CRT],
    [() => TransactWriteItemList, 0, 0, [0, 4]],
    1
  ];
  exports2.TransactWriteItemsInput$ = TransactWriteItemsInput$;
  var TransactWriteItemsOutput$ = [
    3,
    n0,
    _TWIO,
    0,
    [_CC, _ICM],
    [() => ConsumedCapacityMultiple, () => ItemCollectionMetricsPerTable]
  ];
  exports2.TransactWriteItemsOutput$ = TransactWriteItemsOutput$;
  var UntagResourceInput$ = [
    3,
    n0,
    _URI,
    0,
    [_RA, _TK],
    [0, 64 | 0],
    2
  ];
  exports2.UntagResourceInput$ = UntagResourceInput$;
  var Update$ = [
    3,
    n0,
    _U,
    0,
    [_K, _UE, _TN, _CE, _EAN, _EAV, _RVOCCF],
    [() => Key, 0, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 0],
    3
  ];
  exports2.Update$ = Update$;
  var UpdateContinuousBackupsInput$ = [
    3,
    n0,
    _UCBI,
    0,
    [_TN, _PITRSo],
    [0, () => PointInTimeRecoverySpecification$],
    2
  ];
  exports2.UpdateContinuousBackupsInput$ = UpdateContinuousBackupsInput$;
  var UpdateContinuousBackupsOutput$ = [
    3,
    n0,
    _UCBO,
    0,
    [_CBD],
    [() => ContinuousBackupsDescription$]
  ];
  exports2.UpdateContinuousBackupsOutput$ = UpdateContinuousBackupsOutput$;
  var UpdateContributorInsightsInput$ = [
    3,
    n0,
    _UCII,
    0,
    [_TN, _CIA, _IN, _CIM],
    [0, 0, 0, 0],
    2
  ];
  exports2.UpdateContributorInsightsInput$ = UpdateContributorInsightsInput$;
  var UpdateContributorInsightsOutput$ = [
    3,
    n0,
    _UCIO,
    0,
    [_TN, _IN, _CISo, _CIM],
    [0, 0, 0, 0]
  ];
  exports2.UpdateContributorInsightsOutput$ = UpdateContributorInsightsOutput$;
  var UpdateGlobalSecondaryIndexAction$ = [
    3,
    n0,
    _UGSIA,
    0,
    [_IN, _PT, _ODT, _WT],
    [0, () => ProvisionedThroughput$, () => OnDemandThroughput$, () => WarmThroughput$],
    1
  ];
  exports2.UpdateGlobalSecondaryIndexAction$ = UpdateGlobalSecondaryIndexAction$;
  var UpdateGlobalTableInput$ = [
    3,
    n0,
    _UGTI,
    0,
    [_GTN, _RUe],
    [0, () => ReplicaUpdateList],
    2
  ];
  exports2.UpdateGlobalTableInput$ = UpdateGlobalTableInput$;
  var UpdateGlobalTableOutput$ = [
    3,
    n0,
    _UGTO,
    0,
    [_GTD],
    [() => GlobalTableDescription$]
  ];
  exports2.UpdateGlobalTableOutput$ = UpdateGlobalTableOutput$;
  var UpdateGlobalTableSettingsInput$ = [
    3,
    n0,
    _UGTSI,
    0,
    [_GTN, _GTBM, _GTPWCU, _GTPWCASSU, _GTGSISU, _RSU],
    [0, 0, 1, () => AutoScalingSettingsUpdate$, () => GlobalTableGlobalSecondaryIndexSettingsUpdateList, () => ReplicaSettingsUpdateList],
    1
  ];
  exports2.UpdateGlobalTableSettingsInput$ = UpdateGlobalTableSettingsInput$;
  var UpdateGlobalTableSettingsOutput$ = [
    3,
    n0,
    _UGTSO,
    0,
    [_GTN, _RS],
    [0, () => ReplicaSettingsDescriptionList]
  ];
  exports2.UpdateGlobalTableSettingsOutput$ = UpdateGlobalTableSettingsOutput$;
  var UpdateItemInput$ = [
    3,
    n0,
    _UII,
    0,
    [_TN, _K, _AU, _Ex, _COo, _RV, _RCC, _RICM, _UE, _CE, _EAN, _EAV, _RVOCCF],
    [0, () => Key, () => AttributeUpdates, () => ExpectedAttributeMap, 0, 0, 0, 0, 0, 0, 128 | 0, () => ExpressionAttributeValueMap, 0],
    2
  ];
  exports2.UpdateItemInput$ = UpdateItemInput$;
  var UpdateItemOutput$ = [
    3,
    n0,
    _UIO,
    0,
    [_At, _CC, _ICM],
    [() => AttributeMap, () => ConsumedCapacity$, () => ItemCollectionMetrics$]
  ];
  exports2.UpdateItemOutput$ = UpdateItemOutput$;
  var UpdateKinesisStreamingConfiguration$ = [
    3,
    n0,
    _UKSC,
    0,
    [_ACDTP],
    [0]
  ];
  exports2.UpdateKinesisStreamingConfiguration$ = UpdateKinesisStreamingConfiguration$;
  var UpdateKinesisStreamingDestinationInput$ = [
    3,
    n0,
    _UKSDI,
    0,
    [_TN, _SA, _UKSC],
    [0, 0, () => UpdateKinesisStreamingConfiguration$],
    2
  ];
  exports2.UpdateKinesisStreamingDestinationInput$ = UpdateKinesisStreamingDestinationInput$;
  var UpdateKinesisStreamingDestinationOutput$ = [
    3,
    n0,
    _UKSDO,
    0,
    [_TN, _SA, _DS, _UKSC],
    [0, 0, 0, () => UpdateKinesisStreamingConfiguration$]
  ];
  exports2.UpdateKinesisStreamingDestinationOutput$ = UpdateKinesisStreamingDestinationOutput$;
  var UpdateReplicationGroupMemberAction$ = [
    3,
    n0,
    _URGMA,
    0,
    [_RN, _KMSMKI, _PTO, _ODTO, _GSI, _TCO],
    [0, 0, () => ProvisionedThroughputOverride$, () => OnDemandThroughputOverride$, () => ReplicaGlobalSecondaryIndexList, 0],
    1
  ];
  exports2.UpdateReplicationGroupMemberAction$ = UpdateReplicationGroupMemberAction$;
  var UpdateTableInput$ = [
    3,
    n0,
    _UTI,
    0,
    [_TN, _ADt, _BM, _PT, _GSIUl, _SS, _SSES, _RUe, _TC, _DPE, _MRC, _GTWU, _ODT, _WT, _GTSRM],
    [0, () => AttributeDefinitions, 0, () => ProvisionedThroughput$, () => GlobalSecondaryIndexUpdateList, () => StreamSpecification$, () => SSESpecification$, () => ReplicationGroupUpdateList, 0, 2, 0, () => GlobalTableWitnessGroupUpdateList, () => OnDemandThroughput$, () => WarmThroughput$, 0],
    1
  ];
  exports2.UpdateTableInput$ = UpdateTableInput$;
  var UpdateTableOutput$ = [
    3,
    n0,
    _UTO,
    0,
    [_TD],
    [() => TableDescription$]
  ];
  exports2.UpdateTableOutput$ = UpdateTableOutput$;
  var UpdateTableReplicaAutoScalingInput$ = [
    3,
    n0,
    _UTRASI,
    0,
    [_TN, _GSIUl, _PWCASU, _RUe],
    [0, () => GlobalSecondaryIndexAutoScalingUpdateList, () => AutoScalingSettingsUpdate$, () => ReplicaAutoScalingUpdateList],
    1
  ];
  exports2.UpdateTableReplicaAutoScalingInput$ = UpdateTableReplicaAutoScalingInput$;
  var UpdateTableReplicaAutoScalingOutput$ = [
    3,
    n0,
    _UTRASO,
    0,
    [_TASD],
    [() => TableAutoScalingDescription$]
  ];
  exports2.UpdateTableReplicaAutoScalingOutput$ = UpdateTableReplicaAutoScalingOutput$;
  var UpdateTimeToLiveInput$ = [
    3,
    n0,
    _UTTLI,
    0,
    [_TN, _TTLSi],
    [0, () => TimeToLiveSpecification$],
    2
  ];
  exports2.UpdateTimeToLiveInput$ = UpdateTimeToLiveInput$;
  var UpdateTimeToLiveOutput$ = [
    3,
    n0,
    _UTTLO,
    0,
    [_TTLSi],
    [() => TimeToLiveSpecification$]
  ];
  exports2.UpdateTimeToLiveOutput$ = UpdateTimeToLiveOutput$;
  var WarmThroughput$ = [
    3,
    n0,
    _WT,
    0,
    [_RUPS, _WUPS],
    [1, 1]
  ];
  exports2.WarmThroughput$ = WarmThroughput$;
  var WriteRequest$ = [
    3,
    n0,
    _WR,
    0,
    [_PR, _DR],
    [() => PutRequest$, () => DeleteRequest$]
  ];
  exports2.WriteRequest$ = WriteRequest$;
  var __Unit = "unit";
  var AttributeDefinitions = [
    1,
    n0,
    _ADt,
    0,
    () => AttributeDefinition$
  ];
  var AttributeNameList = 64 | 0;
  var AttributeValueList = [
    1,
    n0,
    _AVL,
    0,
    () => AttributeValue$
  ];
  var AutoScalingPolicyDescriptionList = [
    1,
    n0,
    _ASPDL,
    0,
    () => AutoScalingPolicyDescription$
  ];
  var BackupSummaries = [
    1,
    n0,
    _BSac,
    0,
    () => BackupSummary$
  ];
  var BinarySetAttributeValue = 64 | 21;
  var CancellationReasonList = [
    1,
    n0,
    _CRL,
    0,
    () => CancellationReason$
  ];
  var ConsumedCapacityMultiple = [
    1,
    n0,
    _CCM,
    0,
    () => ConsumedCapacity$
  ];
  var ContributorInsightsRuleList = 64 | 0;
  var ContributorInsightsSummaries = [
    1,
    n0,
    _CISon,
    0,
    () => ContributorInsightsSummary$
  ];
  var CsvHeaderList = 64 | 0;
  var Endpoints = [
    1,
    n0,
    _En,
    0,
    () => Endpoint$
  ];
  var ExportSummaries = [
    1,
    n0,
    _ESxp,
    0,
    () => ExportSummary$
  ];
  var GlobalSecondaryIndexAutoScalingUpdateList = [
    1,
    n0,
    _GSIASUL,
    0,
    () => GlobalSecondaryIndexAutoScalingUpdate$
  ];
  var GlobalSecondaryIndexDescriptionList = [
    1,
    n0,
    _GSIDL,
    0,
    () => GlobalSecondaryIndexDescription$
  ];
  var GlobalSecondaryIndexes = [
    1,
    n0,
    _GSI,
    0,
    () => GlobalSecondaryIndexInfo$
  ];
  var GlobalSecondaryIndexList = [
    1,
    n0,
    _GSIL,
    0,
    () => GlobalSecondaryIndex$
  ];
  var GlobalSecondaryIndexUpdateList = [
    1,
    n0,
    _GSIUL,
    0,
    () => GlobalSecondaryIndexUpdate$
  ];
  var GlobalTableGlobalSecondaryIndexSettingsUpdateList = [
    1,
    n0,
    _GTGSISUL,
    0,
    () => GlobalTableGlobalSecondaryIndexSettingsUpdate$
  ];
  var GlobalTableList = [
    1,
    n0,
    _GTL,
    0,
    () => GlobalTable$
  ];
  var GlobalTableWitnessDescriptionList = [
    1,
    n0,
    _GTWDL,
    0,
    () => GlobalTableWitnessDescription$
  ];
  var GlobalTableWitnessGroupUpdateList = [
    1,
    n0,
    _GTWGUL,
    0,
    () => GlobalTableWitnessGroupUpdate$
  ];
  var ImportSummaryList = [
    1,
    n0,
    _ISL,
    0,
    () => ImportSummary$
  ];
  var ItemCollectionMetricsMultiple = [
    1,
    n0,
    _ICMM,
    0,
    () => ItemCollectionMetrics$
  ];
  var ItemCollectionSizeEstimateRange = 64 | 1;
  var ItemList = [
    1,
    n0,
    _IL,
    0,
    () => AttributeMap
  ];
  var ItemResponseList = [
    1,
    n0,
    _IRL,
    0,
    () => ItemResponse$
  ];
  var KeyList = [
    1,
    n0,
    _KL,
    0,
    () => Key
  ];
  var KeySchema = [
    1,
    n0,
    _KS,
    0,
    () => KeySchemaElement$
  ];
  var KinesisDataStreamDestinations = [
    1,
    n0,
    _KDSD,
    0,
    () => KinesisDataStreamDestination$
  ];
  var ListAttributeValue = [
    1,
    n0,
    _LAV,
    0,
    () => AttributeValue$
  ];
  var LocalSecondaryIndexDescriptionList = [
    1,
    n0,
    _LSIDL,
    0,
    () => LocalSecondaryIndexDescription$
  ];
  var LocalSecondaryIndexes = [
    1,
    n0,
    _LSI,
    0,
    () => LocalSecondaryIndexInfo$
  ];
  var LocalSecondaryIndexList = [
    1,
    n0,
    _LSIL,
    0,
    () => LocalSecondaryIndex$
  ];
  var NonKeyAttributeNameList = 64 | 0;
  var NumberSetAttributeValue = 64 | 0;
  var ParameterizedStatements = [
    1,
    n0,
    _PSar,
    0,
    () => ParameterizedStatement$
  ];
  var PartiQLBatchRequest = [
    1,
    n0,
    _PQLBR,
    0,
    () => BatchStatementRequest$
  ];
  var PartiQLBatchResponse = [
    1,
    n0,
    _PQLBRa,
    0,
    () => BatchStatementResponse$
  ];
  var PreparedStatementParameters = [
    1,
    n0,
    _PSP,
    0,
    () => AttributeValue$
  ];
  var ReplicaAutoScalingDescriptionList = [
    1,
    n0,
    _RASDL,
    0,
    () => ReplicaAutoScalingDescription$
  ];
  var ReplicaAutoScalingUpdateList = [
    1,
    n0,
    _RASUL,
    0,
    () => ReplicaAutoScalingUpdate$
  ];
  var ReplicaDescriptionList = [
    1,
    n0,
    _RDL,
    0,
    () => ReplicaDescription$
  ];
  var ReplicaGlobalSecondaryIndexAutoScalingDescriptionList = [
    1,
    n0,
    _RGSIASDL,
    0,
    () => ReplicaGlobalSecondaryIndexAutoScalingDescription$
  ];
  var ReplicaGlobalSecondaryIndexAutoScalingUpdateList = [
    1,
    n0,
    _RGSIASUL,
    0,
    () => ReplicaGlobalSecondaryIndexAutoScalingUpdate$
  ];
  var ReplicaGlobalSecondaryIndexDescriptionList = [
    1,
    n0,
    _RGSIDL,
    0,
    () => ReplicaGlobalSecondaryIndexDescription$
  ];
  var ReplicaGlobalSecondaryIndexList = [
    1,
    n0,
    _RGSIL,
    0,
    () => ReplicaGlobalSecondaryIndex$
  ];
  var ReplicaGlobalSecondaryIndexSettingsDescriptionList = [
    1,
    n0,
    _RGSISDL,
    0,
    () => ReplicaGlobalSecondaryIndexSettingsDescription$
  ];
  var ReplicaGlobalSecondaryIndexSettingsUpdateList = [
    1,
    n0,
    _RGSISUL,
    0,
    () => ReplicaGlobalSecondaryIndexSettingsUpdate$
  ];
  var ReplicaList = [
    1,
    n0,
    _RL,
    0,
    () => Replica$
  ];
  var ReplicaSettingsDescriptionList = [
    1,
    n0,
    _RSDL,
    0,
    () => ReplicaSettingsDescription$
  ];
  var ReplicaSettingsUpdateList = [
    1,
    n0,
    _RSUL,
    0,
    () => ReplicaSettingsUpdate$
  ];
  var ReplicationGroupUpdateList = [
    1,
    n0,
    _RGUL,
    0,
    () => ReplicationGroupUpdate$
  ];
  var ReplicaUpdateList = [
    1,
    n0,
    _RUL,
    0,
    () => ReplicaUpdate$
  ];
  var StringSetAttributeValue = 64 | 0;
  var TableNameList = 64 | 0;
  var TagKeyList = 64 | 0;
  var TagList = [
    1,
    n0,
    _TL,
    0,
    () => Tag$
  ];
  var ThrottlingReasonList = [
    1,
    n0,
    _TRL,
    0,
    () => ThrottlingReason$
  ];
  var TransactGetItemList = [
    1,
    n0,
    _TGIL,
    0,
    () => TransactGetItem$
  ];
  var TransactWriteItemList = [
    1,
    n0,
    _TWIL,
    0,
    () => TransactWriteItem$
  ];
  var WriteRequests = [
    1,
    n0,
    _WRr,
    0,
    () => WriteRequest$
  ];
  var AttributeMap = [
    2,
    n0,
    _AM,
    0,
    0,
    () => AttributeValue$
  ];
  var AttributeUpdates = [
    2,
    n0,
    _AU,
    0,
    0,
    () => AttributeValueUpdate$
  ];
  var BatchGetRequestMap = [
    2,
    n0,
    _BGRMa,
    0,
    0,
    () => KeysAndAttributes$
  ];
  var BatchGetResponseMap = [
    2,
    n0,
    _BGRM,
    0,
    0,
    () => ItemList
  ];
  var BatchWriteItemRequestMap = [
    2,
    n0,
    _BWIRM,
    0,
    0,
    () => WriteRequests
  ];
  var ExpectedAttributeMap = [
    2,
    n0,
    _EAM,
    0,
    0,
    () => ExpectedAttributeValue$
  ];
  var ExpressionAttributeNameMap = 128 | 0;
  var ExpressionAttributeValueMap = [
    2,
    n0,
    _EAVM,
    0,
    0,
    () => AttributeValue$
  ];
  var FilterConditionMap = [
    2,
    n0,
    _FCM,
    0,
    0,
    () => Condition$
  ];
  var ItemCollectionKeyAttributeMap = [
    2,
    n0,
    _ICKAM,
    0,
    0,
    () => AttributeValue$
  ];
  var ItemCollectionMetricsPerTable = [
    2,
    n0,
    _ICMPT,
    0,
    0,
    () => ItemCollectionMetricsMultiple
  ];
  var Key = [
    2,
    n0,
    _K,
    0,
    0,
    () => AttributeValue$
  ];
  var KeyConditions = [
    2,
    n0,
    _KC,
    0,
    0,
    () => Condition$
  ];
  var MapAttributeValue = [
    2,
    n0,
    _MAV,
    0,
    0,
    () => AttributeValue$
  ];
  var PutItemInputAttributeMap = [
    2,
    n0,
    _PIIAM,
    0,
    0,
    () => AttributeValue$
  ];
  var SecondaryIndexesCapacityMap = [
    2,
    n0,
    _SICM,
    0,
    0,
    () => Capacity$
  ];
  var AttributeValue$ = [
    4,
    n0,
    _AV,
    0,
    [_S_, _N, _B_, _SS_, _NS, _BS_, _M_, _L_, _NULL, _BOOL],
    [0, 0, 21, 64 | 0, 64 | 0, 64 | 21, () => MapAttributeValue, () => ListAttributeValue, 2, 2]
  ];
  exports2.AttributeValue$ = AttributeValue$;
  exports2.BatchExecuteStatement$ = [
    9,
    n0,
    _BES,
    0,
    () => BatchExecuteStatementInput$,
    () => BatchExecuteStatementOutput$
  ];
  exports2.BatchGetItem$ = [
    9,
    n0,
    _BGI,
    0,
    () => BatchGetItemInput$,
    () => BatchGetItemOutput$
  ];
  exports2.BatchWriteItem$ = [
    9,
    n0,
    _BWI,
    0,
    () => BatchWriteItemInput$,
    () => BatchWriteItemOutput$
  ];
  exports2.CreateBackup$ = [
    9,
    n0,
    _CB,
    0,
    () => CreateBackupInput$,
    () => CreateBackupOutput$
  ];
  exports2.CreateGlobalTable$ = [
    9,
    n0,
    _CGT,
    0,
    () => CreateGlobalTableInput$,
    () => CreateGlobalTableOutput$
  ];
  exports2.CreateTable$ = [
    9,
    n0,
    _CTr,
    0,
    () => CreateTableInput$,
    () => CreateTableOutput$
  ];
  exports2.DeleteBackup$ = [
    9,
    n0,
    _DB,
    0,
    () => DeleteBackupInput$,
    () => DeleteBackupOutput$
  ];
  exports2.DeleteItem$ = [
    9,
    n0,
    _DI,
    0,
    () => DeleteItemInput$,
    () => DeleteItemOutput$
  ];
  exports2.DeleteResourcePolicy$ = [
    9,
    n0,
    _DRP,
    0,
    () => DeleteResourcePolicyInput$,
    () => DeleteResourcePolicyOutput$
  ];
  exports2.DeleteTable$ = [
    9,
    n0,
    _DT,
    0,
    () => DeleteTableInput$,
    () => DeleteTableOutput$
  ];
  exports2.DescribeBackup$ = [
    9,
    n0,
    _DBe,
    0,
    () => DescribeBackupInput$,
    () => DescribeBackupOutput$
  ];
  exports2.DescribeContinuousBackups$ = [
    9,
    n0,
    _DCB,
    0,
    () => DescribeContinuousBackupsInput$,
    () => DescribeContinuousBackupsOutput$
  ];
  exports2.DescribeContributorInsights$ = [
    9,
    n0,
    _DCI,
    0,
    () => DescribeContributorInsightsInput$,
    () => DescribeContributorInsightsOutput$
  ];
  exports2.DescribeEndpoints$ = [
    9,
    n0,
    _DE,
    0,
    () => DescribeEndpointsRequest$,
    () => DescribeEndpointsResponse$
  ];
  exports2.DescribeExport$ = [
    9,
    n0,
    _DEe,
    0,
    () => DescribeExportInput$,
    () => DescribeExportOutput$
  ];
  exports2.DescribeGlobalTable$ = [
    9,
    n0,
    _DGT,
    0,
    () => DescribeGlobalTableInput$,
    () => DescribeGlobalTableOutput$
  ];
  exports2.DescribeGlobalTableSettings$ = [
    9,
    n0,
    _DGTS,
    0,
    () => DescribeGlobalTableSettingsInput$,
    () => DescribeGlobalTableSettingsOutput$
  ];
  exports2.DescribeImport$ = [
    9,
    n0,
    _DIe,
    0,
    () => DescribeImportInput$,
    () => DescribeImportOutput$
  ];
  exports2.DescribeKinesisStreamingDestination$ = [
    9,
    n0,
    _DKSD,
    0,
    () => DescribeKinesisStreamingDestinationInput$,
    () => DescribeKinesisStreamingDestinationOutput$
  ];
  exports2.DescribeLimits$ = [
    9,
    n0,
    _DL,
    0,
    () => DescribeLimitsInput$,
    () => DescribeLimitsOutput$
  ];
  exports2.DescribeTable$ = [
    9,
    n0,
    _DTe,
    0,
    () => DescribeTableInput$,
    () => DescribeTableOutput$
  ];
  exports2.DescribeTableReplicaAutoScaling$ = [
    9,
    n0,
    _DTRAS,
    0,
    () => DescribeTableReplicaAutoScalingInput$,
    () => DescribeTableReplicaAutoScalingOutput$
  ];
  exports2.DescribeTimeToLive$ = [
    9,
    n0,
    _DTTL,
    0,
    () => DescribeTimeToLiveInput$,
    () => DescribeTimeToLiveOutput$
  ];
  exports2.DisableKinesisStreamingDestination$ = [
    9,
    n0,
    _DKSDi,
    0,
    () => KinesisStreamingDestinationInput$,
    () => KinesisStreamingDestinationOutput$
  ];
  exports2.EnableKinesisStreamingDestination$ = [
    9,
    n0,
    _EKSD,
    0,
    () => KinesisStreamingDestinationInput$,
    () => KinesisStreamingDestinationOutput$
  ];
  exports2.ExecuteStatement$ = [
    9,
    n0,
    _ESxe,
    0,
    () => ExecuteStatementInput$,
    () => ExecuteStatementOutput$
  ];
  exports2.ExecuteTransaction$ = [
    9,
    n0,
    _ETxe,
    0,
    () => ExecuteTransactionInput$,
    () => ExecuteTransactionOutput$
  ];
  exports2.ExportTableToPointInTime$ = [
    9,
    n0,
    _ETTPIT,
    0,
    () => ExportTableToPointInTimeInput$,
    () => ExportTableToPointInTimeOutput$
  ];
  exports2.GetItem$ = [
    9,
    n0,
    _GI,
    0,
    () => GetItemInput$,
    () => GetItemOutput$
  ];
  exports2.GetResourcePolicy$ = [
    9,
    n0,
    _GRP,
    0,
    () => GetResourcePolicyInput$,
    () => GetResourcePolicyOutput$
  ];
  exports2.ImportTable$ = [
    9,
    n0,
    _IT,
    0,
    () => ImportTableInput$,
    () => ImportTableOutput$
  ];
  exports2.ListBackups$ = [
    9,
    n0,
    _LB,
    0,
    () => ListBackupsInput$,
    () => ListBackupsOutput$
  ];
  exports2.ListContributorInsights$ = [
    9,
    n0,
    _LCI,
    0,
    () => ListContributorInsightsInput$,
    () => ListContributorInsightsOutput$
  ];
  exports2.ListExports$ = [
    9,
    n0,
    _LE,
    0,
    () => ListExportsInput$,
    () => ListExportsOutput$
  ];
  exports2.ListGlobalTables$ = [
    9,
    n0,
    _LGT,
    0,
    () => ListGlobalTablesInput$,
    () => ListGlobalTablesOutput$
  ];
  exports2.ListImports$ = [
    9,
    n0,
    _LI,
    0,
    () => ListImportsInput$,
    () => ListImportsOutput$
  ];
  exports2.ListTables$ = [
    9,
    n0,
    _LT,
    0,
    () => ListTablesInput$,
    () => ListTablesOutput$
  ];
  exports2.ListTagsOfResource$ = [
    9,
    n0,
    _LTOR,
    0,
    () => ListTagsOfResourceInput$,
    () => ListTagsOfResourceOutput$
  ];
  exports2.PutItem$ = [
    9,
    n0,
    _PI,
    0,
    () => PutItemInput$,
    () => PutItemOutput$
  ];
  exports2.PutResourcePolicy$ = [
    9,
    n0,
    _PRP,
    0,
    () => PutResourcePolicyInput$,
    () => PutResourcePolicyOutput$
  ];
  exports2.Query$ = [
    9,
    n0,
    _Q,
    0,
    () => QueryInput$,
    () => QueryOutput$
  ];
  exports2.RestoreTableFromBackup$ = [
    9,
    n0,
    _RTFB,
    0,
    () => RestoreTableFromBackupInput$,
    () => RestoreTableFromBackupOutput$
  ];
  exports2.RestoreTableToPointInTime$ = [
    9,
    n0,
    _RTTPIT,
    0,
    () => RestoreTableToPointInTimeInput$,
    () => RestoreTableToPointInTimeOutput$
  ];
  exports2.Scan$ = [
    9,
    n0,
    _Sc,
    0,
    () => ScanInput$,
    () => ScanOutput$
  ];
  exports2.TagResource$ = [
    9,
    n0,
    _TRa,
    0,
    () => TagResourceInput$,
    () => __Unit
  ];
  exports2.TransactGetItems$ = [
    9,
    n0,
    _TGIr,
    0,
    () => TransactGetItemsInput$,
    () => TransactGetItemsOutput$
  ];
  exports2.TransactWriteItems$ = [
    9,
    n0,
    _TWIr,
    0,
    () => TransactWriteItemsInput$,
    () => TransactWriteItemsOutput$
  ];
  exports2.UntagResource$ = [
    9,
    n0,
    _UR,
    0,
    () => UntagResourceInput$,
    () => __Unit
  ];
  exports2.UpdateContinuousBackups$ = [
    9,
    n0,
    _UCB,
    0,
    () => UpdateContinuousBackupsInput$,
    () => UpdateContinuousBackupsOutput$
  ];
  exports2.UpdateContributorInsights$ = [
    9,
    n0,
    _UCI,
    0,
    () => UpdateContributorInsightsInput$,
    () => UpdateContributorInsightsOutput$
  ];
  exports2.UpdateGlobalTable$ = [
    9,
    n0,
    _UGT,
    0,
    () => UpdateGlobalTableInput$,
    () => UpdateGlobalTableOutput$
  ];
  exports2.UpdateGlobalTableSettings$ = [
    9,
    n0,
    _UGTS,
    0,
    () => UpdateGlobalTableSettingsInput$,
    () => UpdateGlobalTableSettingsOutput$
  ];
  exports2.UpdateItem$ = [
    9,
    n0,
    _UIp,
    0,
    () => UpdateItemInput$,
    () => UpdateItemOutput$
  ];
  exports2.UpdateKinesisStreamingDestination$ = [
    9,
    n0,
    _UKSD,
    0,
    () => UpdateKinesisStreamingDestinationInput$,
    () => UpdateKinesisStreamingDestinationOutput$
  ];
  exports2.UpdateTable$ = [
    9,
    n0,
    _UT,
    0,
    () => UpdateTableInput$,
    () => UpdateTableOutput$
  ];
  exports2.UpdateTableReplicaAutoScaling$ = [
    9,
    n0,
    _UTRAS,
    0,
    () => UpdateTableReplicaAutoScalingInput$,
    () => UpdateTableReplicaAutoScalingOutput$
  ];
  exports2.UpdateTimeToLive$ = [
    9,
    n0,
    _UTTL,
    0,
    () => UpdateTimeToLiveInput$,
    () => UpdateTimeToLiveOutput$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/package.json
var require_package9 = __commonJS((exports2, module) => {
  module.exports = {
    name: "@aws-sdk/client-dynamodb",
    description: "AWS SDK for JavaScript Dynamodb Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      test: "yarn g:vitest run --passWithNoTests",
      "test:watch": "yarn g:vitest watch --passWithNoTests",
      "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
      "test:integration:watch": "yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts",
      "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
      "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/dynamodb-codec": "^3.973.23",
      "@aws-sdk/middleware-endpoint-discovery": "^3.972.19",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@smithy/snapshot-testing": "^2.1.7",
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3",
      vitest: "^4.0.17"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-dynamodb",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-dynamodb"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+dynamodb-codec@3.973.23/node_modules/@aws-sdk/dynamodb-codec/dist-cjs/index.js
var require_dist_cjs65 = __commonJS((exports2) => {
  var { JsonCodec, JsonShapeSerializer, JsonShapeDeserializer } = require_protocols2();
  var { NormalizedSchema } = require_schema();
  var { toBase64, fromBase64 } = require_serde();

  class DynamoDBJsonCodec extends JsonCodec {
    constructor() {
      super({
        timestampFormat: {
          useTrait: true,
          default: 7
        },
        jsonName: false
      });
    }
    createSerializer() {
      const serializer = new DynamoDBJsonShapeSerializer(this.settings);
      serializer.setSerdeContext(this.serdeContext);
      return serializer;
    }
    createDeserializer() {
      const deserializer = new DynamoDBJsonShapeDeserializer(this.settings);
      deserializer.setSerdeContext(this.serdeContext);
      return deserializer;
    }
  }
  var ATTRIBUTE_VALUE = "com.amazonaws.dynamodb#AttributeValue";

  class DynamoDBJsonShapeSerializer extends JsonShapeSerializer {
    _write(schema, value, container2) {
      const ns2 = NormalizedSchema.of(schema);
      if (ns2.isStructSchema() && ns2.getName(true) === ATTRIBUTE_VALUE) {
        if (value && typeof value === "object") {
          const av = value;
          const out = this.copyRemoveNulls(av);
          const base64Encode = this.serdeContext?.base64Encoder ?? toBase64;
          if (av.B instanceof Uint8Array) {
            out.B = base64Encode(av.B);
          }
          if (Array.isArray(av.BS)) {
            out.BS = av.BS.map(base64Encode);
          }
          if (Array.isArray(av.L)) {
            const list2 = [];
            for (const v5 of av.L) {
              if (v5 != null) {
                list2.push(this._write(ns2, v5, container2));
              }
            }
            out.L = list2;
          }
          if (av.M && typeof av.M === "object") {
            out.M = {};
            for (const [k4, v5] of Object.entries(av.M)) {
              if (v5 != null) {
                out.M[k4] = this._write(ns2, v5, container2);
              }
            }
          }
          return out;
        }
      }
      return super._write(ns2, value, container2);
    }
    copyRemoveNulls(v5) {
      if (typeof v5 !== "object") {
        return v5;
      }
      if (v5 === null) {
        return {};
      }
      if (Array.isArray(v5)) {
        const out2 = [];
        for (const item of v5) {
          if (item != null) {
            out2.push(this.copyRemoveNulls(item));
          }
        }
        return out2;
      }
      const out = {};
      for (const [k4, _v] of Object.entries(v5)) {
        if (_v != null) {
          if (["B", "BS", "L", "M"].includes(k4)) {
            continue;
          }
          out[k4] = this.copyRemoveNulls(_v);
        }
      }
      return out;
    }
  }

  class DynamoDBJsonShapeDeserializer extends JsonShapeDeserializer {
    _read(schema, value) {
      const ns2 = NormalizedSchema.of(schema);
      if (ns2.isStructSchema() && ns2.getName(true) === ATTRIBUTE_VALUE) {
        if (value && typeof value === "object") {
          const av = value;
          const out = av;
          const base64Decoder = this.serdeContext?.base64Decoder ?? fromBase64;
          if (typeof av.B === "string") {
            out.B = base64Decoder(av.B);
          }
          if (Array.isArray(av.BS)) {
            out.BS = av.BS.map(base64Decoder);
          }
          if (Array.isArray(av.L)) {
            out.L = av.L.map((v5) => this._read(ns2, v5));
          }
          if (av.M && typeof av.M === "object") {
            for (const [k4, v5] of Object.entries(av.M)) {
              out.M[k4] = this._read(ns2, v5);
            }
          }
          return out;
        }
      }
      return super._read(ns2, value);
    }
  }
  exports2.DynamoDBJsonCodec = DynamoDBJsonCodec;
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/endpoint/bdd.js
var require_bdd7 = __commonJS((exports2) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var I5 = "ref";
  var J4 = "argv";
  var a13 = -1;
  var b5 = true;
  var c3 = false;
  var d3 = "isSet";
  var e3 = "booleanEquals";
  var f4 = "PartitionResult";
  var g4 = "stringEquals";
  var h8 = "getAttr";
  var i = "https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}";
  var j4 = "aws.parseArn";
  var k4 = (n5) => "ParsedArn_ssa_" + n5 + "";
  var l7 = "service";
  var m3 = "dynamodb";
  var n4 = "isValidHostLabel";
  var o3 = "accountId";
  var p3 = "FirstArn";
  var q4 = (n5) => "https://{ParsedArn_ssa_" + n5 + "#accountId}.ddb.{Region}.{PartitionResult#dualStackDnsSuffix}";
  var s3 = (n5) => "https://{ParsedArn_ssa_" + n5 + "#accountId}.ddb.{Region}.{PartitionResult#dnsSuffix}";
  var t3 = { [I5]: "Endpoint" };
  var u2 = { [I5]: "Region" };
  var v5 = { [I5]: f4 };
  var w4 = { [I5]: "AccountIdEndpointMode" };
  var x4 = { fn: h8, [J4]: [v5, "name"] };
  var y4 = { fn: h8, [J4]: [{ [I5]: "ParsedArn_ssa_2" }, "region"] };
  var z4 = { [I5]: "ParsedArn_ssa_2" };
  var A3 = { [I5]: "ResourceArnList" };
  var B4 = { fn: h8, [J4]: [{ [I5]: "ParsedArn_ssa_1" }, "region"] };
  var C3 = { [I5]: "ParsedArn_ssa_1" };
  var D4 = { [I5]: "AccountId" };
  var E2 = {};
  var F5 = { metricValues: ["O"] };
  var G4 = [u2];
  var H5 = [{ [I5]: "ResourceArn" }];
  var _data = {
    conditions: [
      [d3, G4],
      [d3, [t3]],
      [e3, [{ [I5]: "UseFIPS" }, b5]],
      ["aws.partition", G4, f4],
      [g4, [u2, "local"]],
      [e3, [{ fn: h8, [J4]: [v5, "supportsFIPS"] }, b5]],
      [e3, [{ [I5]: "UseDualStack" }, b5]],
      [e3, [{ fn: h8, [J4]: [v5, "supportsDualStack"] }, b5]],
      [g4, [i, t3]],
      [d3, [w4]],
      [g4, [x4, "aws"]],
      [g4, [w4, "disabled"]],
      [d3, H5],
      [j4, H5, k4(2)],
      [g4, [y4, u2]],
      [g4, [{ fn: h8, [J4]: [z4, l7] }, m3]],
      [n4, [{ fn: h8, [J4]: [z4, o3] }, c3]],
      [n4, [y4, c3]],
      [d3, [A3]],
      [h8, [A3, "[0]"], p3],
      [j4, [{ [I5]: p3 }], k4(1)],
      [g4, [B4, u2]],
      [g4, [{ fn: h8, [J4]: [C3, l7] }, m3]],
      [n4, [{ fn: h8, [J4]: [C3, o3] }, c3]],
      [n4, [B4, c3]],
      [d3, [D4]],
      [g4, [w4, "required"]],
      [n4, [D4, c3]],
      [g4, [x4, "aws-us-gov"]]
    ],
    results: [
      [a13],
      [a13, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a13, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [a13, "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html"],
      ["{Endpoint}", E2],
      [a13, "Invalid Configuration: FIPS and local endpoint are not supported"],
      [a13, "Invalid Configuration: Dualstack and local endpoint are not supported"],
      ["http://localhost:8000", { authSchemes: [{ name: "sigv4", signingName: m3, signingRegion: "us-east-1" }] }],
      [a13, "Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported"],
      ["https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", E2],
      [a13, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://dynamodb.{Region}.{PartitionResult#dnsSuffix}", E2],
      ["https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}", E2],
      [a13, "FIPS is enabled but this partition does not support FIPS"],
      [q4(2), F5],
      [q4(1), F5],
      ["https://{AccountId}.ddb.{Region}.{PartitionResult#dualStackDnsSuffix}", F5],
      [a13, "Credentials-sourced account ID parameter is invalid"],
      [a13, "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded"],
      [a13, "Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition"],
      [i, E2],
      [a13, "DualStack is enabled but this partition does not support DualStack"],
      [s3(2), F5],
      [s3(1), F5],
      ["https://{AccountId}.ddb.{Region}.{PartitionResult#dnsSuffix}", F5],
      [a13, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r3 = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    5,
    3,
    1,
    4,
    r3 + 25,
    2,
    r3 + 1,
    65,
    1,
    63,
    6,
    2,
    52,
    7,
    3,
    8,
    r3 + 25,
    4,
    51,
    9,
    6,
    30,
    10,
    9,
    11,
    r3 + 11,
    10,
    13,
    12,
    26,
    r3 + 19,
    r3 + 11,
    11,
    29,
    14,
    12,
    15,
    20,
    13,
    16,
    20,
    14,
    17,
    20,
    15,
    18,
    20,
    16,
    19,
    20,
    17,
    r3 + 22,
    20,
    18,
    21,
    27,
    19,
    22,
    27,
    20,
    23,
    27,
    21,
    24,
    27,
    22,
    25,
    27,
    23,
    26,
    27,
    24,
    r3 + 23,
    27,
    25,
    28,
    29,
    27,
    r3 + 24,
    r3 + 17,
    26,
    r3 + 18,
    r3 + 11,
    7,
    31,
    r3 + 21,
    9,
    32,
    r3 + 20,
    10,
    34,
    33,
    26,
    r3 + 19,
    r3 + 20,
    11,
    50,
    35,
    12,
    36,
    41,
    13,
    37,
    41,
    14,
    38,
    41,
    15,
    39,
    41,
    16,
    40,
    41,
    17,
    r3 + 14,
    41,
    18,
    42,
    48,
    19,
    43,
    48,
    20,
    44,
    48,
    21,
    45,
    48,
    22,
    46,
    48,
    23,
    47,
    48,
    24,
    r3 + 15,
    48,
    25,
    49,
    50,
    27,
    r3 + 16,
    r3 + 17,
    26,
    r3 + 18,
    r3 + 20,
    6,
    r3 + 6,
    r3 + 7,
    3,
    53,
    r3 + 25,
    4,
    r3 + 5,
    54,
    5,
    56,
    55,
    6,
    r3 + 10,
    r3 + 13,
    6,
    60,
    57,
    9,
    58,
    59,
    26,
    r3 + 8,
    59,
    28,
    r3 + 11,
    r3 + 12,
    7,
    61,
    r3 + 10,
    9,
    62,
    r3 + 9,
    26,
    r3 + 8,
    r3 + 9,
    2,
    r3 + 1,
    64,
    3,
    66,
    65,
    6,
    r3 + 2,
    r3 + 4,
    6,
    r3 + 2,
    67,
    8,
    r3 + 3,
    r3 + 4
  ]);
  exports2.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver8 = __commonJS((exports2) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd7();
  var cache2 = new EndpointCache({
    size: 50,
    params: [
      "AccountId",
      "AccountIdEndpointMode",
      "Endpoint",
      "Region",
      "ResourceArn",
      "ResourceArnList",
      "UseDualStack",
      "UseFIPS"
    ]
  });
  exports2.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache2.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared8 = __commonJS((exports2) => {
  var { AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsJson1_0Protocol } = require_protocols2();
  var { DynamoDBJsonCodec } = require_dist_cjs65();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultDynamoDBHttpAuthSchemeProvider } = require_httpAuthSchemeProvider8();
  var { defaultEndpointResolver } = require_endpointResolver8();
  var { errorTypeRegistries } = require_schemas_08();
  exports2.getRuntimeConfig = (config2) => {
    return {
      apiVersion: "2012-08-10",
      base64Decoder: config2?.base64Decoder ?? fromBase64,
      base64Encoder: config2?.base64Encoder ?? toBase64,
      disableHostPrefix: config2?.disableHostPrefix ?? false,
      endpointProvider: config2?.endpointProvider ?? defaultEndpointResolver,
      extensions: config2?.extensions ?? [],
      httpAuthSchemeProvider: config2?.httpAuthSchemeProvider ?? defaultDynamoDBHttpAuthSchemeProvider,
      httpAuthSchemes: config2?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        }
      ],
      logger: config2?.logger ?? new NoOpLogger,
      protocol: config2?.protocol ?? AwsJson1_0Protocol,
      protocolSettings: config2?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.dynamodb",
        errorTypeRegistries,
        xmlNamespace: "http://dynamodb.amazonaws.com/doc/2012-08-10/",
        version: "2012-08-10",
        serviceTarget: "DynamoDB_20120810",
        jsonCodec: new DynamoDBJsonCodec
      },
      serviceId: config2?.serviceId ?? "DynamoDB",
      urlParser: config2?.urlParser ?? parseUrl2,
      utf8Decoder: config2?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config2?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/runtimeConfig.js
var require_runtimeConfig8 = __commonJS((exports2) => {
  var packageInfo = require_package9();
  var { NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS } = require_account_id_endpoint();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } = require_dist_cjs64();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, Retry } = require_retry();
  var { calculateBodyLength, Hash: Hash3 } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared8();
  var getRuntimeConfig = (config2) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config2);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config2);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config2?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config2,
      runtime: "node",
      defaultsMode,
      accountIdEndpointMode: config2?.accountIdEndpointMode ?? loadNodeConfig(NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS, loaderConfig),
      authSchemePreference: config2?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config2?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config2?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config2?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      endpointDiscoveryEnabledProvider: config2?.endpointDiscoveryEnabledProvider ?? loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS, loaderConfig),
      maxAttempts: config2?.maxAttempts ?? loadNodeConfig(Retry.v2026 ? { ...NODE_MAX_ATTEMPT_CONFIG_OPTIONS, default: 4 } : NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config2),
      region: config2?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config2?.requestHandler ?? defaultConfigProvider),
      retryMode: config2?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config2),
      sha256: config2?.sha256 ?? Hash3.bind(null, "sha256"),
      streamCollector: config2?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config2?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config2?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config2?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports2.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js
var require_dist_cjs66 = __commonJS((exports2) => {
  var __exportStar = (m3, e3) => {
    Object.assign(e3, m3);
  };
  var { resolveAccountIdEndpointModeConfig } = require_account_id_endpoint();
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { resolveEndpointDiscoveryConfig } = require_dist_cjs64();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs5();
  var { Command, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client5, createWaiter, checkExceptions, WaiterState, createAggregatedClient } = require_client3();
  exports2.$Command = Command;
  exports2.__Client = Client5;
  var { resolveRegionConfig } = require_config2();
  var { getEndpointPlugin, resolveEndpointConfig } = require_endpoints();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, Retry, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultDynamoDBHttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider8();
  var { DescribeEndpoints$, BatchExecuteStatement$, BatchGetItem$, BatchWriteItem$, CreateBackup$, CreateGlobalTable$, CreateTable$, DeleteBackup$, DeleteItem$, DeleteResourcePolicy$, DeleteTable$, DescribeBackup$, DescribeContinuousBackups$, DescribeContributorInsights$, DescribeExport$, DescribeGlobalTable$, DescribeGlobalTableSettings$, DescribeImport$, DescribeKinesisStreamingDestination$, DescribeLimits$, DescribeTable$, DescribeTableReplicaAutoScaling$, DescribeTimeToLive$, DisableKinesisStreamingDestination$, EnableKinesisStreamingDestination$, ExecuteStatement$, ExecuteTransaction$, ExportTableToPointInTime$, GetItem$, GetResourcePolicy$, ImportTable$, ListBackups$, ListContributorInsights$, ListExports$, ListGlobalTables$, ListImports$, ListTables$, ListTagsOfResource$, PutItem$, PutResourcePolicy$, Query$, RestoreTableFromBackup$, RestoreTableToPointInTime$, Scan$, TagResource$, TransactGetItems$, TransactWriteItems$, UntagResource$, UpdateContinuousBackups$, UpdateContributorInsights$, UpdateGlobalTable$, UpdateGlobalTableSettings$, UpdateItem$, UpdateKinesisStreamingDestination$, UpdateTable$, UpdateTableReplicaAutoScaling$, UpdateTimeToLive$ } = require_schemas_08();
  __exportStar(require_schemas_08(), exports2);
  var { getRuntimeConfig } = require_runtimeConfig8();
  __exportStar(require_errors9(), exports2);
  var { DynamoDBServiceException } = require_DynamoDBServiceException();
  exports2.DynamoDBServiceException = DynamoDBServiceException;
  var resolveClientEndpointParameters = (options2) => {
    return Object.assign(options2, {
      useDualstackEndpoint: options2.useDualstackEndpoint ?? false,
      useFipsEndpoint: options2.useFipsEndpoint ?? false,
      defaultSigningName: "dynamodb"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    AccountId: { type: "builtInParams", name: "accountId" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
    AccountIdEndpointMode: { type: "builtInParams", name: "accountIdEndpointMode" }
  };

  class DescribeEndpointsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeEndpoints", {}).n("DynamoDBClient", "DescribeEndpointsCommand").sc(DescribeEndpoints$).build() {
  }
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config2) => {
    return {
      httpAuthSchemes: config2.httpAuthSchemes(),
      httpAuthSchemeProvider: config2.httpAuthSchemeProvider(),
      credentials: config2.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions2) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions2.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class DynamoDBClient extends Client5 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveAccountIdEndpointModeConfig(_config_1);
      const _config_3 = resolveUserAgentConfig(_config_2);
      const _config_4 = resolveRetryConfig(_config_3, { defaultBaseDelay: Retry.v2026 ? 25 : undefined, defaultMaxAttempts: Retry.v2026 ? 4 : undefined });
      const _config_5 = resolveRegionConfig(_config_4);
      const _config_6 = resolveHostHeaderConfig(_config_5);
      const _config_7 = resolveEndpointConfig(_config_6);
      const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
      const _config_9 = resolveEndpointDiscoveryConfig(_config_8, { endpointDiscoveryCommandCtor: DescribeEndpointsCommand });
      const _config_10 = resolveRuntimeExtensions(_config_9, configuration?.extensions || []);
      this.config = _config_10;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultDynamoDBHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config2) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config2.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class BatchExecuteStatementCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "BatchExecuteStatement", {}).n("DynamoDBClient", "BatchExecuteStatementCommand").sc(BatchExecuteStatement$).build() {
  }

  class BatchGetItemCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArnList: { type: "operationContextParams", get: (input) => Object.keys(input?.RequestItems ?? {}) }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "BatchGetItem", {}).n("DynamoDBClient", "BatchGetItemCommand").sc(BatchGetItem$).build() {
  }

  class BatchWriteItemCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArnList: { type: "operationContextParams", get: (input) => Object.keys(input?.RequestItems ?? {}) }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "BatchWriteItem", {}).n("DynamoDBClient", "BatchWriteItemCommand").sc(BatchWriteItem$).build() {
  }

  class CreateBackupCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "CreateBackup", {}).n("DynamoDBClient", "CreateBackupCommand").sc(CreateBackup$).build() {
  }

  class CreateGlobalTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "GlobalTableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "CreateGlobalTable", {}).n("DynamoDBClient", "CreateGlobalTableCommand").sc(CreateGlobalTable$).build() {
  }

  class CreateTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "CreateTable", {}).n("DynamoDBClient", "CreateTableCommand").sc(CreateTable$).build() {
  }

  class DeleteBackupCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "BackupArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DeleteBackup", {}).n("DynamoDBClient", "DeleteBackupCommand").sc(DeleteBackup$).build() {
  }

  class DeleteItemCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DeleteItem", {}).n("DynamoDBClient", "DeleteItemCommand").sc(DeleteItem$).build() {
  }

  class DeleteResourcePolicyCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ResourceArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DeleteResourcePolicy", {}).n("DynamoDBClient", "DeleteResourcePolicyCommand").sc(DeleteResourcePolicy$).build() {
  }

  class DeleteTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DeleteTable", {}).n("DynamoDBClient", "DeleteTableCommand").sc(DeleteTable$).build() {
  }

  class DescribeBackupCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "BackupArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeBackup", {}).n("DynamoDBClient", "DescribeBackupCommand").sc(DescribeBackup$).build() {
  }

  class DescribeContinuousBackupsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeContinuousBackups", {}).n("DynamoDBClient", "DescribeContinuousBackupsCommand").sc(DescribeContinuousBackups$).build() {
  }

  class DescribeContributorInsightsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeContributorInsights", {}).n("DynamoDBClient", "DescribeContributorInsightsCommand").sc(DescribeContributorInsights$).build() {
  }

  class DescribeExportCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ExportArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeExport", {}).n("DynamoDBClient", "DescribeExportCommand").sc(DescribeExport$).build() {
  }

  class DescribeGlobalTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "GlobalTableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeGlobalTable", {}).n("DynamoDBClient", "DescribeGlobalTableCommand").sc(DescribeGlobalTable$).build() {
  }

  class DescribeGlobalTableSettingsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "GlobalTableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeGlobalTableSettings", {}).n("DynamoDBClient", "DescribeGlobalTableSettingsCommand").sc(DescribeGlobalTableSettings$).build() {
  }

  class DescribeImportCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ImportArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeImport", {}).n("DynamoDBClient", "DescribeImportCommand").sc(DescribeImport$).build() {
  }

  class DescribeKinesisStreamingDestinationCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeKinesisStreamingDestination", {}).n("DynamoDBClient", "DescribeKinesisStreamingDestinationCommand").sc(DescribeKinesisStreamingDestination$).build() {
  }

  class DescribeLimitsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeLimits", {}).n("DynamoDBClient", "DescribeLimitsCommand").sc(DescribeLimits$).build() {
  }

  class DescribeTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeTable", {}).n("DynamoDBClient", "DescribeTableCommand").sc(DescribeTable$).build() {
  }

  class DescribeTableReplicaAutoScalingCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeTableReplicaAutoScaling", {}).n("DynamoDBClient", "DescribeTableReplicaAutoScalingCommand").sc(DescribeTableReplicaAutoScaling$).build() {
  }

  class DescribeTimeToLiveCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DescribeTimeToLive", {}).n("DynamoDBClient", "DescribeTimeToLiveCommand").sc(DescribeTimeToLive$).build() {
  }

  class DisableKinesisStreamingDestinationCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "DisableKinesisStreamingDestination", {}).n("DynamoDBClient", "DisableKinesisStreamingDestinationCommand").sc(DisableKinesisStreamingDestination$).build() {
  }

  class EnableKinesisStreamingDestinationCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "EnableKinesisStreamingDestination", {}).n("DynamoDBClient", "EnableKinesisStreamingDestinationCommand").sc(EnableKinesisStreamingDestination$).build() {
  }

  class ExecuteStatementCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ExecuteStatement", {}).n("DynamoDBClient", "ExecuteStatementCommand").sc(ExecuteStatement$).build() {
  }

  class ExecuteTransactionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ExecuteTransaction", {}).n("DynamoDBClient", "ExecuteTransactionCommand").sc(ExecuteTransaction$).build() {
  }

  class ExportTableToPointInTimeCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ExportTableToPointInTime", {}).n("DynamoDBClient", "ExportTableToPointInTimeCommand").sc(ExportTableToPointInTime$).build() {
  }

  class GetItemCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "GetItem", {}).n("DynamoDBClient", "GetItemCommand").sc(GetItem$).build() {
  }

  class GetResourcePolicyCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ResourceArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "GetResourcePolicy", {}).n("DynamoDBClient", "GetResourcePolicyCommand").sc(GetResourcePolicy$).build() {
  }

  class ImportTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "operationContextParams", get: (input) => input?.TableCreationParameters?.TableName }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ImportTable", {}).n("DynamoDBClient", "ImportTableCommand").sc(ImportTable$).build() {
  }

  class ListBackupsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ListBackups", {}).n("DynamoDBClient", "ListBackupsCommand").sc(ListBackups$).build() {
  }

  class ListContributorInsightsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ListContributorInsights", {}).n("DynamoDBClient", "ListContributorInsightsCommand").sc(ListContributorInsights$).build() {
  }

  class ListExportsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ListExports", {}).n("DynamoDBClient", "ListExportsCommand").sc(ListExports$).build() {
  }

  class ListGlobalTablesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ListGlobalTables", {}).n("DynamoDBClient", "ListGlobalTablesCommand").sc(ListGlobalTables$).build() {
  }

  class ListImportsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ListImports", {}).n("DynamoDBClient", "ListImportsCommand").sc(ListImports$).build() {
  }

  class ListTablesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ListTables", {}).n("DynamoDBClient", "ListTablesCommand").sc(ListTables$).build() {
  }

  class ListTagsOfResourceCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ResourceArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "ListTagsOfResource", {}).n("DynamoDBClient", "ListTagsOfResourceCommand").sc(ListTagsOfResource$).build() {
  }

  class PutItemCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "PutItem", {}).n("DynamoDBClient", "PutItemCommand").sc(PutItem$).build() {
  }

  class PutResourcePolicyCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ResourceArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "PutResourcePolicy", {}).n("DynamoDBClient", "PutResourcePolicyCommand").sc(PutResourcePolicy$).build() {
  }

  class QueryCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "Query", {}).n("DynamoDBClient", "QueryCommand").sc(Query$).build() {
  }

  class RestoreTableFromBackupCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TargetTableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "RestoreTableFromBackup", {}).n("DynamoDBClient", "RestoreTableFromBackupCommand").sc(RestoreTableFromBackup$).build() {
  }

  class RestoreTableToPointInTimeCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TargetTableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "RestoreTableToPointInTime", {}).n("DynamoDBClient", "RestoreTableToPointInTimeCommand").sc(RestoreTableToPointInTime$).build() {
  }

  class ScanCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "Scan", {}).n("DynamoDBClient", "ScanCommand").sc(Scan$).build() {
  }

  class TagResourceCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ResourceArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "TagResource", {}).n("DynamoDBClient", "TagResourceCommand").sc(TagResource$).build() {
  }

  class TransactGetItemsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArnList: { type: "operationContextParams", get: (input) => input?.TransactItems?.map((obj) => obj?.Get?.TableName) }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "TransactGetItems", {}).n("DynamoDBClient", "TransactGetItemsCommand").sc(TransactGetItems$).build() {
  }

  class TransactWriteItemsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArnList: { type: "operationContextParams", get: (input) => input?.TransactItems?.map((obj) => [obj?.ConditionCheck?.TableName, obj?.Put?.TableName, obj?.Delete?.TableName, obj?.Update?.TableName].filter((i) => i)).flat() }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "TransactWriteItems", {}).n("DynamoDBClient", "TransactWriteItemsCommand").sc(TransactWriteItems$).build() {
  }

  class UntagResourceCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "ResourceArn" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UntagResource", {}).n("DynamoDBClient", "UntagResourceCommand").sc(UntagResource$).build() {
  }

  class UpdateContinuousBackupsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateContinuousBackups", {}).n("DynamoDBClient", "UpdateContinuousBackupsCommand").sc(UpdateContinuousBackups$).build() {
  }

  class UpdateContributorInsightsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateContributorInsights", {}).n("DynamoDBClient", "UpdateContributorInsightsCommand").sc(UpdateContributorInsights$).build() {
  }

  class UpdateGlobalTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "GlobalTableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateGlobalTable", {}).n("DynamoDBClient", "UpdateGlobalTableCommand").sc(UpdateGlobalTable$).build() {
  }

  class UpdateGlobalTableSettingsCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "GlobalTableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateGlobalTableSettings", {}).n("DynamoDBClient", "UpdateGlobalTableSettingsCommand").sc(UpdateGlobalTableSettings$).build() {
  }

  class UpdateItemCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateItem", {}).n("DynamoDBClient", "UpdateItemCommand").sc(UpdateItem$).build() {
  }

  class UpdateKinesisStreamingDestinationCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateKinesisStreamingDestination", {}).n("DynamoDBClient", "UpdateKinesisStreamingDestinationCommand").sc(UpdateKinesisStreamingDestination$).build() {
  }

  class UpdateTableCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateTable", {}).n("DynamoDBClient", "UpdateTableCommand").sc(UpdateTable$).build() {
  }

  class UpdateTableReplicaAutoScalingCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateTableReplicaAutoScaling", {}).n("DynamoDBClient", "UpdateTableReplicaAutoScalingCommand").sc(UpdateTableReplicaAutoScaling$).build() {
  }

  class UpdateTimeToLiveCommand extends Command.classBuilder().ep({
    ...commonParams,
    ResourceArn: { type: "contextParams", name: "TableName" }
  }).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("DynamoDB_20120810", "UpdateTimeToLive", {}).n("DynamoDBClient", "UpdateTimeToLiveCommand").sc(UpdateTimeToLive$).build() {
  }
  var paginateListContributorInsights = createPaginator(DynamoDBClient, ListContributorInsightsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListExports = createPaginator(DynamoDBClient, ListExportsCommand, "NextToken", "NextToken", "MaxResults");
  var paginateListImports = createPaginator(DynamoDBClient, ListImportsCommand, "NextToken", "NextToken", "PageSize");
  var paginateListTables = createPaginator(DynamoDBClient, ListTablesCommand, "ExclusiveStartTableName", "LastEvaluatedTableName", "Limit");
  var paginateQuery = createPaginator(DynamoDBClient, QueryCommand, "ExclusiveStartKey", "LastEvaluatedKey", "Limit");
  var paginateScan = createPaginator(DynamoDBClient, ScanCommand, "ExclusiveStartKey", "LastEvaluatedKey", "Limit");
  var checkState$5 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new DescribeContributorInsightsCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.ContributorInsightsStatus;
        };
        if (returnComparator() === "ENABLED") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.ContributorInsightsStatus;
        };
        if (returnComparator() === "FAILED") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForContributorInsightsEnabled = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$5);
  };
  var waitUntilContributorInsightsEnabled = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$5);
    return checkExceptions(result);
  };
  var checkState$4 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new DescribeExportCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.ExportDescription.ExportStatus;
        };
        if (returnComparator() === "COMPLETED") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.ExportDescription.ExportStatus;
        };
        if (returnComparator() === "FAILED") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForExportCompleted = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$4);
  };
  var waitUntilExportCompleted = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$4);
    return checkExceptions(result);
  };
  var checkState$3 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new DescribeImportCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.ImportTableDescription.ImportStatus;
        };
        if (returnComparator() === "COMPLETED") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.ImportTableDescription.ImportStatus;
        };
        if (returnComparator() === "FAILED") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.ImportTableDescription.ImportStatus;
        };
        if (returnComparator() === "CANCELLED") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForImportCompleted = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);
  };
  var waitUntilImportCompleted = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);
    return checkExceptions(result);
  };
  var checkState$2 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new DescribeKinesisStreamingDestinationCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          let flat_1 = [].concat(...result.KinesisDataStreamDestinations);
          let projection_3 = flat_1.map((element_2) => {
            return element_2.DestinationStatus;
          });
          return projection_3;
        };
        for (let anyStringEq_4 of returnComparator()) {
          if (anyStringEq_4 == "ACTIVE") {
            return { state: WaiterState.SUCCESS, reason };
          }
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          let filterRes_2 = result.KinesisDataStreamDestinations.filter((element_1) => {
            return (element_1.DestinationStatus == "DISABLED" || element_1.DestinationStatus == "ENABLE_FAILED") && (element_1.DestinationStatus == "ENABLE_FAILED" || element_1.DestinationStatus == "DISABLED");
          });
          return result.KinesisDataStreamDestinations.length > 0 && filterRes_2.length == result.KinesisDataStreamDestinations.length;
        };
        if (returnComparator() == true) {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForKinesisStreamingDestinationActive = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
  };
  var waitUntilKinesisStreamingDestinationActive = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
    return checkExceptions(result);
  };
  var checkState$1 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new DescribeTableCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.Table.TableStatus;
        };
        if (returnComparator() === "ACTIVE") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
      if (exception.name === "ResourceNotFoundException") {
        return { state: WaiterState.RETRY, reason };
      }
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForTableExists = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
  };
  var waitUntilTableExists = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
    return checkExceptions(result);
  };
  var checkState = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new DescribeTableCommand(input));
      reason = result;
    } catch (exception) {
      reason = exception;
      if (exception.name === "ResourceNotFoundException") {
        return { state: WaiterState.SUCCESS, reason };
      }
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForTableNotExists = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
  };
  var waitUntilTableNotExists = async (params, input) => {
    const serviceDefaults = { minDelay: 20, maxDelay: 120 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
    return checkExceptions(result);
  };
  var commands = {
    BatchExecuteStatementCommand,
    BatchGetItemCommand,
    BatchWriteItemCommand,
    CreateBackupCommand,
    CreateGlobalTableCommand,
    CreateTableCommand,
    DeleteBackupCommand,
    DeleteItemCommand,
    DeleteResourcePolicyCommand,
    DeleteTableCommand,
    DescribeBackupCommand,
    DescribeContinuousBackupsCommand,
    DescribeContributorInsightsCommand,
    DescribeEndpointsCommand,
    DescribeExportCommand,
    DescribeGlobalTableCommand,
    DescribeGlobalTableSettingsCommand,
    DescribeImportCommand,
    DescribeKinesisStreamingDestinationCommand,
    DescribeLimitsCommand,
    DescribeTableCommand,
    DescribeTableReplicaAutoScalingCommand,
    DescribeTimeToLiveCommand,
    DisableKinesisStreamingDestinationCommand,
    EnableKinesisStreamingDestinationCommand,
    ExecuteStatementCommand,
    ExecuteTransactionCommand,
    ExportTableToPointInTimeCommand,
    GetItemCommand,
    GetResourcePolicyCommand,
    ImportTableCommand,
    ListBackupsCommand,
    ListContributorInsightsCommand,
    ListExportsCommand,
    ListGlobalTablesCommand,
    ListImportsCommand,
    ListTablesCommand,
    ListTagsOfResourceCommand,
    PutItemCommand,
    PutResourcePolicyCommand,
    QueryCommand,
    RestoreTableFromBackupCommand,
    RestoreTableToPointInTimeCommand,
    ScanCommand,
    TagResourceCommand,
    TransactGetItemsCommand,
    TransactWriteItemsCommand,
    UntagResourceCommand,
    UpdateContinuousBackupsCommand,
    UpdateContributorInsightsCommand,
    UpdateGlobalTableCommand,
    UpdateGlobalTableSettingsCommand,
    UpdateItemCommand,
    UpdateKinesisStreamingDestinationCommand,
    UpdateTableCommand,
    UpdateTableReplicaAutoScalingCommand,
    UpdateTimeToLiveCommand
  };
  var paginators = {
    paginateListContributorInsights,
    paginateListExports,
    paginateListImports,
    paginateListTables,
    paginateQuery,
    paginateScan
  };
  var waiters = {
    waitUntilContributorInsightsEnabled,
    waitUntilExportCompleted,
    waitUntilImportCompleted,
    waitUntilKinesisStreamingDestinationActive,
    waitUntilTableExists,
    waitUntilTableNotExists
  };

  class DynamoDB extends DynamoDBClient {
  }
  createAggregatedClient(commands, DynamoDB, { paginators, waiters });
  var ApproximateCreationDateTimePrecision = {
    MICROSECOND: "MICROSECOND",
    MILLISECOND: "MILLISECOND"
  };
  var AttributeAction = {
    ADD: "ADD",
    DELETE: "DELETE",
    PUT: "PUT"
  };
  var ScalarAttributeType = {
    B: "B",
    N: "N",
    S: "S"
  };
  var BackupStatus = {
    AVAILABLE: "AVAILABLE",
    CREATING: "CREATING",
    DELETED: "DELETED"
  };
  var BackupType = {
    AWS_BACKUP: "AWS_BACKUP",
    SYSTEM: "SYSTEM",
    USER: "USER"
  };
  var BillingMode = {
    PAY_PER_REQUEST: "PAY_PER_REQUEST",
    PROVISIONED: "PROVISIONED"
  };
  var KeyType = {
    HASH: "HASH",
    RANGE: "RANGE"
  };
  var ProjectionType = {
    ALL: "ALL",
    INCLUDE: "INCLUDE",
    KEYS_ONLY: "KEYS_ONLY"
  };
  var SSEType = {
    AES256: "AES256",
    KMS: "KMS"
  };
  var SSEStatus = {
    DISABLED: "DISABLED",
    DISABLING: "DISABLING",
    ENABLED: "ENABLED",
    ENABLING: "ENABLING",
    UPDATING: "UPDATING"
  };
  var StreamViewType = {
    KEYS_ONLY: "KEYS_ONLY",
    NEW_AND_OLD_IMAGES: "NEW_AND_OLD_IMAGES",
    NEW_IMAGE: "NEW_IMAGE",
    OLD_IMAGE: "OLD_IMAGE"
  };
  var TimeToLiveStatus = {
    DISABLED: "DISABLED",
    DISABLING: "DISABLING",
    ENABLED: "ENABLED",
    ENABLING: "ENABLING"
  };
  var BackupTypeFilter = {
    ALL: "ALL",
    AWS_BACKUP: "AWS_BACKUP",
    SYSTEM: "SYSTEM",
    USER: "USER"
  };
  var ReturnConsumedCapacity = {
    INDEXES: "INDEXES",
    NONE: "NONE",
    TOTAL: "TOTAL"
  };
  var ReturnValuesOnConditionCheckFailure = {
    ALL_OLD: "ALL_OLD",
    NONE: "NONE"
  };
  var BatchStatementErrorCodeEnum = {
    AccessDenied: "AccessDenied",
    ConditionalCheckFailed: "ConditionalCheckFailed",
    DuplicateItem: "DuplicateItem",
    InternalServerError: "InternalServerError",
    ItemCollectionSizeLimitExceeded: "ItemCollectionSizeLimitExceeded",
    ProvisionedThroughputExceeded: "ProvisionedThroughputExceeded",
    RequestLimitExceeded: "RequestLimitExceeded",
    ResourceNotFound: "ResourceNotFound",
    ThrottlingError: "ThrottlingError",
    TransactionConflict: "TransactionConflict",
    ValidationError: "ValidationError"
  };
  var ReturnItemCollectionMetrics = {
    NONE: "NONE",
    SIZE: "SIZE"
  };
  var ComparisonOperator = {
    BEGINS_WITH: "BEGINS_WITH",
    BETWEEN: "BETWEEN",
    CONTAINS: "CONTAINS",
    EQ: "EQ",
    GE: "GE",
    GT: "GT",
    IN: "IN",
    LE: "LE",
    LT: "LT",
    NE: "NE",
    NOT_CONTAINS: "NOT_CONTAINS",
    NOT_NULL: "NOT_NULL",
    NULL: "NULL"
  };
  var ConditionalOperator = {
    AND: "AND",
    OR: "OR"
  };
  var ContinuousBackupsStatus = {
    DISABLED: "DISABLED",
    ENABLED: "ENABLED"
  };
  var PointInTimeRecoveryStatus = {
    DISABLED: "DISABLED",
    ENABLED: "ENABLED"
  };
  var ContributorInsightsAction = {
    DISABLE: "DISABLE",
    ENABLE: "ENABLE"
  };
  var ContributorInsightsMode = {
    ACCESSED_AND_THROTTLED_KEYS: "ACCESSED_AND_THROTTLED_KEYS",
    THROTTLED_KEYS: "THROTTLED_KEYS"
  };
  var ContributorInsightsStatus = {
    DISABLED: "DISABLED",
    DISABLING: "DISABLING",
    ENABLED: "ENABLED",
    ENABLING: "ENABLING",
    FAILED: "FAILED"
  };
  var GlobalTableStatus = {
    ACTIVE: "ACTIVE",
    CREATING: "CREATING",
    DELETING: "DELETING",
    UPDATING: "UPDATING"
  };
  var IndexStatus = {
    ACTIVE: "ACTIVE",
    CREATING: "CREATING",
    DELETING: "DELETING",
    UPDATING: "UPDATING"
  };
  var GlobalTableSettingsReplicationMode = {
    DISABLED: "DISABLED",
    ENABLED: "ENABLED",
    ENABLED_WITH_OVERRIDES: "ENABLED_WITH_OVERRIDES"
  };
  var ReplicaStatus = {
    ACTIVE: "ACTIVE",
    ARCHIVED: "ARCHIVED",
    ARCHIVING: "ARCHIVING",
    CREATING: "CREATING",
    CREATION_FAILED: "CREATION_FAILED",
    DELETING: "DELETING",
    INACCESSIBLE_ENCRYPTION_CREDENTIALS: "INACCESSIBLE_ENCRYPTION_CREDENTIALS",
    REGION_DISABLED: "REGION_DISABLED",
    REPLICATION_NOT_AUTHORIZED: "REPLICATION_NOT_AUTHORIZED",
    UPDATING: "UPDATING"
  };
  var TableClass = {
    STANDARD: "STANDARD",
    STANDARD_INFREQUENT_ACCESS: "STANDARD_INFREQUENT_ACCESS"
  };
  var TableStatus = {
    ACTIVE: "ACTIVE",
    ARCHIVED: "ARCHIVED",
    ARCHIVING: "ARCHIVING",
    CREATING: "CREATING",
    DELETING: "DELETING",
    INACCESSIBLE_ENCRYPTION_CREDENTIALS: "INACCESSIBLE_ENCRYPTION_CREDENTIALS",
    REPLICATION_NOT_AUTHORIZED: "REPLICATION_NOT_AUTHORIZED",
    UPDATING: "UPDATING"
  };
  var WitnessStatus = {
    ACTIVE: "ACTIVE",
    CREATING: "CREATING",
    DELETING: "DELETING"
  };
  var MultiRegionConsistency = {
    EVENTUAL: "EVENTUAL",
    STRONG: "STRONG"
  };
  var ReturnValue = {
    ALL_NEW: "ALL_NEW",
    ALL_OLD: "ALL_OLD",
    NONE: "NONE",
    UPDATED_NEW: "UPDATED_NEW",
    UPDATED_OLD: "UPDATED_OLD"
  };
  var ExportFormat = {
    DYNAMODB_JSON: "DYNAMODB_JSON",
    ION: "ION"
  };
  var ExportStatus = {
    COMPLETED: "COMPLETED",
    FAILED: "FAILED",
    IN_PROGRESS: "IN_PROGRESS"
  };
  var ExportType = {
    FULL_EXPORT: "FULL_EXPORT",
    INCREMENTAL_EXPORT: "INCREMENTAL_EXPORT"
  };
  var ExportViewType = {
    NEW_AND_OLD_IMAGES: "NEW_AND_OLD_IMAGES",
    NEW_IMAGE: "NEW_IMAGE"
  };
  var S3SseAlgorithm = {
    AES256: "AES256",
    KMS: "KMS"
  };
  var ImportStatus = {
    CANCELLED: "CANCELLED",
    CANCELLING: "CANCELLING",
    COMPLETED: "COMPLETED",
    FAILED: "FAILED",
    IN_PROGRESS: "IN_PROGRESS"
  };
  var InputCompressionType = {
    GZIP: "GZIP",
    NONE: "NONE",
    ZSTD: "ZSTD"
  };
  var InputFormat = {
    CSV: "CSV",
    DYNAMODB_JSON: "DYNAMODB_JSON",
    ION: "ION"
  };
  var DestinationStatus = {
    ACTIVE: "ACTIVE",
    DISABLED: "DISABLED",
    DISABLING: "DISABLING",
    ENABLE_FAILED: "ENABLE_FAILED",
    ENABLING: "ENABLING",
    UPDATING: "UPDATING"
  };
  var Select = {
    ALL_ATTRIBUTES: "ALL_ATTRIBUTES",
    ALL_PROJECTED_ATTRIBUTES: "ALL_PROJECTED_ATTRIBUTES",
    COUNT: "COUNT",
    SPECIFIC_ATTRIBUTES: "SPECIFIC_ATTRIBUTES"
  };
  exports2.ApproximateCreationDateTimePrecision = ApproximateCreationDateTimePrecision;
  exports2.AttributeAction = AttributeAction;
  exports2.BackupStatus = BackupStatus;
  exports2.BackupType = BackupType;
  exports2.BackupTypeFilter = BackupTypeFilter;
  exports2.BatchExecuteStatementCommand = BatchExecuteStatementCommand;
  exports2.BatchGetItemCommand = BatchGetItemCommand;
  exports2.BatchStatementErrorCodeEnum = BatchStatementErrorCodeEnum;
  exports2.BatchWriteItemCommand = BatchWriteItemCommand;
  exports2.BillingMode = BillingMode;
  exports2.ComparisonOperator = ComparisonOperator;
  exports2.ConditionalOperator = ConditionalOperator;
  exports2.ContinuousBackupsStatus = ContinuousBackupsStatus;
  exports2.ContributorInsightsAction = ContributorInsightsAction;
  exports2.ContributorInsightsMode = ContributorInsightsMode;
  exports2.ContributorInsightsStatus = ContributorInsightsStatus;
  exports2.CreateBackupCommand = CreateBackupCommand;
  exports2.CreateGlobalTableCommand = CreateGlobalTableCommand;
  exports2.CreateTableCommand = CreateTableCommand;
  exports2.DeleteBackupCommand = DeleteBackupCommand;
  exports2.DeleteItemCommand = DeleteItemCommand;
  exports2.DeleteResourcePolicyCommand = DeleteResourcePolicyCommand;
  exports2.DeleteTableCommand = DeleteTableCommand;
  exports2.DescribeBackupCommand = DescribeBackupCommand;
  exports2.DescribeContinuousBackupsCommand = DescribeContinuousBackupsCommand;
  exports2.DescribeContributorInsightsCommand = DescribeContributorInsightsCommand;
  exports2.DescribeEndpointsCommand = DescribeEndpointsCommand;
  exports2.DescribeExportCommand = DescribeExportCommand;
  exports2.DescribeGlobalTableCommand = DescribeGlobalTableCommand;
  exports2.DescribeGlobalTableSettingsCommand = DescribeGlobalTableSettingsCommand;
  exports2.DescribeImportCommand = DescribeImportCommand;
  exports2.DescribeKinesisStreamingDestinationCommand = DescribeKinesisStreamingDestinationCommand;
  exports2.DescribeLimitsCommand = DescribeLimitsCommand;
  exports2.DescribeTableCommand = DescribeTableCommand;
  exports2.DescribeTableReplicaAutoScalingCommand = DescribeTableReplicaAutoScalingCommand;
  exports2.DescribeTimeToLiveCommand = DescribeTimeToLiveCommand;
  exports2.DestinationStatus = DestinationStatus;
  exports2.DisableKinesisStreamingDestinationCommand = DisableKinesisStreamingDestinationCommand;
  exports2.DynamoDB = DynamoDB;
  exports2.DynamoDBClient = DynamoDBClient;
  exports2.EnableKinesisStreamingDestinationCommand = EnableKinesisStreamingDestinationCommand;
  exports2.ExecuteStatementCommand = ExecuteStatementCommand;
  exports2.ExecuteTransactionCommand = ExecuteTransactionCommand;
  exports2.ExportFormat = ExportFormat;
  exports2.ExportStatus = ExportStatus;
  exports2.ExportTableToPointInTimeCommand = ExportTableToPointInTimeCommand;
  exports2.ExportType = ExportType;
  exports2.ExportViewType = ExportViewType;
  exports2.GetItemCommand = GetItemCommand;
  exports2.GetResourcePolicyCommand = GetResourcePolicyCommand;
  exports2.GlobalTableSettingsReplicationMode = GlobalTableSettingsReplicationMode;
  exports2.GlobalTableStatus = GlobalTableStatus;
  exports2.ImportStatus = ImportStatus;
  exports2.ImportTableCommand = ImportTableCommand;
  exports2.IndexStatus = IndexStatus;
  exports2.InputCompressionType = InputCompressionType;
  exports2.InputFormat = InputFormat;
  exports2.KeyType = KeyType;
  exports2.ListBackupsCommand = ListBackupsCommand;
  exports2.ListContributorInsightsCommand = ListContributorInsightsCommand;
  exports2.ListExportsCommand = ListExportsCommand;
  exports2.ListGlobalTablesCommand = ListGlobalTablesCommand;
  exports2.ListImportsCommand = ListImportsCommand;
  exports2.ListTablesCommand = ListTablesCommand;
  exports2.ListTagsOfResourceCommand = ListTagsOfResourceCommand;
  exports2.MultiRegionConsistency = MultiRegionConsistency;
  exports2.PointInTimeRecoveryStatus = PointInTimeRecoveryStatus;
  exports2.ProjectionType = ProjectionType;
  exports2.PutItemCommand = PutItemCommand;
  exports2.PutResourcePolicyCommand = PutResourcePolicyCommand;
  exports2.QueryCommand = QueryCommand;
  exports2.ReplicaStatus = ReplicaStatus;
  exports2.RestoreTableFromBackupCommand = RestoreTableFromBackupCommand;
  exports2.RestoreTableToPointInTimeCommand = RestoreTableToPointInTimeCommand;
  exports2.ReturnConsumedCapacity = ReturnConsumedCapacity;
  exports2.ReturnItemCollectionMetrics = ReturnItemCollectionMetrics;
  exports2.ReturnValue = ReturnValue;
  exports2.ReturnValuesOnConditionCheckFailure = ReturnValuesOnConditionCheckFailure;
  exports2.S3SseAlgorithm = S3SseAlgorithm;
  exports2.SSEStatus = SSEStatus;
  exports2.SSEType = SSEType;
  exports2.ScalarAttributeType = ScalarAttributeType;
  exports2.ScanCommand = ScanCommand;
  exports2.Select = Select;
  exports2.StreamViewType = StreamViewType;
  exports2.TableClass = TableClass;
  exports2.TableStatus = TableStatus;
  exports2.TagResourceCommand = TagResourceCommand;
  exports2.TimeToLiveStatus = TimeToLiveStatus;
  exports2.TransactGetItemsCommand = TransactGetItemsCommand;
  exports2.TransactWriteItemsCommand = TransactWriteItemsCommand;
  exports2.UntagResourceCommand = UntagResourceCommand;
  exports2.UpdateContinuousBackupsCommand = UpdateContinuousBackupsCommand;
  exports2.UpdateContributorInsightsCommand = UpdateContributorInsightsCommand;
  exports2.UpdateGlobalTableCommand = UpdateGlobalTableCommand;
  exports2.UpdateGlobalTableSettingsCommand = UpdateGlobalTableSettingsCommand;
  exports2.UpdateItemCommand = UpdateItemCommand;
  exports2.UpdateKinesisStreamingDestinationCommand = UpdateKinesisStreamingDestinationCommand;
  exports2.UpdateTableCommand = UpdateTableCommand;
  exports2.UpdateTableReplicaAutoScalingCommand = UpdateTableReplicaAutoScalingCommand;
  exports2.UpdateTimeToLiveCommand = UpdateTimeToLiveCommand;
  exports2.WitnessStatus = WitnessStatus;
  exports2.paginateListContributorInsights = paginateListContributorInsights;
  exports2.paginateListExports = paginateListExports;
  exports2.paginateListImports = paginateListImports;
  exports2.paginateListTables = paginateListTables;
  exports2.paginateQuery = paginateQuery;
  exports2.paginateScan = paginateScan;
  exports2.waitForContributorInsightsEnabled = waitForContributorInsightsEnabled;
  exports2.waitForExportCompleted = waitForExportCompleted;
  exports2.waitForImportCompleted = waitForImportCompleted;
  exports2.waitForKinesisStreamingDestinationActive = waitForKinesisStreamingDestinationActive;
  exports2.waitForTableExists = waitForTableExists;
  exports2.waitForTableNotExists = waitForTableNotExists;
  exports2.waitUntilContributorInsightsEnabled = waitUntilContributorInsightsEnabled;
  exports2.waitUntilExportCompleted = waitUntilExportCompleted;
  exports2.waitUntilImportCompleted = waitUntilImportCompleted;
  exports2.waitUntilKinesisStreamingDestinationActive = waitUntilKinesisStreamingDestinationActive;
  exports2.waitUntilTableExists = waitUntilTableExists;
  exports2.waitUntilTableNotExists = waitUntilTableNotExists;
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/auth/httpAuthSchemeProvider.js
var require_httpAuthSchemeProvider9 = __commonJS((exports2) => {
  var { resolveAwsSdkSigV4Config } = require_httpAuthSchemes();
  var { getSmithyContext, normalizeProvider } = require_client3();
  exports2.defaultLambdaHttpAuthSchemeParametersProvider = async (config2, context10, input) => {
    return {
      operation: getSmithyContext(context10).operation,
      region: await normalizeProvider(config2.region)() || (() => {
        throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
      })()
    };
  };
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
    return {
      schemeId: "aws.auth#sigv4",
      signingProperties: {
        name: "lambda",
        region: authParameters.region
      },
      propertiesExtractor: (config2, context10) => ({
        signingProperties: {
          config: config2,
          context: context10
        }
      })
    };
  }
  exports2.defaultLambdaHttpAuthSchemeProvider = (authParameters) => {
    const options2 = [];
    switch (authParameters.operation) {
      default: {
        options2.push(createAwsAuthSigv4HttpAuthOption(authParameters));
      }
    }
    return options2;
  };
  exports2.resolveHttpAuthSchemeConfig = (config2) => {
    const config_0 = resolveAwsSdkSigV4Config(config2);
    return Object.assign(config_0, {
      authSchemePreference: normalizeProvider(config2.authSchemePreference ?? [])
    });
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/package.json
var require_package10 = __commonJS((exports2, module) => {
  module.exports = {
    name: "@aws-sdk/client-lambda",
    description: "AWS SDK for JavaScript Lambda Client for Node.js, Browser and React Native",
    version: "3.1074.0",
    scripts: {
      build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
      "build:cjs": "node ../../scripts/compilation/inline",
      "build:es": "premove dist-es && tsc -p tsconfig.es.json",
      "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
      "build:types": "premove dist-types && tsc -p tsconfig.types.json",
      "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
      clean: "premove dist-cjs dist-es dist-types",
      "extract:docs": "api-extractor run --local",
      "generate:client": "node ../../scripts/generate-clients/single-service",
      test: "yarn g:vitest run --passWithNoTests",
      "test:watch": "yarn g:vitest watch --passWithNoTests",
      "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
      "test:integration:watch": "yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts",
      "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
      "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
      "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
    },
    main: "./dist-cjs/index.js",
    types: "./dist-types/index.d.ts",
    module: "./dist-es/index.js",
    sideEffects: false,
    dependencies: {
      "@aws-crypto/sha256-browser": "5.2.0",
      "@aws-crypto/sha256-js": "5.2.0",
      "@aws-sdk/core": "^3.974.23",
      "@aws-sdk/credential-provider-node": "^3.972.58",
      "@aws-sdk/types": "^3.973.13",
      "@smithy/core": "^3.24.6",
      "@smithy/fetch-http-handler": "^5.4.6",
      "@smithy/node-http-handler": "^4.7.6",
      "@smithy/types": "^4.14.3",
      tslib: "^2.6.2"
    },
    devDependencies: {
      "@smithy/snapshot-testing": "^2.1.7",
      "@tsconfig/node20": "20.1.8",
      "@types/node": "^20.14.8",
      concurrently: "7.0.0",
      "downlevel-dts": "0.10.1",
      premove: "4.0.0",
      typescript: "~5.8.3",
      vitest: "^4.0.17"
    },
    engines: {
      node: ">=20.0.0"
    },
    typesVersions: {
      "<4.5": {
        "dist-types/*": [
          "dist-types/ts3.4/*"
        ]
      }
    },
    files: [
      "dist-*/**"
    ],
    author: {
      name: "AWS SDK for JavaScript Team",
      url: "https://aws.amazon.com/sdk-for-javascript/"
    },
    license: "Apache-2.0",
    browser: {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
    },
    "react-native": {
      "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
    },
    homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lambda",
    repository: {
      type: "git",
      url: "https://github.com/aws/aws-sdk-js-v3.git",
      directory: "clients/client-lambda"
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/endpoint/bdd.js
var require_bdd8 = __commonJS((exports2) => {
  var { BinaryDecisionDiagram } = require_endpoints();
  var k4 = "ref";
  var a13 = -1;
  var b5 = true;
  var c3 = "isSet";
  var d3 = "PartitionResult";
  var e3 = "booleanEquals";
  var f4 = "getAttr";
  var g4 = { [k4]: "Endpoint" };
  var h8 = { [k4]: d3 };
  var i = {};
  var j4 = [{ [k4]: "Region" }];
  var _data = {
    conditions: [
      [c3, [g4]],
      [c3, j4],
      ["aws.partition", j4, d3],
      [e3, [{ [k4]: "UseFIPS" }, b5]],
      [e3, [{ [k4]: "UseDualStack" }, b5]],
      [e3, [{ fn: f4, argv: [h8, "supportsDualStack"] }, b5]],
      [e3, [{ fn: f4, argv: [h8, "supportsFIPS"] }, b5]]
    ],
    results: [
      [a13],
      [a13, "Invalid Configuration: FIPS and custom endpoint are not supported"],
      [a13, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
      [g4, i],
      ["https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a13, "FIPS and DualStack are enabled, but this partition does not support one or both"],
      ["https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}", i],
      [a13, "FIPS is enabled but this partition does not support FIPS"],
      ["https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
      [a13, "DualStack is enabled but this partition does not support DualStack"],
      ["https://lambda.{Region}.{PartitionResult#dnsSuffix}", i],
      [a13, "Invalid Configuration: Missing Region"]
    ]
  };
  var root = 2;
  var r3 = 1e8;
  var nodes = new Int32Array([
    -1,
    1,
    -1,
    0,
    12,
    3,
    1,
    4,
    r3 + 11,
    2,
    5,
    r3 + 11,
    3,
    8,
    6,
    4,
    7,
    r3 + 10,
    5,
    r3 + 8,
    r3 + 9,
    4,
    10,
    9,
    6,
    r3 + 6,
    r3 + 7,
    5,
    11,
    r3 + 5,
    6,
    r3 + 4,
    r3 + 5,
    3,
    r3 + 1,
    13,
    4,
    r3 + 2,
    r3 + 3
  ]);
  exports2.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/endpoint/endpointResolver.js
var require_endpointResolver9 = __commonJS((exports2) => {
  var { awsEndpointFunctions } = require_client4();
  var { customEndpointFunctions, decideEndpoint, EndpointCache } = require_endpoints();
  var { bdd } = require_bdd8();
  var cache2 = new EndpointCache({
    size: 50,
    params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
  });
  exports2.defaultEndpointResolver = (endpointParams, context10 = {}) => {
    return cache2.get(endpointParams, () => decideEndpoint(bdd, {
      endpointParams,
      logger: context10.logger
    }));
  };
  customEndpointFunctions.aws = awsEndpointFunctions;
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/models/LambdaServiceException.js
var require_LambdaServiceException = __commonJS((exports2) => {
  var { ServiceException: __ServiceException } = require_client3();
  exports2.__ServiceException = __ServiceException;
  exports2.LambdaServiceException = class LambdaServiceException extends __ServiceException {
    constructor(options2) {
      super(options2);
      Object.setPrototypeOf(this, LambdaServiceException.prototype);
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/models/errors.js
var require_errors10 = __commonJS((exports2) => {
  var { LambdaServiceException: __BaseException } = require_LambdaServiceException();
  exports2.InvalidParameterValueException = class InvalidParameterValueException extends __BaseException {
    name = "InvalidParameterValueException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "InvalidParameterValueException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidParameterValueException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.PolicyLengthExceededException = class PolicyLengthExceededException extends __BaseException {
    name = "PolicyLengthExceededException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "PolicyLengthExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PolicyLengthExceededException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.PreconditionFailedException = class PreconditionFailedException extends __BaseException {
    name = "PreconditionFailedException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "PreconditionFailedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PreconditionFailedException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.ResourceConflictException = class ResourceConflictException extends __BaseException {
    name = "ResourceConflictException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "ResourceConflictException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceConflictException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
    name = "ResourceNotFoundException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "ResourceNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.ServiceException = class ServiceException extends __BaseException {
    name = "ServiceException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "ServiceException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, ServiceException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.TooManyRequestsException = class TooManyRequestsException extends __BaseException {
    name = "TooManyRequestsException";
    $fault = "client";
    retryAfterSeconds;
    Type;
    Reason;
    constructor(opts) {
      super({
        name: "TooManyRequestsException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, TooManyRequestsException.prototype);
      this.retryAfterSeconds = opts.retryAfterSeconds;
      this.Type = opts.Type;
      this.Reason = opts.Reason;
    }
  };
  exports2.PublicPolicyException = class PublicPolicyException extends __BaseException {
    name = "PublicPolicyException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "PublicPolicyException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, PublicPolicyException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.AliasLimitExceededException = class AliasLimitExceededException extends __BaseException {
    name = "AliasLimitExceededException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "AliasLimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, AliasLimitExceededException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.CapacityProviderLimitExceededException = class CapacityProviderLimitExceededException extends __BaseException {
    name = "CapacityProviderLimitExceededException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "CapacityProviderLimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CapacityProviderLimitExceededException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.ResourceInUseException = class ResourceInUseException extends __BaseException {
    name = "ResourceInUseException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "ResourceInUseException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceInUseException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.CodeSigningConfigNotFoundException = class CodeSigningConfigNotFoundException extends __BaseException {
    name = "CodeSigningConfigNotFoundException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "CodeSigningConfigNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CodeSigningConfigNotFoundException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.CodeStorageExceededException = class CodeStorageExceededException extends __BaseException {
    name = "CodeStorageExceededException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "CodeStorageExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CodeStorageExceededException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.CodeVerificationFailedException = class CodeVerificationFailedException extends __BaseException {
    name = "CodeVerificationFailedException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "CodeVerificationFailedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CodeVerificationFailedException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.FunctionVersionsPerCapacityProviderLimitExceededException = class FunctionVersionsPerCapacityProviderLimitExceededException extends __BaseException {
    name = "FunctionVersionsPerCapacityProviderLimitExceededException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "FunctionVersionsPerCapacityProviderLimitExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, FunctionVersionsPerCapacityProviderLimitExceededException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.InvalidCodeSignatureException = class InvalidCodeSignatureException extends __BaseException {
    name = "InvalidCodeSignatureException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "InvalidCodeSignatureException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidCodeSignatureException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.CodeArtifactUserDeletedException = class CodeArtifactUserDeletedException extends __BaseException {
    name = "CodeArtifactUserDeletedException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "CodeArtifactUserDeletedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CodeArtifactUserDeletedException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.CodeArtifactUserFailedException = class CodeArtifactUserFailedException extends __BaseException {
    name = "CodeArtifactUserFailedException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "CodeArtifactUserFailedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CodeArtifactUserFailedException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.CodeArtifactUserPendingException = class CodeArtifactUserPendingException extends __BaseException {
    name = "CodeArtifactUserPendingException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "CodeArtifactUserPendingException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CodeArtifactUserPendingException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.DurableExecutionAlreadyStartedException = class DurableExecutionAlreadyStartedException extends __BaseException {
    name = "DurableExecutionAlreadyStartedException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "DurableExecutionAlreadyStartedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, DurableExecutionAlreadyStartedException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.EC2AccessDeniedException = class EC2AccessDeniedException extends __BaseException {
    name = "EC2AccessDeniedException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "EC2AccessDeniedException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, EC2AccessDeniedException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.EC2ThrottledException = class EC2ThrottledException extends __BaseException {
    name = "EC2ThrottledException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "EC2ThrottledException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, EC2ThrottledException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.EC2UnexpectedException = class EC2UnexpectedException extends __BaseException {
    name = "EC2UnexpectedException";
    $fault = "server";
    Type;
    Message;
    EC2ErrorCode;
    constructor(opts) {
      super({
        name: "EC2UnexpectedException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, EC2UnexpectedException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
      this.EC2ErrorCode = opts.EC2ErrorCode;
    }
  };
  exports2.EFSIOException = class EFSIOException extends __BaseException {
    name = "EFSIOException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "EFSIOException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, EFSIOException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.EFSMountConnectivityException = class EFSMountConnectivityException extends __BaseException {
    name = "EFSMountConnectivityException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "EFSMountConnectivityException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, EFSMountConnectivityException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.EFSMountFailureException = class EFSMountFailureException extends __BaseException {
    name = "EFSMountFailureException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "EFSMountFailureException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, EFSMountFailureException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.EFSMountTimeoutException = class EFSMountTimeoutException extends __BaseException {
    name = "EFSMountTimeoutException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "EFSMountTimeoutException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, EFSMountTimeoutException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.ENILimitReachedException = class ENILimitReachedException extends __BaseException {
    name = "ENILimitReachedException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "ENILimitReachedException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, ENILimitReachedException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.ENINotReadyException = class ENINotReadyException extends __BaseException {
    name = "ENINotReadyException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "ENINotReadyException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, ENINotReadyException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.InvalidRequestContentException = class InvalidRequestContentException extends __BaseException {
    name = "InvalidRequestContentException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "InvalidRequestContentException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidRequestContentException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.InvalidRuntimeException = class InvalidRuntimeException extends __BaseException {
    name = "InvalidRuntimeException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "InvalidRuntimeException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidRuntimeException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.InvalidSecurityGroupIDException = class InvalidSecurityGroupIDException extends __BaseException {
    name = "InvalidSecurityGroupIDException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "InvalidSecurityGroupIDException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidSecurityGroupIDException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.InvalidSubnetIDException = class InvalidSubnetIDException extends __BaseException {
    name = "InvalidSubnetIDException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "InvalidSubnetIDException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidSubnetIDException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.InvalidZipFileException = class InvalidZipFileException extends __BaseException {
    name = "InvalidZipFileException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "InvalidZipFileException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, InvalidZipFileException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.KMSAccessDeniedException = class KMSAccessDeniedException extends __BaseException {
    name = "KMSAccessDeniedException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "KMSAccessDeniedException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, KMSAccessDeniedException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.KMSDisabledException = class KMSDisabledException extends __BaseException {
    name = "KMSDisabledException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "KMSDisabledException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, KMSDisabledException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.KMSInvalidStateException = class KMSInvalidStateException extends __BaseException {
    name = "KMSInvalidStateException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "KMSInvalidStateException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, KMSInvalidStateException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.KMSNotFoundException = class KMSNotFoundException extends __BaseException {
    name = "KMSNotFoundException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "KMSNotFoundException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, KMSNotFoundException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.ModeNotSupportedException = class ModeNotSupportedException extends __BaseException {
    name = "ModeNotSupportedException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "ModeNotSupportedException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ModeNotSupportedException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.NoPublishedVersionException = class NoPublishedVersionException extends __BaseException {
    name = "NoPublishedVersionException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "NoPublishedVersionException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, NoPublishedVersionException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.RecursiveInvocationException = class RecursiveInvocationException extends __BaseException {
    name = "RecursiveInvocationException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "RecursiveInvocationException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RecursiveInvocationException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.RequestTooLargeException = class RequestTooLargeException extends __BaseException {
    name = "RequestTooLargeException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "RequestTooLargeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, RequestTooLargeException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.ResourceNotReadyException = class ResourceNotReadyException extends __BaseException {
    name = "ResourceNotReadyException";
    $fault = "server";
    Type;
    constructor(opts) {
      super({
        name: "ResourceNotReadyException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, ResourceNotReadyException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.S3FilesMountConnectivityException = class S3FilesMountConnectivityException extends __BaseException {
    name = "S3FilesMountConnectivityException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "S3FilesMountConnectivityException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, S3FilesMountConnectivityException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.S3FilesMountFailureException = class S3FilesMountFailureException extends __BaseException {
    name = "S3FilesMountFailureException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "S3FilesMountFailureException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, S3FilesMountFailureException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.S3FilesMountTimeoutException = class S3FilesMountTimeoutException extends __BaseException {
    name = "S3FilesMountTimeoutException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "S3FilesMountTimeoutException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, S3FilesMountTimeoutException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.SerializedRequestEntityTooLargeException = class SerializedRequestEntityTooLargeException extends __BaseException {
    name = "SerializedRequestEntityTooLargeException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "SerializedRequestEntityTooLargeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SerializedRequestEntityTooLargeException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
    name = "ServiceQuotaExceededException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "ServiceQuotaExceededException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.SnapStartException = class SnapStartException extends __BaseException {
    name = "SnapStartException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "SnapStartException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SnapStartException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.SnapStartNotReadyException = class SnapStartNotReadyException extends __BaseException {
    name = "SnapStartNotReadyException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "SnapStartNotReadyException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SnapStartNotReadyException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.SnapStartRegenerationFailureException = class SnapStartRegenerationFailureException extends __BaseException {
    name = "SnapStartRegenerationFailureException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "SnapStartRegenerationFailureException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SnapStartRegenerationFailureException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.SnapStartTimeoutException = class SnapStartTimeoutException extends __BaseException {
    name = "SnapStartTimeoutException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "SnapStartTimeoutException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, SnapStartTimeoutException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.SubnetIPAddressLimitReachedException = class SubnetIPAddressLimitReachedException extends __BaseException {
    name = "SubnetIPAddressLimitReachedException";
    $fault = "server";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "SubnetIPAddressLimitReachedException",
        $fault: "server",
        ...opts
      });
      Object.setPrototypeOf(this, SubnetIPAddressLimitReachedException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
  exports2.UnsupportedMediaTypeException = class UnsupportedMediaTypeException extends __BaseException {
    name = "UnsupportedMediaTypeException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "UnsupportedMediaTypeException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, UnsupportedMediaTypeException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.ProvisionedConcurrencyConfigNotFoundException = class ProvisionedConcurrencyConfigNotFoundException extends __BaseException {
    name = "ProvisionedConcurrencyConfigNotFoundException";
    $fault = "client";
    Type;
    constructor(opts) {
      super({
        name: "ProvisionedConcurrencyConfigNotFoundException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, ProvisionedConcurrencyConfigNotFoundException.prototype);
      this.Type = opts.Type;
    }
  };
  exports2.CallbackTimeoutException = class CallbackTimeoutException extends __BaseException {
    name = "CallbackTimeoutException";
    $fault = "client";
    Type;
    Message;
    constructor(opts) {
      super({
        name: "CallbackTimeoutException",
        $fault: "client",
        ...opts
      });
      Object.setPrototypeOf(this, CallbackTimeoutException.prototype);
      this.Type = opts.Type;
      this.Message = opts.Message;
    }
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/schemas/schemas_0.js
var require_schemas_09 = __commonJS((exports2) => {
  var _A = "Action";
  var _AA = "AliasArn";
  var _AC = "AliasConfiguration";
  var _ACc = "AccessConfigs";
  var _ACl = "AllowCredentials";
  var _AFSC = "AppliedFunctionScalingConfig";
  var _AH = "AllowHeaders";
  var _AIT = "AllowedInstanceTypes";
  var _AL = "AccountLimit";
  var _ALEE = "AliasLimitExceededException";
  var _ALL = "ApplicationLogLevel";
  var _ALVP = "AddLayerVersionPermission";
  var _ALVPR = "AddLayerVersionPermissionRequest";
  var _ALVPRd = "AddLayerVersionPermissionResponse";
  var _ALl = "AliasList";
  var _AM = "AllowMethods";
  var _AMKESC = "AmazonManagedKafkaEventSourceConfig";
  var _AO = "AllowOrigins";
  var _AOp = "ApplyOn";
  var _AP = "AllowedPublishers";
  var _APCE = "AvailableProvisionedConcurrentExecutions";
  var _APCEl = "AllocatedProvisionedConcurrentExecutions";
  var _APR = "AddPermissionRequest";
  var _APRd = "AddPermissionResponse";
  var _APd = "AddPermission";
  var _ARC = "AliasRoutingConfiguration";
  var _AT = "AuthType";
  var _AU = "AccountUsage";
  var _AVW = "AdditionalVersionWeights";
  var _Al = "Aliases";
  var _Ar = "Architectures";
  var _Arn = "Arn";
  var _At = "Attribute";
  var _Att = "Attempt";
  var _B = "Blob";
  var _BBOFE = "BisectBatchOnFunctionError";
  var _BOP = "BinaryOperationPayload";
  var _BS = "BlobStream";
  var _BSa = "BatchSize";
  var _C = "Concurrency";
  var _CA = "CompatibleArchitectures";
  var _CAR = "CreateAliasRequest";
  var _CAUDE = "CodeArtifactUserDeletedException";
  var _CAUFE = "CodeArtifactUserFailedException";
  var _CAUPE = "CodeArtifactUserPendingException";
  var _CAo = "CompatibleArchitecture";
  var _CAr = "CreateAlias";
  var _CAu = "CurrentAttempt";
  var _CC = "ClientContext";
  var _CCP = "CreateCapacityProvider";
  var _CCPR = "CreateCapacityProviderRequest";
  var _CCPRr = "CreateCapacityProviderResponse";
  var _CCSC = "CreateCodeSigningConfig";
  var _CCSCR = "CreateCodeSigningConfigRequest";
  var _CCSCRr = "CreateCodeSigningConfigResponse";
  var _CD = "CallbackDetails";
  var _CDE = "CheckpointDurableExecution";
  var _CDER = "CheckpointDurableExecutionRequest";
  var _CDERh = "CheckpointDurableExecutionResponse";
  var _CDo = "ContextDetails";
  var _CDr = "CreatedDate";
  var _CE = "ConcurrentExecutions";
  var _CESM = "CreateEventSourceMapping";
  var _CESMR = "CreateEventSourceMappingRequest";
  var _CF = "CreateFunction";
  var _CFD = "CallbackFailedDetails";
  var _CFDo = "ContextFailedDetails";
  var _CFR = "CreateFunctionRequest";
  var _CFUC = "CreateFunctionUrlConfig";
  var _CFUCR = "CreateFunctionUrlConfigRequest";
  var _CFUCRr = "CreateFunctionUrlConfigResponse";
  var _CGI = "ConsumerGroupId";
  var _CI = "CallbackId";
  var _CID = "ChainedInvokeDetails";
  var _CIFD = "ChainedInvokeFailedDetails";
  var _CIO = "ChainedInvokeOptions";
  var _CISD = "ChainedInvokeStartedDetails";
  var _CISDh = "ChainedInvokeStoppedDetails";
  var _CISDha = "ChainedInvokeSucceededDetails";
  var _CITOD = "ChainedInvokeTimedOutDetails";
  var _CN = "CollectionName";
  var _CO = "CallbackOptions";
  var _COo = "ContextOptions";
  var _CP = "CapacityProvider";
  var _CPA = "CapacityProviderArn";
  var _CPC = "CapacityProviderConfig";
  var _CPL = "CapacityProvidersList";
  var _CPLEE = "CapacityProviderLimitExceededException";
  var _CPN = "CapacityProviderName";
  var _CPORA = "CapacityProviderOperatorRoleArn";
  var _CPPC = "CapacityProviderPermissionsConfig";
  var _CPSC = "CapacityProviderScalingConfig";
  var _CPSPL = "CapacityProviderScalingPoliciesList";
  var _CPVC = "CapacityProviderVpcConfig";
  var _CPa = "CapacityProviders";
  var _CR = "CompatibleRuntimes";
  var _CRo = "CompatibleRuntime";
  var _CS = "CodeSize";
  var _CSC = "CodeSigningConfig";
  var _CSCA = "CodeSigningConfigArn";
  var _CSCI = "CodeSigningConfigId";
  var _CSCL = "CodeSigningConfigList";
  var _CSCNFE = "CodeSigningConfigNotFoundException";
  var _CSCo = "CodeSigningConfigs";
  var _CSD = "CallbackStartedDetails";
  var _CSDa = "CallbackSucceededDetails";
  var _CSDo = "ContextStartedDetails";
  var _CSDon = "ContextSucceededDetails";
  var _CSEE = "CodeStorageExceededException";
  var _CSP = "CodeSigningPolicies";
  var _CSU = "CodeSizeUnzipped";
  var _CSZ = "CodeSizeZipped";
  var _CSo = "CodeSha256";
  var _CSon = "ConfigSha256";
  var _CT = "CheckpointToken";
  var _CTE = "CallbackTimeoutException";
  var _CTOD = "CallbackTimedOutDetails";
  var _CT_ = "Content-Type";
  var _CTl = "ClientToken";
  var _CTr = "CreationTime";
  var _CUES = "CheckpointUpdatedExecutionState";
  var _CVFE = "CodeVerificationFailedException";
  var _Co = "Cors";
  var _Cod = "Code";
  var _Com = "Command";
  var _Con = "Configuration";
  var _Cont = "Content";
  var _D = "Description";
  var _DA = "DeleteAlias";
  var _DAR = "DeleteAliasRequest";
  var _DC = "DestinationConfig";
  var _DCP = "DeleteCapacityProvider";
  var _DCPR = "DeleteCapacityProviderRequest";
  var _DCPRe = "DeleteCapacityProviderResponse";
  var _DCSC = "DeleteCodeSigningConfig";
  var _DCSCR = "DeleteCodeSigningConfigRequest";
  var _DCSCRe = "DeleteCodeSigningConfigResponse";
  var _DCu = "DurableConfig";
  var _DDBESC = "DocumentDBEventSourceConfig";
  var _DE = "DurableExecutions";
  var _DEA = "DurableExecutionArn";
  var _DEASE = "DurableExecutionAlreadyStartedException";
  var _DEN = "DurableExecutionName";
  var _DESM = "DeleteEventSourceMapping";
  var _DESMR = "DeleteEventSourceMappingRequest";
  var _DF = "DeleteFunction";
  var _DFC = "DeleteFunctionConcurrency";
  var _DFCR = "DeleteFunctionConcurrencyRequest";
  var _DFCSC = "DeleteFunctionCodeSigningConfig";
  var _DFCSCR = "DeleteFunctionCodeSigningConfigRequest";
  var _DFEIC = "DeleteFunctionEventInvokeConfig";
  var _DFEICR = "DeleteFunctionEventInvokeConfigRequest";
  var _DFR = "DeleteFunctionRequest";
  var _DFRe = "DeleteFunctionResponse";
  var _DFUC = "DeleteFunctionUrlConfig";
  var _DFUCR = "DeleteFunctionUrlConfigRequest";
  var _DLC = "DeadLetterConfig";
  var _DLV = "DeleteLayerVersion";
  var _DLVR = "DeleteLayerVersionRequest";
  var _DN = "DatabaseName";
  var _DPCC = "DeleteProvisionedConcurrencyConfig";
  var _DPCCR = "DeleteProvisionedConcurrencyConfigRequest";
  var _DR = "DryRun";
  var _De = "Destination";
  var _Du = "Duration";
  var _E = "Error";
  var _EC = "ErrorCode";
  var _ECADE = "EC2AccessDeniedException";
  var _ECEC = "EC2ErrorCode";
  var _ECTE = "EC2ThrottledException";
  var _ECUE = "EC2UnexpectedException";
  var _ED = "ErrorData";
  var _EDr = "ErrorDetails";
  var _EDx = "ExecutionDetails";
  var _EE = "EnvironmentError";
  var _EEMGBPVC = "ExecutionEnvironmentMemoryGiBPerVCpu";
  var _EEv = "EventError";
  var _EFD = "ExecutionFailedDetails";
  var _EFSIOE = "EFSIOException";
  var _EFSMCE = "EFSMountConnectivityException";
  var _EFSMFE = "EFSMountFailureException";
  var _EFSMTE = "EFSMountTimeoutException";
  var _EH = "ExposeHeaders";
  var _EI = "EventId";
  var _EIT = "ExcludedInstanceTypes";
  var _EIv = "EventInput";
  var _EM = "ErrorMessage";
  var _ENILRE = "ENILimitReachedException";
  var _ENINRE = "ENINotReadyException";
  var _EO = "ErrorObject";
  var _EP = "EntryPoint";
  var _ER = "EnvironmentResponse";
  var _ERF = "EventRecordFormat";
  var _ERv = "EventResult";
  var _ES = "EphemeralStorage";
  var _ESA = "EventSourceArn";
  var _ESD = "ExecutionStartedDetails";
  var _ESDx = "ExecutionSucceededDetails";
  var _ESDxe = "ExecutionStoppedDetails";
  var _ESM = "EventSourceMappings";
  var _ESMA = "EventSourceMappingArn";
  var _ESMC = "EventSourceMappingConfiguration";
  var _ESML = "EventSourceMappingsList";
  var _ESMLC = "EventSourceMappingLoggingConfig";
  var _ESMMC = "EventSourceMappingMetricsConfig";
  var _EST = "EventSourceToken";
  var _ESv = "EventStream";
  var _ET = "ErrorType";
  var _ETOD = "ExecutionTimedOutDetails";
  var _ETn = "EndTimestamp";
  var _ETv = "EventType";
  var _ETve = "EventTimestamp";
  var _ETx = "ExecutionTimeout";
  var _ETxp = "ExplicitTags";
  var _EV = "ExecutedVersion";
  var _EVN = "EnvironmentVariableName";
  var _EVV = "EnvironmentVariableValue";
  var _EVn = "EnvironmentVariables";
  var _En = "Enabled";
  var _End = "Endpoints";
  var _Env = "Environment";
  var _Ev = "Event";
  var _Eve = "Events";
  var _Ex = "Execution";
  var _F = "Filter";
  var _FA = "FunctionArn";
  var _FAu = "FunctionArns";
  var _FC = "FunctionCount";
  var _FCE = "FilterCriteriaError";
  var _FCL = "FunctionCodeLocation";
  var _FCi = "FilterCriteria";
  var _FCu = "FunctionCode";
  var _FCun = "FunctionConfiguration";
  var _FD = "FullDocument";
  var _FE = "FunctionError";
  var _FEIC = "FunctionEventInvokeConfig";
  var _FEICL = "FunctionEventInvokeConfigList";
  var _FEICu = "FunctionEventInvokeConfigs";
  var _FL = "FilterList";
  var _FLu = "FunctionList";
  var _FN = "FunctionName";
  var _FRT = "FunctionResponseTypes";
  var _FS = "FunctionState";
  var _FSC = "FileSystemConfigs";
  var _FSCL = "FileSystemConfigList";
  var _FSCi = "FileSystemConfig";
  var _FSCu = "FunctionScalingConfig";
  var _FU = "FunctionUrl";
  var _FUAT = "FunctionUrlAuthType";
  var _FUC = "FunctionUrlConfig";
  var _FUCL = "FunctionUrlConfigList";
  var _FUCu = "FunctionUrlConfigs";
  var _FV = "FunctionVersion";
  var _FVBCPL = "FunctionVersionsByCapacityProviderList";
  var _FVBCPLI = "FunctionVersionsByCapacityProviderListItem";
  var _FVPCPLEE = "FunctionVersionsPerCapacityProviderLimitExceededException";
  var _FVu = "FunctionVersions";
  var _Fi = "Filters";
  var _Fu = "Functions";
  var _GA = "GetAlias";
  var _GAR = "GetAliasRequest";
  var _GAS = "GetAccountSettings";
  var _GASR = "GetAccountSettingsRequest";
  var _GASRe = "GetAccountSettingsResponse";
  var _GCP = "GetCapacityProvider";
  var _GCPR = "GetCapacityProviderRequest";
  var _GCPRe = "GetCapacityProviderResponse";
  var _GCSC = "GetCodeSigningConfig";
  var _GCSCR = "GetCodeSigningConfigRequest";
  var _GCSCRe = "GetCodeSigningConfigResponse";
  var _GDE = "GetDurableExecution";
  var _GDEH = "GetDurableExecutionHistory";
  var _GDEHR = "GetDurableExecutionHistoryRequest";
  var _GDEHRe = "GetDurableExecutionHistoryResponse";
  var _GDER = "GetDurableExecutionRequest";
  var _GDERe = "GetDurableExecutionResponse";
  var _GDES = "GetDurableExecutionState";
  var _GDESR = "GetDurableExecutionStateRequest";
  var _GDESRe = "GetDurableExecutionStateResponse";
  var _GESM = "GetEventSourceMapping";
  var _GESMR = "GetEventSourceMappingRequest";
  var _GF = "GetFunction";
  var _GFC = "GetFunctionConcurrency";
  var _GFCR = "GetFunctionConcurrencyRequest";
  var _GFCRe = "GetFunctionConcurrencyResponse";
  var _GFCRet = "GetFunctionConfigurationRequest";
  var _GFCSC = "GetFunctionCodeSigningConfig";
  var _GFCSCR = "GetFunctionCodeSigningConfigRequest";
  var _GFCSCRe = "GetFunctionCodeSigningConfigResponse";
  var _GFCe = "GetFunctionConfiguration";
  var _GFEIC = "GetFunctionEventInvokeConfig";
  var _GFEICR = "GetFunctionEventInvokeConfigRequest";
  var _GFR = "GetFunctionRequest";
  var _GFRC = "GetFunctionRecursionConfig";
  var _GFRCR = "GetFunctionRecursionConfigRequest";
  var _GFRCRe = "GetFunctionRecursionConfigResponse";
  var _GFRe = "GetFunctionResponse";
  var _GFSC = "GetFunctionScalingConfig";
  var _GFSCR = "GetFunctionScalingConfigRequest";
  var _GFSCRe = "GetFunctionScalingConfigResponse";
  var _GFUC = "GetFunctionUrlConfig";
  var _GFUCR = "GetFunctionUrlConfigRequest";
  var _GFUCRe = "GetFunctionUrlConfigResponse";
  var _GLV = "GetLayerVersion";
  var _GLVBA = "GetLayerVersionByArn";
  var _GLVBAR = "GetLayerVersionByArnRequest";
  var _GLVP = "GetLayerVersionPolicy";
  var _GLVPR = "GetLayerVersionPolicyRequest";
  var _GLVPRe = "GetLayerVersionPolicyResponse";
  var _GLVR = "GetLayerVersionRequest";
  var _GLVRe = "GetLayerVersionResponse";
  var _GP = "GetPolicy";
  var _GPCC = "GetProvisionedConcurrencyConfig";
  var _GPCCR = "GetProvisionedConcurrencyConfigRequest";
  var _GPCCRe = "GetProvisionedConcurrencyConfigResponse";
  var _GPR = "GetPolicyRequest";
  var _GPRe = "GetPolicyResponse";
  var _GRMC = "GetRuntimeManagementConfig";
  var _GRMCR = "GetRuntimeManagementConfigRequest";
  var _GRMCRe = "GetRuntimeManagementConfigResponse";
  var _H = "Handler";
  var _HT = "HeartbeatTimeout";
  var _HTS = "HeartbeatTimeoutSeconds";
  var _I = "Input";
  var _IA = "InvokeArgs";
  var _IAFDS = "Ipv6AllowedForDualStack";
  var _IAR = "InvokeAsyncRequest";
  var _IARn = "InvokeAsyncResponse";
  var _IAn = "InvokeAsync";
  var _IC = "ImageConfig";
  var _ICD = "InvocationCompletedDetails";
  var _ICE = "ImageConfigError";
  var _ICR = "ImageConfigResponse";
  var _ICSE = "InvalidCodeSignatureException";
  var _ICn = "InvokeComplete";
  var _IED = "IncludeExecutionData";
  var _IM = "InvokeMode";
  var _IP = "InputPayload";
  var _IPVE = "InvalidParameterValueException";
  var _IR = "InstanceRequirements";
  var _IRCE = "InvalidRequestContentException";
  var _IRE = "InvalidRuntimeException";
  var _IRSU = "InvokeResponseStreamUpdate";
  var _IRn = "InvocationRequest";
  var _IRnv = "InvocationResponse";
  var _ISGIDE = "InvalidSecurityGroupIDException";
  var _ISIDE = "InvalidSubnetIDException";
  var _IT = "InvocationType";
  var _IU = "ImageUri";
  var _IVFU = "InvokedViaFunctionUrl";
  var _IWRS = "InvokeWithResponseStream";
  var _IWRSCE = "InvokeWithResponseStreamCompleteEvent";
  var _IWRSR = "InvokeWithResponseStreamRequest";
  var _IWRSRE = "InvokeWithResponseStreamResponseEvent";
  var _IWRSRn = "InvokeWithResponseStreamResponse";
  var _IZFE = "InvalidZipFileException";
  var _Id = "Id";
  var _In = "Invoke";
  var _K = "Key";
  var _KKA = "KmsKeyArn";
  var _KMSADE = "KMSAccessDeniedException";
  var _KMSDE = "KMSDisabledException";
  var _KMSISE = "KMSInvalidStateException";
  var _KMSKA = "KMSKeyArn";
  var _KMSNFE = "KMSNotFoundException";
  var _KSRAC = "KafkaSchemaRegistryAccessConfig";
  var _KSRACL = "KafkaSchemaRegistryAccessConfigList";
  var _KSRC = "KafkaSchemaRegistryConfig";
  var _KSVC = "KafkaSchemaValidationConfig";
  var _KSVCL = "KafkaSchemaValidationConfigList";
  var _L = "Layers";
  var _LA = "LayerArn";
  var _LAR = "ListAliasesRequest";
  var _LARi = "ListAliasesResponse";
  var _LAi = "ListAliases";
  var _LC = "LoggingConfig";
  var _LCP = "ListCapacityProviders";
  var _LCPR = "ListCapacityProvidersRequest";
  var _LCPRi = "ListCapacityProvidersResponse";
  var _LCSC = "ListCodeSigningConfigs";
  var _LCSCR = "ListCodeSigningConfigsRequest";
  var _LCSCRi = "ListCodeSigningConfigsResponse";
  var _LDEBF = "ListDurableExecutionsByFunction";
  var _LDEBFR = "ListDurableExecutionsByFunctionRequest";
  var _LDEBFRi = "ListDurableExecutionsByFunctionResponse";
  var _LESM = "ListEventSourceMappings";
  var _LESMR = "ListEventSourceMappingsRequest";
  var _LESMRi = "ListEventSourceMappingsResponse";
  var _LF = "LogFormat";
  var _LFBCSC = "ListFunctionsByCodeSigningConfig";
  var _LFBCSCR = "ListFunctionsByCodeSigningConfigRequest";
  var _LFBCSCRi = "ListFunctionsByCodeSigningConfigResponse";
  var _LFEIC = "ListFunctionEventInvokeConfigs";
  var _LFEICR = "ListFunctionEventInvokeConfigsRequest";
  var _LFEICRi = "ListFunctionEventInvokeConfigsResponse";
  var _LFR = "ListFunctionsRequest";
  var _LFRi = "ListFunctionsResponse";
  var _LFUC = "ListFunctionUrlConfigs";
  var _LFUCR = "ListFunctionUrlConfigsRequest";
  var _LFUCRi = "ListFunctionUrlConfigsResponse";
  var _LFVBCP = "ListFunctionVersionsByCapacityProvider";
  var _LFVBCPR = "ListFunctionVersionsByCapacityProviderRequest";
  var _LFVBCPRi = "ListFunctionVersionsByCapacityProviderResponse";
  var _LFi = "ListFunctions";
  var _LG = "LogGroup";
  var _LI = "LicenseInfo";
  var _LL = "LayersList";
  var _LLI = "LayersListItem";
  var _LLR = "ListLayersRequest";
  var _LLRi = "ListLayersResponse";
  var _LLV = "ListLayerVersions";
  var _LLVR = "ListLayerVersionsRequest";
  var _LLVRi = "ListLayerVersionsResponse";
  var _LLi = "ListLayers";
  var _LM = "LastModified";
  var _LMICPC = "LambdaManagedInstancesCapacityProviderConfig";
  var _LMP = "LocalMountPath";
  var _LMT = "LastModifiedTime";
  var _LMV = "LatestMatchingVersion";
  var _LN = "LayerName";
  var _LPCC = "ListProvisionedConcurrencyConfigs";
  var _LPCCR = "ListProvisionedConcurrencyConfigsRequest";
  var _LPCCRi = "ListProvisionedConcurrencyConfigsResponse";
  var _LPR = "LastProcessingResult";
  var _LR = "LogResult";
  var _LRL = "LayersReferenceList";
  var _LT = "LogType";
  var _LTR = "ListTagsRequest";
  var _LTRi = "ListTagsResponse";
  var _LTi = "ListTags";
  var _LUS = "LastUpdateStatus";
  var _LUSR = "LastUpdateStatusReason";
  var _LUSRC = "LastUpdateStatusReasonCode";
  var _LV = "LayerVersions";
  var _LVA = "LayerVersionArn";
  var _LVBF = "ListVersionsByFunction";
  var _LVBFR = "ListVersionsByFunctionRequest";
  var _LVBFRi = "ListVersionsByFunctionResponse";
  var _LVCI = "LayerVersionContentInput";
  var _LVCO = "LayerVersionContentOutput";
  var _LVL = "LayerVersionsList";
  var _LVLI = "LayerVersionsListItem";
  var _La = "Layer";
  var _Lo = "Location";
  var _M = "Message";
  var _MA = "MaxAge";
  var _MAa = "MasterArn";
  var _MBWIS = "MaximumBatchingWindowInSeconds";
  var _MC = "MetricsConfig";
  var _MCa = "MaximumConcurrency";
  var _MEAIS = "MaximumEventAgeInSeconds";
  var _MEE = "MinExecutionEnvironments";
  var _MEEa = "MaxExecutionEnvironments";
  var _MI = "MaxItems";
  var _MNSE = "ModeNotSupportedException";
  var _MP = "MinimumPollers";
  var _MPa = "MaximumPollers";
  var _MR = "MasterRegion";
  var _MRA = "MaximumRetryAttempts";
  var _MRAIS = "MaximumRecordAgeInSeconds";
  var _MS = "MemorySize";
  var _MVCC = "MaxVCpuCount";
  var _Ma = "Marker";
  var _Me = "Metrics";
  var _Mo = "Mode";
  var _N = "Name";
  var _NADS = "NextAttemptDelaySeconds";
  var _NAT = "NextAttemptTimestamp";
  var _NES = "NewExecutionState";
  var _NM = "NextMarker";
  var _NPVE = "NoPublishedVersionException";
  var _O = "Operations";
  var _OF = "OnFailure";
  var _OI = "OrganizationId";
  var _OP = "OperationPayload";
  var _OPu = "OutputPayload";
  var _OS = "OnSuccess";
  var _OSp = "OptimizationStatus";
  var _OU = "OperationUpdate";
  var _OUp = "OperationUpdates";
  var _Op = "Operation";
  var _P = "Principal";
  var _PC = "PermissionsConfig";
  var _PCC = "ProvisionedConcurrencyConfigs";
  var _PCCL = "ProvisionedConcurrencyConfigList";
  var _PCCLI = "ProvisionedConcurrencyConfigListItem";
  var _PCCNFE = "ProvisionedConcurrencyConfigNotFoundException";
  var _PCE = "ProvisionedConcurrentExecutions";
  var _PCa = "PayloadChunk";
  var _PEEMC = "PerExecutionEnvironmentMaxConcurrency";
  var _PF = "ParallelizationFactor";
  var _PFC = "PutFunctionConcurrency";
  var _PFCR = "PutFunctionConcurrencyRequest";
  var _PFCSC = "PutFunctionCodeSigningConfig";
  var _PFCSCR = "PutFunctionCodeSigningConfigRequest";
  var _PFCSCRu = "PutFunctionCodeSigningConfigResponse";
  var _PFE = "PreconditionFailedException";
  var _PFEIC = "PutFunctionEventInvokeConfig";
  var _PFEICR = "PutFunctionEventInvokeConfigRequest";
  var _PFRC = "PutFunctionRecursionConfig";
  var _PFRCR = "PutFunctionRecursionConfigRequest";
  var _PFRCRu = "PutFunctionRecursionConfigResponse";
  var _PFSC = "PutFunctionScalingConfig";
  var _PFSCR = "PutFunctionScalingConfigRequest";
  var _PFSCRu = "PutFunctionScalingConfigResponse";
  var _PGN = "PollerGroupName";
  var _PI = "ParentId";
  var _PLEE = "PolicyLengthExceededException";
  var _PLV = "PublishLayerVersion";
  var _PLVR = "PublishLayerVersionRequest";
  var _PLVRu = "PublishLayerVersionResponse";
  var _PMT = "PredefinedMetricType";
  var _POID = "PrincipalOrgID";
  var _PPC = "ProvisionedPollerConfig";
  var _PPCC = "PutProvisionedConcurrencyConfig";
  var _PPCCR = "PutProvisionedConcurrencyConfigRequest";
  var _PPCCRu = "PutProvisionedConcurrencyConfigResponse";
  var _PPE = "PublicPolicyException";
  var _PRMC = "PutRuntimeManagementConfig";
  var _PRMCR = "PutRuntimeManagementConfigRequest";
  var _PRMCRu = "PutRuntimeManagementConfigResponse";
  var _PT = "PropagateTags";
  var _PTa = "PackageType";
  var _PTu = "PublishTo";
  var _PV = "PublishVersion";
  var _PVR = "PublishVersionRequest";
  var _Pa = "Payload";
  var _Pat = "Pattern";
  var _Po = "Policy";
  var _Pu = "Publish";
  var _Q = "Qualifier";
  var _Qu = "Queues";
  var _R = "Reason";
  var _RA = "Retry-After";
  var _RC = "RoutingConfig";
  var _RCE = "ResourceConflictException";
  var _RCEe = "ReservedConcurrentExecutions";
  var _RCe = "ReplayChildren";
  var _RD = "RetryDetails";
  var _RFSC = "RequestedFunctionScalingConfig";
  var _RI = "RevisionId";
  var _RIE = "RecursiveInvocationException";
  var _RIU = "ResolvedImageUri";
  var _RIUE = "ResourceInUseException";
  var _RIe = "RequestId";
  var _RL = "RecursiveLoop";
  var _RLVP = "RemoveLayerVersionPermission";
  var _RLVPR = "RemoveLayerVersionPermissionRequest";
  var _RNFE = "ResourceNotFoundException";
  var _RNRE = "ResourceNotReadyException";
  var _RO = "ReverseOrder";
  var _RP = "RemovePermission";
  var _RPCE = "RequestedProvisionedConcurrentExecutions";
  var _RPID = "RetentionPeriodInDays";
  var _RPR = "RemovePermissionRequest";
  var _RSCT = "ResponseStreamContentType";
  var _RT = "RepositoryType";
  var _RTLE = "RequestTooLargeException";
  var _RVA = "RuntimeVersionArn";
  var _RVC = "RuntimeVersionConfig";
  var _RVE = "RuntimeVersionError";
  var _Re = "Result";
  var _Res = "Resource";
  var _Ro = "Role";
  var _Ru = "Runtime";
  var _S = "Statement";
  var _SA = "SourceArn";
  var _SAC = "SourceAccessConfigurations";
  var _SACo = "SourceAccessConfiguration";
  var _SAo = "SourceAccount";
  var _SAt = "StartedAfter";
  var _SB = "S3Bucket";
  var _SBt = "StartedBefore";
  var _SC = "ScalingConfig";
  var _SCt = "StatusCode";
  var _SD = "StepDetails";
  var _SDE = "StopDurableExecution";
  var _SDECF = "SendDurableExecutionCallbackFailure";
  var _SDECFR = "SendDurableExecutionCallbackFailureRequest";
  var _SDECFRe = "SendDurableExecutionCallbackFailureResponse";
  var _SDECH = "SendDurableExecutionCallbackHeartbeat";
  var _SDECHR = "SendDurableExecutionCallbackHeartbeatRequest";
  var _SDECHRe = "SendDurableExecutionCallbackHeartbeatResponse";
  var _SDECS = "SendDurableExecutionCallbackSuccess";
  var _SDECSR = "SendDurableExecutionCallbackSuccessRequest";
  var _SDECSRe = "SendDurableExecutionCallbackSuccessResponse";
  var _SDER = "StopDurableExecutionRequest";
  var _SDERt = "StopDurableExecutionResponse";
  var _SE = "ServiceException";
  var _SET = "ScheduledEndTimestamp";
  var _SFD = "StepFailedDetails";
  var _SFMCE = "S3FilesMountConnectivityException";
  var _SFMFE = "S3FilesMountFailureException";
  var _SFMTE = "S3FilesMountTimeoutException";
  var _SGI = "SecurityGroupIds";
  var _SI = "StatementId";
  var _SIPALRE = "SubnetIPAddressLimitReachedException";
  var _SIu = "SubnetIds";
  var _SJA = "SigningJobArn";
  var _SK = "S3Key";
  var _SKMSKA = "SourceKMSKeyArn";
  var _SLL = "SystemLogLevel";
  var _SM = "ScalingMode";
  var _SMES = "SelfManagedEventSource";
  var _SMKESC = "SelfManagedKafkaEventSourceConfig";
  var _SO = "StepOptions";
  var _SOV = "S3ObjectVersion";
  var _SP = "ScalingPolicies";
  var _SPT = "StartingPositionTimestamp";
  var _SPVA = "SigningProfileVersionArns";
  var _SPVAi = "SigningProfileVersionArn";
  var _SPt = "StartingPosition";
  var _SQEE = "ServiceQuotaExceededException";
  var _SR = "StateReason";
  var _SRC = "SchemaRegistryConfig";
  var _SRCt = "StateReasonCode";
  var _SRETLE = "SerializedRequestEntityTooLargeException";
  var _SRURI = "SchemaRegistryURI";
  var _SRt = "StatusReason";
  var _SS = "SensitiveString";
  var _SSD = "StepStartedDetails";
  var _SSDt = "StepSucceededDetails";
  var _SSE = "SnapStartException";
  var _SSNRE = "SnapStartNotReadyException";
  var _SSR = "SnapStartResponse";
  var _SSRFE = "SnapStartRegenerationFailureException";
  var _SSTE = "SnapStartTimeoutException";
  var _SSn = "SnapStart";
  var _ST = "StackTrace";
  var _STE = "StackTraceEntry";
  var _STEt = "StackTraceEntries";
  var _STR = "StateTransitionReason";
  var _STt = "StartTimestamp";
  var _STto = "StopTimestamp";
  var _STu = "SubType";
  var _SVC = "SchemaValidationConfigs";
  var _Si = "Size";
  var _St = "State";
  var _Sta = "Status";
  var _Stat = "Statuses";
  var _T = "Type";
  var _TA = "TargetArn";
  var _TC = "TracingConfig";
  var _TCR = "TracingConfigResponse";
  var _TCS = "TotalCodeSize";
  var _TCe = "TenancyConfig";
  var _TE = "TagsError";
  var _TH = "TraceHeader";
  var _TI = "TenantId";
  var _TIM = "TenantIsolationMode";
  var _TK = "TagKeys";
  var _TKL = "TagKeyList";
  var _TMRE = "TooManyRequestsException";
  var _TR = "TagResource";
  var _TRR = "TagResourceRequest";
  var _TS = "TimeoutSeconds";
  var _TTSP = "TargetTrackingScalingPolicy";
  var _TV = "TargetValue";
  var _TWIS = "TumblingWindowInSeconds";
  var _Ta = "Tags";
  var _Ti = "Timeout";
  var _To = "Topics";
  var _Tr = "Truncated";
  var _U = "Updates";
  var _UA = "UpdateAlias";
  var _UAOD = "UntrustedArtifactOnDeployment";
  var _UAR = "UpdateAliasRequest";
  var _UCE = "UnreservedConcurrentExecutions";
  var _UCP = "UpdateCapacityProvider";
  var _UCPR = "UpdateCapacityProviderRequest";
  var _UCPRp = "UpdateCapacityProviderResponse";
  var _UCSC = "UpdateCodeSigningConfig";
  var _UCSCR = "UpdateCodeSigningConfigRequest";
  var _UCSCRp = "UpdateCodeSigningConfigResponse";
  var _UESM = "UpdateEventSourceMapping";
  var _UESMR = "UpdateEventSourceMappingRequest";
  var _UFC = "UpdateFunctionCode";
  var _UFCR = "UpdateFunctionCodeRequest";
  var _UFCRp = "UpdateFunctionConfigurationRequest";
  var _UFCp = "UpdateFunctionConfiguration";
  var _UFEIC = "UpdateFunctionEventInvokeConfig";
  var _UFEICR = "UpdateFunctionEventInvokeConfigRequest";
  var _UFUC = "UpdateFunctionUrlConfig";
  var _UFUCR = "UpdateFunctionUrlConfigRequest";
  var _UFUCRp = "UpdateFunctionUrlConfigResponse";
  var _UMTE = "UnsupportedMediaTypeException";
  var _UR = "UntagResource";
  var _URI = "URI";
  var _URO = "UpdateRuntimeOn";
  var _URR = "UntagResourceRequest";
  var _UUID = "UUID";
  var _V = "Variables";
  var _VC = "VpcConfig";
  var _VCR = "VpcConfigResponse";
  var _VI = "VpcId";
  var _VN = "VersionNumber";
  var _Ve = "Version";
  var _Ver = "Versions";
  var _WCD = "WaitCancelledDetails";
  var _WD = "WorkingDirectory";
  var _WDa = "WaitDetails";
  var _WO = "WaitOptions";
  var _WS = "WaitSeconds";
  var _WSD = "WaitStartedDetails";
  var _WSDa = "WaitSucceededDetails";
  var _XACC = "X-Amz-Client-Context";
  var _XADEA = "X-Amz-Durable-Execution-Arn";
  var _XADEN = "X-Amz-Durable-Execution-Name";
  var _XAEV = "X-Amz-Executed-Version";
  var _XAFE = "X-Amz-Function-Error";
  var _XAIT = "X-Amz-Invocation-Type";
  var _XALR = "X-Amz-Log-Result";
  var _XALT = "X-Amz-Log-Type";
  var _XATI = "X-Amz-Tenant-Id";
  var _XATIm = "XAmznTraceId";
  var _ZF = "ZipFile";
  var _c = "client";
  var _e3 = "error";
  var _eP = "eventPayload";
  var _h = "http";
  var _hE = "httpError";
  var _hH = "httpHeader";
  var _hQ = "httpQuery";
  var _m = "message";
  var _rAS = "retryAfterSeconds";
  var _s2 = "smithy.ts.sdk.synthetic.com.amazonaws.lambda";
  var _se = "server";
  var _st = "streaming";
  var _tK = "tagKeys";
  var _xN = "xmlName";
  var n0 = "com.amazonaws.lambda";
  var { TypeRegistry } = require_schema();
  var { AliasLimitExceededException, CallbackTimeoutException, CapacityProviderLimitExceededException, CodeArtifactUserDeletedException, CodeArtifactUserFailedException, CodeArtifactUserPendingException, CodeSigningConfigNotFoundException, CodeStorageExceededException, CodeVerificationFailedException, DurableExecutionAlreadyStartedException, EC2AccessDeniedException, EC2ThrottledException, EC2UnexpectedException, EFSIOException, EFSMountConnectivityException, EFSMountFailureException, EFSMountTimeoutException, ENILimitReachedException, ENINotReadyException, FunctionVersionsPerCapacityProviderLimitExceededException, InvalidCodeSignatureException, InvalidParameterValueException, InvalidRequestContentException, InvalidRuntimeException, InvalidSecurityGroupIDException, InvalidSubnetIDException, InvalidZipFileException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, ModeNotSupportedException, NoPublishedVersionException, PolicyLengthExceededException, PreconditionFailedException, ProvisionedConcurrencyConfigNotFoundException, PublicPolicyException, RecursiveInvocationException, RequestTooLargeException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, S3FilesMountConnectivityException, S3FilesMountFailureException, S3FilesMountTimeoutException, SerializedRequestEntityTooLargeException, ServiceException, ServiceQuotaExceededException, SnapStartException, SnapStartNotReadyException, SnapStartRegenerationFailureException, SnapStartTimeoutException, SubnetIPAddressLimitReachedException, TooManyRequestsException, UnsupportedMediaTypeException } = require_errors10();
  var { LambdaServiceException } = require_LambdaServiceException();
  var _s_registry = TypeRegistry.for(_s2);
  var LambdaServiceException$ = [-3, _s2, "LambdaServiceException", 0, [], []];
  exports2.LambdaServiceException$ = LambdaServiceException$;
  _s_registry.registerError(LambdaServiceException$, LambdaServiceException);
  var n0_registry = TypeRegistry.for(n0);
  var AliasLimitExceededException$ = [
    -3,
    n0,
    _ALEE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.AliasLimitExceededException$ = AliasLimitExceededException$;
  n0_registry.registerError(AliasLimitExceededException$, AliasLimitExceededException);
  var CallbackTimeoutException$ = [
    -3,
    n0,
    _CTE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.CallbackTimeoutException$ = CallbackTimeoutException$;
  n0_registry.registerError(CallbackTimeoutException$, CallbackTimeoutException);
  var CapacityProviderLimitExceededException$ = [
    -3,
    n0,
    _CPLEE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.CapacityProviderLimitExceededException$ = CapacityProviderLimitExceededException$;
  n0_registry.registerError(CapacityProviderLimitExceededException$, CapacityProviderLimitExceededException);
  var CodeArtifactUserDeletedException$ = [
    -3,
    n0,
    _CAUDE,
    { [_e3]: _c, [_hE]: 409 },
    [_T, _m],
    [0, 0]
  ];
  exports2.CodeArtifactUserDeletedException$ = CodeArtifactUserDeletedException$;
  n0_registry.registerError(CodeArtifactUserDeletedException$, CodeArtifactUserDeletedException);
  var CodeArtifactUserFailedException$ = [
    -3,
    n0,
    _CAUFE,
    { [_e3]: _c, [_hE]: 409 },
    [_T, _m],
    [0, 0]
  ];
  exports2.CodeArtifactUserFailedException$ = CodeArtifactUserFailedException$;
  n0_registry.registerError(CodeArtifactUserFailedException$, CodeArtifactUserFailedException);
  var CodeArtifactUserPendingException$ = [
    -3,
    n0,
    _CAUPE,
    { [_e3]: _c, [_hE]: 409 },
    [_T, _m],
    [0, 0]
  ];
  exports2.CodeArtifactUserPendingException$ = CodeArtifactUserPendingException$;
  n0_registry.registerError(CodeArtifactUserPendingException$, CodeArtifactUserPendingException);
  var CodeSigningConfigNotFoundException$ = [
    -3,
    n0,
    _CSCNFE,
    { [_e3]: _c, [_hE]: 404 },
    [_T, _M],
    [0, 0]
  ];
  exports2.CodeSigningConfigNotFoundException$ = CodeSigningConfigNotFoundException$;
  n0_registry.registerError(CodeSigningConfigNotFoundException$, CodeSigningConfigNotFoundException);
  var CodeStorageExceededException$ = [
    -3,
    n0,
    _CSEE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.CodeStorageExceededException$ = CodeStorageExceededException$;
  n0_registry.registerError(CodeStorageExceededException$, CodeStorageExceededException);
  var CodeVerificationFailedException$ = [
    -3,
    n0,
    _CVFE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.CodeVerificationFailedException$ = CodeVerificationFailedException$;
  n0_registry.registerError(CodeVerificationFailedException$, CodeVerificationFailedException);
  var DurableExecutionAlreadyStartedException$ = [
    -3,
    n0,
    _DEASE,
    { [_e3]: _c, [_hE]: 409 },
    [_T, _M],
    [0, 0]
  ];
  exports2.DurableExecutionAlreadyStartedException$ = DurableExecutionAlreadyStartedException$;
  n0_registry.registerError(DurableExecutionAlreadyStartedException$, DurableExecutionAlreadyStartedException);
  var EC2AccessDeniedException$ = [
    -3,
    n0,
    _ECADE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.EC2AccessDeniedException$ = EC2AccessDeniedException$;
  n0_registry.registerError(EC2AccessDeniedException$, EC2AccessDeniedException);
  var EC2ThrottledException$ = [
    -3,
    n0,
    _ECTE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.EC2ThrottledException$ = EC2ThrottledException$;
  n0_registry.registerError(EC2ThrottledException$, EC2ThrottledException);
  var EC2UnexpectedException$ = [
    -3,
    n0,
    _ECUE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M, _ECEC],
    [0, 0, 0]
  ];
  exports2.EC2UnexpectedException$ = EC2UnexpectedException$;
  n0_registry.registerError(EC2UnexpectedException$, EC2UnexpectedException);
  var EFSIOException$ = [
    -3,
    n0,
    _EFSIOE,
    { [_e3]: _c, [_hE]: 410 },
    [_T, _M],
    [0, 0]
  ];
  exports2.EFSIOException$ = EFSIOException$;
  n0_registry.registerError(EFSIOException$, EFSIOException);
  var EFSMountConnectivityException$ = [
    -3,
    n0,
    _EFSMCE,
    { [_e3]: _c, [_hE]: 408 },
    [_T, _M],
    [0, 0]
  ];
  exports2.EFSMountConnectivityException$ = EFSMountConnectivityException$;
  n0_registry.registerError(EFSMountConnectivityException$, EFSMountConnectivityException);
  var EFSMountFailureException$ = [
    -3,
    n0,
    _EFSMFE,
    { [_e3]: _c, [_hE]: 403 },
    [_T, _M],
    [0, 0]
  ];
  exports2.EFSMountFailureException$ = EFSMountFailureException$;
  n0_registry.registerError(EFSMountFailureException$, EFSMountFailureException);
  var EFSMountTimeoutException$ = [
    -3,
    n0,
    _EFSMTE,
    { [_e3]: _c, [_hE]: 408 },
    [_T, _M],
    [0, 0]
  ];
  exports2.EFSMountTimeoutException$ = EFSMountTimeoutException$;
  n0_registry.registerError(EFSMountTimeoutException$, EFSMountTimeoutException);
  var ENILimitReachedException$ = [
    -3,
    n0,
    _ENILRE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.ENILimitReachedException$ = ENILimitReachedException$;
  n0_registry.registerError(ENILimitReachedException$, ENILimitReachedException);
  var ENINotReadyException$ = [
    -3,
    n0,
    _ENINRE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.ENINotReadyException$ = ENINotReadyException$;
  n0_registry.registerError(ENINotReadyException$, ENINotReadyException);
  var FunctionVersionsPerCapacityProviderLimitExceededException$ = [
    -3,
    n0,
    _FVPCPLEE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.FunctionVersionsPerCapacityProviderLimitExceededException$ = FunctionVersionsPerCapacityProviderLimitExceededException$;
  n0_registry.registerError(FunctionVersionsPerCapacityProviderLimitExceededException$, FunctionVersionsPerCapacityProviderLimitExceededException);
  var InvalidCodeSignatureException$ = [
    -3,
    n0,
    _ICSE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.InvalidCodeSignatureException$ = InvalidCodeSignatureException$;
  n0_registry.registerError(InvalidCodeSignatureException$, InvalidCodeSignatureException);
  var InvalidParameterValueException$ = [
    -3,
    n0,
    _IPVE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.InvalidParameterValueException$ = InvalidParameterValueException$;
  n0_registry.registerError(InvalidParameterValueException$, InvalidParameterValueException);
  var InvalidRequestContentException$ = [
    -3,
    n0,
    _IRCE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.InvalidRequestContentException$ = InvalidRequestContentException$;
  n0_registry.registerError(InvalidRequestContentException$, InvalidRequestContentException);
  var InvalidRuntimeException$ = [
    -3,
    n0,
    _IRE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.InvalidRuntimeException$ = InvalidRuntimeException$;
  n0_registry.registerError(InvalidRuntimeException$, InvalidRuntimeException);
  var InvalidSecurityGroupIDException$ = [
    -3,
    n0,
    _ISGIDE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.InvalidSecurityGroupIDException$ = InvalidSecurityGroupIDException$;
  n0_registry.registerError(InvalidSecurityGroupIDException$, InvalidSecurityGroupIDException);
  var InvalidSubnetIDException$ = [
    -3,
    n0,
    _ISIDE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.InvalidSubnetIDException$ = InvalidSubnetIDException$;
  n0_registry.registerError(InvalidSubnetIDException$, InvalidSubnetIDException);
  var InvalidZipFileException$ = [
    -3,
    n0,
    _IZFE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.InvalidZipFileException$ = InvalidZipFileException$;
  n0_registry.registerError(InvalidZipFileException$, InvalidZipFileException);
  var KMSAccessDeniedException$ = [
    -3,
    n0,
    _KMSADE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.KMSAccessDeniedException$ = KMSAccessDeniedException$;
  n0_registry.registerError(KMSAccessDeniedException$, KMSAccessDeniedException);
  var KMSDisabledException$ = [
    -3,
    n0,
    _KMSDE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.KMSDisabledException$ = KMSDisabledException$;
  n0_registry.registerError(KMSDisabledException$, KMSDisabledException);
  var KMSInvalidStateException$ = [
    -3,
    n0,
    _KMSISE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.KMSInvalidStateException$ = KMSInvalidStateException$;
  n0_registry.registerError(KMSInvalidStateException$, KMSInvalidStateException);
  var KMSNotFoundException$ = [
    -3,
    n0,
    _KMSNFE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.KMSNotFoundException$ = KMSNotFoundException$;
  n0_registry.registerError(KMSNotFoundException$, KMSNotFoundException);
  var ModeNotSupportedException$ = [
    -3,
    n0,
    _MNSE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.ModeNotSupportedException$ = ModeNotSupportedException$;
  n0_registry.registerError(ModeNotSupportedException$, ModeNotSupportedException);
  var NoPublishedVersionException$ = [
    -3,
    n0,
    _NPVE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.NoPublishedVersionException$ = NoPublishedVersionException$;
  n0_registry.registerError(NoPublishedVersionException$, NoPublishedVersionException);
  var PolicyLengthExceededException$ = [
    -3,
    n0,
    _PLEE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _m],
    [0, 0]
  ];
  exports2.PolicyLengthExceededException$ = PolicyLengthExceededException$;
  n0_registry.registerError(PolicyLengthExceededException$, PolicyLengthExceededException);
  var PreconditionFailedException$ = [
    -3,
    n0,
    _PFE,
    { [_e3]: _c, [_hE]: 412 },
    [_T, _m],
    [0, 0]
  ];
  exports2.PreconditionFailedException$ = PreconditionFailedException$;
  n0_registry.registerError(PreconditionFailedException$, PreconditionFailedException);
  var ProvisionedConcurrencyConfigNotFoundException$ = [
    -3,
    n0,
    _PCCNFE,
    { [_e3]: _c, [_hE]: 404 },
    [_T, _m],
    [0, 0]
  ];
  exports2.ProvisionedConcurrencyConfigNotFoundException$ = ProvisionedConcurrencyConfigNotFoundException$;
  n0_registry.registerError(ProvisionedConcurrencyConfigNotFoundException$, ProvisionedConcurrencyConfigNotFoundException);
  var PublicPolicyException$ = [
    -3,
    n0,
    _PPE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.PublicPolicyException$ = PublicPolicyException$;
  n0_registry.registerError(PublicPolicyException$, PublicPolicyException);
  var RecursiveInvocationException$ = [
    -3,
    n0,
    _RIE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.RecursiveInvocationException$ = RecursiveInvocationException$;
  n0_registry.registerError(RecursiveInvocationException$, RecursiveInvocationException);
  var RequestTooLargeException$ = [
    -3,
    n0,
    _RTLE,
    { [_e3]: _c, [_hE]: 413 },
    [_T, _m],
    [0, 0]
  ];
  exports2.RequestTooLargeException$ = RequestTooLargeException$;
  n0_registry.registerError(RequestTooLargeException$, RequestTooLargeException);
  var ResourceConflictException$ = [
    -3,
    n0,
    _RCE,
    { [_e3]: _c, [_hE]: 409 },
    [_T, _m],
    [0, 0]
  ];
  exports2.ResourceConflictException$ = ResourceConflictException$;
  n0_registry.registerError(ResourceConflictException$, ResourceConflictException);
  var ResourceInUseException$ = [
    -3,
    n0,
    _RIUE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.ResourceInUseException$ = ResourceInUseException$;
  n0_registry.registerError(ResourceInUseException$, ResourceInUseException);
  var ResourceNotFoundException$ = [
    -3,
    n0,
    _RNFE,
    { [_e3]: _c, [_hE]: 404 },
    [_T, _M],
    [0, 0]
  ];
  exports2.ResourceNotFoundException$ = ResourceNotFoundException$;
  n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
  var ResourceNotReadyException$ = [
    -3,
    n0,
    _RNRE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _m],
    [0, 0]
  ];
  exports2.ResourceNotReadyException$ = ResourceNotReadyException$;
  n0_registry.registerError(ResourceNotReadyException$, ResourceNotReadyException);
  var S3FilesMountConnectivityException$ = [
    -3,
    n0,
    _SFMCE,
    { [_e3]: _c, [_hE]: 408 },
    [_T, _M],
    [0, 0]
  ];
  exports2.S3FilesMountConnectivityException$ = S3FilesMountConnectivityException$;
  n0_registry.registerError(S3FilesMountConnectivityException$, S3FilesMountConnectivityException);
  var S3FilesMountFailureException$ = [
    -3,
    n0,
    _SFMFE,
    { [_e3]: _c, [_hE]: 403 },
    [_T, _M],
    [0, 0]
  ];
  exports2.S3FilesMountFailureException$ = S3FilesMountFailureException$;
  n0_registry.registerError(S3FilesMountFailureException$, S3FilesMountFailureException);
  var S3FilesMountTimeoutException$ = [
    -3,
    n0,
    _SFMTE,
    { [_e3]: _c, [_hE]: 408 },
    [_T, _M],
    [0, 0]
  ];
  exports2.S3FilesMountTimeoutException$ = S3FilesMountTimeoutException$;
  n0_registry.registerError(S3FilesMountTimeoutException$, S3FilesMountTimeoutException);
  var SerializedRequestEntityTooLargeException$ = [
    -3,
    n0,
    _SRETLE,
    { [_e3]: _c, [_hE]: 413 },
    [_T, _m],
    [0, 0]
  ];
  exports2.SerializedRequestEntityTooLargeException$ = SerializedRequestEntityTooLargeException$;
  n0_registry.registerError(SerializedRequestEntityTooLargeException$, SerializedRequestEntityTooLargeException);
  var ServiceException$ = [
    -3,
    n0,
    _SE,
    { [_e3]: _se, [_hE]: 500 },
    [_T, _M],
    [0, 0]
  ];
  exports2.ServiceException$ = ServiceException$;
  n0_registry.registerError(ServiceException$, ServiceException);
  var ServiceQuotaExceededException$ = [
    -3,
    n0,
    _SQEE,
    { [_e3]: _c, [_hE]: 402 },
    [_T, _M],
    [0, 0]
  ];
  exports2.ServiceQuotaExceededException$ = ServiceQuotaExceededException$;
  n0_registry.registerError(ServiceQuotaExceededException$, ServiceQuotaExceededException);
  var SnapStartException$ = [
    -3,
    n0,
    _SSE,
    { [_e3]: _c, [_hE]: 400 },
    [_T, _M],
    [0, 0]
  ];
  exports2.SnapStartException$ = SnapStartException$;
  n0_registry.registerError(SnapStartException$, SnapStartException);
  var SnapStartNotReadyException$ = [
    -3,
    n0,
    _SSNRE,
    { [_e3]: _c, [_hE]: 409 },
    [_T, _M],
    [0, 0]
  ];
  exports2.SnapStartNotReadyException$ = SnapStartNotReadyException$;
  n0_registry.registerError(SnapStartNotReadyException$, SnapStartNotReadyException);
  var SnapStartRegenerationFailureException$ = [
    -3,
    n0,
    _SSRFE,
    { [_e3]: _c, [_hE]: 409 },
    [_T, _M],
    [0, 0]
  ];
  exports2.SnapStartRegenerationFailureException$ = SnapStartRegenerationFailureException$;
  n0_registry.registerError(SnapStartRegenerationFailureException$, SnapStartRegenerationFailureException);
  var SnapStartTimeoutException$ = [
    -3,
    n0,
    _SSTE,
    { [_e3]: _c, [_hE]: 408 },
    [_T, _M],
    [0, 0]
  ];
  exports2.SnapStartTimeoutException$ = SnapStartTimeoutException$;
  n0_registry.registerError(SnapStartTimeoutException$, SnapStartTimeoutException);
  var SubnetIPAddressLimitReachedException$ = [
    -3,
    n0,
    _SIPALRE,
    { [_e3]: _se, [_hE]: 502 },
    [_T, _M],
    [0, 0]
  ];
  exports2.SubnetIPAddressLimitReachedException$ = SubnetIPAddressLimitReachedException$;
  n0_registry.registerError(SubnetIPAddressLimitReachedException$, SubnetIPAddressLimitReachedException);
  var TooManyRequestsException$ = [
    -3,
    n0,
    _TMRE,
    { [_e3]: _c, [_hE]: 429 },
    [_rAS, _T, _m, _R],
    [[0, { [_hH]: _RA }], 0, 0, 0]
  ];
  exports2.TooManyRequestsException$ = TooManyRequestsException$;
  n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
  var UnsupportedMediaTypeException$ = [
    -3,
    n0,
    _UMTE,
    { [_e3]: _c, [_hE]: 415 },
    [_T, _m],
    [0, 0]
  ];
  exports2.UnsupportedMediaTypeException$ = UnsupportedMediaTypeException$;
  n0_registry.registerError(UnsupportedMediaTypeException$, UnsupportedMediaTypeException);
  exports2.errorTypeRegistries = [
    _s_registry,
    n0_registry
  ];
  var BinaryOperationPayload = [0, n0, _BOP, 8, 21];
  var _Blob = [0, n0, _B, 8, 21];
  var BlobStream = [0, n0, _BS, { [_st]: 1 }, 42];
  var EnvironmentVariableName = [0, n0, _EVN, 8, 0];
  var EnvironmentVariableValue = [0, n0, _EVV, 8, 0];
  var ErrorData = [0, n0, _ED, 8, 0];
  var ErrorMessage = [0, n0, _EM, 8, 0];
  var ErrorType = [0, n0, _ET, 8, 0];
  var InputPayload = [0, n0, _IP, 8, 0];
  var OperationPayload = [0, n0, _OP, 8, 0];
  var OutputPayload = [0, n0, _OPu, 8, 0];
  var SensitiveString = [0, n0, _SS, 8, 0];
  var StackTraceEntry = [0, n0, _STE, 8, 0];
  var AccountLimit$ = [
    3,
    n0,
    _AL,
    0,
    [_TCS, _CSU, _CSZ, _CE, _UCE],
    [1, 1, 1, 1, 1]
  ];
  exports2.AccountLimit$ = AccountLimit$;
  var AccountUsage$ = [
    3,
    n0,
    _AU,
    0,
    [_TCS, _FC],
    [1, 1]
  ];
  exports2.AccountUsage$ = AccountUsage$;
  var AddLayerVersionPermissionRequest$ = [
    3,
    n0,
    _ALVPR,
    0,
    [_LN, _VN, _SI, _A, _P, _OI, _RI],
    [[0, 1], [1, 1], 0, 0, 0, 0, [0, { [_hQ]: _RI }]],
    5
  ];
  exports2.AddLayerVersionPermissionRequest$ = AddLayerVersionPermissionRequest$;
  var AddLayerVersionPermissionResponse$ = [
    3,
    n0,
    _ALVPRd,
    0,
    [_S, _RI],
    [0, 0]
  ];
  exports2.AddLayerVersionPermissionResponse$ = AddLayerVersionPermissionResponse$;
  var AddPermissionRequest$ = [
    3,
    n0,
    _APR,
    0,
    [_FN, _SI, _A, _P, _SA, _FUAT, _IVFU, _SAo, _EST, _Q, _RI, _POID],
    [[0, 1], 0, 0, 0, 0, 0, 2, 0, 0, [0, { [_hQ]: _Q }], 0, 0],
    4
  ];
  exports2.AddPermissionRequest$ = AddPermissionRequest$;
  var AddPermissionResponse$ = [
    3,
    n0,
    _APRd,
    0,
    [_S],
    [0]
  ];
  exports2.AddPermissionResponse$ = AddPermissionResponse$;
  var AliasConfiguration$ = [
    3,
    n0,
    _AC,
    0,
    [_AA, _N, _FV, _D, _RC, _RI],
    [0, 0, 0, 0, () => AliasRoutingConfiguration$, 0]
  ];
  exports2.AliasConfiguration$ = AliasConfiguration$;
  var AliasRoutingConfiguration$ = [
    3,
    n0,
    _ARC,
    0,
    [_AVW],
    [128 | 1]
  ];
  exports2.AliasRoutingConfiguration$ = AliasRoutingConfiguration$;
  var AllowedPublishers$ = [
    3,
    n0,
    _AP,
    0,
    [_SPVA],
    [64 | 0],
    1
  ];
  exports2.AllowedPublishers$ = AllowedPublishers$;
  var AmazonManagedKafkaEventSourceConfig$ = [
    3,
    n0,
    _AMKESC,
    0,
    [_CGI, _SRC],
    [0, () => KafkaSchemaRegistryConfig$]
  ];
  exports2.AmazonManagedKafkaEventSourceConfig$ = AmazonManagedKafkaEventSourceConfig$;
  var CallbackDetails$ = [
    3,
    n0,
    _CD,
    0,
    [_CI, _Re, _E],
    [0, [() => OperationPayload, 0], [() => ErrorObject$, 0]]
  ];
  exports2.CallbackDetails$ = CallbackDetails$;
  var CallbackFailedDetails$ = [
    3,
    n0,
    _CFD,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.CallbackFailedDetails$ = CallbackFailedDetails$;
  var CallbackOptions$ = [
    3,
    n0,
    _CO,
    0,
    [_TS, _HTS],
    [1, 1]
  ];
  exports2.CallbackOptions$ = CallbackOptions$;
  var CallbackStartedDetails$ = [
    3,
    n0,
    _CSD,
    0,
    [_CI, _HT, _Ti],
    [0, 1, 1],
    1
  ];
  exports2.CallbackStartedDetails$ = CallbackStartedDetails$;
  var CallbackSucceededDetails$ = [
    3,
    n0,
    _CSDa,
    0,
    [_Re],
    [[() => EventResult$, 0]],
    1
  ];
  exports2.CallbackSucceededDetails$ = CallbackSucceededDetails$;
  var CallbackTimedOutDetails$ = [
    3,
    n0,
    _CTOD,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.CallbackTimedOutDetails$ = CallbackTimedOutDetails$;
  var CapacityProvider$ = [
    3,
    n0,
    _CP,
    0,
    [_CPA, _St, _VC, _PC, _IR, _CPSC, _KKA, _LM, _PT],
    [0, 0, () => CapacityProviderVpcConfig$, () => CapacityProviderPermissionsConfig$, () => InstanceRequirements$, () => CapacityProviderScalingConfig$, 0, 0, () => PropagateTags$],
    4
  ];
  exports2.CapacityProvider$ = CapacityProvider$;
  var CapacityProviderConfig$ = [
    3,
    n0,
    _CPC,
    0,
    [_LMICPC],
    [() => LambdaManagedInstancesCapacityProviderConfig$],
    1
  ];
  exports2.CapacityProviderConfig$ = CapacityProviderConfig$;
  var CapacityProviderPermissionsConfig$ = [
    3,
    n0,
    _CPPC,
    0,
    [_CPORA],
    [0],
    1
  ];
  exports2.CapacityProviderPermissionsConfig$ = CapacityProviderPermissionsConfig$;
  var CapacityProviderScalingConfig$ = [
    3,
    n0,
    _CPSC,
    0,
    [_MVCC, _SM, _SP],
    [1, 0, () => CapacityProviderScalingPoliciesList]
  ];
  exports2.CapacityProviderScalingConfig$ = CapacityProviderScalingConfig$;
  var CapacityProviderVpcConfig$ = [
    3,
    n0,
    _CPVC,
    0,
    [_SIu, _SGI],
    [64 | 0, 64 | 0],
    2
  ];
  exports2.CapacityProviderVpcConfig$ = CapacityProviderVpcConfig$;
  var ChainedInvokeDetails$ = [
    3,
    n0,
    _CID,
    0,
    [_Re, _E],
    [[() => OperationPayload, 0], [() => ErrorObject$, 0]]
  ];
  exports2.ChainedInvokeDetails$ = ChainedInvokeDetails$;
  var ChainedInvokeFailedDetails$ = [
    3,
    n0,
    _CIFD,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.ChainedInvokeFailedDetails$ = ChainedInvokeFailedDetails$;
  var ChainedInvokeOptions$ = [
    3,
    n0,
    _CIO,
    0,
    [_FN, _TI],
    [0, 0],
    1
  ];
  exports2.ChainedInvokeOptions$ = ChainedInvokeOptions$;
  var ChainedInvokeStartedDetails$ = [
    3,
    n0,
    _CISD,
    0,
    [_FN, _TI, _I, _EV, _DEA],
    [0, 0, [() => EventInput$, 0], 0, 0],
    1
  ];
  exports2.ChainedInvokeStartedDetails$ = ChainedInvokeStartedDetails$;
  var ChainedInvokeStoppedDetails$ = [
    3,
    n0,
    _CISDh,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.ChainedInvokeStoppedDetails$ = ChainedInvokeStoppedDetails$;
  var ChainedInvokeSucceededDetails$ = [
    3,
    n0,
    _CISDha,
    0,
    [_Re],
    [[() => EventResult$, 0]],
    1
  ];
  exports2.ChainedInvokeSucceededDetails$ = ChainedInvokeSucceededDetails$;
  var ChainedInvokeTimedOutDetails$ = [
    3,
    n0,
    _CITOD,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.ChainedInvokeTimedOutDetails$ = ChainedInvokeTimedOutDetails$;
  var CheckpointDurableExecutionRequest$ = [
    3,
    n0,
    _CDER,
    0,
    [_DEA, _CT, _U, _CTl],
    [[0, 1], 0, [() => OperationUpdates, 0], [0, 4]],
    2
  ];
  exports2.CheckpointDurableExecutionRequest$ = CheckpointDurableExecutionRequest$;
  var CheckpointDurableExecutionResponse$ = [
    3,
    n0,
    _CDERh,
    0,
    [_NES, _CT],
    [[() => CheckpointUpdatedExecutionState$, 0], 0],
    1
  ];
  exports2.CheckpointDurableExecutionResponse$ = CheckpointDurableExecutionResponse$;
  var CheckpointUpdatedExecutionState$ = [
    3,
    n0,
    _CUES,
    0,
    [_O, _NM],
    [[() => Operations, 0], 0]
  ];
  exports2.CheckpointUpdatedExecutionState$ = CheckpointUpdatedExecutionState$;
  var CodeSigningConfig$ = [
    3,
    n0,
    _CSC,
    0,
    [_CSCI, _CSCA, _AP, _CSP, _LM, _D],
    [0, 0, () => AllowedPublishers$, () => CodeSigningPolicies$, 0, 0],
    5
  ];
  exports2.CodeSigningConfig$ = CodeSigningConfig$;
  var CodeSigningPolicies$ = [
    3,
    n0,
    _CSP,
    0,
    [_UAOD],
    [0]
  ];
  exports2.CodeSigningPolicies$ = CodeSigningPolicies$;
  var Concurrency$ = [
    3,
    n0,
    _C,
    0,
    [_RCEe],
    [1]
  ];
  exports2.Concurrency$ = Concurrency$;
  var ContextDetails$ = [
    3,
    n0,
    _CDo,
    0,
    [_RCe, _Re, _E],
    [2, [() => OperationPayload, 0], [() => ErrorObject$, 0]]
  ];
  exports2.ContextDetails$ = ContextDetails$;
  var ContextFailedDetails$ = [
    3,
    n0,
    _CFDo,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.ContextFailedDetails$ = ContextFailedDetails$;
  var ContextOptions$ = [
    3,
    n0,
    _COo,
    0,
    [_RCe],
    [2]
  ];
  exports2.ContextOptions$ = ContextOptions$;
  var ContextStartedDetails$ = [
    3,
    n0,
    _CSDo,
    0,
    [],
    []
  ];
  exports2.ContextStartedDetails$ = ContextStartedDetails$;
  var ContextSucceededDetails$ = [
    3,
    n0,
    _CSDon,
    0,
    [_Re],
    [[() => EventResult$, 0]],
    1
  ];
  exports2.ContextSucceededDetails$ = ContextSucceededDetails$;
  var Cors$ = [
    3,
    n0,
    _Co,
    0,
    [_ACl, _AH, _AM, _AO, _EH, _MA],
    [2, 64 | 0, 64 | 0, 64 | 0, 64 | 0, 1]
  ];
  exports2.Cors$ = Cors$;
  var CreateAliasRequest$ = [
    3,
    n0,
    _CAR,
    0,
    [_FN, _N, _FV, _D, _RC],
    [[0, 1], 0, 0, 0, () => AliasRoutingConfiguration$],
    3
  ];
  exports2.CreateAliasRequest$ = CreateAliasRequest$;
  var CreateCapacityProviderRequest$ = [
    3,
    n0,
    _CCPR,
    0,
    [_CPN, _VC, _PC, _IR, _CPSC, _KKA, _Ta, _PT],
    [0, () => CapacityProviderVpcConfig$, () => CapacityProviderPermissionsConfig$, () => InstanceRequirements$, () => CapacityProviderScalingConfig$, 0, 128 | 0, () => PropagateTags$],
    3
  ];
  exports2.CreateCapacityProviderRequest$ = CreateCapacityProviderRequest$;
  var CreateCapacityProviderResponse$ = [
    3,
    n0,
    _CCPRr,
    0,
    [_CP],
    [() => CapacityProvider$],
    1
  ];
  exports2.CreateCapacityProviderResponse$ = CreateCapacityProviderResponse$;
  var CreateCodeSigningConfigRequest$ = [
    3,
    n0,
    _CCSCR,
    0,
    [_AP, _D, _CSP, _Ta],
    [() => AllowedPublishers$, 0, () => CodeSigningPolicies$, 128 | 0],
    1
  ];
  exports2.CreateCodeSigningConfigRequest$ = CreateCodeSigningConfigRequest$;
  var CreateCodeSigningConfigResponse$ = [
    3,
    n0,
    _CCSCRr,
    0,
    [_CSC],
    [() => CodeSigningConfig$],
    1
  ];
  exports2.CreateCodeSigningConfigResponse$ = CreateCodeSigningConfigResponse$;
  var CreateEventSourceMappingRequest$ = [
    3,
    n0,
    _CESMR,
    0,
    [_FN, _ESA, _En, _BSa, _FCi, _KMSKA, _MC, _LC, _SC, _MBWIS, _PF, _SPt, _SPT, _DC, _MRAIS, _BBOFE, _MRA, _Ta, _TWIS, _To, _Qu, _SAC, _SMES, _FRT, _AMKESC, _SMKESC, _DDBESC, _PPC],
    [0, 0, 2, 1, () => FilterCriteria$, 0, () => EventSourceMappingMetricsConfig$, () => EventSourceMappingLoggingConfig$, () => ScalingConfig$, 1, 1, 0, 4, () => DestinationConfig$, 1, 2, 1, 128 | 0, 1, 64 | 0, 64 | 0, () => SourceAccessConfigurations, () => SelfManagedEventSource$, 64 | 0, () => AmazonManagedKafkaEventSourceConfig$, () => SelfManagedKafkaEventSourceConfig$, () => DocumentDBEventSourceConfig$, () => ProvisionedPollerConfig$],
    1
  ];
  exports2.CreateEventSourceMappingRequest$ = CreateEventSourceMappingRequest$;
  var CreateFunctionRequest$ = [
    3,
    n0,
    _CFR,
    0,
    [_FN, _Ro, _Cod, _Ru, _H, _D, _Ti, _MS, _Pu, _PTu, _VC, _PTa, _DLC, _Env, _KMSKA, _TC, _Ta, _L, _FSC, _CSCA, _IC, _Ar, _ES, _SSn, _LC, _TCe, _CPC, _DCu],
    [0, 0, [() => FunctionCode$, 0], 0, 0, 0, 1, 1, 2, 0, () => VpcConfig$, 0, () => DeadLetterConfig$, [() => Environment$, 0], 0, () => TracingConfig$, 128 | 0, 64 | 0, () => FileSystemConfigList, 0, () => ImageConfig$, 64 | 0, () => EphemeralStorage$, () => SnapStart$, () => LoggingConfig$, () => TenancyConfig$, () => CapacityProviderConfig$, () => DurableConfig$],
    3
  ];
  exports2.CreateFunctionRequest$ = CreateFunctionRequest$;
  var CreateFunctionUrlConfigRequest$ = [
    3,
    n0,
    _CFUCR,
    0,
    [_FN, _AT, _Q, _Co, _IM],
    [[0, 1], 0, [0, { [_hQ]: _Q }], () => Cors$, 0],
    2
  ];
  exports2.CreateFunctionUrlConfigRequest$ = CreateFunctionUrlConfigRequest$;
  var CreateFunctionUrlConfigResponse$ = [
    3,
    n0,
    _CFUCRr,
    0,
    [_FU, _FA, _AT, _CTr, _Co, _IM],
    [0, 0, 0, 0, () => Cors$, 0],
    4
  ];
  exports2.CreateFunctionUrlConfigResponse$ = CreateFunctionUrlConfigResponse$;
  var DeadLetterConfig$ = [
    3,
    n0,
    _DLC,
    0,
    [_TA],
    [0]
  ];
  exports2.DeadLetterConfig$ = DeadLetterConfig$;
  var DeleteAliasRequest$ = [
    3,
    n0,
    _DAR,
    0,
    [_FN, _N],
    [[0, 1], [0, 1]],
    2
  ];
  exports2.DeleteAliasRequest$ = DeleteAliasRequest$;
  var DeleteCapacityProviderRequest$ = [
    3,
    n0,
    _DCPR,
    0,
    [_CPN],
    [[0, 1]],
    1
  ];
  exports2.DeleteCapacityProviderRequest$ = DeleteCapacityProviderRequest$;
  var DeleteCapacityProviderResponse$ = [
    3,
    n0,
    _DCPRe,
    0,
    [_CP],
    [() => CapacityProvider$],
    1
  ];
  exports2.DeleteCapacityProviderResponse$ = DeleteCapacityProviderResponse$;
  var DeleteCodeSigningConfigRequest$ = [
    3,
    n0,
    _DCSCR,
    0,
    [_CSCA],
    [[0, 1]],
    1
  ];
  exports2.DeleteCodeSigningConfigRequest$ = DeleteCodeSigningConfigRequest$;
  var DeleteCodeSigningConfigResponse$ = [
    3,
    n0,
    _DCSCRe,
    0,
    [],
    []
  ];
  exports2.DeleteCodeSigningConfigResponse$ = DeleteCodeSigningConfigResponse$;
  var DeleteEventSourceMappingRequest$ = [
    3,
    n0,
    _DESMR,
    0,
    [_UUID],
    [[0, 1]],
    1
  ];
  exports2.DeleteEventSourceMappingRequest$ = DeleteEventSourceMappingRequest$;
  var DeleteFunctionCodeSigningConfigRequest$ = [
    3,
    n0,
    _DFCSCR,
    0,
    [_FN],
    [[0, 1]],
    1
  ];
  exports2.DeleteFunctionCodeSigningConfigRequest$ = DeleteFunctionCodeSigningConfigRequest$;
  var DeleteFunctionConcurrencyRequest$ = [
    3,
    n0,
    _DFCR,
    0,
    [_FN],
    [[0, 1]],
    1
  ];
  exports2.DeleteFunctionConcurrencyRequest$ = DeleteFunctionConcurrencyRequest$;
  var DeleteFunctionEventInvokeConfigRequest$ = [
    3,
    n0,
    _DFEICR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.DeleteFunctionEventInvokeConfigRequest$ = DeleteFunctionEventInvokeConfigRequest$;
  var DeleteFunctionRequest$ = [
    3,
    n0,
    _DFR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.DeleteFunctionRequest$ = DeleteFunctionRequest$;
  var DeleteFunctionResponse$ = [
    3,
    n0,
    _DFRe,
    0,
    [_SCt],
    [[1, 32]]
  ];
  exports2.DeleteFunctionResponse$ = DeleteFunctionResponse$;
  var DeleteFunctionUrlConfigRequest$ = [
    3,
    n0,
    _DFUCR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.DeleteFunctionUrlConfigRequest$ = DeleteFunctionUrlConfigRequest$;
  var DeleteLayerVersionRequest$ = [
    3,
    n0,
    _DLVR,
    0,
    [_LN, _VN],
    [[0, 1], [1, 1]],
    2
  ];
  exports2.DeleteLayerVersionRequest$ = DeleteLayerVersionRequest$;
  var DeleteProvisionedConcurrencyConfigRequest$ = [
    3,
    n0,
    _DPCCR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    2
  ];
  exports2.DeleteProvisionedConcurrencyConfigRequest$ = DeleteProvisionedConcurrencyConfigRequest$;
  var DestinationConfig$ = [
    3,
    n0,
    _DC,
    0,
    [_OS, _OF],
    [() => OnSuccess$, () => OnFailure$]
  ];
  exports2.DestinationConfig$ = DestinationConfig$;
  var DocumentDBEventSourceConfig$ = [
    3,
    n0,
    _DDBESC,
    0,
    [_DN, _CN, _FD],
    [0, 0, 0]
  ];
  exports2.DocumentDBEventSourceConfig$ = DocumentDBEventSourceConfig$;
  var DurableConfig$ = [
    3,
    n0,
    _DCu,
    0,
    [_RPID, _ETx],
    [1, 1]
  ];
  exports2.DurableConfig$ = DurableConfig$;
  var Environment$ = [
    3,
    n0,
    _Env,
    0,
    [_V],
    [[() => EnvironmentVariables, 0]]
  ];
  exports2.Environment$ = Environment$;
  var EnvironmentError$ = [
    3,
    n0,
    _EE,
    0,
    [_EC, _M],
    [0, [() => SensitiveString, 0]]
  ];
  exports2.EnvironmentError$ = EnvironmentError$;
  var EnvironmentResponse$ = [
    3,
    n0,
    _ER,
    0,
    [_V, _E],
    [[() => EnvironmentVariables, 0], [() => EnvironmentError$, 0]]
  ];
  exports2.EnvironmentResponse$ = EnvironmentResponse$;
  var EphemeralStorage$ = [
    3,
    n0,
    _ES,
    0,
    [_Si],
    [1],
    1
  ];
  exports2.EphemeralStorage$ = EphemeralStorage$;
  var ErrorObject$ = [
    3,
    n0,
    _EO,
    0,
    [_EM, _ET, _ED, _ST],
    [[() => ErrorMessage, 0], [() => ErrorType, 0], [() => ErrorData, 0], [() => StackTraceEntries, 0]]
  ];
  exports2.ErrorObject$ = ErrorObject$;
  var Event$ = [
    3,
    n0,
    _Ev,
    0,
    [_ETv, _STu, _EI, _Id, _N, _ETve, _PI, _ESD, _ESDx, _EFD, _ETOD, _ESDxe, _CSDo, _CSDon, _CFDo, _WSD, _WSDa, _WCD, _SSD, _SSDt, _SFD, _CISD, _CISDha, _CIFD, _CITOD, _CISDh, _CSD, _CSDa, _CFD, _CTOD, _ICD],
    [0, 0, 1, 0, 0, 4, 0, [() => ExecutionStartedDetails$, 0], [() => ExecutionSucceededDetails$, 0], [() => ExecutionFailedDetails$, 0], [() => ExecutionTimedOutDetails$, 0], [() => ExecutionStoppedDetails$, 0], () => ContextStartedDetails$, [() => ContextSucceededDetails$, 0], [() => ContextFailedDetails$, 0], () => WaitStartedDetails$, () => WaitSucceededDetails$, [() => WaitCancelledDetails$, 0], () => StepStartedDetails$, [() => StepSucceededDetails$, 0], [() => StepFailedDetails$, 0], [() => ChainedInvokeStartedDetails$, 0], [() => ChainedInvokeSucceededDetails$, 0], [() => ChainedInvokeFailedDetails$, 0], [() => ChainedInvokeTimedOutDetails$, 0], [() => ChainedInvokeStoppedDetails$, 0], () => CallbackStartedDetails$, [() => CallbackSucceededDetails$, 0], [() => CallbackFailedDetails$, 0], [() => CallbackTimedOutDetails$, 0], [() => InvocationCompletedDetails$, 0]]
  ];
  exports2.Event$ = Event$;
  var EventError$ = [
    3,
    n0,
    _EEv,
    0,
    [_Pa, _Tr],
    [[() => ErrorObject$, 0], 2]
  ];
  exports2.EventError$ = EventError$;
  var EventInput$ = [
    3,
    n0,
    _EIv,
    0,
    [_Pa, _Tr],
    [[() => InputPayload, 0], 2]
  ];
  exports2.EventInput$ = EventInput$;
  var EventResult$ = [
    3,
    n0,
    _ERv,
    0,
    [_Pa, _Tr],
    [[() => OperationPayload, 0], 2]
  ];
  exports2.EventResult$ = EventResult$;
  var EventSourceMappingConfiguration$ = [
    3,
    n0,
    _ESMC,
    0,
    [_UUID, _SPt, _SPT, _BSa, _MBWIS, _PF, _ESA, _FCi, _FCE, _KMSKA, _MC, _LC, _SC, _FA, _LM, _LPR, _St, _STR, _DC, _To, _Qu, _SAC, _SMES, _MRAIS, _BBOFE, _MRA, _TWIS, _FRT, _AMKESC, _SMKESC, _DDBESC, _ESMA, _PPC],
    [0, 0, 4, 1, 1, 1, 0, () => FilterCriteria$, () => FilterCriteriaError$, 0, () => EventSourceMappingMetricsConfig$, () => EventSourceMappingLoggingConfig$, () => ScalingConfig$, 0, 4, 0, 0, 0, () => DestinationConfig$, 64 | 0, 64 | 0, () => SourceAccessConfigurations, () => SelfManagedEventSource$, 1, 2, 1, 1, 64 | 0, () => AmazonManagedKafkaEventSourceConfig$, () => SelfManagedKafkaEventSourceConfig$, () => DocumentDBEventSourceConfig$, 0, () => ProvisionedPollerConfig$]
  ];
  exports2.EventSourceMappingConfiguration$ = EventSourceMappingConfiguration$;
  var EventSourceMappingLoggingConfig$ = [
    3,
    n0,
    _ESMLC,
    0,
    [_SLL],
    [0]
  ];
  exports2.EventSourceMappingLoggingConfig$ = EventSourceMappingLoggingConfig$;
  var EventSourceMappingMetricsConfig$ = [
    3,
    n0,
    _ESMMC,
    0,
    [_Me],
    [64 | 0]
  ];
  exports2.EventSourceMappingMetricsConfig$ = EventSourceMappingMetricsConfig$;
  var Execution$ = [
    3,
    n0,
    _Ex,
    0,
    [_DEA, _DEN, _FA, _Sta, _STt, _ETn],
    [0, 0, 0, 0, 4, 4],
    5
  ];
  exports2.Execution$ = Execution$;
  var ExecutionDetails$ = [
    3,
    n0,
    _EDx,
    0,
    [_IP],
    [[() => InputPayload, 0]]
  ];
  exports2.ExecutionDetails$ = ExecutionDetails$;
  var ExecutionFailedDetails$ = [
    3,
    n0,
    _EFD,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.ExecutionFailedDetails$ = ExecutionFailedDetails$;
  var ExecutionStartedDetails$ = [
    3,
    n0,
    _ESD,
    0,
    [_I, _ETx],
    [[() => EventInput$, 0], 1],
    2
  ];
  exports2.ExecutionStartedDetails$ = ExecutionStartedDetails$;
  var ExecutionStoppedDetails$ = [
    3,
    n0,
    _ESDxe,
    0,
    [_E],
    [[() => EventError$, 0]],
    1
  ];
  exports2.ExecutionStoppedDetails$ = ExecutionStoppedDetails$;
  var ExecutionSucceededDetails$ = [
    3,
    n0,
    _ESDx,
    0,
    [_Re],
    [[() => EventResult$, 0]],
    1
  ];
  exports2.ExecutionSucceededDetails$ = ExecutionSucceededDetails$;
  var ExecutionTimedOutDetails$ = [
    3,
    n0,
    _ETOD,
    0,
    [_E],
    [[() => EventError$, 0]]
  ];
  exports2.ExecutionTimedOutDetails$ = ExecutionTimedOutDetails$;
  var FileSystemConfig$ = [
    3,
    n0,
    _FSCi,
    0,
    [_Arn, _LMP],
    [0, 0],
    2
  ];
  exports2.FileSystemConfig$ = FileSystemConfig$;
  var Filter$ = [
    3,
    n0,
    _F,
    0,
    [_Pat],
    [0]
  ];
  exports2.Filter$ = Filter$;
  var FilterCriteria$ = [
    3,
    n0,
    _FCi,
    0,
    [_Fi],
    [() => FilterList]
  ];
  exports2.FilterCriteria$ = FilterCriteria$;
  var FilterCriteriaError$ = [
    3,
    n0,
    _FCE,
    0,
    [_EC, _M],
    [0, 0]
  ];
  exports2.FilterCriteriaError$ = FilterCriteriaError$;
  var FunctionCode$ = [
    3,
    n0,
    _FCu,
    0,
    [_ZF, _SB, _SK, _SOV, _IU, _SKMSKA],
    [[() => _Blob, 0], 0, 0, 0, 0, 0]
  ];
  exports2.FunctionCode$ = FunctionCode$;
  var FunctionCodeLocation$ = [
    3,
    n0,
    _FCL,
    0,
    [_RT, _Lo, _IU, _RIU, _SKMSKA],
    [0, 0, 0, 0, 0]
  ];
  exports2.FunctionCodeLocation$ = FunctionCodeLocation$;
  var FunctionConfiguration$ = [
    3,
    n0,
    _FCun,
    0,
    [_FN, _FA, _Ru, _Ro, _H, _CS, _D, _Ti, _MS, _LM, _CSo, _Ve, _VC, _DLC, _Env, _KMSKA, _TC, _MAa, _RI, _L, _St, _SR, _SRCt, _LUS, _LUSR, _LUSRC, _FSC, _SPVAi, _SJA, _PTa, _ICR, _Ar, _ES, _SSn, _RVC, _LC, _TCe, _CPC, _CSon, _DCu],
    [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, () => VpcConfigResponse$, () => DeadLetterConfig$, [() => EnvironmentResponse$, 0], 0, () => TracingConfigResponse$, 0, 0, () => LayersReferenceList, 0, 0, 0, 0, 0, 0, () => FileSystemConfigList, 0, 0, 0, [() => ImageConfigResponse$, 0], 64 | 0, () => EphemeralStorage$, () => SnapStartResponse$, [() => RuntimeVersionConfig$, 0], () => LoggingConfig$, () => TenancyConfig$, () => CapacityProviderConfig$, 0, () => DurableConfig$]
  ];
  exports2.FunctionConfiguration$ = FunctionConfiguration$;
  var FunctionEventInvokeConfig$ = [
    3,
    n0,
    _FEIC,
    0,
    [_LM, _FA, _MRA, _MEAIS, _DC],
    [4, 0, 1, 1, () => DestinationConfig$]
  ];
  exports2.FunctionEventInvokeConfig$ = FunctionEventInvokeConfig$;
  var FunctionScalingConfig$ = [
    3,
    n0,
    _FSCu,
    0,
    [_MEE, _MEEa],
    [1, 1]
  ];
  exports2.FunctionScalingConfig$ = FunctionScalingConfig$;
  var FunctionUrlConfig$ = [
    3,
    n0,
    _FUC,
    0,
    [_FU, _FA, _CTr, _LMT, _AT, _Co, _IM],
    [0, 0, 0, 0, 0, () => Cors$, 0],
    5
  ];
  exports2.FunctionUrlConfig$ = FunctionUrlConfig$;
  var FunctionVersionsByCapacityProviderListItem$ = [
    3,
    n0,
    _FVBCPLI,
    0,
    [_FA, _St],
    [0, 0],
    2
  ];
  exports2.FunctionVersionsByCapacityProviderListItem$ = FunctionVersionsByCapacityProviderListItem$;
  var GetAccountSettingsRequest$ = [
    3,
    n0,
    _GASR,
    0,
    [],
    []
  ];
  exports2.GetAccountSettingsRequest$ = GetAccountSettingsRequest$;
  var GetAccountSettingsResponse$ = [
    3,
    n0,
    _GASRe,
    0,
    [_AL, _AU],
    [() => AccountLimit$, () => AccountUsage$]
  ];
  exports2.GetAccountSettingsResponse$ = GetAccountSettingsResponse$;
  var GetAliasRequest$ = [
    3,
    n0,
    _GAR,
    0,
    [_FN, _N],
    [[0, 1], [0, 1]],
    2
  ];
  exports2.GetAliasRequest$ = GetAliasRequest$;
  var GetCapacityProviderRequest$ = [
    3,
    n0,
    _GCPR,
    0,
    [_CPN],
    [[0, 1]],
    1
  ];
  exports2.GetCapacityProviderRequest$ = GetCapacityProviderRequest$;
  var GetCapacityProviderResponse$ = [
    3,
    n0,
    _GCPRe,
    0,
    [_CP],
    [() => CapacityProvider$],
    1
  ];
  exports2.GetCapacityProviderResponse$ = GetCapacityProviderResponse$;
  var GetCodeSigningConfigRequest$ = [
    3,
    n0,
    _GCSCR,
    0,
    [_CSCA],
    [[0, 1]],
    1
  ];
  exports2.GetCodeSigningConfigRequest$ = GetCodeSigningConfigRequest$;
  var GetCodeSigningConfigResponse$ = [
    3,
    n0,
    _GCSCRe,
    0,
    [_CSC],
    [() => CodeSigningConfig$],
    1
  ];
  exports2.GetCodeSigningConfigResponse$ = GetCodeSigningConfigResponse$;
  var GetDurableExecutionHistoryRequest$ = [
    3,
    n0,
    _GDEHR,
    0,
    [_DEA, _IED, _MI, _Ma, _RO],
    [[0, 1], [2, { [_hQ]: _IED }], [1, { [_hQ]: _MI }], [0, { [_hQ]: _Ma }], [2, { [_hQ]: _RO }]],
    1
  ];
  exports2.GetDurableExecutionHistoryRequest$ = GetDurableExecutionHistoryRequest$;
  var GetDurableExecutionHistoryResponse$ = [
    3,
    n0,
    _GDEHRe,
    0,
    [_Eve, _NM],
    [[() => Events, 0], 0],
    1
  ];
  exports2.GetDurableExecutionHistoryResponse$ = GetDurableExecutionHistoryResponse$;
  var GetDurableExecutionRequest$ = [
    3,
    n0,
    _GDER,
    0,
    [_DEA],
    [[0, 1]],
    1
  ];
  exports2.GetDurableExecutionRequest$ = GetDurableExecutionRequest$;
  var GetDurableExecutionResponse$ = [
    3,
    n0,
    _GDERe,
    0,
    [_DEA, _DEN, _FA, _STt, _Sta, _IP, _Re, _E, _ETn, _Ve, _TH],
    [0, 0, 0, 4, 0, [() => InputPayload, 0], [() => OutputPayload, 0], [() => ErrorObject$, 0], 4, 0, () => TraceHeader$],
    5
  ];
  exports2.GetDurableExecutionResponse$ = GetDurableExecutionResponse$;
  var GetDurableExecutionStateRequest$ = [
    3,
    n0,
    _GDESR,
    0,
    [_DEA, _CT, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _CT }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    2
  ];
  exports2.GetDurableExecutionStateRequest$ = GetDurableExecutionStateRequest$;
  var GetDurableExecutionStateResponse$ = [
    3,
    n0,
    _GDESRe,
    0,
    [_O, _NM],
    [[() => Operations, 0], 0],
    1
  ];
  exports2.GetDurableExecutionStateResponse$ = GetDurableExecutionStateResponse$;
  var GetEventSourceMappingRequest$ = [
    3,
    n0,
    _GESMR,
    0,
    [_UUID],
    [[0, 1]],
    1
  ];
  exports2.GetEventSourceMappingRequest$ = GetEventSourceMappingRequest$;
  var GetFunctionCodeSigningConfigRequest$ = [
    3,
    n0,
    _GFCSCR,
    0,
    [_FN],
    [[0, 1]],
    1
  ];
  exports2.GetFunctionCodeSigningConfigRequest$ = GetFunctionCodeSigningConfigRequest$;
  var GetFunctionCodeSigningConfigResponse$ = [
    3,
    n0,
    _GFCSCRe,
    0,
    [_CSCA, _FN],
    [0, 0],
    2
  ];
  exports2.GetFunctionCodeSigningConfigResponse$ = GetFunctionCodeSigningConfigResponse$;
  var GetFunctionConcurrencyRequest$ = [
    3,
    n0,
    _GFCR,
    0,
    [_FN],
    [[0, 1]],
    1
  ];
  exports2.GetFunctionConcurrencyRequest$ = GetFunctionConcurrencyRequest$;
  var GetFunctionConcurrencyResponse$ = [
    3,
    n0,
    _GFCRe,
    0,
    [_RCEe],
    [1]
  ];
  exports2.GetFunctionConcurrencyResponse$ = GetFunctionConcurrencyResponse$;
  var GetFunctionConfigurationRequest$ = [
    3,
    n0,
    _GFCRet,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.GetFunctionConfigurationRequest$ = GetFunctionConfigurationRequest$;
  var GetFunctionEventInvokeConfigRequest$ = [
    3,
    n0,
    _GFEICR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.GetFunctionEventInvokeConfigRequest$ = GetFunctionEventInvokeConfigRequest$;
  var GetFunctionRecursionConfigRequest$ = [
    3,
    n0,
    _GFRCR,
    0,
    [_FN],
    [[0, 1]],
    1
  ];
  exports2.GetFunctionRecursionConfigRequest$ = GetFunctionRecursionConfigRequest$;
  var GetFunctionRecursionConfigResponse$ = [
    3,
    n0,
    _GFRCRe,
    0,
    [_RL],
    [0]
  ];
  exports2.GetFunctionRecursionConfigResponse$ = GetFunctionRecursionConfigResponse$;
  var GetFunctionRequest$ = [
    3,
    n0,
    _GFR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.GetFunctionRequest$ = GetFunctionRequest$;
  var GetFunctionResponse$ = [
    3,
    n0,
    _GFRe,
    0,
    [_Con, _Cod, _Ta, _TE, _C],
    [[() => FunctionConfiguration$, 0], () => FunctionCodeLocation$, 128 | 0, () => TagsError$, () => Concurrency$]
  ];
  exports2.GetFunctionResponse$ = GetFunctionResponse$;
  var GetFunctionScalingConfigRequest$ = [
    3,
    n0,
    _GFSCR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    2
  ];
  exports2.GetFunctionScalingConfigRequest$ = GetFunctionScalingConfigRequest$;
  var GetFunctionScalingConfigResponse$ = [
    3,
    n0,
    _GFSCRe,
    0,
    [_FA, _AFSC, _RFSC],
    [0, () => FunctionScalingConfig$, () => FunctionScalingConfig$]
  ];
  exports2.GetFunctionScalingConfigResponse$ = GetFunctionScalingConfigResponse$;
  var GetFunctionUrlConfigRequest$ = [
    3,
    n0,
    _GFUCR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.GetFunctionUrlConfigRequest$ = GetFunctionUrlConfigRequest$;
  var GetFunctionUrlConfigResponse$ = [
    3,
    n0,
    _GFUCRe,
    0,
    [_FU, _FA, _AT, _CTr, _LMT, _Co, _IM],
    [0, 0, 0, 0, 0, () => Cors$, 0],
    5
  ];
  exports2.GetFunctionUrlConfigResponse$ = GetFunctionUrlConfigResponse$;
  var GetLayerVersionByArnRequest$ = [
    3,
    n0,
    _GLVBAR,
    0,
    [_Arn],
    [[0, { [_hQ]: _Arn }]],
    1
  ];
  exports2.GetLayerVersionByArnRequest$ = GetLayerVersionByArnRequest$;
  var GetLayerVersionPolicyRequest$ = [
    3,
    n0,
    _GLVPR,
    0,
    [_LN, _VN],
    [[0, 1], [1, 1]],
    2
  ];
  exports2.GetLayerVersionPolicyRequest$ = GetLayerVersionPolicyRequest$;
  var GetLayerVersionPolicyResponse$ = [
    3,
    n0,
    _GLVPRe,
    0,
    [_Po, _RI],
    [0, 0]
  ];
  exports2.GetLayerVersionPolicyResponse$ = GetLayerVersionPolicyResponse$;
  var GetLayerVersionRequest$ = [
    3,
    n0,
    _GLVR,
    0,
    [_LN, _VN],
    [[0, 1], [1, 1]],
    2
  ];
  exports2.GetLayerVersionRequest$ = GetLayerVersionRequest$;
  var GetLayerVersionResponse$ = [
    3,
    n0,
    _GLVRe,
    0,
    [_Cont, _LA, _LVA, _D, _CDr, _Ve, _CA, _CR, _LI],
    [() => LayerVersionContentOutput$, 0, 0, 0, 0, 1, 64 | 0, 64 | 0, 0]
  ];
  exports2.GetLayerVersionResponse$ = GetLayerVersionResponse$;
  var GetPolicyRequest$ = [
    3,
    n0,
    _GPR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.GetPolicyRequest$ = GetPolicyRequest$;
  var GetPolicyResponse$ = [
    3,
    n0,
    _GPRe,
    0,
    [_Po, _RI],
    [0, 0]
  ];
  exports2.GetPolicyResponse$ = GetPolicyResponse$;
  var GetProvisionedConcurrencyConfigRequest$ = [
    3,
    n0,
    _GPCCR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    2
  ];
  exports2.GetProvisionedConcurrencyConfigRequest$ = GetProvisionedConcurrencyConfigRequest$;
  var GetProvisionedConcurrencyConfigResponse$ = [
    3,
    n0,
    _GPCCRe,
    0,
    [_RPCE, _APCE, _APCEl, _Sta, _SRt, _LM],
    [1, 1, 1, 0, 0, 0]
  ];
  exports2.GetProvisionedConcurrencyConfigResponse$ = GetProvisionedConcurrencyConfigResponse$;
  var GetRuntimeManagementConfigRequest$ = [
    3,
    n0,
    _GRMCR,
    0,
    [_FN, _Q],
    [[0, 1], [0, { [_hQ]: _Q }]],
    1
  ];
  exports2.GetRuntimeManagementConfigRequest$ = GetRuntimeManagementConfigRequest$;
  var GetRuntimeManagementConfigResponse$ = [
    3,
    n0,
    _GRMCRe,
    0,
    [_URO, _FA, _RVA],
    [0, 0, 0]
  ];
  exports2.GetRuntimeManagementConfigResponse$ = GetRuntimeManagementConfigResponse$;
  var ImageConfig$ = [
    3,
    n0,
    _IC,
    0,
    [_EP, _Com, _WD],
    [64 | 0, 64 | 0, 0]
  ];
  exports2.ImageConfig$ = ImageConfig$;
  var ImageConfigError$ = [
    3,
    n0,
    _ICE,
    0,
    [_EC, _M],
    [0, [() => SensitiveString, 0]]
  ];
  exports2.ImageConfigError$ = ImageConfigError$;
  var ImageConfigResponse$ = [
    3,
    n0,
    _ICR,
    0,
    [_IC, _E],
    [() => ImageConfig$, [() => ImageConfigError$, 0]]
  ];
  exports2.ImageConfigResponse$ = ImageConfigResponse$;
  var InstanceRequirements$ = [
    3,
    n0,
    _IR,
    0,
    [_Ar, _AIT, _EIT],
    [64 | 0, 64 | 0, 64 | 0]
  ];
  exports2.InstanceRequirements$ = InstanceRequirements$;
  var InvocationCompletedDetails$ = [
    3,
    n0,
    _ICD,
    0,
    [_STt, _ETn, _RIe, _E],
    [4, 4, 0, [() => EventError$, 0]],
    3
  ];
  exports2.InvocationCompletedDetails$ = InvocationCompletedDetails$;
  var InvocationRequest$ = [
    3,
    n0,
    _IRn,
    0,
    [_FN, _IT, _LT, _CC, _DEN, _Pa, _Q, _TI],
    [[0, 1], [0, { [_hH]: _XAIT }], [0, { [_hH]: _XALT }], [0, { [_hH]: _XACC }], [0, { [_hH]: _XADEN }], [() => _Blob, 16], [0, { [_hQ]: _Q }], [0, { [_hH]: _XATI }]],
    1
  ];
  exports2.InvocationRequest$ = InvocationRequest$;
  var InvocationResponse$ = [
    3,
    n0,
    _IRnv,
    0,
    [_SCt, _FE, _LR, _Pa, _EV, _DEA],
    [[1, 32], [0, { [_hH]: _XAFE }], [0, { [_hH]: _XALR }], [() => _Blob, 16], [0, { [_hH]: _XAEV }], [0, { [_hH]: _XADEA }]]
  ];
  exports2.InvocationResponse$ = InvocationResponse$;
  var InvokeAsyncRequest$ = [
    3,
    n0,
    _IAR,
    0,
    [_FN, _IA],
    [[0, 1], [() => BlobStream, 16]],
    2
  ];
  exports2.InvokeAsyncRequest$ = InvokeAsyncRequest$;
  var InvokeAsyncResponse$ = [
    3,
    n0,
    _IARn,
    0,
    [_Sta],
    [[1, 32]]
  ];
  exports2.InvokeAsyncResponse$ = InvokeAsyncResponse$;
  var InvokeResponseStreamUpdate$ = [
    3,
    n0,
    _IRSU,
    0,
    [_Pa],
    [[() => _Blob, { [_eP]: 1 }]]
  ];
  exports2.InvokeResponseStreamUpdate$ = InvokeResponseStreamUpdate$;
  var InvokeWithResponseStreamCompleteEvent$ = [
    3,
    n0,
    _IWRSCE,
    0,
    [_EC, _EDr, _LR],
    [0, 0, 0]
  ];
  exports2.InvokeWithResponseStreamCompleteEvent$ = InvokeWithResponseStreamCompleteEvent$;
  var InvokeWithResponseStreamRequest$ = [
    3,
    n0,
    _IWRSR,
    0,
    [_FN, _IT, _LT, _CC, _Q, _Pa, _TI],
    [[0, 1], [0, { [_hH]: _XAIT }], [0, { [_hH]: _XALT }], [0, { [_hH]: _XACC }], [0, { [_hQ]: _Q }], [() => _Blob, 16], [0, { [_hH]: _XATI }]],
    1
  ];
  exports2.InvokeWithResponseStreamRequest$ = InvokeWithResponseStreamRequest$;
  var InvokeWithResponseStreamResponse$ = [
    3,
    n0,
    _IWRSRn,
    0,
    [_SCt, _EV, _ESv, _RSCT],
    [[1, 32], [0, { [_hH]: _XAEV }], [() => InvokeWithResponseStreamResponseEvent$, 16], [0, { [_hH]: _CT_ }]]
  ];
  exports2.InvokeWithResponseStreamResponse$ = InvokeWithResponseStreamResponse$;
  var KafkaSchemaRegistryAccessConfig$ = [
    3,
    n0,
    _KSRAC,
    0,
    [_T, _URI],
    [0, 0]
  ];
  exports2.KafkaSchemaRegistryAccessConfig$ = KafkaSchemaRegistryAccessConfig$;
  var KafkaSchemaRegistryConfig$ = [
    3,
    n0,
    _KSRC,
    0,
    [_SRURI, _ERF, _ACc, _SVC],
    [0, 0, () => KafkaSchemaRegistryAccessConfigList, () => KafkaSchemaValidationConfigList]
  ];
  exports2.KafkaSchemaRegistryConfig$ = KafkaSchemaRegistryConfig$;
  var KafkaSchemaValidationConfig$ = [
    3,
    n0,
    _KSVC,
    0,
    [_At],
    [0]
  ];
  exports2.KafkaSchemaValidationConfig$ = KafkaSchemaValidationConfig$;
  var LambdaManagedInstancesCapacityProviderConfig$ = [
    3,
    n0,
    _LMICPC,
    0,
    [_CPA, _PEEMC, _EEMGBPVC],
    [0, 1, 1],
    1
  ];
  exports2.LambdaManagedInstancesCapacityProviderConfig$ = LambdaManagedInstancesCapacityProviderConfig$;
  var Layer$ = [
    3,
    n0,
    _La,
    0,
    [_Arn, _CS, _SPVAi, _SJA],
    [0, 1, 0, 0]
  ];
  exports2.Layer$ = Layer$;
  var LayersListItem$ = [
    3,
    n0,
    _LLI,
    0,
    [_LN, _LA, _LMV],
    [0, 0, () => LayerVersionsListItem$]
  ];
  exports2.LayersListItem$ = LayersListItem$;
  var LayerVersionContentInput$ = [
    3,
    n0,
    _LVCI,
    0,
    [_SB, _SK, _SOV, _ZF],
    [0, 0, 0, [() => _Blob, 0]]
  ];
  exports2.LayerVersionContentInput$ = LayerVersionContentInput$;
  var LayerVersionContentOutput$ = [
    3,
    n0,
    _LVCO,
    0,
    [_Lo, _CSo, _CS, _SPVAi, _SJA],
    [0, 0, 1, 0, 0]
  ];
  exports2.LayerVersionContentOutput$ = LayerVersionContentOutput$;
  var LayerVersionsListItem$ = [
    3,
    n0,
    _LVLI,
    0,
    [_LVA, _Ve, _D, _CDr, _CA, _CR, _LI],
    [0, 1, 0, 0, 64 | 0, 64 | 0, 0]
  ];
  exports2.LayerVersionsListItem$ = LayerVersionsListItem$;
  var ListAliasesRequest$ = [
    3,
    n0,
    _LAR,
    0,
    [_FN, _FV, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _FV }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListAliasesRequest$ = ListAliasesRequest$;
  var ListAliasesResponse$ = [
    3,
    n0,
    _LARi,
    0,
    [_NM, _Al],
    [0, () => AliasList]
  ];
  exports2.ListAliasesResponse$ = ListAliasesResponse$;
  var ListCapacityProvidersRequest$ = [
    3,
    n0,
    _LCPR,
    0,
    [_St, _Ma, _MI],
    [[0, { [_hQ]: _St }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]]
  ];
  exports2.ListCapacityProvidersRequest$ = ListCapacityProvidersRequest$;
  var ListCapacityProvidersResponse$ = [
    3,
    n0,
    _LCPRi,
    0,
    [_CPa, _NM],
    [() => CapacityProvidersList, 0],
    1
  ];
  exports2.ListCapacityProvidersResponse$ = ListCapacityProvidersResponse$;
  var ListCodeSigningConfigsRequest$ = [
    3,
    n0,
    _LCSCR,
    0,
    [_Ma, _MI],
    [[0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]]
  ];
  exports2.ListCodeSigningConfigsRequest$ = ListCodeSigningConfigsRequest$;
  var ListCodeSigningConfigsResponse$ = [
    3,
    n0,
    _LCSCRi,
    0,
    [_NM, _CSCo],
    [0, () => CodeSigningConfigList]
  ];
  exports2.ListCodeSigningConfigsResponse$ = ListCodeSigningConfigsResponse$;
  var ListDurableExecutionsByFunctionRequest$ = [
    3,
    n0,
    _LDEBFR,
    0,
    [_FN, _Q, _DEN, _Stat, _SAt, _SBt, _RO, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _Q }], [0, { [_hQ]: _DEN }], [64 | 0, { [_hQ]: _Stat }], [4, { [_hQ]: _SAt }], [4, { [_hQ]: _SBt }], [2, { [_hQ]: _RO }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListDurableExecutionsByFunctionRequest$ = ListDurableExecutionsByFunctionRequest$;
  var ListDurableExecutionsByFunctionResponse$ = [
    3,
    n0,
    _LDEBFRi,
    0,
    [_DE, _NM],
    [() => DurableExecutions, 0]
  ];
  exports2.ListDurableExecutionsByFunctionResponse$ = ListDurableExecutionsByFunctionResponse$;
  var ListEventSourceMappingsRequest$ = [
    3,
    n0,
    _LESMR,
    0,
    [_ESA, _FN, _Ma, _MI],
    [[0, { [_hQ]: _ESA }], [0, { [_hQ]: _FN }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]]
  ];
  exports2.ListEventSourceMappingsRequest$ = ListEventSourceMappingsRequest$;
  var ListEventSourceMappingsResponse$ = [
    3,
    n0,
    _LESMRi,
    0,
    [_NM, _ESM],
    [0, () => EventSourceMappingsList]
  ];
  exports2.ListEventSourceMappingsResponse$ = ListEventSourceMappingsResponse$;
  var ListFunctionEventInvokeConfigsRequest$ = [
    3,
    n0,
    _LFEICR,
    0,
    [_FN, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListFunctionEventInvokeConfigsRequest$ = ListFunctionEventInvokeConfigsRequest$;
  var ListFunctionEventInvokeConfigsResponse$ = [
    3,
    n0,
    _LFEICRi,
    0,
    [_FEICu, _NM],
    [() => FunctionEventInvokeConfigList, 0]
  ];
  exports2.ListFunctionEventInvokeConfigsResponse$ = ListFunctionEventInvokeConfigsResponse$;
  var ListFunctionsByCodeSigningConfigRequest$ = [
    3,
    n0,
    _LFBCSCR,
    0,
    [_CSCA, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListFunctionsByCodeSigningConfigRequest$ = ListFunctionsByCodeSigningConfigRequest$;
  var ListFunctionsByCodeSigningConfigResponse$ = [
    3,
    n0,
    _LFBCSCRi,
    0,
    [_NM, _FAu],
    [0, 64 | 0]
  ];
  exports2.ListFunctionsByCodeSigningConfigResponse$ = ListFunctionsByCodeSigningConfigResponse$;
  var ListFunctionsRequest$ = [
    3,
    n0,
    _LFR,
    0,
    [_MR, _FV, _Ma, _MI],
    [[0, { [_hQ]: _MR }], [0, { [_hQ]: _FV }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]]
  ];
  exports2.ListFunctionsRequest$ = ListFunctionsRequest$;
  var ListFunctionsResponse$ = [
    3,
    n0,
    _LFRi,
    0,
    [_NM, _Fu],
    [0, [() => FunctionList, 0]]
  ];
  exports2.ListFunctionsResponse$ = ListFunctionsResponse$;
  var ListFunctionUrlConfigsRequest$ = [
    3,
    n0,
    _LFUCR,
    0,
    [_FN, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListFunctionUrlConfigsRequest$ = ListFunctionUrlConfigsRequest$;
  var ListFunctionUrlConfigsResponse$ = [
    3,
    n0,
    _LFUCRi,
    0,
    [_FUCu, _NM],
    [() => FunctionUrlConfigList, 0],
    1
  ];
  exports2.ListFunctionUrlConfigsResponse$ = ListFunctionUrlConfigsResponse$;
  var ListFunctionVersionsByCapacityProviderRequest$ = [
    3,
    n0,
    _LFVBCPR,
    0,
    [_CPN, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListFunctionVersionsByCapacityProviderRequest$ = ListFunctionVersionsByCapacityProviderRequest$;
  var ListFunctionVersionsByCapacityProviderResponse$ = [
    3,
    n0,
    _LFVBCPRi,
    0,
    [_CPA, _FVu, _NM],
    [0, () => FunctionVersionsByCapacityProviderList, 0],
    2
  ];
  exports2.ListFunctionVersionsByCapacityProviderResponse$ = ListFunctionVersionsByCapacityProviderResponse$;
  var ListLayersRequest$ = [
    3,
    n0,
    _LLR,
    0,
    [_CAo, _CRo, _Ma, _MI],
    [[0, { [_hQ]: _CAo }], [0, { [_hQ]: _CRo }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]]
  ];
  exports2.ListLayersRequest$ = ListLayersRequest$;
  var ListLayersResponse$ = [
    3,
    n0,
    _LLRi,
    0,
    [_NM, _L],
    [0, () => LayersList]
  ];
  exports2.ListLayersResponse$ = ListLayersResponse$;
  var ListLayerVersionsRequest$ = [
    3,
    n0,
    _LLVR,
    0,
    [_LN, _CAo, _CRo, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _CAo }], [0, { [_hQ]: _CRo }], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListLayerVersionsRequest$ = ListLayerVersionsRequest$;
  var ListLayerVersionsResponse$ = [
    3,
    n0,
    _LLVRi,
    0,
    [_NM, _LV],
    [0, () => LayerVersionsList]
  ];
  exports2.ListLayerVersionsResponse$ = ListLayerVersionsResponse$;
  var ListProvisionedConcurrencyConfigsRequest$ = [
    3,
    n0,
    _LPCCR,
    0,
    [_FN, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListProvisionedConcurrencyConfigsRequest$ = ListProvisionedConcurrencyConfigsRequest$;
  var ListProvisionedConcurrencyConfigsResponse$ = [
    3,
    n0,
    _LPCCRi,
    0,
    [_PCC, _NM],
    [() => ProvisionedConcurrencyConfigList, 0]
  ];
  exports2.ListProvisionedConcurrencyConfigsResponse$ = ListProvisionedConcurrencyConfigsResponse$;
  var ListTagsRequest$ = [
    3,
    n0,
    _LTR,
    0,
    [_Res],
    [[0, 1]],
    1
  ];
  exports2.ListTagsRequest$ = ListTagsRequest$;
  var ListTagsResponse$ = [
    3,
    n0,
    _LTRi,
    0,
    [_Ta],
    [128 | 0]
  ];
  exports2.ListTagsResponse$ = ListTagsResponse$;
  var ListVersionsByFunctionRequest$ = [
    3,
    n0,
    _LVBFR,
    0,
    [_FN, _Ma, _MI],
    [[0, 1], [0, { [_hQ]: _Ma }], [1, { [_hQ]: _MI }]],
    1
  ];
  exports2.ListVersionsByFunctionRequest$ = ListVersionsByFunctionRequest$;
  var ListVersionsByFunctionResponse$ = [
    3,
    n0,
    _LVBFRi,
    0,
    [_NM, _Ver],
    [0, [() => FunctionList, 0]]
  ];
  exports2.ListVersionsByFunctionResponse$ = ListVersionsByFunctionResponse$;
  var LoggingConfig$ = [
    3,
    n0,
    _LC,
    0,
    [_LF, _ALL, _SLL, _LG],
    [0, 0, 0, 0]
  ];
  exports2.LoggingConfig$ = LoggingConfig$;
  var OnFailure$ = [
    3,
    n0,
    _OF,
    0,
    [_De],
    [0]
  ];
  exports2.OnFailure$ = OnFailure$;
  var OnSuccess$ = [
    3,
    n0,
    _OS,
    0,
    [_De],
    [0]
  ];
  exports2.OnSuccess$ = OnSuccess$;
  var Operation$ = [
    3,
    n0,
    _Op,
    0,
    [_Id, _T, _STt, _Sta, _PI, _N, _STu, _ETn, _EDx, _CDo, _SD, _WDa, _CD, _CID],
    [0, 0, 4, 0, 0, 0, 0, 4, [() => ExecutionDetails$, 0], [() => ContextDetails$, 0], [() => StepDetails$, 0], () => WaitDetails$, [() => CallbackDetails$, 0], [() => ChainedInvokeDetails$, 0]],
    4
  ];
  exports2.Operation$ = Operation$;
  var OperationUpdate$ = [
    3,
    n0,
    _OU,
    0,
    [_Id, _T, _A, _PI, _N, _STu, _Pa, _E, _COo, _SO, _WO, _CO, _CIO],
    [0, 0, 0, 0, 0, 0, [() => OperationPayload, 0], [() => ErrorObject$, 0], () => ContextOptions$, () => StepOptions$, () => WaitOptions$, () => CallbackOptions$, () => ChainedInvokeOptions$],
    3
  ];
  exports2.OperationUpdate$ = OperationUpdate$;
  var PropagateTags$ = [
    3,
    n0,
    _PT,
    0,
    [_Mo, _ETxp],
    [0, 128 | 0]
  ];
  exports2.PropagateTags$ = PropagateTags$;
  var ProvisionedConcurrencyConfigListItem$ = [
    3,
    n0,
    _PCCLI,
    0,
    [_FA, _RPCE, _APCE, _APCEl, _Sta, _SRt, _LM],
    [0, 1, 1, 1, 0, 0, 0]
  ];
  exports2.ProvisionedConcurrencyConfigListItem$ = ProvisionedConcurrencyConfigListItem$;
  var ProvisionedPollerConfig$ = [
    3,
    n0,
    _PPC,
    0,
    [_MP, _MPa, _PGN],
    [1, 1, 0]
  ];
  exports2.ProvisionedPollerConfig$ = ProvisionedPollerConfig$;
  var PublishLayerVersionRequest$ = [
    3,
    n0,
    _PLVR,
    0,
    [_LN, _Cont, _D, _CA, _CR, _LI],
    [[0, 1], [() => LayerVersionContentInput$, 0], 0, 64 | 0, 64 | 0, 0],
    2
  ];
  exports2.PublishLayerVersionRequest$ = PublishLayerVersionRequest$;
  var PublishLayerVersionResponse$ = [
    3,
    n0,
    _PLVRu,
    0,
    [_Cont, _LA, _LVA, _D, _CDr, _Ve, _CA, _CR, _LI],
    [() => LayerVersionContentOutput$, 0, 0, 0, 0, 1, 64 | 0, 64 | 0, 0]
  ];
  exports2.PublishLayerVersionResponse$ = PublishLayerVersionResponse$;
  var PublishVersionRequest$ = [
    3,
    n0,
    _PVR,
    0,
    [_FN, _CSo, _D, _RI, _PTu],
    [[0, 1], 0, 0, 0, 0],
    1
  ];
  exports2.PublishVersionRequest$ = PublishVersionRequest$;
  var PutFunctionCodeSigningConfigRequest$ = [
    3,
    n0,
    _PFCSCR,
    0,
    [_CSCA, _FN],
    [0, [0, 1]],
    2
  ];
  exports2.PutFunctionCodeSigningConfigRequest$ = PutFunctionCodeSigningConfigRequest$;
  var PutFunctionCodeSigningConfigResponse$ = [
    3,
    n0,
    _PFCSCRu,
    0,
    [_CSCA, _FN],
    [0, 0],
    2
  ];
  exports2.PutFunctionCodeSigningConfigResponse$ = PutFunctionCodeSigningConfigResponse$;
  var PutFunctionConcurrencyRequest$ = [
    3,
    n0,
    _PFCR,
    0,
    [_FN, _RCEe],
    [[0, 1], 1],
    2
  ];
  exports2.PutFunctionConcurrencyRequest$ = PutFunctionConcurrencyRequest$;
  var PutFunctionEventInvokeConfigRequest$ = [
    3,
    n0,
    _PFEICR,
    0,
    [_FN, _Q, _MRA, _MEAIS, _DC],
    [[0, 1], [0, { [_hQ]: _Q }], 1, 1, () => DestinationConfig$],
    1
  ];
  exports2.PutFunctionEventInvokeConfigRequest$ = PutFunctionEventInvokeConfigRequest$;
  var PutFunctionRecursionConfigRequest$ = [
    3,
    n0,
    _PFRCR,
    0,
    [_FN, _RL],
    [[0, 1], 0],
    2
  ];
  exports2.PutFunctionRecursionConfigRequest$ = PutFunctionRecursionConfigRequest$;
  var PutFunctionRecursionConfigResponse$ = [
    3,
    n0,
    _PFRCRu,
    0,
    [_RL],
    [0]
  ];
  exports2.PutFunctionRecursionConfigResponse$ = PutFunctionRecursionConfigResponse$;
  var PutFunctionScalingConfigRequest$ = [
    3,
    n0,
    _PFSCR,
    0,
    [_FN, _Q, _FSCu],
    [[0, 1], [0, { [_hQ]: _Q }], () => FunctionScalingConfig$],
    2
  ];
  exports2.PutFunctionScalingConfigRequest$ = PutFunctionScalingConfigRequest$;
  var PutFunctionScalingConfigResponse$ = [
    3,
    n0,
    _PFSCRu,
    0,
    [_FS],
    [0]
  ];
  exports2.PutFunctionScalingConfigResponse$ = PutFunctionScalingConfigResponse$;
  var PutProvisionedConcurrencyConfigRequest$ = [
    3,
    n0,
    _PPCCR,
    0,
    [_FN, _Q, _PCE],
    [[0, 1], [0, { [_hQ]: _Q }], 1],
    3
  ];
  exports2.PutProvisionedConcurrencyConfigRequest$ = PutProvisionedConcurrencyConfigRequest$;
  var PutProvisionedConcurrencyConfigResponse$ = [
    3,
    n0,
    _PPCCRu,
    0,
    [_RPCE, _APCEl, _APCE, _Sta, _SRt, _LM],
    [1, 1, 1, 0, 0, 0]
  ];
  exports2.PutProvisionedConcurrencyConfigResponse$ = PutProvisionedConcurrencyConfigResponse$;
  var PutRuntimeManagementConfigRequest$ = [
    3,
    n0,
    _PRMCR,
    0,
    [_FN, _URO, _Q, _RVA],
    [[0, 1], 0, [0, { [_hQ]: _Q }], 0],
    2
  ];
  exports2.PutRuntimeManagementConfigRequest$ = PutRuntimeManagementConfigRequest$;
  var PutRuntimeManagementConfigResponse$ = [
    3,
    n0,
    _PRMCRu,
    0,
    [_URO, _FA, _RVA],
    [0, 0, 0],
    2
  ];
  exports2.PutRuntimeManagementConfigResponse$ = PutRuntimeManagementConfigResponse$;
  var RemoveLayerVersionPermissionRequest$ = [
    3,
    n0,
    _RLVPR,
    0,
    [_LN, _VN, _SI, _RI],
    [[0, 1], [1, 1], [0, 1], [0, { [_hQ]: _RI }]],
    3
  ];
  exports2.RemoveLayerVersionPermissionRequest$ = RemoveLayerVersionPermissionRequest$;
  var RemovePermissionRequest$ = [
    3,
    n0,
    _RPR,
    0,
    [_FN, _SI, _Q, _RI],
    [[0, 1], [0, 1], [0, { [_hQ]: _Q }], [0, { [_hQ]: _RI }]],
    2
  ];
  exports2.RemovePermissionRequest$ = RemovePermissionRequest$;
  var RetryDetails$ = [
    3,
    n0,
    _RD,
    0,
    [_CAu, _NADS],
    [1, 1]
  ];
  exports2.RetryDetails$ = RetryDetails$;
  var RuntimeVersionConfig$ = [
    3,
    n0,
    _RVC,
    0,
    [_RVA, _E],
    [0, [() => RuntimeVersionError$, 0]]
  ];
  exports2.RuntimeVersionConfig$ = RuntimeVersionConfig$;
  var RuntimeVersionError$ = [
    3,
    n0,
    _RVE,
    0,
    [_EC, _M],
    [0, [() => SensitiveString, 0]]
  ];
  exports2.RuntimeVersionError$ = RuntimeVersionError$;
  var ScalingConfig$ = [
    3,
    n0,
    _SC,
    0,
    [_MCa],
    [1]
  ];
  exports2.ScalingConfig$ = ScalingConfig$;
  var SelfManagedEventSource$ = [
    3,
    n0,
    _SMES,
    0,
    [_End],
    [[2, n0, _End, 0, 0, 64 | 0]]
  ];
  exports2.SelfManagedEventSource$ = SelfManagedEventSource$;
  var SelfManagedKafkaEventSourceConfig$ = [
    3,
    n0,
    _SMKESC,
    0,
    [_CGI, _SRC],
    [0, () => KafkaSchemaRegistryConfig$]
  ];
  exports2.SelfManagedKafkaEventSourceConfig$ = SelfManagedKafkaEventSourceConfig$;
  var SendDurableExecutionCallbackFailureRequest$ = [
    3,
    n0,
    _SDECFR,
    0,
    [_CI, _E],
    [[0, 1], [() => ErrorObject$, 16]],
    1
  ];
  exports2.SendDurableExecutionCallbackFailureRequest$ = SendDurableExecutionCallbackFailureRequest$;
  var SendDurableExecutionCallbackFailureResponse$ = [
    3,
    n0,
    _SDECFRe,
    0,
    [],
    []
  ];
  exports2.SendDurableExecutionCallbackFailureResponse$ = SendDurableExecutionCallbackFailureResponse$;
  var SendDurableExecutionCallbackHeartbeatRequest$ = [
    3,
    n0,
    _SDECHR,
    0,
    [_CI],
    [[0, 1]],
    1
  ];
  exports2.SendDurableExecutionCallbackHeartbeatRequest$ = SendDurableExecutionCallbackHeartbeatRequest$;
  var SendDurableExecutionCallbackHeartbeatResponse$ = [
    3,
    n0,
    _SDECHRe,
    0,
    [],
    []
  ];
  exports2.SendDurableExecutionCallbackHeartbeatResponse$ = SendDurableExecutionCallbackHeartbeatResponse$;
  var SendDurableExecutionCallbackSuccessRequest$ = [
    3,
    n0,
    _SDECSR,
    0,
    [_CI, _Re],
    [[0, 1], [() => BinaryOperationPayload, 16]],
    1
  ];
  exports2.SendDurableExecutionCallbackSuccessRequest$ = SendDurableExecutionCallbackSuccessRequest$;
  var SendDurableExecutionCallbackSuccessResponse$ = [
    3,
    n0,
    _SDECSRe,
    0,
    [],
    []
  ];
  exports2.SendDurableExecutionCallbackSuccessResponse$ = SendDurableExecutionCallbackSuccessResponse$;
  var SnapStart$ = [
    3,
    n0,
    _SSn,
    0,
    [_AOp],
    [0]
  ];
  exports2.SnapStart$ = SnapStart$;
  var SnapStartResponse$ = [
    3,
    n0,
    _SSR,
    0,
    [_AOp, _OSp],
    [0, 0]
  ];
  exports2.SnapStartResponse$ = SnapStartResponse$;
  var SourceAccessConfiguration$ = [
    3,
    n0,
    _SACo,
    0,
    [_T, _URI],
    [0, 0]
  ];
  exports2.SourceAccessConfiguration$ = SourceAccessConfiguration$;
  var StepDetails$ = [
    3,
    n0,
    _SD,
    0,
    [_Att, _NAT, _Re, _E],
    [1, 4, [() => OperationPayload, 0], [() => ErrorObject$, 0]]
  ];
  exports2.StepDetails$ = StepDetails$;
  var StepFailedDetails$ = [
    3,
    n0,
    _SFD,
    0,
    [_E, _RD],
    [[() => EventError$, 0], () => RetryDetails$],
    2
  ];
  exports2.StepFailedDetails$ = StepFailedDetails$;
  var StepOptions$ = [
    3,
    n0,
    _SO,
    0,
    [_NADS],
    [1]
  ];
  exports2.StepOptions$ = StepOptions$;
  var StepStartedDetails$ = [
    3,
    n0,
    _SSD,
    0,
    [],
    []
  ];
  exports2.StepStartedDetails$ = StepStartedDetails$;
  var StepSucceededDetails$ = [
    3,
    n0,
    _SSDt,
    0,
    [_Re, _RD],
    [[() => EventResult$, 0], () => RetryDetails$],
    2
  ];
  exports2.StepSucceededDetails$ = StepSucceededDetails$;
  var StopDurableExecutionRequest$ = [
    3,
    n0,
    _SDER,
    0,
    [_DEA, _E],
    [[0, 1], [() => ErrorObject$, 16]],
    1
  ];
  exports2.StopDurableExecutionRequest$ = StopDurableExecutionRequest$;
  var StopDurableExecutionResponse$ = [
    3,
    n0,
    _SDERt,
    0,
    [_STto],
    [4],
    1
  ];
  exports2.StopDurableExecutionResponse$ = StopDurableExecutionResponse$;
  var TagResourceRequest$ = [
    3,
    n0,
    _TRR,
    0,
    [_Res, _Ta],
    [[0, 1], 128 | 0],
    2
  ];
  exports2.TagResourceRequest$ = TagResourceRequest$;
  var TagsError$ = [
    3,
    n0,
    _TE,
    0,
    [_EC, _M],
    [0, 0],
    2
  ];
  exports2.TagsError$ = TagsError$;
  var TargetTrackingScalingPolicy$ = [
    3,
    n0,
    _TTSP,
    0,
    [_PMT, _TV],
    [0, 1],
    2
  ];
  exports2.TargetTrackingScalingPolicy$ = TargetTrackingScalingPolicy$;
  var TenancyConfig$ = [
    3,
    n0,
    _TCe,
    0,
    [_TIM],
    [0],
    1
  ];
  exports2.TenancyConfig$ = TenancyConfig$;
  var TraceHeader$ = [
    3,
    n0,
    _TH,
    0,
    [_XATIm],
    [0]
  ];
  exports2.TraceHeader$ = TraceHeader$;
  var TracingConfig$ = [
    3,
    n0,
    _TC,
    0,
    [_Mo],
    [0]
  ];
  exports2.TracingConfig$ = TracingConfig$;
  var TracingConfigResponse$ = [
    3,
    n0,
    _TCR,
    0,
    [_Mo],
    [0]
  ];
  exports2.TracingConfigResponse$ = TracingConfigResponse$;
  var UntagResourceRequest$ = [
    3,
    n0,
    _URR,
    0,
    [_Res, _TK],
    [[0, 1], [() => TagKeyList, { [_hQ]: _tK }]],
    2
  ];
  exports2.UntagResourceRequest$ = UntagResourceRequest$;
  var UpdateAliasRequest$ = [
    3,
    n0,
    _UAR,
    0,
    [_FN, _N, _FV, _D, _RC, _RI],
    [[0, 1], [0, 1], 0, 0, () => AliasRoutingConfiguration$, 0],
    2
  ];
  exports2.UpdateAliasRequest$ = UpdateAliasRequest$;
  var UpdateCapacityProviderRequest$ = [
    3,
    n0,
    _UCPR,
    0,
    [_CPN, _CPSC, _PT],
    [[0, 1], () => CapacityProviderScalingConfig$, () => PropagateTags$],
    1
  ];
  exports2.UpdateCapacityProviderRequest$ = UpdateCapacityProviderRequest$;
  var UpdateCapacityProviderResponse$ = [
    3,
    n0,
    _UCPRp,
    0,
    [_CP],
    [() => CapacityProvider$],
    1
  ];
  exports2.UpdateCapacityProviderResponse$ = UpdateCapacityProviderResponse$;
  var UpdateCodeSigningConfigRequest$ = [
    3,
    n0,
    _UCSCR,
    0,
    [_CSCA, _D, _AP, _CSP],
    [[0, 1], 0, () => AllowedPublishers$, () => CodeSigningPolicies$],
    1
  ];
  exports2.UpdateCodeSigningConfigRequest$ = UpdateCodeSigningConfigRequest$;
  var UpdateCodeSigningConfigResponse$ = [
    3,
    n0,
    _UCSCRp,
    0,
    [_CSC],
    [() => CodeSigningConfig$],
    1
  ];
  exports2.UpdateCodeSigningConfigResponse$ = UpdateCodeSigningConfigResponse$;
  var UpdateEventSourceMappingRequest$ = [
    3,
    n0,
    _UESMR,
    0,
    [_UUID, _FN, _En, _BSa, _FCi, _KMSKA, _MC, _LC, _SC, _MBWIS, _PF, _DC, _MRAIS, _BBOFE, _MRA, _TWIS, _SAC, _FRT, _AMKESC, _SMKESC, _DDBESC, _PPC],
    [[0, 1], 0, 2, 1, () => FilterCriteria$, 0, () => EventSourceMappingMetricsConfig$, () => EventSourceMappingLoggingConfig$, () => ScalingConfig$, 1, 1, () => DestinationConfig$, 1, 2, 1, 1, () => SourceAccessConfigurations, 64 | 0, () => AmazonManagedKafkaEventSourceConfig$, () => SelfManagedKafkaEventSourceConfig$, () => DocumentDBEventSourceConfig$, () => ProvisionedPollerConfig$],
    1
  ];
  exports2.UpdateEventSourceMappingRequest$ = UpdateEventSourceMappingRequest$;
  var UpdateFunctionCodeRequest$ = [
    3,
    n0,
    _UFCR,
    0,
    [_FN, _ZF, _SB, _SK, _SOV, _IU, _Ar, _Pu, _PTu, _DR, _RI, _SKMSKA],
    [[0, 1], [() => _Blob, 0], 0, 0, 0, 0, 64 | 0, 2, 0, 2, 0, 0],
    1
  ];
  exports2.UpdateFunctionCodeRequest$ = UpdateFunctionCodeRequest$;
  var UpdateFunctionConfigurationRequest$ = [
    3,
    n0,
    _UFCRp,
    0,
    [_FN, _Ro, _H, _D, _Ti, _MS, _VC, _Env, _Ru, _DLC, _KMSKA, _TC, _RI, _L, _FSC, _IC, _ES, _SSn, _LC, _CPC, _DCu],
    [[0, 1], 0, 0, 0, 1, 1, () => VpcConfig$, [() => Environment$, 0], 0, () => DeadLetterConfig$, 0, () => TracingConfig$, 0, 64 | 0, () => FileSystemConfigList, () => ImageConfig$, () => EphemeralStorage$, () => SnapStart$, () => LoggingConfig$, () => CapacityProviderConfig$, () => DurableConfig$],
    1
  ];
  exports2.UpdateFunctionConfigurationRequest$ = UpdateFunctionConfigurationRequest$;
  var UpdateFunctionEventInvokeConfigRequest$ = [
    3,
    n0,
    _UFEICR,
    0,
    [_FN, _Q, _MRA, _MEAIS, _DC],
    [[0, 1], [0, { [_hQ]: _Q }], 1, 1, () => DestinationConfig$],
    1
  ];
  exports2.UpdateFunctionEventInvokeConfigRequest$ = UpdateFunctionEventInvokeConfigRequest$;
  var UpdateFunctionUrlConfigRequest$ = [
    3,
    n0,
    _UFUCR,
    0,
    [_FN, _Q, _AT, _Co, _IM],
    [[0, 1], [0, { [_hQ]: _Q }], 0, () => Cors$, 0],
    1
  ];
  exports2.UpdateFunctionUrlConfigRequest$ = UpdateFunctionUrlConfigRequest$;
  var UpdateFunctionUrlConfigResponse$ = [
    3,
    n0,
    _UFUCRp,
    0,
    [_FU, _FA, _AT, _CTr, _LMT, _Co, _IM],
    [0, 0, 0, 0, 0, () => Cors$, 0],
    5
  ];
  exports2.UpdateFunctionUrlConfigResponse$ = UpdateFunctionUrlConfigResponse$;
  var VpcConfig$ = [
    3,
    n0,
    _VC,
    0,
    [_SIu, _SGI, _IAFDS],
    [64 | 0, 64 | 0, 2]
  ];
  exports2.VpcConfig$ = VpcConfig$;
  var VpcConfigResponse$ = [
    3,
    n0,
    _VCR,
    0,
    [_SIu, _SGI, _VI, _IAFDS],
    [64 | 0, 64 | 0, 0, 2]
  ];
  exports2.VpcConfigResponse$ = VpcConfigResponse$;
  var WaitCancelledDetails$ = [
    3,
    n0,
    _WCD,
    0,
    [_E],
    [[() => EventError$, 0]]
  ];
  exports2.WaitCancelledDetails$ = WaitCancelledDetails$;
  var WaitDetails$ = [
    3,
    n0,
    _WDa,
    0,
    [_SET],
    [4]
  ];
  exports2.WaitDetails$ = WaitDetails$;
  var WaitOptions$ = [
    3,
    n0,
    _WO,
    0,
    [_WS],
    [1]
  ];
  exports2.WaitOptions$ = WaitOptions$;
  var WaitStartedDetails$ = [
    3,
    n0,
    _WSD,
    0,
    [_Du, _SET],
    [1, 4],
    2
  ];
  exports2.WaitStartedDetails$ = WaitStartedDetails$;
  var WaitSucceededDetails$ = [
    3,
    n0,
    _WSDa,
    0,
    [_Du],
    [1]
  ];
  exports2.WaitSucceededDetails$ = WaitSucceededDetails$;
  var __Unit = "unit";
  var AliasList = [
    1,
    n0,
    _ALl,
    0,
    () => AliasConfiguration$
  ];
  var AllowMethodsList = 64 | 0;
  var AllowOriginsList = 64 | 0;
  var ArchitecturesList = 64 | 0;
  var CapacityProviderScalingPoliciesList = [
    1,
    n0,
    _CPSPL,
    0,
    () => TargetTrackingScalingPolicy$
  ];
  var CapacityProviderSecurityGroupIds = 64 | 0;
  var CapacityProvidersList = [
    1,
    n0,
    _CPL,
    0,
    () => CapacityProvider$
  ];
  var CapacityProviderSubnetIds = 64 | 0;
  var CodeSigningConfigList = [
    1,
    n0,
    _CSCL,
    0,
    () => CodeSigningConfig$
  ];
  var CompatibleArchitectures = 64 | 0;
  var CompatibleRuntimes = 64 | 0;
  var DurableExecutions = [
    1,
    n0,
    _DE,
    0,
    () => Execution$
  ];
  var EndpointLists = 64 | 0;
  var Events = [
    1,
    n0,
    _Eve,
    0,
    [
      () => Event$,
      0
    ]
  ];
  var EventSourceMappingMetricList = 64 | 0;
  var EventSourceMappingsList = [
    1,
    n0,
    _ESML,
    0,
    () => EventSourceMappingConfiguration$
  ];
  var ExecutionStatusList = 64 | 0;
  var FileSystemConfigList = [
    1,
    n0,
    _FSCL,
    0,
    () => FileSystemConfig$
  ];
  var FilterList = [
    1,
    n0,
    _FL,
    0,
    () => Filter$
  ];
  var FunctionArnList = 64 | 0;
  var FunctionEventInvokeConfigList = [
    1,
    n0,
    _FEICL,
    0,
    () => FunctionEventInvokeConfig$
  ];
  var FunctionList = [
    1,
    n0,
    _FLu,
    0,
    [
      () => FunctionConfiguration$,
      0
    ]
  ];
  var FunctionResponseTypeList = 64 | 0;
  var FunctionUrlConfigList = [
    1,
    n0,
    _FUCL,
    0,
    () => FunctionUrlConfig$
  ];
  var FunctionVersionsByCapacityProviderList = [
    1,
    n0,
    _FVBCPL,
    0,
    () => FunctionVersionsByCapacityProviderListItem$
  ];
  var HeadersList = 64 | 0;
  var InstanceTypeSet = 64 | 0;
  var KafkaSchemaRegistryAccessConfigList = [
    1,
    n0,
    _KSRACL,
    0,
    () => KafkaSchemaRegistryAccessConfig$
  ];
  var KafkaSchemaValidationConfigList = [
    1,
    n0,
    _KSVCL,
    0,
    () => KafkaSchemaValidationConfig$
  ];
  var LayerList = 64 | 0;
  var LayersList = [
    1,
    n0,
    _LL,
    0,
    () => LayersListItem$
  ];
  var LayersReferenceList = [
    1,
    n0,
    _LRL,
    0,
    () => Layer$
  ];
  var LayerVersionsList = [
    1,
    n0,
    _LVL,
    0,
    () => LayerVersionsListItem$
  ];
  var Operations = [
    1,
    n0,
    _O,
    0,
    [
      () => Operation$,
      0
    ]
  ];
  var OperationUpdates = [
    1,
    n0,
    _OUp,
    0,
    [
      () => OperationUpdate$,
      0
    ]
  ];
  var ProvisionedConcurrencyConfigList = [
    1,
    n0,
    _PCCL,
    0,
    () => ProvisionedConcurrencyConfigListItem$
  ];
  var Queues = 64 | 0;
  var SecurityGroupIds = 64 | 0;
  var SigningProfileVersionArns = 64 | 0;
  var SourceAccessConfigurations = [
    1,
    n0,
    _SAC,
    0,
    () => SourceAccessConfiguration$
  ];
  var StackTraceEntries = [
    1,
    n0,
    _STEt,
    0,
    [
      () => StackTraceEntry,
      0
    ]
  ];
  var StringList = 64 | 0;
  var SubnetIds = 64 | 0;
  var TagKeyList = [
    1,
    n0,
    _TKL,
    0,
    [
      0,
      { [_xN]: _K }
    ]
  ];
  var Topics = 64 | 0;
  var AdditionalVersionWeights = 128 | 1;
  var Endpoints = [
    2,
    n0,
    _End,
    0,
    0,
    64 | 0
  ];
  var EnvironmentVariables = [
    2,
    n0,
    _EVn,
    8,
    [
      () => EnvironmentVariableName,
      0
    ],
    [
      () => EnvironmentVariableValue,
      0
    ]
  ];
  var Tags = 128 | 0;
  var InvokeWithResponseStreamResponseEvent$ = [
    4,
    n0,
    _IWRSRE,
    { [_st]: 1 },
    [_PCa, _ICn],
    [[() => InvokeResponseStreamUpdate$, 0], () => InvokeWithResponseStreamCompleteEvent$]
  ];
  exports2.InvokeWithResponseStreamResponseEvent$ = InvokeWithResponseStreamResponseEvent$;
  exports2.AddLayerVersionPermission$ = [
    9,
    n0,
    _ALVP,
    { [_h]: ["POST", "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy", 201] },
    () => AddLayerVersionPermissionRequest$,
    () => AddLayerVersionPermissionResponse$
  ];
  exports2.AddPermission$ = [
    9,
    n0,
    _APd,
    { [_h]: ["POST", "/2015-03-31/functions/{FunctionName}/policy", 201] },
    () => AddPermissionRequest$,
    () => AddPermissionResponse$
  ];
  exports2.CheckpointDurableExecution$ = [
    9,
    n0,
    _CDE,
    { [_h]: ["POST", "/2025-12-01/durable-executions/{DurableExecutionArn}/checkpoint", 200] },
    () => CheckpointDurableExecutionRequest$,
    () => CheckpointDurableExecutionResponse$
  ];
  exports2.CreateAlias$ = [
    9,
    n0,
    _CAr,
    { [_h]: ["POST", "/2015-03-31/functions/{FunctionName}/aliases", 201] },
    () => CreateAliasRequest$,
    () => AliasConfiguration$
  ];
  exports2.CreateCapacityProvider$ = [
    9,
    n0,
    _CCP,
    { [_h]: ["POST", "/2025-11-30/capacity-providers", 202] },
    () => CreateCapacityProviderRequest$,
    () => CreateCapacityProviderResponse$
  ];
  exports2.CreateCodeSigningConfig$ = [
    9,
    n0,
    _CCSC,
    { [_h]: ["POST", "/2020-04-22/code-signing-configs", 201] },
    () => CreateCodeSigningConfigRequest$,
    () => CreateCodeSigningConfigResponse$
  ];
  exports2.CreateEventSourceMapping$ = [
    9,
    n0,
    _CESM,
    { [_h]: ["POST", "/2015-03-31/event-source-mappings", 202] },
    () => CreateEventSourceMappingRequest$,
    () => EventSourceMappingConfiguration$
  ];
  exports2.CreateFunction$ = [
    9,
    n0,
    _CF,
    { [_h]: ["POST", "/2015-03-31/functions", 201] },
    () => CreateFunctionRequest$,
    () => FunctionConfiguration$
  ];
  exports2.CreateFunctionUrlConfig$ = [
    9,
    n0,
    _CFUC,
    { [_h]: ["POST", "/2021-10-31/functions/{FunctionName}/url", 201] },
    () => CreateFunctionUrlConfigRequest$,
    () => CreateFunctionUrlConfigResponse$
  ];
  exports2.DeleteAlias$ = [
    9,
    n0,
    _DA,
    { [_h]: ["DELETE", "/2015-03-31/functions/{FunctionName}/aliases/{Name}", 204] },
    () => DeleteAliasRequest$,
    () => __Unit
  ];
  exports2.DeleteCapacityProvider$ = [
    9,
    n0,
    _DCP,
    { [_h]: ["DELETE", "/2025-11-30/capacity-providers/{CapacityProviderName}", 202] },
    () => DeleteCapacityProviderRequest$,
    () => DeleteCapacityProviderResponse$
  ];
  exports2.DeleteCodeSigningConfig$ = [
    9,
    n0,
    _DCSC,
    { [_h]: ["DELETE", "/2020-04-22/code-signing-configs/{CodeSigningConfigArn}", 204] },
    () => DeleteCodeSigningConfigRequest$,
    () => DeleteCodeSigningConfigResponse$
  ];
  exports2.DeleteEventSourceMapping$ = [
    9,
    n0,
    _DESM,
    { [_h]: ["DELETE", "/2015-03-31/event-source-mappings/{UUID}", 202] },
    () => DeleteEventSourceMappingRequest$,
    () => EventSourceMappingConfiguration$
  ];
  exports2.DeleteFunction$ = [
    9,
    n0,
    _DF,
    { [_h]: ["DELETE", "/2015-03-31/functions/{FunctionName}", 200] },
    () => DeleteFunctionRequest$,
    () => DeleteFunctionResponse$
  ];
  exports2.DeleteFunctionCodeSigningConfig$ = [
    9,
    n0,
    _DFCSC,
    { [_h]: ["DELETE", "/2020-06-30/functions/{FunctionName}/code-signing-config", 204] },
    () => DeleteFunctionCodeSigningConfigRequest$,
    () => __Unit
  ];
  exports2.DeleteFunctionConcurrency$ = [
    9,
    n0,
    _DFC,
    { [_h]: ["DELETE", "/2017-10-31/functions/{FunctionName}/concurrency", 204] },
    () => DeleteFunctionConcurrencyRequest$,
    () => __Unit
  ];
  exports2.DeleteFunctionEventInvokeConfig$ = [
    9,
    n0,
    _DFEIC,
    { [_h]: ["DELETE", "/2019-09-25/functions/{FunctionName}/event-invoke-config", 204] },
    () => DeleteFunctionEventInvokeConfigRequest$,
    () => __Unit
  ];
  exports2.DeleteFunctionUrlConfig$ = [
    9,
    n0,
    _DFUC,
    { [_h]: ["DELETE", "/2021-10-31/functions/{FunctionName}/url", 204] },
    () => DeleteFunctionUrlConfigRequest$,
    () => __Unit
  ];
  exports2.DeleteLayerVersion$ = [
    9,
    n0,
    _DLV,
    { [_h]: ["DELETE", "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}", 204] },
    () => DeleteLayerVersionRequest$,
    () => __Unit
  ];
  exports2.DeleteProvisionedConcurrencyConfig$ = [
    9,
    n0,
    _DPCC,
    { [_h]: ["DELETE", "/2019-09-30/functions/{FunctionName}/provisioned-concurrency", 204] },
    () => DeleteProvisionedConcurrencyConfigRequest$,
    () => __Unit
  ];
  exports2.GetAccountSettings$ = [
    9,
    n0,
    _GAS,
    { [_h]: ["GET", "/2016-08-19/account-settings", 200] },
    () => GetAccountSettingsRequest$,
    () => GetAccountSettingsResponse$
  ];
  exports2.GetAlias$ = [
    9,
    n0,
    _GA,
    { [_h]: ["GET", "/2015-03-31/functions/{FunctionName}/aliases/{Name}", 200] },
    () => GetAliasRequest$,
    () => AliasConfiguration$
  ];
  exports2.GetCapacityProvider$ = [
    9,
    n0,
    _GCP,
    { [_h]: ["GET", "/2025-11-30/capacity-providers/{CapacityProviderName}", 200] },
    () => GetCapacityProviderRequest$,
    () => GetCapacityProviderResponse$
  ];
  exports2.GetCodeSigningConfig$ = [
    9,
    n0,
    _GCSC,
    { [_h]: ["GET", "/2020-04-22/code-signing-configs/{CodeSigningConfigArn}", 200] },
    () => GetCodeSigningConfigRequest$,
    () => GetCodeSigningConfigResponse$
  ];
  exports2.GetDurableExecution$ = [
    9,
    n0,
    _GDE,
    { [_h]: ["GET", "/2025-12-01/durable-executions/{DurableExecutionArn}", 200] },
    () => GetDurableExecutionRequest$,
    () => GetDurableExecutionResponse$
  ];
  exports2.GetDurableExecutionHistory$ = [
    9,
    n0,
    _GDEH,
    { [_h]: ["GET", "/2025-12-01/durable-executions/{DurableExecutionArn}/history", 200] },
    () => GetDurableExecutionHistoryRequest$,
    () => GetDurableExecutionHistoryResponse$
  ];
  exports2.GetDurableExecutionState$ = [
    9,
    n0,
    _GDES,
    { [_h]: ["GET", "/2025-12-01/durable-executions/{DurableExecutionArn}/state", 200] },
    () => GetDurableExecutionStateRequest$,
    () => GetDurableExecutionStateResponse$
  ];
  exports2.GetEventSourceMapping$ = [
    9,
    n0,
    _GESM,
    { [_h]: ["GET", "/2015-03-31/event-source-mappings/{UUID}", 200] },
    () => GetEventSourceMappingRequest$,
    () => EventSourceMappingConfiguration$
  ];
  exports2.GetFunction$ = [
    9,
    n0,
    _GF,
    { [_h]: ["GET", "/2015-03-31/functions/{FunctionName}", 200] },
    () => GetFunctionRequest$,
    () => GetFunctionResponse$
  ];
  exports2.GetFunctionCodeSigningConfig$ = [
    9,
    n0,
    _GFCSC,
    { [_h]: ["GET", "/2020-06-30/functions/{FunctionName}/code-signing-config", 200] },
    () => GetFunctionCodeSigningConfigRequest$,
    () => GetFunctionCodeSigningConfigResponse$
  ];
  exports2.GetFunctionConcurrency$ = [
    9,
    n0,
    _GFC,
    { [_h]: ["GET", "/2019-09-30/functions/{FunctionName}/concurrency", 200] },
    () => GetFunctionConcurrencyRequest$,
    () => GetFunctionConcurrencyResponse$
  ];
  exports2.GetFunctionConfiguration$ = [
    9,
    n0,
    _GFCe,
    { [_h]: ["GET", "/2015-03-31/functions/{FunctionName}/configuration", 200] },
    () => GetFunctionConfigurationRequest$,
    () => FunctionConfiguration$
  ];
  exports2.GetFunctionEventInvokeConfig$ = [
    9,
    n0,
    _GFEIC,
    { [_h]: ["GET", "/2019-09-25/functions/{FunctionName}/event-invoke-config", 200] },
    () => GetFunctionEventInvokeConfigRequest$,
    () => FunctionEventInvokeConfig$
  ];
  exports2.GetFunctionRecursionConfig$ = [
    9,
    n0,
    _GFRC,
    { [_h]: ["GET", "/2024-08-31/functions/{FunctionName}/recursion-config", 200] },
    () => GetFunctionRecursionConfigRequest$,
    () => GetFunctionRecursionConfigResponse$
  ];
  exports2.GetFunctionScalingConfig$ = [
    9,
    n0,
    _GFSC,
    { [_h]: ["GET", "/2025-11-30/functions/{FunctionName}/function-scaling-config", 200] },
    () => GetFunctionScalingConfigRequest$,
    () => GetFunctionScalingConfigResponse$
  ];
  exports2.GetFunctionUrlConfig$ = [
    9,
    n0,
    _GFUC,
    { [_h]: ["GET", "/2021-10-31/functions/{FunctionName}/url", 200] },
    () => GetFunctionUrlConfigRequest$,
    () => GetFunctionUrlConfigResponse$
  ];
  exports2.GetLayerVersion$ = [
    9,
    n0,
    _GLV,
    { [_h]: ["GET", "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}", 200] },
    () => GetLayerVersionRequest$,
    () => GetLayerVersionResponse$
  ];
  exports2.GetLayerVersionByArn$ = [
    9,
    n0,
    _GLVBA,
    { [_h]: ["GET", "/2018-10-31/layers?find=LayerVersion", 200] },
    () => GetLayerVersionByArnRequest$,
    () => GetLayerVersionResponse$
  ];
  exports2.GetLayerVersionPolicy$ = [
    9,
    n0,
    _GLVP,
    { [_h]: ["GET", "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy", 200] },
    () => GetLayerVersionPolicyRequest$,
    () => GetLayerVersionPolicyResponse$
  ];
  exports2.GetPolicy$ = [
    9,
    n0,
    _GP,
    { [_h]: ["GET", "/2015-03-31/functions/{FunctionName}/policy", 200] },
    () => GetPolicyRequest$,
    () => GetPolicyResponse$
  ];
  exports2.GetProvisionedConcurrencyConfig$ = [
    9,
    n0,
    _GPCC,
    { [_h]: ["GET", "/2019-09-30/functions/{FunctionName}/provisioned-concurrency", 200] },
    () => GetProvisionedConcurrencyConfigRequest$,
    () => GetProvisionedConcurrencyConfigResponse$
  ];
  exports2.GetRuntimeManagementConfig$ = [
    9,
    n0,
    _GRMC,
    { [_h]: ["GET", "/2021-07-20/functions/{FunctionName}/runtime-management-config", 200] },
    () => GetRuntimeManagementConfigRequest$,
    () => GetRuntimeManagementConfigResponse$
  ];
  exports2.Invoke$ = [
    9,
    n0,
    _In,
    { [_h]: ["POST", "/2015-03-31/functions/{FunctionName}/invocations", 200] },
    () => InvocationRequest$,
    () => InvocationResponse$
  ];
  exports2.InvokeAsync$ = [
    9,
    n0,
    _IAn,
    { [_h]: ["POST", "/2014-11-13/functions/{FunctionName}/invoke-async", 202] },
    () => InvokeAsyncRequest$,
    () => InvokeAsyncResponse$
  ];
  exports2.InvokeWithResponseStream$ = [
    9,
    n0,
    _IWRS,
    { [_h]: ["POST", "/2021-11-15/functions/{FunctionName}/response-streaming-invocations", 200] },
    () => InvokeWithResponseStreamRequest$,
    () => InvokeWithResponseStreamResponse$
  ];
  exports2.ListAliases$ = [
    9,
    n0,
    _LAi,
    { [_h]: ["GET", "/2015-03-31/functions/{FunctionName}/aliases", 200] },
    () => ListAliasesRequest$,
    () => ListAliasesResponse$
  ];
  exports2.ListCapacityProviders$ = [
    9,
    n0,
    _LCP,
    { [_h]: ["GET", "/2025-11-30/capacity-providers", 200] },
    () => ListCapacityProvidersRequest$,
    () => ListCapacityProvidersResponse$
  ];
  exports2.ListCodeSigningConfigs$ = [
    9,
    n0,
    _LCSC,
    { [_h]: ["GET", "/2020-04-22/code-signing-configs", 200] },
    () => ListCodeSigningConfigsRequest$,
    () => ListCodeSigningConfigsResponse$
  ];
  exports2.ListDurableExecutionsByFunction$ = [
    9,
    n0,
    _LDEBF,
    { [_h]: ["GET", "/2025-12-01/functions/{FunctionName}/durable-executions", 200] },
    () => ListDurableExecutionsByFunctionRequest$,
    () => ListDurableExecutionsByFunctionResponse$
  ];
  exports2.ListEventSourceMappings$ = [
    9,
    n0,
    _LESM,
    { [_h]: ["GET", "/2015-03-31/event-source-mappings", 200] },
    () => ListEventSourceMappingsRequest$,
    () => ListEventSourceMappingsResponse$
  ];
  exports2.ListFunctionEventInvokeConfigs$ = [
    9,
    n0,
    _LFEIC,
    { [_h]: ["GET", "/2019-09-25/functions/{FunctionName}/event-invoke-config/list", 200] },
    () => ListFunctionEventInvokeConfigsRequest$,
    () => ListFunctionEventInvokeConfigsResponse$
  ];
  exports2.ListFunctions$ = [
    9,
    n0,
    _LFi,
    { [_h]: ["GET", "/2015-03-31/functions", 200] },
    () => ListFunctionsRequest$,
    () => ListFunctionsResponse$
  ];
  exports2.ListFunctionsByCodeSigningConfig$ = [
    9,
    n0,
    _LFBCSC,
    { [_h]: ["GET", "/2020-04-22/code-signing-configs/{CodeSigningConfigArn}/functions", 200] },
    () => ListFunctionsByCodeSigningConfigRequest$,
    () => ListFunctionsByCodeSigningConfigResponse$
  ];
  exports2.ListFunctionUrlConfigs$ = [
    9,
    n0,
    _LFUC,
    { [_h]: ["GET", "/2021-10-31/functions/{FunctionName}/urls", 200] },
    () => ListFunctionUrlConfigsRequest$,
    () => ListFunctionUrlConfigsResponse$
  ];
  exports2.ListFunctionVersionsByCapacityProvider$ = [
    9,
    n0,
    _LFVBCP,
    { [_h]: ["GET", "/2025-11-30/capacity-providers/{CapacityProviderName}/function-versions", 200] },
    () => ListFunctionVersionsByCapacityProviderRequest$,
    () => ListFunctionVersionsByCapacityProviderResponse$
  ];
  exports2.ListLayers$ = [
    9,
    n0,
    _LLi,
    { [_h]: ["GET", "/2018-10-31/layers", 200] },
    () => ListLayersRequest$,
    () => ListLayersResponse$
  ];
  exports2.ListLayerVersions$ = [
    9,
    n0,
    _LLV,
    { [_h]: ["GET", "/2018-10-31/layers/{LayerName}/versions", 200] },
    () => ListLayerVersionsRequest$,
    () => ListLayerVersionsResponse$
  ];
  exports2.ListProvisionedConcurrencyConfigs$ = [
    9,
    n0,
    _LPCC,
    { [_h]: ["GET", "/2019-09-30/functions/{FunctionName}/provisioned-concurrency?List=ALL", 200] },
    () => ListProvisionedConcurrencyConfigsRequest$,
    () => ListProvisionedConcurrencyConfigsResponse$
  ];
  exports2.ListTags$ = [
    9,
    n0,
    _LTi,
    { [_h]: ["GET", "/2017-03-31/tags/{Resource}", 200] },
    () => ListTagsRequest$,
    () => ListTagsResponse$
  ];
  exports2.ListVersionsByFunction$ = [
    9,
    n0,
    _LVBF,
    { [_h]: ["GET", "/2015-03-31/functions/{FunctionName}/versions", 200] },
    () => ListVersionsByFunctionRequest$,
    () => ListVersionsByFunctionResponse$
  ];
  exports2.PublishLayerVersion$ = [
    9,
    n0,
    _PLV,
    { [_h]: ["POST", "/2018-10-31/layers/{LayerName}/versions", 201] },
    () => PublishLayerVersionRequest$,
    () => PublishLayerVersionResponse$
  ];
  exports2.PublishVersion$ = [
    9,
    n0,
    _PV,
    { [_h]: ["POST", "/2015-03-31/functions/{FunctionName}/versions", 201] },
    () => PublishVersionRequest$,
    () => FunctionConfiguration$
  ];
  exports2.PutFunctionCodeSigningConfig$ = [
    9,
    n0,
    _PFCSC,
    { [_h]: ["PUT", "/2020-06-30/functions/{FunctionName}/code-signing-config", 200] },
    () => PutFunctionCodeSigningConfigRequest$,
    () => PutFunctionCodeSigningConfigResponse$
  ];
  exports2.PutFunctionConcurrency$ = [
    9,
    n0,
    _PFC,
    { [_h]: ["PUT", "/2017-10-31/functions/{FunctionName}/concurrency", 200] },
    () => PutFunctionConcurrencyRequest$,
    () => Concurrency$
  ];
  exports2.PutFunctionEventInvokeConfig$ = [
    9,
    n0,
    _PFEIC,
    { [_h]: ["PUT", "/2019-09-25/functions/{FunctionName}/event-invoke-config", 200] },
    () => PutFunctionEventInvokeConfigRequest$,
    () => FunctionEventInvokeConfig$
  ];
  exports2.PutFunctionRecursionConfig$ = [
    9,
    n0,
    _PFRC,
    { [_h]: ["PUT", "/2024-08-31/functions/{FunctionName}/recursion-config", 200] },
    () => PutFunctionRecursionConfigRequest$,
    () => PutFunctionRecursionConfigResponse$
  ];
  exports2.PutFunctionScalingConfig$ = [
    9,
    n0,
    _PFSC,
    { [_h]: ["PUT", "/2025-11-30/functions/{FunctionName}/function-scaling-config", 202] },
    () => PutFunctionScalingConfigRequest$,
    () => PutFunctionScalingConfigResponse$
  ];
  exports2.PutProvisionedConcurrencyConfig$ = [
    9,
    n0,
    _PPCC,
    { [_h]: ["PUT", "/2019-09-30/functions/{FunctionName}/provisioned-concurrency", 202] },
    () => PutProvisionedConcurrencyConfigRequest$,
    () => PutProvisionedConcurrencyConfigResponse$
  ];
  exports2.PutRuntimeManagementConfig$ = [
    9,
    n0,
    _PRMC,
    { [_h]: ["PUT", "/2021-07-20/functions/{FunctionName}/runtime-management-config", 200] },
    () => PutRuntimeManagementConfigRequest$,
    () => PutRuntimeManagementConfigResponse$
  ];
  exports2.RemoveLayerVersionPermission$ = [
    9,
    n0,
    _RLVP,
    { [_h]: ["DELETE", "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}", 204] },
    () => RemoveLayerVersionPermissionRequest$,
    () => __Unit
  ];
  exports2.RemovePermission$ = [
    9,
    n0,
    _RP,
    { [_h]: ["DELETE", "/2015-03-31/functions/{FunctionName}/policy/{StatementId}", 204] },
    () => RemovePermissionRequest$,
    () => __Unit
  ];
  exports2.SendDurableExecutionCallbackFailure$ = [
    9,
    n0,
    _SDECF,
    { [_h]: ["POST", "/2025-12-01/durable-execution-callbacks/{CallbackId}/fail", 200] },
    () => SendDurableExecutionCallbackFailureRequest$,
    () => SendDurableExecutionCallbackFailureResponse$
  ];
  exports2.SendDurableExecutionCallbackHeartbeat$ = [
    9,
    n0,
    _SDECH,
    { [_h]: ["POST", "/2025-12-01/durable-execution-callbacks/{CallbackId}/heartbeat", 200] },
    () => SendDurableExecutionCallbackHeartbeatRequest$,
    () => SendDurableExecutionCallbackHeartbeatResponse$
  ];
  exports2.SendDurableExecutionCallbackSuccess$ = [
    9,
    n0,
    _SDECS,
    { [_h]: ["POST", "/2025-12-01/durable-execution-callbacks/{CallbackId}/succeed", 200] },
    () => SendDurableExecutionCallbackSuccessRequest$,
    () => SendDurableExecutionCallbackSuccessResponse$
  ];
  exports2.StopDurableExecution$ = [
    9,
    n0,
    _SDE,
    { [_h]: ["POST", "/2025-12-01/durable-executions/{DurableExecutionArn}/stop", 200] },
    () => StopDurableExecutionRequest$,
    () => StopDurableExecutionResponse$
  ];
  exports2.TagResource$ = [
    9,
    n0,
    _TR,
    { [_h]: ["POST", "/2017-03-31/tags/{Resource}", 204] },
    () => TagResourceRequest$,
    () => __Unit
  ];
  exports2.UntagResource$ = [
    9,
    n0,
    _UR,
    { [_h]: ["DELETE", "/2017-03-31/tags/{Resource}", 204] },
    () => UntagResourceRequest$,
    () => __Unit
  ];
  exports2.UpdateAlias$ = [
    9,
    n0,
    _UA,
    { [_h]: ["PUT", "/2015-03-31/functions/{FunctionName}/aliases/{Name}", 200] },
    () => UpdateAliasRequest$,
    () => AliasConfiguration$
  ];
  exports2.UpdateCapacityProvider$ = [
    9,
    n0,
    _UCP,
    { [_h]: ["PUT", "/2025-11-30/capacity-providers/{CapacityProviderName}", 202] },
    () => UpdateCapacityProviderRequest$,
    () => UpdateCapacityProviderResponse$
  ];
  exports2.UpdateCodeSigningConfig$ = [
    9,
    n0,
    _UCSC,
    { [_h]: ["PUT", "/2020-04-22/code-signing-configs/{CodeSigningConfigArn}", 200] },
    () => UpdateCodeSigningConfigRequest$,
    () => UpdateCodeSigningConfigResponse$
  ];
  exports2.UpdateEventSourceMapping$ = [
    9,
    n0,
    _UESM,
    { [_h]: ["PUT", "/2015-03-31/event-source-mappings/{UUID}", 202] },
    () => UpdateEventSourceMappingRequest$,
    () => EventSourceMappingConfiguration$
  ];
  exports2.UpdateFunctionCode$ = [
    9,
    n0,
    _UFC,
    { [_h]: ["PUT", "/2015-03-31/functions/{FunctionName}/code", 200] },
    () => UpdateFunctionCodeRequest$,
    () => FunctionConfiguration$
  ];
  exports2.UpdateFunctionConfiguration$ = [
    9,
    n0,
    _UFCp,
    { [_h]: ["PUT", "/2015-03-31/functions/{FunctionName}/configuration", 200] },
    () => UpdateFunctionConfigurationRequest$,
    () => FunctionConfiguration$
  ];
  exports2.UpdateFunctionEventInvokeConfig$ = [
    9,
    n0,
    _UFEIC,
    { [_h]: ["POST", "/2019-09-25/functions/{FunctionName}/event-invoke-config", 200] },
    () => UpdateFunctionEventInvokeConfigRequest$,
    () => FunctionEventInvokeConfig$
  ];
  exports2.UpdateFunctionUrlConfig$ = [
    9,
    n0,
    _UFUC,
    { [_h]: ["PUT", "/2021-10-31/functions/{FunctionName}/url", 200] },
    () => UpdateFunctionUrlConfigRequest$,
    () => UpdateFunctionUrlConfigResponse$
  ];
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/runtimeConfig.shared.js
var require_runtimeConfig_shared9 = __commonJS((exports2) => {
  var { AwsSdkSigV4Signer } = require_httpAuthSchemes();
  var { AwsRestJsonProtocol } = require_protocols2();
  var { NoOpLogger } = require_client3();
  var { parseUrl: parseUrl2 } = require_protocols();
  var { fromBase64, fromUtf8, toBase64, toUtf8 } = require_serde();
  var { defaultLambdaHttpAuthSchemeProvider } = require_httpAuthSchemeProvider9();
  var { defaultEndpointResolver } = require_endpointResolver9();
  var { errorTypeRegistries } = require_schemas_09();
  exports2.getRuntimeConfig = (config2) => {
    return {
      apiVersion: "2015-03-31",
      base64Decoder: config2?.base64Decoder ?? fromBase64,
      base64Encoder: config2?.base64Encoder ?? toBase64,
      disableHostPrefix: config2?.disableHostPrefix ?? false,
      endpointProvider: config2?.endpointProvider ?? defaultEndpointResolver,
      extensions: config2?.extensions ?? [],
      httpAuthSchemeProvider: config2?.httpAuthSchemeProvider ?? defaultLambdaHttpAuthSchemeProvider,
      httpAuthSchemes: config2?.httpAuthSchemes ?? [
        {
          schemeId: "aws.auth#sigv4",
          identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
          signer: new AwsSdkSigV4Signer
        }
      ],
      logger: config2?.logger ?? new NoOpLogger,
      protocol: config2?.protocol ?? AwsRestJsonProtocol,
      protocolSettings: config2?.protocolSettings ?? {
        defaultNamespace: "com.amazonaws.lambda",
        errorTypeRegistries,
        version: "2015-03-31",
        serviceTarget: "AWSGirApiService"
      },
      serviceId: config2?.serviceId ?? "Lambda",
      urlParser: config2?.urlParser ?? parseUrl2,
      utf8Decoder: config2?.utf8Decoder ?? fromUtf8,
      utf8Encoder: config2?.utf8Encoder ?? toUtf8
    };
  };
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/runtimeConfig.js
var require_runtimeConfig9 = __commonJS((exports2) => {
  var packageInfo = require_package10();
  var { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require_client4();
  var { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes();
  var { defaultProvider: credentialDefaultProvider } = require_dist_cjs19();
  var { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require_client3();
  var { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require_config2();
  var { eventStreamSerdeProvider } = require_event_streams();
  var { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require_retry();
  var { calculateBodyLength, Hash: Hash3 } = require_serde();
  var { NodeHttpHandler: RequestHandler, streamCollector } = require_dist_cjs9();
  var { getRuntimeConfig: getSharedRuntimeConfig } = require_runtimeConfig_shared9();
  var getRuntimeConfig = (config2) => {
    emitWarningIfUnsupportedVersion(process.version);
    const defaultsMode = resolveDefaultsModeConfig(config2);
    const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
    const clientSharedValues = getSharedRuntimeConfig(config2);
    awsCheckVersion(process.version);
    const loaderConfig = {
      profile: config2?.profile,
      logger: clientSharedValues.logger
    };
    return {
      ...clientSharedValues,
      ...config2,
      runtime: "node",
      defaultsMode,
      authSchemePreference: config2?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
      bodyLengthChecker: config2?.bodyLengthChecker ?? calculateBodyLength,
      credentialDefaultProvider: config2?.credentialDefaultProvider ?? credentialDefaultProvider,
      defaultUserAgentProvider: config2?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
      eventStreamSerdeProvider: config2?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
      maxAttempts: config2?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config2),
      region: config2?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
      requestHandler: RequestHandler.create(config2?.requestHandler ?? defaultConfigProvider),
      retryMode: config2?.retryMode ?? loadNodeConfig({
        ...NODE_RETRY_MODE_CONFIG_OPTIONS,
        default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
      }, config2),
      sha256: config2?.sha256 ?? Hash3.bind(null, "sha256"),
      streamCollector: config2?.streamCollector ?? streamCollector,
      useDualstackEndpoint: config2?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      useFipsEndpoint: config2?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
      userAgentAppId: config2?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
    };
  };
  exports2.getRuntimeConfig = getRuntimeConfig;
});

// ../../node_modules/.pnpm/@aws-sdk+client-lambda@3.1074.0/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js
var require_dist_cjs67 = __commonJS((exports2) => {
  var __exportStar = (m3, e3) => {
    Object.assign(e3, m3);
  };
  var { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client4();
  var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs5();
  var { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client: Client5, Command, createWaiter, checkExceptions, WaiterState, createAggregatedClient } = require_client3();
  exports2.$Command = Command;
  exports2.__Client = Client5;
  var { resolveRegionConfig } = require_config2();
  var { resolveEndpointConfig, getEndpointPlugin } = require_endpoints();
  var { resolveEventStreamSerdeConfig } = require_event_streams();
  var { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols();
  var { resolveRetryConfig, getRetryPlugin } = require_retry();
  var { getSchemaSerdePlugin } = require_schema();
  var { resolveHttpAuthSchemeConfig, defaultLambdaHttpAuthSchemeParametersProvider } = require_httpAuthSchemeProvider9();
  var { getRuntimeConfig } = require_runtimeConfig9();
  var { AddLayerVersionPermission$, AddPermission$, CheckpointDurableExecution$, CreateAlias$, CreateCapacityProvider$, CreateCodeSigningConfig$, CreateEventSourceMapping$, CreateFunction$, CreateFunctionUrlConfig$, DeleteAlias$, DeleteCapacityProvider$, DeleteCodeSigningConfig$, DeleteEventSourceMapping$, DeleteFunctionCodeSigningConfig$, DeleteFunction$, DeleteFunctionConcurrency$, DeleteFunctionEventInvokeConfig$, DeleteFunctionUrlConfig$, DeleteLayerVersion$, DeleteProvisionedConcurrencyConfig$, GetAccountSettings$, GetAlias$, GetCapacityProvider$, GetCodeSigningConfig$, GetDurableExecution$, GetDurableExecutionHistory$, GetDurableExecutionState$, GetEventSourceMapping$, GetFunctionCodeSigningConfig$, GetFunction$, GetFunctionConcurrency$, GetFunctionConfiguration$, GetFunctionEventInvokeConfig$, GetFunctionRecursionConfig$, GetFunctionScalingConfig$, GetFunctionUrlConfig$, GetLayerVersionByArn$, GetLayerVersion$, GetLayerVersionPolicy$, GetPolicy$, GetProvisionedConcurrencyConfig$, GetRuntimeManagementConfig$, InvokeAsync$, Invoke$, InvokeWithResponseStream$, ListAliases$, ListCapacityProviders$, ListCodeSigningConfigs$, ListDurableExecutionsByFunction$, ListEventSourceMappings$, ListFunctionEventInvokeConfigs$, ListFunctionsByCodeSigningConfig$, ListFunctions$, ListFunctionUrlConfigs$, ListFunctionVersionsByCapacityProvider$, ListLayers$, ListLayerVersions$, ListProvisionedConcurrencyConfigs$, ListTags$, ListVersionsByFunction$, PublishLayerVersion$, PublishVersion$, PutFunctionCodeSigningConfig$, PutFunctionConcurrency$, PutFunctionEventInvokeConfig$, PutFunctionRecursionConfig$, PutFunctionScalingConfig$, PutProvisionedConcurrencyConfig$, PutRuntimeManagementConfig$, RemoveLayerVersionPermission$, RemovePermission$, SendDurableExecutionCallbackFailure$, SendDurableExecutionCallbackHeartbeat$, SendDurableExecutionCallbackSuccess$, StopDurableExecution$, TagResource$, UntagResource$, UpdateAlias$, UpdateCapacityProvider$, UpdateCodeSigningConfig$, UpdateEventSourceMapping$, UpdateFunctionCode$, UpdateFunctionConfiguration$, UpdateFunctionEventInvokeConfig$, UpdateFunctionUrlConfig$ } = require_schemas_09();
  __exportStar(require_schemas_09(), exports2);
  __exportStar(require_errors10(), exports2);
  var { LambdaServiceException } = require_LambdaServiceException();
  exports2.LambdaServiceException = LambdaServiceException;
  var resolveClientEndpointParameters = (options2) => {
    return Object.assign(options2, {
      useDualstackEndpoint: options2.useDualstackEndpoint ?? false,
      useFipsEndpoint: options2.useFipsEndpoint ?? false,
      defaultSigningName: "lambda"
    });
  };
  var commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
  };
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
      setHttpAuthScheme(httpAuthScheme) {
        const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
        if (index2 === -1) {
          _httpAuthSchemes.push(httpAuthScheme);
        } else {
          _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
        }
      },
      httpAuthSchemes() {
        return _httpAuthSchemes;
      },
      setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
        _httpAuthSchemeProvider = httpAuthSchemeProvider;
      },
      httpAuthSchemeProvider() {
        return _httpAuthSchemeProvider;
      },
      setCredentials(credentials) {
        _credentials = credentials;
      },
      credentials() {
        return _credentials;
      }
    };
  };
  var resolveHttpAuthRuntimeConfig = (config2) => {
    return {
      httpAuthSchemes: config2.httpAuthSchemes(),
      httpAuthSchemeProvider: config2.httpAuthSchemeProvider(),
      credentials: config2.credentials()
    };
  };
  var resolveRuntimeExtensions = (runtimeConfig, extensions2) => {
    const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions2.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
  };

  class LambdaClient extends Client5 {
    config;
    constructor(...[configuration]) {
      const _config_0 = getRuntimeConfig(configuration || {});
      super(_config_0);
      this.initConfig = _config_0;
      const _config_1 = resolveClientEndpointParameters(_config_0);
      const _config_2 = resolveUserAgentConfig(_config_1);
      const _config_3 = resolveRetryConfig(_config_2);
      const _config_4 = resolveRegionConfig(_config_3);
      const _config_5 = resolveHostHeaderConfig(_config_4);
      const _config_6 = resolveEndpointConfig(_config_5);
      const _config_7 = resolveEventStreamSerdeConfig(_config_6);
      const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
      const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
      this.config = _config_9;
      this.middlewareStack.use(getSchemaSerdePlugin(this.config));
      this.middlewareStack.use(getUserAgentPlugin(this.config));
      this.middlewareStack.use(getRetryPlugin(this.config));
      this.middlewareStack.use(getContentLengthPlugin(this.config));
      this.middlewareStack.use(getHostHeaderPlugin(this.config));
      this.middlewareStack.use(getLoggerPlugin(this.config));
      this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
      this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
        httpAuthSchemeParametersProvider: defaultLambdaHttpAuthSchemeParametersProvider,
        identityProviderConfigProvider: async (config2) => new DefaultIdentityProviderConfig({
          "aws.auth#sigv4": config2.credentials
        })
      }));
      this.middlewareStack.use(getHttpSigningPlugin(this.config));
    }
    destroy() {
      super.destroy();
    }
  }

  class AddLayerVersionPermissionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "AddLayerVersionPermission", {}).n("LambdaClient", "AddLayerVersionPermissionCommand").sc(AddLayerVersionPermission$).build() {
  }

  class AddPermissionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "AddPermission", {}).n("LambdaClient", "AddPermissionCommand").sc(AddPermission$).build() {
  }

  class CheckpointDurableExecutionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "CheckpointDurableExecution", {}).n("LambdaClient", "CheckpointDurableExecutionCommand").sc(CheckpointDurableExecution$).build() {
  }

  class CreateAliasCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "CreateAlias", {}).n("LambdaClient", "CreateAliasCommand").sc(CreateAlias$).build() {
  }

  class CreateCapacityProviderCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "CreateCapacityProvider", {}).n("LambdaClient", "CreateCapacityProviderCommand").sc(CreateCapacityProvider$).build() {
  }

  class CreateCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "CreateCodeSigningConfig", {}).n("LambdaClient", "CreateCodeSigningConfigCommand").sc(CreateCodeSigningConfig$).build() {
  }

  class CreateEventSourceMappingCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "CreateEventSourceMapping", {}).n("LambdaClient", "CreateEventSourceMappingCommand").sc(CreateEventSourceMapping$).build() {
  }

  class CreateFunctionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "CreateFunction", {}).n("LambdaClient", "CreateFunctionCommand").sc(CreateFunction$).build() {
  }

  class CreateFunctionUrlConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "CreateFunctionUrlConfig", {}).n("LambdaClient", "CreateFunctionUrlConfigCommand").sc(CreateFunctionUrlConfig$).build() {
  }

  class DeleteAliasCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteAlias", {}).n("LambdaClient", "DeleteAliasCommand").sc(DeleteAlias$).build() {
  }

  class DeleteCapacityProviderCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteCapacityProvider", {}).n("LambdaClient", "DeleteCapacityProviderCommand").sc(DeleteCapacityProvider$).build() {
  }

  class DeleteCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteCodeSigningConfig", {}).n("LambdaClient", "DeleteCodeSigningConfigCommand").sc(DeleteCodeSigningConfig$).build() {
  }

  class DeleteEventSourceMappingCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteEventSourceMapping", {}).n("LambdaClient", "DeleteEventSourceMappingCommand").sc(DeleteEventSourceMapping$).build() {
  }

  class DeleteFunctionCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteFunctionCodeSigningConfig", {}).n("LambdaClient", "DeleteFunctionCodeSigningConfigCommand").sc(DeleteFunctionCodeSigningConfig$).build() {
  }

  class DeleteFunctionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteFunction", {}).n("LambdaClient", "DeleteFunctionCommand").sc(DeleteFunction$).build() {
  }

  class DeleteFunctionConcurrencyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteFunctionConcurrency", {}).n("LambdaClient", "DeleteFunctionConcurrencyCommand").sc(DeleteFunctionConcurrency$).build() {
  }

  class DeleteFunctionEventInvokeConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteFunctionEventInvokeConfig", {}).n("LambdaClient", "DeleteFunctionEventInvokeConfigCommand").sc(DeleteFunctionEventInvokeConfig$).build() {
  }

  class DeleteFunctionUrlConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteFunctionUrlConfig", {}).n("LambdaClient", "DeleteFunctionUrlConfigCommand").sc(DeleteFunctionUrlConfig$).build() {
  }

  class DeleteLayerVersionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteLayerVersion", {}).n("LambdaClient", "DeleteLayerVersionCommand").sc(DeleteLayerVersion$).build() {
  }

  class DeleteProvisionedConcurrencyConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "DeleteProvisionedConcurrencyConfig", {}).n("LambdaClient", "DeleteProvisionedConcurrencyConfigCommand").sc(DeleteProvisionedConcurrencyConfig$).build() {
  }

  class GetAccountSettingsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetAccountSettings", {}).n("LambdaClient", "GetAccountSettingsCommand").sc(GetAccountSettings$).build() {
  }

  class GetAliasCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetAlias", {}).n("LambdaClient", "GetAliasCommand").sc(GetAlias$).build() {
  }

  class GetCapacityProviderCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetCapacityProvider", {}).n("LambdaClient", "GetCapacityProviderCommand").sc(GetCapacityProvider$).build() {
  }

  class GetCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetCodeSigningConfig", {}).n("LambdaClient", "GetCodeSigningConfigCommand").sc(GetCodeSigningConfig$).build() {
  }

  class GetDurableExecutionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetDurableExecution", {}).n("LambdaClient", "GetDurableExecutionCommand").sc(GetDurableExecution$).build() {
  }

  class GetDurableExecutionHistoryCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetDurableExecutionHistory", {}).n("LambdaClient", "GetDurableExecutionHistoryCommand").sc(GetDurableExecutionHistory$).build() {
  }

  class GetDurableExecutionStateCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetDurableExecutionState", {}).n("LambdaClient", "GetDurableExecutionStateCommand").sc(GetDurableExecutionState$).build() {
  }

  class GetEventSourceMappingCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetEventSourceMapping", {}).n("LambdaClient", "GetEventSourceMappingCommand").sc(GetEventSourceMapping$).build() {
  }

  class GetFunctionCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunctionCodeSigningConfig", {}).n("LambdaClient", "GetFunctionCodeSigningConfigCommand").sc(GetFunctionCodeSigningConfig$).build() {
  }

  class GetFunctionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunction", {}).n("LambdaClient", "GetFunctionCommand").sc(GetFunction$).build() {
  }

  class GetFunctionConcurrencyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunctionConcurrency", {}).n("LambdaClient", "GetFunctionConcurrencyCommand").sc(GetFunctionConcurrency$).build() {
  }

  class GetFunctionConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunctionConfiguration", {}).n("LambdaClient", "GetFunctionConfigurationCommand").sc(GetFunctionConfiguration$).build() {
  }

  class GetFunctionEventInvokeConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunctionEventInvokeConfig", {}).n("LambdaClient", "GetFunctionEventInvokeConfigCommand").sc(GetFunctionEventInvokeConfig$).build() {
  }

  class GetFunctionRecursionConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunctionRecursionConfig", {}).n("LambdaClient", "GetFunctionRecursionConfigCommand").sc(GetFunctionRecursionConfig$).build() {
  }

  class GetFunctionScalingConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunctionScalingConfig", {}).n("LambdaClient", "GetFunctionScalingConfigCommand").sc(GetFunctionScalingConfig$).build() {
  }

  class GetFunctionUrlConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetFunctionUrlConfig", {}).n("LambdaClient", "GetFunctionUrlConfigCommand").sc(GetFunctionUrlConfig$).build() {
  }

  class GetLayerVersionByArnCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetLayerVersionByArn", {}).n("LambdaClient", "GetLayerVersionByArnCommand").sc(GetLayerVersionByArn$).build() {
  }

  class GetLayerVersionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetLayerVersion", {}).n("LambdaClient", "GetLayerVersionCommand").sc(GetLayerVersion$).build() {
  }

  class GetLayerVersionPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetLayerVersionPolicy", {}).n("LambdaClient", "GetLayerVersionPolicyCommand").sc(GetLayerVersionPolicy$).build() {
  }

  class GetPolicyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetPolicy", {}).n("LambdaClient", "GetPolicyCommand").sc(GetPolicy$).build() {
  }

  class GetProvisionedConcurrencyConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetProvisionedConcurrencyConfig", {}).n("LambdaClient", "GetProvisionedConcurrencyConfigCommand").sc(GetProvisionedConcurrencyConfig$).build() {
  }

  class GetRuntimeManagementConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "GetRuntimeManagementConfig", {}).n("LambdaClient", "GetRuntimeManagementConfigCommand").sc(GetRuntimeManagementConfig$).build() {
  }

  class InvokeAsyncCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "InvokeAsync", {}).n("LambdaClient", "InvokeAsyncCommand").sc(InvokeAsync$).build() {
  }

  class InvokeCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "Invoke", {}).n("LambdaClient", "InvokeCommand").sc(Invoke$).build() {
  }

  class InvokeWithResponseStreamCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "InvokeWithResponseStream", {
    eventStream: {
      output: true
    }
  }).n("LambdaClient", "InvokeWithResponseStreamCommand").sc(InvokeWithResponseStream$).build() {
  }

  class ListAliasesCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListAliases", {}).n("LambdaClient", "ListAliasesCommand").sc(ListAliases$).build() {
  }

  class ListCapacityProvidersCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListCapacityProviders", {}).n("LambdaClient", "ListCapacityProvidersCommand").sc(ListCapacityProviders$).build() {
  }

  class ListCodeSigningConfigsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListCodeSigningConfigs", {}).n("LambdaClient", "ListCodeSigningConfigsCommand").sc(ListCodeSigningConfigs$).build() {
  }

  class ListDurableExecutionsByFunctionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListDurableExecutionsByFunction", {}).n("LambdaClient", "ListDurableExecutionsByFunctionCommand").sc(ListDurableExecutionsByFunction$).build() {
  }

  class ListEventSourceMappingsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListEventSourceMappings", {}).n("LambdaClient", "ListEventSourceMappingsCommand").sc(ListEventSourceMappings$).build() {
  }

  class ListFunctionEventInvokeConfigsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListFunctionEventInvokeConfigs", {}).n("LambdaClient", "ListFunctionEventInvokeConfigsCommand").sc(ListFunctionEventInvokeConfigs$).build() {
  }

  class ListFunctionsByCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListFunctionsByCodeSigningConfig", {}).n("LambdaClient", "ListFunctionsByCodeSigningConfigCommand").sc(ListFunctionsByCodeSigningConfig$).build() {
  }

  class ListFunctionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListFunctions", {}).n("LambdaClient", "ListFunctionsCommand").sc(ListFunctions$).build() {
  }

  class ListFunctionUrlConfigsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListFunctionUrlConfigs", {}).n("LambdaClient", "ListFunctionUrlConfigsCommand").sc(ListFunctionUrlConfigs$).build() {
  }

  class ListFunctionVersionsByCapacityProviderCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListFunctionVersionsByCapacityProvider", {}).n("LambdaClient", "ListFunctionVersionsByCapacityProviderCommand").sc(ListFunctionVersionsByCapacityProvider$).build() {
  }

  class ListLayersCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListLayers", {}).n("LambdaClient", "ListLayersCommand").sc(ListLayers$).build() {
  }

  class ListLayerVersionsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListLayerVersions", {}).n("LambdaClient", "ListLayerVersionsCommand").sc(ListLayerVersions$).build() {
  }

  class ListProvisionedConcurrencyConfigsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListProvisionedConcurrencyConfigs", {}).n("LambdaClient", "ListProvisionedConcurrencyConfigsCommand").sc(ListProvisionedConcurrencyConfigs$).build() {
  }

  class ListTagsCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListTags", {}).n("LambdaClient", "ListTagsCommand").sc(ListTags$).build() {
  }

  class ListVersionsByFunctionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "ListVersionsByFunction", {}).n("LambdaClient", "ListVersionsByFunctionCommand").sc(ListVersionsByFunction$).build() {
  }

  class PublishLayerVersionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PublishLayerVersion", {}).n("LambdaClient", "PublishLayerVersionCommand").sc(PublishLayerVersion$).build() {
  }

  class PublishVersionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PublishVersion", {}).n("LambdaClient", "PublishVersionCommand").sc(PublishVersion$).build() {
  }

  class PutFunctionCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PutFunctionCodeSigningConfig", {}).n("LambdaClient", "PutFunctionCodeSigningConfigCommand").sc(PutFunctionCodeSigningConfig$).build() {
  }

  class PutFunctionConcurrencyCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PutFunctionConcurrency", {}).n("LambdaClient", "PutFunctionConcurrencyCommand").sc(PutFunctionConcurrency$).build() {
  }

  class PutFunctionEventInvokeConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PutFunctionEventInvokeConfig", {}).n("LambdaClient", "PutFunctionEventInvokeConfigCommand").sc(PutFunctionEventInvokeConfig$).build() {
  }

  class PutFunctionRecursionConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PutFunctionRecursionConfig", {}).n("LambdaClient", "PutFunctionRecursionConfigCommand").sc(PutFunctionRecursionConfig$).build() {
  }

  class PutFunctionScalingConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PutFunctionScalingConfig", {}).n("LambdaClient", "PutFunctionScalingConfigCommand").sc(PutFunctionScalingConfig$).build() {
  }

  class PutProvisionedConcurrencyConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PutProvisionedConcurrencyConfig", {}).n("LambdaClient", "PutProvisionedConcurrencyConfigCommand").sc(PutProvisionedConcurrencyConfig$).build() {
  }

  class PutRuntimeManagementConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "PutRuntimeManagementConfig", {}).n("LambdaClient", "PutRuntimeManagementConfigCommand").sc(PutRuntimeManagementConfig$).build() {
  }

  class RemoveLayerVersionPermissionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "RemoveLayerVersionPermission", {}).n("LambdaClient", "RemoveLayerVersionPermissionCommand").sc(RemoveLayerVersionPermission$).build() {
  }

  class RemovePermissionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "RemovePermission", {}).n("LambdaClient", "RemovePermissionCommand").sc(RemovePermission$).build() {
  }

  class SendDurableExecutionCallbackFailureCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "SendDurableExecutionCallbackFailure", {}).n("LambdaClient", "SendDurableExecutionCallbackFailureCommand").sc(SendDurableExecutionCallbackFailure$).build() {
  }

  class SendDurableExecutionCallbackHeartbeatCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "SendDurableExecutionCallbackHeartbeat", {}).n("LambdaClient", "SendDurableExecutionCallbackHeartbeatCommand").sc(SendDurableExecutionCallbackHeartbeat$).build() {
  }

  class SendDurableExecutionCallbackSuccessCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "SendDurableExecutionCallbackSuccess", {}).n("LambdaClient", "SendDurableExecutionCallbackSuccessCommand").sc(SendDurableExecutionCallbackSuccess$).build() {
  }

  class StopDurableExecutionCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "StopDurableExecution", {}).n("LambdaClient", "StopDurableExecutionCommand").sc(StopDurableExecution$).build() {
  }

  class TagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "TagResource", {}).n("LambdaClient", "TagResourceCommand").sc(TagResource$).build() {
  }

  class UntagResourceCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UntagResource", {}).n("LambdaClient", "UntagResourceCommand").sc(UntagResource$).build() {
  }

  class UpdateAliasCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateAlias", {}).n("LambdaClient", "UpdateAliasCommand").sc(UpdateAlias$).build() {
  }

  class UpdateCapacityProviderCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateCapacityProvider", {}).n("LambdaClient", "UpdateCapacityProviderCommand").sc(UpdateCapacityProvider$).build() {
  }

  class UpdateCodeSigningConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateCodeSigningConfig", {}).n("LambdaClient", "UpdateCodeSigningConfigCommand").sc(UpdateCodeSigningConfig$).build() {
  }

  class UpdateEventSourceMappingCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateEventSourceMapping", {}).n("LambdaClient", "UpdateEventSourceMappingCommand").sc(UpdateEventSourceMapping$).build() {
  }

  class UpdateFunctionCodeCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateFunctionCode", {}).n("LambdaClient", "UpdateFunctionCodeCommand").sc(UpdateFunctionCode$).build() {
  }

  class UpdateFunctionConfigurationCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateFunctionConfiguration", {}).n("LambdaClient", "UpdateFunctionConfigurationCommand").sc(UpdateFunctionConfiguration$).build() {
  }

  class UpdateFunctionEventInvokeConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateFunctionEventInvokeConfig", {}).n("LambdaClient", "UpdateFunctionEventInvokeConfigCommand").sc(UpdateFunctionEventInvokeConfig$).build() {
  }

  class UpdateFunctionUrlConfigCommand extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config2, o3) {
    return [getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())];
  }).s("AWSGirApiService", "UpdateFunctionUrlConfig", {}).n("LambdaClient", "UpdateFunctionUrlConfigCommand").sc(UpdateFunctionUrlConfig$).build() {
  }
  var paginateGetDurableExecutionHistory = createPaginator(LambdaClient, GetDurableExecutionHistoryCommand, "Marker", "NextMarker", "MaxItems");
  var paginateGetDurableExecutionState = createPaginator(LambdaClient, GetDurableExecutionStateCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListAliases = createPaginator(LambdaClient, ListAliasesCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListCapacityProviders = createPaginator(LambdaClient, ListCapacityProvidersCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListCodeSigningConfigs = createPaginator(LambdaClient, ListCodeSigningConfigsCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListDurableExecutionsByFunction = createPaginator(LambdaClient, ListDurableExecutionsByFunctionCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListEventSourceMappings = createPaginator(LambdaClient, ListEventSourceMappingsCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListFunctionEventInvokeConfigs = createPaginator(LambdaClient, ListFunctionEventInvokeConfigsCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListFunctionsByCodeSigningConfig = createPaginator(LambdaClient, ListFunctionsByCodeSigningConfigCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListFunctions = createPaginator(LambdaClient, ListFunctionsCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListFunctionUrlConfigs = createPaginator(LambdaClient, ListFunctionUrlConfigsCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListFunctionVersionsByCapacityProvider = createPaginator(LambdaClient, ListFunctionVersionsByCapacityProviderCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListLayers = createPaginator(LambdaClient, ListLayersCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListLayerVersions = createPaginator(LambdaClient, ListLayerVersionsCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListProvisionedConcurrencyConfigs = createPaginator(LambdaClient, ListProvisionedConcurrencyConfigsCommand, "Marker", "NextMarker", "MaxItems");
  var paginateListVersionsByFunction = createPaginator(LambdaClient, ListVersionsByFunctionCommand, "Marker", "NextMarker", "MaxItems");
  var checkState$5 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new GetFunctionConfigurationCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.State;
        };
        if (returnComparator() === "Active") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.State;
        };
        if (returnComparator() === "Failed") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.State;
        };
        if (returnComparator() === "Pending") {
          return { state: WaiterState.RETRY, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForFunctionActive = async (params, input) => {
    const serviceDefaults = { minDelay: 5, maxDelay: 300 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$5);
  };
  var waitUntilFunctionActive = async (params, input) => {
    const serviceDefaults = { minDelay: 5, maxDelay: 300 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$5);
    return checkExceptions(result);
  };
  var checkState$4 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new GetFunctionCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.Configuration.State;
        };
        if (returnComparator() === "Active") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.Configuration.State;
        };
        if (returnComparator() === "Failed") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.Configuration.State;
        };
        if (returnComparator() === "Pending") {
          return { state: WaiterState.RETRY, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForFunctionActiveV2 = async (params, input) => {
    const serviceDefaults = { minDelay: 1, maxDelay: 300 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$4);
  };
  var waitUntilFunctionActiveV2 = async (params, input) => {
    const serviceDefaults = { minDelay: 1, maxDelay: 300 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$4);
    return checkExceptions(result);
  };
  var checkState$3 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new GetFunctionCommand(input));
      reason = result;
      return { state: WaiterState.SUCCESS, reason };
    } catch (exception) {
      reason = exception;
      if (exception.name === "ResourceNotFoundException") {
        return { state: WaiterState.RETRY, reason };
      }
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForFunctionExists = async (params, input) => {
    const serviceDefaults = { minDelay: 1, maxDelay: 20 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);
  };
  var waitUntilFunctionExists = async (params, input) => {
    const serviceDefaults = { minDelay: 1, maxDelay: 20 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);
    return checkExceptions(result);
  };
  var checkState$2 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new GetFunctionConfigurationCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.LastUpdateStatus;
        };
        if (returnComparator() === "Successful") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.LastUpdateStatus;
        };
        if (returnComparator() === "Failed") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.LastUpdateStatus;
        };
        if (returnComparator() === "InProgress") {
          return { state: WaiterState.RETRY, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForFunctionUpdated = async (params, input) => {
    const serviceDefaults = { minDelay: 5, maxDelay: 300 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
  };
  var waitUntilFunctionUpdated = async (params, input) => {
    const serviceDefaults = { minDelay: 5, maxDelay: 300 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
    return checkExceptions(result);
  };
  var checkState$1 = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new GetFunctionCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.Configuration.LastUpdateStatus;
        };
        if (returnComparator() === "Successful") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.Configuration.LastUpdateStatus;
        };
        if (returnComparator() === "Failed") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.Configuration.LastUpdateStatus;
        };
        if (returnComparator() === "InProgress") {
          return { state: WaiterState.RETRY, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForFunctionUpdatedV2 = async (params, input) => {
    const serviceDefaults = { minDelay: 1, maxDelay: 300 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
  };
  var waitUntilFunctionUpdatedV2 = async (params, input) => {
    const serviceDefaults = { minDelay: 1, maxDelay: 300 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
    return checkExceptions(result);
  };
  var checkState = async (client, input) => {
    let reason;
    try {
      let result = await client.send(new GetFunctionConfigurationCommand(input));
      reason = result;
      try {
        const returnComparator = () => {
          return result.State;
        };
        if (returnComparator() === "Active") {
          return { state: WaiterState.SUCCESS, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.State;
        };
        if (returnComparator() === "Failed") {
          return { state: WaiterState.FAILURE, reason };
        }
      } catch (e3) {}
      try {
        const returnComparator = () => {
          return result.State;
        };
        if (returnComparator() === "Pending") {
          return { state: WaiterState.RETRY, reason };
        }
      } catch (e3) {}
    } catch (exception) {
      reason = exception;
    }
    return { state: WaiterState.RETRY, reason };
  };
  var waitForPublishedVersionActive = async (params, input) => {
    const serviceDefaults = { minDelay: 5, maxDelay: 1560 };
    return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
  };
  var waitUntilPublishedVersionActive = async (params, input) => {
    const serviceDefaults = { minDelay: 5, maxDelay: 1560 };
    const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
    return checkExceptions(result);
  };
  var commands = {
    AddLayerVersionPermissionCommand,
    AddPermissionCommand,
    CheckpointDurableExecutionCommand,
    CreateAliasCommand,
    CreateCapacityProviderCommand,
    CreateCodeSigningConfigCommand,
    CreateEventSourceMappingCommand,
    CreateFunctionCommand,
    CreateFunctionUrlConfigCommand,
    DeleteAliasCommand,
    DeleteCapacityProviderCommand,
    DeleteCodeSigningConfigCommand,
    DeleteEventSourceMappingCommand,
    DeleteFunctionCommand,
    DeleteFunctionCodeSigningConfigCommand,
    DeleteFunctionConcurrencyCommand,
    DeleteFunctionEventInvokeConfigCommand,
    DeleteFunctionUrlConfigCommand,
    DeleteLayerVersionCommand,
    DeleteProvisionedConcurrencyConfigCommand,
    GetAccountSettingsCommand,
    GetAliasCommand,
    GetCapacityProviderCommand,
    GetCodeSigningConfigCommand,
    GetDurableExecutionCommand,
    GetDurableExecutionHistoryCommand,
    GetDurableExecutionStateCommand,
    GetEventSourceMappingCommand,
    GetFunctionCommand,
    GetFunctionCodeSigningConfigCommand,
    GetFunctionConcurrencyCommand,
    GetFunctionConfigurationCommand,
    GetFunctionEventInvokeConfigCommand,
    GetFunctionRecursionConfigCommand,
    GetFunctionScalingConfigCommand,
    GetFunctionUrlConfigCommand,
    GetLayerVersionCommand,
    GetLayerVersionByArnCommand,
    GetLayerVersionPolicyCommand,
    GetPolicyCommand,
    GetProvisionedConcurrencyConfigCommand,
    GetRuntimeManagementConfigCommand,
    InvokeCommand,
    InvokeAsyncCommand,
    InvokeWithResponseStreamCommand,
    ListAliasesCommand,
    ListCapacityProvidersCommand,
    ListCodeSigningConfigsCommand,
    ListDurableExecutionsByFunctionCommand,
    ListEventSourceMappingsCommand,
    ListFunctionEventInvokeConfigsCommand,
    ListFunctionsCommand,
    ListFunctionsByCodeSigningConfigCommand,
    ListFunctionUrlConfigsCommand,
    ListFunctionVersionsByCapacityProviderCommand,
    ListLayersCommand,
    ListLayerVersionsCommand,
    ListProvisionedConcurrencyConfigsCommand,
    ListTagsCommand,
    ListVersionsByFunctionCommand,
    PublishLayerVersionCommand,
    PublishVersionCommand,
    PutFunctionCodeSigningConfigCommand,
    PutFunctionConcurrencyCommand,
    PutFunctionEventInvokeConfigCommand,
    PutFunctionRecursionConfigCommand,
    PutFunctionScalingConfigCommand,
    PutProvisionedConcurrencyConfigCommand,
    PutRuntimeManagementConfigCommand,
    RemoveLayerVersionPermissionCommand,
    RemovePermissionCommand,
    SendDurableExecutionCallbackFailureCommand,
    SendDurableExecutionCallbackHeartbeatCommand,
    SendDurableExecutionCallbackSuccessCommand,
    StopDurableExecutionCommand,
    TagResourceCommand,
    UntagResourceCommand,
    UpdateAliasCommand,
    UpdateCapacityProviderCommand,
    UpdateCodeSigningConfigCommand,
    UpdateEventSourceMappingCommand,
    UpdateFunctionCodeCommand,
    UpdateFunctionConfigurationCommand,
    UpdateFunctionEventInvokeConfigCommand,
    UpdateFunctionUrlConfigCommand
  };
  var paginators = {
    paginateGetDurableExecutionHistory,
    paginateGetDurableExecutionState,
    paginateListAliases,
    paginateListCapacityProviders,
    paginateListCodeSigningConfigs,
    paginateListDurableExecutionsByFunction,
    paginateListEventSourceMappings,
    paginateListFunctionEventInvokeConfigs,
    paginateListFunctions,
    paginateListFunctionsByCodeSigningConfig,
    paginateListFunctionUrlConfigs,
    paginateListFunctionVersionsByCapacityProvider,
    paginateListLayers,
    paginateListLayerVersions,
    paginateListProvisionedConcurrencyConfigs,
    paginateListVersionsByFunction
  };
  var waiters = {
    waitUntilFunctionActiveV2,
    waitUntilFunctionExists,
    waitUntilFunctionUpdatedV2,
    waitUntilFunctionActive,
    waitUntilFunctionUpdated,
    waitUntilPublishedVersionActive
  };

  class Lambda extends LambdaClient {
  }
  createAggregatedClient(commands, Lambda, { paginators, waiters });
  var ThrottleReason = {
    CallerRateLimitExceeded: "CallerRateLimitExceeded",
    ConcurrentInvocationLimitExceeded: "ConcurrentInvocationLimitExceeded",
    ConcurrentSnapshotCreateLimitExceeded: "ConcurrentSnapshotCreateLimitExceeded",
    FunctionInvocationRateLimitExceeded: "FunctionInvocationRateLimitExceeded",
    ReservedFunctionConcurrentInvocationLimitExceeded: "ReservedFunctionConcurrentInvocationLimitExceeded",
    ReservedFunctionInvocationRateLimitExceeded: "ReservedFunctionInvocationRateLimitExceeded"
  };
  var FunctionUrlAuthType = {
    AWS_IAM: "AWS_IAM",
    NONE: "NONE"
  };
  var KafkaSchemaRegistryAuthType = {
    BASIC_AUTH: "BASIC_AUTH",
    CLIENT_CERTIFICATE_TLS_AUTH: "CLIENT_CERTIFICATE_TLS_AUTH",
    SERVER_ROOT_CA_CERTIFICATE: "SERVER_ROOT_CA_CERTIFICATE"
  };
  var SchemaRegistryEventRecordFormat = {
    JSON: "JSON",
    SOURCE: "SOURCE"
  };
  var KafkaSchemaValidationAttribute = {
    KEY: "KEY",
    VALUE: "VALUE"
  };
  var ApplicationLogLevel = {
    Debug: "DEBUG",
    Error: "ERROR",
    Fatal: "FATAL",
    Info: "INFO",
    Trace: "TRACE",
    Warn: "WARN"
  };
  var Architecture = {
    arm64: "arm64",
    x86_64: "x86_64"
  };
  var CapacityProviderScalingMode = {
    Auto: "Auto",
    Manual: "Manual"
  };
  var CapacityProviderPredefinedMetricType = {
    LambdaCapacityProviderAverageCPUUtilization: "LambdaCapacityProviderAverageCPUUtilization"
  };
  var PropagateTagsMode = {
    Explicit: "Explicit",
    None: "None"
  };
  var CapacityProviderState = {
    Active: "Active",
    Deleting: "Deleting",
    Failed: "Failed",
    Pending: "Pending"
  };
  var State2 = {
    Active: "Active",
    ActiveNonInvocable: "ActiveNonInvocable",
    Deactivated: "Deactivated",
    Deactivating: "Deactivating",
    Deleting: "Deleting",
    Failed: "Failed",
    Inactive: "Inactive",
    Pending: "Pending"
  };
  var OperationAction = {
    CANCEL: "CANCEL",
    FAIL: "FAIL",
    RETRY: "RETRY",
    START: "START",
    SUCCEED: "SUCCEED"
  };
  var OperationType = {
    CALLBACK: "CALLBACK",
    CHAINED_INVOKE: "CHAINED_INVOKE",
    CONTEXT: "CONTEXT",
    EXECUTION: "EXECUTION",
    STEP: "STEP",
    WAIT: "WAIT"
  };
  var OperationStatus = {
    CANCELLED: "CANCELLED",
    FAILED: "FAILED",
    PENDING: "PENDING",
    READY: "READY",
    STARTED: "STARTED",
    STOPPED: "STOPPED",
    SUCCEEDED: "SUCCEEDED",
    TIMED_OUT: "TIMED_OUT"
  };
  var CodeSigningPolicy = {
    Enforce: "Enforce",
    Warn: "Warn"
  };
  var FullDocument = {
    Default: "Default",
    UpdateLookup: "UpdateLookup"
  };
  var FunctionResponseType = {
    ReportBatchItemFailures: "ReportBatchItemFailures"
  };
  var EventSourceMappingSystemLogLevel = {
    Debug: "DEBUG",
    Info: "INFO",
    Warn: "WARN"
  };
  var EventSourceMappingMetric = {
    ErrorCount: "ErrorCount",
    EventCount: "EventCount",
    KafkaMetrics: "KafkaMetrics"
  };
  var EndPointType = {
    KAFKA_BOOTSTRAP_SERVERS: "KAFKA_BOOTSTRAP_SERVERS"
  };
  var SourceAccessType = {
    BASIC_AUTH: "BASIC_AUTH",
    CLIENT_CERTIFICATE_TLS_AUTH: "CLIENT_CERTIFICATE_TLS_AUTH",
    SASL_SCRAM_256_AUTH: "SASL_SCRAM_256_AUTH",
    SASL_SCRAM_512_AUTH: "SASL_SCRAM_512_AUTH",
    SERVER_ROOT_CA_CERTIFICATE: "SERVER_ROOT_CA_CERTIFICATE",
    VIRTUAL_HOST: "VIRTUAL_HOST",
    VPC_SECURITY_GROUP: "VPC_SECURITY_GROUP",
    VPC_SUBNET: "VPC_SUBNET"
  };
  var EventSourcePosition = {
    AT_TIMESTAMP: "AT_TIMESTAMP",
    LATEST: "LATEST",
    TRIM_HORIZON: "TRIM_HORIZON"
  };
  var LogFormat = {
    Json: "JSON",
    Text: "Text"
  };
  var SystemLogLevel = {
    Debug: "DEBUG",
    Info: "INFO",
    Warn: "WARN"
  };
  var PackageType = {
    Image: "Image",
    Zip: "Zip"
  };
  var FunctionVersionLatestPublished = {
    LATEST_PUBLISHED: "LATEST_PUBLISHED"
  };
  var Runtime = {
    dotnet10: "dotnet10",
    dotnet6: "dotnet6",
    dotnet8: "dotnet8",
    dotnetcore10: "dotnetcore1.0",
    dotnetcore20: "dotnetcore2.0",
    dotnetcore21: "dotnetcore2.1",
    dotnetcore31: "dotnetcore3.1",
    go1x: "go1.x",
    java11: "java11",
    java17: "java17",
    java21: "java21",
    java25: "java25",
    java8: "java8",
    java8al2: "java8.al2",
    nodejs: "nodejs",
    nodejs10x: "nodejs10.x",
    nodejs12x: "nodejs12.x",
    nodejs14x: "nodejs14.x",
    nodejs16x: "nodejs16.x",
    nodejs18x: "nodejs18.x",
    nodejs20x: "nodejs20.x",
    nodejs22x: "nodejs22.x",
    nodejs24x: "nodejs24.x",
    nodejs43: "nodejs4.3",
    nodejs43edge: "nodejs4.3-edge",
    nodejs610: "nodejs6.10",
    nodejs810: "nodejs8.10",
    provided: "provided",
    providedal2: "provided.al2",
    providedal2023: "provided.al2023",
    python27: "python2.7",
    python310: "python3.10",
    python311: "python3.11",
    python312: "python3.12",
    python313: "python3.13",
    python314: "python3.14",
    python36: "python3.6",
    python37: "python3.7",
    python38: "python3.8",
    python39: "python3.9",
    ruby25: "ruby2.5",
    ruby27: "ruby2.7",
    ruby32: "ruby3.2",
    ruby33: "ruby3.3",
    ruby34: "ruby3.4",
    ruby40: "ruby4.0"
  };
  var SnapStartApplyOn = {
    None: "None",
    PublishedVersions: "PublishedVersions"
  };
  var TenantIsolationMode = {
    PER_TENANT: "PER_TENANT"
  };
  var TracingMode = {
    Active: "Active",
    PassThrough: "PassThrough"
  };
  var LastUpdateStatus = {
    Failed: "Failed",
    InProgress: "InProgress",
    Successful: "Successful"
  };
  var LastUpdateStatusReasonCode = {
    CapacityProviderScalingLimitExceeded: "CapacityProviderScalingLimitExceeded",
    DisabledKMSKey: "DisabledKMSKey",
    DisallowedByVpcEncryptionControl: "DisallowedByVpcEncryptionControl",
    EC2RequestLimitExceeded: "EC2RequestLimitExceeded",
    EFSIOError: "EFSIOError",
    EFSMountConnectivityError: "EFSMountConnectivityError",
    EFSMountFailure: "EFSMountFailure",
    EFSMountTimeout: "EFSMountTimeout",
    EniLimitExceeded: "EniLimitExceeded",
    FunctionError: "FunctionError",
    FunctionErrorExtensionInitError: "FunctionError.ExtensionInitError",
    FunctionErrorInitResourceExhausted: "FunctionError.InitResourceExhausted",
    FunctionErrorInitTimeout: "FunctionError.InitTimeout",
    FunctionErrorInvalidEntryPoint: "FunctionError.InvalidEntryPoint",
    FunctionErrorInvalidWorkingDirectory: "FunctionError.InvalidWorkingDirectory",
    FunctionErrorPermissionDenied: "FunctionError.PermissionDenied",
    FunctionErrorRuntimeInitError: "FunctionError.RuntimeInitError",
    FunctionErrorTooManyExtensions: "FunctionError.TooManyExtensions",
    ImageAccessDenied: "ImageAccessDenied",
    ImageDeleted: "ImageDeleted",
    InsufficientCapacity: "InsufficientCapacity",
    InsufficientRolePermissions: "InsufficientRolePermissions",
    InternalError: "InternalError",
    InvalidConfiguration: "InvalidConfiguration",
    InvalidImage: "InvalidImage",
    InvalidRuntime: "InvalidRuntime",
    InvalidSecurityGroup: "InvalidSecurityGroup",
    InvalidStateKMSKey: "InvalidStateKMSKey",
    InvalidSubnet: "InvalidSubnet",
    InvalidZipFileException: "InvalidZipFileException",
    KMSKeyAccessDenied: "KMSKeyAccessDenied",
    KMSKeyNotFound: "KMSKeyNotFound",
    ServiceQuotaExceededException: "ServiceQuotaExceededException",
    SubnetOutOfIPAddresses: "SubnetOutOfIPAddresses",
    VcpuLimitExceeded: "VcpuLimitExceeded"
  };
  var SnapStartOptimizationStatus = {
    Off: "Off",
    On: "On"
  };
  var StateReasonCode = {
    CapacityProviderScalingLimitExceeded: "CapacityProviderScalingLimitExceeded",
    Creating: "Creating",
    DisabledKMSKey: "DisabledKMSKey",
    DisallowedByVpcEncryptionControl: "DisallowedByVpcEncryptionControl",
    DrainingDurableExecutions: "DrainingDurableExecutions",
    EC2RequestLimitExceeded: "EC2RequestLimitExceeded",
    EFSIOError: "EFSIOError",
    EFSMountConnectivityError: "EFSMountConnectivityError",
    EFSMountFailure: "EFSMountFailure",
    EFSMountTimeout: "EFSMountTimeout",
    EniLimitExceeded: "EniLimitExceeded",
    FunctionError: "FunctionError",
    FunctionErrorExtensionInitError: "FunctionError.ExtensionInitError",
    FunctionErrorInitResourceExhausted: "FunctionError.InitResourceExhausted",
    FunctionErrorInitTimeout: "FunctionError.InitTimeout",
    FunctionErrorInvalidEntryPoint: "FunctionError.InvalidEntryPoint",
    FunctionErrorInvalidWorkingDirectory: "FunctionError.InvalidWorkingDirectory",
    FunctionErrorPermissionDenied: "FunctionError.PermissionDenied",
    FunctionErrorRuntimeInitError: "FunctionError.RuntimeInitError",
    FunctionErrorTooManyExtensions: "FunctionError.TooManyExtensions",
    Idle: "Idle",
    ImageAccessDenied: "ImageAccessDenied",
    ImageDeleted: "ImageDeleted",
    InsufficientCapacity: "InsufficientCapacity",
    InsufficientRolePermissions: "InsufficientRolePermissions",
    InternalError: "InternalError",
    InvalidConfiguration: "InvalidConfiguration",
    InvalidImage: "InvalidImage",
    InvalidRuntime: "InvalidRuntime",
    InvalidSecurityGroup: "InvalidSecurityGroup",
    InvalidStateKMSKey: "InvalidStateKMSKey",
    InvalidSubnet: "InvalidSubnet",
    InvalidZipFileException: "InvalidZipFileException",
    KMSKeyAccessDenied: "KMSKeyAccessDenied",
    KMSKeyNotFound: "KMSKeyNotFound",
    Restoring: "Restoring",
    ServiceQuotaExceededException: "ServiceQuotaExceededException",
    SubnetOutOfIPAddresses: "SubnetOutOfIPAddresses",
    VcpuLimitExceeded: "VcpuLimitExceeded"
  };
  var InvokeMode = {
    BUFFERED: "BUFFERED",
    RESPONSE_STREAM: "RESPONSE_STREAM"
  };
  var RecursiveLoop = {
    Allow: "Allow",
    Terminate: "Terminate"
  };
  var UpdateRuntimeOn = {
    Auto: "Auto",
    FunctionUpdate: "FunctionUpdate",
    Manual: "Manual"
  };
  var InvocationType = {
    DryRun: "DryRun",
    Event: "Event",
    RequestResponse: "RequestResponse"
  };
  var LogType = {
    None: "None",
    Tail: "Tail"
  };
  var ResponseStreamingInvocationType = {
    DryRun: "DryRun",
    RequestResponse: "RequestResponse"
  };
  var FunctionVersion = {
    ALL: "ALL"
  };
  var ProvisionedConcurrencyStatusEnum = {
    FAILED: "FAILED",
    IN_PROGRESS: "IN_PROGRESS",
    READY: "READY"
  };
  var ExecutionStatus = {
    FAILED: "FAILED",
    RUNNING: "RUNNING",
    STOPPED: "STOPPED",
    SUCCEEDED: "SUCCEEDED",
    TIMED_OUT: "TIMED_OUT"
  };
  var EventType = {
    CallbackFailed: "CallbackFailed",
    CallbackStarted: "CallbackStarted",
    CallbackSucceeded: "CallbackSucceeded",
    CallbackTimedOut: "CallbackTimedOut",
    ChainedInvokeFailed: "ChainedInvokeFailed",
    ChainedInvokeStarted: "ChainedInvokeStarted",
    ChainedInvokeStopped: "ChainedInvokeStopped",
    ChainedInvokeSucceeded: "ChainedInvokeSucceeded",
    ChainedInvokeTimedOut: "ChainedInvokeTimedOut",
    ContextFailed: "ContextFailed",
    ContextStarted: "ContextStarted",
    ContextSucceeded: "ContextSucceeded",
    ExecutionFailed: "ExecutionFailed",
    ExecutionStarted: "ExecutionStarted",
    ExecutionStopped: "ExecutionStopped",
    ExecutionSucceeded: "ExecutionSucceeded",
    ExecutionTimedOut: "ExecutionTimedOut",
    InvocationCompleted: "InvocationCompleted",
    StepFailed: "StepFailed",
    StepStarted: "StepStarted",
    StepSucceeded: "StepSucceeded",
    WaitCancelled: "WaitCancelled",
    WaitStarted: "WaitStarted",
    WaitSucceeded: "WaitSucceeded"
  };
  exports2.AddLayerVersionPermissionCommand = AddLayerVersionPermissionCommand;
  exports2.AddPermissionCommand = AddPermissionCommand;
  exports2.ApplicationLogLevel = ApplicationLogLevel;
  exports2.Architecture = Architecture;
  exports2.CapacityProviderPredefinedMetricType = CapacityProviderPredefinedMetricType;
  exports2.CapacityProviderScalingMode = CapacityProviderScalingMode;
  exports2.CapacityProviderState = CapacityProviderState;
  exports2.CheckpointDurableExecutionCommand = CheckpointDurableExecutionCommand;
  exports2.CodeSigningPolicy = CodeSigningPolicy;
  exports2.CreateAliasCommand = CreateAliasCommand;
  exports2.CreateCapacityProviderCommand = CreateCapacityProviderCommand;
  exports2.CreateCodeSigningConfigCommand = CreateCodeSigningConfigCommand;
  exports2.CreateEventSourceMappingCommand = CreateEventSourceMappingCommand;
  exports2.CreateFunctionCommand = CreateFunctionCommand;
  exports2.CreateFunctionUrlConfigCommand = CreateFunctionUrlConfigCommand;
  exports2.DeleteAliasCommand = DeleteAliasCommand;
  exports2.DeleteCapacityProviderCommand = DeleteCapacityProviderCommand;
  exports2.DeleteCodeSigningConfigCommand = DeleteCodeSigningConfigCommand;
  exports2.DeleteEventSourceMappingCommand = DeleteEventSourceMappingCommand;
  exports2.DeleteFunctionCodeSigningConfigCommand = DeleteFunctionCodeSigningConfigCommand;
  exports2.DeleteFunctionCommand = DeleteFunctionCommand;
  exports2.DeleteFunctionConcurrencyCommand = DeleteFunctionConcurrencyCommand;
  exports2.DeleteFunctionEventInvokeConfigCommand = DeleteFunctionEventInvokeConfigCommand;
  exports2.DeleteFunctionUrlConfigCommand = DeleteFunctionUrlConfigCommand;
  exports2.DeleteLayerVersionCommand = DeleteLayerVersionCommand;
  exports2.DeleteProvisionedConcurrencyConfigCommand = DeleteProvisionedConcurrencyConfigCommand;
  exports2.EndPointType = EndPointType;
  exports2.EventSourceMappingMetric = EventSourceMappingMetric;
  exports2.EventSourceMappingSystemLogLevel = EventSourceMappingSystemLogLevel;
  exports2.EventSourcePosition = EventSourcePosition;
  exports2.EventType = EventType;
  exports2.ExecutionStatus = ExecutionStatus;
  exports2.FullDocument = FullDocument;
  exports2.FunctionResponseType = FunctionResponseType;
  exports2.FunctionUrlAuthType = FunctionUrlAuthType;
  exports2.FunctionVersion = FunctionVersion;
  exports2.FunctionVersionLatestPublished = FunctionVersionLatestPublished;
  exports2.GetAccountSettingsCommand = GetAccountSettingsCommand;
  exports2.GetAliasCommand = GetAliasCommand;
  exports2.GetCapacityProviderCommand = GetCapacityProviderCommand;
  exports2.GetCodeSigningConfigCommand = GetCodeSigningConfigCommand;
  exports2.GetDurableExecutionCommand = GetDurableExecutionCommand;
  exports2.GetDurableExecutionHistoryCommand = GetDurableExecutionHistoryCommand;
  exports2.GetDurableExecutionStateCommand = GetDurableExecutionStateCommand;
  exports2.GetEventSourceMappingCommand = GetEventSourceMappingCommand;
  exports2.GetFunctionCodeSigningConfigCommand = GetFunctionCodeSigningConfigCommand;
  exports2.GetFunctionCommand = GetFunctionCommand;
  exports2.GetFunctionConcurrencyCommand = GetFunctionConcurrencyCommand;
  exports2.GetFunctionConfigurationCommand = GetFunctionConfigurationCommand;
  exports2.GetFunctionEventInvokeConfigCommand = GetFunctionEventInvokeConfigCommand;
  exports2.GetFunctionRecursionConfigCommand = GetFunctionRecursionConfigCommand;
  exports2.GetFunctionScalingConfigCommand = GetFunctionScalingConfigCommand;
  exports2.GetFunctionUrlConfigCommand = GetFunctionUrlConfigCommand;
  exports2.GetLayerVersionByArnCommand = GetLayerVersionByArnCommand;
  exports2.GetLayerVersionCommand = GetLayerVersionCommand;
  exports2.GetLayerVersionPolicyCommand = GetLayerVersionPolicyCommand;
  exports2.GetPolicyCommand = GetPolicyCommand;
  exports2.GetProvisionedConcurrencyConfigCommand = GetProvisionedConcurrencyConfigCommand;
  exports2.GetRuntimeManagementConfigCommand = GetRuntimeManagementConfigCommand;
  exports2.InvocationType = InvocationType;
  exports2.InvokeAsyncCommand = InvokeAsyncCommand;
  exports2.InvokeCommand = InvokeCommand;
  exports2.InvokeMode = InvokeMode;
  exports2.InvokeWithResponseStreamCommand = InvokeWithResponseStreamCommand;
  exports2.KafkaSchemaRegistryAuthType = KafkaSchemaRegistryAuthType;
  exports2.KafkaSchemaValidationAttribute = KafkaSchemaValidationAttribute;
  exports2.Lambda = Lambda;
  exports2.LambdaClient = LambdaClient;
  exports2.LastUpdateStatus = LastUpdateStatus;
  exports2.LastUpdateStatusReasonCode = LastUpdateStatusReasonCode;
  exports2.ListAliasesCommand = ListAliasesCommand;
  exports2.ListCapacityProvidersCommand = ListCapacityProvidersCommand;
  exports2.ListCodeSigningConfigsCommand = ListCodeSigningConfigsCommand;
  exports2.ListDurableExecutionsByFunctionCommand = ListDurableExecutionsByFunctionCommand;
  exports2.ListEventSourceMappingsCommand = ListEventSourceMappingsCommand;
  exports2.ListFunctionEventInvokeConfigsCommand = ListFunctionEventInvokeConfigsCommand;
  exports2.ListFunctionUrlConfigsCommand = ListFunctionUrlConfigsCommand;
  exports2.ListFunctionVersionsByCapacityProviderCommand = ListFunctionVersionsByCapacityProviderCommand;
  exports2.ListFunctionsByCodeSigningConfigCommand = ListFunctionsByCodeSigningConfigCommand;
  exports2.ListFunctionsCommand = ListFunctionsCommand;
  exports2.ListLayerVersionsCommand = ListLayerVersionsCommand;
  exports2.ListLayersCommand = ListLayersCommand;
  exports2.ListProvisionedConcurrencyConfigsCommand = ListProvisionedConcurrencyConfigsCommand;
  exports2.ListTagsCommand = ListTagsCommand;
  exports2.ListVersionsByFunctionCommand = ListVersionsByFunctionCommand;
  exports2.LogFormat = LogFormat;
  exports2.LogType = LogType;
  exports2.OperationAction = OperationAction;
  exports2.OperationStatus = OperationStatus;
  exports2.OperationType = OperationType;
  exports2.PackageType = PackageType;
  exports2.PropagateTagsMode = PropagateTagsMode;
  exports2.ProvisionedConcurrencyStatusEnum = ProvisionedConcurrencyStatusEnum;
  exports2.PublishLayerVersionCommand = PublishLayerVersionCommand;
  exports2.PublishVersionCommand = PublishVersionCommand;
  exports2.PutFunctionCodeSigningConfigCommand = PutFunctionCodeSigningConfigCommand;
  exports2.PutFunctionConcurrencyCommand = PutFunctionConcurrencyCommand;
  exports2.PutFunctionEventInvokeConfigCommand = PutFunctionEventInvokeConfigCommand;
  exports2.PutFunctionRecursionConfigCommand = PutFunctionRecursionConfigCommand;
  exports2.PutFunctionScalingConfigCommand = PutFunctionScalingConfigCommand;
  exports2.PutProvisionedConcurrencyConfigCommand = PutProvisionedConcurrencyConfigCommand;
  exports2.PutRuntimeManagementConfigCommand = PutRuntimeManagementConfigCommand;
  exports2.RecursiveLoop = RecursiveLoop;
  exports2.RemoveLayerVersionPermissionCommand = RemoveLayerVersionPermissionCommand;
  exports2.RemovePermissionCommand = RemovePermissionCommand;
  exports2.ResponseStreamingInvocationType = ResponseStreamingInvocationType;
  exports2.Runtime = Runtime;
  exports2.SchemaRegistryEventRecordFormat = SchemaRegistryEventRecordFormat;
  exports2.SendDurableExecutionCallbackFailureCommand = SendDurableExecutionCallbackFailureCommand;
  exports2.SendDurableExecutionCallbackHeartbeatCommand = SendDurableExecutionCallbackHeartbeatCommand;
  exports2.SendDurableExecutionCallbackSuccessCommand = SendDurableExecutionCallbackSuccessCommand;
  exports2.SnapStartApplyOn = SnapStartApplyOn;
  exports2.SnapStartOptimizationStatus = SnapStartOptimizationStatus;
  exports2.SourceAccessType = SourceAccessType;
  exports2.State = State2;
  exports2.StateReasonCode = StateReasonCode;
  exports2.StopDurableExecutionCommand = StopDurableExecutionCommand;
  exports2.SystemLogLevel = SystemLogLevel;
  exports2.TagResourceCommand = TagResourceCommand;
  exports2.TenantIsolationMode = TenantIsolationMode;
  exports2.ThrottleReason = ThrottleReason;
  exports2.TracingMode = TracingMode;
  exports2.UntagResourceCommand = UntagResourceCommand;
  exports2.UpdateAliasCommand = UpdateAliasCommand;
  exports2.UpdateCapacityProviderCommand = UpdateCapacityProviderCommand;
  exports2.UpdateCodeSigningConfigCommand = UpdateCodeSigningConfigCommand;
  exports2.UpdateEventSourceMappingCommand = UpdateEventSourceMappingCommand;
  exports2.UpdateFunctionCodeCommand = UpdateFunctionCodeCommand;
  exports2.UpdateFunctionConfigurationCommand = UpdateFunctionConfigurationCommand;
  exports2.UpdateFunctionEventInvokeConfigCommand = UpdateFunctionEventInvokeConfigCommand;
  exports2.UpdateFunctionUrlConfigCommand = UpdateFunctionUrlConfigCommand;
  exports2.UpdateRuntimeOn = UpdateRuntimeOn;
  exports2.paginateGetDurableExecutionHistory = paginateGetDurableExecutionHistory;
  exports2.paginateGetDurableExecutionState = paginateGetDurableExecutionState;
  exports2.paginateListAliases = paginateListAliases;
  exports2.paginateListCapacityProviders = paginateListCapacityProviders;
  exports2.paginateListCodeSigningConfigs = paginateListCodeSigningConfigs;
  exports2.paginateListDurableExecutionsByFunction = paginateListDurableExecutionsByFunction;
  exports2.paginateListEventSourceMappings = paginateListEventSourceMappings;
  exports2.paginateListFunctionEventInvokeConfigs = paginateListFunctionEventInvokeConfigs;
  exports2.paginateListFunctionUrlConfigs = paginateListFunctionUrlConfigs;
  exports2.paginateListFunctionVersionsByCapacityProvider = paginateListFunctionVersionsByCapacityProvider;
  exports2.paginateListFunctions = paginateListFunctions;
  exports2.paginateListFunctionsByCodeSigningConfig = paginateListFunctionsByCodeSigningConfig;
  exports2.paginateListLayerVersions = paginateListLayerVersions;
  exports2.paginateListLayers = paginateListLayers;
  exports2.paginateListProvisionedConcurrencyConfigs = paginateListProvisionedConcurrencyConfigs;
  exports2.paginateListVersionsByFunction = paginateListVersionsByFunction;
  exports2.waitForFunctionActive = waitForFunctionActive;
  exports2.waitForFunctionActiveV2 = waitForFunctionActiveV2;
  exports2.waitForFunctionExists = waitForFunctionExists;
  exports2.waitForFunctionUpdated = waitForFunctionUpdated;
  exports2.waitForFunctionUpdatedV2 = waitForFunctionUpdatedV2;
  exports2.waitForPublishedVersionActive = waitForPublishedVersionActive;
  exports2.waitUntilFunctionActive = waitUntilFunctionActive;
  exports2.waitUntilFunctionActiveV2 = waitUntilFunctionActiveV2;
  exports2.waitUntilFunctionExists = waitUntilFunctionExists;
  exports2.waitUntilFunctionUpdated = waitUntilFunctionUpdated;
  exports2.waitUntilFunctionUpdatedV2 = waitUntilFunctionUpdatedV2;
  exports2.waitUntilPublishedVersionActive = waitUntilPublishedVersionActive;
});

// ../../node_modules/.pnpm/@aws-sdk+util-dynamodb@3.996.5_@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/util-dynamodb/dist-cjs/index.js
var require_dist_cjs68 = __commonJS((exports2) => {
  class NumberValue {
    value;
    constructor(value) {
      if (typeof value === "object" && "N" in value) {
        this.value = String(value.N);
      } else {
        this.value = String(value);
      }
      const valueOf = typeof value.valueOf() === "number" ? value.valueOf() : 0;
      const imprecise = valueOf > Number.MAX_SAFE_INTEGER || valueOf < Number.MIN_SAFE_INTEGER || Math.abs(valueOf) === Infinity || Number.isNaN(valueOf);
      if (imprecise) {
        throw new Error(`NumberValue should not be initialized with an imprecise number=${valueOf}. Use a string instead.`);
      }
    }
    static from(value) {
      return new NumberValue(value);
    }
    toAttributeValue() {
      return {
        N: this.toString()
      };
    }
    toBigInt() {
      const stringValue = this.toString();
      return BigInt(stringValue);
    }
    toString() {
      return String(this.value);
    }
    valueOf() {
      return this.toString();
    }
  }
  var convertToAttr = (data, options2) => {
    if (data === undefined) {
      throw new Error(`Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.`);
    } else if (data === null && typeof data === "object") {
      return convertToNullAttr();
    } else if (Array.isArray(data)) {
      return convertToListAttr(data, options2);
    } else if (data?.constructor?.name === "Set") {
      return convertToSetAttr(data, options2);
    } else if (data?.constructor?.name === "Map") {
      return convertToMapAttrFromIterable(data, options2);
    } else if (data?.constructor?.name === "Object" || !data.constructor && typeof data === "object") {
      return convertToMapAttrFromEnumerableProps(data, options2);
    } else if (isBinary(data)) {
      if (data.length === 0 && options2?.convertEmptyValues) {
        return convertToNullAttr();
      }
      return convertToBinaryAttr(data);
    } else if (typeof data === "boolean" || data?.constructor?.name === "Boolean") {
      return { BOOL: data.valueOf() };
    } else if (typeof data === "number" || data?.constructor?.name === "Number") {
      return convertToNumberAttr(data, options2);
    } else if (data instanceof NumberValue) {
      return data.toAttributeValue();
    } else if (typeof data === "bigint") {
      return convertToBigIntAttr(data);
    } else if (typeof data === "string" || data?.constructor?.name === "String") {
      if (data.length === 0 && options2?.convertEmptyValues) {
        return convertToNullAttr();
      }
      return convertToStringAttr(data);
    } else if (options2?.convertClassInstanceToMap && typeof data === "object") {
      return convertToMapAttrFromEnumerableProps(data, options2);
    }
    throw new Error(`Unsupported type passed: ${data}. Pass options.convertClassInstanceToMap=true to marshall typeof object as map attribute.`);
  };
  var convertToListAttr = (data, options2) => ({
    L: data.filter((item) => typeof item !== "function" && (!options2?.removeUndefinedValues || options2?.removeUndefinedValues && item !== undefined)).map((item) => convertToAttr(item, options2))
  });
  var convertToSetAttr = (set2, options2) => {
    const setToOperate = options2?.removeUndefinedValues ? new Set([...set2].filter((value) => value !== undefined)) : set2;
    if (!options2?.removeUndefinedValues && setToOperate.has(undefined)) {
      throw new Error(`Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.`);
    }
    if (setToOperate.size === 0) {
      if (options2?.convertEmptyValues) {
        return convertToNullAttr();
      }
      throw new Error(`Pass a non-empty set, or options.convertEmptyValues=true.`);
    }
    const item = setToOperate.values().next().value;
    if (item instanceof NumberValue) {
      return {
        NS: Array.from(setToOperate).map((_6) => _6.toString())
      };
    } else if (typeof item === "number") {
      return {
        NS: Array.from(setToOperate).map((num) => convertToNumberAttr(num, options2)).map((item2) => item2.N)
      };
    } else if (typeof item === "bigint") {
      return {
        NS: Array.from(setToOperate).map(convertToBigIntAttr).map((item2) => item2.N)
      };
    } else if (typeof item === "string") {
      return {
        SS: Array.from(setToOperate).map(convertToStringAttr).map((item2) => item2.S)
      };
    } else if (isBinary(item)) {
      return {
        BS: Array.from(setToOperate).map(convertToBinaryAttr).map((item2) => item2.B)
      };
    } else {
      throw new Error(`Only Number Set (NS), Binary Set (BS) or String Set (SS) are allowed.`);
    }
  };
  var convertToMapAttrFromIterable = (data, options2) => ({
    M: ((data2) => {
      const map5 = {};
      for (const [key, value] of data2) {
        if (typeof value !== "function" && (value !== undefined || !options2?.removeUndefinedValues)) {
          map5[key] = convertToAttr(value, options2);
        }
      }
      return map5;
    })(data)
  });
  var convertToMapAttrFromEnumerableProps = (data, options2) => ({
    M: ((data2) => {
      const map5 = {};
      for (const key in data2) {
        const value = data2[key];
        if (typeof value !== "function" && (value !== undefined || !options2?.removeUndefinedValues)) {
          map5[key] = convertToAttr(value, options2);
        }
      }
      return map5;
    })(data)
  });
  var convertToNullAttr = () => ({ NULL: true });
  var convertToBinaryAttr = (data) => ({ B: data });
  var convertToStringAttr = (data) => ({ S: data.toString() });
  var convertToBigIntAttr = (data) => ({ N: data.toString() });
  var validateBigIntAndThrow = (errorPrefix) => {
    throw new Error(`${errorPrefix} Use NumberValue from @aws-sdk/lib-dynamodb.`);
  };
  var convertToNumberAttr = (num, options2) => {
    if ([Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY].map((val) => val.toString()).includes(num.toString())) {
      throw new Error(`Special numeric value ${num.toString()} is not allowed`);
    } else if (!options2?.allowImpreciseNumbers) {
      if (Number(num) > Number.MAX_SAFE_INTEGER) {
        validateBigIntAndThrow(`Number ${num.toString()} is greater than Number.MAX_SAFE_INTEGER.`);
      } else if (Number(num) < Number.MIN_SAFE_INTEGER) {
        validateBigIntAndThrow(`Number ${num.toString()} is lesser than Number.MIN_SAFE_INTEGER.`);
      }
    }
    return { N: num.toString() };
  };
  var isBinary = (data) => {
    const binaryTypes = [
      "ArrayBuffer",
      "Blob",
      "Buffer",
      "DataView",
      "File",
      "Int8Array",
      "Uint8Array",
      "Uint8ClampedArray",
      "Int16Array",
      "Uint16Array",
      "Int32Array",
      "Uint32Array",
      "Float32Array",
      "Float64Array",
      "BigInt64Array",
      "BigUint64Array"
    ];
    if (data?.constructor) {
      return binaryTypes.includes(data.constructor.name);
    }
    return false;
  };
  var convertToNative = (data, options2) => {
    for (const [key, value] of Object.entries(data)) {
      if (value !== undefined) {
        switch (key) {
          case "NULL":
            return null;
          case "BOOL":
            return Boolean(value);
          case "N":
            return convertNumber(value, options2);
          case "B":
            return convertBinary(value);
          case "S":
            return convertString(value);
          case "L":
            return convertList(value, options2);
          case "M":
            return convertMap(value, options2);
          case "NS":
            return new Set(value.map((item) => convertNumber(item, options2)));
          case "BS":
            return new Set(value.map(convertBinary));
          case "SS":
            return new Set(value.map(convertString));
          default:
            throw new Error(`Unsupported type passed: ${key}`);
        }
      }
    }
    throw new Error(`No value defined: ${JSON.stringify(data)}`);
  };
  var convertNumber = (numString, options2) => {
    if (typeof options2?.wrapNumbers === "function") {
      return options2?.wrapNumbers(numString);
    }
    if (options2?.wrapNumbers) {
      return NumberValue.from(numString);
    }
    const num = Number(numString);
    const infinityValues = [Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY];
    const isLargeFiniteNumber = (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) && !infinityValues.includes(num);
    if (isLargeFiniteNumber) {
      if (typeof BigInt === "function") {
        try {
          return BigInt(numString);
        } catch (error49) {
          throw new Error(`${numString} can't be converted to BigInt. Set options.wrapNumbers to get string value.`);
        }
      } else {
        throw new Error(`${numString} is outside SAFE_INTEGER bounds. Set options.wrapNumbers to get string value.`);
      }
    }
    return num;
  };
  var convertString = (stringValue) => stringValue;
  var convertBinary = (binaryValue) => binaryValue;
  var convertList = (list2, options2) => list2.map((item) => convertToNative(item, options2));
  var convertMap = (map5, options2) => Object.entries(map5).reduce((acc, [key, value]) => (acc[key] = convertToNative(value, options2), acc), {});
  function marshall(data, options2) {
    const attributeValue = convertToAttr(data, options2);
    const [key, value] = Object.entries(attributeValue)[0];
    switch (key) {
      case "M":
      case "L":
        return options2?.convertTopLevelContainer ? attributeValue : value;
      case "SS":
      case "NS":
      case "BS":
      case "S":
      case "N":
      case "B":
      case "NULL":
      case "BOOL":
      case "$unknown":
      default:
        return attributeValue;
    }
  }
  var unmarshall = (data, options2) => {
    if (options2?.convertWithoutMapWrapper) {
      return convertToNative(data, options2);
    }
    return convertToNative({ M: data }, options2);
  };
  exports2.NumberValueImpl = NumberValue;
  exports2.convertToAttr = convertToAttr;
  exports2.convertToNative = convertToNative;
  exports2.marshall = marshall;
  exports2.unmarshall = unmarshall;
});

// ../../node_modules/.pnpm/@sentry+node@10.46.0/node_modules/@sentry/node/build/esm/integrations/http.js
var import_api11 = __toESM(require_src(), 1);
var import_instrumentation_http = __toESM(require_src7(), 1);
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/debug-build.js
var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/is.js
var objectToString = Object.prototype.toString;
function isError(wat) {
  switch (objectToString.call(wat)) {
    case "[object Error]":
    case "[object Exception]":
    case "[object DOMException]":
    case "[object WebAssembly.Exception]":
      return true;
    default:
      return isInstanceOf(wat, Error);
  }
}
function isBuiltin(wat, className) {
  return objectToString.call(wat) === `[object ${className}]`;
}
function isErrorEvent(wat) {
  return isBuiltin(wat, "ErrorEvent");
}
function isString(wat) {
  return isBuiltin(wat, "String");
}
function isParameterizedString(wat) {
  return typeof wat === "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat;
}
function isPrimitive(wat) {
  return wat === null || isParameterizedString(wat) || typeof wat !== "object" && typeof wat !== "function";
}
function isPlainObject(wat) {
  return isBuiltin(wat, "Object");
}
function isEvent(wat) {
  return typeof Event !== "undefined" && isInstanceOf(wat, Event);
}
function isElement(wat) {
  return typeof Element !== "undefined" && isInstanceOf(wat, Element);
}
function isRegExp(wat) {
  return isBuiltin(wat, "RegExp");
}
function isThenable(wat) {
  return Boolean(wat?.then && typeof wat.then === "function");
}
function isSyntheticEvent(wat) {
  return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat;
}
function isInstanceOf(wat, base) {
  try {
    return wat instanceof base;
  } catch {
    return false;
  }
}
function isVueViewModel(wat) {
  return !!(typeof wat === "object" && wat !== null && (wat.__isVue || wat._isVue || wat.__v_isVNode));
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/worldwide.js
var GLOBAL_OBJ = globalThis;

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/browser.js
var WINDOW = GLOBAL_OBJ;
var DEFAULT_MAX_STRING_LENGTH = 80;
function htmlTreeAsString(elem, options = {}) {
  if (!elem) {
    return "<unknown>";
  }
  try {
    let currentElem = elem;
    const MAX_TRAVERSE_HEIGHT = 5;
    const out = [];
    let height = 0;
    let len = 0;
    const separator = " > ";
    const sepLength = separator.length;
    let nextStr;
    const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;
    const maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH;
    while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {
      nextStr = _htmlElementAsString(currentElem, keyAttrs);
      if (nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) {
        break;
      }
      out.push(nextStr);
      len += nextStr.length;
      currentElem = currentElem.parentNode;
    }
    return out.reverse().join(separator);
  } catch {
    return "<unknown>";
  }
}
function _htmlElementAsString(el, keyAttrs) {
  const elem = el;
  const out = [];
  if (!elem?.tagName) {
    return "";
  }
  if (WINDOW.HTMLElement) {
    if (elem instanceof HTMLElement && elem.dataset) {
      if (elem.dataset["sentryComponent"]) {
        return elem.dataset["sentryComponent"];
      }
      if (elem.dataset["sentryElement"]) {
        return elem.dataset["sentryElement"];
      }
    }
  }
  out.push(elem.tagName.toLowerCase());
  const keyAttrPairs = keyAttrs?.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null;
  if (keyAttrPairs?.length) {
    keyAttrPairs.forEach((keyAttrPair) => {
      out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`);
    });
  } else {
    if (elem.id) {
      out.push(`#${elem.id}`);
    }
    const className = elem.className;
    if (className && isString(className)) {
      const classes = className.split(/\s+/);
      for (const c of classes) {
        out.push(`.${c}`);
      }
    }
  }
  for (const k of ["aria-label", "type", "name", "title", "alt"]) {
    const attr = elem.getAttribute(k);
    if (attr) {
      out.push(`[${k}="${attr}"]`);
    }
  }
  return out.join("");
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/version.js
var SDK_VERSION = "10.46.0";

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/carrier.js
function getMainCarrier() {
  getSentryCarrier(GLOBAL_OBJ);
  return GLOBAL_OBJ;
}
function getSentryCarrier(carrier) {
  const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};
  __SENTRY__.version = __SENTRY__.version || SDK_VERSION;
  return __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
}
function getGlobalSingleton(name, creator, obj = GLOBAL_OBJ) {
  const __SENTRY__ = obj.__SENTRY__ = obj.__SENTRY__ || {};
  const carrier = __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
  return carrier[name] || (carrier[name] = creator());
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/debug-logger.js
var CONSOLE_LEVELS = [
  "debug",
  "info",
  "warn",
  "error",
  "log",
  "assert",
  "trace"
];
var PREFIX = "Sentry Logger ";
var originalConsoleMethods = {};
function consoleSandbox(callback) {
  if (!("console" in GLOBAL_OBJ)) {
    return callback();
  }
  const console2 = GLOBAL_OBJ.console;
  const wrappedFuncs = {};
  const wrappedLevels = Object.keys(originalConsoleMethods);
  wrappedLevels.forEach((level) => {
    const originalConsoleMethod = originalConsoleMethods[level];
    wrappedFuncs[level] = console2[level];
    console2[level] = originalConsoleMethod;
  });
  try {
    return callback();
  } finally {
    wrappedLevels.forEach((level) => {
      console2[level] = wrappedFuncs[level];
    });
  }
}
function enable() {
  _getLoggerSettings().enabled = true;
}
function disable() {
  _getLoggerSettings().enabled = false;
}
function isEnabled() {
  return _getLoggerSettings().enabled;
}
function log(...args) {
  _maybeLog("log", ...args);
}
function warn(...args) {
  _maybeLog("warn", ...args);
}
function error(...args) {
  _maybeLog("error", ...args);
}
function _maybeLog(level, ...args) {
  if (!DEBUG_BUILD) {
    return;
  }
  if (isEnabled()) {
    consoleSandbox(() => {
      GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);
    });
  }
}
function _getLoggerSettings() {
  if (!DEBUG_BUILD) {
    return { enabled: false };
  }
  return getGlobalSingleton("loggerSettings", () => ({ enabled: false }));
}
var debug = {
  enable,
  disable,
  isEnabled,
  log,
  warn,
  error
};

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/object.js
function fill(source, name, replacementFactory) {
  if (!(name in source)) {
    return;
  }
  const original = source[name];
  if (typeof original !== "function") {
    return;
  }
  const wrapped = replacementFactory(original);
  if (typeof wrapped === "function") {
    markFunctionWrapped(wrapped, original);
  }
  try {
    source[name] = wrapped;
  } catch {
    DEBUG_BUILD && debug.log(`Failed to replace method "${name}" in object`, source);
  }
}
function addNonEnumerableProperty(obj, name, value) {
  try {
    Object.defineProperty(obj, name, {
      value,
      writable: true,
      configurable: true
    });
  } catch {
    DEBUG_BUILD && debug.log(`Failed to add non-enumerable property "${name}" to object`, obj);
  }
}
function markFunctionWrapped(wrapped, original) {
  try {
    const proto = original.prototype || {};
    wrapped.prototype = original.prototype = proto;
    addNonEnumerableProperty(wrapped, "__sentry_original__", original);
  } catch {}
}
function getOriginalFunction(func) {
  return func.__sentry_original__;
}
function convertToPlainObject(value) {
  if (isError(value)) {
    return {
      message: value.message,
      name: value.name,
      stack: value.stack,
      ...getOwnProperties(value)
    };
  } else if (isEvent(value)) {
    const newObj = {
      type: value.type,
      target: serializeEventTarget(value.target),
      currentTarget: serializeEventTarget(value.currentTarget),
      ...getOwnProperties(value)
    };
    if (typeof CustomEvent !== "undefined" && isInstanceOf(value, CustomEvent)) {
      newObj.detail = value.detail;
    }
    return newObj;
  } else {
    return value;
  }
}
function serializeEventTarget(target) {
  try {
    return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);
  } catch {
    return "<unknown>";
  }
}
function getOwnProperties(obj) {
  if (typeof obj === "object" && obj !== null) {
    return Object.fromEntries(Object.entries(obj));
  }
  return {};
}
function extractExceptionKeysForMessage(exception) {
  const keys = Object.keys(convertToPlainObject(exception));
  keys.sort();
  return !keys[0] ? "[object has no keys]" : keys.join(", ");
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/utils.js
var SCOPE_ON_START_SPAN_FIELD = "_sentryScope";
var ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope";
function wrapScopeWithWeakRef(scope) {
  try {
    const WeakRefClass = GLOBAL_OBJ.WeakRef;
    if (typeof WeakRefClass === "function") {
      return new WeakRefClass(scope);
    }
  } catch {}
  return scope;
}
function unwrapScopeFromWeakRef(scopeRef) {
  if (!scopeRef) {
    return;
  }
  if (typeof scopeRef === "object" && "deref" in scopeRef && typeof scopeRef.deref === "function") {
    try {
      return scopeRef.deref();
    } catch {
      return;
    }
  }
  return scopeRef;
}
function setCapturedScopesOnSpan(span, scope, isolationScope) {
  if (span) {
    addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, wrapScopeWithWeakRef(isolationScope));
    addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);
  }
}
function getCapturedScopesOnSpan(span) {
  const spanWithScopes = span;
  return {
    scope: spanWithScopes[SCOPE_ON_START_SPAN_FIELD],
    isolationScope: unwrapScopeFromWeakRef(spanWithScopes[ISOLATION_SCOPE_ON_START_SPAN_FIELD])
  };
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/spanstatus.js
var SPAN_STATUS_UNSET = 0;
var SPAN_STATUS_OK = 1;
var SPAN_STATUS_ERROR = 2;
function getSpanStatusFromHttpCode(httpStatus) {
  if (httpStatus < 400 && httpStatus >= 100) {
    return { code: SPAN_STATUS_OK };
  }
  if (httpStatus >= 400 && httpStatus < 500) {
    switch (httpStatus) {
      case 401:
        return { code: SPAN_STATUS_ERROR, message: "unauthenticated" };
      case 403:
        return { code: SPAN_STATUS_ERROR, message: "permission_denied" };
      case 404:
        return { code: SPAN_STATUS_ERROR, message: "not_found" };
      case 409:
        return { code: SPAN_STATUS_ERROR, message: "already_exists" };
      case 413:
        return { code: SPAN_STATUS_ERROR, message: "failed_precondition" };
      case 429:
        return { code: SPAN_STATUS_ERROR, message: "resource_exhausted" };
      case 499:
        return { code: SPAN_STATUS_ERROR, message: "cancelled" };
      default:
        return { code: SPAN_STATUS_ERROR, message: "invalid_argument" };
    }
  }
  if (httpStatus >= 500 && httpStatus < 600) {
    switch (httpStatus) {
      case 501:
        return { code: SPAN_STATUS_ERROR, message: "unimplemented" };
      case 503:
        return { code: SPAN_STATUS_ERROR, message: "unavailable" };
      case 504:
        return { code: SPAN_STATUS_ERROR, message: "deadline_exceeded" };
      default:
        return { code: SPAN_STATUS_ERROR, message: "internal_error" };
    }
  }
  return { code: SPAN_STATUS_ERROR, message: "internal_error" };
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/randomSafeContext.js
var RESOLVED_RUNNER;
function withRandomSafeContext(cb) {
  if (RESOLVED_RUNNER !== undefined) {
    return RESOLVED_RUNNER ? RESOLVED_RUNNER(cb) : cb();
  }
  const sym = Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__");
  const globalWithSymbol = GLOBAL_OBJ;
  if (sym in globalWithSymbol && typeof globalWithSymbol[sym] === "function") {
    RESOLVED_RUNNER = globalWithSymbol[sym];
    return RESOLVED_RUNNER(cb);
  }
  RESOLVED_RUNNER = null;
  return cb();
}
function safeMathRandom() {
  return withRandomSafeContext(() => Math.random());
}
function safeDateNow() {
  return withRandomSafeContext(() => Date.now());
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/stacktrace.js
var STACKTRACE_FRAME_LIMIT = 50;
var UNKNOWN_FUNCTION = "?";
var WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
var STRIP_FRAME_REGEXP = /captureMessage|captureException/;
function createStackParser(...parsers) {
  const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]);
  return (stack, skipFirstLines = 0, framesToPop = 0) => {
    const frames = [];
    const lines = stack.split(`
`);
    for (let i = skipFirstLines;i < lines.length; i++) {
      let line = lines[i];
      if (line.length > 1024) {
        line = line.slice(0, 1024);
      }
      const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line;
      if (cleanedLine.match(/\S*Error: /)) {
        continue;
      }
      for (const parser of sortedParsers) {
        const frame = parser(cleanedLine);
        if (frame) {
          frames.push(frame);
          break;
        }
      }
      if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {
        break;
      }
    }
    return stripSentryFramesAndReverse(frames.slice(framesToPop));
  };
}
function stackParserFromStackParserOptions(stackParser) {
  if (Array.isArray(stackParser)) {
    return createStackParser(...stackParser);
  }
  return stackParser;
}
function stripSentryFramesAndReverse(stack) {
  if (!stack.length) {
    return [];
  }
  const localStack = Array.from(stack);
  if (/sentryWrapped/.test(getLastStackFrame(localStack).function || "")) {
    localStack.pop();
  }
  localStack.reverse();
  if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || "")) {
    localStack.pop();
    if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || "")) {
      localStack.pop();
    }
  }
  return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({
    ...frame,
    filename: frame.filename || getLastStackFrame(localStack).filename,
    function: frame.function || UNKNOWN_FUNCTION
  }));
}
function getLastStackFrame(arr) {
  return arr[arr.length - 1] || {};
}
var defaultFunctionName = "<anonymous>";
function getFunctionName(fn) {
  try {
    if (!fn || typeof fn !== "function") {
      return defaultFunctionName;
    }
    return fn.name || defaultFunctionName;
  } catch {
    return defaultFunctionName;
  }
}
function getVueInternalName(value) {
  const isVNode = "__v_isVNode" in value && value.__v_isVNode;
  return isVNode ? "[VueVNode]" : "[VueViewModel]";
}
function normalizeStackTracePath(path) {
  let filename = path?.startsWith("file://") ? path.slice(7) : path;
  if (filename?.match(/\/[A-Z]:/)) {
    filename = filename.slice(1);
  }
  return filename;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/string.js
function truncate(str, max = 0) {
  if (typeof str !== "string" || max === 0) {
    return str;
  }
  return str.length <= max ? str : `${str.slice(0, max)}...`;
}
function snipLine(line, colno) {
  let newLine = line;
  const lineLength = newLine.length;
  if (lineLength <= 150) {
    return newLine;
  }
  if (colno > lineLength) {
    colno = lineLength;
  }
  let start = Math.max(colno - 60, 0);
  if (start < 5) {
    start = 0;
  }
  let end = Math.min(start + 140, lineLength);
  if (end > lineLength - 5) {
    end = lineLength;
  }
  if (end === lineLength) {
    start = Math.max(end - 140, 0);
  }
  newLine = newLine.slice(start, end);
  if (start > 0) {
    newLine = `'{snip} ${newLine}`;
  }
  if (end < lineLength) {
    newLine += " {snip}";
  }
  return newLine;
}
function safeJoin(input, delimiter) {
  if (!Array.isArray(input)) {
    return "";
  }
  const output = [];
  for (let i = 0;i < input.length; i++) {
    const value = input[i];
    try {
      if (isVueViewModel(value)) {
        output.push(getVueInternalName(value));
      } else {
        output.push(String(value));
      }
    } catch {
      output.push("[value cannot be serialized]");
    }
  }
  return output.join(delimiter);
}
function isMatchingPattern(value, pattern, requireExactStringMatch = false) {
  if (!isString(value)) {
    return false;
  }
  if (isRegExp(pattern)) {
    return pattern.test(value);
  }
  if (isString(pattern)) {
    return requireExactStringMatch ? value === pattern : value.includes(pattern);
  }
  return false;
}
function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = false) {
  return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch));
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/misc.js
function getCrypto() {
  const gbl = GLOBAL_OBJ;
  return gbl.crypto || gbl.msCrypto;
}
var emptyUuid;
function getRandomByte() {
  return safeMathRandom() * 16;
}
function uuid4(crypto2 = getCrypto()) {
  try {
    if (crypto2?.randomUUID) {
      return withRandomSafeContext(() => crypto2.randomUUID()).replace(/-/g, "");
    }
  } catch {}
  if (!emptyUuid) {
    emptyUuid = [1e7] + 1000 + 4000 + 8000 + 100000000000;
  }
  return emptyUuid.replace(/[018]/g, (c) => (c ^ (getRandomByte() & 15) >> c / 4).toString(16));
}
function getFirstException(event) {
  return event.exception?.values?.[0];
}
function getEventDescription(event) {
  const { message, event_id: eventId } = event;
  if (message) {
    return message;
  }
  const firstException = getFirstException(event);
  if (firstException) {
    if (firstException.type && firstException.value) {
      return `${firstException.type}: ${firstException.value}`;
    }
    return firstException.type || firstException.value || eventId || "<unknown>";
  }
  return eventId || "<unknown>";
}
function addExceptionTypeValue(event, value, type) {
  const exception = event.exception = event.exception || {};
  const values = exception.values = exception.values || [];
  const firstException = values[0] = values[0] || {};
  if (!firstException.value) {
    firstException.value = value || "";
  }
  if (!firstException.type) {
    firstException.type = type || "Error";
  }
}
function addExceptionMechanism(event, newMechanism) {
  const firstException = getFirstException(event);
  if (!firstException) {
    return;
  }
  const defaultMechanism = { type: "generic", handled: true };
  const currentMechanism = firstException.mechanism;
  firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };
  if (newMechanism && "data" in newMechanism) {
    const mergedData = { ...currentMechanism?.data, ...newMechanism.data };
    firstException.mechanism.data = mergedData;
  }
}
var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
function _parseInt(input) {
  return parseInt(input || "", 10);
}
function parseSemver(input) {
  const match = input.match(SEMVER_REGEXP) || [];
  const major = _parseInt(match[1]);
  const minor = _parseInt(match[2]);
  const patch = _parseInt(match[3]);
  return {
    buildmetadata: match[5],
    major: isNaN(major) ? undefined : major,
    minor: isNaN(minor) ? undefined : minor,
    patch: isNaN(patch) ? undefined : patch,
    prerelease: match[4]
  };
}
function checkOrSetAlreadyCaught(exception) {
  if (isAlreadyCaptured(exception)) {
    return true;
  }
  try {
    addNonEnumerableProperty(exception, "__sentry_captured__", true);
  } catch {}
  return false;
}
function isAlreadyCaptured(exception) {
  try {
    return exception.__sentry_captured__;
  } catch {}
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/time.js
var ONE_SECOND_IN_MS = 1000;
function dateTimestampInSeconds() {
  return safeDateNow() / ONE_SECOND_IN_MS;
}
function createUnixTimestampInSecondsFunc() {
  const { performance: performance2 } = GLOBAL_OBJ;
  if (!performance2?.now || !performance2.timeOrigin) {
    return dateTimestampInSeconds;
  }
  const timeOrigin = performance2.timeOrigin;
  return () => {
    return (timeOrigin + withRandomSafeContext(() => performance2.now())) / ONE_SECOND_IN_MS;
  };
}
var _cachedTimestampInSeconds;
function timestampInSeconds() {
  const func = _cachedTimestampInSeconds ?? (_cachedTimestampInSeconds = createUnixTimestampInSecondsFunc());
  return func();
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/session.js
function makeSession(context) {
  const startingTime = timestampInSeconds();
  const session = {
    sid: uuid4(),
    init: true,
    timestamp: startingTime,
    started: startingTime,
    duration: 0,
    status: "ok",
    errors: 0,
    ignoreDuration: false,
    toJSON: () => sessionToJSON(session)
  };
  if (context) {
    updateSession(session, context);
  }
  return session;
}
function updateSession(session, context = {}) {
  if (context.user) {
    if (!session.ipAddress && context.user.ip_address) {
      session.ipAddress = context.user.ip_address;
    }
    if (!session.did && !context.did) {
      session.did = context.user.id || context.user.email || context.user.username;
    }
  }
  session.timestamp = context.timestamp || timestampInSeconds();
  if (context.abnormal_mechanism) {
    session.abnormal_mechanism = context.abnormal_mechanism;
  }
  if (context.ignoreDuration) {
    session.ignoreDuration = context.ignoreDuration;
  }
  if (context.sid) {
    session.sid = context.sid.length === 32 ? context.sid : uuid4();
  }
  if (context.init !== undefined) {
    session.init = context.init;
  }
  if (!session.did && context.did) {
    session.did = `${context.did}`;
  }
  if (typeof context.started === "number") {
    session.started = context.started;
  }
  if (session.ignoreDuration) {
    session.duration = undefined;
  } else if (typeof context.duration === "number") {
    session.duration = context.duration;
  } else {
    const duration = session.timestamp - session.started;
    session.duration = duration >= 0 ? duration : 0;
  }
  if (context.release) {
    session.release = context.release;
  }
  if (context.environment) {
    session.environment = context.environment;
  }
  if (!session.ipAddress && context.ipAddress) {
    session.ipAddress = context.ipAddress;
  }
  if (!session.userAgent && context.userAgent) {
    session.userAgent = context.userAgent;
  }
  if (typeof context.errors === "number") {
    session.errors = context.errors;
  }
  if (context.status) {
    session.status = context.status;
  }
}
function closeSession(session, status) {
  let context = {};
  if (status) {
    context = { status };
  } else if (session.status === "ok") {
    context = { status: "exited" };
  }
  updateSession(session, context);
}
function sessionToJSON(session) {
  return {
    sid: `${session.sid}`,
    init: session.init,
    started: new Date(session.started * 1000).toISOString(),
    timestamp: new Date(session.timestamp * 1000).toISOString(),
    status: session.status,
    errors: session.errors,
    did: typeof session.did === "number" || typeof session.did === "string" ? `${session.did}` : undefined,
    duration: session.duration,
    abnormal_mechanism: session.abnormal_mechanism,
    attrs: {
      release: session.release,
      environment: session.environment,
      ip_address: session.ipAddress,
      user_agent: session.userAgent
    }
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/merge.js
function merge(initialObj, mergeObj, levels = 2) {
  if (!mergeObj || typeof mergeObj !== "object" || levels <= 0) {
    return mergeObj;
  }
  if (initialObj && Object.keys(mergeObj).length === 0) {
    return initialObj;
  }
  const output = { ...initialObj };
  for (const key in mergeObj) {
    if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {
      output[key] = merge(output[key], mergeObj[key], levels - 1);
    }
  }
  return output;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/propagationContext.js
function generateTraceId() {
  return uuid4();
}
function generateSpanId() {
  return uuid4().substring(16);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/spanOnScope.js
var SCOPE_SPAN_FIELD = "_sentrySpan";
function _setSpanForScope(scope, span) {
  if (span) {
    addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span);
  } else {
    delete scope[SCOPE_SPAN_FIELD];
  }
}
function _getSpanForScope(scope) {
  return scope[SCOPE_SPAN_FIELD];
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/scope.js
var DEFAULT_MAX_BREADCRUMBS = 100;

class Scope {
  constructor() {
    this._notifyingListeners = false;
    this._scopeListeners = [];
    this._eventProcessors = [];
    this._breadcrumbs = [];
    this._attachments = [];
    this._user = {};
    this._tags = {};
    this._attributes = {};
    this._extra = {};
    this._contexts = {};
    this._sdkProcessingMetadata = {};
    this._propagationContext = {
      traceId: generateTraceId(),
      sampleRand: safeMathRandom()
    };
  }
  clone() {
    const newScope = new Scope;
    newScope._breadcrumbs = [...this._breadcrumbs];
    newScope._tags = { ...this._tags };
    newScope._attributes = { ...this._attributes };
    newScope._extra = { ...this._extra };
    newScope._contexts = { ...this._contexts };
    if (this._contexts.flags) {
      newScope._contexts.flags = {
        values: [...this._contexts.flags.values]
      };
    }
    newScope._user = this._user;
    newScope._level = this._level;
    newScope._session = this._session;
    newScope._transactionName = this._transactionName;
    newScope._fingerprint = this._fingerprint;
    newScope._eventProcessors = [...this._eventProcessors];
    newScope._attachments = [...this._attachments];
    newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };
    newScope._propagationContext = { ...this._propagationContext };
    newScope._client = this._client;
    newScope._lastEventId = this._lastEventId;
    newScope._conversationId = this._conversationId;
    _setSpanForScope(newScope, _getSpanForScope(this));
    return newScope;
  }
  setClient(client) {
    this._client = client;
  }
  setLastEventId(lastEventId) {
    this._lastEventId = lastEventId;
  }
  getClient() {
    return this._client;
  }
  lastEventId() {
    return this._lastEventId;
  }
  addScopeListener(callback) {
    this._scopeListeners.push(callback);
  }
  addEventProcessor(callback) {
    this._eventProcessors.push(callback);
    return this;
  }
  setUser(user) {
    this._user = user || {
      email: undefined,
      id: undefined,
      ip_address: undefined,
      username: undefined
    };
    if (this._session) {
      updateSession(this._session, { user });
    }
    this._notifyScopeListeners();
    return this;
  }
  getUser() {
    return this._user;
  }
  setConversationId(conversationId) {
    this._conversationId = conversationId || undefined;
    this._notifyScopeListeners();
    return this;
  }
  setTags(tags) {
    this._tags = {
      ...this._tags,
      ...tags
    };
    this._notifyScopeListeners();
    return this;
  }
  setTag(key, value) {
    return this.setTags({ [key]: value });
  }
  setAttributes(newAttributes) {
    this._attributes = {
      ...this._attributes,
      ...newAttributes
    };
    this._notifyScopeListeners();
    return this;
  }
  setAttribute(key, value) {
    return this.setAttributes({ [key]: value });
  }
  removeAttribute(key) {
    if (key in this._attributes) {
      delete this._attributes[key];
      this._notifyScopeListeners();
    }
    return this;
  }
  setExtras(extras) {
    this._extra = {
      ...this._extra,
      ...extras
    };
    this._notifyScopeListeners();
    return this;
  }
  setExtra(key, extra) {
    this._extra = { ...this._extra, [key]: extra };
    this._notifyScopeListeners();
    return this;
  }
  setFingerprint(fingerprint) {
    this._fingerprint = fingerprint;
    this._notifyScopeListeners();
    return this;
  }
  setLevel(level) {
    this._level = level;
    this._notifyScopeListeners();
    return this;
  }
  setTransactionName(name) {
    this._transactionName = name;
    this._notifyScopeListeners();
    return this;
  }
  setContext(key, context) {
    if (context === null) {
      delete this._contexts[key];
    } else {
      this._contexts[key] = context;
    }
    this._notifyScopeListeners();
    return this;
  }
  setSession(session) {
    if (!session) {
      delete this._session;
    } else {
      this._session = session;
    }
    this._notifyScopeListeners();
    return this;
  }
  getSession() {
    return this._session;
  }
  update(captureContext) {
    if (!captureContext) {
      return this;
    }
    const scopeToMerge = typeof captureContext === "function" ? captureContext(this) : captureContext;
    const scopeInstance = scopeToMerge instanceof Scope ? scopeToMerge.getScopeData() : isPlainObject(scopeToMerge) ? captureContext : undefined;
    const {
      tags,
      attributes,
      extra,
      user,
      contexts,
      level,
      fingerprint = [],
      propagationContext,
      conversationId
    } = scopeInstance || {};
    this._tags = { ...this._tags, ...tags };
    this._attributes = { ...this._attributes, ...attributes };
    this._extra = { ...this._extra, ...extra };
    this._contexts = { ...this._contexts, ...contexts };
    if (user && Object.keys(user).length) {
      this._user = user;
    }
    if (level) {
      this._level = level;
    }
    if (fingerprint.length) {
      this._fingerprint = fingerprint;
    }
    if (propagationContext) {
      this._propagationContext = propagationContext;
    }
    if (conversationId) {
      this._conversationId = conversationId;
    }
    return this;
  }
  clear() {
    this._breadcrumbs = [];
    this._tags = {};
    this._attributes = {};
    this._extra = {};
    this._user = {};
    this._contexts = {};
    this._level = undefined;
    this._transactionName = undefined;
    this._fingerprint = undefined;
    this._session = undefined;
    this._conversationId = undefined;
    _setSpanForScope(this, undefined);
    this._attachments = [];
    this.setPropagationContext({
      traceId: generateTraceId(),
      sampleRand: safeMathRandom()
    });
    this._notifyScopeListeners();
    return this;
  }
  addBreadcrumb(breadcrumb, maxBreadcrumbs) {
    const maxCrumbs = typeof maxBreadcrumbs === "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;
    if (maxCrumbs <= 0) {
      return this;
    }
    const mergedBreadcrumb = {
      timestamp: dateTimestampInSeconds(),
      ...breadcrumb,
      message: breadcrumb.message ? truncate(breadcrumb.message, 2048) : breadcrumb.message
    };
    this._breadcrumbs.push(mergedBreadcrumb);
    if (this._breadcrumbs.length > maxCrumbs) {
      this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);
      this._client?.recordDroppedEvent("buffer_overflow", "log_item");
    }
    this._notifyScopeListeners();
    return this;
  }
  getLastBreadcrumb() {
    return this._breadcrumbs[this._breadcrumbs.length - 1];
  }
  clearBreadcrumbs() {
    this._breadcrumbs = [];
    this._notifyScopeListeners();
    return this;
  }
  addAttachment(attachment) {
    this._attachments.push(attachment);
    return this;
  }
  clearAttachments() {
    this._attachments = [];
    return this;
  }
  getScopeData() {
    return {
      breadcrumbs: this._breadcrumbs,
      attachments: this._attachments,
      contexts: this._contexts,
      tags: this._tags,
      attributes: this._attributes,
      extra: this._extra,
      user: this._user,
      level: this._level,
      fingerprint: this._fingerprint || [],
      eventProcessors: this._eventProcessors,
      propagationContext: this._propagationContext,
      sdkProcessingMetadata: this._sdkProcessingMetadata,
      transactionName: this._transactionName,
      span: _getSpanForScope(this),
      conversationId: this._conversationId
    };
  }
  setSDKProcessingMetadata(newData) {
    this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);
    return this;
  }
  setPropagationContext(context) {
    this._propagationContext = context;
    return this;
  }
  getPropagationContext() {
    return this._propagationContext;
  }
  captureException(exception, hint) {
    const eventId = hint?.event_id || uuid4();
    if (!this._client) {
      DEBUG_BUILD && debug.warn("No client configured on scope - will not capture exception!");
      return eventId;
    }
    const syntheticException = new Error("Sentry syntheticException");
    this._client.captureException(exception, {
      originalException: exception,
      syntheticException,
      ...hint,
      event_id: eventId
    }, this);
    return eventId;
  }
  captureMessage(message, level, hint) {
    const eventId = hint?.event_id || uuid4();
    if (!this._client) {
      DEBUG_BUILD && debug.warn("No client configured on scope - will not capture message!");
      return eventId;
    }
    const syntheticException = hint?.syntheticException ?? new Error(message);
    this._client.captureMessage(message, level, {
      originalException: message,
      syntheticException,
      ...hint,
      event_id: eventId
    }, this);
    return eventId;
  }
  captureEvent(event, hint) {
    const eventId = event.event_id || hint?.event_id || uuid4();
    if (!this._client) {
      DEBUG_BUILD && debug.warn("No client configured on scope - will not capture event!");
      return eventId;
    }
    this._client.captureEvent(event, { ...hint, event_id: eventId }, this);
    return eventId;
  }
  _notifyScopeListeners() {
    if (!this._notifyingListeners) {
      this._notifyingListeners = true;
      this._scopeListeners.forEach((callback) => {
        callback(this);
      });
      this._notifyingListeners = false;
    }
  }
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/defaultScopes.js
function getDefaultCurrentScope() {
  return getGlobalSingleton("defaultCurrentScope", () => new Scope);
}
function getDefaultIsolationScope() {
  return getGlobalSingleton("defaultIsolationScope", () => new Scope);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/chain-and-copy-promiselike.js
var isActualPromise = (p) => p instanceof Promise && !p[kChainedCopy];
var kChainedCopy = Symbol("chained PromiseLike");
var chainAndCopyPromiseLike = (original, onSuccess, onError) => {
  const chained = original.then((value) => {
    onSuccess(value);
    return value;
  }, (err) => {
    onError(err);
    throw err;
  });
  return isActualPromise(chained) && isActualPromise(original) ? chained : copyProps(original, chained);
};
var copyProps = (original, chained) => {
  let mutated = false;
  for (const key in original) {
    if (key in chained)
      continue;
    mutated = true;
    const value = original[key];
    if (typeof value === "function") {
      Object.defineProperty(chained, key, {
        value: (...args) => value.apply(original, args),
        enumerable: true,
        configurable: true,
        writable: true
      });
    } else {
      chained[key] = value;
    }
  }
  if (mutated)
    Object.assign(chained, { [kChainedCopy]: true });
  return chained;
};

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js
class AsyncContextStack {
  constructor(scope, isolationScope) {
    let assignedScope;
    if (!scope) {
      assignedScope = new Scope;
    } else {
      assignedScope = scope;
    }
    let assignedIsolationScope;
    if (!isolationScope) {
      assignedIsolationScope = new Scope;
    } else {
      assignedIsolationScope = isolationScope;
    }
    this._stack = [{ scope: assignedScope }];
    this._isolationScope = assignedIsolationScope;
  }
  withScope(callback) {
    const scope = this._pushScope();
    let maybePromiseResult;
    try {
      maybePromiseResult = callback(scope);
    } catch (e) {
      this._popScope();
      throw e;
    }
    if (isThenable(maybePromiseResult)) {
      return chainAndCopyPromiseLike(maybePromiseResult, () => this._popScope(), () => this._popScope());
    }
    this._popScope();
    return maybePromiseResult;
  }
  getClient() {
    return this.getStackTop().client;
  }
  getScope() {
    return this.getStackTop().scope;
  }
  getIsolationScope() {
    return this._isolationScope;
  }
  getStackTop() {
    return this._stack[this._stack.length - 1];
  }
  _pushScope() {
    const scope = this.getScope().clone();
    this._stack.push({
      client: this.getClient(),
      scope
    });
    return scope;
  }
  _popScope() {
    if (this._stack.length <= 1)
      return false;
    return !!this._stack.pop();
  }
}
function getAsyncContextStack() {
  const registry = getMainCarrier();
  const sentry = getSentryCarrier(registry);
  return sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope());
}
function withScope(callback) {
  return getAsyncContextStack().withScope(callback);
}
function withSetScope(scope, callback) {
  const stack = getAsyncContextStack();
  return stack.withScope(() => {
    stack.getStackTop().scope = scope;
    return callback(scope);
  });
}
function withIsolationScope(callback) {
  return getAsyncContextStack().withScope(() => {
    return callback(getAsyncContextStack().getIsolationScope());
  });
}
function getStackAsyncContextStrategy() {
  return {
    withIsolationScope,
    withScope,
    withSetScope,
    withSetIsolationScope: (_isolationScope, callback) => {
      return withIsolationScope(callback);
    },
    getCurrentScope: () => getAsyncContextStack().getScope(),
    getIsolationScope: () => getAsyncContextStack().getIsolationScope()
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/asyncContext/index.js
function setAsyncContextStrategy(strategy) {
  const registry = getMainCarrier();
  const sentry = getSentryCarrier(registry);
  sentry.acs = strategy;
}
function getAsyncContextStrategy(carrier) {
  const sentry = getSentryCarrier(carrier);
  if (sentry.acs) {
    return sentry.acs;
  }
  return getStackAsyncContextStrategy();
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/currentScopes.js
function getCurrentScope() {
  const carrier = getMainCarrier();
  const acs = getAsyncContextStrategy(carrier);
  return acs.getCurrentScope();
}
function getIsolationScope() {
  const carrier = getMainCarrier();
  const acs = getAsyncContextStrategy(carrier);
  return acs.getIsolationScope();
}
function getGlobalScope() {
  return getGlobalSingleton("globalScope", () => new Scope);
}
function withScope2(...rest) {
  const carrier = getMainCarrier();
  const acs = getAsyncContextStrategy(carrier);
  if (rest.length === 2) {
    const [scope, callback] = rest;
    if (!scope) {
      return acs.withScope(callback);
    }
    return acs.withSetScope(scope, callback);
  }
  return acs.withScope(rest[0]);
}
function withIsolationScope2(...rest) {
  const carrier = getMainCarrier();
  const acs = getAsyncContextStrategy(carrier);
  if (rest.length === 2) {
    const [isolationScope, callback] = rest;
    if (!isolationScope) {
      return acs.withIsolationScope(callback);
    }
    return acs.withSetIsolationScope(isolationScope, callback);
  }
  return acs.withIsolationScope(rest[0]);
}
function getClient() {
  return getCurrentScope().getClient();
}
function getTraceContextFromScope(scope) {
  const propagationContext = scope.getPropagationContext();
  const { traceId, parentSpanId, propagationSpanId } = propagationContext;
  const traceContext = {
    trace_id: traceId,
    span_id: propagationSpanId || generateSpanId()
  };
  if (parentSpanId) {
    traceContext.parent_span_id = parentSpanId;
  }
  return traceContext;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/semanticAttributes.js
var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source";
var SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate";
var SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = "sentry.previous_trace_sample_rate";
var SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op";
var SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin";
var SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit";
var SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value";
var SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = "sentry.custom_span_name";
var SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id";
var SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time";
var SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = "http.request.method";
var SEMANTIC_ATTRIBUTE_URL_FULL = "url.full";
var GEN_AI_CONVERSATION_ID_ATTRIBUTE = "gen_ai.conversation.id";

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/baggage.js
var SENTRY_BAGGAGE_KEY_PREFIX = "sentry-";
var MAX_BAGGAGE_STRING_LENGTH = 8192;
function baggageHeaderToDynamicSamplingContext(baggageHeader) {
  const baggageObject = parseBaggageHeader(baggageHeader);
  if (!baggageObject) {
    return;
  }
  const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {
    if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {
      const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);
      acc[nonPrefixedKey] = value;
    }
    return acc;
  }, {});
  if (Object.keys(dynamicSamplingContext).length > 0) {
    return dynamicSamplingContext;
  } else {
    return;
  }
}
function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) {
  if (!dynamicSamplingContext) {
    return;
  }
  const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce((acc, [dscKey, dscValue]) => {
    if (dscValue) {
      acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;
    }
    return acc;
  }, {});
  return objectToBaggageHeader(sentryPrefixedDSC);
}
function parseBaggageHeader(baggageHeader) {
  if (!baggageHeader || !isString(baggageHeader) && !Array.isArray(baggageHeader)) {
    return;
  }
  if (Array.isArray(baggageHeader)) {
    return baggageHeader.reduce((acc, curr) => {
      const currBaggageObject = baggageHeaderToObject(curr);
      Object.entries(currBaggageObject).forEach(([key, value]) => {
        acc[key] = value;
      });
      return acc;
    }, {});
  }
  return baggageHeaderToObject(baggageHeader);
}
function baggageHeaderToObject(baggageHeader) {
  return baggageHeader.split(",").map((baggageEntry) => {
    const eqIdx = baggageEntry.indexOf("=");
    if (eqIdx === -1) {
      return [];
    }
    const key = baggageEntry.slice(0, eqIdx);
    const value = baggageEntry.slice(eqIdx + 1);
    return [key, value].map((keyOrValue) => {
      try {
        return decodeURIComponent(keyOrValue.trim());
      } catch {
        return;
      }
    });
  }).reduce((acc, [key, value]) => {
    if (key && value) {
      acc[key] = value;
    }
    return acc;
  }, {});
}
function objectToBaggageHeader(object) {
  if (Object.keys(object).length === 0) {
    return;
  }
  return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {
    const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;
    const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;
    if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {
      DEBUG_BUILD && debug.warn(`Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`);
      return baggageHeader;
    } else {
      return newBaggageHeader;
    }
  }, "");
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/handleCallbackErrors.js
function handleCallbackErrors(fn, onError, onFinally = () => {}, onSuccess = () => {}) {
  let maybePromiseResult;
  try {
    maybePromiseResult = fn();
  } catch (e) {
    onError(e);
    onFinally();
    throw e;
  }
  return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally, onSuccess);
}
function maybeHandlePromiseRejection(value, onError, onFinally, onSuccess) {
  if (isThenable(value)) {
    return chainAndCopyPromiseLike(value, (result) => {
      onFinally();
      onSuccess(result);
    }, (err) => {
      onError(err);
      onFinally();
    });
  }
  onFinally();
  onSuccess(value);
  return value;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/hasSpansEnabled.js
function hasSpansEnabled(maybeOptions) {
  if (typeof __SENTRY_TRACING__ === "boolean" && !__SENTRY_TRACING__) {
    return false;
  }
  const options = maybeOptions || getClient()?.getOptions();
  return !!options && (options.tracesSampleRate != null || !!options.tracesSampler);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/parseSampleRate.js
function parseSampleRate(sampleRate) {
  if (typeof sampleRate === "boolean") {
    return Number(sampleRate);
  }
  const rate = typeof sampleRate === "string" ? parseFloat(sampleRate) : sampleRate;
  if (typeof rate !== "number" || isNaN(rate) || rate < 0 || rate > 1) {
    return;
  }
  return rate;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/dsn.js
var ORG_ID_REGEX = /^o(\d+)\./;
var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
function isValidProtocol(protocol) {
  return protocol === "http" || protocol === "https";
}
function dsnToString(dsn, withPassword = false) {
  const { host, path, pass, port, projectId, protocol, publicKey } = dsn;
  return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}` + `@${host}${port ? `:${port}` : ""}/${path ? `${path}/` : path}${projectId}`;
}
function dsnFromString(str) {
  const match = DSN_REGEX.exec(str);
  if (!match) {
    consoleSandbox(() => {
      console.error(`Invalid Sentry Dsn: ${str}`);
    });
    return;
  }
  const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match.slice(1);
  let path = "";
  let projectId = lastPath;
  const split = projectId.split("/");
  if (split.length > 1) {
    path = split.slice(0, -1).join("/");
    projectId = split.pop();
  }
  if (projectId) {
    const projectMatch = projectId.match(/^\d+/);
    if (projectMatch) {
      projectId = projectMatch[0];
    }
  }
  return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey });
}
function dsnFromComponents(components) {
  return {
    protocol: components.protocol,
    publicKey: components.publicKey || "",
    pass: components.pass || "",
    host: components.host,
    port: components.port || "",
    path: components.path || "",
    projectId: components.projectId
  };
}
function validateDsn(dsn) {
  if (!DEBUG_BUILD) {
    return true;
  }
  const { port, projectId, protocol } = dsn;
  const requiredComponents = ["protocol", "publicKey", "host", "projectId"];
  const hasMissingRequiredComponent = requiredComponents.find((component) => {
    if (!dsn[component]) {
      debug.error(`Invalid Sentry Dsn: ${component} missing`);
      return true;
    }
    return false;
  });
  if (hasMissingRequiredComponent) {
    return false;
  }
  if (!projectId.match(/^\d+$/)) {
    debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
    return false;
  }
  if (!isValidProtocol(protocol)) {
    debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
    return false;
  }
  if (port && isNaN(parseInt(port, 10))) {
    debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);
    return false;
  }
  return true;
}
function extractOrgIdFromDsnHost(host) {
  const match = host.match(ORG_ID_REGEX);
  return match?.[1];
}
function extractOrgIdFromClient(client) {
  const options = client.getOptions();
  const { host } = client.getDsn() || {};
  let org_id;
  if (options.orgId) {
    org_id = String(options.orgId);
  } else if (host) {
    org_id = extractOrgIdFromDsnHost(host);
  }
  return org_id;
}
function makeDsn(from) {
  const components = typeof from === "string" ? dsnFromString(from) : dsnFromComponents(from);
  if (!components || !validateDsn(components)) {
    return;
  }
  return components;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/tracing.js
var TRACEPARENT_REGEXP = new RegExp("^[ \\t]*" + "([0-9a-f]{32})?" + "-?([0-9a-f]{16})?" + "-?([01])?" + "[ \\t]*$");
function extractTraceparentData(traceparent) {
  if (!traceparent) {
    return;
  }
  const matches = traceparent.match(TRACEPARENT_REGEXP);
  if (!matches) {
    return;
  }
  let parentSampled;
  if (matches[3] === "1") {
    parentSampled = true;
  } else if (matches[3] === "0") {
    parentSampled = false;
  }
  return {
    traceId: matches[1],
    parentSampled,
    parentSpanId: matches[2]
  };
}
function propagationContextFromHeaders(sentryTrace, baggage) {
  const traceparentData = extractTraceparentData(sentryTrace);
  const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);
  if (!traceparentData?.traceId) {
    return {
      traceId: generateTraceId(),
      sampleRand: safeMathRandom()
    };
  }
  const sampleRand = getSampleRandFromTraceparentAndDsc(traceparentData, dynamicSamplingContext);
  if (dynamicSamplingContext) {
    dynamicSamplingContext.sample_rand = sampleRand.toString();
  }
  const { traceId, parentSpanId, parentSampled } = traceparentData;
  return {
    traceId,
    parentSpanId,
    sampled: parentSampled,
    dsc: dynamicSamplingContext || {},
    sampleRand
  };
}
function generateSentryTraceHeader(traceId = generateTraceId(), spanId = generateSpanId(), sampled) {
  let sampledString = "";
  if (sampled !== undefined) {
    sampledString = sampled ? "-1" : "-0";
  }
  return `${traceId}-${spanId}${sampledString}`;
}
function generateTraceparentHeader(traceId = generateTraceId(), spanId = generateSpanId(), sampled) {
  return `00-${traceId}-${spanId}-${sampled ? "01" : "00"}`;
}
function getSampleRandFromTraceparentAndDsc(traceparentData, dsc) {
  const parsedSampleRand = parseSampleRate(dsc?.sample_rand);
  if (parsedSampleRand !== undefined) {
    return parsedSampleRand;
  }
  const parsedSampleRate = parseSampleRate(dsc?.sample_rate);
  if (parsedSampleRate && traceparentData?.parentSampled !== undefined) {
    return traceparentData.parentSampled ? safeMathRandom() * parsedSampleRate : parsedSampleRate + safeMathRandom() * (1 - parsedSampleRate);
  } else {
    return safeMathRandom();
  }
}
function shouldContinueTrace(client, baggageOrgId) {
  const clientOrgId = extractOrgIdFromClient(client);
  if (baggageOrgId && clientOrgId && baggageOrgId !== clientOrgId) {
    debug.log(`Won't continue trace because org IDs don't match (incoming baggage: ${baggageOrgId}, SDK options: ${clientOrgId})`);
    return false;
  }
  const strictTraceContinuation = client.getOptions().strictTraceContinuation || false;
  if (strictTraceContinuation) {
    if (baggageOrgId && !clientOrgId || !baggageOrgId && clientOrgId) {
      debug.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${baggageOrgId}, Sentry client: ${clientOrgId})`);
      return false;
    }
  }
  return true;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/spanUtils.js
var TRACE_FLAG_NONE = 0;
var TRACE_FLAG_SAMPLED = 1;
var hasShownSpanDropWarning = false;
function spanToTransactionTraceContext(span) {
  const { spanId: span_id, traceId: trace_id } = span.spanContext();
  const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);
  return {
    parent_span_id,
    span_id,
    trace_id,
    data,
    op,
    status,
    origin,
    links
  };
}
function spanToTraceContext(span) {
  const { spanId, traceId: trace_id, isRemote } = span.spanContext();
  const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;
  const scope = getCapturedScopesOnSpan(span).scope;
  const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;
  return {
    parent_span_id,
    span_id,
    trace_id
  };
}
function spanToTraceHeader(span) {
  const { traceId, spanId } = span.spanContext();
  const sampled = spanIsSampled(span);
  return generateSentryTraceHeader(traceId, spanId, sampled);
}
function spanToTraceparentHeader(span) {
  const { traceId, spanId } = span.spanContext();
  const sampled = spanIsSampled(span);
  return generateTraceparentHeader(traceId, spanId, sampled);
}
function convertSpanLinksForEnvelope(links) {
  if (links && links.length > 0) {
    return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({
      span_id: spanId,
      trace_id: traceId,
      sampled: traceFlags === TRACE_FLAG_SAMPLED,
      attributes,
      ...restContext
    }));
  } else {
    return;
  }
}
function spanTimeInputToSeconds(input) {
  if (typeof input === "number") {
    return ensureTimestampInSeconds(input);
  }
  if (Array.isArray(input)) {
    return input[0] + input[1] / 1e9;
  }
  if (input instanceof Date) {
    return ensureTimestampInSeconds(input.getTime());
  }
  return timestampInSeconds();
}
function ensureTimestampInSeconds(timestamp) {
  const isMs = timestamp > 9999999999;
  return isMs ? timestamp / 1000 : timestamp;
}
function spanToJSON(span) {
  if (spanIsSentrySpan(span)) {
    return span.getSpanJSON();
  }
  const { spanId: span_id, traceId: trace_id } = span.spanContext();
  if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {
    const { attributes, startTime, name, endTime, status, links } = span;
    const parentSpanId = "parentSpanId" in span ? span.parentSpanId : ("parentSpanContext" in span) ? span.parentSpanContext?.spanId : undefined;
    return {
      span_id,
      trace_id,
      data: attributes,
      description: name,
      parent_span_id: parentSpanId,
      start_timestamp: spanTimeInputToSeconds(startTime),
      timestamp: spanTimeInputToSeconds(endTime) || undefined,
      status: getStatusMessage(status),
      op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],
      origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],
      links: convertSpanLinksForEnvelope(links)
    };
  }
  return {
    span_id,
    trace_id,
    start_timestamp: 0,
    data: {}
  };
}
function spanIsOpenTelemetrySdkTraceBaseSpan(span) {
  const castSpan = span;
  return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;
}
function spanIsSentrySpan(span) {
  return typeof span.getSpanJSON === "function";
}
function spanIsSampled(span) {
  const { traceFlags } = span.spanContext();
  return traceFlags === TRACE_FLAG_SAMPLED;
}
function getStatusMessage(status) {
  if (!status || status.code === SPAN_STATUS_UNSET) {
    return;
  }
  if (status.code === SPAN_STATUS_OK) {
    return "ok";
  }
  return status.message || "internal_error";
}
var CHILD_SPANS_FIELD = "_sentryChildSpans";
var ROOT_SPAN_FIELD = "_sentryRootSpan";
function addChildSpanToSpan(span, childSpan) {
  const rootSpan = span[ROOT_SPAN_FIELD] || span;
  addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan);
  if (span[CHILD_SPANS_FIELD]) {
    span[CHILD_SPANS_FIELD].add(childSpan);
  } else {
    addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));
  }
}
function getSpanDescendants(span) {
  const resultSet = new Set;
  function addSpanChildren(span2) {
    if (resultSet.has(span2)) {
      return;
    } else if (spanIsSampled(span2)) {
      resultSet.add(span2);
      const childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : [];
      for (const childSpan of childSpans) {
        addSpanChildren(childSpan);
      }
    }
  }
  addSpanChildren(span);
  return Array.from(resultSet);
}
function getRootSpan(span) {
  return span[ROOT_SPAN_FIELD] || span;
}
function getActiveSpan() {
  const carrier = getMainCarrier();
  const acs = getAsyncContextStrategy(carrier);
  if (acs.getActiveSpan) {
    return acs.getActiveSpan();
  }
  return _getSpanForScope(getCurrentScope());
}
function showSpanDropWarning() {
  if (!hasShownSpanDropWarning) {
    consoleSandbox(() => {
      console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.");
    });
    hasShownSpanDropWarning = true;
  }
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/constants.js
var DEFAULT_ENVIRONMENT = "production";

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js
var FROZEN_DSC_FIELD = "_frozenDsc";
function freezeDscOnSpan(span, dsc) {
  const spanWithMaybeDsc = span;
  addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);
}
function getDynamicSamplingContextFromClient(trace_id, client) {
  const options = client.getOptions();
  const { publicKey: public_key } = client.getDsn() || {};
  const dsc = {
    environment: options.environment || DEFAULT_ENVIRONMENT,
    release: options.release,
    public_key,
    trace_id,
    org_id: extractOrgIdFromClient(client)
  };
  client.emit("createDsc", dsc);
  return dsc;
}
function getDynamicSamplingContextFromScope(client, scope) {
  const propagationContext = scope.getPropagationContext();
  return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);
}
function getDynamicSamplingContextFromSpan(span) {
  const client = getClient();
  if (!client) {
    return {};
  }
  const rootSpan = getRootSpan(span);
  const rootSpanJson = spanToJSON(rootSpan);
  const rootSpanAttributes = rootSpanJson.data;
  const traceState = rootSpan.spanContext().traceState;
  const rootSpanSampleRate = traceState?.get("sentry.sample_rate") ?? rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ?? rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE];
  function applyLocalSampleRateToDsc(dsc2) {
    if (typeof rootSpanSampleRate === "number" || typeof rootSpanSampleRate === "string") {
      dsc2.sample_rate = `${rootSpanSampleRate}`;
    }
    return dsc2;
  }
  const frozenDsc = rootSpan[FROZEN_DSC_FIELD];
  if (frozenDsc) {
    return applyLocalSampleRateToDsc(frozenDsc);
  }
  const traceStateDsc = traceState?.get("sentry.dsc");
  const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);
  if (dscOnTraceState) {
    return applyLocalSampleRateToDsc(dscOnTraceState);
  }
  const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);
  const source = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
  const name = rootSpanJson.description;
  if (source !== "url" && name) {
    dsc.transaction = name;
  }
  if (hasSpansEnabled()) {
    dsc.sampled = String(spanIsSampled(rootSpan));
    dsc.sample_rand = traceState?.get("sentry.sample_rand") ?? getCapturedScopesOnSpan(rootSpan).scope?.getPropagationContext().sampleRand.toString();
  }
  applyLocalSampleRateToDsc(dsc);
  client.emit("createDsc", dsc, rootSpan);
  return dsc;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/logSpans.js
function logSpanStart(span) {
  if (!DEBUG_BUILD)
    return;
  const { description = "< unknown name >", op = "< unknown op >", parent_span_id: parentSpanId } = spanToJSON(span);
  const { spanId } = span.spanContext();
  const sampled = spanIsSampled(span);
  const rootSpan = getRootSpan(span);
  const isRootSpan = rootSpan === span;
  const header = `[Tracing] Starting ${sampled ? "sampled" : "unsampled"} ${isRootSpan ? "root " : ""}span`;
  const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];
  if (parentSpanId) {
    infoParts.push(`parent ID: ${parentSpanId}`);
  }
  if (!isRootSpan) {
    const { op: op2, description: description2 } = spanToJSON(rootSpan);
    infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);
    if (op2) {
      infoParts.push(`root op: ${op2}`);
    }
    if (description2) {
      infoParts.push(`root description: ${description2}`);
    }
  }
  debug.log(`${header}
  ${infoParts.join(`
  `)}`);
}
function logSpanEnd(span) {
  if (!DEBUG_BUILD)
    return;
  const { description = "< unknown name >", op = "< unknown op >" } = spanToJSON(span);
  const { spanId } = span.spanContext();
  const rootSpan = getRootSpan(span);
  const isRootSpan = rootSpan === span;
  const msg = `[Tracing] Finishing "${op}" ${isRootSpan ? "root " : ""}span "${description}" with ID ${spanId}`;
  debug.log(msg);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/sampling.js
function sampleSpan(options, samplingContext, sampleRand) {
  if (!hasSpansEnabled(options)) {
    return [false];
  }
  let localSampleRateWasApplied = undefined;
  let sampleRate;
  if (typeof options.tracesSampler === "function") {
    sampleRate = options.tracesSampler({
      ...samplingContext,
      inheritOrSampleWith: (fallbackSampleRate) => {
        if (typeof samplingContext.parentSampleRate === "number") {
          return samplingContext.parentSampleRate;
        }
        if (typeof samplingContext.parentSampled === "boolean") {
          return Number(samplingContext.parentSampled);
        }
        return fallbackSampleRate;
      }
    });
    localSampleRateWasApplied = true;
  } else if (samplingContext.parentSampled !== undefined) {
    sampleRate = samplingContext.parentSampled;
  } else if (typeof options.tracesSampleRate !== "undefined") {
    sampleRate = options.tracesSampleRate;
    localSampleRateWasApplied = true;
  }
  const parsedSampleRate = parseSampleRate(sampleRate);
  if (parsedSampleRate === undefined) {
    DEBUG_BUILD && debug.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(sampleRate)} of type ${JSON.stringify(typeof sampleRate)}.`);
    return [false];
  }
  if (!parsedSampleRate) {
    DEBUG_BUILD && debug.log(`[Tracing] Discarding transaction because ${typeof options.tracesSampler === "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`);
    return [false, parsedSampleRate, localSampleRateWasApplied];
  }
  const shouldSample = sampleRand < parsedSampleRate;
  if (!shouldSample) {
    DEBUG_BUILD && debug.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(sampleRate)})`);
  }
  return [shouldSample, parsedSampleRate, localSampleRateWasApplied];
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js
class SentryNonRecordingSpan {
  constructor(spanContext = {}) {
    this._traceId = spanContext.traceId || generateTraceId();
    this._spanId = spanContext.spanId || generateSpanId();
  }
  spanContext() {
    return {
      spanId: this._spanId,
      traceId: this._traceId,
      traceFlags: TRACE_FLAG_NONE
    };
  }
  end(_timestamp) {}
  setAttribute(_key, _value) {
    return this;
  }
  setAttributes(_values) {
    return this;
  }
  setStatus(_status) {
    return this;
  }
  updateName(_name) {
    return this;
  }
  isRecording() {
    return false;
  }
  addEvent(_name, _attributesOrStartTime, _startTime) {
    return this;
  }
  addLink(_link) {
    return this;
  }
  addLinks(_links) {
    return this;
  }
  recordException(_exception, _time) {}
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/normalize.js
function normalize(input, depth = 100, maxProperties = Infinity) {
  try {
    return visit("", input, depth, maxProperties);
  } catch (err) {
    return { ERROR: `**non-serializable** (${err})` };
  }
}
function normalizeToSize(object, depth = 3, maxSize = 100 * 1024) {
  const normalized = normalize(object, depth);
  if (jsonSize(normalized) > maxSize) {
    return normalizeToSize(object, depth - 1, maxSize);
  }
  return normalized;
}
function visit(key, value, depth = Infinity, maxProperties = Infinity, memo = memoBuilder()) {
  const [memoize, unmemoize] = memo;
  if (value == null || ["boolean", "string"].includes(typeof value) || typeof value === "number" && Number.isFinite(value)) {
    return value;
  }
  const stringified = stringifyValue(key, value);
  if (!stringified.startsWith("[object ")) {
    return stringified;
  }
  if (value["__sentry_skip_normalization__"]) {
    return value;
  }
  const remainingDepth = typeof value["__sentry_override_normalization_depth__"] === "number" ? value["__sentry_override_normalization_depth__"] : depth;
  if (remainingDepth === 0) {
    return stringified.replace("object ", "");
  }
  if (memoize(value)) {
    return "[Circular ~]";
  }
  const valueWithToJSON = value;
  if (valueWithToJSON && typeof valueWithToJSON.toJSON === "function") {
    try {
      const jsonValue = valueWithToJSON.toJSON();
      return visit("", jsonValue, remainingDepth - 1, maxProperties, memo);
    } catch {}
  }
  const normalized = Array.isArray(value) ? [] : {};
  let numAdded = 0;
  const visitable = convertToPlainObject(value);
  for (const visitKey in visitable) {
    if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {
      continue;
    }
    if (numAdded >= maxProperties) {
      normalized[visitKey] = "[MaxProperties ~]";
      break;
    }
    const visitValue = visitable[visitKey];
    normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);
    numAdded++;
  }
  unmemoize(value);
  return normalized;
}
function stringifyValue(key, value) {
  try {
    if (key === "domain" && value && typeof value === "object" && value._events) {
      return "[Domain]";
    }
    if (key === "domainEmitter") {
      return "[DomainEmitter]";
    }
    if (typeof global !== "undefined" && value === global) {
      return "[Global]";
    }
    if (typeof window !== "undefined" && value === window) {
      return "[Window]";
    }
    if (typeof document !== "undefined" && value === document) {
      return "[Document]";
    }
    if (isVueViewModel(value)) {
      return getVueInternalName(value);
    }
    if (isSyntheticEvent(value)) {
      return "[SyntheticEvent]";
    }
    if (typeof value === "number" && !Number.isFinite(value)) {
      return `[${value}]`;
    }
    if (typeof value === "function") {
      return `[Function: ${getFunctionName(value)}]`;
    }
    if (typeof value === "symbol") {
      return `[${String(value)}]`;
    }
    if (typeof value === "bigint") {
      return `[BigInt: ${String(value)}]`;
    }
    const objName = getConstructorName(value);
    if (/^HTML(\w*)Element$/.test(objName)) {
      return `[HTMLElement: ${objName}]`;
    }
    return `[object ${objName}]`;
  } catch (err) {
    return `**non-serializable** (${err})`;
  }
}
function getConstructorName(value) {
  const prototype = Object.getPrototypeOf(value);
  return prototype?.constructor ? prototype.constructor.name : "null prototype";
}
function utf8Length(value) {
  return ~-encodeURI(value).split(/%..|./).length;
}
function jsonSize(value) {
  return utf8Length(JSON.stringify(value));
}
function memoBuilder() {
  const inner = new WeakSet;
  function memoize(obj) {
    if (inner.has(obj)) {
      return true;
    }
    inner.add(obj);
    return false;
  }
  function unmemoize(obj) {
    inner.delete(obj);
  }
  return [memoize, unmemoize];
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/envelope.js
function createEnvelope(headers, items = []) {
  return [headers, items];
}
function addItemToEnvelope(envelope, newItem) {
  const [headers, items] = envelope;
  return [headers, [...items, newItem]];
}
function forEachEnvelopeItem(envelope, callback) {
  const envelopeItems = envelope[1];
  for (const envelopeItem of envelopeItems) {
    const envelopeItemType = envelopeItem[0].type;
    const result = callback(envelopeItem, envelopeItemType);
    if (result) {
      return true;
    }
  }
  return false;
}
function envelopeContainsItemType(envelope, types) {
  return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));
}
function encodeUTF8(input) {
  const carrier = getSentryCarrier(GLOBAL_OBJ);
  return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);
}
function serializeEnvelope(envelope) {
  const [envHeaders, items] = envelope;
  let parts = JSON.stringify(envHeaders);
  function append(next) {
    if (typeof parts === "string") {
      parts = typeof next === "string" ? parts + next : [encodeUTF8(parts), next];
    } else {
      parts.push(typeof next === "string" ? encodeUTF8(next) : next);
    }
  }
  for (const item of items) {
    const [itemHeaders, payload] = item;
    append(`
${JSON.stringify(itemHeaders)}
`);
    if (typeof payload === "string" || payload instanceof Uint8Array) {
      append(payload);
    } else {
      let stringifiedPayload;
      try {
        stringifiedPayload = JSON.stringify(payload);
      } catch {
        stringifiedPayload = JSON.stringify(normalize(payload));
      }
      append(stringifiedPayload);
    }
  }
  return typeof parts === "string" ? parts : concatBuffers(parts);
}
function concatBuffers(buffers) {
  const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);
  const merged = new Uint8Array(totalLength);
  let offset = 0;
  for (const buffer of buffers) {
    merged.set(buffer, offset);
    offset += buffer.length;
  }
  return merged;
}
function createSpanEnvelopeItem(spanJson) {
  const spanHeaders = {
    type: "span"
  };
  return [spanHeaders, spanJson];
}
function createAttachmentEnvelopeItem(attachment) {
  const buffer = typeof attachment.data === "string" ? encodeUTF8(attachment.data) : attachment.data;
  return [
    {
      type: "attachment",
      length: buffer.length,
      filename: attachment.filename,
      content_type: attachment.contentType,
      attachment_type: attachment.attachmentType
    },
    buffer
  ];
}
var DATA_CATEGORY_OVERRIDES = {
  sessions: "session",
  event: "error",
  client_report: "internal",
  user_report: "default",
  profile_chunk: "profile",
  replay_event: "replay",
  replay_recording: "replay",
  check_in: "monitor",
  raw_security: "security",
  log: "log_item",
  trace_metric: "metric"
};
function _isOverriddenType(type) {
  return type in DATA_CATEGORY_OVERRIDES;
}
function envelopeItemTypeToDataCategory(type) {
  return _isOverriddenType(type) ? DATA_CATEGORY_OVERRIDES[type] : type;
}
function getSdkMetadataForEnvelopeHeader(metadataOrEvent) {
  if (!metadataOrEvent?.sdk) {
    return;
  }
  const { name, version } = metadataOrEvent.sdk;
  return { name, version };
}
function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {
  const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;
  return {
    event_id: event.event_id,
    sent_at: new Date().toISOString(),
    ...sdkInfo && { sdk: sdkInfo },
    ...!!tunnel && dsn && { dsn: dsnToString(dsn) },
    ...dynamicSamplingContext && {
      trace: dynamicSamplingContext
    }
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/should-ignore-span.js
function logIgnoredSpan(droppedSpan) {
  debug.log(`Ignoring span ${droppedSpan.op} - ${droppedSpan.description} because it matches \`ignoreSpans\`.`);
}
function shouldIgnoreSpan(span, ignoreSpans) {
  if (!ignoreSpans?.length || !span.description) {
    return false;
  }
  for (const pattern of ignoreSpans) {
    if (isStringOrRegExp(pattern)) {
      if (isMatchingPattern(span.description, pattern)) {
        DEBUG_BUILD && logIgnoredSpan(span);
        return true;
      }
      continue;
    }
    if (!pattern.name && !pattern.op) {
      continue;
    }
    const nameMatches = pattern.name ? isMatchingPattern(span.description, pattern.name) : true;
    const opMatches = pattern.op ? span.op && isMatchingPattern(span.op, pattern.op) : true;
    if (nameMatches && opMatches) {
      DEBUG_BUILD && logIgnoredSpan(span);
      return true;
    }
  }
  return false;
}
function reparentChildSpans(spans, dropSpan) {
  const droppedSpanParentId = dropSpan.parent_span_id;
  const droppedSpanId = dropSpan.span_id;
  if (!droppedSpanParentId) {
    return;
  }
  for (const span of spans) {
    if (span.parent_span_id === droppedSpanId) {
      span.parent_span_id = droppedSpanParentId;
    }
  }
}
function isStringOrRegExp(value) {
  return typeof value === "string" || value instanceof RegExp;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/envelope.js
function _enhanceEventWithSdkInfo(event, newSdkInfo) {
  if (!newSdkInfo) {
    return event;
  }
  const eventSdkInfo = event.sdk || {};
  event.sdk = {
    ...eventSdkInfo,
    name: eventSdkInfo.name || newSdkInfo.name,
    version: eventSdkInfo.version || newSdkInfo.version,
    integrations: [...event.sdk?.integrations || [], ...newSdkInfo.integrations || []],
    packages: [...event.sdk?.packages || [], ...newSdkInfo.packages || []],
    settings: event.sdk?.settings || newSdkInfo.settings ? {
      ...event.sdk?.settings,
      ...newSdkInfo.settings
    } : undefined
  };
  return event;
}
function createSessionEnvelope(session, dsn, metadata, tunnel) {
  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);
  const envelopeHeaders = {
    sent_at: new Date().toISOString(),
    ...sdkInfo && { sdk: sdkInfo },
    ...!!tunnel && dsn && { dsn: dsnToString(dsn) }
  };
  const envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()];
  return createEnvelope(envelopeHeaders, [envelopeItem]);
}
function createEventEnvelope(event, dsn, metadata, tunnel) {
  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);
  const eventType = event.type && event.type !== "replay_event" ? event.type : "event";
  _enhanceEventWithSdkInfo(event, metadata?.sdk);
  const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);
  delete event.sdkProcessingMetadata;
  const eventItem = [{ type: eventType }, event];
  return createEnvelope(envelopeHeaders, [eventItem]);
}
function createSpanEnvelope(spans, client) {
  function dscHasRequiredProps(dsc2) {
    return !!dsc2.trace_id && !!dsc2.public_key;
  }
  const dsc = getDynamicSamplingContextFromSpan(spans[0]);
  const dsn = client?.getDsn();
  const tunnel = client?.getOptions().tunnel;
  const headers = {
    sent_at: new Date().toISOString(),
    ...dscHasRequiredProps(dsc) && { trace: dsc },
    ...!!tunnel && dsn && { dsn: dsnToString(dsn) }
  };
  const { beforeSendSpan, ignoreSpans } = client?.getOptions() || {};
  const filteredSpans = ignoreSpans?.length ? spans.filter((span) => !shouldIgnoreSpan(spanToJSON(span), ignoreSpans)) : spans;
  const droppedSpans = spans.length - filteredSpans.length;
  if (droppedSpans) {
    client?.recordDroppedEvent("before_send", "span", droppedSpans);
  }
  const convertToSpanJSON = beforeSendSpan ? (span) => {
    const spanJson = spanToJSON(span);
    const processedSpan = beforeSendSpan(spanJson);
    if (!processedSpan) {
      showSpanDropWarning();
      return spanJson;
    }
    return processedSpan;
  } : spanToJSON;
  const items = [];
  for (const span of filteredSpans) {
    const spanJson = convertToSpanJSON(span);
    if (spanJson) {
      items.push(createSpanEnvelopeItem(spanJson));
    }
  }
  return createEnvelope(headers, items);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/measurement.js
function timedEventsToMeasurements(events) {
  if (!events || events.length === 0) {
    return;
  }
  const measurements = {};
  events.forEach((event) => {
    const attributes = event.attributes || {};
    const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT];
    const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE];
    if (typeof unit === "string" && typeof value === "number") {
      measurements[event.name] = { value, unit };
    }
  });
  return measurements;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/sentrySpan.js
var MAX_SPAN_COUNT = 1000;

class SentrySpan {
  constructor(spanContext = {}) {
    this._traceId = spanContext.traceId || generateTraceId();
    this._spanId = spanContext.spanId || generateSpanId();
    this._startTime = spanContext.startTimestamp || timestampInSeconds();
    this._links = spanContext.links;
    this._attributes = {};
    this.setAttributes({
      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "manual",
      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,
      ...spanContext.attributes
    });
    this._name = spanContext.name;
    if (spanContext.parentSpanId) {
      this._parentSpanId = spanContext.parentSpanId;
    }
    if ("sampled" in spanContext) {
      this._sampled = spanContext.sampled;
    }
    if (spanContext.endTimestamp) {
      this._endTime = spanContext.endTimestamp;
    }
    this._events = [];
    this._isStandaloneSpan = spanContext.isStandalone;
    if (this._endTime) {
      this._onSpanEnded();
    }
  }
  addLink(link) {
    if (this._links) {
      this._links.push(link);
    } else {
      this._links = [link];
    }
    return this;
  }
  addLinks(links) {
    if (this._links) {
      this._links.push(...links);
    } else {
      this._links = links;
    }
    return this;
  }
  recordException(_exception, _time) {}
  spanContext() {
    const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;
    return {
      spanId,
      traceId,
      traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE
    };
  }
  setAttribute(key, value) {
    if (value === undefined) {
      delete this._attributes[key];
    } else {
      this._attributes[key] = value;
    }
    return this;
  }
  setAttributes(attributes) {
    Object.keys(attributes).forEach((key) => this.setAttribute(key, attributes[key]));
    return this;
  }
  updateStartTime(timeInput) {
    this._startTime = spanTimeInputToSeconds(timeInput);
  }
  setStatus(value) {
    this._status = value;
    return this;
  }
  updateName(name) {
    this._name = name;
    this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "custom");
    return this;
  }
  end(endTimestamp) {
    if (this._endTime) {
      return;
    }
    this._endTime = spanTimeInputToSeconds(endTimestamp);
    logSpanEnd(this);
    this._onSpanEnded();
  }
  getSpanJSON() {
    return {
      data: this._attributes,
      description: this._name,
      op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],
      parent_span_id: this._parentSpanId,
      span_id: this._spanId,
      start_timestamp: this._startTime,
      status: getStatusMessage(this._status),
      timestamp: this._endTime,
      trace_id: this._traceId,
      origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],
      profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID],
      exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],
      measurements: timedEventsToMeasurements(this._events),
      is_segment: this._isStandaloneSpan && getRootSpan(this) === this || undefined,
      segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,
      links: convertSpanLinksForEnvelope(this._links)
    };
  }
  isRecording() {
    return !this._endTime && !!this._sampled;
  }
  addEvent(name, attributesOrStartTime, startTime) {
    DEBUG_BUILD && debug.log("[Tracing] Adding an event to span:", name);
    const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();
    const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};
    const event = {
      name,
      time: spanTimeInputToSeconds(time),
      attributes
    };
    this._events.push(event);
    return this;
  }
  isStandaloneSpan() {
    return !!this._isStandaloneSpan;
  }
  _onSpanEnded() {
    const client = getClient();
    if (client) {
      client.emit("spanEnd", this);
    }
    const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this);
    if (!isSegmentSpan) {
      return;
    }
    if (this._isStandaloneSpan) {
      if (this._sampled) {
        sendSpanEnvelope(createSpanEnvelope([this], client));
      } else {
        DEBUG_BUILD && debug.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled.");
        if (client) {
          client.recordDroppedEvent("sample_rate", "span");
        }
      }
      return;
    }
    const transactionEvent = this._convertSpanToTransaction();
    if (transactionEvent) {
      const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();
      scope.captureEvent(transactionEvent);
    }
  }
  _convertSpanToTransaction() {
    if (!isFullFinishedSpan(spanToJSON(this))) {
      return;
    }
    if (!this._name) {
      DEBUG_BUILD && debug.warn("Transaction has no name, falling back to `<unlabeled transaction>`.");
      this._name = "<unlabeled transaction>";
    }
    const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);
    const normalizedRequest = capturedSpanScope?.getScopeData().sdkProcessingMetadata?.normalizedRequest;
    if (this._sampled !== true) {
      return;
    }
    const finishedSpans = getSpanDescendants(this).filter((span) => span !== this && !isStandaloneSpan(span));
    const spans = finishedSpans.map((span) => spanToJSON(span)).filter(isFullFinishedSpan);
    const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
    delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
    spans.forEach((span) => {
      delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
    });
    const transaction = {
      contexts: {
        trace: spanToTransactionTraceContext(this)
      },
      spans: spans.length > MAX_SPAN_COUNT ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT) : spans,
      start_timestamp: this._startTime,
      timestamp: this._endTime,
      transaction: this._name,
      type: "transaction",
      sdkProcessingMetadata: {
        capturedSpanScope,
        capturedSpanIsolationScope,
        dynamicSamplingContext: getDynamicSamplingContextFromSpan(this)
      },
      request: normalizedRequest,
      ...source && {
        transaction_info: {
          source
        }
      }
    };
    const measurements = timedEventsToMeasurements(this._events);
    const hasMeasurements = measurements && Object.keys(measurements).length;
    if (hasMeasurements) {
      DEBUG_BUILD && debug.log("[Measurements] Adding measurements to transaction event", JSON.stringify(measurements, undefined, 2));
      transaction.measurements = measurements;
    }
    return transaction;
  }
}
function isSpanTimeInput(value) {
  return value && typeof value === "number" || value instanceof Date || Array.isArray(value);
}
function isFullFinishedSpan(input) {
  return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;
}
function isStandaloneSpan(span) {
  return span instanceof SentrySpan && span.isStandaloneSpan();
}
function sendSpanEnvelope(envelope) {
  const client = getClient();
  if (!client) {
    return;
  }
  const spanItems = envelope[1];
  if (!spanItems || spanItems.length === 0) {
    client.recordDroppedEvent("before_send", "span");
    return;
  }
  client.sendEnvelope(envelope);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/trace.js
var SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__";
function startInactiveSpan(options) {
  const acs = getAcs();
  if (acs.startInactiveSpan) {
    return acs.startInactiveSpan(options);
  }
  const spanArguments = parseSentrySpanArguments(options);
  const { forceTransaction, parentSpan: customParentSpan } = options;
  const wrapper = options.scope ? (callback) => withScope2(options.scope, callback) : customParentSpan !== undefined ? (callback) => withActiveSpan(customParentSpan, callback) : (callback) => callback();
  return wrapper(() => {
    const scope = getCurrentScope();
    const parentSpan = getParentSpan(scope, customParentSpan);
    const shouldSkipSpan = options.onlyIfParent && !parentSpan;
    if (shouldSkipSpan) {
      return new SentryNonRecordingSpan;
    }
    return createChildOrRootSpan({
      parentSpan,
      spanArguments,
      forceTransaction,
      scope
    });
  });
}
function withActiveSpan(span, callback) {
  const acs = getAcs();
  if (acs.withActiveSpan) {
    return acs.withActiveSpan(span, callback);
  }
  return withScope2((scope) => {
    _setSpanForScope(scope, span || undefined);
    return callback(scope);
  });
}
function suppressTracing(callback) {
  const acs = getAcs();
  if (acs.suppressTracing) {
    return acs.suppressTracing(callback);
  }
  return withScope2((scope) => {
    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });
    const res = callback();
    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: undefined });
    return res;
  });
}
function createChildOrRootSpan({
  parentSpan,
  spanArguments,
  forceTransaction,
  scope
}) {
  if (!hasSpansEnabled()) {
    const span2 = new SentryNonRecordingSpan;
    if (forceTransaction || !parentSpan) {
      const dsc = {
        sampled: "false",
        sample_rate: "0",
        transaction: spanArguments.name,
        ...getDynamicSamplingContextFromSpan(span2)
      };
      freezeDscOnSpan(span2, dsc);
    }
    return span2;
  }
  const isolationScope = getIsolationScope();
  let span;
  if (parentSpan && !forceTransaction) {
    span = _startChildSpan(parentSpan, scope, spanArguments);
    addChildSpanToSpan(parentSpan, span);
  } else if (parentSpan) {
    const dsc = getDynamicSamplingContextFromSpan(parentSpan);
    const { traceId, spanId: parentSpanId } = parentSpan.spanContext();
    const parentSampled = spanIsSampled(parentSpan);
    span = _startRootSpan({
      traceId,
      parentSpanId,
      ...spanArguments
    }, scope, parentSampled);
    freezeDscOnSpan(span, dsc);
  } else {
    const {
      traceId,
      dsc,
      parentSpanId,
      sampled: parentSampled
    } = {
      ...isolationScope.getPropagationContext(),
      ...scope.getPropagationContext()
    };
    span = _startRootSpan({
      traceId,
      parentSpanId,
      ...spanArguments
    }, scope, parentSampled);
    if (dsc) {
      freezeDscOnSpan(span, dsc);
    }
  }
  logSpanStart(span);
  setCapturedScopesOnSpan(span, scope, isolationScope);
  return span;
}
function parseSentrySpanArguments(options) {
  const exp = options.experimental || {};
  const initialCtx = {
    isStandalone: exp.standalone,
    ...options
  };
  if (options.startTime) {
    const ctx = { ...initialCtx };
    ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);
    delete ctx.startTime;
    return ctx;
  }
  return initialCtx;
}
function getAcs() {
  const carrier = getMainCarrier();
  return getAsyncContextStrategy(carrier);
}
function _startRootSpan(spanArguments, scope, parentSampled) {
  const client = getClient();
  const options = client?.getOptions() || {};
  const { name = "" } = spanArguments;
  const mutableSpanSamplingData = { spanAttributes: { ...spanArguments.attributes }, spanName: name, parentSampled };
  client?.emit("beforeSampling", mutableSpanSamplingData, { decision: false });
  const finalParentSampled = mutableSpanSamplingData.parentSampled ?? parentSampled;
  const finalAttributes = mutableSpanSamplingData.spanAttributes;
  const currentPropagationContext = scope.getPropagationContext();
  const [sampled, sampleRate, localSampleRateWasApplied] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? [false] : sampleSpan(options, {
    name,
    parentSampled: finalParentSampled,
    attributes: finalAttributes,
    parentSampleRate: parseSampleRate(currentPropagationContext.dsc?.sample_rate)
  }, currentPropagationContext.sampleRand);
  const rootSpan = new SentrySpan({
    ...spanArguments,
    attributes: {
      [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom",
      [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: sampleRate !== undefined && localSampleRateWasApplied ? sampleRate : undefined,
      ...finalAttributes
    },
    sampled
  });
  if (!sampled && client) {
    DEBUG_BUILD && debug.log("[Tracing] Discarding root span because its trace was not chosen to be sampled.");
    client.recordDroppedEvent("sample_rate", "transaction");
  }
  if (client) {
    client.emit("spanStart", rootSpan);
  }
  return rootSpan;
}
function _startChildSpan(parentSpan, scope, spanArguments) {
  const { spanId, traceId } = parentSpan.spanContext();
  const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan);
  const childSpan = sampled ? new SentrySpan({
    ...spanArguments,
    parentSpanId: spanId,
    traceId,
    sampled
  }) : new SentryNonRecordingSpan({ traceId });
  addChildSpanToSpan(parentSpan, childSpan);
  const client = getClient();
  if (client) {
    client.emit("spanStart", childSpan);
    if (spanArguments.endTimestamp) {
      client.emit("spanEnd", childSpan);
    }
  }
  return childSpan;
}
function getParentSpan(scope, customParentSpan) {
  if (customParentSpan) {
    return customParentSpan;
  }
  if (customParentSpan === null) {
    return;
  }
  const span = _getSpanForScope(scope);
  if (!span) {
    return;
  }
  const client = getClient();
  const options = client ? client.getOptions() : {};
  if (options.parentSpanIsAlwaysRootSpan) {
    return getRootSpan(span);
  }
  return span;
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/syncpromise.js
var STATE_PENDING = 0;
var STATE_RESOLVED = 1;
var STATE_REJECTED = 2;
function resolvedSyncPromise(value) {
  return new SyncPromise((resolve) => {
    resolve(value);
  });
}
function rejectedSyncPromise(reason) {
  return new SyncPromise((_, reject) => {
    reject(reason);
  });
}

class SyncPromise {
  constructor(executor) {
    this._state = STATE_PENDING;
    this._handlers = [];
    this._runExecutor(executor);
  }
  then(onfulfilled, onrejected) {
    return new SyncPromise((resolve, reject) => {
      this._handlers.push([
        false,
        (result) => {
          if (!onfulfilled) {
            resolve(result);
          } else {
            try {
              resolve(onfulfilled(result));
            } catch (e) {
              reject(e);
            }
          }
        },
        (reason) => {
          if (!onrejected) {
            reject(reason);
          } else {
            try {
              resolve(onrejected(reason));
            } catch (e) {
              reject(e);
            }
          }
        }
      ]);
      this._executeHandlers();
    });
  }
  catch(onrejected) {
    return this.then((val) => val, onrejected);
  }
  finally(onfinally) {
    return new SyncPromise((resolve, reject) => {
      let val;
      let isRejected;
      return this.then((value) => {
        isRejected = false;
        val = value;
        if (onfinally) {
          onfinally();
        }
      }, (reason) => {
        isRejected = true;
        val = reason;
        if (onfinally) {
          onfinally();
        }
      }).then(() => {
        if (isRejected) {
          reject(val);
          return;
        }
        resolve(val);
      });
    });
  }
  _executeHandlers() {
    if (this._state === STATE_PENDING) {
      return;
    }
    const cachedHandlers = this._handlers.slice();
    this._handlers = [];
    cachedHandlers.forEach((handler) => {
      if (handler[0]) {
        return;
      }
      if (this._state === STATE_RESOLVED) {
        handler[1](this._value);
      }
      if (this._state === STATE_REJECTED) {
        handler[2](this._value);
      }
      handler[0] = true;
    });
  }
  _runExecutor(executor) {
    const setResult = (state, value) => {
      if (this._state !== STATE_PENDING) {
        return;
      }
      if (isThenable(value)) {
        value.then(resolve, reject);
        return;
      }
      this._state = state;
      this._value = value;
      this._executeHandlers();
    };
    const resolve = (value) => {
      setResult(STATE_RESOLVED, value);
    };
    const reject = (reason) => {
      setResult(STATE_REJECTED, reason);
    };
    try {
      executor(resolve, reject);
    } catch (e) {
      reject(e);
    }
  }
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/eventProcessors.js
function notifyEventProcessors(processors, event, hint, index = 0) {
  try {
    const result = _notifyEventProcessors(event, hint, processors, index);
    return isThenable(result) ? result : resolvedSyncPromise(result);
  } catch (error2) {
    return rejectedSyncPromise(error2);
  }
}
function _notifyEventProcessors(event, hint, processors, index) {
  const processor = processors[index];
  if (!event || !processor) {
    return event;
  }
  const result = processor({ ...event }, hint);
  DEBUG_BUILD && result === null && debug.log(`Event processor "${processor.id || "?"}" dropped event`);
  if (isThenable(result)) {
    return result.then((final) => _notifyEventProcessors(final, hint, processors, index + 1));
  }
  return _notifyEventProcessors(result, hint, processors, index + 1);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/debug-ids.js
var parsedStackResults;
var lastSentryKeysCount;
var lastNativeKeysCount;
var cachedFilenameDebugIds;
function getFilenameToDebugIdMap(stackParser) {
  const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;
  const nativeDebugIdMap = GLOBAL_OBJ._debugIds;
  if (!sentryDebugIdMap && !nativeDebugIdMap) {
    return {};
  }
  const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];
  const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];
  if (cachedFilenameDebugIds && sentryDebugIdKeys.length === lastSentryKeysCount && nativeDebugIdKeys.length === lastNativeKeysCount) {
    return cachedFilenameDebugIds;
  }
  lastSentryKeysCount = sentryDebugIdKeys.length;
  lastNativeKeysCount = nativeDebugIdKeys.length;
  cachedFilenameDebugIds = {};
  if (!parsedStackResults) {
    parsedStackResults = {};
  }
  const processDebugIds = (debugIdKeys, debugIdMap) => {
    for (const key of debugIdKeys) {
      const debugId = debugIdMap[key];
      const result = parsedStackResults?.[key];
      if (result && cachedFilenameDebugIds && debugId) {
        cachedFilenameDebugIds[result[0]] = debugId;
        if (parsedStackResults) {
          parsedStackResults[key] = [result[0], debugId];
        }
      } else if (debugId) {
        const parsedStack = stackParser(key);
        for (let i = parsedStack.length - 1;i >= 0; i--) {
          const stackFrame = parsedStack[i];
          const filename = stackFrame?.filename;
          if (filename && cachedFilenameDebugIds && parsedStackResults) {
            cachedFilenameDebugIds[filename] = debugId;
            parsedStackResults[key] = [filename, debugId];
            break;
          }
        }
      }
    }
  };
  if (sentryDebugIdMap) {
    processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);
  }
  if (nativeDebugIdMap) {
    processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);
  }
  return cachedFilenameDebugIds;
}
function getDebugImagesForResources(stackParser, resource_paths) {
  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);
  if (!filenameDebugIdMap) {
    return [];
  }
  const images = [];
  for (const path of resource_paths) {
    const normalizedPath = normalizeStackTracePath(path);
    if (normalizedPath && filenameDebugIdMap[normalizedPath]) {
      images.push({
        type: "sourcemap",
        code_file: path,
        debug_id: filenameDebugIdMap[normalizedPath]
      });
    }
  }
  return images;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/scopeData.js
function applyScopeDataToEvent(event, data) {
  const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;
  applyDataToEvent(event, data);
  if (span) {
    applySpanToEvent(event, span);
  }
  applyFingerprintToEvent(event, fingerprint);
  applyBreadcrumbsToEvent(event, breadcrumbs);
  applySdkMetadataToEvent(event, sdkProcessingMetadata);
}
function mergeScopeData(data, mergeData) {
  const {
    extra,
    tags,
    attributes,
    user,
    contexts,
    level,
    sdkProcessingMetadata,
    breadcrumbs,
    fingerprint,
    eventProcessors,
    attachments,
    propagationContext,
    transactionName,
    span
  } = mergeData;
  mergeAndOverwriteScopeData(data, "extra", extra);
  mergeAndOverwriteScopeData(data, "tags", tags);
  mergeAndOverwriteScopeData(data, "attributes", attributes);
  mergeAndOverwriteScopeData(data, "user", user);
  mergeAndOverwriteScopeData(data, "contexts", contexts);
  data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);
  if (level) {
    data.level = level;
  }
  if (transactionName) {
    data.transactionName = transactionName;
  }
  if (span) {
    data.span = span;
  }
  if (breadcrumbs.length) {
    data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];
  }
  if (fingerprint.length) {
    data.fingerprint = [...data.fingerprint, ...fingerprint];
  }
  if (eventProcessors.length) {
    data.eventProcessors = [...data.eventProcessors, ...eventProcessors];
  }
  if (attachments.length) {
    data.attachments = [...data.attachments, ...attachments];
  }
  data.propagationContext = { ...data.propagationContext, ...propagationContext };
}
function mergeAndOverwriteScopeData(data, prop, mergeVal) {
  data[prop] = merge(data[prop], mergeVal, 1);
}
function getCombinedScopeData(isolationScope, currentScope) {
  const scopeData = getGlobalScope().getScopeData();
  isolationScope && mergeScopeData(scopeData, isolationScope.getScopeData());
  currentScope && mergeScopeData(scopeData, currentScope.getScopeData());
  return scopeData;
}
function applyDataToEvent(event, data) {
  const { extra, tags, user, contexts, level, transactionName } = data;
  if (Object.keys(extra).length) {
    event.extra = { ...extra, ...event.extra };
  }
  if (Object.keys(tags).length) {
    event.tags = { ...tags, ...event.tags };
  }
  if (Object.keys(user).length) {
    event.user = { ...user, ...event.user };
  }
  if (Object.keys(contexts).length) {
    event.contexts = { ...contexts, ...event.contexts };
  }
  if (level) {
    event.level = level;
  }
  if (transactionName && event.type !== "transaction") {
    event.transaction = transactionName;
  }
}
function applyBreadcrumbsToEvent(event, breadcrumbs) {
  const mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs];
  event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;
}
function applySdkMetadataToEvent(event, sdkProcessingMetadata) {
  event.sdkProcessingMetadata = {
    ...event.sdkProcessingMetadata,
    ...sdkProcessingMetadata
  };
}
function applySpanToEvent(event, span) {
  event.contexts = {
    trace: spanToTraceContext(span),
    ...event.contexts
  };
  event.sdkProcessingMetadata = {
    dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),
    ...event.sdkProcessingMetadata
  };
  const rootSpan = getRootSpan(span);
  const transactionName = spanToJSON(rootSpan).description;
  if (transactionName && !event.transaction && event.type === "transaction") {
    event.transaction = transactionName;
  }
}
function applyFingerprintToEvent(event, fingerprint) {
  event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : [];
  if (fingerprint) {
    event.fingerprint = event.fingerprint.concat(fingerprint);
  }
  if (!event.fingerprint.length) {
    delete event.fingerprint;
  }
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/prepareEvent.js
function prepareEvent(options, event, hint, scope, client, isolationScope) {
  const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;
  const prepared = {
    ...event,
    event_id: event.event_id || hint.event_id || uuid4(),
    timestamp: event.timestamp || dateTimestampInSeconds()
  };
  const integrations = hint.integrations || options.integrations.map((i) => i.name);
  applyClientOptions(prepared, options);
  applyIntegrationsMetadata(prepared, integrations);
  if (client) {
    client.emit("applyFrameMetadata", event);
  }
  if (event.type === undefined) {
    applyDebugIds(prepared, options.stackParser);
  }
  const finalScope = getFinalScope(scope, hint.captureContext);
  if (hint.mechanism) {
    addExceptionMechanism(prepared, hint.mechanism);
  }
  const clientEventProcessors = client ? client.getEventProcessors() : [];
  const data = getCombinedScopeData(isolationScope, finalScope);
  const attachments = [...hint.attachments || [], ...data.attachments];
  if (attachments.length) {
    hint.attachments = attachments;
  }
  applyScopeDataToEvent(prepared, data);
  const eventProcessors = [
    ...clientEventProcessors,
    ...data.eventProcessors
  ];
  const isInternalException = hint.data && hint.data.__sentry__ === true;
  const result = isInternalException ? resolvedSyncPromise(prepared) : notifyEventProcessors(eventProcessors, prepared, hint);
  return result.then((evt) => {
    if (evt) {
      applyDebugMeta(evt);
    }
    if (typeof normalizeDepth === "number" && normalizeDepth > 0) {
      return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);
    }
    return evt;
  });
}
function applyClientOptions(event, options) {
  const { environment, release, dist, maxValueLength } = options;
  event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;
  if (!event.release && release) {
    event.release = release;
  }
  if (!event.dist && dist) {
    event.dist = dist;
  }
  const request = event.request;
  if (request?.url && maxValueLength) {
    request.url = truncate(request.url, maxValueLength);
  }
  if (maxValueLength) {
    event.exception?.values?.forEach((exception) => {
      if (exception.value) {
        exception.value = truncate(exception.value, maxValueLength);
      }
    });
  }
}
function applyDebugIds(event, stackParser) {
  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);
  event.exception?.values?.forEach((exception) => {
    exception.stacktrace?.frames?.forEach((frame) => {
      if (frame.filename) {
        frame.debug_id = filenameDebugIdMap[frame.filename];
      }
    });
  });
}
function applyDebugMeta(event) {
  const filenameDebugIdMap = {};
  event.exception?.values?.forEach((exception) => {
    exception.stacktrace?.frames?.forEach((frame) => {
      if (frame.debug_id) {
        if (frame.abs_path) {
          filenameDebugIdMap[frame.abs_path] = frame.debug_id;
        } else if (frame.filename) {
          filenameDebugIdMap[frame.filename] = frame.debug_id;
        }
        delete frame.debug_id;
      }
    });
  });
  if (Object.keys(filenameDebugIdMap).length === 0) {
    return;
  }
  event.debug_meta = event.debug_meta || {};
  event.debug_meta.images = event.debug_meta.images || [];
  const images = event.debug_meta.images;
  Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {
    images.push({
      type: "sourcemap",
      code_file: filename,
      debug_id
    });
  });
}
function applyIntegrationsMetadata(event, integrationNames) {
  if (integrationNames.length > 0) {
    event.sdk = event.sdk || {};
    event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames];
  }
}
function normalizeEvent(event, depth, maxBreadth) {
  if (!event) {
    return null;
  }
  const normalized = {
    ...event,
    ...event.breadcrumbs && {
      breadcrumbs: event.breadcrumbs.map((b) => ({
        ...b,
        ...b.data && {
          data: normalize(b.data, depth, maxBreadth)
        }
      }))
    },
    ...event.user && {
      user: normalize(event.user, depth, maxBreadth)
    },
    ...event.contexts && {
      contexts: normalize(event.contexts, depth, maxBreadth)
    },
    ...event.extra && {
      extra: normalize(event.extra, depth, maxBreadth)
    }
  };
  if (event.contexts?.trace && normalized.contexts) {
    normalized.contexts.trace = event.contexts.trace;
    if (event.contexts.trace.data) {
      normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);
    }
  }
  if (event.spans) {
    normalized.spans = event.spans.map((span) => {
      return {
        ...span,
        ...span.data && {
          data: normalize(span.data, depth, maxBreadth)
        }
      };
    });
  }
  if (event.contexts?.flags && normalized.contexts) {
    normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);
  }
  return normalized;
}
function getFinalScope(scope, captureContext) {
  if (!captureContext) {
    return scope;
  }
  const finalScope = scope ? scope.clone() : new Scope;
  finalScope.update(captureContext);
  return finalScope;
}
function parseEventHintOrCaptureContext(hint) {
  if (!hint) {
    return;
  }
  if (hintIsScopeOrFunction(hint)) {
    return { captureContext: hint };
  }
  if (hintIsScopeContext(hint)) {
    return {
      captureContext: hint
    };
  }
  return hint;
}
function hintIsScopeOrFunction(hint) {
  return hint instanceof Scope || typeof hint === "function";
}
var captureContextKeys = [
  "user",
  "level",
  "extra",
  "contexts",
  "tags",
  "fingerprint",
  "propagationContext"
];
function hintIsScopeContext(hint) {
  return Object.keys(hint).some((key) => captureContextKeys.includes(key));
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/exports.js
function captureException(exception, hint) {
  return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));
}
function captureMessage(message, captureContext) {
  const level = typeof captureContext === "string" ? captureContext : undefined;
  const hint = typeof captureContext !== "string" ? { captureContext } : undefined;
  return getCurrentScope().captureMessage(message, level, hint);
}
function captureEvent(event, hint) {
  return getCurrentScope().captureEvent(event, hint);
}
async function flush(timeout) {
  const client = getClient();
  if (client) {
    return client.flush(timeout);
  }
  DEBUG_BUILD && debug.warn("Cannot flush events. No client defined.");
  return Promise.resolve(false);
}
function isEnabled2() {
  const client = getClient();
  return client?.getOptions().enabled !== false && !!client?.getTransport();
}
function startSession(context) {
  const isolationScope = getIsolationScope();
  const { user } = getCombinedScopeData(isolationScope, getCurrentScope());
  const { userAgent } = GLOBAL_OBJ.navigator || {};
  const session = makeSession({
    user,
    ...userAgent && { userAgent },
    ...context
  });
  const currentSession = isolationScope.getSession();
  if (currentSession?.status === "ok") {
    updateSession(currentSession, { status: "exited" });
  }
  endSession();
  isolationScope.setSession(session);
  return session;
}
function endSession() {
  const isolationScope = getIsolationScope();
  const currentScope = getCurrentScope();
  const session = currentScope.getSession() || isolationScope.getSession();
  if (session) {
    closeSession(session);
  }
  _sendSessionUpdate();
  isolationScope.setSession();
}
function _sendSessionUpdate() {
  const isolationScope = getIsolationScope();
  const client = getClient();
  const session = isolationScope.getSession();
  if (session && client) {
    client.captureSession(session);
  }
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/checkin.js
function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) {
  const headers = {
    sent_at: new Date().toISOString()
  };
  if (metadata?.sdk) {
    headers.sdk = {
      name: metadata.sdk.name,
      version: metadata.sdk.version
    };
  }
  if (!!tunnel && !!dsn) {
    headers.dsn = dsnToString(dsn);
  }
  if (dynamicSamplingContext) {
    headers.trace = dynamicSamplingContext;
  }
  const item = createCheckInEnvelopeItem(checkIn);
  return createEnvelope(headers, [item]);
}
function createCheckInEnvelopeItem(checkIn) {
  const checkInHeaders = {
    type: "check_in"
  };
  return [checkInHeaders, checkIn];
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/api.js
var SENTRY_API_VERSION = "7";
function getBaseApiEndpoint(dsn) {
  const protocol = dsn.protocol ? `${dsn.protocol}:` : "";
  const port = dsn.port ? `:${dsn.port}` : "";
  return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`;
}
function _getIngestEndpoint(dsn) {
  return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;
}
function _encodedAuth(dsn, sdkInfo) {
  const params = {
    sentry_version: SENTRY_API_VERSION
  };
  if (dsn.publicKey) {
    params.sentry_key = dsn.publicKey;
  }
  if (sdkInfo) {
    params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;
  }
  return new URLSearchParams(params).toString();
}
function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {
  return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/integration.js
var installedIntegrations = [];
function filterDuplicates(integrations) {
  const integrationsByName = {};
  integrations.forEach((currentInstance) => {
    const { name } = currentInstance;
    const existingInstance = integrationsByName[name];
    if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {
      return;
    }
    integrationsByName[name] = currentInstance;
  });
  return Object.values(integrationsByName);
}
function getIntegrationsToSetup(options) {
  const defaultIntegrations = options.defaultIntegrations || [];
  const userIntegrations = options.integrations;
  defaultIntegrations.forEach((integration) => {
    integration.isDefaultInstance = true;
  });
  let integrations;
  if (Array.isArray(userIntegrations)) {
    integrations = [...defaultIntegrations, ...userIntegrations];
  } else if (typeof userIntegrations === "function") {
    const resolvedUserIntegrations = userIntegrations(defaultIntegrations);
    integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];
  } else {
    integrations = defaultIntegrations;
  }
  return filterDuplicates(integrations);
}
function setupIntegrations(client, integrations) {
  const integrationIndex = {};
  integrations.forEach((integration) => {
    if (integration) {
      setupIntegration(client, integration, integrationIndex);
    }
  });
  return integrationIndex;
}
function afterSetupIntegrations(client, integrations) {
  for (const integration of integrations) {
    if (integration?.afterAllSetup) {
      integration.afterAllSetup(client);
    }
  }
}
function setupIntegration(client, integration, integrationIndex) {
  if (integrationIndex[integration.name]) {
    DEBUG_BUILD && debug.log(`Integration skipped because it was already installed: ${integration.name}`);
    return;
  }
  integrationIndex[integration.name] = integration;
  if (!installedIntegrations.includes(integration.name) && typeof integration.setupOnce === "function") {
    integration.setupOnce();
    installedIntegrations.push(integration.name);
  }
  if (integration.setup && typeof integration.setup === "function") {
    integration.setup(client);
  }
  if (typeof integration.preprocessEvent === "function") {
    const callback = integration.preprocessEvent.bind(integration);
    client.on("preprocessEvent", (event, hint) => callback(event, hint, client));
  }
  if (typeof integration.processEvent === "function") {
    const callback = integration.processEvent.bind(integration);
    const processor = Object.assign((event, hint) => callback(event, hint, client), {
      id: integration.name
    });
    client.addEventProcessor(processor);
  }
  DEBUG_BUILD && debug.log(`Integration installed: ${integration.name}`);
}
function defineIntegration(fn) {
  return fn;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/trace-info.js
function _getTraceInfoFromScope(client, scope) {
  if (!scope) {
    return [undefined, undefined];
  }
  return withScope2(scope, () => {
    const span = getActiveSpan();
    const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);
    const dynamicSamplingContext = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
    return [dynamicSamplingContext, traceContext];
  });
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/logs/envelope.js
function createLogContainerEnvelopeItem(items) {
  return [
    {
      type: "log",
      item_count: items.length,
      content_type: "application/vnd.sentry.items.log+json"
    },
    {
      items
    }
  ];
}
function createLogEnvelope(logs, metadata, tunnel, dsn) {
  const headers = {};
  if (metadata?.sdk) {
    headers.sdk = {
      name: metadata.sdk.name,
      version: metadata.sdk.version
    };
  }
  if (!!tunnel && !!dsn) {
    headers.dsn = dsnToString(dsn);
  }
  return createEnvelope(headers, [createLogContainerEnvelopeItem(logs)]);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/logs/internal.js
function _INTERNAL_flushLogsBuffer(client, maybeLogBuffer) {
  const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];
  if (logBuffer.length === 0) {
    return;
  }
  const clientOptions = client.getOptions();
  const envelope = createLogEnvelope(logBuffer, clientOptions._metadata, clientOptions.tunnel, client.getDsn());
  _getBufferMap().set(client, []);
  client.emit("flushLogs");
  client.sendEnvelope(envelope);
}
function _INTERNAL_getLogBuffer(client) {
  return _getBufferMap().get(client);
}
function _getBufferMap() {
  return getGlobalSingleton("clientToLogBufferMap", () => new WeakMap);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/metrics/envelope.js
function createMetricContainerEnvelopeItem(items) {
  return [
    {
      type: "trace_metric",
      item_count: items.length,
      content_type: "application/vnd.sentry.items.trace-metric+json"
    },
    {
      items
    }
  ];
}
function createMetricEnvelope(metrics, metadata, tunnel, dsn) {
  const headers = {};
  if (metadata?.sdk) {
    headers.sdk = {
      name: metadata.sdk.name,
      version: metadata.sdk.version
    };
  }
  if (!!tunnel && !!dsn) {
    headers.dsn = dsnToString(dsn);
  }
  return createEnvelope(headers, [createMetricContainerEnvelopeItem(metrics)]);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/metrics/internal.js
function _INTERNAL_flushMetricsBuffer(client, maybeMetricBuffer) {
  const metricBuffer = maybeMetricBuffer ?? _INTERNAL_getMetricBuffer(client) ?? [];
  if (metricBuffer.length === 0) {
    return;
  }
  const clientOptions = client.getOptions();
  const envelope = createMetricEnvelope(metricBuffer, clientOptions._metadata, clientOptions.tunnel, client.getDsn());
  _getBufferMap2().set(client, []);
  client.emit("flushMetrics");
  client.sendEnvelope(envelope);
}
function _INTERNAL_getMetricBuffer(client) {
  return _getBufferMap2().get(client);
}
function _getBufferMap2() {
  return getGlobalSingleton("clientToMetricBufferMap", () => new WeakMap);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/timer.js
function safeUnref(timer) {
  if (typeof timer === "object" && typeof timer.unref === "function") {
    timer.unref();
  }
  return timer;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/promisebuffer.js
var SENTRY_BUFFER_FULL_ERROR = Symbol.for("SentryBufferFullError");
function makePromiseBuffer(limit = 100) {
  const buffer = new Set;
  function isReady() {
    return buffer.size < limit;
  }
  function remove(task) {
    buffer.delete(task);
  }
  function add(taskProducer) {
    if (!isReady()) {
      return rejectedSyncPromise(SENTRY_BUFFER_FULL_ERROR);
    }
    const task = taskProducer();
    buffer.add(task);
    task.then(() => remove(task), () => remove(task));
    return task;
  }
  function drain(timeout) {
    if (!buffer.size) {
      return resolvedSyncPromise(true);
    }
    const drainPromise = Promise.allSettled(Array.from(buffer)).then(() => true);
    if (!timeout) {
      return drainPromise;
    }
    const promises = [
      drainPromise,
      new Promise((resolve) => safeUnref(setTimeout(() => resolve(false), timeout)))
    ];
    return Promise.race(promises);
  }
  return {
    get $() {
      return Array.from(buffer);
    },
    add,
    drain
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/ratelimit.js
var DEFAULT_RETRY_AFTER = 60 * 1000;
function parseRetryAfterHeader(header, now = safeDateNow()) {
  const headerDelay = parseInt(`${header}`, 10);
  if (!isNaN(headerDelay)) {
    return headerDelay * 1000;
  }
  const headerDate = Date.parse(`${header}`);
  if (!isNaN(headerDate)) {
    return headerDate - now;
  }
  return DEFAULT_RETRY_AFTER;
}
function disabledUntil(limits, dataCategory) {
  return limits[dataCategory] || limits.all || 0;
}
function isRateLimited(limits, dataCategory, now = safeDateNow()) {
  return disabledUntil(limits, dataCategory) > now;
}
function updateRateLimits(limits, { statusCode, headers }, now = safeDateNow()) {
  const updatedRateLimits = {
    ...limits
  };
  const rateLimitHeader = headers?.["x-sentry-rate-limits"];
  const retryAfterHeader = headers?.["retry-after"];
  if (rateLimitHeader) {
    for (const limit of rateLimitHeader.trim().split(",")) {
      const [retryAfter, categories, , , namespaces] = limit.split(":", 5);
      const headerDelay = parseInt(retryAfter, 10);
      const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000;
      if (!categories) {
        updatedRateLimits.all = now + delay;
      } else {
        for (const category of categories.split(";")) {
          if (category === "metric_bucket") {
            if (!namespaces || namespaces.split(";").includes("custom")) {
              updatedRateLimits[category] = now + delay;
            }
          } else {
            updatedRateLimits[category] = now + delay;
          }
        }
      }
    }
  } else if (retryAfterHeader) {
    updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
  } else if (statusCode === 429) {
    updatedRateLimits.all = now + 60 * 1000;
  }
  return updatedRateLimits;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/transports/base.js
var DEFAULT_TRANSPORT_BUFFER_SIZE = 64;
function createTransport(options, makeRequest, buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE)) {
  let rateLimits = {};
  const flush2 = (timeout) => buffer.drain(timeout);
  function send(envelope) {
    const filteredEnvelopeItems = [];
    forEachEnvelopeItem(envelope, (item, type) => {
      const dataCategory = envelopeItemTypeToDataCategory(type);
      if (isRateLimited(rateLimits, dataCategory)) {
        options.recordDroppedEvent("ratelimit_backoff", dataCategory);
      } else {
        filteredEnvelopeItems.push(item);
      }
    });
    if (filteredEnvelopeItems.length === 0) {
      return Promise.resolve({});
    }
    const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems);
    const recordEnvelopeLoss = (reason) => {
      if (envelopeContainsItemType(filteredEnvelope, ["client_report"])) {
        DEBUG_BUILD && debug.warn(`Dropping client report. Will not send outcomes (reason: ${reason}).`);
        return;
      }
      forEachEnvelopeItem(filteredEnvelope, (item, type) => {
        options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));
      });
    };
    const requestTask = () => makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then((response) => {
      if (response.statusCode === 413) {
        DEBUG_BUILD && debug.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.");
        recordEnvelopeLoss("send_error");
        return response;
      }
      if (DEBUG_BUILD && response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {
        debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);
      }
      rateLimits = updateRateLimits(rateLimits, response);
      return response;
    }, (error2) => {
      recordEnvelopeLoss("network_error");
      DEBUG_BUILD && debug.error("Encountered error running transport request:", error2);
      throw error2;
    });
    return buffer.add(requestTask).then((result) => result, (error2) => {
      if (error2 === SENTRY_BUFFER_FULL_ERROR) {
        DEBUG_BUILD && debug.error("Skipped sending event because buffer is full.");
        recordEnvelopeLoss("queue_overflow");
        return Promise.resolve({});
      } else {
        throw error2;
      }
    });
  }
  return {
    send,
    flush: flush2
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/clientreport.js
function createClientReportEnvelope(discarded_events, dsn, timestamp) {
  const clientReportItem = [
    { type: "client_report" },
    {
      timestamp: timestamp || dateTimestampInSeconds(),
      discarded_events
    }
  ];
  return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/eventUtils.js
function getPossibleEventMessages(event) {
  const possibleMessages = [];
  if (event.message) {
    possibleMessages.push(event.message);
  }
  try {
    const lastException = event.exception.values[event.exception.values.length - 1];
    if (lastException?.value) {
      possibleMessages.push(lastException.value);
      if (lastException.type) {
        possibleMessages.push(`${lastException.type}: ${lastException.value}`);
      }
    }
  } catch {}
  return possibleMessages;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/transactionEvent.js
function convertTransactionEventToSpanJson(event) {
  const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};
  return {
    data: data ?? {},
    description: event.transaction,
    op,
    parent_span_id,
    span_id: span_id ?? "",
    start_timestamp: event.start_timestamp ?? 0,
    status,
    timestamp: event.timestamp,
    trace_id: trace_id ?? "",
    origin,
    profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID],
    exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],
    measurements: event.measurements,
    is_segment: true
  };
}
function convertSpanJsonToTransactionEvent(span) {
  return {
    type: "transaction",
    timestamp: span.timestamp,
    start_timestamp: span.start_timestamp,
    transaction: span.description,
    contexts: {
      trace: {
        trace_id: span.trace_id,
        span_id: span.span_id,
        parent_span_id: span.parent_span_id,
        op: span.op,
        status: span.status,
        origin: span.origin,
        data: {
          ...span.data,
          ...span.profile_id && { [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id },
          ...span.exclusive_time && { [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time }
        }
      }
    },
    measurements: span.measurements
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/client.js
var ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
var MISSING_RELEASE_FOR_SESSION_ERROR = "Discarded session because of missing or non-string release";
var INTERNAL_ERROR_SYMBOL = Symbol.for("SentryInternalError");
var DO_NOT_SEND_EVENT_SYMBOL = Symbol.for("SentryDoNotSendEventError");
var DEFAULT_FLUSH_INTERVAL = 5000;
function _makeInternalError(message) {
  return {
    message,
    [INTERNAL_ERROR_SYMBOL]: true
  };
}
function _makeDoNotSendEventError(message) {
  return {
    message,
    [DO_NOT_SEND_EVENT_SYMBOL]: true
  };
}
function _isInternalError(error2) {
  return !!error2 && typeof error2 === "object" && INTERNAL_ERROR_SYMBOL in error2;
}
function _isDoNotSendEventError(error2) {
  return !!error2 && typeof error2 === "object" && DO_NOT_SEND_EVENT_SYMBOL in error2;
}
function setupWeightBasedFlushing(client, afterCaptureHook, flushHook, estimateSizeFn, flushFn) {
  let weight = 0;
  let flushTimeout;
  let isTimerActive = false;
  client.on(flushHook, () => {
    weight = 0;
    clearTimeout(flushTimeout);
    isTimerActive = false;
  });
  client.on(afterCaptureHook, (item) => {
    weight += estimateSizeFn(item);
    if (weight >= 800000) {
      flushFn(client);
    } else if (!isTimerActive) {
      isTimerActive = true;
      flushTimeout = safeUnref(setTimeout(() => {
        flushFn(client);
      }, DEFAULT_FLUSH_INTERVAL));
    }
  });
  client.on("flush", () => {
    flushFn(client);
  });
}

class Client {
  constructor(options) {
    this._options = options;
    this._integrations = {};
    this._numProcessing = 0;
    this._outcomes = {};
    this._hooks = {};
    this._eventProcessors = [];
    this._promiseBuffer = makePromiseBuffer(options.transportOptions?.bufferSize ?? DEFAULT_TRANSPORT_BUFFER_SIZE);
    if (options.dsn) {
      this._dsn = makeDsn(options.dsn);
    } else {
      DEBUG_BUILD && debug.warn("No DSN provided, client will not send events.");
    }
    if (this._dsn) {
      const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options.tunnel, options._metadata ? options._metadata.sdk : undefined);
      this._transport = options.transport({
        tunnel: this._options.tunnel,
        recordDroppedEvent: this.recordDroppedEvent.bind(this),
        ...options.transportOptions,
        url
      });
    }
    this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs;
    if (this._options.enableLogs) {
      setupWeightBasedFlushing(this, "afterCaptureLog", "flushLogs", estimateLogSizeInBytes, _INTERNAL_flushLogsBuffer);
    }
    const enableMetrics = this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? true;
    if (enableMetrics) {
      setupWeightBasedFlushing(this, "afterCaptureMetric", "flushMetrics", estimateMetricSizeInBytes, _INTERNAL_flushMetricsBuffer);
    }
  }
  captureException(exception, hint, scope) {
    const eventId = uuid4();
    if (checkOrSetAlreadyCaught(exception)) {
      DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);
      return eventId;
    }
    const hintWithEventId = {
      event_id: eventId,
      ...hint
    };
    this._process(() => this.eventFromException(exception, hintWithEventId).then((event) => this._captureEvent(event, hintWithEventId, scope)).then((res) => res), "error");
    return hintWithEventId.event_id;
  }
  captureMessage(message, level, hint, currentScope) {
    const hintWithEventId = {
      event_id: uuid4(),
      ...hint
    };
    const eventMessage = isParameterizedString(message) ? message : String(message);
    const isMessage = isPrimitive(message);
    const promisedEvent = isMessage ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId);
    this._process(() => promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope)), isMessage ? "unknown" : "error");
    return hintWithEventId.event_id;
  }
  captureEvent(event, hint, currentScope) {
    const eventId = uuid4();
    if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {
      DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);
      return eventId;
    }
    const hintWithEventId = {
      event_id: eventId,
      ...hint
    };
    const sdkProcessingMetadata = event.sdkProcessingMetadata || {};
    const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;
    const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;
    const dataCategory = getDataCategoryByType(event.type);
    this._process(() => this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope), dataCategory);
    return hintWithEventId.event_id;
  }
  captureSession(session) {
    this.sendSession(session);
    updateSession(session, { init: false });
  }
  getDsn() {
    return this._dsn;
  }
  getOptions() {
    return this._options;
  }
  getSdkMetadata() {
    return this._options._metadata;
  }
  getTransport() {
    return this._transport;
  }
  async flush(timeout) {
    const transport = this._transport;
    if (!transport) {
      return true;
    }
    this.emit("flush");
    const clientFinished = await this._isClientDoneProcessing(timeout);
    const transportFlushed = await transport.flush(timeout);
    return clientFinished && transportFlushed;
  }
  async close(timeout) {
    _INTERNAL_flushLogsBuffer(this);
    const result = await this.flush(timeout);
    this.getOptions().enabled = false;
    this.emit("close");
    return result;
  }
  getEventProcessors() {
    return this._eventProcessors;
  }
  addEventProcessor(eventProcessor) {
    this._eventProcessors.push(eventProcessor);
  }
  init() {
    if (this._isEnabled() || this._options.integrations.some(({ name }) => name.startsWith("Spotlight"))) {
      this._setupIntegrations();
    }
  }
  getIntegrationByName(integrationName) {
    return this._integrations[integrationName];
  }
  addIntegration(integration) {
    const isAlreadyInstalled = this._integrations[integration.name];
    setupIntegration(this, integration, this._integrations);
    if (!isAlreadyInstalled) {
      afterSetupIntegrations(this, [integration]);
    }
  }
  sendEvent(event, hint = {}) {
    this.emit("beforeSendEvent", event, hint);
    let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);
    for (const attachment of hint.attachments || []) {
      env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));
    }
    this.sendEnvelope(env).then((sendResponse) => this.emit("afterSendEvent", event, sendResponse));
  }
  sendSession(session) {
    const { release: clientReleaseOption, environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT } = this._options;
    if ("aggregates" in session) {
      const sessionAttrs = session.attrs || {};
      if (!sessionAttrs.release && !clientReleaseOption) {
        DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);
        return;
      }
      sessionAttrs.release = sessionAttrs.release || clientReleaseOption;
      sessionAttrs.environment = sessionAttrs.environment || clientEnvironmentOption;
      session.attrs = sessionAttrs;
    } else {
      if (!session.release && !clientReleaseOption) {
        DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);
        return;
      }
      session.release = session.release || clientReleaseOption;
      session.environment = session.environment || clientEnvironmentOption;
    }
    this.emit("beforeSendSession", session);
    const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);
    this.sendEnvelope(env);
  }
  recordDroppedEvent(reason, category, count = 1) {
    if (this._options.sendClientReports) {
      const key = `${reason}:${category}`;
      DEBUG_BUILD && debug.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ""}`);
      this._outcomes[key] = (this._outcomes[key] || 0) + count;
    }
  }
  on(hook, callback) {
    const hookCallbacks = this._hooks[hook] = this._hooks[hook] || new Set;
    const uniqueCallback = (...args) => callback(...args);
    hookCallbacks.add(uniqueCallback);
    return () => {
      hookCallbacks.delete(uniqueCallback);
    };
  }
  emit(hook, ...rest) {
    const callbacks = this._hooks[hook];
    if (callbacks) {
      callbacks.forEach((callback) => callback(...rest));
    }
  }
  async sendEnvelope(envelope) {
    this.emit("beforeEnvelope", envelope);
    if (this._isEnabled() && this._transport) {
      try {
        return await this._transport.send(envelope);
      } catch (reason) {
        DEBUG_BUILD && debug.error("Error while sending envelope:", reason);
        return {};
      }
    }
    DEBUG_BUILD && debug.error("Transport disabled");
    return {};
  }
  dispose() {}
  _setupIntegrations() {
    const { integrations } = this._options;
    this._integrations = setupIntegrations(this, integrations);
    afterSetupIntegrations(this, integrations);
  }
  _updateSessionFromEvent(session, event) {
    let crashed = event.level === "fatal";
    let errored = false;
    const exceptions = event.exception?.values;
    if (exceptions) {
      errored = true;
      crashed = false;
      for (const ex of exceptions) {
        if (ex.mechanism?.handled === false) {
          crashed = true;
          break;
        }
      }
    }
    const sessionNonTerminal = session.status === "ok";
    const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;
    if (shouldUpdateAndSend) {
      updateSession(session, {
        ...crashed && { status: "crashed" },
        errors: session.errors || Number(errored || crashed)
      });
      this.captureSession(session);
    }
  }
  async _isClientDoneProcessing(timeout) {
    let ticked = 0;
    while (!timeout || ticked < timeout) {
      await new Promise((resolve) => setTimeout(resolve, 1));
      if (!this._numProcessing) {
        return true;
      }
      ticked++;
    }
    return false;
  }
  _isEnabled() {
    return this.getOptions().enabled !== false && this._transport !== undefined;
  }
  _prepareEvent(event, hint, currentScope, isolationScope) {
    const options = this.getOptions();
    const integrations = Object.keys(this._integrations);
    if (!hint.integrations && integrations?.length) {
      hint.integrations = integrations;
    }
    this.emit("preprocessEvent", event, hint);
    if (!event.type) {
      isolationScope.setLastEventId(event.event_id || hint.event_id);
    }
    return prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => {
      if (evt === null) {
        return evt;
      }
      this.emit("postprocessEvent", evt, hint);
      evt.contexts = {
        trace: { ...evt.contexts?.trace, ...getTraceContextFromScope(currentScope) },
        ...evt.contexts
      };
      const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);
      evt.sdkProcessingMetadata = {
        dynamicSamplingContext,
        ...evt.sdkProcessingMetadata
      };
      return evt;
    });
  }
  _captureEvent(event, hint = {}, currentScope = getCurrentScope(), isolationScope = getIsolationScope()) {
    if (DEBUG_BUILD && isErrorEvent2(event)) {
      debug.log(`Captured error event \`${getPossibleEventMessages(event)[0] || "<unknown>"}\``);
    }
    return this._processEvent(event, hint, currentScope, isolationScope).then((finalEvent) => {
      return finalEvent.event_id;
    }, (reason) => {
      if (DEBUG_BUILD) {
        if (_isDoNotSendEventError(reason)) {
          debug.log(reason.message);
        } else if (_isInternalError(reason)) {
          debug.warn(reason.message);
        } else {
          debug.warn(reason);
        }
      }
      return;
    });
  }
  _processEvent(event, hint, currentScope, isolationScope) {
    const options = this.getOptions();
    const { sampleRate } = options;
    const isTransaction = isTransactionEvent(event);
    const isError2 = isErrorEvent2(event);
    const eventType = event.type || "error";
    const beforeSendLabel = `before send for type \`${eventType}\``;
    const parsedSampleRate = typeof sampleRate === "undefined" ? undefined : parseSampleRate(sampleRate);
    if (isError2 && typeof parsedSampleRate === "number" && safeMathRandom() > parsedSampleRate) {
      this.recordDroppedEvent("sample_rate", "error");
      return rejectedSyncPromise(_makeDoNotSendEventError(`Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`));
    }
    const dataCategory = getDataCategoryByType(event.type);
    return this._prepareEvent(event, hint, currentScope, isolationScope).then((prepared) => {
      if (prepared === null) {
        this.recordDroppedEvent("event_processor", dataCategory);
        throw _makeDoNotSendEventError("An event processor returned `null`, will not send event.");
      }
      const isInternalException = hint.data?.__sentry__ === true;
      if (isInternalException) {
        return prepared;
      }
      const result = processBeforeSend(this, options, prepared, hint);
      return _validateBeforeSendResult(result, beforeSendLabel);
    }).then((processedEvent) => {
      if (processedEvent === null) {
        this.recordDroppedEvent("before_send", dataCategory);
        if (isTransaction) {
          const spans = event.spans || [];
          const spanCount = 1 + spans.length;
          this.recordDroppedEvent("before_send", "span", spanCount);
        }
        throw _makeDoNotSendEventError(`${beforeSendLabel} returned \`null\`, will not send event.`);
      }
      const session = currentScope.getSession() || isolationScope.getSession();
      if (isError2 && session) {
        this._updateSessionFromEvent(session, processedEvent);
      }
      if (isTransaction) {
        const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;
        const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;
        const droppedSpanCount = spanCountBefore - spanCountAfter;
        if (droppedSpanCount > 0) {
          this.recordDroppedEvent("before_send", "span", droppedSpanCount);
        }
      }
      const transactionInfo = processedEvent.transaction_info;
      if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {
        const source = "custom";
        processedEvent.transaction_info = {
          ...transactionInfo,
          source
        };
      }
      this.sendEvent(processedEvent, hint);
      return processedEvent;
    }).then(null, (reason) => {
      if (_isDoNotSendEventError(reason) || _isInternalError(reason)) {
        throw reason;
      }
      this.captureException(reason, {
        mechanism: {
          handled: false,
          type: "internal"
        },
        data: {
          __sentry__: true
        },
        originalException: reason
      });
      throw _makeInternalError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${reason}`);
    });
  }
  _process(taskProducer, dataCategory) {
    this._numProcessing++;
    this._promiseBuffer.add(taskProducer).then((value) => {
      this._numProcessing--;
      return value;
    }, (reason) => {
      this._numProcessing--;
      if (reason === SENTRY_BUFFER_FULL_ERROR) {
        this.recordDroppedEvent("queue_overflow", dataCategory);
      }
      return reason;
    });
  }
  _clearOutcomes() {
    const outcomes = this._outcomes;
    this._outcomes = {};
    return Object.entries(outcomes).map(([key, quantity]) => {
      const [reason, category] = key.split(":");
      return {
        reason,
        category,
        quantity
      };
    });
  }
  _flushOutcomes() {
    DEBUG_BUILD && debug.log("Flushing outcomes...");
    const outcomes = this._clearOutcomes();
    if (outcomes.length === 0) {
      DEBUG_BUILD && debug.log("No outcomes to send");
      return;
    }
    if (!this._dsn) {
      DEBUG_BUILD && debug.log("No dsn provided, will not send outcomes");
      return;
    }
    DEBUG_BUILD && debug.log("Sending outcomes:", outcomes);
    const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));
    this.sendEnvelope(envelope);
  }
}
function getDataCategoryByType(type) {
  return type === "replay_event" ? "replay" : type || "error";
}
function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {
  const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`;
  if (isThenable(beforeSendResult)) {
    return beforeSendResult.then((event) => {
      if (!isPlainObject(event) && event !== null) {
        throw _makeInternalError(invalidValueError);
      }
      return event;
    }, (e) => {
      throw _makeInternalError(`${beforeSendLabel} rejected with ${e}`);
    });
  } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {
    throw _makeInternalError(invalidValueError);
  }
  return beforeSendResult;
}
function processBeforeSend(client, options, event, hint) {
  const { beforeSend, beforeSendTransaction, beforeSendSpan, ignoreSpans } = options;
  let processedEvent = event;
  if (isErrorEvent2(processedEvent) && beforeSend) {
    return beforeSend(processedEvent, hint);
  }
  if (isTransactionEvent(processedEvent)) {
    if (beforeSendSpan || ignoreSpans) {
      const rootSpanJson = convertTransactionEventToSpanJson(processedEvent);
      if (ignoreSpans?.length && shouldIgnoreSpan(rootSpanJson, ignoreSpans)) {
        return null;
      }
      if (beforeSendSpan) {
        const processedRootSpanJson = beforeSendSpan(rootSpanJson);
        if (!processedRootSpanJson) {
          showSpanDropWarning();
        } else {
          processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));
        }
      }
      if (processedEvent.spans) {
        const processedSpans = [];
        const initialSpans = processedEvent.spans;
        for (const span of initialSpans) {
          if (ignoreSpans?.length && shouldIgnoreSpan(span, ignoreSpans)) {
            reparentChildSpans(initialSpans, span);
            continue;
          }
          if (beforeSendSpan) {
            const processedSpan = beforeSendSpan(span);
            if (!processedSpan) {
              showSpanDropWarning();
              processedSpans.push(span);
            } else {
              processedSpans.push(processedSpan);
            }
          } else {
            processedSpans.push(span);
          }
        }
        const droppedSpans = processedEvent.spans.length - processedSpans.length;
        if (droppedSpans) {
          client.recordDroppedEvent("before_send", "span", droppedSpans);
        }
        processedEvent.spans = processedSpans;
      }
    }
    if (beforeSendTransaction) {
      if (processedEvent.spans) {
        const spanCountBefore = processedEvent.spans.length;
        processedEvent.sdkProcessingMetadata = {
          ...event.sdkProcessingMetadata,
          spanCountBeforeProcessing: spanCountBefore
        };
      }
      return beforeSendTransaction(processedEvent, hint);
    }
  }
  return processedEvent;
}
function isErrorEvent2(event) {
  return event.type === undefined;
}
function isTransactionEvent(event) {
  return event.type === "transaction";
}
function estimateMetricSizeInBytes(metric) {
  let weight = 0;
  if (metric.name) {
    weight += metric.name.length * 2;
  }
  weight += 8;
  return weight + estimateAttributesSizeInBytes(metric.attributes);
}
function estimateLogSizeInBytes(log2) {
  let weight = 0;
  if (log2.message) {
    weight += log2.message.length * 2;
  }
  return weight + estimateAttributesSizeInBytes(log2.attributes);
}
function estimateAttributesSizeInBytes(attributes) {
  if (!attributes) {
    return 0;
  }
  let weight = 0;
  Object.values(attributes).forEach((value) => {
    if (Array.isArray(value)) {
      weight += value.length * estimatePrimitiveSizeInBytes(value[0]);
    } else if (isPrimitive(value)) {
      weight += estimatePrimitiveSizeInBytes(value);
    } else {
      weight += 100;
    }
  });
  return weight;
}
function estimatePrimitiveSizeInBytes(value) {
  if (typeof value === "string") {
    return value.length * 2;
  } else if (typeof value === "number") {
    return 8;
  } else if (typeof value === "boolean") {
    return 4;
  }
  return 0;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/instrument/handlers.js
var handlers = {};
var instrumented = {};
function addHandler(type, handler) {
  handlers[type] = handlers[type] || [];
  handlers[type].push(handler);
}
function maybeInstrument(type, instrumentFn) {
  if (!instrumented[type]) {
    instrumented[type] = true;
    try {
      instrumentFn();
    } catch (e) {
      DEBUG_BUILD && debug.error(`Error while instrumenting ${type}`, e);
    }
  }
}
function triggerHandlers(type, data) {
  const typeHandlers = type && handlers[type];
  if (!typeHandlers) {
    return;
  }
  for (const handler of typeHandlers) {
    try {
      handler(data);
    } catch (e) {
      DEBUG_BUILD && debug.error(`Error while triggering instrumentation handler.
Type: ${type}
Name: ${getFunctionName(handler)}
Error:`, e);
    }
  }
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/instrument/globalError.js
var _oldOnErrorHandler = null;
function addGlobalErrorInstrumentationHandler(handler) {
  const type = "error";
  addHandler(type, handler);
  maybeInstrument(type, instrumentError);
}
function instrumentError() {
  _oldOnErrorHandler = GLOBAL_OBJ.onerror;
  GLOBAL_OBJ.onerror = function(msg, url, line, column, error2) {
    const handlerData = {
      column,
      error: error2,
      line,
      msg,
      url
    };
    triggerHandlers("error", handlerData);
    if (_oldOnErrorHandler) {
      return _oldOnErrorHandler.apply(this, arguments);
    }
    return false;
  };
  GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/instrument/globalUnhandledRejection.js
var _oldOnUnhandledRejectionHandler = null;
function addGlobalUnhandledRejectionInstrumentationHandler(handler) {
  const type = "unhandledrejection";
  addHandler(type, handler);
  maybeInstrument(type, instrumentUnhandledRejection);
}
function instrumentUnhandledRejection() {
  _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;
  GLOBAL_OBJ.onunhandledrejection = function(e) {
    const handlerData = e;
    triggerHandlers("unhandledrejection", handlerData);
    if (_oldOnUnhandledRejectionHandler) {
      return _oldOnUnhandledRejectionHandler.apply(this, arguments);
    }
    return true;
  };
  GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/tracing/errors.js
var errorsInstrumented = false;
function registerSpanErrorInstrumentation() {
  if (errorsInstrumented) {
    return;
  }
  function errorCallback() {
    const activeSpan = getActiveSpan();
    const rootSpan = activeSpan && getRootSpan(activeSpan);
    if (rootSpan) {
      const message = "internal_error";
      DEBUG_BUILD && debug.log(`[Tracing] Root span: ${message} -> Global error occurred`);
      rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message });
    }
  }
  errorCallback.tag = "sentry_tracingErrorCallback";
  errorsInstrumented = true;
  addGlobalErrorInstrumentationHandler(errorCallback);
  addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/transports/userAgent.js
function addUserAgentToTransportHeaders(options) {
  const sdkMetadata = options._metadata?.sdk;
  const sdkUserAgent = sdkMetadata?.name && sdkMetadata?.version ? `${sdkMetadata?.name}/${sdkMetadata?.version}` : undefined;
  options.transportOptions = {
    ...options.transportOptions,
    headers: {
      ...sdkUserAgent && { "user-agent": sdkUserAgent },
      ...options.transportOptions?.headers
    }
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/eventbuilder.js
function parseStackFrames(stackParser, error2) {
  return stackParser(error2.stack || "", 1);
}
function hasSentryFetchUrlHost(error2) {
  return isError(error2) && "__sentry_fetch_url_host__" in error2 && typeof error2.__sentry_fetch_url_host__ === "string";
}
function _enhanceErrorWithSentryInfo(error2) {
  if (hasSentryFetchUrlHost(error2)) {
    return `${error2.message} (${error2.__sentry_fetch_url_host__})`;
  }
  return error2.message;
}
function exceptionFromError(stackParser, error2) {
  const exception = {
    type: error2.name || error2.constructor.name,
    value: _enhanceErrorWithSentryInfo(error2)
  };
  const frames = parseStackFrames(stackParser, error2);
  if (frames.length) {
    exception.stacktrace = { frames };
  }
  return exception;
}
function getErrorPropertyFromObject(obj) {
  for (const prop in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, prop)) {
      const value = obj[prop];
      if (value instanceof Error) {
        return value;
      }
    }
  }
  return;
}
function getMessageForObject(exception) {
  if ("name" in exception && typeof exception.name === "string") {
    let message = `'${exception.name}' captured as exception`;
    if ("message" in exception && typeof exception.message === "string") {
      message += ` with message '${exception.message}'`;
    }
    return message;
  } else if ("message" in exception && typeof exception.message === "string") {
    return exception.message;
  }
  const keys = extractExceptionKeysForMessage(exception);
  if (isErrorEvent(exception)) {
    return `Event \`ErrorEvent\` captured as exception with message \`${exception.message}\``;
  }
  const className = getObjectClassName(exception);
  return `${className && className !== "Object" ? `'${className}'` : "Object"} captured as exception with keys: ${keys}`;
}
function getObjectClassName(obj) {
  try {
    const prototype = Object.getPrototypeOf(obj);
    return prototype ? prototype.constructor.name : undefined;
  } catch {}
}
function getException(client, mechanism, exception, hint) {
  if (isError(exception)) {
    return [exception, undefined];
  }
  mechanism.synthetic = true;
  if (isPlainObject(exception)) {
    const normalizeDepth = client?.getOptions().normalizeDepth;
    const extras = { ["__serialized__"]: normalizeToSize(exception, normalizeDepth) };
    const errorFromProp = getErrorPropertyFromObject(exception);
    if (errorFromProp) {
      return [errorFromProp, extras];
    }
    const message = getMessageForObject(exception);
    const ex2 = hint?.syntheticException || new Error(message);
    ex2.message = message;
    return [ex2, extras];
  }
  const ex = hint?.syntheticException || new Error(exception);
  ex.message = `${exception}`;
  return [ex, undefined];
}
function eventFromUnknownInput(client, stackParser, exception, hint) {
  const providedMechanism = hint?.data && hint.data.mechanism;
  const mechanism = providedMechanism || {
    handled: true,
    type: "generic"
  };
  const [ex, extras] = getException(client, mechanism, exception, hint);
  const event = {
    exception: {
      values: [exceptionFromError(stackParser, ex)]
    }
  };
  if (extras) {
    event.extra = extras;
  }
  addExceptionTypeValue(event, undefined, undefined);
  addExceptionMechanism(event, mechanism);
  return {
    ...event,
    event_id: hint?.event_id
  };
}
function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) {
  const event = {
    event_id: hint?.event_id,
    level
  };
  if (attachStacktrace && hint?.syntheticException) {
    const frames = parseStackFrames(stackParser, hint.syntheticException);
    if (frames.length) {
      event.exception = {
        values: [
          {
            value: message,
            stacktrace: { frames }
          }
        ]
      };
      addExceptionMechanism(event, { synthetic: true });
    }
  }
  if (isParameterizedString(message)) {
    const { __sentry_template_string__, __sentry_template_values__ } = message;
    event.logentry = {
      message: __sentry_template_string__,
      params: __sentry_template_values__
    };
    return event;
  }
  event.message = message;
  return event;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/server-runtime-client.js
class ServerRuntimeClient extends Client {
  constructor(options) {
    registerSpanErrorInstrumentation();
    addUserAgentToTransportHeaders(options);
    super(options);
    this._setUpMetricsProcessing();
  }
  eventFromException(exception, hint) {
    const event = eventFromUnknownInput(this, this._options.stackParser, exception, hint);
    event.level = "error";
    return resolvedSyncPromise(event);
  }
  eventFromMessage(message, level = "info", hint) {
    return resolvedSyncPromise(eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace));
  }
  captureException(exception, hint, scope) {
    setCurrentRequestSessionErroredOrCrashed(hint);
    return super.captureException(exception, hint, scope);
  }
  captureEvent(event, hint, scope) {
    const isException = !event.type && event.exception?.values && event.exception.values.length > 0;
    if (isException) {
      setCurrentRequestSessionErroredOrCrashed(hint);
    }
    return super.captureEvent(event, hint, scope);
  }
  captureCheckIn(checkIn, monitorConfig, scope) {
    const id = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();
    if (!this._isEnabled()) {
      DEBUG_BUILD && debug.warn("SDK not enabled, will not capture check-in.");
      return id;
    }
    const options = this.getOptions();
    const { release, environment, tunnel } = options;
    const serializedCheckIn = {
      check_in_id: id,
      monitor_slug: checkIn.monitorSlug,
      status: checkIn.status,
      release,
      environment
    };
    if ("duration" in checkIn) {
      serializedCheckIn.duration = checkIn.duration;
    }
    if (monitorConfig) {
      serializedCheckIn.monitor_config = {
        schedule: monitorConfig.schedule,
        checkin_margin: monitorConfig.checkinMargin,
        max_runtime: monitorConfig.maxRuntime,
        timezone: monitorConfig.timezone,
        failure_issue_threshold: monitorConfig.failureIssueThreshold,
        recovery_threshold: monitorConfig.recoveryThreshold
      };
    }
    const [dynamicSamplingContext, traceContext] = _getTraceInfoFromScope(this, scope);
    if (traceContext) {
      serializedCheckIn.contexts = {
        trace: traceContext
      };
    }
    const envelope = createCheckInEnvelope(serializedCheckIn, dynamicSamplingContext, this.getSdkMetadata(), tunnel, this.getDsn());
    DEBUG_BUILD && debug.log("Sending checkin:", checkIn.monitorSlug, checkIn.status);
    this.sendEnvelope(envelope);
    return id;
  }
  dispose() {
    DEBUG_BUILD && debug.log("Disposing client...");
    for (const hookName of Object.keys(this._hooks)) {
      this._hooks[hookName]?.clear();
    }
    this._hooks = {};
    this._eventProcessors.length = 0;
    this._integrations = {};
    this._outcomes = {};
    this._transport = undefined;
    this._promiseBuffer = makePromiseBuffer(DEFAULT_TRANSPORT_BUFFER_SIZE);
  }
  _prepareEvent(event, hint, currentScope, isolationScope) {
    if (this._options.platform) {
      event.platform = event.platform || this._options.platform;
    }
    if (this._options.runtime) {
      event.contexts = {
        ...event.contexts,
        runtime: event.contexts?.runtime || this._options.runtime
      };
    }
    if (this._options.serverName) {
      event.server_name = event.server_name || this._options.serverName;
    }
    return super._prepareEvent(event, hint, currentScope, isolationScope);
  }
  _setUpMetricsProcessing() {
    this.on("processMetric", (metric) => {
      if (this._options.serverName) {
        metric.attributes = {
          "server.address": this._options.serverName,
          ...metric.attributes
        };
      }
    });
  }
}
function setCurrentRequestSessionErroredOrCrashed(eventHint) {
  const requestSession = getIsolationScope().getScopeData().sdkProcessingMetadata.requestSession;
  if (requestSession) {
    const isHandledException = eventHint?.mechanism?.handled ?? true;
    if (isHandledException && requestSession.status !== "crashed") {
      requestSession.status = "errored";
    } else if (!isHandledException) {
      requestSession.status = "crashed";
    }
  }
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/ai/providerSkip.js
var SKIPPED_AI_PROVIDERS = new Set;
function _INTERNAL_clearAiProviderSkips() {
  SKIPPED_AI_PROVIDERS.clear();
  DEBUG_BUILD && debug.log("Cleared AI provider skip registrations");
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/envToBool.js
var FALSY_ENV_VALUES = new Set(["false", "f", "n", "no", "off", "0"]);
var TRUTHY_ENV_VALUES = new Set(["true", "t", "y", "yes", "on", "1"]);
function envToBool(value, options) {
  const normalized = String(value).toLowerCase();
  if (FALSY_ENV_VALUES.has(normalized)) {
    return false;
  }
  if (TRUTHY_ENV_VALUES.has(normalized)) {
    return true;
  }
  return options?.strict ? null : Boolean(value);
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/url.js
var DEFAULT_BASE_URL = "thismessage:/";
function isURLObjectRelative(url) {
  return "isRelative" in url;
}
function parseStringToURLObject(url, urlBase) {
  const isRelative = url.indexOf("://") <= 0 && url.indexOf("//") !== 0;
  const base = urlBase ?? (isRelative ? DEFAULT_BASE_URL : undefined);
  try {
    if ("canParse" in URL && !URL.canParse(url, base)) {
      return;
    }
    const fullUrlObject = new URL(url, base);
    if (isRelative) {
      return {
        isRelative,
        pathname: fullUrlObject.pathname,
        search: fullUrlObject.search,
        hash: fullUrlObject.hash
      };
    }
    return fullUrlObject;
  } catch {}
  return;
}
function getSanitizedUrlStringFromUrlObject(url) {
  if (isURLObjectRelative(url)) {
    return url.pathname;
  }
  const newUrl = new URL(url);
  newUrl.search = "";
  newUrl.hash = "";
  if (["80", "443"].includes(newUrl.port)) {
    newUrl.port = "";
  }
  if (newUrl.password) {
    newUrl.password = "%filtered%";
  }
  if (newUrl.username) {
    newUrl.username = "%filtered%";
  }
  return newUrl.toString();
}
function getHttpSpanNameFromUrlObject(urlObject, kind, request, routeName) {
  const method = request?.method?.toUpperCase() ?? "GET";
  const route = routeName ? routeName : urlObject ? kind === "client" ? getSanitizedUrlStringFromUrlObject(urlObject) : urlObject.pathname : "/";
  return `${method} ${route}`;
}
function getHttpSpanDetailsFromUrlObject(urlObject, kind, spanOrigin, request, routeName) {
  const attributes = {
    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,
    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "url"
  };
  if (routeName) {
    attributes[kind === "server" ? "http.route" : "url.template"] = routeName;
    attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = "route";
  }
  if (request?.method) {
    attributes[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD] = request.method.toUpperCase();
  }
  if (urlObject) {
    if (urlObject.search) {
      attributes["url.query"] = urlObject.search;
    }
    if (urlObject.hash) {
      attributes["url.fragment"] = urlObject.hash;
    }
    if (urlObject.pathname) {
      attributes["url.path"] = urlObject.pathname;
      if (urlObject.pathname === "/") {
        attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = "route";
      }
    }
    if (!isURLObjectRelative(urlObject)) {
      attributes[SEMANTIC_ATTRIBUTE_URL_FULL] = urlObject.href;
      if (urlObject.port) {
        attributes["url.port"] = urlObject.port;
      }
      if (urlObject.protocol) {
        attributes["url.scheme"] = urlObject.protocol;
      }
      if (urlObject.hostname) {
        attributes[kind === "server" ? "server.address" : "url.domain"] = urlObject.hostname;
      }
    }
  }
  return [getHttpSpanNameFromUrlObject(urlObject, kind, request, routeName), attributes];
}
function parseUrl(url) {
  if (!url) {
    return {};
  }
  const match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
  if (!match) {
    return {};
  }
  const query = match[6] || "";
  const fragment = match[8] || "";
  return {
    host: match[4],
    path: match[5],
    protocol: match[2],
    search: query,
    hash: fragment,
    relative: match[5] + query + fragment
  };
}
function stripUrlQueryAndFragment(urlPath) {
  return urlPath.split(/[?#]/, 1)[0];
}
function getSanitizedUrlString(url) {
  const { protocol, host, path } = url;
  const filteredHost = host?.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || "";
  return `${protocol ? `${protocol}://` : ""}${filteredHost}${path}`;
}
function stripDataUrlContent(url, includeDataPrefix = true) {
  if (url.startsWith("data:")) {
    const match = url.match(/^data:([^;,]+)/);
    const mimeType = match ? match[1] : "text/plain";
    const isBase64 = url.includes(";base64,");
    const dataStart = url.indexOf(",");
    let dataPrefix = "";
    if (includeDataPrefix && dataStart !== -1) {
      const data = url.slice(dataStart + 1);
      dataPrefix = data.length > 10 ? `${data.slice(0, 10)}... [truncated]` : data;
    }
    return `data:${mimeType}${isBase64 ? ",base64" : ""}${dataPrefix ? `,${dataPrefix}` : ""}`;
  }
  return url;
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/sdkMetadata.js
function applySdkMetadata(options, name, names = [name], source = "npm") {
  const sdk = (options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {};
  if (!sdk.name) {
    sdk.name = `sentry.javascript.${name}`;
    sdk.packages = names.map((name2) => ({
      name: `${source}:@sentry/${name2}`,
      version: SDK_VERSION
    }));
    sdk.version = SDK_VERSION;
  }
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/traceData.js
function getTraceData(options = {}) {
  const client = options.client || getClient();
  if (!isEnabled2() || !client) {
    return {};
  }
  const carrier = getMainCarrier();
  const acs = getAsyncContextStrategy(carrier);
  if (acs.getTraceData) {
    return acs.getTraceData(options);
  }
  const scope = options.scope || getCurrentScope();
  const span = options.span || getActiveSpan();
  const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope);
  const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
  const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);
  const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);
  if (!isValidSentryTraceHeader) {
    debug.warn("Invalid sentry-trace data. Cannot generate trace data");
    return {};
  }
  const traceData = {
    "sentry-trace": sentryTrace,
    baggage
  };
  if (options.propagateTraceparent) {
    traceData.traceparent = span ? spanToTraceparentHeader(span) : scopeToTraceparentHeader(scope);
  }
  return traceData;
}
function scopeToTraceHeader(scope) {
  const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();
  return generateSentryTraceHeader(traceId, propagationSpanId, sampled);
}
function scopeToTraceparentHeader(scope) {
  const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();
  return generateTraceparentHeader(traceId, propagationSpanId, sampled);
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/tracePropagationTargets.js
var NOT_PROPAGATED_MESSAGE = "[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:";
function shouldPropagateTraceForUrl(url, tracePropagationTargets, decisionMap) {
  if (typeof url !== "string" || !tracePropagationTargets) {
    return true;
  }
  const cachedDecision = decisionMap?.get(url);
  if (cachedDecision !== undefined) {
    DEBUG_BUILD && !cachedDecision && debug.log(NOT_PROPAGATED_MESSAGE, url);
    return cachedDecision;
  }
  const decision = stringMatchesSomePattern(url, tracePropagationTargets);
  decisionMap?.set(url, decision);
  DEBUG_BUILD && !decision && debug.log(NOT_PROPAGATED_MESSAGE, url);
  return decision;
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/debounce.js
function debounce(func, wait, options) {
  let callbackReturnValue;
  let timerId;
  let maxTimerId;
  const maxWait = options?.maxWait ? Math.max(options.maxWait, wait) : 0;
  const setTimeoutImpl = options?.setTimeoutImpl || setTimeout;
  function invokeFunc() {
    cancelTimers();
    callbackReturnValue = func();
    return callbackReturnValue;
  }
  function cancelTimers() {
    timerId !== undefined && clearTimeout(timerId);
    maxTimerId !== undefined && clearTimeout(maxTimerId);
    timerId = maxTimerId = undefined;
  }
  function flush2() {
    if (timerId !== undefined || maxTimerId !== undefined) {
      return invokeFunc();
    }
    return callbackReturnValue;
  }
  function debounced() {
    if (timerId) {
      clearTimeout(timerId);
    }
    timerId = setTimeoutImpl(invokeFunc, wait);
    if (maxWait && maxTimerId === undefined) {
      maxTimerId = setTimeoutImpl(invokeFunc, maxWait);
    }
    return callbackReturnValue;
  }
  debounced.cancel = cancelTimers;
  debounced.flush = flush2;
  return debounced;
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/request.js
function headersToDict(reqHeaders) {
  const headers = Object.create(null);
  try {
    Object.entries(reqHeaders).forEach(([key, value]) => {
      if (typeof value === "string") {
        headers[key] = value;
      }
    });
  } catch {}
  return headers;
}
function httpRequestToRequestData(request) {
  const headers = request.headers || {};
  const forwardedHost = typeof headers["x-forwarded-host"] === "string" ? headers["x-forwarded-host"] : undefined;
  const host = forwardedHost || (typeof headers.host === "string" ? headers.host : undefined);
  const forwardedProto = typeof headers["x-forwarded-proto"] === "string" ? headers["x-forwarded-proto"] : undefined;
  const protocol = forwardedProto || request.protocol || (request.socket?.encrypted ? "https" : "http");
  const url = request.url || "";
  const absoluteUrl = getAbsoluteUrl({
    url,
    host,
    protocol
  });
  const data = request.body || undefined;
  const cookies = request.cookies;
  return {
    url: absoluteUrl,
    method: request.method,
    query_string: extractQueryParamsFromUrl(url),
    headers: headersToDict(headers),
    cookies,
    data
  };
}
function getAbsoluteUrl({
  url,
  protocol,
  host
}) {
  if (url?.startsWith("http")) {
    return url;
  }
  if (url && host) {
    return `${protocol}://${host}${url}`;
  }
  return;
}
var SENSITIVE_HEADER_SNIPPETS = [
  "auth",
  "token",
  "secret",
  "session",
  "password",
  "passwd",
  "pwd",
  "key",
  "jwt",
  "bearer",
  "sso",
  "saml",
  "csrf",
  "xsrf",
  "credentials",
  "set-cookie",
  "cookie"
];
var PII_HEADER_SNIPPETS = ["x-forwarded-", "-user"];
function httpHeadersToSpanAttributes(headers, sendDefaultPii = false, lifecycle = "request") {
  const spanAttributes = {};
  try {
    Object.entries(headers).forEach(([key, value]) => {
      if (value == null) {
        return;
      }
      const lowerCasedHeaderKey = key.toLowerCase();
      const isCookieHeader = lowerCasedHeaderKey === "cookie" || lowerCasedHeaderKey === "set-cookie";
      if (isCookieHeader && typeof value === "string" && value !== "") {
        const isSetCookie = lowerCasedHeaderKey === "set-cookie";
        const semicolonIndex = value.indexOf(";");
        const cookieString = isSetCookie && semicolonIndex !== -1 ? value.substring(0, semicolonIndex) : value;
        const cookies = isSetCookie ? [cookieString] : cookieString.split("; ");
        for (const cookie of cookies) {
          const equalSignIndex = cookie.indexOf("=");
          const cookieKey = equalSignIndex !== -1 ? cookie.substring(0, equalSignIndex) : cookie;
          const cookieValue = equalSignIndex !== -1 ? cookie.substring(equalSignIndex + 1) : "";
          const lowerCasedCookieKey = cookieKey.toLowerCase();
          addSpanAttribute(spanAttributes, lowerCasedHeaderKey, lowerCasedCookieKey, cookieValue, sendDefaultPii, lifecycle);
        }
      } else {
        addSpanAttribute(spanAttributes, lowerCasedHeaderKey, "", value, sendDefaultPii, lifecycle);
      }
    });
  } catch {}
  return spanAttributes;
}
function normalizeAttributeKey(key) {
  return key.replace(/-/g, "_");
}
function addSpanAttribute(spanAttributes, headerKey, cookieKey, value, sendPii, lifecycle) {
  const headerValue = handleHttpHeader(cookieKey || headerKey, value, sendPii);
  if (headerValue == null) {
    return;
  }
  const normalizedKey = `http.${lifecycle}.header.${normalizeAttributeKey(headerKey)}${cookieKey ? `.${normalizeAttributeKey(cookieKey)}` : ""}`;
  spanAttributes[normalizedKey] = headerValue;
}
function handleHttpHeader(lowerCasedKey, value, sendPii) {
  const isSensitive = sendPii ? SENSITIVE_HEADER_SNIPPETS.some((snippet) => lowerCasedKey.includes(snippet)) : [...PII_HEADER_SNIPPETS, ...SENSITIVE_HEADER_SNIPPETS].some((snippet) => lowerCasedKey.includes(snippet));
  if (isSensitive) {
    return "[Filtered]";
  } else if (Array.isArray(value)) {
    return value.map((v) => v != null ? String(v) : v).join(";");
  } else if (typeof value === "string") {
    return value;
  }
  return;
}
function extractQueryParamsFromUrl(url) {
  if (!url) {
    return;
  }
  try {
    const queryParams = new URL(url, "http://s.io").search.slice(1);
    return queryParams.length ? queryParams : undefined;
  } catch {
    return;
  }
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/breadcrumbs.js
var DEFAULT_BREADCRUMBS = 100;
function addBreadcrumb(breadcrumb, hint) {
  const client = getClient();
  const isolationScope = getIsolationScope();
  if (!client)
    return;
  const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();
  if (maxBreadcrumbs <= 0)
    return;
  const timestamp = dateTimestampInSeconds();
  const mergedBreadcrumb = { timestamp, ...breadcrumb };
  const finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb;
  if (finalBreadcrumb === null)
    return;
  if (client.emit) {
    client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint);
  }
  isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/integrations/functiontostring.js
var originalFunctionToString;
var INTEGRATION_NAME = "FunctionToString";
var SETUP_CLIENTS = new WeakMap;
var _functionToStringIntegration = () => {
  return {
    name: INTEGRATION_NAME,
    setupOnce() {
      originalFunctionToString = Function.prototype.toString;
      try {
        Function.prototype.toString = function(...args) {
          const originalFunction = getOriginalFunction(this);
          const context = SETUP_CLIENTS.has(getClient()) && originalFunction !== undefined ? originalFunction : this;
          return originalFunctionToString.apply(context, args);
        };
      } catch {}
    },
    setup(client) {
      SETUP_CLIENTS.set(client, true);
    }
  };
};
var functionToStringIntegration = defineIntegration(_functionToStringIntegration);
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/integrations/eventFilters.js
var DEFAULT_IGNORE_ERRORS = [
  /^Script error\.?$/,
  /^Javascript error: Script error\.? on line 0$/,
  /^ResizeObserver loop completed with undelivered notifications.$/,
  /^Cannot redefine property: googletag$/,
  /^Can't find variable: gmo$/,
  /^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,
  /can't redefine non-configurable property "solana"/,
  /vv\(\)\.getRestrictions is not a function/,
  /Can't find variable: _AutofillCallbackHandler/,
  /Object Not Found Matching Id:\d+, MethodName:simulateEvent/,
  /^Java exception was raised during method invocation$/
];
var INTEGRATION_NAME2 = "EventFilters";
var eventFiltersIntegration = defineIntegration((options = {}) => {
  let mergedOptions;
  return {
    name: INTEGRATION_NAME2,
    setup(client) {
      const clientOptions = client.getOptions();
      mergedOptions = _mergeOptions(options, clientOptions);
    },
    processEvent(event, _hint, client) {
      if (!mergedOptions) {
        const clientOptions = client.getOptions();
        mergedOptions = _mergeOptions(options, clientOptions);
      }
      return _shouldDropEvent(event, mergedOptions) ? null : event;
    }
  };
});
var inboundFiltersIntegration = defineIntegration((options = {}) => {
  return {
    ...eventFiltersIntegration(options),
    name: "InboundFilters"
  };
});
function _mergeOptions(internalOptions = {}, clientOptions = {}) {
  return {
    allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []],
    denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []],
    ignoreErrors: [
      ...internalOptions.ignoreErrors || [],
      ...clientOptions.ignoreErrors || [],
      ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS
    ],
    ignoreTransactions: [...internalOptions.ignoreTransactions || [], ...clientOptions.ignoreTransactions || []]
  };
}
function _shouldDropEvent(event, options) {
  if (!event.type) {
    if (_isIgnoredError(event, options.ignoreErrors)) {
      DEBUG_BUILD && debug.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${getEventDescription(event)}`);
      return true;
    }
    if (_isUselessError(event)) {
      DEBUG_BUILD && debug.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${getEventDescription(event)}`);
      return true;
    }
    if (_isDeniedUrl(event, options.denyUrls)) {
      DEBUG_BUILD && debug.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${getEventDescription(event)}.
Url: ${_getEventFilterUrl(event)}`);
      return true;
    }
    if (!_isAllowedUrl(event, options.allowUrls)) {
      DEBUG_BUILD && debug.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${getEventDescription(event)}.
Url: ${_getEventFilterUrl(event)}`);
      return true;
    }
  } else if (event.type === "transaction") {
    if (_isIgnoredTransaction(event, options.ignoreTransactions)) {
      DEBUG_BUILD && debug.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${getEventDescription(event)}`);
      return true;
    }
  }
  return false;
}
function _isIgnoredError(event, ignoreErrors) {
  if (!ignoreErrors?.length) {
    return false;
  }
  return getPossibleEventMessages(event).some((message) => stringMatchesSomePattern(message, ignoreErrors));
}
function _isIgnoredTransaction(event, ignoreTransactions) {
  if (!ignoreTransactions?.length) {
    return false;
  }
  const name = event.transaction;
  return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;
}
function _isDeniedUrl(event, denyUrls) {
  if (!denyUrls?.length) {
    return false;
  }
  const url = _getEventFilterUrl(event);
  return !url ? false : stringMatchesSomePattern(url, denyUrls);
}
function _isAllowedUrl(event, allowUrls) {
  if (!allowUrls?.length) {
    return true;
  }
  const url = _getEventFilterUrl(event);
  return !url ? true : stringMatchesSomePattern(url, allowUrls);
}
function _getLastValidUrl(frames = []) {
  for (let i = frames.length - 1;i >= 0; i--) {
    const frame = frames[i];
    if (frame && frame.filename !== "<anonymous>" && frame.filename !== "[native code]") {
      return frame.filename || null;
    }
  }
  return null;
}
function _getEventFilterUrl(event) {
  try {
    const rootException = [...event.exception?.values ?? []].reverse().find((value) => value.mechanism?.parent_id === undefined && value.stacktrace?.frames?.length);
    const frames = rootException?.stacktrace?.frames;
    return frames ? _getLastValidUrl(frames) : null;
  } catch {
    DEBUG_BUILD && debug.error(`Cannot extract url for event ${getEventDescription(event)}`);
    return null;
  }
}
function _isUselessError(event) {
  if (!event.exception?.values?.length) {
    return false;
  }
  return !event.message && !event.exception.values.some((value) => value.stacktrace || value.type && value.type !== "Error" || value.value);
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/aggregate-errors.js
function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, key, limit, event, hint) {
  if (!event.exception?.values || !hint || !isInstanceOf(hint.originalException, Error)) {
    return;
  }
  const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;
  if (originalException) {
    event.exception.values = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, hint.originalException, key, event.exception.values, originalException, 0);
  }
}
function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error2, key, prevExceptions, exception, exceptionId) {
  if (prevExceptions.length >= limit + 1) {
    return prevExceptions;
  }
  let newExceptions = [...prevExceptions];
  if (isInstanceOf(error2[key], Error)) {
    applyExceptionGroupFieldsForParentException(exception, exceptionId, error2);
    const newException = exceptionFromErrorImplementation(parser, error2[key]);
    const newExceptionId = newExceptions.length;
    applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);
    newExceptions = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error2[key], key, [newException, ...newExceptions], newException, newExceptionId);
  }
  if (isExceptionGroup(error2)) {
    error2.errors.forEach((childError, i) => {
      if (isInstanceOf(childError, Error)) {
        applyExceptionGroupFieldsForParentException(exception, exceptionId, error2);
        const newException = exceptionFromErrorImplementation(parser, childError);
        const newExceptionId = newExceptions.length;
        applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);
        newExceptions = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, childError, key, [newException, ...newExceptions], newException, newExceptionId);
      }
    });
  }
  return newExceptions;
}
function isExceptionGroup(error2) {
  return Array.isArray(error2.errors);
}
function applyExceptionGroupFieldsForParentException(exception, exceptionId, error2) {
  exception.mechanism = {
    handled: true,
    type: "auto.core.linked_errors",
    ...isExceptionGroup(error2) && { is_exception_group: true },
    ...exception.mechanism,
    exception_id: exceptionId
  };
}
function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) {
  exception.mechanism = {
    handled: true,
    ...exception.mechanism,
    type: "chained",
    source,
    exception_id: exceptionId,
    parent_id: parentId
  };
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/integrations/linkederrors.js
var DEFAULT_KEY = "cause";
var DEFAULT_LIMIT = 5;
var INTEGRATION_NAME3 = "LinkedErrors";
var _linkedErrorsIntegration = (options = {}) => {
  const limit = options.limit || DEFAULT_LIMIT;
  const key = options.key || DEFAULT_KEY;
  return {
    name: INTEGRATION_NAME3,
    preprocessEvent(event, hint, client) {
      const options2 = client.getOptions();
      applyAggregateErrorsToEvent(exceptionFromError, options2.stackParser, key, limit, event, hint);
    }
  };
};
var linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/cookie.js
function parseCookie(str) {
  const obj = {};
  let index = 0;
  while (index < str.length) {
    const eqIdx = str.indexOf("=", index);
    if (eqIdx === -1) {
      break;
    }
    let endIdx = str.indexOf(";", index);
    if (endIdx === -1) {
      endIdx = str.length;
    } else if (endIdx < eqIdx) {
      index = str.lastIndexOf(";", eqIdx - 1) + 1;
      continue;
    }
    const key = str.slice(index, eqIdx).trim();
    if (obj[key] === undefined) {
      let val = str.slice(eqIdx + 1, endIdx).trim();
      if (val.charCodeAt(0) === 34) {
        val = val.slice(1, -1);
      }
      try {
        obj[key] = val.indexOf("%") !== -1 ? decodeURIComponent(val) : val;
      } catch {
        obj[key] = val;
      }
    }
    index = endIdx + 1;
  }
  return obj;
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/vendor/getIpAddress.js
var ipHeaderNames = [
  "X-Client-IP",
  "X-Forwarded-For",
  "Fly-Client-IP",
  "CF-Connecting-IP",
  "Fastly-Client-Ip",
  "True-Client-Ip",
  "X-Real-IP",
  "X-Cluster-Client-IP",
  "X-Forwarded",
  "Forwarded-For",
  "Forwarded",
  "X-Vercel-Forwarded-For"
];
function getClientIPAddress(headers) {
  const lowerCaseHeaders = {};
  for (const key of Object.keys(headers)) {
    lowerCaseHeaders[key.toLowerCase()] = headers[key];
  }
  const headerValues = ipHeaderNames.map((headerName) => {
    const rawValue = lowerCaseHeaders[headerName.toLowerCase()];
    const value = Array.isArray(rawValue) ? rawValue.join(";") : rawValue;
    if (headerName === "Forwarded") {
      return parseForwardedHeader(value);
    }
    return value?.split(",").map((v) => v.trim());
  });
  const flattenedHeaderValues = headerValues.reduce((acc, val) => {
    if (!val) {
      return acc;
    }
    return acc.concat(val);
  }, []);
  const ipAddress = flattenedHeaderValues.find((ip) => ip !== null && isIP(ip));
  return ipAddress || null;
}
function parseForwardedHeader(value) {
  if (!value) {
    return null;
  }
  for (const part of value.split(";")) {
    if (part.startsWith("for=")) {
      return part.slice(4);
    }
  }
  return null;
}
function isIP(str) {
  const regex = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/;
  return regex.test(str);
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/integrations/requestdata.js
var DEFAULT_INCLUDE = {
  cookies: true,
  data: true,
  headers: true,
  query_string: true,
  url: true
};
var INTEGRATION_NAME4 = "RequestData";
var _requestDataIntegration = (options = {}) => {
  const include = {
    ...DEFAULT_INCLUDE,
    ...options.include
  };
  return {
    name: INTEGRATION_NAME4,
    processEvent(event, _hint, client) {
      const { sdkProcessingMetadata = {} } = event;
      const { normalizedRequest, ipAddress } = sdkProcessingMetadata;
      const includeWithDefaultPiiApplied = {
        ...include,
        ip: include.ip ?? client.getOptions().sendDefaultPii
      };
      if (normalizedRequest) {
        addNormalizedRequestDataToEvent(event, normalizedRequest, { ipAddress }, includeWithDefaultPiiApplied);
      }
      return event;
    }
  };
};
var requestDataIntegration = defineIntegration(_requestDataIntegration);
function addNormalizedRequestDataToEvent(event, req, additionalData, include) {
  event.request = {
    ...event.request,
    ...extractNormalizedRequestData(req, include)
  };
  if (include.ip) {
    const ip = req.headers && getClientIPAddress(req.headers) || additionalData.ipAddress;
    if (ip) {
      event.user = {
        ...event.user,
        ip_address: ip
      };
    }
  }
}
function extractNormalizedRequestData(normalizedRequest, include) {
  const requestData = {};
  const headers = { ...normalizedRequest.headers };
  if (include.headers) {
    requestData.headers = headers;
    if (!include.cookies) {
      delete headers.cookie;
    }
    if (!include.ip) {
      ipHeaderNames.forEach((ipHeaderName) => {
        delete headers[ipHeaderName];
      });
    }
  }
  requestData.method = normalizedRequest.method;
  if (include.url) {
    requestData.url = normalizedRequest.url;
  }
  if (include.cookies) {
    const cookies = normalizedRequest.cookies || (headers?.cookie ? parseCookie(headers.cookie) : undefined);
    requestData.cookies = cookies || {};
  }
  if (include.query_string) {
    requestData.query_string = normalizedRequest.query_string;
  }
  if (include.data) {
    requestData.data = normalizedRequest.data;
  }
  return requestData;
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/instrument/console.js
function addConsoleInstrumentationHandler(handler) {
  const type = "console";
  addHandler(type, handler);
  maybeInstrument(type, instrumentConsole);
}
function instrumentConsole() {
  if (!("console" in GLOBAL_OBJ)) {
    return;
  }
  CONSOLE_LEVELS.forEach(function(level) {
    if (!(level in GLOBAL_OBJ.console)) {
      return;
    }
    fill(GLOBAL_OBJ.console, level, function(originalConsoleMethod) {
      originalConsoleMethods[level] = originalConsoleMethod;
      return function(...args) {
        const handlerData = { args, level };
        triggerHandlers("console", handlerData);
        const log2 = originalConsoleMethods[level];
        log2?.apply(GLOBAL_OBJ.console, args);
      };
    });
  });
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/severity.js
function severityLevelFromString(level) {
  return level === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(level) ? level : "log";
}

// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/path.js
var splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
function splitPath(filename) {
  const truncated = filename.length > 1024 ? `<truncated>${filename.slice(-1024)}` : filename;
  const parts = splitPathRe.exec(truncated);
  return parts ? parts.slice(1) : [];
}
function dirname(path) {
  const result = splitPath(path);
  const root = result[0] || "";
  let dir = result[1];
  if (!root && !dir) {
    return ".";
  }
  if (dir) {
    dir = dir.slice(0, dir.length - 1);
  }
  return root + dir;
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/integrations/console.js
var INTEGRATION_NAME5 = "Console";
var consoleIntegration = defineIntegration((options = {}) => {
  const levels = new Set(options.levels || CONSOLE_LEVELS);
  return {
    name: INTEGRATION_NAME5,
    setup(client) {
      addConsoleInstrumentationHandler(({ args, level }) => {
        if (getClient() !== client || !levels.has(level)) {
          return;
        }
        addConsoleBreadcrumb(level, args);
      });
    }
  };
});
function addConsoleBreadcrumb(level, args) {
  const breadcrumb = {
    category: "console",
    data: {
      arguments: args,
      logger: "console"
    },
    level: severityLevelFromString(level),
    message: formatConsoleArgs(args)
  };
  if (level === "assert") {
    if (args[0] === false) {
      const assertionArgs = args.slice(1);
      breadcrumb.message = assertionArgs.length > 0 ? `Assertion failed: ${formatConsoleArgs(assertionArgs)}` : "Assertion failed";
      breadcrumb.data.arguments = assertionArgs;
    } else {
      return;
    }
  }
  addBreadcrumb(breadcrumb, {
    input: args,
    level
  });
}
function formatConsoleArgs(values) {
  return "util" in GLOBAL_OBJ && typeof GLOBAL_OBJ.util.format === "function" ? GLOBAL_OBJ.util.format(...values) : safeJoin(values, " ");
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/integrations/conversationId.js
var INTEGRATION_NAME6 = "ConversationId";
var _conversationIdIntegration = () => {
  return {
    name: INTEGRATION_NAME6,
    setup(client) {
      client.on("spanStart", (span) => {
        const scopeData = getCurrentScope().getScopeData();
        const isolationScopeData = getIsolationScope().getScopeData();
        const conversationId = scopeData.conversationId || isolationScopeData.conversationId;
        if (conversationId) {
          span.setAttribute(GEN_AI_CONVERSATION_ID_ATTRIBUTE, conversationId);
        }
      });
    }
  };
};
var conversationIdIntegration = defineIntegration(_conversationIdIntegration);
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/breadcrumb-log-level.js
function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
  if (statusCode === undefined) {
    return;
  } else if (statusCode >= 400 && statusCode < 500) {
    return "warning";
  } else if (statusCode >= 500) {
    return "error";
  } else {
    return;
  }
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/env.js
function getSDKSource() {
  return "npm";
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/node-stack-trace.js
function filenameIsInApp(filename, isNative = false) {
  const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
  return !isInternal && filename !== undefined && !filename.includes("node_modules/");
}
function node(getModule) {
  const FILENAME_MATCH = /^\s*[-]{4,}$/;
  const FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
  const DATA_URI_MATCH = /at (?:async )?(.+?) \(data:(.*?),/;
  return (line) => {
    const dataUriMatch = line.match(DATA_URI_MATCH);
    if (dataUriMatch) {
      return {
        filename: `<data:${dataUriMatch[2]}>`,
        function: dataUriMatch[1]
      };
    }
    const lineMatch = line.match(FULL_MATCH);
    if (lineMatch) {
      let object;
      let method;
      let functionName;
      let typeName;
      let methodName;
      if (lineMatch[1]) {
        functionName = lineMatch[1];
        let methodStart = functionName.lastIndexOf(".");
        if (functionName[methodStart - 1] === ".") {
          methodStart--;
        }
        if (methodStart > 0) {
          object = functionName.slice(0, methodStart);
          method = functionName.slice(methodStart + 1);
          const objectEnd = object.indexOf(".Module");
          if (objectEnd > 0) {
            functionName = functionName.slice(objectEnd + 1);
            object = object.slice(0, objectEnd);
          }
        }
        typeName = undefined;
      }
      if (method) {
        typeName = object;
        methodName = method;
      }
      if (method === "<anonymous>") {
        methodName = undefined;
        functionName = undefined;
      }
      if (functionName === undefined) {
        methodName = methodName || UNKNOWN_FUNCTION;
        functionName = typeName ? `${typeName}.${methodName}` : methodName;
      }
      let filename = normalizeStackTracePath(lineMatch[2]);
      const isNative = lineMatch[5] === "native";
      if (!filename && lineMatch[5] && !isNative) {
        filename = lineMatch[5];
      }
      const maybeDecodedFilename = filename ? _safeDecodeURI(filename) : undefined;
      return {
        filename: maybeDecodedFilename ?? filename,
        module: maybeDecodedFilename && getModule?.(maybeDecodedFilename),
        function: functionName,
        lineno: _parseIntOrUndefined(lineMatch[3]),
        colno: _parseIntOrUndefined(lineMatch[4]),
        in_app: filenameIsInApp(filename || "", isNative)
      };
    }
    if (line.match(FILENAME_MATCH)) {
      return {
        filename: line
      };
    }
    return;
  };
}
function nodeStackLineParser(getModule) {
  return [90, node(getModule)];
}
function _parseIntOrUndefined(input) {
  return parseInt(input || "", 10) || undefined;
}
function _safeDecodeURI(filename) {
  try {
    return decodeURI(filename);
  } catch {
    return;
  }
}
// ../../node_modules/.pnpm/@sentry+core@10.46.0/node_modules/@sentry/core/build/esm/utils/lru.js
class LRUMap {
  constructor(_maxSize) {
    this._maxSize = _maxSize;
    this._cache = new Map;
  }
  get size() {
    return this._cache.size;
  }
  get(key) {
    const value = this._cache.get(key);
    if (value === undefined) {
      return;
    }
    this._cache.delete(key);
    this._cache.set(key, value);
    return value;
  }
  set(key, value) {
    if (this._cache.size >= this._maxSize) {
      const nextKey = this._cache.keys().next().value;
      this._cache.delete(nextKey);
    }
    this._cache.set(key, value);
  }
  remove(key) {
    const value = this._cache.get(key);
    if (value) {
      this._cache.delete(key);
    }
    return value;
  }
  clear() {
    this._cache.clear();
  }
  keys() {
    return Array.from(this._cache.keys());
  }
  values() {
    const values = [];
    this._cache.forEach((value) => values.push(value));
    return values;
  }
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/httpServerSpansIntegration.js
var import_api4 = __toESM(require_src(), 1);
var import_core3 = __toESM(require_src8(), 1);
var import_semantic_conventions = __toESM(require_src2(), 1);
import { errorMonitor } from "node:events";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/debug-build.js
var DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/httpServerIntegration.js
var import_api3 = __toESM(require_src(), 1);
import { subscribe } from "node:diagnostics_channel";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/constants.js
var INSTRUMENTATION_NAME = "@sentry/instrumentation-http";
var MAX_BODY_BYTE_LENGTH = 1024 * 1024;

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/captureRequestBody.js
function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySize, integrationName) {
  let bodyByteLength = 0;
  const chunks = [];
  DEBUG_BUILD2 && debug.log(integrationName, "Patching request.on");
  const callbackMap = new WeakMap;
  const maxBodySize = maxIncomingRequestBodySize === "small" ? 1000 : maxIncomingRequestBodySize === "medium" ? 1e4 : MAX_BODY_BYTE_LENGTH;
  try {
    req.on = new Proxy(req.on, {
      apply: (target, thisArg, args) => {
        const [event, listener, ...restArgs] = args;
        if (event === "data") {
          DEBUG_BUILD2 && debug.log(integrationName, `Handling request.on("data") with maximum body size of ${maxBodySize}b`);
          const callback = new Proxy(listener, {
            apply: (target2, thisArg2, args2) => {
              try {
                const chunk = args2[0];
                const bufferifiedChunk = Buffer.from(chunk);
                if (bodyByteLength < maxBodySize) {
                  chunks.push(bufferifiedChunk);
                  bodyByteLength += bufferifiedChunk.byteLength;
                } else if (DEBUG_BUILD2) {
                  debug.log(integrationName, `Dropping request body chunk because maximum body length of ${maxBodySize}b is exceeded.`);
                }
              } catch (_err) {
                DEBUG_BUILD2 && debug.error(integrationName, "Encountered error while storing body chunk.");
              }
              return Reflect.apply(target2, thisArg2, args2);
            }
          });
          callbackMap.set(listener, callback);
          return Reflect.apply(target, thisArg, [event, callback, ...restArgs]);
        }
        return Reflect.apply(target, thisArg, args);
      }
    });
    req.off = new Proxy(req.off, {
      apply: (target, thisArg, args) => {
        const [, listener] = args;
        const callback = callbackMap.get(listener);
        if (callback) {
          callbackMap.delete(listener);
          const modifiedArgs = args.slice();
          modifiedArgs[1] = callback;
          return Reflect.apply(target, thisArg, modifiedArgs);
        }
        return Reflect.apply(target, thisArg, args);
      }
    });
    req.on("end", () => {
      try {
        const body = Buffer.concat(chunks).toString("utf-8");
        if (body) {
          const bodyByteLength2 = Buffer.byteLength(body, "utf-8");
          const truncatedBody = bodyByteLength2 > maxBodySize ? `${Buffer.from(body).subarray(0, maxBodySize - 3).toString("utf-8")}...` : body;
          isolationScope.setSDKProcessingMetadata({ normalizedRequest: { data: truncatedBody } });
        }
      } catch (error2) {
        if (DEBUG_BUILD2) {
          debug.error(integrationName, "Error building captured request body", error2);
        }
      }
    });
  } catch (error2) {
    if (DEBUG_BUILD2) {
      debug.error(integrationName, "Error patching request to capture body", error2);
    }
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/httpServerIntegration.js
var HTTP_SERVER_INSTRUMENTED_KEY = import_api3.createContextKey("sentry_http_server_instrumented");
var INTEGRATION_NAME7 = "Http.Server";
var clientToRequestSessionAggregatesMap = new Map;
var wrappedEmitFns = new WeakSet;
function addStartSpanCallback(request, callback) {
  addNonEnumerableProperty(request, "_startSpanCallback", new WeakRef(callback));
}
var _httpServerIntegration = (options = {}) => {
  const _options = {
    sessions: options.sessions ?? true,
    sessionFlushingDelayMS: options.sessionFlushingDelayMS ?? 60000,
    maxRequestBodySize: options.maxRequestBodySize ?? "medium",
    ignoreRequestBody: options.ignoreRequestBody
  };
  return {
    name: INTEGRATION_NAME7,
    setupOnce() {
      const onHttpServerRequestStart = (_data) => {
        const data = _data;
        instrumentServer(data.server, _options);
      };
      subscribe("http.server.request.start", onHttpServerRequestStart);
    },
    afterAllSetup(client) {
      if (DEBUG_BUILD2 && client.getIntegrationByName("Http")) {
        debug.warn("It seems that you have manually added `httpServerIntegration` while `httpIntegration` is also present. Make sure to remove `httpServerIntegration` when adding `httpIntegration`.");
      }
    }
  };
};
var httpServerIntegration = _httpServerIntegration;
function instrumentServer(server, {
  ignoreRequestBody,
  maxRequestBodySize,
  sessions,
  sessionFlushingDelayMS
}) {
  const originalEmit = server.emit;
  if (wrappedEmitFns.has(originalEmit)) {
    return;
  }
  const newEmit = new Proxy(originalEmit, {
    apply(target, thisArg, args) {
      if (args[0] !== "request") {
        return target.apply(thisArg, args);
      }
      const client = getClient();
      if (import_api3.context.active().getValue(HTTP_SERVER_INSTRUMENTED_KEY) || !client) {
        return target.apply(thisArg, args);
      }
      DEBUG_BUILD2 && debug.log(INTEGRATION_NAME7, "Handling incoming request");
      const isolationScope = getIsolationScope().clone();
      const request = args[1];
      const response = args[2];
      const normalizedRequest = httpRequestToRequestData(request);
      const ipAddress = request.ip || request.socket?.remoteAddress;
      const url = request.url || "/";
      if (maxRequestBodySize !== "none" && !ignoreRequestBody?.(url, request)) {
        patchRequestToCaptureBody(request, isolationScope, maxRequestBodySize, INTEGRATION_NAME7);
      }
      isolationScope.setSDKProcessingMetadata({ normalizedRequest, ipAddress });
      const httpMethod = (request.method || "GET").toUpperCase();
      const httpTargetWithoutQueryFragment = stripUrlQueryAndFragment(url);
      const bestEffortTransactionName = `${httpMethod} ${httpTargetWithoutQueryFragment}`;
      isolationScope.setTransactionName(bestEffortTransactionName);
      if (sessions && client) {
        recordRequestSession(client, {
          requestIsolationScope: isolationScope,
          response,
          sessionFlushingDelayMS: sessionFlushingDelayMS ?? 60000
        });
      }
      return withIsolationScope2(isolationScope, () => {
        const newPropagationContext = {
          traceId: generateTraceId(),
          sampleRand: safeMathRandom(),
          propagationSpanId: generateSpanId()
        };
        getCurrentScope().setPropagationContext({ ...newPropagationContext });
        isolationScope.setPropagationContext({ ...newPropagationContext });
        const ctx = import_api3.propagation.extract(import_api3.context.active(), normalizedRequest.headers).setValue(HTTP_SERVER_INSTRUMENTED_KEY, true);
        return import_api3.context.with(ctx, () => {
          client.emit("httpServerRequest", request, response, normalizedRequest);
          const callback = request._startSpanCallback?.deref();
          if (callback) {
            return callback(() => target.apply(thisArg, args));
          }
          return target.apply(thisArg, args);
        });
      });
    }
  });
  wrappedEmitFns.add(newEmit);
  server.emit = newEmit;
}
function recordRequestSession(client, {
  requestIsolationScope,
  response,
  sessionFlushingDelayMS
}) {
  requestIsolationScope.setSDKProcessingMetadata({
    requestSession: { status: "ok" }
  });
  response.once("close", () => {
    const requestSession = requestIsolationScope.getScopeData().sdkProcessingMetadata.requestSession;
    if (client && requestSession) {
      DEBUG_BUILD2 && debug.log(`Recorded request session with status: ${requestSession.status}`);
      const roundedDate = new Date;
      roundedDate.setSeconds(0, 0);
      const dateBucketKey = roundedDate.toISOString();
      const existingClientAggregate = clientToRequestSessionAggregatesMap.get(client);
      const bucket = existingClientAggregate?.[dateBucketKey] || { exited: 0, crashed: 0, errored: 0 };
      bucket[{ ok: "exited", crashed: "crashed", errored: "errored" }[requestSession.status]]++;
      if (existingClientAggregate) {
        existingClientAggregate[dateBucketKey] = bucket;
      } else {
        DEBUG_BUILD2 && debug.log("Opened new request session aggregate.");
        const newClientAggregate = { [dateBucketKey]: bucket };
        clientToRequestSessionAggregatesMap.set(client, newClientAggregate);
        const flushPendingClientAggregates = () => {
          clearTimeout(timeout);
          unregisterClientFlushHook();
          clientToRequestSessionAggregatesMap.delete(client);
          const aggregatePayload = Object.entries(newClientAggregate).map(([timestamp, value]) => ({
            started: timestamp,
            exited: value.exited,
            errored: value.errored,
            crashed: value.crashed
          }));
          client.sendSession({ aggregates: aggregatePayload });
        };
        const unregisterClientFlushHook = client.on("flush", () => {
          DEBUG_BUILD2 && debug.log("Sending request session aggregate due to client flush");
          flushPendingClientAggregates();
        });
        const timeout = setTimeout(() => {
          DEBUG_BUILD2 && debug.log("Sending request session aggregate due to flushing schedule");
          flushPendingClientAggregates();
        }, sessionFlushingDelayMS).unref();
      }
    }
  });
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/httpServerSpansIntegration.js
var INTEGRATION_NAME8 = "Http.ServerSpans";
var _httpServerSpansIntegration = (options = {}) => {
  const ignoreStaticAssets = options.ignoreStaticAssets ?? true;
  const ignoreIncomingRequests = options.ignoreIncomingRequests;
  const ignoreStatusCodes = options.ignoreStatusCodes ?? [
    [401, 404],
    [301, 303],
    [305, 399]
  ];
  const { onSpanCreated } = options;
  const { requestHook, responseHook, applyCustomAttributesOnSpan } = options.instrumentation ?? {};
  return {
    name: INTEGRATION_NAME8,
    setup(client) {
      if (typeof __SENTRY_TRACING__ !== "undefined" && !__SENTRY_TRACING__) {
        return;
      }
      client.on("httpServerRequest", (_request, _response, normalizedRequest) => {
        const request = _request;
        const response = _response;
        const startSpan2 = (next) => {
          if (shouldIgnoreSpansForIncomingRequest(request, {
            ignoreStaticAssets,
            ignoreIncomingRequests
          })) {
            DEBUG_BUILD2 && debug.log(INTEGRATION_NAME8, "Skipping span creation for incoming request", request.url);
            return next();
          }
          const fullUrl = normalizedRequest.url || request.url || "/";
          const urlObj = parseStringToURLObject(fullUrl);
          const headers = request.headers;
          const userAgent = headers["user-agent"];
          const ips = headers["x-forwarded-for"];
          const httpVersion = request.httpVersion;
          const host = headers.host;
          const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, "$1") || "localhost";
          const tracer = client.tracer;
          const scheme = fullUrl.startsWith("https") ? "https" : "http";
          const method = normalizedRequest.method || request.method?.toUpperCase() || "GET";
          const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);
          const bestEffortTransactionName = `${method} ${httpTargetWithoutQueryFragment}`;
          const span = tracer.startSpan(bestEffortTransactionName, {
            kind: import_api4.SpanKind.SERVER,
            attributes: {
              [SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.server",
              [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.http",
              "sentry.http.prefetch": isKnownPrefetchRequest(request) || undefined,
              "http.url": fullUrl,
              "http.method": normalizedRequest.method,
              "http.target": urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,
              "http.host": host,
              "net.host.name": hostname,
              "http.client_ip": typeof ips === "string" ? ips.split(",")[0] : undefined,
              "http.user_agent": userAgent,
              "http.scheme": scheme,
              "http.flavor": httpVersion,
              "net.transport": httpVersion?.toUpperCase() === "QUIC" ? "ip_udp" : "ip_tcp",
              ...getRequestContentLengthAttribute(request),
              ...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, client.getOptions().sendDefaultPii ?? false)
            }
          });
          requestHook?.(span, request);
          responseHook?.(span, response);
          applyCustomAttributesOnSpan?.(span, request, response);
          onSpanCreated?.(span, request, response);
          const rpcMetadata = {
            type: import_core3.RPCType.HTTP,
            span
          };
          return import_api4.context.with(import_core3.setRPCMetadata(import_api4.trace.setSpan(import_api4.context.active(), span), rpcMetadata), () => {
            import_api4.context.bind(import_api4.context.active(), request);
            import_api4.context.bind(import_api4.context.active(), response);
            let isEnded = false;
            function endSpan(status) {
              if (isEnded) {
                return;
              }
              isEnded = true;
              const newAttributes = getIncomingRequestAttributesOnResponse(request, response);
              span.setAttributes(newAttributes);
              span.setStatus(status);
              span.end();
              const route = newAttributes["http.route"];
              if (route) {
                getIsolationScope().setTransactionName(`${request.method?.toUpperCase() || "GET"} ${route}`);
              }
            }
            response.on("close", () => {
              endSpan(getSpanStatusFromHttpCode(response.statusCode));
            });
            response.on(errorMonitor, () => {
              const httpStatus = getSpanStatusFromHttpCode(response.statusCode);
              endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });
            });
            return next();
          });
        };
        addStartSpanCallback(request, startSpan2);
      });
    },
    processEvent(event) {
      if (event.type === "transaction") {
        const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
        if (typeof statusCode === "number") {
          const shouldDrop = shouldFilterStatusCode(statusCode, ignoreStatusCodes);
          if (shouldDrop) {
            DEBUG_BUILD2 && debug.log("Dropping transaction due to status code", statusCode);
            return null;
          }
        }
      }
      return event;
    },
    afterAllSetup(client) {
      if (!DEBUG_BUILD2) {
        return;
      }
      if (client.getIntegrationByName("Http")) {
        debug.warn("It seems that you have manually added `httpServerSpansIntergation` while `httpIntegration` is also present. Make sure to remove `httpIntegration` when adding `httpServerSpansIntegration`.");
      }
      if (!client.getIntegrationByName("Http.Server")) {
        debug.error("It seems that you have manually added `httpServerSpansIntergation` without adding `httpServerIntegration`. This is a requiement for spans to be created - please add the `httpServerIntegration` integration.");
      }
    }
  };
};
var httpServerSpansIntegration = _httpServerSpansIntegration;
function isKnownPrefetchRequest(req) {
  return req.headers["next-router-prefetch"] === "1";
}
function isStaticAssetRequest(urlPath) {
  const path = stripUrlQueryAndFragment(urlPath);
  if (path.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
    return true;
  }
  if (path.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
    return true;
  }
  return false;
}
function shouldIgnoreSpansForIncomingRequest(request, {
  ignoreStaticAssets,
  ignoreIncomingRequests
}) {
  if (import_core3.isTracingSuppressed(import_api4.context.active())) {
    return true;
  }
  const urlPath = request.url;
  const method = request.method?.toUpperCase();
  if (method === "OPTIONS" || method === "HEAD" || !urlPath) {
    return true;
  }
  if (ignoreStaticAssets && method === "GET" && isStaticAssetRequest(urlPath)) {
    return true;
  }
  if (ignoreIncomingRequests?.(urlPath, request)) {
    return true;
  }
  return false;
}
function getRequestContentLengthAttribute(request) {
  const length = getContentLength(request.headers);
  if (length == null) {
    return {};
  }
  if (isCompressed(request.headers)) {
    return {
      ["http.request_content_length"]: length
    };
  } else {
    return {
      ["http.request_content_length_uncompressed"]: length
    };
  }
}
function getContentLength(headers) {
  const contentLengthHeader = headers["content-length"];
  if (contentLengthHeader === undefined)
    return null;
  const contentLength = parseInt(contentLengthHeader, 10);
  if (isNaN(contentLength))
    return null;
  return contentLength;
}
function isCompressed(headers) {
  const encoding = headers["content-encoding"];
  return !!encoding && encoding !== "identity";
}
function getIncomingRequestAttributesOnResponse(request, response) {
  const { socket } = request;
  const { statusCode, statusMessage } = response;
  const newAttributes = {
    [import_semantic_conventions.ATTR_HTTP_RESPONSE_STATUS_CODE]: statusCode,
    [import_semantic_conventions.SEMATTRS_HTTP_STATUS_CODE]: statusCode,
    "http.status_text": statusMessage?.toUpperCase()
  };
  const rpcMetadata = import_core3.getRPCMetadata(import_api4.context.active());
  if (socket) {
    const { localAddress, localPort, remoteAddress, remotePort } = socket;
    newAttributes[import_semantic_conventions.SEMATTRS_NET_HOST_IP] = localAddress;
    newAttributes[import_semantic_conventions.SEMATTRS_NET_HOST_PORT] = localPort;
    newAttributes[import_semantic_conventions.SEMATTRS_NET_PEER_IP] = remoteAddress;
    newAttributes["net.peer.port"] = remotePort;
  }
  newAttributes[import_semantic_conventions.SEMATTRS_HTTP_STATUS_CODE] = statusCode;
  newAttributes["http.status_text"] = (statusMessage || "").toUpperCase();
  if (rpcMetadata?.type === import_core3.RPCType.HTTP && rpcMetadata.route !== undefined) {
    const routeName = rpcMetadata.route;
    newAttributes[import_semantic_conventions.ATTR_HTTP_ROUTE] = routeName;
  }
  return newAttributes;
}
function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
  return dropForStatusCodes.some((code) => {
    if (typeof code === "number") {
      return code === statusCode;
    }
    const [min, max] = code;
    return statusCode >= min && statusCode <= max;
  });
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/SentryHttpInstrumentation.js
var import_api5 = __toESM(require_src(), 1);
var import_core7 = __toESM(require_src8(), 1);
var import_instrumentation = __toESM(require_src6(), 1);
var import_semantic_conventions2 = __toESM(require_src2(), 1);
import { subscribe as subscribe2, unsubscribe } from "node:diagnostics_channel";
import { errorMonitor as errorMonitor2 } from "node:events";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/baggage.js
function mergeBaggageHeaders(existing, baggage) {
  if (!existing) {
    return baggage;
  }
  const existingBaggageEntries = parseBaggageHeader(existing);
  const newBaggageEntries = parseBaggageHeader(baggage);
  if (!newBaggageEntries) {
    return existing;
  }
  const mergedBaggageEntries = { ...existingBaggageEntries };
  Object.entries(newBaggageEntries).forEach(([key, value]) => {
    if (key.startsWith("sentry-") || !mergedBaggageEntries[key]) {
      mergedBaggageEntries[key] = value;
    }
  });
  return objectToBaggageHeader(mergedBaggageEntries);
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/outgoingHttpRequest.js
var LOG_PREFIX = "@sentry/instrumentation-http";
function addRequestBreadcrumb(request, response) {
  const data = getBreadcrumbData(request);
  const statusCode = response?.statusCode;
  const level = getBreadcrumbLogLevelFromHttpStatusCode(statusCode);
  addBreadcrumb({
    category: "http",
    data: {
      status_code: statusCode,
      ...data
    },
    type: "http",
    level
  }, {
    event: "response",
    request,
    response
  });
}
function addTracePropagationHeadersToOutgoingRequest(request, propagationDecisionMap) {
  const url = getClientRequestUrl(request);
  const { tracePropagationTargets, propagateTraceparent } = getClient()?.getOptions() || {};
  const headersToAdd = shouldPropagateTraceForUrl(url, tracePropagationTargets, propagationDecisionMap) ? getTraceData({ propagateTraceparent }) : undefined;
  if (!headersToAdd) {
    return;
  }
  const { "sentry-trace": sentryTrace, baggage, traceparent } = headersToAdd;
  if (sentryTrace && !request.getHeader("sentry-trace")) {
    try {
      request.setHeader("sentry-trace", sentryTrace);
      DEBUG_BUILD2 && debug.log(LOG_PREFIX, "Added sentry-trace header to outgoing request");
    } catch (error2) {
      DEBUG_BUILD2 && debug.error(LOG_PREFIX, "Failed to add sentry-trace header to outgoing request:", isError(error2) ? error2.message : "Unknown error");
    }
  }
  if (traceparent && !request.getHeader("traceparent")) {
    try {
      request.setHeader("traceparent", traceparent);
      DEBUG_BUILD2 && debug.log(LOG_PREFIX, "Added traceparent header to outgoing request");
    } catch (error2) {
      DEBUG_BUILD2 && debug.error(LOG_PREFIX, "Failed to add traceparent header to outgoing request:", isError(error2) ? error2.message : "Unknown error");
    }
  }
  if (baggage) {
    const newBaggage = mergeBaggageHeaders(request.getHeader("baggage"), baggage);
    if (newBaggage) {
      try {
        request.setHeader("baggage", newBaggage);
        DEBUG_BUILD2 && debug.log(LOG_PREFIX, "Added baggage header to outgoing request");
      } catch (error2) {
        DEBUG_BUILD2 && debug.error(LOG_PREFIX, "Failed to add baggage header to outgoing request:", isError(error2) ? error2.message : "Unknown error");
      }
    }
  }
}
function getBreadcrumbData(request) {
  try {
    const host = request.getHeader("host") || request.host;
    const url = new URL(request.path, `${request.protocol}//${host}`);
    const parsedUrl = parseUrl(url.toString());
    const data = {
      url: getSanitizedUrlString(parsedUrl),
      "http.method": request.method || "GET"
    };
    if (parsedUrl.search) {
      data["http.query"] = parsedUrl.search;
    }
    if (parsedUrl.hash) {
      data["http.fragment"] = parsedUrl.hash;
    }
    return data;
  } catch {
    return {};
  }
}
function getRequestOptions(request) {
  return {
    method: request.method,
    protocol: request.protocol,
    host: request.host,
    hostname: request.host,
    path: request.path,
    headers: request.getHeaders()
  };
}
function getClientRequestUrl(request) {
  const hostname = request.getHeader("host") || request.host;
  const protocol = request.protocol;
  const path = request.path;
  return `${protocol}//${hostname}${path}`;
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/SentryHttpInstrumentation.js
class SentryHttpInstrumentation extends import_instrumentation.InstrumentationBase {
  constructor(config = {}) {
    super(INSTRUMENTATION_NAME, SDK_VERSION, config);
    this._propagationDecisionMap = new LRUMap(100);
    this._ignoreOutgoingRequestsMap = new WeakMap;
  }
  init() {
    let hasRegisteredHandlers = false;
    const onHttpClientResponseFinish = (_data) => {
      const data = _data;
      this._onOutgoingRequestFinish(data.request, data.response);
    };
    const onHttpClientRequestError = (_data) => {
      const data = _data;
      this._onOutgoingRequestFinish(data.request, undefined);
    };
    const onHttpClientRequestCreated = (_data) => {
      const data = _data;
      this._onOutgoingRequestCreated(data.request);
    };
    const wrap = (moduleExports) => {
      if (hasRegisteredHandlers) {
        return moduleExports;
      }
      hasRegisteredHandlers = true;
      subscribe2("http.client.response.finish", onHttpClientResponseFinish);
      subscribe2("http.client.request.error", onHttpClientRequestError);
      if (this.getConfig().propagateTraceInOutgoingRequests || this.getConfig().createSpansForOutgoingRequests) {
        subscribe2("http.client.request.created", onHttpClientRequestCreated);
      }
      return moduleExports;
    };
    const unwrap = () => {
      unsubscribe("http.client.response.finish", onHttpClientResponseFinish);
      unsubscribe("http.client.request.error", onHttpClientRequestError);
      unsubscribe("http.client.request.created", onHttpClientRequestCreated);
    };
    return [
      new import_instrumentation.InstrumentationNodeModuleDefinition("http", ["*"], wrap, unwrap),
      new import_instrumentation.InstrumentationNodeModuleDefinition("https", ["*"], wrap, unwrap)
    ];
  }
  _startSpanForOutgoingRequest(request) {
    const originalOnce = request.once;
    const [name, attributes] = _getOutgoingRequestSpanData(request);
    const span = startInactiveSpan({
      name,
      attributes,
      onlyIfParent: true
    });
    this.getConfig().outgoingRequestHook?.(span, request);
    const newOnce = new Proxy(originalOnce, {
      apply(target, thisArg, args) {
        const [event] = args;
        if (event !== "response") {
          return target.apply(thisArg, args);
        }
        const parentContext = import_api5.context.active();
        const requestContext = import_api5.trace.setSpan(parentContext, span);
        return import_api5.context.with(requestContext, () => {
          return target.apply(thisArg, args);
        });
      }
    });
    request.once = newOnce;
    let responseFinished = false;
    const endSpan = (status) => {
      if (responseFinished) {
        return;
      }
      responseFinished = true;
      span.setStatus(status);
      span.end();
    };
    request.prependListener("response", (response) => {
      if (request.listenerCount("response") <= 1) {
        response.resume();
      }
      import_api5.context.bind(import_api5.context.active(), response);
      const additionalAttributes = _getOutgoingRequestEndedSpanData(response);
      span.setAttributes(additionalAttributes);
      this.getConfig().outgoingResponseHook?.(span, response);
      this.getConfig().outgoingRequestApplyCustomAttributes?.(span, request, response);
      const endHandler = (forceError = false) => {
        this._diag.debug("outgoingRequest on end()");
        const status = forceError || typeof response.statusCode !== "number" || response.aborted && !response.complete ? { code: import_api5.SpanStatusCode.ERROR } : getSpanStatusFromHttpCode(response.statusCode);
        endSpan(status);
      };
      response.on("end", () => {
        endHandler();
      });
      response.on(errorMonitor2, (error2) => {
        this._diag.debug("outgoingRequest on response error()", error2);
        endHandler(true);
      });
    });
    request.on("close", () => {
      endSpan({ code: import_api5.SpanStatusCode.UNSET });
    });
    request.on(errorMonitor2, (error2) => {
      this._diag.debug("outgoingRequest on request error()", error2);
      endSpan({ code: import_api5.SpanStatusCode.ERROR });
    });
    return span;
  }
  _onOutgoingRequestFinish(request, response) {
    DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Handling finished outgoing request");
    const _breadcrumbs = this.getConfig().breadcrumbs;
    const breadCrumbsEnabled = typeof _breadcrumbs === "undefined" ? true : _breadcrumbs;
    const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request) ?? this._shouldIgnoreOutgoingRequest(request);
    this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);
    if (breadCrumbsEnabled && !shouldIgnore) {
      addRequestBreadcrumb(request, response);
    }
  }
  _onOutgoingRequestCreated(request) {
    DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Handling outgoing request created");
    const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request) ?? this._shouldIgnoreOutgoingRequest(request);
    this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);
    if (shouldIgnore) {
      return;
    }
    const shouldCreateSpan = this.getConfig().createSpansForOutgoingRequests && (this.getConfig().spans ?? true);
    const shouldPropagate = this.getConfig().propagateTraceInOutgoingRequests;
    if (shouldCreateSpan) {
      const span = this._startSpanForOutgoingRequest(request);
      if (shouldPropagate && span.isRecording()) {
        const requestContext = import_api5.trace.setSpan(import_api5.context.active(), span);
        import_api5.context.with(requestContext, () => {
          addTracePropagationHeadersToOutgoingRequest(request, this._propagationDecisionMap);
        });
      } else if (shouldPropagate) {
        addTracePropagationHeadersToOutgoingRequest(request, this._propagationDecisionMap);
      }
    } else if (shouldPropagate) {
      addTracePropagationHeadersToOutgoingRequest(request, this._propagationDecisionMap);
    }
  }
  _shouldIgnoreOutgoingRequest(request) {
    if (import_core7.isTracingSuppressed(import_api5.context.active())) {
      return true;
    }
    const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;
    if (!ignoreOutgoingRequests) {
      return false;
    }
    const options = getRequestOptions(request);
    const url = getClientRequestUrl(request);
    return ignoreOutgoingRequests(url, options);
  }
}
function _getOutgoingRequestSpanData(request) {
  const url = getClientRequestUrl(request);
  const [name, attributes] = getHttpSpanDetailsFromUrlObject(parseStringToURLObject(url), "client", "auto.http.otel.http", request);
  const userAgent = request.getHeader("user-agent");
  return [
    name,
    {
      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.client",
      "otel.kind": "CLIENT",
      [import_semantic_conventions2.ATTR_USER_AGENT_ORIGINAL]: userAgent,
      [import_semantic_conventions2.ATTR_URL_FULL]: url,
      "http.url": url,
      "http.method": request.method,
      "http.target": request.path || "/",
      "net.peer.name": request.host,
      "http.host": request.getHeader("host"),
      ...attributes
    }
  ];
}
function _getOutgoingRequestEndedSpanData(response) {
  const { statusCode, statusMessage, httpVersion, socket } = response;
  const transport = httpVersion.toUpperCase() !== "QUIC" ? "ip_tcp" : "ip_udp";
  const additionalAttributes = {
    [import_semantic_conventions2.ATTR_HTTP_RESPONSE_STATUS_CODE]: statusCode,
    [import_semantic_conventions2.ATTR_NETWORK_PROTOCOL_VERSION]: httpVersion,
    "http.flavor": httpVersion,
    [import_semantic_conventions2.ATTR_NETWORK_TRANSPORT]: transport,
    "net.transport": transport,
    ["http.status_text"]: statusMessage?.toUpperCase(),
    "http.status_code": statusCode,
    ...getResponseContentLengthAttributes(response)
  };
  if (socket) {
    const { remoteAddress, remotePort } = socket;
    additionalAttributes[import_semantic_conventions2.ATTR_NETWORK_PEER_ADDRESS] = remoteAddress;
    additionalAttributes[import_semantic_conventions2.ATTR_NETWORK_PEER_PORT] = remotePort;
    additionalAttributes["net.peer.ip"] = remoteAddress;
    additionalAttributes["net.peer.port"] = remotePort;
  }
  return additionalAttributes;
}
function getResponseContentLengthAttributes(response) {
  const length = getContentLength2(response.headers);
  if (length == null) {
    return {};
  }
  if (isCompressed2(response.headers)) {
    return { [import_semantic_conventions2.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]: length };
  } else {
    return { [import_semantic_conventions2.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED]: length };
  }
}
function getContentLength2(headers) {
  const contentLengthHeader = headers["content-length"];
  if (typeof contentLengthHeader === "number") {
    return contentLengthHeader;
  }
  if (typeof contentLengthHeader !== "string") {
    return;
  }
  const contentLength = parseInt(contentLengthHeader, 10);
  if (isNaN(contentLength)) {
    return;
  }
  return contentLength;
}
function isCompressed2(headers) {
  const encoding = headers["content-encoding"];
  return !!encoding && encoding !== "identity";
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js
var import_api6 = __toESM(require_src(), 1);
var import_core11 = __toESM(require_src8(), 1);
var import_instrumentation2 = __toESM(require_src6(), 1);
import * as diagch from "diagnostics_channel";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/nodeVersion.js
var NODE_VERSION = parseSemver(process.versions.node);
var NODE_MAJOR = NODE_VERSION.major;
var NODE_MINOR = NODE_VERSION.minor;

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/outgoingFetchRequest.js
var SENTRY_TRACE_HEADER = "sentry-trace";
var SENTRY_BAGGAGE_HEADER = "baggage";
var BAGGAGE_HEADER_REGEX = /baggage: (.*)\r\n/;
function addTracePropagationHeadersToFetchRequest(request, propagationDecisionMap) {
  const url = getAbsoluteUrl2(request.origin, request.path);
  const { tracePropagationTargets, propagateTraceparent } = getClient()?.getOptions() || {};
  const addedHeaders = shouldPropagateTraceForUrl(url, tracePropagationTargets, propagationDecisionMap) ? getTraceData({ propagateTraceparent }) : undefined;
  if (!addedHeaders) {
    return;
  }
  const { "sentry-trace": sentryTrace, baggage, traceparent } = addedHeaders;
  if (Array.isArray(request.headers)) {
    const requestHeaders = request.headers;
    if (sentryTrace && !requestHeaders.includes(SENTRY_TRACE_HEADER)) {
      requestHeaders.push(SENTRY_TRACE_HEADER, sentryTrace);
    }
    if (traceparent && !requestHeaders.includes("traceparent")) {
      requestHeaders.push("traceparent", traceparent);
    }
    const existingBaggagePos = requestHeaders.findIndex((header) => header === SENTRY_BAGGAGE_HEADER);
    if (baggage && existingBaggagePos === -1) {
      requestHeaders.push(SENTRY_BAGGAGE_HEADER, baggage);
    } else if (baggage) {
      const existingBaggage = requestHeaders[existingBaggagePos + 1];
      const merged = mergeBaggageHeaders(existingBaggage, baggage);
      if (merged) {
        requestHeaders[existingBaggagePos + 1] = merged;
      }
    }
  } else {
    const requestHeaders = request.headers;
    if (sentryTrace && !requestHeaders.includes(`${SENTRY_TRACE_HEADER}:`)) {
      request.headers += `${SENTRY_TRACE_HEADER}: ${sentryTrace}\r
`;
    }
    if (traceparent && !requestHeaders.includes("traceparent:")) {
      request.headers += `traceparent: ${traceparent}\r
`;
    }
    const existingBaggage = request.headers.match(BAGGAGE_HEADER_REGEX)?.[1];
    if (baggage && !existingBaggage) {
      request.headers += `${SENTRY_BAGGAGE_HEADER}: ${baggage}\r
`;
    } else if (baggage) {
      const merged = mergeBaggageHeaders(existingBaggage, baggage);
      if (merged) {
        request.headers = request.headers.replace(BAGGAGE_HEADER_REGEX, `baggage: ${merged}\r
`);
      }
    }
  }
}
function addFetchRequestBreadcrumb(request, response) {
  const data = getBreadcrumbData2(request);
  const statusCode = response.statusCode;
  const level = getBreadcrumbLogLevelFromHttpStatusCode(statusCode);
  addBreadcrumb({
    category: "http",
    data: {
      status_code: statusCode,
      ...data
    },
    type: "http",
    level
  }, {
    event: "response",
    request,
    response
  });
}
function getBreadcrumbData2(request) {
  try {
    const url = getAbsoluteUrl2(request.origin, request.path);
    const parsedUrl = parseUrl(url);
    const data = {
      url: getSanitizedUrlString(parsedUrl),
      "http.method": request.method || "GET"
    };
    if (parsedUrl.search) {
      data["http.query"] = parsedUrl.search;
    }
    if (parsedUrl.hash) {
      data["http.fragment"] = parsedUrl.hash;
    }
    return data;
  } catch {
    return {};
  }
}
function getAbsoluteUrl2(origin, path = "/") {
  try {
    const url = new URL(path, origin);
    return url.toString();
  } catch {
    const url = `${origin}`;
    if (url.endsWith("/") && path.startsWith("/")) {
      return `${url}${path.slice(1)}`;
    }
    if (!url.endsWith("/") && !path.startsWith("/")) {
      return `${url}/${path}`;
    }
    return `${url}${path}`;
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js
class SentryNodeFetchInstrumentation extends import_instrumentation2.InstrumentationBase {
  constructor(config = {}) {
    super("@sentry/instrumentation-node-fetch", SDK_VERSION, config);
    this._channelSubs = [];
    this._propagationDecisionMap = new LRUMap(100);
    this._ignoreOutgoingRequestsMap = new WeakMap;
  }
  init() {
    return;
  }
  disable() {
    super.disable();
    this._channelSubs.forEach((sub) => sub.unsubscribe());
    this._channelSubs = [];
  }
  enable() {
    super.enable();
    this._channelSubs = this._channelSubs || [];
    if (this._channelSubs.length > 0) {
      return;
    }
    this._subscribeToChannel("undici:request:create", this._onRequestCreated.bind(this));
    this._subscribeToChannel("undici:request:headers", this._onResponseHeaders.bind(this));
  }
  _onRequestCreated({ request }) {
    const config = this.getConfig();
    const enabled = config.enabled !== false;
    if (!enabled) {
      return;
    }
    const shouldIgnore = this._shouldIgnoreOutgoingRequest(request);
    this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);
    if (shouldIgnore) {
      return;
    }
    if (config.tracePropagation !== false) {
      addTracePropagationHeadersToFetchRequest(request, this._propagationDecisionMap);
    }
  }
  _onResponseHeaders({ request, response }) {
    const config = this.getConfig();
    const enabled = config.enabled !== false;
    if (!enabled) {
      return;
    }
    const _breadcrumbs = config.breadcrumbs;
    const breadCrumbsEnabled = typeof _breadcrumbs === "undefined" ? true : _breadcrumbs;
    const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request);
    if (breadCrumbsEnabled && !shouldIgnore) {
      addFetchRequestBreadcrumb(request, response);
    }
  }
  _subscribeToChannel(diagnosticChannel, onMessage) {
    const useNewSubscribe = NODE_MAJOR > 18 || NODE_MAJOR === 18 && NODE_MINOR >= 19;
    let unsubscribe3;
    if (useNewSubscribe) {
      diagch.subscribe?.(diagnosticChannel, onMessage);
      unsubscribe3 = () => diagch.unsubscribe?.(diagnosticChannel, onMessage);
    } else {
      const channel2 = diagch.channel(diagnosticChannel);
      channel2.subscribe(onMessage);
      unsubscribe3 = () => channel2.unsubscribe(onMessage);
    }
    this._channelSubs.push({
      name: diagnosticChannel,
      unsubscribe: unsubscribe3
    });
  }
  _shouldIgnoreOutgoingRequest(request) {
    if (import_core11.isTracingSuppressed(import_api6.context.active())) {
      return true;
    }
    const url = getAbsoluteUrl2(request.origin, request.path);
    const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;
    if (typeof ignoreOutgoingRequests !== "function" || !url) {
      return false;
    }
    return ignoreOutgoingRequests(url);
  }
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/otel/contextManager.js
var import_context_async_hooks = __toESM(require_src9(), 1);

// ../../node_modules/.pnpm/@sentry+opentelemetry@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hoo_86fc09903a92056e15bcf79bb083782c/node_modules/@sentry/opentelemetry/build/esm/index.js
var import_semantic_conventions3 = __toESM(require_src2(), 1);
var api = __toESM(require_src(), 1);
var import_api7 = __toESM(require_src(), 1);
var import_core14 = __toESM(require_src8(), 1);
var import_sdk_trace_base = __toESM(require_src11(), 1);
var SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE = "sentry.parentIsRemote";
var SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION = "sentry.graphql.operation";
function getParentSpanId(span) {
  if ("parentSpanId" in span) {
    return span.parentSpanId;
  } else if ("parentSpanContext" in span) {
    return span.parentSpanContext?.spanId;
  }
  return;
}
function spanHasAttributes(span) {
  const castSpan = span;
  return !!castSpan.attributes && typeof castSpan.attributes === "object";
}
function spanHasKind(span) {
  const castSpan = span;
  return typeof castSpan.kind === "number";
}
function spanHasStatus(span) {
  const castSpan = span;
  return !!castSpan.status;
}
function spanHasName(span) {
  const castSpan = span;
  return !!castSpan.name;
}
function getRequestSpanData(span) {
  if (!spanHasAttributes(span)) {
    return {};
  }
  const maybeUrlAttribute = span.attributes[import_semantic_conventions3.ATTR_URL_FULL] || span.attributes[import_semantic_conventions3.SEMATTRS_HTTP_URL];
  const data = {
    url: maybeUrlAttribute,
    "http.method": span.attributes[import_semantic_conventions3.ATTR_HTTP_REQUEST_METHOD] || span.attributes[import_semantic_conventions3.SEMATTRS_HTTP_METHOD]
  };
  if (!data["http.method"] && data.url) {
    data["http.method"] = "GET";
  }
  try {
    if (typeof maybeUrlAttribute === "string") {
      const url = parseUrl(maybeUrlAttribute);
      data.url = getSanitizedUrlString(url);
      if (url.search) {
        data["http.query"] = url.search;
      }
      if (url.hash) {
        data["http.fragment"] = url.hash;
      }
    }
  } catch {}
  return data;
}
function getSpanKind(span) {
  if (spanHasKind(span)) {
    return span.kind;
  }
  return import_api7.SpanKind.INTERNAL;
}
var SENTRY_TRACE_HEADER2 = "sentry-trace";
var SENTRY_BAGGAGE_HEADER2 = "baggage";
var SENTRY_TRACE_STATE_DSC = "sentry.dsc";
var SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING = "sentry.sampled_not_recording";
var SENTRY_TRACE_STATE_URL = "sentry.url";
var SENTRY_TRACE_STATE_SAMPLE_RAND = "sentry.sample_rand";
var SENTRY_TRACE_STATE_SAMPLE_RATE = "sentry.sample_rate";
var SENTRY_SCOPES_CONTEXT_KEY = import_api7.createContextKey("sentry_scopes");
var SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY = import_api7.createContextKey("sentry_fork_isolation_scope");
var SENTRY_FORK_SET_SCOPE_CONTEXT_KEY = import_api7.createContextKey("sentry_fork_set_scope");
var SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY = import_api7.createContextKey("sentry_fork_set_isolation_scope");
var SCOPE_CONTEXT_FIELD = "_scopeContext";
function getScopesFromContext(context7) {
  return context7.getValue(SENTRY_SCOPES_CONTEXT_KEY);
}
function setScopesOnContext(context7, scopes) {
  return context7.setValue(SENTRY_SCOPES_CONTEXT_KEY, scopes);
}
function setContextOnScope(scope, context7) {
  addNonEnumerableProperty(scope, SCOPE_CONTEXT_FIELD, context7);
}
function getContextFromScope(scope) {
  return scope[SCOPE_CONTEXT_FIELD];
}
function getSamplingDecision(spanContext) {
  const { traceFlags, traceState } = spanContext;
  const sampledNotRecording = traceState ? traceState.get(SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING) === "1" : false;
  if (traceFlags === import_api7.TraceFlags.SAMPLED) {
    return true;
  }
  if (sampledNotRecording) {
    return false;
  }
  const dscString = traceState ? traceState.get(SENTRY_TRACE_STATE_DSC) : undefined;
  const dsc = dscString ? baggageHeaderToDynamicSamplingContext(dscString) : undefined;
  if (dsc?.sampled === "true") {
    return true;
  }
  if (dsc?.sampled === "false") {
    return false;
  }
  return;
}
function inferSpanData(spanName, attributes, kind) {
  const httpMethod = attributes[import_semantic_conventions3.ATTR_HTTP_REQUEST_METHOD] || attributes[import_semantic_conventions3.SEMATTRS_HTTP_METHOD];
  if (httpMethod) {
    return descriptionForHttpMethod({ attributes, name: spanName, kind }, httpMethod);
  }
  const dbSystem = attributes[import_semantic_conventions3.ATTR_DB_SYSTEM_NAME] || attributes[import_semantic_conventions3.SEMATTRS_DB_SYSTEM];
  const opIsCache = typeof attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] === "string" && attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP].startsWith("cache.");
  if (dbSystem && !opIsCache) {
    return descriptionForDbSystem({ attributes, name: spanName });
  }
  const customSourceOrRoute = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === "custom" ? "custom" : "route";
  const rpcService = attributes[import_semantic_conventions3.SEMATTRS_RPC_SERVICE];
  if (rpcService) {
    return {
      ...getUserUpdatedNameAndSource(spanName, attributes, "route"),
      op: "rpc"
    };
  }
  const messagingSystem = attributes[import_semantic_conventions3.SEMATTRS_MESSAGING_SYSTEM];
  if (messagingSystem) {
    return {
      ...getUserUpdatedNameAndSource(spanName, attributes, customSourceOrRoute),
      op: "message"
    };
  }
  const faasTrigger = attributes[import_semantic_conventions3.SEMATTRS_FAAS_TRIGGER];
  if (faasTrigger) {
    return {
      ...getUserUpdatedNameAndSource(spanName, attributes, customSourceOrRoute),
      op: faasTrigger.toString()
    };
  }
  return { op: undefined, description: spanName, source: "custom" };
}
function parseSpanDescription(span) {
  const attributes = spanHasAttributes(span) ? span.attributes : {};
  const name = spanHasName(span) ? span.name : "<unknown>";
  const kind = getSpanKind(span);
  return inferSpanData(name, attributes, kind);
}
function descriptionForDbSystem({ attributes, name }) {
  const userDefinedName = attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
  if (typeof userDefinedName === "string") {
    return {
      op: "db",
      description: userDefinedName,
      source: attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] || "custom"
    };
  }
  if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === "custom") {
    return { op: "db", description: name, source: "custom" };
  }
  const statement = attributes[import_semantic_conventions3.SEMATTRS_DB_STATEMENT];
  const description = statement ? statement.toString() : name;
  return { op: "db", description, source: "task" };
}
function descriptionForHttpMethod({ name, kind, attributes }, httpMethod) {
  const opParts = ["http"];
  switch (kind) {
    case import_api7.SpanKind.CLIENT:
      opParts.push("client");
      break;
    case import_api7.SpanKind.SERVER:
      opParts.push("server");
      break;
  }
  if (attributes["sentry.http.prefetch"]) {
    opParts.push("prefetch");
  }
  const { urlPath, url, query, fragment, hasRoute } = getSanitizedUrl(attributes, kind);
  if (!urlPath) {
    return { ...getUserUpdatedNameAndSource(name, attributes), op: opParts.join(".") };
  }
  const graphqlOperationsAttribute = attributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION];
  const baseDescription = `${httpMethod} ${urlPath}`;
  const inferredDescription = graphqlOperationsAttribute ? `${baseDescription} (${getGraphqlOperationNamesFromAttribute(graphqlOperationsAttribute)})` : baseDescription;
  const inferredSource = hasRoute || urlPath === "/" ? "route" : "url";
  const data = {};
  if (url) {
    data.url = url;
  }
  if (query) {
    data["http.query"] = query;
  }
  if (fragment) {
    data["http.fragment"] = fragment;
  }
  const isClientOrServerKind = kind === import_api7.SpanKind.CLIENT || kind === import_api7.SpanKind.SERVER;
  const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] || "manual";
  const isManualSpan = !`${origin}`.startsWith("auto");
  const alreadyHasCustomSource = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === "custom";
  const customSpanName = attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
  const useInferredDescription = !alreadyHasCustomSource && customSpanName == null && (isClientOrServerKind || !isManualSpan);
  const { description, source } = useInferredDescription ? { description: inferredDescription, source: inferredSource } : getUserUpdatedNameAndSource(name, attributes);
  return {
    op: opParts.join("."),
    description,
    source,
    data
  };
}
function getGraphqlOperationNamesFromAttribute(attr) {
  if (Array.isArray(attr)) {
    const sorted = attr.slice().sort();
    if (sorted.length <= 5) {
      return sorted.join(", ");
    } else {
      return `${sorted.slice(0, 5).join(", ")}, +${sorted.length - 5}`;
    }
  }
  return `${attr}`;
}
function getSanitizedUrl(attributes, kind) {
  const httpTarget = attributes[import_semantic_conventions3.SEMATTRS_HTTP_TARGET];
  const httpUrl = attributes[import_semantic_conventions3.SEMATTRS_HTTP_URL] || attributes[import_semantic_conventions3.ATTR_URL_FULL];
  const httpRoute = attributes[import_semantic_conventions3.ATTR_HTTP_ROUTE];
  const parsedUrl = typeof httpUrl === "string" ? parseUrl(httpUrl) : undefined;
  const url = parsedUrl ? getSanitizedUrlString(parsedUrl) : undefined;
  const query = parsedUrl?.search || undefined;
  const fragment = parsedUrl?.hash || undefined;
  if (typeof httpRoute === "string") {
    return { urlPath: httpRoute, url, query, fragment, hasRoute: true };
  }
  if (kind === import_api7.SpanKind.SERVER && typeof httpTarget === "string") {
    return { urlPath: stripUrlQueryAndFragment(httpTarget), url, query, fragment, hasRoute: false };
  }
  if (parsedUrl) {
    return { urlPath: url, url, query, fragment, hasRoute: false };
  }
  if (typeof httpTarget === "string") {
    return { urlPath: stripUrlQueryAndFragment(httpTarget), url, query, fragment, hasRoute: false };
  }
  return { urlPath: undefined, url, query, fragment, hasRoute: false };
}
function getUserUpdatedNameAndSource(originalName, attributes, fallbackSource = "custom") {
  const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] || fallbackSource;
  const description = attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
  if (description && typeof description === "string") {
    return {
      description,
      source
    };
  }
  return { description: originalName, source };
}
function enhanceDscWithOpenTelemetryRootSpanName(client) {
  client.on("createDsc", (dsc, rootSpan) => {
    if (!rootSpan) {
      return;
    }
    const jsonSpan = spanToJSON(rootSpan);
    const attributes = jsonSpan.data;
    const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
    const { description } = spanHasName(rootSpan) ? parseSpanDescription(rootSpan) : { description: undefined };
    if (source !== "url" && description) {
      dsc.transaction = description;
    }
    if (hasSpansEnabled()) {
      const sampled = getSamplingDecision(rootSpan.spanContext());
      dsc.sampled = sampled == undefined ? undefined : String(sampled);
    }
  });
}
function getActiveSpan2() {
  return import_api7.trace.getActiveSpan();
}
var DEBUG_BUILD3 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
function makeTraceState({
  dsc,
  sampled
}) {
  const dscString = dsc ? dynamicSamplingContextToSentryBaggageHeader(dsc) : undefined;
  const traceStateBase = new import_core14.TraceState;
  const traceStateWithDsc = dscString ? traceStateBase.set(SENTRY_TRACE_STATE_DSC, dscString) : traceStateBase;
  return sampled === false ? traceStateWithDsc.set(SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING, "1") : traceStateWithDsc;
}
var setupElements = new Set;
function openTelemetrySetupCheck() {
  return Array.from(setupElements);
}
function setIsSetup(element) {
  setupElements.add(element);
}

class SentryPropagator extends import_core14.W3CBaggagePropagator {
  constructor() {
    super();
    setIsSetup("SentryPropagator");
    this._urlMatchesTargetsMap = new LRUMap(100);
  }
  inject(context7, carrier, setter) {
    if (import_core14.isTracingSuppressed(context7)) {
      DEBUG_BUILD3 && debug.log("[Tracing] Not injecting trace data for url because tracing is suppressed.");
      return;
    }
    const activeSpan = import_api7.trace.getSpan(context7);
    const url = activeSpan && getCurrentURL(activeSpan);
    const { tracePropagationTargets, propagateTraceparent } = getClient()?.getOptions() || {};
    if (!shouldPropagateTraceForUrl(url, tracePropagationTargets, this._urlMatchesTargetsMap)) {
      DEBUG_BUILD3 && debug.log("[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:", url);
      return;
    }
    const existingBaggageHeader = getExistingBaggage(carrier);
    let baggage = import_api7.propagation.getBaggage(context7) || import_api7.propagation.createBaggage({});
    const { dynamicSamplingContext, traceId, spanId, sampled } = getInjectionData(context7);
    if (existingBaggageHeader) {
      const baggageEntries = parseBaggageHeader(existingBaggageHeader);
      if (baggageEntries) {
        Object.entries(baggageEntries).forEach(([key, value]) => {
          baggage = baggage.setEntry(key, { value });
        });
      }
    }
    if (dynamicSamplingContext) {
      baggage = Object.entries(dynamicSamplingContext).reduce((b, [dscKey, dscValue]) => {
        if (dscValue) {
          return b.setEntry(`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`, { value: dscValue });
        }
        return b;
      }, baggage);
    }
    if (traceId && traceId !== import_api7.INVALID_TRACEID) {
      setter.set(carrier, SENTRY_TRACE_HEADER2, generateSentryTraceHeader(traceId, spanId, sampled));
      if (propagateTraceparent) {
        setter.set(carrier, "traceparent", generateTraceparentHeader(traceId, spanId, sampled));
      }
    }
    super.inject(import_api7.propagation.setBaggage(context7, baggage), carrier, setter);
  }
  extract(context7, carrier, getter) {
    const maybeSentryTraceHeader = getter.get(carrier, SENTRY_TRACE_HEADER2);
    const baggage = getter.get(carrier, SENTRY_BAGGAGE_HEADER2);
    const sentryTrace = maybeSentryTraceHeader ? Array.isArray(maybeSentryTraceHeader) ? maybeSentryTraceHeader[0] : maybeSentryTraceHeader : undefined;
    return ensureScopesOnContext(getContextWithRemoteActiveSpan(context7, { sentryTrace, baggage }));
  }
  fields() {
    return [SENTRY_TRACE_HEADER2, SENTRY_BAGGAGE_HEADER2, "traceparent"];
  }
}
function getInjectionData(context7, options = {}) {
  const span = import_api7.trace.getSpan(context7);
  if (span?.spanContext().isRemote) {
    const spanContext = span.spanContext();
    const dynamicSamplingContext2 = getDynamicSamplingContextFromSpan(span);
    return {
      dynamicSamplingContext: dynamicSamplingContext2,
      traceId: spanContext.traceId,
      spanId: undefined,
      sampled: getSamplingDecision(spanContext)
    };
  }
  if (span) {
    const spanContext = span.spanContext();
    const dynamicSamplingContext2 = getDynamicSamplingContextFromSpan(span);
    return {
      dynamicSamplingContext: dynamicSamplingContext2,
      traceId: spanContext.traceId,
      spanId: spanContext.spanId,
      sampled: getSamplingDecision(spanContext)
    };
  }
  const scope = options.scope || getScopesFromContext(context7)?.scope || getCurrentScope();
  const client = options.client || getClient();
  const propagationContext = scope.getPropagationContext();
  const dynamicSamplingContext = client ? getDynamicSamplingContextFromScope(client, scope) : undefined;
  return {
    dynamicSamplingContext,
    traceId: propagationContext.traceId,
    spanId: propagationContext.propagationSpanId,
    sampled: propagationContext.sampled
  };
}
function getContextWithRemoteActiveSpan(ctx, { sentryTrace, baggage }) {
  const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);
  const { traceId, parentSpanId, sampled, dsc } = propagationContext;
  const client = getClient();
  const incomingDsc = baggageHeaderToDynamicSamplingContext(baggage);
  if (!parentSpanId || client && !shouldContinueTrace(client, incomingDsc?.org_id)) {
    return ctx;
  }
  const spanContext = generateRemoteSpanContext({
    traceId,
    spanId: parentSpanId,
    sampled,
    dsc
  });
  return import_api7.trace.setSpanContext(ctx, spanContext);
}
function continueTraceAsRemoteSpan(ctx, options, callback) {
  const ctxWithSpanContext = ensureScopesOnContext(getContextWithRemoteActiveSpan(ctx, options));
  return import_api7.context.with(ctxWithSpanContext, callback);
}
function ensureScopesOnContext(ctx) {
  const scopes = getScopesFromContext(ctx);
  const newScopes = {
    scope: scopes ? scopes.scope : getCurrentScope().clone(),
    isolationScope: scopes ? scopes.isolationScope : getIsolationScope()
  };
  return setScopesOnContext(ctx, newScopes);
}
function getExistingBaggage(carrier) {
  try {
    const baggage = carrier[SENTRY_BAGGAGE_HEADER2];
    return Array.isArray(baggage) ? baggage.join(",") : baggage;
  } catch {
    return;
  }
}
function getCurrentURL(span) {
  const spanData = spanToJSON(span).data;
  const urlAttribute = spanData[import_semantic_conventions3.SEMATTRS_HTTP_URL] || spanData[import_semantic_conventions3.ATTR_URL_FULL];
  if (typeof urlAttribute === "string") {
    return urlAttribute;
  }
  const urlTraceState = span.spanContext().traceState?.get(SENTRY_TRACE_STATE_URL);
  if (urlTraceState) {
    return urlTraceState;
  }
  return;
}
function generateRemoteSpanContext({
  spanId,
  traceId,
  sampled,
  dsc
}) {
  const traceState = makeTraceState({
    dsc,
    sampled
  });
  const spanContext = {
    traceId,
    spanId,
    isRemote: true,
    traceFlags: sampled ? import_api7.TraceFlags.SAMPLED : import_api7.TraceFlags.NONE,
    traceState
  };
  return spanContext;
}
function _startSpan(options, callback, autoEnd) {
  const tracer = getTracer();
  const { name, parentSpan: customParentSpan } = options;
  const wrapper = getActiveSpanWrapper(customParentSpan);
  return wrapper(() => {
    const activeCtx = getContext2(options.scope, options.forceTransaction);
    const shouldSkipSpan = options.onlyIfParent && !import_api7.trace.getSpan(activeCtx);
    const ctx = shouldSkipSpan ? import_core14.suppressTracing(activeCtx) : activeCtx;
    const spanOptions = getSpanOptions(options);
    if (!hasSpansEnabled()) {
      const suppressedCtx = import_core14.isTracingSuppressed(ctx) ? ctx : import_core14.suppressTracing(ctx);
      return import_api7.context.with(suppressedCtx, () => {
        return tracer.startActiveSpan(name, spanOptions, suppressedCtx, (span) => {
          return import_api7.context.with(activeCtx, () => {
            return handleCallbackErrors(() => callback(span), () => {
              if (spanToJSON(span).status === undefined) {
                span.setStatus({ code: import_api7.SpanStatusCode.ERROR });
              }
            }, autoEnd ? () => span.end() : undefined);
          });
        });
      });
    }
    return tracer.startActiveSpan(name, spanOptions, ctx, (span) => {
      return handleCallbackErrors(() => callback(span), () => {
        if (spanToJSON(span).status === undefined) {
          span.setStatus({ code: import_api7.SpanStatusCode.ERROR });
        }
      }, autoEnd ? () => span.end() : undefined);
    });
  });
}
function startSpan2(options, callback) {
  return _startSpan(options, callback, true);
}
function startSpanManual2(options, callback) {
  return _startSpan(options, (span) => callback(span, () => span.end()), false);
}
function startInactiveSpan2(options) {
  const tracer = getTracer();
  const { name, parentSpan: customParentSpan } = options;
  const wrapper = getActiveSpanWrapper(customParentSpan);
  return wrapper(() => {
    const activeCtx = getContext2(options.scope, options.forceTransaction);
    const shouldSkipSpan = options.onlyIfParent && !import_api7.trace.getSpan(activeCtx);
    let ctx = shouldSkipSpan ? import_core14.suppressTracing(activeCtx) : activeCtx;
    const spanOptions = getSpanOptions(options);
    if (!hasSpansEnabled()) {
      ctx = import_core14.isTracingSuppressed(ctx) ? ctx : import_core14.suppressTracing(ctx);
    }
    return tracer.startSpan(name, spanOptions, ctx);
  });
}
function withActiveSpan2(span, callback) {
  const newContextWithActiveSpan = span ? import_api7.trace.setSpan(import_api7.context.active(), span) : import_api7.trace.deleteSpan(import_api7.context.active());
  return import_api7.context.with(newContextWithActiveSpan, () => callback(getCurrentScope()));
}
function getTracer() {
  const client = getClient();
  return client?.tracer || import_api7.trace.getTracer("@sentry/opentelemetry", SDK_VERSION);
}
function getSpanOptions(options) {
  const { startTime, attributes, kind, op, links } = options;
  const fixedStartTime = typeof startTime === "number" ? ensureTimestampInMilliseconds(startTime) : startTime;
  return {
    attributes: op ? {
      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
      ...attributes
    } : attributes,
    kind,
    links,
    startTime: fixedStartTime
  };
}
function ensureTimestampInMilliseconds(timestamp) {
  const isMs = timestamp < 9999999999;
  return isMs ? timestamp * 1000 : timestamp;
}
function getContext2(scope, forceTransaction) {
  const ctx = getContextForScope(scope);
  const parentSpan = import_api7.trace.getSpan(ctx);
  if (!parentSpan) {
    return ctx;
  }
  if (!forceTransaction) {
    return ctx;
  }
  const ctxWithoutSpan = import_api7.trace.deleteSpan(ctx);
  const { spanId, traceId } = parentSpan.spanContext();
  const sampled = getSamplingDecision(parentSpan.spanContext());
  const rootSpan = getRootSpan(parentSpan);
  const dsc = getDynamicSamplingContextFromSpan(rootSpan);
  const traceState = makeTraceState({
    dsc,
    sampled
  });
  const spanOptions = {
    traceId,
    spanId,
    isRemote: true,
    traceFlags: sampled ? import_api7.TraceFlags.SAMPLED : import_api7.TraceFlags.NONE,
    traceState
  };
  const ctxWithSpanContext = import_api7.trace.setSpanContext(ctxWithoutSpan, spanOptions);
  return ctxWithSpanContext;
}
function getContextForScope(scope) {
  if (scope) {
    const ctx = getContextFromScope(scope);
    if (ctx) {
      return ctx;
    }
  }
  return import_api7.context.active();
}
function continueTrace2(options, callback) {
  return continueTraceAsRemoteSpan(import_api7.context.active(), options, callback);
}
function getTraceContextForScope(client, scope) {
  const ctx = getContextFromScope(scope);
  const span = ctx && import_api7.trace.getSpan(ctx);
  const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);
  const dynamicSamplingContext = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
  return [dynamicSamplingContext, traceContext];
}
function getActiveSpanWrapper(parentSpan) {
  return parentSpan !== undefined ? (callback) => {
    return withActiveSpan2(parentSpan, callback);
  } : (callback) => callback();
}
function suppressTracing2(callback) {
  const ctx = import_core14.suppressTracing(import_api7.context.active());
  return import_api7.context.with(ctx, callback);
}
function setupEventContextTrace(client) {
  client.on("preprocessEvent", (event) => {
    const span = getActiveSpan2();
    if (!span || event.type === "transaction") {
      return;
    }
    event.contexts = {
      trace: spanToTraceContext(span),
      ...event.contexts
    };
    const rootSpan = getRootSpan(span);
    event.sdkProcessingMetadata = {
      dynamicSamplingContext: getDynamicSamplingContextFromSpan(rootSpan),
      ...event.sdkProcessingMetadata
    };
    return event;
  });
}
function getTraceData2({
  span,
  scope,
  client,
  propagateTraceparent
} = {}) {
  let ctx = (scope && getContextFromScope(scope)) ?? api.context.active();
  if (span) {
    const { scope: scope2 } = getCapturedScopesOnSpan(span);
    ctx = scope2 && getContextFromScope(scope2) || api.trace.setSpan(api.context.active(), span);
  }
  const { traceId, spanId, sampled, dynamicSamplingContext } = getInjectionData(ctx, { scope, client });
  const traceData = {
    "sentry-trace": generateSentryTraceHeader(traceId, spanId, sampled),
    baggage: dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext)
  };
  if (propagateTraceparent) {
    traceData.traceparent = generateTraceparentHeader(traceId, spanId, sampled);
  }
  return traceData;
}
function setOpenTelemetryContextAsyncContextStrategy() {
  function getScopes() {
    const ctx = api.context.active();
    const scopes = getScopesFromContext(ctx);
    if (scopes) {
      return scopes;
    }
    return {
      scope: getDefaultCurrentScope(),
      isolationScope: getDefaultIsolationScope()
    };
  }
  function withScope3(callback) {
    const ctx = api.context.active();
    return api.context.with(ctx, () => {
      return callback(getCurrentScope2());
    });
  }
  function withSetScope2(scope, callback) {
    const ctx = getContextFromScope(scope) || api.context.active();
    return api.context.with(ctx.setValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY, scope), () => {
      return callback(scope);
    });
  }
  function withIsolationScope3(callback) {
    const ctx = api.context.active();
    return api.context.with(ctx.setValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY, true), () => {
      return callback(getIsolationScope2());
    });
  }
  function withSetIsolationScope(isolationScope, callback) {
    const ctx = api.context.active();
    return api.context.with(ctx.setValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY, isolationScope), () => {
      return callback(getIsolationScope2());
    });
  }
  function getCurrentScope2() {
    return getScopes().scope;
  }
  function getIsolationScope2() {
    return getScopes().isolationScope;
  }
  setAsyncContextStrategy({
    withScope: withScope3,
    withSetScope: withSetScope2,
    withSetIsolationScope,
    withIsolationScope: withIsolationScope3,
    getCurrentScope: getCurrentScope2,
    getIsolationScope: getIsolationScope2,
    startSpan: startSpan2,
    startSpanManual: startSpanManual2,
    startInactiveSpan: startInactiveSpan2,
    getActiveSpan: getActiveSpan2,
    suppressTracing: suppressTracing2,
    getTraceData: getTraceData2,
    continueTrace: continueTrace2,
    withActiveSpan: withActiveSpan2
  });
}
function wrapContextManagerClass(ContextManagerClass) {

  class SentryContextManager extends ContextManagerClass {
    constructor(...args) {
      super(...args);
      setIsSetup("SentryContextManager");
    }
    with(context7, fn, thisArg, ...args) {
      const currentScopes = getScopesFromContext(context7);
      const currentScope = currentScopes?.scope || getCurrentScope();
      const currentIsolationScope = currentScopes?.isolationScope || getIsolationScope();
      const shouldForkIsolationScope = context7.getValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY) === true;
      const scope = context7.getValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY);
      const isolationScope = context7.getValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY);
      const newCurrentScope = scope || currentScope.clone();
      const newIsolationScope = isolationScope || (shouldForkIsolationScope ? currentIsolationScope.clone() : currentIsolationScope);
      const scopes = { scope: newCurrentScope, isolationScope: newIsolationScope };
      const ctx1 = setScopesOnContext(context7, scopes);
      const ctx2 = ctx1.deleteValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY).deleteValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY).deleteValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY);
      setContextOnScope(newCurrentScope, ctx2);
      return super.with(ctx2, fn, thisArg, ...args);
    }
    getAsyncLocalStorageLookup() {
      return {
        asyncLocalStorage: this._asyncLocalStorage,
        contextSymbol: SENTRY_SCOPES_CONTEXT_KEY
      };
    }
  }
  return SentryContextManager;
}
function groupSpansWithParents(spans) {
  const nodeMap = new Map;
  for (const span of spans) {
    createOrUpdateSpanNodeAndRefs(nodeMap, span);
  }
  return Array.from(nodeMap, function([_id, spanNode]) {
    return spanNode;
  });
}
function getLocalParentId(span) {
  const parentIsRemote = span.attributes[SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE] === true;
  return !parentIsRemote ? getParentSpanId(span) : undefined;
}
function createOrUpdateSpanNodeAndRefs(nodeMap, span) {
  const id = span.spanContext().spanId;
  const parentId = getLocalParentId(span);
  if (!parentId) {
    createOrUpdateNode(nodeMap, { id, span, children: [] });
    return;
  }
  const parentNode = createOrGetParentNode(nodeMap, parentId);
  const node2 = createOrUpdateNode(nodeMap, { id, span, parentNode, children: [] });
  parentNode.children.push(node2);
}
function createOrGetParentNode(nodeMap, id) {
  const existing = nodeMap.get(id);
  if (existing) {
    return existing;
  }
  return createOrUpdateNode(nodeMap, { id, children: [] });
}
function createOrUpdateNode(nodeMap, spanNode) {
  const existing = nodeMap.get(spanNode.id);
  if (existing?.span) {
    return existing;
  }
  if (existing && !existing.span) {
    existing.span = spanNode.span;
    existing.parentNode = spanNode.parentNode;
    return existing;
  }
  nodeMap.set(spanNode.id, spanNode);
  return spanNode;
}
var canonicalGrpcErrorCodesMap = {
  "1": "cancelled",
  "2": "unknown_error",
  "3": "invalid_argument",
  "4": "deadline_exceeded",
  "5": "not_found",
  "6": "already_exists",
  "7": "permission_denied",
  "8": "resource_exhausted",
  "9": "failed_precondition",
  "10": "aborted",
  "11": "out_of_range",
  "12": "unimplemented",
  "13": "internal_error",
  "14": "unavailable",
  "15": "data_loss",
  "16": "unauthenticated"
};
var isStatusErrorMessageValid = (message) => {
  return Object.values(canonicalGrpcErrorCodesMap).includes(message);
};
function mapStatus(span) {
  const attributes = spanHasAttributes(span) ? span.attributes : {};
  const status = spanHasStatus(span) ? span.status : undefined;
  if (status) {
    if (status.code === import_api7.SpanStatusCode.OK) {
      return { code: SPAN_STATUS_OK };
    } else if (status.code === import_api7.SpanStatusCode.ERROR) {
      if (typeof status.message === "undefined") {
        const inferredStatus2 = inferStatusFromAttributes(attributes);
        if (inferredStatus2) {
          return inferredStatus2;
        }
      }
      if (status.message && isStatusErrorMessageValid(status.message)) {
        return { code: SPAN_STATUS_ERROR, message: status.message };
      } else {
        return { code: SPAN_STATUS_ERROR, message: "internal_error" };
      }
    }
  }
  const inferredStatus = inferStatusFromAttributes(attributes);
  if (inferredStatus) {
    return inferredStatus;
  }
  if (status?.code === import_api7.SpanStatusCode.UNSET) {
    return { code: SPAN_STATUS_OK };
  } else {
    return { code: SPAN_STATUS_ERROR, message: "unknown_error" };
  }
}
function inferStatusFromAttributes(attributes) {
  const httpCodeAttribute = attributes[import_semantic_conventions3.ATTR_HTTP_RESPONSE_STATUS_CODE] || attributes[import_semantic_conventions3.SEMATTRS_HTTP_STATUS_CODE];
  const grpcCodeAttribute = attributes[import_semantic_conventions3.SEMATTRS_RPC_GRPC_STATUS_CODE];
  const numberHttpCode = typeof httpCodeAttribute === "number" ? httpCodeAttribute : typeof httpCodeAttribute === "string" ? parseInt(httpCodeAttribute) : undefined;
  if (typeof numberHttpCode === "number") {
    return getSpanStatusFromHttpCode(numberHttpCode);
  }
  if (typeof grpcCodeAttribute === "string") {
    return { code: SPAN_STATUS_ERROR, message: canonicalGrpcErrorCodesMap[grpcCodeAttribute] || "unknown_error" };
  }
  return;
}
var MAX_SPAN_COUNT2 = 1000;
var DEFAULT_TIMEOUT = 300;

class SentrySpanExporter {
  constructor(options) {
    this._finishedSpanBucketSize = options?.timeout || DEFAULT_TIMEOUT;
    this._finishedSpanBuckets = new Array(this._finishedSpanBucketSize).fill(undefined);
    this._lastCleanupTimestampInS = Math.floor(safeDateNow() / 1000);
    this._spansToBucketEntry = new WeakMap;
    this._sentSpans = new Map;
    this._debouncedFlush = debounce(this.flush.bind(this), 1, { maxWait: 100 });
  }
  export(span) {
    const currentTimestampInS = Math.floor(safeDateNow() / 1000);
    if (this._lastCleanupTimestampInS !== currentTimestampInS) {
      let droppedSpanCount = 0;
      this._finishedSpanBuckets.forEach((bucket, i) => {
        if (bucket && bucket.timestampInS <= currentTimestampInS - this._finishedSpanBucketSize) {
          droppedSpanCount += bucket.spans.size;
          this._finishedSpanBuckets[i] = undefined;
        }
      });
      if (droppedSpanCount > 0) {
        DEBUG_BUILD3 && debug.log(`SpanExporter dropped ${droppedSpanCount} spans because they were pending for more than ${this._finishedSpanBucketSize} seconds.`);
      }
      this._lastCleanupTimestampInS = currentTimestampInS;
    }
    const currentBucketIndex = currentTimestampInS % this._finishedSpanBucketSize;
    const currentBucket = this._finishedSpanBuckets[currentBucketIndex] || {
      timestampInS: currentTimestampInS,
      spans: new Set
    };
    this._finishedSpanBuckets[currentBucketIndex] = currentBucket;
    currentBucket.spans.add(span);
    this._spansToBucketEntry.set(span, currentBucket);
    const localParentId = getLocalParentId(span);
    if (!localParentId || this._sentSpans.has(localParentId)) {
      this._debouncedFlush();
    }
  }
  flush() {
    const finishedSpans = this._finishedSpanBuckets.flatMap((bucket) => bucket ? Array.from(bucket.spans) : []);
    this._flushSentSpanCache();
    const sentSpans = this._maybeSend(finishedSpans);
    const sentSpanCount = sentSpans.size;
    const remainingOpenSpanCount = finishedSpans.length - sentSpanCount;
    DEBUG_BUILD3 && debug.log(`SpanExporter exported ${sentSpanCount} spans, ${remainingOpenSpanCount} spans are waiting for their parent spans to finish`);
    const expirationDate = safeDateNow() + DEFAULT_TIMEOUT * 1000;
    for (const span of sentSpans) {
      this._sentSpans.set(span.spanContext().spanId, expirationDate);
      const bucketEntry = this._spansToBucketEntry.get(span);
      if (bucketEntry) {
        bucketEntry.spans.delete(span);
      }
    }
    this._debouncedFlush.cancel();
  }
  clear() {
    this._finishedSpanBuckets = this._finishedSpanBuckets.fill(undefined);
    this._sentSpans.clear();
    this._debouncedFlush.cancel();
  }
  _maybeSend(spans) {
    const grouped = groupSpansWithParents(spans);
    const sentSpans = new Set;
    const rootNodes = this._getCompletedRootNodes(grouped);
    for (const root of rootNodes) {
      const span = root.span;
      sentSpans.add(span);
      const transactionEvent = createTransactionForOtelSpan(span);
      if (root.parentNode && this._sentSpans.has(root.parentNode.id)) {
        const traceData = transactionEvent.contexts?.trace?.data;
        if (traceData) {
          traceData["sentry.parent_span_already_sent"] = true;
        }
      }
      const spans2 = transactionEvent.spans || [];
      for (const child of root.children) {
        createAndFinishSpanForOtelSpan(child, spans2, sentSpans);
      }
      transactionEvent.spans = spans2.length > MAX_SPAN_COUNT2 ? spans2.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT2) : spans2;
      const measurements = timedEventsToMeasurements(span.events);
      if (measurements) {
        transactionEvent.measurements = measurements;
      }
      captureEvent(transactionEvent);
    }
    return sentSpans;
  }
  _flushSentSpanCache() {
    const currentTimestamp = safeDateNow();
    for (const [spanId, expirationTime] of this._sentSpans.entries()) {
      if (expirationTime <= currentTimestamp) {
        this._sentSpans.delete(spanId);
      }
    }
  }
  _nodeIsCompletedRootNodeOrHasSentParent(node2) {
    return !!node2.span && (!node2.parentNode || this._sentSpans.has(node2.parentNode.id));
  }
  _getCompletedRootNodes(nodes) {
    return nodes.filter((node2) => this._nodeIsCompletedRootNodeOrHasSentParent(node2));
  }
}
function parseSpan(span) {
  const attributes = span.attributes;
  const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];
  const op = attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP];
  const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
  return { origin, op, source };
}
function createTransactionForOtelSpan(span) {
  const { op, description, data, origin = "manual", source } = getSpanData(span);
  const capturedSpanScopes = getCapturedScopesOnSpan(span);
  const sampleRate = span.attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];
  const attributes = {
    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
    [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: sampleRate,
    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,
    ...data,
    ...removeSentryAttributes(span.attributes)
  };
  const { links } = span;
  const { traceId: trace_id, spanId: span_id } = span.spanContext();
  const parent_span_id = getParentSpanId(span);
  const status = mapStatus(span);
  const traceContext = {
    parent_span_id,
    span_id,
    trace_id,
    data: attributes,
    origin,
    op,
    status: getStatusMessage(status),
    links: convertSpanLinksForEnvelope(links)
  };
  const statusCode = attributes[import_semantic_conventions3.ATTR_HTTP_RESPONSE_STATUS_CODE];
  const responseContext = typeof statusCode === "number" ? { response: { status_code: statusCode } } : undefined;
  const transactionEvent = {
    contexts: {
      trace: traceContext,
      otel: {
        resource: span.resource.attributes
      },
      ...responseContext
    },
    spans: [],
    start_timestamp: spanTimeInputToSeconds(span.startTime),
    timestamp: spanTimeInputToSeconds(span.endTime),
    transaction: description,
    type: "transaction",
    sdkProcessingMetadata: {
      capturedSpanScope: capturedSpanScopes.scope,
      capturedSpanIsolationScope: capturedSpanScopes.isolationScope,
      sampleRate,
      dynamicSamplingContext: getDynamicSamplingContextFromSpan(span)
    },
    ...source && {
      transaction_info: {
        source
      }
    }
  };
  return transactionEvent;
}
function createAndFinishSpanForOtelSpan(node2, spans, sentSpans) {
  const span = node2.span;
  if (span) {
    sentSpans.add(span);
  }
  const shouldDrop = !span;
  if (shouldDrop) {
    node2.children.forEach((child) => {
      createAndFinishSpanForOtelSpan(child, spans, sentSpans);
    });
    return;
  }
  const span_id = span.spanContext().spanId;
  const trace_id = span.spanContext().traceId;
  const parentSpanId = getParentSpanId(span);
  const { attributes, startTime, endTime, links } = span;
  const { op, description, data, origin = "manual" } = getSpanData(span);
  const allData = {
    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,
    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
    ...removeSentryAttributes(attributes),
    ...data
  };
  const status = mapStatus(span);
  const spanJSON = {
    span_id,
    trace_id,
    data: allData,
    description,
    parent_span_id: parentSpanId,
    start_timestamp: spanTimeInputToSeconds(startTime),
    timestamp: spanTimeInputToSeconds(endTime) || undefined,
    status: getStatusMessage(status),
    op,
    origin,
    measurements: timedEventsToMeasurements(span.events),
    links: convertSpanLinksForEnvelope(links)
  };
  spans.push(spanJSON);
  node2.children.forEach((child) => {
    createAndFinishSpanForOtelSpan(child, spans, sentSpans);
  });
}
function getSpanData(span) {
  const { op: definedOp, source: definedSource, origin } = parseSpan(span);
  const { op: inferredOp, description, source: inferredSource, data: inferredData } = parseSpanDescription(span);
  const op = definedOp || inferredOp;
  const source = definedSource || inferredSource;
  const data = { ...inferredData, ...getData(span) };
  return {
    op,
    description,
    source,
    origin,
    data
  };
}
function removeSentryAttributes(data) {
  const cleanedData = { ...data };
  delete cleanedData[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];
  delete cleanedData[SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE];
  delete cleanedData[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
  return cleanedData;
}
function getData(span) {
  const attributes = span.attributes;
  const data = {};
  if (span.kind !== import_api7.SpanKind.INTERNAL) {
    data["otel.kind"] = import_api7.SpanKind[span.kind];
  }
  const maybeHttpStatusCodeAttribute = attributes[import_semantic_conventions3.SEMATTRS_HTTP_STATUS_CODE];
  if (maybeHttpStatusCodeAttribute) {
    data[import_semantic_conventions3.ATTR_HTTP_RESPONSE_STATUS_CODE] = maybeHttpStatusCodeAttribute;
  }
  const requestData = getRequestSpanData(span);
  if (requestData.url) {
    data.url = requestData.url;
  }
  if (requestData["http.query"]) {
    data["http.query"] = requestData["http.query"].slice(1);
  }
  if (requestData["http.fragment"]) {
    data["http.fragment"] = requestData["http.fragment"].slice(1);
  }
  return data;
}
function onSpanStart(span, parentContext) {
  const parentSpan = import_api7.trace.getSpan(parentContext);
  let scopes = getScopesFromContext(parentContext);
  if (parentSpan && !parentSpan.spanContext().isRemote) {
    addChildSpanToSpan(parentSpan, span);
  }
  if (parentSpan?.spanContext().isRemote) {
    span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE, true);
  }
  if (parentContext === import_api7.ROOT_CONTEXT) {
    scopes = {
      scope: getDefaultCurrentScope(),
      isolationScope: getDefaultIsolationScope()
    };
  }
  if (scopes) {
    setCapturedScopesOnSpan(span, scopes.scope, scopes.isolationScope);
  }
  logSpanStart(span);
  const client = getClient();
  client?.emit("spanStart", span);
}
function onSpanEnd(span) {
  logSpanEnd(span);
  const client = getClient();
  client?.emit("spanEnd", span);
}

class SentrySpanProcessor {
  constructor(options) {
    setIsSetup("SentrySpanProcessor");
    this._exporter = new SentrySpanExporter(options);
  }
  async forceFlush() {
    this._exporter.flush();
  }
  async shutdown() {
    this._exporter.clear();
  }
  onStart(span, parentContext) {
    onSpanStart(span, parentContext);
  }
  onEnd(span) {
    onSpanEnd(span);
    this._exporter.export(span);
  }
}

class SentrySampler {
  constructor(client) {
    this._client = client;
    setIsSetup("SentrySampler");
  }
  shouldSample(context7, traceId, spanName, spanKind, spanAttributes, _links) {
    const options = this._client.getOptions();
    const parentSpan = getValidSpan(context7);
    const parentContext = parentSpan?.spanContext();
    if (!hasSpansEnabled(options)) {
      return wrapSamplingDecision({ decision: undefined, context: context7, spanAttributes });
    }
    const maybeSpanHttpMethod = spanAttributes[import_semantic_conventions3.SEMATTRS_HTTP_METHOD] || spanAttributes[import_semantic_conventions3.ATTR_HTTP_REQUEST_METHOD];
    if (spanKind === import_api7.SpanKind.CLIENT && maybeSpanHttpMethod && (!parentSpan || parentContext?.isRemote)) {
      return wrapSamplingDecision({ decision: undefined, context: context7, spanAttributes });
    }
    const parentSampled = parentSpan ? getParentSampled(parentSpan, traceId, spanName) : undefined;
    const isRootSpan = !parentSpan || parentContext?.isRemote;
    if (!isRootSpan) {
      return wrapSamplingDecision({
        decision: parentSampled ? import_sdk_trace_base.SamplingDecision.RECORD_AND_SAMPLED : import_sdk_trace_base.SamplingDecision.NOT_RECORD,
        context: context7,
        spanAttributes
      });
    }
    const {
      description: inferredSpanName,
      data: inferredAttributes,
      op
    } = inferSpanData(spanName, spanAttributes, spanKind);
    const mergedAttributes = {
      ...inferredAttributes,
      ...spanAttributes
    };
    if (op) {
      mergedAttributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] = op;
    }
    const mutableSamplingDecision = { decision: true };
    this._client.emit("beforeSampling", {
      spanAttributes: mergedAttributes,
      spanName: inferredSpanName,
      parentSampled,
      parentContext
    }, mutableSamplingDecision);
    if (!mutableSamplingDecision.decision) {
      return wrapSamplingDecision({ decision: undefined, context: context7, spanAttributes });
    }
    const { isolationScope } = getScopesFromContext(context7) ?? {};
    const dscString = parentContext?.traceState ? parentContext.traceState.get(SENTRY_TRACE_STATE_DSC) : undefined;
    const dsc = dscString ? baggageHeaderToDynamicSamplingContext(dscString) : undefined;
    const sampleRand = parseSampleRate(dsc?.sample_rand) ?? safeMathRandom();
    const [sampled, sampleRate, localSampleRateWasApplied] = sampleSpan(options, {
      name: inferredSpanName,
      attributes: mergedAttributes,
      normalizedRequest: isolationScope?.getScopeData().sdkProcessingMetadata.normalizedRequest,
      parentSampled,
      parentSampleRate: parseSampleRate(dsc?.sample_rate)
    }, sampleRand);
    const method = `${maybeSpanHttpMethod}`.toUpperCase();
    if (method === "OPTIONS" || method === "HEAD") {
      DEBUG_BUILD3 && debug.log(`[Tracing] Not sampling span because HTTP method is '${method}' for ${spanName}`);
      return wrapSamplingDecision({
        decision: import_sdk_trace_base.SamplingDecision.NOT_RECORD,
        context: context7,
        spanAttributes,
        sampleRand,
        downstreamTraceSampleRate: 0
      });
    }
    if (!sampled && parentSampled === undefined) {
      DEBUG_BUILD3 && debug.log("[Tracing] Discarding root span because its trace was not chosen to be sampled.");
      this._client.recordDroppedEvent("sample_rate", "transaction");
    }
    return {
      ...wrapSamplingDecision({
        decision: sampled ? import_sdk_trace_base.SamplingDecision.RECORD_AND_SAMPLED : import_sdk_trace_base.SamplingDecision.NOT_RECORD,
        context: context7,
        spanAttributes,
        sampleRand,
        downstreamTraceSampleRate: localSampleRateWasApplied ? sampleRate : undefined
      }),
      attributes: {
        [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: localSampleRateWasApplied ? sampleRate : undefined
      }
    };
  }
  toString() {
    return "SentrySampler";
  }
}
function getParentSampled(parentSpan, traceId, spanName) {
  const parentContext = parentSpan.spanContext();
  if (import_api7.isSpanContextValid(parentContext) && parentContext.traceId === traceId) {
    if (parentContext.isRemote) {
      const parentSampled2 = getSamplingDecision(parentSpan.spanContext());
      DEBUG_BUILD3 && debug.log(`[Tracing] Inheriting remote parent's sampled decision for ${spanName}: ${parentSampled2}`);
      return parentSampled2;
    }
    const parentSampled = getSamplingDecision(parentContext);
    DEBUG_BUILD3 && debug.log(`[Tracing] Inheriting parent's sampled decision for ${spanName}: ${parentSampled}`);
    return parentSampled;
  }
  return;
}
function wrapSamplingDecision({
  decision,
  context: context7,
  spanAttributes,
  sampleRand,
  downstreamTraceSampleRate
}) {
  let traceState = getBaseTraceState(context7, spanAttributes);
  if (downstreamTraceSampleRate !== undefined) {
    traceState = traceState.set(SENTRY_TRACE_STATE_SAMPLE_RATE, `${downstreamTraceSampleRate}`);
  }
  if (sampleRand !== undefined) {
    traceState = traceState.set(SENTRY_TRACE_STATE_SAMPLE_RAND, `${sampleRand}`);
  }
  if (decision == undefined) {
    return { decision: import_sdk_trace_base.SamplingDecision.NOT_RECORD, traceState };
  }
  if (decision === import_sdk_trace_base.SamplingDecision.NOT_RECORD) {
    return { decision, traceState: traceState.set(SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING, "1") };
  }
  return { decision, traceState };
}
function getBaseTraceState(context7, spanAttributes) {
  const parentSpan = import_api7.trace.getSpan(context7);
  const parentContext = parentSpan?.spanContext();
  let traceState = parentContext?.traceState || new import_core14.TraceState;
  const url = spanAttributes[import_semantic_conventions3.SEMATTRS_HTTP_URL] || spanAttributes[import_semantic_conventions3.ATTR_URL_FULL];
  if (url && typeof url === "string") {
    traceState = traceState.set(SENTRY_TRACE_STATE_URL, url);
  }
  return traceState;
}
function getValidSpan(context7) {
  const span = import_api7.trace.getSpan(context7);
  return span && import_api7.isSpanContextValid(span.spanContext()) ? span : undefined;
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/otel/contextManager.js
var SentryContextManager = wrapContextManagerClass(import_context_async_hooks.AsyncLocalStorageContextManager);
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/otel/logger.js
var import_api8 = __toESM(require_src(), 1);
function setupOpenTelemetryLogger() {
  import_api8.diag.disable();
  import_api8.diag.setLogger({
    error: debug.error,
    warn: debug.warn,
    info: debug.log,
    debug: debug.log,
    verbose: debug.log
  }, import_api8.DiagLogLevel.DEBUG);
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/otel/instrument.js
var import_instrumentation3 = __toESM(require_src6(), 1);
var INSTRUMENTED = {};
function generateInstrumentOnce(name, creatorOrClass, optionsCallback) {
  if (optionsCallback) {
    return _generateInstrumentOnceWithOptions(name, creatorOrClass, optionsCallback);
  }
  return _generateInstrumentOnce(name, creatorOrClass);
}
function _generateInstrumentOnce(name, creator) {
  return Object.assign((options) => {
    const instrumented2 = INSTRUMENTED[name];
    if (instrumented2) {
      if (options) {
        instrumented2.setConfig(options);
      }
      return instrumented2;
    }
    const instrumentation = creator(options);
    INSTRUMENTED[name] = instrumentation;
    import_instrumentation3.registerInstrumentations({
      instrumentations: [instrumentation]
    });
    return instrumentation;
  }, { id: name });
}
function _generateInstrumentOnceWithOptions(name, instrumentationClass, optionsCallback) {
  return Object.assign((_options) => {
    const options = optionsCallback(_options);
    const instrumented2 = INSTRUMENTED[name];
    if (instrumented2) {
      instrumented2.setConfig(options);
      return instrumented2;
    }
    const instrumentation = new instrumentationClass(options);
    INSTRUMENTED[name] = instrumentation;
    import_instrumentation3.registerInstrumentations({
      instrumentations: [instrumentation]
    });
    return instrumentation;
  }, { id: name });
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/childProcess.js
import * as diagnosticsChannel from "node:diagnostics_channel";
var INTEGRATION_NAME9 = "ChildProcess";
var childProcessIntegration = defineIntegration((options = {}) => {
  return {
    name: INTEGRATION_NAME9,
    setup() {
      diagnosticsChannel.channel("child_process").subscribe((event) => {
        if (event && typeof event === "object" && "process" in event) {
          captureChildProcessEvents(event.process, options);
        }
      });
      diagnosticsChannel.channel("worker_threads").subscribe((event) => {
        if (event && typeof event === "object" && "worker" in event) {
          captureWorkerThreadEvents(event.worker, options);
        }
      });
    }
  };
});
function captureChildProcessEvents(child, options) {
  let hasExited = false;
  let data;
  child.on("spawn", () => {
    if (child.spawnfile === "/usr/bin/sw_vers") {
      hasExited = true;
      return;
    }
    data = { spawnfile: child.spawnfile };
    if (options.includeChildProcessArgs) {
      data.spawnargs = child.spawnargs;
    }
  }).on("exit", (code) => {
    if (!hasExited) {
      hasExited = true;
      if (code !== null && code !== 0) {
        addBreadcrumb({
          category: "child_process",
          message: `Child process exited with code '${code}'`,
          level: code === 0 ? "info" : "warning",
          data
        });
      }
    }
  }).on("error", (error2) => {
    if (!hasExited) {
      hasExited = true;
      addBreadcrumb({
        category: "child_process",
        message: `Child process errored with '${error2.message}'`,
        level: "error",
        data
      });
    }
  });
}
function captureWorkerThreadEvents(worker, options) {
  let threadId;
  worker.on("online", () => {
    threadId = worker.threadId;
  }).on("error", (error2) => {
    if (options.captureWorkerErrors !== false) {
      captureException(error2, {
        mechanism: { type: "auto.child_process.worker_thread", handled: false, data: { threadId: String(threadId) } }
      });
    } else {
      addBreadcrumb({
        category: "worker_thread",
        message: `Worker thread errored with '${error2.message}'`,
        level: "error",
        data: { threadId }
      });
    }
  });
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/context.js
import { execFile } from "node:child_process";
import { readFile, readdir } from "node:fs";
import * as os from "node:os";
import { join as join2 } from "node:path";
import { promisify } from "node:util";
var readFileAsync = promisify(readFile);
var readDirAsync = promisify(readdir);
var INTEGRATION_NAME10 = "Context";
var _nodeContextIntegration = (options = {}) => {
  let cachedContext;
  const _options = {
    app: true,
    os: true,
    device: true,
    culture: true,
    cloudResource: true,
    ...options
  };
  async function addContext(event) {
    if (cachedContext === undefined) {
      cachedContext = _getContexts();
    }
    const updatedContext = _updateContext(await cachedContext);
    event.contexts = {
      ...event.contexts,
      app: { ...updatedContext.app, ...event.contexts?.app },
      os: { ...updatedContext.os, ...event.contexts?.os },
      device: { ...updatedContext.device, ...event.contexts?.device },
      culture: { ...updatedContext.culture, ...event.contexts?.culture },
      cloud_resource: { ...updatedContext.cloud_resource, ...event.contexts?.cloud_resource }
    };
    return event;
  }
  async function _getContexts() {
    const contexts = {};
    if (_options.os) {
      contexts.os = await getOsContext();
    }
    if (_options.app) {
      contexts.app = getAppContext();
    }
    if (_options.device) {
      contexts.device = getDeviceContext(_options.device);
    }
    if (_options.culture) {
      const culture = getCultureContext();
      if (culture) {
        contexts.culture = culture;
      }
    }
    if (_options.cloudResource) {
      contexts.cloud_resource = getCloudResourceContext();
    }
    return contexts;
  }
  return {
    name: INTEGRATION_NAME10,
    processEvent(event) {
      return addContext(event);
    }
  };
};
var nodeContextIntegration = defineIntegration(_nodeContextIntegration);
function _updateContext(contexts) {
  if (contexts.app?.app_memory) {
    contexts.app.app_memory = process.memoryUsage().rss;
  }
  if (contexts.app?.free_memory && typeof process.availableMemory === "function") {
    const freeMemory = process.availableMemory?.();
    if (freeMemory != null) {
      contexts.app.free_memory = freeMemory;
    }
  }
  if (contexts.device?.free_memory) {
    contexts.device.free_memory = os.freemem();
  }
  return contexts;
}
async function getOsContext() {
  const platformId = os.platform();
  switch (platformId) {
    case "darwin":
      return getDarwinInfo();
    case "linux":
      return getLinuxInfo();
    default:
      return {
        name: PLATFORM_NAMES[platformId] || platformId,
        version: os.release()
      };
  }
}
function getCultureContext() {
  try {
    if (typeof process.versions.icu !== "string") {
      return;
    }
    const january = new Date(900000000);
    const spanish = new Intl.DateTimeFormat("es", { month: "long" });
    if (spanish.format(january) === "enero") {
      const options = Intl.DateTimeFormat().resolvedOptions();
      return {
        locale: options.locale,
        timezone: options.timeZone
      };
    }
  } catch {}
  return;
}
function getAppContext() {
  const app_memory = process.memoryUsage().rss;
  const app_start_time = new Date(Date.now() - process.uptime() * 1000).toISOString();
  const appContext = { app_start_time, app_memory };
  if (typeof process.availableMemory === "function") {
    const freeMemory = process.availableMemory?.();
    if (freeMemory != null) {
      appContext.free_memory = freeMemory;
    }
  }
  return appContext;
}
function getDeviceContext(deviceOpt) {
  const device = {};
  let uptime2;
  try {
    uptime2 = os.uptime();
  } catch {}
  if (typeof uptime2 === "number") {
    device.boot_time = new Date(Date.now() - uptime2 * 1000).toISOString();
  }
  device.arch = os.arch();
  if (deviceOpt === true || deviceOpt.memory) {
    device.memory_size = os.totalmem();
    device.free_memory = os.freemem();
  }
  if (deviceOpt === true || deviceOpt.cpu) {
    const cpuInfo = os.cpus();
    const firstCpu = cpuInfo?.[0];
    if (firstCpu) {
      device.processor_count = cpuInfo.length;
      device.cpu_description = firstCpu.model;
      device.processor_frequency = firstCpu.speed;
    }
  }
  return device;
}
var PLATFORM_NAMES = {
  aix: "IBM AIX",
  freebsd: "FreeBSD",
  openbsd: "OpenBSD",
  sunos: "SunOS",
  win32: "Windows",
  ohos: "OpenHarmony",
  android: "Android"
};
var LINUX_DISTROS = [
  { name: "fedora-release", distros: ["Fedora"] },
  { name: "redhat-release", distros: ["Red Hat Linux", "Centos"] },
  { name: "redhat_version", distros: ["Red Hat Linux"] },
  { name: "SuSE-release", distros: ["SUSE Linux"] },
  { name: "lsb-release", distros: ["Ubuntu Linux", "Arch Linux"] },
  { name: "debian_version", distros: ["Debian"] },
  { name: "debian_release", distros: ["Debian"] },
  { name: "arch-release", distros: ["Arch Linux"] },
  { name: "gentoo-release", distros: ["Gentoo Linux"] },
  { name: "novell-release", distros: ["SUSE Linux"] },
  { name: "alpine-release", distros: ["Alpine Linux"] }
];
var LINUX_VERSIONS = {
  alpine: (content) => content,
  arch: (content) => matchFirst(/distrib_release=(.*)/, content),
  centos: (content) => matchFirst(/release ([^ ]+)/, content),
  debian: (content) => content,
  fedora: (content) => matchFirst(/release (..)/, content),
  mint: (content) => matchFirst(/distrib_release=(.*)/, content),
  red: (content) => matchFirst(/release ([^ ]+)/, content),
  suse: (content) => matchFirst(/VERSION = (.*)\n/, content),
  ubuntu: (content) => matchFirst(/distrib_release=(.*)/, content)
};
function matchFirst(regex, text) {
  const match = regex.exec(text);
  return match ? match[1] : undefined;
}
async function getDarwinInfo() {
  const darwinInfo = {
    kernel_version: os.release(),
    name: "Mac OS X",
    version: `10.${Number(os.release().split(".")[0]) - 4}`
  };
  try {
    const output = await new Promise((resolve2, reject) => {
      execFile("/usr/bin/sw_vers", (error2, stdout) => {
        if (error2) {
          reject(error2);
          return;
        }
        resolve2(stdout);
      });
    });
    darwinInfo.name = matchFirst(/^ProductName:\s+(.*)$/m, output);
    darwinInfo.version = matchFirst(/^ProductVersion:\s+(.*)$/m, output);
    darwinInfo.build = matchFirst(/^BuildVersion:\s+(.*)$/m, output);
  } catch {}
  return darwinInfo;
}
function getLinuxDistroId(name) {
  return name.split(" ")[0].toLowerCase();
}
async function getLinuxInfo() {
  const linuxInfo = {
    kernel_version: os.release(),
    name: "Linux"
  };
  try {
    const etcFiles = await readDirAsync("/etc");
    const distroFile = LINUX_DISTROS.find((file) => etcFiles.includes(file.name));
    if (!distroFile) {
      return linuxInfo;
    }
    const distroPath = join2("/etc", distroFile.name);
    const contents = (await readFileAsync(distroPath, { encoding: "utf-8" })).toLowerCase();
    const { distros } = distroFile;
    linuxInfo.name = distros.find((d) => contents.indexOf(getLinuxDistroId(d)) >= 0) || distros[0];
    const id = getLinuxDistroId(linuxInfo.name);
    linuxInfo.version = LINUX_VERSIONS[id]?.(contents);
  } catch {}
  return linuxInfo;
}
function getCloudResourceContext() {
  if (process.env.VERCEL) {
    return {
      "cloud.provider": "vercel",
      "cloud.region": process.env.VERCEL_REGION
    };
  } else if (process.env.AWS_REGION) {
    return {
      "cloud.provider": "aws",
      "cloud.region": process.env.AWS_REGION,
      "cloud.platform": process.env.AWS_EXECUTION_ENV
    };
  } else if (process.env.GCP_PROJECT) {
    return {
      "cloud.provider": "gcp"
    };
  } else if (process.env.ALIYUN_REGION_ID) {
    return {
      "cloud.provider": "alibaba_cloud",
      "cloud.region": process.env.ALIYUN_REGION_ID
    };
  } else if (process.env.WEBSITE_SITE_NAME && process.env.REGION_NAME) {
    return {
      "cloud.provider": "azure",
      "cloud.region": process.env.REGION_NAME
    };
  } else if (process.env.IBM_CLOUD_REGION) {
    return {
      "cloud.provider": "ibm_cloud",
      "cloud.region": process.env.IBM_CLOUD_REGION
    };
  } else if (process.env.TENCENTCLOUD_REGION) {
    return {
      "cloud.provider": "tencent_cloud",
      "cloud.region": process.env.TENCENTCLOUD_REGION,
      "cloud.account.id": process.env.TENCENTCLOUD_APPID,
      "cloud.availability_zone": process.env.TENCENTCLOUD_ZONE
    };
  } else if (process.env.NETLIFY) {
    return {
      "cloud.provider": "netlify"
    };
  } else if (process.env.FLY_REGION) {
    return {
      "cloud.provider": "fly.io",
      "cloud.region": process.env.FLY_REGION
    };
  } else if (process.env.DYNO) {
    return {
      "cloud.provider": "heroku"
    };
  } else {
    return;
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/contextlines.js
import { createReadStream } from "node:fs";
import { createInterface } from "node:readline";
var LRU_FILE_CONTENTS_CACHE = new LRUMap(10);
var LRU_FILE_CONTENTS_FS_READ_FAILED = new LRUMap(20);
var DEFAULT_LINES_OF_CONTEXT = 7;
var INTEGRATION_NAME11 = "ContextLines";
var MAX_CONTEXTLINES_COLNO = 1000;
var MAX_CONTEXTLINES_LINENO = 1e4;
function emplace(map, key, contents) {
  const value = map.get(key);
  if (value === undefined) {
    map.set(key, contents);
    return contents;
  }
  return value;
}
function shouldSkipContextLinesForFile(path) {
  if (path.startsWith("node:"))
    return true;
  if (path.endsWith(".min.js"))
    return true;
  if (path.endsWith(".min.cjs"))
    return true;
  if (path.endsWith(".min.mjs"))
    return true;
  if (path.startsWith("data:"))
    return true;
  return false;
}
function shouldSkipContextLinesForFrame(frame) {
  if (frame.lineno !== undefined && frame.lineno > MAX_CONTEXTLINES_LINENO)
    return true;
  if (frame.colno !== undefined && frame.colno > MAX_CONTEXTLINES_COLNO)
    return true;
  return false;
}
function rangeExistsInContentCache(file, range) {
  const contents = LRU_FILE_CONTENTS_CACHE.get(file);
  if (contents === undefined)
    return false;
  for (let i = range[0];i <= range[1]; i++) {
    if (contents[i] === undefined) {
      return false;
    }
  }
  return true;
}
function makeLineReaderRanges(lines, linecontext) {
  if (!lines.length) {
    return [];
  }
  let i = 0;
  const line = lines[0];
  if (typeof line !== "number") {
    return [];
  }
  let current = makeContextRange(line, linecontext);
  const out = [];
  while (true) {
    if (i === lines.length - 1) {
      out.push(current);
      break;
    }
    const next = lines[i + 1];
    if (typeof next !== "number") {
      break;
    }
    if (next <= current[1]) {
      current[1] = next + linecontext;
    } else {
      out.push(current);
      current = makeContextRange(next, linecontext);
    }
    i++;
  }
  return out;
}
function getContextLinesFromFile(path, ranges, output) {
  return new Promise((resolve2, _reject) => {
    const stream = createReadStream(path);
    const lineReaded = createInterface({
      input: stream
    });
    function destroyStreamAndResolve() {
      stream.destroy();
      resolve2();
    }
    let lineNumber = 0;
    let currentRangeIndex = 0;
    const range = ranges[currentRangeIndex];
    if (range === undefined) {
      destroyStreamAndResolve();
      return;
    }
    let rangeStart = range[0];
    let rangeEnd = range[1];
    function onStreamError(e) {
      LRU_FILE_CONTENTS_FS_READ_FAILED.set(path, 1);
      DEBUG_BUILD2 && debug.error(`Failed to read file: ${path}. Error: ${e}`);
      lineReaded.close();
      lineReaded.removeAllListeners();
      destroyStreamAndResolve();
    }
    stream.on("error", onStreamError);
    lineReaded.on("error", onStreamError);
    lineReaded.on("close", destroyStreamAndResolve);
    lineReaded.on("line", (line) => {
      lineNumber++;
      if (lineNumber < rangeStart)
        return;
      output[lineNumber] = snipLine(line, 0);
      if (lineNumber >= rangeEnd) {
        if (currentRangeIndex === ranges.length - 1) {
          lineReaded.close();
          lineReaded.removeAllListeners();
          return;
        }
        currentRangeIndex++;
        const range2 = ranges[currentRangeIndex];
        if (range2 === undefined) {
          lineReaded.close();
          lineReaded.removeAllListeners();
          return;
        }
        rangeStart = range2[0];
        rangeEnd = range2[1];
      }
    });
  });
}
async function addSourceContext(event, contextLines) {
  const filesToLines = {};
  if (contextLines > 0 && event.exception?.values) {
    for (const exception of event.exception.values) {
      if (!exception.stacktrace?.frames?.length) {
        continue;
      }
      for (let i = exception.stacktrace.frames.length - 1;i >= 0; i--) {
        const frame = exception.stacktrace.frames[i];
        const filename = frame?.filename;
        if (!frame || typeof filename !== "string" || typeof frame.lineno !== "number" || shouldSkipContextLinesForFile(filename) || shouldSkipContextLinesForFrame(frame)) {
          continue;
        }
        const filesToLinesOutput = filesToLines[filename];
        if (!filesToLinesOutput)
          filesToLines[filename] = [];
        filesToLines[filename].push(frame.lineno);
      }
    }
  }
  const files = Object.keys(filesToLines);
  if (files.length == 0) {
    return event;
  }
  const readlinePromises = [];
  for (const file of files) {
    if (LRU_FILE_CONTENTS_FS_READ_FAILED.get(file)) {
      continue;
    }
    const filesToLineRanges = filesToLines[file];
    if (!filesToLineRanges) {
      continue;
    }
    filesToLineRanges.sort((a, b) => a - b);
    const ranges = makeLineReaderRanges(filesToLineRanges, contextLines);
    if (ranges.every((r) => rangeExistsInContentCache(file, r))) {
      continue;
    }
    const cache = emplace(LRU_FILE_CONTENTS_CACHE, file, {});
    readlinePromises.push(getContextLinesFromFile(file, ranges, cache));
  }
  await Promise.all(readlinePromises).catch(() => {
    DEBUG_BUILD2 && debug.log("Failed to read one or more source files and resolve context lines");
  });
  if (contextLines > 0 && event.exception?.values) {
    for (const exception of event.exception.values) {
      if (exception.stacktrace?.frames && exception.stacktrace.frames.length > 0) {
        addSourceContextToFrames(exception.stacktrace.frames, contextLines, LRU_FILE_CONTENTS_CACHE);
      }
    }
  }
  return event;
}
function addSourceContextToFrames(frames, contextLines, cache) {
  for (const frame of frames) {
    if (frame.filename && frame.context_line === undefined && typeof frame.lineno === "number") {
      const contents = cache.get(frame.filename);
      if (contents === undefined) {
        continue;
      }
      addContextToFrame2(frame.lineno, frame, contextLines, contents);
    }
  }
}
function clearLineContext(frame) {
  delete frame.pre_context;
  delete frame.context_line;
  delete frame.post_context;
}
function addContextToFrame2(lineno, frame, contextLines, contents) {
  if (frame.lineno === undefined || contents === undefined) {
    DEBUG_BUILD2 && debug.error("Cannot resolve context for frame with no lineno or file contents");
    return;
  }
  frame.pre_context = [];
  for (let i = makeRangeStart(lineno, contextLines);i < lineno; i++) {
    const line = contents[i];
    if (line === undefined) {
      clearLineContext(frame);
      DEBUG_BUILD2 && debug.error(`Could not find line ${i} in file ${frame.filename}`);
      return;
    }
    frame.pre_context.push(line);
  }
  if (contents[lineno] === undefined) {
    clearLineContext(frame);
    DEBUG_BUILD2 && debug.error(`Could not find line ${lineno} in file ${frame.filename}`);
    return;
  }
  frame.context_line = contents[lineno];
  const end = makeRangeEnd(lineno, contextLines);
  frame.post_context = [];
  for (let i = lineno + 1;i <= end; i++) {
    const line = contents[i];
    if (line === undefined) {
      break;
    }
    frame.post_context.push(line);
  }
}
function makeRangeStart(line, linecontext) {
  return Math.max(1, line - linecontext);
}
function makeRangeEnd(line, linecontext) {
  return line + linecontext;
}
function makeContextRange(line, linecontext) {
  return [makeRangeStart(line, linecontext), makeRangeEnd(line, linecontext)];
}
var _contextLinesIntegration = (options = {}) => {
  const contextLines = options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;
  return {
    name: INTEGRATION_NAME11,
    processEvent(event) {
      return addSourceContext(event, contextLines);
    }
  };
};
var contextLinesIntegration = defineIntegration(_contextLinesIntegration);

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/http/index.js
var INTEGRATION_NAME12 = "Http";
var instrumentSentryHttp = generateInstrumentOnce(`${INTEGRATION_NAME12}.sentry`, (options) => {
  return new SentryHttpInstrumentation(options);
});
var httpIntegration = defineIntegration((options = {}) => {
  const serverOptions = {
    sessions: options.trackIncomingRequestsAsSessions,
    sessionFlushingDelayMS: options.sessionFlushingDelayMS,
    ignoreRequestBody: options.ignoreIncomingRequestBody,
    maxRequestBodySize: options.maxIncomingRequestBodySize
  };
  const serverSpansOptions = {
    ignoreIncomingRequests: options.ignoreIncomingRequests,
    ignoreStaticAssets: options.ignoreStaticAssets,
    ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes
  };
  const httpInstrumentationOptions = {
    breadcrumbs: options.breadcrumbs,
    propagateTraceInOutgoingRequests: options.tracePropagation ?? true,
    ignoreOutgoingRequests: options.ignoreOutgoingRequests
  };
  const server = httpServerIntegration(serverOptions);
  const serverSpans = httpServerSpansIntegration(serverSpansOptions);
  const spans = options.spans ?? false;
  const disableIncomingRequestSpans = options.disableIncomingRequestSpans ?? false;
  const enabledServerSpans = spans && !disableIncomingRequestSpans;
  return {
    name: INTEGRATION_NAME12,
    setup(client) {
      if (enabledServerSpans) {
        serverSpans.setup(client);
      }
    },
    setupOnce() {
      server.setupOnce();
      instrumentSentryHttp(httpInstrumentationOptions);
    },
    processEvent(event) {
      return serverSpans.processEvent(event);
    }
  };
});

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js
import { Worker as Worker2 } from "node:worker_threads";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/debug.js
var cachedDebuggerEnabled;
async function isDebuggerEnabled() {
  if (cachedDebuggerEnabled === undefined) {
    try {
      const inspector = await import("node:inspector");
      cachedDebuggerEnabled = !!inspector.url();
    } catch {
      cachedDebuggerEnabled = false;
    }
  }
  return cachedDebuggerEnabled;
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/local-variables/common.js
var LOCAL_VARIABLES_KEY = "__SENTRY_ERROR_LOCAL_VARIABLES__";
function createRateLimiter(maxPerSecond, enable2, disable2) {
  let count = 0;
  let retrySeconds = 5;
  let disabledTimeout = 0;
  setInterval(() => {
    if (disabledTimeout === 0) {
      if (count > maxPerSecond) {
        retrySeconds *= 2;
        disable2(retrySeconds);
        if (retrySeconds > 86400) {
          retrySeconds = 86400;
        }
        disabledTimeout = retrySeconds;
      }
    } else {
      disabledTimeout -= 1;
      if (disabledTimeout === 0) {
        enable2();
      }
    }
    count = 0;
  }, 1000).unref();
  return () => {
    count += 1;
  };
}
function isAnonymous(name) {
  return name !== undefined && (name.length === 0 || name === "?" || name === "<anonymous>");
}
function functionNamesMatch(a, b) {
  return a === b || `Object.${a}` === b || a === `Object.${b}` || isAnonymous(a) && isAnonymous(b);
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js
var base64WorkerScript = " ";
function log2(...args) {
  debug.log("[LocalVariables]", ...args);
}
var localVariablesAsyncIntegration = defineIntegration((integrationOptions = {}) => {
  function addLocalVariablesToException(exception, localVariables) {
    const frames = (exception.stacktrace?.frames || []).filter((frame) => frame.function !== "new Promise");
    for (let i = 0;i < frames.length; i++) {
      const frameIndex = frames.length - i - 1;
      const frameLocalVariables = localVariables[i];
      const frame = frames[frameIndex];
      if (!frame || !frameLocalVariables) {
        break;
      }
      if (frameLocalVariables.vars === undefined || frame.in_app === false && integrationOptions.includeOutOfAppFrames !== true || !functionNamesMatch(frame.function, frameLocalVariables.function)) {
        continue;
      }
      frame.vars = frameLocalVariables.vars;
    }
  }
  function addLocalVariablesToEvent(event, hint) {
    if (hint.originalException && typeof hint.originalException === "object" && LOCAL_VARIABLES_KEY in hint.originalException && Array.isArray(hint.originalException[LOCAL_VARIABLES_KEY])) {
      for (const exception of event.exception?.values || []) {
        addLocalVariablesToException(exception, hint.originalException[LOCAL_VARIABLES_KEY]);
      }
      hint.originalException[LOCAL_VARIABLES_KEY] = undefined;
    }
    return event;
  }
  async function startInspector() {
    const inspector = await import("node:inspector");
    if (!inspector.url()) {
      inspector.open(0);
    }
  }
  function startWorker(options) {
    const worker = new Worker2(new URL(`data:application/javascript;base64,${base64WorkerScript}`), {
      workerData: options,
      execArgv: [],
      env: { ...process.env, NODE_OPTIONS: undefined }
    });
    process.on("exit", () => {
      worker.terminate();
    });
    worker.once("error", (err) => {
      log2("Worker error", err);
    });
    worker.once("exit", (code) => {
      log2("Worker exit", code);
    });
    worker.unref();
  }
  return {
    name: "LocalVariablesAsync",
    async setup(client) {
      const clientOptions = client.getOptions();
      if (!clientOptions.includeLocalVariables) {
        return;
      }
      if (await isDebuggerEnabled()) {
        debug.warn("Local variables capture has been disabled because the debugger was already enabled");
        return;
      }
      const options = {
        ...integrationOptions,
        debug: debug.isEnabled()
      };
      startInspector().then(() => {
        try {
          startWorker(options);
        } catch (e) {
          debug.error("Failed to start worker", e);
        }
      }, (e) => {
        debug.error("Failed to start inspector", e);
      });
    },
    processEvent(event, hint) {
      return addLocalVariablesToEvent(event, hint);
    }
  };
});

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-sync.js
function hashFrames(frames) {
  if (frames === undefined) {
    return;
  }
  return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, "");
}
function hashFromStack(stackParser, stack) {
  if (stack === undefined) {
    return;
  }
  return hashFrames(stackParser(stack, 1));
}
function createCallbackList(complete) {
  let callbacks = [];
  let completedCalled = false;
  function checkedComplete(result) {
    callbacks = [];
    if (completedCalled) {
      return;
    }
    completedCalled = true;
    complete(result);
  }
  callbacks.push(checkedComplete);
  function add(fn) {
    callbacks.push(fn);
  }
  function next(result) {
    const popped = callbacks.pop() || checkedComplete;
    try {
      popped(result);
    } catch {
      checkedComplete(result);
    }
  }
  return { add, next };
}

class AsyncSession {
  constructor(_session) {
    this._session = _session;
  }
  static async create(orDefault) {
    if (orDefault) {
      return orDefault;
    }
    const inspector = await import("node:inspector");
    return new AsyncSession(new inspector.Session);
  }
  configureAndConnect(onPause, captureAll) {
    this._session.connect();
    this._session.on("Debugger.paused", (event) => {
      onPause(event, () => {
        this._session.post("Debugger.resume");
      });
    });
    this._session.post("Debugger.enable");
    this._session.post("Debugger.setPauseOnExceptions", { state: captureAll ? "all" : "uncaught" });
  }
  setPauseOnExceptions(captureAll) {
    this._session.post("Debugger.setPauseOnExceptions", { state: captureAll ? "all" : "uncaught" });
  }
  getLocalVariables(objectId, complete) {
    this._getProperties(objectId, (props) => {
      const { add, next } = createCallbackList(complete);
      for (const prop of props) {
        if (prop.value?.objectId && prop.value.className === "Array") {
          const id = prop.value.objectId;
          add((vars) => this._unrollArray(id, prop.name, vars, next));
        } else if (prop.value?.objectId && prop.value.className === "Object") {
          const id = prop.value.objectId;
          add((vars) => this._unrollObject(id, prop.name, vars, next));
        } else if (prop.value) {
          add((vars) => this._unrollOther(prop, vars, next));
        }
      }
      next({});
    });
  }
  _getProperties(objectId, next) {
    this._session.post("Runtime.getProperties", {
      objectId,
      ownProperties: true
    }, (err, params) => {
      if (err) {
        next([]);
      } else {
        next(params.result);
      }
    });
  }
  _unrollArray(objectId, name, vars, next) {
    this._getProperties(objectId, (props) => {
      vars[name] = props.filter((v) => v.name !== "length" && !isNaN(parseInt(v.name, 10))).sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10)).map((v) => v.value?.value);
      next(vars);
    });
  }
  _unrollObject(objectId, name, vars, next) {
    this._getProperties(objectId, (props) => {
      vars[name] = props.map((v) => [v.name, v.value?.value]).reduce((obj, [key, val]) => {
        obj[key] = val;
        return obj;
      }, {});
      next(vars);
    });
  }
  _unrollOther(prop, vars, next) {
    if (prop.value) {
      if ("value" in prop.value) {
        if (prop.value.value === undefined || prop.value.value === null) {
          vars[prop.name] = `<${prop.value.value}>`;
        } else {
          vars[prop.name] = prop.value.value;
        }
      } else if ("description" in prop.value && prop.value.type !== "function") {
        vars[prop.name] = `<${prop.value.description}>`;
      } else if (prop.value.type === "undefined") {
        vars[prop.name] = "<undefined>";
      }
    }
    next(vars);
  }
}
var INTEGRATION_NAME13 = "LocalVariables";
var _localVariablesSyncIntegration = (options = {}, sessionOverride) => {
  const cachedFrames = new LRUMap(20);
  let rateLimiter;
  let shouldProcessEvent = false;
  function addLocalVariablesToException(exception) {
    const hash = hashFrames(exception.stacktrace?.frames);
    if (hash === undefined) {
      return;
    }
    const cachedFrame = cachedFrames.remove(hash);
    if (cachedFrame === undefined) {
      return;
    }
    const frames = (exception.stacktrace?.frames || []).filter((frame) => frame.function !== "new Promise");
    for (let i = 0;i < frames.length; i++) {
      const frameIndex = frames.length - i - 1;
      const cachedFrameVariable = cachedFrame[i];
      const frameVariable = frames[frameIndex];
      if (!frameVariable || !cachedFrameVariable) {
        break;
      }
      if (cachedFrameVariable.vars === undefined || frameVariable.in_app === false && options.includeOutOfAppFrames !== true || !functionNamesMatch(frameVariable.function, cachedFrameVariable.function)) {
        continue;
      }
      frameVariable.vars = cachedFrameVariable.vars;
    }
  }
  function addLocalVariablesToEvent(event) {
    for (const exception of event.exception?.values || []) {
      addLocalVariablesToException(exception);
    }
    return event;
  }
  let setupPromise;
  async function setup() {
    const client = getClient();
    const clientOptions = client?.getOptions();
    if (!clientOptions?.includeLocalVariables) {
      return;
    }
    const unsupportedNodeVersion = NODE_MAJOR < 18;
    if (unsupportedNodeVersion) {
      debug.log("The `LocalVariables` integration is only supported on Node >= v18.");
      return;
    }
    if (await isDebuggerEnabled()) {
      debug.warn("Local variables capture has been disabled because the debugger was already enabled");
      return;
    }
    try {
      const session = await AsyncSession.create(sessionOverride);
      const handlePaused = (stackParser, { params: { reason, data, callFrames } }, complete) => {
        if (reason !== "exception" && reason !== "promiseRejection") {
          complete();
          return;
        }
        rateLimiter?.();
        const exceptionHash = hashFromStack(stackParser, data.description);
        if (exceptionHash == undefined) {
          complete();
          return;
        }
        const { add, next } = createCallbackList((frames) => {
          cachedFrames.set(exceptionHash, frames);
          complete();
        });
        for (let i = 0;i < Math.min(callFrames.length, 5); i++) {
          const { scopeChain, functionName, this: obj } = callFrames[i];
          const localScope = scopeChain.find((scope) => scope.type === "local");
          const fn = obj.className === "global" || !obj.className ? functionName : `${obj.className}.${functionName}`;
          if (localScope?.object.objectId === undefined) {
            add((frames) => {
              frames[i] = { function: fn };
              next(frames);
            });
          } else {
            const id = localScope.object.objectId;
            add((frames) => session.getLocalVariables(id, (vars) => {
              frames[i] = { function: fn, vars };
              next(frames);
            }));
          }
        }
        next([]);
      };
      const captureAll = options.captureAllExceptions !== false;
      session.configureAndConnect((ev, complete) => handlePaused(clientOptions.stackParser, ev, complete), captureAll);
      if (captureAll) {
        const max = options.maxExceptionsPerSecond || 50;
        rateLimiter = createRateLimiter(max, () => {
          debug.log("Local variables rate-limit lifted.");
          session.setPauseOnExceptions(true);
        }, (seconds) => {
          debug.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`);
          session.setPauseOnExceptions(false);
        });
      }
      shouldProcessEvent = true;
    } catch (error2) {
      debug.log("The `LocalVariables` integration failed to start.", error2);
    }
  }
  return {
    name: INTEGRATION_NAME13,
    setupOnce() {
      setupPromise = setup();
    },
    async processEvent(event) {
      await setupPromise;
      if (shouldProcessEvent) {
        return addLocalVariablesToEvent(event);
      }
      return event;
    },
    _getCachedFramesCount() {
      return cachedFrames.size;
    },
    _getFirstCachedFrame() {
      return cachedFrames.values()[0];
    }
  };
};
var localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration);

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/local-variables/index.js
var localVariablesIntegration = (options = {}) => {
  return NODE_VERSION.major < 19 ? localVariablesSyncIntegration(options) : localVariablesAsyncIntegration(options);
};

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/modules.js
import { existsSync, readFileSync } from "node:fs";
import { dirname as dirname2, join as join3 } from "node:path";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/detection.js
function isCjs() {
  try {
    return typeof module_detection !== "undefined" && typeof exports_detection !== "undefined";
  } catch {
    return false;
  }
}
var hasWarnedAboutNodeVersion;
function supportsEsmLoaderHooks() {
  if (isCjs()) {
    return false;
  }
  if (NODE_MAJOR >= 21 || NODE_MAJOR === 20 && NODE_MINOR >= 6 || NODE_MAJOR === 18 && NODE_MINOR >= 19) {
    return true;
  }
  if (!hasWarnedAboutNodeVersion) {
    hasWarnedAboutNodeVersion = true;
    consoleSandbox(() => {
      console.warn(`[Sentry] You are using Node.js v${process.versions.node} in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.`);
    });
  }
  return false;
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/modules.js
var moduleCache;
var INTEGRATION_NAME14 = "Modules";
var SERVER_MODULES = typeof __SENTRY_SERVER_MODULES__ === "undefined" ? {} : __SENTRY_SERVER_MODULES__;
var _modulesIntegration = () => {
  return {
    name: INTEGRATION_NAME14,
    processEvent(event) {
      event.modules = {
        ...event.modules,
        ..._getModules()
      };
      return event;
    },
    getModules: _getModules
  };
};
var modulesIntegration = _modulesIntegration;
function getRequireCachePaths() {
  try {
    return __require.cache ? Object.keys(__require.cache) : [];
  } catch {
    return [];
  }
}
function collectModules() {
  return {
    ...SERVER_MODULES,
    ...getModulesFromPackageJson(),
    ...isCjs() ? collectRequireModules() : {}
  };
}
function collectRequireModules() {
  const mainPaths = __require.main?.paths || [];
  const paths = getRequireCachePaths();
  const infos = {};
  const seen = new Set;
  paths.forEach((path) => {
    let dir = path;
    const updir = () => {
      const orig = dir;
      dir = dirname2(orig);
      if (!dir || orig === dir || seen.has(orig)) {
        return;
      }
      if (mainPaths.indexOf(dir) < 0) {
        return updir();
      }
      const pkgfile = join3(orig, "package.json");
      seen.add(orig);
      if (!existsSync(pkgfile)) {
        return updir();
      }
      try {
        const info = JSON.parse(readFileSync(pkgfile, "utf8"));
        infos[info.name] = info.version;
      } catch {}
    };
    updir();
  });
  return infos;
}
function _getModules() {
  if (!moduleCache) {
    moduleCache = collectModules();
  }
  return moduleCache;
}
function getPackageJson() {
  try {
    const filePath = join3(process.cwd(), "package.json");
    const packageJson = JSON.parse(readFileSync(filePath, "utf8"));
    return packageJson;
  } catch {
    return {};
  }
}
function getModulesFromPackageJson() {
  const packageJson = getPackageJson();
  return {
    ...packageJson.dependencies,
    ...packageJson.devDependencies
  };
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/node-fetch/index.js
var INTEGRATION_NAME15 = "NodeFetch";
var instrumentSentryNodeFetch = generateInstrumentOnce(`${INTEGRATION_NAME15}.sentry`, SentryNodeFetchInstrumentation, (options) => {
  return options;
});
var _nativeNodeFetchIntegration = (options = {}) => {
  return {
    name: "NodeFetch",
    setupOnce() {
      instrumentSentryNodeFetch(options);
    }
  };
};
var nativeNodeFetchIntegration = defineIntegration(_nativeNodeFetchIntegration);

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/onuncaughtexception.js
import { isMainThread } from "worker_threads";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/errorhandling.js
var DEFAULT_SHUTDOWN_TIMEOUT = 2000;
function logAndExitProcess(error2) {
  consoleSandbox(() => {
    console.error(error2);
  });
  const client = getClient();
  if (client === undefined) {
    DEBUG_BUILD2 && debug.warn("No NodeClient was defined, we are exiting the process now.");
    global.process.exit(1);
    return;
  }
  const options = client.getOptions();
  const timeout = options?.shutdownTimeout && options.shutdownTimeout > 0 ? options.shutdownTimeout : DEFAULT_SHUTDOWN_TIMEOUT;
  client.close(timeout).then((result) => {
    if (!result) {
      DEBUG_BUILD2 && debug.warn("We reached the timeout for emptying the request buffer, still exiting now!");
    }
    global.process.exit(1);
  }, (error3) => {
    DEBUG_BUILD2 && debug.error(error3);
  });
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/onuncaughtexception.js
var INTEGRATION_NAME16 = "OnUncaughtException";
var onUncaughtExceptionIntegration = defineIntegration((options = {}) => {
  const optionsWithDefaults = {
    exitEvenIfOtherHandlersAreRegistered: false,
    ...options
  };
  return {
    name: INTEGRATION_NAME16,
    setup(client) {
      if (!isMainThread) {
        return;
      }
      global.process.on("uncaughtException", makeErrorHandler(client, optionsWithDefaults));
    }
  };
});
function makeErrorHandler(client, options) {
  const timeout = 2000;
  let caughtFirstError = false;
  let caughtSecondError = false;
  let calledFatalError = false;
  let firstError;
  const clientOptions = client.getOptions();
  return Object.assign((error2) => {
    let onFatalError = logAndExitProcess;
    if (options.onFatalError) {
      onFatalError = options.onFatalError;
    } else if (clientOptions.onFatalError) {
      onFatalError = clientOptions.onFatalError;
    }
    const userProvidedListenersCount = global.process.listeners("uncaughtException").filter((listener) => {
      return listener.name !== "domainUncaughtExceptionClear" && listener.tag !== "sentry_tracingErrorCallback" && listener._errorHandler !== true;
    }).length;
    const processWouldExit = userProvidedListenersCount === 0;
    const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;
    if (!caughtFirstError) {
      firstError = error2;
      caughtFirstError = true;
      if (getClient() === client) {
        captureException(error2, {
          originalException: error2,
          captureContext: {
            level: "fatal"
          },
          mechanism: {
            handled: false,
            type: "auto.node.onuncaughtexception"
          }
        });
      }
      if (!calledFatalError && shouldApplyFatalHandlingLogic) {
        calledFatalError = true;
        onFatalError(error2);
      }
    } else {
      if (shouldApplyFatalHandlingLogic) {
        if (calledFatalError) {
          DEBUG_BUILD2 && debug.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown");
          logAndExitProcess(error2);
        } else if (!caughtSecondError) {
          caughtSecondError = true;
          setTimeout(() => {
            if (!calledFatalError) {
              calledFatalError = true;
              onFatalError(firstError, error2);
            }
          }, timeout);
        }
      }
    }
  }, { _errorHandler: true });
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/onunhandledrejection.js
var INTEGRATION_NAME17 = "OnUnhandledRejection";
var DEFAULT_IGNORES = [
  {
    name: "AI_NoOutputGeneratedError"
  },
  {
    name: "AbortError"
  }
];
var _onUnhandledRejectionIntegration = (options = {}) => {
  const opts = {
    mode: options.mode ?? "warn",
    ignore: [...DEFAULT_IGNORES, ...options.ignore ?? []]
  };
  return {
    name: INTEGRATION_NAME17,
    setup(client) {
      global.process.on("unhandledRejection", makeUnhandledPromiseHandler(client, opts));
    }
  };
};
var onUnhandledRejectionIntegration = defineIntegration(_onUnhandledRejectionIntegration);
function extractErrorInfo(reason) {
  if (typeof reason !== "object" || reason === null) {
    return { name: "", message: String(reason ?? "") };
  }
  const errorLike = reason;
  const name = typeof errorLike.name === "string" ? errorLike.name : "";
  const message = typeof errorLike.message === "string" ? errorLike.message : String(reason);
  return { name, message };
}
function isMatchingReason(matcher, errorInfo) {
  const nameMatches = matcher.name === undefined || isMatchingPattern(errorInfo.name, matcher.name, true);
  const messageMatches = matcher.message === undefined || isMatchingPattern(errorInfo.message, matcher.message);
  return nameMatches && messageMatches;
}
function matchesIgnore(list, reason) {
  const errorInfo = extractErrorInfo(reason);
  return list.some((matcher) => isMatchingReason(matcher, errorInfo));
}
function makeUnhandledPromiseHandler(client, options) {
  return function sendUnhandledPromise(reason, promise) {
    if (getClient() !== client) {
      return;
    }
    if (matchesIgnore(options.ignore ?? [], reason)) {
      return;
    }
    const level = options.mode === "strict" ? "fatal" : "error";
    const activeSpanForError = reason && typeof reason === "object" ? reason._sentry_active_span : undefined;
    const activeSpanWrapper = activeSpanForError ? (fn) => withActiveSpan(activeSpanForError, fn) : (fn) => fn();
    activeSpanWrapper(() => {
      captureException(reason, {
        originalException: promise,
        captureContext: {
          extra: { unhandledPromiseRejection: true },
          level
        },
        mechanism: {
          handled: false,
          type: "auto.node.onunhandledrejection"
        }
      });
    });
    handleRejection(reason, options.mode);
  };
}
function handleRejection(reason, mode) {
  const rejectionWarning = "This error originated either by " + "throwing inside of an async function without a catch block, " + "or by rejecting a promise which was not handled with .catch()." + " The promise rejected with the reason:";
  if (mode === "warn") {
    consoleSandbox(() => {
      console.warn(rejectionWarning);
      console.error(reason && typeof reason === "object" && "stack" in reason ? reason.stack : reason);
    });
  } else if (mode === "strict") {
    consoleSandbox(() => {
      console.warn(rejectionWarning);
    });
    logAndExitProcess(reason);
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/processSession.js
var INTEGRATION_NAME18 = "ProcessSession";
var processSessionIntegration = defineIntegration(() => {
  return {
    name: INTEGRATION_NAME18,
    setupOnce() {
      startSession();
      process.on("beforeExit", () => {
        const session = getIsolationScope().getSession();
        if (session?.status !== "ok") {
          endSession();
        }
      });
    }
  };
});

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/spotlight.js
import * as http from "node:http";
var INTEGRATION_NAME19 = "Spotlight";
var _spotlightIntegration = (options = {}) => {
  const _options = {
    sidecarUrl: options.sidecarUrl || "http://localhost:8969/stream"
  };
  return {
    name: INTEGRATION_NAME19,
    setup(client) {
      try {
        if (false) {}
      } catch {}
      connectToSpotlight(client, _options);
    }
  };
};
var spotlightIntegration = defineIntegration(_spotlightIntegration);
function connectToSpotlight(client, options) {
  const spotlightUrl = parseSidecarUrl(options.sidecarUrl);
  if (!spotlightUrl) {
    return;
  }
  let failedRequests = 0;
  client.on("beforeEnvelope", (envelope) => {
    if (failedRequests > 3) {
      debug.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");
      return;
    }
    const serializedEnvelope = serializeEnvelope(envelope);
    suppressTracing(() => {
      const req = http.request({
        method: "POST",
        path: spotlightUrl.pathname,
        hostname: spotlightUrl.hostname,
        port: spotlightUrl.port,
        headers: {
          "Content-Type": "application/x-sentry-envelope"
        }
      }, (res) => {
        if (res.statusCode && res.statusCode >= 200 && res.statusCode < 400) {
          failedRequests = 0;
        }
        res.on("data", () => {});
        res.on("end", () => {});
        res.setEncoding("utf8");
      });
      req.on("error", () => {
        failedRequests++;
        debug.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar");
      });
      req.write(serializedEnvelope);
      req.end();
    });
  });
}
function parseSidecarUrl(url) {
  try {
    return new URL(`${url}`);
  } catch {
    debug.warn(`[Spotlight] Invalid sidecar URL: ${url}`);
    return;
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/integrations/systemError.js
import * as util from "node:util";
var INTEGRATION_NAME20 = "NodeSystemError";
function isSystemError(error2) {
  if (!(error2 instanceof Error)) {
    return false;
  }
  if (!("errno" in error2) || typeof error2.errno !== "number") {
    return false;
  }
  return util.getSystemErrorMap().has(error2.errno);
}
var systemErrorIntegration = defineIntegration((options = {}) => {
  return {
    name: INTEGRATION_NAME20,
    processEvent: (event, hint, client) => {
      if (!isSystemError(hint.originalException)) {
        return event;
      }
      const error2 = hint.originalException;
      const errorContext = {
        ...error2
      };
      if (!client.getOptions().sendDefaultPii && options.includePaths !== true) {
        delete errorContext.path;
        delete errorContext.dest;
      }
      event.contexts = {
        ...event.contexts,
        node_system_error: errorContext
      };
      for (const exception of event.exception?.values || []) {
        if (exception.value) {
          if (error2.path && exception.value.includes(error2.path)) {
            exception.value = exception.value.replace(`'${error2.path}'`, "").trim();
          }
          if (error2.dest && exception.value.includes(error2.dest)) {
            exception.value = exception.value.replace(`'${error2.dest}'`, "").trim();
          }
        }
      }
      return event;
    }
  };
});

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/transports/http.js
import * as http3 from "node:http";
import * as https from "node:https";
import { Readable } from "node:stream";
import { createGzip } from "node:zlib";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/proxy/index.js
import * as net from "node:net";
import * as tls from "node:tls";

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/proxy/base.js
import * as http2 from "node:http";
var INTERNAL = Symbol("AgentBaseInternalState");

class Agent2 extends http2.Agent {
  constructor(opts) {
    super(opts);
    this[INTERNAL] = {};
  }
  isSecureEndpoint(options) {
    if (options) {
      if (typeof options.secureEndpoint === "boolean") {
        return options.secureEndpoint;
      }
      if (typeof options.protocol === "string") {
        return options.protocol === "https:";
      }
    }
    const { stack } = new Error;
    if (typeof stack !== "string")
      return false;
    return stack.split(`
`).some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
  }
  createSocket(req, options, cb) {
    const connectOpts = {
      ...options,
      secureEndpoint: this.isSecureEndpoint(options)
    };
    Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
      if (socket instanceof http2.Agent) {
        return socket.addRequest(req, connectOpts);
      }
      this[INTERNAL].currentSocket = socket;
      super.createSocket(req, options, cb);
    }, cb);
  }
  createConnection() {
    const socket = this[INTERNAL].currentSocket;
    this[INTERNAL].currentSocket = undefined;
    if (!socket) {
      throw new Error("No socket was returned in the `connect()` function");
    }
    return socket;
  }
  get defaultPort() {
    return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
  }
  set defaultPort(v) {
    if (this[INTERNAL]) {
      this[INTERNAL].defaultPort = v;
    }
  }
  get protocol() {
    return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
  }
  set protocol(v) {
    if (this[INTERNAL]) {
      this[INTERNAL].protocol = v;
    }
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/proxy/parse-proxy-response.js
function debugLog(...args) {
  debug.log("[https-proxy-agent:parse-proxy-response]", ...args);
}
function parseProxyResponse(socket) {
  return new Promise((resolve2, reject) => {
    let buffersLength = 0;
    const buffers = [];
    function read() {
      const b = socket.read();
      if (b)
        ondata(b);
      else
        socket.once("readable", read);
    }
    function cleanup() {
      socket.removeListener("end", onend);
      socket.removeListener("error", onerror);
      socket.removeListener("readable", read);
    }
    function onend() {
      cleanup();
      debugLog("onend");
      reject(new Error("Proxy connection ended before receiving CONNECT response"));
    }
    function onerror(err) {
      cleanup();
      debugLog("onerror %o", err);
      reject(err);
    }
    function ondata(b) {
      buffers.push(b);
      buffersLength += b.length;
      const buffered = Buffer.concat(buffers, buffersLength);
      const endOfHeaders = buffered.indexOf(`\r
\r
`);
      if (endOfHeaders === -1) {
        debugLog("have not received end of HTTP headers yet...");
        read();
        return;
      }
      const headerParts = buffered.subarray(0, endOfHeaders).toString("ascii").split(`\r
`);
      const firstLine = headerParts.shift();
      if (!firstLine) {
        socket.destroy();
        return reject(new Error("No header received from proxy CONNECT response"));
      }
      const firstLineParts = firstLine.split(" ");
      const statusCode = +(firstLineParts[1] || 0);
      const statusText = firstLineParts.slice(2).join(" ");
      const headers = {};
      for (const header of headerParts) {
        if (!header)
          continue;
        const firstColon = header.indexOf(":");
        if (firstColon === -1) {
          socket.destroy();
          return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
        }
        const key = header.slice(0, firstColon).toLowerCase();
        const value = header.slice(firstColon + 1).trimStart();
        const current = headers[key];
        if (typeof current === "string") {
          headers[key] = [current, value];
        } else if (Array.isArray(current)) {
          current.push(value);
        } else {
          headers[key] = value;
        }
      }
      debugLog("got proxy server response: %o %o", firstLine, headers);
      cleanup();
      resolve2({
        connect: {
          statusCode,
          statusText,
          headers
        },
        buffered
      });
    }
    socket.on("error", onerror);
    socket.on("end", onend);
    read();
  });
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/proxy/index.js
function debugLog2(...args) {
  debug.log("[https-proxy-agent]", ...args);
}

class HttpsProxyAgent extends Agent2 {
  static __initStatic() {
    this.protocols = ["http", "https"];
  }
  constructor(proxy, opts) {
    super(opts);
    this.options = {};
    this.proxy = typeof proxy === "string" ? new URL(proxy) : proxy;
    this.proxyHeaders = opts?.headers ?? {};
    debugLog2("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
    const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
    const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
    this.connectOpts = {
      ALPNProtocols: ["http/1.1"],
      ...opts ? omit(opts, "headers") : null,
      host,
      port
    };
  }
  async connect(req, opts) {
    const { proxy } = this;
    if (!opts.host) {
      throw new TypeError('No "host" provided');
    }
    let socket;
    if (proxy.protocol === "https:") {
      debugLog2("Creating `tls.Socket`: %o", this.connectOpts);
      const servername = this.connectOpts.servername || this.connectOpts.host;
      socket = tls.connect({
        ...this.connectOpts,
        servername: servername && net.isIP(servername) ? undefined : servername
      });
    } else {
      debugLog2("Creating `net.Socket`: %o", this.connectOpts);
      socket = net.connect(this.connectOpts);
    }
    const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
    const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
    let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r
`;
    if (proxy.username || proxy.password) {
      const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
      headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
    }
    headers.Host = `${host}:${opts.port}`;
    if (!headers["Proxy-Connection"]) {
      headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
    }
    for (const name of Object.keys(headers)) {
      payload += `${name}: ${headers[name]}\r
`;
    }
    const proxyResponsePromise = parseProxyResponse(socket);
    socket.write(`${payload}\r
`);
    const { connect: connect3, buffered } = await proxyResponsePromise;
    req.emit("proxyConnect", connect3);
    this.emit("proxyConnect", connect3, req);
    if (connect3.statusCode === 200) {
      req.once("socket", resume);
      if (opts.secureEndpoint) {
        debugLog2("Upgrading socket connection to TLS");
        const servername = opts.servername || opts.host;
        return tls.connect({
          ...omit(opts, "host", "path", "port"),
          socket,
          servername: net.isIP(servername) ? undefined : servername
        });
      }
      return socket;
    }
    socket.destroy();
    const fakeSocket = new net.Socket({ writable: false });
    fakeSocket.readable = true;
    req.once("socket", (s) => {
      debugLog2("Replaying proxy buffer for failed request");
      s.push(buffered);
      s.push(null);
    });
    return fakeSocket;
  }
}
HttpsProxyAgent.__initStatic();
function resume(socket) {
  socket.resume();
}
function omit(obj, ...keys) {
  const ret = {};
  let key;
  for (key in obj) {
    if (!keys.includes(key)) {
      ret[key] = obj[key];
    }
  }
  return ret;
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/transports/http.js
var GZIP_THRESHOLD = 1024 * 32;
function streamFromBody(body) {
  return new Readable({
    read() {
      this.push(body);
      this.push(null);
    }
  });
}
function makeNodeTransport(options) {
  let urlSegments;
  try {
    urlSegments = new URL(options.url);
  } catch (_e) {
    consoleSandbox(() => {
      console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.");
    });
    return createTransport(options, () => Promise.resolve({}));
  }
  const isHttps = urlSegments.protocol === "https:";
  const proxy = applyNoProxyOption(urlSegments, options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy);
  const nativeHttpModule = isHttps ? https : http3;
  const keepAlive = options.keepAlive === undefined ? false : options.keepAlive;
  const agent = proxy ? new HttpsProxyAgent(proxy) : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 });
  const requestExecutor = createRequestExecutor(options, options.httpModule ?? nativeHttpModule, agent);
  return createTransport(options, requestExecutor);
}
function applyNoProxyOption(transportUrlSegments, proxy) {
  const { no_proxy } = process.env;
  const urlIsExemptFromProxy = no_proxy?.split(",").some((exemption) => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption));
  if (urlIsExemptFromProxy) {
    return;
  } else {
    return proxy;
  }
}
function createRequestExecutor(options, httpModule, agent) {
  const { hostname, pathname, port, protocol, search } = new URL(options.url);
  return function makeRequest(request2) {
    return new Promise((resolve2, reject) => {
      suppressTracing(() => {
        let body = streamFromBody(request2.body);
        const headers = { ...options.headers };
        if (request2.body.length > GZIP_THRESHOLD) {
          headers["content-encoding"] = "gzip";
          body = body.pipe(createGzip());
        }
        const hostnameIsIPv6 = hostname.startsWith("[");
        const req = httpModule.request({
          method: "POST",
          agent,
          headers,
          hostname: hostnameIsIPv6 ? hostname.slice(1, -1) : hostname,
          path: `${pathname}${search}`,
          port,
          protocol,
          ca: options.caCerts
        }, (res) => {
          res.on("data", () => {});
          res.on("end", () => {});
          res.setEncoding("utf8");
          const retryAfterHeader = res.headers["retry-after"] ?? null;
          const rateLimitsHeader = res.headers["x-sentry-rate-limits"] ?? null;
          resolve2({
            statusCode: res.statusCode,
            headers: {
              "retry-after": retryAfterHeader,
              "x-sentry-rate-limits": Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] || null : rateLimitsHeader
            }
          });
        });
        req.on("error", reject);
        body.pipe(req);
      });
    });
  };
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/spotlight.js
function getSpotlightConfig(optionsSpotlight) {
  if (optionsSpotlight === false) {
    return false;
  }
  if (typeof optionsSpotlight === "string") {
    return optionsSpotlight;
  }
  const envBool = envToBool(process.env.SENTRY_SPOTLIGHT, { strict: true });
  const envUrl = envBool === null && process.env.SENTRY_SPOTLIGHT ? process.env.SENTRY_SPOTLIGHT : undefined;
  return optionsSpotlight === true ? envUrl ?? true : envBool ?? envUrl;
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/module.js
import { posix, sep } from "node:path";
function normalizeWindowsPath(path) {
  return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
}
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(), isWindows = sep === "\\") {
  const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
  return (filename) => {
    if (!filename) {
      return;
    }
    const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename;
    let { dir, base: file, ext } = posix.parse(normalizedFilename);
    if (ext === ".js" || ext === ".mjs" || ext === ".cjs") {
      file = file.slice(0, ext.length * -1);
    }
    const decodedFile = decodeURIComponent(file);
    if (!dir) {
      dir = ".";
    }
    const n = dir.lastIndexOf("/node_modules");
    if (n > -1) {
      return `${dir.slice(n + 14).replace(/\//g, ".")}:${decodedFile}`;
    }
    if (dir.startsWith(normalizedBase)) {
      const moduleName = dir.slice(normalizedBase.length + 1).replace(/\//g, ".");
      return moduleName ? `${moduleName}:${decodedFile}` : decodedFile;
    }
    return decodedFile;
  };
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/sdk/api.js
function getSentryRelease(fallback) {
  if (process.env.SENTRY_RELEASE) {
    return process.env.SENTRY_RELEASE;
  }
  if (GLOBAL_OBJ.SENTRY_RELEASE?.id) {
    return GLOBAL_OBJ.SENTRY_RELEASE.id;
  }
  const possibleReleaseNameOfGitProvider = process.env["GITHUB_SHA"] || process.env["CI_MERGE_REQUEST_SOURCE_BRANCH_SHA"] || process.env["CI_BUILD_REF"] || process.env["CI_COMMIT_SHA"] || process.env["BITBUCKET_COMMIT"];
  const possibleReleaseNameOfCiProvidersWithSpecificEnvVar = process.env["APPVEYOR_PULL_REQUEST_HEAD_COMMIT"] || process.env["APPVEYOR_REPO_COMMIT"] || process.env["CODEBUILD_RESOLVED_SOURCE_VERSION"] || process.env["AWS_COMMIT_ID"] || process.env["BUILD_SOURCEVERSION"] || process.env["GIT_CLONE_COMMIT_HASH"] || process.env["BUDDY_EXECUTION_REVISION"] || process.env["BUILDKITE_COMMIT"] || process.env["CIRCLE_SHA1"] || process.env["CIRRUS_CHANGE_IN_REPO"] || process.env["CF_REVISION"] || process.env["CM_COMMIT"] || process.env["CF_PAGES_COMMIT_SHA"] || process.env["DRONE_COMMIT_SHA"] || process.env["FC_GIT_COMMIT_SHA"] || process.env["HEROKU_TEST_RUN_COMMIT_VERSION"] || process.env["HEROKU_BUILD_COMMIT"] || process.env["HEROKU_SLUG_COMMIT"] || process.env["RAILWAY_GIT_COMMIT_SHA"] || process.env["RENDER_GIT_COMMIT"] || process.env["SEMAPHORE_GIT_SHA"] || process.env["TRAVIS_PULL_REQUEST_SHA"] || process.env["VERCEL_GIT_COMMIT_SHA"] || process.env["VERCEL_GITHUB_COMMIT_SHA"] || process.env["VERCEL_GITLAB_COMMIT_SHA"] || process.env["VERCEL_BITBUCKET_COMMIT_SHA"] || process.env["ZEIT_GITHUB_COMMIT_SHA"] || process.env["ZEIT_GITLAB_COMMIT_SHA"] || process.env["ZEIT_BITBUCKET_COMMIT_SHA"];
  const possibleReleaseNameOfCiProvidersWithGenericEnvVar = process.env["CI_COMMIT_ID"] || process.env["SOURCE_COMMIT"] || process.env["SOURCE_VERSION"] || process.env["GIT_COMMIT"] || process.env["COMMIT_REF"] || process.env["BUILD_VCS_NUMBER"] || process.env["CI_COMMIT_SHA"];
  return possibleReleaseNameOfGitProvider || possibleReleaseNameOfCiProvidersWithSpecificEnvVar || possibleReleaseNameOfCiProvidersWithGenericEnvVar || fallback;
}
var defaultStackParser = createStackParser(nodeStackLineParser(createGetModuleFromFilename()));

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/sdk/client.js
var import_api9 = __toESM(require_src(), 1);
var import_instrumentation4 = __toESM(require_src6(), 1);
import * as os2 from "node:os";
import { threadId, isMainThread as isMainThread2 } from "worker_threads";
var DEFAULT_CLIENT_REPORT_FLUSH_INTERVAL_MS = 60000;

class NodeClient extends ServerRuntimeClient {
  constructor(options) {
    const serverName = options.includeServerName === false ? undefined : options.serverName || global.process.env.SENTRY_NAME || os2.hostname();
    const clientOptions = {
      ...options,
      platform: "node",
      runtime: options.runtime || { name: "node", version: global.process.version },
      serverName
    };
    if (options.openTelemetryInstrumentations) {
      import_instrumentation4.registerInstrumentations({
        instrumentations: options.openTelemetryInstrumentations
      });
    }
    applySdkMetadata(clientOptions, "node");
    debug.log(`Initializing Sentry: process: ${process.pid}, thread: ${isMainThread2 ? "main" : `worker-${threadId}`}.`);
    super(clientOptions);
    if (this.getOptions().enableLogs) {
      this._logOnExitFlushListener = () => {
        _INTERNAL_flushLogsBuffer(this);
      };
      if (serverName) {
        this.on("beforeCaptureLog", (log3) => {
          log3.attributes = {
            ...log3.attributes,
            "server.address": serverName
          };
        });
      }
      process.on("beforeExit", this._logOnExitFlushListener);
    }
  }
  get tracer() {
    if (this._tracer) {
      return this._tracer;
    }
    const name = "@sentry/node";
    const version = SDK_VERSION;
    const tracer = import_api9.trace.getTracer(name, version);
    this._tracer = tracer;
    return tracer;
  }
  async flush(timeout) {
    await this.traceProvider?.forceFlush();
    if (this.getOptions().sendClientReports) {
      this._flushOutcomes();
    }
    return super.flush(timeout);
  }
  async close(timeout) {
    if (this._clientReportInterval) {
      clearInterval(this._clientReportInterval);
    }
    if (this._clientReportOnExitFlushListener) {
      process.off("beforeExit", this._clientReportOnExitFlushListener);
    }
    if (this._logOnExitFlushListener) {
      process.off("beforeExit", this._logOnExitFlushListener);
    }
    const allEventsSent = await super.close(timeout);
    if (this.traceProvider) {
      await this.traceProvider.shutdown();
    }
    return allEventsSent;
  }
  startClientReportTracking() {
    const clientOptions = this.getOptions();
    if (clientOptions.sendClientReports) {
      this._clientReportOnExitFlushListener = () => {
        this._flushOutcomes();
      };
      this._clientReportInterval = setInterval(() => {
        DEBUG_BUILD2 && debug.log("Flushing client reports based on interval.");
        this._flushOutcomes();
      }, clientOptions.clientReportFlushInterval ?? DEFAULT_CLIENT_REPORT_FLUSH_INTERVAL_MS).unref();
      process.on("beforeExit", this._clientReportOnExitFlushListener);
    }
  }
  _setupIntegrations() {
    _INTERNAL_clearAiProviderSkips();
    super._setupIntegrations();
  }
  _getTraceInfoFromScope(scope) {
    if (!scope) {
      return [undefined, undefined];
    }
    return getTraceContextForScope(this, scope);
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/sdk/esmLoader.js
var import_import_in_the_middle = __toESM(require_import_in_the_middle(), 1);
import * as moduleModule from "module";
function initializeEsmLoader() {
  if (!supportsEsmLoaderHooks()) {
    return;
  }
  if (!GLOBAL_OBJ._sentryEsmLoaderHookRegistered) {
    GLOBAL_OBJ._sentryEsmLoaderHookRegistered = true;
    try {
      const { addHookMessagePort } = import_import_in_the_middle.createAddHookMessageChannel();
      moduleModule.register("import-in-the-middle/hook.mjs", import.meta.url, {
        data: { addHookMessagePort, include: [] },
        transferList: [addHookMessagePort]
      });
    } catch (error2) {
      debug.warn("Failed to register 'import-in-the-middle' hook", error2);
    }
  }
}

// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/sdk/index.js
function getDefaultIntegrations() {
  return [
    inboundFiltersIntegration(),
    functionToStringIntegration(),
    linkedErrorsIntegration(),
    requestDataIntegration(),
    systemErrorIntegration(),
    conversationIdIntegration(),
    consoleIntegration(),
    httpIntegration(),
    nativeNodeFetchIntegration(),
    onUncaughtExceptionIntegration(),
    onUnhandledRejectionIntegration(),
    contextLinesIntegration(),
    localVariablesIntegration(),
    nodeContextIntegration(),
    childProcessIntegration(),
    processSessionIntegration(),
    modulesIntegration()
  ];
}
function init(options = {}) {
  return _init(options, getDefaultIntegrations);
}
function _init(_options = {}, getDefaultIntegrationsImpl) {
  const options = getClientOptions(_options, getDefaultIntegrationsImpl);
  if (options.debug === true) {
    if (DEBUG_BUILD2) {
      debug.enable();
    } else {
      consoleSandbox(() => {
        console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
      });
    }
  }
  if (options.registerEsmLoaderHooks !== false) {
    initializeEsmLoader();
  }
  setOpenTelemetryContextAsyncContextStrategy();
  const scope = getCurrentScope();
  scope.update(options.initialScope);
  if (options.spotlight && !options.integrations.some(({ name }) => name === INTEGRATION_NAME19)) {
    options.integrations.push(spotlightIntegration({
      sidecarUrl: typeof options.spotlight === "string" ? options.spotlight : undefined
    }));
  }
  applySdkMetadata(options, "node-core");
  const client = new NodeClient(options);
  getCurrentScope().setClient(client);
  client.init();
  debug.log(`SDK initialized from ${isCjs() ? "CommonJS" : "ESM"}`);
  client.startClientReportTracking();
  updateScopeFromEnvVariables();
  enhanceDscWithOpenTelemetryRootSpanName(client);
  setupEventContextTrace(client);
  if (process.env.VERCEL) {
    process.on("SIGTERM", async () => {
      await client.flush(200);
    });
  }
  return client;
}
function validateOpenTelemetrySetup() {
  if (!DEBUG_BUILD2) {
    return;
  }
  const setup = openTelemetrySetupCheck();
  const required = ["SentryContextManager", "SentryPropagator"];
  if (hasSpansEnabled()) {
    required.push("SentrySpanProcessor");
  }
  for (const k of required) {
    if (!setup.includes(k)) {
      debug.error(`You have to set up the ${k}. Without this, the OpenTelemetry & Sentry integration will not work properly.`);
    }
  }
  if (!setup.includes("SentrySampler")) {
    debug.warn("You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.");
  }
}
function getClientOptions(options, getDefaultIntegrationsImpl) {
  const release2 = getRelease(options.release);
  const spotlight = getSpotlightConfig(options.spotlight);
  const tracesSampleRate = getTracesSampleRate(options.tracesSampleRate);
  const mergedOptions = {
    ...options,
    dsn: options.dsn ?? process.env.SENTRY_DSN,
    environment: options.environment ?? process.env.SENTRY_ENVIRONMENT,
    sendClientReports: options.sendClientReports ?? true,
    transport: options.transport ?? makeNodeTransport,
    stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),
    release: release2,
    tracesSampleRate,
    spotlight,
    debug: envToBool(options.debug ?? process.env.SENTRY_DEBUG)
  };
  const integrations = options.integrations;
  const defaultIntegrations = options.defaultIntegrations ?? getDefaultIntegrationsImpl(mergedOptions);
  return {
    ...mergedOptions,
    integrations: getIntegrationsToSetup({
      defaultIntegrations,
      integrations
    })
  };
}
function getRelease(release2) {
  if (release2 !== undefined) {
    return release2;
  }
  const detectedRelease = getSentryRelease();
  if (detectedRelease !== undefined) {
    return detectedRelease;
  }
  return;
}
function getTracesSampleRate(tracesSampleRate) {
  if (tracesSampleRate !== undefined) {
    return tracesSampleRate;
  }
  const sampleRateFromEnv = process.env.SENTRY_TRACES_SAMPLE_RATE;
  if (!sampleRateFromEnv) {
    return;
  }
  const parsed = parseFloat(sampleRateFromEnv);
  return isFinite(parsed) ? parsed : undefined;
}
function updateScopeFromEnvVariables() {
  if (envToBool(process.env.SENTRY_USE_ENVIRONMENT) !== false) {
    const sentryTraceEnv = process.env.SENTRY_TRACE;
    const baggageEnv = process.env.SENTRY_BAGGAGE;
    const propagationContext = propagationContextFromHeaders(sentryTraceEnv, baggageEnv);
    getCurrentScope().setPropagationContext(propagationContext);
  }
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/addOriginToSpan.js
function addOriginToSpan(span, origin) {
  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
}
// ../../node_modules/.pnpm/@sentry+node-core@10.46.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_afd6e65d0ff47d9c5c158852db4908f1/node_modules/@sentry/node-core/build/esm/utils/getRequestUrl.js
function getRequestUrl(requestOptions) {
  const protocol = requestOptions.protocol || "";
  const hostname2 = requestOptions.hostname || requestOptions.host || "";
  const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname2) ? "" : `:${requestOptions.port}`;
  const path = requestOptions.path ? requestOptions.path : "/";
  return `${protocol}//${hostname2}${port}${path}`;
}
// ../../node_modules/.pnpm/@sentry+node@10.46.0/node_modules/@sentry/node/build/esm/integrations/http.js
var INTEGRATION_NAME21 = "Http";
var INSTRUMENTATION_NAME2 = "@opentelemetry_sentry-patched/instrumentation-http";
var FULLY_SUPPORTS_HTTP_DIAGNOSTICS_CHANNEL = NODE_VERSION.major === 22 && NODE_VERSION.minor >= 12 || NODE_VERSION.major === 23 && NODE_VERSION.minor >= 2 || NODE_VERSION.major >= 24;
var instrumentSentryHttp2 = generateInstrumentOnce(`${INTEGRATION_NAME21}.sentry`, (options) => {
  return new SentryHttpInstrumentation(options);
});
var instrumentOtelHttp = generateInstrumentOnce(INTEGRATION_NAME21, (config) => {
  const instrumentation = new import_instrumentation_http.HttpInstrumentation({
    ...config,
    disableIncomingRequestInstrumentation: true
  });
  try {
    instrumentation["_diag"] = import_api11.diag.createComponentLogger({
      namespace: INSTRUMENTATION_NAME2
    });
    instrumentation.instrumentationName = INSTRUMENTATION_NAME2;
  } catch {}
  try {
    const noopDescriptor = { get: () => false, set: () => {} };
    Object.defineProperty(instrumentation, "_httpPatched", noopDescriptor);
    Object.defineProperty(instrumentation, "_httpsPatched", noopDescriptor);
  } catch {}
  return instrumentation;
});
function _shouldUseOtelHttpInstrumentation(options, clientOptions = {}) {
  if (typeof options.spans === "boolean") {
    return options.spans;
  }
  if (clientOptions.skipOpenTelemetrySetup) {
    return false;
  }
  if (!hasSpansEnabled(clientOptions) && FULLY_SUPPORTS_HTTP_DIAGNOSTICS_CHANNEL) {
    return false;
  }
  return true;
}
var httpIntegration3 = defineIntegration((options = {}) => {
  const spans = options.spans ?? true;
  const disableIncomingRequestSpans = options.disableIncomingRequestSpans;
  const serverOptions = {
    sessions: options.trackIncomingRequestsAsSessions,
    sessionFlushingDelayMS: options.sessionFlushingDelayMS,
    ignoreRequestBody: options.ignoreIncomingRequestBody,
    maxRequestBodySize: options.maxIncomingRequestBodySize
  };
  const serverSpansOptions = {
    ignoreIncomingRequests: options.ignoreIncomingRequests,
    ignoreStaticAssets: options.ignoreStaticAssets,
    ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes,
    instrumentation: options.instrumentation,
    onSpanCreated: options.incomingRequestSpanHook
  };
  const server = httpServerIntegration(serverOptions);
  const serverSpans = httpServerSpansIntegration(serverSpansOptions);
  const enableServerSpans = spans && !disableIncomingRequestSpans;
  return {
    name: INTEGRATION_NAME21,
    setup(client) {
      const clientOptions = client.getOptions();
      if (enableServerSpans && hasSpansEnabled(clientOptions)) {
        serverSpans.setup(client);
      }
    },
    setupOnce() {
      const clientOptions = getClient()?.getOptions() || {};
      const useOtelHttpInstrumentation = _shouldUseOtelHttpInstrumentation(options, clientOptions);
      server.setupOnce();
      const sentryHttpInstrumentationOptions = {
        breadcrumbs: options.breadcrumbs,
        propagateTraceInOutgoingRequests: typeof options.tracePropagation === "boolean" ? options.tracePropagation : FULLY_SUPPORTS_HTTP_DIAGNOSTICS_CHANNEL || !useOtelHttpInstrumentation,
        createSpansForOutgoingRequests: FULLY_SUPPORTS_HTTP_DIAGNOSTICS_CHANNEL,
        spans: options.spans,
        ignoreOutgoingRequests: options.ignoreOutgoingRequests,
        outgoingRequestHook: (span, request2) => {
          const url = getRequestUrl(request2);
          if (url.startsWith("data:")) {
            const sanitizedUrl = stripDataUrlContent(url);
            span.setAttribute("http.url", sanitizedUrl);
            span.setAttribute(SEMANTIC_ATTRIBUTE_URL_FULL, sanitizedUrl);
            span.updateName(`${request2.method || "GET"} ${sanitizedUrl}`);
          }
          options.instrumentation?.requestHook?.(span, request2);
        },
        outgoingResponseHook: options.instrumentation?.responseHook,
        outgoingRequestApplyCustomAttributes: options.instrumentation?.applyCustomAttributesOnSpan
      };
      instrumentSentryHttp2(sentryHttpInstrumentationOptions);
      if (useOtelHttpInstrumentation) {
        const instrumentationConfig = getConfigWithDefaults(options);
        instrumentOtelHttp(instrumentationConfig);
      }
    },
    processEvent(event) {
      return serverSpans.processEvent(event);
    }
  };
});
function getConfigWithDefaults(options = {}) {
  const instrumentationConfig = {
    disableOutgoingRequestInstrumentation: FULLY_SUPPORTS_HTTP_DIAGNOSTICS_CHANNEL,
    ignoreOutgoingRequestHook: (request2) => {
      const url = getRequestUrl(request2);
      if (!url) {
        return false;
      }
      const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;
      if (_ignoreOutgoingRequests?.(url, request2)) {
        return true;
      }
      return false;
    },
    requireParentforOutgoingSpans: false,
    requestHook: (span, req) => {
      addOriginToSpan(span, "auto.http.otel.http");
      const url = getRequestUrl(req);
      if (url.startsWith("data:")) {
        const sanitizedUrl = stripDataUrlContent(url);
        span.setAttribute("http.url", sanitizedUrl);
        span.setAttribute(SEMANTIC_ATTRIBUTE_URL_FULL, sanitizedUrl);
        span.updateName(`${req.method || "GET"} ${sanitizedUrl}`);
      }
      options.instrumentation?.requestHook?.(span, req);
    },
    responseHook: (span, res) => {
      options.instrumentation?.responseHook?.(span, res);
    },
    applyCustomAttributesOnSpan: (span, request2, response) => {
      options.instrumentation?.applyCustomAttributesOnSpan?.(span, request2, response);
    }
  };
  return instrumentationConfig;
}

// ../../node_modules/.pnpm/@sentry+node@10.46.0/node_modules/@sentry/node/build/esm/integrations/node-fetch.js
var import_instrumentation_undici = __toESM(require_src12(), 1);
var INTEGRATION_NAME22 = "NodeFetch";
var instrumentOtelNodeFetch = generateInstrumentOnce(INTEGRATION_NAME22, import_instrumentation_undici.UndiciInstrumentation, (options) => {
  return _getConfigWithDefaults(options);
});
var instrumentSentryNodeFetch2 = generateInstrumentOnce(`${INTEGRATION_NAME22}.sentry`, SentryNodeFetchInstrumentation, (options) => {
  return options;
});
var _nativeNodeFetchIntegration2 = (options = {}) => {
  return {
    name: "NodeFetch",
    setupOnce() {
      const instrumentSpans = _shouldInstrumentSpans(options, getClient()?.getOptions());
      if (instrumentSpans) {
        instrumentOtelNodeFetch(options);
      }
      instrumentSentryNodeFetch2(options);
    }
  };
};
var nativeNodeFetchIntegration3 = defineIntegration(_nativeNodeFetchIntegration2);
function getAbsoluteUrl3(origin, path = "/") {
  const url = `${origin}`;
  if (url.endsWith("/") && path.startsWith("/")) {
    return `${url}${path.slice(1)}`;
  }
  if (!url.endsWith("/") && !path.startsWith("/")) {
    return `${url}/${path}`;
  }
  return `${url}${path}`;
}
function _shouldInstrumentSpans(options, clientOptions = {}) {
  return typeof options.spans === "boolean" ? options.spans : !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);
}
function _getConfigWithDefaults(options = {}) {
  const instrumentationConfig = {
    requireParentforSpans: false,
    ignoreRequestHook: (request2) => {
      const url = getAbsoluteUrl3(request2.origin, request2.path);
      const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;
      const shouldIgnore = _ignoreOutgoingRequests && url && _ignoreOutgoingRequests(url);
      return !!shouldIgnore;
    },
    startSpanHook: (request2) => {
      const url = getAbsoluteUrl3(request2.origin, request2.path);
      if (url.startsWith("data:")) {
        const sanitizedUrl = stripDataUrlContent(url);
        return {
          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.node_fetch",
          "http.url": sanitizedUrl,
          [SEMANTIC_ATTRIBUTE_URL_FULL]: sanitizedUrl,
          [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: `${request2.method || "GET"} ${sanitizedUrl}`
        };
      }
      return {
        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.node_fetch"
      };
    },
    requestHook: options.requestHook,
    responseHook: options.responseHook,
    headersToSpanAttributes: options.headersToSpanAttributes
  };
  return instrumentationConfig;
}

// ../../node_modules/.pnpm/@sentry+node@10.46.0/node_modules/@sentry/node/build/esm/debug-build.js
var DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;

// ../../node_modules/.pnpm/@sentry+node@10.46.0/node_modules/@sentry/node/build/esm/sdk/initOtel.js
var import_api12 = __toESM(require_src(), 1);
var import_resources = __toESM(require_src10(), 1);
var import_sdk_trace_base2 = __toESM(require_src11(), 1);
var import_semantic_conventions4 = __toESM(require_src2(), 1);
var MAX_MAX_SPAN_WAIT_DURATION = 1e6;
function initOpenTelemetry(client, options = {}) {
  if (client.getOptions().debug) {
    setupOpenTelemetryLogger();
  }
  const [provider, asyncLocalStorageLookup] = setupOtel(client, options);
  client.traceProvider = provider;
  client.asyncLocalStorageLookup = asyncLocalStorageLookup;
}
function setupOtel(client, options = {}) {
  const provider = new import_sdk_trace_base2.BasicTracerProvider({
    sampler: new SentrySampler(client),
    resource: import_resources.defaultResource().merge(import_resources.resourceFromAttributes({
      [import_semantic_conventions4.ATTR_SERVICE_NAME]: "node",
      [import_semantic_conventions4.SEMRESATTRS_SERVICE_NAMESPACE]: "sentry",
      [import_semantic_conventions4.ATTR_SERVICE_VERSION]: SDK_VERSION
    })),
    forceFlushTimeoutMillis: 500,
    spanProcessors: [
      new SentrySpanProcessor({
        timeout: _clampSpanProcessorTimeout(client.getOptions().maxSpanWaitDuration)
      }),
      ...options.spanProcessors || []
    ]
  });
  import_api12.trace.setGlobalTracerProvider(provider);
  import_api12.propagation.setGlobalPropagator(new SentryPropagator);
  const ctxManager = new SentryContextManager;
  import_api12.context.setGlobalContextManager(ctxManager);
  return [provider, ctxManager.getAsyncLocalStorageLookup()];
}
function _clampSpanProcessorTimeout(maxSpanWaitDuration) {
  if (maxSpanWaitDuration == null) {
    return;
  }
  if (maxSpanWaitDuration > MAX_MAX_SPAN_WAIT_DURATION) {
    DEBUG_BUILD4 && debug.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`);
    return MAX_MAX_SPAN_WAIT_DURATION;
  } else if (maxSpanWaitDuration <= 0 || Number.isNaN(maxSpanWaitDuration)) {
    DEBUG_BUILD4 && debug.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");
    return;
  }
  return maxSpanWaitDuration;
}

// ../../node_modules/.pnpm/@sentry+node@10.46.0/node_modules/@sentry/node/build/esm/sdk/index.js
function getDefaultIntegrationsWithoutPerformance() {
  const nodeCoreIntegrations = getDefaultIntegrations();
  return nodeCoreIntegrations.filter((integration) => integration.name !== "Http" && integration.name !== "NodeFetch").concat(httpIntegration3(), nativeNodeFetchIntegration3());
}
function _init2(options = {}, getDefaultIntegrationsImpl) {
  applySdkMetadata(options, "node");
  const client = init({
    ...options,
    defaultIntegrations: options.defaultIntegrations ?? getDefaultIntegrationsImpl(options)
  });
  if (client && !options.skipOpenTelemetrySetup) {
    initOpenTelemetry(client, {
      spanProcessors: options.openTelemetrySpanProcessors
    });
    validateOpenTelemetrySetup();
  }
  return client;
}
function initWithoutDefaultIntegrations2(options = {}) {
  return _init2(options, () => []);
}
// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/integration/aws.js
var import_instrumentation5 = __toESM(require_src6(), 1);
var import_instrumentation_aws_sdk = __toESM(require_src13(), 1);
var awsIntegration = defineIntegration(() => {
  return {
    name: "Aws",
    setupOnce() {
      import_instrumentation5.registerInstrumentations({
        instrumentations: [
          new import_instrumentation_aws_sdk.AwsInstrumentation({
            preRequestHook(span) {
              span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.otel.aws");
            }
          })
        ]
      });
    }
  };
});

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/utils.js
var import_api13 = __toESM(require_src(), 1);
var headerGetter = {
  keys(carrier) {
    return Object.keys(carrier);
  },
  get(carrier, key) {
    return carrier[key];
  }
};
function markEventUnhandled(scope, type) {
  scope.addEventProcessor((event) => {
    addExceptionMechanism(event, { handled: false, type });
    return event;
  });
  return scope;
}
function getAwsTraceData(event, context9) {
  const headers = event.headers || {};
  const traceData = {
    "sentry-trace": headers["sentry-trace"],
    baggage: headers.baggage
  };
  if (context9?.clientContext?.Custom) {
    const customContext = context9.clientContext.Custom;
    const sentryTrace = isString(customContext["sentry-trace"]) ? customContext["sentry-trace"] : undefined;
    if (sentryTrace) {
      traceData["sentry-trace"] = sentryTrace;
      traceData.baggage = isString(customContext.baggage) ? customContext.baggage : undefined;
    }
  }
  return traceData;
}
function eventContextExtractor(event, context$1) {
  const httpHeaders = {
    ...event.headers || {},
    ...getAwsTraceData(event, context$1)
  };
  return import_api13.propagation.extract(import_api13.context.active(), httpHeaders, headerGetter);
}

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/integration/instrumentation-aws-lambda/instrumentation.js
var import_api14 = __toESM(require_src(), 1);
var import_instrumentation6 = __toESM(require_src6(), 1);
var import_semantic_conventions5 = __toESM(require_src2(), 1);
import * as fs from "fs";
import * as path from "path";

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/integration/instrumentation-aws-lambda/semconv.js
var ATTR_FAAS_COLDSTART = "faas.coldstart";

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/sdk.js
import { performance as performance2 } from "perf_hooks";
import { types } from "util";

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/debug-build.js
var DEBUG_BUILD5 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/sdk.js
var { isPromise } = types;
function isPromiseAllSettledResult(result) {
  return result.every((v) => v != null && typeof v === "object" && Object.prototype.hasOwnProperty.call(v, "status") && (Object.prototype.hasOwnProperty.call(v, "value") || Object.prototype.hasOwnProperty.call(v, "reason")));
}
function getRejectedReasons(results) {
  return results.reduce((rejected, result) => {
    if (result.status === "rejected" && result.reason)
      rejected.push(result.reason);
    return rejected;
  }, []);
}
function tryGetRemainingTimeInMillis(context9) {
  return typeof context9.getRemainingTimeInMillis === "function" ? context9.getRemainingTimeInMillis() : 0;
}
function enhanceScopeWithEnvironmentData(scope, context9, startTime) {
  scope.setContext("aws.lambda", {
    aws_request_id: context9.awsRequestId,
    function_name: context9.functionName,
    function_version: context9.functionVersion,
    invoked_function_arn: context9.invokedFunctionArn,
    execution_duration_in_millis: performance2.now() - startTime,
    remaining_time_in_millis: tryGetRemainingTimeInMillis(context9),
    "sys.argv": process.argv
  });
  scope.setContext("aws.cloudwatch.logs", {
    log_group: context9.logGroupName,
    log_stream: context9.logStreamName,
    url: `https://console.aws.amazon.com/cloudwatch/home?region=${process.env.AWS_REGION}#logsV2:log-groups/log-group/${encodeURIComponent(context9.logGroupName)}/log-events/${encodeURIComponent(context9.logStreamName)}?filterPattern="${context9.awsRequestId}"`
  });
}
function setupTimeoutWarning(context9, options) {
  const configuredTimeout = Math.ceil(tryGetRemainingTimeInMillis(context9) / 1000);
  const configuredTimeoutMinutes = Math.floor(configuredTimeout / 60);
  const configuredTimeoutSeconds = configuredTimeout % 60;
  const humanReadableTimeout = configuredTimeoutMinutes > 0 ? `${configuredTimeoutMinutes}m${configuredTimeoutSeconds}s` : `${configuredTimeoutSeconds}s`;
  if (options.captureTimeoutWarning) {
    const timeoutWarningDelay = tryGetRemainingTimeInMillis(context9) - options.timeoutWarningLimit;
    return setTimeout(() => {
      withScope2((scope) => {
        scope.setTag("timeout", humanReadableTimeout);
        captureMessage(`Possible function timeout: ${context9.functionName}`, "warning");
      });
    }, timeoutWarningDelay);
  }
  return;
}
var AWS_HANDLER_HIGHWATERMARK_SYMBOL = Symbol.for("aws.lambda.runtime.handler.streaming.highWaterMark");
var AWS_HANDLER_STREAMING_SYMBOL = Symbol.for("aws.lambda.runtime.handler.streaming");
var AWS_HANDLER_STREAMING_RESPONSE = "response";
function isStreamingHandler(handler) {
  return handler[AWS_HANDLER_STREAMING_SYMBOL] === AWS_HANDLER_STREAMING_RESPONSE;
}
function wrapHandler(handler, wrapOptions = {}) {
  const START_TIME = performance2.now();
  if (typeof wrapOptions.startTrace !== "undefined") {
    consoleSandbox(() => {
      console.warn("The `startTrace` option is deprecated and will be removed in a future major version. If you want to disable tracing, set `SENTRY_TRACES_SAMPLE_RATE` to `0.0`.");
    });
  }
  const options = {
    flushTimeout: 2000,
    callbackWaitsForEmptyEventLoop: false,
    captureTimeoutWarning: true,
    timeoutWarningLimit: 500,
    captureAllSettledReasons: false,
    startTrace: true,
    ...wrapOptions
  };
  if (isStreamingHandler(handler)) {
    return wrapStreamingHandler(handler, options, START_TIME);
  }
  let timeoutWarningTimer;
  const asyncHandler = handler.length > 2 ? (event, context9) => new Promise((resolve2, reject) => {
    const rv = handler(event, context9, (error2, result) => {
      if (error2 === null || error2 === undefined) {
        resolve2(result);
      } else {
        reject(error2);
      }
    });
    if (isPromise(rv)) {
      rv.then(resolve2, reject);
    }
  }) : handler;
  return async (event, context9) => {
    context9.callbackWaitsForEmptyEventLoop = options.callbackWaitsForEmptyEventLoop;
    timeoutWarningTimer = setupTimeoutWarning(context9, options);
    async function processResult() {
      const scope = getCurrentScope();
      let rv;
      try {
        enhanceScopeWithEnvironmentData(scope, context9, START_TIME);
        rv = await asyncHandler(event, context9);
        if (options.captureAllSettledReasons && Array.isArray(rv) && isPromiseAllSettledResult(rv)) {
          const reasons = getRejectedReasons(rv);
          reasons.forEach((exception) => {
            captureException(exception, (scope2) => markEventUnhandled(scope2, "auto.function.aws_serverless.promise"));
          });
        }
      } catch (e) {
        captureException(e, (scope2) => markEventUnhandled(scope2, "auto.function.aws_serverless.handler"));
        throw e;
      } finally {
        clearTimeout(timeoutWarningTimer);
        await flush(options.flushTimeout).catch((e) => {
          DEBUG_BUILD5 && debug.error(e);
        });
      }
      return rv;
    }
    return withScope2(async () => {
      return processResult();
    });
  };
}
function wrapStreamingHandler(handler, options, startTime) {
  let timeoutWarningTimer;
  const wrappedHandler = async (event, responseStream, context9) => {
    context9.callbackWaitsForEmptyEventLoop = options.callbackWaitsForEmptyEventLoop;
    timeoutWarningTimer = setupTimeoutWarning(context9, options);
    async function processStreamingResult() {
      const scope = getCurrentScope();
      try {
        enhanceScopeWithEnvironmentData(scope, context9, startTime);
        responseStream.on("error", (error2) => {
          captureException(error2, (scope2) => markEventUnhandled(scope2, "auto.function.aws_serverless.stream"));
        });
        return await handler(event, responseStream, context9);
      } catch (e) {
        captureException(e, (scope2) => markEventUnhandled(scope2, "auto.function.aws_serverless.handler"));
        throw e;
      } finally {
        if (timeoutWarningTimer) {
          clearTimeout(timeoutWarningTimer);
        }
        await flush(options.flushTimeout).catch((e) => {
          DEBUG_BUILD5 && debug.error(e);
        });
      }
    }
    return withScope2(() => processStreamingResult());
  };
  const handlerWithSymbols = handler;
  wrappedHandler[AWS_HANDLER_STREAMING_SYMBOL] = handlerWithSymbols[AWS_HANDLER_STREAMING_SYMBOL];
  wrappedHandler[AWS_HANDLER_HIGHWATERMARK_SYMBOL] = handlerWithSymbols[AWS_HANDLER_HIGHWATERMARK_SYMBOL];
  return wrappedHandler;
}

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/integration/instrumentation-aws-lambda/instrumentation.js
var PACKAGE_VERSION = SDK_VERSION;
var PACKAGE_NAME = "@sentry/instrumentation-aws-lambda";
var headerGetter2 = {
  keys(carrier) {
    return Object.keys(carrier);
  },
  get(carrier, key) {
    return carrier[key];
  }
};
var lambdaMaxInitInMilliseconds = 1e4;
var AWS_HANDLER_STREAMING_SYMBOL2 = Symbol.for("aws.lambda.runtime.handler.streaming");
var AWS_HANDLER_HIGHWATERMARK_SYMBOL2 = Symbol.for("aws.lambda.runtime.handler.streaming.highWaterMark");
var AWS_HANDLER_STREAMING_RESPONSE2 = "response";

class AwsLambdaInstrumentation extends import_instrumentation6.InstrumentationBase {
  constructor(config = {}) {
    super(PACKAGE_NAME, PACKAGE_VERSION, config);
  }
  init() {
    const taskRoot = process.env.LAMBDA_TASK_ROOT;
    const handlerDef = this.getConfig().lambdaHandler ?? process.env._HANDLER;
    if (!taskRoot || !handlerDef) {
      this._diag.debug("Skipping lambda instrumentation: no _HANDLER/lambdaHandler or LAMBDA_TASK_ROOT.", {
        taskRoot,
        handlerDef
      });
      return [];
    }
    if (typeof globalThis.awslambda === "undefined") {
      globalThis.awslambda = {
        streamifyResponse: (handler2, options) => {
          handler2[AWS_HANDLER_STREAMING_SYMBOL2] = AWS_HANDLER_STREAMING_RESPONSE2;
          if (typeof options?.highWaterMark === "number") {
            handler2[AWS_HANDLER_HIGHWATERMARK_SYMBOL2] = parseInt(options.highWaterMark);
          }
          return handler2;
        }
      };
    }
    const handler = path.basename(handlerDef);
    const moduleRoot = handlerDef.substring(0, handlerDef.length - handler.length);
    const [module, functionName] = handler.split(".", 2);
    if (!module || !functionName) {
      this._diag.warn("Invalid handler definition", {
        handler,
        moduleRoot,
        module
      });
      return [];
    }
    let filename = path.resolve(taskRoot, moduleRoot, module);
    if (!filename.endsWith(".js")) {
      try {
        fs.statSync(`${filename}.js`);
        filename += ".js";
      } catch (e) {
        try {
          fs.statSync(`${filename}.mjs`);
          filename += ".mjs";
        } catch (e2) {
          try {
            fs.statSync(`${filename}.cjs`);
            filename += ".cjs";
          } catch (e3) {
            this._diag.warn("No handler file was able to resolved with one of the known extensions for the file", filename);
          }
        }
      }
    }
    import_api14.diag.debug("Instrumenting lambda handler", {
      taskRoot,
      handlerDef,
      handler,
      moduleRoot,
      module,
      filename,
      functionName
    });
    const lambdaStartTime = this.getConfig().lambdaStartTime || Date.now() - Math.floor(1000 * process.uptime());
    return [
      new import_instrumentation6.InstrumentationNodeModuleDefinition(filename, ["*"], undefined, undefined, [
        new import_instrumentation6.InstrumentationNodeModuleFile(module, ["*"], (moduleExports) => {
          if (import_instrumentation6.isWrapped(moduleExports[functionName])) {
            this._unwrap(moduleExports, functionName);
          }
          this._wrap(moduleExports, functionName, this._getHandler(lambdaStartTime));
          return moduleExports;
        }, (moduleExports) => {
          if (moduleExports == null)
            return;
          this._unwrap(moduleExports, functionName);
        })
      ])
    ];
  }
  _getHandler(handlerLoadStartTime) {
    return (original) => {
      if (this._isStreamingHandler(original)) {
        const patchedHandler = this._getPatchHandler(original, handlerLoadStartTime);
        patchedHandler[AWS_HANDLER_STREAMING_SYMBOL2] = original[AWS_HANDLER_STREAMING_SYMBOL2];
        patchedHandler[AWS_HANDLER_HIGHWATERMARK_SYMBOL2] = original[AWS_HANDLER_HIGHWATERMARK_SYMBOL2];
        return wrapHandler(patchedHandler);
      }
      return wrapHandler(this._getPatchHandler(original, handlerLoadStartTime));
    };
  }
  _getPatchHandler(original, lambdaStartTime) {
    import_api14.diag.debug("patch handler function");
    const plugin = this;
    let requestHandledBefore = false;
    let requestIsColdStart = true;
    function _onRequest() {
      if (requestHandledBefore) {
        requestIsColdStart = false;
      } else {
        if (process.env.AWS_LAMBDA_INITIALIZATION_TYPE === "provisioned-concurrency") {
          requestIsColdStart = false;
        } else {
          const passedTimeSinceHandlerLoad = Date.now() - lambdaStartTime;
          const proactiveInitialization = passedTimeSinceHandlerLoad > lambdaMaxInitInMilliseconds;
          requestIsColdStart = !proactiveInitialization;
        }
        requestHandledBefore = true;
      }
    }
    if (this._isStreamingHandler(original)) {
      return function patchedStreamingHandler(event, responseStream, context$1) {
        _onRequest();
        const parent = plugin._determineParent(event, context$1);
        const span = plugin._createSpanForRequest(event, context$1, requestIsColdStart, parent);
        plugin._applyRequestHook(span, event, context$1);
        return import_api14.context.with(import_api14.trace.setSpan(parent, span), () => {
          const maybePromise = import_instrumentation6.safeExecuteInTheMiddle(() => original.apply(this, [event, responseStream, context$1]), (error2) => {
            if (error2 != null) {
              plugin._applyResponseHook(span, error2);
              plugin._endSpan(span, error2, () => {});
            }
          });
          return plugin._handlePromiseResult(span, maybePromise);
        });
      };
    }
    return function patchedHandler(event, context$1, callback) {
      _onRequest();
      const parent = plugin._determineParent(event, context$1);
      const span = plugin._createSpanForRequest(event, context$1, requestIsColdStart, parent);
      plugin._applyRequestHook(span, event, context$1);
      return import_api14.context.with(import_api14.trace.setSpan(parent, span), () => {
        const wrappedCallback = plugin._wrapCallback(callback, span);
        const maybePromise = import_instrumentation6.safeExecuteInTheMiddle(() => original.apply(this, [event, context$1, wrappedCallback]), (error2) => {
          if (error2 != null) {
            plugin._applyResponseHook(span, error2);
            plugin._endSpan(span, error2, () => {});
          }
        });
        return plugin._handlePromiseResult(span, maybePromise);
      });
    };
  }
  _createSpanForRequest(event, context10, requestIsColdStart, parent) {
    const name = context10.functionName;
    return this.tracer.startSpan(name, {
      kind: import_api14.SpanKind.SERVER,
      attributes: {
        [import_semantic_conventions5.SEMATTRS_FAAS_EXECUTION]: context10.awsRequestId,
        [import_semantic_conventions5.SEMRESATTRS_FAAS_ID]: context10.invokedFunctionArn,
        [import_semantic_conventions5.SEMRESATTRS_CLOUD_ACCOUNT_ID]: AwsLambdaInstrumentation._extractAccountId(context10.invokedFunctionArn),
        [ATTR_FAAS_COLDSTART]: requestIsColdStart,
        ...AwsLambdaInstrumentation._extractOtherEventFields(event)
      }
    }, parent);
  }
  _applyRequestHook(span, event, context10) {
    const { requestHook } = this.getConfig();
    if (requestHook) {
      import_instrumentation6.safeExecuteInTheMiddle(() => requestHook(span, { event, context: context10 }), (e) => {
        if (e)
          import_api14.diag.error("aws-lambda instrumentation: requestHook error", e);
      }, true);
    }
  }
  _handlePromiseResult(span, maybePromise) {
    if (typeof maybePromise?.then === "function") {
      return maybePromise.then((value) => {
        this._applyResponseHook(span, null, value);
        return new Promise((resolve3) => this._endSpan(span, undefined, () => resolve3(value)));
      }, (err) => {
        this._applyResponseHook(span, err);
        return new Promise((resolve3, reject) => this._endSpan(span, err, () => reject(err)));
      });
    }
    this._applyResponseHook(span, null, maybePromise);
    this._endSpan(span, undefined, () => {});
    return maybePromise;
  }
  _determineParent(event, context10) {
    const config = this.getConfig();
    return AwsLambdaInstrumentation._determineParent(event, context10, config.eventContextExtractor || AwsLambdaInstrumentation._defaultEventContextExtractor);
  }
  _isStreamingHandler(handler) {
    return handler[AWS_HANDLER_STREAMING_SYMBOL2] === AWS_HANDLER_STREAMING_RESPONSE2;
  }
  setTracerProvider(tracerProvider) {
    super.setTracerProvider(tracerProvider);
    this._traceForceFlusher = this._traceForceFlush(tracerProvider);
  }
  _traceForceFlush(tracerProvider) {
    if (!tracerProvider)
      return;
    let currentProvider = tracerProvider;
    if (typeof currentProvider.getDelegate === "function") {
      currentProvider = currentProvider.getDelegate();
    }
    if (typeof currentProvider.forceFlush === "function") {
      return currentProvider.forceFlush.bind(currentProvider);
    }
    return;
  }
  setMeterProvider(meterProvider) {
    super.setMeterProvider(meterProvider);
    this._metricForceFlusher = this._metricForceFlush(meterProvider);
  }
  _metricForceFlush(meterProvider) {
    if (!meterProvider)
      return;
    const currentProvider = meterProvider;
    if (typeof currentProvider.forceFlush === "function") {
      return currentProvider.forceFlush.bind(currentProvider);
    }
    return;
  }
  _wrapCallback(original, span) {
    const plugin = this;
    return function wrappedCallback(err, res) {
      import_api14.diag.debug("executing wrapped lookup callback function");
      plugin._applyResponseHook(span, err, res);
      plugin._endSpan(span, err, () => {
        import_api14.diag.debug("executing original lookup callback function");
        return original.apply(this, [err, res]);
      });
    };
  }
  _endSpan(span, err, callback) {
    if (err) {
      span.recordException(err);
    }
    let errMessage;
    if (typeof err === "string") {
      errMessage = err;
    } else if (err) {
      errMessage = err.message;
    }
    if (errMessage) {
      span.setStatus({
        code: import_api14.SpanStatusCode.ERROR,
        message: errMessage
      });
    }
    span.end();
    const flushers = [];
    if (this._traceForceFlusher) {
      flushers.push(this._traceForceFlusher());
    } else {
      import_api14.diag.debug("Spans may not be exported for the lambda function because we are not force flushing before callback.");
    }
    if (this._metricForceFlusher) {
      flushers.push(this._metricForceFlusher());
    } else {
      import_api14.diag.debug("Metrics may not be exported for the lambda function because we are not force flushing before callback.");
    }
    Promise.all(flushers).then(callback, callback);
  }
  _applyResponseHook(span, err, res) {
    const { responseHook } = this.getConfig();
    if (responseHook) {
      import_instrumentation6.safeExecuteInTheMiddle(() => responseHook(span, { err, res }), (e) => {
        if (e)
          import_api14.diag.error("aws-lambda instrumentation: responseHook error", e);
      }, true);
    }
  }
  static _extractAccountId(arn) {
    const parts = arn.split(":");
    if (parts.length >= 5) {
      return parts[4];
    }
    return;
  }
  static _defaultEventContextExtractor(event) {
    const httpHeaders = event.headers || {};
    return import_api14.propagation.extract(import_api14.context.active(), httpHeaders, headerGetter2);
  }
  static _extractOtherEventFields(event) {
    const answer = {};
    const fullUrl = this._extractFullUrl(event);
    if (fullUrl) {
      answer[import_semantic_conventions5.ATTR_URL_FULL] = fullUrl;
    }
    return answer;
  }
  static _extractFullUrl(event) {
    if (!event.headers) {
      return;
    }
    function findAny(event2, key1, key2) {
      return event2.headers[key1] ?? event2.headers[key2];
    }
    const host = findAny(event, "host", "Host");
    const proto = findAny(event, "x-forwarded-proto", "X-Forwarded-Proto");
    const port = findAny(event, "x-forwarded-port", "X-Forwarded-Port");
    if (!(proto && host && (event.path || event.rawPath))) {
      return;
    }
    let answer = `${proto}://${host}`;
    if (port) {
      answer += `:${port}`;
    }
    answer += event.path ?? event.rawPath;
    if (event.queryStringParameters) {
      let first = true;
      for (const key in event.queryStringParameters) {
        answer += first ? "?" : "&";
        answer += encodeURIComponent(key);
        answer += "=";
        answer += encodeURIComponent(event.queryStringParameters[key]);
        first = false;
      }
    }
    return answer;
  }
  static _determineParent(event, context10, eventContextExtractor2) {
    const extractedContext = import_instrumentation6.safeExecuteInTheMiddle(() => eventContextExtractor2(event, context10), (e) => {
      if (e)
        import_api14.diag.error("aws-lambda instrumentation: eventContextExtractor error", e);
    }, true);
    if (import_api14.trace.getSpan(extractedContext)?.spanContext()) {
      return extractedContext;
    }
    return import_api14.ROOT_CONTEXT;
  }
}

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/integration/awslambda.js
var instrumentAwsLambda = generateInstrumentOnce("AwsLambda", AwsLambdaInstrumentation, (options) => {
  return {
    disableAwsContextPropagation: true,
    ...options,
    eventContextExtractor,
    requestHook(span) {
      span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.otel.aws_lambda");
      span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, "function.aws.lambda");
    },
    responseHook(_span, { err }) {
      if (err) {
        captureException(err, (scope) => markEventUnhandled(scope, "auto.function.aws_serverless.otel"));
      }
    }
  };
});
var _awsLambdaIntegration = (options = {}) => {
  return {
    name: "AwsLambda",
    setupOnce() {
      instrumentAwsLambda(options);
    }
  };
};
var awsLambdaIntegration = defineIntegration(_awsLambdaIntegration);

// ../../node_modules/.pnpm/@sentry+aws-serverless@10.46.0_@opentelemetry+context-async-hooks@2.6.1_@opentelemetry+_9744832ab4c637fff75f4f5d092df5f0/node_modules/@sentry/aws-serverless/build/npm/esm/init.js
function shouldDisableLayerExtensionForProxy() {
  const { http_proxy, no_proxy } = process.env;
  if (!http_proxy) {
    return false;
  }
  if (no_proxy) {
    const exemptions = no_proxy.split(",").map((exemption) => exemption.trim().toLowerCase());
    const localhostExemptions = ["*", "localhost", "127.0.0.1", "::1"];
    if (exemptions.some((exemption) => localhostExemptions.includes(exemption))) {
      return false;
    }
  }
  if (http_proxy) {
    DEBUG_BUILD5 && debug.log("Disabling useLayerExtension due to http_proxy environment variable. Consider adding localhost to no_proxy to re-enable.");
    return true;
  }
  return false;
}
function getDefaultIntegrations3(_options) {
  return [...getDefaultIntegrationsWithoutPerformance(), awsIntegration(), awsLambdaIntegration()];
}
function init3(options = {}) {
  const sdkSource = getSDKSource();
  const proxyWouldInterfere = shouldDisableLayerExtensionForProxy();
  const useLayerExtensionFromEnv = envToBool(process.env.SENTRY_LAYER_EXTENSION, { strict: true });
  const defaultUseLayerExtension = sdkSource === "aws-lambda-layer" && !options.tunnel && !proxyWouldInterfere;
  const useLayerExtension = options.useLayerExtension ?? useLayerExtensionFromEnv ?? defaultUseLayerExtension;
  const opts = {
    defaultIntegrations: getDefaultIntegrations3(),
    useLayerExtension,
    ...options
  };
  if (opts.useLayerExtension) {
    if (sdkSource !== "aws-lambda-layer") {
      DEBUG_BUILD5 && debug.warn("The Sentry Lambda extension is only supported when using the AWS Lambda layer.");
    } else if (opts.tunnel || proxyWouldInterfere) {
      if (opts.tunnel) {
        DEBUG_BUILD5 && debug.warn(`Using a custom tunnel with the Sentry Lambda extension is not supported. Events will be tunnelled to ${opts.tunnel} and not through the extension.`);
      }
      if (proxyWouldInterfere) {
        DEBUG_BUILD5 && debug.warn("Sentry Lambda extension is disabled due to proxy environment variables (http_proxy/https_proxy). Consider adding localhost to no_proxy to re-enable.");
      }
    } else {
      DEBUG_BUILD5 && debug.log("Proxying Sentry events through the Sentry Lambda extension");
      opts.tunnel = "http://localhost:9000/envelope";
    }
  }
  applySdkMetadata(opts, "aws-serverless", ["aws-serverless", "node"], sdkSource);
  return initWithoutDefaultIntegrations2(opts);
}
// ../../node_modules/.pnpm/@sentry+profiling-node@10.46.0/node_modules/@sentry/profiling-node/build/esm/index.js
var import_node_cpu_profiler = __toESM(require_lib(), 1);
import * as os3 from "os";
import { env, versions } from "process";
import { isMainThread as isMainThread3, threadId as threadId2 } from "worker_threads";
var DEBUG_BUILD6 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
var NODE_VERSION2 = parseSemver(process.versions.node);
var NODE_MAJOR2 = NODE_VERSION2.major;
var PROFILER_THREAD_ID_STRING = String(threadId2);
var PROFILER_THREAD_NAME = isMainThread3 ? "main" : "worker";
var FORMAT_VERSION = "1";
var CONTINUOUS_FORMAT_VERSION = "2";
var PLATFORM = os3.platform();
var RELEASE = os3.release();
var VERSION = os3.version();
var TYPE = os3.type();
var MODEL = os3.machine();
var ARCH = os3.arch();
function isRawThreadCpuProfile(profile) {
  return !("thread_metadata" in profile);
}
function enrichWithThreadInformation(profile) {
  if (!isRawThreadCpuProfile(profile)) {
    return profile;
  }
  return {
    samples: profile.samples,
    frames: profile.frames,
    stacks: profile.stacks,
    thread_metadata: {
      [PROFILER_THREAD_ID_STRING]: {
        name: PROFILER_THREAD_NAME
      }
    }
  };
}
function createProfilingEvent(client, profile, event) {
  if (!isValidProfile(profile)) {
    return null;
  }
  return createProfilePayload(client, profile, {
    release: event.release ?? "",
    environment: event.environment ?? "",
    event_id: event.event_id ?? "",
    transaction: event.transaction ?? "",
    start_timestamp: event.start_timestamp ? event.start_timestamp * 1000 : Date.now(),
    trace_id: event.contexts?.trace?.trace_id ?? "",
    profile_id: profile.profile_id
  });
}
function createProfilePayload(client, cpuProfile, {
  release: release3,
  environment,
  event_id,
  transaction,
  start_timestamp,
  trace_id,
  profile_id
}) {
  if (trace_id?.length !== 32) {
    DEBUG_BUILD6 && debug.log(`[Profiling] Invalid traceId: ${trace_id} on profiled event`);
  }
  const enrichedThreadProfile = enrichWithThreadInformation(cpuProfile);
  const profile = {
    event_id: profile_id,
    timestamp: new Date(start_timestamp).toISOString(),
    platform: "node",
    version: FORMAT_VERSION,
    release: release3,
    environment,
    measurements: cpuProfile.measurements,
    runtime: {
      name: "node",
      version: versions.node || ""
    },
    os: {
      name: PLATFORM,
      version: RELEASE,
      build_number: VERSION
    },
    device: {
      locale: env["LC_ALL"] || env["LC_MESSAGES"] || env["LANG"] || env["LANGUAGE"] || "",
      model: MODEL,
      manufacturer: TYPE,
      architecture: ARCH,
      is_emulator: false
    },
    debug_meta: {
      images: applyDebugMetadata(client, cpuProfile.resources)
    },
    profile: enrichedThreadProfile,
    transaction: {
      name: transaction,
      id: event_id,
      trace_id: trace_id || "",
      active_thread_id: PROFILER_THREAD_ID_STRING
    }
  };
  return profile;
}
function createProfileChunkPayload(client, cpuProfile, {
  release: release3,
  environment,
  trace_id,
  profiler_id,
  chunk_id,
  sdk
}) {
  if (trace_id?.length !== 32) {
    DEBUG_BUILD6 && debug.log(`[Profiling] Invalid traceId: ${trace_id} on profiled event`);
  }
  const enrichedThreadProfile = enrichWithThreadInformation(cpuProfile);
  const profile = {
    chunk_id,
    client_sdk: {
      name: sdk?.name ?? "sentry.javascript.node",
      version: sdk?.version ?? "0.0.0"
    },
    profiler_id,
    platform: "node",
    version: CONTINUOUS_FORMAT_VERSION,
    release: release3,
    environment,
    measurements: cpuProfile.measurements,
    debug_meta: {
      images: applyDebugMetadata(client, cpuProfile.resources)
    },
    profile: enrichedThreadProfile
  };
  return profile;
}
function createProfilingChunkEvent(client, options, profile, sdk, identifiers) {
  if (!isValidProfileChunk(profile)) {
    return null;
  }
  return createProfileChunkPayload(client, profile, {
    release: options.release ?? "",
    environment: options.environment ?? "",
    trace_id: identifiers.trace_id ?? "",
    chunk_id: identifiers.chunk_id,
    profiler_id: identifiers.profiler_id,
    sdk
  });
}
function isValidSampleRate(rate) {
  if (typeof rate !== "number" && typeof rate !== "boolean" || typeof rate === "number" && isNaN(rate)) {
    DEBUG_BUILD6 && debug.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(rate)} of type ${JSON.stringify(typeof rate)}.`);
    return false;
  }
  if (rate === true || rate === false) {
    return true;
  }
  if (rate < 0 || rate > 1) {
    DEBUG_BUILD6 && debug.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${rate}.`);
    return false;
  }
  return true;
}
function isValidProfile(profile) {
  if (profile.samples.length <= 1) {
    DEBUG_BUILD6 && debug.log("[Profiling] Discarding profile because it contains less than 2 samples");
    return false;
  }
  if (!profile.profile_id) {
    return false;
  }
  return true;
}
function isValidProfileChunk(profile) {
  if (profile.samples.length <= 1) {
    DEBUG_BUILD6 && debug.log("[Profiling] Discarding profile chunk because it contains less than 2 samples");
    return false;
  }
  return true;
}
function addProfilesToEnvelope(envelope, profiles) {
  if (!profiles.length) {
    return envelope;
  }
  for (const profile of profiles) {
    envelope[1].push([{ type: "profile" }, profile]);
  }
  return envelope;
}
function findProfiledTransactionsFromEnvelope(envelope) {
  const events = [];
  forEachEnvelopeItem(envelope, (item, type2) => {
    if (type2 !== "transaction") {
      return;
    }
    for (let j = 1;j < item.length; j++) {
      const event = item[j];
      if (!event) {
        continue;
      }
      const profile_id = event.contexts?.profile?.profile_id;
      if (event && profile_id) {
        events.push(event);
      }
    }
  });
  return events;
}
function createEventEnvelopeHeaders2(sdkInfo, tunnel, dsn) {
  return {
    event_id: uuid4(),
    sent_at: new Date().toISOString(),
    ...sdkInfo && { sdk: sdkInfo },
    ...!!tunnel && dsn && { dsn: dsnToString(dsn) }
  };
}
function makeProfileChunkEnvelope(platform3, chunk, sdkInfo, tunnel, dsn) {
  const profileChunkHeader = {
    type: "profile_chunk",
    platform: platform3
  };
  return createEnvelope(createEventEnvelopeHeaders2(sdkInfo, tunnel, dsn), [
    [profileChunkHeader, chunk]
  ]);
}
function applyDebugMetadata(client, resource_paths) {
  const options = client.getOptions();
  if (!options?.stackParser) {
    return [];
  }
  return getDebugImagesForResources(options.stackParser, resource_paths);
}
var MAX_PROFILE_DURATION_MS = 30 * 1000;
function maybeProfileSpan(client, span, customSamplingContext) {
  if (!spanIsSampled(span)) {
    return;
  }
  if (!client) {
    DEBUG_BUILD6 && debug.log("[Profiling] Profiling disabled, no client found.");
    return;
  }
  const options = client.getOptions();
  if (!options) {
    DEBUG_BUILD6 && debug.log("[Profiling] Profiling disabled, no options found.");
    return;
  }
  const profilesSampler = options.profilesSampler;
  let profilesSampleRate = options.profilesSampleRate;
  if (typeof profilesSampler === "function") {
    const { description: spanName = "<unknown>", data } = spanToJSON(span);
    const parentSampled = true;
    profilesSampleRate = profilesSampler({
      name: spanName,
      attributes: data,
      parentSampled,
      ...customSamplingContext
    });
  }
  if (!isValidSampleRate(profilesSampleRate)) {
    DEBUG_BUILD6 && debug.warn("[Profiling] Discarding profile because of invalid sample rate.");
    return;
  }
  if (!profilesSampleRate) {
    DEBUG_BUILD6 && debug.log(`[Profiling] Discarding profile because ${typeof profilesSampler === "function" ? "profileSampler returned 0 or false" : "a negative sampling decision was inherited or profileSampleRate is set to 0"}`);
    return;
  }
  const sampled = profilesSampleRate === true ? true : Math.random() < profilesSampleRate;
  if (!sampled) {
    DEBUG_BUILD6 && debug.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(profilesSampleRate)})`);
    return;
  }
  const profile_id = uuid4();
  import_node_cpu_profiler.CpuProfilerBindings.startProfiling(profile_id);
  DEBUG_BUILD6 && debug.log(`[Profiling] started profiling transaction: ${spanToJSON(span).description}`);
  return profile_id;
}
function stopSpanProfile(span, profile_id) {
  if (!profile_id) {
    return null;
  }
  const profile = import_node_cpu_profiler.CpuProfilerBindings.stopProfiling(profile_id, 0);
  DEBUG_BUILD6 && debug.log(`[Profiling] stopped profiling of transaction: ${spanToJSON(span).description}`);
  if (!profile) {
    DEBUG_BUILD6 && debug.log(`[Profiling] profiler returned null profile for: ${spanToJSON(span).description}`, "this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");
    return null;
  }
  profile.profile_id = profile_id;
  return profile;
}
var CHUNK_INTERVAL_MS = 1000 * 60;
var PROFILE_MAP = new LRUMap(50);
var PROFILE_TIMEOUTS = {};
function addToProfileQueue(profile_id, profile) {
  PROFILE_MAP.set(profile_id, profile);
}
function takeFromProfileQueue(profile_id) {
  const profile = PROFILE_MAP.get(profile_id);
  PROFILE_MAP.remove(profile_id);
  return profile;
}

class ContinuousProfiler {
  constructor() {
    ContinuousProfiler.prototype.__init.call(this);
    ContinuousProfiler.prototype.__init2.call(this);
    ContinuousProfiler.prototype.__init3.call(this);
    ContinuousProfiler.prototype.__init4.call(this);
    ContinuousProfiler.prototype.__init5.call(this);
    ContinuousProfiler.prototype.__init6.call(this);
    ContinuousProfiler.prototype.__init7.call(this);
  }
  __init() {
    this._client = undefined;
  }
  __init2() {
    this._chunkData = undefined;
  }
  __init3() {
    this._mode = undefined;
  }
  __init4() {
    this._legacyProfilerMode = undefined;
  }
  __init5() {
    this._profileLifecycle = undefined;
  }
  __init6() {
    this._sampled = undefined;
  }
  __init7() {
    this._sessionSamplingRate = undefined;
  }
  initialize(client) {
    this._client = client;
    const options = client.getOptions();
    this._mode = getProfilingMode(options);
    this._sessionSamplingRate = Math.random();
    this._sampled = this._sessionSamplingRate < (options.profileSessionSampleRate ?? 0);
    this._profileLifecycle = options.profileLifecycle ?? "manual";
    switch (this._mode) {
      case "legacy": {
        this._legacyProfilerMode = "profilesSampleRate" in options || "profilesSampler" in options ? "span" : "continuous";
        DEBUG_BUILD6 && debug.log(`[Profiling] Profiling mode is ${this._legacyProfilerMode}.`);
        switch (this._legacyProfilerMode) {
          case "span": {
            this._setupAutomaticSpanProfiling();
            break;
          }
          case "continuous": {
            break;
          }
          default: {
            DEBUG_BUILD6 && debug.warn(`[Profiling] Unknown profiler mode: ${this._legacyProfilerMode}, profiler was not initialized`);
            break;
          }
        }
        break;
      }
      case "current": {
        this._setupSpanChunkInstrumentation();
        DEBUG_BUILD6 && debug.log(`[Profiling] Profiling mode is ${this._profileLifecycle}.`);
        switch (this._profileLifecycle) {
          case "trace": {
            this._startTraceLifecycleProfiling();
            break;
          }
          case "manual": {
            break;
          }
          default: {
            DEBUG_BUILD6 && debug.warn(`[Profiling] Unknown profiler mode: ${this._profileLifecycle}, profiler was not initialized`);
            break;
          }
        }
        break;
      }
      default: {
        DEBUG_BUILD6 && debug.warn(`[Profiling] Unknown profiler mode: ${this._mode}, profiler was not initialized`);
        break;
      }
    }
    this._client.on("beforeSendEvent", this._onBeforeSendThreadContextAssignment.bind(this));
  }
  start() {
    if (this._mode === "current") {
      this._startProfiler();
      return;
    }
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Failed to start, sentry client was never attached to the profiler.");
      return;
    }
    if (this._mode !== "legacy") {
      DEBUG_BUILD6 && debug.log("[Profiling] Continuous profiling is not supported in the current mode.");
      return;
    }
    if (this._legacyProfilerMode === "span") {
      DEBUG_BUILD6 && debug.log("[Profiling] Calls to profiler.start() are not supported in span profiling mode.");
      return;
    }
    this._stopChunkProfiling();
    this._setupSpanChunkInstrumentation();
    this._restartChunkProfiling();
  }
  stop() {
    if (this._mode === "current") {
      this._stopProfiler();
      return;
    }
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Failed to stop, sentry client was never attached to the profiler.");
      return;
    }
    if (this._mode !== "legacy") {
      DEBUG_BUILD6 && debug.log("[Profiling] Continuous profiling is not supported in the current mode.");
      return;
    }
    if (this._legacyProfilerMode === "span") {
      DEBUG_BUILD6 && debug.log("[Profiling] Calls to profiler.stop() are not supported in span profiling mode.");
      return;
    }
    this._stopChunkProfiling();
    this._teardownSpanChunkInstrumentation();
  }
  _startProfiler() {
    if (this._mode !== "current") {
      DEBUG_BUILD6 && debug.log("[Profiling] Continuous profiling is not supported in the current mode.");
      return;
    }
    if (this._chunkData !== undefined) {
      DEBUG_BUILD6 && debug.log("[Profiling] Profile session already running, no-op.");
      return;
    }
    if (this._mode === "current") {
      if (!this._sampled) {
        DEBUG_BUILD6 && debug.log("[Profiling] Profile session not sampled, no-op.");
        return;
      }
    }
    if (this._profileLifecycle === "trace") {
      DEBUG_BUILD6 && debug.log("[Profiling] You are using the trace profile lifecycle, manual calls to profiler.startProfiler() and profiler.stopProfiler() will be ignored.");
      return;
    }
    this._startChunkProfiling();
  }
  _stopProfiler() {
    if (this._mode !== "current") {
      DEBUG_BUILD6 && debug.log("[Profiling] Continuous profiling is not supported in the current mode.");
      return;
    }
    if (this._profileLifecycle === "trace") {
      DEBUG_BUILD6 && debug.log("[Profiling] You are using the trace profile lifecycle, manual calls to profiler.startProfiler() and profiler.stopProfiler() will be ignored.");
      return;
    }
    if (!this._chunkData) {
      DEBUG_BUILD6 && debug.log("[Profiling] No profile session running, no-op.");
      return;
    }
    this._stopChunkProfiling();
  }
  _startTraceLifecycleProfiling() {
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Failed to start trace lifecycle profiling, sentry client was never attached to the profiler.");
      return;
    }
    let activeSpanCounter = 0;
    this._client.on("spanStart", (_span) => {
      if (activeSpanCounter === 0) {
        this._startChunkProfiling();
      }
      activeSpanCounter++;
    });
    this._client.on("spanEnd", (_span) => {
      if (activeSpanCounter === 1) {
        this._stopChunkProfiling();
      }
      activeSpanCounter--;
    });
  }
  _setupAutomaticSpanProfiling() {
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Failed to setup automatic span profiling, sentry client was never attached to the profiler.");
      return;
    }
    const spanToProfileIdMap = new WeakMap;
    this._client.on("spanStart", (span) => {
      if (span !== getRootSpan(span)) {
        return;
      }
      const profile_id = maybeProfileSpan(this._client, span);
      if (profile_id) {
        const options = this._client.getOptions();
        const maxProfileDurationMs = options._experiments?.maxProfileDurationMs || MAX_PROFILE_DURATION_MS;
        if (PROFILE_TIMEOUTS[profile_id]) {
          global.clearTimeout(PROFILE_TIMEOUTS[profile_id]);
          delete PROFILE_TIMEOUTS[profile_id];
        }
        const timeout = global.setTimeout(() => {
          DEBUG_BUILD6 && debug.log("[Profiling] max profile duration elapsed, stopping profiling for:", spanToJSON(span).description);
          const profile = stopSpanProfile(span, profile_id);
          if (profile) {
            addToProfileQueue(profile_id, profile);
          }
        }, maxProfileDurationMs);
        timeout.unref();
        getIsolationScope().setContext("profile", { profile_id });
        spanToProfileIdMap.set(span, profile_id);
      }
    });
    this._client.on("spanEnd", (span) => {
      const profile_id = spanToProfileIdMap.get(span);
      if (profile_id) {
        if (PROFILE_TIMEOUTS[profile_id]) {
          global.clearTimeout(PROFILE_TIMEOUTS[profile_id]);
          delete PROFILE_TIMEOUTS[profile_id];
        }
        const profile = stopSpanProfile(span, profile_id);
        if (profile) {
          addToProfileQueue(profile_id, profile);
        }
      }
    });
    this._client.on("beforeEnvelope", (envelope) => {
      if (!PROFILE_MAP.size) {
        return;
      }
      const profiledTransactionEvents = findProfiledTransactionsFromEnvelope(envelope);
      if (!profiledTransactionEvents.length) {
        return;
      }
      const profilesToAddToEnvelope = [];
      for (const profiledTransaction of profiledTransactionEvents) {
        const profileContext = profiledTransaction.contexts?.profile;
        const profile_id = profileContext?.profile_id;
        if (!profile_id) {
          throw new TypeError("[Profiling] cannot find profile for a transaction without a profile context");
        }
        if (profileContext) {
          delete profiledTransaction.contexts?.profile;
        }
        const cpuProfile = takeFromProfileQueue(profile_id);
        if (!cpuProfile) {
          DEBUG_BUILD6 && debug.log(`[Profiling] Could not retrieve profile for transaction: ${profile_id}`);
          continue;
        }
        const profile = createProfilingEvent(this._client, cpuProfile, profiledTransaction);
        if (!profile)
          return;
        profilesToAddToEnvelope.push(profile);
        this._client.emit("preprocessEvent", profile, {
          event_id: profiledTransaction.event_id
        });
        this._client.emit("postprocessEvent", profile, {
          event_id: profiledTransaction.event_id
        });
      }
      addProfilesToEnvelope(envelope, profilesToAddToEnvelope);
    });
  }
  _restartChunkProfiling() {
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Profiler was never attached to the client.");
      return;
    }
    if (this._chunkData) {
      DEBUG_BUILD6 && debug.log(`[Profiling] Chunk with chunk_id ${this._chunkData.id} is still running, current chunk will be stopped a new chunk will be started.`);
      this._stopChunkProfiling();
    }
    this._startChunkProfiling();
  }
  _stopChunkProfiling() {
    if (!this._chunkData) {
      DEBUG_BUILD6 && debug.log("[Profiling] No chunk data found, no-op.");
      return;
    }
    if (this._chunkData?.timer) {
      global.clearTimeout(this._chunkData.timer);
      this._chunkData.timer = undefined;
      DEBUG_BUILD6 && debug.log(`[Profiling] Stopping profiling chunk: ${this._chunkData.id}`);
    }
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Failed to collect profile, sentry client was never attached to the profiler.");
      this._resetChunkData();
      return;
    }
    if (!this._chunkData?.id) {
      DEBUG_BUILD6 && debug.log(`[Profiling] Failed to collect profile for: ${this._chunkData?.id}, the chunk_id is missing.`);
      this._resetChunkData();
      return;
    }
    const profile = import_node_cpu_profiler.CpuProfilerBindings.stopProfiling(this._chunkData.id, import_node_cpu_profiler.ProfileFormat.CHUNK);
    if (!profile) {
      DEBUG_BUILD6 && debug.log(`[Profiling] Failed to collect profile for: ${this._chunkData.id}`);
      this._resetChunkData();
      return;
    }
    if (!this._profilerId) {
      DEBUG_BUILD6 && debug.log("[Profiling] Profile chunk does not contain a valid profiler_id, this is a bug in the SDK");
      this._resetChunkData();
      return;
    }
    if (profile) {
      DEBUG_BUILD6 && debug.log(`[Profiling] Sending profile chunk ${this._chunkData.id}.`);
    }
    DEBUG_BUILD6 && debug.log(`[Profiling] Profile chunk ${this._chunkData.id} sent to Sentry.`);
    const chunk = createProfilingChunkEvent(this._client, this._client.getOptions(), profile, this._client.getSdkMetadata()?.sdk, {
      chunk_id: this._chunkData.id,
      trace_id: this._chunkData.startTraceID,
      profiler_id: this._profilerId
    });
    if (!chunk) {
      DEBUG_BUILD6 && debug.log(`[Profiling] Failed to create profile chunk for: ${this._chunkData.id}`);
      this._resetChunkData();
      return;
    }
    this._flush(chunk);
    this._resetChunkData();
  }
  _flush(chunk) {
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Failed to collect profile, sentry client was never attached to the profiler.");
      return;
    }
    const transport = this._client.getTransport();
    if (!transport) {
      DEBUG_BUILD6 && debug.log("[Profiling] No transport available to send profile chunk.");
      return;
    }
    const dsn = this._client.getDsn();
    const metadata = this._client.getSdkMetadata();
    const tunnel = this._client.getOptions().tunnel;
    const envelope = makeProfileChunkEnvelope("node", chunk, metadata?.sdk, tunnel, dsn);
    transport.send(envelope).then(null, (reason) => {
      DEBUG_BUILD6 && debug.error("Error while sending profile chunk envelope:", reason);
    });
  }
  _startChunkProfiling() {
    if (this._chunkData) {
      DEBUG_BUILD6 && debug.log("[Profiling] Chunk is already running, no-op.");
      return;
    }
    const traceId = getCurrentScope().getPropagationContext().traceId || getIsolationScope().getPropagationContext().traceId;
    const chunk = this._initializeChunk(traceId);
    import_node_cpu_profiler.CpuProfilerBindings.startProfiling(chunk.id);
    DEBUG_BUILD6 && debug.log(`[Profiling] starting profiling chunk: ${chunk.id}`);
    chunk.timer = global.setTimeout(() => {
      DEBUG_BUILD6 && debug.log(`[Profiling] Stopping profiling chunk: ${chunk.id}`);
      this._stopChunkProfiling();
      DEBUG_BUILD6 && debug.log("[Profiling] Starting new profiling chunk.");
      setImmediate(this._restartChunkProfiling.bind(this));
    }, CHUNK_INTERVAL_MS);
    chunk.timer.unref();
  }
  _setupSpanChunkInstrumentation() {
    if (!this._client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Failed to initialize span profiling, sentry client was never attached to the profiler.");
      return;
    }
    this._profilerId = uuid4();
    getGlobalScope().setContext("profile", {
      profiler_id: this._profilerId
    });
  }
  _onBeforeSendThreadContextAssignment(event) {
    if (!this._client || !this._profilerId)
      return;
    this._assignThreadIdContext(event);
  }
  _teardownSpanChunkInstrumentation() {
    this._profilerId = undefined;
    const globalScope = getGlobalScope();
    globalScope.setContext("profile", {});
  }
  _initializeChunk(traceId) {
    this._chunkData = {
      id: uuid4(),
      startTraceID: traceId,
      timer: undefined
    };
    return this._chunkData;
  }
  _assignThreadIdContext(event) {
    if (!event?.contexts?.profile) {
      return;
    }
    if (!event.contexts) {
      return;
    }
    event.contexts.trace = {
      ...event.contexts?.trace ?? {},
      data: {
        ...event.contexts?.trace?.data ?? {},
        ["thread.id"]: PROFILER_THREAD_ID_STRING,
        ["thread.name"]: PROFILER_THREAD_NAME
      }
    };
  }
  _resetChunkData() {
    this._chunkData = undefined;
  }
}
var _nodeProfilingIntegration = () => {
  if (![16, 18, 20, 22, 24].includes(NODE_MAJOR2)) {
    consoleSandbox(() => {
      console.warn(`[Sentry Profiling] You are using a Node.js version that does not have prebuilt binaries (${NODE_MAJOR2}).`, "The @sentry/profiling-node package only has prebuilt support for the following LTS versions of Node.js: 16, 18, 20, 22, 24.", "To use the @sentry/profiling-node package with this version of Node.js, you will need to compile the native addon from source.", "See: https://github.com/getsentry/sentry-javascript/tree/develop/packages/profiling-node#building-the-package-from-source");
    });
  }
  return {
    name: "ProfilingIntegration",
    _profiler: new ContinuousProfiler,
    setup(client) {
      DEBUG_BUILD6 && debug.log("[Profiling] Profiling integration setup.");
      this._profiler.initialize(client);
      return;
    }
  };
};
function getProfilingMode(options) {
  if ("profilesSampleRate" in options || "profilesSampler" in options) {
    return "legacy";
  }
  if ("profileSessionSampleRate" in options || "profileLifecycle" in options) {
    return "current";
  }
  return "legacy";
}
var nodeProfilingIntegration = defineIntegration(_nodeProfilingIntegration);

// src/lib/sentry.ts
init3({
  dsn: process.env.SENTRY_DSN,
  sendDefaultPii: true,
  tracesSampleRate: 1,
  includeLocalVariables: true,
  enableLogs: true,
  integrations: [nodeProfilingIntegration()],
  profilesSampleRate: 1
});

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/entity.js
var entityKind = Symbol.for("drizzle:entityKind");
var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
function is(value, type2) {
  if (!value || typeof value !== "object") {
    return false;
  }
  if (value instanceof type2) {
    return true;
  }
  if (!Object.prototype.hasOwnProperty.call(type2, entityKind)) {
    throw new Error(`Class "${type2.name ?? "<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);
  }
  let cls = Object.getPrototypeOf(value).constructor;
  if (cls) {
    while (cls) {
      if (entityKind in cls && cls[entityKind] === type2[entityKind]) {
        return true;
      }
      cls = Object.getPrototypeOf(cls);
    }
  }
  return false;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/column.js
class Column {
  constructor(table, config) {
    this.table = table;
    this.config = config;
    this.name = config.name;
    this.keyAsName = config.keyAsName;
    this.notNull = config.notNull;
    this.default = config.default;
    this.defaultFn = config.defaultFn;
    this.onUpdateFn = config.onUpdateFn;
    this.hasDefault = config.hasDefault;
    this.primary = config.primaryKey;
    this.isUnique = config.isUnique;
    this.uniqueName = config.uniqueName;
    this.uniqueType = config.uniqueType;
    this.dataType = config.dataType;
    this.columnType = config.columnType;
    this.generated = config.generated;
    this.generatedIdentity = config.generatedIdentity;
  }
  static [entityKind] = "Column";
  name;
  keyAsName;
  primary;
  notNull;
  default;
  defaultFn;
  onUpdateFn;
  hasDefault;
  isUnique;
  uniqueName;
  uniqueType;
  dataType;
  columnType;
  enumValues = undefined;
  generated = undefined;
  generatedIdentity = undefined;
  config;
  mapFromDriverValue(value) {
    return value;
  }
  mapToDriverValue(value) {
    return value;
  }
  shouldDisableInsert() {
    return this.config.generated !== undefined && this.config.generated.type !== "byDefault";
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/column-builder.js
class ColumnBuilder {
  static [entityKind] = "ColumnBuilder";
  config;
  constructor(name, dataType, columnType) {
    this.config = {
      name,
      keyAsName: name === "",
      notNull: false,
      default: undefined,
      hasDefault: false,
      primaryKey: false,
      isUnique: false,
      uniqueName: undefined,
      uniqueType: undefined,
      dataType,
      columnType,
      generated: undefined
    };
  }
  $type() {
    return this;
  }
  notNull() {
    this.config.notNull = true;
    return this;
  }
  default(value) {
    this.config.default = value;
    this.config.hasDefault = true;
    return this;
  }
  $defaultFn(fn) {
    this.config.defaultFn = fn;
    this.config.hasDefault = true;
    return this;
  }
  $default = this.$defaultFn;
  $onUpdateFn(fn) {
    this.config.onUpdateFn = fn;
    this.config.hasDefault = true;
    return this;
  }
  $onUpdate = this.$onUpdateFn;
  primaryKey() {
    this.config.primaryKey = true;
    this.config.notNull = true;
    return this;
  }
  setName(name) {
    if (this.config.name !== "")
      return;
    this.config.name = name;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/table.utils.js
var TableName = Symbol.for("drizzle:Name");

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/foreign-keys.js
class ForeignKeyBuilder {
  static [entityKind] = "PgForeignKeyBuilder";
  reference;
  _onUpdate = "no action";
  _onDelete = "no action";
  constructor(config, actions) {
    this.reference = () => {
      const { name, columns, foreignColumns } = config();
      return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns };
    };
    if (actions) {
      this._onUpdate = actions.onUpdate;
      this._onDelete = actions.onDelete;
    }
  }
  onUpdate(action) {
    this._onUpdate = action === undefined ? "no action" : action;
    return this;
  }
  onDelete(action) {
    this._onDelete = action === undefined ? "no action" : action;
    return this;
  }
  build(table) {
    return new ForeignKey(table, this);
  }
}

class ForeignKey {
  constructor(table, builder) {
    this.table = table;
    this.reference = builder.reference;
    this.onUpdate = builder._onUpdate;
    this.onDelete = builder._onDelete;
  }
  static [entityKind] = "PgForeignKey";
  reference;
  onUpdate;
  onDelete;
  getName() {
    const { name, columns, foreignColumns } = this.reference();
    const columnNames = columns.map((column) => column.name);
    const foreignColumnNames = foreignColumns.map((column) => column.name);
    const chunks = [
      this.table[TableName],
      ...columnNames,
      foreignColumns[0].table[TableName],
      ...foreignColumnNames
    ];
    return name ?? `${chunks.join("_")}_fk`;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/tracing-utils.js
function iife(fn, ...args) {
  return fn(...args);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/unique-constraint.js
function uniqueKeyName(table, columns) {
  return `${table[TableName]}_${columns.join("_")}_unique`;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/utils/array.js
function parsePgArrayValue(arrayString, startFrom, inQuotes) {
  for (let i = startFrom;i < arrayString.length; i++) {
    const char = arrayString[i];
    if (char === "\\") {
      i++;
      continue;
    }
    if (char === '"') {
      return [arrayString.slice(startFrom, i).replace(/\\/g, ""), i + 1];
    }
    if (inQuotes) {
      continue;
    }
    if (char === "," || char === "}") {
      return [arrayString.slice(startFrom, i).replace(/\\/g, ""), i];
    }
  }
  return [arrayString.slice(startFrom).replace(/\\/g, ""), arrayString.length];
}
function parsePgNestedArray(arrayString, startFrom = 0) {
  const result = [];
  let i = startFrom;
  let lastCharIsComma = false;
  while (i < arrayString.length) {
    const char = arrayString[i];
    if (char === ",") {
      if (lastCharIsComma || i === startFrom) {
        result.push("");
      }
      lastCharIsComma = true;
      i++;
      continue;
    }
    lastCharIsComma = false;
    if (char === "\\") {
      i += 2;
      continue;
    }
    if (char === '"') {
      const [value2, startFrom2] = parsePgArrayValue(arrayString, i + 1, true);
      result.push(value2);
      i = startFrom2;
      continue;
    }
    if (char === "}") {
      return [result, i + 1];
    }
    if (char === "{") {
      const [value2, startFrom2] = parsePgNestedArray(arrayString, i + 1);
      result.push(value2);
      i = startFrom2;
      continue;
    }
    const [value, newStartFrom] = parsePgArrayValue(arrayString, i, false);
    result.push(value);
    i = newStartFrom;
  }
  return [result, i];
}
function parsePgArray(arrayString) {
  const [result] = parsePgNestedArray(arrayString, 1);
  return result;
}
function makePgArray(array) {
  return `{${array.map((item) => {
    if (Array.isArray(item)) {
      return makePgArray(item);
    }
    if (typeof item === "string") {
      return `"${item.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
    }
    return `${item}`;
  }).join(",")}}`;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/common.js
class PgColumnBuilder extends ColumnBuilder {
  foreignKeyConfigs = [];
  static [entityKind] = "PgColumnBuilder";
  array(size) {
    return new PgArrayBuilder(this.config.name, this, size);
  }
  references(ref, actions = {}) {
    this.foreignKeyConfigs.push({ ref, actions });
    return this;
  }
  unique(name, config) {
    this.config.isUnique = true;
    this.config.uniqueName = name;
    this.config.uniqueType = config?.nulls;
    return this;
  }
  generatedAlwaysAs(as) {
    this.config.generated = {
      as,
      type: "always",
      mode: "stored"
    };
    return this;
  }
  buildForeignKeys(column, table) {
    return this.foreignKeyConfigs.map(({ ref, actions }) => {
      return iife((ref2, actions2) => {
        const builder = new ForeignKeyBuilder(() => {
          const foreignColumn = ref2();
          return { columns: [column], foreignColumns: [foreignColumn] };
        });
        if (actions2.onUpdate) {
          builder.onUpdate(actions2.onUpdate);
        }
        if (actions2.onDelete) {
          builder.onDelete(actions2.onDelete);
        }
        return builder.build(table);
      }, ref, actions);
    });
  }
  buildExtraConfigColumn(table) {
    return new ExtraConfigColumn(table, this.config);
  }
}

class PgColumn extends Column {
  constructor(table, config) {
    if (!config.uniqueName) {
      config.uniqueName = uniqueKeyName(table, [config.name]);
    }
    super(table, config);
    this.table = table;
  }
  static [entityKind] = "PgColumn";
}

class ExtraConfigColumn extends PgColumn {
  static [entityKind] = "ExtraConfigColumn";
  getSQLType() {
    return this.getSQLType();
  }
  indexConfig = {
    order: this.config.order ?? "asc",
    nulls: this.config.nulls ?? "last",
    opClass: this.config.opClass
  };
  defaultConfig = {
    order: "asc",
    nulls: "last",
    opClass: undefined
  };
  asc() {
    this.indexConfig.order = "asc";
    return this;
  }
  desc() {
    this.indexConfig.order = "desc";
    return this;
  }
  nullsFirst() {
    this.indexConfig.nulls = "first";
    return this;
  }
  nullsLast() {
    this.indexConfig.nulls = "last";
    return this;
  }
  op(opClass) {
    this.indexConfig.opClass = opClass;
    return this;
  }
}

class IndexedColumn {
  static [entityKind] = "IndexedColumn";
  constructor(name, keyAsName, type2, indexConfig) {
    this.name = name;
    this.keyAsName = keyAsName;
    this.type = type2;
    this.indexConfig = indexConfig;
  }
  name;
  keyAsName;
  type;
  indexConfig;
}

class PgArrayBuilder extends PgColumnBuilder {
  static [entityKind] = "PgArrayBuilder";
  constructor(name, baseBuilder, size) {
    super(name, "array", "PgArray");
    this.config.baseBuilder = baseBuilder;
    this.config.size = size;
  }
  build(table) {
    const baseColumn = this.config.baseBuilder.build(table);
    return new PgArray(table, this.config, baseColumn);
  }
}

class PgArray extends PgColumn {
  constructor(table, config, baseColumn, range) {
    super(table, config);
    this.baseColumn = baseColumn;
    this.range = range;
    this.size = config.size;
  }
  size;
  static [entityKind] = "PgArray";
  getSQLType() {
    return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`;
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      value = parsePgArray(value);
    }
    return value.map((v) => this.baseColumn.mapFromDriverValue(v));
  }
  mapToDriverValue(value, isNestedArray = false) {
    const a = value.map((v) => v === null ? null : is(this.baseColumn, PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v));
    if (isNestedArray)
      return a;
    return makePgArray(a);
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/enum.js
class PgEnumObjectColumnBuilder extends PgColumnBuilder {
  static [entityKind] = "PgEnumObjectColumnBuilder";
  constructor(name, enumInstance) {
    super(name, "string", "PgEnumObjectColumn");
    this.config.enum = enumInstance;
  }
  build(table) {
    return new PgEnumObjectColumn(table, this.config);
  }
}

class PgEnumObjectColumn extends PgColumn {
  static [entityKind] = "PgEnumObjectColumn";
  enum;
  enumValues = this.config.enum.enumValues;
  constructor(table, config) {
    super(table, config);
    this.enum = config.enum;
  }
  getSQLType() {
    return this.enum.enumName;
  }
}
var isPgEnumSym = Symbol.for("drizzle:isPgEnum");
function isPgEnum(obj) {
  return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
}

class PgEnumColumnBuilder extends PgColumnBuilder {
  static [entityKind] = "PgEnumColumnBuilder";
  constructor(name, enumInstance) {
    super(name, "string", "PgEnumColumn");
    this.config.enum = enumInstance;
  }
  build(table) {
    return new PgEnumColumn(table, this.config);
  }
}

class PgEnumColumn extends PgColumn {
  static [entityKind] = "PgEnumColumn";
  enum = this.config.enum;
  enumValues = this.config.enum.enumValues;
  constructor(table, config) {
    super(table, config);
    this.enum = config.enum;
  }
  getSQLType() {
    return this.enum.enumName;
  }
}
function pgEnum(enumName, input) {
  return Array.isArray(input) ? pgEnumWithSchema(enumName, [...input], undefined) : pgEnumObjectWithSchema(enumName, input, undefined);
}
function pgEnumWithSchema(enumName, values, schema) {
  const enumInstance = Object.assign((name) => new PgEnumColumnBuilder(name ?? "", enumInstance), {
    enumName,
    enumValues: values,
    schema,
    [isPgEnumSym]: true
  });
  return enumInstance;
}
function pgEnumObjectWithSchema(enumName, values, schema) {
  const enumInstance = Object.assign((name) => new PgEnumObjectColumnBuilder(name ?? "", enumInstance), {
    enumName,
    enumValues: Object.values(values),
    schema,
    [isPgEnumSym]: true
  });
  return enumInstance;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/subquery.js
class Subquery {
  static [entityKind] = "Subquery";
  constructor(sql, fields, alias, isWith = false, usedTables = []) {
    this._ = {
      brand: "Subquery",
      sql,
      selectedFields: fields,
      alias,
      isWith,
      usedTables
    };
  }
}

class WithSubquery extends Subquery {
  static [entityKind] = "WithSubquery";
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/version.js
var version2 = "0.45.2";

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/tracing.js
var otel;
var rawTracer;
var tracer = {
  startActiveSpan(name, fn) {
    if (!otel) {
      return fn();
    }
    if (!rawTracer) {
      rawTracer = otel.trace.getTracer("drizzle-orm", version2);
    }
    return iife((otel2, rawTracer2) => rawTracer2.startActiveSpan(name, (span) => {
      try {
        return fn(span);
      } catch (e) {
        span.setStatus({
          code: otel2.SpanStatusCode.ERROR,
          message: e instanceof Error ? e.message : "Unknown error"
        });
        throw e;
      } finally {
        span.end();
      }
    }), otel, rawTracer);
  }
};

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/view-common.js
var ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/table.js
var Schema = Symbol.for("drizzle:Schema");
var Columns = Symbol.for("drizzle:Columns");
var ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
var OriginalName = Symbol.for("drizzle:OriginalName");
var BaseName = Symbol.for("drizzle:BaseName");
var IsAlias = Symbol.for("drizzle:IsAlias");
var ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder");
var IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable");

class Table {
  static [entityKind] = "Table";
  static Symbol = {
    Name: TableName,
    Schema,
    OriginalName,
    Columns,
    ExtraConfigColumns,
    BaseName,
    IsAlias,
    ExtraConfigBuilder
  };
  [TableName];
  [OriginalName];
  [Schema];
  [Columns];
  [ExtraConfigColumns];
  [BaseName];
  [IsAlias] = false;
  [IsDrizzleTable] = true;
  [ExtraConfigBuilder] = undefined;
  constructor(name, schema, baseName) {
    this[TableName] = this[OriginalName] = name;
    this[Schema] = schema;
    this[BaseName] = baseName;
  }
}
function getTableName(table) {
  return table[TableName];
}
function getTableUniqueName(table) {
  return `${table[Schema] ?? "public"}.${table[TableName]}`;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/sql/sql.js
function isSQLWrapper(value) {
  return value !== null && value !== undefined && typeof value.getSQL === "function";
}
function mergeQueries(queries) {
  const result = { sql: "", params: [] };
  for (const query of queries) {
    result.sql += query.sql;
    result.params.push(...query.params);
    if (query.typings?.length) {
      if (!result.typings) {
        result.typings = [];
      }
      result.typings.push(...query.typings);
    }
  }
  return result;
}

class StringChunk {
  static [entityKind] = "StringChunk";
  value;
  constructor(value) {
    this.value = Array.isArray(value) ? value : [value];
  }
  getSQL() {
    return new SQL([this]);
  }
}

class SQL {
  constructor(queryChunks) {
    this.queryChunks = queryChunks;
    for (const chunk of queryChunks) {
      if (is(chunk, Table)) {
        const schemaName = chunk[Table.Symbol.Schema];
        this.usedTables.push(schemaName === undefined ? chunk[Table.Symbol.Name] : schemaName + "." + chunk[Table.Symbol.Name]);
      }
    }
  }
  static [entityKind] = "SQL";
  decoder = noopDecoder;
  shouldInlineParams = false;
  usedTables = [];
  append(query) {
    this.queryChunks.push(...query.queryChunks);
    return this;
  }
  toQuery(config) {
    return tracer.startActiveSpan("drizzle.buildSQL", (span) => {
      const query = this.buildQueryFromSourceParams(this.queryChunks, config);
      span?.setAttributes({
        "drizzle.query.text": query.sql,
        "drizzle.query.params": JSON.stringify(query.params)
      });
      return query;
    });
  }
  buildQueryFromSourceParams(chunks, _config) {
    const config = Object.assign({}, _config, {
      inlineParams: _config.inlineParams || this.shouldInlineParams,
      paramStartIndex: _config.paramStartIndex || { value: 0 }
    });
    const {
      casing,
      escapeName,
      escapeParam,
      prepareTyping,
      inlineParams,
      paramStartIndex
    } = config;
    return mergeQueries(chunks.map((chunk) => {
      if (is(chunk, StringChunk)) {
        return { sql: chunk.value.join(""), params: [] };
      }
      if (is(chunk, Name)) {
        return { sql: escapeName(chunk.value), params: [] };
      }
      if (chunk === undefined) {
        return { sql: "", params: [] };
      }
      if (Array.isArray(chunk)) {
        const result = [new StringChunk("(")];
        for (const [i, p] of chunk.entries()) {
          result.push(p);
          if (i < chunk.length - 1) {
            result.push(new StringChunk(", "));
          }
        }
        result.push(new StringChunk(")"));
        return this.buildQueryFromSourceParams(result, config);
      }
      if (is(chunk, SQL)) {
        return this.buildQueryFromSourceParams(chunk.queryChunks, {
          ...config,
          inlineParams: inlineParams || chunk.shouldInlineParams
        });
      }
      if (is(chunk, Table)) {
        const schemaName = chunk[Table.Symbol.Schema];
        const tableName = chunk[Table.Symbol.Name];
        return {
          sql: schemaName === undefined || chunk[IsAlias] ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName),
          params: []
        };
      }
      if (is(chunk, Column)) {
        const columnName = casing.getColumnCasing(chunk);
        if (_config.invokeSource === "indexes") {
          return { sql: escapeName(columnName), params: [] };
        }
        const schemaName = chunk.table[Table.Symbol.Schema];
        return {
          sql: chunk.table[IsAlias] || schemaName === undefined ? escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName) : escapeName(schemaName) + "." + escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName),
          params: []
        };
      }
      if (is(chunk, View)) {
        const schemaName = chunk[ViewBaseConfig].schema;
        const viewName = chunk[ViewBaseConfig].name;
        return {
          sql: schemaName === undefined || chunk[ViewBaseConfig].isAlias ? escapeName(viewName) : escapeName(schemaName) + "." + escapeName(viewName),
          params: []
        };
      }
      if (is(chunk, Param)) {
        if (is(chunk.value, Placeholder)) {
          return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] };
        }
        const mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value);
        if (is(mappedValue, SQL)) {
          return this.buildQueryFromSourceParams([mappedValue], config);
        }
        if (inlineParams) {
          return { sql: this.mapInlineParam(mappedValue, config), params: [] };
        }
        let typings = ["none"];
        if (prepareTyping) {
          typings = [prepareTyping(chunk.encoder)];
        }
        return { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings };
      }
      if (is(chunk, Placeholder)) {
        return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] };
      }
      if (is(chunk, SQL.Aliased) && chunk.fieldAlias !== undefined) {
        return { sql: escapeName(chunk.fieldAlias), params: [] };
      }
      if (is(chunk, Subquery)) {
        if (chunk._.isWith) {
          return { sql: escapeName(chunk._.alias), params: [] };
        }
        return this.buildQueryFromSourceParams([
          new StringChunk("("),
          chunk._.sql,
          new StringChunk(") "),
          new Name(chunk._.alias)
        ], config);
      }
      if (isPgEnum(chunk)) {
        if (chunk.schema) {
          return { sql: escapeName(chunk.schema) + "." + escapeName(chunk.enumName), params: [] };
        }
        return { sql: escapeName(chunk.enumName), params: [] };
      }
      if (isSQLWrapper(chunk)) {
        if (chunk.shouldOmitSQLParens?.()) {
          return this.buildQueryFromSourceParams([chunk.getSQL()], config);
        }
        return this.buildQueryFromSourceParams([
          new StringChunk("("),
          chunk.getSQL(),
          new StringChunk(")")
        ], config);
      }
      if (inlineParams) {
        return { sql: this.mapInlineParam(chunk, config), params: [] };
      }
      return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] };
    }));
  }
  mapInlineParam(chunk, { escapeString }) {
    if (chunk === null) {
      return "null";
    }
    if (typeof chunk === "number" || typeof chunk === "boolean") {
      return chunk.toString();
    }
    if (typeof chunk === "string") {
      return escapeString(chunk);
    }
    if (typeof chunk === "object") {
      const mappedValueAsString = chunk.toString();
      if (mappedValueAsString === "[object Object]") {
        return escapeString(JSON.stringify(chunk));
      }
      return escapeString(mappedValueAsString);
    }
    throw new Error("Unexpected param value: " + chunk);
  }
  getSQL() {
    return this;
  }
  as(alias) {
    if (alias === undefined) {
      return this;
    }
    return new SQL.Aliased(this, alias);
  }
  mapWith(decoder) {
    this.decoder = typeof decoder === "function" ? { mapFromDriverValue: decoder } : decoder;
    return this;
  }
  inlineParams() {
    this.shouldInlineParams = true;
    return this;
  }
  if(condition) {
    return condition ? this : undefined;
  }
}

class Name {
  constructor(value) {
    this.value = value;
  }
  static [entityKind] = "Name";
  brand;
  getSQL() {
    return new SQL([this]);
  }
}
function isDriverValueEncoder(value) {
  return typeof value === "object" && value !== null && "mapToDriverValue" in value && typeof value.mapToDriverValue === "function";
}
var noopDecoder = {
  mapFromDriverValue: (value) => value
};
var noopEncoder = {
  mapToDriverValue: (value) => value
};
var noopMapper = {
  ...noopDecoder,
  ...noopEncoder
};

class Param {
  constructor(value, encoder = noopEncoder) {
    this.value = value;
    this.encoder = encoder;
  }
  static [entityKind] = "Param";
  brand;
  getSQL() {
    return new SQL([this]);
  }
}
function sql(strings, ...params) {
  const queryChunks = [];
  if (params.length > 0 || strings.length > 0 && strings[0] !== "") {
    queryChunks.push(new StringChunk(strings[0]));
  }
  for (const [paramIndex, param2] of params.entries()) {
    queryChunks.push(param2, new StringChunk(strings[paramIndex + 1]));
  }
  return new SQL(queryChunks);
}
((sql2) => {
  function empty() {
    return new SQL([]);
  }
  sql2.empty = empty;
  function fromList(list) {
    return new SQL(list);
  }
  sql2.fromList = fromList;
  function raw(str) {
    return new SQL([new StringChunk(str)]);
  }
  sql2.raw = raw;
  function join4(chunks, separator) {
    const result = [];
    for (const [i, chunk] of chunks.entries()) {
      if (i > 0 && separator !== undefined) {
        result.push(separator);
      }
      result.push(chunk);
    }
    return new SQL(result);
  }
  sql2.join = join4;
  function identifier(value) {
    return new Name(value);
  }
  sql2.identifier = identifier;
  function placeholder2(name2) {
    return new Placeholder(name2);
  }
  sql2.placeholder = placeholder2;
  function param2(value, encoder) {
    return new Param(value, encoder);
  }
  sql2.param = param2;
})(sql || (sql = {}));
((SQL2) => {

  class Aliased {
    constructor(sql2, fieldAlias) {
      this.sql = sql2;
      this.fieldAlias = fieldAlias;
    }
    static [entityKind] = "SQL.Aliased";
    isSelectionField = false;
    getSQL() {
      return this.sql;
    }
    clone() {
      return new Aliased(this.sql, this.fieldAlias);
    }
  }
  SQL2.Aliased = Aliased;
})(SQL || (SQL = {}));

class Placeholder {
  constructor(name2) {
    this.name = name2;
  }
  static [entityKind] = "Placeholder";
  getSQL() {
    return new SQL([this]);
  }
}
function fillPlaceholders(params, values) {
  return params.map((p) => {
    if (is(p, Placeholder)) {
      if (!(p.name in values)) {
        throw new Error(`No value for placeholder "${p.name}" was provided`);
      }
      return values[p.name];
    }
    if (is(p, Param) && is(p.value, Placeholder)) {
      if (!(p.value.name in values)) {
        throw new Error(`No value for placeholder "${p.value.name}" was provided`);
      }
      return p.encoder.mapToDriverValue(values[p.value.name]);
    }
    return p;
  });
}
var IsDrizzleView = Symbol.for("drizzle:IsDrizzleView");

class View {
  static [entityKind] = "View";
  [ViewBaseConfig];
  [IsDrizzleView] = true;
  constructor({ name: name2, schema, selectedFields, query }) {
    this[ViewBaseConfig] = {
      name: name2,
      originalName: name2,
      schema,
      selectedFields,
      query,
      isExisting: !query,
      isAlias: false
    };
  }
  getSQL() {
    return new SQL([this]);
  }
}
Column.prototype.getSQL = function() {
  return new SQL([this]);
};
Table.prototype.getSQL = function() {
  return new SQL([this]);
};
Subquery.prototype.getSQL = function() {
  return new SQL([this]);
};

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/alias.js
class ColumnAliasProxyHandler {
  constructor(table) {
    this.table = table;
  }
  static [entityKind] = "ColumnAliasProxyHandler";
  get(columnObj, prop) {
    if (prop === "table") {
      return this.table;
    }
    return columnObj[prop];
  }
}

class TableAliasProxyHandler {
  constructor(alias, replaceOriginalName) {
    this.alias = alias;
    this.replaceOriginalName = replaceOriginalName;
  }
  static [entityKind] = "TableAliasProxyHandler";
  get(target, prop) {
    if (prop === Table.Symbol.IsAlias) {
      return true;
    }
    if (prop === Table.Symbol.Name) {
      return this.alias;
    }
    if (this.replaceOriginalName && prop === Table.Symbol.OriginalName) {
      return this.alias;
    }
    if (prop === ViewBaseConfig) {
      return {
        ...target[ViewBaseConfig],
        name: this.alias,
        isAlias: true
      };
    }
    if (prop === Table.Symbol.Columns) {
      const columns = target[Table.Symbol.Columns];
      if (!columns) {
        return columns;
      }
      const proxiedColumns = {};
      Object.keys(columns).map((key) => {
        proxiedColumns[key] = new Proxy(columns[key], new ColumnAliasProxyHandler(new Proxy(target, this)));
      });
      return proxiedColumns;
    }
    const value = target[prop];
    if (is(value, Column)) {
      return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this)));
    }
    return value;
  }
}
function aliasedTable(table, tableAlias) {
  return new Proxy(table, new TableAliasProxyHandler(tableAlias, false));
}
function aliasedTableColumn(column, tableAlias) {
  return new Proxy(column, new ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))));
}
function mapColumnsInAliasedSQLToAlias(query, alias) {
  return new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias);
}
function mapColumnsInSQLToAlias(query, alias) {
  return sql.join(query.queryChunks.map((c) => {
    if (is(c, Column)) {
      return aliasedTableColumn(c, alias);
    }
    if (is(c, SQL)) {
      return mapColumnsInSQLToAlias(c, alias);
    }
    if (is(c, SQL.Aliased)) {
      return mapColumnsInAliasedSQLToAlias(c, alias);
    }
    return c;
  }));
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/errors.js
class DrizzleError extends Error {
  static [entityKind] = "DrizzleError";
  constructor({ message, cause }) {
    super(message);
    this.name = "DrizzleError";
    this.cause = cause;
  }
}

class DrizzleQueryError extends Error {
  constructor(query, params, cause) {
    super(`Failed query: ${query}
params: ${params}`);
    this.query = query;
    this.params = params;
    this.cause = cause;
    Error.captureStackTrace(this, DrizzleQueryError);
    if (cause)
      this.cause = cause;
  }
}

class TransactionRollbackError extends DrizzleError {
  static [entityKind] = "TransactionRollbackError";
  constructor() {
    super({ message: "Rollback" });
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/logger.js
class ConsoleLogWriter {
  static [entityKind] = "ConsoleLogWriter";
  write(message) {
    console.log(message);
  }
}

class DefaultLogger {
  static [entityKind] = "DefaultLogger";
  writer;
  constructor(config) {
    this.writer = config?.writer ?? new ConsoleLogWriter;
  }
  logQuery(query, params) {
    const stringifiedParams = params.map((p) => {
      try {
        return JSON.stringify(p);
      } catch {
        return String(p);
      }
    });
    const paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(", ")}]` : "";
    this.writer.write(`Query: ${query}${paramsStr}`);
  }
}

class NoopLogger {
  static [entityKind] = "NoopLogger";
  logQuery() {}
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/query-promise.js
class QueryPromise {
  static [entityKind] = "QueryPromise";
  [Symbol.toStringTag] = "QueryPromise";
  catch(onRejected) {
    return this.then(undefined, onRejected);
  }
  finally(onFinally) {
    return this.then((value) => {
      onFinally?.();
      return value;
    }, (reason) => {
      onFinally?.();
      throw reason;
    });
  }
  then(onFulfilled, onRejected) {
    return this.execute().then(onFulfilled, onRejected);
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/utils.js
function mapResultRow(columns, row, joinsNotNullableMap) {
  const nullifyMap = {};
  const result = columns.reduce((result2, { path: path2, field }, columnIndex) => {
    let decoder;
    if (is(field, Column)) {
      decoder = field;
    } else if (is(field, SQL)) {
      decoder = field.decoder;
    } else if (is(field, Subquery)) {
      decoder = field._.sql.decoder;
    } else {
      decoder = field.sql.decoder;
    }
    let node2 = result2;
    for (const [pathChunkIndex, pathChunk] of path2.entries()) {
      if (pathChunkIndex < path2.length - 1) {
        if (!(pathChunk in node2)) {
          node2[pathChunk] = {};
        }
        node2 = node2[pathChunk];
      } else {
        const rawValue = row[columnIndex];
        const value = node2[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
        if (joinsNotNullableMap && is(field, Column) && path2.length === 2) {
          const objectName = path2[0];
          if (!(objectName in nullifyMap)) {
            nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
          } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
            nullifyMap[objectName] = false;
          }
        }
      }
    }
    return result2;
  }, {});
  if (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) {
    for (const [objectName, tableName] of Object.entries(nullifyMap)) {
      if (typeof tableName === "string" && !joinsNotNullableMap[tableName]) {
        result[objectName] = null;
      }
    }
  }
  return result;
}
function orderSelectedFields(fields, pathPrefix) {
  return Object.entries(fields).reduce((result, [name, field]) => {
    if (typeof name !== "string") {
      return result;
    }
    const newPath = pathPrefix ? [...pathPrefix, name] : [name];
    if (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased) || is(field, Subquery)) {
      result.push({ path: newPath, field });
    } else if (is(field, Table)) {
      result.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath));
    } else {
      result.push(...orderSelectedFields(field, newPath));
    }
    return result;
  }, []);
}
function haveSameKeys(left, right) {
  const leftKeys = Object.keys(left);
  const rightKeys = Object.keys(right);
  if (leftKeys.length !== rightKeys.length) {
    return false;
  }
  for (const [index, key] of leftKeys.entries()) {
    if (key !== rightKeys[index]) {
      return false;
    }
  }
  return true;
}
function mapUpdateSet(table, values) {
  const entries = Object.entries(values).filter(([, value]) => value !== undefined).map(([key, value]) => {
    if (is(value, SQL) || is(value, Column)) {
      return [key, value];
    } else {
      return [key, new Param(value, table[Table.Symbol.Columns][key])];
    }
  });
  if (entries.length === 0) {
    throw new Error("No values to set");
  }
  return Object.fromEntries(entries);
}
function applyMixins(baseClass, extendedClasses) {
  for (const extendedClass of extendedClasses) {
    for (const name of Object.getOwnPropertyNames(extendedClass.prototype)) {
      if (name === "constructor")
        continue;
      Object.defineProperty(baseClass.prototype, name, Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || /* @__PURE__ */ Object.create(null));
    }
  }
}
function getTableColumns(table) {
  return table[Table.Symbol.Columns];
}
function getTableLikeName(table) {
  return is(table, Subquery) ? table._.alias : is(table, View) ? table[ViewBaseConfig].name : is(table, SQL) ? undefined : table[Table.Symbol.IsAlias] ? table[Table.Symbol.Name] : table[Table.Symbol.BaseName];
}
function getColumnNameAndConfig(a, b) {
  return {
    name: typeof a === "string" && a.length > 0 ? a : "",
    config: typeof a === "object" ? a : b
  };
}
function isConfig(data) {
  if (typeof data !== "object" || data === null)
    return false;
  if (data.constructor.name !== "Object")
    return false;
  if ("logger" in data) {
    const type2 = typeof data["logger"];
    if (type2 !== "boolean" && (type2 !== "object" || typeof data["logger"]["logQuery"] !== "function") && type2 !== "undefined")
      return false;
    return true;
  }
  if ("schema" in data) {
    const type2 = typeof data["schema"];
    if (type2 !== "object" && type2 !== "undefined")
      return false;
    return true;
  }
  if ("casing" in data) {
    const type2 = typeof data["casing"];
    if (type2 !== "string" && type2 !== "undefined")
      return false;
    return true;
  }
  if ("mode" in data) {
    if (data["mode"] !== "default" || data["mode"] !== "planetscale" || data["mode"] !== undefined)
      return false;
    return true;
  }
  if ("connection" in data) {
    const type2 = typeof data["connection"];
    if (type2 !== "string" && type2 !== "object" && type2 !== "undefined")
      return false;
    return true;
  }
  if ("client" in data) {
    const type2 = typeof data["client"];
    if (type2 !== "object" && type2 !== "function" && type2 !== "undefined")
      return false;
    return true;
  }
  if (Object.keys(data).length === 0)
    return true;
  return false;
}
var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder;

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/int.common.js
class PgIntColumnBaseBuilder extends PgColumnBuilder {
  static [entityKind] = "PgIntColumnBaseBuilder";
  generatedAlwaysAsIdentity(sequence) {
    if (sequence) {
      const { name, ...options } = sequence;
      this.config.generatedIdentity = {
        type: "always",
        sequenceName: name,
        sequenceOptions: options
      };
    } else {
      this.config.generatedIdentity = {
        type: "always"
      };
    }
    this.config.hasDefault = true;
    this.config.notNull = true;
    return this;
  }
  generatedByDefaultAsIdentity(sequence) {
    if (sequence) {
      const { name, ...options } = sequence;
      this.config.generatedIdentity = {
        type: "byDefault",
        sequenceName: name,
        sequenceOptions: options
      };
    } else {
      this.config.generatedIdentity = {
        type: "byDefault"
      };
    }
    this.config.hasDefault = true;
    this.config.notNull = true;
    return this;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/bigint.js
class PgBigInt53Builder extends PgIntColumnBaseBuilder {
  static [entityKind] = "PgBigInt53Builder";
  constructor(name) {
    super(name, "number", "PgBigInt53");
  }
  build(table) {
    return new PgBigInt53(table, this.config);
  }
}

class PgBigInt53 extends PgColumn {
  static [entityKind] = "PgBigInt53";
  getSQLType() {
    return "bigint";
  }
  mapFromDriverValue(value) {
    if (typeof value === "number") {
      return value;
    }
    return Number(value);
  }
}

class PgBigInt64Builder extends PgIntColumnBaseBuilder {
  static [entityKind] = "PgBigInt64Builder";
  constructor(name) {
    super(name, "bigint", "PgBigInt64");
  }
  build(table) {
    return new PgBigInt64(table, this.config);
  }
}

class PgBigInt64 extends PgColumn {
  static [entityKind] = "PgBigInt64";
  getSQLType() {
    return "bigint";
  }
  mapFromDriverValue(value) {
    return BigInt(value);
  }
}
function bigint(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  if (config.mode === "number") {
    return new PgBigInt53Builder(name);
  }
  return new PgBigInt64Builder(name);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/bigserial.js
class PgBigSerial53Builder extends PgColumnBuilder {
  static [entityKind] = "PgBigSerial53Builder";
  constructor(name) {
    super(name, "number", "PgBigSerial53");
    this.config.hasDefault = true;
    this.config.notNull = true;
  }
  build(table) {
    return new PgBigSerial53(table, this.config);
  }
}

class PgBigSerial53 extends PgColumn {
  static [entityKind] = "PgBigSerial53";
  getSQLType() {
    return "bigserial";
  }
  mapFromDriverValue(value) {
    if (typeof value === "number") {
      return value;
    }
    return Number(value);
  }
}

class PgBigSerial64Builder extends PgColumnBuilder {
  static [entityKind] = "PgBigSerial64Builder";
  constructor(name) {
    super(name, "bigint", "PgBigSerial64");
    this.config.hasDefault = true;
  }
  build(table) {
    return new PgBigSerial64(table, this.config);
  }
}

class PgBigSerial64 extends PgColumn {
  static [entityKind] = "PgBigSerial64";
  getSQLType() {
    return "bigserial";
  }
  mapFromDriverValue(value) {
    return BigInt(value);
  }
}
function bigserial(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  if (config.mode === "number") {
    return new PgBigSerial53Builder(name);
  }
  return new PgBigSerial64Builder(name);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/boolean.js
class PgBooleanBuilder extends PgColumnBuilder {
  static [entityKind] = "PgBooleanBuilder";
  constructor(name) {
    super(name, "boolean", "PgBoolean");
  }
  build(table) {
    return new PgBoolean(table, this.config);
  }
}

class PgBoolean extends PgColumn {
  static [entityKind] = "PgBoolean";
  getSQLType() {
    return "boolean";
  }
}
function boolean(name) {
  return new PgBooleanBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/char.js
class PgCharBuilder extends PgColumnBuilder {
  static [entityKind] = "PgCharBuilder";
  constructor(name, config) {
    super(name, "string", "PgChar");
    this.config.length = config.length;
    this.config.enumValues = config.enum;
  }
  build(table) {
    return new PgChar(table, this.config);
  }
}

class PgChar extends PgColumn {
  static [entityKind] = "PgChar";
  length = this.config.length;
  enumValues = this.config.enumValues;
  getSQLType() {
    return this.length === undefined ? `char` : `char(${this.length})`;
  }
}
function char(a, b = {}) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgCharBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/cidr.js
class PgCidrBuilder extends PgColumnBuilder {
  static [entityKind] = "PgCidrBuilder";
  constructor(name) {
    super(name, "string", "PgCidr");
  }
  build(table) {
    return new PgCidr(table, this.config);
  }
}

class PgCidr extends PgColumn {
  static [entityKind] = "PgCidr";
  getSQLType() {
    return "cidr";
  }
}
function cidr(name) {
  return new PgCidrBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/custom.js
class PgCustomColumnBuilder extends PgColumnBuilder {
  static [entityKind] = "PgCustomColumnBuilder";
  constructor(name, fieldConfig, customTypeParams) {
    super(name, "custom", "PgCustomColumn");
    this.config.fieldConfig = fieldConfig;
    this.config.customTypeParams = customTypeParams;
  }
  build(table) {
    return new PgCustomColumn(table, this.config);
  }
}

class PgCustomColumn extends PgColumn {
  static [entityKind] = "PgCustomColumn";
  sqlName;
  mapTo;
  mapFrom;
  constructor(table, config) {
    super(table, config);
    this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
    this.mapTo = config.customTypeParams.toDriver;
    this.mapFrom = config.customTypeParams.fromDriver;
  }
  getSQLType() {
    return this.sqlName;
  }
  mapFromDriverValue(value) {
    return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
  }
  mapToDriverValue(value) {
    return typeof this.mapTo === "function" ? this.mapTo(value) : value;
  }
}
function customType(customTypeParams) {
  return (a, b) => {
    const { name, config } = getColumnNameAndConfig(a, b);
    return new PgCustomColumnBuilder(name, config, customTypeParams);
  };
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/date.common.js
class PgDateColumnBaseBuilder extends PgColumnBuilder {
  static [entityKind] = "PgDateColumnBaseBuilder";
  defaultNow() {
    return this.default(sql`now()`);
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/date.js
class PgDateBuilder extends PgDateColumnBaseBuilder {
  static [entityKind] = "PgDateBuilder";
  constructor(name) {
    super(name, "date", "PgDate");
  }
  build(table) {
    return new PgDate(table, this.config);
  }
}

class PgDate extends PgColumn {
  static [entityKind] = "PgDate";
  getSQLType() {
    return "date";
  }
  mapFromDriverValue(value) {
    if (typeof value === "string")
      return new Date(value);
    return value;
  }
  mapToDriverValue(value) {
    return value.toISOString();
  }
}

class PgDateStringBuilder extends PgDateColumnBaseBuilder {
  static [entityKind] = "PgDateStringBuilder";
  constructor(name) {
    super(name, "string", "PgDateString");
  }
  build(table) {
    return new PgDateString(table, this.config);
  }
}

class PgDateString extends PgColumn {
  static [entityKind] = "PgDateString";
  getSQLType() {
    return "date";
  }
  mapFromDriverValue(value) {
    if (typeof value === "string")
      return value;
    return value.toISOString().slice(0, -14);
  }
}
function date(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  if (config?.mode === "date") {
    return new PgDateBuilder(name);
  }
  return new PgDateStringBuilder(name);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/double-precision.js
class PgDoublePrecisionBuilder extends PgColumnBuilder {
  static [entityKind] = "PgDoublePrecisionBuilder";
  constructor(name) {
    super(name, "number", "PgDoublePrecision");
  }
  build(table) {
    return new PgDoublePrecision(table, this.config);
  }
}

class PgDoublePrecision extends PgColumn {
  static [entityKind] = "PgDoublePrecision";
  getSQLType() {
    return "double precision";
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      return Number.parseFloat(value);
    }
    return value;
  }
}
function doublePrecision(name) {
  return new PgDoublePrecisionBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/inet.js
class PgInetBuilder extends PgColumnBuilder {
  static [entityKind] = "PgInetBuilder";
  constructor(name) {
    super(name, "string", "PgInet");
  }
  build(table) {
    return new PgInet(table, this.config);
  }
}

class PgInet extends PgColumn {
  static [entityKind] = "PgInet";
  getSQLType() {
    return "inet";
  }
}
function inet(name) {
  return new PgInetBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/integer.js
class PgIntegerBuilder extends PgIntColumnBaseBuilder {
  static [entityKind] = "PgIntegerBuilder";
  constructor(name) {
    super(name, "number", "PgInteger");
  }
  build(table) {
    return new PgInteger(table, this.config);
  }
}

class PgInteger extends PgColumn {
  static [entityKind] = "PgInteger";
  getSQLType() {
    return "integer";
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      return Number.parseInt(value);
    }
    return value;
  }
}
function integer(name) {
  return new PgIntegerBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/interval.js
class PgIntervalBuilder extends PgColumnBuilder {
  static [entityKind] = "PgIntervalBuilder";
  constructor(name, intervalConfig) {
    super(name, "string", "PgInterval");
    this.config.intervalConfig = intervalConfig;
  }
  build(table) {
    return new PgInterval(table, this.config);
  }
}

class PgInterval extends PgColumn {
  static [entityKind] = "PgInterval";
  fields = this.config.intervalConfig.fields;
  precision = this.config.intervalConfig.precision;
  getSQLType() {
    const fields = this.fields ? ` ${this.fields}` : "";
    const precision = this.precision ? `(${this.precision})` : "";
    return `interval${fields}${precision}`;
  }
}
function interval(a, b = {}) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgIntervalBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/json.js
class PgJsonBuilder extends PgColumnBuilder {
  static [entityKind] = "PgJsonBuilder";
  constructor(name) {
    super(name, "json", "PgJson");
  }
  build(table) {
    return new PgJson(table, this.config);
  }
}

class PgJson extends PgColumn {
  static [entityKind] = "PgJson";
  constructor(table, config) {
    super(table, config);
  }
  getSQLType() {
    return "json";
  }
  mapToDriverValue(value) {
    return JSON.stringify(value);
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      try {
        return JSON.parse(value);
      } catch {
        return value;
      }
    }
    return value;
  }
}
function json(name) {
  return new PgJsonBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/jsonb.js
class PgJsonbBuilder extends PgColumnBuilder {
  static [entityKind] = "PgJsonbBuilder";
  constructor(name) {
    super(name, "json", "PgJsonb");
  }
  build(table) {
    return new PgJsonb(table, this.config);
  }
}

class PgJsonb extends PgColumn {
  static [entityKind] = "PgJsonb";
  constructor(table, config) {
    super(table, config);
  }
  getSQLType() {
    return "jsonb";
  }
  mapToDriverValue(value) {
    return JSON.stringify(value);
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      try {
        return JSON.parse(value);
      } catch {
        return value;
      }
    }
    return value;
  }
}
function jsonb(name) {
  return new PgJsonbBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/line.js
class PgLineBuilder extends PgColumnBuilder {
  static [entityKind] = "PgLineBuilder";
  constructor(name) {
    super(name, "array", "PgLine");
  }
  build(table) {
    return new PgLineTuple(table, this.config);
  }
}

class PgLineTuple extends PgColumn {
  static [entityKind] = "PgLine";
  getSQLType() {
    return "line";
  }
  mapFromDriverValue(value) {
    const [a, b, c] = value.slice(1, -1).split(",");
    return [Number.parseFloat(a), Number.parseFloat(b), Number.parseFloat(c)];
  }
  mapToDriverValue(value) {
    return `{${value[0]},${value[1]},${value[2]}}`;
  }
}

class PgLineABCBuilder extends PgColumnBuilder {
  static [entityKind] = "PgLineABCBuilder";
  constructor(name) {
    super(name, "json", "PgLineABC");
  }
  build(table) {
    return new PgLineABC(table, this.config);
  }
}

class PgLineABC extends PgColumn {
  static [entityKind] = "PgLineABC";
  getSQLType() {
    return "line";
  }
  mapFromDriverValue(value) {
    const [a, b, c] = value.slice(1, -1).split(",");
    return { a: Number.parseFloat(a), b: Number.parseFloat(b), c: Number.parseFloat(c) };
  }
  mapToDriverValue(value) {
    return `{${value.a},${value.b},${value.c}}`;
  }
}
function line(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  if (!config?.mode || config.mode === "tuple") {
    return new PgLineBuilder(name);
  }
  return new PgLineABCBuilder(name);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/macaddr.js
class PgMacaddrBuilder extends PgColumnBuilder {
  static [entityKind] = "PgMacaddrBuilder";
  constructor(name) {
    super(name, "string", "PgMacaddr");
  }
  build(table) {
    return new PgMacaddr(table, this.config);
  }
}

class PgMacaddr extends PgColumn {
  static [entityKind] = "PgMacaddr";
  getSQLType() {
    return "macaddr";
  }
}
function macaddr(name) {
  return new PgMacaddrBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/macaddr8.js
class PgMacaddr8Builder extends PgColumnBuilder {
  static [entityKind] = "PgMacaddr8Builder";
  constructor(name) {
    super(name, "string", "PgMacaddr8");
  }
  build(table) {
    return new PgMacaddr8(table, this.config);
  }
}

class PgMacaddr8 extends PgColumn {
  static [entityKind] = "PgMacaddr8";
  getSQLType() {
    return "macaddr8";
  }
}
function macaddr8(name) {
  return new PgMacaddr8Builder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/numeric.js
class PgNumericBuilder extends PgColumnBuilder {
  static [entityKind] = "PgNumericBuilder";
  constructor(name, precision, scale) {
    super(name, "string", "PgNumeric");
    this.config.precision = precision;
    this.config.scale = scale;
  }
  build(table) {
    return new PgNumeric(table, this.config);
  }
}

class PgNumeric extends PgColumn {
  static [entityKind] = "PgNumeric";
  precision;
  scale;
  constructor(table, config) {
    super(table, config);
    this.precision = config.precision;
    this.scale = config.scale;
  }
  mapFromDriverValue(value) {
    if (typeof value === "string")
      return value;
    return String(value);
  }
  getSQLType() {
    if (this.precision !== undefined && this.scale !== undefined) {
      return `numeric(${this.precision}, ${this.scale})`;
    } else if (this.precision === undefined) {
      return "numeric";
    } else {
      return `numeric(${this.precision})`;
    }
  }
}

class PgNumericNumberBuilder extends PgColumnBuilder {
  static [entityKind] = "PgNumericNumberBuilder";
  constructor(name, precision, scale) {
    super(name, "number", "PgNumericNumber");
    this.config.precision = precision;
    this.config.scale = scale;
  }
  build(table) {
    return new PgNumericNumber(table, this.config);
  }
}

class PgNumericNumber extends PgColumn {
  static [entityKind] = "PgNumericNumber";
  precision;
  scale;
  constructor(table, config) {
    super(table, config);
    this.precision = config.precision;
    this.scale = config.scale;
  }
  mapFromDriverValue(value) {
    if (typeof value === "number")
      return value;
    return Number(value);
  }
  mapToDriverValue = String;
  getSQLType() {
    if (this.precision !== undefined && this.scale !== undefined) {
      return `numeric(${this.precision}, ${this.scale})`;
    } else if (this.precision === undefined) {
      return "numeric";
    } else {
      return `numeric(${this.precision})`;
    }
  }
}

class PgNumericBigIntBuilder extends PgColumnBuilder {
  static [entityKind] = "PgNumericBigIntBuilder";
  constructor(name, precision, scale) {
    super(name, "bigint", "PgNumericBigInt");
    this.config.precision = precision;
    this.config.scale = scale;
  }
  build(table) {
    return new PgNumericBigInt(table, this.config);
  }
}

class PgNumericBigInt extends PgColumn {
  static [entityKind] = "PgNumericBigInt";
  precision;
  scale;
  constructor(table, config) {
    super(table, config);
    this.precision = config.precision;
    this.scale = config.scale;
  }
  mapFromDriverValue = BigInt;
  mapToDriverValue = String;
  getSQLType() {
    if (this.precision !== undefined && this.scale !== undefined) {
      return `numeric(${this.precision}, ${this.scale})`;
    } else if (this.precision === undefined) {
      return "numeric";
    } else {
      return `numeric(${this.precision})`;
    }
  }
}
function numeric(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  const mode = config?.mode;
  return mode === "number" ? new PgNumericNumberBuilder(name, config?.precision, config?.scale) : mode === "bigint" ? new PgNumericBigIntBuilder(name, config?.precision, config?.scale) : new PgNumericBuilder(name, config?.precision, config?.scale);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/point.js
class PgPointTupleBuilder extends PgColumnBuilder {
  static [entityKind] = "PgPointTupleBuilder";
  constructor(name) {
    super(name, "array", "PgPointTuple");
  }
  build(table) {
    return new PgPointTuple(table, this.config);
  }
}

class PgPointTuple extends PgColumn {
  static [entityKind] = "PgPointTuple";
  getSQLType() {
    return "point";
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      const [x, y] = value.slice(1, -1).split(",");
      return [Number.parseFloat(x), Number.parseFloat(y)];
    }
    return [value.x, value.y];
  }
  mapToDriverValue(value) {
    return `(${value[0]},${value[1]})`;
  }
}

class PgPointObjectBuilder extends PgColumnBuilder {
  static [entityKind] = "PgPointObjectBuilder";
  constructor(name) {
    super(name, "json", "PgPointObject");
  }
  build(table) {
    return new PgPointObject(table, this.config);
  }
}

class PgPointObject extends PgColumn {
  static [entityKind] = "PgPointObject";
  getSQLType() {
    return "point";
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      const [x, y] = value.slice(1, -1).split(",");
      return { x: Number.parseFloat(x), y: Number.parseFloat(y) };
    }
    return value;
  }
  mapToDriverValue(value) {
    return `(${value.x},${value.y})`;
  }
}
function point(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  if (!config?.mode || config.mode === "tuple") {
    return new PgPointTupleBuilder(name);
  }
  return new PgPointObjectBuilder(name);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/postgis_extension/utils.js
function hexToBytes(hex) {
  const bytes = [];
  for (let c = 0;c < hex.length; c += 2) {
    bytes.push(Number.parseInt(hex.slice(c, c + 2), 16));
  }
  return new Uint8Array(bytes);
}
function bytesToFloat64(bytes, offset) {
  const buffer = new ArrayBuffer(8);
  const view = new DataView(buffer);
  for (let i = 0;i < 8; i++) {
    view.setUint8(i, bytes[offset + i]);
  }
  return view.getFloat64(0, true);
}
function parseEWKB(hex) {
  const bytes = hexToBytes(hex);
  let offset = 0;
  const byteOrder = bytes[offset];
  offset += 1;
  const view = new DataView(bytes.buffer);
  const geomType = view.getUint32(offset, byteOrder === 1);
  offset += 4;
  let _srid;
  if (geomType & 536870912) {
    _srid = view.getUint32(offset, byteOrder === 1);
    offset += 4;
  }
  if ((geomType & 65535) === 1) {
    const x = bytesToFloat64(bytes, offset);
    offset += 8;
    const y = bytesToFloat64(bytes, offset);
    offset += 8;
    return [x, y];
  }
  throw new Error("Unsupported geometry type");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/postgis_extension/geometry.js
class PgGeometryBuilder extends PgColumnBuilder {
  static [entityKind] = "PgGeometryBuilder";
  constructor(name) {
    super(name, "array", "PgGeometry");
  }
  build(table) {
    return new PgGeometry(table, this.config);
  }
}

class PgGeometry extends PgColumn {
  static [entityKind] = "PgGeometry";
  getSQLType() {
    return "geometry(point)";
  }
  mapFromDriverValue(value) {
    return parseEWKB(value);
  }
  mapToDriverValue(value) {
    return `point(${value[0]} ${value[1]})`;
  }
}

class PgGeometryObjectBuilder extends PgColumnBuilder {
  static [entityKind] = "PgGeometryObjectBuilder";
  constructor(name) {
    super(name, "json", "PgGeometryObject");
  }
  build(table) {
    return new PgGeometryObject(table, this.config);
  }
}

class PgGeometryObject extends PgColumn {
  static [entityKind] = "PgGeometryObject";
  getSQLType() {
    return "geometry(point)";
  }
  mapFromDriverValue(value) {
    const parsed = parseEWKB(value);
    return { x: parsed[0], y: parsed[1] };
  }
  mapToDriverValue(value) {
    return `point(${value.x} ${value.y})`;
  }
}
function geometry(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  if (!config?.mode || config.mode === "tuple") {
    return new PgGeometryBuilder(name);
  }
  return new PgGeometryObjectBuilder(name);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/real.js
class PgRealBuilder extends PgColumnBuilder {
  static [entityKind] = "PgRealBuilder";
  constructor(name, length) {
    super(name, "number", "PgReal");
    this.config.length = length;
  }
  build(table) {
    return new PgReal(table, this.config);
  }
}

class PgReal extends PgColumn {
  static [entityKind] = "PgReal";
  constructor(table, config) {
    super(table, config);
  }
  getSQLType() {
    return "real";
  }
  mapFromDriverValue = (value) => {
    if (typeof value === "string") {
      return Number.parseFloat(value);
    }
    return value;
  };
}
function real(name) {
  return new PgRealBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/serial.js
class PgSerialBuilder extends PgColumnBuilder {
  static [entityKind] = "PgSerialBuilder";
  constructor(name) {
    super(name, "number", "PgSerial");
    this.config.hasDefault = true;
    this.config.notNull = true;
  }
  build(table) {
    return new PgSerial(table, this.config);
  }
}

class PgSerial extends PgColumn {
  static [entityKind] = "PgSerial";
  getSQLType() {
    return "serial";
  }
}
function serial(name) {
  return new PgSerialBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/smallint.js
class PgSmallIntBuilder extends PgIntColumnBaseBuilder {
  static [entityKind] = "PgSmallIntBuilder";
  constructor(name) {
    super(name, "number", "PgSmallInt");
  }
  build(table) {
    return new PgSmallInt(table, this.config);
  }
}

class PgSmallInt extends PgColumn {
  static [entityKind] = "PgSmallInt";
  getSQLType() {
    return "smallint";
  }
  mapFromDriverValue = (value) => {
    if (typeof value === "string") {
      return Number(value);
    }
    return value;
  };
}
function smallint(name) {
  return new PgSmallIntBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/smallserial.js
class PgSmallSerialBuilder extends PgColumnBuilder {
  static [entityKind] = "PgSmallSerialBuilder";
  constructor(name) {
    super(name, "number", "PgSmallSerial");
    this.config.hasDefault = true;
    this.config.notNull = true;
  }
  build(table) {
    return new PgSmallSerial(table, this.config);
  }
}

class PgSmallSerial extends PgColumn {
  static [entityKind] = "PgSmallSerial";
  getSQLType() {
    return "smallserial";
  }
}
function smallserial(name) {
  return new PgSmallSerialBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/text.js
class PgTextBuilder extends PgColumnBuilder {
  static [entityKind] = "PgTextBuilder";
  constructor(name, config) {
    super(name, "string", "PgText");
    this.config.enumValues = config.enum;
  }
  build(table) {
    return new PgText(table, this.config);
  }
}

class PgText extends PgColumn {
  static [entityKind] = "PgText";
  enumValues = this.config.enumValues;
  getSQLType() {
    return "text";
  }
}
function text(a, b = {}) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgTextBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/time.js
class PgTimeBuilder extends PgDateColumnBaseBuilder {
  constructor(name, withTimezone, precision) {
    super(name, "string", "PgTime");
    this.withTimezone = withTimezone;
    this.precision = precision;
    this.config.withTimezone = withTimezone;
    this.config.precision = precision;
  }
  static [entityKind] = "PgTimeBuilder";
  build(table) {
    return new PgTime(table, this.config);
  }
}

class PgTime extends PgColumn {
  static [entityKind] = "PgTime";
  withTimezone;
  precision;
  constructor(table, config) {
    super(table, config);
    this.withTimezone = config.withTimezone;
    this.precision = config.precision;
  }
  getSQLType() {
    const precision = this.precision === undefined ? "" : `(${this.precision})`;
    return `time${precision}${this.withTimezone ? " with time zone" : ""}`;
  }
}
function time(a, b = {}) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgTimeBuilder(name, config.withTimezone ?? false, config.precision);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/timestamp.js
class PgTimestampBuilder extends PgDateColumnBaseBuilder {
  static [entityKind] = "PgTimestampBuilder";
  constructor(name, withTimezone, precision) {
    super(name, "date", "PgTimestamp");
    this.config.withTimezone = withTimezone;
    this.config.precision = precision;
  }
  build(table) {
    return new PgTimestamp(table, this.config);
  }
}

class PgTimestamp extends PgColumn {
  static [entityKind] = "PgTimestamp";
  withTimezone;
  precision;
  constructor(table, config) {
    super(table, config);
    this.withTimezone = config.withTimezone;
    this.precision = config.precision;
  }
  getSQLType() {
    const precision = this.precision === undefined ? "" : ` (${this.precision})`;
    return `timestamp${precision}${this.withTimezone ? " with time zone" : ""}`;
  }
  mapFromDriverValue(value) {
    if (typeof value === "string")
      return new Date(this.withTimezone ? value : value + "+0000");
    return value;
  }
  mapToDriverValue = (value) => {
    return value.toISOString();
  };
}

class PgTimestampStringBuilder extends PgDateColumnBaseBuilder {
  static [entityKind] = "PgTimestampStringBuilder";
  constructor(name, withTimezone, precision) {
    super(name, "string", "PgTimestampString");
    this.config.withTimezone = withTimezone;
    this.config.precision = precision;
  }
  build(table) {
    return new PgTimestampString(table, this.config);
  }
}

class PgTimestampString extends PgColumn {
  static [entityKind] = "PgTimestampString";
  withTimezone;
  precision;
  constructor(table, config) {
    super(table, config);
    this.withTimezone = config.withTimezone;
    this.precision = config.precision;
  }
  getSQLType() {
    const precision = this.precision === undefined ? "" : `(${this.precision})`;
    return `timestamp${precision}${this.withTimezone ? " with time zone" : ""}`;
  }
  mapFromDriverValue(value) {
    if (typeof value === "string")
      return value;
    const shortened = value.toISOString().slice(0, -1).replace("T", " ");
    if (this.withTimezone) {
      const offset = value.getTimezoneOffset();
      const sign = offset <= 0 ? "+" : "-";
      return `${shortened}${sign}${Math.floor(Math.abs(offset) / 60).toString().padStart(2, "0")}`;
    }
    return shortened;
  }
}
function timestamp(a, b = {}) {
  const { name, config } = getColumnNameAndConfig(a, b);
  if (config?.mode === "string") {
    return new PgTimestampStringBuilder(name, config.withTimezone ?? false, config.precision);
  }
  return new PgTimestampBuilder(name, config?.withTimezone ?? false, config?.precision);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/uuid.js
class PgUUIDBuilder extends PgColumnBuilder {
  static [entityKind] = "PgUUIDBuilder";
  constructor(name) {
    super(name, "string", "PgUUID");
  }
  defaultRandom() {
    return this.default(sql`gen_random_uuid()`);
  }
  build(table) {
    return new PgUUID(table, this.config);
  }
}

class PgUUID extends PgColumn {
  static [entityKind] = "PgUUID";
  getSQLType() {
    return "uuid";
  }
}
function uuid(name) {
  return new PgUUIDBuilder(name ?? "");
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/varchar.js
class PgVarcharBuilder extends PgColumnBuilder {
  static [entityKind] = "PgVarcharBuilder";
  constructor(name, config) {
    super(name, "string", "PgVarchar");
    this.config.length = config.length;
    this.config.enumValues = config.enum;
  }
  build(table) {
    return new PgVarchar(table, this.config);
  }
}

class PgVarchar extends PgColumn {
  static [entityKind] = "PgVarchar";
  length = this.config.length;
  enumValues = this.config.enumValues;
  getSQLType() {
    return this.length === undefined ? `varchar` : `varchar(${this.length})`;
  }
}
function varchar(a, b = {}) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgVarcharBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/vector_extension/bit.js
class PgBinaryVectorBuilder extends PgColumnBuilder {
  static [entityKind] = "PgBinaryVectorBuilder";
  constructor(name, config) {
    super(name, "string", "PgBinaryVector");
    this.config.dimensions = config.dimensions;
  }
  build(table) {
    return new PgBinaryVector(table, this.config);
  }
}

class PgBinaryVector extends PgColumn {
  static [entityKind] = "PgBinaryVector";
  dimensions = this.config.dimensions;
  getSQLType() {
    return `bit(${this.dimensions})`;
  }
}
function bit(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgBinaryVectorBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/vector_extension/halfvec.js
class PgHalfVectorBuilder extends PgColumnBuilder {
  static [entityKind] = "PgHalfVectorBuilder";
  constructor(name, config) {
    super(name, "array", "PgHalfVector");
    this.config.dimensions = config.dimensions;
  }
  build(table) {
    return new PgHalfVector(table, this.config);
  }
}

class PgHalfVector extends PgColumn {
  static [entityKind] = "PgHalfVector";
  dimensions = this.config.dimensions;
  getSQLType() {
    return `halfvec(${this.dimensions})`;
  }
  mapToDriverValue(value) {
    return JSON.stringify(value);
  }
  mapFromDriverValue(value) {
    return value.slice(1, -1).split(",").map((v) => Number.parseFloat(v));
  }
}
function halfvec(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgHalfVectorBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/vector_extension/sparsevec.js
class PgSparseVectorBuilder extends PgColumnBuilder {
  static [entityKind] = "PgSparseVectorBuilder";
  constructor(name, config) {
    super(name, "string", "PgSparseVector");
    this.config.dimensions = config.dimensions;
  }
  build(table) {
    return new PgSparseVector(table, this.config);
  }
}

class PgSparseVector extends PgColumn {
  static [entityKind] = "PgSparseVector";
  dimensions = this.config.dimensions;
  getSQLType() {
    return `sparsevec(${this.dimensions})`;
  }
}
function sparsevec(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgSparseVectorBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/vector_extension/vector.js
class PgVectorBuilder extends PgColumnBuilder {
  static [entityKind] = "PgVectorBuilder";
  constructor(name, config) {
    super(name, "array", "PgVector");
    this.config.dimensions = config.dimensions;
  }
  build(table) {
    return new PgVector(table, this.config);
  }
}

class PgVector extends PgColumn {
  static [entityKind] = "PgVector";
  dimensions = this.config.dimensions;
  getSQLType() {
    return `vector(${this.dimensions})`;
  }
  mapToDriverValue(value) {
    return JSON.stringify(value);
  }
  mapFromDriverValue(value) {
    return value.slice(1, -1).split(",").map((v) => Number.parseFloat(v));
  }
}
function vector(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new PgVectorBuilder(name, config);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/columns/all.js
function getPgColumnBuilders() {
  return {
    bigint,
    bigserial,
    boolean,
    char,
    cidr,
    customType,
    date,
    doublePrecision,
    inet,
    integer,
    interval,
    json,
    jsonb,
    line,
    macaddr,
    macaddr8,
    numeric,
    point,
    geometry,
    real,
    serial,
    smallint,
    smallserial,
    text,
    time,
    timestamp,
    uuid,
    varchar,
    bit,
    halfvec,
    sparsevec,
    vector
  };
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/table.js
var InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
var EnableRLS = Symbol.for("drizzle:EnableRLS");

class PgTable extends Table {
  static [entityKind] = "PgTable";
  static Symbol = Object.assign({}, Table.Symbol, {
    InlineForeignKeys,
    EnableRLS
  });
  [InlineForeignKeys] = [];
  [EnableRLS] = false;
  [Table.Symbol.ExtraConfigBuilder] = undefined;
  [Table.Symbol.ExtraConfigColumns] = {};
}
function pgTableWithSchema(name, columns, extraConfig, schema, baseName = name) {
  const rawTable = new PgTable(name, schema, baseName);
  const parsedColumns = typeof columns === "function" ? columns(getPgColumnBuilders()) : columns;
  const builtColumns = Object.fromEntries(Object.entries(parsedColumns).map(([name2, colBuilderBase]) => {
    const colBuilder = colBuilderBase;
    colBuilder.setName(name2);
    const column = colBuilder.build(rawTable);
    rawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));
    return [name2, column];
  }));
  const builtColumnsForExtraConfig = Object.fromEntries(Object.entries(parsedColumns).map(([name2, colBuilderBase]) => {
    const colBuilder = colBuilderBase;
    colBuilder.setName(name2);
    const column = colBuilder.buildExtraConfigColumn(rawTable);
    return [name2, column];
  }));
  const table = Object.assign(rawTable, builtColumns);
  table[Table.Symbol.Columns] = builtColumns;
  table[Table.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;
  if (extraConfig) {
    table[PgTable.Symbol.ExtraConfigBuilder] = extraConfig;
  }
  return Object.assign(table, {
    enableRLS: () => {
      table[PgTable.Symbol.EnableRLS] = true;
      return table;
    }
  });
}
var pgTable = (name, columns, extraConfig) => {
  return pgTableWithSchema(name, columns, extraConfig, undefined);
};

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/primary-keys.js
function primaryKey(...config) {
  if (config[0].columns) {
    return new PrimaryKeyBuilder(config[0].columns, config[0].name);
  }
  return new PrimaryKeyBuilder(config);
}

class PrimaryKeyBuilder {
  static [entityKind] = "PgPrimaryKeyBuilder";
  columns;
  name;
  constructor(columns, name) {
    this.columns = columns;
    this.name = name;
  }
  build(table) {
    return new PrimaryKey(table, this.columns, this.name);
  }
}

class PrimaryKey {
  constructor(table, columns, name) {
    this.table = table;
    this.columns = columns;
    this.name = name;
  }
  static [entityKind] = "PgPrimaryKey";
  columns;
  name;
  getName() {
    return this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/sql/expressions/conditions.js
function bindIfParam(value, column) {
  if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
    return new Param(value, column);
  }
  return value;
}
var eq = (left, right) => {
  return sql`${left} = ${bindIfParam(right, left)}`;
};
var ne = (left, right) => {
  return sql`${left} <> ${bindIfParam(right, left)}`;
};
function and(...unfilteredConditions) {
  const conditions = unfilteredConditions.filter((c) => c !== undefined);
  if (conditions.length === 0) {
    return;
  }
  if (conditions.length === 1) {
    return new SQL(conditions);
  }
  return new SQL([
    new StringChunk("("),
    sql.join(conditions, new StringChunk(" and ")),
    new StringChunk(")")
  ]);
}
function or(...unfilteredConditions) {
  const conditions = unfilteredConditions.filter((c) => c !== undefined);
  if (conditions.length === 0) {
    return;
  }
  if (conditions.length === 1) {
    return new SQL(conditions);
  }
  return new SQL([
    new StringChunk("("),
    sql.join(conditions, new StringChunk(" or ")),
    new StringChunk(")")
  ]);
}
function not(condition) {
  return sql`not ${condition}`;
}
var gt = (left, right) => {
  return sql`${left} > ${bindIfParam(right, left)}`;
};
var gte = (left, right) => {
  return sql`${left} >= ${bindIfParam(right, left)}`;
};
var lt = (left, right) => {
  return sql`${left} < ${bindIfParam(right, left)}`;
};
var lte = (left, right) => {
  return sql`${left} <= ${bindIfParam(right, left)}`;
};
function inArray(column, values) {
  if (Array.isArray(values)) {
    if (values.length === 0) {
      return sql`false`;
    }
    return sql`${column} in ${values.map((v) => bindIfParam(v, column))}`;
  }
  return sql`${column} in ${bindIfParam(values, column)}`;
}
function notInArray(column, values) {
  if (Array.isArray(values)) {
    if (values.length === 0) {
      return sql`true`;
    }
    return sql`${column} not in ${values.map((v) => bindIfParam(v, column))}`;
  }
  return sql`${column} not in ${bindIfParam(values, column)}`;
}
function isNull(value) {
  return sql`${value} is null`;
}
function isNotNull(value) {
  return sql`${value} is not null`;
}
function exists(subquery) {
  return sql`exists ${subquery}`;
}
function notExists(subquery) {
  return sql`not exists ${subquery}`;
}
function between(column, min, max) {
  return sql`${column} between ${bindIfParam(min, column)} and ${bindIfParam(max, column)}`;
}
function notBetween(column, min, max) {
  return sql`${column} not between ${bindIfParam(min, column)} and ${bindIfParam(max, column)}`;
}
function like(column, value) {
  return sql`${column} like ${value}`;
}
function notLike(column, value) {
  return sql`${column} not like ${value}`;
}
function ilike(column, value) {
  return sql`${column} ilike ${value}`;
}
function notIlike(column, value) {
  return sql`${column} not ilike ${value}`;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/sql/expressions/select.js
function asc(column) {
  return sql`${column} asc`;
}
function desc(column) {
  return sql`${column} desc`;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/relations.js
class Relation {
  constructor(sourceTable, referencedTable, relationName) {
    this.sourceTable = sourceTable;
    this.referencedTable = referencedTable;
    this.relationName = relationName;
    this.referencedTableName = referencedTable[Table.Symbol.Name];
  }
  static [entityKind] = "Relation";
  referencedTableName;
  fieldName;
}

class Relations {
  constructor(table, config) {
    this.table = table;
    this.config = config;
  }
  static [entityKind] = "Relations";
}

class One extends Relation {
  constructor(sourceTable, referencedTable, config, isNullable) {
    super(sourceTable, referencedTable, config?.relationName);
    this.config = config;
    this.isNullable = isNullable;
  }
  static [entityKind] = "One";
  withFieldName(fieldName) {
    const relation = new One(this.sourceTable, this.referencedTable, this.config, this.isNullable);
    relation.fieldName = fieldName;
    return relation;
  }
}

class Many extends Relation {
  constructor(sourceTable, referencedTable, config) {
    super(sourceTable, referencedTable, config?.relationName);
    this.config = config;
  }
  static [entityKind] = "Many";
  withFieldName(fieldName) {
    const relation = new Many(this.sourceTable, this.referencedTable, this.config);
    relation.fieldName = fieldName;
    return relation;
  }
}
function getOperators() {
  return {
    and,
    between,
    eq,
    exists,
    gt,
    gte,
    ilike,
    inArray,
    isNull,
    isNotNull,
    like,
    lt,
    lte,
    ne,
    not,
    notBetween,
    notExists,
    notLike,
    notIlike,
    notInArray,
    or,
    sql
  };
}
function getOrderByOperators() {
  return {
    sql,
    asc,
    desc
  };
}
function extractTablesRelationalConfig(schema, configHelpers) {
  if (Object.keys(schema).length === 1 && "default" in schema && !is(schema["default"], Table)) {
    schema = schema["default"];
  }
  const tableNamesMap = {};
  const relationsBuffer = {};
  const tablesConfig = {};
  for (const [key, value] of Object.entries(schema)) {
    if (is(value, Table)) {
      const dbName = getTableUniqueName(value);
      const bufferedRelations = relationsBuffer[dbName];
      tableNamesMap[dbName] = key;
      tablesConfig[key] = {
        tsName: key,
        dbName: value[Table.Symbol.Name],
        schema: value[Table.Symbol.Schema],
        columns: value[Table.Symbol.Columns],
        relations: bufferedRelations?.relations ?? {},
        primaryKey: bufferedRelations?.primaryKey ?? []
      };
      for (const column of Object.values(value[Table.Symbol.Columns])) {
        if (column.primary) {
          tablesConfig[key].primaryKey.push(column);
        }
      }
      const extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.(value[Table.Symbol.ExtraConfigColumns]);
      if (extraConfig) {
        for (const configEntry of Object.values(extraConfig)) {
          if (is(configEntry, PrimaryKeyBuilder)) {
            tablesConfig[key].primaryKey.push(...configEntry.columns);
          }
        }
      }
    } else if (is(value, Relations)) {
      const dbName = getTableUniqueName(value.table);
      const tableName = tableNamesMap[dbName];
      const relations2 = value.config(configHelpers(value.table));
      let primaryKey2;
      for (const [relationName, relation] of Object.entries(relations2)) {
        if (tableName) {
          const tableConfig = tablesConfig[tableName];
          tableConfig.relations[relationName] = relation;
          if (primaryKey2) {
            tableConfig.primaryKey.push(...primaryKey2);
          }
        } else {
          if (!(dbName in relationsBuffer)) {
            relationsBuffer[dbName] = {
              relations: {},
              primaryKey: primaryKey2
            };
          }
          relationsBuffer[dbName].relations[relationName] = relation;
        }
      }
    }
  }
  return { tables: tablesConfig, tableNamesMap };
}
function relations(table, relations2) {
  return new Relations(table, (helpers) => Object.fromEntries(Object.entries(relations2(helpers)).map(([key, value]) => [
    key,
    value.withFieldName(key)
  ])));
}
function createOne(sourceTable) {
  return function one(table, config) {
    return new One(sourceTable, table, config, config?.fields.reduce((res, f) => res && f.notNull, true) ?? false);
  };
}
function createMany(sourceTable) {
  return function many(referencedTable, config) {
    return new Many(sourceTable, referencedTable, config);
  };
}
function normalizeRelation(schema, tableNamesMap, relation) {
  if (is(relation, One) && relation.config) {
    return {
      fields: relation.config.fields,
      references: relation.config.references
    };
  }
  const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];
  if (!referencedTableTsName) {
    throw new Error(`Table "${relation.referencedTable[Table.Symbol.Name]}" not found in schema`);
  }
  const referencedTableConfig = schema[referencedTableTsName];
  if (!referencedTableConfig) {
    throw new Error(`Table "${referencedTableTsName}" not found in schema`);
  }
  const sourceTable = relation.sourceTable;
  const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];
  if (!sourceTableTsName) {
    throw new Error(`Table "${sourceTable[Table.Symbol.Name]}" not found in schema`);
  }
  const reverseRelations = [];
  for (const referencedTableRelation of Object.values(referencedTableConfig.relations)) {
    if (relation.relationName && relation !== referencedTableRelation && referencedTableRelation.relationName === relation.relationName || !relation.relationName && referencedTableRelation.referencedTable === relation.sourceTable) {
      reverseRelations.push(referencedTableRelation);
    }
  }
  if (reverseRelations.length > 1) {
    throw relation.relationName ? new Error(`There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"`) : new Error(`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table.Symbol.Name]}". Please specify relation name`);
  }
  if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) {
    return {
      fields: reverseRelations[0].config.references,
      references: reverseRelations[0].config.fields
    };
  }
  throw new Error(`There is not enough information to infer relation "${sourceTableTsName}.${relation.fieldName}"`);
}
function createTableRelationsHelpers(sourceTable) {
  return {
    one: createOne(sourceTable),
    many: createMany(sourceTable)
  };
}
function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelection, mapColumnValue = (value) => value) {
  const result = {};
  for (const [
    selectionItemIndex,
    selectionItem
  ] of buildQueryResultSelection.entries()) {
    if (selectionItem.isJson) {
      const relation = tableConfig.relations[selectionItem.tsKey];
      const rawSubRows = row[selectionItemIndex];
      const subRows = typeof rawSubRows === "string" ? JSON.parse(rawSubRows) : rawSubRows;
      result[selectionItem.tsKey] = is(relation, One) ? subRows && mapRelationalRow(tablesConfig, tablesConfig[selectionItem.relationTableTsKey], subRows, selectionItem.selection, mapColumnValue) : subRows.map((subRow) => mapRelationalRow(tablesConfig, tablesConfig[selectionItem.relationTableTsKey], subRow, selectionItem.selection, mapColumnValue));
    } else {
      const value = mapColumnValue(row[selectionItemIndex]);
      const field = selectionItem.field;
      let decoder;
      if (is(field, Column)) {
        decoder = field;
      } else if (is(field, SQL)) {
        decoder = field.decoder;
      } else {
        decoder = field.sql.decoder;
      }
      result[selectionItem.tsKey] = value === null ? null : decoder.mapFromDriverValue(value);
    }
  }
  return result;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/sql/functions/aggregate.js
function count(expression) {
  return sql`count(${expression || sql.raw("*")})`.mapWith(Number);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/selection-proxy.js
class SelectionProxyHandler {
  static [entityKind] = "SelectionProxyHandler";
  config;
  constructor(config) {
    this.config = { ...config };
  }
  get(subquery, prop) {
    if (prop === "_") {
      return {
        ...subquery["_"],
        selectedFields: new Proxy(subquery._.selectedFields, this)
      };
    }
    if (prop === ViewBaseConfig) {
      return {
        ...subquery[ViewBaseConfig],
        selectedFields: new Proxy(subquery[ViewBaseConfig].selectedFields, this)
      };
    }
    if (typeof prop === "symbol") {
      return subquery[prop];
    }
    const columns = is(subquery, Subquery) ? subquery._.selectedFields : is(subquery, View) ? subquery[ViewBaseConfig].selectedFields : subquery;
    const value = columns[prop];
    if (is(value, SQL.Aliased)) {
      if (this.config.sqlAliasedBehavior === "sql" && !value.isSelectionField) {
        return value.sql;
      }
      const newValue = value.clone();
      newValue.isSelectionField = true;
      return newValue;
    }
    if (is(value, SQL)) {
      if (this.config.sqlBehavior === "sql") {
        return value;
      }
      throw new Error(`You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`);
    }
    if (is(value, Column)) {
      if (this.config.alias) {
        return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(value.table, new TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false))));
      }
      return value;
    }
    if (typeof value !== "object" || value === null) {
      return value;
    }
    return new Proxy(value, new SelectionProxyHandler(this.config));
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/indexes.js
class IndexBuilderOn {
  constructor(unique, name) {
    this.unique = unique;
    this.name = name;
  }
  static [entityKind] = "PgIndexBuilderOn";
  on(...columns) {
    return new IndexBuilder(columns.map((it) => {
      if (is(it, SQL)) {
        return it;
      }
      it = it;
      const clonedIndexedColumn = new IndexedColumn(it.name, !!it.keyAsName, it.columnType, it.indexConfig);
      it.indexConfig = JSON.parse(JSON.stringify(it.defaultConfig));
      return clonedIndexedColumn;
    }), this.unique, false, this.name);
  }
  onOnly(...columns) {
    return new IndexBuilder(columns.map((it) => {
      if (is(it, SQL)) {
        return it;
      }
      it = it;
      const clonedIndexedColumn = new IndexedColumn(it.name, !!it.keyAsName, it.columnType, it.indexConfig);
      it.indexConfig = it.defaultConfig;
      return clonedIndexedColumn;
    }), this.unique, true, this.name);
  }
  using(method, ...columns) {
    return new IndexBuilder(columns.map((it) => {
      if (is(it, SQL)) {
        return it;
      }
      it = it;
      const clonedIndexedColumn = new IndexedColumn(it.name, !!it.keyAsName, it.columnType, it.indexConfig);
      it.indexConfig = JSON.parse(JSON.stringify(it.defaultConfig));
      return clonedIndexedColumn;
    }), this.unique, true, this.name, method);
  }
}

class IndexBuilder {
  static [entityKind] = "PgIndexBuilder";
  config;
  constructor(columns, unique, only, name, method = "btree") {
    this.config = {
      name,
      columns,
      unique,
      only,
      method
    };
  }
  concurrently() {
    this.config.concurrently = true;
    return this;
  }
  with(obj) {
    this.config.with = obj;
    return this;
  }
  where(condition) {
    this.config.where = condition;
    return this;
  }
  build(table) {
    return new Index(this.config, table);
  }
}

class Index {
  static [entityKind] = "PgIndex";
  config;
  constructor(config, table) {
    this.config = { ...config, table };
  }
}
function index(name) {
  return new IndexBuilderOn(false, name);
}
function uniqueIndex(name) {
  return new IndexBuilderOn(true, name);
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/casing.js
function toSnakeCase(input) {
  const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
  return words.map((word) => word.toLowerCase()).join("_");
}
function toCamelCase(input) {
  const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
  return words.reduce((acc, word, i) => {
    const formattedWord = i === 0 ? word.toLowerCase() : `${word[0].toUpperCase()}${word.slice(1)}`;
    return acc + formattedWord;
  }, "");
}
function noopCase(input) {
  return input;
}

class CasingCache {
  static [entityKind] = "CasingCache";
  cache = {};
  cachedTables = {};
  convert;
  constructor(casing) {
    this.convert = casing === "snake_case" ? toSnakeCase : casing === "camelCase" ? toCamelCase : noopCase;
  }
  getColumnCasing(column) {
    if (!column.keyAsName)
      return column.name;
    const schema = column.table[Table.Symbol.Schema] ?? "public";
    const tableName = column.table[Table.Symbol.OriginalName];
    const key = `${schema}.${tableName}.${column.name}`;
    if (!this.cache[key]) {
      this.cacheTable(column.table);
    }
    return this.cache[key];
  }
  cacheTable(table) {
    const schema = table[Table.Symbol.Schema] ?? "public";
    const tableName = table[Table.Symbol.OriginalName];
    const tableKey = `${schema}.${tableName}`;
    if (!this.cachedTables[tableKey]) {
      for (const column of Object.values(table[Table.Symbol.Columns])) {
        const columnKey = `${tableKey}.${column.name}`;
        this.cache[columnKey] = this.convert(column.name);
      }
      this.cachedTables[tableKey] = true;
    }
  }
  clearCache() {
    this.cache = {};
    this.cachedTables = {};
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/view-base.js
class PgViewBase extends View {
  static [entityKind] = "PgViewBase";
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/dialect.js
class PgDialect {
  static [entityKind] = "PgDialect";
  casing;
  constructor(config) {
    this.casing = new CasingCache(config?.casing);
  }
  async migrate(migrations, session, config) {
    const migrationsTable = typeof config === "string" ? "__drizzle_migrations" : config.migrationsTable ?? "__drizzle_migrations";
    const migrationsSchema = typeof config === "string" ? "drizzle" : config.migrationsSchema ?? "drizzle";
    const migrationTableCreate = sql`
			CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} (
				id SERIAL PRIMARY KEY,
				hash text NOT NULL,
				created_at bigint
			)
		`;
    await session.execute(sql`CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}`);
    await session.execute(migrationTableCreate);
    const dbMigrations = await session.all(sql`select id, hash, created_at from ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} order by created_at desc limit 1`);
    const lastDbMigration = dbMigrations[0];
    await session.transaction(async (tx) => {
      for await (const migration of migrations) {
        if (!lastDbMigration || Number(lastDbMigration.created_at) < migration.folderMillis) {
          for (const stmt of migration.sql) {
            await tx.execute(sql.raw(stmt));
          }
          await tx.execute(sql`insert into ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} ("hash", "created_at") values(${migration.hash}, ${migration.folderMillis})`);
        }
      }
    });
  }
  escapeName(name) {
    return `"${name.replace(/"/g, '""')}"`;
  }
  escapeParam(num) {
    return `$${num + 1}`;
  }
  escapeString(str) {
    return `'${str.replace(/'/g, "''")}'`;
  }
  buildWithCTE(queries) {
    if (!queries?.length)
      return;
    const withSqlChunks = [sql`with `];
    for (const [i, w] of queries.entries()) {
      withSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);
      if (i < queries.length - 1) {
        withSqlChunks.push(sql`, `);
      }
    }
    withSqlChunks.push(sql` `);
    return sql.join(withSqlChunks);
  }
  buildDeleteQuery({ table, where, returning, withList }) {
    const withSql = this.buildWithCTE(withList);
    const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : undefined;
    const whereSql = where ? sql` where ${where}` : undefined;
    return sql`${withSql}delete from ${table}${whereSql}${returningSql}`;
  }
  buildUpdateSet(table, set) {
    const tableColumns = table[Table.Symbol.Columns];
    const columnNames = Object.keys(tableColumns).filter((colName) => set[colName] !== undefined || tableColumns[colName]?.onUpdateFn !== undefined);
    const setSize = columnNames.length;
    return sql.join(columnNames.flatMap((colName, i) => {
      const col = tableColumns[colName];
      const onUpdateFnResult = col.onUpdateFn?.();
      const value = set[colName] ?? (is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col));
      const res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`;
      if (i < setSize - 1) {
        return [res, sql.raw(", ")];
      }
      return [res];
    }));
  }
  buildUpdateQuery({ table, set, where, returning, withList, from, joins }) {
    const withSql = this.buildWithCTE(withList);
    const tableName = table[PgTable.Symbol.Name];
    const tableSchema = table[PgTable.Symbol.Schema];
    const origTableName = table[PgTable.Symbol.OriginalName];
    const alias = tableName === origTableName ? undefined : tableName;
    const tableSql = sql`${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}`;
    const setSql = this.buildUpdateSet(table, set);
    const fromSql = from && sql.join([sql.raw(" from "), this.buildFromTable(from)]);
    const joinsSql = this.buildJoins(joins);
    const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: !from })}` : undefined;
    const whereSql = where ? sql` where ${where}` : undefined;
    return sql`${withSql}update ${tableSql} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}`;
  }
  buildSelection(fields, { isSingleTable = false } = {}) {
    const columnsLen = fields.length;
    const chunks = fields.flatMap(({ field }, i) => {
      const chunk = [];
      if (is(field, SQL.Aliased) && field.isSelectionField) {
        chunk.push(sql.identifier(field.fieldAlias));
      } else if (is(field, SQL.Aliased) || is(field, SQL)) {
        const query = is(field, SQL.Aliased) ? field.sql : field;
        if (isSingleTable) {
          chunk.push(new SQL(query.queryChunks.map((c) => {
            if (is(c, PgColumn)) {
              return sql.identifier(this.casing.getColumnCasing(c));
            }
            return c;
          })));
        } else {
          chunk.push(query);
        }
        if (is(field, SQL.Aliased)) {
          chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
        }
      } else if (is(field, Column)) {
        if (isSingleTable) {
          chunk.push(sql.identifier(this.casing.getColumnCasing(field)));
        } else {
          chunk.push(field);
        }
      } else if (is(field, Subquery)) {
        const entries = Object.entries(field._.selectedFields);
        if (entries.length === 1) {
          const entry = entries[0][1];
          const fieldDecoder = is(entry, SQL) ? entry.decoder : is(entry, Column) ? { mapFromDriverValue: (v) => entry.mapFromDriverValue(v) } : entry.sql.decoder;
          if (fieldDecoder) {
            field._.sql.decoder = fieldDecoder;
          }
        }
        chunk.push(field);
      }
      if (i < columnsLen - 1) {
        chunk.push(sql`, `);
      }
      return chunk;
    });
    return sql.join(chunks);
  }
  buildJoins(joins) {
    if (!joins || joins.length === 0) {
      return;
    }
    const joinsArray = [];
    for (const [index2, joinMeta] of joins.entries()) {
      if (index2 === 0) {
        joinsArray.push(sql` `);
      }
      const table = joinMeta.table;
      const lateralSql = joinMeta.lateral ? sql` lateral` : undefined;
      const onSql = joinMeta.on ? sql` on ${joinMeta.on}` : undefined;
      if (is(table, PgTable)) {
        const tableName = table[PgTable.Symbol.Name];
        const tableSchema = table[PgTable.Symbol.Schema];
        const origTableName = table[PgTable.Symbol.OriginalName];
        const alias = tableName === origTableName ? undefined : joinMeta.alias;
        joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}`);
      } else if (is(table, View)) {
        const viewName = table[ViewBaseConfig].name;
        const viewSchema = table[ViewBaseConfig].schema;
        const origViewName = table[ViewBaseConfig].originalName;
        const alias = viewName === origViewName ? undefined : joinMeta.alias;
        joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${viewSchema ? sql`${sql.identifier(viewSchema)}.` : undefined}${sql.identifier(origViewName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}`);
      } else {
        joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${table}${onSql}`);
      }
      if (index2 < joins.length - 1) {
        joinsArray.push(sql` `);
      }
    }
    return sql.join(joinsArray);
  }
  buildFromTable(table) {
    if (is(table, Table) && table[Table.Symbol.IsAlias]) {
      let fullName = sql`${sql.identifier(table[Table.Symbol.OriginalName])}`;
      if (table[Table.Symbol.Schema]) {
        fullName = sql`${sql.identifier(table[Table.Symbol.Schema])}.${fullName}`;
      }
      return sql`${fullName} ${sql.identifier(table[Table.Symbol.Name])}`;
    }
    return table;
  }
  buildSelectQuery({
    withList,
    fields,
    fieldsFlat,
    where,
    having,
    table,
    joins,
    orderBy,
    groupBy,
    limit,
    offset,
    lockingClause,
    distinct,
    setOperators
  }) {
    const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
    for (const f of fieldsList) {
      if (is(f.field, Column) && getTableName(f.field.table) !== (is(table, Subquery) ? table._.alias : is(table, PgViewBase) ? table[ViewBaseConfig].name : is(table, SQL) ? undefined : getTableName(table)) && !((table2) => joins?.some(({ alias }) => alias === (table2[Table.Symbol.IsAlias] ? getTableName(table2) : table2[Table.Symbol.BaseName])))(f.field.table)) {
        const tableName = getTableName(f.field.table);
        throw new Error(`Your "${f.path.join("->")}" field references a column "${tableName}"."${f.field.name}", but the table "${tableName}" is not part of the query! Did you forget to join it?`);
      }
    }
    const isSingleTable = !joins || joins.length === 0;
    const withSql = this.buildWithCTE(withList);
    let distinctSql;
    if (distinct) {
      distinctSql = distinct === true ? sql` distinct` : sql` distinct on (${sql.join(distinct.on, sql`, `)})`;
    }
    const selection = this.buildSelection(fieldsList, { isSingleTable });
    const tableSql = this.buildFromTable(table);
    const joinsSql = this.buildJoins(joins);
    const whereSql = where ? sql` where ${where}` : undefined;
    const havingSql = having ? sql` having ${having}` : undefined;
    let orderBySql;
    if (orderBy && orderBy.length > 0) {
      orderBySql = sql` order by ${sql.join(orderBy, sql`, `)}`;
    }
    let groupBySql;
    if (groupBy && groupBy.length > 0) {
      groupBySql = sql` group by ${sql.join(groupBy, sql`, `)}`;
    }
    const limitSql = typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : undefined;
    const offsetSql = offset ? sql` offset ${offset}` : undefined;
    const lockingClauseSql = sql.empty();
    if (lockingClause) {
      const clauseSql = sql` for ${sql.raw(lockingClause.strength)}`;
      if (lockingClause.config.of) {
        clauseSql.append(sql` of ${sql.join(Array.isArray(lockingClause.config.of) ? lockingClause.config.of : [lockingClause.config.of], sql`, `)}`);
      }
      if (lockingClause.config.noWait) {
        clauseSql.append(sql` nowait`);
      } else if (lockingClause.config.skipLocked) {
        clauseSql.append(sql` skip locked`);
      }
      lockingClauseSql.append(clauseSql);
    }
    const finalQuery = sql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}${lockingClauseSql}`;
    if (setOperators.length > 0) {
      return this.buildSetOperations(finalQuery, setOperators);
    }
    return finalQuery;
  }
  buildSetOperations(leftSelect, setOperators) {
    const [setOperator, ...rest] = setOperators;
    if (!setOperator) {
      throw new Error("Cannot pass undefined values to any set operator");
    }
    if (rest.length === 0) {
      return this.buildSetOperationQuery({ leftSelect, setOperator });
    }
    return this.buildSetOperations(this.buildSetOperationQuery({ leftSelect, setOperator }), rest);
  }
  buildSetOperationQuery({
    leftSelect,
    setOperator: { type: type2, isAll, rightSelect, limit, orderBy, offset }
  }) {
    const leftChunk = sql`(${leftSelect.getSQL()}) `;
    const rightChunk = sql`(${rightSelect.getSQL()})`;
    let orderBySql;
    if (orderBy && orderBy.length > 0) {
      const orderByValues = [];
      for (const singleOrderBy of orderBy) {
        if (is(singleOrderBy, PgColumn)) {
          orderByValues.push(sql.identifier(singleOrderBy.name));
        } else if (is(singleOrderBy, SQL)) {
          for (let i = 0;i < singleOrderBy.queryChunks.length; i++) {
            const chunk = singleOrderBy.queryChunks[i];
            if (is(chunk, PgColumn)) {
              singleOrderBy.queryChunks[i] = sql.identifier(chunk.name);
            }
          }
          orderByValues.push(sql`${singleOrderBy}`);
        } else {
          orderByValues.push(sql`${singleOrderBy}`);
        }
      }
      orderBySql = sql` order by ${sql.join(orderByValues, sql`, `)} `;
    }
    const limitSql = typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : undefined;
    const operatorChunk = sql.raw(`${type2} ${isAll ? "all " : ""}`);
    const offsetSql = offset ? sql` offset ${offset}` : undefined;
    return sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`;
  }
  buildInsertQuery({ table, values: valuesOrSelect, onConflict, returning, withList, select, overridingSystemValue_ }) {
    const valuesSqlList = [];
    const columns = table[Table.Symbol.Columns];
    const colEntries = Object.entries(columns).filter(([_, col]) => !col.shouldDisableInsert());
    const insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column)));
    if (select) {
      const select2 = valuesOrSelect;
      if (is(select2, SQL)) {
        valuesSqlList.push(select2);
      } else {
        valuesSqlList.push(select2.getSQL());
      }
    } else {
      const values = valuesOrSelect;
      valuesSqlList.push(sql.raw("values "));
      for (const [valueIndex, value] of values.entries()) {
        const valueList = [];
        for (const [fieldName, col] of colEntries) {
          const colValue = value[fieldName];
          if (colValue === undefined || is(colValue, Param) && colValue.value === undefined) {
            if (col.defaultFn !== undefined) {
              const defaultFnResult = col.defaultFn();
              const defaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col);
              valueList.push(defaultValue);
            } else if (!col.default && col.onUpdateFn !== undefined) {
              const onUpdateFnResult = col.onUpdateFn();
              const newValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col);
              valueList.push(newValue);
            } else {
              valueList.push(sql`default`);
            }
          } else {
            valueList.push(colValue);
          }
        }
        valuesSqlList.push(valueList);
        if (valueIndex < values.length - 1) {
          valuesSqlList.push(sql`, `);
        }
      }
    }
    const withSql = this.buildWithCTE(withList);
    const valuesSql = sql.join(valuesSqlList);
    const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : undefined;
    const onConflictSql = onConflict ? sql` on conflict ${onConflict}` : undefined;
    const overridingSql = overridingSystemValue_ === true ? sql`overriding system value ` : undefined;
    return sql`${withSql}insert into ${table} ${insertOrder} ${overridingSql}${valuesSql}${onConflictSql}${returningSql}`;
  }
  buildRefreshMaterializedViewQuery({ view, concurrently, withNoData }) {
    const concurrentlySql = concurrently ? sql` concurrently` : undefined;
    const withNoDataSql = withNoData ? sql` with no data` : undefined;
    return sql`refresh materialized view${concurrentlySql} ${view}${withNoDataSql}`;
  }
  prepareTyping(encoder) {
    if (is(encoder, PgJsonb) || is(encoder, PgJson)) {
      return "json";
    } else if (is(encoder, PgNumeric)) {
      return "decimal";
    } else if (is(encoder, PgTime)) {
      return "time";
    } else if (is(encoder, PgTimestamp) || is(encoder, PgTimestampString)) {
      return "timestamp";
    } else if (is(encoder, PgDate) || is(encoder, PgDateString)) {
      return "date";
    } else if (is(encoder, PgUUID)) {
      return "uuid";
    } else {
      return "none";
    }
  }
  sqlToQuery(sql2, invokeSource) {
    return sql2.toQuery({
      casing: this.casing,
      escapeName: this.escapeName,
      escapeParam: this.escapeParam,
      escapeString: this.escapeString,
      prepareTyping: this.prepareTyping,
      invokeSource
    });
  }
  buildRelationalQueryWithoutPK({
    fullSchema,
    schema,
    tableNamesMap,
    table,
    tableConfig,
    queryConfig: config,
    tableAlias,
    nestedQueryRelation,
    joinOn
  }) {
    let selection = [];
    let limit, offset, orderBy = [], where;
    const joins = [];
    if (config === true) {
      const selectionEntries = Object.entries(tableConfig.columns);
      selection = selectionEntries.map(([key, value]) => ({
        dbKey: value.name,
        tsKey: key,
        field: aliasedTableColumn(value, tableAlias),
        relationTableTsKey: undefined,
        isJson: false,
        selection: []
      }));
    } else {
      const aliasedColumns = Object.fromEntries(Object.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]));
      if (config.where) {
        const whereSql = typeof config.where === "function" ? config.where(aliasedColumns, getOperators()) : config.where;
        where = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias);
      }
      const fieldsSelection = [];
      let selectedColumns = [];
      if (config.columns) {
        let isIncludeMode = false;
        for (const [field, value] of Object.entries(config.columns)) {
          if (value === undefined) {
            continue;
          }
          if (field in tableConfig.columns) {
            if (!isIncludeMode && value === true) {
              isIncludeMode = true;
            }
            selectedColumns.push(field);
          }
        }
        if (selectedColumns.length > 0) {
          selectedColumns = isIncludeMode ? selectedColumns.filter((c) => config.columns?.[c] === true) : Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key));
        }
      } else {
        selectedColumns = Object.keys(tableConfig.columns);
      }
      for (const field of selectedColumns) {
        const column = tableConfig.columns[field];
        fieldsSelection.push({ tsKey: field, value: column });
      }
      let selectedRelations = [];
      if (config.with) {
        selectedRelations = Object.entries(config.with).filter((entry) => !!entry[1]).map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey] }));
      }
      let extras;
      if (config.extras) {
        extras = typeof config.extras === "function" ? config.extras(aliasedColumns, { sql }) : config.extras;
        for (const [tsKey, value] of Object.entries(extras)) {
          fieldsSelection.push({
            tsKey,
            value: mapColumnsInAliasedSQLToAlias(value, tableAlias)
          });
        }
      }
      for (const { tsKey, value } of fieldsSelection) {
        selection.push({
          dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
          tsKey,
          field: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value,
          relationTableTsKey: undefined,
          isJson: false,
          selection: []
        });
      }
      let orderByOrig = typeof config.orderBy === "function" ? config.orderBy(aliasedColumns, getOrderByOperators()) : config.orderBy ?? [];
      if (!Array.isArray(orderByOrig)) {
        orderByOrig = [orderByOrig];
      }
      orderBy = orderByOrig.map((orderByValue) => {
        if (is(orderByValue, Column)) {
          return aliasedTableColumn(orderByValue, tableAlias);
        }
        return mapColumnsInSQLToAlias(orderByValue, tableAlias);
      });
      limit = config.limit;
      offset = config.offset;
      for (const {
        tsKey: selectedRelationTsKey,
        queryConfig: selectedRelationConfigValue,
        relation
      } of selectedRelations) {
        const normalizedRelation = normalizeRelation(schema, tableNamesMap, relation);
        const relationTableName = getTableUniqueName(relation.referencedTable);
        const relationTableTsName = tableNamesMap[relationTableName];
        const relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`;
        const joinOn2 = and(...normalizedRelation.fields.map((field2, i) => eq(aliasedTableColumn(normalizedRelation.references[i], relationTableAlias), aliasedTableColumn(field2, tableAlias))));
        const builtRelation = this.buildRelationalQueryWithoutPK({
          fullSchema,
          schema,
          tableNamesMap,
          table: fullSchema[relationTableTsName],
          tableConfig: schema[relationTableTsName],
          queryConfig: is(relation, One) ? selectedRelationConfigValue === true ? { limit: 1 } : { ...selectedRelationConfigValue, limit: 1 } : selectedRelationConfigValue,
          tableAlias: relationTableAlias,
          joinOn: joinOn2,
          nestedQueryRelation: relation
        });
        const field = sql`${sql.identifier(relationTableAlias)}.${sql.identifier("data")}`.as(selectedRelationTsKey);
        joins.push({
          on: sql`true`,
          table: new Subquery(builtRelation.sql, {}, relationTableAlias),
          alias: relationTableAlias,
          joinType: "left",
          lateral: true
        });
        selection.push({
          dbKey: selectedRelationTsKey,
          tsKey: selectedRelationTsKey,
          field,
          relationTableTsKey: relationTableTsName,
          isJson: true,
          selection: builtRelation.selection
        });
      }
    }
    if (selection.length === 0) {
      throw new DrizzleError({ message: `No fields selected for table "${tableConfig.tsName}" ("${tableAlias}")` });
    }
    let result;
    where = and(joinOn, where);
    if (nestedQueryRelation) {
      let field = sql`json_build_array(${sql.join(selection.map(({ field: field2, tsKey, isJson }) => isJson ? sql`${sql.identifier(`${tableAlias}_${tsKey}`)}.${sql.identifier("data")}` : is(field2, SQL.Aliased) ? field2.sql : field2), sql`, `)})`;
      if (is(nestedQueryRelation, Many)) {
        field = sql`coalesce(json_agg(${field}${orderBy.length > 0 ? sql` order by ${sql.join(orderBy, sql`, `)}` : undefined}), '[]'::json)`;
      }
      const nestedSelection = [{
        dbKey: "data",
        tsKey: "data",
        field: field.as("data"),
        isJson: true,
        relationTableTsKey: tableConfig.tsName,
        selection
      }];
      const needsSubquery = limit !== undefined || offset !== undefined || orderBy.length > 0;
      if (needsSubquery) {
        result = this.buildSelectQuery({
          table: aliasedTable(table, tableAlias),
          fields: {},
          fieldsFlat: [{
            path: [],
            field: sql.raw("*")
          }],
          where,
          limit,
          offset,
          orderBy,
          setOperators: []
        });
        where = undefined;
        limit = undefined;
        offset = undefined;
        orderBy = [];
      } else {
        result = aliasedTable(table, tableAlias);
      }
      result = this.buildSelectQuery({
        table: is(result, PgTable) ? result : new Subquery(result, {}, tableAlias),
        fields: {},
        fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
          path: [],
          field: is(field2, Column) ? aliasedTableColumn(field2, tableAlias) : field2
        })),
        joins,
        where,
        limit,
        offset,
        orderBy,
        setOperators: []
      });
    } else {
      result = this.buildSelectQuery({
        table: aliasedTable(table, tableAlias),
        fields: {},
        fieldsFlat: selection.map(({ field }) => ({
          path: [],
          field: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field
        })),
        joins,
        where,
        limit,
        offset,
        orderBy,
        setOperators: []
      });
    }
    return {
      tableTsKey: tableConfig.tsName,
      sql: result,
      selection
    };
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/query-builders/query-builder.js
class TypedQueryBuilder {
  static [entityKind] = "TypedQueryBuilder";
  getSelectedFields() {
    return this._.selectedFields;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/select.js
class PgSelectBuilder {
  static [entityKind] = "PgSelectBuilder";
  fields;
  session;
  dialect;
  withList = [];
  distinct;
  constructor(config) {
    this.fields = config.fields;
    this.session = config.session;
    this.dialect = config.dialect;
    if (config.withList) {
      this.withList = config.withList;
    }
    this.distinct = config.distinct;
  }
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  from(source) {
    const isPartialSelect = !!this.fields;
    const src = source;
    let fields;
    if (this.fields) {
      fields = this.fields;
    } else if (is(src, Subquery)) {
      fields = Object.fromEntries(Object.keys(src._.selectedFields).map((key) => [key, src[key]]));
    } else if (is(src, PgViewBase)) {
      fields = src[ViewBaseConfig].selectedFields;
    } else if (is(src, SQL)) {
      fields = {};
    } else {
      fields = getTableColumns(src);
    }
    return new PgSelectBase({
      table: src,
      fields,
      isPartialSelect,
      session: this.session,
      dialect: this.dialect,
      withList: this.withList,
      distinct: this.distinct
    }).setToken(this.authToken);
  }
}

class PgSelectQueryBuilderBase extends TypedQueryBuilder {
  static [entityKind] = "PgSelectQueryBuilder";
  _;
  config;
  joinsNotNullableMap;
  tableName;
  isPartialSelect;
  session;
  dialect;
  cacheConfig = undefined;
  usedTables = /* @__PURE__ */ new Set;
  constructor({ table, fields, isPartialSelect, session, dialect, withList, distinct }) {
    super();
    this.config = {
      withList,
      table,
      fields: { ...fields },
      distinct,
      setOperators: []
    };
    this.isPartialSelect = isPartialSelect;
    this.session = session;
    this.dialect = dialect;
    this._ = {
      selectedFields: fields,
      config: this.config
    };
    this.tableName = getTableLikeName(table);
    this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {};
    for (const item of extractUsedTable(table))
      this.usedTables.add(item);
  }
  getUsedTables() {
    return [...this.usedTables];
  }
  createJoin(joinType, lateral) {
    return (table, on) => {
      const baseTableName = this.tableName;
      const tableName = getTableLikeName(table);
      for (const item of extractUsedTable(table))
        this.usedTables.add(item);
      if (typeof tableName === "string" && this.config.joins?.some((join4) => join4.alias === tableName)) {
        throw new Error(`Alias "${tableName}" is already used in this query`);
      }
      if (!this.isPartialSelect) {
        if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") {
          this.config.fields = {
            [baseTableName]: this.config.fields
          };
        }
        if (typeof tableName === "string" && !is(table, SQL)) {
          const selection = is(table, Subquery) ? table._.selectedFields : is(table, View) ? table[ViewBaseConfig].selectedFields : table[Table.Symbol.Columns];
          this.config.fields[tableName] = selection;
        }
      }
      if (typeof on === "function") {
        on = on(new Proxy(this.config.fields, new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" })));
      }
      if (!this.config.joins) {
        this.config.joins = [];
      }
      this.config.joins.push({ on, table, joinType, alias: tableName, lateral });
      if (typeof tableName === "string") {
        switch (joinType) {
          case "left": {
            this.joinsNotNullableMap[tableName] = false;
            break;
          }
          case "right": {
            this.joinsNotNullableMap = Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]));
            this.joinsNotNullableMap[tableName] = true;
            break;
          }
          case "cross":
          case "inner": {
            this.joinsNotNullableMap[tableName] = true;
            break;
          }
          case "full": {
            this.joinsNotNullableMap = Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]));
            this.joinsNotNullableMap[tableName] = false;
            break;
          }
        }
      }
      return this;
    };
  }
  leftJoin = this.createJoin("left", false);
  leftJoinLateral = this.createJoin("left", true);
  rightJoin = this.createJoin("right", false);
  innerJoin = this.createJoin("inner", false);
  innerJoinLateral = this.createJoin("inner", true);
  fullJoin = this.createJoin("full", false);
  crossJoin = this.createJoin("cross", false);
  crossJoinLateral = this.createJoin("cross", true);
  createSetOperator(type2, isAll) {
    return (rightSelection) => {
      const rightSelect = typeof rightSelection === "function" ? rightSelection(getPgSetOperators()) : rightSelection;
      if (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) {
        throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");
      }
      this.config.setOperators.push({ type: type2, isAll, rightSelect });
      return this;
    };
  }
  union = this.createSetOperator("union", false);
  unionAll = this.createSetOperator("union", true);
  intersect = this.createSetOperator("intersect", false);
  intersectAll = this.createSetOperator("intersect", true);
  except = this.createSetOperator("except", false);
  exceptAll = this.createSetOperator("except", true);
  addSetOperators(setOperators) {
    this.config.setOperators.push(...setOperators);
    return this;
  }
  where(where) {
    if (typeof where === "function") {
      where = where(new Proxy(this.config.fields, new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" })));
    }
    this.config.where = where;
    return this;
  }
  having(having) {
    if (typeof having === "function") {
      having = having(new Proxy(this.config.fields, new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" })));
    }
    this.config.having = having;
    return this;
  }
  groupBy(...columns) {
    if (typeof columns[0] === "function") {
      const groupBy = columns[0](new Proxy(this.config.fields, new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" })));
      this.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy];
    } else {
      this.config.groupBy = columns;
    }
    return this;
  }
  orderBy(...columns) {
    if (typeof columns[0] === "function") {
      const orderBy = columns[0](new Proxy(this.config.fields, new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" })));
      const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];
      if (this.config.setOperators.length > 0) {
        this.config.setOperators.at(-1).orderBy = orderByArray;
      } else {
        this.config.orderBy = orderByArray;
      }
    } else {
      const orderByArray = columns;
      if (this.config.setOperators.length > 0) {
        this.config.setOperators.at(-1).orderBy = orderByArray;
      } else {
        this.config.orderBy = orderByArray;
      }
    }
    return this;
  }
  limit(limit) {
    if (this.config.setOperators.length > 0) {
      this.config.setOperators.at(-1).limit = limit;
    } else {
      this.config.limit = limit;
    }
    return this;
  }
  offset(offset) {
    if (this.config.setOperators.length > 0) {
      this.config.setOperators.at(-1).offset = offset;
    } else {
      this.config.offset = offset;
    }
    return this;
  }
  for(strength, config = {}) {
    this.config.lockingClause = { strength, config };
    return this;
  }
  getSQL() {
    return this.dialect.buildSelectQuery(this.config);
  }
  toSQL() {
    const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
    return rest;
  }
  as(alias) {
    const usedTables = [];
    usedTables.push(...extractUsedTable(this.config.table));
    if (this.config.joins) {
      for (const it of this.config.joins)
        usedTables.push(...extractUsedTable(it.table));
    }
    return new Proxy(new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]), new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }));
  }
  getSelectedFields() {
    return new Proxy(this.config.fields, new SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: "alias", sqlBehavior: "error" }));
  }
  $dynamic() {
    return this;
  }
  $withCache(config) {
    this.cacheConfig = config === undefined ? { config: {}, enable: true, autoInvalidate: true } : config === false ? { enable: false } : { enable: true, autoInvalidate: true, ...config };
    return this;
  }
}

class PgSelectBase extends PgSelectQueryBuilderBase {
  static [entityKind] = "PgSelect";
  _prepare(name) {
    const { session, config, dialect, joinsNotNullableMap, authToken, cacheConfig, usedTables } = this;
    if (!session) {
      throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");
    }
    const { fields } = config;
    return tracer.startActiveSpan("drizzle.prepareQuery", () => {
      const fieldsList = orderSelectedFields(fields);
      const query = session.prepareQuery(dialect.sqlToQuery(this.getSQL()), fieldsList, name, true, undefined, {
        type: "select",
        tables: [...usedTables]
      }, cacheConfig);
      query.joinsNotNullableMap = joinsNotNullableMap;
      return query.setToken(authToken);
    });
  }
  prepare(name) {
    return this._prepare(name);
  }
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  execute = (placeholderValues) => {
    return tracer.startActiveSpan("drizzle.operation", () => {
      return this._prepare().execute(placeholderValues, this.authToken);
    });
  };
}
applyMixins(PgSelectBase, [QueryPromise]);
function createSetOperator(type2, isAll) {
  return (leftSelect, rightSelect, ...restSelects) => {
    const setOperators = [rightSelect, ...restSelects].map((select) => ({
      type: type2,
      isAll,
      rightSelect: select
    }));
    for (const setOperator of setOperators) {
      if (!haveSameKeys(leftSelect.getSelectedFields(), setOperator.rightSelect.getSelectedFields())) {
        throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");
      }
    }
    return leftSelect.addSetOperators(setOperators);
  };
}
var getPgSetOperators = () => ({
  union,
  unionAll,
  intersect,
  intersectAll,
  except,
  exceptAll
});
var union = createSetOperator("union", false);
var unionAll = createSetOperator("union", true);
var intersect = createSetOperator("intersect", false);
var intersectAll = createSetOperator("intersect", true);
var except = createSetOperator("except", false);
var exceptAll = createSetOperator("except", true);

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/query-builder.js
class QueryBuilder {
  static [entityKind] = "PgQueryBuilder";
  dialect;
  dialectConfig;
  constructor(dialect) {
    this.dialect = is(dialect, PgDialect) ? dialect : undefined;
    this.dialectConfig = is(dialect, PgDialect) ? undefined : dialect;
  }
  $with = (alias, selection) => {
    const queryBuilder = this;
    const as = (qb) => {
      if (typeof qb === "function") {
        qb = qb(queryBuilder);
      }
      return new Proxy(new WithSubquery(qb.getSQL(), selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), alias, true), new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }));
    };
    return { as };
  };
  with(...queries) {
    const self2 = this;
    function select(fields) {
      return new PgSelectBuilder({
        fields: fields ?? undefined,
        session: undefined,
        dialect: self2.getDialect(),
        withList: queries
      });
    }
    function selectDistinct(fields) {
      return new PgSelectBuilder({
        fields: fields ?? undefined,
        session: undefined,
        dialect: self2.getDialect(),
        distinct: true
      });
    }
    function selectDistinctOn(on, fields) {
      return new PgSelectBuilder({
        fields: fields ?? undefined,
        session: undefined,
        dialect: self2.getDialect(),
        distinct: { on }
      });
    }
    return { select, selectDistinct, selectDistinctOn };
  }
  select(fields) {
    return new PgSelectBuilder({
      fields: fields ?? undefined,
      session: undefined,
      dialect: this.getDialect()
    });
  }
  selectDistinct(fields) {
    return new PgSelectBuilder({
      fields: fields ?? undefined,
      session: undefined,
      dialect: this.getDialect(),
      distinct: true
    });
  }
  selectDistinctOn(on, fields) {
    return new PgSelectBuilder({
      fields: fields ?? undefined,
      session: undefined,
      dialect: this.getDialect(),
      distinct: { on }
    });
  }
  getDialect() {
    if (!this.dialect) {
      this.dialect = new PgDialect(this.dialectConfig);
    }
    return this.dialect;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/utils.js
function extractUsedTable(table) {
  if (is(table, PgTable)) {
    return [table[Schema] ? `${table[Schema]}.${table[Table.Symbol.BaseName]}` : table[Table.Symbol.BaseName]];
  }
  if (is(table, Subquery)) {
    return table._.usedTables ?? [];
  }
  if (is(table, SQL)) {
    return table.usedTables ?? [];
  }
  return [];
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/delete.js
class PgDeleteBase extends QueryPromise {
  constructor(table, session, dialect, withList) {
    super();
    this.session = session;
    this.dialect = dialect;
    this.config = { table, withList };
  }
  static [entityKind] = "PgDelete";
  config;
  cacheConfig;
  where(where) {
    this.config.where = where;
    return this;
  }
  returning(fields = this.config.table[Table.Symbol.Columns]) {
    this.config.returningFields = fields;
    this.config.returning = orderSelectedFields(fields);
    return this;
  }
  getSQL() {
    return this.dialect.buildDeleteQuery(this.config);
  }
  toSQL() {
    const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
    return rest;
  }
  _prepare(name) {
    return tracer.startActiveSpan("drizzle.prepareQuery", () => {
      return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), this.config.returning, name, true, undefined, {
        type: "delete",
        tables: extractUsedTable(this.config.table)
      }, this.cacheConfig);
    });
  }
  prepare(name) {
    return this._prepare(name);
  }
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  execute = (placeholderValues) => {
    return tracer.startActiveSpan("drizzle.operation", () => {
      return this._prepare().execute(placeholderValues, this.authToken);
    });
  };
  getSelectedFields() {
    return this.config.returningFields ? new Proxy(this.config.returningFields, new SelectionProxyHandler({
      alias: getTableName(this.config.table),
      sqlAliasedBehavior: "alias",
      sqlBehavior: "error"
    })) : undefined;
  }
  $dynamic() {
    return this;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/insert.js
class PgInsertBuilder {
  constructor(table, session, dialect, withList, overridingSystemValue_) {
    this.table = table;
    this.session = session;
    this.dialect = dialect;
    this.withList = withList;
    this.overridingSystemValue_ = overridingSystemValue_;
  }
  static [entityKind] = "PgInsertBuilder";
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  overridingSystemValue() {
    this.overridingSystemValue_ = true;
    return this;
  }
  values(values) {
    values = Array.isArray(values) ? values : [values];
    if (values.length === 0) {
      throw new Error("values() must be called with at least one value");
    }
    const mappedValues = values.map((entry) => {
      const result = {};
      const cols = this.table[Table.Symbol.Columns];
      for (const colKey of Object.keys(entry)) {
        const colValue = entry[colKey];
        result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
      }
      return result;
    });
    return new PgInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList, false, this.overridingSystemValue_).setToken(this.authToken);
  }
  select(selectQuery) {
    const select = typeof selectQuery === "function" ? selectQuery(new QueryBuilder) : selectQuery;
    if (!is(select, SQL) && !haveSameKeys(this.table[Columns], select._.selectedFields)) {
      throw new Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");
    }
    return new PgInsertBase(this.table, select, this.session, this.dialect, this.withList, true);
  }
}

class PgInsertBase extends QueryPromise {
  constructor(table, values, session, dialect, withList, select, overridingSystemValue_) {
    super();
    this.session = session;
    this.dialect = dialect;
    this.config = { table, values, withList, select, overridingSystemValue_ };
  }
  static [entityKind] = "PgInsert";
  config;
  cacheConfig;
  returning(fields = this.config.table[Table.Symbol.Columns]) {
    this.config.returningFields = fields;
    this.config.returning = orderSelectedFields(fields);
    return this;
  }
  onConflictDoNothing(config = {}) {
    if (config.target === undefined) {
      this.config.onConflict = sql`do nothing`;
    } else {
      let targetColumn = "";
      targetColumn = Array.isArray(config.target) ? config.target.map((it) => this.dialect.escapeName(this.dialect.casing.getColumnCasing(it))).join(",") : this.dialect.escapeName(this.dialect.casing.getColumnCasing(config.target));
      const whereSql = config.where ? sql` where ${config.where}` : undefined;
      this.config.onConflict = sql`(${sql.raw(targetColumn)})${whereSql} do nothing`;
    }
    return this;
  }
  onConflictDoUpdate(config) {
    if (config.where && (config.targetWhere || config.setWhere)) {
      throw new Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');
    }
    const whereSql = config.where ? sql` where ${config.where}` : undefined;
    const targetWhereSql = config.targetWhere ? sql` where ${config.targetWhere}` : undefined;
    const setWhereSql = config.setWhere ? sql` where ${config.setWhere}` : undefined;
    const setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config.set));
    let targetColumn = "";
    targetColumn = Array.isArray(config.target) ? config.target.map((it) => this.dialect.escapeName(this.dialect.casing.getColumnCasing(it))).join(",") : this.dialect.escapeName(this.dialect.casing.getColumnCasing(config.target));
    this.config.onConflict = sql`(${sql.raw(targetColumn)})${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}`;
    return this;
  }
  getSQL() {
    return this.dialect.buildInsertQuery(this.config);
  }
  toSQL() {
    const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
    return rest;
  }
  _prepare(name) {
    return tracer.startActiveSpan("drizzle.prepareQuery", () => {
      return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), this.config.returning, name, true, undefined, {
        type: "insert",
        tables: extractUsedTable(this.config.table)
      }, this.cacheConfig);
    });
  }
  prepare(name) {
    return this._prepare(name);
  }
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  execute = (placeholderValues) => {
    return tracer.startActiveSpan("drizzle.operation", () => {
      return this._prepare().execute(placeholderValues, this.authToken);
    });
  };
  getSelectedFields() {
    return this.config.returningFields ? new Proxy(this.config.returningFields, new SelectionProxyHandler({
      alias: getTableName(this.config.table),
      sqlAliasedBehavior: "alias",
      sqlBehavior: "error"
    })) : undefined;
  }
  $dynamic() {
    return this;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/refresh-materialized-view.js
class PgRefreshMaterializedView extends QueryPromise {
  constructor(view, session, dialect) {
    super();
    this.session = session;
    this.dialect = dialect;
    this.config = { view };
  }
  static [entityKind] = "PgRefreshMaterializedView";
  config;
  concurrently() {
    if (this.config.withNoData !== undefined) {
      throw new Error("Cannot use concurrently and withNoData together");
    }
    this.config.concurrently = true;
    return this;
  }
  withNoData() {
    if (this.config.concurrently !== undefined) {
      throw new Error("Cannot use concurrently and withNoData together");
    }
    this.config.withNoData = true;
    return this;
  }
  getSQL() {
    return this.dialect.buildRefreshMaterializedViewQuery(this.config);
  }
  toSQL() {
    const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
    return rest;
  }
  _prepare(name) {
    return tracer.startActiveSpan("drizzle.prepareQuery", () => {
      return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), undefined, name, true);
    });
  }
  prepare(name) {
    return this._prepare(name);
  }
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  execute = (placeholderValues) => {
    return tracer.startActiveSpan("drizzle.operation", () => {
      return this._prepare().execute(placeholderValues, this.authToken);
    });
  };
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/update.js
class PgUpdateBuilder {
  constructor(table, session, dialect, withList) {
    this.table = table;
    this.session = session;
    this.dialect = dialect;
    this.withList = withList;
  }
  static [entityKind] = "PgUpdateBuilder";
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  set(values) {
    return new PgUpdateBase(this.table, mapUpdateSet(this.table, values), this.session, this.dialect, this.withList).setToken(this.authToken);
  }
}

class PgUpdateBase extends QueryPromise {
  constructor(table, set, session, dialect, withList) {
    super();
    this.session = session;
    this.dialect = dialect;
    this.config = { set, table, withList, joins: [] };
    this.tableName = getTableLikeName(table);
    this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {};
  }
  static [entityKind] = "PgUpdate";
  config;
  tableName;
  joinsNotNullableMap;
  cacheConfig;
  from(source) {
    const src = source;
    const tableName = getTableLikeName(src);
    if (typeof tableName === "string") {
      this.joinsNotNullableMap[tableName] = true;
    }
    this.config.from = src;
    return this;
  }
  getTableLikeFields(table) {
    if (is(table, PgTable)) {
      return table[Table.Symbol.Columns];
    } else if (is(table, Subquery)) {
      return table._.selectedFields;
    }
    return table[ViewBaseConfig].selectedFields;
  }
  createJoin(joinType) {
    return (table, on) => {
      const tableName = getTableLikeName(table);
      if (typeof tableName === "string" && this.config.joins.some((join4) => join4.alias === tableName)) {
        throw new Error(`Alias "${tableName}" is already used in this query`);
      }
      if (typeof on === "function") {
        const from = this.config.from && !is(this.config.from, SQL) ? this.getTableLikeFields(this.config.from) : undefined;
        on = on(new Proxy(this.config.table[Table.Symbol.Columns], new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" })), from && new Proxy(from, new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" })));
      }
      this.config.joins.push({ on, table, joinType, alias: tableName });
      if (typeof tableName === "string") {
        switch (joinType) {
          case "left": {
            this.joinsNotNullableMap[tableName] = false;
            break;
          }
          case "right": {
            this.joinsNotNullableMap = Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]));
            this.joinsNotNullableMap[tableName] = true;
            break;
          }
          case "inner": {
            this.joinsNotNullableMap[tableName] = true;
            break;
          }
          case "full": {
            this.joinsNotNullableMap = Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]));
            this.joinsNotNullableMap[tableName] = false;
            break;
          }
        }
      }
      return this;
    };
  }
  leftJoin = this.createJoin("left");
  rightJoin = this.createJoin("right");
  innerJoin = this.createJoin("inner");
  fullJoin = this.createJoin("full");
  where(where) {
    this.config.where = where;
    return this;
  }
  returning(fields) {
    if (!fields) {
      fields = Object.assign({}, this.config.table[Table.Symbol.Columns]);
      if (this.config.from) {
        const tableName = getTableLikeName(this.config.from);
        if (typeof tableName === "string" && this.config.from && !is(this.config.from, SQL)) {
          const fromFields = this.getTableLikeFields(this.config.from);
          fields[tableName] = fromFields;
        }
        for (const join4 of this.config.joins) {
          const tableName2 = getTableLikeName(join4.table);
          if (typeof tableName2 === "string" && !is(join4.table, SQL)) {
            const fromFields = this.getTableLikeFields(join4.table);
            fields[tableName2] = fromFields;
          }
        }
      }
    }
    this.config.returningFields = fields;
    this.config.returning = orderSelectedFields(fields);
    return this;
  }
  getSQL() {
    return this.dialect.buildUpdateQuery(this.config);
  }
  toSQL() {
    const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
    return rest;
  }
  _prepare(name) {
    const query = this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), this.config.returning, name, true, undefined, {
      type: "insert",
      tables: extractUsedTable(this.config.table)
    }, this.cacheConfig);
    query.joinsNotNullableMap = this.joinsNotNullableMap;
    return query;
  }
  prepare(name) {
    return this._prepare(name);
  }
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  execute = (placeholderValues) => {
    return this._prepare().execute(placeholderValues, this.authToken);
  };
  getSelectedFields() {
    return this.config.returningFields ? new Proxy(this.config.returningFields, new SelectionProxyHandler({
      alias: getTableName(this.config.table),
      sqlAliasedBehavior: "alias",
      sqlBehavior: "error"
    })) : undefined;
  }
  $dynamic() {
    return this;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/count.js
class PgCountBuilder extends SQL {
  constructor(params) {
    super(PgCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
    this.params = params;
    this.mapWith(Number);
    this.session = params.session;
    this.sql = PgCountBuilder.buildCount(params.source, params.filters);
  }
  sql;
  token;
  static [entityKind] = "PgCountBuilder";
  [Symbol.toStringTag] = "PgCountBuilder";
  session;
  static buildEmbeddedCount(source, filters) {
    return sql`(select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters})`;
  }
  static buildCount(source, filters) {
    return sql`select count(*) as count from ${source}${sql.raw(" where ").if(filters)}${filters};`;
  }
  setToken(token) {
    this.token = token;
    return this;
  }
  then(onfulfilled, onrejected) {
    return Promise.resolve(this.session.count(this.sql, this.token)).then(onfulfilled, onrejected);
  }
  catch(onRejected) {
    return this.then(undefined, onRejected);
  }
  finally(onFinally) {
    return this.then((value) => {
      onFinally?.();
      return value;
    }, (reason) => {
      onFinally?.();
      throw reason;
    });
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/query.js
class RelationalQueryBuilder {
  constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session) {
    this.fullSchema = fullSchema;
    this.schema = schema;
    this.tableNamesMap = tableNamesMap;
    this.table = table;
    this.tableConfig = tableConfig;
    this.dialect = dialect;
    this.session = session;
  }
  static [entityKind] = "PgRelationalQueryBuilder";
  findMany(config) {
    return new PgRelationalQuery(this.fullSchema, this.schema, this.tableNamesMap, this.table, this.tableConfig, this.dialect, this.session, config ? config : {}, "many");
  }
  findFirst(config) {
    return new PgRelationalQuery(this.fullSchema, this.schema, this.tableNamesMap, this.table, this.tableConfig, this.dialect, this.session, config ? { ...config, limit: 1 } : { limit: 1 }, "first");
  }
}

class PgRelationalQuery extends QueryPromise {
  constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session, config, mode) {
    super();
    this.fullSchema = fullSchema;
    this.schema = schema;
    this.tableNamesMap = tableNamesMap;
    this.table = table;
    this.tableConfig = tableConfig;
    this.dialect = dialect;
    this.session = session;
    this.config = config;
    this.mode = mode;
  }
  static [entityKind] = "PgRelationalQuery";
  _prepare(name) {
    return tracer.startActiveSpan("drizzle.prepareQuery", () => {
      const { query, builtQuery } = this._toSQL();
      return this.session.prepareQuery(builtQuery, undefined, name, true, (rawRows, mapColumnValue) => {
        const rows = rawRows.map((row) => mapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue));
        if (this.mode === "first") {
          return rows[0];
        }
        return rows;
      });
    });
  }
  prepare(name) {
    return this._prepare(name);
  }
  _getQuery() {
    return this.dialect.buildRelationalQueryWithoutPK({
      fullSchema: this.fullSchema,
      schema: this.schema,
      tableNamesMap: this.tableNamesMap,
      table: this.table,
      tableConfig: this.tableConfig,
      queryConfig: this.config,
      tableAlias: this.tableConfig.tsName
    });
  }
  getSQL() {
    return this._getQuery().sql;
  }
  _toSQL() {
    const query = this._getQuery();
    const builtQuery = this.dialect.sqlToQuery(query.sql);
    return { query, builtQuery };
  }
  toSQL() {
    return this._toSQL().builtQuery;
  }
  authToken;
  setToken(token) {
    this.authToken = token;
    return this;
  }
  execute() {
    return tracer.startActiveSpan("drizzle.operation", () => {
      return this._prepare().execute(undefined, this.authToken);
    });
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/query-builders/raw.js
class PgRaw extends QueryPromise {
  constructor(execute, sql2, query, mapBatchResult) {
    super();
    this.execute = execute;
    this.sql = sql2;
    this.query = query;
    this.mapBatchResult = mapBatchResult;
  }
  static [entityKind] = "PgRaw";
  getSQL() {
    return this.sql;
  }
  getQuery() {
    return this.query;
  }
  mapResult(result, isFromBatch) {
    return isFromBatch ? this.mapBatchResult(result) : result;
  }
  _prepare() {
    return this;
  }
  isResponseInArrayMode() {
    return false;
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/db.js
class PgDatabase {
  constructor(dialect, session, schema) {
    this.dialect = dialect;
    this.session = session;
    this._ = schema ? {
      schema: schema.schema,
      fullSchema: schema.fullSchema,
      tableNamesMap: schema.tableNamesMap,
      session
    } : {
      schema: undefined,
      fullSchema: {},
      tableNamesMap: {},
      session
    };
    this.query = {};
    if (this._.schema) {
      for (const [tableName, columns] of Object.entries(this._.schema)) {
        this.query[tableName] = new RelationalQueryBuilder(schema.fullSchema, this._.schema, this._.tableNamesMap, schema.fullSchema[tableName], columns, dialect, session);
      }
    }
    this.$cache = { invalidate: async (_params) => {} };
  }
  static [entityKind] = "PgDatabase";
  query;
  $with = (alias, selection) => {
    const self2 = this;
    const as = (qb) => {
      if (typeof qb === "function") {
        qb = qb(new QueryBuilder(self2.dialect));
      }
      return new Proxy(new WithSubquery(qb.getSQL(), selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), alias, true), new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }));
    };
    return { as };
  };
  $count(source, filters) {
    return new PgCountBuilder({ source, filters, session: this.session });
  }
  $cache;
  with(...queries) {
    const self2 = this;
    function select(fields) {
      return new PgSelectBuilder({
        fields: fields ?? undefined,
        session: self2.session,
        dialect: self2.dialect,
        withList: queries
      });
    }
    function selectDistinct(fields) {
      return new PgSelectBuilder({
        fields: fields ?? undefined,
        session: self2.session,
        dialect: self2.dialect,
        withList: queries,
        distinct: true
      });
    }
    function selectDistinctOn(on, fields) {
      return new PgSelectBuilder({
        fields: fields ?? undefined,
        session: self2.session,
        dialect: self2.dialect,
        withList: queries,
        distinct: { on }
      });
    }
    function update(table) {
      return new PgUpdateBuilder(table, self2.session, self2.dialect, queries);
    }
    function insert(table) {
      return new PgInsertBuilder(table, self2.session, self2.dialect, queries);
    }
    function delete_(table) {
      return new PgDeleteBase(table, self2.session, self2.dialect, queries);
    }
    return { select, selectDistinct, selectDistinctOn, update, insert, delete: delete_ };
  }
  select(fields) {
    return new PgSelectBuilder({
      fields: fields ?? undefined,
      session: this.session,
      dialect: this.dialect
    });
  }
  selectDistinct(fields) {
    return new PgSelectBuilder({
      fields: fields ?? undefined,
      session: this.session,
      dialect: this.dialect,
      distinct: true
    });
  }
  selectDistinctOn(on, fields) {
    return new PgSelectBuilder({
      fields: fields ?? undefined,
      session: this.session,
      dialect: this.dialect,
      distinct: { on }
    });
  }
  update(table) {
    return new PgUpdateBuilder(table, this.session, this.dialect);
  }
  insert(table) {
    return new PgInsertBuilder(table, this.session, this.dialect);
  }
  delete(table) {
    return new PgDeleteBase(table, this.session, this.dialect);
  }
  refreshMaterializedView(view) {
    return new PgRefreshMaterializedView(view, this.session, this.dialect);
  }
  authToken;
  execute(query) {
    const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
    const builtQuery = this.dialect.sqlToQuery(sequel);
    const prepared = this.session.prepareQuery(builtQuery, undefined, undefined, false);
    return new PgRaw(() => prepared.execute(undefined, this.authToken), sequel, builtQuery, (result) => prepared.mapResult(result, true));
  }
  transaction(transaction, config) {
    return this.session.transaction(transaction, config);
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/cache/core/cache.js
class Cache {
  static [entityKind] = "Cache";
}

class NoopCache extends Cache {
  strategy() {
    return "all";
  }
  static [entityKind] = "NoopCache";
  async get(_key) {
    return;
  }
  async put(_hashedQuery, _response, _tables, _config) {}
  async onMutate(_params) {}
}
async function hashQuery(sql2, params) {
  const dataToHash = `${sql2}-${JSON.stringify(params)}`;
  const encoder = new TextEncoder;
  const data = encoder.encode(dataToHash);
  const hashBuffer = await crypto.subtle.digest("SHA-256", data);
  const hashArray = [...new Uint8Array(hashBuffer)];
  const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
  return hashHex;
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/pg-core/session.js
class PgPreparedQuery {
  constructor(query, cache, queryMetadata, cacheConfig) {
    this.query = query;
    this.cache = cache;
    this.queryMetadata = queryMetadata;
    this.cacheConfig = cacheConfig;
    if (cache && cache.strategy() === "all" && cacheConfig === undefined) {
      this.cacheConfig = { enable: true, autoInvalidate: true };
    }
    if (!this.cacheConfig?.enable) {
      this.cacheConfig = undefined;
    }
  }
  authToken;
  getQuery() {
    return this.query;
  }
  mapResult(response, _isFromBatch) {
    return response;
  }
  setToken(token) {
    this.authToken = token;
    return this;
  }
  static [entityKind] = "PgPreparedQuery";
  joinsNotNullableMap;
  async queryWithCache(queryString, params, query) {
    if (this.cache === undefined || is(this.cache, NoopCache) || this.queryMetadata === undefined) {
      try {
        return await query();
      } catch (e) {
        throw new DrizzleQueryError(queryString, params, e);
      }
    }
    if (this.cacheConfig && !this.cacheConfig.enable) {
      try {
        return await query();
      } catch (e) {
        throw new DrizzleQueryError(queryString, params, e);
      }
    }
    if ((this.queryMetadata.type === "insert" || this.queryMetadata.type === "update" || this.queryMetadata.type === "delete") && this.queryMetadata.tables.length > 0) {
      try {
        const [res] = await Promise.all([
          query(),
          this.cache.onMutate({ tables: this.queryMetadata.tables })
        ]);
        return res;
      } catch (e) {
        throw new DrizzleQueryError(queryString, params, e);
      }
    }
    if (!this.cacheConfig) {
      try {
        return await query();
      } catch (e) {
        throw new DrizzleQueryError(queryString, params, e);
      }
    }
    if (this.queryMetadata.type === "select") {
      const fromCache = await this.cache.get(this.cacheConfig.tag ?? await hashQuery(queryString, params), this.queryMetadata.tables, this.cacheConfig.tag !== undefined, this.cacheConfig.autoInvalidate);
      if (fromCache === undefined) {
        let result;
        try {
          result = await query();
        } catch (e) {
          throw new DrizzleQueryError(queryString, params, e);
        }
        await this.cache.put(this.cacheConfig.tag ?? await hashQuery(queryString, params), result, this.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [], this.cacheConfig.tag !== undefined, this.cacheConfig.config);
        return result;
      }
      return fromCache;
    }
    try {
      return await query();
    } catch (e) {
      throw new DrizzleQueryError(queryString, params, e);
    }
  }
}

class PgSession {
  constructor(dialect) {
    this.dialect = dialect;
  }
  static [entityKind] = "PgSession";
  execute(query, token) {
    return tracer.startActiveSpan("drizzle.operation", () => {
      const prepared = tracer.startActiveSpan("drizzle.prepareQuery", () => {
        return this.prepareQuery(this.dialect.sqlToQuery(query), undefined, undefined, false);
      });
      return prepared.setToken(token).execute(undefined, token);
    });
  }
  all(query) {
    return this.prepareQuery(this.dialect.sqlToQuery(query), undefined, undefined, false).all();
  }
  async count(sql2, token) {
    const res = await this.execute(sql2, token);
    return Number(res[0]["count"]);
  }
}

class PgTransaction extends PgDatabase {
  constructor(dialect, session, schema, nestedIndex = 0) {
    super(dialect, session, schema);
    this.schema = schema;
    this.nestedIndex = nestedIndex;
  }
  static [entityKind] = "PgTransaction";
  rollback() {
    throw new TransactionRollbackError;
  }
  getTransactionConfigSQL(config) {
    const chunks = [];
    if (config.isolationLevel) {
      chunks.push(`isolation level ${config.isolationLevel}`);
    }
    if (config.accessMode) {
      chunks.push(config.accessMode);
    }
    if (typeof config.deferrable === "boolean") {
      chunks.push(config.deferrable ? "deferrable" : "not deferrable");
    }
    return sql.raw(chunks.join(" "));
  }
  setTransaction(config) {
    return this.session.execute(sql`set transaction ${this.getTransactionConfigSQL(config)}`);
  }
}

// ../../packages/db/dist/auth-jCIIRjq2.js
var user = pgTable("user", {
  id: text("id").primaryKey(),
  name: text("name").notNull(),
  email: text("email").notNull().unique(),
  emailVerified: boolean("email_verified").notNull(),
  image: text("image"),
  createdAt: timestamp("created_at").notNull(),
  updatedAt: timestamp("updated_at").notNull(),
  twoFactorEnabled: boolean("two_factor_enabled"),
  lastLoginMethod: text("last_login_method"),
  stripeCustomerId: text("stripe_customer_id"),
  phoneNumber: text("phone_number"),
  loginAlertsEnabled: boolean("login_alerts_enabled").default(false)
});
var session = pgTable("session", {
  id: text("id").primaryKey(),
  expiresAt: timestamp("expires_at").notNull(),
  token: text("token").notNull().unique(),
  createdAt: timestamp("created_at").notNull(),
  updatedAt: timestamp("updated_at").notNull(),
  ipAddress: text("ip_address"),
  userAgent: text("user_agent"),
  userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
  activeOrganizationId: text("active_organization_id")
});
var account = pgTable("account", {
  id: text("id").primaryKey(),
  accountId: text("account_id").notNull(),
  providerId: text("provider_id").notNull(),
  userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
  accessToken: text("access_token"),
  refreshToken: text("refresh_token"),
  idToken: text("id_token"),
  accessTokenExpiresAt: timestamp("access_token_expires_at"),
  refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
  scope: text("scope"),
  password: text("password"),
  createdAt: timestamp("created_at").notNull(),
  updatedAt: timestamp("updated_at").notNull()
});
var verification = pgTable("verification", {
  id: text("id").primaryKey(),
  identifier: text("identifier").notNull(),
  value: text("value").notNull(),
  expiresAt: timestamp("expires_at").notNull(),
  createdAt: timestamp("created_at"),
  updatedAt: timestamp("updated_at")
});
var passkey = pgTable("passkey", {
  id: text("id").primaryKey(),
  name: text("name"),
  publicKey: text("public_key").notNull(),
  userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
  credentialID: text("credential_id").notNull(),
  counter: integer("counter").notNull(),
  deviceType: text("device_type").notNull(),
  backedUp: boolean("backed_up").notNull(),
  transports: text("transports"),
  createdAt: timestamp("created_at").notNull(),
  aaguid: text("aaguid")
});
var twoFactor = pgTable("two_factor", {
  id: text("id").primaryKey(),
  secret: text("secret").notNull(),
  backupCodes: text("backup_codes").notNull(),
  userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" })
});
var deviceCode = pgTable("device_code", {
  id: text("id").primaryKey(),
  deviceCode: text("device_code").notNull(),
  userCode: text("user_code").notNull(),
  userId: text("user_id"),
  expiresAt: timestamp("expires_at").notNull(),
  status: text("status").notNull(),
  lastPolledAt: timestamp("last_polled_at"),
  pollingInterval: integer("polling_interval"),
  clientId: text("client_id"),
  scope: text("scope")
});
var organization = pgTable("organization", {
  id: text("id").primaryKey(),
  name: text("name").notNull(),
  slug: text("slug").unique(),
  logo: text("logo"),
  brandColor: text("brand_color"),
  metadata: text("metadata"),
  stripeOrganizationId: text("stripe_organization_id"),
  createdAt: timestamp("created_at").notNull()
});
var member = pgTable("member", {
  id: text("id").primaryKey(),
  organizationId: text("organization_id").notNull().references(() => organization.id, { onDelete: "cascade" }),
  userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
  role: text("role").notNull(),
  createdAt: timestamp("created_at").notNull()
});
var invitation = pgTable("invitation", {
  id: text("id").primaryKey(),
  organizationId: text("organization_id").notNull().references(() => organization.id, { onDelete: "cascade" }),
  email: text("email").notNull(),
  role: text("role"),
  status: text("status").notNull(),
  expiresAt: timestamp("expires_at").notNull(),
  inviterId: text("inviter_id").notNull().references(() => user.id, { onDelete: "cascade" })
});
var statement = pgTable("statement", {
  id: text("id").primaryKey(),
  userId: text("user_id").references(() => user.id, { onDelete: "cascade" }),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }),
  roleId: text("role_id"),
  effect: text("effect").notNull(),
  action: text("action").notNull(),
  resource: text("resource").notNull(),
  condition: text("condition"),
  expiresAt: timestamp("expires_at"),
  createdAt: timestamp("created_at").notNull(),
  updatedAt: timestamp("updated_at").notNull()
});
var subscription = pgTable("subscription", {
  id: text("id").primaryKey(),
  plan: text("plan").notNull(),
  referenceId: text("reference_id").notNull().references(() => organization.id, { onDelete: "cascade" }),
  stripeCustomerId: text("stripe_customer_id"),
  stripeSubscriptionId: text("stripe_subscription_id"),
  status: text("status").notNull(),
  periodStart: timestamp("period_start"),
  periodEnd: timestamp("period_end"),
  cancelAtPeriodEnd: boolean("cancel_at_period_end"),
  seats: integer("seats"),
  trialStart: timestamp("trial_start"),
  trialEnd: timestamp("trial_end"),
  annual: boolean("annual").default(false),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
});
var notification = pgTable("notification", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }),
  type: text("type").notNull(),
  title: text("title").notNull(),
  body: text("body"),
  href: text("href"),
  data: jsonb("data").$type(),
  read: boolean("read").default(false).notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull()
}, (table) => [index("notification_org_idx").on(table.organizationId), index("notification_user_read_idx").on(table.userId, table.read)]);
var userRelations = relations(user, ({ many }) => ({
  sessions: many(session),
  accounts: many(account),
  passkeys: many(passkey),
  twoFactors: many(twoFactor),
  members: many(member, { relationName: "userMemberships" }),
  invitations: many(invitation),
  statements: many(statement)
}));
var sessionRelations = relations(session, ({ one }) => ({ user: one(user, {
  fields: [session.userId],
  references: [user.id]
}) }));
var accountRelations = relations(account, ({ one }) => ({ user: one(user, {
  fields: [account.userId],
  references: [user.id]
}) }));
var passkeyRelations = relations(passkey, ({ one }) => ({ user: one(user, {
  fields: [passkey.userId],
  references: [user.id]
}) }));
var twoFactorRelations = relations(twoFactor, ({ one }) => ({ user: one(user, {
  fields: [twoFactor.userId],
  references: [user.id]
}) }));
var memberRelations = relations(member, ({ one }) => ({
  organization: one(organization, {
    fields: [member.organizationId],
    references: [organization.id]
  }),
  user: one(user, {
    fields: [member.userId],
    references: [user.id],
    relationName: "userMemberships"
  })
}));
var invitationRelations = relations(invitation, ({ one }) => ({
  organization: one(organization, {
    fields: [invitation.organizationId],
    references: [organization.id]
  }),
  inviter: one(user, {
    fields: [invitation.inviterId],
    references: [user.id]
  })
}));
var statementRelations = relations(statement, ({ one }) => ({
  user: one(user, {
    fields: [statement.userId],
    references: [user.id]
  }),
  organization: one(organization, {
    fields: [statement.organizationId],
    references: [organization.id]
  })
}));
var notificationRelations = relations(notification, ({ one }) => ({
  user: one(user, {
    fields: [notification.userId],
    references: [user.id]
  }),
  organization: one(organization, {
    fields: [notification.organizationId],
    references: [organization.id]
  })
}));
var subscriptionRelations = relations(subscription, ({ one }) => ({ organization: one(organization, {
  fields: [subscription.referenceId],
  references: [organization.id]
}) }));

// ../../packages/db/dist/agents-Dv-T1X4k.js
var agentStatusEnum = pgEnum("agent_status", ["ACTIVE", "KILLED"]);
var agentApprovalStatusEnum = pgEnum("agent_approval_status", [
  "PENDING",
  "APPROVED",
  "REJECTED",
  "SENT",
  "FAILED"
]);
var agent = pgTable("agent", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  emailAddress: text("email_address").notNull(),
  domain: text("domain").notNull(),
  status: agentStatusEnum("status").default("ACTIVE").notNull(),
  policy: jsonb("policy").$type().notNull(),
  credentialUserArn: text("credential_user_arn"),
  enforcerFunctionArn: text("enforcer_function_arn"),
  awsAccountId: text("aws_account_id"),
  createdBy: text("created_by").references(() => user.id, { onDelete: "set null" }),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => ({
  orgIdx: index("agent_org_idx").on(table.organizationId),
  orgNameIdx: uniqueIndex("agent_unique_org_name_idx").on(table.organizationId, table.name),
  orgEmailIdx: uniqueIndex("agent_unique_org_email_idx").on(table.organizationId, table.emailAddress)
}));
var agentApprovalQueue = pgTable("agent_approval_queue", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  agentId: text("agent_id").references(() => agent.id, { onDelete: "cascade" }).notNull(),
  payload: jsonb("payload").$type().notNull(),
  reason: text("reason"),
  status: agentApprovalStatusEnum("status").default("PENDING").notNull(),
  decidedBy: text("decided_by").references(() => user.id, { onDelete: "set null" }),
  decidedAt: timestamp("decided_at"),
  messageId: text("message_id"),
  errorMessage: text("error_message"),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => ({
  orgIdx: index("agent_approval_queue_org_idx").on(table.organizationId),
  orgStatusIdx: index("agent_approval_queue_org_status_idx").on(table.organizationId, table.status),
  agentIdx: index("agent_approval_queue_agent_idx").on(table.agentId)
}));
var agentRelations = relations(agent, ({ one, many }) => ({
  organization: one(organization, {
    fields: [agent.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [agent.createdBy],
    references: [user.id]
  }),
  approvals: many(agentApprovalQueue)
}));
var agentApprovalQueueRelations = relations(agentApprovalQueue, ({ one }) => ({
  organization: one(organization, {
    fields: [agentApprovalQueue.organizationId],
    references: [organization.id]
  }),
  agent: one(agent, {
    fields: [agentApprovalQueue.agentId],
    references: [agent.id]
  }),
  decidedByUser: one(user, {
    fields: [agentApprovalQueue.decidedBy],
    references: [user.id]
  })
}));

// ../../packages/db/dist/templates-MBlmgBNY.js
var templateStatusEnum = pgEnum("template_status", [
  "DRAFT",
  "PUBLISHED",
  "ARCHIVED"
]);
var emailTypeEnum = pgEnum("email_type", ["marketing", "transactional"]);
var variableTypeEnum = pgEnum("variable_type", [
  "TEXT",
  "NUMBER",
  "BOOLEAN",
  "DATE",
  "URL",
  "EMAIL"
]);
var template = pgTable("template", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  description: text("description"),
  subject: text("subject"),
  previewText: text("preview_text"),
  emailType: emailTypeEnum("email_type").default("marketing").notNull(),
  channel: text("channel").$type().default("email").notNull(),
  content: jsonb("content").$type().notNull(),
  compiledHtml: text("compiled_html"),
  compiledText: text("compiled_text"),
  variables: jsonb("variables").$type().default([]),
  testData: jsonb("test_data").$type().default({}),
  roomId: text("room_id"),
  isCollaborative: boolean("is_collaborative").default(false).notNull(),
  aiGenerated: boolean("ai_generated").default(false).notNull(),
  aiConversationId: text("ai_conversation_id"),
  brandKitId: text("brand_kit_id").references(() => brandKit.id, { onDelete: "set null" }),
  sesTemplateName: text("ses_template_name"),
  publishedAt: timestamp("published_at"),
  status: templateStatusEnum("status").default("DRAFT").notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull(),
  createdBy: text("created_by").references(() => user.id, { onDelete: "set null" }),
  lastEditedBy: text("last_edited_by").references(() => user.id, { onDelete: "set null" }),
  slug: text("slug"),
  source: text("source"),
  sourceFormat: text("source_format").$type().default("react-email").notNull(),
  sourceHash: text("source_hash"),
  pushedFromCli: boolean("pushed_from_cli").default(false).notNull(),
  lastPushedAt: timestamp("last_pushed_at"),
  cliProjectPath: text("cli_project_path"),
  lastEditedFrom: text("last_edited_from").$type()
}, (table) => [
  index("template_org_idx").on(table.organizationId),
  index("template_status_updated_at_idx").on(table.status, table.updatedAt),
  index("template_created_by_idx").on(table.createdBy),
  uniqueIndex("template_room_id_idx").on(table.roomId),
  uniqueIndex("template_org_slug_idx").on(table.organizationId, table.slug)
]);
var templateVersion = pgTable("template_version", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  templateId: text("template_id").notNull().references(() => template.id, { onDelete: "cascade" }),
  content: jsonb("content").$type().notNull(),
  source: text("source"),
  compiledHtml: text("compiled_html"),
  version: integer("version").notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  createdBy: text("created_by").references(() => user.id, { onDelete: "set null" }),
  changeNote: text("change_note")
}, (table) => [uniqueIndex("template_version_template_version_idx").on(table.templateId, table.version), index("template_version_template_created_at_idx").on(table.templateId, table.createdAt)]);
var reusableBlock = pgTable("reusable_block", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  description: text("description"),
  category: text("category").default("custom").notNull(),
  content: jsonb("content").$type().notNull(),
  thumbnail: text("thumbnail"),
  isPublic: boolean("is_public").default(false).notNull(),
  usageCount: integer("usage_count").default(0).notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull(),
  createdBy: text("created_by").references(() => user.id, { onDelete: "set null" }).notNull()
}, (table) => [
  index("reusable_block_org_idx").on(table.organizationId),
  index("reusable_block_created_by_category_idx").on(table.createdBy, table.category),
  index("reusable_block_public_category_idx").on(table.isPublic, table.category)
]);
var templateVariable = pgTable("template_variable", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  label: text("label").notNull(),
  type: variableTypeEnum("type").notNull(),
  required: boolean("required").default(false).notNull(),
  fallback: text("fallback"),
  validation: jsonb("validation").$type(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [uniqueIndex("template_variable_org_name_idx").on(table.organizationId, table.name)]);
var brandKit = pgTable("brand_kit", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull().default("Default"),
  logoUrl: text("logo_url"),
  primaryColor: text("primary_color").default("#5046e5").notNull(),
  secondaryColor: text("secondary_color").default("#6366f1").notNull(),
  backgroundColor: text("background_color").default("#ffffff").notNull(),
  textColor: text("text_color").default("#1f2937").notNull(),
  fontFamily: text("font_family").default("system-ui, sans-serif").notNull(),
  headingFontFamily: text("heading_font_family"),
  buttonStyle: text("button_style").default("rounded").notNull(),
  buttonRadius: text("button_radius").default("4px").notNull(),
  companyName: text("company_name"),
  companyAddress: text("company_address"),
  socialLinks: jsonb("social_links").$type().default([]),
  sourceDomain: text("source_domain"),
  autoExtracted: boolean("auto_extracted").default(false).notNull(),
  isDefault: boolean("is_default").default(false).notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [index("brand_kit_org_idx").on(table.organizationId), index("brand_kit_default_idx").on(table.organizationId, table.isDefault)]);
var aiConversation = pgTable("ai_conversation", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  templateId: text("template_id").references(() => template.id, { onDelete: "cascade" }),
  messages: jsonb("messages").$type().default([]),
  totalTokens: integer("total_tokens").default(0).notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull(),
  createdBy: text("created_by").references(() => user.id, { onDelete: "set null" }).notNull()
}, (table) => [index("ai_conversation_org_idx").on(table.organizationId), index("ai_conversation_template_idx").on(table.templateId)]);
var templateRelations = relations(template, ({ one, many }) => ({
  organization: one(organization, {
    fields: [template.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [template.createdBy],
    references: [user.id],
    relationName: "templateCreatedBy"
  }),
  lastEditedByUser: one(user, {
    fields: [template.lastEditedBy],
    references: [user.id],
    relationName: "templateLastEditedBy"
  }),
  versions: many(templateVersion),
  aiConversation: one(aiConversation, {
    fields: [template.aiConversationId],
    references: [aiConversation.id]
  }),
  brandKitRef: one(brandKit, {
    fields: [template.brandKitId],
    references: [brandKit.id]
  })
}));
var templateVersionRelations = relations(templateVersion, ({ one }) => ({
  template: one(template, {
    fields: [templateVersion.templateId],
    references: [template.id]
  }),
  createdByUser: one(user, {
    fields: [templateVersion.createdBy],
    references: [user.id]
  })
}));
var reusableBlockRelations = relations(reusableBlock, ({ one }) => ({
  organization: one(organization, {
    fields: [reusableBlock.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [reusableBlock.createdBy],
    references: [user.id]
  })
}));
var templateVariableRelations = relations(templateVariable, ({ one }) => ({ organization: one(organization, {
  fields: [templateVariable.organizationId],
  references: [organization.id]
}) }));
var brandKitRelations = relations(brandKit, ({ one }) => ({ organization: one(organization, {
  fields: [brandKit.organizationId],
  references: [organization.id]
}) }));
var aiConversationRelations = relations(aiConversation, ({ one }) => ({
  organization: one(organization, {
    fields: [aiConversation.organizationId],
    references: [organization.id]
  }),
  template: one(template, {
    fields: [aiConversation.templateId],
    references: [template.id]
  }),
  createdByUser: one(user, {
    fields: [aiConversation.createdBy],
    references: [user.id]
  })
}));

// ../../packages/db/dist/contacts-DutaH1ju.js
var contact = pgTable("contact", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  email: text("email"),
  emailHash: text("email_hash"),
  emailStatus: text("email_status").$type(),
  emailVerifiedAt: timestamp("email_verified_at"),
  emailUnsubscribedAt: timestamp("email_unsubscribed_at"),
  emailBouncedAt: timestamp("email_bounced_at"),
  emailComplainedAt: timestamp("email_complained_at"),
  emailSuppressedAt: timestamp("email_suppressed_at"),
  lastEmailSentAt: timestamp("last_email_sent_at"),
  lastEmailOpenedAt: timestamp("last_email_opened_at"),
  lastEmailClickedAt: timestamp("last_email_clicked_at"),
  emailsSent: integer("emails_sent").default(0).notNull(),
  emailsOpened: integer("emails_opened").default(0).notNull(),
  emailsClicked: integer("emails_clicked").default(0).notNull(),
  phone: text("phone"),
  phoneHash: text("phone_hash"),
  smsStatus: text("sms_status").$type(),
  smsConsentedAt: timestamp("sms_consented_at"),
  smsOptedOutAt: timestamp("sms_opted_out_at"),
  smsInvalidAt: timestamp("sms_invalid_at"),
  lastSmsSentAt: timestamp("last_sms_sent_at"),
  lastSmsClickedAt: timestamp("last_sms_clicked_at"),
  smsSent: integer("sms_sent").default(0).notNull(),
  smsClicked: integer("sms_clicked").default(0).notNull(),
  firstName: text("first_name"),
  lastName: text("last_name"),
  company: text("company"),
  jobTitle: text("job_title"),
  preferredChannel: text("preferred_channel").$type(),
  properties: json("properties").$type().default({}).notNull(),
  externalId: text("external_id"),
  lastActivityAt: timestamp("last_activity_at"),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull(),
  createdBy: text("created_by").references(() => user.id),
  status: text("status").default("active").notNull(),
  confirmedAt: timestamp("confirmed_at"),
  unsubscribedAt: timestamp("unsubscribed_at"),
  bouncedAt: timestamp("bounced_at"),
  complainedAt: timestamp("complained_at")
}, (table) => ({
  orgIdx: index("contact_org_idx").on(table.organizationId),
  emailIdx: index("contact_email_idx").on(table.email),
  uniqueOrgEmail: uniqueIndex("contact_unique_org_email_idx").on(table.organizationId, table.emailHash).where(sql`email_hash IS NOT NULL`),
  emailStatusIdx: index("contact_email_status_idx").on(table.organizationId, table.emailStatus),
  phoneIdx: index("contact_phone_idx").on(table.phone),
  uniqueOrgPhone: uniqueIndex("contact_unique_org_phone_idx").on(table.organizationId, table.phoneHash).where(sql`phone_hash IS NOT NULL`),
  smsStatusIdx: index("contact_sms_status_idx").on(table.organizationId, table.smsStatus),
  uniqueOrgExternalId: uniqueIndex("contact_unique_org_external_id_idx").on(table.organizationId, table.externalId).where(sql`external_id IS NOT NULL`),
  statusIdx: index("contact_status_idx").on(table.organizationId, table.status),
  keysetIdx: index("contact_keyset_idx").on(table.organizationId, table.createdAt, table.id)
}));
var topic = pgTable("topic", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  slug: text("slug").notNull(),
  description: text("description"),
  public: boolean("public").default(true).notNull(),
  doubleOptIn: boolean("double_opt_in").default(false).notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull(),
  createdBy: text("created_by").references(() => user.id)
}, (table) => ({
  orgIdx: index("topic_org_idx").on(table.organizationId),
  uniqueOrgSlug: uniqueIndex("topic_unique_org_slug_idx").on(table.organizationId, table.slug)
}));
var topicSettings = pgTable("topic_settings", {
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).primaryKey(),
  confirmationFromName: text("confirmation_from_name"),
  confirmationFromEmail: text("confirmation_from_email"),
  confirmationReplyToEmail: text("confirmation_reply_to_email"),
  confirmationTemplateId: text("confirmation_template_id").references(() => template.id, { onDelete: "set null" }),
  preferenceCenterTitle: text("preference_center_title"),
  preferenceCenterDescription: text("preference_center_description"),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
});
var contactTopic = pgTable("contact_topic", {
  contactId: text("contact_id").references(() => contact.id, { onDelete: "cascade" }).notNull(),
  topicId: text("topic_id").references(() => topic.id, { onDelete: "cascade" }).notNull(),
  status: text("status").default("subscribed").notNull(),
  subscribedAt: timestamp("subscribed_at").defaultNow(),
  unsubscribedAt: timestamp("unsubscribed_at"),
  confirmedAt: timestamp("confirmed_at")
}, (table) => ({
  pk: primaryKey({ columns: [table.contactId, table.topicId] }),
  topicIdx: index("contact_topic_topic_idx").on(table.topicId),
  statusIdx: index("contact_topic_status_idx").on(table.topicId, table.status)
}));
var contactRelations = relations(contact, ({ one, many }) => ({
  organization: one(organization, {
    fields: [contact.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [contact.createdBy],
    references: [user.id]
  }),
  topics: many(contactTopic)
}));
var topicRelations = relations(topic, ({ one, many }) => ({
  organization: one(organization, {
    fields: [topic.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [topic.createdBy],
    references: [user.id]
  }),
  subscribers: many(contactTopic)
}));
var contactTopicRelations = relations(contactTopic, ({ one }) => ({
  contact: one(contact, {
    fields: [contactTopic.contactId],
    references: [contact.id]
  }),
  topic: one(topic, {
    fields: [contactTopic.topicId],
    references: [topic.id]
  })
}));
var topicSettingsRelations = relations(topicSettings, ({ one }) => ({
  organization: one(organization, {
    fields: [topicSettings.organizationId],
    references: [organization.id]
  }),
  confirmationTemplate: one(template, {
    fields: [topicSettings.confirmationTemplateId],
    references: [template.id]
  })
}));

// ../../packages/db/dist/app-BUizLC8a.js
var organizationExtension = pgTable("organization_extension", {
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).primaryKey(),
  awsAccountCount: integer("aws_account_count").default(0).notNull(),
  memberCount: integer("member_count").default(1).notNull(),
  onboardingCompleted: boolean("onboarding_completed").default(false).notNull(),
  onboardingCompletedAt: timestamp("onboarding_completed_at"),
  onboardingPath: text("onboarding_path"),
  activationScore: integer("activation_score").default(0).notNull(),
  activationFirstEmailTrackedAt: timestamp("activation_first_email_tracked_at"),
  defaultAwsAccountId: text("default_aws_account_id").references(() => awsAccount.id, { onDelete: "set null" }),
  defaultFrom: text("default_from"),
  defaultFromName: text("default_from_name"),
  defaultReplyTo: text("default_reply_to"),
  defaultSenderId: text("default_sender_id"),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
});
var awsAccount = pgTable("aws_account", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  accountId: text("account_id").notNull(),
  region: text("region").notNull(),
  roleArn: text("role_arn").notNull(),
  externalId: text("external_id").notNull().unique(),
  webhookSecret: text("webhook_secret"),
  isVerified: boolean("is_verified").default(false).notNull(),
  lastVerifiedAt: timestamp("last_verified_at"),
  lastEventReceivedAt: timestamp("last_event_received_at"),
  eventFeedStaleSince: timestamp("event_feed_stale_since"),
  eventFeedAlertedAt: timestamp("event_feed_alerted_at"),
  emailEnabled: boolean("email_enabled").default(false).notNull(),
  smsEnabled: boolean("sms_enabled").default(false).notNull(),
  features: json("features").$type(),
  createdBy: text("created_by").references(() => user.id),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => ({
  orgIdx: index("aws_account_org_idx").on(table.organizationId),
  externalIdIdx: index("aws_account_external_id_idx").on(table.externalId)
}));
var awsAccountPermission = pgTable("aws_account_permission", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  userId: text("user_id").references(() => user.id, { onDelete: "cascade" }).notNull(),
  awsAccountId: text("aws_account_id").references(() => awsAccount.id, { onDelete: "cascade" }).notNull(),
  permissions: json("permissions").$type().notNull(),
  grantedBy: text("granted_by").references(() => user.id).notNull(),
  expiresAt: timestamp("expires_at"),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => ({
  userIdx: index("aws_account_permission_user_idx").on(table.userId),
  accountIdx: index("aws_account_permission_account_idx").on(table.awsAccountId),
  uniqueUserAccount: uniqueIndex("aws_account_permission_unique_idx").on(table.userId, table.awsAccountId)
}));
var emailTemplate = pgTable("email_template", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  subject: text("subject"),
  html: text("html"),
  variables: json("variables").default([]),
  createdBy: text("created_by").references(() => user.id),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => ({ orgIdx: index("email_template_org_idx").on(table.organizationId) }));
var apiKey = pgTable("api_key", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  keyHash: text("key_hash").notNull(),
  prefix: text("prefix").notNull(),
  permissions: json("permissions").default([]),
  lastUsedAt: timestamp("last_used_at"),
  expiresAt: timestamp("expires_at"),
  createdBy: text("created_by").references(() => user.id),
  createdAt: timestamp("created_at").defaultNow().notNull()
}, (table) => ({
  orgIdx: index("api_key_org_idx").on(table.organizationId),
  prefixIdx: index("api_key_prefix_idx").on(table.prefix),
  keyHashIdx: uniqueIndex("api_key_key_hash_idx").on(table.keyHash)
}));
var auditLog = pgTable("audit_log", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  userId: text("user_id").references(() => user.id),
  actorEmail: text("actor_email"),
  action: text("action").notNull(),
  resource: text("resource").notNull(),
  resourceId: text("resource_id"),
  metadata: jsonb("metadata").$type(),
  ipAddress: text("ip_address"),
  userAgent: text("user_agent"),
  createdAt: timestamp("created_at").defaultNow().notNull()
}, (table) => ({ orgCreatedIdx: index("audit_log_org_created_idx").on(table.organizationId, table.createdAt) }));
var organizationExtensionRelations = relations(organizationExtension, ({ one }) => ({ organization: one(organization, {
  fields: [organizationExtension.organizationId],
  references: [organization.id]
}) }));
var organizationRelations = relations(organization, ({ one, many }) => ({
  members: many(member),
  invitations: many(invitation),
  statements: many(statement),
  subscriptions: many(subscription),
  extension: one(organizationExtension),
  awsAccounts: many(awsAccount),
  emailTemplates: many(emailTemplate),
  apiKeys: many(apiKey),
  auditLogs: many(auditLog),
  contacts: many(contact),
  topics: many(topic)
}));
var awsAccountRelations = relations(awsAccount, ({ one, many }) => ({
  organization: one(organization, {
    fields: [awsAccount.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [awsAccount.createdBy],
    references: [user.id]
  }),
  permissions: many(awsAccountPermission)
}));
var awsAccountPermissionRelations = relations(awsAccountPermission, ({ one }) => ({
  user: one(user, {
    fields: [awsAccountPermission.userId],
    references: [user.id],
    relationName: "userPermissions"
  }),
  awsAccount: one(awsAccount, {
    fields: [awsAccountPermission.awsAccountId],
    references: [awsAccount.id]
  }),
  grantedByUser: one(user, {
    fields: [awsAccountPermission.grantedBy],
    references: [user.id],
    relationName: "grantedPermissions"
  })
}));
var emailTemplateRelations = relations(emailTemplate, ({ one }) => ({
  organization: one(organization, {
    fields: [emailTemplate.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [emailTemplate.createdBy],
    references: [user.id]
  })
}));
var apiKeyRelations = relations(apiKey, ({ one }) => ({
  organization: one(organization, {
    fields: [apiKey.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [apiKey.createdBy],
    references: [user.id]
  })
}));
var auditLogRelations = relations(auditLog, ({ one }) => ({
  organization: one(organization, {
    fields: [auditLog.organizationId],
    references: [organization.id]
  }),
  user: one(user, {
    fields: [auditLog.userId],
    references: [user.id]
  })
}));

// ../../packages/db/dist/workflows-B_STGEtP.js
var CASCADE_ENGAGEMENT_FIELD = "engagement.status";
var MAX_WORKFLOW_RETRIES = 5;
var workflowStatusEnum = pgEnum("workflow_status", [
  "draft",
  "enabled",
  "paused",
  "archived"
]);
var workflowExecutionStatusEnum = pgEnum("workflow_execution_status", [
  "pending",
  "active",
  "paused",
  "waiting",
  "completed",
  "failed",
  "cancelled"
]);
var workflowStepExecutionStatusEnum = pgEnum("workflow_step_execution_status", [
  "pending",
  "executing",
  "completed",
  "failed",
  "skipped"
]);
var workflow = pgTable("workflow", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  awsAccountId: text("aws_account_id").references(() => awsAccount.id, { onDelete: "set null" }),
  name: text("name").notNull(),
  description: text("description"),
  topicId: text("topic_id").references(() => topic.id, { onDelete: "set null" }),
  canvasViewport: jsonb("canvas_viewport").$type().default({
    x: 0,
    y: 0,
    zoom: 1
  }),
  status: workflowStatusEnum("status").default("draft").notNull(),
  triggerType: text("trigger_type").$type(),
  triggerConfig: jsonb("trigger_config").$type().default({}),
  steps: jsonb("steps").$type().default([]),
  transitions: jsonb("transitions").$type().default([]),
  version: integer("version").default(1).notNull(),
  allowReentry: boolean("allow_reentry").default(false).notNull(),
  reentryDelaySeconds: integer("reentry_delay_seconds"),
  maxConcurrentExecutions: integer("max_concurrent_executions").default(1000),
  contactCooldownSeconds: integer("contact_cooldown_seconds"),
  totalExecutions: integer("total_executions").default(0).notNull(),
  activeExecutions: integer("active_executions").default(0).notNull(),
  completedExecutions: integer("completed_executions").default(0).notNull(),
  failedExecutions: integer("failed_executions").default(0).notNull(),
  droppedExecutions: integer("dropped_executions").default(0).notNull(),
  aiGenerated: boolean("ai_generated").default(false),
  aiPrompt: text("ai_prompt"),
  slug: text("slug"),
  sourceTs: text("source_ts"),
  sourceHash: text("source_hash"),
  pushedFromCli: boolean("pushed_from_cli").default(false),
  lastPushedAt: timestamp("last_pushed_at"),
  cliProjectPath: text("cli_project_path"),
  lastEditedFrom: text("last_edited_from").$type(),
  defaultFrom: text("default_from"),
  defaultFromName: text("default_from_name"),
  defaultReplyTo: text("default_reply_to"),
  defaultSenderId: text("default_sender_id"),
  lastTriggeredAt: timestamp("last_triggered_at"),
  createdBy: text("created_by").references(() => user.id, { onDelete: "set null" }),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [
  index("workflow_org_idx").on(table.organizationId),
  index("workflow_status_idx").on(table.organizationId, table.status),
  index("workflow_trigger_type_idx").on(table.organizationId, table.triggerType),
  index("workflow_aws_account_idx").on(table.awsAccountId),
  uniqueIndex("workflow_org_slug_idx").on(table.organizationId, table.slug)
]);
var workflowExecution = pgTable("workflow_execution", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  workflowId: text("workflow_id").references(() => workflow.id, { onDelete: "cascade" }).notNull(),
  contactId: text("contact_id").references(() => contact.id, { onDelete: "cascade" }).notNull(),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  allowReentry: boolean("allow_reentry").default(false).notNull(),
  status: workflowExecutionStatusEnum("status").default("pending").notNull(),
  currentStepId: text("current_step_id"),
  definitionSnapshot: jsonb("definition_snapshot").$type(),
  context: jsonb("context").$type().default({}),
  triggerEventId: text("trigger_event_id"),
  triggerData: jsonb("trigger_data").$type(),
  waitingForEvent: text("waiting_for_event"),
  waitingForConditions: jsonb("waiting_for_conditions").$type(),
  waitTimeoutAt: timestamp("wait_timeout_at"),
  waitTimeoutSchedulerName: text("wait_timeout_scheduler_name"),
  nextStepScheduledAt: timestamp("next_step_scheduled_at"),
  delaySchedulerName: text("delay_scheduler_name"),
  error: text("error"),
  errorStepId: text("error_step_id"),
  retryCount: integer("retry_count").default(0),
  startedAt: timestamp("started_at"),
  completedAt: timestamp("completed_at"),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [
  index("workflow_execution_workflow_idx").on(table.workflowId),
  index("workflow_execution_contact_idx").on(table.contactId),
  index("workflow_execution_org_idx").on(table.organizationId),
  index("workflow_execution_status_idx").on(table.workflowId, table.status),
  index("workflow_execution_org_status_idx").on(table.organizationId, table.status),
  index("workflow_execution_scheduled_idx").on(table.nextStepScheduledAt),
  index("workflow_execution_waiting_event_idx").on(table.organizationId, table.waitingForEvent),
  uniqueIndex("workflow_execution_no_reentry_idx").on(table.workflowId, table.contactId).where(sql`${table.status} IN ('pending', 'active', 'paused', 'waiting') AND ${table.allowReentry} = false`)
]);
var workflowStepExecution = pgTable("workflow_step_execution", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  executionId: text("execution_id").references(() => workflowExecution.id, { onDelete: "cascade" }).notNull(),
  stepId: text("step_id").notNull(),
  stepType: text("step_type").$type().notNull(),
  status: workflowStepExecutionStatusEnum("status").default("pending").notNull(),
  idempotencyKey: text("idempotency_key").notNull(),
  branch: text("branch"),
  result: jsonb("result").$type(),
  error: text("error"),
  skipReason: text("skip_reason"),
  startedAt: timestamp("started_at"),
  completedAt: timestamp("completed_at"),
  createdAt: timestamp("created_at").defaultNow().notNull()
}, (table) => [index("workflow_step_execution_execution_idx").on(table.executionId), uniqueIndex("workflow_step_execution_idempotency_idx").on(table.idempotencyKey)]);
var workflowRelations = relations(workflow, ({ one, many }) => ({
  organization: one(organization, {
    fields: [workflow.organizationId],
    references: [organization.id]
  }),
  awsAccount: one(awsAccount, {
    fields: [workflow.awsAccountId],
    references: [awsAccount.id]
  }),
  topic: one(topic, {
    fields: [workflow.topicId],
    references: [topic.id]
  }),
  createdByUser: one(user, {
    fields: [workflow.createdBy],
    references: [user.id]
  }),
  executions: many(workflowExecution)
}));
var workflowExecutionRelations = relations(workflowExecution, ({ one, many }) => ({
  workflow: one(workflow, {
    fields: [workflowExecution.workflowId],
    references: [workflow.id]
  }),
  contact: one(contact, {
    fields: [workflowExecution.contactId],
    references: [contact.id]
  }),
  organization: one(organization, {
    fields: [workflowExecution.organizationId],
    references: [organization.id]
  }),
  stepExecutions: many(workflowStepExecution)
}));
var workflowStepExecutionRelations = relations(workflowStepExecution, ({ one }) => ({ execution: one(workflowExecution, {
  fields: [workflowStepExecution.executionId],
  references: [workflowExecution.id]
}) }));

// ../../packages/db/dist/batch-BZx-yPMY.js
var batchSendStatusEnum = pgEnum("batch_send_status", [
  "draft",
  "scheduled",
  "queued",
  "processing",
  "completed",
  "failed",
  "cancelled"
]);
var messageSendStatusEnum = pgEnum("message_send_status", [
  "pending",
  "queued",
  "sent",
  "delivered",
  "opened",
  "clicked",
  "bounced",
  "complained",
  "suppressed",
  "failed",
  "opted_out"
]);
var MESSAGE_SEND_UNACCEPTED_STATUSES = [
  "pending",
  "queued",
  "failed",
  "opted_out"
];
var messageSourceTypeEnum = pgEnum("message_source_type", [
  "transactional",
  "batch",
  "campaign",
  "workflow"
]);
var batchSend = pgTable("batch_send", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  awsAccountId: text("aws_account_id").references(() => awsAccount.id, { onDelete: "set null" }),
  name: text("name"),
  channel: text("channel").$type().default("email").notNull(),
  subject: text("subject"),
  previewText: text("preview_text"),
  from: text("from"),
  fromName: text("from_name"),
  replyTo: text("reply_to"),
  emailTemplateId: text("email_template_id").references(() => template.id, { onDelete: "set null" }),
  htmlContent: text("html_content"),
  textContent: text("text_content"),
  variableMappings: json("variable_mappings").$type(),
  body: text("body"),
  senderId: text("sender_id"),
  audienceType: text("audience_type").$type().default("all"),
  topicId: text("topic_id"),
  segmentId: text("segment_id"),
  status: batchSendStatusEnum("status").default("draft").notNull(),
  totalRecipients: integer("total_recipients").default(0).notNull(),
  processedRecipients: integer("processed_recipients").default(0).notNull(),
  sent: integer("sent").default(0).notNull(),
  delivered: integer("delivered").default(0).notNull(),
  failed: integer("failed").default(0).notNull(),
  opened: integer("opened").default(0).notNull(),
  clicked: integer("clicked").default(0).notNull(),
  bounced: integer("bounced").default(0).notNull(),
  complained: integer("complained").default(0).notNull(),
  suppressed: integer("suppressed").default(0).notNull(),
  smsSegments: integer("sms_segments").default(0).notNull(),
  smsOptedOut: integer("sms_opted_out").default(0).notNull(),
  errorMessage: text("error_message"),
  errorDetails: json("error_details").$type(),
  lastChunkAt: timestamp("last_chunk_at"),
  lastChunkIndex: integer("last_chunk_index"),
  lastCursor: json("last_cursor").$type(),
  scheduledFor: timestamp("scheduled_for"),
  startedAt: timestamp("started_at"),
  completedAt: timestamp("completed_at"),
  createdBy: text("created_by").references(() => user.id, { onDelete: "set null" }),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [
  index("batch_send_org_idx").on(table.organizationId),
  index("batch_send_channel_idx").on(table.channel),
  index("batch_send_status_idx").on(table.organizationId, table.status),
  index("batch_send_created_at_idx").on(table.organizationId, table.createdAt)
]);
var messageSend = pgTable("message_send", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  contactId: text("contact_id").references(() => contact.id, { onDelete: "set null" }),
  awsAccountId: text("aws_account_id").references(() => awsAccount.id, { onDelete: "set null" }).notNull(),
  channel: text("channel").$type().default("email").notNull(),
  sourceType: messageSourceTypeEnum("source_type").notNull(),
  batchSendId: text("batch_send_id").references(() => batchSend.id, { onDelete: "set null" }),
  workflowExecutionId: text("workflow_execution_id").references(() => workflowExecution.id, { onDelete: "set null" }),
  recipient: text("recipient").notNull(),
  subject: text("subject"),
  from: text("from"),
  fromName: text("from_name"),
  emailTemplateId: text("email_template_id").references(() => template.id, { onDelete: "set null" }),
  body: text("body"),
  senderId: text("sender_id"),
  smsSegmentCount: integer("sms_segment_count"),
  variables: json("variables").$type().default({}),
  messageId: text("message_id"),
  status: messageSendStatusEnum("status").default("pending").notNull(),
  sentAt: timestamp("sent_at"),
  deliveredAt: timestamp("delivered_at"),
  openedAt: timestamp("opened_at"),
  clickedAt: timestamp("clicked_at"),
  bouncedAt: timestamp("bounced_at"),
  complainedAt: timestamp("complained_at"),
  suppressedAt: timestamp("suppressed_at"),
  optedOutAt: timestamp("opted_out_at"),
  openUserAgent: text("open_user_agent"),
  openIpAddress: text("open_ip_address"),
  clickUserAgent: text("click_user_agent"),
  clickIpAddress: text("click_ip_address"),
  claimedAt: timestamp("claimed_at"),
  error: text("error"),
  bounceType: text("bounce_type"),
  bounceSubType: text("bounce_sub_type"),
  clickedUrl: text("clicked_url"),
  createdAt: timestamp("created_at").defaultNow().notNull()
}, (table) => [
  index("message_send_org_idx").on(table.organizationId),
  index("message_send_contact_idx").on(table.contactId),
  index("message_send_channel_idx").on(table.channel),
  index("message_send_batch_idx").on(table.batchSendId),
  index("message_send_workflow_execution_idx").on(table.workflowExecutionId),
  index("message_send_status_idx").on(table.batchSendId, table.status),
  uniqueIndex("message_send_message_id_idx").on(table.messageId),
  index("message_send_source_type_idx").on(table.sourceType),
  index("message_send_created_at_idx").on(table.createdAt),
  index("message_send_org_created_idx").on(table.organizationId, table.createdAt),
  uniqueIndex("message_send_dedup_idx").on(table.batchSendId, table.contactId).where(sql`contact_id IS NOT NULL`),
  index("message_send_org_channel_sent_at_idx").on(table.organizationId, table.channel, table.sentAt)
]);
var batchSendRelations = relations(batchSend, ({ one, many }) => ({
  organization: one(organization, {
    fields: [batchSend.organizationId],
    references: [organization.id]
  }),
  awsAccount: one(awsAccount, {
    fields: [batchSend.awsAccountId],
    references: [awsAccount.id]
  }),
  emailTemplate: one(template, {
    fields: [batchSend.emailTemplateId],
    references: [template.id]
  }),
  createdByUser: one(user, {
    fields: [batchSend.createdBy],
    references: [user.id]
  }),
  messageSends: many(messageSend)
}));
var messageSendRelations = relations(messageSend, ({ one }) => ({
  organization: one(organization, {
    fields: [messageSend.organizationId],
    references: [organization.id]
  }),
  contact: one(contact, {
    fields: [messageSend.contactId],
    references: [contact.id]
  }),
  awsAccount: one(awsAccount, {
    fields: [messageSend.awsAccountId],
    references: [awsAccount.id]
  }),
  batchSend: one(batchSend, {
    fields: [messageSend.batchSendId],
    references: [batchSend.id]
  }),
  workflowExecution: one(workflowExecution, {
    fields: [messageSend.workflowExecutionId],
    references: [workflowExecution.id]
  }),
  emailTemplate: one(template, {
    fields: [messageSend.emailTemplateId],
    references: [template.id]
  })
}));

// ../../packages/db/dist/events-82BmWOQ1.js
var contactEvent = pgTable("contact_event", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  contactId: text("contact_id").references(() => contact.id, { onDelete: "cascade" }).notNull(),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  eventName: text("event_name").notNull(),
  eventData: json("event_data").$type(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  expiresAt: timestamp("expires_at")
}, (table) => ({
  contactIdx: index("contact_event_contact_idx").on(table.contactId),
  orgEventIdx: index("contact_event_org_event_idx").on(table.organizationId, table.eventName),
  contactEventIdx: index("contact_event_contact_event_idx").on(table.contactId, table.eventName),
  expiresIdx: index("contact_event_expires_idx").on(table.expiresAt)
}));
var contactEventRelations = relations(contactEvent, ({ one }) => ({
  contact: one(contact, {
    fields: [contactEvent.contactId],
    references: [contact.id]
  }),
  organization: one(organization, {
    fields: [contactEvent.organizationId],
    references: [organization.id]
  })
}));

// ../../packages/db/dist/scim-provider-BplOMBCA.js
var scimProvider = pgTable("scim_provider", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  providerId: text("provider_id").notNull(),
  scimToken: text("scim_token").notNull(),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  userId: text("user_id").references(() => user.id, { onDelete: "set null" }),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [index("scim_provider_org_idx").on(table.organizationId)]);
var scimProviderRelations = relations(scimProvider, ({ one }) => ({
  organization: one(organization, {
    fields: [scimProvider.organizationId],
    references: [organization.id]
  }),
  user: one(user, {
    fields: [scimProvider.userId],
    references: [user.id]
  })
}));

// ../../packages/db/dist/segments-BensyNan.js
var segment = pgTable("segment", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  name: text("name").notNull(),
  description: text("description"),
  condition: json("condition").$type().notNull(),
  trackMembership: boolean("track_membership").default(false).notNull(),
  memberCount: integer("member_count").default(0).notNull(),
  lastComputedAt: timestamp("last_computed_at"),
  createdBy: text("created_by").references(() => user.id),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => ({
  orgIdx: index("segment_org_idx").on(table.organizationId),
  nameIdx: index("segment_name_idx").on(table.organizationId, table.name)
}));
var segmentRelations = relations(segment, ({ one }) => ({
  organization: one(organization, {
    fields: [segment.organizationId],
    references: [organization.id]
  }),
  createdByUser: one(user, {
    fields: [segment.createdBy],
    references: [user.id]
  })
}));

// ../../packages/db/dist/sso-provider-XKVD332z.js
var ssoProvider = pgTable("sso_provider", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  providerId: text("provider_id").unique().notNull(),
  issuer: text("issuer").notNull(),
  domain: text("domain").notNull(),
  oidcConfig: text("oidc_config"),
  samlConfig: text("saml_config"),
  userId: text("user_id").references(() => user.id, { onDelete: "set null" }),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  domainVerified: boolean("domain_verified").default(false).notNull(),
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [index("sso_provider_org_idx").on(table.organizationId)]);
var ssoProviderRelations = relations(ssoProvider, ({ one }) => ({
  organization: one(organization, {
    fields: [ssoProvider.organizationId],
    references: [organization.id]
  }),
  user: one(user, {
    fields: [ssoProvider.userId],
    references: [user.id]
  })
}));

// ../../packages/db/dist/usage-D1991xv0.js
var aiUsageMonthly = pgTable("ai_usage_monthly", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  periodKey: text("period_key").notNull(),
  messageCount: integer("message_count").default(0).notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [uniqueIndex("ai_usage_monthly_org_period_idx").on(table.organizationId, table.periodKey), index("ai_usage_monthly_period_idx").on(table.periodKey)]);
var aiUsageLog = pgTable("ai_usage_log", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  userId: text("user_id").references(() => user.id, { onDelete: "set null" }),
  periodKey: text("period_key").notNull(),
  featureType: text("feature_type").notNull().default("ai_chat"),
  templateId: text("template_id"),
  inputTokens: integer("input_tokens"),
  outputTokens: integer("output_tokens"),
  totalTokens: integer("total_tokens"),
  model: text("model"),
  durationMs: integer("duration_ms"),
  createdAt: timestamp("created_at").defaultNow().notNull()
}, (table) => [
  index("ai_usage_log_org_idx").on(table.organizationId),
  index("ai_usage_log_period_idx").on(table.periodKey),
  index("ai_usage_log_org_period_idx").on(table.organizationId, table.periodKey),
  index("ai_usage_log_user_idx").on(table.userId),
  index("ai_usage_log_created_idx").on(table.createdAt)
]);
var aiUsageMonthlyRelations = relations(aiUsageMonthly, ({ one }) => ({ organization: one(organization, {
  fields: [aiUsageMonthly.organizationId],
  references: [organization.id]
}) }));
var aiUsageLogRelations = relations(aiUsageLog, ({ one }) => ({
  organization: one(organization, {
    fields: [aiUsageLog.organizationId],
    references: [organization.id]
  }),
  user: one(user, {
    fields: [aiUsageLog.userId],
    references: [user.id]
  })
}));
var apiUsageDaily = pgTable("api_usage_daily", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  dateKey: text("date_key").notNull(),
  requestCount: integer("request_count").default(0).notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [uniqueIndex("api_usage_daily_org_date_idx").on(table.organizationId, table.dateKey), index("api_usage_daily_date_idx").on(table.dateKey)]);
var apiRateLimitWindow = pgTable("api_rate_limit_window", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  minuteKey: text("minute_key").notNull(),
  requestCount: integer("request_count").default(0).notNull(),
  expiresAt: timestamp("expires_at").notNull()
}, (table) => [uniqueIndex("api_rate_limit_org_minute_idx").on(table.organizationId, table.minuteKey), index("api_rate_limit_expires_idx").on(table.expiresAt)]);
var apiUsageDailyRelations = relations(apiUsageDaily, ({ one }) => ({ organization: one(organization, {
  fields: [apiUsageDaily.organizationId],
  references: [organization.id]
}) }));
var apiRateLimitWindowRelations = relations(apiRateLimitWindow, ({ one }) => ({ organization: one(organization, {
  fields: [apiRateLimitWindow.organizationId],
  references: [organization.id]
}) }));
var messageUsageMonthly = pgTable("message_usage_monthly", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  periodKey: text("period_key").notNull(),
  messageCount: integer("message_count").default(0).notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [uniqueIndex("message_usage_monthly_org_period_idx").on(table.organizationId, table.periodKey), index("message_usage_monthly_period_idx").on(table.periodKey)]);
var messageUsageMonthlyRelations = relations(messageUsageMonthly, ({ one }) => ({ organization: one(organization, {
  fields: [messageUsageMonthly.organizationId],
  references: [organization.id]
}) }));
var eventUsageMonthly = pgTable("event_usage_monthly", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  organizationId: text("organization_id").references(() => organization.id, { onDelete: "cascade" }).notNull(),
  periodKey: text("period_key").notNull(),
  eventCount: integer("event_count").default(0).notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull()
}, (table) => [uniqueIndex("event_usage_monthly_org_period_idx").on(table.organizationId, table.periodKey), index("event_usage_monthly_period_idx").on(table.periodKey)]);
var eventUsageMonthlyRelations = relations(eventUsageMonthly, ({ one }) => ({ organization: one(organization, {
  fields: [eventUsageMonthly.organizationId],
  references: [organization.id]
}) }));

// ../../packages/db/dist/waitlist-CBxmM4a8.js
var waitlist = pgTable("waitlist", {
  id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
  email: text("email").notNull(),
  emailHash: text("email_hash").notNull(),
  product: text("product").notNull(),
  source: text("source"),
  referrer: text("referrer"),
  createdAt: timestamp("created_at").defaultNow().notNull()
}, (table) => [
  uniqueIndex("waitlist_email_product_idx").on(table.emailHash, table.product),
  index("waitlist_product_idx").on(table.product),
  index("waitlist_created_at_idx").on(table.createdAt)
]);

// ../../packages/db/dist/chunk-tgGMfXlM.js
var __defProp2 = Object.defineProperty;
var __export2 = (all) => {
  let target = {};
  for (var name in all)
    __defProp2(target, name, {
      get: all[name],
      enumerable: true
    });
  return target;
};

// ../../packages/db/dist/schema-CtFrnGCD.js
var schema_exports = /* @__PURE__ */ __export2({
  CASCADE_ENGAGEMENT_FIELD: () => CASCADE_ENGAGEMENT_FIELD,
  MAX_WORKFLOW_RETRIES: () => MAX_WORKFLOW_RETRIES,
  MESSAGE_SEND_UNACCEPTED_STATUSES: () => MESSAGE_SEND_UNACCEPTED_STATUSES,
  account: () => account,
  accountRelations: () => accountRelations,
  agent: () => agent,
  agentApprovalQueue: () => agentApprovalQueue,
  agentApprovalQueueRelations: () => agentApprovalQueueRelations,
  agentApprovalStatusEnum: () => agentApprovalStatusEnum,
  agentRelations: () => agentRelations,
  agentStatusEnum: () => agentStatusEnum,
  aiConversation: () => aiConversation,
  aiConversationRelations: () => aiConversationRelations,
  aiUsageLog: () => aiUsageLog,
  aiUsageLogRelations: () => aiUsageLogRelations,
  aiUsageMonthly: () => aiUsageMonthly,
  aiUsageMonthlyRelations: () => aiUsageMonthlyRelations,
  apiKey: () => apiKey,
  apiKeyRelations: () => apiKeyRelations,
  apiRateLimitWindow: () => apiRateLimitWindow,
  apiRateLimitWindowRelations: () => apiRateLimitWindowRelations,
  apiUsageDaily: () => apiUsageDaily,
  apiUsageDailyRelations: () => apiUsageDailyRelations,
  auditLog: () => auditLog,
  auditLogRelations: () => auditLogRelations,
  awsAccount: () => awsAccount,
  awsAccountPermission: () => awsAccountPermission,
  awsAccountPermissionRelations: () => awsAccountPermissionRelations,
  awsAccountRelations: () => awsAccountRelations,
  batchSend: () => batchSend,
  batchSendRelations: () => batchSendRelations,
  batchSendStatusEnum: () => batchSendStatusEnum,
  brandKit: () => brandKit,
  brandKitRelations: () => brandKitRelations,
  contact: () => contact,
  contactEvent: () => contactEvent,
  contactEventRelations: () => contactEventRelations,
  contactRelations: () => contactRelations,
  contactTopic: () => contactTopic,
  contactTopicRelations: () => contactTopicRelations,
  deviceCode: () => deviceCode,
  emailTemplate: () => emailTemplate,
  emailTemplateRelations: () => emailTemplateRelations,
  emailTypeEnum: () => emailTypeEnum,
  eventUsageMonthly: () => eventUsageMonthly,
  eventUsageMonthlyRelations: () => eventUsageMonthlyRelations,
  invitation: () => invitation,
  invitationRelations: () => invitationRelations,
  member: () => member,
  memberRelations: () => memberRelations,
  messageSend: () => messageSend,
  messageSendRelations: () => messageSendRelations,
  messageSendStatusEnum: () => messageSendStatusEnum,
  messageSourceTypeEnum: () => messageSourceTypeEnum,
  messageUsageMonthly: () => messageUsageMonthly,
  messageUsageMonthlyRelations: () => messageUsageMonthlyRelations,
  notification: () => notification,
  notificationRelations: () => notificationRelations,
  organization: () => organization,
  organizationExtension: () => organizationExtension,
  organizationExtensionRelations: () => organizationExtensionRelations,
  organizationRelations: () => organizationRelations,
  passkey: () => passkey,
  passkeyRelations: () => passkeyRelations,
  reusableBlock: () => reusableBlock,
  reusableBlockRelations: () => reusableBlockRelations,
  scimProvider: () => scimProvider,
  scimProviderRelations: () => scimProviderRelations,
  segment: () => segment,
  segmentRelations: () => segmentRelations,
  session: () => session,
  sessionRelations: () => sessionRelations,
  ssoProvider: () => ssoProvider,
  ssoProviderRelations: () => ssoProviderRelations,
  statement: () => statement,
  statementRelations: () => statementRelations,
  subscription: () => subscription,
  subscriptionRelations: () => subscriptionRelations,
  template: () => template,
  templateRelations: () => templateRelations,
  templateStatusEnum: () => templateStatusEnum,
  templateVariable: () => templateVariable,
  templateVariableRelations: () => templateVariableRelations,
  templateVersion: () => templateVersion,
  templateVersionRelations: () => templateVersionRelations,
  topic: () => topic,
  topicRelations: () => topicRelations,
  topicSettings: () => topicSettings,
  topicSettingsRelations: () => topicSettingsRelations,
  twoFactor: () => twoFactor,
  twoFactorRelations: () => twoFactorRelations,
  user: () => user,
  userRelations: () => userRelations,
  variableTypeEnum: () => variableTypeEnum,
  verification: () => verification,
  waitlist: () => waitlist,
  workflow: () => workflow,
  workflowExecution: () => workflowExecution,
  workflowExecutionRelations: () => workflowExecutionRelations,
  workflowExecutionStatusEnum: () => workflowExecutionStatusEnum,
  workflowRelations: () => workflowRelations,
  workflowStatusEnum: () => workflowStatusEnum,
  workflowStepExecution: () => workflowStepExecution,
  workflowStepExecutionRelations: () => workflowStepExecutionRelations,
  workflowStepExecutionStatusEnum: () => workflowStepExecutionStatusEnum
});

// ../../packages/db/dist/segment-filter-C0eeI8NI.js
var VALID_UNITS = new Set([
  "days",
  "hours",
  "minutes"
]);
function validateInterval(value, unit) {
  const num = typeof value === "number" ? value : Number(value);
  if (!Number.isFinite(num) || num <= 0 || !Number.isInteger(num))
    return null;
  if (unit && !VALID_UNITS.has(unit))
    return null;
  return `${num} ${unit && VALID_UNITS.has(unit) ? unit : "days"}`;
}
var COLUMN_MAP = {
  status: "status",
  email: "email",
  lastActivityAt: "last_activity_at",
  lastEmailSentAt: "last_email_sent_at",
  lastEmailOpenedAt: "last_email_opened_at",
  lastEmailClickedAt: "last_email_clicked_at",
  emailsSent: "emails_sent",
  emailsOpened: "emails_opened",
  emailsClicked: "emails_clicked",
  createdAt: "created_at",
  confirmedAt: "confirmed_at"
};
function buildFilterSQL(filter) {
  const { field, operator, value, unit } = filter;
  if (operator === "triggered" || operator === "triggeredWithin" || operator === "notTriggered") {
    const eventName = field;
    if (operator === "triggered")
      return sql`EXISTS (SELECT 1 FROM "contact_event" WHERE "contact_id" = "contact"."id" AND "event_name" = ${eventName})`;
    if (operator === "triggeredWithin") {
      const interval2 = validateInterval(value, unit);
      if (!interval2)
        return null;
      return sql`EXISTS (SELECT 1 FROM "contact_event" WHERE "contact_id" = "contact"."id" AND "event_name" = ${eventName} AND "created_at" > NOW() - INTERVAL ${interval2})`;
    }
    return sql`NOT EXISTS (SELECT 1 FROM "contact_event" WHERE "contact_id" = "contact"."id" AND "event_name" = ${eventName})`;
  }
  if (field === "topics") {
    const topicId = value;
    if (operator === "hasTopic")
      return sql`EXISTS (SELECT 1 FROM "contact_topic" WHERE "contact_id" = "contact"."id" AND "topic_id" = ${topicId} AND "status" = 'subscribed')`;
    if (operator === "notHasTopic")
      return sql`NOT EXISTS (SELECT 1 FROM "contact_topic" WHERE "contact_id" = "contact"."id" AND "topic_id" = ${topicId} AND "status" = 'subscribed')`;
    return null;
  }
  if (field.startsWith("properties.")) {
    const propertyKey = field.replace("properties.", "");
    switch (operator) {
      case "equals":
        return sql`properties->>${propertyKey} = ${String(value)}`;
      case "notEquals":
        return sql`properties->>${propertyKey} != ${String(value)}`;
      case "contains":
        return sql`properties->>${propertyKey} ILIKE ${`%${String(value)}%`}`;
      case "notContains":
        return sql`properties->>${propertyKey} NOT ILIKE ${`%${String(value)}%`}`;
      case "startsWith":
        return sql`properties->>${propertyKey} ILIKE ${`${String(value)}%`}`;
      case "endsWith":
        return sql`properties->>${propertyKey} ILIKE ${`%${String(value)}`}`;
      case "greaterThan":
        return sql`(CASE WHEN properties->>${propertyKey} ~ '^-?[0-9]*\.?[0-9]+$' THEN (properties->>${propertyKey})::numeric END) > ${value}`;
      case "lessThan":
        return sql`(CASE WHEN properties->>${propertyKey} ~ '^-?[0-9]*\.?[0-9]+$' THEN (properties->>${propertyKey})::numeric END) < ${value}`;
      case "greaterThanOrEqual":
        return sql`(CASE WHEN properties->>${propertyKey} ~ '^-?[0-9]*\.?[0-9]+$' THEN (properties->>${propertyKey})::numeric END) >= ${value}`;
      case "lessThanOrEqual":
        return sql`(CASE WHEN properties->>${propertyKey} ~ '^-?[0-9]*\.?[0-9]+$' THEN (properties->>${propertyKey})::numeric END) <= ${value}`;
      case "exists":
        return sql`properties ? ${propertyKey}`;
      case "notExists":
        return sql`NOT (properties ? ${propertyKey})`;
      case "inList": {
        const values = value;
        if (values.length === 0)
          return sql`FALSE`;
        return sql`properties->>${propertyKey} = ANY(${sql.param(values)})`;
      }
      case "notInList": {
        const values = value;
        if (values.length === 0)
          return sql`TRUE`;
        return sql`properties->>${propertyKey} != ALL(${sql.param(values)})`;
      }
      default:
        return null;
    }
  }
  const columnName = COLUMN_MAP[field];
  if (!columnName)
    return null;
  const col = sql.raw(`"${columnName}"`);
  switch (operator) {
    case "equals":
      return sql`${col} = ${value}`;
    case "notEquals":
      return sql`${col} != ${value}`;
    case "contains":
      return sql`${col} ILIKE ${`%${String(value)}%`}`;
    case "notContains":
      return sql`${col} NOT ILIKE ${`%${String(value)}%`}`;
    case "startsWith":
      return sql`${col} ILIKE ${`${String(value)}%`}`;
    case "endsWith":
      return sql`${col} ILIKE ${`%${String(value)}`}`;
    case "greaterThan":
      return sql`${col} > ${value}`;
    case "lessThan":
      return sql`${col} < ${value}`;
    case "greaterThanOrEqual":
      return sql`${col} >= ${value}`;
    case "lessThanOrEqual":
      return sql`${col} <= ${value}`;
    case "exists":
      return sql`${col} IS NOT NULL`;
    case "notExists":
      return sql`${col} IS NULL`;
    case "inList": {
      const values = value;
      if (values.length === 0)
        return sql`FALSE`;
      return sql`${col} = ANY(${sql.param(values)})`;
    }
    case "notInList": {
      const values = value;
      if (values.length === 0)
        return sql`TRUE`;
      return sql`${col} != ALL(${sql.param(values)})`;
    }
    case "within": {
      const interval2 = validateInterval(value, unit);
      if (!interval2)
        return null;
      return sql`${col} > NOW() - INTERVAL ${interval2}`;
    }
    default:
      return null;
  }
}
function buildConditionSQL(condition) {
  const groupConditions = [];
  for (const group of condition.groups) {
    const filterConditions = [];
    for (const filter of group.filters) {
      const filterSQL = buildFilterSQL(filter);
      if (filterSQL)
        filterConditions.push(filterSQL);
    }
    if (group.nested) {
      const nestedSQL = buildConditionSQL(group.nested);
      if (nestedSQL)
        filterConditions.push(nestedSQL);
    }
    if (filterConditions.length > 0)
      groupConditions.push(and(...filterConditions));
  }
  if (groupConditions.length === 0)
    return null;
  if (condition.logic === "OR")
    return or(...groupConditions) ?? null;
  return and(...groupConditions) ?? null;
}

// ../../node_modules/.pnpm/pg@8.22.0/node_modules/pg/esm/index.mjs
var import_lib = __toESM(require_lib3(), 1);
var Client3 = import_lib.default.Client;
var Pool = import_lib.default.Pool;
var Connection = import_lib.default.Connection;
var types2 = import_lib.default.types;
var Query = import_lib.default.Query;
var DatabaseError = import_lib.default.DatabaseError;
var escapeIdentifier = import_lib.default.escapeIdentifier;
var escapeLiteral = import_lib.default.escapeLiteral;
var Result = import_lib.default.Result;
var TypeOverrides = import_lib.default.TypeOverrides;
var defaults = import_lib.default.defaults;
var esm_default = import_lib.default;

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/node-postgres/session.js
var { Pool: Pool2, types: types3 } = esm_default;

class NodePgPreparedQuery extends PgPreparedQuery {
  constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, name, _isResponseInArrayMode, customResultMapper) {
    super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
    this.client = client;
    this.queryString = queryString;
    this.params = params;
    this.logger = logger;
    this.fields = fields;
    this._isResponseInArrayMode = _isResponseInArrayMode;
    this.customResultMapper = customResultMapper;
    this.rawQueryConfig = {
      name,
      text: queryString,
      types: {
        getTypeParser: (typeId, format) => {
          if (typeId === types3.builtins.TIMESTAMPTZ) {
            return (val) => val;
          }
          if (typeId === types3.builtins.TIMESTAMP) {
            return (val) => val;
          }
          if (typeId === types3.builtins.DATE) {
            return (val) => val;
          }
          if (typeId === types3.builtins.INTERVAL) {
            return (val) => val;
          }
          if (typeId === 1231) {
            return (val) => val;
          }
          if (typeId === 1115) {
            return (val) => val;
          }
          if (typeId === 1185) {
            return (val) => val;
          }
          if (typeId === 1187) {
            return (val) => val;
          }
          if (typeId === 1182) {
            return (val) => val;
          }
          return types3.getTypeParser(typeId, format);
        }
      }
    };
    this.queryConfig = {
      name,
      text: queryString,
      rowMode: "array",
      types: {
        getTypeParser: (typeId, format) => {
          if (typeId === types3.builtins.TIMESTAMPTZ) {
            return (val) => val;
          }
          if (typeId === types3.builtins.TIMESTAMP) {
            return (val) => val;
          }
          if (typeId === types3.builtins.DATE) {
            return (val) => val;
          }
          if (typeId === types3.builtins.INTERVAL) {
            return (val) => val;
          }
          if (typeId === 1231) {
            return (val) => val;
          }
          if (typeId === 1115) {
            return (val) => val;
          }
          if (typeId === 1185) {
            return (val) => val;
          }
          if (typeId === 1187) {
            return (val) => val;
          }
          if (typeId === 1182) {
            return (val) => val;
          }
          return types3.getTypeParser(typeId, format);
        }
      }
    };
  }
  static [entityKind] = "NodePgPreparedQuery";
  rawQueryConfig;
  queryConfig;
  async execute(placeholderValues = {}) {
    return tracer.startActiveSpan("drizzle.execute", async () => {
      const params = fillPlaceholders(this.params, placeholderValues);
      this.logger.logQuery(this.rawQueryConfig.text, params);
      const { fields, rawQueryConfig: rawQuery, client, queryConfig: query, joinsNotNullableMap, customResultMapper } = this;
      if (!fields && !customResultMapper) {
        return tracer.startActiveSpan("drizzle.driver.execute", async (span) => {
          span?.setAttributes({
            "drizzle.query.name": rawQuery.name,
            "drizzle.query.text": rawQuery.text,
            "drizzle.query.params": JSON.stringify(params)
          });
          return this.queryWithCache(rawQuery.text, params, async () => {
            return await client.query(rawQuery, params);
          });
        });
      }
      const result = await tracer.startActiveSpan("drizzle.driver.execute", (span) => {
        span?.setAttributes({
          "drizzle.query.name": query.name,
          "drizzle.query.text": query.text,
          "drizzle.query.params": JSON.stringify(params)
        });
        return this.queryWithCache(query.text, params, async () => {
          return await client.query(query, params);
        });
      });
      return tracer.startActiveSpan("drizzle.mapResponse", () => {
        return customResultMapper ? customResultMapper(result.rows) : result.rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
      });
    });
  }
  all(placeholderValues = {}) {
    return tracer.startActiveSpan("drizzle.execute", () => {
      const params = fillPlaceholders(this.params, placeholderValues);
      this.logger.logQuery(this.rawQueryConfig.text, params);
      return tracer.startActiveSpan("drizzle.driver.execute", (span) => {
        span?.setAttributes({
          "drizzle.query.name": this.rawQueryConfig.name,
          "drizzle.query.text": this.rawQueryConfig.text,
          "drizzle.query.params": JSON.stringify(params)
        });
        return this.queryWithCache(this.rawQueryConfig.text, params, async () => {
          return this.client.query(this.rawQueryConfig, params);
        }).then((result) => result.rows);
      });
    });
  }
  isResponseInArrayMode() {
    return this._isResponseInArrayMode;
  }
}

class NodePgSession extends PgSession {
  constructor(client, dialect, schema, options = {}) {
    super(dialect);
    this.client = client;
    this.schema = schema;
    this.options = options;
    this.logger = options.logger ?? new NoopLogger;
    this.cache = options.cache ?? new NoopCache;
  }
  static [entityKind] = "NodePgSession";
  logger;
  cache;
  prepareQuery(query, fields, name, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) {
    return new NodePgPreparedQuery(this.client, query.sql, query.params, this.logger, this.cache, queryMetadata, cacheConfig, fields, name, isResponseInArrayMode, customResultMapper);
  }
  async transaction(transaction, config) {
    const isPool = this.client instanceof Pool2 || Object.getPrototypeOf(this.client).constructor.name.includes("Pool");
    const session2 = isPool ? new NodePgSession(await this.client.connect(), this.dialect, this.schema, this.options) : this;
    const tx = new NodePgTransaction(this.dialect, session2, this.schema);
    await tx.execute(sql`begin${config ? sql` ${tx.getTransactionConfigSQL(config)}` : undefined}`);
    try {
      const result = await transaction(tx);
      await tx.execute(sql`commit`);
      return result;
    } catch (error2) {
      await tx.execute(sql`rollback`);
      throw error2;
    } finally {
      if (isPool)
        session2.client.release();
    }
  }
  async count(sql2) {
    const res = await this.execute(sql2);
    return Number(res["rows"][0]["count"]);
  }
}

class NodePgTransaction extends PgTransaction {
  static [entityKind] = "NodePgTransaction";
  async transaction(transaction) {
    const savepointName = `sp${this.nestedIndex + 1}`;
    const tx = new NodePgTransaction(this.dialect, this.session, this.schema, this.nestedIndex + 1);
    await tx.execute(sql.raw(`savepoint ${savepointName}`));
    try {
      const result = await transaction(tx);
      await tx.execute(sql.raw(`release savepoint ${savepointName}`));
      return result;
    } catch (err) {
      await tx.execute(sql.raw(`rollback to savepoint ${savepointName}`));
      throw err;
    }
  }
}

// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.1.0_@opentelemetry+api@1.9.0_@types+pg@8.20.0_kysely@0.29.2_pg@8.22.0/node_modules/drizzle-orm/node-postgres/driver.js
class NodePgDriver {
  constructor(client, dialect, options = {}) {
    this.client = client;
    this.dialect = dialect;
    this.options = options;
  }
  static [entityKind] = "NodePgDriver";
  createSession(schema) {
    return new NodePgSession(this.client, this.dialect, schema, {
      logger: this.options.logger,
      cache: this.options.cache
    });
  }
}

class NodePgDatabase extends PgDatabase {
  static [entityKind] = "NodePgDatabase";
}
function construct(client, config = {}) {
  const dialect = new PgDialect({ casing: config.casing });
  let logger;
  if (config.logger === true) {
    logger = new DefaultLogger;
  } else if (config.logger !== false) {
    logger = config.logger;
  }
  let schema;
  if (config.schema) {
    const tablesConfig = extractTablesRelationalConfig(config.schema, createTableRelationsHelpers);
    schema = {
      fullSchema: config.schema,
      schema: tablesConfig.tables,
      tableNamesMap: tablesConfig.tableNamesMap
    };
  }
  const driver = new NodePgDriver(client, dialect, { logger, cache: config.cache });
  const session2 = driver.createSession(schema);
  const db = new NodePgDatabase(dialect, session2, schema);
  db.$client = client;
  db.$cache = config.cache;
  if (db.$cache) {
    db.$cache["invalidate"] = config.cache?.onMutate;
  }
  return db;
}
function drizzle(...params) {
  if (typeof params[0] === "string") {
    const instance = new esm_default.Pool({
      connectionString: params[0]
    });
    return construct(instance, params[1]);
  }
  if (isConfig(params[0])) {
    const { connection, client, ...drizzleConfig } = params[0];
    if (client)
      return construct(client, drizzleConfig);
    const instance = typeof connection === "string" ? new esm_default.Pool({
      connectionString: connection
    }) : new esm_default.Pool(connection);
    return construct(instance, drizzleConfig);
  }
  return construct(params[0], params[1]);
}
((drizzle2) => {
  function mock(config) {
    return construct({}, config);
  }
  drizzle2.mock = mock;
})(drizzle || (drizzle = {}));

// ../../packages/db/dist/src-7wbnoR9d.js
import { createHash } from "node:crypto";
async function insertAgent(values, dbClient = db) {
  const [inserted] = await dbClient.insert(agent).values(values).onConflictDoNothing().returning();
  return inserted ?? null;
}
async function findAgentForOrg(agentId, organizationId, dbClient = db) {
  return dbClient.query.agent.findFirst({ where: (a, { and: andOp, eq: eqOp }) => andOp(eqOp(a.id, agentId), eqOp(a.organizationId, organizationId)) });
}
async function findAgentByAddress(organizationId, emailAddress, dbClient = db) {
  return dbClient.query.agent.findFirst({ where: (a, { and: andOp, eq: eqOp }) => andOp(eqOp(a.organizationId, organizationId), eqOp(a.emailAddress, emailAddress)) });
}
async function listAgentsForOrg(organizationId, dbClient = db) {
  return dbClient.query.agent.findMany({
    where: (a, { eq: eqOp }) => eqOp(a.organizationId, organizationId),
    orderBy: [desc(agent.createdAt)]
  });
}
async function updateAgentForOrg(agentId, organizationId, updateData, dbClient = db) {
  const { status: _status, ...safeUpdate } = updateData;
  const [updated] = await dbClient.update(agent).set({
    ...safeUpdate,
    updatedAt: /* @__PURE__ */ new Date
  }).where(and(eq(agent.id, agentId), eq(agent.organizationId, organizationId))).returning();
  return updated ?? null;
}
async function killAgentForOrg(agentId, organizationId, dbClient = db) {
  const [killed] = await dbClient.update(agent).set({
    status: "KILLED",
    updatedAt: /* @__PURE__ */ new Date
  }).where(and(eq(agent.id, agentId), eq(agent.organizationId, organizationId))).returning();
  return killed ?? null;
}
async function insertApprovalRequest(values, dbClient = db) {
  const [inserted] = await dbClient.insert(agentApprovalQueue).values(values).returning();
  return inserted ?? null;
}
async function listApprovalQueueForOrg(organizationId, status, dbClient = db) {
  return dbClient.query.agentApprovalQueue.findMany({
    where: (q, { and: andOp, eq: eqOp }) => status ? andOp(eqOp(q.organizationId, organizationId), eqOp(q.status, status)) : eqOp(q.organizationId, organizationId),
    orderBy: [desc(agentApprovalQueue.createdAt)]
  });
}
async function findApprovalForOrg(approvalId, organizationId, dbClient = db) {
  return dbClient.query.agentApprovalQueue.findFirst({ where: (q, { and: andOp, eq: eqOp }) => andOp(eqOp(q.id, approvalId), eqOp(q.organizationId, organizationId)) });
}
async function decideApproval(approvalId, organizationId, status, decidedBy, dbClient = db) {
  const [decided] = await dbClient.update(agentApprovalQueue).set({
    status,
    decidedBy,
    decidedAt: /* @__PURE__ */ new Date,
    updatedAt: /* @__PURE__ */ new Date
  }).where(and(eq(agentApprovalQueue.id, approvalId), eq(agentApprovalQueue.organizationId, organizationId), eq(agentApprovalQueue.status, "PENDING"))).returning();
  return decided ?? null;
}
async function markApprovalSent(approvalId, organizationId, messageId, dbClient = db) {
  const [updated] = await dbClient.update(agentApprovalQueue).set({
    status: "SENT",
    messageId,
    updatedAt: /* @__PURE__ */ new Date
  }).where(and(eq(agentApprovalQueue.id, approvalId), eq(agentApprovalQueue.organizationId, organizationId), eq(agentApprovalQueue.status, "APPROVED"))).returning();
  return updated ?? null;
}
async function markApprovalFailed(approvalId, organizationId, errorMessage, dbClient = db) {
  const [updated] = await dbClient.update(agentApprovalQueue).set({
    status: "FAILED",
    errorMessage,
    updatedAt: /* @__PURE__ */ new Date
  }).where(and(eq(agentApprovalQueue.id, approvalId), eq(agentApprovalQueue.organizationId, organizationId), eq(agentApprovalQueue.status, "APPROVED"))).returning();
  return updated ?? null;
}
async function findAwsAccountForOrg(awsAccountId, organizationId, dbClient = db) {
  const [result] = await dbClient.select({ id: awsAccount.id }).from(awsAccount).where(and(eq(awsAccount.id, awsAccountId), eq(awsAccount.organizationId, organizationId))).limit(1);
  return result ?? null;
}
async function findBroadcast(id, organizationId, dbClient = db) {
  const [result] = await dbClient.select().from(batchSend).where(and(eq(batchSend.id, id), eq(batchSend.organizationId, organizationId))).limit(1);
  return result ?? null;
}
async function createBroadcast(data, dbClient = db) {
  const [result] = await dbClient.insert(batchSend).values(data).returning();
  return result;
}
async function promoteBroadcast(id, organizationId, data, dbClient = db) {
  const [result] = await dbClient.update(batchSend).set({
    ...data,
    updatedAt: /* @__PURE__ */ new Date
  }).where(and(eq(batchSend.id, id), eq(batchSend.organizationId, organizationId), eq(batchSend.status, "draft"))).returning();
  return result ?? null;
}
async function cancelBroadcast(id, organizationId, dbClient = db) {
  await dbClient.update(batchSend).set({
    status: "cancelled",
    updatedAt: /* @__PURE__ */ new Date
  }).where(and(eq(batchSend.id, id), eq(batchSend.organizationId, organizationId)));
}
async function buildRecipientConditions(organizationId, channel3, filter, dbClient = db) {
  const conditions = [eq(contact.organizationId, organizationId)];
  if (channel3 === "email") {
    conditions.push(isNotNull(contact.email));
    conditions.push(sql`(${contact.emailStatus} = 'active' OR ${contact.emailStatus} IS NULL)`);
  } else {
    conditions.push(isNotNull(contact.phone));
    conditions.push(eq(contact.smsStatus, "opted_in"));
  }
  if (filter?.audienceType === "topic" && filter.topicId) {
    const topicSubquery = dbClient.select({ contactId: contactTopic.contactId }).from(contactTopic).where(and(eq(contactTopic.contactId, contact.id), eq(contactTopic.topicId, filter.topicId), eq(contactTopic.status, "subscribed")));
    conditions.push(exists(topicSubquery));
  } else if (filter?.audienceType === "segment" && filter.segmentId) {
    const seg = await dbClient.query.segment.findFirst({ where: (s, { and: a, eq: e }) => a(e(s.id, filter.segmentId), e(s.organizationId, organizationId)) });
    if (seg?.condition) {
      const segmentSQL = buildConditionSQL(seg.condition);
      if (segmentSQL)
        conditions.push(segmentSQL);
    }
  }
  return conditions;
}
async function countBroadcastRecipients(organizationId, channel3, filter, dbClient = db) {
  const conditions = await buildRecipientConditions(organizationId, channel3, filter, dbClient);
  const [result] = await dbClient.select({ count: sql`count(*)::int` }).from(contact).where(and(...conditions));
  return result?.count ?? 0;
}
function hashContactValue(value) {
  return createHash("sha256").update(value.toLowerCase().trim()).digest("hex");
}
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
function detectContactIdType(id) {
  if (id.includes("@"))
    return "email";
  if (UUID_RE.test(id))
    return "uuid";
  return "externalId";
}
async function listContacts(organizationId, filters, pagination, dbClient = db) {
  const { page, pageSize } = pagination;
  const offset = (page - 1) * pageSize;
  const conditions = [eq(contact.organizationId, organizationId)];
  if (filters.emailStatus)
    conditions.push(eq(contact.emailStatus, filters.emailStatus));
  if (filters.smsStatus)
    conditions.push(eq(contact.smsStatus, filters.smsStatus));
  if (filters.preferredChannel)
    conditions.push(eq(contact.preferredChannel, filters.preferredChannel));
  if (filters.search) {
    const search = `%${escapeIlike(filters.search)}%`;
    conditions.push(or(sql`${contact.email} ILIKE ${search}`, sql`${contact.phone} ILIKE ${search}`));
  }
  const [countResult] = await dbClient.select({ count: sql`count(*)::int` }).from(contact).where(and(...conditions));
  const total = countResult?.count ?? 0;
  return {
    contacts: await dbClient.select().from(contact).where(and(...conditions)).orderBy(desc(contact.createdAt)).limit(pageSize).offset(offset),
    total
  };
}
async function findContact(id, organizationId, dbClient = db) {
  const idType = detectContactIdType(id);
  const idCondition = idType === "email" ? eq(contact.email, id) : idType === "uuid" ? eq(contact.id, id) : eq(contact.externalId, id);
  const [result] = await dbClient.select().from(contact).where(and(idCondition, eq(contact.organizationId, organizationId))).limit(1);
  if (!result)
    return null;
  const topics = await dbClient.select({
    topicId: contactTopic.topicId,
    topicName: topic.name,
    status: contactTopic.status,
    subscribedAt: contactTopic.subscribedAt
  }).from(contactTopic).innerJoin(topic, eq(topic.id, contactTopic.topicId)).where(eq(contactTopic.contactId, result.id));
  return {
    ...result,
    topics
  };
}
async function resolveContactId(id, organizationId, dbClient = db) {
  const idType = detectContactIdType(id);
  const idCondition = idType === "email" ? eq(contact.email, id) : idType === "uuid" ? eq(contact.id, id) : eq(contact.externalId, id);
  const [result] = await dbClient.select({ id: contact.id }).from(contact).where(and(idCondition, eq(contact.organizationId, organizationId))).limit(1);
  return result?.id ?? null;
}
async function findContactByExternalId(externalId, organizationId, dbClient = db) {
  const [result] = await dbClient.select({ id: contact.id }).from(contact).where(and(eq(contact.organizationId, organizationId), eq(contact.externalId, externalId))).limit(1);
  return result ?? null;
}
async function findContactByEmailHash(emailHash, organizationId, dbClient = db) {
  const [result] = await dbClient.select({ id: contact.id }).from(contact).where(and(eq(contact.organizationId, organizationId), eq(contact.emailHash, emailHash))).limit(1);
  return result ?? null;
}
async function findContactByPhoneHash(phoneHash, organizationId, dbClient = db) {
  const [result] = await dbClient.select({ id: contact.id }).from(contact).where(and(eq(contact.organizationId, organizationId), eq(contact.phoneHash, phoneHash))).limit(1);
  return result ?? null;
}
async function insertContact(data, dbClient = db) {
  const [result] = await dbClient.insert(contact).values(data).onConflictDoNothing().returning();
  return result ?? null;
}
async function resolveTopicSlugs(slugs, organizationId, dbClient = db) {
  if (slugs.length === 0)
    return [];
  return (await dbClient.select({ id: topic.id }).from(topic).where(and(eq(topic.organizationId, organizationId), inArray(topic.slug, slugs)))).map((t) => t.id);
}
async function fetchTopicsForSubscription(topicIds, organizationId, dbClient = db) {
  if (topicIds.length === 0)
    return [];
  return dbClient.select({
    id: topic.id,
    name: topic.name,
    description: topic.description,
    doubleOptIn: topic.doubleOptIn
  }).from(topic).where(and(eq(topic.organizationId, organizationId), inArray(topic.id, topicIds)));
}
async function insertContactTopics(values, dbClient = db) {
  if (values.length === 0)
    return;
  await dbClient.insert(contactTopic).values(values);
}
async function fetchContactSubscriptions(contactId, dbClient = db) {
  return dbClient.select({
    topicId: contactTopic.topicId,
    status: contactTopic.status,
    confirmedAt: contactTopic.confirmedAt
  }).from(contactTopic).where(eq(contactTopic.contactId, contactId));
}
async function reactivateContactSubscriptions(contactId, topicIds, now, dbClient = db) {
  if (topicIds.length === 0)
    return;
  await dbClient.update(contactTopic).set({
    status: "subscribed",
    subscribedAt: now
  }).where(and(eq(contactTopic.contactId, contactId), inArray(contactTopic.topicId, topicIds)));
}
async function setPendingContactSubscriptions(contactId, topicIds, dbClient = db) {
  if (topicIds.length === 0)
    return;
  await dbClient.update(contactTopic).set({
    status: "pending",
    subscribedAt: null
  }).where(and(eq(contactTopic.contactId, contactId), inArray(contactTopic.topicId, topicIds)));
}
async function updateContactFields(contactId, organizationId, updateValues, dbClient = db) {
  const [updated] = await dbClient.update(contact).set(updateValues).where(and(eq(contact.id, contactId), eq(contact.organizationId, organizationId))).returning();
  return updated;
}
async function deleteContact(resolvedId, organizationId, dbClient = db) {
  await dbClient.delete(contact).where(and(eq(contact.id, resolvedId), eq(contact.organizationId, organizationId)));
}
async function bulkDeleteContacts(ids, organizationId, dbClient = db) {
  return (await dbClient.delete(contact).where(and(eq(contact.organizationId, organizationId), inArray(contact.id, ids))).returning({ id: contact.id })).length;
}
async function findContactById(contactId, organizationId, dbClient = db) {
  const [result] = await dbClient.select().from(contact).where(and(eq(contact.id, contactId), eq(contact.organizationId, organizationId))).limit(1);
  return result ?? null;
}
var EVENT_CONTACT_FIELDS = {
  id: contactEvent.id,
  eventName: contactEvent.eventName,
  eventData: contactEvent.eventData,
  createdAt: contactEvent.createdAt,
  contactId: contactEvent.contactId,
  contactEmail: contact.email,
  contactFirstName: contact.firstName,
  contactLastName: contact.lastName
};
async function findContactByEmailInOrg(email, organizationId, dbClient = db) {
  const [result] = await dbClient.select().from(contact).where(and(eq(contact.email, email), eq(contact.organizationId, organizationId))).limit(1);
  return result ?? null;
}
async function findContactByExternalIdInOrg(externalId, organizationId, dbClient = db) {
  const [result] = await dbClient.select().from(contact).where(and(eq(contact.externalId, externalId), eq(contact.organizationId, organizationId))).limit(1);
  return result ?? null;
}
async function insertContactEvent(values, dbClient = db) {
  await dbClient.insert(contactEvent).values(values);
}
async function insertContactEventsBatch(values, dbClient = db) {
  if (values.length === 0)
    return;
  await dbClient.insert(contactEvent).values(values);
}
async function findEventWorkflows(organizationId, eventName, dbClient = db) {
  return dbClient.select().from(workflow).where(and(eq(workflow.organizationId, organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "event"), sql`${workflow.triggerConfig}->>'eventName' = ${eventName}`));
}
async function findEventWorkflowsBatch(organizationId, eventNames, dbClient = db) {
  if (eventNames.length === 0)
    return [];
  return dbClient.select({
    id: workflow.id,
    triggerConfig: workflow.triggerConfig
  }).from(workflow).where(and(eq(workflow.organizationId, organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "event"), inArray(sql`${workflow.triggerConfig}->>'eventName'`, eventNames)));
}
async function findWaitingExecutions(organizationId, contactId, eventName, dbClient = db) {
  return dbClient.select().from(workflowExecution).where(and(eq(workflowExecution.organizationId, organizationId), eq(workflowExecution.contactId, contactId), eq(workflowExecution.status, "waiting"), eq(workflowExecution.waitingForEvent, eventName)));
}
async function findWaitingExecutionsBatch(organizationId, contactIds, eventNames, dbClient = db) {
  if (contactIds.length === 0 || eventNames.length === 0)
    return [];
  return dbClient.select().from(workflowExecution).where(and(eq(workflowExecution.organizationId, organizationId), inArray(workflowExecution.contactId, contactIds), eq(workflowExecution.status, "waiting"), inArray(workflowExecution.waitingForEvent, eventNames)));
}
async function touchContactLastActivity(contactId, organizationId, dbClient = db) {
  await dbClient.update(contact).set({ lastActivityAt: /* @__PURE__ */ new Date }).where(and(eq(contact.id, contactId), eq(contact.organizationId, organizationId)));
}
async function findContactsByIdsInOrg(organizationId, ids, dbClient = db) {
  if (ids.length === 0)
    return [];
  return dbClient.select().from(contact).where(and(inArray(contact.id, ids), eq(contact.organizationId, organizationId)));
}
async function findContactsByExternalIdsInOrg(organizationId, externalIds, dbClient = db) {
  if (externalIds.length === 0)
    return [];
  return dbClient.select().from(contact).where(and(inArray(contact.externalId, externalIds), eq(contact.organizationId, organizationId)));
}
async function findContactsByEmailsInOrg(organizationId, emails, dbClient = db) {
  if (emails.length === 0)
    return [];
  return dbClient.select().from(contact).where(and(inArray(contact.email, emails), eq(contact.organizationId, organizationId)));
}
function encodeCursor(createdAt, id) {
  return Buffer.from(`${createdAt.toISOString()}|${id}`).toString("base64url");
}
function decodeCursor(cursor) {
  const decoded = Buffer.from(cursor, "base64url").toString("utf8");
  const sep2 = decoded.indexOf("|");
  if (sep2 === -1)
    return null;
  const createdAt = new Date(decoded.slice(0, sep2));
  const id = decoded.slice(sep2 + 1);
  if (Number.isNaN(createdAt.getTime()) || !id)
    return null;
  return {
    createdAt,
    id
  };
}
var EMAIL_LOG_LIST_FIELDS = {
  id: messageSend.id,
  messageId: messageSend.messageId,
  status: messageSend.status,
  recipient: messageSend.recipient,
  subject: messageSend.subject,
  from: messageSend.from,
  sourceType: messageSend.sourceType,
  sentAt: messageSend.sentAt,
  deliveredAt: messageSend.deliveredAt,
  bouncedAt: messageSend.bouncedAt,
  bouncedSubType: messageSend.bounceSubType,
  createdAt: messageSend.createdAt
};
function buildConditions(organizationId, filters) {
  const conditions = [eq(messageSend.organizationId, organizationId)];
  if (filters.status)
    conditions.push(eq(messageSend.status, filters.status));
  return conditions;
}
async function listEmailLogs(organizationId, filters, dbClient = db) {
  const limit = Math.min(filters.limit ?? 20, 100);
  const conditions = buildConditions(organizationId, filters);
  const total = filters.cursor ? null : Number((await dbClient.select({ count: count() }).from(messageSend).where(and(...conditions)))[0]?.count ?? 0);
  const cursorConditions = [...conditions];
  const cursor = filters.cursor ? decodeCursor(filters.cursor) : null;
  if (cursor) {
    const keyset = or(lt(messageSend.createdAt, cursor.createdAt), and(eq(messageSend.createdAt, cursor.createdAt), lt(messageSend.id, cursor.id)));
    if (keyset)
      cursorConditions.push(keyset);
  }
  const rows = await dbClient.select(EMAIL_LOG_LIST_FIELDS).from(messageSend).where(and(...cursorConditions)).orderBy(desc(messageSend.createdAt), desc(messageSend.id)).limit(limit + 1);
  const hasNextPage = rows.length > limit;
  const logs = hasNextPage ? rows.slice(0, limit) : rows;
  const lastLog = logs.at(-1);
  return {
    logs,
    total,
    nextCursor: hasNextPage && lastLog ? encodeCursor(lastLog.createdAt, lastLog.id) : null
  };
}
async function getEmailLogByMessageId(messageId, organizationId, dbClient = db) {
  const [row] = await dbClient.select().from(messageSend).where(and(eq(messageSend.messageId, messageId), eq(messageSend.organizationId, organizationId))).limit(1);
  return row ?? null;
}
var MAX_FANOUT = 1000;
async function notifyOrg(params, dbClient = db) {
  const targets = (await dbClient.select({
    userId: member.userId,
    role: member.role
  }).from(member).where(eq(member.organizationId, params.organizationId)).limit(MAX_FANOUT)).filter((m) => {
    if (params.excludeUserIds?.includes(m.userId))
      return false;
    if (!params.roles?.length)
      return true;
    return m.role.split(",").some((role) => params.roles?.includes(role));
  });
  if (targets.length === 0)
    return [];
  return dbClient.insert(notification).values(targets.map((m) => ({
    userId: m.userId,
    organizationId: params.organizationId,
    type: params.type,
    title: params.title,
    body: params.body ?? null,
    href: params.href ?? null,
    data: params.data ?? null
  }))).returning();
}
async function hasRecentNotification(params, dbClient = db) {
  const conditions = [
    eq(notification.organizationId, params.organizationId),
    eq(notification.type, params.type),
    gte(notification.createdAt, params.since)
  ];
  if (params.dataEquals)
    conditions.push(sql`${notification.data}->>${params.dataEquals.key} = ${params.dataEquals.value}`);
  return (await dbClient.select({ id: notification.id }).from(notification).where(and(...conditions)).limit(1)).length > 0;
}
var pool = new Pool({
  connectionString: process.env.DATABASE_URL || "",
  idleTimeoutMillis: 30000,
  maxLifetimeSeconds: 300
});
pool.on("error", () => {});
var db = drizzle(pool, { schema: schema_exports });
function escapeIlike(value) {
  return value.replace(/%/g, "\\%").replace(/_/g, "\\_");
}

// ../../packages/db/dist/segment-evaluator-rkOqZMJw.js
async function contactMatchesCondition(database, contactId, organizationId, condition) {
  const conditionSQL = buildConditionSQL(condition);
  if (!conditionSQL)
    return true;
  const whereClause = and(eq(contact.id, contactId), eq(contact.organizationId, organizationId), conditionSQL);
  const [row] = await database.select({ id: contact.id }).from(contact).where(whereClause).limit(1);
  return !!row;
}
async function contactIdsMatchingCondition(database, contactIds, organizationId, condition) {
  if (contactIds.length === 0)
    return [];
  const conditionSQL = buildConditionSQL(condition);
  if (!conditionSQL)
    return contactIds;
  const whereClause = and(inArray(contact.id, contactIds), eq(contact.organizationId, organizationId), conditionSQL);
  return (await database.select({ id: contact.id }).from(contact).where(whereClause)).map((r) => r.id);
}
async function getSegmentsByIds(database, segmentIds, organizationId) {
  const result = /* @__PURE__ */ new Map;
  if (segmentIds.length === 0)
    return result;
  const segments = await database.select().from(segment).where(and(inArray(segment.id, segmentIds), eq(segment.organizationId, organizationId)));
  for (const seg of segments)
    result.set(seg.id, seg);
  return result;
}

// src/lib/logger.ts
var import_pino = __toESM(require_pino(), 1);
import { Writable } from "node:stream";
var isDev = true;
var axiomToken = process.env.AXIOM_TOKEN;
var axiomDataset = process.env.AXIOM_DATASET ?? "wraps";
var axiomBuffer = [];
var axiomStream = new Writable({
  write(chunk, _enc, cb) {
    axiomBuffer.push(chunk.toString().trimEnd());
    cb();
  }
});
async function flushAxiom() {
  if (axiomBuffer.length === 0 || !axiomToken) {
    return;
  }
  const lines = axiomBuffer;
  axiomBuffer = [];
  const events = [];
  for (const line2 of lines) {
    try {
      events.push(JSON.parse(line2));
    } catch {}
  }
  if (events.length === 0) {
    return;
  }
  await fetch(`https://api.axiom.co/v1/datasets/${axiomDataset}/ingest`, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${axiomToken}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify(events)
  }).catch(() => {});
}
var pinoLogger = import_pino.default({
  level: isDev ? "debug" : "info",
  base: { service: "wraps-api" },
  formatters: { level: (label) => ({ level: label }) },
  timestamp: import_pino.default.stdTimeFunctions.isoTime
}, axiomToken && !isDev ? import_pino.default.multistream([{ stream: process.stdout }, { stream: axiomStream }]) : undefined);
function serializeError(error2) {
  const obj = {
    name: error2.name,
    message: error2.message,
    stack: error2.stack
  };
  if (error2.cause instanceof Error) {
    obj.cause = serializeError(error2.cause);
  } else if (error2.cause !== undefined) {
    obj.cause = String(error2.cause);
  }
  return obj;
}
var log3 = {
  info(msg, data) {
    pinoLogger.info(data ?? {}, msg);
  },
  warn(msg, data) {
    pinoLogger.warn(data ?? {}, msg);
  },
  error(msg, error2, data) {
    const err = error2 instanceof Error ? serializeError(error2) : { error: String(error2) };
    pinoLogger.error({ err, ...data }, msg);
  }
};
async function flushLogger() {
  await new Promise((resolve3, reject) => pinoLogger.flush((err) => err ? reject(err) : resolve3()));
  await flushAxiom();
}

// src/services/workflow-queue.ts
var import_client_scheduler = __toESM(require_dist_cjs20(), 1);
var import_client_sqs = __toESM(require_dist_cjs22(), 1);

// src/lib/aws-defaults.ts
var import_node_http_handler = __toESM(require_dist_cjs9(), 1);
var awsDefaults = {
  requestHandler: new import_node_http_handler.NodeHttpHandler({
    requestTimeout: 1e4,
    connectionTimeout: 5000
  }),
  maxAttempts: 5
};

// src/services/workflow-queue.ts
var sqs = new import_client_sqs.SQSClient(awsDefaults);
var scheduler = new import_client_scheduler.SchedulerClient(awsDefaults);
function formatScheduleExpression(date2) {
  const iso = date2.toISOString();
  const withoutMs = iso.split(".")[0];
  return `at(${withoutMs})`;
}
function generateScheduleName(prefix, executionId, stepId) {
  const shortExecId = executionId.slice(0, 8);
  const shortStepId = stepId.slice(0, 8);
  return `${prefix}-${shortExecId}-${shortStepId}`;
}
var WORKFLOW_QUEUE_URL = process.env.WORKFLOW_QUEUE_URL;
var WORKFLOW_QUEUE_ARN = process.env.WORKFLOW_QUEUE_ARN;
var SCHEDULE_GROUP = process.env.SCHEDULER_GROUP_NAME || "wraps-workflows";
var SCHEDULER_ROLE_ARN = process.env.SCHEDULER_ROLE_ARN;
var IS_PRODUCTION = false;
async function enqueueWorkflowStep(job) {
  if (!WORKFLOW_QUEUE_URL) {
    if (IS_PRODUCTION) {
      throw new Error("WORKFLOW_QUEUE_URL not configured");
    }
    log3.warn("[workflow-queue] Skipping enqueue - queue not configured", {
      job
    });
    return;
  }
  await sqs.send(new import_client_sqs.SendMessageCommand({
    QueueUrl: WORKFLOW_QUEUE_URL,
    MessageBody: JSON.stringify(job)
  }));
}
async function enqueueWorkflowStepBatch(jobs) {
  if (jobs.length === 0) {
    return;
  }
  if (!WORKFLOW_QUEUE_URL) {
    if (IS_PRODUCTION) {
      throw new Error("WORKFLOW_QUEUE_URL not configured");
    }
    log3.warn("[workflow-queue] Skipping batch enqueue - queue not configured", {
      count: jobs.length
    });
    return;
  }
  let pending = jobs;
  const MAX_ATTEMPTS = 3;
  for (let attempt = 0;attempt < MAX_ATTEMPTS; attempt++) {
    if (attempt > 0) {
      await new Promise((resolve3) => setTimeout(resolve3, 100 * 2 ** (attempt - 1)));
    }
    const transientRetry = [];
    for (let i = 0;i < pending.length; i += 10) {
      const chunk = pending.slice(i, i + 10);
      const result = await sqs.send(new import_client_sqs.SendMessageBatchCommand({
        QueueUrl: WORKFLOW_QUEUE_URL,
        Entries: chunk.map((job, idx) => ({
          Id: String(idx),
          MessageBody: JSON.stringify(job)
        }))
      }));
      const failed = result.Failed ?? [];
      if (failed.length === 0)
        continue;
      const permanent = failed.filter((f) => f.SenderFault);
      if (permanent.length > 0) {
        throw new Error(`SQS batch permanently failed: ${permanent.length} message(s) with sender fault. Codes: ${permanent.map((f) => f.Code).join(", ")}`);
      }
      for (const f of failed) {
        const job = chunk[Number(f.Id)];
        if (job)
          transientRetry.push(job);
      }
    }
    if (transientRetry.length === 0)
      return;
    if (attempt === MAX_ATTEMPTS - 1) {
      throw new Error(`SQS batch failed after ${MAX_ATTEMPTS} attempts: ${transientRetry.length} transient error(s) unresolved`);
    }
    log3.warn("SQS batch partial failure (transient) — retrying failed entries", {
      attempt: attempt + 1,
      retryCount: transientRetry.length
    });
    pending = transientRetry;
  }
}
async function scheduleWorkflowStep(params) {
  const scheduleName = generateScheduleName("wraps-wf", params.executionId, params.stepId);
  if (!(SCHEDULER_ROLE_ARN && WORKFLOW_QUEUE_ARN)) {
    if (IS_PRODUCTION) {
      throw new Error("EventBridge Scheduler not configured for workflows");
    }
    log3.warn("[workflow-queue] Skipping schedule creation - config not set");
    return scheduleName;
  }
  const executeAt = new Date(Date.now() + params.delaySeconds * 1000);
  const scheduleExpression = formatScheduleExpression(executeAt);
  await scheduler.send(new import_client_scheduler.CreateScheduleCommand({
    Name: scheduleName,
    GroupName: SCHEDULE_GROUP,
    ScheduleExpression: scheduleExpression,
    ScheduleExpressionTimezone: "UTC",
    FlexibleTimeWindow: { Mode: "OFF" },
    ActionAfterCompletion: "DELETE",
    Target: {
      Arn: WORKFLOW_QUEUE_ARN,
      RoleArn: SCHEDULER_ROLE_ARN,
      Input: JSON.stringify({
        type: "execute",
        executionId: params.executionId,
        stepId: params.stepId,
        organizationId: params.organizationId
      })
    }
  }));
  return scheduleName;
}
async function scheduleWaitTimeout(params) {
  const scheduleName = generateScheduleName("wraps-wf-to", params.executionId, params.stepId);
  if (!(SCHEDULER_ROLE_ARN && WORKFLOW_QUEUE_ARN)) {
    if (IS_PRODUCTION) {
      throw new Error("EventBridge Scheduler not configured for workflows");
    }
    log3.warn("[workflow-queue] Skipping timeout schedule - config not set");
    return scheduleName;
  }
  const timeoutAt = new Date(Date.now() + params.timeoutSeconds * 1000);
  const scheduleExpression = formatScheduleExpression(timeoutAt);
  await scheduler.send(new import_client_scheduler.CreateScheduleCommand({
    Name: scheduleName,
    GroupName: SCHEDULE_GROUP,
    ScheduleExpression: scheduleExpression,
    ScheduleExpressionTimezone: "UTC",
    FlexibleTimeWindow: { Mode: "OFF" },
    ActionAfterCompletion: "DELETE",
    Target: {
      Arn: WORKFLOW_QUEUE_ARN,
      RoleArn: SCHEDULER_ROLE_ARN,
      Input: JSON.stringify({
        type: "resume",
        executionId: params.executionId,
        branch: "timeout",
        organizationId: params.organizationId
      })
    }
  }));
  return scheduleName;
}
async function deleteScheduledStep(scheduleName) {
  if (!SCHEDULER_ROLE_ARN) {
    if (!IS_PRODUCTION) {
      log3.warn("[workflow-queue] Skipping schedule deletion - config not set");
      return;
    }
    return;
  }
  try {
    await scheduler.send(new import_client_scheduler.DeleteScheduleCommand({
      Name: scheduleName,
      GroupName: SCHEDULE_GROUP
    }));
  } catch (error2) {
    if (error2 instanceof Error && error2.name === "ResourceNotFoundException") {
      return;
    }
    throw error2;
  }
}

// src/(ee)/services/workflow-scheduler.ts
var import_client_scheduler2 = __toESM(require_dist_cjs20(), 1);

// ../../node_modules/.pnpm/croner@9.1.0/node_modules/croner/dist/croner.js
function h(n, t, e, r, s, i, a, l) {
  return h.fromTZ(h.tp(n, t, e, r, s, i, a), l);
}
h.fromTZISO = (n, t, e) => h.fromTZ(k(n, t), e);
h.fromTZ = function(n, t) {
  let e = new Date(Date.UTC(n.y, n.m - 1, n.d, n.h, n.i, n.s)), r = D(n.tz, e), s = new Date(e.getTime() - r), i = D(n.tz, s);
  if (i - r === 0)
    return s;
  {
    let a = new Date(e.getTime() - i), l = D(n.tz, a);
    if (l - i === 0)
      return a;
    if (!t && l - i > 0)
      return a;
    if (t)
      throw new Error("Invalid date passed to fromTZ()");
    return s;
  }
};
h.toTZ = function(n, t) {
  let e = n.toLocaleString("en-US", { timeZone: t }).replace(/[\u202f]/, " "), r = new Date(e);
  return { y: r.getFullYear(), m: r.getMonth() + 1, d: r.getDate(), h: r.getHours(), i: r.getMinutes(), s: r.getSeconds(), tz: t };
};
h.tp = (n, t, e, r, s, i, a) => ({ y: n, m: t, d: e, h: r, i: s, s: i, tz: a });
function D(n, t = new Date) {
  let e = t.toLocaleString("en-US", { timeZone: n, timeZoneName: "shortOffset" }).split(" ").slice(-1)[0], r = t.toLocaleString("en-US").replace(/[\u202f]/, " ");
  return Date.parse(`${r} GMT`) - Date.parse(`${r} ${e}`);
}
function k(n, t) {
  let e = new Date(Date.parse(n));
  if (isNaN(e))
    throw new Error("minitz: Invalid ISO8601 passed to parser.");
  let r = n.substring(9);
  return n.includes("Z") || r.includes("-") || r.includes("+") ? h.tp(e.getUTCFullYear(), e.getUTCMonth() + 1, e.getUTCDate(), e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), "Etc/UTC") : h.tp(e.getFullYear(), e.getMonth() + 1, e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), t);
}
h.minitz = h;
var b = 32;
var p = 31 | b;
var v = [1, 2, 4, 8, 16];
var d = class {
  pattern;
  timezone;
  second;
  minute;
  hour;
  day;
  month;
  dayOfWeek;
  lastDayOfMonth;
  starDOM;
  starDOW;
  constructor(t, e) {
    this.pattern = t, this.timezone = e, this.second = Array(60).fill(0), this.minute = Array(60).fill(0), this.hour = Array(24).fill(0), this.day = Array(31).fill(0), this.month = Array(12).fill(0), this.dayOfWeek = Array(7).fill(0), this.lastDayOfMonth = false, this.starDOM = false, this.starDOW = false, this.parse();
  }
  parse() {
    if (!(typeof this.pattern == "string" || this.pattern instanceof String))
      throw new TypeError("CronPattern: Pattern has to be of type string.");
    this.pattern.indexOf("@") >= 0 && (this.pattern = this.handleNicknames(this.pattern).trim());
    let t = this.pattern.replace(/\s+/g, " ").split(" ");
    if (t.length < 5 || t.length > 6)
      throw new TypeError("CronPattern: invalid configuration format ('" + this.pattern + "'), exactly five or six space separated parts are required.");
    if (t.length === 5 && t.unshift("0"), t[3].indexOf("L") >= 0 && (t[3] = t[3].replace("L", ""), this.lastDayOfMonth = true), t[3] == "*" && (this.starDOM = true), t[4].length >= 3 && (t[4] = this.replaceAlphaMonths(t[4])), t[5].length >= 3 && (t[5] = this.replaceAlphaDays(t[5])), t[5] == "*" && (this.starDOW = true), this.pattern.indexOf("?") >= 0) {
      let e = new f(new Date, this.timezone).getDate(true);
      t[0] = t[0].replace("?", e.getSeconds().toString()), t[1] = t[1].replace("?", e.getMinutes().toString()), t[2] = t[2].replace("?", e.getHours().toString()), this.starDOM || (t[3] = t[3].replace("?", e.getDate().toString())), t[4] = t[4].replace("?", (e.getMonth() + 1).toString()), this.starDOW || (t[5] = t[5].replace("?", e.getDay().toString()));
    }
    this.throwAtIllegalCharacters(t), this.partToArray("second", t[0], 0, 1), this.partToArray("minute", t[1], 0, 1), this.partToArray("hour", t[2], 0, 1), this.partToArray("day", t[3], -1, 1), this.partToArray("month", t[4], -1, 1), this.partToArray("dayOfWeek", t[5], 0, p), this.dayOfWeek[7] && (this.dayOfWeek[0] = this.dayOfWeek[7]);
  }
  partToArray(t, e, r, s) {
    let i = this[t], a = t === "day" && this.lastDayOfMonth;
    if (e === "" && !a)
      throw new TypeError("CronPattern: configuration entry " + t + " (" + e + ") is empty, check for trailing spaces.");
    if (e === "*")
      return i.fill(s);
    let l = e.split(",");
    if (l.length > 1)
      for (let o = 0;o < l.length; o++)
        this.partToArray(t, l[o], r, s);
    else
      e.indexOf("-") !== -1 && e.indexOf("/") !== -1 ? this.handleRangeWithStepping(e, t, r, s) : e.indexOf("-") !== -1 ? this.handleRange(e, t, r, s) : e.indexOf("/") !== -1 ? this.handleStepping(e, t, r, s) : e !== "" && this.handleNumber(e, t, r, s);
  }
  throwAtIllegalCharacters(t) {
    for (let e = 0;e < t.length; e++)
      if ((e === 5 ? /[^/*0-9,\-#L]+/ : /[^/*0-9,-]+/).test(t[e]))
        throw new TypeError("CronPattern: configuration entry " + e + " (" + t[e] + ") contains illegal characters.");
  }
  handleNumber(t, e, r, s) {
    let i = this.extractNth(t, e), a = parseInt(i[0], 10) + r;
    if (isNaN(a))
      throw new TypeError("CronPattern: " + e + " is not a number: '" + t + "'");
    this.setPart(e, a, i[1] || s);
  }
  setPart(t, e, r) {
    if (!Object.prototype.hasOwnProperty.call(this, t))
      throw new TypeError("CronPattern: Invalid part specified: " + t);
    if (t === "dayOfWeek") {
      if (e === 7 && (e = 0), e < 0 || e > 6)
        throw new RangeError("CronPattern: Invalid value for dayOfWeek: " + e);
      this.setNthWeekdayOfMonth(e, r);
      return;
    }
    if (t === "second" || t === "minute") {
      if (e < 0 || e >= 60)
        throw new RangeError("CronPattern: Invalid value for " + t + ": " + e);
    } else if (t === "hour") {
      if (e < 0 || e >= 24)
        throw new RangeError("CronPattern: Invalid value for " + t + ": " + e);
    } else if (t === "day") {
      if (e < 0 || e >= 31)
        throw new RangeError("CronPattern: Invalid value for " + t + ": " + e);
    } else if (t === "month" && (e < 0 || e >= 12))
      throw new RangeError("CronPattern: Invalid value for " + t + ": " + e);
    this[t][e] = r;
  }
  handleRangeWithStepping(t, e, r, s) {
    let i = this.extractNth(t, e), a = i[0].match(/^(\d+)-(\d+)\/(\d+)$/);
    if (a === null)
      throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '" + t + "'");
    let [, l, o, u] = a, c = parseInt(l, 10) + r, w = parseInt(o, 10) + r, C = parseInt(u, 10);
    if (isNaN(c))
      throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");
    if (isNaN(w))
      throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");
    if (isNaN(C))
      throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");
    if (C === 0)
      throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");
    if (C > this[e].length)
      throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part (" + this[e].length + ")");
    if (c > w)
      throw new TypeError("CronPattern: From value is larger than to value: '" + t + "'");
    for (let T = c;T <= w; T += C)
      this.setPart(e, T, i[1] || s);
  }
  extractNth(t, e) {
    let r = t, s;
    if (r.includes("#")) {
      if (e !== "dayOfWeek")
        throw new Error("CronPattern: nth (#) only allowed in day-of-week field");
      s = r.split("#")[1], r = r.split("#")[0];
    }
    return [r, s];
  }
  handleRange(t, e, r, s) {
    let i = this.extractNth(t, e), a = i[0].split("-");
    if (a.length !== 2)
      throw new TypeError("CronPattern: Syntax error, illegal range: '" + t + "'");
    let l = parseInt(a[0], 10) + r, o = parseInt(a[1], 10) + r;
    if (isNaN(l))
      throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");
    if (isNaN(o))
      throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");
    if (l > o)
      throw new TypeError("CronPattern: From value is larger than to value: '" + t + "'");
    for (let u = l;u <= o; u++)
      this.setPart(e, u, i[1] || s);
  }
  handleStepping(t, e, r, s) {
    let i = this.extractNth(t, e), a = i[0].split("/");
    if (a.length !== 2)
      throw new TypeError("CronPattern: Syntax error, illegal stepping: '" + t + "'");
    a[0] === "" && (a[0] = "*");
    let l = 0;
    a[0] !== "*" && (l = parseInt(a[0], 10) + r);
    let o = parseInt(a[1], 10);
    if (isNaN(o))
      throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");
    if (o === 0)
      throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");
    if (o > this[e].length)
      throw new TypeError("CronPattern: Syntax error, max steps for part is (" + this[e].length + ")");
    for (let u = l;u < this[e].length; u += o)
      this.setPart(e, u, i[1] || s);
  }
  replaceAlphaDays(t) {
    return t.replace(/-sun/gi, "-7").replace(/sun/gi, "0").replace(/mon/gi, "1").replace(/tue/gi, "2").replace(/wed/gi, "3").replace(/thu/gi, "4").replace(/fri/gi, "5").replace(/sat/gi, "6");
  }
  replaceAlphaMonths(t) {
    return t.replace(/jan/gi, "1").replace(/feb/gi, "2").replace(/mar/gi, "3").replace(/apr/gi, "4").replace(/may/gi, "5").replace(/jun/gi, "6").replace(/jul/gi, "7").replace(/aug/gi, "8").replace(/sep/gi, "9").replace(/oct/gi, "10").replace(/nov/gi, "11").replace(/dec/gi, "12");
  }
  handleNicknames(t) {
    let e = t.trim().toLowerCase();
    return e === "@yearly" || e === "@annually" ? "0 0 1 1 *" : e === "@monthly" ? "0 0 1 * *" : e === "@weekly" ? "0 0 * * 0" : e === "@daily" ? "0 0 * * *" : e === "@hourly" ? "0 * * * *" : t;
  }
  setNthWeekdayOfMonth(t, e) {
    if (typeof e != "number" && e === "L")
      this.dayOfWeek[t] = this.dayOfWeek[t] | b;
    else if (e === p)
      this.dayOfWeek[t] = p;
    else if (e < 6 && e > 0)
      this.dayOfWeek[t] = this.dayOfWeek[t] | v[e - 1];
    else
      throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`);
  }
};
var O = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var m = [["month", "year", 0], ["day", "month", -1], ["hour", "day", 0], ["minute", "hour", 0], ["second", "minute", 0]];
var f = class n {
  tz;
  ms;
  second;
  minute;
  hour;
  day;
  month;
  year;
  constructor(t, e) {
    if (this.tz = e, t && t instanceof Date)
      if (!isNaN(t))
        this.fromDate(t);
      else
        throw new TypeError("CronDate: Invalid date passed to CronDate constructor");
    else if (t === undefined)
      this.fromDate(new Date);
    else if (t && typeof t == "string")
      this.fromString(t);
    else if (t instanceof n)
      this.fromCronDate(t);
    else
      throw new TypeError("CronDate: Invalid type (" + typeof t + ") passed to CronDate constructor");
  }
  isNthWeekdayOfMonth(t, e, r, s) {
    let a = new Date(Date.UTC(t, e, r)).getUTCDay(), l = 0;
    for (let o = 1;o <= r; o++)
      new Date(Date.UTC(t, e, o)).getUTCDay() === a && l++;
    if (s & p && v[l - 1] & s)
      return true;
    if (s & b) {
      let o = new Date(Date.UTC(t, e + 1, 0)).getUTCDate();
      for (let u = r + 1;u <= o; u++)
        if (new Date(Date.UTC(t, e, u)).getUTCDay() === a)
          return false;
      return true;
    }
    return false;
  }
  fromDate(t) {
    if (this.tz !== undefined)
      if (typeof this.tz == "number")
        this.ms = t.getUTCMilliseconds(), this.second = t.getUTCSeconds(), this.minute = t.getUTCMinutes() + this.tz, this.hour = t.getUTCHours(), this.day = t.getUTCDate(), this.month = t.getUTCMonth(), this.year = t.getUTCFullYear(), this.apply();
      else {
        let e = h.toTZ(t, this.tz);
        this.ms = t.getMilliseconds(), this.second = e.s, this.minute = e.i, this.hour = e.h, this.day = e.d, this.month = e.m - 1, this.year = e.y;
      }
    else
      this.ms = t.getMilliseconds(), this.second = t.getSeconds(), this.minute = t.getMinutes(), this.hour = t.getHours(), this.day = t.getDate(), this.month = t.getMonth(), this.year = t.getFullYear();
  }
  fromCronDate(t) {
    this.tz = t.tz, this.year = t.year, this.month = t.month, this.day = t.day, this.hour = t.hour, this.minute = t.minute, this.second = t.second, this.ms = t.ms;
  }
  apply() {
    if (this.month > 11 || this.day > O[this.month] || this.hour > 59 || this.minute > 59 || this.second > 59 || this.hour < 0 || this.minute < 0 || this.second < 0) {
      let t = new Date(Date.UTC(this.year, this.month, this.day, this.hour, this.minute, this.second, this.ms));
      return this.ms = t.getUTCMilliseconds(), this.second = t.getUTCSeconds(), this.minute = t.getUTCMinutes(), this.hour = t.getUTCHours(), this.day = t.getUTCDate(), this.month = t.getUTCMonth(), this.year = t.getUTCFullYear(), true;
    } else
      return false;
  }
  fromString(t) {
    if (typeof this.tz == "number") {
      let e = h.fromTZISO(t);
      this.ms = e.getUTCMilliseconds(), this.second = e.getUTCSeconds(), this.minute = e.getUTCMinutes(), this.hour = e.getUTCHours(), this.day = e.getUTCDate(), this.month = e.getUTCMonth(), this.year = e.getUTCFullYear(), this.apply();
    } else
      return this.fromDate(h.fromTZISO(t, this.tz));
  }
  findNext(t, e, r, s) {
    let i = this[e], a;
    r.lastDayOfMonth && (this.month !== 1 ? a = O[this.month] : a = new Date(Date.UTC(this.year, this.month + 1, 0, 0, 0, 0, 0)).getUTCDate());
    let l = !r.starDOW && e == "day" ? new Date(Date.UTC(this.year, this.month, 1, 0, 0, 0, 0)).getUTCDay() : undefined;
    for (let o = this[e] + s;o < r[e].length; o++) {
      let u = r[e][o];
      if (e === "day" && r.lastDayOfMonth && o - s == a && (u = 1), e === "day" && !r.starDOW) {
        let c = r.dayOfWeek[(l + (o - s - 1)) % 7];
        if (c && c & p)
          c = this.isNthWeekdayOfMonth(this.year, this.month, o - s, c) ? 1 : 0;
        else if (c)
          throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${c}`);
        t.legacyMode && !r.starDOM ? u = u || c : u = u && c;
      }
      if (u)
        return this[e] = o - s, i !== this[e] ? 2 : 1;
    }
    return 3;
  }
  recurse(t, e, r) {
    let s = this.findNext(e, m[r][0], t, m[r][2]);
    if (s > 1) {
      let i = r + 1;
      for (;i < m.length; )
        this[m[i][0]] = -m[i][2], i++;
      if (s === 3)
        return this[m[r][1]]++, this[m[r][0]] = -m[r][2], this.apply(), this.recurse(t, e, 0);
      if (this.apply())
        return this.recurse(t, e, r - 1);
    }
    return r += 1, r >= m.length ? this : this.year >= 3000 ? null : this.recurse(t, e, r);
  }
  increment(t, e, r) {
    return this.second += e.interval !== undefined && e.interval > 1 && r ? e.interval : 1, this.ms = 0, this.apply(), this.recurse(t, e, 0);
  }
  getDate(t) {
    return t || this.tz === undefined ? new Date(this.year, this.month, this.day, this.hour, this.minute, this.second, this.ms) : typeof this.tz == "number" ? new Date(Date.UTC(this.year, this.month, this.day, this.hour, this.minute - this.tz, this.second, this.ms)) : h.fromTZ(h.tp(this.year, this.month + 1, this.day, this.hour, this.minute, this.second, this.tz), false);
  }
  getTime() {
    return this.getDate(false).getTime();
  }
};
function N(n2) {
  if (n2 === undefined && (n2 = {}), delete n2.name, n2.legacyMode = n2.legacyMode === undefined ? true : n2.legacyMode, n2.paused = n2.paused === undefined ? false : n2.paused, n2.maxRuns = n2.maxRuns === undefined ? 1 / 0 : n2.maxRuns, n2.catch = n2.catch === undefined ? false : n2.catch, n2.interval = n2.interval === undefined ? 0 : parseInt(n2.interval.toString(), 10), n2.utcOffset = n2.utcOffset === undefined ? undefined : parseInt(n2.utcOffset.toString(), 10), n2.unref = n2.unref === undefined ? false : n2.unref, n2.startAt && (n2.startAt = new f(n2.startAt, n2.timezone)), n2.stopAt && (n2.stopAt = new f(n2.stopAt, n2.timezone)), n2.interval !== null) {
    if (isNaN(n2.interval))
      throw new Error("CronOptions: Supplied value for interval is not a number");
    if (n2.interval < 0)
      throw new Error("CronOptions: Supplied value for interval can not be negative");
  }
  if (n2.utcOffset !== undefined) {
    if (isNaN(n2.utcOffset))
      throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");
    if (n2.utcOffset < -870 || n2.utcOffset > 870)
      throw new Error("CronOptions: utcOffset out of bounds.");
    if (n2.utcOffset !== undefined && n2.timezone)
      throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.");
  }
  if (n2.unref !== true && n2.unref !== false)
    throw new Error("CronOptions: Unref should be either true, false or undefined(false).");
  return n2;
}
function g(n2) {
  return Object.prototype.toString.call(n2) === "[object Function]" || typeof n2 == "function" || n2 instanceof Function;
}
function S(n2) {
  return g(n2);
}
function P(n2) {
  typeof Deno < "u" && typeof Deno.unrefTimer < "u" ? Deno.unrefTimer(n2) : n2 && typeof n2.unref < "u" && n2.unref();
}
var _ = 30 * 1000;
var y = [];
var R = class {
  name;
  options;
  _states;
  fn;
  constructor(t, e, r) {
    let s, i;
    if (g(e))
      i = e;
    else if (typeof e == "object")
      s = e;
    else if (e !== undefined)
      throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");
    if (g(r))
      i = r;
    else if (typeof r == "object")
      s = r;
    else if (r !== undefined)
      throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");
    if (this.name = s?.name, this.options = N(s), this._states = { kill: false, blocking: false, previousRun: undefined, currentRun: undefined, once: undefined, currentTimeout: undefined, maxRuns: s ? s.maxRuns : undefined, paused: s ? s.paused : false, pattern: new d("* * * * *") }, t && (t instanceof Date || typeof t == "string" && t.indexOf(":") > 0) ? this._states.once = new f(t, this.options.timezone || this.options.utcOffset) : this._states.pattern = new d(t, this.options.timezone), this.name) {
      if (y.find((l) => l.name === this.name))
        throw new Error("Cron: Tried to initialize new named job '" + this.name + "', but name already taken.");
      y.push(this);
    }
    return i !== undefined && S(i) && (this.fn = i, this.schedule()), this;
  }
  nextRun(t) {
    let e = this._next(t);
    return e ? e.getDate(false) : null;
  }
  nextRuns(t, e) {
    this._states.maxRuns !== undefined && t > this._states.maxRuns && (t = this._states.maxRuns);
    let r = [], s = e || this._states.currentRun || undefined;
    for (;t-- && (s = this.nextRun(s)); )
      r.push(s);
    return r;
  }
  getPattern() {
    return this._states.pattern ? this._states.pattern.pattern : undefined;
  }
  isRunning() {
    let t = this.nextRun(this._states.currentRun), e = !this._states.paused, r = this.fn !== undefined, s = !this._states.kill;
    return e && r && s && t !== null;
  }
  isStopped() {
    return this._states.kill;
  }
  isBusy() {
    return this._states.blocking;
  }
  currentRun() {
    return this._states.currentRun ? this._states.currentRun.getDate() : null;
  }
  previousRun() {
    return this._states.previousRun ? this._states.previousRun.getDate() : null;
  }
  msToNext(t) {
    let e = this._next(t);
    return e ? t instanceof f || t instanceof Date ? e.getTime() - t.getTime() : e.getTime() - new f(t).getTime() : null;
  }
  stop() {
    this._states.kill = true, this._states.currentTimeout && clearTimeout(this._states.currentTimeout);
    let t = y.indexOf(this);
    t >= 0 && y.splice(t, 1);
  }
  pause() {
    return this._states.paused = true, !this._states.kill;
  }
  resume() {
    return this._states.paused = false, !this._states.kill;
  }
  schedule(t) {
    if (t && this.fn)
      throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");
    t && (this.fn = t);
    let e = this.msToNext(), r = this.nextRun(this._states.currentRun);
    return e == null || isNaN(e) || r === null ? this : (e > _ && (e = _), this._states.currentTimeout = setTimeout(() => this._checkTrigger(r), e), this._states.currentTimeout && this.options.unref && P(this._states.currentTimeout), this);
  }
  async _trigger(t) {
    if (this._states.blocking = true, this._states.currentRun = new f(undefined, this.options.timezone || this.options.utcOffset), this.options.catch)
      try {
        this.fn !== undefined && await this.fn(this, this.options.context);
      } catch (e) {
        g(this.options.catch) && this.options.catch(e, this);
      }
    else
      this.fn !== undefined && await this.fn(this, this.options.context);
    this._states.previousRun = new f(t, this.options.timezone || this.options.utcOffset), this._states.blocking = false;
  }
  async trigger() {
    await this._trigger();
  }
  runsLeft() {
    return this._states.maxRuns;
  }
  _checkTrigger(t) {
    let e = new Date, r = !this._states.paused && e.getTime() >= t.getTime(), s = this._states.blocking && this.options.protect;
    r && !s ? (this._states.maxRuns !== undefined && this._states.maxRuns--, this._trigger()) : r && s && g(this.options.protect) && setTimeout(() => this.options.protect(this), 0), this.schedule();
  }
  _next(t) {
    let e = !!(t || this._states.currentRun), r = false;
    !t && this.options.startAt && this.options.interval && ([t, e] = this._calculatePreviousRun(t, e), r = !t), t = new f(t, this.options.timezone || this.options.utcOffset), this.options.startAt && t && t.getTime() < this.options.startAt.getTime() && (t = this.options.startAt);
    let s = this._states.once || new f(t, this.options.timezone || this.options.utcOffset);
    return !r && s !== this._states.once && (s = s.increment(this._states.pattern, this.options, e)), this._states.once && this._states.once.getTime() <= t.getTime() || s === null || this._states.maxRuns !== undefined && this._states.maxRuns <= 0 || this._states.kill || this.options.stopAt && s.getTime() >= this.options.stopAt.getTime() ? null : s;
  }
  _calculatePreviousRun(t, e) {
    let r = new f(undefined, this.options.timezone || this.options.utcOffset), s = t;
    if (this.options.startAt.getTime() <= r.getTime()) {
      s = this.options.startAt;
      let i = s.getTime() + this.options.interval * 1000;
      for (;i <= r.getTime(); )
        s = new f(s, this.options.timezone || this.options.utcOffset).increment(this._states.pattern, this.options, true), i = s.getTime() + this.options.interval * 1000;
      e = true;
    }
    return s === null && (s = undefined), [s, e];
  }
};

// src/(ee)/services/workflow-scheduler.ts
var scheduler2 = new import_client_scheduler2.SchedulerClient(awsDefaults);
var WORKFLOW_QUEUE_ARN2 = process.env.WORKFLOW_QUEUE_ARN;
var SCHEDULE_GROUP2 = process.env.SCHEDULER_GROUP_NAME || "wraps-workflows";
var SCHEDULER_ROLE_ARN2 = process.env.SCHEDULER_ROLE_ARN;
var IS_PRODUCTION2 = false;
function getScheduleName(workflowId) {
  return `wraps-wf-sched-${workflowId.slice(0, 8)}`;
}
async function createNextWorkflowSchedule(params) {
  const { workflowId, organizationId, cronExpression, timezone } = params;
  const cron2 = new R(cronExpression, {
    timezone: timezone || "UTC"
  });
  const nextRun = cron2.nextRun();
  if (!nextRun) {
    log3.warn("Scheduler: no future run time, chain ends", {
      workflowId,
      cronExpression
    });
    return null;
  }
  const scheduleName = getScheduleName(workflowId);
  if (!(SCHEDULER_ROLE_ARN2 && WORKFLOW_QUEUE_ARN2)) {
    if (IS_PRODUCTION2) {
      throw new Error("EventBridge Scheduler not configured for workflow schedules");
    }
    log3.warn("Scheduler: skipping schedule creation, config not set", {
      workflowId,
      nextRun: nextRun.toISOString()
    });
    return scheduleName;
  }
  const scheduleExpression = formatScheduleExpression(nextRun);
  log3.info("Scheduler: creating schedule", {
    scheduleName,
    workflowId,
    nextRun: nextRun.toISOString()
  });
  await scheduler2.send(new import_client_scheduler2.CreateScheduleCommand({
    Name: scheduleName,
    GroupName: SCHEDULE_GROUP2,
    ScheduleExpression: scheduleExpression,
    ScheduleExpressionTimezone: "UTC",
    FlexibleTimeWindow: { Mode: "OFF" },
    ActionAfterCompletion: "DELETE",
    Target: {
      Arn: WORKFLOW_QUEUE_ARN2,
      RoleArn: SCHEDULER_ROLE_ARN2,
      Input: JSON.stringify({
        type: "schedule-trigger",
        workflowId,
        organizationId
      })
    }
  }));
  return scheduleName;
}
async function deleteWorkflowSchedule(workflowId) {
  const scheduleName = getScheduleName(workflowId);
  if (!SCHEDULER_ROLE_ARN2) {
    if (!IS_PRODUCTION2) {
      log3.warn("Scheduler: skipping schedule deletion, config not set");
      return;
    }
    return;
  }
  try {
    await scheduler2.send(new import_client_scheduler2.DeleteScheduleCommand({
      Name: scheduleName,
      GroupName: SCHEDULE_GROUP2
    }));
    log3.info("Scheduler: deleted schedule", { scheduleName, workflowId });
  } catch (error2) {
    if (error2 instanceof Error && error2.name === "ResourceNotFoundException") {
      return;
    }
    throw error2;
  }
}
async function updateWorkflowSchedule(params) {
  const { workflowId, organizationId, cronExpression, timezone } = params;
  const cron2 = new R(cronExpression, { timezone: timezone || "UTC" });
  const nextRun = cron2.nextRun();
  if (!nextRun) {
    log3.warn("Scheduler: no future run time, schedule not updated", {
      workflowId,
      cronExpression
    });
    return null;
  }
  const scheduleName = getScheduleName(workflowId);
  if (!(SCHEDULER_ROLE_ARN2 && WORKFLOW_QUEUE_ARN2)) {
    if (IS_PRODUCTION2) {
      throw new Error("EventBridge Scheduler not configured for workflow schedules");
    }
    log3.warn("Scheduler: skipping schedule update, config not set", {
      workflowId,
      nextRun: nextRun.toISOString()
    });
    return scheduleName;
  }
  const scheduleExpression = formatScheduleExpression(nextRun);
  log3.info("Scheduler: updating schedule", {
    scheduleName,
    workflowId,
    nextRun: nextRun.toISOString()
  });
  try {
    await scheduler2.send(new import_client_scheduler2.UpdateScheduleCommand({
      Name: scheduleName,
      GroupName: SCHEDULE_GROUP2,
      ScheduleExpression: scheduleExpression,
      ScheduleExpressionTimezone: "UTC",
      FlexibleTimeWindow: { Mode: "OFF" },
      ActionAfterCompletion: "DELETE",
      Target: {
        Arn: WORKFLOW_QUEUE_ARN2,
        RoleArn: SCHEDULER_ROLE_ARN2,
        Input: JSON.stringify({
          type: "schedule-trigger",
          workflowId,
          organizationId
        })
      }
    }));
  } catch (error2) {
    if (error2 instanceof Error && error2.name === "ResourceNotFoundException") {
      log3.warn("Scheduler: schedule not found for update, recreating", {
        scheduleName,
        workflowId
      });
      return createNextWorkflowSchedule({
        workflowId,
        organizationId,
        cronExpression,
        timezone
      });
    }
    throw error2;
  }
  return scheduleName;
}

// src/(ee)/workers/workflow-step-handlers.ts
var import_client_pinpoint_sms_voice_v2 = __toESM(require_dist_cjs23(), 1);
var import_client_sesv24 = __toESM(require_dist_cjs24(), 1);

// ../../packages/email/src/lib/client.ts
var import_oidc_aws_credentials_provider = __toESM(require_dist3(), 1);

// ../../node_modules/.pnpm/@wraps.dev+email@0.5.1_@react-email+components@1.0.12_react-dom@19.2.7_react@19.2.7__react@19.2.7__react@19.2.7/node_modules/@wraps.dev/email/dist/index.mjs
var import_client_ses = __toESM(require_dist_cjs25(), 1);
var import_credential_providers = __toESM(require_dist_cjs61(), 1);

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
var exports_external = {};
__export(exports_external, {
  xor: () => xor,
  xid: () => xid2,
  void: () => _void2,
  uuidv7: () => uuidv7,
  uuidv6: () => uuidv6,
  uuidv4: () => uuidv4,
  uuid: () => uuid3,
  util: () => exports_util,
  url: () => url,
  uppercase: () => _uppercase,
  unknown: () => unknown,
  union: () => union2,
  undefined: () => _undefined3,
  ulid: () => ulid2,
  uint64: () => uint64,
  uint32: () => uint32,
  tuple: () => tuple,
  trim: () => _trim,
  treeifyError: () => treeifyError,
  transform: () => transform,
  toUpperCase: () => _toUpperCase,
  toLowerCase: () => _toLowerCase,
  toJSONSchema: () => toJSONSchema,
  templateLiteral: () => templateLiteral,
  symbol: () => symbol,
  superRefine: () => superRefine,
  success: () => success,
  stringbool: () => stringbool,
  stringFormat: () => stringFormat,
  string: () => string2,
  strictObject: () => strictObject,
  startsWith: () => _startsWith,
  slugify: () => _slugify,
  size: () => _size,
  setErrorMap: () => setErrorMap,
  set: () => set,
  safeParseAsync: () => safeParseAsync2,
  safeParse: () => safeParse2,
  safeEncodeAsync: () => safeEncodeAsync2,
  safeEncode: () => safeEncode2,
  safeDecodeAsync: () => safeDecodeAsync2,
  safeDecode: () => safeDecode2,
  registry: () => registry,
  regexes: () => exports_regexes,
  regex: () => _regex,
  refine: () => refine,
  record: () => record,
  readonly: () => readonly,
  property: () => _property,
  promise: () => promise,
  prettifyError: () => prettifyError,
  preprocess: () => preprocess,
  prefault: () => prefault,
  positive: () => _positive,
  pipe: () => pipe,
  partialRecord: () => partialRecord,
  parseAsync: () => parseAsync2,
  parse: () => parse3,
  overwrite: () => _overwrite,
  optional: () => optional,
  object: () => object,
  number: () => number2,
  nullish: () => nullish2,
  nullable: () => nullable,
  null: () => _null3,
  normalize: () => _normalize,
  nonpositive: () => _nonpositive,
  nonoptional: () => nonoptional,
  nonnegative: () => _nonnegative,
  never: () => never,
  negative: () => _negative,
  nativeEnum: () => nativeEnum,
  nanoid: () => nanoid2,
  nan: () => nan,
  multipleOf: () => _multipleOf,
  minSize: () => _minSize,
  minLength: () => _minLength,
  mime: () => _mime,
  meta: () => meta2,
  maxSize: () => _maxSize,
  maxLength: () => _maxLength,
  map: () => map,
  mac: () => mac2,
  lte: () => _lte,
  lt: () => _lt,
  lowercase: () => _lowercase,
  looseRecord: () => looseRecord,
  looseObject: () => looseObject,
  locales: () => exports_locales,
  literal: () => literal,
  length: () => _length,
  lazy: () => lazy,
  ksuid: () => ksuid2,
  keyof: () => keyof,
  jwt: () => jwt,
  json: () => json2,
  iso: () => exports_iso,
  ipv6: () => ipv62,
  ipv4: () => ipv42,
  intersection: () => intersection,
  int64: () => int64,
  int32: () => int32,
  int: () => int,
  instanceof: () => _instanceof,
  includes: () => _includes,
  httpUrl: () => httpUrl,
  hostname: () => hostname3,
  hex: () => hex2,
  hash: () => hash,
  guid: () => guid2,
  gte: () => _gte,
  gt: () => _gt,
  globalRegistry: () => globalRegistry,
  getErrorMap: () => getErrorMap,
  function: () => _function,
  fromJSONSchema: () => fromJSONSchema,
  formatError: () => formatError,
  float64: () => float64,
  float32: () => float32,
  flattenError: () => flattenError,
  file: () => file,
  exactOptional: () => exactOptional,
  enum: () => _enum2,
  endsWith: () => _endsWith,
  encodeAsync: () => encodeAsync2,
  encode: () => encode2,
  emoji: () => emoji2,
  email: () => email2,
  e164: () => e1642,
  discriminatedUnion: () => discriminatedUnion,
  describe: () => describe2,
  decodeAsync: () => decodeAsync2,
  decode: () => decode2,
  date: () => date4,
  custom: () => custom,
  cuid2: () => cuid22,
  cuid: () => cuid3,
  core: () => exports_core2,
  config: () => config,
  coerce: () => exports_coerce,
  codec: () => codec,
  clone: () => clone,
  cidrv6: () => cidrv62,
  cidrv4: () => cidrv42,
  check: () => check,
  catch: () => _catch2,
  boolean: () => boolean3,
  bigint: () => bigint3,
  base64url: () => base64url2,
  base64: () => base642,
  array: () => array,
  any: () => any,
  _function: () => _function,
  _default: () => _default2,
  _ZodString: () => _ZodString,
  ZodXor: () => ZodXor,
  ZodXID: () => ZodXID,
  ZodVoid: () => ZodVoid,
  ZodUnknown: () => ZodUnknown,
  ZodUnion: () => ZodUnion,
  ZodUndefined: () => ZodUndefined,
  ZodUUID: () => ZodUUID,
  ZodURL: () => ZodURL,
  ZodULID: () => ZodULID,
  ZodType: () => ZodType,
  ZodTuple: () => ZodTuple,
  ZodTransform: () => ZodTransform,
  ZodTemplateLiteral: () => ZodTemplateLiteral,
  ZodSymbol: () => ZodSymbol,
  ZodSuccess: () => ZodSuccess,
  ZodStringFormat: () => ZodStringFormat,
  ZodString: () => ZodString,
  ZodSet: () => ZodSet,
  ZodRecord: () => ZodRecord,
  ZodRealError: () => ZodRealError,
  ZodReadonly: () => ZodReadonly,
  ZodPromise: () => ZodPromise,
  ZodPrefault: () => ZodPrefault,
  ZodPipe: () => ZodPipe,
  ZodOptional: () => ZodOptional,
  ZodObject: () => ZodObject,
  ZodNumberFormat: () => ZodNumberFormat,
  ZodNumber: () => ZodNumber,
  ZodNullable: () => ZodNullable,
  ZodNull: () => ZodNull,
  ZodNonOptional: () => ZodNonOptional,
  ZodNever: () => ZodNever,
  ZodNanoID: () => ZodNanoID,
  ZodNaN: () => ZodNaN,
  ZodMap: () => ZodMap,
  ZodMAC: () => ZodMAC,
  ZodLiteral: () => ZodLiteral,
  ZodLazy: () => ZodLazy,
  ZodKSUID: () => ZodKSUID,
  ZodJWT: () => ZodJWT,
  ZodIssueCode: () => ZodIssueCode,
  ZodIntersection: () => ZodIntersection,
  ZodISOTime: () => ZodISOTime,
  ZodISODuration: () => ZodISODuration,
  ZodISODateTime: () => ZodISODateTime,
  ZodISODate: () => ZodISODate,
  ZodIPv6: () => ZodIPv6,
  ZodIPv4: () => ZodIPv4,
  ZodGUID: () => ZodGUID,
  ZodFunction: () => ZodFunction,
  ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
  ZodFile: () => ZodFile,
  ZodExactOptional: () => ZodExactOptional,
  ZodError: () => ZodError,
  ZodEnum: () => ZodEnum,
  ZodEmoji: () => ZodEmoji,
  ZodEmail: () => ZodEmail,
  ZodE164: () => ZodE164,
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
  ZodDefault: () => ZodDefault,
  ZodDate: () => ZodDate,
  ZodCustomStringFormat: () => ZodCustomStringFormat,
  ZodCustom: () => ZodCustom,
  ZodCodec: () => ZodCodec,
  ZodCatch: () => ZodCatch,
  ZodCUID2: () => ZodCUID2,
  ZodCUID: () => ZodCUID,
  ZodCIDRv6: () => ZodCIDRv6,
  ZodCIDRv4: () => ZodCIDRv4,
  ZodBoolean: () => ZodBoolean,
  ZodBigIntFormat: () => ZodBigIntFormat,
  ZodBigInt: () => ZodBigInt,
  ZodBase64URL: () => ZodBase64URL,
  ZodBase64: () => ZodBase64,
  ZodArray: () => ZodArray,
  ZodAny: () => ZodAny,
  TimePrecision: () => TimePrecision,
  NEVER: () => NEVER,
  $output: () => $output,
  $input: () => $input,
  $brand: () => $brand
});

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
var exports_core2 = {};
__export(exports_core2, {
  version: () => version3,
  util: () => exports_util,
  treeifyError: () => treeifyError,
  toJSONSchema: () => toJSONSchema,
  toDotPath: () => toDotPath,
  safeParseAsync: () => safeParseAsync,
  safeParse: () => safeParse,
  safeEncodeAsync: () => safeEncodeAsync,
  safeEncode: () => safeEncode,
  safeDecodeAsync: () => safeDecodeAsync,
  safeDecode: () => safeDecode,
  registry: () => registry,
  regexes: () => exports_regexes,
  process: () => process2,
  prettifyError: () => prettifyError,
  parseAsync: () => parseAsync,
  parse: () => parse,
  meta: () => meta,
  locales: () => exports_locales,
  isValidJWT: () => isValidJWT,
  isValidBase64URL: () => isValidBase64URL,
  isValidBase64: () => isValidBase64,
  initializeContext: () => initializeContext,
  globalRegistry: () => globalRegistry,
  globalConfig: () => globalConfig,
  formatError: () => formatError,
  flattenError: () => flattenError,
  finalize: () => finalize,
  extractDefs: () => extractDefs,
  encodeAsync: () => encodeAsync,
  encode: () => encode,
  describe: () => describe,
  decodeAsync: () => decodeAsync,
  decode: () => decode,
  createToJSONSchemaMethod: () => createToJSONSchemaMethod,
  createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
  config: () => config,
  clone: () => clone,
  _xor: () => _xor,
  _xid: () => _xid,
  _void: () => _void,
  _uuidv7: () => _uuidv7,
  _uuidv6: () => _uuidv6,
  _uuidv4: () => _uuidv4,
  _uuid: () => _uuid,
  _url: () => _url,
  _uppercase: () => _uppercase,
  _unknown: () => _unknown,
  _union: () => _union,
  _undefined: () => _undefined2,
  _ulid: () => _ulid,
  _uint64: () => _uint64,
  _uint32: () => _uint32,
  _tuple: () => _tuple,
  _trim: () => _trim,
  _transform: () => _transform,
  _toUpperCase: () => _toUpperCase,
  _toLowerCase: () => _toLowerCase,
  _templateLiteral: () => _templateLiteral,
  _symbol: () => _symbol,
  _superRefine: () => _superRefine,
  _success: () => _success,
  _stringbool: () => _stringbool,
  _stringFormat: () => _stringFormat,
  _string: () => _string,
  _startsWith: () => _startsWith,
  _slugify: () => _slugify,
  _size: () => _size,
  _set: () => _set,
  _safeParseAsync: () => _safeParseAsync,
  _safeParse: () => _safeParse,
  _safeEncodeAsync: () => _safeEncodeAsync,
  _safeEncode: () => _safeEncode,
  _safeDecodeAsync: () => _safeDecodeAsync,
  _safeDecode: () => _safeDecode,
  _regex: () => _regex,
  _refine: () => _refine,
  _record: () => _record,
  _readonly: () => _readonly,
  _property: () => _property,
  _promise: () => _promise,
  _positive: () => _positive,
  _pipe: () => _pipe,
  _parseAsync: () => _parseAsync,
  _parse: () => _parse,
  _overwrite: () => _overwrite,
  _optional: () => _optional,
  _number: () => _number,
  _nullable: () => _nullable,
  _null: () => _null2,
  _normalize: () => _normalize,
  _nonpositive: () => _nonpositive,
  _nonoptional: () => _nonoptional,
  _nonnegative: () => _nonnegative,
  _never: () => _never,
  _negative: () => _negative,
  _nativeEnum: () => _nativeEnum,
  _nanoid: () => _nanoid,
  _nan: () => _nan,
  _multipleOf: () => _multipleOf,
  _minSize: () => _minSize,
  _minLength: () => _minLength,
  _min: () => _gte,
  _mime: () => _mime,
  _maxSize: () => _maxSize,
  _maxLength: () => _maxLength,
  _max: () => _lte,
  _map: () => _map,
  _mac: () => _mac,
  _lte: () => _lte,
  _lt: () => _lt,
  _lowercase: () => _lowercase,
  _literal: () => _literal,
  _length: () => _length,
  _lazy: () => _lazy,
  _ksuid: () => _ksuid,
  _jwt: () => _jwt,
  _isoTime: () => _isoTime,
  _isoDuration: () => _isoDuration,
  _isoDateTime: () => _isoDateTime,
  _isoDate: () => _isoDate,
  _ipv6: () => _ipv6,
  _ipv4: () => _ipv4,
  _intersection: () => _intersection,
  _int64: () => _int64,
  _int32: () => _int32,
  _int: () => _int,
  _includes: () => _includes,
  _guid: () => _guid,
  _gte: () => _gte,
  _gt: () => _gt,
  _float64: () => _float64,
  _float32: () => _float32,
  _file: () => _file,
  _enum: () => _enum,
  _endsWith: () => _endsWith,
  _encodeAsync: () => _encodeAsync,
  _encode: () => _encode,
  _emoji: () => _emoji2,
  _email: () => _email,
  _e164: () => _e164,
  _discriminatedUnion: () => _discriminatedUnion,
  _default: () => _default,
  _decodeAsync: () => _decodeAsync,
  _decode: () => _decode,
  _date: () => _date,
  _custom: () => _custom,
  _cuid2: () => _cuid2,
  _cuid: () => _cuid,
  _coercedString: () => _coercedString,
  _coercedNumber: () => _coercedNumber,
  _coercedDate: () => _coercedDate,
  _coercedBoolean: () => _coercedBoolean,
  _coercedBigint: () => _coercedBigint,
  _cidrv6: () => _cidrv6,
  _cidrv4: () => _cidrv4,
  _check: () => _check,
  _catch: () => _catch,
  _boolean: () => _boolean,
  _bigint: () => _bigint,
  _base64url: () => _base64url,
  _base64: () => _base64,
  _array: () => _array,
  _any: () => _any,
  TimePrecision: () => TimePrecision,
  NEVER: () => NEVER,
  JSONSchemaGenerator: () => JSONSchemaGenerator,
  JSONSchema: () => exports_json_schema,
  Doc: () => Doc,
  $output: () => $output,
  $input: () => $input,
  $constructor: () => $constructor,
  $brand: () => $brand,
  $ZodXor: () => $ZodXor,
  $ZodXID: () => $ZodXID,
  $ZodVoid: () => $ZodVoid,
  $ZodUnknown: () => $ZodUnknown,
  $ZodUnion: () => $ZodUnion,
  $ZodUndefined: () => $ZodUndefined,
  $ZodUUID: () => $ZodUUID,
  $ZodURL: () => $ZodURL,
  $ZodULID: () => $ZodULID,
  $ZodType: () => $ZodType,
  $ZodTuple: () => $ZodTuple,
  $ZodTransform: () => $ZodTransform,
  $ZodTemplateLiteral: () => $ZodTemplateLiteral,
  $ZodSymbol: () => $ZodSymbol,
  $ZodSuccess: () => $ZodSuccess,
  $ZodStringFormat: () => $ZodStringFormat,
  $ZodString: () => $ZodString,
  $ZodSet: () => $ZodSet,
  $ZodRegistry: () => $ZodRegistry,
  $ZodRecord: () => $ZodRecord,
  $ZodRealError: () => $ZodRealError,
  $ZodReadonly: () => $ZodReadonly,
  $ZodPromise: () => $ZodPromise,
  $ZodPrefault: () => $ZodPrefault,
  $ZodPipe: () => $ZodPipe,
  $ZodOptional: () => $ZodOptional,
  $ZodObjectJIT: () => $ZodObjectJIT,
  $ZodObject: () => $ZodObject,
  $ZodNumberFormat: () => $ZodNumberFormat,
  $ZodNumber: () => $ZodNumber,
  $ZodNullable: () => $ZodNullable,
  $ZodNull: () => $ZodNull,
  $ZodNonOptional: () => $ZodNonOptional,
  $ZodNever: () => $ZodNever,
  $ZodNanoID: () => $ZodNanoID,
  $ZodNaN: () => $ZodNaN,
  $ZodMap: () => $ZodMap,
  $ZodMAC: () => $ZodMAC,
  $ZodLiteral: () => $ZodLiteral,
  $ZodLazy: () => $ZodLazy,
  $ZodKSUID: () => $ZodKSUID,
  $ZodJWT: () => $ZodJWT,
  $ZodIntersection: () => $ZodIntersection,
  $ZodISOTime: () => $ZodISOTime,
  $ZodISODuration: () => $ZodISODuration,
  $ZodISODateTime: () => $ZodISODateTime,
  $ZodISODate: () => $ZodISODate,
  $ZodIPv6: () => $ZodIPv6,
  $ZodIPv4: () => $ZodIPv4,
  $ZodGUID: () => $ZodGUID,
  $ZodFunction: () => $ZodFunction,
  $ZodFile: () => $ZodFile,
  $ZodExactOptional: () => $ZodExactOptional,
  $ZodError: () => $ZodError,
  $ZodEnum: () => $ZodEnum,
  $ZodEncodeError: () => $ZodEncodeError,
  $ZodEmoji: () => $ZodEmoji,
  $ZodEmail: () => $ZodEmail,
  $ZodE164: () => $ZodE164,
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
  $ZodDefault: () => $ZodDefault,
  $ZodDate: () => $ZodDate,
  $ZodCustomStringFormat: () => $ZodCustomStringFormat,
  $ZodCustom: () => $ZodCustom,
  $ZodCodec: () => $ZodCodec,
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
  $ZodCheckStartsWith: () => $ZodCheckStartsWith,
  $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
  $ZodCheckRegex: () => $ZodCheckRegex,
  $ZodCheckProperty: () => $ZodCheckProperty,
  $ZodCheckOverwrite: () => $ZodCheckOverwrite,
  $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
  $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
  $ZodCheckMinSize: () => $ZodCheckMinSize,
  $ZodCheckMinLength: () => $ZodCheckMinLength,
  $ZodCheckMimeType: () => $ZodCheckMimeType,
  $ZodCheckMaxSize: () => $ZodCheckMaxSize,
  $ZodCheckMaxLength: () => $ZodCheckMaxLength,
  $ZodCheckLowerCase: () => $ZodCheckLowerCase,
  $ZodCheckLessThan: () => $ZodCheckLessThan,
  $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
  $ZodCheckIncludes: () => $ZodCheckIncludes,
  $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
  $ZodCheckEndsWith: () => $ZodCheckEndsWith,
  $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
  $ZodCheck: () => $ZodCheck,
  $ZodCatch: () => $ZodCatch,
  $ZodCUID2: () => $ZodCUID2,
  $ZodCUID: () => $ZodCUID,
  $ZodCIDRv6: () => $ZodCIDRv6,
  $ZodCIDRv4: () => $ZodCIDRv4,
  $ZodBoolean: () => $ZodBoolean,
  $ZodBigIntFormat: () => $ZodBigIntFormat,
  $ZodBigInt: () => $ZodBigInt,
  $ZodBase64URL: () => $ZodBase64URL,
  $ZodBase64: () => $ZodBase64,
  $ZodAsyncError: () => $ZodAsyncError,
  $ZodArray: () => $ZodArray,
  $ZodAny: () => $ZodAny
});

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
var NEVER = Object.freeze({
  status: "aborted"
});
function $constructor(name, initializer, params) {
  function init4(inst, def) {
    if (!inst._zod) {
      Object.defineProperty(inst, "_zod", {
        value: {
          def,
          constr: _2,
          traits: new Set
        },
        enumerable: false
      });
    }
    if (inst._zod.traits.has(name)) {
      return;
    }
    inst._zod.traits.add(name);
    initializer(inst, def);
    const proto = _2.prototype;
    const keys = Object.keys(proto);
    for (let i = 0;i < keys.length; i++) {
      const k2 = keys[i];
      if (!(k2 in inst)) {
        inst[k2] = proto[k2].bind(inst);
      }
    }
  }
  const Parent = params?.Parent ?? Object;

  class Definition extends Parent {
  }
  Object.defineProperty(Definition, "name", { value: name });
  function _2(def) {
    var _a;
    const inst = params?.Parent ? new Definition : this;
    init4(inst, def);
    (_a = inst._zod).deferred ?? (_a.deferred = []);
    for (const fn of inst._zod.deferred) {
      fn();
    }
    return inst;
  }
  Object.defineProperty(_2, "init", { value: init4 });
  Object.defineProperty(_2, Symbol.hasInstance, {
    value: (inst) => {
      if (params?.Parent && inst instanceof params.Parent)
        return true;
      return inst?._zod?.traits?.has(name);
    }
  });
  Object.defineProperty(_2, "name", { value: name });
  return _2;
}
var $brand = Symbol("zod_brand");

class $ZodAsyncError extends Error {
  constructor() {
    super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
  }
}

class $ZodEncodeError extends Error {
  constructor(name) {
    super(`Encountered unidirectional transform during encode: ${name}`);
    this.name = "ZodEncodeError";
  }
}
var globalConfig = {};
function config(newConfig) {
  if (newConfig)
    Object.assign(globalConfig, newConfig);
  return globalConfig;
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
var exports_util = {};
__export(exports_util, {
  unwrapMessage: () => unwrapMessage,
  uint8ArrayToHex: () => uint8ArrayToHex,
  uint8ArrayToBase64url: () => uint8ArrayToBase64url,
  uint8ArrayToBase64: () => uint8ArrayToBase64,
  stringifyPrimitive: () => stringifyPrimitive,
  slugify: () => slugify,
  shallowClone: () => shallowClone,
  safeExtend: () => safeExtend,
  required: () => required,
  randomString: () => randomString,
  propertyKeyTypes: () => propertyKeyTypes,
  promiseAllObject: () => promiseAllObject,
  primitiveTypes: () => primitiveTypes,
  prefixIssues: () => prefixIssues,
  pick: () => pick,
  partial: () => partial,
  parsedType: () => parsedType,
  optionalKeys: () => optionalKeys,
  omit: () => omit2,
  objectClone: () => objectClone,
  numKeys: () => numKeys,
  nullish: () => nullish,
  normalizeParams: () => normalizeParams,
  mergeDefs: () => mergeDefs,
  merge: () => merge2,
  jsonStringifyReplacer: () => jsonStringifyReplacer,
  joinValues: () => joinValues,
  issue: () => issue,
  isPlainObject: () => isPlainObject2,
  isObject: () => isObject,
  hexToUint8Array: () => hexToUint8Array,
  getSizableOrigin: () => getSizableOrigin,
  getParsedType: () => getParsedType,
  getLengthableOrigin: () => getLengthableOrigin,
  getEnumValues: () => getEnumValues,
  getElementAtPath: () => getElementAtPath,
  floatSafeRemainder: () => floatSafeRemainder,
  finalizeIssue: () => finalizeIssue,
  extend: () => extend,
  escapeRegex: () => escapeRegex,
  esc: () => esc,
  defineLazy: () => defineLazy,
  createTransparentProxy: () => createTransparentProxy,
  cloneDef: () => cloneDef,
  clone: () => clone,
  cleanRegex: () => cleanRegex,
  cleanEnum: () => cleanEnum,
  captureStackTrace: () => captureStackTrace,
  cached: () => cached,
  base64urlToUint8Array: () => base64urlToUint8Array,
  base64ToUint8Array: () => base64ToUint8Array,
  assignProp: () => assignProp,
  assertNotEqual: () => assertNotEqual,
  assertNever: () => assertNever,
  assertIs: () => assertIs,
  assertEqual: () => assertEqual,
  assert: () => assert,
  allowsEval: () => allowsEval,
  aborted: () => aborted,
  NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
  Class: () => Class,
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES
});
function assertEqual(val) {
  return val;
}
function assertNotEqual(val) {
  return val;
}
function assertIs(_arg) {}
function assertNever(_x) {
  throw new Error("Unexpected value in exhaustive check");
}
function assert(_2) {}
function getEnumValues(entries) {
  const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
  const values = Object.entries(entries).filter(([k2, _2]) => numericValues.indexOf(+k2) === -1).map(([_2, v2]) => v2);
  return values;
}
function joinValues(array, separator = "|") {
  return array.map((val) => stringifyPrimitive(val)).join(separator);
}
function jsonStringifyReplacer(_2, value) {
  if (typeof value === "bigint")
    return value.toString();
  return value;
}
function cached(getter) {
  const set = false;
  return {
    get value() {
      if (!set) {
        const value = getter();
        Object.defineProperty(this, "value", { value });
        return value;
      }
      throw new Error("cached value already set");
    }
  };
}
function nullish(input) {
  return input === null || input === undefined;
}
function cleanRegex(source) {
  const start = source.startsWith("^") ? 1 : 0;
  const end = source.endsWith("$") ? source.length - 1 : source.length;
  return source.slice(start, end);
}
function floatSafeRemainder(val, step) {
  const valDecCount = (val.toString().split(".")[1] || "").length;
  const stepString = step.toString();
  let stepDecCount = (stepString.split(".")[1] || "").length;
  if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
    const match = stepString.match(/\d?e-(\d?)/);
    if (match?.[1]) {
      stepDecCount = Number.parseInt(match[1]);
    }
  }
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
  const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
  const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
  return valInt % stepInt / 10 ** decCount;
}
var EVALUATING = Symbol("evaluating");
function defineLazy(object, key, getter) {
  let value = undefined;
  Object.defineProperty(object, key, {
    get() {
      if (value === EVALUATING) {
        return;
      }
      if (value === undefined) {
        value = EVALUATING;
        value = getter();
      }
      return value;
    },
    set(v2) {
      Object.defineProperty(object, key, {
        value: v2
      });
    },
    configurable: true
  });
}
function objectClone(obj) {
  return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
}
function assignProp(target, prop, value) {
  Object.defineProperty(target, prop, {
    value,
    writable: true,
    enumerable: true,
    configurable: true
  });
}
function mergeDefs(...defs) {
  const mergedDescriptors = {};
  for (const def of defs) {
    const descriptors = Object.getOwnPropertyDescriptors(def);
    Object.assign(mergedDescriptors, descriptors);
  }
  return Object.defineProperties({}, mergedDescriptors);
}
function cloneDef(schema) {
  return mergeDefs(schema._zod.def);
}
function getElementAtPath(obj, path2) {
  if (!path2)
    return obj;
  return path2.reduce((acc, key) => acc?.[key], obj);
}
function promiseAllObject(promisesObj) {
  const keys = Object.keys(promisesObj);
  const promises = keys.map((key) => promisesObj[key]);
  return Promise.all(promises).then((results) => {
    const resolvedObj = {};
    for (let i = 0;i < keys.length; i++) {
      resolvedObj[keys[i]] = results[i];
    }
    return resolvedObj;
  });
}
function randomString(length = 10) {
  const chars = "abcdefghijklmnopqrstuvwxyz";
  let str = "";
  for (let i = 0;i < length; i++) {
    str += chars[Math.floor(Math.random() * chars.length)];
  }
  return str;
}
function esc(str) {
  return JSON.stringify(str);
}
function slugify(input) {
  return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
}
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
function isObject(data) {
  return typeof data === "object" && data !== null && !Array.isArray(data);
}
var allowsEval = cached(() => {
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
    return false;
  }
  try {
    const F = Function;
    new F("");
    return true;
  } catch (_2) {
    return false;
  }
});
function isPlainObject2(o) {
  if (isObject(o) === false)
    return false;
  const ctor = o.constructor;
  if (ctor === undefined)
    return true;
  if (typeof ctor !== "function")
    return true;
  const prot = ctor.prototype;
  if (isObject(prot) === false)
    return false;
  if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
    return false;
  }
  return true;
}
function shallowClone(o) {
  if (isPlainObject2(o))
    return { ...o };
  if (Array.isArray(o))
    return [...o];
  return o;
}
function numKeys(data) {
  let keyCount = 0;
  for (const key in data) {
    if (Object.prototype.hasOwnProperty.call(data, key)) {
      keyCount++;
    }
  }
  return keyCount;
}
var getParsedType = (data) => {
  const t = typeof data;
  switch (t) {
    case "undefined":
      return "undefined";
    case "string":
      return "string";
    case "number":
      return Number.isNaN(data) ? "nan" : "number";
    case "boolean":
      return "boolean";
    case "function":
      return "function";
    case "bigint":
      return "bigint";
    case "symbol":
      return "symbol";
    case "object":
      if (Array.isArray(data)) {
        return "array";
      }
      if (data === null) {
        return "null";
      }
      if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
        return "promise";
      }
      if (typeof Map !== "undefined" && data instanceof Map) {
        return "map";
      }
      if (typeof Set !== "undefined" && data instanceof Set) {
        return "set";
      }
      if (typeof Date !== "undefined" && data instanceof Date) {
        return "date";
      }
      if (typeof File !== "undefined" && data instanceof File) {
        return "file";
      }
      return "object";
    default:
      throw new Error(`Unknown data type: ${t}`);
  }
};
var propertyKeyTypes = new Set(["string", "number", "symbol"]);
var primitiveTypes = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
function escapeRegex(str) {
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function clone(inst, def, params) {
  const cl = new inst._zod.constr(def ?? inst._zod.def);
  if (!def || params?.parent)
    cl._zod.parent = inst;
  return cl;
}
function normalizeParams(_params) {
  const params = _params;
  if (!params)
    return {};
  if (typeof params === "string")
    return { error: () => params };
  if (params?.message !== undefined) {
    if (params?.error !== undefined)
      throw new Error("Cannot specify both `message` and `error` params");
    params.error = params.message;
  }
  delete params.message;
  if (typeof params.error === "string")
    return { ...params, error: () => params.error };
  return params;
}
function createTransparentProxy(getter) {
  let target;
  return new Proxy({}, {
    get(_2, prop, receiver) {
      target ?? (target = getter());
      return Reflect.get(target, prop, receiver);
    },
    set(_2, prop, value, receiver) {
      target ?? (target = getter());
      return Reflect.set(target, prop, value, receiver);
    },
    has(_2, prop) {
      target ?? (target = getter());
      return Reflect.has(target, prop);
    },
    deleteProperty(_2, prop) {
      target ?? (target = getter());
      return Reflect.deleteProperty(target, prop);
    },
    ownKeys(_2) {
      target ?? (target = getter());
      return Reflect.ownKeys(target);
    },
    getOwnPropertyDescriptor(_2, prop) {
      target ?? (target = getter());
      return Reflect.getOwnPropertyDescriptor(target, prop);
    },
    defineProperty(_2, prop, descriptor) {
      target ?? (target = getter());
      return Reflect.defineProperty(target, prop, descriptor);
    }
  });
}
function stringifyPrimitive(value) {
  if (typeof value === "bigint")
    return value.toString() + "n";
  if (typeof value === "string")
    return `"${value}"`;
  return `${value}`;
}
function optionalKeys(shape) {
  return Object.keys(shape).filter((k2) => {
    return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional";
  });
}
var NUMBER_FORMAT_RANGES = {
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
  int32: [-2147483648, 2147483647],
  uint32: [0, 4294967295],
  float32: [-340282346638528860000000000000000000000, 340282346638528860000000000000000000000],
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
};
var BIGINT_FORMAT_RANGES = {
  int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
  uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
};
function pick(schema, mask) {
  const currDef = schema._zod.def;
  const checks = currDef.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    throw new Error(".pick() cannot be used on object schemas containing refinements");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const newShape = {};
      for (const key in mask) {
        if (!(key in currDef.shape)) {
          throw new Error(`Unrecognized key: "${key}"`);
        }
        if (!mask[key])
          continue;
        newShape[key] = currDef.shape[key];
      }
      assignProp(this, "shape", newShape);
      return newShape;
    },
    checks: []
  });
  return clone(schema, def);
}
function omit2(schema, mask) {
  const currDef = schema._zod.def;
  const checks = currDef.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    throw new Error(".omit() cannot be used on object schemas containing refinements");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const newShape = { ...schema._zod.def.shape };
      for (const key in mask) {
        if (!(key in currDef.shape)) {
          throw new Error(`Unrecognized key: "${key}"`);
        }
        if (!mask[key])
          continue;
        delete newShape[key];
      }
      assignProp(this, "shape", newShape);
      return newShape;
    },
    checks: []
  });
  return clone(schema, def);
}
function extend(schema, shape) {
  if (!isPlainObject2(shape)) {
    throw new Error("Invalid input to extend: expected a plain object");
  }
  const checks = schema._zod.def.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    const existingShape = schema._zod.def.shape;
    for (const key in shape) {
      if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {
        throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
      }
    }
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const _shape = { ...schema._zod.def.shape, ...shape };
      assignProp(this, "shape", _shape);
      return _shape;
    }
  });
  return clone(schema, def);
}
function safeExtend(schema, shape) {
  if (!isPlainObject2(shape)) {
    throw new Error("Invalid input to safeExtend: expected a plain object");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const _shape = { ...schema._zod.def.shape, ...shape };
      assignProp(this, "shape", _shape);
      return _shape;
    }
  });
  return clone(schema, def);
}
function merge2(a, b2) {
  const def = mergeDefs(a._zod.def, {
    get shape() {
      const _shape = { ...a._zod.def.shape, ...b2._zod.def.shape };
      assignProp(this, "shape", _shape);
      return _shape;
    },
    get catchall() {
      return b2._zod.def.catchall;
    },
    checks: []
  });
  return clone(a, def);
}
function partial(Class, schema, mask) {
  const currDef = schema._zod.def;
  const checks = currDef.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    throw new Error(".partial() cannot be used on object schemas containing refinements");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const oldShape = schema._zod.def.shape;
      const shape = { ...oldShape };
      if (mask) {
        for (const key in mask) {
          if (!(key in oldShape)) {
            throw new Error(`Unrecognized key: "${key}"`);
          }
          if (!mask[key])
            continue;
          shape[key] = Class ? new Class({
            type: "optional",
            innerType: oldShape[key]
          }) : oldShape[key];
        }
      } else {
        for (const key in oldShape) {
          shape[key] = Class ? new Class({
            type: "optional",
            innerType: oldShape[key]
          }) : oldShape[key];
        }
      }
      assignProp(this, "shape", shape);
      return shape;
    },
    checks: []
  });
  return clone(schema, def);
}
function required(Class, schema, mask) {
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const oldShape = schema._zod.def.shape;
      const shape = { ...oldShape };
      if (mask) {
        for (const key in mask) {
          if (!(key in shape)) {
            throw new Error(`Unrecognized key: "${key}"`);
          }
          if (!mask[key])
            continue;
          shape[key] = new Class({
            type: "nonoptional",
            innerType: oldShape[key]
          });
        }
      } else {
        for (const key in oldShape) {
          shape[key] = new Class({
            type: "nonoptional",
            innerType: oldShape[key]
          });
        }
      }
      assignProp(this, "shape", shape);
      return shape;
    }
  });
  return clone(schema, def);
}
function aborted(x, startIndex = 0) {
  if (x.aborted === true)
    return true;
  for (let i = startIndex;i < x.issues.length; i++) {
    if (x.issues[i]?.continue !== true) {
      return true;
    }
  }
  return false;
}
function prefixIssues(path2, issues) {
  return issues.map((iss) => {
    var _a;
    (_a = iss).path ?? (_a.path = []);
    iss.path.unshift(path2);
    return iss;
  });
}
function unwrapMessage(message) {
  return typeof message === "string" ? message : message?.message;
}
function finalizeIssue(iss, ctx, config2) {
  const full = { ...iss, path: iss.path ?? [] };
  if (!iss.message) {
    const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
    full.message = message;
  }
  delete full.inst;
  delete full.continue;
  if (!ctx?.reportInput) {
    delete full.input;
  }
  return full;
}
function getSizableOrigin(input) {
  if (input instanceof Set)
    return "set";
  if (input instanceof Map)
    return "map";
  if (input instanceof File)
    return "file";
  return "unknown";
}
function getLengthableOrigin(input) {
  if (Array.isArray(input))
    return "array";
  if (typeof input === "string")
    return "string";
  return "unknown";
}
function parsedType(data) {
  const t = typeof data;
  switch (t) {
    case "number": {
      return Number.isNaN(data) ? "nan" : "number";
    }
    case "object": {
      if (data === null) {
        return "null";
      }
      if (Array.isArray(data)) {
        return "array";
      }
      const obj = data;
      if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) {
        return obj.constructor.name;
      }
    }
  }
  return t;
}
function issue(...args) {
  const [iss, input, inst] = args;
  if (typeof iss === "string") {
    return {
      message: iss,
      code: "custom",
      input,
      inst
    };
  }
  return { ...iss };
}
function cleanEnum(obj) {
  return Object.entries(obj).filter(([k2, _2]) => {
    return Number.isNaN(Number.parseInt(k2, 10));
  }).map((el) => el[1]);
}
function base64ToUint8Array(base64) {
  const binaryString = atob(base64);
  const bytes = new Uint8Array(binaryString.length);
  for (let i = 0;i < binaryString.length; i++) {
    bytes[i] = binaryString.charCodeAt(i);
  }
  return bytes;
}
function uint8ArrayToBase64(bytes) {
  let binaryString = "";
  for (let i = 0;i < bytes.length; i++) {
    binaryString += String.fromCharCode(bytes[i]);
  }
  return btoa(binaryString);
}
function base64urlToUint8Array(base64url) {
  const base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
  const padding = "=".repeat((4 - base64.length % 4) % 4);
  return base64ToUint8Array(base64 + padding);
}
function uint8ArrayToBase64url(bytes) {
  return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
}
function hexToUint8Array(hex) {
  const cleanHex = hex.replace(/^0x/, "");
  if (cleanHex.length % 2 !== 0) {
    throw new Error("Invalid hex string length");
  }
  const bytes = new Uint8Array(cleanHex.length / 2);
  for (let i = 0;i < cleanHex.length; i += 2) {
    bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);
  }
  return bytes;
}
function uint8ArrayToHex(bytes) {
  return Array.from(bytes).map((b2) => b2.toString(16).padStart(2, "0")).join("");
}

class Class {
  constructor(..._args) {}
}

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
var initializer = (inst, def) => {
  inst.name = "$ZodError";
  Object.defineProperty(inst, "_zod", {
    value: inst._zod,
    enumerable: false
  });
  Object.defineProperty(inst, "issues", {
    value: def,
    enumerable: false
  });
  inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
  Object.defineProperty(inst, "toString", {
    value: () => inst.message,
    enumerable: false
  });
};
var $ZodError = $constructor("$ZodError", initializer);
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
function flattenError(error2, mapper = (issue2) => issue2.message) {
  const fieldErrors = {};
  const formErrors = [];
  for (const sub of error2.issues) {
    if (sub.path.length > 0) {
      fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
      fieldErrors[sub.path[0]].push(mapper(sub));
    } else {
      formErrors.push(mapper(sub));
    }
  }
  return { formErrors, fieldErrors };
}
function formatError(error2, mapper = (issue2) => issue2.message) {
  const fieldErrors = { _errors: [] };
  const processError = (error3) => {
    for (const issue2 of error3.issues) {
      if (issue2.code === "invalid_union" && issue2.errors.length) {
        issue2.errors.map((issues) => processError({ issues }));
      } else if (issue2.code === "invalid_key") {
        processError({ issues: issue2.issues });
      } else if (issue2.code === "invalid_element") {
        processError({ issues: issue2.issues });
      } else if (issue2.path.length === 0) {
        fieldErrors._errors.push(mapper(issue2));
      } else {
        let curr = fieldErrors;
        let i = 0;
        while (i < issue2.path.length) {
          const el = issue2.path[i];
          const terminal = i === issue2.path.length - 1;
          if (!terminal) {
            curr[el] = curr[el] || { _errors: [] };
          } else {
            curr[el] = curr[el] || { _errors: [] };
            curr[el]._errors.push(mapper(issue2));
          }
          curr = curr[el];
          i++;
        }
      }
    }
  };
  processError(error2);
  return fieldErrors;
}
function treeifyError(error2, mapper = (issue2) => issue2.message) {
  const result = { errors: [] };
  const processError = (error3, path2 = []) => {
    var _a, _b;
    for (const issue2 of error3.issues) {
      if (issue2.code === "invalid_union" && issue2.errors.length) {
        issue2.errors.map((issues) => processError({ issues }, issue2.path));
      } else if (issue2.code === "invalid_key") {
        processError({ issues: issue2.issues }, issue2.path);
      } else if (issue2.code === "invalid_element") {
        processError({ issues: issue2.issues }, issue2.path);
      } else {
        const fullpath = [...path2, ...issue2.path];
        if (fullpath.length === 0) {
          result.errors.push(mapper(issue2));
          continue;
        }
        let curr = result;
        let i = 0;
        while (i < fullpath.length) {
          const el = fullpath[i];
          const terminal = i === fullpath.length - 1;
          if (typeof el === "string") {
            curr.properties ?? (curr.properties = {});
            (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });
            curr = curr.properties[el];
          } else {
            curr.items ?? (curr.items = []);
            (_b = curr.items)[el] ?? (_b[el] = { errors: [] });
            curr = curr.items[el];
          }
          if (terminal) {
            curr.errors.push(mapper(issue2));
          }
          i++;
        }
      }
    }
  };
  processError(error2);
  return result;
}
function toDotPath(_path) {
  const segs = [];
  const path2 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
  for (const seg of path2) {
    if (typeof seg === "number")
      segs.push(`[${seg}]`);
    else if (typeof seg === "symbol")
      segs.push(`[${JSON.stringify(String(seg))}]`);
    else if (/[^\w$]/.test(seg))
      segs.push(`[${JSON.stringify(seg)}]`);
    else {
      if (segs.length)
        segs.push(".");
      segs.push(seg);
    }
  }
  return segs.join("");
}
function prettifyError(error2) {
  const lines = [];
  const issues = [...error2.issues].sort((a, b2) => (a.path ?? []).length - (b2.path ?? []).length);
  for (const issue2 of issues) {
    lines.push(`✖ ${issue2.message}`);
    if (issue2.path?.length)
      lines.push(`  → at ${toDotPath(issue2.path)}`);
  }
  return lines.join(`
`);
}

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
var _parse = (_Err) => (schema, value, _ctx, _params) => {
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
  const result = schema._zod.run({ value, issues: [] }, ctx);
  if (result instanceof Promise) {
    throw new $ZodAsyncError;
  }
  if (result.issues.length) {
    const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
    captureStackTrace(e, _params?.callee);
    throw e;
  }
  return result.value;
};
var parse = /* @__PURE__ */ _parse($ZodRealError);
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
  let result = schema._zod.run({ value, issues: [] }, ctx);
  if (result instanceof Promise)
    result = await result;
  if (result.issues.length) {
    const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
    captureStackTrace(e, params?.callee);
    throw e;
  }
  return result.value;
};
var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
var _safeParse = (_Err) => (schema, value, _ctx) => {
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
  const result = schema._zod.run({ value, issues: [] }, ctx);
  if (result instanceof Promise) {
    throw new $ZodAsyncError;
  }
  return result.issues.length ? {
    success: false,
    error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
  } : { success: true, data: result.value };
};
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
  let result = schema._zod.run({ value, issues: [] }, ctx);
  if (result instanceof Promise)
    result = await result;
  return result.issues.length ? {
    success: false,
    error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
  } : { success: true, data: result.value };
};
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
var _encode = (_Err) => (schema, value, _ctx) => {
  const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
  return _parse(_Err)(schema, value, ctx);
};
var encode = /* @__PURE__ */ _encode($ZodRealError);
var _decode = (_Err) => (schema, value, _ctx) => {
  return _parse(_Err)(schema, value, _ctx);
};
var decode = /* @__PURE__ */ _decode($ZodRealError);
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
  const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
  return _parseAsync(_Err)(schema, value, ctx);
};
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
  return _parseAsync(_Err)(schema, value, _ctx);
};
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
var _safeEncode = (_Err) => (schema, value, _ctx) => {
  const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
  return _safeParse(_Err)(schema, value, ctx);
};
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
var _safeDecode = (_Err) => (schema, value, _ctx) => {
  return _safeParse(_Err)(schema, value, _ctx);
};
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
  const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
  return _safeParseAsync(_Err)(schema, value, ctx);
};
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
  return _safeParseAsync(_Err)(schema, value, _ctx);
};
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
var exports_regexes = {};
__export(exports_regexes, {
  xid: () => xid,
  uuid7: () => uuid7,
  uuid6: () => uuid6,
  uuid4: () => uuid42,
  uuid: () => uuid2,
  uppercase: () => uppercase,
  unicodeEmail: () => unicodeEmail,
  undefined: () => _undefined,
  ulid: () => ulid,
  time: () => time2,
  string: () => string,
  sha512_hex: () => sha512_hex,
  sha512_base64url: () => sha512_base64url,
  sha512_base64: () => sha512_base64,
  sha384_hex: () => sha384_hex,
  sha384_base64url: () => sha384_base64url,
  sha384_base64: () => sha384_base64,
  sha256_hex: () => sha256_hex,
  sha256_base64url: () => sha256_base64url,
  sha256_base64: () => sha256_base64,
  sha1_hex: () => sha1_hex,
  sha1_base64url: () => sha1_base64url,
  sha1_base64: () => sha1_base64,
  rfc5322Email: () => rfc5322Email,
  number: () => number,
  null: () => _null,
  nanoid: () => nanoid,
  md5_hex: () => md5_hex,
  md5_base64url: () => md5_base64url,
  md5_base64: () => md5_base64,
  mac: () => mac,
  lowercase: () => lowercase,
  ksuid: () => ksuid,
  ipv6: () => ipv6,
  ipv4: () => ipv4,
  integer: () => integer2,
  idnEmail: () => idnEmail,
  html5Email: () => html5Email,
  hostname: () => hostname2,
  hex: () => hex,
  guid: () => guid,
  extendedDuration: () => extendedDuration,
  emoji: () => emoji,
  email: () => email,
  e164: () => e164,
  duration: () => duration,
  domain: () => domain,
  datetime: () => datetime,
  date: () => date2,
  cuid2: () => cuid2,
  cuid: () => cuid,
  cidrv6: () => cidrv6,
  cidrv4: () => cidrv4,
  browserEmail: () => browserEmail,
  boolean: () => boolean2,
  bigint: () => bigint2,
  base64url: () => base64url,
  base64: () => base64
});
var cuid = /^[cC][^\s-]{8,}$/;
var cuid2 = /^[0-9a-z]+$/;
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
var xid = /^[0-9a-vA-V]{20}$/;
var ksuid = /^[A-Za-z0-9]{27}$/;
var nanoid = /^[a-zA-Z0-9_-]{21}$/;
var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
var uuid2 = (version3) => {
  if (!version3)
    return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
  return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
};
var uuid42 = /* @__PURE__ */ uuid2(4);
var uuid6 = /* @__PURE__ */ uuid2(6);
var uuid7 = /* @__PURE__ */ uuid2(7);
var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
var idnEmail = unicodeEmail;
var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
function emoji() {
  return new RegExp(_emoji, "u");
}
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
var mac = (delimiter) => {
  const escapedDelim = escapeRegex(delimiter ?? ":");
  return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
};
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
var base64url = /^[A-Za-z0-9_-]*$/;
var hostname2 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
var e164 = /^\+[1-9]\d{6,14}$/;
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
var date2 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
function timeSource(args) {
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
  const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
  return regex;
}
function time2(args) {
  return new RegExp(`^${timeSource(args)}$`);
}
function datetime(args) {
  const time3 = timeSource({ precision: args.precision });
  const opts = ["Z"];
  if (args.local)
    opts.push("");
  if (args.offset)
    opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
  const timeRegex = `${time3}(?:${opts.join("|")})`;
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
}
var string = (params) => {
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
  return new RegExp(`^${regex}$`);
};
var bigint2 = /^-?\d+n?$/;
var integer2 = /^-?\d+$/;
var number = /^-?\d+(?:\.\d+)?$/;
var boolean2 = /^(?:true|false)$/i;
var _null = /^null$/i;
var _undefined = /^undefined$/i;
var lowercase = /^[^A-Z]*$/;
var uppercase = /^[^a-z]*$/;
var hex = /^[0-9a-fA-F]*$/;
function fixedBase64(bodyLength, padding) {
  return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);
}
function fixedBase64url(length) {
  return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
}
var md5_hex = /^[0-9a-fA-F]{32}$/;
var md5_base64 = /* @__PURE__ */ fixedBase64(22, "==");
var md5_base64url = /* @__PURE__ */ fixedBase64url(22);
var sha1_hex = /^[0-9a-fA-F]{40}$/;
var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "=");
var sha1_base64url = /* @__PURE__ */ fixedBase64url(27);
var sha256_hex = /^[0-9a-fA-F]{64}$/;
var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "=");
var sha256_base64url = /* @__PURE__ */ fixedBase64url(43);
var sha384_hex = /^[0-9a-fA-F]{96}$/;
var sha384_base64 = /* @__PURE__ */ fixedBase64(64, "");
var sha384_base64url = /* @__PURE__ */ fixedBase64url(64);
var sha512_hex = /^[0-9a-fA-F]{128}$/;
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
  var _a;
  inst._zod ?? (inst._zod = {});
  inst._zod.def = def;
  (_a = inst._zod).onattach ?? (_a.onattach = []);
});
var numericOriginMap = {
  number: "number",
  bigint: "bigint",
  object: "date"
};
var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
  $ZodCheck.init(inst, def);
  const origin = numericOriginMap[typeof def.value];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
    if (def.value < curr) {
      if (def.inclusive)
        bag.maximum = def.value;
      else
        bag.exclusiveMaximum = def.value;
    }
  });
  inst._zod.check = (payload) => {
    if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
      return;
    }
    payload.issues.push({
      origin,
      code: "too_big",
      maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
      input: payload.value,
      inclusive: def.inclusive,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
  $ZodCheck.init(inst, def);
  const origin = numericOriginMap[typeof def.value];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
    if (def.value > curr) {
      if (def.inclusive)
        bag.minimum = def.value;
      else
        bag.exclusiveMinimum = def.value;
    }
  });
  inst._zod.check = (payload) => {
    if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
      return;
    }
    payload.issues.push({
      origin,
      code: "too_small",
      minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
      input: payload.value,
      inclusive: def.inclusive,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
  $ZodCheck.init(inst, def);
  inst._zod.onattach.push((inst2) => {
    var _a;
    (_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
  });
  inst._zod.check = (payload) => {
    if (typeof payload.value !== typeof def.value)
      throw new Error("Cannot mix number and bigint in multiple_of check.");
    const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0;
    if (isMultiple)
      return;
    payload.issues.push({
      origin: typeof payload.value,
      code: "not_multiple_of",
      divisor: def.value,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
  $ZodCheck.init(inst, def);
  def.format = def.format || "float64";
  const isInt = def.format?.includes("int");
  const origin = isInt ? "int" : "number";
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.format = def.format;
    bag.minimum = minimum;
    bag.maximum = maximum;
    if (isInt)
      bag.pattern = integer2;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    if (isInt) {
      if (!Number.isInteger(input)) {
        payload.issues.push({
          expected: origin,
          format: def.format,
          code: "invalid_type",
          continue: false,
          input,
          inst
        });
        return;
      }
      if (!Number.isSafeInteger(input)) {
        if (input > 0) {
          payload.issues.push({
            input,
            code: "too_big",
            maximum: Number.MAX_SAFE_INTEGER,
            note: "Integers must be within the safe integer range.",
            inst,
            origin,
            inclusive: true,
            continue: !def.abort
          });
        } else {
          payload.issues.push({
            input,
            code: "too_small",
            minimum: Number.MIN_SAFE_INTEGER,
            note: "Integers must be within the safe integer range.",
            inst,
            origin,
            inclusive: true,
            continue: !def.abort
          });
        }
        return;
      }
    }
    if (input < minimum) {
      payload.issues.push({
        origin: "number",
        input,
        code: "too_small",
        minimum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
    if (input > maximum) {
      payload.issues.push({
        origin: "number",
        input,
        code: "too_big",
        maximum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
  $ZodCheck.init(inst, def);
  const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.format = def.format;
    bag.minimum = minimum;
    bag.maximum = maximum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    if (input < minimum) {
      payload.issues.push({
        origin: "bigint",
        input,
        code: "too_small",
        minimum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
    if (input > maximum) {
      payload.issues.push({
        origin: "bigint",
        input,
        code: "too_big",
        maximum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
  var _a;
  $ZodCheck.init(inst, def);
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.size !== undefined;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
    if (def.maximum < curr)
      inst2._zod.bag.maximum = def.maximum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const size = input.size;
    if (size <= def.maximum)
      return;
    payload.issues.push({
      origin: getSizableOrigin(input),
      code: "too_big",
      maximum: def.maximum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
  var _a;
  $ZodCheck.init(inst, def);
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.size !== undefined;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
    if (def.minimum > curr)
      inst2._zod.bag.minimum = def.minimum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const size = input.size;
    if (size >= def.minimum)
      return;
    payload.issues.push({
      origin: getSizableOrigin(input),
      code: "too_small",
      minimum: def.minimum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
  var _a;
  $ZodCheck.init(inst, def);
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.size !== undefined;
  });
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.minimum = def.size;
    bag.maximum = def.size;
    bag.size = def.size;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const size = input.size;
    if (size === def.size)
      return;
    const tooBig = size > def.size;
    payload.issues.push({
      origin: getSizableOrigin(input),
      ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
      inclusive: true,
      exact: true,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
  var _a;
  $ZodCheck.init(inst, def);
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.length !== undefined;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
    if (def.maximum < curr)
      inst2._zod.bag.maximum = def.maximum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const length = input.length;
    if (length <= def.maximum)
      return;
    const origin = getLengthableOrigin(input);
    payload.issues.push({
      origin,
      code: "too_big",
      maximum: def.maximum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
  var _a;
  $ZodCheck.init(inst, def);
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.length !== undefined;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
    if (def.minimum > curr)
      inst2._zod.bag.minimum = def.minimum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const length = input.length;
    if (length >= def.minimum)
      return;
    const origin = getLengthableOrigin(input);
    payload.issues.push({
      origin,
      code: "too_small",
      minimum: def.minimum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
  var _a;
  $ZodCheck.init(inst, def);
  (_a = inst._zod.def).when ?? (_a.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.length !== undefined;
  });
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.minimum = def.length;
    bag.maximum = def.length;
    bag.length = def.length;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const length = input.length;
    if (length === def.length)
      return;
    const origin = getLengthableOrigin(input);
    const tooBig = length > def.length;
    payload.issues.push({
      origin,
      ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
      inclusive: true,
      exact: true,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
  var _a, _b;
  $ZodCheck.init(inst, def);
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.format = def.format;
    if (def.pattern) {
      bag.patterns ?? (bag.patterns = new Set);
      bag.patterns.add(def.pattern);
    }
  });
  if (def.pattern)
    (_a = inst._zod).check ?? (_a.check = (payload) => {
      def.pattern.lastIndex = 0;
      if (def.pattern.test(payload.value))
        return;
      payload.issues.push({
        origin: "string",
        code: "invalid_format",
        format: def.format,
        input: payload.value,
        ...def.pattern ? { pattern: def.pattern.toString() } : {},
        inst,
        continue: !def.abort
      });
    });
  else
    (_b = inst._zod).check ?? (_b.check = () => {});
});
var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
  $ZodCheckStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    def.pattern.lastIndex = 0;
    if (def.pattern.test(payload.value))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "regex",
      input: payload.value,
      pattern: def.pattern.toString(),
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
  def.pattern ?? (def.pattern = lowercase);
  $ZodCheckStringFormat.init(inst, def);
});
var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
  def.pattern ?? (def.pattern = uppercase);
  $ZodCheckStringFormat.init(inst, def);
});
var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
  $ZodCheck.init(inst, def);
  const escapedRegex = escapeRegex(def.includes);
  const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
  def.pattern = pattern;
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.patterns ?? (bag.patterns = new Set);
    bag.patterns.add(pattern);
  });
  inst._zod.check = (payload) => {
    if (payload.value.includes(def.includes, def.position))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "includes",
      includes: def.includes,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
  $ZodCheck.init(inst, def);
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
  def.pattern ?? (def.pattern = pattern);
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.patterns ?? (bag.patterns = new Set);
    bag.patterns.add(pattern);
  });
  inst._zod.check = (payload) => {
    if (payload.value.startsWith(def.prefix))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "starts_with",
      prefix: def.prefix,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
  $ZodCheck.init(inst, def);
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
  def.pattern ?? (def.pattern = pattern);
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.patterns ?? (bag.patterns = new Set);
    bag.patterns.add(pattern);
  });
  inst._zod.check = (payload) => {
    if (payload.value.endsWith(def.suffix))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "ends_with",
      suffix: def.suffix,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
function handleCheckPropertyResult(result, payload, property) {
  if (result.issues.length) {
    payload.issues.push(...prefixIssues(property, result.issues));
  }
}
var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => {
  $ZodCheck.init(inst, def);
  inst._zod.check = (payload) => {
    const result = def.schema._zod.run({
      value: payload.value[def.property],
      issues: []
    }, {});
    if (result instanceof Promise) {
      return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property));
    }
    handleCheckPropertyResult(result, payload, def.property);
    return;
  };
});
var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
  $ZodCheck.init(inst, def);
  const mimeSet = new Set(def.mime);
  inst._zod.onattach.push((inst2) => {
    inst2._zod.bag.mime = def.mime;
  });
  inst._zod.check = (payload) => {
    if (mimeSet.has(payload.value.type))
      return;
    payload.issues.push({
      code: "invalid_value",
      values: def.mime,
      input: payload.value.type,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
  $ZodCheck.init(inst, def);
  inst._zod.check = (payload) => {
    payload.value = def.tx(payload.value);
  };
});

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
class Doc {
  constructor(args = []) {
    this.content = [];
    this.indent = 0;
    if (this)
      this.args = args;
  }
  indented(fn) {
    this.indent += 1;
    fn(this);
    this.indent -= 1;
  }
  write(arg) {
    if (typeof arg === "function") {
      arg(this, { execution: "sync" });
      arg(this, { execution: "async" });
      return;
    }
    const content = arg;
    const lines = content.split(`
`).filter((x) => x);
    const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
    const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
    for (const line2 of dedented) {
      this.content.push(line2);
    }
  }
  compile() {
    const F = Function;
    const args = this?.args;
    const content = this?.content ?? [``];
    const lines = [...content.map((x) => `  ${x}`)];
    return new F(...args, lines.join(`
`));
  }
}

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
var version3 = {
  major: 4,
  minor: 3,
  patch: 6
};

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
  var _a;
  inst ?? (inst = {});
  inst._zod.def = def;
  inst._zod.bag = inst._zod.bag || {};
  inst._zod.version = version3;
  const checks = [...inst._zod.def.checks ?? []];
  if (inst._zod.traits.has("$ZodCheck")) {
    checks.unshift(inst);
  }
  for (const ch of checks) {
    for (const fn of ch._zod.onattach) {
      fn(inst);
    }
  }
  if (checks.length === 0) {
    (_a = inst._zod).deferred ?? (_a.deferred = []);
    inst._zod.deferred?.push(() => {
      inst._zod.run = inst._zod.parse;
    });
  } else {
    const runChecks = (payload, checks2, ctx) => {
      let isAborted = aborted(payload);
      let asyncResult;
      for (const ch of checks2) {
        if (ch._zod.def.when) {
          const shouldRun = ch._zod.def.when(payload);
          if (!shouldRun)
            continue;
        } else if (isAborted) {
          continue;
        }
        const currLen = payload.issues.length;
        const _2 = ch._zod.check(payload);
        if (_2 instanceof Promise && ctx?.async === false) {
          throw new $ZodAsyncError;
        }
        if (asyncResult || _2 instanceof Promise) {
          asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
            await _2;
            const nextLen = payload.issues.length;
            if (nextLen === currLen)
              return;
            if (!isAborted)
              isAborted = aborted(payload, currLen);
          });
        } else {
          const nextLen = payload.issues.length;
          if (nextLen === currLen)
            continue;
          if (!isAborted)
            isAborted = aborted(payload, currLen);
        }
      }
      if (asyncResult) {
        return asyncResult.then(() => {
          return payload;
        });
      }
      return payload;
    };
    const handleCanaryResult = (canary, payload, ctx) => {
      if (aborted(canary)) {
        canary.aborted = true;
        return canary;
      }
      const checkResult = runChecks(payload, checks, ctx);
      if (checkResult instanceof Promise) {
        if (ctx.async === false)
          throw new $ZodAsyncError;
        return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
      }
      return inst._zod.parse(checkResult, ctx);
    };
    inst._zod.run = (payload, ctx) => {
      if (ctx.skipChecks) {
        return inst._zod.parse(payload, ctx);
      }
      if (ctx.direction === "backward") {
        const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
        if (canary instanceof Promise) {
          return canary.then((canary2) => {
            return handleCanaryResult(canary2, payload, ctx);
          });
        }
        return handleCanaryResult(canary, payload, ctx);
      }
      const result = inst._zod.parse(payload, ctx);
      if (result instanceof Promise) {
        if (ctx.async === false)
          throw new $ZodAsyncError;
        return result.then((result2) => runChecks(result2, checks, ctx));
      }
      return runChecks(result, checks, ctx);
    };
  }
  defineLazy(inst, "~standard", () => ({
    validate: (value) => {
      try {
        const r = safeParse(inst, value);
        return r.success ? { value: r.data } : { issues: r.error?.issues };
      } catch (_2) {
        return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
      }
    },
    vendor: "zod",
    version: 1
  }));
});
var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
  inst._zod.parse = (payload, _2) => {
    if (def.coerce)
      try {
        payload.value = String(payload.value);
      } catch (_3) {}
    if (typeof payload.value === "string")
      return payload;
    payload.issues.push({
      expected: "string",
      code: "invalid_type",
      input: payload.value,
      inst
    });
    return payload;
  };
});
var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
  $ZodCheckStringFormat.init(inst, def);
  $ZodString.init(inst, def);
});
var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
  def.pattern ?? (def.pattern = guid);
  $ZodStringFormat.init(inst, def);
});
var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
  if (def.version) {
    const versionMap = {
      v1: 1,
      v2: 2,
      v3: 3,
      v4: 4,
      v5: 5,
      v6: 6,
      v7: 7,
      v8: 8
    };
    const v2 = versionMap[def.version];
    if (v2 === undefined)
      throw new Error(`Invalid UUID version: "${def.version}"`);
    def.pattern ?? (def.pattern = uuid2(v2));
  } else
    def.pattern ?? (def.pattern = uuid2());
  $ZodStringFormat.init(inst, def);
});
var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
  def.pattern ?? (def.pattern = email);
  $ZodStringFormat.init(inst, def);
});
var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    try {
      const trimmed = payload.value.trim();
      const url = new URL(trimmed);
      if (def.hostname) {
        def.hostname.lastIndex = 0;
        if (!def.hostname.test(url.hostname)) {
          payload.issues.push({
            code: "invalid_format",
            format: "url",
            note: "Invalid hostname",
            pattern: def.hostname.source,
            input: payload.value,
            inst,
            continue: !def.abort
          });
        }
      }
      if (def.protocol) {
        def.protocol.lastIndex = 0;
        if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
          payload.issues.push({
            code: "invalid_format",
            format: "url",
            note: "Invalid protocol",
            pattern: def.protocol.source,
            input: payload.value,
            inst,
            continue: !def.abort
          });
        }
      }
      if (def.normalize) {
        payload.value = url.href;
      } else {
        payload.value = trimmed;
      }
      return;
    } catch (_2) {
      payload.issues.push({
        code: "invalid_format",
        format: "url",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
  def.pattern ?? (def.pattern = emoji());
  $ZodStringFormat.init(inst, def);
});
var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
  def.pattern ?? (def.pattern = nanoid);
  $ZodStringFormat.init(inst, def);
});
var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
  def.pattern ?? (def.pattern = cuid);
  $ZodStringFormat.init(inst, def);
});
var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
  def.pattern ?? (def.pattern = cuid2);
  $ZodStringFormat.init(inst, def);
});
var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
  def.pattern ?? (def.pattern = ulid);
  $ZodStringFormat.init(inst, def);
});
var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
  def.pattern ?? (def.pattern = xid);
  $ZodStringFormat.init(inst, def);
});
var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
  def.pattern ?? (def.pattern = ksuid);
  $ZodStringFormat.init(inst, def);
});
var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
  def.pattern ?? (def.pattern = datetime(def));
  $ZodStringFormat.init(inst, def);
});
var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
  def.pattern ?? (def.pattern = date2);
  $ZodStringFormat.init(inst, def);
});
var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
  def.pattern ?? (def.pattern = time2(def));
  $ZodStringFormat.init(inst, def);
});
var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
  def.pattern ?? (def.pattern = duration);
  $ZodStringFormat.init(inst, def);
});
var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
  def.pattern ?? (def.pattern = ipv4);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.format = `ipv4`;
});
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
  def.pattern ?? (def.pattern = ipv6);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.format = `ipv6`;
  inst._zod.check = (payload) => {
    try {
      new URL(`http://[${payload.value}]`);
    } catch {
      payload.issues.push({
        code: "invalid_format",
        format: "ipv6",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => {
  def.pattern ?? (def.pattern = mac(def.delimiter));
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.format = `mac`;
});
var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
  def.pattern ?? (def.pattern = cidrv4);
  $ZodStringFormat.init(inst, def);
});
var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
  def.pattern ?? (def.pattern = cidrv6);
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    const parts = payload.value.split("/");
    try {
      if (parts.length !== 2)
        throw new Error;
      const [address, prefix] = parts;
      if (!prefix)
        throw new Error;
      const prefixNum = Number(prefix);
      if (`${prefixNum}` !== prefix)
        throw new Error;
      if (prefixNum < 0 || prefixNum > 128)
        throw new Error;
      new URL(`http://[${address}]`);
    } catch {
      payload.issues.push({
        code: "invalid_format",
        format: "cidrv6",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    }
  };
});
function isValidBase64(data) {
  if (data === "")
    return true;
  if (data.length % 4 !== 0)
    return false;
  try {
    atob(data);
    return true;
  } catch {
    return false;
  }
}
var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
  def.pattern ?? (def.pattern = base64);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.contentEncoding = "base64";
  inst._zod.check = (payload) => {
    if (isValidBase64(payload.value))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: "base64",
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
function isValidBase64URL(data) {
  if (!base64url.test(data))
    return false;
  const base642 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
  const padded = base642.padEnd(Math.ceil(base642.length / 4) * 4, "=");
  return isValidBase64(padded);
}
var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
  def.pattern ?? (def.pattern = base64url);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.contentEncoding = "base64url";
  inst._zod.check = (payload) => {
    if (isValidBase64URL(payload.value))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: "base64url",
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
  def.pattern ?? (def.pattern = e164);
  $ZodStringFormat.init(inst, def);
});
function isValidJWT(token, algorithm = null) {
  try {
    const tokensParts = token.split(".");
    if (tokensParts.length !== 3)
      return false;
    const [header] = tokensParts;
    if (!header)
      return false;
    const parsedHeader = JSON.parse(atob(header));
    if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
      return false;
    if (!parsedHeader.alg)
      return false;
    if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
      return false;
    return true;
  } catch {
    return false;
  }
}
var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    if (isValidJWT(payload.value, def.alg))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: "jwt",
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    if (def.fn(payload.value))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: def.format,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = inst._zod.bag.pattern ?? number;
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce)
      try {
        payload.value = Number(payload.value);
      } catch (_2) {}
    const input = payload.value;
    if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
      return payload;
    }
    const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : undefined : undefined;
    payload.issues.push({
      expected: "number",
      code: "invalid_type",
      input,
      inst,
      ...received ? { received } : {}
    });
    return payload;
  };
});
var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
  $ZodCheckNumberFormat.init(inst, def);
  $ZodNumber.init(inst, def);
});
var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = boolean2;
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce)
      try {
        payload.value = Boolean(payload.value);
      } catch (_2) {}
    const input = payload.value;
    if (typeof input === "boolean")
      return payload;
    payload.issues.push({
      expected: "boolean",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = bigint2;
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce)
      try {
        payload.value = BigInt(payload.value);
      } catch (_2) {}
    if (typeof payload.value === "bigint")
      return payload;
    payload.issues.push({
      expected: "bigint",
      code: "invalid_type",
      input: payload.value,
      inst
    });
    return payload;
  };
});
var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => {
  $ZodCheckBigIntFormat.init(inst, def);
  $ZodBigInt.init(inst, def);
});
var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (typeof input === "symbol")
      return payload;
    payload.issues.push({
      expected: "symbol",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = _undefined;
  inst._zod.values = new Set([undefined]);
  inst._zod.optin = "optional";
  inst._zod.optout = "optional";
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (typeof input === "undefined")
      return payload;
    payload.issues.push({
      expected: "undefined",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = _null;
  inst._zod.values = new Set([null]);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (input === null)
      return payload;
    payload.issues.push({
      expected: "null",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload) => payload;
});
var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload) => payload;
});
var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    payload.issues.push({
      expected: "never",
      code: "invalid_type",
      input: payload.value,
      inst
    });
    return payload;
  };
});
var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (typeof input === "undefined")
      return payload;
    payload.issues.push({
      expected: "void",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce) {
      try {
        payload.value = new Date(payload.value);
      } catch (_err) {}
    }
    const input = payload.value;
    const isDate = input instanceof Date;
    const isValidDate = isDate && !Number.isNaN(input.getTime());
    if (isValidDate)
      return payload;
    payload.issues.push({
      expected: "date",
      code: "invalid_type",
      input,
      ...isDate ? { received: "Invalid Date" } : {},
      inst
    });
    return payload;
  };
});
function handleArrayResult(result, final, index2) {
  if (result.issues.length) {
    final.issues.push(...prefixIssues(index2, result.issues));
  }
  final.value[index2] = result.value;
}
var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    const input = payload.value;
    if (!Array.isArray(input)) {
      payload.issues.push({
        expected: "array",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    payload.value = Array(input.length);
    const proms = [];
    for (let i = 0;i < input.length; i++) {
      const item = input[i];
      const result = def.element._zod.run({
        value: item,
        issues: []
      }, ctx);
      if (result instanceof Promise) {
        proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
      } else {
        handleArrayResult(result, payload, i);
      }
    }
    if (proms.length) {
      return Promise.all(proms).then(() => payload);
    }
    return payload;
  };
});
function handlePropertyResult(result, final, key, input, isOptionalOut) {
  if (result.issues.length) {
    if (isOptionalOut && !(key in input)) {
      return;
    }
    final.issues.push(...prefixIssues(key, result.issues));
  }
  if (result.value === undefined) {
    if (key in input) {
      final.value[key] = undefined;
    }
  } else {
    final.value[key] = result.value;
  }
}
function normalizeDef(def) {
  const keys = Object.keys(def.shape);
  for (const k2 of keys) {
    if (!def.shape?.[k2]?._zod?.traits?.has("$ZodType")) {
      throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
    }
  }
  const okeys = optionalKeys(def.shape);
  return {
    ...def,
    keys,
    keySet: new Set(keys),
    numKeys: keys.length,
    optionalKeys: new Set(okeys)
  };
}
function handleCatchall(proms, input, payload, ctx, def, inst) {
  const unrecognized = [];
  const keySet = def.keySet;
  const _catchall = def.catchall._zod;
  const t = _catchall.def.type;
  const isOptionalOut = _catchall.optout === "optional";
  for (const key in input) {
    if (keySet.has(key))
      continue;
    if (t === "never") {
      unrecognized.push(key);
      continue;
    }
    const r = _catchall.run({ value: input[key], issues: [] }, ctx);
    if (r instanceof Promise) {
      proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
    } else {
      handlePropertyResult(r, payload, key, input, isOptionalOut);
    }
  }
  if (unrecognized.length) {
    payload.issues.push({
      code: "unrecognized_keys",
      keys: unrecognized,
      input,
      inst
    });
  }
  if (!proms.length)
    return payload;
  return Promise.all(proms).then(() => {
    return payload;
  });
}
var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
  $ZodType.init(inst, def);
  const desc2 = Object.getOwnPropertyDescriptor(def, "shape");
  if (!desc2?.get) {
    const sh = def.shape;
    Object.defineProperty(def, "shape", {
      get: () => {
        const newSh = { ...sh };
        Object.defineProperty(def, "shape", {
          value: newSh
        });
        return newSh;
      }
    });
  }
  const _normalized = cached(() => normalizeDef(def));
  defineLazy(inst._zod, "propValues", () => {
    const shape = def.shape;
    const propValues = {};
    for (const key in shape) {
      const field = shape[key]._zod;
      if (field.values) {
        propValues[key] ?? (propValues[key] = new Set);
        for (const v2 of field.values)
          propValues[key].add(v2);
      }
    }
    return propValues;
  });
  const isObject2 = isObject;
  const catchall = def.catchall;
  let value;
  inst._zod.parse = (payload, ctx) => {
    value ?? (value = _normalized.value);
    const input = payload.value;
    if (!isObject2(input)) {
      payload.issues.push({
        expected: "object",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    payload.value = {};
    const proms = [];
    const shape = value.shape;
    for (const key of value.keys) {
      const el = shape[key];
      const isOptionalOut = el._zod.optout === "optional";
      const r = el._zod.run({ value: input[key], issues: [] }, ctx);
      if (r instanceof Promise) {
        proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
      } else {
        handlePropertyResult(r, payload, key, input, isOptionalOut);
      }
    }
    if (!catchall) {
      return proms.length ? Promise.all(proms).then(() => payload) : payload;
    }
    return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
  };
});
var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
  $ZodObject.init(inst, def);
  const superParse = inst._zod.parse;
  const _normalized = cached(() => normalizeDef(def));
  const generateFastpass = (shape) => {
    const doc = new Doc(["shape", "payload", "ctx"]);
    const normalized = _normalized.value;
    const parseStr = (key) => {
      const k2 = esc(key);
      return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`;
    };
    doc.write(`const input = payload.value;`);
    const ids = Object.create(null);
    let counter = 0;
    for (const key of normalized.keys) {
      ids[key] = `key_${counter++}`;
    }
    doc.write(`const newResult = {};`);
    for (const key of normalized.keys) {
      const id = ids[key];
      const k2 = esc(key);
      const schema = shape[key];
      const isOptionalOut = schema?._zod?.optout === "optional";
      doc.write(`const ${id} = ${parseStr(key)};`);
      if (isOptionalOut) {
        doc.write(`
        if (${id}.issues.length) {
          if (${k2} in input) {
            payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
              ...iss,
              path: iss.path ? [${k2}, ...iss.path] : [${k2}]
            })));
          }
        }
        
        if (${id}.value === undefined) {
          if (${k2} in input) {
            newResult[${k2}] = undefined;
          }
        } else {
          newResult[${k2}] = ${id}.value;
        }
        
      `);
      } else {
        doc.write(`
        if (${id}.issues.length) {
          payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${k2}, ...iss.path] : [${k2}]
          })));
        }
        
        if (${id}.value === undefined) {
          if (${k2} in input) {
            newResult[${k2}] = undefined;
          }
        } else {
          newResult[${k2}] = ${id}.value;
        }
        
      `);
      }
    }
    doc.write(`payload.value = newResult;`);
    doc.write(`return payload;`);
    const fn = doc.compile();
    return (payload, ctx) => fn(shape, payload, ctx);
  };
  let fastpass;
  const isObject2 = isObject;
  const jit = !globalConfig.jitless;
  const allowsEval2 = allowsEval;
  const fastEnabled = jit && allowsEval2.value;
  const catchall = def.catchall;
  let value;
  inst._zod.parse = (payload, ctx) => {
    value ?? (value = _normalized.value);
    const input = payload.value;
    if (!isObject2(input)) {
      payload.issues.push({
        expected: "object",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
      if (!fastpass)
        fastpass = generateFastpass(def.shape);
      payload = fastpass(payload, ctx);
      if (!catchall)
        return payload;
      return handleCatchall([], input, payload, ctx, value, inst);
    }
    return superParse(payload, ctx);
  };
});
function handleUnionResults(results, final, inst, ctx) {
  for (const result of results) {
    if (result.issues.length === 0) {
      final.value = result.value;
      return final;
    }
  }
  const nonaborted = results.filter((r) => !aborted(r));
  if (nonaborted.length === 1) {
    final.value = nonaborted[0].value;
    return nonaborted[0];
  }
  final.issues.push({
    code: "invalid_union",
    input: final.value,
    inst,
    errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
  });
  return final;
}
var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
  defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
  defineLazy(inst._zod, "values", () => {
    if (def.options.every((o) => o._zod.values)) {
      return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
    }
    return;
  });
  defineLazy(inst._zod, "pattern", () => {
    if (def.options.every((o) => o._zod.pattern)) {
      const patterns = def.options.map((o) => o._zod.pattern);
      return new RegExp(`^(${patterns.map((p2) => cleanRegex(p2.source)).join("|")})$`);
    }
    return;
  });
  const single = def.options.length === 1;
  const first = def.options[0]._zod.run;
  inst._zod.parse = (payload, ctx) => {
    if (single) {
      return first(payload, ctx);
    }
    let async = false;
    const results = [];
    for (const option of def.options) {
      const result = option._zod.run({
        value: payload.value,
        issues: []
      }, ctx);
      if (result instanceof Promise) {
        results.push(result);
        async = true;
      } else {
        if (result.issues.length === 0)
          return result;
        results.push(result);
      }
    }
    if (!async)
      return handleUnionResults(results, payload, inst, ctx);
    return Promise.all(results).then((results2) => {
      return handleUnionResults(results2, payload, inst, ctx);
    });
  };
});
function handleExclusiveUnionResults(results, final, inst, ctx) {
  const successes = results.filter((r) => r.issues.length === 0);
  if (successes.length === 1) {
    final.value = successes[0].value;
    return final;
  }
  if (successes.length === 0) {
    final.issues.push({
      code: "invalid_union",
      input: final.value,
      inst,
      errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
    });
  } else {
    final.issues.push({
      code: "invalid_union",
      input: final.value,
      inst,
      errors: [],
      inclusive: false
    });
  }
  return final;
}
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
  $ZodUnion.init(inst, def);
  def.inclusive = false;
  const single = def.options.length === 1;
  const first = def.options[0]._zod.run;
  inst._zod.parse = (payload, ctx) => {
    if (single) {
      return first(payload, ctx);
    }
    let async = false;
    const results = [];
    for (const option of def.options) {
      const result = option._zod.run({
        value: payload.value,
        issues: []
      }, ctx);
      if (result instanceof Promise) {
        results.push(result);
        async = true;
      } else {
        results.push(result);
      }
    }
    if (!async)
      return handleExclusiveUnionResults(results, payload, inst, ctx);
    return Promise.all(results).then((results2) => {
      return handleExclusiveUnionResults(results2, payload, inst, ctx);
    });
  };
});
var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
  def.inclusive = false;
  $ZodUnion.init(inst, def);
  const _super = inst._zod.parse;
  defineLazy(inst._zod, "propValues", () => {
    const propValues = {};
    for (const option of def.options) {
      const pv = option._zod.propValues;
      if (!pv || Object.keys(pv).length === 0)
        throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
      for (const [k2, v2] of Object.entries(pv)) {
        if (!propValues[k2])
          propValues[k2] = new Set;
        for (const val of v2) {
          propValues[k2].add(val);
        }
      }
    }
    return propValues;
  });
  const disc = cached(() => {
    const opts = def.options;
    const map = new Map;
    for (const o of opts) {
      const values = o._zod.propValues?.[def.discriminator];
      if (!values || values.size === 0)
        throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
      for (const v2 of values) {
        if (map.has(v2)) {
          throw new Error(`Duplicate discriminator value "${String(v2)}"`);
        }
        map.set(v2, o);
      }
    }
    return map;
  });
  inst._zod.parse = (payload, ctx) => {
    const input = payload.value;
    if (!isObject(input)) {
      payload.issues.push({
        code: "invalid_type",
        expected: "object",
        input,
        inst
      });
      return payload;
    }
    const opt = disc.value.get(input?.[def.discriminator]);
    if (opt) {
      return opt._zod.run(payload, ctx);
    }
    if (def.unionFallback) {
      return _super(payload, ctx);
    }
    payload.issues.push({
      code: "invalid_union",
      errors: [],
      note: "No matching discriminator",
      discriminator: def.discriminator,
      input,
      path: [def.discriminator],
      inst
    });
    return payload;
  };
});
var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    const input = payload.value;
    const left = def.left._zod.run({ value: input, issues: [] }, ctx);
    const right = def.right._zod.run({ value: input, issues: [] }, ctx);
    const async = left instanceof Promise || right instanceof Promise;
    if (async) {
      return Promise.all([left, right]).then(([left2, right2]) => {
        return handleIntersectionResults(payload, left2, right2);
      });
    }
    return handleIntersectionResults(payload, left, right);
  };
});
function mergeValues(a, b2) {
  if (a === b2) {
    return { valid: true, data: a };
  }
  if (a instanceof Date && b2 instanceof Date && +a === +b2) {
    return { valid: true, data: a };
  }
  if (isPlainObject2(a) && isPlainObject2(b2)) {
    const bKeys = Object.keys(b2);
    const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
    const newObj = { ...a, ...b2 };
    for (const key of sharedKeys) {
      const sharedValue = mergeValues(a[key], b2[key]);
      if (!sharedValue.valid) {
        return {
          valid: false,
          mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
        };
      }
      newObj[key] = sharedValue.data;
    }
    return { valid: true, data: newObj };
  }
  if (Array.isArray(a) && Array.isArray(b2)) {
    if (a.length !== b2.length) {
      return { valid: false, mergeErrorPath: [] };
    }
    const newArray = [];
    for (let index2 = 0;index2 < a.length; index2++) {
      const itemA = a[index2];
      const itemB = b2[index2];
      const sharedValue = mergeValues(itemA, itemB);
      if (!sharedValue.valid) {
        return {
          valid: false,
          mergeErrorPath: [index2, ...sharedValue.mergeErrorPath]
        };
      }
      newArray.push(sharedValue.data);
    }
    return { valid: true, data: newArray };
  }
  return { valid: false, mergeErrorPath: [] };
}
function handleIntersectionResults(result, left, right) {
  const unrecKeys = new Map;
  let unrecIssue;
  for (const iss of left.issues) {
    if (iss.code === "unrecognized_keys") {
      unrecIssue ?? (unrecIssue = iss);
      for (const k2 of iss.keys) {
        if (!unrecKeys.has(k2))
          unrecKeys.set(k2, {});
        unrecKeys.get(k2).l = true;
      }
    } else {
      result.issues.push(iss);
    }
  }
  for (const iss of right.issues) {
    if (iss.code === "unrecognized_keys") {
      for (const k2 of iss.keys) {
        if (!unrecKeys.has(k2))
          unrecKeys.set(k2, {});
        unrecKeys.get(k2).r = true;
      }
    } else {
      result.issues.push(iss);
    }
  }
  const bothKeys = [...unrecKeys].filter(([, f2]) => f2.l && f2.r).map(([k2]) => k2);
  if (bothKeys.length && unrecIssue) {
    result.issues.push({ ...unrecIssue, keys: bothKeys });
  }
  if (aborted(result))
    return result;
  const merged = mergeValues(left.value, right.value);
  if (!merged.valid) {
    throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
  }
  result.value = merged.data;
  return result;
}
var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
  $ZodType.init(inst, def);
  const items = def.items;
  inst._zod.parse = (payload, ctx) => {
    const input = payload.value;
    if (!Array.isArray(input)) {
      payload.issues.push({
        input,
        inst,
        expected: "tuple",
        code: "invalid_type"
      });
      return payload;
    }
    payload.value = [];
    const proms = [];
    const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
    const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
    if (!def.rest) {
      const tooBig = input.length > items.length;
      const tooSmall = input.length < optStart - 1;
      if (tooBig || tooSmall) {
        payload.issues.push({
          ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
          input,
          inst,
          origin: "array"
        });
        return payload;
      }
    }
    let i = -1;
    for (const item of items) {
      i++;
      if (i >= input.length) {
        if (i >= optStart)
          continue;
      }
      const result = item._zod.run({
        value: input[i],
        issues: []
      }, ctx);
      if (result instanceof Promise) {
        proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
      } else {
        handleTupleResult(result, payload, i);
      }
    }
    if (def.rest) {
      const rest = input.slice(items.length);
      for (const el of rest) {
        i++;
        const result = def.rest._zod.run({
          value: el,
          issues: []
        }, ctx);
        if (result instanceof Promise) {
          proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
        } else {
          handleTupleResult(result, payload, i);
        }
      }
    }
    if (proms.length)
      return Promise.all(proms).then(() => payload);
    return payload;
  };
});
function handleTupleResult(result, final, index2) {
  if (result.issues.length) {
    final.issues.push(...prefixIssues(index2, result.issues));
  }
  final.value[index2] = result.value;
}
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    const input = payload.value;
    if (!isPlainObject2(input)) {
      payload.issues.push({
        expected: "record",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    const proms = [];
    const values = def.keyType._zod.values;
    if (values) {
      payload.value = {};
      const recordKeys = new Set;
      for (const key of values) {
        if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
          recordKeys.add(typeof key === "number" ? key.toString() : key);
          const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
          if (result instanceof Promise) {
            proms.push(result.then((result2) => {
              if (result2.issues.length) {
                payload.issues.push(...prefixIssues(key, result2.issues));
              }
              payload.value[key] = result2.value;
            }));
          } else {
            if (result.issues.length) {
              payload.issues.push(...prefixIssues(key, result.issues));
            }
            payload.value[key] = result.value;
          }
        }
      }
      let unrecognized;
      for (const key in input) {
        if (!recordKeys.has(key)) {
          unrecognized = unrecognized ?? [];
          unrecognized.push(key);
        }
      }
      if (unrecognized && unrecognized.length > 0) {
        payload.issues.push({
          code: "unrecognized_keys",
          input,
          inst,
          keys: unrecognized
        });
      }
    } else {
      payload.value = {};
      for (const key of Reflect.ownKeys(input)) {
        if (key === "__proto__")
          continue;
        let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
        if (keyResult instanceof Promise) {
          throw new Error("Async schemas not supported in object keys currently");
        }
        const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length;
        if (checkNumericKey) {
          const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
          if (retryResult instanceof Promise) {
            throw new Error("Async schemas not supported in object keys currently");
          }
          if (retryResult.issues.length === 0) {
            keyResult = retryResult;
          }
        }
        if (keyResult.issues.length) {
          if (def.mode === "loose") {
            payload.value[key] = input[key];
          } else {
            payload.issues.push({
              code: "invalid_key",
              origin: "record",
              issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
              input: key,
              path: [key],
              inst
            });
          }
          continue;
        }
        const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
        if (result instanceof Promise) {
          proms.push(result.then((result2) => {
            if (result2.issues.length) {
              payload.issues.push(...prefixIssues(key, result2.issues));
            }
            payload.value[keyResult.value] = result2.value;
          }));
        } else {
          if (result.issues.length) {
            payload.issues.push(...prefixIssues(key, result.issues));
          }
          payload.value[keyResult.value] = result.value;
        }
      }
    }
    if (proms.length) {
      return Promise.all(proms).then(() => payload);
    }
    return payload;
  };
});
var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    const input = payload.value;
    if (!(input instanceof Map)) {
      payload.issues.push({
        expected: "map",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    const proms = [];
    payload.value = new Map;
    for (const [key, value] of input) {
      const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
      const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
      if (keyResult instanceof Promise || valueResult instanceof Promise) {
        proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
          handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
        }));
      } else {
        handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
      }
    }
    if (proms.length)
      return Promise.all(proms).then(() => payload);
    return payload;
  };
});
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
  if (keyResult.issues.length) {
    if (propertyKeyTypes.has(typeof key)) {
      final.issues.push(...prefixIssues(key, keyResult.issues));
    } else {
      final.issues.push({
        code: "invalid_key",
        origin: "map",
        input,
        inst,
        issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
      });
    }
  }
  if (valueResult.issues.length) {
    if (propertyKeyTypes.has(typeof key)) {
      final.issues.push(...prefixIssues(key, valueResult.issues));
    } else {
      final.issues.push({
        origin: "map",
        code: "invalid_element",
        input,
        inst,
        key,
        issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
      });
    }
  }
  final.value.set(keyResult.value, valueResult.value);
}
var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    const input = payload.value;
    if (!(input instanceof Set)) {
      payload.issues.push({
        input,
        inst,
        expected: "set",
        code: "invalid_type"
      });
      return payload;
    }
    const proms = [];
    payload.value = new Set;
    for (const item of input) {
      const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
      if (result instanceof Promise) {
        proms.push(result.then((result2) => handleSetResult(result2, payload)));
      } else
        handleSetResult(result, payload);
    }
    if (proms.length)
      return Promise.all(proms).then(() => payload);
    return payload;
  };
});
function handleSetResult(result, final) {
  if (result.issues.length) {
    final.issues.push(...result.issues);
  }
  final.value.add(result.value);
}
var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
  $ZodType.init(inst, def);
  const values = getEnumValues(def.entries);
  const valuesSet = new Set(values);
  inst._zod.values = valuesSet;
  inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (valuesSet.has(input)) {
      return payload;
    }
    payload.issues.push({
      code: "invalid_value",
      values,
      input,
      inst
    });
    return payload;
  };
});
var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
  $ZodType.init(inst, def);
  if (def.values.length === 0) {
    throw new Error("Cannot create literal schema with no valid values");
  }
  const values = new Set(def.values);
  inst._zod.values = values;
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (values.has(input)) {
      return payload;
    }
    payload.issues.push({
      code: "invalid_value",
      values: def.values,
      input,
      inst
    });
    return payload;
  };
});
var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (input instanceof File)
      return payload;
    payload.issues.push({
      expected: "file",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    if (ctx.direction === "backward") {
      throw new $ZodEncodeError(inst.constructor.name);
    }
    const _out = def.transform(payload.value, payload);
    if (ctx.async) {
      const output = _out instanceof Promise ? _out : Promise.resolve(_out);
      return output.then((output2) => {
        payload.value = output2;
        return payload;
      });
    }
    if (_out instanceof Promise) {
      throw new $ZodAsyncError;
    }
    payload.value = _out;
    return payload;
  };
});
function handleOptionalResult(result, input) {
  if (result.issues.length && input === undefined) {
    return { issues: [], value: undefined };
  }
  return result;
}
var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  inst._zod.optout = "optional";
  defineLazy(inst._zod, "values", () => {
    return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;
  });
  defineLazy(inst._zod, "pattern", () => {
    const pattern = def.innerType._zod.pattern;
    return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
  });
  inst._zod.parse = (payload, ctx) => {
    if (def.innerType._zod.optin === "optional") {
      const result = def.innerType._zod.run(payload, ctx);
      if (result instanceof Promise)
        return result.then((r) => handleOptionalResult(r, payload.value));
      return handleOptionalResult(result, payload.value);
    }
    if (payload.value === undefined) {
      return payload;
    }
    return def.innerType._zod.run(payload, ctx);
  };
});
var $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
  $ZodOptional.init(inst, def);
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
  inst._zod.parse = (payload, ctx) => {
    return def.innerType._zod.run(payload, ctx);
  };
});
var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
  defineLazy(inst._zod, "pattern", () => {
    const pattern = def.innerType._zod.pattern;
    return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : undefined;
  });
  defineLazy(inst._zod, "values", () => {
    return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;
  });
  inst._zod.parse = (payload, ctx) => {
    if (payload.value === null)
      return payload;
    return def.innerType._zod.run(payload, ctx);
  };
});
var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  inst._zod.parse = (payload, ctx) => {
    if (ctx.direction === "backward") {
      return def.innerType._zod.run(payload, ctx);
    }
    if (payload.value === undefined) {
      payload.value = def.defaultValue;
      return payload;
    }
    const result = def.innerType._zod.run(payload, ctx);
    if (result instanceof Promise) {
      return result.then((result2) => handleDefaultResult(result2, def));
    }
    return handleDefaultResult(result, def);
  };
});
function handleDefaultResult(payload, def) {
  if (payload.value === undefined) {
    payload.value = def.defaultValue;
  }
  return payload;
}
var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  inst._zod.parse = (payload, ctx) => {
    if (ctx.direction === "backward") {
      return def.innerType._zod.run(payload, ctx);
    }
    if (payload.value === undefined) {
      payload.value = def.defaultValue;
    }
    return def.innerType._zod.run(payload, ctx);
  };
});
var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "values", () => {
    const v2 = def.innerType._zod.values;
    return v2 ? new Set([...v2].filter((x) => x !== undefined)) : undefined;
  });
  inst._zod.parse = (payload, ctx) => {
    const result = def.innerType._zod.run(payload, ctx);
    if (result instanceof Promise) {
      return result.then((result2) => handleNonOptionalResult(result2, inst));
    }
    return handleNonOptionalResult(result, inst);
  };
});
function handleNonOptionalResult(payload, inst) {
  if (!payload.issues.length && payload.value === undefined) {
    payload.issues.push({
      code: "invalid_type",
      expected: "nonoptional",
      input: payload.value,
      inst
    });
  }
  return payload;
}
var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    if (ctx.direction === "backward") {
      throw new $ZodEncodeError("ZodSuccess");
    }
    const result = def.innerType._zod.run(payload, ctx);
    if (result instanceof Promise) {
      return result.then((result2) => {
        payload.value = result2.issues.length === 0;
        return payload;
      });
    }
    payload.value = result.issues.length === 0;
    return payload;
  };
});
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  inst._zod.parse = (payload, ctx) => {
    if (ctx.direction === "backward") {
      return def.innerType._zod.run(payload, ctx);
    }
    const result = def.innerType._zod.run(payload, ctx);
    if (result instanceof Promise) {
      return result.then((result2) => {
        payload.value = result2.value;
        if (result2.issues.length) {
          payload.value = def.catchValue({
            ...payload,
            error: {
              issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config()))
            },
            input: payload.value
          });
          payload.issues = [];
        }
        return payload;
      });
    }
    payload.value = result.value;
    if (result.issues.length) {
      payload.value = def.catchValue({
        ...payload,
        error: {
          issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config()))
        },
        input: payload.value
      });
      payload.issues = [];
    }
    return payload;
  };
});
var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
      payload.issues.push({
        input: payload.value,
        inst,
        expected: "nan",
        code: "invalid_type"
      });
      return payload;
    }
    return payload;
  };
});
var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "values", () => def.in._zod.values);
  defineLazy(inst._zod, "optin", () => def.in._zod.optin);
  defineLazy(inst._zod, "optout", () => def.out._zod.optout);
  defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
  inst._zod.parse = (payload, ctx) => {
    if (ctx.direction === "backward") {
      const right = def.out._zod.run(payload, ctx);
      if (right instanceof Promise) {
        return right.then((right2) => handlePipeResult(right2, def.in, ctx));
      }
      return handlePipeResult(right, def.in, ctx);
    }
    const left = def.in._zod.run(payload, ctx);
    if (left instanceof Promise) {
      return left.then((left2) => handlePipeResult(left2, def.out, ctx));
    }
    return handlePipeResult(left, def.out, ctx);
  };
});
function handlePipeResult(left, next, ctx) {
  if (left.issues.length) {
    left.aborted = true;
    return left;
  }
  return next._zod.run({ value: left.value, issues: left.issues }, ctx);
}
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "values", () => def.in._zod.values);
  defineLazy(inst._zod, "optin", () => def.in._zod.optin);
  defineLazy(inst._zod, "optout", () => def.out._zod.optout);
  defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
  inst._zod.parse = (payload, ctx) => {
    const direction = ctx.direction || "forward";
    if (direction === "forward") {
      const left = def.in._zod.run(payload, ctx);
      if (left instanceof Promise) {
        return left.then((left2) => handleCodecAResult(left2, def, ctx));
      }
      return handleCodecAResult(left, def, ctx);
    } else {
      const right = def.out._zod.run(payload, ctx);
      if (right instanceof Promise) {
        return right.then((right2) => handleCodecAResult(right2, def, ctx));
      }
      return handleCodecAResult(right, def, ctx);
    }
  };
});
function handleCodecAResult(result, def, ctx) {
  if (result.issues.length) {
    result.aborted = true;
    return result;
  }
  const direction = ctx.direction || "forward";
  if (direction === "forward") {
    const transformed = def.transform(result.value, result);
    if (transformed instanceof Promise) {
      return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
    }
    return handleCodecTxResult(result, transformed, def.out, ctx);
  } else {
    const transformed = def.reverseTransform(result.value, result);
    if (transformed instanceof Promise) {
      return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
    }
    return handleCodecTxResult(result, transformed, def.in, ctx);
  }
}
function handleCodecTxResult(left, value, nextSchema, ctx) {
  if (left.issues.length) {
    left.aborted = true;
    return left;
  }
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
}
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
  defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
  inst._zod.parse = (payload, ctx) => {
    if (ctx.direction === "backward") {
      return def.innerType._zod.run(payload, ctx);
    }
    const result = def.innerType._zod.run(payload, ctx);
    if (result instanceof Promise) {
      return result.then(handleReadonlyResult);
    }
    return handleReadonlyResult(result);
  };
});
function handleReadonlyResult(payload) {
  payload.value = Object.freeze(payload.value);
  return payload;
}
var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => {
  $ZodType.init(inst, def);
  const regexParts = [];
  for (const part of def.parts) {
    if (typeof part === "object" && part !== null) {
      if (!part._zod.pattern) {
        throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
      }
      const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
      if (!source)
        throw new Error(`Invalid template literal part: ${part._zod.traits}`);
      const start = source.startsWith("^") ? 1 : 0;
      const end = source.endsWith("$") ? source.length - 1 : source.length;
      regexParts.push(source.slice(start, end));
    } else if (part === null || primitiveTypes.has(typeof part)) {
      regexParts.push(escapeRegex(`${part}`));
    } else {
      throw new Error(`Invalid template literal part: ${part}`);
    }
  }
  inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
  inst._zod.parse = (payload, _ctx) => {
    if (typeof payload.value !== "string") {
      payload.issues.push({
        input: payload.value,
        inst,
        expected: "string",
        code: "invalid_type"
      });
      return payload;
    }
    inst._zod.pattern.lastIndex = 0;
    if (!inst._zod.pattern.test(payload.value)) {
      payload.issues.push({
        input: payload.value,
        inst,
        code: "invalid_format",
        format: def.format ?? "template_literal",
        pattern: inst._zod.pattern.source
      });
      return payload;
    }
    return payload;
  };
});
var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
  $ZodType.init(inst, def);
  inst._def = def;
  inst._zod.def = def;
  inst.implement = (func) => {
    if (typeof func !== "function") {
      throw new Error("implement() must be called with a function");
    }
    return function(...args) {
      const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
      const result = Reflect.apply(func, this, parsedArgs);
      if (inst._def.output) {
        return parse(inst._def.output, result);
      }
      return result;
    };
  };
  inst.implementAsync = (func) => {
    if (typeof func !== "function") {
      throw new Error("implementAsync() must be called with a function");
    }
    return async function(...args) {
      const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
      const result = await Reflect.apply(func, this, parsedArgs);
      if (inst._def.output) {
        return await parseAsync(inst._def.output, result);
      }
      return result;
    };
  };
  inst._zod.parse = (payload, _ctx) => {
    if (typeof payload.value !== "function") {
      payload.issues.push({
        code: "invalid_type",
        expected: "function",
        input: payload.value,
        inst
      });
      return payload;
    }
    const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
    if (hasPromiseOutput) {
      payload.value = inst.implementAsync(payload.value);
    } else {
      payload.value = inst.implement(payload.value);
    }
    return payload;
  };
  inst.input = (...args) => {
    const F = inst.constructor;
    if (Array.isArray(args[0])) {
      return new F({
        type: "function",
        input: new $ZodTuple({
          type: "tuple",
          items: args[0],
          rest: args[1]
        }),
        output: inst._def.output
      });
    }
    return new F({
      type: "function",
      input: args[0],
      output: inst._def.output
    });
  };
  inst.output = (output) => {
    const F = inst.constructor;
    return new F({
      type: "function",
      input: inst._def.input,
      output
    });
  };
  return inst;
});
var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx) => {
    return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
  };
});
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "innerType", () => def.getter());
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
  defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? undefined);
  inst._zod.parse = (payload, ctx) => {
    const inner = inst._zod.innerType;
    return inner._zod.run(payload, ctx);
  };
});
var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
  $ZodCheck.init(inst, def);
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _2) => {
    return payload;
  };
  inst._zod.check = (payload) => {
    const input = payload.value;
    const r = def.fn(input);
    if (r instanceof Promise) {
      return r.then((r2) => handleRefineResult(r2, payload, input, inst));
    }
    handleRefineResult(r, payload, input, inst);
    return;
  };
});
function handleRefineResult(result, payload, input, inst) {
  if (!result) {
    const _iss = {
      code: "custom",
      input,
      inst,
      path: [...inst._zod.def.path ?? []],
      continue: !inst._zod.def.abort
    };
    if (inst._zod.def.params)
      _iss.params = inst._zod.def.params;
    payload.issues.push(issue(_iss));
  }
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js
var exports_locales = {};
__export(exports_locales, {
  zhTW: () => zh_TW_default,
  zhCN: () => zh_CN_default,
  yo: () => yo_default,
  vi: () => vi_default,
  uz: () => uz_default,
  ur: () => ur_default,
  uk: () => uk_default,
  ua: () => ua_default,
  tr: () => tr_default,
  th: () => th_default,
  ta: () => ta_default,
  sv: () => sv_default,
  sl: () => sl_default,
  ru: () => ru_default,
  pt: () => pt_default,
  ps: () => ps_default,
  pl: () => pl_default,
  ota: () => ota_default,
  no: () => no_default,
  nl: () => nl_default,
  ms: () => ms_default,
  mk: () => mk_default,
  lt: () => lt_default,
  ko: () => ko_default,
  km: () => km_default,
  kh: () => kh_default,
  ka: () => ka_default,
  ja: () => ja_default,
  it: () => it_default,
  is: () => is_default,
  id: () => id_default,
  hy: () => hy_default,
  hu: () => hu_default,
  he: () => he_default,
  frCA: () => fr_CA_default,
  fr: () => fr_default,
  fi: () => fi_default,
  fa: () => fa_default,
  es: () => es_default,
  eo: () => eo_default,
  en: () => en_default,
  de: () => de_default,
  da: () => da_default,
  cs: () => cs_default,
  ca: () => ca_default,
  bg: () => bg_default,
  be: () => be_default,
  az: () => az_default,
  ar: () => ar_default
});

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js
var error2 = () => {
  const Sizable = {
    string: { unit: "حرف", verb: "أن يحوي" },
    file: { unit: "بايت", verb: "أن يحوي" },
    array: { unit: "عنصر", verb: "أن يحوي" },
    set: { unit: "عنصر", verb: "أن يحوي" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "مدخل",
    email: "بريد إلكتروني",
    url: "رابط",
    emoji: "إيموجي",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "تاريخ ووقت بمعيار ISO",
    date: "تاريخ بمعيار ISO",
    time: "وقت بمعيار ISO",
    duration: "مدة بمعيار ISO",
    ipv4: "عنوان IPv4",
    ipv6: "عنوان IPv6",
    cidrv4: "مدى عناوين بصيغة IPv4",
    cidrv6: "مدى عناوين بصيغة IPv6",
    base64: "نَص بترميز base64-encoded",
    base64url: "نَص بترميز base64url-encoded",
    json_string: "نَص على هيئة JSON",
    e164: "رقم هاتف بمعيار E.164",
    jwt: "JWT",
    template_literal: "مدخل"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `مدخلات غير مقبولة: يفترض إدخال instanceof ${issue2.expected}، ولكن تم إدخال ${received}`;
        }
        return `مدخلات غير مقبولة: يفترض إدخال ${expected}، ولكن تم إدخال ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue2.values[0])}`;
        return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return ` أكبر من اللازم: يفترض أن تكون ${issue2.origin ?? "القيمة"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "عنصر"}`;
        return `أكبر من اللازم: يفترض أن تكون ${issue2.origin ?? "القيمة"} ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `أصغر من اللازم: يفترض لـ ${issue2.origin} أن يكون ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `أصغر من اللازم: يفترض لـ ${issue2.origin} أن يكون ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `نَص غير مقبول: يجب أن يبدأ بـ "${issue2.prefix}"`;
        if (_issue.format === "ends_with")
          return `نَص غير مقبول: يجب أن ينتهي بـ "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `نَص غير مقبول: يجب أن يتضمَّن "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `نَص غير مقبول: يجب أن يطابق النمط ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} غير مقبول`;
      }
      case "not_multiple_of":
        return `رقم غير مقبول: يجب أن يكون من مضاعفات ${issue2.divisor}`;
      case "unrecognized_keys":
        return `معرف${issue2.keys.length > 1 ? "ات" : ""} غريب${issue2.keys.length > 1 ? "ة" : ""}: ${joinValues(issue2.keys, "، ")}`;
      case "invalid_key":
        return `معرف غير مقبول في ${issue2.origin}`;
      case "invalid_union":
        return "مدخل غير مقبول";
      case "invalid_element":
        return `مدخل غير مقبول في ${issue2.origin}`;
      default:
        return "مدخل غير مقبول";
    }
  };
};
function ar_default() {
  return {
    localeError: error2()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js
var error3 = () => {
  const Sizable = {
    string: { unit: "simvol", verb: "olmalıdır" },
    file: { unit: "bayt", verb: "olmalıdır" },
    array: { unit: "element", verb: "olmalıdır" },
    set: { unit: "element", verb: "olmalıdır" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "email address",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datetime",
    date: "ISO date",
    time: "ISO time",
    duration: "ISO duration",
    ipv4: "IPv4 address",
    ipv6: "IPv6 address",
    cidrv4: "IPv4 range",
    cidrv6: "IPv6 range",
    base64: "base64-encoded string",
    base64url: "base64url-encoded string",
    json_string: "JSON string",
    e164: "E.164 number",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Yanlış dəyər: gözlənilən instanceof ${issue2.expected}, daxil olan ${received}`;
        }
        return `Yanlış dəyər: gözlənilən ${expected}, daxil olan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue2.values[0])}`;
        return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Çox böyük: gözlənilən ${issue2.origin ?? "dəyər"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`;
        return `Çox böyük: gözlənilən ${issue2.origin ?? "dəyər"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Çox kiçik: gözlənilən ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        return `Çox kiçik: gözlənilən ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Yanlış mətn: "${_issue.prefix}" ilə başlamalıdır`;
        if (_issue.format === "ends_with")
          return `Yanlış mətn: "${_issue.suffix}" ilə bitməlidir`;
        if (_issue.format === "includes")
          return `Yanlış mətn: "${_issue.includes}" daxil olmalıdır`;
        if (_issue.format === "regex")
          return `Yanlış mətn: ${_issue.pattern} şablonuna uyğun olmalıdır`;
        return `Yanlış ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Yanlış ədəd: ${issue2.divisor} ilə bölünə bilən olmalıdır`;
      case "unrecognized_keys":
        return `Tanınmayan açar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} daxilində yanlış açar`;
      case "invalid_union":
        return "Yanlış dəyər";
      case "invalid_element":
        return `${issue2.origin} daxilində yanlış dəyər`;
      default:
        return `Yanlış dəyər`;
    }
  };
};
function az_default() {
  return {
    localeError: error3()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js
function getBelarusianPlural(count2, one, few, many) {
  const absCount = Math.abs(count2);
  const lastDigit = absCount % 10;
  const lastTwoDigits = absCount % 100;
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
    return many;
  }
  if (lastDigit === 1) {
    return one;
  }
  if (lastDigit >= 2 && lastDigit <= 4) {
    return few;
  }
  return many;
}
var error4 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "сімвал",
        few: "сімвалы",
        many: "сімвалаў"
      },
      verb: "мець"
    },
    array: {
      unit: {
        one: "элемент",
        few: "элементы",
        many: "элементаў"
      },
      verb: "мець"
    },
    set: {
      unit: {
        one: "элемент",
        few: "элементы",
        many: "элементаў"
      },
      verb: "мець"
    },
    file: {
      unit: {
        one: "байт",
        few: "байты",
        many: "байтаў"
      },
      verb: "мець"
    }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "увод",
    email: "email адрас",
    url: "URL",
    emoji: "эмодзі",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO дата і час",
    date: "ISO дата",
    time: "ISO час",
    duration: "ISO працягласць",
    ipv4: "IPv4 адрас",
    ipv6: "IPv6 адрас",
    cidrv4: "IPv4 дыяпазон",
    cidrv6: "IPv6 дыяпазон",
    base64: "радок у фармаце base64",
    base64url: "радок у фармаце base64url",
    json_string: "JSON радок",
    e164: "нумар E.164",
    jwt: "JWT",
    template_literal: "увод"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "лік",
    array: "масіў"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Няправільны ўвод: чакаўся instanceof ${issue2.expected}, атрымана ${received}`;
        }
        return `Няправільны ўвод: чакаўся ${expected}, атрымана ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue2.values[0])}`;
        return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const maxValue = Number(issue2.maximum);
          const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `Занадта вялікі: чакалася, што ${issue2.origin ?? "значэнне"} павінна ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`;
        }
        return `Занадта вялікі: чакалася, што ${issue2.origin ?? "значэнне"} павінна быць ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const minValue = Number(issue2.minimum);
          const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `Занадта малы: чакалася, што ${issue2.origin} павінна ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`;
        }
        return `Занадта малы: чакалася, што ${issue2.origin} павінна быць ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Няправільны радок: павінен пачынацца з "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Няправільны радок: павінен заканчвацца на "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Няправільны радок: павінен змяшчаць "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Няправільны радок: павінен адпавядаць шаблону ${_issue.pattern}`;
        return `Няправільны ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Няправільны лік: павінен быць кратным ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Нераспазнаны ${issue2.keys.length > 1 ? "ключы" : "ключ"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Няправільны ключ у ${issue2.origin}`;
      case "invalid_union":
        return "Няправільны ўвод";
      case "invalid_element":
        return `Няправільнае значэнне ў ${issue2.origin}`;
      default:
        return `Няправільны ўвод`;
    }
  };
};
function be_default() {
  return {
    localeError: error4()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js
var error5 = () => {
  const Sizable = {
    string: { unit: "символа", verb: "да съдържа" },
    file: { unit: "байта", verb: "да съдържа" },
    array: { unit: "елемента", verb: "да съдържа" },
    set: { unit: "елемента", verb: "да съдържа" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "вход",
    email: "имейл адрес",
    url: "URL",
    emoji: "емоджи",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO време",
    date: "ISO дата",
    time: "ISO време",
    duration: "ISO продължителност",
    ipv4: "IPv4 адрес",
    ipv6: "IPv6 адрес",
    cidrv4: "IPv4 диапазон",
    cidrv6: "IPv6 диапазон",
    base64: "base64-кодиран низ",
    base64url: "base64url-кодиран низ",
    json_string: "JSON низ",
    e164: "E.164 номер",
    jwt: "JWT",
    template_literal: "вход"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "число",
    array: "масив"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Невалиден вход: очакван instanceof ${issue2.expected}, получен ${received}`;
        }
        return `Невалиден вход: очакван ${expected}, получен ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Невалиден вход: очакван ${stringifyPrimitive(issue2.values[0])}`;
        return `Невалидна опция: очаквано едно от ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Твърде голямо: очаква се ${issue2.origin ?? "стойност"} да съдържа ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "елемента"}`;
        return `Твърде голямо: очаква се ${issue2.origin ?? "стойност"} да бъде ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Твърде малко: очаква се ${issue2.origin} да съдържа ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Твърде малко: очаква се ${issue2.origin} да бъде ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Невалиден низ: трябва да започва с "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Невалиден низ: трябва да завършва с "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Невалиден низ: трябва да включва "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Невалиден низ: трябва да съвпада с ${_issue.pattern}`;
        let invalid_adj = "Невалиден";
        if (_issue.format === "emoji")
          invalid_adj = "Невалидно";
        if (_issue.format === "datetime")
          invalid_adj = "Невалидно";
        if (_issue.format === "date")
          invalid_adj = "Невалидна";
        if (_issue.format === "time")
          invalid_adj = "Невалидно";
        if (_issue.format === "duration")
          invalid_adj = "Невалидна";
        return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Невалидно число: трябва да бъде кратно на ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Неразпознат${issue2.keys.length > 1 ? "и" : ""} ключ${issue2.keys.length > 1 ? "ове" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Невалиден ключ в ${issue2.origin}`;
      case "invalid_union":
        return "Невалиден вход";
      case "invalid_element":
        return `Невалидна стойност в ${issue2.origin}`;
      default:
        return `Невалиден вход`;
    }
  };
};
function bg_default() {
  return {
    localeError: error5()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js
var error6 = () => {
  const Sizable = {
    string: { unit: "caràcters", verb: "contenir" },
    file: { unit: "bytes", verb: "contenir" },
    array: { unit: "elements", verb: "contenir" },
    set: { unit: "elements", verb: "contenir" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entrada",
    email: "adreça electrònica",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data i hora ISO",
    date: "data ISO",
    time: "hora ISO",
    duration: "durada ISO",
    ipv4: "adreça IPv4",
    ipv6: "adreça IPv6",
    cidrv4: "rang IPv4",
    cidrv6: "rang IPv6",
    base64: "cadena codificada en base64",
    base64url: "cadena codificada en base64url",
    json_string: "cadena JSON",
    e164: "número E.164",
    jwt: "JWT",
    template_literal: "entrada"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Tipus invàlid: s'esperava instanceof ${issue2.expected}, s'ha rebut ${received}`;
        }
        return `Tipus invàlid: s'esperava ${expected}, s'ha rebut ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Valor invàlid: s'esperava ${stringifyPrimitive(issue2.values[0])}`;
        return `Opció invàlida: s'esperava una de ${joinValues(issue2.values, " o ")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "com a màxim" : "menys de";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingués ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`;
        return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "com a mínim" : "més de";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Massa petit: s'esperava que ${issue2.origin} contingués ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Format invàlid: ha de començar amb "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Format invàlid: ha d'acabar amb "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Format invàlid: ha d'incloure "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Format invàlid: ha de coincidir amb el patró ${_issue.pattern}`;
        return `Format invàlid per a ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Número invàlid: ha de ser múltiple de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Clau invàlida a ${issue2.origin}`;
      case "invalid_union":
        return "Entrada invàlida";
      case "invalid_element":
        return `Element invàlid a ${issue2.origin}`;
      default:
        return `Entrada invàlida`;
    }
  };
};
function ca_default() {
  return {
    localeError: error6()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js
var error7 = () => {
  const Sizable = {
    string: { unit: "znaků", verb: "mít" },
    file: { unit: "bajtů", verb: "mít" },
    array: { unit: "prvků", verb: "mít" },
    set: { unit: "prvků", verb: "mít" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "regulární výraz",
    email: "e-mailová adresa",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "datum a čas ve formátu ISO",
    date: "datum ve formátu ISO",
    time: "čas ve formátu ISO",
    duration: "doba trvání ISO",
    ipv4: "IPv4 adresa",
    ipv6: "IPv6 adresa",
    cidrv4: "rozsah IPv4",
    cidrv6: "rozsah IPv6",
    base64: "řetězec zakódovaný ve formátu base64",
    base64url: "řetězec zakódovaný ve formátu base64url",
    json_string: "řetězec ve formátu JSON",
    e164: "číslo E.164",
    jwt: "JWT",
    template_literal: "vstup"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "číslo",
    string: "řetězec",
    function: "funkce",
    array: "pole"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Neplatný vstup: očekáváno instanceof ${issue2.expected}, obdrženo ${received}`;
        }
        return `Neplatný vstup: očekáváno ${expected}, obdrženo ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue2.values[0])}`;
        return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Hodnota je příliš velká: ${issue2.origin ?? "hodnota"} musí mít ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvků"}`;
        }
        return `Hodnota je příliš velká: ${issue2.origin ?? "hodnota"} musí být ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Hodnota je příliš malá: ${issue2.origin ?? "hodnota"} musí mít ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvků"}`;
        }
        return `Hodnota je příliš malá: ${issue2.origin ?? "hodnota"} musí být ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Neplatný řetězec: musí začínat na "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Neplatný řetězec: musí končit na "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Neplatný řetězec: musí obsahovat "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Neplatný řetězec: musí odpovídat vzoru ${_issue.pattern}`;
        return `Neplatný formát ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Neplatné číslo: musí být násobkem ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Neznámé klíče: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Neplatný klíč v ${issue2.origin}`;
      case "invalid_union":
        return "Neplatný vstup";
      case "invalid_element":
        return `Neplatná hodnota v ${issue2.origin}`;
      default:
        return `Neplatný vstup`;
    }
  };
};
function cs_default() {
  return {
    localeError: error7()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js
var error8 = () => {
  const Sizable = {
    string: { unit: "tegn", verb: "havde" },
    file: { unit: "bytes", verb: "havde" },
    array: { unit: "elementer", verb: "indeholdt" },
    set: { unit: "elementer", verb: "indeholdt" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "e-mailadresse",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO dato- og klokkeslæt",
    date: "ISO-dato",
    time: "ISO-klokkeslæt",
    duration: "ISO-varighed",
    ipv4: "IPv4-område",
    ipv6: "IPv6-område",
    cidrv4: "IPv4-spektrum",
    cidrv6: "IPv6-spektrum",
    base64: "base64-kodet streng",
    base64url: "base64url-kodet streng",
    json_string: "JSON-streng",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    string: "streng",
    number: "tal",
    boolean: "boolean",
    array: "liste",
    object: "objekt",
    set: "sæt",
    file: "fil"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ugyldigt input: forventede instanceof ${issue2.expected}, fik ${received}`;
        }
        return `Ugyldigt input: forventede ${expected}, fik ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ugyldig værdi: forventede ${stringifyPrimitive(issue2.values[0])}`;
        return `Ugyldigt valg: forventede en af følgende ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing)
          return `For stor: forventede ${origin ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
        return `For stor: forventede ${origin ?? "value"} havde ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing) {
          return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `For lille: forventede ${origin} havde ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ugyldig streng: skal starte med "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Ugyldig streng: skal ende med "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ugyldig streng: skal indeholde "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ugyldig streng: skal matche mønsteret ${_issue.pattern}`;
        return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ugyldigt tal: skal være deleligt med ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Ukendte nøgler" : "Ukendt nøgle"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ugyldig nøgle i ${issue2.origin}`;
      case "invalid_union":
        return "Ugyldigt input: matcher ingen af de tilladte typer";
      case "invalid_element":
        return `Ugyldig værdi i ${issue2.origin}`;
      default:
        return `Ugyldigt input`;
    }
  };
};
function da_default() {
  return {
    localeError: error8()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js
var error9 = () => {
  const Sizable = {
    string: { unit: "Zeichen", verb: "zu haben" },
    file: { unit: "Bytes", verb: "zu haben" },
    array: { unit: "Elemente", verb: "zu haben" },
    set: { unit: "Elemente", verb: "zu haben" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "Eingabe",
    email: "E-Mail-Adresse",
    url: "URL",
    emoji: "Emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-Datum und -Uhrzeit",
    date: "ISO-Datum",
    time: "ISO-Uhrzeit",
    duration: "ISO-Dauer",
    ipv4: "IPv4-Adresse",
    ipv6: "IPv6-Adresse",
    cidrv4: "IPv4-Bereich",
    cidrv6: "IPv6-Bereich",
    base64: "Base64-codierter String",
    base64url: "Base64-URL-codierter String",
    json_string: "JSON-String",
    e164: "E.164-Nummer",
    jwt: "JWT",
    template_literal: "Eingabe"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "Zahl",
    array: "Array"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ungültige Eingabe: erwartet instanceof ${issue2.expected}, erhalten ${received}`;
        }
        return `Ungültige Eingabe: erwartet ${expected}, erhalten ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`;
        return `Ungültige Option: erwartet eine von ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Zu groß: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`;
        return `Zu groß: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`;
        }
        return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ungültiger String: muss mit "${_issue.prefix}" beginnen`;
        if (_issue.format === "ends_with")
          return `Ungültiger String: muss mit "${_issue.suffix}" enden`;
        if (_issue.format === "includes")
          return `Ungültiger String: muss "${_issue.includes}" enthalten`;
        if (_issue.format === "regex")
          return `Ungültiger String: muss dem Muster ${_issue.pattern} entsprechen`;
        return `Ungültig: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ungültige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Unbekannte Schlüssel" : "Unbekannter Schlüssel"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ungültiger Schlüssel in ${issue2.origin}`;
      case "invalid_union":
        return "Ungültige Eingabe";
      case "invalid_element":
        return `Ungültiger Wert in ${issue2.origin}`;
      default:
        return `Ungültige Eingabe`;
    }
  };
};
function de_default() {
  return {
    localeError: error9()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js
var error10 = () => {
  const Sizable = {
    string: { unit: "characters", verb: "to have" },
    file: { unit: "bytes", verb: "to have" },
    array: { unit: "items", verb: "to have" },
    set: { unit: "items", verb: "to have" },
    map: { unit: "entries", verb: "to have" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "email address",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datetime",
    date: "ISO date",
    time: "ISO time",
    duration: "ISO duration",
    ipv4: "IPv4 address",
    ipv6: "IPv6 address",
    mac: "MAC address",
    cidrv4: "IPv4 range",
    cidrv6: "IPv6 range",
    base64: "base64-encoded string",
    base64url: "base64url-encoded string",
    json_string: "JSON string",
    e164: "E.164 number",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        return `Invalid input: expected ${expected}, received ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
        return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`;
        return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Invalid string: must start with "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Invalid string: must end with "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Invalid string: must include "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Invalid string: must match pattern ${_issue.pattern}`;
        return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Invalid number: must be a multiple of ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Invalid key in ${issue2.origin}`;
      case "invalid_union":
        return "Invalid input";
      case "invalid_element":
        return `Invalid value in ${issue2.origin}`;
      default:
        return `Invalid input`;
    }
  };
};
function en_default() {
  return {
    localeError: error10()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js
var error11 = () => {
  const Sizable = {
    string: { unit: "karaktrojn", verb: "havi" },
    file: { unit: "bajtojn", verb: "havi" },
    array: { unit: "elementojn", verb: "havi" },
    set: { unit: "elementojn", verb: "havi" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "enigo",
    email: "retadreso",
    url: "URL",
    emoji: "emoĝio",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-datotempo",
    date: "ISO-dato",
    time: "ISO-tempo",
    duration: "ISO-daŭro",
    ipv4: "IPv4-adreso",
    ipv6: "IPv6-adreso",
    cidrv4: "IPv4-rango",
    cidrv6: "IPv6-rango",
    base64: "64-ume kodita karaktraro",
    base64url: "URL-64-ume kodita karaktraro",
    json_string: "JSON-karaktraro",
    e164: "E.164-nombro",
    jwt: "JWT",
    template_literal: "enigo"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "nombro",
    array: "tabelo",
    null: "senvalora"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Nevalida enigo: atendiĝis instanceof ${issue2.expected}, riceviĝis ${received}`;
        }
        return `Nevalida enigo: atendiĝis ${expected}, riceviĝis ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue2.values[0])}`;
        return `Nevalida opcio: atendiĝis unu el ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Tro granda: atendiĝis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
        return `Tro granda: atendiĝis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Tro malgranda: atendiĝis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Tro malgranda: atendiĝis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
        return `Nevalida ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Nekonata${issue2.keys.length > 1 ? "j" : ""} ŝlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Nevalida ŝlosilo en ${issue2.origin}`;
      case "invalid_union":
        return "Nevalida enigo";
      case "invalid_element":
        return `Nevalida valoro en ${issue2.origin}`;
      default:
        return `Nevalida enigo`;
    }
  };
};
function eo_default() {
  return {
    localeError: error11()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js
var error12 = () => {
  const Sizable = {
    string: { unit: "caracteres", verb: "tener" },
    file: { unit: "bytes", verb: "tener" },
    array: { unit: "elementos", verb: "tener" },
    set: { unit: "elementos", verb: "tener" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entrada",
    email: "dirección de correo electrónico",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "fecha y hora ISO",
    date: "fecha ISO",
    time: "hora ISO",
    duration: "duración ISO",
    ipv4: "dirección IPv4",
    ipv6: "dirección IPv6",
    cidrv4: "rango IPv4",
    cidrv6: "rango IPv6",
    base64: "cadena codificada en base64",
    base64url: "URL codificada en base64",
    json_string: "cadena JSON",
    e164: "número E.164",
    jwt: "JWT",
    template_literal: "entrada"
  };
  const TypeDictionary = {
    nan: "NaN",
    string: "texto",
    number: "número",
    boolean: "booleano",
    array: "arreglo",
    object: "objeto",
    set: "conjunto",
    file: "archivo",
    date: "fecha",
    bigint: "número grande",
    symbol: "símbolo",
    undefined: "indefinido",
    null: "nulo",
    function: "función",
    map: "mapa",
    record: "registro",
    tuple: "tupla",
    enum: "enumeración",
    union: "unión",
    literal: "literal",
    promise: "promesa",
    void: "vacío",
    never: "nunca",
    unknown: "desconocido",
    any: "cualquiera"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Entrada inválida: se esperaba instanceof ${issue2.expected}, recibido ${received}`;
        }
        return `Entrada inválida: se esperaba ${expected}, recibido ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entrada inválida: se esperaba ${stringifyPrimitive(issue2.values[0])}`;
        return `Opción inválida: se esperaba una de ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing)
          return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
        return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing) {
          return `Demasiado pequeño: se esperaba que ${origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Demasiado pequeño: se esperaba que ${origin} fuera ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Cadena inválida: debe comenzar con "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Cadena inválida: debe terminar en "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Cadena inválida: debe incluir "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Cadena inválida: debe coincidir con el patrón ${_issue.pattern}`;
        return `Inválido ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Número inválido: debe ser múltiplo de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Llave inválida en ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
      case "invalid_union":
        return "Entrada inválida";
      case "invalid_element":
        return `Valor inválido en ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
      default:
        return `Entrada inválida`;
    }
  };
};
function es_default() {
  return {
    localeError: error12()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js
var error13 = () => {
  const Sizable = {
    string: { unit: "کاراکتر", verb: "داشته باشد" },
    file: { unit: "بایت", verb: "داشته باشد" },
    array: { unit: "آیتم", verb: "داشته باشد" },
    set: { unit: "آیتم", verb: "داشته باشد" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "ورودی",
    email: "آدرس ایمیل",
    url: "URL",
    emoji: "ایموجی",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "تاریخ و زمان ایزو",
    date: "تاریخ ایزو",
    time: "زمان ایزو",
    duration: "مدت زمان ایزو",
    ipv4: "IPv4 آدرس",
    ipv6: "IPv6 آدرس",
    cidrv4: "IPv4 دامنه",
    cidrv6: "IPv6 دامنه",
    base64: "base64-encoded رشته",
    base64url: "base64url-encoded رشته",
    json_string: "JSON رشته",
    e164: "E.164 عدد",
    jwt: "JWT",
    template_literal: "ورودی"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "عدد",
    array: "آرایه"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `ورودی نامعتبر: می‌بایست instanceof ${issue2.expected} می‌بود، ${received} دریافت شد`;
        }
        return `ورودی نامعتبر: می‌بایست ${expected} می‌بود، ${received} دریافت شد`;
      }
      case "invalid_value":
        if (issue2.values.length === 1) {
          return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue2.values[0])} می‌بود`;
        }
        return `گزینه نامعتبر: می‌بایست یکی از ${joinValues(issue2.values, "|")} می‌بود`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `خیلی بزرگ: ${issue2.origin ?? "مقدار"} باید ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "عنصر"} باشد`;
        }
        return `خیلی بزرگ: ${issue2.origin ?? "مقدار"} باید ${adj}${issue2.maximum.toString()} باشد`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `خیلی کوچک: ${issue2.origin} باید ${adj}${issue2.minimum.toString()} ${sizing.unit} باشد`;
        }
        return `خیلی کوچک: ${issue2.origin} باید ${adj}${issue2.minimum.toString()} باشد`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `رشته نامعتبر: باید با "${_issue.prefix}" شروع شود`;
        }
        if (_issue.format === "ends_with") {
          return `رشته نامعتبر: باید با "${_issue.suffix}" تمام شود`;
        }
        if (_issue.format === "includes") {
          return `رشته نامعتبر: باید شامل "${_issue.includes}" باشد`;
        }
        if (_issue.format === "regex") {
          return `رشته نامعتبر: باید با الگوی ${_issue.pattern} مطابقت داشته باشد`;
        }
        return `${FormatDictionary[_issue.format] ?? issue2.format} نامعتبر`;
      }
      case "not_multiple_of":
        return `عدد نامعتبر: باید مضرب ${issue2.divisor} باشد`;
      case "unrecognized_keys":
        return `کلید${issue2.keys.length > 1 ? "های" : ""} ناشناس: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `کلید ناشناس در ${issue2.origin}`;
      case "invalid_union":
        return `ورودی نامعتبر`;
      case "invalid_element":
        return `مقدار نامعتبر در ${issue2.origin}`;
      default:
        return `ورودی نامعتبر`;
    }
  };
};
function fa_default() {
  return {
    localeError: error13()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js
var error14 = () => {
  const Sizable = {
    string: { unit: "merkkiä", subject: "merkkijonon" },
    file: { unit: "tavua", subject: "tiedoston" },
    array: { unit: "alkiota", subject: "listan" },
    set: { unit: "alkiota", subject: "joukon" },
    number: { unit: "", subject: "luvun" },
    bigint: { unit: "", subject: "suuren kokonaisluvun" },
    int: { unit: "", subject: "kokonaisluvun" },
    date: { unit: "", subject: "päivämäärän" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "säännöllinen lauseke",
    email: "sähköpostiosoite",
    url: "URL-osoite",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-aikaleima",
    date: "ISO-päivämäärä",
    time: "ISO-aika",
    duration: "ISO-kesto",
    ipv4: "IPv4-osoite",
    ipv6: "IPv6-osoite",
    cidrv4: "IPv4-alue",
    cidrv6: "IPv6-alue",
    base64: "base64-koodattu merkkijono",
    base64url: "base64url-koodattu merkkijono",
    json_string: "JSON-merkkijono",
    e164: "E.164-luku",
    jwt: "JWT",
    template_literal: "templaattimerkkijono"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Virheellinen tyyppi: odotettiin instanceof ${issue2.expected}, oli ${received}`;
        }
        return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue2.values[0])}`;
        return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Liian suuri: ${sizing.subject} täytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim();
        }
        return `Liian suuri: arvon täytyy olla ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Liian pieni: ${sizing.subject} täytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim();
        }
        return `Liian pieni: arvon täytyy olla ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Virheellinen syöte: täytyy alkaa "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Virheellinen syöte: täytyy loppua "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Virheellinen syöte: täytyy sisältää "${_issue.includes}"`;
        if (_issue.format === "regex") {
          return `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${_issue.pattern}`;
        }
        return `Virheellinen ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Virheellinen luku: täytyy olla luvun ${issue2.divisor} monikerta`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return "Virheellinen avain tietueessa";
      case "invalid_union":
        return "Virheellinen unioni";
      case "invalid_element":
        return "Virheellinen arvo joukossa";
      default:
        return `Virheellinen syöte`;
    }
  };
};
function fi_default() {
  return {
    localeError: error14()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js
var error15 = () => {
  const Sizable = {
    string: { unit: "caractères", verb: "avoir" },
    file: { unit: "octets", verb: "avoir" },
    array: { unit: "éléments", verb: "avoir" },
    set: { unit: "éléments", verb: "avoir" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entrée",
    email: "adresse e-mail",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "date et heure ISO",
    date: "date ISO",
    time: "heure ISO",
    duration: "durée ISO",
    ipv4: "adresse IPv4",
    ipv6: "adresse IPv6",
    cidrv4: "plage IPv4",
    cidrv6: "plage IPv6",
    base64: "chaîne encodée en base64",
    base64url: "chaîne encodée en base64url",
    json_string: "chaîne JSON",
    e164: "numéro E.164",
    jwt: "JWT",
    template_literal: "entrée"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "nombre",
    array: "tableau"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Entrée invalide : instanceof ${issue2.expected} attendu, ${received} reçu`;
        }
        return `Entrée invalide : ${expected} attendu, ${received} reçu`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entrée invalide : ${stringifyPrimitive(issue2.values[0])} attendu`;
        return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
        return `Trop grand : ${issue2.origin ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Trop petit : ${issue2.origin} doit être ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Chaîne invalide : doit inclure "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Chaîne invalide : doit correspondre au modèle ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`;
      }
      case "not_multiple_of":
        return `Nombre invalide : doit être un multiple de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Clé${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Clé invalide dans ${issue2.origin}`;
      case "invalid_union":
        return "Entrée invalide";
      case "invalid_element":
        return `Valeur invalide dans ${issue2.origin}`;
      default:
        return `Entrée invalide`;
    }
  };
};
function fr_default() {
  return {
    localeError: error15()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
var error16 = () => {
  const Sizable = {
    string: { unit: "caractères", verb: "avoir" },
    file: { unit: "octets", verb: "avoir" },
    array: { unit: "éléments", verb: "avoir" },
    set: { unit: "éléments", verb: "avoir" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entrée",
    email: "adresse courriel",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "date-heure ISO",
    date: "date ISO",
    time: "heure ISO",
    duration: "durée ISO",
    ipv4: "adresse IPv4",
    ipv6: "adresse IPv6",
    cidrv4: "plage IPv4",
    cidrv6: "plage IPv6",
    base64: "chaîne encodée en base64",
    base64url: "chaîne encodée en base64url",
    json_string: "chaîne JSON",
    e164: "numéro E.164",
    jwt: "JWT",
    template_literal: "entrée"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Entrée invalide : attendu instanceof ${issue2.expected}, reçu ${received}`;
        }
        return `Entrée invalide : attendu ${expected}, reçu ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entrée invalide : attendu ${stringifyPrimitive(issue2.values[0])}`;
        return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "≤" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
        return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "≥" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Chaîne invalide : doit inclure "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Chaîne invalide : doit correspondre au motif ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`;
      }
      case "not_multiple_of":
        return `Nombre invalide : doit être un multiple de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Clé${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Clé invalide dans ${issue2.origin}`;
      case "invalid_union":
        return "Entrée invalide";
      case "invalid_element":
        return `Valeur invalide dans ${issue2.origin}`;
      default:
        return `Entrée invalide`;
    }
  };
};
function fr_CA_default() {
  return {
    localeError: error16()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js
var error17 = () => {
  const TypeNames = {
    string: { label: "מחרוזת", gender: "f" },
    number: { label: "מספר", gender: "m" },
    boolean: { label: "ערך בוליאני", gender: "m" },
    bigint: { label: "BigInt", gender: "m" },
    date: { label: "תאריך", gender: "m" },
    array: { label: "מערך", gender: "m" },
    object: { label: "אובייקט", gender: "m" },
    null: { label: "ערך ריק (null)", gender: "m" },
    undefined: { label: "ערך לא מוגדר (undefined)", gender: "m" },
    symbol: { label: "סימבול (Symbol)", gender: "m" },
    function: { label: "פונקציה", gender: "f" },
    map: { label: "מפה (Map)", gender: "f" },
    set: { label: "קבוצה (Set)", gender: "f" },
    file: { label: "קובץ", gender: "m" },
    promise: { label: "Promise", gender: "m" },
    NaN: { label: "NaN", gender: "m" },
    unknown: { label: "ערך לא ידוע", gender: "m" },
    value: { label: "ערך", gender: "m" }
  };
  const Sizable = {
    string: { unit: "תווים", shortLabel: "קצר", longLabel: "ארוך" },
    file: { unit: "בייטים", shortLabel: "קטן", longLabel: "גדול" },
    array: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
    set: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
    number: { unit: "", shortLabel: "קטן", longLabel: "גדול" }
  };
  const typeEntry = (t) => t ? TypeNames[t] : undefined;
  const typeLabel = (t) => {
    const e = typeEntry(t);
    if (e)
      return e.label;
    return t ?? TypeNames.unknown.label;
  };
  const withDefinite = (t) => `ה${typeLabel(t)}`;
  const verbFor = (t) => {
    const e = typeEntry(t);
    const gender = e?.gender ?? "m";
    return gender === "f" ? "צריכה להיות" : "צריך להיות";
  };
  const getSizing = (origin) => {
    if (!origin)
      return null;
    return Sizable[origin] ?? null;
  };
  const FormatDictionary = {
    regex: { label: "קלט", gender: "m" },
    email: { label: "כתובת אימייל", gender: "f" },
    url: { label: "כתובת רשת", gender: "f" },
    emoji: { label: "אימוג'י", gender: "m" },
    uuid: { label: "UUID", gender: "m" },
    nanoid: { label: "nanoid", gender: "m" },
    guid: { label: "GUID", gender: "m" },
    cuid: { label: "cuid", gender: "m" },
    cuid2: { label: "cuid2", gender: "m" },
    ulid: { label: "ULID", gender: "m" },
    xid: { label: "XID", gender: "m" },
    ksuid: { label: "KSUID", gender: "m" },
    datetime: { label: "תאריך וזמן ISO", gender: "m" },
    date: { label: "תאריך ISO", gender: "m" },
    time: { label: "זמן ISO", gender: "m" },
    duration: { label: "משך זמן ISO", gender: "m" },
    ipv4: { label: "כתובת IPv4", gender: "f" },
    ipv6: { label: "כתובת IPv6", gender: "f" },
    cidrv4: { label: "טווח IPv4", gender: "m" },
    cidrv6: { label: "טווח IPv6", gender: "m" },
    base64: { label: "מחרוזת בבסיס 64", gender: "f" },
    base64url: { label: "מחרוזת בבסיס 64 לכתובות רשת", gender: "f" },
    json_string: { label: "מחרוזת JSON", gender: "f" },
    e164: { label: "מספר E.164", gender: "m" },
    jwt: { label: "JWT", gender: "m" },
    ends_with: { label: "קלט", gender: "m" },
    includes: { label: "קלט", gender: "m" },
    lowercase: { label: "קלט", gender: "m" },
    starts_with: { label: "קלט", gender: "m" },
    uppercase: { label: "קלט", gender: "m" }
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expectedKey = issue2.expected;
        const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey);
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `קלט לא תקין: צריך להיות instanceof ${issue2.expected}, התקבל ${received}`;
        }
        return `קלט לא תקין: צריך להיות ${expected}, התקבל ${received}`;
      }
      case "invalid_value": {
        if (issue2.values.length === 1) {
          return `ערך לא תקין: הערך חייב להיות ${stringifyPrimitive(issue2.values[0])}`;
        }
        const stringified = issue2.values.map((v2) => stringifyPrimitive(v2));
        if (issue2.values.length === 2) {
          return `ערך לא תקין: האפשרויות המתאימות הן ${stringified[0]} או ${stringified[1]}`;
        }
        const lastValue = stringified[stringified.length - 1];
        const restValues = stringified.slice(0, -1).join(", ");
        return `ערך לא תקין: האפשרויות המתאימות הן ${restValues} או ${lastValue}`;
      }
      case "too_big": {
        const sizing = getSizing(issue2.origin);
        const subject = withDefinite(issue2.origin ?? "value");
        if (issue2.origin === "string") {
          return `${sizing?.longLabel ?? "ארוך"} מדי: ${subject} צריכה להכיל ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "או פחות" : "לכל היותר"}`.trim();
        }
        if (issue2.origin === "number") {
          const comparison = issue2.inclusive ? `קטן או שווה ל-${issue2.maximum}` : `קטן מ-${issue2.maximum}`;
          return `גדול מדי: ${subject} צריך להיות ${comparison}`;
        }
        if (issue2.origin === "array" || issue2.origin === "set") {
          const verb = issue2.origin === "set" ? "צריכה" : "צריך";
          const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} או פחות` : `פחות מ-${issue2.maximum} ${sizing?.unit ?? ""}`;
          return `גדול מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
        }
        const adj = issue2.inclusive ? "<=" : "<";
        const be = verbFor(issue2.origin ?? "value");
        if (sizing?.unit) {
          return `${sizing.longLabel} מדי: ${subject} ${be} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
        }
        return `${sizing?.longLabel ?? "גדול"} מדי: ${subject} ${be} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const sizing = getSizing(issue2.origin);
        const subject = withDefinite(issue2.origin ?? "value");
        if (issue2.origin === "string") {
          return `${sizing?.shortLabel ?? "קצר"} מדי: ${subject} צריכה להכיל ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "או יותר" : "לפחות"}`.trim();
        }
        if (issue2.origin === "number") {
          const comparison = issue2.inclusive ? `גדול או שווה ל-${issue2.minimum}` : `גדול מ-${issue2.minimum}`;
          return `קטן מדי: ${subject} צריך להיות ${comparison}`;
        }
        if (issue2.origin === "array" || issue2.origin === "set") {
          const verb = issue2.origin === "set" ? "צריכה" : "צריך";
          if (issue2.minimum === 1 && issue2.inclusive) {
            const singularPhrase = issue2.origin === "set" ? "לפחות פריט אחד" : "לפחות פריט אחד";
            return `קטן מדי: ${subject} ${verb} להכיל ${singularPhrase}`;
          }
          const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} או יותר` : `יותר מ-${issue2.minimum} ${sizing?.unit ?? ""}`;
          return `קטן מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
        }
        const adj = issue2.inclusive ? ">=" : ">";
        const be = verbFor(issue2.origin ?? "value");
        if (sizing?.unit) {
          return `${sizing.shortLabel} מדי: ${subject} ${be} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `${sizing?.shortLabel ?? "קטן"} מדי: ${subject} ${be} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `המחרוזת חייבת להתחיל ב "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `המחרוזת חייבת להסתיים ב "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `המחרוזת חייבת לכלול "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `המחרוזת חייבת להתאים לתבנית ${_issue.pattern}`;
        const nounEntry = FormatDictionary[_issue.format];
        const noun = nounEntry?.label ?? _issue.format;
        const gender = nounEntry?.gender ?? "m";
        const adjective = gender === "f" ? "תקינה" : "תקין";
        return `${noun} לא ${adjective}`;
      }
      case "not_multiple_of":
        return `מספר לא תקין: חייב להיות מכפלה של ${issue2.divisor}`;
      case "unrecognized_keys":
        return `מפתח${issue2.keys.length > 1 ? "ות" : ""} לא מזוה${issue2.keys.length > 1 ? "ים" : "ה"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key": {
        return `שדה לא תקין באובייקט`;
      }
      case "invalid_union":
        return "קלט לא תקין";
      case "invalid_element": {
        const place = withDefinite(issue2.origin ?? "array");
        return `ערך לא תקין ב${place}`;
      }
      default:
        return `קלט לא תקין`;
    }
  };
};
function he_default() {
  return {
    localeError: error17()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js
var error18 = () => {
  const Sizable = {
    string: { unit: "karakter", verb: "legyen" },
    file: { unit: "byte", verb: "legyen" },
    array: { unit: "elem", verb: "legyen" },
    set: { unit: "elem", verb: "legyen" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "bemenet",
    email: "email cím",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO időbélyeg",
    date: "ISO dátum",
    time: "ISO idő",
    duration: "ISO időintervallum",
    ipv4: "IPv4 cím",
    ipv6: "IPv6 cím",
    cidrv4: "IPv4 tartomány",
    cidrv6: "IPv6 tartomány",
    base64: "base64-kódolt string",
    base64url: "base64url-kódolt string",
    json_string: "JSON string",
    e164: "E.164 szám",
    jwt: "JWT",
    template_literal: "bemenet"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "szám",
    array: "tömb"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Érvénytelen bemenet: a várt érték instanceof ${issue2.expected}, a kapott érték ${received}`;
        }
        return `Érvénytelen bemenet: a várt érték ${expected}, a kapott érték ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue2.values[0])}`;
        return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Túl nagy: ${issue2.origin ?? "érték"} mérete túl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
        return `Túl nagy: a bemeneti érték ${issue2.origin ?? "érték"} túl nagy: ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Túl kicsi: a bemeneti érték ${issue2.origin} mérete túl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Túl kicsi: a bemeneti érték ${issue2.origin} túl kicsi ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Érvénytelen string: "${_issue.prefix}" értékkel kell kezdődnie`;
        if (_issue.format === "ends_with")
          return `Érvénytelen string: "${_issue.suffix}" értékkel kell végződnie`;
        if (_issue.format === "includes")
          return `Érvénytelen string: "${_issue.includes}" értéket kell tartalmaznia`;
        if (_issue.format === "regex")
          return `Érvénytelen string: ${_issue.pattern} mintának kell megfelelnie`;
        return `Érvénytelen ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Érvénytelen szám: ${issue2.divisor} többszörösének kell lennie`;
      case "unrecognized_keys":
        return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Érvénytelen kulcs ${issue2.origin}`;
      case "invalid_union":
        return "Érvénytelen bemenet";
      case "invalid_element":
        return `Érvénytelen érték: ${issue2.origin}`;
      default:
        return `Érvénytelen bemenet`;
    }
  };
};
function hu_default() {
  return {
    localeError: error18()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js
function getArmenianPlural(count2, one, many) {
  return Math.abs(count2) === 1 ? one : many;
}
function withDefiniteArticle(word) {
  if (!word)
    return "";
  const vowels = ["ա", "ե", "ը", "ի", "ո", "ու", "օ"];
  const lastChar = word[word.length - 1];
  return word + (vowels.includes(lastChar) ? "ն" : "ը");
}
var error19 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "նշան",
        many: "նշաններ"
      },
      verb: "ունենալ"
    },
    file: {
      unit: {
        one: "բայթ",
        many: "բայթեր"
      },
      verb: "ունենալ"
    },
    array: {
      unit: {
        one: "տարր",
        many: "տարրեր"
      },
      verb: "ունենալ"
    },
    set: {
      unit: {
        one: "տարր",
        many: "տարրեր"
      },
      verb: "ունենալ"
    }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "մուտք",
    email: "էլ. հասցե",
    url: "URL",
    emoji: "էմոջի",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO ամսաթիվ և ժամ",
    date: "ISO ամսաթիվ",
    time: "ISO ժամ",
    duration: "ISO տևողություն",
    ipv4: "IPv4 հասցե",
    ipv6: "IPv6 հասցե",
    cidrv4: "IPv4 միջակայք",
    cidrv6: "IPv6 միջակայք",
    base64: "base64 ձևաչափով տող",
    base64url: "base64url ձևաչափով տող",
    json_string: "JSON տող",
    e164: "E.164 համար",
    jwt: "JWT",
    template_literal: "մուտք"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "թիվ",
    array: "զանգված"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Սխալ մուտքագրում․ սպասվում էր instanceof ${issue2.expected}, ստացվել է ${received}`;
        }
        return `Սխալ մուտքագրում․ սպասվում էր ${expected}, ստացվել է ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Սխալ մուտքագրում․ սպասվում էր ${stringifyPrimitive(issue2.values[1])}`;
        return `Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const maxValue = Number(issue2.maximum);
          const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many);
          return `Չափազանց մեծ արժեք․ սպասվում է, որ ${withDefiniteArticle(issue2.origin ?? "արժեք")} կունենա ${adj}${issue2.maximum.toString()} ${unit}`;
        }
        return `Չափազանց մեծ արժեք․ սպասվում է, որ ${withDefiniteArticle(issue2.origin ?? "արժեք")} լինի ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const minValue = Number(issue2.minimum);
          const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many);
          return `Չափազանց փոքր արժեք․ սպասվում է, որ ${withDefiniteArticle(issue2.origin)} կունենա ${adj}${issue2.minimum.toString()} ${unit}`;
        }
        return `Չափազանց փոքր արժեք․ սպասվում է, որ ${withDefiniteArticle(issue2.origin)} լինի ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Սխալ տող․ պետք է սկսվի "${_issue.prefix}"-ով`;
        if (_issue.format === "ends_with")
          return `Սխալ տող․ պետք է ավարտվի "${_issue.suffix}"-ով`;
        if (_issue.format === "includes")
          return `Սխալ տող․ պետք է պարունակի "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Սխալ տող․ պետք է համապատասխանի ${_issue.pattern} ձևաչափին`;
        return `Սխալ ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Սխալ թիվ․ պետք է բազմապատիկ լինի ${issue2.divisor}-ի`;
      case "unrecognized_keys":
        return `Չճանաչված բանալի${issue2.keys.length > 1 ? "ներ" : ""}. ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Սխալ բանալի ${withDefiniteArticle(issue2.origin)}-ում`;
      case "invalid_union":
        return "Սխալ մուտքագրում";
      case "invalid_element":
        return `Սխալ արժեք ${withDefiniteArticle(issue2.origin)}-ում`;
      default:
        return `Սխալ մուտքագրում`;
    }
  };
};
function hy_default() {
  return {
    localeError: error19()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js
var error20 = () => {
  const Sizable = {
    string: { unit: "karakter", verb: "memiliki" },
    file: { unit: "byte", verb: "memiliki" },
    array: { unit: "item", verb: "memiliki" },
    set: { unit: "item", verb: "memiliki" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "alamat email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "tanggal dan waktu format ISO",
    date: "tanggal format ISO",
    time: "jam format ISO",
    duration: "durasi format ISO",
    ipv4: "alamat IPv4",
    ipv6: "alamat IPv6",
    cidrv4: "rentang alamat IPv4",
    cidrv6: "rentang alamat IPv6",
    base64: "string dengan enkode base64",
    base64url: "string dengan enkode base64url",
    json_string: "string JSON",
    e164: "angka E.164",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Input tidak valid: diharapkan instanceof ${issue2.expected}, diterima ${received}`;
        }
        return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`;
        return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`;
        return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `String tidak valid: harus menyertakan "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `String tidak valid: harus sesuai pola ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} tidak valid`;
      }
      case "not_multiple_of":
        return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Kunci tidak valid di ${issue2.origin}`;
      case "invalid_union":
        return "Input tidak valid";
      case "invalid_element":
        return `Nilai tidak valid di ${issue2.origin}`;
      default:
        return `Input tidak valid`;
    }
  };
};
function id_default() {
  return {
    localeError: error20()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js
var error21 = () => {
  const Sizable = {
    string: { unit: "stafi", verb: "að hafa" },
    file: { unit: "bæti", verb: "að hafa" },
    array: { unit: "hluti", verb: "að hafa" },
    set: { unit: "hluti", verb: "að hafa" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "gildi",
    email: "netfang",
    url: "vefslóð",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO dagsetning og tími",
    date: "ISO dagsetning",
    time: "ISO tími",
    duration: "ISO tímalengd",
    ipv4: "IPv4 address",
    ipv6: "IPv6 address",
    cidrv4: "IPv4 range",
    cidrv6: "IPv6 range",
    base64: "base64-encoded strengur",
    base64url: "base64url-encoded strengur",
    json_string: "JSON strengur",
    e164: "E.164 tölugildi",
    jwt: "JWT",
    template_literal: "gildi"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "númer",
    array: "fylki"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Rangt gildi: Þú slóst inn ${received} þar sem á að vera instanceof ${issue2.expected}`;
        }
        return `Rangt gildi: Þú slóst inn ${received} þar sem á að vera ${expected}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Rangt gildi: gert ráð fyrir ${stringifyPrimitive(issue2.values[0])}`;
        return `Ógilt val: má vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Of stórt: gert er ráð fyrir að ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`;
        return `Of stórt: gert er ráð fyrir að ${issue2.origin ?? "gildi"} sé ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Of lítið: gert er ráð fyrir að ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Of lítið: gert er ráð fyrir að ${issue2.origin} sé ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Ógildur strengur: verður að byrja á "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Ógildur strengur: verður að enda á "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ógildur strengur: verður að innihalda "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ógildur strengur: verður að fylgja mynstri ${_issue.pattern}`;
        return `Rangt ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Röng tala: verður að vera margfeldi af ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Óþekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Rangur lykill í ${issue2.origin}`;
      case "invalid_union":
        return "Rangt gildi";
      case "invalid_element":
        return `Rangt gildi í ${issue2.origin}`;
      default:
        return `Rangt gildi`;
    }
  };
};
function is_default() {
  return {
    localeError: error21()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js
var error22 = () => {
  const Sizable = {
    string: { unit: "caratteri", verb: "avere" },
    file: { unit: "byte", verb: "avere" },
    array: { unit: "elementi", verb: "avere" },
    set: { unit: "elementi", verb: "avere" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "indirizzo email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data e ora ISO",
    date: "data ISO",
    time: "ora ISO",
    duration: "durata ISO",
    ipv4: "indirizzo IPv4",
    ipv6: "indirizzo IPv6",
    cidrv4: "intervallo IPv4",
    cidrv6: "intervallo IPv6",
    base64: "stringa codificata in base64",
    base64url: "URL codificata in base64",
    json_string: "stringa JSON",
    e164: "numero E.164",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "numero",
    array: "vettore"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Input non valido: atteso instanceof ${issue2.expected}, ricevuto ${received}`;
        }
        return `Input non valido: atteso ${expected}, ricevuto ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`;
        return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`;
        return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Stringa non valida: deve iniziare con "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Stringa non valida: deve terminare con "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Stringa non valida: deve includere "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
        return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Chiave non valida in ${issue2.origin}`;
      case "invalid_union":
        return "Input non valido";
      case "invalid_element":
        return `Valore non valido in ${issue2.origin}`;
      default:
        return `Input non valido`;
    }
  };
};
function it_default() {
  return {
    localeError: error22()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js
var error23 = () => {
  const Sizable = {
    string: { unit: "文字", verb: "である" },
    file: { unit: "バイト", verb: "である" },
    array: { unit: "要素", verb: "である" },
    set: { unit: "要素", verb: "である" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "入力値",
    email: "メールアドレス",
    url: "URL",
    emoji: "絵文字",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO日時",
    date: "ISO日付",
    time: "ISO時刻",
    duration: "ISO期間",
    ipv4: "IPv4アドレス",
    ipv6: "IPv6アドレス",
    cidrv4: "IPv4範囲",
    cidrv6: "IPv6範囲",
    base64: "base64エンコード文字列",
    base64url: "base64urlエンコード文字列",
    json_string: "JSON文字列",
    e164: "E.164番号",
    jwt: "JWT",
    template_literal: "入力値"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "数値",
    array: "配列"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `無効な入力: instanceof ${issue2.expected}が期待されましたが、${received}が入力されました`;
        }
        return `無効な入力: ${expected}が期待されましたが、${received}が入力されました`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `無効な入力: ${stringifyPrimitive(issue2.values[0])}が期待されました`;
        return `無効な選択: ${joinValues(issue2.values, "、")}のいずれかである必要があります`;
      case "too_big": {
        const adj = issue2.inclusive ? "以下である" : "より小さい";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `大きすぎる値: ${issue2.origin ?? "値"}は${issue2.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
        return `大きすぎる値: ${issue2.origin ?? "値"}は${issue2.maximum.toString()}${adj}必要があります`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "以上である" : "より大きい";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `小さすぎる値: ${issue2.origin}は${issue2.minimum.toString()}${sizing.unit}${adj}必要があります`;
        return `小さすぎる値: ${issue2.origin}は${issue2.minimum.toString()}${adj}必要があります`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `無効な文字列: "${_issue.prefix}"で始まる必要があります`;
        if (_issue.format === "ends_with")
          return `無効な文字列: "${_issue.suffix}"で終わる必要があります`;
        if (_issue.format === "includes")
          return `無効な文字列: "${_issue.includes}"を含む必要があります`;
        if (_issue.format === "regex")
          return `無効な文字列: パターン${_issue.pattern}に一致する必要があります`;
        return `無効な${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `無効な数値: ${issue2.divisor}の倍数である必要があります`;
      case "unrecognized_keys":
        return `認識されていないキー${issue2.keys.length > 1 ? "群" : ""}: ${joinValues(issue2.keys, "、")}`;
      case "invalid_key":
        return `${issue2.origin}内の無効なキー`;
      case "invalid_union":
        return "無効な入力";
      case "invalid_element":
        return `${issue2.origin}内の無効な値`;
      default:
        return `無効な入力`;
    }
  };
};
function ja_default() {
  return {
    localeError: error23()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js
var error24 = () => {
  const Sizable = {
    string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
    file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
    array: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
    set: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "შეყვანა",
    email: "ელ-ფოსტის მისამართი",
    url: "URL",
    emoji: "ემოჯი",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "თარიღი-დრო",
    date: "თარიღი",
    time: "დრო",
    duration: "ხანგრძლივობა",
    ipv4: "IPv4 მისამართი",
    ipv6: "IPv6 მისამართი",
    cidrv4: "IPv4 დიაპაზონი",
    cidrv6: "IPv6 დიაპაზონი",
    base64: "base64-კოდირებული სტრინგი",
    base64url: "base64url-კოდირებული სტრინგი",
    json_string: "JSON სტრინგი",
    e164: "E.164 ნომერი",
    jwt: "JWT",
    template_literal: "შეყვანა"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "რიცხვი",
    string: "სტრინგი",
    boolean: "ბულეანი",
    function: "ფუნქცია",
    array: "მასივი"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `არასწორი შეყვანა: მოსალოდნელი instanceof ${issue2.expected}, მიღებული ${received}`;
        }
        return `არასწორი შეყვანა: მოსალოდნელი ${expected}, მიღებული ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `არასწორი შეყვანა: მოსალოდნელი ${stringifyPrimitive(issue2.values[0])}`;
        return `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${joinValues(issue2.values, "|")}-დან`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `ზედმეტად დიდი: მოსალოდნელი ${issue2.origin ?? "მნიშვნელობა"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
        return `ზედმეტად დიდი: მოსალოდნელი ${issue2.origin ?? "მნიშვნელობა"} იყოს ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `ზედმეტად პატარა: მოსალოდნელი ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `ზედმეტად პატარა: მოსალოდნელი ${issue2.origin} იყოს ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `არასწორი სტრინგი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
        }
        if (_issue.format === "ends_with")
          return `არასწორი სტრინგი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
        if (_issue.format === "includes")
          return `არასწორი სტრინგი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
        if (_issue.format === "regex")
          return `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
        return `არასწორი ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `არასწორი რიცხვი: უნდა იყოს ${issue2.divisor}-ის ჯერადი`;
      case "unrecognized_keys":
        return `უცნობი გასაღებ${issue2.keys.length > 1 ? "ები" : "ი"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `არასწორი გასაღები ${issue2.origin}-ში`;
      case "invalid_union":
        return "არასწორი შეყვანა";
      case "invalid_element":
        return `არასწორი მნიშვნელობა ${issue2.origin}-ში`;
      default:
        return `არასწორი შეყვანა`;
    }
  };
};
function ka_default() {
  return {
    localeError: error24()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js
var error25 = () => {
  const Sizable = {
    string: { unit: "តួអក្សរ", verb: "គួរមាន" },
    file: { unit: "បៃ", verb: "គួរមាន" },
    array: { unit: "ធាតុ", verb: "គួរមាន" },
    set: { unit: "ធាតុ", verb: "គួរមាន" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "ទិន្នន័យបញ្ចូល",
    email: "អាសយដ្ឋានអ៊ីមែល",
    url: "URL",
    emoji: "សញ្ញាអារម្មណ៍",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
    date: "កាលបរិច្ឆេទ ISO",
    time: "ម៉ោង ISO",
    duration: "រយៈពេល ISO",
    ipv4: "អាសយដ្ឋាន IPv4",
    ipv6: "អាសយដ្ឋាន IPv6",
    cidrv4: "ដែនអាសយដ្ឋាន IPv4",
    cidrv6: "ដែនអាសយដ្ឋាន IPv6",
    base64: "ខ្សែអក្សរអ៊ិកូដ base64",
    base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
    json_string: "ខ្សែអក្សរ JSON",
    e164: "លេខ E.164",
    jwt: "JWT",
    template_literal: "ទិន្នន័យបញ្ចូល"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "លេខ",
    array: "អារេ (Array)",
    null: "គ្មានតម្លៃ (null)"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${issue2.expected} ប៉ុន្តែទទួលបាន ${received}`;
        }
        return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${expected} ប៉ុន្តែទទួលបាន ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue2.values[0])}`;
        return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `ធំពេក៖ ត្រូវការ ${issue2.origin ?? "តម្លៃ"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
        return `ធំពេក៖ ត្រូវការ ${issue2.origin ?? "តម្លៃ"} ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `តូចពេក៖ ត្រូវការ ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `តូចពេក៖ ត្រូវការ ${issue2.origin} ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
        return `មិនត្រឹមត្រូវ៖ ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue2.divisor}`;
      case "unrecognized_keys":
        return `រកឃើញសោមិនស្គាល់៖ ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue2.origin}`;
      case "invalid_union":
        return `ទិន្នន័យមិនត្រឹមត្រូវ`;
      case "invalid_element":
        return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue2.origin}`;
      default:
        return `ទិន្នន័យមិនត្រឹមត្រូវ`;
    }
  };
};
function km_default() {
  return {
    localeError: error25()
  };
}

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js
function kh_default() {
  return km_default();
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js
var error26 = () => {
  const Sizable = {
    string: { unit: "문자", verb: "to have" },
    file: { unit: "바이트", verb: "to have" },
    array: { unit: "개", verb: "to have" },
    set: { unit: "개", verb: "to have" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "입력",
    email: "이메일 주소",
    url: "URL",
    emoji: "이모지",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO 날짜시간",
    date: "ISO 날짜",
    time: "ISO 시간",
    duration: "ISO 기간",
    ipv4: "IPv4 주소",
    ipv6: "IPv6 주소",
    cidrv4: "IPv4 범위",
    cidrv6: "IPv6 범위",
    base64: "base64 인코딩 문자열",
    base64url: "base64url 인코딩 문자열",
    json_string: "JSON 문자열",
    e164: "E.164 번호",
    jwt: "JWT",
    template_literal: "입력"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `잘못된 입력: 예상 타입은 instanceof ${issue2.expected}, 받은 타입은 ${received}입니다`;
        }
        return `잘못된 입력: 예상 타입은 ${expected}, 받은 타입은 ${received}입니다`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `잘못된 입력: 값은 ${stringifyPrimitive(issue2.values[0])} 이어야 합니다`;
        return `잘못된 옵션: ${joinValues(issue2.values, "또는 ")} 중 하나여야 합니다`;
      case "too_big": {
        const adj = issue2.inclusive ? "이하" : "미만";
        const suffix = adj === "미만" ? "이어야 합니다" : "여야 합니다";
        const sizing = getSizing(issue2.origin);
        const unit = sizing?.unit ?? "요소";
        if (sizing)
          return `${issue2.origin ?? "값"}이 너무 큽니다: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`;
        return `${issue2.origin ?? "값"}이 너무 큽니다: ${issue2.maximum.toString()} ${adj}${suffix}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "이상" : "초과";
        const suffix = adj === "이상" ? "이어야 합니다" : "여야 합니다";
        const sizing = getSizing(issue2.origin);
        const unit = sizing?.unit ?? "요소";
        if (sizing) {
          return `${issue2.origin ?? "값"}이 너무 작습니다: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`;
        }
        return `${issue2.origin ?? "값"}이 너무 작습니다: ${issue2.minimum.toString()} ${adj}${suffix}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `잘못된 문자열: "${_issue.prefix}"(으)로 시작해야 합니다`;
        }
        if (_issue.format === "ends_with")
          return `잘못된 문자열: "${_issue.suffix}"(으)로 끝나야 합니다`;
        if (_issue.format === "includes")
          return `잘못된 문자열: "${_issue.includes}"을(를) 포함해야 합니다`;
        if (_issue.format === "regex")
          return `잘못된 문자열: 정규식 ${_issue.pattern} 패턴과 일치해야 합니다`;
        return `잘못된 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `잘못된 숫자: ${issue2.divisor}의 배수여야 합니다`;
      case "unrecognized_keys":
        return `인식할 수 없는 키: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `잘못된 키: ${issue2.origin}`;
      case "invalid_union":
        return `잘못된 입력`;
      case "invalid_element":
        return `잘못된 값: ${issue2.origin}`;
      default:
        return `잘못된 입력`;
    }
  };
};
function ko_default() {
  return {
    localeError: error26()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js
var capitalizeFirstCharacter = (text2) => {
  return text2.charAt(0).toUpperCase() + text2.slice(1);
};
function getUnitTypeFromNumber(number2) {
  const abs = Math.abs(number2);
  const last = abs % 10;
  const last2 = abs % 100;
  if (last2 >= 11 && last2 <= 19 || last === 0)
    return "many";
  if (last === 1)
    return "one";
  return "few";
}
var error27 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "simbolis",
        few: "simboliai",
        many: "simbolių"
      },
      verb: {
        smaller: {
          inclusive: "turi būti ne ilgesnė kaip",
          notInclusive: "turi būti trumpesnė kaip"
        },
        bigger: {
          inclusive: "turi būti ne trumpesnė kaip",
          notInclusive: "turi būti ilgesnė kaip"
        }
      }
    },
    file: {
      unit: {
        one: "baitas",
        few: "baitai",
        many: "baitų"
      },
      verb: {
        smaller: {
          inclusive: "turi būti ne didesnis kaip",
          notInclusive: "turi būti mažesnis kaip"
        },
        bigger: {
          inclusive: "turi būti ne mažesnis kaip",
          notInclusive: "turi būti didesnis kaip"
        }
      }
    },
    array: {
      unit: {
        one: "elementą",
        few: "elementus",
        many: "elementų"
      },
      verb: {
        smaller: {
          inclusive: "turi turėti ne daugiau kaip",
          notInclusive: "turi turėti mažiau kaip"
        },
        bigger: {
          inclusive: "turi turėti ne mažiau kaip",
          notInclusive: "turi turėti daugiau kaip"
        }
      }
    },
    set: {
      unit: {
        one: "elementą",
        few: "elementus",
        many: "elementų"
      },
      verb: {
        smaller: {
          inclusive: "turi turėti ne daugiau kaip",
          notInclusive: "turi turėti mažiau kaip"
        },
        bigger: {
          inclusive: "turi turėti ne mažiau kaip",
          notInclusive: "turi turėti daugiau kaip"
        }
      }
    }
  };
  function getSizing(origin, unitType, inclusive, targetShouldBe) {
    const result = Sizable[origin] ?? null;
    if (result === null)
      return result;
    return {
      unit: result.unit[unitType],
      verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"]
    };
  }
  const FormatDictionary = {
    regex: "įvestis",
    email: "el. pašto adresas",
    url: "URL",
    emoji: "jaustukas",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO data ir laikas",
    date: "ISO data",
    time: "ISO laikas",
    duration: "ISO trukmė",
    ipv4: "IPv4 adresas",
    ipv6: "IPv6 adresas",
    cidrv4: "IPv4 tinklo prefiksas (CIDR)",
    cidrv6: "IPv6 tinklo prefiksas (CIDR)",
    base64: "base64 užkoduota eilutė",
    base64url: "base64url užkoduota eilutė",
    json_string: "JSON eilutė",
    e164: "E.164 numeris",
    jwt: "JWT",
    template_literal: "įvestis"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "skaičius",
    bigint: "sveikasis skaičius",
    string: "eilutė",
    boolean: "loginė reikšmė",
    undefined: "neapibrėžta reikšmė",
    function: "funkcija",
    symbol: "simbolis",
    array: "masyvas",
    object: "objektas",
    null: "nulinė reikšmė"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Gautas tipas ${received}, o tikėtasi - instanceof ${issue2.expected}`;
        }
        return `Gautas tipas ${received}, o tikėtasi - ${expected}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Privalo būti ${stringifyPrimitive(issue2.values[0])}`;
        return `Privalo būti vienas iš ${joinValues(issue2.values, "|")} pasirinkimų`;
      case "too_big": {
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller");
        if (sizing?.verb)
          return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "elementų"}`;
        const adj = issue2.inclusive ? "ne didesnis kaip" : "mažesnis kaip";
        return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`;
      }
      case "too_small": {
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger");
        if (sizing?.verb)
          return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "elementų"}`;
        const adj = issue2.inclusive ? "ne mažesnis kaip" : "didesnis kaip";
        return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Eilutė privalo prasidėti "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Eilutė privalo pasibaigti "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Eilutė privalo įtraukti "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Eilutė privalo atitikti ${_issue.pattern}`;
        return `Neteisingas ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Skaičius privalo būti ${issue2.divisor} kartotinis.`;
      case "unrecognized_keys":
        return `Neatpažint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return "Rastas klaidingas raktas";
      case "invalid_union":
        return "Klaidinga įvestis";
      case "invalid_element": {
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi klaidingą įvestį`;
      }
      default:
        return "Klaidinga įvestis";
    }
  };
};
function lt_default() {
  return {
    localeError: error27()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js
var error28 = () => {
  const Sizable = {
    string: { unit: "знаци", verb: "да имаат" },
    file: { unit: "бајти", verb: "да имаат" },
    array: { unit: "ставки", verb: "да имаат" },
    set: { unit: "ставки", verb: "да имаат" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "внес",
    email: "адреса на е-пошта",
    url: "URL",
    emoji: "емоџи",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO датум и време",
    date: "ISO датум",
    time: "ISO време",
    duration: "ISO времетраење",
    ipv4: "IPv4 адреса",
    ipv6: "IPv6 адреса",
    cidrv4: "IPv4 опсег",
    cidrv6: "IPv6 опсег",
    base64: "base64-енкодирана низа",
    base64url: "base64url-енкодирана низа",
    json_string: "JSON низа",
    e164: "E.164 број",
    jwt: "JWT",
    template_literal: "внес"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "број",
    array: "низа"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Грешен внес: се очекува instanceof ${issue2.expected}, примено ${received}`;
        }
        return `Грешен внес: се очекува ${expected}, примено ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
        return `Грешана опција: се очекува една ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Премногу голем: се очекува ${issue2.origin ?? "вредноста"} да има ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "елементи"}`;
        return `Премногу голем: се очекува ${issue2.origin ?? "вредноста"} да биде ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Премногу мал: се очекува ${issue2.origin} да има ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Премногу мал: се очекува ${issue2.origin} да биде ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Неважечка низа: мора да започнува со "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Неважечка низа: мора да завршува со "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Неважечка низа: мора да вклучува "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Неважечка низа: мора да одгоара на патернот ${_issue.pattern}`;
        return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Грешен број: мора да биде делив со ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Непрепознаени клучеви" : "Непрепознаен клуч"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Грешен клуч во ${issue2.origin}`;
      case "invalid_union":
        return "Грешен внес";
      case "invalid_element":
        return `Грешна вредност во ${issue2.origin}`;
      default:
        return `Грешен внес`;
    }
  };
};
function mk_default() {
  return {
    localeError: error28()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js
var error29 = () => {
  const Sizable = {
    string: { unit: "aksara", verb: "mempunyai" },
    file: { unit: "bait", verb: "mempunyai" },
    array: { unit: "elemen", verb: "mempunyai" },
    set: { unit: "elemen", verb: "mempunyai" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "alamat e-mel",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "tarikh masa ISO",
    date: "tarikh ISO",
    time: "masa ISO",
    duration: "tempoh ISO",
    ipv4: "alamat IPv4",
    ipv6: "alamat IPv6",
    cidrv4: "julat IPv4",
    cidrv6: "julat IPv6",
    base64: "string dikodkan base64",
    base64url: "string dikodkan base64url",
    json_string: "string JSON",
    e164: "nombor E.164",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "nombor"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Input tidak sah: dijangka instanceof ${issue2.expected}, diterima ${received}`;
        }
        return `Input tidak sah: dijangka ${expected}, diterima ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`;
        return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`;
        return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `String tidak sah: mesti mengandungi "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} tidak sah`;
      }
      case "not_multiple_of":
        return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Kunci tidak sah dalam ${issue2.origin}`;
      case "invalid_union":
        return "Input tidak sah";
      case "invalid_element":
        return `Nilai tidak sah dalam ${issue2.origin}`;
      default:
        return `Input tidak sah`;
    }
  };
};
function ms_default() {
  return {
    localeError: error29()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js
var error30 = () => {
  const Sizable = {
    string: { unit: "tekens", verb: "heeft" },
    file: { unit: "bytes", verb: "heeft" },
    array: { unit: "elementen", verb: "heeft" },
    set: { unit: "elementen", verb: "heeft" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "invoer",
    email: "emailadres",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datum en tijd",
    date: "ISO datum",
    time: "ISO tijd",
    duration: "ISO duur",
    ipv4: "IPv4-adres",
    ipv6: "IPv6-adres",
    cidrv4: "IPv4-bereik",
    cidrv6: "IPv6-bereik",
    base64: "base64-gecodeerde tekst",
    base64url: "base64 URL-gecodeerde tekst",
    json_string: "JSON string",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "invoer"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "getal"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ongeldige invoer: verwacht instanceof ${issue2.expected}, ontving ${received}`;
        }
        return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`;
        return `Ongeldige optie: verwacht één van ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        const longName = issue2.origin === "date" ? "laat" : issue2.origin === "string" ? "lang" : "groot";
        if (sizing)
          return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`;
        return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        const shortName = issue2.origin === "date" ? "vroeg" : issue2.origin === "string" ? "kort" : "klein";
        if (sizing) {
          return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
        }
        return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`;
        }
        if (_issue.format === "ends_with")
          return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`;
        if (_issue.format === "includes")
          return `Ongeldige tekst: moet "${_issue.includes}" bevatten`;
        if (_issue.format === "regex")
          return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;
        return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`;
      case "unrecognized_keys":
        return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ongeldige key in ${issue2.origin}`;
      case "invalid_union":
        return "Ongeldige invoer";
      case "invalid_element":
        return `Ongeldige waarde in ${issue2.origin}`;
      default:
        return `Ongeldige invoer`;
    }
  };
};
function nl_default() {
  return {
    localeError: error30()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js
var error31 = () => {
  const Sizable = {
    string: { unit: "tegn", verb: "å ha" },
    file: { unit: "bytes", verb: "å ha" },
    array: { unit: "elementer", verb: "å inneholde" },
    set: { unit: "elementer", verb: "å inneholde" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "e-postadresse",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO dato- og klokkeslett",
    date: "ISO-dato",
    time: "ISO-klokkeslett",
    duration: "ISO-varighet",
    ipv4: "IPv4-område",
    ipv6: "IPv6-område",
    cidrv4: "IPv4-spekter",
    cidrv6: "IPv6-spekter",
    base64: "base64-enkodet streng",
    base64url: "base64url-enkodet streng",
    json_string: "JSON-streng",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "tall",
    array: "liste"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ugyldig input: forventet instanceof ${issue2.expected}, fikk ${received}`;
        }
        return `Ugyldig input: forventet ${expected}, fikk ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`;
        return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `For stor(t): forventet ${issue2.origin ?? "value"} til å ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
        return `For stor(t): forventet ${issue2.origin ?? "value"} til å ha ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `For lite(n): forventet ${issue2.origin} til å ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `For lite(n): forventet ${issue2.origin} til å ha ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ugyldig streng: må starte med "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Ugyldig streng: må ende med "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ugyldig streng: må inneholde "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ugyldig streng: må matche mønsteret ${_issue.pattern}`;
        return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ugyldig tall: må være et multiplum av ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Ukjente nøkler" : "Ukjent nøkkel"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ugyldig nøkkel i ${issue2.origin}`;
      case "invalid_union":
        return "Ugyldig input";
      case "invalid_element":
        return `Ugyldig verdi i ${issue2.origin}`;
      default:
        return `Ugyldig input`;
    }
  };
};
function no_default() {
  return {
    localeError: error31()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js
var error32 = () => {
  const Sizable = {
    string: { unit: "harf", verb: "olmalıdır" },
    file: { unit: "bayt", verb: "olmalıdır" },
    array: { unit: "unsur", verb: "olmalıdır" },
    set: { unit: "unsur", verb: "olmalıdır" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "giren",
    email: "epostagâh",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO hengâmı",
    date: "ISO tarihi",
    time: "ISO zamanı",
    duration: "ISO müddeti",
    ipv4: "IPv4 nişânı",
    ipv6: "IPv6 nişânı",
    cidrv4: "IPv4 menzili",
    cidrv6: "IPv6 menzili",
    base64: "base64-şifreli metin",
    base64url: "base64url-şifreli metin",
    json_string: "JSON metin",
    e164: "E.164 sayısı",
    jwt: "JWT",
    template_literal: "giren"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "numara",
    array: "saf",
    null: "gayb"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Fâsit giren: umulan instanceof ${issue2.expected}, alınan ${received}`;
        }
        return `Fâsit giren: umulan ${expected}, alınan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Fâsit giren: umulan ${stringifyPrimitive(issue2.values[0])}`;
        return `Fâsit tercih: mûteberler ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Fazla büyük: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
        return `Fazla büyük: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmalıydı.`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Fazla küçük: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
        }
        return `Fazla küçük: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmalıydı.`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
        if (_issue.format === "ends_with")
          return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
        if (_issue.format === "includes")
          return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
        if (_issue.format === "regex")
          return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
        return `Fâsit ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Fâsit sayı: ${issue2.divisor} katı olmalıydı.`;
      case "unrecognized_keys":
        return `Tanınmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} için tanınmayan anahtar var.`;
      case "invalid_union":
        return "Giren tanınamadı.";
      case "invalid_element":
        return `${issue2.origin} için tanınmayan kıymet var.`;
      default:
        return `Kıymet tanınamadı.`;
    }
  };
};
function ota_default() {
  return {
    localeError: error32()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js
var error33 = () => {
  const Sizable = {
    string: { unit: "توکي", verb: "ولري" },
    file: { unit: "بایټس", verb: "ولري" },
    array: { unit: "توکي", verb: "ولري" },
    set: { unit: "توکي", verb: "ولري" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "ورودي",
    email: "بریښنالیک",
    url: "یو آر ال",
    emoji: "ایموجي",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "نیټه او وخت",
    date: "نېټه",
    time: "وخت",
    duration: "موده",
    ipv4: "د IPv4 پته",
    ipv6: "د IPv6 پته",
    cidrv4: "د IPv4 ساحه",
    cidrv6: "د IPv6 ساحه",
    base64: "base64-encoded متن",
    base64url: "base64url-encoded متن",
    json_string: "JSON متن",
    e164: "د E.164 شمېره",
    jwt: "JWT",
    template_literal: "ورودي"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "عدد",
    array: "ارې"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `ناسم ورودي: باید instanceof ${issue2.expected} وای, مګر ${received} ترلاسه شو`;
        }
        return `ناسم ورودي: باید ${expected} وای, مګر ${received} ترلاسه شو`;
      }
      case "invalid_value":
        if (issue2.values.length === 1) {
          return `ناسم ورودي: باید ${stringifyPrimitive(issue2.values[0])} وای`;
        }
        return `ناسم انتخاب: باید یو له ${joinValues(issue2.values, "|")} څخه وای`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `ډیر لوی: ${issue2.origin ?? "ارزښت"} باید ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
        }
        return `ډیر لوی: ${issue2.origin ?? "ارزښت"} باید ${adj}${issue2.maximum.toString()} وي`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `ډیر کوچنی: ${issue2.origin} باید ${adj}${issue2.minimum.toString()} ${sizing.unit} ولري`;
        }
        return `ډیر کوچنی: ${issue2.origin} باید ${adj}${issue2.minimum.toString()} وي`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
        }
        if (_issue.format === "ends_with") {
          return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
        }
        if (_issue.format === "includes") {
          return `ناسم متن: باید "${_issue.includes}" ولري`;
        }
        if (_issue.format === "regex") {
          return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
        }
        return `${FormatDictionary[_issue.format] ?? issue2.format} ناسم دی`;
      }
      case "not_multiple_of":
        return `ناسم عدد: باید د ${issue2.divisor} مضرب وي`;
      case "unrecognized_keys":
        return `ناسم ${issue2.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `ناسم کلیډ په ${issue2.origin} کې`;
      case "invalid_union":
        return `ناسمه ورودي`;
      case "invalid_element":
        return `ناسم عنصر په ${issue2.origin} کې`;
      default:
        return `ناسمه ورودي`;
    }
  };
};
function ps_default() {
  return {
    localeError: error33()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js
var error34 = () => {
  const Sizable = {
    string: { unit: "znaków", verb: "mieć" },
    file: { unit: "bajtów", verb: "mieć" },
    array: { unit: "elementów", verb: "mieć" },
    set: { unit: "elementów", verb: "mieć" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "wyrażenie",
    email: "adres email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data i godzina w formacie ISO",
    date: "data w formacie ISO",
    time: "godzina w formacie ISO",
    duration: "czas trwania ISO",
    ipv4: "adres IPv4",
    ipv6: "adres IPv6",
    cidrv4: "zakres IPv4",
    cidrv6: "zakres IPv6",
    base64: "ciąg znaków zakodowany w formacie base64",
    base64url: "ciąg znaków zakodowany w formacie base64url",
    json_string: "ciąg znaków w formacie JSON",
    e164: "liczba E.164",
    jwt: "JWT",
    template_literal: "wejście"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "liczba",
    array: "tablica"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Nieprawidłowe dane wejściowe: oczekiwano instanceof ${issue2.expected}, otrzymano ${received}`;
        }
        return `Nieprawidłowe dane wejściowe: oczekiwano ${expected}, otrzymano ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`;
        return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Za duża wartość: oczekiwano, że ${issue2.origin ?? "wartość"} będzie mieć ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementów"}`;
        }
        return `Zbyt duż(y/a/e): oczekiwano, że ${issue2.origin ?? "wartość"} będzie wynosić ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Za mała wartość: oczekiwano, że ${issue2.origin ?? "wartość"} będzie mieć ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "elementów"}`;
        }
        return `Zbyt mał(y/a/e): oczekiwano, że ${issue2.origin ?? "wartość"} będzie wynosić ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Nieprawidłowy ciąg znaków: musi zaczynać się od "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Nieprawidłowy ciąg znaków: musi kończyć się na "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Nieprawidłowy ciąg znaków: musi zawierać "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${_issue.pattern}`;
        return `Nieprawidłow(y/a/e) ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Nieprawidłowa liczba: musi być wielokrotnością ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Nieprawidłowy klucz w ${issue2.origin}`;
      case "invalid_union":
        return "Nieprawidłowe dane wejściowe";
      case "invalid_element":
        return `Nieprawidłowa wartość w ${issue2.origin}`;
      default:
        return `Nieprawidłowe dane wejściowe`;
    }
  };
};
function pl_default() {
  return {
    localeError: error34()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js
var error35 = () => {
  const Sizable = {
    string: { unit: "caracteres", verb: "ter" },
    file: { unit: "bytes", verb: "ter" },
    array: { unit: "itens", verb: "ter" },
    set: { unit: "itens", verb: "ter" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "padrão",
    email: "endereço de e-mail",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data e hora ISO",
    date: "data ISO",
    time: "hora ISO",
    duration: "duração ISO",
    ipv4: "endereço IPv4",
    ipv6: "endereço IPv6",
    cidrv4: "faixa de IPv4",
    cidrv6: "faixa de IPv6",
    base64: "texto codificado em base64",
    base64url: "URL codificada em base64",
    json_string: "texto JSON",
    e164: "número E.164",
    jwt: "JWT",
    template_literal: "entrada"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "número",
    null: "nulo"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Tipo inválido: esperado instanceof ${issue2.expected}, recebido ${received}`;
        }
        return `Tipo inválido: esperado ${expected}, recebido ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entrada inválida: esperado ${stringifyPrimitive(issue2.values[0])}`;
        return `Opção inválida: esperada uma das ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
        return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Texto inválido: deve começar com "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Texto inválido: deve terminar com "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Texto inválido: deve incluir "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Texto inválido: deve corresponder ao padrão ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} inválido`;
      }
      case "not_multiple_of":
        return `Número inválido: deve ser múltiplo de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Chave inválida em ${issue2.origin}`;
      case "invalid_union":
        return "Entrada inválida";
      case "invalid_element":
        return `Valor inválido em ${issue2.origin}`;
      default:
        return `Campo inválido`;
    }
  };
};
function pt_default() {
  return {
    localeError: error35()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js
function getRussianPlural(count2, one, few, many) {
  const absCount = Math.abs(count2);
  const lastDigit = absCount % 10;
  const lastTwoDigits = absCount % 100;
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
    return many;
  }
  if (lastDigit === 1) {
    return one;
  }
  if (lastDigit >= 2 && lastDigit <= 4) {
    return few;
  }
  return many;
}
var error36 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "символ",
        few: "символа",
        many: "символов"
      },
      verb: "иметь"
    },
    file: {
      unit: {
        one: "байт",
        few: "байта",
        many: "байт"
      },
      verb: "иметь"
    },
    array: {
      unit: {
        one: "элемент",
        few: "элемента",
        many: "элементов"
      },
      verb: "иметь"
    },
    set: {
      unit: {
        one: "элемент",
        few: "элемента",
        many: "элементов"
      },
      verb: "иметь"
    }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "ввод",
    email: "email адрес",
    url: "URL",
    emoji: "эмодзи",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO дата и время",
    date: "ISO дата",
    time: "ISO время",
    duration: "ISO длительность",
    ipv4: "IPv4 адрес",
    ipv6: "IPv6 адрес",
    cidrv4: "IPv4 диапазон",
    cidrv6: "IPv6 диапазон",
    base64: "строка в формате base64",
    base64url: "строка в формате base64url",
    json_string: "JSON строка",
    e164: "номер E.164",
    jwt: "JWT",
    template_literal: "ввод"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "число",
    array: "массив"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Неверный ввод: ожидалось instanceof ${issue2.expected}, получено ${received}`;
        }
        return `Неверный ввод: ожидалось ${expected}, получено ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Неверный ввод: ожидалось ${stringifyPrimitive(issue2.values[0])}`;
        return `Неверный вариант: ожидалось одно из ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const maxValue = Number(issue2.maximum);
          const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `Слишком большое значение: ожидалось, что ${issue2.origin ?? "значение"} будет иметь ${adj}${issue2.maximum.toString()} ${unit}`;
        }
        return `Слишком большое значение: ожидалось, что ${issue2.origin ?? "значение"} будет ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const minValue = Number(issue2.minimum);
          const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `Слишком маленькое значение: ожидалось, что ${issue2.origin} будет иметь ${adj}${issue2.minimum.toString()} ${unit}`;
        }
        return `Слишком маленькое значение: ожидалось, что ${issue2.origin} будет ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Неверная строка: должна начинаться с "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Неверная строка: должна заканчиваться на "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Неверная строка: должна содержать "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Неверная строка: должна соответствовать шаблону ${_issue.pattern}`;
        return `Неверный ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Неверное число: должно быть кратным ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Нераспознанн${issue2.keys.length > 1 ? "ые" : "ый"} ключ${issue2.keys.length > 1 ? "и" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Неверный ключ в ${issue2.origin}`;
      case "invalid_union":
        return "Неверные входные данные";
      case "invalid_element":
        return `Неверное значение в ${issue2.origin}`;
      default:
        return `Неверные входные данные`;
    }
  };
};
function ru_default() {
  return {
    localeError: error36()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js
var error37 = () => {
  const Sizable = {
    string: { unit: "znakov", verb: "imeti" },
    file: { unit: "bajtov", verb: "imeti" },
    array: { unit: "elementov", verb: "imeti" },
    set: { unit: "elementov", verb: "imeti" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "vnos",
    email: "e-poštni naslov",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datum in čas",
    date: "ISO datum",
    time: "ISO čas",
    duration: "ISO trajanje",
    ipv4: "IPv4 naslov",
    ipv6: "IPv6 naslov",
    cidrv4: "obseg IPv4",
    cidrv6: "obseg IPv6",
    base64: "base64 kodiran niz",
    base64url: "base64url kodiran niz",
    json_string: "JSON niz",
    e164: "E.164 številka",
    jwt: "JWT",
    template_literal: "vnos"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "število",
    array: "tabela"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Neveljaven vnos: pričakovano instanceof ${issue2.expected}, prejeto ${received}`;
        }
        return `Neveljaven vnos: pričakovano ${expected}, prejeto ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue2.values[0])}`;
        return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Preveliko: pričakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`;
        return `Preveliko: pričakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Premajhno: pričakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Premajhno: pričakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Neveljaven niz: mora se začeti z "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Neveljaven niz: mora se končati z "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Neveljaven niz: mora vsebovati "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;
        return `Neveljaven ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Neveljavno število: mora biti večkratnik ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Neprepoznan${issue2.keys.length > 1 ? "i ključi" : " ključ"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Neveljaven ključ v ${issue2.origin}`;
      case "invalid_union":
        return "Neveljaven vnos";
      case "invalid_element":
        return `Neveljavna vrednost v ${issue2.origin}`;
      default:
        return "Neveljaven vnos";
    }
  };
};
function sl_default() {
  return {
    localeError: error37()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js
var error38 = () => {
  const Sizable = {
    string: { unit: "tecken", verb: "att ha" },
    file: { unit: "bytes", verb: "att ha" },
    array: { unit: "objekt", verb: "att innehålla" },
    set: { unit: "objekt", verb: "att innehålla" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "reguljärt uttryck",
    email: "e-postadress",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-datum och tid",
    date: "ISO-datum",
    time: "ISO-tid",
    duration: "ISO-varaktighet",
    ipv4: "IPv4-intervall",
    ipv6: "IPv6-intervall",
    cidrv4: "IPv4-spektrum",
    cidrv6: "IPv6-spektrum",
    base64: "base64-kodad sträng",
    base64url: "base64url-kodad sträng",
    json_string: "JSON-sträng",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "mall-literal"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "antal",
    array: "lista"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ogiltig inmatning: förväntat instanceof ${issue2.expected}, fick ${received}`;
        }
        return `Ogiltig inmatning: förväntat ${expected}, fick ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue2.values[0])}`;
        return `Ogiltigt val: förväntade en av ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `För stor(t): förväntade ${issue2.origin ?? "värdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`;
        }
        return `För stor(t): förväntat ${issue2.origin ?? "värdet"} att ha ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `För lite(t): förväntade ${issue2.origin ?? "värdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `För lite(t): förväntade ${issue2.origin ?? "värdet"} att ha ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Ogiltig sträng: måste börja med "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Ogiltig sträng: måste sluta med "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ogiltig sträng: måste innehålla "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ogiltig sträng: måste matcha mönstret "${_issue.pattern}"`;
        return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ogiltigt tal: måste vara en multipel av ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Okända nycklar" : "Okänd nyckel"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ogiltig nyckel i ${issue2.origin ?? "värdet"}`;
      case "invalid_union":
        return "Ogiltig input";
      case "invalid_element":
        return `Ogiltigt värde i ${issue2.origin ?? "värdet"}`;
      default:
        return `Ogiltig input`;
    }
  };
};
function sv_default() {
  return {
    localeError: error38()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js
var error39 = () => {
  const Sizable = {
    string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
    file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
    array: { unit: "உறுப்புகள்", verb: "கொண்டிருக்க வேண்டும்" },
    set: { unit: "உறுப்புகள்", verb: "கொண்டிருக்க வேண்டும்" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "உள்ளீடு",
    email: "மின்னஞ்சல் முகவரி",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO தேதி நேரம்",
    date: "ISO தேதி",
    time: "ISO நேரம்",
    duration: "ISO கால அளவு",
    ipv4: "IPv4 முகவரி",
    ipv6: "IPv6 முகவரி",
    cidrv4: "IPv4 வரம்பு",
    cidrv6: "IPv6 வரம்பு",
    base64: "base64-encoded சரம்",
    base64url: "base64url-encoded சரம்",
    json_string: "JSON சரம்",
    e164: "E.164 எண்",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "எண்",
    array: "அணி",
    null: "வெறுமை"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${issue2.expected}, பெறப்பட்டது ${received}`;
        }
        return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${expected}, பெறப்பட்டது ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue2.values[0])}`;
        return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue2.values, "|")} இல் ஒன்று`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${issue2.origin ?? "மதிப்பு"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "உறுப்புகள்"} ஆக இருக்க வேண்டும்`;
        }
        return `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${issue2.origin ?? "மதிப்பு"} ${adj}${issue2.maximum.toString()} ஆக இருக்க வேண்டும்`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ஆக இருக்க வேண்டும்`;
        }
        return `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${issue2.origin} ${adj}${issue2.minimum.toString()} ஆக இருக்க வேண்டும்`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `தவறான சரம்: "${_issue.prefix}" இல் தொடங்க வேண்டும்`;
        if (_issue.format === "ends_with")
          return `தவறான சரம்: "${_issue.suffix}" இல் முடிவடைய வேண்டும்`;
        if (_issue.format === "includes")
          return `தவறான சரம்: "${_issue.includes}" ஐ உள்ளடக்க வேண்டும்`;
        if (_issue.format === "regex")
          return `தவறான சரம்: ${_issue.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;
        return `தவறான ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `தவறான எண்: ${issue2.divisor} இன் பலமாக இருக்க வேண்டும்`;
      case "unrecognized_keys":
        return `அடையாளம் தெரியாத விசை${issue2.keys.length > 1 ? "கள்" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} இல் தவறான விசை`;
      case "invalid_union":
        return "தவறான உள்ளீடு";
      case "invalid_element":
        return `${issue2.origin} இல் தவறான மதிப்பு`;
      default:
        return `தவறான உள்ளீடு`;
    }
  };
};
function ta_default() {
  return {
    localeError: error39()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js
var error40 = () => {
  const Sizable = {
    string: { unit: "ตัวอักษร", verb: "ควรมี" },
    file: { unit: "ไบต์", verb: "ควรมี" },
    array: { unit: "รายการ", verb: "ควรมี" },
    set: { unit: "รายการ", verb: "ควรมี" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "ข้อมูลที่ป้อน",
    email: "ที่อยู่อีเมล",
    url: "URL",
    emoji: "อิโมจิ",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "วันที่เวลาแบบ ISO",
    date: "วันที่แบบ ISO",
    time: "เวลาแบบ ISO",
    duration: "ช่วงเวลาแบบ ISO",
    ipv4: "ที่อยู่ IPv4",
    ipv6: "ที่อยู่ IPv6",
    cidrv4: "ช่วง IP แบบ IPv4",
    cidrv6: "ช่วง IP แบบ IPv6",
    base64: "ข้อความแบบ Base64",
    base64url: "ข้อความแบบ Base64 สำหรับ URL",
    json_string: "ข้อความแบบ JSON",
    e164: "เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",
    jwt: "โทเคน JWT",
    template_literal: "ข้อมูลที่ป้อน"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "ตัวเลข",
    array: "อาร์เรย์ (Array)",
    null: "ไม่มีค่า (null)"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${issue2.expected} แต่ได้รับ ${received}`;
        }
        return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${expected} แต่ได้รับ ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue2.values[0])}`;
        return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "ไม่เกิน" : "น้อยกว่า";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `เกินกำหนด: ${issue2.origin ?? "ค่า"} ควรมี${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "รายการ"}`;
        return `เกินกำหนด: ${issue2.origin ?? "ค่า"} ควรมี${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "อย่างน้อย" : "มากกว่า";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `น้อยกว่ากำหนด: ${issue2.origin} ควรมี${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `น้อยกว่ากำหนด: ${issue2.origin} ควรมี${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${_issue.includes}" อยู่ในข้อความ`;
        if (_issue.format === "regex")
          return `รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${_issue.pattern}`;
        return `รูปแบบไม่ถูกต้อง: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${issue2.divisor} ได้ลงตัว`;
      case "unrecognized_keys":
        return `พบคีย์ที่ไม่รู้จัก: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `คีย์ไม่ถูกต้องใน ${issue2.origin}`;
      case "invalid_union":
        return "ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";
      case "invalid_element":
        return `ข้อมูลไม่ถูกต้องใน ${issue2.origin}`;
      default:
        return `ข้อมูลไม่ถูกต้อง`;
    }
  };
};
function th_default() {
  return {
    localeError: error40()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js
var error41 = () => {
  const Sizable = {
    string: { unit: "karakter", verb: "olmalı" },
    file: { unit: "bayt", verb: "olmalı" },
    array: { unit: "öğe", verb: "olmalı" },
    set: { unit: "öğe", verb: "olmalı" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "girdi",
    email: "e-posta adresi",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO tarih ve saat",
    date: "ISO tarih",
    time: "ISO saat",
    duration: "ISO süre",
    ipv4: "IPv4 adresi",
    ipv6: "IPv6 adresi",
    cidrv4: "IPv4 aralığı",
    cidrv6: "IPv6 aralığı",
    base64: "base64 ile şifrelenmiş metin",
    base64url: "base64url ile şifrelenmiş metin",
    json_string: "JSON dizesi",
    e164: "E.164 sayısı",
    jwt: "JWT",
    template_literal: "Şablon dizesi"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Geçersiz değer: beklenen instanceof ${issue2.expected}, alınan ${received}`;
        }
        return `Geçersiz değer: beklenen ${expected}, alınan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Geçersiz değer: beklenen ${stringifyPrimitive(issue2.values[0])}`;
        return `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Çok büyük: beklenen ${issue2.origin ?? "değer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "öğe"}`;
        return `Çok büyük: beklenen ${issue2.origin ?? "değer"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Çok küçük: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        return `Çok küçük: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Geçersiz metin: "${_issue.prefix}" ile başlamalı`;
        if (_issue.format === "ends_with")
          return `Geçersiz metin: "${_issue.suffix}" ile bitmeli`;
        if (_issue.format === "includes")
          return `Geçersiz metin: "${_issue.includes}" içermeli`;
        if (_issue.format === "regex")
          return `Geçersiz metin: ${_issue.pattern} desenine uymalı`;
        return `Geçersiz ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Geçersiz sayı: ${issue2.divisor} ile tam bölünebilmeli`;
      case "unrecognized_keys":
        return `Tanınmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} içinde geçersiz anahtar`;
      case "invalid_union":
        return "Geçersiz değer";
      case "invalid_element":
        return `${issue2.origin} içinde geçersiz değer`;
      default:
        return `Geçersiz değer`;
    }
  };
};
function tr_default() {
  return {
    localeError: error41()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js
var error42 = () => {
  const Sizable = {
    string: { unit: "символів", verb: "матиме" },
    file: { unit: "байтів", verb: "матиме" },
    array: { unit: "елементів", verb: "матиме" },
    set: { unit: "елементів", verb: "матиме" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "вхідні дані",
    email: "адреса електронної пошти",
    url: "URL",
    emoji: "емодзі",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "дата та час ISO",
    date: "дата ISO",
    time: "час ISO",
    duration: "тривалість ISO",
    ipv4: "адреса IPv4",
    ipv6: "адреса IPv6",
    cidrv4: "діапазон IPv4",
    cidrv6: "діапазон IPv6",
    base64: "рядок у кодуванні base64",
    base64url: "рядок у кодуванні base64url",
    json_string: "рядок JSON",
    e164: "номер E.164",
    jwt: "JWT",
    template_literal: "вхідні дані"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "число",
    array: "масив"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Неправильні вхідні дані: очікується instanceof ${issue2.expected}, отримано ${received}`;
        }
        return `Неправильні вхідні дані: очікується ${expected}, отримано ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue2.values[0])}`;
        return `Неправильна опція: очікується одне з ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Занадто велике: очікується, що ${issue2.origin ?? "значення"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "елементів"}`;
        return `Занадто велике: очікується, що ${issue2.origin ?? "значення"} буде ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Занадто мале: очікується, що ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Занадто мале: очікується, що ${issue2.origin} буде ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Неправильний рядок: повинен починатися з "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Неправильний рядок: повинен закінчуватися на "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Неправильний рядок: повинен містити "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Неправильний рядок: повинен відповідати шаблону ${_issue.pattern}`;
        return `Неправильний ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Неправильне число: повинно бути кратним ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Нерозпізнаний ключ${issue2.keys.length > 1 ? "і" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Неправильний ключ у ${issue2.origin}`;
      case "invalid_union":
        return "Неправильні вхідні дані";
      case "invalid_element":
        return `Неправильне значення у ${issue2.origin}`;
      default:
        return `Неправильні вхідні дані`;
    }
  };
};
function uk_default() {
  return {
    localeError: error42()
  };
}

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js
function ua_default() {
  return uk_default();
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js
var error43 = () => {
  const Sizable = {
    string: { unit: "حروف", verb: "ہونا" },
    file: { unit: "بائٹس", verb: "ہونا" },
    array: { unit: "آئٹمز", verb: "ہونا" },
    set: { unit: "آئٹمز", verb: "ہونا" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "ان پٹ",
    email: "ای میل ایڈریس",
    url: "یو آر ایل",
    emoji: "ایموجی",
    uuid: "یو یو آئی ڈی",
    uuidv4: "یو یو آئی ڈی وی 4",
    uuidv6: "یو یو آئی ڈی وی 6",
    nanoid: "نینو آئی ڈی",
    guid: "جی یو آئی ڈی",
    cuid: "سی یو آئی ڈی",
    cuid2: "سی یو آئی ڈی 2",
    ulid: "یو ایل آئی ڈی",
    xid: "ایکس آئی ڈی",
    ksuid: "کے ایس یو آئی ڈی",
    datetime: "آئی ایس او ڈیٹ ٹائم",
    date: "آئی ایس او تاریخ",
    time: "آئی ایس او وقت",
    duration: "آئی ایس او مدت",
    ipv4: "آئی پی وی 4 ایڈریس",
    ipv6: "آئی پی وی 6 ایڈریس",
    cidrv4: "آئی پی وی 4 رینج",
    cidrv6: "آئی پی وی 6 رینج",
    base64: "بیس 64 ان کوڈڈ سٹرنگ",
    base64url: "بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",
    json_string: "جے ایس او این سٹرنگ",
    e164: "ای 164 نمبر",
    jwt: "جے ڈبلیو ٹی",
    template_literal: "ان پٹ"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "نمبر",
    array: "آرے",
    null: "نل"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `غلط ان پٹ: instanceof ${issue2.expected} متوقع تھا، ${received} موصول ہوا`;
        }
        return `غلط ان پٹ: ${expected} متوقع تھا، ${received} موصول ہوا`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `غلط ان پٹ: ${stringifyPrimitive(issue2.values[0])} متوقع تھا`;
        return `غلط آپشن: ${joinValues(issue2.values, "|")} میں سے ایک متوقع تھا`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `بہت بڑا: ${issue2.origin ?? "ویلیو"} کے ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "عناصر"} ہونے متوقع تھے`;
        return `بہت بڑا: ${issue2.origin ?? "ویلیو"} کا ${adj}${issue2.maximum.toString()} ہونا متوقع تھا`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `بہت چھوٹا: ${issue2.origin} کے ${adj}${issue2.minimum.toString()} ${sizing.unit} ہونے متوقع تھے`;
        }
        return `بہت چھوٹا: ${issue2.origin} کا ${adj}${issue2.minimum.toString()} ہونا متوقع تھا`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `غلط سٹرنگ: "${_issue.prefix}" سے شروع ہونا چاہیے`;
        }
        if (_issue.format === "ends_with")
          return `غلط سٹرنگ: "${_issue.suffix}" پر ختم ہونا چاہیے`;
        if (_issue.format === "includes")
          return `غلط سٹرنگ: "${_issue.includes}" شامل ہونا چاہیے`;
        if (_issue.format === "regex")
          return `غلط سٹرنگ: پیٹرن ${_issue.pattern} سے میچ ہونا چاہیے`;
        return `غلط ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `غلط نمبر: ${issue2.divisor} کا مضاعف ہونا چاہیے`;
      case "unrecognized_keys":
        return `غیر تسلیم شدہ کی${issue2.keys.length > 1 ? "ز" : ""}: ${joinValues(issue2.keys, "، ")}`;
      case "invalid_key":
        return `${issue2.origin} میں غلط کی`;
      case "invalid_union":
        return "غلط ان پٹ";
      case "invalid_element":
        return `${issue2.origin} میں غلط ویلیو`;
      default:
        return `غلط ان پٹ`;
    }
  };
};
function ur_default() {
  return {
    localeError: error43()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js
var error44 = () => {
  const Sizable = {
    string: { unit: "belgi", verb: "bo‘lishi kerak" },
    file: { unit: "bayt", verb: "bo‘lishi kerak" },
    array: { unit: "element", verb: "bo‘lishi kerak" },
    set: { unit: "element", verb: "bo‘lishi kerak" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "kirish",
    email: "elektron pochta manzili",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO sana va vaqti",
    date: "ISO sana",
    time: "ISO vaqt",
    duration: "ISO davomiylik",
    ipv4: "IPv4 manzil",
    ipv6: "IPv6 manzil",
    mac: "MAC manzil",
    cidrv4: "IPv4 diapazon",
    cidrv6: "IPv6 diapazon",
    base64: "base64 kodlangan satr",
    base64url: "base64url kodlangan satr",
    json_string: "JSON satr",
    e164: "E.164 raqam",
    jwt: "JWT",
    template_literal: "kirish"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "raqam",
    array: "massiv"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Noto‘g‘ri kirish: kutilgan instanceof ${issue2.expected}, qabul qilingan ${received}`;
        }
        return `Noto‘g‘ri kirish: kutilgan ${expected}, qabul qilingan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Noto‘g‘ri kirish: kutilgan ${stringifyPrimitive(issue2.values[0])}`;
        return `Noto‘g‘ri variant: quyidagilardan biri kutilgan ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`;
        return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
        }
        return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Noto‘g‘ri satr: "${_issue.prefix}" bilan boshlanishi kerak`;
        if (_issue.format === "ends_with")
          return `Noto‘g‘ri satr: "${_issue.suffix}" bilan tugashi kerak`;
        if (_issue.format === "includes")
          return `Noto‘g‘ri satr: "${_issue.includes}" ni o‘z ichiga olishi kerak`;
        if (_issue.format === "regex")
          return `Noto‘g‘ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`;
        return `Noto‘g‘ri ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Noto‘g‘ri raqam: ${issue2.divisor} ning karralisi bo‘lishi kerak`;
      case "unrecognized_keys":
        return `Noma’lum kalit${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} dagi kalit noto‘g‘ri`;
      case "invalid_union":
        return "Noto‘g‘ri kirish";
      case "invalid_element":
        return `${issue2.origin} da noto‘g‘ri qiymat`;
      default:
        return `Noto‘g‘ri kirish`;
    }
  };
};
function uz_default() {
  return {
    localeError: error44()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js
var error45 = () => {
  const Sizable = {
    string: { unit: "ký tự", verb: "có" },
    file: { unit: "byte", verb: "có" },
    array: { unit: "phần tử", verb: "có" },
    set: { unit: "phần tử", verb: "có" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "đầu vào",
    email: "địa chỉ email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ngày giờ ISO",
    date: "ngày ISO",
    time: "giờ ISO",
    duration: "khoảng thời gian ISO",
    ipv4: "địa chỉ IPv4",
    ipv6: "địa chỉ IPv6",
    cidrv4: "dải IPv4",
    cidrv6: "dải IPv6",
    base64: "chuỗi mã hóa base64",
    base64url: "chuỗi mã hóa base64url",
    json_string: "chuỗi JSON",
    e164: "số E.164",
    jwt: "JWT",
    template_literal: "đầu vào"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "số",
    array: "mảng"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Đầu vào không hợp lệ: mong đợi instanceof ${issue2.expected}, nhận được ${received}`;
        }
        return `Đầu vào không hợp lệ: mong đợi ${expected}, nhận được ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue2.values[0])}`;
        return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Quá lớn: mong đợi ${issue2.origin ?? "giá trị"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "phần tử"}`;
        return `Quá lớn: mong đợi ${issue2.origin ?? "giá trị"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Quá nhỏ: mong đợi ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Quá nhỏ: mong đợi ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Chuỗi không hợp lệ: phải bắt đầu bằng "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Chuỗi không hợp lệ: phải kết thúc bằng "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Chuỗi không hợp lệ: phải bao gồm "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Chuỗi không hợp lệ: phải khớp với mẫu ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} không hợp lệ`;
      }
      case "not_multiple_of":
        return `Số không hợp lệ: phải là bội số của ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Khóa không được nhận dạng: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Khóa không hợp lệ trong ${issue2.origin}`;
      case "invalid_union":
        return "Đầu vào không hợp lệ";
      case "invalid_element":
        return `Giá trị không hợp lệ trong ${issue2.origin}`;
      default:
        return `Đầu vào không hợp lệ`;
    }
  };
};
function vi_default() {
  return {
    localeError: error45()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
var error46 = () => {
  const Sizable = {
    string: { unit: "字符", verb: "包含" },
    file: { unit: "字节", verb: "包含" },
    array: { unit: "项", verb: "包含" },
    set: { unit: "项", verb: "包含" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "输入",
    email: "电子邮件",
    url: "URL",
    emoji: "表情符号",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO日期时间",
    date: "ISO日期",
    time: "ISO时间",
    duration: "ISO时长",
    ipv4: "IPv4地址",
    ipv6: "IPv6地址",
    cidrv4: "IPv4网段",
    cidrv6: "IPv6网段",
    base64: "base64编码字符串",
    base64url: "base64url编码字符串",
    json_string: "JSON字符串",
    e164: "E.164号码",
    jwt: "JWT",
    template_literal: "输入"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "数字",
    array: "数组",
    null: "空值(null)"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `无效输入：期望 instanceof ${issue2.expected}，实际接收 ${received}`;
        }
        return `无效输入：期望 ${expected}，实际接收 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `无效输入：期望 ${stringifyPrimitive(issue2.values[0])}`;
        return `无效选项：期望以下之一 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `数值过大：期望 ${issue2.origin ?? "值"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "个元素"}`;
        return `数值过大：期望 ${issue2.origin ?? "值"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `数值过小：期望 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `数值过小：期望 ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `无效字符串：必须以 "${_issue.prefix}" 开头`;
        if (_issue.format === "ends_with")
          return `无效字符串：必须以 "${_issue.suffix}" 结尾`;
        if (_issue.format === "includes")
          return `无效字符串：必须包含 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `无效字符串：必须满足正则表达式 ${_issue.pattern}`;
        return `无效${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `无效数字：必须是 ${issue2.divisor} 的倍数`;
      case "unrecognized_keys":
        return `出现未知的键(key): ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} 中的键(key)无效`;
      case "invalid_union":
        return "无效输入";
      case "invalid_element":
        return `${issue2.origin} 中包含无效值(value)`;
      default:
        return `无效输入`;
    }
  };
};
function zh_CN_default() {
  return {
    localeError: error46()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
var error47 = () => {
  const Sizable = {
    string: { unit: "字元", verb: "擁有" },
    file: { unit: "位元組", verb: "擁有" },
    array: { unit: "項目", verb: "擁有" },
    set: { unit: "項目", verb: "擁有" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "輸入",
    email: "郵件地址",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO 日期時間",
    date: "ISO 日期",
    time: "ISO 時間",
    duration: "ISO 期間",
    ipv4: "IPv4 位址",
    ipv6: "IPv6 位址",
    cidrv4: "IPv4 範圍",
    cidrv6: "IPv6 範圍",
    base64: "base64 編碼字串",
    base64url: "base64url 編碼字串",
    json_string: "JSON 字串",
    e164: "E.164 數值",
    jwt: "JWT",
    template_literal: "輸入"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `無效的輸入值：預期為 instanceof ${issue2.expected}，但收到 ${received}`;
        }
        return `無效的輸入值：預期為 ${expected}，但收到 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `無效的輸入值：預期為 ${stringifyPrimitive(issue2.values[0])}`;
        return `無效的選項：預期為以下其中之一 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `數值過大：預期 ${issue2.origin ?? "值"} 應為 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "個元素"}`;
        return `數值過大：預期 ${issue2.origin ?? "值"} 應為 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `數值過小：預期 ${issue2.origin} 應為 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `數值過小：預期 ${issue2.origin} 應為 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `無效的字串：必須以 "${_issue.prefix}" 開頭`;
        }
        if (_issue.format === "ends_with")
          return `無效的字串：必須以 "${_issue.suffix}" 結尾`;
        if (_issue.format === "includes")
          return `無效的字串：必須包含 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `無效的字串：必須符合格式 ${_issue.pattern}`;
        return `無效的 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `無效的數字：必須為 ${issue2.divisor} 的倍數`;
      case "unrecognized_keys":
        return `無法識別的鍵值${issue2.keys.length > 1 ? "們" : ""}：${joinValues(issue2.keys, "、")}`;
      case "invalid_key":
        return `${issue2.origin} 中有無效的鍵值`;
      case "invalid_union":
        return "無效的輸入值";
      case "invalid_element":
        return `${issue2.origin} 中有無效的值`;
      default:
        return `無效的輸入值`;
    }
  };
};
function zh_TW_default() {
  return {
    localeError: error47()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js
var error48 = () => {
  const Sizable = {
    string: { unit: "àmi", verb: "ní" },
    file: { unit: "bytes", verb: "ní" },
    array: { unit: "nkan", verb: "ní" },
    set: { unit: "nkan", verb: "ní" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "ẹ̀rọ ìbáwọlé",
    email: "àdírẹ́sì ìmẹ́lì",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "àkókò ISO",
    date: "ọjọ́ ISO",
    time: "àkókò ISO",
    duration: "àkókò tó pé ISO",
    ipv4: "àdírẹ́sì IPv4",
    ipv6: "àdírẹ́sì IPv6",
    cidrv4: "àgbègbè IPv4",
    cidrv6: "àgbègbè IPv6",
    base64: "ọ̀rọ̀ tí a kọ́ ní base64",
    base64url: "ọ̀rọ̀ base64url",
    json_string: "ọ̀rọ̀ JSON",
    e164: "nọ́mbà E.164",
    jwt: "JWT",
    template_literal: "ẹ̀rọ ìbáwọlé"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "nọ́mbà",
    array: "akopọ"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${issue2.expected}, àmọ̀ a rí ${received}`;
        }
        return `Ìbáwọlé aṣìṣe: a ní láti fi ${expected}, àmọ̀ a rí ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ìbáwọlé aṣìṣe: a ní láti fi ${stringifyPrimitive(issue2.values[0])}`;
        return `Àṣàyàn aṣìṣe: yan ọ̀kan lára ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Tó pọ̀ jù: a ní láti jẹ́ pé ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`;
        return `Tó pọ̀ jù: a ní láti jẹ́ ${adj}${issue2.maximum}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Kéré ju: a ní láti jẹ́ pé ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`;
        return `Kéré ju: a ní láti jẹ́ ${adj}${issue2.minimum}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${_issue.pattern}`;
        return `Aṣìṣe: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Bọtìnì àìmọ̀: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Bọtìnì aṣìṣe nínú ${issue2.origin}`;
      case "invalid_union":
        return "Ìbáwọlé aṣìṣe";
      case "invalid_element":
        return `Iye aṣìṣe nínú ${issue2.origin}`;
      default:
        return "Ìbáwọlé aṣìṣe";
    }
  };
};
function yo_default() {
  return {
    localeError: error48()
  };
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
var _a;
var $output = Symbol("ZodOutput");
var $input = Symbol("ZodInput");

class $ZodRegistry {
  constructor() {
    this._map = new WeakMap;
    this._idmap = new Map;
  }
  add(schema, ..._meta) {
    const meta = _meta[0];
    this._map.set(schema, meta);
    if (meta && typeof meta === "object" && "id" in meta) {
      this._idmap.set(meta.id, schema);
    }
    return this;
  }
  clear() {
    this._map = new WeakMap;
    this._idmap = new Map;
    return this;
  }
  remove(schema) {
    const meta = this._map.get(schema);
    if (meta && typeof meta === "object" && "id" in meta) {
      this._idmap.delete(meta.id);
    }
    this._map.delete(schema);
    return this;
  }
  get(schema) {
    const p2 = schema._zod.parent;
    if (p2) {
      const pm = { ...this.get(p2) ?? {} };
      delete pm.id;
      const f2 = { ...pm, ...this._map.get(schema) };
      return Object.keys(f2).length ? f2 : undefined;
    }
    return this._map.get(schema);
  }
  has(schema) {
    return this._map.has(schema);
  }
}
function registry() {
  return new $ZodRegistry;
}
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
var globalRegistry = globalThis.__zod_globalRegistry;
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
function _string(Class2, params) {
  return new Class2({
    type: "string",
    ...normalizeParams(params)
  });
}
function _coercedString(Class2, params) {
  return new Class2({
    type: "string",
    coerce: true,
    ...normalizeParams(params)
  });
}
function _email(Class2, params) {
  return new Class2({
    type: "string",
    format: "email",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _guid(Class2, params) {
  return new Class2({
    type: "string",
    format: "guid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _uuid(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _uuidv4(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v4",
    ...normalizeParams(params)
  });
}
function _uuidv6(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v6",
    ...normalizeParams(params)
  });
}
function _uuidv7(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v7",
    ...normalizeParams(params)
  });
}
function _url(Class2, params) {
  return new Class2({
    type: "string",
    format: "url",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _emoji2(Class2, params) {
  return new Class2({
    type: "string",
    format: "emoji",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _nanoid(Class2, params) {
  return new Class2({
    type: "string",
    format: "nanoid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cuid(Class2, params) {
  return new Class2({
    type: "string",
    format: "cuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cuid2(Class2, params) {
  return new Class2({
    type: "string",
    format: "cuid2",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ulid(Class2, params) {
  return new Class2({
    type: "string",
    format: "ulid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _xid(Class2, params) {
  return new Class2({
    type: "string",
    format: "xid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ksuid(Class2, params) {
  return new Class2({
    type: "string",
    format: "ksuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ipv4(Class2, params) {
  return new Class2({
    type: "string",
    format: "ipv4",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ipv6(Class2, params) {
  return new Class2({
    type: "string",
    format: "ipv6",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _mac(Class2, params) {
  return new Class2({
    type: "string",
    format: "mac",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cidrv4(Class2, params) {
  return new Class2({
    type: "string",
    format: "cidrv4",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cidrv6(Class2, params) {
  return new Class2({
    type: "string",
    format: "cidrv6",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _base64(Class2, params) {
  return new Class2({
    type: "string",
    format: "base64",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _base64url(Class2, params) {
  return new Class2({
    type: "string",
    format: "base64url",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _e164(Class2, params) {
  return new Class2({
    type: "string",
    format: "e164",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _jwt(Class2, params) {
  return new Class2({
    type: "string",
    format: "jwt",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
var TimePrecision = {
  Any: null,
  Minute: -1,
  Second: 0,
  Millisecond: 3,
  Microsecond: 6
};
function _isoDateTime(Class2, params) {
  return new Class2({
    type: "string",
    format: "datetime",
    check: "string_format",
    offset: false,
    local: false,
    precision: null,
    ...normalizeParams(params)
  });
}
function _isoDate(Class2, params) {
  return new Class2({
    type: "string",
    format: "date",
    check: "string_format",
    ...normalizeParams(params)
  });
}
function _isoTime(Class2, params) {
  return new Class2({
    type: "string",
    format: "time",
    check: "string_format",
    precision: null,
    ...normalizeParams(params)
  });
}
function _isoDuration(Class2, params) {
  return new Class2({
    type: "string",
    format: "duration",
    check: "string_format",
    ...normalizeParams(params)
  });
}
function _number(Class2, params) {
  return new Class2({
    type: "number",
    checks: [],
    ...normalizeParams(params)
  });
}
function _coercedNumber(Class2, params) {
  return new Class2({
    type: "number",
    coerce: true,
    checks: [],
    ...normalizeParams(params)
  });
}
function _int(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "safeint",
    ...normalizeParams(params)
  });
}
function _float32(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "float32",
    ...normalizeParams(params)
  });
}
function _float64(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "float64",
    ...normalizeParams(params)
  });
}
function _int32(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "int32",
    ...normalizeParams(params)
  });
}
function _uint32(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "uint32",
    ...normalizeParams(params)
  });
}
function _boolean(Class2, params) {
  return new Class2({
    type: "boolean",
    ...normalizeParams(params)
  });
}
function _coercedBoolean(Class2, params) {
  return new Class2({
    type: "boolean",
    coerce: true,
    ...normalizeParams(params)
  });
}
function _bigint(Class2, params) {
  return new Class2({
    type: "bigint",
    ...normalizeParams(params)
  });
}
function _coercedBigint(Class2, params) {
  return new Class2({
    type: "bigint",
    coerce: true,
    ...normalizeParams(params)
  });
}
function _int64(Class2, params) {
  return new Class2({
    type: "bigint",
    check: "bigint_format",
    abort: false,
    format: "int64",
    ...normalizeParams(params)
  });
}
function _uint64(Class2, params) {
  return new Class2({
    type: "bigint",
    check: "bigint_format",
    abort: false,
    format: "uint64",
    ...normalizeParams(params)
  });
}
function _symbol(Class2, params) {
  return new Class2({
    type: "symbol",
    ...normalizeParams(params)
  });
}
function _undefined2(Class2, params) {
  return new Class2({
    type: "undefined",
    ...normalizeParams(params)
  });
}
function _null2(Class2, params) {
  return new Class2({
    type: "null",
    ...normalizeParams(params)
  });
}
function _any(Class2) {
  return new Class2({
    type: "any"
  });
}
function _unknown(Class2) {
  return new Class2({
    type: "unknown"
  });
}
function _never(Class2, params) {
  return new Class2({
    type: "never",
    ...normalizeParams(params)
  });
}
function _void(Class2, params) {
  return new Class2({
    type: "void",
    ...normalizeParams(params)
  });
}
function _date(Class2, params) {
  return new Class2({
    type: "date",
    ...normalizeParams(params)
  });
}
function _coercedDate(Class2, params) {
  return new Class2({
    type: "date",
    coerce: true,
    ...normalizeParams(params)
  });
}
function _nan(Class2, params) {
  return new Class2({
    type: "nan",
    ...normalizeParams(params)
  });
}
function _lt(value, params) {
  return new $ZodCheckLessThan({
    check: "less_than",
    ...normalizeParams(params),
    value,
    inclusive: false
  });
}
function _lte(value, params) {
  return new $ZodCheckLessThan({
    check: "less_than",
    ...normalizeParams(params),
    value,
    inclusive: true
  });
}
function _gt(value, params) {
  return new $ZodCheckGreaterThan({
    check: "greater_than",
    ...normalizeParams(params),
    value,
    inclusive: false
  });
}
function _gte(value, params) {
  return new $ZodCheckGreaterThan({
    check: "greater_than",
    ...normalizeParams(params),
    value,
    inclusive: true
  });
}
function _positive(params) {
  return _gt(0, params);
}
function _negative(params) {
  return _lt(0, params);
}
function _nonpositive(params) {
  return _lte(0, params);
}
function _nonnegative(params) {
  return _gte(0, params);
}
function _multipleOf(value, params) {
  return new $ZodCheckMultipleOf({
    check: "multiple_of",
    ...normalizeParams(params),
    value
  });
}
function _maxSize(maximum, params) {
  return new $ZodCheckMaxSize({
    check: "max_size",
    ...normalizeParams(params),
    maximum
  });
}
function _minSize(minimum, params) {
  return new $ZodCheckMinSize({
    check: "min_size",
    ...normalizeParams(params),
    minimum
  });
}
function _size(size, params) {
  return new $ZodCheckSizeEquals({
    check: "size_equals",
    ...normalizeParams(params),
    size
  });
}
function _maxLength(maximum, params) {
  const ch = new $ZodCheckMaxLength({
    check: "max_length",
    ...normalizeParams(params),
    maximum
  });
  return ch;
}
function _minLength(minimum, params) {
  return new $ZodCheckMinLength({
    check: "min_length",
    ...normalizeParams(params),
    minimum
  });
}
function _length(length, params) {
  return new $ZodCheckLengthEquals({
    check: "length_equals",
    ...normalizeParams(params),
    length
  });
}
function _regex(pattern, params) {
  return new $ZodCheckRegex({
    check: "string_format",
    format: "regex",
    ...normalizeParams(params),
    pattern
  });
}
function _lowercase(params) {
  return new $ZodCheckLowerCase({
    check: "string_format",
    format: "lowercase",
    ...normalizeParams(params)
  });
}
function _uppercase(params) {
  return new $ZodCheckUpperCase({
    check: "string_format",
    format: "uppercase",
    ...normalizeParams(params)
  });
}
function _includes(includes, params) {
  return new $ZodCheckIncludes({
    check: "string_format",
    format: "includes",
    ...normalizeParams(params),
    includes
  });
}
function _startsWith(prefix, params) {
  return new $ZodCheckStartsWith({
    check: "string_format",
    format: "starts_with",
    ...normalizeParams(params),
    prefix
  });
}
function _endsWith(suffix, params) {
  return new $ZodCheckEndsWith({
    check: "string_format",
    format: "ends_with",
    ...normalizeParams(params),
    suffix
  });
}
function _property(property, schema, params) {
  return new $ZodCheckProperty({
    check: "property",
    property,
    schema,
    ...normalizeParams(params)
  });
}
function _mime(types4, params) {
  return new $ZodCheckMimeType({
    check: "mime_type",
    mime: types4,
    ...normalizeParams(params)
  });
}
function _overwrite(tx) {
  return new $ZodCheckOverwrite({
    check: "overwrite",
    tx
  });
}
function _normalize(form) {
  return _overwrite((input) => input.normalize(form));
}
function _trim() {
  return _overwrite((input) => input.trim());
}
function _toLowerCase() {
  return _overwrite((input) => input.toLowerCase());
}
function _toUpperCase() {
  return _overwrite((input) => input.toUpperCase());
}
function _slugify() {
  return _overwrite((input) => slugify(input));
}
function _array(Class2, element, params) {
  return new Class2({
    type: "array",
    element,
    ...normalizeParams(params)
  });
}
function _union(Class2, options, params) {
  return new Class2({
    type: "union",
    options,
    ...normalizeParams(params)
  });
}
function _xor(Class2, options, params) {
  return new Class2({
    type: "union",
    options,
    inclusive: false,
    ...normalizeParams(params)
  });
}
function _discriminatedUnion(Class2, discriminator, options, params) {
  return new Class2({
    type: "union",
    options,
    discriminator,
    ...normalizeParams(params)
  });
}
function _intersection(Class2, left, right) {
  return new Class2({
    type: "intersection",
    left,
    right
  });
}
function _tuple(Class2, items, _paramsOrRest, _params) {
  const hasRest = _paramsOrRest instanceof $ZodType;
  const params = hasRest ? _params : _paramsOrRest;
  const rest = hasRest ? _paramsOrRest : null;
  return new Class2({
    type: "tuple",
    items,
    rest,
    ...normalizeParams(params)
  });
}
function _record(Class2, keyType, valueType, params) {
  return new Class2({
    type: "record",
    keyType,
    valueType,
    ...normalizeParams(params)
  });
}
function _map(Class2, keyType, valueType, params) {
  return new Class2({
    type: "map",
    keyType,
    valueType,
    ...normalizeParams(params)
  });
}
function _set(Class2, valueType, params) {
  return new Class2({
    type: "set",
    valueType,
    ...normalizeParams(params)
  });
}
function _enum(Class2, values, params) {
  const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
  return new Class2({
    type: "enum",
    entries,
    ...normalizeParams(params)
  });
}
function _nativeEnum(Class2, entries, params) {
  return new Class2({
    type: "enum",
    entries,
    ...normalizeParams(params)
  });
}
function _literal(Class2, value, params) {
  return new Class2({
    type: "literal",
    values: Array.isArray(value) ? value : [value],
    ...normalizeParams(params)
  });
}
function _file(Class2, params) {
  return new Class2({
    type: "file",
    ...normalizeParams(params)
  });
}
function _transform(Class2, fn) {
  return new Class2({
    type: "transform",
    transform: fn
  });
}
function _optional(Class2, innerType) {
  return new Class2({
    type: "optional",
    innerType
  });
}
function _nullable(Class2, innerType) {
  return new Class2({
    type: "nullable",
    innerType
  });
}
function _default(Class2, innerType, defaultValue) {
  return new Class2({
    type: "default",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
    }
  });
}
function _nonoptional(Class2, innerType, params) {
  return new Class2({
    type: "nonoptional",
    innerType,
    ...normalizeParams(params)
  });
}
function _success(Class2, innerType) {
  return new Class2({
    type: "success",
    innerType
  });
}
function _catch(Class2, innerType, catchValue) {
  return new Class2({
    type: "catch",
    innerType,
    catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
  });
}
function _pipe(Class2, in_, out) {
  return new Class2({
    type: "pipe",
    in: in_,
    out
  });
}
function _readonly(Class2, innerType) {
  return new Class2({
    type: "readonly",
    innerType
  });
}
function _templateLiteral(Class2, parts, params) {
  return new Class2({
    type: "template_literal",
    parts,
    ...normalizeParams(params)
  });
}
function _lazy(Class2, getter) {
  return new Class2({
    type: "lazy",
    getter
  });
}
function _promise(Class2, innerType) {
  return new Class2({
    type: "promise",
    innerType
  });
}
function _custom(Class2, fn, _params) {
  const norm = normalizeParams(_params);
  norm.abort ?? (norm.abort = true);
  const schema = new Class2({
    type: "custom",
    check: "custom",
    fn,
    ...norm
  });
  return schema;
}
function _refine(Class2, fn, _params) {
  const schema = new Class2({
    type: "custom",
    check: "custom",
    fn,
    ...normalizeParams(_params)
  });
  return schema;
}
function _superRefine(fn) {
  const ch = _check((payload) => {
    payload.addIssue = (issue2) => {
      if (typeof issue2 === "string") {
        payload.issues.push(issue(issue2, payload.value, ch._zod.def));
      } else {
        const _issue = issue2;
        if (_issue.fatal)
          _issue.continue = false;
        _issue.code ?? (_issue.code = "custom");
        _issue.input ?? (_issue.input = payload.value);
        _issue.inst ?? (_issue.inst = ch);
        _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
        payload.issues.push(issue(_issue));
      }
    };
    return fn(payload.value, payload);
  });
  return ch;
}
function _check(fn, params) {
  const ch = new $ZodCheck({
    check: "custom",
    ...normalizeParams(params)
  });
  ch._zod.check = fn;
  return ch;
}
function describe(description) {
  const ch = new $ZodCheck({ check: "describe" });
  ch._zod.onattach = [
    (inst) => {
      const existing = globalRegistry.get(inst) ?? {};
      globalRegistry.add(inst, { ...existing, description });
    }
  ];
  ch._zod.check = () => {};
  return ch;
}
function meta(metadata) {
  const ch = new $ZodCheck({ check: "meta" });
  ch._zod.onattach = [
    (inst) => {
      const existing = globalRegistry.get(inst) ?? {};
      globalRegistry.add(inst, { ...existing, ...metadata });
    }
  ];
  ch._zod.check = () => {};
  return ch;
}
function _stringbool(Classes, _params) {
  const params = normalizeParams(_params);
  let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
  let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
  if (params.case !== "sensitive") {
    truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
    falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
  }
  const truthySet = new Set(truthyArray);
  const falsySet = new Set(falsyArray);
  const _Codec = Classes.Codec ?? $ZodCodec;
  const _Boolean = Classes.Boolean ?? $ZodBoolean;
  const _String = Classes.String ?? $ZodString;
  const stringSchema = new _String({ type: "string", error: params.error });
  const booleanSchema = new _Boolean({ type: "boolean", error: params.error });
  const codec = new _Codec({
    type: "pipe",
    in: stringSchema,
    out: booleanSchema,
    transform: (input, payload) => {
      let data = input;
      if (params.case !== "sensitive")
        data = data.toLowerCase();
      if (truthySet.has(data)) {
        return true;
      } else if (falsySet.has(data)) {
        return false;
      } else {
        payload.issues.push({
          code: "invalid_value",
          expected: "stringbool",
          values: [...truthySet, ...falsySet],
          input: payload.value,
          inst: codec,
          continue: false
        });
        return {};
      }
    },
    reverseTransform: (input, _payload) => {
      if (input === true) {
        return truthyArray[0] || "true";
      } else {
        return falsyArray[0] || "false";
      }
    },
    error: params.error
  });
  return codec;
}
function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
  const params = normalizeParams(_params);
  const def = {
    ...normalizeParams(_params),
    check: "string_format",
    type: "string",
    format,
    fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
    ...params
  };
  if (fnOrRegex instanceof RegExp) {
    def.pattern = fnOrRegex;
  }
  const inst = new Class2(def);
  return inst;
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
function initializeContext(params) {
  let target = params?.target ?? "draft-2020-12";
  if (target === "draft-4")
    target = "draft-04";
  if (target === "draft-7")
    target = "draft-07";
  return {
    processors: params.processors ?? {},
    metadataRegistry: params?.metadata ?? globalRegistry,
    target,
    unrepresentable: params?.unrepresentable ?? "throw",
    override: params?.override ?? (() => {}),
    io: params?.io ?? "output",
    counter: 0,
    seen: new Map,
    cycles: params?.cycles ?? "ref",
    reused: params?.reused ?? "inline",
    external: params?.external ?? undefined
  };
}
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
  var _a2;
  const def = schema._zod.def;
  const seen = ctx.seen.get(schema);
  if (seen) {
    seen.count++;
    const isCycle = _params.schemaPath.includes(schema);
    if (isCycle) {
      seen.cycle = _params.path;
    }
    return seen.schema;
  }
  const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };
  ctx.seen.set(schema, result);
  const overrideSchema = schema._zod.toJSONSchema?.();
  if (overrideSchema) {
    result.schema = overrideSchema;
  } else {
    const params = {
      ..._params,
      schemaPath: [..._params.schemaPath, schema],
      path: _params.path
    };
    if (schema._zod.processJSONSchema) {
      schema._zod.processJSONSchema(ctx, result.schema, params);
    } else {
      const _json = result.schema;
      const processor = ctx.processors[def.type];
      if (!processor) {
        throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
      }
      processor(schema, ctx, _json, params);
    }
    const parent = schema._zod.parent;
    if (parent) {
      if (!result.ref)
        result.ref = parent;
      process2(parent, ctx, params);
      ctx.seen.get(parent).isParent = true;
    }
  }
  const meta2 = ctx.metadataRegistry.get(schema);
  if (meta2)
    Object.assign(result.schema, meta2);
  if (ctx.io === "input" && isTransforming(schema)) {
    delete result.schema.examples;
    delete result.schema.default;
  }
  if (ctx.io === "input" && result.schema._prefault)
    (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
  delete result.schema._prefault;
  const _result = ctx.seen.get(schema);
  return _result.schema;
}
function extractDefs(ctx, schema) {
  const root = ctx.seen.get(schema);
  if (!root)
    throw new Error("Unprocessed schema. This is a bug in Zod.");
  const idToSchema = new Map;
  for (const entry of ctx.seen.entries()) {
    const id = ctx.metadataRegistry.get(entry[0])?.id;
    if (id) {
      const existing = idToSchema.get(id);
      if (existing && existing !== entry[0]) {
        throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
      }
      idToSchema.set(id, entry[0]);
    }
  }
  const makeURI = (entry) => {
    const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
    if (ctx.external) {
      const externalId = ctx.external.registry.get(entry[0])?.id;
      const uriGenerator = ctx.external.uri ?? ((id2) => id2);
      if (externalId) {
        return { ref: uriGenerator(externalId) };
      }
      const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
      entry[1].defId = id;
      return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
    }
    if (entry[1] === root) {
      return { ref: "#" };
    }
    const uriPrefix = `#`;
    const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
    const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
    return { defId, ref: defUriPrefix + defId };
  };
  const extractToDef = (entry) => {
    if (entry[1].schema.$ref) {
      return;
    }
    const seen = entry[1];
    const { ref, defId } = makeURI(entry);
    seen.def = { ...seen.schema };
    if (defId)
      seen.defId = defId;
    const schema2 = seen.schema;
    for (const key in schema2) {
      delete schema2[key];
    }
    schema2.$ref = ref;
  };
  if (ctx.cycles === "throw") {
    for (const entry of ctx.seen.entries()) {
      const seen = entry[1];
      if (seen.cycle) {
        throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + '\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.');
      }
    }
  }
  for (const entry of ctx.seen.entries()) {
    const seen = entry[1];
    if (schema === entry[0]) {
      extractToDef(entry);
      continue;
    }
    if (ctx.external) {
      const ext = ctx.external.registry.get(entry[0])?.id;
      if (schema !== entry[0] && ext) {
        extractToDef(entry);
        continue;
      }
    }
    const id = ctx.metadataRegistry.get(entry[0])?.id;
    if (id) {
      extractToDef(entry);
      continue;
    }
    if (seen.cycle) {
      extractToDef(entry);
      continue;
    }
    if (seen.count > 1) {
      if (ctx.reused === "ref") {
        extractToDef(entry);
        continue;
      }
    }
  }
}
function finalize(ctx, schema) {
  const root = ctx.seen.get(schema);
  if (!root)
    throw new Error("Unprocessed schema. This is a bug in Zod.");
  const flattenRef = (zodSchema) => {
    const seen = ctx.seen.get(zodSchema);
    if (seen.ref === null)
      return;
    const schema2 = seen.def ?? seen.schema;
    const _cached = { ...schema2 };
    const ref = seen.ref;
    seen.ref = null;
    if (ref) {
      flattenRef(ref);
      const refSeen = ctx.seen.get(ref);
      const refSchema = refSeen.schema;
      if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
        schema2.allOf = schema2.allOf ?? [];
        schema2.allOf.push(refSchema);
      } else {
        Object.assign(schema2, refSchema);
      }
      Object.assign(schema2, _cached);
      const isParentRef = zodSchema._zod.parent === ref;
      if (isParentRef) {
        for (const key in schema2) {
          if (key === "$ref" || key === "allOf")
            continue;
          if (!(key in _cached)) {
            delete schema2[key];
          }
        }
      }
      if (refSchema.$ref && refSeen.def) {
        for (const key in schema2) {
          if (key === "$ref" || key === "allOf")
            continue;
          if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) {
            delete schema2[key];
          }
        }
      }
    }
    const parent = zodSchema._zod.parent;
    if (parent && parent !== ref) {
      flattenRef(parent);
      const parentSeen = ctx.seen.get(parent);
      if (parentSeen?.schema.$ref) {
        schema2.$ref = parentSeen.schema.$ref;
        if (parentSeen.def) {
          for (const key in schema2) {
            if (key === "$ref" || key === "allOf")
              continue;
            if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) {
              delete schema2[key];
            }
          }
        }
      }
    }
    ctx.override({
      zodSchema,
      jsonSchema: schema2,
      path: seen.path ?? []
    });
  };
  for (const entry of [...ctx.seen.entries()].reverse()) {
    flattenRef(entry[0]);
  }
  const result = {};
  if (ctx.target === "draft-2020-12") {
    result.$schema = "https://json-schema.org/draft/2020-12/schema";
  } else if (ctx.target === "draft-07") {
    result.$schema = "http://json-schema.org/draft-07/schema#";
  } else if (ctx.target === "draft-04") {
    result.$schema = "http://json-schema.org/draft-04/schema#";
  } else if (ctx.target === "openapi-3.0") {}
  if (ctx.external?.uri) {
    const id = ctx.external.registry.get(schema)?.id;
    if (!id)
      throw new Error("Schema is missing an `id` property");
    result.$id = ctx.external.uri(id);
  }
  Object.assign(result, root.def ?? root.schema);
  const defs = ctx.external?.defs ?? {};
  for (const entry of ctx.seen.entries()) {
    const seen = entry[1];
    if (seen.def && seen.defId) {
      defs[seen.defId] = seen.def;
    }
  }
  if (ctx.external) {} else {
    if (Object.keys(defs).length > 0) {
      if (ctx.target === "draft-2020-12") {
        result.$defs = defs;
      } else {
        result.definitions = defs;
      }
    }
  }
  try {
    const finalized = JSON.parse(JSON.stringify(result));
    Object.defineProperty(finalized, "~standard", {
      value: {
        ...schema["~standard"],
        jsonSchema: {
          input: createStandardJSONSchemaMethod(schema, "input", ctx.processors),
          output: createStandardJSONSchemaMethod(schema, "output", ctx.processors)
        }
      },
      enumerable: false,
      writable: false
    });
    return finalized;
  } catch (_err) {
    throw new Error("Error converting schema to JSON.");
  }
}
function isTransforming(_schema, _ctx) {
  const ctx = _ctx ?? { seen: new Set };
  if (ctx.seen.has(_schema))
    return false;
  ctx.seen.add(_schema);
  const def = _schema._zod.def;
  if (def.type === "transform")
    return true;
  if (def.type === "array")
    return isTransforming(def.element, ctx);
  if (def.type === "set")
    return isTransforming(def.valueType, ctx);
  if (def.type === "lazy")
    return isTransforming(def.getter(), ctx);
  if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
    return isTransforming(def.innerType, ctx);
  }
  if (def.type === "intersection") {
    return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
  }
  if (def.type === "record" || def.type === "map") {
    return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
  }
  if (def.type === "pipe") {
    return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
  }
  if (def.type === "object") {
    for (const key in def.shape) {
      if (isTransforming(def.shape[key], ctx))
        return true;
    }
    return false;
  }
  if (def.type === "union") {
    for (const option of def.options) {
      if (isTransforming(option, ctx))
        return true;
    }
    return false;
  }
  if (def.type === "tuple") {
    for (const item of def.items) {
      if (isTransforming(item, ctx))
        return true;
    }
    if (def.rest && isTransforming(def.rest, ctx))
      return true;
    return false;
  }
  return false;
}
var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
  const ctx = initializeContext({ ...params, processors });
  process2(schema, ctx);
  extractDefs(ctx, schema);
  return finalize(ctx, schema);
};
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
  const { libraryOptions, target } = params ?? {};
  const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
  process2(schema, ctx);
  extractDefs(ctx, schema);
  return finalize(ctx, schema);
};
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
var formatMap = {
  guid: "uuid",
  url: "uri",
  datetime: "date-time",
  json_string: "json-string",
  regex: ""
};
var stringProcessor = (schema, ctx, _json, _params) => {
  const json2 = _json;
  json2.type = "string";
  const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
  if (typeof minimum === "number")
    json2.minLength = minimum;
  if (typeof maximum === "number")
    json2.maxLength = maximum;
  if (format) {
    json2.format = formatMap[format] ?? format;
    if (json2.format === "")
      delete json2.format;
    if (format === "time") {
      delete json2.format;
    }
  }
  if (contentEncoding)
    json2.contentEncoding = contentEncoding;
  if (patterns && patterns.size > 0) {
    const regexes = [...patterns];
    if (regexes.length === 1)
      json2.pattern = regexes[0].source;
    else if (regexes.length > 1) {
      json2.allOf = [
        ...regexes.map((regex) => ({
          ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
          pattern: regex.source
        }))
      ];
    }
  }
};
var numberProcessor = (schema, ctx, _json, _params) => {
  const json2 = _json;
  const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
  if (typeof format === "string" && format.includes("int"))
    json2.type = "integer";
  else
    json2.type = "number";
  if (typeof exclusiveMinimum === "number") {
    if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
      json2.minimum = exclusiveMinimum;
      json2.exclusiveMinimum = true;
    } else {
      json2.exclusiveMinimum = exclusiveMinimum;
    }
  }
  if (typeof minimum === "number") {
    json2.minimum = minimum;
    if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
      if (exclusiveMinimum >= minimum)
        delete json2.minimum;
      else
        delete json2.exclusiveMinimum;
    }
  }
  if (typeof exclusiveMaximum === "number") {
    if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
      json2.maximum = exclusiveMaximum;
      json2.exclusiveMaximum = true;
    } else {
      json2.exclusiveMaximum = exclusiveMaximum;
    }
  }
  if (typeof maximum === "number") {
    json2.maximum = maximum;
    if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
      if (exclusiveMaximum <= maximum)
        delete json2.maximum;
      else
        delete json2.exclusiveMaximum;
    }
  }
  if (typeof multipleOf === "number")
    json2.multipleOf = multipleOf;
};
var booleanProcessor = (_schema, _ctx, json2, _params) => {
  json2.type = "boolean";
};
var bigintProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("BigInt cannot be represented in JSON Schema");
  }
};
var symbolProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Symbols cannot be represented in JSON Schema");
  }
};
var nullProcessor = (_schema, ctx, json2, _params) => {
  if (ctx.target === "openapi-3.0") {
    json2.type = "string";
    json2.nullable = true;
    json2.enum = [null];
  } else {
    json2.type = "null";
  }
};
var undefinedProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Undefined cannot be represented in JSON Schema");
  }
};
var voidProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Void cannot be represented in JSON Schema");
  }
};
var neverProcessor = (_schema, _ctx, json2, _params) => {
  json2.not = {};
};
var anyProcessor = (_schema, _ctx, _json, _params) => {};
var unknownProcessor = (_schema, _ctx, _json, _params) => {};
var dateProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Date cannot be represented in JSON Schema");
  }
};
var enumProcessor = (schema, _ctx, json2, _params) => {
  const def = schema._zod.def;
  const values = getEnumValues(def.entries);
  if (values.every((v2) => typeof v2 === "number"))
    json2.type = "number";
  if (values.every((v2) => typeof v2 === "string"))
    json2.type = "string";
  json2.enum = values;
};
var literalProcessor = (schema, ctx, json2, _params) => {
  const def = schema._zod.def;
  const vals = [];
  for (const val of def.values) {
    if (val === undefined) {
      if (ctx.unrepresentable === "throw") {
        throw new Error("Literal `undefined` cannot be represented in JSON Schema");
      }
    } else if (typeof val === "bigint") {
      if (ctx.unrepresentable === "throw") {
        throw new Error("BigInt literals cannot be represented in JSON Schema");
      } else {
        vals.push(Number(val));
      }
    } else {
      vals.push(val);
    }
  }
  if (vals.length === 0) {} else if (vals.length === 1) {
    const val = vals[0];
    json2.type = val === null ? "null" : typeof val;
    if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
      json2.enum = [val];
    } else {
      json2.const = val;
    }
  } else {
    if (vals.every((v2) => typeof v2 === "number"))
      json2.type = "number";
    if (vals.every((v2) => typeof v2 === "string"))
      json2.type = "string";
    if (vals.every((v2) => typeof v2 === "boolean"))
      json2.type = "boolean";
    if (vals.every((v2) => v2 === null))
      json2.type = "null";
    json2.enum = vals;
  }
};
var nanProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("NaN cannot be represented in JSON Schema");
  }
};
var templateLiteralProcessor = (schema, _ctx, json2, _params) => {
  const _json = json2;
  const pattern = schema._zod.pattern;
  if (!pattern)
    throw new Error("Pattern not found in template literal");
  _json.type = "string";
  _json.pattern = pattern.source;
};
var fileProcessor = (schema, _ctx, json2, _params) => {
  const _json = json2;
  const file = {
    type: "string",
    format: "binary",
    contentEncoding: "binary"
  };
  const { minimum, maximum, mime } = schema._zod.bag;
  if (minimum !== undefined)
    file.minLength = minimum;
  if (maximum !== undefined)
    file.maxLength = maximum;
  if (mime) {
    if (mime.length === 1) {
      file.contentMediaType = mime[0];
      Object.assign(_json, file);
    } else {
      Object.assign(_json, file);
      _json.anyOf = mime.map((m2) => ({ contentMediaType: m2 }));
    }
  } else {
    Object.assign(_json, file);
  }
};
var successProcessor = (_schema, _ctx, json2, _params) => {
  json2.type = "boolean";
};
var customProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Custom types cannot be represented in JSON Schema");
  }
};
var functionProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Function types cannot be represented in JSON Schema");
  }
};
var transformProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Transforms cannot be represented in JSON Schema");
  }
};
var mapProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Map cannot be represented in JSON Schema");
  }
};
var setProcessor = (_schema, ctx, _json, _params) => {
  if (ctx.unrepresentable === "throw") {
    throw new Error("Set cannot be represented in JSON Schema");
  }
};
var arrayProcessor = (schema, ctx, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  const { minimum, maximum } = schema._zod.bag;
  if (typeof minimum === "number")
    json2.minItems = minimum;
  if (typeof maximum === "number")
    json2.maxItems = maximum;
  json2.type = "array";
  json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
};
var objectProcessor = (schema, ctx, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  json2.type = "object";
  json2.properties = {};
  const shape = def.shape;
  for (const key in shape) {
    json2.properties[key] = process2(shape[key], ctx, {
      ...params,
      path: [...params.path, "properties", key]
    });
  }
  const allKeys = new Set(Object.keys(shape));
  const requiredKeys = new Set([...allKeys].filter((key) => {
    const v2 = def.shape[key]._zod;
    if (ctx.io === "input") {
      return v2.optin === undefined;
    } else {
      return v2.optout === undefined;
    }
  }));
  if (requiredKeys.size > 0) {
    json2.required = Array.from(requiredKeys);
  }
  if (def.catchall?._zod.def.type === "never") {
    json2.additionalProperties = false;
  } else if (!def.catchall) {
    if (ctx.io === "output")
      json2.additionalProperties = false;
  } else if (def.catchall) {
    json2.additionalProperties = process2(def.catchall, ctx, {
      ...params,
      path: [...params.path, "additionalProperties"]
    });
  }
};
var unionProcessor = (schema, ctx, json2, params) => {
  const def = schema._zod.def;
  const isExclusive = def.inclusive === false;
  const options = def.options.map((x, i) => process2(x, ctx, {
    ...params,
    path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
  }));
  if (isExclusive) {
    json2.oneOf = options;
  } else {
    json2.anyOf = options;
  }
};
var intersectionProcessor = (schema, ctx, json2, params) => {
  const def = schema._zod.def;
  const a = process2(def.left, ctx, {
    ...params,
    path: [...params.path, "allOf", 0]
  });
  const b2 = process2(def.right, ctx, {
    ...params,
    path: [...params.path, "allOf", 1]
  });
  const isSimpleIntersection = (val) => ("allOf" in val) && Object.keys(val).length === 1;
  const allOf = [
    ...isSimpleIntersection(a) ? a.allOf : [a],
    ...isSimpleIntersection(b2) ? b2.allOf : [b2]
  ];
  json2.allOf = allOf;
};
var tupleProcessor = (schema, ctx, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  json2.type = "array";
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
  const prefixItems = def.items.map((x, i) => process2(x, ctx, {
    ...params,
    path: [...params.path, prefixPath, i]
  }));
  const rest = def.rest ? process2(def.rest, ctx, {
    ...params,
    path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
  }) : null;
  if (ctx.target === "draft-2020-12") {
    json2.prefixItems = prefixItems;
    if (rest) {
      json2.items = rest;
    }
  } else if (ctx.target === "openapi-3.0") {
    json2.items = {
      anyOf: prefixItems
    };
    if (rest) {
      json2.items.anyOf.push(rest);
    }
    json2.minItems = prefixItems.length;
    if (!rest) {
      json2.maxItems = prefixItems.length;
    }
  } else {
    json2.items = prefixItems;
    if (rest) {
      json2.additionalItems = rest;
    }
  }
  const { minimum, maximum } = schema._zod.bag;
  if (typeof minimum === "number")
    json2.minItems = minimum;
  if (typeof maximum === "number")
    json2.maxItems = maximum;
};
var recordProcessor = (schema, ctx, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  json2.type = "object";
  const keyType = def.keyType;
  const keyBag = keyType._zod.bag;
  const patterns = keyBag?.patterns;
  if (def.mode === "loose" && patterns && patterns.size > 0) {
    const valueSchema = process2(def.valueType, ctx, {
      ...params,
      path: [...params.path, "patternProperties", "*"]
    });
    json2.patternProperties = {};
    for (const pattern of patterns) {
      json2.patternProperties[pattern.source] = valueSchema;
    }
  } else {
    if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
      json2.propertyNames = process2(def.keyType, ctx, {
        ...params,
        path: [...params.path, "propertyNames"]
      });
    }
    json2.additionalProperties = process2(def.valueType, ctx, {
      ...params,
      path: [...params.path, "additionalProperties"]
    });
  }
  const keyValues = keyType._zod.values;
  if (keyValues) {
    const validKeyValues = [...keyValues].filter((v2) => typeof v2 === "string" || typeof v2 === "number");
    if (validKeyValues.length > 0) {
      json2.required = validKeyValues;
    }
  }
};
var nullableProcessor = (schema, ctx, json2, params) => {
  const def = schema._zod.def;
  const inner = process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  if (ctx.target === "openapi-3.0") {
    seen.ref = def.innerType;
    json2.nullable = true;
  } else {
    json2.anyOf = [inner, { type: "null" }];
  }
};
var nonoptionalProcessor = (schema, ctx, _json, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = def.innerType;
};
var defaultProcessor = (schema, ctx, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = def.innerType;
  json2.default = JSON.parse(JSON.stringify(def.defaultValue));
};
var prefaultProcessor = (schema, ctx, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = def.innerType;
  if (ctx.io === "input")
    json2._prefault = JSON.parse(JSON.stringify(def.defaultValue));
};
var catchProcessor = (schema, ctx, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = def.innerType;
  let catchValue;
  try {
    catchValue = def.catchValue(undefined);
  } catch {
    throw new Error("Dynamic catch values are not supported in JSON Schema");
  }
  json2.default = catchValue;
};
var pipeProcessor = (schema, ctx, _json, params) => {
  const def = schema._zod.def;
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
  process2(innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = innerType;
};
var readonlyProcessor = (schema, ctx, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = def.innerType;
  json2.readOnly = true;
};
var promiseProcessor = (schema, ctx, _json, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = def.innerType;
};
var optionalProcessor = (schema, ctx, _json, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = def.innerType;
};
var lazyProcessor = (schema, ctx, _json, params) => {
  const innerType = schema._zod.innerType;
  process2(innerType, ctx, params);
  const seen = ctx.seen.get(schema);
  seen.ref = innerType;
};
var allProcessors = {
  string: stringProcessor,
  number: numberProcessor,
  boolean: booleanProcessor,
  bigint: bigintProcessor,
  symbol: symbolProcessor,
  null: nullProcessor,
  undefined: undefinedProcessor,
  void: voidProcessor,
  never: neverProcessor,
  any: anyProcessor,
  unknown: unknownProcessor,
  date: dateProcessor,
  enum: enumProcessor,
  literal: literalProcessor,
  nan: nanProcessor,
  template_literal: templateLiteralProcessor,
  file: fileProcessor,
  success: successProcessor,
  custom: customProcessor,
  function: functionProcessor,
  transform: transformProcessor,
  map: mapProcessor,
  set: setProcessor,
  array: arrayProcessor,
  object: objectProcessor,
  union: unionProcessor,
  intersection: intersectionProcessor,
  tuple: tupleProcessor,
  record: recordProcessor,
  nullable: nullableProcessor,
  nonoptional: nonoptionalProcessor,
  default: defaultProcessor,
  prefault: prefaultProcessor,
  catch: catchProcessor,
  pipe: pipeProcessor,
  readonly: readonlyProcessor,
  promise: promiseProcessor,
  optional: optionalProcessor,
  lazy: lazyProcessor
};
function toJSONSchema(input, params) {
  if ("_idmap" in input) {
    const registry2 = input;
    const ctx2 = initializeContext({ ...params, processors: allProcessors });
    const defs = {};
    for (const entry of registry2._idmap.entries()) {
      const [_2, schema] = entry;
      process2(schema, ctx2);
    }
    const schemas = {};
    const external = {
      registry: registry2,
      uri: params?.uri,
      defs
    };
    ctx2.external = external;
    for (const entry of registry2._idmap.entries()) {
      const [key, schema] = entry;
      extractDefs(ctx2, schema);
      schemas[key] = finalize(ctx2, schema);
    }
    if (Object.keys(defs).length > 0) {
      const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
      schemas.__shared = {
        [defsSegment]: defs
      };
    }
    return { schemas };
  }
  const ctx = initializeContext({ ...params, processors: allProcessors });
  process2(input, ctx);
  extractDefs(ctx, input);
  return finalize(ctx, input);
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
class JSONSchemaGenerator {
  get metadataRegistry() {
    return this.ctx.metadataRegistry;
  }
  get target() {
    return this.ctx.target;
  }
  get unrepresentable() {
    return this.ctx.unrepresentable;
  }
  get override() {
    return this.ctx.override;
  }
  get io() {
    return this.ctx.io;
  }
  get counter() {
    return this.ctx.counter;
  }
  set counter(value) {
    this.ctx.counter = value;
  }
  get seen() {
    return this.ctx.seen;
  }
  constructor(params) {
    let normalizedTarget = params?.target ?? "draft-2020-12";
    if (normalizedTarget === "draft-4")
      normalizedTarget = "draft-04";
    if (normalizedTarget === "draft-7")
      normalizedTarget = "draft-07";
    this.ctx = initializeContext({
      processors: allProcessors,
      target: normalizedTarget,
      ...params?.metadata && { metadata: params.metadata },
      ...params?.unrepresentable && { unrepresentable: params.unrepresentable },
      ...params?.override && { override: params.override },
      ...params?.io && { io: params.io }
    });
  }
  process(schema, _params = { path: [], schemaPath: [] }) {
    return process2(schema, this.ctx, _params);
  }
  emit(schema, _params) {
    if (_params) {
      if (_params.cycles)
        this.ctx.cycles = _params.cycles;
      if (_params.reused)
        this.ctx.reused = _params.reused;
      if (_params.external)
        this.ctx.external = _params.external;
    }
    extractDefs(this.ctx, schema);
    const result = finalize(this.ctx, schema);
    const { "~standard": _2, ...plainResult } = result;
    return plainResult;
  }
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
var exports_json_schema = {};
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
var exports_schemas2 = {};
__export(exports_schemas2, {
  xor: () => xor,
  xid: () => xid2,
  void: () => _void2,
  uuidv7: () => uuidv7,
  uuidv6: () => uuidv6,
  uuidv4: () => uuidv4,
  uuid: () => uuid3,
  url: () => url,
  unknown: () => unknown,
  union: () => union2,
  undefined: () => _undefined3,
  ulid: () => ulid2,
  uint64: () => uint64,
  uint32: () => uint32,
  tuple: () => tuple,
  transform: () => transform,
  templateLiteral: () => templateLiteral,
  symbol: () => symbol,
  superRefine: () => superRefine,
  success: () => success,
  stringbool: () => stringbool,
  stringFormat: () => stringFormat,
  string: () => string2,
  strictObject: () => strictObject,
  set: () => set,
  refine: () => refine,
  record: () => record,
  readonly: () => readonly,
  promise: () => promise,
  preprocess: () => preprocess,
  prefault: () => prefault,
  pipe: () => pipe,
  partialRecord: () => partialRecord,
  optional: () => optional,
  object: () => object,
  number: () => number2,
  nullish: () => nullish2,
  nullable: () => nullable,
  null: () => _null3,
  nonoptional: () => nonoptional,
  never: () => never,
  nativeEnum: () => nativeEnum,
  nanoid: () => nanoid2,
  nan: () => nan,
  meta: () => meta2,
  map: () => map,
  mac: () => mac2,
  looseRecord: () => looseRecord,
  looseObject: () => looseObject,
  literal: () => literal,
  lazy: () => lazy,
  ksuid: () => ksuid2,
  keyof: () => keyof,
  jwt: () => jwt,
  json: () => json2,
  ipv6: () => ipv62,
  ipv4: () => ipv42,
  intersection: () => intersection,
  int64: () => int64,
  int32: () => int32,
  int: () => int,
  instanceof: () => _instanceof,
  httpUrl: () => httpUrl,
  hostname: () => hostname3,
  hex: () => hex2,
  hash: () => hash,
  guid: () => guid2,
  function: () => _function,
  float64: () => float64,
  float32: () => float32,
  file: () => file,
  exactOptional: () => exactOptional,
  enum: () => _enum2,
  emoji: () => emoji2,
  email: () => email2,
  e164: () => e1642,
  discriminatedUnion: () => discriminatedUnion,
  describe: () => describe2,
  date: () => date4,
  custom: () => custom,
  cuid2: () => cuid22,
  cuid: () => cuid3,
  codec: () => codec,
  cidrv6: () => cidrv62,
  cidrv4: () => cidrv42,
  check: () => check,
  catch: () => _catch2,
  boolean: () => boolean3,
  bigint: () => bigint3,
  base64url: () => base64url2,
  base64: () => base642,
  array: () => array,
  any: () => any,
  _function: () => _function,
  _default: () => _default2,
  _ZodString: () => _ZodString,
  ZodXor: () => ZodXor,
  ZodXID: () => ZodXID,
  ZodVoid: () => ZodVoid,
  ZodUnknown: () => ZodUnknown,
  ZodUnion: () => ZodUnion,
  ZodUndefined: () => ZodUndefined,
  ZodUUID: () => ZodUUID,
  ZodURL: () => ZodURL,
  ZodULID: () => ZodULID,
  ZodType: () => ZodType,
  ZodTuple: () => ZodTuple,
  ZodTransform: () => ZodTransform,
  ZodTemplateLiteral: () => ZodTemplateLiteral,
  ZodSymbol: () => ZodSymbol,
  ZodSuccess: () => ZodSuccess,
  ZodStringFormat: () => ZodStringFormat,
  ZodString: () => ZodString,
  ZodSet: () => ZodSet,
  ZodRecord: () => ZodRecord,
  ZodReadonly: () => ZodReadonly,
  ZodPromise: () => ZodPromise,
  ZodPrefault: () => ZodPrefault,
  ZodPipe: () => ZodPipe,
  ZodOptional: () => ZodOptional,
  ZodObject: () => ZodObject,
  ZodNumberFormat: () => ZodNumberFormat,
  ZodNumber: () => ZodNumber,
  ZodNullable: () => ZodNullable,
  ZodNull: () => ZodNull,
  ZodNonOptional: () => ZodNonOptional,
  ZodNever: () => ZodNever,
  ZodNanoID: () => ZodNanoID,
  ZodNaN: () => ZodNaN,
  ZodMap: () => ZodMap,
  ZodMAC: () => ZodMAC,
  ZodLiteral: () => ZodLiteral,
  ZodLazy: () => ZodLazy,
  ZodKSUID: () => ZodKSUID,
  ZodJWT: () => ZodJWT,
  ZodIntersection: () => ZodIntersection,
  ZodIPv6: () => ZodIPv6,
  ZodIPv4: () => ZodIPv4,
  ZodGUID: () => ZodGUID,
  ZodFunction: () => ZodFunction,
  ZodFile: () => ZodFile,
  ZodExactOptional: () => ZodExactOptional,
  ZodEnum: () => ZodEnum,
  ZodEmoji: () => ZodEmoji,
  ZodEmail: () => ZodEmail,
  ZodE164: () => ZodE164,
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
  ZodDefault: () => ZodDefault,
  ZodDate: () => ZodDate,
  ZodCustomStringFormat: () => ZodCustomStringFormat,
  ZodCustom: () => ZodCustom,
  ZodCodec: () => ZodCodec,
  ZodCatch: () => ZodCatch,
  ZodCUID2: () => ZodCUID2,
  ZodCUID: () => ZodCUID,
  ZodCIDRv6: () => ZodCIDRv6,
  ZodCIDRv4: () => ZodCIDRv4,
  ZodBoolean: () => ZodBoolean,
  ZodBigIntFormat: () => ZodBigIntFormat,
  ZodBigInt: () => ZodBigInt,
  ZodBase64URL: () => ZodBase64URL,
  ZodBase64: () => ZodBase64,
  ZodArray: () => ZodArray,
  ZodAny: () => ZodAny
});

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js
var exports_checks2 = {};
__export(exports_checks2, {
  uppercase: () => _uppercase,
  trim: () => _trim,
  toUpperCase: () => _toUpperCase,
  toLowerCase: () => _toLowerCase,
  startsWith: () => _startsWith,
  slugify: () => _slugify,
  size: () => _size,
  regex: () => _regex,
  property: () => _property,
  positive: () => _positive,
  overwrite: () => _overwrite,
  normalize: () => _normalize,
  nonpositive: () => _nonpositive,
  nonnegative: () => _nonnegative,
  negative: () => _negative,
  multipleOf: () => _multipleOf,
  minSize: () => _minSize,
  minLength: () => _minLength,
  mime: () => _mime,
  maxSize: () => _maxSize,
  maxLength: () => _maxLength,
  lte: () => _lte,
  lt: () => _lt,
  lowercase: () => _lowercase,
  length: () => _length,
  includes: () => _includes,
  gte: () => _gte,
  gt: () => _gt,
  endsWith: () => _endsWith
});

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
var exports_iso = {};
__export(exports_iso, {
  time: () => time3,
  duration: () => duration2,
  datetime: () => datetime2,
  date: () => date3,
  ZodISOTime: () => ZodISOTime,
  ZodISODuration: () => ZodISODuration,
  ZodISODateTime: () => ZodISODateTime,
  ZodISODate: () => ZodISODate
});
var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
  $ZodISODateTime.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function datetime2(params) {
  return _isoDateTime(ZodISODateTime, params);
}
var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
  $ZodISODate.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function date3(params) {
  return _isoDate(ZodISODate, params);
}
var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
  $ZodISOTime.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function time3(params) {
  return _isoTime(ZodISOTime, params);
}
var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
  $ZodISODuration.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function duration2(params) {
  return _isoDuration(ZodISODuration, params);
}

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
var initializer2 = (inst, issues) => {
  $ZodError.init(inst, issues);
  inst.name = "ZodError";
  Object.defineProperties(inst, {
    format: {
      value: (mapper) => formatError(inst, mapper)
    },
    flatten: {
      value: (mapper) => flattenError(inst, mapper)
    },
    addIssue: {
      value: (issue2) => {
        inst.issues.push(issue2);
        inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
      }
    },
    addIssues: {
      value: (issues2) => {
        inst.issues.push(...issues2);
        inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
      }
    },
    isEmpty: {
      get() {
        return inst.issues.length === 0;
      }
    }
  });
};
var ZodError = $constructor("ZodError", initializer2);
var ZodRealError = $constructor("ZodError", initializer2, {
  Parent: Error
});

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
var parse3 = /* @__PURE__ */ _parse(ZodRealError);
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
var encode2 = /* @__PURE__ */ _encode(ZodRealError);
var decode2 = /* @__PURE__ */ _decode(ZodRealError);
var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError);
var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError);
var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError);
var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
  $ZodType.init(inst, def);
  Object.assign(inst["~standard"], {
    jsonSchema: {
      input: createStandardJSONSchemaMethod(inst, "input"),
      output: createStandardJSONSchemaMethod(inst, "output")
    }
  });
  inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
  inst.def = def;
  inst.type = def.type;
  Object.defineProperty(inst, "_def", { value: def });
  inst.check = (...checks2) => {
    return inst.clone(exports_util.mergeDefs(def, {
      checks: [
        ...def.checks ?? [],
        ...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
      ]
    }), {
      parent: true
    });
  };
  inst.with = inst.check;
  inst.clone = (def2, params) => clone(inst, def2, params);
  inst.brand = () => inst;
  inst.register = (reg, meta2) => {
    reg.add(inst, meta2);
    return inst;
  };
  inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
  inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params);
  inst.spa = inst.safeParseAsync;
  inst.encode = (data, params) => encode2(inst, data, params);
  inst.decode = (data, params) => decode2(inst, data, params);
  inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params);
  inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params);
  inst.safeEncode = (data, params) => safeEncode2(inst, data, params);
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
  inst.refine = (check, params) => inst.check(refine(check, params));
  inst.superRefine = (refinement) => inst.check(superRefine(refinement));
  inst.overwrite = (fn) => inst.check(_overwrite(fn));
  inst.optional = () => optional(inst);
  inst.exactOptional = () => exactOptional(inst);
  inst.nullable = () => nullable(inst);
  inst.nullish = () => optional(nullable(inst));
  inst.nonoptional = (params) => nonoptional(inst, params);
  inst.array = () => array(inst);
  inst.or = (arg) => union2([inst, arg]);
  inst.and = (arg) => intersection(inst, arg);
  inst.transform = (tx) => pipe(inst, transform(tx));
  inst.default = (def2) => _default2(inst, def2);
  inst.prefault = (def2) => prefault(inst, def2);
  inst.catch = (params) => _catch2(inst, params);
  inst.pipe = (target) => pipe(inst, target);
  inst.readonly = () => readonly(inst);
  inst.describe = (description) => {
    const cl = inst.clone();
    globalRegistry.add(cl, { description });
    return cl;
  };
  Object.defineProperty(inst, "description", {
    get() {
      return globalRegistry.get(inst)?.description;
    },
    configurable: true
  });
  inst.meta = (...args) => {
    if (args.length === 0) {
      return globalRegistry.get(inst);
    }
    const cl = inst.clone();
    globalRegistry.add(cl, args[0]);
    return cl;
  };
  inst.isOptional = () => inst.safeParse(undefined).success;
  inst.isNullable = () => inst.safeParse(null).success;
  inst.apply = (fn) => fn(inst);
  return inst;
});
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
  $ZodString.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
  const bag = inst._zod.bag;
  inst.format = bag.format ?? null;
  inst.minLength = bag.minimum ?? null;
  inst.maxLength = bag.maximum ?? null;
  inst.regex = (...args) => inst.check(_regex(...args));
  inst.includes = (...args) => inst.check(_includes(...args));
  inst.startsWith = (...args) => inst.check(_startsWith(...args));
  inst.endsWith = (...args) => inst.check(_endsWith(...args));
  inst.min = (...args) => inst.check(_minLength(...args));
  inst.max = (...args) => inst.check(_maxLength(...args));
  inst.length = (...args) => inst.check(_length(...args));
  inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
  inst.lowercase = (params) => inst.check(_lowercase(params));
  inst.uppercase = (params) => inst.check(_uppercase(params));
  inst.trim = () => inst.check(_trim());
  inst.normalize = (...args) => inst.check(_normalize(...args));
  inst.toLowerCase = () => inst.check(_toLowerCase());
  inst.toUpperCase = () => inst.check(_toUpperCase());
  inst.slugify = () => inst.check(_slugify());
});
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
  $ZodString.init(inst, def);
  _ZodString.init(inst, def);
  inst.email = (params) => inst.check(_email(ZodEmail, params));
  inst.url = (params) => inst.check(_url(ZodURL, params));
  inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
  inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params));
  inst.guid = (params) => inst.check(_guid(ZodGUID, params));
  inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
  inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
  inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
  inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
  inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
  inst.guid = (params) => inst.check(_guid(ZodGUID, params));
  inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
  inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
  inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
  inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
  inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
  inst.xid = (params) => inst.check(_xid(ZodXID, params));
  inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
  inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
  inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
  inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
  inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
  inst.e164 = (params) => inst.check(_e164(ZodE164, params));
  inst.datetime = (params) => inst.check(datetime2(params));
  inst.date = (params) => inst.check(date3(params));
  inst.time = (params) => inst.check(time3(params));
  inst.duration = (params) => inst.check(duration2(params));
});
function string2(params) {
  return _string(ZodString, params);
}
var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  _ZodString.init(inst, def);
});
var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
  $ZodEmail.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function email2(params) {
  return _email(ZodEmail, params);
}
var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
  $ZodGUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function guid2(params) {
  return _guid(ZodGUID, params);
}
var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
  $ZodUUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function uuid3(params) {
  return _uuid(ZodUUID, params);
}
function uuidv4(params) {
  return _uuidv4(ZodUUID, params);
}
function uuidv6(params) {
  return _uuidv6(ZodUUID, params);
}
function uuidv7(params) {
  return _uuidv7(ZodUUID, params);
}
var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
  $ZodURL.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function url(params) {
  return _url(ZodURL, params);
}
function httpUrl(params) {
  return _url(ZodURL, {
    protocol: /^https?$/,
    hostname: exports_regexes.domain,
    ...exports_util.normalizeParams(params)
  });
}
var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
  $ZodEmoji.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function emoji2(params) {
  return _emoji2(ZodEmoji, params);
}
var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
  $ZodNanoID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function nanoid2(params) {
  return _nanoid(ZodNanoID, params);
}
var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
  $ZodCUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cuid3(params) {
  return _cuid(ZodCUID, params);
}
var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
  $ZodCUID2.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cuid22(params) {
  return _cuid2(ZodCUID2, params);
}
var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
  $ZodULID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ulid2(params) {
  return _ulid(ZodULID, params);
}
var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
  $ZodXID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function xid2(params) {
  return _xid(ZodXID, params);
}
var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
  $ZodKSUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ksuid2(params) {
  return _ksuid(ZodKSUID, params);
}
var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
  $ZodIPv4.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ipv42(params) {
  return _ipv4(ZodIPv4, params);
}
var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => {
  $ZodMAC.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function mac2(params) {
  return _mac(ZodMAC, params);
}
var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
  $ZodIPv6.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ipv62(params) {
  return _ipv6(ZodIPv6, params);
}
var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
  $ZodCIDRv4.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cidrv42(params) {
  return _cidrv4(ZodCIDRv4, params);
}
var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
  $ZodCIDRv6.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cidrv62(params) {
  return _cidrv6(ZodCIDRv6, params);
}
var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
  $ZodBase64.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function base642(params) {
  return _base64(ZodBase64, params);
}
var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
  $ZodBase64URL.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function base64url2(params) {
  return _base64url(ZodBase64URL, params);
}
var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
  $ZodE164.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function e1642(params) {
  return _e164(ZodE164, params);
}
var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
  $ZodJWT.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function jwt(params) {
  return _jwt(ZodJWT, params);
}
var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
  $ZodCustomStringFormat.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function stringFormat(format, fnOrRegex, _params = {}) {
  return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
}
function hostname3(_params) {
  return _stringFormat(ZodCustomStringFormat, "hostname", exports_regexes.hostname, _params);
}
function hex2(_params) {
  return _stringFormat(ZodCustomStringFormat, "hex", exports_regexes.hex, _params);
}
function hash(alg, params) {
  const enc = params?.enc ?? "hex";
  const format = `${alg}_${enc}`;
  const regex = exports_regexes[format];
  if (!regex)
    throw new Error(`Unrecognized hash format: ${format}`);
  return _stringFormat(ZodCustomStringFormat, format, regex, params);
}
var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
  $ZodNumber.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
  inst.gt = (value, params) => inst.check(_gt(value, params));
  inst.gte = (value, params) => inst.check(_gte(value, params));
  inst.min = (value, params) => inst.check(_gte(value, params));
  inst.lt = (value, params) => inst.check(_lt(value, params));
  inst.lte = (value, params) => inst.check(_lte(value, params));
  inst.max = (value, params) => inst.check(_lte(value, params));
  inst.int = (params) => inst.check(int(params));
  inst.safe = (params) => inst.check(int(params));
  inst.positive = (params) => inst.check(_gt(0, params));
  inst.nonnegative = (params) => inst.check(_gte(0, params));
  inst.negative = (params) => inst.check(_lt(0, params));
  inst.nonpositive = (params) => inst.check(_lte(0, params));
  inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
  inst.step = (value, params) => inst.check(_multipleOf(value, params));
  inst.finite = () => inst;
  const bag = inst._zod.bag;
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
  inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
  inst.isFinite = true;
  inst.format = bag.format ?? null;
});
function number2(params) {
  return _number(ZodNumber, params);
}
var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
  $ZodNumberFormat.init(inst, def);
  ZodNumber.init(inst, def);
});
function int(params) {
  return _int(ZodNumberFormat, params);
}
function float32(params) {
  return _float32(ZodNumberFormat, params);
}
function float64(params) {
  return _float64(ZodNumberFormat, params);
}
function int32(params) {
  return _int32(ZodNumberFormat, params);
}
function uint32(params) {
  return _uint32(ZodNumberFormat, params);
}
var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
  $ZodBoolean.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params);
});
function boolean3(params) {
  return _boolean(ZodBoolean, params);
}
var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
  $ZodBigInt.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params);
  inst.gte = (value, params) => inst.check(_gte(value, params));
  inst.min = (value, params) => inst.check(_gte(value, params));
  inst.gt = (value, params) => inst.check(_gt(value, params));
  inst.gte = (value, params) => inst.check(_gte(value, params));
  inst.min = (value, params) => inst.check(_gte(value, params));
  inst.lt = (value, params) => inst.check(_lt(value, params));
  inst.lte = (value, params) => inst.check(_lte(value, params));
  inst.max = (value, params) => inst.check(_lte(value, params));
  inst.positive = (params) => inst.check(_gt(BigInt(0), params));
  inst.negative = (params) => inst.check(_lt(BigInt(0), params));
  inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params));
  inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params));
  inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
  const bag = inst._zod.bag;
  inst.minValue = bag.minimum ?? null;
  inst.maxValue = bag.maximum ?? null;
  inst.format = bag.format ?? null;
});
function bigint3(params) {
  return _bigint(ZodBigInt, params);
}
var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => {
  $ZodBigIntFormat.init(inst, def);
  ZodBigInt.init(inst, def);
});
function int64(params) {
  return _int64(ZodBigIntFormat, params);
}
function uint64(params) {
  return _uint64(ZodBigIntFormat, params);
}
var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
  $ZodSymbol.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params);
});
function symbol(params) {
  return _symbol(ZodSymbol, params);
}
var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
  $ZodUndefined.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params);
});
function _undefined3(params) {
  return _undefined2(ZodUndefined, params);
}
var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
  $ZodNull.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params);
});
function _null3(params) {
  return _null2(ZodNull, params);
}
var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
  $ZodAny.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params);
});
function any() {
  return _any(ZodAny);
}
var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
  $ZodUnknown.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params);
});
function unknown() {
  return _unknown(ZodUnknown);
}
var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
  $ZodNever.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params);
});
function never(params) {
  return _never(ZodNever, params);
}
var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
  $ZodVoid.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params);
});
function _void2(params) {
  return _void(ZodVoid, params);
}
var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
  $ZodDate.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
  inst.min = (value, params) => inst.check(_gte(value, params));
  inst.max = (value, params) => inst.check(_lte(value, params));
  const c = inst._zod.bag;
  inst.minDate = c.minimum ? new Date(c.minimum) : null;
  inst.maxDate = c.maximum ? new Date(c.maximum) : null;
});
function date4(params) {
  return _date(ZodDate, params);
}
var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
  $ZodArray.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
  inst.element = def.element;
  inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
  inst.nonempty = (params) => inst.check(_minLength(1, params));
  inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
  inst.length = (len, params) => inst.check(_length(len, params));
  inst.unwrap = () => inst.element;
});
function array(element, params) {
  return _array(ZodArray, element, params);
}
function keyof(schema) {
  const shape = schema._zod.def.shape;
  return _enum2(Object.keys(shape));
}
var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
  $ZodObjectJIT.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params);
  exports_util.defineLazy(inst, "shape", () => {
    return def.shape;
  });
  inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
  inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
  inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
  inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
  inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
  inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
  inst.extend = (incoming) => {
    return exports_util.extend(inst, incoming);
  };
  inst.safeExtend = (incoming) => {
    return exports_util.safeExtend(inst, incoming);
  };
  inst.merge = (other) => exports_util.merge(inst, other);
  inst.pick = (mask) => exports_util.pick(inst, mask);
  inst.omit = (mask) => exports_util.omit(inst, mask);
  inst.partial = (...args) => exports_util.partial(ZodOptional, inst, args[0]);
  inst.required = (...args) => exports_util.required(ZodNonOptional, inst, args[0]);
});
function object(shape, params) {
  const def = {
    type: "object",
    shape: shape ?? {},
    ...exports_util.normalizeParams(params)
  };
  return new ZodObject(def);
}
function strictObject(shape, params) {
  return new ZodObject({
    type: "object",
    shape,
    catchall: never(),
    ...exports_util.normalizeParams(params)
  });
}
function looseObject(shape, params) {
  return new ZodObject({
    type: "object",
    shape,
    catchall: unknown(),
    ...exports_util.normalizeParams(params)
  });
}
var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
  $ZodUnion.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params);
  inst.options = def.options;
});
function union2(options, params) {
  return new ZodUnion({
    type: "union",
    options,
    ...exports_util.normalizeParams(params)
  });
}
var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
  ZodUnion.init(inst, def);
  $ZodXor.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params);
  inst.options = def.options;
});
function xor(options, params) {
  return new ZodXor({
    type: "union",
    options,
    inclusive: false,
    ...exports_util.normalizeParams(params)
  });
}
var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
  ZodUnion.init(inst, def);
  $ZodDiscriminatedUnion.init(inst, def);
});
function discriminatedUnion(discriminator, options, params) {
  return new ZodDiscriminatedUnion({
    type: "union",
    options,
    discriminator,
    ...exports_util.normalizeParams(params)
  });
}
var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
  $ZodIntersection.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params);
});
function intersection(left, right) {
  return new ZodIntersection({
    type: "intersection",
    left,
    right
  });
}
var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
  $ZodTuple.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params);
  inst.rest = (rest) => inst.clone({
    ...inst._zod.def,
    rest
  });
});
function tuple(items, _paramsOrRest, _params) {
  const hasRest = _paramsOrRest instanceof $ZodType;
  const params = hasRest ? _params : _paramsOrRest;
  const rest = hasRest ? _paramsOrRest : null;
  return new ZodTuple({
    type: "tuple",
    items,
    rest,
    ...exports_util.normalizeParams(params)
  });
}
var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
  $ZodRecord.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params);
  inst.keyType = def.keyType;
  inst.valueType = def.valueType;
});
function record(keyType, valueType, params) {
  return new ZodRecord({
    type: "record",
    keyType,
    valueType,
    ...exports_util.normalizeParams(params)
  });
}
function partialRecord(keyType, valueType, params) {
  const k2 = clone(keyType);
  k2._zod.values = undefined;
  return new ZodRecord({
    type: "record",
    keyType: k2,
    valueType,
    ...exports_util.normalizeParams(params)
  });
}
function looseRecord(keyType, valueType, params) {
  return new ZodRecord({
    type: "record",
    keyType,
    valueType,
    mode: "loose",
    ...exports_util.normalizeParams(params)
  });
}
var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
  $ZodMap.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params);
  inst.keyType = def.keyType;
  inst.valueType = def.valueType;
  inst.min = (...args) => inst.check(_minSize(...args));
  inst.nonempty = (params) => inst.check(_minSize(1, params));
  inst.max = (...args) => inst.check(_maxSize(...args));
  inst.size = (...args) => inst.check(_size(...args));
});
function map(keyType, valueType, params) {
  return new ZodMap({
    type: "map",
    keyType,
    valueType,
    ...exports_util.normalizeParams(params)
  });
}
var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
  $ZodSet.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params);
  inst.min = (...args) => inst.check(_minSize(...args));
  inst.nonempty = (params) => inst.check(_minSize(1, params));
  inst.max = (...args) => inst.check(_maxSize(...args));
  inst.size = (...args) => inst.check(_size(...args));
});
function set(valueType, params) {
  return new ZodSet({
    type: "set",
    valueType,
    ...exports_util.normalizeParams(params)
  });
}
var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
  $ZodEnum.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params);
  inst.enum = def.entries;
  inst.options = Object.values(def.entries);
  const keys = new Set(Object.keys(def.entries));
  inst.extract = (values, params) => {
    const newEntries = {};
    for (const value of values) {
      if (keys.has(value)) {
        newEntries[value] = def.entries[value];
      } else
        throw new Error(`Key ${value} not found in enum`);
    }
    return new ZodEnum({
      ...def,
      checks: [],
      ...exports_util.normalizeParams(params),
      entries: newEntries
    });
  };
  inst.exclude = (values, params) => {
    const newEntries = { ...def.entries };
    for (const value of values) {
      if (keys.has(value)) {
        delete newEntries[value];
      } else
        throw new Error(`Key ${value} not found in enum`);
    }
    return new ZodEnum({
      ...def,
      checks: [],
      ...exports_util.normalizeParams(params),
      entries: newEntries
    });
  };
});
function _enum2(values, params) {
  const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
  return new ZodEnum({
    type: "enum",
    entries,
    ...exports_util.normalizeParams(params)
  });
}
function nativeEnum(entries, params) {
  return new ZodEnum({
    type: "enum",
    entries,
    ...exports_util.normalizeParams(params)
  });
}
var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
  $ZodLiteral.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params);
  inst.values = new Set(def.values);
  Object.defineProperty(inst, "value", {
    get() {
      if (def.values.length > 1) {
        throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
      }
      return def.values[0];
    }
  });
});
function literal(value, params) {
  return new ZodLiteral({
    type: "literal",
    values: Array.isArray(value) ? value : [value],
    ...exports_util.normalizeParams(params)
  });
}
var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
  $ZodFile.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params);
  inst.min = (size, params) => inst.check(_minSize(size, params));
  inst.max = (size, params) => inst.check(_maxSize(size, params));
  inst.mime = (types4, params) => inst.check(_mime(Array.isArray(types4) ? types4 : [types4], params));
});
function file(params) {
  return _file(ZodFile, params);
}
var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
  $ZodTransform.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params);
  inst._zod.parse = (payload, _ctx) => {
    if (_ctx.direction === "backward") {
      throw new $ZodEncodeError(inst.constructor.name);
    }
    payload.addIssue = (issue2) => {
      if (typeof issue2 === "string") {
        payload.issues.push(exports_util.issue(issue2, payload.value, def));
      } else {
        const _issue = issue2;
        if (_issue.fatal)
          _issue.continue = false;
        _issue.code ?? (_issue.code = "custom");
        _issue.input ?? (_issue.input = payload.value);
        _issue.inst ?? (_issue.inst = inst);
        payload.issues.push(exports_util.issue(_issue));
      }
    };
    const output = def.transform(payload.value, payload);
    if (output instanceof Promise) {
      return output.then((output2) => {
        payload.value = output2;
        return payload;
      });
    }
    payload.value = output;
    return payload;
  };
});
function transform(fn) {
  return new ZodTransform({
    type: "transform",
    transform: fn
  });
}
var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
  $ZodOptional.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function optional(innerType) {
  return new ZodOptional({
    type: "optional",
    innerType
  });
}
var ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
  $ZodExactOptional.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function exactOptional(innerType) {
  return new ZodExactOptional({
    type: "optional",
    innerType
  });
}
var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
  $ZodNullable.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function nullable(innerType) {
  return new ZodNullable({
    type: "nullable",
    innerType
  });
}
function nullish2(innerType) {
  return optional(nullable(innerType));
}
var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
  $ZodDefault.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
  inst.removeDefault = inst.unwrap;
});
function _default2(innerType, defaultValue) {
  return new ZodDefault({
    type: "default",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
    }
  });
}
var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
  $ZodPrefault.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function prefault(innerType, defaultValue) {
  return new ZodPrefault({
    type: "prefault",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
    }
  });
}
var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
  $ZodNonOptional.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function nonoptional(innerType, params) {
  return new ZodNonOptional({
    type: "nonoptional",
    innerType,
    ...exports_util.normalizeParams(params)
  });
}
var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
  $ZodSuccess.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function success(innerType) {
  return new ZodSuccess({
    type: "success",
    innerType
  });
}
var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
  $ZodCatch.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
  inst.removeCatch = inst.unwrap;
});
function _catch2(innerType, catchValue) {
  return new ZodCatch({
    type: "catch",
    innerType,
    catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
  });
}
var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
  $ZodNaN.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params);
});
function nan(params) {
  return _nan(ZodNaN, params);
}
var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
  $ZodPipe.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params);
  inst.in = def.in;
  inst.out = def.out;
});
function pipe(in_, out) {
  return new ZodPipe({
    type: "pipe",
    in: in_,
    out
  });
}
var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => {
  ZodPipe.init(inst, def);
  $ZodCodec.init(inst, def);
});
function codec(in_, out, params) {
  return new ZodCodec({
    type: "pipe",
    in: in_,
    out,
    transform: params.decode,
    reverseTransform: params.encode
  });
}
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
  $ZodReadonly.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function readonly(innerType) {
  return new ZodReadonly({
    type: "readonly",
    innerType
  });
}
var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => {
  $ZodTemplateLiteral.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params);
});
function templateLiteral(parts, params) {
  return new ZodTemplateLiteral({
    type: "template_literal",
    parts,
    ...exports_util.normalizeParams(params)
  });
}
var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
  $ZodLazy.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.getter();
});
function lazy(getter) {
  return new ZodLazy({
    type: "lazy",
    getter
  });
}
var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
  $ZodPromise.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function promise(innerType) {
  return new ZodPromise({
    type: "promise",
    innerType
  });
}
var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
  $ZodFunction.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params);
});
function _function(params) {
  return new ZodFunction({
    type: "function",
    input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()),
    output: params?.output ?? unknown()
  });
}
var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
  $ZodCustom.init(inst, def);
  ZodType.init(inst, def);
  inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
});
function check(fn) {
  const ch = new $ZodCheck({
    check: "custom"
  });
  ch._zod.check = fn;
  return ch;
}
function custom(fn, _params) {
  return _custom(ZodCustom, fn ?? (() => true), _params);
}
function refine(fn, _params = {}) {
  return _refine(ZodCustom, fn, _params);
}
function superRefine(fn) {
  return _superRefine(fn);
}
var describe2 = describe;
var meta2 = meta;
function _instanceof(cls, params = {}) {
  const inst = new ZodCustom({
    type: "custom",
    check: "custom",
    fn: (data) => data instanceof cls,
    abort: true,
    ...exports_util.normalizeParams(params)
  });
  inst._zod.bag.Class = cls;
  inst._zod.check = (payload) => {
    if (!(payload.value instanceof cls)) {
      payload.issues.push({
        code: "invalid_type",
        expected: cls.name,
        input: payload.value,
        inst,
        path: [...inst._zod.def.path ?? []]
      });
    }
  };
  return inst;
}
var stringbool = (...args) => _stringbool({
  Codec: ZodCodec,
  Boolean: ZodBoolean,
  String: ZodString
}, ...args);
function json2(params) {
  const jsonSchema = lazy(() => {
    return union2([string2(params), number2(), boolean3(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]);
  });
  return jsonSchema;
}
function preprocess(fn, schema) {
  return pipe(transform(fn), schema);
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
var ZodIssueCode = {
  invalid_type: "invalid_type",
  too_big: "too_big",
  too_small: "too_small",
  invalid_format: "invalid_format",
  not_multiple_of: "not_multiple_of",
  unrecognized_keys: "unrecognized_keys",
  invalid_union: "invalid_union",
  invalid_key: "invalid_key",
  invalid_element: "invalid_element",
  invalid_value: "invalid_value",
  custom: "custom"
};
function setErrorMap(map2) {
  config({
    customError: map2
  });
}
function getErrorMap() {
  return config().customError;
}
var ZodFirstPartyTypeKind;
(function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
var z = {
  ...exports_schemas2,
  ...exports_checks2,
  iso: exports_iso
};
var RECOGNIZED_KEYS = new Set([
  "$schema",
  "$ref",
  "$defs",
  "definitions",
  "$id",
  "id",
  "$comment",
  "$anchor",
  "$vocabulary",
  "$dynamicRef",
  "$dynamicAnchor",
  "type",
  "enum",
  "const",
  "anyOf",
  "oneOf",
  "allOf",
  "not",
  "properties",
  "required",
  "additionalProperties",
  "patternProperties",
  "propertyNames",
  "minProperties",
  "maxProperties",
  "items",
  "prefixItems",
  "additionalItems",
  "minItems",
  "maxItems",
  "uniqueItems",
  "contains",
  "minContains",
  "maxContains",
  "minLength",
  "maxLength",
  "pattern",
  "format",
  "minimum",
  "maximum",
  "exclusiveMinimum",
  "exclusiveMaximum",
  "multipleOf",
  "description",
  "default",
  "contentEncoding",
  "contentMediaType",
  "contentSchema",
  "unevaluatedItems",
  "unevaluatedProperties",
  "if",
  "then",
  "else",
  "dependentSchemas",
  "dependentRequired",
  "nullable",
  "readOnly"
]);
function detectVersion(schema, defaultTarget) {
  const $schema = schema.$schema;
  if ($schema === "https://json-schema.org/draft/2020-12/schema") {
    return "draft-2020-12";
  }
  if ($schema === "http://json-schema.org/draft-07/schema#") {
    return "draft-7";
  }
  if ($schema === "http://json-schema.org/draft-04/schema#") {
    return "draft-4";
  }
  return defaultTarget ?? "draft-2020-12";
}
function resolveRef(ref, ctx) {
  if (!ref.startsWith("#")) {
    throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
  }
  const path2 = ref.slice(1).split("/").filter(Boolean);
  if (path2.length === 0) {
    return ctx.rootSchema;
  }
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
  if (path2[0] === defsKey) {
    const key = path2[1];
    if (!key || !ctx.defs[key]) {
      throw new Error(`Reference not found: ${ref}`);
    }
    return ctx.defs[key];
  }
  throw new Error(`Reference not found: ${ref}`);
}
function convertBaseSchema(schema, ctx) {
  if (schema.not !== undefined) {
    if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
      return z.never();
    }
    throw new Error("not is not supported in Zod (except { not: {} } for never)");
  }
  if (schema.unevaluatedItems !== undefined) {
    throw new Error("unevaluatedItems is not supported");
  }
  if (schema.unevaluatedProperties !== undefined) {
    throw new Error("unevaluatedProperties is not supported");
  }
  if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {
    throw new Error("Conditional schemas (if/then/else) are not supported");
  }
  if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {
    throw new Error("dependentSchemas and dependentRequired are not supported");
  }
  if (schema.$ref) {
    const refPath = schema.$ref;
    if (ctx.refs.has(refPath)) {
      return ctx.refs.get(refPath);
    }
    if (ctx.processing.has(refPath)) {
      return z.lazy(() => {
        if (!ctx.refs.has(refPath)) {
          throw new Error(`Circular reference not resolved: ${refPath}`);
        }
        return ctx.refs.get(refPath);
      });
    }
    ctx.processing.add(refPath);
    const resolved = resolveRef(refPath, ctx);
    const zodSchema2 = convertSchema(resolved, ctx);
    ctx.refs.set(refPath, zodSchema2);
    ctx.processing.delete(refPath);
    return zodSchema2;
  }
  if (schema.enum !== undefined) {
    const enumValues = schema.enum;
    if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
      return z.null();
    }
    if (enumValues.length === 0) {
      return z.never();
    }
    if (enumValues.length === 1) {
      return z.literal(enumValues[0]);
    }
    if (enumValues.every((v2) => typeof v2 === "string")) {
      return z.enum(enumValues);
    }
    const literalSchemas = enumValues.map((v2) => z.literal(v2));
    if (literalSchemas.length < 2) {
      return literalSchemas[0];
    }
    return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
  }
  if (schema.const !== undefined) {
    return z.literal(schema.const);
  }
  const type2 = schema.type;
  if (Array.isArray(type2)) {
    const typeSchemas = type2.map((t) => {
      const typeSchema = { ...schema, type: t };
      return convertBaseSchema(typeSchema, ctx);
    });
    if (typeSchemas.length === 0) {
      return z.never();
    }
    if (typeSchemas.length === 1) {
      return typeSchemas[0];
    }
    return z.union(typeSchemas);
  }
  if (!type2) {
    return z.any();
  }
  let zodSchema;
  switch (type2) {
    case "string": {
      let stringSchema = z.string();
      if (schema.format) {
        const format = schema.format;
        if (format === "email") {
          stringSchema = stringSchema.check(z.email());
        } else if (format === "uri" || format === "uri-reference") {
          stringSchema = stringSchema.check(z.url());
        } else if (format === "uuid" || format === "guid") {
          stringSchema = stringSchema.check(z.uuid());
        } else if (format === "date-time") {
          stringSchema = stringSchema.check(z.iso.datetime());
        } else if (format === "date") {
          stringSchema = stringSchema.check(z.iso.date());
        } else if (format === "time") {
          stringSchema = stringSchema.check(z.iso.time());
        } else if (format === "duration") {
          stringSchema = stringSchema.check(z.iso.duration());
        } else if (format === "ipv4") {
          stringSchema = stringSchema.check(z.ipv4());
        } else if (format === "ipv6") {
          stringSchema = stringSchema.check(z.ipv6());
        } else if (format === "mac") {
          stringSchema = stringSchema.check(z.mac());
        } else if (format === "cidr") {
          stringSchema = stringSchema.check(z.cidrv4());
        } else if (format === "cidr-v6") {
          stringSchema = stringSchema.check(z.cidrv6());
        } else if (format === "base64") {
          stringSchema = stringSchema.check(z.base64());
        } else if (format === "base64url") {
          stringSchema = stringSchema.check(z.base64url());
        } else if (format === "e164") {
          stringSchema = stringSchema.check(z.e164());
        } else if (format === "jwt") {
          stringSchema = stringSchema.check(z.jwt());
        } else if (format === "emoji") {
          stringSchema = stringSchema.check(z.emoji());
        } else if (format === "nanoid") {
          stringSchema = stringSchema.check(z.nanoid());
        } else if (format === "cuid") {
          stringSchema = stringSchema.check(z.cuid());
        } else if (format === "cuid2") {
          stringSchema = stringSchema.check(z.cuid2());
        } else if (format === "ulid") {
          stringSchema = stringSchema.check(z.ulid());
        } else if (format === "xid") {
          stringSchema = stringSchema.check(z.xid());
        } else if (format === "ksuid") {
          stringSchema = stringSchema.check(z.ksuid());
        }
      }
      if (typeof schema.minLength === "number") {
        stringSchema = stringSchema.min(schema.minLength);
      }
      if (typeof schema.maxLength === "number") {
        stringSchema = stringSchema.max(schema.maxLength);
      }
      if (schema.pattern) {
        stringSchema = stringSchema.regex(new RegExp(schema.pattern));
      }
      zodSchema = stringSchema;
      break;
    }
    case "number":
    case "integer": {
      let numberSchema = type2 === "integer" ? z.number().int() : z.number();
      if (typeof schema.minimum === "number") {
        numberSchema = numberSchema.min(schema.minimum);
      }
      if (typeof schema.maximum === "number") {
        numberSchema = numberSchema.max(schema.maximum);
      }
      if (typeof schema.exclusiveMinimum === "number") {
        numberSchema = numberSchema.gt(schema.exclusiveMinimum);
      } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") {
        numberSchema = numberSchema.gt(schema.minimum);
      }
      if (typeof schema.exclusiveMaximum === "number") {
        numberSchema = numberSchema.lt(schema.exclusiveMaximum);
      } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") {
        numberSchema = numberSchema.lt(schema.maximum);
      }
      if (typeof schema.multipleOf === "number") {
        numberSchema = numberSchema.multipleOf(schema.multipleOf);
      }
      zodSchema = numberSchema;
      break;
    }
    case "boolean": {
      zodSchema = z.boolean();
      break;
    }
    case "null": {
      zodSchema = z.null();
      break;
    }
    case "object": {
      const shape = {};
      const properties = schema.properties || {};
      const requiredSet = new Set(schema.required || []);
      for (const [key, propSchema] of Object.entries(properties)) {
        const propZodSchema = convertSchema(propSchema, ctx);
        shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();
      }
      if (schema.propertyNames) {
        const keySchema = convertSchema(schema.propertyNames, ctx);
        const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any();
        if (Object.keys(shape).length === 0) {
          zodSchema = z.record(keySchema, valueSchema);
          break;
        }
        const objectSchema2 = z.object(shape).passthrough();
        const recordSchema = z.looseRecord(keySchema, valueSchema);
        zodSchema = z.intersection(objectSchema2, recordSchema);
        break;
      }
      if (schema.patternProperties) {
        const patternProps = schema.patternProperties;
        const patternKeys = Object.keys(patternProps);
        const looseRecords = [];
        for (const pattern of patternKeys) {
          const patternValue = convertSchema(patternProps[pattern], ctx);
          const keySchema = z.string().regex(new RegExp(pattern));
          looseRecords.push(z.looseRecord(keySchema, patternValue));
        }
        const schemasToIntersect = [];
        if (Object.keys(shape).length > 0) {
          schemasToIntersect.push(z.object(shape).passthrough());
        }
        schemasToIntersect.push(...looseRecords);
        if (schemasToIntersect.length === 0) {
          zodSchema = z.object({}).passthrough();
        } else if (schemasToIntersect.length === 1) {
          zodSchema = schemasToIntersect[0];
        } else {
          let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
          for (let i = 2;i < schemasToIntersect.length; i++) {
            result = z.intersection(result, schemasToIntersect[i]);
          }
          zodSchema = result;
        }
        break;
      }
      const objectSchema = z.object(shape);
      if (schema.additionalProperties === false) {
        zodSchema = objectSchema.strict();
      } else if (typeof schema.additionalProperties === "object") {
        zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
      } else {
        zodSchema = objectSchema.passthrough();
      }
      break;
    }
    case "array": {
      const prefixItems = schema.prefixItems;
      const items = schema.items;
      if (prefixItems && Array.isArray(prefixItems)) {
        const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
        const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : undefined;
        if (rest) {
          zodSchema = z.tuple(tupleItems).rest(rest);
        } else {
          zodSchema = z.tuple(tupleItems);
        }
        if (typeof schema.minItems === "number") {
          zodSchema = zodSchema.check(z.minLength(schema.minItems));
        }
        if (typeof schema.maxItems === "number") {
          zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
        }
      } else if (Array.isArray(items)) {
        const tupleItems = items.map((item) => convertSchema(item, ctx));
        const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : undefined;
        if (rest) {
          zodSchema = z.tuple(tupleItems).rest(rest);
        } else {
          zodSchema = z.tuple(tupleItems);
        }
        if (typeof schema.minItems === "number") {
          zodSchema = zodSchema.check(z.minLength(schema.minItems));
        }
        if (typeof schema.maxItems === "number") {
          zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
        }
      } else if (items !== undefined) {
        const element = convertSchema(items, ctx);
        let arraySchema = z.array(element);
        if (typeof schema.minItems === "number") {
          arraySchema = arraySchema.min(schema.minItems);
        }
        if (typeof schema.maxItems === "number") {
          arraySchema = arraySchema.max(schema.maxItems);
        }
        zodSchema = arraySchema;
      } else {
        zodSchema = z.array(z.any());
      }
      break;
    }
    default:
      throw new Error(`Unsupported type: ${type2}`);
  }
  if (schema.description) {
    zodSchema = zodSchema.describe(schema.description);
  }
  if (schema.default !== undefined) {
    zodSchema = zodSchema.default(schema.default);
  }
  return zodSchema;
}
function convertSchema(schema, ctx) {
  if (typeof schema === "boolean") {
    return schema ? z.any() : z.never();
  }
  let baseSchema = convertBaseSchema(schema, ctx);
  const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;
  if (schema.anyOf && Array.isArray(schema.anyOf)) {
    const options = schema.anyOf.map((s) => convertSchema(s, ctx));
    const anyOfUnion = z.union(options);
    baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;
  }
  if (schema.oneOf && Array.isArray(schema.oneOf)) {
    const options = schema.oneOf.map((s) => convertSchema(s, ctx));
    const oneOfUnion = z.xor(options);
    baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;
  }
  if (schema.allOf && Array.isArray(schema.allOf)) {
    if (schema.allOf.length === 0) {
      baseSchema = hasExplicitType ? baseSchema : z.any();
    } else {
      let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
      const startIdx = hasExplicitType ? 0 : 1;
      for (let i = startIdx;i < schema.allOf.length; i++) {
        result = z.intersection(result, convertSchema(schema.allOf[i], ctx));
      }
      baseSchema = result;
    }
  }
  if (schema.nullable === true && ctx.version === "openapi-3.0") {
    baseSchema = z.nullable(baseSchema);
  }
  if (schema.readOnly === true) {
    baseSchema = z.readonly(baseSchema);
  }
  const extraMeta = {};
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
  for (const key of coreMetadataKeys) {
    if (key in schema) {
      extraMeta[key] = schema[key];
    }
  }
  const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"];
  for (const key of contentMetadataKeys) {
    if (key in schema) {
      extraMeta[key] = schema[key];
    }
  }
  for (const key of Object.keys(schema)) {
    if (!RECOGNIZED_KEYS.has(key)) {
      extraMeta[key] = schema[key];
    }
  }
  if (Object.keys(extraMeta).length > 0) {
    ctx.registry.add(baseSchema, extraMeta);
  }
  return baseSchema;
}
function fromJSONSchema(schema, params) {
  if (typeof schema === "boolean") {
    return schema ? z.any() : z.never();
  }
  const version4 = detectVersion(schema, params?.defaultTarget);
  const defs = schema.$defs || schema.definitions || {};
  const ctx = {
    version: version4,
    defs,
    refs: new Map,
    processing: new Set,
    rootSchema: schema,
    registry: params?.registry ?? globalRegistry
  };
  return convertSchema(schema, ctx);
}
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
var exports_coerce = {};
__export(exports_coerce, {
  string: () => string3,
  number: () => number3,
  date: () => date5,
  boolean: () => boolean4,
  bigint: () => bigint4
});
function string3(params) {
  return _coercedString(ZodString, params);
}
function number3(params) {
  return _coercedNumber(ZodNumber, params);
}
function boolean4(params) {
  return _coercedBoolean(ZodBoolean, params);
}
function bigint4(params) {
  return _coercedBigint(ZodBigInt, params);
}
function date5(params) {
  return _coercedDate(ZodDate, params);
}

// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
config(en_default());
// ../../node_modules/.pnpm/@wraps.dev+email@0.5.1_@react-email+components@1.0.12_react-dom@19.2.7_react@19.2.7__react@19.2.7__react@19.2.7/node_modules/@wraps.dev/email/dist/index.mjs
var WrapsEmailError = class extends Error {
  constructor(message) {
    super(message);
    this.name = "WrapsEmailError";
  }
};
var ValidationError = class extends WrapsEmailError {
  constructor(message, field) {
    super(message);
    this.name = "ValidationError";
    this.field = field;
  }
};
var SESError = class extends WrapsEmailError {
  constructor(message, code2, requestId, retryable) {
    super(message);
    this.name = "SESError";
    this.code = code2;
    this.requestId = requestId;
    this.retryable = retryable;
  }
};
async function renderReactEmail(component) {
  try {
    const { render: render4 } = await Promise.resolve().then(() => (init_dist20(), exports_dist));
    const html3 = await render4(component, {
      pretty: false
    });
    const text3 = await render4(component, {
      plainText: true
    });
    return { html: html3, text: text3 };
  } catch (error49) {
    const err = error49;
    if (err.code === "MODULE_NOT_FOUND") {
      throw new Error("React Email not installed. Install @react-email/components to use React templates.");
    }
    throw new Error(`Failed to render React email component: ${err.message || "Unknown error"}`);
  }
}
function createSESClient(config2) {
  if (config2.client) {
    return config2.client;
  }
  const clientConfig = {
    region: config2.region || "us-east-1"
  };
  if (config2.roleArn) {
    clientConfig.credentials = import_credential_providers.fromTokenFile({
      roleArn: config2.roleArn,
      roleSessionName: config2.roleSessionName || "wraps-email-session"
    });
  } else if (config2.credentials) {
    if (typeof config2.credentials === "function" || !("accessKeyId" in config2.credentials)) {
      clientConfig.credentials = config2.credentials;
    } else {
      clientConfig.credentials = {
        accessKeyId: config2.credentials.accessKeyId,
        secretAccessKey: config2.credentials.secretAccessKey,
        sessionToken: config2.credentials.sessionToken
      };
    }
  }
  if (config2.endpoint) {
    clientConfig.endpoint = config2.endpoint;
  }
  return new import_client_ses.SESClient(clientConfig);
}
function generateBoundary(prefix = "boundary") {
  return `${prefix}_${Date.now()}_${Math.random().toString(36).substring(2, 15)}`;
}
function formatEmailAddress(address) {
  if (typeof address === "string") {
    return address;
  }
  if (address.name) {
    const name3 = address.name.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
    return `"${name3}" <${address.email}>`;
  }
  return address.email;
}
function formatEmailAddresses(addresses) {
  const addressArray = Array.isArray(addresses) ? addresses : [addresses];
  return addressArray.map(formatEmailAddress).join(", ");
}
function encodeAttachment(content) {
  const buffer = typeof content === "string" ? Buffer.from(content, "base64") : content;
  const base643 = buffer.toString("base64");
  return base643.match(/.{1,76}/g)?.join(`\r
`) || base643;
}
function getMimeType(filename, providedType) {
  if (providedType) {
    return providedType;
  }
  const ext = filename.split(".").pop()?.toLowerCase();
  const mimeTypes = {
    pdf: "application/pdf",
    doc: "application/msword",
    docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    xls: "application/vnd.ms-excel",
    xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    png: "image/png",
    jpg: "image/jpeg",
    jpeg: "image/jpeg",
    gif: "image/gif",
    txt: "text/plain",
    html: "text/html",
    csv: "text/csv",
    zip: "application/zip",
    json: "application/json"
  };
  return mimeTypes[ext || ""] || "application/octet-stream";
}
function buildRawEmailMessage(params) {
  const lines = [];
  const mainBoundary = generateBoundary("main");
  const altBoundary = generateBoundary("alt");
  lines.push(`From: ${formatEmailAddress(params.from)}`);
  lines.push(`To: ${formatEmailAddresses(params.to)}`);
  if (params.cc) {
    lines.push(`Cc: ${formatEmailAddresses(params.cc)}`);
  }
  if (params.bcc) {
    lines.push(`Bcc: ${formatEmailAddresses(params.bcc)}`);
  }
  if (params.replyTo) {
    lines.push(`Reply-To: ${formatEmailAddresses(params.replyTo)}`);
  }
  lines.push(`Subject: ${params.subject}`);
  lines.push("MIME-Version: 1.0");
  lines.push(`Content-Type: multipart/mixed; boundary="${mainBoundary}"`);
  lines.push("");
  lines.push(`--${mainBoundary}`);
  if (params.text && params.html) {
    lines.push(`Content-Type: multipart/alternative; boundary="${altBoundary}"`);
    lines.push("");
    lines.push(`--${altBoundary}`);
    lines.push("Content-Type: text/plain; charset=UTF-8");
    lines.push("Content-Transfer-Encoding: 7bit");
    lines.push("");
    lines.push(params.text);
    lines.push("");
    lines.push(`--${altBoundary}`);
    lines.push("Content-Type: text/html; charset=UTF-8");
    lines.push("Content-Transfer-Encoding: 7bit");
    lines.push("");
    lines.push(params.html);
    lines.push("");
    lines.push(`--${altBoundary}--`);
  } else if (params.html) {
    lines.push("Content-Type: text/html; charset=UTF-8");
    lines.push("Content-Transfer-Encoding: 7bit");
    lines.push("");
    lines.push(params.html);
  } else if (params.text) {
    lines.push("Content-Type: text/plain; charset=UTF-8");
    lines.push("Content-Transfer-Encoding: 7bit");
    lines.push("");
    lines.push(params.text);
  }
  lines.push("");
  for (const attachment of params.attachments) {
    const mimeType = getMimeType(attachment.filename, attachment.contentType);
    const encoding = attachment.encoding || "base64";
    lines.push(`--${mainBoundary}`);
    lines.push(`Content-Type: ${mimeType}; name="${attachment.filename}"`);
    lines.push(`Content-Disposition: attachment; filename="${attachment.filename}"`);
    lines.push(`Content-Transfer-Encoding: ${encoding}`);
    lines.push("");
    if (encoding === "base64") {
      lines.push(encodeAttachment(attachment.content));
    } else {
      const content = typeof attachment.content === "string" ? attachment.content : attachment.content.toString();
      lines.push(content);
    }
    lines.push("");
  }
  lines.push(`--${mainBoundary}--`);
  return lines.join(`\r
`);
}
function normalizeEmailAddress(address) {
  if (typeof address === "string") {
    return address;
  }
  if (address.name) {
    return `"${address.name}" <${address.email}>`;
  }
  return address.email;
}
function normalizeEmailAddresses(addresses) {
  const addressArray = Array.isArray(addresses) ? addresses : [addresses];
  return addressArray.map(normalizeEmailAddress);
}
function validateEmailParams(params) {
  if (!params.from) {
    throw new ValidationError("Missing required field: from", "from");
  }
  if (!params.to) {
    throw new ValidationError("Missing required field: to", "to");
  }
  if (!params.subject) {
    throw new ValidationError("Missing required field: subject", "subject");
  }
  if (!params.html && !params.react && !params.text) {
    throw new ValidationError("Must provide at least one of: html, text, or react", "html");
  }
  if (params.html && params.react) {
    throw new ValidationError('Cannot provide both "html" and "react" parameters', "html");
  }
  validateEmailAddress(params.from, "from");
  const toAddresses = Array.isArray(params.to) ? params.to : [params.to];
  for (const [idx, addr] of toAddresses.entries()) {
    validateEmailAddress(addr, `to[${idx}]`);
  }
  if (params.cc) {
    const ccAddresses = Array.isArray(params.cc) ? params.cc : [params.cc];
    for (const [idx, addr] of ccAddresses.entries()) {
      validateEmailAddress(addr, `cc[${idx}]`);
    }
  }
  if (params.bcc) {
    const bccAddresses = Array.isArray(params.bcc) ? params.bcc : [params.bcc];
    for (const [idx, addr] of bccAddresses.entries()) {
      validateEmailAddress(addr, `bcc[${idx}]`);
    }
  }
  if (params.replyTo) {
    const replyToAddresses = Array.isArray(params.replyTo) ? params.replyTo : [params.replyTo];
    for (const [idx, addr] of replyToAddresses.entries()) {
      validateEmailAddress(addr, `replyTo[${idx}]`);
    }
  }
}
function extractEmail(address) {
  const angleMatch = address.match(/<([^>]+)>/);
  if (angleMatch) {
    return angleMatch[1].trim();
  }
  return address.trim();
}
function validateEmailAddress(address, field) {
  const email3 = typeof address === "string" ? extractEmail(address) : address.email;
  if (!email3) {
    throw new ValidationError(`Invalid email address in field: ${field}`, field);
  }
  const emailSchema = exports_external.string().email();
  const result = emailSchema.safeParse(email3);
  if (!result.success) {
    throw new ValidationError(`Invalid email format in field: ${field} (${email3})`, field);
  }
}
var WrapsEmail = class {
  constructor(config2 = {}) {
    this.sesClient = createSESClient(config2);
    this.templates = {
      create: this.createTemplate.bind(this),
      createFromReact: this.createTemplateFromReact.bind(this),
      update: this.updateTemplate.bind(this),
      get: this.getTemplate.bind(this),
      list: this.listTemplates.bind(this),
      delete: this.deleteTemplate.bind(this)
    };
  }
  async send(params) {
    validateEmailParams(params);
    let html3 = params.html;
    let text3 = params.text;
    if (params.react) {
      if (params.html) {
        throw new ValidationError('Cannot provide both "html" and "react" parameters');
      }
      const rendered = await renderReactEmail(params.react);
      html3 = rendered.html;
      text3 = text3 || rendered.text;
    }
    if (params.attachments && params.attachments.length > 0) {
      return this.sendWithAttachments(params);
    }
    const command = new import_client_ses.SendEmailCommand({
      Source: normalizeEmailAddress(params.from),
      Destination: {
        ToAddresses: normalizeEmailAddresses(params.to),
        CcAddresses: params.cc ? normalizeEmailAddresses(params.cc) : undefined,
        BccAddresses: params.bcc ? normalizeEmailAddresses(params.bcc) : undefined
      },
      ReplyToAddresses: params.replyTo ? normalizeEmailAddresses(params.replyTo) : undefined,
      Message: {
        Subject: {
          Data: params.subject,
          Charset: "UTF-8"
        },
        Body: {
          Html: html3 ? {
            Data: html3,
            Charset: "UTF-8"
          } : undefined,
          Text: text3 ? {
            Data: text3,
            Charset: "UTF-8"
          } : undefined
        }
      },
      Tags: params.tags ? Object.entries(params.tags).map(([Name2, Value]) => ({
        Name: Name2,
        Value
      })) : undefined,
      ConfigurationSetName: params.configurationSetName
    });
    try {
      const response = await this.sesClient.send(command);
      if (!response.MessageId || !response.$metadata.requestId) {
        throw new Error("Invalid response from SES: missing MessageId or requestId");
      }
      return {
        messageId: response.MessageId,
        requestId: response.$metadata.requestId
      };
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  async sendWithAttachments(params) {
    if (!params.attachments || params.attachments.length === 0) {
      throw new ValidationError("sendWithAttachments called without attachments");
    }
    if (params.attachments.length > 100) {
      throw new ValidationError("Maximum 100 attachments allowed per email");
    }
    let html3 = params.html;
    let text3 = params.text;
    if (params.react) {
      if (params.html) {
        throw new ValidationError('Cannot provide both "html" and "react" parameters');
      }
      const rendered = await renderReactEmail(params.react);
      html3 = rendered.html;
      text3 = text3 || rendered.text;
    }
    const rawMessage = buildRawEmailMessage({
      from: params.from,
      to: params.to,
      cc: params.cc,
      bcc: params.bcc,
      replyTo: params.replyTo,
      subject: params.subject,
      html: html3,
      text: text3,
      attachments: params.attachments
    });
    const rawMessageData = new TextEncoder().encode(rawMessage);
    const command = new import_client_ses.SendRawEmailCommand({
      RawMessage: {
        Data: rawMessageData
      },
      Tags: params.tags ? Object.entries(params.tags).map(([Name2, Value]) => ({
        Name: Name2,
        Value
      })) : undefined,
      ConfigurationSetName: params.configurationSetName
    });
    try {
      const response = await this.sesClient.send(command);
      if (!response.MessageId || !response.$metadata.requestId) {
        throw new Error("Invalid response from SES: missing MessageId or requestId");
      }
      return {
        messageId: response.MessageId,
        requestId: response.$metadata.requestId
      };
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  handleSESError(error49) {
    const err = error49;
    if (err.$metadata) {
      return new SESError(err.message || "SES request failed", err.name || "Unknown", err.$metadata.requestId || "unknown", err.$retryable?.throttling || false);
    }
    return error49;
  }
  async sendTemplate(params) {
    const toAddresses = Array.isArray(params.to) ? params.to : [params.to];
    const command = new import_client_ses.SendTemplatedEmailCommand({
      Source: normalizeEmailAddress(params.from),
      Destination: {
        ToAddresses: normalizeEmailAddresses(toAddresses),
        CcAddresses: params.cc ? normalizeEmailAddresses(params.cc) : undefined,
        BccAddresses: params.bcc ? normalizeEmailAddresses(params.bcc) : undefined
      },
      ReplyToAddresses: params.replyTo ? normalizeEmailAddresses(params.replyTo) : undefined,
      Template: params.template,
      TemplateData: JSON.stringify(params.templateData),
      Tags: params.tags ? Object.entries(params.tags).map(([Name2, Value]) => ({
        Name: Name2,
        Value
      })) : undefined,
      ConfigurationSetName: params.configurationSetName
    });
    try {
      const response = await this.sesClient.send(command);
      if (!response.MessageId || !response.$metadata.requestId) {
        throw new Error("Invalid response from SES: missing MessageId or requestId");
      }
      return {
        messageId: response.MessageId,
        requestId: response.$metadata.requestId
      };
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  async sendBulkTemplate(params) {
    if (params.destinations.length > 50) {
      throw new ValidationError("Maximum 50 destinations allowed per bulk send");
    }
    const command = new import_client_ses.SendBulkTemplatedEmailCommand({
      Source: normalizeEmailAddress(params.from),
      ReplyToAddresses: params.replyTo ? normalizeEmailAddresses(params.replyTo) : undefined,
      Template: params.template,
      DefaultTemplateData: params.defaultTemplateData ? JSON.stringify(params.defaultTemplateData) : undefined,
      Destinations: params.destinations.map((dest) => {
        const destToAddresses = Array.isArray(dest.to) ? dest.to : [dest.to];
        return {
          Destination: {
            ToAddresses: normalizeEmailAddresses(destToAddresses)
          },
          ReplacementTemplateData: JSON.stringify(dest.templateData),
          ReplacementTags: dest.replacementTags ? Object.entries(dest.replacementTags).map(([Name2, Value]) => ({
            Name: Name2,
            Value
          })) : undefined
        };
      }),
      DefaultTags: params.tags ? Object.entries(params.tags).map(([Name2, Value]) => ({
        Name: Name2,
        Value
      })) : undefined,
      ConfigurationSetName: params.configurationSetName
    });
    try {
      const response = await this.sesClient.send(command);
      if (!response.Status || !response.$metadata.requestId) {
        throw new Error("Invalid response from SES: missing Status or requestId");
      }
      return {
        status: response.Status.map((s3) => ({
          messageId: s3.MessageId,
          status: s3.Status,
          error: s3.Error
        })),
        requestId: response.$metadata.requestId
      };
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  async createTemplate(params) {
    const command = new import_client_ses.CreateTemplateCommand({
      Template: {
        TemplateName: params.name,
        SubjectPart: params.subject,
        HtmlPart: params.html,
        TextPart: params.text
      }
    });
    try {
      await this.sesClient.send(command);
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  async createTemplateFromReact(params) {
    const { html: html3, text: text3 } = await renderReactEmail(params.react);
    await this.createTemplate({
      name: params.name,
      subject: params.subject,
      html: html3,
      text: text3
    });
  }
  async updateTemplate(params) {
    const command = new import_client_ses.UpdateTemplateCommand({
      Template: {
        TemplateName: params.name,
        SubjectPart: params.subject,
        HtmlPart: params.html,
        TextPart: params.text
      }
    });
    try {
      await this.sesClient.send(command);
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  async getTemplate(name3) {
    const command = new import_client_ses.GetTemplateCommand({
      TemplateName: name3
    });
    try {
      const response = await this.sesClient.send(command);
      if (!response.Template?.TemplateName || !response.Template.SubjectPart) {
        throw new Error("Invalid template response from SES: missing template data");
      }
      return {
        name: response.Template.TemplateName,
        subject: response.Template.SubjectPart,
        htmlPart: response.Template.HtmlPart,
        textPart: response.Template.TextPart,
        createdTimestamp: /* @__PURE__ */ new Date
      };
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  async listTemplates() {
    const command = new import_client_ses.ListTemplatesCommand({
      MaxItems: 100
    });
    try {
      const response = await this.sesClient.send(command);
      return (response.TemplatesMetadata || []).filter((t2) => t2.Name && t2.CreatedTimestamp).map((t2) => ({
        name: t2.Name,
        createdTimestamp: t2.CreatedTimestamp
      }));
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  async deleteTemplate(name3) {
    const command = new import_client_ses.DeleteTemplateCommand({
      TemplateName: name3
    });
    try {
      await this.sesClient.send(command);
    } catch (error49) {
      throw this.handleSESError(error49);
    }
  }
  destroy() {
    this.sesClient.destroy();
  }
};
// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/buffer_utils.js
var encoder = new TextEncoder;
var decoder = new TextDecoder;
var MAX_INT32 = 2 ** 32;
function concat(...buffers) {
  const size = buffers.reduce((acc, { length: length2 }) => acc + length2, 0);
  const buf = new Uint8Array(size);
  let i = 0;
  for (const buffer of buffers) {
    buf.set(buffer, i);
    i += buffer.length;
  }
  return buf;
}
function encode4(string4) {
  const bytes = new Uint8Array(string4.length);
  for (let i = 0;i < string4.length; i++) {
    const code2 = string4.charCodeAt(i);
    if (code2 > 127) {
      throw new TypeError("non-ASCII string encountered in encode()");
    }
    bytes[i] = code2;
  }
  return bytes;
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/base64.js
function encodeBase64(input) {
  if (Uint8Array.prototype.toBase64) {
    return input.toBase64();
  }
  const CHUNK_SIZE = 32768;
  const arr = [];
  for (let i = 0;i < input.length; i += CHUNK_SIZE) {
    arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));
  }
  return btoa(arr.join(""));
}
function decodeBase64(encoded) {
  if (Uint8Array.fromBase64) {
    return Uint8Array.fromBase64(encoded);
  }
  const binary = atob(encoded);
  const bytes = new Uint8Array(binary.length);
  for (let i = 0;i < binary.length; i++) {
    bytes[i] = binary.charCodeAt(i);
  }
  return bytes;
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/util/base64url.js
function decode4(input) {
  if (Uint8Array.fromBase64) {
    return Uint8Array.fromBase64(typeof input === "string" ? input : decoder.decode(input), {
      alphabet: "base64url"
    });
  }
  let encoded = input;
  if (encoded instanceof Uint8Array) {
    encoded = decoder.decode(encoded);
  }
  encoded = encoded.replace(/-/g, "+").replace(/_/g, "/");
  try {
    return decodeBase64(encoded);
  } catch {
    throw new TypeError("The input to be decoded is not correctly encoded.");
  }
}
function encode5(input) {
  let unencoded = input;
  if (typeof unencoded === "string") {
    unencoded = encoder.encode(unencoded);
  }
  if (Uint8Array.prototype.toBase64) {
    return unencoded.toBase64({ alphabet: "base64url", omitPadding: true });
  }
  return encodeBase64(unencoded).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/util/errors.js
var exports_errors2 = {};
__export(exports_errors2, {
  JWTInvalid: () => JWTInvalid,
  JWTExpired: () => JWTExpired,
  JWTClaimValidationFailed: () => JWTClaimValidationFailed,
  JWSSignatureVerificationFailed: () => JWSSignatureVerificationFailed,
  JWSInvalid: () => JWSInvalid,
  JWKSTimeout: () => JWKSTimeout,
  JWKSNoMatchingKey: () => JWKSNoMatchingKey,
  JWKSMultipleMatchingKeys: () => JWKSMultipleMatchingKeys,
  JWKSInvalid: () => JWKSInvalid,
  JWKInvalid: () => JWKInvalid,
  JWEInvalid: () => JWEInvalid,
  JWEDecryptionFailed: () => JWEDecryptionFailed,
  JOSENotSupported: () => JOSENotSupported,
  JOSEError: () => JOSEError,
  JOSEAlgNotAllowed: () => JOSEAlgNotAllowed
});

class JOSEError extends Error {
  static code = "ERR_JOSE_GENERIC";
  code = "ERR_JOSE_GENERIC";
  constructor(message, options2) {
    super(message, options2);
    this.name = this.constructor.name;
    Error.captureStackTrace?.(this, this.constructor);
  }
}

class JWTClaimValidationFailed extends JOSEError {
  static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
  code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
  claim;
  reason;
  payload;
  constructor(message, payload, claim = "unspecified", reason = "unspecified") {
    super(message, { cause: { claim, reason, payload } });
    this.claim = claim;
    this.reason = reason;
    this.payload = payload;
  }
}

class JWTExpired extends JOSEError {
  static code = "ERR_JWT_EXPIRED";
  code = "ERR_JWT_EXPIRED";
  claim;
  reason;
  payload;
  constructor(message, payload, claim = "unspecified", reason = "unspecified") {
    super(message, { cause: { claim, reason, payload } });
    this.claim = claim;
    this.reason = reason;
    this.payload = payload;
  }
}

class JOSEAlgNotAllowed extends JOSEError {
  static code = "ERR_JOSE_ALG_NOT_ALLOWED";
  code = "ERR_JOSE_ALG_NOT_ALLOWED";
}

class JOSENotSupported extends JOSEError {
  static code = "ERR_JOSE_NOT_SUPPORTED";
  code = "ERR_JOSE_NOT_SUPPORTED";
}

class JWEDecryptionFailed extends JOSEError {
  static code = "ERR_JWE_DECRYPTION_FAILED";
  code = "ERR_JWE_DECRYPTION_FAILED";
  constructor(message = "decryption operation failed", options2) {
    super(message, options2);
  }
}

class JWEInvalid extends JOSEError {
  static code = "ERR_JWE_INVALID";
  code = "ERR_JWE_INVALID";
}

class JWSInvalid extends JOSEError {
  static code = "ERR_JWS_INVALID";
  code = "ERR_JWS_INVALID";
}

class JWTInvalid extends JOSEError {
  static code = "ERR_JWT_INVALID";
  code = "ERR_JWT_INVALID";
}

class JWKInvalid extends JOSEError {
  static code = "ERR_JWK_INVALID";
  code = "ERR_JWK_INVALID";
}

class JWKSInvalid extends JOSEError {
  static code = "ERR_JWKS_INVALID";
  code = "ERR_JWKS_INVALID";
}

class JWKSNoMatchingKey extends JOSEError {
  static code = "ERR_JWKS_NO_MATCHING_KEY";
  code = "ERR_JWKS_NO_MATCHING_KEY";
  constructor(message = "no applicable key found in the JSON Web Key Set", options2) {
    super(message, options2);
  }
}

class JWKSMultipleMatchingKeys extends JOSEError {
  [Symbol.asyncIterator];
  static code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
  code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
  constructor(message = "multiple matching keys found in the JSON Web Key Set", options2) {
    super(message, options2);
  }
}

class JWKSTimeout extends JOSEError {
  static code = "ERR_JWKS_TIMEOUT";
  code = "ERR_JWKS_TIMEOUT";
  constructor(message = "request timed out", options2) {
    super(message, options2);
  }
}

class JWSSignatureVerificationFailed extends JOSEError {
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
  constructor(message = "signature verification failed", options2) {
    super(message, options2);
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/crypto_key.js
var unusable = (name3, prop = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name3}`);
var isAlgorithm = (algorithm, name3) => algorithm.name === name3;
function getHashLength(hash2) {
  return parseInt(hash2.name.slice(4), 10);
}
function getNamedCurve(alg) {
  switch (alg) {
    case "ES256":
      return "P-256";
    case "ES384":
      return "P-384";
    case "ES512":
      return "P-521";
    default:
      throw new Error("unreachable");
  }
}
function checkUsage(key, usage) {
  if (usage && !key.usages.includes(usage)) {
    throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);
  }
}
function checkSigCryptoKey(key, alg, usage) {
  switch (alg) {
    case "HS256":
    case "HS384":
    case "HS512": {
      if (!isAlgorithm(key.algorithm, "HMAC"))
        throw unusable("HMAC");
      const expected = parseInt(alg.slice(2), 10);
      const actual = getHashLength(key.algorithm.hash);
      if (actual !== expected)
        throw unusable(`SHA-${expected}`, "algorithm.hash");
      break;
    }
    case "RS256":
    case "RS384":
    case "RS512": {
      if (!isAlgorithm(key.algorithm, "RSASSA-PKCS1-v1_5"))
        throw unusable("RSASSA-PKCS1-v1_5");
      const expected = parseInt(alg.slice(2), 10);
      const actual = getHashLength(key.algorithm.hash);
      if (actual !== expected)
        throw unusable(`SHA-${expected}`, "algorithm.hash");
      break;
    }
    case "PS256":
    case "PS384":
    case "PS512": {
      if (!isAlgorithm(key.algorithm, "RSA-PSS"))
        throw unusable("RSA-PSS");
      const expected = parseInt(alg.slice(2), 10);
      const actual = getHashLength(key.algorithm.hash);
      if (actual !== expected)
        throw unusable(`SHA-${expected}`, "algorithm.hash");
      break;
    }
    case "Ed25519":
    case "EdDSA": {
      if (!isAlgorithm(key.algorithm, "Ed25519"))
        throw unusable("Ed25519");
      break;
    }
    case "ML-DSA-44":
    case "ML-DSA-65":
    case "ML-DSA-87": {
      if (!isAlgorithm(key.algorithm, alg))
        throw unusable(alg);
      break;
    }
    case "ES256":
    case "ES384":
    case "ES512": {
      if (!isAlgorithm(key.algorithm, "ECDSA"))
        throw unusable("ECDSA");
      const expected = getNamedCurve(alg);
      const actual = key.algorithm.namedCurve;
      if (actual !== expected)
        throw unusable(expected, "algorithm.namedCurve");
      break;
    }
    default:
      throw new TypeError("CryptoKey does not support this operation");
  }
  checkUsage(key, usage);
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/invalid_key_input.js
function message(msg, actual, ...types4) {
  types4 = types4.filter(Boolean);
  if (types4.length > 2) {
    const last = types4.pop();
    msg += `one of type ${types4.join(", ")}, or ${last}.`;
  } else if (types4.length === 2) {
    msg += `one of type ${types4[0]} or ${types4[1]}.`;
  } else {
    msg += `of type ${types4[0]}.`;
  }
  if (actual == null) {
    msg += ` Received ${actual}`;
  } else if (typeof actual === "function" && actual.name) {
    msg += ` Received function ${actual.name}`;
  } else if (typeof actual === "object" && actual != null) {
    if (actual.constructor?.name) {
      msg += ` Received an instance of ${actual.constructor.name}`;
    }
  }
  return msg;
}
var invalidKeyInput = (actual, ...types4) => message("Key must be ", actual, ...types4);
var withAlg = (alg, actual, ...types4) => message(`Key for the ${alg} algorithm must be `, actual, ...types4);

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/is_key_like.js
var isCryptoKey = (key) => {
  if (key?.[Symbol.toStringTag] === "CryptoKey")
    return true;
  try {
    return key instanceof CryptoKey;
  } catch {
    return false;
  }
};
var isKeyObject = (key) => key?.[Symbol.toStringTag] === "KeyObject";
var isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/is_disjoint.js
function isDisjoint(...headers) {
  const sources = headers.filter(Boolean);
  if (sources.length === 0 || sources.length === 1) {
    return true;
  }
  let acc;
  for (const header of sources) {
    const parameters = Object.keys(header);
    if (!acc || acc.size === 0) {
      acc = new Set(parameters);
      continue;
    }
    for (const parameter of parameters) {
      if (acc.has(parameter)) {
        return false;
      }
      acc.add(parameter);
    }
  }
  return true;
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/is_object.js
var isObjectLike = (value) => typeof value === "object" && value !== null;
function isObject2(input) {
  if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") {
    return false;
  }
  if (Object.getPrototypeOf(input) === null) {
    return true;
  }
  let proto = input;
  while (Object.getPrototypeOf(proto) !== null) {
    proto = Object.getPrototypeOf(proto);
  }
  return Object.getPrototypeOf(input) === proto;
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/check_key_length.js
function checkKeyLength(alg, key) {
  if (alg.startsWith("RS") || alg.startsWith("PS")) {
    const { modulusLength } = key.algorithm;
    if (typeof modulusLength !== "number" || modulusLength < 2048) {
      throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
    }
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/jwk_to_key.js
function subtleMapping(jwk) {
  let algorithm;
  let keyUsages;
  switch (jwk.kty) {
    case "AKP": {
      switch (jwk.alg) {
        case "ML-DSA-44":
        case "ML-DSA-65":
        case "ML-DSA-87":
          algorithm = { name: jwk.alg };
          keyUsages = jwk.priv ? ["sign"] : ["verify"];
          break;
        default:
          throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
      }
      break;
    }
    case "RSA": {
      switch (jwk.alg) {
        case "PS256":
        case "PS384":
        case "PS512":
          algorithm = { name: "RSA-PSS", hash: `SHA-${jwk.alg.slice(-3)}` };
          keyUsages = jwk.d ? ["sign"] : ["verify"];
          break;
        case "RS256":
        case "RS384":
        case "RS512":
          algorithm = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${jwk.alg.slice(-3)}` };
          keyUsages = jwk.d ? ["sign"] : ["verify"];
          break;
        case "RSA-OAEP":
        case "RSA-OAEP-256":
        case "RSA-OAEP-384":
        case "RSA-OAEP-512":
          algorithm = {
            name: "RSA-OAEP",
            hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`
          };
          keyUsages = jwk.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
          break;
        default:
          throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
      }
      break;
    }
    case "EC": {
      switch (jwk.alg) {
        case "ES256":
          algorithm = { name: "ECDSA", namedCurve: "P-256" };
          keyUsages = jwk.d ? ["sign"] : ["verify"];
          break;
        case "ES384":
          algorithm = { name: "ECDSA", namedCurve: "P-384" };
          keyUsages = jwk.d ? ["sign"] : ["verify"];
          break;
        case "ES512":
          algorithm = { name: "ECDSA", namedCurve: "P-521" };
          keyUsages = jwk.d ? ["sign"] : ["verify"];
          break;
        case "ECDH-ES":
        case "ECDH-ES+A128KW":
        case "ECDH-ES+A192KW":
        case "ECDH-ES+A256KW":
          algorithm = { name: "ECDH", namedCurve: jwk.crv };
          keyUsages = jwk.d ? ["deriveBits"] : [];
          break;
        default:
          throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
      }
      break;
    }
    case "OKP": {
      switch (jwk.alg) {
        case "Ed25519":
        case "EdDSA":
          algorithm = { name: "Ed25519" };
          keyUsages = jwk.d ? ["sign"] : ["verify"];
          break;
        case "ECDH-ES":
        case "ECDH-ES+A128KW":
        case "ECDH-ES+A192KW":
        case "ECDH-ES+A256KW":
          algorithm = { name: jwk.crv };
          keyUsages = jwk.d ? ["deriveBits"] : [];
          break;
        default:
          throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
      }
      break;
    }
    default:
      throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
  }
  return { algorithm, keyUsages };
}
async function jwkToKey(jwk) {
  if (!jwk.alg) {
    throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
  }
  const { algorithm, keyUsages } = subtleMapping(jwk);
  const keyData = { ...jwk };
  if (keyData.kty !== "AKP") {
    delete keyData.alg;
  }
  delete keyData.use;
  return crypto.subtle.importKey("jwk", keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages);
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/validate_crit.js
function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {
  if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {
    throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected');
  }
  if (!protectedHeader || protectedHeader.crit === undefined) {
    return new Set;
  }
  if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input !== "string" || input.length === 0)) {
    throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
  }
  let recognized;
  if (recognizedOption !== undefined) {
    recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);
  } else {
    recognized = recognizedDefault;
  }
  for (const parameter of protectedHeader.crit) {
    if (!recognized.has(parameter)) {
      throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`);
    }
    if (joseHeader[parameter] === undefined) {
      throw new Err(`Extension Header Parameter "${parameter}" is missing`);
    }
    if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {
      throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`);
    }
  }
  return new Set(protectedHeader.crit);
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/validate_algorithms.js
function validateAlgorithms(option2, algorithms) {
  if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some((s3) => typeof s3 !== "string"))) {
    throw new TypeError(`"${option2}" option must be an array of strings`);
  }
  if (!algorithms) {
    return;
  }
  return new Set(algorithms);
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/is_jwk.js
var isJWK = (key) => isObject2(key) && typeof key.kty === "string";
var isPrivateJWK = (key) => key.kty !== "oct" && (key.kty === "AKP" && typeof key.priv === "string" || typeof key.d === "string");
var isPublicJWK = (key) => key.kty !== "oct" && key.d === undefined && key.priv === undefined;
var isSecretJWK = (key) => key.kty === "oct" && typeof key.k === "string";

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/normalize_key.js
var cache;
var handleJWK = async (key, jwk, alg, freeze = false) => {
  cache ||= new WeakMap;
  let cached2 = cache.get(key);
  if (cached2?.[alg]) {
    return cached2[alg];
  }
  const cryptoKey = await jwkToKey({ ...jwk, alg });
  if (freeze)
    Object.freeze(key);
  if (!cached2) {
    cache.set(key, { [alg]: cryptoKey });
  } else {
    cached2[alg] = cryptoKey;
  }
  return cryptoKey;
};
var handleKeyObject = (keyObject, alg) => {
  cache ||= new WeakMap;
  let cached2 = cache.get(keyObject);
  if (cached2?.[alg]) {
    return cached2[alg];
  }
  const isPublic = keyObject.type === "public";
  const extractable = isPublic ? true : false;
  let cryptoKey;
  if (keyObject.asymmetricKeyType === "x25519") {
    switch (alg) {
      case "ECDH-ES":
      case "ECDH-ES+A128KW":
      case "ECDH-ES+A192KW":
      case "ECDH-ES+A256KW":
        break;
      default:
        throw new TypeError("given KeyObject instance cannot be used for this algorithm");
    }
    cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ["deriveBits"]);
  }
  if (keyObject.asymmetricKeyType === "ed25519") {
    if (alg !== "EdDSA" && alg !== "Ed25519") {
      throw new TypeError("given KeyObject instance cannot be used for this algorithm");
    }
    cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [
      isPublic ? "verify" : "sign"
    ]);
  }
  switch (keyObject.asymmetricKeyType) {
    case "ml-dsa-44":
    case "ml-dsa-65":
    case "ml-dsa-87": {
      if (alg !== keyObject.asymmetricKeyType.toUpperCase()) {
        throw new TypeError("given KeyObject instance cannot be used for this algorithm");
      }
      cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [
        isPublic ? "verify" : "sign"
      ]);
    }
  }
  if (keyObject.asymmetricKeyType === "rsa") {
    let hash2;
    switch (alg) {
      case "RSA-OAEP":
        hash2 = "SHA-1";
        break;
      case "RS256":
      case "PS256":
      case "RSA-OAEP-256":
        hash2 = "SHA-256";
        break;
      case "RS384":
      case "PS384":
      case "RSA-OAEP-384":
        hash2 = "SHA-384";
        break;
      case "RS512":
      case "PS512":
      case "RSA-OAEP-512":
        hash2 = "SHA-512";
        break;
      default:
        throw new TypeError("given KeyObject instance cannot be used for this algorithm");
    }
    if (alg.startsWith("RSA-OAEP")) {
      return keyObject.toCryptoKey({
        name: "RSA-OAEP",
        hash: hash2
      }, extractable, isPublic ? ["encrypt"] : ["decrypt"]);
    }
    cryptoKey = keyObject.toCryptoKey({
      name: alg.startsWith("PS") ? "RSA-PSS" : "RSASSA-PKCS1-v1_5",
      hash: hash2
    }, extractable, [isPublic ? "verify" : "sign"]);
  }
  if (keyObject.asymmetricKeyType === "ec") {
    const nist = new Map([
      ["prime256v1", "P-256"],
      ["secp384r1", "P-384"],
      ["secp521r1", "P-521"]
    ]);
    const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve);
    if (!namedCurve) {
      throw new TypeError("given KeyObject instance cannot be used for this algorithm");
    }
    if (alg === "ES256" && namedCurve === "P-256") {
      cryptoKey = keyObject.toCryptoKey({
        name: "ECDSA",
        namedCurve
      }, extractable, [isPublic ? "verify" : "sign"]);
    }
    if (alg === "ES384" && namedCurve === "P-384") {
      cryptoKey = keyObject.toCryptoKey({
        name: "ECDSA",
        namedCurve
      }, extractable, [isPublic ? "verify" : "sign"]);
    }
    if (alg === "ES512" && namedCurve === "P-521") {
      cryptoKey = keyObject.toCryptoKey({
        name: "ECDSA",
        namedCurve
      }, extractable, [isPublic ? "verify" : "sign"]);
    }
    if (alg.startsWith("ECDH-ES")) {
      cryptoKey = keyObject.toCryptoKey({
        name: "ECDH",
        namedCurve
      }, extractable, isPublic ? [] : ["deriveBits"]);
    }
  }
  if (!cryptoKey) {
    throw new TypeError("given KeyObject instance cannot be used for this algorithm");
  }
  if (!cached2) {
    cache.set(keyObject, { [alg]: cryptoKey });
  } else {
    cached2[alg] = cryptoKey;
  }
  return cryptoKey;
};
async function normalizeKey(key, alg) {
  if (key instanceof Uint8Array) {
    return key;
  }
  if (isCryptoKey(key)) {
    return key;
  }
  if (isKeyObject(key)) {
    if (key.type === "secret") {
      return key.export();
    }
    if ("toCryptoKey" in key && typeof key.toCryptoKey === "function") {
      try {
        return handleKeyObject(key, alg);
      } catch (err) {
        if (err instanceof TypeError) {
          throw err;
        }
      }
    }
    let jwk = key.export({ format: "jwk" });
    return handleJWK(key, jwk, alg);
  }
  if (isJWK(key)) {
    if (key.k) {
      return decode4(key.k);
    }
    return handleJWK(key, key, alg, true);
  }
  throw new Error("unreachable");
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/check_key_type.js
var tag2 = (key) => key?.[Symbol.toStringTag];
var jwkMatchesOp = (alg, key, usage) => {
  if (key.use !== undefined) {
    let expected;
    switch (usage) {
      case "sign":
      case "verify":
        expected = "sig";
        break;
      case "encrypt":
      case "decrypt":
        expected = "enc";
        break;
    }
    if (key.use !== expected) {
      throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`);
    }
  }
  if (key.alg !== undefined && key.alg !== alg) {
    throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`);
  }
  if (Array.isArray(key.key_ops)) {
    let expectedKeyOp;
    switch (true) {
      case (usage === "sign" || usage === "verify"):
      case alg === "dir":
      case alg.includes("CBC-HS"):
        expectedKeyOp = usage;
        break;
      case alg.startsWith("PBES2"):
        expectedKeyOp = "deriveBits";
        break;
      case /^A\d{3}(?:GCM)?(?:KW)?$/.test(alg):
        if (!alg.includes("GCM") && alg.endsWith("KW")) {
          expectedKeyOp = usage === "encrypt" ? "wrapKey" : "unwrapKey";
        } else {
          expectedKeyOp = usage;
        }
        break;
      case (usage === "encrypt" && alg.startsWith("RSA")):
        expectedKeyOp = "wrapKey";
        break;
      case usage === "decrypt":
        expectedKeyOp = alg.startsWith("RSA") ? "unwrapKey" : "deriveBits";
        break;
    }
    if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) {
      throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${expectedKeyOp}" when present`);
    }
  }
  return true;
};
var symmetricTypeCheck = (alg, key, usage) => {
  if (key instanceof Uint8Array)
    return;
  if (isJWK(key)) {
    if (isSecretJWK(key) && jwkMatchesOp(alg, key, usage))
      return;
    throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`);
  }
  if (!isKeyLike(key)) {
    throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
  }
  if (key.type !== "secret") {
    throw new TypeError(`${tag2(key)} instances for symmetric algorithms must be of type "secret"`);
  }
};
var asymmetricTypeCheck = (alg, key, usage) => {
  if (isJWK(key)) {
    switch (usage) {
      case "decrypt":
      case "sign":
        if (isPrivateJWK(key) && jwkMatchesOp(alg, key, usage))
          return;
        throw new TypeError(`JSON Web Key for this operation must be a private JWK`);
      case "encrypt":
      case "verify":
        if (isPublicJWK(key) && jwkMatchesOp(alg, key, usage))
          return;
        throw new TypeError(`JSON Web Key for this operation must be a public JWK`);
    }
  }
  if (!isKeyLike(key)) {
    throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key"));
  }
  if (key.type === "secret") {
    throw new TypeError(`${tag2(key)} instances for asymmetric algorithms must not be of type "secret"`);
  }
  if (key.type === "public") {
    switch (usage) {
      case "sign":
        throw new TypeError(`${tag2(key)} instances for asymmetric algorithm signing must be of type "private"`);
      case "decrypt":
        throw new TypeError(`${tag2(key)} instances for asymmetric algorithm decryption must be of type "private"`);
    }
  }
  if (key.type === "private") {
    switch (usage) {
      case "verify":
        throw new TypeError(`${tag2(key)} instances for asymmetric algorithm verifying must be of type "public"`);
      case "encrypt":
        throw new TypeError(`${tag2(key)} instances for asymmetric algorithm encryption must be of type "public"`);
    }
  }
};
function checkKeyType(alg, key, usage) {
  switch (alg.substring(0, 2)) {
    case "A1":
    case "A2":
    case "di":
    case "HS":
    case "PB":
      symmetricTypeCheck(alg, key, usage);
      break;
    default:
      asymmetricTypeCheck(alg, key, usage);
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/subtle_dsa.js
function subtleAlgorithm(alg, algorithm) {
  const hash2 = `SHA-${alg.slice(-3)}`;
  switch (alg) {
    case "HS256":
    case "HS384":
    case "HS512":
      return { hash: hash2, name: "HMAC" };
    case "PS256":
    case "PS384":
    case "PS512":
      return { hash: hash2, name: "RSA-PSS", saltLength: parseInt(alg.slice(-3), 10) >> 3 };
    case "RS256":
    case "RS384":
    case "RS512":
      return { hash: hash2, name: "RSASSA-PKCS1-v1_5" };
    case "ES256":
    case "ES384":
    case "ES512":
      return { hash: hash2, name: "ECDSA", namedCurve: algorithm.namedCurve };
    case "Ed25519":
    case "EdDSA":
      return { name: "Ed25519" };
    case "ML-DSA-44":
    case "ML-DSA-65":
    case "ML-DSA-87":
      return { name: alg };
    default:
      throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/get_sign_verify_key.js
async function getSigKey(alg, key, usage) {
  if (key instanceof Uint8Array) {
    if (!alg.startsWith("HS")) {
      throw new TypeError(invalidKeyInput(key, "CryptoKey", "KeyObject", "JSON Web Key"));
    }
    return crypto.subtle.importKey("raw", key, { hash: `SHA-${alg.slice(-3)}`, name: "HMAC" }, false, [usage]);
  }
  checkSigCryptoKey(key, alg, usage);
  return key;
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/verify.js
async function verify(alg, key, signature, data) {
  const cryptoKey = await getSigKey(alg, key, "verify");
  checkKeyLength(alg, cryptoKey);
  const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm);
  try {
    return await crypto.subtle.verify(algorithm, cryptoKey, signature, data);
  } catch {
    return false;
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/jws/flattened/verify.js
async function flattenedVerify(jws, key, options2) {
  if (!isObject2(jws)) {
    throw new JWSInvalid("Flattened JWS must be an object");
  }
  if (jws.protected === undefined && jws.header === undefined) {
    throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');
  }
  if (jws.protected !== undefined && typeof jws.protected !== "string") {
    throw new JWSInvalid("JWS Protected Header incorrect type");
  }
  if (jws.payload === undefined) {
    throw new JWSInvalid("JWS Payload missing");
  }
  if (typeof jws.signature !== "string") {
    throw new JWSInvalid("JWS Signature missing or incorrect type");
  }
  if (jws.header !== undefined && !isObject2(jws.header)) {
    throw new JWSInvalid("JWS Unprotected Header incorrect type");
  }
  let parsedProt = {};
  if (jws.protected) {
    try {
      const protectedHeader = decode4(jws.protected);
      parsedProt = JSON.parse(decoder.decode(protectedHeader));
    } catch {
      throw new JWSInvalid("JWS Protected Header is invalid");
    }
  }
  if (!isDisjoint(parsedProt, jws.header)) {
    throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
  }
  const joseHeader = {
    ...parsedProt,
    ...jws.header
  };
  const extensions = validateCrit(JWSInvalid, new Map([["b64", true]]), options2?.crit, parsedProt, joseHeader);
  let b64 = true;
  if (extensions.has("b64")) {
    b64 = parsedProt.b64;
    if (typeof b64 !== "boolean") {
      throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
    }
  }
  const { alg } = joseHeader;
  if (typeof alg !== "string" || !alg) {
    throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
  }
  const algorithms = options2 && validateAlgorithms("algorithms", options2.algorithms);
  if (algorithms && !algorithms.has(alg)) {
    throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');
  }
  if (b64) {
    if (typeof jws.payload !== "string") {
      throw new JWSInvalid("JWS Payload must be a string");
    }
  } else if (typeof jws.payload !== "string" && !(jws.payload instanceof Uint8Array)) {
    throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");
  }
  let resolvedKey = false;
  if (typeof key === "function") {
    key = await key(parsedProt, jws);
    resolvedKey = true;
  }
  checkKeyType(alg, key, "verify");
  const data = concat(jws.protected !== undefined ? encode4(jws.protected) : new Uint8Array, encode4("."), typeof jws.payload === "string" ? b64 ? encode4(jws.payload) : encoder.encode(jws.payload) : jws.payload);
  let signature;
  try {
    signature = decode4(jws.signature);
  } catch {
    throw new JWSInvalid("Failed to base64url decode the signature");
  }
  const k4 = await normalizeKey(key, alg);
  const verified = await verify(alg, k4, signature, data);
  if (!verified) {
    throw new JWSSignatureVerificationFailed;
  }
  let payload;
  if (b64) {
    try {
      payload = decode4(jws.payload);
    } catch {
      throw new JWSInvalid("Failed to base64url decode the payload");
    }
  } else if (typeof jws.payload === "string") {
    payload = encoder.encode(jws.payload);
  } else {
    payload = jws.payload;
  }
  const result = { payload };
  if (jws.protected !== undefined) {
    result.protectedHeader = parsedProt;
  }
  if (jws.header !== undefined) {
    result.unprotectedHeader = jws.header;
  }
  if (resolvedKey) {
    return { ...result, key: k4 };
  }
  return result;
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/jws/compact/verify.js
async function compactVerify(jws, key, options2) {
  if (jws instanceof Uint8Array) {
    jws = decoder.decode(jws);
  }
  if (typeof jws !== "string") {
    throw new JWSInvalid("Compact JWS must be a string or Uint8Array");
  }
  const { 0: protectedHeader, 1: payload, 2: signature, length: length2 } = jws.split(".");
  if (length2 !== 3) {
    throw new JWSInvalid("Invalid Compact JWS");
  }
  const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options2);
  const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };
  if (typeof key === "function") {
    return { ...result, key: verified.key };
  }
  return result;
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
var epoch = (date6) => Math.floor(date6.getTime() / 1000);
var minute = 60;
var hour = minute * 60;
var day = hour * 24;
var week = day * 7;
var year = day * 365.25;
var REGEX = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;
function secs(str) {
  const matched = REGEX.exec(str);
  if (!matched || matched[4] && matched[1]) {
    throw new TypeError("Invalid time period format");
  }
  const value = parseFloat(matched[2]);
  const unit = matched[3].toLowerCase();
  let numericDate;
  switch (unit) {
    case "sec":
    case "secs":
    case "second":
    case "seconds":
    case "s":
      numericDate = Math.round(value);
      break;
    case "minute":
    case "minutes":
    case "min":
    case "mins":
    case "m":
      numericDate = Math.round(value * minute);
      break;
    case "hour":
    case "hours":
    case "hr":
    case "hrs":
    case "h":
      numericDate = Math.round(value * hour);
      break;
    case "day":
    case "days":
    case "d":
      numericDate = Math.round(value * day);
      break;
    case "week":
    case "weeks":
    case "w":
      numericDate = Math.round(value * week);
      break;
    default:
      numericDate = Math.round(value * year);
      break;
  }
  if (matched[1] === "-" || matched[4] === "ago") {
    return -numericDate;
  }
  return numericDate;
}
function validateInput(label, input) {
  if (!Number.isFinite(input)) {
    throw new TypeError(`Invalid ${label} input`);
  }
  return input;
}
var normalizeTyp = (value) => {
  if (value.includes("/")) {
    return value.toLowerCase();
  }
  return `application/${value.toLowerCase()}`;
};
var checkAudiencePresence = (audPayload, audOption) => {
  if (typeof audPayload === "string") {
    return audOption.includes(audPayload);
  }
  if (Array.isArray(audPayload)) {
    return audOption.some(Set.prototype.has.bind(new Set(audPayload)));
  }
  return false;
};
function validateClaimsSet(protectedHeader, encodedPayload, options2 = {}) {
  let payload;
  try {
    payload = JSON.parse(decoder.decode(encodedPayload));
  } catch {}
  if (!isObject2(payload)) {
    throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
  }
  const { typ } = options2;
  if (typ && (typeof protectedHeader.typ !== "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {
    throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', payload, "typ", "check_failed");
  }
  const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options2;
  const presenceCheck = [...requiredClaims];
  if (maxTokenAge !== undefined)
    presenceCheck.push("iat");
  if (audience !== undefined)
    presenceCheck.push("aud");
  if (subject !== undefined)
    presenceCheck.push("sub");
  if (issuer !== undefined)
    presenceCheck.push("iss");
  for (const claim of new Set(presenceCheck.reverse())) {
    if (!(claim in payload)) {
      throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, "missing");
    }
  }
  if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {
    throw new JWTClaimValidationFailed('unexpected "iss" claim value', payload, "iss", "check_failed");
  }
  if (subject && payload.sub !== subject) {
    throw new JWTClaimValidationFailed('unexpected "sub" claim value', payload, "sub", "check_failed");
  }
  if (audience && !checkAudiencePresence(payload.aud, typeof audience === "string" ? [audience] : audience)) {
    throw new JWTClaimValidationFailed('unexpected "aud" claim value', payload, "aud", "check_failed");
  }
  let tolerance;
  switch (typeof options2.clockTolerance) {
    case "string":
      tolerance = secs(options2.clockTolerance);
      break;
    case "number":
      tolerance = options2.clockTolerance;
      break;
    case "undefined":
      tolerance = 0;
      break;
    default:
      throw new TypeError("Invalid clockTolerance option type");
  }
  const { currentDate } = options2;
  const now = epoch(currentDate || new Date);
  if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== "number") {
    throw new JWTClaimValidationFailed('"iat" claim must be a number', payload, "iat", "invalid");
  }
  if (payload.nbf !== undefined) {
    if (typeof payload.nbf !== "number") {
      throw new JWTClaimValidationFailed('"nbf" claim must be a number', payload, "nbf", "invalid");
    }
    if (payload.nbf > now + tolerance) {
      throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', payload, "nbf", "check_failed");
    }
  }
  if (payload.exp !== undefined) {
    if (typeof payload.exp !== "number") {
      throw new JWTClaimValidationFailed('"exp" claim must be a number', payload, "exp", "invalid");
    }
    if (payload.exp <= now - tolerance) {
      throw new JWTExpired('"exp" claim timestamp check failed', payload, "exp", "check_failed");
    }
  }
  if (maxTokenAge) {
    const age = now - payload.iat;
    const max = typeof maxTokenAge === "number" ? maxTokenAge : secs(maxTokenAge);
    if (age - tolerance > max) {
      throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', payload, "iat", "check_failed");
    }
    if (age < 0 - tolerance) {
      throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', payload, "iat", "check_failed");
    }
  }
  return payload;
}

class JWTClaimsBuilder {
  #payload;
  constructor(payload) {
    if (!isObject2(payload)) {
      throw new TypeError("JWT Claims Set MUST be an object");
    }
    this.#payload = structuredClone(payload);
  }
  data() {
    return encoder.encode(JSON.stringify(this.#payload));
  }
  get iss() {
    return this.#payload.iss;
  }
  set iss(value) {
    this.#payload.iss = value;
  }
  get sub() {
    return this.#payload.sub;
  }
  set sub(value) {
    this.#payload.sub = value;
  }
  get aud() {
    return this.#payload.aud;
  }
  set aud(value) {
    this.#payload.aud = value;
  }
  set jti(value) {
    this.#payload.jti = value;
  }
  set nbf(value) {
    if (typeof value === "number") {
      this.#payload.nbf = validateInput("setNotBefore", value);
    } else if (value instanceof Date) {
      this.#payload.nbf = validateInput("setNotBefore", epoch(value));
    } else {
      this.#payload.nbf = epoch(new Date) + secs(value);
    }
  }
  set exp(value) {
    if (typeof value === "number") {
      this.#payload.exp = validateInput("setExpirationTime", value);
    } else if (value instanceof Date) {
      this.#payload.exp = validateInput("setExpirationTime", epoch(value));
    } else {
      this.#payload.exp = epoch(new Date) + secs(value);
    }
  }
  set iat(value) {
    if (value === undefined) {
      this.#payload.iat = epoch(new Date);
    } else if (value instanceof Date) {
      this.#payload.iat = validateInput("setIssuedAt", epoch(value));
    } else if (typeof value === "string") {
      this.#payload.iat = validateInput("setIssuedAt", epoch(new Date) + secs(value));
    } else {
      this.#payload.iat = validateInput("setIssuedAt", value);
    }
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/jwt/verify.js
async function jwtVerify(jwt2, key, options2) {
  const verified = await compactVerify(jwt2, key, options2);
  if (verified.protectedHeader.crit?.includes("b64") && verified.protectedHeader.b64 === false) {
    throw new JWTInvalid("JWTs MUST NOT use unencoded payload");
  }
  const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options2);
  const result = { payload, protectedHeader: verified.protectedHeader };
  if (typeof key === "function") {
    return { ...result, key: verified.key };
  }
  return result;
}
// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/lib/sign.js
async function sign(alg, key, data) {
  const cryptoKey = await getSigKey(alg, key, "sign");
  checkKeyLength(alg, cryptoKey);
  const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data);
  return new Uint8Array(signature);
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/jws/flattened/sign.js
class FlattenedSign {
  #payload;
  #protectedHeader;
  #unprotectedHeader;
  constructor(payload) {
    if (!(payload instanceof Uint8Array)) {
      throw new TypeError("payload must be an instance of Uint8Array");
    }
    this.#payload = payload;
  }
  setProtectedHeader(protectedHeader) {
    if (this.#protectedHeader) {
      throw new TypeError("setProtectedHeader can only be called once");
    }
    this.#protectedHeader = protectedHeader;
    return this;
  }
  setUnprotectedHeader(unprotectedHeader) {
    if (this.#unprotectedHeader) {
      throw new TypeError("setUnprotectedHeader can only be called once");
    }
    this.#unprotectedHeader = unprotectedHeader;
    return this;
  }
  async sign(key, options2) {
    if (!this.#protectedHeader && !this.#unprotectedHeader) {
      throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");
    }
    if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) {
      throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
    }
    const joseHeader = {
      ...this.#protectedHeader,
      ...this.#unprotectedHeader
    };
    const extensions = validateCrit(JWSInvalid, new Map([["b64", true]]), options2?.crit, this.#protectedHeader, joseHeader);
    let b64 = true;
    if (extensions.has("b64")) {
      b64 = this.#protectedHeader.b64;
      if (typeof b64 !== "boolean") {
        throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
      }
    }
    const { alg } = joseHeader;
    if (typeof alg !== "string" || !alg) {
      throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
    }
    checkKeyType(alg, key, "sign");
    let payloadS;
    let payloadB;
    if (b64) {
      payloadS = encode5(this.#payload);
      payloadB = encode4(payloadS);
    } else {
      payloadB = this.#payload;
      payloadS = "";
    }
    let protectedHeaderString;
    let protectedHeaderBytes;
    if (this.#protectedHeader) {
      protectedHeaderString = encode5(JSON.stringify(this.#protectedHeader));
      protectedHeaderBytes = encode4(protectedHeaderString);
    } else {
      protectedHeaderString = "";
      protectedHeaderBytes = new Uint8Array;
    }
    const data = concat(protectedHeaderBytes, encode4("."), payloadB);
    const k4 = await normalizeKey(key, alg);
    const signature = await sign(alg, k4, data);
    const jws = {
      signature: encode5(signature),
      payload: payloadS
    };
    if (this.#unprotectedHeader) {
      jws.header = this.#unprotectedHeader;
    }
    if (this.#protectedHeader) {
      jws.protected = protectedHeaderString;
    }
    return jws;
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/jws/compact/sign.js
class CompactSign {
  #flattened;
  constructor(payload) {
    this.#flattened = new FlattenedSign(payload);
  }
  setProtectedHeader(protectedHeader) {
    this.#flattened.setProtectedHeader(protectedHeader);
    return this;
  }
  async sign(key, options2) {
    const jws = await this.#flattened.sign(key, options2);
    if (jws.payload === undefined) {
      throw new TypeError("use the flattened module for creating JWS with b64: false");
    }
    return `${jws.protected}.${jws.payload}.${jws.signature}`;
  }
}

// ../../node_modules/.pnpm/jose@6.1.3/node_modules/jose/dist/webapi/jwt/sign.js
class SignJWT {
  #protectedHeader;
  #jwt;
  constructor(payload = {}) {
    this.#jwt = new JWTClaimsBuilder(payload);
  }
  setIssuer(issuer) {
    this.#jwt.iss = issuer;
    return this;
  }
  setSubject(subject) {
    this.#jwt.sub = subject;
    return this;
  }
  setAudience(audience) {
    this.#jwt.aud = audience;
    return this;
  }
  setJti(jwtId) {
    this.#jwt.jti = jwtId;
    return this;
  }
  setNotBefore(input) {
    this.#jwt.nbf = input;
    return this;
  }
  setExpirationTime(input) {
    this.#jwt.exp = input;
    return this;
  }
  setIssuedAt(input) {
    this.#jwt.iat = input;
    return this;
  }
  setProtectedHeader(protectedHeader) {
    this.#protectedHeader = protectedHeader;
    return this;
  }
  async sign(key, options2) {
    const sig = new CompactSign(this.#jwt.data());
    sig.setProtectedHeader(this.#protectedHeader);
    if (Array.isArray(this.#protectedHeader?.crit) && this.#protectedHeader.crit.includes("b64") && this.#protectedHeader.b64 === false) {
      throw new JWTInvalid("JWTs MUST NOT use unencoded payload");
    }
    return sig.sign(key, options2);
  }
}
// ../../packages/email/src/lib/confirmation-token.ts
var TOKEN_EXPIRATION = "48h";
function getSecret() {
  const secret = process.env.UNSUBSCRIBE_SECRET;
  if (!secret) {
    const isProduction = !!process.env.AWS_LAMBDA_FUNCTION_NAME;
    if (isProduction) {
      throw new Error("UNSUBSCRIBE_SECRET environment variable is required in production");
    }
    return new TextEncoder().encode("dev-unsubscribe-secret-change-in-production");
  }
  return new TextEncoder().encode(secret);
}
async function generateConfirmationToken(contactId, organizationId, topicId) {
  const payload = {
    cid: contactId,
    oid: organizationId,
    tid: topicId,
    type: "confirm"
  };
  const token2 = await new SignJWT(payload).setProtectedHeader({ alg: "HS256" }).setExpirationTime(TOKEN_EXPIRATION).sign(getSecret());
  return token2;
}
async function generateConfirmationUrl(contactId, organizationId, topicId) {
  const token2 = await generateConfirmationToken(contactId, organizationId, topicId);
  const baseUrl = process.env.NEXT_PUBLIC_APP_URL || "https://app.wraps.dev";
  return `${baseUrl}/confirm/${token2}`;
}
// ../../packages/email/src/lib/ses-templates.ts
var import_client_sesv2 = __toESM(require_dist_cjs24(), 1);
function createSESClient2(credentials, region) {
  return new import_client_sesv2.SESv2Client({
    region,
    credentials: {
      accessKeyId: credentials.accessKeyId,
      secretAccessKey: credentials.secretAccessKey,
      sessionToken: credentials.sessionToken
    }
  });
}
async function upsertSESTemplate(credentials, region, params) {
  const ses = createSESClient2(credentials, region);
  const { templateName, subject, htmlPart, textPart } = params;
  const templateContent = {
    Subject: subject,
    Html: htmlPart,
    Text: textPart
  };
  try {
    await ses.send(new import_client_sesv2.CreateEmailTemplateCommand({
      TemplateName: templateName,
      TemplateContent: templateContent
    }));
  } catch (error49) {
    const err = error49;
    if (err.name === "AlreadyExistsException") {
      await ses.send(new import_client_sesv2.UpdateEmailTemplateCommand({
        TemplateName: templateName,
        TemplateContent: templateContent
      }));
    } else if (err.name === "AccessDeniedException" || err.message?.includes("is not authorized to perform")) {
      throw new Error("Your IAM role is missing SESv2 template permissions. " + "Update your role by re-deploying the CloudFormation stack from the Wraps dashboard, " + "or run: wraps platform update-role");
    } else {
      throw error49;
    }
  }
}
function generateSESTemplateName(_templateId, templateName) {
  return templateName.replace(/[^a-zA-Z0-9-_]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").substring(0, 64);
}
// ../../packages/email/src/lib/ses-variables.ts
function toSesVariableName(name3) {
  if (!name3.includes(".")) {
    return name3;
  }
  const parts = name3.split(".");
  return parts.map((part, index2) => index2 === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
}
function transformVariablesForSes(html3) {
  return html3.replace(/\{\{\s*([a-zA-Z0-9_.]+)(?:\s*\|\s*([^}]*))?\s*\}\}/g, (_match, varName, fallback) => {
    const sesName = toSesVariableName(varName);
    if (fallback !== undefined) {
      const trimmedFallback = fallback.trim();
      return `{{#if ${sesName}}}{{${sesName}}}{{else}}${trimmedFallback}{{/if}}`;
    }
    return `{{${sesName}}}`;
  });
}
// ../../packages/email/src/lib/subscription-service.ts
var import_client_sesv22 = __toESM(require_dist_cjs24(), 1);
var import_client_sts = __toESM(require_dist_cjs62(), 1);

// ../../node_modules/.pnpm/@react-email+render@2.0.9_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-email/render/dist/node/index.mjs
init_html();
init_html_to_text();
var import_react3 = __toESM(require_react(), 1);
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
function getHtmlNode2(path2) {
  const topNode = path2.node;
  if (topNode)
    return topNode;
  return path2.stack?.[path2.stack.length - 1];
}
function recursivelyMapDoc2(doc2, callback) {
  if (Array.isArray(doc2))
    return doc2.map((innerDoc) => recursivelyMapDoc2(innerDoc, callback));
  if (typeof doc2 === "object") {
    if (doc2.type === "line")
      return callback(doc2.soft ? "" : " ");
    if (doc2.type === "group")
      return {
        ...doc2,
        contents: recursivelyMapDoc2(doc2.contents, callback),
        expandedStates: recursivelyMapDoc2(doc2.expandedStates, callback)
      };
    if ("contents" in doc2)
      return {
        ...doc2,
        contents: recursivelyMapDoc2(doc2.contents, callback)
      };
    if ("parts" in doc2)
      return {
        ...doc2,
        parts: recursivelyMapDoc2(doc2.parts, callback)
      };
    if (doc2.type === "if-break")
      return {
        ...doc2,
        breakContents: recursivelyMapDoc2(doc2.breakContents, callback),
        flatContents: recursivelyMapDoc2(doc2.flatContents, callback)
      };
    const nextDoc = { ...doc2 };
    for (const [key, value] of Object.entries(nextDoc))
      if (value && typeof value === "object")
        nextDoc[key] = recursivelyMapDoc2(value, callback);
    return nextDoc;
  }
  return callback(doc2);
}
var modifiedHtml2 = { ...exports_html };
if (modifiedHtml2.printers) {
  const previousPrint = modifiedHtml2.printers.html.print;
  modifiedHtml2.printers.html.print = (path2, options2, print, args) => {
    const node3 = getHtmlNode2(path2);
    const rawPrintingResult = previousPrint(path2, options2, print, args);
    if (node3?.type === "ieConditionalComment" || node3?.kind === "ieConditionalComment")
      return recursivelyMapDoc2(rawPrintingResult, (doc2) => {
        if (typeof doc2 === "object" && doc2.type === "line")
          return doc2.soft ? "" : " ";
        return doc2;
      });
    return rawPrintingResult;
  };
}
var plainTextSelectors2 = [
  {
    selector: "img",
    format: "skip"
  },
  {
    selector: "[data-skip-in-text=true]",
    format: "skip"
  },
  {
    selector: "a",
    options: {
      linkBrackets: false,
      hideLinkHrefIfSameAsText: true
    }
  }
];
function toPlainText2(html3, options2) {
  return convert(html3, {
    wordwrap: false,
    ...options2,
    selectors: [...plainTextSelectors2, ...options2?.selectors ?? []]
  });
}

// ../../packages/template-render/src/mustache-case.ts
var HANDLEBARS_BLOCK_HELPERS = new Set(["if", "unless", "each", "with"]);
function normalizePlainTextMustaches(text3, canonicalVars) {
  const canonicalByLower = new Map;
  for (const name3 of canonicalVars) {
    canonicalByLower.set(name3.toLowerCase(), name3);
  }
  function restoreIdentifier(name3) {
    return canonicalByLower.get(name3.toLowerCase()) ?? name3;
  }
  return text3.replace(/\{\{([#/]?)([A-Z][A-Z0-9_]*(?:\.[A-Z0-9_]+)*)((?:\s+[A-Z0-9_.]+)*)\s*\}\}/g, (match, sigil, name3, args) => {
    const lower = name3.toLowerCase();
    const isHelper = lower === "else" || HANDLEBARS_BLOCK_HELPERS.has(lower);
    const restoredArgs = args.split(/\s+/).filter(Boolean).map(restoreIdentifier).join(" ");
    if (isHelper) {
      const suffix = restoredArgs ? ` ${restoredArgs}` : "";
      return `{{${sigil}${lower}${suffix}}}`;
    }
    if (!args && canonicalByLower.has(lower)) {
      return `{{${sigil}${canonicalByLower.get(lower)}}}`;
    }
    return match;
  });
}
function extractCanonicalVars(html3) {
  const vars = new Set;
  for (const m2 of html3.matchAll(/\{\{([a-zA-Z0-9_.]+)(?:\|[^}]*)?\}\}/g)) {
    if (m2[1]) {
      vars.add(m2[1]);
    }
  }
  for (const m2 of html3.matchAll(/\{\{[#/][a-zA-Z]+\s+([a-zA-Z0-9_.\s]+?)\s*\}\}/g)) {
    for (const arg of (m2[1] ?? "").split(/\s+/)) {
      if (arg) {
        vars.add(arg);
      }
    }
  }
  return vars;
}
function normalizePlainTextForSes(text3, html3) {
  return normalizePlainTextMustaches(text3, extractCanonicalVars(html3));
}
// ../../packages/template-render/src/render.ts
var import_handlebars = __toESM(require_lib4(), 1);
function renderTemplateStrict(html3, data, options2 = {}) {
  return import_handlebars.default.compile(html3, { noEscape: options2.noEscape ?? false })(data);
}
function nestKeys(flat) {
  const out = { ...flat };
  for (const [key, value] of Object.entries(flat)) {
    if (!key.includes(".")) {
      continue;
    }
    const segments = key.split(".");
    if (segments.length === 0) {
      continue;
    }
    let cursor = out;
    for (let i = 0;i < segments.length - 1; i++) {
      const seg = segments[i];
      if (seg === undefined) {
        continue;
      }
      const existing = cursor[seg];
      if (typeof existing !== "object" || existing === null || Array.isArray(existing)) {
        cursor[seg] = {};
      }
      cursor = cursor[seg];
    }
    const lastSegment = segments.at(-1);
    if (lastSegment !== undefined) {
      cursor[lastSegment] = value;
    }
  }
  return out;
}
// ../../packages/email/src/emails/topic-confirmation.ts
function generateTopicConfirmationEmail({
  url: url2,
  topicName,
  topicDescription,
  organizationName
}) {
  const subject = `Confirm your subscription to ${topicName}`;
  const orgDisplay = organizationName || "this organization";
  const htmlBody = `<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Confirm your subscription</title>
  </head>
  <body style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 20px;">
    <div style="background: #000000; padding: 40px 20px; text-align: center; border-radius: 8px 8px 0 0;">
      <h1 style="color: white; margin: 0; font-size: 28px;">Confirm Your Subscription</h1>
    </div>

    <div style="background: white; padding: 40px; border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 8px 8px;">
      <p style="font-size: 16px; margin-bottom: 20px;">Hi there,</p>

      <p style="font-size: 16px; margin-bottom: 20px;">
        You've requested to subscribe to <strong>${topicName}</strong> from ${orgDisplay}.
      </p>

      ${topicDescription ? `<p style="font-size: 14px; color: #6b7280; margin-bottom: 20px; padding: 12px; background: #f9fafb; border-radius: 6px;">
        ${topicDescription}
      </p>` : ""}

      <p style="font-size: 16px; margin-bottom: 20px;">
        Please click the button below to confirm your subscription:
      </p>

      <div style="text-align: center; margin: 40px 0;">
        <a href="${url2}" style="display: inline-block; background: #000000; color: white; padding: 14px 32px; text-decoration: none; border-radius: 6px; font-weight: 600; font-size: 16px;">
          Confirm Subscription
        </a>
      </div>

      <p style="font-size: 14px; color: #6b7280; margin-bottom: 20px;">
        Or copy and paste this link into your browser:
      </p>
      <p style="font-size: 14px; color: #333333; word-break: break-all; background: #f9fafb; padding: 12px; border-radius: 6px;">
        ${url2}
      </p>

      <div style="background: #f9fafb; padding: 20px; border-radius: 6px; margin-top: 30px; border-left: 4px solid #000000;">
        <p style="margin: 0; font-size: 14px; color: #6b7280;">
          <strong>Note:</strong> This confirmation link will expire in 48 hours. If you didn't request this subscription, you can safely ignore this email.
        </p>
      </div>
    </div>

    <div style="text-align: center; margin-top: 30px; color: #9ca3af; font-size: 14px;">
      <p>
        This email was sent by ${orgDisplay}.
      </p>
    </div>
  </body>
</html>`;
  const textBody = `Confirm Your Subscription

Hi there,

You've requested to subscribe to ${topicName} from ${orgDisplay}.

${topicDescription ? `About this topic: ${topicDescription}
` : ""}
Please click the link below to confirm your subscription:
${url2}

Note: This confirmation link will expire in 48 hours. If you didn't request this subscription, you can safely ignore this email.

---
This email was sent by ${orgDisplay}.`;
  return { subject, html: htmlBody, text: textBody };
}

// ../../packages/email/src/lib/subscription-service.ts
var structuredLog = (msg, data) => console.info(JSON.stringify({ msg, ...data }));
function substituteVariables(content, variables, options2 = {}) {
  try {
    return renderTemplateStrict(content, nestKeys(variables), {
      noEscape: !options2.escapeHtml
    });
  } catch (error49) {
    structuredLog("subscription template render failed", {
      contentPreview: content.slice(0, 200),
      variableKeys: Object.keys(variables),
      reason: error49 instanceof Error ? error49.message : String(error49)
    });
    throw new Error(`Template rendering failed: ${error49 instanceof Error ? error49.message : String(error49)}`);
  }
}
function htmlToPlainText(html3) {
  return toPlainText2(html3);
}
async function sendTopicConfirmationEmail(params) {
  const {
    contactId,
    contactEmail,
    topicId,
    topicName,
    topicDescription,
    organizationId
  } = params;
  structuredLog("Confirmation email: starting", {
    contactId,
    topicId,
    organizationId
  });
  const [[org], [account2], [settings]] = await Promise.all([
    db.select({
      name: organization.name
    }).from(organization).where(eq(organization.id, organizationId)).limit(1),
    db.select({
      id: awsAccount.id,
      roleArn: awsAccount.roleArn,
      externalId: awsAccount.externalId,
      region: awsAccount.region
    }).from(awsAccount).where(eq(awsAccount.organizationId, organizationId)).limit(1),
    db.select().from(topicSettings).where(eq(topicSettings.organizationId, organizationId)).limit(1)
  ]);
  structuredLog("Confirmation email: config loaded", {
    orgName: org?.name,
    accountId: account2?.id,
    hasSettings: !!settings
  });
  if (!account2) {
    console.error(`[CONFIRMATION_EMAIL] No AWS account configured for org=${organizationId}`);
    throw new Error("Organization has no AWS account configured");
  }
  const confirmationUrl = await generateConfirmationUrl(contactId, organizationId, topicId);
  let subject;
  let html3;
  let text3;
  if (settings?.confirmationTemplateId) {
    const [customTemplate] = await db.select({
      subject: template.subject,
      compiledHtml: template.compiledHtml,
      compiledText: template.compiledText
    }).from(template).where(and(eq(template.id, settings.confirmationTemplateId), eq(template.organizationId, organizationId))).limit(1);
    if (customTemplate?.compiledHtml && customTemplate?.subject) {
      structuredLog("Confirmation email: using custom template", {
        templateId: settings.confirmationTemplateId
      });
      const variables = {
        confirmationUrl,
        "topic.name": topicName,
        "topic.description": topicDescription ?? undefined,
        "contact.email": contactEmail,
        "organization.name": org?.name ?? undefined
      };
      try {
        subject = substituteVariables(customTemplate.subject, variables);
        html3 = substituteVariables(customTemplate.compiledHtml, variables, {
          escapeHtml: true
        });
        text3 = customTemplate.compiledText ? substituteVariables(customTemplate.compiledText, variables) : htmlToPlainText(html3);
      } catch {
        structuredLog("Confirmation email: custom template failed to render, using default", { templateId: settings.confirmationTemplateId });
        const defaultEmail = generateTopicConfirmationEmail({
          url: confirmationUrl,
          topicName,
          topicDescription,
          organizationName: org?.name
        });
        subject = defaultEmail.subject;
        html3 = defaultEmail.html;
        text3 = defaultEmail.text;
      }
    } else {
      structuredLog("Confirmation email: custom template not found, using default", { templateId: settings.confirmationTemplateId });
      const defaultEmail = generateTopicConfirmationEmail({
        url: confirmationUrl,
        topicName,
        topicDescription,
        organizationName: org?.name
      });
      subject = defaultEmail.subject;
      html3 = defaultEmail.html;
      text3 = defaultEmail.text;
    }
  } else {
    const defaultEmail = generateTopicConfirmationEmail({
      url: confirmationUrl,
      topicName,
      topicDescription,
      organizationName: org?.name
    });
    subject = defaultEmail.subject;
    html3 = defaultEmail.html;
    text3 = defaultEmail.text;
  }
  structuredLog("Confirmation email: assuming role", {
    roleArn: account2.roleArn,
    region: account2.region
  });
  const stsClient = new import_client_sts.STSClient({
    region: account2.region
  });
  let assumeRoleResponse;
  try {
    assumeRoleResponse = await stsClient.send(new import_client_sts.AssumeRoleCommand({
      RoleArn: account2.roleArn,
      RoleSessionName: `wraps-confirmation-${Date.now()}`,
      ExternalId: account2.externalId,
      DurationSeconds: 900
    }));
  } catch (error49) {
    console.error("[CONFIRMATION_EMAIL] Failed to assume role:", error49);
    throw error49;
  }
  if (!assumeRoleResponse.Credentials) {
    console.error("[CONFIRMATION_EMAIL] No credentials returned from assume role");
    throw new Error("Failed to assume AWS role");
  }
  const credentials = {
    accessKeyId: assumeRoleResponse.Credentials.AccessKeyId,
    secretAccessKey: assumeRoleResponse.Credentials.SecretAccessKey,
    sessionToken: assumeRoleResponse.Credentials.SessionToken
  };
  let fromAddress;
  let fromName;
  let replyToAddress;
  if (settings?.confirmationFromEmail) {
    fromAddress = settings.confirmationFromEmail;
    fromName = settings.confirmationFromName || org?.name;
    replyToAddress = settings.confirmationReplyToEmail || undefined;
  } else {
    const sesClient = new import_client_sesv22.SESv2Client({
      region: account2.region,
      credentials
    });
    const identitiesResponse = await sesClient.send(new import_client_sesv22.ListEmailIdentitiesCommand({
      PageSize: 100
    }));
    structuredLog("Confirmation email: found identities", {
      count: identitiesResponse.EmailIdentities?.length || 0
    });
    const verifiedDomain = identitiesResponse.EmailIdentities?.find((identity) => identity.IdentityType === "DOMAIN" && identity.SendingEnabled === true);
    if (!verifiedDomain?.IdentityName) {
      throw new Error("No verified sending domain found. Please configure a from email in Topics settings or verify a domain in your AWS SES account.");
    }
    fromAddress = `noreply@${verifiedDomain.IdentityName}`;
    fromName = org?.name;
  }
  const from = fromName ? { name: fromName, email: fromAddress } : fromAddress;
  const wrapsEmail = new WrapsEmail({
    region: account2.region,
    credentials
  });
  structuredLog("Confirmation email: sending", {
    from: fromAddress,
    to: contactEmail
  });
  try {
    const result = await wrapsEmail.send({
      from,
      to: contactEmail,
      subject,
      html: html3,
      text: text3,
      replyTo: replyToAddress
    });
    structuredLog("Confirmation email: sent", { messageId: result.messageId });
    return true;
  } catch (error49) {
    console.error("[CONFIRMATION_EMAIL] Failed to send email:", error49);
    throw error49;
  } finally {
    wrapsEmail.destroy();
  }
}
// ../../packages/email-send/src/send.ts
var import_client_sesv23 = __toESM(require_dist_cjs24(), 1);
var WRAPS_CONFIGURATION_SET_NAME = "wraps-email-tracking";
async function sendEmail2(input) {
  const headers = buildListUnsubscribeHeaders(input.marketing?.unsubscribeUrl);
  const response = await input.client.send(new import_client_sesv23.SendEmailCommand({
    FromEmailAddress: input.from,
    ReplyToAddresses: input.replyTo ? [input.replyTo] : undefined,
    Destination: { ToAddresses: [input.to] },
    Content: {
      Simple: {
        Subject: { Data: input.subject },
        Body: {
          Html: { Data: input.html },
          Text: { Data: input.text }
        },
        Headers: headers.length > 0 ? headers : undefined
      }
    },
    ConfigurationSetName: input.configurationSetName ?? WRAPS_CONFIGURATION_SET_NAME,
    EmailTags: input.tags.map((tag3) => ({
      Name: tag3.name,
      Value: tag3.value
    }))
  }));
  if (!response.MessageId) {
    throw new Error("SES SendEmail returned no MessageId");
  }
  return { messageId: response.MessageId };
}
function buildListUnsubscribeHeaders(unsubscribeUrl) {
  if (!unsubscribeUrl) {
    return [];
  }
  return [
    { Name: "List-Unsubscribe", Value: `<${unsubscribeUrl}>` },
    { Name: "List-Unsubscribe-Post", Value: "List-Unsubscribe=One-Click" }
  ];
}

// ../../packages/email-send/src/config-set.ts
function resolveConfigurationSetName(input) {
  const fromDomain = input.fromDomain?.trim().toLowerCase() || undefined;
  if (fromDomain) {
    const match = input.identities?.find((i) => i.type === "DOMAIN" && i.identity.toLowerCase() === fromDomain && i.configSetName);
    if (match?.configSetName) {
      return match.configSetName;
    }
  }
  const stored = input.storedConfigSetName?.trim();
  if (stored) {
    return stored;
  }
  return WRAPS_CONFIGURATION_SET_NAME;
}
// ../../node_modules/.pnpm/openapi-fetch@0.14.1/node_modules/openapi-fetch/dist/index.mjs
var PATH_PARAM_RE = /\{[^{}]+\}/g;
var supportsRequestInitExt = () => {
  return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
};
function randomID() {
  return Math.random().toString(36).slice(2, 11);
}
function createClient(clientOptions) {
  let {
    baseUrl = "",
    Request: CustomRequest = globalThis.Request,
    fetch: baseFetch = globalThis.fetch,
    querySerializer: globalQuerySerializer,
    bodySerializer: globalBodySerializer,
    headers: baseHeaders,
    requestInitExt = undefined,
    ...baseOptions
  } = { ...clientOptions };
  requestInitExt = supportsRequestInitExt() ? requestInitExt : undefined;
  baseUrl = removeTrailingSlash(baseUrl);
  const middlewares = [];
  async function coreFetch(schemaPath, fetchOptions) {
    const {
      baseUrl: localBaseUrl,
      fetch: fetch2 = baseFetch,
      Request: Request2 = CustomRequest,
      headers,
      params = {},
      parseAs = "json",
      querySerializer: requestQuerySerializer,
      bodySerializer = globalBodySerializer ?? defaultBodySerializer,
      body: body2,
      ...init4
    } = fetchOptions || {};
    let finalBaseUrl = baseUrl;
    if (localBaseUrl) {
      finalBaseUrl = removeTrailingSlash(localBaseUrl) ?? baseUrl;
    }
    let querySerializer = typeof globalQuerySerializer === "function" ? globalQuerySerializer : createQuerySerializer(globalQuerySerializer);
    if (requestQuerySerializer) {
      querySerializer = typeof requestQuerySerializer === "function" ? requestQuerySerializer : createQuerySerializer({
        ...typeof globalQuerySerializer === "object" ? globalQuerySerializer : {},
        ...requestQuerySerializer
      });
    }
    const serializedBody = body2 === undefined ? undefined : bodySerializer(body2, mergeHeaders(baseHeaders, headers, params.header));
    const finalHeaders = mergeHeaders(serializedBody === undefined || serializedBody instanceof FormData ? {} : {
      "Content-Type": "application/json"
    }, baseHeaders, headers, params.header);
    const requestInit = {
      redirect: "follow",
      ...baseOptions,
      ...init4,
      body: serializedBody,
      headers: finalHeaders
    };
    let id;
    let options2;
    let request2 = new Request2(createFinalURL(schemaPath, { baseUrl: finalBaseUrl, params, querySerializer }), requestInit);
    let response;
    for (const key in init4) {
      if (!(key in request2)) {
        request2[key] = init4[key];
      }
    }
    if (middlewares.length) {
      id = randomID();
      options2 = Object.freeze({
        baseUrl: finalBaseUrl,
        fetch: fetch2,
        parseAs,
        querySerializer,
        bodySerializer
      });
      for (const m2 of middlewares) {
        if (m2 && typeof m2 === "object" && typeof m2.onRequest === "function") {
          const result = await m2.onRequest({
            request: request2,
            schemaPath,
            params,
            options: options2,
            id
          });
          if (result) {
            if (result instanceof Request2) {
              request2 = result;
            } else if (result instanceof Response) {
              response = result;
              break;
            } else {
              throw new Error("onRequest: must return new Request() or Response() when modifying the request");
            }
          }
        }
      }
    }
    if (!response) {
      try {
        response = await fetch2(request2, requestInitExt);
      } catch (error210) {
        let errorAfterMiddleware = error210;
        if (middlewares.length) {
          for (let i = middlewares.length - 1;i >= 0; i--) {
            const m2 = middlewares[i];
            if (m2 && typeof m2 === "object" && typeof m2.onError === "function") {
              const result = await m2.onError({
                request: request2,
                error: errorAfterMiddleware,
                schemaPath,
                params,
                options: options2,
                id
              });
              if (result) {
                if (result instanceof Response) {
                  errorAfterMiddleware = undefined;
                  response = result;
                  break;
                }
                if (result instanceof Error) {
                  errorAfterMiddleware = result;
                  continue;
                }
                throw new Error("onError: must return new Response() or instance of Error");
              }
            }
          }
        }
        if (errorAfterMiddleware) {
          throw errorAfterMiddleware;
        }
      }
      if (middlewares.length) {
        for (let i = middlewares.length - 1;i >= 0; i--) {
          const m2 = middlewares[i];
          if (m2 && typeof m2 === "object" && typeof m2.onResponse === "function") {
            const result = await m2.onResponse({
              request: request2,
              response,
              schemaPath,
              params,
              options: options2,
              id
            });
            if (result) {
              if (!(result instanceof Response)) {
                throw new Error("onResponse: must return new Response() when modifying the response");
              }
              response = result;
            }
          }
        }
      }
    }
    if (response.status === 204 || request2.method === "HEAD" || response.headers.get("Content-Length") === "0") {
      return response.ok ? { data: undefined, response } : { error: undefined, response };
    }
    if (response.ok) {
      if (parseAs === "stream") {
        return { data: response.body, response };
      }
      return { data: await response[parseAs](), response };
    }
    let error49 = await response.text();
    try {
      error49 = JSON.parse(error49);
    } catch {}
    return { error: error49, response };
  }
  return {
    request(method, url2, init4) {
      return coreFetch(url2, { ...init4, method: method.toUpperCase() });
    },
    GET(url2, init4) {
      return coreFetch(url2, { ...init4, method: "GET" });
    },
    PUT(url2, init4) {
      return coreFetch(url2, { ...init4, method: "PUT" });
    },
    POST(url2, init4) {
      return coreFetch(url2, { ...init4, method: "POST" });
    },
    DELETE(url2, init4) {
      return coreFetch(url2, { ...init4, method: "DELETE" });
    },
    OPTIONS(url2, init4) {
      return coreFetch(url2, { ...init4, method: "OPTIONS" });
    },
    HEAD(url2, init4) {
      return coreFetch(url2, { ...init4, method: "HEAD" });
    },
    PATCH(url2, init4) {
      return coreFetch(url2, { ...init4, method: "PATCH" });
    },
    TRACE(url2, init4) {
      return coreFetch(url2, { ...init4, method: "TRACE" });
    },
    use(...middleware) {
      for (const m2 of middleware) {
        if (!m2) {
          continue;
        }
        if (typeof m2 !== "object" || !(("onRequest" in m2) || ("onResponse" in m2) || ("onError" in m2))) {
          throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");
        }
        middlewares.push(m2);
      }
    },
    eject(...middleware) {
      for (const m2 of middleware) {
        const i = middlewares.indexOf(m2);
        if (i !== -1) {
          middlewares.splice(i, 1);
        }
      }
    }
  };
}
function serializePrimitiveParam(name3, value, options2) {
  if (value === undefined || value === null) {
    return "";
  }
  if (typeof value === "object") {
    throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
  }
  return `${name3}=${options2?.allowReserved === true ? value : encodeURIComponent(value)}`;
}
function serializeObjectParam(name3, value, options2) {
  if (!value || typeof value !== "object") {
    return "";
  }
  const values = [];
  const joiner = {
    simple: ",",
    label: ".",
    matrix: ";"
  }[options2.style] || "&";
  if (options2.style !== "deepObject" && options2.explode === false) {
    for (const k4 in value) {
      values.push(k4, options2.allowReserved === true ? value[k4] : encodeURIComponent(value[k4]));
    }
    const final2 = values.join(",");
    switch (options2.style) {
      case "form": {
        return `${name3}=${final2}`;
      }
      case "label": {
        return `.${final2}`;
      }
      case "matrix": {
        return `;${name3}=${final2}`;
      }
      default: {
        return final2;
      }
    }
  }
  for (const k4 in value) {
    const finalName = options2.style === "deepObject" ? `${name3}[${k4}]` : k4;
    values.push(serializePrimitiveParam(finalName, value[k4], options2));
  }
  const final = values.join(joiner);
  return options2.style === "label" || options2.style === "matrix" ? `${joiner}${final}` : final;
}
function serializeArrayParam(name3, value, options2) {
  if (!Array.isArray(value)) {
    return "";
  }
  if (options2.explode === false) {
    const joiner2 = { form: ",", spaceDelimited: "%20", pipeDelimited: "|" }[options2.style] || ",";
    const final = (options2.allowReserved === true ? value : value.map((v5) => encodeURIComponent(v5))).join(joiner2);
    switch (options2.style) {
      case "simple": {
        return final;
      }
      case "label": {
        return `.${final}`;
      }
      case "matrix": {
        return `;${name3}=${final}`;
      }
      default: {
        return `${name3}=${final}`;
      }
    }
  }
  const joiner = { simple: ",", label: ".", matrix: ";" }[options2.style] || "&";
  const values = [];
  for (const v5 of value) {
    if (options2.style === "simple" || options2.style === "label") {
      values.push(options2.allowReserved === true ? v5 : encodeURIComponent(v5));
    } else {
      values.push(serializePrimitiveParam(name3, v5, options2));
    }
  }
  return options2.style === "label" || options2.style === "matrix" ? `${joiner}${values.join(joiner)}` : values.join(joiner);
}
function createQuerySerializer(options2) {
  return function querySerializer(queryParams) {
    const search = [];
    if (queryParams && typeof queryParams === "object") {
      for (const name3 in queryParams) {
        const value = queryParams[name3];
        if (value === undefined || value === null) {
          continue;
        }
        if (Array.isArray(value)) {
          if (value.length === 0) {
            continue;
          }
          search.push(serializeArrayParam(name3, value, {
            style: "form",
            explode: true,
            ...options2?.array,
            allowReserved: options2?.allowReserved || false
          }));
          continue;
        }
        if (typeof value === "object") {
          search.push(serializeObjectParam(name3, value, {
            style: "deepObject",
            explode: true,
            ...options2?.object,
            allowReserved: options2?.allowReserved || false
          }));
          continue;
        }
        search.push(serializePrimitiveParam(name3, value, options2));
      }
    }
    return search.join("&");
  };
}
function defaultPathSerializer(pathname, pathParams) {
  let nextURL = pathname;
  for (const match of pathname.match(PATH_PARAM_RE) ?? []) {
    let name3 = match.substring(1, match.length - 1);
    let explode = false;
    let style = "simple";
    if (name3.endsWith("*")) {
      explode = true;
      name3 = name3.substring(0, name3.length - 1);
    }
    if (name3.startsWith(".")) {
      style = "label";
      name3 = name3.substring(1);
    } else if (name3.startsWith(";")) {
      style = "matrix";
      name3 = name3.substring(1);
    }
    if (!pathParams || pathParams[name3] === undefined || pathParams[name3] === null) {
      continue;
    }
    const value = pathParams[name3];
    if (Array.isArray(value)) {
      nextURL = nextURL.replace(match, serializeArrayParam(name3, value, { style, explode }));
      continue;
    }
    if (typeof value === "object") {
      nextURL = nextURL.replace(match, serializeObjectParam(name3, value, { style, explode }));
      continue;
    }
    if (style === "matrix") {
      nextURL = nextURL.replace(match, `;${serializePrimitiveParam(name3, value)}`);
      continue;
    }
    nextURL = nextURL.replace(match, style === "label" ? `.${encodeURIComponent(value)}` : encodeURIComponent(value));
  }
  return nextURL;
}
function defaultBodySerializer(body2, headers) {
  if (body2 instanceof FormData) {
    return body2;
  }
  if (headers) {
    const contentType = headers.get instanceof Function ? headers.get("Content-Type") ?? headers.get("content-type") : headers["Content-Type"] ?? headers["content-type"];
    if (contentType === "application/x-www-form-urlencoded") {
      return new URLSearchParams(body2).toString();
    }
  }
  return JSON.stringify(body2);
}
function createFinalURL(pathname, options2) {
  let finalURL = `${options2.baseUrl}${pathname}`;
  if (options2.params?.path) {
    finalURL = defaultPathSerializer(finalURL, options2.params.path);
  }
  let search = options2.querySerializer(options2.params.query ?? {});
  if (search.startsWith("?")) {
    search = search.substring(1);
  }
  if (search) {
    finalURL += `?${search}`;
  }
  return finalURL;
}
function mergeHeaders(...allHeaders) {
  const finalHeaders = new Headers;
  for (const h8 of allHeaders) {
    if (!h8 || typeof h8 !== "object") {
      continue;
    }
    const iterator = h8 instanceof Headers ? h8.entries() : Object.entries(h8);
    for (const [k4, v5] of iterator) {
      if (v5 === null) {
        finalHeaders.delete(k4);
      } else if (Array.isArray(v5)) {
        for (const v22 of v5) {
          finalHeaders.append(k4, v22);
        }
      } else if (v5 !== undefined) {
        finalHeaders.set(k4, v5);
      }
    }
  }
  return finalHeaders;
}
function removeTrailingSlash(url2) {
  if (url2.endsWith("/")) {
    return url2.substring(0, url2.length - 1);
  }
  return url2;
}

// ../../node_modules/.pnpm/@wraps.dev+client@0.6.1/node_modules/@wraps.dev/client/dist/index.mjs
function createPlatformClient(config2) {
  const { apiKey: apiKey2, baseUrl = "https://api.wraps.dev" } = config2;
  const authMiddleware = {
    async onRequest({ request: request2 }) {
      request2.headers.set("Authorization", `Bearer ${apiKey2}`);
      return request2;
    }
  };
  const client = createClient({
    baseUrl
  });
  client.use(authMiddleware);
  return client;
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
import { dirname as dirname3, posix as posix2, sep as sep2 } from "path";
function createModulerModifier() {
  const getModuleFromFileName = createGetModuleFromFilename2();
  return async (frames) => {
    for (const frame of frames)
      frame.module = getModuleFromFileName(frame.filename);
    return frames;
  };
}
function createGetModuleFromFilename2(basePath = process.argv[1] ? dirname3(process.argv[1]) : process.cwd(), isWindows = sep2 === "\\") {
  const normalizedBase = isWindows ? normalizeWindowsPath2(basePath) : basePath;
  return (filename) => {
    if (!filename)
      return;
    const normalizedFilename = isWindows ? normalizeWindowsPath2(filename) : filename;
    let { dir, base: file2, ext } = posix2.parse(normalizedFilename);
    if (ext === ".js" || ext === ".mjs" || ext === ".cjs")
      file2 = file2.slice(0, -1 * ext.length);
    const decodedFile = decodeURIComponent(file2);
    if (!dir)
      dir = ".";
    const n3 = dir.lastIndexOf("/node_modules");
    if (n3 > -1)
      return `${dir.slice(n3 + 14).replace(/\//g, ".")}:${decodedFile}`;
    if (dir.startsWith(normalizedBase)) {
      const moduleName = dir.slice(normalizedBase.length + 1).replace(/\//g, ".");
      return moduleName ? `${moduleName}:${decodedFile}` : decodedFile;
    }
    return decodedFile;
  };
}
function normalizeWindowsPath2(path2) {
  return path2.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/featureFlagUtils.mjs
var normalizeFlagsResponse = (flagsResponse) => {
  if ("flags" in flagsResponse) {
    const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
    const featureFlagPayloads = getPayloadsFromFlags(flagsResponse.flags);
    return {
      ...flagsResponse,
      featureFlags,
      featureFlagPayloads
    };
  }
  {
    const featureFlags = flagsResponse.featureFlags ?? {};
    const featureFlagPayloads = Object.fromEntries(Object.entries(flagsResponse.featureFlagPayloads || {}).map(([k4, v5]) => [
      k4,
      parsePayload(v5)
    ]));
    const flags = Object.fromEntries(Object.entries(featureFlags).map(([key, value]) => [
      key,
      getFlagDetailFromFlagAndPayload(key, value, featureFlagPayloads[key])
    ]));
    return {
      ...flagsResponse,
      featureFlags,
      featureFlagPayloads,
      flags
    };
  }
};
function getFlagDetailFromFlagAndPayload(key, value, payload) {
  return {
    key,
    enabled: typeof value == "string" ? true : value,
    variant: typeof value == "string" ? value : undefined,
    reason: undefined,
    metadata: {
      id: undefined,
      version: undefined,
      payload: payload ? JSON.stringify(payload) : undefined,
      description: undefined
    }
  };
}
var getFlagValuesFromFlags = (flags) => Object.fromEntries(Object.entries(flags ?? {}).map(([key, detail]) => [
  key,
  getFeatureFlagValue(detail)
]).filter(([, value]) => value !== undefined));
var getPayloadsFromFlags = (flags) => {
  const safeFlags = flags ?? {};
  return Object.fromEntries(Object.keys(safeFlags).filter((flag) => {
    const details = safeFlags[flag];
    return details.enabled && details.metadata && details.metadata.payload !== undefined;
  }).map((flag) => {
    const payload = safeFlags[flag].metadata?.payload;
    return [
      flag,
      payload ? parsePayload(payload) : undefined
    ];
  }));
};
var getFeatureFlagValue = (detail) => detail === undefined ? undefined : detail.variant ?? detail.enabled;
var parsePayload = (response) => {
  if (typeof response != "string")
    return response;
  try {
    return JSON.parse(response);
  } catch {
    return response;
  }
};

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/types.mjs
var types_PostHogPersistedProperty = /* @__PURE__ */ function(PostHogPersistedProperty) {
  PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
  PostHogPersistedProperty["DistinctId"] = "distinct_id";
  PostHogPersistedProperty["Props"] = "props";
  PostHogPersistedProperty["EnablePersonProcessing"] = "enable_person_processing";
  PostHogPersistedProperty["PersonMode"] = "person_mode";
  PostHogPersistedProperty["FeatureFlagDetails"] = "feature_flag_details";
  PostHogPersistedProperty["FeatureFlags"] = "feature_flags";
  PostHogPersistedProperty["FeatureFlagPayloads"] = "feature_flag_payloads";
  PostHogPersistedProperty["BootstrapFeatureFlagDetails"] = "bootstrap_feature_flag_details";
  PostHogPersistedProperty["BootstrapFeatureFlags"] = "bootstrap_feature_flags";
  PostHogPersistedProperty["BootstrapFeatureFlagPayloads"] = "bootstrap_feature_flag_payloads";
  PostHogPersistedProperty["OverrideFeatureFlags"] = "override_feature_flags";
  PostHogPersistedProperty["Queue"] = "queue";
  PostHogPersistedProperty["LogsQueue"] = "logs_queue";
  PostHogPersistedProperty["OptedOut"] = "opted_out";
  PostHogPersistedProperty["SessionId"] = "session_id";
  PostHogPersistedProperty["SessionStartTimestamp"] = "session_start_timestamp";
  PostHogPersistedProperty["SessionLastTimestamp"] = "session_timestamp";
  PostHogPersistedProperty["PersonProperties"] = "person_properties";
  PostHogPersistedProperty["GroupProperties"] = "group_properties";
  PostHogPersistedProperty["InstalledAppBuild"] = "installed_app_build";
  PostHogPersistedProperty["InstalledAppVersion"] = "installed_app_version";
  PostHogPersistedProperty["SessionReplay"] = "session_replay";
  PostHogPersistedProperty["SurveyLastSeenDate"] = "survey_last_seen_date";
  PostHogPersistedProperty["SurveysSeen"] = "surveys_seen";
  PostHogPersistedProperty["Surveys"] = "surveys";
  PostHogPersistedProperty["RemoteConfig"] = "remote_config";
  PostHogPersistedProperty["FlagsEndpointWasHit"] = "flags_endpoint_was_hit";
  PostHogPersistedProperty["DeviceId"] = "device_id";
  return PostHogPersistedProperty;
}({});

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/gzip.mjs
function isGzipSupported() {
  return "CompressionStream" in globalThis && "TextEncoder" in globalThis && "Response" in globalThis && typeof Response.prototype.blob == "function";
}
var NATIVE_GZIP_VALIDATION_ERROR = "NativeGzipValidationError";
var GZIP_MAGIC_FIRST_BYTE = 31;
var GZIP_MAGIC_SECOND_BYTE = 139;
var GZIP_DEFLATE_METHOD = 8;
var hasGzipMagic = (bytes) => bytes.length >= 2 && bytes[0] === GZIP_MAGIC_FIRST_BYTE && bytes[1] === GZIP_MAGIC_SECOND_BYTE;
var crc32Table;
var getCrc32Table = () => {
  if (crc32Table)
    return crc32Table;
  crc32Table = [];
  for (let i = 0;i < 256; i++) {
    let crc = i;
    for (let j4 = 0;j4 < 8; j4++)
      crc = 1 & crc ? 3988292384 ^ crc >>> 1 : crc >>> 1;
    crc32Table[i] = crc >>> 0;
  }
  return crc32Table;
};
var crc32 = (bytes) => {
  const table = getCrc32Table();
  let crc = 4294967295;
  for (let i = 0;i < bytes.length; i++)
    crc = table[(crc ^ bytes[i]) & 255] ^ crc >>> 8;
  return (4294967295 ^ crc) >>> 0;
};
var throwNativeGzipValidationError = (reason) => {
  const error49 = new Error(`Native gzip produced invalid output: ${reason}`);
  error49.name = NATIVE_GZIP_VALIDATION_ERROR;
  throw error49;
};
var validateNativeGzip = async (compressed, inputBytes) => {
  if (compressed.size < 18)
    throwNativeGzipValidationError("too-short");
  const header = new Uint8Array(await compressed.slice(0, 10).arrayBuffer());
  if (!hasGzipMagic(header) || header[2] !== GZIP_DEFLATE_METHOD)
    throwNativeGzipValidationError("invalid-header");
  const trailer = new DataView(await compressed.slice(compressed.size - 8).arrayBuffer());
  if (trailer.getUint32(0, true) !== crc32(inputBytes))
    throwNativeGzipValidationError("invalid-crc");
  const inputSize = inputBytes.length >>> 0;
  if (trailer.getUint32(4, true) !== inputSize)
    throwNativeGzipValidationError("invalid-size");
};
async function gzipCompress(input, isDebug = true, options2) {
  try {
    const inputBytes = new TextEncoder().encode(input);
    const compressedStream = new CompressionStream("gzip");
    const writer = compressedStream.writable.getWriter();
    const writePromise = writer.write(inputBytes).then(() => writer.close()).catch(async (err) => {
      try {
        await writer.abort(err);
      } catch {}
      throw err;
    });
    const responsePromise = new Response(compressedStream.readable).blob();
    const [compressed] = await Promise.all([
      responsePromise,
      writePromise
    ]);
    await validateNativeGzip(compressed, inputBytes);
    return compressed;
  } catch (error49) {
    if (options2?.rethrow)
      throw error49;
    if (isDebug)
      console.error("Failed to gzip compress data", error49);
    return null;
  }
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/bot-detection.mjs
var DEFAULT_BLOCKED_UA_STRS = [
  "amazonbot",
  "amazonproductbot",
  "app.hypefactors.com",
  "applebot",
  "archive.org_bot",
  "awariobot",
  "backlinksextendedbot",
  "baiduspider",
  "bingbot",
  "bingpreview",
  "chrome-lighthouse",
  "dataforseobot",
  "deepscan",
  "duckduckbot",
  "facebookexternal",
  "facebookcatalog",
  "http://yandex.com/bots",
  "hubspot",
  "ia_archiver",
  "leikibot",
  "linkedinbot",
  "meta-externalagent",
  "mj12bot",
  "msnbot",
  "nessus",
  "petalbot",
  "pinterest",
  "prerender",
  "rogerbot",
  "screaming frog",
  "sebot-wa",
  "sitebulb",
  "slackbot",
  "slurp",
  "trendictionbot",
  "turnitin",
  "twitterbot",
  "vercel-screenshot",
  "vercelbot",
  "yahoo! slurp",
  "yandexbot",
  "zoombot",
  "bot.htm",
  "bot.php",
  "(bot;",
  "bot/",
  "crawler",
  "ahrefsbot",
  "ahrefssiteaudit",
  "semrushbot",
  "siteauditbot",
  "splitsignalbot",
  "gptbot",
  "oai-searchbot",
  "chatgpt-user",
  "perplexitybot",
  "better uptime bot",
  "sentryuptimebot",
  "uptimerobot",
  "headlesschrome",
  "cypress",
  "google-hoteladsverifier",
  "adsbot-google",
  "apis-google",
  "duplexweb-google",
  "feedfetcher-google",
  "google favicon",
  "google web preview",
  "google-read-aloud",
  "googlebot",
  "googleother",
  "google-cloudvertexbot",
  "googleweblight",
  "mediapartners-google",
  "storebot-google",
  "google-inspectiontool",
  "bytespider"
];
var isBlockedUA = function(ua3, customBlockedUserAgents = []) {
  if (!ua3)
    return false;
  const uaLower = ua3.toLowerCase();
  return DEFAULT_BLOCKED_UA_STRS.concat(customBlockedUserAgents).some((blockedUA) => {
    const blockedUaLower = blockedUA.toLowerCase();
    return uaLower.indexOf(blockedUaLower) !== -1;
  });
};
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/type-utils.mjs
var nativeIsArray = Array.isArray;
var ObjProto = Object.prototype;
var type_utils_hasOwnProperty = ObjProto.hasOwnProperty;
var type_utils_toString = ObjProto.toString;
var isArray = nativeIsArray || function(obj) {
  return type_utils_toString.call(obj) === "[object Array]";
};
var isObject3 = (x4) => x4 === Object(x4) && !isArray(x4);
var isUndefined = (x4) => x4 === undefined;
var isString2 = (x4) => type_utils_toString.call(x4) == "[object String]";
var isEmptyString = (x4) => isString2(x4) && x4.trim().length === 0;
var isNumber3 = (x4) => type_utils_toString.call(x4) == "[object Number]" && x4 === x4;
var isPlainError = (x4) => x4 instanceof Error;
function isPrimitive2(value) {
  return value === null || typeof value != "object";
}
function isBuiltin2(candidate, className) {
  return Object.prototype.toString.call(candidate) === `[object ${className}]`;
}
function isErrorEvent3(event) {
  return isBuiltin2(event, "ErrorEvent");
}
function isEvent2(candidate) {
  return typeof Event != "undefined" && isInstanceOf2(candidate, Event);
}
function isPlainObject3(candidate) {
  return isBuiltin2(candidate, "Object");
}
function isInstanceOf2(candidate, base) {
  try {
    return candidate instanceof base;
  } catch {
    return false;
  }
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/number-utils.mjs
function clampToRange(value, min, max, logger, fallbackValue) {
  if (min > max) {
    logger.warn("min cannot be greater than max.");
    min = max;
  }
  if (isNumber3(value))
    if (value > max) {
      logger.warn(" cannot be  greater than max: " + max + ". Using max value instead.");
      return max;
    } else {
      if (!(value < min))
        return value;
      logger.warn(" cannot be less than min: " + min + ". Using min value instead.");
      return min;
    }
  logger.warn(" must be a number. using max or fallback. max: " + max + ", fallback: " + fallbackValue);
  return clampToRange(fallbackValue || max, min, max, logger);
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
var ONE_DAY_IN_MS = 86400000;

class BucketedRateLimiter {
  constructor(options2) {
    this._buckets = {};
    this._onBucketRateLimited = options2._onBucketRateLimited;
    this._bucketSize = clampToRange(options2.bucketSize, 0, 100, options2._logger);
    this._refillRate = clampToRange(options2.refillRate, 0, this._bucketSize, options2._logger);
    this._refillInterval = clampToRange(options2.refillInterval, 0, ONE_DAY_IN_MS, options2._logger);
  }
  _applyRefill(bucket, now) {
    const elapsedMs = now - bucket.lastAccess;
    const refillIntervals = Math.floor(elapsedMs / this._refillInterval);
    if (refillIntervals > 0) {
      const tokensToAdd = refillIntervals * this._refillRate;
      bucket.tokens = Math.min(bucket.tokens + tokensToAdd, this._bucketSize);
      bucket.lastAccess = bucket.lastAccess + refillIntervals * this._refillInterval;
    }
  }
  consumeRateLimit(key) {
    const now = Date.now();
    const keyStr = String(key);
    let bucket = this._buckets[keyStr];
    if (bucket)
      this._applyRefill(bucket, now);
    else {
      bucket = {
        tokens: this._bucketSize,
        lastAccess: now
      };
      this._buckets[keyStr] = bucket;
    }
    if (bucket.tokens === 0)
      return true;
    bucket.tokens--;
    if (bucket.tokens === 0)
      this._onBucketRateLimited?.(key);
    return bucket.tokens === 0;
  }
  stop() {
    this._buckets = {};
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
/*! For license information please see uuidv7.mjs.LICENSE.txt */
var DIGITS = "0123456789abcdef";

class UUID {
  constructor(bytes) {
    this.bytes = bytes;
  }
  static ofInner(bytes) {
    if (bytes.length === 16)
      return new UUID(bytes);
    throw new TypeError("not 128-bit length");
  }
  static fromFieldsV7(unixTsMs, randA, randBHi, randBLo) {
    if (!Number.isInteger(unixTsMs) || !Number.isInteger(randA) || !Number.isInteger(randBHi) || !Number.isInteger(randBLo) || unixTsMs < 0 || randA < 0 || randBHi < 0 || randBLo < 0 || unixTsMs > 281474976710655 || randA > 4095 || randBHi > 1073741823 || randBLo > 4294967295)
      throw new RangeError("invalid field value");
    const bytes = new Uint8Array(16);
    bytes[0] = unixTsMs / 2 ** 40;
    bytes[1] = unixTsMs / 2 ** 32;
    bytes[2] = unixTsMs / 2 ** 24;
    bytes[3] = unixTsMs / 2 ** 16;
    bytes[4] = unixTsMs / 256;
    bytes[5] = unixTsMs;
    bytes[6] = 112 | randA >>> 8;
    bytes[7] = randA;
    bytes[8] = 128 | randBHi >>> 24;
    bytes[9] = randBHi >>> 16;
    bytes[10] = randBHi >>> 8;
    bytes[11] = randBHi;
    bytes[12] = randBLo >>> 24;
    bytes[13] = randBLo >>> 16;
    bytes[14] = randBLo >>> 8;
    bytes[15] = randBLo;
    return new UUID(bytes);
  }
  static parse(uuid5) {
    let hex3;
    switch (uuid5.length) {
      case 32:
        hex3 = /^[0-9a-f]{32}$/i.exec(uuid5)?.[0];
        break;
      case 36:
        hex3 = /^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid5)?.slice(1, 6).join("");
        break;
      case 38:
        hex3 = /^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(uuid5)?.slice(1, 6).join("");
        break;
      case 45:
        hex3 = /^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid5)?.slice(1, 6).join("");
        break;
      default:
        break;
    }
    if (hex3) {
      const inner = new Uint8Array(16);
      for (let i = 0;i < 16; i += 4) {
        const n3 = parseInt(hex3.substring(2 * i, 2 * i + 8), 16);
        inner[i + 0] = n3 >>> 24;
        inner[i + 1] = n3 >>> 16;
        inner[i + 2] = n3 >>> 8;
        inner[i + 3] = n3;
      }
      return new UUID(inner);
    }
    throw new SyntaxError("could not parse UUID string");
  }
  toString() {
    let text3 = "";
    for (let i = 0;i < this.bytes.length; i++) {
      text3 += DIGITS.charAt(this.bytes[i] >>> 4);
      text3 += DIGITS.charAt(15 & this.bytes[i]);
      if (i === 3 || i === 5 || i === 7 || i === 9)
        text3 += "-";
    }
    return text3;
  }
  toHex() {
    let text3 = "";
    for (let i = 0;i < this.bytes.length; i++) {
      text3 += DIGITS.charAt(this.bytes[i] >>> 4);
      text3 += DIGITS.charAt(15 & this.bytes[i]);
    }
    return text3;
  }
  toJSON() {
    return this.toString();
  }
  getVariant() {
    const n3 = this.bytes[8] >>> 4;
    if (n3 < 0)
      throw new Error("unreachable");
    if (n3 <= 7)
      return this.bytes.every((e3) => e3 === 0) ? "NIL" : "VAR_0";
    if (n3 <= 11)
      return "VAR_10";
    if (n3 <= 13)
      return "VAR_110";
    if (n3 <= 15)
      return this.bytes.every((e3) => e3 === 255) ? "MAX" : "VAR_RESERVED";
    else
      throw new Error("unreachable");
  }
  getVersion() {
    return this.getVariant() === "VAR_10" ? this.bytes[6] >>> 4 : undefined;
  }
  clone() {
    return new UUID(this.bytes.slice(0));
  }
  equals(other2) {
    return this.compareTo(other2) === 0;
  }
  compareTo(other2) {
    for (let i = 0;i < 16; i++) {
      const diff = this.bytes[i] - other2.bytes[i];
      if (diff !== 0)
        return Math.sign(diff);
    }
    return 0;
  }
}

class V7Generator {
  constructor(randomNumberGenerator) {
    this.timestamp = 0;
    this.counter = 0;
    this.random = randomNumberGenerator ?? getDefaultRandom();
  }
  generate() {
    return this.generateOrResetCore(Date.now(), 1e4);
  }
  generateOrAbort() {
    return this.generateOrAbortCore(Date.now(), 1e4);
  }
  generateOrResetCore(unixTsMs, rollbackAllowance) {
    let value = this.generateOrAbortCore(unixTsMs, rollbackAllowance);
    if (value === undefined) {
      this.timestamp = 0;
      value = this.generateOrAbortCore(unixTsMs, rollbackAllowance);
    }
    return value;
  }
  generateOrAbortCore(unixTsMs, rollbackAllowance) {
    const MAX_COUNTER = 4398046511103;
    if (!Number.isInteger(unixTsMs) || unixTsMs < 1 || unixTsMs > 281474976710655)
      throw new RangeError("`unixTsMs` must be a 48-bit positive integer");
    if (rollbackAllowance < 0 || rollbackAllowance > 281474976710655)
      throw new RangeError("`rollbackAllowance` out of reasonable range");
    if (unixTsMs > this.timestamp) {
      this.timestamp = unixTsMs;
      this.resetCounter();
    } else {
      if (!(unixTsMs + rollbackAllowance >= this.timestamp))
        return;
      this.counter++;
      if (this.counter > MAX_COUNTER) {
        this.timestamp++;
        this.resetCounter();
      }
    }
    return UUID.fromFieldsV7(this.timestamp, Math.trunc(this.counter / 2 ** 30), this.counter & 2 ** 30 - 1, this.random.nextUint32());
  }
  resetCounter() {
    this.counter = 1024 * this.random.nextUint32() + (1023 & this.random.nextUint32());
  }
  generateV4() {
    const bytes = new Uint8Array(Uint32Array.of(this.random.nextUint32(), this.random.nextUint32(), this.random.nextUint32(), this.random.nextUint32()).buffer);
    bytes[6] = 64 | bytes[6] >>> 4;
    bytes[8] = 128 | bytes[8] >>> 2;
    return UUID.ofInner(bytes);
  }
}
var getDefaultRandom = () => ({
  nextUint32: () => 65536 * Math.trunc(65536 * Math.random()) + Math.trunc(65536 * Math.random())
});
var defaultGenerator;
var uuidv72 = () => uuidv7obj().toString();
var uuidv7obj = () => (defaultGenerator || (defaultGenerator = new V7Generator)).generate();

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/promise-queue.mjs
class PromiseQueue {
  add(promise2) {
    const promiseUUID = uuidv72();
    this.promiseByIds[promiseUUID] = promise2;
    promise2.catch(() => {}).finally(() => {
      delete this.promiseByIds[promiseUUID];
    });
    return promise2;
  }
  async join() {
    let promises = Object.values(this.promiseByIds);
    let length2 = promises.length;
    while (length2 > 0) {
      await Promise.all(promises);
      promises = Object.values(this.promiseByIds);
      length2 = promises.length;
    }
  }
  get length() {
    return Object.keys(this.promiseByIds).length;
  }
  constructor() {
    this.promiseByIds = {};
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/logger.mjs
function createConsole(consoleLike = console) {
  const lockedMethods = {
    log: consoleLike.log.bind(consoleLike),
    warn: consoleLike.warn.bind(consoleLike),
    error: consoleLike.error.bind(consoleLike),
    debug: consoleLike.debug.bind(consoleLike)
  };
  return lockedMethods;
}
var _createLogger = (prefix, maybeCall, consoleLike) => {
  function _log(level, ...args) {
    maybeCall(() => {
      const consoleMethod = consoleLike[level];
      consoleMethod(prefix, ...args);
    });
  }
  const logger = {
    debug: (...args) => {
      _log("debug", ...args);
    },
    info: (...args) => {
      _log("log", ...args);
    },
    warn: (...args) => {
      _log("warn", ...args);
    },
    error: (...args) => {
      _log("error", ...args);
    },
    critical: (...args) => {
      consoleLike["error"](prefix, ...args);
    },
    createLogger: (additionalPrefix) => _createLogger(`${prefix} ${additionalPrefix}`, maybeCall, consoleLike)
  };
  return logger;
};
var passThrough = (fn3) => fn3();
function createLogger(prefix, maybeCall = passThrough) {
  return _createLogger(prefix, maybeCall, createConsole());
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
var MOBILE = "Mobile";
var IOS = "iOS";
var ANDROID = "Android";
var TABLET = "Tablet";
var ANDROID_TABLET = ANDROID + " " + TABLET;
var APPLE = "Apple";
var APPLE_WATCH = APPLE + " Watch";
var SAFARI = "Safari";
var BLACKBERRY = "BlackBerry";
var SAMSUNG = "Samsung";
var SAMSUNG_BROWSER = SAMSUNG + "Browser";
var SAMSUNG_INTERNET = SAMSUNG + " Internet";
var CHROME = "Chrome";
var CHROME_OS = CHROME + " OS";
var CHROME_IOS = CHROME + " " + IOS;
var INTERNET_EXPLORER = "Internet Explorer";
var INTERNET_EXPLORER_MOBILE = INTERNET_EXPLORER + " " + MOBILE;
var OPERA = "Opera";
var OPERA_MINI = OPERA + " Mini";
var EDGE = "Edge";
var MICROSOFT_EDGE = "Microsoft " + EDGE;
var FIREFOX = "Firefox";
var FIREFOX_IOS = FIREFOX + " " + IOS;
var NINTENDO = "Nintendo";
var PLAYSTATION = "PlayStation";
var XBOX = "Xbox";
var ANDROID_MOBILE = ANDROID + " " + MOBILE;
var MOBILE_SAFARI = MOBILE + " " + SAFARI;
var WINDOWS = "Windows";
var WINDOWS_PHONE = WINDOWS + " Phone";
var GENERIC = "Generic";
var GENERIC_MOBILE = GENERIC + " " + MOBILE.toLowerCase();
var GENERIC_TABLET = GENERIC + " " + TABLET.toLowerCase();
var KONQUEROR = "Konqueror";
var OCULUS_BROWSER = "Oculus Browser";
var VIVALDI = "Vivaldi";
var YANDEX = "Yandex";
var WHALE = "Whale";
var DUCKDUCKGO = "DuckDuckGo";
var PALE_MOON = "Pale Moon";
var WATERFOX = "Waterfox";
var BRAVE = "Brave";
var GOOGLE_SEARCH_APP = "Google Search App";
var BROWSER_VERSION_REGEX_SUFFIX = "(\\d+(\\.\\d+)?)";
var DEFAULT_BROWSER_VERSION_REGEX = new RegExp("Version/" + BROWSER_VERSION_REGEX_SUFFIX);
var XBOX_REGEX = new RegExp(XBOX, "i");
var PLAYSTATION_REGEX = new RegExp(PLAYSTATION + " \\w+", "i");
var NINTENDO_REGEX = new RegExp(NINTENDO + " \\w+", "i");
var BLACKBERRY_REGEX = new RegExp(BLACKBERRY + "|PlayBook|BB10", "i");
var windowsVersionMap = {
  "NT3.51": "NT 3.11",
  "NT4.0": "NT 4.0",
  "5.0": "2000",
  "5.1": "XP",
  "5.2": "XP",
  "6.0": "Vista",
  "6.1": "7",
  "6.2": "8",
  "6.3": "8.1",
  "6.4": "10",
  "10.0": "10"
};
var versionRegexes = {
  [INTERNET_EXPLORER_MOBILE]: [
    new RegExp("rv:" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [MICROSOFT_EDGE]: [
    new RegExp(EDGE + "?\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [CHROME]: [
    new RegExp("(" + CHROME + "|CrMo)\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [CHROME_IOS]: [
    new RegExp("CriOS\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  "UC Browser": [
    new RegExp("(UCBrowser|UCWEB)\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [SAFARI]: [
    DEFAULT_BROWSER_VERSION_REGEX
  ],
  [MOBILE_SAFARI]: [
    DEFAULT_BROWSER_VERSION_REGEX
  ],
  [OPERA]: [
    new RegExp("(" + OPERA + "|OPR)\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [FIREFOX]: [
    new RegExp(FIREFOX + "\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [FIREFOX_IOS]: [
    new RegExp("FxiOS\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [KONQUEROR]: [
    new RegExp("Konqueror[:/]?" + BROWSER_VERSION_REGEX_SUFFIX, "i")
  ],
  [BLACKBERRY]: [
    new RegExp(BLACKBERRY + " " + BROWSER_VERSION_REGEX_SUFFIX),
    DEFAULT_BROWSER_VERSION_REGEX
  ],
  [ANDROID_MOBILE]: [
    new RegExp("android\\s" + BROWSER_VERSION_REGEX_SUFFIX, "i")
  ],
  [SAMSUNG_INTERNET]: [
    new RegExp(SAMSUNG_BROWSER + "\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [OCULUS_BROWSER]: [
    new RegExp("OculusBrowser\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [VIVALDI]: [
    new RegExp(VIVALDI + "\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [YANDEX]: [
    new RegExp("YaBrowser\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [WHALE]: [
    new RegExp(WHALE + "\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [BRAVE]: [
    new RegExp(BRAVE + "\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [DUCKDUCKGO]: [
    new RegExp("(DuckDuckGo|Ddg)\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [PALE_MOON]: [
    new RegExp("PaleMoon\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [WATERFOX]: [
    new RegExp(WATERFOX + "\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [GOOGLE_SEARCH_APP]: [
    new RegExp("GSA\\/" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  [INTERNET_EXPLORER]: [
    new RegExp("(rv:|MSIE )" + BROWSER_VERSION_REGEX_SUFFIX)
  ],
  Mozilla: [
    new RegExp("rv:" + BROWSER_VERSION_REGEX_SUFFIX)
  ]
};
var osMatchers = [
  [
    new RegExp(XBOX + "; " + XBOX + " (.*?)[);]", "i"),
    (match) => [
      XBOX,
      match && match[1] || ""
    ]
  ],
  [
    new RegExp(NINTENDO, "i"),
    [
      NINTENDO,
      ""
    ]
  ],
  [
    new RegExp(PLAYSTATION, "i"),
    [
      PLAYSTATION,
      ""
    ]
  ],
  [
    BLACKBERRY_REGEX,
    [
      BLACKBERRY,
      ""
    ]
  ],
  [
    new RegExp(WINDOWS, "i"),
    (_6, user_agent) => {
      if (/Phone/.test(user_agent) || /WPDesktop/.test(user_agent))
        return [
          WINDOWS_PHONE,
          ""
        ];
      if (new RegExp(MOBILE).test(user_agent) && !/IEMobile\b/.test(user_agent))
        return [
          WINDOWS + " " + MOBILE,
          ""
        ];
      const match = /Windows NT ([0-9.]+)/i.exec(user_agent);
      if (match && match[1]) {
        const version4 = match[1];
        let osVersion = windowsVersionMap[version4] || "";
        if (/arm/i.test(user_agent))
          osVersion = "RT";
        return [
          WINDOWS,
          osVersion
        ];
      }
      return [
        WINDOWS,
        ""
      ];
    }
  ],
  [
    /((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,
    (match) => {
      if (match && match[3]) {
        const versionParts = [
          match[3],
          match[4],
          match[5] || "0"
        ];
        return [
          IOS,
          versionParts.join(".")
        ];
      }
      return [
        IOS,
        ""
      ];
    }
  ],
  [
    /(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,
    (match) => {
      let version4 = "";
      if (match && match.length >= 3)
        version4 = isUndefined(match[2]) ? match[3] : match[2];
      return [
        "watchOS",
        version4
      ];
    }
  ],
  [
    new RegExp("(" + ANDROID + " (\\d+)\\.(\\d+)\\.?(\\d+)?|" + ANDROID + ")", "i"),
    (match) => {
      if (match && match[2]) {
        const versionParts = [
          match[2],
          match[3],
          match[4] || "0"
        ];
        return [
          ANDROID,
          versionParts.join(".")
        ];
      }
      return [
        ANDROID,
        ""
      ];
    }
  ],
  [
    /Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,
    (match) => {
      const result = [
        "Mac OS X",
        ""
      ];
      if (match && match[1]) {
        const versionParts = [
          match[1],
          match[2],
          match[3] || "0"
        ];
        result[1] = versionParts.join(".");
      }
      return result;
    }
  ],
  [
    /Mac/i,
    [
      "Mac OS X",
      ""
    ]
  ],
  [
    /CrOS/,
    [
      CHROME_OS,
      ""
    ]
  ],
  [
    /Linux|debian/i,
    [
      "Linux",
      ""
    ]
  ]
];

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/utils/index.mjs
var STRING_FORMAT = "utf8";
var UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
function isValidUUID(value) {
  return typeof value == "string" && UUID_REGEX.test(value);
}
function getEventUuid(uuid5, generateUuid) {
  return isValidUUID(uuid5) ? uuid5 : generateUuid();
}
function removeTrailingSlash2(url2) {
  return url2?.replace(/\/+$/, "");
}
async function retriable(fn3, props) {
  let lastError = null;
  for (let i = 0;i < props.retryCount + 1; i++) {
    if (i > 0)
      await new Promise((r2) => setTimeout(r2, props.retryDelay));
    try {
      const res = await fn3();
      return res;
    } catch (e3) {
      lastError = e3;
      if (!props.retryCheck(e3))
        throw e3;
    }
  }
  throw lastError;
}
function currentISOTime() {
  return new Date().toISOString();
}
function safeSetTimeout(fn3, timeout) {
  const t2 = setTimeout(fn3, timeout);
  t2?.unref && t2?.unref();
  return t2;
}
var isError2 = (x4) => x4 instanceof Error;
function allSettled(promises) {
  return Promise.all(promises.map((p3) => (p3 ?? Promise.resolve()).then((value) => ({
    status: "fulfilled",
    value
  }), (reason) => ({
    status: "rejected",
    reason
  }))));
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/logs/logs-utils.mjs
var OTLP_SEVERITY_MAP = {
  trace: {
    text: "TRACE",
    number: 1
  },
  debug: {
    text: "DEBUG",
    number: 5
  },
  info: {
    text: "INFO",
    number: 9
  },
  warn: {
    text: "WARN",
    number: 13
  },
  error: {
    text: "ERROR",
    number: 17
  },
  fatal: {
    text: "FATAL",
    number: 21
  }
};
var DEFAULT_OTLP_SEVERITY = OTLP_SEVERITY_MAP.info;
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/eventemitter.mjs
class SimpleEventEmitter {
  constructor() {
    this.events = {};
    this.events = {};
  }
  on(event, listener) {
    if (!this.events[event])
      this.events[event] = [];
    this.events[event].push(listener);
    return () => {
      this.events[event] = this.events[event].filter((x4) => x4 !== listener);
    };
  }
  emit(event, payload) {
    for (const listener of this.events[event] || [])
      listener(payload);
    for (const listener of this.events["*"] || [])
      listener(event, payload);
  }
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/index.mjs
var exports_error_tracking = {};
__export(exports_error_tracking, {
  winjsStackLineParser: () => winjsStackLineParser,
  stripReservedExceptionStepFields: () => stripReservedExceptionStepFields,
  reverseAndStripFrames: () => reverseAndStripFrames,
  resolveExceptionStepsConfig: () => resolveExceptionStepsConfig,
  opera11StackLineParser: () => opera11StackLineParser,
  opera10StackLineParser: () => opera10StackLineParser,
  nodeStackLineParser: () => nodeStackLineParser2,
  getUtf8ByteLength: () => getUtf8ByteLength,
  geckoStackLineParser: () => geckoStackLineParser,
  createStackParser: () => createStackParser2,
  createDefaultStackParser: () => createDefaultStackParser,
  chromeStackLineParser: () => chromeStackLineParser,
  StringCoercer: () => StringCoercer,
  ReduceableCache: () => ReduceableCache,
  PromiseRejectionEventCoercer: () => PromiseRejectionEventCoercer,
  PrimitiveCoercer: () => PrimitiveCoercer,
  ObjectCoercer: () => ObjectCoercer,
  ExceptionStepsBuffer: () => ExceptionStepsBuffer,
  EventCoercer: () => EventCoercer,
  ErrorPropertiesBuilder: () => ErrorPropertiesBuilder,
  ErrorEventCoercer: () => ErrorEventCoercer,
  ErrorCoercer: () => ErrorCoercer,
  EXCEPTION_STEP_INTERNAL_FIELDS: () => EXCEPTION_STEP_INTERNAL_FIELDS,
  DOMExceptionCoercer: () => DOMExceptionCoercer,
  DEFAULT_EXCEPTION_STEPS_CONFIG: () => DEFAULT_EXCEPTION_STEPS_CONFIG
});

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
var parsedStackResults2;
var lastKeysCount;
var cachedFilenameChunkIds;
function getFilenameToChunkIdMap(stackParser) {
  const chunkIdMap = globalThis._posthogChunkIds;
  if (!chunkIdMap)
    return;
  const chunkIdKeys = Object.keys(chunkIdMap);
  if (cachedFilenameChunkIds && chunkIdKeys.length === lastKeysCount)
    return cachedFilenameChunkIds;
  lastKeysCount = chunkIdKeys.length;
  cachedFilenameChunkIds = chunkIdKeys.reduce((acc, stackKey) => {
    if (!parsedStackResults2)
      parsedStackResults2 = {};
    const result = parsedStackResults2[stackKey];
    if (result)
      acc[result[0]] = result[1];
    else {
      const parsedStack = stackParser(stackKey);
      for (let i = parsedStack.length - 1;i >= 0; i--) {
        const stackFrame = parsedStack[i];
        const filename = stackFrame?.filename;
        const chunkId = chunkIdMap[stackKey];
        if (filename && chunkId) {
          acc[filename] = chunkId;
          parsedStackResults2[stackKey] = [
            filename,
            chunkId
          ];
          break;
        }
      }
    }
    return acc;
  }, {});
  return cachedFilenameChunkIds;
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
var MAX_CAUSE_RECURSION = 4;

class ErrorPropertiesBuilder {
  constructor(coercers, stackParser, modifiers = []) {
    this.coercers = coercers;
    this.stackParser = stackParser;
    this.modifiers = modifiers;
  }
  buildFromUnknown(input, hint = {}) {
    const providedMechanism = hint && hint.mechanism;
    const mechanism = providedMechanism || {
      handled: true,
      type: "generic"
    };
    const coercingContext = this.buildCoercingContext(mechanism, hint, 0);
    const exceptionWithCause = coercingContext.apply(input);
    const parsingContext = this.buildParsingContext(hint);
    const exceptionWithStack = this.parseStacktrace(exceptionWithCause, parsingContext);
    const exceptionList = this.convertToExceptionList(exceptionWithStack, mechanism);
    return {
      $exception_list: exceptionList,
      $exception_level: "error"
    };
  }
  async modifyFrames(exceptionList) {
    for (const exc of exceptionList)
      if (exc.stacktrace && exc.stacktrace.frames && isArray(exc.stacktrace.frames))
        exc.stacktrace.frames = await this.applyModifiers(exc.stacktrace.frames);
    return exceptionList;
  }
  coerceFallback(ctx) {
    return {
      type: "Error",
      value: "Unknown error",
      stack: ctx.syntheticException?.stack,
      synthetic: true
    };
  }
  parseStacktrace(err, ctx) {
    let cause;
    if (err.cause != null)
      cause = this.parseStacktrace(err.cause, ctx);
    let stack;
    if (err.stack != "" && err.stack != null)
      stack = this.applyChunkIds(this.stackParser(err.stack, err.synthetic ? ctx.skipFirstLines : 0), ctx.chunkIdMap);
    return {
      ...err,
      cause,
      stack
    };
  }
  applyChunkIds(frames, chunkIdMap) {
    return frames.map((frame) => {
      if (frame.filename && chunkIdMap)
        frame.chunk_id = chunkIdMap[frame.filename];
      return frame;
    });
  }
  applyCoercers(input, ctx) {
    for (const adapter of this.coercers)
      if (adapter.match(input))
        return adapter.coerce(input, ctx);
    return this.coerceFallback(ctx);
  }
  async applyModifiers(frames) {
    let newFrames = frames;
    for (const modifier of this.modifiers)
      newFrames = await modifier(newFrames);
    return newFrames;
  }
  convertToExceptionList(exceptionWithStack, mechanism) {
    const currentException = {
      type: exceptionWithStack.type,
      value: exceptionWithStack.value,
      mechanism: {
        type: mechanism.type ?? "generic",
        handled: mechanism.handled ?? true,
        synthetic: exceptionWithStack.synthetic ?? false
      }
    };
    if (exceptionWithStack.stack)
      currentException.stacktrace = {
        type: "raw",
        frames: exceptionWithStack.stack
      };
    const exceptionList = [
      currentException
    ];
    if (exceptionWithStack.cause != null)
      exceptionList.push(...this.convertToExceptionList(exceptionWithStack.cause, {
        ...mechanism,
        handled: true
      }));
    return exceptionList;
  }
  buildParsingContext(hint) {
    const context10 = {
      chunkIdMap: getFilenameToChunkIdMap(this.stackParser),
      skipFirstLines: hint.skipFirstLines ?? 1
    };
    return context10;
  }
  buildCoercingContext(mechanism, hint, depth = 0) {
    const coerce = (input, depth2) => {
      if (!(depth2 <= MAX_CAUSE_RECURSION))
        return;
      {
        const ctx = this.buildCoercingContext(mechanism, hint, depth2);
        return this.applyCoercers(input, ctx);
      }
    };
    const context10 = {
      ...hint,
      syntheticException: depth == 0 ? hint.syntheticException : undefined,
      mechanism,
      apply: (input) => coerce(input, depth),
      next: (input) => coerce(input, depth + 1)
    };
    return context10;
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
var UNKNOWN_FUNCTION2 = "?";
function createFrame(platform3, filename, func, lineno, colno) {
  const frame = {
    platform: platform3,
    filename,
    function: func === "<anonymous>" ? UNKNOWN_FUNCTION2 : func,
    in_app: true
  };
  if (!isUndefined(lineno))
    frame.lineno = lineno;
  if (!isUndefined(colno))
    frame.colno = colno;
  return frame;
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
var extractSafariExtensionDetails = (func, filename) => {
  const isSafariExtension = func.indexOf("safari-extension") !== -1;
  const isSafariWebExtension = func.indexOf("safari-web-extension") !== -1;
  return isSafariExtension || isSafariWebExtension ? [
    func.indexOf("@") !== -1 ? func.split("@")[0] : UNKNOWN_FUNCTION2,
    isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`
  ] : [
    func,
    filename
  ];
};

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
var chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
var chromeRegex = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
var chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
var chromeStackLineParser = (line2, platform3) => {
  const noFnParts = chromeRegexNoFnName.exec(line2);
  if (noFnParts) {
    const [, filename, line3, col] = noFnParts;
    return createFrame(platform3, filename, UNKNOWN_FUNCTION2, +line3, +col);
  }
  const parts = chromeRegex.exec(line2);
  if (parts) {
    const isEval = parts[2] && parts[2].indexOf("eval") === 0;
    if (isEval) {
      const subMatch = chromeEvalRegex.exec(parts[2]);
      if (subMatch) {
        parts[2] = subMatch[1];
        parts[3] = subMatch[2];
        parts[4] = subMatch[3];
      }
    }
    const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION2, parts[2]);
    return createFrame(platform3, filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);
  }
};

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
var geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
var geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
var geckoStackLineParser = (line2, platform3) => {
  const parts = geckoREgex.exec(line2);
  if (parts) {
    const isEval = parts[3] && parts[3].indexOf(" > eval") > -1;
    if (isEval) {
      const subMatch = geckoEvalRegex.exec(parts[3]);
      if (subMatch) {
        parts[1] = parts[1] || "eval";
        parts[3] = subMatch[1];
        parts[4] = subMatch[2];
        parts[5] = "";
      }
    }
    let filename = parts[3];
    let func = parts[1] || UNKNOWN_FUNCTION2;
    [func, filename] = extractSafariExtensionDetails(func, filename);
    return createFrame(platform3, filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);
  }
};

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
var winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
var winjsStackLineParser = (line2, platform3) => {
  const parts = winjsRegex.exec(line2);
  return parts ? createFrame(platform3, parts[2], parts[1] || UNKNOWN_FUNCTION2, +parts[3], parts[4] ? +parts[4] : undefined) : undefined;
};

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
var opera10StackLineParser = (line2, platform3) => {
  const parts = opera10Regex.exec(line2);
  return parts ? createFrame(platform3, parts[2], parts[3] || UNKNOWN_FUNCTION2, +parts[1]) : undefined;
};
var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
var opera11StackLineParser = (line2, platform3) => {
  const parts = opera11Regex.exec(line2);
  return parts ? createFrame(platform3, parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION2, +parts[1], +parts[2]) : undefined;
};

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
var FILENAME_MATCH = /^\s*[-]{4,}$/;
var FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
var nodeStackLineParser2 = (line2, platform3) => {
  const lineMatch = line2.match(FULL_MATCH);
  if (lineMatch) {
    let object2;
    let method;
    let functionName;
    let typeName;
    let methodName;
    if (lineMatch[1]) {
      functionName = lineMatch[1];
      let methodStart = functionName.lastIndexOf(".");
      if (functionName[methodStart - 1] === ".")
        methodStart--;
      if (methodStart > 0) {
        object2 = functionName.slice(0, methodStart);
        method = functionName.slice(methodStart + 1);
        const objectEnd = object2.indexOf(".Module");
        if (objectEnd > 0) {
          functionName = functionName.slice(objectEnd + 1);
          object2 = object2.slice(0, objectEnd);
        }
      }
      typeName = undefined;
    }
    if (method) {
      typeName = object2;
      methodName = method;
    }
    if (method === "<anonymous>") {
      methodName = undefined;
      functionName = undefined;
    }
    if (functionName === undefined) {
      methodName = methodName || UNKNOWN_FUNCTION2;
      functionName = typeName ? `${typeName}.${methodName}` : methodName;
    }
    let filename = lineMatch[2]?.startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2];
    const isNative = lineMatch[5] === "native";
    if (filename?.match(/\/[A-Z]:/))
      filename = filename.slice(1);
    if (!filename && lineMatch[5] && !isNative)
      filename = lineMatch[5];
    return {
      filename: filename ? decodeURI(filename) : undefined,
      module: undefined,
      function: functionName,
      lineno: _parseIntOrUndefined2(lineMatch[3]),
      colno: _parseIntOrUndefined2(lineMatch[4]),
      in_app: filenameIsInApp2(filename || "", isNative),
      platform: platform3
    };
  }
  if (line2.match(FILENAME_MATCH))
    return {
      filename: line2,
      platform: platform3
    };
};
function filenameIsInApp2(filename, isNative = false) {
  const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
  return !isInternal && filename !== undefined && !filename.includes("node_modules/");
}
function _parseIntOrUndefined2(input) {
  return parseInt(input || "", 10) || undefined;
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
var WEBPACK_ERROR_REGEXP2 = /\(error: (.*)\)/;
var STACKTRACE_FRAME_LIMIT2 = 50;
function reverseAndStripFrames(stack) {
  if (!stack.length)
    return [];
  const localStack = Array.from(stack);
  localStack.reverse();
  return localStack.slice(0, STACKTRACE_FRAME_LIMIT2).map((frame) => ({
    ...frame,
    filename: frame.filename || getLastStackFrame2(localStack).filename,
    function: frame.function || UNKNOWN_FUNCTION2
  }));
}
function getLastStackFrame2(arr) {
  return arr[arr.length - 1] || {};
}
function createDefaultStackParser() {
  return createStackParser2("web:javascript", chromeStackLineParser, geckoStackLineParser);
}
function createStackParser2(platform3, ...parsers) {
  return (stack, skipFirstLines = 0) => {
    const frames = [];
    const lines = stack.split(`
`);
    for (let i = skipFirstLines;i < lines.length; i++) {
      const line2 = lines[i];
      if (line2.length > 1024)
        continue;
      const cleanedLine = WEBPACK_ERROR_REGEXP2.test(line2) ? line2.replace(WEBPACK_ERROR_REGEXP2, "$1") : line2;
      if (!cleanedLine.match(/\S*Error: /)) {
        for (const parser2 of parsers) {
          const frame = parser2(cleanedLine, platform3);
          if (frame) {
            frames.push(frame);
            break;
          }
        }
        if (frames.length >= STACKTRACE_FRAME_LIMIT2)
          break;
      }
    }
    return reverseAndStripFrames(frames);
  };
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
class DOMExceptionCoercer {
  match(err) {
    return this.isDOMException(err) || this.isDOMError(err);
  }
  coerce(err, ctx) {
    const hasStack = isString2(err.stack);
    return {
      type: this.getType(err),
      value: this.getValue(err),
      stack: hasStack ? err.stack : undefined,
      cause: err.cause ? ctx.next(err.cause) : undefined,
      synthetic: false
    };
  }
  getType(candidate) {
    return this.isDOMError(candidate) ? "DOMError" : "DOMException";
  }
  getValue(err) {
    const name3 = err.name || (this.isDOMError(err) ? "DOMError" : "DOMException");
    const message2 = err.message ? `${name3}: ${err.message}` : name3;
    return message2;
  }
  isDOMException(err) {
    return isBuiltin2(err, "DOMException");
  }
  isDOMError(err) {
    return isBuiltin2(err, "DOMError");
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
class ErrorCoercer {
  match(err) {
    return isPlainError(err);
  }
  coerce(err, ctx) {
    return {
      type: this.getType(err),
      value: this.getMessage(err, ctx),
      stack: this.getStack(err),
      cause: err.cause ? ctx.next(err.cause) : undefined,
      synthetic: false
    };
  }
  getType(err) {
    return err.name || err.constructor.name;
  }
  getMessage(err, _ctx) {
    const message2 = err.message;
    if (message2.error && typeof message2.error.message == "string")
      return String(message2.error.message);
    return String(message2);
  }
  getStack(err) {
    return err.stacktrace || err.stack || undefined;
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
class ErrorEventCoercer {
  constructor() {}
  match(err) {
    return isErrorEvent3(err) && err.error != null;
  }
  coerce(err, ctx) {
    const exceptionLike = ctx.apply(err.error);
    if (!exceptionLike)
      return {
        type: "ErrorEvent",
        value: err.message,
        stack: ctx.syntheticException?.stack,
        synthetic: true
      };
    return exceptionLike;
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
var ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;

class StringCoercer {
  match(input) {
    return typeof input == "string";
  }
  coerce(input, ctx) {
    const [type2, value] = this.getInfos(input);
    return {
      type: type2 ?? "Error",
      value: value ?? input,
      stack: ctx.syntheticException?.stack,
      synthetic: true
    };
  }
  getInfos(candidate) {
    let type2 = "Error";
    let value = candidate;
    const groups = candidate.match(ERROR_TYPES_PATTERN);
    if (groups) {
      type2 = groups[1];
      value = groups[2];
    }
    return [
      type2,
      value
    ];
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/types.mjs
var severityLevels = [
  "fatal",
  "error",
  "warning",
  "log",
  "info",
  "debug"
];

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
function extractExceptionKeysForMessage2(err, maxLength = 40) {
  const keys = Object.keys(err);
  keys.sort();
  if (!keys.length)
    return "[object has no keys]";
  for (let i = keys.length;i > 0; i--) {
    const serialized = keys.slice(0, i).join(", ");
    if (!(serialized.length > maxLength)) {
      if (i === keys.length)
        return serialized;
      return serialized.length <= maxLength ? serialized : `${serialized.slice(0, maxLength)}...`;
    }
  }
  return "";
}

// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
class ObjectCoercer {
  match(candidate) {
    return typeof candidate == "object" && candidate !== null;
  }
  coerce(candidate, ctx) {
    const errorProperty = this.getErrorPropertyFromObject(candidate);
    if (errorProperty)
      return ctx.apply(errorProperty);
    return {
      type: this.getType(candidate),
      value: this.getValue(candidate),
      stack: ctx.syntheticException?.stack,
      level: this.isSeverityLevel(candidate.level) ? candidate.level : "error",
      synthetic: true
    };
  }
  getType(err) {
    return isEvent2(err) ? err.constructor.name : "Error";
  }
  getValue(err) {
    if ("name" in err && typeof err.name == "string") {
      let message2 = `'${err.name}' captured as exception`;
      if ("message" in err && typeof err.message == "string")
        message2 += ` with message: '${err.message}'`;
      return message2;
    }
    if ("message" in err && typeof err.message == "string")
      return err.message;
    const className = this.getObjectClassName(err);
    const keys = extractExceptionKeysForMessage2(err);
    return `${className && className !== "Object" ? `'${className}'` : "Object"} captured as exception with keys: ${keys}`;
  }
  isSeverityLevel(x4) {
    return isString2(x4) && !isEmptyString(x4) && severityLevels.indexOf(x4) >= 0;
  }
  getErrorPropertyFromObject(obj) {
    for (const prop in obj)
      if (Object.prototype.hasOwnProperty.call(obj, prop)) {
        const value = obj[prop];
        if (isError2(value))
          return value;
      }
  }
  getObjectClassName(obj) {
    try {
      const prototype = Object.getPrototypeOf(obj);
      return prototype ? prototype.constructor.name : undefined;
    } catch (e3) {
      return;
    }
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
class EventCoercer {
  match(err) {
    return isEvent2(err);
  }
  coerce(evt, ctx) {
    const constructorName = evt.constructor.name;
    return {
      type: constructorName,
      value: `${constructorName} captured as exception with keys: ${extractExceptionKeysForMessage2(evt)}`,
      stack: ctx.syntheticException?.stack,
      synthetic: true
    };
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
class PrimitiveCoercer {
  match(candidate) {
    return isPrimitive2(candidate);
  }
  coerce(value, ctx) {
    return {
      type: "Error",
      value: `Primitive value captured as exception: ${String(value)}`,
      stack: ctx.syntheticException?.stack,
      synthetic: true
    };
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
class PromiseRejectionEventCoercer {
  match(err) {
    return isBuiltin2(err, "PromiseRejectionEvent") || this.isCustomEventWrappingRejection(err);
  }
  isCustomEventWrappingRejection(err) {
    if (!isEvent2(err))
      return false;
    try {
      const detail = err.detail;
      return detail != null && typeof detail == "object" && "reason" in detail;
    } catch {
      return false;
    }
  }
  coerce(err, ctx) {
    const reason = this.getUnhandledRejectionReason(err);
    if (isPrimitive2(reason))
      return {
        type: "UnhandledRejection",
        value: `Non-Error promise rejection captured with value: ${String(reason)}`,
        stack: ctx.syntheticException?.stack,
        synthetic: true
      };
    return ctx.apply(reason);
  }
  getUnhandledRejectionReason(error49) {
    try {
      if ("reason" in error49)
        return error49.reason;
      if ("detail" in error49 && error49.detail != null && typeof error49.detail == "object" && "reason" in error49.detail)
        return error49.detail.reason;
    } catch {}
    return error49;
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/utils.mjs
class ReduceableCache {
  constructor(_maxSize2) {
    this._maxSize = _maxSize2;
    this._cache = new Map;
  }
  get(key) {
    const value = this._cache.get(key);
    if (value === undefined)
      return;
    this._cache.delete(key);
    this._cache.set(key, value);
    return value;
  }
  set(key, value) {
    this._cache.set(key, value);
  }
  reduce() {
    while (this._cache.size >= this._maxSize) {
      const value = this._cache.keys().next().value;
      if (value)
        this._cache.delete(value);
    }
  }
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs
var EXCEPTION_STEP_INTERNAL_FIELDS = {
  MESSAGE: "$message",
  TIMESTAMP: "$timestamp"
};
var RESERVED_EXCEPTION_STEP_KEYS = new Set([
  EXCEPTION_STEP_INTERNAL_FIELDS.MESSAGE,
  EXCEPTION_STEP_INTERNAL_FIELDS.TIMESTAMP
]);
var DEFAULT_EXCEPTION_STEPS_CONFIG = {
  enabled: true,
  max_bytes: 32768
};
function resolveExceptionStepsConfig(config2) {
  if (!config2)
    return {
      ...DEFAULT_EXCEPTION_STEPS_CONFIG
    };
  return {
    enabled: config2.enabled ?? DEFAULT_EXCEPTION_STEPS_CONFIG.enabled,
    max_bytes: normalizePositiveInteger(config2.max_bytes, DEFAULT_EXCEPTION_STEPS_CONFIG.max_bytes)
  };
}
function stripReservedExceptionStepFields(properties2) {
  if (!properties2)
    return {
      sanitizedProperties: {},
      droppedKeys: []
    };
  const droppedKeys = [];
  const sanitizedProperties = Object.keys(properties2).reduce((acc, key) => {
    if (RESERVED_EXCEPTION_STEP_KEYS.has(key)) {
      droppedKeys.push(key);
      return acc;
    }
    acc[key] = properties2[key];
    return acc;
  }, {});
  return {
    sanitizedProperties,
    droppedKeys
  };
}

class ExceptionStepsBuffer {
  constructor(config2) {
    this._entries = [];
    this._totalBytes = 0;
    this._config = resolveExceptionStepsConfig(config2);
  }
  setConfig(config2) {
    this._config = resolveExceptionStepsConfig(config2);
    this._trimToMaxBytes();
  }
  add(step) {
    const serialized = normalizeAndSerializeStep(step);
    if (!serialized)
      return;
    const bytes = getUtf8ByteLength(serialized.json);
    if (bytes > this._config.max_bytes)
      return;
    this._entries.push({
      step: serialized.step,
      bytes
    });
    this._totalBytes += bytes;
    this._trimToMaxBytes();
  }
  getAttachable() {
    return this._entries.map((e3) => e3.step);
  }
  clear() {
    this._entries = [];
    this._totalBytes = 0;
  }
  size() {
    return this._entries.length;
  }
  _trimToMaxBytes() {
    while (this._totalBytes > this._config.max_bytes && this._entries.length > 0) {
      const evicted = this._entries.shift();
      if (evicted)
        this._totalBytes -= evicted.bytes;
    }
  }
}
function normalizePositiveInteger(input, fallback) {
  if (!isNumber3(input) || input === 1 / 0 || input === -1 / 0)
    return fallback;
  const normalized = Math.floor(input);
  if (normalized < 0)
    return fallback;
  return normalized;
}
function normalizeAndSerializeStep(step) {
  const json3 = safeStringify(step);
  if (!json3)
    return;
  try {
    const parsed = JSON.parse(json3);
    if (!isObject3(parsed))
      return;
    const parsedStep = parsed;
    const message2 = parsedStep[EXCEPTION_STEP_INTERNAL_FIELDS.MESSAGE];
    const timestamp2 = parsedStep[EXCEPTION_STEP_INTERNAL_FIELDS.TIMESTAMP];
    if (!isString2(message2) || message2.trim().length === 0)
      return;
    if (!isString2(timestamp2) && !isNumber3(timestamp2))
      return;
    return {
      step: parsedStep,
      json: json3
    };
  } catch {
    return;
  }
}
function safeStringify(value) {
  const seen = new WeakSet;
  try {
    return JSON.stringify(value, (_key, replacementValue) => {
      if (typeof replacementValue == "bigint")
        return replacementValue.toString();
      if (typeof replacementValue == "function" || typeof replacementValue == "symbol")
        return;
      if (replacementValue instanceof Date)
        return replacementValue.toISOString();
      if (replacementValue instanceof Error)
        return {
          name: replacementValue.name,
          message: replacementValue.message,
          stack: replacementValue.stack
        };
      if (replacementValue && typeof replacementValue == "object") {
        if (seen.has(replacementValue))
          return "[Circular]";
        seen.add(replacementValue);
      }
      return replacementValue;
    });
  } catch {
    return;
  }
}
function getUtf8ByteLength(value) {
  if (typeof TextEncoder != "undefined")
    return new TextEncoder().encode(value).length;
  const encoded = encodeURIComponent(value);
  let byteLength = 0;
  for (let i = 0;i < encoded.length; i++)
    if (encoded[i] === "%") {
      byteLength += 1;
      i += 2;
    } else
      byteLength += 1;
  return byteLength;
}
// ../../node_modules/.pnpm/@posthog+core@1.35.4/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
class PostHogFetchHttpError extends Error {
  constructor(response, reqByteLength) {
    super("HTTP error while fetching PostHog: status=" + response.status + ", reqByteLength=" + reqByteLength), this.response = response, this.reqByteLength = reqByteLength, this.name = "PostHogFetchHttpError";
  }
  get status() {
    return this.response.status;
  }
  get text() {
    return this.response.text();
  }
  get json() {
    return this.response.json();
  }
}

class PostHogFetchNetworkError extends Error {
  constructor(error49) {
    super("Network error while fetching PostHog", error49 instanceof Error ? {
      cause: error49
    } : {}), this.error = error49, this.name = "PostHogFetchNetworkError";
  }
}
async function logFlushError(err) {
  if (err instanceof PostHogFetchHttpError) {
    let text3 = "";
    try {
      text3 = await err.text;
    } catch {}
    console.error(`Error while flushing PostHog: message=${err.message}, response body=${text3}`, err);
  } else
    console.error("Error while flushing PostHog", err);
  return Promise.resolve();
}
function isPostHogFetchError(err) {
  return typeof err == "object" && (err instanceof PostHogFetchHttpError || isPostHogFetchNetworkError(err));
}
function isPostHogFetchNetworkError(err) {
  return err instanceof PostHogFetchNetworkError;
}
function isPostHogFetchContentTooLargeError(err) {
  return typeof err == "object" && err instanceof PostHogFetchHttpError && err.status === 413;
}
function isPostHogEventProperties(value) {
  return value !== null && typeof value == "object" && !Array.isArray(value);
}
class PostHogCoreStateless {
  getErrorPropertiesBuilder() {
    if (!this._errorPropertiesBuilder)
      this._errorPropertiesBuilder = this.createErrorPropertiesBuilder();
    return this._errorPropertiesBuilder;
  }
  createErrorPropertiesBuilder() {
    return new ErrorPropertiesBuilder([
      new ErrorCoercer,
      new ObjectCoercer,
      new StringCoercer,
      new PrimitiveCoercer
    ], createDefaultStackParser());
  }
  constructor(apiKey2, options2 = {}) {
    this.flushPromise = null;
    this.shutdownPromise = null;
    this.promiseQueue = new PromiseQueue;
    this._events = new SimpleEventEmitter;
    this._isInitialized = false;
    const normalizedApiKey = typeof apiKey2 == "string" ? apiKey2.trim() : "";
    const normalizedHost = typeof options2.host == "string" ? options2.host.trim() : "";
    const missingApiKey = !normalizedApiKey;
    this._logger = createLogger("[PostHog]", this.logMsgIfDebug.bind(this));
    if (missingApiKey)
      this._logger.error("You must pass your PostHog project's api key. The client will be disabled.");
    this.apiKey = normalizedApiKey;
    this.host = removeTrailingSlash2(normalizedHost || "https://us.i.posthog.com");
    this.flushAt = options2.flushAt ? Math.max(options2.flushAt, 1) : 20;
    this.maxBatchSize = Math.max(this.flushAt, options2.maxBatchSize ?? 100);
    this.maxQueueSize = Math.max(this.flushAt, options2.maxQueueSize ?? 1000);
    this.flushInterval = options2.flushInterval ?? 1e4;
    this.preloadFeatureFlags = options2.preloadFeatureFlags ?? true;
    this.defaultOptIn = options2.defaultOptIn ?? true;
    this.disableSurveys = options2.disableSurveys ?? false;
    this._retryOptions = {
      retryCount: options2.fetchRetryCount ?? 3,
      retryDelay: options2.fetchRetryDelay ?? 3000,
      retryCheck: isPostHogFetchError
    };
    this.requestTimeout = options2.requestTimeout ?? 1e4;
    this.featureFlagsRequestTimeoutMs = options2.featureFlagsRequestTimeoutMs ?? 3000;
    this.remoteConfigRequestTimeoutMs = options2.remoteConfigRequestTimeoutMs ?? 3000;
    this.disableGeoip = options2.disableGeoip ?? true;
    this.disabled = (options2.disabled ?? false) || missingApiKey;
    this.historicalMigration = options2?.historicalMigration ?? false;
    this._initPromise = Promise.resolve();
    this._isInitialized = true;
    this.evaluationContexts = options2?.evaluationContexts ?? options2?.evaluationEnvironments;
    if (options2?.evaluationEnvironments && !options2?.evaluationContexts)
      this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version.");
    this.disableCompression = !isGzipSupported() || (options2?.disableCompression ?? false);
  }
  logMsgIfDebug(fn3) {
    if (this.isDebug)
      fn3();
  }
  wrap(fn3) {
    if (this.disabled)
      return void this._logger.warn("The client is disabled");
    if (this._isInitialized)
      return fn3();
    this._initPromise.then(() => fn3());
  }
  getCommonEventProperties() {
    return {
      $lib: this.getLibraryId(),
      $lib_version: this.getLibraryVersion()
    };
  }
  get optedOut() {
    return this.getPersistedProperty(types_PostHogPersistedProperty.OptedOut) ?? !this.defaultOptIn;
  }
  async optIn() {
    this.wrap(() => {
      this.setPersistedProperty(types_PostHogPersistedProperty.OptedOut, false);
    });
  }
  async optOut() {
    this.wrap(() => {
      this.setPersistedProperty(types_PostHogPersistedProperty.OptedOut, true);
    });
  }
  on(event, cb2) {
    return this._events.on(event, cb2);
  }
  debug(enabled = true) {
    this.removeDebugCallback?.();
    if (enabled) {
      const removeDebugCallback = this.on("*", (event, payload) => this._logger.info(event, payload));
      this.removeDebugCallback = () => {
        removeDebugCallback();
        this.removeDebugCallback = undefined;
      };
    }
  }
  get isDebug() {
    return !!this.removeDebugCallback;
  }
  get isDisabled() {
    return this.disabled;
  }
  buildPayload(payload) {
    return {
      distinct_id: payload.distinct_id,
      event: payload.event,
      properties: {
        ...payload.properties || {},
        ...this.getCommonEventProperties()
      }
    };
  }
  addPendingPromise(promise2) {
    return this.promiseQueue.add(promise2);
  }
  identifyStateless(distinctId, properties2, options2) {
    this.wrap(() => {
      const payload = {
        ...this.buildPayload({
          distinct_id: distinctId,
          event: "$identify",
          properties: properties2
        })
      };
      this.enqueue("identify", payload, options2);
    });
  }
  async identifyStatelessImmediate(distinctId, properties2, options2) {
    const payload = {
      ...this.buildPayload({
        distinct_id: distinctId,
        event: "$identify",
        properties: properties2
      })
    };
    await this.sendImmediate("identify", payload, options2);
  }
  captureStateless(distinctId, event, properties2, options2) {
    this.wrap(() => {
      const payload = this.buildPayload({
        distinct_id: distinctId,
        event,
        properties: properties2
      });
      this.enqueue("capture", payload, options2);
    });
  }
  async captureStatelessImmediate(distinctId, event, properties2, options2) {
    const payload = this.buildPayload({
      distinct_id: distinctId,
      event,
      properties: properties2
    });
    await this.sendImmediate("capture", payload, options2);
  }
  aliasStateless(alias, distinctId, properties2, options2) {
    this.wrap(() => {
      const payload = this.buildPayload({
        event: "$create_alias",
        distinct_id: distinctId,
        properties: {
          ...properties2 || {},
          distinct_id: distinctId,
          alias
        }
      });
      this.enqueue("alias", payload, options2);
    });
  }
  async aliasStatelessImmediate(alias, distinctId, properties2, options2) {
    const payload = this.buildPayload({
      event: "$create_alias",
      distinct_id: distinctId,
      properties: {
        ...properties2 || {},
        distinct_id: distinctId,
        alias
      }
    });
    await this.sendImmediate("alias", payload, options2);
  }
  groupIdentifyStateless(groupType, groupKey, groupProperties, options2, distinctId, eventProperties) {
    this.wrap(() => {
      const payload = this.buildPayload({
        distinct_id: distinctId || `$${groupType}_${groupKey}`,
        event: "$groupidentify",
        properties: {
          $group_type: groupType,
          $group_key: groupKey,
          $group_set: groupProperties || {},
          ...eventProperties || {}
        }
      });
      this.enqueue("capture", payload, options2);
    });
  }
  async getRemoteConfig() {
    await this._initPromise;
    let host = this.host;
    if (host === "https://us.i.posthog.com")
      host = "https://us-assets.i.posthog.com";
    else if (host === "https://eu.i.posthog.com")
      host = "https://eu-assets.i.posthog.com";
    const url2 = `${host}/array/${this.apiKey}/config`;
    const fetchOptions = {
      method: "GET",
      headers: {
        ...this.getCustomHeaders(),
        "Content-Type": "application/json"
      }
    };
    return this.fetchWithRetry(url2, fetchOptions, {
      retryCount: 0
    }, this.remoteConfigRequestTimeoutMs).then((response) => response.json()).catch((error49) => {
      this._logger.error("Remote config could not be loaded", error49);
      this._events.emit("error", error49);
    });
  }
  async getFlags(distinctId, groups = {}, personProperties = {}, groupProperties = {}, extraPayload = {}, fetchConfig = false) {
    await this._initPromise;
    const configParam = fetchConfig ? "&config=true" : "";
    const url2 = `${this.host}/flags/?v=2${configParam}`;
    const requestData = {
      token: this.apiKey,
      distinct_id: distinctId,
      groups,
      person_properties: personProperties,
      group_properties: groupProperties,
      ...extraPayload
    };
    if (personProperties.$device_id)
      requestData.$device_id = personProperties.$device_id;
    if (this.evaluationContexts && this.evaluationContexts.length > 0)
      requestData.evaluation_contexts = this.evaluationContexts;
    const fetchOptions = {
      method: "POST",
      headers: {
        ...this.getCustomHeaders(),
        "Content-Type": "application/json"
      },
      body: JSON.stringify(requestData)
    };
    this._logger.info("Flags URL", url2);
    return this.fetchWithRetry(url2, fetchOptions, {
      retryCount: 0
    }, this.featureFlagsRequestTimeoutMs).then((response) => response.json()).then((response) => ({
      success: true,
      response: normalizeFlagsResponse(response)
    })).catch((error49) => {
      this._events.emit("error", error49);
      return {
        success: false,
        error: this.categorizeRequestError(error49)
      };
    });
  }
  categorizeRequestError(error49) {
    if (error49 instanceof PostHogFetchHttpError)
      return {
        type: "api_error",
        statusCode: error49.status
      };
    if (error49 instanceof PostHogFetchNetworkError) {
      const cause = error49.error;
      if (cause instanceof Error && (cause.name === "AbortError" || cause.name === "TimeoutError"))
        return {
          type: "timeout"
        };
      return {
        type: "connection_error"
      };
    }
    return {
      type: "unknown_error"
    };
  }
  async getFeatureFlagStateless(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip) {
    await this._initPromise;
    const flagDetailResponse = await this.getFeatureFlagDetailStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
    if (flagDetailResponse === undefined)
      return {
        response: undefined,
        requestId: undefined
      };
    let response = getFeatureFlagValue(flagDetailResponse.response);
    if (response === undefined)
      response = false;
    return {
      response,
      requestId: flagDetailResponse.requestId
    };
  }
  async getFeatureFlagDetailStateless(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip) {
    await this._initPromise;
    const flagsResponse = await this.getFeatureFlagDetailsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, [
      key
    ]);
    if (flagsResponse === undefined)
      return;
    const featureFlags = flagsResponse.flags;
    const flagDetail = featureFlags[key];
    return {
      response: flagDetail,
      requestId: flagsResponse.requestId,
      evaluatedAt: flagsResponse.evaluatedAt
    };
  }
  async getFeatureFlagPayloadStateless(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip) {
    await this._initPromise;
    const payloads = await this.getFeatureFlagPayloadsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, [
      key
    ]);
    if (!payloads)
      return;
    const response = payloads[key];
    if (response === undefined)
      return null;
    return response;
  }
  async getFeatureFlagPayloadsStateless(distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip, flagKeysToEvaluate) {
    await this._initPromise;
    const payloads = (await this.getFeatureFlagsAndPayloadsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, flagKeysToEvaluate)).payloads;
    return payloads;
  }
  async getFeatureFlagsStateless(distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip, flagKeysToEvaluate) {
    await this._initPromise;
    return await this.getFeatureFlagsAndPayloadsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, flagKeysToEvaluate);
  }
  async getFeatureFlagsAndPayloadsStateless(distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip, flagKeysToEvaluate) {
    await this._initPromise;
    const featureFlagDetails = await this.getFeatureFlagDetailsStateless(distinctId, groups, personProperties, groupProperties, disableGeoip, flagKeysToEvaluate);
    if (!featureFlagDetails)
      return {
        flags: undefined,
        payloads: undefined,
        requestId: undefined
      };
    return {
      flags: featureFlagDetails.featureFlags,
      payloads: featureFlagDetails.featureFlagPayloads,
      requestId: featureFlagDetails.requestId
    };
  }
  async getFeatureFlagDetailsStateless(distinctId, groups = {}, personProperties = {}, groupProperties = {}, disableGeoip, flagKeysToEvaluate) {
    await this._initPromise;
    const extraPayload = {};
    if (disableGeoip ?? this.disableGeoip)
      extraPayload["geoip_disable"] = true;
    if (flagKeysToEvaluate)
      extraPayload["flag_keys_to_evaluate"] = flagKeysToEvaluate;
    const result = await this.getFlags(distinctId, groups, personProperties, groupProperties, extraPayload);
    if (!result.success)
      return;
    const flagsResponse = result.response;
    if (flagsResponse.errorsWhileComputingFlags)
      console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices");
    if (flagsResponse.quotaLimited?.includes("feature_flags")) {
      console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts");
      return {
        flags: {},
        featureFlags: {},
        featureFlagPayloads: {},
        requestId: flagsResponse?.requestId,
        quotaLimited: flagsResponse.quotaLimited
      };
    }
    return flagsResponse;
  }
  async getSurveysStateless() {
    await this._initPromise;
    if (this.disabled)
      return [];
    if (this.disableSurveys === true) {
      this._logger.info("Loading surveys is disabled.");
      return [];
    }
    const url2 = `${this.host}/api/surveys/?token=${this.apiKey}`;
    const fetchOptions = {
      method: "GET",
      headers: {
        ...this.getCustomHeaders(),
        "Content-Type": "application/json"
      }
    };
    const response = await this.fetchWithRetry(url2, fetchOptions).then((response2) => {
      if (response2.status !== 200 || !response2.json) {
        const msg = `Surveys API could not be loaded: ${response2.status}`;
        const error49 = new Error(msg);
        this._logger.error(error49);
        this._events.emit("error", new Error(msg));
        return;
      }
      return response2.json();
    }).catch((error49) => {
      this._logger.error("Surveys API could not be loaded", error49);
      this._events.emit("error", error49);
    });
    const newSurveys = response?.surveys;
    if (newSurveys)
      this._logger.info("Surveys fetched from API: ", JSON.stringify(newSurveys));
    return newSurveys ?? [];
  }
  get props() {
    if (!this._props)
      this._props = this.getPersistedProperty(types_PostHogPersistedProperty.Props);
    return this._props || {};
  }
  set props(val) {
    this._props = val;
  }
  async register(properties2) {
    this.wrap(() => {
      this.props = {
        ...this.props,
        ...properties2
      };
      this.setPersistedProperty(types_PostHogPersistedProperty.Props, this.props);
    });
  }
  async unregister(property2) {
    this.wrap(() => {
      delete this.props[property2];
      this.setPersistedProperty(types_PostHogPersistedProperty.Props, this.props);
    });
  }
  processBeforeEnqueue(message2) {
    return message2;
  }
  async flushStorage() {}
  enqueue(type2, _message, options2) {
    this.wrap(() => {
      if (this.optedOut)
        return void this._events.emit(type2, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
      let message2 = this.prepareMessage(_message, options2);
      message2 = this.processBeforeEnqueue(message2);
      if (message2 === null)
        return;
      message2 = this.normalizeMessage(message2);
      const queue = this.getPersistedProperty(types_PostHogPersistedProperty.Queue) || [];
      if (queue.length >= this.maxQueueSize) {
        queue.shift();
        this._logger.info("Queue is full, the oldest event is dropped.");
      }
      queue.push({
        message: message2
      });
      this.setPersistedProperty(types_PostHogPersistedProperty.Queue, queue);
      this._events.emit(type2, message2);
      if (queue.length >= this.flushAt)
        this.flushBackground();
      if (this.flushInterval && !this._flushTimer)
        this._flushTimer = safeSetTimeout(() => this.flushBackground(), this.flushInterval);
    });
  }
  async sendImmediate(type2, _message, options2) {
    if (this.disabled)
      return void this._logger.warn("The client is disabled");
    if (!this._isInitialized)
      await this._initPromise;
    if (this.optedOut)
      return void this._events.emit(type2, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
    let message2 = this.prepareMessage(_message, options2);
    message2 = this.processBeforeEnqueue(message2);
    if (message2 === null)
      return;
    message2 = this.normalizeMessage(message2);
    const data = {
      api_key: this.apiKey,
      batch: [
        message2
      ],
      sent_at: currentISOTime()
    };
    if (this.historicalMigration)
      data.historical_migration = true;
    const payload = JSON.stringify(data);
    const url2 = `${this.host}/batch/`;
    const gzippedPayload = this.disableCompression ? null : await gzipCompress(payload, this.isDebug);
    const fetchOptions = {
      method: "POST",
      headers: {
        ...this.getCustomHeaders(),
        "Content-Type": "application/json",
        ...gzippedPayload !== null && {
          "Content-Encoding": "gzip"
        }
      },
      body: gzippedPayload || payload
    };
    try {
      const response = await this.fetchWithRetry(url2, fetchOptions);
      await response.body?.cancel()?.catch(() => {});
    } catch (err) {
      this._events.emit("error", err);
    }
  }
  normalizeMessage(message2) {
    const { type: _type, library, library_version, ...sanitizedMessage } = message2;
    let properties2 = isPostHogEventProperties(sanitizedMessage.properties) ? sanitizedMessage.properties : undefined;
    if (library !== undefined && properties2?.$lib === undefined)
      properties2 = {
        ...properties2 || {},
        $lib: library
      };
    if (library_version !== undefined && properties2?.$lib_version === undefined)
      properties2 = {
        ...properties2 || {},
        $lib_version: library_version
      };
    if (properties2)
      sanitizedMessage.properties = properties2;
    sanitizedMessage.uuid = getEventUuid(sanitizedMessage.uuid, uuidv72);
    return sanitizedMessage;
  }
  prepareMessage(_message, options2) {
    const message2 = {
      ..._message,
      timestamp: options2?.timestamp ? options2?.timestamp : currentISOTime(),
      uuid: getEventUuid(options2?.uuid, uuidv72)
    };
    const addGeoipDisableProperty = options2?.disableGeoip ?? this.disableGeoip;
    if (addGeoipDisableProperty) {
      if (!isPostHogEventProperties(message2.properties))
        message2.properties = {};
      message2.properties["$geoip_disable"] = true;
    }
    if (message2.distinctId) {
      message2.distinct_id = message2.distinctId;
      delete message2.distinctId;
    }
    return message2;
  }
  clearFlushTimer() {
    if (this._flushTimer) {
      clearTimeout(this._flushTimer);
      this._flushTimer = undefined;
    }
  }
  flushBackground() {
    this.flush().catch(async (err) => {
      await logFlushError(err);
    });
  }
  async flush() {
    if (this.disabled)
      return;
    const nextFlushPromise = allSettled([
      this.flushPromise
    ]).then(() => this._flush());
    this.flushPromise = nextFlushPromise;
    this.addPendingPromise(nextFlushPromise);
    allSettled([
      nextFlushPromise
    ]).then(() => {
      if (this.flushPromise === nextFlushPromise)
        this.flushPromise = null;
    });
    return nextFlushPromise;
  }
  getCustomHeaders() {
    const customUserAgent = this.getCustomUserAgent();
    const headers = {};
    if (customUserAgent && customUserAgent !== "")
      headers["User-Agent"] = customUserAgent;
    return headers;
  }
  async _flush() {
    this.clearFlushTimer();
    await this._initPromise;
    let queue = this.getPersistedProperty(types_PostHogPersistedProperty.Queue) || [];
    if (!queue.length)
      return;
    const sentMessages = [];
    const originalQueueLength = queue.length;
    while (queue.length > 0 && sentMessages.length < originalQueueLength) {
      const batchItems = queue.slice(0, this.maxBatchSize);
      const batchMessages = batchItems.map((item) => item.message === undefined ? item.message : this.normalizeMessage(item.message));
      const persistQueueChange = async () => {
        const refreshedQueue = this.getPersistedProperty(types_PostHogPersistedProperty.Queue) || [];
        const newQueue = refreshedQueue.slice(batchItems.length);
        this.setPersistedProperty(types_PostHogPersistedProperty.Queue, newQueue);
        queue = newQueue;
        await this.flushStorage();
      };
      const data = {
        api_key: this.apiKey,
        batch: batchMessages,
        sent_at: currentISOTime()
      };
      if (this.historicalMigration)
        data.historical_migration = true;
      const payload = JSON.stringify(data);
      const url2 = `${this.host}/batch/`;
      const gzippedPayload = this.disableCompression ? null : await gzipCompress(payload, this.isDebug);
      const fetchOptions = {
        method: "POST",
        headers: {
          ...this.getCustomHeaders(),
          "Content-Type": "application/json",
          ...gzippedPayload !== null && {
            "Content-Encoding": "gzip"
          }
        },
        body: gzippedPayload || payload
      };
      const retryOptions = {
        retryCheck: (err) => {
          if (isPostHogFetchContentTooLargeError(err))
            return false;
          return isPostHogFetchError(err);
        }
      };
      try {
        const response = await this.fetchWithRetry(url2, fetchOptions, retryOptions);
        await response.body?.cancel()?.catch(() => {});
      } catch (err) {
        if (isPostHogFetchContentTooLargeError(err) && batchMessages.length > 1) {
          this.maxBatchSize = Math.max(1, Math.floor(batchMessages.length / 2));
          this._logger.warn(`Received 413 when sending batch of size ${batchMessages.length}, reducing batch size to ${this.maxBatchSize}`);
          continue;
        }
        if (!(err instanceof PostHogFetchNetworkError))
          await persistQueueChange();
        this._events.emit("error", err);
        throw err;
      }
      await persistQueueChange();
      sentMessages.push(...batchMessages);
    }
    this._events.emit("flush", sentMessages);
  }
  async _sendLogsBatch(payload) {
    if (this.disabled)
      return {
        kind: "fatal",
        error: new Error("The client is disabled")
      };
    const serialized = JSON.stringify(payload);
    const url2 = `${this.host}/i/v1/logs?token=${encodeURIComponent(this.apiKey)}`;
    const gzippedPayload = this.disableCompression ? null : await gzipCompress(serialized, this.isDebug);
    const fetchOptions = {
      method: "POST",
      headers: {
        ...this.getCustomHeaders(),
        "Content-Type": "application/json",
        ...gzippedPayload !== null && {
          "Content-Encoding": "gzip"
        }
      },
      body: gzippedPayload || serialized
    };
    try {
      await this.fetchWithRetry(url2, fetchOptions, {
        retryCheck: (err) => {
          if (isPostHogFetchContentTooLargeError(err))
            return false;
          return isPostHogFetchError(err);
        }
      });
      return {
        kind: "ok"
      };
    } catch (err) {
      if (isPostHogFetchContentTooLargeError(err))
        return {
          kind: "too-large"
        };
      if (err instanceof PostHogFetchNetworkError)
        return {
          kind: "retry-later",
          error: err
        };
      return {
        kind: "fatal",
        error: err
      };
    }
  }
  async fetchWithRetry(url2, options2, retryOptions, requestTimeout) {
    const body2 = options2.body ? options2.body : "";
    let reqByteLength = -1;
    try {
      reqByteLength = body2 instanceof Blob ? body2.size : Buffer.byteLength(body2, STRING_FORMAT);
    } catch {
      if (body2 instanceof Blob)
        reqByteLength = body2.size;
      else {
        const encoded = new TextEncoder().encode(body2);
        reqByteLength = encoded.length;
      }
    }
    return await retriable(async () => {
      const ctrl = new AbortController;
      const timeoutMs = requestTimeout ?? this.requestTimeout;
      const timer = safeSetTimeout(() => ctrl.abort(), timeoutMs);
      let res = null;
      try {
        res = await this.fetch(url2, {
          signal: ctrl.signal,
          ...options2
        });
      } catch (e3) {
        throw new PostHogFetchNetworkError(e3);
      } finally {
        clearTimeout(timer);
      }
      const isNoCors = options2.mode === "no-cors";
      if (!isNoCors && (res.status < 200 || res.status >= 400))
        throw new PostHogFetchHttpError(res, reqByteLength);
      return res;
    }, {
      ...this._retryOptions,
      ...retryOptions
    });
  }
  async _shutdown(shutdownTimeoutMs = 30000) {
    await this._initPromise;
    let hasTimedOut = false;
    this.clearFlushTimer();
    if (this.disabled)
      return;
    const doShutdown = async () => {
      try {
        await this.promiseQueue.join();
        while (true) {
          const queue = this.getPersistedProperty(types_PostHogPersistedProperty.Queue) || [];
          if (queue.length === 0)
            break;
          await this.flush();
          if (hasTimedOut)
            break;
        }
      } catch (e3) {
        if (!isPostHogFetchError(e3))
          throw e3;
        await logFlushError(e3);
      }
    };
    let timeoutHandle;
    try {
      return await Promise.race([
        new Promise((_6, reject) => {
          timeoutHandle = safeSetTimeout(() => {
            this._logger.error("Timed out while shutting down PostHog");
            hasTimedOut = true;
            reject("Timeout while shutting down PostHog. Some events may not have been sent.");
          }, shutdownTimeoutMs);
        }),
        doShutdown()
      ]);
    } finally {
      clearTimeout(timeoutHandle);
    }
  }
  async shutdown(shutdownTimeoutMs = 30000) {
    if (this.shutdownPromise)
      this._logger.warn("shutdown() called while already shutting down. shutdown() is meant to be called once before process exit - use flush() for per-request cleanup");
    else
      this.shutdownPromise = this._shutdown(shutdownTimeoutMs).finally(() => {
        this.shutdownPromise = null;
      });
    return this.shutdownPromise;
  }
}
// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs
import { createReadStream as createReadStream2 } from "node:fs";
import { createInterface as createInterface2 } from "node:readline";
var LRU_FILE_CONTENTS_CACHE2 = new exports_error_tracking.ReduceableCache(25);
var LRU_FILE_CONTENTS_FS_READ_FAILED2 = new exports_error_tracking.ReduceableCache(20);
var DEFAULT_LINES_OF_CONTEXT2 = 7;
var MAX_CONTEXTLINES_COLNO2 = 1000;
var MAX_CONTEXTLINES_LINENO2 = 1e4;
async function addSourceContext2(frames) {
  const filesToLines = {};
  for (let i = frames.length - 1;i >= 0; i--) {
    const frame = frames[i];
    const filename = frame?.filename;
    if (!frame || typeof filename != "string" || typeof frame.lineno != "number" || shouldSkipContextLinesForFile2(filename) || shouldSkipContextLinesForFrame2(frame))
      continue;
    const filesToLinesOutput = filesToLines[filename];
    if (!filesToLinesOutput)
      filesToLines[filename] = [];
    filesToLines[filename].push(frame.lineno);
  }
  const files = Object.keys(filesToLines);
  if (files.length == 0)
    return frames;
  const readlinePromises = [];
  for (const file2 of files) {
    if (LRU_FILE_CONTENTS_FS_READ_FAILED2.get(file2))
      continue;
    const filesToLineRanges = filesToLines[file2];
    if (!filesToLineRanges)
      continue;
    filesToLineRanges.sort((a2, b5) => a2 - b5);
    const ranges = makeLineReaderRanges2(filesToLineRanges);
    if (ranges.every((r2) => rangeExistsInContentCache2(file2, r2)))
      continue;
    const cache2 = emplace2(LRU_FILE_CONTENTS_CACHE2, file2, {});
    readlinePromises.push(getContextLinesFromFile2(file2, ranges, cache2));
  }
  await Promise.all(readlinePromises).catch(() => {});
  if (frames && frames.length > 0)
    addSourceContextToFrames2(frames, LRU_FILE_CONTENTS_CACHE2);
  LRU_FILE_CONTENTS_CACHE2.reduce();
  return frames;
}
function getContextLinesFromFile2(path2, ranges, output) {
  return new Promise((resolve3) => {
    const stream2 = createReadStream2(path2);
    const lineReaded = createInterface2({
      input: stream2
    });
    function destroyStreamAndResolve() {
      stream2.destroy();
      resolve3();
    }
    let lineNumber = 0;
    let currentRangeIndex = 0;
    const range = ranges[currentRangeIndex];
    if (range === undefined)
      return void destroyStreamAndResolve();
    let rangeStart = range[0];
    let rangeEnd = range[1];
    function onStreamError() {
      LRU_FILE_CONTENTS_FS_READ_FAILED2.set(path2, 1);
      lineReaded.close();
      lineReaded.removeAllListeners();
      destroyStreamAndResolve();
    }
    stream2.on("error", onStreamError);
    lineReaded.on("error", onStreamError);
    lineReaded.on("close", destroyStreamAndResolve);
    lineReaded.on("line", (line2) => {
      lineNumber++;
      if (lineNumber < rangeStart)
        return;
      output[lineNumber] = snipLine2(line2, 0);
      if (lineNumber >= rangeEnd) {
        if (currentRangeIndex === ranges.length - 1) {
          lineReaded.close();
          lineReaded.removeAllListeners();
          return;
        }
        currentRangeIndex++;
        const range2 = ranges[currentRangeIndex];
        if (range2 === undefined) {
          lineReaded.close();
          lineReaded.removeAllListeners();
          return;
        }
        rangeStart = range2[0];
        rangeEnd = range2[1];
      }
    });
  });
}
function addSourceContextToFrames2(frames, cache2) {
  for (const frame of frames)
    if (frame.filename && frame.context_line === undefined && typeof frame.lineno == "number") {
      const contents = cache2.get(frame.filename);
      if (contents === undefined)
        continue;
      addContextToFrame3(frame.lineno, frame, contents);
    }
}
function addContextToFrame3(lineno, frame, contents) {
  if (frame.lineno === undefined || contents === undefined)
    return;
  frame.pre_context = [];
  for (let i = makeRangeStart2(lineno);i < lineno; i++) {
    const line2 = contents[i];
    if (line2 === undefined)
      return void clearLineContext2(frame);
    frame.pre_context.push(line2);
  }
  if (contents[lineno] === undefined)
    return void clearLineContext2(frame);
  frame.context_line = contents[lineno];
  const end = makeRangeEnd2(lineno);
  frame.post_context = [];
  for (let i = lineno + 1;i <= end; i++) {
    const line2 = contents[i];
    if (line2 === undefined)
      break;
    frame.post_context.push(line2);
  }
}
function clearLineContext2(frame) {
  delete frame.pre_context;
  delete frame.context_line;
  delete frame.post_context;
}
function shouldSkipContextLinesForFile2(path2) {
  return path2.startsWith("node:") || path2.endsWith(".min.js") || path2.endsWith(".min.cjs") || path2.endsWith(".min.mjs") || path2.startsWith("data:");
}
function shouldSkipContextLinesForFrame2(frame) {
  if (frame.lineno !== undefined && frame.lineno > MAX_CONTEXTLINES_LINENO2)
    return true;
  if (frame.colno !== undefined && frame.colno > MAX_CONTEXTLINES_COLNO2)
    return true;
  return false;
}
function rangeExistsInContentCache2(file2, range) {
  const contents = LRU_FILE_CONTENTS_CACHE2.get(file2);
  if (contents === undefined)
    return false;
  for (let i = range[0];i <= range[1]; i++)
    if (contents[i] === undefined)
      return false;
  return true;
}
function makeLineReaderRanges2(lines) {
  if (!lines.length)
    return [];
  let i = 0;
  const line2 = lines[0];
  if (typeof line2 != "number")
    return [];
  let current = makeContextRange2(line2);
  const out = [];
  while (true) {
    if (i === lines.length - 1) {
      out.push(current);
      break;
    }
    const next = lines[i + 1];
    if (typeof next != "number")
      break;
    if (next <= current[1])
      current[1] = next + DEFAULT_LINES_OF_CONTEXT2;
    else {
      out.push(current);
      current = makeContextRange2(next);
    }
    i++;
  }
  return out;
}
function makeContextRange2(line2) {
  return [
    makeRangeStart2(line2),
    makeRangeEnd2(line2)
  ];
}
function makeRangeStart2(line2) {
  return Math.max(1, line2 - DEFAULT_LINES_OF_CONTEXT2);
}
function makeRangeEnd2(line2) {
  return line2 + DEFAULT_LINES_OF_CONTEXT2;
}
function emplace2(map3, key, contents) {
  const value = map3.get(key);
  if (value === undefined) {
    map3.set(key, contents);
    return contents;
  }
  return value;
}
function snipLine2(line2, colno) {
  let newLine = line2;
  const lineLength = newLine.length;
  if (lineLength <= 150)
    return newLine;
  if (colno > lineLength)
    colno = lineLength;
  let start = Math.max(colno - 60, 0);
  if (start < 5)
    start = 0;
  let end = Math.min(start + 140, lineLength);
  if (end > lineLength - 5)
    end = lineLength;
  if (end === lineLength)
    start = Math.max(end - 140, 0);
  newLine = newLine.slice(start, end);
  if (start > 0)
    newLine = `...${newLine}`;
  if (end < lineLength)
    newLine += "...";
  return newLine;
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs
import { isAbsolute as isAbsolute2, relative as relative2, sep as sep3 } from "path";
function createRelativePathModifier(basePath = process.cwd()) {
  const isWindows = sep3 === "\\";
  const toUnix = (p3) => isWindows ? p3.replace(/\\/g, "/") : p3;
  const normalizedBase = toUnix(basePath);
  return async (frames) => {
    for (const frame of frames)
      if (!(!frame.filename || frame.filename.startsWith("node:") || frame.filename.startsWith("data:"))) {
        if (isAbsolute2(frame.filename))
          frame.filename = toUnix(relative2(normalizedBase, toUnix(frame.filename)));
      }
    return frames;
  };
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/version.mjs
var version4 = "5.38.2";

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/types.mjs
var FeatureFlagError2 = {
  ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
  FLAG_MISSING: "flag_missing",
  QUOTA_LIMITED: "quota_limited",
  UNKNOWN_ERROR: "unknown_error"
};

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/feature-flag-evaluations.mjs
class FeatureFlagEvaluations {
  constructor(init4) {
    this._host = init4.host;
    this._distinctId = init4.distinctId;
    this._groups = init4.groups;
    this._disableGeoip = init4.disableGeoip;
    this._flags = init4.flags;
    this._requestId = init4.requestId;
    this._evaluatedAt = init4.evaluatedAt;
    this._flagDefinitionsLoadedAt = init4.flagDefinitionsLoadedAt;
    this._errorsWhileComputing = init4.errorsWhileComputing ?? false;
    this._quotaLimited = init4.quotaLimited ?? false;
    this._accessed = init4.accessed ?? new Set;
    this._isSlice = init4.isSlice ?? false;
  }
  isEnabled(key) {
    const flag = this._flags[key];
    this._recordAccess(key);
    return flag?.enabled ?? false;
  }
  getFlag(key) {
    const flag = this._flags[key];
    this._recordAccess(key);
    if (!flag)
      return;
    if (!flag.enabled)
      return false;
    return flag.variant ?? true;
  }
  getFlagPayload(key) {
    return this._flags[key]?.payload;
  }
  onlyAccessed() {
    const filtered = {};
    for (const key of this._accessed) {
      const flag = this._flags[key];
      if (flag)
        filtered[key] = flag;
    }
    return this._cloneWith(filtered);
  }
  only(keys) {
    const filtered = {};
    const missing = [];
    for (const key of keys) {
      const flag = this._flags[key];
      if (flag)
        filtered[key] = flag;
      else
        missing.push(key);
    }
    if (missing.length > 0)
      this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${missing.join(", ")}`);
    return this._cloneWith(filtered);
  }
  get keys() {
    return Object.keys(this._flags);
  }
  _getEventProperties() {
    const properties2 = {};
    const activeFlags = [];
    for (const [key, flag] of Object.entries(this._flags)) {
      const value = flag.enabled === false ? false : flag.variant ?? true;
      properties2[`$feature/${key}`] = value;
      if (flag.enabled)
        activeFlags.push(key);
    }
    if (activeFlags.length > 0) {
      activeFlags.sort();
      properties2["$active_feature_flags"] = activeFlags;
    }
    return properties2;
  }
  _cloneWith(flags) {
    return new FeatureFlagEvaluations({
      host: this._host,
      distinctId: this._distinctId,
      groups: this._groups,
      disableGeoip: this._disableGeoip,
      flags,
      requestId: this._requestId,
      evaluatedAt: this._evaluatedAt,
      flagDefinitionsLoadedAt: this._flagDefinitionsLoadedAt,
      errorsWhileComputing: this._errorsWhileComputing,
      quotaLimited: this._quotaLimited,
      accessed: new Set(this._accessed),
      isSlice: true
    });
  }
  _recordAccess(key) {
    this._accessed.add(key);
    if (this._distinctId === "")
      return;
    if (this._isSlice && !(key in this._flags))
      return;
    const flag = this._flags[key];
    const response = flag === undefined ? undefined : flag.enabled === false ? false : flag.variant ?? true;
    const properties2 = {
      $feature_flag: key,
      $feature_flag_response: response,
      $feature_flag_id: flag?.id,
      $feature_flag_version: flag?.version,
      $feature_flag_reason: flag?.reason,
      locally_evaluated: flag?.locallyEvaluated ?? false,
      [`$feature/${key}`]: response,
      $feature_flag_request_id: this._requestId,
      $feature_flag_evaluated_at: flag?.locallyEvaluated ? Date.now() : this._evaluatedAt
    };
    if (flag?.locallyEvaluated && this._flagDefinitionsLoadedAt !== undefined)
      properties2.$feature_flag_definitions_loaded_at = this._flagDefinitionsLoadedAt;
    const errors3 = [];
    if (this._errorsWhileComputing)
      errors3.push(FeatureFlagError2.ERRORS_WHILE_COMPUTING);
    if (this._quotaLimited)
      errors3.push(FeatureFlagError2.QUOTA_LIMITED);
    if (flag === undefined)
      errors3.push(FeatureFlagError2.FLAG_MISSING);
    if (errors3.length > 0)
      properties2.$feature_flag_error = errors3.join(",");
    this._host.captureFlagCalledEventIfNeeded({
      distinctId: this._distinctId,
      key,
      response,
      groups: this._groups,
      disableGeoip: this._disableGeoip,
      properties: properties2
    });
  }
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
async function hashSHA1(text3) {
  const subtle = globalThis.crypto?.subtle;
  if (!subtle)
    throw new Error("SubtleCrypto API not available");
  const hashBuffer = await subtle.digest("SHA-1", new TextEncoder().encode(text3));
  const hashArray = Array.from(new Uint8Array(hashBuffer));
  return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
var SIXTY_SECONDS = 60000;
var LONG_SCALE = 1152921504606847000;
var NULL_VALUES_ALLOWED_OPERATORS = [
  "is_not",
  "is_set"
];

class ClientError extends Error {
  constructor(message2) {
    super();
    Error.captureStackTrace(this, this.constructor);
    this.name = "ClientError";
    this.message = message2;
    Object.setPrototypeOf(this, ClientError.prototype);
  }
}
function setCustomErrorPrototype(error49, constructor) {
  error49.name = constructor.name;
  Error.captureStackTrace(error49, constructor);
  Object.setPrototypeOf(error49, constructor.prototype);
}

class InconclusiveMatchError extends Error {
  constructor(message2) {
    super(message2);
    setCustomErrorPrototype(this, InconclusiveMatchError);
  }
}

class RequiresServerEvaluation extends Error {
  constructor(message2) {
    super(message2);
    setCustomErrorPrototype(this, RequiresServerEvaluation);
  }
}

class FeatureFlagsPoller {
  constructor({ pollingInterval, personalApiKey, projectApiKey, timeout, host, customHeaders, ...options2 }) {
    this.debugMode = false;
    this.shouldBeginExponentialBackoff = false;
    this.backOffCount = 0;
    this.pollingInterval = pollingInterval;
    this.personalApiKey = personalApiKey;
    this.featureFlags = [];
    this.featureFlagsByKey = {};
    this.groupTypeMapping = {};
    this.cohorts = {};
    this.loadedSuccessfullyOnce = false;
    this.timeout = timeout;
    this.projectApiKey = projectApiKey;
    this.host = host;
    this.poller = undefined;
    this.fetch = options2.fetch || fetch;
    this.onError = options2.onError;
    this.customHeaders = customHeaders;
    this.onLoad = options2.onLoad;
    this.cacheProvider = options2.cacheProvider;
    this.strictLocalEvaluation = options2.strictLocalEvaluation ?? false;
    this.loadFeatureFlags();
  }
  debug(enabled = true) {
    this.debugMode = enabled;
  }
  logMsgIfDebug(fn3) {
    if (this.debugMode)
      fn3();
  }
  createEvaluationContext(distinctId, groups = {}, personProperties = {}, groupProperties = {}, evaluationCache = {}) {
    return {
      distinctId,
      groups,
      personProperties,
      groupProperties,
      evaluationCache
    };
  }
  async getFeatureFlag(key, distinctId, groups = {}, personProperties = {}, groupProperties = {}) {
    await this.loadFeatureFlags();
    let response;
    let featureFlag;
    if (!this.loadedSuccessfullyOnce)
      return response;
    featureFlag = this.featureFlagsByKey[key];
    if (featureFlag !== undefined) {
      const evaluationContext = this.createEvaluationContext(distinctId, groups, personProperties, groupProperties);
      try {
        const result = await this.computeFlagAndPayloadLocally(featureFlag, evaluationContext);
        response = result.value;
        this.logMsgIfDebug(() => console.debug(`Successfully computed flag locally: ${key} -> ${response}`));
      } catch (e3) {
        if (e3 instanceof RequiresServerEvaluation || e3 instanceof InconclusiveMatchError)
          this.logMsgIfDebug(() => console.debug(`${e3.name} when computing flag locally: ${key}: ${e3.message}`));
        else if (e3 instanceof Error)
          this.onError?.(new Error(`Error computing flag locally: ${key}: ${e3}`));
      }
    }
    return response;
  }
  async getAllFlagsAndPayloads(evaluationContext, flagKeysToExplicitlyEvaluate) {
    await this.loadFeatureFlags();
    const response = {};
    const payloads = {};
    let fallbackToFlags = this.featureFlags.length == 0;
    const flagsToEvaluate = flagKeysToExplicitlyEvaluate ? flagKeysToExplicitlyEvaluate.map((key) => this.featureFlagsByKey[key]).filter(Boolean) : this.featureFlags;
    const sharedEvaluationContext = {
      ...evaluationContext,
      evaluationCache: evaluationContext.evaluationCache ?? {}
    };
    await Promise.all(flagsToEvaluate.map(async (flag) => {
      try {
        const { value: matchValue, payload: matchPayload } = await this.computeFlagAndPayloadLocally(flag, sharedEvaluationContext);
        response[flag.key] = matchValue;
        if (matchPayload)
          payloads[flag.key] = matchPayload;
      } catch (e3) {
        if (e3 instanceof RequiresServerEvaluation || e3 instanceof InconclusiveMatchError)
          this.logMsgIfDebug(() => console.debug(`${e3.name} when computing flag locally: ${flag.key}: ${e3.message}`));
        else if (e3 instanceof Error)
          this.onError?.(new Error(`Error computing flag locally: ${flag.key}: ${e3}`));
        fallbackToFlags = true;
      }
    }));
    return {
      response,
      payloads,
      fallbackToFlags
    };
  }
  async computeFlagAndPayloadLocally(flag, evaluationContext, options2 = {}) {
    const { matchValue, skipLoadCheck = false } = options2;
    if (!skipLoadCheck)
      await this.loadFeatureFlags();
    if (!this.loadedSuccessfullyOnce)
      return {
        value: false,
        payload: null
      };
    let flagValue;
    flagValue = matchValue !== undefined ? matchValue : await this.computeFlagValueLocally(flag, evaluationContext);
    const payload = this.getFeatureFlagPayload(flag.key, flagValue);
    return {
      value: flagValue,
      payload
    };
  }
  async computeFlagValueLocally(flag, evaluationContext) {
    const { distinctId, groups, personProperties, groupProperties } = evaluationContext;
    if (!flag.active)
      return false;
    if (flag.ensure_experience_continuity)
      throw new InconclusiveMatchError("Flag has experience continuity enabled");
    const flagFilters = flag.filters || {};
    const aggregation_group_type_index = flagFilters.aggregation_group_type_index;
    if (aggregation_group_type_index != null) {
      const groupName = this.groupTypeMapping[String(aggregation_group_type_index)];
      if (!groupName) {
        this.logMsgIfDebug(() => console.warn(`[FEATURE FLAGS] Unknown group type index ${aggregation_group_type_index} for feature flag ${flag.key}`));
        throw new InconclusiveMatchError("Flag has unknown group type index");
      }
      if (!(groupName in groups)) {
        this.logMsgIfDebug(() => console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${flag.key} without group names passed in`));
        return false;
      }
      if (flag.bucketing_identifier === "device_id" && (personProperties?.$device_id === undefined || personProperties?.$device_id === null || personProperties?.$device_id === ""))
        this.logMsgIfDebug(() => console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${flag.key}`));
      const focusedGroupProperties = groupProperties[groupName];
      return await this.matchFeatureFlagProperties(flag, groups[groupName], focusedGroupProperties, evaluationContext);
    }
    {
      const bucketingValue = this.getBucketingValueForFlag(flag, distinctId, personProperties);
      if (bucketingValue === undefined) {
        this.logMsgIfDebug(() => console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${flag.key} without $device_id, falling back to server evaluation`));
        throw new InconclusiveMatchError(`Can't compute feature flag: ${flag.key} without $device_id`);
      }
      return await this.matchFeatureFlagProperties(flag, bucketingValue, personProperties, evaluationContext);
    }
  }
  getBucketingValueForFlag(flag, distinctId, properties2) {
    if (flag.filters?.aggregation_group_type_index != null)
      return distinctId;
    if (flag.bucketing_identifier === "device_id") {
      const deviceId = properties2?.$device_id;
      if (deviceId == null || deviceId === "")
        return;
      return deviceId;
    }
    return distinctId;
  }
  getFeatureFlagPayload(key, flagValue) {
    let payload = null;
    if (flagValue !== false && flagValue != null) {
      if (typeof flagValue == "boolean")
        payload = this.featureFlagsByKey?.[key]?.filters?.payloads?.[flagValue.toString()] || null;
      else if (typeof flagValue == "string")
        payload = this.featureFlagsByKey?.[key]?.filters?.payloads?.[flagValue] || null;
      if (payload != null) {
        if (typeof payload == "object")
          return payload;
        if (typeof payload == "string")
          try {
            return JSON.parse(payload);
          } catch {}
        return payload;
      }
    }
    return null;
  }
  async evaluateFlagDependency(property2, properties2, evaluationContext) {
    const { evaluationCache } = evaluationContext;
    const targetFlagKey = property2.key;
    if (!this.featureFlagsByKey)
      throw new InconclusiveMatchError("Feature flags not available for dependency evaluation");
    if (!("dependency_chain" in property2))
      throw new InconclusiveMatchError(`Flag dependency property for '${targetFlagKey}' is missing required 'dependency_chain' field`);
    const dependencyChain = property2.dependency_chain;
    if (!Array.isArray(dependencyChain))
      throw new InconclusiveMatchError(`Flag dependency property for '${targetFlagKey}' has an invalid 'dependency_chain' (expected array, got ${typeof dependencyChain})`);
    if (dependencyChain.length === 0)
      throw new InconclusiveMatchError(`Circular dependency detected for flag '${targetFlagKey}' (empty dependency chain)`);
    for (const depFlagKey of dependencyChain) {
      if (!(depFlagKey in evaluationCache)) {
        const depFlag = this.featureFlagsByKey[depFlagKey];
        if (depFlag)
          if (depFlag.active)
            try {
              const depResult = await this.computeFlagValueLocally(depFlag, evaluationContext);
              evaluationCache[depFlagKey] = depResult;
            } catch (error49) {
              throw new InconclusiveMatchError(`Error evaluating flag dependency '${depFlagKey}' for flag '${targetFlagKey}': ${error49}`);
            }
          else
            evaluationCache[depFlagKey] = false;
        else
          throw new InconclusiveMatchError(`Missing flag dependency '${depFlagKey}' for flag '${targetFlagKey}'`);
      }
      const cachedResult = evaluationCache[depFlagKey];
      if (cachedResult == null)
        throw new InconclusiveMatchError(`Dependency '${depFlagKey}' could not be evaluated`);
    }
    const targetFlagValue = evaluationCache[targetFlagKey];
    return this.flagEvaluatesToExpectedValue(property2.value, targetFlagValue);
  }
  flagEvaluatesToExpectedValue(expectedValue, flagValue) {
    if (typeof expectedValue == "boolean")
      return expectedValue === flagValue || typeof flagValue == "string" && flagValue !== "" && expectedValue === true;
    if (typeof expectedValue == "string")
      return flagValue === expectedValue;
    return false;
  }
  async matchFeatureFlagProperties(flag, bucketingValue, properties2, evaluationContext) {
    const flagFilters = flag.filters || {};
    const flagConditions = flagFilters.groups || [];
    const flagAggregation = flagFilters.aggregation_group_type_index;
    const earlyExitEnabled = flagFilters.early_exit ?? false;
    const { groups, groupProperties } = evaluationContext;
    let isInconclusive = false;
    let result;
    for (const condition of flagConditions)
      try {
        const conditionAggregation = condition.aggregation_group_type_index !== undefined ? condition.aggregation_group_type_index : flagAggregation;
        let effectiveProperties = properties2;
        let effectiveBucketingValue = bucketingValue;
        if (conditionAggregation !== flagAggregation) {
          if (conditionAggregation != null) {
            const groupName = this.groupTypeMapping[String(conditionAggregation)];
            if (!groupName || !(groupName in groups)) {
              this.logMsgIfDebug(() => console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${flag.key}': group type index ${conditionAggregation} not available`));
              continue;
            }
            if (!(groupName in groupProperties)) {
              isInconclusive = true;
              continue;
            }
            effectiveProperties = groupProperties[groupName];
            effectiveBucketingValue = groups[groupName];
          }
        }
        const matchResult = await this.isConditionMatch(flag, effectiveBucketingValue, condition, effectiveProperties, evaluationContext);
        if (matchResult === "match") {
          const variantOverride = condition.variant;
          const flagVariants = flagFilters.multivariate?.variants || [];
          result = variantOverride && flagVariants.some((variant) => variant.key === variantOverride) ? variantOverride : await this.getMatchingVariant(flag, effectiveBucketingValue) || true;
          break;
        }
        if (earlyExitEnabled && matchResult === "out_of_rollout_bound")
          return false;
      } catch (e3) {
        if (e3 instanceof RequiresServerEvaluation)
          throw e3;
        if (e3 instanceof InconclusiveMatchError)
          isInconclusive = true;
        else
          throw e3;
      }
    if (result !== undefined)
      return result;
    if (isInconclusive)
      throw new InconclusiveMatchError("Can't determine if feature flag is enabled or not with given properties");
    return false;
  }
  async isConditionMatch(flag, bucketingValue, condition, properties2, evaluationContext) {
    const rolloutPercentage = condition.rollout_percentage;
    const warnFunction = (msg) => {
      this.logMsgIfDebug(() => console.warn(msg));
    };
    if ((condition.properties || []).length > 0) {
      for (const prop of condition.properties) {
        const propertyType = prop.type;
        let matches = false;
        matches = propertyType === "cohort" ? await matchCohort(prop, properties2, this.cohorts, this.debugMode, (depProp) => this.evaluateFlagDependency(depProp, properties2, evaluationContext)) : propertyType === "flag" ? await this.evaluateFlagDependency(prop, properties2, evaluationContext) : matchProperty(prop, properties2, warnFunction);
        if (!matches)
          return "no_match";
      }
      if (rolloutPercentage == undefined)
        return "match";
    }
    if (rolloutPercentage != null && await _hash(flag.key, bucketingValue) > rolloutPercentage / 100)
      return "out_of_rollout_bound";
    return "match";
  }
  async getMatchingVariant(flag, bucketingValue) {
    const hashValue = await _hash(flag.key, bucketingValue, "variant");
    const matchingVariant = this.variantLookupTable(flag).find((variant) => hashValue >= variant.valueMin && hashValue < variant.valueMax);
    if (matchingVariant)
      return matchingVariant.key;
  }
  variantLookupTable(flag) {
    const lookupTable = [];
    let valueMin = 0;
    let valueMax = 0;
    const flagFilters = flag.filters || {};
    const multivariates = flagFilters.multivariate?.variants || [];
    multivariates.forEach((variant) => {
      valueMax = valueMin + variant.rollout_percentage / 100;
      lookupTable.push({
        valueMin,
        valueMax,
        key: variant.key
      });
      valueMin = valueMax;
    });
    return lookupTable;
  }
  updateFlagState(flagData) {
    this.featureFlags = flagData.flags;
    this.featureFlagsByKey = flagData.flags.reduce((acc, curr) => (acc[curr.key] = curr, acc), {});
    this.groupTypeMapping = flagData.groupTypeMapping;
    this.cohorts = flagData.cohorts;
    this.loadedSuccessfullyOnce = true;
  }
  warnAboutExperienceContinuityFlags(flags) {
    if (this.strictLocalEvaluation)
      return;
    const experienceContinuityFlags = flags.filter((f4) => f4.ensure_experience_continuity);
    if (experienceContinuityFlags.length > 0)
      console.warn(`[PostHog] You are using local evaluation but ${experienceContinuityFlags.length} flag(s) have experience continuity enabled: ${experienceContinuityFlags.map((f4) => f4.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`);
  }
  async loadFromCache(debugMessage) {
    if (!this.cacheProvider)
      return false;
    try {
      const cached2 = await this.cacheProvider.getFlagDefinitions();
      if (cached2) {
        this.updateFlagState(cached2);
        this.logMsgIfDebug(() => console.debug(`[FEATURE FLAGS] ${debugMessage} (${cached2.flags.length} flags)`));
        this.onLoad?.(this.featureFlags.length);
        this.warnAboutExperienceContinuityFlags(cached2.flags);
        return true;
      }
      return false;
    } catch (err) {
      this.onError?.(new Error(`Failed to load from cache: ${err}`));
      return false;
    }
  }
  async loadFeatureFlags(forceReload = false) {
    if (this.loadedSuccessfullyOnce && !forceReload)
      return;
    if (!forceReload && this.nextFetchAllowedAt && Date.now() < this.nextFetchAllowedAt)
      return void this.logMsgIfDebug(() => console.debug("[FEATURE FLAGS] Skipping fetch, in backoff period"));
    if (!this.loadingPromise)
      this.loadingPromise = this._loadFeatureFlags().catch((err) => this.logMsgIfDebug(() => console.debug(`[FEATURE FLAGS] Failed to load feature flags: ${err}`))).finally(() => {
        this.loadingPromise = undefined;
      });
    return this.loadingPromise;
  }
  isLocalEvaluationReady() {
    return (this.loadedSuccessfullyOnce ?? false) && (this.featureFlags?.length ?? 0) > 0;
  }
  getFlagDefinitionsLoadedAt() {
    return this.flagDefinitionsLoadedAt;
  }
  getPollingInterval() {
    if (!this.shouldBeginExponentialBackoff)
      return this.pollingInterval;
    return Math.min(SIXTY_SECONDS, this.pollingInterval * 2 ** this.backOffCount);
  }
  beginBackoff() {
    this.shouldBeginExponentialBackoff = true;
    this.backOffCount += 1;
    this.nextFetchAllowedAt = Date.now() + this.getPollingInterval();
  }
  clearBackoff() {
    this.shouldBeginExponentialBackoff = false;
    this.backOffCount = 0;
    this.nextFetchAllowedAt = undefined;
  }
  async _loadFeatureFlags() {
    if (this.poller) {
      clearTimeout(this.poller);
      this.poller = undefined;
    }
    this.poller = setTimeout(() => this.loadFeatureFlags(true), this.getPollingInterval());
    try {
      let shouldFetch = true;
      if (this.cacheProvider)
        try {
          shouldFetch = await this.cacheProvider.shouldFetchFlagDefinitions();
        } catch (err) {
          this.onError?.(new Error(`Error in shouldFetchFlagDefinitions: ${err}`));
        }
      if (!shouldFetch) {
        const loaded = await this.loadFromCache("Loaded flags from cache (skipped fetch)");
        if (loaded)
          return;
        if (this.loadedSuccessfullyOnce)
          return;
      }
      const res = await this._requestFeatureFlagDefinitions();
      if (!res)
        return;
      switch (res.status) {
        case 304:
          this.logMsgIfDebug(() => console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data"));
          this.flagsEtag = res.headers?.get("ETag") ?? this.flagsEtag;
          this.loadedSuccessfullyOnce = true;
          this.clearBackoff();
          return;
        case 401:
          this.beginBackoff();
          throw new ClientError(`Your project key or personal API key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);
        case 402:
          console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts");
          this.featureFlags = [];
          this.featureFlagsByKey = {};
          this.groupTypeMapping = {};
          this.cohorts = {};
          return;
        case 403:
          this.beginBackoff();
          throw new ClientError(`Your personal API key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct personal and Project API key pair? More information: https://posthog.com/docs/api/overview`);
        case 429:
          this.beginBackoff();
          throw new ClientError(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);
        case 200: {
          const responseJson = await res.json() ?? {};
          if (!("flags" in responseJson))
            return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(responseJson)}`));
          this.flagsEtag = res.headers?.get("ETag") ?? undefined;
          const flagData = {
            flags: responseJson.flags ?? [],
            groupTypeMapping: responseJson.group_type_mapping || {},
            cohorts: responseJson.cohorts || {}
          };
          this.updateFlagState(flagData);
          this.flagDefinitionsLoadedAt = Date.now();
          this.clearBackoff();
          if (this.cacheProvider && shouldFetch)
            try {
              await this.cacheProvider.onFlagDefinitionsReceived(flagData);
            } catch (err) {
              this.onError?.(new Error(`Failed to store in cache: ${err}`));
            }
          this.onLoad?.(this.featureFlags.length);
          this.warnAboutExperienceContinuityFlags(flagData.flags);
          break;
        }
        default:
          return;
      }
    } catch (err) {
      if (err instanceof ClientError)
        this.onError?.(err);
    }
  }
  getPersonalApiKeyRequestOptions(method = "GET", etag) {
    const headers = {
      ...this.customHeaders,
      "Content-Type": "application/json",
      Authorization: `Bearer ${this.personalApiKey}`
    };
    if (etag)
      headers["If-None-Match"] = etag;
    return {
      method,
      headers
    };
  }
  _requestFeatureFlagDefinitions() {
    const url2 = `${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`;
    const options2 = this.getPersonalApiKeyRequestOptions("GET", this.flagsEtag);
    let abortTimeout = null;
    if (this.timeout && typeof this.timeout == "number") {
      const controller = new AbortController;
      abortTimeout = safeSetTimeout(() => {
        controller.abort();
      }, this.timeout);
      options2.signal = controller.signal;
    }
    try {
      const fetch1 = this.fetch;
      return fetch1(url2, options2);
    } finally {
      clearTimeout(abortTimeout);
    }
  }
  async stopPoller(timeoutMs = 30000) {
    clearTimeout(this.poller);
    if (this.cacheProvider)
      try {
        const shutdownResult = this.cacheProvider.shutdown();
        if (shutdownResult instanceof Promise)
          await Promise.race([
            shutdownResult,
            new Promise((_6, reject) => setTimeout(() => reject(new Error(`Cache shutdown timeout after ${timeoutMs}ms`)), timeoutMs))
          ]);
      } catch (err) {
        this.onError?.(new Error(`Error during cache shutdown: ${err}`));
      }
  }
}
async function _hash(key, bucketingValue, salt = "") {
  const hashString = await hashSHA1(`${key}.${bucketingValue}${salt}`);
  return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
}
function matchProperty(property2, propertyValues, warnFunction) {
  const key = property2.key;
  const value = property2.value;
  const operator = property2.operator || "exact";
  if (key in propertyValues) {
    if (operator === "is_not_set")
      return false;
  } else {
    if (operator === "is_not_set")
      return true;
    throw new InconclusiveMatchError(`Property ${key} not found in propertyValues`);
  }
  const overrideValue = propertyValues[key];
  if (overrideValue == null && !NULL_VALUES_ALLOWED_OPERATORS.includes(operator)) {
    if (warnFunction)
      warnFunction(`Property ${key} cannot have a value of null/undefined with the ${operator} operator`);
    return false;
  }
  function computeExactMatch(value2, overrideValue2) {
    if (Array.isArray(value2))
      return value2.map((val) => String(val).toLowerCase()).includes(String(overrideValue2).toLowerCase());
    return String(value2).toLowerCase() === String(overrideValue2).toLowerCase();
  }
  function compare(lhs, rhs, operator2) {
    if (operator2 === "gt")
      return lhs > rhs;
    if (operator2 === "gte")
      return lhs >= rhs;
    if (operator2 === "lt")
      return lhs < rhs;
    if (operator2 === "lte")
      return lhs <= rhs;
    throw new Error(`Invalid operator: ${operator2}`);
  }
  switch (operator) {
    case "exact":
      return computeExactMatch(value, overrideValue);
    case "is_not":
      return !computeExactMatch(value, overrideValue);
    case "is_set":
      return key in propertyValues;
    case "icontains":
      return String(overrideValue).toLowerCase().includes(String(value).toLowerCase());
    case "not_icontains":
      return !String(overrideValue).toLowerCase().includes(String(value).toLowerCase());
    case "regex":
      return isValidRegex(String(value)) && String(overrideValue).match(String(value)) !== null;
    case "not_regex":
      return isValidRegex(String(value)) && String(overrideValue).match(String(value)) === null;
    case "gt":
    case "gte":
    case "lt":
    case "lte": {
      const parsedValue = typeof value == "number" ? value : parseFloat(String(value));
      let parsedOverride;
      parsedOverride = typeof overrideValue == "number" ? overrideValue : overrideValue != null ? parseFloat(String(overrideValue)) : NaN;
      if (Number.isFinite(parsedValue) && Number.isFinite(parsedOverride))
        return compare(parsedOverride, parsedValue, operator);
      return compare(String(overrideValue), String(value), operator);
    }
    case "is_date_after":
    case "is_date_before": {
      if (typeof value == "boolean")
        throw new InconclusiveMatchError("Date operations cannot be performed on boolean values");
      let parsedDate = relativeDateParseForFeatureFlagMatching(String(value));
      if (parsedDate == null)
        parsedDate = convertToDateTime(value);
      if (parsedDate == null)
        throw new InconclusiveMatchError(`Invalid date: ${value}`);
      const overrideDate = convertToDateTime(overrideValue);
      if ([
        "is_date_before"
      ].includes(operator))
        return overrideDate < parsedDate;
      return overrideDate > parsedDate;
    }
    case "semver_eq": {
      const cmp = compareSemverTuples(parseSemver2(String(overrideValue)), parseSemver2(String(value)));
      return cmp === 0;
    }
    case "semver_neq": {
      const cmp = compareSemverTuples(parseSemver2(String(overrideValue)), parseSemver2(String(value)));
      return cmp !== 0;
    }
    case "semver_gt": {
      const cmp = compareSemverTuples(parseSemver2(String(overrideValue)), parseSemver2(String(value)));
      return cmp > 0;
    }
    case "semver_gte": {
      const cmp = compareSemverTuples(parseSemver2(String(overrideValue)), parseSemver2(String(value)));
      return cmp >= 0;
    }
    case "semver_lt": {
      const cmp = compareSemverTuples(parseSemver2(String(overrideValue)), parseSemver2(String(value)));
      return cmp < 0;
    }
    case "semver_lte": {
      const cmp = compareSemverTuples(parseSemver2(String(overrideValue)), parseSemver2(String(value)));
      return cmp <= 0;
    }
    case "semver_tilde": {
      const overrideParsed = parseSemver2(String(overrideValue));
      const { lower, upper } = computeTildeBounds(String(value));
      return compareSemverTuples(overrideParsed, lower) >= 0 && compareSemverTuples(overrideParsed, upper) < 0;
    }
    case "semver_caret": {
      const overrideParsed = parseSemver2(String(overrideValue));
      const { lower, upper } = computeCaretBounds(String(value));
      return compareSemverTuples(overrideParsed, lower) >= 0 && compareSemverTuples(overrideParsed, upper) < 0;
    }
    case "semver_wildcard": {
      const overrideParsed = parseSemver2(String(overrideValue));
      const { lower, upper } = computeWildcardBounds(String(value));
      return compareSemverTuples(overrideParsed, lower) >= 0 && compareSemverTuples(overrideParsed, upper) < 0;
    }
    default:
      throw new InconclusiveMatchError(`Unknown operator: ${operator}`);
  }
}
function checkCohortExists(cohortId, cohortProperties) {
  if (!(cohortId in cohortProperties))
    throw new RequiresServerEvaluation(`cohort ${cohortId} not found in local cohorts - likely a static cohort that requires server evaluation`);
}
async function matchCohort(property2, propertyValues, cohortProperties, debugMode = false, flagDependencyEvaluator) {
  const cohortId = String(property2.value);
  checkCohortExists(cohortId, cohortProperties);
  const propertyGroup = cohortProperties[cohortId];
  return matchPropertyGroup(propertyGroup, propertyValues, cohortProperties, debugMode, flagDependencyEvaluator);
}
async function matchPropertyGroup(propertyGroup, propertyValues, cohortProperties, debugMode = false, flagDependencyEvaluator) {
  if (!propertyGroup)
    return true;
  const propertyGroupType = propertyGroup.type;
  const properties2 = propertyGroup.values;
  if (!properties2 || properties2.length === 0)
    return true;
  let errorMatchingLocally = false;
  if ("values" in properties2[0]) {
    for (const prop of properties2)
      try {
        const matches = await matchPropertyGroup(prop, propertyValues, cohortProperties, debugMode, flagDependencyEvaluator);
        if (propertyGroupType === "AND") {
          if (!matches)
            return false;
        } else if (matches)
          return true;
      } catch (err) {
        if (err instanceof RequiresServerEvaluation)
          throw err;
        if (err instanceof InconclusiveMatchError) {
          if (debugMode)
            console.debug(`Failed to compute property ${prop} locally: ${err}`);
          errorMatchingLocally = true;
        } else
          throw err;
      }
    if (errorMatchingLocally)
      throw new InconclusiveMatchError("Can't match cohort without a given cohort property value");
    return propertyGroupType === "AND";
  }
  for (const prop of properties2)
    try {
      let matches;
      if (prop.type === "cohort")
        matches = await matchCohort(prop, propertyValues, cohortProperties, debugMode, flagDependencyEvaluator);
      else if (prop.type === "flag") {
        if (!flagDependencyEvaluator)
          throw new InconclusiveMatchError(`Flag dependency '${prop.key || "unknown"}' cannot be evaluated without a flag dependency evaluator`);
        matches = await flagDependencyEvaluator(prop);
      } else
        matches = matchProperty(prop, propertyValues);
      const negation = prop.negation || false;
      if (propertyGroupType === "AND") {
        if (!matches && !negation)
          return false;
        if (matches && negation)
          return false;
      } else {
        if (matches && !negation)
          return true;
        if (!matches && negation)
          return true;
      }
    } catch (err) {
      if (err instanceof RequiresServerEvaluation)
        throw err;
      if (err instanceof InconclusiveMatchError) {
        if (debugMode)
          console.debug(`Failed to compute property ${prop} locally: ${err}`);
        errorMatchingLocally = true;
      } else
        throw err;
    }
  if (errorMatchingLocally)
    throw new InconclusiveMatchError("can't match cohort without a given cohort property value");
  return propertyGroupType === "AND";
}
function isValidRegex(regex) {
  try {
    new RegExp(regex);
    return true;
  } catch (err) {
    return false;
  }
}
function parseSemverNumericIdentifier(part, raw) {
  if (!/^\d+$/.test(part))
    throw new InconclusiveMatchError(`Invalid semver: ${raw}`);
  if (part.length > 1 && part[0] === "0")
    throw new InconclusiveMatchError(`Invalid semver: ${raw}`);
  return parseInt(part, 10);
}
function parseSemver2(value) {
  const text3 = String(value).trim().replace(/^[vV]/, "");
  const baseVersion = text3.split("-")[0].split("+")[0];
  if (!baseVersion || baseVersion.startsWith("."))
    throw new InconclusiveMatchError(`Invalid semver: ${value}`);
  const parts = baseVersion.split(".");
  const parsePart = (part) => {
    if (part === undefined || part === "")
      return 0;
    return parseSemverNumericIdentifier(part, value);
  };
  const major = parsePart(parts[0]);
  const minor = parsePart(parts[1]);
  const patch2 = parsePart(parts[2]);
  return [
    major,
    minor,
    patch2
  ];
}
function compareSemverTuples(a2, b5) {
  for (let i = 0;i < 3; i++) {
    if (a2[i] < b5[i])
      return -1;
    if (a2[i] > b5[i])
      return 1;
  }
  return 0;
}
function computeTildeBounds(value) {
  const parsed = parseSemver2(value);
  const lower = [
    parsed[0],
    parsed[1],
    parsed[2]
  ];
  const upper = [
    parsed[0],
    parsed[1] + 1,
    0
  ];
  return {
    lower,
    upper
  };
}
function computeCaretBounds(value) {
  const parsed = parseSemver2(value);
  const [major, minor, patch2] = parsed;
  const lower = [
    major,
    minor,
    patch2
  ];
  let upper;
  upper = major > 0 ? [
    major + 1,
    0,
    0
  ] : minor > 0 ? [
    0,
    minor + 1,
    0
  ] : [
    0,
    0,
    patch2 + 1
  ];
  return {
    lower,
    upper
  };
}
function computeWildcardBounds(value) {
  const text3 = String(value).trim().replace(/^[vV]/, "");
  const cleanedText = text3.replace(/\.\*$/, "").replace(/\*$/, "");
  if (!cleanedText)
    throw new InconclusiveMatchError(`Invalid wildcard semver: ${value}`);
  const parts = cleanedText.split(".");
  const parseWildcardPart = (part) => {
    try {
      return parseSemverNumericIdentifier(part, value);
    } catch {
      throw new InconclusiveMatchError(`Invalid wildcard semver: ${value}`);
    }
  };
  const major = parseWildcardPart(parts[0]);
  let lower;
  let upper;
  if (parts.length === 1) {
    lower = [
      major,
      0,
      0
    ];
    upper = [
      major + 1,
      0,
      0
    ];
  } else {
    const minor = parseWildcardPart(parts[1]);
    lower = [
      major,
      minor,
      0
    ];
    upper = [
      major,
      minor + 1,
      0
    ];
  }
  return {
    lower,
    upper
  };
}
function convertToDateTime(value) {
  if (value instanceof Date)
    return value;
  if (typeof value == "string" || typeof value == "number") {
    const date6 = new Date(value);
    if (!isNaN(date6.valueOf()))
      return date6;
    throw new InconclusiveMatchError(`${value} is in an invalid date format`);
  }
  throw new InconclusiveMatchError(`The date provided ${value} must be a string, number, or date object`);
}
function relativeDateParseForFeatureFlagMatching(value) {
  const regex = /^-?(?<number>[0-9]+)(?<interval>[a-z])$/;
  const match = value.match(regex);
  const parsedDt = new Date(new Date().toISOString());
  if (!match)
    return null;
  {
    if (!match.groups)
      return null;
    const number5 = parseInt(match.groups["number"]);
    if (number5 >= 1e4)
      return null;
    const interval2 = match.groups["interval"];
    if (interval2 == "h")
      parsedDt.setUTCHours(parsedDt.getUTCHours() - number5);
    else if (interval2 == "d")
      parsedDt.setUTCDate(parsedDt.getUTCDate() - number5);
    else if (interval2 == "w")
      parsedDt.setUTCDate(parsedDt.getUTCDate() - 7 * number5);
    else if (interval2 == "m")
      parsedDt.setUTCMonth(parsedDt.getUTCMonth() - number5);
    else {
      if (interval2 != "y")
        return null;
      parsedDt.setUTCFullYear(parsedDt.getUTCFullYear() - number5);
    }
    return parsedDt;
  }
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
  let calledFatalError = false;
  return Object.assign((error49) => {
    const userProvidedListenersCount = global.process.listeners("uncaughtException").filter((listener) => listener.name !== "domainUncaughtExceptionClear" && listener._posthogErrorHandler !== true).length;
    const processWouldExit = userProvidedListenersCount === 0;
    captureFn(error49, {
      mechanism: {
        type: "onuncaughtexception",
        handled: false
      }
    });
    if (!calledFatalError && processWouldExit) {
      calledFatalError = true;
      onFatalFn(error49);
    }
  }, {
    _posthogErrorHandler: true
  });
}
function addUncaughtExceptionListener(captureFn, onFatalFn) {
  globalThis.process?.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
}
function addUnhandledRejectionListener(captureFn) {
  globalThis.process?.on("unhandledRejection", (reason) => captureFn(reason, {
    mechanism: {
      type: "onunhandledrejection",
      handled: false
    }
  }));
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
var SHUTDOWN_TIMEOUT = 2000;

class ErrorTracking {
  constructor(client, options2, _logger) {
    this.client = client;
    this._exceptionAutocaptureEnabled = options2.enableExceptionAutocapture || false;
    this._logger = _logger;
    this._rateLimiter = new BucketedRateLimiter({
      refillRate: 1,
      bucketSize: 10,
      refillInterval: 1e4,
      _logger: this._logger
    });
    this.startAutocaptureIfEnabled();
  }
  static isPreviouslyCapturedError(x4) {
    return isObject3(x4) && "__posthog_previously_captured_error" in x4 && x4.__posthog_previously_captured_error === true;
  }
  static async buildEventMessage(builder, error49, hint, distinctId, additionalProperties) {
    const properties2 = {
      ...additionalProperties
    };
    const exceptionProperties = builder.buildFromUnknown(error49, hint);
    exceptionProperties.$exception_list = await builder.modifyFrames(exceptionProperties.$exception_list);
    return {
      event: "$exception",
      distinctId,
      properties: {
        ...exceptionProperties,
        ...properties2
      },
      _originatedFromCaptureException: true
    };
  }
  startAutocaptureIfEnabled() {
    if (this.isEnabled()) {
      addUncaughtExceptionListener(this.onException.bind(this), this.onFatalError.bind(this));
      addUnhandledRejectionListener(this.onException.bind(this));
    }
  }
  onException(exception, hint) {
    this.client.addPendingPromise((async () => {
      if (!ErrorTracking.isPreviouslyCapturedError(exception)) {
        const eventMessage = await ErrorTracking.buildEventMessage(this.client.getErrorPropertiesBuilder(), exception, hint);
        const exceptionProperties = eventMessage.properties;
        const exceptionType = exceptionProperties?.$exception_list[0]?.type ?? "Exception";
        const isRateLimited3 = this._rateLimiter.consumeRateLimit(exceptionType);
        if (isRateLimited3)
          return void this._logger.info("Skipping exception capture because of client rate limiting.", {
            exception: exceptionType
          });
        return this.client.capture(eventMessage);
      }
    })());
  }
  async onFatalError(exception) {
    console.error(exception);
    await this.client.shutdown(SHUTDOWN_TIMEOUT);
    process.exit(1);
  }
  isEnabled() {
    return !this.client.isDisabled && this._exceptionAutocaptureEnabled;
  }
  shutdown() {
    this._rateLimiter.stop();
  }
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/storage-memory.mjs
class PostHogMemoryStorage {
  getProperty(key) {
    return this._memoryStorage[key];
  }
  setProperty(key, value) {
    this._memoryStorage[key] = value !== null ? value : undefined;
  }
  constructor() {
    this._memoryStorage = {};
  }
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/client.mjs
var MINIMUM_POLLING_INTERVAL = 100;
var THIRTY_SECONDS = 30000;
var MAX_CACHE_SIZE = 50000;
var WAITUNTIL_DEBOUNCE_MS = 50;
var WAITUNTIL_MAX_WAIT_MS = 500;
var DEFAULT_NODE_HOST = "https://us.i.posthog.com";
var _emittedDeprecations = new Set;
function emitDeprecationWarningOnce(id, message2) {
  if (_emittedDeprecations.has(id))
    return;
  _emittedDeprecations.add(id);
  console.warn(`[PostHog] ${message2}`);
}
function normalizeApiKey(value) {
  return typeof value == "string" ? value.trim() : "";
}
function normalizePersonalApiKey(value) {
  const normalizedValue = typeof value == "string" ? value.trim() : "";
  return normalizedValue || undefined;
}
function normalizeHost(value) {
  const normalizedValue = typeof value == "string" ? value.trim() : "";
  return normalizedValue || DEFAULT_NODE_HOST;
}
function normalizeUnsetPersonProperties(value) {
  const propertyNames = Array.isArray(value) ? value : [
    value
  ];
  return propertyNames.filter((propertyName) => typeof propertyName == "string" && propertyName.trim().length > 0);
}
function buildFlagEventProperties(flagValues) {
  if (!flagValues)
    return {};
  const additionalProperties = {};
  for (const [feature, variant] of Object.entries(flagValues))
    additionalProperties[`$feature/${feature}`] = variant;
  const activeFlags = Object.keys(flagValues).filter((flag) => flagValues[flag] !== false).sort();
  if (activeFlags.length > 0)
    additionalProperties["$active_feature_flags"] = activeFlags;
  return additionalProperties;
}

class PostHogBackendClient extends PostHogCoreStateless {
  constructor(apiKey2, options2 = {}) {
    const normalizedApiKey = normalizeApiKey(apiKey2);
    const normalizedOptions = {
      ...options2,
      host: normalizeHost(options2.host),
      personalApiKey: normalizePersonalApiKey(options2.personalApiKey)
    };
    super(normalizedApiKey, normalizedOptions), this._memoryStorage = new PostHogMemoryStorage;
    this.options = normalizedOptions;
    this.context = this.initializeContext();
    this.options.featureFlagsPollingInterval = typeof normalizedOptions.featureFlagsPollingInterval == "number" ? Math.max(normalizedOptions.featureFlagsPollingInterval, MINIMUM_POLLING_INTERVAL) : THIRTY_SECONDS;
    if (typeof normalizedOptions.waitUntilDebounceMs == "number")
      this.options.waitUntilDebounceMs = Math.max(normalizedOptions.waitUntilDebounceMs, 0);
    if (typeof normalizedOptions.waitUntilMaxWaitMs == "number")
      this.options.waitUntilMaxWaitMs = Math.max(normalizedOptions.waitUntilMaxWaitMs, 0);
    if (!this.disabled && normalizedOptions.personalApiKey) {
      if (normalizedOptions.personalApiKey.includes("phc_"))
        throw new Error('Your Personal API key is invalid. These keys are prefixed with "phx_" and can be created in PostHog project settings.');
      const shouldEnableLocalEvaluation = normalizedOptions.enableLocalEvaluation !== false;
      if (shouldEnableLocalEvaluation)
        this.featureFlagsPoller = new FeatureFlagsPoller({
          pollingInterval: this.options.featureFlagsPollingInterval,
          personalApiKey: normalizedOptions.personalApiKey,
          projectApiKey: normalizedApiKey,
          timeout: normalizedOptions.requestTimeout ?? 1e4,
          host: this.host,
          fetch: normalizedOptions.fetch,
          onError: (err) => {
            this._events.emit("error", err);
          },
          onLoad: (count2) => {
            this._events.emit("localEvaluationFlagsLoaded", count2);
          },
          customHeaders: this.getCustomHeaders(),
          cacheProvider: normalizedOptions.flagDefinitionCacheProvider,
          strictLocalEvaluation: normalizedOptions.strictLocalEvaluation
        });
    }
    this.errorTracking = new ErrorTracking(this, normalizedOptions, this._logger);
    this.distinctIdHasSentFlagCalls = {};
    this.maxCacheSize = normalizedOptions.maxCacheSize || MAX_CACHE_SIZE;
  }
  enqueue(type2, message2, options2) {
    super.enqueue(type2, message2, options2);
    this.scheduleDebouncedFlush();
  }
  async flush() {
    const flushPromise = super.flush();
    const waitUntil = this.options.waitUntil;
    if (waitUntil && !this._waitUntilCycle)
      try {
        waitUntil(flushPromise.catch(() => {}));
      } catch {}
    return flushPromise;
  }
  scheduleDebouncedFlush() {
    const waitUntil = this.options.waitUntil;
    if (!waitUntil)
      return;
    if (this.disabled || this.optedOut)
      return;
    if (!this._waitUntilCycle) {
      let resolve3;
      const promise2 = new Promise((r2) => {
        resolve3 = r2;
      });
      try {
        waitUntil(promise2);
      } catch {
        return;
      }
      this._waitUntilCycle = {
        resolve: resolve3,
        startedAt: Date.now(),
        timer: undefined
      };
    }
    const elapsed = Date.now() - this._waitUntilCycle.startedAt;
    const maxWaitMs = this.options.waitUntilMaxWaitMs ?? WAITUNTIL_MAX_WAIT_MS;
    const flushNow = elapsed >= maxWaitMs;
    if (this._waitUntilCycle.timer !== undefined)
      clearTimeout(this._waitUntilCycle.timer);
    if (flushNow)
      return void this.resolveWaitUntilFlush();
    const debounceMs = this.options.waitUntilDebounceMs ?? WAITUNTIL_DEBOUNCE_MS;
    this._waitUntilCycle.timer = safeSetTimeout(() => {
      this.resolveWaitUntilFlush();
    }, debounceMs);
  }
  _consumeWaitUntilCycle() {
    const cycle = this._waitUntilCycle;
    if (cycle) {
      clearTimeout(cycle.timer);
      this._waitUntilCycle = undefined;
    }
    return cycle?.resolve;
  }
  async resolveWaitUntilFlush() {
    const resolve3 = this._consumeWaitUntilCycle();
    try {
      await super.flush();
    } catch {} finally {
      resolve3?.();
    }
  }
  getPersistedProperty(key) {
    return this._memoryStorage.getProperty(key);
  }
  setPersistedProperty(key, value) {
    return this._memoryStorage.setProperty(key, value);
  }
  fetch(url2, options2) {
    return this.options.fetch ? this.options.fetch(url2, options2) : fetch(url2, options2);
  }
  getLibraryVersion() {
    return version4;
  }
  getCustomUserAgent() {
    return `${this.getLibraryId()}/${this.getLibraryVersion()}`;
  }
  getCommonEventProperties() {
    const commonProperties = super.getCommonEventProperties();
    if (this.options.isServer ?? true)
      commonProperties.$is_server = true;
    return commonProperties;
  }
  enable() {
    return super.optIn();
  }
  disable() {
    return super.optOut();
  }
  debug(enabled = true) {
    super.debug(enabled);
    this.featureFlagsPoller?.debug(enabled);
  }
  _warnIfInvalidCapture(props, stringArgumentWarning, exceptionCaptureWarning) {
    if (typeof props == "string")
      this._logger.warn(stringArgumentWarning);
    if (props.event === "$exception" && !props._originatedFromCaptureException)
      this._logger.warn(exceptionCaptureWarning);
  }
  _capturePreparedEvent(props, immediate) {
    return this.addPendingPromise(this.prepareEventMessage(props).then(({ distinctId, event, properties: properties2, options: options2 }) => {
      const captureOptions = {
        timestamp: options2.timestamp,
        disableGeoip: options2.disableGeoip,
        uuid: options2.uuid
      };
      return immediate ? super.captureStatelessImmediate(distinctId, event, properties2, captureOptions) : super.captureStateless(distinctId, event, properties2, captureOptions);
    }).catch((err) => {
      if (err)
        console.error(err);
    }));
  }
  capture(props) {
    this._warnIfInvalidCapture(props, "Called capture() with a string as the first argument when an object was expected.", "Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically.");
    this._capturePreparedEvent(props, false);
  }
  async captureImmediate(props) {
    this._warnIfInvalidCapture(props, "Called captureImmediate() with a string as the first argument when an object was expected.", "Capturing a `$exception` event via `posthog.captureImmediate('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureExceptionImmediate(error)` instead, which attaches this metadata by default.");
    return this._capturePreparedEvent(props, true);
  }
  identify({ distinctId, properties: properties2 = {}, disableGeoip }) {
    const { $set, $set_once, $anon_distinct_id, ...rest } = properties2;
    const setProps = $set || rest;
    const setOnceProps = $set_once || {};
    const eventProperties = {
      $set: setProps,
      $set_once: setOnceProps,
      $anon_distinct_id: $anon_distinct_id ?? undefined
    };
    super.identifyStateless(distinctId, eventProperties, {
      disableGeoip
    });
  }
  async identifyImmediate({ distinctId, properties: properties2 = {}, disableGeoip }) {
    const { $set, $set_once, $anon_distinct_id, ...rest } = properties2;
    const setProps = $set || rest;
    const setOnceProps = $set_once || {};
    const eventProperties = {
      $set: setProps,
      $set_once: setOnceProps,
      $anon_distinct_id: $anon_distinct_id ?? undefined
    };
    await super.identifyStatelessImmediate(distinctId, eventProperties, {
      disableGeoip
    });
  }
  setPersonProperties({ distinctId, properties: properties2 = {}, propertiesOnce = {} }) {
    if (Object.keys(properties2).length === 0 && Object.keys(propertiesOnce).length === 0)
      return;
    const eventProperties = {};
    if (Object.keys(properties2).length > 0)
      eventProperties.$set = properties2;
    if (Object.keys(propertiesOnce).length > 0)
      eventProperties.$set_once = propertiesOnce;
    this.capture({
      distinctId,
      event: "$set",
      properties: eventProperties
    });
  }
  unsetPersonProperties({ distinctId, properties: properties2 }) {
    const propertyNames = normalizeUnsetPersonProperties(properties2);
    if (propertyNames.length === 0)
      return;
    this.capture({
      distinctId,
      event: "$set",
      properties: {
        $unset: propertyNames
      }
    });
  }
  alias(data) {
    super.aliasStateless(data.alias, data.distinctId, undefined, {
      disableGeoip: data.disableGeoip
    });
  }
  async aliasImmediate(data) {
    await super.aliasStatelessImmediate(data.alias, data.distinctId, undefined, {
      disableGeoip: data.disableGeoip
    });
  }
  isLocalEvaluationReady() {
    return this.featureFlagsPoller?.isLocalEvaluationReady() ?? false;
  }
  async waitForLocalEvaluationReady(timeoutMs = THIRTY_SECONDS) {
    if (this.isLocalEvaluationReady())
      return true;
    if (this.featureFlagsPoller === undefined)
      return false;
    return new Promise((resolve3) => {
      const timeout = setTimeout(() => {
        cleanup();
        resolve3(false);
      }, timeoutMs);
      const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
        clearTimeout(timeout);
        cleanup();
        resolve3(count2 > 0);
      });
    });
  }
  _resolveDistinctId(distinctIdOrOptions, options2) {
    if (typeof distinctIdOrOptions == "string")
      return {
        distinctId: distinctIdOrOptions,
        options: options2
      };
    return {
      distinctId: this.context?.get()?.distinctId,
      options: distinctIdOrOptions
    };
  }
  async _getFeatureFlagResult(key, distinctId, options2 = {}, matchValue) {
    if (this.disabled)
      return void this._logger.warn("The client is disabled");
    const sendFeatureFlagEvents = options2.sendFeatureFlagEvents ?? true;
    if (this._flagOverrides !== undefined && key in this._flagOverrides) {
      const overrideValue = this._flagOverrides[key];
      if (overrideValue === undefined)
        return;
      const overridePayload = this._payloadOverrides?.[key];
      return {
        key,
        enabled: overrideValue !== false,
        variant: typeof overrideValue == "string" ? overrideValue : undefined,
        payload: overridePayload
      };
    }
    const { groups, disableGeoip } = options2;
    let { onlyEvaluateLocally, personProperties, groupProperties } = options2;
    const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
    personProperties = adjustedProperties.allPersonProperties;
    groupProperties = adjustedProperties.allGroupProperties;
    const evaluationContext = this.createFeatureFlagEvaluationContext(distinctId, groups, personProperties, groupProperties);
    if (onlyEvaluateLocally == undefined)
      onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
    let result;
    let flagWasLocallyEvaluated = false;
    let requestId;
    let evaluatedAt;
    let featureFlagError;
    let flagId;
    let flagVersion;
    let flagReason;
    const localEvaluationEnabled = this.featureFlagsPoller !== undefined;
    if (localEvaluationEnabled) {
      await this.featureFlagsPoller?.loadFeatureFlags();
      const flag = this.featureFlagsPoller?.featureFlagsByKey[key];
      if (flag)
        try {
          const localResult = await this.featureFlagsPoller?.computeFlagAndPayloadLocally(flag, evaluationContext, {
            matchValue
          });
          if (localResult) {
            flagWasLocallyEvaluated = true;
            const value = localResult.value;
            flagId = flag.id;
            flagReason = "Evaluated locally";
            result = {
              key,
              enabled: value !== false,
              variant: typeof value == "string" ? value : undefined,
              payload: localResult.payload ?? undefined
            };
          }
        } catch (e3) {
          if (e3 instanceof RequiresServerEvaluation || e3 instanceof InconclusiveMatchError)
            this._logger?.info(`${e3.name} when computing flag locally: ${key}: ${e3.message}`);
          else
            throw e3;
        }
    }
    if (!flagWasLocallyEvaluated && !onlyEvaluateLocally) {
      const flagsResponse = await super.getFeatureFlagDetailsStateless(evaluationContext.distinctId, evaluationContext.groups, evaluationContext.personProperties, evaluationContext.groupProperties, disableGeoip, [
        key
      ]);
      if (flagsResponse === undefined)
        featureFlagError = FeatureFlagError2.UNKNOWN_ERROR;
      else {
        requestId = flagsResponse.requestId;
        evaluatedAt = flagsResponse.evaluatedAt;
        const errors3 = [];
        if (flagsResponse.errorsWhileComputingFlags)
          errors3.push(FeatureFlagError2.ERRORS_WHILE_COMPUTING);
        if (flagsResponse.quotaLimited?.includes("feature_flags"))
          errors3.push(FeatureFlagError2.QUOTA_LIMITED);
        const flagDetail = flagsResponse.flags[key];
        if (flagDetail === undefined)
          errors3.push(FeatureFlagError2.FLAG_MISSING);
        else {
          flagId = flagDetail.metadata?.id;
          flagVersion = flagDetail.metadata?.version;
          flagReason = flagDetail.reason?.description ?? flagDetail.reason?.code;
          let parsedPayload;
          if (flagDetail.metadata?.payload !== undefined)
            try {
              parsedPayload = JSON.parse(flagDetail.metadata.payload);
            } catch {
              parsedPayload = flagDetail.metadata.payload;
            }
          result = {
            key,
            enabled: flagDetail.enabled,
            variant: flagDetail.variant,
            payload: parsedPayload
          };
        }
        if (errors3.length > 0)
          featureFlagError = errors3.join(",");
      }
    }
    if (sendFeatureFlagEvents) {
      const response = result === undefined ? undefined : result.enabled === false ? false : result.variant ?? true;
      const properties2 = {
        $feature_flag: key,
        $feature_flag_response: response,
        $feature_flag_id: flagId,
        $feature_flag_version: flagVersion,
        $feature_flag_reason: flagReason,
        locally_evaluated: flagWasLocallyEvaluated,
        [`$feature/${key}`]: response,
        $feature_flag_request_id: requestId,
        $feature_flag_evaluated_at: flagWasLocallyEvaluated ? Date.now() : evaluatedAt
      };
      if (flagWasLocallyEvaluated && this.featureFlagsPoller) {
        const flagDefinitionsLoadedAt = this.featureFlagsPoller.getFlagDefinitionsLoadedAt();
        if (flagDefinitionsLoadedAt !== undefined)
          properties2.$feature_flag_definitions_loaded_at = flagDefinitionsLoadedAt;
      }
      if (featureFlagError)
        properties2.$feature_flag_error = featureFlagError;
      this._captureFlagCalledEventIfNeeded({
        distinctId,
        key,
        response,
        groups,
        disableGeoip,
        properties: properties2
      });
    }
    if (result !== undefined && this._payloadOverrides !== undefined && key in this._payloadOverrides)
      result = {
        ...result,
        payload: this._payloadOverrides[key]
      };
    return result;
  }
  async getFeatureFlag(key, distinctId, options2) {
    emitDeprecationWarningOnce("getFeatureFlag", "`getFeatureFlag` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlag(key)` instead — this consolidates flag evaluation into a single `/flags` request per incoming request.");
    const result = await this._getFeatureFlagResult(key, distinctId, {
      ...options2,
      sendFeatureFlagEvents: options2?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
    });
    if (result === undefined)
      return;
    if (result.enabled === false)
      return false;
    return result.variant ?? true;
  }
  async getFeatureFlagPayload(key, distinctId, matchValue, options2) {
    emitDeprecationWarningOnce("getFeatureFlagPayload", "`getFeatureFlagPayload` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.getFlagPayload(key)` instead — this consolidates flag evaluation into a single `/flags` request per incoming request.");
    if (this._payloadOverrides !== undefined && key in this._payloadOverrides)
      return this._payloadOverrides[key];
    const result = await this._getFeatureFlagResult(key, distinctId, {
      ...options2,
      sendFeatureFlagEvents: false
    }, matchValue);
    if (result === undefined)
      return;
    return result.payload ?? null;
  }
  async getFeatureFlagResult(key, distinctIdOrOptions, options2) {
    const { distinctId: resolvedDistinctId, options: resolvedOptions } = this._resolveDistinctId(distinctIdOrOptions, options2);
    if (!resolvedDistinctId)
      return void this._logger.warn("[PostHog] distinctId is required — pass it explicitly or use withContext()");
    return this._getFeatureFlagResult(key, resolvedDistinctId, {
      ...resolvedOptions,
      sendFeatureFlagEvents: resolvedOptions?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
    });
  }
  async getRemoteConfigPayload(flagKey) {
    if (this.disabled)
      return void this._logger.warn("The client is disabled");
    if (!this.options.personalApiKey)
      throw new Error("Personal API key is required for remote config payload decryption");
    const response = await this._requestRemoteConfigPayload(flagKey);
    if (!response)
      return;
    const parsed = await response.json();
    if (typeof parsed == "string")
      try {
        return JSON.parse(parsed);
      } catch (e3) {}
    return parsed;
  }
  async isFeatureEnabled(key, distinctId, options2) {
    emitDeprecationWarningOnce("isFeatureEnabled", "`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead — this consolidates flag evaluation into a single `/flags` request per incoming request.");
    const result = await this._getFeatureFlagResult(key, distinctId, {
      ...options2,
      sendFeatureFlagEvents: options2?.sendFeatureFlagEvents ?? this.options.sendFeatureFlagEvent ?? true
    });
    if (result === undefined)
      return;
    if (result.enabled === false)
      return false;
    const feat = result.variant ?? true;
    return !!feat || false;
  }
  async getAllFlags(distinctIdOrOptions, options2) {
    const { distinctId: resolvedDistinctId, options: resolvedOptions } = this._resolveDistinctId(distinctIdOrOptions, options2);
    if (!resolvedDistinctId) {
      this._logger.warn("[PostHog] distinctId is required to get feature flags — pass it explicitly or use withContext()");
      return {};
    }
    const response = await this.getAllFlagsAndPayloads(resolvedDistinctId, resolvedOptions);
    return response.featureFlags || {};
  }
  async getAllFlagsAndPayloads(distinctIdOrOptions, options2) {
    const { distinctId: resolvedDistinctId, options: resolvedOptions } = this._resolveDistinctId(distinctIdOrOptions, options2);
    if (!resolvedDistinctId) {
      this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads — pass it explicitly or use withContext()");
      return {
        featureFlags: {},
        featureFlagPayloads: {}
      };
    }
    if (this.disabled) {
      this._logger.warn("The client is disabled");
      return {
        featureFlags: {},
        featureFlagPayloads: {}
      };
    }
    const { groups, disableGeoip, flagKeys } = resolvedOptions || {};
    let { onlyEvaluateLocally, personProperties, groupProperties } = resolvedOptions || {};
    const adjustedProperties = this.addLocalPersonAndGroupProperties(resolvedDistinctId, groups, personProperties, groupProperties);
    personProperties = adjustedProperties.allPersonProperties;
    groupProperties = adjustedProperties.allGroupProperties;
    const evaluationContext = this.createFeatureFlagEvaluationContext(resolvedDistinctId, groups, personProperties, groupProperties);
    if (onlyEvaluateLocally == undefined)
      onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
    const localEvaluationResult = await this.featureFlagsPoller?.getAllFlagsAndPayloads(evaluationContext, flagKeys);
    let featureFlags = {};
    let featureFlagPayloads = {};
    let fallbackToFlags = true;
    if (localEvaluationResult) {
      featureFlags = localEvaluationResult.response;
      featureFlagPayloads = localEvaluationResult.payloads;
      fallbackToFlags = localEvaluationResult.fallbackToFlags;
    }
    if (fallbackToFlags && !onlyEvaluateLocally) {
      const remoteEvaluationResult = await super.getFeatureFlagsAndPayloadsStateless(evaluationContext.distinctId, evaluationContext.groups, evaluationContext.personProperties, evaluationContext.groupProperties, disableGeoip, flagKeys);
      featureFlags = {
        ...featureFlags,
        ...remoteEvaluationResult.flags || {}
      };
      featureFlagPayloads = {
        ...featureFlagPayloads,
        ...remoteEvaluationResult.payloads || {}
      };
    }
    if (this._flagOverrides !== undefined)
      featureFlags = {
        ...featureFlags,
        ...this._flagOverrides
      };
    if (this._payloadOverrides !== undefined)
      featureFlagPayloads = {
        ...featureFlagPayloads,
        ...this._payloadOverrides
      };
    return {
      featureFlags,
      featureFlagPayloads
    };
  }
  async evaluateFlags(distinctIdOrOptions, options2) {
    const { distinctId: resolvedDistinctId, options: resolvedOptions } = this._resolveDistinctId(distinctIdOrOptions, options2);
    if (!resolvedDistinctId) {
      this._logger.warn("[PostHog] distinctId is required to evaluate feature flags — pass it explicitly or use withContext()");
      return new FeatureFlagEvaluations({
        host: this._getFeatureFlagEvaluationsHost(),
        distinctId: "",
        flags: {}
      });
    }
    if (this.disabled) {
      this._logger.warn("The client is disabled");
      return new FeatureFlagEvaluations({
        host: this._getFeatureFlagEvaluationsHost(),
        distinctId: resolvedDistinctId,
        flags: {}
      });
    }
    const { groups, disableGeoip, flagKeys } = resolvedOptions || {};
    let { onlyEvaluateLocally, personProperties, groupProperties } = resolvedOptions || {};
    const adjustedProperties = this.addLocalPersonAndGroupProperties(resolvedDistinctId, groups, personProperties, groupProperties);
    personProperties = adjustedProperties.allPersonProperties;
    groupProperties = adjustedProperties.allGroupProperties;
    const evaluationContext = this.createFeatureFlagEvaluationContext(resolvedDistinctId, groups, personProperties, groupProperties);
    if (onlyEvaluateLocally == undefined)
      onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
    const records = {};
    let requestId;
    let evaluatedAt;
    let errorsWhileComputing = false;
    let quotaLimited = false;
    const localResult = await this.featureFlagsPoller?.getAllFlagsAndPayloads(evaluationContext, flagKeys);
    const locallyEvaluatedKeys = new Set;
    if (localResult)
      for (const [key, value] of Object.entries(localResult.response)) {
        const flagDef = this.featureFlagsPoller?.featureFlagsByKey[key];
        records[key] = {
          key,
          enabled: value !== false,
          variant: typeof value == "string" ? value : undefined,
          payload: localResult.payloads[key],
          id: flagDef?.id,
          version: undefined,
          reason: "Evaluated locally",
          locallyEvaluated: true
        };
        locallyEvaluatedKeys.add(key);
      }
    const fallbackToFlags = localResult ? localResult.fallbackToFlags : true;
    if (fallbackToFlags && !onlyEvaluateLocally) {
      const details = await super.getFeatureFlagDetailsStateless(evaluationContext.distinctId, evaluationContext.groups, evaluationContext.personProperties, evaluationContext.groupProperties, disableGeoip, flagKeys);
      if (details) {
        requestId = details.requestId;
        evaluatedAt = details.evaluatedAt;
        errorsWhileComputing = Boolean(details.errorsWhileComputingFlags);
        quotaLimited = Array.isArray(details.quotaLimited) && details.quotaLimited.includes("feature_flags");
        for (const [key, detail] of Object.entries(details.flags)) {
          if (locallyEvaluatedKeys.has(key))
            continue;
          let parsedPayload;
          if (detail.metadata?.payload !== undefined)
            try {
              parsedPayload = JSON.parse(detail.metadata.payload);
            } catch {
              parsedPayload = detail.metadata.payload;
            }
          records[key] = {
            key,
            enabled: detail.enabled,
            variant: detail.variant,
            payload: parsedPayload,
            id: detail.metadata?.id,
            version: detail.metadata?.version,
            reason: detail.reason?.description ?? detail.reason?.code,
            locallyEvaluated: false
          };
        }
      }
    }
    if (this._flagOverrides !== undefined)
      for (const [key, value] of Object.entries(this._flagOverrides)) {
        if (value === undefined) {
          delete records[key];
          continue;
        }
        const existing = records[key];
        records[key] = {
          key,
          enabled: value !== false,
          variant: typeof value == "string" ? value : undefined,
          payload: existing?.payload,
          id: existing?.id,
          version: existing?.version,
          reason: existing?.reason,
          locallyEvaluated: existing?.locallyEvaluated ?? false
        };
      }
    if (this._payloadOverrides !== undefined)
      for (const [key, payload] of Object.entries(this._payloadOverrides)) {
        const existing = records[key];
        if (existing)
          records[key] = {
            ...existing,
            payload
          };
      }
    return new FeatureFlagEvaluations({
      host: this._getFeatureFlagEvaluationsHost(),
      distinctId: resolvedDistinctId,
      groups,
      disableGeoip,
      flags: records,
      requestId,
      evaluatedAt,
      flagDefinitionsLoadedAt: this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),
      errorsWhileComputing,
      quotaLimited
    });
  }
  _captureFlagCalledEventIfNeeded(params) {
    const { distinctId, key, response, groups, disableGeoip, properties: properties2 } = params;
    const groupSuffix = groups && Object.keys(groups).length > 0 ? `_${JSON.stringify(Object.entries(groups).sort(([a2], [b5]) => a2 < b5 ? -1 : a2 > b5 ? 1 : 0))}` : "";
    const featureFlagReportedKey = `${key}_${response}${groupSuffix}`;
    if (distinctId in this.distinctIdHasSentFlagCalls && this.distinctIdHasSentFlagCalls[distinctId].has(featureFlagReportedKey))
      return;
    if (Object.keys(this.distinctIdHasSentFlagCalls).length >= this.maxCacheSize)
      this.distinctIdHasSentFlagCalls = {};
    if (this.distinctIdHasSentFlagCalls[distinctId] instanceof Set)
      this.distinctIdHasSentFlagCalls[distinctId].add(featureFlagReportedKey);
    else
      this.distinctIdHasSentFlagCalls[distinctId] = new Set([
        featureFlagReportedKey
      ]);
    this.capture({
      distinctId,
      event: "$feature_flag_called",
      properties: properties2,
      groups,
      disableGeoip
    });
  }
  _getFeatureFlagEvaluationsHost() {
    if (!this._featureFlagEvaluationsHost)
      this._featureFlagEvaluationsHost = {
        captureFlagCalledEventIfNeeded: (params) => this._captureFlagCalledEventIfNeeded(params),
        logWarning: (message2) => {
          if (this.options.featureFlagsLogWarnings !== false)
            console.warn(`[PostHog] ${message2}`);
        }
      };
    return this._featureFlagEvaluationsHost;
  }
  groupIdentify({ groupType, groupKey, properties: properties2, distinctId, disableGeoip }) {
    super.groupIdentifyStateless(groupType, groupKey, properties2, {
      disableGeoip
    }, distinctId);
  }
  async reloadFeatureFlags() {
    await this.featureFlagsPoller?.loadFeatureFlags(true);
  }
  overrideFeatureFlags(overrides) {
    const flagArrayToRecord = (flags) => Object.fromEntries(flags.map((f4) => [
      f4,
      true
    ]));
    if (overrides === false) {
      this._flagOverrides = undefined;
      this._payloadOverrides = undefined;
      return;
    }
    if (Array.isArray(overrides)) {
      this._flagOverrides = flagArrayToRecord(overrides);
      return;
    }
    if (this._isFeatureFlagOverrideOptions(overrides)) {
      if ("flags" in overrides) {
        if (overrides.flags === false)
          this._flagOverrides = undefined;
        else if (Array.isArray(overrides.flags))
          this._flagOverrides = flagArrayToRecord(overrides.flags);
        else if (overrides.flags !== undefined)
          this._flagOverrides = {
            ...overrides.flags
          };
      }
      if ("payloads" in overrides) {
        if (overrides.payloads === false)
          this._payloadOverrides = undefined;
        else if (overrides.payloads !== undefined)
          this._payloadOverrides = {
            ...overrides.payloads
          };
      }
      return;
    }
    this._flagOverrides = {
      ...overrides
    };
  }
  _isFeatureFlagOverrideOptions(overrides) {
    if (typeof overrides != "object" || overrides === null || Array.isArray(overrides))
      return false;
    const obj = overrides;
    if ("flags" in obj) {
      const flagsValue = obj["flags"];
      if (flagsValue === false || Array.isArray(flagsValue) || typeof flagsValue == "object" && flagsValue !== null)
        return true;
    }
    if ("payloads" in obj) {
      const payloadsValue = obj["payloads"];
      if (payloadsValue === false || typeof payloadsValue == "object" && payloadsValue !== null)
        return true;
    }
    return false;
  }
  withContext(data, fn3, options2) {
    if (!this.context)
      return fn3();
    return this.context.run(data, fn3, options2);
  }
  getContext() {
    return this.context?.get();
  }
  enterContext(data, options2) {
    this.context?.enter(data, options2);
  }
  async _shutdown(shutdownTimeoutMs) {
    const resolve3 = this._consumeWaitUntilCycle();
    await this.featureFlagsPoller?.stopPoller(shutdownTimeoutMs);
    this.errorTracking.shutdown();
    try {
      return await super._shutdown(shutdownTimeoutMs);
    } finally {
      resolve3?.();
    }
  }
  async _requestRemoteConfigPayload(flagKey) {
    if (this.disabled || !this.apiKey || !this.options.personalApiKey)
      return;
    const url2 = `${this.host}/api/projects/@current/feature_flags/${flagKey}/remote_config?token=${encodeURIComponent(this.apiKey)}`;
    const options2 = {
      method: "GET",
      headers: {
        ...this.getCustomHeaders(),
        "Content-Type": "application/json",
        Authorization: `Bearer ${this.options.personalApiKey}`
      }
    };
    let abortTimeout = null;
    if (this.options.requestTimeout && typeof this.options.requestTimeout == "number") {
      const controller = new AbortController;
      abortTimeout = safeSetTimeout(() => {
        controller.abort();
      }, this.options.requestTimeout);
      options2.signal = controller.signal;
    }
    try {
      return await this.fetch(url2, options2);
    } catch (error49) {
      this._events.emit("error", error49);
      return;
    } finally {
      if (abortTimeout)
        clearTimeout(abortTimeout);
    }
  }
  extractPropertiesFromEvent(eventProperties, groups) {
    if (!eventProperties)
      return {
        personProperties: {},
        groupProperties: {}
      };
    const personProperties = {};
    const groupProperties = {};
    for (const [key, value] of Object.entries(eventProperties))
      if (isPlainObject3(value) && groups && key in groups) {
        const groupProps = {};
        for (const [groupKey, groupValue] of Object.entries(value))
          groupProps[String(groupKey)] = String(groupValue);
        groupProperties[String(key)] = groupProps;
      } else
        personProperties[String(key)] = String(value);
    return {
      personProperties,
      groupProperties
    };
  }
  async getFeatureFlagsForEvent(distinctId, groups, disableGeoip, sendFeatureFlagsOptions) {
    if (this.disabled || !this.apiKey)
      return void this._logger.warn("The client is disabled");
    const finalPersonProperties = sendFeatureFlagsOptions?.personProperties || {};
    const finalGroupProperties = sendFeatureFlagsOptions?.groupProperties || {};
    const flagKeys = sendFeatureFlagsOptions?.flagKeys;
    const onlyEvaluateLocally = sendFeatureFlagsOptions?.onlyEvaluateLocally ?? this.options.strictLocalEvaluation ?? false;
    if (onlyEvaluateLocally)
      if (!((this.featureFlagsPoller?.featureFlags?.length || 0) > 0))
        return {};
      else {
        const groupsWithStringValues = {};
        for (const [key, value] of Object.entries(groups || {}))
          groupsWithStringValues[key] = String(value);
        return await this.getAllFlags(distinctId, {
          groups: groupsWithStringValues,
          personProperties: finalPersonProperties,
          groupProperties: finalGroupProperties,
          disableGeoip,
          onlyEvaluateLocally: true,
          flagKeys
        });
      }
    if ((this.featureFlagsPoller?.featureFlags?.length || 0) > 0) {
      const groupsWithStringValues = {};
      for (const [key, value] of Object.entries(groups || {}))
        groupsWithStringValues[key] = String(value);
      return await this.getAllFlags(distinctId, {
        groups: groupsWithStringValues,
        personProperties: finalPersonProperties,
        groupProperties: finalGroupProperties,
        disableGeoip,
        onlyEvaluateLocally: true,
        flagKeys
      });
    }
    return (await super.getFeatureFlagsStateless(distinctId, groups, finalPersonProperties, finalGroupProperties, disableGeoip)).flags;
  }
  addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties) {
    const allPersonProperties = {
      distinct_id: distinctId,
      ...personProperties || {}
    };
    const allGroupProperties = {};
    if (groups)
      for (const groupName of Object.keys(groups))
        allGroupProperties[groupName] = {
          $group_key: groups[groupName],
          ...groupProperties?.[groupName] || {}
        };
    return {
      allPersonProperties,
      allGroupProperties
    };
  }
  createFeatureFlagEvaluationContext(distinctId, groups, personProperties, groupProperties) {
    return {
      distinctId,
      groups: groups || {},
      personProperties: personProperties || {},
      groupProperties: groupProperties || {},
      evaluationCache: {}
    };
  }
  captureException(error49, distinctId, additionalProperties, uuid5, flags) {
    if (!ErrorTracking.isPreviouslyCapturedError(error49)) {
      const syntheticException = new Error("PostHog syntheticException");
      this.addPendingPromise(ErrorTracking.buildEventMessage(this.getErrorPropertiesBuilder(), error49, {
        syntheticException
      }, distinctId, additionalProperties).then((msg) => this.capture({
        ...msg,
        uuid: uuid5,
        flags
      })));
    }
  }
  async captureExceptionImmediate(error49, distinctId, additionalProperties, flags) {
    if (!ErrorTracking.isPreviouslyCapturedError(error49)) {
      const syntheticException = new Error("PostHog syntheticException");
      return this.addPendingPromise(ErrorTracking.buildEventMessage(this.getErrorPropertiesBuilder(), error49, {
        syntheticException
      }, distinctId, additionalProperties).then((msg) => this.captureImmediate({
        ...msg,
        flags
      })));
    }
  }
  async prepareEventMessage(props) {
    const { distinctId, event, properties: properties2, groups, flags, sendFeatureFlags, timestamp: timestamp2, disableGeoip, uuid: uuid5 } = props;
    const contextData = this.context?.get();
    let mergedDistinctId = distinctId || contextData?.distinctId;
    const mergedProperties = {
      ...this.props,
      ...contextData?.properties || {},
      ...properties2 || {}
    };
    if (!mergedDistinctId) {
      mergedDistinctId = uuidv72();
      mergedProperties.$process_person_profile = false;
    }
    if (contextData?.sessionId && !mergedProperties.$session_id)
      mergedProperties.$session_id = contextData.sessionId;
    const eventMessage = this._runBeforeSend({
      distinctId: mergedDistinctId,
      event,
      properties: mergedProperties,
      groups,
      flags,
      sendFeatureFlags,
      timestamp: timestamp2,
      disableGeoip,
      uuid: uuid5
    });
    if (!eventMessage)
      return Promise.reject(null);
    const eventProperties = await Promise.resolve().then(async () => {
      if (flags) {
        if (sendFeatureFlags)
          console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`.");
        return flags._getEventProperties();
      }
      if (sendFeatureFlags) {
        emitDeprecationWarningOnce("sendFeatureFlags", "`sendFeatureFlags` is deprecated and will be removed in a future major version. Pass a `flags` snapshot from `posthog.evaluateFlags(...)` instead — it avoids a second `/flags` request per capture and guarantees the event carries the exact flag values your code branched on.");
        const sendFeatureFlagsOptions = typeof sendFeatureFlags == "object" ? sendFeatureFlags : undefined;
        const flagValues = await this.getFeatureFlagsForEvent(eventMessage.distinctId, groups, disableGeoip, sendFeatureFlagsOptions);
        return buildFlagEventProperties(flagValues);
      }
      return {};
    }).catch(() => ({})).then((additionalProperties) => {
      const props2 = {
        ...additionalProperties,
        ...eventMessage.properties || {},
        $groups: eventMessage.groups || groups
      };
      return props2;
    });
    if (eventMessage.event === "$pageview" && this.options.__preview_capture_bot_pageviews && typeof eventProperties.$raw_user_agent == "string") {
      if (isBlockedUA(eventProperties.$raw_user_agent, this.options.custom_blocked_useragents || [])) {
        eventMessage.event = "$bot_pageview";
        eventProperties.$browser_type = "bot";
      }
    }
    return {
      distinctId: eventMessage.distinctId,
      event: eventMessage.event,
      properties: eventProperties,
      options: {
        timestamp: eventMessage.timestamp,
        disableGeoip: eventMessage.disableGeoip,
        uuid: eventMessage.uuid
      }
    };
  }
  _runBeforeSend(eventMessage) {
    const beforeSend = this.options.before_send;
    if (!beforeSend)
      return eventMessage;
    const fns = Array.isArray(beforeSend) ? beforeSend : [
      beforeSend
    ];
    let result = eventMessage;
    for (const fn3 of fns) {
      result = fn3(result);
      if (!result) {
        this._logger.info(`Event '${eventMessage.event}' was rejected in beforeSend function`);
        return null;
      }
      if (!result.properties || Object.keys(result.properties).length === 0) {
        const message2 = `Event '${result.event}' has no properties after beforeSend function, this is likely an error.`;
        this._logger.warn(message2);
      }
    }
    return result;
  }
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/context/context.mjs
import { AsyncLocalStorage } from "node:async_hooks";

class PostHogContext {
  constructor() {
    this.storage = new AsyncLocalStorage;
  }
  get() {
    return this.storage.getStore();
  }
  run(context10, fn3, options2) {
    return this.storage.run(this.resolve(context10, options2), fn3);
  }
  enter(context10, options2) {
    this.storage.enterWith(this.resolve(context10, options2));
  }
  resolve(context10, options2) {
    if (options2?.fresh === true)
      return context10;
    const current = this.get() || {};
    return {
      distinctId: context10.distinctId ?? current.distinctId,
      sessionId: context10.sessionId ?? current.sessionId,
      properties: {
        ...current.properties || {},
        ...context10.properties || {}
      }
    };
  }
}

// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
var NAME = "posthog-node";
function createEventProcessor(_posthog, { organization: organization2, projectId, prefix, severityAllowList = [
  "error"
], sendExceptionsToPostHog = true } = {}) {
  return (event) => {
    const shouldProcessLevel = severityAllowList === "*" || severityAllowList.includes(event.level);
    if (!shouldProcessLevel)
      return event;
    if (!event.tags)
      event.tags = {};
    const userId = event.tags[PostHogSentryIntegration.POSTHOG_ID_TAG];
    if (userId === undefined)
      return event;
    const uiHost = _posthog.options.host ?? "https://us.i.posthog.com";
    const personUrl = new URL(`/project/${_posthog.apiKey}/person/${userId}`, uiHost).toString();
    event.tags["PostHog Person URL"] = personUrl;
    const exceptions = event.exception?.values || [];
    const exceptionList = exceptions.map((exception) => ({
      ...exception,
      stacktrace: exception.stacktrace ? {
        ...exception.stacktrace,
        type: "raw",
        frames: (exception.stacktrace.frames || []).map((frame) => ({
          ...frame,
          platform: "node:javascript"
        }))
      } : undefined
    }));
    const properties2 = {
      $exception_message: exceptions[0]?.value || event.message,
      $exception_type: exceptions[0]?.type,
      $exception_level: event.level,
      $exception_list: exceptionList,
      $sentry_event_id: event.event_id,
      $sentry_exception: event.exception,
      $sentry_exception_message: exceptions[0]?.value || event.message,
      $sentry_exception_type: exceptions[0]?.type,
      $sentry_tags: event.tags
    };
    if (organization2 && projectId)
      properties2["$sentry_url"] = (prefix || "https://sentry.io/organizations/") + organization2 + "/issues/?project=" + projectId + "&query=" + event.event_id;
    if (sendExceptionsToPostHog)
      _posthog.capture({
        event: "$exception",
        distinctId: userId,
        properties: properties2
      });
    return event;
  };
}
class PostHogSentryIntegration {
  static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
  constructor(_posthog, organization2, prefix, severityAllowList, sendExceptionsToPostHog) {
    this.name = NAME;
    this.name = NAME;
    this.setupOnce = function(addGlobalEventProcessor, getCurrentHub) {
      const projectId = getCurrentHub()?.getClient()?.getDsn()?.projectId;
      addGlobalEventProcessor(createEventProcessor(_posthog, {
        organization: organization2,
        projectId,
        prefix,
        severityAllowList,
        sendExceptionsToPostHog: sendExceptionsToPostHog ?? true
      }));
    };
  }
}
// ../../node_modules/.pnpm/posthog-node@5.38.2/node_modules/posthog-node/dist/entrypoints/index.node.mjs
class PostHog extends PostHogBackendClient {
  getLibraryId() {
    return "posthog-node";
  }
  initializeContext() {
    return new PostHogContext;
  }
  createErrorPropertiesBuilder() {
    return new exports_error_tracking.ErrorPropertiesBuilder([
      new exports_error_tracking.EventCoercer,
      new exports_error_tracking.ErrorCoercer,
      new exports_error_tracking.ObjectCoercer,
      new exports_error_tracking.StringCoercer,
      new exports_error_tracking.PrimitiveCoercer
    ], exports_error_tracking.createStackParser("node:javascript", exports_error_tracking.nodeStackLineParser), [
      createModulerModifier(),
      addSourceContext2,
      createRelativePathModifier()
    ]);
  }
}

// src/lib/posthog.ts
var posthogClient = null;
function shouldDisableTracking() {
  if (process.env.VITEST === "true") {
    return true;
  }
  if (false) {}
  if (process.env.CI === "true") {
    return true;
  }
  if (process.env.POSTHOG_DISABLED === "true") {
    return true;
  }
  return false;
}
var noopClient = {
  capture: () => {},
  captureException: () => {},
  identify: () => {},
  flush: async () => {},
  shutdown: async () => {}
};
function getPostHogClient() {
  if (shouldDisableTracking()) {
    return noopClient;
  }
  if (!posthogClient) {
    const apiKey2 = process.env.POSTHOG_KEY;
    if (!apiKey2) {
      return noopClient;
    }
    posthogClient = new PostHog(apiKey2, {
      host: "https://us.i.posthog.com",
      flushAt: 1,
      flushInterval: 0
    });
  }
  return posthogClient;
}

// src/lib/activation-tracking.ts
async function emit(contactEmail, event, properties2) {
  try {
    const key = process.env.WRAPS_API_KEY;
    if (!key) {
      return;
    }
    const client = createPlatformClient({ apiKey: key });
    const { error: error49 } = await client.POST("/v1/events/", {
      body: { name: event, contactEmail, properties: properties2 }
    });
    if (error49) {
      log3.error("Activation event emit failed", error49, { event, contactEmail });
    }
  } catch (err) {
    log3.error("Activation event emit threw", err, { event, contactEmail });
  }
}
async function claimFirstEmailTracked(organizationId) {
  const [existing] = await db.select({ trackedAt: organizationExtension.activationFirstEmailTrackedAt }).from(organizationExtension).where(eq(organizationExtension.organizationId, organizationId)).limit(1);
  if (existing?.trackedAt) {
    return false;
  }
  const now = new Date;
  const claimed = await db.insert(organizationExtension).values({ organizationId, activationFirstEmailTrackedAt: now }).onConflictDoUpdate({
    target: organizationExtension.organizationId,
    set: { activationFirstEmailTrackedAt: now, updatedAt: now },
    setWhere: isNull(organizationExtension.activationFirstEmailTrackedAt)
  }).returning({ organizationId: organizationExtension.organizationId });
  return claimed.length > 0;
}
async function trackFirstEmailSent(organizationId, properties2, contactEmail) {
  try {
    if (!await claimFirstEmailTracked(organizationId)) {
      return;
    }
    const props = {
      organization_id: organizationId,
      channel: properties2.channel,
      source: properties2.source
    };
    const posthog = getPostHogClient();
    posthog.capture({
      distinctId: organizationId,
      event: "activation_first_email_sent",
      properties: props,
      groups: { organization: organizationId }
    });
    posthog.groupIdentify({
      groupType: "organization",
      groupKey: organizationId,
      properties: {
        activation_first_email_sent: true
      }
    });
    if (contactEmail) {
      await emit(contactEmail, "activation.first_email_sent", props);
    }
  } catch {}
}
async function trackFirstEmailDelivered(organizationId, source) {
  try {
    if (!await claimFirstEmailTracked(organizationId)) {
      return;
    }
    const props = {
      organization_id: organizationId,
      channel: "email",
      source
    };
    const posthog = getPostHogClient();
    posthog.capture({
      distinctId: organizationId,
      event: "activation_first_email_sent",
      properties: props,
      groups: { organization: organizationId }
    });
    posthog.groupIdentify({
      groupType: "organization",
      groupKey: organizationId,
      properties: {
        activation_first_email_sent: true,
        activation_email_source: source
      }
    });
    const ownerEmail = await getOrgOwnerEmail(organizationId);
    if (ownerEmail) {
      await emit(ownerEmail, "activation.first_email_sent", props);
    }
    log3.info("Activation: first email delivery tracked from webhook", {
      organizationId,
      source
    });
  } catch {}
}
async function getUserEmail(userId) {
  const [row2] = await db.select({ email: user.email }).from(user).where(eq(user.id, userId)).limit(1);
  return row2?.email ?? null;
}
async function getOrgOwnerEmail(organizationId) {
  const [row2] = await db.select({ email: user.email }).from(member).innerJoin(user, eq(user.id, member.userId)).where(and(eq(member.organizationId, organizationId), eq(member.role, "owner"))).limit(1);
  return row2?.email ?? null;
}
async function setContactProperties(userEmail, props) {
  try {
    const key = process.env.WRAPS_API_KEY;
    if (!key) {
      return;
    }
    const client = createPlatformClient({ apiKey: key });
    const searchResult = await client.GET("/v1/contacts/", {
      params: { query: { search: userEmail, pageSize: "10" } }
    });
    const contacts = searchResult.data?.contacts ?? [];
    const normalizedEmail = userEmail.toLowerCase().trim();
    const matched = contacts.find((c3) => typeof c3.email === "string" && c3.email.toLowerCase().trim() === normalizedEmail);
    if (matched) {
      await client.PATCH("/v1/contacts/{id}", {
        params: { path: { id: matched.id } },
        body: {
          properties: {
            ...typeof matched.properties === "object" && matched.properties !== null ? matched.properties : {},
            ...props
          }
        }
      });
    }
  } catch {}
}
async function trackFirstResourceCreated(organizationId, resource, source, userId, resourceName) {
  try {
    const table = resource === "template" ? template : workflow;
    const [r2] = await db.select({ count: count() }).from(table).where(eq(table.organizationId, organizationId));
    const userEmail = userId ? await getUserEmail(userId) : null;
    if (userEmail) {
      const contactProp = resource === "template" ? { hasCreatedTemplate: true } : { hasCreatedWorkflow: true };
      await setContactProperties(userEmail, contactProp);
    }
    if ((r2?.count ?? 0) !== 1) {
      return;
    }
    const eventName = resource === "template" ? "activation_first_template" : "activation_first_automation";
    const platformEvent = resource === "template" ? "activation.first_template" : "activation.first_automation";
    const props = {
      organization_id: organizationId,
      resource,
      source
    };
    if (resourceName) {
      props[resource === "template" ? "templateName" : "workflowName"] = resourceName;
    }
    const posthog = getPostHogClient();
    posthog.capture({
      distinctId: userEmail ?? organizationId,
      event: eventName,
      properties: props,
      groups: { organization: organizationId }
    });
    posthog.groupIdentify({
      groupType: "organization",
      groupKey: organizationId,
      properties: {
        [eventName]: true,
        [`${eventName}_source`]: source
      }
    });
    if (userEmail) {
      await emit(userEmail, platformEvent, props);
    }
    log3.info("Activation: first resource created", {
      organizationId,
      resource,
      source
    });
  } catch {}
}

// ../../packages/unsubscribe-token/src/index.ts
function getSecret2() {
  const secret = process.env.UNSUBSCRIBE_SECRET;
  if (!secret) {
    const isProduction = !!process.env.AWS_LAMBDA_FUNCTION_NAME || !!process.env.VERCEL_ENV;
    if (isProduction) {
      throw new Error("UNSUBSCRIBE_SECRET environment variable is required in production");
    }
    return new TextEncoder().encode("dev-unsubscribe-secret-change-in-production");
  }
  return new TextEncoder().encode(secret);
}
async function generateUnsubscribeToken(contactId, organizationId, topicId) {
  const payload = {
    cid: contactId,
    oid: organizationId,
    type: "unsub"
  };
  if (topicId) {
    payload.tid = topicId;
  }
  const token2 = await new SignJWT(payload).setProtectedHeader({ alg: "HS256" }).setIssuedAt().setExpirationTime("90d").sign(getSecret2());
  return token2;
}
async function verifyUnsubscribeToken(token2, log4) {
  try {
    const { payload } = await jwtVerify(token2, getSecret2());
    if (typeof payload.cid !== "string" || typeof payload.oid !== "string" || payload.type !== "unsub") {
      log4?.warn("Unsubscribe: invalid token payload structure");
      return null;
    }
    return {
      cid: payload.cid,
      oid: payload.oid,
      tid: typeof payload.tid === "string" ? payload.tid : undefined,
      type: "unsub"
    };
  } catch (error49) {
    if (error49 instanceof exports_errors2.JWTExpired) {
      log4?.info("Unsubscribe: token expired");
    } else if (error49 instanceof exports_errors2.JWTInvalid) {
      log4?.warn("Unsubscribe: invalid token");
    } else {
      log4?.error("Unsubscribe: token verification failed", error49);
    }
    return null;
  }
}

// src/lib/unsubscribe-token.ts
function verifyUnsubscribeToken2(token2) {
  return verifyUnsubscribeToken(token2, {
    info: (msg) => log3.info(msg),
    warn: (msg) => log3.warn(msg),
    error: (msg, err) => log3.error(msg, err)
  });
}

// src/services/credentials.ts
var import_client_sts2 = __toESM(require_dist_cjs62(), 1);
var stsClient = new import_client_sts2.STSClient(awsDefaults);
var credentialCache = new Map;
async function getCredentials(awsAccountId, organizationId) {
  const cacheKey = `${awsAccountId}:${organizationId}`;
  const cached2 = credentialCache.get(cacheKey);
  if (cached2 && cached2.expiresAt > Date.now() + 60000) {
    return cached2.credentials;
  }
  const [account2] = await db.select({
    roleArn: awsAccount.roleArn,
    externalId: awsAccount.externalId,
    region: awsAccount.region
  }).from(awsAccount).where(and(eq(awsAccount.id, awsAccountId), eq(awsAccount.organizationId, organizationId))).limit(1);
  if (!account2?.roleArn) {
    throw new Error(`AWS account ${awsAccountId} not found or not configured`);
  }
  const result = await stsClient.send(new import_client_sts2.AssumeRoleCommand({
    RoleArn: account2.roleArn,
    RoleSessionName: `wraps-api-${Date.now()}`,
    ExternalId: account2.externalId ?? undefined,
    DurationSeconds: 3600
  }));
  if (!result.Credentials) {
    throw new Error("Failed to assume role");
  }
  const credentials = {
    accessKeyId: result.Credentials.AccessKeyId,
    secretAccessKey: result.Credentials.SecretAccessKey,
    sessionToken: result.Credentials.SessionToken,
    expiration: result.Credentials.Expiration,
    region: account2.region
  };
  credentialCache.set(cacheKey, {
    credentials,
    expiresAt: credentials.expiration.getTime()
  });
  return credentials;
}

// src/(ee)/workers/workflow-utils.ts
import { lookup as dnsLookup } from "node:dns";

// ../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/index.js
var __filename = "/home/runner/work/wraps/wraps/node_modules/.pnpm/undici@7.28.0/node_modules/undici/index.js";
var Client4 = require_client5();
var Dispatcher = require_dispatcher();
var Pool3 = require_pool();
var BalancedPool = require_balanced_pool();
var RoundRobinPool = require_round_robin_pool();
var Agent3 = require_agent();
var ProxyAgent = require_proxy_agent();
var Socks5ProxyAgent = require_socks5_proxy_agent();
var EnvHttpProxyAgent = require_env_http_proxy_agent();
var RetryAgent = require_retry_agent();
var H2CClient = require_h2c_client();
var errors3 = require_errors8();
var util3 = require_util3();
var { InvalidArgumentError } = errors3;
var api3 = require_api();
var buildConnector = require_connect();
var MockClient = require_mock_client();
var { MockCallHistory, MockCallHistoryLog } = require_mock_call_history();
var MockAgent = require_mock_agent();
var MockPool = require_mock_pool();
var SnapshotAgent = require_snapshot_agent();
var mockErrors = require_mock_errors();
var RetryHandler = require_retry_handler();
var { getGlobalDispatcher, setGlobalDispatcher } = require_global2();
var DecoratorHandler = require_decorator_handler();
var RedirectHandler = require_redirect_handler();
Object.assign(Dispatcher.prototype, api3);
var $Agent = Agent3;
var $interceptors = {
  redirect: require_redirect(),
  responseError: require_response_error(),
  retry: require_retry2(),
  dump: require_dump(),
  dns: require_dns(),
  cache: require_cache2(),
  decompress: require_decompress(),
  deduplicate: require_deduplicate()
};
var $cacheStores = {
  MemoryCacheStore: require_memory_cache_store()
};
var SqliteCacheStore = require_sqlite_cache_store();
$cacheStores.SqliteCacheStore = SqliteCacheStore;
var $util = {
  parseHeaders: util3.parseHeaders,
  headerNameToString: util3.headerNameToString
};
function makeDispatcher(fn3) {
  return (url2, opts, handler) => {
    if (typeof opts === "function") {
      handler = opts;
      opts = null;
    }
    if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) {
      throw new InvalidArgumentError("invalid url");
    }
    if (opts != null && typeof opts !== "object") {
      throw new InvalidArgumentError("invalid opts");
    }
    if (opts && opts.path != null) {
      if (typeof opts.path !== "string") {
        throw new InvalidArgumentError("invalid opts.path");
      }
      let path2 = opts.path;
      if (!opts.path.startsWith("/")) {
        path2 = `/${path2}`;
      }
      url2 = new URL(util3.parseOrigin(url2).origin + path2);
    } else {
      if (!opts) {
        opts = typeof url2 === "object" ? url2 : {};
      }
      url2 = util3.parseURL(url2);
    }
    const { agent: agent2, dispatcher = getGlobalDispatcher() } = opts;
    if (agent2) {
      throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?");
    }
    return fn3.call(dispatcher, {
      ...opts,
      origin: url2.origin,
      path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname,
      method: opts.method || (opts.body ? "PUT" : "GET")
    }, handler);
  };
}
var fetchImpl = require_fetch().fetch;
var $Headers = require_headers().Headers;
var $Response = require_response().Response;
var $Request = require_request2().Request;
var $FormData = require_formdata().FormData;
var { setGlobalOrigin, getGlobalOrigin } = require_global();
var { CacheStorage } = require_cachestorage();
var { kConstruct } = require_symbols2();
var $caches = new CacheStorage(kConstruct);
var { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie: parseCookie2 } = require_cookies();
var { parseMIMEType, serializeAMimeType } = require_data_url();
var { CloseEvent, ErrorEvent, MessageEvent } = require_events();
var { WebSocket, ping } = require_websocket();
var $WebSocketStream = require_websocketstream().WebSocketStream;
var $WebSocketError = require_websocketerror().WebSocketError;
var $request = makeDispatcher(api3.request);
var $stream = makeDispatcher(api3.stream);
var $pipeline = makeDispatcher(api3.pipeline);
var $connect = makeDispatcher(api3.connect);
var $upgrade = makeDispatcher(api3.upgrade);
var { EventSource } = require_eventsource();

// src/(ee)/workers/workflow-utils.ts
function substituteVariables2(text3, data, options2 = {}) {
  try {
    return renderTemplateStrict(text3, data, {
      noEscape: !options2.escapeHtml
    });
  } catch (error49) {
    const reason = error49 instanceof Error ? error49.message : String(error49);
    log3.error("Workflow: template render failed, send blocked", {
      textPreview: text3.slice(0, 200),
      dataKeys: Object.keys(data),
      reason
    });
    throw new Error(`Template rendering failed: ${reason}. Send blocked so the recipient does not receive raw {{...}} template syntax — fix the template, then retry.`);
  }
}
function sanitizeEmailSubject(subject) {
  return subject.replace(/[\r\n]+/g, " ").replace(/\s+/g, " ").trim().slice(0, 998);
}
function htmlToPlainText2(html3) {
  return toPlainText2(html3);
}
function isValidE164Phone(phone) {
  const e164Regex = /^\+[1-9]\d{9,14}$/;
  return e164Regex.test(phone);
}
function evaluateCondition(fieldValue, operator, compareValue) {
  const strFieldValue = String(fieldValue ?? "");
  const strCompareValue = String(compareValue ?? "");
  switch (operator) {
    case "equals":
      return strFieldValue === strCompareValue;
    case "not_equals":
      return strFieldValue !== strCompareValue;
    case "contains":
      return strFieldValue.includes(strCompareValue);
    case "not_contains":
      return !strFieldValue.includes(strCompareValue);
    case "starts_with":
      return strFieldValue.startsWith(strCompareValue);
    case "ends_with":
      return strFieldValue.endsWith(strCompareValue);
    case "greater_than":
      return Number(fieldValue) > Number(compareValue);
    case "less_than":
      return Number(fieldValue) < Number(compareValue);
    case "greater_than_or_equals":
      return Number(fieldValue) >= Number(compareValue);
    case "less_than_or_equals":
      return Number(fieldValue) <= Number(compareValue);
    case "is_true":
      return fieldValue === true || strFieldValue === "true" || strFieldValue === "1";
    case "is_false":
      return fieldValue === false || fieldValue === null || fieldValue === undefined || strFieldValue === "false" || strFieldValue === "0" || strFieldValue === "";
    case "is_set":
      return fieldValue !== null && fieldValue !== undefined && fieldValue !== "";
    case "is_not_set":
      return fieldValue === null || fieldValue === undefined || fieldValue === "";
    default:
      log3.warn("Unknown condition operator", { operator });
      return false;
  }
}
var FIRST_CLASS_CONTACT_FIELDS = new Set([
  "preferredChannel",
  "firstName",
  "lastName",
  "company",
  "jobTitle"
]);
var BLOCKED_IPV4_RANGES = [
  { prefix: "127.", label: "loopback" },
  { prefix: "10.", label: "private (10/8)" },
  { prefix: "169.254.", label: "link-local/IMDS" },
  { prefix: "0.", label: "unspecified" }
];
function isBlockedIp(ip) {
  if (ip.startsWith("::ffff:")) {
    const v42 = ip.slice(7);
    if (v42.includes(".")) {
      return isBlockedIp(v42);
    }
  }
  for (const range of BLOCKED_IPV4_RANGES) {
    if (ip.startsWith(range.prefix)) {
      return range.label;
    }
  }
  if (ip.startsWith("100.")) {
    const second = Number.parseInt(ip.split(".")[1], 10);
    if (second >= 64 && second <= 127) {
      return "private (100.64/10 CGN)";
    }
  }
  if (ip.startsWith("172.")) {
    const second = Number.parseInt(ip.split(".")[1], 10);
    if (second >= 16 && second <= 31) {
      return "private (172.16/12)";
    }
  }
  if (ip.startsWith("192.168.")) {
    return "private (192.168/16)";
  }
  if (ip === "::1" || ip === "::") {
    return "loopback";
  }
  if (ip.startsWith("fe80:")) {
    return "link-local";
  }
  if (ip.startsWith("fd") || ip.startsWith("fc")) {
    return "private (ULA)";
  }
  return null;
}
async function validateWebhookUrl(url2) {
  const parsed = new URL(url2);
  if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
    throw new Error(`Webhook URL must use http(s), got ${parsed.protocol}`);
  }
  const dns = await import("node:dns/promises");
  const { address } = await dns.lookup(parsed.hostname);
  const blockedReason = isBlockedIp(address);
  if (blockedReason) {
    throw new Error(`Webhook URL resolves to blocked address (${blockedReason}): ${parsed.hostname} -> ${address}`);
  }
}
function assertResolvedIpAllowed(addresses) {
  for (const addr of addresses) {
    const blocked = isBlockedIp(addr);
    if (blocked) {
      throw new Error(`Connection to blocked address (${blocked}): ${addr}`);
    }
  }
}
function createSsrfSafeDispatcher() {
  return new $Agent({
    connect: {
      lookup(hostname4, options2, callback) {
        dnsLookup(hostname4, options2, (err, address, family) => {
          if (err) {
            callback(err, address, family);
            return;
          }
          const addresses = Array.isArray(address) ? address.map((a2) => typeof a2 === "string" ? a2 : a2.address) : [address];
          try {
            assertResolvedIpAllowed(addresses);
          } catch (blockErr) {
            callback(blockErr, address, family);
            return;
          }
          callback(null, address, family);
        });
      }
    }
  });
}

// src/(ee)/workers/workflow-step-handlers.ts
function isSESPermissionError(error49) {
  if (!(error49 instanceof Error)) {
    return false;
  }
  const msg = error49.message || "";
  const name3 = error49.name || "";
  return name3 === "AccessDeniedException" || name3 === "AccessDenied" || msg.includes("is not authorized to perform") || msg.includes("AccessDenied");
}
function sleep(ms2) {
  return new Promise((resolve3) => setTimeout(resolve3, ms2));
}
var SENSITIVE_KEY_PATTERN = /password|token|secret|api_key|apikey|credit_card|card_number|cvv|ssn|auth|authorization|bearer|private_key/i;
function isTransientDbError(error49) {
  if (!(error49 instanceof Error))
    return false;
  const code2 = error49.code ?? "";
  return code2.startsWith("08") || code2 === "57P01" || code2 === "57P02" || code2 === "40001" || code2 === "40P01";
}
async function handleSendEmail(config2, execution, contactRecord, organizationId) {
  if (!contactRecord.email) {
    log3.info("Workflow: contact has no email, skipping", {
      contactId: contactRecord.id
    });
    return {
      action: "next",
      data: {
        skipped: true,
        reason: "no_email",
        timestamp: new Date().toISOString()
      }
    };
  }
  if (contactRecord.emailStatus === "unsubscribed" || contactRecord.emailStatus === "bounced" || contactRecord.emailStatus === "complained") {
    log3.info("Workflow: contact email suppressed, skipping", {
      contactId: contactRecord.id,
      emailStatus: contactRecord.emailStatus
    });
    return {
      action: "next",
      data: {
        skipped: true,
        reason: `email_status_${contactRecord.emailStatus}`,
        timestamp: new Date().toISOString()
      }
    };
  }
  const [wf] = await db.select({
    awsAccountId: workflow.awsAccountId,
    defaultFrom: workflow.defaultFrom,
    defaultFromName: workflow.defaultFromName,
    defaultReplyTo: workflow.defaultReplyTo
  }).from(workflow).where(and(eq(workflow.id, execution.workflowId), eq(workflow.organizationId, organizationId))).limit(1);
  if (!wf?.awsAccountId) {
    log3.warn("Workflow: no AWS account configured", {
      workflowId: execution.workflowId
    });
    return {
      action: "next",
      data: {
        skipped: true,
        reason: "no_aws_account",
        timestamp: new Date().toISOString()
      }
    };
  }
  const [account2] = await db.select({ region: awsAccount.region, features: awsAccount.features }).from(awsAccount).where(eq(awsAccount.id, wf.awsAccountId)).limit(1);
  if (!account2) {
    throw new Error(`AWS account ${wf.awsAccountId} not found`);
  }
  const [tmpl] = await db.select({
    id: template.id,
    name: template.name,
    subject: template.subject,
    compiledHtml: template.compiledHtml,
    emailType: template.emailType,
    sesTemplateName: template.sesTemplateName
  }).from(template).where(and(eq(template.id, config2.templateId), eq(template.organizationId, organizationId))).limit(1);
  if (!tmpl) {
    throw new Error(`Template ${config2.templateId} not found`);
  }
  if (!tmpl.compiledHtml) {
    throw new Error(`Template ${config2.templateId} has no compiled HTML`);
  }
  const [org] = await db.select({ name: organization.name }).from(organization).where(eq(organization.id, organizationId)).limit(1);
  const credentials = await getCredentials(wf.awsAccountId, organizationId);
  const sesClient = new import_client_sesv24.SESv2Client({
    ...awsDefaults,
    region: account2.region,
    credentials: {
      accessKeyId: credentials.accessKeyId,
      secretAccessKey: credentials.secretAccessKey,
      sessionToken: credentials.sessionToken
    }
  });
  const replacementData = {
    email: contactRecord.email,
    contactEmail: contactRecord.email,
    firstName: contactRecord.firstName ?? "",
    lastName: contactRecord.lastName ?? "",
    company: contactRecord.company ?? "",
    jobTitle: contactRecord.jobTitle ?? "",
    contactFirstName: contactRecord.firstName ?? "",
    contactLastName: contactRecord.lastName ?? "",
    contactCompany: contactRecord.company ?? "",
    contactJobTitle: contactRecord.jobTitle ?? ""
  };
  const addIfPresent = (key, value) => {
    if (value) {
      replacementData[key] = value;
    }
  };
  addIfPresent("organizationName", org?.name);
  const properties2 = contactRecord.properties;
  if (properties2) {
    for (const [key, value] of Object.entries(properties2)) {
      const strValue = value != null ? String(value) : null;
      if (strValue) {
        replacementData[key] = strValue;
      }
    }
  }
  const triggerData = execution.triggerData;
  if (triggerData) {
    for (const [key, value] of Object.entries(triggerData)) {
      const strValue = value != null ? String(value) : null;
      if (strValue) {
        replacementData[key] = strValue;
      }
    }
  }
  const isMarketing = tmpl.emailType === "marketing";
  const apiBaseUrl = process.env.API_BASE_URL || "https://api.wraps.dev";
  const appBaseUrl = process.env.APP_BASE_URL || "https://app.wraps.dev";
  const unsubscribeToken = await generateUnsubscribeToken(contactRecord.id, organizationId);
  const unsubscribeUrl = `${apiBaseUrl}/unsubscribe/${unsubscribeToken}`;
  const preferencesUrl = `${appBaseUrl}/preferences/${unsubscribeToken}`;
  replacementData.unsubscribeUrl = unsubscribeUrl;
  replacementData.preferencesUrl = preferencesUrl;
  let fromAddress = config2.from || wf.defaultFrom;
  let fromName = config2.fromName || wf.defaultFromName;
  if (!fromAddress) {
    const [orgExt] = await db.select({
      defaultFrom: organizationExtension.defaultFrom,
      defaultFromName: organizationExtension.defaultFromName
    }).from(organizationExtension).where(eq(organizationExtension.organizationId, organizationId)).limit(1);
    fromAddress = orgExt?.defaultFrom ?? null;
    if (!fromName) {
      fromName = orgExt?.defaultFromName ?? null;
    }
  }
  if (!fromAddress) {
    log3.error("Workflow: no sender address configured", {
      workflowId: execution.workflowId,
      organizationId
    });
    return {
      action: "next",
      data: {
        skipped: true,
        reason: "no_sender_configured",
        error: "No sender email configured. Set a default sender in Settings > Sender Defaults.",
        timestamp: new Date().toISOString()
      }
    };
  }
  const fromDisplay = fromName ? `${fromName} <${fromAddress}>` : fromAddress;
  const replyTo = config2.replyTo || wf.defaultReplyTo;
  const configSetName = resolveConfigurationSetName({
    fromDomain: fromAddress.split("@").at(-1),
    storedConfigSetName: account2.features?.email?.configSetName,
    identities: account2.features?.email?.identities
  });
  const headers = [];
  if (isMarketing && unsubscribeUrl) {
    headers.push({ Name: "List-Unsubscribe", Value: `<${unsubscribeUrl}>` }, { Name: "List-Unsubscribe-Post", Value: "List-Unsubscribe=One-Click" });
  }
  const emailTags = [
    { Name: "workflowId", Value: execution.workflowId },
    { Name: "executionId", Value: execution.id },
    { Name: "organizationId", Value: organizationId },
    { Name: "templateId", Value: config2.templateId },
    { Name: "source", Value: "automation" }
  ];
  let sesTemplateName = tmpl.sesTemplateName;
  if (!sesTemplateName && tmpl.compiledHtml) {
    sesTemplateName = await autoPublishTemplate(tmpl, credentials, account2.region);
  }
  const baseSubject = config2.subject || tmpl.subject || "Message";
  let messageId;
  let subject;
  const marketing = isMarketing && unsubscribeUrl ? { unsubscribeUrl } : undefined;
  const sharedTags = emailTags.map((t2) => ({ name: t2.Name, value: t2.Value }));
  const canonicalVars = extractCanonicalVars(`${tmpl.subject ?? ""}
${tmpl.compiledHtml}`);
  for (const rawVar of canonicalVars) {
    const sesKey = toSesVariableName(rawVar);
    if (!(sesKey in replacementData)) {
      replacementData[sesKey] = "";
    }
  }
  try {
    if (sesTemplateName && !config2.subject) {
      subject = sanitizeEmailSubject(substituteVariables2(transformVariablesForSes(tmpl.subject || "Message"), replacementData));
      const response = await sesClient.send(new import_client_sesv24.SendEmailCommand({
        FromEmailAddress: fromDisplay,
        ReplyToAddresses: replyTo ? [replyTo] : undefined,
        Destination: {
          ToAddresses: [contactRecord.email]
        },
        Content: {
          Template: {
            TemplateName: sesTemplateName,
            TemplateData: JSON.stringify(replacementData),
            Headers: headers.length > 0 ? headers : undefined
          }
        },
        ConfigurationSetName: configSetName,
        EmailTags: emailTags
      }));
      if (!response.MessageId) {
        throw new Error("SES SendEmail returned no MessageId");
      }
      messageId = response.MessageId;
      log3.info("Workflow: email sent via SES template", {
        template: sesTemplateName,
        to: contactRecord.email
      });
    } else if (sesTemplateName && config2.subject) {
      const html3 = substituteVariables2(transformVariablesForSes(tmpl.compiledHtml), replacementData, { escapeHtml: true });
      const rawSubject = substituteVariables2(transformVariablesForSes(baseSubject), replacementData);
      subject = sanitizeEmailSubject(rawSubject);
      const result = await sendEmail2({
        client: sesClient,
        from: fromDisplay,
        to: contactRecord.email,
        subject,
        html: html3,
        text: htmlToPlainText2(html3),
        replyTo: replyTo ?? undefined,
        marketing,
        tags: sharedTags,
        configurationSetName: configSetName
      });
      messageId = result.messageId;
      log3.info("Workflow: email sent via raw HTML (subject override)", {
        to: contactRecord.email
      });
    } else {
      const html3 = substituteVariables2(transformVariablesForSes(tmpl.compiledHtml), replacementData, { escapeHtml: true });
      const rawSubject = substituteVariables2(transformVariablesForSes(baseSubject), replacementData);
      subject = sanitizeEmailSubject(rawSubject);
      const result = await sendEmail2({
        client: sesClient,
        from: fromDisplay,
        to: contactRecord.email,
        subject,
        html: html3,
        text: htmlToPlainText2(html3),
        replyTo: replyTo ?? undefined,
        marketing,
        tags: sharedTags,
        configurationSetName: configSetName
      });
      messageId = result.messageId;
      log3.info("Workflow: email sent via raw HTML", {
        to: contactRecord.email
      });
    }
  } catch (error49) {
    if (isSESPermissionError(error49)) {
      throw new Error("Your IAM role does not have permission to send emails. " + "Fix: update your CloudFormation stack to the latest version, " + "or run `wraps platform update-role` in the CLI.");
    }
    throw error49;
  }
  for (let attempt = 0;attempt < 3; attempt++) {
    try {
      await db.insert(messageSend).values({
        organizationId,
        contactId: contactRecord.id,
        awsAccountId: wf.awsAccountId,
        channel: "email",
        sourceType: "workflow",
        workflowExecutionId: execution.id,
        recipient: contactRecord.email,
        subject,
        from: fromAddress,
        fromName: fromName || null,
        emailTemplateId: config2.templateId,
        messageId,
        status: "sent",
        sentAt: new Date
      });
      break;
    } catch (dbError) {
      if (attempt < 2 && isTransientDbError(dbError)) {
        await sleep(100 * 2 ** attempt);
      } else {
        log3.error("Workflow: failed to record messageSend after 3 attempts", dbError, {
          executionId: execution.id,
          messageId,
          channel: "email"
        });
        throw dbError;
      }
    }
  }
  await trackFirstEmailSent(organizationId, { channel: "email", source: "workflow" }, contactRecord.email);
  await db.update(contact).set({
    lastEmailSentAt: new Date,
    emailsSent: sql`COALESCE(${contact.emailsSent}, 0) + 1`
  }).where(eq(contact.id, contactRecord.id));
  return {
    action: "next",
    data: {
      messageId,
      templateId: config2.templateId,
      recipient: contactRecord.email,
      subject,
      timestamp: new Date().toISOString()
    }
  };
}
async function autoPublishTemplate(tmpl, credentials, region) {
  try {
    const sesHtml = transformVariablesForSes(tmpl.compiledHtml);
    const sesText = normalizePlainTextForSes(htmlToPlainText2(sesHtml), sesHtml);
    const sesSubject = transformVariablesForSes(tmpl.subject || "Message");
    const sesTemplateName = generateSESTemplateName(tmpl.id, tmpl.name);
    await upsertSESTemplate(credentials, region, {
      templateName: sesTemplateName,
      subject: sesSubject,
      htmlPart: sesHtml,
      textPart: sesText
    });
    await db.update(template).set({
      sesTemplateName,
      publishedAt: new Date
    }).where(eq(template.id, tmpl.id));
    log3.info("Workflow: auto-published SES template", {
      templateId: tmpl.id,
      sesTemplateName
    });
    return sesTemplateName;
  } catch (error49) {
    log3.error("Workflow: auto-publish failed", error49);
    return null;
  }
}
async function handleSendSms(config2, execution, contactRecord, organizationId) {
  if (!contactRecord.phone) {
    log3.info("Workflow: contact has no phone, skipping SMS", {
      contactId: contactRecord.id
    });
    return {
      action: "next",
      data: {
        skipped: true,
        reason: "no_phone",
        timestamp: new Date().toISOString()
      }
    };
  }
  if (!isValidE164Phone(contactRecord.phone)) {
    log3.warn("Workflow: invalid phone format", {
      contactId: contactRecord.id,
      phone: contactRecord.phone
    });
    return {
      action: "next",
      data: {
        skipped: true,
        reason: "invalid_phone_format",
        phone: contactRecord.phone,
        timestamp: new Date().toISOString()
      }
    };
  }
  const [wf] = await db.select({
    awsAccountId: workflow.awsAccountId,
    defaultSenderId: workflow.defaultSenderId
  }).from(workflow).where(and(eq(workflow.id, execution.workflowId), eq(workflow.organizationId, organizationId))).limit(1);
  if (!wf?.awsAccountId) {
    log3.warn("Workflow: no AWS account configured for SMS", {
      workflowId: execution.workflowId
    });
    return {
      action: "next",
      data: {
        skipped: true,
        reason: "no_aws_account",
        timestamp: new Date().toISOString()
      }
    };
  }
  const [account2] = await db.select({ region: awsAccount.region }).from(awsAccount).where(eq(awsAccount.id, wf.awsAccountId)).limit(1);
  if (!account2) {
    throw new Error(`AWS account ${wf.awsAccountId} not found`);
  }
  const credentials = await getCredentials(wf.awsAccountId, organizationId);
  const smsClient = new import_client_pinpoint_sms_voice_v2.PinpointSMSVoiceV2Client({
    ...awsDefaults,
    region: account2.region,
    credentials: {
      accessKeyId: credentials.accessKeyId,
      secretAccessKey: credentials.secretAccessKey,
      sessionToken: credentials.sessionToken
    }
  });
  const rawBody = config2.body || "";
  if (!rawBody) {
    log3.warn("Workflow: SMS step has no message body");
    return {
      action: "next",
      data: {
        skipped: true,
        reason: "no_message_body",
        timestamp: new Date().toISOString()
      }
    };
  }
  const replacementData = {
    email: contactRecord.email ?? "",
    contactEmail: contactRecord.email ?? "",
    firstName: contactRecord.firstName ?? "",
    lastName: contactRecord.lastName ?? "",
    company: contactRecord.company ?? "",
    jobTitle: contactRecord.jobTitle ?? "",
    contactFirstName: contactRecord.firstName ?? "",
    contactLastName: contactRecord.lastName ?? "",
    contactCompany: contactRecord.company ?? "",
    contactJobTitle: contactRecord.jobTitle ?? "",
    phone: contactRecord.phone ?? ""
  };
  const _addIfPresent = (key, value) => {
    if (value) {
      replacementData[key] = value;
    }
  };
  const properties2 = contactRecord.properties;
  if (properties2) {
    for (const [key, value] of Object.entries(properties2)) {
      const strValue = value != null ? String(value) : null;
      if (strValue) {
        replacementData[key] = strValue;
      }
    }
  }
  const triggerData = execution.triggerData;
  if (triggerData) {
    for (const [key, value] of Object.entries(triggerData)) {
      const strValue = value != null ? String(value) : null;
      if (strValue) {
        replacementData[key] = strValue;
      }
    }
  }
  const normalizedBody = transformVariablesForSes(rawBody);
  const messageBody = substituteVariables2(normalizedBody, replacementData);
  const senderId = config2.senderId || wf.defaultSenderId;
  const command = new import_client_pinpoint_sms_voice_v2.SendTextMessageCommand({
    DestinationPhoneNumber: contactRecord.phone,
    MessageBody: messageBody,
    ConfigurationSetName: "wraps-sms-config",
    MessageType: "TRANSACTIONAL",
    ...senderId && { OriginationIdentity: senderId }
  });
  const response = await smsClient.send(command);
  const smsMessageId = response.MessageId ?? crypto.randomUUID();
  log3.info("Workflow: SMS sent", {
    to: contactRecord.phone,
    messageId: smsMessageId
  });
  for (let attempt = 0;attempt < 3; attempt++) {
    try {
      await db.insert(messageSend).values({
        organizationId,
        contactId: contactRecord.id,
        awsAccountId: wf.awsAccountId,
        channel: "sms",
        sourceType: "workflow",
        workflowExecutionId: execution.id,
        recipient: contactRecord.phone,
        subject: null,
        from: senderId || null,
        fromName: null,
        messageId: smsMessageId,
        status: "sent",
        sentAt: new Date
      });
      break;
    } catch (dbError) {
      if (attempt < 2 && isTransientDbError(dbError)) {
        await sleep(100 * 2 ** attempt);
      } else {
        log3.error("Workflow: failed to record messageSend after 3 attempts", dbError, {
          executionId: execution.id,
          messageId: smsMessageId,
          channel: "sms"
        });
        throw dbError;
      }
    }
  }
  await db.update(contact).set({
    lastSmsSentAt: new Date,
    smsSent: sql`COALESCE(${contact.smsSent}, 0) + 1`
  }).where(eq(contact.id, contactRecord.id));
  return {
    action: "next",
    data: {
      messageId: smsMessageId,
      recipient: contactRecord.phone,
      body: messageBody,
      timestamp: new Date().toISOString()
    }
  };
}
async function handleDelay(config2, execution, stepId, organizationId, completeExecution) {
  let delaySeconds = config2.amount;
  switch (config2.unit) {
    case "minutes":
      delaySeconds *= 60;
      break;
    case "hours":
      delaySeconds *= 3600;
      break;
    case "days":
      delaySeconds *= 86400;
      break;
    case "weeks":
      delaySeconds *= 604800;
      break;
  }
  const snapshot = execution.definitionSnapshot;
  let transitions;
  if (snapshot) {
    transitions = snapshot.transitions;
  } else {
    const [wf] = await db.select().from(workflow).where(and(eq(workflow.id, execution.workflowId), eq(workflow.organizationId, organizationId))).limit(1);
    transitions = wf?.transitions;
  }
  const nextTransition = transitions?.find((t2) => t2.fromStepId === stepId);
  if (!nextTransition) {
    await completeExecution(execution.id);
    return { action: "wait" };
  }
  const schedulerName = await scheduleWorkflowStep({
    executionId: execution.id,
    stepId: nextTransition.toStepId,
    organizationId,
    delaySeconds
  });
  await db.update(workflowExecution).set({
    status: "paused",
    nextStepScheduledAt: new Date(Date.now() + delaySeconds * 1000),
    delaySchedulerName: schedulerName,
    updatedAt: new Date
  }).where(eq(workflowExecution.id, execution.id));
  return { action: "wait" };
}
async function handleCondition(config2, contactRecord, execution, step) {
  if (config2.field === CASCADE_ENGAGEMENT_FIELD) {
    const cascadeGroupId = step.cascadeGroupId;
    const waitStepFilter = cascadeGroupId ? sql`${workflowStepExecution.stepId} LIKE ${`${cascadeGroupId}-wait-%`}` : undefined;
    const previousWaitStep = await db.select({ branch: workflowStepExecution.branch }).from(workflowStepExecution).where(and(eq(workflowStepExecution.executionId, execution.id), eq(workflowStepExecution.stepType, "wait_for_email_engagement"), eq(workflowStepExecution.status, "completed"), waitStepFilter)).orderBy(sql`${workflowStepExecution.completedAt} DESC`).limit(1);
    const engaged = previousWaitStep[0]?.branch === "opened" || previousWaitStep[0]?.branch === "clicked";
    const fieldValue2 = String(engaged);
    const conditionMet2 = evaluateCondition(fieldValue2, config2.operator, config2.value);
    return {
      action: "next",
      branch: conditionMet2 ? "yes" : "no"
    };
  }
  const properties2 = contactRecord.properties;
  const triggerData = execution.triggerData;
  let field = config2.field;
  if (field.startsWith("contact.")) {
    field = field.slice("contact.".length);
  }
  if (field.startsWith("properties.")) {
    field = field.slice("properties.".length);
  }
  let fieldValue;
  if (field in contactRecord) {
    fieldValue = contactRecord[field];
  } else if (properties2 && field in properties2) {
    fieldValue = properties2[field];
  } else if (triggerData && field in triggerData) {
    fieldValue = triggerData[field];
  }
  const conditionMet = evaluateCondition(fieldValue, config2.operator, config2.value);
  return {
    action: "next",
    branch: conditionMet ? "yes" : "no"
  };
}
async function handleUpdateContact(config2, contactRecord) {
  const updates = config2.updates || [];
  const currentProperties = contactRecord.properties || {};
  const newProperties = { ...currentProperties };
  const directUpdates = {};
  for (const update of updates) {
    const isFirstClass = FIRST_CLASS_CONTACT_FIELDS.has(update.field);
    switch (update.operation) {
      case "set":
        if (isFirstClass) {
          switch (update.field) {
            case "preferredChannel":
              directUpdates.preferredChannel = update.value;
              break;
            case "firstName":
              directUpdates.firstName = update.value;
              break;
            case "lastName":
              directUpdates.lastName = update.value;
              break;
            case "company":
              directUpdates.company = update.value;
              break;
            case "jobTitle":
              directUpdates.jobTitle = update.value;
              break;
          }
        } else {
          newProperties[update.field] = update.value;
        }
        break;
      case "unset":
        if (isFirstClass) {
          switch (update.field) {
            case "preferredChannel":
              directUpdates.preferredChannel = null;
              break;
            case "firstName":
              directUpdates.firstName = null;
              break;
            case "lastName":
              directUpdates.lastName = null;
              break;
            case "company":
              directUpdates.company = null;
              break;
            case "jobTitle":
              directUpdates.jobTitle = null;
              break;
          }
        } else {
          delete newProperties[update.field];
        }
        break;
      case "increment":
        newProperties[update.field] = (Number(newProperties[update.field]) || 0) + Number(update.value);
        break;
      case "decrement":
        newProperties[update.field] = (Number(newProperties[update.field]) || 0) - Number(update.value);
        break;
      case "append": {
        const arr = Array.isArray(newProperties[update.field]) ? newProperties[update.field] : [];
        arr.push(update.value);
        newProperties[update.field] = arr;
        break;
      }
      case "remove":
        if (Array.isArray(newProperties[update.field])) {
          newProperties[update.field] = newProperties[update.field].filter((v5) => v5 !== update.value);
        }
        break;
    }
  }
  await db.update(contact).set({
    ...directUpdates,
    properties: newProperties,
    updatedAt: new Date
  }).where(and(eq(contact.id, contactRecord.id), eq(contact.organizationId, contactRecord.organizationId)));
  return {
    action: "next",
    data: { updatedFields: updates.map((u2) => u2.field) }
  };
}
var FORBIDDEN_WEBHOOK_HEADERS = new Set([
  "host",
  "content-length",
  "transfer-encoding",
  "connection"
]);
function sanitizeWebhookHeaders(custom2) {
  const out = { "Content-Type": "application/json" };
  for (const [key, value] of Object.entries(custom2 ?? {})) {
    if (FORBIDDEN_WEBHOOK_HEADERS.has(key.toLowerCase())) {
      continue;
    }
    if (/[\r\n\0]/.test(key) || /[\r\n\0]/.test(value)) {
      continue;
    }
    out[key] = value;
  }
  return out;
}
async function handleWebhook(config2, contactRecord, execution) {
  try {
    await validateWebhookUrl(config2.url);
  } catch (error49) {
    log3.error("Webhook SSRF blocked", error49, { url: config2.url });
    return {
      action: "next",
      data: {
        error: error49 instanceof Error ? error49.message : "Invalid webhook URL",
        blocked: true
      }
    };
  }
  const allProperties = contactRecord.properties ?? {};
  const droppedKeys = Object.keys(allProperties).filter((key) => SENSITIVE_KEY_PATTERN.test(key));
  if (droppedKeys.length > 0) {
    log3.warn("Webhook: sensitive contact property keys omitted from payload", {
      executionId: execution.id,
      droppedKeys
    });
  }
  const filteredProperties = Object.fromEntries(Object.entries(allProperties).filter(([key]) => !SENSITIVE_KEY_PATTERN.test(key)));
  const body2 = {
    contact: {
      id: contactRecord.id,
      email: contactRecord.email,
      properties: filteredProperties
    },
    execution: {
      id: execution.id,
      workflowId: execution.workflowId,
      triggerData: execution.triggerData
    },
    ...config2.body || {}
  };
  const dispatcher = createSsrfSafeDispatcher();
  try {
    const fetchOptions = {
      method: config2.method,
      headers: sanitizeWebhookHeaders(config2.headers),
      body: config2.method !== "GET" ? JSON.stringify(body2) : undefined,
      signal: AbortSignal.timeout(1e4),
      redirect: "manual",
      dispatcher
    };
    const response = await fetch(config2.url, fetchOptions);
    if (response.status >= 300 && response.status < 400) {
      log3.warn("Webhook redirect blocked", {
        url: config2.url,
        status: response.status
      });
      return {
        action: "next",
        data: { error: "Webhook redirect blocked", blocked: true }
      };
    }
    return {
      action: "next",
      data: { status: response.status, ok: response.ok }
    };
  } catch (error49) {
    log3.error("Webhook failed", error49);
    return {
      action: "next",
      data: {
        error: error49 instanceof Error ? error49.message : "Webhook failed"
      }
    };
  }
}
async function handleWaitForEvent(config2, execution, stepId, organizationId) {
  const timeoutSeconds = config2.timeoutSeconds || 86400;
  const timeoutAt = new Date(Date.now() + timeoutSeconds * 1000);
  const schedulerName = await scheduleWaitTimeout({
    executionId: execution.id,
    stepId,
    organizationId,
    timeoutSeconds
  });
  await db.update(workflowExecution).set({
    status: "waiting",
    waitingForEvent: config2.eventName,
    waitTimeoutAt: timeoutAt,
    waitTimeoutSchedulerName: schedulerName,
    updatedAt: new Date
  }).where(eq(workflowExecution.id, execution.id));
  return { action: "wait" };
}
async function handleWaitForEmailEngagement(config2, execution, step, organizationId) {
  const timeoutSeconds = config2.timeoutSeconds || 259200;
  const timeoutAt = new Date(Date.now() + timeoutSeconds * 1000);
  const cascadeGroupId = step.cascadeGroupId;
  const sendStepFilter = cascadeGroupId ? sql`${workflowStepExecution.stepId} LIKE ${`${cascadeGroupId}-send-%`}` : undefined;
  const previousStepExecs = await db.select().from(workflowStepExecution).where(and(eq(workflowStepExecution.executionId, execution.id), eq(workflowStepExecution.stepType, "send_email"), eq(workflowStepExecution.status, "completed"), sendStepFilter)).orderBy(sql`${workflowStepExecution.completedAt} DESC`).limit(1);
  const lastEmailStep = previousStepExecs[0];
  const messageId = lastEmailStep?.result ? lastEmailStep.result.messageId : undefined;
  const schedulerName = await scheduleWaitTimeout({
    executionId: execution.id,
    stepId: step.id,
    organizationId,
    timeoutSeconds
  });
  await db.update(workflowExecution).set({
    status: "waiting",
    waitingForEvent: `email_engagement:${messageId || "unknown"}`,
    waitTimeoutAt: timeoutAt,
    waitTimeoutSchedulerName: schedulerName,
    updatedAt: new Date
  }).where(eq(workflowExecution.id, execution.id));
  return { action: "wait" };
}
async function handleSubscribeTopic(config2, contactRecord) {
  await db.insert(contactTopic).values({
    contactId: contactRecord.id,
    topicId: config2.topicId,
    status: "subscribed",
    subscribedAt: new Date
  }).onConflictDoUpdate({
    target: [contactTopic.contactId, contactTopic.topicId],
    set: {
      status: "subscribed",
      subscribedAt: new Date,
      unsubscribedAt: null
    }
  });
  return {
    action: "next",
    data: {
      topicId: config2.topicId,
      channel: config2.channel,
      action: "subscribed"
    }
  };
}
async function handleUnsubscribeTopic(config2, contactRecord) {
  await db.update(contactTopic).set({
    status: "unsubscribed",
    unsubscribedAt: new Date
  }).where(and(eq(contactTopic.contactId, contactRecord.id), eq(contactTopic.topicId, config2.topicId)));
  return {
    action: "next",
    data: {
      topicId: config2.topicId,
      channel: config2.channel,
      action: "unsubscribed"
    }
  };
}

// src/(ee)/workers/workflow-processor.ts
var STEP_EXECUTION_TIMEOUT_MINUTES = 15;
var EXECUTION_LIFETIME_MS = 30 * 24 * 60 * 60 * 1000;
var TERMINAL_STATUSES = ["cancelled", "completed", "failed"];
var handler = async (event) => {
  const results = await Promise.allSettled(event.Records.map(async (record2) => {
    const job = JSON.parse(record2.body);
    switch (job.type) {
      case "execute":
        await processStep(job.executionId, job.stepId);
        break;
      case "resume":
        await resumeExecution(job.executionId, job.branch);
        break;
      case "trigger":
        await triggerWorkflow(job.workflowId, job.contactId, job.organizationId, job.eventData);
        break;
      case "schedule-trigger":
        await processScheduleTrigger(job.workflowId, job.organizationId);
        break;
    }
  }));
  const batchItemFailures = results.map((result, idx) => {
    if (result.status === "rejected") {
      log3.error("Error processing workflow job", result.reason);
      return { itemIdentifier: event.Records[idx].messageId };
    }
    return null;
  }).filter((f4) => f4 !== null);
  await flushLogger();
  return { batchItemFailures };
};
async function triggerWorkflow(workflowId, contactId, organizationId, eventData) {
  const [wf] = await db.select().from(workflow).where(and(eq(workflow.id, workflowId), eq(workflow.organizationId, organizationId))).limit(1);
  if (!wf || wf.status !== "enabled") {
    log3.warn("Workflow not found or not enabled", { workflowId });
    return;
  }
  if (!wf.allowReentry && wf.reentryDelaySeconds && wf.reentryDelaySeconds > 0) {
    const reentryCutoff = new Date(Date.now() - wf.reentryDelaySeconds * 1000);
    const recentlyCompleted = await db.query.workflowExecution.findFirst({
      where: and(eq(workflowExecution.workflowId, workflowId), eq(workflowExecution.contactId, contactId), eq(workflowExecution.status, "completed"), sql`${workflowExecution.completedAt} > ${reentryCutoff}`)
    });
    if (recentlyCompleted) {
      log3.info("Workflow skip: reentry delay", {
        contactId,
        workflowId,
        reentryDelaySeconds: wf.reentryDelaySeconds
      });
      await incrementDroppedExecutions(workflowId);
      return;
    }
  }
  if (wf.contactCooldownSeconds && wf.contactCooldownSeconds > 0) {
    const cooldownCutoff = new Date(Date.now() - wf.contactCooldownSeconds * 1000);
    const recentExecution = await db.query.workflowExecution.findFirst({
      where: and(eq(workflowExecution.organizationId, organizationId), eq(workflowExecution.contactId, contactId), sql`${workflowExecution.createdAt} > ${cooldownCutoff}`)
    });
    if (recentExecution) {
      log3.info("Workflow skip: contact cooldown", {
        contactId,
        cooldownSeconds: wf.contactCooldownSeconds
      });
      await incrementDroppedExecutions(workflowId);
      return;
    }
  }
  if (wf.maxConcurrentExecutions && wf.maxConcurrentExecutions > 0) {
    const [{ count: count2 }] = await db.select({ count: sql`count(*)::int` }).from(workflowExecution).where(and(eq(workflowExecution.workflowId, workflowId), eq(workflowExecution.organizationId, organizationId), sql`${workflowExecution.status} IN ('pending', 'active', 'paused', 'waiting')`));
    if (count2 >= wf.maxConcurrentExecutions) {
      log3.info("Workflow skip: max concurrent", {
        workflowId,
        current: count2,
        max: wf.maxConcurrentExecutions
      });
      await incrementDroppedExecutions(workflowId);
      return;
    }
  }
  const steps = wf.steps;
  const transitions = wf.transitions;
  const triggerStep = steps.find((s3) => s3.type === "trigger");
  if (!triggerStep) {
    log3.error("No trigger step found in workflow", undefined, { workflowId });
    return;
  }
  const firstTransition = transitions.find((t2) => t2.fromStepId === triggerStep.id);
  const firstStepId = firstTransition?.toStepId;
  if (!firstStepId) {
    log3.warn("Workflow has no steps after trigger", { workflowId });
    return;
  }
  const definitionSnapshot = {
    steps,
    transitions,
    workflowVersion: wf.version
  };
  const execution = await db.transaction(async (tx) => {
    const [row2] = await tx.insert(workflowExecution).values({
      workflowId,
      contactId,
      organizationId,
      allowReentry: wf.allowReentry,
      status: "active",
      currentStepId: firstStepId,
      definitionSnapshot,
      triggerData: eventData ?? {},
      startedAt: new Date
    }).onConflictDoNothing().returning();
    if (!row2) {
      return null;
    }
    await tx.update(workflow).set({
      totalExecutions: sql`${workflow.totalExecutions} + 1`,
      activeExecutions: sql`${workflow.activeExecutions} + 1`,
      lastTriggeredAt: new Date
    }).where(eq(workflow.id, workflowId));
    return row2;
  });
  if (!execution) {
    log3.info("Workflow skip: duplicate execution", { contactId, workflowId });
    await incrementDroppedExecutions(workflowId);
    return;
  }
  await enqueueWorkflowStep({
    type: "execute",
    executionId: execution.id,
    stepId: firstStepId,
    organizationId
  });
}
var MAX_CONTACTS_PER_TRIGGER = 1000;
async function processScheduleTrigger(workflowId, organizationId) {
  const now = new Date;
  const [wf] = await db.select().from(workflow).where(and(eq(workflow.id, workflowId), eq(workflow.organizationId, organizationId))).limit(1);
  if (!wf) {
    log3.info("Schedule trigger: workflow not found, chain stops", {
      workflowId
    });
    return;
  }
  if (wf.status !== "enabled" || wf.triggerType !== "schedule") {
    log3.info("Schedule trigger: workflow not eligible, chain stops", {
      workflowId,
      status: wf.status,
      triggerType: wf.triggerType
    });
    return;
  }
  const config2 = wf.triggerConfig;
  if (!config2.schedule) {
    log3.info("Schedule trigger: no cron schedule, chain stops", { workflowId });
    return;
  }
  log3.info("Schedule trigger: processing workflow", {
    workflowId,
    workflowName: wf.name
  });
  let contacts;
  if (config2.segmentId) {
    contacts = await getSegmentContacts(config2.segmentId, organizationId);
  } else {
    contacts = await db.select({ id: contact.id }).from(contact).where(and(eq(contact.organizationId, organizationId), eq(contact.status, "active"))).limit(MAX_CONTACTS_PER_TRIGGER);
  }
  log3.info("Schedule trigger: triggering workflow for contacts", {
    workflowId,
    contactCount: contacts.length
  });
  if (contacts.length === MAX_CONTACTS_PER_TRIGGER) {
    log3.warn("Schedule trigger: contact list truncated — some contacts may not be triggered", { workflowId, contactCount: contacts.length });
  }
  await enqueueWorkflowStepBatch(contacts.map((c3) => ({
    type: "trigger",
    workflowId,
    contactId: c3.id,
    organizationId,
    eventData: {
      triggerType: "schedule",
      triggeredAt: now.toISOString(),
      cronExpression: config2.schedule
    }
  })));
  await db.update(workflow).set({ lastTriggeredAt: now }).where(eq(workflow.id, workflowId));
  try {
    await createNextWorkflowSchedule({
      workflowId,
      organizationId,
      cronExpression: config2.schedule,
      timezone: config2.timezone
    });
    log3.info("Schedule trigger: complete, next schedule chained", {
      workflowId,
      executionsTriggered: contacts.length
    });
  } catch (chainError) {
    log3.error("Schedule trigger: CHAIN BROKEN — failed to create next schedule", chainError, {
      workflowId,
      organizationId,
      cronExpression: config2.schedule,
      chainBroken: true
    });
  }
}
async function getSegmentContacts(segmentId, organizationId) {
  const [seg] = await db.select({ condition: segment.condition }).from(segment).where(eq(segment.id, segmentId)).limit(1);
  if (!seg) {
    log3.warn("Schedule trigger: segment not found", { segmentId });
    return [];
  }
  const allContacts = await db.select({ id: contact.id }).from(contact).where(and(eq(contact.organizationId, organizationId), eq(contact.status, "active"))).limit(MAX_CONTACTS_PER_TRIGGER);
  if (allContacts.length === 0) {
    return [];
  }
  log3.info("Schedule trigger: evaluating segment", {
    segmentId,
    contactCount: allContacts.length
  });
  const matchingIds = await contactIdsMatchingCondition(db, allContacts.map((c3) => c3.id), organizationId, seg.condition);
  const matchingIdSet = new Set(matchingIds);
  const matchingContacts = allContacts.filter((c3) => matchingIdSet.has(c3.id));
  log3.info("Schedule trigger: segment evaluation complete", {
    segmentId,
    matchingCount: matchingContacts.length
  });
  return matchingContacts;
}
async function processStep(executionId, stepId) {
  const execution = await db.query.workflowExecution.findFirst({
    where: eq(workflowExecution.id, executionId)
  });
  if (!execution) {
    log3.error("Execution not found", undefined, { executionId });
    return;
  }
  if (execution.status === "cancelled" || execution.status === "completed" || execution.status === "failed") {
    log3.info("processStep: stale execution status, skipping", {
      executionId,
      status: execution.status
    });
    return;
  }
  const [wf] = await db.select().from(workflow).where(and(eq(workflow.id, execution.workflowId), eq(workflow.organizationId, execution.organizationId))).limit(1);
  if (!wf) {
    log3.error("Workflow not found", undefined, {
      workflowId: execution.workflowId
    });
    return;
  }
  const [contactRecord] = await db.select().from(contact).where(and(eq(contact.id, execution.contactId), eq(contact.organizationId, execution.organizationId))).limit(1);
  if (!contactRecord) {
    log3.error("Contact not found", undefined, {
      contactId: execution.contactId
    });
    await failExecution(executionId, "Contact not found", stepId);
    return;
  }
  const snapshot = execution.definitionSnapshot;
  const steps = snapshot?.steps ?? wf.steps;
  const step = steps.find((s3) => s3.id === stepId);
  if (!step) {
    log3.error("Step not found in workflow", undefined, { stepId });
    await failExecution(executionId, `Step ${stepId} not found`, stepId);
    return;
  }
  const idempotencyKey = `${executionId}-${stepId}`;
  const [stepExec] = await db.insert(workflowStepExecution).values({
    executionId,
    stepId,
    stepType: step.type,
    status: "executing",
    idempotencyKey,
    startedAt: new Date
  }).onConflictDoUpdate({
    target: workflowStepExecution.idempotencyKey,
    set: {
      status: sql`'executing'`,
      startedAt: sql`${new Date().toISOString()}::timestamp`,
      error: null,
      completedAt: null
    },
    setWhere: sql`${workflowStepExecution.status} NOT IN ('executing', 'completed') OR (${workflowStepExecution.status} = 'executing' AND ${workflowStepExecution.startedAt} < NOW() - INTERVAL '${sql.raw(String(STEP_EXECUTION_TIMEOUT_MINUTES))} minutes')`
  }).returning();
  if (!stepExec) {
    log3.info("Step already executing or completed", { stepId, executionId });
    return;
  }
  if (stepExec.createdAt && Date.now() - new Date(stepExec.createdAt).getTime() > STEP_EXECUTION_TIMEOUT_MINUTES * 60 * 1000) {
    log3.warn("Step reclaimed after execution timeout", {
      stepId,
      executionId,
      staleMinutes: Math.round((Date.now() - new Date(stepExec.createdAt).getTime()) / 60000)
    });
  }
  const [claimedExecution] = await db.update(workflowExecution).set({ currentStepId: stepId, status: "active", updatedAt: new Date }).where(and(eq(workflowExecution.id, executionId), notInArray(workflowExecution.status, [...TERMINAL_STATUSES]))).returning();
  if (!claimedExecution) {
    log3.warn("processStep: atomic claim failed — execution in terminal state", {
      executionId,
      stepId
    });
    return;
  }
  if (claimedExecution.createdAt && Date.now() - new Date(claimedExecution.createdAt).getTime() > EXECUTION_LIFETIME_MS) {
    log3.warn("processStep: execution lifetime exceeded, failing", {
      executionId,
      stepId
    });
    await failExecution(executionId, "execution lifetime exceeded", stepId);
    return;
  }
  try {
    const result = await executeStep(step, execution, contactRecord, wf.organizationId);
    await db.update(workflowStepExecution).set({
      status: "completed",
      branch: result.branch,
      result: result.data,
      completedAt: new Date
    }).where(eq(workflowStepExecution.id, stepExec.id));
    const snapshotWf = snapshot ? { ...wf, steps, transitions: snapshot.transitions } : wf;
    if (result.action === "next") {
      await processNextStep(execution, step, snapshotWf, result.branch);
    } else if (result.action === "wait") {} else if (result.action === "exit") {
      await completeExecution(executionId);
    }
  } catch (error49) {
    const errorMessage = error49 instanceof Error ? error49.message : String(error49);
    log3.error("Step failed", error49, { stepId, executionId });
    await db.update(workflowStepExecution).set({
      status: "failed",
      error: errorMessage,
      completedAt: new Date
    }).where(eq(workflowStepExecution.id, stepExec.id));
    await failExecution(executionId, errorMessage, stepId);
  }
}
async function executeStep(step, execution, contactRecord, organizationId) {
  const config2 = step.config;
  switch (config2.type) {
    case "trigger":
      return { action: "next" };
    case "send_email":
      return await handleSendEmail(config2, execution, contactRecord, organizationId);
    case "send_sms":
      return await handleSendSms(config2, execution, contactRecord, organizationId);
    case "delay":
      return await handleDelay(config2, execution, step.id, organizationId, completeExecution);
    case "condition":
      return await handleCondition(config2, contactRecord, execution, step);
    case "update_contact":
      return await handleUpdateContact(config2, contactRecord);
    case "webhook":
      return await handleWebhook(config2, contactRecord, execution);
    case "wait_for_event":
      return await handleWaitForEvent(config2, execution, step.id, organizationId);
    case "wait_for_email_engagement":
      return await handleWaitForEmailEngagement(config2, execution, step, organizationId);
    case "subscribe_topic":
      return await handleSubscribeTopic(config2, contactRecord);
    case "unsubscribe_topic":
      return await handleUnsubscribeTopic(config2, contactRecord);
    case "exit":
      return { action: "exit" };
    default:
      throw new Error(`Unknown step type: ${config2.type}`);
  }
}
async function processNextStep(execution, currentStep, wf, branch) {
  const transitions = wf.transitions;
  let nextTransition;
  if (branch) {
    nextTransition = transitions.find((t2) => t2.fromStepId === currentStep.id && t2.condition?.branch === branch);
  }
  if (!nextTransition) {
    nextTransition = transitions.find((t2) => t2.fromStepId === currentStep.id && !t2.condition);
  }
  if (!nextTransition) {
    await completeExecution(execution.id);
    return;
  }
  await enqueueWorkflowStep({
    type: "execute",
    executionId: execution.id,
    stepId: nextTransition.toStepId,
    organizationId: wf.organizationId
  });
}
async function resumeExecution(executionId, branch) {
  const [claimed] = await db.update(workflowExecution).set({
    status: "active",
    waitingForEvent: null,
    waitTimeoutAt: null,
    delaySchedulerName: null,
    updatedAt: new Date
  }).where(and(eq(workflowExecution.id, executionId), eq(workflowExecution.status, "waiting"))).returning();
  if (!claimed) {
    log3.info("Execution already claimed by another handler", {
      executionId,
      branch
    });
    return;
  }
  if (branch !== "timeout" && claimed.waitTimeoutSchedulerName) {
    try {
      await deleteScheduledStep(claimed.waitTimeoutSchedulerName);
    } catch (err) {
      log3.warn("resumeExecution: failed to delete timeout scheduler (continuing)", {
        executionId,
        schedulerName: claimed.waitTimeoutSchedulerName,
        error: err instanceof Error ? err.message : String(err)
      });
    }
  }
  const [wf] = await db.select().from(workflow).where(and(eq(workflow.id, claimed.workflowId), eq(workflow.organizationId, claimed.organizationId))).limit(1);
  if (!wf) {
    log3.error("Workflow not found", undefined, {
      workflowId: claimed.workflowId
    });
    await failExecution(executionId, "Workflow not found", claimed.currentStepId ?? "unknown");
    return;
  }
  const snapshot = claimed.definitionSnapshot;
  const steps = snapshot?.steps ?? wf.steps;
  const currentStep = steps.find((s3) => s3.id === claimed.currentStepId);
  if (!currentStep) {
    log3.error("Current step not found", undefined, {
      stepId: claimed.currentStepId
    });
    await failExecution(executionId, `Step ${claimed.currentStepId} not found`, claimed.currentStepId ?? "unknown");
    return;
  }
  await db.update(workflowStepExecution).set({
    status: "completed",
    branch,
    completedAt: new Date
  }).where(and(eq(workflowStepExecution.executionId, executionId), eq(workflowStepExecution.stepId, currentStep.id)));
  const snapshotWf = snapshot ? { ...wf, steps, transitions: snapshot.transitions } : wf;
  await processNextStep(claimed, currentStep, snapshotWf, branch);
}
async function completeExecution(executionId) {
  await db.transaction(async (tx) => {
    const [execution] = await tx.update(workflowExecution).set({
      status: "completed",
      completedAt: new Date,
      updatedAt: new Date
    }).where(and(eq(workflowExecution.id, executionId), notInArray(workflowExecution.status, [...TERMINAL_STATUSES]))).returning();
    if (execution) {
      await tx.update(workflow).set({
        activeExecutions: sql`GREATEST(0, ${workflow.activeExecutions} - 1)`,
        completedExecutions: sql`${workflow.completedExecutions} + 1`
      }).where(eq(workflow.id, execution.workflowId));
    } else {
      log3.warn("completeExecution: execution already in terminal state, skipping", {
        executionId
      });
    }
  });
}
async function incrementDroppedExecutions(workflowId) {
  await db.update(workflow).set({
    droppedExecutions: sql`${workflow.droppedExecutions} + 1`
  }).where(eq(workflow.id, workflowId));
}
async function failExecution(executionId, error49, stepId) {
  await db.transaction(async (tx) => {
    const [execution] = await tx.update(workflowExecution).set({
      status: "failed",
      error: error49,
      errorStepId: stepId,
      completedAt: new Date,
      updatedAt: new Date
    }).where(and(eq(workflowExecution.id, executionId), notInArray(workflowExecution.status, [...TERMINAL_STATUSES]))).returning();
    if (execution) {
      await tx.update(workflow).set({
        activeExecutions: sql`GREATEST(0, ${workflow.activeExecutions} - 1)`,
        failedExecutions: sql`${workflow.failedExecutions} + 1`
      }).where(eq(workflow.id, execution.workflowId));
    } else {
      log3.warn("failExecution: execution already in terminal state, skipping", {
        executionId
      });
    }
  });
}

// ../../node_modules/.pnpm/memoirist@0.4.0/node_modules/memoirist/dist/index.mjs
var createNode = (part, inert) => {
  const inertMap = inert?.length ? {} : null;
  if (inertMap)
    for (const child of inert)
      inertMap[child.part.charCodeAt(0)] = child;
  return {
    part,
    store: null,
    inert: inertMap,
    params: null,
    wildcardStore: null
  };
};
var cloneNode2 = (node3, part) => ({
  ...node3,
  part
});
var createParamNode = (name3) => ({
  name: name3,
  store: null,
  inert: null
});
var Memoirist = class _Memoirist {
  constructor(config2 = {}) {
    this.config = config2;
    if (config2.lazy)
      this.find = this.lazyFind;
    if (config2.onParam && !Array.isArray(config2.onParam))
      this.config.onParam = [
        this.config.onParam
      ];
  }
  root = {};
  history = [];
  deferred = [];
  static regex = {
    static: /:.+?(?=\/|$)/,
    params: /:.+?(?=\/|$)/g,
    optionalParams: /(\/:\w+\?)/g
  };
  lazyFind = (method, url2) => {
    if (!this.config.lazy)
      return this.find;
    this.build();
    return this.find(method, url2);
  };
  build() {
    if (!this.config.lazy)
      return;
    for (const [method, path2, store] of this.deferred)
      this.add(method, path2, store, { lazy: false, ignoreHistory: true });
    this.deferred = [];
    this.find = (method, url2) => {
      const root = this.root[method];
      if (!root)
        return null;
      return matchRoute(url2, url2.length, root, 0, this.config.onParam);
    };
  }
  add(method, path2, store, {
    ignoreError = false,
    ignoreHistory = false,
    lazy: lazy2 = this.config.lazy
  } = {}) {
    if (lazy2) {
      this.find = this.lazyFind;
      this.deferred.push([method, path2, store]);
      return store;
    }
    if (typeof path2 !== "string")
      throw new TypeError("Route path must be a string");
    if (path2 === "")
      path2 = "/";
    else if (path2[0] !== "/")
      path2 = `/${path2}`;
    const isWildcard = path2[path2.length - 1] === "*";
    const optionalParams = path2.match(_Memoirist.regex.optionalParams);
    if (optionalParams) {
      const originalPath = path2.replaceAll("?", "");
      this.add(method, originalPath, store, {
        ignoreError,
        ignoreHistory,
        lazy: lazy2
      });
      for (let i = 0;i < optionalParams.length; i++) {
        let newPath = path2.replace(optionalParams[i], "");
        this.add(method, newPath, store, {
          ignoreError: true,
          ignoreHistory,
          lazy: lazy2
        });
      }
      return store;
    }
    if (optionalParams)
      path2 = path2.replaceAll("?", "");
    if (this.history.find(([m2, p3, s3]) => m2 === method && p3 === path2))
      return store;
    if (isWildcard || optionalParams && path2.charCodeAt(path2.length - 1) === 63)
      path2 = path2.slice(0, -1);
    if (!ignoreHistory)
      this.history.push([method, path2, store]);
    const inertParts = path2.split(_Memoirist.regex.static);
    const paramParts = path2.match(_Memoirist.regex.params) || [];
    if (inertParts[inertParts.length - 1] === "")
      inertParts.pop();
    let node3;
    if (!this.root[method])
      node3 = this.root[method] = createNode("/");
    else
      node3 = this.root[method];
    let paramPartsIndex = 0;
    for (let i = 0;i < inertParts.length; ++i) {
      let part = inertParts[i];
      if (i > 0) {
        const param = paramParts[paramPartsIndex++].slice(1);
        if (node3.params === null)
          node3.params = createParamNode(param);
        else if (node3.params.name !== param) {
          if (ignoreError)
            return store;
          else
            throw new Error(`Cannot create route "${path2}" with parameter "${param}" because a route already exists with a different parameter name ("${node3.params.name}") in the same location`);
        }
        const params = node3.params;
        if (params.inert === null) {
          node3 = params.inert = createNode(part);
          continue;
        }
        node3 = params.inert;
      }
      for (let j4 = 0;; ) {
        if (j4 === part.length) {
          if (j4 < node3.part.length) {
            const childNode = cloneNode2(node3, node3.part.slice(j4));
            Object.assign(node3, createNode(part, [childNode]));
          }
          break;
        }
        if (j4 === node3.part.length) {
          if (node3.inert === null)
            node3.inert = {};
          const inert = node3.inert[part.charCodeAt(j4)];
          if (inert) {
            node3 = inert;
            part = part.slice(j4);
            j4 = 0;
            continue;
          }
          const childNode = createNode(part.slice(j4));
          node3.inert[part.charCodeAt(j4)] = childNode;
          node3 = childNode;
          break;
        }
        if (part[j4] !== node3.part[j4]) {
          const existingChild = cloneNode2(node3, node3.part.slice(j4));
          const newChild = createNode(part.slice(j4));
          Object.assign(node3, createNode(node3.part.slice(0, j4), [
            existingChild,
            newChild
          ]));
          node3 = newChild;
          break;
        }
        ++j4;
      }
    }
    if (paramPartsIndex < paramParts.length) {
      const param = paramParts[paramPartsIndex];
      const name3 = param.slice(1);
      if (node3.params === null)
        node3.params = createParamNode(name3);
      else if (node3.params.name !== name3) {
        if (ignoreError)
          return store;
        else
          throw new Error(`Cannot create route "${path2}" with parameter "${name3}" because a route already exists with a different parameter name ("${node3.params.name}") in the same location`);
      }
      if (node3.params.store === null)
        node3.params.store = store;
      return node3.params.store;
    }
    if (isWildcard) {
      if (node3.wildcardStore === null)
        node3.wildcardStore = store;
      return node3.wildcardStore;
    }
    if (node3.store === null)
      node3.store = store;
    return node3.store;
  }
  find(method, url2) {
    const root = this.root[method];
    if (!root)
      return null;
    return matchRoute(url2, url2.length, root, 0, this.config.onParam);
  }
};
var matchRoute = (url2, urlLength, node3, startIndex, onParam) => {
  const part = node3.part;
  const length2 = part.length;
  const endIndex = startIndex + length2;
  if (length2 > 1) {
    if (endIndex > urlLength)
      return null;
    if (length2 < 15) {
      for (let i = 1, j4 = startIndex + 1;i < length2; ++i, ++j4)
        if (part.charCodeAt(i) !== url2.charCodeAt(j4))
          return null;
    } else if (url2.slice(startIndex, endIndex) !== part)
      return null;
  }
  if (endIndex === urlLength) {
    if (node3.store !== null)
      return {
        store: node3.store,
        params: {}
      };
    if (node3.wildcardStore !== null)
      return {
        store: node3.wildcardStore,
        params: { "*": "" }
      };
    return null;
  }
  if (node3.inert !== null) {
    const inert = node3.inert[url2.charCodeAt(endIndex)];
    if (inert !== undefined) {
      const route = matchRoute(url2, urlLength, inert, endIndex, onParam);
      if (route !== null)
        return route;
    }
  }
  if (node3.params !== null) {
    const { store, name: name3, inert } = node3.params;
    const slashIndex = url2.indexOf("/", endIndex);
    if (slashIndex !== endIndex) {
      if (slashIndex === -1 || slashIndex >= urlLength) {
        if (store !== null) {
          const params = {};
          params[name3] = url2.substring(endIndex, urlLength);
          if (onParam)
            for (let i = 0;i < onParam.length; i++) {
              let temp = onParam[i](params[name3], name3);
              if (temp !== undefined)
                params[name3] = temp;
            }
          return {
            store,
            params
          };
        }
      } else if (inert !== null) {
        const route = matchRoute(url2, urlLength, inert, slashIndex, onParam);
        if (route !== null) {
          route.params[name3] = url2.substring(endIndex, slashIndex);
          if (onParam)
            for (let i = 0;i < onParam.length; i++) {
              let temp = onParam[i](route.params[name3], name3);
              if (temp !== undefined)
                route.params[name3] = temp;
            }
          return route;
        }
      }
    }
  }
  if (node3.wildcardStore !== null)
    return {
      store: node3.wildcardStore,
      params: {
        "*": url2.substring(endIndex, urlLength)
      }
    };
  return null;
};

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
var exports_value = {};
__export(exports_value, {
  IsUndefined: () => IsUndefined,
  IsUint8Array: () => IsUint8Array,
  IsSymbol: () => IsSymbol,
  IsString: () => IsString,
  IsRegExp: () => IsRegExp,
  IsObject: () => IsObject,
  IsNumber: () => IsNumber,
  IsNull: () => IsNull,
  IsIterator: () => IsIterator,
  IsFunction: () => IsFunction,
  IsDate: () => IsDate,
  IsBoolean: () => IsBoolean,
  IsBigInt: () => IsBigInt,
  IsAsyncIterator: () => IsAsyncIterator,
  IsArray: () => IsArray,
  HasPropertyKey: () => HasPropertyKey
});
function HasPropertyKey(value, key) {
  return key in value;
}
function IsAsyncIterator(value) {
  return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
}
function IsArray(value) {
  return Array.isArray(value);
}
function IsBigInt(value) {
  return typeof value === "bigint";
}
function IsBoolean(value) {
  return typeof value === "boolean";
}
function IsDate(value) {
  return value instanceof globalThis.Date;
}
function IsFunction(value) {
  return typeof value === "function";
}
function IsIterator(value) {
  return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value;
}
function IsNull(value) {
  return value === null;
}
function IsNumber(value) {
  return typeof value === "number";
}
function IsObject(value) {
  return typeof value === "object" && value !== null;
}
function IsRegExp(value) {
  return value instanceof globalThis.RegExp;
}
function IsString(value) {
  return typeof value === "string";
}
function IsSymbol(value) {
  return typeof value === "symbol";
}
function IsUint8Array(value) {
  return value instanceof globalThis.Uint8Array;
}
function IsUndefined(value) {
  return value === undefined;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
function ArrayType(value) {
  return value.map((value2) => Visit(value2));
}
function DateType(value) {
  return new Date(value.getTime());
}
function Uint8ArrayType(value) {
  return new Uint8Array(value);
}
function RegExpType(value) {
  return new RegExp(value.source, value.flags);
}
function ObjectType(value) {
  const result = {};
  for (const key of Object.getOwnPropertyNames(value)) {
    result[key] = Visit(value[key]);
  }
  for (const key of Object.getOwnPropertySymbols(value)) {
    result[key] = Visit(value[key]);
  }
  return result;
}
function Visit(value) {
  return IsArray(value) ? ArrayType(value) : IsDate(value) ? DateType(value) : IsUint8Array(value) ? Uint8ArrayType(value) : IsRegExp(value) ? RegExpType(value) : IsObject(value) ? ObjectType(value) : value;
}
function Clone(value) {
  return Visit(value);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
function CloneType(schema, options2) {
  return options2 === undefined ? Clone(schema) : Clone({ ...options2, ...schema });
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
function IsAsyncIterator2(value) {
  return IsObject2(value) && globalThis.Symbol.asyncIterator in value;
}
function IsIterator2(value) {
  return IsObject2(value) && globalThis.Symbol.iterator in value;
}
function IsStandardObject(value) {
  return IsObject2(value) && (globalThis.Object.getPrototypeOf(value) === Object.prototype || globalThis.Object.getPrototypeOf(value) === null);
}
function IsPromise(value) {
  return value instanceof globalThis.Promise;
}
function IsDate2(value) {
  return value instanceof Date && globalThis.Number.isFinite(value.getTime());
}
function IsMap(value) {
  return value instanceof globalThis.Map;
}
function IsSet(value) {
  return value instanceof globalThis.Set;
}
function IsTypedArray(value) {
  return globalThis.ArrayBuffer.isView(value);
}
function IsUint8Array2(value) {
  return value instanceof globalThis.Uint8Array;
}
function HasPropertyKey2(value, key) {
  return key in value;
}
function IsObject2(value) {
  return value !== null && typeof value === "object";
}
function IsArray2(value) {
  return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value);
}
function IsUndefined2(value) {
  return value === undefined;
}
function IsNull2(value) {
  return value === null;
}
function IsBoolean2(value) {
  return typeof value === "boolean";
}
function IsNumber2(value) {
  return typeof value === "number";
}
function IsInteger(value) {
  return globalThis.Number.isInteger(value);
}
function IsBigInt2(value) {
  return typeof value === "bigint";
}
function IsString2(value) {
  return typeof value === "string";
}
function IsFunction2(value) {
  return typeof value === "function";
}
function IsSymbol2(value) {
  return typeof value === "symbol";
}
function IsValueType(value) {
  return IsBigInt2(value) || IsBoolean2(value) || IsNull2(value) || IsNumber2(value) || IsString2(value) || IsSymbol2(value) || IsUndefined2(value);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/system/policy.mjs
var TypeSystemPolicy;
(function(TypeSystemPolicy2) {
  TypeSystemPolicy2.InstanceMode = "default";
  TypeSystemPolicy2.ExactOptionalPropertyTypes = false;
  TypeSystemPolicy2.AllowArrayObject = false;
  TypeSystemPolicy2.AllowNaN = false;
  TypeSystemPolicy2.AllowNullVoid = false;
  function IsExactOptionalProperty(value, key) {
    return TypeSystemPolicy2.ExactOptionalPropertyTypes ? key in value : value[key] !== undefined;
  }
  TypeSystemPolicy2.IsExactOptionalProperty = IsExactOptionalProperty;
  function IsObjectLike(value) {
    const isObject4 = IsObject2(value);
    return TypeSystemPolicy2.AllowArrayObject ? isObject4 : isObject4 && !IsArray2(value);
  }
  TypeSystemPolicy2.IsObjectLike = IsObjectLike;
  function IsRecordLike(value) {
    return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
  }
  TypeSystemPolicy2.IsRecordLike = IsRecordLike;
  function IsNumberLike(value) {
    return TypeSystemPolicy2.AllowNaN ? IsNumber2(value) : Number.isFinite(value);
  }
  TypeSystemPolicy2.IsNumberLike = IsNumberLike;
  function IsVoidLike(value) {
    const isUndefined2 = IsUndefined2(value);
    return TypeSystemPolicy2.AllowNullVoid ? isUndefined2 || value === null : isUndefined2;
  }
  TypeSystemPolicy2.IsVoidLike = IsVoidLike;
})(TypeSystemPolicy || (TypeSystemPolicy = {}));

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
function ImmutableArray(value) {
  return globalThis.Object.freeze(value).map((value2) => Immutable(value2));
}
function ImmutableDate(value) {
  return value;
}
function ImmutableUint8Array(value) {
  return value;
}
function ImmutableRegExp(value) {
  return value;
}
function ImmutableObject(value) {
  const result = {};
  for (const key of Object.getOwnPropertyNames(value)) {
    result[key] = Immutable(value[key]);
  }
  for (const key of Object.getOwnPropertySymbols(value)) {
    result[key] = Immutable(value[key]);
  }
  return globalThis.Object.freeze(result);
}
function Immutable(value) {
  return IsArray(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject(value) ? ImmutableObject(value) : value;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
function CreateType(schema, options2) {
  const result = options2 !== undefined ? { ...options2, ...schema } : schema;
  switch (TypeSystemPolicy.InstanceMode) {
    case "freeze":
      return Immutable(result);
    case "clone":
      return Clone(result);
    default:
      return result;
  }
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
class TypeBoxError extends Error {
  constructor(message2) {
    super(message2);
  }
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
var TransformKind = Symbol.for("TypeBox.Transform");
var ReadonlyKind = Symbol.for("TypeBox.Readonly");
var OptionalKind = Symbol.for("TypeBox.Optional");
var Hint = Symbol.for("TypeBox.Hint");
var Kind = Symbol.for("TypeBox.Kind");

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
function IsReadonly(value) {
  return IsObject(value) && value[ReadonlyKind] === "Readonly";
}
function IsOptional(value) {
  return IsObject(value) && value[OptionalKind] === "Optional";
}
function IsAny(value) {
  return IsKindOf(value, "Any");
}
function IsArgument(value) {
  return IsKindOf(value, "Argument");
}
function IsArray3(value) {
  return IsKindOf(value, "Array");
}
function IsAsyncIterator3(value) {
  return IsKindOf(value, "AsyncIterator");
}
function IsBigInt3(value) {
  return IsKindOf(value, "BigInt");
}
function IsBoolean3(value) {
  return IsKindOf(value, "Boolean");
}
function IsComputed(value) {
  return IsKindOf(value, "Computed");
}
function IsConstructor(value) {
  return IsKindOf(value, "Constructor");
}
function IsDate3(value) {
  return IsKindOf(value, "Date");
}
function IsFunction3(value) {
  return IsKindOf(value, "Function");
}
function IsInteger2(value) {
  return IsKindOf(value, "Integer");
}
function IsIntersect(value) {
  return IsKindOf(value, "Intersect");
}
function IsIterator3(value) {
  return IsKindOf(value, "Iterator");
}
function IsKindOf(value, kind) {
  return IsObject(value) && Kind in value && value[Kind] === kind;
}
function IsLiteralValue(value) {
  return IsBoolean(value) || IsNumber(value) || IsString(value);
}
function IsLiteral(value) {
  return IsKindOf(value, "Literal");
}
function IsMappedKey(value) {
  return IsKindOf(value, "MappedKey");
}
function IsMappedResult(value) {
  return IsKindOf(value, "MappedResult");
}
function IsNever(value) {
  return IsKindOf(value, "Never");
}
function IsNot(value) {
  return IsKindOf(value, "Not");
}
function IsNull3(value) {
  return IsKindOf(value, "Null");
}
function IsNumber3(value) {
  return IsKindOf(value, "Number");
}
function IsObject3(value) {
  return IsKindOf(value, "Object");
}
function IsPromise2(value) {
  return IsKindOf(value, "Promise");
}
function IsRecord(value) {
  return IsKindOf(value, "Record");
}
function IsRef(value) {
  return IsKindOf(value, "Ref");
}
function IsRegExp2(value) {
  return IsKindOf(value, "RegExp");
}
function IsString3(value) {
  return IsKindOf(value, "String");
}
function IsSymbol3(value) {
  return IsKindOf(value, "Symbol");
}
function IsTemplateLiteral(value) {
  return IsKindOf(value, "TemplateLiteral");
}
function IsThis(value) {
  return IsKindOf(value, "This");
}
function IsTransform(value) {
  return IsObject(value) && TransformKind in value;
}
function IsTuple(value) {
  return IsKindOf(value, "Tuple");
}
function IsUndefined3(value) {
  return IsKindOf(value, "Undefined");
}
function IsUnion(value) {
  return IsKindOf(value, "Union");
}
function IsUint8Array3(value) {
  return IsKindOf(value, "Uint8Array");
}
function IsUnknown(value) {
  return IsKindOf(value, "Unknown");
}
function IsUnsafe(value) {
  return IsKindOf(value, "Unsafe");
}
function IsVoid(value) {
  return IsKindOf(value, "Void");
}
function IsKind(value) {
  return IsObject(value) && Kind in value && IsString(value[Kind]);
}
function IsSchema(value) {
  return IsAny(value) || IsArgument(value) || IsArray3(value) || IsBoolean3(value) || IsBigInt3(value) || IsAsyncIterator3(value) || IsComputed(value) || IsConstructor(value) || IsDate3(value) || IsFunction3(value) || IsInteger2(value) || IsIntersect(value) || IsIterator3(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot(value) || IsNull3(value) || IsNumber3(value) || IsObject3(value) || IsPromise2(value) || IsRecord(value) || IsRef(value) || IsRegExp2(value) || IsString3(value) || IsSymbol3(value) || IsTemplateLiteral(value) || IsThis(value) || IsTuple(value) || IsUndefined3(value) || IsUnion(value) || IsUint8Array3(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
var exports_type = {};
__export(exports_type, {
  TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError,
  IsVoid: () => IsVoid2,
  IsUnsafe: () => IsUnsafe2,
  IsUnknown: () => IsUnknown2,
  IsUnionLiteral: () => IsUnionLiteral,
  IsUnion: () => IsUnion2,
  IsUndefined: () => IsUndefined4,
  IsUint8Array: () => IsUint8Array4,
  IsTuple: () => IsTuple2,
  IsTransform: () => IsTransform2,
  IsThis: () => IsThis2,
  IsTemplateLiteral: () => IsTemplateLiteral2,
  IsSymbol: () => IsSymbol4,
  IsString: () => IsString4,
  IsSchema: () => IsSchema2,
  IsRegExp: () => IsRegExp3,
  IsRef: () => IsRef2,
  IsRecursive: () => IsRecursive,
  IsRecord: () => IsRecord2,
  IsReadonly: () => IsReadonly2,
  IsProperties: () => IsProperties,
  IsPromise: () => IsPromise3,
  IsOptional: () => IsOptional2,
  IsObject: () => IsObject4,
  IsNumber: () => IsNumber4,
  IsNull: () => IsNull4,
  IsNot: () => IsNot2,
  IsNever: () => IsNever2,
  IsMappedResult: () => IsMappedResult2,
  IsMappedKey: () => IsMappedKey2,
  IsLiteralValue: () => IsLiteralValue2,
  IsLiteralString: () => IsLiteralString,
  IsLiteralNumber: () => IsLiteralNumber,
  IsLiteralBoolean: () => IsLiteralBoolean,
  IsLiteral: () => IsLiteral2,
  IsKindOf: () => IsKindOf2,
  IsKind: () => IsKind2,
  IsIterator: () => IsIterator4,
  IsIntersect: () => IsIntersect2,
  IsInteger: () => IsInteger3,
  IsImport: () => IsImport,
  IsFunction: () => IsFunction4,
  IsDate: () => IsDate4,
  IsConstructor: () => IsConstructor2,
  IsComputed: () => IsComputed2,
  IsBoolean: () => IsBoolean4,
  IsBigInt: () => IsBigInt4,
  IsAsyncIterator: () => IsAsyncIterator4,
  IsArray: () => IsArray4,
  IsArgument: () => IsArgument2,
  IsAny: () => IsAny2
});
class TypeGuardUnknownTypeError extends TypeBoxError {
}
var KnownTypes = [
  "Argument",
  "Any",
  "Array",
  "AsyncIterator",
  "BigInt",
  "Boolean",
  "Computed",
  "Constructor",
  "Date",
  "Enum",
  "Function",
  "Integer",
  "Intersect",
  "Iterator",
  "Literal",
  "MappedKey",
  "MappedResult",
  "Not",
  "Null",
  "Number",
  "Object",
  "Promise",
  "Record",
  "Ref",
  "RegExp",
  "String",
  "Symbol",
  "TemplateLiteral",
  "This",
  "Tuple",
  "Undefined",
  "Union",
  "Uint8Array",
  "Unknown",
  "Void"
];
function IsPattern(value) {
  try {
    new RegExp(value);
    return true;
  } catch {
    return false;
  }
}
function IsControlCharacterFree(value) {
  if (!IsString(value))
    return false;
  for (let i = 0;i < value.length; i++) {
    const code2 = value.charCodeAt(i);
    if (code2 >= 7 && code2 <= 13 || code2 === 27 || code2 === 127) {
      return false;
    }
  }
  return true;
}
function IsAdditionalProperties(value) {
  return IsOptionalBoolean(value) || IsSchema2(value);
}
function IsOptionalBigInt(value) {
  return IsUndefined(value) || IsBigInt(value);
}
function IsOptionalNumber(value) {
  return IsUndefined(value) || IsNumber(value);
}
function IsOptionalBoolean(value) {
  return IsUndefined(value) || IsBoolean(value);
}
function IsOptionalString(value) {
  return IsUndefined(value) || IsString(value);
}
function IsOptionalPattern(value) {
  return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value) && IsPattern(value);
}
function IsOptionalFormat(value) {
  return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value);
}
function IsOptionalSchema(value) {
  return IsUndefined(value) || IsSchema2(value);
}
function IsReadonly2(value) {
  return IsObject(value) && value[ReadonlyKind] === "Readonly";
}
function IsOptional2(value) {
  return IsObject(value) && value[OptionalKind] === "Optional";
}
function IsAny2(value) {
  return IsKindOf2(value, "Any") && IsOptionalString(value.$id);
}
function IsArgument2(value) {
  return IsKindOf2(value, "Argument") && IsNumber(value.index);
}
function IsArray4(value) {
  return IsKindOf2(value, "Array") && value.type === "array" && IsOptionalString(value.$id) && IsSchema2(value.items) && IsOptionalNumber(value.minItems) && IsOptionalNumber(value.maxItems) && IsOptionalBoolean(value.uniqueItems) && IsOptionalSchema(value.contains) && IsOptionalNumber(value.minContains) && IsOptionalNumber(value.maxContains);
}
function IsAsyncIterator4(value) {
  return IsKindOf2(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
}
function IsBigInt4(value) {
  return IsKindOf2(value, "BigInt") && value.type === "bigint" && IsOptionalString(value.$id) && IsOptionalBigInt(value.exclusiveMaximum) && IsOptionalBigInt(value.exclusiveMinimum) && IsOptionalBigInt(value.maximum) && IsOptionalBigInt(value.minimum) && IsOptionalBigInt(value.multipleOf);
}
function IsBoolean4(value) {
  return IsKindOf2(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id);
}
function IsComputed2(value) {
  return IsKindOf2(value, "Computed") && IsString(value.target) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema));
}
function IsConstructor2(value) {
  return IsKindOf2(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
}
function IsDate4(value) {
  return IsKindOf2(value, "Date") && value.type === "Date" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximumTimestamp) && IsOptionalNumber(value.exclusiveMinimumTimestamp) && IsOptionalNumber(value.maximumTimestamp) && IsOptionalNumber(value.minimumTimestamp) && IsOptionalNumber(value.multipleOfTimestamp);
}
function IsFunction4(value) {
  return IsKindOf2(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
}
function IsImport(value) {
  return IsKindOf2(value, "Import") && HasPropertyKey(value, "$defs") && IsObject(value.$defs) && IsProperties(value.$defs) && HasPropertyKey(value, "$ref") && IsString(value.$ref) && value.$ref in value.$defs;
}
function IsInteger3(value) {
  return IsKindOf2(value, "Integer") && value.type === "integer" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
}
function IsProperties(value) {
  return IsObject(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema2(schema));
}
function IsIntersect2(value) {
  return IsKindOf2(value, "Intersect") && (IsString(value.type) && value.type !== "object" ? false : true) && IsArray(value.allOf) && value.allOf.every((schema) => IsSchema2(schema) && !IsTransform2(schema)) && IsOptionalString(value.type) && (IsOptionalBoolean(value.unevaluatedProperties) || IsOptionalSchema(value.unevaluatedProperties)) && IsOptionalString(value.$id);
}
function IsIterator4(value) {
  return IsKindOf2(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
}
function IsKindOf2(value, kind) {
  return IsObject(value) && Kind in value && value[Kind] === kind;
}
function IsLiteralString(value) {
  return IsLiteral2(value) && IsString(value.const);
}
function IsLiteralNumber(value) {
  return IsLiteral2(value) && IsNumber(value.const);
}
function IsLiteralBoolean(value) {
  return IsLiteral2(value) && IsBoolean(value.const);
}
function IsLiteral2(value) {
  return IsKindOf2(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue2(value.const);
}
function IsLiteralValue2(value) {
  return IsBoolean(value) || IsNumber(value) || IsString(value);
}
function IsMappedKey2(value) {
  return IsKindOf2(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key) => IsNumber(key) || IsString(key));
}
function IsMappedResult2(value) {
  return IsKindOf2(value, "MappedResult") && IsProperties(value.properties);
}
function IsNever2(value) {
  return IsKindOf2(value, "Never") && IsObject(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
}
function IsNot2(value) {
  return IsKindOf2(value, "Not") && IsSchema2(value.not);
}
function IsNull4(value) {
  return IsKindOf2(value, "Null") && value.type === "null" && IsOptionalString(value.$id);
}
function IsNumber4(value) {
  return IsKindOf2(value, "Number") && value.type === "number" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
}
function IsObject4(value) {
  return IsKindOf2(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties);
}
function IsPromise3(value) {
  return IsKindOf2(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema2(value.item);
}
function IsRecord2(value) {
  return IsKindOf2(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject(value.patternProperties) && ((schema) => {
    const keys = Object.getOwnPropertyNames(schema.patternProperties);
    return keys.length === 1 && IsPattern(keys[0]) && IsObject(schema.patternProperties) && IsSchema2(schema.patternProperties[keys[0]]);
  })(value);
}
function IsRecursive(value) {
  return IsObject(value) && Hint in value && value[Hint] === "Recursive";
}
function IsRef2(value) {
  return IsKindOf2(value, "Ref") && IsOptionalString(value.$id) && IsString(value.$ref);
}
function IsRegExp3(value) {
  return IsKindOf2(value, "RegExp") && IsOptionalString(value.$id) && IsString(value.source) && IsString(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength);
}
function IsString4(value) {
  return IsKindOf2(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format);
}
function IsSymbol4(value) {
  return IsKindOf2(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id);
}
function IsTemplateLiteral2(value) {
  return IsKindOf2(value, "TemplateLiteral") && value.type === "string" && IsString(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
}
function IsThis2(value) {
  return IsKindOf2(value, "This") && IsOptionalString(value.$id) && IsString(value.$ref);
}
function IsTransform2(value) {
  return IsObject(value) && TransformKind in value;
}
function IsTuple2(value) {
  return IsKindOf2(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber(value.minItems) && IsNumber(value.maxItems) && value.minItems === value.maxItems && (IsUndefined(value.items) && IsUndefined(value.additionalItems) && value.minItems === 0 || IsArray(value.items) && value.items.every((schema) => IsSchema2(schema)));
}
function IsUndefined4(value) {
  return IsKindOf2(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
}
function IsUnionLiteral(value) {
  return IsUnion2(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema));
}
function IsUnion2(value) {
  return IsKindOf2(value, "Union") && IsOptionalString(value.$id) && IsObject(value) && IsArray(value.anyOf) && value.anyOf.every((schema) => IsSchema2(schema));
}
function IsUint8Array4(value) {
  return IsKindOf2(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength);
}
function IsUnknown2(value) {
  return IsKindOf2(value, "Unknown") && IsOptionalString(value.$id);
}
function IsUnsafe2(value) {
  return IsKindOf2(value, "Unsafe");
}
function IsVoid2(value) {
  return IsKindOf2(value, "Void") && value.type === "void" && IsOptionalString(value.$id);
}
function IsKind2(value) {
  return IsObject(value) && Kind in value && IsString(value[Kind]) && !KnownTypes.includes(value[Kind]);
}
function IsSchema2(value) {
  return IsObject(value) && (IsAny2(value) || IsArgument2(value) || IsArray4(value) || IsBoolean4(value) || IsBigInt4(value) || IsAsyncIterator4(value) || IsComputed2(value) || IsConstructor2(value) || IsDate4(value) || IsFunction4(value) || IsInteger3(value) || IsIntersect2(value) || IsIterator4(value) || IsLiteral2(value) || IsMappedKey2(value) || IsMappedResult2(value) || IsNever2(value) || IsNot2(value) || IsNull4(value) || IsNumber4(value) || IsObject4(value) || IsPromise3(value) || IsRecord2(value) || IsRef2(value) || IsRegExp3(value) || IsString4(value) || IsSymbol4(value) || IsTemplateLiteral2(value) || IsThis2(value) || IsTuple2(value) || IsUndefined4(value) || IsUnion2(value) || IsUint8Array4(value) || IsUnknown2(value) || IsUnsafe2(value) || IsVoid2(value) || IsKind2(value));
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
var PatternBoolean = "(true|false)";
var PatternNumber = "(0|[1-9][0-9]*)";
var PatternString = "(.*)";
var PatternNever = "(?!.*)";
var PatternBooleanExact = `^${PatternBoolean}$`;
var PatternNumberExact = `^${PatternNumber}$`;
var PatternStringExact = `^${PatternString}$`;
var PatternNeverExact = `^${PatternNever}$`;

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/registry/format.mjs
var exports_format = {};
__export(exports_format, {
  Set: () => Set2,
  Has: () => Has,
  Get: () => Get,
  Entries: () => Entries,
  Delete: () => Delete,
  Clear: () => Clear
});
var map3 = new Map;
function Entries() {
  return new Map(map3);
}
function Clear() {
  return map3.clear();
}
function Delete(format) {
  return map3.delete(format);
}
function Has(format) {
  return map3.has(format);
}
function Set2(format, func) {
  map3.set(format, func);
}
function Get(format) {
  return map3.get(format);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/registry/type.mjs
var exports_type2 = {};
__export(exports_type2, {
  Set: () => Set3,
  Has: () => Has2,
  Get: () => Get2,
  Entries: () => Entries2,
  Delete: () => Delete2,
  Clear: () => Clear2
});
var map4 = new Map;
function Entries2() {
  return new Map(map4);
}
function Clear2() {
  return map4.clear();
}
function Delete2(kind) {
  return map4.delete(kind);
}
function Has2(kind) {
  return map4.has(kind);
}
function Set3(kind, func) {
  map4.set(kind, func);
}
function Get2(kind) {
  return map4.get(kind);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
function SetIncludes(T4, S5) {
  return T4.includes(S5);
}
function SetDistinct(T4) {
  return [...new Set(T4)];
}
function SetIntersect(T4, S5) {
  return T4.filter((L4) => S5.includes(L4));
}
function SetIntersectManyResolve(T4, Init) {
  return T4.reduce((Acc, L4) => {
    return SetIntersect(Acc, L4);
  }, Init);
}
function SetIntersectMany(T4) {
  return T4.length === 1 ? T4[0] : T4.length > 1 ? SetIntersectManyResolve(T4.slice(1), T4[0]) : [];
}
function SetUnionMany(T4) {
  const Acc = [];
  for (const L4 of T4)
    Acc.push(...L4);
  return Acc;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
function Any(options2) {
  return CreateType({ [Kind]: "Any" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
function Array2(items, options2) {
  return CreateType({ [Kind]: "Array", type: "array", items }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
function Argument(index2) {
  return CreateType({ [Kind]: "Argument", index: index2 });
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
function AsyncIterator2(items, options2) {
  return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
function Computed(target, parameters, options2) {
  return CreateType({ [Kind]: "Computed", target, parameters }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
function DiscardKey(value, key) {
  const { [key]: _6, ...rest } = value;
  return rest;
}
function Discard(value, keys) {
  return keys.reduce((acc, key) => DiscardKey(acc, key), value);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
function Never(options2) {
  return CreateType({ [Kind]: "Never", not: {} }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
function MappedResult(properties2) {
  return CreateType({
    [Kind]: "MappedResult",
    properties: properties2
  });
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
function Constructor(parameters, returns, options2) {
  return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
function Function3(parameters, returns, options2) {
  return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
function UnionCreate(T4, options2) {
  return CreateType({ [Kind]: "Union", anyOf: T4 }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
function IsUnionOptional(types6) {
  return types6.some((type2) => IsOptional(type2));
}
function RemoveOptionalFromRest(types6) {
  return types6.map((left2) => IsOptional(left2) ? RemoveOptionalFromType(left2) : left2);
}
function RemoveOptionalFromType(T4) {
  return Discard(T4, [OptionalKind]);
}
function ResolveUnion(types6, options2) {
  const isOptional = IsUnionOptional(types6);
  return isOptional ? Optional(UnionCreate(RemoveOptionalFromRest(types6), options2)) : UnionCreate(RemoveOptionalFromRest(types6), options2);
}
function UnionEvaluated(T4, options2) {
  return T4.length === 1 ? CreateType(T4[0], options2) : T4.length === 0 ? Never(options2) : ResolveUnion(T4, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
function Union(types6, options2) {
  return types6.length === 0 ? Never(options2) : types6.length === 1 ? CreateType(types6[0], options2) : UnionCreate(types6, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
class TemplateLiteralParserError extends TypeBoxError {
}
function Unescape(pattern) {
  return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
}
function IsNonEscaped(pattern, index2, char2) {
  return pattern[index2] === char2 && pattern.charCodeAt(index2 - 1) !== 92;
}
function IsOpenParen(pattern, index2) {
  return IsNonEscaped(pattern, index2, "(");
}
function IsCloseParen(pattern, index2) {
  return IsNonEscaped(pattern, index2, ")");
}
function IsSeparator(pattern, index2) {
  return IsNonEscaped(pattern, index2, "|");
}
function IsGroup(pattern) {
  if (!(IsOpenParen(pattern, 0) && IsCloseParen(pattern, pattern.length - 1)))
    return false;
  let count2 = 0;
  for (let index2 = 0;index2 < pattern.length; index2++) {
    if (IsOpenParen(pattern, index2))
      count2 += 1;
    if (IsCloseParen(pattern, index2))
      count2 -= 1;
    if (count2 === 0 && index2 !== pattern.length - 1)
      return false;
  }
  return true;
}
function InGroup(pattern) {
  return pattern.slice(1, pattern.length - 1);
}
function IsPrecedenceOr(pattern) {
  let count2 = 0;
  for (let index2 = 0;index2 < pattern.length; index2++) {
    if (IsOpenParen(pattern, index2))
      count2 += 1;
    if (IsCloseParen(pattern, index2))
      count2 -= 1;
    if (IsSeparator(pattern, index2) && count2 === 0)
      return true;
  }
  return false;
}
function IsPrecedenceAnd(pattern) {
  for (let index2 = 0;index2 < pattern.length; index2++) {
    if (IsOpenParen(pattern, index2))
      return true;
  }
  return false;
}
function Or3(pattern) {
  let [count2, start] = [0, 0];
  const expressions = [];
  for (let index2 = 0;index2 < pattern.length; index2++) {
    if (IsOpenParen(pattern, index2))
      count2 += 1;
    if (IsCloseParen(pattern, index2))
      count2 -= 1;
    if (IsSeparator(pattern, index2) && count2 === 0) {
      const range2 = pattern.slice(start, index2);
      if (range2.length > 0)
        expressions.push(TemplateLiteralParse(range2));
      start = index2 + 1;
    }
  }
  const range = pattern.slice(start);
  if (range.length > 0)
    expressions.push(TemplateLiteralParse(range));
  if (expressions.length === 0)
    return { type: "const", const: "" };
  if (expressions.length === 1)
    return expressions[0];
  return { type: "or", expr: expressions };
}
function And(pattern) {
  function Group(value, index2) {
    if (!IsOpenParen(value, index2))
      throw new TemplateLiteralParserError(`TemplateLiteralParser: Index must point to open parens`);
    let count2 = 0;
    for (let scan = index2;scan < value.length; scan++) {
      if (IsOpenParen(value, scan))
        count2 += 1;
      if (IsCloseParen(value, scan))
        count2 -= 1;
      if (count2 === 0)
        return [index2, scan];
    }
    throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`);
  }
  function Range(pattern2, index2) {
    for (let scan = index2;scan < pattern2.length; scan++) {
      if (IsOpenParen(pattern2, scan))
        return [index2, scan];
    }
    return [index2, pattern2.length];
  }
  const expressions = [];
  for (let index2 = 0;index2 < pattern.length; index2++) {
    if (IsOpenParen(pattern, index2)) {
      const [start, end] = Group(pattern, index2);
      const range = pattern.slice(start, end + 1);
      expressions.push(TemplateLiteralParse(range));
      index2 = end;
    } else {
      const [start, end] = Range(pattern, index2);
      const range = pattern.slice(start, end);
      if (range.length > 0)
        expressions.push(TemplateLiteralParse(range));
      index2 = end - 1;
    }
  }
  return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
}
function TemplateLiteralParse(pattern) {
  return IsGroup(pattern) ? TemplateLiteralParse(InGroup(pattern)) : IsPrecedenceOr(pattern) ? Or3(pattern) : IsPrecedenceAnd(pattern) ? And(pattern) : { type: "const", const: Unescape(pattern) };
}
function TemplateLiteralParseExact(pattern) {
  return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
class TemplateLiteralFiniteError extends TypeBoxError {
}
function IsNumberExpression(expression) {
  return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "0" && expression.expr[1].type === "const" && expression.expr[1].const === "[1-9][0-9]*";
}
function IsBooleanExpression(expression) {
  return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "true" && expression.expr[1].type === "const" && expression.expr[1].const === "false";
}
function IsStringExpression(expression) {
  return expression.type === "const" && expression.const === ".*";
}
function IsTemplateLiteralExpressionFinite(expression) {
  return IsNumberExpression(expression) || IsStringExpression(expression) ? false : IsBooleanExpression(expression) ? true : expression.type === "and" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite(expr)) : expression.type === "or" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite(expr)) : expression.type === "const" ? true : (() => {
    throw new TemplateLiteralFiniteError(`Unknown expression type`);
  })();
}
function IsTemplateLiteralFinite(schema) {
  const expression = TemplateLiteralParseExact(schema.pattern);
  return IsTemplateLiteralExpressionFinite(expression);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
class TemplateLiteralGenerateError extends TypeBoxError {
}
function* GenerateReduce(buffer) {
  if (buffer.length === 1)
    return yield* buffer[0];
  for (const left2 of buffer[0]) {
    for (const right2 of GenerateReduce(buffer.slice(1))) {
      yield `${left2}${right2}`;
    }
  }
}
function* GenerateAnd(expression) {
  return yield* GenerateReduce(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate(expr)]));
}
function* GenerateOr(expression) {
  for (const expr of expression.expr)
    yield* TemplateLiteralExpressionGenerate(expr);
}
function* GenerateConst(expression) {
  return yield expression.const;
}
function* TemplateLiteralExpressionGenerate(expression) {
  return expression.type === "and" ? yield* GenerateAnd(expression) : expression.type === "or" ? yield* GenerateOr(expression) : expression.type === "const" ? yield* GenerateConst(expression) : (() => {
    throw new TemplateLiteralGenerateError("Unknown expression");
  })();
}
function TemplateLiteralGenerate(schema) {
  const expression = TemplateLiteralParseExact(schema.pattern);
  return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
function Literal(value, options2) {
  return CreateType({
    [Kind]: "Literal",
    const: value,
    type: typeof value
  }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
function Boolean2(options2) {
  return CreateType({ [Kind]: "Boolean", type: "boolean" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
function BigInt2(options2) {
  return CreateType({ [Kind]: "BigInt", type: "bigint" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
function Number2(options2) {
  return CreateType({ [Kind]: "Number", type: "number" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
function String2(options2) {
  return CreateType({ [Kind]: "String", type: "string" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
function* FromUnion(syntax) {
  const trim = syntax.trim().replace(/"|'/g, "");
  return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt2() : trim === "string" ? yield String2() : yield (() => {
    const literals = trim.split("|").map((literal3) => Literal(literal3.trim()));
    return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
  })();
}
function* FromTerminal(syntax) {
  if (syntax[1] !== "{") {
    const L4 = Literal("$");
    const R6 = FromSyntax(syntax.slice(1));
    return yield* [L4, ...R6];
  }
  for (let i = 2;i < syntax.length; i++) {
    if (syntax[i] === "}") {
      const L4 = FromUnion(syntax.slice(2, i));
      const R6 = FromSyntax(syntax.slice(i + 1));
      return yield* [...L4, ...R6];
    }
  }
  yield Literal(syntax);
}
function* FromSyntax(syntax) {
  for (let i = 0;i < syntax.length; i++) {
    if (syntax[i] === "$") {
      const L4 = Literal(syntax.slice(0, i));
      const R6 = FromTerminal(syntax.slice(i));
      return yield* [L4, ...R6];
    }
  }
  yield Literal(syntax);
}
function TemplateLiteralSyntax(syntax) {
  return [...FromSyntax(syntax)];
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
class TemplateLiteralPatternError extends TypeBoxError {
}
function Escape(value) {
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function Visit2(schema, acc) {
  return IsTemplateLiteral(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion(schema) ? `(${schema.anyOf.map((schema2) => Visit2(schema2, acc)).join("|")})` : IsNumber3(schema) ? `${acc}${PatternNumber}` : IsInteger2(schema) ? `${acc}${PatternNumber}` : IsBigInt3(schema) ? `${acc}${PatternNumber}` : IsString3(schema) ? `${acc}${PatternString}` : IsLiteral(schema) ? `${acc}${Escape(schema.const.toString())}` : IsBoolean3(schema) ? `${acc}${PatternBoolean}` : (() => {
    throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`);
  })();
}
function TemplateLiteralPattern(kinds) {
  return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
function TemplateLiteralToUnion(schema) {
  const R6 = TemplateLiteralGenerate(schema);
  const L4 = R6.map((S5) => Literal(S5));
  return UnionEvaluated(L4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
function TemplateLiteral(unresolved, options2) {
  const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
  return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
function FromTemplateLiteral(templateLiteral2) {
  const keys = TemplateLiteralGenerate(templateLiteral2);
  return keys.map((key) => key.toString());
}
function FromUnion2(types6) {
  const result = [];
  for (const type2 of types6)
    result.push(...IndexPropertyKeys(type2));
  return result;
}
function FromLiteral(literalValue) {
  return [literalValue.toString()];
}
function IndexPropertyKeys(type2) {
  return [...new Set(IsTemplateLiteral(type2) ? FromTemplateLiteral(type2) : IsUnion(type2) ? FromUnion2(type2.anyOf) : IsLiteral(type2) ? FromLiteral(type2.const) : IsNumber3(type2) ? ["[number]"] : IsInteger2(type2) ? ["[number]"] : [])];
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
function FromProperties(type2, properties2, options2) {
  const result = {};
  for (const K22 of Object.getOwnPropertyNames(properties2)) {
    result[K22] = Index2(type2, IndexPropertyKeys(properties2[K22]), options2);
  }
  return result;
}
function FromMappedResult(type2, mappedResult, options2) {
  return FromProperties(type2, mappedResult.properties, options2);
}
function IndexFromMappedResult(type2, mappedResult, options2) {
  const properties2 = FromMappedResult(type2, mappedResult, options2);
  return MappedResult(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
function FromRest(types6, key) {
  return types6.map((type2) => IndexFromPropertyKey(type2, key));
}
function FromIntersectRest(types6) {
  return types6.filter((type2) => !IsNever(type2));
}
function FromIntersect(types6, key) {
  return IntersectEvaluated(FromIntersectRest(FromRest(types6, key)));
}
function FromUnionRest(types6) {
  return types6.some((L4) => IsNever(L4)) ? [] : types6;
}
function FromUnion3(types6, key) {
  return UnionEvaluated(FromUnionRest(FromRest(types6, key)));
}
function FromTuple(types6, key) {
  return key in types6 ? types6[key] : key === "[number]" ? UnionEvaluated(types6) : Never();
}
function FromArray(type2, key) {
  return key === "[number]" ? type2 : Never();
}
function FromProperty(properties2, propertyKey) {
  return propertyKey in properties2 ? properties2[propertyKey] : Never();
}
function IndexFromPropertyKey(type2, propertyKey) {
  return IsIntersect(type2) ? FromIntersect(type2.allOf, propertyKey) : IsUnion(type2) ? FromUnion3(type2.anyOf, propertyKey) : IsTuple(type2) ? FromTuple(type2.items ?? [], propertyKey) : IsArray3(type2) ? FromArray(type2.items, propertyKey) : IsObject3(type2) ? FromProperty(type2.properties, propertyKey) : Never();
}
function IndexFromPropertyKeys(type2, propertyKeys) {
  return propertyKeys.map((propertyKey) => IndexFromPropertyKey(type2, propertyKey));
}
function FromSchema(type2, propertyKeys) {
  return UnionEvaluated(IndexFromPropertyKeys(type2, propertyKeys));
}
function Index2(type2, key, options2) {
  if (IsRef(type2) || IsRef(key)) {
    const error49 = `Index types using Ref parameters require both Type and Key to be of TSchema`;
    if (!IsSchema(type2) || !IsSchema(key))
      throw new TypeBoxError(error49);
    return Computed("Index", [type2, key]);
  }
  if (IsMappedResult(key))
    return IndexFromMappedResult(type2, key, options2);
  if (IsMappedKey(key))
    return IndexFromMappedKey(type2, key, options2);
  return CreateType(IsSchema(key) ? FromSchema(type2, IndexPropertyKeys(key)) : FromSchema(type2, key), options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
function MappedIndexPropertyKey(type2, key, options2) {
  return { [key]: Index2(type2, [key], Clone(options2)) };
}
function MappedIndexPropertyKeys(type2, propertyKeys, options2) {
  return propertyKeys.reduce((result, left2) => {
    return { ...result, ...MappedIndexPropertyKey(type2, left2, options2) };
  }, {});
}
function MappedIndexProperties(type2, mappedKey, options2) {
  return MappedIndexPropertyKeys(type2, mappedKey.keys, options2);
}
function IndexFromMappedKey(type2, mappedKey, options2) {
  const properties2 = MappedIndexProperties(type2, mappedKey, options2);
  return MappedResult(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
function Iterator2(items, options2) {
  return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
function RequiredArray(properties2) {
  return globalThis.Object.keys(properties2).filter((key) => !IsOptional(properties2[key]));
}
function _Object(properties2, options2) {
  const required2 = RequiredArray(properties2);
  const schema = required2.length > 0 ? { [Kind]: "Object", type: "object", required: required2, properties: properties2 } : { [Kind]: "Object", type: "object", properties: properties2 };
  return CreateType(schema, options2);
}
var Object2 = _Object;

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
function Promise2(item, options2) {
  return CreateType({ [Kind]: "Promise", type: "Promise", item }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
function RemoveReadonly(schema) {
  return CreateType(Discard(schema, [ReadonlyKind]));
}
function AddReadonly(schema) {
  return CreateType({ ...schema, [ReadonlyKind]: "Readonly" });
}
function ReadonlyWithFlag(schema, F5) {
  return F5 === false ? RemoveReadonly(schema) : AddReadonly(schema);
}
function Readonly(schema, enable2) {
  const F5 = enable2 ?? true;
  return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F5) : ReadonlyWithFlag(schema, F5);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
function FromProperties2(K4, F5) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(K4))
    Acc[K22] = Readonly(K4[K22], F5);
  return Acc;
}
function FromMappedResult2(R6, F5) {
  return FromProperties2(R6.properties, F5);
}
function ReadonlyFromMappedResult(R6, F5) {
  const P4 = FromMappedResult2(R6, F5);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
function Tuple(types6, options2) {
  return CreateType(types6.length > 0 ? { [Kind]: "Tuple", type: "array", items: types6, additionalItems: false, minItems: types6.length, maxItems: types6.length } : { [Kind]: "Tuple", type: "array", minItems: types6.length, maxItems: types6.length }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
function FromMappedResult3(K4, P4) {
  return K4 in P4 ? FromSchemaType(K4, P4[K4]) : MappedResult(P4);
}
function MappedKeyToKnownMappedResultProperties(K4) {
  return { [K4]: Literal(K4) };
}
function MappedKeyToUnknownMappedResultProperties(P4) {
  const Acc = {};
  for (const L4 of P4)
    Acc[L4] = Literal(L4);
  return Acc;
}
function MappedKeyToMappedResultProperties(K4, P4) {
  return SetIncludes(P4, K4) ? MappedKeyToKnownMappedResultProperties(K4) : MappedKeyToUnknownMappedResultProperties(P4);
}
function FromMappedKey(K4, P4) {
  const R6 = MappedKeyToMappedResultProperties(K4, P4);
  return FromMappedResult3(K4, R6);
}
function FromRest2(K4, T4) {
  return T4.map((L4) => FromSchemaType(K4, L4));
}
function FromProperties3(K4, T4) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(T4))
    Acc[K22] = FromSchemaType(K4, T4[K22]);
  return Acc;
}
function FromSchemaType(K4, T4) {
  const options2 = { ...T4 };
  return IsOptional(T4) ? Optional(FromSchemaType(K4, Discard(T4, [OptionalKind]))) : IsReadonly(T4) ? Readonly(FromSchemaType(K4, Discard(T4, [ReadonlyKind]))) : IsMappedResult(T4) ? FromMappedResult3(K4, T4.properties) : IsMappedKey(T4) ? FromMappedKey(K4, T4.keys) : IsConstructor(T4) ? Constructor(FromRest2(K4, T4.parameters), FromSchemaType(K4, T4.returns), options2) : IsFunction3(T4) ? Function3(FromRest2(K4, T4.parameters), FromSchemaType(K4, T4.returns), options2) : IsAsyncIterator3(T4) ? AsyncIterator2(FromSchemaType(K4, T4.items), options2) : IsIterator3(T4) ? Iterator2(FromSchemaType(K4, T4.items), options2) : IsIntersect(T4) ? Intersect(FromRest2(K4, T4.allOf), options2) : IsUnion(T4) ? Union(FromRest2(K4, T4.anyOf), options2) : IsTuple(T4) ? Tuple(FromRest2(K4, T4.items ?? []), options2) : IsObject3(T4) ? Object2(FromProperties3(K4, T4.properties), options2) : IsArray3(T4) ? Array2(FromSchemaType(K4, T4.items), options2) : IsPromise2(T4) ? Promise2(FromSchemaType(K4, T4.item), options2) : T4;
}
function MappedFunctionReturnType(K4, T4) {
  const Acc = {};
  for (const L4 of K4)
    Acc[L4] = FromSchemaType(L4, T4);
  return Acc;
}
function Mapped(key, map5, options2) {
  const K4 = IsSchema(key) ? IndexPropertyKeys(key) : key;
  const RT = map5({ [Kind]: "MappedKey", keys: K4 });
  const R6 = MappedFunctionReturnType(K4, RT);
  return Object2(R6, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
function RemoveOptional(schema) {
  return CreateType(Discard(schema, [OptionalKind]));
}
function AddOptional(schema) {
  return CreateType({ ...schema, [OptionalKind]: "Optional" });
}
function OptionalWithFlag(schema, F5) {
  return F5 === false ? RemoveOptional(schema) : AddOptional(schema);
}
function Optional(schema, enable2) {
  const F5 = enable2 ?? true;
  return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F5) : OptionalWithFlag(schema, F5);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
function FromProperties4(P4, F5) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(P4))
    Acc[K22] = Optional(P4[K22], F5);
  return Acc;
}
function FromMappedResult4(R6, F5) {
  return FromProperties4(R6.properties, F5);
}
function OptionalFromMappedResult(R6, F5) {
  const P4 = FromMappedResult4(R6, F5);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
function IntersectCreate(T4, options2 = {}) {
  const allObjects = T4.every((schema) => IsObject3(schema));
  const clonedUnevaluatedProperties = IsSchema(options2.unevaluatedProperties) ? { unevaluatedProperties: options2.unevaluatedProperties } : {};
  return CreateType(options2.unevaluatedProperties === false || IsSchema(options2.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T4 } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T4 }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
function IsIntersectOptional(types6) {
  return types6.every((left2) => IsOptional(left2));
}
function RemoveOptionalFromType2(type2) {
  return Discard(type2, [OptionalKind]);
}
function RemoveOptionalFromRest2(types6) {
  return types6.map((left2) => IsOptional(left2) ? RemoveOptionalFromType2(left2) : left2);
}
function ResolveIntersect(types6, options2) {
  return IsIntersectOptional(types6) ? Optional(IntersectCreate(RemoveOptionalFromRest2(types6), options2)) : IntersectCreate(RemoveOptionalFromRest2(types6), options2);
}
function IntersectEvaluated(types6, options2 = {}) {
  if (types6.length === 1)
    return CreateType(types6[0], options2);
  if (types6.length === 0)
    return Never(options2);
  if (types6.some((schema) => IsTransform(schema)))
    throw new Error("Cannot intersect transform types");
  return ResolveIntersect(types6, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
function Intersect(types6, options2) {
  if (types6.length === 1)
    return CreateType(types6[0], options2);
  if (types6.length === 0)
    return Never(options2);
  if (types6.some((schema) => IsTransform(schema)))
    throw new Error("Cannot intersect transform types");
  return IntersectCreate(types6, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
function Ref(...args) {
  const [$ref, options2] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
  if (typeof $ref !== "string")
    throw new TypeBoxError("Ref: $ref must be a string");
  return CreateType({ [Kind]: "Ref", $ref }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
function FromComputed(target, parameters) {
  return Computed("Awaited", [Computed(target, parameters)]);
}
function FromRef($ref) {
  return Computed("Awaited", [Ref($ref)]);
}
function FromIntersect2(types6) {
  return Intersect(FromRest3(types6));
}
function FromUnion4(types6) {
  return Union(FromRest3(types6));
}
function FromPromise(type2) {
  return Awaited(type2);
}
function FromRest3(types6) {
  return types6.map((type2) => Awaited(type2));
}
function Awaited(type2, options2) {
  return CreateType(IsComputed(type2) ? FromComputed(type2.target, type2.parameters) : IsIntersect(type2) ? FromIntersect2(type2.allOf) : IsUnion(type2) ? FromUnion4(type2.anyOf) : IsPromise2(type2) ? FromPromise(type2.item) : IsRef(type2) ? FromRef(type2.$ref) : type2, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
function FromRest4(types6) {
  const result = [];
  for (const L4 of types6)
    result.push(KeyOfPropertyKeys(L4));
  return result;
}
function FromIntersect3(types6) {
  const propertyKeysArray = FromRest4(types6);
  const propertyKeys = SetUnionMany(propertyKeysArray);
  return propertyKeys;
}
function FromUnion5(types6) {
  const propertyKeysArray = FromRest4(types6);
  const propertyKeys = SetIntersectMany(propertyKeysArray);
  return propertyKeys;
}
function FromTuple2(types6) {
  return types6.map((_6, indexer) => indexer.toString());
}
function FromArray2(_6) {
  return ["[number]"];
}
function FromProperties5(T4) {
  return globalThis.Object.getOwnPropertyNames(T4);
}
function FromPatternProperties(patternProperties) {
  if (!includePatternProperties)
    return [];
  const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
  return patternPropertyKeys.map((key) => {
    return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
  });
}
function KeyOfPropertyKeys(type2) {
  return IsIntersect(type2) ? FromIntersect3(type2.allOf) : IsUnion(type2) ? FromUnion5(type2.anyOf) : IsTuple(type2) ? FromTuple2(type2.items ?? []) : IsArray3(type2) ? FromArray2(type2.items) : IsObject3(type2) ? FromProperties5(type2.properties) : IsRecord(type2) ? FromPatternProperties(type2.patternProperties) : [];
}
var includePatternProperties = false;
function KeyOfPattern(schema) {
  includePatternProperties = true;
  const keys = KeyOfPropertyKeys(schema);
  includePatternProperties = false;
  const pattern = keys.map((key) => `(${key})`);
  return `^(${pattern.join("|")})$`;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
function FromComputed2(target, parameters) {
  return Computed("KeyOf", [Computed(target, parameters)]);
}
function FromRef2($ref) {
  return Computed("KeyOf", [Ref($ref)]);
}
function KeyOfFromType(type2, options2) {
  const propertyKeys = KeyOfPropertyKeys(type2);
  const propertyKeyTypes2 = KeyOfPropertyKeysToRest(propertyKeys);
  const result = UnionEvaluated(propertyKeyTypes2);
  return CreateType(result, options2);
}
function KeyOfPropertyKeysToRest(propertyKeys) {
  return propertyKeys.map((L4) => L4 === "[number]" ? Number2() : Literal(L4));
}
function KeyOf(type2, options2) {
  return IsComputed(type2) ? FromComputed2(type2.target, type2.parameters) : IsRef(type2) ? FromRef2(type2.$ref) : IsMappedResult(type2) ? KeyOfFromMappedResult(type2, options2) : KeyOfFromType(type2, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
function FromProperties6(properties2, options2) {
  const result = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(properties2))
    result[K22] = KeyOf(properties2[K22], Clone(options2));
  return result;
}
function FromMappedResult5(mappedResult, options2) {
  return FromProperties6(mappedResult.properties, options2);
}
function KeyOfFromMappedResult(mappedResult, options2) {
  const properties2 = FromMappedResult5(mappedResult, options2);
  return MappedResult(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.mjs
function KeyOfPropertyEntries(schema) {
  const keys = KeyOfPropertyKeys(schema);
  const schemas3 = IndexFromPropertyKeys(schema, keys);
  return keys.map((_6, index2) => [keys[index2], schemas3[index2]]);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
function CompositeKeys(T4) {
  const Acc = [];
  for (const L4 of T4)
    Acc.push(...KeyOfPropertyKeys(L4));
  return SetDistinct(Acc);
}
function FilterNever(T4) {
  return T4.filter((L4) => !IsNever(L4));
}
function CompositeProperty(T4, K4) {
  const Acc = [];
  for (const L4 of T4)
    Acc.push(...IndexFromPropertyKeys(L4, [K4]));
  return FilterNever(Acc);
}
function CompositeProperties(T4, K4) {
  const Acc = {};
  for (const L4 of K4) {
    Acc[L4] = IntersectEvaluated(CompositeProperty(T4, L4));
  }
  return Acc;
}
function Composite(T4, options2) {
  const K4 = CompositeKeys(T4);
  const P4 = CompositeProperties(T4, K4);
  const R6 = Object2(P4, options2);
  return R6;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
function Date2(options2) {
  return CreateType({ [Kind]: "Date", type: "Date" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
function Null(options2) {
  return CreateType({ [Kind]: "Null", type: "null" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
function Symbol2(options2) {
  return CreateType({ [Kind]: "Symbol", type: "symbol" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
function Undefined(options2) {
  return CreateType({ [Kind]: "Undefined", type: "undefined" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
function Uint8Array2(options2) {
  return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
function Unknown(options2) {
  return CreateType({ [Kind]: "Unknown" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
function FromArray3(T4) {
  return T4.map((L4) => FromValue(L4, false));
}
function FromProperties7(value) {
  const Acc = {};
  for (const K4 of globalThis.Object.getOwnPropertyNames(value))
    Acc[K4] = Readonly(FromValue(value[K4], false));
  return Acc;
}
function ConditionalReadonly(T4, root) {
  return root === true ? T4 : Readonly(T4);
}
function FromValue(value, root) {
  return IsAsyncIterator(value) ? ConditionalReadonly(Any(), root) : IsIterator(value) ? ConditionalReadonly(Any(), root) : IsArray(value) ? Readonly(Tuple(FromArray3(value))) : IsUint8Array(value) ? Uint8Array2() : IsDate(value) ? Date2() : IsObject(value) ? ConditionalReadonly(Object2(FromProperties7(value)), root) : IsFunction(value) ? ConditionalReadonly(Function3([], Unknown()), root) : IsUndefined(value) ? Undefined() : IsNull(value) ? Null() : IsSymbol(value) ? Symbol2() : IsBigInt(value) ? BigInt2() : IsNumber(value) ? Literal(value) : IsBoolean(value) ? Literal(value) : IsString(value) ? Literal(value) : Object2({});
}
function Const(T4, options2) {
  return CreateType(FromValue(T4, true), options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
function ConstructorParameters(schema, options2) {
  return IsConstructor(schema) ? Tuple(schema.parameters, options2) : Never(options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
function Enum(item, options2) {
  if (IsUndefined(item))
    throw new Error("Enum undefined or empty");
  const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
  const values2 = [...new Set(values1)];
  const anyOf = values2.map((value) => Literal(value));
  return Union(anyOf, { ...options2, [Hint]: "Enum" });
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
class ExtendsResolverError extends TypeBoxError {
}
var ExtendsResult;
(function(ExtendsResult2) {
  ExtendsResult2[ExtendsResult2["Union"] = 0] = "Union";
  ExtendsResult2[ExtendsResult2["True"] = 1] = "True";
  ExtendsResult2[ExtendsResult2["False"] = 2] = "False";
})(ExtendsResult || (ExtendsResult = {}));
function IntoBooleanResult(result) {
  return result === ExtendsResult.False ? result : ExtendsResult.True;
}
function Throw(message2) {
  throw new ExtendsResolverError(message2);
}
function IsStructuralRight(right2) {
  return exports_type.IsNever(right2) || exports_type.IsIntersect(right2) || exports_type.IsUnion(right2) || exports_type.IsUnknown(right2) || exports_type.IsAny(right2);
}
function StructuralRight(left2, right2) {
  return exports_type.IsNever(right2) ? FromNeverRight(left2, right2) : exports_type.IsIntersect(right2) ? FromIntersectRight(left2, right2) : exports_type.IsUnion(right2) ? FromUnionRight(left2, right2) : exports_type.IsUnknown(right2) ? FromUnknownRight(left2, right2) : exports_type.IsAny(right2) ? FromAnyRight(left2, right2) : Throw("StructuralRight");
}
function FromAnyRight(left2, right2) {
  return ExtendsResult.True;
}
function FromAny(left2, right2) {
  return exports_type.IsIntersect(right2) ? FromIntersectRight(left2, right2) : exports_type.IsUnion(right2) && right2.anyOf.some((schema) => exports_type.IsAny(schema) || exports_type.IsUnknown(schema)) ? ExtendsResult.True : exports_type.IsUnion(right2) ? ExtendsResult.Union : exports_type.IsUnknown(right2) ? ExtendsResult.True : exports_type.IsAny(right2) ? ExtendsResult.True : ExtendsResult.Union;
}
function FromArrayRight(left2, right2) {
  return exports_type.IsUnknown(left2) ? ExtendsResult.False : exports_type.IsAny(left2) ? ExtendsResult.Union : exports_type.IsNever(left2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromArray4(left2, right2) {
  return exports_type.IsObject(right2) && IsObjectArrayLike(right2) ? ExtendsResult.True : IsStructuralRight(right2) ? StructuralRight(left2, right2) : !exports_type.IsArray(right2) ? ExtendsResult.False : IntoBooleanResult(Visit3(left2.items, right2.items));
}
function FromAsyncIterator(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : !exports_type.IsAsyncIterator(right2) ? ExtendsResult.False : IntoBooleanResult(Visit3(left2.items, right2.items));
}
function FromBigInt(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsBigInt(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromBooleanRight(left2, right2) {
  return exports_type.IsLiteralBoolean(left2) ? ExtendsResult.True : exports_type.IsBoolean(left2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromBoolean(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsBoolean(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromConstructor(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : !exports_type.IsConstructor(right2) ? ExtendsResult.False : left2.parameters.length > right2.parameters.length ? ExtendsResult.False : !left2.parameters.every((schema, index2) => IntoBooleanResult(Visit3(right2.parameters[index2], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit3(left2.returns, right2.returns));
}
function FromDate(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsDate(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromFunction(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : !exports_type.IsFunction(right2) ? ExtendsResult.False : left2.parameters.length > right2.parameters.length ? ExtendsResult.False : !left2.parameters.every((schema, index2) => IntoBooleanResult(Visit3(right2.parameters[index2], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit3(left2.returns, right2.returns));
}
function FromIntegerRight(left2, right2) {
  return exports_type.IsLiteral(left2) && exports_value.IsNumber(left2.const) ? ExtendsResult.True : exports_type.IsNumber(left2) || exports_type.IsInteger(left2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromInteger(left2, right2) {
  return exports_type.IsInteger(right2) || exports_type.IsNumber(right2) ? ExtendsResult.True : IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : ExtendsResult.False;
}
function FromIntersectRight(left2, right2) {
  return right2.allOf.every((schema) => Visit3(left2, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
}
function FromIntersect4(left2, right2) {
  return left2.allOf.some((schema) => Visit3(schema, right2) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
}
function FromIterator(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : !exports_type.IsIterator(right2) ? ExtendsResult.False : IntoBooleanResult(Visit3(left2.items, right2.items));
}
function FromLiteral2(left2, right2) {
  return exports_type.IsLiteral(right2) && right2.const === left2.const ? ExtendsResult.True : IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsString(right2) ? FromStringRight(left2, right2) : exports_type.IsNumber(right2) ? FromNumberRight(left2, right2) : exports_type.IsInteger(right2) ? FromIntegerRight(left2, right2) : exports_type.IsBoolean(right2) ? FromBooleanRight(left2, right2) : ExtendsResult.False;
}
function FromNeverRight(left2, right2) {
  return ExtendsResult.False;
}
function FromNever(left2, right2) {
  return ExtendsResult.True;
}
function UnwrapTNot(schema) {
  let [current, depth] = [schema, 0];
  while (true) {
    if (!exports_type.IsNot(current))
      break;
    current = current.not;
    depth += 1;
  }
  return depth % 2 === 0 ? current : Unknown();
}
function FromNot(left2, right2) {
  return exports_type.IsNot(left2) ? Visit3(UnwrapTNot(left2), right2) : exports_type.IsNot(right2) ? Visit3(left2, UnwrapTNot(right2)) : Throw("Invalid fallthrough for Not");
}
function FromNull(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsNull(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromNumberRight(left2, right2) {
  return exports_type.IsLiteralNumber(left2) ? ExtendsResult.True : exports_type.IsNumber(left2) || exports_type.IsInteger(left2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromNumber(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsInteger(right2) || exports_type.IsNumber(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function IsObjectPropertyCount(schema, count2) {
  return Object.getOwnPropertyNames(schema.properties).length === count2;
}
function IsObjectStringLike(schema) {
  return IsObjectArrayLike(schema);
}
function IsObjectSymbolLike(schema) {
  return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "description" in schema.properties && exports_type.IsUnion(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (exports_type.IsString(schema.properties.description.anyOf[0]) && exports_type.IsUndefined(schema.properties.description.anyOf[1]) || exports_type.IsString(schema.properties.description.anyOf[1]) && exports_type.IsUndefined(schema.properties.description.anyOf[0]));
}
function IsObjectNumberLike(schema) {
  return IsObjectPropertyCount(schema, 0);
}
function IsObjectBooleanLike(schema) {
  return IsObjectPropertyCount(schema, 0);
}
function IsObjectBigIntLike(schema) {
  return IsObjectPropertyCount(schema, 0);
}
function IsObjectDateLike(schema) {
  return IsObjectPropertyCount(schema, 0);
}
function IsObjectUint8ArrayLike(schema) {
  return IsObjectArrayLike(schema);
}
function IsObjectFunctionLike(schema) {
  const length2 = Number2();
  return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length2)) === ExtendsResult.True;
}
function IsObjectConstructorLike(schema) {
  return IsObjectPropertyCount(schema, 0);
}
function IsObjectArrayLike(schema) {
  const length2 = Number2();
  return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length2)) === ExtendsResult.True;
}
function IsObjectPromiseLike(schema) {
  const then = Function3([Any()], Any());
  return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit3(schema.properties["then"], then)) === ExtendsResult.True;
}
function Property(left2, right2) {
  return Visit3(left2, right2) === ExtendsResult.False ? ExtendsResult.False : exports_type.IsOptional(left2) && !exports_type.IsOptional(right2) ? ExtendsResult.False : ExtendsResult.True;
}
function FromObjectRight(left2, right2) {
  return exports_type.IsUnknown(left2) ? ExtendsResult.False : exports_type.IsAny(left2) ? ExtendsResult.Union : exports_type.IsNever(left2) || exports_type.IsLiteralString(left2) && IsObjectStringLike(right2) || exports_type.IsLiteralNumber(left2) && IsObjectNumberLike(right2) || exports_type.IsLiteralBoolean(left2) && IsObjectBooleanLike(right2) || exports_type.IsSymbol(left2) && IsObjectSymbolLike(right2) || exports_type.IsBigInt(left2) && IsObjectBigIntLike(right2) || exports_type.IsString(left2) && IsObjectStringLike(right2) || exports_type.IsSymbol(left2) && IsObjectSymbolLike(right2) || exports_type.IsNumber(left2) && IsObjectNumberLike(right2) || exports_type.IsInteger(left2) && IsObjectNumberLike(right2) || exports_type.IsBoolean(left2) && IsObjectBooleanLike(right2) || exports_type.IsUint8Array(left2) && IsObjectUint8ArrayLike(right2) || exports_type.IsDate(left2) && IsObjectDateLike(right2) || exports_type.IsConstructor(left2) && IsObjectConstructorLike(right2) || exports_type.IsFunction(left2) && IsObjectFunctionLike(right2) ? ExtendsResult.True : exports_type.IsRecord(left2) && exports_type.IsString(RecordKey(left2)) ? (() => {
    return right2[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False;
  })() : exports_type.IsRecord(left2) && exports_type.IsNumber(RecordKey(left2)) ? (() => {
    return IsObjectPropertyCount(right2, 0) ? ExtendsResult.True : ExtendsResult.False;
  })() : ExtendsResult.False;
}
function FromObject(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : !exports_type.IsObject(right2) ? ExtendsResult.False : (() => {
    for (const key of Object.getOwnPropertyNames(right2.properties)) {
      if (!(key in left2.properties) && !exports_type.IsOptional(right2.properties[key])) {
        return ExtendsResult.False;
      }
      if (exports_type.IsOptional(right2.properties[key])) {
        return ExtendsResult.True;
      }
      if (Property(left2.properties[key], right2.properties[key]) === ExtendsResult.False) {
        return ExtendsResult.False;
      }
    }
    return ExtendsResult.True;
  })();
}
function FromPromise2(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) && IsObjectPromiseLike(right2) ? ExtendsResult.True : !exports_type.IsPromise(right2) ? ExtendsResult.False : IntoBooleanResult(Visit3(left2.item, right2.item));
}
function RecordKey(schema) {
  return PatternNumberExact in schema.patternProperties ? Number2() : (PatternStringExact in schema.patternProperties) ? String2() : Throw("Unknown record key pattern");
}
function RecordValue(schema) {
  return PatternNumberExact in schema.patternProperties ? schema.patternProperties[PatternNumberExact] : (PatternStringExact in schema.patternProperties) ? schema.patternProperties[PatternStringExact] : Throw("Unable to get record value schema");
}
function FromRecordRight(left2, right2) {
  const [Key, Value] = [RecordKey(right2), RecordValue(right2)];
  return exports_type.IsLiteralString(left2) && exports_type.IsNumber(Key) && IntoBooleanResult(Visit3(left2, Value)) === ExtendsResult.True ? ExtendsResult.True : exports_type.IsUint8Array(left2) && exports_type.IsNumber(Key) ? Visit3(left2, Value) : exports_type.IsString(left2) && exports_type.IsNumber(Key) ? Visit3(left2, Value) : exports_type.IsArray(left2) && exports_type.IsNumber(Key) ? Visit3(left2, Value) : exports_type.IsObject(left2) ? (() => {
    for (const key of Object.getOwnPropertyNames(left2.properties)) {
      if (Property(Value, left2.properties[key]) === ExtendsResult.False) {
        return ExtendsResult.False;
      }
    }
    return ExtendsResult.True;
  })() : ExtendsResult.False;
}
function FromRecord(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : !exports_type.IsRecord(right2) ? ExtendsResult.False : Visit3(RecordValue(left2), RecordValue(right2));
}
function FromRegExp(left2, right2) {
  const L4 = exports_type.IsRegExp(left2) ? String2() : left2;
  const R6 = exports_type.IsRegExp(right2) ? String2() : right2;
  return Visit3(L4, R6);
}
function FromStringRight(left2, right2) {
  return exports_type.IsLiteral(left2) && exports_value.IsString(left2.const) ? ExtendsResult.True : exports_type.IsString(left2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromString(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsString(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromSymbol(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsSymbol(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromTemplateLiteral2(left2, right2) {
  return exports_type.IsTemplateLiteral(left2) ? Visit3(TemplateLiteralToUnion(left2), right2) : exports_type.IsTemplateLiteral(right2) ? Visit3(left2, TemplateLiteralToUnion(right2)) : Throw("Invalid fallthrough for TemplateLiteral");
}
function IsArrayOfTuple(left2, right2) {
  return exports_type.IsArray(right2) && left2.items !== undefined && left2.items.every((schema) => Visit3(schema, right2.items) === ExtendsResult.True);
}
function FromTupleRight(left2, right2) {
  return exports_type.IsNever(left2) ? ExtendsResult.True : exports_type.IsUnknown(left2) ? ExtendsResult.False : exports_type.IsAny(left2) ? ExtendsResult.Union : ExtendsResult.False;
}
function FromTuple3(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) && IsObjectArrayLike(right2) ? ExtendsResult.True : exports_type.IsArray(right2) && IsArrayOfTuple(left2, right2) ? ExtendsResult.True : !exports_type.IsTuple(right2) ? ExtendsResult.False : exports_value.IsUndefined(left2.items) && !exports_value.IsUndefined(right2.items) || !exports_value.IsUndefined(left2.items) && exports_value.IsUndefined(right2.items) ? ExtendsResult.False : exports_value.IsUndefined(left2.items) && !exports_value.IsUndefined(right2.items) ? ExtendsResult.True : left2.items.every((schema, index2) => Visit3(schema, right2.items[index2]) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
}
function FromUint8Array(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsUint8Array(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromUndefined(left2, right2) {
  return IsStructuralRight(right2) ? StructuralRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsRecord(right2) ? FromRecordRight(left2, right2) : exports_type.IsVoid(right2) ? FromVoidRight(left2, right2) : exports_type.IsUndefined(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromUnionRight(left2, right2) {
  return right2.anyOf.some((schema) => Visit3(left2, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
}
function FromUnion6(left2, right2) {
  return left2.anyOf.every((schema) => Visit3(schema, right2) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
}
function FromUnknownRight(left2, right2) {
  return ExtendsResult.True;
}
function FromUnknown(left2, right2) {
  return exports_type.IsNever(right2) ? FromNeverRight(left2, right2) : exports_type.IsIntersect(right2) ? FromIntersectRight(left2, right2) : exports_type.IsUnion(right2) ? FromUnionRight(left2, right2) : exports_type.IsAny(right2) ? FromAnyRight(left2, right2) : exports_type.IsString(right2) ? FromStringRight(left2, right2) : exports_type.IsNumber(right2) ? FromNumberRight(left2, right2) : exports_type.IsInteger(right2) ? FromIntegerRight(left2, right2) : exports_type.IsBoolean(right2) ? FromBooleanRight(left2, right2) : exports_type.IsArray(right2) ? FromArrayRight(left2, right2) : exports_type.IsTuple(right2) ? FromTupleRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsUnknown(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromVoidRight(left2, right2) {
  return exports_type.IsUndefined(left2) ? ExtendsResult.True : exports_type.IsUndefined(left2) ? ExtendsResult.True : ExtendsResult.False;
}
function FromVoid(left2, right2) {
  return exports_type.IsIntersect(right2) ? FromIntersectRight(left2, right2) : exports_type.IsUnion(right2) ? FromUnionRight(left2, right2) : exports_type.IsUnknown(right2) ? FromUnknownRight(left2, right2) : exports_type.IsAny(right2) ? FromAnyRight(left2, right2) : exports_type.IsObject(right2) ? FromObjectRight(left2, right2) : exports_type.IsVoid(right2) ? ExtendsResult.True : ExtendsResult.False;
}
function Visit3(left2, right2) {
  return exports_type.IsTemplateLiteral(left2) || exports_type.IsTemplateLiteral(right2) ? FromTemplateLiteral2(left2, right2) : exports_type.IsRegExp(left2) || exports_type.IsRegExp(right2) ? FromRegExp(left2, right2) : exports_type.IsNot(left2) || exports_type.IsNot(right2) ? FromNot(left2, right2) : exports_type.IsAny(left2) ? FromAny(left2, right2) : exports_type.IsArray(left2) ? FromArray4(left2, right2) : exports_type.IsBigInt(left2) ? FromBigInt(left2, right2) : exports_type.IsBoolean(left2) ? FromBoolean(left2, right2) : exports_type.IsAsyncIterator(left2) ? FromAsyncIterator(left2, right2) : exports_type.IsConstructor(left2) ? FromConstructor(left2, right2) : exports_type.IsDate(left2) ? FromDate(left2, right2) : exports_type.IsFunction(left2) ? FromFunction(left2, right2) : exports_type.IsInteger(left2) ? FromInteger(left2, right2) : exports_type.IsIntersect(left2) ? FromIntersect4(left2, right2) : exports_type.IsIterator(left2) ? FromIterator(left2, right2) : exports_type.IsLiteral(left2) ? FromLiteral2(left2, right2) : exports_type.IsNever(left2) ? FromNever(left2, right2) : exports_type.IsNull(left2) ? FromNull(left2, right2) : exports_type.IsNumber(left2) ? FromNumber(left2, right2) : exports_type.IsObject(left2) ? FromObject(left2, right2) : exports_type.IsRecord(left2) ? FromRecord(left2, right2) : exports_type.IsString(left2) ? FromString(left2, right2) : exports_type.IsSymbol(left2) ? FromSymbol(left2, right2) : exports_type.IsTuple(left2) ? FromTuple3(left2, right2) : exports_type.IsPromise(left2) ? FromPromise2(left2, right2) : exports_type.IsUint8Array(left2) ? FromUint8Array(left2, right2) : exports_type.IsUndefined(left2) ? FromUndefined(left2, right2) : exports_type.IsUnion(left2) ? FromUnion6(left2, right2) : exports_type.IsUnknown(left2) ? FromUnknown(left2, right2) : exports_type.IsVoid(left2) ? FromVoid(left2, right2) : Throw(`Unknown left type operand '${left2[Kind]}'`);
}
function ExtendsCheck(left2, right2) {
  return Visit3(left2, right2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
function FromProperties8(P4, Right, True, False, options2) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(P4))
    Acc[K22] = Extends(P4[K22], Right, True, False, Clone(options2));
  return Acc;
}
function FromMappedResult6(Left, Right, True, False, options2) {
  return FromProperties8(Left.properties, Right, True, False, options2);
}
function ExtendsFromMappedResult(Left, Right, True, False, options2) {
  const P4 = FromMappedResult6(Left, Right, True, False, options2);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
function ExtendsResolve(left2, right2, trueType, falseType) {
  const R6 = ExtendsCheck(left2, right2);
  return R6 === ExtendsResult.Union ? Union([trueType, falseType]) : R6 === ExtendsResult.True ? trueType : falseType;
}
function Extends(L4, R6, T4, F5, options2) {
  return IsMappedResult(L4) ? ExtendsFromMappedResult(L4, R6, T4, F5, options2) : IsMappedKey(L4) ? CreateType(ExtendsFromMappedKey(L4, R6, T4, F5, options2)) : CreateType(ExtendsResolve(L4, R6, T4, F5), options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
function FromPropertyKey(K4, U6, L4, R6, options2) {
  return {
    [K4]: Extends(Literal(K4), U6, L4, R6, Clone(options2))
  };
}
function FromPropertyKeys(K4, U6, L4, R6, options2) {
  return K4.reduce((Acc, LK) => {
    return { ...Acc, ...FromPropertyKey(LK, U6, L4, R6, options2) };
  }, {});
}
function FromMappedKey2(K4, U6, L4, R6, options2) {
  return FromPropertyKeys(K4.keys, U6, L4, R6, options2);
}
function ExtendsFromMappedKey(T4, U6, L4, R6, options2) {
  const P4 = FromMappedKey2(T4, U6, L4, R6, options2);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extends/extends-undefined.mjs
function Intersect2(schema) {
  return schema.allOf.every((schema2) => ExtendsUndefinedCheck(schema2));
}
function Union2(schema) {
  return schema.anyOf.some((schema2) => ExtendsUndefinedCheck(schema2));
}
function Not(schema) {
  return !ExtendsUndefinedCheck(schema.not);
}
function ExtendsUndefinedCheck(schema) {
  return schema[Kind] === "Intersect" ? Intersect2(schema) : schema[Kind] === "Union" ? Union2(schema) : schema[Kind] === "Not" ? Not(schema) : schema[Kind] === "Undefined" ? true : false;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
function ExcludeFromTemplateLiteral(L4, R6) {
  return Exclude(TemplateLiteralToUnion(L4), R6);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
function ExcludeRest(L4, R6) {
  const excluded = L4.filter((inner) => ExtendsCheck(inner, R6) === ExtendsResult.False);
  return excluded.length === 1 ? excluded[0] : Union(excluded);
}
function Exclude(L4, R6, options2 = {}) {
  if (IsTemplateLiteral(L4))
    return CreateType(ExcludeFromTemplateLiteral(L4, R6), options2);
  if (IsMappedResult(L4))
    return CreateType(ExcludeFromMappedResult(L4, R6), options2);
  return CreateType(IsUnion(L4) ? ExcludeRest(L4.anyOf, R6) : ExtendsCheck(L4, R6) !== ExtendsResult.False ? Never() : L4, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
function FromProperties9(P4, U6) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(P4))
    Acc[K22] = Exclude(P4[K22], U6);
  return Acc;
}
function FromMappedResult7(R6, T4) {
  return FromProperties9(R6.properties, T4);
}
function ExcludeFromMappedResult(R6, T4) {
  const P4 = FromMappedResult7(R6, T4);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
function ExtractFromTemplateLiteral(L4, R6) {
  return Extract(TemplateLiteralToUnion(L4), R6);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
function ExtractRest(L4, R6) {
  const extracted = L4.filter((inner) => ExtendsCheck(inner, R6) !== ExtendsResult.False);
  return extracted.length === 1 ? extracted[0] : Union(extracted);
}
function Extract(L4, R6, options2) {
  if (IsTemplateLiteral(L4))
    return CreateType(ExtractFromTemplateLiteral(L4, R6), options2);
  if (IsMappedResult(L4))
    return CreateType(ExtractFromMappedResult(L4, R6), options2);
  return CreateType(IsUnion(L4) ? ExtractRest(L4.anyOf, R6) : ExtendsCheck(L4, R6) !== ExtendsResult.False ? L4 : Never(), options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
function FromProperties10(P4, T4) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(P4))
    Acc[K22] = Extract(P4[K22], T4);
  return Acc;
}
function FromMappedResult8(R6, T4) {
  return FromProperties10(R6.properties, T4);
}
function ExtractFromMappedResult(R6, T4) {
  const P4 = FromMappedResult8(R6, T4);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
function InstanceType(schema, options2) {
  return IsConstructor(schema) ? CreateType(schema.returns, options2) : Never(options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
function ReadonlyOptional(schema) {
  return Readonly(Optional(schema));
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
function RecordCreateFromPattern(pattern, T4, options2) {
  return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T4 } }, options2);
}
function RecordCreateFromKeys(K4, T4, options2) {
  const result = {};
  for (const K22 of K4)
    result[K22] = T4;
  return Object2(result, { ...options2, [Hint]: "Record" });
}
function FromTemplateLiteralKey(K4, T4, options2) {
  return IsTemplateLiteralFinite(K4) ? RecordCreateFromKeys(IndexPropertyKeys(K4), T4, options2) : RecordCreateFromPattern(K4.pattern, T4, options2);
}
function FromUnionKey(key, type2, options2) {
  return RecordCreateFromKeys(IndexPropertyKeys(Union(key)), type2, options2);
}
function FromLiteralKey(key, type2, options2) {
  return RecordCreateFromKeys([key.toString()], type2, options2);
}
function FromRegExpKey(key, type2, options2) {
  return RecordCreateFromPattern(key.source, type2, options2);
}
function FromStringKey(key, type2, options2) {
  const pattern = IsUndefined(key.pattern) ? PatternStringExact : key.pattern;
  return RecordCreateFromPattern(pattern, type2, options2);
}
function FromAnyKey(_6, type2, options2) {
  return RecordCreateFromPattern(PatternStringExact, type2, options2);
}
function FromNeverKey(_key, type2, options2) {
  return RecordCreateFromPattern(PatternNeverExact, type2, options2);
}
function FromBooleanKey(_key, type2, options2) {
  return Object2({ true: type2, false: type2 }, options2);
}
function FromIntegerKey(_key, type2, options2) {
  return RecordCreateFromPattern(PatternNumberExact, type2, options2);
}
function FromNumberKey(_6, type2, options2) {
  return RecordCreateFromPattern(PatternNumberExact, type2, options2);
}
function Record(key, type2, options2 = {}) {
  return IsUnion(key) ? FromUnionKey(key.anyOf, type2, options2) : IsTemplateLiteral(key) ? FromTemplateLiteralKey(key, type2, options2) : IsLiteral(key) ? FromLiteralKey(key.const, type2, options2) : IsBoolean3(key) ? FromBooleanKey(key, type2, options2) : IsInteger2(key) ? FromIntegerKey(key, type2, options2) : IsNumber3(key) ? FromNumberKey(key, type2, options2) : IsRegExp2(key) ? FromRegExpKey(key, type2, options2) : IsString3(key) ? FromStringKey(key, type2, options2) : IsAny(key) ? FromAnyKey(key, type2, options2) : IsNever(key) ? FromNeverKey(key, type2, options2) : Never(options2);
}
function RecordPattern(record2) {
  return globalThis.Object.getOwnPropertyNames(record2.patternProperties)[0];
}
function RecordKey2(type2) {
  const pattern = RecordPattern(type2);
  return pattern === PatternStringExact ? String2() : pattern === PatternNumberExact ? Number2() : String2({ pattern });
}
function RecordValue2(type2) {
  return type2.patternProperties[RecordPattern(type2)];
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
function FromConstructor2(args, type2) {
  type2.parameters = FromTypes(args, type2.parameters);
  type2.returns = FromType(args, type2.returns);
  return type2;
}
function FromFunction2(args, type2) {
  type2.parameters = FromTypes(args, type2.parameters);
  type2.returns = FromType(args, type2.returns);
  return type2;
}
function FromIntersect5(args, type2) {
  type2.allOf = FromTypes(args, type2.allOf);
  return type2;
}
function FromUnion7(args, type2) {
  type2.anyOf = FromTypes(args, type2.anyOf);
  return type2;
}
function FromTuple4(args, type2) {
  if (IsUndefined(type2.items))
    return type2;
  type2.items = FromTypes(args, type2.items);
  return type2;
}
function FromArray5(args, type2) {
  type2.items = FromType(args, type2.items);
  return type2;
}
function FromAsyncIterator2(args, type2) {
  type2.items = FromType(args, type2.items);
  return type2;
}
function FromIterator2(args, type2) {
  type2.items = FromType(args, type2.items);
  return type2;
}
function FromPromise3(args, type2) {
  type2.item = FromType(args, type2.item);
  return type2;
}
function FromObject2(args, type2) {
  const mappedProperties = FromProperties11(args, type2.properties);
  return { ...type2, ...Object2(mappedProperties) };
}
function FromRecord2(args, type2) {
  const mappedKey = FromType(args, RecordKey2(type2));
  const mappedValue = FromType(args, RecordValue2(type2));
  const result = Record(mappedKey, mappedValue);
  return { ...type2, ...result };
}
function FromArgument(args, argument) {
  return argument.index in args ? args[argument.index] : Unknown();
}
function FromProperty2(args, type2) {
  const isReadonly = IsReadonly(type2);
  const isOptional = IsOptional(type2);
  const mapped = FromType(args, type2);
  return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped;
}
function FromProperties11(args, properties2) {
  return globalThis.Object.getOwnPropertyNames(properties2).reduce((result, key) => {
    return { ...result, [key]: FromProperty2(args, properties2[key]) };
  }, {});
}
function FromTypes(args, types6) {
  return types6.map((type2) => FromType(args, type2));
}
function FromType(args, type2) {
  return IsConstructor(type2) ? FromConstructor2(args, type2) : IsFunction3(type2) ? FromFunction2(args, type2) : IsIntersect(type2) ? FromIntersect5(args, type2) : IsUnion(type2) ? FromUnion7(args, type2) : IsTuple(type2) ? FromTuple4(args, type2) : IsArray3(type2) ? FromArray5(args, type2) : IsAsyncIterator3(type2) ? FromAsyncIterator2(args, type2) : IsIterator3(type2) ? FromIterator2(args, type2) : IsPromise2(type2) ? FromPromise3(args, type2) : IsObject3(type2) ? FromObject2(args, type2) : IsRecord(type2) ? FromRecord2(args, type2) : IsArgument(type2) ? FromArgument(args, type2) : type2;
}
function Instantiate(type2, args) {
  return FromType(args, CloneType(type2));
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
function Integer(options2) {
  return CreateType({ [Kind]: "Integer", type: "integer" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
function MappedIntrinsicPropertyKey(K4, M4, options2) {
  return {
    [K4]: Intrinsic(Literal(K4), M4, Clone(options2))
  };
}
function MappedIntrinsicPropertyKeys(K4, M4, options2) {
  const result = K4.reduce((Acc, L4) => {
    return { ...Acc, ...MappedIntrinsicPropertyKey(L4, M4, options2) };
  }, {});
  return result;
}
function MappedIntrinsicProperties(T4, M4, options2) {
  return MappedIntrinsicPropertyKeys(T4["keys"], M4, options2);
}
function IntrinsicFromMappedKey(T4, M4, options2) {
  const P4 = MappedIntrinsicProperties(T4, M4, options2);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
function ApplyUncapitalize(value) {
  const [first, rest] = [value.slice(0, 1), value.slice(1)];
  return [first.toLowerCase(), rest].join("");
}
function ApplyCapitalize(value) {
  const [first, rest] = [value.slice(0, 1), value.slice(1)];
  return [first.toUpperCase(), rest].join("");
}
function ApplyUppercase(value) {
  return value.toUpperCase();
}
function ApplyLowercase(value) {
  return value.toLowerCase();
}
function FromTemplateLiteral3(schema, mode, options2) {
  const expression = TemplateLiteralParseExact(schema.pattern);
  const finite = IsTemplateLiteralExpressionFinite(expression);
  if (!finite)
    return { ...schema, pattern: FromLiteralValue(schema.pattern, mode) };
  const strings = [...TemplateLiteralExpressionGenerate(expression)];
  const literals = strings.map((value) => Literal(value));
  const mapped = FromRest5(literals, mode);
  const union3 = Union(mapped);
  return TemplateLiteral([union3], options2);
}
function FromLiteralValue(value, mode) {
  return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize(value) : mode === "Capitalize" ? ApplyCapitalize(value) : mode === "Uppercase" ? ApplyUppercase(value) : mode === "Lowercase" ? ApplyLowercase(value) : value : value.toString();
}
function FromRest5(T4, M4) {
  return T4.map((L4) => Intrinsic(L4, M4));
}
function Intrinsic(schema, mode, options2 = {}) {
  return IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options2) : IsTemplateLiteral(schema) ? FromTemplateLiteral3(schema, mode, options2) : IsUnion(schema) ? Union(FromRest5(schema.anyOf, mode), options2) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options2) : CreateType(schema, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
function Capitalize(T4, options2 = {}) {
  return Intrinsic(T4, "Capitalize", options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
function Lowercase(T4, options2 = {}) {
  return Intrinsic(T4, "Lowercase", options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
function Uncapitalize(T4, options2 = {}) {
  return Intrinsic(T4, "Uncapitalize", options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
function Uppercase(T4, options2 = {}) {
  return Intrinsic(T4, "Uppercase", options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
function FromProperties12(properties2, propertyKeys, options2) {
  const result = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(properties2))
    result[K22] = Omit(properties2[K22], propertyKeys, Clone(options2));
  return result;
}
function FromMappedResult9(mappedResult, propertyKeys, options2) {
  return FromProperties12(mappedResult.properties, propertyKeys, options2);
}
function OmitFromMappedResult(mappedResult, propertyKeys, options2) {
  const properties2 = FromMappedResult9(mappedResult, propertyKeys, options2);
  return MappedResult(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
function FromIntersect6(types6, propertyKeys) {
  return types6.map((type2) => OmitResolve(type2, propertyKeys));
}
function FromUnion8(types6, propertyKeys) {
  return types6.map((type2) => OmitResolve(type2, propertyKeys));
}
function FromProperty3(properties2, key) {
  const { [key]: _6, ...R6 } = properties2;
  return R6;
}
function FromProperties13(properties2, propertyKeys) {
  return propertyKeys.reduce((T4, K22) => FromProperty3(T4, K22), properties2);
}
function FromObject3(type2, propertyKeys, properties2) {
  const options2 = Discard(type2, [TransformKind, "$id", "required", "properties"]);
  const mappedProperties = FromProperties13(properties2, propertyKeys);
  return Object2(mappedProperties, options2);
}
function UnionFromPropertyKeys(propertyKeys) {
  const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
  return Union(result);
}
function OmitResolve(type2, propertyKeys) {
  return IsIntersect(type2) ? Intersect(FromIntersect6(type2.allOf, propertyKeys)) : IsUnion(type2) ? Union(FromUnion8(type2.anyOf, propertyKeys)) : IsObject3(type2) ? FromObject3(type2, propertyKeys, type2.properties) : Object2({});
}
function Omit(type2, key, options2) {
  const typeKey = IsArray(key) ? UnionFromPropertyKeys(key) : key;
  const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
  const isTypeRef = IsRef(type2);
  const isKeyRef = IsRef(key);
  return IsMappedResult(type2) ? OmitFromMappedResult(type2, propertyKeys, options2) : IsMappedKey(key) ? OmitFromMappedKey(type2, key, options2) : isTypeRef && isKeyRef ? Computed("Omit", [type2, typeKey], options2) : !isTypeRef && isKeyRef ? Computed("Omit", [type2, typeKey], options2) : isTypeRef && !isKeyRef ? Computed("Omit", [type2, typeKey], options2) : CreateType({ ...OmitResolve(type2, propertyKeys), ...options2 });
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
function FromPropertyKey2(type2, key, options2) {
  return { [key]: Omit(type2, [key], Clone(options2)) };
}
function FromPropertyKeys2(type2, propertyKeys, options2) {
  return propertyKeys.reduce((Acc, LK) => {
    return { ...Acc, ...FromPropertyKey2(type2, LK, options2) };
  }, {});
}
function FromMappedKey3(type2, mappedKey, options2) {
  return FromPropertyKeys2(type2, mappedKey.keys, options2);
}
function OmitFromMappedKey(type2, mappedKey, options2) {
  const properties2 = FromMappedKey3(type2, mappedKey, options2);
  return MappedResult(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
function FromProperties14(properties2, propertyKeys, options2) {
  const result = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(properties2))
    result[K22] = Pick(properties2[K22], propertyKeys, Clone(options2));
  return result;
}
function FromMappedResult10(mappedResult, propertyKeys, options2) {
  return FromProperties14(mappedResult.properties, propertyKeys, options2);
}
function PickFromMappedResult(mappedResult, propertyKeys, options2) {
  const properties2 = FromMappedResult10(mappedResult, propertyKeys, options2);
  return MappedResult(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
function FromIntersect7(types6, propertyKeys) {
  return types6.map((type2) => PickResolve(type2, propertyKeys));
}
function FromUnion9(types6, propertyKeys) {
  return types6.map((type2) => PickResolve(type2, propertyKeys));
}
function FromProperties15(properties2, propertyKeys) {
  const result = {};
  for (const K22 of propertyKeys)
    if (K22 in properties2)
      result[K22] = properties2[K22];
  return result;
}
function FromObject4(Type, keys, properties2) {
  const options2 = Discard(Type, [TransformKind, "$id", "required", "properties"]);
  const mappedProperties = FromProperties15(properties2, keys);
  return Object2(mappedProperties, options2);
}
function UnionFromPropertyKeys2(propertyKeys) {
  const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
  return Union(result);
}
function PickResolve(type2, propertyKeys) {
  return IsIntersect(type2) ? Intersect(FromIntersect7(type2.allOf, propertyKeys)) : IsUnion(type2) ? Union(FromUnion9(type2.anyOf, propertyKeys)) : IsObject3(type2) ? FromObject4(type2, propertyKeys, type2.properties) : Object2({});
}
function Pick(type2, key, options2) {
  const typeKey = IsArray(key) ? UnionFromPropertyKeys2(key) : key;
  const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
  const isTypeRef = IsRef(type2);
  const isKeyRef = IsRef(key);
  return IsMappedResult(type2) ? PickFromMappedResult(type2, propertyKeys, options2) : IsMappedKey(key) ? PickFromMappedKey(type2, key, options2) : isTypeRef && isKeyRef ? Computed("Pick", [type2, typeKey], options2) : !isTypeRef && isKeyRef ? Computed("Pick", [type2, typeKey], options2) : isTypeRef && !isKeyRef ? Computed("Pick", [type2, typeKey], options2) : CreateType({ ...PickResolve(type2, propertyKeys), ...options2 });
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
function FromPropertyKey3(type2, key, options2) {
  return {
    [key]: Pick(type2, [key], Clone(options2))
  };
}
function FromPropertyKeys3(type2, propertyKeys, options2) {
  return propertyKeys.reduce((result, leftKey) => {
    return { ...result, ...FromPropertyKey3(type2, leftKey, options2) };
  }, {});
}
function FromMappedKey4(type2, mappedKey, options2) {
  return FromPropertyKeys3(type2, mappedKey.keys, options2);
}
function PickFromMappedKey(type2, mappedKey, options2) {
  const properties2 = FromMappedKey4(type2, mappedKey, options2);
  return MappedResult(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
function FromComputed3(target, parameters) {
  return Computed("Partial", [Computed(target, parameters)]);
}
function FromRef3($ref) {
  return Computed("Partial", [Ref($ref)]);
}
function FromProperties16(properties2) {
  const partialProperties = {};
  for (const K4 of globalThis.Object.getOwnPropertyNames(properties2))
    partialProperties[K4] = Optional(properties2[K4]);
  return partialProperties;
}
function FromObject5(type2, properties2) {
  const options2 = Discard(type2, [TransformKind, "$id", "required", "properties"]);
  const mappedProperties = FromProperties16(properties2);
  return Object2(mappedProperties, options2);
}
function FromRest6(types6) {
  return types6.map((type2) => PartialResolve(type2));
}
function PartialResolve(type2) {
  return IsComputed(type2) ? FromComputed3(type2.target, type2.parameters) : IsRef(type2) ? FromRef3(type2.$ref) : IsIntersect(type2) ? Intersect(FromRest6(type2.allOf)) : IsUnion(type2) ? Union(FromRest6(type2.anyOf)) : IsObject3(type2) ? FromObject5(type2, type2.properties) : IsBigInt3(type2) ? type2 : IsBoolean3(type2) ? type2 : IsInteger2(type2) ? type2 : IsLiteral(type2) ? type2 : IsNull3(type2) ? type2 : IsNumber3(type2) ? type2 : IsString3(type2) ? type2 : IsSymbol3(type2) ? type2 : IsUndefined3(type2) ? type2 : Object2({});
}
function Partial(type2, options2) {
  if (IsMappedResult(type2)) {
    return PartialFromMappedResult(type2, options2);
  } else {
    return CreateType({ ...PartialResolve(type2), ...options2 });
  }
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
function FromProperties17(K4, options2) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(K4))
    Acc[K22] = Partial(K4[K22], Clone(options2));
  return Acc;
}
function FromMappedResult11(R6, options2) {
  return FromProperties17(R6.properties, options2);
}
function PartialFromMappedResult(R6, options2) {
  const P4 = FromMappedResult11(R6, options2);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
function FromComputed4(target, parameters) {
  return Computed("Required", [Computed(target, parameters)]);
}
function FromRef4($ref) {
  return Computed("Required", [Ref($ref)]);
}
function FromProperties18(properties2) {
  const requiredProperties = {};
  for (const K4 of globalThis.Object.getOwnPropertyNames(properties2))
    requiredProperties[K4] = Discard(properties2[K4], [OptionalKind]);
  return requiredProperties;
}
function FromObject6(type2, properties2) {
  const options2 = Discard(type2, [TransformKind, "$id", "required", "properties"]);
  const mappedProperties = FromProperties18(properties2);
  return Object2(mappedProperties, options2);
}
function FromRest7(types6) {
  return types6.map((type2) => RequiredResolve(type2));
}
function RequiredResolve(type2) {
  return IsComputed(type2) ? FromComputed4(type2.target, type2.parameters) : IsRef(type2) ? FromRef4(type2.$ref) : IsIntersect(type2) ? Intersect(FromRest7(type2.allOf)) : IsUnion(type2) ? Union(FromRest7(type2.anyOf)) : IsObject3(type2) ? FromObject6(type2, type2.properties) : IsBigInt3(type2) ? type2 : IsBoolean3(type2) ? type2 : IsInteger2(type2) ? type2 : IsLiteral(type2) ? type2 : IsNull3(type2) ? type2 : IsNumber3(type2) ? type2 : IsString3(type2) ? type2 : IsSymbol3(type2) ? type2 : IsUndefined3(type2) ? type2 : Object2({});
}
function Required(type2, options2) {
  if (IsMappedResult(type2)) {
    return RequiredFromMappedResult(type2, options2);
  } else {
    return CreateType({ ...RequiredResolve(type2), ...options2 });
  }
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
function FromProperties19(P4, options2) {
  const Acc = {};
  for (const K22 of globalThis.Object.getOwnPropertyNames(P4))
    Acc[K22] = Required(P4[K22], options2);
  return Acc;
}
function FromMappedResult12(R6, options2) {
  return FromProperties19(R6.properties, options2);
}
function RequiredFromMappedResult(R6, options2) {
  const P4 = FromMappedResult12(R6, options2);
  return MappedResult(P4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
function DereferenceParameters(moduleProperties, types6) {
  return types6.map((type2) => {
    return IsRef(type2) ? Dereference(moduleProperties, type2.$ref) : FromType2(moduleProperties, type2);
  });
}
function Dereference(moduleProperties, ref) {
  return ref in moduleProperties ? IsRef(moduleProperties[ref]) ? Dereference(moduleProperties, moduleProperties[ref].$ref) : FromType2(moduleProperties, moduleProperties[ref]) : Never();
}
function FromAwaited(parameters) {
  return Awaited(parameters[0]);
}
function FromIndex(parameters) {
  return Index2(parameters[0], parameters[1]);
}
function FromKeyOf(parameters) {
  return KeyOf(parameters[0]);
}
function FromPartial(parameters) {
  return Partial(parameters[0]);
}
function FromOmit(parameters) {
  return Omit(parameters[0], parameters[1]);
}
function FromPick(parameters) {
  return Pick(parameters[0], parameters[1]);
}
function FromRequired(parameters) {
  return Required(parameters[0]);
}
function FromComputed5(moduleProperties, target, parameters) {
  const dereferenced = DereferenceParameters(moduleProperties, parameters);
  return target === "Awaited" ? FromAwaited(dereferenced) : target === "Index" ? FromIndex(dereferenced) : target === "KeyOf" ? FromKeyOf(dereferenced) : target === "Partial" ? FromPartial(dereferenced) : target === "Omit" ? FromOmit(dereferenced) : target === "Pick" ? FromPick(dereferenced) : target === "Required" ? FromRequired(dereferenced) : Never();
}
function FromArray6(moduleProperties, type2) {
  return Array2(FromType2(moduleProperties, type2));
}
function FromAsyncIterator3(moduleProperties, type2) {
  return AsyncIterator2(FromType2(moduleProperties, type2));
}
function FromConstructor3(moduleProperties, parameters, instanceType) {
  return Constructor(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, instanceType));
}
function FromFunction3(moduleProperties, parameters, returnType) {
  return Function3(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, returnType));
}
function FromIntersect8(moduleProperties, types6) {
  return Intersect(FromTypes2(moduleProperties, types6));
}
function FromIterator3(moduleProperties, type2) {
  return Iterator2(FromType2(moduleProperties, type2));
}
function FromObject7(moduleProperties, properties2) {
  return Object2(globalThis.Object.keys(properties2).reduce((result, key) => {
    return { ...result, [key]: FromType2(moduleProperties, properties2[key]) };
  }, {}));
}
function FromRecord3(moduleProperties, type2) {
  const [value, pattern] = [FromType2(moduleProperties, RecordValue2(type2)), RecordPattern(type2)];
  const result = CloneType(type2);
  result.patternProperties[pattern] = value;
  return result;
}
function FromTransform(moduleProperties, transform2) {
  return IsRef(transform2) ? { ...Dereference(moduleProperties, transform2.$ref), [TransformKind]: transform2[TransformKind] } : transform2;
}
function FromTuple5(moduleProperties, types6) {
  return Tuple(FromTypes2(moduleProperties, types6));
}
function FromUnion10(moduleProperties, types6) {
  return Union(FromTypes2(moduleProperties, types6));
}
function FromTypes2(moduleProperties, types6) {
  return types6.map((type2) => FromType2(moduleProperties, type2));
}
function FromType2(moduleProperties, type2) {
  return IsOptional(type2) ? CreateType(FromType2(moduleProperties, Discard(type2, [OptionalKind])), type2) : IsReadonly(type2) ? CreateType(FromType2(moduleProperties, Discard(type2, [ReadonlyKind])), type2) : IsTransform(type2) ? CreateType(FromTransform(moduleProperties, type2), type2) : IsArray3(type2) ? CreateType(FromArray6(moduleProperties, type2.items), type2) : IsAsyncIterator3(type2) ? CreateType(FromAsyncIterator3(moduleProperties, type2.items), type2) : IsComputed(type2) ? CreateType(FromComputed5(moduleProperties, type2.target, type2.parameters)) : IsConstructor(type2) ? CreateType(FromConstructor3(moduleProperties, type2.parameters, type2.returns), type2) : IsFunction3(type2) ? CreateType(FromFunction3(moduleProperties, type2.parameters, type2.returns), type2) : IsIntersect(type2) ? CreateType(FromIntersect8(moduleProperties, type2.allOf), type2) : IsIterator3(type2) ? CreateType(FromIterator3(moduleProperties, type2.items), type2) : IsObject3(type2) ? CreateType(FromObject7(moduleProperties, type2.properties), type2) : IsRecord(type2) ? CreateType(FromRecord3(moduleProperties, type2)) : IsTuple(type2) ? CreateType(FromTuple5(moduleProperties, type2.items || []), type2) : IsUnion(type2) ? CreateType(FromUnion10(moduleProperties, type2.anyOf), type2) : type2;
}
function ComputeType(moduleProperties, key) {
  return key in moduleProperties ? FromType2(moduleProperties, moduleProperties[key]) : Never();
}
function ComputeModuleProperties(moduleProperties) {
  return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
    return { ...result, [key]: ComputeType(moduleProperties, key) };
  }, {});
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
class TModule {
  constructor($defs) {
    const computed = ComputeModuleProperties($defs);
    const identified = this.WithIdentifiers(computed);
    this.$defs = identified;
  }
  Import(key, options2) {
    const $defs = { ...this.$defs, [key]: CreateType(this.$defs[key], options2) };
    return CreateType({ [Kind]: "Import", $defs, $ref: key });
  }
  WithIdentifiers($defs) {
    return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
      return { ...result, [key]: { ...$defs[key], $id: key } };
    }, {});
  }
}
function Module(properties2) {
  return new TModule(properties2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
function Not2(type2, options2) {
  return CreateType({ [Kind]: "Not", not: type2 }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
function Parameters(schema, options2) {
  return IsFunction3(schema) ? Tuple(schema.parameters, options2) : Never();
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
var Ordinal = 0;
function Recursive(callback, options2 = {}) {
  if (IsUndefined(options2.$id))
    options2.$id = `T${Ordinal++}`;
  const thisType = CloneType(callback({ [Kind]: "This", $ref: `${options2.$id}` }));
  thisType.$id = options2.$id;
  return CreateType({ [Hint]: "Recursive", ...thisType }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
function RegExp2(unresolved, options2) {
  const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
  return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
function RestResolve(T4) {
  return IsIntersect(T4) ? T4.allOf : IsUnion(T4) ? T4.anyOf : IsTuple(T4) ? T4.items ?? [] : [];
}
function Rest(T4) {
  return RestResolve(T4);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
function ReturnType(schema, options2) {
  return IsFunction3(schema) ? CreateType(schema.returns, options2) : Never(options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
class TransformDecodeBuilder {
  constructor(schema) {
    this.schema = schema;
  }
  Decode(decode5) {
    return new TransformEncodeBuilder(this.schema, decode5);
  }
}

class TransformEncodeBuilder {
  constructor(schema, decode5) {
    this.schema = schema;
    this.decode = decode5;
  }
  EncodeTransform(encode6, schema) {
    const Encode = (value) => schema[TransformKind].Encode(encode6(value));
    const Decode = (value) => this.decode(schema[TransformKind].Decode(value));
    const Codec = { Encode, Decode };
    return { ...schema, [TransformKind]: Codec };
  }
  EncodeSchema(encode6, schema) {
    const Codec = { Decode: this.decode, Encode: encode6 };
    return { ...schema, [TransformKind]: Codec };
  }
  Encode(encode6) {
    return IsTransform(this.schema) ? this.EncodeTransform(encode6, this.schema) : this.EncodeSchema(encode6, this.schema);
  }
}
function Transform(schema) {
  return new TransformDecodeBuilder(schema);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
function Unsafe(options2 = {}) {
  return CreateType({ [Kind]: options2[Kind] ?? "Unsafe" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
function Void(options2) {
  return CreateType({ [Kind]: "Void", type: "void" }, options2);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
var exports_type3 = {};
__export(exports_type3, {
  Void: () => Void,
  Uppercase: () => Uppercase,
  Unsafe: () => Unsafe,
  Unknown: () => Unknown,
  Union: () => Union,
  Undefined: () => Undefined,
  Uncapitalize: () => Uncapitalize,
  Uint8Array: () => Uint8Array2,
  Tuple: () => Tuple,
  Transform: () => Transform,
  TemplateLiteral: () => TemplateLiteral,
  Symbol: () => Symbol2,
  String: () => String2,
  ReturnType: () => ReturnType,
  Rest: () => Rest,
  Required: () => Required,
  RegExp: () => RegExp2,
  Ref: () => Ref,
  Recursive: () => Recursive,
  Record: () => Record,
  ReadonlyOptional: () => ReadonlyOptional,
  Readonly: () => Readonly,
  Promise: () => Promise2,
  Pick: () => Pick,
  Partial: () => Partial,
  Parameters: () => Parameters,
  Optional: () => Optional,
  Omit: () => Omit,
  Object: () => Object2,
  Number: () => Number2,
  Null: () => Null,
  Not: () => Not2,
  Never: () => Never,
  Module: () => Module,
  Mapped: () => Mapped,
  Lowercase: () => Lowercase,
  Literal: () => Literal,
  KeyOf: () => KeyOf,
  Iterator: () => Iterator2,
  Intersect: () => Intersect,
  Integer: () => Integer,
  Instantiate: () => Instantiate,
  InstanceType: () => InstanceType,
  Index: () => Index2,
  Function: () => Function3,
  Extract: () => Extract,
  Extends: () => Extends,
  Exclude: () => Exclude,
  Enum: () => Enum,
  Date: () => Date2,
  ConstructorParameters: () => ConstructorParameters,
  Constructor: () => Constructor,
  Const: () => Const,
  Composite: () => Composite,
  Capitalize: () => Capitalize,
  Boolean: () => Boolean2,
  BigInt: () => BigInt2,
  Awaited: () => Awaited,
  AsyncIterator: () => AsyncIterator2,
  Array: () => Array2,
  Argument: () => Argument,
  Any: () => Any
});

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
var Type = exports_type3;

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/index.mjs
var import_fast_decode_uri_component4 = __toESM(require_fast_decode_uri_component(), 1);
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/errors/function.mjs
function DefaultErrorFunction(error49) {
  switch (error49.errorType) {
    case ValueErrorType.ArrayContains:
      return "Expected array to contain at least one matching value";
    case ValueErrorType.ArrayMaxContains:
      return `Expected array to contain no more than ${error49.schema.maxContains} matching values`;
    case ValueErrorType.ArrayMinContains:
      return `Expected array to contain at least ${error49.schema.minContains} matching values`;
    case ValueErrorType.ArrayMaxItems:
      return `Expected array length to be less or equal to ${error49.schema.maxItems}`;
    case ValueErrorType.ArrayMinItems:
      return `Expected array length to be greater or equal to ${error49.schema.minItems}`;
    case ValueErrorType.ArrayUniqueItems:
      return "Expected array elements to be unique";
    case ValueErrorType.Array:
      return "Expected array";
    case ValueErrorType.AsyncIterator:
      return "Expected AsyncIterator";
    case ValueErrorType.BigIntExclusiveMaximum:
      return `Expected bigint to be less than ${error49.schema.exclusiveMaximum}`;
    case ValueErrorType.BigIntExclusiveMinimum:
      return `Expected bigint to be greater than ${error49.schema.exclusiveMinimum}`;
    case ValueErrorType.BigIntMaximum:
      return `Expected bigint to be less or equal to ${error49.schema.maximum}`;
    case ValueErrorType.BigIntMinimum:
      return `Expected bigint to be greater or equal to ${error49.schema.minimum}`;
    case ValueErrorType.BigIntMultipleOf:
      return `Expected bigint to be a multiple of ${error49.schema.multipleOf}`;
    case ValueErrorType.BigInt:
      return "Expected bigint";
    case ValueErrorType.Boolean:
      return "Expected boolean";
    case ValueErrorType.DateExclusiveMinimumTimestamp:
      return `Expected Date timestamp to be greater than ${error49.schema.exclusiveMinimumTimestamp}`;
    case ValueErrorType.DateExclusiveMaximumTimestamp:
      return `Expected Date timestamp to be less than ${error49.schema.exclusiveMaximumTimestamp}`;
    case ValueErrorType.DateMinimumTimestamp:
      return `Expected Date timestamp to be greater or equal to ${error49.schema.minimumTimestamp}`;
    case ValueErrorType.DateMaximumTimestamp:
      return `Expected Date timestamp to be less or equal to ${error49.schema.maximumTimestamp}`;
    case ValueErrorType.DateMultipleOfTimestamp:
      return `Expected Date timestamp to be a multiple of ${error49.schema.multipleOfTimestamp}`;
    case ValueErrorType.Date:
      return "Expected Date";
    case ValueErrorType.Function:
      return "Expected function";
    case ValueErrorType.IntegerExclusiveMaximum:
      return `Expected integer to be less than ${error49.schema.exclusiveMaximum}`;
    case ValueErrorType.IntegerExclusiveMinimum:
      return `Expected integer to be greater than ${error49.schema.exclusiveMinimum}`;
    case ValueErrorType.IntegerMaximum:
      return `Expected integer to be less or equal to ${error49.schema.maximum}`;
    case ValueErrorType.IntegerMinimum:
      return `Expected integer to be greater or equal to ${error49.schema.minimum}`;
    case ValueErrorType.IntegerMultipleOf:
      return `Expected integer to be a multiple of ${error49.schema.multipleOf}`;
    case ValueErrorType.Integer:
      return "Expected integer";
    case ValueErrorType.IntersectUnevaluatedProperties:
      return "Unexpected property";
    case ValueErrorType.Intersect:
      return "Expected all values to match";
    case ValueErrorType.Iterator:
      return "Expected Iterator";
    case ValueErrorType.Literal:
      return `Expected ${typeof error49.schema.const === "string" ? `'${error49.schema.const}'` : error49.schema.const}`;
    case ValueErrorType.Never:
      return "Never";
    case ValueErrorType.Not:
      return "Value should not match";
    case ValueErrorType.Null:
      return "Expected null";
    case ValueErrorType.NumberExclusiveMaximum:
      return `Expected number to be less than ${error49.schema.exclusiveMaximum}`;
    case ValueErrorType.NumberExclusiveMinimum:
      return `Expected number to be greater than ${error49.schema.exclusiveMinimum}`;
    case ValueErrorType.NumberMaximum:
      return `Expected number to be less or equal to ${error49.schema.maximum}`;
    case ValueErrorType.NumberMinimum:
      return `Expected number to be greater or equal to ${error49.schema.minimum}`;
    case ValueErrorType.NumberMultipleOf:
      return `Expected number to be a multiple of ${error49.schema.multipleOf}`;
    case ValueErrorType.Number:
      return "Expected number";
    case ValueErrorType.Object:
      return "Expected object";
    case ValueErrorType.ObjectAdditionalProperties:
      return "Unexpected property";
    case ValueErrorType.ObjectMaxProperties:
      return `Expected object to have no more than ${error49.schema.maxProperties} properties`;
    case ValueErrorType.ObjectMinProperties:
      return `Expected object to have at least ${error49.schema.minProperties} properties`;
    case ValueErrorType.ObjectRequiredProperty:
      return "Expected required property";
    case ValueErrorType.Promise:
      return "Expected Promise";
    case ValueErrorType.RegExp:
      return "Expected string to match regular expression";
    case ValueErrorType.StringFormatUnknown:
      return `Unknown format '${error49.schema.format}'`;
    case ValueErrorType.StringFormat:
      return `Expected string to match '${error49.schema.format}' format`;
    case ValueErrorType.StringMaxLength:
      return `Expected string length less or equal to ${error49.schema.maxLength}`;
    case ValueErrorType.StringMinLength:
      return `Expected string length greater or equal to ${error49.schema.minLength}`;
    case ValueErrorType.StringPattern:
      return `Expected string to match '${error49.schema.pattern}'`;
    case ValueErrorType.String:
      return "Expected string";
    case ValueErrorType.Symbol:
      return "Expected symbol";
    case ValueErrorType.TupleLength:
      return `Expected tuple to have ${error49.schema.maxItems || 0} elements`;
    case ValueErrorType.Tuple:
      return "Expected tuple";
    case ValueErrorType.Uint8ArrayMaxByteLength:
      return `Expected byte length less or equal to ${error49.schema.maxByteLength}`;
    case ValueErrorType.Uint8ArrayMinByteLength:
      return `Expected byte length greater or equal to ${error49.schema.minByteLength}`;
    case ValueErrorType.Uint8Array:
      return "Expected Uint8Array";
    case ValueErrorType.Undefined:
      return "Expected undefined";
    case ValueErrorType.Union:
      return "Expected union value";
    case ValueErrorType.Void:
      return "Expected void";
    case ValueErrorType.Kind:
      return `Expected kind '${error49.schema[Kind]}'`;
    default:
      return "Unknown error type";
  }
}
var errorFunction = DefaultErrorFunction;
function GetErrorFunction() {
  return errorFunction;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/deref/deref.mjs
class TypeDereferenceError extends TypeBoxError {
  constructor(schema) {
    super(`Unable to dereference schema with $id '${schema.$ref}'`);
    this.schema = schema;
  }
}
function Resolve(schema, references) {
  const target = references.find((target2) => target2.$id === schema.$ref);
  if (target === undefined)
    throw new TypeDereferenceError(schema);
  return Deref(target, references);
}
function Pushref(schema, references) {
  if (!IsString2(schema.$id) || references.some((target) => target.$id === schema.$id))
    return references;
  references.push(schema);
  return references;
}
function Deref(schema, references) {
  return schema[Kind] === "This" || schema[Kind] === "Ref" ? Resolve(schema, references) : schema;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/hash/hash.mjs
class ValueHashError extends TypeBoxError {
  constructor(value) {
    super(`Unable to hash value`);
    this.value = value;
  }
}
var ByteMarker;
(function(ByteMarker2) {
  ByteMarker2[ByteMarker2["Undefined"] = 0] = "Undefined";
  ByteMarker2[ByteMarker2["Null"] = 1] = "Null";
  ByteMarker2[ByteMarker2["Boolean"] = 2] = "Boolean";
  ByteMarker2[ByteMarker2["Number"] = 3] = "Number";
  ByteMarker2[ByteMarker2["String"] = 4] = "String";
  ByteMarker2[ByteMarker2["Object"] = 5] = "Object";
  ByteMarker2[ByteMarker2["Array"] = 6] = "Array";
  ByteMarker2[ByteMarker2["Date"] = 7] = "Date";
  ByteMarker2[ByteMarker2["Uint8Array"] = 8] = "Uint8Array";
  ByteMarker2[ByteMarker2["Symbol"] = 9] = "Symbol";
  ByteMarker2[ByteMarker2["BigInt"] = 10] = "BigInt";
})(ByteMarker || (ByteMarker = {}));
var Accumulator = BigInt("14695981039346656037");
var [Prime, Size] = [BigInt("1099511628211"), BigInt("18446744073709551616")];
var Bytes = Array.from({ length: 256 }).map((_6, i) => BigInt(i));
var F64 = new Float64Array(1);
var F64In = new DataView(F64.buffer);
var F64Out = new Uint8Array(F64.buffer);
function* NumberToBytes(value) {
  const byteCount = value === 0 ? 1 : Math.ceil(Math.floor(Math.log2(value) + 1) / 8);
  for (let i = 0;i < byteCount; i++) {
    yield value >> 8 * (byteCount - 1 - i) & 255;
  }
}
function ArrayType2(value) {
  FNV1A64(ByteMarker.Array);
  for (const item of value) {
    Visit4(item);
  }
}
function BooleanType(value) {
  FNV1A64(ByteMarker.Boolean);
  FNV1A64(value ? 1 : 0);
}
function BigIntType(value) {
  FNV1A64(ByteMarker.BigInt);
  F64In.setBigInt64(0, value);
  for (const byte of F64Out) {
    FNV1A64(byte);
  }
}
function DateType2(value) {
  FNV1A64(ByteMarker.Date);
  Visit4(value.getTime());
}
function NullType(value) {
  FNV1A64(ByteMarker.Null);
}
function NumberType(value) {
  FNV1A64(ByteMarker.Number);
  F64In.setFloat64(0, value);
  for (const byte of F64Out) {
    FNV1A64(byte);
  }
}
function ObjectType2(value) {
  FNV1A64(ByteMarker.Object);
  for (const key of globalThis.Object.getOwnPropertyNames(value).sort()) {
    Visit4(key);
    Visit4(value[key]);
  }
}
function StringType(value) {
  FNV1A64(ByteMarker.String);
  for (let i = 0;i < value.length; i++) {
    for (const byte of NumberToBytes(value.charCodeAt(i))) {
      FNV1A64(byte);
    }
  }
}
function SymbolType(value) {
  FNV1A64(ByteMarker.Symbol);
  Visit4(value.description);
}
function Uint8ArrayType2(value) {
  FNV1A64(ByteMarker.Uint8Array);
  for (let i = 0;i < value.length; i++) {
    FNV1A64(value[i]);
  }
}
function UndefinedType(value) {
  return FNV1A64(ByteMarker.Undefined);
}
function Visit4(value) {
  if (IsArray2(value))
    return ArrayType2(value);
  if (IsBoolean2(value))
    return BooleanType(value);
  if (IsBigInt2(value))
    return BigIntType(value);
  if (IsDate2(value))
    return DateType2(value);
  if (IsNull2(value))
    return NullType(value);
  if (IsNumber2(value))
    return NumberType(value);
  if (IsObject2(value))
    return ObjectType2(value);
  if (IsString2(value))
    return StringType(value);
  if (IsSymbol2(value))
    return SymbolType(value);
  if (IsUint8Array2(value))
    return Uint8ArrayType2(value);
  if (IsUndefined2(value))
    return UndefinedType(value);
  throw new ValueHashError(value);
}
function FNV1A64(byte) {
  Accumulator = Accumulator ^ Bytes[byte];
  Accumulator = Accumulator * Prime % Size;
}
function Hash2(value) {
  Accumulator = BigInt("14695981039346656037");
  Visit4(value);
  return Accumulator;
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/check/check.mjs
class ValueCheckUnknownTypeError extends TypeBoxError {
  constructor(schema) {
    super(`Unknown type`);
    this.schema = schema;
  }
}
function IsAnyOrUnknown(schema) {
  return schema[Kind] === "Any" || schema[Kind] === "Unknown";
}
function IsDefined(value) {
  return value !== undefined;
}
function FromAny2(schema, references, value) {
  return true;
}
function FromArgument2(schema, references, value) {
  return true;
}
function FromArray7(schema, references, value) {
  if (!IsArray2(value))
    return false;
  if (IsDefined(schema.minItems) && !(value.length >= schema.minItems)) {
    return false;
  }
  if (IsDefined(schema.maxItems) && !(value.length <= schema.maxItems)) {
    return false;
  }
  if (!value.every((value2) => Visit5(schema.items, references, value2))) {
    return false;
  }
  if (schema.uniqueItems === true && !function() {
    const set2 = new Set;
    for (const element of value) {
      const hashed = Hash2(element);
      if (set2.has(hashed)) {
        return false;
      } else {
        set2.add(hashed);
      }
    }
    return true;
  }()) {
    return false;
  }
  if (!(IsDefined(schema.contains) || IsNumber2(schema.minContains) || IsNumber2(schema.maxContains))) {
    return true;
  }
  const containsSchema = IsDefined(schema.contains) ? schema.contains : Never();
  const containsCount = value.reduce((acc, value2) => Visit5(containsSchema, references, value2) ? acc + 1 : acc, 0);
  if (containsCount === 0) {
    return false;
  }
  if (IsNumber2(schema.minContains) && containsCount < schema.minContains) {
    return false;
  }
  if (IsNumber2(schema.maxContains) && containsCount > schema.maxContains) {
    return false;
  }
  return true;
}
function FromAsyncIterator4(schema, references, value) {
  return IsAsyncIterator2(value);
}
function FromBigInt2(schema, references, value) {
  if (!IsBigInt2(value))
    return false;
  if (IsDefined(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
    return false;
  }
  if (IsDefined(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
    return false;
  }
  if (IsDefined(schema.maximum) && !(value <= schema.maximum)) {
    return false;
  }
  if (IsDefined(schema.minimum) && !(value >= schema.minimum)) {
    return false;
  }
  if (IsDefined(schema.multipleOf) && !(value % schema.multipleOf === BigInt(0))) {
    return false;
  }
  return true;
}
function FromBoolean2(schema, references, value) {
  return IsBoolean2(value);
}
function FromConstructor4(schema, references, value) {
  return Visit5(schema.returns, references, value.prototype);
}
function FromDate2(schema, references, value) {
  if (!IsDate2(value))
    return false;
  if (IsDefined(schema.exclusiveMaximumTimestamp) && !(value.getTime() < schema.exclusiveMaximumTimestamp)) {
    return false;
  }
  if (IsDefined(schema.exclusiveMinimumTimestamp) && !(value.getTime() > schema.exclusiveMinimumTimestamp)) {
    return false;
  }
  if (IsDefined(schema.maximumTimestamp) && !(value.getTime() <= schema.maximumTimestamp)) {
    return false;
  }
  if (IsDefined(schema.minimumTimestamp) && !(value.getTime() >= schema.minimumTimestamp)) {
    return false;
  }
  if (IsDefined(schema.multipleOfTimestamp) && !(value.getTime() % schema.multipleOfTimestamp === 0)) {
    return false;
  }
  return true;
}
function FromFunction4(schema, references, value) {
  return IsFunction2(value);
}
function FromImport(schema, references, value) {
  const definitions = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  return Visit5(target, [...references, ...definitions], value);
}
function FromInteger2(schema, references, value) {
  if (!IsInteger(value)) {
    return false;
  }
  if (IsDefined(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
    return false;
  }
  if (IsDefined(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
    return false;
  }
  if (IsDefined(schema.maximum) && !(value <= schema.maximum)) {
    return false;
  }
  if (IsDefined(schema.minimum) && !(value >= schema.minimum)) {
    return false;
  }
  if (IsDefined(schema.multipleOf) && !(value % schema.multipleOf === 0)) {
    return false;
  }
  return true;
}
function FromIntersect9(schema, references, value) {
  const check1 = schema.allOf.every((schema2) => Visit5(schema2, references, value));
  if (schema.unevaluatedProperties === false) {
    const keyPattern = new RegExp(KeyOfPattern(schema));
    const check2 = Object.getOwnPropertyNames(value).every((key) => keyPattern.test(key));
    return check1 && check2;
  } else if (IsSchema(schema.unevaluatedProperties)) {
    const keyCheck = new RegExp(KeyOfPattern(schema));
    const check2 = Object.getOwnPropertyNames(value).every((key) => keyCheck.test(key) || Visit5(schema.unevaluatedProperties, references, value[key]));
    return check1 && check2;
  } else {
    return check1;
  }
}
function FromIterator4(schema, references, value) {
  return IsIterator2(value);
}
function FromLiteral3(schema, references, value) {
  return value === schema.const;
}
function FromNever2(schema, references, value) {
  return false;
}
function FromNot2(schema, references, value) {
  return !Visit5(schema.not, references, value);
}
function FromNull2(schema, references, value) {
  return IsNull2(value);
}
function FromNumber2(schema, references, value) {
  if (!TypeSystemPolicy.IsNumberLike(value))
    return false;
  if (IsDefined(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
    return false;
  }
  if (IsDefined(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
    return false;
  }
  if (IsDefined(schema.minimum) && !(value >= schema.minimum)) {
    return false;
  }
  if (IsDefined(schema.maximum) && !(value <= schema.maximum)) {
    return false;
  }
  if (IsDefined(schema.multipleOf) && !(value % schema.multipleOf === 0)) {
    return false;
  }
  return true;
}
function FromObject8(schema, references, value) {
  if (!TypeSystemPolicy.IsObjectLike(value))
    return false;
  if (IsDefined(schema.minProperties) && !(Object.getOwnPropertyNames(value).length >= schema.minProperties)) {
    return false;
  }
  if (IsDefined(schema.maxProperties) && !(Object.getOwnPropertyNames(value).length <= schema.maxProperties)) {
    return false;
  }
  const knownKeys = Object.getOwnPropertyNames(schema.properties);
  for (const knownKey of knownKeys) {
    const property2 = schema.properties[knownKey];
    if (schema.required && schema.required.includes(knownKey)) {
      if (!Visit5(property2, references, value[knownKey])) {
        return false;
      }
      if ((ExtendsUndefinedCheck(property2) || IsAnyOrUnknown(property2)) && !(knownKey in value)) {
        return false;
      }
    } else {
      if (TypeSystemPolicy.IsExactOptionalProperty(value, knownKey) && !Visit5(property2, references, value[knownKey])) {
        return false;
      }
    }
  }
  if (schema.additionalProperties === false) {
    const valueKeys = Object.getOwnPropertyNames(value);
    if (schema.required && schema.required.length === knownKeys.length && valueKeys.length === knownKeys.length) {
      return true;
    } else {
      return valueKeys.every((valueKey) => knownKeys.includes(valueKey));
    }
  } else if (typeof schema.additionalProperties === "object") {
    const valueKeys = Object.getOwnPropertyNames(value);
    return valueKeys.every((key) => knownKeys.includes(key) || Visit5(schema.additionalProperties, references, value[key]));
  } else {
    return true;
  }
}
function FromPromise4(schema, references, value) {
  return IsPromise(value);
}
function FromRecord4(schema, references, value) {
  if (!TypeSystemPolicy.IsRecordLike(value)) {
    return false;
  }
  if (IsDefined(schema.minProperties) && !(Object.getOwnPropertyNames(value).length >= schema.minProperties)) {
    return false;
  }
  if (IsDefined(schema.maxProperties) && !(Object.getOwnPropertyNames(value).length <= schema.maxProperties)) {
    return false;
  }
  const [patternKey, patternSchema] = Object.entries(schema.patternProperties)[0];
  const regex = new RegExp(patternKey);
  const check1 = Object.entries(value).every(([key, value2]) => {
    return regex.test(key) ? Visit5(patternSchema, references, value2) : true;
  });
  const check2 = typeof schema.additionalProperties === "object" ? Object.entries(value).every(([key, value2]) => {
    return !regex.test(key) ? Visit5(schema.additionalProperties, references, value2) : true;
  }) : true;
  const check3 = schema.additionalProperties === false ? Object.getOwnPropertyNames(value).every((key) => {
    return regex.test(key);
  }) : true;
  return check1 && check2 && check3;
}
function FromRef5(schema, references, value) {
  return Visit5(Deref(schema, references), references, value);
}
function FromRegExp2(schema, references, value) {
  const regex = new RegExp(schema.source, schema.flags);
  if (IsDefined(schema.minLength)) {
    if (!(value.length >= schema.minLength))
      return false;
  }
  if (IsDefined(schema.maxLength)) {
    if (!(value.length <= schema.maxLength))
      return false;
  }
  return regex.test(value);
}
function FromString2(schema, references, value) {
  if (!IsString2(value)) {
    return false;
  }
  if (IsDefined(schema.minLength)) {
    if (!(value.length >= schema.minLength))
      return false;
  }
  if (IsDefined(schema.maxLength)) {
    if (!(value.length <= schema.maxLength))
      return false;
  }
  if (IsDefined(schema.pattern)) {
    const regex = new RegExp(schema.pattern);
    if (!regex.test(value))
      return false;
  }
  if (IsDefined(schema.format)) {
    if (!exports_format.Has(schema.format))
      return false;
    const func = exports_format.Get(schema.format);
    return func(value);
  }
  return true;
}
function FromSymbol2(schema, references, value) {
  return IsSymbol2(value);
}
function FromTemplateLiteral4(schema, references, value) {
  return IsString2(value) && new RegExp(schema.pattern).test(value);
}
function FromThis(schema, references, value) {
  return Visit5(Deref(schema, references), references, value);
}
function FromTuple6(schema, references, value) {
  if (!IsArray2(value)) {
    return false;
  }
  if (schema.items === undefined && !(value.length === 0)) {
    return false;
  }
  if (!(value.length === schema.maxItems)) {
    return false;
  }
  if (!schema.items) {
    return true;
  }
  for (let i = 0;i < schema.items.length; i++) {
    if (!Visit5(schema.items[i], references, value[i]))
      return false;
  }
  return true;
}
function FromUndefined2(schema, references, value) {
  return IsUndefined2(value);
}
function FromUnion11(schema, references, value) {
  return schema.anyOf.some((inner) => Visit5(inner, references, value));
}
function FromUint8Array2(schema, references, value) {
  if (!IsUint8Array2(value)) {
    return false;
  }
  if (IsDefined(schema.maxByteLength) && !(value.length <= schema.maxByteLength)) {
    return false;
  }
  if (IsDefined(schema.minByteLength) && !(value.length >= schema.minByteLength)) {
    return false;
  }
  return true;
}
function FromUnknown2(schema, references, value) {
  return true;
}
function FromVoid2(schema, references, value) {
  return TypeSystemPolicy.IsVoidLike(value);
}
function FromKind(schema, references, value) {
  if (!exports_type2.Has(schema[Kind]))
    return false;
  const func = exports_type2.Get(schema[Kind]);
  return func(schema, value);
}
function Visit5(schema, references, value) {
  const references_ = IsDefined(schema.$id) ? Pushref(schema, references) : references;
  const schema_ = schema;
  switch (schema_[Kind]) {
    case "Any":
      return FromAny2(schema_, references_, value);
    case "Argument":
      return FromArgument2(schema_, references_, value);
    case "Array":
      return FromArray7(schema_, references_, value);
    case "AsyncIterator":
      return FromAsyncIterator4(schema_, references_, value);
    case "BigInt":
      return FromBigInt2(schema_, references_, value);
    case "Boolean":
      return FromBoolean2(schema_, references_, value);
    case "Constructor":
      return FromConstructor4(schema_, references_, value);
    case "Date":
      return FromDate2(schema_, references_, value);
    case "Function":
      return FromFunction4(schema_, references_, value);
    case "Import":
      return FromImport(schema_, references_, value);
    case "Integer":
      return FromInteger2(schema_, references_, value);
    case "Intersect":
      return FromIntersect9(schema_, references_, value);
    case "Iterator":
      return FromIterator4(schema_, references_, value);
    case "Literal":
      return FromLiteral3(schema_, references_, value);
    case "Never":
      return FromNever2(schema_, references_, value);
    case "Not":
      return FromNot2(schema_, references_, value);
    case "Null":
      return FromNull2(schema_, references_, value);
    case "Number":
      return FromNumber2(schema_, references_, value);
    case "Object":
      return FromObject8(schema_, references_, value);
    case "Promise":
      return FromPromise4(schema_, references_, value);
    case "Record":
      return FromRecord4(schema_, references_, value);
    case "Ref":
      return FromRef5(schema_, references_, value);
    case "RegExp":
      return FromRegExp2(schema_, references_, value);
    case "String":
      return FromString2(schema_, references_, value);
    case "Symbol":
      return FromSymbol2(schema_, references_, value);
    case "TemplateLiteral":
      return FromTemplateLiteral4(schema_, references_, value);
    case "This":
      return FromThis(schema_, references_, value);
    case "Tuple":
      return FromTuple6(schema_, references_, value);
    case "Undefined":
      return FromUndefined2(schema_, references_, value);
    case "Union":
      return FromUnion11(schema_, references_, value);
    case "Uint8Array":
      return FromUint8Array2(schema_, references_, value);
    case "Unknown":
      return FromUnknown2(schema_, references_, value);
    case "Void":
      return FromVoid2(schema_, references_, value);
    default:
      if (!exports_type2.Has(schema_[Kind]))
        throw new ValueCheckUnknownTypeError(schema_);
      return FromKind(schema_, references_, value);
  }
}
function Check(...args) {
  return args.length === 3 ? Visit5(args[0], args[1], args[2]) : Visit5(args[0], [], args[1]);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/errors/errors.mjs
var ValueErrorType;
(function(ValueErrorType2) {
  ValueErrorType2[ValueErrorType2["ArrayContains"] = 0] = "ArrayContains";
  ValueErrorType2[ValueErrorType2["ArrayMaxContains"] = 1] = "ArrayMaxContains";
  ValueErrorType2[ValueErrorType2["ArrayMaxItems"] = 2] = "ArrayMaxItems";
  ValueErrorType2[ValueErrorType2["ArrayMinContains"] = 3] = "ArrayMinContains";
  ValueErrorType2[ValueErrorType2["ArrayMinItems"] = 4] = "ArrayMinItems";
  ValueErrorType2[ValueErrorType2["ArrayUniqueItems"] = 5] = "ArrayUniqueItems";
  ValueErrorType2[ValueErrorType2["Array"] = 6] = "Array";
  ValueErrorType2[ValueErrorType2["AsyncIterator"] = 7] = "AsyncIterator";
  ValueErrorType2[ValueErrorType2["BigIntExclusiveMaximum"] = 8] = "BigIntExclusiveMaximum";
  ValueErrorType2[ValueErrorType2["BigIntExclusiveMinimum"] = 9] = "BigIntExclusiveMinimum";
  ValueErrorType2[ValueErrorType2["BigIntMaximum"] = 10] = "BigIntMaximum";
  ValueErrorType2[ValueErrorType2["BigIntMinimum"] = 11] = "BigIntMinimum";
  ValueErrorType2[ValueErrorType2["BigIntMultipleOf"] = 12] = "BigIntMultipleOf";
  ValueErrorType2[ValueErrorType2["BigInt"] = 13] = "BigInt";
  ValueErrorType2[ValueErrorType2["Boolean"] = 14] = "Boolean";
  ValueErrorType2[ValueErrorType2["DateExclusiveMaximumTimestamp"] = 15] = "DateExclusiveMaximumTimestamp";
  ValueErrorType2[ValueErrorType2["DateExclusiveMinimumTimestamp"] = 16] = "DateExclusiveMinimumTimestamp";
  ValueErrorType2[ValueErrorType2["DateMaximumTimestamp"] = 17] = "DateMaximumTimestamp";
  ValueErrorType2[ValueErrorType2["DateMinimumTimestamp"] = 18] = "DateMinimumTimestamp";
  ValueErrorType2[ValueErrorType2["DateMultipleOfTimestamp"] = 19] = "DateMultipleOfTimestamp";
  ValueErrorType2[ValueErrorType2["Date"] = 20] = "Date";
  ValueErrorType2[ValueErrorType2["Function"] = 21] = "Function";
  ValueErrorType2[ValueErrorType2["IntegerExclusiveMaximum"] = 22] = "IntegerExclusiveMaximum";
  ValueErrorType2[ValueErrorType2["IntegerExclusiveMinimum"] = 23] = "IntegerExclusiveMinimum";
  ValueErrorType2[ValueErrorType2["IntegerMaximum"] = 24] = "IntegerMaximum";
  ValueErrorType2[ValueErrorType2["IntegerMinimum"] = 25] = "IntegerMinimum";
  ValueErrorType2[ValueErrorType2["IntegerMultipleOf"] = 26] = "IntegerMultipleOf";
  ValueErrorType2[ValueErrorType2["Integer"] = 27] = "Integer";
  ValueErrorType2[ValueErrorType2["IntersectUnevaluatedProperties"] = 28] = "IntersectUnevaluatedProperties";
  ValueErrorType2[ValueErrorType2["Intersect"] = 29] = "Intersect";
  ValueErrorType2[ValueErrorType2["Iterator"] = 30] = "Iterator";
  ValueErrorType2[ValueErrorType2["Kind"] = 31] = "Kind";
  ValueErrorType2[ValueErrorType2["Literal"] = 32] = "Literal";
  ValueErrorType2[ValueErrorType2["Never"] = 33] = "Never";
  ValueErrorType2[ValueErrorType2["Not"] = 34] = "Not";
  ValueErrorType2[ValueErrorType2["Null"] = 35] = "Null";
  ValueErrorType2[ValueErrorType2["NumberExclusiveMaximum"] = 36] = "NumberExclusiveMaximum";
  ValueErrorType2[ValueErrorType2["NumberExclusiveMinimum"] = 37] = "NumberExclusiveMinimum";
  ValueErrorType2[ValueErrorType2["NumberMaximum"] = 38] = "NumberMaximum";
  ValueErrorType2[ValueErrorType2["NumberMinimum"] = 39] = "NumberMinimum";
  ValueErrorType2[ValueErrorType2["NumberMultipleOf"] = 40] = "NumberMultipleOf";
  ValueErrorType2[ValueErrorType2["Number"] = 41] = "Number";
  ValueErrorType2[ValueErrorType2["ObjectAdditionalProperties"] = 42] = "ObjectAdditionalProperties";
  ValueErrorType2[ValueErrorType2["ObjectMaxProperties"] = 43] = "ObjectMaxProperties";
  ValueErrorType2[ValueErrorType2["ObjectMinProperties"] = 44] = "ObjectMinProperties";
  ValueErrorType2[ValueErrorType2["ObjectRequiredProperty"] = 45] = "ObjectRequiredProperty";
  ValueErrorType2[ValueErrorType2["Object"] = 46] = "Object";
  ValueErrorType2[ValueErrorType2["Promise"] = 47] = "Promise";
  ValueErrorType2[ValueErrorType2["RegExp"] = 48] = "RegExp";
  ValueErrorType2[ValueErrorType2["StringFormatUnknown"] = 49] = "StringFormatUnknown";
  ValueErrorType2[ValueErrorType2["StringFormat"] = 50] = "StringFormat";
  ValueErrorType2[ValueErrorType2["StringMaxLength"] = 51] = "StringMaxLength";
  ValueErrorType2[ValueErrorType2["StringMinLength"] = 52] = "StringMinLength";
  ValueErrorType2[ValueErrorType2["StringPattern"] = 53] = "StringPattern";
  ValueErrorType2[ValueErrorType2["String"] = 54] = "String";
  ValueErrorType2[ValueErrorType2["Symbol"] = 55] = "Symbol";
  ValueErrorType2[ValueErrorType2["TupleLength"] = 56] = "TupleLength";
  ValueErrorType2[ValueErrorType2["Tuple"] = 57] = "Tuple";
  ValueErrorType2[ValueErrorType2["Uint8ArrayMaxByteLength"] = 58] = "Uint8ArrayMaxByteLength";
  ValueErrorType2[ValueErrorType2["Uint8ArrayMinByteLength"] = 59] = "Uint8ArrayMinByteLength";
  ValueErrorType2[ValueErrorType2["Uint8Array"] = 60] = "Uint8Array";
  ValueErrorType2[ValueErrorType2["Undefined"] = 61] = "Undefined";
  ValueErrorType2[ValueErrorType2["Union"] = 62] = "Union";
  ValueErrorType2[ValueErrorType2["Void"] = 63] = "Void";
})(ValueErrorType || (ValueErrorType = {}));

class ValueErrorsUnknownTypeError extends TypeBoxError {
  constructor(schema) {
    super("Unknown type");
    this.schema = schema;
  }
}
function EscapeKey(key) {
  return key.replace(/~/g, "~0").replace(/\//g, "~1");
}
function IsDefined2(value) {
  return value !== undefined;
}

class ValueErrorIterator {
  constructor(iterator) {
    this.iterator = iterator;
  }
  [Symbol.iterator]() {
    return this.iterator;
  }
  First() {
    const next = this.iterator.next();
    return next.done ? undefined : next.value;
  }
}
function Create(errorType, schema, path2, value, errors4 = []) {
  return {
    type: errorType,
    schema,
    path: path2,
    value,
    message: GetErrorFunction()({ errorType, path: path2, schema, value, errors: errors4 }),
    errors: errors4
  };
}
function* FromAny3(schema, references, path2, value) {}
function* FromArgument3(schema, references, path2, value) {}
function* FromArray8(schema, references, path2, value) {
  if (!IsArray2(value)) {
    return yield Create(ValueErrorType.Array, schema, path2, value);
  }
  if (IsDefined2(schema.minItems) && !(value.length >= schema.minItems)) {
    yield Create(ValueErrorType.ArrayMinItems, schema, path2, value);
  }
  if (IsDefined2(schema.maxItems) && !(value.length <= schema.maxItems)) {
    yield Create(ValueErrorType.ArrayMaxItems, schema, path2, value);
  }
  for (let i = 0;i < value.length; i++) {
    yield* Visit6(schema.items, references, `${path2}/${i}`, value[i]);
  }
  if (schema.uniqueItems === true && !function() {
    const set2 = new Set;
    for (const element of value) {
      const hashed = Hash2(element);
      if (set2.has(hashed)) {
        return false;
      } else {
        set2.add(hashed);
      }
    }
    return true;
  }()) {
    yield Create(ValueErrorType.ArrayUniqueItems, schema, path2, value);
  }
  if (!(IsDefined2(schema.contains) || IsDefined2(schema.minContains) || IsDefined2(schema.maxContains))) {
    return;
  }
  const containsSchema = IsDefined2(schema.contains) ? schema.contains : Never();
  const containsCount = value.reduce((acc, value2, index2) => Visit6(containsSchema, references, `${path2}${index2}`, value2).next().done === true ? acc + 1 : acc, 0);
  if (containsCount === 0) {
    yield Create(ValueErrorType.ArrayContains, schema, path2, value);
  }
  if (IsNumber2(schema.minContains) && containsCount < schema.minContains) {
    yield Create(ValueErrorType.ArrayMinContains, schema, path2, value);
  }
  if (IsNumber2(schema.maxContains) && containsCount > schema.maxContains) {
    yield Create(ValueErrorType.ArrayMaxContains, schema, path2, value);
  }
}
function* FromAsyncIterator5(schema, references, path2, value) {
  if (!IsAsyncIterator2(value))
    yield Create(ValueErrorType.AsyncIterator, schema, path2, value);
}
function* FromBigInt3(schema, references, path2, value) {
  if (!IsBigInt2(value))
    return yield Create(ValueErrorType.BigInt, schema, path2, value);
  if (IsDefined2(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
    yield Create(ValueErrorType.BigIntExclusiveMaximum, schema, path2, value);
  }
  if (IsDefined2(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
    yield Create(ValueErrorType.BigIntExclusiveMinimum, schema, path2, value);
  }
  if (IsDefined2(schema.maximum) && !(value <= schema.maximum)) {
    yield Create(ValueErrorType.BigIntMaximum, schema, path2, value);
  }
  if (IsDefined2(schema.minimum) && !(value >= schema.minimum)) {
    yield Create(ValueErrorType.BigIntMinimum, schema, path2, value);
  }
  if (IsDefined2(schema.multipleOf) && !(value % schema.multipleOf === BigInt(0))) {
    yield Create(ValueErrorType.BigIntMultipleOf, schema, path2, value);
  }
}
function* FromBoolean3(schema, references, path2, value) {
  if (!IsBoolean2(value))
    yield Create(ValueErrorType.Boolean, schema, path2, value);
}
function* FromConstructor5(schema, references, path2, value) {
  yield* Visit6(schema.returns, references, path2, value.prototype);
}
function* FromDate3(schema, references, path2, value) {
  if (!IsDate2(value))
    return yield Create(ValueErrorType.Date, schema, path2, value);
  if (IsDefined2(schema.exclusiveMaximumTimestamp) && !(value.getTime() < schema.exclusiveMaximumTimestamp)) {
    yield Create(ValueErrorType.DateExclusiveMaximumTimestamp, schema, path2, value);
  }
  if (IsDefined2(schema.exclusiveMinimumTimestamp) && !(value.getTime() > schema.exclusiveMinimumTimestamp)) {
    yield Create(ValueErrorType.DateExclusiveMinimumTimestamp, schema, path2, value);
  }
  if (IsDefined2(schema.maximumTimestamp) && !(value.getTime() <= schema.maximumTimestamp)) {
    yield Create(ValueErrorType.DateMaximumTimestamp, schema, path2, value);
  }
  if (IsDefined2(schema.minimumTimestamp) && !(value.getTime() >= schema.minimumTimestamp)) {
    yield Create(ValueErrorType.DateMinimumTimestamp, schema, path2, value);
  }
  if (IsDefined2(schema.multipleOfTimestamp) && !(value.getTime() % schema.multipleOfTimestamp === 0)) {
    yield Create(ValueErrorType.DateMultipleOfTimestamp, schema, path2, value);
  }
}
function* FromFunction5(schema, references, path2, value) {
  if (!IsFunction2(value))
    yield Create(ValueErrorType.Function, schema, path2, value);
}
function* FromImport2(schema, references, path2, value) {
  const definitions = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  yield* Visit6(target, [...references, ...definitions], path2, value);
}
function* FromInteger3(schema, references, path2, value) {
  if (!IsInteger(value))
    return yield Create(ValueErrorType.Integer, schema, path2, value);
  if (IsDefined2(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
    yield Create(ValueErrorType.IntegerExclusiveMaximum, schema, path2, value);
  }
  if (IsDefined2(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
    yield Create(ValueErrorType.IntegerExclusiveMinimum, schema, path2, value);
  }
  if (IsDefined2(schema.maximum) && !(value <= schema.maximum)) {
    yield Create(ValueErrorType.IntegerMaximum, schema, path2, value);
  }
  if (IsDefined2(schema.minimum) && !(value >= schema.minimum)) {
    yield Create(ValueErrorType.IntegerMinimum, schema, path2, value);
  }
  if (IsDefined2(schema.multipleOf) && !(value % schema.multipleOf === 0)) {
    yield Create(ValueErrorType.IntegerMultipleOf, schema, path2, value);
  }
}
function* FromIntersect10(schema, references, path2, value) {
  let hasError = false;
  for (const inner of schema.allOf) {
    for (const error49 of Visit6(inner, references, path2, value)) {
      hasError = true;
      yield error49;
    }
  }
  if (hasError) {
    return yield Create(ValueErrorType.Intersect, schema, path2, value);
  }
  if (schema.unevaluatedProperties === false) {
    const keyCheck = new RegExp(KeyOfPattern(schema));
    for (const valueKey of Object.getOwnPropertyNames(value)) {
      if (!keyCheck.test(valueKey)) {
        yield Create(ValueErrorType.IntersectUnevaluatedProperties, schema, `${path2}/${valueKey}`, value);
      }
    }
  }
  if (typeof schema.unevaluatedProperties === "object") {
    const keyCheck = new RegExp(KeyOfPattern(schema));
    for (const valueKey of Object.getOwnPropertyNames(value)) {
      if (!keyCheck.test(valueKey)) {
        const next = Visit6(schema.unevaluatedProperties, references, `${path2}/${valueKey}`, value[valueKey]).next();
        if (!next.done)
          yield next.value;
      }
    }
  }
}
function* FromIterator5(schema, references, path2, value) {
  if (!IsIterator2(value))
    yield Create(ValueErrorType.Iterator, schema, path2, value);
}
function* FromLiteral4(schema, references, path2, value) {
  if (!(value === schema.const))
    yield Create(ValueErrorType.Literal, schema, path2, value);
}
function* FromNever3(schema, references, path2, value) {
  yield Create(ValueErrorType.Never, schema, path2, value);
}
function* FromNot3(schema, references, path2, value) {
  if (Visit6(schema.not, references, path2, value).next().done === true)
    yield Create(ValueErrorType.Not, schema, path2, value);
}
function* FromNull3(schema, references, path2, value) {
  if (!IsNull2(value))
    yield Create(ValueErrorType.Null, schema, path2, value);
}
function* FromNumber3(schema, references, path2, value) {
  if (!TypeSystemPolicy.IsNumberLike(value))
    return yield Create(ValueErrorType.Number, schema, path2, value);
  if (IsDefined2(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
    yield Create(ValueErrorType.NumberExclusiveMaximum, schema, path2, value);
  }
  if (IsDefined2(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
    yield Create(ValueErrorType.NumberExclusiveMinimum, schema, path2, value);
  }
  if (IsDefined2(schema.maximum) && !(value <= schema.maximum)) {
    yield Create(ValueErrorType.NumberMaximum, schema, path2, value);
  }
  if (IsDefined2(schema.minimum) && !(value >= schema.minimum)) {
    yield Create(ValueErrorType.NumberMinimum, schema, path2, value);
  }
  if (IsDefined2(schema.multipleOf) && !(value % schema.multipleOf === 0)) {
    yield Create(ValueErrorType.NumberMultipleOf, schema, path2, value);
  }
}
function* FromObject9(schema, references, path2, value) {
  if (!TypeSystemPolicy.IsObjectLike(value))
    return yield Create(ValueErrorType.Object, schema, path2, value);
  if (IsDefined2(schema.minProperties) && !(Object.getOwnPropertyNames(value).length >= schema.minProperties)) {
    yield Create(ValueErrorType.ObjectMinProperties, schema, path2, value);
  }
  if (IsDefined2(schema.maxProperties) && !(Object.getOwnPropertyNames(value).length <= schema.maxProperties)) {
    yield Create(ValueErrorType.ObjectMaxProperties, schema, path2, value);
  }
  const requiredKeys = Array.isArray(schema.required) ? schema.required : [];
  const knownKeys = Object.getOwnPropertyNames(schema.properties);
  const unknownKeys = Object.getOwnPropertyNames(value);
  for (const requiredKey of requiredKeys) {
    if (unknownKeys.includes(requiredKey))
      continue;
    yield Create(ValueErrorType.ObjectRequiredProperty, schema.properties[requiredKey], `${path2}/${EscapeKey(requiredKey)}`, undefined);
  }
  if (schema.additionalProperties === false) {
    for (const valueKey of unknownKeys) {
      if (!knownKeys.includes(valueKey)) {
        yield Create(ValueErrorType.ObjectAdditionalProperties, schema, `${path2}/${EscapeKey(valueKey)}`, value[valueKey]);
      }
    }
  }
  if (typeof schema.additionalProperties === "object") {
    for (const valueKey of unknownKeys) {
      if (knownKeys.includes(valueKey))
        continue;
      yield* Visit6(schema.additionalProperties, references, `${path2}/${EscapeKey(valueKey)}`, value[valueKey]);
    }
  }
  for (const knownKey of knownKeys) {
    const property2 = schema.properties[knownKey];
    if (schema.required && schema.required.includes(knownKey)) {
      yield* Visit6(property2, references, `${path2}/${EscapeKey(knownKey)}`, value[knownKey]);
      if (ExtendsUndefinedCheck(schema) && !(knownKey in value)) {
        yield Create(ValueErrorType.ObjectRequiredProperty, property2, `${path2}/${EscapeKey(knownKey)}`, undefined);
      }
    } else {
      if (TypeSystemPolicy.IsExactOptionalProperty(value, knownKey)) {
        yield* Visit6(property2, references, `${path2}/${EscapeKey(knownKey)}`, value[knownKey]);
      }
    }
  }
}
function* FromPromise5(schema, references, path2, value) {
  if (!IsPromise(value))
    yield Create(ValueErrorType.Promise, schema, path2, value);
}
function* FromRecord5(schema, references, path2, value) {
  if (!TypeSystemPolicy.IsRecordLike(value))
    return yield Create(ValueErrorType.Object, schema, path2, value);
  if (IsDefined2(schema.minProperties) && !(Object.getOwnPropertyNames(value).length >= schema.minProperties)) {
    yield Create(ValueErrorType.ObjectMinProperties, schema, path2, value);
  }
  if (IsDefined2(schema.maxProperties) && !(Object.getOwnPropertyNames(value).length <= schema.maxProperties)) {
    yield Create(ValueErrorType.ObjectMaxProperties, schema, path2, value);
  }
  const [patternKey, patternSchema] = Object.entries(schema.patternProperties)[0];
  const regex = new RegExp(patternKey);
  for (const [propertyKey, propertyValue] of Object.entries(value)) {
    if (regex.test(propertyKey))
      yield* Visit6(patternSchema, references, `${path2}/${EscapeKey(propertyKey)}`, propertyValue);
  }
  if (typeof schema.additionalProperties === "object") {
    for (const [propertyKey, propertyValue] of Object.entries(value)) {
      if (!regex.test(propertyKey))
        yield* Visit6(schema.additionalProperties, references, `${path2}/${EscapeKey(propertyKey)}`, propertyValue);
    }
  }
  if (schema.additionalProperties === false) {
    for (const [propertyKey, propertyValue] of Object.entries(value)) {
      if (regex.test(propertyKey))
        continue;
      return yield Create(ValueErrorType.ObjectAdditionalProperties, schema, `${path2}/${EscapeKey(propertyKey)}`, propertyValue);
    }
  }
}
function* FromRef6(schema, references, path2, value) {
  yield* Visit6(Deref(schema, references), references, path2, value);
}
function* FromRegExp3(schema, references, path2, value) {
  if (!IsString2(value))
    return yield Create(ValueErrorType.String, schema, path2, value);
  if (IsDefined2(schema.minLength) && !(value.length >= schema.minLength)) {
    yield Create(ValueErrorType.StringMinLength, schema, path2, value);
  }
  if (IsDefined2(schema.maxLength) && !(value.length <= schema.maxLength)) {
    yield Create(ValueErrorType.StringMaxLength, schema, path2, value);
  }
  const regex = new RegExp(schema.source, schema.flags);
  if (!regex.test(value)) {
    return yield Create(ValueErrorType.RegExp, schema, path2, value);
  }
}
function* FromString3(schema, references, path2, value) {
  if (!IsString2(value))
    return yield Create(ValueErrorType.String, schema, path2, value);
  if (IsDefined2(schema.minLength) && !(value.length >= schema.minLength)) {
    yield Create(ValueErrorType.StringMinLength, schema, path2, value);
  }
  if (IsDefined2(schema.maxLength) && !(value.length <= schema.maxLength)) {
    yield Create(ValueErrorType.StringMaxLength, schema, path2, value);
  }
  if (IsString2(schema.pattern)) {
    const regex = new RegExp(schema.pattern);
    if (!regex.test(value)) {
      yield Create(ValueErrorType.StringPattern, schema, path2, value);
    }
  }
  if (IsString2(schema.format)) {
    if (!exports_format.Has(schema.format)) {
      yield Create(ValueErrorType.StringFormatUnknown, schema, path2, value);
    } else {
      const format = exports_format.Get(schema.format);
      if (!format(value)) {
        yield Create(ValueErrorType.StringFormat, schema, path2, value);
      }
    }
  }
}
function* FromSymbol3(schema, references, path2, value) {
  if (!IsSymbol2(value))
    yield Create(ValueErrorType.Symbol, schema, path2, value);
}
function* FromTemplateLiteral5(schema, references, path2, value) {
  if (!IsString2(value))
    return yield Create(ValueErrorType.String, schema, path2, value);
  const regex = new RegExp(schema.pattern);
  if (!regex.test(value)) {
    yield Create(ValueErrorType.StringPattern, schema, path2, value);
  }
}
function* FromThis2(schema, references, path2, value) {
  yield* Visit6(Deref(schema, references), references, path2, value);
}
function* FromTuple7(schema, references, path2, value) {
  if (!IsArray2(value))
    return yield Create(ValueErrorType.Tuple, schema, path2, value);
  if (schema.items === undefined && !(value.length === 0)) {
    return yield Create(ValueErrorType.TupleLength, schema, path2, value);
  }
  if (!(value.length === schema.maxItems)) {
    return yield Create(ValueErrorType.TupleLength, schema, path2, value);
  }
  if (!schema.items) {
    return;
  }
  for (let i = 0;i < schema.items.length; i++) {
    yield* Visit6(schema.items[i], references, `${path2}/${i}`, value[i]);
  }
}
function* FromUndefined3(schema, references, path2, value) {
  if (!IsUndefined2(value))
    yield Create(ValueErrorType.Undefined, schema, path2, value);
}
function* FromUnion12(schema, references, path2, value) {
  if (Check(schema, references, value))
    return;
  const errors4 = schema.anyOf.map((variant) => new ValueErrorIterator(Visit6(variant, references, path2, value)));
  yield Create(ValueErrorType.Union, schema, path2, value, errors4);
}
function* FromUint8Array3(schema, references, path2, value) {
  if (!IsUint8Array2(value))
    return yield Create(ValueErrorType.Uint8Array, schema, path2, value);
  if (IsDefined2(schema.maxByteLength) && !(value.length <= schema.maxByteLength)) {
    yield Create(ValueErrorType.Uint8ArrayMaxByteLength, schema, path2, value);
  }
  if (IsDefined2(schema.minByteLength) && !(value.length >= schema.minByteLength)) {
    yield Create(ValueErrorType.Uint8ArrayMinByteLength, schema, path2, value);
  }
}
function* FromUnknown3(schema, references, path2, value) {}
function* FromVoid3(schema, references, path2, value) {
  if (!TypeSystemPolicy.IsVoidLike(value))
    yield Create(ValueErrorType.Void, schema, path2, value);
}
function* FromKind2(schema, references, path2, value) {
  const check2 = exports_type2.Get(schema[Kind]);
  if (!check2(schema, value))
    yield Create(ValueErrorType.Kind, schema, path2, value);
}
function* Visit6(schema, references, path2, value) {
  const references_ = IsDefined2(schema.$id) ? [...references, schema] : references;
  const schema_ = schema;
  switch (schema_[Kind]) {
    case "Any":
      return yield* FromAny3(schema_, references_, path2, value);
    case "Argument":
      return yield* FromArgument3(schema_, references_, path2, value);
    case "Array":
      return yield* FromArray8(schema_, references_, path2, value);
    case "AsyncIterator":
      return yield* FromAsyncIterator5(schema_, references_, path2, value);
    case "BigInt":
      return yield* FromBigInt3(schema_, references_, path2, value);
    case "Boolean":
      return yield* FromBoolean3(schema_, references_, path2, value);
    case "Constructor":
      return yield* FromConstructor5(schema_, references_, path2, value);
    case "Date":
      return yield* FromDate3(schema_, references_, path2, value);
    case "Function":
      return yield* FromFunction5(schema_, references_, path2, value);
    case "Import":
      return yield* FromImport2(schema_, references_, path2, value);
    case "Integer":
      return yield* FromInteger3(schema_, references_, path2, value);
    case "Intersect":
      return yield* FromIntersect10(schema_, references_, path2, value);
    case "Iterator":
      return yield* FromIterator5(schema_, references_, path2, value);
    case "Literal":
      return yield* FromLiteral4(schema_, references_, path2, value);
    case "Never":
      return yield* FromNever3(schema_, references_, path2, value);
    case "Not":
      return yield* FromNot3(schema_, references_, path2, value);
    case "Null":
      return yield* FromNull3(schema_, references_, path2, value);
    case "Number":
      return yield* FromNumber3(schema_, references_, path2, value);
    case "Object":
      return yield* FromObject9(schema_, references_, path2, value);
    case "Promise":
      return yield* FromPromise5(schema_, references_, path2, value);
    case "Record":
      return yield* FromRecord5(schema_, references_, path2, value);
    case "Ref":
      return yield* FromRef6(schema_, references_, path2, value);
    case "RegExp":
      return yield* FromRegExp3(schema_, references_, path2, value);
    case "String":
      return yield* FromString3(schema_, references_, path2, value);
    case "Symbol":
      return yield* FromSymbol3(schema_, references_, path2, value);
    case "TemplateLiteral":
      return yield* FromTemplateLiteral5(schema_, references_, path2, value);
    case "This":
      return yield* FromThis2(schema_, references_, path2, value);
    case "Tuple":
      return yield* FromTuple7(schema_, references_, path2, value);
    case "Undefined":
      return yield* FromUndefined3(schema_, references_, path2, value);
    case "Union":
      return yield* FromUnion12(schema_, references_, path2, value);
    case "Uint8Array":
      return yield* FromUint8Array3(schema_, references_, path2, value);
    case "Unknown":
      return yield* FromUnknown3(schema_, references_, path2, value);
    case "Void":
      return yield* FromVoid3(schema_, references_, path2, value);
    default:
      if (!exports_type2.Has(schema_[Kind]))
        throw new ValueErrorsUnknownTypeError(schema);
      return yield* FromKind2(schema_, references_, path2, value);
  }
}
function Errors(...args) {
  const iterator = args.length === 3 ? Visit6(args[0], args[1], "", args[2]) : Visit6(args[0], [], "", args[1]);
  return new ValueErrorIterator(iterator);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/assert/assert.mjs
var __classPrivateFieldSet = function(receiver, state, value, kind, f4) {
  if (kind === "m")
    throw new TypeError("Private method is not writable");
  if (kind === "a" && !f4)
    throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver !== state || !f4 : !state.has(receiver))
    throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state.set(receiver, value), value;
};
var __classPrivateFieldGet = function(receiver, state, kind, f4) {
  if (kind === "a" && !f4)
    throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f4 : !state.has(receiver))
    throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f4 : kind === "a" ? f4.call(receiver) : f4 ? f4.value : state.get(receiver);
};
var _AssertError_instances;
var _AssertError_iterator;
var _AssertError_Iterator;

class AssertError extends TypeBoxError {
  constructor(iterator) {
    const error49 = iterator.First();
    super(error49 === undefined ? "Invalid Value" : error49.message);
    _AssertError_instances.add(this);
    _AssertError_iterator.set(this, undefined);
    __classPrivateFieldSet(this, _AssertError_iterator, iterator, "f");
    this.error = error49;
  }
  Errors() {
    return new ValueErrorIterator(__classPrivateFieldGet(this, _AssertError_instances, "m", _AssertError_Iterator).call(this));
  }
}
_AssertError_iterator = new WeakMap, _AssertError_instances = new WeakSet, _AssertError_Iterator = function* _AssertError_Iterator2() {
  if (this.error)
    yield this.error;
  yield* __classPrivateFieldGet(this, _AssertError_iterator, "f");
};
function AssertValue(schema, references, value) {
  if (Check(schema, references, value))
    return;
  throw new AssertError(Errors(schema, references, value));
}
function Assert(...args) {
  return args.length === 3 ? AssertValue(args[0], args[1], args[2]) : AssertValue(args[0], [], args[1]);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/clone/clone.mjs
function FromObject10(value) {
  const Acc = {};
  for (const key of Object.getOwnPropertyNames(value)) {
    Acc[key] = Clone2(value[key]);
  }
  for (const key of Object.getOwnPropertySymbols(value)) {
    Acc[key] = Clone2(value[key]);
  }
  return Acc;
}
function FromArray9(value) {
  return value.map((element) => Clone2(element));
}
function FromTypedArray(value) {
  return value.slice();
}
function FromMap(value) {
  return new Map(Clone2([...value.entries()]));
}
function FromSet(value) {
  return new Set(Clone2([...value.entries()]));
}
function FromDate4(value) {
  return new Date(value.toISOString());
}
function FromValue2(value) {
  return value;
}
function Clone2(value) {
  if (IsArray2(value))
    return FromArray9(value);
  if (IsDate2(value))
    return FromDate4(value);
  if (IsTypedArray(value))
    return FromTypedArray(value);
  if (IsMap(value))
    return FromMap(value);
  if (IsSet(value))
    return FromSet(value);
  if (IsObject2(value))
    return FromObject10(value);
  if (IsValueType(value))
    return FromValue2(value);
  throw new Error("ValueClone: Unable to clone value");
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/create/create.mjs
class ValueCreateError extends TypeBoxError {
  constructor(schema, message2) {
    super(message2);
    this.schema = schema;
  }
}
function FromDefault(value) {
  return IsFunction2(value) ? value() : Clone2(value);
}
function FromAny4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return {};
  }
}
function FromArgument4(schema, references) {
  return {};
}
function FromArray10(schema, references) {
  if (schema.uniqueItems === true && !HasPropertyKey2(schema, "default")) {
    throw new ValueCreateError(schema, "Array with the uniqueItems constraint requires a default value");
  } else if ("contains" in schema && !HasPropertyKey2(schema, "default")) {
    throw new ValueCreateError(schema, "Array with the contains constraint requires a default value");
  } else if ("default" in schema) {
    return FromDefault(schema.default);
  } else if (schema.minItems !== undefined) {
    return Array.from({ length: schema.minItems }).map((item) => {
      return Visit7(schema.items, references);
    });
  } else {
    return [];
  }
}
function FromAsyncIterator6(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return async function* () {}();
  }
}
function FromBigInt4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return BigInt(0);
  }
}
function FromBoolean4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return false;
  }
}
function FromConstructor6(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    const value = Visit7(schema.returns, references);
    if (typeof value === "object" && !Array.isArray(value)) {
      return class {
        constructor() {
          for (const [key, val] of Object.entries(value)) {
            const self2 = this;
            self2[key] = val;
          }
        }
      };
    } else {
      return class {
      };
    }
  }
}
function FromDate5(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else if (schema.minimumTimestamp !== undefined) {
    return new Date(schema.minimumTimestamp);
  } else {
    return new Date;
  }
}
function FromFunction6(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return () => Visit7(schema.returns, references);
  }
}
function FromImport3(schema, references) {
  const definitions = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  return Visit7(target, [...references, ...definitions]);
}
function FromInteger4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else if (schema.minimum !== undefined) {
    return schema.minimum;
  } else {
    return 0;
  }
}
function FromIntersect11(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    const value = schema.allOf.reduce((acc, schema2) => {
      const next = Visit7(schema2, references);
      return typeof next === "object" ? { ...acc, ...next } : next;
    }, {});
    if (!Check(schema, references, value))
      throw new ValueCreateError(schema, "Intersect produced invalid value. Consider using a default value.");
    return value;
  }
}
function FromIterator6(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return function* () {}();
  }
}
function FromLiteral5(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return schema.const;
  }
}
function FromNever4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    throw new ValueCreateError(schema, "Never types cannot be created. Consider using a default value.");
  }
}
function FromNot4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    throw new ValueCreateError(schema, "Not types must have a default value");
  }
}
function FromNull4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return null;
  }
}
function FromNumber4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else if (schema.minimum !== undefined) {
    return schema.minimum;
  } else {
    return 0;
  }
}
function FromObject11(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    const required2 = new Set(schema.required);
    const Acc = {};
    for (const [key, subschema] of Object.entries(schema.properties)) {
      if (!required2.has(key))
        continue;
      Acc[key] = Visit7(subschema, references);
    }
    return Acc;
  }
}
function FromPromise6(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return Promise.resolve(Visit7(schema.item, references));
  }
}
function FromRecord6(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return {};
  }
}
function FromRef7(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return Visit7(Deref(schema, references), references);
  }
}
function FromRegExp4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    throw new ValueCreateError(schema, "RegExp types cannot be created. Consider using a default value.");
  }
}
function FromString4(schema, references) {
  if (schema.pattern !== undefined) {
    if (!HasPropertyKey2(schema, "default")) {
      throw new ValueCreateError(schema, "String types with patterns must specify a default value");
    } else {
      return FromDefault(schema.default);
    }
  } else if (schema.format !== undefined) {
    if (!HasPropertyKey2(schema, "default")) {
      throw new ValueCreateError(schema, "String types with formats must specify a default value");
    } else {
      return FromDefault(schema.default);
    }
  } else {
    if (HasPropertyKey2(schema, "default")) {
      return FromDefault(schema.default);
    } else if (schema.minLength !== undefined) {
      return Array.from({ length: schema.minLength }).map(() => " ").join("");
    } else {
      return "";
    }
  }
}
function FromSymbol4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else if ("value" in schema) {
    return Symbol.for(schema.value);
  } else {
    return Symbol();
  }
}
function FromTemplateLiteral6(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  }
  if (!IsTemplateLiteralFinite(schema))
    throw new ValueCreateError(schema, "Can only create template literals that produce a finite variants. Consider using a default value.");
  const generated = TemplateLiteralGenerate(schema);
  return generated[0];
}
function FromThis3(schema, references) {
  if (recursiveDepth++ > recursiveMaxDepth)
    throw new ValueCreateError(schema, "Cannot create recursive type as it appears possibly infinite. Consider using a default.");
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return Visit7(Deref(schema, references), references);
  }
}
function FromTuple8(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  }
  if (schema.items === undefined) {
    return [];
  } else {
    return Array.from({ length: schema.minItems }).map((_6, index2) => Visit7(schema.items[index2], references));
  }
}
function FromUndefined4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return;
  }
}
function FromUnion13(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else if (schema.anyOf.length === 0) {
    throw new Error("ValueCreate.Union: Cannot create Union with zero variants");
  } else {
    return Visit7(schema.anyOf[0], references);
  }
}
function FromUint8Array4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else if (schema.minByteLength !== undefined) {
    return new Uint8Array(schema.minByteLength);
  } else {
    return new Uint8Array(0);
  }
}
function FromUnknown4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return {};
  }
}
function FromVoid4(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    return;
  }
}
function FromKind3(schema, references) {
  if (HasPropertyKey2(schema, "default")) {
    return FromDefault(schema.default);
  } else {
    throw new Error("User defined types must specify a default value");
  }
}
function Visit7(schema, references) {
  const references_ = Pushref(schema, references);
  const schema_ = schema;
  switch (schema_[Kind]) {
    case "Any":
      return FromAny4(schema_, references_);
    case "Argument":
      return FromArgument4(schema_, references_);
    case "Array":
      return FromArray10(schema_, references_);
    case "AsyncIterator":
      return FromAsyncIterator6(schema_, references_);
    case "BigInt":
      return FromBigInt4(schema_, references_);
    case "Boolean":
      return FromBoolean4(schema_, references_);
    case "Constructor":
      return FromConstructor6(schema_, references_);
    case "Date":
      return FromDate5(schema_, references_);
    case "Function":
      return FromFunction6(schema_, references_);
    case "Import":
      return FromImport3(schema_, references_);
    case "Integer":
      return FromInteger4(schema_, references_);
    case "Intersect":
      return FromIntersect11(schema_, references_);
    case "Iterator":
      return FromIterator6(schema_, references_);
    case "Literal":
      return FromLiteral5(schema_, references_);
    case "Never":
      return FromNever4(schema_, references_);
    case "Not":
      return FromNot4(schema_, references_);
    case "Null":
      return FromNull4(schema_, references_);
    case "Number":
      return FromNumber4(schema_, references_);
    case "Object":
      return FromObject11(schema_, references_);
    case "Promise":
      return FromPromise6(schema_, references_);
    case "Record":
      return FromRecord6(schema_, references_);
    case "Ref":
      return FromRef7(schema_, references_);
    case "RegExp":
      return FromRegExp4(schema_, references_);
    case "String":
      return FromString4(schema_, references_);
    case "Symbol":
      return FromSymbol4(schema_, references_);
    case "TemplateLiteral":
      return FromTemplateLiteral6(schema_, references_);
    case "This":
      return FromThis3(schema_, references_);
    case "Tuple":
      return FromTuple8(schema_, references_);
    case "Undefined":
      return FromUndefined4(schema_, references_);
    case "Union":
      return FromUnion13(schema_, references_);
    case "Uint8Array":
      return FromUint8Array4(schema_, references_);
    case "Unknown":
      return FromUnknown4(schema_, references_);
    case "Void":
      return FromVoid4(schema_, references_);
    default:
      if (!exports_type2.Has(schema_[Kind]))
        throw new ValueCreateError(schema_, "Unknown type");
      return FromKind3(schema_, references_);
  }
}
var recursiveMaxDepth = 512;
var recursiveDepth = 0;
function Create2(...args) {
  recursiveDepth = 0;
  return args.length === 2 ? Visit7(args[0], args[1]) : Visit7(args[0], []);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/cast/cast.mjs
class ValueCastError extends TypeBoxError {
  constructor(schema, message2) {
    super(message2);
    this.schema = schema;
  }
}
function ScoreUnion(schema, references, value) {
  if (schema[Kind] === "Object" && typeof value === "object" && !IsNull2(value)) {
    const object2 = schema;
    const keys = Object.getOwnPropertyNames(value);
    const entries = Object.entries(object2.properties);
    return entries.reduce((acc, [key, schema2]) => {
      const literal3 = schema2[Kind] === "Literal" && schema2.const === value[key] ? 100 : 0;
      const checks3 = Check(schema2, references, value[key]) ? 10 : 0;
      const exists2 = keys.includes(key) ? 1 : 0;
      return acc + (literal3 + checks3 + exists2);
    }, 0);
  } else if (schema[Kind] === "Union") {
    const schemas3 = schema.anyOf.map((schema2) => Deref(schema2, references));
    const scores = schemas3.map((schema2) => ScoreUnion(schema2, references, value));
    return Math.max(...scores);
  } else {
    return Check(schema, references, value) ? 1 : 0;
  }
}
function SelectUnion(union3, references, value) {
  const schemas3 = union3.anyOf.map((schema) => Deref(schema, references));
  let [select, best] = [schemas3[0], 0];
  for (const schema of schemas3) {
    const score = ScoreUnion(schema, references, value);
    if (score > best) {
      select = schema;
      best = score;
    }
  }
  return select;
}
function CastUnion(union3, references, value) {
  if ("default" in union3) {
    return typeof value === "function" ? union3.default : Clone2(union3.default);
  } else {
    const schema = SelectUnion(union3, references, value);
    return Cast(schema, references, value);
  }
}
function DefaultClone(schema, references, value) {
  return Check(schema, references, value) ? Clone2(value) : Create2(schema, references);
}
function Default(schema, references, value) {
  return Check(schema, references, value) ? value : Create2(schema, references);
}
function FromArray11(schema, references, value) {
  if (Check(schema, references, value))
    return Clone2(value);
  const created = IsArray2(value) ? Clone2(value) : Create2(schema, references);
  const minimum = IsNumber2(schema.minItems) && created.length < schema.minItems ? [...created, ...Array.from({ length: schema.minItems - created.length }, () => null)] : created;
  const maximum = IsNumber2(schema.maxItems) && minimum.length > schema.maxItems ? minimum.slice(0, schema.maxItems) : minimum;
  const casted = maximum.map((value2) => Visit8(schema.items, references, value2));
  if (schema.uniqueItems !== true)
    return casted;
  const unique = [...new Set(casted)];
  if (!Check(schema, references, unique))
    throw new ValueCastError(schema, "Array cast produced invalid data due to uniqueItems constraint");
  return unique;
}
function FromConstructor7(schema, references, value) {
  if (Check(schema, references, value))
    return Create2(schema, references);
  const required2 = new Set(schema.returns.required || []);
  const result = function() {};
  for (const [key, property2] of Object.entries(schema.returns.properties)) {
    if (!required2.has(key) && value.prototype[key] === undefined)
      continue;
    result.prototype[key] = Visit8(property2, references, value.prototype[key]);
  }
  return result;
}
function FromImport4(schema, references, value) {
  const definitions = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  return Visit8(target, [...references, ...definitions], value);
}
function IntersectAssign(correct, value) {
  if (IsObject2(correct) && !IsObject2(value) || !IsObject2(correct) && IsObject2(value))
    return correct;
  if (!IsObject2(correct) || !IsObject2(value))
    return value;
  return globalThis.Object.getOwnPropertyNames(correct).reduce((result, key) => {
    const property2 = key in value ? IntersectAssign(correct[key], value[key]) : correct[key];
    return { ...result, [key]: property2 };
  }, {});
}
function FromIntersect12(schema, references, value) {
  if (Check(schema, references, value))
    return value;
  const correct = Create2(schema, references);
  const assigned = IntersectAssign(correct, value);
  return Check(schema, references, assigned) ? assigned : correct;
}
function FromNever5(schema, references, value) {
  throw new ValueCastError(schema, "Never types cannot be cast");
}
function FromObject12(schema, references, value) {
  if (Check(schema, references, value))
    return value;
  if (value === null || typeof value !== "object")
    return Create2(schema, references);
  const required2 = new Set(schema.required || []);
  const result = {};
  for (const [key, property2] of Object.entries(schema.properties)) {
    if (!required2.has(key) && value[key] === undefined)
      continue;
    result[key] = Visit8(property2, references, value[key]);
  }
  if (typeof schema.additionalProperties === "object") {
    const propertyNames = Object.getOwnPropertyNames(schema.properties);
    for (const propertyName of Object.getOwnPropertyNames(value)) {
      if (propertyNames.includes(propertyName))
        continue;
      result[propertyName] = Visit8(schema.additionalProperties, references, value[propertyName]);
    }
  }
  return result;
}
function FromRecord7(schema, references, value) {
  if (Check(schema, references, value))
    return Clone2(value);
  if (value === null || typeof value !== "object" || Array.isArray(value) || value instanceof Date)
    return Create2(schema, references);
  const subschemaPropertyName = Object.getOwnPropertyNames(schema.patternProperties)[0];
  const subschema = schema.patternProperties[subschemaPropertyName];
  const result = {};
  for (const [propKey, propValue] of Object.entries(value)) {
    result[propKey] = Visit8(subschema, references, propValue);
  }
  return result;
}
function FromRef8(schema, references, value) {
  return Visit8(Deref(schema, references), references, value);
}
function FromThis4(schema, references, value) {
  return Visit8(Deref(schema, references), references, value);
}
function FromTuple9(schema, references, value) {
  if (Check(schema, references, value))
    return Clone2(value);
  if (!IsArray2(value))
    return Create2(schema, references);
  if (schema.items === undefined)
    return [];
  return schema.items.map((schema2, index2) => Visit8(schema2, references, value[index2]));
}
function FromUnion14(schema, references, value) {
  return Check(schema, references, value) ? Clone2(value) : CastUnion(schema, references, value);
}
function Visit8(schema, references, value) {
  const references_ = IsString2(schema.$id) ? Pushref(schema, references) : references;
  const schema_ = schema;
  switch (schema[Kind]) {
    case "Array":
      return FromArray11(schema_, references_, value);
    case "Constructor":
      return FromConstructor7(schema_, references_, value);
    case "Import":
      return FromImport4(schema_, references_, value);
    case "Intersect":
      return FromIntersect12(schema_, references_, value);
    case "Never":
      return FromNever5(schema_, references_, value);
    case "Object":
      return FromObject12(schema_, references_, value);
    case "Record":
      return FromRecord7(schema_, references_, value);
    case "Ref":
      return FromRef8(schema_, references_, value);
    case "This":
      return FromThis4(schema_, references_, value);
    case "Tuple":
      return FromTuple9(schema_, references_, value);
    case "Union":
      return FromUnion14(schema_, references_, value);
    case "Date":
    case "Symbol":
    case "Uint8Array":
      return DefaultClone(schema, references, value);
    default:
      return Default(schema_, references_, value);
  }
}
function Cast(...args) {
  return args.length === 3 ? Visit8(args[0], args[1], args[2]) : Visit8(args[0], [], args[1]);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/clean/clean.mjs
function IsCheckable(schema) {
  return IsKind(schema) && schema[Kind] !== "Unsafe";
}
function FromArray12(schema, references, value) {
  if (!IsArray2(value))
    return value;
  return value.map((value2) => Visit9(schema.items, references, value2));
}
function FromImport5(schema, references, value) {
  const definitions = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  return Visit9(target, [...references, ...definitions], value);
}
function FromIntersect13(schema, references, value) {
  const unevaluatedProperties = schema.unevaluatedProperties;
  const intersections = schema.allOf.map((schema2) => Visit9(schema2, references, Clone2(value)));
  const composite = intersections.reduce((acc, value2) => IsObject2(value2) ? { ...acc, ...value2 } : value2, {});
  if (!IsObject2(value) || !IsObject2(composite) || !IsKind(unevaluatedProperties))
    return composite;
  const knownkeys = KeyOfPropertyKeys(schema);
  for (const key of Object.getOwnPropertyNames(value)) {
    if (knownkeys.includes(key))
      continue;
    if (Check(unevaluatedProperties, references, value[key])) {
      composite[key] = Visit9(unevaluatedProperties, references, value[key]);
    }
  }
  return composite;
}
function FromObject13(schema, references, value) {
  if (!IsObject2(value) || IsArray2(value))
    return value;
  const additionalProperties = schema.additionalProperties;
  for (const key of Object.getOwnPropertyNames(value)) {
    if (HasPropertyKey2(schema.properties, key)) {
      value[key] = Visit9(schema.properties[key], references, value[key]);
      continue;
    }
    if (IsKind(additionalProperties) && Check(additionalProperties, references, value[key])) {
      value[key] = Visit9(additionalProperties, references, value[key]);
      continue;
    }
    delete value[key];
  }
  return value;
}
function FromRecord8(schema, references, value) {
  if (!IsObject2(value))
    return value;
  const additionalProperties = schema.additionalProperties;
  const propertyKeys = Object.getOwnPropertyNames(value);
  const [propertyKey, propertySchema] = Object.entries(schema.patternProperties)[0];
  const propertyKeyTest = new RegExp(propertyKey);
  for (const key of propertyKeys) {
    if (propertyKeyTest.test(key)) {
      value[key] = Visit9(propertySchema, references, value[key]);
      continue;
    }
    if (IsKind(additionalProperties) && Check(additionalProperties, references, value[key])) {
      value[key] = Visit9(additionalProperties, references, value[key]);
      continue;
    }
    delete value[key];
  }
  return value;
}
function FromRef9(schema, references, value) {
  return Visit9(Deref(schema, references), references, value);
}
function FromThis5(schema, references, value) {
  return Visit9(Deref(schema, references), references, value);
}
function FromTuple10(schema, references, value) {
  if (!IsArray2(value))
    return value;
  if (IsUndefined2(schema.items))
    return [];
  const length2 = Math.min(value.length, schema.items.length);
  for (let i = 0;i < length2; i++) {
    value[i] = Visit9(schema.items[i], references, value[i]);
  }
  return value.length > length2 ? value.slice(0, length2) : value;
}
function FromUnion15(schema, references, value) {
  for (const inner of schema.anyOf) {
    if (IsCheckable(inner) && Check(inner, references, value)) {
      return Visit9(inner, references, value);
    }
  }
  return value;
}
function Visit9(schema, references, value) {
  const references_ = IsString2(schema.$id) ? Pushref(schema, references) : references;
  const schema_ = schema;
  switch (schema_[Kind]) {
    case "Array":
      return FromArray12(schema_, references_, value);
    case "Import":
      return FromImport5(schema_, references_, value);
    case "Intersect":
      return FromIntersect13(schema_, references_, value);
    case "Object":
      return FromObject13(schema_, references_, value);
    case "Record":
      return FromRecord8(schema_, references_, value);
    case "Ref":
      return FromRef9(schema_, references_, value);
    case "This":
      return FromThis5(schema_, references_, value);
    case "Tuple":
      return FromTuple10(schema_, references_, value);
    case "Union":
      return FromUnion15(schema_, references_, value);
    default:
      return value;
  }
}
function Clean(...args) {
  return args.length === 3 ? Visit9(args[0], args[1], args[2]) : Visit9(args[0], [], args[1]);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/convert/convert.mjs
function IsStringNumeric(value) {
  return IsString2(value) && !isNaN(value) && !isNaN(parseFloat(value));
}
function IsValueToString(value) {
  return IsBigInt2(value) || IsBoolean2(value) || IsNumber2(value);
}
function IsValueTrue(value) {
  return value === true || IsNumber2(value) && value === 1 || IsBigInt2(value) && value === BigInt("1") || IsString2(value) && (value.toLowerCase() === "true" || value === "1");
}
function IsValueFalse(value) {
  return value === false || IsNumber2(value) && (value === 0 || Object.is(value, -0)) || IsBigInt2(value) && value === BigInt("0") || IsString2(value) && (value.toLowerCase() === "false" || value === "0" || value === "-0");
}
function IsTimeStringWithTimeZone(value) {
  return IsString2(value) && /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(value);
}
function IsTimeStringWithoutTimeZone(value) {
  return IsString2(value) && /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(value);
}
function IsDateTimeStringWithTimeZone(value) {
  return IsString2(value) && /^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(value);
}
function IsDateTimeStringWithoutTimeZone(value) {
  return IsString2(value) && /^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(value);
}
function IsDateString(value) {
  return IsString2(value) && /^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(value);
}
function TryConvertLiteralString(value, target) {
  const conversion = TryConvertString(value);
  return conversion === target ? conversion : value;
}
function TryConvertLiteralNumber(value, target) {
  const conversion = TryConvertNumber(value);
  return conversion === target ? conversion : value;
}
function TryConvertLiteralBoolean(value, target) {
  const conversion = TryConvertBoolean(value);
  return conversion === target ? conversion : value;
}
function TryConvertLiteral(schema, value) {
  return IsString2(schema.const) ? TryConvertLiteralString(value, schema.const) : IsNumber2(schema.const) ? TryConvertLiteralNumber(value, schema.const) : IsBoolean2(schema.const) ? TryConvertLiteralBoolean(value, schema.const) : value;
}
function TryConvertBoolean(value) {
  return IsValueTrue(value) ? true : IsValueFalse(value) ? false : value;
}
function TryConvertBigInt(value) {
  const truncateInteger = (value2) => value2.split(".")[0];
  return IsStringNumeric(value) ? BigInt(truncateInteger(value)) : IsNumber2(value) ? BigInt(Math.trunc(value)) : IsValueFalse(value) ? BigInt(0) : IsValueTrue(value) ? BigInt(1) : value;
}
function TryConvertString(value) {
  return IsSymbol2(value) && value.description !== undefined ? value.description.toString() : IsValueToString(value) ? value.toString() : value;
}
function TryConvertNumber(value) {
  return IsStringNumeric(value) ? parseFloat(value) : IsValueTrue(value) ? 1 : IsValueFalse(value) ? 0 : value;
}
function TryConvertInteger(value) {
  return IsStringNumeric(value) ? parseInt(value) : IsNumber2(value) ? Math.trunc(value) : IsValueTrue(value) ? 1 : IsValueFalse(value) ? 0 : value;
}
function TryConvertNull(value) {
  return IsString2(value) && value.toLowerCase() === "null" ? null : value;
}
function TryConvertUndefined(value) {
  return IsString2(value) && value === "undefined" ? undefined : value;
}
function TryConvertDate(value) {
  return IsDate2(value) ? value : IsNumber2(value) ? new Date(value) : IsValueTrue(value) ? new Date(1) : IsValueFalse(value) ? new Date(0) : IsStringNumeric(value) ? new Date(parseInt(value)) : IsTimeStringWithoutTimeZone(value) ? new Date(`1970-01-01T${value}.000Z`) : IsTimeStringWithTimeZone(value) ? new Date(`1970-01-01T${value}`) : IsDateTimeStringWithoutTimeZone(value) ? new Date(`${value}.000Z`) : IsDateTimeStringWithTimeZone(value) ? new Date(value) : IsDateString(value) ? new Date(`${value}T00:00:00.000Z`) : value;
}
function Default2(value) {
  return value;
}
function FromArray13(schema, references, value) {
  const elements = IsArray2(value) ? value : [value];
  return elements.map((element) => Visit10(schema.items, references, element));
}
function FromBigInt5(schema, references, value) {
  return TryConvertBigInt(value);
}
function FromBoolean5(schema, references, value) {
  return TryConvertBoolean(value);
}
function FromDate6(schema, references, value) {
  return TryConvertDate(value);
}
function FromImport6(schema, references, value) {
  const definitions = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  return Visit10(target, [...references, ...definitions], value);
}
function FromInteger5(schema, references, value) {
  return TryConvertInteger(value);
}
function FromIntersect14(schema, references, value) {
  return schema.allOf.reduce((value2, schema2) => Visit10(schema2, references, value2), value);
}
function FromLiteral6(schema, references, value) {
  return TryConvertLiteral(schema, value);
}
function FromNull5(schema, references, value) {
  return TryConvertNull(value);
}
function FromNumber5(schema, references, value) {
  return TryConvertNumber(value);
}
function FromObject14(schema, references, value) {
  if (!IsObject2(value) || IsArray2(value))
    return value;
  for (const propertyKey of Object.getOwnPropertyNames(schema.properties)) {
    if (!HasPropertyKey2(value, propertyKey))
      continue;
    value[propertyKey] = Visit10(schema.properties[propertyKey], references, value[propertyKey]);
  }
  return value;
}
function FromRecord9(schema, references, value) {
  const isConvertable = IsObject2(value) && !IsArray2(value);
  if (!isConvertable)
    return value;
  const propertyKey = Object.getOwnPropertyNames(schema.patternProperties)[0];
  const property2 = schema.patternProperties[propertyKey];
  for (const [propKey, propValue] of Object.entries(value)) {
    value[propKey] = Visit10(property2, references, propValue);
  }
  return value;
}
function FromRef10(schema, references, value) {
  return Visit10(Deref(schema, references), references, value);
}
function FromString5(schema, references, value) {
  return TryConvertString(value);
}
function FromSymbol5(schema, references, value) {
  return IsString2(value) || IsNumber2(value) ? Symbol(value) : value;
}
function FromThis6(schema, references, value) {
  return Visit10(Deref(schema, references), references, value);
}
function FromTuple11(schema, references, value) {
  const isConvertable = IsArray2(value) && !IsUndefined2(schema.items);
  if (!isConvertable)
    return value;
  return value.map((value2, index2) => {
    return index2 < schema.items.length ? Visit10(schema.items[index2], references, value2) : value2;
  });
}
function FromUndefined5(schema, references, value) {
  return TryConvertUndefined(value);
}
function FromUnion16(schema, references, value) {
  for (const subschema of schema.anyOf) {
    if (Check(subschema, references, value)) {
      return value;
    }
  }
  for (const subschema of schema.anyOf) {
    const converted = Visit10(subschema, references, Clone2(value));
    if (!Check(subschema, references, converted))
      continue;
    return converted;
  }
  return value;
}
function Visit10(schema, references, value) {
  const references_ = Pushref(schema, references);
  const schema_ = schema;
  switch (schema[Kind]) {
    case "Array":
      return FromArray13(schema_, references_, value);
    case "BigInt":
      return FromBigInt5(schema_, references_, value);
    case "Boolean":
      return FromBoolean5(schema_, references_, value);
    case "Date":
      return FromDate6(schema_, references_, value);
    case "Import":
      return FromImport6(schema_, references_, value);
    case "Integer":
      return FromInteger5(schema_, references_, value);
    case "Intersect":
      return FromIntersect14(schema_, references_, value);
    case "Literal":
      return FromLiteral6(schema_, references_, value);
    case "Null":
      return FromNull5(schema_, references_, value);
    case "Number":
      return FromNumber5(schema_, references_, value);
    case "Object":
      return FromObject14(schema_, references_, value);
    case "Record":
      return FromRecord9(schema_, references_, value);
    case "Ref":
      return FromRef10(schema_, references_, value);
    case "String":
      return FromString5(schema_, references_, value);
    case "Symbol":
      return FromSymbol5(schema_, references_, value);
    case "This":
      return FromThis6(schema_, references_, value);
    case "Tuple":
      return FromTuple11(schema_, references_, value);
    case "Undefined":
      return FromUndefined5(schema_, references_, value);
    case "Union":
      return FromUnion16(schema_, references_, value);
    default:
      return Default2(value);
  }
}
function Convert(...args) {
  return args.length === 3 ? Visit10(args[0], args[1], args[2]) : Visit10(args[0], [], args[1]);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/transform/decode.mjs
class TransformDecodeCheckError extends TypeBoxError {
  constructor(schema, value, error49) {
    super(`Unable to decode value as it does not match the expected schema`);
    this.schema = schema;
    this.value = value;
    this.error = error49;
  }
}

class TransformDecodeError extends TypeBoxError {
  constructor(schema, path2, value, error49) {
    super(error49 instanceof Error ? error49.message : "Unknown error");
    this.schema = schema;
    this.path = path2;
    this.value = value;
    this.error = error49;
  }
}
function Default3(schema, path2, value) {
  try {
    return IsTransform(schema) ? schema[TransformKind].Decode(value) : value;
  } catch (error49) {
    throw new TransformDecodeError(schema, path2, value, error49);
  }
}
function FromArray14(schema, references, path2, value) {
  return IsArray2(value) ? Default3(schema, path2, value.map((value2, index2) => Visit11(schema.items, references, `${path2}/${index2}`, value2))) : Default3(schema, path2, value);
}
function FromIntersect15(schema, references, path2, value) {
  if (!IsObject2(value) || IsValueType(value))
    return Default3(schema, path2, value);
  const knownEntries = KeyOfPropertyEntries(schema);
  const knownKeys = knownEntries.map((entry) => entry[0]);
  const knownProperties = { ...value };
  for (const [knownKey, knownSchema] of knownEntries)
    if (knownKey in knownProperties) {
      knownProperties[knownKey] = Visit11(knownSchema, references, `${path2}/${knownKey}`, knownProperties[knownKey]);
    }
  if (!IsTransform(schema.unevaluatedProperties)) {
    return Default3(schema, path2, knownProperties);
  }
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
  const unevaluatedProperties = schema.unevaluatedProperties;
  const unknownProperties = { ...knownProperties };
  for (const key of unknownKeys)
    if (!knownKeys.includes(key)) {
      unknownProperties[key] = Default3(unevaluatedProperties, `${path2}/${key}`, unknownProperties[key]);
    }
  return Default3(schema, path2, unknownProperties);
}
function FromImport7(schema, references, path2, value) {
  const additional = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  const result = Visit11(target, [...references, ...additional], path2, value);
  return Default3(schema, path2, result);
}
function FromNot5(schema, references, path2, value) {
  return Default3(schema, path2, Visit11(schema.not, references, path2, value));
}
function FromObject15(schema, references, path2, value) {
  if (!IsObject2(value))
    return Default3(schema, path2, value);
  const knownKeys = KeyOfPropertyKeys(schema);
  const knownProperties = { ...value };
  for (const key of knownKeys) {
    if (!HasPropertyKey2(knownProperties, key))
      continue;
    if (IsUndefined2(knownProperties[key]) && (!IsUndefined3(schema.properties[key]) || TypeSystemPolicy.IsExactOptionalProperty(knownProperties, key)))
      continue;
    knownProperties[key] = Visit11(schema.properties[key], references, `${path2}/${key}`, knownProperties[key]);
  }
  if (!IsSchema(schema.additionalProperties)) {
    return Default3(schema, path2, knownProperties);
  }
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
  const additionalProperties = schema.additionalProperties;
  const unknownProperties = { ...knownProperties };
  for (const key of unknownKeys)
    if (!knownKeys.includes(key)) {
      unknownProperties[key] = Default3(additionalProperties, `${path2}/${key}`, unknownProperties[key]);
    }
  return Default3(schema, path2, unknownProperties);
}
function FromRecord10(schema, references, path2, value) {
  if (!IsObject2(value))
    return Default3(schema, path2, value);
  const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
  const knownKeys = new RegExp(pattern);
  const knownProperties = { ...value };
  for (const key of Object.getOwnPropertyNames(value))
    if (knownKeys.test(key)) {
      knownProperties[key] = Visit11(schema.patternProperties[pattern], references, `${path2}/${key}`, knownProperties[key]);
    }
  if (!IsSchema(schema.additionalProperties)) {
    return Default3(schema, path2, knownProperties);
  }
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
  const additionalProperties = schema.additionalProperties;
  const unknownProperties = { ...knownProperties };
  for (const key of unknownKeys)
    if (!knownKeys.test(key)) {
      unknownProperties[key] = Default3(additionalProperties, `${path2}/${key}`, unknownProperties[key]);
    }
  return Default3(schema, path2, unknownProperties);
}
function FromRef11(schema, references, path2, value) {
  const target = Deref(schema, references);
  return Default3(schema, path2, Visit11(target, references, path2, value));
}
function FromThis7(schema, references, path2, value) {
  const target = Deref(schema, references);
  return Default3(schema, path2, Visit11(target, references, path2, value));
}
function FromTuple12(schema, references, path2, value) {
  return IsArray2(value) && IsArray2(schema.items) ? Default3(schema, path2, schema.items.map((schema2, index2) => Visit11(schema2, references, `${path2}/${index2}`, value[index2]))) : Default3(schema, path2, value);
}
function FromUnion17(schema, references, path2, value) {
  for (const subschema of schema.anyOf) {
    if (!Check(subschema, references, value))
      continue;
    const decoded = Visit11(subschema, references, path2, value);
    return Default3(schema, path2, decoded);
  }
  return Default3(schema, path2, value);
}
function Visit11(schema, references, path2, value) {
  const references_ = Pushref(schema, references);
  const schema_ = schema;
  switch (schema[Kind]) {
    case "Array":
      return FromArray14(schema_, references_, path2, value);
    case "Import":
      return FromImport7(schema_, references_, path2, value);
    case "Intersect":
      return FromIntersect15(schema_, references_, path2, value);
    case "Not":
      return FromNot5(schema_, references_, path2, value);
    case "Object":
      return FromObject15(schema_, references_, path2, value);
    case "Record":
      return FromRecord10(schema_, references_, path2, value);
    case "Ref":
      return FromRef11(schema_, references_, path2, value);
    case "Symbol":
      return Default3(schema_, path2, value);
    case "This":
      return FromThis7(schema_, references_, path2, value);
    case "Tuple":
      return FromTuple12(schema_, references_, path2, value);
    case "Union":
      return FromUnion17(schema_, references_, path2, value);
    default:
      return Default3(schema_, path2, value);
  }
}
function TransformDecode(schema, references, value) {
  return Visit11(schema, references, "", value);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/transform/encode.mjs
class TransformEncodeCheckError extends TypeBoxError {
  constructor(schema, value, error49) {
    super(`The encoded value does not match the expected schema`);
    this.schema = schema;
    this.value = value;
    this.error = error49;
  }
}

class TransformEncodeError extends TypeBoxError {
  constructor(schema, path2, value, error49) {
    super(`${error49 instanceof Error ? error49.message : "Unknown error"}`);
    this.schema = schema;
    this.path = path2;
    this.value = value;
    this.error = error49;
  }
}
function Default4(schema, path2, value) {
  try {
    return IsTransform(schema) ? schema[TransformKind].Encode(value) : value;
  } catch (error49) {
    throw new TransformEncodeError(schema, path2, value, error49);
  }
}
function FromArray15(schema, references, path2, value) {
  const defaulted = Default4(schema, path2, value);
  return IsArray2(defaulted) ? defaulted.map((value2, index2) => Visit12(schema.items, references, `${path2}/${index2}`, value2)) : defaulted;
}
function FromImport8(schema, references, path2, value) {
  const additional = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  const result = Default4(schema, path2, value);
  return Visit12(target, [...references, ...additional], path2, result);
}
function FromIntersect16(schema, references, path2, value) {
  const defaulted = Default4(schema, path2, value);
  if (!IsObject2(value) || IsValueType(value))
    return defaulted;
  const knownEntries = KeyOfPropertyEntries(schema);
  const knownKeys = knownEntries.map((entry) => entry[0]);
  const knownProperties = { ...defaulted };
  for (const [knownKey, knownSchema] of knownEntries)
    if (knownKey in knownProperties) {
      knownProperties[knownKey] = Visit12(knownSchema, references, `${path2}/${knownKey}`, knownProperties[knownKey]);
    }
  if (!IsTransform(schema.unevaluatedProperties)) {
    return knownProperties;
  }
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
  const unevaluatedProperties = schema.unevaluatedProperties;
  const properties2 = { ...knownProperties };
  for (const key of unknownKeys)
    if (!knownKeys.includes(key)) {
      properties2[key] = Default4(unevaluatedProperties, `${path2}/${key}`, properties2[key]);
    }
  return properties2;
}
function FromNot6(schema, references, path2, value) {
  return Default4(schema.not, path2, Default4(schema, path2, value));
}
function FromObject16(schema, references, path2, value) {
  const defaulted = Default4(schema, path2, value);
  if (!IsObject2(defaulted))
    return defaulted;
  const knownKeys = KeyOfPropertyKeys(schema);
  const knownProperties = { ...defaulted };
  for (const key of knownKeys) {
    if (!HasPropertyKey2(knownProperties, key))
      continue;
    if (IsUndefined2(knownProperties[key]) && (!IsUndefined3(schema.properties[key]) || TypeSystemPolicy.IsExactOptionalProperty(knownProperties, key)))
      continue;
    knownProperties[key] = Visit12(schema.properties[key], references, `${path2}/${key}`, knownProperties[key]);
  }
  if (!IsSchema(schema.additionalProperties)) {
    return knownProperties;
  }
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
  const additionalProperties = schema.additionalProperties;
  const properties2 = { ...knownProperties };
  for (const key of unknownKeys)
    if (!knownKeys.includes(key)) {
      properties2[key] = Default4(additionalProperties, `${path2}/${key}`, properties2[key]);
    }
  return properties2;
}
function FromRecord11(schema, references, path2, value) {
  const defaulted = Default4(schema, path2, value);
  if (!IsObject2(value))
    return defaulted;
  const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
  const knownKeys = new RegExp(pattern);
  const knownProperties = { ...defaulted };
  for (const key of Object.getOwnPropertyNames(value))
    if (knownKeys.test(key)) {
      knownProperties[key] = Visit12(schema.patternProperties[pattern], references, `${path2}/${key}`, knownProperties[key]);
    }
  if (!IsSchema(schema.additionalProperties)) {
    return knownProperties;
  }
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
  const additionalProperties = schema.additionalProperties;
  const properties2 = { ...knownProperties };
  for (const key of unknownKeys)
    if (!knownKeys.test(key)) {
      properties2[key] = Default4(additionalProperties, `${path2}/${key}`, properties2[key]);
    }
  return properties2;
}
function FromRef12(schema, references, path2, value) {
  const target = Deref(schema, references);
  const resolved = Visit12(target, references, path2, value);
  return Default4(schema, path2, resolved);
}
function FromThis8(schema, references, path2, value) {
  const target = Deref(schema, references);
  const resolved = Visit12(target, references, path2, value);
  return Default4(schema, path2, resolved);
}
function FromTuple13(schema, references, path2, value) {
  const value1 = Default4(schema, path2, value);
  return IsArray2(schema.items) ? schema.items.map((schema2, index2) => Visit12(schema2, references, `${path2}/${index2}`, value1[index2])) : [];
}
function FromUnion18(schema, references, path2, value) {
  for (const subschema of schema.anyOf) {
    if (!Check(subschema, references, value))
      continue;
    const value1 = Visit12(subschema, references, path2, value);
    return Default4(schema, path2, value1);
  }
  for (const subschema of schema.anyOf) {
    const value1 = Visit12(subschema, references, path2, value);
    if (!Check(schema, references, value1))
      continue;
    return Default4(schema, path2, value1);
  }
  return Default4(schema, path2, value);
}
function Visit12(schema, references, path2, value) {
  const references_ = Pushref(schema, references);
  const schema_ = schema;
  switch (schema[Kind]) {
    case "Array":
      return FromArray15(schema_, references_, path2, value);
    case "Import":
      return FromImport8(schema_, references_, path2, value);
    case "Intersect":
      return FromIntersect16(schema_, references_, path2, value);
    case "Not":
      return FromNot6(schema_, references_, path2, value);
    case "Object":
      return FromObject16(schema_, references_, path2, value);
    case "Record":
      return FromRecord11(schema_, references_, path2, value);
    case "Ref":
      return FromRef12(schema_, references_, path2, value);
    case "This":
      return FromThis8(schema_, references_, path2, value);
    case "Tuple":
      return FromTuple13(schema_, references_, path2, value);
    case "Union":
      return FromUnion18(schema_, references_, path2, value);
    default:
      return Default4(schema_, path2, value);
  }
}
function TransformEncode(schema, references, value) {
  return Visit12(schema, references, "", value);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/transform/has.mjs
function FromArray16(schema, references) {
  return IsTransform(schema) || Visit13(schema.items, references);
}
function FromAsyncIterator7(schema, references) {
  return IsTransform(schema) || Visit13(schema.items, references);
}
function FromConstructor8(schema, references) {
  return IsTransform(schema) || Visit13(schema.returns, references) || schema.parameters.some((schema2) => Visit13(schema2, references));
}
function FromFunction7(schema, references) {
  return IsTransform(schema) || Visit13(schema.returns, references) || schema.parameters.some((schema2) => Visit13(schema2, references));
}
function FromIntersect17(schema, references) {
  return IsTransform(schema) || IsTransform(schema.unevaluatedProperties) || schema.allOf.some((schema2) => Visit13(schema2, references));
}
function FromImport9(schema, references) {
  const additional = globalThis.Object.getOwnPropertyNames(schema.$defs).reduce((result, key) => [...result, schema.$defs[key]], []);
  const target = schema.$defs[schema.$ref];
  return IsTransform(schema) || Visit13(target, [...additional, ...references]);
}
function FromIterator7(schema, references) {
  return IsTransform(schema) || Visit13(schema.items, references);
}
function FromNot7(schema, references) {
  return IsTransform(schema) || Visit13(schema.not, references);
}
function FromObject17(schema, references) {
  return IsTransform(schema) || Object.values(schema.properties).some((schema2) => Visit13(schema2, references)) || IsSchema(schema.additionalProperties) && Visit13(schema.additionalProperties, references);
}
function FromPromise7(schema, references) {
  return IsTransform(schema) || Visit13(schema.item, references);
}
function FromRecord12(schema, references) {
  const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
  const property2 = schema.patternProperties[pattern];
  return IsTransform(schema) || Visit13(property2, references) || IsSchema(schema.additionalProperties) && IsTransform(schema.additionalProperties);
}
function FromRef13(schema, references) {
  if (IsTransform(schema))
    return true;
  return Visit13(Deref(schema, references), references);
}
function FromThis9(schema, references) {
  if (IsTransform(schema))
    return true;
  return Visit13(Deref(schema, references), references);
}
function FromTuple14(schema, references) {
  return IsTransform(schema) || !IsUndefined2(schema.items) && schema.items.some((schema2) => Visit13(schema2, references));
}
function FromUnion19(schema, references) {
  return IsTransform(schema) || schema.anyOf.some((schema2) => Visit13(schema2, references));
}
function Visit13(schema, references) {
  const references_ = Pushref(schema, references);
  const schema_ = schema;
  if (schema.$id && visited.has(schema.$id))
    return false;
  if (schema.$id)
    visited.add(schema.$id);
  switch (schema[Kind]) {
    case "Array":
      return FromArray16(schema_, references_);
    case "AsyncIterator":
      return FromAsyncIterator7(schema_, references_);
    case "Constructor":
      return FromConstructor8(schema_, references_);
    case "Function":
      return FromFunction7(schema_, references_);
    case "Import":
      return FromImport9(schema_, references_);
    case "Intersect":
      return FromIntersect17(schema_, references_);
    case "Iterator":
      return FromIterator7(schema_, references_);
    case "Not":
      return FromNot7(schema_, references_);
    case "Object":
      return FromObject17(schema_, references_);
    case "Promise":
      return FromPromise7(schema_, references_);
    case "Record":
      return FromRecord12(schema_, references_);
    case "Ref":
      return FromRef13(schema_, references_);
    case "This":
      return FromThis9(schema_, references_);
    case "Tuple":
      return FromTuple14(schema_, references_);
    case "Union":
      return FromUnion19(schema_, references_);
    default:
      return IsTransform(schema);
  }
}
var visited = new Set;
function HasTransform(schema, references) {
  visited.clear();
  return Visit13(schema, references);
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/decode/decode.mjs
function Decode(...args) {
  const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]];
  if (!Check(schema, references, value))
    throw new TransformDecodeCheckError(schema, value, Errors(schema, references, value).First());
  return HasTransform(schema, references) ? TransformDecode(schema, references, value) : value;
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/default/default.mjs
function ValueOrDefault(schema, value) {
  const defaultValue = HasPropertyKey2(schema, "default") ? schema.default : undefined;
  const clone3 = IsFunction2(defaultValue) ? defaultValue() : Clone2(defaultValue);
  return IsUndefined2(value) ? clone3 : IsObject2(value) && IsObject2(clone3) ? Object.assign(clone3, value) : value;
}
function HasDefaultProperty(schema) {
  return IsKind(schema) && "default" in schema;
}
function FromArray17(schema, references, value) {
  if (IsArray2(value)) {
    for (let i = 0;i < value.length; i++) {
      value[i] = Visit14(schema.items, references, value[i]);
    }
    return value;
  }
  const defaulted = ValueOrDefault(schema, value);
  if (!IsArray2(defaulted))
    return defaulted;
  for (let i = 0;i < defaulted.length; i++) {
    defaulted[i] = Visit14(schema.items, references, defaulted[i]);
  }
  return defaulted;
}
function FromDate7(schema, references, value) {
  return IsDate2(value) ? value : ValueOrDefault(schema, value);
}
function FromImport10(schema, references, value) {
  const definitions = globalThis.Object.values(schema.$defs);
  const target = schema.$defs[schema.$ref];
  return Visit14(target, [...references, ...definitions], value);
}
function FromIntersect18(schema, references, value) {
  const defaulted = ValueOrDefault(schema, value);
  return schema.allOf.reduce((acc, schema2) => {
    const next = Visit14(schema2, references, defaulted);
    return IsObject2(next) ? { ...acc, ...next } : next;
  }, {});
}
function FromObject18(schema, references, value) {
  const defaulted = ValueOrDefault(schema, value);
  if (!IsObject2(defaulted))
    return defaulted;
  const knownPropertyKeys = Object.getOwnPropertyNames(schema.properties);
  for (const key of knownPropertyKeys) {
    const propertyValue = Visit14(schema.properties[key], references, defaulted[key]);
    if (IsUndefined2(propertyValue))
      continue;
    defaulted[key] = Visit14(schema.properties[key], references, defaulted[key]);
  }
  if (!HasDefaultProperty(schema.additionalProperties))
    return defaulted;
  for (const key of Object.getOwnPropertyNames(defaulted)) {
    if (knownPropertyKeys.includes(key))
      continue;
    defaulted[key] = Visit14(schema.additionalProperties, references, defaulted[key]);
  }
  return defaulted;
}
function FromRecord13(schema, references, value) {
  const defaulted = ValueOrDefault(schema, value);
  if (!IsObject2(defaulted))
    return defaulted;
  const additionalPropertiesSchema = schema.additionalProperties;
  const [propertyKeyPattern, propertySchema] = Object.entries(schema.patternProperties)[0];
  const knownPropertyKey = new RegExp(propertyKeyPattern);
  for (const key of Object.getOwnPropertyNames(defaulted)) {
    if (!(knownPropertyKey.test(key) && HasDefaultProperty(propertySchema)))
      continue;
    defaulted[key] = Visit14(propertySchema, references, defaulted[key]);
  }
  if (!HasDefaultProperty(additionalPropertiesSchema))
    return defaulted;
  for (const key of Object.getOwnPropertyNames(defaulted)) {
    if (knownPropertyKey.test(key))
      continue;
    defaulted[key] = Visit14(additionalPropertiesSchema, references, defaulted[key]);
  }
  return defaulted;
}
function FromRef14(schema, references, value) {
  return Visit14(Deref(schema, references), references, ValueOrDefault(schema, value));
}
function FromThis10(schema, references, value) {
  return Visit14(Deref(schema, references), references, value);
}
function FromTuple15(schema, references, value) {
  const defaulted = ValueOrDefault(schema, value);
  if (!IsArray2(defaulted) || IsUndefined2(schema.items))
    return defaulted;
  const [items, max] = [schema.items, Math.max(schema.items.length, defaulted.length)];
  for (let i = 0;i < max; i++) {
    if (i < items.length)
      defaulted[i] = Visit14(items[i], references, defaulted[i]);
  }
  return defaulted;
}
function FromUnion20(schema, references, value) {
  const defaulted = ValueOrDefault(schema, value);
  for (const inner of schema.anyOf) {
    const result = Visit14(inner, references, Clone2(defaulted));
    if (Check(inner, references, result)) {
      return result;
    }
  }
  return defaulted;
}
function Visit14(schema, references, value) {
  const references_ = Pushref(schema, references);
  const schema_ = schema;
  switch (schema_[Kind]) {
    case "Array":
      return FromArray17(schema_, references_, value);
    case "Date":
      return FromDate7(schema_, references_, value);
    case "Import":
      return FromImport10(schema_, references_, value);
    case "Intersect":
      return FromIntersect18(schema_, references_, value);
    case "Object":
      return FromObject18(schema_, references_, value);
    case "Record":
      return FromRecord13(schema_, references_, value);
    case "Ref":
      return FromRef14(schema_, references_, value);
    case "This":
      return FromThis10(schema_, references_, value);
    case "Tuple":
      return FromTuple15(schema_, references_, value);
    case "Union":
      return FromUnion20(schema_, references_, value);
    default:
      return ValueOrDefault(schema_, value);
  }
}
function Default5(...args) {
  return args.length === 3 ? Visit14(args[0], args[1], args[2]) : Visit14(args[0], [], args[1]);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/pointer/pointer.mjs
var exports_pointer = {};
__export(exports_pointer, {
  ValuePointerRootSetError: () => ValuePointerRootSetError,
  ValuePointerRootDeleteError: () => ValuePointerRootDeleteError,
  Set: () => Set4,
  Has: () => Has3,
  Get: () => Get3,
  Format: () => Format,
  Delete: () => Delete3
});
class ValuePointerRootSetError extends TypeBoxError {
  constructor(value, path2, update) {
    super("Cannot set root value");
    this.value = value;
    this.path = path2;
    this.update = update;
  }
}

class ValuePointerRootDeleteError extends TypeBoxError {
  constructor(value, path2) {
    super("Cannot delete root value");
    this.value = value;
    this.path = path2;
  }
}
function Escape2(component) {
  return component.indexOf("~") === -1 ? component : component.replace(/~1/g, "/").replace(/~0/g, "~");
}
function* Format(pointer) {
  if (pointer === "")
    return;
  let [start, end] = [0, 0];
  for (let i = 0;i < pointer.length; i++) {
    const char2 = pointer.charAt(i);
    if (char2 === "/") {
      if (i === 0) {
        start = i + 1;
      } else {
        end = i;
        yield Escape2(pointer.slice(start, end));
        start = i + 1;
      }
    } else {
      end = i;
    }
  }
  yield Escape2(pointer.slice(start));
}
function Set4(value, pointer, update) {
  if (pointer === "")
    throw new ValuePointerRootSetError(value, pointer, update);
  let [owner, next, key] = [null, value, ""];
  for (const component of Format(pointer)) {
    if (next[component] === undefined)
      next[component] = {};
    owner = next;
    next = next[component];
    key = component;
  }
  owner[key] = update;
}
function Delete3(value, pointer) {
  if (pointer === "")
    throw new ValuePointerRootDeleteError(value, pointer);
  let [owner, next, key] = [null, value, ""];
  for (const component of Format(pointer)) {
    if (next[component] === undefined || next[component] === null)
      return;
    owner = next;
    next = next[component];
    key = component;
  }
  if (Array.isArray(owner)) {
    const index2 = parseInt(key);
    owner.splice(index2, 1);
  } else {
    delete owner[key];
  }
}
function Has3(value, pointer) {
  if (pointer === "")
    return true;
  let [owner, next, key] = [null, value, ""];
  for (const component of Format(pointer)) {
    if (next[component] === undefined)
      return false;
    owner = next;
    next = next[component];
    key = component;
  }
  return Object.getOwnPropertyNames(owner).includes(key);
}
function Get3(value, pointer) {
  if (pointer === "")
    return value;
  let current = value;
  for (const component of Format(pointer)) {
    if (current[component] === undefined)
      return;
    current = current[component];
  }
  return current;
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/equal/equal.mjs
function ObjectType3(left2, right2) {
  if (!IsObject2(right2))
    return false;
  const leftKeys = [...Object.keys(left2), ...Object.getOwnPropertySymbols(left2)];
  const rightKeys = [...Object.keys(right2), ...Object.getOwnPropertySymbols(right2)];
  if (leftKeys.length !== rightKeys.length)
    return false;
  return leftKeys.every((key) => Equal(left2[key], right2[key]));
}
function DateType3(left2, right2) {
  return IsDate2(right2) && left2.getTime() === right2.getTime();
}
function ArrayType3(left2, right2) {
  if (!IsArray2(right2) || left2.length !== right2.length)
    return false;
  return left2.every((value, index2) => Equal(value, right2[index2]));
}
function TypedArrayType(left2, right2) {
  if (!IsTypedArray(right2) || left2.length !== right2.length || Object.getPrototypeOf(left2).constructor.name !== Object.getPrototypeOf(right2).constructor.name)
    return false;
  return left2.every((value, index2) => Equal(value, right2[index2]));
}
function ValueType(left2, right2) {
  return left2 === right2;
}
function Equal(left2, right2) {
  if (IsDate2(left2))
    return DateType3(left2, right2);
  if (IsTypedArray(left2))
    return TypedArrayType(left2, right2);
  if (IsArray2(left2))
    return ArrayType3(left2, right2);
  if (IsObject2(left2))
    return ObjectType3(left2, right2);
  if (IsValueType(left2))
    return ValueType(left2, right2);
  throw new Error("ValueEquals: Unable to compare value");
}

// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/delta/delta.mjs
var Insert = Object2({
  type: Literal("insert"),
  path: String2(),
  value: Unknown()
});
var Update = Object2({
  type: Literal("update"),
  path: String2(),
  value: Unknown()
});
var Delete4 = Object2({
  type: Literal("delete"),
  path: String2()
});
var Edit = Union([Insert, Update, Delete4]);

class ValueDiffError extends TypeBoxError {
  constructor(value, message2) {
    super(message2);
    this.value = value;
  }
}
function CreateUpdate(path2, value) {
  return { type: "update", path: path2, value };
}
function CreateInsert(path2, value) {
  return { type: "insert", path: path2, value };
}
function CreateDelete(path2) {
  return { type: "delete", path: path2 };
}
function AssertDiffable(value) {
  if (globalThis.Object.getOwnPropertySymbols(value).length > 0)
    throw new ValueDiffError(value, "Cannot diff objects with symbols");
}
function* ObjectType4(path2, current, next) {
  AssertDiffable(current);
  AssertDiffable(next);
  if (!IsStandardObject(next))
    return yield CreateUpdate(path2, next);
  const currentKeys = globalThis.Object.getOwnPropertyNames(current);
  const nextKeys = globalThis.Object.getOwnPropertyNames(next);
  for (const key of nextKeys) {
    if (HasPropertyKey2(current, key))
      continue;
    yield CreateInsert(`${path2}/${key}`, next[key]);
  }
  for (const key of currentKeys) {
    if (!HasPropertyKey2(next, key))
      continue;
    if (Equal(current, next))
      continue;
    yield* Visit15(`${path2}/${key}`, current[key], next[key]);
  }
  for (const key of currentKeys) {
    if (HasPropertyKey2(next, key))
      continue;
    yield CreateDelete(`${path2}/${key}`);
  }
}
function* ArrayType4(path2, current, next) {
  if (!IsArray2(next))
    return yield CreateUpdate(path2, next);
  for (let i = 0;i < Math.min(current.length, next.length); i++) {
    yield* Visit15(`${path2}/${i}`, current[i], next[i]);
  }
  for (let i = 0;i < next.length; i++) {
    if (i < current.length)
      continue;
    yield CreateInsert(`${path2}/${i}`, next[i]);
  }
  for (let i = current.length - 1;i >= 0; i--) {
    if (i < next.length)
      continue;
    yield CreateDelete(`${path2}/${i}`);
  }
}
function* TypedArrayType2(path2, current, next) {
  if (!IsTypedArray(next) || current.length !== next.length || globalThis.Object.getPrototypeOf(current).constructor.name !== globalThis.Object.getPrototypeOf(next).constructor.name)
    return yield CreateUpdate(path2, next);
  for (let i = 0;i < Math.min(current.length, next.length); i++) {
    yield* Visit15(`${path2}/${i}`, current[i], next[i]);
  }
}
function* ValueType2(path2, current, next) {
  if (current === next)
    return;
  yield CreateUpdate(path2, next);
}
function* Visit15(path2, current, next) {
  if (IsStandardObject(current))
    return yield* ObjectType4(path2, current, next);
  if (IsArray2(current))
    return yield* ArrayType4(path2, current, next);
  if (IsTypedArray(current))
    return yield* TypedArrayType2(path2, current, next);
  if (IsValueType(current))
    return yield* ValueType2(path2, current, next);
  throw new ValueDiffError(current, "Unable to diff value");
}
function Diff(current, next) {
  return [...Visit15("", current, next)];
}
function IsRootUpdate(edits) {
  return edits.length > 0 && edits[0].path === "" && edits[0].type === "update";
}
function IsIdentity(edits) {
  return edits.length === 0;
}
function Patch(current, edits) {
  if (IsRootUpdate(edits)) {
    return Clone2(edits[0].value);
  }
  if (IsIdentity(edits)) {
    return Clone2(current);
  }
  const clone3 = Clone2(current);
  for (const edit2 of edits) {
    switch (edit2.type) {
      case "insert": {
        exports_pointer.Set(clone3, edit2.path, edit2.value);
        break;
      }
      case "update": {
        exports_pointer.Set(clone3, edit2.path, edit2.value);
        break;
      }
      case "delete": {
        exports_pointer.Delete(clone3, edit2.path);
        break;
      }
    }
  }
  return clone3;
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/encode/encode.mjs
function Encode(...args) {
  const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]];
  const encoded = HasTransform(schema, references) ? TransformEncode(schema, references, value) : value;
  if (!Check(schema, references, encoded))
    throw new TransformEncodeCheckError(schema, encoded, Errors(schema, references, encoded).First());
  return encoded;
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/mutate/mutate.mjs
function IsStandardObject2(value) {
  return IsObject2(value) && !IsArray2(value);
}

class ValueMutateError extends TypeBoxError {
  constructor(message2) {
    super(message2);
  }
}
function ObjectType5(root, path2, current, next) {
  if (!IsStandardObject2(current)) {
    exports_pointer.Set(root, path2, Clone2(next));
  } else {
    const currentKeys = Object.getOwnPropertyNames(current);
    const nextKeys = Object.getOwnPropertyNames(next);
    for (const currentKey of currentKeys) {
      if (!nextKeys.includes(currentKey)) {
        delete current[currentKey];
      }
    }
    for (const nextKey of nextKeys) {
      if (!currentKeys.includes(nextKey)) {
        current[nextKey] = null;
      }
    }
    for (const nextKey of nextKeys) {
      Visit16(root, `${path2}/${nextKey}`, current[nextKey], next[nextKey]);
    }
  }
}
function ArrayType5(root, path2, current, next) {
  if (!IsArray2(current)) {
    exports_pointer.Set(root, path2, Clone2(next));
  } else {
    for (let index2 = 0;index2 < next.length; index2++) {
      Visit16(root, `${path2}/${index2}`, current[index2], next[index2]);
    }
    current.splice(next.length);
  }
}
function TypedArrayType3(root, path2, current, next) {
  if (IsTypedArray(current) && current.length === next.length) {
    for (let i = 0;i < current.length; i++) {
      current[i] = next[i];
    }
  } else {
    exports_pointer.Set(root, path2, Clone2(next));
  }
}
function ValueType3(root, path2, current, next) {
  if (current === next)
    return;
  exports_pointer.Set(root, path2, next);
}
function Visit16(root, path2, current, next) {
  if (IsArray2(next))
    return ArrayType5(root, path2, current, next);
  if (IsTypedArray(next))
    return TypedArrayType3(root, path2, current, next);
  if (IsStandardObject2(next))
    return ObjectType5(root, path2, current, next);
  if (IsValueType(next))
    return ValueType3(root, path2, current, next);
}
function IsNonMutableValue(value) {
  return IsTypedArray(value) || IsValueType(value);
}
function IsMismatchedValue(current, next) {
  return IsStandardObject2(current) && IsArray2(next) || IsArray2(current) && IsStandardObject2(next);
}
function Mutate(current, next) {
  if (IsNonMutableValue(current) || IsNonMutableValue(next))
    throw new ValueMutateError("Only object and array types can be mutated at the root level");
  if (IsMismatchedValue(current, next))
    throw new ValueMutateError("Cannot assign due type mismatch of assignable values");
  Visit16(current, "", current, next);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/parse/parse.mjs
class ParseError extends TypeBoxError {
  constructor(message2) {
    super(message2);
  }
}
var ParseRegistry;
(function(ParseRegistry2) {
  const registry2 = new Map([
    ["Assert", (type2, references, value) => {
      Assert(type2, references, value);
      return value;
    }],
    ["Cast", (type2, references, value) => Cast(type2, references, value)],
    ["Clean", (type2, references, value) => Clean(type2, references, value)],
    ["Clone", (_type, _references, value) => Clone2(value)],
    ["Convert", (type2, references, value) => Convert(type2, references, value)],
    ["Decode", (type2, references, value) => HasTransform(type2, references) ? TransformDecode(type2, references, value) : value],
    ["Default", (type2, references, value) => Default5(type2, references, value)],
    ["Encode", (type2, references, value) => HasTransform(type2, references) ? TransformEncode(type2, references, value) : value]
  ]);
  function Delete5(key) {
    registry2.delete(key);
  }
  ParseRegistry2.Delete = Delete5;
  function Set5(key, callback) {
    registry2.set(key, callback);
  }
  ParseRegistry2.Set = Set5;
  function Get4(key) {
    return registry2.get(key);
  }
  ParseRegistry2.Get = Get4;
})(ParseRegistry || (ParseRegistry = {}));
var ParseDefault = [
  "Clone",
  "Clean",
  "Default",
  "Convert",
  "Assert",
  "Decode"
];
function ParseValue(operations, type2, references, value) {
  return operations.reduce((value2, operationKey) => {
    const operation = ParseRegistry.Get(operationKey);
    if (IsUndefined2(operation))
      throw new ParseError(`Unable to find Parse operation '${operationKey}'`);
    return operation(type2, references, value2);
  }, value);
}
function Parse(...args) {
  const [operations, schema, references, value] = args.length === 4 ? [args[0], args[1], args[2], args[3]] : args.length === 3 ? IsArray2(args[0]) ? [args[0], args[1], [], args[2]] : [ParseDefault, args[0], args[1], args[2]] : args.length === 2 ? [ParseDefault, args[0], [], args[1]] : (() => {
    throw new ParseError("Invalid Arguments");
  })();
  return ParseValue(operations, schema, references, value);
}
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/value/value/value.mjs
var exports_value2 = {};
__export(exports_value2, {
  ValueErrorIterator: () => ValueErrorIterator,
  Patch: () => Patch,
  Parse: () => Parse,
  Mutate: () => Mutate,
  Hash: () => Hash2,
  Errors: () => Errors,
  Equal: () => Equal,
  Encode: () => Encode,
  Edit: () => Edit,
  Diff: () => Diff,
  Default: () => Default5,
  Decode: () => Decode,
  Create: () => Create2,
  Convert: () => Convert,
  Clone: () => Clone2,
  Clean: () => Clean,
  Check: () => Check,
  Cast: () => Cast,
  Assert: () => Assert
});
// ../../node_modules/.pnpm/@sinclair+typebox@0.34.45/node_modules/@sinclair/typebox/build/esm/compiler/compiler.mjs
class TypeCheck {
  constructor(schema, references, checkFunc, code2) {
    this.schema = schema;
    this.references = references;
    this.checkFunc = checkFunc;
    this.code = code2;
    this.hasTransform = HasTransform(schema, references);
  }
  Code() {
    return this.code;
  }
  Schema() {
    return this.schema;
  }
  References() {
    return this.references;
  }
  Errors(value) {
    return Errors(this.schema, this.references, value);
  }
  Check(value) {
    return this.checkFunc(value);
  }
  Decode(value) {
    if (!this.checkFunc(value))
      throw new TransformDecodeCheckError(this.schema, value, this.Errors(value).First());
    return this.hasTransform ? TransformDecode(this.schema, this.references, value) : value;
  }
  Encode(value) {
    const encoded = this.hasTransform ? TransformEncode(this.schema, this.references, value) : value;
    if (!this.checkFunc(encoded))
      throw new TransformEncodeCheckError(this.schema, value, this.Errors(value).First());
    return encoded;
  }
}
var Character;
(function(Character2) {
  function DollarSign(code2) {
    return code2 === 36;
  }
  Character2.DollarSign = DollarSign;
  function IsUnderscore(code2) {
    return code2 === 95;
  }
  Character2.IsUnderscore = IsUnderscore;
  function IsAlpha(code2) {
    return code2 >= 65 && code2 <= 90 || code2 >= 97 && code2 <= 122;
  }
  Character2.IsAlpha = IsAlpha;
  function IsNumeric(code2) {
    return code2 >= 48 && code2 <= 57;
  }
  Character2.IsNumeric = IsNumeric;
})(Character || (Character = {}));
var MemberExpression;
(function(MemberExpression2) {
  function IsFirstCharacterNumeric(value) {
    if (value.length === 0)
      return false;
    return Character.IsNumeric(value.charCodeAt(0));
  }
  function IsAccessor(value) {
    if (IsFirstCharacterNumeric(value))
      return false;
    for (let i = 0;i < value.length; i++) {
      const code2 = value.charCodeAt(i);
      const check3 = Character.IsAlpha(code2) || Character.IsNumeric(code2) || Character.DollarSign(code2) || Character.IsUnderscore(code2);
      if (!check3)
        return false;
    }
    return true;
  }
  function EscapeHyphen(key) {
    return key.replace(/'/g, "\\'");
  }
  function Encode2(object2, key) {
    return IsAccessor(key) ? `${object2}.${key}` : `${object2}['${EscapeHyphen(key)}']`;
  }
  MemberExpression2.Encode = Encode2;
})(MemberExpression || (MemberExpression = {}));
var Identifier;
(function(Identifier2) {
  function Encode2($id) {
    const buffer = [];
    for (let i = 0;i < $id.length; i++) {
      const code2 = $id.charCodeAt(i);
      if (Character.IsNumeric(code2) || Character.IsAlpha(code2)) {
        buffer.push($id.charAt(i));
      } else {
        buffer.push(`_${code2}_`);
      }
    }
    return buffer.join("").replace(/__/g, "_");
  }
  Identifier2.Encode = Encode2;
})(Identifier || (Identifier = {}));
var LiteralString;
(function(LiteralString2) {
  function Escape3(content) {
    return content.replace(/'/g, "\\'");
  }
  LiteralString2.Escape = Escape3;
})(LiteralString || (LiteralString = {}));

class TypeCompilerUnknownTypeError extends TypeBoxError {
  constructor(schema) {
    super("Unknown type");
    this.schema = schema;
  }
}

class TypeCompilerTypeGuardError extends TypeBoxError {
  constructor(schema) {
    super("Preflight validation check failed to guard for the given schema");
    this.schema = schema;
  }
}
var Policy;
(function(Policy2) {
  function IsExactOptionalProperty(value, key, expression) {
    return TypeSystemPolicy.ExactOptionalPropertyTypes ? `('${key}' in ${value} ? ${expression} : true)` : `(${MemberExpression.Encode(value, key)} !== undefined ? ${expression} : true)`;
  }
  Policy2.IsExactOptionalProperty = IsExactOptionalProperty;
  function IsObjectLike(value) {
    return !TypeSystemPolicy.AllowArrayObject ? `(typeof ${value} === 'object' && ${value} !== null && !Array.isArray(${value}))` : `(typeof ${value} === 'object' && ${value} !== null)`;
  }
  Policy2.IsObjectLike = IsObjectLike;
  function IsRecordLike(value) {
    return !TypeSystemPolicy.AllowArrayObject ? `(typeof ${value} === 'object' && ${value} !== null && !Array.isArray(${value}) && !(${value} instanceof Date) && !(${value} instanceof Uint8Array))` : `(typeof ${value} === 'object' && ${value} !== null && !(${value} instanceof Date) && !(${value} instanceof Uint8Array))`;
  }
  Policy2.IsRecordLike = IsRecordLike;
  function IsNumberLike(value) {
    return TypeSystemPolicy.AllowNaN ? `typeof ${value} === 'number'` : `Number.isFinite(${value})`;
  }
  Policy2.IsNumberLike = IsNumberLike;
  function IsVoidLike(value) {
    return TypeSystemPolicy.AllowNullVoid ? `(${value} === undefined || ${value} === null)` : `${value} === undefined`;
  }
  Policy2.IsVoidLike = IsVoidLike;
})(Policy || (Policy = {}));
var TypeCompiler;
(function(TypeCompiler2) {
  function IsAnyOrUnknown2(schema) {
    return schema[Kind] === "Any" || schema[Kind] === "Unknown";
  }
  function* FromAny5(schema, references, value) {
    yield "true";
  }
  function* FromArgument5(schema, references, value) {
    yield "true";
  }
  function* FromArray18(schema, references, value) {
    yield `Array.isArray(${value})`;
    const [parameter, accumulator] = [CreateParameter("value", "any"), CreateParameter("acc", "number")];
    if (IsNumber2(schema.maxItems))
      yield `${value}.length <= ${schema.maxItems}`;
    if (IsNumber2(schema.minItems))
      yield `${value}.length >= ${schema.minItems}`;
    const elementExpression = CreateExpression(schema.items, references, "value");
    yield `${value}.every((${parameter}) => ${elementExpression})`;
    if (IsSchema2(schema.contains) || IsNumber2(schema.minContains) || IsNumber2(schema.maxContains)) {
      const containsSchema = IsSchema2(schema.contains) ? schema.contains : Never();
      const checkExpression = CreateExpression(containsSchema, references, "value");
      const checkMinContains = IsNumber2(schema.minContains) ? [`(count >= ${schema.minContains})`] : [];
      const checkMaxContains = IsNumber2(schema.maxContains) ? [`(count <= ${schema.maxContains})`] : [];
      const checkCount = `const count = value.reduce((${accumulator}, ${parameter}) => ${checkExpression} ? acc + 1 : acc, 0)`;
      const check3 = [`(count > 0)`, ...checkMinContains, ...checkMaxContains].join(" && ");
      yield `((${parameter}) => { ${checkCount}; return ${check3}})(${value})`;
    }
    if (schema.uniqueItems === true) {
      const check3 = `const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true`;
      const block2 = `const set = new Set(); for(const element of value) { ${check3} }`;
      yield `((${parameter}) => { ${block2} )(${value})`;
    }
  }
  function* FromAsyncIterator8(schema, references, value) {
    yield `(typeof value === 'object' && Symbol.asyncIterator in ${value})`;
  }
  function* FromBigInt6(schema, references, value) {
    yield `(typeof ${value} === 'bigint')`;
    if (IsBigInt2(schema.exclusiveMaximum))
      yield `${value} < BigInt(${schema.exclusiveMaximum})`;
    if (IsBigInt2(schema.exclusiveMinimum))
      yield `${value} > BigInt(${schema.exclusiveMinimum})`;
    if (IsBigInt2(schema.maximum))
      yield `${value} <= BigInt(${schema.maximum})`;
    if (IsBigInt2(schema.minimum))
      yield `${value} >= BigInt(${schema.minimum})`;
    if (IsBigInt2(schema.multipleOf))
      yield `(${value} % BigInt(${schema.multipleOf})) === 0`;
  }
  function* FromBoolean6(schema, references, value) {
    yield `(typeof ${value} === 'boolean')`;
  }
  function* FromConstructor9(schema, references, value) {
    yield* Visit17(schema.returns, references, `${value}.prototype`);
  }
  function* FromDate8(schema, references, value) {
    yield `(${value} instanceof Date) && Number.isFinite(${value}.getTime())`;
    if (IsNumber2(schema.exclusiveMaximumTimestamp))
      yield `${value}.getTime() < ${schema.exclusiveMaximumTimestamp}`;
    if (IsNumber2(schema.exclusiveMinimumTimestamp))
      yield `${value}.getTime() > ${schema.exclusiveMinimumTimestamp}`;
    if (IsNumber2(schema.maximumTimestamp))
      yield `${value}.getTime() <= ${schema.maximumTimestamp}`;
    if (IsNumber2(schema.minimumTimestamp))
      yield `${value}.getTime() >= ${schema.minimumTimestamp}`;
    if (IsNumber2(schema.multipleOfTimestamp))
      yield `(${value}.getTime() % ${schema.multipleOfTimestamp}) === 0`;
  }
  function* FromFunction8(schema, references, value) {
    yield `(typeof ${value} === 'function')`;
  }
  function* FromImport11(schema, references, value) {
    const members = globalThis.Object.getOwnPropertyNames(schema.$defs).reduce((result, key) => {
      return [...result, schema.$defs[key]];
    }, []);
    yield* Visit17(Ref(schema.$ref), [...references, ...members], value);
  }
  function* FromInteger6(schema, references, value) {
    yield `Number.isInteger(${value})`;
    if (IsNumber2(schema.exclusiveMaximum))
      yield `${value} < ${schema.exclusiveMaximum}`;
    if (IsNumber2(schema.exclusiveMinimum))
      yield `${value} > ${schema.exclusiveMinimum}`;
    if (IsNumber2(schema.maximum))
      yield `${value} <= ${schema.maximum}`;
    if (IsNumber2(schema.minimum))
      yield `${value} >= ${schema.minimum}`;
    if (IsNumber2(schema.multipleOf))
      yield `(${value} % ${schema.multipleOf}) === 0`;
  }
  function* FromIntersect19(schema, references, value) {
    const check1 = schema.allOf.map((schema2) => CreateExpression(schema2, references, value)).join(" && ");
    if (schema.unevaluatedProperties === false) {
      const keyCheck = CreateVariable(`${new RegExp(KeyOfPattern(schema))};`);
      const check22 = `Object.getOwnPropertyNames(${value}).every(key => ${keyCheck}.test(key))`;
      yield `(${check1} && ${check22})`;
    } else if (IsSchema2(schema.unevaluatedProperties)) {
      const keyCheck = CreateVariable(`${new RegExp(KeyOfPattern(schema))};`);
      const check22 = `Object.getOwnPropertyNames(${value}).every(key => ${keyCheck}.test(key) || ${CreateExpression(schema.unevaluatedProperties, references, `${value}[key]`)})`;
      yield `(${check1} && ${check22})`;
    } else {
      yield `(${check1})`;
    }
  }
  function* FromIterator8(schema, references, value) {
    yield `(typeof value === 'object' && Symbol.iterator in ${value})`;
  }
  function* FromLiteral7(schema, references, value) {
    if (typeof schema.const === "number" || typeof schema.const === "boolean") {
      yield `(${value} === ${schema.const})`;
    } else {
      yield `(${value} === '${LiteralString.Escape(schema.const)}')`;
    }
  }
  function* FromNever6(schema, references, value) {
    yield `false`;
  }
  function* FromNot8(schema, references, value) {
    const expression = CreateExpression(schema.not, references, value);
    yield `(!${expression})`;
  }
  function* FromNull6(schema, references, value) {
    yield `(${value} === null)`;
  }
  function* FromNumber6(schema, references, value) {
    yield Policy.IsNumberLike(value);
    if (IsNumber2(schema.exclusiveMaximum))
      yield `${value} < ${schema.exclusiveMaximum}`;
    if (IsNumber2(schema.exclusiveMinimum))
      yield `${value} > ${schema.exclusiveMinimum}`;
    if (IsNumber2(schema.maximum))
      yield `${value} <= ${schema.maximum}`;
    if (IsNumber2(schema.minimum))
      yield `${value} >= ${schema.minimum}`;
    if (IsNumber2(schema.multipleOf))
      yield `(${value} % ${schema.multipleOf}) === 0`;
  }
  function* FromObject19(schema, references, value) {
    yield Policy.IsObjectLike(value);
    if (IsNumber2(schema.minProperties))
      yield `Object.getOwnPropertyNames(${value}).length >= ${schema.minProperties}`;
    if (IsNumber2(schema.maxProperties))
      yield `Object.getOwnPropertyNames(${value}).length <= ${schema.maxProperties}`;
    const knownKeys = Object.getOwnPropertyNames(schema.properties);
    for (const knownKey of knownKeys) {
      const memberExpression = MemberExpression.Encode(value, knownKey);
      const property2 = schema.properties[knownKey];
      if (schema.required && schema.required.includes(knownKey)) {
        yield* Visit17(property2, references, memberExpression);
        if (ExtendsUndefinedCheck(property2) || IsAnyOrUnknown2(property2))
          yield `('${knownKey}' in ${value})`;
      } else {
        const expression = CreateExpression(property2, references, memberExpression);
        yield Policy.IsExactOptionalProperty(value, knownKey, expression);
      }
    }
    if (schema.additionalProperties === false) {
      if (schema.required && schema.required.length === knownKeys.length) {
        yield `Object.getOwnPropertyNames(${value}).length === ${knownKeys.length}`;
      } else {
        const keys = `[${knownKeys.map((key) => `'${key}'`).join(", ")}]`;
        yield `Object.getOwnPropertyNames(${value}).every(key => ${keys}.includes(key))`;
      }
    }
    if (typeof schema.additionalProperties === "object") {
      const expression = CreateExpression(schema.additionalProperties, references, `${value}[key]`);
      const keys = `[${knownKeys.map((key) => `'${key}'`).join(", ")}]`;
      yield `(Object.getOwnPropertyNames(${value}).every(key => ${keys}.includes(key) || ${expression}))`;
    }
  }
  function* FromPromise8(schema, references, value) {
    yield `${value} instanceof Promise`;
  }
  function* FromRecord14(schema, references, value) {
    yield Policy.IsRecordLike(value);
    if (IsNumber2(schema.minProperties))
      yield `Object.getOwnPropertyNames(${value}).length >= ${schema.minProperties}`;
    if (IsNumber2(schema.maxProperties))
      yield `Object.getOwnPropertyNames(${value}).length <= ${schema.maxProperties}`;
    const [patternKey, patternSchema] = Object.entries(schema.patternProperties)[0];
    const variable = CreateVariable(`${new RegExp(patternKey)}`);
    const check1 = CreateExpression(patternSchema, references, "value");
    const check22 = IsSchema2(schema.additionalProperties) ? CreateExpression(schema.additionalProperties, references, value) : schema.additionalProperties === false ? "false" : "true";
    const expression = `(${variable}.test(key) ? ${check1} : ${check22})`;
    yield `(Object.entries(${value}).every(([key, value]) => ${expression}))`;
  }
  function* FromRef15(schema, references, value) {
    const target = Deref(schema, references);
    if (state.functions.has(schema.$ref))
      return yield `${CreateFunctionName(schema.$ref)}(${value})`;
    yield* Visit17(target, references, value);
  }
  function* FromRegExp5(schema, references, value) {
    const variable = CreateVariable(`${new RegExp(schema.source, schema.flags)};`);
    yield `(typeof ${value} === 'string')`;
    if (IsNumber2(schema.maxLength))
      yield `${value}.length <= ${schema.maxLength}`;
    if (IsNumber2(schema.minLength))
      yield `${value}.length >= ${schema.minLength}`;
    yield `${variable}.test(${value})`;
  }
  function* FromString6(schema, references, value) {
    yield `(typeof ${value} === 'string')`;
    if (IsNumber2(schema.maxLength))
      yield `${value}.length <= ${schema.maxLength}`;
    if (IsNumber2(schema.minLength))
      yield `${value}.length >= ${schema.minLength}`;
    if (schema.pattern !== undefined) {
      const variable = CreateVariable(`${new RegExp(schema.pattern)};`);
      yield `${variable}.test(${value})`;
    }
    if (schema.format !== undefined) {
      yield `format('${schema.format}', ${value})`;
    }
  }
  function* FromSymbol6(schema, references, value) {
    yield `(typeof ${value} === 'symbol')`;
  }
  function* FromTemplateLiteral7(schema, references, value) {
    yield `(typeof ${value} === 'string')`;
    const variable = CreateVariable(`${new RegExp(schema.pattern)};`);
    yield `${variable}.test(${value})`;
  }
  function* FromThis11(schema, references, value) {
    yield `${CreateFunctionName(schema.$ref)}(${value})`;
  }
  function* FromTuple16(schema, references, value) {
    yield `Array.isArray(${value})`;
    if (schema.items === undefined)
      return yield `${value}.length === 0`;
    yield `(${value}.length === ${schema.maxItems})`;
    for (let i = 0;i < schema.items.length; i++) {
      const expression = CreateExpression(schema.items[i], references, `${value}[${i}]`);
      yield `${expression}`;
    }
  }
  function* FromUndefined6(schema, references, value) {
    yield `${value} === undefined`;
  }
  function* FromUnion21(schema, references, value) {
    const expressions = schema.anyOf.map((schema2) => CreateExpression(schema2, references, value));
    yield `(${expressions.join(" || ")})`;
  }
  function* FromUint8Array5(schema, references, value) {
    yield `${value} instanceof Uint8Array`;
    if (IsNumber2(schema.maxByteLength))
      yield `(${value}.length <= ${schema.maxByteLength})`;
    if (IsNumber2(schema.minByteLength))
      yield `(${value}.length >= ${schema.minByteLength})`;
  }
  function* FromUnknown5(schema, references, value) {
    yield "true";
  }
  function* FromVoid5(schema, references, value) {
    yield Policy.IsVoidLike(value);
  }
  function* FromKind4(schema, references, value) {
    const instance = state.instances.size;
    state.instances.set(instance, schema);
    yield `kind('${schema[Kind]}', ${instance}, ${value})`;
  }
  function* Visit17(schema, references, value, useHoisting = true) {
    const references_ = IsString2(schema.$id) ? [...references, schema] : references;
    const schema_ = schema;
    if (useHoisting && IsString2(schema.$id)) {
      const functionName = CreateFunctionName(schema.$id);
      if (state.functions.has(functionName)) {
        return yield `${functionName}(${value})`;
      } else {
        state.functions.set(functionName, "<deferred>");
        const functionCode = CreateFunction(functionName, schema, references, "value", false);
        state.functions.set(functionName, functionCode);
        return yield `${functionName}(${value})`;
      }
    }
    switch (schema_[Kind]) {
      case "Any":
        return yield* FromAny5(schema_, references_, value);
      case "Argument":
        return yield* FromArgument5(schema_, references_, value);
      case "Array":
        return yield* FromArray18(schema_, references_, value);
      case "AsyncIterator":
        return yield* FromAsyncIterator8(schema_, references_, value);
      case "BigInt":
        return yield* FromBigInt6(schema_, references_, value);
      case "Boolean":
        return yield* FromBoolean6(schema_, references_, value);
      case "Constructor":
        return yield* FromConstructor9(schema_, references_, value);
      case "Date":
        return yield* FromDate8(schema_, references_, value);
      case "Function":
        return yield* FromFunction8(schema_, references_, value);
      case "Import":
        return yield* FromImport11(schema_, references_, value);
      case "Integer":
        return yield* FromInteger6(schema_, references_, value);
      case "Intersect":
        return yield* FromIntersect19(schema_, references_, value);
      case "Iterator":
        return yield* FromIterator8(schema_, references_, value);
      case "Literal":
        return yield* FromLiteral7(schema_, references_, value);
      case "Never":
        return yield* FromNever6(schema_, references_, value);
      case "Not":
        return yield* FromNot8(schema_, references_, value);
      case "Null":
        return yield* FromNull6(schema_, references_, value);
      case "Number":
        return yield* FromNumber6(schema_, references_, value);
      case "Object":
        return yield* FromObject19(schema_, references_, value);
      case "Promise":
        return yield* FromPromise8(schema_, references_, value);
      case "Record":
        return yield* FromRecord14(schema_, references_, value);
      case "Ref":
        return yield* FromRef15(schema_, references_, value);
      case "RegExp":
        return yield* FromRegExp5(schema_, references_, value);
      case "String":
        return yield* FromString6(schema_, references_, value);
      case "Symbol":
        return yield* FromSymbol6(schema_, references_, value);
      case "TemplateLiteral":
        return yield* FromTemplateLiteral7(schema_, references_, value);
      case "This":
        return yield* FromThis11(schema_, references_, value);
      case "Tuple":
        return yield* FromTuple16(schema_, references_, value);
      case "Undefined":
        return yield* FromUndefined6(schema_, references_, value);
      case "Union":
        return yield* FromUnion21(schema_, references_, value);
      case "Uint8Array":
        return yield* FromUint8Array5(schema_, references_, value);
      case "Unknown":
        return yield* FromUnknown5(schema_, references_, value);
      case "Void":
        return yield* FromVoid5(schema_, references_, value);
      default:
        if (!exports_type2.Has(schema_[Kind]))
          throw new TypeCompilerUnknownTypeError(schema);
        return yield* FromKind4(schema_, references_, value);
    }
  }
  const state = {
    language: "javascript",
    functions: new Map,
    variables: new Map,
    instances: new Map
  };
  function CreateExpression(schema, references, value, useHoisting = true) {
    return `(${[...Visit17(schema, references, value, useHoisting)].join(" && ")})`;
  }
  function CreateFunctionName($id) {
    return `check_${Identifier.Encode($id)}`;
  }
  function CreateVariable(expression) {
    const variableName = `local_${state.variables.size}`;
    state.variables.set(variableName, `const ${variableName} = ${expression}`);
    return variableName;
  }
  function CreateFunction(name3, schema, references, value, useHoisting = true) {
    const [newline2, pad] = [`
`, (length2) => "".padStart(length2, " ")];
    const parameter = CreateParameter("value", "any");
    const returns = CreateReturns("boolean");
    const expression = [...Visit17(schema, references, value, useHoisting)].map((expression2) => `${pad(4)}${expression2}`).join(` &&${newline2}`);
    return `function ${name3}(${parameter})${returns} {${newline2}${pad(2)}return (${newline2}${expression}${newline2}${pad(2)})
}`;
  }
  function CreateParameter(name3, type2) {
    const annotation = state.language === "typescript" ? `: ${type2}` : "";
    return `${name3}${annotation}`;
  }
  function CreateReturns(type2) {
    return state.language === "typescript" ? `: ${type2}` : "";
  }
  function Build(schema, references, options2) {
    const functionCode = CreateFunction("check", schema, references, "value");
    const parameter = CreateParameter("value", "any");
    const returns = CreateReturns("boolean");
    const functions = [...state.functions.values()];
    const variables = [...state.variables.values()];
    const checkFunction = IsString2(schema.$id) ? `return function check(${parameter})${returns} {
  return ${CreateFunctionName(schema.$id)}(value)
}` : `return ${functionCode}`;
    return [...variables, ...functions, checkFunction].join(`
`);
  }
  function Code(...args) {
    const defaults3 = { language: "javascript" };
    const [schema, references, options2] = args.length === 2 && IsArray2(args[1]) ? [args[0], args[1], defaults3] : args.length === 2 && !IsArray2(args[1]) ? [args[0], [], args[1]] : args.length === 3 ? [args[0], args[1], args[2]] : args.length === 1 ? [args[0], [], defaults3] : [null, [], defaults3];
    state.language = options2.language;
    state.variables.clear();
    state.functions.clear();
    state.instances.clear();
    if (!IsSchema2(schema))
      throw new TypeCompilerTypeGuardError(schema);
    for (const schema2 of references)
      if (!IsSchema2(schema2))
        throw new TypeCompilerTypeGuardError(schema2);
    return Build(schema, references, options2);
  }
  TypeCompiler2.Code = Code;
  function Compile(schema, references = []) {
    const generatedCode = Code(schema, references, { language: "javascript" });
    const compiledFunction = globalThis.Function("kind", "format", "hash", generatedCode);
    const instances = new Map(state.instances);
    function typeRegistryFunction(kind, instance, value) {
      if (!exports_type2.Has(kind) || !instances.has(instance))
        return false;
      const checkFunc = exports_type2.Get(kind);
      const schema2 = instances.get(instance);
      return checkFunc(schema2, value);
    }
    function formatRegistryFunction(format, value) {
      if (!exports_format.Has(format))
        return false;
      const checkFunc = exports_format.Get(format);
      return checkFunc(value);
    }
    function hashFunction(value) {
      return Hash2(value);
    }
    const checkFunction = compiledFunction(typeRegistryFunction, formatRegistryFunction, hashFunction);
    return new TypeCheck(schema, references, checkFunction, generatedCode);
  }
  TypeCompiler2.Compile = Compile;
})(TypeCompiler || (TypeCompiler = {}));

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/universal/utils.mjs
var isBun = typeof Bun < "u";
function isCloudflareWorker() {
  try {
    if (typeof caches < "u" && typeof caches.default < "u" || typeof WebSocketPair < "u")
      return true;
  } catch {
    return false;
  }
  return false;
}

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/universal/file.mjs
var mime = {
  aac: "audio/aac",
  abw: "application/x-abiword",
  ai: "application/postscript",
  arc: "application/octet-stream",
  avi: "video/x-msvideo",
  azw: "application/vnd.amazon.ebook",
  bin: "application/octet-stream",
  bz: "application/x-bzip",
  bz2: "application/x-bzip2",
  csh: "application/x-csh",
  css: "text/css",
  csv: "text/csv",
  doc: "application/msword",
  dll: "application/octet-stream",
  eot: "application/vnd.ms-fontobject",
  epub: "application/epub+zip",
  gif: "image/gif",
  htm: "text/html",
  html: "text/html",
  ico: "image/x-icon",
  ics: "text/calendar",
  jar: "application/java-archive",
  jpeg: "image/jpeg",
  jpg: "image/jpeg",
  js: "application/javascript",
  json: "application/json",
  mid: "audio/midi",
  midi: "audio/midi",
  mp2: "audio/mpeg",
  mp3: "audio/mpeg",
  mp4: "video/mp4",
  mpa: "video/mpeg",
  mpe: "video/mpeg",
  mpeg: "video/mpeg",
  mpkg: "application/vnd.apple.installer+xml",
  odp: "application/vnd.oasis.opendocument.presentation",
  ods: "application/vnd.oasis.opendocument.spreadsheet",
  odt: "application/vnd.oasis.opendocument.text",
  oga: "audio/ogg",
  ogv: "video/ogg",
  ogx: "application/ogg",
  otf: "font/otf",
  png: "image/png",
  pdf: "application/pdf",
  ppt: "application/vnd.ms-powerpoint",
  rar: "application/x-rar-compressed",
  rtf: "application/rtf",
  sh: "application/x-sh",
  svg: "image/svg+xml",
  swf: "application/x-shockwave-flash",
  tar: "application/x-tar",
  tif: "image/tiff",
  tiff: "image/tiff",
  ts: "application/typescript",
  ttf: "font/ttf",
  txt: "text/plain",
  vsd: "application/vnd.visio",
  wav: "audio/x-wav",
  weba: "audio/webm",
  webm: "video/webm",
  webp: "image/webp",
  woff: "font/woff",
  woff2: "font/woff2",
  xhtml: "application/xhtml+xml",
  xls: "application/vnd.ms-excel",
  xlsx: "application/vnd.ms-excel",
  xlsx_OLD: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  xml: "application/xml",
  xul: "application/vnd.mozilla.xul+xml",
  zip: "application/zip",
  "3gp": "video/3gpp",
  "3gp_DOES_NOT_CONTAIN_VIDEO": "audio/3gpp",
  "3gp2": "video/3gpp2",
  "3gp2_DOES_NOT_CONTAIN_VIDEO": "audio/3gpp2",
  "7z": "application/x-7z-compressed"
};
var getFileExtension = (path2) => {
  const index2 = path2.lastIndexOf(".");
  return index2 === -1 ? "" : path2.slice(index2 + 1);
};
var createReadStream3;
var stat;

class ElysiaFile {
  constructor(path2) {
    this.path = path2;
    if (isBun)
      this.value = Bun.file(path2);
    else {
      if (!createReadStream3 || !stat) {
        if (typeof window < "u") {
          console.warn("Browser environment does not support file");
          return;
        }
        const warnMissing = (name3) => console.warn(new Error(`[elysia] \`file\` require \`fs${name3 ? "." + name3 : ""}\` ${name3?.includes(".") ? "module " : ""}which is not available in this environment`));
        if (typeof process > "u" || typeof process.getBuiltinModule != "function") {
          warnMissing();
          return;
        }
        const fs3 = process.getBuiltinModule("fs");
        if (!fs3) {
          warnMissing();
          return;
        }
        if (typeof fs3.createReadStream != "function") {
          warnMissing();
          return;
        }
        if (typeof fs3.promises?.stat != "function") {
          warnMissing();
          return;
        }
        createReadStream3 = fs3.createReadStream, stat = fs3.promises.stat;
      }
      this.value = createReadStream3(path2), this.stats = stat(path2);
    }
  }
  get type() {
    return mime[getFileExtension(this.path)] || "application/octet-stream";
  }
  get length() {
    return isBun ? this.value.size : this.stats?.then((x4) => x4.size) ?? 0;
  }
}

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/utils.mjs
var replaceUrlPath = (url2, pathname) => {
  const pathStartIndex = url2.indexOf("/", 11), queryIndex = url2.indexOf("?", pathStartIndex);
  return queryIndex === -1 ? `${url2.slice(0, pathStartIndex)}${pathname.charCodeAt(0) === 47 ? "" : "/"}${pathname}` : `${url2.slice(0, pathStartIndex)}${pathname.charCodeAt(0) === 47 ? "" : "/"}${pathname}${url2.slice(queryIndex)}`;
};
var isClass = (v5) => typeof v5 == "function" && /^\s*class\s+/.test(v5.toString()) || v5.toString && v5.toString().startsWith("[object ") && v5.toString() !== "[object Object]" || isNotEmpty(Object.getPrototypeOf(v5));
var isObject4 = (item) => item && typeof item == "object" && !Array.isArray(item);
var mergeDeep = (target, source, options2) => {
  const skipKeys = options2?.skipKeys, override = options2?.override ?? true, mergeArray = options2?.mergeArray ?? false, seen = options2?.seen ?? /* @__PURE__ */ new WeakSet;
  if (!isObject4(target) || !isObject4(source) || seen.has(source))
    return target;
  seen.add(source);
  for (const [key, value] of Object.entries(source))
    if (!(skipKeys?.includes(key) || ["__proto__", "constructor", "prototype"].includes(key))) {
      if (mergeArray && Array.isArray(value)) {
        target[key] = Array.isArray(target[key]) ? [...target[key], ...value] : target[key] = value;
        continue;
      }
      if (!isObject4(value) || !(key in target) || isClass(value)) {
        if ((override || !(key in target)) && !Object.isFrozen(target))
          try {
            target[key] = value;
          } catch {}
        continue;
      }
      if (!Object.isFrozen(target[key]))
        try {
          target[key] = mergeDeep(target[key], value, { skipKeys, override, mergeArray, seen });
        } catch {}
    }
  return seen.delete(source), target;
};
var mergeCookie = (a2, b5) => {
  const v5 = mergeDeep(Object.assign({}, a2), b5, {
    skipKeys: ["properties"],
    mergeArray: false
  });
  return v5.properties && delete v5.properties, v5;
};
var mergeObjectArray = (a2, b5) => {
  if (!b5)
    return a2;
  const array2 = [], checksums = [];
  if (a2) {
    Array.isArray(a2) || (a2 = [a2]);
    for (const item of a2)
      array2.push(item), item.checksum && checksums.push(item.checksum);
  }
  if (b5) {
    Array.isArray(b5) || (b5 = [b5]);
    for (const item of b5)
      checksums.includes(item.checksum) || array2.push(item);
  }
  return array2;
};
var primitiveHooks = [
  "start",
  "request",
  "parse",
  "transform",
  "resolve",
  "beforeHandle",
  "afterHandle",
  "mapResponse",
  "afterResponse",
  "trace",
  "error",
  "stop",
  "body",
  "headers",
  "params",
  "query",
  "response",
  "type",
  "detail"
];
var primitiveHookMap = primitiveHooks.reduce((acc, x4) => (acc[x4] = true, acc), {});
var isRecordNumber = (x4) => typeof x4 == "object" && Object.keys(x4).every((x22) => !isNaN(+x22));
var mergeResponse = (a2, b5) => isRecordNumber(a2) && isRecordNumber(b5) ? Object.assign({}, a2, b5) : a2 && !isRecordNumber(a2) && isRecordNumber(b5) ? Object.assign({ 200: a2 }, b5) : b5 ?? a2;
var mergeSchemaValidator = (a2, b5) => !a2 && !b5 ? {
  body: undefined,
  headers: undefined,
  params: undefined,
  query: undefined,
  cookie: undefined,
  response: undefined
} : {
  body: b5?.body ?? a2?.body,
  headers: b5?.headers ?? a2?.headers,
  params: b5?.params ?? a2?.params,
  query: b5?.query ?? a2?.query,
  cookie: b5?.cookie ?? a2?.cookie,
  response: mergeResponse(a2?.response, b5?.response)
};
var mergeHook = (a2, b5) => {
  if (!b5)
    return a2 ?? {};
  if (!a2)
    return b5 ?? {};
  if (!Object.values(b5).find((x4) => x4 != null))
    return { ...a2 };
  const hook = {
    ...a2,
    ...b5,
    body: b5.body ?? a2.body,
    headers: b5.headers ?? a2.headers,
    params: b5.params ?? a2.params,
    query: b5.query ?? a2.query,
    cookie: b5.cookie ?? a2.cookie,
    response: mergeResponse(a2.response, b5.response),
    type: a2.type || b5.type,
    detail: mergeDeep(b5.detail ?? {}, a2.detail ?? {}),
    parse: mergeObjectArray(a2.parse, b5.parse),
    transform: mergeObjectArray(a2.transform, b5.transform),
    beforeHandle: mergeObjectArray(mergeObjectArray(fnToContainer(a2.resolve, "resolve"), a2.beforeHandle), mergeObjectArray(fnToContainer(b5.resolve, "resolve"), b5.beforeHandle)),
    afterHandle: mergeObjectArray(a2.afterHandle, b5.afterHandle),
    mapResponse: mergeObjectArray(a2.mapResponse, b5.mapResponse),
    afterResponse: mergeObjectArray(a2.afterResponse, b5.afterResponse),
    trace: mergeObjectArray(a2.trace, b5.trace),
    error: mergeObjectArray(a2.error, b5.error),
    standaloneSchema: a2.standaloneSchema || b5.standaloneSchema ? a2.standaloneSchema && !b5.standaloneSchema ? a2.standaloneSchema : b5.standaloneSchema && !a2.standaloneSchema ? b5.standaloneSchema : [
      ...a2.standaloneSchema ?? [],
      ...b5.standaloneSchema ?? []
    ] : undefined
  };
  return hook.resolve && delete hook.resolve, hook;
};
var lifeCycleToArray = (a2) => {
  a2.parse && !Array.isArray(a2.parse) && (a2.parse = [a2.parse]), a2.transform && !Array.isArray(a2.transform) && (a2.transform = [a2.transform]), a2.afterHandle && !Array.isArray(a2.afterHandle) && (a2.afterHandle = [a2.afterHandle]), a2.mapResponse && !Array.isArray(a2.mapResponse) && (a2.mapResponse = [a2.mapResponse]), a2.afterResponse && !Array.isArray(a2.afterResponse) && (a2.afterResponse = [a2.afterResponse]), a2.trace && !Array.isArray(a2.trace) && (a2.trace = [a2.trace]), a2.error && !Array.isArray(a2.error) && (a2.error = [a2.error]);
  let beforeHandle = [];
  return a2.resolve && (beforeHandle = fnToContainer(Array.isArray(a2.resolve) ? a2.resolve : [a2.resolve], "resolve"), delete a2.resolve), a2.beforeHandle && (beforeHandle.length ? beforeHandle = beforeHandle.concat(Array.isArray(a2.beforeHandle) ? a2.beforeHandle : [a2.beforeHandle]) : beforeHandle = Array.isArray(a2.beforeHandle) ? a2.beforeHandle : [a2.beforeHandle]), beforeHandle.length && (a2.beforeHandle = beforeHandle), a2;
};
var hasHeaderShorthand = isBun ? "toJSON" in new Headers : false;
var hasSetImmediate = typeof setImmediate == "function";
var checksum = (s3) => {
  let h8 = 9;
  for (let i = 0;i < s3.length; )
    h8 = Math.imul(h8 ^ s3.charCodeAt(i++), 9 ** 9);
  return h8 = h8 ^ h8 >>> 9;
};
var injectChecksum = (checksum2, x4) => {
  if (!x4)
    return;
  if (!Array.isArray(x4)) {
    const fn3 = x4;
    return checksum2 && !fn3.checksum && (fn3.checksum = checksum2), fn3.scope === "scoped" && (fn3.scope = "local"), fn3;
  }
  const fns = [...x4];
  for (const fn3 of fns)
    checksum2 && !fn3.checksum && (fn3.checksum = checksum2), fn3.scope === "scoped" && (fn3.scope = "local");
  return fns;
};
var mergeLifeCycle = (a2, b5, checksum2) => ({
  start: mergeObjectArray(a2.start, injectChecksum(checksum2, b5?.start)),
  request: mergeObjectArray(a2.request, injectChecksum(checksum2, b5?.request)),
  parse: mergeObjectArray(a2.parse, injectChecksum(checksum2, b5?.parse)),
  transform: mergeObjectArray(a2.transform, injectChecksum(checksum2, b5?.transform)),
  beforeHandle: mergeObjectArray(mergeObjectArray(fnToContainer(a2.resolve, "resolve"), a2.beforeHandle), injectChecksum(checksum2, mergeObjectArray(fnToContainer(b5?.resolve, "resolve"), b5?.beforeHandle))),
  afterHandle: mergeObjectArray(a2.afterHandle, injectChecksum(checksum2, b5?.afterHandle)),
  mapResponse: mergeObjectArray(a2.mapResponse, injectChecksum(checksum2, b5?.mapResponse)),
  afterResponse: mergeObjectArray(a2.afterResponse, injectChecksum(checksum2, b5?.afterResponse)),
  trace: mergeObjectArray(a2.trace, injectChecksum(checksum2, b5?.trace)),
  error: mergeObjectArray(a2.error, injectChecksum(checksum2, b5?.error)),
  stop: mergeObjectArray(a2.stop, injectChecksum(checksum2, b5?.stop))
});
var asHookType = (fn3, inject, { skipIfHasType = false }) => {
  if (!fn3)
    return fn3;
  if (!Array.isArray(fn3))
    return skipIfHasType ? fn3.scope ??= inject : fn3.scope = inject, fn3;
  for (const x4 of fn3)
    skipIfHasType ? x4.scope ??= inject : x4.scope = inject;
  return fn3;
};
var filterGlobal = (fn3) => {
  if (!fn3)
    return fn3;
  if (!Array.isArray(fn3))
    switch (fn3.scope) {
      case "global":
      case "scoped":
        return { ...fn3 };
      default:
        return { fn: fn3 };
    }
  const array2 = [];
  for (const x4 of fn3)
    switch (x4.scope) {
      case "global":
      case "scoped":
        array2.push({
          ...x4
        });
        break;
    }
  return array2;
};
var filterGlobalHook = (hook) => ({
  ...hook,
  type: hook?.type,
  detail: hook?.detail,
  parse: filterGlobal(hook?.parse),
  transform: filterGlobal(hook?.transform),
  beforeHandle: filterGlobal(hook?.beforeHandle),
  afterHandle: filterGlobal(hook?.afterHandle),
  mapResponse: filterGlobal(hook?.mapResponse),
  afterResponse: filterGlobal(hook?.afterResponse),
  error: filterGlobal(hook?.error),
  trace: filterGlobal(hook?.trace)
});
var StatusMap = {
  Continue: 100,
  "Switching Protocols": 101,
  Processing: 102,
  "Early Hints": 103,
  OK: 200,
  Created: 201,
  Accepted: 202,
  "Non-Authoritative Information": 203,
  "No Content": 204,
  "Reset Content": 205,
  "Partial Content": 206,
  "Multi-Status": 207,
  "Already Reported": 208,
  "Multiple Choices": 300,
  "Moved Permanently": 301,
  Found: 302,
  "See Other": 303,
  "Not Modified": 304,
  "Temporary Redirect": 307,
  "Permanent Redirect": 308,
  "Bad Request": 400,
  Unauthorized: 401,
  "Payment Required": 402,
  Forbidden: 403,
  "Not Found": 404,
  "Method Not Allowed": 405,
  "Not Acceptable": 406,
  "Proxy Authentication Required": 407,
  "Request Timeout": 408,
  Conflict: 409,
  Gone: 410,
  "Length Required": 411,
  "Precondition Failed": 412,
  "Payload Too Large": 413,
  "URI Too Long": 414,
  "Unsupported Media Type": 415,
  "Range Not Satisfiable": 416,
  "Expectation Failed": 417,
  "I'm a teapot": 418,
  "Enhance Your Calm": 420,
  "Misdirected Request": 421,
  "Unprocessable Content": 422,
  Locked: 423,
  "Failed Dependency": 424,
  "Too Early": 425,
  "Upgrade Required": 426,
  "Precondition Required": 428,
  "Too Many Requests": 429,
  "Request Header Fields Too Large": 431,
  "Unavailable For Legal Reasons": 451,
  "Internal Server Error": 500,
  "Not Implemented": 501,
  "Bad Gateway": 502,
  "Service Unavailable": 503,
  "Gateway Timeout": 504,
  "HTTP Version Not Supported": 505,
  "Variant Also Negotiates": 506,
  "Insufficient Storage": 507,
  "Loop Detected": 508,
  "Not Extended": 510,
  "Network Authentication Required": 511
};
var InvertedStatusMap = Object.fromEntries(Object.entries(StatusMap).map(([k4, v5]) => [v5, k4]));
function removeTrailingEquals(digest) {
  let trimmedDigest = digest;
  for (;trimmedDigest.endsWith("="); )
    trimmedDigest = trimmedDigest.slice(0, -1);
  return trimmedDigest;
}
var encoder2 = new TextEncoder;
var signCookie = async (val, secret) => {
  if (typeof val == "object" ? val = JSON.stringify(val) : typeof val != "string" && (val = val + ""), secret == null)
    throw new TypeError("Secret key must be provided");
  const secretKey = await crypto.subtle.importKey("raw", encoder2.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["sign"]), hmacBuffer = await crypto.subtle.sign("HMAC", secretKey, encoder2.encode(val));
  return val + "." + removeTrailingEquals(Buffer.from(hmacBuffer).toString("base64"));
};
var constantTimeEqual = typeof crypto?.timingSafeEqual == "function" ? (a2, b5) => {
  const ab2 = Buffer.from(a2, "utf8"), bb = Buffer.from(b5, "utf8");
  return ab2.length !== bb.length ? false : crypto.timingSafeEqual(ab2, bb);
} : (a2, b5) => a2 === b5;
var unsignCookie = async (input, secret) => {
  if (typeof input != "string")
    throw new TypeError("Signed cookie string must be provided.");
  const dot = input.lastIndexOf(".");
  if (dot === -1)
    return secret === null ? input : false;
  const tentativeValue = input.slice(0, dot), expectedInput = await signCookie(tentativeValue, secret);
  return constantTimeEqual(expectedInput, input) ? tentativeValue : false;
};
var insertStandaloneValidator = (hook, name3, value) => {
  if (!hook.standaloneValidator?.length || !Array.isArray(hook.standaloneValidator)) {
    hook.standaloneValidator = [
      {
        [name3]: value
      }
    ];
    return;
  }
  const last = hook.standaloneValidator[hook.standaloneValidator.length - 1];
  name3 in last ? hook.standaloneValidator.push({
    [name3]: value
  }) : last[name3] = value;
};
var parseNumericString = (message2) => {
  if (typeof message2 == "number")
    return message2;
  if (message2.length < 16) {
    if (message2.trim().length === 0)
      return null;
    const length2 = Number(message2);
    return Number.isNaN(length2) ? null : length2;
  }
  if (message2.length === 16) {
    if (message2.trim().length === 0)
      return null;
    const number5 = Number(message2);
    return Number.isNaN(number5) || number5.toString() !== message2 ? null : number5;
  }
  return null;
};
var isNumericString = (message2) => parseNumericString(message2) !== null;

class PromiseGroup {
  constructor(onError = console.error, onFinally = () => {}) {
    this.onError = onError;
    this.onFinally = onFinally;
    this.root = null;
    this.promises = [];
  }
  get size() {
    return this.promises.length;
  }
  add(promise2) {
    return this.promises.push(promise2), this.root ||= this.drain(), this.promises.length === 1 && this.then(this.onFinally), promise2;
  }
  async drain() {
    for (;this.promises.length > 0; ) {
      try {
        await this.promises[0];
      } catch (error49) {
        this.onError(error49);
      }
      this.promises.shift();
    }
    this.root = null;
  }
  then(onfulfilled, onrejected) {
    return (this.root ?? Promise.resolve()).then(onfulfilled, onrejected);
  }
}
var fnToContainer = (fn3, subType) => {
  if (!fn3)
    return fn3;
  if (!Array.isArray(fn3)) {
    if (typeof fn3 == "function" || typeof fn3 == "string")
      return subType ? { fn: fn3, subType } : { fn: fn3 };
    if ("fn" in fn3)
      return fn3;
  }
  const fns = [];
  for (const x4 of fn3)
    typeof x4 == "function" || typeof x4 == "string" ? fns.push(subType ? { fn: x4, subType } : { fn: x4 }) : ("fn" in x4) && fns.push(x4);
  return fns;
};
var localHookToLifeCycleStore = (a2) => (a2.start && (a2.start = fnToContainer(a2.start)), a2.request && (a2.request = fnToContainer(a2.request)), a2.parse && (a2.parse = fnToContainer(a2.parse)), a2.transform && (a2.transform = fnToContainer(a2.transform)), a2.beforeHandle && (a2.beforeHandle = fnToContainer(a2.beforeHandle)), a2.afterHandle && (a2.afterHandle = fnToContainer(a2.afterHandle)), a2.mapResponse && (a2.mapResponse = fnToContainer(a2.mapResponse)), a2.afterResponse && (a2.afterResponse = fnToContainer(a2.afterResponse)), a2.trace && (a2.trace = fnToContainer(a2.trace)), a2.error && (a2.error = fnToContainer(a2.error)), a2.stop && (a2.stop = fnToContainer(a2.stop)), a2);
var lifeCycleToFn = (a2) => {
  const lifecycle = /* @__PURE__ */ Object.create(null);
  return a2.start?.map && (lifecycle.start = a2.start.map((x4) => x4.fn)), a2.request?.map && (lifecycle.request = a2.request.map((x4) => x4.fn)), a2.parse?.map && (lifecycle.parse = a2.parse.map((x4) => x4.fn)), a2.transform?.map && (lifecycle.transform = a2.transform.map((x4) => x4.fn)), a2.beforeHandle?.map && (lifecycle.beforeHandle = a2.beforeHandle.map((x4) => x4.fn)), a2.afterHandle?.map && (lifecycle.afterHandle = a2.afterHandle.map((x4) => x4.fn)), a2.mapResponse?.map && (lifecycle.mapResponse = a2.mapResponse.map((x4) => x4.fn)), a2.afterResponse?.map && (lifecycle.afterResponse = a2.afterResponse.map((x4) => x4.fn)), a2.error?.map && (lifecycle.error = a2.error.map((x4) => x4.fn)), a2.stop?.map && (lifecycle.stop = a2.stop.map((x4) => x4.fn)), a2.trace?.map ? lifecycle.trace = a2.trace.map((x4) => x4.fn) : lifecycle.trace = [], lifecycle;
};
var cloneInference = (inference) => ({
  body: inference.body,
  cookie: inference.cookie,
  headers: inference.headers,
  query: inference.query,
  set: inference.set,
  server: inference.server,
  path: inference.path,
  route: inference.route,
  url: inference.url
});
var redirect = (url2, status = 302) => Response.redirect(url2, status);
var ELYSIA_FORM_DATA = Symbol("ElysiaFormData");
var ELYSIA_REQUEST_ID = Symbol("ElysiaRequestId");
var form = (items) => {
  const formData = new FormData;
  if (formData[ELYSIA_FORM_DATA] = {}, items)
    for (const [key, value] of Object.entries(items)) {
      if (Array.isArray(value)) {
        formData[ELYSIA_FORM_DATA][key] = [];
        for (const v5 of value)
          value instanceof File ? formData.append(key, value, value.name) : value instanceof ElysiaFile ? formData.append(key, value.value, value.value?.name) : formData.append(key, value), formData[ELYSIA_FORM_DATA][key].push(value);
        continue;
      }
      value instanceof File ? formData.append(key, value, value.name) : value instanceof ElysiaFile ? formData.append(key, value.value, value.value?.name) : formData.append(key, value), formData[ELYSIA_FORM_DATA][key] = value;
    }
  return formData;
};
var randomId = typeof crypto > "u" || isCloudflareWorker() ? () => {
  let result = "";
  const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  for (let i = 0;i < 16; i++)
    result += characters.charAt(Math.floor(Math.random() * 62));
  return result;
} : () => {
  const uuid5 = crypto.randomUUID();
  return uuid5.slice(0, 8) + uuid5.slice(24, 32);
};
var deduplicateChecksum = (array2) => {
  if (!array2.length)
    return [];
  const hashes = [];
  for (let i = 0;i < array2.length; i++) {
    const item = array2[i];
    item.checksum && (hashes.includes(item.checksum) && (array2.splice(i, 1), i--), hashes.push(item.checksum));
  }
  return array2;
};
var promoteEvent = (events, as2 = "scoped") => {
  if (events) {
    if (as2 === "scoped") {
      for (const event of events)
        "scope" in event && event.scope === "local" && (event.scope = "scoped");
      return;
    }
    for (const event of events)
      "scope" in event && (event.scope = "global");
  }
};
var getLoosePath = (path2) => path2.charCodeAt(path2.length - 1) === 47 ? path2.slice(0, path2.length - 1) : path2 + "/";
var isNotEmpty = (obj) => {
  if (!obj)
    return false;
  for (const _6 in obj)
    return true;
  return false;
};
var encodePath = (path2, { dynamic = false } = {}) => {
  let encoded = encodeURIComponent(path2).replace(/%2F/g, "/");
  return dynamic && (encoded = encoded.replace(/%3A/g, ":").replace(/%3F/g, "?")), encoded;
};
var supportPerMethodInlineHandler = !!(typeof Bun > "u" || Bun.semver?.satisfies?.(Bun.version, ">=1.2.14"));
async function getResponseLength(response) {
  if (response.bodyUsed || !response.body)
    return 0;
  let length2 = 0;
  const reader = response.body.getReader();
  for (;; ) {
    const { done, value } = await reader.read();
    if (done)
      break;
    length2 += value.byteLength;
  }
  return length2;
}
var emptySchema = {
  headers: true,
  cookie: true,
  query: true,
  params: true,
  body: true,
  response: true
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/error.mjs
var env2 = typeof Bun < "u" ? Bun.env : typeof process < "u" ? process?.env : undefined;
var ERROR_CODE = Symbol("ElysiaErrorCode");
var isProduction = (env2?.NODE_ENV ?? env2?.ENV) === "production";
var emptyHttpStatus = {
  101: undefined,
  204: undefined,
  205: undefined,
  304: undefined,
  307: undefined,
  308: undefined
};

class ElysiaCustomStatusResponse {
  constructor(code2, response) {
    const res = response ?? (code2 in InvertedStatusMap ? InvertedStatusMap[code2] : code2);
    this.code = StatusMap[code2] ?? code2, code2 in emptyHttpStatus ? this.response = undefined : this.response = res;
  }
}
var status = (code2, response) => new ElysiaCustomStatusResponse(code2, response);
class NotFoundError extends Error {
  constructor(message2) {
    super(message2 ?? "NOT_FOUND");
    this.code = "NOT_FOUND";
    this.status = 404;
  }
}

class ParseError2 extends Error {
  constructor(cause) {
    super("Bad Request", {
      cause
    });
    this.code = "PARSE";
    this.status = 400;
  }
}

class InvalidCookieSignature extends Error {
  constructor(key, message2) {
    super(message2 ?? `"${key}" has invalid cookie signature`);
    this.key = key;
    this.code = "INVALID_COOKIE_SIGNATURE";
    this.status = 400;
  }
}
var mapValueError = (error49) => {
  if (!error49)
    return error49;
  let { message: message2, path: path2, value, type: type2 } = error49;
  Array.isArray(path2) && (path2 = path2[0]);
  const property2 = typeof path2 == "string" ? path2.slice(1).replaceAll("/", ".") : "unknown", isRoot = path2 === "";
  switch (type2) {
    case 42:
      return {
        ...error49,
        summary: isRoot ? "Value should not be provided" : `Property '${property2}' should not be provided`
      };
    case 45:
      return {
        ...error49,
        summary: isRoot ? "Value is missing" : `Property '${property2}' is missing`
      };
    case 50:
      const quoteIndex = message2.indexOf("'"), format = message2.slice(quoteIndex + 1, message2.indexOf("'", quoteIndex + 1));
      return {
        ...error49,
        summary: isRoot ? "Value should be an email" : `Property '${property2}' should be ${format}`
      };
    case 54:
      return {
        ...error49,
        summary: `${message2.slice(0, 9).trim()} property '${property2}' to be ${message2.slice(8).trim()} but found: ${value}`
      };
    case 62:
      const union3 = error49.schema.anyOf.map((x4) => `'${x4?.format ?? x4.type}'`).join(", ");
      return {
        ...error49,
        summary: isRoot ? `Value should be one of ${union3}` : `Property '${property2}' should be one of: ${union3}`
      };
    default:
      return { summary: message2, ...error49 };
  }
};

class InvalidFileType extends Error {
  constructor(property2, expected, message2 = `"${property2}" has invalid file type`) {
    super(message2);
    this.property = property2;
    this.expected = expected;
    this.message = message2;
    this.code = "INVALID_FILE_TYPE";
    this.status = 422;
    Object.setPrototypeOf(this, InvalidFileType.prototype);
  }
  toResponse(headers) {
    return isProduction ? new Response(JSON.stringify({
      type: "validation",
      on: "body"
    }), {
      status: 422,
      headers: {
        ...headers,
        "content-type": "application/json"
      }
    }) : new Response(JSON.stringify({
      type: "validation",
      on: "body",
      summary: "Invalid file type",
      message: this.message,
      property: this.property,
      expected: this.expected
    }), {
      status: 422,
      headers: {
        ...headers,
        "content-type": "application/json"
      }
    });
  }
}

class ValidationError2 extends Error {
  constructor(type2, validator, value, allowUnsafeValidationDetails = false, errors4) {
    let message2 = "", error49, expected, customError;
    if (validator?.provider === "standard" || "~standard" in validator || validator.schema && "~standard" in validator.schema) {
      const standard = ("~standard" in validator ? validator : validator.schema)["~standard"];
      error49 = (errors4 ?? standard.validate(value).issues)?.[0], isProduction && !allowUnsafeValidationDetails ? message2 = JSON.stringify({
        type: "validation",
        on: type2,
        found: value
      }) : message2 = JSON.stringify({
        type: "validation",
        on: type2,
        property: error49.path?.[0] || "root",
        message: error49?.message,
        summary: error49?.problem,
        expected,
        found: value,
        errors: errors4
      }, null, 2), customError = error49?.message;
    } else {
      value && typeof value == "object" && value instanceof ElysiaCustomStatusResponse && (value = value.response), error49 = errors4?.First() ?? ("Errors" in validator ? validator.Errors(value).First() : exports_value2.Errors(validator, value).First());
      const accessor = error49?.path || "root", schema = validator?.schema ?? validator;
      if (!isProduction && !allowUnsafeValidationDetails)
        try {
          expected = exports_value2.Create(schema);
        } catch (error210) {
          expected = {
            type: "Could not create expected value",
            message: error210?.message,
            error: error210
          };
        }
      customError = error49?.schema?.message || error49?.schema?.error !== undefined ? typeof error49.schema.error == "function" ? error49.schema.error(isProduction && !allowUnsafeValidationDetails ? {
        type: "validation",
        on: type2,
        found: value
      } : {
        type: "validation",
        on: type2,
        value,
        property: accessor,
        message: error49?.message,
        summary: mapValueError(error49)?.summary,
        found: value,
        expected,
        errors: "Errors" in validator ? [
          ...validator.Errors(value)
        ].map(mapValueError) : [
          ...exports_value2.Errors(validator, value)
        ].map(mapValueError)
      }, validator) : error49.schema.error : undefined, customError !== undefined ? message2 = typeof customError == "object" ? JSON.stringify(customError) : customError + "" : isProduction && !allowUnsafeValidationDetails ? message2 = JSON.stringify({
        type: "validation",
        on: type2,
        found: value
      }) : message2 = JSON.stringify({
        type: "validation",
        on: type2,
        property: accessor,
        message: error49?.message,
        summary: mapValueError(error49)?.summary,
        expected,
        found: value,
        errors: "Errors" in validator ? [...validator.Errors(value)].map(mapValueError) : [...exports_value2.Errors(validator, value)].map(mapValueError)
      }, null, 2);
    }
    super(message2);
    this.type = type2;
    this.validator = validator;
    this.value = value;
    this.allowUnsafeValidationDetails = allowUnsafeValidationDetails;
    this.code = "VALIDATION";
    this.status = 422;
    this.valueError = error49, this.expected = expected, this.customError = customError, Object.setPrototypeOf(this, ValidationError2.prototype);
  }
  get messageValue() {
    return this.valueError;
  }
  get all() {
    return this.validator?.provider === "standard" || "~standard" in this.validator || "schema" in this.validator && this.validator.schema && "~standard" in this.validator.schema ? ("~standard" in this.validator ? this.validator : this.validator.schema)["~standard"].validate(this.value).issues?.map((issue2) => ({
      summary: issue2.message,
      path: issue2.path?.join(".") || "root",
      message: issue2.message,
      value: this.value
    })) || [] : ("Errors" in this.validator) ? [...this.validator.Errors(this.value)].filter((x4) => x4).map((x4) => mapValueError(x4)) : [...exports_value2.Errors(this.validator, this.value)].map(mapValueError);
  }
  static simplifyModel(validator) {
    const model = "schema" in validator ? validator.schema : validator;
    try {
      return exports_value2.Create(model);
    } catch {
      return model;
    }
  }
  get model() {
    return "~standard" in this.validator ? this.validator : ValidationError2.simplifyModel(this.validator);
  }
  toResponse(headers) {
    return new Response(this.message, {
      status: 400,
      headers: {
        ...headers,
        "content-type": "application/json"
      }
    });
  }
  detail(message2, allowUnsafeValidatorDetails = this.allowUnsafeValidationDetails) {
    if (!this.customError)
      return this.message;
    const value = this.value, expected = this.expected, errors4 = this.all;
    return isProduction && !allowUnsafeValidatorDetails ? {
      type: "validation",
      on: this.type,
      found: value,
      message: message2
    } : {
      type: "validation",
      on: this.type,
      property: this.valueError?.path || "root",
      message: message2,
      summary: mapValueError(this.valueError)?.summary,
      found: value,
      expected,
      errors: errors4
    };
  }
}

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/type-system/utils.mjs
var tryParse = (v5, schema) => {
  try {
    return JSON.parse(v5);
  } catch {
    throw new ValidationError2("property", schema, v5);
  }
};
function createType(kind, func) {
  return exports_type2.Has(kind) || exports_type2.Set(kind, func), (options2 = {}) => Unsafe({ ...options2, [Kind]: kind });
}
var compile2 = (schema) => {
  try {
    const compiler = TypeCompiler.Compile(schema);
    return compiler.Create = () => exports_value2.Create(schema), compiler.Error = (v5) => new ValidationError2("property", schema, v5, compiler.Errors(v5)), compiler;
  } catch {
    return {
      Check: (v5) => exports_value2.Check(schema, v5),
      CheckThrow: (v5) => {
        if (!exports_value2.Check(schema, v5))
          throw new ValidationError2("property", schema, v5, exports_value2.Errors(schema, v5));
      },
      Decode: (v5) => exports_value2.Decode(schema, v5),
      Create: () => exports_value2.Create(schema),
      Error: (v5) => new ValidationError2("property", schema, v5, exports_value2.Errors(schema, v5))
    };
  }
};
var parseFileUnit = (size) => {
  if (typeof size == "string")
    switch (size.slice(-1)) {
      case "k":
        return +size.slice(0, size.length - 1) * 1024;
      case "m":
        return +size.slice(0, size.length - 1) * 1048576;
      default:
        return +size;
    }
  return size;
};
var checkFileExtension = (type2, extension) => type2.startsWith(extension) ? true : extension.charCodeAt(extension.length - 1) === 42 && extension.charCodeAt(extension.length - 2) === 47 && type2.startsWith(extension.slice(0, -1));
var _fileTypeFromBlobWarn = false;
var warnIfFileTypeIsNotInstalled = () => {
  _fileTypeFromBlobWarn || (console.warn("[Elysia] Attempt to validate file type without 'file-type'. This may lead to security risks. We recommend installing 'file-type' to properly validate file extension."), _fileTypeFromBlobWarn = true);
};
var loadFileType = async () => Promise.resolve().then(() => (init_file_type(), exports_file_type)).then((x4) => (_fileTypeFromBlob = x4.fileTypeFromBlob, _fileTypeFromBlob)).catch(warnIfFileTypeIsNotInstalled);
var _fileTypeFromBlob;
var fileTypeFromBlob2 = (file2) => _fileTypeFromBlob ? _fileTypeFromBlob(file2) : loadFileType().then((mod) => {
  if (mod)
    return mod(file2);
});
var fileType = async (file2, extension, name3 = file2?.name ?? "") => {
  if (Array.isArray(file2))
    return await Promise.all(file2.map((f4) => fileType(f4, extension, name3))), true;
  if (!file2)
    return false;
  const result = await fileTypeFromBlob2(file2);
  if (!result)
    throw new InvalidFileType(name3, extension);
  if (typeof extension == "string" && !checkFileExtension(result.mime, extension))
    throw new InvalidFileType(name3, extension);
  for (let i = 0;i < extension.length; i++)
    if (checkFileExtension(result.mime, extension[i]))
      return true;
  throw new InvalidFileType(name3, extension);
};
var validateFile = (options2, value) => {
  if (value instanceof ElysiaFile)
    return true;
  if (!(value instanceof Blob) || options2.minSize && value.size < parseFileUnit(options2.minSize) || options2.maxSize && value.size > parseFileUnit(options2.maxSize))
    return false;
  if (options2.extension) {
    if (typeof options2.extension == "string")
      return checkFileExtension(value.type, options2.extension);
    for (let i = 0;i < options2.extension.length; i++)
      if (checkFileExtension(value.type, options2.extension[i]))
        return true;
    return false;
  }
  return true;
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/type-system/format.mjs
var fullFormats = {
  date: date6,
  time: getTime(true),
  "date-time": getDateTime(true),
  "iso-time": getTime(false),
  "iso-date-time": getDateTime(false),
  duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
  uri,
  "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
  "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
  url: /^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s@]*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
  email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
  hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
  ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
  ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
  regex,
  uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
  "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
  "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
  "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
  byte,
  int32: { type: "number", validate: validateInt32 },
  int64: { type: "number", validate: validateInt64 },
  float: { type: "number", validate: validateNumber },
  double: { type: "number", validate: validateNumber },
  password: true,
  binary: true
};
function isLeapYear(year2) {
  return year2 % 4 === 0 && (year2 % 100 !== 0 || year2 % 400 === 0);
}
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function date6(str) {
  const matches = DATE.exec(str);
  if (!matches)
    return false;
  const year2 = +matches[1], month = +matches[2], day2 = +matches[3];
  return month >= 1 && month <= 12 && day2 >= 1 && day2 <= (month === 2 && isLeapYear(year2) ? 29 : DAYS[month]);
}
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
function getTime(strictTimeZone) {
  return function(str) {
    const matches = TIME.exec(str);
    if (!matches)
      return false;
    const hr6 = +matches[1], min = +matches[2], sec = +matches[3], tz = matches[4], tzSign = matches[5] === "-" ? -1 : 1, tzH = +(matches[6] || 0), tzM = +(matches[7] || 0);
    if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
      return false;
    if (hr6 <= 23 && min <= 59 && sec < 60)
      return true;
    const utcMin = min - tzM * tzSign, utcHr = hr6 - tzH * tzSign - (utcMin < 0 ? 1 : 0);
    return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
  };
}
var parseDateTimeEmptySpace = (str) => str.charCodeAt(str.length - 6) === 32 ? str.slice(0, -6) + "+" + str.slice(-5) : str;
var DATE_TIME_SEPARATOR = /t|\s/i;
function getDateTime(strictTimeZone) {
  const time5 = getTime(strictTimeZone);
  return function(str) {
    const dateTime = str.split(DATE_TIME_SEPARATOR);
    return dateTime.length === 2 && date6(dateTime[0]) && time5(dateTime[1]);
  };
}
var NOT_URI_FRAGMENT = /\/|:/;
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
function uri(str) {
  return NOT_URI_FRAGMENT.test(str) && URI.test(str);
}
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
function byte(str) {
  return BYTE.lastIndex = 0, BYTE.test(str);
}
var MIN_INT32 = -(2 ** 31);
var MAX_INT322 = 2 ** 31 - 1;
function validateInt32(value) {
  return Number.isInteger(value) && value <= MAX_INT322 && value >= MIN_INT32;
}
function validateInt64(value) {
  return Number.isInteger(value);
}
function validateNumber() {
  return true;
}
var Z_ANCHOR = /[^\\]\\Z/;
function regex(str) {
  if (Z_ANCHOR.test(str))
    return false;
  try {
    return new RegExp(str), true;
  } catch {
    return false;
  }
}
var isISO8601 = /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/;
var isFormalDate = /(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{2}\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT(?:\+|-)\d{4}\s\([^)]+\)/;
var isShortenDate = /^(?:(?:(?:(?:0?[1-9]|[12][0-9]|3[01])[/\s-](?:0?[1-9]|1[0-2])[/\s-](?:19|20)\d{2})|(?:(?:19|20)\d{2}[/\s-](?:0?[1-9]|1[0-2])[/\s-](?:0?[1-9]|[12][0-9]|3[01]))))(?:\s(?:1[012]|0?[1-9]):[0-5][0-9](?::[0-5][0-9])?(?:\s[AP]M)?)?$/;
var _validateDate = fullFormats.date;
var _validateDateTime = fullFormats["date-time"];
exports_format.Has("date") || exports_format.Set("date", (value) => {
  const temp = parseDateTimeEmptySpace(value).replace(/"/g, "");
  if (isISO8601.test(temp) || isFormalDate.test(temp) || isShortenDate.test(temp) || _validateDate(temp)) {
    const date22 = new Date(temp);
    if (!Number.isNaN(date22.getTime()))
      return true;
  }
  return false;
}), exports_format.Has("date-time") || exports_format.Set("date-time", (value) => {
  const temp = value.replace(/"/g, "");
  if (isISO8601.test(temp) || isFormalDate.test(temp) || isShortenDate.test(temp) || _validateDateTime(temp)) {
    const date22 = new Date(temp);
    if (!Number.isNaN(date22.getTime()))
      return true;
  }
  return false;
}), Object.entries(fullFormats).forEach((formatEntry) => {
  const [formatName, formatValue] = formatEntry;
  exports_format.Has(formatName) || (formatValue instanceof RegExp ? exports_format.Set(formatName, (value) => formatValue.test(value)) : typeof formatValue == "function" && exports_format.Set(formatName, formatValue));
}), exports_format.Has("numeric") || exports_format.Set("numeric", (value) => !!value && !isNaN(+value)), exports_format.Has("integer") || exports_format.Set("integer", (value) => !!value && Number.isInteger(+value)), exports_format.Has("boolean") || exports_format.Set("boolean", (value) => value === "true" || value === "false"), exports_format.Has("ObjectString") || exports_format.Set("ObjectString", (value) => {
  let start = value.charCodeAt(0);
  if ((start === 9 || start === 10 || start === 32) && (start = value.trimStart().charCodeAt(0)), start !== 123 && start !== 91)
    return false;
  try {
    return JSON.parse(value), true;
  } catch {
    return false;
  }
}), exports_format.Has("ArrayString") || exports_format.Set("ArrayString", (value) => {
  let start = value.charCodeAt(0);
  if ((start === 9 || start === 10 || start === 32) && (start = value.trimStart().charCodeAt(0)), start !== 123 && start !== 91)
    return false;
  try {
    return JSON.parse(value), true;
  } catch {
    return false;
  }
});

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/type-system/index.mjs
var t2 = Object.assign({}, Type);
createType("UnionEnum", (schema, value) => (typeof value == "number" || typeof value == "string" || value === null) && schema.enum.includes(value)), createType("ArrayBuffer", (schema, value) => value instanceof ArrayBuffer);
var internalFiles = createType("Files", (options2, value) => {
  if (options2.minItems && options2.minItems > 1 && !Array.isArray(value))
    return false;
  if (!Array.isArray(value))
    return validateFile(options2, value);
  if (options2.minItems && value.length < options2.minItems || options2.maxItems && value.length > options2.maxItems)
    return false;
  for (let i = 0;i < value.length; i++)
    if (!validateFile(options2, value[i]))
      return false;
  return true;
});
var internalFormData = createType("ElysiaForm", ({ compiler, ...schema }, value) => {
  if (!(value instanceof FormData))
    return false;
  if (compiler) {
    if (!(ELYSIA_FORM_DATA in value))
      throw new ValidationError2("property", schema, value);
    if (!compiler.Check(value[ELYSIA_FORM_DATA]))
      throw compiler.Error(value[ELYSIA_FORM_DATA]);
  }
  return true;
});
var ElysiaType = {
  String: (property2) => Type.String(property2),
  Numeric: (property2) => {
    const schema = Type.Number(property2), compiler = compile2(schema);
    return t2.Transform(t2.Union([
      t2.String({
        format: "numeric",
        default: 0
      }),
      t2.Number(property2)
    ], property2)).Decode((value) => {
      const number5 = +value;
      if (isNaN(number5))
        return value;
      if (property2 && !compiler.Check(number5))
        throw compiler.Error(number5);
      return number5;
    }).Encode((value) => value);
  },
  NumericEnum(item, property2) {
    const schema = Type.Enum(item, property2), compiler = compile2(schema);
    return t2.Transform(t2.Union([t2.String({ format: "numeric" }), t2.Number()], property2)).Decode((value) => {
      const number5 = +value;
      if (isNaN(number5) || !compiler.Check(number5))
        throw compiler.Error(number5);
      return number5;
    }).Encode((value) => value);
  },
  Integer: (property2) => {
    const schema = Type.Integer(property2), compiler = compile2(schema);
    return t2.Transform(t2.Union([
      t2.String({
        format: "integer",
        default: 0
      }),
      Type.Integer(property2)
    ], property2)).Decode((value) => {
      const number5 = +value;
      if (!compiler.Check(number5))
        throw compiler.Error(number5);
      return number5;
    }).Encode((value) => value);
  },
  Date: (property2) => {
    const schema = Type.Date(property2), compiler = compile2(schema), _default3 = property2?.default ? new Date(property2.default) : undefined;
    return t2.Transform(t2.Union([
      Type.Date(property2),
      t2.String({
        format: "date-time",
        default: _default3?.toISOString()
      }),
      t2.String({
        format: "date",
        default: _default3?.toISOString()
      }),
      t2.Number({ default: _default3?.getTime() })
    ], property2)).Decode((value) => {
      if (typeof value == "number") {
        const date22 = new Date(value);
        if (!compiler.Check(date22))
          throw compiler.Error(date22);
        return date22;
      }
      if (value instanceof Date)
        return value;
      const date7 = new Date(parseDateTimeEmptySpace(value));
      if (!date7 || isNaN(date7.getTime()))
        throw new ValidationError2("property", schema, date7);
      if (!compiler.Check(date7))
        throw compiler.Error(date7);
      return date7;
    }).Encode((value) => {
      if (value instanceof Date)
        return value.toISOString();
      if (typeof value == "string") {
        const parsed = new Date(parseDateTimeEmptySpace(value));
        if (isNaN(parsed.getTime()))
          throw new ValidationError2("property", schema, value);
        return parsed.toISOString();
      }
      if (!compiler.Check(value))
        throw compiler.Error(value);
      return value;
    });
  },
  BooleanString: (property2) => {
    const schema = Type.Boolean(property2), compiler = compile2(schema);
    return t2.Transform(t2.Union([
      t2.Boolean(property2),
      t2.String({
        format: "boolean",
        default: false
      })
    ], property2)).Decode((value) => {
      if (typeof value == "string")
        return value === "true";
      if (value !== undefined && !compiler.Check(value))
        throw compiler.Error(value);
      return value;
    }).Encode((value) => value);
  },
  ObjectString: (properties2, options2) => {
    const schema = t2.Object(properties2, options2), compiler = compile2(schema);
    return t2.Transform(t2.Union([
      t2.String({
        format: "ObjectString",
        default: options2?.default
      }),
      schema
    ], {
      elysiaMeta: "ObjectString"
    })).Decode((value) => {
      if (typeof value == "string") {
        if (value.charCodeAt(0) !== 123)
          throw new ValidationError2("property", schema, value);
        if (!compiler.Check(value = tryParse(value, schema)))
          throw compiler.Error(value);
        return compiler.Decode(value);
      }
      return value;
    }).Encode((value) => {
      let original;
      if (typeof value == "string" && (value = tryParse(original = value, schema)), !compiler.Check(value))
        throw compiler.Error(value);
      return original ?? JSON.stringify(value);
    });
  },
  ArrayString: (children = t2.String(), options2) => {
    const schema = t2.Array(children, options2), compiler = compile2(schema), decode6 = (value, isProperty2 = false) => {
      if (value.charCodeAt(0) === 91) {
        if (!compiler.Check(value = tryParse(value, schema)))
          throw compiler.Error(value);
        return compiler.Decode(value);
      }
      if (isProperty2)
        return value;
      throw new ValidationError2("property", schema, value);
    };
    return t2.Transform(t2.Union([
      t2.String({
        format: "ArrayString",
        default: options2?.default
      }),
      schema
    ], {
      elysiaMeta: "ArrayString"
    })).Decode((value) => {
      if (Array.isArray(value)) {
        let values = [];
        for (let i = 0;i < value.length; i++) {
          const v5 = value[i];
          if (typeof v5 == "string") {
            const t22 = decode6(v5, true);
            Array.isArray(t22) ? values = values.concat(t22) : values.push(t22);
            continue;
          }
          values.push(v5);
        }
        return values;
      }
      return typeof value == "string" ? decode6(value) : value;
    }).Encode((value) => {
      let original;
      if (typeof value == "string" && (value = tryParse(original = value, schema)), !compiler.Check(value))
        throw new ValidationError2("property", schema, value);
      return original ?? JSON.stringify(value);
    });
  },
  ArrayQuery: (children = t2.String(), options2) => {
    const schema = t2.Array(children, options2), compiler = compile2(schema), decode6 = (value) => value.indexOf(",") !== -1 ? compiler.Decode(value.split(",")) : compiler.Decode([value]);
    return t2.Transform(t2.Union([
      t2.String({
        default: options2?.default
      }),
      schema
    ], {
      elysiaMeta: "ArrayQuery"
    })).Decode((value) => {
      if (Array.isArray(value)) {
        let values = [];
        for (let i = 0;i < value.length; i++) {
          const v5 = value[i];
          if (typeof v5 == "string") {
            const t22 = decode6(v5);
            Array.isArray(t22) ? values = values.concat(t22) : values.push(t22);
            continue;
          }
          values.push(v5);
        }
        return values;
      }
      return typeof value == "string" ? decode6(value) : value;
    }).Encode((value) => {
      let original;
      if (typeof value == "string" && (value = tryParse(original = value, schema)), !compiler.Check(value))
        throw new ValidationError2("property", schema, value);
      return original ?? JSON.stringify(value);
    });
  },
  File: createType("File", validateFile),
  Files: (options2 = {}) => t2.Transform(internalFiles(options2)).Decode((value) => Array.isArray(value) ? value : [value]).Encode((value) => value),
  Nullable: (schema, options2) => t2.Union([schema, t2.Null()], {
    ...options2,
    nullable: true
  }),
  MaybeEmpty: (schema, options2) => t2.Union([schema, t2.Null(), t2.Undefined()], options2),
  Cookie: (properties2, {
    domain: domain2,
    expires,
    httpOnly,
    maxAge,
    path: path2,
    priority,
    sameSite,
    secure,
    secrets,
    sign: sign2,
    ...options2
  } = {}) => {
    const v5 = t2.Object(properties2, options2);
    return v5.config = {
      domain: domain2,
      expires,
      httpOnly,
      maxAge,
      path: path2,
      priority,
      sameSite,
      secure,
      secrets,
      sign: sign2
    }, v5;
  },
  UnionEnum: (values, options2 = {}) => {
    const type2 = values.every((value) => typeof value == "string") ? { type: "string" } : values.every((value) => typeof value == "number") ? { type: "number" } : values.every((value) => value === null) ? { type: "null" } : {};
    if (values.some((x4) => typeof x4 == "object" && x4 !== null))
      throw new Error("This type does not support objects or arrays");
    return {
      default: values[0],
      ...options2,
      [Kind]: "UnionEnum",
      ...type2,
      enum: values
    };
  },
  NoValidate: (v5, enabled = true) => (v5.noValidate = enabled, v5),
  Form: (v5, options2 = {}) => {
    const schema = t2.Object(v5, {
      default: form({}),
      ...options2
    }), compiler = compile2(schema);
    return t2.Union([
      schema,
      internalFormData({
        compiler
      })
    ]);
  },
  ArrayBuffer(options2 = {}) {
    return {
      default: [1, 2, 3],
      ...options2,
      [Kind]: "ArrayBuffer"
    };
  },
  Uint8Array: (options2) => {
    const schema = Type.Uint8Array(options2), compiler = compile2(schema);
    return t2.Transform(t2.Union([t2.ArrayBuffer(), Type.Uint8Array(options2)])).Decode((value) => {
      if (value instanceof ArrayBuffer) {
        if (!compiler.Check(value = new Uint8Array(value)))
          throw compiler.Error(value);
        return value;
      }
      return value;
    }).Encode((value) => value);
  }
};
t2.BooleanString = ElysiaType.BooleanString, t2.ObjectString = ElysiaType.ObjectString, t2.ArrayString = ElysiaType.ArrayString, t2.ArrayQuery = ElysiaType.ArrayQuery, t2.Numeric = ElysiaType.Numeric, t2.NumericEnum = ElysiaType.NumericEnum, t2.Integer = ElysiaType.Integer, t2.File = (arg) => (arg?.type && loadFileType(), ElysiaType.File({
  default: "File",
  ...arg,
  extension: arg?.type,
  type: "string",
  format: "binary"
})), t2.Files = (arg) => (arg?.type && loadFileType(), ElysiaType.Files({
  ...arg,
  elysiaMeta: "Files",
  default: "Files",
  extension: arg?.type,
  type: "array",
  items: {
    ...arg,
    default: "Files",
    type: "string",
    format: "binary"
  }
})), t2.Nullable = ElysiaType.Nullable, t2.MaybeEmpty = ElysiaType.MaybeEmpty, t2.Cookie = ElysiaType.Cookie, t2.Date = ElysiaType.Date, t2.UnionEnum = ElysiaType.UnionEnum, t2.NoValidate = ElysiaType.NoValidate, t2.Form = ElysiaType.Form, t2.ArrayBuffer = ElysiaType.ArrayBuffer, t2.Uint8Array = ElysiaType.Uint8Array;

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/sucrose.mjs
var separateFunction = (code2) => {
  code2.startsWith("async") && (code2 = code2.slice(5)), code2 = code2.trimStart();
  let index2 = -1;
  if (code2.charCodeAt(0) === 40 && (index2 = code2.indexOf("=>", code2.indexOf(")")), index2 !== -1)) {
    let bracketEndIndex = index2;
    for (;bracketEndIndex > 0 && code2.charCodeAt(--bracketEndIndex) !== 41; )
      ;
    let body2 = code2.slice(index2 + 2);
    return body2.charCodeAt(0) === 32 && (body2 = body2.trimStart()), [
      code2.slice(1, bracketEndIndex),
      body2,
      {
        isArrowReturn: body2.charCodeAt(0) !== 123
      }
    ];
  }
  if (/^(\w+)=>/g.test(code2) && (index2 = code2.indexOf("=>"), index2 !== -1)) {
    let body2 = code2.slice(index2 + 2);
    return body2.charCodeAt(0) === 32 && (body2 = body2.trimStart()), [
      code2.slice(0, index2),
      body2,
      {
        isArrowReturn: body2.charCodeAt(0) !== 123
      }
    ];
  }
  if (code2.startsWith("function")) {
    index2 = code2.indexOf("(");
    const end = code2.indexOf(")");
    return [
      code2.slice(index2 + 1, end),
      code2.slice(end + 2),
      {
        isArrowReturn: false
      }
    ];
  }
  const start = code2.indexOf("(");
  if (start !== -1) {
    const sep4 = code2.indexOf(`
`, 2), parameter = code2.slice(0, sep4), end = parameter.lastIndexOf(")") + 1, body2 = code2.slice(sep4 + 1);
    return [
      parameter.slice(start, end),
      "{" + body2,
      {
        isArrowReturn: false
      }
    ];
  }
  const x4 = code2.split(`
`, 2);
  return [x4[0], x4[1], { isArrowReturn: false }];
};
var bracketPairRange = (parameter) => {
  const start = parameter.indexOf("{");
  if (start === -1)
    return [-1, 0];
  let end = start + 1, deep = 1;
  for (;end < parameter.length; end++) {
    const char2 = parameter.charCodeAt(end);
    if (char2 === 123 ? deep++ : char2 === 125 && deep--, deep === 0)
      break;
  }
  return deep !== 0 ? [0, parameter.length] : [start, end + 1];
};
var bracketPairRangeReverse = (parameter) => {
  const end = parameter.lastIndexOf("}");
  if (end === -1)
    return [-1, 0];
  let start = end - 1, deep = 1;
  for (;start >= 0; start--) {
    const char2 = parameter.charCodeAt(start);
    if (char2 === 125 ? deep++ : char2 === 123 && deep--, deep === 0)
      break;
  }
  return deep !== 0 ? [-1, 0] : [start, end + 1];
};
var removeColonAlias = (parameter) => {
  for (;; ) {
    const start = parameter.indexOf(":");
    if (start === -1)
      break;
    let end = parameter.indexOf(",", start);
    end === -1 && (end = parameter.indexOf("}", start) - 1), end === -2 && (end = parameter.length), parameter = parameter.slice(0, start) + parameter.slice(end);
  }
  return parameter;
};
var retrieveRootparameters = (parameter) => {
  let hasParenthesis = false;
  parameter.charCodeAt(0) === 40 && (parameter = parameter.slice(1, -1)), parameter.charCodeAt(0) === 123 && (hasParenthesis = true, parameter = parameter.slice(1, -1)), parameter = parameter.replace(/( |\t|\n)/g, "").trim();
  let parameters = [];
  for (;; ) {
    let [start, end] = bracketPairRange(parameter);
    if (start === -1)
      break;
    parameters.push(parameter.slice(0, start - 1)), parameter.charCodeAt(end) === 44 && end++, parameter = parameter.slice(end);
  }
  parameter = removeColonAlias(parameter), parameter && (parameters = parameters.concat(parameter.split(",")));
  const parameterMap = /* @__PURE__ */ Object.create(null);
  for (const p3 of parameters) {
    if (p3.indexOf(",") === -1) {
      parameterMap[p3] = true;
      continue;
    }
    for (const q4 of p3.split(","))
      parameterMap[q4.trim()] = true;
  }
  return {
    hasParenthesis,
    parameters: parameterMap
  };
};
var findParameterReference = (parameter, inference) => {
  const { parameters, hasParenthesis } = retrieveRootparameters(parameter);
  return parameters.query && (inference.query = true), parameters.headers && (inference.headers = true), parameters.body && (inference.body = true), parameters.cookie && (inference.cookie = true), parameters.set && (inference.set = true), parameters.server && (inference.server = true), parameters.route && (inference.route = true), parameters.url && (inference.url = true), parameters.path && (inference.path = true), hasParenthesis ? `{ ${Object.keys(parameters).join(", ")} }` : Object.keys(parameters).join(", ");
};
var findEndIndex = (type2, content, index2) => {
  const regex2 = new RegExp(`${type2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[\\n\\t,; ]`);
  index2 !== undefined && (regex2.lastIndex = index2);
  const match = regex2.exec(content);
  return match ? match.index : -1;
};
var findAlias = (type2, body2, depth = 0) => {
  if (depth > 5)
    return [];
  const aliases = [];
  let content = body2;
  for (;; ) {
    let index2 = findEndIndex(" = " + type2, content);
    if (index2 === -1 && (index2 = findEndIndex("=" + type2, content)), index2 === -1) {
      let lastIndex = content.indexOf(" = " + type2);
      if (lastIndex === -1 && (lastIndex = content.indexOf("=" + type2)), lastIndex + 3 + type2.length !== content.length)
        break;
      index2 = lastIndex;
    }
    const part = content.slice(0, index2), lastPart = part.lastIndexOf(" ");
    let variable = part.slice(lastPart !== -1 ? lastPart + 1 : -1);
    if (variable === "}") {
      const [start, end] = bracketPairRangeReverse(part);
      aliases.push(removeColonAlias(content.slice(start, end))), content = content.slice(index2 + 3 + type2.length);
      continue;
    }
    for (;variable.charCodeAt(0) === 44; )
      variable = variable.slice(1);
    for (;variable.charCodeAt(0) === 9; )
      variable = variable.slice(1);
    variable.includes("(") || aliases.push(variable), content = content.slice(index2 + 3 + type2.length);
  }
  for (const alias of aliases) {
    if (alias.charCodeAt(0) === 123)
      continue;
    const deepAlias = findAlias(alias, body2);
    deepAlias.length > 0 && aliases.push(...deepAlias);
  }
  return aliases;
};
var extractMainParameter = (parameter) => {
  if (!parameter)
    return;
  if (parameter.charCodeAt(0) !== 123)
    return parameter;
  if (parameter = parameter.slice(2, -2), !parameter.includes(","))
    return parameter.indexOf("...") !== -1 ? parameter.slice(parameter.indexOf("...") + 3) : undefined;
  const spreadIndex = parameter.indexOf("...");
  if (spreadIndex !== -1)
    return parameter.slice(spreadIndex + 3).trimEnd();
};
var inferBodyReference = (code2, aliases, inference) => {
  const access = (type2, alias) => new RegExp(`${alias}\\.(${type2})|${alias}\\["${type2}"\\]|${alias}\\['${type2}'\\]`).test(code2);
  for (const alias of aliases)
    if (alias) {
      if (alias.charCodeAt(0) === 123) {
        const parameters = retrieveRootparameters(alias).parameters;
        parameters.query && (inference.query = true), parameters.headers && (inference.headers = true), parameters.body && (inference.body = true), parameters.cookie && (inference.cookie = true), parameters.set && (inference.set = true), parameters.server && (inference.server = true), parameters.url && (inference.url = true), parameters.route && (inference.route = true), parameters.path && (inference.path = true);
        continue;
      }
      if (!inference.query && (access("query", alias) || code2.includes("return " + alias) || code2.includes("return " + alias + ".query")) && (inference.query = true), !inference.headers && access("headers", alias) && (inference.headers = true), !inference.body && access("body", alias) && (inference.body = true), !inference.cookie && access("cookie", alias) && (inference.cookie = true), !inference.set && access("set", alias) && (inference.set = true), !inference.server && access("server", alias) && (inference.server = true), !inference.route && access("route", alias) && (inference.route = true), !inference.url && access("url", alias) && (inference.url = true), !inference.path && access("path", alias) && (inference.path = true), inference.query && inference.headers && inference.body && inference.cookie && inference.set && inference.server && inference.route && inference.url && inference.path)
        break;
    }
  return aliases;
};
var isContextPassToFunction = (context10, body2, inference) => {
  try {
    const captureFunction = new RegExp(`\\w\\((?:.*?)?${context10}(?:.*?)?\\)`, "gs"), exactParameter = new RegExp(`${context10}(,|\\))`, "gs"), length2 = body2.length;
    let fn3;
    for (fn3 = captureFunction.exec(body2) + "";captureFunction.lastIndex !== 0 && captureFunction.lastIndex < length2 + (fn3 ? fn3.length : 0); ) {
      if (fn3 && exactParameter.test(fn3))
        return inference.query = true, inference.headers = true, inference.body = true, inference.cookie = true, inference.set = true, inference.server = true, inference.url = true, inference.route = true, inference.path = true, true;
      fn3 = captureFunction.exec(body2) + "";
    }
    const nextChar = body2.charCodeAt(captureFunction.lastIndex);
    return nextChar === 41 || nextChar === 44 ? (inference.query = true, inference.headers = true, inference.body = true, inference.cookie = true, inference.set = true, inference.server = true, inference.url = true, inference.route = true, inference.path = true, true) : false;
  } catch {
    return console.log("[Sucrose] warning: unexpected isContextPassToFunction error, you may continue development as usual but please report the following to maintainers:"), console.log("--- body ---"), console.log(body2), console.log("--- context ---"), console.log(context10), true;
  }
};
var pendingGC;
var caches2 = {};
var clearSucroseCache = (delay) => {
  delay === null || isCloudflareWorker() || (delay === undefined && (delay = 4 * 60 * 1000 + 55 * 1000), pendingGC && clearTimeout(pendingGC), pendingGC = setTimeout(() => {
    caches2 = {}, pendingGC = undefined, isBun && Bun.gc(false);
  }, delay), pendingGC.unref?.());
};
var mergeInference = (a2, b5) => ({
  body: a2.body || b5.body,
  cookie: a2.cookie || b5.cookie,
  headers: a2.headers || b5.headers,
  query: a2.query || b5.query,
  set: a2.set || b5.set,
  server: a2.server || b5.server,
  url: a2.url || b5.url,
  route: a2.route || b5.route,
  path: a2.path || b5.path
});
var sucrose = (lifeCycle, inference = {
  query: false,
  headers: false,
  body: false,
  cookie: false,
  set: false,
  server: false,
  url: false,
  route: false,
  path: false
}, settings = {}) => {
  const events = [];
  lifeCycle.request?.length && events.push(...lifeCycle.request), lifeCycle.beforeHandle?.length && events.push(...lifeCycle.beforeHandle), lifeCycle.parse?.length && events.push(...lifeCycle.parse), lifeCycle.error?.length && events.push(...lifeCycle.error), lifeCycle.transform?.length && events.push(...lifeCycle.transform), lifeCycle.afterHandle?.length && events.push(...lifeCycle.afterHandle), lifeCycle.mapResponse?.length && events.push(...lifeCycle.mapResponse), lifeCycle.afterResponse?.length && events.push(...lifeCycle.afterResponse), lifeCycle.handler && typeof lifeCycle.handler == "function" && events.push(lifeCycle.handler);
  for (let i = 0;i < events.length; i++) {
    const e3 = events[i];
    if (!e3)
      continue;
    const event = typeof e3 == "object" ? e3.fn : e3;
    if (typeof event != "function")
      continue;
    const content = event.toString(), key = checksum(content), cachedInference = caches2[key];
    if (cachedInference) {
      inference = mergeInference(inference, cachedInference);
      continue;
    }
    clearSucroseCache(settings.gcTime);
    const fnInference = {
      query: false,
      headers: false,
      body: false,
      cookie: false,
      set: false,
      server: false,
      url: false,
      route: false,
      path: false
    }, [parameter, body2] = separateFunction(content), rootParameters = findParameterReference(parameter, fnInference), mainParameter = extractMainParameter(rootParameters);
    if (mainParameter) {
      const aliases = findAlias(mainParameter, body2.slice(1, -1));
      aliases.splice(0, -1, mainParameter);
      let code2 = body2;
      code2.charCodeAt(0) === 123 && code2.charCodeAt(body2.length - 1) === 125 && (code2 = code2.slice(1, -1).trim()), isContextPassToFunction(mainParameter, code2, fnInference) || inferBodyReference(code2, aliases, fnInference), !fnInference.query && code2.includes("return " + mainParameter + ".query") && (fnInference.query = true);
    }
    if (caches2[key] || (caches2[key] = fnInference), inference = mergeInference(inference, fnInference), inference.query && inference.headers && inference.body && inference.cookie && inference.set && inference.server && inference.url && inference.route && inference.path)
      break;
  }
  return inference;
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/cookies.mjs
var import_cookie2 = __toESM(require_dist4(), 1);
var import_fast_decode_uri_component = __toESM(require_fast_decode_uri_component(), 1);
var hashString = (str) => {
  let hash3 = 2166136261;
  const len = str.length;
  for (let i = 0;i < len; i++)
    hash3 ^= str.charCodeAt(i), hash3 = Math.imul(hash3, 16777619);
  return hash3 >>> 0;
};

class Cookie {
  constructor(name3, jar, initial = /* @__PURE__ */ Object.create(null)) {
    this.name = name3;
    this.jar = jar;
    this.initial = initial;
  }
  get cookie() {
    return this.jar[this.name] ?? this.initial;
  }
  set cookie(jar) {
    this.name in this.jar || (this.jar[this.name] = this.initial), this.jar[this.name] = jar, this.valueHash = undefined;
  }
  get setCookie() {
    return this.name in this.jar || (this.jar[this.name] = this.initial), this.jar[this.name];
  }
  set setCookie(jar) {
    this.cookie = jar;
  }
  get value() {
    return this.cookie.value;
  }
  set value(value) {
    const current = this.cookie.value;
    if (current !== value) {
      if (typeof current == "object" && current !== null && typeof value == "object" && value !== null)
        try {
          const valueStr = JSON.stringify(value), newHash = hashString(valueStr);
          if (this.valueHash !== undefined && this.valueHash !== newHash)
            this.valueHash = newHash;
          else {
            if (JSON.stringify(current) === valueStr) {
              this.valueHash = newHash;
              return;
            }
            this.valueHash = newHash;
          }
        } catch {}
      this.name in this.jar || (this.jar[this.name] = { ...this.initial }), this.jar[this.name].value = value;
    }
  }
  get expires() {
    return this.cookie.expires;
  }
  set expires(expires) {
    this.setCookie.expires = expires;
  }
  get maxAge() {
    return this.cookie.maxAge;
  }
  set maxAge(maxAge) {
    this.setCookie.maxAge = maxAge;
  }
  get domain() {
    return this.cookie.domain;
  }
  set domain(domain2) {
    this.setCookie.domain = domain2;
  }
  get path() {
    return this.cookie.path;
  }
  set path(path2) {
    this.setCookie.path = path2;
  }
  get secure() {
    return this.cookie.secure;
  }
  set secure(secure) {
    this.setCookie.secure = secure;
  }
  get httpOnly() {
    return this.cookie.httpOnly;
  }
  set httpOnly(httpOnly) {
    this.setCookie.httpOnly = httpOnly;
  }
  get sameSite() {
    return this.cookie.sameSite;
  }
  set sameSite(sameSite) {
    this.setCookie.sameSite = sameSite;
  }
  get priority() {
    return this.cookie.priority;
  }
  set priority(priority) {
    this.setCookie.priority = priority;
  }
  get partitioned() {
    return this.cookie.partitioned;
  }
  set partitioned(partitioned) {
    this.setCookie.partitioned = partitioned;
  }
  get secrets() {
    return this.cookie.secrets;
  }
  set secrets(secrets) {
    this.setCookie.secrets = secrets;
  }
  update(config2) {
    return this.setCookie = Object.assign(this.cookie, typeof config2 == "function" ? config2(this.cookie) : config2), this;
  }
  set(config2) {
    return this.setCookie = Object.assign({
      ...this.initial,
      value: this.value
    }, typeof config2 == "function" ? config2(this.cookie) : config2), this;
  }
  remove() {
    if (this.value !== undefined)
      return this.set({
        expires: /* @__PURE__ */ new Date(0),
        maxAge: 0,
        value: ""
      }), this;
  }
  toString() {
    return typeof this.value == "object" ? JSON.stringify(this.value) : this.value?.toString() ?? "";
  }
}
var createCookieJar = (set2, store, initial) => (set2.cookie || (set2.cookie = /* @__PURE__ */ Object.create(null)), new Proxy(store, {
  get(_6, key) {
    return key in store ? new Cookie(key, set2.cookie, Object.assign({}, initial ?? {}, store[key])) : new Cookie(key, set2.cookie, Object.assign({}, initial));
  }
}));
var parseCookie3 = async (set2, cookieString, {
  secrets,
  sign: sign2,
  ...initial
} = /* @__PURE__ */ Object.create(null)) => {
  if (!cookieString)
    return createCookieJar(set2, /* @__PURE__ */ Object.create(null), initial);
  const isStringKey = typeof secrets == "string";
  sign2 && sign2 !== true && !Array.isArray(sign2) && (sign2 = [sign2]);
  const jar = /* @__PURE__ */ Object.create(null), cookies = import_cookie2.parse(cookieString);
  for (const [name3, v5] of Object.entries(cookies)) {
    if (v5 === undefined || name3 === "__proto__" || name3 === "constructor" || name3 === "prototype")
      continue;
    let value = import_fast_decode_uri_component.default(v5);
    if (sign2 === true || sign2?.includes(name3)) {
      if (!secrets)
        throw new Error("No secret is provided to cookie plugin");
      if (isStringKey) {
        if (typeof value != "string")
          throw new InvalidCookieSignature(name3);
        const temp = await unsignCookie(value, secrets);
        if (temp === false)
          throw new InvalidCookieSignature(name3);
        value = temp;
      } else {
        let decoded = false;
        for (let i = 0;i < secrets.length; i++) {
          if (typeof value != "string")
            throw new InvalidCookieSignature(name3);
          const temp = await unsignCookie(value, secrets[i]);
          if (temp !== false) {
            decoded = true, value = temp;
            break;
          }
        }
        if (!decoded)
          throw new InvalidCookieSignature(name3);
      }
    }
    if (value) {
      const starts = value.charCodeAt(0), ends = value.charCodeAt(value.length - 1);
      if (starts === 123 && ends === 125 || starts === 91 && ends === 93)
        try {
          value = JSON.parse(value);
        } catch {}
    }
    jar[name3] = /* @__PURE__ */ Object.create(null), jar[name3].value = value;
  }
  return createCookieJar(set2, jar, initial);
};
var serializeCookie = (cookies) => {
  if (!cookies || !isNotEmpty(cookies))
    return;
  const set2 = [];
  for (const [key, property2] of Object.entries(cookies)) {
    if (!key || !property2)
      continue;
    const value = property2.value;
    value != null && set2.push(import_cookie2.serialize(key, typeof value == "object" ? JSON.stringify(value) : value + "", property2));
  }
  if (set2.length !== 0)
    return set2.length === 1 ? set2[0] : set2;
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/adapter/utils.mjs
var handleFile = (response, set2, request2) => {
  if (!isBun && response instanceof Promise)
    return response.then((res) => handleFile(res, set2, request2));
  const size = response.size, rangeHeader = request2?.headers.get("range");
  if (rangeHeader) {
    const match = /bytes=(\d*)-(\d*)/.exec(rangeHeader);
    if (match) {
      if (!match[1] && !match[2])
        return new Response(null, {
          status: 416,
          headers: mergeHeaders2(new Headers({ "content-range": `bytes */${size}` }), set2?.headers ?? {})
        });
      let start, end;
      if (!match[1] && match[2]) {
        const suffix = parseInt(match[2]);
        start = Math.max(0, size - suffix), end = size - 1;
      } else
        start = match[1] ? parseInt(match[1]) : 0, end = match[2] ? Math.min(parseInt(match[2]), size - 1) : size - 1;
      if (start >= size || start > end)
        return new Response(null, {
          status: 416,
          headers: mergeHeaders2(new Headers({ "content-range": `bytes */${size}` }), set2?.headers ?? {})
        });
      const contentLength = end - start + 1, rangeHeaders = new Headers({
        "accept-ranges": "bytes",
        "content-range": `bytes ${start}-${end}/${size}`,
        "content-length": String(contentLength)
      });
      return new Response(response.slice(start, end + 1, response.type), {
        status: 206,
        headers: mergeHeaders2(rangeHeaders, set2?.headers ?? {})
      });
    }
  }
  const immutable = set2 && (set2.status === 206 || set2.status === 304 || set2.status === 412 || set2.status === 416), defaultHeader = immutable ? {} : {
    "accept-ranges": "bytes",
    "content-range": size ? `bytes 0-${size - 1}/${size}` : undefined
  };
  if (!set2 && !size)
    return new Response(response);
  if (!set2)
    return new Response(response, {
      headers: defaultHeader
    });
  if (set2.headers instanceof Headers) {
    for (const key of Object.keys(defaultHeader))
      key in set2.headers && set2.headers.append(key, defaultHeader[key]);
    return immutable && (set2.headers.delete("content-length"), set2.headers.delete("accept-ranges")), new Response(response, set2);
  }
  return isNotEmpty(set2.headers) ? new Response(response, {
    status: set2.status,
    headers: Object.assign(defaultHeader, set2.headers)
  }) : new Response(response, {
    status: set2.status,
    headers: defaultHeader
  });
};
var parseSetCookies = (headers, setCookie2) => {
  if (!headers)
    return headers;
  headers.delete("set-cookie");
  for (let i = 0;i < setCookie2.length; i++) {
    const index2 = setCookie2[i].indexOf("=");
    headers.append("set-cookie", `${setCookie2[i].slice(0, index2)}=${setCookie2[i].slice(index2 + 1) || ""}`);
  }
  return headers;
};
var responseToSetHeaders = (response, set2) => {
  if (set2?.headers) {
    if (response)
      if (hasHeaderShorthand)
        Object.assign(set2.headers, response.headers.toJSON());
      else
        for (const [key, value] of response.headers.entries())
          key in set2.headers && (set2.headers[key] = value);
    return set2.status === 200 && (set2.status = response.status), set2.headers["content-encoding"] && delete set2.headers["content-encoding"], set2;
  }
  if (!response)
    return {
      headers: {},
      status: set2?.status ?? 200
    };
  if (hasHeaderShorthand)
    return set2 = {
      headers: response.headers.toJSON(),
      status: set2?.status ?? 200
    }, set2.headers["content-encoding"] && delete set2.headers["content-encoding"], set2;
  set2 = {
    headers: {},
    status: set2?.status ?? 200
  };
  for (const [key, value] of response.headers.entries())
    key !== "content-encoding" && key in set2.headers && (set2.headers[key] = value);
  return set2;
};
var enqueueBinaryChunk = (controller, chunk) => chunk instanceof Blob ? chunk.arrayBuffer().then((buffer) => (controller.enqueue(new Uint8Array(buffer)), true)) : chunk instanceof Uint8Array ? (controller.enqueue(chunk), true) : chunk instanceof ArrayBuffer ? (controller.enqueue(new Uint8Array(chunk)), true) : ArrayBuffer.isView(chunk) ? (controller.enqueue(new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength)), true) : false;
var createStreamHandler = ({ mapResponse, mapCompactResponse }) => async (generator, set2, request2, skipFormat) => {
  let init4 = generator.next?.();
  if (set2 && handleSet(set2), init4 instanceof Promise && (init4 = await init4), init4?.value instanceof ReadableStream)
    generator = init4.value;
  else if (init4 && (typeof init4?.done > "u" || init4?.done))
    return set2 ? mapResponse(init4.value, set2, request2) : mapCompactResponse(init4.value, request2);
  const isSSE = !skipFormat && (init4?.value?.sse ?? generator?.sse ?? set2?.headers["content-type"]?.startsWith("text/event-stream")), format = isSSE ? (data) => `data: ${data}

` : (data) => data, contentType = isSSE ? "text/event-stream" : init4?.value && typeof init4?.value == "object" ? "application/json" : "text/plain";
  set2?.headers ? (set2.headers["transfer-encoding"] || (set2.headers["transfer-encoding"] = "chunked"), set2.headers["content-type"] || (set2.headers["content-type"] = contentType), set2.headers["cache-control"] || (set2.headers["cache-control"] = "no-cache")) : set2 = {
    status: 200,
    headers: {
      "content-type": contentType,
      "transfer-encoding": "chunked",
      "cache-control": "no-cache",
      connection: "keep-alive"
    }
  };
  const iterator = typeof generator.next == "function" ? generator : generator[Symbol.asyncIterator]();
  let end = false;
  return new Response(new ReadableStream({
    start(controller) {
      if (request2?.signal?.addEventListener("abort", () => {
        end = true, iterator.return?.();
        try {
          controller.close();
        } catch {}
      }), !(!init4 || init4.value instanceof ReadableStream || init4.value === undefined || init4.value === null))
        if (init4.value.toSSE)
          controller.enqueue(init4.value.toSSE());
        else {
          if (enqueueBinaryChunk(controller, init4.value))
            return;
          if (typeof init4.value == "object")
            try {
              controller.enqueue(format(JSON.stringify(init4.value)));
            } catch {
              controller.enqueue(format(init4.value.toString()));
            }
          else
            controller.enqueue(format(init4.value.toString()));
        }
    },
    async pull(controller) {
      if (end) {
        try {
          controller.close();
        } catch {}
        return;
      }
      try {
        const { value: chunk, done } = await iterator.next();
        if (done || end) {
          try {
            controller.close();
          } catch {}
          return;
        }
        if (chunk == null)
          return;
        if (chunk.toSSE)
          controller.enqueue(chunk.toSSE());
        else {
          if (enqueueBinaryChunk(controller, chunk))
            return;
          if (typeof chunk == "object")
            try {
              controller.enqueue(format(JSON.stringify(chunk)));
            } catch {
              controller.enqueue(format(chunk.toString()));
            }
          else
            controller.enqueue(format(chunk.toString()));
        }
      } catch (error49) {
        console.warn(error49);
        try {
          controller.close();
        } catch {}
      }
    },
    cancel() {
      end = true, iterator.return?.();
    }
  }), set2);
};
async function* streamResponse(response) {
  const body2 = response.body;
  if (!body2)
    return;
  const reader = body2.getReader(), decoder2 = new TextDecoder;
  try {
    for (;; ) {
      const { done, value } = await reader.read();
      if (done)
        break;
      typeof value == "string" ? yield value : yield decoder2.decode(value);
    }
  } finally {
    reader.releaseLock();
  }
}
var handleSet = (set2) => {
  if (typeof set2.status == "string" && (set2.status = StatusMap[set2.status]), set2.cookie && isNotEmpty(set2.cookie)) {
    const cookie2 = serializeCookie(set2.cookie);
    cookie2 && (set2.headers["set-cookie"] = cookie2);
  }
  set2.headers["set-cookie"] && Array.isArray(set2.headers["set-cookie"]) && (set2.headers = parseSetCookies(new Headers(set2.headers), set2.headers["set-cookie"]));
};
function mergeHeaders2(responseHeaders, setHeaders) {
  const headers = new Headers(responseHeaders);
  if (setHeaders instanceof Headers)
    for (const key of setHeaders.keys())
      if (key === "set-cookie") {
        if (headers.has("set-cookie"))
          continue;
        for (const cookie2 of setHeaders.getSetCookie())
          headers.append("set-cookie", cookie2);
      } else
        responseHeaders.has(key) || headers.set(key, setHeaders?.get(key) ?? "");
  else
    for (const key in setHeaders)
      key === "set-cookie" ? headers.append(key, setHeaders[key]) : responseHeaders.has(key) || headers.set(key, setHeaders[key]);
  return headers;
}
function mergeStatus(responseStatus, setStatus) {
  return typeof setStatus == "string" && (setStatus = StatusMap[setStatus]), responseStatus === 200 ? setStatus : responseStatus;
}
var createResponseHandler = (handler2) => {
  const handleStream = createStreamHandler(handler2);
  return (response, set2, request2) => {
    const newResponse = new Response(response.body, {
      headers: mergeHeaders2(response.headers, set2.headers),
      status: mergeStatus(response.status, set2.status)
    });
    return !newResponse.headers.has("content-length") && newResponse.headers.get("transfer-encoding") === "chunked" ? handleStream(streamResponse(newResponse), responseToSetHeaders(newResponse, set2), request2, true) : newResponse;
  };
};
async function tee(source, branches = 2) {
  const buffer = [];
  let done = false, waiting = [];
  (async () => {
    for await (const value of source)
      buffer.push(value), waiting.forEach((w4) => w4.resolve()), waiting = [];
    done = true, waiting.forEach((w4) => w4.resolve());
  })();
  async function* makeIterator() {
    let i = 0;
    for (;; )
      if (i < buffer.length)
        yield buffer[i++];
      else {
        if (done)
          return;
        await new Promise((resolve3) => waiting.push({ resolve: resolve3 }));
      }
  }
  return Array.from({ length: branches }, makeIterator);
}

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/adapter/web-standard/handler.mjs
var handleElysiaFile = (file2, set2 = {
  headers: {}
}, request2) => {
  const path2 = file2.path, contentType = mime[path2.slice(path2.lastIndexOf(".") + 1)];
  return contentType && (set2.headers["content-type"] = contentType), file2.stats && set2.status !== 206 && set2.status !== 304 && set2.status !== 412 && set2.status !== 416 ? file2.stats.then((stat2) => {
    const size = stat2.size;
    return size !== undefined && (set2.headers["content-range"] = `bytes 0-${size - 1}/${size}`, set2.headers["content-length"] = size), handleFile(file2.value, set2, request2);
  }) : handleFile(file2.value, set2, request2);
};
var mapResponse = (response, set2, request2) => {
  if (isNotEmpty(set2.headers) || set2.status !== 200 || set2.cookie)
    switch (handleSet(set2), response?.constructor?.name) {
      case "String":
        return set2.headers["content-type"] || (set2.headers["content-type"] = "text/plain"), new Response(response, set2);
      case "Array":
      case "Object":
        return set2.headers["content-type"] || (set2.headers["content-type"] = "application/json"), new Response(JSON.stringify(response), set2);
      case "ElysiaFile":
        return handleElysiaFile(response, set2, request2);
      case "File":
        return handleFile(response, set2, request2);
      case "Blob":
        return handleFile(response, set2, request2);
      case "ElysiaCustomStatusResponse":
        return set2.status = response.code, mapResponse(response.response, set2, request2);
      case undefined:
        return response ? new Response(JSON.stringify(response), set2) : new Response("", set2);
      case "Response":
        return handleResponse(response, set2, request2);
      case "Error":
        return errorToResponse(response, set2);
      case "Promise":
        return response.then((x4) => mapResponse(x4, set2, request2));
      case "Function":
        return mapResponse(response(), set2, request2);
      case "Number":
      case "Boolean":
        return new Response(response.toString(), set2);
      case "Cookie":
        return response instanceof Cookie ? new Response(response.value, set2) : new Response(response?.toString(), set2);
      case "FormData":
        return new Response(response, set2);
      default:
        if (response instanceof Response)
          return handleResponse(response, set2, request2);
        if (response instanceof Promise)
          return response.then((x4) => mapResponse(x4, set2));
        if (response instanceof Error)
          return errorToResponse(response, set2);
        if (response instanceof ElysiaCustomStatusResponse)
          return set2.status = response.code, mapResponse(response.response, set2, request2);
        if (typeof response?.next == "function" || response instanceof ReadableStream)
          return handleStream(response, set2, request2);
        if (typeof response?.then == "function")
          return response.then((x4) => mapResponse(x4, set2));
        if (Array.isArray(response))
          return new Response(JSON.stringify(response), {
            headers: {
              "Content-Type": "application/json"
            }
          });
        if (typeof response?.toResponse == "function")
          return mapResponse(response.toResponse(), set2);
        if ("charCodeAt" in response) {
          const code2 = response.charCodeAt(0);
          if (code2 === 123 || code2 === 91)
            return set2.headers["Content-Type"] || (set2.headers["Content-Type"] = "application/json"), new Response(JSON.stringify(response), set2);
        }
        return new Response(response, set2);
    }
  return typeof response?.next == "function" || response instanceof ReadableStream ? handleStream(response, set2, request2) : mapCompactResponse(response, request2);
};
var mapEarlyResponse = (response, set2, request2) => {
  if (response != null)
    if (isNotEmpty(set2.headers) || set2.status !== 200 || set2.cookie)
      switch (handleSet(set2), response?.constructor?.name) {
        case "String":
          return set2.headers["content-type"] || (set2.headers["content-type"] = "text/plain"), new Response(response, set2);
        case "Array":
        case "Object":
          return set2.headers["content-type"] || (set2.headers["content-type"] = "application/json"), new Response(JSON.stringify(response), set2);
        case "ElysiaFile":
          return handleElysiaFile(response, set2, request2);
        case "File":
          return handleFile(response, set2, request2);
        case "Blob":
          return handleFile(response, set2, request2);
        case "ElysiaCustomStatusResponse":
          return set2.status = response.code, mapEarlyResponse(response.response, set2, request2);
        case undefined:
          return response ? new Response(JSON.stringify(response), set2) : undefined;
        case "Response":
          return handleResponse(response, set2, request2);
        case "Promise":
          return response.then((x4) => mapEarlyResponse(x4, set2));
        case "Error":
          return errorToResponse(response, set2);
        case "Function":
          return mapEarlyResponse(response(), set2);
        case "Number":
        case "Boolean":
          return new Response(response.toString(), set2);
        case "FormData":
          return new Response(response);
        case "Cookie":
          return response instanceof Cookie ? new Response(response.value, set2) : new Response(response?.toString(), set2);
        default:
          if (response instanceof Response)
            return handleResponse(response, set2, request2);
          if (response instanceof Promise)
            return response.then((x4) => mapEarlyResponse(x4, set2));
          if (response instanceof Error)
            return errorToResponse(response, set2);
          if (response instanceof ElysiaCustomStatusResponse)
            return set2.status = response.code, mapEarlyResponse(response.response, set2, request2);
          if (typeof response?.next == "function" || response instanceof ReadableStream)
            return handleStream(response, set2, request2);
          if (typeof response?.then == "function")
            return response.then((x4) => mapEarlyResponse(x4, set2));
          if (typeof response?.toResponse == "function")
            return mapEarlyResponse(response.toResponse(), set2);
          if (Array.isArray(response))
            return new Response(JSON.stringify(response), {
              headers: {
                "Content-Type": "application/json"
              }
            });
          if ("charCodeAt" in response) {
            const code2 = response.charCodeAt(0);
            if (code2 === 123 || code2 === 91)
              return set2.headers["Content-Type"] || (set2.headers["Content-Type"] = "application/json"), new Response(JSON.stringify(response), set2);
          }
          return new Response(response, set2);
      }
    else
      switch (response?.constructor?.name) {
        case "String":
          return set2.headers["content-type"] || (set2.headers["content-type"] = "text/plain"), new Response(response);
        case "Array":
        case "Object":
          return set2.headers["content-type"] || (set2.headers["content-type"] = "application/json"), new Response(JSON.stringify(response), set2);
        case "ElysiaFile":
          return handleElysiaFile(response, set2, request2);
        case "File":
          return handleFile(response, set2, request2);
        case "Blob":
          return handleFile(response, set2, request2);
        case "ElysiaCustomStatusResponse":
          return set2.status = response.code, mapEarlyResponse(response.response, set2, request2);
        case undefined:
          return response ? new Response(JSON.stringify(response), {
            headers: {
              "content-type": "application/json"
            }
          }) : new Response("");
        case "Response":
          return response;
        case "Promise":
          return response.then((x4) => {
            const r2 = mapEarlyResponse(x4, set2);
            if (r2 !== undefined)
              return r2;
          });
        case "Error":
          return errorToResponse(response, set2);
        case "Function":
          return mapCompactResponse(response(), request2);
        case "Number":
        case "Boolean":
          return new Response(response.toString());
        case "Cookie":
          return response instanceof Cookie ? new Response(response.value, set2) : new Response(response?.toString(), set2);
        case "FormData":
          return new Response(response);
        default:
          if (response instanceof Response)
            return response;
          if (response instanceof Promise)
            return response.then((x4) => mapEarlyResponse(x4, set2));
          if (response instanceof Error)
            return errorToResponse(response, set2);
          if (response instanceof ElysiaCustomStatusResponse)
            return set2.status = response.code, mapEarlyResponse(response.response, set2, request2);
          if (typeof response?.next == "function" || response instanceof ReadableStream)
            return handleStream(response, set2, request2);
          if (typeof response?.then == "function")
            return response.then((x4) => mapEarlyResponse(x4, set2));
          if (typeof response?.toResponse == "function")
            return mapEarlyResponse(response.toResponse(), set2);
          if (Array.isArray(response))
            return new Response(JSON.stringify(response), {
              headers: {
                "Content-Type": "application/json"
              }
            });
          if ("charCodeAt" in response) {
            const code2 = response.charCodeAt(0);
            if (code2 === 123 || code2 === 91)
              return set2.headers["Content-Type"] || (set2.headers["Content-Type"] = "application/json"), new Response(JSON.stringify(response), set2);
          }
          return new Response(response);
      }
};
var mapCompactResponse = (response, request2) => {
  switch (response?.constructor?.name) {
    case "String":
      return new Response(response, {
        headers: {
          "Content-Type": "text/plain"
        }
      });
    case "Object":
    case "Array":
      return new Response(JSON.stringify(response), {
        headers: {
          "Content-Type": "application/json"
        }
      });
    case "ElysiaFile":
      return handleElysiaFile(response, undefined, request2);
    case "File":
      return handleFile(response, undefined, request2);
    case "Blob":
      return handleFile(response, undefined, request2);
    case "ElysiaCustomStatusResponse":
      return mapResponse(response.response, {
        status: response.code,
        headers: {}
      });
    case undefined:
      return response ? new Response(JSON.stringify(response), {
        headers: {
          "content-type": "application/json"
        }
      }) : new Response("");
    case "Response":
      return response;
    case "Error":
      return errorToResponse(response);
    case "Promise":
      return response.then((x4) => mapCompactResponse(x4, request2));
    case "Function":
      return mapCompactResponse(response(), request2);
    case "Number":
    case "Boolean":
      return new Response(response.toString());
    case "FormData":
      return new Response(response);
    default:
      if (response instanceof Response)
        return response;
      if (response instanceof Promise)
        return response.then((x4) => mapCompactResponse(x4, request2));
      if (response instanceof Error)
        return errorToResponse(response);
      if (response instanceof ElysiaCustomStatusResponse)
        return mapResponse(response.response, {
          status: response.code,
          headers: {}
        });
      if (typeof response?.next == "function" || response instanceof ReadableStream)
        return handleStream(response, undefined, request2);
      if (typeof response?.then == "function")
        return response.then((x4) => mapCompactResponse(x4, request2));
      if (typeof response?.toResponse == "function")
        return mapCompactResponse(response.toResponse());
      if (Array.isArray(response))
        return new Response(JSON.stringify(response), {
          headers: {
            "Content-Type": "application/json"
          }
        });
      if ("charCodeAt" in response) {
        const code2 = response.charCodeAt(0);
        if (code2 === 123 || code2 === 91)
          return new Response(JSON.stringify(response), {
            headers: {
              "Content-Type": "application/json"
            }
          });
      }
      return new Response(response);
  }
};
var errorToResponse = (error49, set2) => {
  if (typeof error49?.toResponse == "function") {
    const raw = error49.toResponse(), targetSet = set2 ?? { headers: {}, status: 200, redirect: "" }, apply = (resolved) => (resolved instanceof Response && (targetSet.status = resolved.status), mapResponse(resolved, targetSet));
    return typeof raw?.then == "function" ? raw.then(apply) : apply(raw);
  }
  return new Response(JSON.stringify({
    name: error49?.name,
    message: error49?.message,
    cause: error49?.cause
  }), {
    status: set2?.status !== 200 ? set2?.status ?? 500 : 500,
    headers: set2?.headers
  });
};
var createStaticHandler = (handle, hooks, setHeaders = {}) => {
  if (typeof handle == "function")
    return;
  const response = mapResponse(handle, {
    headers: setHeaders
  });
  if (!hooks.parse?.length && !hooks.transform?.length && !hooks.beforeHandle?.length && !hooks.afterHandle?.length)
    return () => response.clone();
};
var handleResponse = createResponseHandler({
  mapResponse,
  mapCompactResponse
});
var handleStream = createStreamHandler({
  mapResponse,
  mapCompactResponse
});

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/adapter/web-standard/index.mjs
var WebStandardAdapter = {
  name: "web-standard",
  isWebStandard: true,
  handler: {
    mapResponse,
    mapEarlyResponse,
    mapCompactResponse,
    createStaticHandler
  },
  composeHandler: {
    mapResponseContext: "c.request",
    preferWebstandardHeaders: true,
    headers: `c.headers={}
for(const [k,v] of c.request.headers.entries())c.headers[k]=v
`,
    parser: {
      json(isOptional) {
        return isOptional ? `try{c.body=await c.request.json()}catch{}
` : `c.body=await c.request.json()
`;
      },
      text() {
        return `c.body=await c.request.text()
`;
      },
      urlencoded() {
        return `c.body=parseQuery(await c.request.text())
`;
      },
      arrayBuffer() {
        return `c.body=await c.request.arrayBuffer()
`;
      },
      formData(isOptional) {
        let fnLiteral = `
c.body={}
`;
        return isOptional ? fnLiteral += "let form;try{form=await c.request.formData()}catch{}" : fnLiteral += `const form=await c.request.formData()
`, fnLiteral + `const dangerousKeys=new Set(['__proto__','constructor','prototype'])
const isDangerousKey=(k)=>{if(dangerousKeys.has(k))return true;const m=k.match(/^(.+)\\[(\\d+)\\]$/);return m?dangerousKeys.has(m[1]):false}
const parseArrayKey=(k)=>{const m=k.match(/^(.+)\\[(\\d+)\\]$/);return m?{name:m[1],index:parseInt(m[2],10)}:null}
const grouped=new Map()
form.forEach((v,k)=>{const l=grouped.get(k);if(l)l.push(v);else grouped.set(k,[v])})
for(const [key,value] of grouped){if(c.body[key])continue
let finalValue
if(value.length===1){
const sv=value[0]
if(typeof sv==='string'&&(sv.charCodeAt(0)===123||sv.charCodeAt(0)===91)){
try{
const p=JSON.parse(sv)
if(p&&typeof p==='object')finalValue=p
}catch{}
}
if(finalValue===undefined)finalValue=sv
}else finalValue=value
if(Array.isArray(finalValue)){
const stringValue=finalValue.find((entry)=>typeof entry==='string')
const files=typeof File==='undefined'?[]:finalValue.filter((entry)=>entry instanceof File)
if(stringValue&&files.length&&stringValue.charCodeAt(0)===123){
try{
const parsed=JSON.parse(stringValue)
if(parsed&&typeof parsed==='object'&&!Array.isArray(parsed)){
if(!('file' in parsed)&&files.length===1)parsed.file=files[0]
else if(!('files' in parsed)&&files.length>1)parsed.files=files
finalValue=parsed
}
}catch{}
}
}
if(key.includes('.')||key.includes('[')){const keys=key.split('.')
const lastKey=keys.pop()
if(isDangerousKey(lastKey)||keys.some(isDangerousKey))continue
let current=c.body
for(const k of keys){const arrayInfo=parseArrayKey(k)
if(arrayInfo){if(!Array.isArray(current[arrayInfo.name]))current[arrayInfo.name]=[]
const existing=current[arrayInfo.name][arrayInfo.index]
const isFile=typeof File!=='undefined'&&existing instanceof File
if(!existing||typeof existing!=='object'||Array.isArray(existing)||isFile){
let parsed
if(typeof existing==='string'&&existing.charCodeAt(0)===123){
try{parsed=JSON.parse(existing)
if(!parsed||typeof parsed!=='object'||Array.isArray(parsed))parsed=undefined}catch{}
}
current[arrayInfo.name][arrayInfo.index]=parsed||{}
}
current=current[arrayInfo.name][arrayInfo.index]}else{if(!current[k]||typeof current[k]!=='object')current[k]={}
current=current[k]}}
const arrayInfo=parseArrayKey(lastKey)
if(arrayInfo){if(!Array.isArray(current[arrayInfo.name]))current[arrayInfo.name]=[]
current[arrayInfo.name][arrayInfo.index]=finalValue}else{current[lastKey]=finalValue}}else c.body[key]=finalValue}`;
      }
    }
  },
  async stop(app, closeActiveConnections) {
    if (!app.server)
      throw new Error("Elysia isn't running. Call `app.listen` to start the server.");
    if (app.server && (await app.server.stop(closeActiveConnections), app.server = null, app.event.stop?.length))
      for (let i = 0;i < app.event.stop.length; i++)
        app.event.stop[i].fn(app);
  },
  composeGeneralHandler: {
    parameters: "r",
    createContext(app) {
      let decoratorsLiteral = "", fnLiteral = "";
      const defaultHeaders = app.setHeaders;
      for (const key of Object.keys(app.decorator))
        decoratorsLiteral += `,'${key}':decorator['${key}']`;
      const standardHostname = app.config.handler?.standardHostname ?? true, hasTrace = !!app.event.trace?.length;
      return fnLiteral += `const u=r.url,s=u.indexOf('/',${standardHostname ? 11 : 7}),qi=u.indexOf('?',s+1),p=u.substring(s,qi===-1?undefined:qi)
`, hasTrace && (fnLiteral += `const id=randomId()
`), fnLiteral += "const c={request:r,store,qi,path:p,url:u,redirect,status,set:{headers:", fnLiteral += Object.keys(defaultHeaders ?? {}).length ? "Object.assign({},app.setHeaders)" : "Object.create(null)", fnLiteral += ",status:200}", app.inference.server && (fnLiteral += ",get server(){return app.getServer()}"), hasTrace && (fnLiteral += ",[ELYSIA_REQUEST_ID]:id"), fnLiteral += decoratorsLiteral, fnLiteral += `}
`, fnLiteral;
    },
    error404(hasEventHook, hasErrorHook, afterHandle = "") {
      let findDynamicRoute = "if(route===null){" + afterHandle + (hasErrorHook ? "" : "c.set.status=404") + `
return `;
      return hasErrorHook ? findDynamicRoute += `app.handleError(c,notFound,false,${this.parameters})` : findDynamicRoute += hasEventHook ? "c.response=c.responseValue=new Response(error404Message,{status:c.set.status===200?404:c.set.status,headers:c.set.headers})" : "c.response=c.responseValue=error404.clone()", findDynamicRoute += "}", {
        declare: hasErrorHook ? "" : `const error404Message=notFound.message.toString()
const error404=new Response(error404Message,{status:404})
`,
        code: findDynamicRoute
      };
    }
  },
  composeError: {
    mapResponseContext: "",
    validationError: "set.headers['content-type']='application/json';return mapResponse(error.message,set)",
    unknownError: "set.status=error.status??set.status??500;return mapResponse(error.message,set)"
  },
  listen() {
    return () => {
      throw new Error("WebStandard does not support listen, you might want to export default Elysia.fetch instead");
    };
  }
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/adapter/bun/handler.mjs
var mapResponse2 = (response, set2, request2) => {
  if (isNotEmpty(set2.headers) || set2.status !== 200 || set2.cookie)
    switch (handleSet(set2), response?.constructor?.name) {
      case "String":
        return new Response(response, set2);
      case "Array":
      case "Object":
        return Response.json(response, set2);
      case "ElysiaFile":
        return handleFile(response.value, set2, request2);
      case "File":
        return handleFile(response, set2, request2);
      case "Blob":
        return handleFile(response, set2, request2);
      case "ElysiaCustomStatusResponse":
        return set2.status = response.code, mapResponse2(response.response, set2, request2);
      case undefined:
        return response ? Response.json(response, set2) : new Response("", set2);
      case "Response":
        return handleResponse2(response, set2, request2);
      case "Error":
        return errorToResponse2(response, set2);
      case "Promise":
        return response.then((x4) => mapResponse2(x4, set2, request2));
      case "Function":
        return mapResponse2(response(), set2, request2);
      case "Number":
      case "Boolean":
        return new Response(response.toString(), set2);
      case "Cookie":
        return response instanceof Cookie ? new Response(response.value, set2) : new Response(response?.toString(), set2);
      case "FormData":
        return new Response(response, set2);
      default:
        if (response instanceof Response)
          return handleResponse2(response, set2, request2);
        if (response instanceof Promise)
          return response.then((x4) => mapResponse2(x4, set2));
        if (response instanceof Error)
          return errorToResponse2(response, set2);
        if (response instanceof ElysiaCustomStatusResponse)
          return set2.status = response.code, mapResponse2(response.response, set2, request2);
        if (typeof response?.next == "function" || response instanceof ReadableStream)
          return handleStream2(response, set2, request2);
        if (typeof response?.then == "function")
          return response.then((x4) => mapResponse2(x4, set2));
        if (Array.isArray(response))
          return Response.json(response);
        if (typeof response?.toResponse == "function")
          return mapResponse2(response.toResponse(), set2);
        if ("charCodeAt" in response) {
          const code2 = response.charCodeAt(0);
          if (code2 === 123 || code2 === 91)
            return Response.json(response, set2);
        }
        return new Response(response, set2);
    }
  return typeof response?.next == "function" || response instanceof ReadableStream ? handleStream2(response, set2, request2) : mapCompactResponse2(response, request2);
};
var mapEarlyResponse2 = (response, set2, request2) => {
  if (response != null)
    if (isNotEmpty(set2.headers) || set2.status !== 200 || set2.cookie)
      switch (handleSet(set2), response?.constructor?.name) {
        case "String":
          return new Response(response, set2);
        case "Array":
        case "Object":
          return Response.json(response, set2);
        case "ElysiaFile":
          return handleFile(response.value, set2, request2);
        case "File":
          return handleFile(response, set2, request2);
        case "Blob":
          return handleFile(response, set2, request2);
        case "ElysiaCustomStatusResponse":
          return set2.status = response.code, mapEarlyResponse2(response.response, set2, request2);
        case undefined:
          return response ? Response.json(response, set2) : undefined;
        case "Response":
          return handleResponse2(response, set2, request2);
        case "Promise":
          return response.then((x4) => mapEarlyResponse2(x4, set2));
        case "Error":
          return errorToResponse2(response, set2);
        case "Function":
          return mapEarlyResponse2(response(), set2);
        case "Number":
        case "Boolean":
          return new Response(response.toString(), set2);
        case "FormData":
          return new Response(response);
        case "Cookie":
          return response instanceof Cookie ? new Response(response.value, set2) : new Response(response?.toString(), set2);
        default:
          if (response instanceof Response)
            return handleResponse2(response, set2, request2);
          if (response instanceof Promise)
            return response.then((x4) => mapEarlyResponse2(x4, set2));
          if (response instanceof Error)
            return errorToResponse2(response, set2);
          if (response instanceof ElysiaCustomStatusResponse)
            return set2.status = response.code, mapEarlyResponse2(response.response, set2, request2);
          if (typeof response?.next == "function" || response instanceof ReadableStream)
            return handleStream2(response, set2, request2);
          if (typeof response?.then == "function")
            return response.then((x4) => mapEarlyResponse2(x4, set2));
          if (typeof response?.toResponse == "function")
            return mapEarlyResponse2(response.toResponse(), set2);
          if (Array.isArray(response))
            return Response.json(response);
          if ("charCodeAt" in response) {
            const code2 = response.charCodeAt(0);
            if (code2 === 123 || code2 === 91)
              return Response.json(response, set2);
          }
          return new Response(response, set2);
      }
    else
      switch (response?.constructor?.name) {
        case "String":
          return new Response(response);
        case "Array":
        case "Object":
          return Response.json(response, set2);
        case "ElysiaFile":
          return handleFile(response.value, set2, request2);
        case "File":
          return handleFile(response, set2, request2);
        case "Blob":
          return handleFile(response, set2, request2);
        case "ElysiaCustomStatusResponse":
          return set2.status = response.code, mapEarlyResponse2(response.response, set2, request2);
        case undefined:
          return response ? Response.json(response) : new Response("");
        case "Response":
          return response;
        case "Promise":
          return response.then((x4) => {
            const r2 = mapEarlyResponse2(x4, set2);
            if (r2 !== undefined)
              return r2;
          });
        case "Error":
          return errorToResponse2(response, set2);
        case "Function":
          return mapCompactResponse2(response(), request2);
        case "Number":
        case "Boolean":
          return new Response(response.toString());
        case "Cookie":
          return response instanceof Cookie ? new Response(response.value, set2) : new Response(response?.toString(), set2);
        case "FormData":
          return new Response(response);
        default:
          if (response instanceof Response)
            return response;
          if (response instanceof Promise)
            return response.then((x4) => mapEarlyResponse2(x4, set2));
          if (response instanceof Error)
            return errorToResponse2(response, set2);
          if (response instanceof ElysiaCustomStatusResponse)
            return set2.status = response.code, mapEarlyResponse2(response.response, set2, request2);
          if (typeof response?.next == "function" || response instanceof ReadableStream)
            return handleStream2(response, set2, request2);
          if (typeof response?.then == "function")
            return response.then((x4) => mapEarlyResponse2(x4, set2));
          if (typeof response?.toResponse == "function")
            return mapEarlyResponse2(response.toResponse(), set2);
          if (Array.isArray(response))
            return Response.json(response);
          if ("charCodeAt" in response) {
            const code2 = response.charCodeAt(0);
            if (code2 === 123 || code2 === 91)
              return Response.json(response, set2);
          }
          return new Response(response);
      }
};
var mapCompactResponse2 = (response, request2) => {
  switch (response?.constructor?.name) {
    case "String":
      return new Response(response);
    case "Object":
    case "Array":
      return Response.json(response);
    case "ElysiaFile":
      return handleFile(response.value, undefined, request2);
    case "File":
      return handleFile(response, undefined, request2);
    case "Blob":
      return handleFile(response, undefined, request2);
    case "ElysiaCustomStatusResponse":
      return mapResponse2(response.response, {
        status: response.code,
        headers: {}
      });
    case undefined:
      return response ? Response.json(response) : new Response("");
    case "Response":
      return response;
    case "Error":
      return errorToResponse2(response);
    case "Promise":
      return response.then((x4) => mapCompactResponse2(x4, request2));
    case "Function":
      return mapCompactResponse2(response(), request2);
    case "Number":
    case "Boolean":
      return new Response(response.toString());
    case "FormData":
      return new Response(response);
    default:
      if (response instanceof Response)
        return response;
      if (response instanceof Promise)
        return response.then((x4) => mapCompactResponse2(x4, request2));
      if (response instanceof Error)
        return errorToResponse2(response);
      if (response instanceof ElysiaCustomStatusResponse)
        return mapResponse2(response.response, {
          status: response.code,
          headers: {}
        });
      if (typeof response?.next == "function" || response instanceof ReadableStream)
        return handleStream2(response, undefined, request2);
      if (typeof response?.then == "function")
        return response.then((x4) => mapCompactResponse2(x4, request2));
      if (typeof response?.toResponse == "function")
        return mapCompactResponse2(response.toResponse());
      if (Array.isArray(response))
        return Response.json(response);
      if ("charCodeAt" in response) {
        const code2 = response.charCodeAt(0);
        if (code2 === 123 || code2 === 91)
          return Response.json(response);
      }
      return new Response(response);
  }
};
var errorToResponse2 = (error49, set2) => {
  if (typeof error49?.toResponse == "function") {
    const raw = error49.toResponse(), targetSet = set2 ?? { headers: {}, status: 200, redirect: "" }, apply = (resolved) => (resolved instanceof Response && (targetSet.status = resolved.status), mapResponse2(resolved, targetSet));
    return typeof raw?.then == "function" ? raw.then(apply) : apply(raw);
  }
  return Response.json({
    name: error49?.name,
    message: error49?.message,
    cause: error49?.cause
  }, {
    status: set2?.status !== 200 ? set2?.status ?? 500 : 500,
    headers: set2?.headers
  });
};
var createStaticHandler2 = (handle, hooks, setHeaders = {}) => {
  if (typeof handle == "function")
    return;
  const response = mapResponse2(handle, {
    headers: setHeaders
  });
  if (!hooks.parse?.length && !hooks.transform?.length && !hooks.beforeHandle?.length && !hooks.afterHandle?.length)
    return () => response.clone();
};
var handleResponse2 = createResponseHandler({
  mapResponse: mapResponse2,
  mapCompactResponse: mapCompactResponse2
});
var handleStream2 = createStreamHandler({
  mapResponse: mapResponse2,
  mapCompactResponse: mapCompactResponse2
});

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/compose.mjs
var import_fast_decode_uri_component3 = __toESM(require_fast_decode_uri_component(), 1);

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/parse-query.mjs
var import_fast_decode_uri_component2 = __toESM(require_fast_decode_uri_component(), 1);
var KEY_HAS_PLUS = 1;
var KEY_NEEDS_DECODE = 2;
var VALUE_HAS_PLUS = 4;
var VALUE_NEEDS_DECODE = 8;
function parseQueryFromURL(input, startIndex = 0, array2, object2) {
  const result = /* @__PURE__ */ Object.create(null);
  let flags = 0;
  const inputLength = input.length;
  let startingIndex = startIndex - 1, equalityIndex = startingIndex;
  for (let i = 0;i < inputLength; i++)
    switch (input.charCodeAt(i)) {
      case 38:
        processKeyValuePair(input, i), startingIndex = i, equalityIndex = i, flags = 0;
        break;
      case 61:
        equalityIndex <= startingIndex ? equalityIndex = i : flags |= VALUE_NEEDS_DECODE;
        break;
      case 43:
        equalityIndex > startingIndex ? flags |= VALUE_HAS_PLUS : flags |= KEY_HAS_PLUS;
        break;
      case 37:
        equalityIndex > startingIndex ? flags |= VALUE_NEEDS_DECODE : flags |= KEY_NEEDS_DECODE;
        break;
    }
  return startingIndex < inputLength && processKeyValuePair(input, inputLength), result;
  function processKeyValuePair(input2, endIndex) {
    const hasBothKeyValuePair = equalityIndex > startingIndex, effectiveEqualityIndex = hasBothKeyValuePair ? equalityIndex : endIndex, keySlice = input2.slice(startingIndex + 1, effectiveEqualityIndex);
    if (!hasBothKeyValuePair && keySlice.length === 0)
      return;
    let finalKey = keySlice;
    flags & KEY_HAS_PLUS && (finalKey = finalKey.replace(/\+/g, " ")), flags & KEY_NEEDS_DECODE && (finalKey = import_fast_decode_uri_component2.default(finalKey) || finalKey);
    let finalValue = "";
    if (hasBothKeyValuePair) {
      let valueSlice = input2.slice(equalityIndex + 1, endIndex);
      flags & VALUE_HAS_PLUS && (valueSlice = valueSlice.replace(/\+/g, " ")), flags & VALUE_NEEDS_DECODE && (valueSlice = import_fast_decode_uri_component2.default(valueSlice) || valueSlice), finalValue = valueSlice;
    }
    const currentValue = result[finalKey];
    array2 && array2?.[finalKey] ? finalValue.charCodeAt(0) === 91 ? (object2 && object2?.[finalKey] ? finalValue = JSON.parse(finalValue) : finalValue = finalValue.slice(1, -1).split(","), currentValue === undefined ? result[finalKey] = finalValue : Array.isArray(currentValue) ? currentValue.push(...finalValue) : (result[finalKey] = finalValue, result[finalKey].unshift(currentValue))) : currentValue === undefined ? result[finalKey] = finalValue : Array.isArray(currentValue) ? currentValue.push(finalValue) : result[finalKey] = [currentValue, finalValue] : result[finalKey] = finalValue;
  }
}
function parseQueryStandardSchema(input, startIndex = 0) {
  const result = /* @__PURE__ */ Object.create(null);
  let flags = 0;
  const inputLength = input.length;
  let startingIndex = startIndex - 1, equalityIndex = startingIndex;
  for (let i = 0;i < inputLength; i++)
    switch (input.charCodeAt(i)) {
      case 38:
        processKeyValuePair(input, i), startingIndex = i, equalityIndex = i, flags = 0;
        break;
      case 61:
        equalityIndex <= startingIndex ? equalityIndex = i : flags |= VALUE_NEEDS_DECODE;
        break;
      case 43:
        equalityIndex > startingIndex ? flags |= VALUE_HAS_PLUS : flags |= KEY_HAS_PLUS;
        break;
      case 37:
        equalityIndex > startingIndex ? flags |= VALUE_NEEDS_DECODE : flags |= KEY_NEEDS_DECODE;
        break;
    }
  return startingIndex < inputLength && processKeyValuePair(input, inputLength), result;
  function processKeyValuePair(input2, endIndex) {
    const hasBothKeyValuePair = equalityIndex > startingIndex, effectiveEqualityIndex = hasBothKeyValuePair ? equalityIndex : endIndex, keySlice = input2.slice(startingIndex + 1, effectiveEqualityIndex);
    if (!hasBothKeyValuePair && keySlice.length === 0)
      return;
    let finalKey = keySlice;
    flags & KEY_HAS_PLUS && (finalKey = finalKey.replace(/\+/g, " ")), flags & KEY_NEEDS_DECODE && (finalKey = import_fast_decode_uri_component2.default(finalKey) || finalKey);
    let finalValue = "";
    if (hasBothKeyValuePair) {
      let valueSlice = input2.slice(equalityIndex + 1, endIndex);
      flags & VALUE_HAS_PLUS && (valueSlice = valueSlice.replace(/\+/g, " ")), flags & VALUE_NEEDS_DECODE && (valueSlice = import_fast_decode_uri_component2.default(valueSlice) || valueSlice), finalValue = valueSlice;
    }
    const currentValue = result[finalKey];
    if (finalValue.charCodeAt(0) === 91 && finalValue.charCodeAt(finalValue.length - 1) === 93) {
      try {
        finalValue = JSON.parse(finalValue);
      } catch {}
      currentValue === undefined ? result[finalKey] = finalValue : Array.isArray(currentValue) ? currentValue.push(finalValue) : result[finalKey] = [currentValue, finalValue];
    } else if (finalValue.charCodeAt(0) === 123 && finalValue.charCodeAt(finalValue.length - 1) === 125) {
      try {
        finalValue = JSON.parse(finalValue);
      } catch {}
      currentValue === undefined ? result[finalKey] = finalValue : Array.isArray(currentValue) ? currentValue.push(finalValue) : result[finalKey] = [currentValue, finalValue];
    } else
      finalValue.includes(",") && (finalValue = finalValue.split(",")), currentValue === undefined ? result[finalKey] = finalValue : Array.isArray(currentValue) ? currentValue.push(finalValue) : result[finalKey] = [currentValue, finalValue];
  }
}
function parseQuery(input) {
  const result = /* @__PURE__ */ Object.create(null);
  let flags = 0;
  const inputLength = input.length;
  let startingIndex = -1, equalityIndex = -1;
  for (let i = 0;i < inputLength; i++)
    switch (input.charCodeAt(i)) {
      case 38:
        processKeyValuePair(input, i), startingIndex = i, equalityIndex = i, flags = 0;
        break;
      case 61:
        equalityIndex <= startingIndex ? equalityIndex = i : flags |= VALUE_NEEDS_DECODE;
        break;
      case 43:
        equalityIndex > startingIndex ? flags |= VALUE_HAS_PLUS : flags |= KEY_HAS_PLUS;
        break;
      case 37:
        equalityIndex > startingIndex ? flags |= VALUE_NEEDS_DECODE : flags |= KEY_NEEDS_DECODE;
        break;
    }
  return startingIndex < inputLength && processKeyValuePair(input, inputLength), result;
  function processKeyValuePair(input2, endIndex) {
    const hasBothKeyValuePair = equalityIndex > startingIndex, effectiveEqualityIndex = hasBothKeyValuePair ? equalityIndex : endIndex, keySlice = input2.slice(startingIndex + 1, effectiveEqualityIndex);
    if (!hasBothKeyValuePair && keySlice.length === 0)
      return;
    let finalKey = keySlice;
    flags & KEY_HAS_PLUS && (finalKey = finalKey.replace(/\+/g, " ")), flags & KEY_NEEDS_DECODE && (finalKey = import_fast_decode_uri_component2.default(finalKey) || finalKey);
    let finalValue = "";
    if (hasBothKeyValuePair) {
      let valueSlice = input2.slice(equalityIndex + 1, endIndex);
      flags & VALUE_HAS_PLUS && (valueSlice = valueSlice.replace(/\+/g, " ")), flags & VALUE_NEEDS_DECODE && (valueSlice = import_fast_decode_uri_component2.default(valueSlice) || valueSlice), finalValue = valueSlice;
    }
    const currentValue = result[finalKey];
    currentValue === undefined ? result[finalKey] = finalValue : Array.isArray(currentValue) ? currentValue.push(finalValue) : result[finalKey] = [currentValue, finalValue];
  }
}

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/trace.mjs
var ELYSIA_TRACE = Symbol("ElysiaTrace");
var createProcess = () => {
  const { promise: promise2, resolve: resolve3 } = Promise.withResolvers(), { promise: end, resolve: resolveEnd } = Promise.withResolvers(), { promise: error49, resolve: resolveError } = Promise.withResolvers(), callbacks = [], callbacksEnd = [];
  return [
    (callback) => (callback && callbacks.push(callback), promise2),
    (process4) => {
      const processes = [], resolvers = [];
      let groupError = null;
      for (let i = 0;i < (process4.total ?? 0); i++) {
        const { promise: promise22, resolve: resolve22 } = Promise.withResolvers(), { promise: end2, resolve: resolveEnd2 } = Promise.withResolvers(), { promise: error210, resolve: resolveError2 } = Promise.withResolvers(), callbacks2 = [], callbacksEnd2 = [];
        processes.push((callback) => (callback && callbacks2.push(callback), promise22)), resolvers.push((process22) => {
          const result2 = {
            ...process22,
            end: end2,
            error: error210,
            index: i,
            onStop(callback) {
              return callback && callbacksEnd2.push(callback), end2;
            }
          };
          resolve22(result2);
          for (let i2 = 0;i2 < callbacks2.length; i2++)
            callbacks2[i2](result2);
          return (error310 = null) => {
            const end3 = performance.now();
            error310 && (groupError = error310);
            const detail = {
              end: end3,
              error: error310,
              get elapsed() {
                return end3 - process22.begin;
              }
            };
            for (let i2 = 0;i2 < callbacksEnd2.length; i2++)
              callbacksEnd2[i2](detail);
            resolveEnd2(end3), resolveError2(error310);
          };
        });
      }
      const result = {
        ...process4,
        end,
        error: error49,
        onEvent(callback) {
          for (let i = 0;i < processes.length; i++)
            processes[i](callback);
        },
        onStop(callback) {
          return callback && callbacksEnd.push(callback), end;
        }
      };
      resolve3(result);
      for (let i = 0;i < callbacks.length; i++)
        callbacks[i](result);
      return {
        resolveChild: resolvers,
        resolve(error210 = null) {
          const end2 = performance.now();
          !error210 && groupError && (error210 = groupError);
          const detail = {
            end: end2,
            error: error210,
            get elapsed() {
              return end2 - process4.begin;
            }
          };
          for (let i = 0;i < callbacksEnd.length; i++)
            callbacksEnd[i](detail);
          resolveEnd(end2), resolveError(error210);
        }
      };
    }
  ];
};
var createTracer = (traceListener) => (context10) => {
  const [onRequest, resolveRequest] = createProcess(), [onParse, resolveParse] = createProcess(), [onTransform, resolveTransform] = createProcess(), [onBeforeHandle, resolveBeforeHandle] = createProcess(), [onHandle, resolveHandle] = createProcess(), [onAfterHandle, resolveAfterHandle] = createProcess(), [onError, resolveError] = createProcess(), [onMapResponse, resolveMapResponse] = createProcess(), [onAfterResponse, resolveAfterResponse] = createProcess();
  return traceListener({
    id: context10[ELYSIA_REQUEST_ID],
    context: context10,
    set: context10.set,
    onRequest,
    onParse,
    onTransform,
    onBeforeHandle,
    onHandle,
    onAfterHandle,
    onMapResponse,
    onAfterResponse,
    onError,
    time: Date.now(),
    store: context10.store
  }), {
    request: resolveRequest,
    parse: resolveParse,
    transform: resolveTransform,
    beforeHandle: resolveBeforeHandle,
    handle: resolveHandle,
    afterHandle: resolveAfterHandle,
    error: resolveError,
    mapResponse: resolveMapResponse,
    afterResponse: resolveAfterResponse
  };
};

// ../../node_modules/.pnpm/exact-mirror@0.2.5_@sinclair+typebox@0.34.45/node_modules/exact-mirror/dist/index.mjs
var Kind2 = Symbol.for("TypeBox.Kind");
var Hint2 = Symbol.for("TypeBox.Hint");
var isSpecialProperty = (name3) => /(\ |-|\t|\n|\.|\[|\]|\{|\})/.test(name3) || !isNaN(+name3[0]);
var joinProperty = (v1, v22, isOptional = false) => {
  if (typeof v22 === "number")
    return `${v1}[${v22}]`;
  if (isSpecialProperty(v22))
    return `${v1}${isOptional ? "?." : ""}["${v22}"]`;
  return `${v1}${isOptional ? "?" : ""}.${v22}`;
};
var encodeProperty = (v5) => isSpecialProperty(v5) ? `"${v5}"` : v5;
var sanitize = (key, sanitize2 = 0, schema) => {
  if (schema.type !== "string" || schema.const || schema.trusted)
    return key;
  let hof = "";
  for (let i = sanitize2 - 1;i >= 0; i--)
    hof += `d.h${i}(`;
  return hof + key + ")".repeat(sanitize2);
};
var mergeObjectIntersection = (schema) => {
  if (!schema.allOf || Kind2 in schema && (schema[Kind2] !== "Intersect" || schema.type !== "object"))
    return schema;
  const { allOf, ...newSchema } = schema;
  newSchema.properties = {};
  if (Kind2 in newSchema)
    newSchema[Kind2] = "Object";
  for (const type2 of allOf) {
    if (type2.type !== "object")
      continue;
    const { properties: properties2, required: required2, type: _6, [Kind2]: __, ...rest } = type2;
    if (required2)
      newSchema.required = newSchema.required ? newSchema.required.concat(required2) : required2;
    Object.assign(newSchema, rest);
    for (const property2 in type2.properties)
      newSchema.properties[property2] = mergeObjectIntersection(type2.properties[property2]);
  }
  return newSchema;
};
var handleRecord = (schema, property2, instruction) => {
  const child = schema.patternProperties["^(.*)$"] ?? schema.patternProperties[Object.keys(schema.patternProperties)[0]];
  if (!child)
    return property2;
  const i = instruction.array;
  instruction.array++;
  let v5 = `(()=>{const ar${i}s=Object.keys(${property2}),ar${i}v={};for(let i=0;i<ar${i}s.length;i++){const ar${i}p=${property2}[ar${i}s[i]];ar${i}v[ar${i}s[i]]=${mirror(child, `ar${i}p`, instruction)}`;
  const optionals = instruction.optionalsInArray[i + 1];
  if (optionals)
    for (let oi4 = 0;oi4 < optionals.length; oi4++) {
      const target = `ar${i}v[ar${i}s[i]]${optionals[oi4]}`;
      v5 += `;if(${target}===undefined)delete ${target}`;
    }
  v5 += `}return ar${i}v})()`;
  return v5;
};
var handleTuple = (schema, property2, instruction) => {
  const i = instruction.array;
  instruction.array++;
  const isRoot = property2 === "v" && !instruction.unions.length;
  let v5 = "";
  if (!isRoot)
    v5 = `(()=>{`;
  v5 += `const ar${i}v=[`;
  for (let i2 = 0;i2 < schema.length; i2++) {
    if (i2 !== 0)
      v5 += ",";
    v5 += mirror(schema[i2], joinProperty(property2, i2, instruction.parentIsOptional), instruction);
  }
  v5 += `];`;
  if (!isRoot)
    v5 += `return ar${i}v})()`;
  return v5;
};
function deepClone(source, weak = /* @__PURE__ */ new WeakMap) {
  if (source === null || typeof source !== "object" || typeof source === "function")
    return source;
  if (weak.has(source))
    return weak.get(source);
  if (Array.isArray(source)) {
    const copy = new Array(source.length);
    weak.set(source, copy);
    for (let i = 0;i < source.length; i++)
      copy[i] = deepClone(source[i], weak);
    return copy;
  }
  if (typeof source === "object") {
    const keys = Object.keys(source).concat(Object.getOwnPropertySymbols(source));
    const cloned = {};
    for (const key of keys)
      cloned[key] = deepClone(source[key], weak);
    return cloned;
  }
  return source;
}
var handleUnion = (schemas3, property2, instruction) => {
  if (instruction.TypeCompiler === undefined) {
    if (!instruction.typeCompilerWanred) {
      console.warn(new Error("[exact-mirror] TypeBox's TypeCompiler is required to use Union"));
      instruction.typeCompilerWanred = true;
    }
    return property2;
  }
  instruction.unionKeys[property2] = 1;
  const ui4 = instruction.unions.length;
  const typeChecks = instruction.unions[ui4] = [];
  let v5 = `(()=>{
`;
  const unwrapRef = (type2) => {
    if (!(Kind2 in type2) || !type2.$ref)
      return type2;
    if (type2[Kind2] === "This") {
      return deepClone(instruction.definitions[type2.$ref]);
    } else if (type2[Kind2] === "Ref") {
      if (!instruction.modules)
        console.warn(new Error("[exact-mirror] modules is required when using nested cyclic reference"));
      else
        return instruction.modules.Import(type2.$ref);
    }
    return type2;
  };
  let cleanThenCheck = "";
  for (let i = 0;i < schemas3.length; i++) {
    let type2 = unwrapRef(schemas3[i]);
    if (Array.isArray(type2.anyOf))
      for (let i2 = 0;i2 < type2.anyOf.length; i2++)
        type2.anyOf[i2] = unwrapRef(type2.anyOf[i2]);
    else if (type2.items) {
      if (Array.isArray(type2.items))
        for (let i2 = 0;i2 < type2.items.length; i2++)
          type2.items[i2] = unwrapRef(type2.items[i2]);
      else
        type2.items = unwrapRef(type2.items);
    }
    typeChecks.push(TypeCompiler.Compile(type2));
    v5 += `if(d.unions[${ui4}][${i}].Check(${property2})){return ${mirror(type2, property2, {
      ...instruction,
      recursion: instruction.recursion + 1,
      parentIsOptional: true
    })}}
`;
    cleanThenCheck += (i ? "" : "let ") + "tmp=" + mirror(type2, property2, {
      ...instruction,
      recursion: instruction.recursion + 1,
      parentIsOptional: true
    }) + `
if(d.unions[${ui4}][${i}].Check(tmp))return tmp
`;
  }
  if (cleanThenCheck)
    v5 += cleanThenCheck;
  v5 += `return ${instruction.removeUnknownUnionType ? "undefined" : property2}`;
  return v5 + `})()`;
};
var mirror = (schema, property2, instruction) => {
  if (!schema)
    return "";
  const isRoot = property2 === "v" && !instruction.unions.length;
  if (Kind2 in schema && schema[Kind2] === "Import" && schema.$ref in schema.$defs)
    return mirror(schema.$defs[schema.$ref], property2, {
      ...instruction,
      definitions: Object.assign(instruction.definitions, schema.$defs)
    });
  if (isRoot && schema.type !== "object" && schema.type !== "array" && !schema.anyOf)
    return `return ${sanitize("v", instruction.sanitize?.length, schema)}`;
  if (instruction.recursion >= instruction.recursionLimit)
    return property2;
  let v5 = "";
  if (schema.$id && Hint2 in schema)
    instruction.definitions[schema.$id] = schema;
  switch (schema.type) {
    case "object":
      if (schema[Kind2] === "Record") {
        v5 = handleRecord(schema, property2, instruction);
        break;
      }
      schema = mergeObjectIntersection(schema);
      v5 += "{";
      if (schema.additionalProperties)
        v5 += `...${property2},`;
      const keys = Object.keys(schema.properties);
      for (let i2 = 0;i2 < keys.length; i2++) {
        const key = keys[i2];
        let isOptional = !schema.required || schema.required && !schema.required.includes(key) || Array.isArray(schema.properties[key].anyOf);
        const name3 = joinProperty(property2, key, instruction.parentIsOptional);
        if (isOptional) {
          const index2 = instruction.array;
          if (property2.startsWith("ar")) {
            const dotIndex = name3.indexOf(".");
            let refName;
            if (dotIndex >= 0) {
              refName = name3.slice(dotIndex);
            } else {
              refName = name3.slice(property2.length);
            }
            if (refName.startsWith("?.")) {
              if (refName.charAt(2) === "[") {
                refName = refName.slice(2);
              } else {
                refName = refName.slice(1);
              }
            }
            const array2 = instruction.optionalsInArray;
            if (array2[index2])
              array2[index2].push(refName);
            else
              array2[index2] = [refName];
          } else {
            instruction.optionals.push(name3);
          }
        }
        const child = schema.properties[key];
        if (i2 !== 0)
          v5 += ",";
        v5 += `${encodeProperty(key)}:${isOptional ? `${name3}===undefined?undefined:` : ""}${mirror(child, name3, {
          ...instruction,
          recursion: instruction.recursion + 1,
          parentIsOptional: isOptional
        })}`;
      }
      v5 += "}";
      break;
    case "array":
      if (schema.items.type !== "object" && schema.items.type !== "array") {
        if (Array.isArray(schema.items)) {
          v5 = handleTuple(schema.items, property2, instruction);
          break;
        } else if (isRoot && !Array.isArray(schema.items.anyOf))
          return "return v";
        else if (Kind2 in schema.items && schema.items.$ref && (schema.items[Kind2] === "Ref" || schema.items[Kind2] === "This"))
          v5 = mirror(deepClone(instruction.definitions[schema.items.$ref]), property2, {
            ...instruction,
            parentIsOptional: true,
            recursion: instruction.recursion + 1
          });
        else if (!Array.isArray(schema.items.anyOf)) {
          v5 = property2;
          break;
        }
      }
      const i = instruction.array;
      instruction.array++;
      let reference = property2;
      if (isRoot)
        v5 = `const ar${i}v=new Array(${property2}.length);`;
      else {
        reference = `ar${i}s`;
        v5 = `((${reference})=>{const ar${i}v=new Array(${reference}.length);`;
      }
      v5 += `for(let i=0;i<${reference}.length;i++){const ar${i}p=${reference}[i];ar${i}v[i]=${mirror(schema.items, `ar${i}p`, instruction)}`;
      const optionals = instruction.optionalsInArray[i + 1];
      if (optionals) {
        for (let oi4 = 0;oi4 < optionals.length; oi4++) {
          const target = `ar${i}v[i]${optionals[oi4]}`;
          v5 += `;if(${target}===undefined)delete ${target}`;
        }
      }
      v5 += `}`;
      if (!isRoot)
        v5 += `return ar${i}v})(${property2})`;
      break;
    default:
      if (schema.$ref && schema.$ref in instruction.definitions)
        return mirror(instruction.definitions[schema.$ref], property2, instruction);
      if (Array.isArray(schema.anyOf)) {
        v5 = handleUnion(schema.anyOf, property2, instruction);
        break;
      }
      v5 = sanitize(property2, instruction.sanitize?.length, schema);
      break;
  }
  if (!isRoot)
    return v5;
  if (schema.type === "array") {
    v5 = `${v5}const x=ar0v;`;
  } else {
    v5 = `const x=${v5}
`;
  }
  for (let i = 0;i < instruction.optionals.length; i++) {
    const key = instruction.optionals[i];
    const prop = key.slice(1);
    v5 += `if(${key}===undefined`;
    if (instruction.unionKeys[key])
      v5 += `||x${prop}===undefined`;
    const shouldQuestion = prop.charCodeAt(0) !== 63 && schema.type !== "array";
    v5 += `)delete x${shouldQuestion ? prop.charCodeAt(0) === 91 ? "?." : "?" : ""}${prop}
`;
  }
  return `${v5}return x`;
};
var createMirror = (schema, {
  TypeCompiler: TypeCompiler2,
  modules,
  definitions,
  sanitize: sanitize2,
  recursionLimit = 8,
  removeUnknownUnionType = false
} = {}) => {
  const unions = [];
  if (typeof sanitize2 === "function")
    sanitize2 = [sanitize2];
  const f4 = mirror(schema, "v", {
    optionals: [],
    optionalsInArray: [],
    array: 0,
    parentIsOptional: false,
    unions,
    unionKeys: {},
    TypeCompiler: TypeCompiler2,
    modules,
    definitions: definitions ?? modules?.$defs ?? {},
    sanitize: sanitize2,
    recursion: 0,
    recursionLimit,
    removeUnknownUnionType
  });
  if (!unions.length && !sanitize2?.length)
    return Function("v", f4);
  let hof;
  if (sanitize2?.length) {
    hof = {};
    for (let i = 0;i < sanitize2.length; i++)
      hof[`h${i}`] = sanitize2[i];
  }
  return Function("d", `return function mirror(v){${f4}}`)({
    unions,
    ...hof
  });
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/replace-schema.mjs
var replaceSchemaTypeFromManyOptions = (schema, options2) => {
  if (Array.isArray(options2)) {
    let result = schema;
    for (const option2 of options2)
      result = replaceSchemaTypeFromOption(result, option2);
    return result;
  }
  return replaceSchemaTypeFromOption(schema, options2);
};
var replaceSchemaTypeFromOption = (schema, option2) => {
  if (option2.rootOnly && option2.excludeRoot)
    throw new Error("Can't set both rootOnly and excludeRoot");
  if (option2.rootOnly && option2.onlyFirst)
    throw new Error("Can't set both rootOnly and onlyFirst");
  if (option2.rootOnly && option2.untilObjectFound)
    throw new Error("Can't set both rootOnly and untilObjectFound");
  const walk2 = ({ s: s3, isRoot, treeLvl }) => {
    if (!s3)
      return s3;
    const skipRoot = isRoot && option2.excludeRoot, fromKind = option2.from[Kind];
    if (s3.elysiaMeta)
      return option2.from.elysiaMeta === s3.elysiaMeta && !skipRoot ? option2.to(s3) : s3;
    const shouldTransform = fromKind && s3[Kind] === fromKind;
    if (!skipRoot && option2.onlyFirst && s3.type === option2.onlyFirst || isRoot && option2.rootOnly)
      return shouldTransform ? option2.to(s3) : s3;
    if (!isRoot && option2.untilObjectFound && s3.type === "object")
      return s3;
    const newWalkInput = { isRoot: false, treeLvl: treeLvl + 1 }, withTransformedChildren = { ...s3 };
    if (s3.oneOf && (withTransformedChildren.oneOf = s3.oneOf.map((x4) => walk2({ ...newWalkInput, s: x4 }))), s3.anyOf && (withTransformedChildren.anyOf = s3.anyOf.map((x4) => walk2({ ...newWalkInput, s: x4 }))), s3.allOf && (withTransformedChildren.allOf = s3.allOf.map((x4) => walk2({ ...newWalkInput, s: x4 }))), s3.not && (withTransformedChildren.not = walk2({ ...newWalkInput, s: s3.not })), s3.properties) {
      withTransformedChildren.properties = {};
      for (const [k4, v5] of Object.entries(s3.properties))
        withTransformedChildren.properties[k4] = walk2({
          ...newWalkInput,
          s: v5
        });
    }
    if (s3.items) {
      const items = s3.items;
      withTransformedChildren.items = Array.isArray(items) ? items.map((x4) => walk2({ ...newWalkInput, s: x4 })) : walk2({ ...newWalkInput, s: items });
    }
    return !skipRoot && fromKind && withTransformedChildren[Kind] === fromKind ? option2.to(withTransformedChildren) : withTransformedChildren;
  };
  return walk2({ s: schema, isRoot: true, treeLvl: 0 });
};
var _stringToStructureCoercions;
var stringToStructureCoercions = () => (_stringToStructureCoercions || (_stringToStructureCoercions = [
  {
    from: t2.Object({}),
    to: (schema) => t2.ObjectString(schema.properties || {}, schema),
    excludeRoot: true
  },
  {
    from: t2.Array(t2.Any()),
    to: (schema) => t2.ArrayString(schema.items || t2.Any(), schema)
  }
]), _stringToStructureCoercions);
var _queryCoercions;
var queryCoercions = () => (_queryCoercions || (_queryCoercions = [
  {
    from: t2.Object({}),
    to: (schema) => t2.ObjectString(schema.properties ?? {}, schema),
    excludeRoot: true
  },
  {
    from: t2.Array(t2.Any()),
    to: (schema) => t2.ArrayQuery(schema.items ?? t2.Any(), schema)
  }
]), _queryCoercions);
var _coercePrimitiveRoot;
var coercePrimitiveRoot = () => (_coercePrimitiveRoot || (_coercePrimitiveRoot = [
  {
    from: t2.Number(),
    to: (schema) => t2.Numeric(schema),
    rootOnly: true
  },
  {
    from: t2.Boolean(),
    to: (schema) => t2.BooleanString(schema),
    rootOnly: true
  }
]), _coercePrimitiveRoot);
var _coerceFormData;
var coerceFormData = () => (_coerceFormData || (_coerceFormData = [
  {
    from: t2.Object({}),
    to: (schema) => t2.ObjectString(schema.properties ?? {}, schema),
    onlyFirst: "object",
    excludeRoot: true
  },
  {
    from: t2.Array(t2.Any()),
    to: (schema) => t2.ArrayString(schema.items ?? t2.Any(), schema),
    onlyFirst: "array",
    excludeRoot: true
  }
]), _coerceFormData);

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/schema.mjs
var isOptional = (schema) => schema ? schema?.[Kind] === "Import" && schema.References ? schema.References().some(isOptional) : (schema.schema && (schema = schema.schema), !!schema && (OptionalKind in schema)) : false;
var hasAdditionalProperties = (_schema) => {
  if (!_schema)
    return false;
  const schema = _schema?.schema ?? _schema;
  if (schema[Kind] === "Import" && _schema.References)
    return _schema.References().some(hasAdditionalProperties);
  if (schema.anyOf)
    return schema.anyOf.some(hasAdditionalProperties);
  if (schema.someOf)
    return schema.someOf.some(hasAdditionalProperties);
  if (schema.allOf)
    return schema.allOf.some(hasAdditionalProperties);
  if (schema.not)
    return schema.not.some(hasAdditionalProperties);
  if (schema.type === "object") {
    const properties2 = schema.properties;
    if ("additionalProperties" in schema)
      return schema.additionalProperties;
    if ("patternProperties" in schema)
      return false;
    for (const key of Object.keys(properties2)) {
      const property2 = properties2[key];
      if (property2.type === "object") {
        if (hasAdditionalProperties(property2))
          return true;
      } else if (property2.anyOf) {
        for (let i = 0;i < property2.anyOf.length; i++)
          if (hasAdditionalProperties(property2.anyOf[i]))
            return true;
      }
      return property2.additionalProperties;
    }
    return false;
  }
  return schema.type === "array" && schema.items && !Array.isArray(schema.items) ? hasAdditionalProperties(schema.items) : false;
};
var resolveSchema = (schema, models, modules) => {
  if (schema)
    return typeof schema != "string" ? schema : modules && (schema in modules.$defs) ? modules.Import(schema) : models?.[schema];
};
var hasType = (type2, schema) => {
  if (!schema)
    return false;
  if (Kind in schema && schema[Kind] === type2)
    return true;
  if (Kind in schema && schema[Kind] === "Import" && schema.$defs && schema.$ref) {
    const ref = schema.$ref.replace("#/$defs/", "");
    if (schema.$defs[ref])
      return hasType(type2, schema.$defs[ref]);
  }
  if (schema.anyOf)
    return schema.anyOf.some((s3) => hasType(type2, s3));
  if (schema.oneOf)
    return schema.oneOf.some((s3) => hasType(type2, s3));
  if (schema.allOf)
    return schema.allOf.some((s3) => hasType(type2, s3));
  if (schema.type === "array" && schema.items)
    return type2 === "Files" && Kind in schema.items && schema.items[Kind] === "File" ? true : hasType(type2, schema.items);
  if (schema.type === "object") {
    const properties2 = schema.properties;
    if (!properties2)
      return false;
    for (const key of Object.keys(properties2))
      if (hasType(type2, properties2[key]))
        return true;
  }
  return false;
};
var hasElysiaMeta = (meta3, _schema) => {
  if (!_schema)
    return false;
  const schema = _schema?.schema ?? _schema;
  if (schema.elysiaMeta === meta3)
    return true;
  if (schema[Kind] === "Import" && _schema.References)
    return _schema.References().some((schema2) => hasElysiaMeta(meta3, schema2));
  if (schema.anyOf)
    return schema.anyOf.some((schema2) => hasElysiaMeta(meta3, schema2));
  if (schema.someOf)
    return schema.someOf.some((schema2) => hasElysiaMeta(meta3, schema2));
  if (schema.allOf)
    return schema.allOf.some((schema2) => hasElysiaMeta(meta3, schema2));
  if (schema.not)
    return schema.not.some((schema2) => hasElysiaMeta(meta3, schema2));
  if (schema.type === "object") {
    const properties2 = schema.properties;
    if (!properties2)
      return false;
    for (const key of Object.keys(properties2)) {
      const property2 = properties2[key];
      if (property2.type === "object") {
        if (hasElysiaMeta(meta3, property2))
          return true;
      } else if (property2.anyOf) {
        for (let i = 0;i < property2.anyOf.length; i++)
          if (hasElysiaMeta(meta3, property2.anyOf[i]))
            return true;
      }
      return schema.elysiaMeta === meta3;
    }
    return false;
  }
  return schema.type === "array" && schema.items && !Array.isArray(schema.items) ? hasElysiaMeta(meta3, schema.items) : false;
};
var hasProperty = (expectedProperty, _schema) => {
  if (!_schema)
    return false;
  const schema = _schema.schema ?? _schema;
  if (schema[Kind] === "Import" && _schema.References)
    return _schema.References().some((schema2) => hasProperty(expectedProperty, schema2));
  if (schema.anyOf)
    return schema.anyOf.some((s3) => hasProperty(expectedProperty, s3));
  if (schema.allOf)
    return schema.allOf.some((s3) => hasProperty(expectedProperty, s3));
  if (schema.oneOf)
    return schema.oneOf.some((s3) => hasProperty(expectedProperty, s3));
  if (schema.type === "object") {
    const properties2 = schema.properties;
    if (!properties2)
      return false;
    for (const key of Object.keys(properties2)) {
      const property2 = properties2[key];
      if (expectedProperty in property2)
        return true;
      if (property2.type === "object") {
        if (hasProperty(expectedProperty, property2))
          return true;
      } else if (property2.anyOf) {
        for (let i = 0;i < property2.anyOf.length; i++)
          if (hasProperty(expectedProperty, property2.anyOf[i]))
            return true;
      }
    }
    return false;
  }
  return expectedProperty in schema;
};
var hasRef = (schema) => {
  if (!schema)
    return false;
  if (schema.oneOf) {
    for (let i = 0;i < schema.oneOf.length; i++)
      if (hasRef(schema.oneOf[i]))
        return true;
  }
  if (schema.anyOf) {
    for (let i = 0;i < schema.anyOf.length; i++)
      if (hasRef(schema.anyOf[i]))
        return true;
  }
  if (schema.oneOf) {
    for (let i = 0;i < schema.oneOf.length; i++)
      if (hasRef(schema.oneOf[i]))
        return true;
  }
  if (schema.allOf) {
    for (let i = 0;i < schema.allOf.length; i++)
      if (hasRef(schema.allOf[i]))
        return true;
  }
  if (schema.not && hasRef(schema.not))
    return true;
  if (schema.type === "object" && schema.properties) {
    const properties2 = schema.properties;
    for (const key of Object.keys(properties2)) {
      const property2 = properties2[key];
      if (hasRef(property2) || property2.type === "array" && property2.items && hasRef(property2.items))
        return true;
    }
  }
  return schema.type === "array" && schema.items && hasRef(schema.items) ? true : schema[Kind] === "Ref" && ("$ref" in schema);
};
var hasTransform = (schema) => {
  if (!schema)
    return false;
  if (schema.$ref && schema.$defs && schema.$ref in schema.$defs && hasTransform(schema.$defs[schema.$ref]))
    return true;
  if (schema.oneOf) {
    for (let i = 0;i < schema.oneOf.length; i++)
      if (hasTransform(schema.oneOf[i]))
        return true;
  }
  if (schema.anyOf) {
    for (let i = 0;i < schema.anyOf.length; i++)
      if (hasTransform(schema.anyOf[i]))
        return true;
  }
  if (schema.allOf) {
    for (let i = 0;i < schema.allOf.length; i++)
      if (hasTransform(schema.allOf[i]))
        return true;
  }
  if (schema.not && hasTransform(schema.not))
    return true;
  if (schema.type === "object" && schema.properties) {
    const properties2 = schema.properties;
    for (const key of Object.keys(properties2)) {
      const property2 = properties2[key];
      if (hasTransform(property2) || property2.type === "array" && property2.items && hasTransform(property2.items))
        return true;
    }
  }
  return schema.type === "array" && schema.items && hasTransform(schema.items) ? true : (TransformKind in schema);
};
var createCleaner = (schema) => (value) => {
  if (typeof value == "object")
    try {
      return exports_value2.Clean(schema, value);
    } catch {}
  return value;
};
var getSchemaValidator = (s3, {
  models = {},
  dynamic = false,
  modules,
  normalize: normalize4 = false,
  additionalProperties = false,
  forceAdditionalProperties = false,
  coerce = false,
  additionalCoerce = [],
  validators,
  sanitize: sanitize2
} = {}) => {
  if (validators = validators?.filter((x4) => x4), !s3) {
    if (!validators?.length)
      return;
    s3 = validators[0], validators = validators.slice(1);
  }
  let doesHaveRef;
  const replaceSchema = (schema2) => coerce ? replaceSchemaTypeFromManyOptions(schema2, [
    {
      from: t2.Number(),
      to: (options2) => t2.Numeric(options2),
      untilObjectFound: true
    },
    {
      from: t2.Boolean(),
      to: (options2) => t2.BooleanString(options2),
      untilObjectFound: true
    },
    ...Array.isArray(additionalCoerce) ? additionalCoerce : [additionalCoerce]
  ]) : replaceSchemaTypeFromManyOptions(schema2, additionalCoerce), mapSchema = (s22) => {
    if (s22 && typeof s22 != "string" && "~standard" in s22)
      return s22;
    if (!s22)
      return;
    let schema2;
    if (typeof s22 != "string")
      schema2 = s22;
    else if (schema2 = modules && s22 in modules.$defs ? modules.Import(s22) : models[s22], !schema2)
      return;
    const hasAdditionalCoerce = Array.isArray(additionalCoerce) ? additionalCoerce.length > 0 : !!additionalCoerce;
    if (Kind in schema2)
      if (schema2[Kind] === "Import")
        hasRef(schema2.$defs[schema2.$ref]) || (schema2 = schema2.$defs[schema2.$ref] ?? models[schema2.$ref], (coerce || hasAdditionalCoerce) && (schema2 = replaceSchema(schema2), ("$id" in schema2) && !schema2.$defs && (schema2.$id = `${schema2.$id}_coerced_${randomId()}`)));
      else if (hasRef(schema2)) {
        const id = randomId();
        schema2 = t2.Module({
          ...modules?.$defs,
          [id]: schema2
        }).Import(id);
      } else
        (coerce || hasAdditionalCoerce) && (schema2 = replaceSchema(schema2));
    return schema2;
  };
  let schema = mapSchema(s3), _validators = validators;
  if ("~standard" in schema || validators?.length && validators.some((x4) => x4 && typeof x4 != "string" && ("~standard" in x4))) {
    let Check22 = function(value, validated = false) {
      let v5 = validated ? value : mainCheck.validate(value);
      if (v5 instanceof Promise)
        return v5.then((v22) => Check22(v22, true));
      if (v5.issues)
        return v5;
      const values = [];
      return v5 && typeof v5 == "object" && values.push(v5.value), runCheckers2(value, 0, values, v5);
    }, runCheckers2 = function(value, startIndex, values, lastV) {
      for (let i = startIndex;i < checkers.length; i++) {
        let v5 = checkers[i].validate(value);
        if (v5 instanceof Promise)
          return v5.then((resolved) => {
            if (resolved.issues)
              return resolved;
            const nextValues = [...values];
            return resolved && typeof resolved == "object" && nextValues.push(resolved.value), runCheckers2(value, i + 1, nextValues, resolved);
          });
        if (v5.issues)
          return v5;
        v5 && typeof v5 == "object" && values.push(v5.value), lastV = v5;
      }
      return mergeValues22(values, lastV);
    }, mergeValues22 = function(values, lastV) {
      if (!values.length)
        return { value: lastV };
      if (values.length === 1)
        return { value: values[0] };
      if (values.length === 2)
        return { value: mergeDeep(values[0], values[1]) };
      let newValue = mergeDeep(values[0], values[1]);
      for (let i = 2;i < values.length; i++)
        newValue = mergeDeep(newValue, values[i]);
      return { value: newValue };
    };
    var Check2 = Check22, runCheckers = runCheckers2, mergeValues2 = mergeValues22;
    const typeboxSubValidator = (schema2) => {
      let mirror2;
      if (normalize4 === true || normalize4 === "exactMirror")
        try {
          mirror2 = createMirror(schema2, {
            TypeCompiler,
            sanitize: sanitize2?.(),
            modules
          });
        } catch {
          console.warn("Failed to create exactMirror. Please report the following code to https://github.com/elysiajs/elysia/issues"), console.warn(schema2), mirror2 = createCleaner(schema2);
        }
      const vali = getSchemaValidator(schema2, {
        models,
        modules,
        dynamic,
        normalize: normalize4,
        additionalProperties: true,
        forceAdditionalProperties: true,
        coerce,
        additionalCoerce
      });
      return vali.Decode = mirror2, {
        validate: (v5) => vali.Check(v5) ? {
          value: mirror2 ? mirror2(v5) : v5
        } : {
          issues: [...vali.Errors(v5)]
        }
      };
    }, mainCheck = schema["~standard"] ? schema["~standard"] : typeboxSubValidator(schema);
    let checkers = [];
    if (validators?.length) {
      for (const validator2 of validators)
        if (validator2 && typeof validator2 != "string") {
          if (validator2?.["~standard"]) {
            checkers.push(validator2["~standard"]);
            continue;
          }
          if (Kind in validator2) {
            checkers.push(typeboxSubValidator(validator2));
            continue;
          }
        }
    }
    const validator = {
      provider: "standard",
      schema,
      references: "",
      checkFunc: () => {},
      code: "",
      Check: Check22,
      Errors: (value) => Check22(value)?.then?.((x4) => x4?.issues),
      Code: () => "",
      Decode: Check22,
      Encode: (value) => value,
      hasAdditionalProperties: false,
      hasDefault: false,
      isOptional: false,
      hasTransform: false,
      hasRef: false
    };
    return validator.parse = (v5) => {
      try {
        return validator.Decode(validator.Clean?.(v5) ?? v5);
      } catch {
        throw [...validator.Errors(v5)].map(mapValueError);
      }
    }, validator.safeParse = (v5) => {
      try {
        return {
          success: true,
          data: validator.Decode(validator.Clean?.(v5) ?? v5),
          error: null
        };
      } catch {
        const errors4 = [...compiled.Errors(v5)].map(mapValueError);
        return {
          success: false,
          data: null,
          error: errors4[0]?.summary,
          errors: errors4
        };
      }
    }, validator;
  } else if (validators?.length) {
    let hasAdditional = false;
    const validators2 = _validators, { schema: mergedObjectSchema, notObjects } = mergeObjectSchemas([
      schema,
      ...validators2.map(mapSchema)
    ]);
    notObjects && (schema = t2.Intersect([
      ...mergedObjectSchema ? [mergedObjectSchema] : [],
      ...notObjects.map((x4) => {
        const schema2 = mapSchema(x4);
        return schema2.type === "object" && "additionalProperties" in schema2 && (!hasAdditional && schema2.additionalProperties === false && (hasAdditional = true), delete schema2.additionalProperties), schema2;
      })
    ]), schema.type === "object" && hasAdditional && (schema.additionalProperties = false));
  } else
    schema.type === "object" && (!("additionalProperties" in schema) || forceAdditionalProperties) ? schema.additionalProperties = additionalProperties : schema = replaceSchemaTypeFromManyOptions(schema, {
      onlyFirst: "object",
      from: t2.Object({}),
      to(schema2) {
        return !schema2.properties || "additionalProperties" in schema2 ? schema2 : t2.Object(schema2.properties, {
          ...schema2,
          additionalProperties: false
        });
      }
    });
  if (dynamic)
    if (Kind in schema) {
      const validator = {
        provider: "typebox",
        schema,
        references: "",
        checkFunc: () => {},
        code: "",
        Check: (value) => exports_value2.Check(schema, value),
        Errors: (value) => exports_value2.Errors(schema, value),
        Code: () => "",
        Clean: createCleaner(schema),
        Decode: (value) => exports_value2.Decode(schema, value),
        Encode: (value) => exports_value2.Encode(schema, value),
        get hasAdditionalProperties() {
          return "~hasAdditionalProperties" in this ? this["~hasAdditionalProperties"] : this["~hasAdditionalProperties"] = hasAdditionalProperties(schema);
        },
        get hasDefault() {
          return "~hasDefault" in this ? this["~hasDefault"] : this["~hasDefault"] = hasProperty("default", schema);
        },
        get isOptional() {
          return "~isOptional" in this ? this["~isOptional"] : this["~isOptional"] = isOptional(schema);
        },
        get hasTransform() {
          return "~hasTransform" in this ? this["~hasTransform"] : this["~hasTransform"] = hasTransform(schema);
        },
        "~hasRef": doesHaveRef,
        get hasRef() {
          return "~hasRef" in this ? this["~hasRef"] : this["~hasRef"] = hasTransform(schema);
        }
      };
      if (schema.config && (validator.config = schema.config, validator?.schema?.config && delete validator.schema.config), normalize4 && schema.additionalProperties === false)
        if (normalize4 === true || normalize4 === "exactMirror")
          try {
            validator.Clean = createMirror(schema, {
              TypeCompiler,
              sanitize: sanitize2?.(),
              modules
            });
          } catch {
            console.warn("Failed to create exactMirror. Please report the following code to https://github.com/elysiajs/elysia/issues"), console.warn(schema), validator.Clean = createCleaner(schema);
          }
        else
          validator.Clean = createCleaner(schema);
      return validator.parse = (v5) => {
        try {
          return validator.Decode(validator.Clean?.(v5) ?? v5);
        } catch {
          throw [...validator.Errors(v5)].map(mapValueError);
        }
      }, validator.safeParse = (v5) => {
        try {
          return {
            success: true,
            data: validator.Decode(validator.Clean?.(v5) ?? v5),
            error: null
          };
        } catch {
          const errors4 = [...compiled.Errors(v5)].map(mapValueError);
          return {
            success: false,
            data: null,
            error: errors4[0]?.summary,
            errors: errors4
          };
        }
      }, validator;
    } else {
      const validator = {
        provider: "standard",
        schema,
        references: "",
        checkFunc: () => {},
        code: "",
        Check: (v5) => schema["~standard"].validate(v5),
        Errors(value) {
          const response = schema["~standard"].validate(value);
          if (response instanceof Promise)
            throw Error("Async validation is not supported in non-dynamic schema");
          return response.issues;
        },
        Code: () => "",
        Decode(value) {
          const response = schema["~standard"].validate(value);
          if (response instanceof Promise)
            throw Error("Async validation is not supported in non-dynamic schema");
          return response;
        },
        Encode: (value) => value,
        hasAdditionalProperties: false,
        hasDefault: false,
        isOptional: false,
        hasTransform: false,
        hasRef: false
      };
      return validator.parse = (v5) => {
        try {
          return validator.Decode(validator.Clean?.(v5) ?? v5);
        } catch {
          throw [...validator.Errors(v5)].map(mapValueError);
        }
      }, validator.safeParse = (v5) => {
        try {
          return {
            success: true,
            data: validator.Decode(validator.Clean?.(v5) ?? v5),
            error: null
          };
        } catch {
          const errors4 = [...compiled.Errors(v5)].map(mapValueError);
          return {
            success: false,
            data: null,
            error: errors4[0]?.summary,
            errors: errors4
          };
        }
      }, validator;
    }
  let compiled;
  if (Kind in schema)
    if (compiled = TypeCompiler.Compile(schema, Object.values(models).filter((x4) => (Kind in x4))), compiled.provider = "typebox", schema.config && (compiled.config = schema.config, compiled?.schema?.config && delete compiled.schema.config), normalize4 === true || normalize4 === "exactMirror")
      try {
        compiled.Clean = createMirror(schema, {
          TypeCompiler,
          sanitize: sanitize2?.(),
          modules
        });
      } catch {
        console.warn("Failed to create exactMirror. Please report the following code to https://github.com/elysiajs/elysia/issues"), console.dir(schema, {
          depth: null
        }), compiled.Clean = createCleaner(schema);
      }
    else
      normalize4 === "typebox" && (compiled.Clean = createCleaner(schema));
  else
    compiled = {
      provider: "standard",
      schema,
      references: "",
      checkFunc(value) {
        const response = schema["~standard"].validate(value);
        if (response instanceof Promise)
          throw Error("Async validation is not supported in non-dynamic schema");
        return response;
      },
      code: "",
      Check: (v5) => schema["~standard"].validate(v5),
      Errors(value) {
        const response = schema["~standard"].validate(value);
        if (response instanceof Promise)
          throw Error("Async validation is not supported in non-dynamic schema");
        return response.issues;
      },
      Code: () => "",
      Decode(value) {
        const response = schema["~standard"].validate(value);
        if (response instanceof Promise)
          throw Error("Async validation is not supported in non-dynamic schema");
        return response;
      },
      Encode: (value) => value,
      hasAdditionalProperties: false,
      hasDefault: false,
      isOptional: false,
      hasTransform: false,
      hasRef: false
    };
  return compiled.parse = (v5) => {
    try {
      return compiled.Decode(compiled.Clean?.(v5) ?? v5);
    } catch {
      throw [...compiled.Errors(v5)].map(mapValueError);
    }
  }, compiled.safeParse = (v5) => {
    try {
      return {
        success: true,
        data: compiled.Decode(compiled.Clean?.(v5) ?? v5),
        error: null
      };
    } catch {
      const errors4 = [...compiled.Errors(v5)].map(mapValueError);
      return {
        success: false,
        data: null,
        error: errors4[0]?.summary,
        errors: errors4
      };
    }
  }, Kind in schema && Object.assign(compiled, {
    get hasAdditionalProperties() {
      return "~hasAdditionalProperties" in this ? this["~hasAdditionalProperties"] : this["~hasAdditionalProperties"] = hasAdditionalProperties(compiled);
    },
    get hasDefault() {
      return "~hasDefault" in this ? this["~hasDefault"] : this["~hasDefault"] = hasProperty("default", compiled);
    },
    get isOptional() {
      return "~isOptional" in this ? this["~isOptional"] : this["~isOptional"] = isOptional(compiled);
    },
    get hasTransform() {
      return "~hasTransform" in this ? this["~hasTransform"] : this["~hasTransform"] = hasTransform(schema);
    },
    get hasRef() {
      return "~hasRef" in this ? this["~hasRef"] : this["~hasRef"] = hasRef(schema);
    },
    "~hasRef": doesHaveRef
  }), compiled;
};
var isUnion = (schema) => schema[Kind] === "Union" || !schema.schema && !!schema.anyOf;
var getSchemaProperties = (schema) => {
  if (!schema)
    return;
  if (schema.properties)
    return schema.properties;
  const members = schema.allOf ?? schema.anyOf ?? schema.oneOf;
  if (members) {
    const result = {};
    for (const member2 of members) {
      const props = getSchemaProperties(member2);
      props && Object.assign(result, props);
    }
    return Object.keys(result).length > 0 ? result : undefined;
  }
};
var mergeObjectSchemas = (schemas3) => {
  if (schemas3.length === 0)
    return {
      schema: undefined,
      notObjects: []
    };
  if (schemas3.length === 1)
    return schemas3[0].type === "object" ? {
      schema: schemas3[0],
      notObjects: []
    } : {
      schema: undefined,
      notObjects: schemas3
    };
  let newSchema;
  const notObjects = [];
  let additionalPropertiesIsTrue = false, additionalPropertiesIsFalse = false;
  for (const schema of schemas3) {
    if (schema.type !== "object") {
      notObjects.push(schema);
      continue;
    }
    if ("additionalProperties" in schema && (schema.additionalProperties === true ? additionalPropertiesIsTrue = true : schema.additionalProperties === false && (additionalPropertiesIsFalse = true)), !newSchema) {
      newSchema = schema;
      continue;
    }
    newSchema = {
      ...newSchema,
      ...schema,
      properties: {
        ...newSchema.properties,
        ...schema.properties
      },
      required: [
        ...newSchema?.required ?? [],
        ...schema.required ?? []
      ]
    };
  }
  return newSchema && (newSchema.required && (newSchema.required = [...new Set(newSchema.required)]), additionalPropertiesIsFalse ? newSchema.additionalProperties = false : additionalPropertiesIsTrue && (newSchema.additionalProperties = true)), {
    schema: newSchema,
    notObjects
  };
};
var getResponseSchemaValidator = (s3, {
  models = {},
  modules,
  dynamic = false,
  normalize: normalize4 = false,
  additionalProperties = false,
  validators = [],
  sanitize: sanitize2
}) => {
  if (validators = validators.filter((x4) => x4), !s3) {
    if (!validators?.length)
      return;
    s3 = validators[0], validators = validators.slice(1);
  }
  let maybeSchemaOrRecord;
  if (typeof s3 != "string")
    maybeSchemaOrRecord = s3;
  else if (maybeSchemaOrRecord = modules && s3 in modules.$defs ? modules.Import(s3) : models[s3], !maybeSchemaOrRecord)
    return;
  if (!maybeSchemaOrRecord)
    return;
  if (Kind in maybeSchemaOrRecord || "~standard" in maybeSchemaOrRecord)
    return {
      200: getSchemaValidator(maybeSchemaOrRecord, {
        modules,
        models,
        additionalProperties,
        dynamic,
        normalize: normalize4,
        coerce: false,
        additionalCoerce: [],
        validators: validators.map((x4) => x4[200]),
        sanitize: sanitize2
      })
    };
  const record2 = {};
  return Object.keys(maybeSchemaOrRecord).forEach((status2) => {
    if (isNaN(+status2))
      return;
    const maybeNameOrSchema = maybeSchemaOrRecord[+status2];
    if (typeof maybeNameOrSchema == "string") {
      if (maybeNameOrSchema in models) {
        const schema = models[maybeNameOrSchema];
        if (!schema)
          return;
        record2[+status2] = Kind in schema || "~standard" in schema ? getSchemaValidator(schema, {
          modules,
          models,
          additionalProperties,
          dynamic,
          normalize: normalize4,
          coerce: false,
          additionalCoerce: [],
          validators: validators.map((x4) => x4[+status2]),
          sanitize: sanitize2
        }) : schema;
      }
      return;
    }
    record2[+status2] = Kind in maybeNameOrSchema || "~standard" in maybeNameOrSchema ? getSchemaValidator(maybeNameOrSchema, {
      modules,
      models,
      additionalProperties,
      dynamic,
      normalize: normalize4,
      coerce: false,
      additionalCoerce: [],
      validators: validators.map((x4) => x4[+status2]),
      sanitize: sanitize2
    }) : maybeNameOrSchema;
  }), record2;
};
var getCookieValidator = ({
  validator,
  modules,
  defaultConfig = {},
  config: config2,
  dynamic,
  normalize: normalize4 = false,
  models,
  validators,
  sanitize: sanitize2
}) => {
  let cookieValidator = validator?.provider ? validator : getSchemaValidator(validator, {
    modules,
    dynamic,
    models,
    normalize: normalize4,
    additionalProperties: true,
    coerce: true,
    additionalCoerce: stringToStructureCoercions(),
    validators,
    sanitize: sanitize2
  });
  return cookieValidator ? cookieValidator.config = mergeCookie(cookieValidator.config, config2) : (cookieValidator = getSchemaValidator(t2.Cookie(t2.Any()), {
    modules,
    dynamic,
    models,
    additionalProperties: true,
    validators,
    sanitize: sanitize2
  }), cookieValidator.config = defaultConfig), cookieValidator;
};
var unwrapImportSchema = (schema) => schema && schema[Kind] === "Import" && schema.$defs[schema.$ref][Kind] === "Object" ? schema.$defs[schema.$ref] : schema;

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/compose.mjs
var allocateIf = (value, condition) => condition ? value : "";
var defaultParsers = [
  "json",
  "text",
  "urlencoded",
  "arrayBuffer",
  "formdata",
  "application/json",
  "text/plain",
  "application/x-www-form-urlencoded",
  "application/octet-stream",
  "multipart/form-data"
];
var createReport = ({
  context: context10 = "c",
  trace: trace8 = [],
  addFn
}) => {
  if (!trace8.length)
    return () => ({
      resolveChild() {
        return () => {};
      },
      resolve() {}
    });
  for (let i = 0;i < trace8.length; i++)
    addFn(`let report${i},reportChild${i},reportErr${i},reportErrChild${i};let trace${i}=${context10}[ELYSIA_TRACE]?.[${i}]??trace[${i}](${context10});
`);
  return (event, {
    name: name3,
    total = 0,
    alias
  } = {}) => {
    name3 || (name3 = "anonymous");
    const reporter = event === "error" ? "reportErr" : "report";
    for (let i = 0;i < trace8.length; i++)
      addFn(`${alias ? "const " : ""}${alias ?? reporter}${i}=trace${i}.${event}({id,event:'${event}',name:'${name3}',begin:performance.now(),total:${total}})
`), alias && addFn(`${reporter}${i}=${alias}${i}
`);
    return {
      resolve() {
        for (let i = 0;i < trace8.length; i++)
          addFn(`${alias ?? reporter}${i}.resolve()
`);
      },
      resolveChild(name22) {
        for (let i = 0;i < trace8.length; i++)
          addFn(`${reporter}Child${i}=${reporter}${i}.resolveChild?.shift()?.({id,event:'${event}',name:'${name22}',begin:performance.now()})
`);
        return (binding) => {
          for (let i = 0;i < trace8.length; i++)
            addFn(binding ? `if(${binding} instanceof Error){${reporter}Child${i}?.(${binding}) }else{${reporter}Child${i}?.()}` : `${reporter}Child${i}?.()
`);
        };
      }
    };
  };
};
var composeCleaner = ({
  schema,
  name: name3,
  type: type2,
  typeAlias = type2,
  normalize: normalize4,
  ignoreTryCatch = false
}) => !normalize4 || !schema.Clean ? "" : normalize4 === true || normalize4 === "exactMirror" ? ignoreTryCatch ? `${name3}=validator.${typeAlias}.Clean(${name3})
` : `try{${name3}=validator.${typeAlias}.Clean(${name3})
}catch{}` : normalize4 === "typebox" ? `${name3}=validator.${typeAlias}.Clean(${name3})
` : "";
var composeValidationFactory = ({
  injectResponse = "",
  normalize: normalize4 = false,
  validator,
  encodeSchema = false,
  isStaticResponse = false,
  hasSanitize = false,
  allowUnsafeValidationDetails = false
}) => ({
  validate: (type2, value = `c.${type2}`, error49) => `c.set.status=422;throw new ValidationError('${type2}',validator.${type2},${value},${allowUnsafeValidationDetails}${error49 ? "," + error49 : ""})`,
  response: (name3 = "r") => {
    if (isStaticResponse || !validator.response)
      return "";
    let code2 = injectResponse + `
`;
    code2 += `if(${name3} instanceof ElysiaCustomStatusResponse){c.set.status=${name3}.code
${name3}=${name3}.response}if(${name3} instanceof Response === false && typeof ${name3}?.next !== 'function' && !(${name3} instanceof ReadableStream))switch(c.set.status){`;
    for (const [status2, value] of Object.entries(validator.response)) {
      if (code2 += `
case ${status2}:
`, value.provider === "standard") {
        code2 += `let vare${status2}=validator.response[${status2}].Check(${name3})
if(vare${status2} instanceof Promise)vare${status2}=await vare${status2}
if(vare${status2}.issues)throw new ValidationError('response',validator.response[${status2}],${name3},${allowUnsafeValidationDetails},vare${status2}.issues)
${name3}=vare${status2}.value
c.set.status=${status2}
break
`;
        continue;
      }
      let noValidate = value.schema?.noValidate === true;
      if (!noValidate && value.schema?.$ref && value.schema?.$defs) {
        const refKey = value.schema.$ref, defKey = typeof refKey == "string" && refKey.includes("/") ? refKey.split("/").pop() : refKey;
        value.schema.$defs[defKey]?.noValidate === true && (noValidate = true);
      }
      const appliedCleaner = noValidate || hasSanitize, clean2 = ({ ignoreTryCatch = false } = {}) => composeCleaner({
        name: name3,
        schema: value,
        type: "response",
        typeAlias: `response[${status2}]`,
        normalize: normalize4,
        ignoreTryCatch
      });
      appliedCleaner && (code2 += clean2());
      const applyErrorCleaner = !appliedCleaner && normalize4 && !noValidate;
      encodeSchema && value.hasTransform && !noValidate ? (code2 += `try{${name3}=validator.response[${status2}].Encode(${name3})
`, appliedCleaner || (code2 += clean2({ ignoreTryCatch: true })), code2 += `c.set.status=${status2}}catch{` + (applyErrorCleaner ? `try{
` + clean2({ ignoreTryCatch: true }) + `${name3}=validator.response[${status2}].Encode(${name3})
}catch{throw new ValidationError('response',validator.response[${status2}],${name3},${allowUnsafeValidationDetails})}` : `throw new ValidationError('response',validator.response[${status2}],${name3},${allowUnsafeValidationDetails})`) + "}") : (appliedCleaner || (code2 += clean2()), noValidate || (code2 += `if(validator.response[${status2}].Check(${name3})===false)throw new ValidationError('response',validator.response[${status2}],${name3},${allowUnsafeValidationDetails})
c.set.status=${status2}
`)), code2 += `break
`;
    }
    return code2 + "}";
  }
});
var isAsyncName = (v5) => (v5?.fn ?? v5).constructor.name === "AsyncFunction";
var matchResponseClone = /=>\s?response\.clone\(/;
var matchFnReturn = /(?:return|=>)\s?\S+\(|a(?:sync|wait)/;
var isAsync = (v5) => {
  const isObject5 = typeof v5 == "object";
  if (isObject5 && v5.isAsync !== undefined)
    return v5.isAsync;
  const fn3 = isObject5 ? v5.fn : v5;
  if (fn3.constructor.name === "AsyncFunction" || fn3.constructor.name === "AsyncGeneratorFunction")
    return true;
  const literal3 = fn3.toString();
  if (matchResponseClone.test(literal3))
    return isObject5 && (v5.isAsync = false), false;
  const result = matchFnReturn.test(literal3);
  return isObject5 && (v5.isAsync = result), result;
};
var hasReturn = (v5) => {
  const isObject5 = typeof v5 == "object";
  if (isObject5 && v5.hasReturn !== undefined)
    return v5.hasReturn;
  const fnLiteral = isObject5 ? v5.fn.toString() : v5.toString(), parenthesisEnd = fnLiteral.indexOf(")"), arrowIndex = fnLiteral.indexOf("=>", parenthesisEnd);
  if (arrowIndex !== -1) {
    let afterArrow = arrowIndex + 2, charCode;
    for (;afterArrow < fnLiteral.length && ((charCode = fnLiteral.charCodeAt(afterArrow)) === 32 || charCode === 9 || charCode === 10 || charCode === 13); )
      afterArrow++;
    if (afterArrow < fnLiteral.length && fnLiteral.charCodeAt(afterArrow) !== 123)
      return isObject5 && (v5.hasReturn = true), true;
  }
  const result = fnLiteral.includes("return");
  return isObject5 && (v5.hasReturn = result), result;
};
var isGenerator = (v5) => {
  const fn3 = v5?.fn ?? v5;
  return fn3.constructor.name === "AsyncGeneratorFunction" || fn3.constructor.name === "GeneratorFunction";
};
var coerceTransformDecodeError = (fnLiteral, type2, allowUnsafeValidationDetails = false, value = `c.${type2}`) => `try{${fnLiteral}}catch(error){if(error.constructor.name === 'TransformDecodeError'){c.set.status=422
throw error.error ?? new ValidationError('${type2}',validator.${type2},${value},${allowUnsafeValidationDetails})}}`;
var setImmediateFn = hasSetImmediate ? "setImmediate" : "Promise.resolve().then";
var composeHandler = ({
  app,
  path: path2,
  method,
  hooks,
  validator,
  handler: handler2,
  allowMeta = false,
  inference
}) => {
  const adapter = app["~adapter"].composeHandler, adapterHandler = app["~adapter"].handler, isHandleFn = typeof handler2 == "function";
  if (!isHandleFn) {
    handler2 = adapterHandler.mapResponse(handler2, {
      headers: app.setHeaders ?? {}
    });
    const isResponse = handler2 instanceof Response || handler2?.constructor?.name === "Response" && typeof handler2?.clone == "function";
    if (hooks.parse?.length && hooks.transform?.length && hooks.beforeHandle?.length && hooks.afterHandle?.length)
      return isResponse ? Function("a", `"use strict";
return function(){return a.clone()}`)(handler2) : Function("a", `"use strict";
return function(){return a}`)(handler2);
    if (isResponse) {
      const response = handler2;
      handler2 = () => response.clone();
    }
  }
  const handle = isHandleFn ? "handler(c)" : "handler", hasTrace = !!hooks.trace?.length;
  let fnLiteral = "";
  if (inference = sucrose(Object.assign({ handler: handler2 }, hooks), inference, app.config.sucrose), adapter.declare) {
    const literal3 = adapter.declare(inference);
    literal3 && (fnLiteral += literal3);
  }
  inference.server && (fnLiteral += `Object.defineProperty(c,'server',{get:function(){return getServer()}})
`), validator.createBody?.(), validator.createQuery?.(), validator.createHeaders?.(), validator.createParams?.(), validator.createCookie?.(), validator.createResponse?.();
  const hasValidation = !!validator.body || !!validator.headers || !!validator.params || !!validator.query || !!validator.cookie || !!validator.response, hasQuery = inference.query || !!validator.query, requestNoBody = hooks.parse?.length === 1 && hooks.parse[0].fn === "none", hasBody = method !== "" && method !== "GET" && method !== "HEAD" && (inference.body || !!validator.body || !!hooks.parse?.length) && !requestNoBody, defaultHeaders = app.setHeaders, hasDefaultHeaders = defaultHeaders && !!Object.keys(defaultHeaders).length, hasHeaders = inference.headers || !!validator.headers || adapter.preferWebstandardHeaders !== true && inference.body, hasCookie = inference.cookie || !!validator.cookie, cookieMeta = validator.cookie?.config ? mergeCookie(validator?.cookie?.config, app.config.cookie) : app.config.cookie;
  let _encodeCookie = "";
  const encodeCookie = () => {
    if (_encodeCookie)
      return _encodeCookie;
    if (cookieMeta?.sign) {
      if (cookieMeta.secrets === "")
        throw new Error(`cookie secret can't be an empty string at (${method}) ${path2}`, {
          cause: `(${method}) ${path2}`
        });
      if (!cookieMeta.secrets)
        throw new Error(`cookie secret must be defined (${method}) ${path2}`, {
          cause: `(${method}) ${path2}`
        });
      const secret = cookieMeta.secrets ? typeof cookieMeta.secrets == "string" ? cookieMeta.secrets : cookieMeta.secrets[0] : undefined;
      if (_encodeCookie += `const _setCookie = c.set.cookie
if(_setCookie){`, cookieMeta.sign === true)
        _encodeCookie += `for(const [key, cookie] of Object.entries(_setCookie)){c.set.cookie[key].value=await signCookie(cookie.value,${secret ? JSON.stringify(secret) : "undefined"})}`;
      else {
        typeof cookieMeta.sign == "string" && (cookieMeta.sign = [cookieMeta.sign]);
        for (const name3 of cookieMeta.sign)
          _encodeCookie += `if(_setCookie[${JSON.stringify(name3)}]?.value)c.set.cookie[${JSON.stringify(name3)}].value=await signCookie(_setCookie[${JSON.stringify(name3)}].value,${secret ? JSON.stringify(secret) : "undefined"})
`;
      }
      _encodeCookie += `}
`;
    }
    return _encodeCookie;
  }, normalize4 = app.config.normalize, encodeSchema = app.config.encodeSchema, allowUnsafeValidationDetails = app.config.allowUnsafeValidationDetails, validation = composeValidationFactory({
    normalize: normalize4,
    validator,
    encodeSchema,
    isStaticResponse: handler2 instanceof Response,
    hasSanitize: !!app.config.sanitize,
    allowUnsafeValidationDetails
  });
  hasHeaders && (fnLiteral += adapter.headers), hasTrace && (fnLiteral += `const id=c[ELYSIA_REQUEST_ID]
`);
  const report = createReport({
    trace: hooks.trace,
    addFn: (word) => {
      fnLiteral += word;
    }
  });
  if (fnLiteral += "try{", hasCookie) {
    const get2 = (name3, defaultValue) => {
      const value = cookieMeta?.[name3] ?? defaultValue;
      return value === undefined ? "" : value ? typeof value == "string" ? `${name3}:${JSON.stringify(value)},` : value instanceof Date ? `${name3}: new Date(${value.getTime()}),` : `${name3}:${value},` : typeof defaultValue == "string" ? `${name3}:"${defaultValue}",` : `${name3}:${defaultValue},`;
    }, options2 = cookieMeta ? `{secrets:${cookieMeta.secrets !== undefined && cookieMeta.secrets !== null ? typeof cookieMeta.secrets == "string" ? JSON.stringify(cookieMeta.secrets) : "[" + cookieMeta.secrets.map((x4) => JSON.stringify(x4)).join(",") + "]" : "undefined"},sign:${cookieMeta.sign === true ? true : cookieMeta.sign !== undefined ? typeof cookieMeta.sign == "string" ? JSON.stringify(cookieMeta.sign) : "[" + cookieMeta.sign.map((x4) => JSON.stringify(x4)).join(",") + "]" : "undefined"},` + get2("domain") + get2("expires") + get2("httpOnly") + get2("maxAge") + get2("path", "/") + get2("priority") + get2("sameSite") + get2("secure") + "}" : "undefined";
    hasHeaders ? fnLiteral += `
c.cookie=await parseCookie(c.set,c.headers.cookie,${options2})
` : fnLiteral += `
c.cookie=await parseCookie(c.set,c.request.headers.get('cookie'),${options2})
`;
  }
  if (hasQuery) {
    let arrayProperties = {}, objectProperties = {}, hasArrayProperty = false, hasObjectProperty = false;
    if (validator.query?.schema) {
      const schema = unwrapImportSchema(validator.query?.schema), properties2 = getSchemaProperties(schema);
      if (properties2)
        for (const [key, value] of Object.entries(properties2))
          hasElysiaMeta("ArrayQuery", value) && (arrayProperties[key] = true, hasArrayProperty = true), hasElysiaMeta("ObjectString", value) && (objectProperties[key] = true, hasObjectProperty = true);
    }
    fnLiteral += `if(c.qi===-1){c.query=Object.create(null)}else{c.query=parseQueryFromURL(c.url,c.qi+1${hasArrayProperty ? "," + JSON.stringify(arrayProperties) : hasObjectProperty ? ",undefined" : ""}${hasObjectProperty ? "," + JSON.stringify(objectProperties) : ""})}`;
  }
  const isAsyncHandler = typeof handler2 == "function" && isAsync(handler2), saveResponse = hasTrace || hooks.afterResponse?.length ? "c.response=c.responseValue= " : "", responseKeys = Object.keys(validator.response ?? {}), hasMultipleResponses = responseKeys.length > 1, hasSingle200 = responseKeys.length === 0 || responseKeys.length === 1 && responseKeys[0] === "200", maybeAsync = hasCookie || hasBody || isAsyncHandler || !!hooks.parse?.length || !!hooks.afterHandle?.some(isAsync) || !!hooks.beforeHandle?.some(isAsync) || !!hooks.transform?.some(isAsync) || !!hooks.mapResponse?.some(isAsync) || validator.body?.provider === "standard" || validator.headers?.provider === "standard" || validator.query?.provider === "standard" || validator.params?.provider === "standard" || validator.cookie?.provider === "standard" || Object.values(validator.response ?? {}).find((x4) => x4.provider === "standard"), maybeStream = (typeof handler2 == "function" ? isGenerator(handler2) : false) || !!hooks.beforeHandle?.some(isGenerator) || !!hooks.afterHandle?.some(isGenerator) || !!hooks.transform?.some(isGenerator), hasSet = inference.cookie || inference.set || hasHeaders || hasTrace || hasMultipleResponses || !hasSingle200 || isHandleFn && hasDefaultHeaders || maybeStream;
  let _afterResponse;
  const afterResponse = (hasStream = true) => {
    if (_afterResponse !== undefined)
      return _afterResponse;
    if (!hooks.afterResponse?.length && !hasTrace)
      return "";
    let afterResponse2 = "";
    afterResponse2 += `
${setImmediateFn}(async()=>{if(c.responseValue){if(c.responseValue instanceof ElysiaCustomStatusResponse) c.set.status=c.responseValue.code
` + (hasStream ? `if(typeof afterHandlerStreamListener!=='undefined')for await(const v of afterHandlerStreamListener){}
` : "") + `}
`;
    const reporter = createReport({
      trace: hooks.trace,
      addFn: (word) => {
        afterResponse2 += word;
      }
    })("afterResponse", {
      total: hooks.afterResponse?.length
    });
    if (hooks.afterResponse?.length && hooks.afterResponse)
      for (let i = 0;i < hooks.afterResponse.length; i++) {
        const endUnit = reporter.resolveChild(hooks.afterResponse[i].fn.name), prefix = isAsync(hooks.afterResponse[i]) ? "await " : "";
        afterResponse2 += `
${prefix}e.afterResponse[${i}](c)
`, endUnit();
      }
    return reporter.resolve(), afterResponse2 += `})
`, _afterResponse = afterResponse2;
  }, mapResponse3 = (r2 = "r") => {
    const after = afterResponse(), response = `${maybeStream && maybeAsync ? "await " : ""}${hasSet ? "mapResponse" : "mapCompactResponse"}(${saveResponse}${r2}${hasSet ? ",c.set" : ""}${mapResponseContext})
`;
    return after ? `const _res=${response}` + after + "return _res" : `return ${response}`;
  }, mapResponseContext = adapter.mapResponseContext ? `,${adapter.mapResponseContext}` : "";
  (hasTrace || inference.route) && (fnLiteral += `c.route=\`${path2}\`
`), (hasTrace || hooks.afterResponse?.length) && (fnLiteral += `let afterHandlerStreamListener
`);
  const parseReporter = report("parse", {
    total: hooks.parse?.length
  });
  if (hasBody) {
    const hasBodyInference = !!hooks.parse?.length || inference.body || validator.body;
    adapter.parser.declare && (fnLiteral += adapter.parser.declare), fnLiteral += `
try{`;
    let parser2 = typeof hooks.parse == "string" ? hooks.parse : Array.isArray(hooks.parse) && hooks.parse.length === 1 ? typeof hooks.parse[0] == "string" ? hooks.parse[0] : typeof hooks.parse[0].fn == "string" ? hooks.parse[0].fn : undefined : undefined;
    if (!parser2 && validator.body && !hooks.parse?.length) {
      const schema = validator.body.schema;
      schema && schema.anyOf && schema[Kind] === "Union" && schema.anyOf?.length === 2 && schema.anyOf?.find((x4) => x4[Kind] === "ElysiaForm") && (parser2 = "formdata");
    }
    if (parser2 && defaultParsers.includes(parser2)) {
      const reporter = report("parse", {
        total: hooks.parse?.length
      }), isOptionalBody = !!validator.body?.isOptional;
      switch (parser2) {
        case "json":
        case "application/json":
          fnLiteral += adapter.parser.json(isOptionalBody);
          break;
        case "text":
        case "text/plain":
          fnLiteral += adapter.parser.text(isOptionalBody);
          break;
        case "urlencoded":
        case "application/x-www-form-urlencoded":
          fnLiteral += adapter.parser.urlencoded(isOptionalBody);
          break;
        case "arrayBuffer":
        case "application/octet-stream":
          fnLiteral += adapter.parser.arrayBuffer(isOptionalBody);
          break;
        case "formdata":
        case "multipart/form-data":
          fnLiteral += adapter.parser.formData(isOptionalBody);
          break;
        default:
          parser2 in app["~parser"] && (fnLiteral += hasHeaders ? "let contentType = c.headers['content-type']" : "let contentType = c.request.headers.get('content-type')", fnLiteral += `
if(contentType){const index=contentType.indexOf(';')
if(index!==-1)contentType=contentType.substring(0,index)}
else{contentType=''}c.contentType=contentType
let result=parser['${parser2}'](c, contentType)
if(result instanceof Promise)result=await result
if(result instanceof ElysiaCustomStatusResponse)throw result
if(result!==undefined)c.body=result
delete c.contentType
`);
          break;
      }
      reporter.resolve();
    } else if (hasBodyInference) {
      fnLiteral += `
`, fnLiteral += `let contentType
if(c.request.body)`, fnLiteral += hasHeaders ? `contentType=c.headers['content-type']
` : `contentType=c.request.headers.get('content-type')
`;
      let hasDefaultParser = false;
      if (hooks.parse?.length)
        fnLiteral += `if(contentType){
const index=contentType.indexOf(';')

if(index!==-1)contentType=contentType.substring(0,index)}else{contentType=''}let used=false
c.contentType=contentType
`;
      else {
        hasDefaultParser = true;
        const isOptionalBody = !!validator.body?.isOptional;
        fnLiteral += `if(contentType)switch(contentType.charCodeAt(12)){
case 106:` + adapter.parser.json(isOptionalBody) + `break
case 120:` + adapter.parser.urlencoded(isOptionalBody) + `break
case 111:` + adapter.parser.arrayBuffer(isOptionalBody) + `break
case 114:` + adapter.parser.formData(isOptionalBody) + `break
default:if(contentType.charCodeAt(0)===116){` + adapter.parser.text(isOptionalBody) + `}break
}`;
      }
      const reporter = report("parse", {
        total: hooks.parse?.length
      });
      if (hooks.parse)
        for (let i = 0;i < hooks.parse.length; i++) {
          const name3 = `bo${i}`;
          if (i !== 0 && (fnLiteral += `
if(!used){`), typeof hooks.parse[i].fn == "string") {
            const endUnit = reporter.resolveChild(hooks.parse[i].fn), isOptionalBody = !!validator.body?.isOptional;
            switch (hooks.parse[i].fn) {
              case "json":
              case "application/json":
                hasDefaultParser = true, fnLiteral += adapter.parser.json(isOptionalBody);
                break;
              case "text":
              case "text/plain":
                hasDefaultParser = true, fnLiteral += adapter.parser.text(isOptionalBody);
                break;
              case "urlencoded":
              case "application/x-www-form-urlencoded":
                hasDefaultParser = true, fnLiteral += adapter.parser.urlencoded(isOptionalBody);
                break;
              case "arrayBuffer":
              case "application/octet-stream":
                hasDefaultParser = true, fnLiteral += adapter.parser.arrayBuffer(isOptionalBody);
                break;
              case "formdata":
              case "multipart/form-data":
                hasDefaultParser = true, fnLiteral += adapter.parser.formData(isOptionalBody);
                break;
              default:
                fnLiteral += `let ${name3}=parser['${hooks.parse[i].fn}'](c,contentType)
if(${name3} instanceof Promise)${name3}=await ${name3}
if(${name3}!==undefined){c.body=${name3};used=true;}
`;
            }
            endUnit();
          } else {
            const endUnit = reporter.resolveChild(hooks.parse[i].fn.name);
            fnLiteral += `let ${name3}=e.parse[${i}]
${name3}=${name3}(c,contentType)
if(${name3} instanceof Promise)${name3}=await ${name3}
if(${name3}!==undefined){c.body=${name3};used=true}`, endUnit();
          }
          if (i !== 0 && (fnLiteral += "}"), hasDefaultParser)
            break;
        }
      if (reporter.resolve(), !hasDefaultParser) {
        const isOptionalBody = !!validator.body?.isOptional;
        hooks.parse?.length && (fnLiteral += `
if(!used){
`), fnLiteral += `switch(contentType){case 'application/json':
` + adapter.parser.json(isOptionalBody) + `break
case 'text/plain':` + adapter.parser.text(isOptionalBody) + `break
case 'application/x-www-form-urlencoded':` + adapter.parser.urlencoded(isOptionalBody) + `break
case 'application/octet-stream':` + adapter.parser.arrayBuffer(isOptionalBody) + `break
case 'multipart/form-data':` + adapter.parser.formData(isOptionalBody) + `break
`;
        for (const key of Object.keys(app["~parser"]))
          fnLiteral += `case '${key}':let bo${key}=parser['${key}'](c,contentType)
if(bo${key} instanceof Promise)bo${key}=await bo${key}
if(bo${key} instanceof ElysiaCustomStatusResponse){` + mapResponse3(`bo${key}`) + `}if(bo${key}!==undefined)c.body=bo${key}
break
`;
        hooks.parse?.length && (fnLiteral += "}"), fnLiteral += "}";
      }
      hooks.parse?.length && (fnLiteral += `
delete c.contentType`);
    }
    fnLiteral += "}catch(error){throw new ParseError(error)}";
  }
  if (parseReporter.resolve(), hooks?.transform || hasTrace) {
    const reporter = report("transform", {
      total: hooks.transform?.length
    });
    if (hooks.transform?.length) {
      fnLiteral += `let transformed
`;
      for (let i = 0;i < hooks.transform.length; i++) {
        const transform3 = hooks.transform[i], endUnit = reporter.resolveChild(transform3.fn.name);
        fnLiteral += isAsync(transform3) ? `transformed=await e.transform[${i}](c)
` : `transformed=e.transform[${i}](c)
`, transform3.subType === "mapDerive" ? fnLiteral += "if(transformed instanceof ElysiaCustomStatusResponse){" + mapResponse3("transformed") + `}else{transformed.request=c.request
transformed.store=c.store
transformed.qi=c.qi
transformed.path=c.path
transformed.url=c.url
transformed.redirect=c.redirect
transformed.set=c.set
transformed.error=c.error
c=transformed}` : fnLiteral += "if(transformed instanceof ElysiaCustomStatusResponse){" + mapResponse3("transformed") + `}else Object.assign(c,transformed)
`, endUnit();
      }
    }
    reporter.resolve();
  }
  const fileUnions = [];
  if (validator) {
    if (validator.headers) {
      if (validator.headers.hasDefault)
        for (const [key, value] of Object.entries(exports_value2.Default(validator.headers.schema, {}))) {
          const parsed = typeof value == "object" ? JSON.stringify(value) : typeof value == "string" ? `'${value}'` : value;
          parsed !== undefined && (fnLiteral += `c.headers['${key}']??=${parsed}
`);
        }
      fnLiteral += composeCleaner({
        name: "c.headers",
        schema: validator.headers,
        type: "headers",
        normalize: normalize4
      }), validator.headers.isOptional && (fnLiteral += "if(isNotEmpty(c.headers)){"), validator.headers?.provider === "standard" ? fnLiteral += `let vah=validator.headers.Check(c.headers)
if(vah instanceof Promise)vah=await vah
if(vah.issues){` + validation.validate("headers", undefined, "vah.issues") + `}else{c.headers=vah.value}
` : validator.headers?.schema?.noValidate !== true && (fnLiteral += "if(validator.headers.Check(c.headers) === false){" + validation.validate("headers") + "}"), validator.headers.hasTransform && (fnLiteral += coerceTransformDecodeError(`c.headers=validator.headers.Decode(c.headers)
`, "headers", allowUnsafeValidationDetails)), validator.headers.isOptional && (fnLiteral += "}");
    }
    if (validator.params) {
      if (validator.params.hasDefault)
        for (const [key, value] of Object.entries(exports_value2.Default(validator.params.schema, {}))) {
          const parsed = typeof value == "object" ? JSON.stringify(value) : typeof value == "string" ? `'${value}'` : value;
          parsed !== undefined && (fnLiteral += `c.params['${key}']??=${parsed}
`);
        }
      validator.params.provider === "standard" ? fnLiteral += `let vap=validator.params.Check(c.params)
if(vap instanceof Promise)vap=await vap
if(vap.issues){` + validation.validate("params", undefined, "vap.issues") + `}else{c.params=vap.value}
` : validator.params?.schema?.noValidate !== true && (fnLiteral += "if(validator.params.Check(c.params)===false){" + validation.validate("params") + "}"), validator.params.hasTransform && (fnLiteral += coerceTransformDecodeError(`c.params=validator.params.Decode(c.params)
`, "params", allowUnsafeValidationDetails));
    }
    if (validator.query) {
      if (Kind in validator.query?.schema && validator.query.hasDefault)
        for (const [key, value] of Object.entries(exports_value2.Default(validator.query.schema, {}))) {
          const parsed = typeof value == "object" ? JSON.stringify(value) : typeof value == "string" ? `'${value}'` : value;
          parsed !== undefined && (fnLiteral += `if(c.query['${key}']===undefined)c.query['${key}']=${parsed}
`);
        }
      fnLiteral += composeCleaner({
        name: "c.query",
        schema: validator.query,
        type: "query",
        normalize: normalize4
      }), validator.query.isOptional && (fnLiteral += "if(isNotEmpty(c.query)){"), validator.query.provider === "standard" ? fnLiteral += `let vaq=validator.query.Check(c.query)
if(vaq instanceof Promise)vaq=await vaq
if(vaq.issues){` + validation.validate("query", undefined, "vaq.issues") + `}else{c.query=vaq.value}
` : validator.query?.schema?.noValidate !== true && (fnLiteral += "if(validator.query.Check(c.query)===false){" + validation.validate("query") + "}"), validator.query.hasTransform && (fnLiteral += coerceTransformDecodeError(`c.query=validator.query.Decode(c.query)
`, "query", allowUnsafeValidationDetails), fnLiteral += coerceTransformDecodeError(`c.query=validator.query.Decode(c.query)
`, "query", allowUnsafeValidationDetails)), validator.query.isOptional && (fnLiteral += "}");
    }
    if (hasBody && validator.body) {
      (validator.body.hasTransform || validator.body.isOptional) && (fnLiteral += `const isNotEmptyObject=c.body&&(typeof c.body==="object"&&(isNotEmpty(c.body)||c.body instanceof ArrayBuffer))
`);
      const hasUnion = isUnion(validator.body.schema);
      let hasNonUnionFileWithDefault = false;
      if (validator.body.hasDefault) {
        let value = exports_value2.Default(validator.body.schema, validator.body.schema.type === "object" || unwrapImportSchema(validator.body.schema)[Kind] === "Object" ? {} : undefined);
        const schema = unwrapImportSchema(validator.body.schema);
        if (!hasUnion && value && typeof value == "object" && (hasType("File", schema) || hasType("Files", schema))) {
          hasNonUnionFileWithDefault = true;
          for (const [k4, v5] of Object.entries(value))
            (v5 === "File" || v5 === "Files") && delete value[k4];
          isNotEmpty(value) || (value = undefined);
        }
        const parsed = typeof value == "object" ? JSON.stringify(value) : typeof value == "string" ? `'${value}'` : value;
        value != null && (Array.isArray(value) ? fnLiteral += `if(!c.body)c.body=${parsed}
` : typeof value == "object" ? fnLiteral += `c.body=Object.assign(${parsed},c.body)
` : fnLiteral += `c.body=${parsed}
`), fnLiteral += composeCleaner({
          name: "c.body",
          schema: validator.body,
          type: "body",
          normalize: normalize4
        }), validator.body.provider === "standard" ? fnLiteral += `let vab=validator.body.Check(c.body)
if(vab instanceof Promise)vab=await vab
if(vab.issues){` + validation.validate("body", undefined, "vab.issues") + `}else{c.body=vab.value}
` : validator.body?.schema?.noValidate !== true && (validator.body.isOptional ? fnLiteral += "if(isNotEmptyObject&&validator.body.Check(c.body)===false){" + validation.validate("body") + "}" : fnLiteral += "if(validator.body.Check(c.body)===false){" + validation.validate("body") + "}");
      } else
        fnLiteral += composeCleaner({
          name: "c.body",
          schema: validator.body,
          type: "body",
          normalize: normalize4
        }), validator.body.provider === "standard" ? fnLiteral += `let vab=validator.body.Check(c.body)
if(vab instanceof Promise)vab=await vab
if(vab.issues){` + validation.validate("body", undefined, "vab.issues") + `}else{c.body=vab.value}
` : validator.body?.schema?.noValidate !== true && (validator.body.isOptional ? fnLiteral += "if(isNotEmptyObject&&validator.body.Check(c.body)===false){" + validation.validate("body") + "}" : fnLiteral += "if(validator.body.Check(c.body)===false){" + validation.validate("body") + "}");
      if (validator.body.hasTransform && (fnLiteral += coerceTransformDecodeError(`if(isNotEmptyObject)c.body=validator.body.Decode(c.body)
`, "body", allowUnsafeValidationDetails)), hasUnion && validator.body.schema.anyOf?.length) {
        const iterator = Object.values(validator.body.schema.anyOf);
        for (let i = 0;i < iterator.length; i++) {
          const type2 = iterator[i];
          if (hasType("File", type2) || hasType("Files", type2)) {
            const candidate = getSchemaValidator(type2, {
              modules: app.definitions.typebox,
              dynamic: !app.config.aot,
              models: app.definitions.type,
              normalize: app.config.normalize,
              additionalCoerce: coercePrimitiveRoot(),
              sanitize: () => app.config.sanitize
            });
            if (candidate) {
              const isFirst = fileUnions.length === 0, properties2 = getSchemaProperties(candidate.schema) ?? getSchemaProperties(type2);
              if (!properties2)
                continue;
              const iterator2 = Object.entries(properties2);
              let validator2 = isFirst ? `
` : " else ";
              validator2 += `if(fileUnions[${fileUnions.length}].Check(c.body)){`;
              let validateFile2 = "", validatorLength = 0;
              for (let i2 = 0;i2 < iterator2.length; i2++) {
                const [k4, v5] = iterator2[i2];
                !v5.extension || v5[Kind] !== "File" && v5[Kind] !== "Files" || (validatorLength && (validateFile2 += ","), validateFile2 += `fileType(c.body.${k4},${JSON.stringify(v5.extension)},'body.${k4}')`, validatorLength++);
              }
              validateFile2 && (validatorLength === 1 ? validator2 += `await ${validateFile2}
` : validatorLength > 1 && (validator2 += `await Promise.all([${validateFile2}])
`), validator2 += "}", fnLiteral += validator2, fileUnions.push(candidate));
            }
          }
        }
      } else if (hasNonUnionFileWithDefault || !hasUnion && (hasType("File", unwrapImportSchema(validator.body.schema)) || hasType("Files", unwrapImportSchema(validator.body.schema)))) {
        let validateFile2 = "";
        const bodyProperties = getSchemaProperties(unwrapImportSchema(validator.body.schema));
        let i = 0;
        if (bodyProperties)
          for (const [k4, v5] of Object.entries(bodyProperties))
            !v5.extension || v5[Kind] !== "File" && v5[Kind] !== "Files" || (i && (validateFile2 += ","), validateFile2 += `fileType(c.body.${k4},${JSON.stringify(v5.extension)},'body.${k4}')`, i++);
        i && (fnLiteral += `
`), i === 1 ? fnLiteral += `await ${validateFile2}
` : i > 1 && (fnLiteral += `await Promise.all([${validateFile2}])
`);
      }
    }
    validator.cookie && (validator.cookie.config = mergeCookie(validator.cookie.config, app.config.cookie ?? {}), fnLiteral += `let cookieValue={}
for(const [key,value] of Object.entries(c.cookie))cookieValue[key]=value.value
`, validator.cookie.isOptional && (fnLiteral += "if(isNotEmpty(c.cookie)){"), validator.cookie.provider === "standard" ? (fnLiteral += `let vac=validator.cookie.Check(cookieValue)
if(vac instanceof Promise)vac=await vac
if(vac.issues){` + validation.validate("cookie", undefined, "vac.issues") + `}else{cookieValue=vac.value}
`, fnLiteral += `for(const k of Object.keys(cookieValue))c.cookie[k].value=cookieValue[k]
`) : validator.cookie?.schema?.noValidate !== true && (fnLiteral += "if(validator.cookie.Check(cookieValue)===false){" + validation.validate("cookie", "cookieValue") + "}", validator.cookie.hasTransform && (fnLiteral += coerceTransformDecodeError("for(const [key,value] of Object.entries(validator.cookie.Decode(cookieValue))){c.cookie[key].value = value}", "cookie", allowUnsafeValidationDetails))), validator.cookie.isOptional && (fnLiteral += "}"));
  }
  if (hooks?.beforeHandle || hasTrace) {
    const reporter = report("beforeHandle", {
      total: hooks.beforeHandle?.length
    });
    let hasResolve = false;
    if (hooks.beforeHandle?.length)
      for (let i = 0;i < hooks.beforeHandle.length; i++) {
        const beforeHandle = hooks.beforeHandle[i], endUnit = reporter.resolveChild(beforeHandle.fn.name), returning = hasReturn(beforeHandle);
        if (beforeHandle.subType === "resolve" || beforeHandle.subType === "mapResolve")
          hasResolve || (hasResolve = true, fnLiteral += `
let resolved
`), fnLiteral += isAsync(beforeHandle) ? `resolved=await e.beforeHandle[${i}](c);
` : `resolved=e.beforeHandle[${i}](c);
`, beforeHandle.subType === "mapResolve" ? fnLiteral += "if(resolved instanceof ElysiaCustomStatusResponse){" + mapResponse3("resolved") + `}else{resolved.request=c.request
resolved.store=c.store
resolved.qi=c.qi
resolved.path=c.path
resolved.url=c.url
resolved.redirect=c.redirect
resolved.set=c.set
resolved.error=c.error
c=resolved}` : fnLiteral += "if(resolved instanceof ElysiaCustomStatusResponse){" + mapResponse3("resolved") + `}else Object.assign(c, resolved)
`, endUnit();
        else if (!returning)
          fnLiteral += isAsync(beforeHandle) ? `await e.beforeHandle[${i}](c)
` : `e.beforeHandle[${i}](c)
`, endUnit();
        else {
          if (fnLiteral += isAsync(beforeHandle) ? `be=await e.beforeHandle[${i}](c)
` : `be=e.beforeHandle[${i}](c)
`, endUnit("be"), fnLiteral += "if(be!==undefined){", reporter.resolve(), hooks.afterHandle?.length || hasTrace) {
            report("handle", {
              name: isHandleFn ? handler2.name : undefined
            }).resolve();
            const reporter2 = report("afterHandle", {
              total: hooks.afterHandle?.length
            });
            if (hooks.afterHandle?.length)
              for (let i2 = 0;i2 < hooks.afterHandle.length; i2++) {
                const hook = hooks.afterHandle[i2], returning2 = hasReturn(hook), endUnit2 = reporter2.resolveChild(hook.fn.name);
                fnLiteral += `c.response=c.responseValue=be
`, returning2 ? (fnLiteral += isAsync(hook.fn) ? `af=await e.afterHandle[${i2}](c)
` : `af=e.afterHandle[${i2}](c)
`, fnLiteral += `if(af!==undefined) c.response=c.responseValue=be=af
`) : fnLiteral += isAsync(hook.fn) ? `await e.afterHandle[${i2}](c, be)
` : `e.afterHandle[${i2}](c, be)
`, endUnit2("af");
              }
            reporter2.resolve();
          }
          validator.response && (fnLiteral += validation.response("be"));
          const mapResponseReporter = report("mapResponse", {
            total: hooks.mapResponse?.length
          });
          if (hooks.mapResponse?.length) {
            fnLiteral += `c.response=c.responseValue=be
`;
            for (let i2 = 0;i2 < hooks.mapResponse.length; i2++) {
              const mapResponse22 = hooks.mapResponse[i2], endUnit2 = mapResponseReporter.resolveChild(mapResponse22.fn.name);
              fnLiteral += `if(mr===undefined){mr=${isAsyncName(mapResponse22) ? "await " : ""}e.mapResponse[${i2}](c)
if(mr!==undefined)be=c.response=c.responseValue=mr}`, endUnit2();
            }
          }
          mapResponseReporter.resolve(), fnLiteral += afterResponse(), fnLiteral += encodeCookie(), fnLiteral += `return mapEarlyResponse(${saveResponse}be,c.set${mapResponseContext})}
`;
        }
      }
    reporter.resolve();
  }
  function reportHandler(name3) {
    const handleReporter = report("handle", {
      name: name3,
      alias: "reportHandler"
    });
    return () => {
      hasTrace && (fnLiteral += 'if(r&&(r[Symbol.iterator]||r[Symbol.asyncIterator])&&typeof r.next==="function"){' + (maybeAsync ? "" : "(async()=>{") + `const stream=await tee(r,3)
r=stream[0]
` + (hooks.afterHandle?.length ? `c.response=c.responseValue=r
` : "") + `const listener=stream[1]
` + (hasTrace || hooks.afterResponse?.length ? `afterHandlerStreamListener=stream[2]
` : "") + `${setImmediateFn}(async ()=>{if(listener)for await(const v of listener){}
`, handleReporter.resolve(), fnLiteral += "})" + (maybeAsync ? "" : "})()") + "}else{", handleReporter.resolve(), fnLiteral += `}
`);
    };
  }
  if (hooks.afterHandle?.length || hasTrace) {
    const resolveHandler = reportHandler(isHandleFn ? handler2.name : undefined);
    hooks.afterHandle?.length ? fnLiteral += isAsyncHandler ? `let r=c.response=c.responseValue=await ${handle}
` : `let r=c.response=c.responseValue=${handle}
` : fnLiteral += isAsyncHandler ? `let r=await ${handle}
` : `let r=${handle}
`, resolveHandler();
    const reporter = report("afterHandle", {
      total: hooks.afterHandle?.length
    });
    if (hooks.afterHandle?.length)
      for (let i = 0;i < hooks.afterHandle.length; i++) {
        const hook = hooks.afterHandle[i], returning = hasReturn(hook), endUnit = reporter.resolveChild(hook.fn.name);
        returning ? (fnLiteral += isAsync(hook.fn) ? `af=await e.afterHandle[${i}](c)
` : `af=e.afterHandle[${i}](c)
`, endUnit("af"), validator.response ? (fnLiteral += "if(af!==undefined){", reporter.resolve(), fnLiteral += validation.response("af"), fnLiteral += "c.response=c.responseValue=af}") : (fnLiteral += "if(af!==undefined){", reporter.resolve(), fnLiteral += "c.response=c.responseValue=af}")) : (fnLiteral += isAsync(hook.fn) ? `await e.afterHandle[${i}](c)
` : `e.afterHandle[${i}](c)
`, endUnit());
      }
    reporter.resolve(), hooks.afterHandle?.length && (fnLiteral += `r=c.response
`), validator.response && (fnLiteral += validation.response()), fnLiteral += encodeCookie();
    const mapResponseReporter = report("mapResponse", {
      total: hooks.mapResponse?.length
    });
    if (hooks.mapResponse?.length)
      for (let i = 0;i < hooks.mapResponse.length; i++) {
        const mapResponse22 = hooks.mapResponse[i], endUnit = mapResponseReporter.resolveChild(mapResponse22.fn.name);
        fnLiteral += `mr=${isAsyncName(mapResponse22) ? "await " : ""}e.mapResponse[${i}](c)
if(mr!==undefined)r=c.response=c.responseValue=mr
`, endUnit();
      }
    mapResponseReporter.resolve(), fnLiteral += mapResponse3();
  } else {
    const resolveHandler = reportHandler(isHandleFn ? handler2.name : undefined);
    if (validator.response || hooks.mapResponse?.length || hasTrace) {
      fnLiteral += isAsyncHandler ? `let r=await ${handle}
` : `let r=${handle}
`, resolveHandler(), validator.response && (fnLiteral += validation.response());
      const mapResponseReporter = report("mapResponse", {
        total: hooks.mapResponse?.length
      });
      if (hooks.mapResponse?.length) {
        fnLiteral += `
c.response=c.responseValue=r
`;
        for (let i = 0;i < hooks.mapResponse.length; i++) {
          const mapResponse22 = hooks.mapResponse[i], endUnit = mapResponseReporter.resolveChild(mapResponse22.fn.name);
          fnLiteral += `
if(mr===undefined){mr=${isAsyncName(mapResponse22) ? "await " : ""}e.mapResponse[${i}](c)
if(mr!==undefined)r=c.response=c.responseValue=mr}
`, endUnit();
        }
      }
      mapResponseReporter.resolve(), fnLiteral += encodeCookie(), handler2 instanceof Response ? (fnLiteral += afterResponse(), fnLiteral += inference.set ? `if(isNotEmpty(c.set.headers)||c.set.status!==200||c.set.redirect||c.set.cookie)return mapResponse(${saveResponse}${handle}.clone(),c.set${mapResponseContext})
else return ${handle}.clone()` : `return ${handle}.clone()`, fnLiteral += `
`) : fnLiteral += mapResponse3();
    } else if (hasCookie || hasTrace) {
      fnLiteral += isAsyncHandler ? `let r=await ${handle}
` : `let r=${handle}
`, resolveHandler();
      const mapResponseReporter = report("mapResponse", {
        total: hooks.mapResponse?.length
      });
      if (hooks.mapResponse?.length) {
        fnLiteral += `c.response=c.responseValue= r
`;
        for (let i = 0;i < hooks.mapResponse.length; i++) {
          const mapResponse22 = hooks.mapResponse[i], endUnit = mapResponseReporter.resolveChild(mapResponse22.fn.name);
          fnLiteral += `if(mr===undefined){mr=${isAsyncName(mapResponse22) ? "await " : ""}e.mapResponse[${i}](c)
if(mr!==undefined)r=c.response=c.responseValue=mr}`, endUnit();
        }
      }
      mapResponseReporter.resolve(), fnLiteral += encodeCookie() + mapResponse3();
    } else {
      resolveHandler();
      const handled = isAsyncHandler ? `await ${handle}` : handle;
      handler2 instanceof Response ? (fnLiteral += afterResponse(), fnLiteral += inference.set ? `if(isNotEmpty(c.set.headers)||c.set.status!==200||c.set.redirect||c.set.cookie)return mapResponse(${saveResponse}${handle}.clone(),c.set${mapResponseContext})
else return ${handle}.clone()
` : `return ${handle}.clone()
`) : fnLiteral += mapResponse3(handled);
    }
  }
  if (fnLiteral += `
}catch(error){`, !maybeAsync && hooks.error?.length && (fnLiteral += "return(async()=>{"), fnLiteral += `const set=c.set
if(!set.status||set.status<300)set.status=error?.status||500
`, hasCookie && (fnLiteral += encodeCookie()), hasTrace && hooks.trace)
    for (let i = 0;i < hooks.trace.length; i++)
      fnLiteral += `report${i}?.resolve(error);reportChild${i}?.(error)
`;
  const errorReporter = report("error", {
    total: hooks.error?.length
  });
  if (hooks.error?.length) {
    fnLiteral += `c.error=error
`, hasValidation ? fnLiteral += `if(error instanceof TypeBoxError){c.code="VALIDATION"
c.set.status=422}else{c.code=error.code??error[ERROR_CODE]??"UNKNOWN"}` : fnLiteral += `c.code=error.code??error[ERROR_CODE]??"UNKNOWN"
`, fnLiteral += `let er
`, hooks.mapResponse?.length && (fnLiteral += `let mep
`);
    for (let i = 0;i < hooks.error.length; i++) {
      const endUnit = errorReporter.resolveChild(hooks.error[i].fn.name);
      if (isAsync(hooks.error[i]) ? fnLiteral += `er=await e.error[${i}](c)
` : fnLiteral += `er=e.error[${i}](c)
if(er instanceof Promise)er=await er
`, endUnit(), hooks.mapResponse?.length) {
        const mapResponseReporter = report("mapResponse", {
          total: hooks.mapResponse?.length
        });
        for (let i2 = 0;i2 < hooks.mapResponse.length; i2++) {
          const mapResponse22 = hooks.mapResponse[i2], endUnit2 = mapResponseReporter.resolveChild(mapResponse22.fn.name);
          fnLiteral += `c.response=c.responseValue=er
mep=e.mapResponse[${i2}](c)
if(mep instanceof Promise)mep=await mep
if(mep!==undefined)er=mep
`, endUnit2();
        }
        mapResponseReporter.resolve();
      }
      if (fnLiteral += `er=mapEarlyResponse(er,set${mapResponseContext})
`, fnLiteral += "if(er){", hasTrace && hooks.trace) {
        for (let i2 = 0;i2 < hooks.trace.length; i2++)
          fnLiteral += `report${i2}.resolve()
`;
        errorReporter.resolve();
      }
      fnLiteral += afterResponse(false), fnLiteral += "return er}";
    }
  }
  errorReporter.resolve(), fnLiteral += "return handleError(c,error,true)", !maybeAsync && hooks.error?.length && (fnLiteral += "})()"), fnLiteral += "}";
  const adapterVariables = adapter.inject ? Object.keys(adapter.inject).join(",") + "," : "";
  let init4 = "const {handler,handleError,hooks:e, " + allocateIf("validator,", hasValidation) + "mapResponse,mapCompactResponse,mapEarlyResponse,isNotEmpty,utils:{" + allocateIf("parseQuery,", hasBody) + allocateIf("parseQueryFromURL,", hasQuery) + "},error:{" + allocateIf("ValidationError,", hasValidation) + allocateIf("ParseError", hasBody) + "},fileType,schema,definitions,tee,ERROR_CODE," + allocateIf("parseCookie,", hasCookie) + allocateIf("signCookie,", hasCookie) + allocateIf("decodeURIComponent,", hasQuery) + "ElysiaCustomStatusResponse," + allocateIf("ELYSIA_TRACE,", hasTrace) + allocateIf("ELYSIA_REQUEST_ID,", hasTrace) + allocateIf("parser,", hooks.parse?.length) + allocateIf("getServer,", inference.server) + allocateIf("fileUnions,", fileUnions.length) + adapterVariables + allocateIf("TypeBoxError", hasValidation) + `}=hooks
const trace=e.trace
return ${maybeAsync ? "async " : ""}function handle(c){`;
  hooks.beforeHandle?.length && (init4 += `let be
`), hooks.afterHandle?.length && (init4 += `let af
`), hooks.mapResponse?.length && (init4 += `let mr
`), allowMeta && (init4 += `c.schema=schema
c.defs=definitions
`), fnLiteral = init4 + fnLiteral + "}", init4 = "";
  try {
    return Function("hooks", `"use strict";
` + fnLiteral)({
      handler: handler2,
      hooks: lifeCycleToFn(hooks),
      validator: hasValidation ? validator : undefined,
      handleError: app.handleError,
      mapResponse: adapterHandler.mapResponse,
      mapCompactResponse: adapterHandler.mapCompactResponse,
      mapEarlyResponse: adapterHandler.mapEarlyResponse,
      isNotEmpty,
      utils: {
        parseQuery: hasBody ? parseQuery : undefined,
        parseQueryFromURL: hasQuery ? validator.query?.provider === "standard" ? parseQueryStandardSchema : parseQueryFromURL : undefined
      },
      error: {
        ValidationError: hasValidation ? ValidationError2 : undefined,
        ParseError: hasBody ? ParseError2 : undefined
      },
      fileType,
      schema: app.router.history,
      definitions: app.definitions.type,
      tee,
      ERROR_CODE,
      parseCookie: hasCookie ? parseCookie3 : undefined,
      signCookie: hasCookie ? signCookie : undefined,
      Cookie: hasCookie ? Cookie : undefined,
      decodeURIComponent: hasQuery ? import_fast_decode_uri_component3.default : undefined,
      ElysiaCustomStatusResponse,
      ELYSIA_TRACE: hasTrace ? ELYSIA_TRACE : undefined,
      ELYSIA_REQUEST_ID: hasTrace ? ELYSIA_REQUEST_ID : undefined,
      getServer: inference.server ? () => app.getServer() : undefined,
      fileUnions: fileUnions.length ? fileUnions : undefined,
      TypeBoxError: hasValidation ? TypeBoxError : undefined,
      parser: app["~parser"],
      ...adapter.inject
    });
  } catch (error49) {
    const debugHooks = lifeCycleToFn(hooks);
    return console.log("[Composer] failed to generate optimized handler"), console.log("---"), console.log({
      handler: typeof handler2 == "function" ? handler2.toString() : handler2,
      instruction: fnLiteral,
      hooks: {
        ...debugHooks,
        transform: debugHooks?.transform?.map?.((x4) => x4.toString()),
        resolve: debugHooks?.resolve?.map?.((x4) => x4.toString()),
        beforeHandle: debugHooks?.beforeHandle?.map?.((x4) => x4.toString()),
        afterHandle: debugHooks?.afterHandle?.map?.((x4) => x4.toString()),
        mapResponse: debugHooks?.mapResponse?.map?.((x4) => x4.toString()),
        parse: debugHooks?.parse?.map?.((x4) => x4.toString()),
        error: debugHooks?.error?.map?.((x4) => x4.toString()),
        afterResponse: debugHooks?.afterResponse?.map?.((x4) => x4.toString()),
        stop: debugHooks?.stop?.map?.((x4) => x4.toString())
      },
      validator,
      definitions: app.definitions.type,
      error: error49
    }), console.log("---"), typeof process?.exit == "function" && process.exit(1), () => new Response("Internal Server Error", { status: 500 });
  }
};
var createOnRequestHandler = (app, addFn) => {
  let fnLiteral = "";
  const reporter = createReport({
    trace: app.event.trace,
    addFn: addFn ?? ((word) => {
      fnLiteral += word;
    })
  })("request", {
    total: app.event.request?.length
  });
  if (app.event.request?.length) {
    fnLiteral += "try{";
    for (let i = 0;i < app.event.request.length; i++) {
      const hook = app.event.request[i], withReturn = hasReturn(hook), maybeAsync = isAsync(hook), endUnit = reporter.resolveChild(app.event.request[i].fn.name);
      withReturn ? (fnLiteral += `re=mapEarlyResponse(${maybeAsync ? "await " : ""}onRequest[${i}](c),c.set)
`, endUnit("re"), fnLiteral += `if(re!==undefined)return re
`) : (fnLiteral += `${maybeAsync ? "await " : ""}onRequest[${i}](c)
`, endUnit());
    }
    fnLiteral += "}catch(error){return app.handleError(c,error,false)}";
  }
  return reporter.resolve(), fnLiteral;
};
var createHoc = (app, fnName = "map") => {
  const hoc = app.extender.higherOrderFunctions;
  if (!hoc.length)
    return "return " + fnName;
  const adapter = app["~adapter"].composeGeneralHandler;
  let handler2 = fnName;
  for (let i = 0;i < hoc.length; i++)
    handler2 = `hoc[${i}](${handler2},${adapter.parameters})`;
  return `return function hocMap(${adapter.parameters}){return ${handler2}(${adapter.parameters})}`;
};
var composeGeneralHandler = (app) => {
  const adapter = app["~adapter"].composeGeneralHandler;
  app.router.http.build();
  const isWebstandard = app["~adapter"].isWebStandard, hasTrace = app.event.trace?.length;
  let fnLiteral = "";
  const router = app.router;
  let findDynamicRoute = router.http.root.WS ? "const route=router.find(r.method==='GET'&&r.headers.get('upgrade')==='websocket'?'WS':r.method,p)" : "const route=router.find(r.method,p)";
  findDynamicRoute += router.http.root.ALL ? `??router.find('ALL',p)
` : `
`, isWebstandard && (findDynamicRoute += 'if(r.method==="HEAD"){const route=router.find("GET",p);if(route){c.params=route.params;const _res=route.store.handler?route.store.handler(c):route.store.compile()(c);if(_res)return Promise.resolve(_res).then((_res)=>{if(!_res.headers)_res.headers=new Headers();return getResponseLength(_res).then((length)=>{_res.headers.set("content-length", length);return new Response(null,{status:_res.status,statusText:_res.statusText,headers:_res.headers});})});}}');
  let afterResponse = `c.error=notFound
`;
  if (app.event.afterResponse?.length && !app.event.error) {
    afterResponse = `
c.error=notFound
`;
    const prefix = app.event.afterResponse.some(isAsync) ? "async" : "";
    afterResponse += `
${setImmediateFn}(${prefix}()=>{if(c.responseValue instanceof ElysiaCustomStatusResponse) c.set.status=c.responseValue.code
`;
    for (let i = 0;i < app.event.afterResponse.length; i++) {
      const fn22 = app.event.afterResponse[i].fn;
      afterResponse += `
${isAsyncName(fn22) ? "await " : ""}afterResponse[${i}](c)
`;
    }
    afterResponse += `})
`;
  }
  app.inference.query && (afterResponse += `
if(c.qi===-1){c.query={}}else{c.query=parseQueryFromURL(c.url,c.qi+1)}`);
  const error404 = adapter.error404(!!app.event.request?.length, !!app.event.error?.length, afterResponse);
  findDynamicRoute += error404.code, findDynamicRoute += `
c.params=route.params
if(route.store.handler)return route.store.handler(c)
return route.store.compile()(c)
`;
  let switchMap = "";
  for (const [path2, methods] of Object.entries(router.static)) {
    switchMap += `case'${path2}':`, app.config.strictPath !== true && (switchMap += `case'${getLoosePath(path2)}':`);
    const encoded = encodePath(path2);
    path2 !== encoded && (switchMap += `case'${encoded}':`), switchMap += "switch(r.method){", (("GET" in methods) || ("WS" in methods)) && (switchMap += "case 'GET':", ("WS" in methods) && (switchMap += `if(r.headers.get('upgrade')==='websocket')return ht[${methods.WS}].composed(c)
`, ("GET" in methods) || ("ALL" in methods ? switchMap += `return ht[${methods.ALL}].composed(c)
` : switchMap += `break map
`)), ("GET" in methods) && (switchMap += `return ht[${methods.GET}].composed(c)
`)), isWebstandard && (("GET" in methods) || ("ALL" in methods)) && !("HEAD" in methods) && (switchMap += `case 'HEAD':return Promise.resolve(ht[${methods.GET ?? methods.ALL}].composed(c)).then(_ht=>getResponseLength(_ht).then((length)=>{_ht.headers.set('content-length', length)
return new Response(null,{status:_ht.status,statusText:_ht.statusText,headers:_ht.headers})
}))
`);
    for (const [method, index2] of Object.entries(methods))
      method === "ALL" || method === "GET" || method === "WS" || (switchMap += `case '${method}':return ht[${index2}].composed(c)
`);
    "ALL" in methods ? switchMap += `default:return ht[${methods.ALL}].composed(c)
` : switchMap += `default:break map
`, switchMap += "}";
  }
  const maybeAsync = !!app.event.request?.some(isAsync), adapterVariables = adapter.inject ? Object.keys(adapter.inject).join(",") + "," : "";
  fnLiteral += `
const {app,mapEarlyResponse,NotFoundError,randomId,handleError,status,redirect,getResponseLength,ElysiaCustomStatusResponse,` + allocateIf("parseQueryFromURL,", app.inference.query) + allocateIf("ELYSIA_TRACE,", hasTrace) + allocateIf("ELYSIA_REQUEST_ID,", hasTrace) + adapterVariables + `}=data
const store=app.singleton.store
const decorator=app.singleton.decorator
const staticRouter=app.router.static.http
const ht=app.router.history
const router=app.router.http
const trace=app.event.trace?.map(x=>typeof x==='function'?x:x.fn)??[]
const notFound=new NotFoundError()
const hoc=app.extender.higherOrderFunctions.map(x=>x.fn)
`, app.event.request?.length && (fnLiteral += `const onRequest=app.event.request.map(x=>x.fn)
`), app.event.afterResponse?.length && (fnLiteral += `const afterResponse=app.event.afterResponse.map(x=>x.fn)
`), fnLiteral += error404.declare, app.event.trace?.length && (fnLiteral += "const " + app.event.trace.map((_6, i) => `tr${i}=app.event.trace[${i}].fn`).join(",") + `
`), fnLiteral += `${maybeAsync ? "async " : ""}function map(${adapter.parameters}){`, app.event.request?.length && (fnLiteral += `let re
`), fnLiteral += adapter.createContext(app), app.event.trace?.length && (fnLiteral += "c[ELYSIA_TRACE]=[" + app.event.trace.map((_6, i) => `tr${i}(c)`).join(",") + `]
`), fnLiteral += createOnRequestHandler(app), switchMap && (fnLiteral += `
map: switch(p){
` + switchMap + "}"), fnLiteral += findDynamicRoute + `}
` + createHoc(app);
  const handleError = composeErrorHandler(app);
  app.handleError = handleError;
  const fn3 = Function("data", `"use strict";
` + fnLiteral)({
    app,
    mapEarlyResponse: app["~adapter"].handler.mapEarlyResponse,
    NotFoundError,
    randomId,
    handleError,
    status,
    redirect,
    getResponseLength,
    ElysiaCustomStatusResponse,
    parseQueryFromURL: app.inference.query ? parseQueryFromURL : undefined,
    ELYSIA_TRACE: hasTrace ? ELYSIA_TRACE : undefined,
    ELYSIA_REQUEST_ID: hasTrace ? ELYSIA_REQUEST_ID : undefined,
    ...adapter.inject
  });
  return isBun && Bun.gc(false), fn3;
};
var composeErrorHandler = (app) => {
  const hooks = app.event;
  let fnLiteral = "";
  const adapter = app["~adapter"].composeError, adapterVariables = adapter.inject ? Object.keys(adapter.inject).join(",") + "," : "", hasTrace = !!app.event.trace?.length;
  fnLiteral += "const {mapResponse,ERROR_CODE,ElysiaCustomStatusResponse,ValidationError,TransformDecodeError," + allocateIf("onError,", app.event.error) + allocateIf("afterResponse,", app.event.afterResponse) + allocateIf("trace,", app.event.trace) + allocateIf("onMapResponse,", app.event.mapResponse) + allocateIf("ELYSIA_TRACE,", hasTrace) + allocateIf("ELYSIA_REQUEST_ID,", hasTrace) + adapterVariables + `}=inject
`, fnLiteral += "return async function(context,error,skipGlobal){", fnLiteral += "", hasTrace && (fnLiteral += `const id=context[ELYSIA_REQUEST_ID]
`);
  const report = createReport({
    context: "context",
    trace: hooks.trace,
    addFn: (word) => {
      fnLiteral += word;
    }
  }), afterResponse = () => {
    if (!hooks.afterResponse?.length && !hasTrace)
      return "";
    let afterResponse2 = "";
    const prefix = hooks.afterResponse?.some(isAsync) ? "async" : "";
    afterResponse2 += `
${setImmediateFn}(${prefix}()=>{`;
    const reporter = createReport({
      context: "context",
      trace: hooks.trace,
      addFn: (word) => {
        afterResponse2 += word;
      }
    })("afterResponse", {
      total: hooks.afterResponse?.length,
      name: "context"
    });
    if (hooks.afterResponse?.length && hooks.afterResponse)
      for (let i = 0;i < hooks.afterResponse.length; i++) {
        const fn3 = hooks.afterResponse[i].fn, endUnit = reporter.resolveChild(fn3.name);
        afterResponse2 += `
${isAsyncName(fn3) ? "await " : ""}afterResponse[${i}](context)
`, endUnit();
      }
    return reporter.resolve(), afterResponse2 += `})
`, afterResponse2;
  };
  fnLiteral += `const set=context.set
let _r
if(!context.code)context.code=error.code??error[ERROR_CODE]
if(!(context.error instanceof Error))context.error=error
if(error instanceof ElysiaCustomStatusResponse){set.status=error.status=error.code
error.message=error.response}`, adapter.declare && (fnLiteral += adapter.declare);
  const saveResponse = hasTrace || hooks.afterResponse?.length ? "context.response = " : "";
  if (fnLiteral += `if(typeof error?.toResponse==='function'&&!(error instanceof ValidationError)&&!(error instanceof TransformDecodeError)){try{let raw=error.toResponse()
if(typeof raw?.then==='function')raw=await raw
if(raw instanceof Response)set.status=raw.status
context.response=context.responseValue=raw
}catch(toResponseError){
}
}
`, app.event.error)
    for (let i = 0;i < app.event.error.length; i++) {
      const handler2 = app.event.error[i], response = `${isAsync(handler2) ? "await " : ""}onError[${i}](context)
`;
      if (fnLiteral += "if(skipGlobal!==true&&!context.response){", hasReturn(handler2)) {
        fnLiteral += `_r=${response}
if(_r!==undefined){if(_r instanceof Response){` + afterResponse() + `return mapResponse(_r,set${adapter.mapResponseContext})}if(_r instanceof ElysiaCustomStatusResponse){error.status=error.code
error.message=error.response}if(set.status===200||!set.status)set.status=error.status
`;
        const mapResponseReporter2 = report("mapResponse", {
          total: hooks.mapResponse?.length,
          name: "context"
        });
        if (hooks.mapResponse?.length)
          for (let i2 = 0;i2 < hooks.mapResponse.length; i2++) {
            const mapResponse3 = hooks.mapResponse[i2], endUnit = mapResponseReporter2.resolveChild(mapResponse3.fn.name);
            fnLiteral += `context.response=context.responseValue=_r
_r=${isAsyncName(mapResponse3) ? "await " : ""}onMapResponse[${i2}](context)
`, endUnit();
          }
        mapResponseReporter2.resolve(), fnLiteral += afterResponse() + `return mapResponse(${saveResponse}_r,set${adapter.mapResponseContext})}`;
      } else
        fnLiteral += response;
      fnLiteral += "}";
    }
  fnLiteral += `if(error instanceof ValidationError||error instanceof TransformDecodeError){
if(error.error)error=error.error
set.status=error.status??422
` + afterResponse() + adapter.validationError + `
}
`, fnLiteral += "if(!context.response&&error instanceof Error){" + afterResponse() + adapter.unknownError + `
}`;
  const mapResponseReporter = report("mapResponse", {
    total: hooks.mapResponse?.length,
    name: "context"
  });
  if (fnLiteral += `
if(!context.response)context.response=context.responseValue=error.message??error
`, hooks.mapResponse?.length) {
    fnLiteral += `let mr
`;
    for (let i = 0;i < hooks.mapResponse.length; i++) {
      const mapResponse3 = hooks.mapResponse[i], endUnit = mapResponseReporter.resolveChild(mapResponse3.fn.name);
      fnLiteral += `if(mr===undefined){mr=${isAsyncName(mapResponse3) ? "await " : ""}onMapResponse[${i}](context)
if(mr!==undefined)error=context.response=context.responseValue=mr}`, endUnit();
    }
  }
  mapResponseReporter.resolve(), fnLiteral += afterResponse() + `
return mapResponse(${saveResponse}error,set${adapter.mapResponseContext})}`;
  const mapFn = (x4) => typeof x4 == "function" ? x4 : x4.fn;
  return Function("inject", `"use strict";
` + fnLiteral)({
    mapResponse: app["~adapter"].handler.mapResponse,
    ERROR_CODE,
    ElysiaCustomStatusResponse,
    ValidationError: ValidationError2,
    TransformDecodeError,
    onError: app.event.error?.map(mapFn),
    afterResponse: app.event.afterResponse?.map(mapFn),
    trace: app.event.trace?.map(mapFn),
    onMapResponse: app.event.mapResponse?.map(mapFn),
    ELYSIA_TRACE: hasTrace ? ELYSIA_TRACE : undefined,
    ELYSIA_REQUEST_ID: hasTrace ? ELYSIA_REQUEST_ID : undefined,
    ...adapter.inject
  });
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/adapter/bun/compose.mjs
var allocateIf2 = (value, condition) => condition ? value : "";
var createContext = (app, route, inference, isInline = false) => {
  let fnLiteral = "";
  const defaultHeaders = app.setHeaders, hasTrace = !!app.event.trace?.length;
  hasTrace && (fnLiteral += `const id=randomId()
`);
  const isDynamic = /[:*]/.test(route.path), getQi = `const u=request.url,s=u.indexOf('/',${app.config.handler?.standardHostname ?? true ? 11 : 7}),qi=u.indexOf('?',s+1)
`, needsQuery = inference.query || !!route.hooks.query || !!route.hooks.standaloneValidator?.find((x4) => x4.query) || app.event.request?.length;
  needsQuery && (fnLiteral += getQi);
  const getPath = inference.path ? isDynamic ? "get path(){" + (needsQuery ? "" : getQi) + `if(qi===-1)return u.substring(s)
return u.substring(s,qi)
},` : `path:'${route.path}',` : "";
  fnLiteral += allocateIf2("const c=", !isInline) + "{request,store," + allocateIf2("qi,", needsQuery) + allocateIf2("params:request.params,", isDynamic) + getPath + allocateIf2("url:request.url,", hasTrace || inference.url || needsQuery) + "redirect,status,set:{headers:" + (isNotEmpty(defaultHeaders) ? "Object.assign({},app.setHeaders)" : "Object.create(null)") + ",status:200}", inference.server && (fnLiteral += ",get server(){return app.getServer()}"), hasTrace && (fnLiteral += ",[ELYSIA_REQUEST_ID]:id");
  {
    let decoratorsLiteral = "";
    for (const key of Object.keys(app.singleton.decorator))
      decoratorsLiteral += `,'${key}':decorator['${key}']`;
    fnLiteral += decoratorsLiteral;
  }
  return fnLiteral += `}
`, fnLiteral;
};
var createBunRouteHandler = (app, route) => {
  const hasTrace = !!app.event.trace?.length, hasHoc = !!app.extender.higherOrderFunctions.length;
  let inference = sucrose(route.hooks, app.inference);
  inference = sucrose({
    handler: route.handler
  }, inference);
  let fnLiteral = "const handler=data.handler,app=data.app,store=data.store,decorator=data.decorator,redirect=data.redirect,route=data.route,mapEarlyResponse=data.mapEarlyResponse," + allocateIf2("randomId=data.randomId,", hasTrace) + allocateIf2("ELYSIA_REQUEST_ID=data.ELYSIA_REQUEST_ID,", hasTrace) + allocateIf2("ELYSIA_TRACE=data.ELYSIA_TRACE,", hasTrace) + allocateIf2("trace=data.trace,", hasTrace) + allocateIf2("hoc=data.hoc,", hasHoc) + `status=data.status
`;
  app.event.request?.length && (fnLiteral += `const onRequest=app.event.request.map(x=>x.fn)
`), fnLiteral += `${app.event.request?.find(isAsync) ? "async" : ""} function map(request){`;
  const needsQuery = inference.query || !!route.hooks.query || !!route.hooks.standaloneValidator?.find((x4) => x4.query);
  return hasTrace || needsQuery || app.event.request?.length ? (fnLiteral += createContext(app, route, inference), fnLiteral += createOnRequestHandler(app), fnLiteral += "return handler(c)}") : fnLiteral += `return handler(${createContext(app, route, inference, true)})}`, fnLiteral += createHoc(app), Function("data", fnLiteral)({
    app,
    handler: route.compile?.() ?? route.composed,
    redirect,
    status,
    hoc: app.extender.higherOrderFunctions.map((x4) => x4.fn),
    store: app.store,
    decorator: app.decorator,
    route: route.path,
    randomId: hasTrace ? randomId : undefined,
    ELYSIA_TRACE: hasTrace ? ELYSIA_TRACE : undefined,
    ELYSIA_REQUEST_ID: hasTrace ? ELYSIA_REQUEST_ID : undefined,
    trace: hasTrace ? app.event.trace?.map((x4) => x4?.fn ?? x4) : undefined,
    mapEarlyResponse: mapEarlyResponse2
  });
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/adapter/bun/handler-native.mjs
var createNativeStaticHandler = (handle, hooks, set2) => {
  if (typeof handle == "function" || handle instanceof Blob)
    return;
  if (isHTMLBundle(handle))
    return () => handle;
  const response = mapResponse2(handle instanceof Response ? handle.clone() : handle instanceof Promise ? handle.then((x4) => x4 instanceof Response ? x4.clone() : isHTMLBundle(x4) ? () => x4 : x4) : handle, set2 ?? {
    headers: {}
  });
  if (!hooks.parse?.length && !hooks.transform?.length && !hooks.beforeHandle?.length && !hooks.afterHandle?.length)
    return response instanceof Promise ? response.then((response2) => {
      if (response2)
        return response2.clone();
    }) : () => response.clone();
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/ws/index.mjs
var websocket = {
  open(ws3) {
    ws3.data.open?.(ws3);
  },
  message(ws3, message2) {
    ws3.data.message?.(ws3, message2);
  },
  drain(ws3) {
    ws3.data.drain?.(ws3);
  },
  close(ws3, code2, reason) {
    ws3.data.close?.(ws3, code2, reason);
  },
  ping(ws3) {
    ws3.data.ping?.(ws3);
  },
  pong(ws3) {
    ws3.data.pong?.(ws3);
  }
};

class ElysiaWS {
  constructor(raw, data, body2 = undefined) {
    this.raw = raw;
    this.data = data;
    this.body = body2;
    this.validator = raw.data?.validator, this.sendText = raw.sendText.bind(raw), this.sendBinary = raw.sendBinary.bind(raw), this.close = raw.close.bind(raw), this.terminate = raw.terminate.bind(raw), this.publishText = raw.publishText.bind(raw), this.publishBinary = raw.publishBinary.bind(raw), this.subscribe = raw.subscribe.bind(raw), this.unsubscribe = raw.unsubscribe.bind(raw), this.isSubscribed = raw.isSubscribed.bind(raw), this.cork = raw.cork.bind(raw), this.remoteAddress = raw.remoteAddress, this.binaryType = raw.binaryType, this.data = raw.data, this.subscriptions = raw.subscriptions, this.send = this.send.bind(this), this.ping = this.ping.bind(this), this.pong = this.pong.bind(this), this.publish = this.publish.bind(this);
  }
  send(data, compress) {
    return Buffer.isBuffer(data) ? this.raw.send(data, compress) : this.validator?.Check(data) === false ? this.raw.send(new ValidationError2("message", this.validator, data).message) : (typeof data == "object" && (data = JSON.stringify(data)), this.raw.send(data, compress));
  }
  ping(data) {
    return Buffer.isBuffer(data) ? this.raw.ping(data) : this.validator?.Check(data) === false ? this.raw.send(new ValidationError2("message", this.validator, data).message) : (typeof data == "object" && (data = JSON.stringify(data)), this.raw.ping(data));
  }
  pong(data) {
    return Buffer.isBuffer(data) ? this.raw.pong(data) : this.validator?.Check(data) === false ? this.raw.send(new ValidationError2("message", this.validator, data).message) : (typeof data == "object" && (data = JSON.stringify(data)), this.raw.pong(data));
  }
  publish(topic2, data, compress) {
    return Buffer.isBuffer(data) ? this.raw.publish(topic2, data, compress) : this.validator?.Check(data) === false ? this.raw.send(new ValidationError2("message", this.validator, data).message) : (typeof data == "object" && (data = JSON.stringify(data)), this.raw.publish(topic2, data, compress));
  }
  get readyState() {
    return this.raw.readyState;
  }
  get id() {
    return this.data.id;
  }
}
var createWSMessageParser = (parse8) => {
  const parsers2 = typeof parse8 == "function" ? [parse8] : parse8;
  return async function(ws3, message2) {
    if (typeof message2 == "string") {
      const start = message2?.charCodeAt(0);
      if (start === 34 || start === 47 || start === 91 || start === 123)
        try {
          message2 = JSON.parse(message2);
        } catch {}
      else
        isNumericString(message2) ? message2 = +message2 : message2 === "true" ? message2 = true : message2 === "false" ? message2 = false : message2 === "null" && (message2 = null);
    }
    if (parsers2)
      for (let i = 0;i < parsers2.length; i++) {
        let temp = parsers2[i](ws3, message2);
        if (temp instanceof Promise && (temp = await temp), temp !== undefined)
          return temp;
      }
    return message2;
  };
};
var createHandleWSResponse = (responseValidator) => {
  const handleWSResponse = (ws3, data) => {
    if (data instanceof Promise)
      return data.then((data2) => handleWSResponse(ws3, data2));
    if (Buffer.isBuffer(data))
      return ws3.send(data.toString());
    if (data === undefined)
      return;
    const validateResponse = responseValidator ? responseValidator.provider === "standard" ? (data2) => responseValidator.schema["~standard"].validate(data2).issues : (data2) => responseValidator.Check(data2) === false : undefined, send = (datum) => {
      if (validateResponse && validateResponse(datum) === false)
        return ws3.send(new ValidationError2("message", responseValidator, datum).message);
      if (typeof datum == "object")
        return ws3.send(JSON.stringify(datum));
      ws3.send(datum);
    };
    if (typeof data?.next != "function")
      return void send(data);
    const init4 = data.next();
    if (init4 instanceof Promise)
      return (async () => {
        const first = await init4;
        if (validateResponse && validateResponse(first))
          return ws3.send(new ValidationError2("message", responseValidator, first).message);
        if (send(first.value), !first.done)
          for await (const datum of data)
            send(datum);
      })();
    if (send(init4.value), !init4.done)
      for (const datum of data)
        send(datum);
  };
  return handleWSResponse;
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/adapter/bun/index.mjs
var optionalParam = /:.+?\?(?=\/|$)/;
var getPossibleParams = (path2) => {
  const match = optionalParam.exec(path2);
  if (!match)
    return [path2];
  const routes = [], head2 = path2.slice(0, match.index), param = match[0].slice(0, -1), tail = path2.slice(match.index + match[0].length);
  routes.push(head2.slice(0, -1)), routes.push(head2 + param);
  for (const fragment of getPossibleParams(tail))
    fragment && (fragment.startsWith("/:") || routes.push(head2.slice(0, -1) + fragment), routes.push(head2 + param + fragment));
  return routes;
};
var isHTMLBundle = (handle) => typeof handle == "object" && handle !== null && (handle.toString() === "[object HTMLBundle]" || typeof handle.index == "string");
var supportedMethods = {
  GET: true,
  HEAD: true,
  OPTIONS: true,
  DELETE: true,
  PATCH: true,
  POST: true,
  PUT: true
};
var mapRoutes = (app) => {
  if (!app.config.aot || app.config.systemRouter === false)
    return;
  const routes = {}, add = (route, handler2) => {
    const path2 = encodeURI(route.path);
    routes[path2] ? routes[path2][route.method] || (routes[path2][route.method] = handler2) : routes[path2] = {
      [route.method]: handler2
    };
  }, tree = app.routeTree;
  for (const route of app.router.history) {
    if (typeof route.handler != "function")
      continue;
    const method = route.method;
    if (method === "GET" && `WS_${route.path}` in tree || method === "WS" || route.path.charCodeAt(route.path.length - 1) === 42 || !(method in supportedMethods))
      continue;
    if (method === "ALL") {
      `WS_${route.path}` in tree || (routes[route.path] = route.hooks?.config?.mount ? route.hooks.trace || app.event.trace || app.extender.higherOrderFunctions ? createBunRouteHandler(app, route) : route.hooks.mount || route.handler : route.handler);
      continue;
    }
    let compiled;
    const handler2 = app.config.precompile ? createBunRouteHandler(app, route) : (request2) => compiled ? compiled(request2) : (compiled = createBunRouteHandler(app, route))(request2);
    for (const path2 of getPossibleParams(route.path))
      add({
        method,
        path: path2
      }, handler2);
  }
  return routes;
};
var mergeRoutes = (r1, r2) => {
  if (!r2)
    return r1;
  for (const key of Object.keys(r2))
    if (r1[key] !== r2[key]) {
      if (!r1[key]) {
        r1[key] = r2[key];
        continue;
      }
      if (r1[key] && r2[key]) {
        if (typeof r1[key] == "function" || r1[key] instanceof Response) {
          r1[key] = r2[key];
          continue;
        }
        r1[key] = {
          ...r1[key],
          ...r2[key]
        };
      }
    }
  return r1;
};
var removeTrailingPath = (routes) => {
  for (const key of Object.keys(routes))
    key.length > 1 && key.charCodeAt(key.length - 1) === 47 && (routes[key.slice(0, -1)] = routes[key], delete routes[key]);
  return routes;
};
var BunAdapter = {
  ...WebStandardAdapter,
  name: "bun",
  handler: {
    mapResponse: mapResponse2,
    mapEarlyResponse: mapEarlyResponse2,
    mapCompactResponse: mapCompactResponse2,
    createStaticHandler: createStaticHandler2,
    createNativeStaticHandler
  },
  composeHandler: {
    ...WebStandardAdapter.composeHandler,
    headers: hasHeaderShorthand ? `c.headers=c.request.headers.toJSON()
` : `c.headers={}
for(const [k,v] of c.request.headers.entries())c.headers[k]=v
`
  },
  listen(app) {
    return (options2, callback) => {
      if (typeof Bun > "u")
        throw new Error(".listen() is designed to run on Bun only. If you are running Elysia in other environment please use a dedicated plugin or export the handler via Elysia.fetch");
      if (app.compile(), typeof options2 == "string") {
        if (!isNumericString(options2))
          throw new Error("Port must be a numeric value");
        options2 = parseInt(options2);
      }
      const createStaticRoute = (iterator, { withAsync = false } = {}) => {
        const staticRoutes = {}, ops = [];
        for (let [path2, route] of Object.entries(iterator))
          if (path2 = encodeURI(path2), supportPerMethodInlineHandler) {
            if (!route)
              continue;
            for (const [method, value] of Object.entries(route))
              if (!(!value || !(method in supportedMethods))) {
                if (value instanceof Promise) {
                  withAsync && (staticRoutes[path2] || (staticRoutes[path2] = {}), ops.push(value.then((awaited) => {
                    awaited instanceof Response && (staticRoutes[path2][method] = awaited), isHTMLBundle(awaited) && (staticRoutes[path2][method] = awaited);
                  })));
                  continue;
                }
                !(value instanceof Response) && !isHTMLBundle(value) || (staticRoutes[path2] || (staticRoutes[path2] = {}), staticRoutes[path2][method] = value);
              }
          } else {
            if (!route)
              continue;
            if (route instanceof Promise) {
              withAsync && (staticRoutes[path2] || (staticRoutes[path2] = {}), ops.push(route.then((awaited) => {
                awaited instanceof Response && (staticRoutes[path2] = awaited);
              })));
              continue;
            }
            if (!(route instanceof Response))
              continue;
            staticRoutes[path2] = route;
          }
        return withAsync ? Promise.all(ops).then(() => staticRoutes) : staticRoutes;
      }, routes = removeTrailingPath(mergeRoutes(mergeRoutes(createStaticRoute(app.router.response), mapRoutes(app)), app.config.serve?.routes)), serve = typeof options2 == "object" ? {
        development: !isProduction,
        reusePort: true,
        idleTimeout: 30,
        ...app.config.serve || {},
        ...options2 || {},
        routes,
        websocket: {
          ...app.config.websocket || {},
          ...websocket || {},
          ...options2.websocket || {}
        },
        fetch: app.fetch
      } : {
        development: !isProduction,
        reusePort: true,
        idleTimeout: 30,
        ...app.config.serve || {},
        routes,
        websocket: {
          ...app.config.websocket || {},
          ...websocket || {}
        },
        port: options2,
        fetch: app.fetch
      };
      if (app.server = Bun.serve(serve), app.event.start)
        for (let i = 0;i < app.event.start.length; i++)
          app.event.start[i].fn(app);
      callback && callback(app.server), process.on("beforeExit", async () => {
        if (app.server && (await app.server.stop?.(), app.server = null, app.event.stop))
          for (let i = 0;i < app.event.stop.length; i++)
            app.event.stop[i].fn(app);
      }), app.promisedModules.then(async () => {
        app.config.aot, app.compile();
        const routes2 = removeTrailingPath(mergeRoutes(mergeRoutes(await createStaticRoute(app.router.response, {
          withAsync: true
        }), mapRoutes(app)), app.config.serve?.routes));
        app.server?.reload({
          ...serve,
          fetch: app.fetch,
          routes: routes2
        }), Bun?.gc(false);
      });
    };
  },
  async stop(app, closeActiveConnections) {
    if (app.server) {
      if (await app.server.stop(closeActiveConnections), app.server = null, app.event.stop?.length)
        for (let i = 0;i < app.event.stop.length; i++)
          app.event.stop[i].fn(app);
    } else
      console.log("Elysia isn't running. Call `app.listen` to start the server.", new Error().stack);
  },
  ws(app, path2, options2) {
    const { parse: parse8, body: body2, response, ...rest } = options2, messageValidator = getSchemaValidator(body2, {
      modules: app.definitions.typebox,
      models: app.definitions.type,
      normalize: app.config.normalize
    }), validateMessage = messageValidator ? messageValidator.provider === "standard" ? (data) => messageValidator.schema["~standard"].validate(data).issues : (data) => messageValidator.Check(data) === false : undefined, responseValidator = getSchemaValidator(response, {
      modules: app.definitions.typebox,
      models: app.definitions.type,
      normalize: app.config.normalize
    });
    app.route("WS", path2, async (context10) => {
      const server = context10.server ?? app.server, { set: set2, path: path22, qi: qi3, headers, query, params } = context10;
      if (context10.validator = responseValidator, options2.upgrade)
        if (typeof options2.upgrade == "function") {
          const temp = options2.upgrade(context10);
          temp instanceof Promise && await temp;
        } else
          options2.upgrade && Object.assign(set2.headers, options2.upgrade);
      if (set2.cookie && isNotEmpty(set2.cookie)) {
        const cookie2 = serializeCookie(set2.cookie);
        cookie2 && (set2.headers["set-cookie"] = cookie2);
      }
      set2.headers["set-cookie"] && Array.isArray(set2.headers["set-cookie"]) && (set2.headers = parseSetCookies(new Headers(set2.headers), set2.headers["set-cookie"]));
      const handleResponse3 = createHandleWSResponse(responseValidator), parseMessage = createWSMessageParser(parse8);
      let _id;
      if (typeof options2.beforeHandle == "function") {
        const result = options2.beforeHandle(context10);
        result instanceof Promise && await result;
      }
      const errorHandlers = [
        ...options2.error ? Array.isArray(options2.error) ? options2.error : [options2.error] : [],
        ...(app.event.error ?? []).map((x4) => typeof x4 == "function" ? x4 : x4.fn)
      ].filter((x4) => x4), hasCustomErrorHandlers = errorHandlers.length > 0, handleErrors = hasCustomErrorHandlers ? async (ws3, error49) => {
        for (const handleError of errorHandlers) {
          let response2 = handleError(Object.assign(context10, { error: error49 }));
          if (response2 instanceof Promise && (response2 = await response2), await handleResponse3(ws3, response2), response2)
            break;
        }
      } : () => {};
      if (!server?.upgrade(context10.request, {
        headers: isNotEmpty(set2.headers) ? set2.headers : undefined,
        data: {
          ...context10,
          get id() {
            return _id || (_id = randomId());
          },
          validator: responseValidator,
          ping(ws3, data) {
            options2.ping?.(ws3, data);
          },
          pong(ws3, data) {
            options2.pong?.(ws3, data);
          },
          open: async (ws3) => {
            try {
              await handleResponse3(ws3, options2.open?.(new ElysiaWS(ws3, context10)));
            } catch (error49) {
              handleErrors(ws3, error49);
            }
          },
          message: async (ws3, _message) => {
            const message2 = await parseMessage(ws3, _message);
            if (validateMessage && validateMessage(message2)) {
              const validationError = new ValidationError2("message", messageValidator, message2);
              return hasCustomErrorHandlers ? handleErrors(ws3, validationError) : void ws3.send(validationError.message);
            }
            try {
              await handleResponse3(ws3, options2.message?.(new ElysiaWS(ws3, context10, message2), message2));
            } catch (error49) {
              handleErrors(ws3, error49);
            }
          },
          drain: async (ws3) => {
            try {
              await handleResponse3(ws3, options2.drain?.(new ElysiaWS(ws3, context10)));
            } catch (error49) {
              handleErrors(ws3, error49);
            }
          },
          close: async (ws3, code2, reason) => {
            try {
              await handleResponse3(ws3, options2.close?.(new ElysiaWS(ws3, context10), code2, reason));
            } catch (error49) {
              handleErrors(ws3, error49);
            }
          }
        }
      }))
        return status(400, "Expected a websocket connection");
    }, {
      ...rest,
      websocket: options2
    });
  }
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/universal/env.mjs
var env3 = isBun ? Bun.env : typeof process < "u" && process?.env ? process.env : {};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/dynamic-handle.mjs
var ARRAY_INDEX_REGEX = /^(.+)\[(\d+)\]$/;
var DANGEROUS_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
var isDangerousKey = (key) => {
  if (DANGEROUS_KEYS.has(key))
    return true;
  const match = key.match(ARRAY_INDEX_REGEX);
  return match ? DANGEROUS_KEYS.has(match[1]) : false;
};
var parseArrayKey = (key) => {
  const match = key.match(ARRAY_INDEX_REGEX);
  return match ? {
    name: match[1],
    index: parseInt(match[2], 10)
  } : null;
};
var parseObjectString = (entry) => {
  if (!(typeof entry != "string" || entry.charCodeAt(0) !== 123))
    try {
      const parsed = JSON.parse(entry);
      if (parsed && typeof parsed == "object" && !Array.isArray(parsed))
        return parsed;
    } catch {
      return;
    }
};
var setNestedValue = (obj, path2, value) => {
  const keys = path2.split("."), lastKey = keys.pop();
  if (isDangerousKey(lastKey) || keys.some(isDangerousKey))
    return;
  let current = obj;
  for (const key of keys) {
    const arrayInfo2 = parseArrayKey(key);
    if (arrayInfo2) {
      Array.isArray(current[arrayInfo2.name]) || (current[arrayInfo2.name] = []);
      const existing = current[arrayInfo2.name][arrayInfo2.index], isFile = typeof File < "u" && existing instanceof File;
      (!existing || typeof existing != "object" || Array.isArray(existing) || isFile) && (current[arrayInfo2.name][arrayInfo2.index] = parseObjectString(existing) ?? {}), current = current[arrayInfo2.name][arrayInfo2.index];
    } else
      (!current[key] || typeof current[key] != "object") && (current[key] = {}), current = current[key];
  }
  const arrayInfo = parseArrayKey(lastKey);
  arrayInfo ? (Array.isArray(current[arrayInfo.name]) || (current[arrayInfo.name] = []), current[arrayInfo.name][arrayInfo.index] = value) : current[lastKey] = value;
};
var normalizeFormValue = (value) => {
  if (value.length === 1) {
    const stringValue2 = value[0];
    if (typeof stringValue2 == "string" && (stringValue2.charCodeAt(0) === 123 || stringValue2.charCodeAt(0) === 91))
      try {
        const parsed2 = JSON.parse(stringValue2);
        if (parsed2 && typeof parsed2 == "object")
          return parsed2;
      } catch {}
    return value[0];
  }
  const stringValue = value.find((entry) => typeof entry == "string");
  if (!stringValue || typeof File > "u")
    return value;
  const files = value.filter((entry) => entry instanceof File);
  if (!files.length || stringValue.charCodeAt(0) !== 123)
    return value;
  let parsed;
  try {
    parsed = JSON.parse(stringValue);
  } catch {
    return value;
  }
  return typeof parsed != "object" || parsed === null ? value : (!("file" in parsed) && files.length === 1 ? parsed.file = files[0] : !("files" in parsed) && files.length > 1 && (parsed.files = files), parsed);
};
var injectDefaultValues = (typeChecker, obj) => {
  let schema = typeChecker.schema;
  if (!schema)
    return;
  schema.$defs?.[schema.$ref] && (schema = schema.$defs[schema.$ref]);
  const properties2 = getSchemaProperties(schema);
  if (properties2)
    for (const [key, keySchema] of Object.entries(properties2))
      obj[key] ??= keySchema.default;
};
var createDynamicHandler = (app) => {
  const { mapResponse: mapResponse3, mapEarlyResponse: mapEarlyResponse3 } = app["~adapter"].handler, defaultHeader = app.setHeaders;
  return async (request2) => {
    const url2 = request2.url, s3 = url2.indexOf("/", 11), qi3 = url2.indexOf("?", s3 + 1), path2 = qi3 === -1 ? url2.substring(s3) : url2.substring(s3, qi3), set2 = {
      cookie: {},
      status: 200,
      headers: defaultHeader ? { ...defaultHeader } : {}
    }, context10 = Object.assign({}, app.singleton.decorator, {
      set: set2,
      store: app.singleton.store,
      request: request2,
      path: path2,
      qi: qi3,
      error: status,
      status,
      redirect
    });
    let hooks;
    try {
      if (app.event.request)
        for (let i = 0;i < app.event.request.length; i++) {
          const onRequest = app.event.request[i].fn;
          let response2 = onRequest(context10);
          if (response2 instanceof Promise && (response2 = await response2), response2 = mapEarlyResponse3(response2, set2), response2)
            return context10.response = response2;
        }
      const methodKey = request2.method === "GET" && request2.headers.get("upgrade")?.toLowerCase() === "websocket" ? "WS" : request2.method, handler2 = app.router.dynamic.find(request2.method, path2) ?? app.router.dynamic.find(methodKey, path2) ?? app.router.dynamic.find("ALL", path2);
      if (!handler2)
        throw context10.query = qi3 === -1 ? {} : parseQuery(url2.substring(qi3 + 1)), new NotFoundError;
      const { handle, validator, content, route } = handler2.store;
      if (hooks = handler2.store.hooks, hooks.config?.mount)
        return await hooks.config.mount(request2);
      let body2;
      if (request2.method !== "GET" && request2.method !== "HEAD")
        if (content)
          switch (content) {
            case "application/json":
              body2 = await request2.json();
              break;
            case "text/plain":
              body2 = await request2.text();
              break;
            case "application/x-www-form-urlencoded":
              body2 = parseQuery(await request2.text());
              break;
            case "application/octet-stream":
              body2 = await request2.arrayBuffer();
              break;
            case "multipart/form-data": {
              body2 = {};
              const form2 = await request2.formData(), grouped = /* @__PURE__ */ new Map;
              form2.forEach((v5, k4) => {
                const list2 = grouped.get(k4);
                list2 ? list2.push(v5) : grouped.set(k4, [v5]);
              });
              for (const [key, value] of grouped) {
                if (body2[key])
                  continue;
                const finalValue = normalizeFormValue(value);
                key.includes(".") || key.includes("[") ? setNestedValue(body2, key, finalValue) : body2[key] = finalValue;
              }
              break;
            }
          }
        else {
          let contentType;
          if (request2.body && (contentType = request2.headers.get("content-type")), contentType) {
            const index2 = contentType.indexOf(";");
            if (index2 !== -1 && (contentType = contentType.slice(0, index2)), context10.contentType = contentType, hooks.parse)
              for (let i = 0;i < hooks.parse.length; i++) {
                const hook = hooks.parse[i].fn;
                if (typeof hook == "string")
                  switch (hook) {
                    case "json":
                    case "application/json":
                      body2 = await request2.json();
                      break;
                    case "text":
                    case "text/plain":
                      body2 = await request2.text();
                      break;
                    case "urlencoded":
                    case "application/x-www-form-urlencoded":
                      body2 = parseQuery(await request2.text());
                      break;
                    case "arrayBuffer":
                    case "application/octet-stream":
                      body2 = await request2.arrayBuffer();
                      break;
                    case "formdata":
                    case "multipart/form-data": {
                      body2 = {};
                      const form2 = await request2.formData(), grouped = /* @__PURE__ */ new Map;
                      form2.forEach((v5, k4) => {
                        const list2 = grouped.get(k4);
                        list2 ? list2.push(v5) : grouped.set(k4, [v5]);
                      });
                      for (const [key, value] of grouped) {
                        if (body2[key])
                          continue;
                        const finalValue = normalizeFormValue(value);
                        key.includes(".") || key.includes("[") ? setNestedValue(body2, key, finalValue) : body2[key] = finalValue;
                      }
                      break;
                    }
                    default: {
                      const parser2 = app["~parser"][hook];
                      if (parser2) {
                        let temp = parser2(context10, contentType);
                        if (temp instanceof Promise && (temp = await temp), temp) {
                          body2 = temp;
                          break;
                        }
                      }
                      break;
                    }
                  }
                else {
                  let temp = hook(context10, contentType);
                  if (temp instanceof Promise && (temp = await temp), temp) {
                    body2 = temp;
                    break;
                  }
                }
              }
            if (delete context10.contentType, body2 === undefined)
              switch (contentType) {
                case "application/json":
                  body2 = await request2.json();
                  break;
                case "text/plain":
                  body2 = await request2.text();
                  break;
                case "application/x-www-form-urlencoded":
                  body2 = parseQuery(await request2.text());
                  break;
                case "application/octet-stream":
                  body2 = await request2.arrayBuffer();
                  break;
                case "multipart/form-data": {
                  body2 = {};
                  const form2 = await request2.formData(), grouped = /* @__PURE__ */ new Map;
                  form2.forEach((v5, k4) => {
                    const list2 = grouped.get(k4);
                    list2 ? list2.push(v5) : grouped.set(k4, [v5]);
                  });
                  for (const [key, value] of grouped) {
                    if (body2[key])
                      continue;
                    const finalValue = normalizeFormValue(value);
                    key.includes(".") || key.includes("[") ? setNestedValue(body2, key, finalValue) : body2[key] = finalValue;
                  }
                  break;
                }
              }
          }
        }
      context10.route = route, context10.body = body2, context10.params = handler2?.params || undefined, context10.query = qi3 === -1 ? {} : parseQuery(url2.substring(qi3 + 1)), context10.headers = {};
      for (const [key, value] of request2.headers.entries())
        context10.headers[key] = value;
      const cookieMeta = {
        domain: app.config.cookie?.domain ?? validator?.cookie?.config.domain,
        expires: app.config.cookie?.expires ?? validator?.cookie?.config.expires,
        httpOnly: app.config.cookie?.httpOnly ?? validator?.cookie?.config.httpOnly,
        maxAge: app.config.cookie?.maxAge ?? validator?.cookie?.config.maxAge,
        path: app.config.cookie?.path ?? validator?.cookie?.config.path,
        priority: app.config.cookie?.priority ?? validator?.cookie?.config.priority,
        partitioned: app.config.cookie?.partitioned ?? validator?.cookie?.config.partitioned,
        sameSite: app.config.cookie?.sameSite ?? validator?.cookie?.config.sameSite,
        secure: app.config.cookie?.secure ?? validator?.cookie?.config.secure,
        secrets: app.config.cookie?.secrets ?? validator?.cookie?.config.secrets,
        sign: app.config.cookie?.sign ?? validator?.cookie?.config.sign
      }, cookieHeaderValue = request2.headers.get("cookie");
      context10.cookie = await parseCookie3(context10.set, cookieHeaderValue, cookieMeta);
      const headerValidator = validator?.createHeaders?.();
      headerValidator && injectDefaultValues(headerValidator, context10.headers);
      const paramsValidator = validator?.createParams?.();
      paramsValidator && injectDefaultValues(paramsValidator, context10.params);
      const queryValidator = validator?.createQuery?.();
      if (queryValidator && injectDefaultValues(queryValidator, context10.query), hooks.transform)
        for (let i = 0;i < hooks.transform.length; i++) {
          const hook = hooks.transform[i];
          let response2 = hook.fn(context10);
          if (response2 instanceof Promise && (response2 = await response2), response2 instanceof ElysiaCustomStatusResponse) {
            const result = mapEarlyResponse3(response2, context10.set);
            if (result)
              return context10.response = result;
          }
          hook.subType === "derive" && Object.assign(context10, response2);
        }
      if (validator) {
        if (headerValidator) {
          const _header = structuredClone(context10.headers);
          for (const [key, value] of request2.headers)
            _header[key] = value;
          if (validator.headers.Check(_header) === false)
            throw new ValidationError2("header", validator.headers, _header);
        } else
          validator.headers?.Decode && (context10.headers = validator.headers.Decode(context10.headers));
        if (paramsValidator?.Check(context10.params) === false)
          throw new ValidationError2("params", validator.params, context10.params);
        if (validator.params?.Decode && (context10.params = validator.params.Decode(context10.params)), validator.query?.schema) {
          let schema = validator.query.schema;
          schema.$defs?.[schema.$ref] && (schema = schema.$defs[schema.$ref]);
          const properties2 = getSchemaProperties(schema);
          if (properties2)
            for (const property2 of Object.keys(properties2)) {
              const value = properties2[property2];
              (value.type === "array" || value.items?.type === "string") && typeof context10.query[property2] == "string" && context10.query[property2] && (context10.query[property2] = context10.query[property2].split(","));
            }
        }
        if (queryValidator?.Check(context10.query) === false)
          throw new ValidationError2("query", validator.query, context10.query);
        if (validator.query?.Decode && (context10.query = validator.query.Decode(context10.query)), validator.createCookie?.()) {
          let cookieValue = {};
          for (const [key, value] of Object.entries(context10.cookie))
            cookieValue[key] = value.value;
          if (validator.cookie.Check(cookieValue) === false)
            throw new ValidationError2("cookie", validator.cookie, cookieValue);
          validator.cookie?.Decode && (cookieValue = validator.cookie.Decode(cookieValue));
        }
        if (validator.createBody?.()?.Check(body2) === false)
          throw new ValidationError2("body", validator.body, body2);
        if (validator.body?.Decode) {
          let decoded = validator.body.Decode(body2);
          decoded instanceof Promise && (decoded = await decoded), context10.body = decoded?.value ?? decoded;
        }
      }
      if (hooks.beforeHandle)
        for (let i = 0;i < hooks.beforeHandle.length; i++) {
          const hook = hooks.beforeHandle[i];
          let response2 = hook.fn(context10);
          if (response2 instanceof Promise && (response2 = await response2), response2 instanceof ElysiaCustomStatusResponse) {
            const result = mapEarlyResponse3(response2, context10.set);
            if (result)
              return context10.response = result;
          }
          if (hook.subType === "resolve") {
            Object.assign(context10, response2);
            continue;
          }
          if (response2 !== undefined) {
            if (context10.response = response2, hooks.afterHandle)
              for (let i2 = 0;i2 < hooks.afterHandle.length; i2++) {
                let newResponse = hooks.afterHandle[i2].fn(context10);
                newResponse instanceof Promise && (newResponse = await newResponse), newResponse && (response2 = newResponse);
              }
            const result = mapEarlyResponse3(response2, context10.set);
            if (result)
              return context10.response = result;
          }
        }
      let response = typeof handle == "function" ? handle(context10) : handle;
      if (response instanceof Promise && (response = await response), hooks.afterHandle?.length) {
        context10.response = response;
        for (let i = 0;i < hooks.afterHandle.length; i++) {
          let response2 = hooks.afterHandle[i].fn(context10);
          response2 instanceof Promise && (response2 = await response2);
          const isCustomStatuResponse = response2 instanceof ElysiaCustomStatusResponse, status2 = isCustomStatuResponse ? response2.code : set2.status ? typeof set2.status == "string" ? StatusMap[set2.status] : set2.status : 200;
          isCustomStatuResponse && (set2.status = status2, response2 = response2.response);
          const responseValidator = validator?.createResponse?.()?.[status2];
          if (responseValidator?.Check(response2) === false)
            if (responseValidator?.Clean)
              try {
                const temp = responseValidator.Clean(response2);
                if (responseValidator?.Check(temp) === false)
                  throw new ValidationError2("response", responseValidator, response2);
                response2 = temp;
              } catch (error49) {
                throw error49 instanceof ValidationError2 ? error49 : new ValidationError2("response", responseValidator, response2);
              }
            else
              throw new ValidationError2("response", responseValidator, response2);
          if (responseValidator?.Encode && (context10.response = response2 = responseValidator.Encode(response2)), responseValidator?.Clean)
            try {
              context10.response = response2 = responseValidator.Clean(response2);
            } catch {}
          const result = mapEarlyResponse3(response2, context10.set);
          if (result !== undefined)
            return context10.response = result;
        }
      } else {
        const isCustomStatuResponse = response instanceof ElysiaCustomStatusResponse, status2 = isCustomStatuResponse ? response.code : set2.status ? typeof set2.status == "string" ? StatusMap[set2.status] : set2.status : 200;
        isCustomStatuResponse && (set2.status = status2, response = response.response);
        const responseValidator = validator?.createResponse?.()?.[status2];
        if (responseValidator?.Check(response) === false)
          if (responseValidator?.Clean)
            try {
              const temp = responseValidator.Clean(response);
              if (responseValidator?.Check(temp) === false)
                throw new ValidationError2("response", responseValidator, response);
              response = temp;
            } catch (error49) {
              throw error49 instanceof ValidationError2 ? error49 : new ValidationError2("response", responseValidator, response);
            }
          else
            throw new ValidationError2("response", responseValidator, response);
        if (responseValidator?.Encode && (response = responseValidator.Encode(response)), responseValidator?.Clean)
          try {
            response = responseValidator.Clean(response);
          } catch {}
      }
      if (context10.set.cookie && cookieMeta?.sign) {
        const secret = cookieMeta.secrets ? typeof cookieMeta.secrets == "string" ? cookieMeta.secrets : cookieMeta.secrets[0] : undefined;
        if (cookieMeta.sign === true) {
          if (secret)
            for (const [key, cookie2] of Object.entries(context10.set.cookie))
              context10.set.cookie[key].value = await signCookie(cookie2.value, secret);
        } else {
          const properties2 = getSchemaProperties(validator?.cookie?.schema);
          if (secret)
            for (const name3 of cookieMeta.sign)
              !properties2 || !(name3 in properties2) || context10.set.cookie[name3]?.value && (context10.set.cookie[name3].value = await signCookie(context10.set.cookie[name3].value, secret));
        }
      }
      return mapResponse3(context10.response = response, context10.set);
    } catch (error49) {
      const reportedError = error49 instanceof TransformDecodeError && error49.error ? error49.error : error49;
      return app.handleError(context10, reportedError);
    } finally {
      const afterResponses = hooks ? hooks.afterResponse : app.event.afterResponse;
      afterResponses && (hasSetImmediate ? setImmediate(async () => {
        for (const afterResponse of afterResponses)
          await afterResponse.fn(context10);
      }) : Promise.resolve().then(async () => {
        for (const afterResponse of afterResponses)
          await afterResponse.fn(context10);
      }));
    }
  };
};
var createDynamicErrorHandler = (app) => {
  const { mapResponse: mapResponse3 } = app["~adapter"].handler;
  return async (context10, error49) => {
    const errorContext = Object.assign(context10, { error: error49, code: error49.code });
    if (errorContext.set = context10.set, typeof error49?.toResponse == "function" && !(error49 instanceof ValidationError2) && !(error49 instanceof TransformDecodeError))
      try {
        let raw = error49.toResponse();
        typeof raw?.then == "function" && (raw = await raw), raw instanceof Response && (context10.set.status = raw.status), context10.response = raw;
      } catch {}
    if (!context10.response && app.event.error)
      for (let i = 0;i < app.event.error.length; i++) {
        let response = app.event.error[i].fn(errorContext);
        if (response instanceof Promise && (response = await response), response != null)
          return context10.response = mapResponse3(response, context10.set);
      }
    if (context10.response) {
      if (app.event.mapResponse)
        for (let i = 0;i < app.event.mapResponse.length; i++) {
          let response = app.event.mapResponse[i].fn(errorContext);
          response instanceof Promise && (response = await response), response != null && (context10.response = response);
        }
      return mapResponse3(context10.response, context10.set);
    }
    return context10.set.status = error49.status ?? 500, mapResponse3(typeof error49.cause == "string" ? error49.cause : error49.message, context10.set);
  };
};

// ../../node_modules/.pnpm/elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sinclair+typebox@0.34.45__f_b154ea38ebab1cc47932dca1f9e838a2/node_modules/elysia/dist/index.mjs
var _a5;
_a5 = Symbol.dispose;
var _Elysia = class _Elysia2 {
  constructor(config2 = {}) {
    this.server = null;
    this.dependencies = {};
    this["~Prefix"] = "";
    this["~Singleton"] = null;
    this["~Definitions"] = null;
    this["~Metadata"] = null;
    this["~Ephemeral"] = null;
    this["~Volatile"] = null;
    this["~Routes"] = null;
    this.singleton = {
      decorator: {},
      store: {},
      derive: {},
      resolve: {}
    };
    this.definitions = {
      typebox: t2.Module({}),
      type: {},
      error: {}
    };
    this.extender = {
      macro: {},
      higherOrderFunctions: []
    };
    this.validator = {
      global: null,
      scoped: null,
      local: null,
      getCandidate() {
        return !this.global && !this.scoped && !this.local ? {
          body: undefined,
          headers: undefined,
          params: undefined,
          query: undefined,
          cookie: undefined,
          response: undefined
        } : mergeSchemaValidator(mergeSchemaValidator(this.global, this.scoped), this.local);
      }
    };
    this.standaloneValidator = {
      global: null,
      scoped: null,
      local: null
    };
    this.event = {};
    this.router = {
      "~http": undefined,
      get http() {
        return this["~http"] || (this["~http"] = new Memoirist({
          lazy: true,
          onParam: import_fast_decode_uri_component4.default
        })), this["~http"];
      },
      "~dynamic": undefined,
      get dynamic() {
        return this["~dynamic"] || (this["~dynamic"] = new Memoirist({
          onParam: import_fast_decode_uri_component4.default
        })), this["~dynamic"];
      },
      static: {},
      response: {},
      history: []
    };
    this.routeTree = {};
    this.inference = {
      body: false,
      cookie: false,
      headers: false,
      query: false,
      set: false,
      server: false,
      path: false,
      route: false,
      url: false
    };
    this["~parser"] = {};
    this.handle = async (request2) => this.fetch(request2);
    this.handleError = async (context10, error49) => (this.handleError = this.config.aot ? composeErrorHandler(this) : createDynamicErrorHandler(this))(context10, error49);
    this.listen = (options2, callback) => (this["~adapter"].listen(this)(options2, callback), this);
    this.stop = async (closeActiveConnections) => (await this["~adapter"].stop?.(this, closeActiveConnections), this);
    this[_a5] = () => {
      this.server && this.stop();
    };
    config2.tags && (config2.detail ? config2.detail.tags = config2.tags : config2.detail = {
      tags: config2.tags
    }), this.config = {
      aot: env3.ELYSIA_AOT !== "false",
      nativeStaticResponse: true,
      encodeSchema: true,
      normalize: true,
      ...config2,
      prefix: config2.prefix ? config2.prefix.charCodeAt(0) === 47 ? config2.prefix : `/${config2.prefix}` : undefined,
      cookie: {
        path: "/",
        ...config2?.cookie
      },
      experimental: config2?.experimental ?? {},
      seed: config2?.seed === undefined ? "" : config2?.seed
    }, this["~adapter"] = config2.adapter ?? (typeof Bun < "u" ? BunAdapter : WebStandardAdapter), config2?.analytic && (config2?.name || config2?.seed !== undefined) && (this.telemetry = {
      stack: new Error().stack
    });
  }
  get store() {
    return this.singleton.store;
  }
  get decorator() {
    return this.singleton.decorator;
  }
  get routes() {
    return this.router.history;
  }
  getGlobalRoutes() {
    return this.router.history;
  }
  getGlobalDefinitions() {
    return this.definitions;
  }
  getServer() {
    return this.server;
  }
  getParent() {
    return null;
  }
  get promisedModules() {
    return this._promisedModules || (this._promisedModules = new PromiseGroup(console.error, () => {})), this._promisedModules;
  }
  env(model, _env = env3) {
    if (getSchemaValidator(model, {
      modules: this.definitions.typebox,
      dynamic: true,
      additionalProperties: true,
      coerce: true,
      sanitize: () => this.config.sanitize
    }).Check(_env) === false) {
      const error49 = new ValidationError2("env", model, _env);
      throw new Error(error49.all.map((x4) => x4.summary).join(`
`));
    }
    return this;
  }
  wrap(fn3) {
    return this.extender.higherOrderFunctions.push({
      checksum: checksum(JSON.stringify({
        name: this.config.name,
        seed: this.config.seed,
        content: fn3.toString()
      })),
      fn: fn3
    }), this;
  }
  get models() {
    const models = {};
    for (const name3 of Object.keys(this.definitions.type))
      models[name3] = getSchemaValidator(this.definitions.typebox.Import(name3), {
        models: this.definitions.type
      });
    return models.modules = this.definitions.typebox, models;
  }
  add(method, path2, handle, localHook, options2) {
    const skipPrefix = options2?.skipPrefix ?? false, allowMeta = options2?.allowMeta ?? false;
    localHook ??= {}, this.applyMacro(localHook);
    let standaloneValidators = [];
    if (localHook.standaloneValidator && (standaloneValidators = standaloneValidators.concat(localHook.standaloneValidator)), this.standaloneValidator.local && (standaloneValidators = standaloneValidators.concat(this.standaloneValidator.local)), this.standaloneValidator.scoped && (standaloneValidators = standaloneValidators.concat(this.standaloneValidator.scoped)), this.standaloneValidator.global && (standaloneValidators = standaloneValidators.concat(this.standaloneValidator.global)), path2 !== "" && path2.charCodeAt(0) !== 47 && (path2 = "/" + path2), this.config.prefix && !skipPrefix && (path2 = this.config.prefix + path2), localHook?.type)
      switch (localHook.type) {
        case "text":
          localHook.type = "text/plain";
          break;
        case "json":
          localHook.type = "application/json";
          break;
        case "formdata":
          localHook.type = "multipart/form-data";
          break;
        case "urlencoded":
          localHook.type = "application/x-www-form-urlencoded";
          break;
        case "arrayBuffer":
          localHook.type = "application/octet-stream";
          break;
        default:
          break;
      }
    const instanceValidator = this.validator.getCandidate(), cloned = {
      body: localHook?.body ?? instanceValidator?.body,
      headers: localHook?.headers ?? instanceValidator?.headers,
      params: localHook?.params ?? instanceValidator?.params,
      query: localHook?.query ?? instanceValidator?.query,
      cookie: localHook?.cookie ?? instanceValidator?.cookie,
      response: localHook?.response ?? instanceValidator?.response
    }, shouldPrecompile = this.config.precompile === true || typeof this.config.precompile == "object" && this.config.precompile.compose === true, createValidator = () => {
      const models = this.definitions.type, dynamic = !this.config.aot, normalize4 = this.config.normalize, modules = this.definitions.typebox, sanitize2 = () => this.config.sanitize, cookieValidator = () => {
        if (cloned.cookie || standaloneValidators.find((x4) => x4.cookie))
          return getCookieValidator({
            modules,
            validator: cloned.cookie,
            defaultConfig: this.config.cookie,
            normalize: normalize4,
            config: cloned.cookie?.config ?? {},
            dynamic,
            models,
            validators: standaloneValidators.map((x4) => x4.cookie),
            sanitize: sanitize2
          });
      };
      return shouldPrecompile ? {
        body: getSchemaValidator(cloned.body, {
          modules,
          dynamic,
          models,
          normalize: normalize4,
          additionalCoerce: (() => {
            const resolved = resolveSchema(cloned.body, models, modules);
            return resolved && Kind in resolved && (hasType("File", resolved) || hasType("Files", resolved)) ? coerceFormData() : coercePrimitiveRoot();
          })(),
          validators: standaloneValidators.map((x4) => x4.body),
          sanitize: sanitize2
        }),
        headers: getSchemaValidator(cloned.headers, {
          modules,
          dynamic,
          models,
          additionalProperties: true,
          coerce: true,
          additionalCoerce: stringToStructureCoercions(),
          validators: standaloneValidators.map((x4) => x4.headers),
          sanitize: sanitize2
        }),
        params: getSchemaValidator(cloned.params, {
          modules,
          dynamic,
          models,
          coerce: true,
          additionalCoerce: stringToStructureCoercions(),
          validators: standaloneValidators.map((x4) => x4.params),
          sanitize: sanitize2
        }),
        query: getSchemaValidator(cloned.query, {
          modules,
          dynamic,
          models,
          normalize: normalize4,
          coerce: true,
          additionalCoerce: queryCoercions(),
          validators: standaloneValidators.map((x4) => x4.query),
          sanitize: sanitize2
        }),
        cookie: cookieValidator(),
        response: getResponseSchemaValidator(cloned.response, {
          modules,
          dynamic,
          models,
          normalize: normalize4,
          validators: standaloneValidators.map((x4) => x4.response),
          sanitize: sanitize2
        })
      } : {
        createBody() {
          return this.body ? this.body : this.body = getSchemaValidator(cloned.body, {
            modules,
            dynamic,
            models,
            normalize: normalize4,
            additionalCoerce: (() => {
              const resolved = resolveSchema(cloned.body, models, modules);
              return resolved && Kind in resolved && (hasType("File", resolved) || hasType("Files", resolved)) ? coerceFormData() : coercePrimitiveRoot();
            })(),
            validators: standaloneValidators.map((x4) => x4.body),
            sanitize: sanitize2
          });
        },
        createHeaders() {
          return this.headers ? this.headers : this.headers = getSchemaValidator(cloned.headers, {
            modules,
            dynamic,
            models,
            normalize: normalize4,
            additionalProperties: !normalize4,
            coerce: true,
            additionalCoerce: stringToStructureCoercions(),
            validators: standaloneValidators.map((x4) => x4.headers),
            sanitize: sanitize2
          });
        },
        createParams() {
          return this.params ? this.params : this.params = getSchemaValidator(cloned.params, {
            modules,
            dynamic,
            models,
            normalize: normalize4,
            coerce: true,
            additionalCoerce: stringToStructureCoercions(),
            validators: standaloneValidators.map((x4) => x4.params),
            sanitize: sanitize2
          });
        },
        createQuery() {
          return this.query ? this.query : this.query = getSchemaValidator(cloned.query, {
            modules,
            dynamic,
            models,
            normalize: normalize4,
            coerce: true,
            additionalCoerce: queryCoercions(),
            validators: standaloneValidators.map((x4) => x4.query),
            sanitize: sanitize2
          });
        },
        createCookie() {
          return this.cookie ? this.cookie : this.cookie = cookieValidator();
        },
        createResponse() {
          return this.response ? this.response : this.response = getResponseSchemaValidator(cloned.response, {
            modules,
            dynamic,
            models,
            normalize: normalize4,
            validators: standaloneValidators.map((x4) => x4.response),
            sanitize: sanitize2
          });
        }
      };
    };
    (instanceValidator.body || instanceValidator.cookie || instanceValidator.headers || instanceValidator.params || instanceValidator.query || instanceValidator.response) && (localHook = mergeHook(localHook, instanceValidator)), localHook.tags && (localHook.detail ? localHook.detail.tags = localHook.tags : localHook.detail = {
      tags: localHook.tags
    }), isNotEmpty(this.config.detail) && (localHook.detail = mergeDeep(Object.assign({}, this.config.detail), localHook.detail));
    const hooks = isNotEmpty(this.event) ? mergeHook(this.event, localHookToLifeCycleStore(localHook)) : { ...lifeCycleToArray(localHookToLifeCycleStore(localHook)) };
    if (standaloneValidators.length && Object.assign(hooks, {
      standaloneValidator: standaloneValidators
    }), this.config.aot === false) {
      const validator = createValidator();
      this.router.dynamic.add(method, path2, {
        validator,
        hooks,
        content: localHook?.type,
        handle,
        route: path2
      });
      const encoded = encodePath(path2, { dynamic: true });
      if (path2 !== encoded && this.router.dynamic.add(method, encoded, {
        validator,
        hooks,
        content: localHook?.type,
        handle,
        route: path2
      }), !this.config.strictPath) {
        const loosePath = getLoosePath(path2);
        this.router.dynamic.add(method, loosePath, {
          validator,
          hooks,
          content: localHook?.type,
          handle,
          route: path2
        });
        const encoded2 = encodePath(loosePath);
        loosePath !== encoded2 && this.router.dynamic.add(method, loosePath, {
          validator,
          hooks,
          content: localHook?.type,
          handle,
          route: path2
        });
      }
      this.router.history.push({
        method,
        path: path2,
        composed: null,
        handler: handle,
        compile: undefined,
        hooks
      });
      return;
    }
    const adapter = this["~adapter"].handler, nativeStaticHandler = typeof handle != "function" ? () => {
      const context10 = {
        redirect,
        request: this["~adapter"].isWebStandard ? new Request(`http://ely.sia${path2}`, {
          method
        }) : undefined,
        server: null,
        set: {
          headers: Object.assign({}, this.setHeaders)
        },
        status,
        store: this.store
      };
      try {
        this.event.request?.map((x4) => {
          if (typeof x4.fn == "function")
            return x4.fn(context10);
          if (typeof x4 == "function")
            return x4(context10);
        });
      } catch (error49) {
        let res;
        context10.error = error49, this.event.error?.some((x4) => {
          if (typeof x4.fn == "function")
            return res = x4.fn(context10);
          if (typeof x4 == "function")
            return res = x4(context10);
        }), res !== undefined && (handle = res);
      }
      const fn3 = adapter.createNativeStaticHandler?.(handle, hooks, context10.set);
      return fn3 instanceof Promise ? fn3.then((fn22) => {
        if (fn22)
          return fn22;
      }) : fn3?.();
    } : undefined, useNativeStaticResponse = this.config.nativeStaticResponse === true, addResponsePath = (path22) => {
      !useNativeStaticResponse || !nativeStaticHandler || (supportPerMethodInlineHandler ? this.router.response[path22] ? this.router.response[path22][method] = nativeStaticHandler() : this.router.response[path22] = {
        [method]: nativeStaticHandler()
      } : this.router.response[path22] = nativeStaticHandler());
    };
    addResponsePath(path2);
    let _compiled;
    const compile3 = () => {
      if (_compiled)
        return _compiled;
      const compiled = composeHandler({
        app: this,
        path: path2,
        method,
        hooks,
        validator: createValidator(),
        handler: typeof handle != "function" && typeof adapter.createStaticHandler != "function" ? () => handle : handle,
        allowMeta,
        inference: this.inference
      });
      return this.router.history[index2] && (_compiled = this.router.history[index2].composed = compiled), compiled;
    };
    let oldIndex;
    if (`${method}_${path2}` in this.routeTree)
      for (let i = 0;i < this.router.history.length; i++) {
        const route2 = this.router.history[i];
        if (route2.path === path2 && route2.method === method) {
          oldIndex = i;
          break;
        }
      }
    else
      this.routeTree[`${method}_${path2}`] = this.router.history.length;
    const index2 = oldIndex ?? this.router.history.length, route = this.router.history, mainHandler = shouldPrecompile ? compile3() : (ctx) => _compiled ? _compiled(ctx) : (route[index2].composed = compile3())(ctx);
    oldIndex !== undefined ? this.router.history[oldIndex] = Object.assign({
      method,
      path: path2,
      composed: mainHandler,
      compile: compile3,
      handler: handle,
      hooks
    }, standaloneValidators.length ? {
      standaloneValidators
    } : undefined, localHook.webSocket ? { websocket: localHook.websocket } : undefined) : this.router.history.push(Object.assign({
      method,
      path: path2,
      composed: mainHandler,
      compile: compile3,
      handler: handle,
      hooks
    }, localHook.webSocket ? { websocket: localHook.websocket } : undefined));
    const handler2 = {
      handler: shouldPrecompile ? route[index2].composed : undefined,
      compile() {
        return this.handler = compile3();
      }
    }, staticRouter = this.router.static, isStaticPath = path2.indexOf(":") === -1 && path2.indexOf("*") === -1;
    if (method === "WS") {
      if (isStaticPath) {
        path2 in staticRouter ? staticRouter[path2][method] = index2 : staticRouter[path2] = {
          [method]: index2
        };
        return;
      }
      this.router.http.add("WS", path2, handler2), this.config.strictPath || this.router.http.add("WS", getLoosePath(path2), handler2);
      const encoded = encodePath(path2, { dynamic: true });
      path2 !== encoded && this.router.http.add("WS", encoded, handler2);
      return;
    }
    if (isStaticPath)
      path2 in staticRouter ? staticRouter[path2][method] = index2 : staticRouter[path2] = {
        [method]: index2
      }, this.config.strictPath || addResponsePath(getLoosePath(path2));
    else {
      if (this.router.http.add(method, path2, handler2), !this.config.strictPath) {
        const loosePath = getLoosePath(path2);
        addResponsePath(loosePath), this.router.http.add(method, loosePath, handler2);
      }
      const encoded = encodePath(path2, { dynamic: true });
      path2 !== encoded && (this.router.http.add(method, encoded, handler2), addResponsePath(encoded));
    }
  }
  headers(header) {
    return header ? (this.setHeaders || (this.setHeaders = {}), this.setHeaders = mergeDeep(this.setHeaders, header), this) : this;
  }
  onStart(handler2) {
    return this.on("start", handler2), this;
  }
  onRequest(handler2) {
    return this.on("request", handler2), this;
  }
  onParse(options2, handler2) {
    return handler2 ? this.on(options2, "parse", handler2) : typeof options2 == "string" ? this.on("parse", this["~parser"][options2]) : this.on("parse", options2);
  }
  parser(name3, parser2) {
    return this["~parser"][name3] = parser2, this;
  }
  onTransform(options2, handler2) {
    return handler2 ? this.on(options2, "transform", handler2) : this.on("transform", options2);
  }
  resolve(optionsOrResolve, resolve3) {
    resolve3 || (resolve3 = optionsOrResolve, optionsOrResolve = { as: "local" });
    const hook = {
      subType: "resolve",
      fn: resolve3
    };
    return this.onBeforeHandle(optionsOrResolve, hook);
  }
  mapResolve(optionsOrResolve, mapper) {
    mapper || (mapper = optionsOrResolve, optionsOrResolve = { as: "local" });
    const hook = {
      subType: "mapResolve",
      fn: mapper
    };
    return this.onBeforeHandle(optionsOrResolve, hook);
  }
  onBeforeHandle(options2, handler2) {
    return handler2 ? this.on(options2, "beforeHandle", handler2) : this.on("beforeHandle", options2);
  }
  onAfterHandle(options2, handler2) {
    return handler2 ? this.on(options2, "afterHandle", handler2) : this.on("afterHandle", options2);
  }
  mapResponse(options2, handler2) {
    return handler2 ? this.on(options2, "mapResponse", handler2) : this.on("mapResponse", options2);
  }
  onAfterResponse(options2, handler2) {
    return handler2 ? this.on(options2, "afterResponse", handler2) : this.on("afterResponse", options2);
  }
  trace(options2, handler2) {
    handler2 || (handler2 = options2, options2 = { as: "local" }), Array.isArray(handler2) || (handler2 = [handler2]);
    for (const fn3 of handler2)
      this.on(options2, "trace", createTracer(fn3));
    return this;
  }
  error(name3, error49) {
    switch (typeof name3) {
      case "string":
        return error49.prototype[ERROR_CODE] = name3, this.definitions.error[name3] = error49, this;
      case "function":
        return this.definitions.error = name3(this.definitions.error), this;
    }
    for (const [code2, error210] of Object.entries(name3))
      error210.prototype[ERROR_CODE] = code2, this.definitions.error[code2] = error210;
    return this;
  }
  onError(options2, handler2) {
    return handler2 ? this.on(options2, "error", handler2) : this.on("error", options2);
  }
  onStop(handler2) {
    return this.on("stop", handler2), this;
  }
  on(optionsOrType, typeOrHandlers, handlers2) {
    let type2;
    switch (typeof optionsOrType) {
      case "string":
        type2 = optionsOrType, handlers2 = typeOrHandlers;
        break;
      case "object":
        type2 = typeOrHandlers, !Array.isArray(typeOrHandlers) && typeof typeOrHandlers == "object" && (handlers2 = typeOrHandlers);
        break;
    }
    Array.isArray(handlers2) ? handlers2 = fnToContainer(handlers2) : typeof handlers2 == "function" ? handlers2 = [
      {
        fn: handlers2
      }
    ] : handlers2 = [handlers2];
    const handles = handlers2;
    for (const handle of handles)
      handle.scope = typeof optionsOrType == "string" ? "local" : optionsOrType?.as ?? "local", (type2 === "resolve" || type2 === "derive") && (handle.subType = type2);
    type2 !== "trace" && (this.inference = sucrose({
      [type2]: handles.map((x4) => x4.fn)
    }, this.inference, this.config.sucrose));
    for (const handle of handles) {
      const fn3 = asHookType(handle, "global", { skipIfHasType: true });
      switch ((this.config.name || this.config.seed) && (fn3.checksum = checksum(this.config.name + JSON.stringify(this.config.seed))), type2) {
        case "start":
          this.event.start ??= [], this.event.start.push(fn3);
          break;
        case "request":
          this.event.request ??= [], this.event.request.push(fn3);
          break;
        case "parse":
          this.event.parse ??= [], this.event.parse.push(fn3);
          break;
        case "transform":
          this.event.transform ??= [], this.event.transform.push(fn3);
          break;
        case "derive":
          this.event.transform ??= [], this.event.transform.push(fnToContainer(fn3, "derive"));
          break;
        case "beforeHandle":
          this.event.beforeHandle ??= [], this.event.beforeHandle.push(fn3);
          break;
        case "resolve":
          this.event.beforeHandle ??= [], this.event.beforeHandle.push(fnToContainer(fn3, "resolve"));
          break;
        case "afterHandle":
          this.event.afterHandle ??= [], this.event.afterHandle.push(fn3);
          break;
        case "mapResponse":
          this.event.mapResponse ??= [], this.event.mapResponse.push(fn3);
          break;
        case "afterResponse":
          this.event.afterResponse ??= [], this.event.afterResponse.push(fn3);
          break;
        case "trace":
          this.event.trace ??= [], this.event.trace.push(fn3);
          break;
        case "error":
          this.event.error ??= [], this.event.error.push(fn3);
          break;
        case "stop":
          this.event.stop ??= [], this.event.stop.push(fn3);
          break;
      }
    }
    return this;
  }
  as(type2) {
    return promoteEvent(this.event.parse, type2), promoteEvent(this.event.transform, type2), promoteEvent(this.event.beforeHandle, type2), promoteEvent(this.event.afterHandle, type2), promoteEvent(this.event.mapResponse, type2), promoteEvent(this.event.afterResponse, type2), promoteEvent(this.event.trace, type2), promoteEvent(this.event.error, type2), type2 === "scoped" ? (this.validator.scoped = mergeSchemaValidator(this.validator.scoped, this.validator.local), this.validator.local = null, this.standaloneValidator.local !== null && (this.standaloneValidator.scoped ||= [], this.standaloneValidator.scoped.push(...this.standaloneValidator.local), this.standaloneValidator.local = null)) : type2 === "global" && (this.validator.global = mergeSchemaValidator(this.validator.global, mergeSchemaValidator(this.validator.scoped, this.validator.local)), this.validator.scoped = null, this.validator.local = null, this.standaloneValidator.local !== null && (this.standaloneValidator.scoped ||= [], this.standaloneValidator.scoped.push(...this.standaloneValidator.local), this.standaloneValidator.local = null), this.standaloneValidator.scoped !== null && (this.standaloneValidator.global ||= [], this.standaloneValidator.global.push(...this.standaloneValidator.scoped), this.standaloneValidator.scoped = null)), this;
  }
  group(prefix, schemaOrRun, run) {
    const instance = new _Elysia2({
      ...this.config,
      prefix: ""
    });
    instance.singleton = { ...this.singleton }, instance.definitions = { ...this.definitions }, instance.getServer = () => this.getServer(), instance.inference = cloneInference(this.inference), instance.extender = { ...this.extender }, instance["~parser"] = this["~parser"], instance.standaloneValidator = {
      local: [...this.standaloneValidator.local ?? []],
      scoped: [...this.standaloneValidator.scoped ?? []],
      global: [...this.standaloneValidator.global ?? []]
    };
    const isSchema = typeof schemaOrRun == "object", sandbox = (isSchema ? run : schemaOrRun)(instance);
    return this.singleton = mergeDeep(this.singleton, instance.singleton), this.definitions = mergeDeep(this.definitions, instance.definitions), sandbox.event.request?.length && (this.event.request = [
      ...this.event.request || [],
      ...sandbox.event.request || []
    ]), sandbox.event.mapResponse?.length && (this.event.mapResponse = [
      ...this.event.mapResponse || [],
      ...sandbox.event.mapResponse || []
    ]), this.model(sandbox.definitions.type), Object.values(instance.router.history).forEach(({ method, path: path2, handler: handler2, hooks }) => {
      if (path2 = (isSchema ? "" : this.config.prefix ?? "") + prefix + path2, isSchema) {
        const {
          body: body2,
          headers,
          query,
          params,
          cookie: cookie2,
          response,
          ...hook
        } = schemaOrRun, localHook = hooks;
        this.applyMacro(hook);
        const hasStandaloneSchema = body2 || headers || query || params || cookie2 || response;
        this.add(method, path2, handler2, mergeHook(hook, {
          ...localHook || {},
          error: localHook.error ? Array.isArray(localHook.error) ? [
            ...localHook.error ?? [],
            ...sandbox.event.error ?? []
          ] : [
            localHook.error,
            ...sandbox.event.error ?? []
          ] : sandbox.event.error,
          standaloneValidator: hook.standaloneValidator || localHook.standaloneValidator || hasStandaloneSchema ? [
            ...hook.standaloneValidator ?? [],
            ...localHook.standaloneValidator ?? [],
            ...hasStandaloneSchema ? [
              {
                body: body2,
                headers,
                query,
                params,
                cookie: cookie2,
                response
              }
            ] : []
          ] : undefined
        }), undefined);
      } else
        this.add(method, path2, handler2, mergeHook(hooks, {
          error: sandbox.event.error
        }), {
          skipPrefix: true
        });
    }), this;
  }
  guard(hook, run) {
    if (!run) {
      if (typeof hook == "object") {
        this.applyMacro(hook), hook.detail && (this.config.detail ? this.config.detail = mergeDeep(Object.assign({}, this.config.detail), hook.detail) : this.config.detail = hook.detail), hook.tags && (this.config.detail ? this.config.detail.tags = hook.tags : this.config.detail = {
          tags: hook.tags
        });
        const type2 = hook.as ?? "local";
        if (hook.schema === "standalone") {
          this.standaloneValidator[type2] || (this.standaloneValidator[type2] = []);
          const response = hook?.response ? typeof hook.response == "string" || Kind in hook.response || "~standard" in hook.response ? {
            200: hook.response
          } : hook?.response : undefined;
          this.standaloneValidator[type2].push({
            body: hook.body,
            headers: hook.headers,
            params: hook.params,
            query: hook.query,
            response,
            cookie: hook.cookie
          });
        } else
          this.validator[type2] = {
            body: hook.body ?? this.validator[type2]?.body,
            headers: hook.headers ?? this.validator[type2]?.headers,
            params: hook.params ?? this.validator[type2]?.params,
            query: hook.query ?? this.validator[type2]?.query,
            response: hook.response ?? this.validator[type2]?.response,
            cookie: hook.cookie ?? this.validator[type2]?.cookie
          };
        return hook.parse && this.on({ as: type2 }, "parse", hook.parse), hook.transform && this.on({ as: type2 }, "transform", hook.transform), hook.derive && this.on({ as: type2 }, "derive", hook.derive), hook.beforeHandle && this.on({ as: type2 }, "beforeHandle", hook.beforeHandle), hook.resolve && this.on({ as: type2 }, "resolve", hook.resolve), hook.afterHandle && this.on({ as: type2 }, "afterHandle", hook.afterHandle), hook.mapResponse && this.on({ as: type2 }, "mapResponse", hook.mapResponse), hook.afterResponse && this.on({ as: type2 }, "afterResponse", hook.afterResponse), hook.error && this.on({ as: type2 }, "error", hook.error), this;
      }
      return this.guard({}, hook);
    }
    const instance = new _Elysia2({
      ...this.config,
      prefix: ""
    });
    instance.singleton = { ...this.singleton }, instance.definitions = { ...this.definitions }, instance.inference = cloneInference(this.inference), instance.extender = { ...this.extender }, instance.getServer = () => this.getServer();
    const sandbox = run(instance);
    if (this.singleton = mergeDeep(this.singleton, instance.singleton), this.definitions = mergeDeep(this.definitions, instance.definitions), sandbox.getServer = () => this.server, sandbox.event.request?.length && (this.event.request = [
      ...this.event.request || [],
      ...sandbox.event.request || []
    ]), sandbox.event.mapResponse?.length && (this.event.mapResponse = [
      ...this.event.mapResponse || [],
      ...sandbox.event.mapResponse || []
    ]), this.model(sandbox.definitions.type), Object.values(instance.router.history).forEach(({ method, path: path2, handler: handler2, hooks: localHook }) => {
      const {
        body: body2,
        headers,
        query,
        params,
        cookie: cookie2,
        response,
        ...guardHook
      } = hook, hasStandaloneSchema = body2 || headers || query || params || cookie2 || response;
      this.add(method, path2, handler2, mergeHook(guardHook, {
        ...localHook || {},
        error: localHook.error ? Array.isArray(localHook.error) ? [
          ...localHook.error ?? [],
          ...sandbox.event.error ?? []
        ] : [
          localHook.error,
          ...sandbox.event.error ?? []
        ] : sandbox.event.error,
        standaloneValidator: hasStandaloneSchema ? [
          ...localHook.standaloneValidator ?? [],
          {
            body: body2,
            headers,
            query,
            params,
            cookie: cookie2,
            response
          }
        ] : localHook.standaloneValidator
      }));
    }), instance.promisedModules.size > 0) {
      let processedUntil = instance.router.history.length;
      for (const promise2 of instance.promisedModules.promises)
        this.promisedModules.add(promise2.then(() => {
          const {
            body: body2,
            headers,
            query,
            params,
            cookie: cookie2,
            response,
            ...guardHook
          } = hook, hasStandaloneSchema = body2 || headers || query || params || cookie2 || response, startIndex = processedUntil;
          processedUntil = instance.router.history.length;
          for (let i = startIndex;i < instance.router.history.length; i++) {
            const {
              method,
              path: path2,
              handler: handler2,
              hooks: localHook
            } = instance.router.history[i];
            this.add(method, path2, handler2, mergeHook(guardHook, {
              ...localHook || {},
              error: localHook.error ? Array.isArray(localHook.error) ? [
                ...localHook.error ?? [],
                ...sandbox.event.error ?? []
              ] : [
                localHook.error,
                ...sandbox.event.error ?? []
              ] : sandbox.event.error,
              standaloneValidator: hasStandaloneSchema ? [
                ...localHook.standaloneValidator ?? [],
                {
                  body: body2,
                  headers,
                  query,
                  params,
                  cookie: cookie2,
                  response
                }
              ] : localHook.standaloneValidator
            }));
          }
        }));
    }
    return this;
  }
  use(plugin) {
    if (!plugin)
      return this;
    if (Array.isArray(plugin)) {
      let app = this;
      for (const p3 of plugin)
        app = app.use(p3);
      return app;
    }
    return plugin instanceof Promise ? (this.promisedModules.add(plugin.then((plugin2) => {
      if (typeof plugin2 == "function")
        return plugin2(this);
      if (plugin2 instanceof _Elysia2)
        return this._use(plugin2).compile();
      if (plugin2.constructor?.name === "Elysia")
        return this._use(plugin2).compile();
      if (typeof plugin2.default == "function")
        return plugin2.default(this);
      if (plugin2.default instanceof _Elysia2)
        return this._use(plugin2.default);
      if (plugin2.constructor?.name === "Elysia")
        return this._use(plugin2.default);
      if (plugin2.constructor?.name === "_Elysia")
        return this._use(plugin2.default);
      try {
        return this._use(plugin2.default);
      } catch (error49) {
        throw console.error('Invalid plugin type. Expected Elysia instance, function, or module with "default" as Elysia instance or function that returns Elysia instance.'), error49;
      }
    }).then((v5) => (v5 && typeof v5.compile == "function" && v5.compile(), v5))), this) : this._use(plugin);
  }
  propagatePromiseModules(plugin) {
    if (plugin.promisedModules.size <= 0)
      return this;
    for (const promise2 of plugin.promisedModules.promises)
      this.promisedModules.add(promise2.then((v5) => {
        if (!v5)
          return;
        const t3 = this._use(v5);
        return t3 instanceof Promise ? t3.then((v22) => {
          v22 ? v22.compile() : v5.compile();
        }) : v5.compile();
      }));
    return this;
  }
  _use(plugin) {
    if (typeof plugin == "function") {
      const instance = plugin(this);
      return instance instanceof Promise ? (this.promisedModules.add(instance.then((plugin2) => {
        if (plugin2 instanceof _Elysia2) {
          plugin2.getServer = () => this.getServer(), plugin2.getGlobalRoutes = () => this.getGlobalRoutes(), plugin2.getGlobalDefinitions = () => this.getGlobalDefinitions(), plugin2.model(this.definitions.type), plugin2.error(this.definitions.error);
          for (const {
            method,
            path: path2,
            handler: handler2,
            hooks
          } of Object.values(plugin2.router.history))
            this.add(method, path2, handler2, hooks, undefined);
          return plugin2 === this ? undefined : (this.propagatePromiseModules(plugin2), plugin2);
        }
        return typeof plugin2 == "function" ? plugin2(this) : typeof plugin2.default == "function" ? plugin2.default(this) : this._use(plugin2);
      }).then((v5) => (v5 && typeof v5.compile == "function" && v5.compile(), v5))), this) : instance;
    }
    this.propagatePromiseModules(plugin);
    const name3 = plugin.config.name, seed = plugin.config.seed;
    if (plugin.getParent = () => this, plugin.getServer = () => this.getServer(), plugin.getGlobalRoutes = () => this.getGlobalRoutes(), plugin.getGlobalDefinitions = () => this.getGlobalDefinitions(), plugin.standaloneValidator?.scoped && (this.standaloneValidator.local ? this.standaloneValidator.local = this.standaloneValidator.local.concat(plugin.standaloneValidator.scoped) : this.standaloneValidator.local = plugin.standaloneValidator.scoped), plugin.standaloneValidator?.global && (this.standaloneValidator.global ? this.standaloneValidator.global = this.standaloneValidator.global.concat(plugin.standaloneValidator.global) : this.standaloneValidator.global = plugin.standaloneValidator.global), isNotEmpty(plugin["~parser"]) && (this["~parser"] = {
      ...plugin["~parser"],
      ...this["~parser"]
    }), plugin.setHeaders && this.headers(plugin.setHeaders), name3) {
      name3 in this.dependencies || (this.dependencies[name3] = []);
      const current = seed !== undefined ? checksum(name3 + JSON.stringify(seed)) : 0;
      this.dependencies[name3].some(({ checksum: checksum3 }) => current === checksum3) || (this.extender.macro = {
        ...this.extender.macro,
        ...plugin.extender.macro
      }, this.extender.higherOrderFunctions = this.extender.higherOrderFunctions.concat(plugin.extender.higherOrderFunctions));
    } else
      isNotEmpty(plugin.extender.macro) && (this.extender.macro = {
        ...this.extender.macro,
        ...plugin.extender.macro
      }), plugin.extender.higherOrderFunctions.length && (this.extender.higherOrderFunctions = this.extender.higherOrderFunctions.concat(plugin.extender.higherOrderFunctions));
    if (plugin.extender.higherOrderFunctions.length) {
      deduplicateChecksum(this.extender.higherOrderFunctions);
      const hofHashes = [];
      for (let i = 0;i < this.extender.higherOrderFunctions.length; i++) {
        const hof = this.extender.higherOrderFunctions[i];
        hof.checksum && (hofHashes.includes(hof.checksum) && (this.extender.higherOrderFunctions.splice(i, 1), i--), hofHashes.push(hof.checksum));
      }
      hofHashes.length = 0;
    }
    this.inference = mergeInference(this.inference, plugin.inference), isNotEmpty(plugin.singleton.decorator) && this.decorate(plugin.singleton.decorator), isNotEmpty(plugin.singleton.store) && this.state(plugin.singleton.store), isNotEmpty(plugin.definitions.type) && this.model(plugin.definitions.type), isNotEmpty(plugin.definitions.error) && this.error(plugin.definitions.error), isNotEmpty(plugin.extender.macro) && (this.extender.macro = {
      ...this.extender.macro,
      ...plugin.extender.macro
    });
    for (const { method, path: path2, handler: handler2, hooks } of Object.values(plugin.router.history))
      this.add(method, path2, handler2, hooks);
    if (name3) {
      name3 in this.dependencies || (this.dependencies[name3] = []);
      const current = seed !== undefined ? checksum(name3 + JSON.stringify(seed)) : 0;
      if (this.dependencies[name3].some(({ checksum: checksum3 }) => current === checksum3))
        return this;
      this.dependencies[name3].push(this.config?.analytic ? {
        name: plugin.config.name,
        seed: plugin.config.seed,
        checksum: current,
        dependencies: plugin.dependencies,
        stack: plugin.telemetry?.stack,
        routes: plugin.router.history,
        decorators: plugin.singleton,
        store: plugin.singleton.store,
        error: plugin.definitions.error,
        derive: plugin.event.transform?.filter((x4) => x4?.subType === "derive").map((x4) => ({
          fn: x4.toString(),
          stack: new Error().stack ?? ""
        })),
        resolve: plugin.event.transform?.filter((x4) => x4?.subType === "resolve").map((x4) => ({
          fn: x4.toString(),
          stack: new Error().stack ?? ""
        }))
      } : {
        name: plugin.config.name,
        seed: plugin.config.seed,
        checksum: current,
        dependencies: plugin.dependencies
      }), isNotEmpty(plugin.event) && (this.event = mergeLifeCycle(this.event, filterGlobalHook(plugin.event), current));
    } else
      isNotEmpty(plugin.event) && (this.event = mergeLifeCycle(this.event, filterGlobalHook(plugin.event)));
    return plugin.validator.global && (this.validator.global = mergeHook(this.validator.global, {
      ...plugin.validator.global
    })), plugin.validator.scoped && (this.validator.local = mergeHook(this.validator.local, {
      ...plugin.validator.scoped
    })), this;
  }
  macro(macroOrName, macro) {
    if (typeof macroOrName == "string" && !macro)
      throw new Error("Macro function is required");
    return typeof macroOrName == "string" ? this.extender.macro[macroOrName] = macro : this.extender.macro = {
      ...this.extender.macro,
      ...macroOrName
    }, this;
  }
  applyMacro(localHook, appliable = localHook, {
    iteration = 0,
    applied = {}
  } = {}) {
    if (iteration >= 16)
      return;
    const macro = this.extender.macro;
    for (let [key, value] of Object.entries(appliable)) {
      if (!(key in macro))
        continue;
      const macroHook = typeof macro[key] == "function" ? macro[key](value) : macro[key];
      if (!macroHook || typeof macro[key] == "object" && value === false)
        return;
      const seed = checksum(key + JSON.stringify(macroHook.seed ?? value));
      if (!(seed in applied)) {
        applied[seed] = true;
        for (let [k4, value2] of Object.entries(macroHook))
          if (k4 !== "seed") {
            if (k4 in emptySchema) {
              insertStandaloneValidator(localHook, k4, value2), delete localHook[key];
              continue;
            }
            if (k4 === "introspect") {
              value2?.(localHook), delete localHook[key];
              continue;
            }
            if (k4 === "detail") {
              localHook.detail || (localHook.detail = {}), localHook.detail = mergeDeep(localHook.detail, value2, {
                mergeArray: true
              }), delete localHook[key];
              continue;
            }
            if (k4 in macro) {
              this.applyMacro(localHook, { [k4]: value2 }, { applied, iteration: iteration + 1 }), delete localHook[key];
              continue;
            }
            switch ((k4 === "derive" || k4 === "resolve") && typeof value2 == "function" && (value2 = {
              fn: value2,
              subType: k4
            }), typeof localHook[k4]) {
              case "function":
                localHook[k4] = [localHook[k4], value2];
                break;
              case "object":
                Array.isArray(localHook[k4]) ? localHook[k4].push(value2) : localHook[k4] = [localHook[k4], value2];
                break;
              case "undefined":
                localHook[k4] = value2;
                break;
            }
            delete localHook[key];
          }
      }
    }
  }
  mount(path2, handleOrConfig, config2) {
    if (path2 instanceof _Elysia2 || typeof path2 == "function" || path2.length === 0 || path2 === "/") {
      const run = typeof path2 == "function" ? path2 : path2 instanceof _Elysia2 ? path2.compile().fetch : handleOrConfig instanceof _Elysia2 ? handleOrConfig.compile().fetch : typeof handleOrConfig == "function" ? handleOrConfig : (() => {
        throw new Error("Invalid handler");
      })(), handler22 = ({ request: request2, path: path22 }) => run(new Request(replaceUrlPath(request2.url, path22), request2));
      return this.route("ALL", "/*", handler22, {
        parse: "none",
        ...config2,
        detail: {
          ...config2?.detail,
          hide: true
        },
        config: {
          mount: run
        }
      }), this;
    }
    const handle = handleOrConfig instanceof _Elysia2 ? handleOrConfig.compile().fetch : typeof handleOrConfig == "function" ? handleOrConfig : (() => {
      throw new Error("Invalid handler");
    })(), length2 = (typeof path2 == "string" && this.config.prefix ? this.config.prefix + path2 : path2).length - (path2.endsWith("*") ? 1 : 0), handler2 = ({ request: request2, path: path22 }) => handle(new Request(replaceUrlPath(request2.url, path22.slice(length2) || "/"), request2));
    return this.route("ALL", path2, handler2, {
      parse: "none",
      ...config2,
      detail: {
        ...config2?.detail,
        hide: true
      },
      config: {
        mount: handle
      }
    }), this.route("ALL", path2 + (path2.endsWith("/") ? "*" : "/*"), handler2, {
      parse: "none",
      ...config2,
      detail: {
        ...config2?.detail,
        hide: true
      },
      config: {
        mount: handle
      }
    }), this;
  }
  get(path2, handler2, hook) {
    return this.add("GET", path2, handler2, hook), this;
  }
  post(path2, handler2, hook) {
    return this.add("POST", path2, handler2, hook), this;
  }
  put(path2, handler2, hook) {
    return this.add("PUT", path2, handler2, hook), this;
  }
  patch(path2, handler2, hook) {
    return this.add("PATCH", path2, handler2, hook), this;
  }
  delete(path2, handler2, hook) {
    return this.add("DELETE", path2, handler2, hook), this;
  }
  options(path2, handler2, hook) {
    return this.add("OPTIONS", path2, handler2, hook), this;
  }
  all(path2, handler2, hook) {
    return this.add("ALL", path2, handler2, hook), this;
  }
  head(path2, handler2, hook) {
    return this.add("HEAD", path2, handler2, hook), this;
  }
  connect(path2, handler2, hook) {
    return this.add("CONNECT", path2, handler2, hook), this;
  }
  route(method, path2, handler2, hook) {
    return this.add(method.toUpperCase(), path2, handler2, hook, hook?.config), this;
  }
  ws(path2, options2) {
    return this["~adapter"].ws ? this["~adapter"].ws(this, path2, options2) : console.warn("Current adapter doesn't support WebSocket"), this;
  }
  state(options2, name3, value) {
    name3 === undefined ? (value = options2, options2 = { as: "append" }, name3 = "") : value === undefined && (typeof options2 == "string" ? (value = name3, name3 = options2, options2 = { as: "append" }) : typeof options2 == "object" && (value = name3, name3 = ""));
    const { as: as2 } = options2;
    if (typeof name3 != "string")
      return this;
    switch (typeof value) {
      case "object":
        return !value || !isNotEmpty(value) ? this : name3 ? ((name3 in this.singleton.store) ? this.singleton.store[name3] = mergeDeep(this.singleton.store[name3], value, {
          override: as2 === "override"
        }) : this.singleton.store[name3] = value, this) : value === null ? this : (this.singleton.store = mergeDeep(this.singleton.store, value, {
          override: as2 === "override"
        }), this);
      case "function":
        return name3 ? (as2 === "override" || !(name3 in this.singleton.store)) && (this.singleton.store[name3] = value) : this.singleton.store = value(this.singleton.store), this;
      default:
        return (as2 === "override" || !(name3 in this.singleton.store)) && (this.singleton.store[name3] = value), this;
    }
  }
  decorate(options2, name3, value) {
    name3 === undefined ? (value = options2, options2 = { as: "append" }, name3 = "") : value === undefined && (typeof options2 == "string" ? (value = name3, name3 = options2, options2 = { as: "append" }) : typeof options2 == "object" && (value = name3, name3 = ""));
    const { as: as2 } = options2;
    if (typeof name3 != "string")
      return this;
    switch (typeof value) {
      case "object":
        return name3 ? ((name3 in this.singleton.decorator) ? this.singleton.decorator[name3] = mergeDeep(this.singleton.decorator[name3], value, {
          override: as2 === "override"
        }) : this.singleton.decorator[name3] = value, this) : value === null ? this : (this.singleton.decorator = mergeDeep(this.singleton.decorator, value, {
          override: as2 === "override"
        }), this);
      case "function":
        return name3 ? (as2 === "override" || !(name3 in this.singleton.decorator)) && (this.singleton.decorator[name3] = value) : this.singleton.decorator = value(this.singleton.decorator), this;
      default:
        return (as2 === "override" || !(name3 in this.singleton.decorator)) && (this.singleton.decorator[name3] = value), this;
    }
  }
  derive(optionsOrTransform, transform3) {
    transform3 || (transform3 = optionsOrTransform, optionsOrTransform = { as: "local" });
    const hook = {
      subType: "derive",
      fn: transform3
    };
    return this.onTransform(optionsOrTransform, hook);
  }
  model(name3, model) {
    const onlyTypebox = (a2) => {
      const res = {};
      for (const key in a2)
        "~standard" in a2[key] || (res[key] = a2[key]);
      return res;
    };
    switch (typeof name3) {
      case "object":
        const parsedTypebox = {}, kvs = Object.entries(name3);
        if (!kvs.length)
          return this;
        for (const [key, value] of kvs)
          key in this.definitions.type || ("~standard" in value ? this.definitions.type[key] = value : (parsedTypebox[key] = this.definitions.type[key] = value, parsedTypebox[key].$id ??= `#/components/schemas/${key}`));
        return this.definitions.typebox = t2.Module({
          ...this.definitions.typebox.$defs,
          ...parsedTypebox
        }), this;
      case "function":
        const result = name3(this.definitions.type);
        return this.definitions.type = result, this.definitions.typebox = t2.Module(onlyTypebox(result)), this;
      case "string":
        if (!model)
          break;
        if (this.definitions.type[name3] = model, "~standard" in model)
          return this;
        const newModel = {
          ...model,
          id: model.$id ?? `#/components/schemas/${name3}`
        };
        return this.definitions.typebox = t2.Module({
          ...this.definitions.typebox.$defs,
          ...newModel
        }), this;
    }
    return model ? (this.definitions.type[name3] = model, ("~standard" in model) ? this : (this.definitions.typebox = t2.Module({
      ...this.definitions.typebox.$defs,
      [name3]: model
    }), this)) : this;
  }
  Ref(key) {
    return t2.Ref(key);
  }
  mapDerive(optionsOrDerive, mapper) {
    mapper || (mapper = optionsOrDerive, optionsOrDerive = { as: "local" });
    const hook = {
      subType: "mapDerive",
      fn: mapper
    };
    return this.onTransform(optionsOrDerive, hook);
  }
  affix(base, type2, word) {
    if (word === "")
      return this;
    const delimieter = ["_", "-", " "], capitalize = (word2) => word2[0].toUpperCase() + word2.slice(1), joinKey = base === "prefix" ? (prefix, word2) => delimieter.includes(prefix.at(-1) ?? "") ? prefix + word2 : prefix + capitalize(word2) : delimieter.includes(word.at(-1) ?? "") ? (suffix, word2) => word2 + suffix : (suffix, word2) => word2 + capitalize(suffix), remap = (type22) => {
      const store = {};
      switch (type22) {
        case "decorator":
          for (const key in this.singleton.decorator)
            store[joinKey(word, key)] = this.singleton.decorator[key];
          this.singleton.decorator = store;
          break;
        case "state":
          for (const key in this.singleton.store)
            store[joinKey(word, key)] = this.singleton.store[key];
          this.singleton.store = store;
          break;
        case "model":
          for (const key in this.definitions.type)
            store[joinKey(word, key)] = this.definitions.type[key];
          this.definitions.type = store;
          break;
        case "error":
          for (const key in this.definitions.error)
            store[joinKey(word, key)] = this.definitions.error[key];
          this.definitions.error = store;
          break;
      }
    }, types6 = Array.isArray(type2) ? type2 : [type2];
    for (const type22 of types6.some((x4) => x4 === "all") ? ["decorator", "state", "model", "error"] : types6)
      remap(type22);
    return this;
  }
  prefix(type2, word) {
    return this.affix("prefix", type2, word);
  }
  suffix(type2, word) {
    return this.affix("suffix", type2, word);
  }
  compile() {
    return this["~adapter"].beforeCompile?.(this), this["~adapter"].isWebStandard ? (this._handle = this.config.aot ? composeGeneralHandler(this) : createDynamicHandler(this), Object.defineProperty(this, "fetch", {
      value: this._handle,
      configurable: true,
      writable: true
    }), typeof this.server?.reload == "function" && this.server.reload({
      ...this.server || {},
      fetch: this.fetch
    }), this) : (typeof this.server?.reload == "function" && this.server.reload(this.server || {}), this._handle = composeGeneralHandler(this), this);
  }
  get fetch() {
    const fetch2 = this.config.aot ? composeGeneralHandler(this) : createDynamicHandler(this);
    return Object.defineProperty(this, "fetch", {
      value: fetch2,
      configurable: true,
      writable: true
    }), fetch2;
  }
  get modules() {
    return this.promisedModules;
  }
};
var Elysia = _Elysia;

// ../../node_modules/.pnpm/@elysiajs+cors@1.4.2_elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sincla_71fa6a05428639ed398a80dc8edf07e9/node_modules/@elysiajs/cors/dist/index.mjs
var isBun2 = typeof new Headers()?.toJSON === "function";
var processHeaders = (headers) => {
  if (isBun2)
    return Object.keys(headers.toJSON()).join(", ");
  let keys = "";
  let i = 0;
  headers.forEach((_6, key) => {
    if (i)
      keys = keys + ", " + key;
    else
      keys = key;
    i++;
  });
  return keys;
};
var cors = (config2) => {
  let {
    aot = true,
    origin = true,
    methods = true,
    allowedHeaders = true,
    exposeHeaders = true,
    credentials = true,
    maxAge = 5,
    preflight = true
  } = config2 ?? {};
  if (Array.isArray(allowedHeaders))
    allowedHeaders = allowedHeaders.join(", ");
  if (Array.isArray(exposeHeaders))
    exposeHeaders = exposeHeaders.join(", ");
  const origins = typeof origin === "boolean" ? undefined : Array.isArray(origin) ? origin : [origin];
  const app = new Elysia({
    name: "@elysiajs/cors",
    seed: config2,
    aot
  });
  const anyOrigin = origins?.some((o3) => o3 === "*");
  const originMap = {};
  if (origins) {
    for (const origin2 of origins)
      if (typeof origin2 === "string")
        originMap[origin2] = true;
  }
  const processOrigin = (origin2, request2, from) => {
    if (Array.isArray(origin2))
      return origin2.some((o3) => processOrigin(o3, request2, from));
    switch (typeof origin2) {
      case "string":
        if (from in originMap)
          return true;
        const fromProtocol = from.indexOf("://");
        if (fromProtocol !== -1)
          from = from.slice(fromProtocol + 3);
        return origin2 === from;
      case "function":
        return origin2(request2) === true;
      case "object":
        if (origin2 instanceof RegExp)
          return origin2.test(from);
    }
    return false;
  };
  const handleOrigin = (set2, request2) => {
    if (origin === true) {
      set2.headers.vary = "*";
      set2.headers["access-control-allow-origin"] = request2.headers.get("Origin") || "*";
      return;
    }
    if (anyOrigin) {
      set2.headers.vary = "*";
      set2.headers["access-control-allow-origin"] = "*";
      return;
    }
    if (!origins?.length)
      return;
    if (origins.length) {
      const from = request2.headers.get("Origin") ?? "";
      for (let i = 0;i < origins.length; i++) {
        const value = processOrigin(origins[i], request2, from);
        if (value === true) {
          set2.headers.vary = origin ? "Origin" : "*";
          set2.headers["access-control-allow-origin"] = from || "*";
          return;
        }
      }
    }
    set2.headers.vary = "Origin";
  };
  const handleMethod = (set2, method) => {
    if (!method)
      return;
    if (methods === true)
      return set2.headers["access-control-allow-methods"] = method ?? "*";
    if (methods === false || !methods?.length)
      return;
    if (methods === "*")
      return set2.headers["access-control-allow-methods"] = "*";
    if (!Array.isArray(methods))
      return set2.headers["access-control-allow-methods"] = methods;
    set2.headers["access-control-allow-methods"] = methods.join(", ");
  };
  const defaultHeaders = {};
  if (typeof exposeHeaders === "string")
    defaultHeaders["access-control-expose-headers"] = exposeHeaders;
  if (typeof allowedHeaders === "string")
    defaultHeaders["access-control-allow-headers"] = allowedHeaders;
  if (credentials === true)
    defaultHeaders["access-control-allow-credentials"] = "true";
  app.headers(defaultHeaders);
  function handleOption({ set: set2, request: request2, headers }) {
    handleOrigin(set2, request2);
    handleMethod(set2, request2.headers.get("access-control-request-method"));
    if (allowedHeaders === true || exposeHeaders === true) {
      if (allowedHeaders === true)
        set2.headers["access-control-allow-headers"] = headers["access-control-request-headers"];
      if (exposeHeaders === true)
        set2.headers["access-control-expose-headers"] = Object.keys(headers).join(",");
    }
    if (maxAge)
      set2.headers["access-control-max-age"] = maxAge.toString();
    return new Response(null, {
      status: 204
    });
  }
  if (preflight)
    app.options("/", handleOption).options("/*", handleOption);
  return app.onRequest(function processCors({ set: set2, request: request2 }) {
    handleOrigin(set2, request2);
    if (preflight && request2.method === "OPTIONS") {
      return handleOption({
        set: set2,
        request: request2,
        headers: isBun2 ? request2.headers.toJSON() : Object.fromEntries(request2.headers.entries())
      });
    }
    handleMethod(set2, request2.method);
    if (allowedHeaders === true || exposeHeaders === true) {
      const headers = processHeaders(request2.headers);
      if (allowedHeaders === true)
        set2.headers["access-control-allow-headers"] = headers;
      if (exposeHeaders === true)
        set2.headers["access-control-expose-headers"] = headers;
    }
  });
};

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/alternate.css2.js
var a2 = `/* basic theme */
:root {
  --scalar-text-decoration: underline;
  --scalar-text-decoration-hover: underline;
}
.light-mode,
.light-mode .dark-mode {
  --scalar-background-1: #f9f9f9;
  --scalar-background-2: #f1f1f1;
  --scalar-background-3: #e7e7e7;
  --scalar-background-card: #fff;

  --scalar-color-1: #2a2f45;
  --scalar-color-2: #757575;
  --scalar-color-3: #8e8e8e;

  --scalar-color-accent: var(--scalar-color-1);
  --scalar-background-accent: var(--scalar-background-3);

  --scalar-border-color: rgba(0, 0, 0, 0.1);
}
.dark-mode {
  --scalar-background-1: #131313;
  --scalar-background-2: #1d1d1d;
  --scalar-background-3: #272727;
  --scalar-background-card: #1d1d1d;

  --scalar-color-1: rgba(255, 255, 255, 0.9);
  --scalar-color-2: rgba(255, 255, 255, 0.62);
  --scalar-color-3: rgba(255, 255, 255, 0.44);

  --scalar-color-accent: var(--scalar-color-1);
  --scalar-background-accent: var(--scalar-background-3);

  --scalar-border-color: #2a2b2a;
}
/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-hover-color: currentColor;

  --scalar-sidebar-item-active-background: var(--scalar-background-accent);
  --scalar-sidebar-color-active: var(--scalar-color-accent);

  --scalar-sidebar-search-background: transparent;
  --scalar-sidebar-search-color: var(--scalar-color-3);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
}
/* advanced */
.light-mode .dark-mode,
.light-mode {
  --scalar-color-green: #069061;
  --scalar-color-red: #ef0006;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #0082d0;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}
.dark-mode {
  --scalar-color-green: #00b648;
  --scalar-color-red: #dd2f2c;
  --scalar-color-yellow: #ffc90d;
  --scalar-color-blue: #4eb3ec;
  --scalar-color-orange: #ff8d4d;
  --scalar-color-purple: #b191f9;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;
}

.scalar-api-client__item,
.scalar-card,
.dark-mode .dark-mode.scalar-card {
  --scalar-background-1: var(--scalar-background-card);
  --scalar-background-2: var(--scalar-background-1);
  --scalar-background-3: var(--scalar-background-1);
}
.dark-mode .dark-mode.scalar-card {
  --scalar-background-3: var(--scalar-background-3);
}
.t-doc__sidebar {
  --scalar-color-green: var(--scalar-color-1);
  --scalar-color-red: var(--scalar-color-1);
  --scalar-color-yellow: var(--scalar-color-1);
  --scalar-color-blue: var(--scalar-color-1);
  --scalar-color-orange: var(--scalar-color-1);
  --scalar-color-purple: var(--scalar-color-1);
}
.light-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-blue), transparent 70%);
}
.dark-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-blue), transparent 50%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/bluePlanet.css2.js
var a3 = `/* basic theme */
:root {
  --scalar-text-decoration: underline;
  --scalar-text-decoration-hover: underline;
}
.light-mode {
  --scalar-background-1: #f0f2f5;
  --scalar-background-2: #eaecf0;
  --scalar-background-3: #e0e2e6;
  --scalar-border-color: rgb(213 213 213);

  --scalar-color-1: rgb(9, 9, 11);
  --scalar-color-2: rgb(113, 113, 122);
  --scalar-color-3: rgba(25, 25, 28, 0.5);

  --scalar-color-accent: var(--scalar-color-1);
  --scalar-background-accent: #8ab4f81f;
}
.light-mode .scalar-card.dark-mode,
.dark-mode {
  --scalar-background-1: #000e23;
  --scalar-background-2: #01132e;
  --scalar-background-3: #03193b;
  --scalar-border-color: #2e394c;

  --scalar-color-1: #fafafa;
  --scalar-color-2: rgb(161, 161, 170);
  --scalar-color-3: rgba(255, 255, 255, 0.533);

  --scalar-color-accent: var(--scalar-color-1);
  --scalar-background-accent: #8ab4f81f;

  --scalar-code-language-color-supersede: var(--scalar-color-1);
}
/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-hover-color: currentColor;

  --scalar-sidebar-item-active-background: var(--scalar-background-3);
  --scalar-sidebar-color-active: var(--scalar-color-accent);

  --scalar-sidebar-search-background: rgba(255, 255, 255, 0.1);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
  --scalar-sidebar-search-color: var(--scalar-color-3);
  z-index: 1;
}
.light-mode .t-doc__sidebar {
  --scalar-sidebar-search-background: white;
}
/* advanced */
.light-mode {
  --scalar-color-green: #069061;
  --scalar-color-red: #ef0006;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #0082d0;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}
.dark-mode {
  --scalar-color-green: rgba(69, 255, 165, 0.823);
  --scalar-color-red: #ff8589;
  --scalar-color-yellow: #ffcc4d;
  --scalar-color-blue: #6bc1fe;
  --scalar-color-orange: #f98943;
  --scalar-color-purple: #b191f9;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;
}
/* Custom theme */
/* Document header */
@keyframes headerbackground {
  from {
    background: transparent;
    backdrop-filter: none;
  }
  to {
    background: var(--header-background-1);
    backdrop-filter: blur(12px);
  }
}
.dark-mode h2.t-editor__heading,
.dark-mode .t-editor__page-title h1,
.dark-mode h1.section-header:not(::selection),
.dark-mode .markdown h1,
.dark-mode .markdown h2,
.dark-mode .markdown h3,
.dark-mode .markdown h4,
.dark-mode .markdown h5,
.dark-mode .markdown h6 {
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(to right bottom, rgb(255, 255, 255) 30%, rgba(255, 255, 255, 0.38));
  -webkit-background-clip: text;
  background-clip: text;
}
/* Hero Section Flare */
.section-flare-item:nth-of-type(1) {
  --c1: #ffffff;
  --c2: #babfd8;
  --c3: #2e8bb2;
  --c4: #1a8593;
  --c5: #0a143e;
  --c6: #0a0f52;
  --c7: #2341b8;

  --solid: var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c7);
  --solid-wrap: var(--solid), var(--c1);
  --trans:
    var(--c1), transparent, var(--c2), transparent, var(--c3),
    transparent, var(--c4), transparent, var(--c5), transparent, var(--c6),
    transparent, var(--c7);
  --trans-wrap: var(--trans), transparent, var(--c1);

  background: radial-gradient(circle, var(--trans)), conic-gradient(from 180deg, var(--trans-wrap)),
    radial-gradient(circle, var(--trans)), conic-gradient(var(--solid-wrap));
  width: 70vw;
  height: 700px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  right: 0;
  position: absolute;
  transform: rotate(-45deg);
  top: -300px;
  opacity: 0.3;
}
.section-flare-item:nth-of-type(3) {
  --star-color: #6b9acc;
  --star-color2: #446b8d;
  --star-color3: #3e5879;
  background-image: radial-gradient(2px 2px at 20px 30px, var(--star-color2), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 40px 70px, var(--star-color), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 50px 160px, var(--star-color3), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, var(--star-color), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 130px 80px, var(--star-color), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 160px 120px, var(--star-color3), rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
}
.section-flare {
  top: -150px !important;
  height: 100vh;
  background: linear-gradient(#000, var(--scalar-background-1));
  width: 100vw;
  overflow-x: hidden;
}
.light-mode .section-flare {
  display: none;
}
.light-mode .scalar-card {
  --scalar-background-1: #fff;
  --scalar-background-2: #fff;
  --scalar-background-3: #fff;
}

*::selection {
  background-color: color-mix(in srgb, var(--scalar-color-blue), transparent 60%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/deepSpace.css2.js
var a4 = `/* basic theme */
:root {
  --scalar-text-decoration: underline;
  --scalar-text-decoration-hover: underline;
}
.light-mode {
  --scalar-color-1: rgb(9, 9, 11);
  --scalar-color-2: rgb(113, 113, 122);
  --scalar-color-3: rgba(25, 25, 28, 0.5);
  --scalar-color-accent: var(--scalar-color-1);

  --scalar-background-1: #fff;
  --scalar-background-2: #f4f4f5;
  --scalar-background-3: #e3e3e6;
  --scalar-background-accent: #8ab4f81f;

  --scalar-border-color: rgb(228, 228, 231);
  --scalar-code-language-color-supersede: var(--scalar-color-1);
}
.dark-mode {
  --scalar-color-1: #fafafa;
  --scalar-color-2: rgb(161, 161, 170);
  --scalar-color-3: rgba(255, 255, 255, 0.533);
  --scalar-color-accent: var(--scalar-color-1);

  --scalar-background-1: #09090b;
  --scalar-background-2: #18181b;
  --scalar-background-3: #2c2c30;
  --scalar-background-accent: #8ab4f81f;

  --scalar-border-color: rgba(255, 255, 255, 0.16);
  --scalar-code-language-color-supersede: var(--scalar-color-1);
}

/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-hover-background: var(--scalar-background-2);

  --scalar-sidebar-item-active-background: var(--scalar-background-3);
  --scalar-sidebar-color-active: var(--scalar-color-accent);

  --scalar-sidebar-search-background: transparent;
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
  --scalar-sidebar-search-color: var(--scalar-color-3);
}
.light-mode .t-doc__sidebar {
  --scalar-sidebar-item-active-background: var(--scalar-background-2);
}
/* advanced */
.light-mode {
  --scalar-color-green: #069061;
  --scalar-color-red: #ef0006;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #0082d0;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}
.dark-mode {
  --scalar-color-green: rgba(69, 255, 165, 0.823);
  --scalar-color-red: #ff8589;
  --scalar-color-yellow: #ffcc4d;
  --scalar-color-blue: #6bc1fe;
  --scalar-color-orange: #f98943;
  --scalar-color-purple: #b191f9;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;
}
/* Custom theme */
.dark-mode h2.t-editor__heading,
.dark-mode .t-editor__page-title h1,
.dark-mode h1.section-header:not(::selection),
.dark-mode .markdown h1,
.dark-mode .markdown h2,
.dark-mode .markdown h3,
.dark-mode .markdown h4,
.dark-mode .markdown h5,
.dark-mode .markdown h6 {
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(to right bottom, rgb(255, 255, 255) 30%, rgba(255, 255, 255, 0.38));
  -webkit-background-clip: text;
  background-clip: text;
}
.examples .scalar-card-footer {
  --scalar-background-3: transparent;
  padding-top: 0;
}
/* Hero section flare */
.section-flare {
  width: 100vw;
  height: 550px;
  position: absolute;
}
.section-flare-item:nth-of-type(1) {
  position: absolute;
  width: 100vw;
  height: 550px;
  --stripesDark: repeating-linear-gradient(100deg, #000 0%, #000 7%, transparent 10%, transparent 12%, #000 16%);
  --rainbow: repeating-linear-gradient(100deg, #fff 10%, #fff 16%, #fff 22%, #fff 30%);
  background-image: var(--stripesDark), var(--rainbow);
  background-size: 300%, 200%;
  background-position: 50% 50%, 50% 50%;
  filter: invert(100%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
  mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
  pointer-events: none;
  opacity: 0.07;
}
.dark-mode .section-flare-item:nth-of-type(1) {
  background-image: var(--stripesDark), var(--rainbow);
  filter: opacity(50%) saturate(200%);
  opacity: 0.25;
  height: 350px;
}
.section-flare-item:nth-of-type(1):after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: var(--stripesDark), var(--rainbow);
  background-size: 200%, 100%;
  background-attachment: fixed;
  mix-blend-mode: difference;
}
.dark-mode .section-flare:after {
  background-image: var(--stripesDark), var(--rainbow);
}
.section-flare-item:nth-of-type(2) {
  --star-color: #fff;
  --star-color2: #fff;
  --star-color3: #fff;
  width: 100%;
  height: 100%;
  position: absolute;
  background-image: radial-gradient(2px 2px at 20px 30px, var(--star-color2), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 40px 70px, var(--star-color), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 50px 160px, var(--star-color3), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, var(--star-color), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 130px 80px, var(--star-color), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 160px 120px, var(--star-color3), rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
  mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
  opacity: 0.2;
}
.light-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-blue), transparent 70%);
}
.dark-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-blue), transparent 50%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/default.css2.js
var r2 = `/* basic theme */
.light-mode {
  --scalar-background-1: #fff;
  --scalar-background-2: #f6f6f6;
  --scalar-background-3: #e7e7e7;
  --scalar-background-accent: #8ab4f81f;

  --scalar-color-1: #2a2f45;
  --scalar-color-2: #757575;
  --scalar-color-3: #8e8e8e;

  --scalar-color-accent: #0099ff;
  --scalar-border-color: #dfdfdf;
}
.dark-mode {
  --scalar-background-1: #0f0f0f;
  --scalar-background-2: #1a1a1a;
  --scalar-background-3: #272727;

  --scalar-color-1: #e7e7e7;
  --scalar-color-2: #a4a4a4;
  --scalar-color-3: #797979;

  --scalar-color-accent: #3ea6ff;
  --scalar-background-accent: #3ea6ff1f;

  --scalar-border-color: #2d2d2d;
}
/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-hover-color: currentColor;

  --scalar-sidebar-item-active-background: var(--scalar-background-2);
  --scalar-sidebar-color-active: var(--scalar-color-1);

  --scalar-sidebar-indent-border: var(--scalar-sidebar-border-color);
  --scalar-sidebar-indent-border-hover: var(--scalar-sidebar-border-color);
  --scalar-sidebar-indent-border-active: var(--scalar-sidebar-border-color);

  --scalar-sidebar-search-background: transparent;
  --scalar-sidebar-search-color: var(--scalar-color-3);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
}
/* advanced */
.light-mode {
  --scalar-color-green: #069061;
  --scalar-color-red: #ef0006;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #0082d0;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);

  --scalar-color-danger: color-mix(in srgb, var(--scalar-color-red), var(--scalar-color-1) 20%);

  --scalar-background-alert: color-mix(in srgb, var(--scalar-color-orange), var(--scalar-background-1) 95%);
  --scalar-background-danger: color-mix(in srgb, var(--scalar-color-red), var(--scalar-background-1) 95%);
}
.dark-mode {
  --scalar-color-green: #00b648;
  --scalar-color-red: #dc1b19;
  --scalar-color-yellow: #ffc90d;
  --scalar-color-blue: #4eb3ec;
  --scalar-color-orange: #ff8d4d;
  --scalar-color-purple: #b191f9;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;

  --scalar-color-danger: color-mix(in srgb, var(--scalar-color-red), var(--scalar-background-1) 20%);

  --scalar-background-alert: color-mix(in srgb, var(--scalar-color-orange), var(--scalar-background-1) 95%);
  --scalar-background-danger: color-mix(in srgb, var(--scalar-color-red), var(--scalar-background-1) 95%);
}
@supports (color: color(display-p3 1 1 1)) {
  .light-mode {
    --scalar-color-accent: color(display-p3 0.0 0.6 1.0 / 1.0);
    --scalar-color-green: color(display-p3 0.023529 0.564706 0.380392 / 1.0);
    --scalar-color-red: color(display-p3 0.937255 0.0 0.023529 / 1.0);
    --scalar-color-yellow: color(display-p3 0.929412 0.745098 0.12549 / 1.0);
    --scalar-color-blue: color(display-p3 0.0 0.509804 0.815686 / 1.0);
    --scalar-color-orange: color(display-p3 0.984314 0.537255 0.172549 / 1.0);
    --scalar-color-purple: color(display-p3 0.321569 0.011765 0.819608 / 1.0);
  }
  .dark-mode {
    --scalar-color-accent: color(display-p3 0.243137 0.65098 1.0 / 1.0);
    --scalar-color-green: color(display-p3 0.0 0.713725 0.282353 / 1.0);
    --scalar-color-red: color(display-p3 0.862745 0.105882 0.098039 / 1.0);
    --scalar-color-yellow: color(display-p3 1.0 0.788235 0.05098 / 1.0);
    --scalar-color-blue: color(display-p3 0.305882 0.701961 0.92549 / 1.0);
    --scalar-color-orange: color(display-p3 1.0 0.552941 0.301961 / 1.0);
    --scalar-color-purple: color(display-p3 0.694118 0.568627 0.976471 / 1.0);
  }
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/elysiajs.css2.js
var a5 = `.light-mode {
  --scalar-color-1: #2a2f45;
  --scalar-color-2: #757575;
  --scalar-color-3: #8e8e8e;
  --scalar-color-accent: #f06292;

  --scalar-background-1: #fff;
  --scalar-background-2: #f6f6f6;
  --scalar-background-3: #e7e7e7;

  --scalar-border-color: rgba(0, 0, 0, 0.1);
}
.dark-mode {
  --scalar-color-1: rgba(255, 255, 255, 0.9);
  --scalar-color-2: rgba(156, 163, 175, 1);
  --scalar-color-3: rgba(255, 255, 255, 0.44);
  --scalar-color-accent: #f06292;

  --scalar-background-1: #111728;
  --scalar-background-2: #1e293b;
  --scalar-background-3: #334155;
  --scalar-background-accent: #f062921f;

  --scalar-border-color: rgba(255, 255, 255, 0.1);
}

/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-hover-color: currentColor;

  --scalar-sidebar-item-active-background: #f062921f;
  --scalar-sidebar-color-active: var(--scalar-color-accent);

  --scalar-sidebar-search-background: transparent;
  --scalar-sidebar-search-color: var(--scalar-color-3);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
}

/* advanced */
.light-mode {
  --scalar-button-1: rgb(49 53 56);
  --scalar-button-1-color: #fff;
  --scalar-button-1-hover: rgb(28 31 33);

  --scalar-color-green: #069061;
  --scalar-color-red: #ef0006;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #0082d0;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;

  --scalar-scrollbar-color: rgba(0, 0, 0, 0.18);
  --scalar-scrollbar-color-active: rgba(0, 0, 0, 0.36);
}
.dark-mode {
  --scalar-button-1: #f6f6f6;
  --scalar-button-1-color: #000;
  --scalar-button-1-hover: #e7e7e7;

  --scalar-color-green: #a3ffa9;
  --scalar-color-red: #ffa3a3;
  --scalar-color-yellow: #fffca3;
  --scalar-color-blue: #a5d6ff;
  --scalar-color-orange: #e2ae83;
  --scalar-color-purple: #d2a8ff;

  --scalar-scrollbar-color: rgba(255, 255, 255, 0.24);
  --scalar-scrollbar-color-active: rgba(255, 255, 255, 0.48);
}
.section-flare {
  width: 100%;
  height: 400px;
  position: absolute;
}
.section-flare-item:first-of-type:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  --stripes: repeating-linear-gradient(100deg, #fff 0%, #fff 0%, transparent 2%, transparent 12%, #fff 17%);
  --stripesDark: repeating-linear-gradient(100deg, #000 0%, #000 0%, transparent 10%, transparent 12%, #000 17%);
  --rainbow: repeating-linear-gradient(100deg, #60a5fa 10%, #e879f9 16%, #5eead4 22%, #60a5fa 30%);
  contain: strict;
  contain-intrinsic-size: 100vw 40vh;
  background-image: var(--stripesDark), var(--rainbow);
  background-size: 300%, 200%;
  background-position: 50% 50%, 50% 50%;
  filter: opacity(20%) saturate(200%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
  mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
  pointer-events: none;
}
.section-flare-item:first-of-type:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: var(--stripes), var(--rainbow);
  background-size: 200%, 100%;
  background-attachment: fixed;
  mix-blend-mode: difference;
  background-image: var(--stripesDark), var(--rainbow);
  pointer-events: none;
}
.light-mode .section-flare-item:first-of-type:after,
.light-mode .section-flare-item:first-of-type:before {
  background-image: var(--stripes), var(--rainbow);
  filter: opacity(4%) saturate(200%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/fastify.css2.js
var a6 = `.light-mode {
  color-scheme: light;
  --scalar-color-1: #1c1e21;
  --scalar-color-2: #757575;
  --scalar-color-3: #8e8e8e;
  --scalar-color-disabled: #b4b1b1;
  --scalar-color-ghost: #a7a7a7;
  --scalar-color-accent: #2f8555;
  --scalar-background-1: #fff;
  --scalar-background-2: #f5f5f5;
  --scalar-background-3: #ededed;
  --scalar-background-4: rgba(0, 0, 0, 0.06);
  --scalar-background-accent: #2f85551f;

  --scalar-border-color: rgba(0, 0, 0, 0.1);
  --scalar-scrollbar-color: rgba(0, 0, 0, 0.18);
  --scalar-scrollbar-color-active: rgba(0, 0, 0, 0.36);
  --scalar-lifted-brightness: 1;
  --scalar-backdrop-brightness: 1;

  --scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);
  --scalar-shadow-2: rgba(0, 0, 0, 0.08) 0px 13px 20px 0px, rgba(0, 0, 0, 0.08) 0px 3px 8px 0px, #eeeeed 0px 0 0 1px;

  --scalar-button-1: rgb(49 53 56);
  --scalar-button-1-color: #fff;
  --scalar-button-1-hover: rgb(28 31 33);

  --scalar-color-green: #007300;
  --scalar-color-red: #af272b;
  --scalar-color-yellow: #b38200;
  --scalar-color-blue: #3b8ba5;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;
}

.dark-mode {
  color-scheme: dark;
  --scalar-color-1: rgba(255, 255, 255, 0.9);
  --scalar-color-2: rgba(255, 255, 255, 0.62);
  --scalar-color-3: rgba(255, 255, 255, 0.44);
  --scalar-color-disabled: rgba(255, 255, 255, 0.34);
  --scalar-color-ghost: rgba(255, 255, 255, 0.26);
  --scalar-color-accent: #27c2a0;
  --scalar-background-1: #1b1b1d;
  --scalar-background-2: #242526;
  --scalar-background-3: #3b3b3b;
  --scalar-background-4: rgba(255, 255, 255, 0.06);
  --scalar-background-accent: #27c2a01f;

  --scalar-border-color: rgba(255, 255, 255, 0.1);
  --scalar-scrollbar-color: rgba(255, 255, 255, 0.24);
  --scalar-scrollbar-color-active: rgba(255, 255, 255, 0.48);
  --scalar-lifted-brightness: 1.45;
  --scalar-backdrop-brightness: 0.5;

  --scalar-shadow-1: 0 1px 3px 0 rgb(0, 0, 0, 0.1);
  --scalar-shadow-2: rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px, 0 0 0 1px
    rgba(255, 255, 255, 0.1);

  --scalar-button-1: #f6f6f6;
  --scalar-button-1-color: #000;
  --scalar-button-1-hover: #e7e7e7;

  --scalar-color-green: #26b226;
  --scalar-color-red: #fb565b;
  --scalar-color-yellow: #ffc426;
  --scalar-color-blue: #6ecfef;
  --scalar-color-orange: #ff8d4d;
  --scalar-color-purple: #b191f9;
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/kepler.css2.js
var a7 = `/* basic theme */
.light-mode {
  --scalar-color-1: #2a2f45;
  --scalar-color-2: #757575;
  --scalar-color-3: #8e8e8e;
  --scalar-color-accent: #7070ff;

  --scalar-background-1: #fff;
  --scalar-background-2: #f6f6f6;
  --scalar-background-3: #e7e7e7;
  --scalar-background-accent: #7070ff1f;

  --scalar-border-color: rgba(0, 0, 0, 0.1);

  --scalar-code-language-color-supersede: var(--scalar-color-3);
}
.dark-mode {
  --scalar-color-1: #f7f8f8;
  --scalar-color-2: rgb(180, 188, 208);
  --scalar-color-3: #b4bcd099;
  --scalar-color-accent: #828fff;

  --scalar-background-1: #000212;
  --scalar-background-2: #0d0f1e;
  --scalar-background-3: #232533;
  --scalar-background-accent: #8ab4f81f;

  --scalar-border-color: #313245;
  --scalar-code-language-color-supersede: var(--scalar-color-3);
}
/* Document Sidebar */
.light-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-active-background: var(--scalar-background-accent);
  --scalar-sidebar-border-color: var(--scalar-border-color);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-color-active: var(--scalar-color-accent);
  --scalar-sidebar-search-background: rgba(0, 0, 0, 0.05);
  --scalar-sidebar-search-border-color: 1px solid rgba(0, 0, 0, 0.05);
  --scalar-sidebar-search-color: var(--scalar-color-3);
  --scalar-background-2: rgba(0, 0, 0, 0.03);
}
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-active-background: rgba(255, 255, 255, 0.1);
  --scalar-sidebar-border-color: var(--scalar-border-color);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-color-active: var(--scalar-color-accent);
  --scalar-sidebar-search-background: rgba(255, 255, 255, 0.1);
  --scalar-sidebar-search-border-color: 1px solid rgba(255, 255, 255, 0.05);
  --scalar-sidebar-search-color: var(--scalar-color-3);
}
/* advanced */
.light-mode {
  --scalar-color-green: #069061;
  --scalar-color-red: #ef0006;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #0082d0;
  --scalar-color-orange: #fb892c;
  --scalar-color-purple: #5203d1;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}
.dark-mode {
  --scalar-color-green: #00b648;
  --scalar-color-red: #dc1b19;
  --scalar-color-yellow: #ffc90d;
  --scalar-color-blue: #4eb3ec;
  --scalar-color-orange: #ff8d4d;
  --scalar-color-purple: #b191f9;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;
}
/* Custom Theme */
.dark-mode h2.t-editor__heading,
.dark-mode .t-editor__page-title h1,
.dark-mode h1.section-header:not(::selection),
.dark-mode .markdown h1,
.dark-mode .markdown h2,
.dark-mode .markdown h3,
.dark-mode .markdown h4,
.dark-mode .markdown h5,
.dark-mode .markdown h6 {
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(to right bottom, rgb(255, 255, 255) 30%, rgba(255, 255, 255, 0.38));
  -webkit-background-clip: text;
  background-clip: text;
}
.sidebar-search {
  backdrop-filter: blur(12px);
}
@keyframes headerbackground {
  from {
    background: transparent;
    backdrop-filter: none;
  }
  to {
    background: var(--header-background-1);
    backdrop-filter: blur(12px);
  }
}
.dark-mode .scalar-card {
  background: rgba(255, 255, 255, 0.05) !important;
}
.dark-mode .scalar-card * {
  --scalar-background-2: transparent !important;
  --scalar-background-1: transparent !important;
}
.light-mode .dark-mode.scalar-card *,
.light-mode .dark-mode.scalar-card {
  --scalar-background-1: #0d0f1e !important;
  --scalar-background-2: #0d0f1e !important;
  --scalar-background-3: #191b29 !important;
}
.light-mode .dark-mode.scalar-card {
  background: #191b29 !important;
}
.badge {
  box-shadow: 0 0 0 1px var(--scalar-border-color);
  margin-right: 6px;
}

.table-row.required-parameter .table-row-item:nth-of-type(2):after {
  background: transparent;
  box-shadow: none;
}
/* Hero Section Flare */
.section-flare {
  width: 100vw;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.3), transparent);
  height: 100vh;
}
.light-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 70%);
}
.dark-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 50%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/mars.css2.js
var a8 = `/* basic theme */
:root {
  --scalar-text-decoration: underline;
  --scalar-text-decoration-hover: underline;
}
.light-mode {
  --scalar-background-1: #f9f6f0;
  --scalar-background-2: #f2efe8;
  --scalar-background-3: #e9e7e2;
  --scalar-border-color: rgba(203, 165, 156, 0.6);

  --scalar-color-1: #c75549;
  --scalar-color-2: #c75549;
  --scalar-color-3: #c75549;

  --scalar-color-accent: #c75549;
  --scalar-background-accent: #dcbfa81f;

  --scalar-code-language-color-supersede: var(--scalar-color-1);
}
.dark-mode {
  --scalar-background-1: #140507;
  --scalar-background-2: #20090c;
  --scalar-background-3: #321116;
  --scalar-border-color: #3c3031;

  --scalar-color-1: rgba(255, 255, 255, 0.9);
  --scalar-color-2: rgba(255, 255, 255, 0.62);
  --scalar-color-3: rgba(255, 255, 255, 0.44);

  --scalar-color-accent: rgba(255, 255, 255, 0.9);
  --scalar-background-accent: #441313;

  --scalar-code-language-color-supersede: var(--scalar-color-1);
}

/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-hover-background: var(--scalar-background-2);

  --scalar-sidebar-item-active-background: var(--scalar-background-3);
  --scalar-sidebar-color-active: var(--scalar-color-accent);

  --scalar-sidebar-search-background: rgba(255, 255, 255, 0.1);
  --scalar-sidebar-search-color: var(--scalar-color-3);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
  z-index: 1;
}
/* advanced */
.light-mode {
  --scalar-color-green: #09533a;
  --scalar-color-red: #aa181d;
  --scalar-color-yellow: #ab8d2b;
  --scalar-color-blue: #19689a;
  --scalar-color-orange: #b26c34;
  --scalar-color-purple: #4c2191;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}
.dark-mode {
  --scalar-color-green: rgba(69, 255, 165, 0.823);
  --scalar-color-red: #ff8589;
  --scalar-color-yellow: #ffcc4d;
  --scalar-color-blue: #6bc1fe;
  --scalar-color-orange: #f98943;
  --scalar-color-purple: #b191f9;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;
}
/* Custom Theme */
.dark-mode h2.t-editor__heading,
.dark-mode .t-editor__page-title h1,
.dark-mode h1.section-header:not(::selection),
.dark-mode .markdown h1,
.dark-mode .markdown h2,
.dark-mode .markdown h3,
.dark-mode .markdown h4,
.dark-mode .markdown h5,
.dark-mode .markdown h6 {
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(to right bottom, rgb(255, 255, 255) 30%, rgba(255, 255, 255, 0.38));
  -webkit-background-clip: text;
  background-clip: text;
}
.light-mode .t-doc__sidebar {
  --scalar-sidebar-search-background: white;
}
.examples .scalar-card-footer {
  --scalar-background-3: transparent;
  padding-top: 0;
}
/* Hero section flare */
.section-flare {
  overflow-x: hidden;
  height: 100vh;
  left: initial;
}
.section-flare-item:nth-of-type(1) {
  background: #d25019;
  position: relative;
  top: -150px;
  right: -400px;
  width: 80vw;
  height: 500px;
  margin-top: -150px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
}
.light-mode .section-flare {
  display: none;
}
*::selection {
  background-color: color-mix(in srgb, var(--scalar-color-red), transparent 75%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/moon.css2.js
var a9 = `.light-mode {
  color-scheme: light;
  --scalar-color-1: #000000;
  --scalar-color-2: #000000;
  --scalar-color-3: #000000;
  --scalar-color-accent: #645b0f;
  --scalar-background-1: #ccc9b3;
  --scalar-background-2: #c2bfaa;
  --scalar-background-3: #b8b5a1;
  --scalar-background-accent: #000000;

  --scalar-border-color: rgba(0, 0, 0, 0.2);
  --scalar-scrollbar-color: rgba(0, 0, 0, 0.18);
  --scalar-scrollbar-color-active: rgba(0, 0, 0, 0.36);
  --scalar-lifted-brightness: 1;
  --scalar-backdrop-brightness: 1;

  --scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);
  --scalar-shadow-2: rgba(0, 0, 0, 0.08) 0px 13px 20px 0px, rgba(0, 0, 0, 0.08) 0px 3px 8px 0px,
    var(--scalar-border-color) 0px 0 0 1px;

  --scalar-button-1: rgb(49 53 56);
  --scalar-button-1-color: #fff;
  --scalar-button-1-hover: rgb(28 31 33);

  --scalar-color-red: #b91c1c;
  --scalar-color-orange: #a16207;
  --scalar-color-green: #047857;
  --scalar-color-blue: #1d4ed8;
  --scalar-color-orange: #c2410c;
  --scalar-color-purple: #6d28d9;
}

.dark-mode {
  color-scheme: dark;
  --scalar-color-1: #fffef3;
  --scalar-color-2: #fffef3;
  --scalar-color-3: #fffef3;
  --scalar-color-accent: #c3b531;
  --scalar-background-1: #313332;
  --scalar-background-2: #393b3a;
  --scalar-background-3: #414342;
  --scalar-background-accent: #fffef3;

  --scalar-border-color: #505452;
  --scalar-scrollbar-color: rgba(255, 255, 255, 0.24);
  --scalar-scrollbar-color-active: rgba(255, 255, 255, 0.48);
  --scalar-lifted-brightness: 1.45;
  --scalar-backdrop-brightness: 0.5;

  --scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);
  --scalar-shadow-2: rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px, 0 0 0 1px
    rgba(255, 255, 255, 0.1);

  --scalar-button-1: #f6f6f6;
  --scalar-button-1-color: #000;
  --scalar-button-1-hover: #e7e7e7;

  --scalar-color-green: #00b648;
  --scalar-color-red: #dc1b19;
  --scalar-color-yellow: #ffc90d;
  --scalar-color-blue: #4eb3ec;
  --scalar-color-orange: #ff8d4d;
  --scalar-color-purple: #b191f9;
}

/* Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-hover-color: currentColor;

  --scalar-sidebar-item-active-background: var(--scalar-background-3);
  --scalar-sidebar-color-active: var(--scalar-color-1);

  --scalar-sidebar-search-background: transparent;
  --scalar-sidebar-search-color: var(--scalar-color-3);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
}
*::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 80%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/purple.css2.js
var a10 = `/* basic theme */
.light-mode {
  --scalar-background-1: #fff;
  --scalar-background-2: #f5f6f8;
  --scalar-background-3: #eceef1;

  --scalar-color-1: #2a2f45;
  --scalar-color-2: #757575;
  --scalar-color-3: #8e8e8e;

  --scalar-color-accent: #5469d4;
  --scalar-background-accent: #5469d41f;

  --scalar-border-color: rgba(215, 215, 206, 0.68);
}
.dark-mode {
  --scalar-background-1: #15171c;
  --scalar-background-2: #1c1e24;
  --scalar-background-3: #22252b;

  --scalar-color-1: #fafafa;
  --scalar-color-2: #c9ced8;
  --scalar-color-3: #8c99ad;

  --scalar-color-accent: #5469d4;
  --scalar-background-accent: #5469d41f;

  --scalar-border-color: #3f4145;
}
/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-hover-background: var(--scalar-background-3);

  --scalar-sidebar-item-active-background: var(--scalar-background-accent);
  --scalar-sidebar-color-active: var(--scalar-color-accent);

  --scalar-sidebar-search-background: var(--scalar-background-1);
  --scalar-sidebar-search-color: var(--scalar-color-3);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
}

/* advanced */
.light-mode {
  --scalar-color-green: #17803d;
  --scalar-color-red: #e10909;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #1763a6;
  --scalar-color-orange: #e25b09;
  --scalar-color-purple: #5c3993;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}
.dark-mode {
  --scalar-color-green: #30a159;
  --scalar-color-red: #dc1b19;
  --scalar-color-yellow: #eec644;
  --scalar-color-blue: #2b7abf;
  --scalar-color-orange: #f07528;
  --scalar-color-purple: #7a59b1;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;
}
.light-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 70%);
}
.dark-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 50%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/saturn.css2.js
var a11 = `/* basic theme */
.light-mode {
  --scalar-background-1: #f3f3ee;
  --scalar-background-2: #e8e8e3;
  --scalar-background-3: #e4e4df;
  --scalar-border-color: rgba(215, 215, 206, 0.85);

  --scalar-color-1: #2a2f45;
  --scalar-color-2: #757575;
  --scalar-color-3: #8e8e8e;

  --scalar-color-accent: #1763a6;
  --scalar-background-accent: #1f648e1f;
}
.dark-mode {
  --scalar-background-1: #09090b;
  --scalar-background-2: #18181b;
  --scalar-background-3: #2c2c30;
  --scalar-border-color: rgba(255, 255, 255, 0.17);

  --scalar-color-1: #fafafa;
  --scalar-color-2: rgb(161, 161, 170);
  --scalar-color-3: rgba(255, 255, 255, 0.533);

  --scalar-color-accent: #4eb3ec;
  --scalar-background-accent: #8ab4f81f;
}
/* Document Sidebar */
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-border-color: var(--scalar-border-color);

  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-hover-color: currentColor;

  --scalar-sidebar-item-active-background: var(--scalar-background-3);
  --scalar-sidebar-color-active: var(--scalar-color-1);

  --scalar-sidebar-search-background: var(--scalar-background-1);
  --scalar-sidebar-search-border-color: var(--scalar-border-color);
  --scalar-sidebar-search-color: var(--scalar-color-3);
}

/* advanced */
.light-mode {
  --scalar-color-green: #17803d;
  --scalar-color-red: #e10909;
  --scalar-color-yellow: #edbe20;
  --scalar-color-blue: #1763a6;
  --scalar-color-orange: #e25b09;
  --scalar-color-purple: #5c3993;

  --scalar-button-1: rgba(0, 0, 0, 1);
  --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
  --scalar-button-1-color: rgba(255, 255, 255, 0.9);
}
.dark-mode {
  --scalar-color-green: #30a159;
  --scalar-color-red: #dc1b19;
  --scalar-color-yellow: #eec644;
  --scalar-color-blue: #2b7abf;
  --scalar-color-orange: #f07528;
  --scalar-color-purple: #7a59b1;

  --scalar-button-1: rgba(255, 255, 255, 1);
  --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
  --scalar-button-1-color: black;
}
.dark-mode h2.t-editor__heading,
.dark-mode .t-editor__page-title h1,
.dark-mode h1.section-header:not(::selection),
.dark-mode .markdown h1,
.dark-mode .markdown h2,
.dark-mode .markdown h3,
.dark-mode .markdown h4,
.dark-mode .markdown h5,
.dark-mode .markdown h6 {
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(to right bottom, rgb(255, 255, 255) 30%, rgba(255, 255, 255, 0.38));
  -webkit-background-clip: text;
  background-clip: text;
}
.light-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 70%);
}
.dark-mode *::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 50%);
}
`;

// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/presets/solarized.css2.js
var a12 = `.light-mode {
  color-scheme: light;
  --scalar-color-1: #584c27;
  --scalar-color-2: #616161;
  --scalar-color-3: #a89f84;
  --scalar-color-accent: #b58900;
  --scalar-background-1: #fdf6e3;
  --scalar-background-2: #eee8d5;
  --scalar-background-3: #ddd6c1;
  --scalar-background-accent: #b589001f;

  --scalar-border-color: #ded8c8;
  --scalar-scrollbar-color: rgba(0, 0, 0, 0.18);
  --scalar-scrollbar-color-active: rgba(0, 0, 0, 0.36);
  --scalar-lifted-brightness: 1;
  --scalar-backdrop-brightness: 1;

  --scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);
  --scalar-shadow-2: rgba(0, 0, 0, 0.08) 0px 13px 20px 0px, rgba(0, 0, 0, 0.08) 0px 3px 8px 0px, #eeeeed 0px 0 0 1px;

  --scalar-button-1: rgb(49 53 56);
  --scalar-button-1-color: #fff;
  --scalar-button-1-hover: rgb(28 31 33);

  --scalar-color-red: #b91c1c;
  --scalar-color-orange: #a16207;
  --scalar-color-green: #047857;
  --scalar-color-blue: #1d4ed8;
  --scalar-color-orange: #c2410c;
  --scalar-color-purple: #6d28d9;
}

.dark-mode {
  color-scheme: dark;
  --scalar-color-1: #fff;
  --scalar-color-2: #cccccc;
  --scalar-color-3: #6d8890;
  --scalar-color-accent: #007acc;
  --scalar-background-1: #00212b;
  --scalar-background-2: #012b36;
  --scalar-background-3: #004052;
  --scalar-background-accent: #015a6f;

  --scalar-border-color: #2f4851;
  --scalar-scrollbar-color: rgba(255, 255, 255, 0.24);
  --scalar-scrollbar-color-active: rgba(255, 255, 255, 0.48);
  --scalar-lifted-brightness: 1.45;
  --scalar-backdrop-brightness: 0.5;

  --scalar-shadow-1: 0 1px 3px 0 rgb(0, 0, 0, 0.1);
  --scalar-shadow-2: rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px, 0 0 0 1px
    rgba(255, 255, 255, 0.1);

  --scalar-button-1: #f6f6f6;
  --scalar-button-1-color: #000;
  --scalar-button-1-hover: #e7e7e7;

  --scalar-color-green: #00b648;
  --scalar-color-red: #dc1b19;
  --scalar-color-yellow: #ffc90d;
  --scalar-color-blue: #4eb3ec;
  --scalar-color-orange: #ff8d4d;
  --scalar-color-purple: #b191f9;
}

/* Sidebar */
.light-mode .t-doc__sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-active-background: var(--scalar-background-accent);
  --scalar-sidebar-border-color: var(--scalar-border-color);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-color-active: var(--scalar-color-accent);
  --scalar-sidebar-search-background: var(--scalar-background-2);
  --scalar-sidebar-search-border-color: var(--scalar-sidebar-search-background);
  --scalar-sidebar-search--color: var(--scalar-color-3);
}

.dark-mode .sidebar {
  --scalar-sidebar-background-1: var(--scalar-background-1);
  --scalar-sidebar-item-hover-color: currentColor;
  --scalar-sidebar-item-hover-background: var(--scalar-background-2);
  --scalar-sidebar-item-active-background: var(--scalar-background-accent);
  --scalar-sidebar-border-color: var(--scalar-border-color);
  --scalar-sidebar-color-1: var(--scalar-color-1);
  --scalar-sidebar-color-2: var(--scalar-color-2);
  --scalar-sidebar-color-active: var(--scalar-sidebar-color-1);
  --scalar-sidebar-search-background: var(--scalar-background-2);
  --scalar-sidebar-search-border-color: var(--scalar-sidebar-search-background);
  --scalar-sidebar-search--color: var(--scalar-color-3);
}
*::selection {
  background-color: color-mix(in srgb, var(--scalar-color-accent), transparent 70%);
}
`;

// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
var exports_external2 = {};
__export(exports_external2, {
  void: () => voidType,
  util: () => util4,
  unknown: () => unknownType,
  union: () => unionType,
  undefined: () => undefinedType,
  tuple: () => tupleType,
  transformer: () => effectsType,
  symbol: () => symbolType,
  string: () => stringType,
  strictObject: () => strictObjectType,
  setErrorMap: () => setErrorMap2,
  set: () => setType,
  record: () => recordType,
  quotelessJson: () => quotelessJson,
  promise: () => promiseType,
  preprocess: () => preprocessType,
  pipeline: () => pipelineType,
  ostring: () => ostring,
  optional: () => optionalType,
  onumber: () => onumber,
  oboolean: () => oboolean,
  objectUtil: () => objectUtil,
  object: () => objectType,
  number: () => numberType,
  nullable: () => nullableType,
  null: () => nullType,
  never: () => neverType,
  nativeEnum: () => nativeEnumType,
  nan: () => nanType,
  map: () => mapType,
  makeIssue: () => makeIssue,
  literal: () => literalType,
  lazy: () => lazyType,
  late: () => late,
  isValid: () => isValid,
  isDirty: () => isDirty,
  isAsync: () => isAsync2,
  isAborted: () => isAborted,
  intersection: () => intersectionType,
  instanceof: () => instanceOfType,
  getParsedType: () => getParsedType2,
  getErrorMap: () => getErrorMap2,
  function: () => functionType,
  enum: () => enumType,
  effect: () => effectsType,
  discriminatedUnion: () => discriminatedUnionType,
  defaultErrorMap: () => en_default2,
  datetimeRegex: () => datetimeRegex,
  date: () => dateType,
  custom: () => custom2,
  coerce: () => coerce,
  boolean: () => booleanType,
  bigint: () => bigIntType,
  array: () => arrayType,
  any: () => anyType,
  addIssueToContext: () => addIssueToContext,
  ZodVoid: () => ZodVoid2,
  ZodUnknown: () => ZodUnknown2,
  ZodUnion: () => ZodUnion2,
  ZodUndefined: () => ZodUndefined2,
  ZodType: () => ZodType2,
  ZodTuple: () => ZodTuple2,
  ZodTransformer: () => ZodEffects,
  ZodSymbol: () => ZodSymbol2,
  ZodString: () => ZodString2,
  ZodSet: () => ZodSet2,
  ZodSchema: () => ZodType2,
  ZodRecord: () => ZodRecord2,
  ZodReadonly: () => ZodReadonly2,
  ZodPromise: () => ZodPromise2,
  ZodPipeline: () => ZodPipeline,
  ZodParsedType: () => ZodParsedType,
  ZodOptional: () => ZodOptional2,
  ZodObject: () => ZodObject2,
  ZodNumber: () => ZodNumber2,
  ZodNullable: () => ZodNullable2,
  ZodNull: () => ZodNull2,
  ZodNever: () => ZodNever2,
  ZodNativeEnum: () => ZodNativeEnum,
  ZodNaN: () => ZodNaN2,
  ZodMap: () => ZodMap2,
  ZodLiteral: () => ZodLiteral2,
  ZodLazy: () => ZodLazy2,
  ZodIssueCode: () => ZodIssueCode2,
  ZodIntersection: () => ZodIntersection2,
  ZodFunction: () => ZodFunction2,
  ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2,
  ZodError: () => ZodError2,
  ZodEnum: () => ZodEnum2,
  ZodEffects: () => ZodEffects,
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2,
  ZodDefault: () => ZodDefault2,
  ZodDate: () => ZodDate2,
  ZodCatch: () => ZodCatch2,
  ZodBranded: () => ZodBranded,
  ZodBoolean: () => ZodBoolean2,
  ZodBigInt: () => ZodBigInt2,
  ZodArray: () => ZodArray2,
  ZodAny: () => ZodAny2,
  Schema: () => ZodType2,
  ParseStatus: () => ParseStatus,
  OK: () => OK,
  NEVER: () => NEVER2,
  INVALID: () => INVALID,
  EMPTY_PATH: () => EMPTY_PATH,
  DIRTY: () => DIRTY,
  BRAND: () => BRAND
});

// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
var util4;
(function(util5) {
  util5.assertEqual = (_6) => {};
  function assertIs2(_arg) {}
  util5.assertIs = assertIs2;
  function assertNever2(_x) {
    throw new Error;
  }
  util5.assertNever = assertNever2;
  util5.arrayToEnum = (items) => {
    const obj = {};
    for (const item of items) {
      obj[item] = item;
    }
    return obj;
  };
  util5.getValidEnumValues = (obj) => {
    const validKeys = util5.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== "number");
    const filtered = {};
    for (const k4 of validKeys) {
      filtered[k4] = obj[k4];
    }
    return util5.objectValues(filtered);
  };
  util5.objectValues = (obj) => {
    return util5.objectKeys(obj).map(function(e3) {
      return obj[e3];
    });
  };
  util5.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => {
    const keys = [];
    for (const key in object2) {
      if (Object.prototype.hasOwnProperty.call(object2, key)) {
        keys.push(key);
      }
    }
    return keys;
  };
  util5.find = (arr, checker) => {
    for (const item of arr) {
      if (checker(item))
        return item;
    }
    return;
  };
  util5.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
  function joinValues2(array2, separator = " | ") {
    return array2.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
  }
  util5.joinValues = joinValues2;
  util5.jsonStringifyReplacer = (_6, value) => {
    if (typeof value === "bigint") {
      return value.toString();
    }
    return value;
  };
})(util4 || (util4 = {}));
var objectUtil;
(function(objectUtil2) {
  objectUtil2.mergeShapes = (first, second) => {
    return {
      ...first,
      ...second
    };
  };
})(objectUtil || (objectUtil = {}));
var ZodParsedType = util4.arrayToEnum([
  "string",
  "nan",
  "number",
  "integer",
  "float",
  "boolean",
  "date",
  "bigint",
  "symbol",
  "function",
  "undefined",
  "null",
  "array",
  "object",
  "unknown",
  "promise",
  "void",
  "never",
  "map",
  "set"
]);
var getParsedType2 = (data) => {
  const t3 = typeof data;
  switch (t3) {
    case "undefined":
      return ZodParsedType.undefined;
    case "string":
      return ZodParsedType.string;
    case "number":
      return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
    case "boolean":
      return ZodParsedType.boolean;
    case "function":
      return ZodParsedType.function;
    case "bigint":
      return ZodParsedType.bigint;
    case "symbol":
      return ZodParsedType.symbol;
    case "object":
      if (Array.isArray(data)) {
        return ZodParsedType.array;
      }
      if (data === null) {
        return ZodParsedType.null;
      }
      if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
        return ZodParsedType.promise;
      }
      if (typeof Map !== "undefined" && data instanceof Map) {
        return ZodParsedType.map;
      }
      if (typeof Set !== "undefined" && data instanceof Set) {
        return ZodParsedType.set;
      }
      if (typeof Date !== "undefined" && data instanceof Date) {
        return ZodParsedType.date;
      }
      return ZodParsedType.object;
    default:
      return ZodParsedType.unknown;
  }
};

// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js
var ZodIssueCode2 = util4.arrayToEnum([
  "invalid_type",
  "invalid_literal",
  "custom",
  "invalid_union",
  "invalid_union_discriminator",
  "invalid_enum_value",
  "unrecognized_keys",
  "invalid_arguments",
  "invalid_return_type",
  "invalid_date",
  "invalid_string",
  "too_small",
  "too_big",
  "invalid_intersection_types",
  "not_multiple_of",
  "not_finite"
]);
var quotelessJson = (obj) => {
  const json3 = JSON.stringify(obj, null, 2);
  return json3.replace(/"([^"]+)":/g, "$1:");
};

class ZodError2 extends Error {
  get errors() {
    return this.issues;
  }
  constructor(issues) {
    super();
    this.issues = [];
    this.addIssue = (sub) => {
      this.issues = [...this.issues, sub];
    };
    this.addIssues = (subs = []) => {
      this.issues = [...this.issues, ...subs];
    };
    const actualProto = new.target.prototype;
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(this, actualProto);
    } else {
      this.__proto__ = actualProto;
    }
    this.name = "ZodError";
    this.issues = issues;
  }
  format(_mapper) {
    const mapper = _mapper || function(issue2) {
      return issue2.message;
    };
    const fieldErrors = { _errors: [] };
    const processError = (error49) => {
      for (const issue2 of error49.issues) {
        if (issue2.code === "invalid_union") {
          issue2.unionErrors.map(processError);
        } else if (issue2.code === "invalid_return_type") {
          processError(issue2.returnTypeError);
        } else if (issue2.code === "invalid_arguments") {
          processError(issue2.argumentsError);
        } else if (issue2.path.length === 0) {
          fieldErrors._errors.push(mapper(issue2));
        } else {
          let curr = fieldErrors;
          let i = 0;
          while (i < issue2.path.length) {
            const el3 = issue2.path[i];
            const terminal = i === issue2.path.length - 1;
            if (!terminal) {
              curr[el3] = curr[el3] || { _errors: [] };
            } else {
              curr[el3] = curr[el3] || { _errors: [] };
              curr[el3]._errors.push(mapper(issue2));
            }
            curr = curr[el3];
            i++;
          }
        }
      }
    };
    processError(this);
    return fieldErrors;
  }
  static assert(value) {
    if (!(value instanceof ZodError2)) {
      throw new Error(`Not a ZodError: ${value}`);
    }
  }
  toString() {
    return this.message;
  }
  get message() {
    return JSON.stringify(this.issues, util4.jsonStringifyReplacer, 2);
  }
  get isEmpty() {
    return this.issues.length === 0;
  }
  flatten(mapper = (issue2) => issue2.message) {
    const fieldErrors = {};
    const formErrors = [];
    for (const sub of this.issues) {
      if (sub.path.length > 0) {
        const firstEl = sub.path[0];
        fieldErrors[firstEl] = fieldErrors[firstEl] || [];
        fieldErrors[firstEl].push(mapper(sub));
      } else {
        formErrors.push(mapper(sub));
      }
    }
    return { formErrors, fieldErrors };
  }
  get formErrors() {
    return this.flatten();
  }
}
ZodError2.create = (issues) => {
  const error49 = new ZodError2(issues);
  return error49;
};

// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
var errorMap = (issue2, _ctx) => {
  let message2;
  switch (issue2.code) {
    case ZodIssueCode2.invalid_type:
      if (issue2.received === ZodParsedType.undefined) {
        message2 = "Required";
      } else {
        message2 = `Expected ${issue2.expected}, received ${issue2.received}`;
      }
      break;
    case ZodIssueCode2.invalid_literal:
      message2 = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util4.jsonStringifyReplacer)}`;
      break;
    case ZodIssueCode2.unrecognized_keys:
      message2 = `Unrecognized key(s) in object: ${util4.joinValues(issue2.keys, ", ")}`;
      break;
    case ZodIssueCode2.invalid_union:
      message2 = `Invalid input`;
      break;
    case ZodIssueCode2.invalid_union_discriminator:
      message2 = `Invalid discriminator value. Expected ${util4.joinValues(issue2.options)}`;
      break;
    case ZodIssueCode2.invalid_enum_value:
      message2 = `Invalid enum value. Expected ${util4.joinValues(issue2.options)}, received '${issue2.received}'`;
      break;
    case ZodIssueCode2.invalid_arguments:
      message2 = `Invalid function arguments`;
      break;
    case ZodIssueCode2.invalid_return_type:
      message2 = `Invalid function return type`;
      break;
    case ZodIssueCode2.invalid_date:
      message2 = `Invalid date`;
      break;
    case ZodIssueCode2.invalid_string:
      if (typeof issue2.validation === "object") {
        if ("includes" in issue2.validation) {
          message2 = `Invalid input: must include "${issue2.validation.includes}"`;
          if (typeof issue2.validation.position === "number") {
            message2 = `${message2} at one or more positions greater than or equal to ${issue2.validation.position}`;
          }
        } else if ("startsWith" in issue2.validation) {
          message2 = `Invalid input: must start with "${issue2.validation.startsWith}"`;
        } else if ("endsWith" in issue2.validation) {
          message2 = `Invalid input: must end with "${issue2.validation.endsWith}"`;
        } else {
          util4.assertNever(issue2.validation);
        }
      } else if (issue2.validation !== "regex") {
        message2 = `Invalid ${issue2.validation}`;
      } else {
        message2 = "Invalid";
      }
      break;
    case ZodIssueCode2.too_small:
      if (issue2.type === "array")
        message2 = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`;
      else if (issue2.type === "string")
        message2 = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`;
      else if (issue2.type === "number")
        message2 = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
      else if (issue2.type === "bigint")
        message2 = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
      else if (issue2.type === "date")
        message2 = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`;
      else
        message2 = "Invalid input";
      break;
    case ZodIssueCode2.too_big:
      if (issue2.type === "array")
        message2 = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`;
      else if (issue2.type === "string")
        message2 = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`;
      else if (issue2.type === "number")
        message2 = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
      else if (issue2.type === "bigint")
        message2 = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
      else if (issue2.type === "date")
        message2 = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`;
      else
        message2 = "Invalid input";
      break;
    case ZodIssueCode2.custom:
      message2 = `Invalid input`;
      break;
    case ZodIssueCode2.invalid_intersection_types:
      message2 = `Intersection results could not be merged`;
      break;
    case ZodIssueCode2.not_multiple_of:
      message2 = `Number must be a multiple of ${issue2.multipleOf}`;
      break;
    case ZodIssueCode2.not_finite:
      message2 = "Number must be finite";
      break;
    default:
      message2 = _ctx.defaultError;
      util4.assertNever(issue2);
  }
  return { message: message2 };
};
var en_default2 = errorMap;

// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js
var overrideErrorMap = en_default2;
function setErrorMap2(map5) {
  overrideErrorMap = map5;
}
function getErrorMap2() {
  return overrideErrorMap;
}
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
var makeIssue = (params) => {
  const { data, path: path2, errorMaps, issueData } = params;
  const fullPath = [...path2, ...issueData.path || []];
  const fullIssue = {
    ...issueData,
    path: fullPath
  };
  if (issueData.message !== undefined) {
    return {
      ...issueData,
      path: fullPath,
      message: issueData.message
    };
  }
  let errorMessage = "";
  const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
  for (const map5 of maps) {
    errorMessage = map5(fullIssue, { data, defaultError: errorMessage }).message;
  }
  return {
    ...issueData,
    path: fullPath,
    message: errorMessage
  };
};
var EMPTY_PATH = [];
function addIssueToContext(ctx, issueData) {
  const overrideMap = getErrorMap2();
  const issue2 = makeIssue({
    issueData,
    data: ctx.data,
    path: ctx.path,
    errorMaps: [
      ctx.common.contextualErrorMap,
      ctx.schemaErrorMap,
      overrideMap,
      overrideMap === en_default2 ? undefined : en_default2
    ].filter((x4) => !!x4)
  });
  ctx.common.issues.push(issue2);
}

class ParseStatus {
  constructor() {
    this.value = "valid";
  }
  dirty() {
    if (this.value === "valid")
      this.value = "dirty";
  }
  abort() {
    if (this.value !== "aborted")
      this.value = "aborted";
  }
  static mergeArray(status2, results) {
    const arrayValue = [];
    for (const s3 of results) {
      if (s3.status === "aborted")
        return INVALID;
      if (s3.status === "dirty")
        status2.dirty();
      arrayValue.push(s3.value);
    }
    return { status: status2.value, value: arrayValue };
  }
  static async mergeObjectAsync(status2, pairs) {
    const syncPairs = [];
    for (const pair of pairs) {
      const key = await pair.key;
      const value = await pair.value;
      syncPairs.push({
        key,
        value
      });
    }
    return ParseStatus.mergeObjectSync(status2, syncPairs);
  }
  static mergeObjectSync(status2, pairs) {
    const finalObject = {};
    for (const pair of pairs) {
      const { key, value } = pair;
      if (key.status === "aborted")
        return INVALID;
      if (value.status === "aborted")
        return INVALID;
      if (key.status === "dirty")
        status2.dirty();
      if (value.status === "dirty")
        status2.dirty();
      if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
        finalObject[key.value] = value.value;
      }
    }
    return { status: status2.value, value: finalObject };
  }
}
var INVALID = Object.freeze({
  status: "aborted"
});
var DIRTY = (value) => ({ status: "dirty", value });
var OK = (value) => ({ status: "valid", value });
var isAborted = (x4) => x4.status === "aborted";
var isDirty = (x4) => x4.status === "dirty";
var isValid = (x4) => x4.status === "valid";
var isAsync2 = (x4) => typeof Promise !== "undefined" && x4 instanceof Promise;
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
var errorUtil;
(function(errorUtil2) {
  errorUtil2.errToObj = (message2) => typeof message2 === "string" ? { message: message2 } : message2 || {};
  errorUtil2.toString = (message2) => typeof message2 === "string" ? message2 : message2?.message;
})(errorUtil || (errorUtil = {}));

// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
class ParseInputLazyPath {
  constructor(parent, value, path2, key) {
    this._cachedPath = [];
    this.parent = parent;
    this.data = value;
    this._path = path2;
    this._key = key;
  }
  get path() {
    if (!this._cachedPath.length) {
      if (Array.isArray(this._key)) {
        this._cachedPath.push(...this._path, ...this._key);
      } else {
        this._cachedPath.push(...this._path, this._key);
      }
    }
    return this._cachedPath;
  }
}
var handleResult = (ctx, result) => {
  if (isValid(result)) {
    return { success: true, data: result.value };
  } else {
    if (!ctx.common.issues.length) {
      throw new Error("Validation failed but no issues detected.");
    }
    return {
      success: false,
      get error() {
        if (this._error)
          return this._error;
        const error49 = new ZodError2(ctx.common.issues);
        this._error = error49;
        return this._error;
      }
    };
  }
};
function processCreateParams(params) {
  if (!params)
    return {};
  const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;
  if (errorMap2 && (invalid_type_error || required_error)) {
    throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
  }
  if (errorMap2)
    return { errorMap: errorMap2, description };
  const customMap = (iss, ctx) => {
    const { message: message2 } = params;
    if (iss.code === "invalid_enum_value") {
      return { message: message2 ?? ctx.defaultError };
    }
    if (typeof ctx.data === "undefined") {
      return { message: message2 ?? required_error ?? ctx.defaultError };
    }
    if (iss.code !== "invalid_type")
      return { message: ctx.defaultError };
    return { message: message2 ?? invalid_type_error ?? ctx.defaultError };
  };
  return { errorMap: customMap, description };
}

class ZodType2 {
  get description() {
    return this._def.description;
  }
  _getType(input) {
    return getParsedType2(input.data);
  }
  _getOrReturnCtx(input, ctx) {
    return ctx || {
      common: input.parent.common,
      data: input.data,
      parsedType: getParsedType2(input.data),
      schemaErrorMap: this._def.errorMap,
      path: input.path,
      parent: input.parent
    };
  }
  _processInputParams(input) {
    return {
      status: new ParseStatus,
      ctx: {
        common: input.parent.common,
        data: input.data,
        parsedType: getParsedType2(input.data),
        schemaErrorMap: this._def.errorMap,
        path: input.path,
        parent: input.parent
      }
    };
  }
  _parseSync(input) {
    const result = this._parse(input);
    if (isAsync2(result)) {
      throw new Error("Synchronous parse encountered promise.");
    }
    return result;
  }
  _parseAsync(input) {
    const result = this._parse(input);
    return Promise.resolve(result);
  }
  parse(data, params) {
    const result = this.safeParse(data, params);
    if (result.success)
      return result.data;
    throw result.error;
  }
  safeParse(data, params) {
    const ctx = {
      common: {
        issues: [],
        async: params?.async ?? false,
        contextualErrorMap: params?.errorMap
      },
      path: params?.path || [],
      schemaErrorMap: this._def.errorMap,
      parent: null,
      data,
      parsedType: getParsedType2(data)
    };
    const result = this._parseSync({ data, path: ctx.path, parent: ctx });
    return handleResult(ctx, result);
  }
  "~validate"(data) {
    const ctx = {
      common: {
        issues: [],
        async: !!this["~standard"].async
      },
      path: [],
      schemaErrorMap: this._def.errorMap,
      parent: null,
      data,
      parsedType: getParsedType2(data)
    };
    if (!this["~standard"].async) {
      try {
        const result = this._parseSync({ data, path: [], parent: ctx });
        return isValid(result) ? {
          value: result.value
        } : {
          issues: ctx.common.issues
        };
      } catch (err) {
        if (err?.message?.toLowerCase()?.includes("encountered")) {
          this["~standard"].async = true;
        }
        ctx.common = {
          issues: [],
          async: true
        };
      }
    }
    return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
      value: result.value
    } : {
      issues: ctx.common.issues
    });
  }
  async parseAsync(data, params) {
    const result = await this.safeParseAsync(data, params);
    if (result.success)
      return result.data;
    throw result.error;
  }
  async safeParseAsync(data, params) {
    const ctx = {
      common: {
        issues: [],
        contextualErrorMap: params?.errorMap,
        async: true
      },
      path: params?.path || [],
      schemaErrorMap: this._def.errorMap,
      parent: null,
      data,
      parsedType: getParsedType2(data)
    };
    const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
    const result = await (isAsync2(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
    return handleResult(ctx, result);
  }
  refine(check3, message2) {
    const getIssueProperties = (val) => {
      if (typeof message2 === "string" || typeof message2 === "undefined") {
        return { message: message2 };
      } else if (typeof message2 === "function") {
        return message2(val);
      } else {
        return message2;
      }
    };
    return this._refinement((val, ctx) => {
      const result = check3(val);
      const setError = () => ctx.addIssue({
        code: ZodIssueCode2.custom,
        ...getIssueProperties(val)
      });
      if (typeof Promise !== "undefined" && result instanceof Promise) {
        return result.then((data) => {
          if (!data) {
            setError();
            return false;
          } else {
            return true;
          }
        });
      }
      if (!result) {
        setError();
        return false;
      } else {
        return true;
      }
    });
  }
  refinement(check3, refinementData) {
    return this._refinement((val, ctx) => {
      if (!check3(val)) {
        ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
        return false;
      } else {
        return true;
      }
    });
  }
  _refinement(refinement) {
    return new ZodEffects({
      schema: this,
      typeName: ZodFirstPartyTypeKind2.ZodEffects,
      effect: { type: "refinement", refinement }
    });
  }
  superRefine(refinement) {
    return this._refinement(refinement);
  }
  constructor(def2) {
    this.spa = this.safeParseAsync;
    this._def = def2;
    this.parse = this.parse.bind(this);
    this.safeParse = this.safeParse.bind(this);
    this.parseAsync = this.parseAsync.bind(this);
    this.safeParseAsync = this.safeParseAsync.bind(this);
    this.spa = this.spa.bind(this);
    this.refine = this.refine.bind(this);
    this.refinement = this.refinement.bind(this);
    this.superRefine = this.superRefine.bind(this);
    this.optional = this.optional.bind(this);
    this.nullable = this.nullable.bind(this);
    this.nullish = this.nullish.bind(this);
    this.array = this.array.bind(this);
    this.promise = this.promise.bind(this);
    this.or = this.or.bind(this);
    this.and = this.and.bind(this);
    this.transform = this.transform.bind(this);
    this.brand = this.brand.bind(this);
    this.default = this.default.bind(this);
    this.catch = this.catch.bind(this);
    this.describe = this.describe.bind(this);
    this.pipe = this.pipe.bind(this);
    this.readonly = this.readonly.bind(this);
    this.isNullable = this.isNullable.bind(this);
    this.isOptional = this.isOptional.bind(this);
    this["~standard"] = {
      version: 1,
      vendor: "zod",
      validate: (data) => this["~validate"](data)
    };
  }
  optional() {
    return ZodOptional2.create(this, this._def);
  }
  nullable() {
    return ZodNullable2.create(this, this._def);
  }
  nullish() {
    return this.nullable().optional();
  }
  array() {
    return ZodArray2.create(this);
  }
  promise() {
    return ZodPromise2.create(this, this._def);
  }
  or(option2) {
    return ZodUnion2.create([this, option2], this._def);
  }
  and(incoming) {
    return ZodIntersection2.create(this, incoming, this._def);
  }
  transform(transform3) {
    return new ZodEffects({
      ...processCreateParams(this._def),
      schema: this,
      typeName: ZodFirstPartyTypeKind2.ZodEffects,
      effect: { type: "transform", transform: transform3 }
    });
  }
  default(def2) {
    const defaultValueFunc = typeof def2 === "function" ? def2 : () => def2;
    return new ZodDefault2({
      ...processCreateParams(this._def),
      innerType: this,
      defaultValue: defaultValueFunc,
      typeName: ZodFirstPartyTypeKind2.ZodDefault
    });
  }
  brand() {
    return new ZodBranded({
      typeName: ZodFirstPartyTypeKind2.ZodBranded,
      type: this,
      ...processCreateParams(this._def)
    });
  }
  catch(def2) {
    const catchValueFunc = typeof def2 === "function" ? def2 : () => def2;
    return new ZodCatch2({
      ...processCreateParams(this._def),
      innerType: this,
      catchValue: catchValueFunc,
      typeName: ZodFirstPartyTypeKind2.ZodCatch
    });
  }
  describe(description) {
    const This = this.constructor;
    return new This({
      ...this._def,
      description
    });
  }
  pipe(target) {
    return ZodPipeline.create(this, target);
  }
  readonly() {
    return ZodReadonly2.create(this);
  }
  isOptional() {
    return this.safeParse(undefined).success;
  }
  isNullable() {
    return this.safeParse(null).success;
  }
}
var cuidRegex = /^c[^\s-]{8,}$/i;
var cuid2Regex = /^[0-9a-z]+$/;
var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
var nanoidRegex = /^[a-z0-9_-]{21}$/i;
var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
var emojiRegex;
var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
var dateRegex = new RegExp(`^${dateRegexSource}$`);
function timeRegexSource(args) {
  let secondsRegexSource = `[0-5]\\d`;
  if (args.precision) {
    secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
  } else if (args.precision == null) {
    secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
  }
  const secondsQuantifier = args.precision ? "+" : "?";
  return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
}
function timeRegex(args) {
  return new RegExp(`^${timeRegexSource(args)}$`);
}
function datetimeRegex(args) {
  let regex2 = `${dateRegexSource}T${timeRegexSource(args)}`;
  const opts = [];
  opts.push(args.local ? `Z?` : `Z`);
  if (args.offset)
    opts.push(`([+-]\\d{2}:?\\d{2})`);
  regex2 = `${regex2}(${opts.join("|")})`;
  return new RegExp(`^${regex2}$`);
}
function isValidIP(ip, version5) {
  if ((version5 === "v4" || !version5) && ipv4Regex.test(ip)) {
    return true;
  }
  if ((version5 === "v6" || !version5) && ipv6Regex.test(ip)) {
    return true;
  }
  return false;
}
function isValidJWT2(jwt2, alg) {
  if (!jwtRegex.test(jwt2))
    return false;
  try {
    const [header] = jwt2.split(".");
    if (!header)
      return false;
    const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
    const decoded = JSON.parse(atob(base643));
    if (typeof decoded !== "object" || decoded === null)
      return false;
    if ("typ" in decoded && decoded?.typ !== "JWT")
      return false;
    if (!decoded.alg)
      return false;
    if (alg && decoded.alg !== alg)
      return false;
    return true;
  } catch {
    return false;
  }
}
function isValidCidr(ip, version5) {
  if ((version5 === "v4" || !version5) && ipv4CidrRegex.test(ip)) {
    return true;
  }
  if ((version5 === "v6" || !version5) && ipv6CidrRegex.test(ip)) {
    return true;
  }
  return false;
}

class ZodString2 extends ZodType2 {
  _parse(input) {
    if (this._def.coerce) {
      input.data = String(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.string) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.string,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    const status2 = new ParseStatus;
    let ctx = undefined;
    for (const check3 of this._def.checks) {
      if (check3.kind === "min") {
        if (input.data.length < check3.value) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_small,
            minimum: check3.value,
            type: "string",
            inclusive: true,
            exact: false,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "max") {
        if (input.data.length > check3.value) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_big,
            maximum: check3.value,
            type: "string",
            inclusive: true,
            exact: false,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "length") {
        const tooBig = input.data.length > check3.value;
        const tooSmall = input.data.length < check3.value;
        if (tooBig || tooSmall) {
          ctx = this._getOrReturnCtx(input, ctx);
          if (tooBig) {
            addIssueToContext(ctx, {
              code: ZodIssueCode2.too_big,
              maximum: check3.value,
              type: "string",
              inclusive: true,
              exact: true,
              message: check3.message
            });
          } else if (tooSmall) {
            addIssueToContext(ctx, {
              code: ZodIssueCode2.too_small,
              minimum: check3.value,
              type: "string",
              inclusive: true,
              exact: true,
              message: check3.message
            });
          }
          status2.dirty();
        }
      } else if (check3.kind === "email") {
        if (!emailRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "email",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "emoji") {
        if (!emojiRegex) {
          emojiRegex = new RegExp(_emojiRegex, "u");
        }
        if (!emojiRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "emoji",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "uuid") {
        if (!uuidRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "uuid",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "nanoid") {
        if (!nanoidRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "nanoid",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "cuid") {
        if (!cuidRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "cuid",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "cuid2") {
        if (!cuid2Regex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "cuid2",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "ulid") {
        if (!ulidRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "ulid",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "url") {
        try {
          new URL(input.data);
        } catch {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "url",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "regex") {
        check3.regex.lastIndex = 0;
        const testResult = check3.regex.test(input.data);
        if (!testResult) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "regex",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "trim") {
        input.data = input.data.trim();
      } else if (check3.kind === "includes") {
        if (!input.data.includes(check3.value, check3.position)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.invalid_string,
            validation: { includes: check3.value, position: check3.position },
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "toLowerCase") {
        input.data = input.data.toLowerCase();
      } else if (check3.kind === "toUpperCase") {
        input.data = input.data.toUpperCase();
      } else if (check3.kind === "startsWith") {
        if (!input.data.startsWith(check3.value)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.invalid_string,
            validation: { startsWith: check3.value },
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "endsWith") {
        if (!input.data.endsWith(check3.value)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.invalid_string,
            validation: { endsWith: check3.value },
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "datetime") {
        const regex2 = datetimeRegex(check3);
        if (!regex2.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.invalid_string,
            validation: "datetime",
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "date") {
        const regex2 = dateRegex;
        if (!regex2.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.invalid_string,
            validation: "date",
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "time") {
        const regex2 = timeRegex(check3);
        if (!regex2.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.invalid_string,
            validation: "time",
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "duration") {
        if (!durationRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "duration",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "ip") {
        if (!isValidIP(input.data, check3.version)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "ip",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "jwt") {
        if (!isValidJWT2(input.data, check3.alg)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "jwt",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "cidr") {
        if (!isValidCidr(input.data, check3.version)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "cidr",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "base64") {
        if (!base64Regex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "base64",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "base64url") {
        if (!base64urlRegex.test(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            validation: "base64url",
            code: ZodIssueCode2.invalid_string,
            message: check3.message
          });
          status2.dirty();
        }
      } else {
        util4.assertNever(check3);
      }
    }
    return { status: status2.value, value: input.data };
  }
  _regex(regex2, validation, message2) {
    return this.refinement((data) => regex2.test(data), {
      validation,
      code: ZodIssueCode2.invalid_string,
      ...errorUtil.errToObj(message2)
    });
  }
  _addCheck(check3) {
    return new ZodString2({
      ...this._def,
      checks: [...this._def.checks, check3]
    });
  }
  email(message2) {
    return this._addCheck({ kind: "email", ...errorUtil.errToObj(message2) });
  }
  url(message2) {
    return this._addCheck({ kind: "url", ...errorUtil.errToObj(message2) });
  }
  emoji(message2) {
    return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message2) });
  }
  uuid(message2) {
    return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message2) });
  }
  nanoid(message2) {
    return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message2) });
  }
  cuid(message2) {
    return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message2) });
  }
  cuid2(message2) {
    return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message2) });
  }
  ulid(message2) {
    return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message2) });
  }
  base64(message2) {
    return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message2) });
  }
  base64url(message2) {
    return this._addCheck({
      kind: "base64url",
      ...errorUtil.errToObj(message2)
    });
  }
  jwt(options2) {
    return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options2) });
  }
  ip(options2) {
    return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options2) });
  }
  cidr(options2) {
    return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options2) });
  }
  datetime(options2) {
    if (typeof options2 === "string") {
      return this._addCheck({
        kind: "datetime",
        precision: null,
        offset: false,
        local: false,
        message: options2
      });
    }
    return this._addCheck({
      kind: "datetime",
      precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
      offset: options2?.offset ?? false,
      local: options2?.local ?? false,
      ...errorUtil.errToObj(options2?.message)
    });
  }
  date(message2) {
    return this._addCheck({ kind: "date", message: message2 });
  }
  time(options2) {
    if (typeof options2 === "string") {
      return this._addCheck({
        kind: "time",
        precision: null,
        message: options2
      });
    }
    return this._addCheck({
      kind: "time",
      precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
      ...errorUtil.errToObj(options2?.message)
    });
  }
  duration(message2) {
    return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message2) });
  }
  regex(regex2, message2) {
    return this._addCheck({
      kind: "regex",
      regex: regex2,
      ...errorUtil.errToObj(message2)
    });
  }
  includes(value, options2) {
    return this._addCheck({
      kind: "includes",
      value,
      position: options2?.position,
      ...errorUtil.errToObj(options2?.message)
    });
  }
  startsWith(value, message2) {
    return this._addCheck({
      kind: "startsWith",
      value,
      ...errorUtil.errToObj(message2)
    });
  }
  endsWith(value, message2) {
    return this._addCheck({
      kind: "endsWith",
      value,
      ...errorUtil.errToObj(message2)
    });
  }
  min(minLength, message2) {
    return this._addCheck({
      kind: "min",
      value: minLength,
      ...errorUtil.errToObj(message2)
    });
  }
  max(maxLength, message2) {
    return this._addCheck({
      kind: "max",
      value: maxLength,
      ...errorUtil.errToObj(message2)
    });
  }
  length(len, message2) {
    return this._addCheck({
      kind: "length",
      value: len,
      ...errorUtil.errToObj(message2)
    });
  }
  nonempty(message2) {
    return this.min(1, errorUtil.errToObj(message2));
  }
  trim() {
    return new ZodString2({
      ...this._def,
      checks: [...this._def.checks, { kind: "trim" }]
    });
  }
  toLowerCase() {
    return new ZodString2({
      ...this._def,
      checks: [...this._def.checks, { kind: "toLowerCase" }]
    });
  }
  toUpperCase() {
    return new ZodString2({
      ...this._def,
      checks: [...this._def.checks, { kind: "toUpperCase" }]
    });
  }
  get isDatetime() {
    return !!this._def.checks.find((ch) => ch.kind === "datetime");
  }
  get isDate() {
    return !!this._def.checks.find((ch) => ch.kind === "date");
  }
  get isTime() {
    return !!this._def.checks.find((ch) => ch.kind === "time");
  }
  get isDuration() {
    return !!this._def.checks.find((ch) => ch.kind === "duration");
  }
  get isEmail() {
    return !!this._def.checks.find((ch) => ch.kind === "email");
  }
  get isURL() {
    return !!this._def.checks.find((ch) => ch.kind === "url");
  }
  get isEmoji() {
    return !!this._def.checks.find((ch) => ch.kind === "emoji");
  }
  get isUUID() {
    return !!this._def.checks.find((ch) => ch.kind === "uuid");
  }
  get isNANOID() {
    return !!this._def.checks.find((ch) => ch.kind === "nanoid");
  }
  get isCUID() {
    return !!this._def.checks.find((ch) => ch.kind === "cuid");
  }
  get isCUID2() {
    return !!this._def.checks.find((ch) => ch.kind === "cuid2");
  }
  get isULID() {
    return !!this._def.checks.find((ch) => ch.kind === "ulid");
  }
  get isIP() {
    return !!this._def.checks.find((ch) => ch.kind === "ip");
  }
  get isCIDR() {
    return !!this._def.checks.find((ch) => ch.kind === "cidr");
  }
  get isBase64() {
    return !!this._def.checks.find((ch) => ch.kind === "base64");
  }
  get isBase64url() {
    return !!this._def.checks.find((ch) => ch.kind === "base64url");
  }
  get minLength() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min;
  }
  get maxLength() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max;
  }
}
ZodString2.create = (params) => {
  return new ZodString2({
    checks: [],
    typeName: ZodFirstPartyTypeKind2.ZodString,
    coerce: params?.coerce ?? false,
    ...processCreateParams(params)
  });
};
function floatSafeRemainder2(val, step) {
  const valDecCount = (val.toString().split(".")[1] || "").length;
  const stepDecCount = (step.toString().split(".")[1] || "").length;
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
  const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
  const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
  return valInt % stepInt / 10 ** decCount;
}

class ZodNumber2 extends ZodType2 {
  constructor() {
    super(...arguments);
    this.min = this.gte;
    this.max = this.lte;
    this.step = this.multipleOf;
  }
  _parse(input) {
    if (this._def.coerce) {
      input.data = Number(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.number) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.number,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    let ctx = undefined;
    const status2 = new ParseStatus;
    for (const check3 of this._def.checks) {
      if (check3.kind === "int") {
        if (!util4.isInteger(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.invalid_type,
            expected: "integer",
            received: "float",
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "min") {
        const tooSmall = check3.inclusive ? input.data < check3.value : input.data <= check3.value;
        if (tooSmall) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_small,
            minimum: check3.value,
            type: "number",
            inclusive: check3.inclusive,
            exact: false,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "max") {
        const tooBig = check3.inclusive ? input.data > check3.value : input.data >= check3.value;
        if (tooBig) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_big,
            maximum: check3.value,
            type: "number",
            inclusive: check3.inclusive,
            exact: false,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "multipleOf") {
        if (floatSafeRemainder2(input.data, check3.value) !== 0) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.not_multiple_of,
            multipleOf: check3.value,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "finite") {
        if (!Number.isFinite(input.data)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.not_finite,
            message: check3.message
          });
          status2.dirty();
        }
      } else {
        util4.assertNever(check3);
      }
    }
    return { status: status2.value, value: input.data };
  }
  gte(value, message2) {
    return this.setLimit("min", value, true, errorUtil.toString(message2));
  }
  gt(value, message2) {
    return this.setLimit("min", value, false, errorUtil.toString(message2));
  }
  lte(value, message2) {
    return this.setLimit("max", value, true, errorUtil.toString(message2));
  }
  lt(value, message2) {
    return this.setLimit("max", value, false, errorUtil.toString(message2));
  }
  setLimit(kind, value, inclusive, message2) {
    return new ZodNumber2({
      ...this._def,
      checks: [
        ...this._def.checks,
        {
          kind,
          value,
          inclusive,
          message: errorUtil.toString(message2)
        }
      ]
    });
  }
  _addCheck(check3) {
    return new ZodNumber2({
      ...this._def,
      checks: [...this._def.checks, check3]
    });
  }
  int(message2) {
    return this._addCheck({
      kind: "int",
      message: errorUtil.toString(message2)
    });
  }
  positive(message2) {
    return this._addCheck({
      kind: "min",
      value: 0,
      inclusive: false,
      message: errorUtil.toString(message2)
    });
  }
  negative(message2) {
    return this._addCheck({
      kind: "max",
      value: 0,
      inclusive: false,
      message: errorUtil.toString(message2)
    });
  }
  nonpositive(message2) {
    return this._addCheck({
      kind: "max",
      value: 0,
      inclusive: true,
      message: errorUtil.toString(message2)
    });
  }
  nonnegative(message2) {
    return this._addCheck({
      kind: "min",
      value: 0,
      inclusive: true,
      message: errorUtil.toString(message2)
    });
  }
  multipleOf(value, message2) {
    return this._addCheck({
      kind: "multipleOf",
      value,
      message: errorUtil.toString(message2)
    });
  }
  finite(message2) {
    return this._addCheck({
      kind: "finite",
      message: errorUtil.toString(message2)
    });
  }
  safe(message2) {
    return this._addCheck({
      kind: "min",
      inclusive: true,
      value: Number.MIN_SAFE_INTEGER,
      message: errorUtil.toString(message2)
    })._addCheck({
      kind: "max",
      inclusive: true,
      value: Number.MAX_SAFE_INTEGER,
      message: errorUtil.toString(message2)
    });
  }
  get minValue() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min;
  }
  get maxValue() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max;
  }
  get isInt() {
    return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util4.isInteger(ch.value));
  }
  get isFinite() {
    let max = null;
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
        return true;
      } else if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      } else if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return Number.isFinite(min) && Number.isFinite(max);
  }
}
ZodNumber2.create = (params) => {
  return new ZodNumber2({
    checks: [],
    typeName: ZodFirstPartyTypeKind2.ZodNumber,
    coerce: params?.coerce || false,
    ...processCreateParams(params)
  });
};

class ZodBigInt2 extends ZodType2 {
  constructor() {
    super(...arguments);
    this.min = this.gte;
    this.max = this.lte;
  }
  _parse(input) {
    if (this._def.coerce) {
      try {
        input.data = BigInt(input.data);
      } catch {
        return this._getInvalidInput(input);
      }
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.bigint) {
      return this._getInvalidInput(input);
    }
    let ctx = undefined;
    const status2 = new ParseStatus;
    for (const check3 of this._def.checks) {
      if (check3.kind === "min") {
        const tooSmall = check3.inclusive ? input.data < check3.value : input.data <= check3.value;
        if (tooSmall) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_small,
            type: "bigint",
            minimum: check3.value,
            inclusive: check3.inclusive,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "max") {
        const tooBig = check3.inclusive ? input.data > check3.value : input.data >= check3.value;
        if (tooBig) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_big,
            type: "bigint",
            maximum: check3.value,
            inclusive: check3.inclusive,
            message: check3.message
          });
          status2.dirty();
        }
      } else if (check3.kind === "multipleOf") {
        if (input.data % check3.value !== BigInt(0)) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.not_multiple_of,
            multipleOf: check3.value,
            message: check3.message
          });
          status2.dirty();
        }
      } else {
        util4.assertNever(check3);
      }
    }
    return { status: status2.value, value: input.data };
  }
  _getInvalidInput(input) {
    const ctx = this._getOrReturnCtx(input);
    addIssueToContext(ctx, {
      code: ZodIssueCode2.invalid_type,
      expected: ZodParsedType.bigint,
      received: ctx.parsedType
    });
    return INVALID;
  }
  gte(value, message2) {
    return this.setLimit("min", value, true, errorUtil.toString(message2));
  }
  gt(value, message2) {
    return this.setLimit("min", value, false, errorUtil.toString(message2));
  }
  lte(value, message2) {
    return this.setLimit("max", value, true, errorUtil.toString(message2));
  }
  lt(value, message2) {
    return this.setLimit("max", value, false, errorUtil.toString(message2));
  }
  setLimit(kind, value, inclusive, message2) {
    return new ZodBigInt2({
      ...this._def,
      checks: [
        ...this._def.checks,
        {
          kind,
          value,
          inclusive,
          message: errorUtil.toString(message2)
        }
      ]
    });
  }
  _addCheck(check3) {
    return new ZodBigInt2({
      ...this._def,
      checks: [...this._def.checks, check3]
    });
  }
  positive(message2) {
    return this._addCheck({
      kind: "min",
      value: BigInt(0),
      inclusive: false,
      message: errorUtil.toString(message2)
    });
  }
  negative(message2) {
    return this._addCheck({
      kind: "max",
      value: BigInt(0),
      inclusive: false,
      message: errorUtil.toString(message2)
    });
  }
  nonpositive(message2) {
    return this._addCheck({
      kind: "max",
      value: BigInt(0),
      inclusive: true,
      message: errorUtil.toString(message2)
    });
  }
  nonnegative(message2) {
    return this._addCheck({
      kind: "min",
      value: BigInt(0),
      inclusive: true,
      message: errorUtil.toString(message2)
    });
  }
  multipleOf(value, message2) {
    return this._addCheck({
      kind: "multipleOf",
      value,
      message: errorUtil.toString(message2)
    });
  }
  get minValue() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min;
  }
  get maxValue() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max;
  }
}
ZodBigInt2.create = (params) => {
  return new ZodBigInt2({
    checks: [],
    typeName: ZodFirstPartyTypeKind2.ZodBigInt,
    coerce: params?.coerce ?? false,
    ...processCreateParams(params)
  });
};

class ZodBoolean2 extends ZodType2 {
  _parse(input) {
    if (this._def.coerce) {
      input.data = Boolean(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.boolean) {
      const ctx = this._getOrReturnCtx(input);
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.boolean,
        received: ctx.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
}
ZodBoolean2.create = (params) => {
  return new ZodBoolean2({
    typeName: ZodFirstPartyTypeKind2.ZodBoolean,
    coerce: params?.coerce || false,
    ...processCreateParams(params)
  });
};

class ZodDate2 extends ZodType2 {
  _parse(input) {
    if (this._def.coerce) {
      input.data = new Date(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.date) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.date,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    if (Number.isNaN(input.data.getTime())) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode2.invalid_date
      });
      return INVALID;
    }
    const status2 = new ParseStatus;
    let ctx = undefined;
    for (const check3 of this._def.checks) {
      if (check3.kind === "min") {
        if (input.data.getTime() < check3.value) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_small,
            message: check3.message,
            inclusive: true,
            exact: false,
            minimum: check3.value,
            type: "date"
          });
          status2.dirty();
        }
      } else if (check3.kind === "max") {
        if (input.data.getTime() > check3.value) {
          ctx = this._getOrReturnCtx(input, ctx);
          addIssueToContext(ctx, {
            code: ZodIssueCode2.too_big,
            message: check3.message,
            inclusive: true,
            exact: false,
            maximum: check3.value,
            type: "date"
          });
          status2.dirty();
        }
      } else {
        util4.assertNever(check3);
      }
    }
    return {
      status: status2.value,
      value: new Date(input.data.getTime())
    };
  }
  _addCheck(check3) {
    return new ZodDate2({
      ...this._def,
      checks: [...this._def.checks, check3]
    });
  }
  min(minDate, message2) {
    return this._addCheck({
      kind: "min",
      value: minDate.getTime(),
      message: errorUtil.toString(message2)
    });
  }
  max(maxDate, message2) {
    return this._addCheck({
      kind: "max",
      value: maxDate.getTime(),
      message: errorUtil.toString(message2)
    });
  }
  get minDate() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min != null ? new Date(min) : null;
  }
  get maxDate() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max != null ? new Date(max) : null;
  }
}
ZodDate2.create = (params) => {
  return new ZodDate2({
    checks: [],
    coerce: params?.coerce || false,
    typeName: ZodFirstPartyTypeKind2.ZodDate,
    ...processCreateParams(params)
  });
};

class ZodSymbol2 extends ZodType2 {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.symbol) {
      const ctx = this._getOrReturnCtx(input);
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.symbol,
        received: ctx.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
}
ZodSymbol2.create = (params) => {
  return new ZodSymbol2({
    typeName: ZodFirstPartyTypeKind2.ZodSymbol,
    ...processCreateParams(params)
  });
};

class ZodUndefined2 extends ZodType2 {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.undefined) {
      const ctx = this._getOrReturnCtx(input);
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.undefined,
        received: ctx.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
}
ZodUndefined2.create = (params) => {
  return new ZodUndefined2({
    typeName: ZodFirstPartyTypeKind2.ZodUndefined,
    ...processCreateParams(params)
  });
};

class ZodNull2 extends ZodType2 {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.null) {
      const ctx = this._getOrReturnCtx(input);
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.null,
        received: ctx.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
}
ZodNull2.create = (params) => {
  return new ZodNull2({
    typeName: ZodFirstPartyTypeKind2.ZodNull,
    ...processCreateParams(params)
  });
};

class ZodAny2 extends ZodType2 {
  constructor() {
    super(...arguments);
    this._any = true;
  }
  _parse(input) {
    return OK(input.data);
  }
}
ZodAny2.create = (params) => {
  return new ZodAny2({
    typeName: ZodFirstPartyTypeKind2.ZodAny,
    ...processCreateParams(params)
  });
};

class ZodUnknown2 extends ZodType2 {
  constructor() {
    super(...arguments);
    this._unknown = true;
  }
  _parse(input) {
    return OK(input.data);
  }
}
ZodUnknown2.create = (params) => {
  return new ZodUnknown2({
    typeName: ZodFirstPartyTypeKind2.ZodUnknown,
    ...processCreateParams(params)
  });
};

class ZodNever2 extends ZodType2 {
  _parse(input) {
    const ctx = this._getOrReturnCtx(input);
    addIssueToContext(ctx, {
      code: ZodIssueCode2.invalid_type,
      expected: ZodParsedType.never,
      received: ctx.parsedType
    });
    return INVALID;
  }
}
ZodNever2.create = (params) => {
  return new ZodNever2({
    typeName: ZodFirstPartyTypeKind2.ZodNever,
    ...processCreateParams(params)
  });
};

class ZodVoid2 extends ZodType2 {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.undefined) {
      const ctx = this._getOrReturnCtx(input);
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.void,
        received: ctx.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
}
ZodVoid2.create = (params) => {
  return new ZodVoid2({
    typeName: ZodFirstPartyTypeKind2.ZodVoid,
    ...processCreateParams(params)
  });
};

class ZodArray2 extends ZodType2 {
  _parse(input) {
    const { ctx, status: status2 } = this._processInputParams(input);
    const def2 = this._def;
    if (ctx.parsedType !== ZodParsedType.array) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.array,
        received: ctx.parsedType
      });
      return INVALID;
    }
    if (def2.exactLength !== null) {
      const tooBig = ctx.data.length > def2.exactLength.value;
      const tooSmall = ctx.data.length < def2.exactLength.value;
      if (tooBig || tooSmall) {
        addIssueToContext(ctx, {
          code: tooBig ? ZodIssueCode2.too_big : ZodIssueCode2.too_small,
          minimum: tooSmall ? def2.exactLength.value : undefined,
          maximum: tooBig ? def2.exactLength.value : undefined,
          type: "array",
          inclusive: true,
          exact: true,
          message: def2.exactLength.message
        });
        status2.dirty();
      }
    }
    if (def2.minLength !== null) {
      if (ctx.data.length < def2.minLength.value) {
        addIssueToContext(ctx, {
          code: ZodIssueCode2.too_small,
          minimum: def2.minLength.value,
          type: "array",
          inclusive: true,
          exact: false,
          message: def2.minLength.message
        });
        status2.dirty();
      }
    }
    if (def2.maxLength !== null) {
      if (ctx.data.length > def2.maxLength.value) {
        addIssueToContext(ctx, {
          code: ZodIssueCode2.too_big,
          maximum: def2.maxLength.value,
          type: "array",
          inclusive: true,
          exact: false,
          message: def2.maxLength.message
        });
        status2.dirty();
      }
    }
    if (ctx.common.async) {
      return Promise.all([...ctx.data].map((item, i) => {
        return def2.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
      })).then((result2) => {
        return ParseStatus.mergeArray(status2, result2);
      });
    }
    const result = [...ctx.data].map((item, i) => {
      return def2.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
    });
    return ParseStatus.mergeArray(status2, result);
  }
  get element() {
    return this._def.type;
  }
  min(minLength, message2) {
    return new ZodArray2({
      ...this._def,
      minLength: { value: minLength, message: errorUtil.toString(message2) }
    });
  }
  max(maxLength, message2) {
    return new ZodArray2({
      ...this._def,
      maxLength: { value: maxLength, message: errorUtil.toString(message2) }
    });
  }
  length(len, message2) {
    return new ZodArray2({
      ...this._def,
      exactLength: { value: len, message: errorUtil.toString(message2) }
    });
  }
  nonempty(message2) {
    return this.min(1, message2);
  }
}
ZodArray2.create = (schema, params) => {
  return new ZodArray2({
    type: schema,
    minLength: null,
    maxLength: null,
    exactLength: null,
    typeName: ZodFirstPartyTypeKind2.ZodArray,
    ...processCreateParams(params)
  });
};
function deepPartialify(schema) {
  if (schema instanceof ZodObject2) {
    const newShape = {};
    for (const key in schema.shape) {
      const fieldSchema = schema.shape[key];
      newShape[key] = ZodOptional2.create(deepPartialify(fieldSchema));
    }
    return new ZodObject2({
      ...schema._def,
      shape: () => newShape
    });
  } else if (schema instanceof ZodArray2) {
    return new ZodArray2({
      ...schema._def,
      type: deepPartialify(schema.element)
    });
  } else if (schema instanceof ZodOptional2) {
    return ZodOptional2.create(deepPartialify(schema.unwrap()));
  } else if (schema instanceof ZodNullable2) {
    return ZodNullable2.create(deepPartialify(schema.unwrap()));
  } else if (schema instanceof ZodTuple2) {
    return ZodTuple2.create(schema.items.map((item) => deepPartialify(item)));
  } else {
    return schema;
  }
}

class ZodObject2 extends ZodType2 {
  constructor() {
    super(...arguments);
    this._cached = null;
    this.nonstrict = this.passthrough;
    this.augment = this.extend;
  }
  _getCached() {
    if (this._cached !== null)
      return this._cached;
    const shape = this._def.shape();
    const keys = util4.objectKeys(shape);
    this._cached = { shape, keys };
    return this._cached;
  }
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.object) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.object,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    const { status: status2, ctx } = this._processInputParams(input);
    const { shape, keys: shapeKeys } = this._getCached();
    const extraKeys = [];
    if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) {
      for (const key in ctx.data) {
        if (!shapeKeys.includes(key)) {
          extraKeys.push(key);
        }
      }
    }
    const pairs = [];
    for (const key of shapeKeys) {
      const keyValidator = shape[key];
      const value = ctx.data[key];
      pairs.push({
        key: { status: "valid", value: key },
        value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
        alwaysSet: key in ctx.data
      });
    }
    if (this._def.catchall instanceof ZodNever2) {
      const unknownKeys = this._def.unknownKeys;
      if (unknownKeys === "passthrough") {
        for (const key of extraKeys) {
          pairs.push({
            key: { status: "valid", value: key },
            value: { status: "valid", value: ctx.data[key] }
          });
        }
      } else if (unknownKeys === "strict") {
        if (extraKeys.length > 0) {
          addIssueToContext(ctx, {
            code: ZodIssueCode2.unrecognized_keys,
            keys: extraKeys
          });
          status2.dirty();
        }
      } else if (unknownKeys === "strip") {} else {
        throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
      }
    } else {
      const catchall = this._def.catchall;
      for (const key of extraKeys) {
        const value = ctx.data[key];
        pairs.push({
          key: { status: "valid", value: key },
          value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
          alwaysSet: key in ctx.data
        });
      }
    }
    if (ctx.common.async) {
      return Promise.resolve().then(async () => {
        const syncPairs = [];
        for (const pair of pairs) {
          const key = await pair.key;
          const value = await pair.value;
          syncPairs.push({
            key,
            value,
            alwaysSet: pair.alwaysSet
          });
        }
        return syncPairs;
      }).then((syncPairs) => {
        return ParseStatus.mergeObjectSync(status2, syncPairs);
      });
    } else {
      return ParseStatus.mergeObjectSync(status2, pairs);
    }
  }
  get shape() {
    return this._def.shape();
  }
  strict(message2) {
    errorUtil.errToObj;
    return new ZodObject2({
      ...this._def,
      unknownKeys: "strict",
      ...message2 !== undefined ? {
        errorMap: (issue2, ctx) => {
          const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError;
          if (issue2.code === "unrecognized_keys")
            return {
              message: errorUtil.errToObj(message2).message ?? defaultError
            };
          return {
            message: defaultError
          };
        }
      } : {}
    });
  }
  strip() {
    return new ZodObject2({
      ...this._def,
      unknownKeys: "strip"
    });
  }
  passthrough() {
    return new ZodObject2({
      ...this._def,
      unknownKeys: "passthrough"
    });
  }
  extend(augmentation) {
    return new ZodObject2({
      ...this._def,
      shape: () => ({
        ...this._def.shape(),
        ...augmentation
      })
    });
  }
  merge(merging) {
    const merged = new ZodObject2({
      unknownKeys: merging._def.unknownKeys,
      catchall: merging._def.catchall,
      shape: () => ({
        ...this._def.shape(),
        ...merging._def.shape()
      }),
      typeName: ZodFirstPartyTypeKind2.ZodObject
    });
    return merged;
  }
  setKey(key, schema) {
    return this.augment({ [key]: schema });
  }
  catchall(index2) {
    return new ZodObject2({
      ...this._def,
      catchall: index2
    });
  }
  pick(mask) {
    const shape = {};
    for (const key of util4.objectKeys(mask)) {
      if (mask[key] && this.shape[key]) {
        shape[key] = this.shape[key];
      }
    }
    return new ZodObject2({
      ...this._def,
      shape: () => shape
    });
  }
  omit(mask) {
    const shape = {};
    for (const key of util4.objectKeys(this.shape)) {
      if (!mask[key]) {
        shape[key] = this.shape[key];
      }
    }
    return new ZodObject2({
      ...this._def,
      shape: () => shape
    });
  }
  deepPartial() {
    return deepPartialify(this);
  }
  partial(mask) {
    const newShape = {};
    for (const key of util4.objectKeys(this.shape)) {
      const fieldSchema = this.shape[key];
      if (mask && !mask[key]) {
        newShape[key] = fieldSchema;
      } else {
        newShape[key] = fieldSchema.optional();
      }
    }
    return new ZodObject2({
      ...this._def,
      shape: () => newShape
    });
  }
  required(mask) {
    const newShape = {};
    for (const key of util4.objectKeys(this.shape)) {
      if (mask && !mask[key]) {
        newShape[key] = this.shape[key];
      } else {
        const fieldSchema = this.shape[key];
        let newField = fieldSchema;
        while (newField instanceof ZodOptional2) {
          newField = newField._def.innerType;
        }
        newShape[key] = newField;
      }
    }
    return new ZodObject2({
      ...this._def,
      shape: () => newShape
    });
  }
  keyof() {
    return createZodEnum(util4.objectKeys(this.shape));
  }
}
ZodObject2.create = (shape, params) => {
  return new ZodObject2({
    shape: () => shape,
    unknownKeys: "strip",
    catchall: ZodNever2.create(),
    typeName: ZodFirstPartyTypeKind2.ZodObject,
    ...processCreateParams(params)
  });
};
ZodObject2.strictCreate = (shape, params) => {
  return new ZodObject2({
    shape: () => shape,
    unknownKeys: "strict",
    catchall: ZodNever2.create(),
    typeName: ZodFirstPartyTypeKind2.ZodObject,
    ...processCreateParams(params)
  });
};
ZodObject2.lazycreate = (shape, params) => {
  return new ZodObject2({
    shape,
    unknownKeys: "strip",
    catchall: ZodNever2.create(),
    typeName: ZodFirstPartyTypeKind2.ZodObject,
    ...processCreateParams(params)
  });
};

class ZodUnion2 extends ZodType2 {
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    const options2 = this._def.options;
    function handleResults(results) {
      for (const result of results) {
        if (result.result.status === "valid") {
          return result.result;
        }
      }
      for (const result of results) {
        if (result.result.status === "dirty") {
          ctx.common.issues.push(...result.ctx.common.issues);
          return result.result;
        }
      }
      const unionErrors = results.map((result) => new ZodError2(result.ctx.common.issues));
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_union,
        unionErrors
      });
      return INVALID;
    }
    if (ctx.common.async) {
      return Promise.all(options2.map(async (option2) => {
        const childCtx = {
          ...ctx,
          common: {
            ...ctx.common,
            issues: []
          },
          parent: null
        };
        return {
          result: await option2._parseAsync({
            data: ctx.data,
            path: ctx.path,
            parent: childCtx
          }),
          ctx: childCtx
        };
      })).then(handleResults);
    } else {
      let dirty = undefined;
      const issues = [];
      for (const option2 of options2) {
        const childCtx = {
          ...ctx,
          common: {
            ...ctx.common,
            issues: []
          },
          parent: null
        };
        const result = option2._parseSync({
          data: ctx.data,
          path: ctx.path,
          parent: childCtx
        });
        if (result.status === "valid") {
          return result;
        } else if (result.status === "dirty" && !dirty) {
          dirty = { result, ctx: childCtx };
        }
        if (childCtx.common.issues.length) {
          issues.push(childCtx.common.issues);
        }
      }
      if (dirty) {
        ctx.common.issues.push(...dirty.ctx.common.issues);
        return dirty.result;
      }
      const unionErrors = issues.map((issues2) => new ZodError2(issues2));
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_union,
        unionErrors
      });
      return INVALID;
    }
  }
  get options() {
    return this._def.options;
  }
}
ZodUnion2.create = (types6, params) => {
  return new ZodUnion2({
    options: types6,
    typeName: ZodFirstPartyTypeKind2.ZodUnion,
    ...processCreateParams(params)
  });
};
var getDiscriminator = (type2) => {
  if (type2 instanceof ZodLazy2) {
    return getDiscriminator(type2.schema);
  } else if (type2 instanceof ZodEffects) {
    return getDiscriminator(type2.innerType());
  } else if (type2 instanceof ZodLiteral2) {
    return [type2.value];
  } else if (type2 instanceof ZodEnum2) {
    return type2.options;
  } else if (type2 instanceof ZodNativeEnum) {
    return util4.objectValues(type2.enum);
  } else if (type2 instanceof ZodDefault2) {
    return getDiscriminator(type2._def.innerType);
  } else if (type2 instanceof ZodUndefined2) {
    return [undefined];
  } else if (type2 instanceof ZodNull2) {
    return [null];
  } else if (type2 instanceof ZodOptional2) {
    return [undefined, ...getDiscriminator(type2.unwrap())];
  } else if (type2 instanceof ZodNullable2) {
    return [null, ...getDiscriminator(type2.unwrap())];
  } else if (type2 instanceof ZodBranded) {
    return getDiscriminator(type2.unwrap());
  } else if (type2 instanceof ZodReadonly2) {
    return getDiscriminator(type2.unwrap());
  } else if (type2 instanceof ZodCatch2) {
    return getDiscriminator(type2._def.innerType);
  } else {
    return [];
  }
};

class ZodDiscriminatedUnion2 extends ZodType2 {
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    if (ctx.parsedType !== ZodParsedType.object) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.object,
        received: ctx.parsedType
      });
      return INVALID;
    }
    const discriminator = this.discriminator;
    const discriminatorValue = ctx.data[discriminator];
    const option2 = this.optionsMap.get(discriminatorValue);
    if (!option2) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_union_discriminator,
        options: Array.from(this.optionsMap.keys()),
        path: [discriminator]
      });
      return INVALID;
    }
    if (ctx.common.async) {
      return option2._parseAsync({
        data: ctx.data,
        path: ctx.path,
        parent: ctx
      });
    } else {
      return option2._parseSync({
        data: ctx.data,
        path: ctx.path,
        parent: ctx
      });
    }
  }
  get discriminator() {
    return this._def.discriminator;
  }
  get options() {
    return this._def.options;
  }
  get optionsMap() {
    return this._def.optionsMap;
  }
  static create(discriminator, options2, params) {
    const optionsMap = new Map;
    for (const type2 of options2) {
      const discriminatorValues = getDiscriminator(type2.shape[discriminator]);
      if (!discriminatorValues.length) {
        throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
      }
      for (const value of discriminatorValues) {
        if (optionsMap.has(value)) {
          throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
        }
        optionsMap.set(value, type2);
      }
    }
    return new ZodDiscriminatedUnion2({
      typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion,
      discriminator,
      options: options2,
      optionsMap,
      ...processCreateParams(params)
    });
  }
}
function mergeValues2(a13, b5) {
  const aType = getParsedType2(a13);
  const bType = getParsedType2(b5);
  if (a13 === b5) {
    return { valid: true, data: a13 };
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
    const bKeys = util4.objectKeys(b5);
    const sharedKeys = util4.objectKeys(a13).filter((key) => bKeys.indexOf(key) !== -1);
    const newObj = { ...a13, ...b5 };
    for (const key of sharedKeys) {
      const sharedValue = mergeValues2(a13[key], b5[key]);
      if (!sharedValue.valid) {
        return { valid: false };
      }
      newObj[key] = sharedValue.data;
    }
    return { valid: true, data: newObj };
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
    if (a13.length !== b5.length) {
      return { valid: false };
    }
    const newArray = [];
    for (let index2 = 0;index2 < a13.length; index2++) {
      const itemA = a13[index2];
      const itemB = b5[index2];
      const sharedValue = mergeValues2(itemA, itemB);
      if (!sharedValue.valid) {
        return { valid: false };
      }
      newArray.push(sharedValue.data);
    }
    return { valid: true, data: newArray };
  } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a13 === +b5) {
    return { valid: true, data: a13 };
  } else {
    return { valid: false };
  }
}

class ZodIntersection2 extends ZodType2 {
  _parse(input) {
    const { status: status2, ctx } = this._processInputParams(input);
    const handleParsed = (parsedLeft, parsedRight) => {
      if (isAborted(parsedLeft) || isAborted(parsedRight)) {
        return INVALID;
      }
      const merged = mergeValues2(parsedLeft.value, parsedRight.value);
      if (!merged.valid) {
        addIssueToContext(ctx, {
          code: ZodIssueCode2.invalid_intersection_types
        });
        return INVALID;
      }
      if (isDirty(parsedLeft) || isDirty(parsedRight)) {
        status2.dirty();
      }
      return { status: status2.value, value: merged.data };
    };
    if (ctx.common.async) {
      return Promise.all([
        this._def.left._parseAsync({
          data: ctx.data,
          path: ctx.path,
          parent: ctx
        }),
        this._def.right._parseAsync({
          data: ctx.data,
          path: ctx.path,
          parent: ctx
        })
      ]).then(([left2, right2]) => handleParsed(left2, right2));
    } else {
      return handleParsed(this._def.left._parseSync({
        data: ctx.data,
        path: ctx.path,
        parent: ctx
      }), this._def.right._parseSync({
        data: ctx.data,
        path: ctx.path,
        parent: ctx
      }));
    }
  }
}
ZodIntersection2.create = (left2, right2, params) => {
  return new ZodIntersection2({
    left: left2,
    right: right2,
    typeName: ZodFirstPartyTypeKind2.ZodIntersection,
    ...processCreateParams(params)
  });
};

class ZodTuple2 extends ZodType2 {
  _parse(input) {
    const { status: status2, ctx } = this._processInputParams(input);
    if (ctx.parsedType !== ZodParsedType.array) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.array,
        received: ctx.parsedType
      });
      return INVALID;
    }
    if (ctx.data.length < this._def.items.length) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.too_small,
        minimum: this._def.items.length,
        inclusive: true,
        exact: false,
        type: "array"
      });
      return INVALID;
    }
    const rest = this._def.rest;
    if (!rest && ctx.data.length > this._def.items.length) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.too_big,
        maximum: this._def.items.length,
        inclusive: true,
        exact: false,
        type: "array"
      });
      status2.dirty();
    }
    const items = [...ctx.data].map((item, itemIndex) => {
      const schema = this._def.items[itemIndex] || this._def.rest;
      if (!schema)
        return null;
      return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
    }).filter((x4) => !!x4);
    if (ctx.common.async) {
      return Promise.all(items).then((results) => {
        return ParseStatus.mergeArray(status2, results);
      });
    } else {
      return ParseStatus.mergeArray(status2, items);
    }
  }
  get items() {
    return this._def.items;
  }
  rest(rest) {
    return new ZodTuple2({
      ...this._def,
      rest
    });
  }
}
ZodTuple2.create = (schemas3, params) => {
  if (!Array.isArray(schemas3)) {
    throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
  }
  return new ZodTuple2({
    items: schemas3,
    typeName: ZodFirstPartyTypeKind2.ZodTuple,
    rest: null,
    ...processCreateParams(params)
  });
};

class ZodRecord2 extends ZodType2 {
  get keySchema() {
    return this._def.keyType;
  }
  get valueSchema() {
    return this._def.valueType;
  }
  _parse(input) {
    const { status: status2, ctx } = this._processInputParams(input);
    if (ctx.parsedType !== ZodParsedType.object) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.object,
        received: ctx.parsedType
      });
      return INVALID;
    }
    const pairs = [];
    const keyType = this._def.keyType;
    const valueType = this._def.valueType;
    for (const key in ctx.data) {
      pairs.push({
        key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
        value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
        alwaysSet: key in ctx.data
      });
    }
    if (ctx.common.async) {
      return ParseStatus.mergeObjectAsync(status2, pairs);
    } else {
      return ParseStatus.mergeObjectSync(status2, pairs);
    }
  }
  get element() {
    return this._def.valueType;
  }
  static create(first, second, third) {
    if (second instanceof ZodType2) {
      return new ZodRecord2({
        keyType: first,
        valueType: second,
        typeName: ZodFirstPartyTypeKind2.ZodRecord,
        ...processCreateParams(third)
      });
    }
    return new ZodRecord2({
      keyType: ZodString2.create(),
      valueType: first,
      typeName: ZodFirstPartyTypeKind2.ZodRecord,
      ...processCreateParams(second)
    });
  }
}

class ZodMap2 extends ZodType2 {
  get keySchema() {
    return this._def.keyType;
  }
  get valueSchema() {
    return this._def.valueType;
  }
  _parse(input) {
    const { status: status2, ctx } = this._processInputParams(input);
    if (ctx.parsedType !== ZodParsedType.map) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.map,
        received: ctx.parsedType
      });
      return INVALID;
    }
    const keyType = this._def.keyType;
    const valueType = this._def.valueType;
    const pairs = [...ctx.data.entries()].map(([key, value], index2) => {
      return {
        key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index2, "key"])),
        value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index2, "value"]))
      };
    });
    if (ctx.common.async) {
      const finalMap = new Map;
      return Promise.resolve().then(async () => {
        for (const pair of pairs) {
          const key = await pair.key;
          const value = await pair.value;
          if (key.status === "aborted" || value.status === "aborted") {
            return INVALID;
          }
          if (key.status === "dirty" || value.status === "dirty") {
            status2.dirty();
          }
          finalMap.set(key.value, value.value);
        }
        return { status: status2.value, value: finalMap };
      });
    } else {
      const finalMap = new Map;
      for (const pair of pairs) {
        const key = pair.key;
        const value = pair.value;
        if (key.status === "aborted" || value.status === "aborted") {
          return INVALID;
        }
        if (key.status === "dirty" || value.status === "dirty") {
          status2.dirty();
        }
        finalMap.set(key.value, value.value);
      }
      return { status: status2.value, value: finalMap };
    }
  }
}
ZodMap2.create = (keyType, valueType, params) => {
  return new ZodMap2({
    valueType,
    keyType,
    typeName: ZodFirstPartyTypeKind2.ZodMap,
    ...processCreateParams(params)
  });
};

class ZodSet2 extends ZodType2 {
  _parse(input) {
    const { status: status2, ctx } = this._processInputParams(input);
    if (ctx.parsedType !== ZodParsedType.set) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.set,
        received: ctx.parsedType
      });
      return INVALID;
    }
    const def2 = this._def;
    if (def2.minSize !== null) {
      if (ctx.data.size < def2.minSize.value) {
        addIssueToContext(ctx, {
          code: ZodIssueCode2.too_small,
          minimum: def2.minSize.value,
          type: "set",
          inclusive: true,
          exact: false,
          message: def2.minSize.message
        });
        status2.dirty();
      }
    }
    if (def2.maxSize !== null) {
      if (ctx.data.size > def2.maxSize.value) {
        addIssueToContext(ctx, {
          code: ZodIssueCode2.too_big,
          maximum: def2.maxSize.value,
          type: "set",
          inclusive: true,
          exact: false,
          message: def2.maxSize.message
        });
        status2.dirty();
      }
    }
    const valueType = this._def.valueType;
    function finalizeSet(elements2) {
      const parsedSet = new Set;
      for (const element of elements2) {
        if (element.status === "aborted")
          return INVALID;
        if (element.status === "dirty")
          status2.dirty();
        parsedSet.add(element.value);
      }
      return { status: status2.value, value: parsedSet };
    }
    const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
    if (ctx.common.async) {
      return Promise.all(elements).then((elements2) => finalizeSet(elements2));
    } else {
      return finalizeSet(elements);
    }
  }
  min(minSize, message2) {
    return new ZodSet2({
      ...this._def,
      minSize: { value: minSize, message: errorUtil.toString(message2) }
    });
  }
  max(maxSize, message2) {
    return new ZodSet2({
      ...this._def,
      maxSize: { value: maxSize, message: errorUtil.toString(message2) }
    });
  }
  size(size, message2) {
    return this.min(size, message2).max(size, message2);
  }
  nonempty(message2) {
    return this.min(1, message2);
  }
}
ZodSet2.create = (valueType, params) => {
  return new ZodSet2({
    valueType,
    minSize: null,
    maxSize: null,
    typeName: ZodFirstPartyTypeKind2.ZodSet,
    ...processCreateParams(params)
  });
};

class ZodFunction2 extends ZodType2 {
  constructor() {
    super(...arguments);
    this.validate = this.implement;
  }
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    if (ctx.parsedType !== ZodParsedType.function) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.function,
        received: ctx.parsedType
      });
      return INVALID;
    }
    function makeArgsIssue(args, error49) {
      return makeIssue({
        data: args,
        path: ctx.path,
        errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x4) => !!x4),
        issueData: {
          code: ZodIssueCode2.invalid_arguments,
          argumentsError: error49
        }
      });
    }
    function makeReturnsIssue(returns, error49) {
      return makeIssue({
        data: returns,
        path: ctx.path,
        errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x4) => !!x4),
        issueData: {
          code: ZodIssueCode2.invalid_return_type,
          returnTypeError: error49
        }
      });
    }
    const params = { errorMap: ctx.common.contextualErrorMap };
    const fn3 = ctx.data;
    if (this._def.returns instanceof ZodPromise2) {
      const me4 = this;
      return OK(async function(...args) {
        const error49 = new ZodError2([]);
        const parsedArgs = await me4._def.args.parseAsync(args, params).catch((e3) => {
          error49.addIssue(makeArgsIssue(args, e3));
          throw error49;
        });
        const result = await Reflect.apply(fn3, this, parsedArgs);
        const parsedReturns = await me4._def.returns._def.type.parseAsync(result, params).catch((e3) => {
          error49.addIssue(makeReturnsIssue(result, e3));
          throw error49;
        });
        return parsedReturns;
      });
    } else {
      const me4 = this;
      return OK(function(...args) {
        const parsedArgs = me4._def.args.safeParse(args, params);
        if (!parsedArgs.success) {
          throw new ZodError2([makeArgsIssue(args, parsedArgs.error)]);
        }
        const result = Reflect.apply(fn3, this, parsedArgs.data);
        const parsedReturns = me4._def.returns.safeParse(result, params);
        if (!parsedReturns.success) {
          throw new ZodError2([makeReturnsIssue(result, parsedReturns.error)]);
        }
        return parsedReturns.data;
      });
    }
  }
  parameters() {
    return this._def.args;
  }
  returnType() {
    return this._def.returns;
  }
  args(...items) {
    return new ZodFunction2({
      ...this._def,
      args: ZodTuple2.create(items).rest(ZodUnknown2.create())
    });
  }
  returns(returnType) {
    return new ZodFunction2({
      ...this._def,
      returns: returnType
    });
  }
  implement(func) {
    const validatedFunc = this.parse(func);
    return validatedFunc;
  }
  strictImplement(func) {
    const validatedFunc = this.parse(func);
    return validatedFunc;
  }
  static create(args, returns, params) {
    return new ZodFunction2({
      args: args ? args : ZodTuple2.create([]).rest(ZodUnknown2.create()),
      returns: returns || ZodUnknown2.create(),
      typeName: ZodFirstPartyTypeKind2.ZodFunction,
      ...processCreateParams(params)
    });
  }
}

class ZodLazy2 extends ZodType2 {
  get schema() {
    return this._def.getter();
  }
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    const lazySchema = this._def.getter();
    return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
  }
}
ZodLazy2.create = (getter, params) => {
  return new ZodLazy2({
    getter,
    typeName: ZodFirstPartyTypeKind2.ZodLazy,
    ...processCreateParams(params)
  });
};

class ZodLiteral2 extends ZodType2 {
  _parse(input) {
    if (input.data !== this._def.value) {
      const ctx = this._getOrReturnCtx(input);
      addIssueToContext(ctx, {
        received: ctx.data,
        code: ZodIssueCode2.invalid_literal,
        expected: this._def.value
      });
      return INVALID;
    }
    return { status: "valid", value: input.data };
  }
  get value() {
    return this._def.value;
  }
}
ZodLiteral2.create = (value, params) => {
  return new ZodLiteral2({
    value,
    typeName: ZodFirstPartyTypeKind2.ZodLiteral,
    ...processCreateParams(params)
  });
};
function createZodEnum(values, params) {
  return new ZodEnum2({
    values,
    typeName: ZodFirstPartyTypeKind2.ZodEnum,
    ...processCreateParams(params)
  });
}

class ZodEnum2 extends ZodType2 {
  _parse(input) {
    if (typeof input.data !== "string") {
      const ctx = this._getOrReturnCtx(input);
      const expectedValues = this._def.values;
      addIssueToContext(ctx, {
        expected: util4.joinValues(expectedValues),
        received: ctx.parsedType,
        code: ZodIssueCode2.invalid_type
      });
      return INVALID;
    }
    if (!this._cache) {
      this._cache = new Set(this._def.values);
    }
    if (!this._cache.has(input.data)) {
      const ctx = this._getOrReturnCtx(input);
      const expectedValues = this._def.values;
      addIssueToContext(ctx, {
        received: ctx.data,
        code: ZodIssueCode2.invalid_enum_value,
        options: expectedValues
      });
      return INVALID;
    }
    return OK(input.data);
  }
  get options() {
    return this._def.values;
  }
  get enum() {
    const enumValues = {};
    for (const val of this._def.values) {
      enumValues[val] = val;
    }
    return enumValues;
  }
  get Values() {
    const enumValues = {};
    for (const val of this._def.values) {
      enumValues[val] = val;
    }
    return enumValues;
  }
  get Enum() {
    const enumValues = {};
    for (const val of this._def.values) {
      enumValues[val] = val;
    }
    return enumValues;
  }
  extract(values, newDef = this._def) {
    return ZodEnum2.create(values, {
      ...this._def,
      ...newDef
    });
  }
  exclude(values, newDef = this._def) {
    return ZodEnum2.create(this.options.filter((opt) => !values.includes(opt)), {
      ...this._def,
      ...newDef
    });
  }
}
ZodEnum2.create = createZodEnum;

class ZodNativeEnum extends ZodType2 {
  _parse(input) {
    const nativeEnumValues = util4.getValidEnumValues(this._def.values);
    const ctx = this._getOrReturnCtx(input);
    if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {
      const expectedValues = util4.objectValues(nativeEnumValues);
      addIssueToContext(ctx, {
        expected: util4.joinValues(expectedValues),
        received: ctx.parsedType,
        code: ZodIssueCode2.invalid_type
      });
      return INVALID;
    }
    if (!this._cache) {
      this._cache = new Set(util4.getValidEnumValues(this._def.values));
    }
    if (!this._cache.has(input.data)) {
      const expectedValues = util4.objectValues(nativeEnumValues);
      addIssueToContext(ctx, {
        received: ctx.data,
        code: ZodIssueCode2.invalid_enum_value,
        options: expectedValues
      });
      return INVALID;
    }
    return OK(input.data);
  }
  get enum() {
    return this._def.values;
  }
}
ZodNativeEnum.create = (values, params) => {
  return new ZodNativeEnum({
    values,
    typeName: ZodFirstPartyTypeKind2.ZodNativeEnum,
    ...processCreateParams(params)
  });
};

class ZodPromise2 extends ZodType2 {
  unwrap() {
    return this._def.type;
  }
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.promise,
        received: ctx.parsedType
      });
      return INVALID;
    }
    const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
    return OK(promisified.then((data) => {
      return this._def.type.parseAsync(data, {
        path: ctx.path,
        errorMap: ctx.common.contextualErrorMap
      });
    }));
  }
}
ZodPromise2.create = (schema, params) => {
  return new ZodPromise2({
    type: schema,
    typeName: ZodFirstPartyTypeKind2.ZodPromise,
    ...processCreateParams(params)
  });
};

class ZodEffects extends ZodType2 {
  innerType() {
    return this._def.schema;
  }
  sourceType() {
    return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
  }
  _parse(input) {
    const { status: status2, ctx } = this._processInputParams(input);
    const effect = this._def.effect || null;
    const checkCtx = {
      addIssue: (arg) => {
        addIssueToContext(ctx, arg);
        if (arg.fatal) {
          status2.abort();
        } else {
          status2.dirty();
        }
      },
      get path() {
        return ctx.path;
      }
    };
    checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
    if (effect.type === "preprocess") {
      const processed = effect.transform(ctx.data, checkCtx);
      if (ctx.common.async) {
        return Promise.resolve(processed).then(async (processed2) => {
          if (status2.value === "aborted")
            return INVALID;
          const result = await this._def.schema._parseAsync({
            data: processed2,
            path: ctx.path,
            parent: ctx
          });
          if (result.status === "aborted")
            return INVALID;
          if (result.status === "dirty")
            return DIRTY(result.value);
          if (status2.value === "dirty")
            return DIRTY(result.value);
          return result;
        });
      } else {
        if (status2.value === "aborted")
          return INVALID;
        const result = this._def.schema._parseSync({
          data: processed,
          path: ctx.path,
          parent: ctx
        });
        if (result.status === "aborted")
          return INVALID;
        if (result.status === "dirty")
          return DIRTY(result.value);
        if (status2.value === "dirty")
          return DIRTY(result.value);
        return result;
      }
    }
    if (effect.type === "refinement") {
      const executeRefinement = (acc) => {
        const result = effect.refinement(acc, checkCtx);
        if (ctx.common.async) {
          return Promise.resolve(result);
        }
        if (result instanceof Promise) {
          throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
        }
        return acc;
      };
      if (ctx.common.async === false) {
        const inner = this._def.schema._parseSync({
          data: ctx.data,
          path: ctx.path,
          parent: ctx
        });
        if (inner.status === "aborted")
          return INVALID;
        if (inner.status === "dirty")
          status2.dirty();
        executeRefinement(inner.value);
        return { status: status2.value, value: inner.value };
      } else {
        return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {
          if (inner.status === "aborted")
            return INVALID;
          if (inner.status === "dirty")
            status2.dirty();
          return executeRefinement(inner.value).then(() => {
            return { status: status2.value, value: inner.value };
          });
        });
      }
    }
    if (effect.type === "transform") {
      if (ctx.common.async === false) {
        const base = this._def.schema._parseSync({
          data: ctx.data,
          path: ctx.path,
          parent: ctx
        });
        if (!isValid(base))
          return INVALID;
        const result = effect.transform(base.value, checkCtx);
        if (result instanceof Promise) {
          throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
        }
        return { status: status2.value, value: result };
      } else {
        return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
          if (!isValid(base))
            return INVALID;
          return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
            status: status2.value,
            value: result
          }));
        });
      }
    }
    util4.assertNever(effect);
  }
}
ZodEffects.create = (schema, effect, params) => {
  return new ZodEffects({
    schema,
    typeName: ZodFirstPartyTypeKind2.ZodEffects,
    effect,
    ...processCreateParams(params)
  });
};
ZodEffects.createWithPreprocess = (preprocess3, schema, params) => {
  return new ZodEffects({
    schema,
    effect: { type: "preprocess", transform: preprocess3 },
    typeName: ZodFirstPartyTypeKind2.ZodEffects,
    ...processCreateParams(params)
  });
};
class ZodOptional2 extends ZodType2 {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 === ZodParsedType.undefined) {
      return OK(undefined);
    }
    return this._def.innerType._parse(input);
  }
  unwrap() {
    return this._def.innerType;
  }
}
ZodOptional2.create = (type2, params) => {
  return new ZodOptional2({
    innerType: type2,
    typeName: ZodFirstPartyTypeKind2.ZodOptional,
    ...processCreateParams(params)
  });
};

class ZodNullable2 extends ZodType2 {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 === ZodParsedType.null) {
      return OK(null);
    }
    return this._def.innerType._parse(input);
  }
  unwrap() {
    return this._def.innerType;
  }
}
ZodNullable2.create = (type2, params) => {
  return new ZodNullable2({
    innerType: type2,
    typeName: ZodFirstPartyTypeKind2.ZodNullable,
    ...processCreateParams(params)
  });
};

class ZodDefault2 extends ZodType2 {
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    let data = ctx.data;
    if (ctx.parsedType === ZodParsedType.undefined) {
      data = this._def.defaultValue();
    }
    return this._def.innerType._parse({
      data,
      path: ctx.path,
      parent: ctx
    });
  }
  removeDefault() {
    return this._def.innerType;
  }
}
ZodDefault2.create = (type2, params) => {
  return new ZodDefault2({
    innerType: type2,
    typeName: ZodFirstPartyTypeKind2.ZodDefault,
    defaultValue: typeof params.default === "function" ? params.default : () => params.default,
    ...processCreateParams(params)
  });
};

class ZodCatch2 extends ZodType2 {
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    const newCtx = {
      ...ctx,
      common: {
        ...ctx.common,
        issues: []
      }
    };
    const result = this._def.innerType._parse({
      data: newCtx.data,
      path: newCtx.path,
      parent: {
        ...newCtx
      }
    });
    if (isAsync2(result)) {
      return result.then((result2) => {
        return {
          status: "valid",
          value: result2.status === "valid" ? result2.value : this._def.catchValue({
            get error() {
              return new ZodError2(newCtx.common.issues);
            },
            input: newCtx.data
          })
        };
      });
    } else {
      return {
        status: "valid",
        value: result.status === "valid" ? result.value : this._def.catchValue({
          get error() {
            return new ZodError2(newCtx.common.issues);
          },
          input: newCtx.data
        })
      };
    }
  }
  removeCatch() {
    return this._def.innerType;
  }
}
ZodCatch2.create = (type2, params) => {
  return new ZodCatch2({
    innerType: type2,
    typeName: ZodFirstPartyTypeKind2.ZodCatch,
    catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
    ...processCreateParams(params)
  });
};

class ZodNaN2 extends ZodType2 {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.nan) {
      const ctx = this._getOrReturnCtx(input);
      addIssueToContext(ctx, {
        code: ZodIssueCode2.invalid_type,
        expected: ZodParsedType.nan,
        received: ctx.parsedType
      });
      return INVALID;
    }
    return { status: "valid", value: input.data };
  }
}
ZodNaN2.create = (params) => {
  return new ZodNaN2({
    typeName: ZodFirstPartyTypeKind2.ZodNaN,
    ...processCreateParams(params)
  });
};
var BRAND = Symbol("zod_brand");

class ZodBranded extends ZodType2 {
  _parse(input) {
    const { ctx } = this._processInputParams(input);
    const data = ctx.data;
    return this._def.type._parse({
      data,
      path: ctx.path,
      parent: ctx
    });
  }
  unwrap() {
    return this._def.type;
  }
}

class ZodPipeline extends ZodType2 {
  _parse(input) {
    const { status: status2, ctx } = this._processInputParams(input);
    if (ctx.common.async) {
      const handleAsync = async () => {
        const inResult = await this._def.in._parseAsync({
          data: ctx.data,
          path: ctx.path,
          parent: ctx
        });
        if (inResult.status === "aborted")
          return INVALID;
        if (inResult.status === "dirty") {
          status2.dirty();
          return DIRTY(inResult.value);
        } else {
          return this._def.out._parseAsync({
            data: inResult.value,
            path: ctx.path,
            parent: ctx
          });
        }
      };
      return handleAsync();
    } else {
      const inResult = this._def.in._parseSync({
        data: ctx.data,
        path: ctx.path,
        parent: ctx
      });
      if (inResult.status === "aborted")
        return INVALID;
      if (inResult.status === "dirty") {
        status2.dirty();
        return {
          status: "dirty",
          value: inResult.value
        };
      } else {
        return this._def.out._parseSync({
          data: inResult.value,
          path: ctx.path,
          parent: ctx
        });
      }
    }
  }
  static create(a13, b5) {
    return new ZodPipeline({
      in: a13,
      out: b5,
      typeName: ZodFirstPartyTypeKind2.ZodPipeline
    });
  }
}

class ZodReadonly2 extends ZodType2 {
  _parse(input) {
    const result = this._def.innerType._parse(input);
    const freeze = (data) => {
      if (isValid(data)) {
        data.value = Object.freeze(data.value);
      }
      return data;
    };
    return isAsync2(result) ? result.then((data) => freeze(data)) : freeze(result);
  }
  unwrap() {
    return this._def.innerType;
  }
}
ZodReadonly2.create = (type2, params) => {
  return new ZodReadonly2({
    innerType: type2,
    typeName: ZodFirstPartyTypeKind2.ZodReadonly,
    ...processCreateParams(params)
  });
};
function cleanParams(params, data) {
  const p3 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
  const p22 = typeof p3 === "string" ? { message: p3 } : p3;
  return p22;
}
function custom2(check3, _params = {}, fatal) {
  if (check3)
    return ZodAny2.create().superRefine((data, ctx) => {
      const r3 = check3(data);
      if (r3 instanceof Promise) {
        return r3.then((r4) => {
          if (!r4) {
            const params = cleanParams(_params, data);
            const _fatal = params.fatal ?? fatal ?? true;
            ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
          }
        });
      }
      if (!r3) {
        const params = cleanParams(_params, data);
        const _fatal = params.fatal ?? fatal ?? true;
        ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
      }
      return;
    });
  return ZodAny2.create();
}
var late = {
  object: ZodObject2.lazycreate
};
var ZodFirstPartyTypeKind2;
(function(ZodFirstPartyTypeKind3) {
  ZodFirstPartyTypeKind3["ZodString"] = "ZodString";
  ZodFirstPartyTypeKind3["ZodNumber"] = "ZodNumber";
  ZodFirstPartyTypeKind3["ZodNaN"] = "ZodNaN";
  ZodFirstPartyTypeKind3["ZodBigInt"] = "ZodBigInt";
  ZodFirstPartyTypeKind3["ZodBoolean"] = "ZodBoolean";
  ZodFirstPartyTypeKind3["ZodDate"] = "ZodDate";
  ZodFirstPartyTypeKind3["ZodSymbol"] = "ZodSymbol";
  ZodFirstPartyTypeKind3["ZodUndefined"] = "ZodUndefined";
  ZodFirstPartyTypeKind3["ZodNull"] = "ZodNull";
  ZodFirstPartyTypeKind3["ZodAny"] = "ZodAny";
  ZodFirstPartyTypeKind3["ZodUnknown"] = "ZodUnknown";
  ZodFirstPartyTypeKind3["ZodNever"] = "ZodNever";
  ZodFirstPartyTypeKind3["ZodVoid"] = "ZodVoid";
  ZodFirstPartyTypeKind3["ZodArray"] = "ZodArray";
  ZodFirstPartyTypeKind3["ZodObject"] = "ZodObject";
  ZodFirstPartyTypeKind3["ZodUnion"] = "ZodUnion";
  ZodFirstPartyTypeKind3["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
  ZodFirstPartyTypeKind3["ZodIntersection"] = "ZodIntersection";
  ZodFirstPartyTypeKind3["ZodTuple"] = "ZodTuple";
  ZodFirstPartyTypeKind3["ZodRecord"] = "ZodRecord";
  ZodFirstPartyTypeKind3["ZodMap"] = "ZodMap";
  ZodFirstPartyTypeKind3["ZodSet"] = "ZodSet";
  ZodFirstPartyTypeKind3["ZodFunction"] = "ZodFunction";
  ZodFirstPartyTypeKind3["ZodLazy"] = "ZodLazy";
  ZodFirstPartyTypeKind3["ZodLiteral"] = "ZodLiteral";
  ZodFirstPartyTypeKind3["ZodEnum"] = "ZodEnum";
  ZodFirstPartyTypeKind3["ZodEffects"] = "ZodEffects";
  ZodFirstPartyTypeKind3["ZodNativeEnum"] = "ZodNativeEnum";
  ZodFirstPartyTypeKind3["ZodOptional"] = "ZodOptional";
  ZodFirstPartyTypeKind3["ZodNullable"] = "ZodNullable";
  ZodFirstPartyTypeKind3["ZodDefault"] = "ZodDefault";
  ZodFirstPartyTypeKind3["ZodCatch"] = "ZodCatch";
  ZodFirstPartyTypeKind3["ZodPromise"] = "ZodPromise";
  ZodFirstPartyTypeKind3["ZodBranded"] = "ZodBranded";
  ZodFirstPartyTypeKind3["ZodPipeline"] = "ZodPipeline";
  ZodFirstPartyTypeKind3["ZodReadonly"] = "ZodReadonly";
})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
var instanceOfType = (cls, params = {
  message: `Input not instance of ${cls.name}`
}) => custom2((data) => data instanceof cls, params);
var stringType = ZodString2.create;
var numberType = ZodNumber2.create;
var nanType = ZodNaN2.create;
var bigIntType = ZodBigInt2.create;
var booleanType = ZodBoolean2.create;
var dateType = ZodDate2.create;
var symbolType = ZodSymbol2.create;
var undefinedType = ZodUndefined2.create;
var nullType = ZodNull2.create;
var anyType = ZodAny2.create;
var unknownType = ZodUnknown2.create;
var neverType = ZodNever2.create;
var voidType = ZodVoid2.create;
var arrayType = ZodArray2.create;
var objectType = ZodObject2.create;
var strictObjectType = ZodObject2.strictCreate;
var unionType = ZodUnion2.create;
var discriminatedUnionType = ZodDiscriminatedUnion2.create;
var intersectionType = ZodIntersection2.create;
var tupleType = ZodTuple2.create;
var recordType = ZodRecord2.create;
var mapType = ZodMap2.create;
var setType = ZodSet2.create;
var functionType = ZodFunction2.create;
var lazyType = ZodLazy2.create;
var literalType = ZodLiteral2.create;
var enumType = ZodEnum2.create;
var nativeEnumType = ZodNativeEnum.create;
var promiseType = ZodPromise2.create;
var effectsType = ZodEffects.create;
var optionalType = ZodOptional2.create;
var nullableType = ZodNullable2.create;
var preprocessType = ZodEffects.createWithPreprocess;
var pipelineType = ZodPipeline.create;
var ostring = () => stringType().optional();
var onumber = () => numberType().optional();
var oboolean = () => booleanType().optional();
var coerce = {
  string: (arg) => ZodString2.create({ ...arg, coerce: true }),
  number: (arg) => ZodNumber2.create({ ...arg, coerce: true }),
  boolean: (arg) => ZodBoolean2.create({
    ...arg,
    coerce: true
  }),
  bigint: (arg) => ZodBigInt2.create({ ...arg, coerce: true }),
  date: (arg) => ZodDate2.create({ ...arg, coerce: true })
};
var NEVER2 = INVALID;
// ../../node_modules/.pnpm/@scalar+types@0.1.7/node_modules/@scalar/types/dist/api-reference/api-reference-plugin.js
var OpenApiExtensionSchema = exports_external2.object({
  name: exports_external2.string().regex(/^x-/),
  component: exports_external2.unknown()
});
var ApiReferencePluginSchema = exports_external2.function().returns(exports_external2.object({
  name: exports_external2.string(),
  extensions: exports_external2.array(OpenApiExtensionSchema)
}));

// ../../node_modules/.pnpm/@scalar+types@0.1.7/node_modules/@scalar/types/dist/api-reference/helpers/migrate-theme-variables.js
var PREFIX_MIGRATIONS = [
  ["--theme-", "--scalar-"],
  ["--sidebar-", "--scalar-sidebar-"]
];
var LEGACY_PREFIXES = PREFIX_MIGRATIONS.map(([legacy2]) => legacy2);
function migrateThemeVariables(styles2) {
  const hasLegacyPrefixes = LEGACY_PREFIXES.some((p3) => styles2.includes(p3));
  if (!hasLegacyPrefixes) {
    return styles2;
  }
  console.warn(`DEPRECATION WARNING: It looks like you're using legacy CSS variables in your custom CSS string. Please migrate them to use the updated prefixes. See https://github.com/scalar/scalar/blob/main/documentation/themes.md#theme-prefix-changes`);
  return PREFIX_MIGRATIONS.reduce((s3, [o3, n3]) => s3.replaceAll(o3, n3), styles2);
}

// ../../node_modules/.pnpm/@scalar+types@0.1.7/node_modules/@scalar/types/dist/api-reference/api-reference-configuration.js
var themeIdEnum = exports_external2.enum([
  "alternate",
  "default",
  "moon",
  "purple",
  "solarized",
  "bluePlanet",
  "deepSpace",
  "saturn",
  "kepler",
  "elysiajs",
  "fastify",
  "mars",
  "none"
]);
var searchHotKeyEnum = exports_external2.enum([
  "a",
  "b",
  "c",
  "d",
  "e",
  "f",
  "g",
  "h",
  "i",
  "j",
  "k",
  "l",
  "m",
  "n",
  "o",
  "p",
  "q",
  "r",
  "s",
  "t",
  "u",
  "v",
  "w",
  "x",
  "y",
  "z"
]);
var integrationEnum = exports_external2.enum([
  "adonisjs",
  "docusaurus",
  "dotnet",
  "elysiajs",
  "express",
  "fastapi",
  "fastify",
  "go",
  "hono",
  "html",
  "laravel",
  "litestar",
  "nestjs",
  "nextjs",
  "nitro",
  "nuxt",
  "platformatic",
  "react",
  "rust",
  "vue"
]).nullable();
var specConfigurationSchema = exports_external2.object({
  url: exports_external2.string().optional(),
  content: exports_external2.union([exports_external2.string(), exports_external2.record(exports_external2.any()), exports_external2.function().returns(exports_external2.record(exports_external2.any())), exports_external2.null()]).optional(),
  title: exports_external2.string().optional(),
  slug: exports_external2.string().optional()
});
var pathRoutingSchema = exports_external2.object({
  basePath: exports_external2.string()
});
var apiClientConfigurationSchema = exports_external2.object({
  url: exports_external2.string().optional(),
  content: exports_external2.union([exports_external2.string(), exports_external2.record(exports_external2.any()), exports_external2.function().returns(exports_external2.record(exports_external2.any())), exports_external2.null()]).optional(),
  title: exports_external2.string().optional(),
  slug: exports_external2.string().optional(),
  spec: specConfigurationSchema.optional(),
  authentication: exports_external2.any().optional(),
  baseServerURL: exports_external2.string().optional(),
  hideClientButton: exports_external2.boolean().optional().default(false).catch(false),
  proxyUrl: exports_external2.string().optional(),
  searchHotKey: searchHotKeyEnum.optional(),
  servers: exports_external2.array(exports_external2.any()).optional(),
  showSidebar: exports_external2.boolean().optional().default(true).catch(true),
  theme: themeIdEnum.optional().default("default").catch("default"),
  _integration: integrationEnum.optional(),
  onRequestSent: exports_external2.function().args(exports_external2.string()).returns(exports_external2.void()).optional()
});
var OLD_PROXY_URL = "https://api.scalar.com/request-proxy";
var NEW_PROXY_URL = "https://proxy.scalar.com";
var _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(exports_external2.object({
  layout: exports_external2.enum(["modern", "classic"]).optional().default("modern").catch("modern"),
  proxy: exports_external2.string().optional(),
  plugins: exports_external2.array(ApiReferencePluginSchema).optional(),
  isEditable: exports_external2.boolean().optional().default(false).catch(false),
  isLoading: exports_external2.boolean().optional().default(false).catch(false),
  hideModels: exports_external2.boolean().optional().default(false).catch(false),
  hideDownloadButton: exports_external2.boolean().optional().default(false).catch(false),
  hideTestRequestButton: exports_external2.boolean().optional().default(false).catch(false),
  hideSearch: exports_external2.boolean().optional().default(false).catch(false),
  darkMode: exports_external2.boolean().optional(),
  forceDarkModeState: exports_external2.enum(["dark", "light"]).optional(),
  hideDarkModeToggle: exports_external2.boolean().optional().default(false).catch(false),
  metaData: exports_external2.any().optional(),
  favicon: exports_external2.string().optional(),
  hiddenClients: exports_external2.union([exports_external2.record(exports_external2.union([exports_external2.boolean(), exports_external2.array(exports_external2.string())])), exports_external2.array(exports_external2.string()), exports_external2.literal(true)]).optional(),
  defaultHttpClient: exports_external2.object({
    targetKey: exports_external2.custom(),
    clientKey: exports_external2.string()
  }).optional(),
  customCss: exports_external2.string().optional(),
  onSpecUpdate: exports_external2.function().args(exports_external2.string()).returns(exports_external2.void()).optional(),
  onServerChange: exports_external2.function().args(exports_external2.string()).returns(exports_external2.void()).optional(),
  onDocumentSelect: exports_external2.function().returns(exports_external2.void().or(exports_external2.void().promise())).optional(),
  onLoaded: exports_external2.function().returns(exports_external2.void().or(exports_external2.void().promise())).optional(),
  onShowMore: exports_external2.function().args(exports_external2.string()).returns(exports_external2.void().or(exports_external2.void().promise())).optional(),
  onSidebarClick: exports_external2.function().args(exports_external2.string()).returns(exports_external2.void().or(exports_external2.void().promise())).optional(),
  pathRouting: pathRoutingSchema.optional(),
  generateHeadingSlug: exports_external2.function().args(exports_external2.object({
    slug: exports_external2.string().default("headingSlug")
  })).returns(exports_external2.string()).optional(),
  generateModelSlug: exports_external2.function().args(exports_external2.object({
    name: exports_external2.string().default("modelName")
  })).returns(exports_external2.string()).optional(),
  generateTagSlug: exports_external2.function().args(exports_external2.object({
    name: exports_external2.string().default("tagName")
  })).returns(exports_external2.string()).optional(),
  generateOperationSlug: exports_external2.function().args(exports_external2.object({
    path: exports_external2.string(),
    operationId: exports_external2.string().optional(),
    method: exports_external2.string(),
    summary: exports_external2.string().optional()
  })).returns(exports_external2.string()).optional(),
  generateWebhookSlug: exports_external2.function().args(exports_external2.object({
    name: exports_external2.string(),
    method: exports_external2.string().optional()
  })).returns(exports_external2.string()).optional(),
  redirect: exports_external2.function().args(exports_external2.string()).returns(exports_external2.string().nullable().optional()).optional(),
  withDefaultFonts: exports_external2.boolean().optional().default(true).catch(true),
  defaultOpenAllTags: exports_external2.boolean().optional(),
  tagsSorter: exports_external2.union([exports_external2.literal("alpha"), exports_external2.function().args(exports_external2.any(), exports_external2.any()).returns(exports_external2.number())]).optional(),
  operationsSorter: exports_external2.union([exports_external2.literal("alpha"), exports_external2.literal("method"), exports_external2.function().args(exports_external2.any(), exports_external2.any()).returns(exports_external2.number())]).optional()
}));
var migrateConfiguration = (_configuration) => {
  const configuration = { ..._configuration };
  if (configuration.spec?.url) {
    console.warn(`[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`);
    configuration.url = configuration.spec.url;
    delete configuration.spec;
  }
  if (configuration.spec?.content) {
    console.warn(`[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`);
    configuration.content = configuration.spec.content;
    delete configuration.spec;
  }
  if (configuration.customCss) {
    configuration.customCss = migrateThemeVariables(configuration.customCss);
  }
  if (configuration.proxy) {
    console.warn(`[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`);
    if (!configuration.proxyUrl) {
      configuration.proxyUrl = configuration.proxy;
    }
    delete configuration.proxy;
  }
  if (configuration.proxyUrl === OLD_PROXY_URL) {
    console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`);
    console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`);
    console.warn(`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`);
    configuration.proxyUrl = NEW_PROXY_URL;
  }
  return configuration;
};
var apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration);
// ../../node_modules/.pnpm/@scalar+types@0.1.7/node_modules/@scalar/types/dist/api-reference/html-rendering-configuration.js
var htmlRenderingConfigurationSchema = exports_external2.object({
  cdn: exports_external2.string().optional().default("https://cdn.jsdelivr.net/npm/@scalar/api-reference"),
  pageTitle: exports_external2.string().optional().default("Scalar API Reference")
});
// ../../node_modules/.pnpm/@scalar+themes@0.9.86/node_modules/@scalar/themes/dist/index.js
var m2 = {
  alternate: a2,
  default: r2,
  moon: a9,
  elysiajs: a5,
  fastify: a6,
  purple: a10,
  solarized: a12,
  bluePlanet: a3,
  deepSpace: a4,
  saturn: a11,
  kepler: a7,
  mars: a8
};
var K4 = Object.keys(m2);

// ../../node_modules/.pnpm/@elysiajs+swagger@1.3.1_elysia@1.4.29_@sinclair+typebox@0.34.45_exact-mirror@0.2.5_@sin_2e214d4e44baf66a296e0bae0c7b46b8/node_modules/@elysiajs/swagger/dist/index.mjs
function isSchemaObject(schema) {
  return "type" in schema || "properties" in schema || "items" in schema;
}
function isDateTimeProperty(key, schema) {
  return (key === "createdAt" || key === "updatedAt") && "anyOf" in schema && Array.isArray(schema.anyOf);
}
function transformDateProperties(schema) {
  if (!isSchemaObject(schema) || typeof schema !== "object" || schema === null) {
    return schema;
  }
  const newSchema = { ...schema };
  Object.entries(newSchema).forEach(([key, value]) => {
    if (isSchemaObject(value)) {
      if (isDateTimeProperty(key, value)) {
        const dateTimeFormat = value.anyOf?.find((item) => isSchemaObject(item) && item.format === "date-time");
        if (dateTimeFormat) {
          const dateTimeSchema = {
            type: "string",
            format: "date-time",
            default: dateTimeFormat.default
          };
          newSchema[key] = dateTimeSchema;
        }
      } else {
        newSchema[key] = transformDateProperties(value);
      }
    }
  });
  return newSchema;
}
var SwaggerUIRender = (info, version5, theme, stringifiedSwaggerOptions, autoDarkMode) => {
  const swaggerOptions = JSON.parse(stringifiedSwaggerOptions);
  if (swaggerOptions.components && swaggerOptions.components.schemas) {
    swaggerOptions.components.schemas = Object.fromEntries(Object.entries(swaggerOptions.components.schemas).map(([key, schema]) => [
      key,
      transformDateProperties(schema)
    ]));
  }
  const transformedStringifiedSwaggerOptions = JSON.stringify(swaggerOptions);
  return `<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>${info.title}</title>
    <meta
        name="description"
        content="${info.description}"
    />
    <meta
        name="og:description"
        content="${info.description}"
    />
    ${autoDarkMode && typeof theme === "string" ? `
    <style>
        @media (prefers-color-scheme: dark) {
            body {
                background-color: #222;
                color: #faf9a;
            }
            .swagger-ui {
                filter: invert(92%) hue-rotate(180deg);
            }

            .swagger-ui .microlight {
                filter: invert(100%) hue-rotate(180deg);
            }
        }
    </style>` : ""}
    ${typeof theme === "string" ? `<link rel="stylesheet" href="${theme}" />` : `<link rel="stylesheet" media="(prefers-color-scheme: light)" href="${theme.light}" />
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="${theme.dark}" />`}
</head>
<body>
    <div id="swagger-ui"></div>
    <script src="https://unpkg.com/swagger-ui-dist@${version5}/swagger-ui-bundle.js" crossorigin></script>
    <script>
        window.onload = () => {
            window.ui = SwaggerUIBundle(${transformedStringifiedSwaggerOptions});
        };
    </script>
</body>
</html>`;
};
var ScalarRender = (info, version5, config2, cdn) => `<!doctype html>
<html>
  <head>
    <title>${info.title}</title>
    <meta
        name="description"
        content="${info.description}"
    />
    <meta
        name="og:description"
        content="${info.description}"
    />
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1" />
    <style>
      body {
        margin: 0;
      }
    </style>
    <style>
      ${config2.customCss ?? a5}
    </style>
  </head>
  <body>
    <script
      id="api-reference"
      data-url="${config2.spec?.url}"
      data-configuration='${JSON.stringify(config2)}'
    >
    </script>
    <script src="${cdn ? cdn : `https://cdn.jsdelivr.net/npm/@scalar/api-reference@${version5}/dist/browser/standalone.min.js`}" crossorigin></script>
  </body>
</html>`;
var TransformKind2 = Symbol.for("TypeBox.Transform");
var ReadonlyKind2 = Symbol.for("TypeBox.Readonly");
var OptionalKind2 = Symbol.for("TypeBox.Optional");
var Hint3 = Symbol.for("TypeBox.Hint");
var Kind3 = Symbol.for("TypeBox.Kind");
var toOpenAPIPath = (path2) => path2.split("/").map((x4) => {
  if (x4.startsWith(":")) {
    x4 = x4.slice(1, x4.length);
    if (x4.endsWith("?"))
      x4 = x4.slice(0, -1);
    x4 = `{${x4}}`;
  }
  return x4;
}).join("/");
var mapProperties = (name3, schema, models) => {
  if (schema === undefined)
    return [];
  if (typeof schema === "string")
    if (schema in models)
      schema = models[schema];
    else
      throw new Error(`Can't find model ${schema}`);
  return Object.entries(schema?.properties ?? []).map(([key, value]) => {
    const {
      type: valueType = undefined,
      description,
      examples,
      ...schemaKeywords
    } = value;
    return {
      description,
      examples,
      schema: { type: valueType, ...schemaKeywords },
      in: name3,
      name: key,
      required: schema.required?.includes(key) ?? false
    };
  });
};
var mapTypesResponse = (types7, schema) => {
  if (typeof schema === "object" && ["void", "undefined", "null"].includes(schema.type))
    return;
  const responses = {};
  for (const type2 of types7) {
    responses[type2] = {
      schema: typeof schema === "string" ? {
        $ref: `#/components/schemas/${schema}`
      } : ("$ref" in schema) && (Kind3 in schema) && schema[Kind3] === "Ref" ? {
        ...schema,
        $ref: `#/components/schemas/${schema.$ref}`
      } : replaceSchemaTypeFromManyOptions({ ...schema }, {
        from: t2.Ref(""),
        to: ({ $ref, ...options2 }) => {
          if (!$ref.startsWith("#/components/schemas/"))
            return t2.Ref(`#/components/schemas/${$ref}`, options2);
          return t2.Ref($ref, options2);
        }
      })
    };
  }
  return responses;
};
var capitalize = (word) => word.charAt(0).toUpperCase() + word.slice(1);
var generateOperationId = (method, paths) => {
  let operationId = method.toLowerCase();
  if (paths === "/")
    return operationId + "Index";
  for (const path2 of paths.split("/")) {
    if (path2.charCodeAt(0) === 123) {
      operationId += "By" + capitalize(path2.slice(1, -1));
    } else {
      operationId += capitalize(path2);
    }
  }
  return operationId;
};
var cloneHook = (hook) => {
  if (!hook)
    return;
  if (typeof hook === "string")
    return hook;
  if (Array.isArray(hook))
    return [...hook];
  return { ...hook };
};
var registerSchemaPath = ({
  schema,
  path: path2,
  method,
  hook,
  models
}) => {
  hook = cloneHook(hook);
  if (hook.parse && !Array.isArray(hook.parse))
    hook.parse = [hook.parse];
  let contentType = hook.parse?.map((x4) => {
    switch (typeof x4) {
      case "string":
        return x4;
      case "object":
        if (x4 && typeof x4?.fn !== "string")
          return;
        switch (x4?.fn) {
          case "json":
          case "application/json":
            return "application/json";
          case "text":
          case "text/plain":
            return "text/plain";
          case "urlencoded":
          case "application/x-www-form-urlencoded":
            return "application/x-www-form-urlencoded";
          case "arrayBuffer":
          case "application/octet-stream":
            return "application/octet-stream";
          case "formdata":
          case "multipart/form-data":
            return "multipart/form-data";
        }
    }
  }).filter((x4) => x4 !== undefined);
  if (!contentType || contentType.length === 0)
    contentType = ["application/json", "multipart/form-data", "text/plain"];
  path2 = toOpenAPIPath(path2);
  const contentTypes = typeof contentType === "string" ? [contentType] : contentType ?? ["application/json"];
  const bodySchema = cloneHook(hook?.body);
  const paramsSchema = cloneHook(hook?.params);
  const headerSchema = cloneHook(hook?.headers);
  const querySchema = cloneHook(hook?.query);
  let responseSchema = cloneHook(hook?.response);
  if (typeof responseSchema === "object") {
    if (Kind3 in responseSchema) {
      const {
        type: type2,
        properties: properties2,
        required: required2,
        additionalProperties,
        patternProperties,
        $ref,
        ...rest
      } = responseSchema;
      responseSchema = {
        "200": {
          ...rest,
          description: rest.description,
          content: mapTypesResponse(contentTypes, type2 === "object" || type2 === "array" ? {
            type: type2,
            properties: properties2,
            patternProperties,
            items: responseSchema.items,
            required: required2
          } : responseSchema)
        }
      };
    } else {
      Object.entries(responseSchema).forEach(([key, value]) => {
        if (typeof value === "string") {
          if (!models[value])
            return;
          const {
            type: type2,
            properties: properties2,
            required: required2,
            additionalProperties: _1,
            patternProperties: _22,
            ...rest
          } = models[value];
          responseSchema[key] = {
            ...rest,
            description: rest.description,
            content: mapTypesResponse(contentTypes, value)
          };
        } else {
          const {
            type: type2,
            properties: properties2,
            required: required2,
            additionalProperties,
            patternProperties,
            ...rest
          } = value;
          responseSchema[key] = {
            ...rest,
            description: rest.description,
            content: mapTypesResponse(contentTypes, type2 === "object" || type2 === "array" ? {
              type: type2,
              properties: properties2,
              patternProperties,
              items: value.items,
              required: required2
            } : value)
          };
        }
      });
    }
  } else if (typeof responseSchema === "string") {
    if (!(responseSchema in models))
      return;
    const {
      type: type2,
      properties: properties2,
      required: required2,
      $ref,
      additionalProperties: _1,
      patternProperties: _22,
      ...rest
    } = models[responseSchema];
    responseSchema = {
      "200": {
        ...rest,
        content: mapTypesResponse(contentTypes, responseSchema)
      }
    };
  }
  const parameters = [
    ...mapProperties("header", headerSchema, models),
    ...mapProperties("path", paramsSchema, models),
    ...mapProperties("query", querySchema, models)
  ];
  schema[path2] = {
    ...schema[path2] ? schema[path2] : {},
    [method.toLowerCase()]: {
      ...headerSchema || paramsSchema || querySchema || bodySchema ? { parameters } : {},
      ...responseSchema ? {
        responses: responseSchema
      } : {},
      operationId: hook?.detail?.operationId ?? generateOperationId(method, path2),
      ...hook?.detail,
      ...bodySchema ? {
        requestBody: {
          required: true,
          content: mapTypesResponse(contentTypes, typeof bodySchema === "string" ? {
            $ref: `#/components/schemas/${bodySchema}`
          } : bodySchema)
        }
      } : null
    }
  };
};
var filterPaths = (paths, {
  excludeStaticFile = true,
  exclude = []
}) => {
  const newPaths = {};
  for (const [key, value] of Object.entries(paths))
    if (!exclude.some((x4) => {
      if (typeof x4 === "string")
        return key === x4;
      return x4.test(key);
    }) && !key.includes("*") && (excludeStaticFile ? !key.includes(".") : true)) {
      Object.keys(value).forEach((method) => {
        const schema = value[method];
        if (key.includes("{")) {
          if (!schema.parameters)
            schema.parameters = [];
          schema.parameters = [
            ...key.split("/").filter((x4) => x4.startsWith("{") && !schema.parameters.find((params) => params.in === "path" && params.name === x4.slice(1, x4.length - 1))).map((x4) => ({
              schema: { type: "string" },
              in: "path",
              name: x4.slice(1, x4.length - 1),
              required: true
            })),
            ...schema.parameters
          ];
        }
        if (!schema.responses)
          schema.responses = {
            200: {}
          };
      });
      newPaths[key] = value;
    }
  return newPaths;
};
var swagger = ({
  provider = "scalar",
  scalarVersion = "latest",
  scalarCDN = "",
  scalarConfig = {},
  documentation = {},
  version: version5 = "5.9.0",
  excludeStaticFile = true,
  path: path2 = "/swagger",
  specPath = `${path2}/json`,
  exclude = [],
  swaggerOptions = {},
  theme = `https://unpkg.com/swagger-ui-dist@${version5}/swagger-ui.css`,
  autoDarkMode = true,
  excludeMethods = ["OPTIONS"],
  excludeTags = []
} = {}) => {
  const schema = {};
  let totalRoutes = 0;
  if (!version5)
    version5 = `https://unpkg.com/swagger-ui-dist@${version5}/swagger-ui.css`;
  const info = {
    title: "Elysia Documentation",
    description: "Development documentation",
    version: "0.0.0",
    ...documentation.info
  };
  const relativePath = specPath.startsWith("/") ? specPath.slice(1) : specPath;
  const app = new Elysia({ name: "@elysiajs/swagger" });
  const page = new Response(provider === "swagger-ui" ? SwaggerUIRender(info, version5, theme, JSON.stringify({
    url: relativePath,
    dom_id: "#swagger-ui",
    ...swaggerOptions
  }, (_6, value) => typeof value === "function" ? undefined : value), autoDarkMode) : ScalarRender(info, scalarVersion, {
    spec: {
      url: relativePath,
      ...scalarConfig.spec
    },
    ...scalarConfig,
    _integration: "elysiajs"
  }, scalarCDN), {
    headers: {
      "content-type": "text/html; charset=utf8"
    }
  });
  app.get(path2, page, {
    detail: {
      hide: true
    }
  }).get(specPath, function openAPISchema() {
    const routes = app.getGlobalRoutes();
    if (routes.length !== totalRoutes) {
      const ALLOWED_METHODS = [
        "GET",
        "PUT",
        "POST",
        "DELETE",
        "OPTIONS",
        "HEAD",
        "PATCH",
        "TRACE"
      ];
      totalRoutes = routes.length;
      routes.forEach((route) => {
        if (route.hooks?.detail?.hide === true)
          return;
        if (excludeMethods.includes(route.method))
          return;
        if (ALLOWED_METHODS.includes(route.method) === false && route.method !== "ALL")
          return;
        if (route.method === "ALL")
          ALLOWED_METHODS.forEach((method) => {
            registerSchemaPath({
              schema,
              hook: route.hooks,
              method,
              path: route.path,
              models: app.getGlobalDefinitions?.().type,
              contentType: route.hooks.type
            });
          });
        else
          registerSchemaPath({
            schema,
            hook: route.hooks,
            method: route.method,
            path: route.path,
            models: app.getGlobalDefinitions?.().type,
            contentType: route.hooks.type
          });
      });
    }
    return {
      openapi: "3.0.3",
      ...{
        ...documentation,
        tags: documentation.tags?.filter((tag3) => !excludeTags?.includes(tag3?.name)),
        info: {
          title: "Elysia Documentation",
          description: "Development documentation",
          version: "0.0.0",
          ...documentation.info
        }
      },
      paths: {
        ...filterPaths(schema, {
          excludeStaticFile,
          exclude: Array.isArray(exclude) ? exclude : [exclude]
        }),
        ...documentation.paths
      },
      components: {
        ...documentation.components,
        schemas: {
          ...app.getGlobalDefinitions?.().type,
          ...documentation.components?.schemas
        }
      }
    };
  }, {
    detail: {
      hide: true
    }
  });
  return app;
};

// src/middleware/auth.ts
import { createHash as createHash2 } from "node:crypto";

// src/(ee)/lib/license.ts
import { createPublicKey, verify as verify2 } from "node:crypto";
var PROD_PUBLIC_KEY_PEM = `-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEATgLTGM1FH6spW9Ayl9Srb1dDHk7KlVX9NBTQQw+4vjQ=
-----END PUBLIC KEY-----
`;
var VALID_TIERS = ["starter", "growth", "scale"];
function getPublicKey() {
  return createPublicKey(process.env.WRAPS_LICENSE_PUBLIC_KEY_PEM ?? PROD_PUBLIC_KEY_PEM);
}
function validateLicenseKey(key) {
  if (!key) {
    return { valid: false, tier: null };
  }
  const parts = key.split(".");
  if (parts.length !== 4 || parts[0] !== "v1") {
    return { valid: false, tier: null };
  }
  const [, tier, expires, sigHex] = parts;
  if (!VALID_TIERS.includes(tier)) {
    return { valid: false, tier: null };
  }
  const expiryDate = new Date(expires);
  if (Number.isNaN(expiryDate.getTime())) {
    return { valid: false, tier: null };
  }
  const today = new Date().toISOString().slice(0, 10);
  if (expires < today) {
    return { valid: false, tier: null };
  }
  if (sigHex.length !== 128) {
    return { valid: false, tier: null };
  }
  try {
    const payload = Buffer.from(`v1.${tier}.${expires}`);
    const sig = Buffer.from(sigHex, "hex");
    if (!verify2(null, payload, getPublicKey(), sig)) {
      return { valid: false, tier: null };
    }
  } catch {
    return { valid: false, tier: null };
  }
  return { valid: true, tier };
}
function isSelfHosted() {
  return validateLicenseKey(process.env.WRAPS_LICENSE_KEY).valid;
}

// src/middleware/auth.ts
function getAuth(ctx) {
  const auth = ctx.auth;
  if (!auth) {
    throw new Error("getAuth() called on an unauthenticated context — use createAuthenticatedRoutes() or getAuthOptional()");
  }
  return auth;
}
function getAuthOptional(ctx) {
  return ctx.auth ?? null;
}
function hashApiKey(key) {
  return createHash2("sha256").update(key).digest("hex");
}
function extractPlan(sub) {
  if (sub.subStatus && (sub.subStatus === "active" || sub.subStatus === "trialing")) {
    return sub.plan;
  }
  return null;
}
async function validateApiKey(key) {
  if (!key.startsWith("wraps_")) {
    return null;
  }
  const keyHash = hashApiKey(key);
  const [result] = await db.select({
    id: apiKey.id,
    organizationId: apiKey.organizationId,
    createdBy: apiKey.createdBy,
    expiresAt: apiKey.expiresAt,
    plan: subscription.plan,
    subStatus: subscription.status
  }).from(apiKey).leftJoin(subscription, and(eq(subscription.referenceId, apiKey.organizationId), inArray(subscription.status, ["active", "trialing"]))).where(eq(apiKey.keyHash, keyHash)).limit(1);
  if (!result) {
    return null;
  }
  if (result.expiresAt && result.expiresAt < new Date) {
    return null;
  }
  await db.update(apiKey).set({ lastUsedAt: new Date }).where(eq(apiKey.id, result.id));
  const licenseOverride = validateLicenseKey(process.env.WRAPS_LICENSE_KEY);
  return {
    apiKeyId: result.id,
    organizationId: result.organizationId,
    userId: result.createdBy,
    planId: licenseOverride.valid ? licenseOverride.tier : extractPlan(result)
  };
}
async function validateSessionWithReason(sessionToken, organizationId) {
  try {
    const [result] = await db.select({
      sessionId: session.id,
      userId: session.userId,
      expiresAt: session.expiresAt,
      activeOrganizationId: session.activeOrganizationId,
      memberRole: member.role,
      plan: subscription.plan,
      subStatus: subscription.status
    }).from(session).leftJoin(member, and(eq(member.userId, session.userId), organizationId ? eq(member.organizationId, sql`${organizationId}`) : eq(member.organizationId, session.activeOrganizationId))).leftJoin(subscription, and(eq(subscription.referenceId, organizationId ? sql`${organizationId}` : session.activeOrganizationId), inArray(subscription.status, ["active", "trialing"]))).where(eq(session.token, sessionToken)).limit(1);
    if (!result) {
      return { auth: null, reason: "session not found" };
    }
    if (result.expiresAt < new Date) {
      return { auth: null, reason: "session expired" };
    }
    const orgId = organizationId || result.activeOrganizationId;
    if (!orgId) {
      return { auth: null, reason: "no org id" };
    }
    if (!result.memberRole) {
      return { auth: null, reason: "user not member of org" };
    }
    const licenseOverride = validateLicenseKey(process.env.WRAPS_LICENSE_KEY);
    return {
      auth: {
        apiKeyId: null,
        organizationId: orgId,
        userId: result.userId,
        planId: licenseOverride.valid ? licenseOverride.tier : extractPlan(result)
      },
      reason: "ok"
    };
  } catch (error49) {
    log3.error("Session validation failed", error49);
    return {
      auth: null,
      reason: `error: ${error49 instanceof Error ? error49.message : String(error49)}`
    };
  }
}
async function authenticate(request2) {
  const authHeader = request2.headers.get("authorization");
  const orgId = request2.headers.get("x-organization-id") ?? undefined;
  if (!authHeader) {
    return { error: "Unauthorized" };
  }
  const token2 = authHeader.startsWith("Bearer ") ? authHeader.slice(7) : authHeader;
  if (token2.startsWith("wraps_")) {
    const authContext = await validateApiKey(token2);
    if (authContext) {
      return { auth: authContext };
    }
    return { error: "Unauthorized" };
  }
  const result = await validateSessionWithReason(token2, orgId);
  if (result.auth) {
    return { auth: result.auth };
  }
  log3.warn("Session auth failed", { reason: result.reason });
  return { error: "Unauthorized" };
}
function createAuthenticatedRoutes(prefix) {
  return new Elysia({ prefix }).derive(async (ctx) => {
    const existingAuth = getAuthOptional(ctx);
    if (existingAuth) {
      return { auth: existingAuth, authError: null };
    }
    const result = await authenticate(ctx.request);
    if ("error" in result) {
      return { auth: null, authError: result.error };
    }
    return { auth: result.auth, authError: null };
  }).onBeforeHandle(({ auth, authError, set: set2 }) => {
    if (authError || !auth) {
      set2.status = 401;
      return { error: authError || "Unauthorized" };
    }
  });
}
var authMiddleware = new Elysia({ name: "auth" }).derive(async ({ request: request2 }) => {
  try {
    const result = await authenticate(request2);
    if ("error" in result) {
      return { auth: null, authError: result.error };
    }
    return {
      auth: result.auth,
      authError: null
    };
  } catch (error49) {
    log3.error("Auth middleware exception", error49);
    return {
      auth: null,
      authError: "Internal auth error"
    };
  }
}).onBeforeHandle(({ auth, authError, set: set2 }) => {
  if (authError || !auth) {
    set2.status = 401;
    return { error: authError || "Unauthorized" };
  }
});

// src/(ee)/routes/workflow-schedules.ts
async function verifyWorkflowOwnership(workflowId, organizationId) {
  const [wf] = await db.select({ id: workflow.id }).from(workflow).where(and(eq(workflow.id, workflowId), eq(workflow.organizationId, organizationId))).limit(1);
  return !!wf;
}
var workflowScheduleRoutes = createAuthenticatedRoutes("/v1/workflow-schedules").post("/:workflowId/enable", async (ctx) => {
  const { params, body: body2, set: set2 } = ctx;
  const auth = getAuth(ctx);
  const isOwner = await verifyWorkflowOwnership(params.workflowId, auth.organizationId);
  if (!isOwner) {
    set2.status = 404;
    return { success: false, error: "Workflow not found" };
  }
  try {
    const scheduleName = await createNextWorkflowSchedule({
      workflowId: params.workflowId,
      organizationId: auth.organizationId,
      cronExpression: body2.cronExpression,
      timezone: body2.timezone
    });
    return { success: true, scheduleName };
  } catch (error49) {
    log3.error("Failed to enable workflow schedule", error49, {
      workflowId: params.workflowId,
      organizationId: auth.organizationId
    });
    set2.status = 500;
    return {
      success: false,
      error: error49 instanceof Error ? error49.message : "Failed to create schedule"
    };
  }
}, {
  params: t2.Object({
    workflowId: t2.String()
  }),
  body: t2.Object({
    cronExpression: t2.String(),
    timezone: t2.Optional(t2.String())
  })
}).post("/:workflowId/disable", async (ctx) => {
  const { params, set: set2 } = ctx;
  const auth = getAuth(ctx);
  const isOwner = await verifyWorkflowOwnership(params.workflowId, auth.organizationId);
  if (!isOwner) {
    set2.status = 404;
    return { success: false, error: "Workflow not found" };
  }
  try {
    await deleteWorkflowSchedule(params.workflowId);
    return { success: true };
  } catch (error49) {
    log3.error("Failed to disable workflow schedule", error49, {
      workflowId: params.workflowId,
      organizationId: auth.organizationId
    });
    set2.status = 500;
    return {
      success: false,
      error: error49 instanceof Error ? error49.message : "Failed to delete schedule"
    };
  }
}, {
  params: t2.Object({
    workflowId: t2.String()
  })
}).put("/:workflowId", async (ctx) => {
  const { params, body: body2, set: set2 } = ctx;
  const auth = getAuth(ctx);
  const isOwner = await verifyWorkflowOwnership(params.workflowId, auth.organizationId);
  if (!isOwner) {
    set2.status = 404;
    return { success: false, error: "Workflow not found" };
  }
  try {
    const scheduleName = await updateWorkflowSchedule({
      workflowId: params.workflowId,
      organizationId: auth.organizationId,
      cronExpression: body2.cronExpression,
      timezone: body2.timezone
    });
    return { success: true, scheduleName };
  } catch (error49) {
    log3.error("Failed to update workflow schedule", error49, {
      workflowId: params.workflowId,
      organizationId: auth.organizationId
    });
    set2.status = 500;
    return {
      success: false,
      error: error49 instanceof Error ? error49.message : "Failed to update schedule"
    };
  }
}, {
  params: t2.Object({
    workflowId: t2.String()
  }),
  body: t2.Object({
    cronExpression: t2.String(),
    timezone: t2.Optional(t2.String())
  })
});

// src/middleware/rate-limit.ts
var import_client_dynamodb = __toESM(require_dist_cjs66(), 1);
var PLAN_LIMITS = {
  free: { daily: 1000, minute: 50 },
  starter: { daily: 50000, minute: 500 },
  growth: { daily: 200000, minute: 2000 },
  scale: { daily: 500000, minute: 5000 }
};
var dynamoClient = new import_client_dynamodb.DynamoDBClient(awsDefaults);
var TABLE_NAME = process.env.RATE_LIMIT_TABLE_NAME ?? "RateLimitTable";
var rateLimitMiddleware = new Elysia({ name: "rate-limit" }).derive(async (ctx) => {
  const authContext = getAuthOptional(ctx);
  if (!authContext) {
    return {};
  }
  if (isSelfHosted()) {
    return {};
  }
  const { set: set2 } = ctx;
  const { organizationId, planId } = authContext;
  const limits = PLAN_LIMITS[planId] ?? PLAN_LIMITS.free;
  const now = new Date;
  const minuteKey = formatMinuteKey(now);
  const dailyKey = formatDailyKey(now);
  try {
    const minuteResult = await incrementCounter(organizationId, `minute:${minuteKey}`, 60);
    if (minuteResult > limits.minute) {
      set2.status = 429;
      set2.headers["Retry-After"] = "60";
      set2.headers["X-RateLimit-Limit"] = String(limits.minute);
      set2.headers["X-RateLimit-Remaining"] = "0";
      throw new Error(`Rate limit exceeded: ${limits.minute} requests per minute`);
    }
    const dailyResult = await incrementCounter(organizationId, `daily:${dailyKey}`, 86400);
    if (dailyResult > limits.daily) {
      set2.status = 429;
      set2.headers["X-RateLimit-Limit"] = String(limits.daily);
      set2.headers["X-RateLimit-Remaining"] = "0";
      throw new Error(`Daily limit exceeded: ${limits.daily} requests per day`);
    }
    set2.headers["X-RateLimit-Limit"] = String(limits.minute);
    set2.headers["X-RateLimit-Remaining"] = String(Math.max(0, limits.minute - minuteResult));
  } catch (error49) {
    if (error49 instanceof Error && (error49.message.includes("Rate limit exceeded") || error49.message.includes("Daily limit exceeded"))) {
      throw error49;
    }
    log3.error("Rate limiter failing open", error49, {
      organizationId,
      planId
    });
  }
  return {};
});
async function incrementCounter(orgId, sk, ttlSeconds) {
  const expiresAt = Math.floor(Date.now() / 1000) + ttlSeconds;
  const result = await dynamoClient.send(new import_client_dynamodb.UpdateItemCommand({
    TableName: TABLE_NAME,
    Key: {
      pk: { S: `org:${orgId}` },
      sk: { S: sk }
    },
    UpdateExpression: "SET #count = if_not_exists(#count, :zero) + :inc, #exp = :exp",
    ExpressionAttributeNames: {
      "#count": "count",
      "#exp": "expiresAt"
    },
    ExpressionAttributeValues: {
      ":inc": { N: "1" },
      ":zero": { N: "0" },
      ":exp": { N: String(expiresAt) }
    },
    ReturnValues: "UPDATED_NEW"
  }));
  return Number(result.Attributes?.count?.N ?? 1);
}
function formatMinuteKey(date7) {
  return date7.toISOString().slice(0, 16).replace("T", "-").replace(":", "-");
}
function formatDailyKey(date7) {
  return date7.toISOString().slice(0, 10);
}

// src/(ee)/services/workflow-cancel.ts
var CANCELLABLE_STATUSES = new Set([
  "pending",
  "active",
  "paused",
  "waiting"
]);
async function cancelWorkflowExecution(params) {
  const { executionId, organizationId } = params;
  const [exec] = await db.select().from(workflowExecution).where(and(eq(workflowExecution.id, executionId), eq(workflowExecution.organizationId, organizationId))).limit(1);
  if (!exec) {
    return { success: false, error: "Execution not found" };
  }
  if (!CANCELLABLE_STATUSES.has(exec.status)) {
    return {
      success: false,
      error: `Execution in "${exec.status}" status cannot be cancelled`
    };
  }
  const cleanups = [];
  if (exec.delaySchedulerName) {
    cleanups.push(deleteScheduledStep(exec.delaySchedulerName).catch((err) => {
      log3.error("Failed to delete delay scheduler during cancel", err, {
        schedulerName: exec.delaySchedulerName
      });
    }));
  }
  if (exec.waitTimeoutSchedulerName) {
    cleanups.push(deleteScheduledStep(exec.waitTimeoutSchedulerName).catch((err) => {
      log3.error("Failed to delete timeout scheduler during cancel", err, {
        schedulerName: exec.waitTimeoutSchedulerName
      });
    }));
  }
  await Promise.all(cleanups);
  const claimed = await db.transaction(async (tx) => {
    const [updated] = await tx.update(workflowExecution).set({
      status: "cancelled",
      completedAt: new Date,
      updatedAt: new Date
    }).where(and(eq(workflowExecution.id, executionId), sql`${workflowExecution.status} IN ('pending', 'active', 'paused', 'waiting')`)).returning({ id: workflowExecution.id });
    if (!updated) {
      return false;
    }
    await tx.update(workflow).set({
      activeExecutions: sql`GREATEST(0, ${workflow.activeExecutions} - 1)`
    }).where(eq(workflow.id, exec.workflowId));
    return true;
  });
  if (!claimed) {
    return {
      success: false,
      error: "Execution was already cancelled or is no longer active"
    };
  }
  log3.info("Workflow execution cancelled", {
    executionId: exec.id,
    workflowId: exec.workflowId,
    previousStatus: exec.status
  });
  return { success: true };
}

// src/(ee)/routes/workflows.ts
var _errorResponse = t2.Object({
  success: t2.Literal(false),
  error: t2.String({ description: "Error message" })
});
var dataSchema = t2.Optional(t2.Object({}, { additionalProperties: true, description: "Data to pass to the workflow" }));
var workflowsRoutes = createAuthenticatedRoutes("/v1/workflows").use(rateLimitMiddleware).post("/:workflowId/trigger", async (ctx) => {
  const { params, body: body2 } = ctx;
  const auth = getAuth(ctx);
  const { workflowId } = params;
  const { contactId, contactEmail, data } = body2;
  const [wf] = await db.select().from(workflow).where(and(eq(workflow.id, workflowId), eq(workflow.organizationId, auth.organizationId))).limit(1);
  if (!wf) {
    return {
      success: false,
      error: "Workflow not found"
    };
  }
  if (wf.status !== "enabled") {
    return {
      success: false,
      error: "Workflow is not enabled"
    };
  }
  if (wf.triggerType !== "api") {
    return {
      success: false,
      error: `Workflow has trigger type "${wf.triggerType}", expected "api"`
    };
  }
  let contactRecord;
  if (contactId) {
    const [c3] = await db.select().from(contact).where(and(eq(contact.id, contactId), eq(contact.organizationId, auth.organizationId))).limit(1);
    contactRecord = c3;
  } else if (contactEmail) {
    const [c3] = await db.select().from(contact).where(and(eq(contact.email, contactEmail), eq(contact.organizationId, auth.organizationId))).limit(1);
    contactRecord = c3;
  }
  if (!contactRecord) {
    return {
      success: false,
      error: "Contact not found"
    };
  }
  await enqueueWorkflowStep({
    type: "trigger",
    workflowId: wf.id,
    contactId: contactRecord.id,
    organizationId: auth.organizationId,
    eventData: data || {}
  });
  log3.info("Workflow API trigger", {
    workflowId: wf.id,
    contactId: contactRecord.id
  });
  return {
    success: true,
    message: "Workflow triggered successfully",
    workflowId: wf.id,
    workflowName: wf.name,
    contactId: contactRecord.id
  };
}, {
  params: t2.Object({
    workflowId: t2.String({
      description: "Workflow ID to trigger",
      maxLength: 36
    })
  }),
  body: t2.Object({
    contactId: t2.Optional(t2.String({ description: "Contact ID", maxLength: 36 })),
    contactEmail: t2.Optional(t2.String({
      description: "Contact email (alternative to contactId)",
      maxLength: 255
    })),
    data: dataSchema
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      message: t2.Optional(t2.String()),
      workflowId: t2.Optional(t2.String()),
      workflowName: t2.Optional(t2.String()),
      contactId: t2.Optional(t2.String()),
      error: t2.Optional(t2.String())
    })
  },
  detail: {
    summary: "Trigger workflow",
    description: "Trigger a specific workflow for a contact. The workflow must have triggerType 'api' and be enabled.",
    tags: ["workflows"]
  }
}).post("/:workflowId/trigger/batch", async (ctx) => {
  const { params, body: body2 } = ctx;
  const auth = getAuth(ctx);
  const { workflowId } = params;
  const { contacts, data } = body2;
  const [wf] = await db.select().from(workflow).where(and(eq(workflow.id, workflowId), eq(workflow.organizationId, auth.organizationId))).limit(1);
  if (!wf) {
    return {
      success: false,
      error: "Workflow not found"
    };
  }
  if (wf.status !== "enabled") {
    return {
      success: false,
      error: "Workflow is not enabled"
    };
  }
  if (wf.triggerType !== "api") {
    return {
      success: false,
      error: `Workflow has trigger type "${wf.triggerType}", expected "api"`
    };
  }
  const results = {
    triggered: 0,
    errors: []
  };
  const contactIds = contacts.filter((c3) => c3.contactId).map((c3) => c3.contactId);
  const contactEmails = contacts.filter((c3) => c3.contactEmail && !c3.contactId).map((c3) => c3.contactEmail);
  const contactsById = new Map;
  if (contactIds.length > 0) {
    const foundById = await db.select().from(contact).where(and(inArray(contact.id, contactIds), eq(contact.organizationId, auth.organizationId)));
    for (const c3 of foundById) {
      contactsById.set(c3.id, c3);
    }
  }
  const contactsByEmail = new Map;
  if (contactEmails.length > 0) {
    const foundByEmail = await db.select().from(contact).where(and(inArray(contact.email, contactEmails), eq(contact.organizationId, auth.organizationId)));
    for (const c3 of foundByEmail) {
      if (c3.email) {
        contactsByEmail.set(c3.email, c3);
      }
    }
  }
  const jobs = [];
  const seenContactIds = new Set;
  for (const c3 of contacts) {
    let contactRecord;
    if (c3.contactId) {
      contactRecord = contactsById.get(c3.contactId);
    } else if (c3.contactEmail) {
      contactRecord = contactsByEmail.get(c3.contactEmail);
    }
    if (!contactRecord) {
      results.errors.push(`Contact not found: ${c3.contactId || c3.contactEmail}`);
      continue;
    }
    if (seenContactIds.has(contactRecord.id)) {
      continue;
    }
    seenContactIds.add(contactRecord.id);
    jobs.push({
      type: "trigger",
      workflowId: wf.id,
      contactId: contactRecord.id,
      organizationId: auth.organizationId,
      eventData: { ...data || {}, ...c3.data || {} }
    });
    results.triggered++;
  }
  await enqueueWorkflowStepBatch(jobs);
  log3.info("Workflow API batch trigger", {
    workflowId: wf.id,
    triggered: results.triggered
  });
  return {
    success: results.errors.length === 0,
    workflowId: wf.id,
    workflowName: wf.name,
    ...results
  };
}, {
  params: t2.Object({
    workflowId: t2.String({
      description: "Workflow ID to trigger",
      maxLength: 36
    })
  }),
  body: t2.Object({
    contacts: t2.Array(t2.Object({
      contactId: t2.Optional(t2.String({ maxLength: 36 })),
      contactEmail: t2.Optional(t2.String({ maxLength: 255 })),
      data: t2.Optional(t2.Object({}, { additionalProperties: true }))
    }), {
      description: "List of contacts to trigger the workflow for",
      maxItems: 1000
    }),
    data: t2.Optional(t2.Object({}, {
      additionalProperties: true,
      description: "Common data to pass to all workflow triggers"
    }))
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      workflowId: t2.Optional(t2.String()),
      workflowName: t2.Optional(t2.String()),
      triggered: t2.Optional(t2.Number({ description: "Number of contacts triggered" })),
      errors: t2.Optional(t2.Array(t2.String(), { description: "Error messages if any" })),
      error: t2.Optional(t2.String())
    })
  },
  detail: {
    summary: "Batch trigger workflow",
    description: "Trigger a workflow for multiple contacts at once. Each contact can have its own data that gets merged with common data.",
    tags: ["workflows"]
  }
}).post("/executions/:executionId/retry", async (ctx) => {
  const { params } = ctx;
  const auth = getAuth(ctx);
  const { executionId } = params;
  const [exec] = await db.select().from(workflowExecution).where(and(eq(workflowExecution.id, executionId), eq(workflowExecution.organizationId, auth.organizationId))).limit(1);
  if (!exec) {
    return { success: false, error: "Execution not found" };
  }
  if (exec.status !== "failed") {
    return {
      success: false,
      error: "Only failed executions can be retried"
    };
  }
  if (!exec.errorStepId) {
    return { success: false, error: "No error step to retry from" };
  }
  if ((exec.retryCount ?? 0) >= MAX_WORKFLOW_RETRIES) {
    return {
      success: false,
      error: `Max retries reached (${MAX_WORKFLOW_RETRIES}). Fix the underlying issue before retrying.`
    };
  }
  const errorStepId = exec.errorStepId;
  const claimed = await db.transaction(async (tx) => {
    const [updated] = await tx.update(workflowExecution).set({
      status: "active",
      currentStepId: errorStepId,
      error: null,
      errorStepId: null,
      completedAt: null,
      retryCount: sql`${workflowExecution.retryCount} + 1`,
      updatedAt: new Date
    }).where(and(eq(workflowExecution.id, executionId), eq(workflowExecution.status, "failed"))).returning({ id: workflowExecution.id });
    if (!updated) {
      return false;
    }
    await tx.update(workflow).set({
      activeExecutions: sql`${workflow.activeExecutions} + 1`,
      failedExecutions: sql`GREATEST(0, ${workflow.failedExecutions} - 1)`
    }).where(eq(workflow.id, exec.workflowId));
    return true;
  });
  if (!claimed) {
    return {
      success: false,
      error: "Execution is no longer in failed state"
    };
  }
  try {
    await enqueueWorkflowStep({
      type: "execute",
      executionId: exec.id,
      stepId: errorStepId,
      organizationId: auth.organizationId
    });
  } catch (error49) {
    await db.transaction(async (tx) => {
      const [rolledBack] = await tx.update(workflowExecution).set({
        status: "failed",
        error: exec.error ?? "Retry enqueue failed",
        errorStepId,
        completedAt: new Date,
        retryCount: sql`GREATEST(0, ${workflowExecution.retryCount} - 1)`,
        updatedAt: new Date
      }).where(and(eq(workflowExecution.id, executionId), eq(workflowExecution.organizationId, auth.organizationId), eq(workflowExecution.status, "active"), eq(workflowExecution.currentStepId, errorStepId), sql`${workflowExecution.errorStepId} IS NULL`)).returning({ id: workflowExecution.id });
      if (!rolledBack) {
        return;
      }
      await tx.update(workflow).set({
        activeExecutions: sql`GREATEST(0, ${workflow.activeExecutions} - 1)`,
        failedExecutions: sql`${workflow.failedExecutions} + 1`
      }).where(eq(workflow.id, exec.workflowId));
    });
    log3.error("Workflow execution retry enqueue failed", error49, {
      executionId: exec.id,
      stepId: errorStepId,
      workflowId: exec.workflowId
    });
    return {
      success: false,
      error: "Failed to enqueue execution retry"
    };
  }
  log3.info("Workflow execution retry", {
    executionId: exec.id,
    stepId: errorStepId,
    workflowId: exec.workflowId
  });
  return { success: true, message: "Execution retry started" };
}, {
  params: t2.Object({
    executionId: t2.String({
      description: "Execution ID to retry",
      maxLength: 36
    })
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      message: t2.Optional(t2.String()),
      error: t2.Optional(t2.String())
    })
  },
  detail: {
    summary: "Retry failed execution",
    description: "Retry a failed workflow execution from the step where it failed. Completed steps are preserved.",
    tags: ["workflows"]
  }
}).post("/executions/:executionId/cancel", async (ctx) => {
  const { params } = ctx;
  const auth = getAuth(ctx);
  return cancelWorkflowExecution({
    executionId: params.executionId,
    organizationId: auth.organizationId
  });
}, {
  params: t2.Object({
    executionId: t2.String({
      description: "Execution ID to cancel",
      maxLength: 36
    })
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      error: t2.Optional(t2.String())
    })
  },
  detail: {
    summary: "Cancel workflow execution",
    description: "Cancel an active workflow execution. Cleans up schedulers and adjusts workflow stats.",
    tags: ["workflows"]
  }
});

// src/(ee)/routes/workflows-sync.ts
var workflowsSyncRoutes = createAuthenticatedRoutes("/v1/workflows").post("/push", async (ctx) => {
  const authContext = getAuth(ctx);
  const { body: body2 } = ctx;
  const resolvedSteps = await resolveTemplateReferences(db, authContext.organizationId, body2.steps);
  const result = await upsertWorkflowFromCli(db, authContext, {
    ...body2,
    steps: resolvedSteps,
    transitions: body2.transitions
  });
  if (result.conflict) {
    ctx.set.status = 409;
    return {
      error: "conflict",
      message: "Workflow was edited on the dashboard since last push",
      lastEditedFrom: "dashboard",
      updatedAt: result.updatedAt
    };
  }
  if (result.created) {
    await trackFirstResourceCreated(authContext.organizationId, "workflow", "cli", authContext.userId, body2.name);
  }
  ctx.set.status = result.created ? 201 : 200;
  return {
    id: result.id,
    slug: result.slug,
    status: result.status,
    updatedAt: result.updatedAt,
    remoteHash: body2.sourceHash
  };
}, {
  body: t2.Object({
    slug: t2.String({
      description: "Workflow slug (filename without extension)"
    }),
    name: t2.String({ description: "Workflow display name" }),
    description: t2.Optional(t2.String({ description: "Workflow description" })),
    sourceTs: t2.String({ description: "Original TypeScript source code" }),
    sourceHash: t2.String({ description: "SHA256 hash of source file" }),
    steps: t2.Array(t2.Object({
      id: t2.String(),
      type: t2.String(),
      name: t2.String(),
      position: t2.Object({ x: t2.Number(), y: t2.Number() }),
      config: t2.Any()
    }), { description: "Flat array of workflow steps" }),
    transitions: t2.Array(t2.Object({
      id: t2.String(),
      fromStepId: t2.String(),
      toStepId: t2.String(),
      condition: t2.Optional(t2.Object({
        branch: t2.String()
      }))
    }), { description: "Flat array of step transitions" }),
    triggerType: t2.String({ description: "Trigger type" }),
    triggerConfig: t2.Optional(t2.Any({ description: "Trigger configuration" })),
    settings: t2.Optional(t2.Object({
      allowReentry: t2.Optional(t2.Boolean()),
      reentryDelaySeconds: t2.Optional(t2.Number()),
      maxConcurrentExecutions: t2.Optional(t2.Number()),
      contactCooldownSeconds: t2.Optional(t2.Number())
    })),
    defaults: t2.Optional(t2.Object({
      from: t2.Optional(t2.String()),
      fromName: t2.Optional(t2.String()),
      replyTo: t2.Optional(t2.String()),
      senderId: t2.Optional(t2.String())
    })),
    cliProjectPath: t2.Optional(t2.String({
      description: "Path in project (e.g. workflows/onboarding.ts)"
    })),
    force: t2.Optional(t2.Boolean({
      description: "Force overwrite even if edited on dashboard"
    })),
    draft: t2.Optional(t2.Boolean({
      description: "Push as draft without enabling the workflow"
    }))
  }),
  detail: {
    tags: ["workflows"],
    summary: "Push a workflow from CLI",
    description: "Upserts a workflow parsed from TypeScript source. Used by `wraps email workflows push`."
  }
}).post("/push/batch", async (ctx) => {
  const authContext = getAuth(ctx);
  const { body: body2 } = ctx;
  const results = await db.transaction(async (tx) => {
    const settled = await Promise.allSettled(body2.workflows.map(async (wf) => {
      const resolvedSteps = await resolveTemplateReferences(tx, authContext.organizationId, wf.steps);
      return upsertWorkflowFromCli(tx, authContext, {
        ...wf,
        steps: resolvedSteps,
        transitions: wf.transitions
      });
    }));
    const errors5 = settled.filter((s3) => s3.status === "rejected");
    if (errors5.length > 0) {
      throw errors5[0].reason;
    }
    return settled.filter((s3) => s3.status === "fulfilled").map((s3) => s3.value);
  });
  const conflicts = results.filter((r3) => r3.conflict);
  if (conflicts.length > 0) {
    ctx.set.status = 409;
    return {
      error: "conflict",
      conflicts: conflicts.map((c3) => ({
        slug: c3.slug,
        message: "Workflow was edited on the dashboard since last push",
        updatedAt: c3.updatedAt
      })),
      results: results.filter((r3) => !r3.conflict).map((r3) => ({
        slug: r3.slug,
        id: r3.id,
        status: r3.status
      }))
    };
  }
  const createdWorkflow = results.find((r3) => r3.created);
  if (createdWorkflow) {
    await trackFirstResourceCreated(authContext.organizationId, "workflow", "cli", authContext.userId, body2.workflows.find((w4) => w4.slug === createdWorkflow.slug)?.name ?? createdWorkflow.slug);
  }
  return {
    results: results.map((r3) => ({
      slug: r3.slug,
      id: r3.id,
      status: r3.status
    }))
  };
}, {
  body: t2.Object({
    workflows: t2.Array(t2.Object({
      slug: t2.String(),
      name: t2.String(),
      description: t2.Optional(t2.String()),
      sourceTs: t2.String(),
      sourceHash: t2.String(),
      steps: t2.Array(t2.Object({
        id: t2.String(),
        type: t2.String(),
        name: t2.String(),
        position: t2.Object({ x: t2.Number(), y: t2.Number() }),
        config: t2.Any()
      })),
      transitions: t2.Array(t2.Object({
        id: t2.String(),
        fromStepId: t2.String(),
        toStepId: t2.String(),
        condition: t2.Optional(t2.Object({
          branch: t2.String()
        }))
      })),
      triggerType: t2.String(),
      triggerConfig: t2.Optional(t2.Any()),
      settings: t2.Optional(t2.Object({
        allowReentry: t2.Optional(t2.Boolean()),
        reentryDelaySeconds: t2.Optional(t2.Number()),
        maxConcurrentExecutions: t2.Optional(t2.Number()),
        contactCooldownSeconds: t2.Optional(t2.Number())
      })),
      defaults: t2.Optional(t2.Object({
        from: t2.Optional(t2.String()),
        fromName: t2.Optional(t2.String()),
        replyTo: t2.Optional(t2.String()),
        senderId: t2.Optional(t2.String())
      })),
      cliProjectPath: t2.Optional(t2.String()),
      force: t2.Optional(t2.Boolean()),
      draft: t2.Optional(t2.Boolean())
    }))
  }),
  detail: {
    tags: ["workflows"],
    summary: "Push multiple workflows from CLI",
    description: "Batch upsert workflows parsed from TypeScript source."
  }
}).get("/pull", async (ctx) => {
  const authContext = getAuth(ctx);
  const workflows = await db.select({
    id: workflow.id,
    slug: workflow.slug,
    name: workflow.name,
    description: workflow.description,
    sourceTs: workflow.sourceTs,
    sourceHash: workflow.sourceHash,
    status: workflow.status,
    triggerType: workflow.triggerType,
    triggerConfig: workflow.triggerConfig,
    steps: workflow.steps,
    transitions: workflow.transitions,
    updatedAt: workflow.updatedAt,
    lastEditedFrom: workflow.lastEditedFrom
  }).from(workflow).where(and(eq(workflow.organizationId, authContext.organizationId), eq(workflow.pushedFromCli, true)));
  return {
    workflows: workflows.filter((w4) => w4.slug != null).map((w4) => ({
      ...w4,
      updatedAt: w4.updatedAt.toISOString()
    }))
  };
}, {
  detail: {
    tags: ["workflows"],
    summary: "Pull workflows for CLI sync",
    description: "Returns all workflows pushed from CLI with their TypeScript source."
  }
});
async function resolveTemplateReferences(tx, organizationId, steps) {
  const templateSlugs = new Set;
  for (const step of steps) {
    if (step.config.type === "send_email" || step.config.type === "send_sms") {
      const config2 = step.config;
      const slug = config2.templateId || config2.template;
      if (slug) {
        templateSlugs.add(slug);
      }
    }
  }
  if (templateSlugs.size === 0) {
    return steps;
  }
  const templates = await tx.select({ id: template.id, slug: template.slug }).from(template).where(and(eq(template.organizationId, organizationId), inArray(template.slug, [...templateSlugs])));
  const slugToId = new Map(templates.filter((t3) => t3.slug != null).map((t3) => [t3.slug, t3.id]));
  return steps.map((step) => {
    if (step.config.type === "send_email" || step.config.type === "send_sms") {
      const config2 = step.config;
      const slug = config2.templateId || config2.template;
      if (slug && slugToId.has(slug)) {
        return {
          ...step,
          config: {
            ...step.config,
            templateId: slugToId.get(slug)
          }
        };
      }
    }
    return step;
  });
}
async function upsertWorkflowFromCli(tx, authContext, body2) {
  const now = new Date;
  const targetStatus = body2.draft ? "draft" : "enabled";
  const [orgAwsAccount] = await tx.select({ id: awsAccount.id }).from(awsAccount).where(eq(awsAccount.organizationId, authContext.organizationId)).limit(1);
  const [existing] = await tx.select({
    id: workflow.id,
    lastEditedFrom: workflow.lastEditedFrom,
    updatedAt: workflow.updatedAt
  }).from(workflow).where(and(eq(workflow.organizationId, authContext.organizationId), eq(workflow.slug, body2.slug))).limit(1);
  if (existing) {
    if (existing.lastEditedFrom === "dashboard" && !body2.force) {
      return {
        id: existing.id,
        slug: body2.slug,
        status: targetStatus,
        updatedAt: existing.updatedAt.toISOString(),
        created: false,
        conflict: true
      };
    }
    await tx.update(workflow).set({
      name: body2.name,
      description: body2.description,
      sourceTs: body2.sourceTs,
      sourceHash: body2.sourceHash,
      steps: body2.steps,
      transitions: body2.transitions,
      version: sql`${workflow.version} + 1`,
      triggerType: body2.triggerType,
      triggerConfig: body2.triggerConfig ?? {},
      awsAccountId: orgAwsAccount?.id ?? null,
      allowReentry: body2.settings?.allowReentry ?? false,
      reentryDelaySeconds: body2.settings?.reentryDelaySeconds,
      maxConcurrentExecutions: body2.settings?.maxConcurrentExecutions,
      contactCooldownSeconds: body2.settings?.contactCooldownSeconds,
      defaultFrom: body2.defaults?.from,
      defaultFromName: body2.defaults?.fromName,
      defaultReplyTo: body2.defaults?.replyTo,
      defaultSenderId: body2.defaults?.senderId,
      status: targetStatus,
      pushedFromCli: true,
      lastPushedAt: now,
      cliProjectPath: body2.cliProjectPath,
      lastEditedFrom: "cli",
      updatedAt: now
    }).where(eq(workflow.id, existing.id));
    return {
      id: existing.id,
      slug: body2.slug,
      status: targetStatus,
      updatedAt: now.toISOString(),
      created: false
    };
  }
  const id = crypto.randomUUID();
  await tx.insert(workflow).values({
    id,
    organizationId: authContext.organizationId,
    awsAccountId: orgAwsAccount?.id ?? null,
    name: body2.name,
    slug: body2.slug,
    description: body2.description,
    sourceTs: body2.sourceTs,
    sourceHash: body2.sourceHash,
    steps: body2.steps,
    transitions: body2.transitions,
    triggerType: body2.triggerType,
    triggerConfig: body2.triggerConfig ?? {},
    allowReentry: body2.settings?.allowReentry ?? false,
    reentryDelaySeconds: body2.settings?.reentryDelaySeconds,
    maxConcurrentExecutions: body2.settings?.maxConcurrentExecutions ?? 1000,
    contactCooldownSeconds: body2.settings?.contactCooldownSeconds,
    defaultFrom: body2.defaults?.from,
    defaultFromName: body2.defaults?.fromName,
    defaultReplyTo: body2.defaults?.replyTo,
    defaultSenderId: body2.defaults?.senderId,
    status: targetStatus,
    pushedFromCli: true,
    lastPushedAt: now,
    cliProjectPath: body2.cliProjectPath,
    lastEditedFrom: "cli",
    createdBy: authContext.userId ?? undefined
  });
  return {
    id,
    slug: body2.slug,
    status: targetStatus,
    updatedAt: now.toISOString(),
    created: true
  };
}

// src/services/agent-enforcer.ts
var import_client_dynamodb2 = __toESM(require_dist_cjs66(), 1);
var import_client_lambda = __toESM(require_dist_cjs67(), 1);

// ../../node_modules/.pnpm/@aws-sdk+lib-dynamodb@3.1074.0_@aws-sdk+client-dynamodb@3.1074.0/node_modules/@aws-sdk/lib-dynamodb/dist-cjs/index.js
var { Command, Client: Client5 } = require_client3();
var { setFeature } = require_client4();
var { marshall, unmarshall } = require_dist_cjs68();
var { NumberValueImpl: NumberValue } = require_dist_cjs68();
var { BatchExecuteStatementCommand: BatchExecuteStatementCommand$1, BatchGetItemCommand, BatchWriteItemCommand, DeleteItemCommand, ExecuteStatementCommand: ExecuteStatementCommand$1, ExecuteTransactionCommand: ExecuteTransactionCommand$1, GetItemCommand, PutItemCommand, QueryCommand: QueryCommand$1, ScanCommand: ScanCommand$1, TransactGetItemsCommand, TransactWriteItemsCommand, UpdateItemCommand: UpdateItemCommand2 } = require_dist_cjs66();
var { createPaginator } = require_dist_cjs5();
var SELF = null;
var ALL_VALUES = {};
var ALL_MEMBERS = [];
var NEXT_LEVEL = "*";
var processObj = (obj, processFunc, keyNodes) => {
  if (obj !== undefined) {
    if (keyNodes == null) {
      return processFunc(obj);
    } else {
      const keys = Object.keys(keyNodes);
      const goToNextLevel = keys.length === 1 && keys[0] === NEXT_LEVEL;
      const someChildren = keys.length >= 1 && !goToNextLevel;
      const allChildren = keys.length === 0;
      if (someChildren) {
        return processKeysInObj(obj, processFunc, keyNodes);
      } else if (allChildren) {
        return processAllKeysInObj(obj, processFunc, SELF);
      } else if (goToNextLevel) {
        return Object.entries(obj ?? {}).reduce((acc, [k4, v5]) => {
          if (typeof v5 !== "function") {
            acc[k4] = processObj(v5, processFunc, keyNodes[NEXT_LEVEL]);
          }
          return acc;
        }, Array.isArray(obj) ? [] : {});
      }
    }
  }
  return;
};
var processKeysInObj = (obj, processFunc, keyNodes) => {
  let accumulator;
  if (Array.isArray(obj)) {
    accumulator = obj.filter((item) => typeof item !== "function");
  } else {
    accumulator = {};
    for (const [k4, v5] of Object.entries(obj)) {
      if (typeof v5 !== "function") {
        accumulator[k4] = v5;
      }
    }
  }
  for (const [nodeKey, nodes] of Object.entries(keyNodes)) {
    if (typeof obj[nodeKey] === "function") {
      continue;
    }
    const processedValue = processObj(obj[nodeKey], processFunc, nodes);
    if (processedValue !== undefined && typeof processedValue !== "function") {
      accumulator[nodeKey] = processedValue;
    }
  }
  return accumulator;
};
var processAllKeysInObj = (obj, processFunc, keyNodes) => {
  if (Array.isArray(obj)) {
    return obj.filter((item) => typeof item !== "function").map((item) => processObj(item, processFunc, keyNodes));
  }
  return Object.entries(obj).reduce((acc, [key, value]) => {
    if (typeof value === "function") {
      return acc;
    }
    const processedValue = processObj(value, processFunc, keyNodes);
    if (processedValue !== undefined && typeof processedValue !== "function") {
      acc[key] = processedValue;
    }
    return acc;
  }, {});
};
var marshallInput = (obj, keyNodes, options2) => {
  const marshallFunc = (toMarshall) => marshall(toMarshall, options2);
  return processKeysInObj(obj, marshallFunc, keyNodes);
};
var unmarshallOutput = (obj, keyNodes, options2) => {
  const unmarshallFunc = (toMarshall) => unmarshall(toMarshall, options2);
  return processKeysInObj(obj, unmarshallFunc, keyNodes);
};

class DynamoDBDocumentClientCommand extends Command {
  addMarshallingMiddleware(configuration) {
    const { marshallOptions = {}, unmarshallOptions = {} } = configuration.translateConfig || {};
    marshallOptions.convertTopLevelContainer = marshallOptions.convertTopLevelContainer ?? true;
    unmarshallOptions.convertWithoutMapWrapper = unmarshallOptions.convertWithoutMapWrapper ?? true;
    this.clientCommand.middlewareStack.addRelativeTo((next, context10) => async (args) => {
      setFeature(context10, "DDB_MAPPER", "d");
      return next({
        ...args,
        input: marshallInput(args.input, this.inputKeyNodes, marshallOptions)
      });
    }, {
      name: "DocumentMarshall",
      relation: "before",
      toMiddleware: "serializerMiddleware",
      override: true
    });
    this.clientCommand.middlewareStack.addRelativeTo((next, context10) => async (args) => {
      const deserialized = await next(args);
      deserialized.output = unmarshallOutput(deserialized.output, this.outputKeyNodes, unmarshallOptions);
      return deserialized;
    }, {
      name: "DocumentUnmarshall",
      relation: "before",
      toMiddleware: "deserializerMiddleware",
      override: true
    });
  }
}
class PutCommand extends DynamoDBDocumentClientCommand {
  input;
  inputKeyNodes = {
    Item: ALL_VALUES,
    Expected: {
      "*": {
        Value: SELF,
        AttributeValueList: ALL_MEMBERS
      }
    },
    ExpressionAttributeValues: ALL_VALUES
  };
  outputKeyNodes = {
    Attributes: ALL_VALUES,
    ItemCollectionMetrics: {
      ItemCollectionKey: ALL_VALUES
    }
  };
  clientCommand;
  middlewareStack;
  constructor(input) {
    super();
    this.input = input;
    this.clientCommand = new PutItemCommand(this.input);
    this.middlewareStack = this.clientCommand.middlewareStack;
  }
  resolveMiddleware(clientStack, configuration, options2) {
    this.addMarshallingMiddleware(configuration);
    const stack = clientStack.concat(this.middlewareStack);
    const handler2 = this.clientCommand.resolveMiddleware(stack, configuration, options2);
    return async () => handler2(this.clientCommand);
  }
}

class QueryCommand extends DynamoDBDocumentClientCommand {
  input;
  inputKeyNodes = {
    KeyConditions: {
      "*": {
        AttributeValueList: ALL_MEMBERS
      }
    },
    QueryFilter: {
      "*": {
        AttributeValueList: ALL_MEMBERS
      }
    },
    ExclusiveStartKey: ALL_VALUES,
    ExpressionAttributeValues: ALL_VALUES
  };
  outputKeyNodes = {
    Items: {
      "*": ALL_VALUES
    },
    LastEvaluatedKey: ALL_VALUES
  };
  clientCommand;
  middlewareStack;
  constructor(input) {
    super();
    this.input = input;
    this.clientCommand = new QueryCommand$1(this.input);
    this.middlewareStack = this.clientCommand.middlewareStack;
  }
  resolveMiddleware(clientStack, configuration, options2) {
    this.addMarshallingMiddleware(configuration);
    const stack = clientStack.concat(this.middlewareStack);
    const handler2 = this.clientCommand.resolveMiddleware(stack, configuration, options2);
    return async () => handler2(this.clientCommand);
  }
}

class ScanCommand extends DynamoDBDocumentClientCommand {
  input;
  inputKeyNodes = {
    ScanFilter: {
      "*": {
        AttributeValueList: ALL_MEMBERS
      }
    },
    ExclusiveStartKey: ALL_VALUES,
    ExpressionAttributeValues: ALL_VALUES
  };
  outputKeyNodes = {
    Items: {
      "*": ALL_VALUES
    },
    LastEvaluatedKey: ALL_VALUES
  };
  clientCommand;
  middlewareStack;
  constructor(input) {
    super();
    this.input = input;
    this.clientCommand = new ScanCommand$1(this.input);
    this.middlewareStack = this.clientCommand.middlewareStack;
  }
  resolveMiddleware(clientStack, configuration, options2) {
    this.addMarshallingMiddleware(configuration);
    const stack = clientStack.concat(this.middlewareStack);
    const handler2 = this.clientCommand.resolveMiddleware(stack, configuration, options2);
    return async () => handler2(this.clientCommand);
  }
}
class DynamoDBDocumentClient extends Client5 {
  config;
  constructor(client, translateConfig) {
    super(client.config);
    this.config = client.config;
    this.config.translateConfig = translateConfig;
    this.middlewareStack = client.middlewareStack;
    if (this.config?.cacheMiddleware) {
      throw new Error("@aws-sdk/lib-dynamodb - cacheMiddleware=true is not compatible with the" + " DynamoDBDocumentClient. This option must be set to false.");
    }
  }
  static from(client, translateConfig) {
    return new DynamoDBDocumentClient(client, translateConfig);
  }
  destroy() {}
}
var paginateQuery = createPaginator(DynamoDBDocumentClient, QueryCommand, "ExclusiveStartKey", "LastEvaluatedKey", "Limit");
var paginateScan = createPaginator(DynamoDBDocumentClient, ScanCommand, "ExclusiveStartKey", "LastEvaluatedKey", "Limit");
var $DynamoDBDocumentClient = DynamoDBDocumentClient;
var $PutCommand = PutCommand;

// ../../packages/core/dist/index.js
import { dirname as dirname4, join as join4 } from "path";
import { fileURLToPath } from "url";
var __dirname = "/home/runner/work/wraps/wraps/packages/core/dist";
function configItemKey(agentId) {
  return { pk: `CONFIG#${agentId}`, sk: "CONFIG" };
}
var PAYLOAD_LEN = 22;
var HMAC_LEN = 16;
var TOKEN_LEN = PAYLOAD_LEN + HMAC_LEN;
function resolvePackagePath(relativePath) {
  const dir = typeof __dirname !== "undefined" ? __dirname : dirname4(fileURLToPath(import.meta.url));
  return join4(dir, "..", relativePath);
}
var LAMBDA_EVENT_PROCESSOR_PATH = resolvePackagePath("lambda/event-processor");
var LAMBDA_SMS_EVENT_PROCESSOR_PATH = resolvePackagePath("lambda/sms-event-processor");

// src/services/agent-enforcer.ts
var POLICY_TABLE = "wraps-email-agent-policy";
var RE_NOT_FOUND = /ResourceNotFoundException/;
var RE_ACCESS_DENIED = /AccessDenied|AccessDeniedException|not authorized/i;
var RE_THROTTLED = /TooManyRequestsException|Throttl/i;
var RE_EXPIRED = /ExpiredToken|credentials/i;
var ENFORCER_STATUSES = new Set([
  "sent",
  "pending_approval",
  "blocked",
  "failed",
  "unknown"
]);
function toEnforcerResponse(raw) {
  if (!raw || typeof raw !== "object") {
    return null;
  }
  const o3 = raw;
  if (typeof o3.status !== "string" || !ENFORCER_STATUSES.has(o3.status)) {
    return null;
  }
  if (o3.messageId !== undefined && typeof o3.messageId !== "string") {
    return null;
  }
  if (o3.reason !== undefined && typeof o3.reason !== "string") {
    return null;
  }
  if (o3.approvalId !== undefined && typeof o3.approvalId !== "string") {
    return null;
  }
  return o3;
}
function describeAwsError(error49) {
  const name3 = error49 instanceof Error ? error49.name : "";
  const message2 = error49 instanceof Error ? error49.message : String(error49);
  const haystack = `${name3} ${message2}`;
  if (RE_NOT_FOUND.test(haystack)) {
    return "Enforcer Lambda not found — run `wraps email agent create` to deploy it";
  }
  if (RE_ACCESS_DENIED.test(haystack)) {
    return "Access denied invoking the enforcer Lambda — reconnect the AWS account";
  }
  if (RE_THROTTLED.test(haystack)) {
    return "Enforcer Lambda throttled — try again shortly";
  }
  if (RE_EXPIRED.test(haystack)) {
    return "AWS credentials expired — reconnect the AWS account";
  }
  return message2 || "Unknown error invoking the enforcer";
}
function docClientFor(creds) {
  return $DynamoDBDocumentClient.from(new import_client_dynamodb2.DynamoDBClient({
    ...awsDefaults,
    region: creds.region,
    credentials: {
      accessKeyId: creds.accessKeyId,
      secretAccessKey: creds.secretAccessKey,
      sessionToken: creds.sessionToken
    }
  }));
}
function lambdaClientFor(creds) {
  return new import_client_lambda.LambdaClient({
    ...awsDefaults,
    region: creds.region,
    credentials: {
      accessKeyId: creds.accessKeyId,
      secretAccessKey: creds.secretAccessKey,
      sessionToken: creds.sessionToken
    }
  });
}
async function syncAgentPolicy(agentRow) {
  if (!agentRow.awsAccountId) {
    throw new Error(`Agent ${agentRow.id} has no linked AWS account — cannot sync policy`);
  }
  const creds = await getCredentials(agentRow.awsAccountId, agentRow.organizationId);
  const doc2 = docClientFor(creds);
  const key = configItemKey(agentRow.id);
  const config2 = {
    killed: agentRow.status === "KILLED",
    emailAddress: agentRow.emailAddress,
    policy: agentRow.policy
  };
  await doc2.send(new $PutCommand({
    TableName: POLICY_TABLE,
    Item: {
      pk: key.pk,
      sk: key.sk,
      ...config2
    }
  }));
}
async function executeApprovedSend(approval, agentRow) {
  if (!(agentRow.awsAccountId && agentRow.enforcerFunctionArn)) {
    return {
      status: "failed",
      reason: "Agent is not deployed (missing enforcer ARN or AWS account)"
    };
  }
  const payload = {
    from: approval.payload.from,
    to: approval.payload.to,
    subject: approval.payload.subject,
    html: approval.payload.html ?? "",
    text: approval.payload.text ?? ""
  };
  const request2 = {
    action: "execute",
    agentId: agentRow.id,
    approvalId: approval.id,
    payload
  };
  try {
    const creds = await getCredentials(agentRow.awsAccountId, agentRow.organizationId);
    const lambda = lambdaClientFor(creds);
    const result = await lambda.send(new import_client_lambda.InvokeCommand({
      FunctionName: agentRow.enforcerFunctionArn,
      InvocationType: "RequestResponse",
      Payload: Buffer.from(JSON.stringify(request2))
    }));
    if (result.FunctionError) {
      const detail = result.Payload ? new TextDecoder().decode(result.Payload) : result.FunctionError;
      return { status: "failed", reason: `Enforcer error: ${detail}` };
    }
    if (!result.Payload) {
      return { status: "failed", reason: "Enforcer returned no payload" };
    }
    const parsed = toEnforcerResponse(JSON.parse(new TextDecoder().decode(result.Payload)));
    if (!parsed) {
      return {
        status: "failed",
        reason: "Enforcer returned a malformed response"
      };
    }
    return parsed;
  } catch (error49) {
    log3.error("executeApprovedSend failed", error49, {
      agentId: agentRow.id,
      approvalId: approval.id
    });
    return { status: "failed", reason: describeAwsError(error49) };
  }
}

// src/routes/agents.ts
var errorResponse = t2.Object({
  error: t2.String({ description: "Error message" })
});
var policySchema = t2.Object({
  maxPerHour: t2.Number({
    minimum: 0,
    description: "Max sends per rolling hour (0 flags every send)"
  }),
  maxPerDay: t2.Number({
    minimum: 0,
    description: "Max sends per rolling day (0 flags every send)"
  }),
  allowedRecipients: t2.Array(t2.String({ maxLength: 320 }), {
    maxItems: 100,
    description: "Exact recipient addresses always allowed"
  }),
  allowedRecipientDomains: t2.Array(t2.String({ maxLength: 320 }), {
    maxItems: 100,
    description: "Recipient domains always allowed"
  })
});
var agentResponseSchema = t2.Object({
  id: t2.String(),
  organizationId: t2.String(),
  name: t2.String(),
  emailAddress: t2.String(),
  domain: t2.String(),
  status: t2.String({ description: "ACTIVE or KILLED" }),
  policy: policySchema,
  credentialUserArn: t2.Union([t2.String(), t2.Null()]),
  enforcerFunctionArn: t2.Union([t2.String(), t2.Null()]),
  awsAccountId: t2.Union([t2.String(), t2.Null()]),
  createdBy: t2.Union([t2.String(), t2.Null()]),
  createdAt: t2.String({ format: "date-time" }),
  updatedAt: t2.String({ format: "date-time" })
});
var approvalResponseSchema = t2.Object({
  id: t2.String(),
  organizationId: t2.String(),
  agentId: t2.String(),
  payload: t2.Object({
    from: t2.String(),
    to: t2.String(),
    subject: t2.String(),
    html: t2.Optional(t2.String()),
    text: t2.Optional(t2.String())
  }),
  reason: t2.Union([t2.String(), t2.Null()]),
  status: t2.String(),
  decidedBy: t2.Union([t2.String(), t2.Null()]),
  decidedAt: t2.Union([t2.String(), t2.Null()]),
  messageId: t2.Union([t2.String(), t2.Null()]),
  errorMessage: t2.Union([t2.String(), t2.Null()]),
  createdAt: t2.String({ format: "date-time" }),
  updatedAt: t2.String({ format: "date-time" })
});
var createAgentSchema = t2.Object({
  name: t2.String({ minLength: 1, maxLength: 100 }),
  emailAddress: t2.String({ format: "email", maxLength: 255 }),
  domain: t2.String({ minLength: 1, maxLength: 255 }),
  policy: t2.Optional(policySchema)
});
var policySyncSchema = t2.Object({
  credentialUserArn: t2.Optional(t2.String({ maxLength: 512 })),
  enforcerFunctionArn: t2.Optional(t2.String({ maxLength: 512 })),
  awsAccountId: t2.Optional(t2.String({ maxLength: 255 }))
});
var listApprovalsQuerySchema = t2.Object({
  status: t2.Optional(t2.Union([
    t2.Literal("PENDING"),
    t2.Literal("APPROVED"),
    t2.Literal("REJECTED"),
    t2.Literal("SENT"),
    t2.Literal("FAILED")
  ]))
});
var DEFAULT_POLICY = {
  maxPerHour: 20,
  maxPerDay: 100,
  allowedRecipients: [],
  allowedRecipientDomains: []
};
function serializeAgent(row2) {
  return {
    id: row2.id,
    organizationId: row2.organizationId,
    name: row2.name,
    emailAddress: row2.emailAddress,
    domain: row2.domain,
    status: row2.status,
    policy: row2.policy,
    credentialUserArn: row2.credentialUserArn,
    enforcerFunctionArn: row2.enforcerFunctionArn,
    awsAccountId: row2.awsAccountId,
    createdBy: row2.createdBy,
    createdAt: row2.createdAt.toISOString(),
    updatedAt: row2.updatedAt.toISOString()
  };
}
function serializeApproval(row2) {
  return {
    id: row2.id,
    organizationId: row2.organizationId,
    agentId: row2.agentId,
    payload: row2.payload,
    reason: row2.reason,
    status: row2.status,
    decidedBy: row2.decidedBy,
    decidedAt: row2.decidedAt ? row2.decidedAt.toISOString() : null,
    messageId: row2.messageId,
    errorMessage: row2.errorMessage,
    createdAt: row2.createdAt.toISOString(),
    updatedAt: row2.updatedAt.toISOString()
  };
}
var FORBIDDEN_MESSAGE = "This action requires an organization owner or admin";
async function requireOwnerOrAdmin(ctx) {
  const auth = getAuth(ctx);
  if (!auth.userId) {
    ctx.set.status = 403;
    return { ok: false };
  }
  const [row2] = await db.select({ role: member.role }).from(member).where(and(eq(member.userId, auth.userId), eq(member.organizationId, auth.organizationId))).limit(1);
  if (!row2 || row2.role !== "owner" && row2.role !== "admin") {
    ctx.set.status = 403;
    return { ok: false };
  }
  return { ok: true, userId: auth.userId };
}
var LAMBDA_FN_ARN = /^arn:aws:lambda:[a-z0-9-]+:(\d{12}):function:[A-Za-z0-9-_]+$/;
var IAM_USER_ARN = /^arn:aws:iam::(\d{12}):user\/[\w+=,.@/-]+$/;
var AWS_ACCOUNT_ID = /^\d{12}$/;
function validatePolicySyncOutputs(body2) {
  const accounts = new Set;
  if (body2.awsAccountId !== undefined) {
    if (!AWS_ACCOUNT_ID.test(body2.awsAccountId)) {
      return { error: "awsAccountId must be a 12-digit AWS account id" };
    }
    accounts.add(body2.awsAccountId);
  }
  if (body2.enforcerFunctionArn !== undefined) {
    const match = LAMBDA_FN_ARN.exec(body2.enforcerFunctionArn);
    if (!match) {
      return {
        error: "enforcerFunctionArn must be an unqualified Lambda function ARN"
      };
    }
    accounts.add(match[1]);
  }
  if (body2.credentialUserArn !== undefined) {
    const match = IAM_USER_ARN.exec(body2.credentialUserArn);
    if (!match) {
      return { error: "credentialUserArn must be a valid IAM user ARN" };
    }
    accounts.add(match[1]);
  }
  if (accounts.size > 1) {
    return {
      error: "ARN account ids must match the synced AWS account"
    };
  }
  return null;
}
var STRANDED_RETRY_AFTER_MS = 15000;
async function resolveApprovalForExecute(approval, organizationId, userId) {
  const decided = await decideApproval(approval.id, organizationId, "APPROVED", userId);
  if (decided) {
    return { kind: "row", row: decided };
  }
  const current = await findApprovalForOrg(approval.id, organizationId);
  if (!current) {
    return { kind: "error", status: 404, message: "Approval not found" };
  }
  if (current.status !== "APPROVED") {
    return {
      kind: "error",
      status: 409,
      message: `Approval already ${current.status}`
    };
  }
  const decidedAtMs = current.decidedAt ? current.decidedAt.getTime() : 0;
  if (Date.now() - decidedAtMs < STRANDED_RETRY_AFTER_MS) {
    return {
      kind: "error",
      status: 409,
      message: "Approval already in progress"
    };
  }
  return { kind: "row", row: current };
}
async function finalizeApprovedSend(approvedRow, agentRow, organizationId) {
  const verdict = await executeApprovedSend(approvedRow, agentRow);
  if (verdict.status === "sent" && verdict.messageId) {
    const sent = await markApprovalSent(approvedRow.id, organizationId, verdict.messageId);
    if (sent) {
      return sent;
    }
  } else {
    const errorMessage = verdict.reason ?? `Send ${verdict.status}`;
    const failed = await markApprovalFailed(approvedRow.id, organizationId, errorMessage);
    if (failed) {
      return failed;
    }
  }
  const latest = await findApprovalForOrg(approvedRow.id, organizationId);
  return latest ?? approvedRow;
}
var agentsRoutes = createAuthenticatedRoutes("/v1/agents").get("/", async (ctx) => {
  const auth = getAuth(ctx);
  const agents = await listAgentsForOrg(auth.organizationId);
  return { agents: agents.map(serializeAgent) };
}, {
  response: {
    200: t2.Object({ agents: t2.Array(agentResponseSchema) })
  },
  detail: { tags: ["agents"], summary: "List agents" }
}).post("/", async (ctx) => {
  const auth = getAuth(ctx);
  const gate = await requireOwnerOrAdmin(ctx);
  if (!gate.ok) {
    return { error: FORBIDDEN_MESSAGE };
  }
  const { body: body2 } = ctx;
  const created = await insertAgent({
    organizationId: auth.organizationId,
    name: body2.name,
    emailAddress: body2.emailAddress,
    domain: body2.domain,
    policy: body2.policy ?? DEFAULT_POLICY,
    createdBy: gate.userId
  });
  if (!created) {
    ctx.set.status = 409;
    const emailTaken = await findAgentByAddress(auth.organizationId, body2.emailAddress);
    return {
      error: emailTaken ? "An agent with this email address already exists" : "An agent with this name already exists"
    };
  }
  ctx.set.status = 201;
  return serializeAgent(created);
}, {
  body: createAgentSchema,
  response: {
    201: agentResponseSchema,
    403: errorResponse,
    409: errorResponse
  },
  detail: { tags: ["agents"], summary: "Create an agent" }
}).get("/:id", async (ctx) => {
  const auth = getAuth(ctx);
  const found = await findAgentForOrg(ctx.params.id, auth.organizationId);
  if (!found) {
    ctx.set.status = 404;
    return { error: "Agent not found" };
  }
  return serializeAgent(found);
}, {
  params: t2.Object({ id: t2.String({ maxLength: 255 }) }),
  response: { 200: agentResponseSchema, 404: errorResponse },
  detail: { tags: ["agents"], summary: "Get an agent" }
}).post("/:id/kill", async (ctx) => {
  const auth = getAuth(ctx);
  const gate = await requireOwnerOrAdmin(ctx);
  if (!gate.ok) {
    return { error: FORBIDDEN_MESSAGE };
  }
  const killed = await killAgentForOrg(ctx.params.id, auth.organizationId);
  if (!killed) {
    ctx.set.status = 404;
    return { error: "Agent not found" };
  }
  let syncStatus = "skipped";
  let warning;
  if (killed.awsAccountId) {
    try {
      await syncAgentPolicy(killed);
      syncStatus = "synced";
    } catch (error49) {
      syncStatus = "failed";
      warning = "Kill applied in Wraps, but syncing it to the enforcer failed — the agent may keep sending until the sync succeeds. Retry the kill.";
      log3.error("Kill sync-back failed", error49, { agentId: killed.id });
    }
  }
  try {
    await notifyOrg({
      organizationId: auth.organizationId,
      type: "agent.killed",
      title: `Agent ${killed.name} killed`,
      body: syncStatus === "failed" ? "Kill applied, but enforcer sync failed — retry the kill." : "This agent can no longer send email.",
      href: "/emails/agents",
      data: { agentId: killed.id, syncStatus }
    });
  } catch (error49) {
    log3.error("Kill notify failed", error49, { agentId: killed.id });
  }
  return { agent: serializeAgent(killed), syncStatus, warning };
}, {
  params: t2.Object({ id: t2.String({ maxLength: 255 }) }),
  response: {
    200: t2.Object({
      agent: agentResponseSchema,
      syncStatus: t2.Union([
        t2.Literal("synced"),
        t2.Literal("skipped"),
        t2.Literal("failed")
      ]),
      warning: t2.Optional(t2.String())
    }),
    403: errorResponse,
    404: errorResponse
  },
  detail: { tags: ["agents"], summary: "Kill an agent" }
}).post("/:id/policy-sync", async (ctx) => {
  const auth = getAuth(ctx);
  const gate = await requireOwnerOrAdmin(ctx);
  if (!gate.ok) {
    return { error: FORBIDDEN_MESSAGE };
  }
  const { body: body2 } = ctx;
  const invalid = validatePolicySyncOutputs(body2);
  if (invalid) {
    ctx.set.status = 400;
    return invalid;
  }
  let internalAwsAccountId;
  if (body2.awsAccountId !== undefined) {
    const [account2] = await db.select({ id: awsAccount.id }).from(awsAccount).where(and(eq(awsAccount.accountId, body2.awsAccountId), eq(awsAccount.organizationId, auth.organizationId))).limit(1);
    if (!account2) {
      ctx.set.status = 400;
      return {
        error: `AWS account ${body2.awsAccountId} is not connected to this organization`
      };
    }
    internalAwsAccountId = account2.id;
  }
  const updated = await updateAgentForOrg(ctx.params.id, auth.organizationId, {
    credentialUserArn: body2.credentialUserArn,
    enforcerFunctionArn: body2.enforcerFunctionArn,
    awsAccountId: internalAwsAccountId
  });
  if (!updated) {
    ctx.set.status = 404;
    return { error: "Agent not found" };
  }
  if (updated.awsAccountId) {
    try {
      await syncAgentPolicy(updated);
    } catch (error49) {
      log3.error("Initial policy sync failed", error49, {
        agentId: updated.id
      });
    }
  }
  return serializeAgent(updated);
}, {
  params: t2.Object({ id: t2.String({ maxLength: 255 }) }),
  body: policySyncSchema,
  response: {
    200: agentResponseSchema,
    400: errorResponse,
    403: errorResponse,
    404: errorResponse
  },
  detail: { tags: ["agents"], summary: "Sync agent deploy outputs" }
}).get("/approvals", async (ctx) => {
  const auth = getAuth(ctx);
  const approvals = await listApprovalQueueForOrg(auth.organizationId, ctx.query.status);
  return { approvals: approvals.map(serializeApproval) };
}, {
  query: listApprovalsQuerySchema,
  response: {
    200: t2.Object({ approvals: t2.Array(approvalResponseSchema) })
  },
  detail: { tags: ["agents"], summary: "List the approval queue" }
}).post("/approvals/:id/approve", async (ctx) => {
  const auth = getAuth(ctx);
  const gate = await requireOwnerOrAdmin(ctx);
  if (!gate.ok) {
    return { error: FORBIDDEN_MESSAGE };
  }
  const approval = await findApprovalForOrg(ctx.params.id, auth.organizationId);
  if (!approval) {
    ctx.set.status = 404;
    return { error: "Approval not found" };
  }
  const agentRow = await findAgentForOrg(approval.agentId, auth.organizationId);
  if (!agentRow) {
    ctx.set.status = 404;
    return { error: "Agent not found" };
  }
  if (agentRow.status === "KILLED") {
    ctx.set.status = 409;
    return { error: "Agent is killed — cannot approve its sends" };
  }
  const resolution2 = await resolveApprovalForExecute(approval, auth.organizationId, gate.userId);
  if (resolution2.kind === "error") {
    ctx.set.status = resolution2.status;
    return { error: resolution2.message };
  }
  const finalRow = await finalizeApprovedSend(resolution2.row, agentRow, auth.organizationId);
  return serializeApproval(finalRow);
}, {
  params: t2.Object({ id: t2.String({ maxLength: 255 }) }),
  response: {
    200: approvalResponseSchema,
    403: errorResponse,
    404: errorResponse,
    409: errorResponse
  },
  detail: { tags: ["agents"], summary: "Approve a pending send" }
}).post("/approvals/:id/reject", async (ctx) => {
  const auth = getAuth(ctx);
  const gate = await requireOwnerOrAdmin(ctx);
  if (!gate.ok) {
    return { error: FORBIDDEN_MESSAGE };
  }
  const approval = await findApprovalForOrg(ctx.params.id, auth.organizationId);
  if (!approval) {
    ctx.set.status = 404;
    return { error: "Approval not found" };
  }
  const rejected = await decideApproval(approval.id, auth.organizationId, "REJECTED", gate.userId);
  if (!rejected) {
    const current = await findApprovalForOrg(approval.id, auth.organizationId);
    ctx.set.status = 409;
    return { error: `Approval already ${current?.status ?? "decided"}` };
  }
  return serializeApproval(rejected);
}, {
  params: t2.Object({ id: t2.String({ maxLength: 255 }) }),
  response: {
    200: approvalResponseSchema,
    403: errorResponse,
    404: errorResponse,
    409: errorResponse
  },
  detail: { tags: ["agents"], summary: "Reject a pending send" }
});

// src/routes/agents-webhook.ts
import { timingSafeEqual } from "node:crypto";
var webhookBodySchema = t2.Object({
  agentId: t2.String({ maxLength: 255 }),
  event: t2.Union([t2.Literal("pending_approval"), t2.Literal("blocked")]),
  payload: t2.Object({
    from: t2.String(),
    to: t2.String(),
    subject: t2.String(),
    html: t2.Optional(t2.String()),
    text: t2.Optional(t2.String())
  }),
  reason: t2.Optional(t2.String())
});
var agentsWebhookRoutes = new Elysia({ prefix: "/v1/agents" }).post("/webhook", async ({ body: body2, headers, set: set2 }) => {
  const key = headers["x-wraps-agent-key"];
  if (!key) {
    set2.status = 401;
    return { error: "Unauthorized" };
  }
  const candidates = await db.select({
    webhookSecret: awsAccount.webhookSecret,
    organizationId: awsAccount.organizationId
  }).from(awsAccount).where(isNotNull(awsAccount.webhookSecret));
  const keyBuffer = Buffer.from(key);
  const matched = candidates.find((candidate) => {
    if (!candidate.webhookSecret) {
      return false;
    }
    const secretBuffer = Buffer.from(candidate.webhookSecret);
    return secretBuffer.length === keyBuffer.length && timingSafeEqual(secretBuffer, keyBuffer);
  });
  if (!matched) {
    log3.warn("Agent webhook: authentication failed");
    set2.status = 401;
    return { error: "Unauthorized" };
  }
  const organizationId = matched.organizationId;
  const agentRow = await findAgentForOrg(body2.agentId, organizationId);
  if (!agentRow) {
    set2.status = 404;
    return { error: "Agent not found" };
  }
  if (body2.event === "blocked") {
    try {
      await notifyOrg({
        organizationId,
        type: "agent.send_blocked",
        title: `Agent ${agentRow.name} blocked a send`,
        body: body2.reason ?? "A send was blocked by policy.",
        href: "/emails/agents/approvals",
        data: { agentId: agentRow.id }
      });
    } catch (error49) {
      log3.error("Agent webhook: blocked notify failed", error49, {
        agentId: agentRow.id
      });
    }
    return { approvalId: null };
  }
  const approval = await insertApprovalRequest({
    organizationId,
    agentId: agentRow.id,
    payload: body2.payload,
    reason: body2.reason ?? null,
    status: "PENDING"
  });
  if (!approval) {
    set2.status = 500;
    return { error: "Failed to queue approval" };
  }
  try {
    await notifyOrg({
      organizationId,
      type: "agent.send_pending",
      title: `Agent ${agentRow.name} needs approval`,
      body: body2.reason ?? "A send is awaiting your approval.",
      href: "/emails/agents/approvals",
      data: { agentId: agentRow.id, approvalId: approval.id }
    });
  } catch (error49) {
    log3.error("Agent webhook: pending notify failed", error49, {
      agentId: agentRow.id,
      approvalId: approval.id
    });
  }
  return { approvalId: approval.id };
}, {
  body: webhookBodySchema,
  detail: { tags: ["agents"], summary: "Agent enforcer callback" }
});

// src/middleware/plan-gate.ts
var FEATURE_PLANS = {
  batch: "starter",
  topics: "starter",
  segments: "starter",
  campaigns: "starter",
  workflows: "free",
  events: "starter",
  advancedSegments: "scale",
  customRetention: "scale",
  prioritySLA: "scale",
  sso: "scale"
};
var PLAN_HIERARCHY = {
  free: 0,
  starter: 1,
  growth: 2,
  scale: 3
};
function planGateMiddleware(feature) {
  return new Elysia({ name: `plan-gate:${feature}` }).derive(async (ctx) => {
    const authContext = getAuthOptional(ctx);
    const { set: set2 } = ctx;
    if (!authContext) {
      set2.status = 401;
      throw new Error("Not authenticated");
    }
    if (isSelfHosted()) {
      return {};
    }
    const { planId } = authContext;
    const requiredPlan = FEATURE_PLANS[feature];
    const currentLevel = PLAN_HIERARCHY[planId] ?? 0;
    const requiredLevel = PLAN_HIERARCHY[requiredPlan] ?? 0;
    if (currentLevel < requiredLevel) {
      set2.status = 403;
      throw new Error(`Feature '${feature}' requires ${requiredPlan} plan or higher. ` + `Current plan: ${planId}. Upgrade at https://wraps.dev/upgrade`);
    }
    return {};
  });
}

// src/services/queue.ts
var import_client_sqs2 = __toESM(require_dist_cjs22(), 1);
var sqsClient = new import_client_sqs2.SQSClient(awsDefaults);
var QUEUE_URL = process.env.BATCH_QUEUE_URL;
async function enqueueJob(job) {
  if (!QUEUE_URL) {
    throw new Error("BATCH_QUEUE_URL not configured");
  }
  await sqsClient.send(new import_client_sqs2.SendMessageCommand({
    QueueUrl: QUEUE_URL,
    MessageBody: JSON.stringify(job)
  }));
}

// src/services/scheduler.ts
var import_client_scheduler3 = __toESM(require_dist_cjs20(), 1);
var schedulerClient = new import_client_scheduler3.SchedulerClient(awsDefaults);
var SCHEDULE_GROUP3 = process.env.SCHEDULER_GROUP_NAME || "wraps-broadcasts";
var TARGET_QUEUE_ARN = process.env.BATCH_QUEUE_ARN;
var SCHEDULER_ROLE_ARN3 = process.env.SCHEDULER_ROLE_ARN;
var IS_PRODUCTION3 = false;
async function createBroadcastSchedule(params) {
  const scheduleName = `wraps-batch-${params.batchId}`;
  if (!(TARGET_QUEUE_ARN && SCHEDULER_ROLE_ARN3)) {
    if (IS_PRODUCTION3) {
      throw new Error("EventBridge Scheduler not configured: BATCH_QUEUE_ARN and SCHEDULER_ROLE_ARN required");
    }
    console.warn(`[scheduler] Skipping EventBridge schedule creation for ${scheduleName} - config not set`);
    return scheduleName;
  }
  const scheduleExpression = `at(${params.scheduledFor.toISOString().replace(".000Z", "").replace("Z", "")})`;
  await schedulerClient.send(new import_client_scheduler3.CreateScheduleCommand({
    Name: scheduleName,
    GroupName: SCHEDULE_GROUP3,
    ScheduleExpression: scheduleExpression,
    ScheduleExpressionTimezone: "UTC",
    FlexibleTimeWindow: { Mode: "OFF" },
    ActionAfterCompletion: "DELETE",
    Target: {
      Arn: TARGET_QUEUE_ARN,
      RoleArn: SCHEDULER_ROLE_ARN3,
      Input: JSON.stringify({
        batchId: params.batchId,
        organizationId: params.organizationId,
        awsAccountId: params.awsAccountId,
        channel: params.channel,
        chunkIndex: 0
      })
    }
  }));
  return scheduleName;
}
async function deleteBroadcastSchedule(batchId) {
  const scheduleName = `wraps-batch-${batchId}`;
  if (!(TARGET_QUEUE_ARN && SCHEDULER_ROLE_ARN3)) {
    if (!IS_PRODUCTION3) {
      console.warn(`[scheduler] Skipping EventBridge schedule deletion for ${scheduleName} - config not set`);
      return;
    }
    console.warn(`[scheduler] Cannot delete schedule ${scheduleName} - config not set`);
    return;
  }
  try {
    await schedulerClient.send(new import_client_scheduler3.DeleteScheduleCommand({
      Name: scheduleName,
      GroupName: SCHEDULE_GROUP3
    }));
  } catch (error49) {
    if (error49 instanceof Error && error49.name === "ResourceNotFoundException") {
      return;
    }
    throw error49;
  }
}

// src/routes/batch.ts
var createBatchSchema = t2.Object({
  channel: t2.Optional(t2.Union([t2.Literal("email"), t2.Literal("sms")], {
    description: "Channel to send through"
  })),
  name: t2.Optional(t2.String({ description: "Name for the batch send", maxLength: 255 })),
  audienceType: t2.Optional(t2.Union([t2.Literal("all"), t2.Literal("topic"), t2.Literal("segment")], {
    description: "Audience targeting type"
  })),
  topicId: t2.Optional(t2.String({ description: "Topic ID to target", maxLength: 36 })),
  segmentId: t2.Optional(t2.String({ description: "Segment ID to target", maxLength: 36 })),
  subject: t2.Optional(t2.String({ description: "Email subject line", maxLength: 998 })),
  previewText: t2.Optional(t2.String({ description: "Email preview text", maxLength: 500 })),
  from: t2.Optional(t2.String({ description: "From email address", maxLength: 255 })),
  fromName: t2.Optional(t2.String({ description: "From display name", maxLength: 100 })),
  replyTo: t2.Optional(t2.String({ description: "Reply-to email address", maxLength: 255 })),
  templateId: t2.Optional(t2.String({ description: "Email template ID", maxLength: 36 })),
  htmlContent: t2.Optional(t2.String({ description: "Raw HTML content (if not using template)" })),
  variableMappings: t2.Optional(t2.Array(t2.Object({
    variableName: t2.String({ description: "Template variable name" }),
    source: t2.Union([
      t2.Object({
        type: t2.Literal("static"),
        value: t2.String({ description: "Static value" })
      }),
      t2.Object({
        type: t2.Literal("contact"),
        field: t2.String({ description: "Contact field name" })
      })
    ])
  }), { description: "Variable mappings for custom template variables" })),
  body: t2.Optional(t2.String({ description: "SMS body text", maxLength: 1600 })),
  senderId: t2.Optional(t2.String({ description: "SMS sender ID", maxLength: 20 })),
  scheduledFor: t2.Optional(t2.String({
    description: "ISO 8601 datetime for scheduled send",
    format: "date-time"
  })),
  awsAccountId: t2.String({
    description: "AWS account ID to use for sending",
    maxLength: 36
  }),
  totalRecipients: t2.Optional(t2.Number({ description: "Pre-counted recipient count" }))
});
var batchResponseSchema = t2.Object({
  id: t2.String({ description: "Batch ID" }),
  status: t2.String({
    description: "Batch status (queued, scheduled, processing, completed, failed, cancelled)"
  }),
  channel: t2.String({ description: "Channel (email or sms)" }),
  totalRecipients: t2.Number({ description: "Total number of recipients" }),
  createdAt: t2.String({
    description: "Creation timestamp",
    format: "date-time"
  })
});
var batchRoutes = createAuthenticatedRoutes("/v1/batch").use(rateLimitMiddleware).use(planGateMiddleware("batch")).post("/", async (ctx) => {
  const { body: body2, set: set2 } = ctx;
  const authContext = getAuth(ctx);
  const account2 = await findAwsAccountForOrg(body2.awsAccountId, authContext.organizationId);
  if (!account2) {
    set2.status = 403;
    return {
      id: "",
      status: "error",
      channel: body2.channel ?? "email",
      totalRecipients: 0,
      createdAt: new Date().toISOString(),
      error: "AWS account does not belong to this organization"
    };
  }
  const recipientCount = body2.totalRecipients ?? await countBroadcastRecipients(authContext.organizationId, body2.channel ?? "email", {
    audienceType: body2.audienceType,
    topicId: body2.topicId,
    segmentId: body2.segmentId
  });
  const scheduledFor = body2.scheduledFor ? new Date(body2.scheduledFor) : undefined;
  const isScheduled = scheduledFor && scheduledFor > new Date;
  const batch = await createBroadcast({
    organizationId: authContext.organizationId,
    awsAccountId: body2.awsAccountId,
    channel: body2.channel ?? "email",
    name: body2.name ?? `Batch ${new Date().toISOString()}`,
    status: isScheduled ? "scheduled" : "queued",
    audienceType: body2.audienceType ?? "all",
    topicId: body2.topicId,
    segmentId: body2.segmentId,
    subject: body2.subject,
    previewText: body2.previewText,
    from: body2.from,
    fromName: body2.fromName,
    replyTo: body2.replyTo,
    emailTemplateId: body2.templateId,
    htmlContent: body2.htmlContent,
    variableMappings: body2.variableMappings,
    body: body2.body,
    senderId: body2.senderId,
    scheduledFor,
    totalRecipients: recipientCount,
    createdBy: authContext.userId
  });
  if (isScheduled && scheduledFor) {
    await createBroadcastSchedule({
      batchId: batch.id,
      organizationId: authContext.organizationId,
      awsAccountId: body2.awsAccountId,
      scheduledFor,
      channel: body2.channel ?? "email"
    });
  } else {
    await enqueueJob({
      batchId: batch.id,
      organizationId: authContext.organizationId,
      awsAccountId: body2.awsAccountId,
      channel: batch.channel,
      chunkIndex: 0
    });
  }
  return {
    id: batch.id,
    status: batch.status,
    channel: batch.channel,
    totalRecipients: recipientCount,
    createdAt: batch.createdAt.toISOString()
  };
}, {
  body: createBatchSchema,
  response: batchResponseSchema,
  detail: {
    tags: ["batch"],
    summary: "Create batch send",
    description: "Creates a new batch send job and queues it for processing"
  }
}).get("/:id", async (ctx) => {
  const { params, set: set2 } = ctx;
  const authContext = getAuth(ctx);
  const batch = await findBroadcast(params.id, authContext.organizationId);
  if (!batch) {
    set2.status = 404;
    throw new Error("Batch not found");
  }
  return {
    id: batch.id,
    status: batch.status,
    channel: batch.channel,
    name: batch.name,
    totalRecipients: batch.totalRecipients,
    processedRecipients: batch.processedRecipients,
    sent: batch.sent,
    failed: batch.failed,
    startedAt: batch.startedAt?.toISOString() ?? null,
    completedAt: batch.completedAt?.toISOString() ?? null,
    createdAt: batch.createdAt.toISOString()
  };
}, {
  params: t2.Object({
    id: t2.String({ description: "Batch ID", maxLength: 36 })
  }),
  response: {
    200: t2.Object({
      id: t2.String(),
      status: t2.String(),
      channel: t2.String(),
      name: t2.Union([t2.String(), t2.Null()]),
      totalRecipients: t2.Number(),
      processedRecipients: t2.Number(),
      sent: t2.Number(),
      failed: t2.Number(),
      startedAt: t2.Union([t2.String(), t2.Null()]),
      completedAt: t2.Union([t2.String(), t2.Null()]),
      createdAt: t2.String()
    })
  },
  detail: {
    tags: ["batch"],
    summary: "Get batch status",
    description: "Returns the current status of a batch send job"
  }
}).post("/:id/send", async (ctx) => {
  const { body: body2, params, set: set2 } = ctx;
  const authContext = getAuth(ctx);
  const existing = await findBroadcast(params.id, authContext.organizationId);
  if (!existing) {
    set2.status = 404;
    throw new Error("Batch not found");
  }
  if (existing.status !== "draft") {
    set2.status = 400;
    throw new Error(`Cannot promote batch in '${existing.status}' status. Only drafts can be promoted.`);
  }
  const account2 = await findAwsAccountForOrg(body2.awsAccountId, authContext.organizationId);
  if (!account2) {
    set2.status = 403;
    throw new Error("AWS account does not belong to this organization");
  }
  const scheduledFor = body2.scheduledFor ? new Date(body2.scheduledFor) : undefined;
  const isScheduled = Boolean(scheduledFor && scheduledFor > new Date);
  const channel3 = body2.channel ?? existing.channel ?? "email";
  const batch = await promoteBroadcast(params.id, authContext.organizationId, {
    awsAccountId: body2.awsAccountId,
    channel: channel3,
    name: body2.name ?? existing.name,
    status: isScheduled ? "scheduled" : "queued",
    audienceType: body2.audienceType ?? existing.audienceType,
    topicId: body2.topicId ?? existing.topicId,
    segmentId: body2.segmentId ?? existing.segmentId,
    subject: body2.subject ?? existing.subject,
    previewText: body2.previewText ?? existing.previewText,
    from: body2.from ?? existing.from,
    fromName: body2.fromName ?? existing.fromName,
    replyTo: body2.replyTo ?? existing.replyTo,
    emailTemplateId: body2.templateId ?? existing.emailTemplateId,
    htmlContent: body2.htmlContent ?? existing.htmlContent,
    variableMappings: body2.variableMappings ?? existing.variableMappings,
    body: body2.body ?? existing.body,
    senderId: body2.senderId ?? existing.senderId,
    scheduledFor: scheduledFor ?? null,
    totalRecipients: body2.totalRecipients,
    createdBy: authContext.userId
  });
  if (!batch) {
    set2.status = 409;
    throw new Error("Expected to promote exactly 1 draft row, updated 0");
  }
  if (isScheduled && scheduledFor) {
    await createBroadcastSchedule({
      batchId: batch.id,
      organizationId: authContext.organizationId,
      awsAccountId: body2.awsAccountId,
      scheduledFor,
      channel: channel3
    });
  } else {
    await enqueueJob({
      batchId: batch.id,
      organizationId: authContext.organizationId,
      awsAccountId: body2.awsAccountId,
      channel: batch.channel,
      chunkIndex: 0
    });
  }
  set2.status = 201;
  return {
    id: batch.id,
    status: batch.status
  };
}, {
  params: t2.Object({
    id: t2.String({
      description: "Draft batch ID to promote",
      maxLength: 36
    })
  }),
  body: t2.Object({
    channel: t2.Optional(t2.Union([t2.Literal("email"), t2.Literal("sms")])),
    name: t2.Optional(t2.String({ maxLength: 255 })),
    audienceType: t2.Optional(t2.Union([t2.Literal("all"), t2.Literal("topic"), t2.Literal("segment")])),
    topicId: t2.Optional(t2.String({ maxLength: 36 })),
    segmentId: t2.Optional(t2.String({ maxLength: 36 })),
    subject: t2.Optional(t2.String({ maxLength: 998 })),
    previewText: t2.Optional(t2.String({ maxLength: 500 })),
    from: t2.Optional(t2.String({ maxLength: 255 })),
    fromName: t2.Optional(t2.String({ maxLength: 100 })),
    replyTo: t2.Optional(t2.String({ maxLength: 255 })),
    templateId: t2.Optional(t2.String({ maxLength: 36 })),
    htmlContent: t2.Optional(t2.String()),
    variableMappings: t2.Optional(t2.Array(t2.Object({
      variableName: t2.String(),
      source: t2.Union([
        t2.Object({
          type: t2.Literal("static"),
          value: t2.String()
        }),
        t2.Object({
          type: t2.Literal("contact"),
          field: t2.String()
        })
      ])
    }))),
    body: t2.Optional(t2.String({ maxLength: 1600 })),
    senderId: t2.Optional(t2.String({ maxLength: 20 })),
    scheduledFor: t2.Optional(t2.String({ format: "date-time" })),
    awsAccountId: t2.String({ maxLength: 36 }),
    totalRecipients: t2.Number()
  }),
  response: {
    201: t2.Object({
      id: t2.String(),
      status: t2.String()
    })
  },
  detail: {
    tags: ["batch"],
    summary: "Promote draft batch send",
    description: "Promotes an existing draft batch_send to an active send (queued or scheduled)."
  }
}).delete("/:id", async (ctx) => {
  const { params, set: set2 } = ctx;
  const authContext = getAuth(ctx);
  const batch = await findBroadcast(params.id, authContext.organizationId);
  if (!batch) {
    set2.status = 404;
    throw new Error("Batch not found");
  }
  if (!["scheduled", "queued", "processing"].includes(batch.status)) {
    set2.status = 400;
    throw new Error(`Cannot cancel batch in '${batch.status}' status. Only scheduled, queued, or processing batches can be cancelled.`);
  }
  if (batch.status === "scheduled") {
    await deleteBroadcastSchedule(batch.id);
  }
  await cancelBroadcast(batch.id, authContext.organizationId);
  return { success: true, id: batch.id, status: "cancelled" };
}, {
  params: t2.Object({
    id: t2.String({ description: "Batch ID to cancel", maxLength: 36 })
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      id: t2.String(),
      status: t2.String()
    })
  },
  detail: {
    tags: ["batch"],
    summary: "Cancel batch send",
    description: "Cancels a scheduled or queued batch send. If scheduled, also deletes the EventBridge schedule."
  }
}).post("/:id/resume", async (ctx) => {
  const { params, body: body2, set: set2 } = ctx;
  const authContext = getAuth(ctx);
  if (process.env.BROADCAST_RESUME_ENABLED === "false") {
    set2.status = 503;
    return { error: "Broadcast resume is temporarily disabled" };
  }
  const [batch] = await db.select().from(batchSend).where(and(eq(batchSend.id, params.id), eq(batchSend.organizationId, authContext.organizationId))).limit(1);
  if (!batch) {
    set2.status = 404;
    return { error: "Batch not found" };
  }
  if (!(batch.status === "processing" || batch.status === "failed")) {
    set2.status = 409;
    return {
      error: `Cannot resume batch in '${batch.status}' status. Only 'processing' or 'failed' batches can be resumed.`
    };
  }
  if (batch.channel !== "email") {
    set2.status = 409;
    return {
      error: `Resume is only supported for email batches. Channel: ${batch.channel}`
    };
  }
  if (!batch.awsAccountId) {
    set2.status = 409;
    return {
      error: "AWS account is not attached to this batch; reconnect it before resuming."
    };
  }
  const override = body2?.fromChunkIndex;
  const nextIndex = override == null ? batch.lastChunkIndex == null ? 0 : batch.lastChunkIndex + 1 : override;
  const cursor = override != null ? undefined : batch.lastCursor ?? undefined;
  const existingDetails = batch.errorDetails ?? {};
  const existingResumes = Array.isArray(existingDetails.resumes) ? existingDetails.resumes : [];
  const resumedBy = authContext.userId ?? authContext.apiKeyId ?? "unknown";
  const nextDetails = {
    ...existingDetails,
    resumes: [
      ...existingResumes,
      {
        resumedAt: new Date().toISOString(),
        resumedBy,
        fromChunkIndex: nextIndex
      }
    ]
  };
  await db.update(batchSend).set({
    status: "processing",
    lastChunkAt: new Date,
    errorDetails: nextDetails,
    updatedAt: new Date
  }).where(and(eq(batchSend.id, batch.id), eq(batchSend.organizationId, authContext.organizationId)));
  await enqueueJob({
    batchId: batch.id,
    organizationId: authContext.organizationId,
    awsAccountId: batch.awsAccountId,
    channel: batch.channel,
    chunkIndex: nextIndex,
    cursor
  });
  return { resumed: true, fromChunkIndex: nextIndex };
}, {
  params: t2.Object({
    id: t2.String({ description: "Batch ID to resume", maxLength: 36 })
  }),
  body: t2.Optional(t2.Object({
    fromChunkIndex: t2.Optional(t2.Number({
      description: "Operator override — restart from this chunkIndex with a fresh cursor. Omit to use the durable heartbeat.",
      minimum: 0
    }))
  })),
  detail: {
    tags: ["batch"],
    summary: "Resume batch send",
    description: "Resumes a 'processing' or 'failed' email batch from the last successfully completed chunk. Writes a resume entry to errorDetails and enqueues the next chunk."
  }
});

// src/routes/connections.ts
import { randomBytes } from "node:crypto";
var PLAN_AWS_ACCOUNT_LIMITS = {
  free: 1,
  starter: 2,
  growth: 5,
  scale: -1
};
function getMaxAwsAccounts(planId) {
  if (!planId) {
    return PLAN_AWS_ACCOUNT_LIMITS.free;
  }
  return PLAN_AWS_ACCOUNT_LIMITS[planId] ?? PLAN_AWS_ACCOUNT_LIMITS.free;
}
function generateExternalId() {
  return `wraps_${randomBytes(16).toString("hex")}`;
}
var connectionsRoutes = createAuthenticatedRoutes("/v1/connections").post("/", async (ctx) => {
  const authContext = getAuth(ctx);
  const { body: body2 } = ctx;
  const maxAccounts = getMaxAwsAccounts(authContext.planId);
  const result = await db.transaction(async (tx) => {
    await tx.execute(sql`SELECT 1 FROM "organization" WHERE "id" = ${authContext.organizationId} FOR UPDATE`);
    const [accountCount] = await tx.select({ count: count() }).from(awsAccount).where(eq(awsAccount.organizationId, authContext.organizationId));
    const [existing] = await tx.select({ id: awsAccount.id, externalId: awsAccount.externalId }).from(awsAccount).where(and(eq(awsAccount.organizationId, authContext.organizationId), eq(awsAccount.accountId, body2.accountId))).limit(1);
    if (maxAccounts !== -1 && (accountCount?.count ?? 0) >= maxAccounts && !existing) {
      return { limited: true, maxAccounts };
    }
    const webhookSecret = randomBytes(32).toString("hex");
    const externalId = existing?.externalId || generateExternalId();
    const roleArn = `arn:aws:iam::${body2.accountId}:role/wraps-console-access-role`;
    const features = body2.features;
    const hasEmailFeature = features?.email !== undefined;
    const hasSmsFeature = features?.sms !== undefined;
    let connectionId;
    if (existing) {
      await tx.update(awsAccount).set({
        region: body2.region,
        roleArn,
        webhookSecret,
        isVerified: true,
        lastVerifiedAt: new Date,
        emailEnabled: hasEmailFeature,
        smsEnabled: hasSmsFeature,
        features: features ?? null,
        updatedAt: new Date
      }).where(eq(awsAccount.id, existing.id));
      connectionId = existing.id;
    } else {
      const id = crypto.randomUUID();
      await tx.insert(awsAccount).values({
        id,
        organizationId: authContext.organizationId,
        name: body2.name || `AWS ${body2.accountId}`,
        accountId: body2.accountId,
        region: body2.region,
        roleArn,
        externalId,
        webhookSecret,
        isVerified: true,
        lastVerifiedAt: new Date,
        emailEnabled: hasEmailFeature,
        smsEnabled: hasSmsFeature,
        features: features ?? null,
        createdBy: authContext.userId
      });
      connectionId = id;
      log3.info("Connection created", {
        connectionId: id,
        organizationId: authContext.organizationId,
        accountId: body2.accountId,
        region: body2.region
      });
    }
    return {
      limited: false,
      isUpdate: !!existing,
      connectionId,
      externalId,
      roleArn,
      webhookSecret,
      webhookEndpoint: `https://api.wraps.dev/webhooks/ses/${body2.accountId}`
    };
  });
  if (result.limited) {
    ctx.set.status = 403;
    return {
      error: `AWS account limit reached (${result.maxAccounts}). Upgrade your plan to add more accounts.`
    };
  }
  ctx.set.status = result.isUpdate ? 200 : 201;
  return {
    success: true,
    connectionId: result.connectionId,
    externalId: result.externalId,
    roleArn: result.roleArn,
    webhookSecret: result.webhookSecret,
    webhookEndpoint: result.webhookEndpoint
  };
}, {
  body: t2.Object({
    accountId: t2.String({ description: "AWS account ID (12 digits)" }),
    region: t2.String({ description: "AWS region (e.g. us-east-1)" }),
    name: t2.Optional(t2.String({ description: "Display name for the account" })),
    features: t2.Optional(t2.Object({}, {
      additionalProperties: true,
      description: "Service features config"
    }))
  }),
  detail: {
    tags: ["connections"],
    summary: "Register or update an AWS connection",
    description: "Registers or updates the AWS account connection. Returns externalId for IAM role trust policy and webhookSecret for EventBridge configuration."
  }
}).get("/", async (ctx) => {
  const authContext = getAuth(ctx);
  const connections = await db.select({
    id: awsAccount.id,
    accountId: awsAccount.accountId,
    name: awsAccount.name,
    region: awsAccount.region,
    isVerified: awsAccount.isVerified,
    emailEnabled: awsAccount.emailEnabled,
    smsEnabled: awsAccount.smsEnabled,
    lastVerifiedAt: awsAccount.lastVerifiedAt,
    lastEventReceivedAt: awsAccount.lastEventReceivedAt,
    webhookSecret: awsAccount.webhookSecret,
    createdAt: awsAccount.createdAt
  }).from(awsAccount).where(eq(awsAccount.organizationId, authContext.organizationId));
  return {
    connections: connections.map(({ webhookSecret, ...c3 }) => ({
      ...c3,
      webhookConnected: webhookSecret !== null,
      lastEventReceivedAt: c3.lastEventReceivedAt?.toISOString() ?? null,
      lastVerifiedAt: c3.lastVerifiedAt?.toISOString() ?? null,
      createdAt: c3.createdAt.toISOString()
    }))
  };
}, {
  detail: {
    tags: ["connections"],
    summary: "List AWS connections",
    description: "Returns all AWS account connections for the authenticated organization."
  }
}).delete("/:id", async (ctx) => {
  const authContext = getAuth(ctx);
  const { id } = ctx.params;
  const [existing] = await db.select({ id: awsAccount.id }).from(awsAccount).where(and(eq(awsAccount.id, id), eq(awsAccount.organizationId, authContext.organizationId))).limit(1);
  if (!existing) {
    ctx.set.status = 404;
    return { error: "Connection not found" };
  }
  await db.update(awsAccount).set({
    webhookSecret: null,
    updatedAt: new Date
  }).where(eq(awsAccount.id, id));
  return { success: true };
}, {
  params: t2.Object({
    id: t2.String({ description: "Connection ID" })
  }),
  detail: {
    tags: ["connections"],
    summary: "Disconnect an AWS account",
    description: "Clears the webhook secret for the connection. The account record is preserved."
  }
});

// src/services/workflow-events.ts
async function emitWorkflowEvent(params) {
  const { eventName, contactId, organizationId, eventData, skipEventRecord } = params;
  if (!skipEventRecord) {
    try {
      await db.insert(contactEvent).values({
        contactId,
        organizationId,
        eventName,
        eventData
      });
    } catch (error49) {
      log3.error("Failed to record workflow event", error49, {
        eventName,
        contactId
      });
    }
  }
  const matchingWorkflows = await db.select({ id: workflow.id }).from(workflow).where(and(eq(workflow.organizationId, organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "event"), sql`${workflow.triggerConfig}->>'eventName' = ${eventName}`));
  if (matchingWorkflows.length > 0) {
    const jobs = matchingWorkflows.map((wf) => ({
      type: "trigger",
      workflowId: wf.id,
      contactId,
      organizationId,
      eventData: eventData || {}
    }));
    await enqueueWorkflowStepBatch(jobs);
  }
  if (matchingWorkflows.length > 0) {
    log3.info("Workflow event triggered workflows", {
      eventName,
      contactId,
      workflowCount: matchingWorkflows.length
    });
  }
  return { workflowsTriggered: matchingWorkflows.length };
}
async function emitContactCreated(params) {
  const eventData = {
    ...params.contactData,
    createdAt: new Date().toISOString()
  };
  const matchingByEvent = await emitWorkflowEvent({
    eventName: "contact_created",
    contactId: params.contactId,
    organizationId: params.organizationId,
    eventData
  });
  const matchingByTrigger = await db.select({ id: workflow.id }).from(workflow).where(and(eq(workflow.organizationId, params.organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "contact_created")));
  if (matchingByTrigger.length > 0) {
    const jobs = matchingByTrigger.map((wf) => ({
      type: "trigger",
      workflowId: wf.id,
      contactId: params.contactId,
      organizationId: params.organizationId,
      eventData
    }));
    await enqueueWorkflowStepBatch(jobs);
    log3.info("contact_created trigger matched workflows", {
      contactId: params.contactId,
      workflowCount: matchingByTrigger.length
    });
  }
  return {
    workflowsTriggered: matchingByEvent.workflowsTriggered + matchingByTrigger.length
  };
}
async function emitContactUpdated(params) {
  const eventData = {
    ...params.contactData,
    updatedFields: params.updatedFields,
    updatedAt: new Date().toISOString()
  };
  const matchingByEvent = await emitWorkflowEvent({
    eventName: "contact_updated",
    contactId: params.contactId,
    organizationId: params.organizationId,
    eventData
  });
  const matchingByTrigger = await db.select({ id: workflow.id }).from(workflow).where(and(eq(workflow.organizationId, params.organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "contact_updated")));
  if (matchingByTrigger.length > 0) {
    const jobs = matchingByTrigger.map((wf) => ({
      type: "trigger",
      workflowId: wf.id,
      contactId: params.contactId,
      organizationId: params.organizationId,
      eventData
    }));
    await enqueueWorkflowStepBatch(jobs);
    log3.info("contact_updated trigger matched workflows", {
      contactId: params.contactId,
      workflowCount: matchingByTrigger.length
    });
  }
  return {
    workflowsTriggered: matchingByEvent.workflowsTriggered + matchingByTrigger.length
  };
}
async function emitTopicSubscribed(params) {
  const matchingByEvent = await emitWorkflowEvent({
    eventName: "topic_subscribed",
    contactId: params.contactId,
    organizationId: params.organizationId,
    eventData: {
      topicId: params.topicId,
      topicName: params.topicName,
      subscribedAt: new Date().toISOString()
    }
  });
  const matchingByTrigger = await db.select({ id: workflow.id }).from(workflow).where(and(eq(workflow.organizationId, params.organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "topic_subscribed"), sql`${workflow.triggerConfig}->>'topicId' = ${params.topicId}`));
  if (matchingByTrigger.length > 0) {
    const topicEventData = {
      topicId: params.topicId,
      topicName: params.topicName,
      subscribedAt: new Date().toISOString()
    };
    const jobs = matchingByTrigger.map((wf) => ({
      type: "trigger",
      workflowId: wf.id,
      contactId: params.contactId,
      organizationId: params.organizationId,
      eventData: topicEventData
    }));
    await enqueueWorkflowStepBatch(jobs);
    log3.info("topic_subscribed trigger matched workflows", {
      workflowCount: matchingByTrigger.length
    });
  }
  return {
    workflowsTriggered: matchingByEvent.workflowsTriggered + matchingByTrigger.length
  };
}
async function emitTopicUnsubscribed(params) {
  const { executionsCancelled } = await cancelExecutionsForTopicUnsubscribe({
    contactId: params.contactId,
    organizationId: params.organizationId,
    topicId: params.topicId
  });
  const matchingByEvent = await emitWorkflowEvent({
    eventName: "topic_unsubscribed",
    contactId: params.contactId,
    organizationId: params.organizationId,
    eventData: {
      topicId: params.topicId,
      topicName: params.topicName,
      unsubscribedAt: new Date().toISOString()
    }
  });
  const matchingByTrigger = await db.select({ id: workflow.id }).from(workflow).where(and(eq(workflow.organizationId, params.organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "topic_unsubscribed"), sql`${workflow.triggerConfig}->>'topicId' = ${params.topicId}`));
  if (matchingByTrigger.length > 0) {
    const topicEventData = {
      topicId: params.topicId,
      topicName: params.topicName,
      unsubscribedAt: new Date().toISOString()
    };
    const jobs = matchingByTrigger.map((wf) => ({
      type: "trigger",
      workflowId: wf.id,
      contactId: params.contactId,
      organizationId: params.organizationId,
      eventData: topicEventData
    }));
    await enqueueWorkflowStepBatch(jobs);
    log3.info("topic_unsubscribed trigger matched workflows", {
      workflowCount: matchingByTrigger.length
    });
  }
  return {
    workflowsTriggered: matchingByEvent.workflowsTriggered + matchingByTrigger.length,
    executionsCancelled
  };
}
async function checkSegmentEntry(params) {
  const segmentWorkflows = await db.select({
    id: workflow.id,
    triggerConfig: workflow.triggerConfig
  }).from(workflow).where(and(eq(workflow.organizationId, params.organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "segment_entry")));
  if (segmentWorkflows.length === 0) {
    return { workflowsTriggered: 0 };
  }
  const segmentIds = [
    ...new Set(segmentWorkflows.map((wf) => wf.triggerConfig?.segmentId).filter((id) => !!id))
  ];
  if (segmentIds.length === 0) {
    return { workflowsTriggered: 0 };
  }
  const segmentsMap = await getSegmentsByIds(db, segmentIds, params.organizationId);
  const jobs = [];
  for (const wf of segmentWorkflows) {
    const config2 = wf.triggerConfig;
    if (!config2?.segmentId) {
      continue;
    }
    const seg = segmentsMap.get(config2.segmentId);
    if (!seg) {
      continue;
    }
    try {
      const matches = await contactMatchesCondition(db, params.contactId, params.organizationId, seg.condition);
      if (matches) {
        jobs.push({
          type: "trigger",
          workflowId: wf.id,
          contactId: params.contactId,
          organizationId: params.organizationId,
          eventData: {
            segmentId: config2.segmentId,
            segmentName: seg.name,
            enteredAt: new Date().toISOString()
          }
        });
        log3.info("Segment entry: triggered workflow", {
          contactId: params.contactId,
          segmentId: config2.segmentId,
          workflowId: wf.id
        });
      }
    } catch (error49) {
      log3.error("Error checking segment entry", error49, {
        segmentId: config2.segmentId
      });
    }
  }
  if (jobs.length > 0) {
    await enqueueWorkflowStepBatch(jobs);
  }
  return { workflowsTriggered: jobs.length };
}
async function checkSegmentExit(params) {
  const segmentWorkflows = await db.select({
    id: workflow.id,
    triggerConfig: workflow.triggerConfig
  }).from(workflow).where(and(eq(workflow.organizationId, params.organizationId), eq(workflow.status, "enabled"), eq(workflow.triggerType, "segment_exit")));
  if (segmentWorkflows.length === 0) {
    return { workflowsTriggered: 0 };
  }
  const segmentIds = [
    ...new Set(segmentWorkflows.map((wf) => wf.triggerConfig?.segmentId).filter((id) => {
      if (!id) {
        return false;
      }
      if (params.previousSegmentIds && !params.previousSegmentIds.includes(id)) {
        return false;
      }
      return true;
    }))
  ];
  if (segmentIds.length === 0) {
    return { workflowsTriggered: 0 };
  }
  const segmentsMap = await getSegmentsByIds(db, segmentIds, params.organizationId);
  const jobs = [];
  for (const wf of segmentWorkflows) {
    const config2 = wf.triggerConfig;
    if (!config2?.segmentId) {
      continue;
    }
    if (params.previousSegmentIds && !params.previousSegmentIds.includes(config2.segmentId)) {
      continue;
    }
    const seg = segmentsMap.get(config2.segmentId);
    if (!seg) {
      continue;
    }
    try {
      const matches = await contactMatchesCondition(db, params.contactId, params.organizationId, seg.condition);
      if (!matches) {
        jobs.push({
          type: "trigger",
          workflowId: wf.id,
          contactId: params.contactId,
          organizationId: params.organizationId,
          eventData: {
            segmentId: config2.segmentId,
            segmentName: seg.name,
            exitedAt: new Date().toISOString()
          }
        });
        log3.info("Segment exit: triggered workflow", {
          contactId: params.contactId,
          segmentId: config2.segmentId,
          workflowId: wf.id
        });
      }
    } catch (error49) {
      log3.error("Error checking segment exit", error49, {
        segmentId: config2.segmentId
      });
    }
  }
  if (jobs.length > 0) {
    await enqueueWorkflowStepBatch(jobs);
  }
  return { workflowsTriggered: jobs.length };
}
async function cancelExecutionsForTopicUnsubscribe(params) {
  const { contactId, organizationId, topicId } = params;
  const matchingWorkflows = await db.select({ id: workflow.id }).from(workflow).where(and(eq(workflow.organizationId, organizationId), eq(workflow.triggerType, "topic_subscribed"), sql`${workflow.triggerConfig}->>'topicId' = ${topicId}`));
  if (matchingWorkflows.length === 0) {
    return { executionsCancelled: 0 };
  }
  const workflowIds = matchingWorkflows.map((w4) => w4.id);
  const activeExecutions = await db.select({
    id: workflowExecution.id,
    workflowId: workflowExecution.workflowId,
    delaySchedulerName: workflowExecution.delaySchedulerName,
    waitTimeoutSchedulerName: workflowExecution.waitTimeoutSchedulerName
  }).from(workflowExecution).where(and(eq(workflowExecution.organizationId, organizationId), eq(workflowExecution.contactId, contactId), inArray(workflowExecution.workflowId, workflowIds), sql`${workflowExecution.status} IN ('pending', 'active', 'paused', 'waiting')`));
  if (activeExecutions.length === 0) {
    return { executionsCancelled: 0 };
  }
  const schedulerCleanups = [];
  for (const execution of activeExecutions) {
    if (execution.delaySchedulerName) {
      schedulerCleanups.push(deleteScheduledStep(execution.delaySchedulerName).catch((err) => {
        log3.error("Failed to delete delay scheduler", err, {
          schedulerName: execution.delaySchedulerName
        });
      }));
    }
    if (execution.waitTimeoutSchedulerName) {
      schedulerCleanups.push(deleteScheduledStep(execution.waitTimeoutSchedulerName).catch((err) => {
        log3.error("Failed to delete timeout scheduler", err, {
          schedulerName: execution.waitTimeoutSchedulerName
        });
      }));
    }
  }
  await Promise.all(schedulerCleanups);
  const executionIds = activeExecutions.map((e3) => e3.id);
  await db.update(workflowExecution).set({
    status: "cancelled",
    completedAt: new Date,
    updatedAt: new Date
  }).where(inArray(workflowExecution.id, executionIds));
  const countsByWorkflow = new Map;
  for (const execution of activeExecutions) {
    countsByWorkflow.set(execution.workflowId, (countsByWorkflow.get(execution.workflowId) ?? 0) + 1);
  }
  await Promise.all([...countsByWorkflow.entries()].map(([wfId, count2]) => db.update(workflow).set({
    activeExecutions: sql`GREATEST(0, ${workflow.activeExecutions} - ${count2})`
  }).where(eq(workflow.id, wfId))));
  log3.info("Workflow: cancelled executions for topic unsubscribe", {
    contactId,
    topicId,
    count: activeExecutions.length
  });
  return { executionsCancelled: activeExecutions.length };
}

// src/routes/contacts.ts
var errorResponse2 = t2.Object({
  error: t2.String({ description: "Error message" })
});
var propertiesSchema = t2.Optional(t2.Object({}, { additionalProperties: true, description: "Custom properties" }));
var contactResponseSchema = t2.Object({
  id: t2.String({ description: "Contact ID" }),
  externalId: t2.Union([t2.String(), t2.Null()], {
    description: "Caller-supplied external ID"
  }),
  email: t2.Union([t2.String(), t2.Null()], { description: "Email address" }),
  phone: t2.Union([t2.String(), t2.Null()], { description: "Phone number" }),
  firstName: t2.Union([t2.String(), t2.Null()], { description: "First name" }),
  lastName: t2.Union([t2.String(), t2.Null()], { description: "Last name" }),
  company: t2.Union([t2.String(), t2.Null()], { description: "Company name" }),
  jobTitle: t2.Union([t2.String(), t2.Null()], { description: "Job title" }),
  emailStatus: t2.Union([t2.String(), t2.Null()], {
    description: "Email subscription status"
  }),
  smsStatus: t2.Union([t2.String(), t2.Null()], {
    description: "SMS subscription status"
  }),
  preferredChannel: t2.Union([t2.String(), t2.Null()], {
    description: "Preferred communication channel"
  }),
  properties: t2.Object({}, { additionalProperties: true }),
  emailsSent: t2.Number({ description: "Number of emails sent" }),
  emailsOpened: t2.Number({ description: "Number of emails opened" }),
  emailsClicked: t2.Number({ description: "Number of emails clicked" }),
  smsSent: t2.Number({ description: "Number of SMS sent" }),
  smsClicked: t2.Number({ description: "Number of SMS clicked" }),
  createdAt: t2.String({
    description: "Creation timestamp",
    format: "date-time"
  }),
  updatedAt: t2.String({
    description: "Last update timestamp",
    format: "date-time"
  })
});
var createContactSchema = t2.Object({
  externalId: t2.Optional(t2.String({
    description: "Caller-supplied external ID (e.g. your own user ID)",
    maxLength: 255
  })),
  email: t2.Optional(t2.String({ description: "Email address", maxLength: 255, format: "email" })),
  phone: t2.Optional(t2.String({ description: "Phone number", maxLength: 50 })),
  firstName: t2.Optional(t2.String({ description: "First name", maxLength: 100 })),
  lastName: t2.Optional(t2.String({ description: "Last name", maxLength: 100 })),
  company: t2.Optional(t2.String({ description: "Company name", maxLength: 200 })),
  jobTitle: t2.Optional(t2.String({ description: "Job title", maxLength: 200 })),
  emailStatus: t2.Optional(t2.Union([
    t2.Literal("active"),
    t2.Literal("unsubscribed"),
    t2.Literal("bounced"),
    t2.Literal("complained")
  ], { description: "Email subscription status" })),
  smsStatus: t2.Optional(t2.Union([
    t2.Literal("pending_consent"),
    t2.Literal("opted_in"),
    t2.Literal("opted_out"),
    t2.Literal("invalid")
  ], { description: "SMS consent status" })),
  preferredChannel: t2.Optional(t2.Union([t2.Literal("email"), t2.Literal("sms")], {
    description: "Preferred communication channel"
  })),
  properties: propertiesSchema,
  topicIds: t2.Optional(t2.Array(t2.String({ maxLength: 36 }), {
    description: "Topic IDs to subscribe"
  })),
  topicSlugs: t2.Optional(t2.Array(t2.String({ maxLength: 100 }), {
    description: "Topic slugs to subscribe"
  }))
});
var updateContactSchema = t2.Object({
  email: t2.Optional(t2.String({ description: "Email address", maxLength: 255, format: "email" })),
  phone: t2.Optional(t2.String({ description: "Phone number", maxLength: 50 })),
  firstName: t2.Optional(t2.Union([t2.String({ maxLength: 100 }), t2.Null()], {
    description: "First name"
  })),
  lastName: t2.Optional(t2.Union([t2.String({ maxLength: 100 }), t2.Null()], {
    description: "Last name"
  })),
  company: t2.Optional(t2.Union([t2.String({ maxLength: 200 }), t2.Null()], {
    description: "Company name"
  })),
  jobTitle: t2.Optional(t2.Union([t2.String({ maxLength: 200 }), t2.Null()], {
    description: "Job title"
  })),
  emailStatus: t2.Optional(t2.Union([
    t2.Literal("active"),
    t2.Literal("unsubscribed"),
    t2.Literal("bounced"),
    t2.Literal("complained")
  ], { description: "Email subscription status" })),
  smsStatus: t2.Optional(t2.Union([
    t2.Literal("pending_consent"),
    t2.Literal("opted_in"),
    t2.Literal("opted_out"),
    t2.Literal("invalid")
  ], { description: "SMS consent status" })),
  preferredChannel: t2.Optional(t2.Union([t2.Literal("email"), t2.Literal("sms"), t2.Null()], {
    description: "Preferred communication channel (null to clear)"
  })),
  properties: propertiesSchema,
  topicIds: t2.Optional(t2.Array(t2.String({ maxLength: 36 }), {
    description: "Topic IDs to subscribe"
  })),
  topicSlugs: t2.Optional(t2.Array(t2.String({ maxLength: 100 }), {
    description: "Topic slugs to subscribe"
  }))
});
var listContactsQuerySchema = t2.Object({
  page: t2.Optional(t2.String({ description: "Page number (1-indexed)", maxLength: 10 })),
  pageSize: t2.Optional(t2.String({
    description: "Number of items per page (max 100)",
    maxLength: 10
  })),
  emailStatus: t2.Optional(t2.Union([
    t2.Literal("active"),
    t2.Literal("unsubscribed"),
    t2.Literal("bounced"),
    t2.Literal("complained")
  ], { description: "Filter by email status" })),
  smsStatus: t2.Optional(t2.Union([
    t2.Literal("pending_consent"),
    t2.Literal("opted_in"),
    t2.Literal("opted_out"),
    t2.Literal("invalid")
  ], { description: "Filter by SMS status" })),
  search: t2.Optional(t2.String({ description: "Search by email or phone", maxLength: 255 })),
  preferredChannel: t2.Optional(t2.Union([t2.Literal("email"), t2.Literal("sms")], {
    description: "Filter by preferred channel"
  }))
});
var contactsRoutes = createAuthenticatedRoutes("/v1/contacts").get("/", async (ctx) => {
  const { query } = ctx;
  const authContext = getAuth(ctx);
  const page = Number.parseInt(query.page || "1", 10);
  const pageSize = Math.min(Number.parseInt(query.pageSize || "50", 10), 100);
  const { contacts, total } = await listContacts(authContext.organizationId, {
    emailStatus: query.emailStatus,
    smsStatus: query.smsStatus,
    preferredChannel: query.preferredChannel,
    search: query.search
  }, { page, pageSize });
  return {
    contacts: contacts.map((c3) => ({
      id: c3.id,
      externalId: c3.externalId,
      email: c3.email,
      phone: c3.phone,
      firstName: c3.firstName,
      lastName: c3.lastName,
      company: c3.company,
      jobTitle: c3.jobTitle,
      emailStatus: c3.emailStatus,
      smsStatus: c3.smsStatus,
      preferredChannel: c3.preferredChannel,
      properties: c3.properties,
      emailsSent: c3.emailsSent,
      emailsOpened: c3.emailsOpened,
      emailsClicked: c3.emailsClicked,
      smsSent: c3.smsSent,
      smsClicked: c3.smsClicked,
      createdAt: c3.createdAt.toISOString(),
      updatedAt: c3.updatedAt.toISOString()
    })),
    total,
    page,
    pageSize,
    totalPages: Math.ceil(total / pageSize)
  };
}, {
  query: listContactsQuerySchema,
  response: {
    200: t2.Object({
      contacts: t2.Array(contactResponseSchema),
      total: t2.Number({
        description: "Total number of contacts matching filter"
      }),
      page: t2.Number({ description: "Current page number" }),
      pageSize: t2.Number({ description: "Number of items per page" }),
      totalPages: t2.Number({ description: "Total number of pages" })
    })
  },
  detail: {
    tags: ["contacts"],
    summary: "List contacts",
    description: "Lists contacts with pagination and filtering"
  }
}).get("/:id", async (ctx) => {
  const { params } = ctx;
  const authContext = getAuth(ctx);
  const result = await findContact(params.id, authContext.organizationId);
  if (!result) {
    ctx.set.status = 404;
    return { error: "Contact not found" };
  }
  return {
    id: result.id,
    externalId: result.externalId,
    email: result.email,
    phone: result.phone,
    firstName: result.firstName,
    lastName: result.lastName,
    company: result.company,
    jobTitle: result.jobTitle,
    emailStatus: result.emailStatus,
    smsStatus: result.smsStatus,
    preferredChannel: result.preferredChannel,
    properties: result.properties,
    emailsSent: result.emailsSent,
    emailsOpened: result.emailsOpened,
    emailsClicked: result.emailsClicked,
    smsSent: result.smsSent,
    smsClicked: result.smsClicked,
    createdAt: result.createdAt.toISOString(),
    updatedAt: result.updatedAt.toISOString(),
    topics: result.topics.map((t3) => ({
      ...t3,
      subscribedAt: t3.subscribedAt?.toISOString() ?? null
    }))
  };
}, {
  params: t2.Object({
    id: t2.String({
      description: "Contact UUID, email, or externalId",
      maxLength: 255
    })
  }),
  response: {
    200: t2.Object({
      ...contactResponseSchema.properties,
      topics: t2.Array(t2.Object({
        topicId: t2.String(),
        topicName: t2.String(),
        status: t2.String(),
        subscribedAt: t2.Union([t2.String(), t2.Null()])
      }))
    }),
    404: errorResponse2
  },
  detail: {
    tags: ["contacts"],
    summary: "Get contact",
    description: "Returns a single contact by ID with topic subscriptions"
  }
}).post("/", async (ctx) => {
  const { body: body2 } = ctx;
  const authContext = getAuth(ctx);
  if (!(body2.email || body2.phone)) {
    ctx.set.status = 400;
    return { error: "Email or phone is required" };
  }
  if (body2.externalId) {
    const existing = await findContactByExternalId(body2.externalId, authContext.organizationId);
    if (existing) {
      ctx.set.status = 409;
      return { error: "Contact with this externalId already exists" };
    }
  }
  if (body2.email) {
    const existing = await findContactByEmailHash(hashContactValue(body2.email), authContext.organizationId);
    if (existing) {
      ctx.set.status = 409;
      return { error: "Contact with this email already exists" };
    }
  }
  if (body2.phone) {
    const existing = await findContactByPhoneHash(hashContactValue(body2.phone), authContext.organizationId);
    if (existing) {
      ctx.set.status = 409;
      return { error: "Contact with this phone already exists" };
    }
  }
  const newContact = await insertContact({
    organizationId: authContext.organizationId,
    externalId: body2.externalId ?? null,
    email: body2.email,
    emailHash: body2.email ? hashContactValue(body2.email) : null,
    emailStatus: body2.emailStatus ?? (body2.email ? "active" : null),
    phone: body2.phone,
    phoneHash: body2.phone ? hashContactValue(body2.phone) : null,
    smsStatus: body2.smsStatus ?? (body2.phone ? "pending_consent" : null),
    firstName: body2.firstName ?? null,
    lastName: body2.lastName ?? null,
    company: body2.company ?? null,
    jobTitle: body2.jobTitle ?? null,
    preferredChannel: body2.preferredChannel ?? null,
    properties: body2.properties ?? {},
    createdBy: authContext.userId
  });
  if (!newContact) {
    ctx.set.status = 409;
    if (body2.email) {
      return { error: "Contact with this email already exists" };
    }
    return { error: "Contact with this phone already exists" };
  }
  let topicIds = body2.topicIds || [];
  if (body2.topicSlugs && body2.topicSlugs.length > 0) {
    const resolvedIds = await resolveTopicSlugs(body2.topicSlugs, authContext.organizationId);
    topicIds = [...topicIds, ...resolvedIds];
  }
  const pendingTopics = [];
  let ownedTopicIds = [];
  const immediateTopicNames = new Map;
  if (topicIds.length > 0) {
    const topicInfos = await fetchTopicsForSubscription(topicIds, authContext.organizationId);
    const topicMap = new Map(topicInfos.map((t3) => [t3.id, t3]));
    ownedTopicIds = topicIds.filter((id) => topicMap.has(id));
    for (const id of ownedTopicIds) {
      immediateTopicNames.set(id, topicMap.get(id).name);
    }
    const now = new Date;
    await insertContactTopics(ownedTopicIds.map((topicId) => {
      const topicInfo = topicMap.get(topicId);
      const requiresConfirmation = topicInfo.doubleOptIn;
      if (requiresConfirmation)
        pendingTopics.push(topicId);
      return {
        contactId: newContact.id,
        topicId,
        status: requiresConfirmation ? "pending" : "subscribed",
        subscribedAt: requiresConfirmation ? null : now,
        confirmedAt: requiresConfirmation ? null : now
      };
    }));
    if (pendingTopics.length > 0 && newContact.email) {
      const contactEmail = newContact.email;
      await Promise.all(pendingTopics.map(async (topicId) => {
        const topicInfo = topicMap.get(topicId);
        if (topicInfo) {
          try {
            await sendTopicConfirmationEmail({
              contactId: newContact.id,
              contactEmail,
              topicId,
              topicName: topicInfo.name,
              topicDescription: topicInfo.description,
              organizationId: authContext.organizationId
            });
          } catch (err) {
            log3.error("Failed to send confirmation email", err, {
              topicId,
              organizationId: authContext.organizationId
            });
          }
        }
      }));
    }
  }
  await emitContactCreated({
    contactId: newContact.id,
    organizationId: authContext.organizationId,
    contactData: {
      email: newContact.email,
      phone: newContact.phone,
      firstName: newContact.firstName,
      lastName: newContact.lastName,
      company: newContact.company,
      jobTitle: newContact.jobTitle,
      preferredChannel: newContact.preferredChannel
    }
  }).catch((err) => {
    log3.error("Failed to emit contact_created event", err, {
      organizationId: authContext.organizationId
    });
  });
  await checkSegmentEntry({
    contactId: newContact.id,
    organizationId: authContext.organizationId
  }).catch((err) => {
    log3.error("Failed to check segment entry", err, {
      organizationId: authContext.organizationId
    });
  });
  if (ownedTopicIds.length > 0) {
    const immediateTopics = ownedTopicIds.filter((tid) => !pendingTopics.includes(tid));
    await Promise.all(immediateTopics.map((topicId) => emitTopicSubscribed({
      contactId: newContact.id,
      organizationId: authContext.organizationId,
      topicId,
      topicName: immediateTopicNames.get(topicId)
    }).catch((err) => {
      log3.error("Failed to emit topic_subscribed event", err, {
        organizationId: authContext.organizationId
      });
    })));
  }
  ctx.set.status = 201;
  return {
    id: newContact.id,
    externalId: newContact.externalId,
    email: newContact.email,
    phone: newContact.phone,
    firstName: newContact.firstName,
    lastName: newContact.lastName,
    company: newContact.company,
    jobTitle: newContact.jobTitle,
    emailStatus: newContact.emailStatus,
    smsStatus: newContact.smsStatus,
    preferredChannel: newContact.preferredChannel,
    properties: newContact.properties,
    emailsSent: newContact.emailsSent,
    emailsOpened: newContact.emailsOpened,
    emailsClicked: newContact.emailsClicked,
    smsSent: newContact.smsSent,
    smsClicked: newContact.smsClicked,
    createdAt: newContact.createdAt.toISOString(),
    updatedAt: newContact.updatedAt.toISOString(),
    pendingTopics: pendingTopics.length > 0 ? pendingTopics : undefined
  };
}, {
  body: createContactSchema,
  response: {
    201: t2.Object({
      ...contactResponseSchema.properties,
      pendingTopics: t2.Optional(t2.Array(t2.String(), {
        description: "Topic IDs pending confirmation"
      }))
    }),
    400: errorResponse2,
    409: errorResponse2
  },
  detail: {
    tags: ["contacts"],
    summary: "Create contact",
    description: "Creates a new contact with optional topic subscriptions"
  }
}).patch("/:id", async (ctx) => {
  const { params, body: body2 } = ctx;
  const authContext = getAuth(ctx);
  const contactId = await resolveContactId(params.id, authContext.organizationId);
  if (!contactId) {
    ctx.set.status = 404;
    return { error: "Contact not found" };
  }
  const updateValues = {
    updatedAt: new Date
  };
  if (body2.email !== undefined) {
    updateValues.email = body2.email;
    updateValues.emailHash = body2.email ? hashContactValue(body2.email) : null;
  }
  if (body2.phone !== undefined) {
    updateValues.phone = body2.phone;
    updateValues.phoneHash = body2.phone ? hashContactValue(body2.phone) : null;
  }
  if (body2.emailStatus !== undefined)
    updateValues.emailStatus = body2.emailStatus;
  if (body2.smsStatus !== undefined)
    updateValues.smsStatus = body2.smsStatus;
  if (body2.properties !== undefined) {
    const patchProperties = JSON.stringify(body2.properties);
    updateValues.properties = sql`(COALESCE(${contact.properties}::jsonb, '{}'::jsonb) || ${patchProperties}::jsonb)::json`;
  }
  if (body2.firstName !== undefined)
    updateValues.firstName = body2.firstName;
  if (body2.lastName !== undefined)
    updateValues.lastName = body2.lastName;
  if (body2.company !== undefined)
    updateValues.company = body2.company;
  if (body2.jobTitle !== undefined)
    updateValues.jobTitle = body2.jobTitle;
  if (body2.preferredChannel !== undefined)
    updateValues.preferredChannel = body2.preferredChannel;
  const updated = await updateContactFields(contactId, authContext.organizationId, updateValues);
  const pendingTopics = [];
  if (body2.topicIds !== undefined || body2.topicSlugs !== undefined) {
    let topicIds = body2.topicIds || [];
    if (body2.topicSlugs && body2.topicSlugs.length > 0) {
      const resolvedIds = await resolveTopicSlugs(body2.topicSlugs, authContext.organizationId);
      topicIds = [...topicIds, ...resolvedIds];
    }
    const existingSubscriptions = await fetchContactSubscriptions(contactId);
    const activelySubscribedIds = new Set(existingSubscriptions.filter((s3) => s3.status === "subscribed").map((s3) => s3.topicId));
    const existingTopicIds = new Set(existingSubscriptions.map((s3) => s3.topicId));
    const confirmedTopics = new Map(existingSubscriptions.filter((s3) => s3.confirmedAt !== null).map((s3) => [s3.topicId, s3.confirmedAt]));
    const newTopicIds = topicIds.filter((id) => !existingTopicIds.has(id));
    const resubscribeTopicIds = topicIds.filter((id) => existingTopicIds.has(id) && !activelySubscribedIds.has(id));
    if (resubscribeTopicIds.length > 0) {
      const now = new Date;
      const topicInfosForResub = await fetchTopicsForSubscription(resubscribeTopicIds, authContext.organizationId);
      const resubTopicMap = new Map(topicInfosForResub.map((t3) => [t3.id, t3]));
      const ownedResubIds = resubscribeTopicIds.filter((id) => resubTopicMap.has(id));
      const directResubscribeIds = [];
      const pendingResubscribeIds = [];
      for (const topicId of ownedResubIds) {
        const topicInfo = resubTopicMap.get(topicId);
        const requiresConfirmation = topicInfo.doubleOptIn;
        const previouslyConfirmed = confirmedTopics.has(topicId);
        if (requiresConfirmation && !previouslyConfirmed) {
          pendingResubscribeIds.push(topicId);
          pendingTopics.push(topicId);
        } else {
          directResubscribeIds.push(topicId);
        }
      }
      await reactivateContactSubscriptions(contactId, directResubscribeIds, now);
      await Promise.all(directResubscribeIds.map((topicId) => emitTopicSubscribed({
        contactId,
        organizationId: authContext.organizationId,
        topicId,
        topicName: resubTopicMap.get(topicId)?.name
      }).catch((err) => {
        log3.error("Failed to emit topic_subscribed event", err, {
          organizationId: authContext.organizationId
        });
      })));
      await setPendingContactSubscriptions(contactId, pendingResubscribeIds);
      if (pendingResubscribeIds.length > 0 && updated.email) {
        const updatedEmail = updated.email;
        await Promise.all(pendingResubscribeIds.map(async (topicId) => {
          const topicInfo = resubTopicMap.get(topicId);
          if (topicInfo) {
            try {
              await sendTopicConfirmationEmail({
                contactId,
                contactEmail: updatedEmail,
                topicId,
                topicName: topicInfo.name,
                topicDescription: topicInfo.description,
                organizationId: authContext.organizationId
              });
            } catch (err) {
              log3.error("Failed to send confirmation email", err, {
                topicId,
                organizationId: authContext.organizationId
              });
            }
          }
        }));
      }
    }
    if (newTopicIds.length > 0) {
      const topicInfos = await fetchTopicsForSubscription(newTopicIds, authContext.organizationId);
      const topicMap = new Map(topicInfos.map((t3) => [t3.id, t3]));
      const ownedNewTopicIds = newTopicIds.filter((id) => topicMap.has(id));
      const now = new Date;
      await insertContactTopics(ownedNewTopicIds.map((topicId) => {
        const topicInfo = topicMap.get(topicId);
        const requiresConfirmation = topicInfo.doubleOptIn;
        const previouslyConfirmed = confirmedTopics.has(topicId);
        const needsConfirmation = requiresConfirmation && !previouslyConfirmed;
        if (needsConfirmation)
          pendingTopics.push(topicId);
        return {
          contactId,
          topicId,
          status: needsConfirmation ? "pending" : "subscribed",
          subscribedAt: needsConfirmation ? null : now,
          confirmedAt: needsConfirmation ? null : previouslyConfirmed ? confirmedTopics.get(topicId) ?? now : now
        };
      }));
      if (pendingTopics.length > 0 && updated.email) {
        const updatedEmail = updated.email;
        await Promise.all(pendingTopics.map(async (topicId) => {
          const topicInfo = topicMap.get(topicId);
          if (topicInfo) {
            try {
              await sendTopicConfirmationEmail({
                contactId,
                contactEmail: updatedEmail,
                topicId,
                topicName: topicInfo.name,
                topicDescription: topicInfo.description,
                organizationId: authContext.organizationId
              });
            } catch (err) {
              log3.error("Failed to send confirmation email", err, {
                topicId,
                organizationId: authContext.organizationId
              });
            }
          }
        }));
      }
      const immediateTopics = ownedNewTopicIds.filter((tid) => !pendingTopics.includes(tid));
      await Promise.all(immediateTopics.map((topicId) => {
        const topicInfo = topicMap.get(topicId);
        return emitTopicSubscribed({
          contactId,
          organizationId: authContext.organizationId,
          topicId,
          topicName: topicInfo?.name
        }).catch((err) => {
          log3.error("Failed to emit topic_subscribed event", err, {
            organizationId: authContext.organizationId
          });
        });
      }));
    }
  }
  const updatedFields = Object.keys(body2).filter((k4) => k4 !== "topicIds" && k4 !== "topicSlugs");
  await emitContactUpdated({
    contactId,
    organizationId: authContext.organizationId,
    updatedFields,
    contactData: {
      email: updated.email,
      phone: updated.phone,
      firstName: updated.firstName,
      lastName: updated.lastName,
      company: updated.company,
      jobTitle: updated.jobTitle,
      preferredChannel: updated.preferredChannel
    }
  }).catch((err) => {
    log3.error("Failed to emit contact_updated event", err, {
      organizationId: authContext.organizationId
    });
  });
  await checkSegmentEntry({
    contactId,
    organizationId: authContext.organizationId
  }).catch((err) => {
    log3.error("Failed to check segment entry", err, {
      organizationId: authContext.organizationId
    });
  });
  await checkSegmentExit({
    contactId,
    organizationId: authContext.organizationId
  }).catch((err) => {
    log3.error("Failed to check segment exit", err, {
      organizationId: authContext.organizationId
    });
  });
  return {
    id: updated.id,
    externalId: updated.externalId,
    email: updated.email,
    phone: updated.phone,
    firstName: updated.firstName,
    lastName: updated.lastName,
    company: updated.company,
    jobTitle: updated.jobTitle,
    emailStatus: updated.emailStatus,
    smsStatus: updated.smsStatus,
    preferredChannel: updated.preferredChannel,
    properties: updated.properties,
    emailsSent: updated.emailsSent,
    emailsOpened: updated.emailsOpened,
    emailsClicked: updated.emailsClicked,
    smsSent: updated.smsSent,
    smsClicked: updated.smsClicked,
    createdAt: updated.createdAt.toISOString(),
    updatedAt: updated.updatedAt.toISOString(),
    pendingTopics: pendingTopics.length > 0 ? pendingTopics : undefined
  };
}, {
  params: t2.Object({
    id: t2.String({
      description: "Contact UUID, email, or externalId",
      maxLength: 255
    })
  }),
  body: updateContactSchema,
  response: {
    200: t2.Object({
      ...contactResponseSchema.properties,
      pendingTopics: t2.Optional(t2.Array(t2.String(), {
        description: "Topic IDs pending confirmation"
      }))
    }),
    404: errorResponse2
  },
  detail: {
    tags: ["contacts"],
    summary: "Update contact",
    description: "Updates an existing contact"
  }
}).delete("/:id", async (ctx) => {
  const { params } = ctx;
  const authContext = getAuth(ctx);
  const resolvedId = await resolveContactId(params.id, authContext.organizationId);
  if (!resolvedId) {
    ctx.set.status = 404;
    return { error: "Contact not found" };
  }
  await deleteContact(resolvedId, authContext.organizationId);
  return { success: true };
}, {
  params: t2.Object({
    id: t2.String({
      description: "Contact UUID, email, or externalId",
      maxLength: 255
    })
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean()
    }),
    404: errorResponse2
  },
  detail: {
    tags: ["contacts"],
    summary: "Delete contact",
    description: "Deletes a single contact"
  }
}).delete("/", async (ctx) => {
  const { body: body2 } = ctx;
  const authContext = getAuth(ctx);
  if (!body2.ids || body2.ids.length === 0) {
    ctx.set.status = 400;
    return { error: "No contact IDs provided" };
  }
  if (body2.ids.length > 100) {
    ctx.set.status = 400;
    return { error: "Maximum 100 contacts can be deleted at once" };
  }
  const deleted = await bulkDeleteContacts(body2.ids, authContext.organizationId);
  return { success: true, deleted };
}, {
  body: t2.Object({
    ids: t2.Array(t2.String({ maxLength: 36 }), {
      description: "Contact IDs to delete (max 100)"
    })
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      deleted: t2.Number({ description: "Number of contacts deleted" })
    }),
    400: errorResponse2
  },
  detail: {
    tags: ["contacts"],
    summary: "Bulk delete contacts",
    description: "Deletes multiple contacts at once (max 100)"
  }
});

// src/routes/contacts-topics.ts
var errorResponse3 = t2.Object({
  error: t2.String({ description: "Error message" })
});
var contactsTopicsRoutes = createAuthenticatedRoutes("/v1/contacts").put("/:id/topics", async (ctx) => {
  const { params, body: body2 } = ctx;
  const authContext = getAuth(ctx);
  const [existing] = await db.select({ id: contact.id }).from(contact).where(and(eq(contact.id, params.id), eq(contact.organizationId, authContext.organizationId))).limit(1);
  if (!existing) {
    ctx.set.status = 404;
    return { error: "Contact not found" };
  }
  let topicIds = body2.topicIds || [];
  if (body2.topicSlugs && body2.topicSlugs.length > 0) {
    const resolvedIds = await resolveTopicSlugs(body2.topicSlugs, authContext.organizationId);
    topicIds = [...topicIds, ...resolvedIds];
  }
  const existingSubscriptions = await db.select({
    topicId: contactTopic.topicId,
    topicName: topic.name,
    status: contactTopic.status,
    confirmedAt: contactTopic.confirmedAt
  }).from(contactTopic).innerJoin(topic, eq(topic.id, contactTopic.topicId)).where(eq(contactTopic.contactId, params.id));
  const existingTopicIds = new Set(existingSubscriptions.map((s3) => s3.topicId));
  const confirmedTopics = new Map(existingSubscriptions.filter((s3) => s3.confirmedAt !== null).map((s3) => [s3.topicId, s3.confirmedAt]));
  const activelySubscribedTopics = existingSubscriptions.filter((s3) => s3.status === "subscribed");
  await db.delete(contactTopic).where(eq(contactTopic.contactId, params.id));
  const pendingTopics = [];
  if (topicIds.length > 0) {
    const topicInfos = await fetchTopicsForSubscription(topicIds, authContext.organizationId);
    const topicMap = new Map(topicInfos.map((t3) => [t3.id, t3]));
    const ownedTopicIds = topicIds.filter((id) => topicMap.has(id));
    const now = new Date;
    const [contactData] = await db.select({ email: contact.email }).from(contact).where(eq(contact.id, params.id)).limit(1);
    await db.insert(contactTopic).values(ownedTopicIds.map((topicId) => {
      const topicInfo = topicMap.get(topicId);
      const requiresConfirmation = topicInfo.doubleOptIn;
      const previouslyConfirmed = confirmedTopics.has(topicId);
      const needsConfirmation = requiresConfirmation && !previouslyConfirmed;
      if (needsConfirmation) {
        pendingTopics.push(topicId);
      }
      return {
        contactId: params.id,
        topicId,
        status: needsConfirmation ? "pending" : "subscribed",
        subscribedAt: needsConfirmation ? null : now,
        confirmedAt: needsConfirmation ? null : previouslyConfirmed ? confirmedTopics.get(topicId) : now
      };
    }));
    if (pendingTopics.length > 0 && contactData?.email) {
      await Promise.all(pendingTopics.map(async (topicId) => {
        const topicInfo = topicMap.get(topicId);
        if (topicInfo) {
          try {
            await sendTopicConfirmationEmail({
              contactId: params.id,
              contactEmail: contactData.email,
              topicId,
              topicName: topicInfo.name,
              topicDescription: topicInfo.description,
              organizationId: authContext.organizationId
            });
          } catch (err) {
            log3.error("Failed to send confirmation email", err, {
              topicId,
              organizationId: authContext.organizationId
            });
          }
        }
      }));
    }
    const newlySubscribedTopics = ownedTopicIds.filter((tid) => !(pendingTopics.includes(tid) || existingTopicIds.has(tid)));
    await Promise.all(newlySubscribedTopics.map((topicId) => {
      const topicInfo = topicMap.get(topicId);
      return emitTopicSubscribed({
        contactId: params.id,
        organizationId: authContext.organizationId,
        topicId,
        topicName: topicInfo?.name
      }).catch((err) => {
        log3.error("Failed to emit topic_subscribed event", err, {
          organizationId: authContext.organizationId
        });
      });
    }));
  }
  const removedTopics = activelySubscribedTopics.filter((t3) => !topicIds.includes(t3.topicId));
  if (removedTopics.length > 0) {
    await Promise.all(removedTopics.map((t3) => emitTopicUnsubscribed({
      contactId: params.id,
      organizationId: authContext.organizationId,
      topicId: t3.topicId,
      topicName: t3.topicName
    }).catch((err) => {
      log3.error("Failed to emit topic_unsubscribed event", err, {
        organizationId: authContext.organizationId
      });
    })));
  }
  await Promise.all([
    checkSegmentEntry({
      contactId: params.id,
      organizationId: authContext.organizationId
    }).catch((err) => {
      log3.error("Failed to check segment entry", err, {
        organizationId: authContext.organizationId
      });
    }),
    checkSegmentExit({
      contactId: params.id,
      organizationId: authContext.organizationId
    }).catch((err) => {
      log3.error("Failed to check segment exit", err, {
        organizationId: authContext.organizationId
      });
    })
  ]);
  const updatedTopics = await db.select({
    topicId: contactTopic.topicId,
    topicName: topic.name,
    status: contactTopic.status,
    subscribedAt: contactTopic.subscribedAt
  }).from(contactTopic).innerJoin(topic, eq(topic.id, contactTopic.topicId)).where(eq(contactTopic.contactId, params.id));
  return {
    topics: updatedTopics.map((t3) => ({
      ...t3,
      subscribedAt: t3.subscribedAt?.toISOString() ?? null
    })),
    pendingTopics: pendingTopics.length > 0 ? pendingTopics : undefined
  };
}, {
  params: t2.Object({
    id: t2.String({ description: "Contact ID", maxLength: 36 })
  }),
  body: t2.Object({
    topicIds: t2.Optional(t2.Array(t2.String({ maxLength: 36 }), {
      description: "Topic IDs to subscribe"
    })),
    topicSlugs: t2.Optional(t2.Array(t2.String({ maxLength: 100 }), {
      description: "Topic slugs to subscribe"
    }))
  }),
  response: {
    200: t2.Object({
      topics: t2.Array(t2.Object({
        topicId: t2.String(),
        topicName: t2.String(),
        status: t2.String(),
        subscribedAt: t2.Union([t2.String(), t2.Null()])
      })),
      pendingTopics: t2.Optional(t2.Array(t2.String()))
    }),
    404: errorResponse3
  },
  detail: {
    tags: ["contacts"],
    summary: "Replace contact topics",
    description: "Replaces all topic subscriptions for a contact. Use PATCH to add topics without removing existing ones."
  }
});

// src/routes/email-logs.ts
var emailLogsRoutes = createAuthenticatedRoutes("/v1/email/logs").get("/", async (ctx) => {
  const authContext = getAuth(ctx);
  const { status: status2, limit, cursor } = ctx.query;
  const result = await listEmailLogs(authContext.organizationId, {
    status: status2,
    limit,
    cursor
  });
  return result;
}, {
  query: t2.Object({
    status: t2.Optional(t2.Union([
      t2.Literal("sent"),
      t2.Literal("delivered"),
      t2.Literal("opened"),
      t2.Literal("clicked"),
      t2.Literal("bounced"),
      t2.Literal("complained"),
      t2.Literal("suppressed"),
      t2.Literal("failed"),
      t2.Literal("queued"),
      t2.Literal("pending"),
      t2.Literal("opted_out")
    ])),
    limit: t2.Optional(t2.Number({ default: 20, minimum: 1, maximum: 100 })),
    cursor: t2.Optional(t2.String())
  }),
  detail: {
    tags: ["email-logs"],
    summary: "List email delivery logs",
    description: "Returns paginated email delivery logs for the organization."
  }
}).get("/:messageId", async (ctx) => {
  const authContext = getAuth(ctx);
  const { messageId } = ctx.params;
  const log4 = await getEmailLogByMessageId(messageId, authContext.organizationId);
  if (!log4) {
    ctx.set.status = 404;
    return { error: "Log entry not found" };
  }
  return log4;
}, {
  params: t2.Object({
    messageId: t2.String({ description: "SES Message ID" })
  }),
  detail: {
    tags: ["email-logs"],
    summary: "Get email log by message ID",
    description: "Returns full log detail for a specific SES message ID."
  }
});

// src/routes/events.ts
import { createHash as createHash3 } from "node:crypto";

// src/middleware/event-limit.ts
var EVENT_LIMITS = {
  free: 5000,
  starter: 50000,
  growth: 250000,
  scale: 1e6
};
function getPeriodKey() {
  const now = new Date;
  return `${now.getUTCFullYear()}-${String(now.getUTCMonth() + 1).padStart(2, "0")}`;
}
async function getEventUsageCount(organizationId) {
  const periodKey = getPeriodKey();
  const [usage] = await db.select({ eventCount: eventUsageMonthly.eventCount }).from(eventUsageMonthly).where(and(eq(eventUsageMonthly.organizationId, organizationId), eq(eventUsageMonthly.periodKey, periodKey))).limit(1);
  return usage?.eventCount ?? 0;
}
async function incrementEventUsage(organizationId, count2 = 1) {
  const periodKey = getPeriodKey();
  const result = await db.insert(eventUsageMonthly).values({
    organizationId,
    periodKey,
    eventCount: count2,
    updatedAt: new Date
  }).onConflictDoUpdate({
    target: [eventUsageMonthly.organizationId, eventUsageMonthly.periodKey],
    set: {
      eventCount: sql`${eventUsageMonthly.eventCount} + ${count2}`,
      updatedAt: new Date
    }
  }).returning({ eventCount: eventUsageMonthly.eventCount });
  return result[0]?.eventCount ?? count2;
}
function getEventTTLExpiration() {
  const ttl = new Date;
  ttl.setFullYear(ttl.getFullYear() + 2);
  return ttl;
}
async function enforceEventLimit(ctx) {
  const auth = getAuthOptional(ctx);
  if (!auth)
    return;
  if (isSelfHosted())
    return;
  const { set: set2 } = ctx;
  const { organizationId, planId } = auth;
  const limit = EVENT_LIMITS[planId] ?? EVENT_LIMITS.free;
  try {
    const currentUsage = await getEventUsageCount(organizationId);
    const percentUsed = Math.round(currentUsage / limit * 100);
    const remaining = Math.max(0, limit - currentUsage);
    const graceLimit = Math.floor(limit * 1.25);
    set2.headers["X-Event-Limit"] = String(limit);
    set2.headers["X-Event-Current"] = String(currentUsage);
    set2.headers["X-Event-Remaining"] = String(remaining);
    set2.headers["X-Event-Percent"] = String(percentUsed);
    if (currentUsage >= graceLimit) {
      set2.status = 429;
      set2.headers["X-Event-Exceeded"] = "true";
      set2.headers["Retry-After"] = String(getSecondsUntilNextMonth());
      return {
        error: "event_limit_exceeded",
        message: `Monthly event limit exceeded (${percentUsed}% used). Upgrade your plan to continue ingesting events.`,
        upgradeUrl: "https://app.wraps.dev/settings/billing",
        current: currentUsage,
        limit,
        percentUsed,
        resetsAt: getNextMonthResetDate().toISOString()
      };
    }
    if (currentUsage >= limit) {
      log3.warn("Event limit reached", {
        organizationId,
        percentUsed,
        currentUsage,
        limit
      });
    }
  } catch (error49) {
    log3.error("Event limit check failed", error49, { organizationId });
  }
}
function getSecondsUntilNextMonth() {
  const now = new Date;
  const nextMonth = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth() + 1, 1, 0, 0, 0));
  return Math.ceil((nextMonth.getTime() - now.getTime()) / 1000);
}
function getNextMonthResetDate() {
  const now = new Date;
  return new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth() + 1, 1, 0, 0, 0));
}

// src/routes/events.ts
function hashEmail(email3) {
  return createHash3("sha256").update(email3.toLowerCase().trim()).digest("hex");
}
var _errorResponse2 = t2.Object({
  error: t2.String({ description: "Error message" })
});
var propertiesSchema2 = t2.Optional(t2.Object({}, { additionalProperties: true, description: "Event properties" }));
var eventsRoutes = createAuthenticatedRoutes("/v1/events").onBeforeHandle(enforceEventLimit).post("/", async (ctx) => {
  const { body: body2 } = ctx;
  const auth = getAuth(ctx);
  const {
    name: name3,
    contactId,
    contactExternalId,
    contactEmail,
    contactName,
    createIfMissing,
    properties: properties2
  } = body2;
  let contactRecord;
  let contactCreated = false;
  if (contactId) {
    contactRecord = await findContactById(contactId, auth.organizationId) ?? undefined;
  } else if (contactExternalId) {
    contactRecord = await findContactByExternalIdInOrg(contactExternalId, auth.organizationId) ?? undefined;
  } else if (contactEmail) {
    contactRecord = await findContactByEmailInOrg(contactEmail, auth.organizationId) ?? undefined;
  }
  if (!contactRecord && createIfMissing && contactEmail) {
    const normalizedEmail = contactEmail.toLowerCase().trim();
    const emailHash = hashEmail(normalizedEmail);
    const newContact = await insertContact({
      organizationId: auth.organizationId,
      email: normalizedEmail,
      emailHash,
      emailStatus: "active",
      firstName: contactName || null,
      properties: {}
    });
    if (newContact) {
      contactRecord = newContact;
      contactCreated = true;
    } else {
      const existing = await findContactByEmailHash(emailHash, auth.organizationId);
      if (existing) {
        const full = await findContactById(existing.id, auth.organizationId);
        contactRecord = full ?? undefined;
      }
    }
  }
  if (!contactRecord) {
    ctx.set.status = 400;
    return {
      success: false,
      error: "Contact not found"
    };
  }
  const results = {
    workflowsTriggered: 0,
    executionsResumed: 0
  };
  await insertContactEvent({
    contactId: contactRecord.id,
    organizationId: auth.organizationId,
    eventName: name3,
    eventData: properties2 || {},
    expiresAt: getEventTTLExpiration()
  });
  await incrementEventUsage(auth.organizationId);
  const matchingWorkflows = await findEventWorkflows(auth.organizationId, name3);
  for (const wf of matchingWorkflows) {
    await enqueueWorkflowStep({
      type: "trigger",
      workflowId: wf.id,
      contactId: contactRecord.id,
      organizationId: auth.organizationId,
      eventData: properties2 || {}
    });
    results.workflowsTriggered++;
  }
  const waitingExecutions = await findWaitingExecutions(auth.organizationId, contactRecord.id, name3);
  for (const execution of waitingExecutions) {
    if (execution.waitTimeoutSchedulerName) {
      await deleteScheduledStep(execution.waitTimeoutSchedulerName);
    }
    await enqueueWorkflowStep({
      type: "resume",
      executionId: execution.id,
      branch: "yes",
      organizationId: auth.organizationId
    });
    results.executionsResumed++;
  }
  await touchContactLastActivity(contactRecord.id, auth.organizationId);
  return {
    success: true,
    contactCreated,
    ...results
  };
}, {
  body: t2.Object({
    name: t2.String({
      description: "Event name (e.g., 'purchase.completed')",
      maxLength: 255
    }),
    contactId: t2.Optional(t2.String({ description: "Contact ID", maxLength: 36 })),
    contactExternalId: t2.Optional(t2.String({
      description: "Contact externalId (alternative to contactId)",
      maxLength: 255
    })),
    contactEmail: t2.Optional(t2.String({
      description: "Contact email (alternative to contactId)",
      maxLength: 255,
      format: "email"
    })),
    contactName: t2.Optional(t2.String({
      description: "Contact name (used when createIfMissing is true to set firstName)",
      maxLength: 100
    })),
    createIfMissing: t2.Optional(t2.Boolean({
      description: "If true and contact doesn't exist, create a new contact with the provided email",
      default: false
    })),
    properties: propertiesSchema2
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      contactCreated: t2.Boolean({
        description: "Whether a new contact was created"
      }),
      workflowsTriggered: t2.Number({
        description: "Number of workflows triggered"
      }),
      executionsResumed: t2.Number({
        description: "Number of executions resumed"
      })
    }),
    400: t2.Object({
      success: t2.Literal(false),
      error: t2.String()
    })
  },
  detail: {
    summary: "Ingest event",
    description: "Send a custom event to trigger workflows and resume waiting executions",
    tags: ["events"]
  }
}).post("/batch", async (ctx) => {
  const { body: body2 } = ctx;
  const auth = getAuth(ctx);
  const results = {
    processed: 0,
    workflowsTriggered: 0,
    executionsResumed: 0,
    errors: []
  };
  const events = body2.events;
  if (events.length === 0) {
    return { success: true, ...results };
  }
  const contactIdEvents = events.filter((e3) => e3.contactId);
  const contactExternalIdEvents = events.filter((e3) => !e3.contactId && e3.contactExternalId);
  const contactEmailEvents = events.filter((e3) => !(e3.contactId || e3.contactExternalId) && e3.contactEmail);
  const contactMap = new Map;
  if (contactIdEvents.length > 0) {
    const uniqueIds = [
      ...new Set(contactIdEvents.map((e3) => e3.contactId))
    ];
    const contactsById = await findContactsByIdsInOrg(auth.organizationId, uniqueIds);
    for (const c3 of contactsById) {
      contactMap.set(c3.id, c3);
    }
  }
  if (contactExternalIdEvents.length > 0) {
    const uniqueExternalIds = [
      ...new Set(contactExternalIdEvents.map((e3) => e3.contactExternalId))
    ];
    const contactsByExternalId = await findContactsByExternalIdsInOrg(auth.organizationId, uniqueExternalIds);
    for (const c3 of contactsByExternalId) {
      if (c3.externalId) {
        contactMap.set(c3.externalId, c3);
      }
    }
  }
  if (contactEmailEvents.length > 0) {
    const uniqueEmails = [
      ...new Set(contactEmailEvents.map((e3) => e3.contactEmail))
    ];
    const contactsByEmail = await findContactsByEmailsInOrg(auth.organizationId, uniqueEmails);
    for (const c3 of contactsByEmail) {
      if (c3.email) {
        contactMap.set(c3.email, c3);
      }
    }
  }
  const resolvedEvents = [];
  for (const event of events) {
    const contactRecord = event.contactId ? contactMap.get(event.contactId) : event.contactExternalId ? contactMap.get(event.contactExternalId) : event.contactEmail ? contactMap.get(event.contactEmail) : undefined;
    if (!contactRecord) {
      results.errors.push(`Contact not found for event ${event.name}`);
      continue;
    }
    resolvedEvents.push({
      name: event.name,
      contactRecord,
      properties: event.properties || {}
    });
  }
  if (resolvedEvents.length === 0) {
    return { success: results.errors.length === 0, ...results };
  }
  const expiresAt = getEventTTLExpiration();
  await insertContactEventsBatch(resolvedEvents.map((e3) => ({
    contactId: e3.contactRecord.id,
    organizationId: auth.organizationId,
    eventName: e3.name,
    eventData: e3.properties,
    expiresAt
  })));
  results.processed = resolvedEvents.length;
  const uniqueEventNames = [...new Set(resolvedEvents.map((e3) => e3.name))];
  const matchingWorkflows = await findEventWorkflowsBatch(auth.organizationId, uniqueEventNames);
  const workflowsByEvent = new Map;
  for (const wf of matchingWorkflows) {
    const eventName = wf.triggerConfig?.eventName;
    if (!eventName) {
      continue;
    }
    const existing = workflowsByEvent.get(eventName) || [];
    existing.push(wf);
    workflowsByEvent.set(eventName, existing);
  }
  const uniqueContactIds = [
    ...new Set(resolvedEvents.map((e3) => e3.contactRecord.id))
  ];
  const waitingExecutions = await findWaitingExecutionsBatch(auth.organizationId, uniqueContactIds, uniqueEventNames);
  const waitingByKey = new Map;
  for (const exec of waitingExecutions) {
    const key = `${exec.contactId}:${exec.waitingForEvent}`;
    const existing = waitingByKey.get(key) || [];
    existing.push(exec);
    waitingByKey.set(key, existing);
  }
  const allJobs = [];
  for (const event of resolvedEvents) {
    const wfs = workflowsByEvent.get(event.name) || [];
    for (const wf of wfs) {
      allJobs.push({
        type: "trigger",
        workflowId: wf.id,
        contactId: event.contactRecord.id,
        organizationId: auth.organizationId,
        eventData: event.properties
      });
      results.workflowsTriggered++;
    }
    const key = `${event.contactRecord.id}:${event.name}`;
    const executions = waitingByKey.get(key) || [];
    for (const execution of executions) {
      if (execution.waitTimeoutSchedulerName) {
        await deleteScheduledStep(execution.waitTimeoutSchedulerName);
      }
      allJobs.push({
        type: "resume",
        executionId: execution.id,
        branch: "yes",
        organizationId: auth.organizationId
      });
      results.executionsResumed++;
    }
  }
  if (allJobs.length > 0) {
    await enqueueWorkflowStepBatch(allJobs);
  }
  if (results.processed > 0) {
    await incrementEventUsage(auth.organizationId, results.processed);
  }
  return {
    success: results.errors.length === 0,
    ...results
  };
}, {
  body: t2.Object({
    events: t2.Array(t2.Object({
      name: t2.String({ maxLength: 255 }),
      contactId: t2.Optional(t2.String({ maxLength: 36 })),
      contactExternalId: t2.Optional(t2.String({ maxLength: 255 })),
      contactEmail: t2.Optional(t2.String({ maxLength: 255 })),
      properties: t2.Optional(t2.Object({}, { additionalProperties: true }))
    }), { description: "List of events to process", maxItems: 1000 })
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      processed: t2.Number({ description: "Number of events processed" }),
      workflowsTriggered: t2.Number({
        description: "Total workflows triggered"
      }),
      executionsResumed: t2.Number({
        description: "Total executions resumed"
      }),
      errors: t2.Array(t2.String(), { description: "Error messages if any" })
    })
  },
  detail: {
    summary: "Batch ingest events",
    description: "Process multiple events in a single request",
    tags: ["events"]
  }
});

// src/routes/health.ts
var healthRoutes = new Elysia({ prefix: "" }).get("/health", () => ({
  status: "ok",
  timestamp: new Date().toISOString(),
  version: "1.0.0"
}), {
  response: t2.Object({
    status: t2.String({ description: "Health status", examples: ["ok"] }),
    timestamp: t2.String({
      description: "ISO 8601 timestamp",
      format: "date-time"
    }),
    version: t2.String({ description: "API version", examples: ["1.0.0"] })
  }),
  detail: {
    tags: ["health"],
    summary: "Health check",
    description: "Returns the health status of the API"
  }
}).get("/", () => ({
  name: "Wraps Platform API",
  version: "1.0.0",
  docs: "/swagger"
}), {
  response: t2.Object({
    name: t2.String({ description: "API name" }),
    version: t2.String({ description: "API version" }),
    docs: t2.String({ description: "Documentation URL" })
  }),
  detail: {
    tags: ["health"],
    summary: "API info",
    description: "Returns basic API information"
  }
});

// src/routes/preference-events.ts
var preferenceEventsRoutes = new Elysia({
  prefix: "/v1/preference-events"
}).post("/", async ({ body: body2, set: set2 }) => {
  const { token: token2, contactId, organizationId, changes } = body2;
  const payload = await verifyUnsubscribeToken2(token2);
  if (!payload || payload.cid !== contactId || payload.oid !== organizationId) {
    set2.status = 401;
    return { error: "Invalid or expired token" };
  }
  let subscribed = 0;
  let unsubscribed = 0;
  for (const change of changes) {
    if (change.action === "subscribed") {
      await emitTopicSubscribed({
        contactId,
        organizationId,
        topicId: change.topicId,
        topicName: change.topicName
      }).catch((err) => {
        log3.error("Failed to emit topic_subscribed from preference center", err, {
          contactId,
          topicId: change.topicId
        });
      });
      subscribed++;
    } else if (change.action === "unsubscribed") {
      await emitTopicUnsubscribed({
        contactId,
        organizationId,
        topicId: change.topicId,
        topicName: change.topicName
      }).catch((err) => {
        log3.error("Failed to emit topic_unsubscribed from preference center", err, {
          contactId,
          topicId: change.topicId
        });
      });
      unsubscribed++;
    }
  }
  return { success: true, subscribed, unsubscribed };
}, {
  body: t2.Object({
    token: t2.String(),
    contactId: t2.String(),
    organizationId: t2.String(),
    changes: t2.Array(t2.Object({
      topicId: t2.String(),
      topicName: t2.Optional(t2.String()),
      action: t2.Union([t2.Literal("subscribed"), t2.Literal("unsubscribed")])
    }))
  }),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      subscribed: t2.Number(),
      unsubscribed: t2.Number()
    }),
    401: t2.Object({
      error: t2.String()
    })
  },
  detail: {
    tags: ["unsubscribe"],
    summary: "Emit workflow events for preference center changes",
    description: "Called by the preference center after DB writes to emit topic_subscribed/topic_unsubscribed workflow events. Authenticated via unsubscribe JWT token."
  }
});

// src/routes/templates-sync.ts
var templatesSyncRoutes = createAuthenticatedRoutes("/v1/templates").post("/push", async (ctx) => {
  const authContext = getAuth(ctx);
  const { body: body2 } = ctx;
  const result = await upsertTemplateFromCli(db, authContext, body2);
  if (result.conflict) {
    ctx.set.status = 409;
    return {
      error: "conflict",
      message: "Template was edited on the dashboard since last push",
      lastEditedFrom: "dashboard",
      updatedAt: result.updatedAt
    };
  }
  if (result.created) {
    await trackFirstResourceCreated(authContext.organizationId, "template", "cli", authContext.userId, body2.slug);
  }
  ctx.set.status = result.created ? 201 : 200;
  return {
    id: result.id,
    slug: result.slug,
    status: "PUBLISHED",
    updatedAt: result.updatedAt,
    remoteHash: body2.sourceHash
  };
}, {
  body: t2.Object({
    slug: t2.String({
      description: "Template slug (filename without extension)"
    }),
    source: t2.String({ description: "React Email TSX source code" }),
    compiledHtml: t2.String({ description: "Compiled HTML output" }),
    compiledText: t2.String({ description: "Compiled plain text output" }),
    subject: t2.String({ description: "Email subject line" }),
    previewText: t2.Optional(t2.String({ description: "Preview/preheader text" })),
    emailType: t2.Union([t2.Literal("marketing"), t2.Literal("transactional")], {
      description: "Email type for compliance"
    }),
    channel: t2.Optional(t2.Union([t2.Literal("email"), t2.Literal("sms")], {
      description: "Template channel (default: email)"
    })),
    variables: t2.Array(t2.Object({
      name: t2.String(),
      fallback: t2.Optional(t2.String())
    }), { description: "Template variables" }),
    sourceHash: t2.String({ description: "SHA256 hash of source file" }),
    sesTemplateName: t2.String({ description: "SES template name" }),
    cliProjectPath: t2.Optional(t2.String({
      description: "Path in project (e.g. templates/welcome.tsx)"
    })),
    force: t2.Optional(t2.Boolean({
      description: "Force overwrite even if edited on dashboard"
    }))
  }),
  detail: {
    tags: ["templates"],
    summary: "Push a template from CLI",
    description: "Upserts a template compiled from React Email source. Used by `wraps push`."
  }
}).post("/push/batch", async (ctx) => {
  const authContext = getAuth(ctx);
  const { body: body2 } = ctx;
  const results = await db.transaction(async (tx) => {
    const settled = await Promise.allSettled(body2.templates.map((tmpl) => upsertTemplateFromCli(tx, authContext, tmpl)));
    const errors5 = settled.filter((s3) => s3.status === "rejected");
    if (errors5.length > 0) {
      throw errors5[0].reason;
    }
    return settled.filter((s3) => s3.status === "fulfilled").map((s3) => s3.value);
  });
  const conflicts = results.filter((r3) => r3.conflict);
  if (conflicts.length > 0) {
    ctx.set.status = 409;
    return {
      error: "conflict",
      conflicts: conflicts.map((c3) => ({
        slug: c3.slug,
        message: "Template was edited on the dashboard since last push",
        updatedAt: c3.updatedAt
      })),
      results: results.filter((r3) => !r3.conflict).map((r3) => ({
        slug: r3.slug,
        id: r3.id,
        status: "PUBLISHED"
      }))
    };
  }
  const createdTemplate = results.find((r3) => r3.created);
  if (createdTemplate) {
    await trackFirstResourceCreated(authContext.organizationId, "template", "cli", authContext.userId, createdTemplate.slug);
  }
  return {
    results: results.map((r3) => ({
      slug: r3.slug,
      id: r3.id,
      status: "PUBLISHED"
    }))
  };
}, {
  body: t2.Object({
    templates: t2.Array(t2.Object({
      slug: t2.String(),
      source: t2.String(),
      compiledHtml: t2.String(),
      compiledText: t2.String(),
      subject: t2.String(),
      previewText: t2.Optional(t2.String()),
      emailType: t2.Union([
        t2.Literal("marketing"),
        t2.Literal("transactional")
      ]),
      channel: t2.Optional(t2.Union([t2.Literal("email"), t2.Literal("sms")])),
      variables: t2.Array(t2.Object({
        name: t2.String(),
        fallback: t2.Optional(t2.String())
      })),
      sourceHash: t2.String(),
      sesTemplateName: t2.String(),
      cliProjectPath: t2.Optional(t2.String()),
      force: t2.Optional(t2.Boolean())
    }))
  }),
  detail: {
    tags: ["templates"],
    summary: "Push multiple templates from CLI",
    description: "Batch upsert templates compiled from React Email source."
  }
}).get("/pull", async (ctx) => {
  const authContext = getAuth(ctx);
  const templates = await db.select({
    id: template.id,
    slug: template.slug,
    source: template.source,
    subject: template.subject,
    emailType: template.emailType,
    channel: template.channel,
    variables: template.variables,
    sourceHash: template.sourceHash,
    status: template.status,
    updatedAt: template.updatedAt,
    lastEditedFrom: template.lastEditedFrom
  }).from(template).where(and(eq(template.organizationId, authContext.organizationId), eq(template.sourceFormat, "react-email")));
  return {
    templates: templates.filter((t3) => t3.source != null).map((t3) => ({
      ...t3,
      updatedAt: t3.updatedAt.toISOString()
    }))
  };
}, {
  detail: {
    tags: ["templates"],
    summary: "Pull templates for CLI sync",
    description: "Returns all templates pushed from CLI with their React Email source."
  }
});
async function upsertTemplateFromCli(tx, authContext, body2) {
  const now = new Date;
  const [existing] = await tx.select({
    id: template.id,
    lastEditedFrom: template.lastEditedFrom,
    updatedAt: template.updatedAt
  }).from(template).where(and(eq(template.organizationId, authContext.organizationId), eq(template.slug, body2.slug))).limit(1);
  if (existing) {
    if (existing.lastEditedFrom === "dashboard" && !body2.force) {
      return {
        id: existing.id,
        slug: body2.slug,
        updatedAt: existing.updatedAt.toISOString(),
        created: false,
        conflict: true
      };
    }
    await tx.update(template).set({
      source: body2.source,
      sourceFormat: "react-email",
      sourceHash: body2.sourceHash,
      subject: body2.subject,
      previewText: body2.previewText ?? null,
      compiledHtml: body2.compiledHtml,
      compiledText: body2.compiledText,
      emailType: body2.emailType,
      channel: body2.channel ?? "email",
      variables: body2.variables,
      sesTemplateName: body2.sesTemplateName,
      status: "PUBLISHED",
      pushedFromCli: true,
      lastPushedAt: now,
      cliProjectPath: body2.cliProjectPath,
      lastEditedBy: authContext.userId,
      lastEditedFrom: "cli",
      updatedAt: now
    }).where(eq(template.id, existing.id));
    return {
      id: existing.id,
      slug: body2.slug,
      updatedAt: now.toISOString(),
      created: false
    };
  }
  const id = crypto.randomUUID();
  await tx.insert(template).values({
    id,
    organizationId: authContext.organizationId,
    name: body2.slug,
    slug: body2.slug,
    source: body2.source,
    sourceFormat: "react-email",
    sourceHash: body2.sourceHash,
    subject: body2.subject,
    previewText: body2.previewText ?? null,
    compiledHtml: body2.compiledHtml,
    compiledText: body2.compiledText,
    emailType: body2.emailType,
    channel: body2.channel ?? "email",
    variables: body2.variables,
    sesTemplateName: body2.sesTemplateName,
    content: {},
    status: "PUBLISHED",
    pushedFromCli: true,
    lastPushedAt: now,
    cliProjectPath: body2.cliProjectPath,
    lastEditedFrom: "cli",
    createdBy: authContext.userId ?? null
  });
  return {
    id,
    slug: body2.slug,
    updatedAt: now.toISOString(),
    created: true
  };
}

// ../../packages/email-check/dist/index.js
import { promises as dns, Resolver } from "dns";
import { URL as URL2 } from "url";
import * as net2 from "net";
import * as tls2 from "tls";
var QUICK_DKIM_SELECTORS = [
  "google",
  "selector1",
  "selector2",
  "default",
  "dkim",
  "mail",
  "email",
  "s1",
  "s2",
  "k1",
  "sendgrid",
  "amazonses",
  "mandrill",
  "mailgun",
  "postmark",
  "resend",
  "ses",
  "sg",
  "mg",
  "pm",
  "smtp",
  "mta",
  "mx",
  "primary",
  "main"
];
var QUICK_BLACKLISTS = [
  { name: "Spamhaus ZEN", zone: "zen.spamhaus.org", priority: "critical" },
  { name: "Spamhaus DBL", zone: "dbl.spamhaus.org", priority: "critical" },
  { name: "Barracuda", zone: "b.barracudacentral.org", priority: "high" },
  { name: "SpamCop", zone: "bl.spamcop.net", priority: "high" },
  { name: "CBL", zone: "cbl.abuseat.org", priority: "high" },
  { name: "SORBS", zone: "dnsbl.sorbs.net", priority: "medium" },
  { name: "URIBL", zone: "multi.uribl.com", priority: "medium" },
  { name: "SURBL", zone: "multi.surbl.org", priority: "medium" },
  { name: "Mailspike", zone: "bl.mailspike.net", priority: "medium" },
  { name: "Invaluement", zone: "dnsbl.invaluement.com", priority: "medium" }
];
var DEFAULT_DKIM_SELECTORS = [
  "default",
  "dkim",
  "mail",
  "email",
  "smtp",
  "mta",
  "mx",
  "selector",
  "selector1",
  "selector2",
  "s",
  "s1",
  "s2",
  "s3",
  "k",
  "k1",
  "k2",
  "k3",
  "d",
  "d1",
  "d2",
  "m",
  "m1",
  "m2",
  "e",
  "e1",
  "e2",
  "google",
  "g",
  "gm",
  "amazonses",
  "ses",
  "mailo",
  "pic",
  "mg",
  "mailgun",
  "sendgrid",
  "sg",
  "smtpapi",
  "mandrill",
  "mailchimp",
  "mc",
  "mte1",
  "mte2",
  "hs1",
  "hs2",
  "hubspot",
  "hubspotemail",
  "kl",
  "kl2",
  "klaviyo",
  "intercom",
  "ic",
  "zendesk",
  "zendesk1",
  "zendesk2",
  "zd",
  "sf",
  "sf1",
  "sf2",
  "salesforce",
  "zoho",
  "zmail",
  "zm",
  "fm1",
  "fm2",
  "fm3",
  "mesmtp",
  "protonmail",
  "protonmail2",
  "protonmail3",
  "ml",
  "litesrv",
  "mailerlite",
  "ck",
  "ck1",
  "ck2",
  "convertkit",
  "ac",
  "ac1",
  "ac2",
  "dk",
  "activecampaign",
  "cio",
  "customerio",
  "pm",
  "postmark",
  "sparkpost",
  "sp",
  "sp1",
  "sp2",
  "sendpulse",
  "ms",
  "mailersend",
  "loops",
  "resend",
  "cm",
  "cmail",
  "drip",
  "sibmail",
  "brevo",
  "mailjet",
  "mj",
  "cc",
  "ctct",
  "ctct1",
  "ctct2",
  "aweber",
  "aw",
  "getresponse",
  "gr",
  "moosend",
  "omnisend",
  "infusionsoft",
  "keap",
  "twilio",
  "elastic",
  "ee",
  "pepipost",
  "smtpcom",
  "primary",
  "main",
  "prod",
  "live",
  "api",
  "bulk",
  "transactional",
  "marketing"
];
var DOMAIN_BLACKLISTS = [
  { name: "Spamhaus DBL", zone: "dbl.spamhaus.org", priority: "critical" },
  { name: "SURBL Multi", zone: "multi.surbl.org", priority: "high" },
  { name: "URIBL Black", zone: "black.uribl.com", priority: "high" },
  { name: "URIBL Grey", zone: "grey.uribl.com", priority: "medium" },
  { name: "URIBL Red", zone: "red.uribl.com", priority: "high" },
  { name: "URIBL Multi", zone: "multi.uribl.com", priority: "high" },
  { name: "Spamcop URI", zone: "bl.spamcop.net", priority: "high" },
  { name: "DBL Abuse.ch", zone: "dbl.abuse.ch", priority: "medium" },
  { name: "FRESH URI", zone: "fresh.spameatingmonkey.net", priority: "low" },
  { name: "Mailspike Z", zone: "z.mailspike.net", priority: "medium" },
  { name: "SEM Fresh", zone: "fresh.spameatingmonkey.net", priority: "low" },
  { name: "SEM URI", zone: "uribl.spameatingmonkey.net", priority: "medium" },
  { name: "0spam Domain", zone: "bl.0spam.org", priority: "medium" },
  { name: "ZapBL RHSBL", zone: "rhsbl.zapbl.net", priority: "low" },
  { name: "Swinog URI", zone: "uribl.swinog.ch", priority: "low" },
  {
    name: "ScientificSpam RHSBL",
    zone: "rhsbl.scientificspam.net",
    priority: "medium"
  }
];
var IP_BLACKLISTS = [
  { name: "Spamhaus ZEN", zone: "zen.spamhaus.org", priority: "critical" },
  { name: "Spamhaus SBL", zone: "sbl.spamhaus.org", priority: "critical" },
  { name: "Spamhaus XBL", zone: "xbl.spamhaus.org", priority: "critical" },
  { name: "Spamhaus PBL", zone: "pbl.spamhaus.org", priority: "high" },
  { name: "Spamhaus CSS", zone: "sbl-xbl.spamhaus.org", priority: "critical" },
  { name: "Barracuda", zone: "b.barracudacentral.org", priority: "high" },
  { name: "SpamCop", zone: "bl.spamcop.net", priority: "high" },
  { name: "CBL", zone: "cbl.abuseat.org", priority: "high" },
  { name: "SORBS", zone: "dnsbl.sorbs.net", priority: "medium" },
  { name: "SORBS Spam", zone: "spam.dnsbl.sorbs.net", priority: "medium" },
  {
    name: "SORBS Recent",
    zone: "recent.spam.dnsbl.sorbs.net",
    priority: "medium"
  },
  { name: "SORBS Web", zone: "web.dnsbl.sorbs.net", priority: "medium" },
  { name: "SORBS New", zone: "new.spam.dnsbl.sorbs.net", priority: "low" },
  { name: "Passive Spam Block", zone: "psbl.surriel.com", priority: "medium" },
  { name: "UCEPROTECT 1", zone: "dnsbl-1.uceprotect.net", priority: "medium" },
  { name: "UCEPROTECT 2", zone: "dnsbl-2.uceprotect.net", priority: "low" },
  { name: "UCEPROTECT 3", zone: "dnsbl-3.uceprotect.net", priority: "low" },
  { name: "WPBL", zone: "db.wpbl.info", priority: "medium" },
  { name: "Mailspike BL", zone: "bl.mailspike.net", priority: "medium" },
  { name: "Mailspike Z", zone: "z.mailspike.net", priority: "medium" },
  { name: "0spam IP", zone: "rbl.0spam.org", priority: "medium" },
  { name: "ZapBL", zone: "dnsbl.zapbl.net", priority: "medium" },
  { name: "JustSpam", zone: "dnsbl.justspam.org", priority: "low" },
  {
    name: "Hostkarma Black",
    zone: "hostkarma.junkemailfilter.com",
    priority: "low"
  },
  { name: "Invaluement", zone: "dnsbl.invaluement.com", priority: "medium" },
  { name: "Truncate", zone: "truncate.gbudb.net", priority: "low" },
  { name: "SpamRATS NoPtr", zone: "noptr.spamrats.com", priority: "low" },
  { name: "SpamRATS Dyna", zone: "dyna.spamrats.com", priority: "low" },
  { name: "SpamRATS Auth", zone: "auth.spamrats.com", priority: "low" },
  { name: "SpamRATS Spam", zone: "spam.spamrats.com", priority: "low" },
  { name: "BlockList.de", zone: "bl.blocklist.de", priority: "medium" },
  { name: "DroneBL", zone: "dnsbl.dronebl.org", priority: "low" },
  { name: "InterServer", zone: "rbl.interserver.net", priority: "low" },
  { name: "Suomispam", zone: "bl.suomispam.net", priority: "medium" },
  { name: "ScientificSpam", zone: "bl.scientificspam.net", priority: "medium" },
  { name: "Swinog IP", zone: "dnsrbl.swinog.ch", priority: "medium" },
  { name: "Kempt.net", zone: "dnsbl.kempt.net", priority: "low" },
  { name: "Anonmails", zone: "spam.dnsbl.anonmails.de", priority: "low" },
  { name: "Composite BL", zone: "cbl.anti-spam.org.cn", priority: "low" }
];
var DEFAULT_TIMEOUT2 = 5000;
var SPF_LOOKUP_LIMIT = 10;
var DKIM_BATCH_SIZE = 10;
var BLACKLIST_BATCH_SIZE = 20;
var SPAMHAUS_RETURN_CODES = {
  "127.0.0.2": "SBL - Spamhaus Block List (known spam source)",
  "127.0.0.3": "SBL - Spamhaus Block List CSS (snowshoe spam)",
  "127.0.0.4": "XBL - CBL (hijacked machine, compromised)",
  "127.0.0.5": "XBL - Njabl (open relay)",
  "127.0.0.6": "XBL - Njabl (spam source)",
  "127.0.0.9": "SBL - Spamhaus DROP (hijacked space)",
  "127.0.0.10": "PBL - Spamhaus Policy Block List (dynamic IP)",
  "127.0.0.11": "PBL - Spamhaus Policy Block List (ISP maintained)"
};
function createNodeDnsProvider(options2 = {}) {
  const timeout = options2.timeout ?? DEFAULT_TIMEOUT2;
  const resolver = new Resolver;
  if (options2.servers && options2.servers.length > 0) {
    resolver.setServers(options2.servers);
  }
  async function withTimeout(promise2, operation) {
    const timeoutPromise = new Promise((_6, reject) => {
      setTimeout(() => {
        reject(new Error(`DNS ${operation} timed out after ${timeout}ms`));
      }, timeout);
    });
    return Promise.race([promise2, timeoutPromise]);
  }
  async function resolveTxt(domain2) {
    try {
      const records = await withTimeout(dns.resolveTxt(domain2), `TXT lookup for ${domain2}`);
      return records;
    } catch (error49) {
      if (error49.code === "ENODATA" || error49.code === "ENOTFOUND") {
        return [];
      }
      throw error49;
    }
  }
  async function resolveMx(domain2) {
    try {
      const records = await withTimeout(dns.resolveMx(domain2), `MX lookup for ${domain2}`);
      return records.sort((a13, b5) => a13.priority - b5.priority);
    } catch (error49) {
      if (error49.code === "ENODATA" || error49.code === "ENOTFOUND") {
        return [];
      }
      throw error49;
    }
  }
  async function resolveA(domain2) {
    try {
      const records = await withTimeout(dns.resolve4(domain2), `A lookup for ${domain2}`);
      return records;
    } catch (error49) {
      if (error49.code === "ENODATA" || error49.code === "ENOTFOUND") {
        return [];
      }
      throw error49;
    }
  }
  async function resolveAaaa(domain2) {
    try {
      const records = await withTimeout(dns.resolve6(domain2), `AAAA lookup for ${domain2}`);
      return records;
    } catch (error49) {
      if (error49.code === "ENODATA" || error49.code === "ENOTFOUND") {
        return [];
      }
      throw error49;
    }
  }
  async function resolvePtr(ip) {
    try {
      const records = await withTimeout(dns.reverse(ip), `PTR lookup for ${ip}`);
      return records;
    } catch (error49) {
      if (error49.code === "ENODATA" || error49.code === "ENOTFOUND" || error49.code === "ENOENT") {
        return [];
      }
      throw error49;
    }
  }
  async function resolveCaa(domain2) {
    try {
      const records = await withTimeout(dns.resolveCaa(domain2), `CAA lookup for ${domain2}`);
      return records.map((r3) => {
        let tag3 = "issue";
        let value = "";
        if (r3.issue !== undefined) {
          tag3 = "issue";
          value = r3.issue;
        } else if (r3.issuewild !== undefined) {
          tag3 = "issuewild";
          value = r3.issuewild;
        } else if (r3.iodef !== undefined) {
          tag3 = "iodef";
          value = r3.iodef;
        }
        return {
          flags: r3.critical,
          tag: tag3,
          value
        };
      });
    } catch (error49) {
      if (error49.code === "ENODATA" || error49.code === "ENOTFOUND") {
        return [];
      }
      throw error49;
    }
  }
  async function resolveCname(domain2) {
    try {
      const records = await withTimeout(dns.resolveCname(domain2), `CNAME lookup for ${domain2}`);
      return records;
    } catch (error49) {
      if (error49.code === "ENODATA" || error49.code === "ENOTFOUND") {
        return [];
      }
      throw error49;
    }
  }
  return {
    resolveTxt,
    resolveMx,
    resolveA,
    resolveAaaa,
    resolvePtr,
    resolveCaa,
    resolveCname
  };
}
var nodeDns = createNodeDnsProvider();
var currentProvider = nodeDns;
async function resolveTxtRecords(domain2) {
  const records = await currentProvider.resolveTxt(domain2);
  return records.map((parts) => parts.join(""));
}
async function resolveMxRecords(domain2) {
  return currentProvider.resolveMx(domain2);
}
async function resolveARecords(domain2) {
  return currentProvider.resolveA(domain2);
}
async function resolveAaaaRecords(domain2) {
  return currentProvider.resolveAaaa(domain2);
}
async function resolvePtrRecords(ip) {
  return currentProvider.resolvePtr(ip);
}
async function findSpfRecord(domain2) {
  const txtRecords = await resolveTxtRecords(domain2);
  return txtRecords.filter((r3) => r3.startsWith("v=spf1 ") || r3 === "v=spf1");
}
async function findDkimRecord(domain2, selector2) {
  const dkimDomain = `${selector2}._domainkey.${domain2}`;
  const txtRecords = await resolveTxtRecords(dkimDomain);
  const dkimRecord = txtRecords.find((r3) => r3.startsWith("v=DKIM1") || r3.includes("p="));
  return dkimRecord || null;
}
async function findDmarcRecord(domain2) {
  const dmarcDomain = `_dmarc.${domain2}`;
  const txtRecords = await resolveTxtRecords(dmarcDomain);
  const dmarcRecord = txtRecords.find((r3) => r3.startsWith("v=DMARC1"));
  return dmarcRecord || null;
}
async function batchDnsQuery(items, queryFn, concurrency = 10) {
  const results = [];
  for (let i = 0;i < items.length; i += concurrency) {
    const batch = items.slice(i, i + concurrency);
    const batchResults = await Promise.all(batch.map(queryFn));
    results.push(...batchResults);
  }
  return results;
}
function toAsciiDomain(domain2) {
  try {
    const url2 = new URL2(`http://${domain2.toLowerCase()}`);
    return url2.hostname;
  } catch {
    return domain2.toLowerCase();
  }
}
function isValidDomain(domain2) {
  if (!domain2 || domain2.length > 253) {
    return false;
  }
  const asciiDomain = toAsciiDomain(domain2);
  const labels = asciiDomain.split(".");
  if (labels.length < 2) {
    return false;
  }
  for (const label of labels) {
    if (!label || label.length > 63) {
      return false;
    }
    if (!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/i.test(label)) {
      return false;
    }
  }
  return true;
}
function isIpAddress(str) {
  return isIpv4(str) || isIpv6(str);
}
function isIpv4(str) {
  const parts = str.split(".");
  if (parts.length !== 4) {
    return false;
  }
  return parts.every((part) => {
    const num = Number.parseInt(part, 10);
    return !Number.isNaN(num) && num >= 0 && num <= 255 && part === String(num);
  });
}
function isIpv6(str) {
  const ipv6Pattern = /^(?:(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,7}:|(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(?:(?::[0-9a-fA-F]{1,4}){1,6})|:(?:(?::[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(?::[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]+|::(?:ffff(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?[0-9])?[0-9])\.){3}(?:25[0-5]|(?:2[0-4]|1?[0-9])?[0-9])|(?:[0-9a-fA-F]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?[0-9])?[0-9])\.){3}(?:25[0-5]|(?:2[0-4]|1?[0-9])?[0-9]))$/;
  return ipv6Pattern.test(str);
}
function reverseIp(ip) {
  if (isIpv4(ip)) {
    return ip.split(".").reverse().join(".");
  }
  throw new Error("IPv6 reverse not yet implemented");
}
function isLocalhost(ip) {
  if (isIpv4(ip)) {
    return ip === "127.0.0.1" || ip.startsWith("127.");
  }
  return ip === "::1" || ip === "0:0:0:0:0:0:0:1";
}
var TEST_RETURN_CODES = /* @__PURE__ */ new Set([
  "127.0.0.1",
  "127.0.1.255",
  "127.255.255.252",
  "127.255.255.254",
  "127.255.255.255"
]);
function isTestResponse(returnCode) {
  return TEST_RETURN_CODES.has(returnCode);
}
async function checkBlacklist(options2) {
  const { quick = false, skip = false, domain: domain2, ips = [] } = options2;
  const result = {
    domainChecks: {
      checked: 0,
      listed: [],
      clean: [],
      errors: [],
      timeouts: []
    },
    ipChecks: {
      checked: 0,
      listed: [],
      clean: [],
      errors: [],
      timeouts: []
    },
    overallClean: true,
    quickMode: quick
  };
  if (skip) {
    return result;
  }
  const domainBlacklists = quick ? QUICK_BLACKLISTS.slice(0, 5) : DOMAIN_BLACKLISTS;
  const ipBlacklists = quick ? QUICK_BLACKLISTS : IP_BLACKLISTS;
  await checkDomainBlacklists(domain2, domainBlacklists, result);
  if (ips.length > 0) {
    await checkIpBlacklists(ips, ipBlacklists, result);
  }
  result.overallClean = result.domainChecks.listed.length === 0 && result.ipChecks.listed.length === 0;
  return result;
}
async function checkDomainBlacklists(domain2, blacklists, result) {
  const checks3 = blacklists.map((bl3) => ({
    blacklist: bl3,
    query: `${domain2}.${bl3.zone}`
  }));
  await batchDnsQuery(checks3, async (check3) => {
    result.domainChecks.checked++;
    try {
      const records = await resolveARecords(check3.query);
      const firstRecord = records[0];
      if (records.length > 0 && firstRecord && !isTestResponse(firstRecord)) {
        const listing = createListing(check3.blacklist, "domain", domain2, firstRecord);
        result.domainChecks.listed.push(listing);
        result.overallClean = false;
      } else {
        result.domainChecks.clean.push(check3.blacklist.name);
      }
    } catch (error49) {
      if (error49.message?.includes("timed out")) {
        result.domainChecks.timeouts.push(check3.blacklist.name);
      } else if (error49.code !== "ENOTFOUND" && error49.code !== "ENODATA") {
        result.domainChecks.errors.push(`${check3.blacklist.name}: ${error49.message}`);
      } else {
        result.domainChecks.clean.push(check3.blacklist.name);
      }
    }
  }, BLACKLIST_BATCH_SIZE);
}
async function checkIpBlacklists(ips, blacklists, result) {
  const ipv4Ips = ips.filter(isIpv4);
  for (const ip of ipv4Ips) {
    const reversedIp = reverseIp(ip);
    const checks3 = blacklists.map((bl3) => ({
      blacklist: bl3,
      query: `${reversedIp}.${bl3.zone}`,
      ip
    }));
    await batchDnsQuery(checks3, async (check3) => {
      result.ipChecks.checked++;
      try {
        const records = await resolveARecords(check3.query);
        const firstRecord = records[0];
        if (records.length > 0 && firstRecord && !isTestResponse(firstRecord)) {
          const listing = createListing(check3.blacklist, "ip", check3.ip, firstRecord);
          result.ipChecks.listed.push(listing);
          result.overallClean = false;
        } else {
          result.ipChecks.clean.push(check3.blacklist.name);
        }
      } catch (error49) {
        if (error49.message?.includes("timed out")) {
          result.ipChecks.timeouts.push(check3.blacklist.name);
        } else if (error49.code !== "ENOTFOUND" && error49.code !== "ENODATA") {
          result.ipChecks.errors.push(`${check3.blacklist.name}: ${error49.message}`);
        } else {
          result.ipChecks.clean.push(check3.blacklist.name);
        }
      }
    }, BLACKLIST_BATCH_SIZE);
  }
}
function createListing(blacklist, type2, target, returnCode) {
  return {
    blacklist: blacklist.name,
    zone: blacklist.zone,
    priority: blacklist.priority || "medium",
    type: type2,
    target,
    returnCode,
    meaning: getMeaning(blacklist.zone, returnCode),
    delistUrl: getDelistUrl(blacklist.zone)
  };
}
function getMeaning(zone, returnCode) {
  if (zone.includes("spamhaus")) {
    return SPAMHAUS_RETURN_CODES[returnCode] || `Listed (${returnCode})`;
  }
  if (returnCode === "127.0.0.2") {
    return "Listed as spam source";
  }
  if (returnCode === "127.0.0.3") {
    return "Listed as spam source (elevated threat)";
  }
  return `Listed (${returnCode})`;
}
function getDelistUrl(zone) {
  const delistUrls = {
    "zen.spamhaus.org": "https://check.spamhaus.org/",
    "dbl.spamhaus.org": "https://check.spamhaus.org/",
    "sbl.spamhaus.org": "https://check.spamhaus.org/",
    "xbl.spamhaus.org": "https://check.spamhaus.org/",
    "pbl.spamhaus.org": "https://check.spamhaus.org/",
    "b.barracudacentral.org": "https://www.barracudacentral.org/lookups",
    "bl.spamcop.net": "https://www.spamcop.net/bl.shtml",
    "cbl.abuseat.org": "https://cbl.abuseat.org/lookup.cgi",
    "dnsbl.sorbs.net": "http://www.sorbs.net/lookup.shtml"
  };
  return delistUrls[zone] || null;
}
async function checkDkim(domain2, options2 = {}) {
  const {
    quick = false,
    selector: selector2,
    selectors: customSelectors,
    verbose = false,
    detectedProvider
  } = options2;
  let selectorsToCheck;
  if (selector2) {
    selectorsToCheck = [selector2];
  } else if (customSelectors && customSelectors.length > 0) {
    selectorsToCheck = customSelectors;
  } else if (quick) {
    selectorsToCheck = [...QUICK_DKIM_SELECTORS];
  } else {
    selectorsToCheck = [...DEFAULT_DKIM_SELECTORS];
  }
  const result = {
    found: false,
    selectors: [],
    selectorsChecked: 0,
    earlyExit: false,
    warnings: []
  };
  let foundValid = false;
  for (let i = 0;i < selectorsToCheck.length; i += DKIM_BATCH_SIZE) {
    if (foundValid && !verbose) {
      result.earlyExit = true;
      break;
    }
    const batch = selectorsToCheck.slice(i, i + DKIM_BATCH_SIZE);
    const batchResults = await batchDnsQuery(batch, async (sel) => checkDkimSelector(domain2, sel), DKIM_BATCH_SIZE);
    for (const selectorResult of batchResults) {
      result.selectorsChecked++;
      if (selectorResult.exists) {
        result.selectors.push(selectorResult);
        result.found = true;
        if (selectorResult.valid && !selectorResult.revoked) {
          foundValid = true;
        }
      }
    }
  }
  result.selectors.sort((a13, b5) => {
    const aScore = (a13.valid ? 2 : 0) + (a13.revoked ? 0 : 1);
    const bScore = (b5.valid ? 2 : 0) + (b5.revoked ? 0 : 1);
    return bScore - aScore;
  });
  if (!result.found && detectedProvider) {
    const randomSelectorProviders = {
      ses: "AWS SES uses random DKIM selectors. Check your SES console or use --dkimSelector with your actual selector.",
      amazonses: "AWS SES uses random DKIM selectors. Check your SES console or use --dkimSelector with your actual selector.",
      sendgrid: "SendGrid may use custom selectors. Check your SendGrid dashboard or use --dkimSelector.",
      mailgun: "Mailgun may use custom selectors. Check your Mailgun dashboard or use --dkimSelector."
    };
    const providerLower = detectedProvider.toLowerCase();
    for (const [key, message2] of Object.entries(randomSelectorProviders)) {
      if (providerLower.includes(key)) {
        result.warnings.push(message2);
        break;
      }
    }
  }
  return result;
}
async function checkDkimSelector(domain2, selector2) {
  const result = {
    selector: selector2,
    exists: false,
    record: null,
    valid: false,
    keyType: null,
    keyBits: null,
    publicKey: null,
    testMode: false,
    revoked: false,
    expired: false,
    hashAlgorithms: [],
    serviceTypes: [],
    flags: [],
    errors: [],
    warnings: []
  };
  try {
    const record2 = await findDkimRecord(domain2, selector2);
    if (!record2) {
      return result;
    }
    result.exists = true;
    result.record = record2;
    parseDkimRecord(record2, result);
  } catch (error49) {
    result.errors.push(error49.message);
  }
  return result;
}
function parseDkimRecord(record2, result) {
  const tags = parseDkimTags(record2);
  const version5 = tags.get("v");
  if (version5 && version5 !== "DKIM1") {
    result.errors.push(`Invalid DKIM version: ${version5}`);
  }
  const keyType = tags.get("k") || "rsa";
  if (keyType === "rsa") {
    result.keyType = "rsa";
  } else if (keyType === "ed25519") {
    result.keyType = "ed25519";
  } else {
    result.keyType = "unknown";
    result.warnings.push(`Unknown key type: ${keyType}`);
  }
  const publicKey = tags.get("p");
  if (publicKey === undefined) {
    result.errors.push("Missing public key (p=)");
    return;
  }
  if (publicKey === "") {
    result.revoked = true;
    result.warnings.push("DKIM key is revoked (empty p= tag)");
    return;
  }
  result.publicKey = publicKey;
  if (result.keyType === "rsa") {
    try {
      const keyData = Buffer.from(publicKey, "base64");
      const estimatedBits = keyData.length * 8;
      result.keyBits = Math.round((estimatedBits - 256) * 0.95);
      if (result.keyBits < 512) {
        result.keyBits = 512;
      }
      if (result.keyBits > 4096) {
        result.keyBits = 4096;
      }
      if (result.keyBits <= 768) {
        result.keyBits = 512;
      } else if (result.keyBits <= 1200) {
        result.keyBits = 1024;
      } else if (result.keyBits <= 2500) {
        result.keyBits = 2048;
      } else if (result.keyBits <= 3500) {
        result.keyBits = 3072;
      } else {
        result.keyBits = 4096;
      }
      if (result.keyBits < 1024) {
        result.errors.push(`RSA key too weak: ${result.keyBits} bits`);
      } else if (result.keyBits < 2048) {
        result.warnings.push(`RSA key should be 2048+ bits (currently ${result.keyBits})`);
      }
    } catch {
      result.warnings.push("Could not determine RSA key size");
    }
  }
  const hashAlg = tags.get("h");
  if (hashAlg) {
    result.hashAlgorithms = hashAlg.split(":").map((h8) => h8.trim());
    if (result.hashAlgorithms.includes("sha1") && !result.hashAlgorithms.includes("sha256")) {
      result.warnings.push("Only sha1 allowed - sha256 recommended");
    }
  } else {
    result.hashAlgorithms = ["sha1", "sha256"];
  }
  const serviceType = tags.get("s");
  if (serviceType) {
    result.serviceTypes = serviceType.split(":").map((s3) => s3.trim());
    if (!(result.serviceTypes.includes("*") || result.serviceTypes.includes("email"))) {
      result.warnings.push(`Service type restricts to: ${result.serviceTypes.join(", ")}`);
    }
  } else {
    result.serviceTypes = ["*"];
  }
  const flagsTag = tags.get("t");
  if (flagsTag) {
    result.flags = flagsTag.split(":").map((f4) => f4.trim());
    if (result.flags.includes("y")) {
      result.testMode = true;
      result.warnings.push("DKIM in testing mode (t=y)");
    }
  }
  const notes = tags.get("n");
  if (notes) {
    result.warnings.push(`DKIM note: ${notes}`);
  }
  result.valid = result.errors.length === 0 && !result.revoked;
}
function parseDkimTags(record2) {
  const tags = /* @__PURE__ */ new Map;
  const parts = record2.split(";").map((p3) => p3.trim()).filter(Boolean);
  for (const part of parts) {
    const eqIndex = part.indexOf("=");
    if (eqIndex === -1) {
      continue;
    }
    const key = part.slice(0, eqIndex).trim().toLowerCase();
    const value = part.slice(eqIndex + 1).trim();
    tags.set(key, value);
  }
  return tags;
}
async function checkDmarc(domain2) {
  const result = {
    exists: false,
    record: null,
    valid: false,
    policy: null,
    subdomainPolicy: null,
    nonExistentSubdomainPolicy: null,
    testing: false,
    psd: null,
    percentage: 100,
    reportingEnabled: false,
    ruaAddresses: [],
    rufAddresses: [],
    alignmentSpf: "relaxed",
    alignmentDkim: "relaxed",
    failureOptions: "0",
    reportInterval: 86400,
    reportFormat: "afrf",
    errors: [],
    warnings: []
  };
  try {
    const record2 = await findDmarcRecord(domain2);
    if (!record2) {
      return result;
    }
    result.exists = true;
    result.record = record2;
    parseDmarcRecord(record2, result);
  } catch (error49) {
    result.errors.push(error49.message);
  }
  return result;
}
function parseDmarcRecord(record2, result) {
  const tags = parseDmarcTags(record2);
  const version5 = tags.get("v");
  if (version5 !== "DMARC1") {
    result.errors.push(`Invalid DMARC version: ${version5 || "missing"}`);
    return;
  }
  const policy = tags.get("p");
  if (!policy) {
    result.errors.push("Missing required policy (p=)");
    return;
  }
  if (!["none", "quarantine", "reject"].includes(policy)) {
    result.errors.push(`Invalid policy: ${policy}`);
    return;
  }
  result.policy = policy;
  const subdomainPolicy = tags.get("sp");
  if (subdomainPolicy) {
    if (["none", "quarantine", "reject"].includes(subdomainPolicy)) {
      result.subdomainPolicy = subdomainPolicy;
    } else {
      result.warnings.push(`Invalid subdomain policy: ${subdomainPolicy}`);
    }
  } else {
    result.subdomainPolicy = result.policy;
  }
  const np = tags.get("np");
  if (np) {
    if (["none", "quarantine", "reject"].includes(np)) {
      result.nonExistentSubdomainPolicy = np;
    } else {
      result.warnings.push(`Invalid non-existent subdomain policy (np): ${np}`);
    }
  }
  if (tags.get("t") === "y") {
    result.testing = true;
  }
  const psd = tags.get("psd");
  if (psd && ["y", "n", "u"].includes(psd)) {
    result.psd = psd;
  }
  const pct = tags.get("pct");
  if (pct) {
    const pctNum = Number.parseInt(pct, 10);
    if (Number.isNaN(pctNum) || pctNum < 0 || pctNum > 100) {
      result.warnings.push(`Invalid percentage: ${pct}`);
    } else {
      result.percentage = pctNum;
      if (pctNum < 100) {
        result.warnings.push(`pct=${pctNum} is deprecated (DMARCbis receivers ignore it; enforcement is all-or-nothing). Use t=y while testing instead.`);
      }
    }
  }
  const rua = tags.get("rua");
  if (rua) {
    result.ruaAddresses = parseReportAddresses(rua);
    result.reportingEnabled = result.ruaAddresses.length > 0;
  }
  const ruf = tags.get("ruf");
  if (ruf) {
    result.rufAddresses = parseReportAddresses(ruf);
  }
  const aspf = tags.get("aspf");
  if (aspf) {
    if (aspf === "s") {
      result.alignmentSpf = "strict";
    } else if (aspf === "r") {
      result.alignmentSpf = "relaxed";
    } else {
      result.warnings.push(`Invalid SPF alignment mode: ${aspf}`);
    }
  }
  const adkim = tags.get("adkim");
  if (adkim) {
    if (adkim === "s") {
      result.alignmentDkim = "strict";
    } else if (adkim === "r") {
      result.alignmentDkim = "relaxed";
    } else {
      result.warnings.push(`Invalid DKIM alignment mode: ${adkim}`);
    }
  }
  const fo3 = tags.get("fo");
  if (fo3) {
    const validOptions = ["0", "1", "d", "s"];
    const options2 = fo3.split(":").map((o3) => o3.trim());
    for (const opt of options2) {
      if (!validOptions.includes(opt)) {
        result.warnings.push(`Unknown failure option: ${opt}`);
      }
    }
    result.failureOptions = fo3;
  }
  const ri4 = tags.get("ri");
  if (ri4) {
    const riNum = Number.parseInt(ri4, 10);
    if (Number.isNaN(riNum) || riNum < 0) {
      result.warnings.push(`Invalid report interval: ${ri4}`);
    } else {
      result.reportInterval = riNum;
    }
  }
  const rf = tags.get("rf");
  if (rf) {
    result.reportFormat = rf;
  }
  if (result.policy === "none") {
    result.warnings.push('DMARC policy is "none" - not enforcing authentication');
  }
  if (result.subdomainPolicy === "none" && result.policy !== "none") {
    result.warnings.push("Subdomain policy is less strict than domain policy");
  }
  const enforcing = result.policy === "quarantine" || result.policy === "reject";
  if (result.testing && result.policy !== "none") {
    result.warnings.push("t=y (testing) is set — receivers will not enforce the policy");
  }
  if (enforcing && !result.nonExistentSubdomainPolicy) {
    result.warnings.push("No np= set — add np=reject to block spoofing from non-existent subdomains (DMARCbis)");
  }
  if (!result.reportingEnabled) {
    result.warnings.push("No aggregate reporting configured (rua=)");
  }
  for (const addr of [...result.ruaAddresses, ...result.rufAddresses]) {
    const match = addr.match(/^mailto:([^@]+)@(.+)$/i);
    if (match) {
      const _domain = result.record?.includes("_dmarc.") ? result.record.split("_dmarc.")[1]?.split(" ")[0] : null;
    }
  }
  result.valid = result.errors.length === 0;
}
function parseDmarcTags(record2) {
  const tags = /* @__PURE__ */ new Map;
  const parts = record2.split(";").map((p3) => p3.trim()).filter(Boolean);
  for (const part of parts) {
    const eqIndex = part.indexOf("=");
    if (eqIndex === -1) {
      continue;
    }
    const key = part.slice(0, eqIndex).trim().toLowerCase();
    const value = part.slice(eqIndex + 1).trim();
    tags.set(key, value);
  }
  return tags;
}
function parseReportAddresses(value) {
  return value.split(",").map((addr) => addr.trim()).filter(Boolean);
}
async function checkMx(domain2) {
  const result = {
    exists: false,
    records: [],
    hasRedundancy: false,
    warnings: []
  };
  try {
    const mxRecords = await resolveMxRecords(domain2);
    if (mxRecords.length === 0) {
      result.warnings.push("No MX records found");
      return result;
    }
    result.exists = true;
    for (const mx of mxRecords) {
      const mxResult = await checkMxRecord(mx);
      result.records.push(mxResult);
    }
    const uniquePriorities = new Set(mxRecords.map((r3) => r3.priority));
    result.hasRedundancy = mxRecords.length > 1 && uniquePriorities.size > 1;
    const unresolving = result.records.filter((r3) => !r3.resolves);
    if (unresolving.length > 0) {
      result.warnings.push(`${unresolving.length} MX record(s) do not resolve`);
    }
    const ipMx = result.records.filter((r3) => r3.isIpAddress);
    if (ipMx.length > 0) {
      result.warnings.push("MX records should point to hostnames, not IP addresses");
    }
    const localhostMx = result.records.filter((r3) => r3.isLocalhost);
    if (localhostMx.length > 0) {
      result.warnings.push("MX record points to localhost");
    }
  } catch (error49) {
    result.warnings.push(`Error checking MX: ${error49.message}`);
  }
  return result;
}
async function checkMxRecord(mx) {
  const result = {
    priority: mx.priority,
    exchange: mx.exchange,
    resolves: false,
    ipv4Addresses: [],
    ipv6Addresses: [],
    isLocalhost: false,
    isIpAddress: isIpAddress(mx.exchange),
    reverseHostnames: []
  };
  if (result.isIpAddress) {
    result.isLocalhost = isLocalhost(mx.exchange);
    result.resolves = true;
    if (mx.exchange.includes(":")) {
      result.ipv6Addresses = [mx.exchange];
    } else {
      result.ipv4Addresses = [mx.exchange];
    }
    return result;
  }
  try {
    const ipv43 = await resolveARecords(mx.exchange);
    result.ipv4Addresses = ipv43;
    const ipv63 = await resolveAaaaRecords(mx.exchange);
    result.ipv6Addresses = ipv63;
    result.resolves = ipv43.length > 0 || ipv63.length > 0;
    for (const ip of [...ipv43, ...ipv63]) {
      if (isLocalhost(ip)) {
        result.isLocalhost = true;
        break;
      }
    }
    const allIps = [...ipv43, ...ipv63];
    for (const ip of allIps.slice(0, 3)) {
      try {
        const ptrs = await resolvePtrRecords(ip);
        result.reverseHostnames.push(...ptrs);
      } catch {}
    }
  } catch (_error) {}
  return result;
}
var DEFAULT_TIMEOUT22 = 1e4;
var SMTP_PORT = 25;
async function checkMxTls(mxRecords, options2 = {}) {
  const { skip = false, timeout = DEFAULT_TIMEOUT22, quick = false } = options2;
  const result = {
    checked: false,
    skipped: skip,
    skipReason: skip ? "--skip-tls flag" : null,
    servers: []
  };
  if (skip) {
    return result;
  }
  if (mxRecords.length === 0) {
    result.skipReason = "No MX records";
    result.skipped = true;
    return result;
  }
  const sortedMx = [...mxRecords].sort((a13, b5) => a13.priority - b5.priority);
  const mxToCheck = quick ? sortedMx.slice(0, 1) : sortedMx.slice(0, 5);
  const checkPromises = mxToCheck.map((mx) => checkServer(mx.exchange, timeout));
  try {
    result.servers = await Promise.all(checkPromises);
    result.checked = true;
  } catch (error49) {
    result.skipReason = error49.message || "TLS check failed";
  }
  return result;
}
async function checkServer(hostname4, timeout) {
  const result = {
    server: hostname4,
    port: SMTP_PORT,
    connected: false,
    connectionError: null,
    supportsStarttls: false,
    tlsVersions: [],
    preferredTlsVersion: null,
    cipherSuite: null,
    certificate: null,
    errors: []
  };
  try {
    const smtpSession = await connectSmtp(hostname4, SMTP_PORT, timeout);
    result.connected = true;
    const capabilities = await sendEhlo(smtpSession, timeout);
    result.supportsStarttls = capabilities.includes("STARTTLS");
    if (!result.supportsStarttls) {
      smtpSession.socket.destroy();
      result.errors.push("Server does not advertise STARTTLS");
      return result;
    }
    const tlsResult = await upgradeToTls(smtpSession, hostname4, timeout);
    if (tlsResult.success && tlsResult.socket) {
      result.preferredTlsVersion = tlsResult.tlsVersion || null;
      result.cipherSuite = tlsResult.cipher || null;
      if (tlsResult.tlsVersion) {
        result.tlsVersions.push(tlsResult.tlsVersion);
      }
      if (tlsResult.certificate) {
        const cert = tlsResult.certificate;
        const now = /* @__PURE__ */ new Date;
        const expiresAt = new Date(cert.valid_to);
        const daysUntilExpiry = Math.floor((expiresAt.getTime() - now.getTime()) / (1000 * 60 * 60 * 24));
        result.certificate = {
          valid: tlsResult.authorized ?? false,
          issuer: formatX509Name(cert.issuer),
          subject: formatX509Name(cert.subject),
          altNames: parseAltNames(cert.subjectaltname),
          expiresAt: cert.valid_to,
          daysUntilExpiry,
          matchesHostname: tlsResult.authorized ?? false,
          selfSigned: isSelfSigned(cert),
          chainValid: tlsResult.authorized ?? false
        };
      }
      tlsResult.socket.destroy();
    } else {
      result.errors.push(tlsResult.error || "TLS upgrade failed");
    }
  } catch (error49) {
    result.connectionError = error49.message || "Connection failed";
    if (error49.code === "ECONNREFUSED") {
      result.connectionError = "Connection refused (port 25 blocked?)";
    } else if (error49.code === "ETIMEDOUT" || error49.message?.includes("timeout")) {
      result.connectionError = "Connection timed out";
    } else if (error49.code === "ENOTFOUND") {
      result.connectionError = "Host not found";
    }
  }
  return result;
}
function connectSmtp(hostname4, port, timeout) {
  return new Promise((resolve3, reject) => {
    const socket = net2.createConnection({ host: hostname4, port });
    let buffer = "";
    let resolved = false;
    const timer = setTimeout(() => {
      if (!resolved) {
        resolved = true;
        socket.destroy();
        reject(new Error("Connection timeout"));
      }
    }, timeout);
    socket.on("connect", () => {});
    socket.on("data", (data) => {
      buffer += data.toString();
      if (buffer.includes(`\r
`) && buffer.startsWith("220") && !resolved) {
        resolved = true;
        clearTimeout(timer);
        resolve3({ socket, buffer: "" });
      }
    });
    socket.on("error", (err) => {
      if (!resolved) {
        resolved = true;
        clearTimeout(timer);
        reject(err);
      }
    });
    socket.on("close", () => {
      if (!resolved) {
        resolved = true;
        clearTimeout(timer);
        reject(new Error("Connection closed"));
      }
    });
  });
}
function sendEhlo(session2, timeout) {
  return new Promise((resolve3, reject) => {
    let buffer = "";
    let resolved = false;
    const timer = setTimeout(() => {
      if (!resolved) {
        resolved = true;
        reject(new Error("EHLO timeout"));
      }
    }, timeout);
    session2.socket.on("data", (data) => {
      buffer += data.toString();
      const lines = buffer.split(`\r
`).filter(Boolean);
      const lastLine = lines.at(-1);
      if (lastLine && /^250[ ]/.test(lastLine) && !resolved) {
        resolved = true;
        clearTimeout(timer);
        const capabilities = lines.filter((line2) => line2.startsWith("250")).map((line2) => line2.slice(4).trim().toUpperCase());
        resolve3(capabilities);
      }
    });
    session2.socket.on("error", (err) => {
      if (!resolved) {
        resolved = true;
        clearTimeout(timer);
        reject(err);
      }
    });
    session2.socket.write(`EHLO mail.check.wraps.dev\r
`);
  });
}
function upgradeToTls(session2, hostname4, timeout) {
  return new Promise((resolve3) => {
    let buffer = "";
    let resolved = false;
    const timer = setTimeout(() => {
      if (!resolved) {
        resolved = true;
        resolve3({ success: false, error: "STARTTLS timeout" });
      }
    }, timeout);
    const onData = (data) => {
      buffer += data.toString();
      if (buffer.includes("220")) {
        session2.socket.removeListener("data", onData);
        const tlsSocket = tls2.connect({
          socket: session2.socket,
          servername: hostname4,
          rejectUnauthorized: false,
          minVersion: "TLSv1.2"
        }, () => {
          if (!resolved) {
            resolved = true;
            clearTimeout(timer);
            const cipher = tlsSocket.getCipher();
            const cert = tlsSocket.getPeerCertificate();
            resolve3({
              success: true,
              socket: tlsSocket,
              tlsVersion: tlsSocket.getProtocol() || undefined,
              cipher: cipher?.name,
              certificate: cert,
              authorized: tlsSocket.authorized
            });
          }
        });
        tlsSocket.on("error", (err) => {
          if (!resolved) {
            resolved = true;
            clearTimeout(timer);
            resolve3({ success: false, error: err.message });
          }
        });
      } else if ((buffer.includes("454") || buffer.includes("501")) && !resolved) {
        resolved = true;
        clearTimeout(timer);
        resolve3({ success: false, error: "Server rejected STARTTLS" });
      }
    };
    session2.socket.on("data", onData);
    session2.socket.on("error", (err) => {
      if (!resolved) {
        resolved = true;
        clearTimeout(timer);
        resolve3({ success: false, error: err.message });
      }
    });
    session2.socket.write(`STARTTLS\r
`);
  });
}
function formatX509Name(name3) {
  if (!name3) {
    return "";
  }
  const parts = [];
  const o3 = Array.isArray(name3.O) ? name3.O[0] : name3.O;
  if (o3) {
    parts.push(o3);
  }
  const cn3 = Array.isArray(name3.CN) ? name3.CN[0] : name3.CN;
  if (cn3) {
    parts.push(cn3);
  }
  return parts.join(" - ") || JSON.stringify(name3);
}
function parseAltNames(subjectaltname) {
  if (!subjectaltname) {
    return [];
  }
  return subjectaltname.split(", ").filter((san) => san.startsWith("DNS:")).map((san) => san.slice(4));
}
function isSelfSigned(cert) {
  if (!(cert.issuer && cert.subject)) {
    return false;
  }
  return cert.issuer.CN === cert.subject.CN && cert.issuer.O === cert.subject.O;
}
var RDAP_BOOTSTRAP_URL = "https://data.iana.org/rdap/dns.json";
var rdapBootstrapCache = null;
var bootstrapCacheTime = 0;
var BOOTSTRAP_CACHE_TTL = 3600000;
async function checkDomainAge(domain2, options2 = {}) {
  const { skip = false, timeout = 1e4 } = options2;
  const result = {
    createdAt: null,
    expiresAt: null,
    updatedAt: null,
    ageInDays: null,
    daysUntilExpiry: null,
    registrar: null,
    registrantOrganization: null,
    registrantCountry: null,
    nameservers: [],
    dnssecEnabled: false,
    source: "unavailable",
    privacyEnabled: false,
    errors: []
  };
  if (skip) {
    result.errors.push("Skipped");
    return result;
  }
  try {
    const tld = getTld(domain2);
    if (!tld) {
      result.errors.push("Could not determine TLD");
      return result;
    }
    const rdapServer = await findRdapServer(tld, timeout);
    if (!rdapServer) {
      result.errors.push(`No RDAP server found for .${tld}`);
      return result;
    }
    const rdapData = await queryRdap(rdapServer, domain2, timeout);
    if (!rdapData) {
      result.errors.push("RDAP query returned no data");
      return result;
    }
    parseRdapResponse(rdapData, result);
    result.source = "rdap";
  } catch (error49) {
    result.errors.push(error49.message || "RDAP lookup failed");
  }
  return result;
}
function getTld(domain2) {
  const parts = domain2.toLowerCase().split(".");
  if (parts.length < 2) {
    return null;
  }
  const lastTwo = parts.slice(-2).join(".");
  const secondLevelTlds = [
    "co.uk",
    "org.uk",
    "me.uk",
    "ac.uk",
    "com.au",
    "net.au",
    "org.au",
    "co.nz",
    "org.nz",
    "co.jp",
    "or.jp",
    "com.br",
    "org.br"
  ];
  if (secondLevelTlds.includes(lastTwo) && parts.length > 2) {
    return lastTwo;
  }
  return parts.at(-1) || null;
}
async function findRdapServer(tld, timeout) {
  const now = Date.now();
  if (rdapBootstrapCache && now - bootstrapCacheTime < BOOTSTRAP_CACHE_TTL) {
    return rdapBootstrapCache.get(tld.toLowerCase()) || null;
  }
  try {
    const controller = new AbortController;
    const timeoutId = setTimeout(() => controller.abort(), timeout);
    const response = await fetch(RDAP_BOOTSTRAP_URL, {
      signal: controller.signal,
      headers: { Accept: "application/json" }
    });
    clearTimeout(timeoutId);
    if (!response.ok) {
      return null;
    }
    const bootstrap = await response.json();
    rdapBootstrapCache = /* @__PURE__ */ new Map;
    bootstrapCacheTime = now;
    for (const [tlds, urls] of bootstrap.services) {
      const serverUrl = urls[0];
      if (serverUrl) {
        for (const t3 of tlds) {
          rdapBootstrapCache.set(t3.toLowerCase(), serverUrl);
        }
      }
    }
    return rdapBootstrapCache.get(tld.toLowerCase()) || null;
  } catch {
    return null;
  }
}
async function queryRdap(serverUrl, domain2, timeout) {
  try {
    let url2 = serverUrl;
    if (!url2.endsWith("/")) {
      url2 += "/";
    }
    url2 += `domain/${domain2}`;
    const controller = new AbortController;
    const timeoutId = setTimeout(() => controller.abort(), timeout);
    const response = await fetch(url2, {
      signal: controller.signal,
      headers: { Accept: "application/rdap+json, application/json" }
    });
    clearTimeout(timeoutId);
    if (!response.ok) {
      return null;
    }
    return await response.json();
  } catch {
    return null;
  }
}
function parseRdapResponse(data, result) {
  const now = /* @__PURE__ */ new Date;
  if (data.events) {
    for (const event of data.events) {
      const date7 = event.eventDate;
      switch (event.eventAction) {
        case "registration":
          result.createdAt = date7;
          break;
        case "expiration":
          result.expiresAt = date7;
          break;
        case "last changed":
        case "last update of RDAP database":
          if (!result.updatedAt) {
            result.updatedAt = date7;
          }
          break;
      }
    }
  }
  if (result.createdAt) {
    const created = new Date(result.createdAt);
    result.ageInDays = Math.floor((now.getTime() - created.getTime()) / (1000 * 60 * 60 * 24));
  }
  if (result.expiresAt) {
    const expires = new Date(result.expiresAt);
    result.daysUntilExpiry = Math.floor((expires.getTime() - now.getTime()) / (1000 * 60 * 60 * 24));
  }
  if (data.nameservers) {
    result.nameservers = data.nameservers.map((ns2) => ns2.ldhName?.toLowerCase()).filter((ns2) => !!ns2);
  }
  if (data.secureDNS?.delegationSigned) {
    result.dnssecEnabled = true;
  }
  if (data.entities) {
    for (const entity of data.entities) {
      const roles = entity.roles || [];
      if (roles.includes("registrar")) {
        const name3 = extractVcardName(entity.vcardArray);
        if (name3) {
          result.registrar = name3;
        }
      }
      if (roles.includes("registrant")) {
        const name3 = extractVcardName(entity.vcardArray);
        if (name3) {
          result.registrantOrganization = name3;
          const privacyIndicators = [
            "privacy",
            "proxy",
            "whoisguard",
            "domains by proxy",
            "contact privacy",
            "redacted",
            "withheld"
          ];
          const nameLower = name3.toLowerCase();
          result.privacyEnabled = privacyIndicators.some((p3) => nameLower.includes(p3));
        }
        const country = extractVcardCountry(entity.vcardArray);
        if (country) {
          result.registrantCountry = country;
        }
      }
    }
  }
}
function extractVcardName(vcardArray) {
  if (!vcardArray || vcardArray[0] !== "vcard") {
    return null;
  }
  const properties2 = vcardArray[1];
  if (!Array.isArray(properties2)) {
    return null;
  }
  for (const prop of properties2) {
    if (!Array.isArray(prop)) {
      continue;
    }
    const [name3, , , value] = prop;
    if (name3 === "fn" && typeof value === "string" && value.trim()) {
      return value.trim();
    }
    if (name3 === "org" && typeof value === "string" && value.trim()) {
      return value.trim();
    }
  }
  return null;
}
function extractVcardCountry(vcardArray) {
  if (!vcardArray || vcardArray[0] !== "vcard") {
    return null;
  }
  const properties2 = vcardArray[1];
  if (!Array.isArray(properties2)) {
    return null;
  }
  for (const prop of properties2) {
    if (!Array.isArray(prop)) {
      continue;
    }
    const [name3, , , value] = prop;
    if (name3 === "adr" && Array.isArray(value)) {
      const country = value[6];
      if (typeof country === "string" && country.trim()) {
        return country.trim();
      }
    }
  }
  return null;
}
async function checkSpf(domain2) {
  const spfRecords = await findSpfRecord(domain2);
  const result = {
    exists: spfRecords.length > 0,
    record: spfRecords[0] || null,
    records: spfRecords,
    multipleRecords: spfRecords.length > 1,
    valid: false,
    syntaxErrors: [],
    warnings: [],
    lookupCount: 0,
    lookupLimit: SPF_LOOKUP_LIMIT,
    lookupTree: [],
    allMechanism: null,
    includes: [],
    hasPtr: false,
    hasDuplicates: false,
    hasCircularInclude: false,
    recordLength: spfRecords[0]?.length || 0,
    usesMacros: false,
    macros: []
  };
  if (spfRecords.length > 1) {
    result.syntaxErrors.push(`Multiple SPF records found (${spfRecords.length}). RFC 7208 allows only one.`);
    return result;
  }
  if (!(result.exists && result.record)) {
    return result;
  }
  try {
    await parseAndValidateSpf(domain2, result.record, result);
  } catch (error49) {
    result.syntaxErrors.push(error49.message);
  }
  return result;
}
async function parseAndValidateSpf(domain2, record2, result) {
  if (!record2.startsWith("v=spf1")) {
    result.syntaxErrors.push('SPF record must start with "v=spf1"');
    return;
  }
  const mechanisms = record2.slice(6).trim().split(/\s+/).filter(Boolean);
  const context10 = {
    visited: /* @__PURE__ */ new Set([domain2]),
    totalLookups: 0,
    hasCircular: false,
    errors: []
  };
  const includes2 = [];
  let allMechanism = null;
  let hasPtr = false;
  for (const mechanism of mechanisms) {
    const parsed = parseMechanism(mechanism);
    if (!parsed) {
      if (mechanism.includes("%{")) {
        result.usesMacros = true;
        result.macros.push(mechanism);
        result.warnings.push(`SPF uses macro "${mechanism}" - cannot fully validate without sending IP`);
      } else if (mechanism !== "") {
        result.syntaxErrors.push(`Invalid mechanism: ${mechanism}`);
      }
      continue;
    }
    switch (parsed.type) {
      case "all":
        allMechanism = `${parsed.qualifier}all`;
        break;
      case "include":
        if (parsed.domain) {
          includes2.push(parsed.domain);
          const includeNode = await checkSpfInclude(parsed.domain, context10, mechanism);
          result.lookupTree.push(includeNode);
        }
        break;
      case "redirect":
        if (parsed.domain) {
          const redirectNode = await checkSpfInclude(parsed.domain, context10, mechanism);
          result.lookupTree.push(redirectNode);
        }
        break;
      case "a":
        context10.totalLookups++;
        if (parsed.domain) {
          const aNode = {
            mechanism,
            type: "a",
            domain: parsed.domain,
            lookups: 1,
            children: [],
            error: null
          };
          result.lookupTree.push(aNode);
        }
        break;
      case "mx":
        context10.totalLookups++;
        if (parsed.domain) {
          const mxNode = {
            mechanism,
            type: "mx",
            domain: parsed.domain,
            lookups: 1,
            children: [],
            error: null
          };
          result.lookupTree.push(mxNode);
        }
        break;
      case "ptr":
        hasPtr = true;
        context10.totalLookups++;
        result.warnings.push("SPF uses deprecated 'ptr' mechanism (RFC 7208)");
        break;
      case "exists":
        context10.totalLookups++;
        break;
      case "ip4":
      case "ip6":
        break;
      default:
        result.warnings.push(`Unknown mechanism type: ${parsed.type}`);
    }
  }
  const seenIncludes = /* @__PURE__ */ new Set;
  for (const inc of includes2) {
    if (seenIncludes.has(inc)) {
      result.hasDuplicates = true;
      result.warnings.push(`Duplicate include: ${inc}`);
    }
    seenIncludes.add(inc);
  }
  result.includes = includes2;
  result.allMechanism = allMechanism;
  result.hasPtr = hasPtr;
  result.lookupCount = context10.totalLookups;
  result.hasCircularInclude = context10.hasCircular;
  result.valid = result.syntaxErrors.length === 0 && !result.multipleRecords && !result.hasCircularInclude;
  if (context10.totalLookups > SPF_LOOKUP_LIMIT) {
    result.warnings.push(`SPF exceeds 10 DNS lookup limit (${context10.totalLookups} lookups)`);
  } else if (context10.totalLookups === SPF_LOOKUP_LIMIT) {
    result.warnings.push("SPF at lookup limit (10). Adding more includes will fail.");
  }
  if (allMechanism === "+all") {
    result.syntaxErrors.push("SPF ends with +all which allows anyone to send");
    result.valid = false;
  } else if (allMechanism === "?all") {
    result.warnings.push("SPF uses ?all (neutral) - consider using -all or ~all");
  } else if (!allMechanism) {
    result.warnings.push("SPF record has no 'all' mechanism - defaults to neutral");
  }
  if (context10.errors.length > 0) {
    result.warnings.push(...context10.errors);
  }
}
async function checkSpfInclude(domain2, context10, mechanism) {
  const node3 = {
    mechanism,
    type: mechanism.startsWith("redirect=") ? "redirect" : "include",
    domain: domain2,
    lookups: 1,
    children: [],
    error: null
  };
  if (context10.visited.has(domain2)) {
    context10.hasCircular = true;
    node3.error = `Circular include detected: ${domain2}`;
    return node3;
  }
  context10.visited.add(domain2);
  context10.totalLookups++;
  try {
    const spfRecords = await findSpfRecord(domain2);
    if (spfRecords.length === 0) {
      node3.error = `No SPF record found for ${domain2}`;
      return node3;
    }
    if (spfRecords.length > 1) {
      node3.error = `Multiple SPF records found for ${domain2}`;
      return node3;
    }
    const record2 = spfRecords[0];
    if (!record2.startsWith("v=spf1")) {
      node3.error = `Invalid SPF record for ${domain2}`;
      return node3;
    }
    const mechanisms = record2.slice(6).trim().split(/\s+/).filter(Boolean);
    for (const mech of mechanisms) {
      const parsed = parseMechanism(mech);
      if (!parsed) {
        continue;
      }
      switch (parsed.type) {
        case "include":
        case "redirect":
          if (parsed.domain) {
            const childNode = await checkSpfInclude(parsed.domain, context10, mech);
            node3.children.push(childNode);
            node3.lookups += childNode.lookups;
          }
          break;
        case "a":
        case "mx":
        case "ptr":
        case "exists":
          context10.totalLookups++;
          node3.lookups++;
          break;
      }
    }
  } catch (error49) {
    node3.error = `Failed to resolve ${domain2}: ${error49.message}`;
  }
  return node3;
}
function parseMechanism(mechanism) {
  if (!mechanism) {
    return null;
  }
  let qualifier = "+";
  let mech = mechanism;
  if (/^[+\-~?]/.test(mech)) {
    qualifier = mech.charAt(0);
    mech = mech.slice(1);
  }
  const match = mech.match(/^(all|include|a|mx|ptr|ip4|ip6|exists|redirect|exp)(?:[:=]([^\s/]+))?(?:\/(\d+))?$/i);
  if (!match) {
    return null;
  }
  const type2 = match[1];
  const value = match[2];
  const prefix = match[3];
  if (!type2) {
    return null;
  }
  return {
    qualifier,
    type: type2.toLowerCase(),
    domain: value,
    prefix
  };
}
var GRADE_BANDS = {
  A: { min: 90, max: 100 },
  B: { min: 80, max: 89 },
  C: { min: 65, max: 79 },
  D: { min: 35, max: 64 },
  F: { min: 0, max: 34 }
};
function calculateScore(checks3) {
  const deductions = [];
  const bonuses = [];
  collectSpfIssues(checks3.spf, deductions);
  collectDkimIssues(checks3, deductions, bonuses);
  collectDmarcIssues(checks3.dmarc, deductions, bonuses);
  collectInfraIssues(checks3, deductions, bonuses);
  const grade = determineGrade(checks3);
  const band = GRADE_BANDS[grade];
  let score = band.max;
  for (const d3 of deductions) {
    score -= d3.points;
  }
  const totalBonus = bonuses.reduce((sum, b5) => sum + b5.points, 0);
  score += Math.min(totalBonus, 10);
  const finalScore = Math.max(band.min, Math.min(band.max, score));
  return {
    rawScore: score,
    finalScore,
    grade,
    deductions,
    bonuses,
    breakdown: {
      spf: {
        max: 30,
        score: Math.max(0, 30 - sumDeductions(deductions, "spf"))
      },
      dkim: {
        max: 25,
        score: Math.max(0, 25 - sumDeductions(deductions, "dkim"))
      },
      dmarc: {
        max: 25,
        score: Math.max(0, 25 - sumDeductions(deductions, "dmarc"))
      },
      mx: { max: 10, score: Math.max(0, 10 - sumDeductions(deductions, "mx")) },
      blacklist: {
        max: 10,
        score: Math.max(0, 10 - sumDeductions(deductions, "blacklist"))
      },
      bonus: { earned: Math.min(totalBonus, 10), possible: 10 }
    }
  };
}
function assessSpf(spf) {
  if (!spf.exists || spf.multipleRecords || !spf.valid) {
    return "missing";
  }
  if (spf.allMechanism === "+all" || spf.hasCircularInclude) {
    return "missing";
  }
  if (spf.allMechanism === "?all") {
    return "weak";
  }
  return "present";
}
function assessDkim(checks3) {
  if (checks3.dkim.found) {
    const valid = checks3.dkim.selectors.find((s3) => s3.valid && !s3.revoked);
    return valid ? "present" : "missing";
  }
  const usesAwsSes = checks3.spf.includes.some((inc) => inc.includes("amazonses.com") || inc.includes("amazon.com"));
  return usesAwsSes ? "weak" : "missing";
}
function assessDmarc(dmarc) {
  if (!(dmarc.exists && dmarc.valid)) {
    return "missing";
  }
  if (dmarc.policy === "reject" || dmarc.policy === "quarantine") {
    return "good";
  }
  return "present";
}
function determineGrade(checks3) {
  if (checks3.spf.allMechanism === "+all") {
    return "F";
  }
  const hasSpamhausListing = [
    ...checks3.blacklist.domainChecks.listed,
    ...checks3.blacklist.ipChecks.listed
  ].some((l7) => l7.zone.includes("spamhaus"));
  if (hasSpamhausListing) {
    return "F";
  }
  const spf = assessSpf(checks3.spf);
  const dkim = assessDkim(checks3);
  const dmarc = assessDmarc(checks3.dmarc);
  const presentCount = [spf, dkim, dmarc].filter((s3) => s3 !== "missing").length;
  if (spf === "present" && (dkim === "present" || dkim === "good") && dmarc === "good") {
    return "A";
  }
  if (presentCount === 3) {
    return "B";
  }
  if (presentCount === 2) {
    return "C";
  }
  if (presentCount === 1) {
    return "D";
  }
  return "F";
}
function collectSpfIssues(spf, deductions) {
  if (!spf.exists) {
    deductions.push({ check: "spf", points: 5, reason: "No SPF record" });
    return;
  }
  if (spf.multipleRecords) {
    deductions.push({
      check: "spf",
      points: 5,
      reason: "Multiple SPF records (RFC violation)"
    });
    return;
  }
  if (!spf.valid) {
    deductions.push({ check: "spf", points: 5, reason: "Invalid SPF syntax" });
    return;
  }
  if (spf.allMechanism === "+all") {
    deductions.push({
      check: "spf",
      points: 5,
      reason: "SPF +all allows anyone to send as your domain"
    });
    return;
  }
  if (spf.hasCircularInclude) {
    deductions.push({
      check: "spf",
      points: 5,
      reason: "SPF has circular include (infinite loop)"
    });
    return;
  }
  if (spf.allMechanism === "?all") {
    deductions.push({
      check: "spf",
      points: 3,
      reason: "SPF ?all is too permissive"
    });
  } else if (spf.allMechanism === "~all") {
    deductions.push({
      check: "spf",
      points: 2,
      reason: "SPF ~all (softfail) instead of -all (hardfail)"
    });
  }
  if (spf.lookupCount > 10) {
    deductions.push({
      check: "spf",
      points: 3,
      reason: `SPF exceeds 10 DNS lookups (${spf.lookupCount})`
    });
  }
  if (spf.hasPtr) {
    deductions.push({
      check: "spf",
      points: 1,
      reason: "SPF uses deprecated ptr mechanism"
    });
  }
}
function collectDkimIssues(checks3, deductions, bonuses) {
  const usesAwsSes = checks3.spf.includes.some((inc) => inc.includes("amazonses.com") || inc.includes("amazon.com"));
  if (checks3.dkim.found) {
    const validSelector = checks3.dkim.selectors.find((s3) => s3.valid && !s3.revoked);
    if (!validSelector) {
      deductions.push({
        check: "dkim",
        points: 5,
        reason: "No valid DKIM record"
      });
      return;
    }
    if (validSelector.keyType === "rsa" && validSelector.keyBits && validSelector.keyBits < 1024) {
      deductions.push({
        check: "dkim",
        points: 4,
        reason: `DKIM key too weak (${validSelector.keyBits} bits)`
      });
    } else if (validSelector.keyType === "rsa" && validSelector.keyBits && validSelector.keyBits < 2048) {
      deductions.push({
        check: "dkim",
        points: 2,
        reason: `DKIM key should be 2048+ bits (${validSelector.keyBits})`
      });
    }
    if (validSelector.testMode) {
      deductions.push({
        check: "dkim",
        points: 3,
        reason: "DKIM in testing mode (t=y)"
      });
    }
    const validCount = checks3.dkim.selectors.filter((s3) => s3.valid && !s3.revoked).length;
    if (validCount > 1) {
      bonuses.push({
        check: "dkim",
        points: 1,
        reason: `${validCount} valid DKIM selectors`
      });
    }
  } else if (usesAwsSes) {
    deductions.push({
      check: "dkim",
      points: 2,
      reason: "DKIM not verifiable (AWS SES uses random selectors). Send a test email to verify."
    });
  } else {
    deductions.push({
      check: "dkim",
      points: 5,
      reason: "No DKIM record found"
    });
  }
}
function collectDmarcIssues(dmarc, deductions, bonuses) {
  if (!dmarc.exists) {
    deductions.push({ check: "dmarc", points: 5, reason: "No DMARC record" });
    return;
  }
  if (!dmarc.valid) {
    deductions.push({
      check: "dmarc",
      points: 5,
      reason: "Invalid DMARC syntax"
    });
    return;
  }
  if (dmarc.policy === "none") {
    deductions.push({
      check: "dmarc",
      points: 3,
      reason: "DMARC policy is none (not enforcing)"
    });
  }
  if (dmarc.testing && dmarc.policy !== "none") {
    deductions.push({
      check: "dmarc",
      points: 2,
      reason: "DMARC testing mode (t=y) — receivers won't enforce the policy"
    });
  }
  if (dmarc.percentage < 100) {
    deductions.push({
      check: "dmarc",
      points: 1,
      reason: `DMARC pct=${dmarc.percentage} is deprecated (DMARCbis receivers ignore it; enforcement is inconsistent)`
    });
  }
  if (!dmarc.reportingEnabled) {
    deductions.push({
      check: "dmarc",
      points: 2,
      reason: "DMARC reporting not configured (no rua=)"
    });
  }
  if (dmarc.alignmentSpf === "strict" && dmarc.alignmentDkim === "strict") {
    bonuses.push({
      check: "dmarc",
      points: 1,
      reason: "DMARC strict alignment configured"
    });
  }
  if ((dmarc.policy === "quarantine" || dmarc.policy === "reject") && dmarc.nonExistentSubdomainPolicy === "reject") {
    bonuses.push({
      check: "dmarc",
      points: 1,
      reason: "np=reject blocks non-existent subdomain spoofing (DMARCbis)"
    });
  }
}
function collectInfraIssues(checks3, deductions, bonuses) {
  if (checks3.mx.exists) {
    const unresolving = checks3.mx.records.filter((r3) => !r3.resolves);
    if (unresolving.length > 0) {
      deductions.push({
        check: "mx",
        points: 2,
        reason: `${unresolving.length} MX records don't resolve`
      });
    }
    if (checks3.mx.hasRedundancy) {
      bonuses.push({
        check: "mx",
        points: 1,
        reason: "Multiple MX records for redundancy"
      });
    }
  } else {
    deductions.push({ check: "mx", points: 2, reason: "No MX records" });
  }
  for (const listing of [
    ...checks3.blacklist.domainChecks.listed,
    ...checks3.blacklist.ipChecks.listed
  ]) {
    if (listing.zone.includes("spamhaus")) {
      deductions.push({
        check: "blacklist",
        points: 5,
        reason: `Listed on ${listing.blacklist}`
      });
    } else if (listing.priority === "critical" || listing.priority === "high") {
      deductions.push({
        check: "blacklist",
        points: 3,
        reason: `Listed on ${listing.blacklist}`
      });
    } else {
      deductions.push({
        check: "blacklist",
        points: 1,
        reason: `Listed on ${listing.blacklist}`
      });
    }
  }
  if (checks3.blacklist.overallClean) {
    bonuses.push({
      check: "blacklist",
      points: 1,
      reason: "Clean on all blacklists"
    });
  }
  if (checks3.mtaSts.configured && checks3.mtaSts.policy?.mode === "enforce") {
    bonuses.push({ check: "mta-sts", points: 2, reason: "MTA-STS enforcing" });
  } else if (checks3.mtaSts.configured && checks3.mtaSts.policy?.mode === "testing") {
    bonuses.push({
      check: "mta-sts",
      points: 1,
      reason: "MTA-STS testing mode"
    });
  }
  if (checks3.tlsRpt.configured) {
    bonuses.push({ check: "tls-rpt", points: 1, reason: "TLS-RPT configured" });
  }
  if (checks3.bimi.configured && checks3.bimi.dmarcCompatible) {
    if (checks3.bimi.vmcValid) {
      bonuses.push({ check: "bimi", points: 2, reason: "BIMI with VMC" });
    } else if (checks3.bimi.logoAccessible) {
      bonuses.push({
        check: "bimi",
        points: 1,
        reason: "BIMI configured (no VMC)"
      });
    }
  }
  if (checks3.mxTls.checked && !checks3.mxTls.skipped) {
    const allMxTls13 = checks3.mxTls.servers.every((s3) => s3.tlsVersions?.includes("TLSv1.3"));
    if (allMxTls13) {
      bonuses.push({
        check: "mx-tls",
        points: 1,
        reason: "All MX servers support TLS 1.3"
      });
    }
  }
  if (checks3.dnssec.enabled && checks3.dnssec.valid) {
    bonuses.push({
      check: "dnssec",
      points: 1,
      reason: "DNSSEC enabled and valid"
    });
  } else if (checks3.dnssec.enabled && !checks3.dnssec.valid) {
    deductions.push({ check: "dnssec", points: 2, reason: "DNSSEC broken" });
  }
  if (checks3.ipv6.mxHasIpv6 && checks3.ipv6.spfIncludesIpv6) {
    bonuses.push({ check: "ipv6", points: 1, reason: "Full IPv6 support" });
  }
  if (checks3.reverseDns.allHavePtr && checks3.reverseDns.allConfirm) {
    bonuses.push({ check: "ptr", points: 1, reason: "All PTR records valid" });
  } else if (!checks3.reverseDns.allHavePtr) {
    deductions.push({ check: "ptr", points: 2, reason: "Missing reverse DNS" });
  }
  if (checks3.domainAge.ageInDays !== null) {
    if (checks3.domainAge.ageInDays < 30) {
      deductions.push({
        check: "domain-age",
        points: 3,
        reason: "Domain less than 30 days old"
      });
    } else if (checks3.domainAge.ageInDays < 90) {
      deductions.push({
        check: "domain-age",
        points: 1,
        reason: "Domain less than 90 days old"
      });
    } else if (checks3.domainAge.ageInDays > 365) {
      bonuses.push({
        check: "domain-age",
        points: 1,
        reason: "Domain over 1 year old"
      });
    }
  }
  if (checks3.caa.configured) {
    bonuses.push({ check: "caa", points: 1, reason: "CAA records configured" });
  }
}
function sumDeductions(deductions, check3) {
  return deductions.filter((d3) => d3.check === check3).reduce((sum, d3) => sum + d3.points, 0);
}
async function runEmailCheck(domain2, options2 = {}) {
  const startTime = Date.now();
  const normalizedDomain = toAsciiDomain(domain2);
  if (!isValidDomain(normalizedDomain)) {
    throw new Error(`Invalid domain: ${domain2}`);
  }
  const { quick = false, skipBlacklists = false, skipTls = false } = options2;
  const [spfResult, dkimResult, dmarcResult, mxResult] = await Promise.all([
    checkSpf(normalizedDomain),
    checkDkim(normalizedDomain, {
      quick,
      selector: options2.dkimSelector,
      selectors: options2.dkimSelectors,
      verbose: options2.verbose
    }),
    checkDmarc(normalizedDomain),
    checkMx(normalizedDomain)
  ]);
  if (!dkimResult.found && spfResult.record) {
    const spfLower = spfResult.record.toLowerCase();
    if (spfLower.includes("amazonses") || spfLower.includes("_spf.aws")) {
      dkimResult.warnings.push("AWS SES uses random DKIM selectors. Run `wraps email domains get-dkim -d <domain>` to find yours.");
    } else if (spfLower.includes("sendgrid")) {
      dkimResult.warnings.push("SendGrid uses custom DKIM selectors. Check your SendGrid dashboard or use --dkimSelector.");
    } else if (spfLower.includes("mailgun")) {
      dkimResult.warnings.push("Mailgun uses custom DKIM selectors. Check your Mailgun dashboard or use --dkimSelector.");
    }
  }
  const mxIps = [];
  for (const mx of mxResult.records) {
    mxIps.push(...mx.ipv4Addresses);
  }
  const blacklistResult = await checkBlacklist({
    domain: normalizedDomain,
    ips: mxIps,
    quick,
    skip: skipBlacklists
  });
  const mxTlsResult = await checkMxTls(mxResult.records, {
    skip: skipTls,
    quick
  });
  const mtaStsResult = {
    configured: false,
    dnsRecord: null,
    dnsRecordId: null,
    policyFetched: false,
    policyUrl: `https://mta-sts.${normalizedDomain}/.well-known/mta-sts.txt`,
    policy: null,
    mxPatternsMatch: false,
    errors: [],
    warnings: []
  };
  const tlsRptResult = {
    configured: false,
    record: null,
    version: null,
    reportingUris: [],
    errors: []
  };
  const reverseDnsResult = {
    results: [],
    allHavePtr: false,
    allConfirm: false,
    warnings: []
  };
  for (const mx of mxResult.records) {
    for (const ip of mx.ipv4Addresses) {
      const hasPtr = mx.reverseHostnames.length > 0;
      reverseDnsResult.results.push({
        ip,
        ipVersion: 4,
        ptrHostname: mx.reverseHostnames[0] || null,
        forwardConfirms: hasPtr,
        looksGeneric: false,
        matchesDomain: mx.reverseHostnames.some((h8) => h8.includes(normalizedDomain))
      });
    }
  }
  reverseDnsResult.allHavePtr = reverseDnsResult.results.every((r3) => r3.ptrHostname !== null);
  reverseDnsResult.allConfirm = reverseDnsResult.results.every((r3) => r3.forwardConfirms);
  const ipv6Result = {
    mxHasIpv6: mxResult.records.some((r3) => r3.ipv6Addresses.length > 0),
    mxIpv6Addresses: mxResult.records.filter((r3) => r3.ipv6Addresses.length > 0).map((r3) => ({ mx: r3.exchange, addresses: r3.ipv6Addresses })),
    ipv6Connectable: false,
    spfIncludesIpv6: spfResult.record?.includes("ip6:") ?? false,
    warnings: []
  };
  const domainAgeResult = await checkDomainAge(normalizedDomain);
  const dnssecResult = {
    enabled: false,
    valid: false,
    validationMethod: "system-resolver",
    chainOfTrust: [],
    algorithm: null,
    keyTag: null,
    errors: []
  };
  const caaResult = {
    configured: false,
    records: [],
    allowedIssuers: [],
    allowedWildcardIssuers: [],
    reportingConfigured: false,
    iodefUri: null
  };
  const bimiResult = {
    configured: false,
    record: null,
    logoUrl: null,
    vmcUrl: null,
    logoAccessible: false,
    logoValid: false,
    vmcAccessible: false,
    vmcValid: false,
    dmarcCompatible: dmarcResult.policy === "quarantine" || dmarcResult.policy === "reject",
    errors: [],
    warnings: []
  };
  const score = calculateScore({
    spf: spfResult,
    dkim: dkimResult,
    dmarc: dmarcResult,
    mx: mxResult,
    mxTls: mxTlsResult,
    mtaSts: mtaStsResult,
    tlsRpt: tlsRptResult,
    bimi: bimiResult,
    dnssec: dnssecResult,
    ipv6: ipv6Result,
    reverseDns: reverseDnsResult,
    blacklist: blacklistResult,
    domainAge: domainAgeResult,
    caa: caaResult
  });
  const duration3 = Date.now() - startTime;
  return {
    domain: normalizedDomain,
    checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
    duration: duration3,
    options: options2,
    spf: spfResult,
    dkim: dkimResult,
    dmarc: dmarcResult,
    mx: mxResult,
    mxTls: mxTlsResult,
    mtaSts: mtaStsResult,
    tlsRpt: tlsRptResult,
    reverseDns: reverseDnsResult,
    ipv6: ipv6Result,
    blacklist: blacklistResult,
    domainAge: domainAgeResult,
    dnssec: dnssecResult,
    caa: caaResult,
    bimi: bimiResult,
    score
  };
}

// src/middleware/public-rate-limit.ts
var import_client_dynamodb3 = __toESM(require_dist_cjs66(), 1);
var PUBLIC_LIMITS = {
  minute: 10,
  hour: 100
};
var dynamoClient2 = new import_client_dynamodb3.DynamoDBClient(awsDefaults);
var TABLE_NAME2 = process.env.RATE_LIMIT_TABLE_NAME ?? "RateLimitTable";
function getClientIp(request2) {
  const sourceIp = request2.headers.get("x-source-ip");
  if (sourceIp) {
    return sourceIp.trim();
  }
  const forwardedFor = request2.headers.get("x-forwarded-for");
  if (forwardedFor) {
    const ips = forwardedFor.split(",");
    return ips.at(-1)?.trim() ?? "unknown";
  }
  const realIp = request2.headers.get("x-real-ip");
  if (realIp) {
    return realIp.trim();
  }
  return "unknown";
}
async function incrementCounter2(key, ttlSeconds) {
  const expiresAt = Math.floor(Date.now() / 1000) + ttlSeconds;
  try {
    const result = await dynamoClient2.send(new import_client_dynamodb3.UpdateItemCommand({
      TableName: TABLE_NAME2,
      Key: {
        pk: { S: `public-ip:${key}` },
        sk: { S: "rate-limit" }
      },
      UpdateExpression: "SET #count = if_not_exists(#count, :zero) + :inc, #exp = :exp",
      ExpressionAttributeNames: {
        "#count": "count",
        "#exp": "expiresAt"
      },
      ExpressionAttributeValues: {
        ":inc": { N: "1" },
        ":zero": { N: "0" },
        ":exp": { N: String(expiresAt) }
      },
      ReturnValues: "UPDATED_NEW"
    }));
    return Number(result.Attributes?.count?.N ?? 1);
  } catch (error49) {
    log3.error("Rate limiter failing open", error49, { key });
    return 0;
  }
}
function getMinuteKey(ip) {
  const now = new Date;
  const minute2 = now.toISOString().slice(0, 16).replace("T", "-").replace(":", "-");
  return `${ip}:minute:${minute2}`;
}
function getHourKey(ip) {
  const now = new Date;
  const hour2 = now.toISOString().slice(0, 13).replace("T", "-");
  return `${ip}:hour:${hour2}`;
}
var publicRateLimitMiddleware = new Elysia({
  name: "public-rate-limit"
}).derive(async ({ request: request2, set: set2 }) => {
  const clientIp = getClientIp(request2);
  const minuteCount = await incrementCounter2(getMinuteKey(clientIp), 60);
  if (minuteCount > PUBLIC_LIMITS.minute) {
    set2.status = 429;
    set2.headers["Retry-After"] = "60";
    set2.headers["X-RateLimit-Limit"] = String(PUBLIC_LIMITS.minute);
    set2.headers["X-RateLimit-Remaining"] = "0";
    set2.headers["X-RateLimit-Reset"] = String(Math.floor(Date.now() / 1000) + 60);
    throw new Error("Rate limit exceeded. Please wait a minute before trying again.");
  }
  const hourCount = await incrementCounter2(getHourKey(clientIp), 3600);
  if (hourCount > PUBLIC_LIMITS.hour) {
    set2.status = 429;
    set2.headers["Retry-After"] = "3600";
    set2.headers["X-RateLimit-Limit"] = String(PUBLIC_LIMITS.hour);
    set2.headers["X-RateLimit-Remaining"] = "0";
    throw new Error("Hourly rate limit exceeded. Please try again later.");
  }
  set2.headers["X-RateLimit-Limit"] = String(PUBLIC_LIMITS.minute);
  set2.headers["X-RateLimit-Remaining"] = String(Math.max(0, PUBLIC_LIMITS.minute - minuteCount));
  return { clientIp };
});

// src/middleware/tools-cache.ts
var import_client_dynamodb4 = __toESM(require_dist_cjs66(), 1);
var dynamoClient3 = new import_client_dynamodb4.DynamoDBClient(awsDefaults);
var TABLE_NAME3 = process.env.RATE_LIMIT_TABLE_NAME ?? "RateLimitTable";
var CACHE_TTL_SECONDS = 5 * 60;
async function getCached(key) {
  try {
    const result = await dynamoClient3.send(new import_client_dynamodb4.GetItemCommand({
      TableName: TABLE_NAME3,
      Key: {
        pk: { S: `cache:${key}` },
        sk: { S: "data" }
      }
    }));
    if (!result.Item?.data?.S) {
      return null;
    }
    const expiresAt = Number(result.Item.expiresAt?.N ?? 0);
    if (Date.now() / 1000 > expiresAt) {
      return null;
    }
    return JSON.parse(result.Item.data.S);
  } catch (error49) {
    log3.error("Cache get failed", error49);
    return null;
  }
}
async function setCache(key, data, ttlSeconds = CACHE_TTL_SECONDS) {
  const expiresAt = Math.floor(Date.now() / 1000) + ttlSeconds;
  try {
    await dynamoClient3.send(new import_client_dynamodb4.PutItemCommand({
      TableName: TABLE_NAME3,
      Item: {
        pk: { S: `cache:${key}` },
        sk: { S: "data" },
        data: { S: JSON.stringify(data) },
        expiresAt: { N: String(expiresAt) }
      }
    }));
  } catch (error49) {
    log3.error("Cache set failed", error49);
  }
}
function getEmailCheckCacheKey(domain2, options2) {
  const parts = [
    "email-check",
    domain2.toLowerCase(),
    options2.quick ? "quick" : "full"
  ];
  if (options2.dkimSelectors?.length) {
    parts.push(`dkim:${options2.dkimSelectors.sort().join(",")}`);
  }
  return parts.join(":");
}

// src/routes/tools.ts
var emailCheckResponseSchema = t2.Object({
  success: t2.Boolean(),
  domain: t2.Optional(t2.String()),
  checkedAt: t2.Optional(t2.String()),
  duration: t2.Optional(t2.Number()),
  score: t2.Optional(t2.Object({
    grade: t2.String(),
    score: t2.Number(),
    maxScore: t2.Number(),
    breakdown: t2.Object({}, { additionalProperties: true })
  })),
  spf: t2.Optional(t2.Object({
    exists: t2.Boolean(),
    valid: t2.Boolean(),
    record: t2.Union([t2.String(), t2.Null()]),
    lookupCount: t2.Number(),
    lookupLimit: t2.Number(),
    allMechanism: t2.Union([t2.String(), t2.Null()]),
    includes: t2.Array(t2.String()),
    hasPtr: t2.Boolean(),
    warnings: t2.Array(t2.String())
  })),
  dkim: t2.Optional(t2.Object({
    found: t2.Boolean(),
    selectorsFound: t2.Array(t2.Object({
      selector: t2.String(),
      keyType: t2.Union([t2.String(), t2.Null()]),
      keyBits: t2.Union([t2.Number(), t2.Null()]),
      testMode: t2.Boolean()
    })),
    selectorsChecked: t2.Number(),
    warnings: t2.Array(t2.String())
  })),
  dmarc: t2.Optional(t2.Object({
    exists: t2.Boolean(),
    valid: t2.Boolean(),
    record: t2.Union([t2.String(), t2.Null()]),
    policy: t2.Union([t2.String(), t2.Null()]),
    subdomainPolicy: t2.Union([t2.String(), t2.Null()]),
    nonExistentSubdomainPolicy: t2.Union([t2.String(), t2.Null()]),
    testing: t2.Boolean(),
    reportingEnabled: t2.Boolean(),
    pct: t2.Union([t2.Number(), t2.Null()]),
    alignmentSpf: t2.Union([t2.String(), t2.Null()]),
    alignmentDkim: t2.Union([t2.String(), t2.Null()]),
    ruaAddresses: t2.Array(t2.String()),
    warnings: t2.Array(t2.String())
  })),
  mx: t2.Optional(t2.Object({
    exists: t2.Boolean(),
    hasRedundancy: t2.Boolean(),
    records: t2.Array(t2.Object({
      exchange: t2.String(),
      priority: t2.Number(),
      resolves: t2.Boolean(),
      ipv4Count: t2.Number(),
      ipv6Count: t2.Number()
    }))
  })),
  domainAge: t2.Optional(t2.Object({
    ageInDays: t2.Union([t2.Number(), t2.Null()]),
    createdAt: t2.Union([t2.String(), t2.Null()]),
    expiresAt: t2.Union([t2.String(), t2.Null()]),
    daysUntilExpiry: t2.Union([t2.Number(), t2.Null()]),
    registrar: t2.Union([t2.String(), t2.Null()]),
    source: t2.Union([t2.String(), t2.Null()]),
    privacyEnabled: t2.Boolean()
  })),
  ipv6: t2.Optional(t2.Object({
    mxHasIpv6: t2.Boolean(),
    spfIncludesIpv6: t2.Boolean(),
    mxIpv6Count: t2.Number()
  })),
  reverseDns: t2.Optional(t2.Object({
    allHavePtr: t2.Boolean(),
    allConfirm: t2.Boolean(),
    count: t2.Number()
  })),
  blacklist: t2.Optional(t2.Object({
    checked: t2.Boolean(),
    overallClean: t2.Boolean(),
    domainListings: t2.Array(t2.Object({
      blacklist: t2.String(),
      priority: t2.String(),
      delistUrl: t2.Union([t2.String(), t2.Null()])
    })),
    ipListings: t2.Array(t2.Object({
      blacklist: t2.String(),
      priority: t2.String(),
      target: t2.String(),
      delistUrl: t2.Union([t2.String(), t2.Null()])
    }))
  })),
  issues: t2.Optional(t2.Array(t2.Object({
    check: t2.String(),
    reason: t2.String(),
    points: t2.Number(),
    severity: t2.String()
  }))),
  bonuses: t2.Optional(t2.Array(t2.Object({
    check: t2.String(),
    reason: t2.String(),
    points: t2.Number()
  }))),
  error: t2.Optional(t2.String())
});
function formatEmailCheckResult(result) {
  return {
    success: true,
    domain: result.domain,
    checkedAt: result.checkedAt,
    duration: result.duration,
    score: {
      grade: result.score.grade,
      score: result.score.finalScore,
      maxScore: 100,
      breakdown: result.score.breakdown
    },
    spf: {
      exists: result.spf.exists,
      valid: result.spf.valid,
      record: result.spf.record,
      lookupCount: result.spf.lookupCount,
      lookupLimit: result.spf.lookupLimit,
      allMechanism: result.spf.allMechanism,
      includes: result.spf.includes,
      hasPtr: result.spf.hasPtr,
      warnings: result.spf.warnings
    },
    dkim: {
      found: result.dkim.found,
      selectorsFound: result.dkim.selectors.filter((s3) => s3.valid && !s3.revoked).map((s3) => ({
        selector: s3.selector,
        keyType: s3.keyType,
        keyBits: s3.keyBits,
        testMode: s3.testMode
      })),
      selectorsChecked: result.dkim.selectorsChecked,
      warnings: result.dkim.warnings
    },
    dmarc: {
      exists: result.dmarc.exists,
      valid: result.dmarc.valid,
      record: result.dmarc.record,
      policy: result.dmarc.policy,
      subdomainPolicy: result.dmarc.subdomainPolicy,
      nonExistentSubdomainPolicy: result.dmarc.nonExistentSubdomainPolicy ?? null,
      testing: result.dmarc.testing ?? false,
      reportingEnabled: result.dmarc.reportingEnabled,
      pct: result.dmarc.percentage,
      alignmentSpf: result.dmarc.alignmentSpf,
      alignmentDkim: result.dmarc.alignmentDkim,
      ruaAddresses: result.dmarc.ruaAddresses,
      warnings: result.dmarc.warnings
    },
    mx: {
      exists: result.mx.exists,
      hasRedundancy: result.mx.hasRedundancy,
      records: result.mx.records.map((r3) => ({
        exchange: r3.exchange,
        priority: r3.priority,
        resolves: r3.resolves,
        ipv4Count: r3.ipv4Addresses.length,
        ipv6Count: r3.ipv6Addresses.length
      }))
    },
    domainAge: {
      ageInDays: result.domainAge.ageInDays,
      createdAt: result.domainAge.createdAt,
      expiresAt: result.domainAge.expiresAt,
      daysUntilExpiry: result.domainAge.daysUntilExpiry,
      registrar: result.domainAge.registrar,
      source: result.domainAge.source,
      privacyEnabled: result.domainAge.privacyEnabled
    },
    ipv6: {
      mxHasIpv6: result.ipv6.mxHasIpv6,
      spfIncludesIpv6: result.ipv6.spfIncludesIpv6,
      mxIpv6Count: result.ipv6.mxIpv6Addresses.length
    },
    reverseDns: {
      allHavePtr: result.reverseDns.allHavePtr,
      allConfirm: result.reverseDns.allConfirm,
      count: result.reverseDns.results.length
    },
    blacklist: {
      checked: !result.blacklist.quickMode,
      overallClean: result.blacklist.overallClean,
      domainListings: result.blacklist.domainChecks.listed.map((l7) => ({
        blacklist: l7.blacklist,
        priority: l7.priority,
        delistUrl: l7.delistUrl
      })),
      ipListings: result.blacklist.ipChecks.listed.map((l7) => ({
        blacklist: l7.blacklist,
        priority: l7.priority,
        target: l7.target,
        delistUrl: l7.delistUrl
      }))
    },
    issues: result.score.deductions.map((d3) => ({
      check: d3.check,
      reason: d3.reason,
      points: d3.points,
      severity: d3.points >= 20 ? "critical" : d3.points >= 10 ? "warning" : "info"
    })),
    bonuses: result.score.bonuses.map((b5) => ({
      check: b5.check,
      reason: b5.reason,
      points: b5.points
    }))
  };
}
var toolsRoutes = new Elysia({ prefix: "/tools" }).use(publicRateLimitMiddleware).post("/email-check", async ({ body: body2, set: set2 }) => {
  const { domain: domain2, quick = true, dkimSelector, dkimSelectors } = body2;
  if (!/^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(domain2)) {
    return {
      success: false,
      error: "Invalid domain format",
      domain: domain2
    };
  }
  const selectors = dkimSelectors?.length ? dkimSelectors : dkimSelector ? [dkimSelector] : undefined;
  const cacheKey = getEmailCheckCacheKey(domain2, {
    quick,
    dkimSelectors: selectors
  });
  const cached2 = await getCached(cacheKey);
  if (cached2) {
    set2.headers["X-Cache"] = "HIT";
    return cached2;
  }
  try {
    const result = await runEmailCheck(domain2, {
      quick,
      skipBlacklists: quick,
      skipTls: true,
      dkimSelectors: selectors
    });
    const formatted = formatEmailCheckResult(result);
    await setCache(cacheKey, formatted);
    set2.headers["X-Cache"] = "MISS";
    return formatted;
  } catch (error49) {
    const message2 = error49 instanceof Error ? error49.message : "Unknown error";
    return {
      success: false,
      error: message2,
      domain: domain2
    };
  }
}, {
  body: t2.Object({
    domain: t2.String({
      minLength: 3,
      maxLength: 255,
      description: "Domain to check"
    }),
    quick: t2.Optional(t2.Boolean({ description: "Quick mode (skip blacklist checks)" })),
    dkimSelector: t2.Optional(t2.String({
      maxLength: 100,
      description: "Single DKIM selector to check"
    })),
    dkimSelectors: t2.Optional(t2.Array(t2.String({ maxLength: 100 }), {
      description: "Multiple DKIM selectors to check"
    }))
  }),
  response: {
    200: emailCheckResponseSchema
  },
  detail: {
    tags: ["tools"],
    summary: "Check email deliverability",
    description: "Comprehensive email deliverability check for any domain. Returns SPF, DKIM, DMARC status and a grade. Optionally provide DKIM selectors for providers like AWS SES that use random selectors."
  }
}).get("/email-check/:domain", async ({ params, set: set2 }) => {
  const { domain: domain2 } = params;
  if (!/^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(domain2)) {
    return {
      success: false,
      error: "Invalid domain format",
      domain: domain2
    };
  }
  const cacheKey = getEmailCheckCacheKey(domain2, { quick: true });
  const cached2 = await getCached(cacheKey);
  if (cached2) {
    set2.headers["X-Cache"] = "HIT";
    return cached2;
  }
  try {
    const result = await runEmailCheck(domain2, {
      quick: true,
      skipBlacklists: true,
      skipTls: true
    });
    const formatted = formatEmailCheckResult(result);
    await setCache(cacheKey, formatted);
    set2.headers["X-Cache"] = "MISS";
    return formatted;
  } catch (error49) {
    const message2 = error49 instanceof Error ? error49.message : "Unknown error";
    return {
      success: false,
      error: message2,
      domain: domain2
    };
  }
}, {
  params: t2.Object({
    domain: t2.String({ description: "Domain to check", maxLength: 255 })
  }),
  response: {
    200: emailCheckResponseSchema
  },
  detail: {
    tags: ["tools"],
    summary: "Check email deliverability (GET)",
    description: "Quick email deliverability check for any domain via GET request."
  }
});

// src/routes/unsubscribe.ts
var unsubscribeRoutes = new Elysia({ prefix: "/unsubscribe" }).post("/:token", async ({ params, body: body2, headers, set: set2 }) => {
  const { token: token2 } = params;
  const contentType = headers["content-type"] || "";
  const payload = await verifyUnsubscribeToken2(token2);
  if (!payload) {
    set2.status = 400;
    return { error: "Invalid or expired unsubscribe link" };
  }
  const { cid: contactId, oid: organizationId, tid: topicId } = payload;
  const [existingContact] = await db.select({
    id: contact.id,
    email: contact.email,
    emailStatus: contact.emailStatus
  }).from(contact).where(and(eq(contact.id, contactId), eq(contact.organizationId, organizationId))).limit(1);
  if (!existingContact) {
    set2.status = 404;
    return { error: "Contact not found" };
  }
  const isOneClick = contentType.includes("application/x-www-form-urlencoded") && (typeof body2 === "string" ? body2.includes("List-Unsubscribe=One-Click") : typeof body2 === "object" && body2 !== null && body2["List-Unsubscribe"] === "One-Click");
  const now = new Date;
  if (topicId) {
    const [topicRecord] = await db.select({ name: topic.name }).from(topic).where(and(eq(topic.id, topicId), eq(topic.organizationId, organizationId))).limit(1);
    await db.update(contactTopic).set({
      status: "unsubscribed",
      unsubscribedAt: now
    }).where(and(eq(contactTopic.contactId, contactId), eq(contactTopic.topicId, topicId)));
    await emitTopicUnsubscribed({
      contactId,
      organizationId,
      topicId,
      topicName: topicRecord?.name
    }).catch((err) => {
      log3.error("Failed to emit topic_unsubscribed event", err, {
        contactId,
        topicId
      });
    });
    log3.info("Unsubscribe: topic unsubscribed", { contactId, topicId });
  } else {
    const subscribedTopics = await db.select({
      topicId: contactTopic.topicId,
      topicName: topic.name
    }).from(contactTopic).innerJoin(topic, eq(topic.id, contactTopic.topicId)).where(and(eq(contactTopic.contactId, contactId), eq(contactTopic.status, "subscribed")));
    await db.update(contact).set({
      emailStatus: "unsubscribed",
      emailUnsubscribedAt: now
    }).where(and(eq(contact.id, contactId), eq(contact.organizationId, organizationId)));
    await db.update(contactTopic).set({
      status: "unsubscribed",
      unsubscribedAt: now
    }).where(eq(contactTopic.contactId, contactId));
    await Promise.all(subscribedTopics.map((t3) => emitTopicUnsubscribed({
      contactId,
      organizationId,
      topicId: t3.topicId,
      topicName: t3.topicName
    }).catch((err) => {
      log3.error("Failed to emit topic_unsubscribed event", err, {
        contactId,
        topicId: t3.topicId
      });
    })));
    log3.info("Unsubscribe: global unsubscribe", {
      contactId,
      topicCount: subscribedTopics.length
    });
  }
  if (isOneClick) {
    set2.status = 200;
    return { success: true, message: "Unsubscribed successfully" };
  }
  return {
    success: true,
    message: topicId ? "You have been unsubscribed from this topic." : "You have been unsubscribed from all emails.",
    contactId,
    topicId
  };
}, {
  params: t2.Object({
    token: t2.String({ description: "Unsubscribe token", maxLength: 500 })
  }),
  body: t2.Optional(t2.Unknown()),
  response: {
    200: t2.Object({
      success: t2.Boolean(),
      message: t2.Optional(t2.String()),
      contactId: t2.Optional(t2.String()),
      topicId: t2.Optional(t2.String())
    }),
    400: t2.Object({
      error: t2.String()
    }),
    404: t2.Object({
      error: t2.String()
    })
  },
  detail: {
    tags: ["unsubscribe"],
    summary: "One-click unsubscribe (RFC 8058)",
    description: "Processes unsubscribe requests. Supports RFC 8058 one-click unsubscribe via POST with body 'List-Unsubscribe=One-Click'. Returns 200 OK directly (no redirects per RFC 8058 spec)."
  }
}).get("/:token", async ({ params, request: request2 }) => {
  const { token: token2 } = params;
  const requestId = request2.headers.get("x-request-id") ?? undefined;
  const payload = await verifyUnsubscribeToken2(token2);
  if (!payload) {
    return htmlResponse(400, `
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Invalid Link - Wraps</title>
  <style>
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; text-align: center; }
    h1 { color: #dc2626; }
    p { color: #6b7280; line-height: 1.6; }
  </style>
</head>
<body>
  <h1>Invalid or Expired Link</h1>
  <p>This unsubscribe link is no longer valid. It may have expired or already been used.</p>
  <p>If you continue to receive unwanted emails, please contact support.</p>
</body>
</html>`, requestId);
  }
  const { cid: contactId, oid: organizationId, tid: topicId } = payload;
  const [existingContact] = await db.select({
    id: contact.id,
    email: contact.email,
    emailStatus: contact.emailStatus
  }).from(contact).where(and(eq(contact.id, contactId), eq(contact.organizationId, organizationId))).limit(1);
  if (!existingContact) {
    return htmlResponse(404, `
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Not Found - Wraps</title>
  <style>
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; text-align: center; }
    h1 { color: #dc2626; }
    p { color: #6b7280; line-height: 1.6; }
  </style>
</head>
<body>
  <h1>Contact Not Found</h1>
  <p>We couldn't find your subscription. You may have already been unsubscribed.</p>
</body>
</html>`, requestId);
  }
  let topicName = "";
  if (topicId) {
    const [topicRecord] = await db.select({ name: topic.name }).from(topic).where(and(eq(topic.id, topicId), eq(topic.organizationId, organizationId))).limit(1);
    topicName = topicRecord?.name || "this topic";
  }
  const maskedEmail = existingContact.email ? maskEmail(existingContact.email) : "your email";
  return htmlResponse(200, `
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Unsubscribe - Wraps</title>
  <style>
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; text-align: center; }
    h1 { color: #111827; margin-bottom: 16px; }
    p { color: #6b7280; line-height: 1.6; margin-bottom: 24px; }
    .email { font-weight: 600; color: #111827; }
    .topic { font-weight: 600; color: #4f46e5; }
    button { background: #dc2626; color: white; border: none; padding: 12px 32px; font-size: 16px; border-radius: 8px; cursor: pointer; }
    button:hover { background: #b91c1c; }
    .success { display: none; }
    .success h1 { color: #059669; }
  </style>
</head>
<body>
  <div class="form">
    <h1>Unsubscribe</h1>
    <p>
      You are about to unsubscribe <span class="email">${escapeHtml(maskedEmail)}</span>
      ${topicId ? ` from <span class="topic">${escapeHtml(topicName)}</span>` : " from all email communications"}.
    </p>
    <form method="POST" action="/unsubscribe/${token2}">
      <button type="submit">Confirm Unsubscribe</button>
    </form>
  </div>
  <div class="success">
    <h1>Unsubscribed</h1>
    <p>You have been successfully unsubscribed. You will no longer receive ${topicId ? `emails about ${escapeHtml(topicName)}` : "marketing emails from us"}.</p>
  </div>
  <script>
    document.querySelector('form').addEventListener('submit', async (e) => {
      e.preventDefault();
      try {
        const res = await fetch('/unsubscribe/${token2}', { method: 'POST' });
        if (res.ok) {
          document.querySelector('.form').style.display = 'none';
          document.querySelector('.success').style.display = 'block';
        }
      } catch (err) {
        alert('Failed to unsubscribe. Please try again.');
      }
    });
  </script>
</body>
</html>`, requestId);
}, {
  params: t2.Object({
    token: t2.String({ description: "Unsubscribe token", maxLength: 500 })
  }),
  detail: {
    tags: ["unsubscribe"],
    summary: "Unsubscribe confirmation page",
    description: "Shows a confirmation page for users who click the unsubscribe link in emails. Displays a form to confirm the unsubscribe action.",
    responses: {
      200: {
        description: "HTML confirmation page",
        content: { "text/html": { schema: { type: "string" } } }
      },
      400: {
        description: "HTML error page (invalid or expired token)",
        content: { "text/html": { schema: { type: "string" } } }
      },
      404: {
        description: "HTML error page (contact not found)",
        content: { "text/html": { schema: { type: "string" } } }
      }
    }
  }
});
function htmlResponse(status2, html3, requestId) {
  const headers = {
    "Content-Type": "text/html; charset=utf-8",
    "Cache-Control": "no-store",
    "Referrer-Policy": "no-referrer"
  };
  if (requestId) {
    headers["x-request-id"] = requestId;
  }
  return new Response(html3, { status: status2, headers });
}
function escapeHtml(str) {
  return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
}
function maskEmail(email3) {
  const [local, domain2] = email3.split("@");
  if (!(local && domain2)) {
    return email3;
  }
  if (local.length <= 2) {
    return `${local[0]}***@${domain2}`;
  }
  return `${local[0]}***${local.at(-1)}@${domain2}`;
}

// src/routes/webhooks.ts
import { timingSafeEqual as timingSafeEqual2 } from "node:crypto";
function sdkLogLifecycleFields(eventType, detail) {
  switch (eventType) {
    case "Send":
      return { status: "sent" };
    case "Delivery":
      return {
        status: "delivered",
        deliveredAt: detail.delivery?.timestamp ? new Date(detail.delivery.timestamp) : undefined
      };
    case "Bounce":
      return {
        status: "bounced",
        bouncedAt: detail.bounce?.timestamp ? new Date(detail.bounce.timestamp) : undefined,
        bounceType: detail.bounce?.bounceType,
        bounceSubType: detail.bounce?.bounceSubType
      };
    case "Complaint":
      return {
        status: "complained",
        complainedAt: detail.complaint?.timestamp ? new Date(detail.complaint.timestamp) : undefined
      };
    case "Suppressed":
      return {
        status: "suppressed",
        suppressedAt: detail.suppression?.timestamp ? new Date(detail.suppression.timestamp) : undefined
      };
    default:
      return null;
  }
}
async function incrementDeliveryCount(organizationId) {
  const now = new Date;
  const periodKey = `${now.getUTCFullYear()}-${String(now.getUTCMonth() + 1).padStart(2, "0")}`;
  await db.insert(messageUsageMonthly).values({
    organizationId,
    periodKey,
    messageCount: 1,
    updatedAt: now
  }).onConflictDoUpdate({
    target: [
      messageUsageMonthly.organizationId,
      messageUsageMonthly.periodKey
    ],
    set: {
      messageCount: sql`${messageUsageMonthly.messageCount} + 1`,
      updatedAt: now
    }
  });
}
var hasZeroRowCount = (value) => {
  if (typeof value !== "object" || value === null || !("rowCount" in value)) {
    return false;
  }
  const rowCount = value.rowCount;
  return rowCount === 0;
};
var webhooksRoutes = new Elysia({ prefix: "/webhooks" }).post("/ses/:awsAccountNumber", async ({ params, body: body2, headers, set: set2 }) => {
  const { awsAccountNumber } = params;
  const apiKey2 = headers["x-wraps-api-key"];
  const candidates = await db.select({
    id: awsAccount.id,
    webhookSecret: awsAccount.webhookSecret,
    organizationId: awsAccount.organizationId
  }).from(awsAccount).where(eq(awsAccount.accountId, awsAccountNumber));
  const keyBuffer = Buffer.from(apiKey2 || "");
  const account2 = candidates.find((candidate) => {
    if (!candidate.webhookSecret) {
      return false;
    }
    const secretBuffer = Buffer.from(candidate.webhookSecret);
    return secretBuffer.length === keyBuffer.length && timingSafeEqual2(secretBuffer, keyBuffer);
  });
  if (!account2) {
    log3.warn("Webhook: authentication failed", { awsAccountNumber });
    set2.status = 401;
    return { error: "Unauthorized" };
  }
  try {
    await db.update(awsAccount).set({ lastEventReceivedAt: new Date }).where(and(eq(awsAccount.id, account2.id), or(isNull(awsAccount.lastEventReceivedAt), lt(awsAccount.lastEventReceivedAt, new Date(Date.now() - 60000)))));
  } catch (error49) {
    log3.error("Webhook: failed to record lastEventReceivedAt", error49, {
      awsAccountNumber
    });
  }
  const event = body2;
  const { eventType, mail } = event.detail;
  if (!mail?.messageId) {
    log3.warn("Webhook: event missing mail.messageId", {
      eventType,
      awsAccountNumber
    });
    return { status: "ignored", reason: "missing mail.messageId" };
  }
  const messageId = mail.messageId;
  log3.info("Webhook: processing event", { eventType, messageId });
  const [message2] = await db.select({
    id: messageSend.id,
    status: messageSend.status,
    batchSendId: messageSend.batchSendId,
    contactId: messageSend.contactId,
    openedAt: messageSend.openedAt,
    clickedAt: messageSend.clickedAt
  }).from(messageSend).where(and(eq(messageSend.messageId, messageId), eq(messageSend.organizationId, account2.organizationId))).limit(1);
  if (!message2) {
    const recipient = mail.destination?.[0];
    const lifecycle = sdkLogLifecycleFields(eventType, event.detail);
    let insertedRow = false;
    if (recipient && lifecycle) {
      const inserted = await db.insert(messageSend).values({
        organizationId: account2.organizationId,
        awsAccountId: account2.id,
        channel: "email",
        sourceType: "transactional",
        recipient,
        subject: mail.commonHeaders?.subject ?? null,
        from: mail.source ?? null,
        messageId,
        sentAt: mail.timestamp ? new Date(mail.timestamp) : new Date,
        ...lifecycle
      }).onConflictDoNothing().returning({ id: messageSend.id });
      insertedRow = inserted.length > 0;
    }
    if (eventType === "Delivery") {
      const sdkSideEffects = [
        trackFirstEmailDelivered(account2.organizationId, "sdk")
      ];
      if (insertedRow) {
        sdkSideEffects.push(incrementDeliveryCount(account2.organizationId));
      }
      for (const r3 of await Promise.allSettled(sdkSideEffects)) {
        if (r3.status === "rejected") {
          log3.error("Webhook: SDK delivery side effect failed", r3.reason, {
            messageId
          });
        }
      }
    }
    log3.info("Webhook: message not found", { messageId });
    return { status: "ignored", reason: "message not found" };
  }
  try {
    switch (eventType) {
      case "Delivery": {
        const didTransition = await processDelivery(message2, event.detail.delivery?.timestamp);
        const sideEffects = [
          trackFirstEmailDelivered(account2.organizationId, "platform")
        ];
        if (didTransition) {
          sideEffects.push(incrementDeliveryCount(account2.organizationId));
        }
        for (const r3 of await Promise.allSettled(sideEffects)) {
          if (r3.status === "rejected") {
            log3.error("Webhook: delivery side effect failed", r3.reason, {
              messageId
            });
          }
        }
        break;
      }
      case "Open":
        await processOpen(message2, messageId, account2.organizationId, event.detail.open?.timestamp, event.detail.open?.userAgent, event.detail.open?.ipAddress);
        break;
      case "Click":
        await processClick(message2, messageId, account2.organizationId, event.detail.click?.timestamp, event.detail.click?.link, event.detail.click?.userAgent, event.detail.click?.ipAddress);
        break;
      case "Bounce":
        await processBounce(message2, messageId, account2.organizationId, event.detail.bounce?.bounceType, event.detail.bounce?.bounceSubType, event.detail.bounce?.timestamp);
        break;
      case "Complaint":
        await processComplaint(message2, messageId, account2.organizationId, event.detail.complaint?.timestamp);
        break;
      case "Suppressed":
        await processSuppression(message2, event.detail.suppression?.reason, event.detail.suppression?.timestamp);
        if (message2.contactId) {
          await resumeWaitingExecutions(messageId, message2.contactId, "bounced", account2.organizationId);
        }
        break;
      case "Reject":
        await processReject(message2, messageId, account2.organizationId);
        await notifySendFailures(account2.organizationId, "reject");
        break;
      case "Rendering Failure":
        await processRenderingFailure(message2, event.detail.failure?.errorMessage, event.detail.failure?.templateName, mail.tags);
        await notifySendFailures(account2.organizationId, "rendering_failure", event.detail.failure?.templateName);
        break;
      default:
        return {
          status: "ignored",
          reason: `unsupported event type: ${eventType}`
        };
    }
    return { status: "processed", eventType, messageId };
  } catch (error49) {
    log3.error("Webhook event processing failed", error49, {
      eventType,
      messageId
    });
    set2.status = 500;
    return {
      error: "Failed to process event"
    };
  }
}, {
  params: t2.Object({
    awsAccountNumber: t2.String({
      description: "12-digit AWS account ID",
      minLength: 12,
      maxLength: 12,
      pattern: "^[0-9]{12}$"
    })
  }),
  response: {
    200: t2.Object({
      status: t2.String({ description: "Processing status" }),
      eventType: t2.Optional(t2.String()),
      messageId: t2.Optional(t2.String()),
      reason: t2.Optional(t2.String())
    }),
    401: t2.Object({
      error: t2.String()
    }),
    500: t2.Object({
      error: t2.String(),
      details: t2.Optional(t2.String())
    })
  },
  detail: {
    tags: ["webhooks"],
    summary: "Receive SES events",
    description: "Webhook endpoint for receiving SES events from EventBridge API Destination. The awsAccountNumber is the 12-digit AWS account ID."
  }
});
async function processDelivery(message2, timestamp2) {
  if (message2.status === "bounced" || message2.status === "complained") {
    log3.info("Webhook: delivery skipped — status precedence", {
      messageId: message2.id,
      currentStatus: message2.status
    });
    return false;
  }
  const deliveredAt = timestamp2 ? new Date(timestamp2) : new Date;
  const updated = await db.update(messageSend).set({ status: "delivered", deliveredAt }).where(and(eq(messageSend.id, message2.id), inArray(messageSend.status, ["pending", "queued", "sent"]))).returning({ id: messageSend.id });
  let wasWronglyFailed = false;
  if (updated.length === 0) {
    const healed = await db.update(messageSend).set({ status: "delivered", deliveredAt, error: null }).where(and(eq(messageSend.id, message2.id), eq(messageSend.status, "failed"))).returning({ id: messageSend.id });
    wasWronglyFailed = healed.length > 0;
  }
  const didTransition = updated.length > 0 || wasWronglyFailed;
  if (!didTransition) {
    log3.info("Webhook: duplicate delivery, skipping counter", {
      messageId: message2.id
    });
    return false;
  }
  if (message2.batchSendId) {
    await db.update(batchSend).set({
      delivered: sql`${batchSend.delivered} + 1`,
      ...wasWronglyFailed ? { failed: sql`greatest(${batchSend.failed} - 1, 0)` } : {}
    }).where(eq(batchSend.id, message2.batchSendId));
  }
  log3.info("Webhook: message delivered", {
    messageId: message2.id,
    healedFromFailed: wasWronglyFailed
  });
  return true;
}
async function processOpen(message2, messageId, organizationId, timestamp2, userAgent, ipAddress) {
  const openedAt = timestamp2 ? new Date(timestamp2) : new Date;
  if (message2.openedAt) {
    log3.info("Webhook: duplicate open, skipping", { messageId: message2.id });
    return;
  }
  const result = await db.update(messageSend).set({
    status: "opened",
    openedAt,
    openUserAgent: userAgent ?? null,
    openIpAddress: ipAddress ?? null
  }).where(and(eq(messageSend.id, message2.id), isNull(messageSend.openedAt)));
  if (hasZeroRowCount(result)) {
    log3.info("Webhook: duplicate open (race), skipping", {
      messageId: message2.id
    });
    return;
  }
  if (message2.batchSendId) {
    await db.update(batchSend).set({
      opened: sql`${batchSend.opened} + 1`
    }).where(eq(batchSend.id, message2.batchSendId));
  }
  if (message2.contactId) {
    await db.update(contact).set({
      lastEmailOpenedAt: openedAt,
      emailsOpened: sql`${contact.emailsOpened} + 1`
    }).where(eq(contact.id, message2.contactId));
    await resumeWaitingExecutions(messageId, message2.contactId, "opened", organizationId);
  }
  log3.info("Webhook: message opened", { messageId: message2.id });
}
async function processClick(message2, messageId, organizationId, timestamp2, link4, userAgent, ipAddress) {
  const clickedAt = timestamp2 ? new Date(timestamp2) : new Date;
  if (message2.clickedAt) {
    log3.info("Webhook: duplicate click, skipping", { messageId: message2.id });
    return;
  }
  const result = await db.update(messageSend).set({
    status: "clicked",
    clickedAt,
    clickedUrl: link4 ?? null,
    clickUserAgent: userAgent ?? null,
    clickIpAddress: ipAddress ?? null
  }).where(and(eq(messageSend.id, message2.id), isNull(messageSend.clickedAt)));
  if (hasZeroRowCount(result)) {
    log3.info("Webhook: duplicate click (race), skipping", {
      messageId: message2.id
    });
    return;
  }
  if (message2.batchSendId) {
    await db.update(batchSend).set({
      clicked: sql`${batchSend.clicked} + 1`
    }).where(eq(batchSend.id, message2.batchSendId));
  }
  if (message2.contactId) {
    await db.update(contact).set({
      lastEmailClickedAt: clickedAt,
      emailsClicked: sql`${contact.emailsClicked} + 1`
    }).where(eq(contact.id, message2.contactId));
    await resumeWaitingExecutions(messageId, message2.contactId, "clicked", organizationId);
  }
  log3.info("Webhook: message clicked", { messageId: message2.id });
}
async function processBounce(message2, messageId, organizationId, bounceType, bounceSubType, timestamp2) {
  if (bounceSubType === "Suppressed") {
    await processSuppression(message2, "Suppressed", timestamp2);
    if (message2.contactId) {
      await resumeWaitingExecutions(messageId, message2.contactId, "bounced", organizationId);
    }
    return;
  }
  const bouncedAt = timestamp2 ? new Date(timestamp2) : new Date;
  const transitioned = await db.update(messageSend).set({
    status: "bounced",
    bouncedAt,
    bounceType: bounceType ?? null,
    bounceSubType: bounceSubType ?? null
  }).where(and(eq(messageSend.id, message2.id), ne(messageSend.status, "bounced"))).returning({ id: messageSend.id });
  if (transitioned.length === 0) {
    log3.info("Webhook: duplicate bounce, skipping counter", {
      messageId: message2.id
    });
    return;
  }
  if (message2.batchSendId) {
    await db.update(batchSend).set({
      bounced: sql`${batchSend.bounced} + 1`
    }).where(eq(batchSend.id, message2.batchSendId));
  }
  if (message2.contactId && bounceType === "Permanent") {
    await db.update(contact).set({
      emailStatus: "bounced",
      emailBouncedAt: bouncedAt
    }).where(eq(contact.id, message2.contactId));
  }
  if (message2.contactId) {
    await resumeWaitingExecutions(messageId, message2.contactId, "bounced", organizationId);
  }
  log3.info("Webhook: message bounced", {
    messageId: message2.id,
    bounceType,
    bounceSubType
  });
}
async function processComplaint(message2, messageId, organizationId, timestamp2) {
  const complainedAt = timestamp2 ? new Date(timestamp2) : new Date;
  const transitioned = await db.update(messageSend).set({
    status: "complained",
    complainedAt
  }).where(and(eq(messageSend.id, message2.id), ne(messageSend.status, "complained"))).returning({ id: messageSend.id });
  if (transitioned.length === 0) {
    log3.info("Webhook: duplicate complaint, skipping counter", {
      messageId: message2.id
    });
    return;
  }
  if (message2.batchSendId) {
    await db.update(batchSend).set({
      complained: sql`${batchSend.complained} + 1`
    }).where(eq(batchSend.id, message2.batchSendId));
  }
  if (message2.contactId) {
    await db.update(contact).set({
      emailStatus: "complained",
      emailComplainedAt: complainedAt
    }).where(eq(contact.id, message2.contactId));
  }
  if (message2.contactId) {
    await resumeWaitingExecutions(messageId, message2.contactId, "bounced", organizationId);
  }
  log3.info("Webhook: message complained", { messageId: message2.id });
}
async function notifySendFailures(organizationId, reason, detail) {
  try {
    const since = new Date(Date.now() - 24 * 60 * 60 * 1000);
    const already = await hasRecentNotification({
      organizationId,
      type: "ses.send_failures",
      since
    });
    if (already) {
      return;
    }
    const [org] = await db.select({ slug: organization.slug }).from(organization).where(eq(organization.id, organizationId)).limit(1);
    if (!org?.slug) {
      return;
    }
    const reasonText = reason === "reject" ? "SES rejected a message before attempting delivery (bad content or account-level reputation)." : `SES failed to render a template${detail ? `: ${detail}` : "."}`;
    await notifyOrg({
      organizationId,
      roles: ["owner", "admin"],
      type: "ses.send_failures",
      title: "Email sends are failing",
      body: `${reasonText} Affected messages are marked failed — check your recent sends.`,
      href: `/${org.slug}/emails`,
      data: { reason }
    });
  } catch (error49) {
    log3.error("Webhook: failed to write send-failure notification", error49, {
      organizationId
    });
  }
}
async function processReject(message2, messageId, organizationId) {
  if (message2.status === "bounced" || message2.status === "complained") {
    log3.info("Webhook: reject skipped — status precedence", {
      messageId: message2.id,
      currentStatus: message2.status
    });
    return;
  }
  await db.update(messageSend).set({
    status: "failed"
  }).where(and(eq(messageSend.id, message2.id), notInArray(messageSend.status, ["bounced", "complained"])));
  if (message2.contactId) {
    await resumeWaitingExecutions(messageId, message2.contactId, "bounced", organizationId);
  }
  log3.info("Webhook: message rejected by SES", { messageId: message2.id });
}
async function processSuppression(message2, suppressionReason, timestamp2) {
  const suppressedAt = timestamp2 ? new Date(timestamp2) : new Date;
  const transitioned = await db.update(messageSend).set({
    status: "suppressed",
    suppressedAt
  }).where(and(eq(messageSend.id, message2.id), ne(messageSend.status, "suppressed"))).returning({ id: messageSend.id });
  if (transitioned.length === 0) {
    log3.info("Webhook: duplicate suppression, skipping counter", {
      messageId: message2.id
    });
    return;
  }
  if (message2.batchSendId) {
    await db.update(batchSend).set({
      suppressed: sql`${batchSend.suppressed} + 1`
    }).where(eq(batchSend.id, message2.batchSendId));
  }
  if (message2.contactId) {
    await db.update(contact).set({
      emailStatus: "suppressed",
      emailSuppressedAt: suppressedAt
    }).where(eq(contact.id, message2.contactId));
  }
  log3.info("Webhook: message suppressed", {
    messageId: message2.id,
    reason: suppressionReason
  });
}
async function processRenderingFailure(message2, errorMessage, templateName, tags) {
  const errorText = errorMessage ? `Rendering failure: ${errorMessage}` : "Template rendering failure";
  await db.update(messageSend).set({
    status: "failed",
    error: errorText
  }).where(eq(messageSend.id, message2.id));
  if (message2.batchSendId) {
    await db.update(batchSend).set({
      failed: sql`${batchSend.failed} + 1`
    }).where(eq(batchSend.id, message2.batchSendId));
  }
  const executionId = tags?.executionId?.[0];
  if (executionId) {
    await db.transaction(async (tx) => {
      const [execution] = await tx.update(workflowExecution).set({
        status: "failed",
        error: errorText,
        completedAt: new Date,
        updatedAt: new Date
      }).where(and(eq(workflowExecution.id, executionId), inArray(workflowExecution.status, ["active", "paused", "waiting"]))).returning();
      if (execution) {
        await tx.update(workflow).set({
          activeExecutions: sql`GREATEST(0, ${workflow.activeExecutions} - 1)`,
          failedExecutions: sql`${workflow.failedExecutions} + 1`
        }).where(eq(workflow.id, execution.workflowId));
      }
    });
  }
  log3.error("Webhook: template rendering failure", {
    messageId: message2.id,
    errorMessage,
    templateName,
    executionId
  });
}
async function resumeWaitingExecutions(messageId, contactId, branch, organizationId) {
  const waitingEvent = `email_engagement:${messageId}`;
  const waitingExecutions = await db.select().from(workflowExecution).where(and(eq(workflowExecution.organizationId, organizationId), eq(workflowExecution.contactId, contactId), eq(workflowExecution.status, "waiting"), eq(workflowExecution.waitingForEvent, waitingEvent)));
  const safeExecutions = waitingExecutions.filter((e3) => e3.organizationId === organizationId);
  for (const execution of safeExecutions) {
    log3.info("Webhook: resuming workflow execution", {
      executionId: execution.id,
      branch
    });
    if (execution.waitTimeoutSchedulerName) {
      await deleteScheduledStep(execution.waitTimeoutSchedulerName);
    }
    await enqueueWorkflowStep({
      type: "resume",
      executionId: execution.id,
      branch,
      organizationId: execution.organizationId
    });
  }
}

// src/routes/well-known.ts
var wellKnownRoutes = new Elysia({ prefix: "/.well-known" }).get("/oauth-authorization-server", () => ({
  issuer: "https://api.wraps.dev",
  device_authorization_endpoint: "https://app.wraps.dev/api/auth/device/code",
  token_endpoint: "https://app.wraps.dev/api/auth/device/token",
  grant_types_supported: [
    "urn:ietf:params:oauth:grant-type:device_code"
  ],
  token_endpoint_auth_methods_supported: ["none"],
  service_documentation: "https://wraps.dev/docs"
}), {
  response: t2.Object({
    issuer: t2.String(),
    device_authorization_endpoint: t2.String(),
    token_endpoint: t2.String(),
    grant_types_supported: t2.Array(t2.String()),
    token_endpoint_auth_methods_supported: t2.Array(t2.String()),
    service_documentation: t2.String()
  }),
  detail: {
    tags: ["health"],
    summary: "OAuth 2.0 Authorization Server Metadata",
    description: "RFC 8414 OAuth 2.0 Authorization Server Metadata. Describes the Device Authorization Grant flow used by the Wraps CLI and AI agents.",
    security: []
  }
});

// src/index.ts
var openApiDocumentation = {
  openapi: "3.0.3",
  info: {
    title: "Wraps Platform API",
    version: "1.0.0",
    description: "REST API for the Wraps email marketing platform. Send emails, manage contacts, trigger workflows, and process events.",
    contact: {
      name: "Wraps Support",
      url: "https://wraps.dev",
      email: "support@wraps.dev"
    },
    license: {
      name: "Proprietary",
      url: "https://wraps.dev/terms"
    },
    termsOfService: "https://wraps.dev/terms"
  },
  servers: [
    {
      url: "https://api.wraps.dev",
      description: "Production API"
    }
  ],
  tags: [
    { name: "health", description: "Health check and API info endpoints" },
    {
      name: "contacts",
      description: "Contact management - create, update, delete, and list contacts"
    },
    {
      name: "batch",
      description: "Batch email sending operations for broadcasts"
    },
    {
      name: "events",
      description: "Custom event ingestion for triggering workflows"
    },
    {
      name: "workflows",
      description: "API-triggered workflow execution endpoints"
    },
    {
      name: "connections",
      description: "AWS account connection management"
    },
    {
      name: "email-logs",
      description: "Email delivery log inspection"
    },
    {
      name: "webhooks",
      description: "Webhook endpoints for receiving SES events"
    },
    {
      name: "unsubscribe",
      description: "RFC 8058 compliant email unsubscribe endpoints"
    },
    {
      name: "tools",
      description: "Free email deliverability tools (no auth required)"
    }
  ],
  components: {
    securitySchemes: {
      bearerAuth: {
        type: "http",
        scheme: "bearer",
        description: "API key (wraps_*) or session token. Use format: Bearer wraps_your_api_key"
      }
    }
  },
  security: [{ bearerAuth: [] }]
};
var app = new Elysia().derive(({ request: request2 }) => ({
  startTime: performance.now(),
  requestId: request2.headers.get("x-request-id") ?? crypto.randomUUID()
})).onAfterResponse(({ request: request2, startTime, requestId, set: set2, ...ctx }) => {
  const auth = getAuthOptional(ctx);
  set2.headers["x-request-id"] = requestId;
  if (!auth) {
    return;
  }
  const url2 = new URL(request2.url);
  log3.info("api.request", {
    requestId,
    method: request2.method,
    path: url2.pathname,
    status: set2.status ?? 200,
    durationMs: Math.round(performance.now() - startTime),
    organizationId: auth.organizationId,
    apiKeyId: auth.apiKeyId,
    userId: auth.userId,
    planId: auth.planId,
    authMethod: auth.apiKeyId ? "api_key" : "session"
  });
}).onError(({ error: error49, request: request2, code: code2, set: set2, requestId, ...ctx }) => {
  const auth = getAuthOptional(ctx);
  const url2 = new URL(request2.url);
  const status2 = code2 === "NOT_FOUND" ? 404 : code2 === "VALIDATION" ? 400 : set2.status ?? 500;
  log3.error("api.error", error49 instanceof Error ? error49 : new Error(String(error49)), {
    requestId,
    method: request2.method,
    path: url2.pathname,
    status: status2,
    code: code2,
    organizationId: auth?.organizationId,
    apiKeyId: auth?.apiKeyId,
    userId: auth?.userId,
    authMethod: auth?.apiKeyId ? "api_key" : auth ? "session" : undefined
  });
  if (code2 !== "NOT_FOUND" && code2 !== "VALIDATION") {
    captureException(error49 instanceof Error ? error49 : new Error(String(error49)), {
      extra: {
        requestId,
        url: request2.url,
        method: request2.method,
        path: url2.pathname,
        status: status2,
        organizationId: auth?.organizationId
      }
    });
    const posthog = getPostHogClient();
    posthog.captureException(error49 instanceof Error ? error49 : new Error(String(error49)), "api-error", {
      url: request2.url,
      method: request2.method
    });
  }
  if (code2 === "NOT_FOUND") {
    return { error: "Not found" };
  }
  if (code2 === "VALIDATION") {
    const message2 = error49 instanceof Error ? error49.message : String(error49);
    log3.warn("Validation failed", { details: message2 });
    return { error: "Validation failed" };
  }
  if (status2 >= 400 && status2 < 500) {
    const message2 = error49 instanceof Error ? error49.message : String(error49);
    return { error: message2 };
  }
  return { error: "Internal server error" };
}).use(cors({
  origin: true,
  credentials: false,
  allowedHeaders: ["Content-Type", "Authorization", "X-Organization-Id"],
  methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
})).use(swagger({
  path: "/swagger",
  documentation: openApiDocumentation,
  exclude: ["/swagger", "/swagger/json"]
})).use(wellKnownRoutes).use(healthRoutes).use(connectionsRoutes).use(emailLogsRoutes).use(contactsRoutes).use(contactsTopicsRoutes).use(batchRoutes).use(eventsRoutes).use(workflowsRoutes).use(webhooksRoutes).use(unsubscribeRoutes).use(preferenceEventsRoutes).use(templatesSyncRoutes).use(workflowsSyncRoutes).use(toolsRoutes).use(workflowScheduleRoutes).use(agentsRoutes).use(agentsWebhookRoutes);
var isLambda = !!process.env.AWS_LAMBDA_FUNCTION_NAME || !!process.env.SST_DEV;
if (!isLambda && true) {
  app.listen(Number(process.env.PORT) || 3002);
}

// src/workers/batch-sender.ts
var import_client_sesv25 = __toESM(require_dist_cjs24(), 1);
var import_client_sqs3 = __toESM(require_dist_cjs22(), 1);

// src/workers/variable-mappings.ts
var CONTACT_FIELDS = new Set([
  "firstName",
  "lastName",
  "email",
  "company",
  "jobTitle"
]);
function resolveContactField(contact2, field) {
  if (field.startsWith("properties.")) {
    const propKey = field.slice("properties.".length);
    const value = contact2.properties[propKey];
    return value != null ? String(value) : "";
  }
  if (CONTACT_FIELDS.has(field)) {
    const value = contact2[field];
    return typeof value === "string" ? value : "";
  }
  return;
}
function resolveSource(source, contact2) {
  if (source.type === "static") {
    return source.value;
  }
  if (source.type === "contact") {
    return resolveContactField(contact2, source.field);
  }
  return;
}
function applyVariableMappings(existingData, mappings, contact2) {
  if (!mappings || mappings.length === 0) {
    return existingData;
  }
  const result = { ...existingData };
  for (const mapping of mappings) {
    const value = resolveSource(mapping.source, contact2);
    if (value !== undefined) {
      result[mapping.variableName] = value;
    }
  }
  return result;
}

// src/workers/batch-sender.ts
var CHUNK_SIZE = 50;
var DEFAULT_RATE_LIMIT = 14;
var QUEUE_URL2 = process.env.BATCH_QUEUE_URL;
var CLAIM_STALE_MINUTES = 15;
var SELF_RESCHEDULE_FLOOR_MS = 45000;
var SELF_RESCHEDULE_LOOP_GUARD = 2;
var SELF_RESCHEDULE_DELAY_SECONDS = 10;
var BOOKKEEPING_ATTEMPTS = 3;
async function withBookkeepingRetries(fn3) {
  let lastError;
  for (let attempt = 0;attempt < BOOKKEEPING_ATTEMPTS; attempt++) {
    try {
      return await fn3();
    } catch (error49) {
      lastError = error49;
      if (attempt < BOOKKEEPING_ATTEMPTS - 1) {
        await new Promise((resolve3) => setTimeout(resolve3, 100 * 2 ** attempt));
      }
    }
  }
  throw lastError;
}
async function recordAcceptedSend(ctx, recipient, values) {
  try {
    await withBookkeepingRetries(() => db.update(messageSend).set({
      status: "sent",
      messageId: values.messageId,
      subject: values.subject,
      sentAt: values.sentAt
    }).where(and(eq(messageSend.organizationId, ctx.organizationId), eq(messageSend.batchSendId, ctx.batchId), eq(messageSend.contactId, recipient.id))));
  } catch (updateError) {
    if (values.messageId && isMessageIdUniqueViolation(updateError)) {
      try {
        await adoptOrphanRow(ctx, recipient, {
          messageId: values.messageId,
          subject: values.subject,
          sentAt: values.sentAt
        });
      } catch (adoptError) {
        log3.error("Orphan adoption failed; row remains claimed", adoptError, {
          email: recipient.email,
          messageId: values.messageId,
          batchId: ctx.batchId,
          organizationId: ctx.organizationId
        });
      }
      return;
    }
    log3.error("Post-send bookkeeping update failed after retries", updateError, {
      email: recipient.email,
      messageId: values.messageId,
      batchId: ctx.batchId,
      organizationId: ctx.organizationId
    });
  }
}
function isMessageIdUniqueViolation(err) {
  let current = err;
  const seen = new Set;
  while (current instanceof Error && !seen.has(current)) {
    seen.add(current);
    if (current.message.includes("message_send_message_id_idx")) {
      return true;
    }
    current = current.cause;
  }
  return false;
}
var ORPHAN_STATUS_RANK = {
  sent: 0,
  delivered: 1,
  opened: 2,
  clicked: 2,
  bounced: 3,
  complained: 3,
  suppressed: 3
};
async function adoptOrphanRow(ctx, recipient, values) {
  await db.transaction(async (tx) => {
    const [orphan] = await tx.select({
      id: messageSend.id,
      status: messageSend.status,
      deliveredAt: messageSend.deliveredAt,
      openedAt: messageSend.openedAt,
      clickedAt: messageSend.clickedAt,
      bouncedAt: messageSend.bouncedAt,
      bounceType: messageSend.bounceType,
      bounceSubType: messageSend.bounceSubType,
      complainedAt: messageSend.complainedAt,
      suppressedAt: messageSend.suppressedAt
    }).from(messageSend).where(and(eq(messageSend.organizationId, ctx.organizationId), eq(messageSend.messageId, values.messageId), isNull(messageSend.batchSendId))).for("update");
    if (!orphan) {
      log3.warn("Post-send bookkeeping: messageId collision but no adoptable orphan row found", {
        messageId: values.messageId,
        batchId: ctx.batchId,
        organizationId: ctx.organizationId
      });
      return;
    }
    const orphanRank = ORPHAN_STATUS_RANK[orphan.status] ?? 0;
    const orphanIsMoreAdvanced = orphanRank > (ORPHAN_STATUS_RANK.sent ?? 0);
    await tx.delete(messageSend).where(eq(messageSend.id, orphan.id));
    await tx.update(messageSend).set({
      status: orphanIsMoreAdvanced ? orphan.status : "sent",
      messageId: values.messageId,
      subject: values.subject,
      sentAt: values.sentAt,
      deliveredAt: orphan.deliveredAt ?? undefined,
      openedAt: orphan.openedAt ?? undefined,
      clickedAt: orphan.clickedAt ?? undefined,
      bouncedAt: orphan.bouncedAt ?? undefined,
      bounceType: orphan.bounceType ?? undefined,
      bounceSubType: orphan.bounceSubType ?? undefined,
      complainedAt: orphan.complainedAt ?? undefined,
      suppressedAt: orphan.suppressedAt ?? undefined
    }).where(and(eq(messageSend.organizationId, ctx.organizationId), eq(messageSend.batchSendId, ctx.batchId), eq(messageSend.contactId, recipient.id)));
    log3.info("Adopted webhook orphan row", {
      messageId: values.messageId,
      batchId: ctx.batchId,
      orphanId: orphan.id,
      adoptedStatus: orphanIsMoreAdvanced ? orphan.status : "sent"
    });
  });
}
async function recordSendFailure(ctx, recipient, error49) {
  try {
    await withBookkeepingRetries(() => db.update(messageSend).set({ status: "failed", error: error49 }).where(and(eq(messageSend.organizationId, ctx.organizationId), eq(messageSend.batchSendId, ctx.batchId), eq(messageSend.contactId, recipient.id))));
    return true;
  } catch (updateError) {
    log3.error("Failed to record send failure; row remains claimed", updateError, {
      email: recipient.email,
      batchId: ctx.batchId,
      organizationId: ctx.organizationId
    });
    return false;
  }
}
var handler2 = async (event, context10) => {
  if (!QUEUE_URL2) {
    throw new Error("BATCH_QUEUE_URL not configured — check Lambda environment");
  }
  try {
    for (const record2 of event.Records) {
      const job = JSON.parse(record2.body);
      await processJob(job, context10, record2);
    }
  } finally {
    await flushLogger();
  }
};
async function notifyBroadcastFinished(batchId, organizationId) {
  try {
    const since = new Date(Date.now() - 24 * 60 * 60 * 1000);
    const already = await hasRecentNotification({
      organizationId,
      type: "broadcast.finished",
      since,
      dataEquals: { key: "batchId", value: batchId }
    });
    if (already) {
      return;
    }
    const [[batch], [org]] = await Promise.all([
      db.select({
        name: batchSend.name,
        subject: batchSend.subject,
        status: batchSend.status,
        sent: batchSend.sent,
        totalRecipients: batchSend.totalRecipients,
        errorMessage: batchSend.errorMessage
      }).from(batchSend).where(and(eq(batchSend.id, batchId), eq(batchSend.organizationId, organizationId))).limit(1),
      db.select({ slug: organization.slug }).from(organization).where(eq(organization.id, organizationId)).limit(1)
    ]);
    if (!(batch && org?.slug)) {
      return;
    }
    const [failedRow] = await db.select({ count: sql`count(*)::int` }).from(messageSend).where(and(eq(messageSend.batchSendId, batchId), eq(messageSend.organizationId, organizationId), eq(messageSend.status, "failed"), sql`(${messageSend.error} IS NULL OR ${messageSend.error} NOT LIKE 'Failed query%')`));
    const realFailed = failedRow?.count ?? 0;
    const label = batch.name || batch.subject || "Broadcast";
    let title;
    let body2;
    if (batch.status === "failed") {
      title = `Broadcast "${label}" failed`;
      body2 = batch.errorMessage ?? undefined;
    } else if (realFailed > 0) {
      title = `Broadcast "${label}" finished with ${realFailed} failed sends`;
      body2 = `${batch.sent} of ${batch.totalRecipients} recipients received the email. ${realFailed} sends failed.`;
    } else {
      title = `Broadcast "${label}" sent`;
      body2 = `Delivered to SES for ${batch.sent} of ${batch.totalRecipients} recipients.`;
    }
    await notifyOrg({
      organizationId,
      roles: ["owner", "admin", "marketing"],
      type: "broadcast.finished",
      title,
      body: body2,
      href: `/${org.slug}/emails/broadcasts/${batchId}`,
      data: {
        batchId,
        status: batch.status,
        sent: batch.sent,
        failed: realFailed
      }
    });
  } catch (error49) {
    log3.error("Failed to write broadcast-finished notification", error49, {
      batchId,
      organizationId
    });
  }
}
async function processJob(job, context10, record2) {
  const { batchId, organizationId, awsAccountId, channel: channel3, chunkIndex } = job;
  const [batch] = await db.select().from(batchSend).where(and(eq(batchSend.id, batchId), eq(batchSend.organizationId, organizationId))).limit(1);
  if (!batch) {
    log3.error("Batch not found", undefined, { batchId, organizationId });
    return;
  }
  if (batch.status === "cancelled") {
    log3.info("Batch cancelled, skipping", { batchId });
    return;
  }
  if (channel3 !== "email") {
    log3.error("Unsupported batch channel", undefined, {
      batchId,
      channel: channel3,
      organizationId
    });
    await db.update(batchSend).set({
      status: "failed",
      completedAt: new Date,
      processedRecipients: batch.totalRecipients,
      failed: batch.totalRecipients,
      errorMessage: `Unsupported batch channel: ${channel3}`,
      errorDetails: { channel: channel3 }
    }).where(eq(batchSend.id, batchId));
    await notifyBroadcastFinished(batchId, organizationId);
    return;
  }
  const remainingMs = context10.getRemainingTimeInMillis();
  if (remainingMs < SELF_RESCHEDULE_FLOOR_MS) {
    const receiveCount = Number(record2.attributes.ApproximateReceiveCount ?? 1);
    if (receiveCount > SELF_RESCHEDULE_LOOP_GUARD) {
      log3.warn("broadcast.self_reschedule.suspected_loop", {
        batchId,
        chunkIndex,
        remainingMs,
        receiveCount
      });
    } else {
      log3.info("broadcast.self_reschedule", {
        batchId,
        chunkIndex,
        remainingMs,
        receiveCount
      });
      await enqueueNextChunk(job, {
        delaySeconds: SELF_RESCHEDULE_DELAY_SECONDS
      });
      return;
    }
  }
  if (chunkIndex === 0) {
    await db.update(batchSend).set({ status: "processing", startedAt: new Date }).where(eq(batchSend.id, batchId));
  }
  const remainingRecipients = Math.max(batch.totalRecipients - batch.processedRecipients, 0);
  if (remainingRecipients === 0) {
    await db.update(batchSend).set({ status: "completed", completedAt: new Date }).where(eq(batchSend.id, batchId));
    await notifyBroadcastFinished(batchId, organizationId);
    return;
  }
  const contacts = await getContactsChunk(organizationId, channel3, Math.min(CHUNK_SIZE, remainingRecipients), {
    audienceType: batch.audienceType,
    topicId: batch.topicId ?? undefined,
    segmentId: batch.segmentId ?? undefined
  }, job.cursor);
  if (contacts.length === 0) {
    await db.update(batchSend).set({ status: "completed", completedAt: new Date }).where(eq(batchSend.id, batchId));
    await notifyBroadcastFinished(batchId, organizationId);
    return;
  }
  const credentials = await getCredentials(awsAccountId, organizationId);
  const [accountRow] = await db.select({ features: awsAccount.features }).from(awsAccount).where(and(eq(awsAccount.id, awsAccountId), eq(awsAccount.organizationId, organizationId))).limit(1);
  const sesClient = new import_client_sesv25.SESv2Client({
    ...awsDefaults,
    credentials: {
      accessKeyId: credentials.accessKeyId,
      secretAccessKey: credentials.secretAccessKey,
      sessionToken: credentials.sessionToken
    },
    region: credentials.region
  });
  let maxSendRate = DEFAULT_RATE_LIMIT;
  try {
    const accountInfo = await sesClient.send(new import_client_sesv25.GetAccountCommand({}));
    maxSendRate = accountInfo.SendQuota?.MaxSendRate ?? DEFAULT_RATE_LIMIT;
  } catch (error49) {
    log3.warn("Could not fetch SES rate limit, using default", {
      error: String(error49)
    });
  }
  const rateLimitDelay = Math.ceil(CHUNK_SIZE / maxSendRate);
  let sesTemplateName;
  let templateHtml;
  let orgName;
  let emailType = "marketing";
  if (batch.emailTemplateId) {
    const [[tmpl], [org]] = await Promise.all([
      db.select({
        sesTemplateName: template.sesTemplateName,
        compiledHtml: template.compiledHtml,
        emailType: template.emailType
      }).from(template).where(and(eq(template.id, batch.emailTemplateId), eq(template.organizationId, organizationId))).limit(1),
      db.select({ name: organization.name }).from(organization).where(eq(organization.id, organizationId)).limit(1)
    ]);
    sesTemplateName = tmpl?.sesTemplateName ?? undefined;
    templateHtml = tmpl?.compiledHtml ?? undefined;
    emailType = tmpl?.emailType ?? "marketing";
    orgName = org?.name ?? undefined;
  }
  let sent = 0;
  let failed = 0;
  const sentContactIds = [];
  const apiBaseUrl = process.env.API_BASE_URL || "https://api.wraps.dev";
  const appBaseUrl = process.env.APP_BASE_URL || "https://app.wraps.dev";
  let emailContacts = contacts.filter((c3) => channel3 === "email" && c3.email);
  const now = new Date;
  const claimRows = emailContacts.map((c3) => ({
    organizationId,
    contactId: c3.id,
    awsAccountId,
    channel: "email",
    batchSendId: batchId,
    sourceType: "batch",
    recipient: c3.email ?? "",
    subject: batch.subject,
    from: batch.from,
    fromName: batch.fromName,
    emailTemplateId: batch.emailTemplateId,
    status: "queued",
    claimedAt: now
  }));
  const claimed = claimRows.length ? await db.insert(messageSend).values(claimRows).onConflictDoNothing().returning({ contactId: messageSend.contactId }) : [];
  const claimedIds = new Set(claimed.map((r3) => r3.contactId));
  const notClaimed = emailContacts.filter((c3) => !claimedIds.has(c3.id)).map((c3) => c3.id);
  if (notClaimed.length > 0) {
    const reclaimed = await db.update(messageSend).set({ status: "queued", error: null, claimedAt: new Date }).where(and(eq(messageSend.organizationId, organizationId), eq(messageSend.batchSendId, batchId), inArray(messageSend.contactId, notClaimed), or(and(eq(messageSend.status, "failed"), isNull(messageSend.messageId)), and(eq(messageSend.status, "queued"), sql`${messageSend.claimedAt} < now() - interval '${sql.raw(String(CLAIM_STALE_MINUTES))} minutes'`)))).returning({ contactId: messageSend.contactId });
    for (const r3 of reclaimed) {
      claimedIds.add(r3.contactId);
    }
  }
  emailContacts = emailContacts.filter((c3) => claimedIds.has(c3.id));
  if (claimedIds.size < claimRows.length) {
    log3.info("Batch claim: skipped already-claimed contacts", {
      batchId,
      total: claimRows.length,
      claimed: claimedIds.size,
      skipped: claimRows.length - claimedIds.size
    });
  }
  const chunkProcessedRecipients = emailContacts.length;
  const isMarketing = emailType === "marketing";
  let fromAddress = batch.from;
  let fromName = batch.fromName;
  if (!fromAddress) {
    const [orgExt] = await db.select({
      defaultFrom: organizationExtension.defaultFrom,
      defaultFromName: organizationExtension.defaultFromName
    }).from(organizationExtension).where(eq(organizationExtension.organizationId, organizationId)).limit(1);
    fromAddress = orgExt?.defaultFrom ?? null;
    if (!fromName) {
      fromName = orgExt?.defaultFromName ?? null;
    }
  }
  if (!fromAddress) {
    log3.error("No sender address configured for batch", {
      batchId,
      organizationId
    });
    if (emailContacts.length > 0) {
      await db.update(messageSend).set({
        status: "failed",
        error: "No sender email configured. Set a default sender in Settings > Sender Defaults."
      }).where(and(eq(messageSend.organizationId, organizationId), eq(messageSend.batchSendId, batchId), inArray(messageSend.contactId, emailContacts.map((c3) => c3.id))));
    }
    await db.update(batchSend).set({
      status: "failed",
      completedAt: new Date,
      processedRecipients: sql`${batchSend.processedRecipients} + ${emailContacts.length}`,
      failed: sql`${batchSend.failed} + ${emailContacts.length}`
    }).where(eq(batchSend.id, batchId));
    await notifyBroadcastFinished(batchId, organizationId);
    return;
  }
  const fromDisplay = fromName ? `${fromName} <${fromAddress}>` : fromAddress;
  const configSetName = resolveConfigurationSetName({
    fromDomain: fromAddress.split("@").at(-1),
    storedConfigSetName: accountRow?.features?.email?.configSetName,
    identities: accountRow?.features?.email?.identities
  });
  const unsubscribeTopicId = batch.audienceType === "topic" ? batch.topicId ?? undefined : undefined;
  if (sesTemplateName) {
    const BULK_BATCH_SIZE = 50;
    const templateCanonicalVars = extractCanonicalVars(`${batch.subject ?? ""}
${templateHtml ?? ""}`);
    for (let i = 0;i < emailContacts.length; i += BULK_BATCH_SIZE) {
      const recipientBatch = emailContacts.slice(i, i + BULK_BATCH_SIZE);
      const prepared = await Promise.all(recipientBatch.map(async (recipient) => {
        let unsubscribeUrl;
        let preferencesUrl;
        if (isMarketing) {
          const unsubscribeToken = await generateUnsubscribeToken(recipient.id, organizationId, unsubscribeTopicId);
          unsubscribeUrl = `${apiBaseUrl}/unsubscribe/${unsubscribeToken}`;
          preferencesUrl = `${appBaseUrl}/preferences/${unsubscribeToken}`;
        }
        const finalData = applyVariableMappings(buildRecipientReplacementData(recipient, {
          orgName,
          unsubscribeUrl,
          preferencesUrl
        }), batch.variableMappings ?? undefined, recipient);
        for (const rawVar of templateCanonicalVars) {
          const sesKey = toSesVariableName(rawVar);
          if (!(sesKey in finalData)) {
            finalData[sesKey] = "";
          }
        }
        const entry = {
          Destination: {
            ToAddresses: [recipient.email]
          },
          ReplacementEmailContent: {
            ReplacementTemplate: {
              ReplacementTemplateData: JSON.stringify(finalData)
            }
          }
        };
        if (isMarketing && unsubscribeUrl) {
          entry.ReplacementHeaders = [
            {
              Name: "List-Unsubscribe",
              Value: `<${unsubscribeUrl}>`
            },
            {
              Name: "List-Unsubscribe-Post",
              Value: "List-Unsubscribe=One-Click"
            }
          ];
        }
        return {
          entry,
          renderedSubject: renderSubjectForRecord(batch.subject, finalData)
        };
      }));
      const bulkEntries = prepared.map((p3) => p3.entry);
      const defaultTemplateData = {
        email: "",
        firstName: "",
        lastName: "",
        company: "",
        jobTitle: "",
        contactEmail: "",
        contactFirstName: "",
        contactLastName: "",
        contactCompany: "",
        contactJobTitle: "",
        organizationName: orgName ?? "",
        unsubscribeUrl: "",
        preferencesUrl: ""
      };
      for (const rawVar of templateCanonicalVars) {
        const sesKey = toSesVariableName(rawVar);
        if (!(sesKey in defaultTemplateData)) {
          defaultTemplateData[sesKey] = "";
        }
      }
      let result;
      try {
        result = await sesClient.send(new import_client_sesv25.SendBulkEmailCommand({
          FromEmailAddress: fromDisplay,
          ReplyToAddresses: batch.replyTo ? [batch.replyTo] : undefined,
          DefaultContent: {
            Template: {
              TemplateName: sesTemplateName,
              TemplateData: JSON.stringify(defaultTemplateData)
            }
          },
          BulkEmailEntries: bulkEntries,
          ConfigurationSetName: configSetName,
          DefaultEmailTags: [
            { Name: "batchId", Value: batchId },
            { Name: "organizationId", Value: organizationId },
            ...batch.emailTemplateId ? [{ Name: "templateId", Value: batch.emailTemplateId }] : [],
            { Name: "source", Value: "broadcast" }
          ]
        }));
      } catch (error49) {
        const isThrottle = error49 instanceof Error && (error49.name === "Throttling" || error49.name === "TooManyRequestsException" || error49.message.includes("rate exceeded"));
        if (isThrottle) {
          await db.delete(messageSend).where(and(eq(messageSend.organizationId, organizationId), eq(messageSend.batchSendId, batchId), inArray(messageSend.contactId, emailContacts.map((c3) => c3.id)), eq(messageSend.status, "queued")));
          log3.warn("SES throttled, requeuing chunk with delay", {
            batchId,
            chunkIndex,
            delaySeconds: 30
          });
          await enqueueNextChunk({ ...job }, { delaySeconds: 30 });
          return;
        }
        const isPermission = error49 instanceof Error && (error49.name === "AccessDeniedException" || error49.name === "AccessDenied" || error49.message.includes("is not authorized to perform") || error49.message.includes("AccessDenied"));
        if (isPermission) {
          const permError = "Your IAM role does not have permission to send emails. " + "Fix: update your CloudFormation stack to the latest version, " + "or run `wraps platform update-role` in the CLI.";
          log3.error("Bulk send permission denied", error49, {
            batchId,
            organizationId
          });
          if (recipientBatch.length > 0) {
            await db.update(messageSend).set({ status: "failed", error: permError }).where(and(eq(messageSend.organizationId, organizationId), eq(messageSend.batchSendId, batchId), inArray(messageSend.contactId, recipientBatch.map((r3) => r3.id)), eq(messageSend.status, "queued")));
          }
          throw new Error(permError);
        }
        log3.error("Bulk send failed for chunk", error49, {
          batchId,
          chunkOffset: i,
          organizationId
        });
        const errorMessage = error49 instanceof Error ? error49.message : "Bulk send failed";
        if (recipientBatch.length > 0) {
          const marked2 = await db.update(messageSend).set({ status: "failed", error: errorMessage }).where(and(eq(messageSend.organizationId, organizationId), eq(messageSend.batchSendId, batchId), inArray(messageSend.contactId, recipientBatch.map((r3) => r3.id)), eq(messageSend.status, "queued"))).returning({ contactId: messageSend.contactId });
          failed += marked2.length;
        }
        continue;
      }
      const ctx = { organizationId, batchId };
      const sentAt = new Date;
      await Promise.all(recipientBatch.map(async (recipient, j4) => {
        const bulkResult = result.BulkEmailEntryResults?.[j4];
        if (bulkResult?.Status === "SUCCESS") {
          await recordAcceptedSend(ctx, recipient, {
            messageId: bulkResult.MessageId || null,
            subject: prepared[j4].renderedSubject,
            sentAt
          });
          sent++;
          sentContactIds.push(recipient.id);
        } else {
          log3.error("Bulk send failed for recipient", bulkResult?.Error, {
            email: recipient.email,
            batchId,
            organizationId
          });
          const recorded = await recordSendFailure(ctx, recipient, bulkResult?.Error ?? "Unknown error");
          if (recorded) {
            failed++;
          }
        }
      }));
    }
  } else {
    const rawHtml = templateHtml ?? batch.htmlContent ?? "<p>Hello from Wraps!</p>";
    const htmlTemplate = transformVariablesForSes(rawHtml);
    const subjectTemplate = transformVariablesForSes(batch.subject ?? "Message from Wraps");
    const CONCURRENCY = 10;
    for (let i = 0;i < emailContacts.length; i += CONCURRENCY) {
      const recipientBatch = emailContacts.slice(i, i + CONCURRENCY);
      const results = await Promise.allSettled(recipientBatch.map(async (recipient) => {
        let unsubscribeUrl;
        let preferencesUrl;
        if (isMarketing) {
          const unsubscribeToken = await generateUnsubscribeToken(recipient.id, organizationId, unsubscribeTopicId);
          unsubscribeUrl = `${apiBaseUrl}/unsubscribe/${unsubscribeToken}`;
          preferencesUrl = `${appBaseUrl}/preferences/${unsubscribeToken}`;
        }
        const finalData = applyVariableMappings(buildRecipientReplacementData(recipient, {
          orgName,
          unsubscribeUrl,
          preferencesUrl
        }), batch.variableMappings ?? undefined, recipient);
        const html3 = renderForSend(htmlTemplate, finalData);
        const subject = renderForSend(subjectTemplate, finalData, {
          noEscape: true
        });
        const result = await sendEmail2({
          client: sesClient,
          from: fromDisplay,
          to: recipient.email,
          subject,
          html: html3,
          text: htmlToPlainText3(html3),
          replyTo: batch.replyTo ?? undefined,
          configurationSetName: configSetName,
          marketing: isMarketing && unsubscribeUrl ? { unsubscribeUrl } : undefined,
          tags: [
            { name: "batchId", value: batchId },
            { name: "organizationId", value: organizationId },
            ...batch.emailTemplateId ? [{ name: "templateId", value: batch.emailTemplateId }] : [],
            { name: "source", value: "broadcast" }
          ]
        });
        return { recipient, messageId: result.messageId, subject };
      }));
      const ctx = { organizationId, batchId };
      const sentAt = new Date;
      await Promise.all(results.map(async (result, j4) => {
        const recipient = recipientBatch[j4];
        if (result.status === "fulfilled") {
          await recordAcceptedSend(ctx, recipient, {
            messageId: result.value.messageId || null,
            subject: result.value.subject,
            sentAt
          });
          sent++;
          sentContactIds.push(recipient.id);
        } else {
          log3.error("Individual send failed", result.reason, {
            email: recipient.email,
            batchId,
            organizationId
          });
          const recorded = await recordSendFailure(ctx, recipient, result.reason instanceof Error ? result.reason.message : "Send failed");
          if (recorded) {
            failed++;
          }
        }
      }));
    }
  }
  if (sent > 0) {
    await trackFirstEmailSent(organizationId, {
      channel: "email",
      source: "broadcast"
    }).catch((err) => log3.error("Activation tracking failed", err, { organizationId }));
  }
  if (sentContactIds.length > 0) {
    await db.update(contact).set({
      lastEmailSentAt: new Date,
      emailsSent: sql`COALESCE(${contact.emailsSent}, 0) + 1`
    }).where(inArray(contact.id, sentContactIds));
  }
  const lastContact = contacts.at(-1);
  const nextCursor = lastContact ? { id: lastContact.id } : null;
  await db.update(batchSend).set({
    processedRecipients: sql`${batchSend.processedRecipients} + ${chunkProcessedRecipients}`,
    sent: sql`${batchSend.sent} + ${sent}`,
    failed: sql`${batchSend.failed} + ${failed}`,
    lastChunkAt: new Date,
    lastChunkIndex: chunkIndex,
    lastCursor: nextCursor
  }).where(eq(batchSend.id, batchId));
  const shouldEnqueueNextChunk = contacts.length === Math.min(CHUNK_SIZE, remainingRecipients) && batch.processedRecipients + contacts.length < batch.totalRecipients;
  if (shouldEnqueueNextChunk) {
    await enqueueNextChunk({ ...job, chunkIndex: chunkIndex + 1, cursor: nextCursor ?? undefined }, { delaySeconds: rateLimitDelay });
  } else {
    const unaccepted = sql.raw(MESSAGE_SEND_UNACCEPTED_STATUSES.map((s3) => `'${s3}'`).join(", "));
    await db.update(batchSend).set({
      status: "completed",
      completedAt: new Date,
      sent: sql`(select count(*)::int from ${messageSend} where ${messageSend.batchSendId} = ${batchId} and ${messageSend.organizationId} = ${organizationId} and ${messageSend.status} not in (${unaccepted}))`,
      failed: sql`(select count(*)::int from ${messageSend} where ${messageSend.batchSendId} = ${batchId} and ${messageSend.organizationId} = ${organizationId} and ${messageSend.status} = 'failed')`
    }).where(eq(batchSend.id, batchId));
    await notifyBroadcastFinished(batchId, organizationId);
  }
}
async function getContactsChunk(organizationId, channel3, limit, filter, cursor) {
  const conditions = [
    eq(contact.organizationId, organizationId)
  ];
  if (channel3 === "email") {
    conditions.push(isNotNull(contact.email));
    conditions.push(sql`(${contact.emailStatus} = 'active' OR ${contact.emailStatus} IS NULL)`);
  } else if (channel3 === "sms") {
    conditions.push(isNotNull(contact.phone));
    conditions.push(eq(contact.smsStatus, "opted_in"));
  } else {
    return [];
  }
  if (filter?.audienceType === "topic" && filter.topicId) {
    const topicSubquery = db.select({ contactId: contactTopic.contactId }).from(contactTopic).where(and(eq(contactTopic.contactId, contact.id), eq(contactTopic.topicId, filter.topicId), eq(contactTopic.status, "subscribed")));
    conditions.push(exists(topicSubquery));
  }
  if (filter?.audienceType === "segment" && filter.segmentId) {
    const [segmentRow] = await db.select({ id: segment.id, condition: segment.condition }).from(segment).where(and(eq(segment.id, filter.segmentId), eq(segment.organizationId, organizationId)));
    if (!segmentRow) {
      log3.warn("Segment not found for batch send", {
        segmentId: filter.segmentId,
        organizationId
      });
      return [];
    }
    const segmentSQL = buildConditionSQL(segmentRow.condition);
    if (segmentSQL) {
      conditions.push(segmentSQL);
    }
  }
  if (cursor) {
    conditions.push(sql`${contact.id} > ${cursor.id}`);
  }
  return db.select({
    id: contact.id,
    email: contact.email,
    phone: contact.phone,
    firstName: contact.firstName,
    lastName: contact.lastName,
    company: contact.company,
    jobTitle: contact.jobTitle,
    properties: contact.properties,
    createdAt: contact.createdAt
  }).from(contact).where(and(...conditions)).orderBy(contact.id).limit(limit);
}
function htmlToPlainText3(html3) {
  return toPlainText2(html3);
}
function buildRecipientReplacementData(recipient, urls) {
  const replacementData = {};
  const addIfPresent = (key, value) => {
    if (value) {
      replacementData[key] = value;
    }
  };
  replacementData.email = recipient.email;
  replacementData.contactEmail = recipient.email;
  addIfPresent("firstName", recipient.firstName);
  addIfPresent("lastName", recipient.lastName);
  addIfPresent("company", recipient.company);
  addIfPresent("jobTitle", recipient.jobTitle);
  addIfPresent("contactFirstName", recipient.firstName);
  addIfPresent("contactLastName", recipient.lastName);
  addIfPresent("contactCompany", recipient.company);
  addIfPresent("contactJobTitle", recipient.jobTitle);
  addIfPresent("organizationName", urls.orgName);
  addIfPresent("unsubscribeUrl", urls.unsubscribeUrl);
  addIfPresent("preferencesUrl", urls.preferencesUrl);
  if (recipient.properties) {
    for (const [key, value] of Object.entries(recipient.properties)) {
      const strValue = value != null ? String(value) : null;
      if (strValue) {
        replacementData[key] = strValue;
        const flatKey = `contactProperties${key.charAt(0).toUpperCase()}${key.slice(1)}`;
        replacementData[flatKey] = strValue;
      }
    }
  }
  return replacementData;
}
function renderSubjectForRecord(subject, data) {
  if (!subject) {
    return subject;
  }
  try {
    return renderTemplateStrict(transformVariablesForSes(subject), data, {
      noEscape: true
    });
  } catch {
    return subject;
  }
}
function renderForSend(template2, data, options2 = {}) {
  try {
    return renderTemplateStrict(template2, data, options2);
  } catch (error49) {
    const reason = error49 instanceof Error ? error49.message : String(error49);
    throw new Error(`Template rendering failed: ${reason}. Send blocked so the recipient does not receive raw {{...}} template syntax.`);
  }
}
async function enqueueNextChunk(job, options2) {
  if (!QUEUE_URL2) {
    throw new Error("BATCH_QUEUE_URL not configured");
  }
  const sqsClient2 = new import_client_sqs3.SQSClient(awsDefaults);
  await sqsClient2.send(new import_client_sqs3.SendMessageCommand({
    QueueUrl: QUEUE_URL2,
    MessageBody: JSON.stringify(job),
    DelaySeconds: options2?.delaySeconds ? Math.min(options2.delaySeconds, 900) : undefined
  }));
}

// src/lambda.ts
function isSQSEvent(event) {
  return typeof event === "object" && event !== null && "Records" in event && Array.isArray(event.Records) && event.Records.length > 0 && "eventSource" in event.Records[0] && event.Records[0].eventSource === "aws:sqs";
}
var handler3 = wrapHandler(async function handler4(event, context10) {
  if (isSQSEvent(event)) {
    const queueArn = event.Records[0].eventSourceARN ?? "";
    if (queueArn.includes("wraps-selfhost-workflow")) {
      return handler(event);
    }
    await handler2(event, context10);
  }
  const httpEvent = event;
  try {
    const safePath = `/${httpEvent.rawPath.replace(/^\/+/, "")}`;
    const url2 = new URL(safePath + (httpEvent.rawQueryString ? `?${httpEvent.rawQueryString}` : ""), `https://${httpEvent.requestContext.domainName}`);
    const filteredHeaders = {};
    for (const [key, value] of Object.entries(httpEvent.headers)) {
      if (value !== undefined) {
        filteredHeaders[key] = value;
      }
    }
    if (!filteredHeaders["x-request-id"]) {
      filteredHeaders["x-request-id"] = httpEvent.requestContext.requestId;
    }
    filteredHeaders["x-source-ip"] = httpEvent.requestContext.http.sourceIp;
    const request2 = new Request(url2.toString(), {
      method: httpEvent.requestContext.http.method,
      headers: new Headers(filteredHeaders),
      body: httpEvent.body && httpEvent.requestContext.http.method !== "GET" ? httpEvent.isBase64Encoded ? Buffer.from(httpEvent.body, "base64") : httpEvent.body : undefined
    });
    const response = await app.handle(request2);
    const headers = {};
    response.headers.forEach((value, key) => {
      headers[key] = value;
    });
    let body2;
    try {
      body2 = await response.clone().text();
    } catch {
      try {
        body2 = await response.text();
      } catch {
        body2 = "";
      }
    }
    return {
      statusCode: response.status,
      headers,
      body: body2,
      isBase64Encoded: false
    };
  } finally {
    await flushLogger();
  }
});
export {
  handler3 as handler
};
